@griddo/ax 11.3.0 → 11.3.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.
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@griddo/ax",
|
|
3
3
|
"description": "Griddo Author Experience",
|
|
4
|
-
"version": "11.3.
|
|
4
|
+
"version": "11.3.1",
|
|
5
5
|
"authors": [
|
|
6
6
|
"Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
|
|
7
7
|
"Carlos Torres <carlos.torres@secuoyas.com>",
|
|
@@ -226,5 +226,5 @@
|
|
|
226
226
|
"publishConfig": {
|
|
227
227
|
"access": "public"
|
|
228
228
|
},
|
|
229
|
-
"gitHead": "
|
|
229
|
+
"gitHead": "834d54274a0bb94d2a8fcaa7e5cf3d24b300a334"
|
|
230
230
|
}
|
package/src/forms/validators.tsx
CHANGED
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
isEmptyObj,
|
|
14
14
|
stripHtml,
|
|
15
15
|
getFormTemplate,
|
|
16
|
+
isComponentEmpty,
|
|
16
17
|
} from "@ax/helpers";
|
|
17
18
|
|
|
18
19
|
import { findByEditorID } from "@ax/forms";
|
|
@@ -408,7 +409,8 @@ const findFieldsErrors = (content: any, isForm?: boolean): IErrorItem[] => {
|
|
|
408
409
|
while (queue.length > 0) {
|
|
409
410
|
const currentObj = queue.shift();
|
|
410
411
|
|
|
411
|
-
|
|
412
|
+
// TODO: revisar comprobación de componentes vacíos
|
|
413
|
+
if (currentObj.component && !isComponentEmpty(currentObj)) {
|
|
412
414
|
let schemaErrors: IErrorItem[] = [];
|
|
413
415
|
const schema = getSchema(currentObj.component);
|
|
414
416
|
schema &&
|
|
@@ -374,10 +374,12 @@ const GlobalEditor = (props: IProps) => {
|
|
|
374
374
|
|
|
375
375
|
const goToPages = (path: string) => setRoute(path);
|
|
376
376
|
|
|
377
|
-
const goToError = (editorID: number, tab: string, template: boolean) => {
|
|
378
|
-
const realEditorID = template ? 0 : editorID;
|
|
379
|
-
|
|
380
|
-
|
|
377
|
+
const goToError = async (editorID: number | null, tab: string, template: boolean, parentEditorID?: number) => {
|
|
378
|
+
const realEditorID = parentEditorID ? parentEditorID : template ? 0 : editorID;
|
|
379
|
+
if (realEditorID !== null) {
|
|
380
|
+
await setSelectedContent(realEditorID);
|
|
381
|
+
setTab(tab);
|
|
382
|
+
}
|
|
381
383
|
};
|
|
382
384
|
|
|
383
385
|
const goToPackage = () => setHistoryPush("/sites/settings/content-types", false);
|
|
@@ -723,7 +725,7 @@ interface IPageEditorDispatchProps {
|
|
|
723
725
|
setLanguage(lang: { locale: string; id: number | null }): void;
|
|
724
726
|
createNewTranslation(isNewTranslation: boolean): void;
|
|
725
727
|
setTab(tab: string): void;
|
|
726
|
-
setSelectedContent(editorID: number): void
|
|
728
|
+
setSelectedContent(editorID: number): Promise<void>;
|
|
727
729
|
setCurrentSiteInfo(currentSiteInfo: ISite | null): void;
|
|
728
730
|
setCurrentPageID(currentPageID: number): void;
|
|
729
731
|
sendPagePing(pageID: number): Promise<boolean>;
|