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.js CHANGED
@@ -58136,13 +58136,34 @@ const OverlayDropdown = _ref => {
58136
58136
  }, ["Template Offer", "Last defined by you"].includes(group.overlayName) && /*#__PURE__*/React__default["default"].createElement(SectionTitle, null, group.overlayName), group.items.map(item => {
58137
58137
  const isDigitalCoupon = group.templateType === 3 && editableDigitalCoupon;
58138
58138
  const hasAppliedCoupons = appliedCouponsCount > 0;
58139
- const penColor = isDigitalCoupon && hasAppliedCoupons ? "#FF8C00" : item.value === value ? "#fff" : "#212121";
58140
-
58141
- // Update label to show count for digital coupons
58142
58139
  let displayText = item.label;
58143
58140
  if (isDigitalCoupon && appliedCouponsCount > 0) {
58144
58141
  displayText = `Digital Coupon/s (${appliedCouponsCount})`;
58145
58142
  }
58143
+ let iconToShow = null;
58144
+ if (group.templateType === 2) {
58145
+ iconToShow = /*#__PURE__*/React__default["default"].createElement(ChervronRightIcon, {
58146
+ fill: item.value === value ? "#fff" : "#212121"
58147
+ });
58148
+ } else if (isDigitalCoupon) {
58149
+ if (hasAppliedCoupons) {
58150
+ iconToShow = /*#__PURE__*/React__default["default"].createElement(PenIcon, {
58151
+ color: item.value === value ? "#fff" : "#212121",
58152
+ width: "16",
58153
+ height: "16"
58154
+ });
58155
+ } else {
58156
+ iconToShow = /*#__PURE__*/React__default["default"].createElement(ChervronRightIcon, {
58157
+ fill: item.value === value ? "#fff" : "#212121"
58158
+ });
58159
+ }
58160
+ } else if (item.value === value) {
58161
+ iconToShow = /*#__PURE__*/React__default["default"].createElement(OkIcon, {
58162
+ width: "22px",
58163
+ height: "22px",
58164
+ color: "#fff"
58165
+ });
58166
+ }
58146
58167
  return /*#__PURE__*/React__default["default"].createElement(DropdownItem, {
58147
58168
  key: item.value,
58148
58169
  selected: item.value === value,
@@ -58181,17 +58202,7 @@ const OverlayDropdown = _ref => {
58181
58202
  }, /*#__PURE__*/React__default["default"].createElement(TruncatedText, {
58182
58203
  onMouseEnter: () => setHoveredText(displayText),
58183
58204
  onMouseLeave: () => setHoveredText(null)
58184
- }, displayText), group.templateType === 2 ? /*#__PURE__*/React__default["default"].createElement(ChervronRightIcon, {
58185
- fill: item.value === value ? "#fff" : "#212121"
58186
- }) : isDigitalCoupon ? /*#__PURE__*/React__default["default"].createElement(PenIcon, {
58187
- color: penColor,
58188
- width: "16",
58189
- height: "16"
58190
- }) : item.value === value && /*#__PURE__*/React__default["default"].createElement(OkIcon, {
58191
- width: "22px",
58192
- height: "22px",
58193
- color: "#fff"
58194
- }));
58205
+ }, displayText), iconToShow);
58195
58206
  })))), templateDialog && /*#__PURE__*/React__default["default"].createElement(OverlayTemplateDialog, {
58196
58207
  open: true,
58197
58208
  onClose: () => setTemplateDialog(null),