@wlloyalty/wll-react-sdk 1.0.103 → 1.0.104
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 -0
- package/dist/native.js +83 -42
- package/dist/native.js.map +1 -1
- package/dist/types/mocks/tiles/badgeTile.d.ts +1 -0
- package/dist/types/types/tile.d.ts +1 -0
- package/dist/types/utils/transforms.d.ts +13 -0
- package/dist/web.js +85 -43
- package/dist/web.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/native.js
CHANGED
|
@@ -2649,7 +2649,7 @@ var BaseTileBody = function (props) {
|
|
|
2649
2649
|
return undefined;
|
|
2650
2650
|
return isDesktop ? 3 : isTablet ? 4 : 3;
|
|
2651
2651
|
};
|
|
2652
|
-
return (jsxRuntimeExports.jsx(Text, __assign({ variant: "body" }, props, {
|
|
2652
|
+
return (jsxRuntimeExports.jsx(Text, __assign({ variant: "body" }, props, { role: "article", accessibilityLabel: body, numberOfLines: getNumberOfLines(), testID: "tile-body", children: body })));
|
|
2653
2653
|
};
|
|
2654
2654
|
|
|
2655
2655
|
/**
|
|
@@ -2761,7 +2761,7 @@ var BaseTileContent = function (_a) {
|
|
|
2761
2761
|
justifyContent: 'center',
|
|
2762
2762
|
height: !artworkUrl ? '100%' : undefined,
|
|
2763
2763
|
},
|
|
2764
|
-
],
|
|
2764
|
+
], role: "none", children: children }));
|
|
2765
2765
|
};
|
|
2766
2766
|
|
|
2767
2767
|
/**
|
|
@@ -2784,7 +2784,7 @@ var BaseTileHeader = function (_a) {
|
|
|
2784
2784
|
return null;
|
|
2785
2785
|
var dynamicStyles = useBaseTileStyles();
|
|
2786
2786
|
var combinedStyle = __assign(__assign(__assign({}, dynamicStyles.header), { marginTop: sizeInfo.isHalfSize ? 0 : dynamicStyles.header.marginTop }), (sizeInfo.isHalfSize ? { alignItems: 'center' } : {}));
|
|
2787
|
-
return (jsxRuntimeExports.jsx(reactNative.View, { style: combinedStyle, testID: "tile-header",
|
|
2787
|
+
return (jsxRuntimeExports.jsx(reactNative.View, { style: combinedStyle, testID: "tile-header", role: "heading", children: children }));
|
|
2788
2788
|
};
|
|
2789
2789
|
|
|
2790
2790
|
/**
|
|
@@ -2801,7 +2801,7 @@ var BaseTileMedia = function (props) {
|
|
|
2801
2801
|
var styles = useBaseTileStyles();
|
|
2802
2802
|
if (!artworkUrl)
|
|
2803
2803
|
return null;
|
|
2804
|
-
return (jsxRuntimeExports.jsx(ProgressiveImage, __assign({}, props, { source: { uri: artworkUrl }, testID: "tile-media", style: [props.style, baseStyles.media, styles.media], alt: "Content image".concat(title ? " for ".concat(title) : ''),
|
|
2804
|
+
return (jsxRuntimeExports.jsx(ProgressiveImage, __assign({}, props, { source: { uri: artworkUrl }, testID: "tile-media", style: [props.style, baseStyles.media, styles.media], alt: "Content image".concat(title ? " for ".concat(title) : ''), role: "img" })));
|
|
2805
2805
|
};
|
|
2806
2806
|
|
|
2807
2807
|
/**
|
|
@@ -2824,7 +2824,7 @@ var BaseTileTitle = function () {
|
|
|
2824
2824
|
// Don't show title for half tiles with image
|
|
2825
2825
|
if ((isHalfSize && artworkUrl) || !title)
|
|
2826
2826
|
return null;
|
|
2827
|
-
return (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(Text, { variant: "title",
|
|
2827
|
+
return (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(Text, { variant: "title", role: "heading", accessibilityLabel: title, numberOfLines: 1, testID: "tile-title", children: title }), ctaLink && (jsxRuntimeExports.jsx(Icon, { name: "ChevronRight", color: (_b = (_a = sdk.theme) === null || _a === void 0 ? void 0 : _a.derivedSurfaceText) === null || _b === void 0 ? void 0 : _b[20], accessibilityLabel: "View details" }))] }));
|
|
2828
2828
|
};
|
|
2829
2829
|
|
|
2830
2830
|
/**
|
|
@@ -2877,7 +2877,7 @@ var BaseTileContainer = function (_a) {
|
|
|
2877
2877
|
layout,
|
|
2878
2878
|
style,
|
|
2879
2879
|
];
|
|
2880
|
-
}, onPress: handlePress, disabled: tile.type !== 'REWARD' && tile.type !== 'REWARD_CATEGORY' && !ctaLink, accessible: true,
|
|
2880
|
+
}, onPress: handlePress, disabled: tile.type !== 'REWARD' && tile.type !== 'REWARD_CATEGORY' && !ctaLink, accessible: true, role: "button", accessibilityLabel: "".concat(title).concat(ctaLink ? ' - Click to open' : ''), accessibilityState: { disabled: !ctaLink }, children: children }));
|
|
2881
2881
|
};
|
|
2882
2882
|
/**
|
|
2883
2883
|
* BaseTileRoot component to provide context and render children.
|
|
@@ -3102,6 +3102,63 @@ function withTileFetching(WrappedComponent) {
|
|
|
3102
3102
|
};
|
|
3103
3103
|
}
|
|
3104
3104
|
|
|
3105
|
+
/**
|
|
3106
|
+
* Sorts tiles by priority (higher priority first) and maintains original order for equal priorities
|
|
3107
|
+
* @param tiles Array of tiles to sort
|
|
3108
|
+
* @returns Sorted array of tiles
|
|
3109
|
+
*/
|
|
3110
|
+
var sortByPriority = function (tiles) {
|
|
3111
|
+
return __spreadArray([], tiles, true).sort(function (a, b) {
|
|
3112
|
+
// Sort by priority (higher priority first)
|
|
3113
|
+
if (a.priority !== b.priority) {
|
|
3114
|
+
return b.priority - a.priority;
|
|
3115
|
+
}
|
|
3116
|
+
// If priorities are equal, maintain original order
|
|
3117
|
+
return tiles.indexOf(a) - tiles.indexOf(b);
|
|
3118
|
+
});
|
|
3119
|
+
};
|
|
3120
|
+
/**
|
|
3121
|
+
* Transforms locale to a locale that is supported by the browser
|
|
3122
|
+
* @param locale Two-letter locale code to transform (en, fr, etc.)
|
|
3123
|
+
* @returns Full locale string (e.g., en-GB, fr-FR)
|
|
3124
|
+
*/
|
|
3125
|
+
var transformLocale = function (locale) {
|
|
3126
|
+
var localeMapping = {
|
|
3127
|
+
en: 'en-GB',
|
|
3128
|
+
fr: 'fr-FR',
|
|
3129
|
+
es: 'es-ES',
|
|
3130
|
+
de: 'de-DE',
|
|
3131
|
+
it: 'it-IT',
|
|
3132
|
+
pt: 'pt-PT',
|
|
3133
|
+
us: 'en-US',
|
|
3134
|
+
};
|
|
3135
|
+
var languageCode = (locale !== null && locale !== void 0 ? locale : 'en').toLowerCase();
|
|
3136
|
+
return localeMapping[languageCode] || 'en-GB';
|
|
3137
|
+
};
|
|
3138
|
+
/**
|
|
3139
|
+
* Formats a date string to a localized date string based on user locale
|
|
3140
|
+
* @param date Date string to format
|
|
3141
|
+
* @param userLocale User's locale (defaults to 'en')
|
|
3142
|
+
* @returns Formatted date string or fallback message
|
|
3143
|
+
*/
|
|
3144
|
+
var handleLastEarnedDate = function (date, userLocale) {
|
|
3145
|
+
if (userLocale === void 0) { userLocale = 'en'; }
|
|
3146
|
+
if (!date)
|
|
3147
|
+
return 'Date not available';
|
|
3148
|
+
try {
|
|
3149
|
+
var formattedLocale = transformLocale(userLocale);
|
|
3150
|
+
var dateObj = new Date(date);
|
|
3151
|
+
if (isNaN(dateObj.getTime())) {
|
|
3152
|
+
return 'Invalid Date';
|
|
3153
|
+
}
|
|
3154
|
+
return dateObj.toLocaleDateString(formattedLocale);
|
|
3155
|
+
}
|
|
3156
|
+
catch (error) {
|
|
3157
|
+
console.error('Error formatting date:', error);
|
|
3158
|
+
return 'Invalid Date';
|
|
3159
|
+
}
|
|
3160
|
+
};
|
|
3161
|
+
|
|
3105
3162
|
/**
|
|
3106
3163
|
* Custom hook that returns the styles for the BadgeTile component.
|
|
3107
3164
|
* Applies responsive styling based on the current device.
|
|
@@ -3165,7 +3222,7 @@ var BadgeTileDateEarned = function () {
|
|
|
3165
3222
|
var theme = useWllSdk().theme;
|
|
3166
3223
|
if (!isContextValid(tileContext))
|
|
3167
3224
|
return null;
|
|
3168
|
-
var _a = tileContext.configuration, count = _a.count, awardedDatePrefix = _a.awardedDatePrefix,
|
|
3225
|
+
var _a = tileContext.configuration, count = _a.count, awardedDatePrefix = _a.awardedDatePrefix, lastEarnedAt = _a.lastEarnedAt, badgeNotEarnedMessage = _a.badgeNotEarnedMessage, type = _a.type, locale = _a.locale;
|
|
3169
3226
|
// Don't show for Latest type with count=0
|
|
3170
3227
|
if (type === exports.BadgeTileType.Latest && count === 0) {
|
|
3171
3228
|
return null;
|
|
@@ -3181,10 +3238,10 @@ var BadgeTileDateEarned = function () {
|
|
|
3181
3238
|
var textColor = getReadableTextColor(backgroundColor);
|
|
3182
3239
|
var displayText = count === 0
|
|
3183
3240
|
? badgeNotEarnedMessage
|
|
3184
|
-
: "".concat(awardedDatePrefix, " ").concat(
|
|
3241
|
+
: "".concat(awardedDatePrefix, " ").concat(handleLastEarnedDate(lastEarnedAt, locale));
|
|
3185
3242
|
var accessibilityLabel = count === 0
|
|
3186
3243
|
? 'Badge not yet earned'
|
|
3187
|
-
: "Badge earned on ".concat(
|
|
3244
|
+
: "Badge earned on ".concat(handleLastEarnedDate(lastEarnedAt, locale));
|
|
3188
3245
|
return (jsxRuntimeExports.jsx(reactNative.View, { style: containerStyle, accessible: true, accessibilityLabel: accessibilityLabel, testID: "badge-tile-date-earned", children: jsxRuntimeExports.jsx(Text, { variant: "label", style: [styles.dateEarnedText, { color: textColor }], numberOfLines: 1, ellipsizeMode: "tail", accessibilityElementsHidden: true, importantForAccessibility: "no-hide-descendants", children: displayText }) }));
|
|
3189
3246
|
};
|
|
3190
3247
|
|
|
@@ -3366,7 +3423,7 @@ var BannerTileDescription = function () {
|
|
|
3366
3423
|
var description = bannerContext.configuration.description;
|
|
3367
3424
|
if (!description)
|
|
3368
3425
|
return null;
|
|
3369
|
-
return (jsxRuntimeExports.jsx(Text, { style: styles.description,
|
|
3426
|
+
return (jsxRuntimeExports.jsx(Text, { style: styles.description, role: "article", accessibilityLabel: description, testID: "banner-tile-description", children: description }));
|
|
3370
3427
|
};
|
|
3371
3428
|
|
|
3372
3429
|
/**
|
|
@@ -3386,7 +3443,7 @@ var BannerTileMedia = function (_a) {
|
|
|
3386
3443
|
var containerStyle = {
|
|
3387
3444
|
width: isArtworkOnly ? '100%' : '30%',
|
|
3388
3445
|
};
|
|
3389
|
-
return (jsxRuntimeExports.jsx(reactNative.View, { style: [styles.mediaContainer, containerStyle],
|
|
3446
|
+
return (jsxRuntimeExports.jsx(reactNative.View, { style: [styles.mediaContainer, containerStyle], role: "img", accessibilityLabel: "Banner image".concat(title ? " for ".concat(title) : ''), testID: "banner-tile-media", children: jsxRuntimeExports.jsx(ProgressiveImage, { source: { uri: artworkUrl }, style: styles.media, alt: "Banner image".concat(title ? " for ".concat(title) : '') }) }));
|
|
3390
3447
|
};
|
|
3391
3448
|
|
|
3392
3449
|
/**
|
|
@@ -3402,7 +3459,7 @@ var BannerTileTitle = function () {
|
|
|
3402
3459
|
var title = bannerContext.configuration.title;
|
|
3403
3460
|
if (!title)
|
|
3404
3461
|
return null;
|
|
3405
|
-
return (jsxRuntimeExports.jsx(Text, { variant: "title", testID: "banner-tile-title", style: styles.title,
|
|
3462
|
+
return (jsxRuntimeExports.jsx(Text, { variant: "title", testID: "banner-tile-title", style: styles.title, role: "heading", accessibilityLabel: title, children: title }));
|
|
3406
3463
|
};
|
|
3407
3464
|
|
|
3408
3465
|
/**
|
|
@@ -3508,7 +3565,7 @@ var ContentTileMedia = function (_a) {
|
|
|
3508
3565
|
var containerStyle = {
|
|
3509
3566
|
flexBasis: isArtworkOnly ? '100%' : '50%',
|
|
3510
3567
|
};
|
|
3511
|
-
return (jsxRuntimeExports.jsx(reactNative.View, { style: [styles.imageContainer, containerStyle], testID: "content-tile-media",
|
|
3568
|
+
return (jsxRuntimeExports.jsx(reactNative.View, { style: [styles.imageContainer, containerStyle], testID: "content-tile-media", role: "img", accessibilityLabel: "Image for ".concat(title), children: jsxRuntimeExports.jsx(ProgressiveImage, { source: { uri: artworkUrl }, style: styles.image, alt: "Image for ".concat(title) }) }));
|
|
3512
3569
|
};
|
|
3513
3570
|
|
|
3514
3571
|
var ContentTileSummary = function () {
|
|
@@ -3525,7 +3582,7 @@ var ContentTileSummary = function () {
|
|
|
3525
3582
|
var getNumberOfLines = function () {
|
|
3526
3583
|
return isFullSize ? 3 : isHalfSize ? 4 : 3;
|
|
3527
3584
|
};
|
|
3528
|
-
return (jsxRuntimeExports.jsx(Text, { variant: "body",
|
|
3585
|
+
return (jsxRuntimeExports.jsx(Text, { variant: "body", role: "article", accessibilityLabel: body, numberOfLines: getNumberOfLines(), testID: "content-tile-summary", children: body }));
|
|
3529
3586
|
};
|
|
3530
3587
|
|
|
3531
3588
|
var ContentTileTitle = function () {
|
|
@@ -3541,7 +3598,7 @@ var ContentTileTitle = function () {
|
|
|
3541
3598
|
return styles.titleWithLink;
|
|
3542
3599
|
}
|
|
3543
3600
|
};
|
|
3544
|
-
return (jsxRuntimeExports.jsx(Text, { variant: "title",
|
|
3601
|
+
return (jsxRuntimeExports.jsx(Text, { variant: "title", role: "heading", accessibilityLabel: title, numberOfLines: 1, style: handleTitleWidth(), testID: "content-tile-title", children: title }));
|
|
3545
3602
|
};
|
|
3546
3603
|
|
|
3547
3604
|
/**
|
|
@@ -3583,22 +3640,6 @@ var ContentTile = Object.assign(ContentTileRoot, {
|
|
|
3583
3640
|
});
|
|
3584
3641
|
var ContentTile$1 = withTileFetching(ContentTile);
|
|
3585
3642
|
|
|
3586
|
-
/**
|
|
3587
|
-
* Sorts tiles by priority (higher priority first) and maintains original order for equal priorities
|
|
3588
|
-
* @param tiles Array of tiles to sort
|
|
3589
|
-
* @returns Sorted array of tiles
|
|
3590
|
-
*/
|
|
3591
|
-
var sortByPriority = function (tiles) {
|
|
3592
|
-
return __spreadArray([], tiles, true).sort(function (a, b) {
|
|
3593
|
-
// Sort by priority (higher priority first)
|
|
3594
|
-
if (a.priority !== b.priority) {
|
|
3595
|
-
return b.priority - a.priority;
|
|
3596
|
-
}
|
|
3597
|
-
// If priorities are equal, maintain original order
|
|
3598
|
-
return tiles.indexOf(a) - tiles.indexOf(b);
|
|
3599
|
-
});
|
|
3600
|
-
};
|
|
3601
|
-
|
|
3602
3643
|
exports.SectionType = void 0;
|
|
3603
3644
|
(function (SectionType) {
|
|
3604
3645
|
SectionType["Grid"] = "GRID";
|
|
@@ -4073,7 +4114,7 @@ var useSectionData = function (section, sectionId) {
|
|
|
4073
4114
|
*/
|
|
4074
4115
|
var EmptyState = function (_a) {
|
|
4075
4116
|
var message = _a.message;
|
|
4076
|
-
return (jsxRuntimeExports.jsx(reactNative.View, { style: commonStyles.emptyContainer,
|
|
4117
|
+
return (jsxRuntimeExports.jsx(reactNative.View, { style: commonStyles.emptyContainer, role: "article", accessibilityLabel: "Empty state: ".concat(message), children: jsxRuntimeExports.jsx(reactNative.Text, { children: message }) }));
|
|
4077
4118
|
};
|
|
4078
4119
|
/**
|
|
4079
4120
|
* The Section component renders a section based on its type (e.g., Banner, Grid).
|
|
@@ -4508,7 +4549,7 @@ var PointsTileFormattedPoints = function () {
|
|
|
4508
4549
|
return null;
|
|
4509
4550
|
var calculatedPoints = applyMultiplier(points, pointsMultiplier);
|
|
4510
4551
|
var fullPointsText = "".concat(pointsPrefix).concat(calculatedPoints, " ").concat(pointsSuffix).trim();
|
|
4511
|
-
return (jsxRuntimeExports.jsx(reactNative.View, { testID: "points-tile-points",
|
|
4552
|
+
return (jsxRuntimeExports.jsx(reactNative.View, { testID: "points-tile-points", role: "article", accessibilityLabel: "Points value: ".concat(fullPointsText), children: jsxRuntimeExports.jsxs(Row, { align: "center", justify: "start", children: [pointsPrefix ? (jsxRuntimeExports.jsx(Text, { variant: "caption", testID: "points-tile-prefix", children: pointsPrefix })) : null, jsxRuntimeExports.jsx(Text, { variant: "caption", testID: "points-tile-value", children: calculatedPoints }), pointsSuffix ? (jsxRuntimeExports.jsx(Text, { variant: "caption", style: styles.suffix, testID: "points-tile-suffix", children: pointsSuffix })) : null] }) }));
|
|
4512
4553
|
};
|
|
4513
4554
|
|
|
4514
4555
|
/**
|
|
@@ -4525,7 +4566,7 @@ var PointsTileMedia = function (_a) {
|
|
|
4525
4566
|
var styles = usePointsTileStyles(isFullSize);
|
|
4526
4567
|
if (!artworkUrl)
|
|
4527
4568
|
return null;
|
|
4528
|
-
return (jsxRuntimeExports.jsx(reactNative.View, { testID: "points-tile-media", style: styles.imageContainer,
|
|
4569
|
+
return (jsxRuntimeExports.jsx(reactNative.View, { testID: "points-tile-media", style: styles.imageContainer, role: "img", accessibilityLabel: "Points tile image for ".concat(title), children: jsxRuntimeExports.jsx(reactNative.Image, { source: { uri: artworkUrl }, style: styles.image, resizeMode: isFullSize ? 'cover' : 'contain' }) }));
|
|
4529
4570
|
};
|
|
4530
4571
|
|
|
4531
4572
|
/**
|
|
@@ -4540,7 +4581,7 @@ var PointsTileTitle = function () {
|
|
|
4540
4581
|
var title = tileContext.configuration.title;
|
|
4541
4582
|
if (!title)
|
|
4542
4583
|
return null;
|
|
4543
|
-
return (jsxRuntimeExports.jsx(Text, { variant: "eyebrow", testID: "points-tile-title",
|
|
4584
|
+
return (jsxRuntimeExports.jsx(Text, { variant: "eyebrow", testID: "points-tile-title", role: "heading", accessibilityLabel: title, children: title }));
|
|
4544
4585
|
};
|
|
4545
4586
|
|
|
4546
4587
|
/**
|
|
@@ -4619,7 +4660,7 @@ var RewardCategoryHeader = function () {
|
|
|
4619
4660
|
var _a = tileContext.configuration, _b = _a.showName, showName = _b === void 0 ? true : _b, _c = _a.name, name = _c === void 0 ? '' : _c;
|
|
4620
4661
|
if (!showName || !name)
|
|
4621
4662
|
return null;
|
|
4622
|
-
return (jsxRuntimeExports.jsx(reactNative.View, { style: [styles.header, { backgroundColor: theme.primary }], testID: "reward-category-header",
|
|
4663
|
+
return (jsxRuntimeExports.jsx(reactNative.View, { style: [styles.header, { backgroundColor: theme.primary }], testID: "reward-category-header", role: "heading", accessibilityLabel: "Reward category: ".concat(name), children: jsxRuntimeExports.jsx(Text, { style: [styles.headerText, { color: theme.primaryText }], ellipsizeMode: "tail", numberOfLines: 1, children: name }) }));
|
|
4623
4664
|
};
|
|
4624
4665
|
|
|
4625
4666
|
/**
|
|
@@ -4635,7 +4676,7 @@ var RewardCategoryMedia = function () {
|
|
|
4635
4676
|
var _a = tileContext.configuration, artworkUrl = _a.artworkUrl, _b = _a.name, name = _b === void 0 ? 'Reward' : _b;
|
|
4636
4677
|
if (!artworkUrl)
|
|
4637
4678
|
return null;
|
|
4638
|
-
return (jsxRuntimeExports.jsx(ProgressiveImage, { testID: "reward-category-media", source: { uri: artworkUrl }, style: styles.background, alt: "Reward category image for ".concat(name),
|
|
4679
|
+
return (jsxRuntimeExports.jsx(ProgressiveImage, { testID: "reward-category-media", source: { uri: artworkUrl }, style: styles.background, alt: "Reward category image for ".concat(name), role: "img" }));
|
|
4639
4680
|
};
|
|
4640
4681
|
|
|
4641
4682
|
/**
|
|
@@ -4668,7 +4709,7 @@ var RewardCategoryTile$1 = withTileFetching(RewardCategoryTile);
|
|
|
4668
4709
|
var RewardTileChevron = function () {
|
|
4669
4710
|
var _a;
|
|
4670
4711
|
var theme = useWllSdk().theme;
|
|
4671
|
-
return (jsxRuntimeExports.jsx(Icon, { name: "ChevronRight", size: IS_MOBILE ? 16 : undefined, color: ((_a = theme === null || theme === void 0 ? void 0 : theme.derivedSurfaceText) === null || _a === void 0 ? void 0 : _a[20]) || '#000000',
|
|
4712
|
+
return (jsxRuntimeExports.jsx(Icon, { name: "ChevronRight", size: IS_MOBILE ? 16 : undefined, color: ((_a = theme === null || theme === void 0 ? void 0 : theme.derivedSurfaceText) === null || _a === void 0 ? void 0 : _a[20]) || '#000000', role: "img", accessibilityLabel: "View reward details" }));
|
|
4672
4713
|
};
|
|
4673
4714
|
|
|
4674
4715
|
/**
|
|
@@ -4742,7 +4783,7 @@ var RewardTileMedia = function (_a) {
|
|
|
4742
4783
|
var containerStyle = {
|
|
4743
4784
|
flexBasis: isArtworkOnly ? '100%' : '50%',
|
|
4744
4785
|
};
|
|
4745
|
-
return (jsxRuntimeExports.jsx(reactNative.View, { style: [styles.imageContainer, containerStyle], testID: "reward-tile-media",
|
|
4786
|
+
return (jsxRuntimeExports.jsx(reactNative.View, { style: [styles.imageContainer, containerStyle], testID: "reward-tile-media", role: "img", accessibilityLabel: "Reward image for ".concat(name), children: jsxRuntimeExports.jsx(ProgressiveImage, { source: { uri: artworkUrl }, style: styles.image, alt: "Reward image for ".concat(name) }) }));
|
|
4746
4787
|
};
|
|
4747
4788
|
|
|
4748
4789
|
/**
|
|
@@ -4760,7 +4801,7 @@ var RewardTilePoints = function () {
|
|
|
4760
4801
|
return null;
|
|
4761
4802
|
var calculatedPoints = applyMultiplier(price, pointsMultiplier);
|
|
4762
4803
|
var accessibilityLabel = getPointsLabel('Reward points:', calculatedPoints, pointsPrefix, pointsSuffix);
|
|
4763
|
-
return (jsxRuntimeExports.jsx(reactNative.View, { testID: "reward-tile-points",
|
|
4804
|
+
return (jsxRuntimeExports.jsx(reactNative.View, { testID: "reward-tile-points", role: "article", accessibilityLabel: accessibilityLabel, children: jsxRuntimeExports.jsxs(Row, { align: "center", justify: "start", style: { marginTop: 8 }, children: [pointsPrefix ? jsxRuntimeExports.jsx(Text, { variant: "caption", children: pointsPrefix }) : null, jsxRuntimeExports.jsx(Text, { variant: "caption", testID: "reward-tile-points-value", children: calculatedPoints }), pointsSuffix ? (jsxRuntimeExports.jsx(Text, { variant: "caption", style: styles.suffix, children: pointsSuffix })) : null] }) }));
|
|
4764
4805
|
};
|
|
4765
4806
|
|
|
4766
4807
|
/**
|
|
@@ -4775,7 +4816,7 @@ var RewardTileSummary = function () {
|
|
|
4775
4816
|
var summary = tileContext.configuration.summary;
|
|
4776
4817
|
if (!summary)
|
|
4777
4818
|
return null;
|
|
4778
|
-
return (jsxRuntimeExports.jsx(Text, { variant: "body",
|
|
4819
|
+
return (jsxRuntimeExports.jsx(Text, { variant: "body", role: "article", accessibilityLabel: summary, testID: "reward-tile-summary", children: summary }));
|
|
4779
4820
|
};
|
|
4780
4821
|
|
|
4781
4822
|
/**
|
|
@@ -4796,7 +4837,7 @@ var RewardTileTitle = function () {
|
|
|
4796
4837
|
return styles.titleWithLink;
|
|
4797
4838
|
}
|
|
4798
4839
|
};
|
|
4799
|
-
return (jsxRuntimeExports.jsx(Text, { variant: "title", ellipsizeMode: "tail", numberOfLines: 1,
|
|
4840
|
+
return (jsxRuntimeExports.jsx(Text, { variant: "title", ellipsizeMode: "tail", numberOfLines: 1, role: "heading", accessibilityLabel: "Reward title: ".concat(name), testID: "reward-tile-title", style: handleTitleWidth(), children: name }));
|
|
4800
4841
|
};
|
|
4801
4842
|
|
|
4802
4843
|
/**
|