sag_components 2.0.0-beta292 → 2.0.0-beta293

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/index.esm.js CHANGED
@@ -58126,13 +58126,34 @@ const OverlayDropdown = _ref => {
58126
58126
  }, ["Template Offer", "Last defined by you"].includes(group.overlayName) && /*#__PURE__*/React$1.createElement(SectionTitle, null, group.overlayName), group.items.map(item => {
58127
58127
  const isDigitalCoupon = group.templateType === 3 && editableDigitalCoupon;
58128
58128
  const hasAppliedCoupons = appliedCouponsCount > 0;
58129
- const penColor = isDigitalCoupon && hasAppliedCoupons ? "#FF8C00" : item.value === value ? "#fff" : "#212121";
58130
-
58131
- // Update label to show count for digital coupons
58132
58129
  let displayText = item.label;
58133
58130
  if (isDigitalCoupon && appliedCouponsCount > 0) {
58134
58131
  displayText = `Digital Coupon/s (${appliedCouponsCount})`;
58135
58132
  }
58133
+ let iconToShow = null;
58134
+ if (group.templateType === 2) {
58135
+ iconToShow = /*#__PURE__*/React$1.createElement(ChervronRightIcon, {
58136
+ fill: item.value === value ? "#fff" : "#212121"
58137
+ });
58138
+ } else if (isDigitalCoupon) {
58139
+ if (hasAppliedCoupons) {
58140
+ iconToShow = /*#__PURE__*/React$1.createElement(PenIcon, {
58141
+ color: item.value === value ? "#fff" : "#212121",
58142
+ width: "16",
58143
+ height: "16"
58144
+ });
58145
+ } else {
58146
+ iconToShow = /*#__PURE__*/React$1.createElement(ChervronRightIcon, {
58147
+ fill: item.value === value ? "#fff" : "#212121"
58148
+ });
58149
+ }
58150
+ } else if (item.value === value) {
58151
+ iconToShow = /*#__PURE__*/React$1.createElement(OkIcon, {
58152
+ width: "22px",
58153
+ height: "22px",
58154
+ color: "#fff"
58155
+ });
58156
+ }
58136
58157
  return /*#__PURE__*/React$1.createElement(DropdownItem, {
58137
58158
  key: item.value,
58138
58159
  selected: item.value === value,
@@ -58171,17 +58192,7 @@ const OverlayDropdown = _ref => {
58171
58192
  }, /*#__PURE__*/React$1.createElement(TruncatedText, {
58172
58193
  onMouseEnter: () => setHoveredText(displayText),
58173
58194
  onMouseLeave: () => setHoveredText(null)
58174
- }, displayText), group.templateType === 2 ? /*#__PURE__*/React$1.createElement(ChervronRightIcon, {
58175
- fill: item.value === value ? "#fff" : "#212121"
58176
- }) : isDigitalCoupon ? /*#__PURE__*/React$1.createElement(PenIcon, {
58177
- color: penColor,
58178
- width: "16",
58179
- height: "16"
58180
- }) : item.value === value && /*#__PURE__*/React$1.createElement(OkIcon, {
58181
- width: "22px",
58182
- height: "22px",
58183
- color: "#fff"
58184
- }));
58195
+ }, displayText), iconToShow);
58185
58196
  })))), templateDialog && /*#__PURE__*/React$1.createElement(OverlayTemplateDialog, {
58186
58197
  open: true,
58187
58198
  onClose: () => setTemplateDialog(null),