@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 +1 -1
- package/dist/native.js +16 -17
- package/dist/native.js.map +1 -1
- package/dist/types/mocks/tiles/roundupTile.d.ts +10 -3
- package/dist/types/types/tile.d.ts +1 -1
- package/dist/types/utils/pointsHelpers.d.ts +6 -0
- package/dist/web.js +30 -38
- package/dist/web.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
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
|
*
|