@wlloyalty/wll-react-sdk 1.0.42 → 1.0.43
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.js +218 -184
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6395,7 +6395,7 @@ var Text$2 = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
6395
6395
|
}
|
|
6396
6396
|
supportedProps.style = [numberOfLines != null && numberOfLines > 1 && {
|
|
6397
6397
|
WebkitLineClamp: numberOfLines
|
|
6398
|
-
}, hasTextAncestor === true ? styles$
|
|
6398
|
+
}, hasTextAncestor === true ? styles$j.textHasAncestor$raw : styles$j.text$raw, numberOfLines === 1 && styles$j.textOneLine, numberOfLines != null && numberOfLines > 1 && styles$j.textMultiLine, props.style, selectable === true && styles$j.selectable, selectable === false && styles$j.notSelectable, onPress && styles$j.pressable];
|
|
6399
6399
|
if (props.href != null) {
|
|
6400
6400
|
component = 'a';
|
|
6401
6401
|
if (hrefAttrs != null) {
|
|
@@ -6440,7 +6440,7 @@ var textStyle = {
|
|
|
6440
6440
|
whiteSpace: 'pre-wrap',
|
|
6441
6441
|
wordWrap: 'break-word'
|
|
6442
6442
|
};
|
|
6443
|
-
var styles$
|
|
6443
|
+
var styles$j = StyleSheet$1.create({
|
|
6444
6444
|
text$raw: textStyle,
|
|
6445
6445
|
textHasAncestor$raw: _objectSpread2(_objectSpread2({}, textStyle), {}, {
|
|
6446
6446
|
color: 'inherit',
|
|
@@ -7075,7 +7075,7 @@ var View$1 = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
7075
7075
|
var writingDirection = componentDirection || contextDirection;
|
|
7076
7076
|
var supportedProps = pickProps(rest);
|
|
7077
7077
|
supportedProps.dir = componentDirection;
|
|
7078
|
-
supportedProps.style = [styles$
|
|
7078
|
+
supportedProps.style = [styles$i.view$raw, hasTextAncestor && styles$i.inline, props.style];
|
|
7079
7079
|
if (props.href != null) {
|
|
7080
7080
|
component = 'a';
|
|
7081
7081
|
if (hrefAttrs != null) {
|
|
@@ -7101,7 +7101,7 @@ var View$1 = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
7101
7101
|
});
|
|
7102
7102
|
});
|
|
7103
7103
|
View$1.displayName = 'View';
|
|
7104
|
-
var styles$
|
|
7104
|
+
var styles$i = StyleSheet$1.create({
|
|
7105
7105
|
view$raw: {
|
|
7106
7106
|
alignItems: 'stretch',
|
|
7107
7107
|
backgroundColor: 'transparent',
|
|
@@ -7202,14 +7202,14 @@ function TouchableOpacity(props, forwardedRef) {
|
|
|
7202
7202
|
focusable: !disabled && focusable !== false,
|
|
7203
7203
|
pointerEvents: disabled ? 'box-none' : undefined,
|
|
7204
7204
|
ref: setRef,
|
|
7205
|
-
style: [styles$
|
|
7205
|
+
style: [styles$h.root, !disabled && styles$h.actionable, style, opacityOverride != null && {
|
|
7206
7206
|
opacity: opacityOverride
|
|
7207
7207
|
}, {
|
|
7208
7208
|
transitionDuration: duration
|
|
7209
7209
|
}]
|
|
7210
7210
|
}));
|
|
7211
7211
|
}
|
|
7212
|
-
var styles$
|
|
7212
|
+
var styles$h = StyleSheet$1.create({
|
|
7213
7213
|
root: {
|
|
7214
7214
|
transitionProperty: 'opacity',
|
|
7215
7215
|
transitionDuration: '0.15s',
|
|
@@ -7476,11 +7476,51 @@ var defaultTheme = {
|
|
|
7476
7476
|
negative: '#ff0000'
|
|
7477
7477
|
};
|
|
7478
7478
|
|
|
7479
|
+
// Storybook Themes
|
|
7480
|
+
({
|
|
7481
|
+
modern: __assign(__assign({}, defaultTheme), {
|
|
7482
|
+
primary: '#f72585',
|
|
7483
|
+
accent: '#ffc300',
|
|
7484
|
+
background: '#e5e5e5',
|
|
7485
|
+
surface: '#f4f3ee',
|
|
7486
|
+
surfaceText: '#f72585'
|
|
7487
|
+
}),
|
|
7488
|
+
warm: __assign(__assign({}, defaultTheme), {
|
|
7489
|
+
primary: '#014F5C',
|
|
7490
|
+
accent: '#F38A51',
|
|
7491
|
+
background: '#BE9C80',
|
|
7492
|
+
surface: '#F1CFB3',
|
|
7493
|
+
surfaceText: '#014F5C'
|
|
7494
|
+
}),
|
|
7495
|
+
dark: __assign(__assign({}, defaultTheme), {
|
|
7496
|
+
background: '#1e1e1e',
|
|
7497
|
+
text: '#ffffff',
|
|
7498
|
+
primary: '#ffbe0b',
|
|
7499
|
+
accent: '#d00000',
|
|
7500
|
+
surface: '#2f3037',
|
|
7501
|
+
surfaceText: '#ffffff'
|
|
7502
|
+
}),
|
|
7503
|
+
forest: __assign(__assign({}, defaultTheme), {
|
|
7504
|
+
primary: '#354f52',
|
|
7505
|
+
accent: '#84a98c',
|
|
7506
|
+
background: '#f0f4f0',
|
|
7507
|
+
surface: '#cad2c5',
|
|
7508
|
+
surfaceText: '#2d3436'
|
|
7509
|
+
}),
|
|
7510
|
+
sunset: __assign(__assign({}, defaultTheme), {
|
|
7511
|
+
primary: '#c32f27',
|
|
7512
|
+
accent: '#db7c26',
|
|
7513
|
+
background: '#f9edcc',
|
|
7514
|
+
surface: '#f0dfad',
|
|
7515
|
+
surfaceText: '#2d3436'
|
|
7516
|
+
})
|
|
7517
|
+
});
|
|
7518
|
+
|
|
7479
7519
|
var getDerivedColor = function (color) {
|
|
7480
7520
|
var backgroundColor = Color(color);
|
|
7481
7521
|
return backgroundColor.isDark() ? backgroundColor.lighten(0.2).string() : backgroundColor.darken(0.2).string();
|
|
7482
7522
|
};
|
|
7483
|
-
// Same
|
|
7523
|
+
// Same implementation as Microsite
|
|
7484
7524
|
var getReadableTextColor = function (backgroundColor) {
|
|
7485
7525
|
var bgColor = Color(backgroundColor);
|
|
7486
7526
|
var white = Color('#fff');
|
|
@@ -7516,50 +7556,11 @@ var shouldDesaturate = function (type, count) {
|
|
|
7516
7556
|
return type === 'SPECIFIC' && count === 0;
|
|
7517
7557
|
};
|
|
7518
7558
|
var desaturateColor = function (color) {
|
|
7519
|
-
return Color(color).
|
|
7559
|
+
return Color(color).grayscale().lighten(2).toString();
|
|
7520
7560
|
};
|
|
7521
7561
|
var getStateColor = function (baseColor, type, count) {
|
|
7522
7562
|
return shouldDesaturate(type, count) ? desaturateColor(baseColor) : baseColor;
|
|
7523
7563
|
};
|
|
7524
|
-
// Storybook Themes
|
|
7525
|
-
({
|
|
7526
|
-
modern: __assign(__assign({}, defaultTheme), {
|
|
7527
|
-
primary: '#f72585',
|
|
7528
|
-
accent: '#ffc300',
|
|
7529
|
-
background: '#e5e5e5',
|
|
7530
|
-
surface: '#f4f3ee',
|
|
7531
|
-
surfaceText: '#f72585'
|
|
7532
|
-
}),
|
|
7533
|
-
warm: __assign(__assign({}, defaultTheme), {
|
|
7534
|
-
primary: '#014F5C',
|
|
7535
|
-
accent: '#F38A51',
|
|
7536
|
-
background: '#BE9C80',
|
|
7537
|
-
surface: '#F1CFB3',
|
|
7538
|
-
surfaceText: '#014F5C'
|
|
7539
|
-
}),
|
|
7540
|
-
dark: __assign(__assign({}, defaultTheme), {
|
|
7541
|
-
background: '#1e1e1e',
|
|
7542
|
-
text: '#ffffff',
|
|
7543
|
-
primary: '#ffbe0b',
|
|
7544
|
-
accent: '#d00000',
|
|
7545
|
-
surface: '#2f3037',
|
|
7546
|
-
surfaceText: '#ffffff'
|
|
7547
|
-
}),
|
|
7548
|
-
forest: __assign(__assign({}, defaultTheme), {
|
|
7549
|
-
primary: '#354f52',
|
|
7550
|
-
accent: '#84a98c',
|
|
7551
|
-
background: '#f0f4f0',
|
|
7552
|
-
surface: '#cad2c5',
|
|
7553
|
-
surfaceText: '#2d3436'
|
|
7554
|
-
}),
|
|
7555
|
-
sunset: __assign(__assign({}, defaultTheme), {
|
|
7556
|
-
primary: '#c32f27',
|
|
7557
|
-
accent: '#db7c26',
|
|
7558
|
-
background: '#f9edcc',
|
|
7559
|
-
surface: '#f0dfad',
|
|
7560
|
-
surfaceText: '#2d3436'
|
|
7561
|
-
})
|
|
7562
|
-
});
|
|
7563
7564
|
|
|
7564
7565
|
/**
|
|
7565
7566
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
@@ -8145,17 +8146,17 @@ var ActivityIndicator = /*#__PURE__*/React__namespace.forwardRef((props, forward
|
|
|
8145
8146
|
"aria-valuemin": 0,
|
|
8146
8147
|
ref: forwardedRef,
|
|
8147
8148
|
role: "progressbar",
|
|
8148
|
-
style: [styles$
|
|
8149
|
+
style: [styles$g.container, style]
|
|
8149
8150
|
}), /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
8150
8151
|
children: svg,
|
|
8151
8152
|
style: [typeof size === 'number' ? {
|
|
8152
8153
|
height: size,
|
|
8153
8154
|
width: size
|
|
8154
|
-
} : indicatorSizes[size], styles$
|
|
8155
|
+
} : indicatorSizes[size], styles$g.animation, !animating && styles$g.animationPause, !animating && hidesWhenStopped && styles$g.hidesWhenStopped]
|
|
8155
8156
|
}));
|
|
8156
8157
|
});
|
|
8157
8158
|
ActivityIndicator.displayName = 'ActivityIndicator';
|
|
8158
|
-
var styles$
|
|
8159
|
+
var styles$g = StyleSheet$1.create({
|
|
8159
8160
|
container: {
|
|
8160
8161
|
alignItems: 'center',
|
|
8161
8162
|
justifyContent: 'center'
|
|
@@ -8195,7 +8196,7 @@ var ActivityIndicator$1 = ActivityIndicator;
|
|
|
8195
8196
|
var LoadingIndicator = function () {
|
|
8196
8197
|
var theme = useWllSdk().theme;
|
|
8197
8198
|
return /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
8198
|
-
style: [styles$
|
|
8199
|
+
style: [styles$f.container, {
|
|
8199
8200
|
borderRadius: theme.sizes.borderRadiusSm,
|
|
8200
8201
|
padding: theme.sizes.md
|
|
8201
8202
|
}]
|
|
@@ -8204,7 +8205,7 @@ var LoadingIndicator = function () {
|
|
|
8204
8205
|
color: theme.primary
|
|
8205
8206
|
}));
|
|
8206
8207
|
};
|
|
8207
|
-
var styles$
|
|
8208
|
+
var styles$f = StyleSheet$1.create({
|
|
8208
8209
|
container: {
|
|
8209
8210
|
width: '100%',
|
|
8210
8211
|
height: '100%',
|
|
@@ -8518,14 +8519,14 @@ var ScrollViewBase = /*#__PURE__*/React__namespace.forwardRef((props, forwardedR
|
|
|
8518
8519
|
onTouchMove: createPreventableScrollHandler(onTouchMove),
|
|
8519
8520
|
onWheel: createPreventableScrollHandler(onWheel),
|
|
8520
8521
|
ref: useMergeRefs$1(scrollRef, forwardedRef),
|
|
8521
|
-
style: [style, !scrollEnabled && styles$
|
|
8522
|
+
style: [style, !scrollEnabled && styles$e.scrollDisabled, hideScrollbar && styles$e.hideScrollbar]
|
|
8522
8523
|
}));
|
|
8523
8524
|
});
|
|
8524
8525
|
|
|
8525
8526
|
// Chrome doesn't support e.preventDefault in this case; touch-action must be
|
|
8526
8527
|
// used to disable scrolling.
|
|
8527
8528
|
// https://developers.google.com/web/updates/2017/01/scrolling-intervention
|
|
8528
|
-
var styles$
|
|
8529
|
+
var styles$e = StyleSheet$1.create({
|
|
8529
8530
|
scrollDisabled: {
|
|
8530
8531
|
overflowX: 'hidden',
|
|
8531
8532
|
overflowY: 'hidden',
|
|
@@ -9164,7 +9165,7 @@ let ScrollView$1 = class ScrollView extends React$1.Component {
|
|
|
9164
9165
|
var isSticky = hasStickyHeaderIndices && stickyHeaderIndices.indexOf(i) > -1;
|
|
9165
9166
|
if (child != null && (isSticky || pagingEnabled)) {
|
|
9166
9167
|
return /*#__PURE__*/React$1.createElement(View$2, {
|
|
9167
|
-
style: [isSticky && styles$
|
|
9168
|
+
style: [isSticky && styles$d.stickyHeader, pagingEnabled && styles$d.pagingEnabledChild]
|
|
9168
9169
|
}, child);
|
|
9169
9170
|
} else {
|
|
9170
9171
|
return child;
|
|
@@ -9174,10 +9175,10 @@ let ScrollView$1 = class ScrollView extends React$1.Component {
|
|
|
9174
9175
|
children: children,
|
|
9175
9176
|
collapsable: false,
|
|
9176
9177
|
ref: this._setInnerViewRef,
|
|
9177
|
-
style: [horizontal && styles$
|
|
9178
|
+
style: [horizontal && styles$d.contentContainerHorizontal, centerContent && styles$d.contentContainerCenterContent, contentContainerStyle]
|
|
9178
9179
|
}));
|
|
9179
|
-
var baseStyle = horizontal ? styles$
|
|
9180
|
-
var pagingEnabledStyle = horizontal ? styles$
|
|
9180
|
+
var baseStyle = horizontal ? styles$d.baseHorizontal : styles$d.baseVertical;
|
|
9181
|
+
var pagingEnabledStyle = horizontal ? styles$d.pagingEnabledHorizontal : styles$d.pagingEnabledVertical;
|
|
9181
9182
|
var props = _objectSpread2(_objectSpread2({}, other), {}, {
|
|
9182
9183
|
style: [baseStyle, pagingEnabled && pagingEnabledStyle, this.props.style],
|
|
9183
9184
|
onTouchStart: this.scrollResponderHandleTouchStart,
|
|
@@ -9220,7 +9221,7 @@ var commonStyle = {
|
|
|
9220
9221
|
// iOS native scrolling
|
|
9221
9222
|
WebkitOverflowScrolling: 'touch'
|
|
9222
9223
|
};
|
|
9223
|
-
var styles$
|
|
9224
|
+
var styles$d = StyleSheet$1.create({
|
|
9224
9225
|
baseVertical: _objectSpread2(_objectSpread2({}, commonStyle), {}, {
|
|
9225
9226
|
flexDirection: 'column',
|
|
9226
9227
|
overflowX: 'hidden',
|
|
@@ -10433,7 +10434,7 @@ class CellRenderer extends React__namespace.Component {
|
|
|
10433
10434
|
ItemSeparatorComponent :
|
|
10434
10435
|
// $FlowFixMe[incompatible-type]
|
|
10435
10436
|
ItemSeparatorComponent && /*#__PURE__*/React__namespace.createElement(ItemSeparatorComponent, this.state.separatorProps);
|
|
10436
|
-
var cellStyle = inversionStyle ? horizontal ? [styles$
|
|
10437
|
+
var cellStyle = inversionStyle ? horizontal ? [styles$c.rowReverse, inversionStyle] : [styles$c.columnReverse, inversionStyle] : horizontal ? [styles$c.row, inversionStyle] : inversionStyle;
|
|
10437
10438
|
var result = !CellRendererComponent ? /*#__PURE__*/React__namespace.createElement(View$2, _extends$1({
|
|
10438
10439
|
style: cellStyle,
|
|
10439
10440
|
onFocusCapture: onCellFocusCapture
|
|
@@ -10453,7 +10454,7 @@ class CellRenderer extends React__namespace.Component {
|
|
|
10453
10454
|
}, result);
|
|
10454
10455
|
}
|
|
10455
10456
|
}
|
|
10456
|
-
var styles$
|
|
10457
|
+
var styles$c = StyleSheet$1.create({
|
|
10457
10458
|
row: {
|
|
10458
10459
|
flexDirection: 'row'
|
|
10459
10460
|
},
|
|
@@ -11633,7 +11634,7 @@ class VirtualizedList extends StateSafePureComponent {
|
|
|
11633
11634
|
var _this$props6 = this.props,
|
|
11634
11635
|
data = _this$props6.data,
|
|
11635
11636
|
horizontal = _this$props6.horizontal;
|
|
11636
|
-
var inversionStyle = this.props.inverted ? horizontalOrDefault(this.props.horizontal) ? styles$
|
|
11637
|
+
var inversionStyle = this.props.inverted ? horizontalOrDefault(this.props.horizontal) ? styles$b.horizontallyInverted : styles$b.verticallyInverted : null;
|
|
11637
11638
|
var cells = [];
|
|
11638
11639
|
var stickyIndicesFromProps = new Set(this.props.stickyHeaderIndices);
|
|
11639
11640
|
var stickyHeaderIndices = [];
|
|
@@ -11797,7 +11798,7 @@ class VirtualizedList extends StateSafePureComponent {
|
|
|
11797
11798
|
}*/
|
|
11798
11799
|
if (this.props.debug) {
|
|
11799
11800
|
return /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
11800
|
-
style: styles$
|
|
11801
|
+
style: styles$b.debug
|
|
11801
11802
|
}, ret, this._renderDebugOverlay());
|
|
11802
11803
|
} else {
|
|
11803
11804
|
return ret;
|
|
@@ -11914,20 +11915,20 @@ class VirtualizedList extends StateSafePureComponent {
|
|
|
11914
11915
|
var visTop = this._scrollMetrics.offset;
|
|
11915
11916
|
var visLen = this._scrollMetrics.visibleLength;
|
|
11916
11917
|
return /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
11917
|
-
style: [styles$
|
|
11918
|
+
style: [styles$b.debugOverlayBase, styles$b.debugOverlay]
|
|
11918
11919
|
}, framesInLayout.map((f, ii) => /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
11919
11920
|
key: 'f' + ii,
|
|
11920
|
-
style: [styles$
|
|
11921
|
+
style: [styles$b.debugOverlayBase, styles$b.debugOverlayFrame, {
|
|
11921
11922
|
top: f.offset * normalize,
|
|
11922
11923
|
height: f.length * normalize
|
|
11923
11924
|
}]
|
|
11924
11925
|
})), /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
11925
|
-
style: [styles$
|
|
11926
|
+
style: [styles$b.debugOverlayBase, styles$b.debugOverlayFrameLast, {
|
|
11926
11927
|
top: windowTop * normalize,
|
|
11927
11928
|
height: windowLen * normalize
|
|
11928
11929
|
}]
|
|
11929
11930
|
}), /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
11930
|
-
style: [styles$
|
|
11931
|
+
style: [styles$b.debugOverlayBase, styles$b.debugOverlayFrameVis, {
|
|
11931
11932
|
top: visTop * normalize,
|
|
11932
11933
|
height: visLen * normalize
|
|
11933
11934
|
}]
|
|
@@ -12068,7 +12069,7 @@ class VirtualizedList extends StateSafePureComponent {
|
|
|
12068
12069
|
}
|
|
12069
12070
|
}
|
|
12070
12071
|
VirtualizedList.contextType = VirtualizedListContext;
|
|
12071
|
-
var styles$
|
|
12072
|
+
var styles$b = StyleSheet$1.create({
|
|
12072
12073
|
verticallyInverted: {
|
|
12073
12074
|
transform: 'scaleY(-1)'
|
|
12074
12075
|
},
|
|
@@ -12445,7 +12446,7 @@ let FlatList$1 = class FlatList extends React__namespace.PureComponent {
|
|
|
12445
12446
|
_index = info.index;
|
|
12446
12447
|
invariant$1(Array.isArray(_item2), 'Expected array of items with numColumns > 1');
|
|
12447
12448
|
return /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
12448
|
-
style: [styles$
|
|
12449
|
+
style: [styles$a.row, columnWrapperStyle]
|
|
12449
12450
|
}, _item2.map((it, kk) => {
|
|
12450
12451
|
var element = render({
|
|
12451
12452
|
// $FlowFixMe[incompatible-call]
|
|
@@ -12571,7 +12572,7 @@ let FlatList$1 = class FlatList extends React__namespace.PureComponent {
|
|
|
12571
12572
|
);
|
|
12572
12573
|
}
|
|
12573
12574
|
};
|
|
12574
|
-
var styles$
|
|
12575
|
+
var styles$a = StyleSheet$1.create({
|
|
12575
12576
|
row: {
|
|
12576
12577
|
flexDirection: 'row'
|
|
12577
12578
|
}
|
|
@@ -14958,7 +14959,7 @@ var Image$1 = /*#__PURE__*/React__namespace.forwardRef((props, ref) => {
|
|
|
14958
14959
|
// Accessibility image allows users to trigger the browser's image context menu
|
|
14959
14960
|
var hiddenImage = displayImageUri ? createElement$1('img', {
|
|
14960
14961
|
alt: ariaLabel || '',
|
|
14961
|
-
style: styles$
|
|
14962
|
+
style: styles$9.accessibilityImage$raw,
|
|
14962
14963
|
draggable: draggable || false,
|
|
14963
14964
|
ref: hiddenImageRef,
|
|
14964
14965
|
src: displayImageUri
|
|
@@ -15030,14 +15031,14 @@ var Image$1 = /*#__PURE__*/React__namespace.forwardRef((props, ref) => {
|
|
|
15030
15031
|
onLayout: handleLayout,
|
|
15031
15032
|
pointerEvents: pointerEvents,
|
|
15032
15033
|
ref: ref,
|
|
15033
|
-
style: [styles$
|
|
15034
|
+
style: [styles$9.root, hasTextAncestor && styles$9.inline, imageSizeStyle, style, styles$9.undo,
|
|
15034
15035
|
// TEMP: avoid deprecated shadow props regression
|
|
15035
15036
|
// until Image refactored to use createElement.
|
|
15036
15037
|
{
|
|
15037
15038
|
boxShadow: null
|
|
15038
15039
|
}]
|
|
15039
15040
|
}), /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
15040
|
-
style: [styles$
|
|
15041
|
+
style: [styles$9.image, resizeModeStyles[resizeMode], {
|
|
15041
15042
|
backgroundImage,
|
|
15042
15043
|
filter
|
|
15043
15044
|
}, backgroundSize != null && {
|
|
@@ -15059,7 +15060,7 @@ ImageWithStatics.prefetch = function (uri) {
|
|
|
15059
15060
|
ImageWithStatics.queryCache = function (uris) {
|
|
15060
15061
|
return ImageLoader$1.queryCache(uris);
|
|
15061
15062
|
};
|
|
15062
|
-
var styles$
|
|
15063
|
+
var styles$9 = StyleSheet$1.create({
|
|
15063
15064
|
root: {
|
|
15064
15065
|
flexBasis: 'auto',
|
|
15065
15066
|
overflow: 'hidden',
|
|
@@ -18163,7 +18164,7 @@ function _extends() {
|
|
|
18163
18164
|
}, _extends.apply(null, arguments);
|
|
18164
18165
|
}
|
|
18165
18166
|
|
|
18166
|
-
var styles$
|
|
18167
|
+
var styles$8 = StyleSheet$1.create({
|
|
18167
18168
|
imageOverlay: {
|
|
18168
18169
|
position: 'absolute',
|
|
18169
18170
|
left: 0,
|
|
@@ -18201,11 +18202,11 @@ var ProgressiveImage = function (_a) {
|
|
|
18201
18202
|
var desaturatedColor = desaturateColor(baseColor);
|
|
18202
18203
|
var backgroundColor = isDesaturated ? desaturatedColor : baseColor;
|
|
18203
18204
|
return /*#__PURE__*/React$1.createElement(View$2, {
|
|
18204
|
-
style: [styles$
|
|
18205
|
+
style: [styles$8.container, style, {
|
|
18205
18206
|
backgroundColor: backgroundColor
|
|
18206
18207
|
}]
|
|
18207
18208
|
}, /*#__PURE__*/React$1.createElement(Animated$1.View, {
|
|
18208
|
-
style: [styles$
|
|
18209
|
+
style: [styles$8.imageOverlay, {
|
|
18209
18210
|
backgroundColor: backgroundColor,
|
|
18210
18211
|
opacity: imageAnimated.interpolate({
|
|
18211
18212
|
inputRange: [0, 1],
|
|
@@ -18214,7 +18215,7 @@ var ProgressiveImage = function (_a) {
|
|
|
18214
18215
|
}]
|
|
18215
18216
|
}), /*#__PURE__*/React$1.createElement(Animated$1.Image, _extends({}, props, {
|
|
18216
18217
|
source: source,
|
|
18217
|
-
style: [styles$
|
|
18218
|
+
style: [styles$8.imageOverlay, __assign({
|
|
18218
18219
|
opacity: imageAnimated
|
|
18219
18220
|
}, isDesaturated && {
|
|
18220
18221
|
filter: "saturate(".concat(0 * 100, "%)")
|
|
@@ -18853,7 +18854,7 @@ function Pressable(props, forwardedRef) {
|
|
|
18853
18854
|
onFocus: focusHandler,
|
|
18854
18855
|
onKeyDown: keyDownHandler,
|
|
18855
18856
|
ref: setRef,
|
|
18856
|
-
style: [disabled ? styles$
|
|
18857
|
+
style: [disabled ? styles$7.disabled : styles$7.active, typeof style === 'function' ? style(interactionState) : style],
|
|
18857
18858
|
tabIndex: _tabIndex
|
|
18858
18859
|
}), typeof children === 'function' ? children(interactionState) : children);
|
|
18859
18860
|
}
|
|
@@ -18863,7 +18864,7 @@ function useForceableState(forced) {
|
|
|
18863
18864
|
setBool = _useState[1];
|
|
18864
18865
|
return [bool || forced, setBool];
|
|
18865
18866
|
}
|
|
18866
|
-
var styles$
|
|
18867
|
+
var styles$7 = StyleSheet$1.create({
|
|
18867
18868
|
active: {
|
|
18868
18869
|
cursor: 'pointer',
|
|
18869
18870
|
touchAction: 'manipulation'
|
|
@@ -19058,7 +19059,7 @@ var BaseBanner = function (_a) {
|
|
|
19058
19059
|
}, /*#__PURE__*/React__namespace.createElement(Pressable$1, {
|
|
19059
19060
|
style: function (_a) {
|
|
19060
19061
|
var pressed = _a.pressed;
|
|
19061
|
-
return [styles$
|
|
19062
|
+
return [styles$6.container, {
|
|
19062
19063
|
backgroundColor: theme.surface,
|
|
19063
19064
|
borderRadius: theme.sizes.borderRadiusLg,
|
|
19064
19065
|
opacity: pressed ? 0.7 : 1
|
|
@@ -19071,7 +19072,7 @@ var BaseBanner = function (_a) {
|
|
|
19071
19072
|
accessibilityLabel: "".concat(title).concat(ctaLink ? ' - Click to open' : '')
|
|
19072
19073
|
}, children));
|
|
19073
19074
|
};
|
|
19074
|
-
var styles$
|
|
19075
|
+
var styles$6 = StyleSheet$1.create({
|
|
19075
19076
|
container: {
|
|
19076
19077
|
width: '100%',
|
|
19077
19078
|
maxWidth: MAX_WIDTH,
|
|
@@ -19091,63 +19092,78 @@ var useTileSize = function (tile) {
|
|
|
19091
19092
|
}, [tile.tileHeight]);
|
|
19092
19093
|
};
|
|
19093
19094
|
|
|
19094
|
-
var
|
|
19095
|
-
var
|
|
19096
|
-
var
|
|
19097
|
-
|
|
19098
|
-
|
|
19099
|
-
|
|
19100
|
-
|
|
19101
|
-
|
|
19102
|
-
var
|
|
19103
|
-
|
|
19104
|
-
|
|
19105
|
-
|
|
19106
|
-
|
|
19107
|
-
|
|
19095
|
+
var BaseTileBody = function (props) {
|
|
19096
|
+
var tile = useTileContext();
|
|
19097
|
+
var _a = useResponsive$1(),
|
|
19098
|
+
isDesktop = _a.isDesktop,
|
|
19099
|
+
isTablet = _a.isTablet;
|
|
19100
|
+
var _b = tile.configuration,
|
|
19101
|
+
body = _b.body,
|
|
19102
|
+
artworkUrl = _b.artworkUrl;
|
|
19103
|
+
var isHalfSize = useTileSize(tile).isHalfSize;
|
|
19104
|
+
if (isHalfSize && artworkUrl || !body) return null;
|
|
19105
|
+
return /*#__PURE__*/React$1.createElement(Text, _extends({
|
|
19106
|
+
variant: "body"
|
|
19107
|
+
}, props, {
|
|
19108
|
+
accessibilityLabel: body,
|
|
19109
|
+
numberOfLines: isDesktop ? 3 : isTablet ? 4 : 3
|
|
19110
|
+
}), body);
|
|
19108
19111
|
};
|
|
19109
|
-
|
|
19110
|
-
|
|
19111
|
-
|
|
19112
|
+
|
|
19113
|
+
var baseStyles = StyleSheet$1.create({
|
|
19114
|
+
container: {
|
|
19115
|
+
width: '100%',
|
|
19116
|
+
height: '100%',
|
|
19117
|
+
overflow: 'hidden',
|
|
19118
|
+
position: 'relative'
|
|
19119
|
+
},
|
|
19120
|
+
content: {
|
|
19121
|
+
display: 'flex'
|
|
19122
|
+
},
|
|
19123
|
+
media: {
|
|
19124
|
+
width: '100%',
|
|
19125
|
+
objectFit: 'cover'
|
|
19126
|
+
}
|
|
19127
|
+
});
|
|
19128
|
+
// Dynamic styles hook
|
|
19129
|
+
var useBaseTileStyles = function () {
|
|
19112
19130
|
var tile = useTileContext();
|
|
19113
19131
|
var theme = useWllSdk().theme;
|
|
19132
|
+
var _a = useResponsive$1(),
|
|
19133
|
+
isDesktop = _a.isDesktop,
|
|
19134
|
+
isTablet = _a.isTablet;
|
|
19114
19135
|
var isHalfSize = useTileSize(tile).isHalfSize;
|
|
19115
19136
|
var _b = tile.configuration,
|
|
19116
|
-
|
|
19117
|
-
|
|
19118
|
-
|
|
19119
|
-
|
|
19120
|
-
|
|
19121
|
-
|
|
19122
|
-
|
|
19123
|
-
|
|
19124
|
-
|
|
19125
|
-
|
|
19126
|
-
|
|
19127
|
-
|
|
19128
|
-
var dynamicStyles = StyleSheet$1.create({
|
|
19129
|
-
container: {
|
|
19137
|
+
artworkUrl = _b.artworkUrl,
|
|
19138
|
+
title = _b.title,
|
|
19139
|
+
body = _b.body;
|
|
19140
|
+
return StyleSheet$1.create({
|
|
19141
|
+
container: __assign(__assign({}, baseStyles.container), {
|
|
19142
|
+
backgroundColor: theme.surface,
|
|
19143
|
+
aspectRatio: isHalfSize ? 2 : 1,
|
|
19144
|
+
borderRadius: useResponsiveValue(theme.sizes.borderRadiusLg, theme.sizes.borderRadiusSm, isDesktop, isTablet),
|
|
19145
|
+
justifyContent: 'center',
|
|
19146
|
+
alignItems: 'center'
|
|
19147
|
+
}),
|
|
19148
|
+
content: __assign(__assign({}, baseStyles.content), {
|
|
19130
19149
|
justifyContent: 'center',
|
|
19150
|
+
height: !artworkUrl ? '100%' : undefined
|
|
19151
|
+
}),
|
|
19152
|
+
header: {
|
|
19153
|
+
marginBottom: useResponsiveValue(theme.sizes.xxs, theme.sizes.xxxs, isDesktop, isTablet),
|
|
19154
|
+
marginTop: !isHalfSize && artworkUrl ? useResponsiveValue(theme.sizes.sm, theme.sizes.xxs, isDesktop, isTablet) : undefined,
|
|
19155
|
+
flexDirection: 'row',
|
|
19131
19156
|
alignItems: 'center',
|
|
19132
|
-
|
|
19133
|
-
|
|
19134
|
-
}
|
|
19135
|
-
});
|
|
19136
|
-
return /*#__PURE__*/React$1.createElement(Pressable$1, {
|
|
19137
|
-
style: function (_a) {
|
|
19138
|
-
var pressed = _a.pressed;
|
|
19139
|
-
return [styles$6.container, {
|
|
19140
|
-
backgroundColor: theme.surface,
|
|
19141
|
-
opacity: pressed ? 0.7 : 1
|
|
19142
|
-
}, dynamicStyles.container, layout, style];
|
|
19157
|
+
justifyContent: 'space-between',
|
|
19158
|
+
textAlign: isHalfSize ? 'center' : undefined
|
|
19143
19159
|
},
|
|
19144
|
-
|
|
19145
|
-
|
|
19146
|
-
|
|
19147
|
-
|
|
19148
|
-
|
|
19149
|
-
}, children);
|
|
19160
|
+
media: __assign(__assign({}, baseStyles.media), {
|
|
19161
|
+
flexBasis: !isHalfSize && title && body ? '50%' : '100%',
|
|
19162
|
+
height: isHalfSize ? '100%' : undefined
|
|
19163
|
+
})
|
|
19164
|
+
});
|
|
19150
19165
|
};
|
|
19166
|
+
|
|
19151
19167
|
var BaseTileContent = function (_a) {
|
|
19152
19168
|
var children = _a.children;
|
|
19153
19169
|
var tile = useTileContext();
|
|
@@ -19156,32 +19172,21 @@ var BaseTileContent = function (_a) {
|
|
|
19156
19172
|
// For half tiles with an image, don't show other content
|
|
19157
19173
|
if (isHalfSize && artworkUrl) return null;
|
|
19158
19174
|
return /*#__PURE__*/React$1.createElement(View$2, {
|
|
19159
|
-
style: [
|
|
19175
|
+
style: [baseStyles.content, {
|
|
19160
19176
|
justifyContent: 'center',
|
|
19161
19177
|
height: !artworkUrl ? '100%' : undefined
|
|
19162
19178
|
}]
|
|
19163
19179
|
}, children);
|
|
19164
19180
|
};
|
|
19181
|
+
|
|
19165
19182
|
var BaseTileHeader = function (_a) {
|
|
19166
19183
|
var children = _a.children;
|
|
19167
19184
|
var tile = useTileContext();
|
|
19168
|
-
var theme = useWllSdk().theme;
|
|
19169
19185
|
var artworkUrl = tile.configuration.artworkUrl;
|
|
19170
19186
|
var isHalfSize = useTileSize(tile).isHalfSize;
|
|
19171
|
-
var _b = useResponsive$1(),
|
|
19172
|
-
isDesktop = _b.isDesktop,
|
|
19173
|
-
isTablet = _b.isTablet;
|
|
19174
19187
|
// For half tiles with an image, don't show header
|
|
19175
19188
|
if (isHalfSize && artworkUrl) return null;
|
|
19176
|
-
var dynamicStyles =
|
|
19177
|
-
header: {
|
|
19178
|
-
marginBottom: useResponsiveValue(theme.sizes.xxs, theme.sizes.xxxs, isDesktop, isTablet),
|
|
19179
|
-
marginTop: useResponsiveValue(theme.sizes.sm, theme.sizes.xxs, isDesktop, isTablet),
|
|
19180
|
-
flexDirection: 'row',
|
|
19181
|
-
alignItems: 'center',
|
|
19182
|
-
justifyContent: 'space-between'
|
|
19183
|
-
}
|
|
19184
|
-
});
|
|
19189
|
+
var dynamicStyles = useBaseTileStyles();
|
|
19185
19190
|
return /*#__PURE__*/React$1.createElement(View$2, {
|
|
19186
19191
|
style: [dynamicStyles.header, {
|
|
19187
19192
|
marginTop: isHalfSize ? 0 : dynamicStyles.header.marginTop,
|
|
@@ -19192,26 +19197,24 @@ var BaseTileHeader = function (_a) {
|
|
|
19192
19197
|
numberOfLines: 1
|
|
19193
19198
|
}, children);
|
|
19194
19199
|
};
|
|
19200
|
+
|
|
19195
19201
|
var BaseTileMedia = function (props) {
|
|
19196
19202
|
var tile = useTileContext();
|
|
19197
19203
|
var _a = tile.configuration,
|
|
19198
|
-
artworkUrl = _a.artworkUrl
|
|
19199
|
-
|
|
19200
|
-
|
|
19201
|
-
|
|
19204
|
+
artworkUrl = _a.artworkUrl;
|
|
19205
|
+
_a.title;
|
|
19206
|
+
_a.body;
|
|
19207
|
+
useTileSize(tile).isHalfSize;
|
|
19208
|
+
var styles = useBaseTileStyles();
|
|
19202
19209
|
if (!artworkUrl) return null;
|
|
19203
|
-
var hasTitle = !!title;
|
|
19204
|
-
var hasDescription = !!body;
|
|
19205
19210
|
return /*#__PURE__*/React$1.createElement(ProgressiveImage, _extends({}, props, {
|
|
19206
19211
|
source: {
|
|
19207
19212
|
uri: artworkUrl
|
|
19208
19213
|
},
|
|
19209
|
-
style: [props.style,
|
|
19210
|
-
flexBasis: !isHalfSize && hasTitle && hasDescription ? '50%' : '100%',
|
|
19211
|
-
height: isHalfSize ? '100%' : undefined
|
|
19212
|
-
}]
|
|
19214
|
+
style: [props.style, baseStyles.media, styles.media]
|
|
19213
19215
|
}));
|
|
19214
19216
|
};
|
|
19217
|
+
|
|
19215
19218
|
var BaseTileTitle = function () {
|
|
19216
19219
|
var tile = useTileContext();
|
|
19217
19220
|
var theme = useWllSdk().theme;
|
|
@@ -19231,18 +19234,53 @@ var BaseTileTitle = function () {
|
|
|
19231
19234
|
color: theme.derivedSurfaceText[20]
|
|
19232
19235
|
}));
|
|
19233
19236
|
};
|
|
19234
|
-
|
|
19237
|
+
|
|
19238
|
+
var TileContext = /*#__PURE__*/React$1.createContext(null);
|
|
19239
|
+
var useTileContext = function () {
|
|
19240
|
+
var context = React$1.useContext(TileContext);
|
|
19241
|
+
if (!context) {
|
|
19242
|
+
throw new Error('Tile components must be used within a BaseTile');
|
|
19243
|
+
}
|
|
19244
|
+
return context;
|
|
19245
|
+
};
|
|
19246
|
+
var BaseTileInner = function (_a) {
|
|
19247
|
+
var tile = _a.tile,
|
|
19248
|
+
children = _a.children;
|
|
19249
|
+
return /*#__PURE__*/React$1.createElement(TileContext.Provider, {
|
|
19250
|
+
value: tile
|
|
19251
|
+
}, /*#__PURE__*/React$1.createElement(BaseTile.Root, null, children));
|
|
19252
|
+
};
|
|
19253
|
+
var BaseTileRoot = function (_a) {
|
|
19254
|
+
var children = _a.children,
|
|
19255
|
+
style = _a.style;
|
|
19235
19256
|
var tile = useTileContext();
|
|
19236
|
-
var
|
|
19237
|
-
body = _a.body,
|
|
19238
|
-
artworkUrl = _a.artworkUrl;
|
|
19257
|
+
var theme = useWllSdk().theme;
|
|
19239
19258
|
var isHalfSize = useTileSize(tile).isHalfSize;
|
|
19240
|
-
|
|
19241
|
-
|
|
19242
|
-
|
|
19243
|
-
|
|
19244
|
-
|
|
19245
|
-
|
|
19259
|
+
var _b = tile.configuration,
|
|
19260
|
+
ctaLink = _b.ctaLink,
|
|
19261
|
+
ctaLinkTarget = _b.ctaLinkTarget,
|
|
19262
|
+
title = _b.title;
|
|
19263
|
+
var handlePress = useHandleTilePress(tile, ctaLink, ctaLinkTarget);
|
|
19264
|
+
var layout = {
|
|
19265
|
+
flexDirection: 'column',
|
|
19266
|
+
justifyContent: isHalfSize ? 'center' : 'flex-start',
|
|
19267
|
+
alignItems: 'stretch'
|
|
19268
|
+
};
|
|
19269
|
+
var dynamicStyles = useBaseTileStyles();
|
|
19270
|
+
return /*#__PURE__*/React$1.createElement(Pressable$1, {
|
|
19271
|
+
style: function (_a) {
|
|
19272
|
+
var pressed = _a.pressed;
|
|
19273
|
+
return [baseStyles.container, dynamicStyles.container, {
|
|
19274
|
+
backgroundColor: theme.surface,
|
|
19275
|
+
opacity: pressed ? 0.7 : 1
|
|
19276
|
+
}, layout, style];
|
|
19277
|
+
},
|
|
19278
|
+
onPress: handlePress,
|
|
19279
|
+
disabled: tile.type !== 'REWARD' && tile.type !== 'REWARD_CATEGORY' && !ctaLink,
|
|
19280
|
+
accessible: true,
|
|
19281
|
+
accessibilityRole: "button",
|
|
19282
|
+
accessibilityLabel: "".concat(title).concat(ctaLink ? ' - Click to open' : '')
|
|
19283
|
+
}, children);
|
|
19246
19284
|
};
|
|
19247
19285
|
var BaseTile = BaseTileInner;
|
|
19248
19286
|
BaseTile.Root = BaseTileRoot;
|
|
@@ -19251,21 +19289,6 @@ BaseTile.Content = BaseTileContent;
|
|
|
19251
19289
|
BaseTile.Header = BaseTileHeader;
|
|
19252
19290
|
BaseTile.Title = BaseTileTitle;
|
|
19253
19291
|
BaseTile.Body = BaseTileBody;
|
|
19254
|
-
var styles$6 = StyleSheet$1.create({
|
|
19255
|
-
container: {
|
|
19256
|
-
width: '100%',
|
|
19257
|
-
height: '100%',
|
|
19258
|
-
overflow: 'hidden',
|
|
19259
|
-
position: 'relative'
|
|
19260
|
-
},
|
|
19261
|
-
content: {
|
|
19262
|
-
display: 'flex'
|
|
19263
|
-
},
|
|
19264
|
-
media: {
|
|
19265
|
-
width: '100%',
|
|
19266
|
-
objectFit: 'cover'
|
|
19267
|
-
}
|
|
19268
|
-
});
|
|
19269
19292
|
|
|
19270
19293
|
var Indicator = function () {
|
|
19271
19294
|
var _a = useResponsive$1(),
|
|
@@ -20817,6 +20840,11 @@ var useTierTileStyles = function () {
|
|
|
20817
20840
|
width: '100%',
|
|
20818
20841
|
height: '100%',
|
|
20819
20842
|
resizeMode: 'cover'
|
|
20843
|
+
},
|
|
20844
|
+
name: {
|
|
20845
|
+
marginBottom: 0,
|
|
20846
|
+
numberOfLines: 1,
|
|
20847
|
+
ellipsizeMode: 'tail'
|
|
20820
20848
|
}
|
|
20821
20849
|
});
|
|
20822
20850
|
};
|
|
@@ -20891,12 +20919,18 @@ var TierTileHalf = function (_a) {
|
|
|
20891
20919
|
style: {
|
|
20892
20920
|
paddingTop: 16
|
|
20893
20921
|
}
|
|
20894
|
-
}, /*#__PURE__*/React__namespace.createElement(View$2,
|
|
20922
|
+
}, /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
20923
|
+
style: {
|
|
20924
|
+
flex: 1,
|
|
20925
|
+
flexShrink: 1
|
|
20926
|
+
}
|
|
20927
|
+
}, title && /*#__PURE__*/React__namespace.createElement(Text, {
|
|
20895
20928
|
variant: "eyebrow",
|
|
20896
20929
|
style: styles.title
|
|
20897
20930
|
}, title), name && /*#__PURE__*/React__namespace.createElement(Text, {
|
|
20898
20931
|
variant: "title",
|
|
20899
|
-
style: styles.
|
|
20932
|
+
style: styles.name,
|
|
20933
|
+
numberOfLines: 2
|
|
20900
20934
|
}, name)), artworkUrl && /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
20901
20935
|
style: styles.smallImageContainer
|
|
20902
20936
|
}, /*#__PURE__*/React__namespace.createElement(Image$2, {
|
|
@@ -20926,7 +20960,7 @@ var TierTileEmpty = function (_a) {
|
|
|
20926
20960
|
style: {
|
|
20927
20961
|
paddingTop: 16
|
|
20928
20962
|
}
|
|
20929
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
20963
|
+
}, /*#__PURE__*/React__namespace.createElement(Column, {
|
|
20930
20964
|
style: {
|
|
20931
20965
|
flex: 1
|
|
20932
20966
|
}
|
|
@@ -20935,7 +20969,7 @@ var TierTileEmpty = function (_a) {
|
|
|
20935
20969
|
style: styles.title
|
|
20936
20970
|
}, title), emptyDescription && /*#__PURE__*/React__namespace.createElement(Text, {
|
|
20937
20971
|
variant: "body"
|
|
20938
|
-
}, emptyDescription)), emptyArtworkUrl && /*#__PURE__*/React__namespace.createElement(
|
|
20972
|
+
}, emptyDescription)), emptyArtworkUrl && /*#__PURE__*/React__namespace.createElement(Column, {
|
|
20939
20973
|
style: styles.smallImageContainer
|
|
20940
20974
|
}, /*#__PURE__*/React__namespace.createElement(Image$2, {
|
|
20941
20975
|
source: {
|
|
@@ -20959,7 +20993,7 @@ var TierTileEmpty = function (_a) {
|
|
|
20959
20993
|
align: "stretch",
|
|
20960
20994
|
justify: "center",
|
|
20961
20995
|
direction: "column"
|
|
20962
|
-
}, /*#__PURE__*/React__namespace.createElement(
|
|
20996
|
+
}, /*#__PURE__*/React__namespace.createElement(Column, null, title && /*#__PURE__*/React__namespace.createElement(Text, {
|
|
20963
20997
|
variant: "title",
|
|
20964
20998
|
style: styles.title
|
|
20965
20999
|
}, title), emptyDescription && /*#__PURE__*/React__namespace.createElement(Text, {
|