@pushwoosh/smart-components-kit 1.3.23 → 1.3.25
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.
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { modifiersForTagType } from '@pushwoosh/kit-constants';
|
|
2
2
|
import { useAsync } from '@pushwoosh/kit-helpers';
|
|
3
3
|
import { useSPAContext } from '@pushwoosh/spa-context';
|
|
4
4
|
import { collectPaginatedData } from '../asyncHelpers';
|
|
5
5
|
const ignoreTagTypes = ['BOOLEAN', 'LIST'];
|
|
6
|
-
const numberTypes = ['INTEGER', 'PRICE'];
|
|
7
6
|
export async function fetchDynamicContentTags(context) {
|
|
8
7
|
const originalTags = await collectPaginatedData(1000, async (perPage, page) => {
|
|
9
8
|
const res = await context.rpcGateway.tags.List({
|
|
@@ -16,7 +15,7 @@ export async function fetchDynamicContentTags(context) {
|
|
|
16
15
|
});
|
|
17
16
|
return originalTags.filter(tag => !ignoreTagTypes.includes(tag.type)).map(tag => ({
|
|
18
17
|
...tag,
|
|
19
|
-
modifiers:
|
|
18
|
+
modifiers: modifiersForTagType(tag.type)
|
|
20
19
|
}));
|
|
21
20
|
}
|
|
22
21
|
export function useDynamicContentTags() {
|
|
@@ -65,10 +65,12 @@ export function ProductUpdateCard({
|
|
|
65
65
|
"$flexWrap": "wrap",
|
|
66
66
|
children: [update.actionLink && _jsx(Button, {
|
|
67
67
|
color: "primary",
|
|
68
|
+
size: "compact",
|
|
68
69
|
onClick: handleAction(update.actionLink),
|
|
69
70
|
children: update.actionLinkLabel || update.actionLink
|
|
70
71
|
}), update.secondaryActionLink && _jsx(Button, {
|
|
71
72
|
color: "secondary",
|
|
73
|
+
size: "compact",
|
|
72
74
|
onClick: handleAction(update.secondaryActionLink),
|
|
73
75
|
children: update.secondaryActionLinkLabel || update.secondaryActionLink
|
|
74
76
|
})]
|
package/package.json
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@floating-ui/react-dom": "^2.1.2",
|
|
28
28
|
"@pushwoosh/dumb-components": "^1.1.209",
|
|
29
|
-
"@pushwoosh/kit-constants": "^1.
|
|
29
|
+
"@pushwoosh/kit-constants": "^1.12.0",
|
|
30
30
|
"@pushwoosh/kit-helpers": "^4.12.0",
|
|
31
31
|
"@pushwoosh/kit-icons": "^2.2.3",
|
|
32
32
|
"@pushwoosh/kit-typography": "^1.7.6",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"react": "^16.14.0 || ^18.0.0",
|
|
56
56
|
"react-dom": "^16.14.0 || ^18.0.0"
|
|
57
57
|
},
|
|
58
|
-
"version": "1.3.
|
|
58
|
+
"version": "1.3.25"
|
|
59
59
|
}
|