@octaviaflow/core 3.1.0-beta.89 → 3.1.0-beta.91
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/components/SlideoutPanel/SlideoutPanel.d.ts.map +1 -1
- package/dist/email/emailPalette.d.ts +53 -0
- package/dist/email/emailPalette.d.ts.map +1 -0
- package/dist/email/emailSystem.d.ts +42 -0
- package/dist/email/emailSystem.d.ts.map +1 -0
- package/dist/email/emailTemplates.d.ts +11 -0
- package/dist/email/emailTemplates.d.ts.map +1 -0
- package/dist/index.cjs +34 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +34 -4
- package/dist/index.js.map +1 -1
- package/dist/notifications/components/NotificationChannelForm/NotificationChannelForm.d.ts.map +1 -1
- package/dist/notifications/engine/channels.d.ts +5 -1
- package/dist/notifications/engine/channels.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SlideoutPanel.d.ts","sourceRoot":"","sources":["../../../src/components/SlideoutPanel/SlideoutPanel.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,OAAO,CAAC;AAK1D,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,uEAAuE;IACvE,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAChC;
|
|
1
|
+
{"version":3,"file":"SlideoutPanel.d.ts","sourceRoot":"","sources":["../../../src/components/SlideoutPanel/SlideoutPanel.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,OAAO,CAAC;AAK1D,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,uEAAuE;IACvE,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAChC;AA0JD,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,+BAWtD"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export declare const EMAIL: {
|
|
2
|
+
readonly accent: "#0F62FE";
|
|
3
|
+
readonly accentHover: "#0353E9";
|
|
4
|
+
readonly accentPress: "#002D9C";
|
|
5
|
+
readonly accentSoft: "#EDF4FF";
|
|
6
|
+
readonly accentBorder: "#C6DBFF";
|
|
7
|
+
readonly ink: "#0A0A0A";
|
|
8
|
+
readonly body: "#404040";
|
|
9
|
+
readonly muted: "#707070";
|
|
10
|
+
readonly borderSubtle: "#EEEEEE";
|
|
11
|
+
readonly border: "#E5E5E5";
|
|
12
|
+
readonly borderStrong: "#D4D4D4";
|
|
13
|
+
readonly canvas: "#F4F4F4";
|
|
14
|
+
readonly surface: "#FFFFFF";
|
|
15
|
+
readonly error: "#DA1E28";
|
|
16
|
+
readonly warning: "#B28600";
|
|
17
|
+
readonly success: "#198038";
|
|
18
|
+
readonly rButton: "2px";
|
|
19
|
+
readonly rCard: "4px";
|
|
20
|
+
};
|
|
21
|
+
export type EmailPalette = typeof EMAIL;
|
|
22
|
+
export declare const EMAIL_BRAND: {
|
|
23
|
+
readonly site: "https://octaviaflow.com";
|
|
24
|
+
readonly app: "https://app.octaviaflow.com";
|
|
25
|
+
readonly supportEmail: "support@octaviaflow.com";
|
|
26
|
+
readonly logoUrl: "https://octaviaflow.com/images/icon.png";
|
|
27
|
+
readonly logoSize: 44;
|
|
28
|
+
readonly logoAlt: "Octaviaflow";
|
|
29
|
+
readonly socials: readonly [{
|
|
30
|
+
readonly label: "X";
|
|
31
|
+
readonly href: "https://x.com/octaviaflow_";
|
|
32
|
+
}, {
|
|
33
|
+
readonly label: "LinkedIn";
|
|
34
|
+
readonly href: "https://linkedin.com/company/octaviaflow";
|
|
35
|
+
}];
|
|
36
|
+
readonly legal: readonly [{
|
|
37
|
+
readonly label: "Privacy Policy";
|
|
38
|
+
readonly href: "https://octaviaflow.com/privacy-policy";
|
|
39
|
+
}, {
|
|
40
|
+
readonly label: "Terms";
|
|
41
|
+
readonly href: "https://octaviaflow.com/terms-and-conditions";
|
|
42
|
+
}, {
|
|
43
|
+
readonly label: "Unsubscribe";
|
|
44
|
+
readonly href: "{{unsubscribe_url}}";
|
|
45
|
+
}];
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* A tracked link to a marketing-site page. Every outbound link carries UTM so
|
|
49
|
+
* email-driven visits are attributable. `medium` is the email family
|
|
50
|
+
* (transactional / notification / marketing / report); `campaign` the template id.
|
|
51
|
+
*/
|
|
52
|
+
export declare function trackedUrl(path: string, medium: string, campaign: string): string;
|
|
53
|
+
//# sourceMappingURL=emailPalette.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emailPalette.d.ts","sourceRoot":"","sources":["../../src/email/emailPalette.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;CA2BR,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,OAAO,KAAK,CAAC;AAKxC,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;CAkBd,CAAC;AAEX;;;;GAIG;AACH,wBAAgB,UAAU,CACxB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,GACf,MAAM,CAMR"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export type EmailMedium = 'transactional' | 'notification' | 'marketing' | 'report';
|
|
2
|
+
export interface EmailStat {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
/** Optional sub-line, e.g. a delta ("+12% vs last week"). */
|
|
6
|
+
sub?: string;
|
|
7
|
+
tone?: 'accent' | 'error' | 'warning' | 'success' | 'muted';
|
|
8
|
+
}
|
|
9
|
+
export interface EmailContent {
|
|
10
|
+
/** Template id → utm_campaign. */
|
|
11
|
+
id: string;
|
|
12
|
+
medium: EmailMedium;
|
|
13
|
+
preheader: string;
|
|
14
|
+
tone?: 'accent' | 'error' | 'warning' | 'success';
|
|
15
|
+
eyebrow?: string;
|
|
16
|
+
heading: string;
|
|
17
|
+
subheading?: string;
|
|
18
|
+
greeting?: string;
|
|
19
|
+
paragraphs: string[];
|
|
20
|
+
/** Big-number tiles (reports). */
|
|
21
|
+
stats?: EmailStat[];
|
|
22
|
+
/** Key/value list (alerts). */
|
|
23
|
+
facts?: {
|
|
24
|
+
label: string;
|
|
25
|
+
value: string;
|
|
26
|
+
}[];
|
|
27
|
+
cta?: {
|
|
28
|
+
label: string;
|
|
29
|
+
href: string;
|
|
30
|
+
};
|
|
31
|
+
/** Raw URL shown under the CTA ("or copy and paste this link"). */
|
|
32
|
+
linkFallback?: string;
|
|
33
|
+
callout?: {
|
|
34
|
+
title: string;
|
|
35
|
+
text: string;
|
|
36
|
+
};
|
|
37
|
+
/** Show the "Need help?" support block. */
|
|
38
|
+
help?: boolean;
|
|
39
|
+
}
|
|
40
|
+
/** Render a complete email from content. This is THE Octaviaflow email. */
|
|
41
|
+
export declare function renderEmail(c: EmailContent): string;
|
|
42
|
+
//# sourceMappingURL=emailSystem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emailSystem.d.ts","sourceRoot":"","sources":["../../src/email/emailSystem.ts"],"names":[],"mappings":"AAeA,MAAM,MAAM,WAAW,GAAG,eAAe,GAAG,cAAc,GAAG,WAAW,GAAG,QAAQ,CAAC;AAEpF,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,6DAA6D;IAC7D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;CAC7D;AAED,MAAM,WAAW,YAAY;IAC3B,kCAAkC;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,WAAW,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;IAClD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,kCAAkC;IAClC,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC;IACpB,+BAA+B;IAC/B,KAAK,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC3C,GAAG,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACtC,mEAAmE;IACnE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1C,2CAA2C;IAC3C,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAwGD,2EAA2E;AAC3E,wBAAgB,WAAW,CAAC,CAAC,EAAE,YAAY,GAAG,MAAM,CAqEnD"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { EmailContent } from './emailSystem';
|
|
2
|
+
export interface EmailTemplateGroup {
|
|
3
|
+
category: string;
|
|
4
|
+
templates: {
|
|
5
|
+
id: string;
|
|
6
|
+
title: string;
|
|
7
|
+
content: EmailContent;
|
|
8
|
+
}[];
|
|
9
|
+
}
|
|
10
|
+
export declare const EMAIL_TEMPLATE_GROUPS: EmailTemplateGroup[];
|
|
11
|
+
//# sourceMappingURL=emailTemplates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emailTemplates.d.ts","sourceRoot":"","sources":["../../src/email/emailTemplates.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AA8OlD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,YAAY,CAAA;KAAE,EAAE,CAAC;CACnE;AAED,eAAO,MAAM,qBAAqB,EAAE,kBAAkB,EAgCrD,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -37653,7 +37653,13 @@ function SlideoutContent({
|
|
|
37653
37653
|
{
|
|
37654
37654
|
isOpen: open,
|
|
37655
37655
|
onClose,
|
|
37656
|
-
isDismissable: true
|
|
37656
|
+
isDismissable: true,
|
|
37657
|
+
// Don't treat a click inside a PORTALED floating element (Select /
|
|
37658
|
+
// Combobox / MultiSelect / DatePicker / DropdownMenu / ContextMenu — all
|
|
37659
|
+
// marked data-ods-floating and rendered to <body>, i.e. outside this
|
|
37660
|
+
// panel's DOM) as an outside click. Without this, opening a dropdown or
|
|
37661
|
+
// picking an option inside the sheet dismisses the whole sheet.
|
|
37662
|
+
shouldCloseOnInteractOutside: (el) => !el.closest?.("[data-ods-floating]")
|
|
37657
37663
|
},
|
|
37658
37664
|
overlayRef
|
|
37659
37665
|
);
|
|
@@ -46470,7 +46476,7 @@ var CHANNEL_TYPE_META = {
|
|
|
46470
46476
|
whatsapp: {
|
|
46471
46477
|
label: "WhatsApp",
|
|
46472
46478
|
hint: "Template messages to a phone number.",
|
|
46473
|
-
connected:
|
|
46479
|
+
connected: false,
|
|
46474
46480
|
icon: /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(import_icons71.ChatLaunchIcon, { size: "sm", "aria-hidden": "true" })
|
|
46475
46481
|
},
|
|
46476
46482
|
webhook: {
|
|
@@ -47231,9 +47237,12 @@ var import_react210 = require("react");
|
|
|
47231
47237
|
var CONNECTED_CHANNEL_TYPES = [
|
|
47232
47238
|
"slack",
|
|
47233
47239
|
"teams",
|
|
47234
|
-
"google_chat"
|
|
47235
|
-
"whatsapp"
|
|
47240
|
+
"google_chat"
|
|
47236
47241
|
];
|
|
47242
|
+
function isValidPhoneNumber(value) {
|
|
47243
|
+
const digits = value.replace(/[^\d]/g, "");
|
|
47244
|
+
return /^\+?[\d\s()-]+$/.test(value.trim()) && digits.length >= 8 && digits.length <= 15;
|
|
47245
|
+
}
|
|
47237
47246
|
var EMAIL_RE = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
47238
47247
|
function isValidEmail(value) {
|
|
47239
47248
|
return EMAIL_RE.test(value.trim());
|
|
@@ -47260,6 +47269,10 @@ function validateChannelDraft(draft) {
|
|
|
47260
47269
|
if (!draft.url?.trim()) errors.url = "Enter the endpoint URL.";
|
|
47261
47270
|
else if (!isValidWebhookUrl(draft.url))
|
|
47262
47271
|
errors.url = "Enter a full URL, starting with https://.";
|
|
47272
|
+
} else if (draft.type === "whatsapp") {
|
|
47273
|
+
if (!draft.target?.trim()) errors.target = "Enter the recipient\u2019s WhatsApp number.";
|
|
47274
|
+
else if (!isValidPhoneNumber(draft.target))
|
|
47275
|
+
errors.target = "Enter a valid number in international format, e.g. +91 98765 43210.";
|
|
47263
47276
|
}
|
|
47264
47277
|
return errors;
|
|
47265
47278
|
}
|
|
@@ -47601,6 +47614,23 @@ function NotificationChannelForm({
|
|
|
47601
47614
|
disabled: readOnly,
|
|
47602
47615
|
size
|
|
47603
47616
|
}
|
|
47617
|
+
),
|
|
47618
|
+
value.type === "whatsapp" && /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
|
|
47619
|
+
Input,
|
|
47620
|
+
{
|
|
47621
|
+
id: `${baseId}-target`,
|
|
47622
|
+
type: "tel",
|
|
47623
|
+
label: TARGET_LABEL.whatsapp ?? "Phone number",
|
|
47624
|
+
placeholder: TARGET_PLACEHOLDER.whatsapp,
|
|
47625
|
+
value: value.target ?? "",
|
|
47626
|
+
onChange: (e) => patch({ target: e.target.value }),
|
|
47627
|
+
onBlur: () => touch("target"),
|
|
47628
|
+
error: Boolean(errorFor("target")),
|
|
47629
|
+
errorMessage: errorText("target"),
|
|
47630
|
+
helperText: "Sent from Octaviaflow\u2019s WhatsApp using the approved template. Include the country code.",
|
|
47631
|
+
disabled: readOnly,
|
|
47632
|
+
size
|
|
47633
|
+
}
|
|
47604
47634
|
)
|
|
47605
47635
|
] }),
|
|
47606
47636
|
/* @__PURE__ */ (0, import_jsx_runtime192.jsxs)("fieldset", { className: "ods-notif-channel-form__section", children: [
|