@griddo/core 1.73.29 → 1.74.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 (45) hide show
  1. package/README.md +1 -0
  2. package/dist/index.d.ts +6 -69
  3. package/dist/index.js +1 -1
  4. package/dist/src/functions/create-schemas/index.d.ts +69 -0
  5. package/dist/{utils.d.ts → src/functions/create-schemas/utils.d.ts} +2 -2
  6. package/dist/src/types/core.d.ts +419 -0
  7. package/dist/src/types/fields.d.ts +7 -0
  8. package/dist/src/types/schema-functions/fields/base.d.ts +272 -0
  9. package/dist/src/types/schema-functions/fields/page-data-fields.d.ts +36 -0
  10. package/dist/src/types/schema-functions/fields/props.d.ts +131 -0
  11. package/dist/src/types/schema-functions/fields/pure-data-fields.d.ts +34 -0
  12. package/dist/src/types/schema-functions/fields/ui-fields.d.ts +35 -0
  13. package/dist/src/types/schema-functions/schemas/CategoriesSchema.d.ts +13 -0
  14. package/dist/{types → src/types/schema-functions}/schemas/DamDefaultsSchema.d.ts +3 -1
  15. package/dist/{types → src/types/schema-functions}/schemas/DataPackCategoriesSchema.d.ts +1 -1
  16. package/dist/src/types/schema-functions/schemas/DataPackSchema.d.ts +13 -0
  17. package/dist/src/types/schema-functions/schemas/HeaderFooterSchema.d.ts +35 -0
  18. package/dist/{types → src/types/schema-functions}/schemas/LanguagesSchema.d.ts +2 -2
  19. package/dist/src/types/schema-functions/schemas/MenuSchema.d.ts +8 -0
  20. package/dist/{types → src/types/schema-functions}/schemas/ModuleCategoriesSchema.d.ts +1 -1
  21. package/dist/src/types/schema-functions/schemas/PageDataSchema.d.ts +20 -0
  22. package/dist/{types → src/types/schema-functions}/schemas/PureDataSchema.d.ts +4 -4
  23. package/dist/src/types/schema-functions/schemas/ThemesSchema.d.ts +11 -0
  24. package/dist/{types → src/types/schema-functions}/schemas/TranslationsSchema.d.ts +0 -0
  25. package/dist/src/types/schema-functions/schemas/UISchema.d.ts +47 -0
  26. package/dist/src/types/schema-functions/schemas/base.d.ts +71 -0
  27. package/dist/{types → src/types/schema-functions}/schemas/index.d.ts +1 -1
  28. package/dist/src/types/schema-functions/schemas/props.d.ts +33 -0
  29. package/dist/src/types/schema.d.ts +1 -0
  30. package/dist/src/types/theme.d.ts +57 -0
  31. package/package.json +2 -2
  32. package/dist/types/fields/base.d.ts +0 -257
  33. package/dist/types/fields/page-data-fields.d.ts +0 -36
  34. package/dist/types/fields/props.d.ts +0 -120
  35. package/dist/types/fields/pure-data-fields.d.ts +0 -34
  36. package/dist/types/fields/ui-fields.d.ts +0 -35
  37. package/dist/types/schemas/CategoriesSchema.d.ts +0 -13
  38. package/dist/types/schemas/DataPackSchema.d.ts +0 -12
  39. package/dist/types/schemas/HeaderFooterSchema.d.ts +0 -28
  40. package/dist/types/schemas/MenuSchema.d.ts +0 -8
  41. package/dist/types/schemas/PageDataSchema.d.ts +0 -20
  42. package/dist/types/schemas/ThemesSchema.d.ts +0 -9
  43. package/dist/types/schemas/UISchema.d.ts +0 -39
  44. package/dist/types/schemas/base.d.ts +0 -58
  45. package/dist/types/schemas/props.d.ts +0 -32
@@ -3,13 +3,13 @@ import { PureDataFieldsSchema } from "../fields/pure-data-fields";
3
3
  import { DataPacks, ExpirationData } from "./props";
4
4
  import { BaseDataSchema } from "./base";
