@griddo/ax 1.69.9 → 1.72.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 (165) hide show
  1. package/config/jest/componentsMock.js +0 -26
  2. package/package.json +4 -3
  3. package/src/Style/index.tsx +1 -1
  4. package/src/__tests__/components/ElementsTooltip/ElementsTooltip.test.tsx +97 -0
  5. package/src/__tests__/components/EmptyState/EmptyState.test.tsx +78 -0
  6. package/src/__tests__/components/FieldContainer/FieldContainer.test.tsx +82 -0
  7. package/src/__tests__/components/Fields/AnalyticsField/AnalyticsField.test.tsx +1 -1
  8. package/src/__tests__/components/Fields/AnalyticsField/PageAnalytics/PageAnalytics.test.tsx +1 -15
  9. package/src/__tests__/components/Fields/AnalyticsField/StructuredDataAnalytics/StructuredDataAnalytics.test.tsx +1 -16
  10. package/src/__tests__/components/Fields/ArrayFieldGroup/ArrayFieldGroup.test.tsx +8 -17
  11. package/src/__tests__/components/Fields/AsyncCheckGroup/AsyncCheckGroup.test.tsx +4 -16
  12. package/src/__tests__/components/Fields/AsyncSelect/AsyncSelect.test.tsx +2 -20
  13. package/src/__tests__/components/Fields/CheckField/CheckField.test.tsx +6 -6
  14. package/src/__tests__/components/Fields/CheckGroup/CheckGroup.test.tsx +15 -15
  15. package/src/__tests__/components/Fields/ColorPicker/ColorPicker.test.tsx +7 -16
  16. package/src/__tests__/components/Fields/ComponentArray/ComponentArray.test.tsx +2 -23
  17. package/src/__tests__/components/Fields/ComponentArray/MixableComponentArray/MixableComponentArray.test.tsx +11 -31
  18. package/src/__tests__/components/Fields/ComponentArray/MixableComponentArray/PasteModuleButton/PasteModuleButton.test.tsx +15 -21
  19. package/src/__tests__/components/Fields/ComponentArray/SameComponentArray/SameComponentArray.test.tsx +6 -25
  20. package/src/__tests__/components/Fields/ComponentContainer/ComponentContainer.test.tsx +559 -0
  21. package/src/__tests__/components/Fields/ConditionalField/ConditionalField.test.tsx +1 -1
  22. package/src/__tests__/components/Fields/DateField/DateField.test.tsx +1 -1
  23. package/src/__tests__/components/Fields/FieldGroup/FieldGroup.test.tsx +1 -1
  24. package/src/__tests__/components/Fields/FieldsDivider/FieldsDivider.test.tsx +1 -1
  25. package/src/__tests__/components/Fields/FileField/FileField.test.tsx +3 -3
  26. package/src/__tests__/components/Fields/HeadingField/HeadingField.test.tsx +6 -6
  27. package/src/__tests__/components/Fields/HiddenField/HiddenField.test.tsx +2 -8
  28. package/src/__tests__/components/Fields/ImageField/ImageField.test.tsx +471 -0
  29. package/src/__tests__/components/Fields/MultiCheckSelect/MultiCheckSelect.test.tsx +2 -16
  30. package/src/__tests__/components/Fields/MultiCheckSelectGroup/MultiCheckSelectGroup.test.tsx +2 -2
  31. package/src/__tests__/components/Fields/NoteField/NoteField.test.tsx +2 -7
  32. package/src/__tests__/components/Fields/NumberField/NumberField.test.tsx +2 -15
  33. package/src/__tests__/components/Fields/RadioField/RadioField.test.tsx +2 -12
  34. package/src/__tests__/components/Fields/ReferenceField/ReferenceField.test.tsx +171 -19
  35. package/src/__tests__/components/Fields/RichText/RichText.test.tsx +2 -13
  36. package/src/__tests__/components/Fields/Select/Select.test.tsx +3 -23
  37. package/src/__tests__/components/Fields/SliderField/SliderField.test.tsx +2 -15
  38. package/src/__tests__/components/Fields/TagField/TagField.test.tsx +4 -4
  39. package/src/__tests__/components/Fields/TextArea/TextArea.test.tsx +1 -1
  40. package/src/__tests__/components/Fields/TextField/TextField.test.tsx +6 -6
  41. package/src/__tests__/components/Fields/TimeField/HourInput/HourInput.test.tsx +142 -0
  42. package/src/__tests__/components/Fields/TimeField/TimeField.test.tsx +100 -0
  43. package/src/__tests__/components/Fields/ToggleField/ToggleField.test.tsx +2 -10
  44. package/src/__tests__/components/Fields/Tooltip/Tooltip.test.tsx +152 -0
  45. package/src/__tests__/components/Fields/UniqueCheck/UniqueCheck.test.tsx +3 -3
  46. package/src/__tests__/components/Fields/UrlField/UrlField.test.tsx +4 -4
  47. package/src/__tests__/components/Fields/VisualUniqueSelection/ImageSelection/ImageSelection.test.tsx +2 -14
  48. package/src/__tests__/components/Fields/VisualUniqueSelection/ScrollableSelection/ScrollableSelection.test.tsx +6 -20
  49. package/src/__tests__/components/Fields/VisualUniqueSelection/VisualUniqueSelection.test.tsx +3 -29
  50. package/src/__tests__/components/Fields/Wysiwyg/Wysiwyg.test.tsx +1 -1
  51. package/src/__tests__/components/FieldsBehavior/FieldsBehavior.test.tsx +149 -0
  52. package/src/__tests__/components/SubNav/SubNav.test.tsx +37 -0
  53. package/src/__tests__/components/TableCounter/TableCounter.test.tsx +51 -0
  54. package/src/__tests__/components/TableFilters/CategoryFilter/CategoryFilter.test.tsx +241 -0
  55. package/src/__tests__/components/TableFilters/CustomizeFilters/CustomizeFilters.test.tsx +131 -0
  56. package/src/__tests__/components/TableFilters/DateFilter/DateFilter.test.tsx +148 -0
  57. package/src/__tests__/components/TableFilters/LiveFilter/LiveFilter.test.tsx +266 -0
  58. package/src/__tests__/components/TableFilters/NameFilter/NameFilter.test.tsx +196 -0
  59. package/src/__tests__/components/TableFilters/SiteFilter/SiteFilter.test.tsx +318 -0
  60. package/src/__tests__/components/TableFilters/StatusFilter/StatusFilter.test.tsx +195 -0
  61. package/src/__tests__/components/TableFilters/TranslationsFilter/TranslationsFilter.test.tsx +157 -0
  62. package/src/__tests__/components/TableFilters/TypeFilter/TypeFilter.test.tsx +165 -0
  63. package/src/__tests__/components/TableList/TableList.test.tsx +119 -0
  64. package/src/__tests__/components/Tabs/Tabs.test.tsx +205 -0
  65. package/src/__tests__/components/Tag/Tag.test.tsx +140 -0
  66. package/src/__tests__/components/Toast/Toast.test.tsx +102 -0
  67. package/src/api/navigation.tsx +1 -1
  68. package/src/components/Browser/index.tsx +1 -1
  69. package/src/components/Button/index.tsx +3 -3
  70. package/src/components/ConfigPanel/NavigationForm/Field/index.tsx +14 -3
  71. package/src/components/ElementsTooltip/index.tsx +10 -9
  72. package/src/components/EmptyState/index.tsx +2 -2
  73. package/src/components/FieldContainer/index.tsx +3 -3
  74. package/src/components/Fields/ArrayFieldGroup/index.tsx +1 -1
  75. package/src/components/Fields/AsyncCheckGroup/index.tsx +1 -1
  76. package/src/components/Fields/AsyncSelect/index.tsx +1 -1
  77. package/src/components/Fields/CheckField/index.tsx +3 -3
  78. package/src/components/Fields/CheckGroup/index.tsx +2 -2
  79. package/src/components/Fields/ComponentContainer/index.tsx +7 -6
  80. package/src/components/Fields/ComponentContainer/style.tsx +2 -2
  81. package/src/components/Fields/HeadingField/index.tsx +1 -1
  82. package/src/components/Fields/HiddenField/index.tsx +1 -1
  83. package/src/components/Fields/ImageField/index.tsx +10 -5
  84. package/src/components/Fields/MultiCheckSelect/index.tsx +3 -3
  85. package/src/components/Fields/NumberField/index.tsx +2 -1
  86. package/src/components/Fields/ReferenceField/ItemList/Item/index.tsx +5 -7
  87. package/src/components/Fields/ReferenceField/ItemList/Item/style.tsx +2 -2
  88. package/src/components/Fields/ReferenceField/ItemList/index.tsx +1 -1
  89. package/src/components/Fields/RichText/index.tsx +10 -6
  90. package/src/components/Fields/Select/index.tsx +2 -2
  91. package/src/components/Fields/SliderField/index.tsx +1 -1
  92. package/src/components/Fields/TextField/index.tsx +2 -7
  93. package/src/components/Fields/TimeField/HourInput/index.tsx +103 -0
  94. package/src/components/Fields/TimeField/HourInput/style.tsx +19 -0
  95. package/src/components/Fields/TimeField/HourInput/utils.tsx +35 -0
  96. package/src/components/Fields/TimeField/index.tsx +57 -0
  97. package/src/components/Fields/TimeField/style.tsx +37 -0
  98. package/src/components/Fields/index.tsx +2 -0
  99. package/src/components/FieldsBehavior/index.tsx +1 -1
  100. package/src/components/FloatingMenu/index.tsx +2 -2
  101. package/src/components/Gallery/GalleryFilters/Type/index.tsx +50 -0
  102. package/src/components/Gallery/GalleryFilters/Type/style.tsx +39 -0
  103. package/src/components/Gallery/GalleryPanel/DetailPanel/index.tsx +2 -1
  104. package/src/components/Gallery/GalleryPanel/GalleryDragAndDrop/style.tsx +3 -3
  105. package/src/components/Gallery/hooks.tsx +10 -4
  106. package/src/components/Gallery/index.tsx +2 -0
  107. package/src/components/Icon/index.tsx +1 -1
  108. package/src/components/IconAction/index.tsx +1 -1
  109. package/src/components/Lists/index.tsx +1 -1
  110. package/src/components/Loading/index.tsx +1 -1
  111. package/src/components/Pagination/index.tsx +1 -1
  112. package/src/components/SideModal/SideModalOption/index.tsx +4 -2
  113. package/src/components/SideModal/index.tsx +1 -1
  114. package/src/components/SubNav/index.tsx +3 -3
  115. package/src/components/SubNav/style.tsx +1 -3
  116. package/src/components/TableCounter/index.tsx +7 -2
  117. package/src/components/TableFilters/CategoryFilter/index.tsx +2 -2
  118. package/src/components/TableFilters/CategoryFilter/style.tsx +1 -10
  119. package/src/components/TableFilters/CustomizeFilters/index.tsx +2 -3
  120. package/src/components/TableFilters/DateFilter/index.tsx +4 -4
  121. package/src/components/TableFilters/LiveFilter/index.tsx +1 -1
  122. package/src/components/TableFilters/LiveFilter/style.tsx +2 -10
  123. package/src/components/TableFilters/NameFilter/index.tsx +4 -4
  124. package/src/components/TableFilters/SiteFilter/index.tsx +16 -13
  125. package/src/components/TableFilters/SiteFilter/style.tsx +1 -10
  126. package/src/components/TableFilters/StatusFilter/index.tsx +3 -3
  127. package/src/components/TableFilters/TranslationsFilter/index.tsx +4 -7
  128. package/src/components/TableFilters/TranslationsFilter/style.tsx +1 -10
  129. package/src/components/TableFilters/TypeFilter/index.tsx +2 -2
  130. package/src/components/TableFilters/TypeFilter/style.tsx +1 -10
  131. package/src/components/TableList/index.tsx +6 -6
  132. package/src/components/TableList/style.tsx +1 -1
  133. package/src/components/Tabs/index.tsx +19 -7
  134. package/src/components/Tag/index.tsx +6 -6
  135. package/src/components/Toast/index.tsx +4 -4
  136. package/src/components/Tooltip/index.tsx +5 -3
  137. package/src/components/index.tsx +2 -0
  138. package/src/containers/Navigation/Defaults/actions.tsx +10 -5
  139. package/src/containers/Navigation/Defaults/utils.tsx +13 -4
  140. package/src/containers/Sites/actions.tsx +7 -0
  141. package/src/containers/Sites/constants.tsx +1 -0
  142. package/src/containers/Sites/interfaces.tsx +6 -0
  143. package/src/containers/Sites/reducer.tsx +4 -0
  144. package/src/containers/StructuredData/actions.tsx +21 -8
  145. package/src/containers/StructuredData/constants.tsx +2 -0
  146. package/src/containers/StructuredData/interfaces.tsx +7 -1
  147. package/src/containers/StructuredData/reducer.tsx +5 -1
  148. package/src/helpers/fields.tsx +2 -2
  149. package/src/helpers/index.tsx +3 -0
  150. package/src/helpers/parseTheme.js +456 -0
  151. package/src/helpers/schemas.tsx +2 -2
  152. package/src/hooks/forms.tsx +2 -1
  153. package/src/modules/App/Routing/NavMenu/index.tsx +9 -1
  154. package/src/modules/Content/BulkHeader/TableHeader/index.tsx +1 -1
  155. package/src/modules/Content/hooks.tsx +19 -12
  156. package/src/modules/Content/index.tsx +23 -14
  157. package/src/modules/Navigation/Defaults/DefaultsEditor/Editor/DefaultsBrowser/index.tsx +3 -0
  158. package/src/modules/Navigation/Defaults/DefaultsEditor/Editor/index.tsx +3 -1
  159. package/src/modules/Navigation/Defaults/DefaultsEditor/index.tsx +16 -18
  160. package/src/modules/Navigation/Defaults/DefaultsEditor/utils.tsx +37 -0
  161. package/src/modules/StructuredData/Form/ConnectedField/index.tsx +3 -2
  162. package/src/modules/StructuredData/Form/index.tsx +22 -17
  163. package/src/modules/StructuredData/StructuredDataList/hooks.tsx +30 -20
  164. package/src/modules/StructuredData/StructuredDataList/index.tsx +24 -14
  165. package/src/types/index.tsx +8 -7
