@griddo/ax 1.64.6 → 1.64.9
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 +2 -2
- package/src/modules/Content/ContentFilters/index.tsx +12 -1
- package/src/modules/Content/index.tsx +3 -1
- package/src/modules/Content/utils.tsx +1 -2
- package/src/modules/StructuredData/Form/index.tsx +3 -1
- package/src/modules/StructuredData/StructuredDataList/StructuredDataItem/index.tsx +3 -3
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@griddo/ax",
|
|
3
3
|
"description": "Griddo Author Experience",
|
|
4
|
-
"version": "1.64.
|
|
4
|
+
"version": "1.64.9",
|
|
5
5
|
"authors": [
|
|
6
6
|
"Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
|
|
7
7
|
"Carlos Torres <carlos.torres@secuoyas.com>",
|
|
@@ -220,5 +220,5 @@
|
|
|
220
220
|
"publishConfig": {
|
|
221
221
|
"access": "public"
|
|
222
222
|
},
|
|
223
|
-
"gitHead": "
|
|
223
|
+
"gitHead": "89612d5233cf272c1535b62aacb4ec5cd5f2fdbd"
|
|
224
224
|
}
|
|
@@ -15,7 +15,15 @@ import { getFilters } from "./utils";
|
|
|
15
15
|
import * as S from "./style";
|
|
16
16
|
|
|
17
17
|
const ContentFilters = (props: IProps): JSX.Element => {
|
|
18
|
-
const {
|
|
18
|
+
const {
|
|
19
|
+
setContentFilter,
|
|
20
|
+
current,
|
|
21
|
+
dynamicValues,
|
|
22
|
+
addTemplate,
|
|
23
|
+
setSelectedStructuredData,
|
|
24
|
+
resetFilter,
|
|
25
|
+
setStructuredDataFilter,
|
|
26
|
+
} = props;
|
|
19
27
|
const clonedStructure = deepClone(filterStructure);
|
|
20
28
|
const filters = getFilters(clonedStructure, dynamicValues);
|
|
21
29
|
|
|
@@ -35,6 +43,7 @@ const ContentFilters = (props: IProps): JSX.Element => {
|
|
|
35
43
|
resetFilter();
|
|
36
44
|
setContentFilter(value);
|
|
37
45
|
setSelectedStructuredData(value, "site");
|
|
46
|
+
current && setStructuredDataFilter(value);
|
|
38
47
|
if (hasTemplate) {
|
|
39
48
|
addTemplate(firstTemplate);
|
|
40
49
|
} else {
|
|
@@ -67,12 +76,14 @@ interface IProps {
|
|
|
67
76
|
dynamicValues: any;
|
|
68
77
|
setSelectedStructuredData(id: string, scope: string): void;
|
|
69
78
|
resetFilter(): void;
|
|
79
|
+
setStructuredDataFilter: (filter: string) => void;
|
|
70
80
|
}
|
|
71
81
|
|
|
72
82
|
const mapDispatchToProps = {
|
|
73
83
|
setContentFilter: sitesActions.setFilter,
|
|
74
84
|
addTemplate: pageEditorActions.addTemplate,
|
|
75
85
|
setSelectedStructuredData: structuredDataActions.setSelectedStructuredData,
|
|
86
|
+
setStructuredDataFilter: structuredDataActions.setFilter,
|
|
76
87
|
};
|
|
77
88
|
|
|
78
89
|
export default connect(null, mapDispatchToProps)(ContentFilters);
|
|
@@ -631,13 +631,15 @@ const Content = (props: IProps): JSX.Element => {
|
|
|
631
631
|
message: "Page deleted.",
|
|
632
632
|
};
|
|
633
633
|
|
|
634
|
+
const addNewAction = filter === "unique-pages" || isGlobalPages ? toggleNewModal : addNewData;
|
|
635
|
+
|
|
634
636
|
return (
|
|
635
637
|
<MainWrapper
|
|
636
638
|
title={title}
|
|
637
639
|
language={lang}
|
|
638
640
|
languageActions={languageActions}
|
|
639
641
|
availableLanguages={siteLanguages}
|
|
640
|
-
rightButton={{ label: "New", action:
|
|
642
|
+
rightButton={{ label: "New", action: addNewAction }}
|
|
641
643
|
searchAction={setSearchQuery}
|
|
642
644
|
>
|
|
643
645
|
<S.ContentListWrapper>
|
|
@@ -24,13 +24,12 @@ const mapStructuredOptions = (options: any[]) => {
|
|
|
24
24
|
|
|
25
25
|
return pureOptions.map((option: any) => {
|
|
26
26
|
const { id, title } = option;
|
|
27
|
-
const type = title.toLowerCase();
|
|
28
27
|
|
|
29
28
|
return {
|
|
30
29
|
name: id,
|
|
31
30
|
value: id,
|
|
32
31
|
title,
|
|
33
|
-
type,
|
|
32
|
+
type: id,
|
|
34
33
|
isData: true,
|
|
35
34
|
};
|
|
36
35
|
});
|
|
@@ -46,7 +46,9 @@ const Form = (props: IProps) => {
|
|
|
46
46
|
const { fields } = schema;
|
|
47
47
|
|
|
48
48
|
const activatedDataPacksIds = getActivatedDataPacksIds(activatedDataPacks);
|
|
49
|
-
const isDisabled =
|
|
49
|
+
const isDisabled =
|
|
50
|
+
currentStructuredData.local &&
|
|
51
|
+
!activatedDataPacksIds.some((pack: string) => currentStructuredData.dataPacks.includes(pack));
|
|
50
52
|
const isDataTranslatable = currentStructuredData && currentStructuredData.translate;
|
|
51
53
|
|
|
52
54
|
let title = "";
|
|
@@ -40,9 +40,9 @@ const StructuredDataItem = (props: IStructuredDataItemProps): JSX.Element => {
|
|
|
40
40
|
|
|
41
41
|
const currentStructuredDataColumns: any = columns[currentStructuredData.id] || columns["all"];
|
|
42
42
|
|
|
43
|
-
const activeColumns =
|
|
44
|
-
(col: string) => currentStructuredDataColumns[col].show
|
|
45
|
-
|
|
43
|
+
const activeColumns = currentStructuredDataColumns
|
|
44
|
+
? Object.keys(currentStructuredDataColumns).filter((col: string) => currentStructuredDataColumns[col].show)
|
|
45
|
+
: [];
|
|
46
46
|
|
|
47
47
|
const publishedTooltip: Record<string, string> = {
|
|
48
48
|
active: "Live",
|