@pushwoosh/dumb-components 1.1.150 → 1.1.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/Alert/maps.d.ts +2 -1
- package/FrequencyCapping/FrequencyCappingEdit.js +2 -1
- package/FrequencyCapping/FrequencyCappingInApps.js +2 -1
- package/FrequencyCapping/constants.d.ts +3 -5
- package/FrequencyCapping/constants.js +10 -4
- package/FrequencyCapping/polyglot/messages_en.js +3 -0
- package/FrequencyCapping/polyglot/messages_ru.js +3 -0
- package/FrequencyCapping/polyglot/types.d.ts +3 -0
- package/SendRate/SendRateEdit.js +2 -1
- package/SendRate/constants.d.ts +2 -1
- package/SendRate/constants.js +10 -4
- package/SendRate/polyglot/messages_en.js +3 -0
- package/SendRate/polyglot/messages_ru.js +3 -0
- package/SendRate/polyglot/types.d.ts +3 -0
- package/Tabs/context.d.ts +1 -2
- package/Tabs/context.js +2 -2
- package/Tooltip/maps.d.ts +2 -1
- package/package.json +2 -2
package/Alert/maps.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
1
2
|
import { Color } from '@pushwoosh/kit-constants';
|
|
2
3
|
import { type DangerTriangleIconProps, type InfoRoundIconProps, type WarningRoundIconProps } from '@pushwoosh/kit-icons';
|
|
3
4
|
import { type AlertType } from './types';
|
|
4
5
|
type AlertData = {
|
|
5
|
-
icon:
|
|
6
|
+
icon: FC<InfoRoundIconProps | WarningRoundIconProps | DangerTriangleIconProps>;
|
|
6
7
|
iconColor: Color;
|
|
7
8
|
bgColor: Color;
|
|
8
9
|
};
|
|
@@ -11,7 +11,7 @@ import { CappingTypes } from './types';
|
|
|
11
11
|
import { FieldBox } from '../FieldBox';
|
|
12
12
|
import { Link } from '../Link';
|
|
13
13
|
import { Select } from '../Select';
|
|
14
|
-
import {
|
|
14
|
+
import { getCappingOptions } from './constants';
|
|
15
15
|
import { useLang } from './polyglot';
|
|
16
16
|
import { Container, LinkWrapper } from './styles';
|
|
17
17
|
/**
|
|
@@ -31,6 +31,7 @@ export function FrequencyCappingEdit({
|
|
|
31
31
|
isDisabled = false
|
|
32
32
|
}) {
|
|
33
33
|
const lang = useLang();
|
|
34
|
+
const cappingOptions = getCappingOptions(lang);
|
|
34
35
|
const {
|
|
35
36
|
enabled,
|
|
36
37
|
messages,
|
|
@@ -11,7 +11,7 @@ import { CappingTypes } from './types';
|
|
|
11
11
|
import { FieldBox } from '../FieldBox';
|
|
12
12
|
import { Link } from '../Link';
|
|
13
13
|
import { Select } from '../Select';
|
|
14
|
-
import {
|
|
14
|
+
import { getCappingOptions } from './constants';
|
|
15
15
|
import { useLang } from './polyglot';
|
|
16
16
|
import { Container, LinkWrapper } from './styles';
|
|
17
17
|
/**
|
|
@@ -32,6 +32,7 @@ export function FrequencyCappingInApps(props) {
|
|
|
32
32
|
isDisabled = false
|
|
33
33
|
} = props;
|
|
34
34
|
const lang = useLang();
|
|
35
|
+
const cappingOptions = getCappingOptions(lang);
|
|
35
36
|
const {
|
|
36
37
|
enabled,
|
|
37
38
|
ignoreGlobalCapping
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
label: string;
|
|
5
|
-
}[];
|
|
1
|
+
import { type FrequencyCappingLang } from './polyglot';
|
|
2
|
+
import { type CappingOption } from './types';
|
|
3
|
+
export declare const getCappingOptions: (lang: FrequencyCappingLang) => CappingOption[];
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { CappingTypes } from './types';
|
|
2
|
-
export const
|
|
2
|
+
export const getCappingOptions = lang => [{
|
|
3
3
|
value: CappingTypes.GLOBAL,
|
|
4
|
-
label:
|
|
4
|
+
label: lang({
|
|
5
|
+
message: 'DUMB.FREQUENCY_CAPPING.OPTION.GLOBAL'
|
|
6
|
+
})
|
|
5
7
|
}, {
|
|
6
8
|
value: CappingTypes.IGNORE,
|
|
7
|
-
label:
|
|
9
|
+
label: lang({
|
|
10
|
+
message: 'DUMB.FREQUENCY_CAPPING.OPTION.IGNORE'
|
|
11
|
+
})
|
|
8
12
|
}, {
|
|
9
13
|
value: CappingTypes.CUSTOM,
|
|
10
|
-
label:
|
|
14
|
+
label: lang({
|
|
15
|
+
message: 'DUMB.FREQUENCY_CAPPING.OPTION.CUSTOM'
|
|
16
|
+
})
|
|
11
17
|
}];
|
|
@@ -2,6 +2,9 @@ export const messages = {
|
|
|
2
2
|
'DUMB.FREQUENCY_CAPPING.FIELD_TITLE': 'Frequency capping',
|
|
3
3
|
'DUMB.FREQUENCY_CAPPING.LINK.SET_UP': 'Set up',
|
|
4
4
|
'DUMB.FREQUENCY_CAPPING.LINK.SETTINGS': 'Settings',
|
|
5
|
+
'DUMB.FREQUENCY_CAPPING.OPTION.GLOBAL': 'Use global frequency capping settings',
|
|
6
|
+
'DUMB.FREQUENCY_CAPPING.OPTION.IGNORE': 'Send messages without global frequency capping',
|
|
7
|
+
'DUMB.FREQUENCY_CAPPING.OPTION.CUSTOM': 'Use custom frequency capping',
|
|
5
8
|
'DUMB.FREQUENCY_CAPPING.SETTINGS.LIMIT_TO_MAX': 'Limit to a maximum of',
|
|
6
9
|
'DUMB.FREQUENCY_CAPPING.SETTINGS.MESSAGES_PER': 'messages per',
|
|
7
10
|
'DUMB.FREQUENCY_CAPPING.SETTINGS.DAYS': 'day(s)',
|
|
@@ -2,6 +2,9 @@ export const messages = {
|
|
|
2
2
|
'DUMB.FREQUENCY_CAPPING.FIELD_TITLE': 'Ограничение частоты',
|
|
3
3
|
'DUMB.FREQUENCY_CAPPING.LINK.SET_UP': 'Настроить',
|
|
4
4
|
'DUMB.FREQUENCY_CAPPING.LINK.SETTINGS': 'Настройки',
|
|
5
|
+
'DUMB.FREQUENCY_CAPPING.OPTION.GLOBAL': 'Использовать глобальные настройки ограничения частоты',
|
|
6
|
+
'DUMB.FREQUENCY_CAPPING.OPTION.IGNORE': 'Отправлять сообщения без глобального ограничения частоты',
|
|
7
|
+
'DUMB.FREQUENCY_CAPPING.OPTION.CUSTOM': 'Использовать пользовательское ограничение частоты',
|
|
5
8
|
'DUMB.FREQUENCY_CAPPING.SETTINGS.LIMIT_TO_MAX': 'Не более',
|
|
6
9
|
'DUMB.FREQUENCY_CAPPING.SETTINGS.MESSAGES_PER': 'сообщений за',
|
|
7
10
|
'DUMB.FREQUENCY_CAPPING.SETTINGS.DAYS': 'дн.',
|
|
@@ -3,6 +3,9 @@ export type FrequencyCappingMessages = {
|
|
|
3
3
|
'DUMB.FREQUENCY_CAPPING.FIELD_TITLE': NoParams;
|
|
4
4
|
'DUMB.FREQUENCY_CAPPING.LINK.SET_UP': NoParams;
|
|
5
5
|
'DUMB.FREQUENCY_CAPPING.LINK.SETTINGS': NoParams;
|
|
6
|
+
'DUMB.FREQUENCY_CAPPING.OPTION.GLOBAL': NoParams;
|
|
7
|
+
'DUMB.FREQUENCY_CAPPING.OPTION.IGNORE': NoParams;
|
|
8
|
+
'DUMB.FREQUENCY_CAPPING.OPTION.CUSTOM': NoParams;
|
|
6
9
|
'DUMB.FREQUENCY_CAPPING.SETTINGS.LIMIT_TO_MAX': NoParams;
|
|
7
10
|
'DUMB.FREQUENCY_CAPPING.SETTINGS.MESSAGES_PER': NoParams;
|
|
8
11
|
'DUMB.FREQUENCY_CAPPING.SETTINGS.DAYS': NoParams;
|
package/SendRate/SendRateEdit.js
CHANGED
|
@@ -9,7 +9,7 @@ import { getGlobalSendRateLinkText } from './helpers/getGlobalSendRateLinkText';
|
|
|
9
9
|
import { FieldBox } from '../FieldBox';
|
|
10
10
|
import { Link } from '../Link';
|
|
11
11
|
import { Select } from '../Select';
|
|
12
|
-
import {
|
|
12
|
+
import { getSendRateOptions } from './constants';
|
|
13
13
|
import { useLang } from './polyglot';
|
|
14
14
|
import { Container, LinkWrapper } from './styles';
|
|
15
15
|
/**
|
|
@@ -29,6 +29,7 @@ export function SendRateEdit({
|
|
|
29
29
|
editGlobalClicked
|
|
30
30
|
}) {
|
|
31
31
|
const lang = useLang();
|
|
32
|
+
const sendRateOptions = getSendRateOptions(lang);
|
|
32
33
|
const {
|
|
33
34
|
sendRate: count,
|
|
34
35
|
policy
|
package/SendRate/constants.d.ts
CHANGED
package/SendRate/constants.js
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
export const
|
|
1
|
+
export const getSendRateOptions = lang => [{
|
|
2
2
|
value: 'GLOBAL',
|
|
3
|
-
label:
|
|
3
|
+
label: lang({
|
|
4
|
+
message: 'DUMB.SEND_RATE.OPTION.GLOBAL'
|
|
5
|
+
})
|
|
4
6
|
}, {
|
|
5
7
|
value: 'IGNORE',
|
|
6
|
-
label:
|
|
8
|
+
label: lang({
|
|
9
|
+
message: 'DUMB.SEND_RATE.OPTION.IGNORE'
|
|
10
|
+
})
|
|
7
11
|
}, {
|
|
8
12
|
value: 'CUSTOM',
|
|
9
|
-
label:
|
|
13
|
+
label: lang({
|
|
14
|
+
message: 'DUMB.SEND_RATE.OPTION.CUSTOM'
|
|
15
|
+
})
|
|
10
16
|
}];
|
|
@@ -2,6 +2,9 @@ export const messages = {
|
|
|
2
2
|
'DUMB.SEND_RATE.FIELD_TITLE': 'Send rate',
|
|
3
3
|
'DUMB.SEND_RATE.LINK.SET_UP': 'Set up',
|
|
4
4
|
'DUMB.SEND_RATE.LINK.SETTINGS': 'Settings',
|
|
5
|
+
'DUMB.SEND_RATE.OPTION.GLOBAL': 'Use global send rate settings',
|
|
6
|
+
'DUMB.SEND_RATE.OPTION.IGNORE': 'Send messages without global send rate',
|
|
7
|
+
'DUMB.SEND_RATE.OPTION.CUSTOM': 'Use custom send rate',
|
|
5
8
|
'DUMB.SEND_RATE.SETTINGS.LIMIT_TO_MAX': 'Limit to a maximum of',
|
|
6
9
|
'DUMB.SEND_RATE.SETTINGS.MESSAGES_PER_SEC': 'messages per 1 sec',
|
|
7
10
|
'DUMB.SEND_RATE.CHIP.UNLIMITED': 'unlimited',
|
|
@@ -2,6 +2,9 @@ export const messages = {
|
|
|
2
2
|
'DUMB.SEND_RATE.FIELD_TITLE': 'Скорость отправки',
|
|
3
3
|
'DUMB.SEND_RATE.LINK.SET_UP': 'Настроить',
|
|
4
4
|
'DUMB.SEND_RATE.LINK.SETTINGS': 'Настройки',
|
|
5
|
+
'DUMB.SEND_RATE.OPTION.GLOBAL': 'Использовать глобальные настройки скорости отправки',
|
|
6
|
+
'DUMB.SEND_RATE.OPTION.IGNORE': 'Отправлять сообщения без глобальной скорости отправки',
|
|
7
|
+
'DUMB.SEND_RATE.OPTION.CUSTOM': 'Использовать пользовательскую скорость отправки',
|
|
5
8
|
'DUMB.SEND_RATE.SETTINGS.LIMIT_TO_MAX': 'Не более',
|
|
6
9
|
'DUMB.SEND_RATE.SETTINGS.MESSAGES_PER_SEC': 'сообщений в секунду',
|
|
7
10
|
'DUMB.SEND_RATE.CHIP.UNLIMITED': 'без ограничений',
|
|
@@ -3,6 +3,9 @@ export type SendRateMessages = {
|
|
|
3
3
|
'DUMB.SEND_RATE.FIELD_TITLE': NoParams;
|
|
4
4
|
'DUMB.SEND_RATE.LINK.SET_UP': NoParams;
|
|
5
5
|
'DUMB.SEND_RATE.LINK.SETTINGS': NoParams;
|
|
6
|
+
'DUMB.SEND_RATE.OPTION.GLOBAL': NoParams;
|
|
7
|
+
'DUMB.SEND_RATE.OPTION.IGNORE': NoParams;
|
|
8
|
+
'DUMB.SEND_RATE.OPTION.CUSTOM': NoParams;
|
|
6
9
|
'DUMB.SEND_RATE.SETTINGS.LIMIT_TO_MAX': NoParams;
|
|
7
10
|
'DUMB.SEND_RATE.SETTINGS.MESSAGES_PER_SEC': NoParams;
|
|
8
11
|
'DUMB.SEND_RATE.CHIP.UNLIMITED': NoParams;
|
package/Tabs/context.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { TabContextType } from './types';
|
|
3
|
-
export declare const TabContext:
|
|
2
|
+
export declare const TabContext: import("react").Context<TabContextType>;
|
|
4
3
|
export declare function useTabsContext(): TabContextType;
|
package/Tabs/context.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
export const TabContext =
|
|
1
|
+
import { useContext, createContext } from 'react';
|
|
2
|
+
export const TabContext = createContext(null);
|
|
3
3
|
export function useTabsContext() {
|
|
4
4
|
const context = useContext(TabContext);
|
|
5
5
|
if (!context) {
|
package/Tooltip/maps.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
1
2
|
import { Color } from '@pushwoosh/kit-constants';
|
|
2
3
|
import { type TooltipTriggerView } from './TooltipTrigger';
|
|
3
4
|
import type { TooltipPosition } from './types';
|
|
@@ -38,7 +39,7 @@ export declare function getLeftPosition(position: TooltipPosition, offset: strin
|
|
|
38
39
|
export declare const TooltipTriggerViewMap: Record<TooltipTriggerView, {
|
|
39
40
|
color: Color;
|
|
40
41
|
hoverColor: Color;
|
|
41
|
-
icon:
|
|
42
|
+
icon: FC<{
|
|
42
43
|
size: 'small' | 'medium';
|
|
43
44
|
view: 'lined' | 'filled' | 'shaded';
|
|
44
45
|
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pushwoosh/dumb-components",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.152",
|
|
4
4
|
"description": "React components to build Pushwoosh products",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"npm": ">= 7"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@pushwoosh/frontend-builder-engine": "^2.1.
|
|
24
|
+
"@pushwoosh/frontend-builder-engine": "^2.1.1",
|
|
25
25
|
"@svgr/webpack": "^8.1.0",
|
|
26
26
|
"@testing-library/jest-dom": "^6.9.1",
|
|
27
27
|
"@testing-library/react": "^16.3.0",
|