@wlloyalty/wll-react-sdk 1.4.8 → 1.4.9
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 +270 -16
- package/dist/native.js +1557 -359
- package/dist/native.js.map +1 -1
- package/dist/types/components/organisms/VenueTile/VenueTile.spec.d.ts +1 -0
- package/dist/types/components/organisms/VenueTile/VenueTile.stories.d.ts +12 -0
- package/dist/types/components/organisms/VenueTile/index.d.ts +18 -0
- package/dist/types/components/organisms/VenueTile/styles.d.ts +8 -0
- package/dist/types/components/organisms/VenueTile/venue-tile-chevron.d.ts +7 -0
- package/dist/types/components/organisms/VenueTile/venue-tile-description.d.ts +7 -0
- package/dist/types/components/organisms/VenueTile/venue-tile-media.d.ts +13 -0
- package/dist/types/components/organisms/VenueTile/venue-tile-title.d.ts +7 -0
- package/dist/types/components/organisms/index.d.ts +1 -0
- package/dist/types/index.d.ts +18 -0
- package/dist/types/mocks/tiles/venueTile.d.ts +6 -0
- package/dist/types/types/tile.d.ts +9 -2
- package/dist/web.js +298 -6
- package/dist/web.js.map +1 -1
- package/package.json +12 -13
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react';
|
|
2
|
+
declare const _default: Meta;
|
|
3
|
+
export default _default;
|
|
4
|
+
export declare const Default: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
|
|
5
|
+
tile: import("../../..").Tile;
|
|
6
|
+
}, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
|
|
7
|
+
export declare const WithDescription: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
|
|
8
|
+
tile: import("../../..").Tile;
|
|
9
|
+
}, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
|
|
10
|
+
export declare const WithoutDescription: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
|
|
11
|
+
tile: import("../../..").Tile;
|
|
12
|
+
}, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Tile } from '../../../types/tile';
|
|
3
|
+
type VenueTileProps = {
|
|
4
|
+
tile: Tile;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* The VenueTile component with subcomponents attached.
|
|
8
|
+
*/
|
|
9
|
+
export declare const VenueTile: (({ tile }: VenueTileProps) => React.ReactElement | null) & {
|
|
10
|
+
Media: ({ isArtworkOnly, }: {
|
|
11
|
+
isArtworkOnly: boolean;
|
|
12
|
+
}) => React.ReactElement | null;
|
|
13
|
+
Title: () => React.ReactElement | null;
|
|
14
|
+
Description: () => React.ReactElement | null;
|
|
15
|
+
Chevron: () => React.ReactElement;
|
|
16
|
+
};
|
|
17
|
+
declare const _default: (props: Omit<VenueTileProps, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps) => React.JSX.Element;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* Custom hook that returns the styles for the VenueTile component.
|
|
4
|
+
* Applies responsive styling based on the current device.
|
|
5
|
+
*
|
|
6
|
+
* @returns StyleSheet styles for the VenueTile component
|
|
7
|
+
*/
|
|
8
|
+
export declare const useVenueTileStyles: () => ReturnType<typeof StyleSheet.create>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type VenueTileMediaProps = {
|
|
3
|
+
isArtworkOnly: boolean;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Renders the media for a Venue Tile.
|
|
7
|
+
*
|
|
8
|
+
* @param props {VenueTileMediaProps} - Component props
|
|
9
|
+
* @param props.isArtworkOnly {boolean} - Whether the media should be rendered as an artwork only component
|
|
10
|
+
* @returns React.ReactElement or null if no artwork URL is present or artwork should not be shown
|
|
11
|
+
*/
|
|
12
|
+
export declare const VenueTileMedia: ({ isArtworkOnly, }: VenueTileMediaProps) => React.ReactElement | null;
|
|
13
|
+
export {};
|
|
@@ -8,3 +8,4 @@ export { default as RewardTile } from './RewardTile';
|
|
|
8
8
|
export { default as Section } from './Section';
|
|
9
9
|
export { default as TierTileUpdated } from './TierTileUpdated';
|
|
10
10
|
export { default as RoundupTile } from './RoundupTile';
|
|
11
|
+
export { default as VenueTile } from './VenueTile';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -11,3 +11,21 @@ export * from './types/section';
|
|
|
11
11
|
export * from './types/theme';
|
|
12
12
|
export * from './types/tile';
|
|
13
13
|
export * from './types/wll';
|
|
14
|
+
export * from './constants/device';
|
|
15
|
+
export * from './constants/responsive';
|
|
16
|
+
export * from './constants/theme';
|
|
17
|
+
export * from './constants/grid';
|
|
18
|
+
export * from './constants/index';
|
|
19
|
+
export * from './utils/apiHelpers';
|
|
20
|
+
export * from './utils/eventEmitter';
|
|
21
|
+
export * from './utils/styling';
|
|
22
|
+
export * from './utils/themeHelpers';
|
|
23
|
+
export * from './utils/transforms';
|
|
24
|
+
export * from './utils/responsiveHelper';
|
|
25
|
+
export * from './hooks/useResponsive';
|
|
26
|
+
export * from './hooks/useTileSize';
|
|
27
|
+
export * from './hooks/useGroupRefresh';
|
|
28
|
+
export * from './hooks/useInitialGroupFetch';
|
|
29
|
+
export * from './hooks/usePullToRefresh';
|
|
30
|
+
export * from './hooks/useInvalidateData';
|
|
31
|
+
export * from './hooks/useNavigationHandler';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { VenueTileConfig, Tile, TileHeight } from '../../types/tile';
|
|
2
|
+
export type VenueTileMockConfig = Partial<VenueTileConfig> & {
|
|
3
|
+
active?: boolean;
|
|
4
|
+
tileHeight?: TileHeight;
|
|
5
|
+
};
|
|
6
|
+
export declare const createVenueTileMock: (config?: VenueTileMockConfig) => Tile;
|
|
@@ -19,7 +19,8 @@ export declare enum TileType {
|
|
|
19
19
|
Badge = "BADGE",
|
|
20
20
|
RewardCategory = "REWARD_CATEGORY",
|
|
21
21
|
Tier = "TIER",
|
|
22
|
-
Roundup = "ROUND_UP_BALANCE"
|
|
22
|
+
Roundup = "ROUND_UP_BALANCE",
|
|
23
|
+
Venue = "VENUE"
|
|
23
24
|
}
|
|
24
25
|
export declare enum TileHeight {
|
|
25
26
|
Half = "HALF",
|
|
@@ -98,6 +99,12 @@ export declare class RewardTileConfig {
|
|
|
98
99
|
pointsPrefix: string | null;
|
|
99
100
|
pointsSuffix: string | null;
|
|
100
101
|
}
|
|
102
|
+
export declare class VenueTileConfig {
|
|
103
|
+
venueId: string;
|
|
104
|
+
name: string;
|
|
105
|
+
artworkUrl: string;
|
|
106
|
+
description: string;
|
|
107
|
+
}
|
|
101
108
|
export declare enum BadgeTileType {
|
|
102
109
|
Specific = "SPECIFIC",
|
|
103
110
|
Latest = "LATEST_EARNED"
|
|
@@ -171,7 +178,7 @@ export type Tile = {
|
|
|
171
178
|
configuration: TileConfig;
|
|
172
179
|
priority: number;
|
|
173
180
|
};
|
|
174
|
-
declare const getConfigForTileType: (tileType: TileType) => typeof BannerTileConfig | typeof PointsTileConfig | typeof ContentTileConfig | typeof RewardTileConfig | typeof BadgeTileConfig | typeof RewardCategoryTileConfig | typeof TierTileConfig;
|
|
181
|
+
declare const getConfigForTileType: (tileType: TileType) => typeof BannerTileConfig | typeof PointsTileConfig | typeof ContentTileConfig | typeof RewardTileConfig | typeof VenueTileConfig | typeof BadgeTileConfig | typeof RewardCategoryTileConfig | typeof TierTileConfig;
|
|
175
182
|
export type TileConfig = InstanceType<ReturnType<typeof getConfigForTileType>>;
|
|
176
183
|
export type TileSizeInfo = {
|
|
177
184
|
isFullSize: boolean;
|
package/dist/web.js
CHANGED
|
@@ -8185,10 +8185,12 @@ var IS_WEB = Platform$1.OS === "web";
|
|
|
8185
8185
|
var IS_IOS = Platform$1.OS === "ios";
|
|
8186
8186
|
var IS_ANDROID = Platform$1.OS === "android";
|
|
8187
8187
|
var IS_MOBILE = IS_IOS || IS_ANDROID;
|
|
8188
|
+
var IS_DESKTOP = !IS_MOBILE;
|
|
8188
8189
|
var _a$1 = Dimensions.get("window"),
|
|
8189
|
-
width = _a$1.width
|
|
8190
|
-
_a$1.height;
|
|
8190
|
+
width = _a$1.width,
|
|
8191
|
+
height = _a$1.height;
|
|
8191
8192
|
var SCREEN_WIDTH = width;
|
|
8193
|
+
var SCREEN_HEIGHT = height;
|
|
8192
8194
|
|
|
8193
8195
|
var sizes = {
|
|
8194
8196
|
borderRadiusSm: 15,
|
|
@@ -8261,7 +8263,7 @@ var COLOR_CONSTANTS = {
|
|
|
8261
8263
|
};
|
|
8262
8264
|
|
|
8263
8265
|
// Storybook Themes
|
|
8264
|
-
|
|
8266
|
+
var storyBookThemes = {
|
|
8265
8267
|
modern: __assign(__assign({}, defaultTheme), {
|
|
8266
8268
|
primary: '#f72585',
|
|
8267
8269
|
accent: '#ffc300',
|
|
@@ -8298,7 +8300,36 @@ var COLOR_CONSTANTS = {
|
|
|
8298
8300
|
surface: '#f0dfad',
|
|
8299
8301
|
surfaceText: '#2d3436'
|
|
8300
8302
|
})
|
|
8301
|
-
}
|
|
8303
|
+
};
|
|
8304
|
+
// Create the themes object
|
|
8305
|
+
var themes = {
|
|
8306
|
+
default: defaultTheme,
|
|
8307
|
+
dark: storyBookThemes.dark,
|
|
8308
|
+
modern: storyBookThemes.modern,
|
|
8309
|
+
warm: storyBookThemes.warm,
|
|
8310
|
+
forest: storyBookThemes.forest,
|
|
8311
|
+
sunset: storyBookThemes.sunset
|
|
8312
|
+
};
|
|
8313
|
+
// Theme selector items
|
|
8314
|
+
var themeItems = [{
|
|
8315
|
+
value: 'default',
|
|
8316
|
+
title: 'Default'
|
|
8317
|
+
}, {
|
|
8318
|
+
value: 'dark',
|
|
8319
|
+
title: 'Dark'
|
|
8320
|
+
}, {
|
|
8321
|
+
value: 'modern',
|
|
8322
|
+
title: 'Modern'
|
|
8323
|
+
}, {
|
|
8324
|
+
value: 'warm',
|
|
8325
|
+
title: 'Warm'
|
|
8326
|
+
}, {
|
|
8327
|
+
value: 'forest',
|
|
8328
|
+
title: 'Forest'
|
|
8329
|
+
}, {
|
|
8330
|
+
value: 'sunset',
|
|
8331
|
+
title: 'Sunset'
|
|
8332
|
+
}];
|
|
8302
8333
|
|
|
8303
8334
|
var isValidColor = function (color) {
|
|
8304
8335
|
try {
|
|
@@ -8443,6 +8474,16 @@ var desaturateColor = function (color) {
|
|
|
8443
8474
|
if (!baseColor) return COLOR_CONSTANTS.DEFAULT_COLOR;
|
|
8444
8475
|
return baseColor.grayscale().lighten(COLOR_CONSTANTS.DESATURATION_LIGHTEN_AMOUNT).toString();
|
|
8445
8476
|
};
|
|
8477
|
+
/**
|
|
8478
|
+
* Gets the appropriate state color based on type and count
|
|
8479
|
+
* @param baseColor - Base color to process
|
|
8480
|
+
* @param type - Type of state
|
|
8481
|
+
* @param count - Count affecting the state
|
|
8482
|
+
* @returns Processed color string
|
|
8483
|
+
*/
|
|
8484
|
+
var getStateColor = function (baseColor, type, count) {
|
|
8485
|
+
return shouldDesaturate(type, count) ? desaturateColor(baseColor) : baseColor;
|
|
8486
|
+
};
|
|
8446
8487
|
|
|
8447
8488
|
var DIMENSION_MODES = {
|
|
8448
8489
|
DESKTOP: 'desktop',
|
|
@@ -19063,6 +19104,7 @@ var Text = function (_a) {
|
|
|
19063
19104
|
};
|
|
19064
19105
|
|
|
19065
19106
|
var MAX_WIDTH = 1080;
|
|
19107
|
+
var SLIDE_WIDTH = MAX_WIDTH;
|
|
19066
19108
|
var BUTTON_SIZE = 42;
|
|
19067
19109
|
|
|
19068
19110
|
exports.CTALinkTarget = void 0;
|
|
@@ -19090,6 +19132,7 @@ exports.TileType = void 0;
|
|
|
19090
19132
|
TileType["RewardCategory"] = "REWARD_CATEGORY";
|
|
19091
19133
|
TileType["Tier"] = "TIER";
|
|
19092
19134
|
TileType["Roundup"] = "ROUND_UP_BALANCE";
|
|
19135
|
+
TileType["Venue"] = "VENUE";
|
|
19093
19136
|
})(exports.TileType || (exports.TileType = {}));
|
|
19094
19137
|
exports.TileHeight = void 0;
|
|
19095
19138
|
(function (TileHeight) {
|
|
@@ -19165,6 +19208,15 @@ var RewardTileConfig = /** @class */function () {
|
|
|
19165
19208
|
}
|
|
19166
19209
|
return RewardTileConfig;
|
|
19167
19210
|
}();
|
|
19211
|
+
var VenueTileConfig = /** @class */function () {
|
|
19212
|
+
function VenueTileConfig() {
|
|
19213
|
+
this.venueId = '';
|
|
19214
|
+
this.name = '';
|
|
19215
|
+
this.artworkUrl = '';
|
|
19216
|
+
this.description = '';
|
|
19217
|
+
}
|
|
19218
|
+
return VenueTileConfig;
|
|
19219
|
+
}();
|
|
19168
19220
|
exports.BadgeTileType = void 0;
|
|
19169
19221
|
(function (BadgeTileType) {
|
|
19170
19222
|
BadgeTileType["Specific"] = "SPECIFIC";
|
|
@@ -19220,6 +19272,13 @@ var useHandleTilePress = function (tile, ctaLink, ctaLinkTarget) {
|
|
|
19220
19272
|
return handleNavigation(url, exports.CTALinkTarget.sameWindow);
|
|
19221
19273
|
}
|
|
19222
19274
|
}
|
|
19275
|
+
if ((tile === null || tile === void 0 ? void 0 : tile.type) === exports.TileType.Venue) {
|
|
19276
|
+
var config = tile.configuration;
|
|
19277
|
+
if (config === null || config === void 0 ? void 0 : config.venueId) {
|
|
19278
|
+
var url = "/venue?id=".concat(config.venueId);
|
|
19279
|
+
return handleNavigation(url, exports.CTALinkTarget.sameWindow);
|
|
19280
|
+
}
|
|
19281
|
+
}
|
|
19223
19282
|
if ((tile === null || tile === void 0 ? void 0 : tile.type) === exports.TileType.RewardCategory) {
|
|
19224
19283
|
var config = tile.configuration;
|
|
19225
19284
|
var url = "/category?id=".concat(config.rewardCategoryId);
|
|
@@ -19588,7 +19647,7 @@ var BaseTileContainer = function (_a) {
|
|
|
19588
19647
|
surface: '#ffffff'
|
|
19589
19648
|
};
|
|
19590
19649
|
var handlePress = useHandleTilePress(tile, ctaLink, ctaLinkTarget);
|
|
19591
|
-
var isInteractive = Boolean(ctaLink || tile.type === 'REWARD' || tile.type === 'REWARD_CATEGORY');
|
|
19650
|
+
var isInteractive = Boolean(ctaLink || tile.type === 'REWARD' || tile.type === 'REWARD_CATEGORY' || tile.type === 'VENUE');
|
|
19592
19651
|
var layout = {
|
|
19593
19652
|
flexDirection: 'column',
|
|
19594
19653
|
justifyContent: isHalfSize ? 'center' : 'flex-start',
|
|
@@ -22855,8 +22914,191 @@ var RoundupTile = Object.assign(RoundupTileRoot, {
|
|
|
22855
22914
|
});
|
|
22856
22915
|
var RoundupTile$1 = withTileFetching(RoundupTile);
|
|
22857
22916
|
|
|
22917
|
+
/**
|
|
22918
|
+
* Renders a chevron icon for a Venue Tile.
|
|
22919
|
+
*
|
|
22920
|
+
* @returns React.ReactElement
|
|
22921
|
+
*/
|
|
22922
|
+
var VenueTileChevron = function () {
|
|
22923
|
+
var _a;
|
|
22924
|
+
var theme = useWllSdk().theme;
|
|
22925
|
+
return /*#__PURE__*/React.createElement(Icon, {
|
|
22926
|
+
name: "ChevronRight",
|
|
22927
|
+
size: IS_MOBILE ? 16 : undefined,
|
|
22928
|
+
color: ((_a = theme === null || theme === void 0 ? void 0 : theme.derivedSurfaceText) === null || _a === void 0 ? void 0 : _a[20]) || '#000000',
|
|
22929
|
+
role: "img",
|
|
22930
|
+
accessibilityLabel: "View venue details"
|
|
22931
|
+
});
|
|
22932
|
+
};
|
|
22933
|
+
|
|
22934
|
+
/**
|
|
22935
|
+
* Custom hook that returns the styles for the VenueTile component.
|
|
22936
|
+
* Applies responsive styling based on the current device.
|
|
22937
|
+
*
|
|
22938
|
+
* @returns StyleSheet styles for the VenueTile component
|
|
22939
|
+
*/
|
|
22940
|
+
var useVenueTileStyles = function () {
|
|
22941
|
+
var _a = useResponsive$1(),
|
|
22942
|
+
isDesktop = _a.isDesktop,
|
|
22943
|
+
isTablet = _a.isTablet;
|
|
22944
|
+
var theme = useWllSdk().theme;
|
|
22945
|
+
return StyleSheet$1.create({
|
|
22946
|
+
imageContainer: {
|
|
22947
|
+
width: '100%',
|
|
22948
|
+
marginBottom: useResponsiveValue(theme.sizes.sm, theme.sizes.xxs, isDesktop, isTablet)
|
|
22949
|
+
},
|
|
22950
|
+
image: {
|
|
22951
|
+
position: 'absolute',
|
|
22952
|
+
top: 0,
|
|
22953
|
+
left: 0,
|
|
22954
|
+
bottom: 0,
|
|
22955
|
+
right: 0,
|
|
22956
|
+
width: '100%',
|
|
22957
|
+
height: '100%',
|
|
22958
|
+
resizeMode: 'cover'
|
|
22959
|
+
},
|
|
22960
|
+
content: {
|
|
22961
|
+
paddingHorizontal: useResponsiveValue(theme.sizes.sm, theme.sizes.xxs, isDesktop, isTablet),
|
|
22962
|
+
flex: 1
|
|
22963
|
+
},
|
|
22964
|
+
footer: {
|
|
22965
|
+
marginTop: 8
|
|
22966
|
+
},
|
|
22967
|
+
pointsContainer: {
|
|
22968
|
+
flexDirection: 'row',
|
|
22969
|
+
alignItems: 'center',
|
|
22970
|
+
justifyContent: 'center'
|
|
22971
|
+
},
|
|
22972
|
+
suffix: {
|
|
22973
|
+
color: theme.primary,
|
|
22974
|
+
fontSize: useResponsiveValue(theme.sizes.xl, theme.sizes.md, isDesktop, isTablet)
|
|
22975
|
+
},
|
|
22976
|
+
header: {
|
|
22977
|
+
width: '100%',
|
|
22978
|
+
marginBottom: useResponsiveValue(theme.sizes.xxs, theme.sizes.xxxs, isDesktop, isTablet)
|
|
22979
|
+
},
|
|
22980
|
+
tileTitle: __assign({
|
|
22981
|
+
maxWidth: '90%',
|
|
22982
|
+
flex: 1
|
|
22983
|
+
}, getDirectionalMargin(8))
|
|
22984
|
+
});
|
|
22985
|
+
};
|
|
22986
|
+
|
|
22987
|
+
/**
|
|
22988
|
+
* Renders the media for a Venue Tile.
|
|
22989
|
+
*
|
|
22990
|
+
* @param props {VenueTileMediaProps} - Component props
|
|
22991
|
+
* @param props.isArtworkOnly {boolean} - Whether the media should be rendered as an artwork only component
|
|
22992
|
+
* @returns React.ReactElement or null if no artwork URL is present or artwork should not be shown
|
|
22993
|
+
*/
|
|
22994
|
+
var VenueTileMedia = function (_a) {
|
|
22995
|
+
var isArtworkOnly = _a.isArtworkOnly;
|
|
22996
|
+
var styles = useVenueTileStyles();
|
|
22997
|
+
var tileContext = useTileContext();
|
|
22998
|
+
if (!isContextValid(tileContext)) return null;
|
|
22999
|
+
var _b = tileContext.configuration,
|
|
23000
|
+
artworkUrl = _b.artworkUrl,
|
|
23001
|
+
_c = _b.name,
|
|
23002
|
+
name = _c === void 0 ? 'Venue' : _c;
|
|
23003
|
+
if (!artworkUrl) return null;
|
|
23004
|
+
var containerStyle = {
|
|
23005
|
+
flexBasis: isArtworkOnly ? '100%' : '50%'
|
|
23006
|
+
};
|
|
23007
|
+
return /*#__PURE__*/React.createElement(View$2, {
|
|
23008
|
+
style: [styles.imageContainer, containerStyle],
|
|
23009
|
+
testID: "venue-tile-media",
|
|
23010
|
+
role: "img",
|
|
23011
|
+
accessibilityLabel: "Venue image for ".concat(name)
|
|
23012
|
+
}, /*#__PURE__*/React.createElement(ProgressiveImage, {
|
|
23013
|
+
source: {
|
|
23014
|
+
uri: artworkUrl
|
|
23015
|
+
},
|
|
23016
|
+
style: styles.image,
|
|
23017
|
+
alt: "Venue image for ".concat(name)
|
|
23018
|
+
}));
|
|
23019
|
+
};
|
|
23020
|
+
|
|
23021
|
+
/**
|
|
23022
|
+
* Renders the summary of a Venue Tile.
|
|
23023
|
+
*
|
|
23024
|
+
* @returns React.ReactElement or null if no summary is present
|
|
23025
|
+
*/
|
|
23026
|
+
var VenueTileDescription = function () {
|
|
23027
|
+
var tileContext = useTileContext();
|
|
23028
|
+
if (!isContextValid(tileContext)) return null;
|
|
23029
|
+
var description = tileContext.configuration.description;
|
|
23030
|
+
if (!description) return null;
|
|
23031
|
+
return /*#__PURE__*/React.createElement(Text, {
|
|
23032
|
+
variant: "body",
|
|
23033
|
+
role: "article",
|
|
23034
|
+
accessibilityLabel: description,
|
|
23035
|
+
testID: "venue-tile-description",
|
|
23036
|
+
numberOfLines: 3,
|
|
23037
|
+
ellipsizeMode: "tail"
|
|
23038
|
+
}, description);
|
|
23039
|
+
};
|
|
23040
|
+
|
|
23041
|
+
/**
|
|
23042
|
+
* Renders the title of a Venue Tile.
|
|
23043
|
+
*
|
|
23044
|
+
* @returns React.ReactElement or null if no name is present
|
|
23045
|
+
*/
|
|
23046
|
+
var VenueTileTitle = function () {
|
|
23047
|
+
var tileContext = useTileContext();
|
|
23048
|
+
var styles = useVenueTileStyles();
|
|
23049
|
+
if (!isContextValid(tileContext)) return null;
|
|
23050
|
+
var name = tileContext.configuration.name;
|
|
23051
|
+
if (!name) return null;
|
|
23052
|
+
var handleTitleWidth = function () {
|
|
23053
|
+
if (IS_MOBILE) {
|
|
23054
|
+
return styles.tileTitle;
|
|
23055
|
+
}
|
|
23056
|
+
};
|
|
23057
|
+
return /*#__PURE__*/React.createElement(Text, {
|
|
23058
|
+
variant: "title",
|
|
23059
|
+
ellipsizeMode: "tail",
|
|
23060
|
+
numberOfLines: 1,
|
|
23061
|
+
role: "heading",
|
|
23062
|
+
accessibilityLabel: "Venue title: ".concat(name),
|
|
23063
|
+
testID: "venue-tile-title",
|
|
23064
|
+
style: handleTitleWidth()
|
|
23065
|
+
}, name);
|
|
23066
|
+
};
|
|
23067
|
+
|
|
23068
|
+
/**
|
|
23069
|
+
* The VenueTile component renders a tile with media, title, summary, points, and a chevron.
|
|
23070
|
+
*
|
|
23071
|
+
* @param {VenueTileProps} props - Component props
|
|
23072
|
+
* @param {Tile} props.tile - The tile data to render
|
|
23073
|
+
* @returns React.ReactElement or null if tile is inactive or not a full-height tile
|
|
23074
|
+
*/
|
|
23075
|
+
var VenueTileRoot = function (_a) {
|
|
23076
|
+
var tile = _a.tile;
|
|
23077
|
+
var styles = useVenueTileStyles();
|
|
23078
|
+
if (!tile || tile.tileHeight !== exports.TileHeight.Full || !tile.active || !tile.configuration) return null;
|
|
23079
|
+
return /*#__PURE__*/React.createElement(BaseTile, {
|
|
23080
|
+
tile: tile
|
|
23081
|
+
}, /*#__PURE__*/React.createElement(VenueTile.Media, {
|
|
23082
|
+
isArtworkOnly: false
|
|
23083
|
+
}), /*#__PURE__*/React.createElement(Layout, null, /*#__PURE__*/React.createElement(Row, {
|
|
23084
|
+
justify: "between",
|
|
23085
|
+
align: "center",
|
|
23086
|
+
style: styles.header
|
|
23087
|
+
}, /*#__PURE__*/React.createElement(VenueTile.Title, null), /*#__PURE__*/React.createElement(VenueTile.Chevron, null)), /*#__PURE__*/React.createElement(VenueTile.Description, null)));
|
|
23088
|
+
};
|
|
23089
|
+
/**
|
|
23090
|
+
* The VenueTile component with subcomponents attached.
|
|
23091
|
+
*/
|
|
23092
|
+
var VenueTile = Object.assign(VenueTileRoot, {
|
|
23093
|
+
Media: VenueTileMedia,
|
|
23094
|
+
Title: VenueTileTitle,
|
|
23095
|
+
Description: VenueTileDescription,
|
|
23096
|
+
Chevron: VenueTileChevron
|
|
23097
|
+
});
|
|
23098
|
+
var VenueTile$1 = withTileFetching(VenueTile);
|
|
23099
|
+
|
|
22858
23100
|
var _a;
|
|
22859
|
-
var TILE_COMPONENTS = (_a = {}, _a[exports.TileType.Content] = ContentTile$1, _a[exports.TileType.Badge] = BadgeTile$1, _a[exports.TileType.Tier] = TierTile, _a[exports.TileType.Points] = PointsTile$1, _a[exports.TileType.Reward] = RewardTile$1, _a[exports.TileType.RewardCategory] = RewardCategoryTile$1, _a[exports.TileType.Banner] = BannerTile$1, _a[exports.TileType.Roundup] = RoundupTile$1, _a);
|
|
23101
|
+
var TILE_COMPONENTS = (_a = {}, _a[exports.TileType.Content] = ContentTile$1, _a[exports.TileType.Badge] = BadgeTile$1, _a[exports.TileType.Tier] = TierTile, _a[exports.TileType.Points] = PointsTile$1, _a[exports.TileType.Reward] = RewardTile$1, _a[exports.TileType.RewardCategory] = RewardCategoryTile$1, _a[exports.TileType.Banner] = BannerTile$1, _a[exports.TileType.Roundup] = RoundupTile$1, _a[exports.TileType.Venue] = VenueTile$1, _a);
|
|
22860
23102
|
/**
|
|
22861
23103
|
* TileContainer component to render a list of tiles with proper layout and spacing.
|
|
22862
23104
|
*/
|
|
@@ -23027,6 +23269,7 @@ var Reward = /** @class */function () {
|
|
|
23027
23269
|
return Reward;
|
|
23028
23270
|
}();
|
|
23029
23271
|
|
|
23272
|
+
exports.BUTTON_SIZE = BUTTON_SIZE;
|
|
23030
23273
|
exports.BadgeTile = BadgeTile$1;
|
|
23031
23274
|
exports.BadgeTileConfig = BadgeTileConfig;
|
|
23032
23275
|
exports.BannerTile = BannerTile$1;
|
|
@@ -23034,19 +23277,29 @@ exports.BannerTileConfig = BannerTileConfig;
|
|
|
23034
23277
|
exports.BaseBanner = BaseBanner;
|
|
23035
23278
|
exports.BaseTile = BaseTile;
|
|
23036
23279
|
exports.Button = Button;
|
|
23280
|
+
exports.COLOR_CONSTANTS = COLOR_CONSTANTS;
|
|
23037
23281
|
exports.Carousel = Carousel;
|
|
23038
23282
|
exports.CarouselNavButton = CarouselNavButton;
|
|
23039
23283
|
exports.Chip = Chip;
|
|
23040
23284
|
exports.Column = Column;
|
|
23041
23285
|
exports.ContentTile = ContentTile$1;
|
|
23042
23286
|
exports.ContentTileConfig = ContentTileConfig;
|
|
23287
|
+
exports.DIMENSION_MODES = DIMENSION_MODES;
|
|
23288
|
+
exports.EventEmitter = EventEmitter$1;
|
|
23043
23289
|
exports.FullFlex = FullFlex;
|
|
23290
|
+
exports.GRID_GAP = GRID_GAP;
|
|
23044
23291
|
exports.Grid = Grid;
|
|
23045
23292
|
exports.Group = Group;
|
|
23293
|
+
exports.IS_ANDROID = IS_ANDROID;
|
|
23294
|
+
exports.IS_DESKTOP = IS_DESKTOP;
|
|
23295
|
+
exports.IS_IOS = IS_IOS;
|
|
23296
|
+
exports.IS_MOBILE = IS_MOBILE;
|
|
23297
|
+
exports.IS_WEB = IS_WEB;
|
|
23046
23298
|
exports.Icon = Icon;
|
|
23047
23299
|
exports.Indicator = Indicator;
|
|
23048
23300
|
exports.Layout = Layout;
|
|
23049
23301
|
exports.LoadingIndicator = LoadingIndicator;
|
|
23302
|
+
exports.MAX_WIDTH = MAX_WIDTH;
|
|
23050
23303
|
exports.PointsTile = PointsTile$1;
|
|
23051
23304
|
exports.PointsTileConfig = PointsTileConfig;
|
|
23052
23305
|
exports.ProgressBar = ProgressBar;
|
|
@@ -23060,18 +23313,57 @@ exports.RewardTileConfig = RewardTileConfig;
|
|
|
23060
23313
|
exports.RoundupTile = RoundupTile$1;
|
|
23061
23314
|
exports.RoundupTileConfig = RoundupTileConfig;
|
|
23062
23315
|
exports.Row = Row;
|
|
23316
|
+
exports.SCREEN_HEIGHT = SCREEN_HEIGHT;
|
|
23317
|
+
exports.SCREEN_WIDTH = SCREEN_WIDTH;
|
|
23318
|
+
exports.SLIDE_WIDTH = SLIDE_WIDTH;
|
|
23319
|
+
exports.SMALL_SCREEN_WIDTH = SMALL_SCREEN_WIDTH;
|
|
23063
23320
|
exports.Section = Section;
|
|
23064
23321
|
exports.SectionHeader = SectionHeader;
|
|
23065
23322
|
exports.Skeleton = Skeleton;
|
|
23066
23323
|
exports.Spacer = Spacer;
|
|
23324
|
+
exports.TABLET_SCREEN_WIDTH = TABLET_SCREEN_WIDTH;
|
|
23067
23325
|
exports.Text = Text;
|
|
23068
23326
|
exports.TierTileConfig = TierTileConfig;
|
|
23069
23327
|
exports.TierTileUpdated = TierTile;
|
|
23070
23328
|
exports.TileContainer = TileContainer;
|
|
23329
|
+
exports.VenueTile = VenueTile$1;
|
|
23330
|
+
exports.VenueTileConfig = VenueTileConfig;
|
|
23071
23331
|
exports.WllSdkProvider = WllSdkProvider;
|
|
23072
23332
|
exports.alignMap = alignMap;
|
|
23333
|
+
exports.commonStyles = commonStyles;
|
|
23334
|
+
exports.createResourceGetter = createResourceGetter;
|
|
23335
|
+
exports.defaultTheme = defaultTheme;
|
|
23336
|
+
exports.desaturateColor = desaturateColor;
|
|
23337
|
+
exports.getAlphaDerivedColors = getAlphaDerivedColors;
|
|
23338
|
+
exports.getDerivedColor = getDerivedColor;
|
|
23339
|
+
exports.getDerivedColorPercentages = getDerivedColorPercentages;
|
|
23340
|
+
exports.getDimensionMode = getDimensionMode;
|
|
23341
|
+
exports.getDirectionalMargin = getDirectionalMargin;
|
|
23342
|
+
exports.getReadableTextColor = getReadableTextColor;
|
|
23343
|
+
exports.getResponsiveValue = getResponsiveValue;
|
|
23344
|
+
exports.getStateColor = getStateColor;
|
|
23345
|
+
exports.handleLastEarnedDate = handleLastEarnedDate;
|
|
23073
23346
|
exports.justifyMap = justifyMap;
|
|
23347
|
+
exports.sdkEventEmitter = sdkEventEmitter;
|
|
23348
|
+
exports.shouldDesaturate = shouldDesaturate;
|
|
23349
|
+
exports.sizes = sizes;
|
|
23350
|
+
exports.sortByPriority = sortByPriority;
|
|
23351
|
+
exports.themeItems = themeItems;
|
|
23352
|
+
exports.themes = themes;
|
|
23353
|
+
exports.transformLocale = transformLocale;
|
|
23354
|
+
exports.useCreateRequestOptions = useCreateRequestOptions;
|
|
23355
|
+
exports.useGetGroupByID = useGetGroupByID;
|
|
23356
|
+
exports.useGetSectionByID = useGetSectionByID;
|
|
23357
|
+
exports.useGetTileByID = useGetTileByID;
|
|
23358
|
+
exports.useGroupRefresh = useGroupRefresh;
|
|
23359
|
+
exports.useInitialGroupFetch = useInitialGroupFetch;
|
|
23074
23360
|
exports.useInvalidateData = useInvalidateData;
|
|
23361
|
+
exports.useMakeRequest = useMakeRequest;
|
|
23362
|
+
exports.useNavigation = useNavigation;
|
|
23075
23363
|
exports.usePullToRefresh = usePullToRefresh;
|
|
23364
|
+
exports.useResponsive = useResponsive$1;
|
|
23365
|
+
exports.useResponsiveValue = useResponsiveValue;
|
|
23366
|
+
exports.useTileSize = useTileSize;
|
|
23076
23367
|
exports.useWllSdk = useWllSdk;
|
|
23368
|
+
exports.validateTheme = validateTheme;
|
|
23077
23369
|
//# sourceMappingURL=web.js.map
|