@griddo/ax 1.75.150 → 1.75.152
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.75.
|
|
4
|
+
"version": "1.75.152",
|
|
5
5
|
"authors": [
|
|
6
6
|
"Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
|
|
7
7
|
"Carlos Torres <carlos.torres@secuoyas.com>",
|
|
@@ -230,5 +230,5 @@
|
|
|
230
230
|
"publishConfig": {
|
|
231
231
|
"access": "public"
|
|
232
232
|
},
|
|
233
|
-
"gitHead": "
|
|
233
|
+
"gitHead": "3f755edf0c92d7825ce289e5f216bf6874077940"
|
|
234
234
|
}
|
package/src/api/checkgroups.tsx
CHANGED
|
@@ -15,13 +15,19 @@ const SERVICES: { [key: string]: IServiceConfig } = {
|
|
|
15
15
|
},
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
const getCheckGroupItems = async (
|
|
18
|
+
const getCheckGroupItems = async (
|
|
19
|
+
siteId: number | string | null,
|
|
20
|
+
source: string,
|
|
21
|
+
allLanguages?: boolean
|
|
22
|
+
): Promise<AxiosResponse<any>> => {
|
|
19
23
|
const {
|
|
20
24
|
host,
|
|
21
25
|
endpoint: [prefix, suffix],
|
|
22
26
|
} = SERVICES.GET_STRUCTURED_DATA;
|
|
23
27
|
|
|
24
|
-
|
|
28
|
+
const allLanguagesQuery = allLanguages ? "?allLanguages=true" : "";
|
|
29
|
+
|
|
30
|
+
SERVICES.GET_STRUCTURED_DATA.dynamicUrl = `${host}${prefix}${siteId}${suffix}/${source}/checkgroup${allLanguagesQuery}`;
|
|
25
31
|
|
|
26
32
|
return sendRequest(SERVICES.GET_STRUCTURED_DATA);
|
|
27
33
|
};
|
|
@@ -8,7 +8,7 @@ import { ISite, ICheck } from "@ax/types";
|
|
|
8
8
|
import * as S from "./style";
|
|
9
9
|
|
|
10
10
|
const AsyncCheckGroup = (props: IAsyncCheckGroup): JSX.Element => {
|
|
11
|
-
const { onChange, value, site, source, disabled, error, handleValidation, fullHeight } = props;
|
|
11
|
+
const { onChange, value, site, source, disabled, error, handleValidation, fullHeight, allLanguages = false } = props;
|
|
12
12
|
|
|
13
13
|
const [options, setOptions] = useState<ICheck[]>([]);
|
|
14
14
|
|
|
@@ -21,7 +21,7 @@ const AsyncCheckGroup = (props: IAsyncCheckGroup): JSX.Element => {
|
|
|
21
21
|
try {
|
|
22
22
|
let result = null;
|
|
23
23
|
const siteID = site ? site.id : null;
|
|
24
|
-
result = await checkgroups.getCheckGroupItems(siteID, source);
|
|
24
|
+
result = await checkgroups.getCheckGroupItems(siteID, source, allLanguages);
|
|
25
25
|
if (result && isReqOk(result.status)) {
|
|
26
26
|
return result.data;
|
|
27
27
|
}
|
|
@@ -36,7 +36,7 @@ const AsyncCheckGroup = (props: IAsyncCheckGroup): JSX.Element => {
|
|
|
36
36
|
.catch((apiError) => console.log(apiError));
|
|
37
37
|
|
|
38
38
|
return () => (isSubscribed = false);
|
|
39
|
-
}, [site, source]);
|
|
39
|
+
}, [site, source, allLanguages]);
|
|
40
40
|
|
|
41
41
|
const handleChange = (newValue: ICheck) => {
|
|
42
42
|
const arrayIds = safeValue.map((e: any) => (typeof e === "number" ? e : e.value));
|
|
@@ -88,6 +88,7 @@ export interface IAsyncCheckGroup {
|
|
|
88
88
|
handleValidation?: (value: string | any[]) => void;
|
|
89
89
|
validators?: Record<string, unknown>;
|
|
90
90
|
fullHeight?: boolean;
|
|
91
|
+
allLanguages?: boolean;
|
|
91
92
|
}
|
|
92
93
|
|
|
93
94
|
export default AsyncCheckGroup;
|