@griddo/core 1.74.37 → 1.75.0

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 (95) hide show
  1. package/README.md +58 -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 +58 -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 +18 -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 +16 -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/core.d.ts +262 -0
  53. package/dist/types/fields.d.ts +191 -0
  54. package/dist/types/global.d.ts +33 -0
  55. package/dist/{src/types → types}/schema-functions/fields/base.d.ts +30 -40
  56. package/dist/{src/types/schema-functions/fields/page-data-fields.d.ts → types/schema-functions/fields/page-content-type-fields.d.ts} +4 -4
  57. package/dist/{src/types → types}/schema-functions/fields/props.d.ts +10 -25
  58. package/dist/{src/types/schema-functions/fields/pure-data-fields.d.ts → types/schema-functions/fields/simple-content-type-fields.d.ts} +4 -4
  59. package/dist/{src/types → types}/schema-functions/fields/ui-fields.d.ts +6 -6
  60. package/dist/types/schema-functions/schemas/Categories.d.ts +10 -0
  61. package/dist/types/schema-functions/schemas/ContentType.d.ts +4 -0
  62. package/dist/types/schema-functions/schemas/DamDefaults.d.ts +13 -0
  63. package/dist/{src/types/schema-functions/schemas/DataPackSchema.d.ts → types/schema-functions/schemas/DataPack.d.ts} +3 -4
  64. package/dist/types/schema-functions/schemas/DataPackCategory.d.ts +4 -0
  65. package/dist/{src/types/schema-functions/schemas/HeaderFooterSchema.d.ts → types/schema-functions/schemas/HeaderFooter.d.ts} +15 -16
  66. package/dist/types/schema-functions/schemas/Languages.d.ts +9 -0
  67. package/dist/{src/types/schema-functions/schemas/MenuSchema.d.ts → types/schema-functions/schemas/Menu.d.ts} +2 -2
  68. package/dist/types/schema-functions/schemas/ModuleCategories.d.ts +9 -0
  69. package/dist/types/schema-functions/schemas/PageContentType.d.ts +19 -0
  70. package/dist/types/schema-functions/schemas/SimpleContentType.d.ts +15 -0
  71. package/dist/types/schema-functions/schemas/Themes.d.ts +9 -0
  72. package/dist/types/schema-functions/schemas/Translations.d.ts +2 -0
  73. package/dist/types/schema-functions/schemas/UI.d.ts +49 -0
  74. package/dist/{src/types → types}/schema-functions/schemas/base.d.ts +15 -27
  75. package/dist/types/schema-functions/schemas/index.d.ts +12 -0
  76. package/dist/{src/types → types}/schema-functions/schemas/props.d.ts +6 -7
  77. package/dist/{src/types → types}/schema.d.ts +0 -0
  78. package/dist/types/theme.d.ts +51 -0
  79. package/package.json +74 -75
  80. package/dist/src/functions/create-schemas/index.d.ts +0 -69
  81. package/dist/src/functions/create-schemas/utils.d.ts +0 -33
  82. package/dist/src/types/core.d.ts +0 -419
  83. package/dist/src/types/fields.d.ts +0 -7
  84. package/dist/src/types/schema-functions/schemas/CategoriesSchema.d.ts +0 -13
  85. package/dist/src/types/schema-functions/schemas/DamDefaultsSchema.d.ts +0 -11
  86. package/dist/src/types/schema-functions/schemas/DataPackCategoriesSchema.d.ts +0 -4
  87. package/dist/src/types/schema-functions/schemas/LanguagesSchema.d.ts +0 -8
  88. package/dist/src/types/schema-functions/schemas/ModuleCategoriesSchema.d.ts +0 -6
  89. package/dist/src/types/schema-functions/schemas/PageDataSchema.d.ts +0 -20
  90. package/dist/src/types/schema-functions/schemas/PureDataSchema.d.ts +0 -14
  91. package/dist/src/types/schema-functions/schemas/ThemesSchema.d.ts +0 -11
  92. package/dist/src/types/schema-functions/schemas/TranslationsSchema.d.ts +0 -3
  93. package/dist/src/types/schema-functions/schemas/UISchema.d.ts +0 -47
  94. package/dist/src/types/schema-functions/schemas/index.d.ts +0 -14
  95. package/dist/src/types/theme.d.ts +0 -57