@@ -10,6 +10,7 @@ import {
10
10
  SET_SAVED_SITE_INFO,
11
11
  DEFAULT_PARAMS,
12
12
  SET_CURRENT_SITE_ERROR_PAGES,
13
+ SET_CONTENT_FILTERS,
13
14
  } from "./constants";
14
15
  import {
15
16
  ISetSitesAction,
@@ -21,6 +22,7 @@ import {
21
22
  ISetCurrentSiteLanguagesAction,
22
23
  ISetSavedSiteInfoAction,
23
24
  ISetCurrentSiteErrorPages,
25
+ ISetContentFilters,
24
26
  } from "./interfaces";
25
27
 
26
28
  import { ISite, IGetSitePagesParams, ISettingsForm, IGetGlobalPagesParams, IPage } from "@ax/types";
@@ -77,6 +79,10 @@ function setCurrentSiteErrorPages(currentSiteErrorPages: number[]): ISetCurrentS
77
79
  return { type: SET_CURRENT_SITE_ERROR_PAGES, payload: { currentSiteErrorPages } };
78
80
  }
79
81
 
82
+ function setContentFilters(contentFilters: Record<string, string> | null): ISetContentFilters {
83
+ return { type: SET_CONTENT_FILTERS, payload: { contentFilters } };
84
+ }
85
+
80
86
  // TODO: hay que controlar que cuando da error la API borrar los sites ya guardados y sacar el error (ver los siguientes FIXME)
