@embedreach/components 0.1.20 → 0.1.22
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/chunks/B4MFY5CR.js +12168 -0
- package/dist/chunks/HO4MOOFI.js +38 -0
- package/dist/chunks/HUY7CZI3.js +47 -0
- package/dist/chunks/index.js +46615 -0
- package/dist/index.d.ts +203 -4
- package/dist/index.es.js +6 -9935
- package/dist/index.umd.js +1237 -127
- package/dist/styles.css +1 -0
- package/package.json +22 -13
- package/dist/style.css +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,207 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
import {
|
|
1
|
+
import { default as default_2 } from 'react';
|
|
2
|
+
import { ForwardRefExoticComponent } from 'react';
|
|
3
|
+
import { LucideProps } from 'lucide-react';
|
|
4
|
+
import { RefAttributes } from 'react';
|
|
3
5
|
|
|
4
|
-
export
|
|
6
|
+
export declare const CreateAutomationModal: default_2.FC<CreateAutomationModalProps>;
|
|
5
7
|
|
|
6
|
-
|
|
8
|
+
declare interface CreateAutomationModalProps {
|
|
9
|
+
/**
|
|
10
|
+
* Optional callback when the segment builder is closed
|
|
11
|
+
* @param createdAutomation - The created automation id or false if the automation was not created, 'error' if there was an error
|
|
12
|
+
*/
|
|
13
|
+
onClose?: (createdAutomation: string | false | 'error') => void;
|
|
14
|
+
/**
|
|
15
|
+
* Optional keys to override the default icon definitions
|
|
16
|
+
*/
|
|
17
|
+
iconDefinitions?: IconDefinitionsType;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export declare const Engage: default_2.FC<{
|
|
21
|
+
iconDefinitions: IconDefinitionsType;
|
|
22
|
+
}>;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Represents the available features in our application.
|
|
26
|
+
* Each feature corresponds to a specific section of the marketing hub.
|
|
27
|
+
*/
|
|
28
|
+
declare type FeatureKey = 'measure' | 'measure-setup' | 'acquire-setup' | 'engage-segment-builder' | 'engage-automations-create-modal' | 'engage-automations-view-modal' | 'engage';
|
|
29
|
+
|
|
30
|
+
declare const IconDefinitions: {
|
|
31
|
+
CloseButton: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
32
|
+
DropdownMenuTrigger: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
33
|
+
UserIcon: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
34
|
+
UsersIcon: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
35
|
+
UserEdit: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
36
|
+
ScheduleButton: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
37
|
+
SendButton: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
38
|
+
BackButton: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
39
|
+
NextButton: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
40
|
+
MergeField: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
41
|
+
PlusIcon: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
42
|
+
AlertCircleIcon: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
43
|
+
/**
|
|
44
|
+
* Types of automations
|
|
45
|
+
*/
|
|
46
|
+
OneTimeBroadcast: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
47
|
+
PatronEntersList: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
48
|
+
DateMilestone: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
49
|
+
RealtimeActivity: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
50
|
+
/**
|
|
51
|
+
* Email and sms icons
|
|
52
|
+
*/
|
|
53
|
+
EmailIcon: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
54
|
+
SmsIcon: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
55
|
+
/**
|
|
56
|
+
* Statistics icons
|
|
57
|
+
*/
|
|
58
|
+
MessagesSent: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
59
|
+
LinksClicked: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
60
|
+
OpenRate: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
61
|
+
SpamComplies: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
62
|
+
TotalBounceRate: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
63
|
+
UnsubscribeRate: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
declare type IconDefinitionsType = typeof IconDefinitions;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Complete SDK configuration interface
|
|
70
|
+
* @interface ReachConfig
|
|
71
|
+
*/
|
|
72
|
+
export declare interface ReachConfig {
|
|
73
|
+
theme?: ThemeConfig;
|
|
74
|
+
authToken: string;
|
|
75
|
+
tenantExternalId: string;
|
|
76
|
+
/** Event callbacks */
|
|
77
|
+
callbacks?: SDKCallbacks;
|
|
78
|
+
/** Initial feature to load */
|
|
79
|
+
feature?: FeatureKey;
|
|
80
|
+
/** Debug configuration */
|
|
81
|
+
debug?: boolean;
|
|
82
|
+
/** Initial language code (e.g., 'en', 'es', 'fr') */
|
|
83
|
+
language?: string;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export declare const ReachProvider: default_2.FC<ReachConfig & {
|
|
87
|
+
children?: default_2.ReactNode;
|
|
88
|
+
}>;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Callback function for requesting new token from parent
|
|
92
|
+
* @callback ReauthCallback@callback ReauthCallback
|
|
93
|
+
* @returns {Promise<string> | void} New JWT token or void if sending message from iframe
|
|
94
|
+
*/
|
|
95
|
+
declare type ReauthCallback = () => Promise<string> | void;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Callback configuration for SDK events
|
|
99
|
+
* @interface SDKCallbacks
|
|
100
|
+
*/
|
|
101
|
+
declare interface SDKCallbacks {
|
|
102
|
+
/** Called when reauthentication is required */
|
|
103
|
+
onReauthRequested: ReauthCallback;
|
|
104
|
+
/** Called when tenant information is requested */
|
|
105
|
+
onTenantInformationRequested: () => void;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export declare const SegmentBuilder: default_2.FC<SegmentBuilderProps>;
|
|
109
|
+
|
|
110
|
+
declare interface SegmentBuilderProps {
|
|
111
|
+
/**
|
|
112
|
+
* Optional callback when the segment builder is closed
|
|
113
|
+
* @param createdSegment - The created segment id or false if the segment was not created, 'error' if there was an error
|
|
114
|
+
*/
|
|
115
|
+
onClose?: (createdSegment: string | false | 'error') => void;
|
|
116
|
+
/**
|
|
117
|
+
* Optionally pass in a segmentId to edit an existing segment
|
|
118
|
+
*/
|
|
119
|
+
segmentId?: string;
|
|
120
|
+
/**
|
|
121
|
+
* Optional keys to override the default icon definitions
|
|
122
|
+
*/
|
|
123
|
+
iconDefinitions?: IconDefinitionsType;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Theme initialization options that can be passed to ReachProvider
|
|
128
|
+
*/
|
|
129
|
+
export declare interface ThemeConfig {
|
|
130
|
+
/** Optional overrides for theme styles */
|
|
131
|
+
styles: Partial<ThemeStyles>;
|
|
132
|
+
/** Dark mode toggle */
|
|
133
|
+
darkMode?: boolean;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Theme styles incorporating shadcn variables
|
|
138
|
+
*
|
|
139
|
+
* Matches what we say in our dev docs here:
|
|
140
|
+
* https://docs.embedreach.com/sdk/customization
|
|
141
|
+
*
|
|
142
|
+
* @interface ThemeStyles
|
|
143
|
+
*/
|
|
144
|
+
declare interface ThemeStyles {
|
|
145
|
+
background?: string;
|
|
146
|
+
foreground?: string;
|
|
147
|
+
card?: string;
|
|
148
|
+
'card-foreground'?: string;
|
|
149
|
+
popover?: string;
|
|
150
|
+
'popover-foreground'?: string;
|
|
151
|
+
primary?: string;
|
|
152
|
+
'primary-foreground'?: string;
|
|
153
|
+
secondary?: string;
|
|
154
|
+
'secondary-foreground'?: string;
|
|
155
|
+
muted?: string;
|
|
156
|
+
'muted-foreground'?: string;
|
|
157
|
+
accent?: string;
|
|
158
|
+
'accent-foreground'?: string;
|
|
159
|
+
destructive?: string;
|
|
160
|
+
'destructive-foreground'?: string;
|
|
161
|
+
border?: string;
|
|
162
|
+
input?: string;
|
|
163
|
+
ring?: string;
|
|
164
|
+
'chart-1'?: string;
|
|
165
|
+
'chart-2'?: string;
|
|
166
|
+
'chart-3'?: string;
|
|
167
|
+
'chart-4'?: string;
|
|
168
|
+
'chart-5'?: string;
|
|
169
|
+
radius?: string;
|
|
170
|
+
'font-body'?: string;
|
|
171
|
+
'font-heading'?: string;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export declare const ViewAutomationModal: default_2.FC<ViewAutomationModalProps>;
|
|
175
|
+
|
|
176
|
+
declare type ViewAutomationModalProps = {
|
|
177
|
+
/**
|
|
178
|
+
* The id of the automation to view
|
|
179
|
+
*/
|
|
180
|
+
automationId?: string;
|
|
181
|
+
/**
|
|
182
|
+
* Optionally auto open the edit automation popup
|
|
183
|
+
*/
|
|
184
|
+
autoOpenEditPopup?: boolean;
|
|
185
|
+
/**
|
|
186
|
+
* Optional keys to override the default icon definitions
|
|
187
|
+
*/
|
|
188
|
+
iconDefinitions?: IconDefinitionsType;
|
|
189
|
+
/**
|
|
190
|
+
* Optional keys to override the default show back button
|
|
191
|
+
*/
|
|
192
|
+
showBackButton?: boolean;
|
|
193
|
+
/**
|
|
194
|
+
* Optional logo url to display in the top left corner
|
|
195
|
+
*/
|
|
196
|
+
logoUrl?: string;
|
|
197
|
+
};
|
|
7
198
|
|
|
8
199
|
export { }
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
declare module 'i18next' {
|
|
203
|
+
interface CustomTypeOptions {
|
|
204
|
+
defaultNS: 'common';
|
|
205
|
+
resources: typeof defaultTranslations;
|
|
206
|
+
}
|
|
207
|
+
}
|