@wlloyalty/wll-react-sdk 1.0.113 → 1.1.0

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.d.ts CHANGED
@@ -139,7 +139,7 @@ declare class RoundupTileConfig {
139
139
  amountPrefix?: string | null;
140
140
  amountSuffix?: string | null;
141
141
  artworkUrl?: string | null;
142
- amount?: number;
142
+ balance?: number;
143
143
  ctaLink?: string | null;
144
144
  ctaLinkTarget?: CTALinkTarget;
145
145
  }
package/dist/native.js CHANGED
@@ -5074,6 +5074,22 @@ TierTile.Full = TierTileFull;
5074
5074
  TierTile.Half = TierTileHalf;
5075
5075
  TierTile.Empty = TierTileEmpty;
5076
5076
 
5077
+ /**
5078
+ * Renders formatted points value for a Roundup Tile.
5079
+ *
5080
+ * @returns JSX.Element or null if points are undefined or zero
5081
+ */
5082
+ var RoundupTileFormattedPoints = function () {
5083
+ var tileContext = useTileContext();
5084
+ if (!isContextValid(tileContext))
5085
+ return null;
5086
+ var _a = tileContext.configuration, _b = _a.balance, balance = _b === void 0 ? 0 : _b, _c = _a.amountPrefix, amountPrefix = _c === void 0 ? '' : _c, _d = _a.amountSuffix, amountSuffix = _d === void 0 ? '' : _d;
5087
+ if (balance === undefined)
5088
+ return null;
5089
+ var fullPointsText = "".concat(amountPrefix).concat(cleanNumber(balance)).concat(amountSuffix).trim();
5090
+ return (jsxRuntimeExports.jsx(reactNative.View, { testID: "roundup-tile-amount", role: "article", accessibilityLabel: "Amount: ".concat(fullPointsText), children: jsxRuntimeExports.jsx(Row, { align: "center", justify: "start", children: jsxRuntimeExports.jsx(Text, { variant: "caption", testID: "roundup-tile-value", children: fullPointsText }) }) }));
5091
+ };
5092
+
5077
5093
  /**
5078
5094
  * Custom hook that returns the styles for the RoundupTile component.
5079
5095
  * Applies responsive styling based on the current device.
@@ -5137,23 +5153,6 @@ var useRoundupTileStyles = function (isFullSize) {
5137
5153
  });
5138
5154
  };
5139
5155
 
5140
- /**
5141
- * Renders formatted points value for a Roundup Tile.
5142
- *
5143
- * @returns JSX.Element or null if points are undefined or zero
5144
- */
5145
- var RoundupTileFormattedPoints = function () {
5146
- var styles = useRoundupTileStyles();
5147
- var tileContext = useTileContext();
5148
- if (!isContextValid(tileContext))
5149
- return null;
5150
- var _a = tileContext.configuration, _b = _a.amountPrefix, amountPrefix = _b === void 0 ? '' : _b, _c = _a.amountSuffix, amountSuffix = _c === void 0 ? '' : _c, _d = _a.amount, amount = _d === void 0 ? 0 : _d;
5151
- if (amount === undefined)
5152
- return null;
5153
- var fullPointsText = "".concat(amountPrefix).concat(amount, " ").concat(amountSuffix).trim();
5154
- return (jsxRuntimeExports.jsx(reactNative.View, { testID: "roundup-tile-amount", role: "article", accessibilityLabel: "Amount: ".concat(fullPointsText), children: jsxRuntimeExports.jsxs(Row, { align: "center", justify: "start", children: [amountPrefix ? (jsxRuntimeExports.jsx(Text, { variant: "caption", testID: "roundup-tile-prefix", children: amountPrefix })) : null, jsxRuntimeExports.jsx(Text, { variant: "caption", testID: "roundup-tile-value", children: amount }), amountSuffix ? (jsxRuntimeExports.jsx(Text, { variant: "caption", style: styles.suffix, testID: "roundup-tile-suffix", children: amountSuffix })) : null] }) }));
5155
- };
5156
-
5157
5156
  /**
5158
5157
  * Renders the media of a Points Tile.
5159
5158
  *