@@ -1,35 +1,34 @@
1
1
  import { ConfigTabs, Thumbnails } from "./props";
2
- export interface HeaderFooterSchema {
2
+ export interface HeaderFooter {
3
3
  schemaType: "module";
4
- /** Indicates whether a module is treated as footer or header. If specified, it
5
- * will be mandatory to specify if it is the default module with the
6
- * `defaultNavigation` prop. */
4
+ /** Indicates whether a module is treated as footer or header. If specified, it will be mandatory to specify if it is the default module with the `defaultNavigation` prop. */
7
5
  type: "footer" | "header";
8
- /** Name of the React component for the schema */
6
+ /** Name of the React component for the schema. */
9
7
  component: string;
10
- /** Indica si este módulo será el seleccionado por defecto */
8
+ /** If true, set this module as default navigation module. */
11
9
  defaultNavigation?: boolean;
12
- /** Name to represent the component, module or template in the Griddo editor
13
- * interface. */
10
+ /** Name to represent the component, module or template in the Griddo editor interface. */
14
11
  displayName: string;
15
- /** Array of objects representing each of the tabs of the component, module or
16
- * template in the Griddo editor where the form fields for data entry will be
17
- * displayed. */
12
+ /** Array of objects representing each of the tabs of the component, module or template in the Griddo editor where the form fields for data entry will be displayed. */
18
13
  configTabs: Array<ConfigTabs>;
19
14
  /** Object to set default values for schema keys. */
20
15
  default: {
21
- /** Name of the component or module of this schema */
16
+ /** Name of the component or module of this schema. */
22
17
  component: string;
23
18
  [key: string]: unknown;
24
19
  };
25
- /** Images to use as thumbnail (as in the `VisualUniqueSelection`) in the
26
- * selection of styles of a menu item */
20
+ /** Images to use as thumbnail (as in the `VisualUniqueSelection`) in the selection of styles of a menu item. */
27
21
  styles?: {
28
22
  [key: string]: unknown;
29
23
  };
30
- /** Images that represent the component, module or template in the Griddo
31
- * editor. */
24
+ /** Images that represent the component, module or template in the Griddo editor. */
32
25
  thumbnails?: Thumbnails | {
33
26
  [key: string]: Thumbnails;
34
27
  };
35
28
  }
29
+ export declare type Header = HeaderFooter & {
30
+ type: "header";
31
+ };
32
+ export declare type Footer = HeaderFooter & {
33
+ type: "footer";
34
+ };
@@ -0,0 +1,9 @@
1
+ import { Locale } from "../../core";
2
+ interface LanguageEntry {
3
+ /** Internal name for API. */
4
+ name: string;
5
+ /** Name that appears in the Griddo editor. */
6
+ label: string;
7
+ }
8
+ export declare type Languages = Partial<Record<Locale, LanguageEntry>>;
9
+ export {};
@@ -1,8 +1,8 @@
1
1
  interface MenuEntry {
2
- /** Internal name for API */
2
+ /** Internal name for API. */
3
3
  key: string;
4
4
  /** Name displayed in the Griddo editor. */
5
5
  display: string;
6
6
  }
7
- export declare type MenuSchema = Array<MenuEntry>;
7
+ export declare type Menu = Array<MenuEntry>;
8
8
  export {};
@@ -0,0 +1,9 @@
1
+ export interface ModuleCategoryEntry {
2
+ /** If true the categorie will be highligted in the Griddo editor. */
3
+ featured?: boolean;
4
+ /** Visible text for the category. */
5
+ label: string;
6
+ /** Internal value for the category. */
7
+ value: string;
8
+ }
9
+ export declare type ModuleCategories = Array<ModuleCategoryEntry>;
@@ -0,0 +1,19 @@
1
+ import { PageContentTypeFields } from "../fields/page-content-type-fields";
2
+ import { SearchFrom } from "../fields/props";
3
+ import { BaseContentType } from "./base";
4
+ import { DataPacks, ExpirationData } from "./props";
5
+ declare type PageContentTypeProp = 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<PageContentTypeFields>;
10
+ };
11
+ export interface PageContentType extends BaseContentType, DataPacks, ExpirationData {
12
+ /** Indicates that is a taxonomy. In this case must be `false`.*/
13
+ taxonomy: false;
14
+ /** Indicates that the data is of type page. Must always be `true`. */
15
+ fromPage: true;
16
+ /** Schema for the page content type. */
17
+ schema: PageContentTypeProp | null;
18
+ }
19
+ export {};
@@ -0,0 +1,15 @@
1
+ import { SearchFrom } from "../fields/props";
2
+ import { SimpleContentTypeFields } from "../fields/simple-content-type-fields";
3
+ import { BaseContentType } from "./base";
4
+ import { DataPacks, ExpirationData } from "./props";
5
+ declare type SimpleContentTypeProp = SearchFrom & {
6
+ /** An array of Griddo fields. */
7
+ fields: Array<SimpleContentTypeFields>;
8
+ };
9
+ export interface SimpleContentType extends BaseContentType, DataPacks, ExpirationData {
10
+ /** Indicates that the data is of type simple/category. Must always be `false`. */
11
+ fromPage: false;
12
+ /** Schema for the simple content type. */
13
+ schema: SimpleContentTypeProp;
14
+ }
15
+ export {};
@@ -0,0 +1,9 @@
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 data pages (since these do not have a default site assigned and therefore do not have a theme). */
7
+ default?: boolean;
8
+ }
9
+ export declare type Themes = Array<ThemeEntry>;
@@ -0,0 +1,2 @@
1
+ import { LocaleTranslations } from "../../core";
2
+ export declare type Translations = LocaleTranslations;
@@ -0,0 +1,49 @@
1
+ import { UIFields } from "../fields/ui-fields";
2
+ import { BaseUI } from "./base";
3
+ import { ConfigTabs, Dimension } from "./props";
4
+ interface ComponentAndModuleBase extends BaseUI {
5
+ /** Type of schema. */
6
+ schemaType: "component" | "module" | "template";
7
+ /** Array of objects that represent each of the tabs of the component, module or template in the Griddo editor where the form fields for data entry will 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
+ export interface Component extends ComponentAndModuleBase {
17
+ schemaType: "component";
18
+ }
19
+ export interface Module extends ComponentAndModuleBase {
20
+ schemaType: "module";
21
+ }
22
+ export interface Template extends BaseUI {
23
+ /** Template Schema. */
24
+ schemaType: "template";
25
+ /** Indicates the type of Schema for the template: List, Detail, 404, etc. */
26
+ type: {
27
+ /** Visible text for the Griddo editor. */
28
+ label: string;
29
+ /** Internal unique value. */
30
+ value: string;
31
+ /** Template mode. */
32
+ mode?: "list" | "detail";
33
+ /** Special template. */
34
+ special?: "404" | "sitemap";
35
+ };
36
+ /** Array of key-values that are bound to a page and used to be sent to the dataLayer (Analytics) when the page loads. */
37
+ dimensions?: Array<Dimension>;
38
+ /** Array of fields for the content tab. */
39
+ content?: Array<UIFields>;
40
+ /** Array of fields for the config tab. */
41
+ config?: Array<UIFields>;
42
+ /** Object to set default values of schema keys. */
43
+ default: {
44
+ /** Name of the template of this schema. */
45
+ templateType: string;
46
+ [key: string]: unknown;
47
+ };
48
+ }
49
+ export {};
@@ -1,28 +1,20 @@
1
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. */
2
+ interface BaseContentType {
3
+ /** Title that will appear in the Griddo editor. If it is `searchable = false`, it will not be used for searching (default is `true`). This is what is used for example for structured data listings. */
6
4
  title: string;
7
5
  /** It is recommended, as it is used for listings and searches. */
8
6
  abstract?: string;
9
- /** Is the one to be used as the image in such listings and searches, if
10
- * applicable. */
7
+ /** Is the one to be used as the image in such listings and searches, if applicable. */
11
8
  image?: string;
12
- /** If `true`, the data will be of type Site, if `false`, it will be of type
13
- * global. */
9
+ /** If `true`, the data will be of type Site, if `false`, it will be of type global. */
14
10
  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. */
11
+ /** If it is a taxonomy or a simple or page ContentType. The difference is that a taxonomy does not have to define fields or schema, because it only has title and slug. */
18
12
  taxonomy?: boolean;
19
- /** Si es `true` el dato será de tipo página, si es`false`, será de tipo puro. */
20
13
  /** If `true` the data will be of type page, if `false`, it will be simple. */
21
14
  fromPage?: boolean;
22
15
  /** If `true` the content is editable once created. */
23
16
  editable?: boolean;
24
- /** If `true` the data is translatable, otherwise it is the same content for
25
- * all pages. */
17
+ /** If `true` the data is translatable, otherwise it is the same content for all pages. */
26
18
  translate?: boolean;
27
19
  /** ???????????????????????? */
28
20
  clone?: {
@@ -38,34 +30,30 @@ interface BaseDataSchema {
38
30
  sync: string;
39
31
  }>;
40
32
  } | null;
41
- /** Field default values */
33
+ /** Field default values. */
42
34
  defaultValues?: unknown;
43
35
  }
