@embedreach/components 0.2.3 → 0.2.5
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/index.js +32673 -31772
- package/dist/index.d.ts +31 -2
- package/dist/index.umd.js +134 -133
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare enum AutomationTriggerType {
|
|
|
6
6
|
TRIGGER_BASED = "trigger_based"
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
export declare function CreateAutomationDialog({ open, setOpen, onClose, automationType, }: CreateAutomationDialogProps): JSX_2.Element;
|
|
9
|
+
export declare function CreateAutomationDialog({ open, setOpen, onClose, automationType, getExtraMergeFields, }: CreateAutomationDialogProps): JSX_2.Element;
|
|
10
10
|
|
|
11
11
|
declare interface CreateAutomationDialogProps extends CreateAutomationModalProps {
|
|
12
12
|
/**
|
|
@@ -16,7 +16,10 @@ declare interface CreateAutomationDialogProps extends CreateAutomationModalProps
|
|
|
16
16
|
setOpen: (open: boolean) => void;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
export declare const CreateAutomationModal: default_2.FC<CreateAutomationModalProps
|
|
19
|
+
export declare const CreateAutomationModal: default_2.FC<CreateAutomationModalProps & {
|
|
20
|
+
currentStep: CreateAutomationModalStep;
|
|
21
|
+
setCurrentStep: (step: CreateAutomationModalStep) => void;
|
|
22
|
+
}>;
|
|
20
23
|
|
|
21
24
|
declare interface CreateAutomationModalProps {
|
|
22
25
|
/**
|
|
@@ -31,6 +34,32 @@ declare interface CreateAutomationModalProps {
|
|
|
31
34
|
* @Note This will remove the ability to select the automation type (e.g. the user will not be able to change the automation type)
|
|
32
35
|
*/
|
|
33
36
|
automationType?: AutomationTriggerType.ONE_TIME;
|
|
37
|
+
/**
|
|
38
|
+
* Optional function to return extra merge fields for the automation
|
|
39
|
+
*/
|
|
40
|
+
getExtraMergeFields?: () => Promise<ReachMergeField[]>;
|
|
41
|
+
/**
|
|
42
|
+
* Optional function to call prior to scheduling if a user wants to implement custom
|
|
43
|
+
* logic to block scheduling
|
|
44
|
+
*
|
|
45
|
+
* @param args.estimatedEmailRecipients - The estimated number of email recipients
|
|
46
|
+
* @param args.estimatedSmsRecipients - The estimated number of sms recipients
|
|
47
|
+
*
|
|
48
|
+
* @returns true if the automation should be scheduled, string otherwise that will be displayed to the user in a toast notification
|
|
49
|
+
*/
|
|
50
|
+
onBeforeSchedule?: (args: {
|
|
51
|
+
estimatedEmailRecipients: number;
|
|
52
|
+
estimatedSmsRecipients: number;
|
|
53
|
+
}) => Promise<true | string>;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* The steps of the create automation modal
|
|
58
|
+
*/
|
|
59
|
+
declare enum CreateAutomationModalStep {
|
|
60
|
+
ChooseAutomationType = "choose-automation-type",
|
|
61
|
+
SetAutomationName = "set-automation-name",
|
|
62
|
+
OneTimeWizard = "one-time-wizard"
|
|
34
63
|
}
|
|
35
64
|
|
|
36
65
|
/**
|