@wlloyalty/wll-react-sdk 1.0.36 → 1.0.40
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 +14 -95
- package/dist/index.js +251 -67
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -7455,6 +7455,13 @@ var sizes = {
|
|
|
7455
7455
|
xxxxl: 40,
|
|
7456
7456
|
xxxxxl: 60
|
|
7457
7457
|
};
|
|
7458
|
+
var commonStyles = StyleSheet$1.create({
|
|
7459
|
+
emptyContainer: {
|
|
7460
|
+
flex: 1,
|
|
7461
|
+
justifyContent: 'center',
|
|
7462
|
+
alignItems: 'center'
|
|
7463
|
+
}
|
|
7464
|
+
});
|
|
7458
7465
|
var defaultTheme = {
|
|
7459
7466
|
background: '#F0F0F0',
|
|
7460
7467
|
text: '#000000',
|
|
@@ -19181,7 +19188,8 @@ var BaseTileHeader = function (_a) {
|
|
|
19181
19188
|
// @ts-ignore
|
|
19182
19189
|
textAlign: isHalfSize && 'center'
|
|
19183
19190
|
}],
|
|
19184
|
-
accessibilityRole: "header"
|
|
19191
|
+
accessibilityRole: "header",
|
|
19192
|
+
numberOfLines: 1
|
|
19185
19193
|
}, children);
|
|
19186
19194
|
};
|
|
19187
19195
|
var BaseTileMedia = function (props) {
|
|
@@ -19216,7 +19224,8 @@ var BaseTileTitle = function () {
|
|
|
19216
19224
|
if (isHalfSize && artworkUrl || !title) return null;
|
|
19217
19225
|
return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement(Text, {
|
|
19218
19226
|
variant: "title",
|
|
19219
|
-
accessibilityLabel: title
|
|
19227
|
+
accessibilityLabel: title,
|
|
19228
|
+
numberOfLines: 1
|
|
19220
19229
|
}, title), ctaLink && /*#__PURE__*/React$1.createElement(Icon, {
|
|
19221
19230
|
name: "ChevronRight",
|
|
19222
19231
|
color: theme.derivedSurfaceText[20]
|
|
@@ -19292,6 +19301,45 @@ var styles$5 = StyleSheet$1.create({
|
|
|
19292
19301
|
|
|
19293
19302
|
var GRID_GAP = 16;
|
|
19294
19303
|
|
|
19304
|
+
var SkeletonTile = function (_a) {
|
|
19305
|
+
var style = _a.style;
|
|
19306
|
+
var theme = useWllSdk().theme;
|
|
19307
|
+
var animatedValue = React__namespace.useRef(new Animated$1.Value(0)).current;
|
|
19308
|
+
React__namespace.useEffect(function () {
|
|
19309
|
+
var pulseAnimation = Animated$1.loop(Animated$1.sequence([Animated$1.timing(animatedValue, {
|
|
19310
|
+
toValue: 1,
|
|
19311
|
+
duration: 1000,
|
|
19312
|
+
useNativeDriver: true
|
|
19313
|
+
}), Animated$1.timing(animatedValue, {
|
|
19314
|
+
toValue: 0,
|
|
19315
|
+
duration: 1000,
|
|
19316
|
+
useNativeDriver: true
|
|
19317
|
+
})]));
|
|
19318
|
+
pulseAnimation.start();
|
|
19319
|
+
return function () {
|
|
19320
|
+
return pulseAnimation.stop();
|
|
19321
|
+
};
|
|
19322
|
+
}, [animatedValue]);
|
|
19323
|
+
var opacity = animatedValue.interpolate({
|
|
19324
|
+
inputRange: [0, 1],
|
|
19325
|
+
outputRange: [0.3, 0.7]
|
|
19326
|
+
});
|
|
19327
|
+
return /*#__PURE__*/React__namespace.createElement(Animated$1.View, {
|
|
19328
|
+
style: [styles$4.container, {
|
|
19329
|
+
opacity: opacity,
|
|
19330
|
+
backgroundColor: theme.alphaDerivedText[20],
|
|
19331
|
+
borderRadius: theme.sizes.borderRadiusLg
|
|
19332
|
+
}, style]
|
|
19333
|
+
});
|
|
19334
|
+
};
|
|
19335
|
+
var styles$4 = StyleSheet$1.create({
|
|
19336
|
+
container: {
|
|
19337
|
+
aspectRatio: 1,
|
|
19338
|
+
overflow: 'hidden',
|
|
19339
|
+
width: 1000 / 4
|
|
19340
|
+
}
|
|
19341
|
+
});
|
|
19342
|
+
|
|
19295
19343
|
var Skeleton = function (_a) {
|
|
19296
19344
|
var style = _a.style,
|
|
19297
19345
|
_b = _a.numberOfSquares,
|
|
@@ -19317,35 +19365,34 @@ var Skeleton = function (_a) {
|
|
|
19317
19365
|
inputRange: [0, 1],
|
|
19318
19366
|
outputRange: [0.3, 0.7]
|
|
19319
19367
|
});
|
|
19320
|
-
|
|
19368
|
+
({
|
|
19321
19369
|
opacity: opacity,
|
|
19322
19370
|
backgroundColor: theme.alphaDerivedText[20],
|
|
19323
19371
|
borderRadius: theme.sizes.borderRadiusLg
|
|
19324
|
-
};
|
|
19372
|
+
});
|
|
19325
19373
|
return /*#__PURE__*/React__namespace.createElement(View$2, null, /*#__PURE__*/React__namespace.createElement(Animated$1.View, {
|
|
19326
|
-
style: [styles$
|
|
19374
|
+
style: [styles$3.skeleton, styles$3.title, {
|
|
19327
19375
|
opacity: opacity,
|
|
19328
19376
|
backgroundColor: theme.alphaDerivedText[20],
|
|
19329
19377
|
borderRadius: 6
|
|
19330
19378
|
}]
|
|
19331
19379
|
}), /*#__PURE__*/React__namespace.createElement(Animated$1.View, {
|
|
19332
|
-
style: [styles$
|
|
19380
|
+
style: [styles$3.skeleton, styles$3.body, {
|
|
19333
19381
|
opacity: opacity,
|
|
19334
19382
|
backgroundColor: theme.alphaDerivedText[20],
|
|
19335
19383
|
borderRadius: 6
|
|
19336
19384
|
}]
|
|
19337
19385
|
}), /*#__PURE__*/React__namespace.createElement(Animated$1.View, {
|
|
19338
|
-
style: [styles$
|
|
19386
|
+
style: [styles$3.container, style]
|
|
19339
19387
|
}, Array.from({
|
|
19340
19388
|
length: numberOfSquares
|
|
19341
19389
|
}).map(function (_, index) {
|
|
19342
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
19343
|
-
key: index
|
|
19344
|
-
style: [styles$4.skeleton, styles$4.square, sharedSkeletonStyle]
|
|
19390
|
+
return /*#__PURE__*/React__namespace.createElement(SkeletonTile, {
|
|
19391
|
+
key: index
|
|
19345
19392
|
});
|
|
19346
19393
|
})));
|
|
19347
19394
|
};
|
|
19348
|
-
var styles$
|
|
19395
|
+
var styles$3 = StyleSheet$1.create({
|
|
19349
19396
|
container: {
|
|
19350
19397
|
flexDirection: 'row',
|
|
19351
19398
|
flexWrap: 'wrap',
|
|
@@ -19373,6 +19420,78 @@ var styles$4 = StyleSheet$1.create({
|
|
|
19373
19420
|
}
|
|
19374
19421
|
});
|
|
19375
19422
|
|
|
19423
|
+
function withTileFetching(WrappedComponent) {
|
|
19424
|
+
return function WithTileFetchingComponent(props) {
|
|
19425
|
+
var _this = this;
|
|
19426
|
+
var tile = props.tile,
|
|
19427
|
+
tileId = props.tileId;
|
|
19428
|
+
var getTileByID = useWllSdk().getTileByID;
|
|
19429
|
+
var _a = React$1.useState(tile || null),
|
|
19430
|
+
tileData = _a[0],
|
|
19431
|
+
setTileData = _a[1];
|
|
19432
|
+
var _b = React$1.useState(false),
|
|
19433
|
+
isLoading = _b[0],
|
|
19434
|
+
setIsLoading = _b[1];
|
|
19435
|
+
var _c = React$1.useState(null),
|
|
19436
|
+
error = _c[0],
|
|
19437
|
+
setError = _c[1];
|
|
19438
|
+
React$1.useEffect(function () {
|
|
19439
|
+
if (tile) {
|
|
19440
|
+
setTileData(tile);
|
|
19441
|
+
} else if (tileId) {
|
|
19442
|
+
var fetchTile = function () {
|
|
19443
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
19444
|
+
var response, err_1;
|
|
19445
|
+
return __generator(this, function (_a) {
|
|
19446
|
+
switch (_a.label) {
|
|
19447
|
+
case 0:
|
|
19448
|
+
setIsLoading(true);
|
|
19449
|
+
_a.label = 1;
|
|
19450
|
+
case 1:
|
|
19451
|
+
_a.trys.push([1, 3, 4, 5]);
|
|
19452
|
+
return [4 /*yield*/, getTileByID(tileId)];
|
|
19453
|
+
case 2:
|
|
19454
|
+
response = _a.sent();
|
|
19455
|
+
if (response.status === 'success' && response.data) {
|
|
19456
|
+
setTileData(response.data);
|
|
19457
|
+
} else {
|
|
19458
|
+
setError(response.error || 'Failed to fetch tile');
|
|
19459
|
+
}
|
|
19460
|
+
return [3 /*break*/, 5];
|
|
19461
|
+
case 3:
|
|
19462
|
+
err_1 = _a.sent();
|
|
19463
|
+
setError(err_1 instanceof Error ? err_1.message : 'Failed to fetch tile');
|
|
19464
|
+
return [3 /*break*/, 5];
|
|
19465
|
+
case 4:
|
|
19466
|
+
setIsLoading(false);
|
|
19467
|
+
return [7 /*endfinally*/];
|
|
19468
|
+
case 5:
|
|
19469
|
+
return [2 /*return*/];
|
|
19470
|
+
}
|
|
19471
|
+
});
|
|
19472
|
+
});
|
|
19473
|
+
};
|
|
19474
|
+
fetchTile();
|
|
19475
|
+
}
|
|
19476
|
+
}, [tile, tileId, getTileByID]);
|
|
19477
|
+
if (isLoading) {
|
|
19478
|
+
return /*#__PURE__*/React$1.createElement(SkeletonTile, {
|
|
19479
|
+
style: {
|
|
19480
|
+
width: '100%'
|
|
19481
|
+
}
|
|
19482
|
+
});
|
|
19483
|
+
}
|
|
19484
|
+
if (error || !tileData) {
|
|
19485
|
+
return /*#__PURE__*/React$1.createElement(View$2, {
|
|
19486
|
+
style: commonStyles.emptyContainer
|
|
19487
|
+
}, /*#__PURE__*/React$1.createElement(Text$3, null, "No tile data available"));
|
|
19488
|
+
}
|
|
19489
|
+
return /*#__PURE__*/React$1.createElement(WrappedComponent, _extends({}, props, {
|
|
19490
|
+
tile: tileData
|
|
19491
|
+
}));
|
|
19492
|
+
};
|
|
19493
|
+
}
|
|
19494
|
+
|
|
19376
19495
|
var useBadgeTileStyles = function () {
|
|
19377
19496
|
var _a = useResponsive$1(),
|
|
19378
19497
|
isDesktop = _a.isDesktop,
|
|
@@ -19521,7 +19640,7 @@ var BadgeTileTitle = function () {
|
|
|
19521
19640
|
return /*#__PURE__*/React$1.createElement(View$2, null, /*#__PURE__*/React$1.createElement(Text, {
|
|
19522
19641
|
variant: "title",
|
|
19523
19642
|
style: styles.titleText,
|
|
19524
|
-
numberOfLines: 2,
|
|
19643
|
+
numberOfLines: count === 0 ? 2 : 1,
|
|
19525
19644
|
ellipsizeMode: "tail"
|
|
19526
19645
|
}, displayText));
|
|
19527
19646
|
};
|
|
@@ -19542,6 +19661,7 @@ BadgeTile.Title = BadgeTileTitle;
|
|
|
19542
19661
|
BadgeTile.Description = BadgeTileDescription;
|
|
19543
19662
|
BadgeTile.DateEarned = BadgeTileDateEarned;
|
|
19544
19663
|
BadgeTile.Status = BadgeTileStatus;
|
|
19664
|
+
var BadgeTile$1 = withTileFetching(BadgeTile);
|
|
19545
19665
|
|
|
19546
19666
|
var BannerTileCTA = function () {
|
|
19547
19667
|
var tile = useBannerContext();
|
|
@@ -19658,6 +19778,7 @@ BannerTile.Media = BannerTileMedia;
|
|
|
19658
19778
|
BannerTile.Title = BannerTileTitle;
|
|
19659
19779
|
BannerTile.Description = BannerTileDescription;
|
|
19660
19780
|
BannerTile.CTA = BannerTileCTA;
|
|
19781
|
+
var BannerTile$1 = withTileFetching(BannerTile);
|
|
19661
19782
|
|
|
19662
19783
|
var ContentTileBody = function () {
|
|
19663
19784
|
return /*#__PURE__*/React$1.createElement(BaseTile.Body, null);
|
|
@@ -19719,6 +19840,7 @@ ContentTile.Media = ContentTileMedia;
|
|
|
19719
19840
|
ContentTile.Content = ContentTileContent;
|
|
19720
19841
|
ContentTile.Header = ContentTileHeader;
|
|
19721
19842
|
ContentTile.Body = ContentTileBody;
|
|
19843
|
+
var ContentTile$1 = withTileFetching(ContentTile);
|
|
19722
19844
|
|
|
19723
19845
|
/**
|
|
19724
19846
|
* Sorts tiles by priority (higher priority first) and maintains original order for equal priorities
|
|
@@ -19948,6 +20070,8 @@ var Carousel = function (_a) {
|
|
|
19948
20070
|
});
|
|
19949
20071
|
};
|
|
19950
20072
|
var displayControls = sortedTiles.length > 1;
|
|
20073
|
+
var showPrevButton = displayControls && currentIndex > 0;
|
|
20074
|
+
var showNextButton = displayControls && currentIndex < sortedTiles.length - 1;
|
|
19951
20075
|
var dynamicStyles = StyleSheet$1.create({
|
|
19952
20076
|
indicators: {
|
|
19953
20077
|
flexDirection: 'row',
|
|
@@ -19967,7 +20091,7 @@ var Carousel = function (_a) {
|
|
|
19967
20091
|
}
|
|
19968
20092
|
}, /*#__PURE__*/React$1.createElement(View$2, {
|
|
19969
20093
|
style: styles.carouselContainer
|
|
19970
|
-
},
|
|
20094
|
+
}, showPrevButton && /*#__PURE__*/React$1.createElement(TouchableOpacity$1, {
|
|
19971
20095
|
style: [styles.navButton, styles.navButtonLeft, {
|
|
19972
20096
|
backgroundColor: theme.background
|
|
19973
20097
|
}],
|
|
@@ -19997,10 +20121,10 @@ var Carousel = function (_a) {
|
|
|
19997
20121
|
style: [styles.slideContainer, {
|
|
19998
20122
|
width: containerWidth
|
|
19999
20123
|
}]
|
|
20000
|
-
}, /*#__PURE__*/React$1.createElement(BannerTile, {
|
|
20124
|
+
}, /*#__PURE__*/React$1.createElement(BannerTile$1, {
|
|
20001
20125
|
tile: tile
|
|
20002
20126
|
}));
|
|
20003
|
-
})),
|
|
20127
|
+
})), showNextButton && /*#__PURE__*/React$1.createElement(TouchableOpacity$1, {
|
|
20004
20128
|
style: [styles.navButton, styles.navButtonRight, {
|
|
20005
20129
|
backgroundColor: theme.surface
|
|
20006
20130
|
}],
|
|
@@ -20108,10 +20232,10 @@ var Grid = function (_a) {
|
|
|
20108
20232
|
title: section.title,
|
|
20109
20233
|
description: section.description
|
|
20110
20234
|
}), /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
20111
|
-
style: styles$
|
|
20235
|
+
style: styles$2.grid
|
|
20112
20236
|
}, renderGrid()));
|
|
20113
20237
|
};
|
|
20114
|
-
var styles$
|
|
20238
|
+
var styles$2 = StyleSheet$1.create({
|
|
20115
20239
|
grid: {
|
|
20116
20240
|
flexDirection: 'row',
|
|
20117
20241
|
flexWrap: 'wrap',
|
|
@@ -20138,15 +20262,15 @@ var ProgressIndicator = function (_a) {
|
|
|
20138
20262
|
progressVariant = 'accent';
|
|
20139
20263
|
}
|
|
20140
20264
|
return /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
20141
|
-
style: styles$
|
|
20265
|
+
style: styles$1.container
|
|
20142
20266
|
}, /*#__PURE__*/React__namespace.createElement(ProgressBar, {
|
|
20143
20267
|
percentage: percentage,
|
|
20144
20268
|
variant: progressVariant,
|
|
20145
20269
|
height: height
|
|
20146
20270
|
}), /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
20147
|
-
style: [styles$
|
|
20271
|
+
style: [styles$1.circleContainer]
|
|
20148
20272
|
}, /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
20149
|
-
style: [styles$
|
|
20273
|
+
style: [styles$1.circle, {
|
|
20150
20274
|
borderColor: theme.derivedSurface[20],
|
|
20151
20275
|
backgroundColor: isComplete ? theme.primary : theme.surface,
|
|
20152
20276
|
borderWidth: isComplete ? 0 : 4
|
|
@@ -20157,7 +20281,7 @@ var ProgressIndicator = function (_a) {
|
|
|
20157
20281
|
color: theme.primaryText
|
|
20158
20282
|
}))));
|
|
20159
20283
|
};
|
|
20160
|
-
var styles$
|
|
20284
|
+
var styles$1 = StyleSheet$1.create({
|
|
20161
20285
|
container: {
|
|
20162
20286
|
width: '100%',
|
|
20163
20287
|
flexDirection: 'row',
|
|
@@ -20195,30 +20319,94 @@ var useSectionStyles = function () {
|
|
|
20195
20319
|
|
|
20196
20320
|
var SectionContext = /*#__PURE__*/React$1.createContext(undefined);
|
|
20197
20321
|
var Section = function (_a) {
|
|
20198
|
-
var section = _a.section
|
|
20322
|
+
var section = _a.section,
|
|
20323
|
+
sectionId = _a.sectionId;
|
|
20199
20324
|
var styles = useSectionStyles();
|
|
20325
|
+
var getSectionByID = useWllSdk().getSectionByID;
|
|
20326
|
+
var _b = React$1.useState(section || null),
|
|
20327
|
+
sectionData = _b[0],
|
|
20328
|
+
setSectionData = _b[1];
|
|
20329
|
+
var _c = React$1.useState(false),
|
|
20330
|
+
isLoading = _c[0],
|
|
20331
|
+
setIsLoading = _c[1];
|
|
20332
|
+
var _d = React$1.useState(null),
|
|
20333
|
+
error = _d[0],
|
|
20334
|
+
setError = _d[1];
|
|
20335
|
+
React$1.useEffect(function () {
|
|
20336
|
+
if (section) {
|
|
20337
|
+
setSectionData(section);
|
|
20338
|
+
} else if (sectionId) {
|
|
20339
|
+
var fetchSection = function () {
|
|
20340
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
20341
|
+
var response, err_1;
|
|
20342
|
+
return __generator(this, function (_a) {
|
|
20343
|
+
switch (_a.label) {
|
|
20344
|
+
case 0:
|
|
20345
|
+
setIsLoading(true);
|
|
20346
|
+
_a.label = 1;
|
|
20347
|
+
case 1:
|
|
20348
|
+
_a.trys.push([1, 3, 4, 5]);
|
|
20349
|
+
return [4 /*yield*/, getSectionByID(sectionId)];
|
|
20350
|
+
case 2:
|
|
20351
|
+
response = _a.sent();
|
|
20352
|
+
if (response.status === 'success' && response.data) {
|
|
20353
|
+
setSectionData(response.data);
|
|
20354
|
+
} else {
|
|
20355
|
+
setError(response.error || 'Failed to fetch section');
|
|
20356
|
+
}
|
|
20357
|
+
return [3 /*break*/, 5];
|
|
20358
|
+
case 3:
|
|
20359
|
+
err_1 = _a.sent();
|
|
20360
|
+
setError(err_1 instanceof Error ? err_1.message : 'Failed to fetch section');
|
|
20361
|
+
return [3 /*break*/, 5];
|
|
20362
|
+
case 4:
|
|
20363
|
+
setIsLoading(false);
|
|
20364
|
+
return [7 /*endfinally*/];
|
|
20365
|
+
case 5:
|
|
20366
|
+
return [2 /*return*/];
|
|
20367
|
+
}
|
|
20368
|
+
});
|
|
20369
|
+
});
|
|
20370
|
+
};
|
|
20371
|
+
fetchSection();
|
|
20372
|
+
}
|
|
20373
|
+
}, [section, sectionId, getSectionByID]);
|
|
20200
20374
|
var renderSectionContent = function () {
|
|
20201
|
-
|
|
20375
|
+
if (isLoading) {
|
|
20376
|
+
return /*#__PURE__*/React$1.createElement(View$2, {
|
|
20377
|
+
style: commonStyles.emptyContainer
|
|
20378
|
+
}, /*#__PURE__*/React$1.createElement(Skeleton, null));
|
|
20379
|
+
}
|
|
20380
|
+
if (error || !sectionData) {
|
|
20381
|
+
return /*#__PURE__*/React$1.createElement(View$2, {
|
|
20382
|
+
style: commonStyles.emptyContainer
|
|
20383
|
+
}, /*#__PURE__*/React$1.createElement(Text$3, null, "No section data available"));
|
|
20384
|
+
}
|
|
20385
|
+
switch (sectionData.type) {
|
|
20202
20386
|
case exports.SectionType.Banner:
|
|
20203
20387
|
return /*#__PURE__*/React$1.createElement(Carousel, {
|
|
20204
|
-
section:
|
|
20388
|
+
section: sectionData
|
|
20205
20389
|
});
|
|
20206
20390
|
case exports.SectionType.Grid:
|
|
20207
20391
|
return /*#__PURE__*/React$1.createElement(Grid, {
|
|
20208
|
-
section:
|
|
20392
|
+
section: sectionData
|
|
20209
20393
|
});
|
|
20210
20394
|
default:
|
|
20211
|
-
console.warn("Unknown section type: ".concat(
|
|
20395
|
+
console.warn("Unknown section type: ".concat(sectionData.type));
|
|
20212
20396
|
return null;
|
|
20213
20397
|
}
|
|
20214
20398
|
};
|
|
20215
|
-
|
|
20399
|
+
if (!section && !sectionId) {
|
|
20400
|
+
console.warn('Section component requires either section or sectionId prop');
|
|
20401
|
+
return null;
|
|
20402
|
+
}
|
|
20403
|
+
return sectionData ? /*#__PURE__*/React$1.createElement(SectionContext.Provider, {
|
|
20216
20404
|
value: {
|
|
20217
|
-
sectionData:
|
|
20405
|
+
sectionData: sectionData
|
|
20218
20406
|
}
|
|
20219
20407
|
}, /*#__PURE__*/React$1.createElement(View$2, {
|
|
20220
20408
|
style: styles.section
|
|
20221
|
-
}, renderSectionContent()));
|
|
20409
|
+
}, renderSectionContent())) : null;
|
|
20222
20410
|
};
|
|
20223
20411
|
|
|
20224
20412
|
var Group = function (_a) {
|
|
@@ -20252,17 +20440,17 @@ var Group = function (_a) {
|
|
|
20252
20440
|
}, [id, getGroupByID]);
|
|
20253
20441
|
if (loading) {
|
|
20254
20442
|
return /*#__PURE__*/React$1.createElement(View$2, {
|
|
20255
|
-
style:
|
|
20443
|
+
style: commonStyles.emptyContainer
|
|
20256
20444
|
}, /*#__PURE__*/React$1.createElement(Skeleton, null));
|
|
20257
20445
|
}
|
|
20258
20446
|
if (!groupData) {
|
|
20259
20447
|
return /*#__PURE__*/React$1.createElement(View$2, {
|
|
20260
|
-
style:
|
|
20448
|
+
style: commonStyles.emptyContainer
|
|
20261
20449
|
}, /*#__PURE__*/React$1.createElement(Text$3, null, "No group data available"));
|
|
20262
20450
|
}
|
|
20263
20451
|
if (!groupData.sections || groupData.sections.length === 0) {
|
|
20264
20452
|
return /*#__PURE__*/React$1.createElement(View$2, {
|
|
20265
|
-
style:
|
|
20453
|
+
style: commonStyles.emptyContainer
|
|
20266
20454
|
}, /*#__PURE__*/React$1.createElement(Text$3, null, "No sections available"));
|
|
20267
20455
|
}
|
|
20268
20456
|
var sortedSections = sortByPriority(groupData.sections);
|
|
@@ -20273,13 +20461,6 @@ var Group = function (_a) {
|
|
|
20273
20461
|
});
|
|
20274
20462
|
}));
|
|
20275
20463
|
};
|
|
20276
|
-
var styles$1 = StyleSheet$1.create({
|
|
20277
|
-
emptyConatiner: {
|
|
20278
|
-
flex: 1,
|
|
20279
|
-
justifyContent: 'center',
|
|
20280
|
-
alignItems: 'center'
|
|
20281
|
-
}
|
|
20282
|
-
});
|
|
20283
20464
|
|
|
20284
20465
|
var usePointsTileStyles = function (isFullSize) {
|
|
20285
20466
|
var _a = useResponsive$1(),
|
|
@@ -20342,14 +20523,6 @@ var PointsTileFormattedPoints = function () {
|
|
|
20342
20523
|
}, pointsSuffix !== null && pointsSuffix !== void 0 ? pointsSuffix : 'pts')));
|
|
20343
20524
|
};
|
|
20344
20525
|
|
|
20345
|
-
var PointsTileTitle = function () {
|
|
20346
|
-
var configuration = useTileContext().configuration;
|
|
20347
|
-
var title = configuration.title;
|
|
20348
|
-
return /*#__PURE__*/React$1.createElement(Text, {
|
|
20349
|
-
variant: "eyebrow"
|
|
20350
|
-
}, title);
|
|
20351
|
-
};
|
|
20352
|
-
|
|
20353
20526
|
var PointsTileMedia = function (_a) {
|
|
20354
20527
|
var isFullSize = _a.isFullSize;
|
|
20355
20528
|
var configuration = useTileContext().configuration;
|
|
@@ -20367,6 +20540,14 @@ var PointsTileMedia = function (_a) {
|
|
|
20367
20540
|
}));
|
|
20368
20541
|
};
|
|
20369
20542
|
|
|
20543
|
+
var PointsTileTitle = function () {
|
|
20544
|
+
var configuration = useTileContext().configuration;
|
|
20545
|
+
var title = configuration.title;
|
|
20546
|
+
return /*#__PURE__*/React$1.createElement(Text, {
|
|
20547
|
+
variant: "eyebrow"
|
|
20548
|
+
}, title);
|
|
20549
|
+
};
|
|
20550
|
+
|
|
20370
20551
|
var PointsTile = function (_a) {
|
|
20371
20552
|
var tile = _a.tile;
|
|
20372
20553
|
var isFullSize = useTileSize(tile).isFullSize;
|
|
@@ -20386,6 +20567,7 @@ var PointsTile = function (_a) {
|
|
|
20386
20567
|
PointsTile.Title = PointsTileTitle;
|
|
20387
20568
|
PointsTile.Points = PointsTileFormattedPoints;
|
|
20388
20569
|
PointsTile.Media = PointsTileMedia;
|
|
20570
|
+
var PointsTile$1 = withTileFetching(PointsTile);
|
|
20389
20571
|
|
|
20390
20572
|
var useRewardCategoryTileStyles = function () {
|
|
20391
20573
|
var _a = useResponsive$1(),
|
|
@@ -20461,6 +20643,7 @@ var RewardCategoryTile = function (_a) {
|
|
|
20461
20643
|
};
|
|
20462
20644
|
RewardCategoryTile.Header = RewardCategoryHeader;
|
|
20463
20645
|
RewardCategoryTile.Media = RewardCategoryMedia;
|
|
20646
|
+
var RewardCategoryTile$1 = withTileFetching(RewardCategoryTile);
|
|
20464
20647
|
|
|
20465
20648
|
var RewardTileChevron = function () {
|
|
20466
20649
|
var theme = useWllSdk().theme;
|
|
@@ -20470,15 +20653,6 @@ var RewardTileChevron = function () {
|
|
|
20470
20653
|
});
|
|
20471
20654
|
};
|
|
20472
20655
|
|
|
20473
|
-
var RewardTileSummary = function () {
|
|
20474
|
-
var configuration = useTileContext().configuration;
|
|
20475
|
-
var summary = configuration.summary;
|
|
20476
|
-
if (!summary) return null;
|
|
20477
|
-
return /*#__PURE__*/React$1.createElement(Text, {
|
|
20478
|
-
variant: "body"
|
|
20479
|
-
}, summary);
|
|
20480
|
-
};
|
|
20481
|
-
|
|
20482
20656
|
var useRewardTileStyles = function () {
|
|
20483
20657
|
var _a = useResponsive$1(),
|
|
20484
20658
|
isDesktop = _a.isDesktop,
|
|
@@ -20565,6 +20739,15 @@ var RewardTilePoints = function () {
|
|
|
20565
20739
|
}, pointsSuffix)));
|
|
20566
20740
|
};
|
|
20567
20741
|
|
|
20742
|
+
var RewardTileSummary = function () {
|
|
20743
|
+
var configuration = useTileContext().configuration;
|
|
20744
|
+
var summary = configuration.summary;
|
|
20745
|
+
if (!summary) return null;
|
|
20746
|
+
return /*#__PURE__*/React$1.createElement(Text, {
|
|
20747
|
+
variant: "body"
|
|
20748
|
+
}, summary);
|
|
20749
|
+
};
|
|
20750
|
+
|
|
20568
20751
|
var RewardTileTitle = function () {
|
|
20569
20752
|
var configuration = useTileContext().configuration;
|
|
20570
20753
|
var name = configuration.name;
|
|
@@ -20594,6 +20777,7 @@ RewardTile.Title = RewardTileTitle;
|
|
|
20594
20777
|
RewardTile.Summary = RewardTileSummary;
|
|
20595
20778
|
RewardTile.Points = RewardTilePoints;
|
|
20596
20779
|
RewardTile.Chevron = RewardTileChevron;
|
|
20780
|
+
var RewardTile$1 = withTileFetching(RewardTile);
|
|
20597
20781
|
|
|
20598
20782
|
var useTierTileStyles = function () {
|
|
20599
20783
|
var _a = useResponsive$1(),
|
|
@@ -20789,11 +20973,11 @@ var TileContainer = function (_a) {
|
|
|
20789
20973
|
var renderTile = function (tile) {
|
|
20790
20974
|
switch (tile.type) {
|
|
20791
20975
|
case exports.TileType.Content:
|
|
20792
|
-
return /*#__PURE__*/React__namespace.createElement(ContentTile, {
|
|
20976
|
+
return /*#__PURE__*/React__namespace.createElement(ContentTile$1, {
|
|
20793
20977
|
tile: tile
|
|
20794
20978
|
});
|
|
20795
20979
|
case exports.TileType.Badge:
|
|
20796
|
-
return /*#__PURE__*/React__namespace.createElement(BadgeTile, {
|
|
20980
|
+
return /*#__PURE__*/React__namespace.createElement(BadgeTile$1, {
|
|
20797
20981
|
tile: tile
|
|
20798
20982
|
});
|
|
20799
20983
|
case exports.TileType.Tier:
|
|
@@ -20801,15 +20985,15 @@ var TileContainer = function (_a) {
|
|
|
20801
20985
|
tile: tile
|
|
20802
20986
|
});
|
|
20803
20987
|
case exports.TileType.Points:
|
|
20804
|
-
return /*#__PURE__*/React__namespace.createElement(PointsTile, {
|
|
20988
|
+
return /*#__PURE__*/React__namespace.createElement(PointsTile$1, {
|
|
20805
20989
|
tile: tile
|
|
20806
20990
|
});
|
|
20807
20991
|
case exports.TileType.Reward:
|
|
20808
|
-
return /*#__PURE__*/React__namespace.createElement(RewardTile, {
|
|
20992
|
+
return /*#__PURE__*/React__namespace.createElement(RewardTile$1, {
|
|
20809
20993
|
tile: tile
|
|
20810
20994
|
});
|
|
20811
20995
|
case exports.TileType.RewardCategory:
|
|
20812
|
-
return /*#__PURE__*/React__namespace.createElement(RewardCategoryTile, {
|
|
20996
|
+
return /*#__PURE__*/React__namespace.createElement(RewardCategoryTile$1, {
|
|
20813
20997
|
tile: tile
|
|
20814
20998
|
});
|
|
20815
20999
|
}
|
|
@@ -20931,9 +21115,9 @@ var Reward = /** @class */function () {
|
|
|
20931
21115
|
return Reward;
|
|
20932
21116
|
}();
|
|
20933
21117
|
|
|
20934
|
-
exports.BadgeTile = BadgeTile;
|
|
21118
|
+
exports.BadgeTile = BadgeTile$1;
|
|
20935
21119
|
exports.BadgeTileConfig = BadgeTileConfig;
|
|
20936
|
-
exports.BannerTile = BannerTile;
|
|
21120
|
+
exports.BannerTile = BannerTile$1;
|
|
20937
21121
|
exports.BannerTileConfig = BannerTileConfig;
|
|
20938
21122
|
exports.BaseBanner = BaseBanner;
|
|
20939
21123
|
exports.BaseTile = BaseTile;
|
|
@@ -20941,7 +21125,7 @@ exports.Button = Button;
|
|
|
20941
21125
|
exports.Carousel = Carousel;
|
|
20942
21126
|
exports.Column = Column;
|
|
20943
21127
|
exports.Content = Column$1;
|
|
20944
|
-
exports.ContentTile = ContentTile;
|
|
21128
|
+
exports.ContentTile = ContentTile$1;
|
|
20945
21129
|
exports.ContentTileConfig = ContentTileConfig;
|
|
20946
21130
|
exports.FlexBox = FlexBox;
|
|
20947
21131
|
exports.Grid = Grid;
|
|
@@ -20949,15 +21133,15 @@ exports.Group = Group;
|
|
|
20949
21133
|
exports.Icon = Icon;
|
|
20950
21134
|
exports.Indicator = Indicator;
|
|
20951
21135
|
exports.LoadingIndicator = LoadingIndicator;
|
|
20952
|
-
exports.PointsTile = PointsTile;
|
|
21136
|
+
exports.PointsTile = PointsTile$1;
|
|
20953
21137
|
exports.PointsTileConfig = PointsTileConfig;
|
|
20954
21138
|
exports.ProgressBar = ProgressBar;
|
|
20955
21139
|
exports.ProgressIndicator = ProgressIndicator;
|
|
20956
21140
|
exports.ProgressiveImage = ProgressiveImage;
|
|
20957
21141
|
exports.Reward = Reward;
|
|
20958
|
-
exports.RewardCategoryTile = RewardCategoryTile;
|
|
21142
|
+
exports.RewardCategoryTile = RewardCategoryTile$1;
|
|
20959
21143
|
exports.RewardCategoryTileConfig = RewardCategoryTileConfig;
|
|
20960
|
-
exports.RewardTile = RewardTile;
|
|
21144
|
+
exports.RewardTile = RewardTile$1;
|
|
20961
21145
|
exports.RewardTileConfig = RewardTileConfig;
|
|
20962
21146
|
exports.Row = Row;
|
|
20963
21147
|
exports.RowHeader = RowHeader;
|