81
87
  function getSites(): (dispatch: Dispatch) => Promise<void> {
82
88
  return async (dispatch) => {
@@ -507,4 +513,5 @@ export {
507
513
  removeUsersBulk,
508
514
  setCurrentSiteErrorPages,
509
515
  resetCurrentSiteErrorPages,
516
+ setContentFilters,
510
517
  };
@@ -10,6 +10,7 @@ export const SET_CURRENT_SITE_LANGUAGES: string | null = `${NAME}/SET_CURRENT_SI
10
10
  export const SET_INITIAL_VALUES = `${NAME}/SET_INITIAL_VALUES`;
11
11
  export const SET_SAVED_SITE_INFO = `${NAME}/SET_SAVED_SITE_INFO`;
12
12
  export const SET_CURRENT_SITE_ERROR_PAGES = `${NAME}/SET_CURRENT_SITE_ERROR_PAGES`;
13
+ export const SET_CONTENT_FILTERS = `${NAME}/SET_CONTENT_FILTERS`;
13
14
 
14
15
  export const ITEMS_PER_PAGE = 50;
15
16
 
@@ -9,6 +9,7 @@ import {
9
9
  SET_INITIAL_VALUES,
10
10
  SET_SAVED_SITE_INFO,
11
11
  SET_CURRENT_SITE_ERROR_PAGES,
12
+ SET_CONTENT_FILTERS,
12
13
  } from "./constants";
13
14
  import { ISite } from "@ax/types";
14
15
 
@@ -62,4 +63,9 @@ export interface ISetCurrentSiteErrorPages {
62
63
  payload: { currentSiteErrorPages: number[] };
63
64
  }
64
65
 
66
+ export interface ISetContentFilters {
67
+ type: typeof SET_CONTENT_FILTERS;
68
+ payload: { contentFilters: Record<string,string> | null };
69
+ }
70
+
65
71
  export type SitesActionsCreators = ISetSitesAction & ISetCurrentSiteInfoAction;
@@ -9,6 +9,7 @@ import {
9
9
  SET_INITIAL_VALUES,
10
10
  SET_SAVED_SITE_INFO,
11
11
  SET_CURRENT_SITE_ERROR_PAGES,
12
+ SET_CONTENT_FILTERS,
12
13
  } from "./constants";
13
14
 
14
15
  import { ISite, IPage, ILanguage } from "@ax/types";
@@ -26,6 +27,7 @@ export interface ISitesState {
26
27
  currentSiteLanguages: ILanguage[];
27
28
  savedSiteInfo: any;
28
29
  currentSiteErrorPages: number[];
30
+ contentFilters: Record<string, string> | null;
29
31
  }
30
32
 
31
33
  export const initialState = {
@@ -39,6 +41,7 @@ export const initialState = {
39
41
  currentSiteLanguages: [],
40
42
  savedSiteInfo: null,
41
43
  currentSiteErrorPages: [],
44
+ contentFilters: null,
42
45
  };
43
46
 
44
47
  export function reducer(state = initialState, action: SitesActionsCreators): ISitesState {
@@ -53,6 +56,7 @@ export function reducer(state = initialState, action: SitesActionsCreators): ISi
53
56
  case SET_INITIAL_VALUES:
54
57
  case SET_SAVED_SITE_INFO:
55
58
  case SET_CURRENT_SITE_ERROR_PAGES:
59
+ case SET_CONTENT_FILTERS:
56
60
  return { ...state, ...action.payload };
57
61
  default:
58
62
  return state;
@@ -16,6 +16,7 @@ import {
16
16
  SET_SCHEMA_VERSION,
17
17
  SET_ERRORS,
18
18
  SET_VALIDATED,
19
+ SET_CONTENT_FILTERS,
19
20
  } from "./constants";
20
21
 
21
22
  import {
@@ -30,9 +31,17 @@ import {
30
31
  ISetSchemaVersion,
31
32
  ISetErrors,
32
33
  ISetValidated,
34
+ ISetContentFilters,
33
35
  } from "./interfaces";
34
36
  import { prepareStructuredDataContent, getTaxonomies, filterStructuredDataByID, getTypes } from "./utils";
35
- import { IStructuredData, IStructuredDataContent, ICategory, IGetStructuredDataParams, IErrorItem } from "@ax/types";
37
+ import {
38
+ IStructuredData,
39
+ IStructuredDataContent,
40
+ ICategory,
41
+ IGetStructuredDataParams,
42
+ IErrorItem,
43
+ IStructuredDataQueryValues,
44
+ } from "@ax/types";
36
45
  import { structuredData } from "@ax/api";
37
46
  import { setTotalItems } from "@ax/containers/Sites/actions";
38
47
  import { appActions } from "@ax/containers/App";
@@ -102,30 +111,33 @@ function setValidated(validated: boolean): ISetValidated {
102
111
  return { type: SET_VALIDATED, payload: { validated } };
103
112
  }
104
113
 
114
+ function setContentFilters(contentFilters: Record<string, IStructuredDataQueryValues> | null): ISetContentFilters {
115
+ return { type: SET_CONTENT_FILTERS, payload: { contentFilters } };
116
+ }
117
+
105
118
  function updateFormValue(valueObj: any): (dispatch: Dispatch, getState: any) => void {
106
119
  return (dispatch, getState) => {
107
120
  const {
108
121
  structuredData: { form },
109
122
  } = getState();
110
- const updatedForm = { ...form, content: { ...form.content, ...valueObj } };
123
+ const updatedForm = { ...form, content: { ...form?.content, ...valueObj } };
111
124
  dispatch(updateForm(updatedForm));
112
125
  };
113
126
  }
114
127
 
115
- function resetForm(): (dispatch: Dispatch, getState: any) => void {
128
+ function resetForm(setDefault?: boolean): (dispatch: Dispatch, getState: any) => void {
116
129
  return (dispatch, getState) => {
117
130
  const {
118
- structuredData: {
119
- currentStructuredData: { defaultValues },
120
- },
131
+ structuredData: { currentStructuredData },
121
132
  } = getState();
122
133
 
123
- const updatedForm = { content: defaultValues };
134
+ const formContent = setDefault && currentStructuredData ? { content: currentStructuredData.defaultValues } : null;
124
135
 
125
136
  dispatch(setEntity(null));
126
- dispatch(updateForm(updatedForm));
137
+ dispatch(updateForm(formContent));
127
138
  dispatch(setErrors([]));
128
139
  dispatch(setValidated(false));
140
+ dispatch(setCurrentDataID(null));
129
141
  };
130
142
  }
131
143
 
@@ -559,4 +571,5 @@ export {
559
571
  setFilter,
560
572
  validateForm,
561
573
  deleteError,
574
+ setContentFilters,
562
575
  };
@@ -15,6 +15,7 @@ const SET_FILTER: string | null = `${NAME}/SET_FILTER`;
15
15
  const SET_SCHEMA_VERSION: string | null = `${NAME}/SET_SCHEMA_VERSION`;
16
16
  const SET_ERRORS = `${NAME}/SET_ERRORS`;
17
17
  const SET_VALIDATED = `${NAME}/SET_VALIDATED`;
18
+ const SET_CONTENT_FILTERS = `${NAME}/SET_CONTENT_FILTERS`;
18
19
 
19
20
  const ITEMS_PER_PAGE = 50;
20
21
 
@@ -45,4 +46,5 @@ export {
45
46
  SET_SCHEMA_VERSION,
46
47
  SET_ERRORS,
47
48
  SET_VALIDATED,
49
+ SET_CONTENT_FILTERS,
48
50
  };
@@ -12,9 +12,10 @@ import {
12
12
  SET_SCHEMA_VERSION,
13
13
  SET_ERRORS,
14
14
  SET_VALIDATED,
15
+ SET_CONTENT_FILTERS,
15
16
  } from "./constants";
16
17
 
17
- import { IStructuredData, IStructuredDataContent, ICategory, IErrorItem } from "@ax/types";
18
+ import { IStructuredData, IStructuredDataContent, ICategory, IErrorItem, IStructuredDataQueryValues } from "@ax/types";
18
19
 
19
20
  export interface ISetCategories {
20
21
  type: typeof SET_CATEGORIES;
@@ -80,6 +81,11 @@ export interface ISetValidated {
80
81
  payload: { validated: boolean };
81
82
  }
82
83
 
84
+ export interface ISetContentFilters {
85
+ type: typeof SET_CONTENT_FILTERS;
86
+ payload: { contentFilters: Record<string, IStructuredDataQueryValues> | null };
87
+ }
88
+
83
89
  export type CategoryActionsCreators = ISetCategories & ISetCurrentData;
84
90
 
85
91
  export type StructuredDataActionsCreators = CategoryActionsCreators &
@@ -1,4 +1,4 @@
1
- import { IStructuredData, IStructuredDataContent, ICategory, IErrorItem } from "@ax/types";
1
+ import { IStructuredData, IStructuredDataContent, ICategory, IErrorItem, IStructuredDataQueryValues } from "@ax/types";
2
2
  import {
3
3
  SET_CATEGORIES,
4
4
  SET_STRUCTURED_DATA,
@@ -15,6 +15,7 @@ import {
15
15
  SET_SCHEMA_VERSION,
16
16
  SET_ERRORS,
17
17
  SET_VALIDATED,
18
+ SET_CONTENT_FILTERS,
18
19
  } from "./constants";
19
20
 
20
21
  import { StructuredDataActionsCreators } from "./interfaces";
@@ -34,6 +35,7 @@ export interface IStructuredDataState {
34
35
  schemaVersion: string;
35
36
  errors: IErrorItem[];
36
37
  validated: boolean;
38
+ contentFilters: Record<string, IStructuredDataQueryValues> | null;
37
39
  }
38
40
 
39
41
  export const initialState = {
@@ -51,6 +53,7 @@ export const initialState = {
51
53
  schemaVersion: "",
52
54
  errors: [],
53
55
  validated: false,
56
+ contentFilters: null,
54
57
  };
55
58
 
56
59
  export function reducer(state = initialState, action: StructuredDataActionsCreators): IStructuredDataState {
@@ -70,6 +73,7 @@ export function reducer(state = initialState, action: StructuredDataActionsCreat
70
73
  case SET_SCHEMA_VERSION:
71
74
  case SET_ERRORS:
72
75
  case SET_VALIDATED:
76
+ case SET_CONTENT_FILTERS:
73
77
  return { ...state, ...action.payload };
74
78
  default:
75
79
  return state;
@@ -1,5 +1,5 @@
1
- const fields = require.context("./../components/Fields", true);
1
+ import * as components from "@ax/components/Fields";
2
2
 
3
- const getFieldByPath = (name: string) => fields(`./${name}/index.tsx`).default;
3
+ const getFieldByPath = (name: string): (() => JSX.Element) => (components as Record<string, any>)[name];
4
4
 
5
5
  export { getFieldByPath };
@@ -99,6 +99,8 @@ import { isDevelopment } from "./environment";
99
99
 
100
100
  import { getDefaultTheme } from "./themes";
101
101
 
102
+ import { parseTheme } from "./parseTheme";
103
+
102
104
  export {
103
105
  isComponentEmpty,
104
106
  setAsContainedComponent,
@@ -180,4 +182,5 @@ export {
180
182
  getDefaultNavigationModules,
181
183
  isMultipleNavigationModules,
182
184
  areEqual,
185
+ parseTheme,
183
186
  };