44
- interface BaseUISchema extends DataPacks {
36
+ interface BaseUI extends DataPacks {
45
37
  /** Sets the schema type. For internal use. */
46
38
  schemaType: string;
47
- /** If `true` it will only be possible to create one page of this type of
48
- * template. */
39
+ /** If `true` it will only be possible to create one page of this type of template. */
49
40
  singleInstance?: boolean;
50
- /** React component name for the schema */
41
+ /** React component name for the schema. */
51
42
  component: string;
52
43
  /** Category name previously exported as `moduleCategories` for Griddo.
53
- * Categories are used to distribute and sort modules in the Griddo editor
54
- * interface. */
44
+ * Categories are used to distribute and sort modules in the Griddo editor interface. */
55
45
  category?: string;
56
- /** Name to represent the component, module or template in the Griddo editor
57
- * interface. */
46
+ /** Name to represent the component, module or template in the Griddo editor interface. */
58
47
  displayName: string;
59
48
  /** ????? */
60
49
  sectionList?: {
61
50
  [key: string]: Array<string>;
62
51
  };
63
- /** Images that represent the component, module or template in the Griddo
64
- * editor. */
52
+ /** Images that represent the component, module or template in the Griddo editor. */
65
53
  thumbnails?: Thumbnails | {
66
54
  [key: string]: Thumbnails;
67
55
  };
68
- /** The module or template has one reference field */
56
+ /** The module or template has one reference field. */
69
57
  hasDistributorData?: boolean;
70
58
  }
71
- export { BaseDataSchema, BaseUISchema };
59
+ export { BaseContentType, BaseUI };
@@ -0,0 +1,12 @@
1
+ import { ContentType } from "./ContentType";
2
+ import { DamDefaults } from "./DamDefaults";
3
+ import { DataPack } from "./DataPack";
4
+ import { DataPackCategory } from "./DataPackCategory";
5
+ import { Header, Footer } from "./HeaderFooter";
6
+ import { Languages } from "./Languages";
7
+ import { Menu } from "./Menu";
8
+ import { ModuleCategories } from "./ModuleCategories";
9
+ import { Themes } from "./Themes";
10
+ import { Translations } from "./Translations";
11
+ import { Component, Module, Template } from "./UI";
12
+ export { Component, ContentType, DamDefaults, DataPack, DataPackCategory, Footer, Header, Languages, Menu, Module, ModuleCategories, Template, Themes, Translations, };
@@ -1,19 +1,18 @@
1
- import { UIFieldsSchema } from "../fields/ui-fields";
1
+ import { UIFields } from "../fields/ui-fields";
2
2
  declare type DataPacks = {
3
3
  /** Sets the Data Packs to which this schema belongs. */
4
4
  dataPacks?: Array<string> | null;
5
5
  };
6
6
  interface Dimension {
7
- /** Key with which to send the value to the dataLayer */
7
+ /** Key with which to send the value to the dataLayer. */
8
8
  key: string;
9
- /** Text for the Griddo interface (not editable) */
9
+ /** Text for the Griddo interface (not editable). */
10
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. */
11
+ /** Template key from which we get the value to send to the dataLayer, which takes it from the template and if not from the root. */
13
12
  from: string;
14
13
  }
15
14
  interface ExpirationData {
16
- /** Key of a date field of the structured data */
15
+ /** Key of a date field of the structured data. */
17
16
  expirationDateField?: string;
18
17
  /** Specifies the offset in days to apply to the expirationDateField value. */
19
18
  expirationDateOffset?: number;
@@ -28,6 +27,6 @@ export interface ConfigTabs {
28
27
  /** Title that will appear on the tab in the Griddo editor. */
29
28
  title: "content" | "config" | (string & {});
30
29
  /** Array of Griddo fields. */
31
- fields: Array<UIFieldsSchema>;
30
+ fields: Array<UIFields>;
32
31
  }
33
32
  export { DataPacks, Dimension, ExpirationData, Thumbnails };
File without changes
@@ -0,0 +1,51 @@
1
+ export interface Primitive {
2
+ /** Unique primitive group id */
3
+ id: string;
4
+ /** Name for the primitive group */
5
+ name: string;
6
+ /** Description for the primitive group */
7
+ description?: string;
8
+ /** CSS values for the primitive group */
9
+ values: Array<{
10
+ /** Name for the primitive */
11
+ name?: string;
12
+ /** Name for the css variable for the primitive */
13
+ cssVar: string;
14
+ /** CSS value for the primitive */
15
+ value: string;
16
+ }>;
17
+ }
18
+ export declare type PrimitivesObj = {
19
+ common?: Array<Primitive>;
20
+ light: Array<Primitive>;
21
+ dark: Array<Primitive>;
22
+ };
23
+ export declare type Primitives = Array<Primitive> | PrimitivesObj;
24
+ export interface BaseTheme {
25
+ /** Unique theme id */
26
+ id: string;
27
+ /** Theme name */
28
+ name: string;
29
+ /** CSS selector that will encompass the theme css variables */
30
+ selector: string;
31
+ /** Theme description */
32
+ description?: string;
33
+ /** Theme primitives */
34
+ primitives: Primitives;
35
+ }
36
+ export interface GlobalTheme extends BaseTheme {
37
+ /** Custom media queries using css vars (custom properties) */
38
+ customMedia?: {
39
+ [key: string]: string;
40
+ };
41
+ }
42
+ export interface Theme extends BaseTheme {
43
+ /** Subthemes */
44
+ subthemes?: Array<BaseTheme>;
45
+ }
46
+ export interface GriddoTheme {
47
+ /** Global theme entry */
48
+ global: GlobalTheme;
49
+ /** Instance themes array */
50
+ themes: Array<Theme>;
51
+ }
package/package.json CHANGED
@@ -1,77 +1,76 @@
1
1
  {
2
- "name": "@griddo/core",
3
- "description": "Reload version of Griddo Core",
4
- "license": "MIT",
5
- "version": "1.74.37",
6
- "authors": [
7
- "Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
8
- "Carlos Torres <carlos.torres@secuoyas.com>",
9
- "Diego Béjar <diego.bejar@secuoyas.com>",
10
- "Francis Vega <francis.vega@secuoyas.com>",
11
- "Gonzalo Hernández <gonzalo.hernandez@secuoyas.com>",
12
- "Sergio Ródenas <sergio.rodenas@secuoyas.com>",
13
- "Txema León <txema.leon@secuoyas.com>"
14
- ],
15
- "homepage": "https://griddo.io",
16
- "repository": {
17
- "type": "git",
18
- "url": "https://github.com/griddo/griddo"
19
- },
20
- "main": "./dist/index.js",
21
- "types": "dist/index.d.ts",
22
- "scripts": {
23
- "build": "npx rollup -c",
24
- "build-storybook": "build-storybook",
25
- "clean": "rm -rf ./dist",
26
- "publish:stable": "yarn build && npm version patch && npm publish",
27
- "prepare": "yarn build",
28
- "start": "yarn storybook",
29
- "storybook": "start-storybook -p 6006"
30
- },
31
- "dependencies": {
32
- "react-aspect-ratio": "^1.0.49"
33
- },
34
- "devDependencies": {
35
- "@babel/core": "^7.12.17",
36
- "@babel/plugin-proposal-class-properties": "^7.12.13",
37
- "@babel/preset-env": "^7.12.17",
38
- "@babel/preset-react": "^7.12.13",
39
- "@rollup/plugin-node-resolve": "^11.2.1",
40
- "@rollup/plugin-typescript": "^8.3.2",
41
- "@storybook/addon-actions": "6.2.9",
42
- "@storybook/addon-essentials": "6.2.9",
43
- "@storybook/addon-links": "6.2.9",
44
- "@storybook/addon-postcss": "^2.0.0",
45
- "@storybook/react": "6.2.9",
46
- "babel-core": "^6.21.0",
47
- "babel-loader": "^7.1.4",
48
- "babel-preset-env": "^1.6.1",
49
- "babel-preset-react": "^6.16.0",
50
- "babel-preset-stage-0": "^6.24.1",
51
- "eslint-plugin-react-hooks": "^4.0.5",
52
- "postcss": "^8.2.6",
53
- "rollup": "^2.39.0",
54
- "rollup-plugin-babel": "^4.4.0",
55
- "rollup-plugin-commonjs": "^10.1.0",
56
- "rollup-plugin-json": "^4.0.0",
57
- "rollup-plugin-local-resolve": "^1.0.7",
58
- "rollup-plugin-node-resolve": "^5.2.0",
59
- "rollup-plugin-postcss": "^4.0.0",
60
- "rollup-plugin-replace": "^2.2.0",
61
- "rollup-plugin-terser": "^7.0.2"
62
- },
63
- "files": [
64
- "dist"
65
- ],
66
- "keywords": [
67
- "griddo",
68
- "secuoyas"
69
- ],
70
- "publishConfig": {
71
- "access": "public"
72
- },
73
- "resolutions": {
74
- "colors": "1.4.0"
75
- },
76
- "gitHead": "177ea63d2f86cbc0503fa1e26acfe9b93eba6366"
2
+ "name": "@griddo/core",
3
+ "description": "Reload version of Griddo Core",
4
+ "license": "MIT",
5
+ "version": "1.75.0",
6
+ "authors": [
7
+ "Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
8
+ "Carlos Torres <carlos.torres@secuoyas.com>",
9
+ "Diego Béjar <diego.bejar@secuoyas.com>",
10
+ "Francis Vega <francis.vega@secuoyas.com>",
11
+ "Gonzalo Hernández <gonzalo.hernandez@secuoyas.com>",
12
+ "Sergio Ródenas <sergio.rodenas@secuoyas.com>",
13
+ "Txema León <txema.leon@secuoyas.com>"
14
+ ],
15
+ "homepage": "https://griddo.io",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "https://github.com/griddo/griddo"
19
+ },
20
+ "main": "./dist/index.js",
21
+ "types": "dist/index.d.ts",
22
+ "scripts": {
23
+ "build": "npx rollup -c",
24
+ "build-storybook": "build-storybook",
25
+ "clean": "rm -rf ./dist",
26
+ "publish:stable": "yarn build && npm version patch && npm publish",
27
+ "prepare": "yarn build",
28
+ "start:storybook": "start-storybook -p 6006"
29
+ },
30
+ "dependencies": {
31
+ "react-aspect-ratio": "^1.0.49"
32
+ },
33
+ "devDependencies": {
34
+ "@babel/core": "^7.12.17",
35
+ "@babel/plugin-proposal-class-properties": "^7.12.13",
36
+ "@babel/preset-env": "^7.12.17",
37
+ "@babel/preset-react": "^7.12.13",
38
+ "@rollup/plugin-node-resolve": "^11.2.1",
39
+ "@rollup/plugin-typescript": "^8.3.2",
40
+ "@storybook/addon-actions": "6.5.12",
41
+ "@storybook/addon-essentials": "6.5.12",
42
+ "@storybook/addon-links": "6.5.12",
43
+ "@storybook/addon-postcss": "^2.0.0",
44
+ "@storybook/react": "6.5.12",
45
+ "babel-core": "^6.21.0",
46
+ "babel-loader": "^7.1.4",
47
+ "babel-preset-env": "^1.6.1",
48
+ "babel-preset-react": "^6.16.0",
49
+ "babel-preset-stage-0": "^6.24.1",
50
+ "eslint-plugin-react-hooks": "^4.0.5",
51
+ "postcss": "^8.2.6",
52
+ "rollup": "^2.39.0",
53
+ "rollup-plugin-babel": "^4.4.0",
54
+ "rollup-plugin-commonjs": "^10.1.0",
55
+ "rollup-plugin-json": "^4.0.0",
56
+ "rollup-plugin-local-resolve": "^1.0.7",
57
+ "rollup-plugin-node-resolve": "^5.2.0",
58
+ "rollup-plugin-postcss": "^4.0.0",
59
+ "rollup-plugin-replace": "^2.2.0",
60
+ "rollup-plugin-terser": "^7.0.2"
61
+ },
62
+ "files": [
63
+ "dist"
64
+ ],
65
+ "keywords": [
66
+ "griddo",
67
+ "secuoyas"
68
+ ],
69
+ "publishConfig": {
70
+ "access": "public"
71
+ },
72
+ "resolutions": {
73
+ "colors": "1.4.0"
74
+ },
75
+ "gitHead": "947557a00bc2e4adaf70c2a86d8803f0ba299e2f"
77
76
  }
@@ -1,69 +0,0 @@
1
- import type { Categories, DamDefaults, DataPackCategories, DataPack, Languages, Menu, ModuleCategories, PageData, PureData, Themes, Translations, UI, HeaderFooter } from "../../types/schema-functions/schemas";
2
- import type { UIFieldsSchema as UIFields } from "../../types/schema-functions/fields/ui-fields";
3
- import type { PureDataFieldsSchema as PureDataFields } from "../../types/schema-functions/fields/pure-data-fields";
4
- import type { PageDataFieldsSchema as PageDataFields } from "../../types/schema-functions/fields/page-data-fields";
5
- /**
6
- * Crea un schema para una categoría
7
- * @param {object} schema - Un schema con el formato Schema categories
8
- */
9
- declare function createCategoriesSchema(schema: Categories): Categories;
10
- /**
11
- * Crea un schema para los valores por defecto del DAM
12
- * @param {object} schema - Un schema con el formato Schema DAM
13
- */
14
- declare function createDamDefaultsSchema(schema: DamDefaults): DamDefaults;
15
- /**
16
- * Crea un schema para una categoría de data pack
17
- * @param {object} schema - Un schema con el formato Schema data pack categories
18
- */
19
- declare function createDataPackCategoriesSchema(schema: DataPackCategories): DataPackCategories;
20
- /**
21
- * Crea un schema para un data pack
22
- * @param {object} schema - Un schema con el formato Schema data pack
23
- */
24
- declare function createDataPackSchema(schema: DataPack): DataPack;
25
- /**
26
- * Crea un schema para una categoría
27
- * @param {object} schema - Un schema con el formato Schema categories
28
- */
29
- declare function createLanguagesSchema(schema: Languages): Languages;
30
- /**
31
- * Crea un schema para un menú
32
- * @param {object} schema - Un schema con el formato Schema menú
33
- */
34
- declare function createMenuSchema(schema: Menu): Menu;
35
- /**
36
- * Crea un schema para las categorías de módulos
37
- * @param {object} schema - Un schema con el formato Schema categoría de módulo
38
- */
39
- declare function createModuleCategoriesSchema(schema: ModuleCategories): ModuleCategories;
40
- /**
41
- * Crea un schema para un dato structurado de página
42
- * @param {object} schema - Un schema con el formato Schema Page Data
43
- */
44
- declare function createPageDataSchema(schema: PageData): PageData;
45
- /**
46
- * Crea un schema para un dato structurado puro
47
- * @param {object} schema - Un schema con el formato Schema Data
48
- */
49
- declare function createPureDataSchema(schema: PureData): PureData;
50
- /**
51
- * Crea un schema para un theme
52
- * @param {object} schema - Un schema con el formato Schema theme
53
- */
54
- declare function createThemesSchema(schema: Themes): Themes;
55
- /**
56
- * Crea un schema para las traducciones estáticas
57
- * @param {object} schema - Un schema con el formato Schema de traducciones
58
- */
59
- declare function createTranslationsSchema(schema: Translations): Translations;
60
- /**
61
- * Crea un schema para un componente, módulo o template
62
- * @param {object} schema - Un schema con el formato Schema UI
63
- */
64
- declare function createUISchema(schema: UI): UI;
65
- declare function createHeaderFooterSchema(schema: HeaderFooter): HeaderFooter;
66
- declare function createUIField(field: UIFields): UIFields;
67
- declare function createPureDataField(field: PureDataFields): PureDataFields;
68
- declare function createPageDataField(field: PageDataFields): PageDataFields;
69
- export { createCategoriesSchema, createDamDefaultsSchema, createDataPackCategoriesSchema, createDataPackSchema, createLanguagesSchema, createMenuSchema, createModuleCategoriesSchema, createHeaderFooterSchema, createPageDataSchema, createPureDataSchema, createThemesSchema, createTranslationsSchema, createUISchema, createPageDataField, createPureDataField, createUIField, };
@@ -1,33 +0,0 @@
1
- import { UISchema } from "../../types/schema-functions/schemas/UISchema";
2
- /**
3
- * Convierte la primera letra de una palabra en minúsculas
4
- * ```
5
- * deCamelized('MainLayout') // -> mainLayout
6
- * ```
7
- */
8
- declare function deCapitalized(name: string): string;
9
- /**
10
- * Convierte una palabra camelCase en palabras separadas según las mayúsculas
11
- * ```
12
- * deCamelized('fooBar') // -> Foo Bar
13
- * ```
14
- */
15
- declare function deCamelized(name: string): string;
16
- /**
17
- * Añade una nueva prop `newKey` en el mismo nivel que se encuentre `searchKey`
18
- * siempre que `newKey` no exista previamente.
19
- * Se puede pasar una función "transformadora" que recibe el valor de la key
20
- * encontrada y el resultado será el valor de `newKey`.
21
- */
22
- declare function addSibilingKeyBy(
23
- /** El objeto sobre el que se actua */
24
- object: any,
25
- /** La key que se va a buscar */
26
- searchKey: string,
27
- /** La nueva key que se va a crear */
28
- newKey: string,
29
- /** Simple string transform function */
30
- fn?: (x: string) => string): void;
31
- declare function removeKeys(objectSchema: any, keys: Array<string>): any;
32
- declare function processFieldsDefaults(schema: UISchema): UISchema;
33
- export { deCapitalized, deCamelized, addSibilingKeyBy, processFieldsDefaults, removeKeys, };