@griddo/core 10.3.9 → 10.3.11

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.
@@ -2,7 +2,7 @@ import { ImagePosition } from "../core";
2
2
  import { FilterItemFromFilterEndPoint, HTMLHeadingTag } from "../global";
3
3
  export type ContentTypeName<T> = T extends {
4
4
  __contentTypeName: string;
5
- } ? T["__contentTypeName"] : string;
5
+ } ? T["__contentTypeName"] : T;
6
6
  export type RelatedContentTypeNames<T> = T extends {
7
7
  __relatedContentTypeNames: string[];
8
8
  } ? T["__relatedContentTypeNames"][number] : string;
@@ -1,4 +1,5 @@
1
1
  import __AT__ from "@autoTypes";
2
+ import { Core } from "../..";
2
3
  import { Source } from "../api-response-fields";
3
4
  export type WithAuxText = {
4
5
  /** Sets a label text to show besides the toggle field control */
@@ -145,5 +146,9 @@ export type WithRelations_AutoTypes = {
145
146
  };
146
147
  export type WithDataSources = {
147
148
  /** Array with the structured data types that the field has to load. */
148
- source: Array<Source<__AT__.PageContentTypes | __AT__.SimpleContentTypes | __AT__.TaxonomyContentTypes>>;
149
+ sources: Array<Source<__AT__.PageContentTypes | __AT__.SimpleContentTypes | __AT__.TaxonomyContentTypes>>;
150
+ };
151
+ export type WithComputed<T> = {
152
+ /** Computed prop callback */
153
+ computed?: (page?: Core.Page) => T;
149
154
  };
@@ -1,5 +1,6 @@
1
+ import { Fields } from "../..";
1
2
  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, BaseTagsField, BaseTextArea, BaseTextField, BaseTimeField, BaseToggleField, BaseUniqueCheck, BaseUrlField, BaseVisualUniqueSelection, BaseWysiwyg } from "./base";
2
- import { WithAuxText, WithBackground, WithDataSources, WithFullWidth, WithHelpText, WithHideable, WithHumanReadable, WithIsMockup, WithPlaceHolder, WithPrefix, WithReadonly, WithRelations_AutoTypes, WithSlugTo, WithValidators, WithWhiteList } from "./props";
3
+ import { WithAuxText, WithBackground, WithComputed, WithDataSources, WithFullWidth, WithHelpText, WithHideable, WithHumanReadable, WithIsMockup, WithPlaceHolder, WithPrefix, WithReadonly, WithRelations_AutoTypes, WithSlugTo, WithValidators, WithWhiteList } from "./props";
3
4
  export type ArrayFieldGroup = BaseArrayFieldGroup<UIFields> & WithHelpText & WithHideable;
4
5
  export type AsyncCheckGroup = BaseAsyncCheckGroup & WithHelpText & WithHideable;
5
6
  export type AsyncSelect = BaseAsyncSelect & WithHelpText & WithHideable & WithPlaceHolder;
@@ -12,7 +13,7 @@ export type DateField = BaseDateField & WithValidators & WithHelpText & WithHide
12
13
  export type FieldGroup = BaseFieldGroup<UIFields> & WithHelpText & WithHideable;
13
14
  export type FieldsDivider = BaseFieldsDivider & WithHelpText & WithHideable;
14
15
  export type FileField = BaseFileField & WithHelpText & WithHideable & WithPlaceHolder;
15
- export type HeadingField = BaseHeadingField & WithIsMockup & WithValidators & WithPlaceHolder & WithHumanReadable & WithHelpText & WithHideable;
16
+ export type HeadingField = BaseHeadingField & WithComputed<Fields.Heading | undefined> & WithIsMockup & WithValidators & WithPlaceHolder & WithHumanReadable & WithHelpText & WithHideable;
16
17
  export type ImageField = BaseImageField & WithIsMockup & WithFullWidth & WithHelpText & WithHideable;
17
18
  export type LinkField = BaseLinkField & WithWhiteList & WithHelpText & WithHideable;
18
19
  export type MultiCheckSelect = BaseMultiCheckSelect & WithRelations_AutoTypes & WithHelpText & WithHideable;
@@ -26,7 +27,7 @@ export type Select = BaseSelect & WithValidators & WithHelpText & WithHideable &
26
27
  export type SliderField = BaseSliderField & WithValidators & WithHelpText & WithHideable;
27
28
  export type TagsField = BaseTagsField & WithHideable;
28
29
  export type TextArea = BaseTextArea & WithIsMockup & WithValidators & WithPlaceHolder & WithHumanReadable & WithHelpText & WithHideable;
29
- export type TextField = BaseTextField & WithIsMockup & WithValidators & WithReadonly & WithSlugTo & WithPrefix & WithPlaceHolder & WithHumanReadable & WithHelpText & WithHideable;
30
+ export type TextField = BaseTextField & WithComputed<Fields.Text | undefined> & WithIsMockup & WithValidators & WithReadonly & WithSlugTo & WithPrefix & WithPlaceHolder & WithHumanReadable & WithHelpText & WithHideable;
30
31
  export type ToggleField = BaseToggleField & WithBackground & WithAuxText & WithHelpText & WithHideable;
31
32
  export type TimeField = BaseTimeField & WithIsMockup & WithReadonly & WithHelpText & WithHideable;
32
33
  export type UniqueCheck = BaseUniqueCheck & WithHelpText & WithHideable;
@@ -1,8 +1,9 @@
1
+ import __AT__ from "@autoTypes";
1
2
  export interface DataPack {
2
3
  /** Title of the Data Pack that will appear in the Griddo editor. */
3
4
  title: string;
4
5
  /** Data Pack Category. */
5
- category: string;
6
+ category: __AT__.DatapacksCategories;
6
7
  /** Description of the Data Pack that will appear in the Griddo editor. */
7
8
  description: string;
8
9
  /** Thumbnail of the Data Pack that will appear in the Griddo editor. It can be an image or an object representing an image for each teheme. */
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@griddo/core",
3
3
  "description": "Reload version of Griddo Core",
4
4
  "license": "UNLICENSED",
5
- "version": "10.3.9",
5
+ "version": "10.3.11",
6
6
  "authors": [
7
7
  "Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
8
8
  "Diego M. Béjar <diego.bejar@secuoyas.com>",
@@ -81,5 +81,5 @@
81
81
  "resolutions": {
82
82
  "colors": "1.4.0"
83
83
  },
84
- "gitHead": "cb7e232a3897ad08edf010dd96de7b99ef5c03ad"
84
+ "gitHead": "919cce1a8832b6839f0360db701dfbb1e69148ce"
85
85
  }