@embedreach/components 0.1.80 → 0.1.82

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.
@@ -45109,7 +45109,7 @@ const AutomationContent = ({
45109
45109
  setLoading2(false);
45110
45110
  }
45111
45111
  }, [communicationGroup, channelSenders]);
45112
- if (loading2 || isLoadingCommunicationGroup || isLoadingCommunicationGroup) {
45112
+ if (loading2 || isLoadingCommunicationGroup) {
45113
45113
  return /* @__PURE__ */ jsx(BasicLoader, { text: ["Fetching Automation", "Finishing up"] });
45114
45114
  }
45115
45115
  return /* @__PURE__ */ jsx("div", { className: "p-6 bg-background", children: !emailData && !smsData ? /* @__PURE__ */ jsxs("div", { className: "py-12 flex flex-col items-center justify-center p-8 text-center", children: [
@@ -47076,6 +47076,7 @@ const StripoWrapper = ({
47076
47076
  console.error("Failed to compile email:", error2);
47077
47077
  return;
47078
47078
  }
47079
+ console.log("updating email html body", html);
47079
47080
  updateCommunicationGroup2({
47080
47081
  groupId: template2.communicationGroupId,
47081
47082
  params: {
@@ -47265,6 +47266,7 @@ const EmailPreview = ({
47265
47266
  setIsUpdating(true);
47266
47267
  const updateGroup = async () => {
47267
47268
  try {
47269
+ console.log("updating email channel sender id", fromEmail);
47268
47270
  updateCommunicationGroup2({
47269
47271
  groupId: communicationGroup.id,
47270
47272
  params: {
@@ -47314,6 +47316,7 @@ const EmailPreview = ({
47314
47316
  if (allEmailSenders[0]) {
47315
47317
  const channelSender = allEmailSenders[0];
47316
47318
  setFromEmail(channelSender.id);
47319
+ console.log("updating email channel sender id", channelSender.id);
47317
47320
  updateCommunicationGroup2({
47318
47321
  groupId: communicationGroup.id,
47319
47322
  params: {
@@ -47871,6 +47874,7 @@ const SMSPreview = ({ automation: automation2, iconDefinitions, mergeFieldsRespo
47871
47874
  setIsUpdating(true);
47872
47875
  const communicationGroupId = _getCommunicationGroupFromAutomation();
47873
47876
  if (communicationGroupId) {
47877
+ console.log("updating sms channel sender id", debouncedFromNumber);
47874
47878
  updateCommunicationGroup2({
47875
47879
  groupId: communicationGroupId,
47876
47880
  params: {
@@ -47915,6 +47919,7 @@ const SMSPreview = ({ automation: automation2, iconDefinitions, mergeFieldsRespo
47915
47919
  if (smsChannelSenders2?.[0]) {
47916
47920
  setFromNumber(smsChannelSenders2[0].id);
47917
47921
  if (communicationGroup?.id) {
47922
+ console.log("updating sms channel sender id to something newww");
47918
47923
  updateCommunicationGroup2({
47919
47924
  groupId: communicationGroup.id,
47920
47925
  params: { sms_channel_sender_id: smsChannelSenders2[0].id }
@@ -48087,6 +48092,7 @@ const EditCampaignContent = ({
48087
48092
  return;
48088
48093
  }
48089
48094
  if (!selectedChannels.includes("email")) {
48095
+ console.log("updating email channel sender id to null");
48090
48096
  updateCommunicationGroup2({
48091
48097
  groupId: finalCommunicationGroupId,
48092
48098
  params: {
@@ -48095,6 +48101,7 @@ const EditCampaignContent = ({
48095
48101
  });
48096
48102
  }
48097
48103
  if (!selectedChannels.includes("sms")) {
48104
+ console.log("updating sms channel sender id to null");
48098
48105
  updateCommunicationGroup2({
48099
48106
  groupId: finalCommunicationGroupId,
48100
48107
  params: {
@@ -48160,6 +48167,7 @@ const EditCampaignContent = ({
48160
48167
  variant: "destructive"
48161
48168
  });
48162
48169
  }
48170
+ console.log("updating extra merge fields");
48163
48171
  updateCommunicationGroup2({
48164
48172
  groupId: communicationGroup?.id,
48165
48173
  params: { extra_merge_fields: extraFields }
@@ -48241,7 +48249,8 @@ const EditCampaignContent = ({
48241
48249
  setMergeFieldsResponse(updatedMergeFields);
48242
48250
  });
48243
48251
  } else {
48244
- if (communicationGroup?.id) {
48252
+ if (communicationGroup?.id && communicationGroup.extra_merge_fields !== null) {
48253
+ console.log("updating extra merge fields to null");
48245
48254
  updateCommunicationGroup2({
48246
48255
  groupId: communicationGroup?.id,
48247
48256
  params: { extra_merge_fields: null }