@wlloyalty/wll-react-sdk 1.4.10 → 1.5.1
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 +5 -1
- package/dist/native.js +65 -13
- package/dist/native.js.map +1 -1
- package/dist/types/components/atoms/BaseTile/styles.d.ts +25 -0
- package/dist/types/components/organisms/RewardTile/RewardTile.stories.d.ts +6 -0
- package/dist/types/components/organisms/VenueTile/VenueTile.stories.d.ts +3 -0
- package/dist/types/components/organisms/VenueTile/index.d.ts +1 -1
- package/dist/types/components/organisms/VenueTile/venue-tile-media.d.ts +1 -1
- package/dist/types/types/tile.d.ts +3 -0
- package/dist/types/types/wll.d.ts +1 -0
- package/dist/types/utils/styling.d.ts +1 -1
- package/dist/web.js +103 -21
- package/dist/web.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export declare const baseStyles: {
|
|
2
|
+
imageContainer: {
|
|
3
|
+
position: "relative";
|
|
4
|
+
};
|
|
2
5
|
container: {
|
|
3
6
|
width: "100%";
|
|
4
7
|
height: "100%";
|
|
@@ -40,6 +43,17 @@ export declare const useBaseTileStyles: () => {
|
|
|
40
43
|
width: "100%";
|
|
41
44
|
objectFit: "cover";
|
|
42
45
|
};
|
|
46
|
+
lockOverlay: {
|
|
47
|
+
position: "absolute";
|
|
48
|
+
top: number;
|
|
49
|
+
left: number;
|
|
50
|
+
right: number;
|
|
51
|
+
bottom: number;
|
|
52
|
+
backgroundColor: string;
|
|
53
|
+
justifyContent: "center";
|
|
54
|
+
alignItems: "center";
|
|
55
|
+
zIndex: number;
|
|
56
|
+
};
|
|
43
57
|
} | {
|
|
44
58
|
container: {
|
|
45
59
|
backgroundColor: string;
|
|
@@ -71,4 +85,15 @@ export declare const useBaseTileStyles: () => {
|
|
|
71
85
|
width: "100%";
|
|
72
86
|
objectFit: "cover";
|
|
73
87
|
};
|
|
88
|
+
lockOverlay: {
|
|
89
|
+
position: "absolute";
|
|
90
|
+
top: number;
|
|
91
|
+
left: number;
|
|
92
|
+
right: number;
|
|
93
|
+
bottom: number;
|
|
94
|
+
backgroundColor: string;
|
|
95
|
+
justifyContent: "center";
|
|
96
|
+
alignItems: "center";
|
|
97
|
+
zIndex: number;
|
|
98
|
+
};
|
|
74
99
|
};
|
|
@@ -10,3 +10,9 @@ export declare const DefaultWithPoints: import("@storybook/csf").AnnotatedStoryF
|
|
|
10
10
|
export declare const ArtworkOnly: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
|
|
11
11
|
tile: import("../../..").Tile;
|
|
12
12
|
}, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
|
|
13
|
+
export declare const Locked: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
|
|
14
|
+
tile: import("../../..").Tile;
|
|
15
|
+
}, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
|
|
16
|
+
export declare const ArtworkOnlyLocked: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
|
|
17
|
+
tile: import("../../..").Tile;
|
|
18
|
+
}, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
|
|
@@ -10,3 +10,6 @@ export declare const WithDescription: import("@storybook/csf").AnnotatedStoryFn<
|
|
|
10
10
|
export declare const WithoutDescription: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
|
|
11
11
|
tile: import("../../..").Tile;
|
|
12
12
|
}, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
|
|
13
|
+
export declare const Locked: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
|
|
14
|
+
tile: import("../../..").Tile;
|
|
15
|
+
}, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
|
|
@@ -8,7 +8,7 @@ type VenueTileProps = {
|
|
|
8
8
|
*/
|
|
9
9
|
export declare const VenueTile: (({ tile }: VenueTileProps) => React.ReactElement | null) & {
|
|
10
10
|
Media: ({ isArtworkOnly, }: {
|
|
11
|
-
isArtworkOnly
|
|
11
|
+
isArtworkOnly?: boolean;
|
|
12
12
|
}) => React.ReactElement | null;
|
|
13
13
|
Title: () => React.ReactElement | null;
|
|
14
14
|
Description: () => React.ReactElement | null;
|
|
@@ -65,6 +65,7 @@ export declare class ContentTileConfig {
|
|
|
65
65
|
artworkUrl?: string | null;
|
|
66
66
|
ctaLinkTarget?: CTALinkTarget;
|
|
67
67
|
ctaLink?: string | null;
|
|
68
|
+
isLocked?: boolean;
|
|
68
69
|
}
|
|
69
70
|
export declare class RewardTileConfig {
|
|
70
71
|
rewardId: string;
|
|
@@ -72,6 +73,7 @@ export declare class RewardTileConfig {
|
|
|
72
73
|
showPrice: boolean;
|
|
73
74
|
showArtwork?: boolean;
|
|
74
75
|
showDetails?: boolean;
|
|
76
|
+
isLocked?: boolean;
|
|
75
77
|
id: string;
|
|
76
78
|
createdAt: string;
|
|
77
79
|
updatedAt: string;
|
|
@@ -104,6 +106,7 @@ export declare class VenueTileConfig {
|
|
|
104
106
|
name: string;
|
|
105
107
|
artworkUrl: string;
|
|
106
108
|
description: string;
|
|
109
|
+
isLocked?: boolean;
|
|
107
110
|
}
|
|
108
111
|
export declare enum BadgeTileType {
|
|
109
112
|
Specific = "SPECIFIC",
|
package/dist/web.js
CHANGED
|
@@ -8203,7 +8203,7 @@ var sizes = {
|
|
|
8203
8203
|
sm: 12,
|
|
8204
8204
|
md: 14,
|
|
8205
8205
|
lg: 16,
|
|
8206
|
-
xl:
|
|
8206
|
+
xl: 20,
|
|
8207
8207
|
xxl: 24,
|
|
8208
8208
|
xxxl: 32,
|
|
8209
8209
|
xxxxl: 40,
|
|
@@ -19427,6 +19427,9 @@ var shouldHideContentForHalfTile = function (sizeInfo, artworkUrl) {
|
|
|
19427
19427
|
};
|
|
19428
19428
|
|
|
19429
19429
|
var baseStyles = StyleSheet$1.create({
|
|
19430
|
+
imageContainer: {
|
|
19431
|
+
position: 'relative'
|
|
19432
|
+
},
|
|
19430
19433
|
container: {
|
|
19431
19434
|
width: '100%',
|
|
19432
19435
|
height: '100%',
|
|
@@ -19464,7 +19467,18 @@ var useBaseTileStyles = function () {
|
|
|
19464
19467
|
alignItems: 'center',
|
|
19465
19468
|
justifyContent: 'space-between'
|
|
19466
19469
|
},
|
|
19467
|
-
media: baseStyles.media
|
|
19470
|
+
media: baseStyles.media,
|
|
19471
|
+
lockOverlay: {
|
|
19472
|
+
position: 'absolute',
|
|
19473
|
+
top: 0,
|
|
19474
|
+
left: 0,
|
|
19475
|
+
right: 0,
|
|
19476
|
+
bottom: 0,
|
|
19477
|
+
backgroundColor: 'rgba(0, 0, 0, 0.4)',
|
|
19478
|
+
justifyContent: 'center',
|
|
19479
|
+
alignItems: 'center',
|
|
19480
|
+
zIndex: 10
|
|
19481
|
+
}
|
|
19468
19482
|
});
|
|
19469
19483
|
}
|
|
19470
19484
|
var sizeInfo = useTileSize(tileContext);
|
|
@@ -19496,7 +19510,18 @@ var useBaseTileStyles = function () {
|
|
|
19496
19510
|
media: __assign(__assign({}, baseStyles.media), {
|
|
19497
19511
|
flexBasis: !isHalfSize && title && body ? '50%' : '100%',
|
|
19498
19512
|
height: isHalfSize ? '100%' : undefined
|
|
19499
|
-
})
|
|
19513
|
+
}),
|
|
19514
|
+
lockOverlay: {
|
|
19515
|
+
position: 'absolute',
|
|
19516
|
+
top: 0,
|
|
19517
|
+
left: 0,
|
|
19518
|
+
right: 0,
|
|
19519
|
+
bottom: 0,
|
|
19520
|
+
backgroundColor: 'rgba(0, 0, 0, 0.4)',
|
|
19521
|
+
justifyContent: 'center',
|
|
19522
|
+
alignItems: 'center',
|
|
19523
|
+
zIndex: 10
|
|
19524
|
+
}
|
|
19500
19525
|
});
|
|
19501
19526
|
};
|
|
19502
19527
|
|
|
@@ -19565,10 +19590,14 @@ var BaseTileMedia = function (props) {
|
|
|
19565
19590
|
var _a = tileContext.configuration,
|
|
19566
19591
|
artworkUrl = _a.artworkUrl,
|
|
19567
19592
|
_b = _a.title,
|
|
19568
|
-
title = _b === void 0 ? '' : _b
|
|
19593
|
+
title = _b === void 0 ? '' : _b,
|
|
19594
|
+
_c = _a.isLocked,
|
|
19595
|
+
isLocked = _c === void 0 ? false : _c;
|
|
19569
19596
|
var styles = useBaseTileStyles();
|
|
19570
19597
|
if (!artworkUrl) return null;
|
|
19571
|
-
return /*#__PURE__*/React.createElement(
|
|
19598
|
+
return /*#__PURE__*/React.createElement(View$2, {
|
|
19599
|
+
style: baseStyles.imageContainer
|
|
19600
|
+
}, /*#__PURE__*/React.createElement(ProgressiveImage, __assign({}, props, {
|
|
19572
19601
|
source: {
|
|
19573
19602
|
uri: artworkUrl
|
|
19574
19603
|
},
|
|
@@ -19576,7 +19605,14 @@ var BaseTileMedia = function (props) {
|
|
|
19576
19605
|
style: [props.style, baseStyles.media, styles.media],
|
|
19577
19606
|
alt: "Content image".concat(title ? " for ".concat(title) : ''),
|
|
19578
19607
|
role: "img"
|
|
19579
|
-
}))
|
|
19608
|
+
})), isLocked && (/*#__PURE__*/React.createElement(View$2, {
|
|
19609
|
+
style: styles.lockOverlay,
|
|
19610
|
+
testID: "lock-overlay"
|
|
19611
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
19612
|
+
name: "LockKeyhole",
|
|
19613
|
+
size: 48,
|
|
19614
|
+
color: "white"
|
|
19615
|
+
}))));
|
|
19580
19616
|
};
|
|
19581
19617
|
|
|
19582
19618
|
/**
|
|
@@ -20608,9 +20644,7 @@ var ContentTileTitle = function () {
|
|
|
20608
20644
|
if (!title) return undefined;
|
|
20609
20645
|
if (isHalfSize) {
|
|
20610
20646
|
if (title && !body) return 3;
|
|
20611
|
-
if (title && body) return 1;
|
|
20612
20647
|
}
|
|
20613
|
-
if (artworkUrl) return 1;
|
|
20614
20648
|
if (!body) return 7;
|
|
20615
20649
|
return 2;
|
|
20616
20650
|
}, [title, body, artworkUrl, isHalfSize]);
|
|
@@ -22321,6 +22355,15 @@ var useRewardTileStyles = function () {
|
|
|
22321
22355
|
height: '100%',
|
|
22322
22356
|
resizeMode: 'cover'
|
|
22323
22357
|
},
|
|
22358
|
+
lockIcon: {
|
|
22359
|
+
position: 'absolute',
|
|
22360
|
+
top: 0,
|
|
22361
|
+
left: 0,
|
|
22362
|
+
bottom: 0,
|
|
22363
|
+
right: 0,
|
|
22364
|
+
width: '100%',
|
|
22365
|
+
height: '100%'
|
|
22366
|
+
},
|
|
22324
22367
|
content: {
|
|
22325
22368
|
paddingHorizontal: useResponsiveValue(theme.sizes.sm, theme.sizes.xxs, isDesktop, isTablet),
|
|
22326
22369
|
flex: 1
|
|
@@ -22344,7 +22387,18 @@ var useRewardTileStyles = function () {
|
|
|
22344
22387
|
tileTitle: __assign({
|
|
22345
22388
|
maxWidth: '90%',
|
|
22346
22389
|
flex: 1
|
|
22347
|
-
}, getDirectionalMargin(8))
|
|
22390
|
+
}, getDirectionalMargin(8)),
|
|
22391
|
+
lockOverlay: {
|
|
22392
|
+
position: 'absolute',
|
|
22393
|
+
top: 0,
|
|
22394
|
+
left: 0,
|
|
22395
|
+
right: 0,
|
|
22396
|
+
bottom: 0,
|
|
22397
|
+
backgroundColor: 'rgba(0, 0, 0, 0.4)',
|
|
22398
|
+
justifyContent: 'center',
|
|
22399
|
+
alignItems: 'center',
|
|
22400
|
+
zIndex: 10
|
|
22401
|
+
}
|
|
22348
22402
|
});
|
|
22349
22403
|
};
|
|
22350
22404
|
|
|
@@ -22365,7 +22419,9 @@ var RewardTileMedia = function (_a) {
|
|
|
22365
22419
|
_c = _b.showArtwork,
|
|
22366
22420
|
showArtwork = _c === void 0 ? true : _c,
|
|
22367
22421
|
_d = _b.name,
|
|
22368
|
-
name = _d === void 0 ? 'Reward' : _d
|
|
22422
|
+
name = _d === void 0 ? 'Reward' : _d,
|
|
22423
|
+
_e = _b.isLocked,
|
|
22424
|
+
isLocked = _e === void 0 ? false : _e;
|
|
22369
22425
|
if (!artworkUrl || !showArtwork) return null;
|
|
22370
22426
|
var containerStyle = {
|
|
22371
22427
|
flexBasis: isArtworkOnly ? '100%' : '50%'
|
|
@@ -22381,7 +22437,14 @@ var RewardTileMedia = function (_a) {
|
|
|
22381
22437
|
},
|
|
22382
22438
|
style: styles.image,
|
|
22383
22439
|
alt: "Reward image for ".concat(name)
|
|
22384
|
-
})
|
|
22440
|
+
}), isLocked && (/*#__PURE__*/React.createElement(View$2, {
|
|
22441
|
+
style: styles.lockOverlay,
|
|
22442
|
+
testID: "lock-overlay"
|
|
22443
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
22444
|
+
name: "LockKeyhole",
|
|
22445
|
+
size: 48,
|
|
22446
|
+
color: "white"
|
|
22447
|
+
}))));
|
|
22385
22448
|
};
|
|
22386
22449
|
|
|
22387
22450
|
/**
|
|
@@ -22982,7 +23045,18 @@ var useVenueTileStyles = function () {
|
|
|
22982
23045
|
tileTitle: __assign({
|
|
22983
23046
|
maxWidth: '90%',
|
|
22984
23047
|
flex: 1
|
|
22985
|
-
}, getDirectionalMargin(8))
|
|
23048
|
+
}, getDirectionalMargin(8)),
|
|
23049
|
+
lockOverlay: {
|
|
23050
|
+
position: 'absolute',
|
|
23051
|
+
top: 0,
|
|
23052
|
+
left: 0,
|
|
23053
|
+
right: 0,
|
|
23054
|
+
bottom: 0,
|
|
23055
|
+
backgroundColor: 'rgba(0, 0, 0, 0.4)',
|
|
23056
|
+
justifyContent: 'center',
|
|
23057
|
+
alignItems: 'center',
|
|
23058
|
+
zIndex: 10
|
|
23059
|
+
}
|
|
22986
23060
|
});
|
|
22987
23061
|
};
|
|
22988
23062
|
|
|
@@ -22994,14 +23068,17 @@ var useVenueTileStyles = function () {
|
|
|
22994
23068
|
* @returns React.ReactElement or null if no artwork URL is present or artwork should not be shown
|
|
22995
23069
|
*/
|
|
22996
23070
|
var VenueTileMedia = function (_a) {
|
|
22997
|
-
var
|
|
23071
|
+
var _b = _a.isArtworkOnly,
|
|
23072
|
+
isArtworkOnly = _b === void 0 ? false : _b;
|
|
22998
23073
|
var styles = useVenueTileStyles();
|
|
22999
23074
|
var tileContext = useTileContext();
|
|
23000
23075
|
if (!isContextValid(tileContext)) return null;
|
|
23001
|
-
var
|
|
23002
|
-
artworkUrl =
|
|
23003
|
-
|
|
23004
|
-
name =
|
|
23076
|
+
var _c = tileContext.configuration,
|
|
23077
|
+
artworkUrl = _c.artworkUrl,
|
|
23078
|
+
_d = _c.name,
|
|
23079
|
+
name = _d === void 0 ? 'Venue' : _d,
|
|
23080
|
+
_e = _c.isLocked,
|
|
23081
|
+
isLocked = _e === void 0 ? false : _e;
|
|
23005
23082
|
if (!artworkUrl) return null;
|
|
23006
23083
|
var containerStyle = {
|
|
23007
23084
|
flexBasis: isArtworkOnly ? '100%' : '50%'
|
|
@@ -23017,7 +23094,14 @@ var VenueTileMedia = function (_a) {
|
|
|
23017
23094
|
},
|
|
23018
23095
|
style: styles.image,
|
|
23019
23096
|
alt: "Venue image for ".concat(name)
|
|
23020
|
-
})
|
|
23097
|
+
}), isLocked && (/*#__PURE__*/React.createElement(View$2, {
|
|
23098
|
+
style: styles.lockOverlay,
|
|
23099
|
+
testID: "lock-overlay"
|
|
23100
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
23101
|
+
name: "LockKeyhole",
|
|
23102
|
+
size: 48,
|
|
23103
|
+
color: "white"
|
|
23104
|
+
}))));
|
|
23021
23105
|
};
|
|
23022
23106
|
|
|
23023
23107
|
/**
|
|
@@ -23080,9 +23164,7 @@ var VenueTileRoot = function (_a) {
|
|
|
23080
23164
|
if (!tile || tile.tileHeight !== exports.TileHeight.Full || !tile.active || !tile.configuration) return null;
|
|
23081
23165
|
return /*#__PURE__*/React.createElement(BaseTile, {
|
|
23082
23166
|
tile: tile
|
|
23083
|
-
}, /*#__PURE__*/React.createElement(VenueTile.Media, {
|
|
23084
|
-
isArtworkOnly: false
|
|
23085
|
-
}), /*#__PURE__*/React.createElement(Layout, null, /*#__PURE__*/React.createElement(Row, {
|
|
23167
|
+
}, /*#__PURE__*/React.createElement(VenueTile.Media, null), /*#__PURE__*/React.createElement(Layout, null, /*#__PURE__*/React.createElement(Row, {
|
|
23086
23168
|
justify: "between",
|
|
23087
23169
|
align: "center",
|
|
23088
23170
|
style: styles.header
|