5
5
  declare type PureDataSchemaProp = SearchFrom & {
6
- /** Un array de campos de Griddo. */
6
+ /** An array of Griddo fields. */
7
7
  fields: Array<PureDataFieldsSchema>;
8
8
  };
9
9
  export interface PureDataSchema extends BaseDataSchema, DataPacks, ExpirationData {
10
- /** No es necesario indicar la prop `fromPage` en un schema: **Dato estructurado puro**. Siempre va a ser `false`.
11
- * @deprecated */
12
- fromPage?: never;
10
+ /** It is not necessary to indicate the `fromPage` prop in a schema: Pure
11
+ * structured data. It will always be `false`. @deprecated */
12
+ fromPage?: false;
13
13
  schema: PureDataSchemaProp;
14
14
  }
15
15
  export {};
@@ -0,0 +1,11 @@
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>;
@@ -0,0 +1,47 @@
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 {};
@@ -0,0 +1,71 @@
1
+ import { DataPacks, Thumbnails } from "./props";
2
+ interface BaseDataSchema {
3
+ /** Title that will appear in the Griddo editor. If it is `searchable = false`,
4
+ * it will not be used for searching (default is `true`). This is what is used
5
+ * for example for structured data listings. */
6
+ title: string;
7
+ /** It is recommended, as it is used for listings and searches. */
8
+ abstract?: string;
9
+ /** Is the one to be used as the image in such listings and searches, if
10
+ * applicable. */
11
+ image?: string;
12
+ /** If `true`, the data will be of type Site, if `false`, it will be of type
13
+ * global. */
14
+ local?: boolean;
15
+ /** If it is a taxonomy or a simple or page ContentType. The difference is that
16
+ * a taxonomy does not have to define fields or schema, because it only has
17
+ * title and slug. */
18
+ taxonomy?: boolean;
19
+ /** Si es `true` el dato será de tipo página, si es`false`, será de tipo puro. */
20
+ /** If `true` the data will be of type page, if `false`, it will be simple. */
21
+ fromPage?: boolean;
22
+ /** If `true` the content is editable once created. */
23
+ editable?: boolean;
24
+ /** If `true` the data is translatable, otherwise it is the same content for
25
+ * all pages. */
26
+ translate?: boolean;
27
+ /** ???????????????????????? */
28
+ clone?: {
29
+ cloneAll: boolean;
30
+ sourceSites: Array<number>;
31
+ targetSites: Array<{
32
+ site: number;
33
+ path: string;
34
+ mandatory: boolean;
35
+ }>;
36
+ sections: Array<{
37
+ section: string;
38
+ sync: string;
39
+ }>;
40
+ } | null;
41
+ /** Field default values */
42
+ defaultValues?: unknown;
43
+ }
44
+ interface BaseUISchema extends DataPacks {
45
+ /** Sets the schema type. For internal use. */
46
+ schemaType: string;
47
+ /** If `true` it will only be possible to create one page of this type of
48
+ * template. */
49
+ singleInstance?: boolean;
50
+ /** React component name for the schema */
51
+ component: string;
52
+ /** Category name previously exported as `moduleCategories` for Griddo.
53
+ * Categories are used to distribute and sort modules in the Griddo editor
54
+ * interface. */
55
+ category?: string;
56
+ /** Name to represent the component, module or template in the Griddo editor
57
+ * interface. */
58
+ displayName: string;
59
+ /** ????? */
60
+ sectionList?: {
61
+ [key: string]: Array<string>;
62
+ };
63
+ /** Images that represent the component, module or template in the Griddo
64
+ * editor. */
65
+ thumbnails?: Thumbnails | {
66
+ [key: string]: Thumbnails;
67
+ };
68
+ /** The module or template has one reference field */
69
+ hasDistributorData?: boolean;
70
+ }
71
+ export { BaseDataSchema, BaseUISchema };
@@ -11,4 +11,4 @@ import { ThemesSchema } from "./ThemesSchema";
11
11
  import { TranslationsSchema } from "./TranslationsSchema";
12
12
  import { UISchema } from "./UISchema";
