@embedreach/components 0.2.38 → 0.2.40
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 +28 -26
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/chunks/index.js
CHANGED
|
@@ -81911,7 +81911,7 @@ const getAutomationSteps = ({
|
|
|
81911
81911
|
const smsChannelSender = smsChannelSenders.find(
|
|
81912
81912
|
(sender) => sender.channelSender.id === communicationGroup.smsChannelSenderId
|
|
81913
81913
|
);
|
|
81914
|
-
if (!smsChannelSender || smsChannelSender.smsApplication && smsChannelSender.smsApplication?.status !== SmsRegistrationApplicationStatus.APPROVED) {
|
|
81914
|
+
if (!smsChannelSender || smsChannelSender.smsApplication !== null && smsChannelSender.smsApplication?.status !== SmsRegistrationApplicationStatus.APPROVED) {
|
|
81915
81915
|
return "You cannot send this yet if you have selected a text channel and don't have an approved SMS application. Please save as draft and try again later.";
|
|
81916
81916
|
}
|
|
81917
81917
|
return void 0;
|
|
@@ -81920,10 +81920,12 @@ const getAutomationSteps = ({
|
|
|
81920
81920
|
const smsChannelSender = smsChannelSenders.find(
|
|
81921
81921
|
(sender) => sender.channelSender.id === communicationGroup.smsChannelSenderId
|
|
81922
81922
|
);
|
|
81923
|
-
if (
|
|
81924
|
-
|
|
81923
|
+
if (communicationGroup.smsChannelSenderId) {
|
|
81924
|
+
if (!smsChannelSender || smsChannelSender.smsApplication !== null && smsChannelSender.smsApplication?.status !== SmsRegistrationApplicationStatus.APPROVED) {
|
|
81925
|
+
return true;
|
|
81926
|
+
}
|
|
81925
81927
|
}
|
|
81926
|
-
if (communicationGroup.smsChannelSenderId === null
|
|
81928
|
+
if (communicationGroup.smsChannelSenderId === null && communicationGroup.emailChannelSenderId === null) {
|
|
81927
81929
|
return true;
|
|
81928
81930
|
}
|
|
81929
81931
|
return false;
|
|
@@ -82207,27 +82209,30 @@ const OneTimeWizardMain = ({ onFinish, getExtraMergeFields, onBeforeSchedule })
|
|
|
82207
82209
|
) });
|
|
82208
82210
|
}
|
|
82209
82211
|
const handleScheduleAutomation = async () => {
|
|
82210
|
-
if (communicationGroup.emailChannelSenderId === null
|
|
82211
|
-
|
|
82212
|
-
|
|
82213
|
-
|
|
82214
|
-
|
|
82215
|
-
|
|
82216
|
-
|
|
82217
|
-
|
|
82218
|
-
|
|
82212
|
+
if (communicationGroup.emailChannelSenderId === null && communicationGroup.smsChannelSenderId === null) {
|
|
82213
|
+
toast({
|
|
82214
|
+
title: "Oops!",
|
|
82215
|
+
description: "Please select an email sender or sms sender",
|
|
82216
|
+
variant: "destructive"
|
|
82217
|
+
});
|
|
82218
|
+
return;
|
|
82219
|
+
}
|
|
82220
|
+
const smsChannelSenders = getSmsChannelSenders({
|
|
82221
|
+
channelSenders: channelSenders?.results ?? [],
|
|
82222
|
+
channelAccounts: channelAccounts?.results ?? [],
|
|
82223
|
+
smsApplication
|
|
82224
|
+
});
|
|
82225
|
+
if (communicationGroup.smsChannelSenderId) {
|
|
82226
|
+
const smsChannelSender = smsChannelSenders.find(
|
|
82227
|
+
(sender) => sender.channelSender.id === communicationGroup.smsChannelSenderId
|
|
82228
|
+
);
|
|
82229
|
+
if (smsChannelSender?.smsApplication && smsChannelSender?.smsApplication.status !== SmsRegistrationApplicationStatus.APPROVED) {
|
|
82219
82230
|
toast({
|
|
82220
82231
|
title: "Oops!",
|
|
82221
82232
|
description: "You cant schedule a communication with a pending sms application. Please save as a draft and re-try once the application is approved."
|
|
82222
82233
|
});
|
|
82223
|
-
|
|
82224
|
-
toast({
|
|
82225
|
-
title: "Oops!",
|
|
82226
|
-
description: "Please select an sms sender",
|
|
82227
|
-
variant: "destructive"
|
|
82228
|
-
});
|
|
82234
|
+
return;
|
|
82229
82235
|
}
|
|
82230
|
-
return;
|
|
82231
82236
|
}
|
|
82232
82237
|
if (onBeforeSchedule) {
|
|
82233
82238
|
try {
|
|
@@ -82409,10 +82414,7 @@ const OneTimeWizardWrapper = ({ children: children2, actionId }) => {
|
|
|
82409
82414
|
const OneTimeBroadcast = () => {
|
|
82410
82415
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
82411
82416
|
/* @__PURE__ */ jsx("div", { className: styles$4.iconWrapper, children: /* @__PURE__ */ jsx(IconDefinitions.OneTimeBroadcast, {}) }),
|
|
82412
|
-
/* @__PURE__ */
|
|
82413
|
-
t$1("engage:broadcast"),
|
|
82414
|
-
" Broadcast"
|
|
82415
|
-
] }),
|
|
82417
|
+
/* @__PURE__ */ jsx("h3", { className: styles$4.cardTitle, children: t$1("engage:broadcast") }),
|
|
82416
82418
|
/* @__PURE__ */ jsx("p", { className: styles$4.cardDescription, children: "Send a single message to your current list, like announcing a sale or newsletter." })
|
|
82417
82419
|
] });
|
|
82418
82420
|
};
|
|
@@ -85757,9 +85759,9 @@ const AutomationsEditorHeader = ({ showBackButton, onDuplicationCreated, onBefor
|
|
|
85757
85759
|
const smsChannelSender = smsChannelSenders.find(
|
|
85758
85760
|
(sender) => sender.channelSender.id === communicationGroup?.smsChannelSenderId
|
|
85759
85761
|
);
|
|
85760
|
-
if (!automation2.triggerMetadata || automation2.triggerMetadata?.triggerType === AutomationTriggerType.ONE_TIME && !automation2.triggerMetadata?.scheduledAt || !communicationGroup?.emailChannelSenderId && !communicationGroup?.smsChannelSenderId || smsChannelSender && smsChannelSender?.smsApplication?.status !== SmsRegistrationApplicationStatus.APPROVED) {
|
|
85762
|
+
if (!automation2.triggerMetadata || automation2.triggerMetadata?.triggerType === AutomationTriggerType.ONE_TIME && !automation2.triggerMetadata?.scheduledAt || !communicationGroup?.emailChannelSenderId && !communicationGroup?.smsChannelSenderId || smsChannelSender && smsChannelSender?.smsApplication && smsChannelSender?.smsApplication?.status !== SmsRegistrationApplicationStatus.APPROVED) {
|
|
85761
85763
|
const renderInfoTooltip = () => {
|
|
85762
|
-
if (smsChannelSender?.smsApplication?.status !== SmsRegistrationApplicationStatus.APPROVED) {
|
|
85764
|
+
if (smsChannelSender?.smsApplication && smsChannelSender.smsApplication?.status !== SmsRegistrationApplicationStatus.APPROVED) {
|
|
85763
85765
|
return /* @__PURE__ */ jsx(
|
|
85764
85766
|
InfoTooltip,
|
|
85765
85767
|
{
|