@griddo/ax 1.62.0 → 1.62.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": "1.62.
|
|
4
|
+
"version": "1.62.1",
|
|
5
5
|
"authors": [
|
|
6
6
|
"Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
|
|
7
7
|
"Carlos Torres <carlos.torres@secuoyas.com>",
|
|
@@ -244,5 +244,5 @@
|
|
|
244
244
|
"publishConfig": {
|
|
245
245
|
"access": "public"
|
|
246
246
|
},
|
|
247
|
-
"gitHead": "
|
|
247
|
+
"gitHead": "36e527f0b4a08d89fb6170a11b38bea5798438d0"
|
|
248
248
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
2
|
import { connect } from "react-redux";
|
|
3
3
|
|
|
4
|
+
import { themes } from "components";
|
|
4
5
|
import { IDataPack, IErrorItem, IRootState, ISite } from "@ax/types";
|
|
5
6
|
import { structuredDataActions } from "@ax/containers/StructuredData";
|
|
6
7
|
import { MainWrapper, ErrorToast, Notification, Loading } from "@ax/components";
|
|
@@ -51,6 +52,9 @@ const Form = (props: IProps) => {
|
|
|
51
52
|
|
|
52
53
|
let title = "";
|
|
53
54
|
|
|
55
|
+
const defaultTheme = themes.find((theme: any) => theme.default);
|
|
56
|
+
const theme = defaultTheme ? defaultTheme.value : themes[0].value;
|
|
57
|
+
|
|
54
58
|
const Fields =
|
|
55
59
|
fields &&
|
|
56
60
|
fields.map((field: any, i: number) => {
|
|
@@ -58,7 +62,16 @@ const Form = (props: IProps) => {
|
|
|
58
62
|
if (key === "title") {
|
|
59
63
|
title = form.content && form.content[key] ? form.content[key] : "";
|
|
60
64
|
}
|
|
61
|
-
return
|
|
65
|
+
return (
|
|
66
|
+
<ConnectedField
|
|
67
|
+
fieldKey={key}
|
|
68
|
+
field={field}
|
|
69
|
+
key={`${type}${i}`}
|
|
70
|
+
site={site}
|
|
71
|
+
disabled={isDisabled}
|
|
72
|
+
theme={site ? site.theme : theme}
|
|
73
|
+
/>
|
|
74
|
+
);
|
|
62
75
|
});
|
|
63
76
|
|
|
64
77
|
const handleSave = async (publish?: boolean) => {
|
|
@@ -274,7 +287,7 @@ const Form = (props: IProps) => {
|
|
|
274
287
|
interface IProps {
|
|
275
288
|
schema: any;
|
|
276
289
|
form: any;
|
|
277
|
-
site: ISite;
|
|
290
|
+
site: ISite | null;
|
|
278
291
|
currentStructuredData: any;
|
|
279
292
|
isSaving: boolean;
|
|
280
293
|
isLoading: boolean;
|