@embedreach/components 0.3.48 → 0.3.49
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 +67302 -67327
- package/dist/chunks/sandbox-loading-screen.js +6 -11
- package/dist/index.d.ts +5 -11
- package/dist/index.umd.js +17 -17
- package/package.json +1 -1
|
@@ -26704,11 +26704,11 @@ async function startSandboxMSW(debug = false, isIframe = false, features = ["all
|
|
|
26704
26704
|
throw error2;
|
|
26705
26705
|
}
|
|
26706
26706
|
}
|
|
26707
|
-
const useMswSandbox = ({
|
|
26707
|
+
const useMswSandbox = ({ demo, debug, clientEntryPoint }) => {
|
|
26708
26708
|
const [mswInitialized, setMswInitialized] = useState(false);
|
|
26709
26709
|
const [error2, setError] = useState(null);
|
|
26710
26710
|
useEffect(() => {
|
|
26711
|
-
if (
|
|
26711
|
+
if (demo && !mswInitialized) {
|
|
26712
26712
|
if (typeof window === "undefined") {
|
|
26713
26713
|
setError(new Error("MSW can only be initialized in a browser environment"));
|
|
26714
26714
|
return;
|
|
@@ -26725,7 +26725,7 @@ const useMswSandbox = ({ sandbox, debug, clientEntryPoint }) => {
|
|
|
26725
26725
|
console.error("[MSW Sandbox] Failed to start MSW:", error22);
|
|
26726
26726
|
});
|
|
26727
26727
|
}
|
|
26728
|
-
}, [
|
|
26728
|
+
}, [demo, mswInitialized, debug, clientEntryPoint]);
|
|
26729
26729
|
useEffect(() => {
|
|
26730
26730
|
return () => {
|
|
26731
26731
|
if (mswInitialized) {
|
|
@@ -26736,7 +26736,7 @@ const useMswSandbox = ({ sandbox, debug, clientEntryPoint }) => {
|
|
|
26736
26736
|
}, [mswInitialized, debug]);
|
|
26737
26737
|
return {
|
|
26738
26738
|
mswInitialized,
|
|
26739
|
-
isSandboxLoading:
|
|
26739
|
+
isSandboxLoading: demo && !mswInitialized,
|
|
26740
26740
|
error: error2
|
|
26741
26741
|
};
|
|
26742
26742
|
};
|
|
@@ -26857,14 +26857,9 @@ const SpinLoader = ({
|
|
|
26857
26857
|
` })
|
|
26858
26858
|
] }) });
|
|
26859
26859
|
};
|
|
26860
|
-
const MSWSandboxLoader = ({
|
|
26861
|
-
sandbox,
|
|
26862
|
-
debug,
|
|
26863
|
-
onReady,
|
|
26864
|
-
clientEntryPoint
|
|
26865
|
-
}) => {
|
|
26860
|
+
const MSWSandboxLoader = ({ demo, debug, onReady, clientEntryPoint }) => {
|
|
26866
26861
|
const { isSandboxLoading, error: error2, mswInitialized } = useMswSandbox({
|
|
26867
|
-
|
|
26862
|
+
demo,
|
|
26868
26863
|
debug,
|
|
26869
26864
|
clientEntryPoint
|
|
26870
26865
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare enum AutomationTriggerType {
|
|
|
13
13
|
DATE_BASED = "date_based"
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
export declare function CreateAutomationDialog({ open, setOpen, onClose, automationType, getExtraMergeFields, replyToSettingsText, replyToSettingsLink, fromNameSettingsText, fromNameSettingsLink,
|
|
16
|
+
export declare function CreateAutomationDialog({ open, setOpen, onClose, automationType, getExtraMergeFields, replyToSettingsText, replyToSettingsLink, fromNameSettingsText, fromNameSettingsLink, }: CreateAutomationDialogProps): JSX_2.Element;
|
|
17
17
|
|
|
18
18
|
declare interface CreateAutomationDialogProps extends CreateAutomationModalProps {
|
|
19
19
|
/**
|
|
@@ -72,10 +72,6 @@ declare interface CreateAutomationModalProps {
|
|
|
72
72
|
*/
|
|
73
73
|
fromNameSettingsText?: string;
|
|
74
74
|
fromNameSettingsLink?: string;
|
|
75
|
-
/**
|
|
76
|
-
* Optional boolean to hide SMS features
|
|
77
|
-
*/
|
|
78
|
-
hideSms?: boolean;
|
|
79
75
|
}
|
|
80
76
|
|
|
81
77
|
/**
|
|
@@ -187,6 +183,9 @@ export declare interface ReachConfig {
|
|
|
187
183
|
/** Debug configuration */
|
|
188
184
|
debug?: boolean;
|
|
189
185
|
language?: LanguageConfig;
|
|
186
|
+
/** Enable demo mode (MSW mock data, no real backend required) */
|
|
187
|
+
demo?: boolean;
|
|
188
|
+
/** @deprecated Use `demo` instead. Kept for backwards compatibility. */
|
|
190
189
|
sandbox?: boolean;
|
|
191
190
|
children?: default_2.ReactNode;
|
|
192
191
|
/**
|
|
@@ -226,7 +225,7 @@ export declare enum ReachMergeFieldTypeEnum {
|
|
|
226
225
|
DYNAMIC = "dynamic"
|
|
227
226
|
}
|
|
228
227
|
|
|
229
|
-
export declare const ReachProvider: ({ authToken, language, children, theme, debug, callbacks, feature, sandbox, clientEntryPoint, hideFeature, enableFeature, }: ReachConfig & _PrivateProps) => JSX_2.Element;
|
|
228
|
+
export declare const ReachProvider: ({ authToken, language, children, theme, debug, callbacks, feature, demo, sandbox, clientEntryPoint, hideFeature, enableFeature, }: ReachConfig & _PrivateProps) => JSX_2.Element;
|
|
230
229
|
|
|
231
230
|
/**
|
|
232
231
|
* Callback function for requesting new token from parent
|
|
@@ -537,11 +536,6 @@ export declare type ViewAutomationProps = {
|
|
|
537
536
|
estimatedSmsRecipients: number;
|
|
538
537
|
scheduleSendAt: string | null;
|
|
539
538
|
}) => Promise<true | string>;
|
|
540
|
-
/**
|
|
541
|
-
* Optional boolean to hide features
|
|
542
|
-
*/
|
|
543
|
-
hideSms?: boolean;
|
|
544
|
-
hideSales?: boolean;
|
|
545
539
|
/**
|
|
546
540
|
* Optional text and hyperlink to display for
|
|
547
541
|
* replyTo settings
|