@griddo/ax 10.2.14 → 10.2.16
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.2.
|
|
4
|
+
"version": "10.2.16",
|
|
5
5
|
"authors": [
|
|
6
6
|
"Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
|
|
7
7
|
"Carlos Torres <carlos.torres@secuoyas.com>",
|
|
@@ -231,5 +231,5 @@
|
|
|
231
231
|
"publishConfig": {
|
|
232
232
|
"access": "public"
|
|
233
233
|
},
|
|
234
|
-
"gitHead": "
|
|
234
|
+
"gitHead": "52c6eac7dfab4eee2992165e335e733d18c9d8a3"
|
|
235
235
|
}
|
|
@@ -11,10 +11,10 @@ import { IReferenceState, useReference } from "../Context";
|
|
|
11
11
|
import * as S from "./style";
|
|
12
12
|
|
|
13
13
|
const ItemList = (props: IProps) => {
|
|
14
|
-
const { items, currentSite, handleListDelete } = props;
|
|
14
|
+
const { items, currentSite, handleListDelete, site } = props;
|
|
15
15
|
|
|
16
16
|
const { state, setState, setReorderElements } = useReference();
|
|
17
|
-
const { fixed, selectedItems, sourceTitles, fullRelations
|
|
17
|
+
const { fixed, selectedItems, sourceTitles, fullRelations } = state;
|
|
18
18
|
|
|
19
19
|
useEffect(() => {
|
|
20
20
|
const params = {
|
|
@@ -111,6 +111,7 @@ interface IProps {
|
|
|
111
111
|
items: number[];
|
|
112
112
|
currentSite: number | null;
|
|
113
113
|
handleListDelete(value: string[]): void;
|
|
114
|
+
site?: number;
|
|
114
115
|
}
|
|
115
116
|
|
|
116
117
|
const mapStateToProps = (state: IRootState) => ({
|
|
@@ -99,8 +99,8 @@ const ManualPanel = (props: IProps) => {
|
|
|
99
99
|
setState((state: IReferenceState) => ({ ...state, showSelected: !state.showSelected }));
|
|
100
100
|
|
|
101
101
|
const handleAdd = () => {
|
|
102
|
-
const { mode, fixed, fullRelations, site } = state;
|
|
103
|
-
const newValue = { mode, fixed, fullRelations, site };
|
|
102
|
+
const { mode, fixed, fullRelations, site, lang } = state;
|
|
103
|
+
const newValue = { mode, fixed, fullRelations, site, lang };
|
|
104
104
|
onChange(newValue);
|
|
105
105
|
handleValidation && handleValidation(state.fixed, validators);
|
|
106
106
|
};
|
|
@@ -193,7 +193,11 @@ const ReferenceField = (props: IReferenceFieldProps) => {
|
|
|
193
193
|
|
|
194
194
|
const Asterisk = () => (mandatory ? <S.Asterisk>*</S.Asterisk> : <></>);
|
|
195
195
|
|
|
196
|
-
const dataBlock = isAuto ?
|
|
196
|
+
const dataBlock = isAuto ? (
|
|
197
|
+
<AutoData />
|
|
198
|
+
) : (
|
|
199
|
+
<ItemList items={value ? value.fixed : []} handleListDelete={handleListDelete} site={value.site} />
|
|
200
|
+
);
|
|
197
201
|
|
|
198
202
|
return (
|
|
199
203
|
<S.Wrapper data-testid="reference-field-wrapper">
|