@wlloyalty/wll-react-sdk 1.0.68 → 1.0.70
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 +7 -8
- package/dist/native.js +30 -25
- package/dist/native.js.map +1 -1
- package/dist/types/components/hoc/withTileFetching.d.ts +1 -1
- package/dist/types/components/molecules/Grid/index.d.ts +2 -1
- package/dist/types/components/organisms/BadgeTile/index.d.ts +2 -1
- package/dist/types/components/organisms/BannerTile/index.d.ts +2 -1
- package/dist/types/components/organisms/ContentTile/index.d.ts +2 -1
- package/dist/types/components/organisms/PointsTile/index.d.ts +2 -1
- package/dist/types/components/organisms/RewardCategoryTile/index.d.ts +2 -1
- package/dist/types/components/organisms/RewardTile/index.d.ts +2 -1
- package/dist/types/context/ResponsiveContext.d.ts +2 -2
- package/dist/web.js +716 -2223
- package/dist/web.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import * as react_native from 'react-native';
|
|
|
3
3
|
import { ViewProps, ImageSourcePropType, StyleProp, ViewStyle, TextProps as TextProps$1, TextStyle, ImageProps } from 'react-native';
|
|
4
4
|
import * as React$1 from 'react';
|
|
5
5
|
import React__default from 'react';
|
|
6
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
7
6
|
|
|
8
7
|
declare const sizes: {
|
|
9
8
|
readonly borderRadiusSm: 15;
|
|
@@ -532,7 +531,7 @@ declare const Carousel: ({ section }: CarouselProps) => JSX.Element | null;
|
|
|
532
531
|
type GridProps = {
|
|
533
532
|
section: TSection;
|
|
534
533
|
};
|
|
535
|
-
declare const Grid: ({ section }: GridProps) =>
|
|
534
|
+
declare const Grid: ({ section }: GridProps) => React__default.JSX.Element | null;
|
|
536
535
|
|
|
537
536
|
type ProgressIndicatorProps = {
|
|
538
537
|
currentPoints: number;
|
|
@@ -557,17 +556,17 @@ type WithTileFetchingProps = {
|
|
|
557
556
|
type BadgeTileProps = {
|
|
558
557
|
tile: Tile;
|
|
559
558
|
};
|
|
560
|
-
declare const _default$5: (props: Omit<BadgeTileProps, "tile"> & WithTileFetchingProps) =>
|
|
559
|
+
declare const _default$5: (props: Omit<BadgeTileProps, "tile"> & WithTileFetchingProps) => React__default.JSX.Element;
|
|
561
560
|
|
|
562
561
|
type BannerTileProps = {
|
|
563
562
|
tile: Tile;
|
|
564
563
|
};
|
|
565
|
-
declare const _default$4: (props: Omit<BannerTileProps, "tile"> & WithTileFetchingProps) =>
|
|
564
|
+
declare const _default$4: (props: Omit<BannerTileProps, "tile"> & WithTileFetchingProps) => React__default.JSX.Element;
|
|
566
565
|
|
|
567
566
|
type ContentTileProps = {
|
|
568
567
|
tile: Tile;
|
|
569
568
|
};
|
|
570
|
-
declare const _default$3: (props: Omit<ContentTileProps, "tile"> & WithTileFetchingProps) =>
|
|
569
|
+
declare const _default$3: (props: Omit<ContentTileProps, "tile"> & WithTileFetchingProps) => React__default.JSX.Element;
|
|
571
570
|
|
|
572
571
|
type TGroup = {
|
|
573
572
|
name: string;
|
|
@@ -598,17 +597,17 @@ declare const Group: ({ id }: GroupProps) => JSX.Element | null;
|
|
|
598
597
|
type PointsTileProps = {
|
|
599
598
|
tile: Tile;
|
|
600
599
|
};
|
|
601
|
-
declare const _default$2: (props: Omit<PointsTileProps, "tile"> & WithTileFetchingProps) =>
|
|
600
|
+
declare const _default$2: (props: Omit<PointsTileProps, "tile"> & WithTileFetchingProps) => React__default.JSX.Element;
|
|
602
601
|
|
|
603
602
|
type RewardCategoryTileProps = {
|
|
604
603
|
tile: Tile;
|
|
605
604
|
};
|
|
606
|
-
declare const _default$1: (props: Omit<RewardCategoryTileProps, "tile"> & WithTileFetchingProps) =>
|
|
605
|
+
declare const _default$1: (props: Omit<RewardCategoryTileProps, "tile"> & WithTileFetchingProps) => React__default.JSX.Element;
|
|
607
606
|
|
|
608
607
|
type RewardTileProps = {
|
|
609
608
|
tile: Tile;
|
|
610
609
|
};
|
|
611
|
-
declare const _default: (props: Omit<RewardTileProps, "tile"> & WithTileFetchingProps) =>
|
|
610
|
+
declare const _default: (props: Omit<RewardTileProps, "tile"> & WithTileFetchingProps) => React__default.JSX.Element;
|
|
612
611
|
|
|
613
612
|
type SectionProps = {
|
|
614
613
|
section?: TSection;
|
package/dist/native.js
CHANGED
|
@@ -2133,14 +2133,14 @@ var Icon = function (_a) {
|
|
|
2133
2133
|
var LoadingIndicator = function () {
|
|
2134
2134
|
var theme = useWllSdk().theme;
|
|
2135
2135
|
return (jsxRuntimeExports.jsx(reactNative.View, { style: [
|
|
2136
|
-
styles$
|
|
2136
|
+
styles$9.container,
|
|
2137
2137
|
{
|
|
2138
2138
|
borderRadius: theme.sizes.borderRadiusSm,
|
|
2139
2139
|
padding: theme.sizes.md,
|
|
2140
2140
|
},
|
|
2141
2141
|
], children: jsxRuntimeExports.jsx(reactNative.ActivityIndicator, { size: "small", color: theme.primary }) }));
|
|
2142
2142
|
};
|
|
2143
|
-
var styles$
|
|
2143
|
+
var styles$9 = reactNative.StyleSheet.create({
|
|
2144
2144
|
container: {
|
|
2145
2145
|
width: '100%',
|
|
2146
2146
|
height: '100%',
|
|
@@ -2235,8 +2235,8 @@ var ProgressiveImage = function (_a) {
|
|
|
2235
2235
|
: {
|
|
2236
2236
|
tintColor: isDesaturated ? desaturatedColor : undefined,
|
|
2237
2237
|
};
|
|
2238
|
-
return (jsxRuntimeExports.jsxs(reactNative.View, { style: [styles$
|
|
2239
|
-
styles$
|
|
2238
|
+
return (jsxRuntimeExports.jsxs(reactNative.View, { style: [styles$8.container, style, { backgroundColor: backgroundColor }], children: [jsxRuntimeExports.jsx(reactNative.Animated.View, { style: [
|
|
2239
|
+
styles$8.imageOverlay,
|
|
2240
2240
|
{
|
|
2241
2241
|
backgroundColor: backgroundColor,
|
|
2242
2242
|
opacity: imageAnimated.interpolate({
|
|
@@ -2245,11 +2245,11 @@ var ProgressiveImage = function (_a) {
|
|
|
2245
2245
|
}),
|
|
2246
2246
|
},
|
|
2247
2247
|
] }), jsxRuntimeExports.jsx(reactNative.Animated.Image, __assign({}, props, { source: source, style: [
|
|
2248
|
-
styles$
|
|
2248
|
+
styles$8.imageOverlay,
|
|
2249
2249
|
__assign({ opacity: imageAnimated }, desaturationStyle),
|
|
2250
2250
|
], onLoad: onImageLoad, accessibilityLabel: alt }))] }));
|
|
2251
2251
|
};
|
|
2252
|
-
var styles$
|
|
2252
|
+
var styles$8 = reactNative.StyleSheet.create({
|
|
2253
2253
|
imageOverlay: {
|
|
2254
2254
|
position: 'absolute',
|
|
2255
2255
|
left: 0,
|
|
@@ -2478,7 +2478,7 @@ var BaseBanner = function (_a) {
|
|
|
2478
2478
|
return (jsxRuntimeExports.jsx(BannerContext.Provider, { value: tile, children: jsxRuntimeExports.jsx(reactNative.Pressable, { testID: testID || 'banner-tile', style: function (_a) {
|
|
2479
2479
|
var pressed = _a.pressed;
|
|
2480
2480
|
return [
|
|
2481
|
-
styles$
|
|
2481
|
+
styles$7.container,
|
|
2482
2482
|
style,
|
|
2483
2483
|
{
|
|
2484
2484
|
backgroundColor: theme.surface,
|
|
@@ -2489,7 +2489,7 @@ var BaseBanner = function (_a) {
|
|
|
2489
2489
|
}, onPress: hasCTA ? undefined : handlePress, disabled: !ctaLink || hasCTA, accessible: true, role: hasCTA ? 'article' : 'button', accessibilityLabel: accessibilityLabel ||
|
|
2490
2490
|
"".concat(title).concat(!hasCTA && ctaLink ? ' - Click to open' : ''), children: children }) }));
|
|
2491
2491
|
};
|
|
2492
|
-
var styles$
|
|
2492
|
+
var styles$7 = reactNative.StyleSheet.create({
|
|
2493
2493
|
container: {
|
|
2494
2494
|
width: '100%',
|
|
2495
2495
|
maxWidth: MAX_WIDTH,
|
|
@@ -2797,9 +2797,9 @@ var Indicator = function () {
|
|
|
2797
2797
|
return 'Tablet Layout';
|
|
2798
2798
|
return 'Mobile Layout';
|
|
2799
2799
|
};
|
|
2800
|
-
return (jsxRuntimeExports.jsx(reactNative.View, { style: styles$
|
|
2800
|
+
return (jsxRuntimeExports.jsx(reactNative.View, { style: styles$6.indicator, children: jsxRuntimeExports.jsx(reactNative.Text, { style: styles$6.indicatorText, children: getCurrentLayout() }) }));
|
|
2801
2801
|
};
|
|
2802
|
-
var styles$
|
|
2802
|
+
var styles$6 = reactNative.StyleSheet.create({
|
|
2803
2803
|
indicator: {
|
|
2804
2804
|
position: 'absolute',
|
|
2805
2805
|
top: 10,
|
|
@@ -2843,7 +2843,7 @@ var SkeletonTile = function (_a) {
|
|
|
2843
2843
|
outputRange: [0.3, 0.7],
|
|
2844
2844
|
});
|
|
2845
2845
|
return (jsxRuntimeExports.jsx(reactNative.Animated.View, { style: [
|
|
2846
|
-
styles$
|
|
2846
|
+
styles$5.container,
|
|
2847
2847
|
{
|
|
2848
2848
|
opacity: opacity,
|
|
2849
2849
|
backgroundColor: theme.alphaDerivedText[20],
|
|
@@ -2852,7 +2852,7 @@ var SkeletonTile = function (_a) {
|
|
|
2852
2852
|
style,
|
|
2853
2853
|
] }));
|
|
2854
2854
|
};
|
|
2855
|
-
var styles$
|
|
2855
|
+
var styles$5 = reactNative.StyleSheet.create({
|
|
2856
2856
|
container: {
|
|
2857
2857
|
aspectRatio: 1,
|
|
2858
2858
|
overflow: 'hidden',
|
|
@@ -2885,24 +2885,24 @@ var Skeleton = function (_a) {
|
|
|
2885
2885
|
outputRange: [0.3, 0.7],
|
|
2886
2886
|
});
|
|
2887
2887
|
return (jsxRuntimeExports.jsxs(reactNative.View, { testID: "loading-skeleton", children: [jsxRuntimeExports.jsx(reactNative.Animated.View, { style: [
|
|
2888
|
-
styles$
|
|
2889
|
-
styles$
|
|
2888
|
+
styles$4.skeleton,
|
|
2889
|
+
styles$4.title,
|
|
2890
2890
|
{
|
|
2891
2891
|
opacity: opacity,
|
|
2892
2892
|
backgroundColor: theme.alphaDerivedText[20],
|
|
2893
2893
|
borderRadius: 6,
|
|
2894
2894
|
},
|
|
2895
2895
|
] }), jsxRuntimeExports.jsx(reactNative.Animated.View, { style: [
|
|
2896
|
-
styles$
|
|
2897
|
-
styles$
|
|
2896
|
+
styles$4.skeleton,
|
|
2897
|
+
styles$4.body,
|
|
2898
2898
|
{
|
|
2899
2899
|
opacity: opacity,
|
|
2900
2900
|
backgroundColor: theme.alphaDerivedText[20],
|
|
2901
2901
|
borderRadius: 6,
|
|
2902
2902
|
},
|
|
2903
|
-
] }), jsxRuntimeExports.jsx(reactNative.Animated.View, { style: [styles$
|
|
2903
|
+
] }), jsxRuntimeExports.jsx(reactNative.Animated.View, { style: [styles$4.container, style], children: Array.from({ length: numberOfSquares }).map(function (_, index) { return (jsxRuntimeExports.jsx(SkeletonTile, {}, index)); }) })] }));
|
|
2904
2904
|
};
|
|
2905
|
-
var styles$
|
|
2905
|
+
var styles$4 = reactNative.StyleSheet.create({
|
|
2906
2906
|
container: {
|
|
2907
2907
|
flexDirection: 'row',
|
|
2908
2908
|
flexWrap: 'wrap',
|
|
@@ -3652,6 +3652,7 @@ var Grid = function (_a) {
|
|
|
3652
3652
|
width: "calc(".concat(100 / columns, "% - ").concat(((columns - 1) * GRID_GAP) / columns, "px)"),
|
|
3653
3653
|
marginBottom: GRID_GAP,
|
|
3654
3654
|
height: 'auto',
|
|
3655
|
+
aspectRatio: 1,
|
|
3655
3656
|
};
|
|
3656
3657
|
}
|
|
3657
3658
|
else {
|
|
@@ -3659,7 +3660,7 @@ var Grid = function (_a) {
|
|
|
3659
3660
|
return {
|
|
3660
3661
|
width: tileWidth,
|
|
3661
3662
|
marginBottom: GRID_GAP,
|
|
3662
|
-
|
|
3663
|
+
aspectRatio: 1,
|
|
3663
3664
|
};
|
|
3664
3665
|
}
|
|
3665
3666
|
}, []);
|
|
@@ -3702,9 +3703,9 @@ var Grid = function (_a) {
|
|
|
3702
3703
|
});
|
|
3703
3704
|
return tileContainers;
|
|
3704
3705
|
}, [gridTiles, columnsPerRow, getTileWidth]);
|
|
3705
|
-
return (jsxRuntimeExports.jsxs(reactNative.View, { children: [jsxRuntimeExports.jsx(SectionHeader, { title: section.title, description: section.description }), jsxRuntimeExports.jsx(reactNative.View, { style: styles$
|
|
3706
|
+
return (jsxRuntimeExports.jsxs(reactNative.View, { children: [jsxRuntimeExports.jsx(SectionHeader, { title: section.title, description: section.description }), jsxRuntimeExports.jsx(reactNative.View, { style: styles$3.grid, children: renderTileContainers() })] }));
|
|
3706
3707
|
};
|
|
3707
|
-
var styles$
|
|
3708
|
+
var styles$3 = reactNative.StyleSheet.create({
|
|
3708
3709
|
grid: {
|
|
3709
3710
|
flexDirection: 'row',
|
|
3710
3711
|
flexWrap: 'wrap',
|
|
@@ -3724,8 +3725,8 @@ var ProgressIndicator = function (_a) {
|
|
|
3724
3725
|
else if (percentage < 50) {
|
|
3725
3726
|
progressVariant = 'accent';
|
|
3726
3727
|
}
|
|
3727
|
-
return (jsxRuntimeExports.jsxs(reactNative.View, { style: styles$
|
|
3728
|
-
styles$
|
|
3728
|
+
return (jsxRuntimeExports.jsxs(reactNative.View, { style: styles$2.container, children: [jsxRuntimeExports.jsx(ProgressBar, { percentage: percentage, variant: progressVariant, height: height }), jsxRuntimeExports.jsx(reactNative.View, { style: [styles$2.circleContainer], children: jsxRuntimeExports.jsx(reactNative.View, { style: [
|
|
3729
|
+
styles$2.circle,
|
|
3729
3730
|
{
|
|
3730
3731
|
borderColor: theme.derivedSurface[20],
|
|
3731
3732
|
backgroundColor: isComplete ? theme.primary : theme.surface,
|
|
@@ -3733,7 +3734,7 @@ var ProgressIndicator = function (_a) {
|
|
|
3733
3734
|
},
|
|
3734
3735
|
], children: isComplete && (jsxRuntimeExports.jsx(Icon, { name: "Check", size: 12, color: theme.primaryText })) }) })] }));
|
|
3735
3736
|
};
|
|
3736
|
-
var styles$
|
|
3737
|
+
var styles$2 = reactNative.StyleSheet.create({
|
|
3737
3738
|
container: {
|
|
3738
3739
|
width: '100%',
|
|
3739
3740
|
flexDirection: 'row',
|
|
@@ -3984,7 +3985,8 @@ var GroupSections = function () {
|
|
|
3984
3985
|
return (jsxRuntimeExports.jsx(GroupEmptyState, { message: "This group doesn't have any active sections" }));
|
|
3985
3986
|
}
|
|
3986
3987
|
var sortedSections = sortByPriority(activeSections);
|
|
3987
|
-
|
|
3988
|
+
var Container = IS_WEB ? reactNative.View : reactNative.ScrollView;
|
|
3989
|
+
return (jsxRuntimeExports.jsx(Container, { accessible: true, accessibilityLabel: "Group: ".concat(groupData.name || 'Unnamed group'), style: styles$1.container, children: sortedSections.map(function (section) { return (jsxRuntimeExports.jsx(Section, { section: section }, section.id)); }) }));
|
|
3988
3990
|
};
|
|
3989
3991
|
/**
|
|
3990
3992
|
* A page-level component that represents a Group view in the application.
|
|
@@ -4013,6 +4015,9 @@ var Group = function (_a) {
|
|
|
4013
4015
|
}
|
|
4014
4016
|
return (jsxRuntimeExports.jsx(GroupContext.Provider, { value: { groupData: groupData }, children: jsxRuntimeExports.jsx(reactNative.View, { "data-testid": "group-container", children: jsxRuntimeExports.jsx(GroupSections, {}) }) }));
|
|
4015
4017
|
};
|
|
4018
|
+
var styles$1 = reactNative.StyleSheet.create({
|
|
4019
|
+
container: __assign({}, (IS_WEB ? {} : { padding: GRID_GAP })),
|
|
4020
|
+
});
|
|
4016
4021
|
|
|
4017
4022
|
/**
|
|
4018
4023
|
* Cleans up a number by removing any whitespace and ensuring it's a valid number
|