13
13
  import { HeaderFooterSchema } from "./HeaderFooterSchema";
14
- export { CategoriesSchema, DamDefaultsSchema, DataPackCategoriesSchema, DataPackSchema, LanguagesSchema, MenuSchema, ModuleCategoriesSchema, PageDataSchema, PureDataSchema, ThemesSchema, TranslationsSchema, UISchema, 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, };
@@ -0,0 +1,33 @@
1
+ import { UIFieldsSchema } from "../fields/ui-fields";
2
+ declare type DataPacks = {
3
+ /** Sets the Data Packs to which this schema belongs. */
4
+ dataPacks?: Array<string> | null;
5
+ };
6
+ interface Dimension {
7
+ /** Key with which to send the value to the dataLayer */
8
+ key: string;
9
+ /** Text for the Griddo interface (not editable) */
10
+ title: string;
11
+ /** Template key from which we get the value to send to the dataLayer, which
12
+ * takes it from the template and if not from the root. */
13
+ from: string;
14
+ }
15
+ interface ExpirationData {
16
+ /** Key of a date field of the structured data */
17
+ expirationDateField?: string;
18
+ /** Specifies the offset in days to apply to the expirationDateField value. */
19
+ expirationDateOffset?: number;
20
+ }
21
+ declare type Thumbnails = {
22
+ /** Thumbnail for 1x density screens. */
23
+ "1x"?: unknown;
24
+ /** Thumbnail for 2x density screens. */
25
+ "2x"?: unknown;
26
+ };
27
+ export interface ConfigTabs {
28
+ /** Title that will appear on the tab in the Griddo editor. */
29
+ title: "content" | "config" | (string & {});
30
+ /** Array of Griddo fields. */
31
+ fields: Array<UIFieldsSchema>;
32
+ }
33
+ export { DataPacks, Dimension, ExpirationData, Thumbnails };
@@ -0,0 +1 @@
1
+ export * as Schema from "./schema-functions/schemas";
@@ -0,0 +1,57 @@
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
+ }
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.73.29",
5
+ "version": "1.74.1",
6
6
  "authors": [
7
7
  "Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
8
8
  "Carlos Torres <carlos.torres@secuoyas.com>",
@@ -73,5 +73,5 @@
73
73
  "resolutions": {
74
74
  "colors": "1.4.0"
75
75
  },
76
- "gitHead": "1ee916d68ffb2a4aee3ead0db6e36542b6183a62"
76
+ "gitHead": "245ee6160f1fe588594018e933e186e436eefb5a"
77
77
  }
