@pushwoosh/smart-components-kit 1.3.27 → 1.3.29
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.
|
@@ -2,6 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Spinner } from '@pushwoosh/dumb-components';
|
|
3
3
|
import { Horizontal, useAsync } from '@pushwoosh/kit-helpers';
|
|
4
4
|
import { useSPAContext } from '@pushwoosh/spa-context';
|
|
5
|
+
import { collectPaginatedData } from '../asyncHelpers';
|
|
5
6
|
import { langCodes } from './constants';
|
|
6
7
|
import { LanguagesSelectForm } from './LanguagesSelectForm';
|
|
7
8
|
import { resolveLanguageAudience } from './platforms';
|
|
@@ -18,12 +19,16 @@ export const LanguagesSelectFormLoader = ({
|
|
|
18
19
|
rpcGateway
|
|
19
20
|
} = useSPAContext();
|
|
20
21
|
const langAsync = useAsync(async () => {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
// GetTagValues caps an unpaged request at 100 values, and apps hold more languages than that
|
|
23
|
+
const values = await collectPaginatedData(1000, async (perPage, page) => {
|
|
24
|
+
const res = await rpcGateway.tags.GetTagValues({
|
|
25
|
+
application,
|
|
26
|
+
name: 'Language',
|
|
27
|
+
platforms,
|
|
28
|
+
page,
|
|
29
|
+
perPage
|
|
30
|
+
});
|
|
31
|
+
return res.values;
|
|
27
32
|
});
|
|
28
33
|
const valuesLangCodes = values.map(v => canonicalizeLangCode(v.value));
|
|
29
34
|
const allLangCodes = Array.from(new Set([...valuesLangCodes, ...langCodes.map(canonicalizeLangCode)]).values());
|
package/package.json
CHANGED
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
},
|
|
21
21
|
"pre-commit": "check",
|
|
22
22
|
"engines": {
|
|
23
|
-
"node": ">=
|
|
23
|
+
"node": ">= 24",
|
|
24
24
|
"npm": ">= 7"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@floating-ui/react-dom": "^2.1.2",
|
|
28
|
-
"@pushwoosh/dumb-components": "^
|
|
28
|
+
"@pushwoosh/dumb-components": "^2.1.0",
|
|
29
29
|
"@pushwoosh/kit-constants": "^1.12.0",
|
|
30
30
|
"@pushwoosh/kit-helpers": "^4.12.0",
|
|
31
31
|
"@pushwoosh/kit-icons": "^2.2.3",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"vitest": "^3.2.4"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
|
-
"react": "^
|
|
56
|
-
"react-dom": "^
|
|
55
|
+
"react": "^18.0.0",
|
|
56
|
+
"react-dom": "^18.0.0"
|
|
57
57
|
},
|
|
58
|
-
"version": "1.3.
|
|
58
|
+
"version": "1.3.29"
|
|
59
59
|
}
|