@embedreach/components 0.1.84 → 0.1.86

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.
@@ -33132,13 +33132,13 @@ const StatsGrid = ({
33132
33132
  {
33133
33133
  icon: /* @__PURE__ */ jsx(iconDefinitions.OpenRate, { className: "w-4 h-4" }),
33134
33134
  title: "Open Rate",
33135
- value: `${statistics.email.openPercentage.toFixed(2)}%`,
33135
+ value: `${(statistics.email.openPercentage * 100).toFixed(2)}%`,
33136
33136
  tooltipText: "Percentage of recipients who opened the email out of total emails delivered"
33137
33137
  },
33138
33138
  {
33139
33139
  icon: /* @__PURE__ */ jsx(iconDefinitions.TotalBounceRate, { className: "w-4 h-4" }),
33140
33140
  title: "Total Bounce Rate",
33141
- value: `${(statistics.email.softBounceRate + statistics.email.hardBounceRate).toFixed(2)}%`,
33141
+ value: `${((statistics.email.softBounceRate + statistics.email.hardBounceRate) * 100).toFixed(2)}%`,
33142
33142
  tooltipText: "Percentage of emails that were not delivered due to permanent (hard) or temporary (soft) delivery failures"
33143
33143
  },
33144
33144
  {
@@ -33150,13 +33150,13 @@ const StatsGrid = ({
33150
33150
  {
33151
33151
  icon: /* @__PURE__ */ jsx(iconDefinitions.SpamComplies, { className: "w-4 h-4" }),
33152
33152
  title: "Spam Complaints",
33153
- value: `${statistics.email.spamComplaintRate.toFixed(2)}%`,
33153
+ value: `${(statistics.email.spamComplaintRate * 100).toFixed(2)}%`,
33154
33154
  tooltipText: "Percentage of recipients who marked this email as spam"
33155
33155
  },
33156
33156
  {
33157
33157
  icon: /* @__PURE__ */ jsx(iconDefinitions.UnsubscribeRate, { className: "w-4 h-4" }),
33158
33158
  title: "Unsubscribe Rate",
33159
- value: `${statistics.email.unsubscribedRate.toFixed(2)}%`,
33159
+ value: `${(statistics.email.unsubscribedRate * 100).toFixed(2)}%`,
33160
33160
  tooltipText: "Percentage of recipients who unsubscribed after receiving this email"
33161
33161
  }
33162
33162
  ],
@@ -49491,11 +49491,24 @@ const useAutomationSteps = ({
49491
49491
  hideBack: false,
49492
49492
  backDisabled: false,
49493
49493
  nextDisabled: () => {
49494
- return automation2.trigger_metadata?.trigger_type === AutomationTriggerType.ONE_TIME && !(automation2.trigger_metadata?.scheduled_at && new Date(automation2.trigger_metadata?.scheduled_at) > /* @__PURE__ */ new Date() && Boolean(
49494
+ if (!automation2.trigger_metadata) {
49495
+ return true;
49496
+ }
49497
+ if (automation2.trigger_metadata?.trigger_type !== AutomationTriggerType.ONE_TIME) {
49498
+ return false;
49499
+ }
49500
+ if (!automation2.trigger_metadata?.scheduled_at) {
49501
+ return true;
49502
+ }
49503
+ const hasValidSchedule = Boolean(
49504
+ automation2.trigger_metadata?.scheduled_at && new Date(automation2.trigger_metadata.scheduled_at) > /* @__PURE__ */ new Date()
49505
+ );
49506
+ const hasValidCommunicationGroup = Boolean(
49495
49507
  automation2.action_data?.some(
49496
49508
  (action) => action.action_type === "send_communication" && action.action_metadata.communication_group_id
49497
49509
  )
49498
- ));
49510
+ );
49511
+ return !(hasValidSchedule && hasValidCommunicationGroup);
49499
49512
  },
49500
49513
  thirdOptionText: "Save as Draft",
49501
49514
  thirdOptionOnClick: handleSaveAsDraft