@wlloyalty/wll-react-sdk 1.4.10 → 1.5.0
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 +3 -0
- package/dist/native.js +64 -8
- 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/web.js +102 -18
- 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
|
@@ -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
|
/**
|
|
@@ -22321,6 +22357,15 @@ var useRewardTileStyles = function () {
|
|
|
22321
22357
|
height: '100%',
|
|
22322
22358
|
resizeMode: 'cover'
|
|
22323
22359
|
},
|
|
22360
|
+
lockIcon: {
|
|
22361
|
+
position: 'absolute',
|
|
22362
|
+
top: 0,
|
|
22363
|
+
left: 0,
|
|
22364
|
+
bottom: 0,
|
|
22365
|
+
right: 0,
|
|
22366
|
+
width: '100%',
|
|
22367
|
+
height: '100%'
|
|
22368
|
+
},
|
|
22324
22369
|
content: {
|
|
22325
22370
|
paddingHorizontal: useResponsiveValue(theme.sizes.sm, theme.sizes.xxs, isDesktop, isTablet),
|
|
22326
22371
|
flex: 1
|
|
@@ -22344,7 +22389,18 @@ var useRewardTileStyles = function () {
|
|
|
22344
22389
|
tileTitle: __assign({
|
|
22345
22390
|
maxWidth: '90%',
|
|
22346
22391
|
flex: 1
|
|
22347
|
-
}, getDirectionalMargin(8))
|
|
22392
|
+
}, getDirectionalMargin(8)),
|
|
22393
|
+
lockOverlay: {
|
|
22394
|
+
position: 'absolute',
|
|
22395
|
+
top: 0,
|
|
22396
|
+
left: 0,
|
|
22397
|
+
right: 0,
|
|
22398
|
+
bottom: 0,
|
|
22399
|
+
backgroundColor: 'rgba(0, 0, 0, 0.4)',
|
|
22400
|
+
justifyContent: 'center',
|
|
22401
|
+
alignItems: 'center',
|
|
22402
|
+
zIndex: 10
|
|
22403
|
+
}
|
|
22348
22404
|
});
|
|
22349
22405
|
};
|
|
22350
22406
|
|
|
@@ -22365,7 +22421,9 @@ var RewardTileMedia = function (_a) {
|
|
|
22365
22421
|
_c = _b.showArtwork,
|
|
22366
22422
|
showArtwork = _c === void 0 ? true : _c,
|
|
22367
22423
|
_d = _b.name,
|
|
22368
|
-
name = _d === void 0 ? 'Reward' : _d
|
|
22424
|
+
name = _d === void 0 ? 'Reward' : _d,
|
|
22425
|
+
_e = _b.isLocked,
|
|
22426
|
+
isLocked = _e === void 0 ? false : _e;
|
|
22369
22427
|
if (!artworkUrl || !showArtwork) return null;
|
|
22370
22428
|
var containerStyle = {
|
|
22371
22429
|
flexBasis: isArtworkOnly ? '100%' : '50%'
|
|
@@ -22381,7 +22439,14 @@ var RewardTileMedia = function (_a) {
|
|
|
22381
22439
|
},
|
|
22382
22440
|
style: styles.image,
|
|
22383
22441
|
alt: "Reward image for ".concat(name)
|
|
22384
|
-
})
|
|
22442
|
+
}), isLocked && (/*#__PURE__*/React.createElement(View$2, {
|
|
22443
|
+
style: styles.lockOverlay,
|
|
22444
|
+
testID: "lock-overlay"
|
|
22445
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
22446
|
+
name: "LockKeyhole",
|
|
22447
|
+
size: 48,
|
|
22448
|
+
color: "white"
|
|
22449
|
+
}))));
|
|
22385
22450
|
};
|
|
22386
22451
|
|
|
22387
22452
|
/**
|
|
@@ -22982,7 +23047,18 @@ var useVenueTileStyles = function () {
|
|
|
22982
23047
|
tileTitle: __assign({
|
|
22983
23048
|
maxWidth: '90%',
|
|
22984
23049
|
flex: 1
|
|
22985
|
-
}, getDirectionalMargin(8))
|
|
23050
|
+
}, getDirectionalMargin(8)),
|
|
23051
|
+
lockOverlay: {
|
|
23052
|
+
position: 'absolute',
|
|
23053
|
+
top: 0,
|
|
23054
|
+
left: 0,
|
|
23055
|
+
right: 0,
|
|
23056
|
+
bottom: 0,
|
|
23057
|
+
backgroundColor: 'rgba(0, 0, 0, 0.4)',
|
|
23058
|
+
justifyContent: 'center',
|
|
23059
|
+
alignItems: 'center',
|
|
23060
|
+
zIndex: 10
|
|
23061
|
+
}
|
|
22986
23062
|
});
|
|
22987
23063
|
};
|
|
22988
23064
|
|
|
@@ -22994,14 +23070,17 @@ var useVenueTileStyles = function () {
|
|
|
22994
23070
|
* @returns React.ReactElement or null if no artwork URL is present or artwork should not be shown
|
|
22995
23071
|
*/
|
|
22996
23072
|
var VenueTileMedia = function (_a) {
|
|
22997
|
-
var
|
|
23073
|
+
var _b = _a.isArtworkOnly,
|
|
23074
|
+
isArtworkOnly = _b === void 0 ? false : _b;
|
|
22998
23075
|
var styles = useVenueTileStyles();
|
|
22999
23076
|
var tileContext = useTileContext();
|
|
23000
23077
|
if (!isContextValid(tileContext)) return null;
|
|
23001
|
-
var
|
|
23002
|
-
artworkUrl =
|
|
23003
|
-
|
|
23004
|
-
name =
|
|
23078
|
+
var _c = tileContext.configuration,
|
|
23079
|
+
artworkUrl = _c.artworkUrl,
|
|
23080
|
+
_d = _c.name,
|
|
23081
|
+
name = _d === void 0 ? 'Venue' : _d,
|
|
23082
|
+
_e = _c.isLocked,
|
|
23083
|
+
isLocked = _e === void 0 ? false : _e;
|
|
23005
23084
|
if (!artworkUrl) return null;
|
|
23006
23085
|
var containerStyle = {
|
|
23007
23086
|
flexBasis: isArtworkOnly ? '100%' : '50%'
|
|
@@ -23017,7 +23096,14 @@ var VenueTileMedia = function (_a) {
|
|
|
23017
23096
|
},
|
|
23018
23097
|
style: styles.image,
|
|
23019
23098
|
alt: "Venue image for ".concat(name)
|
|
23020
|
-
})
|
|
23099
|
+
}), isLocked && (/*#__PURE__*/React.createElement(View$2, {
|
|
23100
|
+
style: styles.lockOverlay,
|
|
23101
|
+
testID: "lock-overlay"
|
|
23102
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
23103
|
+
name: "LockKeyhole",
|
|
23104
|
+
size: 48,
|
|
23105
|
+
color: "white"
|
|
23106
|
+
}))));
|
|
23021
23107
|
};
|
|
23022
23108
|
|
|
23023
23109
|
/**
|
|
@@ -23080,9 +23166,7 @@ var VenueTileRoot = function (_a) {
|
|
|
23080
23166
|
if (!tile || tile.tileHeight !== exports.TileHeight.Full || !tile.active || !tile.configuration) return null;
|
|
23081
23167
|
return /*#__PURE__*/React.createElement(BaseTile, {
|
|
23082
23168
|
tile: tile
|
|
23083
|
-
}, /*#__PURE__*/React.createElement(VenueTile.Media, {
|
|
23084
|
-
isArtworkOnly: false
|
|
23085
|
-
}), /*#__PURE__*/React.createElement(Layout, null, /*#__PURE__*/React.createElement(Row, {
|
|
23169
|
+
}, /*#__PURE__*/React.createElement(VenueTile.Media, null), /*#__PURE__*/React.createElement(Layout, null, /*#__PURE__*/React.createElement(Row, {
|
|
23086
23170
|
justify: "between",
|
|
23087
23171
|
align: "center",
|
|
23088
23172
|
style: styles.header
|