@pushwoosh/dumb-components 1.1.33 → 1.1.35
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/FrequencyCapping/FrequencyCappingEdit.d.ts +1 -1
- package/FrequencyCapping/FrequencyCappingEdit.js +4 -2
- package/FrequencyCapping/FrequencyCappingReadonly.d.ts +1 -1
- package/FrequencyCapping/FrequencyCappingReadonly.js +4 -2
- package/FrequencyCapping/types.d.ts +2 -0
- package/SendRate/SendRateEdit.d.ts +2 -13
- package/SendRate/SendRateEdit.js +4 -2
- package/SendRate/SendRateReadonly.d.ts +2 -10
- package/SendRate/SendRateReadonly.js +4 -2
- package/SendRate/index.d.ts +3 -2
- package/SendRate/types.d.ts +21 -0
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type CappingBase, type FrequencyCappingEditProps } from './types';
|
|
3
|
-
export declare function FrequencyCappingEdit<T extends CappingBase>({ capping, globalCapping, onChange, applicationCode }: FrequencyCappingEditProps<T>): React.JSX.Element;
|
|
3
|
+
export declare function FrequencyCappingEdit<T extends CappingBase>({ capping, globalCapping, onChange, applicationCode, editGlobalClicked, }: FrequencyCappingEditProps<T>): React.JSX.Element;
|
|
@@ -14,7 +14,8 @@ export function FrequencyCappingEdit({
|
|
|
14
14
|
capping,
|
|
15
15
|
globalCapping,
|
|
16
16
|
onChange,
|
|
17
|
-
applicationCode
|
|
17
|
+
applicationCode,
|
|
18
|
+
editGlobalClicked
|
|
18
19
|
}) {
|
|
19
20
|
const {
|
|
20
21
|
enabled,
|
|
@@ -78,7 +79,8 @@ export function FrequencyCappingEdit({
|
|
|
78
79
|
}, cappingOption === CappingTypes.GLOBAL && React.createElement(Link, {
|
|
79
80
|
href: `/applications/${applicationCode}/message-delivery-settings?tab=capping`,
|
|
80
81
|
title: globalCappingLinkText,
|
|
81
|
-
target: "_blank"
|
|
82
|
+
target: "_blank",
|
|
83
|
+
onClick: editGlobalClicked
|
|
82
84
|
}, React.createElement(LinkWrapper, null, globalCappingLinkText, React.createElement(OpenIcon, {
|
|
83
85
|
size: "small",
|
|
84
86
|
view: "lined",
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type CappingBase, type FrequencyCappingReadonlyProps } from './types';
|
|
3
|
-
export declare function FrequencyCappingReadonly<T extends CappingBase>({ capping, globalCapping, applicationCode }: FrequencyCappingReadonlyProps<T>): React.JSX.Element;
|
|
3
|
+
export declare function FrequencyCappingReadonly<T extends CappingBase>({ capping, globalCapping, applicationCode, editGlobalClicked, }: FrequencyCappingReadonlyProps<T>): React.JSX.Element;
|
|
@@ -8,7 +8,8 @@ import { CappingTypes } from './types';
|
|
|
8
8
|
export function FrequencyCappingReadonly({
|
|
9
9
|
capping,
|
|
10
10
|
globalCapping,
|
|
11
|
-
applicationCode
|
|
11
|
+
applicationCode,
|
|
12
|
+
editGlobalClicked
|
|
12
13
|
}) {
|
|
13
14
|
const cappingOption = getCappingOption(capping === null || capping === void 0 ? void 0 : capping.enabled, capping === null || capping === void 0 ? void 0 : capping.ignoreGlobalCapping);
|
|
14
15
|
const isGlobalCappingDisabled = globalCapping.count === 0 && globalCapping.days === 0;
|
|
@@ -24,7 +25,8 @@ export function FrequencyCappingReadonly({
|
|
|
24
25
|
}, checkIcon, label, cappingOption === CappingTypes.GLOBAL && React.createElement(Link, {
|
|
25
26
|
href: `/applications/${applicationCode}/message-delivery-settings?tab=capping`,
|
|
26
27
|
title: globalCappingLinkText,
|
|
27
|
-
target: "_blank"
|
|
28
|
+
target: "_blank",
|
|
29
|
+
onClick: editGlobalClicked
|
|
28
30
|
}, React.createElement(Horizontal, {
|
|
29
31
|
"$gap": 4,
|
|
30
32
|
"$justifyContent": "start",
|
|
@@ -20,6 +20,7 @@ export type FrequencyCappingEditProps<T extends CappingBase> = {
|
|
|
20
20
|
days: number;
|
|
21
21
|
};
|
|
22
22
|
onChange: (newCappingState: T) => void;
|
|
23
|
+
editGlobalClicked: () => void;
|
|
23
24
|
applicationCode: string;
|
|
24
25
|
};
|
|
25
26
|
export type FrequencyCappingReadonlyProps<T extends CappingBase> = {
|
|
@@ -29,4 +30,5 @@ export type FrequencyCappingReadonlyProps<T extends CappingBase> = {
|
|
|
29
30
|
days: number;
|
|
30
31
|
};
|
|
31
32
|
applicationCode: string;
|
|
33
|
+
editGlobalClicked: () => void;
|
|
32
34
|
};
|
|
@@ -1,14 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type SendRateBase } from './types';
|
|
3
|
-
export
|
|
4
|
-
sendRate: T;
|
|
5
|
-
globalSendRate: {
|
|
6
|
-
count: number;
|
|
7
|
-
seconds: number;
|
|
8
|
-
};
|
|
9
|
-
onChange: (newSendRateState: T) => void;
|
|
10
|
-
applicationCode: string;
|
|
11
|
-
minValue: number;
|
|
12
|
-
maxValue: number;
|
|
13
|
-
};
|
|
14
|
-
export declare function SendRateEdit<T extends SendRateBase>({ sendRate, globalSendRate, onChange, applicationCode, minValue, maxValue }: SendRateEditProps<T>): React.JSX.Element;
|
|
2
|
+
import { type SendRateEditProps, type SendRateBase } from './types';
|
|
3
|
+
export declare function SendRateEdit<T extends SendRateBase>({ sendRate, globalSendRate, onChange, applicationCode, minValue, maxValue, editGlobalClicked, }: SendRateEditProps<T>): React.JSX.Element;
|
package/SendRate/SendRateEdit.js
CHANGED
|
@@ -15,7 +15,8 @@ export function SendRateEdit({
|
|
|
15
15
|
onChange,
|
|
16
16
|
applicationCode,
|
|
17
17
|
minValue,
|
|
18
|
-
maxValue
|
|
18
|
+
maxValue,
|
|
19
|
+
editGlobalClicked
|
|
19
20
|
}) {
|
|
20
21
|
const {
|
|
21
22
|
sendRate: count,
|
|
@@ -64,7 +65,8 @@ export function SendRateEdit({
|
|
|
64
65
|
}, policy === 'GLOBAL' && React.createElement(Link, {
|
|
65
66
|
href: `/applications/${applicationCode}/message-delivery-settings?tab=sendRate`,
|
|
66
67
|
title: globalSendRateLinkText,
|
|
67
|
-
target: "_blank"
|
|
68
|
+
target: "_blank",
|
|
69
|
+
onClick: editGlobalClicked
|
|
68
70
|
}, React.createElement(LinkWrapper, null, globalSendRateLinkText, React.createElement(OpenIcon, {
|
|
69
71
|
size: "small",
|
|
70
72
|
view: "lined",
|
|
@@ -1,11 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type SendRateBase } from './types';
|
|
3
|
-
export
|
|
4
|
-
sendRate: T;
|
|
5
|
-
globalSendRate: {
|
|
6
|
-
count: number;
|
|
7
|
-
seconds: number;
|
|
8
|
-
};
|
|
9
|
-
applicationCode: string;
|
|
10
|
-
};
|
|
11
|
-
export declare function SendRateReadonly<T extends SendRateBase>({ sendRate, globalSendRate, applicationCode }: SendRateReadonlyProps<T>): React.JSX.Element;
|
|
2
|
+
import { type SendRateReadonlyProps, type SendRateBase } from './types';
|
|
3
|
+
export declare function SendRateReadonly<T extends SendRateBase>({ sendRate, globalSendRate, applicationCode, editGlobalClicked }: SendRateReadonlyProps<T>): React.JSX.Element;
|
|
@@ -6,7 +6,8 @@ import { getReadonlySendRateIcon, getReadonlySendRateLabel } from './helpers/get
|
|
|
6
6
|
export function SendRateReadonly({
|
|
7
7
|
sendRate,
|
|
8
8
|
globalSendRate,
|
|
9
|
-
applicationCode
|
|
9
|
+
applicationCode,
|
|
10
|
+
editGlobalClicked
|
|
10
11
|
}) {
|
|
11
12
|
const {
|
|
12
13
|
policy
|
|
@@ -24,7 +25,8 @@ export function SendRateReadonly({
|
|
|
24
25
|
}, checkIcon, label, policy === 'GLOBAL' && React.createElement(Link, {
|
|
25
26
|
href: `/applications/${applicationCode}/message-delivery-settings?tab=sendRate`,
|
|
26
27
|
title: globalSendRateLinkText,
|
|
27
|
-
target: "_blank"
|
|
28
|
+
target: "_blank",
|
|
29
|
+
onClick: editGlobalClicked
|
|
28
30
|
}, React.createElement(Horizontal, {
|
|
29
31
|
"$gap": 4,
|
|
30
32
|
"$justifyContent": "start",
|
package/SendRate/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export { SendRateEdit
|
|
2
|
-
export { SendRateReadonly
|
|
1
|
+
export { SendRateEdit } from './SendRateEdit';
|
|
2
|
+
export { SendRateReadonly } from './SendRateReadonly';
|
|
3
|
+
export type { SendRateBase, SendRateEditProps, SendRateReadonlyProps } from './types';
|
package/SendRate/types.d.ts
CHANGED
|
@@ -7,3 +7,24 @@ export type SendRateOption = {
|
|
|
7
7
|
label: string;
|
|
8
8
|
value: SendRatePolicy;
|
|
9
9
|
};
|
|
10
|
+
export type SendRateEditProps<T extends SendRateBase> = {
|
|
11
|
+
sendRate: T;
|
|
12
|
+
globalSendRate: {
|
|
13
|
+
count: number;
|
|
14
|
+
seconds: number;
|
|
15
|
+
};
|
|
16
|
+
onChange: (newSendRateState: T) => void;
|
|
17
|
+
editGlobalClicked: () => void;
|
|
18
|
+
applicationCode: string;
|
|
19
|
+
minValue: number;
|
|
20
|
+
maxValue: number;
|
|
21
|
+
};
|
|
22
|
+
export type SendRateReadonlyProps<T extends SendRateBase> = {
|
|
23
|
+
sendRate: T;
|
|
24
|
+
globalSendRate: {
|
|
25
|
+
count: number;
|
|
26
|
+
seconds: number;
|
|
27
|
+
};
|
|
28
|
+
applicationCode: string;
|
|
29
|
+
editGlobalClicked: () => void;
|
|
30
|
+
};
|