@wlloyalty/wll-react-sdk 1.0.28 → 1.0.30
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 +82 -48
- package/dist/index.js +457 -362
- 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$k.textHasAncestor$raw : styles$k.text$raw, numberOfLines === 1 && styles$k.textOneLine, numberOfLines != null && numberOfLines > 1 && styles$k.textMultiLine, props.style, selectable === true && styles$k.selectable, selectable === false && styles$k.notSelectable, onPress && styles$k.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$k = 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$j.view$raw, hasTextAncestor && styles$j.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$j = 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$i.root, !disabled && styles$i.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$i = StyleSheet$1.create({
|
|
7213
7213
|
root: {
|
|
7214
7214
|
transitionProperty: 'opacity',
|
|
7215
7215
|
transitionDuration: '0.15s',
|
|
@@ -7443,9 +7443,17 @@ var sizes = {
|
|
|
7443
7443
|
borderRadiusLg: 20,
|
|
7444
7444
|
borderRadiusButton: 9,
|
|
7445
7445
|
borderRadiusRounded: 9999,
|
|
7446
|
-
|
|
7447
|
-
|
|
7448
|
-
|
|
7446
|
+
xxxs: 4,
|
|
7447
|
+
xxs: 8,
|
|
7448
|
+
xs: 10,
|
|
7449
|
+
sm: 12,
|
|
7450
|
+
md: 14,
|
|
7451
|
+
lg: 16,
|
|
7452
|
+
xl: 18,
|
|
7453
|
+
xxl: 24,
|
|
7454
|
+
xxxl: 32,
|
|
7455
|
+
xxxxl: 40,
|
|
7456
|
+
xxxxxl: 60
|
|
7449
7457
|
};
|
|
7450
7458
|
var defaultTheme = {
|
|
7451
7459
|
background: '#F0F0F0',
|
|
@@ -7909,11 +7917,51 @@ var useWllSdk = function () {
|
|
|
7909
7917
|
return context;
|
|
7910
7918
|
};
|
|
7911
7919
|
|
|
7920
|
+
var clamp$1 = function (value, min, max) {
|
|
7921
|
+
return Math.min(Math.max(value, min), max);
|
|
7922
|
+
};
|
|
7923
|
+
var lerp = function (start, end, t) {
|
|
7924
|
+
return start + (end - start) * t;
|
|
7925
|
+
};
|
|
7926
|
+
var getWindowWidth = function () {
|
|
7927
|
+
if (Platform$1.OS === 'web') {
|
|
7928
|
+
return window.innerWidth;
|
|
7929
|
+
}
|
|
7930
|
+
return Dimensions.get('window').width;
|
|
7931
|
+
};
|
|
7912
7932
|
var getResponsiveValue = function (desktopValue, mobileValue, isDesktop, isTablet) {
|
|
7913
|
-
|
|
7914
|
-
|
|
7933
|
+
var width = getWindowWidth();
|
|
7934
|
+
var tabletValue = (desktopValue + mobileValue) / 2;
|
|
7935
|
+
// Desktop to Tablet scaling
|
|
7936
|
+
if (width >= TABLET_SCREEN_WIDTH) {
|
|
7937
|
+
var t = clamp$1((width - TABLET_SCREEN_WIDTH) / 300, 0, 1); // 300px scaling range
|
|
7938
|
+
return Math.round(lerp(tabletValue, desktopValue, t));
|
|
7939
|
+
}
|
|
7940
|
+
// Tablet to Mobile scaling
|
|
7941
|
+
if (width > SMALL_SCREEN_WIDTH) {
|
|
7942
|
+
var t = clamp$1((width - SMALL_SCREEN_WIDTH) / (TABLET_SCREEN_WIDTH - SMALL_SCREEN_WIDTH), 0, 1);
|
|
7943
|
+
return Math.round(lerp(mobileValue, tabletValue, t));
|
|
7944
|
+
}
|
|
7915
7945
|
return mobileValue;
|
|
7916
7946
|
};
|
|
7947
|
+
var useResponsiveValue = function (desktopValue, mobileValue, isDesktop, isTablet) {
|
|
7948
|
+
var _a = React$1.useState(function () {
|
|
7949
|
+
return getResponsiveValue(desktopValue, mobileValue);
|
|
7950
|
+
}),
|
|
7951
|
+
value = _a[0],
|
|
7952
|
+
setValue = _a[1];
|
|
7953
|
+
React$1.useEffect(function () {
|
|
7954
|
+
if (Platform$1.OS !== 'web') return;
|
|
7955
|
+
var handleResize = function () {
|
|
7956
|
+
setValue(getResponsiveValue(desktopValue, mobileValue));
|
|
7957
|
+
};
|
|
7958
|
+
window.addEventListener('resize', handleResize);
|
|
7959
|
+
return function () {
|
|
7960
|
+
return window.removeEventListener('resize', handleResize);
|
|
7961
|
+
};
|
|
7962
|
+
}, [desktopValue, mobileValue, isDesktop, isTablet]);
|
|
7963
|
+
return value;
|
|
7964
|
+
};
|
|
7917
7965
|
|
|
7918
7966
|
function createVariantSystem(baseStyle, variantStyles) {
|
|
7919
7967
|
return function (theme, variant) {
|
|
@@ -7968,14 +8016,14 @@ var Button = function (_a) {
|
|
|
7968
8016
|
button: {
|
|
7969
8017
|
justifyContent: 'center',
|
|
7970
8018
|
alignItems: 'center',
|
|
7971
|
-
paddingHorizontal:
|
|
7972
|
-
paddingVertical:
|
|
8019
|
+
paddingHorizontal: useResponsiveValue(theme.sizes.xxl, theme.sizes.sm, isDesktop, isTablet),
|
|
8020
|
+
paddingVertical: theme.sizes.sm,
|
|
7973
8021
|
alignSelf: 'flex-start'
|
|
7974
8022
|
},
|
|
7975
8023
|
text: {
|
|
7976
8024
|
textAlign: 'center',
|
|
7977
8025
|
textTransform: 'uppercase',
|
|
7978
|
-
fontSize:
|
|
8026
|
+
fontSize: useResponsiveValue(theme.sizes.xl, theme.sizes.sm, isDesktop, isTablet),
|
|
7979
8027
|
fontWeight: '700'
|
|
7980
8028
|
}
|
|
7981
8029
|
});
|
|
@@ -8013,14 +8061,15 @@ var Column$1 = function (_a) {
|
|
|
8013
8061
|
direction = _d === void 0 ? 'column' : _d,
|
|
8014
8062
|
_e = _a.style,
|
|
8015
8063
|
style = _e === void 0 ? {} : _e;
|
|
8064
|
+
var theme = useWllSdk().theme;
|
|
8016
8065
|
var _f = useResponsive$1(),
|
|
8017
8066
|
isDesktop = _f.isDesktop,
|
|
8018
8067
|
isTablet = _f.isTablet;
|
|
8019
8068
|
var dynamicStyles = StyleSheet$1.create({
|
|
8020
8069
|
column: {
|
|
8021
8070
|
flex: 1,
|
|
8022
|
-
paddingHorizontal:
|
|
8023
|
-
paddingBottom:
|
|
8071
|
+
paddingHorizontal: useResponsiveValue(theme.sizes.sm, theme.sizes.xxs, isDesktop, isTablet),
|
|
8072
|
+
paddingBottom: useResponsiveValue(theme.sizes.sm, theme.sizes.xxs, isDesktop, isTablet),
|
|
8024
8073
|
justifyContent: justifyMap$1[justify],
|
|
8025
8074
|
alignItems: alignMap$1[align],
|
|
8026
8075
|
flexDirection: direction
|
|
@@ -8089,17 +8138,17 @@ var ActivityIndicator = /*#__PURE__*/React__namespace.forwardRef((props, forward
|
|
|
8089
8138
|
"aria-valuemin": 0,
|
|
8090
8139
|
ref: forwardedRef,
|
|
8091
8140
|
role: "progressbar",
|
|
8092
|
-
style: [styles$
|
|
8141
|
+
style: [styles$h.container, style]
|
|
8093
8142
|
}), /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
8094
8143
|
children: svg,
|
|
8095
8144
|
style: [typeof size === 'number' ? {
|
|
8096
8145
|
height: size,
|
|
8097
8146
|
width: size
|
|
8098
|
-
} : indicatorSizes[size], styles$
|
|
8147
|
+
} : indicatorSizes[size], styles$h.animation, !animating && styles$h.animationPause, !animating && hidesWhenStopped && styles$h.hidesWhenStopped]
|
|
8099
8148
|
}));
|
|
8100
8149
|
});
|
|
8101
8150
|
ActivityIndicator.displayName = 'ActivityIndicator';
|
|
8102
|
-
var styles$
|
|
8151
|
+
var styles$h = StyleSheet$1.create({
|
|
8103
8152
|
container: {
|
|
8104
8153
|
alignItems: 'center',
|
|
8105
8154
|
justifyContent: 'center'
|
|
@@ -8139,7 +8188,7 @@ var ActivityIndicator$1 = ActivityIndicator;
|
|
|
8139
8188
|
var LoadingIndicator = function () {
|
|
8140
8189
|
var theme = useWllSdk().theme;
|
|
8141
8190
|
return /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
8142
|
-
style: [styles$
|
|
8191
|
+
style: [styles$g.container, {
|
|
8143
8192
|
borderRadius: theme.sizes.borderRadiusSm,
|
|
8144
8193
|
padding: theme.sizes.md
|
|
8145
8194
|
}]
|
|
@@ -8148,7 +8197,7 @@ var LoadingIndicator = function () {
|
|
|
8148
8197
|
color: theme.primary
|
|
8149
8198
|
}));
|
|
8150
8199
|
};
|
|
8151
|
-
var styles$
|
|
8200
|
+
var styles$g = StyleSheet$1.create({
|
|
8152
8201
|
container: {
|
|
8153
8202
|
width: '100%',
|
|
8154
8203
|
height: '100%',
|
|
@@ -8462,14 +8511,14 @@ var ScrollViewBase = /*#__PURE__*/React__namespace.forwardRef((props, forwardedR
|
|
|
8462
8511
|
onTouchMove: createPreventableScrollHandler(onTouchMove),
|
|
8463
8512
|
onWheel: createPreventableScrollHandler(onWheel),
|
|
8464
8513
|
ref: useMergeRefs$1(scrollRef, forwardedRef),
|
|
8465
|
-
style: [style, !scrollEnabled && styles$
|
|
8514
|
+
style: [style, !scrollEnabled && styles$f.scrollDisabled, hideScrollbar && styles$f.hideScrollbar]
|
|
8466
8515
|
}));
|
|
8467
8516
|
});
|
|
8468
8517
|
|
|
8469
8518
|
// Chrome doesn't support e.preventDefault in this case; touch-action must be
|
|
8470
8519
|
// used to disable scrolling.
|
|
8471
8520
|
// https://developers.google.com/web/updates/2017/01/scrolling-intervention
|
|
8472
|
-
var styles$
|
|
8521
|
+
var styles$f = StyleSheet$1.create({
|
|
8473
8522
|
scrollDisabled: {
|
|
8474
8523
|
overflowX: 'hidden',
|
|
8475
8524
|
overflowY: 'hidden',
|
|
@@ -9108,7 +9157,7 @@ let ScrollView$1 = class ScrollView extends React$1.Component {
|
|
|
9108
9157
|
var isSticky = hasStickyHeaderIndices && stickyHeaderIndices.indexOf(i) > -1;
|
|
9109
9158
|
if (child != null && (isSticky || pagingEnabled)) {
|
|
9110
9159
|
return /*#__PURE__*/React$1.createElement(View$2, {
|
|
9111
|
-
style: [isSticky && styles$
|
|
9160
|
+
style: [isSticky && styles$e.stickyHeader, pagingEnabled && styles$e.pagingEnabledChild]
|
|
9112
9161
|
}, child);
|
|
9113
9162
|
} else {
|
|
9114
9163
|
return child;
|
|
@@ -9118,10 +9167,10 @@ let ScrollView$1 = class ScrollView extends React$1.Component {
|
|
|
9118
9167
|
children: children,
|
|
9119
9168
|
collapsable: false,
|
|
9120
9169
|
ref: this._setInnerViewRef,
|
|
9121
|
-
style: [horizontal && styles$
|
|
9170
|
+
style: [horizontal && styles$e.contentContainerHorizontal, centerContent && styles$e.contentContainerCenterContent, contentContainerStyle]
|
|
9122
9171
|
}));
|
|
9123
|
-
var baseStyle = horizontal ? styles$
|
|
9124
|
-
var pagingEnabledStyle = horizontal ? styles$
|
|
9172
|
+
var baseStyle = horizontal ? styles$e.baseHorizontal : styles$e.baseVertical;
|
|
9173
|
+
var pagingEnabledStyle = horizontal ? styles$e.pagingEnabledHorizontal : styles$e.pagingEnabledVertical;
|
|
9125
9174
|
var props = _objectSpread2(_objectSpread2({}, other), {}, {
|
|
9126
9175
|
style: [baseStyle, pagingEnabled && pagingEnabledStyle, this.props.style],
|
|
9127
9176
|
onTouchStart: this.scrollResponderHandleTouchStart,
|
|
@@ -9164,7 +9213,7 @@ var commonStyle = {
|
|
|
9164
9213
|
// iOS native scrolling
|
|
9165
9214
|
WebkitOverflowScrolling: 'touch'
|
|
9166
9215
|
};
|
|
9167
|
-
var styles$
|
|
9216
|
+
var styles$e = StyleSheet$1.create({
|
|
9168
9217
|
baseVertical: _objectSpread2(_objectSpread2({}, commonStyle), {}, {
|
|
9169
9218
|
flexDirection: 'column',
|
|
9170
9219
|
overflowX: 'hidden',
|
|
@@ -10377,7 +10426,7 @@ class CellRenderer extends React__namespace.Component {
|
|
|
10377
10426
|
ItemSeparatorComponent :
|
|
10378
10427
|
// $FlowFixMe[incompatible-type]
|
|
10379
10428
|
ItemSeparatorComponent && /*#__PURE__*/React__namespace.createElement(ItemSeparatorComponent, this.state.separatorProps);
|
|
10380
|
-
var cellStyle = inversionStyle ? horizontal ? [styles$
|
|
10429
|
+
var cellStyle = inversionStyle ? horizontal ? [styles$d.rowReverse, inversionStyle] : [styles$d.columnReverse, inversionStyle] : horizontal ? [styles$d.row, inversionStyle] : inversionStyle;
|
|
10381
10430
|
var result = !CellRendererComponent ? /*#__PURE__*/React__namespace.createElement(View$2, _extends$1({
|
|
10382
10431
|
style: cellStyle,
|
|
10383
10432
|
onFocusCapture: onCellFocusCapture
|
|
@@ -10397,7 +10446,7 @@ class CellRenderer extends React__namespace.Component {
|
|
|
10397
10446
|
}, result);
|
|
10398
10447
|
}
|
|
10399
10448
|
}
|
|
10400
|
-
var styles$
|
|
10449
|
+
var styles$d = StyleSheet$1.create({
|
|
10401
10450
|
row: {
|
|
10402
10451
|
flexDirection: 'row'
|
|
10403
10452
|
},
|
|
@@ -11577,7 +11626,7 @@ class VirtualizedList extends StateSafePureComponent {
|
|
|
11577
11626
|
var _this$props6 = this.props,
|
|
11578
11627
|
data = _this$props6.data,
|
|
11579
11628
|
horizontal = _this$props6.horizontal;
|
|
11580
|
-
var inversionStyle = this.props.inverted ? horizontalOrDefault(this.props.horizontal) ? styles$
|
|
11629
|
+
var inversionStyle = this.props.inverted ? horizontalOrDefault(this.props.horizontal) ? styles$c.horizontallyInverted : styles$c.verticallyInverted : null;
|
|
11581
11630
|
var cells = [];
|
|
11582
11631
|
var stickyIndicesFromProps = new Set(this.props.stickyHeaderIndices);
|
|
11583
11632
|
var stickyHeaderIndices = [];
|
|
@@ -11741,7 +11790,7 @@ class VirtualizedList extends StateSafePureComponent {
|
|
|
11741
11790
|
}*/
|
|
11742
11791
|
if (this.props.debug) {
|
|
11743
11792
|
return /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
11744
|
-
style: styles$
|
|
11793
|
+
style: styles$c.debug
|
|
11745
11794
|
}, ret, this._renderDebugOverlay());
|
|
11746
11795
|
} else {
|
|
11747
11796
|
return ret;
|
|
@@ -11858,20 +11907,20 @@ class VirtualizedList extends StateSafePureComponent {
|
|
|
11858
11907
|
var visTop = this._scrollMetrics.offset;
|
|
11859
11908
|
var visLen = this._scrollMetrics.visibleLength;
|
|
11860
11909
|
return /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
11861
|
-
style: [styles$
|
|
11910
|
+
style: [styles$c.debugOverlayBase, styles$c.debugOverlay]
|
|
11862
11911
|
}, framesInLayout.map((f, ii) => /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
11863
11912
|
key: 'f' + ii,
|
|
11864
|
-
style: [styles$
|
|
11913
|
+
style: [styles$c.debugOverlayBase, styles$c.debugOverlayFrame, {
|
|
11865
11914
|
top: f.offset * normalize,
|
|
11866
11915
|
height: f.length * normalize
|
|
11867
11916
|
}]
|
|
11868
11917
|
})), /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
11869
|
-
style: [styles$
|
|
11918
|
+
style: [styles$c.debugOverlayBase, styles$c.debugOverlayFrameLast, {
|
|
11870
11919
|
top: windowTop * normalize,
|
|
11871
11920
|
height: windowLen * normalize
|
|
11872
11921
|
}]
|
|
11873
11922
|
}), /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
11874
|
-
style: [styles$
|
|
11923
|
+
style: [styles$c.debugOverlayBase, styles$c.debugOverlayFrameVis, {
|
|
11875
11924
|
top: visTop * normalize,
|
|
11876
11925
|
height: visLen * normalize
|
|
11877
11926
|
}]
|
|
@@ -12012,7 +12061,7 @@ class VirtualizedList extends StateSafePureComponent {
|
|
|
12012
12061
|
}
|
|
12013
12062
|
}
|
|
12014
12063
|
VirtualizedList.contextType = VirtualizedListContext;
|
|
12015
|
-
var styles$
|
|
12064
|
+
var styles$c = StyleSheet$1.create({
|
|
12016
12065
|
verticallyInverted: {
|
|
12017
12066
|
transform: 'scaleY(-1)'
|
|
12018
12067
|
},
|
|
@@ -12389,7 +12438,7 @@ let FlatList$1 = class FlatList extends React__namespace.PureComponent {
|
|
|
12389
12438
|
_index = info.index;
|
|
12390
12439
|
invariant$1(Array.isArray(_item2), 'Expected array of items with numColumns > 1');
|
|
12391
12440
|
return /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
12392
|
-
style: [styles$
|
|
12441
|
+
style: [styles$b.row, columnWrapperStyle]
|
|
12393
12442
|
}, _item2.map((it, kk) => {
|
|
12394
12443
|
var element = render({
|
|
12395
12444
|
// $FlowFixMe[incompatible-call]
|
|
@@ -12515,7 +12564,7 @@ let FlatList$1 = class FlatList extends React__namespace.PureComponent {
|
|
|
12515
12564
|
);
|
|
12516
12565
|
}
|
|
12517
12566
|
};
|
|
12518
|
-
var styles$
|
|
12567
|
+
var styles$b = StyleSheet$1.create({
|
|
12519
12568
|
row: {
|
|
12520
12569
|
flexDirection: 'row'
|
|
12521
12570
|
}
|
|
@@ -14902,7 +14951,7 @@ var Image$1 = /*#__PURE__*/React__namespace.forwardRef((props, ref) => {
|
|
|
14902
14951
|
// Accessibility image allows users to trigger the browser's image context menu
|
|
14903
14952
|
var hiddenImage = displayImageUri ? createElement$1('img', {
|
|
14904
14953
|
alt: ariaLabel || '',
|
|
14905
|
-
style: styles$
|
|
14954
|
+
style: styles$a.accessibilityImage$raw,
|
|
14906
14955
|
draggable: draggable || false,
|
|
14907
14956
|
ref: hiddenImageRef,
|
|
14908
14957
|
src: displayImageUri
|
|
@@ -14974,14 +15023,14 @@ var Image$1 = /*#__PURE__*/React__namespace.forwardRef((props, ref) => {
|
|
|
14974
15023
|
onLayout: handleLayout,
|
|
14975
15024
|
pointerEvents: pointerEvents,
|
|
14976
15025
|
ref: ref,
|
|
14977
|
-
style: [styles$
|
|
15026
|
+
style: [styles$a.root, hasTextAncestor && styles$a.inline, imageSizeStyle, style, styles$a.undo,
|
|
14978
15027
|
// TEMP: avoid deprecated shadow props regression
|
|
14979
15028
|
// until Image refactored to use createElement.
|
|
14980
15029
|
{
|
|
14981
15030
|
boxShadow: null
|
|
14982
15031
|
}]
|
|
14983
15032
|
}), /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
14984
|
-
style: [styles$
|
|
15033
|
+
style: [styles$a.image, resizeModeStyles[resizeMode], {
|
|
14985
15034
|
backgroundImage,
|
|
14986
15035
|
filter
|
|
14987
15036
|
}, backgroundSize != null && {
|
|
@@ -15003,7 +15052,7 @@ ImageWithStatics.prefetch = function (uri) {
|
|
|
15003
15052
|
ImageWithStatics.queryCache = function (uris) {
|
|
15004
15053
|
return ImageLoader$1.queryCache(uris);
|
|
15005
15054
|
};
|
|
15006
|
-
var styles$
|
|
15055
|
+
var styles$a = StyleSheet$1.create({
|
|
15007
15056
|
root: {
|
|
15008
15057
|
flexBasis: 'auto',
|
|
15009
15058
|
overflow: 'hidden',
|
|
@@ -18029,13 +18078,13 @@ var useStyles = function (theme) {
|
|
|
18029
18078
|
var useContainerStyles = function (theme) {
|
|
18030
18079
|
return {
|
|
18031
18080
|
sm: {
|
|
18032
|
-
height: theme.sizes.
|
|
18081
|
+
height: theme.sizes.xxs
|
|
18033
18082
|
},
|
|
18034
18083
|
md: {
|
|
18035
|
-
height: theme.sizes.
|
|
18084
|
+
height: theme.sizes.xs
|
|
18036
18085
|
},
|
|
18037
18086
|
lg: {
|
|
18038
|
-
height: theme.sizes.
|
|
18087
|
+
height: theme.sizes.sm
|
|
18039
18088
|
}
|
|
18040
18089
|
};
|
|
18041
18090
|
};
|
|
@@ -18107,7 +18156,7 @@ function _extends() {
|
|
|
18107
18156
|
}, _extends.apply(null, arguments);
|
|
18108
18157
|
}
|
|
18109
18158
|
|
|
18110
|
-
var styles$
|
|
18159
|
+
var styles$9 = StyleSheet$1.create({
|
|
18111
18160
|
imageOverlay: {
|
|
18112
18161
|
position: 'absolute',
|
|
18113
18162
|
left: 0,
|
|
@@ -18133,36 +18182,36 @@ var ProgressiveImage = function (_a) {
|
|
|
18133
18182
|
var imageAnimated = React$1.useRef(new Animated$1.Value(0)).current;
|
|
18134
18183
|
var theme = useWllSdk().theme;
|
|
18135
18184
|
var onImageLoad = function () {
|
|
18136
|
-
|
|
18137
|
-
|
|
18138
|
-
|
|
18139
|
-
|
|
18140
|
-
|
|
18185
|
+
requestAnimationFrame(function () {
|
|
18186
|
+
Animated$1.timing(imageAnimated, {
|
|
18187
|
+
toValue: 1,
|
|
18188
|
+
useNativeDriver: true,
|
|
18189
|
+
duration: 300
|
|
18190
|
+
}).start();
|
|
18191
|
+
});
|
|
18141
18192
|
};
|
|
18142
18193
|
var baseColor = theme.alphaDerivedPrimary[20];
|
|
18143
18194
|
var desaturatedColor = desaturateColor(baseColor);
|
|
18195
|
+
var backgroundColor = isDesaturated ? desaturatedColor : baseColor;
|
|
18144
18196
|
return /*#__PURE__*/React$1.createElement(View$2, {
|
|
18145
|
-
style: [styles$
|
|
18146
|
-
backgroundColor:
|
|
18197
|
+
style: [styles$9.container, style, {
|
|
18198
|
+
backgroundColor: backgroundColor
|
|
18147
18199
|
}]
|
|
18148
|
-
},
|
|
18149
|
-
|
|
18150
|
-
|
|
18151
|
-
opacity: imageAnimated
|
|
18152
|
-
|
|
18153
|
-
|
|
18154
|
-
|
|
18155
|
-
|
|
18156
|
-
|
|
18157
|
-
style: [styles$a.imageOverlay, {
|
|
18158
|
-
opacity: 0.1
|
|
18159
|
-
}],
|
|
18160
|
-
onLoad: onImageLoad
|
|
18161
|
-
}))) : /*#__PURE__*/React$1.createElement(Animated$1.Image, _extends({}, props, {
|
|
18200
|
+
}, /*#__PURE__*/React$1.createElement(Animated$1.View, {
|
|
18201
|
+
style: [styles$9.imageOverlay, {
|
|
18202
|
+
backgroundColor: backgroundColor,
|
|
18203
|
+
opacity: imageAnimated.interpolate({
|
|
18204
|
+
inputRange: [0, 1],
|
|
18205
|
+
outputRange: [1, 0]
|
|
18206
|
+
})
|
|
18207
|
+
}]
|
|
18208
|
+
}), /*#__PURE__*/React$1.createElement(Animated$1.Image, _extends({}, props, {
|
|
18162
18209
|
source: source,
|
|
18163
|
-
style: [styles$
|
|
18210
|
+
style: [styles$9.imageOverlay, __assign({
|
|
18164
18211
|
opacity: imageAnimated
|
|
18165
|
-
}
|
|
18212
|
+
}, isDesaturated && {
|
|
18213
|
+
filter: "saturate(".concat(0 * 100, "%)")
|
|
18214
|
+
})],
|
|
18166
18215
|
onLoad: onImageLoad
|
|
18167
18216
|
})));
|
|
18168
18217
|
};
|
|
@@ -18174,12 +18223,13 @@ var RowHeader = function (_a) {
|
|
|
18174
18223
|
var _b = useResponsive$1(),
|
|
18175
18224
|
isDesktop = _b.isDesktop,
|
|
18176
18225
|
isTablet = _b.isTablet;
|
|
18226
|
+
var theme = useWllSdk().theme;
|
|
18177
18227
|
var dynamicStyles = StyleSheet$1.create({
|
|
18178
18228
|
header: {
|
|
18179
18229
|
flexDirection: 'row',
|
|
18180
18230
|
alignItems: 'center',
|
|
18181
18231
|
justifyContent: 'space-between',
|
|
18182
|
-
marginBottom:
|
|
18232
|
+
marginBottom: useResponsiveValue(theme.sizes.xxs, theme.sizes.xxxs, isDesktop, isTablet)
|
|
18183
18233
|
}
|
|
18184
18234
|
});
|
|
18185
18235
|
return /*#__PURE__*/React__namespace.createElement(View$2, _extends({
|
|
@@ -18204,51 +18254,38 @@ var Text = function (_a) {
|
|
|
18204
18254
|
switch (variant) {
|
|
18205
18255
|
case 'eyebrow':
|
|
18206
18256
|
return __assign(__assign({}, baseStyle), {
|
|
18207
|
-
fontSize:
|
|
18208
|
-
marginBottom:
|
|
18257
|
+
fontSize: useResponsiveValue(theme.sizes.md, theme.sizes.sm, isDesktop, isTablet),
|
|
18258
|
+
marginBottom: useResponsiveValue(theme.sizes.xxs, theme.sizes.xxxs, isDesktop, isTablet)
|
|
18209
18259
|
});
|
|
18210
18260
|
case 'title':
|
|
18211
18261
|
return __assign(__assign({}, baseStyle), {
|
|
18212
|
-
fontSize:
|
|
18262
|
+
fontSize: useResponsiveValue(theme.sizes.xxl, theme.sizes.md, isDesktop, isTablet),
|
|
18213
18263
|
fontWeight: 'bold'
|
|
18214
18264
|
});
|
|
18215
18265
|
case 'body':
|
|
18216
18266
|
return {
|
|
18217
18267
|
color: theme.derivedSurfaceText[20],
|
|
18218
|
-
fontSize:
|
|
18268
|
+
fontSize: useResponsiveValue(theme.sizes.md, theme.sizes.xs, isDesktop, isTablet)
|
|
18219
18269
|
};
|
|
18220
18270
|
case 'caption':
|
|
18221
18271
|
return __assign(__assign({}, baseStyle), {
|
|
18222
18272
|
fontWeight: 'bold',
|
|
18223
|
-
fontSize:
|
|
18273
|
+
fontSize: useResponsiveValue(theme.sizes.xxl, theme.sizes.xl, isDesktop, isTablet),
|
|
18224
18274
|
color: theme.primary
|
|
18225
18275
|
});
|
|
18226
|
-
case 'tier-earned':
|
|
18227
|
-
return __assign(__assign({}, baseStyle), {
|
|
18228
|
-
fontSize: getResponsiveValue(20, 14, isDesktop, isTablet),
|
|
18229
|
-
fontWeight: 'bold'
|
|
18230
|
-
});
|
|
18231
|
-
case 'tier-requirement':
|
|
18232
|
-
return __assign(__assign({}, baseStyle), {
|
|
18233
|
-
fontSize: getResponsiveValue(18, 12, isDesktop, isTablet),
|
|
18234
|
-
fontWeight: 'bold'
|
|
18235
|
-
});
|
|
18236
18276
|
case 'description':
|
|
18237
18277
|
case 'label':
|
|
18238
18278
|
default:
|
|
18239
18279
|
return __assign(__assign({}, baseStyle), {
|
|
18240
|
-
fontSize:
|
|
18280
|
+
fontSize: useResponsiveValue(theme.sizes.sm, theme.sizes.xs, isDesktop, isTablet)
|
|
18241
18281
|
});
|
|
18242
18282
|
}
|
|
18243
18283
|
};
|
|
18244
18284
|
var variantStyle = getVariantStyle(variant);
|
|
18245
18285
|
return /*#__PURE__*/React__namespace.createElement(Text$3, _extends({
|
|
18246
|
-
style: [
|
|
18286
|
+
style: [variantStyle, style]
|
|
18247
18287
|
}, props));
|
|
18248
18288
|
};
|
|
18249
|
-
var styles$9 = StyleSheet$1.create({
|
|
18250
|
-
base: {}
|
|
18251
|
-
});
|
|
18252
18289
|
|
|
18253
18290
|
/**
|
|
18254
18291
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
@@ -19073,7 +19110,7 @@ var BaseTileRoot = function (_a) {
|
|
|
19073
19110
|
justifyContent: 'center',
|
|
19074
19111
|
alignItems: 'center',
|
|
19075
19112
|
aspectRatio: isHalfSize ? 2 : 1,
|
|
19076
|
-
borderRadius:
|
|
19113
|
+
borderRadius: useResponsiveValue(theme.sizes.borderRadiusLg, theme.sizes.borderRadiusSm, isDesktop, isTablet)
|
|
19077
19114
|
}
|
|
19078
19115
|
});
|
|
19079
19116
|
return /*#__PURE__*/React$1.createElement(Pressable$1, {
|
|
@@ -19108,6 +19145,7 @@ var BaseTileContent = function (_a) {
|
|
|
19108
19145
|
var BaseTileHeader = function (_a) {
|
|
19109
19146
|
var children = _a.children;
|
|
19110
19147
|
var tile = useTileContext();
|
|
19148
|
+
var theme = useWllSdk().theme;
|
|
19111
19149
|
var artworkUrl = tile.configuration.artworkUrl;
|
|
19112
19150
|
var isHalfSize = useTileSize(tile).isHalfSize;
|
|
19113
19151
|
var _b = useResponsive$1(),
|
|
@@ -19117,8 +19155,8 @@ var BaseTileHeader = function (_a) {
|
|
|
19117
19155
|
if (isHalfSize && artworkUrl) return null;
|
|
19118
19156
|
var dynamicStyles = StyleSheet$1.create({
|
|
19119
19157
|
header: {
|
|
19120
|
-
marginBottom:
|
|
19121
|
-
marginTop:
|
|
19158
|
+
marginBottom: useResponsiveValue(theme.sizes.xxs, theme.sizes.xxxs, isDesktop, isTablet),
|
|
19159
|
+
marginTop: useResponsiveValue(theme.sizes.sm, theme.sizes.xxs, isDesktop, isTablet),
|
|
19122
19160
|
flexDirection: 'row',
|
|
19123
19161
|
alignItems: 'center',
|
|
19124
19162
|
justifyContent: 'space-between'
|
|
@@ -19326,14 +19364,15 @@ var useBadgeTileStyles = function () {
|
|
|
19326
19364
|
var _a = useResponsive$1(),
|
|
19327
19365
|
isDesktop = _a.isDesktop,
|
|
19328
19366
|
isTablet = _a.isTablet;
|
|
19367
|
+
var theme = useWllSdk().theme;
|
|
19329
19368
|
return StyleSheet$1.create({
|
|
19330
19369
|
container: {
|
|
19331
19370
|
flex: 1
|
|
19332
19371
|
},
|
|
19333
19372
|
indicatorContainer: {
|
|
19334
19373
|
position: 'absolute',
|
|
19335
|
-
bottom:
|
|
19336
|
-
right:
|
|
19374
|
+
bottom: useResponsiveValue(theme.sizes.lg, theme.sizes.xxs, isDesktop, isTablet),
|
|
19375
|
+
right: useResponsiveValue(theme.sizes.lg, theme.sizes.xxs, isDesktop, isTablet),
|
|
19337
19376
|
backgroundColor: 'rgba(0,0,0,0.6)',
|
|
19338
19377
|
borderRadius: 40,
|
|
19339
19378
|
width: 40,
|
|
@@ -19351,14 +19390,14 @@ var useBadgeTileStyles = function () {
|
|
|
19351
19390
|
alignItems: 'center',
|
|
19352
19391
|
justifyContent: 'center',
|
|
19353
19392
|
position: 'relative',
|
|
19354
|
-
marginBottom:
|
|
19393
|
+
marginBottom: useResponsiveValue(theme.sizes.lg, theme.sizes.xxs, isDesktop, isTablet)
|
|
19355
19394
|
},
|
|
19356
19395
|
image: {
|
|
19357
19396
|
width: '100%',
|
|
19358
19397
|
height: '100%'
|
|
19359
19398
|
},
|
|
19360
19399
|
titleText: {
|
|
19361
|
-
marginBottom:
|
|
19400
|
+
marginBottom: useResponsiveValue(theme.sizes.xxs, theme.sizes.xxxs, isDesktop, isTablet)
|
|
19362
19401
|
},
|
|
19363
19402
|
dateEarnedContainer: {
|
|
19364
19403
|
alignItems: 'flex-start',
|
|
@@ -19369,70 +19408,6 @@ var useBadgeTileStyles = function () {
|
|
|
19369
19408
|
});
|
|
19370
19409
|
};
|
|
19371
19410
|
|
|
19372
|
-
var BadgeTileInner = function (_a) {
|
|
19373
|
-
var tile = _a.tile;
|
|
19374
|
-
var styles = useBadgeTileStyles();
|
|
19375
|
-
if (!tile) return null;
|
|
19376
|
-
return /*#__PURE__*/React$1.createElement(BaseTile, {
|
|
19377
|
-
tile: tile
|
|
19378
|
-
}, /*#__PURE__*/React$1.createElement(View$2, {
|
|
19379
|
-
style: styles.container
|
|
19380
|
-
}, /*#__PURE__*/React$1.createElement(BadgeTile.Media, null, /*#__PURE__*/React$1.createElement(BadgeTile.Status, null)), /*#__PURE__*/React$1.createElement(Column$1, {
|
|
19381
|
-
justify: "between",
|
|
19382
|
-
align: "start"
|
|
19383
|
-
}, /*#__PURE__*/React$1.createElement(View$2, null, /*#__PURE__*/React$1.createElement(BadgeTile.Title, null), /*#__PURE__*/React$1.createElement(BadgeTile.Description, null)), /*#__PURE__*/React$1.createElement(BadgeTile.DateEarned, null))));
|
|
19384
|
-
};
|
|
19385
|
-
var BadgeTileMedia = function (_a) {
|
|
19386
|
-
var children = _a.children,
|
|
19387
|
-
props = __rest(_a, ["children"]);
|
|
19388
|
-
var styles = useBadgeTileStyles();
|
|
19389
|
-
var tile = useTileContext();
|
|
19390
|
-
var configuration = tile.configuration;
|
|
19391
|
-
var type = configuration.type,
|
|
19392
|
-
count = configuration.count,
|
|
19393
|
-
artworkUrl = configuration.artworkUrl,
|
|
19394
|
-
emptyBadgeArtworkUrl = configuration.emptyBadgeArtworkUrl;
|
|
19395
|
-
var displayUrl = count === 0 ? emptyBadgeArtworkUrl : artworkUrl;
|
|
19396
|
-
if (!displayUrl) return null;
|
|
19397
|
-
return /*#__PURE__*/React$1.createElement(View$2, {
|
|
19398
|
-
style: styles.header
|
|
19399
|
-
}, /*#__PURE__*/React$1.createElement(ProgressiveImage, _extends({}, props, {
|
|
19400
|
-
source: {
|
|
19401
|
-
uri: displayUrl
|
|
19402
|
-
},
|
|
19403
|
-
style: styles.image,
|
|
19404
|
-
resizeMode: "contain",
|
|
19405
|
-
isDesaturated: shouldDesaturate(type, count)
|
|
19406
|
-
})), children);
|
|
19407
|
-
};
|
|
19408
|
-
var BadgeTileTitle = function () {
|
|
19409
|
-
var styles = useBadgeTileStyles();
|
|
19410
|
-
var tile = useTileContext();
|
|
19411
|
-
var configuration = tile.configuration;
|
|
19412
|
-
var count = configuration.count,
|
|
19413
|
-
name = configuration.name,
|
|
19414
|
-
emptyBadgeMessage = configuration.emptyBadgeMessage;
|
|
19415
|
-
var displayText = count === 0 ? emptyBadgeMessage : name;
|
|
19416
|
-
if (!displayText) return null;
|
|
19417
|
-
return /*#__PURE__*/React$1.createElement(View$2, null, /*#__PURE__*/React$1.createElement(Text, {
|
|
19418
|
-
variant: "title",
|
|
19419
|
-
style: styles.titleText,
|
|
19420
|
-
numberOfLines: 2,
|
|
19421
|
-
ellipsizeMode: "tail"
|
|
19422
|
-
}, displayText));
|
|
19423
|
-
};
|
|
19424
|
-
var BadgeTileDescription = function () {
|
|
19425
|
-
var tile = useTileContext();
|
|
19426
|
-
var configuration = tile.configuration;
|
|
19427
|
-
var count = configuration.count,
|
|
19428
|
-
description = configuration.description;
|
|
19429
|
-
if (count === 0 || !description) return null;
|
|
19430
|
-
return /*#__PURE__*/React$1.createElement(Text, {
|
|
19431
|
-
variant: "body",
|
|
19432
|
-
numberOfLines: 2,
|
|
19433
|
-
ellipsizeMode: "tail"
|
|
19434
|
-
}, description);
|
|
19435
|
-
};
|
|
19436
19411
|
var BadgeTileDateEarned = function () {
|
|
19437
19412
|
var styles = useBadgeTileStyles();
|
|
19438
19413
|
var tile = useTileContext();
|
|
@@ -19464,6 +19439,44 @@ var BadgeTileDateEarned = function () {
|
|
|
19464
19439
|
variant: "label"
|
|
19465
19440
|
}, "".concat(awardedDatePrefix, " ").concat(formattedDate)));
|
|
19466
19441
|
};
|
|
19442
|
+
|
|
19443
|
+
var BadgeTileDescription = function () {
|
|
19444
|
+
var tile = useTileContext();
|
|
19445
|
+
var configuration = tile.configuration;
|
|
19446
|
+
var count = configuration.count,
|
|
19447
|
+
description = configuration.description;
|
|
19448
|
+
if (count === 0 || !description) return null;
|
|
19449
|
+
return /*#__PURE__*/React$1.createElement(Text, {
|
|
19450
|
+
variant: "body",
|
|
19451
|
+
numberOfLines: 2,
|
|
19452
|
+
ellipsizeMode: "tail"
|
|
19453
|
+
}, description);
|
|
19454
|
+
};
|
|
19455
|
+
|
|
19456
|
+
var BadgeTileMedia = function (_a) {
|
|
19457
|
+
var children = _a.children,
|
|
19458
|
+
props = __rest(_a, ["children"]);
|
|
19459
|
+
var styles = useBadgeTileStyles();
|
|
19460
|
+
var tile = useTileContext();
|
|
19461
|
+
var configuration = tile.configuration;
|
|
19462
|
+
var type = configuration.type,
|
|
19463
|
+
count = configuration.count,
|
|
19464
|
+
artworkUrl = configuration.artworkUrl,
|
|
19465
|
+
emptyBadgeArtworkUrl = configuration.emptyBadgeArtworkUrl;
|
|
19466
|
+
var displayUrl = count === 0 ? emptyBadgeArtworkUrl : artworkUrl;
|
|
19467
|
+
if (!displayUrl) return null;
|
|
19468
|
+
return /*#__PURE__*/React$1.createElement(View$2, {
|
|
19469
|
+
style: styles.header
|
|
19470
|
+
}, /*#__PURE__*/React$1.createElement(ProgressiveImage, _extends({}, props, {
|
|
19471
|
+
source: {
|
|
19472
|
+
uri: displayUrl
|
|
19473
|
+
},
|
|
19474
|
+
style: styles.image,
|
|
19475
|
+
resizeMode: "contain",
|
|
19476
|
+
isDesaturated: shouldDesaturate(type, count)
|
|
19477
|
+
})), children);
|
|
19478
|
+
};
|
|
19479
|
+
|
|
19467
19480
|
var BadgeTileStatus = function () {
|
|
19468
19481
|
var styles = useBadgeTileStyles();
|
|
19469
19482
|
var tile = useTileContext();
|
|
@@ -19482,13 +19495,56 @@ var BadgeTileStatus = function () {
|
|
|
19482
19495
|
style: styles.countText
|
|
19483
19496
|
}, count, "x"));
|
|
19484
19497
|
};
|
|
19485
|
-
|
|
19498
|
+
|
|
19499
|
+
var BadgeTileTitle = function () {
|
|
19500
|
+
var styles = useBadgeTileStyles();
|
|
19501
|
+
var tile = useTileContext();
|
|
19502
|
+
var configuration = tile.configuration;
|
|
19503
|
+
var count = configuration.count,
|
|
19504
|
+
name = configuration.name,
|
|
19505
|
+
emptyBadgeMessage = configuration.emptyBadgeMessage;
|
|
19506
|
+
var displayText = count === 0 ? emptyBadgeMessage : name;
|
|
19507
|
+
if (!displayText) return null;
|
|
19508
|
+
return /*#__PURE__*/React$1.createElement(View$2, null, /*#__PURE__*/React$1.createElement(Text, {
|
|
19509
|
+
variant: "title",
|
|
19510
|
+
style: styles.titleText,
|
|
19511
|
+
numberOfLines: 2,
|
|
19512
|
+
ellipsizeMode: "tail"
|
|
19513
|
+
}, displayText));
|
|
19514
|
+
};
|
|
19515
|
+
|
|
19516
|
+
var BadgeTileMain = function (_a) {
|
|
19517
|
+
var tile = _a.tile;
|
|
19518
|
+
if (!tile) return null;
|
|
19519
|
+
return /*#__PURE__*/React$1.createElement(BaseTile, {
|
|
19520
|
+
tile: tile
|
|
19521
|
+
}, /*#__PURE__*/React$1.createElement(BadgeTile.Media, null, /*#__PURE__*/React$1.createElement(BadgeTile.Status, null)), /*#__PURE__*/React$1.createElement(Column, {
|
|
19522
|
+
justify: "between",
|
|
19523
|
+
align: "start"
|
|
19524
|
+
}, /*#__PURE__*/React$1.createElement(View$2, null, /*#__PURE__*/React$1.createElement(BadgeTile.Title, null), /*#__PURE__*/React$1.createElement(BadgeTile.Description, null)), /*#__PURE__*/React$1.createElement(BadgeTile.DateEarned, null)));
|
|
19525
|
+
};
|
|
19526
|
+
var BadgeTile = BadgeTileMain;
|
|
19486
19527
|
BadgeTile.Media = BadgeTileMedia;
|
|
19487
19528
|
BadgeTile.Title = BadgeTileTitle;
|
|
19488
19529
|
BadgeTile.Description = BadgeTileDescription;
|
|
19489
19530
|
BadgeTile.DateEarned = BadgeTileDateEarned;
|
|
19490
19531
|
BadgeTile.Status = BadgeTileStatus;
|
|
19491
19532
|
|
|
19533
|
+
var BannerTileCTA = function () {
|
|
19534
|
+
var configuration = useBannerContext().configuration;
|
|
19535
|
+
var _a = configuration,
|
|
19536
|
+
ctaText = _a.ctaText,
|
|
19537
|
+
ctaLink = _a.ctaLink,
|
|
19538
|
+
ctaLinkTarget = _a.ctaLinkTarget;
|
|
19539
|
+
var handlePress = useHandleTilePress(ctaLink, ctaLinkTarget);
|
|
19540
|
+
if (!ctaText) return null;
|
|
19541
|
+
return /*#__PURE__*/React$1.createElement(Button, {
|
|
19542
|
+
title: ctaText,
|
|
19543
|
+
variant: "accent",
|
|
19544
|
+
onPress: handlePress
|
|
19545
|
+
});
|
|
19546
|
+
};
|
|
19547
|
+
|
|
19492
19548
|
var useBannerTileStyles = function () {
|
|
19493
19549
|
var _a = useResponsive$1(),
|
|
19494
19550
|
isDesktop = _a.isDesktop,
|
|
@@ -19499,11 +19555,10 @@ var useBannerTileStyles = function () {
|
|
|
19499
19555
|
flex: 1
|
|
19500
19556
|
},
|
|
19501
19557
|
mediaContainer: {
|
|
19502
|
-
width: '30%',
|
|
19503
19558
|
aspectRatio: 1,
|
|
19504
19559
|
position: 'relative',
|
|
19505
19560
|
overflow: 'hidden',
|
|
19506
|
-
marginRight:
|
|
19561
|
+
marginRight: useResponsiveValue(theme.sizes.xxl, theme.sizes.xxs, isDesktop, isTablet),
|
|
19507
19562
|
height: 320
|
|
19508
19563
|
},
|
|
19509
19564
|
media: {
|
|
@@ -19513,89 +19568,95 @@ var useBannerTileStyles = function () {
|
|
|
19513
19568
|
objectFit: 'cover'
|
|
19514
19569
|
},
|
|
19515
19570
|
title: {
|
|
19516
|
-
fontSize:
|
|
19517
|
-
marginBottom:
|
|
19571
|
+
fontSize: useResponsiveValue(theme.sizes.xxxl, theme.sizes.md, isDesktop, isTablet),
|
|
19572
|
+
marginBottom: useResponsiveValue(theme.sizes.sm, theme.sizes.xxxs, isDesktop, isTablet),
|
|
19518
19573
|
fontWeight: '700'
|
|
19519
19574
|
},
|
|
19520
19575
|
description: {
|
|
19521
|
-
fontSize:
|
|
19522
|
-
marginBottom:
|
|
19576
|
+
fontSize: useResponsiveValue(theme.sizes.xl, theme.sizes.xs, isDesktop, isTablet),
|
|
19577
|
+
marginBottom: useResponsiveValue(theme.sizes.xxxl, theme.sizes.sm, isDesktop, isTablet),
|
|
19523
19578
|
color: theme.derivedSurfaceText[20]
|
|
19524
19579
|
}
|
|
19525
19580
|
});
|
|
19526
19581
|
};
|
|
19527
19582
|
|
|
19528
|
-
var
|
|
19529
|
-
var tile = _a.tile;
|
|
19583
|
+
var BannerTileDescription = function () {
|
|
19530
19584
|
var styles = useBannerTileStyles();
|
|
19531
|
-
|
|
19532
|
-
|
|
19533
|
-
|
|
19534
|
-
|
|
19535
|
-
|
|
19585
|
+
var configuration = useBannerContext().configuration;
|
|
19586
|
+
var description = configuration.description;
|
|
19587
|
+
var theme = useWllSdk().theme;
|
|
19588
|
+
if (!description) return null;
|
|
19589
|
+
return /*#__PURE__*/React$1.createElement(Text, {
|
|
19590
|
+
style: [styles.description, {
|
|
19591
|
+
color: theme.derivedSurfaceText[20]
|
|
19592
|
+
}]
|
|
19593
|
+
}, description);
|
|
19536
19594
|
};
|
|
19537
|
-
|
|
19595
|
+
|
|
19596
|
+
var BannerTileMedia = function (_a) {
|
|
19597
|
+
var isArtworkOnly = _a.isArtworkOnly;
|
|
19538
19598
|
var styles = useBannerTileStyles();
|
|
19539
19599
|
var configuration = useBannerContext().configuration;
|
|
19540
19600
|
var artworkUrl = configuration.artworkUrl;
|
|
19541
19601
|
if (!artworkUrl) return null;
|
|
19542
|
-
|
|
19543
|
-
|
|
19544
|
-
}
|
|
19545
|
-
|
|
19546
|
-
|
|
19547
|
-
|
|
19548
|
-
|
|
19549
|
-
|
|
19602
|
+
var containerStyle = {
|
|
19603
|
+
width: isArtworkOnly ? '100%' : '30%'
|
|
19604
|
+
};
|
|
19605
|
+
return (
|
|
19606
|
+
/*#__PURE__*/
|
|
19607
|
+
// @ts-ignore: We are using percentage values for width, which is valid in React Native but TypeScript expects a number.
|
|
19608
|
+
React$1.createElement(View$2, {
|
|
19609
|
+
style: [styles.mediaContainer, containerStyle]
|
|
19610
|
+
}, /*#__PURE__*/React$1.createElement(ProgressiveImage, {
|
|
19611
|
+
source: {
|
|
19612
|
+
uri: artworkUrl
|
|
19613
|
+
},
|
|
19614
|
+
style: styles.media
|
|
19615
|
+
}))
|
|
19616
|
+
);
|
|
19550
19617
|
};
|
|
19618
|
+
|
|
19551
19619
|
var BannerTileTitle = function () {
|
|
19552
19620
|
var styles = useBannerTileStyles();
|
|
19553
19621
|
var configuration = useBannerContext().configuration;
|
|
19554
19622
|
var title = configuration.title;
|
|
19555
19623
|
if (!title) return null;
|
|
19556
|
-
return /*#__PURE__*/
|
|
19624
|
+
return /*#__PURE__*/React$1.createElement(Text, {
|
|
19557
19625
|
variant: "title",
|
|
19558
19626
|
style: styles.title
|
|
19559
19627
|
}, title);
|
|
19560
19628
|
};
|
|
19561
|
-
|
|
19629
|
+
|
|
19630
|
+
var BannerTile = function (_a) {
|
|
19631
|
+
var tile = _a.tile;
|
|
19562
19632
|
var styles = useBannerTileStyles();
|
|
19563
|
-
var configuration =
|
|
19564
|
-
var
|
|
19565
|
-
|
|
19566
|
-
|
|
19567
|
-
|
|
19568
|
-
|
|
19569
|
-
|
|
19570
|
-
|
|
19571
|
-
},
|
|
19572
|
-
};
|
|
19573
|
-
var BannerTileCTA = function () {
|
|
19574
|
-
var configuration = useBannerContext().configuration;
|
|
19575
|
-
var _a = configuration,
|
|
19576
|
-
ctaText = _a.ctaText,
|
|
19577
|
-
ctaLink = _a.ctaLink,
|
|
19578
|
-
ctaLinkTarget = _a.ctaLinkTarget;
|
|
19579
|
-
var handlePress = useHandleTilePress(ctaLink, ctaLinkTarget);
|
|
19580
|
-
if (!ctaText) return null;
|
|
19581
|
-
return /*#__PURE__*/React__namespace.createElement(Button, {
|
|
19582
|
-
title: ctaText,
|
|
19583
|
-
variant: "accent",
|
|
19584
|
-
onPress: handlePress
|
|
19585
|
-
});
|
|
19633
|
+
var configuration = tile.configuration;
|
|
19634
|
+
var isArtworkOnly = !configuration.title && !configuration.description && !configuration.ctaText;
|
|
19635
|
+
return /*#__PURE__*/React__namespace.createElement(BaseBanner, {
|
|
19636
|
+
tile: tile
|
|
19637
|
+
}, /*#__PURE__*/React__namespace.createElement(BannerTile.Media, {
|
|
19638
|
+
isArtworkOnly: isArtworkOnly
|
|
19639
|
+
}), /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
19640
|
+
style: styles.slideContent
|
|
19641
|
+
}, /*#__PURE__*/React__namespace.createElement(BannerTile.Title, null), /*#__PURE__*/React__namespace.createElement(BannerTile.Description, null), /*#__PURE__*/React__namespace.createElement(BannerTile.CTA, null)));
|
|
19586
19642
|
};
|
|
19587
19643
|
BannerTile.Media = BannerTileMedia;
|
|
19588
19644
|
BannerTile.Title = BannerTileTitle;
|
|
19589
19645
|
BannerTile.Description = BannerTileDescription;
|
|
19590
19646
|
BannerTile.CTA = BannerTileCTA;
|
|
19591
19647
|
|
|
19648
|
+
var ContentTileBody = function () {
|
|
19649
|
+
return /*#__PURE__*/React$1.createElement(BaseTile.Body, null);
|
|
19650
|
+
};
|
|
19651
|
+
|
|
19592
19652
|
var useContentTileStyles = function () {
|
|
19653
|
+
var theme = useWllSdk().theme;
|
|
19593
19654
|
var _a = useResponsive$1(),
|
|
19594
19655
|
isDesktop = _a.isDesktop,
|
|
19595
19656
|
isTablet = _a.isTablet;
|
|
19596
19657
|
return StyleSheet$1.create({
|
|
19597
19658
|
content: {
|
|
19598
|
-
paddingHorizontal:
|
|
19659
|
+
paddingHorizontal: useResponsiveValue(theme.sizes.sm, theme.sizes.xxs, isDesktop, isTablet),
|
|
19599
19660
|
flex: 1,
|
|
19600
19661
|
justifyContent: 'center'
|
|
19601
19662
|
},
|
|
@@ -19605,39 +19666,40 @@ var useContentTileStyles = function () {
|
|
|
19605
19666
|
});
|
|
19606
19667
|
};
|
|
19607
19668
|
|
|
19608
|
-
var ContentTileInner = function (_a) {
|
|
19609
|
-
var tile = _a.tile;
|
|
19610
|
-
return /*#__PURE__*/React__namespace.createElement(BaseTile, {
|
|
19611
|
-
tile: tile
|
|
19612
|
-
}, /*#__PURE__*/React__namespace.createElement(ContentTile.Root, null, /*#__PURE__*/React__namespace.createElement(ContentTile.Media, null), /*#__PURE__*/React__namespace.createElement(ContentTile.Content, null, /*#__PURE__*/React__namespace.createElement(ContentTile.Header, null), /*#__PURE__*/React__namespace.createElement(ContentTile.Body, null))));
|
|
19613
|
-
};
|
|
19614
|
-
var ContentTileRoot = function (_a) {
|
|
19615
|
-
var children = _a.children;
|
|
19616
|
-
return /*#__PURE__*/React__namespace.createElement(BaseTile.Root, null, children);
|
|
19617
|
-
};
|
|
19618
|
-
var ContentTileMedia = function () {
|
|
19619
|
-
var styles = useContentTileStyles();
|
|
19620
|
-
return /*#__PURE__*/React__namespace.createElement(BaseTile.Media, {
|
|
19621
|
-
style: styles.media
|
|
19622
|
-
});
|
|
19623
|
-
};
|
|
19624
19669
|
var ContentTileContent = function (_a) {
|
|
19625
19670
|
var children = _a.children;
|
|
19626
19671
|
var styles = useContentTileStyles();
|
|
19627
|
-
return /*#__PURE__*/
|
|
19672
|
+
return /*#__PURE__*/React$1.createElement(BaseTile.Content, null, /*#__PURE__*/React$1.createElement(View$2, {
|
|
19628
19673
|
style: styles.content
|
|
19629
19674
|
}, children));
|
|
19630
19675
|
};
|
|
19676
|
+
|
|
19631
19677
|
var ContentTileHeader = function () {
|
|
19632
19678
|
var tile = useTileContext();
|
|
19633
19679
|
var title = tile.configuration.title;
|
|
19634
19680
|
if (!title) return null;
|
|
19635
|
-
return /*#__PURE__*/
|
|
19681
|
+
return /*#__PURE__*/React$1.createElement(BaseTile.Header, null, /*#__PURE__*/React$1.createElement(BaseTile.Title, null));
|
|
19636
19682
|
};
|
|
19637
|
-
|
|
19638
|
-
|
|
19683
|
+
|
|
19684
|
+
var ContentTileMedia = function () {
|
|
19685
|
+
var styles = useContentTileStyles();
|
|
19686
|
+
return /*#__PURE__*/React$1.createElement(BaseTile.Media, {
|
|
19687
|
+
style: styles.media
|
|
19688
|
+
});
|
|
19689
|
+
};
|
|
19690
|
+
|
|
19691
|
+
var ContentTileRoot = function (_a) {
|
|
19692
|
+
var children = _a.children;
|
|
19693
|
+
return /*#__PURE__*/React$1.createElement(BaseTile.Root, null, children);
|
|
19639
19694
|
};
|
|
19640
|
-
|
|
19695
|
+
|
|
19696
|
+
var ContentTileMain = function (_a) {
|
|
19697
|
+
var tile = _a.tile;
|
|
19698
|
+
return /*#__PURE__*/React$1.createElement(BaseTile, {
|
|
19699
|
+
tile: tile
|
|
19700
|
+
}, /*#__PURE__*/React$1.createElement(ContentTile.Root, null, /*#__PURE__*/React$1.createElement(ContentTile.Media, null), /*#__PURE__*/React$1.createElement(ContentTile.Content, null, /*#__PURE__*/React$1.createElement(ContentTile.Header, null), /*#__PURE__*/React$1.createElement(ContentTile.Body, null))));
|
|
19701
|
+
};
|
|
19702
|
+
var ContentTile = ContentTileMain;
|
|
19641
19703
|
ContentTile.Root = ContentTileRoot;
|
|
19642
19704
|
ContentTile.Media = ContentTileMedia;
|
|
19643
19705
|
ContentTile.Content = ContentTileContent;
|
|
@@ -19673,16 +19735,16 @@ var useSectionHeaderStyles = function () {
|
|
|
19673
19735
|
var theme = useWllSdk().theme;
|
|
19674
19736
|
return StyleSheet$1.create({
|
|
19675
19737
|
sectionHeader: {
|
|
19676
|
-
marginBottom:
|
|
19738
|
+
marginBottom: useResponsiveValue(theme.sizes.lg, theme.sizes.xxs, isDesktop, isTablet)
|
|
19677
19739
|
},
|
|
19678
19740
|
sectionTitle: {
|
|
19679
|
-
fontSize:
|
|
19680
|
-
marginBottom:
|
|
19741
|
+
fontSize: useResponsiveValue(theme.sizes.xxxl, theme.sizes.xl, isDesktop, isTablet),
|
|
19742
|
+
marginBottom: useResponsiveValue(theme.sizes.xxs, theme.sizes.xxxs, isDesktop, isTablet),
|
|
19681
19743
|
fontWeight: '700',
|
|
19682
19744
|
color: theme.text
|
|
19683
19745
|
},
|
|
19684
19746
|
sectionDescription: {
|
|
19685
|
-
fontSize:
|
|
19747
|
+
fontSize: useResponsiveValue(theme.sizes.xxl, theme.sizes.md, isDesktop, isTablet),
|
|
19686
19748
|
color: theme.alphaDerivedText[80]
|
|
19687
19749
|
}
|
|
19688
19750
|
});
|
|
@@ -19772,7 +19834,7 @@ var useCarouselStyles = function (buttonSize, slideWidth) {
|
|
|
19772
19834
|
indicators: {
|
|
19773
19835
|
flexDirection: 'row',
|
|
19774
19836
|
justifyContent: 'center',
|
|
19775
|
-
marginTop:
|
|
19837
|
+
marginTop: useResponsiveValue(theme.sizes.xxl, theme.sizes.sm, isDesktop, isTablet)
|
|
19776
19838
|
},
|
|
19777
19839
|
indicator: {
|
|
19778
19840
|
width: 8,
|
|
@@ -19836,7 +19898,7 @@ var Carousel = function (_a) {
|
|
|
19836
19898
|
indicators: {
|
|
19837
19899
|
flexDirection: 'row',
|
|
19838
19900
|
justifyContent: 'center',
|
|
19839
|
-
marginTop:
|
|
19901
|
+
marginTop: useResponsiveValue(theme.sizes.xxl, theme.sizes.sm, isDesktop, isTablet)
|
|
19840
19902
|
}
|
|
19841
19903
|
});
|
|
19842
19904
|
return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement(SectionHeader, {
|
|
@@ -20063,12 +20125,13 @@ var useSectionStyles = function () {
|
|
|
20063
20125
|
var _a = useResponsive$1(),
|
|
20064
20126
|
isDesktop = _a.isDesktop,
|
|
20065
20127
|
isTablet = _a.isTablet;
|
|
20128
|
+
var theme = useWllSdk().theme;
|
|
20066
20129
|
return StyleSheet$1.create({
|
|
20067
20130
|
section: {
|
|
20068
20131
|
width: '100%',
|
|
20069
20132
|
maxWidth: MAX_WIDTH,
|
|
20070
20133
|
marginHorizontal: 'auto',
|
|
20071
|
-
marginBottom:
|
|
20134
|
+
marginBottom: useResponsiveValue(theme.sizes.xxxxxl, theme.sizes.xxxxl, isDesktop, isTablet)
|
|
20072
20135
|
}
|
|
20073
20136
|
});
|
|
20074
20137
|
};
|
|
@@ -20168,7 +20231,7 @@ var usePointsTileStyles = function (isFullSize) {
|
|
|
20168
20231
|
var theme = useWllSdk().theme;
|
|
20169
20232
|
return StyleSheet$1.create({
|
|
20170
20233
|
container: {
|
|
20171
|
-
paddingHorizontal:
|
|
20234
|
+
paddingHorizontal: useResponsiveValue(theme.sizes.sm, theme.sizes.xxs, isDesktop, isTablet),
|
|
20172
20235
|
width: '100%',
|
|
20173
20236
|
flexDirection: isFullSize ? 'row' : 'row-reverse',
|
|
20174
20237
|
alignItems: isFullSize ? 'flex-start' : 'center',
|
|
@@ -20179,7 +20242,7 @@ var usePointsTileStyles = function (isFullSize) {
|
|
|
20179
20242
|
width: isFullSize ? '100%' : 'auto'
|
|
20180
20243
|
},
|
|
20181
20244
|
suffix: {
|
|
20182
|
-
fontSize:
|
|
20245
|
+
fontSize: useResponsiveValue(theme.sizes.xl, theme.sizes.md, isDesktop, isTablet),
|
|
20183
20246
|
color: theme.primary
|
|
20184
20247
|
},
|
|
20185
20248
|
pointsWithSuffix: {
|
|
@@ -20190,7 +20253,7 @@ var usePointsTileStyles = function (isFullSize) {
|
|
|
20190
20253
|
imageContainer: {
|
|
20191
20254
|
width: isFullSize ? '100%' : 57,
|
|
20192
20255
|
height: isFullSize ? '50%' : 57,
|
|
20193
|
-
marginBottom: isFullSize ?
|
|
20256
|
+
marginBottom: isFullSize ? useResponsiveValue(theme.sizes.sm, theme.sizes.xxs, isDesktop, isTablet) : 0,
|
|
20194
20257
|
backgroundColor: isFullSize ? theme.alphaDerivedPrimary[20] : theme.surface,
|
|
20195
20258
|
justifyContent: 'center',
|
|
20196
20259
|
alignItems: 'center',
|
|
@@ -20205,30 +20268,7 @@ var usePointsTileStyles = function (isFullSize) {
|
|
|
20205
20268
|
});
|
|
20206
20269
|
};
|
|
20207
20270
|
|
|
20208
|
-
var
|
|
20209
|
-
var tile = _a.tile;
|
|
20210
|
-
var isFullSize = useTileSize(tile).isFullSize;
|
|
20211
|
-
var styles = usePointsTileStyles(isFullSize);
|
|
20212
|
-
return /*#__PURE__*/React__namespace.createElement(BaseTile, {
|
|
20213
|
-
tile: tile
|
|
20214
|
-
}, isFullSize && /*#__PURE__*/React__namespace.createElement(PointsTile.Image, {
|
|
20215
|
-
isFullSize: isFullSize
|
|
20216
|
-
}), /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
20217
|
-
style: styles.container
|
|
20218
|
-
}, !isFullSize && /*#__PURE__*/React__namespace.createElement(PointsTile.Image, {
|
|
20219
|
-
isFullSize: isFullSize
|
|
20220
|
-
}), /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
20221
|
-
style: styles.contentContainer
|
|
20222
|
-
}, /*#__PURE__*/React__namespace.createElement(PointsTile.Title, null), /*#__PURE__*/React__namespace.createElement(PointsTile.Points, null))));
|
|
20223
|
-
};
|
|
20224
|
-
var PointsTileTitle = function () {
|
|
20225
|
-
var configuration = useTileContext().configuration;
|
|
20226
|
-
var title = configuration.title;
|
|
20227
|
-
return /*#__PURE__*/React__namespace.createElement(Text, {
|
|
20228
|
-
variant: "eyebrow"
|
|
20229
|
-
}, title);
|
|
20230
|
-
};
|
|
20231
|
-
var PointsTilePoints = function () {
|
|
20271
|
+
var PointsTileFormattedPoints = function () {
|
|
20232
20272
|
var styles = usePointsTileStyles();
|
|
20233
20273
|
var configuration = useTileContext().configuration;
|
|
20234
20274
|
var _a = configuration,
|
|
@@ -20240,21 +20280,28 @@ var PointsTilePoints = function () {
|
|
|
20240
20280
|
if (calculatedPoints === null) return null;
|
|
20241
20281
|
return /*#__PURE__*/React__namespace.createElement(Text, {
|
|
20242
20282
|
variant: "caption"
|
|
20243
|
-
}, prefix !== null && prefix !== void 0 ? prefix : '', /*#__PURE__*/React__namespace.createElement(
|
|
20244
|
-
style: styles.pointsWithSuffix
|
|
20245
|
-
}, calculatedPoints, /*#__PURE__*/React__namespace.createElement(Text, {
|
|
20283
|
+
}, prefix !== null && prefix !== void 0 ? prefix : '', /*#__PURE__*/React__namespace.createElement(Row, null, calculatedPoints, /*#__PURE__*/React__namespace.createElement(Text, {
|
|
20246
20284
|
style: styles.suffix
|
|
20247
20285
|
}, suffix !== null && suffix !== void 0 ? suffix : 'pts')));
|
|
20248
20286
|
};
|
|
20249
|
-
|
|
20287
|
+
|
|
20288
|
+
var PointsTileTitle = function () {
|
|
20289
|
+
var configuration = useTileContext().configuration;
|
|
20290
|
+
var title = configuration.title;
|
|
20291
|
+
return /*#__PURE__*/React$1.createElement(Text, {
|
|
20292
|
+
variant: "eyebrow"
|
|
20293
|
+
}, title);
|
|
20294
|
+
};
|
|
20295
|
+
|
|
20296
|
+
var PointsTileMedia = function (_a) {
|
|
20250
20297
|
var isFullSize = _a.isFullSize;
|
|
20251
20298
|
var configuration = useTileContext().configuration;
|
|
20252
20299
|
var artworkUrl = configuration.artworkUrl;
|
|
20253
20300
|
var styles = usePointsTileStyles(isFullSize);
|
|
20254
20301
|
if (!artworkUrl) return null;
|
|
20255
|
-
return /*#__PURE__*/
|
|
20302
|
+
return /*#__PURE__*/React$1.createElement(View$2, {
|
|
20256
20303
|
style: styles.imageContainer
|
|
20257
|
-
}, /*#__PURE__*/
|
|
20304
|
+
}, /*#__PURE__*/React$1.createElement(Image$2, {
|
|
20258
20305
|
source: {
|
|
20259
20306
|
uri: artworkUrl
|
|
20260
20307
|
},
|
|
@@ -20262,9 +20309,26 @@ var PointsTileImage = function (_a) {
|
|
|
20262
20309
|
resizeMode: "contain"
|
|
20263
20310
|
}));
|
|
20264
20311
|
};
|
|
20312
|
+
|
|
20313
|
+
var PointsTile = function (_a) {
|
|
20314
|
+
var tile = _a.tile;
|
|
20315
|
+
var isFullSize = useTileSize(tile).isFullSize;
|
|
20316
|
+
var styles = usePointsTileStyles(isFullSize);
|
|
20317
|
+
return /*#__PURE__*/React$1.createElement(BaseTile, {
|
|
20318
|
+
tile: tile
|
|
20319
|
+
}, isFullSize && /*#__PURE__*/React$1.createElement(PointsTile.Media, {
|
|
20320
|
+
isFullSize: isFullSize
|
|
20321
|
+
}), /*#__PURE__*/React$1.createElement(View$2, {
|
|
20322
|
+
style: styles.container
|
|
20323
|
+
}, !isFullSize && /*#__PURE__*/React$1.createElement(PointsTile.Media, {
|
|
20324
|
+
isFullSize: isFullSize
|
|
20325
|
+
}), /*#__PURE__*/React$1.createElement(View$2, {
|
|
20326
|
+
style: styles.contentContainer
|
|
20327
|
+
}, /*#__PURE__*/React$1.createElement(PointsTile.Title, null), /*#__PURE__*/React$1.createElement(PointsTile.Points, null))));
|
|
20328
|
+
};
|
|
20265
20329
|
PointsTile.Title = PointsTileTitle;
|
|
20266
|
-
PointsTile.Points =
|
|
20267
|
-
PointsTile.
|
|
20330
|
+
PointsTile.Points = PointsTileFormattedPoints;
|
|
20331
|
+
PointsTile.Media = PointsTileMedia;
|
|
20268
20332
|
|
|
20269
20333
|
var useRewardCategoryTileStyles = function () {
|
|
20270
20334
|
var _a = useResponsive$1(),
|
|
@@ -20284,8 +20348,8 @@ var useRewardCategoryTileStyles = function () {
|
|
|
20284
20348
|
backgroundColor: theme.primary
|
|
20285
20349
|
},
|
|
20286
20350
|
headerText: {
|
|
20287
|
-
fontSize:
|
|
20288
|
-
paddingHorizontal:
|
|
20351
|
+
fontSize: useResponsiveValue(theme.sizes.lg, theme.sizes.sm, isDesktop, isTablet),
|
|
20352
|
+
paddingHorizontal: useResponsiveValue(theme.sizes.xxxxl, 20, isDesktop, isTablet),
|
|
20289
20353
|
color: theme.primaryText
|
|
20290
20354
|
},
|
|
20291
20355
|
background: {
|
|
@@ -20297,13 +20361,6 @@ var useRewardCategoryTileStyles = function () {
|
|
|
20297
20361
|
});
|
|
20298
20362
|
};
|
|
20299
20363
|
|
|
20300
|
-
var RewardCategoryTile = function (_a) {
|
|
20301
|
-
var tile = _a.tile;
|
|
20302
|
-
if (!tile) return null;
|
|
20303
|
-
return /*#__PURE__*/React__namespace.createElement(BaseTile, {
|
|
20304
|
-
tile: tile
|
|
20305
|
-
}, /*#__PURE__*/React__namespace.createElement(RewardCategoryTile.Header, null), /*#__PURE__*/React__namespace.createElement(RewardCategoryTile.Background, null));
|
|
20306
|
-
};
|
|
20307
20364
|
var RewardCategoryHeader = function () {
|
|
20308
20365
|
var styles = useRewardCategoryTileStyles();
|
|
20309
20366
|
var theme = useWllSdk().theme;
|
|
@@ -20312,11 +20369,11 @@ var RewardCategoryHeader = function () {
|
|
|
20312
20369
|
showName = _a.showName,
|
|
20313
20370
|
name = _a.name;
|
|
20314
20371
|
if (!showName || !name) return null;
|
|
20315
|
-
return /*#__PURE__*/
|
|
20372
|
+
return /*#__PURE__*/React$1.createElement(View$2, {
|
|
20316
20373
|
style: [styles.header, {
|
|
20317
20374
|
backgroundColor: theme.primary
|
|
20318
20375
|
}]
|
|
20319
|
-
}, /*#__PURE__*/
|
|
20376
|
+
}, /*#__PURE__*/React$1.createElement(Text, {
|
|
20320
20377
|
style: [styles.headerText, {
|
|
20321
20378
|
color: theme.primaryText
|
|
20322
20379
|
}],
|
|
@@ -20324,30 +20381,56 @@ var RewardCategoryHeader = function () {
|
|
|
20324
20381
|
numberOfLines: 1
|
|
20325
20382
|
}, name));
|
|
20326
20383
|
};
|
|
20327
|
-
|
|
20384
|
+
|
|
20385
|
+
var RewardCategoryMedia = function () {
|
|
20328
20386
|
var styles = useRewardCategoryTileStyles();
|
|
20329
20387
|
var configuration = useTileContext().configuration;
|
|
20330
20388
|
var artworkUrl = configuration.artworkUrl;
|
|
20331
20389
|
if (!artworkUrl) return null;
|
|
20332
|
-
return /*#__PURE__*/
|
|
20390
|
+
return /*#__PURE__*/React$1.createElement(ProgressiveImage, {
|
|
20333
20391
|
source: {
|
|
20334
20392
|
uri: artworkUrl
|
|
20335
20393
|
},
|
|
20336
20394
|
style: styles.background
|
|
20337
20395
|
});
|
|
20338
20396
|
};
|
|
20397
|
+
|
|
20398
|
+
var RewardCategoryTile = function (_a) {
|
|
20399
|
+
var tile = _a.tile;
|
|
20400
|
+
if (!tile) return null;
|
|
20401
|
+
return /*#__PURE__*/React__namespace.createElement(BaseTile, {
|
|
20402
|
+
tile: tile
|
|
20403
|
+
}, /*#__PURE__*/React__namespace.createElement(RewardCategoryTile.Header, null), /*#__PURE__*/React__namespace.createElement(RewardCategoryTile.Media, null));
|
|
20404
|
+
};
|
|
20339
20405
|
RewardCategoryTile.Header = RewardCategoryHeader;
|
|
20340
|
-
RewardCategoryTile.
|
|
20406
|
+
RewardCategoryTile.Media = RewardCategoryMedia;
|
|
20407
|
+
|
|
20408
|
+
var RewardTileChevron = function () {
|
|
20409
|
+
var theme = useWllSdk().theme;
|
|
20410
|
+
return /*#__PURE__*/React$1.createElement(Icon, {
|
|
20411
|
+
name: "ChevronRight",
|
|
20412
|
+
color: theme.derivedSurfaceText[20]
|
|
20413
|
+
});
|
|
20414
|
+
};
|
|
20415
|
+
|
|
20416
|
+
var RewardTileSummary = function () {
|
|
20417
|
+
var configuration = useTileContext().configuration;
|
|
20418
|
+
var summary = configuration.summary;
|
|
20419
|
+
if (!summary) return null;
|
|
20420
|
+
return /*#__PURE__*/React$1.createElement(Text, {
|
|
20421
|
+
variant: "body"
|
|
20422
|
+
}, summary);
|
|
20423
|
+
};
|
|
20341
20424
|
|
|
20342
20425
|
var useRewardTileStyles = function () {
|
|
20343
20426
|
var _a = useResponsive$1(),
|
|
20344
20427
|
isDesktop = _a.isDesktop,
|
|
20345
20428
|
isTablet = _a.isTablet;
|
|
20429
|
+
var theme = useWllSdk().theme;
|
|
20346
20430
|
return StyleSheet$1.create({
|
|
20347
20431
|
imageContainer: {
|
|
20348
20432
|
width: '100%',
|
|
20349
|
-
|
|
20350
|
-
marginBottom: getResponsiveValue(12, 8, isDesktop, isTablet)
|
|
20433
|
+
marginBottom: useResponsiveValue(theme.sizes.sm, theme.sizes.xxs, isDesktop, isTablet)
|
|
20351
20434
|
},
|
|
20352
20435
|
image: {
|
|
20353
20436
|
position: 'absolute',
|
|
@@ -20360,7 +20443,7 @@ var useRewardTileStyles = function () {
|
|
|
20360
20443
|
resizeMode: 'cover'
|
|
20361
20444
|
},
|
|
20362
20445
|
content: {
|
|
20363
|
-
paddingHorizontal:
|
|
20446
|
+
paddingHorizontal: useResponsiveValue(theme.sizes.sm, theme.sizes.xxs, isDesktop, isTablet),
|
|
20364
20447
|
flex: 1
|
|
20365
20448
|
},
|
|
20366
20449
|
footer: {
|
|
@@ -20372,103 +20455,103 @@ var useRewardTileStyles = function () {
|
|
|
20372
20455
|
justifyContent: 'center'
|
|
20373
20456
|
},
|
|
20374
20457
|
suffix: {
|
|
20375
|
-
|
|
20458
|
+
color: theme.primary,
|
|
20459
|
+
fontSize: useResponsiveValue(theme.sizes.xl, theme.sizes.md, isDesktop, isTablet)
|
|
20376
20460
|
}
|
|
20377
20461
|
});
|
|
20378
20462
|
};
|
|
20379
20463
|
|
|
20380
|
-
var
|
|
20381
|
-
var
|
|
20382
|
-
return /*#__PURE__*/React__namespace.createElement(BaseTile, {
|
|
20383
|
-
tile: tile
|
|
20384
|
-
}, /*#__PURE__*/React__namespace.createElement(RewardTile.Media, null), /*#__PURE__*/React__namespace.createElement(RewardTile.Content, null, /*#__PURE__*/React__namespace.createElement(RowHeader, null, /*#__PURE__*/React__namespace.createElement(RewardTile.Title, null), /*#__PURE__*/React__namespace.createElement(RewardTile.Chevron, null)), /*#__PURE__*/React__namespace.createElement(RewardTile.Description, null), /*#__PURE__*/React__namespace.createElement(RewardTile.Points, null)));
|
|
20385
|
-
};
|
|
20386
|
-
var RewardTileMedia = function () {
|
|
20464
|
+
var RewardTileMedia = function (_a) {
|
|
20465
|
+
var isArtworkOnly = _a.isArtworkOnly;
|
|
20387
20466
|
var styles = useRewardTileStyles();
|
|
20388
20467
|
var configuration = useTileContext().configuration;
|
|
20389
|
-
var
|
|
20390
|
-
|
|
20391
|
-
|
|
20392
|
-
|
|
20393
|
-
|
|
20394
|
-
|
|
20395
|
-
|
|
20396
|
-
|
|
20397
|
-
|
|
20398
|
-
|
|
20399
|
-
|
|
20400
|
-
|
|
20401
|
-
|
|
20402
|
-
|
|
20403
|
-
|
|
20404
|
-
|
|
20405
|
-
|
|
20406
|
-
|
|
20407
|
-
|
|
20408
|
-
|
|
20409
|
-
};
|
|
20410
|
-
var RewardTileDescription = function () {
|
|
20411
|
-
var configuration = useTileContext().configuration;
|
|
20412
|
-
var reward = configuration;
|
|
20413
|
-
if (!(reward === null || reward === void 0 ? void 0 : reward.summary)) return null;
|
|
20414
|
-
return /*#__PURE__*/React__namespace.createElement(Text, {
|
|
20415
|
-
variant: "body"
|
|
20416
|
-
}, reward.summary);
|
|
20468
|
+
var _b = configuration,
|
|
20469
|
+
artworkUrl = _b.artworkUrl,
|
|
20470
|
+
_c = _b.showArtwork,
|
|
20471
|
+
showArtwork = _c === void 0 ? true : _c;
|
|
20472
|
+
if (!artworkUrl || !showArtwork) return null;
|
|
20473
|
+
var containerStyle = {
|
|
20474
|
+
flexBasis: isArtworkOnly ? '100%' : '50%'
|
|
20475
|
+
};
|
|
20476
|
+
return (
|
|
20477
|
+
/*#__PURE__*/
|
|
20478
|
+
// @ts-ignore: We are using percentage values for flexBasis, which is valid in React Native but TypeScript expects a number.
|
|
20479
|
+
React$1.createElement(View$2, {
|
|
20480
|
+
style: [styles.imageContainer, containerStyle]
|
|
20481
|
+
}, /*#__PURE__*/React$1.createElement(ProgressiveImage, {
|
|
20482
|
+
source: {
|
|
20483
|
+
uri: artworkUrl
|
|
20484
|
+
},
|
|
20485
|
+
style: styles.image
|
|
20486
|
+
}))
|
|
20487
|
+
);
|
|
20417
20488
|
};
|
|
20489
|
+
|
|
20418
20490
|
var RewardTilePoints = function () {
|
|
20419
20491
|
var styles = useRewardTileStyles();
|
|
20420
20492
|
var configuration = useTileContext().configuration;
|
|
20421
|
-
var
|
|
20422
|
-
|
|
20423
|
-
|
|
20424
|
-
|
|
20425
|
-
|
|
20426
|
-
|
|
20427
|
-
|
|
20493
|
+
var _a = configuration,
|
|
20494
|
+
showPrice = _a.showPrice,
|
|
20495
|
+
price = _a.price,
|
|
20496
|
+
pointsMultiplier = _a.pointsMultiplier,
|
|
20497
|
+
pointsPrefix = _a.pointsPrefix,
|
|
20498
|
+
pointsSuffix = _a.pointsSuffix;
|
|
20499
|
+
var calculatedPoints = price !== undefined ? price * (Number(pointsMultiplier) || 1) : null;
|
|
20500
|
+
if (!showPrice || calculatedPoints === null) return null;
|
|
20501
|
+
return /*#__PURE__*/React$1.createElement(Text, {
|
|
20428
20502
|
variant: "caption",
|
|
20429
20503
|
style: styles.footer
|
|
20430
|
-
},
|
|
20504
|
+
}, pointsPrefix, /*#__PURE__*/React$1.createElement(View$2, {
|
|
20431
20505
|
style: styles.pointsContainer
|
|
20432
|
-
}, calculatedPoints, /*#__PURE__*/
|
|
20433
|
-
style:
|
|
20434
|
-
|
|
20435
|
-
}]
|
|
20436
|
-
}, reward.pointsSuffix)));
|
|
20506
|
+
}, calculatedPoints, /*#__PURE__*/React$1.createElement(Text, {
|
|
20507
|
+
style: styles.suffix
|
|
20508
|
+
}, pointsSuffix)));
|
|
20437
20509
|
};
|
|
20438
|
-
|
|
20439
|
-
|
|
20440
|
-
var
|
|
20441
|
-
|
|
20442
|
-
|
|
20443
|
-
|
|
20510
|
+
|
|
20511
|
+
var RewardTileTitle = function () {
|
|
20512
|
+
var configuration = useTileContext().configuration;
|
|
20513
|
+
var name = configuration.name;
|
|
20514
|
+
if (!name) return null;
|
|
20515
|
+
return /*#__PURE__*/React$1.createElement(Text, {
|
|
20516
|
+
variant: "title",
|
|
20517
|
+
ellipsizeMode: "tail",
|
|
20518
|
+
numberOfLines: 1
|
|
20519
|
+
}, name);
|
|
20444
20520
|
};
|
|
20445
|
-
|
|
20446
|
-
|
|
20447
|
-
|
|
20448
|
-
|
|
20449
|
-
|
|
20450
|
-
|
|
20521
|
+
|
|
20522
|
+
var RewardTile = function (_a) {
|
|
20523
|
+
var tile = _a.tile;
|
|
20524
|
+
var configuration = tile.configuration;
|
|
20525
|
+
var showDetails = configuration.showDetails;
|
|
20526
|
+
return /*#__PURE__*/React$1.createElement(BaseTile, {
|
|
20527
|
+
tile: tile
|
|
20528
|
+
}, /*#__PURE__*/React$1.createElement(RewardTile.Media, {
|
|
20529
|
+
isArtworkOnly: !showDetails
|
|
20530
|
+
}), /*#__PURE__*/React$1.createElement(Column, null, /*#__PURE__*/React$1.createElement(Row, {
|
|
20531
|
+
justify: "between",
|
|
20532
|
+
align: "center"
|
|
20533
|
+
}, /*#__PURE__*/React$1.createElement(RewardTile.Title, null), /*#__PURE__*/React$1.createElement(RewardTile.Chevron, null)), /*#__PURE__*/React$1.createElement(RewardTile.Summary, null), /*#__PURE__*/React$1.createElement(RewardTile.Points, null)));
|
|
20451
20534
|
};
|
|
20452
20535
|
RewardTile.Media = RewardTileMedia;
|
|
20453
20536
|
RewardTile.Title = RewardTileTitle;
|
|
20454
|
-
RewardTile.
|
|
20537
|
+
RewardTile.Summary = RewardTileSummary;
|
|
20455
20538
|
RewardTile.Points = RewardTilePoints;
|
|
20456
20539
|
RewardTile.Chevron = RewardTileChevron;
|
|
20457
|
-
RewardTile.Content = RewardTileContent;
|
|
20458
20540
|
|
|
20459
20541
|
var useTierTileStyles = function () {
|
|
20460
20542
|
var _a = useResponsive$1(),
|
|
20461
20543
|
isDesktop = _a.isDesktop,
|
|
20462
20544
|
isTablet = _a.isTablet;
|
|
20545
|
+
var theme = useWllSdk().theme;
|
|
20463
20546
|
return StyleSheet$1.create({
|
|
20464
20547
|
header: {
|
|
20465
20548
|
flexBasis: '50%',
|
|
20466
20549
|
width: '100%',
|
|
20467
20550
|
overflow: 'hidden',
|
|
20468
|
-
marginBottom:
|
|
20551
|
+
marginBottom: useResponsiveValue(theme.sizes.sm, theme.sizes.xxs, isDesktop, isTablet)
|
|
20469
20552
|
},
|
|
20470
20553
|
title: {
|
|
20471
|
-
marginBottom:
|
|
20554
|
+
marginBottom: useResponsiveValue(theme.sizes.xxs, theme.sizes.xxxs, isDesktop, isTablet)
|
|
20472
20555
|
},
|
|
20473
20556
|
smallImageContainer: {
|
|
20474
20557
|
width: 48,
|
|
@@ -20712,14 +20795,15 @@ var Column = function (_a) {
|
|
|
20712
20795
|
var _d = useResponsive$1(),
|
|
20713
20796
|
isDesktop = _d.isDesktop,
|
|
20714
20797
|
isTablet = _d.isTablet;
|
|
20715
|
-
|
|
20798
|
+
var theme = useWllSdk().theme;
|
|
20799
|
+
return /*#__PURE__*/React$1.createElement(View$2, {
|
|
20716
20800
|
style: [{
|
|
20717
20801
|
flex: 1,
|
|
20718
20802
|
flexDirection: 'column',
|
|
20719
20803
|
justifyContent: justifyMap[justify],
|
|
20720
20804
|
alignItems: alignMap[align],
|
|
20721
|
-
paddingHorizontal:
|
|
20722
|
-
paddingBottom:
|
|
20805
|
+
paddingHorizontal: useResponsiveValue(theme.sizes.sm, theme.sizes.xxs, isDesktop, isTablet),
|
|
20806
|
+
paddingBottom: useResponsiveValue(theme.sizes.sm, theme.sizes.xxs, isDesktop, isTablet)
|
|
20723
20807
|
}, style]
|
|
20724
20808
|
}, children);
|
|
20725
20809
|
};
|
|
@@ -20733,7 +20817,7 @@ var Row = function (_a) {
|
|
|
20733
20817
|
_d = _a.direction,
|
|
20734
20818
|
direction = _d === void 0 ? 'row' : _d,
|
|
20735
20819
|
style = _a.style;
|
|
20736
|
-
return /*#__PURE__*/React.createElement(View$2, {
|
|
20820
|
+
return /*#__PURE__*/React$1.createElement(View$2, {
|
|
20737
20821
|
style: [{
|
|
20738
20822
|
flexDirection: direction,
|
|
20739
20823
|
justifyContent: justifyMap[justify],
|
|
@@ -20742,6 +20826,15 @@ var Row = function (_a) {
|
|
|
20742
20826
|
}, children);
|
|
20743
20827
|
};
|
|
20744
20828
|
|
|
20829
|
+
var FlexBox = function (_a) {
|
|
20830
|
+
var children = _a.children;
|
|
20831
|
+
return /*#__PURE__*/React$1.createElement(View$2, {
|
|
20832
|
+
style: {
|
|
20833
|
+
flex: 1
|
|
20834
|
+
}
|
|
20835
|
+
}, children);
|
|
20836
|
+
};
|
|
20837
|
+
|
|
20745
20838
|
var Stack = function (_a) {
|
|
20746
20839
|
var children = _a.children,
|
|
20747
20840
|
_b = _a.justify,
|
|
@@ -20772,7 +20865,8 @@ var alignMap = {
|
|
|
20772
20865
|
start: 'flex-start',
|
|
20773
20866
|
end: 'flex-end',
|
|
20774
20867
|
center: 'center',
|
|
20775
|
-
stretch: 'stretch'
|
|
20868
|
+
stretch: 'stretch',
|
|
20869
|
+
baseline: 'baseline'
|
|
20776
20870
|
};
|
|
20777
20871
|
|
|
20778
20872
|
var Reward = /** @class */function () {
|
|
@@ -20780,8 +20874,8 @@ var Reward = /** @class */function () {
|
|
|
20780
20874
|
return Reward;
|
|
20781
20875
|
}();
|
|
20782
20876
|
|
|
20877
|
+
exports.BadgeTile = BadgeTile;
|
|
20783
20878
|
exports.BadgeTileConfig = BadgeTileConfig;
|
|
20784
|
-
exports.BadgeTileUpdated = BadgeTile;
|
|
20785
20879
|
exports.BannerTile = BannerTile;
|
|
20786
20880
|
exports.BannerTileConfig = BannerTileConfig;
|
|
20787
20881
|
exports.BaseBanner = BaseBanner;
|
|
@@ -20792,6 +20886,7 @@ exports.Column = Column;
|
|
|
20792
20886
|
exports.Content = Column$1;
|
|
20793
20887
|
exports.ContentTile = ContentTile;
|
|
20794
20888
|
exports.ContentTileConfig = ContentTileConfig;
|
|
20889
|
+
exports.FlexBox = FlexBox;
|
|
20795
20890
|
exports.Grid = Grid;
|
|
20796
20891
|
exports.Group = Group;
|
|
20797
20892
|
exports.Icon = Icon;
|