@@ -1,257 +0,0 @@
1
- import { Disabled, Entity, Group, HTMLTag, Option, Source, ThemeColors, ThemeFixedColors, ThemeVisualUniqueSelection, ThumbnailOption } from "./props";
2
- export declare type DistributiveOmit<T, K extends keyof any> = T extends any ? Omit<T, K> : never;
3
- interface GenericField {
4
- /** Establece el tipo de field */
5
- type: string;
6
- /** Valor con el que se indentificará el field en la API. Usar camelCase. */
7
- key: string;
8
- /** Label del campo que aparecerá en el formulario. */
9
- title: string;
10
- /** Si el campo es obligatorio. */
11
- mandatory?: boolean;
12
- }
13
- interface GenericComponentField extends GenericField {
14
- /** Obliga a que todos los elementos del Array sean del mismo tipo. Si se habilita esta opción el schema debería incluir un `VisualUniqueSelection` para elegir el tipo. */
15
- elementUniqueSelection?: boolean;
16
- /** Número máximo de componentes que se pueden añadir. */
17
- maxItems?: number | null;
18
- }
19
- interface GenericArrayFieldGroup extends GenericField {
20
- /** Nombre del item que se va a repetir. */
21
- name: string;
22
- /** Añade un campo FieldsDivider a modo de cabecera. */
23
- divider?: FieldsDividerData;
24
- /** Las dos formas de visualizar el array de items, con los campos plegados (dropdown) o visibles (inline). */
25
- arrayType: string;
26
- /** Plantilla de fields que se va a repetir en cada item. */
27
- fields: unknown[];
28
- }
29
- interface ArrayFieldGroup<FieldsType> extends GenericArrayFieldGroup {
30
- type: "ArrayFieldGroup";
31
- arrayType: "inline" | "dropDown";
32
- fields: (FieldsType & {
33
- isTitle?: boolean;
34
- })[];
35
- }
36
- interface AsyncCheckGroup extends GenericField, Disabled, Source {
37
- /** Listado de checkboxes que carga las opciones de una entidad de la base de datos. */
38
- type: "AsyncCheckGroup";
39
- }
40
- interface ExclusiveSource extends Partial<Source> {
41
- entity?: never;
42
- }
43
- interface ExclusiveEntity extends Partial<Entity> {
44
- source?: never;
45
- }
46
- declare type SourceOrEntity = ExclusiveSource | ExclusiveEntity;
47
- declare type AsyncSelect = GenericField & Disabled & SourceOrEntity & {
48
- type: "AsyncSelect";
49
- };
50
- interface CheckGroup extends GenericField, Group {
51
- /** Agrupación de Check Fields. */
52
- type: "CheckGroup";
53
- }
54
- interface GenericColorPicker extends GenericField {
55
- /** Texfield que permite desplegar un modal para elegir un color. */
56
- type: "ColorPicker";
57
- /** Si es true (sólo se usan colores fijos) se desactiva el campo de texto y se guarda el valor name, que será común a todas las opciones de los themes. En ese caso, los colors del esquema deben declararse como un array de objetos. */
58
- onlyFixedColors?: boolean;
59
- }
60
- interface DynamicColorPicker extends GenericColorPicker {
61
- onlyFixedColors?: false;
62
- /** Array de códigos hexadecimales de los colores que aparecerán elegibles por defecto. También es posible indicar un theme para personalizar los colores. */
63
- colors: string[] | ThemeColors[];
64
- }
65
- interface FixedColorPicker extends GenericColorPicker {
66
- onlyFixedColors?: true;
67
- /** Array de objetos con { name: 'primitiveName', hex: '#xxxxxx' } */
68
- colors: Array<ThemeFixedColors>;
69
- }
70
- declare type ColorPicker = DynamicColorPicker | FixedColorPicker;
71
- interface ComponentArray extends GenericComponentField {
72
- /** Campo para añadir múltiples componentes a un módulo. */
73
- type: "ComponentArray";
74
- }
75
- interface ComponentContainer extends GenericComponentField {
76
- /** Campo para añadir un único componente a un módulo. */
77
- type: "ComponentContainer";
78
- }
79
- interface ConditionalField<FieldsType> extends GenericField {
80
- /** Conjunto de radio buttons para mostrar u ocultar diferenes campos según el valor elegido. Los campos dentro de fields tienen que llevar la key condition con uno de los valores de options para mostrar el campo cuando el valor del radio button coincida con la condición. */
81
- type: "ConditionalField";
82
- /** Array de opciones (radio buttons). */
83
- options: Option[];
84
- /** Array de fields para el conditional. */
85
- fields: (FieldsType & {
86
- condition: unknown;
87
- })[];
88
- }
89
- interface DateField extends GenericField {
90
- /** Campo para fechas. La fecha se puede escribir o elegir en un calendario. */
91
- type: "DateField";
92
- /** Habilita la selección de un rango de fechas. Por defecto: false. */
93
- selectsRange?: boolean;
94
- }
95
- interface FieldGroup<FieldsType> extends GenericField {
96
- type: "FieldGroup";
97
- /** Array de fields que pertenecen al grupo. */
98
- fields: FieldsType[];
99
- }
100
- interface FieldsDividerData {
101
- title: string;
102
- text: string;
103
- }
104
- interface FieldsDivider extends GenericField {
105
- /** Campo para añadir un componete "divider" entre campos. */
106
- type: "FieldsDivider";
107
- /** Objeto con los campos title y text (strings). */
108
- data: FieldsDividerData;
109
- }
110
- interface FileField extends GenericField {
111
- /** Campo que permite subir ficheros. */
112
- type: "FileField";
113
- }
114
- interface HeadingField extends GenericField {
115
- /** Campo con TextField + Select. El Select aparece oculto por defecto. */
116
- type: "HeadingField";
117
- /** Propiedad obligatoria para que aparezca la opción de desplegar el campo. */
118
- advanced?: boolean;
119
- /** Valores por defecto del campo. */
120
- default: {
121
- tag: HTMLTag;
122
- content: string;
123
- };
124
- /** Array de opciones que aparecerán en el Select. */
125
- options: {
126
- value: HTMLTag;
127
- label: string;
128
- }[];
129
- }
130
- interface ImageField extends GenericField {
131
- /** Permite al usuario subir una imagen */
132
- type: "ImageField";
133
- /** Si true le hace crop al preview, si es `false` escala el preview. Por defecto: `false` */
134
- cropPreview?: boolean;
135
- }
136
- interface LinkField extends GenericField {
137
- /** Field que combina `TextField` + `ConditionalField` (`UrlField` o `ComponentContainer`) */
138
- type: "LinkField";
139
- }
140
- interface MultiCheckSelect extends GenericField, Source {
141
- /** Campo que permite renderizar un AsyncCheckGroup dentro de una lista desplegable. */
142
- type: "MultiCheckSelect";
143
- }
144
- interface MultiCheckSelectGroup extends GenericField {
145
- /** Campo para renderizar múltiples MultiCheckSelect. */
146
- type: "MultiCheckSelectGroup";
147
- /** `NoteField` con texto de ayuda que aparece debajo de la label */
148
- note?: string;
149
- /** Array con los datos de los diferentes `MultiCheckSelect` */
150
- elements: DistributiveOmit<MultiCheckSelect, "type">[];
151
- /** Si filled es `true` el campo tendrá un fondo blanco. Por defecto: false */
152
- filled?: boolean;
153
- }
154
- interface NoteField extends GenericField {
155
- /** Campo para añadir un texto destacado. */
156
- type: "NoteField";
157
- /** Valor por defecto para NoteField */
158
- value?: {
159
- title: string;
160
- text: string;
161
- };
162
- }
163
- interface NumberField extends Omit<SliderField, "type" | "step"> {
164
- /** Campo para números. Incluye botones para incrementar o decrementar el valor del campo. */
165
- type: "NumberField";
166
- /** Valor mínimo */
167
- minValue?: number;
168
- /** Valor máximo */
169
- maxValue?: number;
170
- }
171
- interface RadioGroup extends GenericField, Group {
172
- /** Agrupación de Radio Fields. */
173
- type: "RadioGroup";
174
- }
175
- interface ReferenceField extends GenericField {
176
- /** Campo que carga Datos Estructurados (normalmente puros) de la base de datos. Se suele utilizar en módulos distribuidores. */
177
- type: "ReferenceField";
178
- /** Tipos de selección: manual, automática o ambas. Por defecto: ["auto","manual"]. */
179
- selectionType?: ("auto" | "manual")[];
180
- /** Solo modo manual. */
181
- maxItems?: number;
182
- /** Array con los tipos de datos estructurados que tiene que cargar el campo. */
183
- source: string[];
184
- }
185
- interface RichText extends GenericField {
186
- /** TextArea con editor simple que exporta a markdown o html. Utiliza las librerías de draft.js y react-draft-wysiwyg.js */
187
- type: "RichText";
188
- /** Si es true exporta a `html` en vez de a `markdown`. Por defecto: `false`. */
189
- html?: boolean;
190
- }
191
- interface Select extends GenericField, Disabled {
192
- /** Lista desplegable. */
193
- type: "Select";
194
- /** Array de opciones del select. */
195
- options: Array<{
196
- value: any;
197
- label: string;
198
- }>;
199
- }
200
- interface SliderField extends GenericField {
201
- /** Campo para renderizar un slider. Devuelve un número. */
202
- type: "SliderField";
203
- /** Incremento con cada paso del slider. Por defecto: `1` */
204
- step?: 0.1 | 1 | 2 | 5 | 10 | (number & {});
205
- /** Valor mínimo del slider. Por defecto: `1` */
206
- min?: number;
207
- /** Valor máximo del slider. Por defecto: `100` */
208
- max?: number;
209
- /** String a mostrar por delante del valor en el tooltip del slider. */
210
- prefix?: string;
211
- /** String a mostrar por detrás del valor en el tooltip del slider. */
212
- suffix?: string;
213
- /** Valor por defecto del slider. Por defecto es el valor mínimo. */
214
- defaultValue?: number;
215
- }
216
- interface TextArea extends GenericField {
217
- /** Text area. */
218
- type: "TextArea";
219
- }
220
- interface TextField extends GenericField {
221
- /** Campo de texto. */
222
- type: "TextField";
223
- }
224
- interface ToggleField extends GenericField {
225
- /** Un botón toggle. */
226
- type: "ToggleField";
227
- }
228
- interface UniqueCheck extends GenericField {
229
- /** Un único check field. */
230
- type: "UniqueCheck";
231
- /** Array con un único objeto con el texto (label) del check. */
232
- options: {
233
- title: string;
234
- }[];
235
- }
236
- interface UrlField extends GenericField {
237
- /** `TextField` para enlazar páginas o urls externas. Despliega dos checkboxes para `nofollow` y abrir en una nueva pestaña: `newTab` */
238
- type: "UrlField";
239
- /** Habilita poder mostrar los checks. Por defecto: `false`. */
240
- advanced?: boolean;
241
- }
242
- interface VisualUniqueSelection extends GenericField {
243
- /** Funciona como un `RadioGroup` pero las opciones son imágenes. */
244
- type: "VisualUniqueSelection";
245
- /** Ancho para distribuir las opciones. */
246
- columns?: number;
247
- /** Array de radios que se quieren mostrar. */
248
- options: (ThumbnailOption | ThemeVisualUniqueSelection)[];
249
- }
250
- interface Wysiwyg extends GenericField {
251
- /** `TextArea` con el editor Froala. */
252
- type: "Wysiwyg";
253
- /** Opción para mostrar la versión completa del toolbar con todos los botones. Por defecto: `true`. */
254
- full?: boolean;
255
- }
256
- declare type BaseFields<T> = ArrayFieldGroup<T> | AsyncCheckGroup | AsyncSelect | CheckGroup | ColorPicker | ComponentArray | ComponentContainer | ConditionalField<T> | DateField | FieldGroup<T> | FieldsDivider | FileField | HeadingField | ImageField | LinkField | MultiCheckSelect | MultiCheckSelectGroup | NoteField | NumberField | RadioGroup | ReferenceField | RichText | Select | SliderField | TextArea | TextField | ToggleField | UniqueCheck | UrlField | VisualUniqueSelection | Wysiwyg;
257
- export { BaseFields, 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, };
@@ -1,36 +0,0 @@
1
- import { 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 } from "./base";
2
- import { Indexable, Searchable, ShowList, From } from "./props";
3
- declare type PageDataFieldsSchemaCommonProps = From & Indexable & Searchable & ShowList;
4
- export declare type PageDataArrayFieldGroupSchema = ArrayFieldGroup<PageDataFieldsSchema> & PageDataFieldsSchemaCommonProps;
5
- export declare type PageDataConditionalFieldSchema = ConditionalField<PageDataFieldsSchema> & PageDataFieldsSchemaCommonProps;
6
- export declare type PageDataFieldGroupSchema = FieldGroup<PageDataFieldsSchema> & PageDataFieldsSchemaCommonProps;
7
- export declare type PageDataAsyncCheckGroupSchema = AsyncCheckGroup & PageDataFieldsSchemaCommonProps;
8
- export declare type PageDataAsyncSelectSchema = AsyncSelect & PageDataFieldsSchemaCommonProps;
9
- export declare type PageDataCheckGroupSchema = CheckGroup & PageDataFieldsSchemaCommonProps;
10
- export declare type PageDataColorPickerSchema = ColorPicker & PageDataFieldsSchemaCommonProps;
11
- export declare type PageDataComponentArraySchema = ComponentArray & PageDataFieldsSchemaCommonProps;
12
- export declare type PageDataComponentContainerSchema = ComponentContainer & PageDataFieldsSchemaCommonProps;
13
- export declare type PageDataDateFieldSchema = DateField & PageDataFieldsSchemaCommonProps;
14
- export declare type PageDataFieldsSchemaDividerSchema = FieldsDivider & PageDataFieldsSchemaCommonProps;
15
- export declare type PageDataFileFieldSchema = FileField & PageDataFieldsSchemaCommonProps;
16
- export declare type PageDataHeadingFieldSchema = HeadingField & PageDataFieldsSchemaCommonProps;
17
- export declare type PageDataImageFieldSchema = ImageField & PageDataFieldsSchemaCommonProps;
18
- export declare type PageDataLinkFieldSchema = LinkField & PageDataFieldsSchemaCommonProps;
19
- export declare type PageDataMultiCheckSelectSchema = MultiCheckSelect & PageDataFieldsSchemaCommonProps;
20
- export declare type PageDataMultiCheckSelectGroupSchema = MultiCheckSelectGroup & PageDataFieldsSchemaCommonProps;
21
- export declare type PageDataNoteFieldSchema = NoteField & PageDataFieldsSchemaCommonProps;
22
- export declare type PageDataNumberFieldSchema = NumberField & PageDataFieldsSchemaCommonProps;
23
- export declare type PageDataRadioGroupSchema = RadioGroup & PageDataFieldsSchemaCommonProps;
24
- export declare type PageDataReferenceFieldSchema = ReferenceField & PageDataFieldsSchemaCommonProps;
25
- export declare type PageDataRichTextSchema = RichText & PageDataFieldsSchemaCommonProps;
26
- export declare type PageDataSelectSchema = Select & PageDataFieldsSchemaCommonProps;
27
- export declare type PageDataSliderFieldSchema = SliderField & PageDataFieldsSchemaCommonProps;
28
- export declare type PageDataTextAreaSchema = TextArea & PageDataFieldsSchemaCommonProps;
29
- export declare type PageDataTextFieldSchema = TextField & PageDataFieldsSchemaCommonProps;
30
- export declare type PageDataToggleFieldSchema = ToggleField & PageDataFieldsSchemaCommonProps;
31
- export declare type PageDataUniqueCheckSchema = UniqueCheck & PageDataFieldsSchemaCommonProps;
32
- export declare type PageDataUrlFieldSchema = UrlField & PageDataFieldsSchemaCommonProps;
33
- export declare type PageDataVisualUniqueSelectionSchema = VisualUniqueSelection & PageDataFieldsSchemaCommonProps;
34
- export declare type PageDataWysiwygSchema = Wysiwyg & PageDataFieldsSchemaCommonProps;
35
- export declare type PageDataFieldsSchema = PageDataArrayFieldGroupSchema | PageDataConditionalFieldSchema | PageDataFieldGroupSchema | PageDataAsyncCheckGroupSchema | PageDataAsyncSelectSchema | PageDataCheckGroupSchema | PageDataColorPickerSchema | PageDataComponentArraySchema | PageDataComponentContainerSchema | PageDataDateFieldSchema | PageDataFieldsSchemaDividerSchema | PageDataFileFieldSchema | PageDataHeadingFieldSchema | PageDataImageFieldSchema | PageDataLinkFieldSchema | PageDataMultiCheckSelectSchema | PageDataMultiCheckSelectGroupSchema | PageDataNoteFieldSchema | PageDataNumberFieldSchema | PageDataRadioGroupSchema | PageDataReferenceFieldSchema | PageDataRichTextSchema | PageDataSelectSchema | PageDataSliderFieldSchema | PageDataTextAreaSchema | PageDataTextFieldSchema | PageDataToggleFieldSchema | PageDataUniqueCheckSchema | PageDataUrlFieldSchema | PageDataVisualUniqueSelectionSchema | PageDataWysiwygSchema;
36
- export {};