@embedreach/components 0.1.104 → 0.2.0

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/dist/index.d.ts CHANGED
@@ -1,15 +1,12 @@
1
1
  import { default as default_2 } from 'react';
2
- import { ForwardRefExoticComponent } from 'react';
3
2
  import { JSX as JSX_2 } from 'react/jsx-runtime';
4
- import { LucideProps } from 'lucide-react';
5
- import { RefAttributes } from 'react';
6
3
 
7
4
  export declare enum AutomationTriggerType {
8
5
  ONE_TIME = "one_time",
9
6
  TRIGGER_BASED = "trigger_based"
10
7
  }
11
8
 
12
- export declare function CreateAutomationDialog({ open, setOpen, onClose, iconDefinitions, automationType, }: CreateAutomationDialogProps): JSX_2.Element;
9
+ export declare function CreateAutomationDialog({ open, setOpen, onClose, automationType, }: CreateAutomationDialogProps): JSX_2.Element;
13
10
 
14
11
  declare interface CreateAutomationDialogProps extends CreateAutomationModalProps {
15
12
  /**
@@ -27,10 +24,6 @@ declare interface CreateAutomationModalProps {
27
24
  * @param createdAutomation - The created automation id or false if the automation was not created, 'error' if there was an error
28
25
  */
29
26
  onClose?: (createdAutomation: string | false | 'error') => void;
30
- /**
31
- * Optional icon definitions to use for the automation
32
- */
33
- iconDefinitions?: IconDefinitionsType;
34
27
  /**
35
28
  * Optionally skip the selection of automation and jump to the automation type
36
29
  * Currently only supports one time automation
@@ -58,9 +51,7 @@ declare type DynamicMergeField = ReachMergeFieldBase & {
58
51
  url: string;
59
52
  };
60
53
 
61
- export declare const Engage: ({ iconDefinitions: mergedIconDefinitions, }: {
62
- iconDefinitions: IconDefinitionsType;
63
- }) => JSX_2.Element;
54
+ export declare const Engage: () => JSX_2.Element;
64
55
 
65
56
  declare interface EngageTypedOverrides {
66
57
  user?: string;
@@ -71,6 +62,8 @@ declare interface EngageTypedOverrides {
71
62
  segment_other?: string;
72
63
  one_time?: string;
73
64
  trigger_based?: string;
65
+ insight?: string;
66
+ insight_other?: string;
74
67
  }
75
68
 
76
69
  /**
@@ -79,44 +72,6 @@ declare interface EngageTypedOverrides {
79
72
  */
80
73
  declare type FeatureKey = 'measure' | 'measure-setup' | 'acquire-setup' | 'engage-segment-builder' | 'engage-automations-create-modal' | 'engage-automations-view-modal' | 'engage';
81
74
 
82
- declare const IconDefinitions: {
83
- CloseButton: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
84
- DropdownMenuTrigger: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
85
- UserIcon: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
86
- UsersIcon: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
87
- UserEdit: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
88
- ScheduleButton: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
89
- SendButton: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
90
- BackButton: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
91
- NextButton: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
92
- MergeField: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
93
- PlusIcon: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
94
- AlertCircleIcon: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
95
- /**
96
- * Types of automations
97
- */
98
- OneTimeBroadcast: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
99
- PatronEntersList: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
100
- DateMilestone: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
101
- RealtimeActivity: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
102
- /**
103
- * Email and sms icons
104
- */
105
- EmailIcon: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
106
- SmsIcon: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
107
- /**
108
- * Statistics icons
109
- */
110
- MessagesSent: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
111
- LinksClicked: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
112
- OpenRate: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
113
- SpamComplies: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
114
- TotalBounceRate: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
115
- UnsubscribeRate: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
116
- };
117
-
118
- declare type IconDefinitionsType = typeof IconDefinitions;
119
-
120
75
  declare interface LanguageConfig {
121
76
  /** Initial language code (e.g., 'en', 'es', 'fr') */
122
77
  default: string;
@@ -132,6 +87,16 @@ declare interface LanguageConfig {
132
87
  };
133
88
  }
134
89
 
90
+ declare interface _PrivateProps {
91
+ clientEntryPoint?: ReachClientEnum;
92
+ }
93
+
94
+ declare enum ReachClientEnum {
95
+ ReactComponent = "React Component",
96
+ Iframe = "Iframe",
97
+ MagicLink = "Magic Link"
98
+ }
99
+
135
100
  /**
136
101
  * Complete SDK configuration interface
137
102
  * @interface ReachConfig
@@ -140,12 +105,13 @@ export declare interface ReachConfig {
140
105
  authToken: string;
141
106
  theme?: ThemeConfig;
142
107
  /** Event callbacks */
143
- callbacks?: SDKCallbacks;
108
+ callbacks: SDKCallbacks;
144
109
  /** Initial feature to load */
145
110
  feature?: FeatureKey;
146
111
  /** Debug configuration */
147
112
  debug?: boolean;
148
113
  language?: LanguageConfig;
114
+ children?: default_2.ReactNode;
149
115
  }
150
116
 
151
117
  export declare type ReachMergeField = StaticMergeField | DynamicMergeField;
@@ -166,9 +132,7 @@ export declare enum ReachMergeFieldTypeEnum {
166
132
  DYNAMIC = "dynamic"
167
133
  }
168
134
 
169
- export declare const ReachProvider: default_2.FC<ReachConfig & {
170
- children?: default_2.ReactNode;
171
- }>;
135
+ export declare const ReachProvider: ({ authToken, language, children, theme, debug, callbacks, clientEntryPoint, }: ReachConfig & _PrivateProps) => JSX_2.Element;
172
136
 
173
137
  /**
174
138
  * Callback function for requesting new token from parent
@@ -282,22 +246,10 @@ export declare type ViewAutomationProps = {
282
246
  * The id of the automation to view
283
247
  */
284
248
  automationId?: string;
285
- /**
286
- * Optionally auto open the edit automation popup
287
- */
288
- autoOpenEditPopup?: boolean;
289
- /**
290
- * Optional icon definitions to use for the automation
291
- */
292
- iconDefinitions?: IconDefinitionsType;
293
249
  /**
294
250
  * Optional keys to override the default show back button
295
251
  */
296
252
  showBackButton?: boolean;
297
- /**
298
- * Optional logo url to display in the top left corner
299
- */
300
- logoUrl?: string;
301
253
  /**
302
254
  * Optional function to return extra merge fields for the automation
303
255
  */