@griddo/ax 1.57.16 → 1.57.20

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@griddo/ax",
3
3
  "description": "Griddo Author Experience",
4
- "version": "1.57.16",
4
+ "version": "1.57.20",
5
5
  "authors": [
6
6
  "Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
7
7
  "Carlos Torres <carlos.torres@secuoyas.com>",
@@ -241,5 +241,5 @@
241
241
  "publishConfig": {
242
242
  "access": "public"
243
243
  },
244
- "gitHead": "59e9c22e777ace8bf0075b131ccbfb12ae8673a5"
244
+ "gitHead": "c8a4ae3b268b53695611fc076b03aae3d95e7490"
245
245
  }
@@ -147,7 +147,7 @@ const restoreDataContentBulk = (dataContentId: number[]) => {
147
147
  return sendRequest(SERVICES.RESTORE_DATA_CONTENT_BULK, { ids: dataContentId });
148
148
  };
149
149
 
150
- const getDistributorContent = async (siteID: number, data: any) => {
150
+ const getDistributorContent = async (siteID: number | string, data: any) => {
151
151
  const { host, endpoint } = SERVICES.GET_DISTRIBUTOR_CONTENT;
152
152
  const [prefix, suffix] = endpoint;
153
153
 
@@ -20,7 +20,8 @@ const ItemList = (props: IProps) => {
20
20
  };
21
21
 
22
22
  const getItems = async () => {
23
- const response = await structuredData.getDistributorContent(currentSite, params);
23
+ const siteID = currentSite ? currentSite : "global";
24
+ const response = await structuredData.getDistributorContent(siteID, params);
24
25
  if (isReqOk(response.status)) {
25
26
  setState({ ...context, state: { ...state, selectedItems: response.data } });
26
27
  } else {
@@ -522,6 +522,8 @@ function addComponent(type: any, key: string): (dispatch: Dispatch, getState: an
522
522
  },
523
523
  };
524
524
 
525
+ generatePageContent(updatedPageContent, dispatch, getState);
526
+
525
527
  if (type.editorID) {
526
528
  setSelectedContent(type.editorID)(dispatch, getState);
527
529
  } else {
@@ -529,8 +531,6 @@ function addComponent(type: any, key: string): (dispatch: Dispatch, getState: an
529
531
  const lastElementEditorID = getLastComponentEditorID(generatedSections, component.editorID, key);
530
532
  setSelectedContent(lastElementEditorID)(dispatch, getState);
531
533
  }
532
-
533
- generatePageContent(updatedPageContent, dispatch, getState);
534
534
  };
535
535
  }
536
536