@pushwoosh/smart-components-kit 1.0.13 → 1.0.14

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.
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { type CampaignsConfigurationDrawerProps } from './types';
3
+ export declare function CampaignsConfigurationDrawer(props: CampaignsConfigurationDrawerProps): React.JSX.Element;
@@ -0,0 +1,72 @@
1
+ import React from 'react';
2
+ import { Drawer, DrawerBody, DrawerHeader } from '@pushwoosh/dumb-components';
3
+ import { Columns, Horizontal, Vertical } from '@pushwoosh/kit-helpers';
4
+ import { CloseIcon, EmailIcon, MobileIcon, PushIcon, SmsIcon, WhatsappIcon } from '@pushwoosh/kit-icons';
5
+ import { H1, H3 } from '@pushwoosh/kit-typography';
6
+ import { Card } from './components/Card';
7
+ import { CloseButtonWrap } from './styled';
8
+ export function CampaignsConfigurationDrawer(props) {
9
+ const {
10
+ applicationCode,
11
+ segmentCode,
12
+ isOpen,
13
+ onClose
14
+ } = props;
15
+ return React.createElement(Drawer, {
16
+ size: "medium",
17
+ isOpen: isOpen,
18
+ onClose: onClose
19
+ }, React.createElement(DrawerHeader, null, React.createElement(Horizontal, {
20
+ "$justifyContent": "space-between",
21
+ "$alignItems": "center",
22
+ "$margin": "0 0 4px"
23
+ }, React.createElement(H1, null, "Send message"), React.createElement(CloseButtonWrap, {
24
+ onClick: onClose
25
+ }, React.createElement(CloseIcon, {
26
+ size: "medium"
27
+ })))), React.createElement(DrawerBody, null, React.createElement(Vertical, {
28
+ "$gap": "32px"
29
+ }, React.createElement(Horizontal, {
30
+ "$gap": "6px"
31
+ }, React.createElement(Card, {
32
+ title: "One-time push notification",
33
+ description: "Select or create content, adjust notifications, and choose the best time to send.",
34
+ icon: PushIcon,
35
+ href: `/applications/${applicationCode}/one-time-messages/send?type=push&segment=${segmentCode}`
36
+ }), React.createElement(Card, {
37
+ title: "One-time email",
38
+ description: "Select content, set a subject, personalize sender info, and choose a send time.",
39
+ icon: EmailIcon,
40
+ href: `/applications/${applicationCode}/one-time-messages/send?type=email&segment=${segmentCode}`
41
+ })), React.createElement(Vertical, {
42
+ "$gap": "8px"
43
+ }, React.createElement(H3, null, "Advanced campaign based by channel"), React.createElement(Columns, {
44
+ "$sizes": "1fr 1fr",
45
+ "$gap": "6px"
46
+ }, React.createElement(Card, {
47
+ title: "Push notification based",
48
+ description: "Create a targeted campaign for users and plan follow-up for unopened messages.",
49
+ icon: PushIcon,
50
+ href: `/journeys/${applicationCode}/create?channel=push&segment=${segmentCode}`
51
+ }), React.createElement(Card, {
52
+ title: "Email based",
53
+ description: "Create tailored communication strategies with follow-ups based on user actions.",
54
+ icon: EmailIcon,
55
+ href: `/journeys/${applicationCode}/create?channel=email&segment=${segmentCode}`
56
+ }), React.createElement(Card, {
57
+ title: "In-app based",
58
+ description: "Display the banner to the intended users and monitor their subsequent actions.",
59
+ icon: MobileIcon,
60
+ href: `/journeys/${applicationCode}/create?channel=inapp&segment=${segmentCode}`
61
+ }), React.createElement(Card, {
62
+ title: "SMS based",
63
+ description: "Automate SMS delivery for quick, reliable messaging.",
64
+ icon: SmsIcon,
65
+ href: `/journeys/${applicationCode}/create?channel=sms&segment=${segmentCode}`
66
+ }), React.createElement(Card, {
67
+ title: "WhatsApp based",
68
+ description: "Engage your audience on WhatsApp with rich, personalized messages.",
69
+ icon: WhatsappIcon,
70
+ href: `/journeys/${applicationCode}/create?channel=whatsapp&segment=${segmentCode}`
71
+ }))))));
72
+ }
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { type CardProps } from './types';
3
+ export declare function Card(props: CardProps): React.JSX.Element;
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ import { Color } from '@pushwoosh/kit-constants';
3
+ import { Text } from '@pushwoosh/kit-typography';
4
+ import { Container, IconWrap, Title } from './styled';
5
+ export function Card(props) {
6
+ const {
7
+ title,
8
+ description,
9
+ icon: Icon,
10
+ href
11
+ } = props;
12
+ return React.createElement(Container, {
13
+ href: href
14
+ }, React.createElement(IconWrap, null, React.createElement(Icon, {
15
+ color: Color.PRIMARY,
16
+ size: "medium",
17
+ view: "lined",
18
+ type: "mobile",
19
+ direction: "right"
20
+ })), React.createElement(Title, null, title), React.createElement(Text, {
21
+ "$variant": "footnote",
22
+ "$color": Color.LOCKED
23
+ }, description));
24
+ }
@@ -0,0 +1 @@
1
+ export { Card } from './Card';
@@ -0,0 +1 @@
1
+ export { Card } from './Card';
@@ -0,0 +1,4 @@
1
+ import { H4 } from '@pushwoosh/kit-typography';
2
+ export declare const Container: import("styled-components").StyledComponent<"a", any, {}, never>;
3
+ export declare const IconWrap: import("styled-components").StyledComponent<"div", any, {}, never>;
4
+ export declare const Title: import("styled-components").StyledComponent<typeof H4, any, {}, never>;
@@ -0,0 +1,15 @@
1
+ import styled from 'styled-components';
2
+ import { Color, ShapeRadius, Shadow } from '@pushwoosh/kit-constants';
3
+ import { H4 } from '@pushwoosh/kit-typography';
4
+ export const Container = styled.a.withConfig({
5
+ displayName: "Container",
6
+ componentId: "sc-l13y9a-0"
7
+ })(["text-decoration:none;border:1px solid ", ";border-radius:", ";padding:16px;background-color:", ";box-shadow:none;min-width:250px;cursor:pointer;transition:box-shadow 0.15s ease-in;&:hover{box-shadow:", ";text-decoration:none;}&:active{box-shadow:none;opacity:0.5;text-decoration:none;}"], Color.DIVIDER, ShapeRadius.SECTION, Color.CLEAR, Shadow.LARGE);
8
+ export const IconWrap = styled.div.withConfig({
9
+ displayName: "IconWrap",
10
+ componentId: "sc-l13y9a-1"
11
+ })(["padding:4px;border-radius:", ";background-color:", ";margin-bottom:8px;width:fit-content;"], ShapeRadius.CONTROL, Color.BRIGHT_LIGHT);
12
+ export const Title = styled(H4).withConfig({
13
+ displayName: "Title",
14
+ componentId: "sc-l13y9a-2"
15
+ })(["margin-bottom:2px;color:", ";"], Color.MAIN);
@@ -0,0 +1,13 @@
1
+ import { type ComponentType } from 'react';
2
+ export type CardProps = {
3
+ title: string;
4
+ description: string;
5
+ icon: ComponentType<{
6
+ color?: string;
7
+ size: 'small' | 'medium';
8
+ view: 'lined' | 'filled';
9
+ type: 'desktop' | 'mobile' | 'web' | 'email';
10
+ direction: 'down' | 'left' | 'right' | 'up';
11
+ }>;
12
+ href: string;
13
+ };
@@ -0,0 +1 @@
1
+ export { CampaignsConfigurationDrawer } from './CampaignsConfigurationDrawer';
@@ -0,0 +1 @@
1
+ export { CampaignsConfigurationDrawer } from './CampaignsConfigurationDrawer';
@@ -0,0 +1 @@
1
+ export declare const CloseButtonWrap: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -0,0 +1,6 @@
1
+ import styled from 'styled-components';
2
+ import { Color, ShapeRadius } from '@pushwoosh/kit-constants';
3
+ export const CloseButtonWrap = styled.div.withConfig({
4
+ displayName: "CloseButtonWrap",
5
+ componentId: "sc-1kf0icq-0"
6
+ })(["padding:6px;cursor:pointer;border-radius:", ";background-color:transparent;&:hover{background-color:", ";color:", ";}"], ShapeRadius.CONTROL, Color.BRIGHT_LIGHT, Color.PRIMARY_HOVER);
@@ -0,0 +1,6 @@
1
+ export type CampaignsConfigurationDrawerProps = {
2
+ isOpen: boolean;
3
+ applicationCode: string;
4
+ segmentCode: string;
5
+ onClose: () => void;
6
+ };
@@ -0,0 +1 @@
1
+ export {};
package/index.d.ts CHANGED
@@ -4,3 +4,4 @@ export * from './DynamicContentPicker';
4
4
  export * from './PlatformsConfigurationDrawer';
5
5
  export * from './LanguagesSelector';
6
6
  export * from './RichMessageEditorSmart';
7
+ export * from './CampaignsConfigurationDrawer';
package/index.js CHANGED
@@ -3,4 +3,5 @@ export * from './context';
3
3
  export * from './DynamicContentPicker';
4
4
  export * from './PlatformsConfigurationDrawer';
5
5
  export * from './LanguagesSelector';
6
- export * from './RichMessageEditorSmart';
6
+ export * from './RichMessageEditorSmart';
7
+ export * from './CampaignsConfigurationDrawer';
package/package.json CHANGED
@@ -49,5 +49,5 @@
49
49
  "engines": {
50
50
  "node": ">= 18"
51
51
  },
52
- "version": "1.0.13"
52
+ "version": "1.0.14"
53
53
  }