@wlloyalty/wll-react-sdk 1.0.34 → 1.0.36
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 +2 -2
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -189,8 +189,8 @@ declare class BannerTileConfig {
|
|
|
189
189
|
declare class PointsTileConfig {
|
|
190
190
|
title?: string | null;
|
|
191
191
|
multiplier?: number;
|
|
192
|
-
|
|
193
|
-
|
|
192
|
+
pointsPrefix?: string | null;
|
|
193
|
+
pointsSuffix?: string | null;
|
|
194
194
|
artworkUrl?: string | null;
|
|
195
195
|
points?: number;
|
|
196
196
|
}
|
package/dist/index.js
CHANGED
|
@@ -19011,15 +19011,15 @@ var useHandleTilePress = function (tile, ctaLink, ctaLinkTarget) {
|
|
|
19011
19011
|
if ((tile === null || tile === void 0 ? void 0 : tile.type) === exports.TileType.Reward) {
|
|
19012
19012
|
var config = tile.configuration;
|
|
19013
19013
|
if (config === null || config === void 0 ? void 0 : config.rewardId) {
|
|
19014
|
-
var
|
|
19015
|
-
return handleNavigation(
|
|
19014
|
+
var url = "/reward?id=".concat(config.rewardId);
|
|
19015
|
+
return handleNavigation(url, exports.CTALinkTarget.sameWindow);
|
|
19016
19016
|
}
|
|
19017
19017
|
}
|
|
19018
19018
|
if ((tile === null || tile === void 0 ? void 0 : tile.type) === exports.TileType.RewardCategory) {
|
|
19019
19019
|
var config = tile.configuration;
|
|
19020
|
+
var url = "/category?id=".concat(config.rewardCategoryId);
|
|
19020
19021
|
if (config === null || config === void 0 ? void 0 : config.rewardCategoryId) {
|
|
19021
|
-
|
|
19022
|
-
return handleNavigation(link, exports.CTALinkTarget.sameWindow);
|
|
19022
|
+
return handleNavigation(url, exports.CTALinkTarget.sameWindow);
|
|
19023
19023
|
}
|
|
19024
19024
|
}
|
|
19025
19025
|
if (ctaLink) {
|
|
@@ -20330,16 +20330,16 @@ var PointsTileFormattedPoints = function () {
|
|
|
20330
20330
|
var configuration = useTileContext().configuration;
|
|
20331
20331
|
var _a = configuration,
|
|
20332
20332
|
multiplier = _a.multiplier,
|
|
20333
|
-
|
|
20334
|
-
|
|
20333
|
+
pointsPrefix = _a.pointsPrefix,
|
|
20334
|
+
pointsSuffix = _a.pointsSuffix,
|
|
20335
20335
|
points = _a.points;
|
|
20336
20336
|
var calculatedPoints = points !== undefined ? points * (multiplier !== null && multiplier !== void 0 ? multiplier : 1) : null;
|
|
20337
20337
|
if (calculatedPoints === null) return null;
|
|
20338
20338
|
return /*#__PURE__*/React__namespace.createElement(Text, {
|
|
20339
20339
|
variant: "caption"
|
|
20340
|
-
},
|
|
20340
|
+
}, pointsPrefix !== null && pointsPrefix !== void 0 ? pointsPrefix : '', /*#__PURE__*/React__namespace.createElement(Row, null, calculatedPoints, /*#__PURE__*/React__namespace.createElement(Text, {
|
|
20341
20341
|
style: styles.suffix
|
|
20342
|
-
},
|
|
20342
|
+
}, pointsSuffix !== null && pointsSuffix !== void 0 ? pointsSuffix : 'pts')));
|
|
20343
20343
|
};
|
|
20344
20344
|
|
|
20345
20345
|
var PointsTileTitle = function () {
|