@trycourier/react-designer 0.0.0-canary-20250523144133 → 0.0.0-canary-20250526103347
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/cjs/index.js +35 -35
- package/dist/cjs/index.js.map +3 -3
- package/dist/components/Providers/TemplateProvider.d.ts +1 -1
- package/dist/components/Providers/api/template.d.ts +2 -1
- package/dist/components/Providers/store.d.ts +7 -5
- package/dist/components/TemplateEditor/Channels/Channels.d.ts +3 -3
- package/dist/components/TemplateEditor/Channels/Email/Email.d.ts +2 -6
- package/dist/components/TemplateEditor/Channels/Inbox/Inbox.d.ts +2 -5
- package/dist/components/TemplateEditor/Channels/Push/Push.d.ts +2 -5
- package/dist/components/TemplateEditor/Channels/SMS/SMS.d.ts +2 -5
- package/dist/components/TemplateEditor/TemplateEditor.d.ts +3 -1
- package/dist/esm/index.js +35 -35
- package/dist/esm/index.js.map +3 -3
- package/dist/lib/utils/convertElementalToTiptap/convertElementalToTiptap.test.d.ts +1 -0
- package/dist/lib/utils/convertMarkdownToTiptap/convertMarkdownToTiptap.test.d.ts +1 -0
- package/dist/lib/utils/convertTiptapToElemental/convertTiptapToElemental.test.d.ts +1 -0
- package/dist/lib/utils/convertTiptapToMarkdown/convertTiptapToMarkdown.test.d.ts +1 -0
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ export declare function useTemplateActions(): {
|
|
|
3
3
|
getTenant: (options?: {
|
|
4
4
|
includeBrand?: boolean;
|
|
5
5
|
} | undefined) => Promise<void>;
|
|
6
|
-
saveTemplate: () => Promise<any>;
|
|
6
|
+
saveTemplate: (routing: import("./store").MessageRouting) => Promise<any>;
|
|
7
7
|
publishTemplate: () => Promise<any>;
|
|
8
8
|
isTenantLoading: boolean | null;
|
|
9
9
|
isTenantSaving: boolean | null;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { type MessageRouting } from "../store";
|
|
2
|
+
export declare const saveTemplateAtom: import("jotai").WritableAtom<null, [routing: MessageRouting], Promise<any>> & {
|
|
2
3
|
init: null;
|
|
3
4
|
};
|
|
4
5
|
export declare const publishTemplateAtom: import("jotai").WritableAtom<null, [], Promise<any>> & {
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import type { ElementalContent } from "@/types/elemental.types";
|
|
2
|
+
export type MessageRoutingMethod = "all" | "single";
|
|
3
|
+
export type MessageRoutingChannel = string | MessageRouting;
|
|
4
|
+
export interface MessageRouting {
|
|
5
|
+
method: MessageRoutingMethod;
|
|
6
|
+
channels: MessageRoutingChannel[];
|
|
7
|
+
}
|
|
2
8
|
export interface TenantData {
|
|
3
9
|
data?: {
|
|
4
10
|
tenant?: {
|
|
@@ -10,11 +16,7 @@ export interface TenantData {
|
|
|
10
16
|
version?: string;
|
|
11
17
|
data?: {
|
|
12
18
|
content?: ElementalContent;
|
|
13
|
-
routing?:
|
|
14
|
-
method?: string;
|
|
15
|
-
channels?: string[];
|
|
16
|
-
[key: string]: unknown;
|
|
17
|
-
};
|
|
19
|
+
routing?: MessageRouting;
|
|
18
20
|
[key: string]: unknown;
|
|
19
21
|
};
|
|
20
22
|
[key: string]: unknown;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import type { TemplateEditorProps } from "../TemplateEditor";
|
|
2
|
+
interface ChannelsProps extends Pick<TemplateEditorProps, "hidePublish" | "channels"> {
|
|
3
3
|
}
|
|
4
|
-
export declare const Channels: ({ hidePublish }: ChannelsProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const Channels: ({ hidePublish, channels: channelsProp }: ChannelsProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export {};
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export interface EmailProps {
|
|
1
|
+
import type { TemplateEditorProps } from "../../TemplateEditor";
|
|
2
|
+
export interface EmailProps extends Pick<TemplateEditorProps, "hidePublish" | "brandEditor" | "channels" | "variables" | "theme"> {
|
|
3
3
|
isLoading?: boolean;
|
|
4
|
-
hidePublish?: boolean;
|
|
5
|
-
brandEditor?: boolean;
|
|
6
|
-
variables?: Record<string, unknown>;
|
|
7
|
-
theme?: string | Theme;
|
|
8
4
|
}
|
|
9
5
|
export declare const Email: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<EmailProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export interface InboxProps {
|
|
3
|
-
theme?: Theme | string;
|
|
4
|
-
hidePublish?: boolean;
|
|
5
|
-
variables?: Record<string, unknown>;
|
|
1
|
+
import type { TemplateEditorProps } from "../../TemplateEditor";
|
|
2
|
+
export interface InboxProps extends Pick<TemplateEditorProps, "hidePublish" | "theme" | "variables" | "channels"> {
|
|
6
3
|
readOnly?: boolean;
|
|
7
4
|
}
|
|
8
5
|
export declare const Inbox: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<InboxProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export interface PushProps {
|
|
3
|
-
theme?: Theme | string;
|
|
4
|
-
hidePublish?: boolean;
|
|
5
|
-
variables?: Record<string, unknown>;
|
|
1
|
+
import type { TemplateEditorProps } from "../../TemplateEditor";
|
|
2
|
+
export interface PushProps extends Pick<TemplateEditorProps, "hidePublish" | "theme" | "variables" | "channels"> {
|
|
6
3
|
readOnly?: boolean;
|
|
7
4
|
}
|
|
8
5
|
export declare const Push: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<PushProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export interface SMSProps {
|
|
3
|
-
theme?: Theme | string;
|
|
4
|
-
hidePublish?: boolean;
|
|
5
|
-
variables?: Record<string, unknown>;
|
|
1
|
+
import type { TemplateEditorProps } from "../../TemplateEditor";
|
|
2
|
+
export interface SMSProps extends Pick<TemplateEditorProps, "hidePublish" | "theme" | "variables" | "channels"> {
|
|
6
3
|
readOnly?: boolean;
|
|
7
4
|
}
|
|
8
5
|
export declare const SMS: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<SMSProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ElementalContent } from "@/types/elemental.types";
|
|
2
2
|
import type { BrandEditorProps } from "../BrandEditor";
|
|
3
|
+
import { type MessageRouting } from "../Providers/store";
|
|
3
4
|
import type { Theme } from "../ui-kit/ThemeProvider/ThemeProvider.types";
|
|
4
5
|
export interface TemplateEditorProps {
|
|
5
6
|
theme?: Theme | string;
|
|
@@ -11,6 +12,7 @@ export interface TemplateEditorProps {
|
|
|
11
12
|
autoSaveDebounce?: number;
|
|
12
13
|
brandEditor?: boolean;
|
|
13
14
|
brandProps?: BrandEditorProps;
|
|
14
|
-
channels?: ("email" | "sms" | "push" | "
|
|
15
|
+
channels?: ("email" | "sms" | "push" | "inbox")[];
|
|
16
|
+
routing: MessageRouting;
|
|
15
17
|
}
|
|
16
18
|
export declare const TemplateEditor: import("react").NamedExoticComponent<TemplateEditorProps>;
|