@pushwoosh/smart-components-kit 1.0.22 → 1.0.24
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/CampaignsConfigurationDrawer/CampaignsConfigurationDrawer.js +6 -5
- package/CampaignsConfigurationDrawer/types.d.ts +1 -0
- package/DynamicContentPickerForm/SimpleDynamicContentPickerFormSmart.js +3 -3
- package/DynamicContentPickerForm/VariedDynamicContentPickerFormSmart.js +3 -3
- package/DynamicContentPickerForm/styled.d.ts +62 -1
- package/DynamicContentPickerForm/styled.js +10 -5
- package/package.json +2 -2
|
@@ -10,6 +10,7 @@ export function CampaignsConfigurationDrawer(props) {
|
|
|
10
10
|
applicationCode,
|
|
11
11
|
segmentCode,
|
|
12
12
|
isOpen,
|
|
13
|
+
segmentTitle = '',
|
|
13
14
|
onClose
|
|
14
15
|
} = props;
|
|
15
16
|
return React.createElement(Drawer, {
|
|
@@ -47,26 +48,26 @@ export function CampaignsConfigurationDrawer(props) {
|
|
|
47
48
|
title: "Push notification based",
|
|
48
49
|
description: "Create a targeted campaign for users and plan follow-up for unopened messages.",
|
|
49
50
|
icon: PushIcon,
|
|
50
|
-
href: `/journeys/${applicationCode}/create?channel=push&segment=${segmentCode}`
|
|
51
|
+
href: `/journeys/${applicationCode}/create?channel=push&segment=${segmentCode}&segment_title=${segmentTitle}`
|
|
51
52
|
}), React.createElement(Card, {
|
|
52
53
|
title: "Email campaign",
|
|
53
54
|
description: "Create tailored communication strategies with follow-ups based on user actions.",
|
|
54
55
|
icon: EmailIcon,
|
|
55
|
-
href: `/journeys/${applicationCode}/create?channel=email&segment=${segmentCode}`
|
|
56
|
+
href: `/journeys/${applicationCode}/create?channel=email&segment=${segmentCode}&segment_title=${segmentTitle}`
|
|
56
57
|
}), React.createElement(Card, {
|
|
57
58
|
title: "In-app campaign",
|
|
58
59
|
description: "Display the banner to the intended users and monitor their subsequent actions.",
|
|
59
60
|
icon: MobileIcon,
|
|
60
|
-
href: `/journeys/${applicationCode}/create?channel=inapp&segment=${segmentCode}`
|
|
61
|
+
href: `/journeys/${applicationCode}/create?channel=inapp&segment=${segmentCode}&segment_title=${segmentTitle}`
|
|
61
62
|
}), React.createElement(Card, {
|
|
62
63
|
title: "SMS campaign",
|
|
63
64
|
description: "Automate SMS delivery for quick, reliable messaging.",
|
|
64
65
|
icon: SmsIcon,
|
|
65
|
-
href: `/journeys/${applicationCode}/create?channel=sms&segment=${segmentCode}`
|
|
66
|
+
href: `/journeys/${applicationCode}/create?channel=sms&segment=${segmentCode}&segment_title=${segmentTitle}`
|
|
66
67
|
}), React.createElement(Card, {
|
|
67
68
|
title: "WhatsApp campaign",
|
|
68
69
|
description: "Engage your audience on WhatsApp with rich, personalized messages.",
|
|
69
70
|
icon: WhatsappIcon,
|
|
70
|
-
href: `/journeys/${applicationCode}/create?channel=whatsapp&segment=${segmentCode}`
|
|
71
|
+
href: `/journeys/${applicationCode}/create?channel=whatsapp&segment=${segmentCode}&segment_title=${segmentTitle}`
|
|
71
72
|
}))))));
|
|
72
73
|
}
|
|
@@ -2,7 +2,7 @@ import React, { useEffect } from 'react';
|
|
|
2
2
|
import { FieldBox, NativeInput, Select, Spinner } from '@pushwoosh/dumb-components';
|
|
3
3
|
import { Horizontal, Vertical } from '@pushwoosh/kit-helpers';
|
|
4
4
|
import { useDynamicContentTags } from './hooks';
|
|
5
|
-
import {
|
|
5
|
+
import { SimpleTagPickerDiv } from './styled';
|
|
6
6
|
const defaultDynamicContent = {
|
|
7
7
|
tagName: '',
|
|
8
8
|
modifier: 'regular',
|
|
@@ -21,7 +21,7 @@ export const SimpleDynamicContentPickerFormSmart = ({
|
|
|
21
21
|
}
|
|
22
22
|
}, [asyncResult.loading, update]);
|
|
23
23
|
if (asyncResult.loading) {
|
|
24
|
-
return React.createElement(
|
|
24
|
+
return React.createElement(SimpleTagPickerDiv, null, React.createElement(Horizontal, {
|
|
25
25
|
"$placeItems": "center",
|
|
26
26
|
"$padding": 36
|
|
27
27
|
}, React.createElement(Spinner, {
|
|
@@ -33,7 +33,7 @@ export const SimpleDynamicContentPickerFormSmart = ({
|
|
|
33
33
|
name: '',
|
|
34
34
|
modifiers: ['regular']
|
|
35
35
|
};
|
|
36
|
-
return React.createElement(
|
|
36
|
+
return React.createElement(SimpleTagPickerDiv, null, React.createElement(FieldBox, {
|
|
37
37
|
title: "Tag"
|
|
38
38
|
}, React.createElement(Vertical, {
|
|
39
39
|
"$gap": 8
|
|
@@ -5,7 +5,7 @@ import { DynamicContentCustomPickerForm } from './DynamicContentCustomPickerForm
|
|
|
5
5
|
import { DynamicContentEventPickerForm } from './DynamicContentEventPickerForm';
|
|
6
6
|
import { DynamicContentTagPickerForm } from './DynamicContentTagPickerForm';
|
|
7
7
|
import { useVariedDynamicContentTags } from './hooks';
|
|
8
|
-
import {
|
|
8
|
+
import { VariedTagPickerDiv } from './styled';
|
|
9
9
|
import { createDefaultDynamicContent } from './utils';
|
|
10
10
|
const defaultVariedDynamicContent = {
|
|
11
11
|
kind: 'tag',
|
|
@@ -39,7 +39,7 @@ export const VariedDynamicContentPickerFormSmart = ({
|
|
|
39
39
|
update();
|
|
40
40
|
}, [asyncResult.loading, update]);
|
|
41
41
|
if (asyncResult.loading) {
|
|
42
|
-
return React.createElement(
|
|
42
|
+
return React.createElement(VariedTagPickerDiv, null, React.createElement(Horizontal, {
|
|
43
43
|
"$placeItems": "center",
|
|
44
44
|
"$padding": 36
|
|
45
45
|
}, React.createElement(Spinner, {
|
|
@@ -47,7 +47,7 @@ export const VariedDynamicContentPickerFormSmart = ({
|
|
|
47
47
|
})));
|
|
48
48
|
}
|
|
49
49
|
const isValidDc = vdc.kind === 'tag' && vdc.dc.tagName !== '' && vdc.dc.modifier !== '' || vdc.kind === 'event' && vdc.dc.eventName !== '' && vdc.dc.attribute !== '' || vdc.kind === 'customText' && vdc.dc.text !== '';
|
|
50
|
-
return React.createElement(
|
|
50
|
+
return React.createElement(VariedTagPickerDiv, null, React.createElement(Vertical, {
|
|
51
51
|
"$gap": 8
|
|
52
52
|
}, React.createElement(FieldBox, {
|
|
53
53
|
title: "Variable Type"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Color, Shadow, ShapeRadius } from '@pushwoosh/kit-constants';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const SimpleTagPickerDiv: import("styled-components").StyledComponent<"div", any, {
|
|
3
3
|
$alignContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
|
|
4
4
|
$alignItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
|
|
5
5
|
$bgColor?: string | undefined;
|
|
@@ -58,6 +58,67 @@ export declare const TagPickerDiv: import("styled-components").StyledComponent<"
|
|
|
58
58
|
$gap: number;
|
|
59
59
|
$padding: number;
|
|
60
60
|
$borderRadius: ShapeRadius;
|
|
61
|
+
}, "$gridAutoFlow" | "$borderRadius" | "$gap" | "$padding">;
|
|
62
|
+
export declare const VariedTagPickerDiv: import("styled-components").StyledComponent<"div", any, {
|
|
63
|
+
$alignContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
|
|
64
|
+
$alignItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
|
|
65
|
+
$bgColor?: string | undefined;
|
|
66
|
+
$border?: string | ({
|
|
67
|
+
top?: string | undefined;
|
|
68
|
+
right?: string | undefined;
|
|
69
|
+
bottom?: string | undefined;
|
|
70
|
+
left?: string | undefined;
|
|
71
|
+
} | {
|
|
72
|
+
horizontal: string;
|
|
73
|
+
top?: string | undefined;
|
|
74
|
+
bottom?: string | undefined;
|
|
75
|
+
} | {
|
|
76
|
+
vertical: string;
|
|
77
|
+
right?: string | undefined;
|
|
78
|
+
left?: string | undefined;
|
|
79
|
+
}) | undefined;
|
|
80
|
+
$borderRadius?: (string | number) | undefined;
|
|
81
|
+
$boxShadow?: string | undefined;
|
|
82
|
+
$gap?: (string | number) | undefined;
|
|
83
|
+
$gridAutoFlow?: "row" | "column" | "dense" | "row dense" | "column dense" | undefined;
|
|
84
|
+
$justifyContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
|
|
85
|
+
$justifyItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
|
|
86
|
+
$margin?: (string | number) | ({
|
|
87
|
+
top?: (string | number) | undefined;
|
|
88
|
+
right?: (string | number) | undefined;
|
|
89
|
+
bottom?: (string | number) | undefined;
|
|
90
|
+
left?: (string | number) | undefined;
|
|
91
|
+
} | {
|
|
92
|
+
horizontal: string | number;
|
|
93
|
+
top?: (string | number) | undefined;
|
|
94
|
+
bottom?: (string | number) | undefined;
|
|
95
|
+
} | {
|
|
96
|
+
vertical: string | number;
|
|
97
|
+
right?: (string | number) | undefined;
|
|
98
|
+
left?: (string | number) | undefined;
|
|
99
|
+
}) | undefined;
|
|
100
|
+
$padding?: (string | number) | ({
|
|
101
|
+
top?: (string | number) | undefined;
|
|
102
|
+
right?: (string | number) | undefined;
|
|
103
|
+
bottom?: (string | number) | undefined;
|
|
104
|
+
left?: (string | number) | undefined;
|
|
105
|
+
} | {
|
|
106
|
+
horizontal: string | number;
|
|
107
|
+
top?: (string | number) | undefined;
|
|
108
|
+
bottom?: (string | number) | undefined;
|
|
109
|
+
} | {
|
|
110
|
+
vertical: string | number;
|
|
111
|
+
right?: (string | number) | undefined;
|
|
112
|
+
left?: (string | number) | undefined;
|
|
113
|
+
}) | undefined;
|
|
114
|
+
$placeItems?: "end" | "start" | "center" | "stretch" | undefined;
|
|
115
|
+
} & {
|
|
116
|
+
$gridAutoFlow: string;
|
|
117
|
+
} & {
|
|
118
|
+
$gap: number;
|
|
119
|
+
$padding: number;
|
|
120
|
+
$borderRadius: ShapeRadius;
|
|
121
|
+
} & {
|
|
61
122
|
$border: string;
|
|
62
123
|
$bgColor: Color;
|
|
63
124
|
$boxShadow: Shadow;
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
import { Color, Shadow, ShapeRadius } from '@pushwoosh/kit-constants';
|
|
3
3
|
import { Vertical } from '@pushwoosh/kit-helpers';
|
|
4
|
-
export const
|
|
4
|
+
export const SimpleTagPickerDiv = styled(Vertical).attrs({
|
|
5
5
|
$gap: 16,
|
|
6
6
|
$padding: 16,
|
|
7
|
-
$borderRadius: ShapeRadius.CONTROL
|
|
7
|
+
$borderRadius: ShapeRadius.CONTROL
|
|
8
|
+
}).withConfig({
|
|
9
|
+
displayName: "SimpleTagPickerDiv",
|
|
10
|
+
componentId: "sc-17kpm8h-0"
|
|
11
|
+
})(["width:240px;"]);
|
|
12
|
+
export const VariedTagPickerDiv = styled(SimpleTagPickerDiv).attrs({
|
|
8
13
|
$border: `1px solid ${Color.FORM}`,
|
|
9
14
|
$bgColor: Color.FROZEN,
|
|
10
15
|
$boxShadow: Shadow.REGULAR
|
|
11
16
|
}).withConfig({
|
|
12
|
-
displayName: "
|
|
13
|
-
componentId: "sc-17kpm8h-
|
|
14
|
-
})(["
|
|
17
|
+
displayName: "VariedTagPickerDiv",
|
|
18
|
+
componentId: "sc-17kpm8h-1"
|
|
19
|
+
})([""]);
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@emoji-mart/react": "^1.1.1",
|
|
20
20
|
"@floating-ui/react-dom": "^2.1.2",
|
|
21
|
-
"@pushwoosh/dumb-components": "^1.
|
|
21
|
+
"@pushwoosh/dumb-components": "^1.1.2",
|
|
22
22
|
"@pushwoosh/kit-constants": "^1.6.9",
|
|
23
23
|
"@pushwoosh/kit-helpers": "^4.8.1",
|
|
24
24
|
"@pushwoosh/kit-icons": "^2.1.2",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"engines": {
|
|
51
51
|
"node": ">= 18"
|
|
52
52
|
},
|
|
53
|
-
"version": "1.0.
|
|
53
|
+
"version": "1.0.24"
|
|
54
54
|
}
|