@griddo/ax 10.5.1 → 10.5.3
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": "10.5.
|
|
4
|
+
"version": "10.5.3",
|
|
5
5
|
"authors": [
|
|
6
6
|
"Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
|
|
7
7
|
"Carlos Torres <carlos.torres@secuoyas.com>",
|
|
@@ -232,5 +232,5 @@
|
|
|
232
232
|
"publishConfig": {
|
|
233
233
|
"access": "public"
|
|
234
234
|
},
|
|
235
|
-
"gitHead": "
|
|
235
|
+
"gitHead": "2f9cd60c8f8c1286fc694a080452c8dfcb6982fc"
|
|
236
236
|
}
|
|
@@ -55,7 +55,9 @@ const ItemList = (props: IProps) => {
|
|
|
55
55
|
|
|
56
56
|
if (langItem) {
|
|
57
57
|
const newSelIds: number[] = fixed.filter((id: number) => id !== langItem.id);
|
|
58
|
-
const selItems: IStructuredDataContent[] = selectedItems.filter(
|
|
58
|
+
const selItems: IStructuredDataContent[] = selectedItems.filter(
|
|
59
|
+
(item: IStructuredDataContent) => item.id !== langItem.id
|
|
60
|
+
);
|
|
59
61
|
setState((state: IReferenceState) => ({ ...state, fixed: newSelIds, selectedItems: selItems }));
|
|
60
62
|
handleListDelete(newSelIds);
|
|
61
63
|
}
|
|
@@ -45,10 +45,9 @@ const ReferenceField = (props: IReferenceFieldProps) => {
|
|
|
45
45
|
const isAuto = mode === "auto";
|
|
46
46
|
const hasMaxItems = !!(value && value.fixed && maxItems && !isAuto && value.fixed.length >= maxItems);
|
|
47
47
|
const sourcesIDs = sources.map((source: ISource) => source.structuredData);
|
|
48
|
+
const { fixed, order, quantity, allLanguages, preferenceLanguage, fullRelations = false } = state;
|
|
48
49
|
|
|
49
50
|
const handleMode = (mode: string) => {
|
|
50
|
-
const { fixed, order, quantity, allLanguages, preferenceLanguage, fullRelations = false } = state;
|
|
51
|
-
|
|
52
51
|
const manualSources: string[] = state.selectedItems.reduce(
|
|
53
52
|
(unique: string[], selItem: IStructuredDataContent) =>
|
|
54
53
|
unique.includes(selItem.structuredData) ? unique : [...unique, selItem.structuredData],
|
|
@@ -134,6 +133,7 @@ const ReferenceField = (props: IReferenceFieldProps) => {
|
|
|
134
133
|
const newValue = {
|
|
135
134
|
mode,
|
|
136
135
|
fixed,
|
|
136
|
+
fullRelations,
|
|
137
137
|
};
|
|
138
138
|
onChange(newValue);
|
|
139
139
|
resetValidation && resetValidation();
|
|
@@ -143,6 +143,7 @@ const ReferenceField = (props: IReferenceFieldProps) => {
|
|
|
143
143
|
const newValue = {
|
|
144
144
|
mode,
|
|
145
145
|
fixed,
|
|
146
|
+
fullRelations,
|
|
146
147
|
};
|
|
147
148
|
onChange(newValue);
|
|
148
149
|
};
|