@embedreach/components 0.2.59 → 0.2.61
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 +17 -17
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/chunks/index.js
CHANGED
|
@@ -98029,12 +98029,11 @@ const NoCommunicationContent = ({ type, disablePreviewSubtext = false }) => {
|
|
|
98029
98029
|
}
|
|
98030
98030
|
) });
|
|
98031
98031
|
};
|
|
98032
|
-
const PreviewButton = ({
|
|
98033
|
-
onClick
|
|
98034
|
-
}) => {
|
|
98032
|
+
const PreviewButton = React__default.forwardRef(({ onClick }, ref) => {
|
|
98035
98033
|
return /* @__PURE__ */ jsxs(
|
|
98036
98034
|
Button$1,
|
|
98037
98035
|
{
|
|
98036
|
+
ref,
|
|
98038
98037
|
variant: "outline",
|
|
98039
98038
|
size: "sm",
|
|
98040
98039
|
className: "rounded-lg px-3 py-2 flex items-center gap-2 shadow-sm bg-white/80 hover:bg-zinc-100 border border-zinc-200",
|
|
@@ -98045,7 +98044,8 @@ const PreviewButton = ({
|
|
|
98045
98044
|
]
|
|
98046
98045
|
}
|
|
98047
98046
|
);
|
|
98048
|
-
};
|
|
98047
|
+
});
|
|
98048
|
+
PreviewButton.displayName = "PreviewButton";
|
|
98049
98049
|
const validateEmail = (email) => {
|
|
98050
98050
|
const emailRegex2 = /^[^\s@.]+(?:\.[^\s@.]+)*@[^\s@.]+(?:\.[^\s@.]+)+$/;
|
|
98051
98051
|
return emailRegex2.test(email);
|
|
@@ -98427,13 +98427,13 @@ const AutomationEditorEmailPreview = ({
|
|
|
98427
98427
|
alertText: "Unable to send preview",
|
|
98428
98428
|
title: "There was an error preparing the preview. Please check your automation configuration.",
|
|
98429
98429
|
className: "inline-block",
|
|
98430
|
-
asChild:
|
|
98431
|
-
children: /* @__PURE__ */ jsx(
|
|
98430
|
+
asChild: true,
|
|
98431
|
+
children: /* @__PURE__ */ jsx(
|
|
98432
98432
|
PreviewButton,
|
|
98433
98433
|
{
|
|
98434
98434
|
onClick: () => setOpenSendPreviewEmailPopup(true)
|
|
98435
98435
|
}
|
|
98436
|
-
)
|
|
98436
|
+
)
|
|
98437
98437
|
}
|
|
98438
98438
|
) : /* @__PURE__ */ jsx(
|
|
98439
98439
|
PreviewButton,
|
|
@@ -102554,10 +102554,6 @@ const AutomationSelectTimeMain = ({ title: title2 = "Edit Schedule Time" }) => {
|
|
|
102554
102554
|
if (deliveryOption === null) {
|
|
102555
102555
|
if (automation2?.triggerMetadata && // Not needed i know but im terrified of TS errors now :nod_cry:
|
|
102556
102556
|
typeof automation2.triggerMetadata === "object" && automation2.triggerMetadata !== null && "scheduledAt" in automation2.triggerMetadata) {
|
|
102557
|
-
console.log(
|
|
102558
|
-
automation2?.triggerMetadata?.scheduledAt,
|
|
102559
|
-
automation2?.triggerType
|
|
102560
|
-
);
|
|
102561
102557
|
if (automation2?.triggerMetadata?.scheduledAt === "now" && automation2?.triggerType === AutomationTriggerType.ONE_TIME) {
|
|
102562
102558
|
setDeliveryOption("sendNow");
|
|
102563
102559
|
} else {
|
|
@@ -104475,13 +104471,17 @@ const EstimatedMatchesView = ({ countResponse }) => {
|
|
|
104475
104471
|
};
|
|
104476
104472
|
const RecipientsTable = ({ recipients }) => {
|
|
104477
104473
|
if (!recipients?.length) return null;
|
|
104474
|
+
const filteredRecipients = recipients.filter(
|
|
104475
|
+
(recipient) => recipient.firstName || recipient.lastName
|
|
104476
|
+
);
|
|
104477
|
+
if (!filteredRecipients.length) return null;
|
|
104478
104478
|
return /* @__PURE__ */ jsx("div", { className: "bg-foreground/5 rounded-lg h-full relative overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "absolute inset-0 w-full h-full overflow-y-auto", children: /* @__PURE__ */ jsxs("table", { className: "w-full", children: [
|
|
104479
104479
|
/* @__PURE__ */ jsx("thead", { className: "sticky top-0 bg-foreground/5 backdrop-blur-sm", children: /* @__PURE__ */ jsxs("tr", { children: [
|
|
104480
104480
|
/* @__PURE__ */ jsx("th", { className: "px-3 sm:px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wide", children: "Name" }),
|
|
104481
104481
|
/* @__PURE__ */ jsx("th", { className: "px-3 sm:px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wide", children: "Contact" })
|
|
104482
104482
|
] }) }),
|
|
104483
|
-
/* @__PURE__ */ jsx("tbody", { className: "divide-y divide-gray-200/50", children:
|
|
104484
|
-
/* @__PURE__ */ jsx("td", { className: "px-3 sm:px-4 py-3 text-sm text-gray-900", children:
|
|
104483
|
+
/* @__PURE__ */ jsx("tbody", { className: "divide-y divide-gray-200/50", children: filteredRecipients.map((recipient, index2) => /* @__PURE__ */ jsxs("tr", { className: "hover:bg-white/50 transition-colors", children: [
|
|
104484
|
+
/* @__PURE__ */ jsx("td", { className: "px-3 sm:px-4 py-3 text-sm text-gray-900", children: `${recipient.firstName || ""} ${recipient.lastName || ""}`.trim() }),
|
|
104485
104485
|
/* @__PURE__ */ jsx("td", { className: "px-3 sm:px-4 py-3", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-1.5 sm:gap-2", children: [
|
|
104486
104486
|
recipient.email && /* @__PURE__ */ jsx("span", { className: "px-2 sm:px-2.5 py-1 text-xs font-medium bg-blue-100/50 text-blue-700 rounded-lg", children: "Email" }),
|
|
104487
104487
|
recipient.phone && /* @__PURE__ */ jsx("span", { className: "px-2 sm:px-2.5 py-1 text-xs font-medium bg-green-100/50 text-green-700 rounded-lg", children: "Phone" })
|
|
@@ -109105,7 +109105,7 @@ const AutomationsEditorHeader = ({ showBackButton, onDuplicationCreated, onBefor
|
|
|
109105
109105
|
{
|
|
109106
109106
|
title: "You'll be able to send campaigns once your SMS application is approved.",
|
|
109107
109107
|
alertText: "SMS number approval pending",
|
|
109108
|
-
asChild:
|
|
109108
|
+
asChild: true,
|
|
109109
109109
|
children: /* @__PURE__ */ jsx(
|
|
109110
109110
|
Button$1,
|
|
109111
109111
|
{
|
|
@@ -109123,7 +109123,7 @@ const AutomationsEditorHeader = ({ showBackButton, onDuplicationCreated, onBefor
|
|
|
109123
109123
|
InfoTooltip,
|
|
109124
109124
|
{
|
|
109125
109125
|
alertText: "Before sending, please select a schedule time on the left sidebar",
|
|
109126
|
-
asChild:
|
|
109126
|
+
asChild: true,
|
|
109127
109127
|
children: /* @__PURE__ */ jsx(
|
|
109128
109128
|
Button$1,
|
|
109129
109129
|
{
|
|
@@ -109145,7 +109145,7 @@ const AutomationsEditorHeader = ({ showBackButton, onDuplicationCreated, onBefor
|
|
|
109145
109145
|
} else if (noSmsMessageBody) {
|
|
109146
109146
|
alertText = "Please add a message to your SMS communication";
|
|
109147
109147
|
}
|
|
109148
|
-
return /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx(InfoTooltip, { alertText, asChild:
|
|
109148
|
+
return /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx(InfoTooltip, { alertText, asChild: true, children: /* @__PURE__ */ jsx(
|
|
109149
109149
|
Button$1,
|
|
109150
109150
|
{
|
|
109151
109151
|
variant: "outline",
|
|
@@ -109203,7 +109203,7 @@ const AutomationsEditorHeader = ({ showBackButton, onDuplicationCreated, onBefor
|
|
|
109203
109203
|
};
|
|
109204
109204
|
const content2 = renderContent();
|
|
109205
109205
|
if (disableSwitch && infoOnDisabled && automation2.triggerType === AutomationTriggerType.TRIGGER_BASED) {
|
|
109206
|
-
return /* @__PURE__ */ jsx(InfoTooltip, { alertText: infoOnDisabled, children: content2 });
|
|
109206
|
+
return /* @__PURE__ */ jsx(InfoTooltip, { alertText: infoOnDisabled, asChild: true, children: content2 });
|
|
109207
109207
|
} else {
|
|
109208
109208
|
return content2;
|
|
109209
109209
|
}
|