@wlloyalty/wll-react-sdk 1.0.7 → 1.0.8
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 +464 -409
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var Color = require('color');
|
|
5
|
+
var LucideIcons = require('lucide-react');
|
|
6
|
+
|
|
7
|
+
function _interopNamespaceDefault(e) {
|
|
8
|
+
var n = Object.create(null);
|
|
9
|
+
if (e) {
|
|
10
|
+
Object.keys(e).forEach(function (k) {
|
|
11
|
+
if (k !== 'default') {
|
|
12
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
13
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return e[k]; }
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
n.default = e;
|
|
21
|
+
return Object.freeze(n);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
25
|
+
var LucideIcons__namespace = /*#__PURE__*/_interopNamespaceDefault(LucideIcons);
|
|
6
26
|
|
|
7
27
|
function _typeof$1(o) {
|
|
8
28
|
"@babel/helpers - typeof";
|
|
@@ -4507,7 +4527,7 @@ var defaultLocale = {
|
|
|
4507
4527
|
direction: 'ltr',
|
|
4508
4528
|
locale: 'en-US'
|
|
4509
4529
|
};
|
|
4510
|
-
var LocaleContext = /*#__PURE__*/createContext(defaultLocale);
|
|
4530
|
+
var LocaleContext = /*#__PURE__*/React.createContext(defaultLocale);
|
|
4511
4531
|
function getLocaleDirection(locale) {
|
|
4512
4532
|
return isLocaleRTL(locale) ? 'rtl' : 'ltr';
|
|
4513
4533
|
}
|
|
@@ -4516,7 +4536,7 @@ function LocaleProvider(props) {
|
|
|
4516
4536
|
locale = props.locale,
|
|
4517
4537
|
children = props.children;
|
|
4518
4538
|
var needsContext = direction || locale;
|
|
4519
|
-
return needsContext ? /*#__PURE__*/
|
|
4539
|
+
return needsContext ? /*#__PURE__*/React.createElement(LocaleContext.Provider, {
|
|
4520
4540
|
children: children,
|
|
4521
4541
|
value: {
|
|
4522
4542
|
direction: locale ? getLocaleDirection(locale) : direction,
|
|
@@ -4525,7 +4545,7 @@ function LocaleProvider(props) {
|
|
|
4525
4545
|
}) : children;
|
|
4526
4546
|
}
|
|
4527
4547
|
function useLocaleContext() {
|
|
4528
|
-
return useContext(LocaleContext);
|
|
4548
|
+
return React.useContext(LocaleContext);
|
|
4529
4549
|
}
|
|
4530
4550
|
|
|
4531
4551
|
/**
|
|
@@ -4545,10 +4565,10 @@ var createElement = (component, props, options) => {
|
|
|
4545
4565
|
}
|
|
4546
4566
|
var Component = accessibilityComponent || component;
|
|
4547
4567
|
var domProps = createDOMProps$1(Component, props, options);
|
|
4548
|
-
var element = /*#__PURE__*/
|
|
4568
|
+
var element = /*#__PURE__*/React.createElement(Component, domProps);
|
|
4549
4569
|
|
|
4550
4570
|
// Update locale context if element's writing direction prop changes
|
|
4551
|
-
var elementWithLocaleProvider = domProps.dir ? /*#__PURE__*/
|
|
4571
|
+
var elementWithLocaleProvider = domProps.dir ? /*#__PURE__*/React.createElement(LocaleProvider, {
|
|
4552
4572
|
children: element,
|
|
4553
4573
|
direction: domProps.dir,
|
|
4554
4574
|
locale: domProps.lang
|
|
@@ -4755,7 +4775,7 @@ function pick(obj, list) {
|
|
|
4755
4775
|
*
|
|
4756
4776
|
*/
|
|
4757
4777
|
|
|
4758
|
-
var useLayoutEffectImpl = canUseDOM$1 ? useLayoutEffect
|
|
4778
|
+
var useLayoutEffectImpl = canUseDOM$1 ? React.useLayoutEffect : React.useEffect;
|
|
4759
4779
|
var useLayoutEffect = useLayoutEffectImpl;
|
|
4760
4780
|
|
|
4761
4781
|
/**
|
|
@@ -5169,7 +5189,7 @@ function useMergeRefs$1() {
|
|
|
5169
5189
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
5170
5190
|
args[_key] = arguments[_key];
|
|
5171
5191
|
}
|
|
5172
|
-
return
|
|
5192
|
+
return React__namespace.useMemo(() => mergeRefs(...args),
|
|
5173
5193
|
// eslint-disable-next-line
|
|
5174
5194
|
[...args]);
|
|
5175
5195
|
}
|
|
@@ -5185,7 +5205,7 @@ function useMergeRefs$1() {
|
|
|
5185
5205
|
|
|
5186
5206
|
var UNINITIALIZED = typeof Symbol === 'function' && typeof Symbol() === 'symbol' ? Symbol() : Object.freeze({});
|
|
5187
5207
|
function useStable$1(getInitialValue) {
|
|
5188
|
-
var ref =
|
|
5208
|
+
var ref = React__namespace.useRef(UNINITIALIZED);
|
|
5189
5209
|
if (ref.current === UNINITIALIZED) {
|
|
5190
5210
|
ref.current = getInitialValue();
|
|
5191
5211
|
}
|
|
@@ -6233,7 +6253,7 @@ function getResponderNode() {
|
|
|
6233
6253
|
var emptyObject$1 = {};
|
|
6234
6254
|
var idCounter = 0;
|
|
6235
6255
|
function useStable(getInitialValue) {
|
|
6236
|
-
var ref =
|
|
6256
|
+
var ref = React__namespace.useRef(null);
|
|
6237
6257
|
if (ref.current == null) {
|
|
6238
6258
|
ref.current = getInitialValue();
|
|
6239
6259
|
}
|
|
@@ -6244,12 +6264,12 @@ function useResponderEvents(hostRef, config) {
|
|
|
6244
6264
|
config = emptyObject$1;
|
|
6245
6265
|
}
|
|
6246
6266
|
var id = useStable(() => idCounter++);
|
|
6247
|
-
var isAttachedRef =
|
|
6267
|
+
var isAttachedRef = React__namespace.useRef(false);
|
|
6248
6268
|
|
|
6249
6269
|
// This is a separate effects so it doesn't run when the config changes.
|
|
6250
6270
|
// On initial mount, attach global listeners if needed.
|
|
6251
6271
|
// On unmount, remove node potentially attached to the Responder System.
|
|
6252
|
-
|
|
6272
|
+
React__namespace.useEffect(() => {
|
|
6253
6273
|
attachListeners();
|
|
6254
6274
|
return () => {
|
|
6255
6275
|
removeNode(id);
|
|
@@ -6257,7 +6277,7 @@ function useResponderEvents(hostRef, config) {
|
|
|
6257
6277
|
}, [id]);
|
|
6258
6278
|
|
|
6259
6279
|
// Register and unregister with the Responder System as necessary
|
|
6260
|
-
|
|
6280
|
+
React__namespace.useEffect(() => {
|
|
6261
6281
|
var _config = config,
|
|
6262
6282
|
onMoveShouldSetResponder = _config.onMoveShouldSetResponder,
|
|
6263
6283
|
onMoveShouldSetResponderCapture = _config.onMoveShouldSetResponderCapture,
|
|
@@ -6277,10 +6297,10 @@ function useResponderEvents(hostRef, config) {
|
|
|
6277
6297
|
isAttachedRef.current = false;
|
|
6278
6298
|
}
|
|
6279
6299
|
}, [config, hostRef, id]);
|
|
6280
|
-
|
|
6300
|
+
React__namespace.useDebugValue({
|
|
6281
6301
|
isResponder: hostRef.current === getResponderNode()
|
|
6282
6302
|
});
|
|
6283
|
-
|
|
6303
|
+
React__namespace.useDebugValue(config);
|
|
6284
6304
|
}
|
|
6285
6305
|
|
|
6286
6306
|
/**
|
|
@@ -6292,7 +6312,7 @@ function useResponderEvents(hostRef, config) {
|
|
|
6292
6312
|
*
|
|
6293
6313
|
*/
|
|
6294
6314
|
|
|
6295
|
-
var TextAncestorContext = /*#__PURE__*/createContext(false);
|
|
6315
|
+
var TextAncestorContext = /*#__PURE__*/React.createContext(false);
|
|
6296
6316
|
var TextAncestorContext$1 = TextAncestorContext;
|
|
6297
6317
|
|
|
6298
6318
|
var _excluded$b = ["hrefAttrs", "numberOfLines", "onClick", "onLayout", "onPress", "onMoveShouldSetResponder", "onMoveShouldSetResponderCapture", "onResponderEnd", "onResponderGrant", "onResponderMove", "onResponderReject", "onResponderRelease", "onResponderStart", "onResponderTerminate", "onResponderTerminationRequest", "onScrollShouldSetResponder", "onScrollShouldSetResponderCapture", "onSelectionChangeShouldSetResponder", "onSelectionChangeShouldSetResponderCapture", "onStartShouldSetResponder", "onStartShouldSetResponderCapture", "selectable"];
|
|
@@ -6302,7 +6322,7 @@ var forwardPropsList$1 = Object.assign({}, defaultProps, accessibilityProps, cli
|
|
|
6302
6322
|
pointerEvents: true
|
|
6303
6323
|
});
|
|
6304
6324
|
var pickProps$1 = props => pick(props, forwardPropsList$1);
|
|
6305
|
-
var Text$2 = /*#__PURE__*/
|
|
6325
|
+
var Text$2 = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef) => {
|
|
6306
6326
|
var hrefAttrs = props.hrefAttrs,
|
|
6307
6327
|
numberOfLines = props.numberOfLines,
|
|
6308
6328
|
onClick = props.onClick,
|
|
@@ -6329,8 +6349,8 @@ var Text$2 = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {
|
|
|
6329
6349
|
if (selectable != null) {
|
|
6330
6350
|
warnOnce('selectable', 'selectable prop is deprecated. Use styles.userSelect.');
|
|
6331
6351
|
}
|
|
6332
|
-
var hasTextAncestor =
|
|
6333
|
-
var hostRef =
|
|
6352
|
+
var hasTextAncestor = React__namespace.useContext(TextAncestorContext$1);
|
|
6353
|
+
var hostRef = React__namespace.useRef(null);
|
|
6334
6354
|
var _useLocaleContext = useLocaleContext(),
|
|
6335
6355
|
contextDirection = _useLocaleContext.direction;
|
|
6336
6356
|
useElementLayout(hostRef, onLayout);
|
|
@@ -6352,7 +6372,7 @@ var Text$2 = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {
|
|
|
6352
6372
|
onStartShouldSetResponder,
|
|
6353
6373
|
onStartShouldSetResponderCapture
|
|
6354
6374
|
});
|
|
6355
|
-
var handleClick =
|
|
6375
|
+
var handleClick = React__namespace.useCallback(e => {
|
|
6356
6376
|
if (onClick != null) {
|
|
6357
6377
|
onClick(e);
|
|
6358
6378
|
} else if (onPress != null) {
|
|
@@ -6399,7 +6419,7 @@ var Text$2 = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {
|
|
|
6399
6419
|
var element = createElement$1(component, supportedProps, {
|
|
6400
6420
|
writingDirection
|
|
6401
6421
|
});
|
|
6402
|
-
return hasTextAncestor ? element : /*#__PURE__*/
|
|
6422
|
+
return hasTextAncestor ? element : /*#__PURE__*/React__namespace.createElement(TextAncestorContext$1.Provider, {
|
|
6403
6423
|
value: true
|
|
6404
6424
|
}, element);
|
|
6405
6425
|
});
|
|
@@ -6968,25 +6988,25 @@ function getTouchFromResponderEvent(event) {
|
|
|
6968
6988
|
*/
|
|
6969
6989
|
|
|
6970
6990
|
function usePressEvents(hostRef, config) {
|
|
6971
|
-
var pressResponderRef = useRef(null);
|
|
6991
|
+
var pressResponderRef = React.useRef(null);
|
|
6972
6992
|
if (pressResponderRef.current == null) {
|
|
6973
6993
|
pressResponderRef.current = new PressResponder(config);
|
|
6974
6994
|
}
|
|
6975
6995
|
var pressResponder = pressResponderRef.current;
|
|
6976
6996
|
|
|
6977
6997
|
// Re-configure to use the current node and configuration.
|
|
6978
|
-
useEffect(() => {
|
|
6998
|
+
React.useEffect(() => {
|
|
6979
6999
|
pressResponder.configure(config);
|
|
6980
7000
|
}, [config, pressResponder]);
|
|
6981
7001
|
|
|
6982
7002
|
// Reset the `pressResponder` when cleanup needs to occur. This is
|
|
6983
7003
|
// a separate effect because we do not want to rest the responder when `config` changes.
|
|
6984
|
-
useEffect(() => {
|
|
7004
|
+
React.useEffect(() => {
|
|
6985
7005
|
return () => {
|
|
6986
7006
|
pressResponder.reset();
|
|
6987
7007
|
};
|
|
6988
7008
|
}, [pressResponder]);
|
|
6989
|
-
useDebugValue(config);
|
|
7009
|
+
React.useDebugValue(config);
|
|
6990
7010
|
return pressResponder.getEventHandlers();
|
|
6991
7011
|
}
|
|
6992
7012
|
|
|
@@ -6999,7 +7019,7 @@ var forwardPropsList = Object.assign({}, defaultProps, accessibilityProps, click
|
|
|
6999
7019
|
pointerEvents: true
|
|
7000
7020
|
});
|
|
7001
7021
|
var pickProps = props => pick(props, forwardPropsList);
|
|
7002
|
-
var View$1 = /*#__PURE__*/
|
|
7022
|
+
var View$1 = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef) => {
|
|
7003
7023
|
var hrefAttrs = props.hrefAttrs,
|
|
7004
7024
|
onLayout = props.onLayout,
|
|
7005
7025
|
onMoveShouldSetResponder = props.onMoveShouldSetResponder,
|
|
@@ -7020,14 +7040,14 @@ var View$1 = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {
|
|
|
7020
7040
|
onStartShouldSetResponderCapture = props.onStartShouldSetResponderCapture,
|
|
7021
7041
|
rest = _objectWithoutPropertiesLoose(props, _excluded$a);
|
|
7022
7042
|
if (process.env.NODE_ENV !== 'production') {
|
|
7023
|
-
|
|
7043
|
+
React__namespace.Children.toArray(props.children).forEach(item => {
|
|
7024
7044
|
if (typeof item === 'string') {
|
|
7025
7045
|
console.error("Unexpected text node: " + item + ". A text node cannot be a child of a <View>.");
|
|
7026
7046
|
}
|
|
7027
7047
|
});
|
|
7028
7048
|
}
|
|
7029
|
-
var hasTextAncestor =
|
|
7030
|
-
var hostRef =
|
|
7049
|
+
var hasTextAncestor = React__namespace.useContext(TextAncestorContext$1);
|
|
7050
|
+
var hostRef = React__namespace.useRef(null);
|
|
7031
7051
|
var _useLocaleContext = useLocaleContext(),
|
|
7032
7052
|
contextDirection = _useLocaleContext.direction;
|
|
7033
7053
|
useElementLayout(hostRef, onLayout);
|
|
@@ -7136,25 +7156,25 @@ function TouchableOpacity(props, forwardedRef) {
|
|
|
7136
7156
|
rejectResponderTermination = props.rejectResponderTermination,
|
|
7137
7157
|
style = props.style,
|
|
7138
7158
|
rest = _objectWithoutPropertiesLoose(props, _excluded$9);
|
|
7139
|
-
var hostRef = useRef(null);
|
|
7159
|
+
var hostRef = React.useRef(null);
|
|
7140
7160
|
var setRef = useMergeRefs$1(forwardedRef, hostRef);
|
|
7141
|
-
var _useState = useState('0s'),
|
|
7161
|
+
var _useState = React.useState('0s'),
|
|
7142
7162
|
duration = _useState[0],
|
|
7143
7163
|
setDuration = _useState[1];
|
|
7144
|
-
var _useState2 = useState(null),
|
|
7164
|
+
var _useState2 = React.useState(null),
|
|
7145
7165
|
opacityOverride = _useState2[0],
|
|
7146
7166
|
setOpacityOverride = _useState2[1];
|
|
7147
|
-
var setOpacityTo = useCallback((value, duration) => {
|
|
7167
|
+
var setOpacityTo = React.useCallback((value, duration) => {
|
|
7148
7168
|
setOpacityOverride(value);
|
|
7149
7169
|
setDuration(duration ? duration / 1000 + "s" : '0s');
|
|
7150
7170
|
}, [setOpacityOverride, setDuration]);
|
|
7151
|
-
var setOpacityActive = useCallback(duration => {
|
|
7171
|
+
var setOpacityActive = React.useCallback(duration => {
|
|
7152
7172
|
setOpacityTo(activeOpacity !== null && activeOpacity !== void 0 ? activeOpacity : 0.2, duration);
|
|
7153
7173
|
}, [activeOpacity, setOpacityTo]);
|
|
7154
|
-
var setOpacityInactive = useCallback(duration => {
|
|
7174
|
+
var setOpacityInactive = React.useCallback(duration => {
|
|
7155
7175
|
setOpacityTo(null, duration);
|
|
7156
7176
|
}, [setOpacityTo]);
|
|
7157
|
-
var pressConfig = useMemo(() => ({
|
|
7177
|
+
var pressConfig = React.useMemo(() => ({
|
|
7158
7178
|
cancelable: !rejectResponderTermination,
|
|
7159
7179
|
disabled,
|
|
7160
7180
|
delayLongPress,
|
|
@@ -7177,7 +7197,7 @@ function TouchableOpacity(props, forwardedRef) {
|
|
|
7177
7197
|
}
|
|
7178
7198
|
}), [delayLongPress, delayPressIn, delayPressOut, disabled, onLongPress, onPress, onPressIn, onPressOut, rejectResponderTermination, setOpacityActive, setOpacityInactive]);
|
|
7179
7199
|
var pressEventHandlers = usePressEvents(hostRef, pressConfig);
|
|
7180
|
-
return /*#__PURE__*/
|
|
7200
|
+
return /*#__PURE__*/React__namespace.createElement(View$2, _extends$1({}, rest, pressEventHandlers, {
|
|
7181
7201
|
accessibilityDisabled: disabled,
|
|
7182
7202
|
focusable: !disabled && focusable !== false,
|
|
7183
7203
|
pointerEvents: disabled ? 'box-none' : undefined,
|
|
@@ -7200,7 +7220,7 @@ var styles$s = StyleSheet$1.create({
|
|
|
7200
7220
|
touchAction: 'manipulation'
|
|
7201
7221
|
}
|
|
7202
7222
|
});
|
|
7203
|
-
var MemoedTouchableOpacity = /*#__PURE__*/
|
|
7223
|
+
var MemoedTouchableOpacity = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(TouchableOpacity));
|
|
7204
7224
|
MemoedTouchableOpacity.displayName = 'TouchableOpacity';
|
|
7205
7225
|
var TouchableOpacity$1 = MemoedTouchableOpacity;
|
|
7206
7226
|
|
|
@@ -7289,7 +7309,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
7289
7309
|
|
|
7290
7310
|
var baseUrl = 'https://api.staging.core.wlloyalty.net/v1';
|
|
7291
7311
|
var useCreateRequestOptions = function (config) {
|
|
7292
|
-
return useCallback(function (options) {
|
|
7312
|
+
return React.useCallback(function (options) {
|
|
7293
7313
|
if (options === void 0) {
|
|
7294
7314
|
options = {};
|
|
7295
7315
|
}
|
|
@@ -7306,7 +7326,7 @@ var useCreateRequestOptions = function (config) {
|
|
|
7306
7326
|
};
|
|
7307
7327
|
var useMakeRequest = function (config) {
|
|
7308
7328
|
var createRequestOptions = useCreateRequestOptions(config);
|
|
7309
|
-
return useCallback(function (url) {
|
|
7329
|
+
return React.useCallback(function (url) {
|
|
7310
7330
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
7311
7331
|
var response, json, error_1;
|
|
7312
7332
|
return __generator(this, function (_a) {
|
|
@@ -7354,7 +7374,7 @@ var createResourceGetter = function (resource, includeHydrate) {
|
|
|
7354
7374
|
}
|
|
7355
7375
|
return function (config) {
|
|
7356
7376
|
var makeRequest = useMakeRequest(config);
|
|
7357
|
-
return useCallback(function (id) {
|
|
7377
|
+
return React.useCallback(function (id) {
|
|
7358
7378
|
var params = new URLSearchParams();
|
|
7359
7379
|
if (includeHydrate) {
|
|
7360
7380
|
params.append('hydrate', 'true');
|
|
@@ -7465,17 +7485,17 @@ var createTheme = function (baseTheme) {
|
|
|
7465
7485
|
alphaDerivedText: getAlphaDerivedColors(text)
|
|
7466
7486
|
});
|
|
7467
7487
|
};
|
|
7468
|
-
var WllSdkContext = /*#__PURE__*/
|
|
7488
|
+
var WllSdkContext = /*#__PURE__*/React.createContext(undefined);
|
|
7469
7489
|
var WllSdkProvider = function (_a) {
|
|
7470
7490
|
var children = _a.children,
|
|
7471
7491
|
providedTheme = _a.theme,
|
|
7472
7492
|
config = _a.config;
|
|
7473
|
-
var _b =
|
|
7493
|
+
var _b = React.useState(function () {
|
|
7474
7494
|
return createTheme(providedTheme || {});
|
|
7475
7495
|
}),
|
|
7476
7496
|
theme = _b[0],
|
|
7477
7497
|
setThemeState = _b[1];
|
|
7478
|
-
var setTheme =
|
|
7498
|
+
var setTheme = React.useCallback(function (newTheme) {
|
|
7479
7499
|
setThemeState(function (prevTheme) {
|
|
7480
7500
|
return createTheme(__assign(__assign({}, prevTheme), newTheme));
|
|
7481
7501
|
});
|
|
@@ -7483,7 +7503,7 @@ var WllSdkProvider = function (_a) {
|
|
|
7483
7503
|
var getGroupByID = useGetGroupByID(config);
|
|
7484
7504
|
var getSectionByID = useGetSectionByID(config);
|
|
7485
7505
|
var getTileByID = useGetTileByID(config);
|
|
7486
|
-
var contextValue =
|
|
7506
|
+
var contextValue = React.useMemo(function () {
|
|
7487
7507
|
return {
|
|
7488
7508
|
theme: theme,
|
|
7489
7509
|
setTheme: setTheme,
|
|
@@ -7492,12 +7512,12 @@ var WllSdkProvider = function (_a) {
|
|
|
7492
7512
|
getTileByID: getTileByID
|
|
7493
7513
|
};
|
|
7494
7514
|
}, [theme, setTheme, getGroupByID, getSectionByID, getTileByID]);
|
|
7495
|
-
return /*#__PURE__*/
|
|
7515
|
+
return /*#__PURE__*/React.createElement(WllSdkContext.Provider, {
|
|
7496
7516
|
value: contextValue
|
|
7497
7517
|
}, children);
|
|
7498
7518
|
};
|
|
7499
7519
|
var useWllSdk = function () {
|
|
7500
|
-
var context =
|
|
7520
|
+
var context = React.useContext(WllSdkContext);
|
|
7501
7521
|
if (context === undefined) {
|
|
7502
7522
|
throw new Error('useWllSdk must be used within a WllSdkProvider');
|
|
7503
7523
|
}
|
|
@@ -7764,12 +7784,12 @@ var Button = function (_a) {
|
|
|
7764
7784
|
var theme = useWllSdk().theme;
|
|
7765
7785
|
var buttonStyle = useButtonStyles(theme, variant);
|
|
7766
7786
|
var textStyle = useTextStyles(theme, variant);
|
|
7767
|
-
return /*#__PURE__*/
|
|
7787
|
+
return /*#__PURE__*/React__namespace.createElement(TouchableOpacity$1, {
|
|
7768
7788
|
style: [buttonStyle, {
|
|
7769
7789
|
borderRadius: theme.sizes.borderRadiusButton
|
|
7770
7790
|
}],
|
|
7771
7791
|
onPress: onPress
|
|
7772
|
-
}, /*#__PURE__*/
|
|
7792
|
+
}, /*#__PURE__*/React__namespace.createElement(Text$3, {
|
|
7773
7793
|
style: [textStyle, {
|
|
7774
7794
|
fontWeight: '700'
|
|
7775
7795
|
}]
|
|
@@ -7800,7 +7820,7 @@ var Column = function (_a) {
|
|
|
7800
7820
|
direction = _d === void 0 ? 'column' : _d,
|
|
7801
7821
|
_e = _a.style,
|
|
7802
7822
|
style = _e === void 0 ? {} : _e;
|
|
7803
|
-
return /*#__PURE__*/
|
|
7823
|
+
return /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
7804
7824
|
style: [styles$q.column, {
|
|
7805
7825
|
justifyContent: justifyMap[justify],
|
|
7806
7826
|
alignItems: alignMap[align],
|
|
@@ -7826,12 +7846,12 @@ var Icon = function (_a) {
|
|
|
7826
7846
|
_d = _a.strokeWidth,
|
|
7827
7847
|
strokeWidth = _d === void 0 ? 2 : _d,
|
|
7828
7848
|
props = __rest(_a, ["name", "color", "size", "strokeWidth"]);
|
|
7829
|
-
var LucideIcon =
|
|
7849
|
+
var LucideIcon = LucideIcons__namespace[name];
|
|
7830
7850
|
if (!LucideIcon) {
|
|
7831
7851
|
console.warn("Icon \"".concat(name, "\" not found in Lucide icons"));
|
|
7832
7852
|
return null;
|
|
7833
7853
|
}
|
|
7834
|
-
return /*#__PURE__*/
|
|
7854
|
+
return /*#__PURE__*/React__namespace.createElement(View$2, props, /*#__PURE__*/React__namespace.createElement(LucideIcon, {
|
|
7835
7855
|
color: color,
|
|
7836
7856
|
size: size,
|
|
7837
7857
|
strokeWidth: strokeWidth
|
|
@@ -7839,7 +7859,7 @@ var Icon = function (_a) {
|
|
|
7839
7859
|
};
|
|
7840
7860
|
|
|
7841
7861
|
var _excluded$8 = ["animating", "color", "hidesWhenStopped", "size", "style"];
|
|
7842
|
-
var createSvgCircle = style => /*#__PURE__*/
|
|
7862
|
+
var createSvgCircle = style => /*#__PURE__*/React__namespace.createElement("circle", {
|
|
7843
7863
|
cx: "16",
|
|
7844
7864
|
cy: "16",
|
|
7845
7865
|
fill: "none",
|
|
@@ -7847,7 +7867,7 @@ var createSvgCircle = style => /*#__PURE__*/React.createElement("circle", {
|
|
|
7847
7867
|
strokeWidth: "4",
|
|
7848
7868
|
style: style
|
|
7849
7869
|
});
|
|
7850
|
-
var ActivityIndicator = /*#__PURE__*/
|
|
7870
|
+
var ActivityIndicator = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef) => {
|
|
7851
7871
|
var _props$animating = props.animating,
|
|
7852
7872
|
animating = _props$animating === void 0 ? true : _props$animating,
|
|
7853
7873
|
_props$color = props.color,
|
|
@@ -7858,7 +7878,7 @@ var ActivityIndicator = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {
|
|
|
7858
7878
|
size = _props$size === void 0 ? 'small' : _props$size,
|
|
7859
7879
|
style = props.style,
|
|
7860
7880
|
other = _objectWithoutPropertiesLoose(props, _excluded$8);
|
|
7861
|
-
var svg = /*#__PURE__*/
|
|
7881
|
+
var svg = /*#__PURE__*/React__namespace.createElement("svg", {
|
|
7862
7882
|
height: "100%",
|
|
7863
7883
|
viewBox: "0 0 32 32",
|
|
7864
7884
|
width: "100%"
|
|
@@ -7870,13 +7890,13 @@ var ActivityIndicator = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {
|
|
|
7870
7890
|
strokeDasharray: 80,
|
|
7871
7891
|
strokeDashoffset: 60
|
|
7872
7892
|
}));
|
|
7873
|
-
return /*#__PURE__*/
|
|
7893
|
+
return /*#__PURE__*/React__namespace.createElement(View$2, _extends$1({}, other, {
|
|
7874
7894
|
"aria-valuemax": 1,
|
|
7875
7895
|
"aria-valuemin": 0,
|
|
7876
7896
|
ref: forwardedRef,
|
|
7877
7897
|
role: "progressbar",
|
|
7878
7898
|
style: [styles$p.container, style]
|
|
7879
|
-
}), /*#__PURE__*/
|
|
7899
|
+
}), /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
7880
7900
|
children: svg,
|
|
7881
7901
|
style: [typeof size === 'number' ? {
|
|
7882
7902
|
height: size,
|
|
@@ -7924,12 +7944,12 @@ var ActivityIndicator$1 = ActivityIndicator;
|
|
|
7924
7944
|
|
|
7925
7945
|
var LoadingIndicator = function () {
|
|
7926
7946
|
var theme = useWllSdk().theme;
|
|
7927
|
-
return /*#__PURE__*/
|
|
7947
|
+
return /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
7928
7948
|
style: [styles$o.container, {
|
|
7929
7949
|
borderRadius: theme.sizes.borderRadiusSm,
|
|
7930
7950
|
padding: theme.sizes.md
|
|
7931
7951
|
}]
|
|
7932
|
-
}, /*#__PURE__*/
|
|
7952
|
+
}, /*#__PURE__*/React__namespace.createElement(ActivityIndicator$1, {
|
|
7933
7953
|
size: "small",
|
|
7934
7954
|
color: theme.primary
|
|
7935
7955
|
}));
|
|
@@ -8082,7 +8102,7 @@ function RefreshControl(props) {
|
|
|
8082
8102
|
props.title;
|
|
8083
8103
|
props.titleColor;
|
|
8084
8104
|
var rest = _objectWithoutPropertiesLoose(props, _excluded$7);
|
|
8085
|
-
return /*#__PURE__*/
|
|
8105
|
+
return /*#__PURE__*/React.createElement(View$2, rest);
|
|
8086
8106
|
}
|
|
8087
8107
|
|
|
8088
8108
|
/**
|
|
@@ -8199,7 +8219,7 @@ function shouldEmitScrollEvent(lastTick, eventThrottle) {
|
|
|
8199
8219
|
/**
|
|
8200
8220
|
* Encapsulates the Web-specific scroll throttling and disabling logic
|
|
8201
8221
|
*/
|
|
8202
|
-
var ScrollViewBase = /*#__PURE__*/
|
|
8222
|
+
var ScrollViewBase = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef) => {
|
|
8203
8223
|
var onScroll = props.onScroll,
|
|
8204
8224
|
onTouchMove = props.onTouchMove,
|
|
8205
8225
|
onWheel = props.onWheel,
|
|
@@ -8211,12 +8231,12 @@ var ScrollViewBase = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {
|
|
|
8211
8231
|
showsVerticalScrollIndicator = props.showsVerticalScrollIndicator,
|
|
8212
8232
|
style = props.style,
|
|
8213
8233
|
rest = _objectWithoutPropertiesLoose(props, _excluded$6);
|
|
8214
|
-
var scrollState =
|
|
8234
|
+
var scrollState = React__namespace.useRef({
|
|
8215
8235
|
isScrolling: false,
|
|
8216
8236
|
scrollLastTick: 0
|
|
8217
8237
|
});
|
|
8218
|
-
var scrollTimeout =
|
|
8219
|
-
var scrollRef =
|
|
8238
|
+
var scrollTimeout = React__namespace.useRef(null);
|
|
8239
|
+
var scrollRef = React__namespace.useRef(null);
|
|
8220
8240
|
function createPreventableScrollHandler(handler) {
|
|
8221
8241
|
return e => {
|
|
8222
8242
|
if (scrollEnabled) {
|
|
@@ -8265,7 +8285,7 @@ var ScrollViewBase = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {
|
|
|
8265
8285
|
}
|
|
8266
8286
|
}
|
|
8267
8287
|
var hideScrollbar = showsHorizontalScrollIndicator === false || showsVerticalScrollIndicator === false;
|
|
8268
|
-
return /*#__PURE__*/
|
|
8288
|
+
return /*#__PURE__*/React__namespace.createElement(View$2, _extends$1({}, rest, {
|
|
8269
8289
|
onScroll: handleScroll,
|
|
8270
8290
|
onTouchMove: createPreventableScrollHandler(onTouchMove),
|
|
8271
8291
|
onWheel: createPreventableScrollHandler(onWheel),
|
|
@@ -8385,7 +8405,7 @@ var warning$1 = /*@__PURE__*/getDefaultExportFromCjs(warning_1);
|
|
|
8385
8405
|
var _excluded$5 = ["contentContainerStyle", "horizontal", "onContentSizeChange", "refreshControl", "stickyHeaderIndices", "pagingEnabled", "forwardedRef", "keyboardDismissMode", "onScroll", "centerContent"];
|
|
8386
8406
|
var emptyObject = {};
|
|
8387
8407
|
var IS_ANIMATING_TOUCH_START_THRESHOLD_MS = 16;
|
|
8388
|
-
let ScrollView$1 = class ScrollView extends
|
|
8408
|
+
let ScrollView$1 = class ScrollView extends React.Component {
|
|
8389
8409
|
constructor() {
|
|
8390
8410
|
super(...arguments);
|
|
8391
8411
|
this._scrollNodeRef = null;
|
|
@@ -8912,17 +8932,17 @@ let ScrollView$1 = class ScrollView extends React__default.Component {
|
|
|
8912
8932
|
};
|
|
8913
8933
|
}
|
|
8914
8934
|
var hasStickyHeaderIndices = !horizontal && Array.isArray(stickyHeaderIndices);
|
|
8915
|
-
var children = hasStickyHeaderIndices || pagingEnabled ?
|
|
8935
|
+
var children = hasStickyHeaderIndices || pagingEnabled ? React.Children.map(this.props.children, (child, i) => {
|
|
8916
8936
|
var isSticky = hasStickyHeaderIndices && stickyHeaderIndices.indexOf(i) > -1;
|
|
8917
8937
|
if (child != null && (isSticky || pagingEnabled)) {
|
|
8918
|
-
return /*#__PURE__*/
|
|
8938
|
+
return /*#__PURE__*/React.createElement(View$2, {
|
|
8919
8939
|
style: [isSticky && styles$m.stickyHeader, pagingEnabled && styles$m.pagingEnabledChild]
|
|
8920
8940
|
}, child);
|
|
8921
8941
|
} else {
|
|
8922
8942
|
return child;
|
|
8923
8943
|
}
|
|
8924
8944
|
}) : this.props.children;
|
|
8925
|
-
var contentContainer = /*#__PURE__*/
|
|
8945
|
+
var contentContainer = /*#__PURE__*/React.createElement(View$2, _extends$1({}, contentSizeChangeProps, {
|
|
8926
8946
|
children: children,
|
|
8927
8947
|
collapsable: false,
|
|
8928
8948
|
ref: this._setInnerViewRef,
|
|
@@ -8951,11 +8971,11 @@ let ScrollView$1 = class ScrollView extends React__default.Component {
|
|
|
8951
8971
|
});
|
|
8952
8972
|
var ScrollViewClass = ScrollViewBase$1;
|
|
8953
8973
|
invariant$1(ScrollViewClass !== undefined, 'ScrollViewClass must not be undefined');
|
|
8954
|
-
var scrollView = /*#__PURE__*/
|
|
8974
|
+
var scrollView = /*#__PURE__*/React.createElement(ScrollViewClass, _extends$1({}, props, {
|
|
8955
8975
|
ref: this._setScrollNodeRef
|
|
8956
8976
|
}), contentContainer);
|
|
8957
8977
|
if (refreshControl) {
|
|
8958
|
-
return /*#__PURE__*/
|
|
8978
|
+
return /*#__PURE__*/React.cloneElement(refreshControl, {
|
|
8959
8979
|
style: props.style
|
|
8960
8980
|
}, scrollView);
|
|
8961
8981
|
}
|
|
@@ -9005,8 +9025,8 @@ var styles$m = StyleSheet$1.create({
|
|
|
9005
9025
|
scrollSnapAlign: 'start'
|
|
9006
9026
|
}
|
|
9007
9027
|
});
|
|
9008
|
-
var ForwardedScrollView = /*#__PURE__*/
|
|
9009
|
-
return /*#__PURE__*/
|
|
9028
|
+
var ForwardedScrollView = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {
|
|
9029
|
+
return /*#__PURE__*/React.createElement(ScrollView$1, _extends$1({}, props, {
|
|
9010
9030
|
forwardedRef: forwardedRef
|
|
9011
9031
|
}));
|
|
9012
9032
|
});
|
|
@@ -9788,7 +9808,7 @@ var FillRateHelper$1 = FillRateHelper;
|
|
|
9788
9808
|
* variables are read in a state updater function, instead of the ones passed
|
|
9789
9809
|
* in.
|
|
9790
9810
|
*/
|
|
9791
|
-
class StateSafePureComponent extends
|
|
9811
|
+
class StateSafePureComponent extends React__namespace.PureComponent {
|
|
9792
9812
|
constructor(props) {
|
|
9793
9813
|
super(props);
|
|
9794
9814
|
this._inAsyncStateUpdate = false;
|
|
@@ -10040,7 +10060,7 @@ function _isEntirelyVisible(top, bottom, viewportHeight) {
|
|
|
10040
10060
|
var ViewabilityHelper$1 = ViewabilityHelper;
|
|
10041
10061
|
|
|
10042
10062
|
var __DEV__$3 = process.env.NODE_ENV !== 'production';
|
|
10043
|
-
var VirtualizedListContext = /*#__PURE__*/
|
|
10063
|
+
var VirtualizedListContext = /*#__PURE__*/React__namespace.createContext(null);
|
|
10044
10064
|
if (__DEV__$3) {
|
|
10045
10065
|
VirtualizedListContext.displayName = 'VirtualizedListContext';
|
|
10046
10066
|
}
|
|
@@ -10052,7 +10072,7 @@ function VirtualizedListContextProvider(_ref2) {
|
|
|
10052
10072
|
var children = _ref2.children,
|
|
10053
10073
|
value = _ref2.value;
|
|
10054
10074
|
// Avoid setting a newly created context object if the values are identical.
|
|
10055
|
-
var context = useMemo(() => ({
|
|
10075
|
+
var context = React.useMemo(() => ({
|
|
10056
10076
|
cellKey: null,
|
|
10057
10077
|
getScrollMetrics: value.getScrollMetrics,
|
|
10058
10078
|
horizontal: value.horizontal,
|
|
@@ -10060,7 +10080,7 @@ function VirtualizedListContextProvider(_ref2) {
|
|
|
10060
10080
|
registerAsNestedChild: value.registerAsNestedChild,
|
|
10061
10081
|
unregisterAsNestedChild: value.unregisterAsNestedChild
|
|
10062
10082
|
}), [value.getScrollMetrics, value.horizontal, value.getOutermostParentListRef, value.registerAsNestedChild, value.unregisterAsNestedChild]);
|
|
10063
|
-
return /*#__PURE__*/
|
|
10083
|
+
return /*#__PURE__*/React__namespace.createElement(VirtualizedListContext.Provider, {
|
|
10064
10084
|
value: context
|
|
10065
10085
|
}, children);
|
|
10066
10086
|
}
|
|
@@ -10072,16 +10092,16 @@ function VirtualizedListCellContextProvider(_ref3) {
|
|
|
10072
10092
|
var cellKey = _ref3.cellKey,
|
|
10073
10093
|
children = _ref3.children;
|
|
10074
10094
|
// Avoid setting a newly created context object if the values are identical.
|
|
10075
|
-
var currContext = useContext(VirtualizedListContext);
|
|
10076
|
-
var context = useMemo(() => currContext == null ? null : _objectSpread2(_objectSpread2({}, currContext), {}, {
|
|
10095
|
+
var currContext = React.useContext(VirtualizedListContext);
|
|
10096
|
+
var context = React.useMemo(() => currContext == null ? null : _objectSpread2(_objectSpread2({}, currContext), {}, {
|
|
10077
10097
|
cellKey
|
|
10078
10098
|
}), [currContext, cellKey]);
|
|
10079
|
-
return /*#__PURE__*/
|
|
10099
|
+
return /*#__PURE__*/React__namespace.createElement(VirtualizedListContext.Provider, {
|
|
10080
10100
|
value: context
|
|
10081
10101
|
}, children);
|
|
10082
10102
|
}
|
|
10083
10103
|
|
|
10084
|
-
class CellRenderer extends
|
|
10104
|
+
class CellRenderer extends React__namespace.Component {
|
|
10085
10105
|
constructor() {
|
|
10086
10106
|
super(...arguments);
|
|
10087
10107
|
this.state = {
|
|
@@ -10148,7 +10168,7 @@ class CellRenderer extends React.Component {
|
|
|
10148
10168
|
/* $FlowFixMe[incompatible-type-arg] (>=0.108.0 site=react_native_fb)
|
|
10149
10169
|
* This comment suppresses an error found when Flow v0.108 was deployed.
|
|
10150
10170
|
* To see the error, delete this comment and run Flow. */
|
|
10151
|
-
return /*#__PURE__*/
|
|
10171
|
+
return /*#__PURE__*/React__namespace.createElement(ListItemComponent, {
|
|
10152
10172
|
item,
|
|
10153
10173
|
index,
|
|
10154
10174
|
separators: this._separators
|
|
@@ -10180,18 +10200,18 @@ class CellRenderer extends React.Component {
|
|
|
10180
10200
|
|
|
10181
10201
|
// NOTE: that when this is a sticky header, `onLayout` will get automatically extracted and
|
|
10182
10202
|
// called explicitly by `ScrollViewStickyHeader`.
|
|
10183
|
-
var itemSeparator = /*#__PURE__*/
|
|
10203
|
+
var itemSeparator = /*#__PURE__*/React__namespace.isValidElement(ItemSeparatorComponent) ?
|
|
10184
10204
|
// $FlowFixMe[incompatible-type]
|
|
10185
10205
|
ItemSeparatorComponent :
|
|
10186
10206
|
// $FlowFixMe[incompatible-type]
|
|
10187
|
-
ItemSeparatorComponent && /*#__PURE__*/
|
|
10207
|
+
ItemSeparatorComponent && /*#__PURE__*/React__namespace.createElement(ItemSeparatorComponent, this.state.separatorProps);
|
|
10188
10208
|
var cellStyle = inversionStyle ? horizontal ? [styles$l.rowReverse, inversionStyle] : [styles$l.columnReverse, inversionStyle] : horizontal ? [styles$l.row, inversionStyle] : inversionStyle;
|
|
10189
|
-
var result = !CellRendererComponent ? /*#__PURE__*/
|
|
10209
|
+
var result = !CellRendererComponent ? /*#__PURE__*/React__namespace.createElement(View$2, _extends$1({
|
|
10190
10210
|
style: cellStyle,
|
|
10191
10211
|
onFocusCapture: onCellFocusCapture
|
|
10192
10212
|
}, onCellLayout && {
|
|
10193
10213
|
onLayout: this._onLayout
|
|
10194
|
-
}), element, itemSeparator) : /*#__PURE__*/
|
|
10214
|
+
}), element, itemSeparator) : /*#__PURE__*/React__namespace.createElement(CellRendererComponent, _extends$1({
|
|
10195
10215
|
cellKey: cellKey,
|
|
10196
10216
|
index: index,
|
|
10197
10217
|
item: item,
|
|
@@ -10200,7 +10220,7 @@ class CellRenderer extends React.Component {
|
|
|
10200
10220
|
}, onCellLayout && {
|
|
10201
10221
|
onLayout: this._onLayout
|
|
10202
10222
|
}), element, itemSeparator);
|
|
10203
|
-
return /*#__PURE__*/
|
|
10223
|
+
return /*#__PURE__*/React__namespace.createElement(VirtualizedListCellContextProvider, {
|
|
10204
10224
|
cellKey: this.props.cellKey
|
|
10205
10225
|
}, result);
|
|
10206
10226
|
}
|
|
@@ -10733,7 +10753,7 @@ class VirtualizedList extends StateSafePureComponent {
|
|
|
10733
10753
|
var onRefresh = props.onRefresh;
|
|
10734
10754
|
if (this._isNestedWithSameOrientation()) {
|
|
10735
10755
|
// $FlowFixMe[prop-missing] - Typing ReactNativeComponent revealed errors
|
|
10736
|
-
return /*#__PURE__*/
|
|
10756
|
+
return /*#__PURE__*/React__namespace.createElement(View$2, props);
|
|
10737
10757
|
} else if (onRefresh) {
|
|
10738
10758
|
var _props$refreshing;
|
|
10739
10759
|
invariant$1(typeof props.refreshing === 'boolean', '`refreshing` prop must be set as a boolean in order to use `onRefresh`, but got `' + JSON.stringify((_props$refreshing = props.refreshing) !== null && _props$refreshing !== void 0 ? _props$refreshing : 'undefined') + '`');
|
|
@@ -10741,8 +10761,8 @@ class VirtualizedList extends StateSafePureComponent {
|
|
|
10741
10761
|
/*#__PURE__*/
|
|
10742
10762
|
// $FlowFixMe[prop-missing] Invalid prop usage
|
|
10743
10763
|
// $FlowFixMe[incompatible-use]
|
|
10744
|
-
|
|
10745
|
-
refreshControl: props.refreshControl == null ? /*#__PURE__*/
|
|
10764
|
+
React__namespace.createElement(ScrollView$2, _extends$1({}, props, {
|
|
10765
|
+
refreshControl: props.refreshControl == null ? /*#__PURE__*/React__namespace.createElement(RefreshControl
|
|
10746
10766
|
// $FlowFixMe[incompatible-type]
|
|
10747
10767
|
, {
|
|
10748
10768
|
refreshing: props.refreshing,
|
|
@@ -10754,7 +10774,7 @@ class VirtualizedList extends StateSafePureComponent {
|
|
|
10754
10774
|
} else {
|
|
10755
10775
|
// $FlowFixMe[prop-missing] Invalid prop usage
|
|
10756
10776
|
// $FlowFixMe[incompatible-use]
|
|
10757
|
-
return /*#__PURE__*/
|
|
10777
|
+
return /*#__PURE__*/React__namespace.createElement(ScrollView$2, props);
|
|
10758
10778
|
}
|
|
10759
10779
|
};
|
|
10760
10780
|
this._onCellLayout = (e, cellKey, index) => {
|
|
@@ -11321,7 +11341,7 @@ class VirtualizedList extends StateSafePureComponent {
|
|
|
11321
11341
|
stickyHeaderIndices.push(cells.length);
|
|
11322
11342
|
}
|
|
11323
11343
|
var shouldListenForLayout = getItemLayout == null || debug || _this._fillRateHelper.enabled();
|
|
11324
|
-
cells.push( /*#__PURE__*/
|
|
11344
|
+
cells.push( /*#__PURE__*/React__namespace.createElement(CellRenderer, _extends$1({
|
|
11325
11345
|
CellRendererComponent: CellRendererComponent,
|
|
11326
11346
|
ItemSeparatorComponent: ii < end ? ItemSeparatorComponent : undefined,
|
|
11327
11347
|
ListItemComponent: ListItemComponent,
|
|
@@ -11395,15 +11415,15 @@ class VirtualizedList extends StateSafePureComponent {
|
|
|
11395
11415
|
if (stickyIndicesFromProps.has(0)) {
|
|
11396
11416
|
stickyHeaderIndices.push(0);
|
|
11397
11417
|
}
|
|
11398
|
-
var _element = /*#__PURE__*/
|
|
11418
|
+
var _element = /*#__PURE__*/React__namespace.isValidElement(ListHeaderComponent) ? ListHeaderComponent :
|
|
11399
11419
|
/*#__PURE__*/
|
|
11400
11420
|
// $FlowFixMe[not-a-component]
|
|
11401
11421
|
// $FlowFixMe[incompatible-type-arg]
|
|
11402
|
-
|
|
11403
|
-
cells.push( /*#__PURE__*/
|
|
11422
|
+
React__namespace.createElement(ListHeaderComponent, null);
|
|
11423
|
+
cells.push( /*#__PURE__*/React__namespace.createElement(VirtualizedListCellContextProvider, {
|
|
11404
11424
|
cellKey: this._getCellKey() + '-header',
|
|
11405
11425
|
key: "$header"
|
|
11406
|
-
}, /*#__PURE__*/
|
|
11426
|
+
}, /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
11407
11427
|
onLayout: this._onLayoutHeader,
|
|
11408
11428
|
style: [inversionStyle, this.props.ListHeaderComponentStyle]
|
|
11409
11429
|
},
|
|
@@ -11414,15 +11434,15 @@ class VirtualizedList extends StateSafePureComponent {
|
|
|
11414
11434
|
// 2a. Add a cell for ListEmptyComponent if applicable
|
|
11415
11435
|
var itemCount = this.props.getItemCount(data);
|
|
11416
11436
|
if (itemCount === 0 && ListEmptyComponent) {
|
|
11417
|
-
var _element2 = /*#__PURE__*/
|
|
11437
|
+
var _element2 = /*#__PURE__*/React__namespace.isValidElement(ListEmptyComponent) ? ListEmptyComponent :
|
|
11418
11438
|
/*#__PURE__*/
|
|
11419
11439
|
// $FlowFixMe[not-a-component]
|
|
11420
11440
|
// $FlowFixMe[incompatible-type-arg]
|
|
11421
|
-
|
|
11422
|
-
cells.push( /*#__PURE__*/
|
|
11441
|
+
React__namespace.createElement(ListEmptyComponent, null);
|
|
11442
|
+
cells.push( /*#__PURE__*/React__namespace.createElement(VirtualizedListCellContextProvider, {
|
|
11423
11443
|
cellKey: this._getCellKey() + '-empty',
|
|
11424
11444
|
key: "$empty"
|
|
11425
|
-
}, /*#__PURE__*/
|
|
11445
|
+
}, /*#__PURE__*/React__namespace.cloneElement(_element2, {
|
|
11426
11446
|
onLayout: event => {
|
|
11427
11447
|
this._onLayoutEmpty(event);
|
|
11428
11448
|
if (_element2.props.onLayout) {
|
|
@@ -11458,7 +11478,7 @@ class VirtualizedList extends StateSafePureComponent {
|
|
|
11458
11478
|
var firstMetrics = this.__getFrameMetricsApprox(section.first, this.props);
|
|
11459
11479
|
var lastMetrics = this.__getFrameMetricsApprox(last, this.props);
|
|
11460
11480
|
var spacerSize = lastMetrics.offset + lastMetrics.length - firstMetrics.offset;
|
|
11461
|
-
cells.push( /*#__PURE__*/
|
|
11481
|
+
cells.push( /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
11462
11482
|
key: "$spacer-" + section.first,
|
|
11463
11483
|
style: {
|
|
11464
11484
|
[spacerKey]: spacerSize
|
|
@@ -11476,15 +11496,15 @@ class VirtualizedList extends StateSafePureComponent {
|
|
|
11476
11496
|
|
|
11477
11497
|
// 3. Add cell for ListFooterComponent
|
|
11478
11498
|
if (ListFooterComponent) {
|
|
11479
|
-
var _element3 = /*#__PURE__*/
|
|
11499
|
+
var _element3 = /*#__PURE__*/React__namespace.isValidElement(ListFooterComponent) ? ListFooterComponent :
|
|
11480
11500
|
/*#__PURE__*/
|
|
11481
11501
|
// $FlowFixMe[not-a-component]
|
|
11482
11502
|
// $FlowFixMe[incompatible-type-arg]
|
|
11483
|
-
|
|
11484
|
-
cells.push( /*#__PURE__*/
|
|
11503
|
+
React__namespace.createElement(ListFooterComponent, null);
|
|
11504
|
+
cells.push( /*#__PURE__*/React__namespace.createElement(VirtualizedListCellContextProvider, {
|
|
11485
11505
|
cellKey: this._getFooterCellKey(),
|
|
11486
11506
|
key: "$footer"
|
|
11487
|
-
}, /*#__PURE__*/
|
|
11507
|
+
}, /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
11488
11508
|
onLayout: this._onLayoutFooter,
|
|
11489
11509
|
style: [inversionStyle, this.props.ListFooterComponentStyle]
|
|
11490
11510
|
},
|
|
@@ -11508,7 +11528,7 @@ class VirtualizedList extends StateSafePureComponent {
|
|
|
11508
11528
|
style: inversionStyle ? [inversionStyle, this.props.style] : this.props.style
|
|
11509
11529
|
});
|
|
11510
11530
|
this._hasMore = this.state.cellsAroundViewport.last < itemCount - 1;
|
|
11511
|
-
var innerRet = /*#__PURE__*/
|
|
11531
|
+
var innerRet = /*#__PURE__*/React__namespace.createElement(VirtualizedListContextProvider, {
|
|
11512
11532
|
value: {
|
|
11513
11533
|
cellKey: null,
|
|
11514
11534
|
getScrollMetrics: this._getScrollMetrics,
|
|
@@ -11517,7 +11537,7 @@ class VirtualizedList extends StateSafePureComponent {
|
|
|
11517
11537
|
registerAsNestedChild: this._registerAsNestedChild,
|
|
11518
11538
|
unregisterAsNestedChild: this._unregisterAsNestedChild
|
|
11519
11539
|
}
|
|
11520
|
-
}, /*#__PURE__*/
|
|
11540
|
+
}, /*#__PURE__*/React__namespace.cloneElement((this.props.renderScrollComponent || this._defaultRenderScrollComponent)(scrollProps), {
|
|
11521
11541
|
ref: this._captureScrollRef
|
|
11522
11542
|
}, cells));
|
|
11523
11543
|
var ret = innerRet;
|
|
@@ -11548,7 +11568,7 @@ class VirtualizedList extends StateSafePureComponent {
|
|
|
11548
11568
|
);
|
|
11549
11569
|
}*/
|
|
11550
11570
|
if (this.props.debug) {
|
|
11551
|
-
return /*#__PURE__*/
|
|
11571
|
+
return /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
11552
11572
|
style: styles$k.debug
|
|
11553
11573
|
}, ret, this._renderDebugOverlay());
|
|
11554
11574
|
} else {
|
|
@@ -11665,20 +11685,20 @@ class VirtualizedList extends StateSafePureComponent {
|
|
|
11665
11685
|
var windowLen = frameLast.offset + frameLast.length - windowTop;
|
|
11666
11686
|
var visTop = this._scrollMetrics.offset;
|
|
11667
11687
|
var visLen = this._scrollMetrics.visibleLength;
|
|
11668
|
-
return /*#__PURE__*/
|
|
11688
|
+
return /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
11669
11689
|
style: [styles$k.debugOverlayBase, styles$k.debugOverlay]
|
|
11670
|
-
}, framesInLayout.map((f, ii) => /*#__PURE__*/
|
|
11690
|
+
}, framesInLayout.map((f, ii) => /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
11671
11691
|
key: 'f' + ii,
|
|
11672
11692
|
style: [styles$k.debugOverlayBase, styles$k.debugOverlayFrame, {
|
|
11673
11693
|
top: f.offset * normalize,
|
|
11674
11694
|
height: f.length * normalize
|
|
11675
11695
|
}]
|
|
11676
|
-
})), /*#__PURE__*/
|
|
11696
|
+
})), /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
11677
11697
|
style: [styles$k.debugOverlayBase, styles$k.debugOverlayFrameLast, {
|
|
11678
11698
|
top: windowTop * normalize,
|
|
11679
11699
|
height: windowLen * normalize
|
|
11680
11700
|
}]
|
|
11681
|
-
}), /*#__PURE__*/
|
|
11701
|
+
}), /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
11682
11702
|
style: [styles$k.debugOverlayBase, styles$k.debugOverlayFrameVis, {
|
|
11683
11703
|
top: visTop * normalize,
|
|
11684
11704
|
height: visLen * normalize
|
|
@@ -12033,7 +12053,7 @@ function isArrayLike(data) {
|
|
|
12033
12053
|
*
|
|
12034
12054
|
* Also inherits [ScrollView Props](docs/scrollview.html#props), unless it is nested in another FlatList of same orientation.
|
|
12035
12055
|
*/
|
|
12036
|
-
let FlatList$1 = class FlatList extends
|
|
12056
|
+
let FlatList$1 = class FlatList extends React__namespace.PureComponent {
|
|
12037
12057
|
/**
|
|
12038
12058
|
* Scrolls to the end of the content. May be janky without `getItemLayout` prop.
|
|
12039
12059
|
*/
|
|
@@ -12183,7 +12203,7 @@ let FlatList$1 = class FlatList extends React.PureComponent {
|
|
|
12183
12203
|
// $FlowFixMe[not-a-component] Component isn't valid
|
|
12184
12204
|
// $FlowFixMe[incompatible-type-arg] Component isn't valid
|
|
12185
12205
|
// $FlowFixMe[incompatible-return] Component isn't valid
|
|
12186
|
-
return /*#__PURE__*/
|
|
12206
|
+
return /*#__PURE__*/React__namespace.createElement(ListItemComponent, props);
|
|
12187
12207
|
} else if (renderItem) {
|
|
12188
12208
|
// $FlowFixMe[incompatible-call]
|
|
12189
12209
|
return renderItem(props);
|
|
@@ -12196,7 +12216,7 @@ let FlatList$1 = class FlatList extends React.PureComponent {
|
|
|
12196
12216
|
var _item2 = info.item,
|
|
12197
12217
|
_index = info.index;
|
|
12198
12218
|
invariant$1(Array.isArray(_item2), 'Expected array of items with numColumns > 1');
|
|
12199
|
-
return /*#__PURE__*/
|
|
12219
|
+
return /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
12200
12220
|
style: [styles$j.row, columnWrapperStyle]
|
|
12201
12221
|
}, _item2.map((it, kk) => {
|
|
12202
12222
|
var element = render({
|
|
@@ -12205,7 +12225,7 @@ let FlatList$1 = class FlatList extends React.PureComponent {
|
|
|
12205
12225
|
index: _index * cols + kk,
|
|
12206
12226
|
separators: info.separators
|
|
12207
12227
|
});
|
|
12208
|
-
return element != null ? /*#__PURE__*/
|
|
12228
|
+
return element != null ? /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, {
|
|
12209
12229
|
key: kk
|
|
12210
12230
|
}, element) : null;
|
|
12211
12231
|
}));
|
|
@@ -12312,7 +12332,7 @@ let FlatList$1 = class FlatList extends React.PureComponent {
|
|
|
12312
12332
|
return (
|
|
12313
12333
|
/*#__PURE__*/
|
|
12314
12334
|
// $FlowFixMe[incompatible-exact] - `restProps` (`Props`) is inexact.
|
|
12315
|
-
|
|
12335
|
+
React__namespace.createElement(VirtualizedList$1, _extends$1({}, restProps, {
|
|
12316
12336
|
getItem: this._getItem,
|
|
12317
12337
|
getItemCount: this._getItemCount,
|
|
12318
12338
|
keyExtractor: this._keyExtractor,
|
|
@@ -14118,8 +14138,8 @@ var AnimatedProps$1 = AnimatedProps;
|
|
|
14118
14138
|
* WARNING: The `effect` callback should be stable (e.g. using `useCallback`).
|
|
14119
14139
|
*/
|
|
14120
14140
|
function useRefEffect(effect) {
|
|
14121
|
-
var cleanupRef = useRef(undefined);
|
|
14122
|
-
return useCallback(instance => {
|
|
14141
|
+
var cleanupRef = React.useRef(undefined);
|
|
14142
|
+
return React.useCallback(instance => {
|
|
14123
14143
|
if (cleanupRef.current) {
|
|
14124
14144
|
cleanupRef.current();
|
|
14125
14145
|
cleanupRef.current = undefined;
|
|
@@ -14141,15 +14161,15 @@ function useRefEffect(effect) {
|
|
|
14141
14161
|
*/
|
|
14142
14162
|
|
|
14143
14163
|
function useAnimatedProps(props) {
|
|
14144
|
-
var _useReducer = useReducer(count => count + 1, 0),
|
|
14164
|
+
var _useReducer = React.useReducer(count => count + 1, 0),
|
|
14145
14165
|
scheduleUpdate = _useReducer[1];
|
|
14146
|
-
var onUpdateRef = useRef(null);
|
|
14166
|
+
var onUpdateRef = React.useRef(null);
|
|
14147
14167
|
|
|
14148
14168
|
// TODO: Only invalidate `node` if animated props or `style` change. In the
|
|
14149
14169
|
// previous implementation, we permitted `style` to override props with the
|
|
14150
14170
|
// same name property name as styles, so we can probably continue doing that.
|
|
14151
14171
|
// The ordering of other props *should* not matter.
|
|
14152
|
-
var node = useMemo(() => new AnimatedProps$1(props, () => onUpdateRef.current == null ? void 0 : onUpdateRef.current()), [props]);
|
|
14172
|
+
var node = React.useMemo(() => new AnimatedProps$1(props, () => onUpdateRef.current == null ? void 0 : onUpdateRef.current()), [props]);
|
|
14153
14173
|
useAnimatedPropsLifecycle(node);
|
|
14154
14174
|
|
|
14155
14175
|
// TODO: This "effect" does three things:
|
|
@@ -14165,7 +14185,7 @@ function useAnimatedProps(props) {
|
|
|
14165
14185
|
//
|
|
14166
14186
|
// But there is no way to transparently compose three separate callback refs,
|
|
14167
14187
|
// so we just combine them all into one for now.
|
|
14168
|
-
var refEffect = useCallback(instance => {
|
|
14188
|
+
var refEffect = React.useCallback(instance => {
|
|
14169
14189
|
// NOTE: This may be called more often than necessary (e.g. when `props`
|
|
14170
14190
|
// changes), but `setNativeView` already optimizes for that.
|
|
14171
14191
|
node.setNativeView(instance);
|
|
@@ -14215,9 +14235,9 @@ function reduceAnimatedProps(node) {
|
|
|
14215
14235
|
* unless we are unmounting.
|
|
14216
14236
|
*/
|
|
14217
14237
|
function useAnimatedPropsLifecycle(node) {
|
|
14218
|
-
var prevNodeRef = useRef(null);
|
|
14219
|
-
var isUnmountingRef = useRef(false);
|
|
14220
|
-
useEffect(() => {
|
|
14238
|
+
var prevNodeRef = React.useRef(null);
|
|
14239
|
+
var isUnmountingRef = React.useRef(false);
|
|
14240
|
+
React.useEffect(() => {
|
|
14221
14241
|
// It is ok for multiple components to call `flushQueue` because it noops
|
|
14222
14242
|
// if the queue is empty. When multiple animated components are mounted at
|
|
14223
14243
|
// the same time. Only first component flushes the queue and the others will noop.
|
|
@@ -14277,7 +14297,7 @@ function useMergeRefs() {
|
|
|
14277
14297
|
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
14278
14298
|
refs[_key] = arguments[_key];
|
|
14279
14299
|
}
|
|
14280
|
-
return useCallback(current => {
|
|
14300
|
+
return React.useCallback(current => {
|
|
14281
14301
|
for (var _i = 0, _refs = refs; _i < _refs.length; _i++) {
|
|
14282
14302
|
var ref = _refs[_i];
|
|
14283
14303
|
if (ref != null) {
|
|
@@ -14298,7 +14318,7 @@ var _excluded$3 = ["style"];
|
|
|
14298
14318
|
* be compatible with concurrent rendering.
|
|
14299
14319
|
*/
|
|
14300
14320
|
function createAnimatedComponent(Component) {
|
|
14301
|
-
return /*#__PURE__*/
|
|
14321
|
+
return /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef) => {
|
|
14302
14322
|
var _useAnimatedProps = useAnimatedProps(props),
|
|
14303
14323
|
reducedProps = _useAnimatedProps[0],
|
|
14304
14324
|
callbackRef = _useAnimatedProps[1];
|
|
@@ -14315,7 +14335,7 @@ function createAnimatedComponent(Component) {
|
|
|
14315
14335
|
passthroughStyle = _ref.style,
|
|
14316
14336
|
passthroughProps = _objectWithoutPropertiesLoose(_ref, _excluded$3);
|
|
14317
14337
|
var mergedStyle = [style, passthroughStyle];
|
|
14318
|
-
return /*#__PURE__*/
|
|
14338
|
+
return /*#__PURE__*/React__namespace.createElement(Component, _extends$1({}, reducedProps, passthroughProps, {
|
|
14319
14339
|
style: mergedStyle,
|
|
14320
14340
|
ref: ref
|
|
14321
14341
|
}));
|
|
@@ -14325,7 +14345,7 @@ function createAnimatedComponent(Component) {
|
|
|
14325
14345
|
/**
|
|
14326
14346
|
* @see https://github.com/facebook/react-native/commit/b8c8562
|
|
14327
14347
|
*/
|
|
14328
|
-
var FlatListWithEventThrottle = /*#__PURE__*/
|
|
14348
|
+
var FlatListWithEventThrottle = /*#__PURE__*/React__namespace.forwardRef((props, ref) => /*#__PURE__*/React__namespace.createElement(FlatList$2, _extends$1({
|
|
14329
14349
|
scrollEventThrottle: 0.0001
|
|
14330
14350
|
}, props, {
|
|
14331
14351
|
ref: ref
|
|
@@ -14548,20 +14568,20 @@ var IDLE = 'IDLE';
|
|
|
14548
14568
|
var _filterId = 0;
|
|
14549
14569
|
var svgDataUriPattern = /^(data:image\/svg\+xml;utf8,)(.*)/;
|
|
14550
14570
|
function createTintColorSVG(tintColor, id) {
|
|
14551
|
-
return tintColor && id != null ? /*#__PURE__*/
|
|
14571
|
+
return tintColor && id != null ? /*#__PURE__*/React__namespace.createElement("svg", {
|
|
14552
14572
|
style: {
|
|
14553
14573
|
position: 'absolute',
|
|
14554
14574
|
height: 0,
|
|
14555
14575
|
visibility: 'hidden',
|
|
14556
14576
|
width: 0
|
|
14557
14577
|
}
|
|
14558
|
-
}, /*#__PURE__*/
|
|
14578
|
+
}, /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("filter", {
|
|
14559
14579
|
id: "tint-" + id,
|
|
14560
14580
|
suppressHydrationWarning: true
|
|
14561
|
-
}, /*#__PURE__*/
|
|
14581
|
+
}, /*#__PURE__*/React__namespace.createElement("feFlood", {
|
|
14562
14582
|
floodColor: "" + tintColor,
|
|
14563
14583
|
key: tintColor
|
|
14564
|
-
}), /*#__PURE__*/
|
|
14584
|
+
}), /*#__PURE__*/React__namespace.createElement("feComposite", {
|
|
14565
14585
|
in2: "SourceAlpha",
|
|
14566
14586
|
operator: "atop"
|
|
14567
14587
|
})))) : null;
|
|
@@ -14654,7 +14674,7 @@ function resolveAssetUri(source) {
|
|
|
14654
14674
|
}
|
|
14655
14675
|
return uri;
|
|
14656
14676
|
}
|
|
14657
|
-
var Image$1 = /*#__PURE__*/
|
|
14677
|
+
var Image$1 = /*#__PURE__*/React__namespace.forwardRef((props, ref) => {
|
|
14658
14678
|
var _ariaLabel = props['aria-label'],
|
|
14659
14679
|
accessibilityLabel = props.accessibilityLabel,
|
|
14660
14680
|
blurRadius = props.blurRadius,
|
|
@@ -14675,7 +14695,7 @@ var Image$1 = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
14675
14695
|
throw new Error('The <Image> component cannot contain children. If you want to render content on top of the image, consider using the <ImageBackground> component or absolute positioning.');
|
|
14676
14696
|
}
|
|
14677
14697
|
}
|
|
14678
|
-
var _React$useState =
|
|
14698
|
+
var _React$useState = React__namespace.useState(() => {
|
|
14679
14699
|
var uri = resolveAssetUri(source);
|
|
14680
14700
|
if (uri != null) {
|
|
14681
14701
|
var isLoaded = ImageLoader$1.has(uri);
|
|
@@ -14687,13 +14707,13 @@ var Image$1 = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
14687
14707
|
}),
|
|
14688
14708
|
state = _React$useState[0],
|
|
14689
14709
|
updateState = _React$useState[1];
|
|
14690
|
-
var _React$useState2 =
|
|
14710
|
+
var _React$useState2 = React__namespace.useState({}),
|
|
14691
14711
|
layout = _React$useState2[0],
|
|
14692
14712
|
updateLayout = _React$useState2[1];
|
|
14693
|
-
var hasTextAncestor =
|
|
14694
|
-
var hiddenImageRef =
|
|
14695
|
-
var filterRef =
|
|
14696
|
-
var requestRef =
|
|
14713
|
+
var hasTextAncestor = React__namespace.useContext(TextAncestorContext$1);
|
|
14714
|
+
var hiddenImageRef = React__namespace.useRef(null);
|
|
14715
|
+
var filterRef = React__namespace.useRef(_filterId++);
|
|
14716
|
+
var requestRef = React__namespace.useRef(null);
|
|
14697
14717
|
var shouldDisplaySource = state === LOADED || state === LOADING && defaultSource == null;
|
|
14698
14718
|
var _extractNonStandardSt = extractNonStandardStyleProps(style, blurRadius, filterRef.current, props.tintColor),
|
|
14699
14719
|
_resizeMode = _extractNonStandardSt[0],
|
|
@@ -14740,7 +14760,7 @@ var Image$1 = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
14740
14760
|
|
|
14741
14761
|
// Image loading
|
|
14742
14762
|
var uri = resolveAssetUri(source);
|
|
14743
|
-
|
|
14763
|
+
React__namespace.useEffect(() => {
|
|
14744
14764
|
abortPendingRequest();
|
|
14745
14765
|
if (uri != null) {
|
|
14746
14766
|
updateState(LOADING);
|
|
@@ -14777,7 +14797,7 @@ var Image$1 = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
14777
14797
|
}
|
|
14778
14798
|
return abortPendingRequest;
|
|
14779
14799
|
}, [uri, requestRef, updateState, onError, onLoad, onLoadEnd, onLoadStart]);
|
|
14780
|
-
return /*#__PURE__*/
|
|
14800
|
+
return /*#__PURE__*/React__namespace.createElement(View$2, _extends$1({}, rest, {
|
|
14781
14801
|
"aria-label": ariaLabel,
|
|
14782
14802
|
onLayout: handleLayout,
|
|
14783
14803
|
pointerEvents: pointerEvents,
|
|
@@ -14788,7 +14808,7 @@ var Image$1 = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
14788
14808
|
{
|
|
14789
14809
|
boxShadow: null
|
|
14790
14810
|
}]
|
|
14791
|
-
}), /*#__PURE__*/
|
|
14811
|
+
}), /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
14792
14812
|
style: [styles$i.image, resizeModeStyles[resizeMode], {
|
|
14793
14813
|
backgroundImage,
|
|
14794
14814
|
filter
|
|
@@ -14889,7 +14909,7 @@ var Image = createAnimatedComponent(Image$2);
|
|
|
14889
14909
|
/**
|
|
14890
14910
|
* @see https://github.com/facebook/react-native/commit/b8c8562
|
|
14891
14911
|
*/
|
|
14892
|
-
var ScrollViewWithEventThrottle = /*#__PURE__*/
|
|
14912
|
+
var ScrollViewWithEventThrottle = /*#__PURE__*/React__namespace.forwardRef((props, ref) => /*#__PURE__*/React__namespace.createElement(ScrollView$2, _extends$1({
|
|
14893
14913
|
scrollEventThrottle: 0.0001
|
|
14894
14914
|
}, props, {
|
|
14895
14915
|
ref: ref
|
|
@@ -14902,7 +14922,7 @@ var _excluded$1 = ["ItemSeparatorComponent", "SectionSeparatorComponent", "rende
|
|
|
14902
14922
|
* hood. The only operation that might not scale well is concatting the data arrays of all the
|
|
14903
14923
|
* sections when new props are received, which should be plenty fast for up to ~10,000 items.
|
|
14904
14924
|
*/
|
|
14905
|
-
class VirtualizedSectionList extends
|
|
14925
|
+
class VirtualizedSectionList extends React__namespace.PureComponent {
|
|
14906
14926
|
constructor() {
|
|
14907
14927
|
super(...arguments);
|
|
14908
14928
|
this._keyExtractor = (item, index) => {
|
|
@@ -14963,7 +14983,7 @@ class VirtualizedSectionList extends React.PureComponent {
|
|
|
14963
14983
|
var renderItem = info.section.renderItem || this.props.renderItem;
|
|
14964
14984
|
var SeparatorComponent = this._getSeparatorComponent(index, info, listItemCount);
|
|
14965
14985
|
invariant$1(renderItem, 'no renderItem!');
|
|
14966
|
-
return /*#__PURE__*/
|
|
14986
|
+
return /*#__PURE__*/React__namespace.createElement(ItemWithSeparator, {
|
|
14967
14987
|
SeparatorComponent: SeparatorComponent,
|
|
14968
14988
|
LeadingSeparatorComponent: infoIndex === 0 ? this.props.SectionSeparatorComponent : undefined,
|
|
14969
14989
|
cellKey: info.key,
|
|
@@ -15069,7 +15089,7 @@ class VirtualizedSectionList extends React.PureComponent {
|
|
|
15069
15089
|
itemCount += this.props.getItemCount(section.data);
|
|
15070
15090
|
}
|
|
15071
15091
|
var renderItem = this._renderItem(itemCount);
|
|
15072
|
-
return /*#__PURE__*/
|
|
15092
|
+
return /*#__PURE__*/React__namespace.createElement(VirtualizedList$1, _extends$1({}, passThroughProps, {
|
|
15073
15093
|
keyExtractor: this._keyExtractor,
|
|
15074
15094
|
stickyHeaderIndices: stickyHeaderIndices,
|
|
15075
15095
|
renderItem: renderItem,
|
|
@@ -15182,13 +15202,13 @@ function ItemWithSeparator(props) {
|
|
|
15182
15202
|
index = props.index,
|
|
15183
15203
|
section = props.section,
|
|
15184
15204
|
inverted = props.inverted;
|
|
15185
|
-
var _React$useState =
|
|
15205
|
+
var _React$useState = React__namespace.useState(false),
|
|
15186
15206
|
leadingSeparatorHiglighted = _React$useState[0],
|
|
15187
15207
|
setLeadingSeparatorHighlighted = _React$useState[1];
|
|
15188
|
-
var _React$useState2 =
|
|
15208
|
+
var _React$useState2 = React__namespace.useState(false),
|
|
15189
15209
|
separatorHighlighted = _React$useState2[0],
|
|
15190
15210
|
setSeparatorHighlighted = _React$useState2[1];
|
|
15191
|
-
var _React$useState3 =
|
|
15211
|
+
var _React$useState3 = React__namespace.useState({
|
|
15192
15212
|
leadingItem: props.leadingItem,
|
|
15193
15213
|
leadingSection: props.leadingSection,
|
|
15194
15214
|
section: props.section,
|
|
@@ -15197,7 +15217,7 @@ function ItemWithSeparator(props) {
|
|
|
15197
15217
|
}),
|
|
15198
15218
|
leadingSeparatorProps = _React$useState3[0],
|
|
15199
15219
|
setLeadingSeparatorProps = _React$useState3[1];
|
|
15200
|
-
var _React$useState4 =
|
|
15220
|
+
var _React$useState4 = React__namespace.useState({
|
|
15201
15221
|
leadingItem: props.item,
|
|
15202
15222
|
leadingSection: props.leadingSection,
|
|
15203
15223
|
section: props.section,
|
|
@@ -15206,7 +15226,7 @@ function ItemWithSeparator(props) {
|
|
|
15206
15226
|
}),
|
|
15207
15227
|
separatorProps = _React$useState4[0],
|
|
15208
15228
|
setSeparatorProps = _React$useState4[1];
|
|
15209
|
-
|
|
15229
|
+
React__namespace.useEffect(() => {
|
|
15210
15230
|
setSelfHighlightCallback(cellKey, setSeparatorHighlighted);
|
|
15211
15231
|
// $FlowFixMe[incompatible-call]
|
|
15212
15232
|
setSelfUpdatePropsCallback(cellKey, setSeparatorProps);
|
|
@@ -15249,13 +15269,13 @@ function ItemWithSeparator(props) {
|
|
|
15249
15269
|
section,
|
|
15250
15270
|
separators
|
|
15251
15271
|
});
|
|
15252
|
-
var leadingSeparator = LeadingSeparatorComponent != null && /*#__PURE__*/
|
|
15272
|
+
var leadingSeparator = LeadingSeparatorComponent != null && /*#__PURE__*/React__namespace.createElement(LeadingSeparatorComponent, _extends$1({
|
|
15253
15273
|
highlighted: leadingSeparatorHiglighted
|
|
15254
15274
|
}, leadingSeparatorProps));
|
|
15255
|
-
var separator = SeparatorComponent != null && /*#__PURE__*/
|
|
15275
|
+
var separator = SeparatorComponent != null && /*#__PURE__*/React__namespace.createElement(SeparatorComponent, _extends$1({
|
|
15256
15276
|
highlighted: separatorHighlighted
|
|
15257
15277
|
}, separatorProps));
|
|
15258
|
-
return leadingSeparator || separator ? /*#__PURE__*/
|
|
15278
|
+
return leadingSeparator || separator ? /*#__PURE__*/React__namespace.createElement(View$2, null, inverted === false ? leadingSeparator : separator, element, inverted === false ? separator : leadingSeparator) : element;
|
|
15259
15279
|
}
|
|
15260
15280
|
|
|
15261
15281
|
/* $FlowFixMe[class-object-subtyping] added when improving typing for this
|
|
@@ -15329,7 +15349,7 @@ var _excluded = ["stickySectionHeadersEnabled"];
|
|
|
15329
15349
|
* Alternatively, you can provide a custom `keyExtractor` prop.
|
|
15330
15350
|
*
|
|
15331
15351
|
*/
|
|
15332
|
-
let SectionList$1 = class SectionList extends
|
|
15352
|
+
let SectionList$1 = class SectionList extends React__namespace.PureComponent {
|
|
15333
15353
|
constructor() {
|
|
15334
15354
|
super(...arguments);
|
|
15335
15355
|
this._captureRef = ref => {
|
|
@@ -15392,7 +15412,7 @@ let SectionList$1 = class SectionList extends React.PureComponent {
|
|
|
15392
15412
|
_stickySectionHeadersEnabled = _this$props.stickySectionHeadersEnabled,
|
|
15393
15413
|
restProps = _objectWithoutPropertiesLoose(_this$props, _excluded);
|
|
15394
15414
|
var stickySectionHeadersEnabled = _stickySectionHeadersEnabled !== null && _stickySectionHeadersEnabled !== void 0 ? _stickySectionHeadersEnabled : Platform$1.OS === 'ios';
|
|
15395
|
-
return /*#__PURE__*/
|
|
15415
|
+
return /*#__PURE__*/React__namespace.createElement(VirtualizedSectionList$1, _extends$1({}, restProps, {
|
|
15396
15416
|
stickySectionHeadersEnabled: stickySectionHeadersEnabled,
|
|
15397
15417
|
ref: this._captureRef,
|
|
15398
15418
|
getItemCount: items => items.length,
|
|
@@ -15404,7 +15424,7 @@ let SectionList$1 = class SectionList extends React.PureComponent {
|
|
|
15404
15424
|
/**
|
|
15405
15425
|
* @see https://github.com/facebook/react-native/commit/b8c8562
|
|
15406
15426
|
*/
|
|
15407
|
-
var SectionListWithEventThrottle = /*#__PURE__*/
|
|
15427
|
+
var SectionListWithEventThrottle = /*#__PURE__*/React__namespace.forwardRef((props, ref) => /*#__PURE__*/React__namespace.createElement(SectionList$1, _extends$1({
|
|
15408
15428
|
scrollEventThrottle: 0.0001
|
|
15409
15429
|
}, props, {
|
|
15410
15430
|
ref: ref
|
|
@@ -17881,11 +17901,11 @@ var ProgressBar = function (_a) {
|
|
|
17881
17901
|
var styles = useStyles(theme);
|
|
17882
17902
|
var containerStyles = useContainerStyles(theme);
|
|
17883
17903
|
var progressStyles = useProgressStyles(theme, variant);
|
|
17884
|
-
var animatedWidth =
|
|
17904
|
+
var animatedWidth = React__namespace.useRef(new Animated$1.Value(0)).current;
|
|
17885
17905
|
var containerStyle = [styles.container, containerStyles[height], {
|
|
17886
17906
|
backgroundColor: theme.derivedSurface[20]
|
|
17887
17907
|
}];
|
|
17888
|
-
|
|
17908
|
+
React__namespace.useEffect(function () {
|
|
17889
17909
|
Animated$1.timing(animatedWidth, {
|
|
17890
17910
|
toValue: Math.min(Math.max(percentage, 0), 100),
|
|
17891
17911
|
duration: animationDuration,
|
|
@@ -17898,9 +17918,9 @@ var ProgressBar = function (_a) {
|
|
|
17898
17918
|
outputRange: ['0%', '100%']
|
|
17899
17919
|
})
|
|
17900
17920
|
};
|
|
17901
|
-
return /*#__PURE__*/
|
|
17921
|
+
return /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
17902
17922
|
style: containerStyle
|
|
17903
|
-
}, /*#__PURE__*/
|
|
17923
|
+
}, /*#__PURE__*/React__namespace.createElement(Animated$1.View, {
|
|
17904
17924
|
style: [styles.progress, progressStyles, progressWidth]
|
|
17905
17925
|
}));
|
|
17906
17926
|
};
|
|
@@ -17938,7 +17958,7 @@ var ProgressiveImage = function (_a) {
|
|
|
17938
17958
|
_b = _a.isDesaturated,
|
|
17939
17959
|
isDesaturated = _b === void 0 ? false : _b,
|
|
17940
17960
|
props = __rest(_a, ["source", "style", "isDesaturated"]);
|
|
17941
|
-
var imageAnimated = useRef(new Animated$1.Value(0)).current;
|
|
17961
|
+
var imageAnimated = React.useRef(new Animated$1.Value(0)).current;
|
|
17942
17962
|
var theme = useWllSdk().theme;
|
|
17943
17963
|
var onImageLoad = function () {
|
|
17944
17964
|
Animated$1.timing(imageAnimated, {
|
|
@@ -17949,24 +17969,24 @@ var ProgressiveImage = function (_a) {
|
|
|
17949
17969
|
};
|
|
17950
17970
|
var baseColor = theme.alphaDerivedPrimary[20];
|
|
17951
17971
|
var desaturatedColor = desaturateColor(baseColor);
|
|
17952
|
-
return /*#__PURE__*/
|
|
17972
|
+
return /*#__PURE__*/React.createElement(View$2, {
|
|
17953
17973
|
style: [styles$h.container, style, {
|
|
17954
17974
|
backgroundColor: isDesaturated ? desaturatedColor : baseColor
|
|
17955
17975
|
}]
|
|
17956
|
-
}, isDesaturated ? /*#__PURE__*/
|
|
17976
|
+
}, isDesaturated ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Animated$1.Image, _extends({}, props, {
|
|
17957
17977
|
source: source,
|
|
17958
17978
|
style: [styles$h.imageOverlay, {
|
|
17959
17979
|
opacity: imageAnimated,
|
|
17960
17980
|
tintColor: desaturatedColor
|
|
17961
17981
|
}],
|
|
17962
17982
|
onLoad: onImageLoad
|
|
17963
|
-
})), /*#__PURE__*/
|
|
17983
|
+
})), /*#__PURE__*/React.createElement(Animated$1.Image, _extends({}, props, {
|
|
17964
17984
|
source: source,
|
|
17965
17985
|
style: [styles$h.imageOverlay, {
|
|
17966
17986
|
opacity: 0.1
|
|
17967
17987
|
}],
|
|
17968
17988
|
onLoad: onImageLoad
|
|
17969
|
-
}))) : /*#__PURE__*/
|
|
17989
|
+
}))) : /*#__PURE__*/React.createElement(Animated$1.Image, _extends({}, props, {
|
|
17970
17990
|
source: source,
|
|
17971
17991
|
style: [styles$h.imageOverlay, {
|
|
17972
17992
|
opacity: imageAnimated
|
|
@@ -17979,7 +17999,7 @@ var RowHeader = function (_a) {
|
|
|
17979
17999
|
var children = _a.children,
|
|
17980
18000
|
style = _a.style,
|
|
17981
18001
|
props = __rest(_a, ["children", "style"]);
|
|
17982
|
-
return /*#__PURE__*/
|
|
18002
|
+
return /*#__PURE__*/React__namespace.createElement(View$2, _extends({
|
|
17983
18003
|
style: [styles$g.header, style]
|
|
17984
18004
|
}, props), children);
|
|
17985
18005
|
};
|
|
@@ -18044,7 +18064,7 @@ var Text = function (_a) {
|
|
|
18044
18064
|
}
|
|
18045
18065
|
};
|
|
18046
18066
|
var variantStyle = getVariantStyle(variant);
|
|
18047
|
-
return /*#__PURE__*/
|
|
18067
|
+
return /*#__PURE__*/React__namespace.createElement(Text$3, _extends({
|
|
18048
18068
|
style: [styles$f.base, variantStyle, style]
|
|
18049
18069
|
}, props));
|
|
18050
18070
|
};
|
|
@@ -18052,9 +18072,9 @@ var styles$f = StyleSheet$1.create({
|
|
|
18052
18072
|
base: {}
|
|
18053
18073
|
});
|
|
18054
18074
|
|
|
18055
|
-
var BannerContext = /*#__PURE__*/
|
|
18075
|
+
var BannerContext = /*#__PURE__*/React__namespace.createContext(null);
|
|
18056
18076
|
var useBannerContext = function () {
|
|
18057
|
-
var context =
|
|
18077
|
+
var context = React__namespace.useContext(BannerContext);
|
|
18058
18078
|
if (!context) {
|
|
18059
18079
|
throw new Error('Tile components must be used within a BaseTile');
|
|
18060
18080
|
}
|
|
@@ -18064,9 +18084,9 @@ var BaseBanner = function (_a) {
|
|
|
18064
18084
|
var tile = _a.tile,
|
|
18065
18085
|
children = _a.children;
|
|
18066
18086
|
var theme = useWllSdk().theme;
|
|
18067
|
-
return /*#__PURE__*/
|
|
18087
|
+
return /*#__PURE__*/React__namespace.createElement(BannerContext.Provider, {
|
|
18068
18088
|
value: tile
|
|
18069
|
-
}, /*#__PURE__*/
|
|
18089
|
+
}, /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
18070
18090
|
style: [styles$e.container, {
|
|
18071
18091
|
backgroundColor: theme.surface,
|
|
18072
18092
|
borderRadius: theme.sizes.borderRadiusLg
|
|
@@ -18084,22 +18104,22 @@ var styles$e = StyleSheet$1.create({
|
|
|
18084
18104
|
}
|
|
18085
18105
|
});
|
|
18086
18106
|
|
|
18087
|
-
|
|
18107
|
+
exports.UrlTarget = void 0;
|
|
18088
18108
|
(function (UrlTarget) {
|
|
18089
18109
|
UrlTarget["sameWindow"] = "SAME_WINDOW";
|
|
18090
18110
|
UrlTarget["newWindow"] = "NEW_WINDOW";
|
|
18091
|
-
})(UrlTarget || (UrlTarget = {}));
|
|
18092
|
-
|
|
18111
|
+
})(exports.UrlTarget || (exports.UrlTarget = {}));
|
|
18112
|
+
exports.TierTileType = void 0;
|
|
18093
18113
|
(function (TierTileType) {
|
|
18094
18114
|
TierTileType["currentTier"] = "CURRENT";
|
|
18095
18115
|
TierTileType["specificTier"] = "SPECIFIC";
|
|
18096
|
-
})(TierTileType || (TierTileType = {}));
|
|
18097
|
-
|
|
18116
|
+
})(exports.TierTileType || (exports.TierTileType = {}));
|
|
18117
|
+
exports.ProgressType = void 0;
|
|
18098
18118
|
(function (ProgressType) {
|
|
18099
18119
|
ProgressType["Name"] = "NAME";
|
|
18100
18120
|
ProgressType["Points"] = "POINTS";
|
|
18101
|
-
})(ProgressType || (ProgressType = {}));
|
|
18102
|
-
|
|
18121
|
+
})(exports.ProgressType || (exports.ProgressType = {}));
|
|
18122
|
+
exports.TileType = void 0;
|
|
18103
18123
|
(function (TileType) {
|
|
18104
18124
|
TileType["Banner"] = "BANNER";
|
|
18105
18125
|
TileType["Points"] = "POINTS";
|
|
@@ -18108,12 +18128,12 @@ var TileType;
|
|
|
18108
18128
|
TileType["Badge"] = "BADGE";
|
|
18109
18129
|
TileType["RewardCategory"] = "REWARD_CATEGORY";
|
|
18110
18130
|
TileType["Tier"] = "TIER";
|
|
18111
|
-
})(TileType || (TileType = {}));
|
|
18112
|
-
|
|
18131
|
+
})(exports.TileType || (exports.TileType = {}));
|
|
18132
|
+
exports.TileHeight = void 0;
|
|
18113
18133
|
(function (TileHeight) {
|
|
18114
18134
|
TileHeight["Half"] = "HALF";
|
|
18115
18135
|
TileHeight["Full"] = "FULL";
|
|
18116
|
-
})(TileHeight || (TileHeight = {}));
|
|
18136
|
+
})(exports.TileHeight || (exports.TileHeight = {}));
|
|
18117
18137
|
var BannerTileConfig = /** @class */function () {
|
|
18118
18138
|
function BannerTileConfig() {}
|
|
18119
18139
|
return BannerTileConfig;
|
|
@@ -18172,14 +18192,14 @@ var RewardTileConfig = /** @class */function () {
|
|
|
18172
18192
|
}
|
|
18173
18193
|
return RewardTileConfig;
|
|
18174
18194
|
}();
|
|
18175
|
-
|
|
18195
|
+
exports.BadgeTileType = void 0;
|
|
18176
18196
|
(function (BadgeTileType) {
|
|
18177
18197
|
BadgeTileType["Specific"] = "SPECIFIC";
|
|
18178
18198
|
BadgeTileType["Latest"] = "LATEST_EARNED";
|
|
18179
|
-
})(BadgeTileType || (BadgeTileType = {}));
|
|
18199
|
+
})(exports.BadgeTileType || (exports.BadgeTileType = {}));
|
|
18180
18200
|
var BadgeTileConfig = /** @class */function () {
|
|
18181
18201
|
function BadgeTileConfig() {
|
|
18182
|
-
this.type = BadgeTileType.Specific;
|
|
18202
|
+
this.type = exports.BadgeTileType.Specific;
|
|
18183
18203
|
this.badgeId = '';
|
|
18184
18204
|
this.defaultLocale = 'en';
|
|
18185
18205
|
this.priority = 0;
|
|
@@ -18206,7 +18226,7 @@ var RewardCategoryTileConfig = /** @class */function () {
|
|
|
18206
18226
|
}();
|
|
18207
18227
|
var TierTileConfig = /** @class */function () {
|
|
18208
18228
|
function TierTileConfig() {
|
|
18209
|
-
this.progressType = ProgressType.Name;
|
|
18229
|
+
this.progressType = exports.ProgressType.Name;
|
|
18210
18230
|
this.title = '';
|
|
18211
18231
|
this.emptyDescription = '';
|
|
18212
18232
|
this.emptyArtworkUrl = '';
|
|
@@ -18217,17 +18237,17 @@ var TierTileConfig = /** @class */function () {
|
|
|
18217
18237
|
}();
|
|
18218
18238
|
|
|
18219
18239
|
var useTileSize = function (tile) {
|
|
18220
|
-
return useMemo(function () {
|
|
18240
|
+
return React.useMemo(function () {
|
|
18221
18241
|
return {
|
|
18222
|
-
isFullSize: tile.tileHeight === TileHeight.Full,
|
|
18223
|
-
isHalfSize: tile.tileHeight === TileHeight.Half
|
|
18242
|
+
isFullSize: tile.tileHeight === exports.TileHeight.Full,
|
|
18243
|
+
isHalfSize: tile.tileHeight === exports.TileHeight.Half
|
|
18224
18244
|
};
|
|
18225
18245
|
}, [tile.tileHeight]);
|
|
18226
18246
|
};
|
|
18227
18247
|
|
|
18228
|
-
var TileContext = /*#__PURE__*/createContext(null);
|
|
18248
|
+
var TileContext = /*#__PURE__*/React.createContext(null);
|
|
18229
18249
|
var useTileContext = function () {
|
|
18230
|
-
var context = useContext(TileContext);
|
|
18250
|
+
var context = React.useContext(TileContext);
|
|
18231
18251
|
if (!context) {
|
|
18232
18252
|
throw new Error('Tile components must be used within a BaseTile');
|
|
18233
18253
|
}
|
|
@@ -18236,9 +18256,9 @@ var useTileContext = function () {
|
|
|
18236
18256
|
var BaseTileInner = function (_a) {
|
|
18237
18257
|
var tile = _a.tile,
|
|
18238
18258
|
children = _a.children;
|
|
18239
|
-
return /*#__PURE__*/
|
|
18259
|
+
return /*#__PURE__*/React.createElement(TileContext.Provider, {
|
|
18240
18260
|
value: tile
|
|
18241
|
-
}, /*#__PURE__*/
|
|
18261
|
+
}, /*#__PURE__*/React.createElement(BaseTile.Root, null, children));
|
|
18242
18262
|
};
|
|
18243
18263
|
var BaseTileRoot = function (_a) {
|
|
18244
18264
|
var children = _a.children,
|
|
@@ -18256,7 +18276,7 @@ var BaseTileRoot = function (_a) {
|
|
|
18256
18276
|
var responsiveStyles = createResponsiveStyle({
|
|
18257
18277
|
borderRadius: [theme.sizes.borderRadiusSm, theme.sizes.borderRadiusSm, theme.sizes.borderRadiusLg]
|
|
18258
18278
|
});
|
|
18259
|
-
return /*#__PURE__*/
|
|
18279
|
+
return /*#__PURE__*/React.createElement(View$2, {
|
|
18260
18280
|
style: [styles$d.container, {
|
|
18261
18281
|
backgroundColor: theme.surface,
|
|
18262
18282
|
borderRadius: responsiveStyles.borderRadius,
|
|
@@ -18271,7 +18291,7 @@ var BaseTileContent = function (_a) {
|
|
|
18271
18291
|
var isHalfSize = useTileSize(tile).isHalfSize;
|
|
18272
18292
|
// For half tiles with an image, don't show other content
|
|
18273
18293
|
if (isHalfSize && artworkUrl) return null;
|
|
18274
|
-
return /*#__PURE__*/
|
|
18294
|
+
return /*#__PURE__*/React.createElement(View$2, {
|
|
18275
18295
|
style: [styles$d.content, isHalfSize && {
|
|
18276
18296
|
justifyContent: 'center',
|
|
18277
18297
|
padding: 16
|
|
@@ -18288,7 +18308,7 @@ var BaseTileHeader = function (_a) {
|
|
|
18288
18308
|
var headerStyle = createResponsiveStyle({
|
|
18289
18309
|
marginTop: [8, 8, 12]
|
|
18290
18310
|
});
|
|
18291
|
-
return /*#__PURE__*/
|
|
18311
|
+
return /*#__PURE__*/React.createElement(View$2, {
|
|
18292
18312
|
style: [styles$d.header, {
|
|
18293
18313
|
marginTop: !isHalfSize && artworkUrl ? headerStyle.marginTop : undefined,
|
|
18294
18314
|
// @ts-ignore
|
|
@@ -18307,7 +18327,7 @@ var BaseTileMedia = function (props) {
|
|
|
18307
18327
|
if (!artworkUrl) return null;
|
|
18308
18328
|
var hasTitle = !!title;
|
|
18309
18329
|
var hasDescription = !!description;
|
|
18310
|
-
return /*#__PURE__*/
|
|
18330
|
+
return /*#__PURE__*/React.createElement(ProgressiveImage, _extends({}, props, {
|
|
18311
18331
|
source: {
|
|
18312
18332
|
uri: artworkUrl
|
|
18313
18333
|
},
|
|
@@ -18327,10 +18347,10 @@ var BaseTileTitle = function () {
|
|
|
18327
18347
|
var isHalfSize = useTileSize(tile).isHalfSize;
|
|
18328
18348
|
// Don't show title for half tiles with image
|
|
18329
18349
|
if (isHalfSize && artworkUrl || !title) return null;
|
|
18330
|
-
return /*#__PURE__*/
|
|
18350
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text, {
|
|
18331
18351
|
variant: "title",
|
|
18332
18352
|
accessibilityLabel: title
|
|
18333
|
-
}, title), linkURL && /*#__PURE__*/
|
|
18353
|
+
}, title), linkURL && /*#__PURE__*/React.createElement(Icon, {
|
|
18334
18354
|
name: "ChevronRight",
|
|
18335
18355
|
color: theme.derivedSurfaceText[20]
|
|
18336
18356
|
}));
|
|
@@ -18343,7 +18363,7 @@ var BaseTileBody = function (props) {
|
|
|
18343
18363
|
var isHalfSize = useTileSize(tile).isHalfSize;
|
|
18344
18364
|
// Don't show body for half tiles with image
|
|
18345
18365
|
if (isHalfSize && artworkUrl || !description) return null;
|
|
18346
|
-
return /*#__PURE__*/
|
|
18366
|
+
return /*#__PURE__*/React.createElement(Text, _extends({
|
|
18347
18367
|
variant: "body"
|
|
18348
18368
|
}, props, {
|
|
18349
18369
|
accessibilityLabel: description
|
|
@@ -18383,16 +18403,16 @@ var GRID_GAP = 16;
|
|
|
18383
18403
|
var BadgeTileInner$1 = function (_a) {
|
|
18384
18404
|
var tile = _a.tile;
|
|
18385
18405
|
useWllSdk().theme;
|
|
18386
|
-
if (tile.tileHeight === TileHeight.Half) {
|
|
18406
|
+
if (tile.tileHeight === exports.TileHeight.Half) {
|
|
18387
18407
|
return null;
|
|
18388
18408
|
}
|
|
18389
|
-
return /*#__PURE__*/
|
|
18409
|
+
return /*#__PURE__*/React.createElement(BaseTile, {
|
|
18390
18410
|
tile: tile
|
|
18391
|
-
}, /*#__PURE__*/
|
|
18411
|
+
}, /*#__PURE__*/React.createElement(View$2, {
|
|
18392
18412
|
style: styles$c.contentContainer
|
|
18393
|
-
}, /*#__PURE__*/
|
|
18413
|
+
}, /*#__PURE__*/React.createElement(BadgeTile$1.Image, null), /*#__PURE__*/React.createElement(View$2, {
|
|
18394
18414
|
style: styles$c.textContainer
|
|
18395
|
-
}, /*#__PURE__*/
|
|
18415
|
+
}, /*#__PURE__*/React.createElement(RowHeader, null, /*#__PURE__*/React.createElement(BadgeTile$1.Title, null), /*#__PURE__*/React.createElement(BadgeTile$1.Chevron, null)), /*#__PURE__*/React.createElement(BadgeTile$1.Body, null))));
|
|
18396
18416
|
};
|
|
18397
18417
|
var BadgeTileImage = function (props) {
|
|
18398
18418
|
var _a;
|
|
@@ -18401,11 +18421,11 @@ var BadgeTileImage = function (props) {
|
|
|
18401
18421
|
var configuration = tile.configuration;
|
|
18402
18422
|
var badgeDetails = (_a = configuration.details) === null || _a === void 0 ? void 0 : _a[0];
|
|
18403
18423
|
if (!(badgeDetails === null || badgeDetails === void 0 ? void 0 : badgeDetails.artworkUrl)) return null;
|
|
18404
|
-
return /*#__PURE__*/
|
|
18424
|
+
return /*#__PURE__*/React.createElement(View$2, {
|
|
18405
18425
|
style: [styles$c.imageContainer, {
|
|
18406
18426
|
backgroundColor: theme.alphaDerivedPrimary[20]
|
|
18407
18427
|
}]
|
|
18408
|
-
}, configuration.count === 0 && /*#__PURE__*/
|
|
18428
|
+
}, configuration.count === 0 && /*#__PURE__*/React.createElement(Locked, null), /*#__PURE__*/React.createElement(ProgressiveImage, _extends({}, props, {
|
|
18409
18429
|
source: {
|
|
18410
18430
|
uri: badgeDetails.artworkUrl
|
|
18411
18431
|
},
|
|
@@ -18419,7 +18439,7 @@ var BadgeTileTitle$1 = function (props) {
|
|
|
18419
18439
|
var configuration = tile.configuration;
|
|
18420
18440
|
var badgeDetails = (_a = configuration.details) === null || _a === void 0 ? void 0 : _a[0];
|
|
18421
18441
|
if (!(badgeDetails === null || badgeDetails === void 0 ? void 0 : badgeDetails.name)) return null;
|
|
18422
|
-
return /*#__PURE__*/
|
|
18442
|
+
return /*#__PURE__*/React.createElement(Text, _extends({
|
|
18423
18443
|
variant: "title"
|
|
18424
18444
|
}, props, {
|
|
18425
18445
|
numberOfLines: 1,
|
|
@@ -18432,23 +18452,23 @@ var BadgeTileBody = function (props) {
|
|
|
18432
18452
|
var configuration = tile.configuration;
|
|
18433
18453
|
var badgeDetails = (_a = configuration.details) === null || _a === void 0 ? void 0 : _a[0];
|
|
18434
18454
|
if (!(badgeDetails === null || badgeDetails === void 0 ? void 0 : badgeDetails.description)) return null;
|
|
18435
|
-
return /*#__PURE__*/
|
|
18455
|
+
return /*#__PURE__*/React.createElement(Text, _extends({
|
|
18436
18456
|
variant: "body"
|
|
18437
18457
|
}, props), badgeDetails.description);
|
|
18438
18458
|
};
|
|
18439
18459
|
var Locked = function () {
|
|
18440
18460
|
var width = Dimensions.get('window').width;
|
|
18441
18461
|
var iconSize = Math.min(width * 0.1, 50);
|
|
18442
|
-
return /*#__PURE__*/
|
|
18462
|
+
return /*#__PURE__*/React.createElement(View$2, {
|
|
18443
18463
|
style: styles$c.lockOverlay
|
|
18444
|
-
}, /*#__PURE__*/
|
|
18464
|
+
}, /*#__PURE__*/React.createElement(LucideIcons.LockKeyholeIcon, {
|
|
18445
18465
|
color: "#FFF",
|
|
18446
18466
|
size: iconSize
|
|
18447
18467
|
}));
|
|
18448
18468
|
};
|
|
18449
18469
|
var BadgeTileChevron = function () {
|
|
18450
18470
|
var theme = useWllSdk().theme;
|
|
18451
|
-
return /*#__PURE__*/
|
|
18471
|
+
return /*#__PURE__*/React.createElement(Icon, {
|
|
18452
18472
|
name: "ChevronRight",
|
|
18453
18473
|
color: theme.derivedSurfaceText[20]
|
|
18454
18474
|
});
|
|
@@ -18498,14 +18518,14 @@ var styles$c = StyleSheet$1.create({
|
|
|
18498
18518
|
var BadgeTileInner = function (_a) {
|
|
18499
18519
|
var tile = _a.tile;
|
|
18500
18520
|
if (!tile) return null;
|
|
18501
|
-
return /*#__PURE__*/
|
|
18521
|
+
return /*#__PURE__*/React.createElement(BaseTile, {
|
|
18502
18522
|
tile: tile
|
|
18503
|
-
}, /*#__PURE__*/
|
|
18523
|
+
}, /*#__PURE__*/React.createElement(View$2, {
|
|
18504
18524
|
style: styles$b.container
|
|
18505
|
-
}, /*#__PURE__*/
|
|
18525
|
+
}, /*#__PURE__*/React.createElement(BadgeTile.Media, null, /*#__PURE__*/React.createElement(BadgeTile.Status, null)), /*#__PURE__*/React.createElement(Column, {
|
|
18506
18526
|
justify: "between",
|
|
18507
18527
|
align: "start"
|
|
18508
|
-
}, /*#__PURE__*/
|
|
18528
|
+
}, /*#__PURE__*/React.createElement(View$2, null, /*#__PURE__*/React.createElement(BadgeTile.Title, null), /*#__PURE__*/React.createElement(BadgeTile.Description, null)), /*#__PURE__*/React.createElement(BadgeTile.DateEarned, null))));
|
|
18509
18529
|
};
|
|
18510
18530
|
var BadgeTileMedia = function (_a) {
|
|
18511
18531
|
var children = _a.children,
|
|
@@ -18518,9 +18538,9 @@ var BadgeTileMedia = function (_a) {
|
|
|
18518
18538
|
emptyBadgeArtworkUrl = configuration.emptyBadgeArtworkUrl;
|
|
18519
18539
|
var displayUrl = count === 0 ? emptyBadgeArtworkUrl : artworkUrl;
|
|
18520
18540
|
if (!displayUrl) return null;
|
|
18521
|
-
return /*#__PURE__*/
|
|
18541
|
+
return /*#__PURE__*/React.createElement(View$2, {
|
|
18522
18542
|
style: styles$b.header
|
|
18523
|
-
}, /*#__PURE__*/
|
|
18543
|
+
}, /*#__PURE__*/React.createElement(ProgressiveImage, _extends({}, props, {
|
|
18524
18544
|
source: {
|
|
18525
18545
|
uri: displayUrl
|
|
18526
18546
|
},
|
|
@@ -18537,7 +18557,7 @@ var BadgeTileTitle = function () {
|
|
|
18537
18557
|
emptyBadgeMessage = configuration.emptyBadgeMessage;
|
|
18538
18558
|
var displayText = count === 0 ? emptyBadgeMessage : name;
|
|
18539
18559
|
if (!displayText) return null;
|
|
18540
|
-
return /*#__PURE__*/
|
|
18560
|
+
return /*#__PURE__*/React.createElement(View$2, null, /*#__PURE__*/React.createElement(Text, {
|
|
18541
18561
|
variant: "title",
|
|
18542
18562
|
style: styles$b.titleText,
|
|
18543
18563
|
numberOfLines: 2,
|
|
@@ -18550,9 +18570,9 @@ var BadgeTileDescription = function () {
|
|
|
18550
18570
|
var count = configuration.count,
|
|
18551
18571
|
description = configuration.description;
|
|
18552
18572
|
if (count === 0 || !description) return null;
|
|
18553
|
-
return /*#__PURE__*/
|
|
18573
|
+
return /*#__PURE__*/React.createElement(View$2, {
|
|
18554
18574
|
style: styles$b.descriptionContainer
|
|
18555
|
-
}, /*#__PURE__*/
|
|
18575
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
18556
18576
|
variant: "body",
|
|
18557
18577
|
style: styles$b.descriptionText,
|
|
18558
18578
|
numberOfLines: 2,
|
|
@@ -18572,20 +18592,20 @@ var BadgeTileDateEarned = function () {
|
|
|
18572
18592
|
var containerStyle = [styles$b.dateEarnedContainer, {
|
|
18573
18593
|
backgroundColor: backgroundColor
|
|
18574
18594
|
}];
|
|
18575
|
-
if (type === BadgeTileType.Latest && count === 0) {
|
|
18595
|
+
if (type === exports.BadgeTileType.Latest && count === 0) {
|
|
18576
18596
|
return null;
|
|
18577
18597
|
}
|
|
18578
18598
|
if (count === 0) {
|
|
18579
|
-
return /*#__PURE__*/
|
|
18599
|
+
return /*#__PURE__*/React.createElement(View$2, {
|
|
18580
18600
|
style: containerStyle
|
|
18581
|
-
}, /*#__PURE__*/
|
|
18601
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
18582
18602
|
variant: "label"
|
|
18583
18603
|
}, badgeNotEarnedMessage));
|
|
18584
18604
|
}
|
|
18585
18605
|
var formattedDate = new Date(createdAt).toLocaleDateString();
|
|
18586
|
-
return /*#__PURE__*/
|
|
18606
|
+
return /*#__PURE__*/React.createElement(View$2, {
|
|
18587
18607
|
style: containerStyle
|
|
18588
|
-
}, /*#__PURE__*/
|
|
18608
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
18589
18609
|
variant: "label"
|
|
18590
18610
|
}, "".concat(awardedDatePrefix, " ").concat(formattedDate)));
|
|
18591
18611
|
};
|
|
@@ -18594,15 +18614,15 @@ var BadgeTileStatus = function () {
|
|
|
18594
18614
|
var configuration = tile.configuration;
|
|
18595
18615
|
var count = configuration.count,
|
|
18596
18616
|
type = configuration.type;
|
|
18597
|
-
if (type !== BadgeTileType.Specific || count === 1) {
|
|
18617
|
+
if (type !== exports.BadgeTileType.Specific || count === 1) {
|
|
18598
18618
|
return null;
|
|
18599
18619
|
}
|
|
18600
|
-
return /*#__PURE__*/
|
|
18620
|
+
return /*#__PURE__*/React.createElement(View$2, {
|
|
18601
18621
|
style: styles$b.indicatorContainer
|
|
18602
|
-
}, count === 0 ? /*#__PURE__*/
|
|
18622
|
+
}, count === 0 ? /*#__PURE__*/React.createElement(LucideIcons.LockKeyholeIcon, {
|
|
18603
18623
|
color: "#FFF",
|
|
18604
18624
|
size: 20
|
|
18605
|
-
}) : /*#__PURE__*/
|
|
18625
|
+
}) : /*#__PURE__*/React.createElement(Text, {
|
|
18606
18626
|
style: styles$b.countText
|
|
18607
18627
|
}, count, "x"));
|
|
18608
18628
|
};
|
|
@@ -18760,19 +18780,19 @@ var Linking$1 = new Linking();
|
|
|
18760
18780
|
|
|
18761
18781
|
var BannerTile = function (_a) {
|
|
18762
18782
|
var tile = _a.tile;
|
|
18763
|
-
return /*#__PURE__*/
|
|
18783
|
+
return /*#__PURE__*/React__namespace.createElement(BaseBanner, {
|
|
18764
18784
|
tile: tile
|
|
18765
|
-
}, /*#__PURE__*/
|
|
18785
|
+
}, /*#__PURE__*/React__namespace.createElement(BannerTile.Image, null), /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
18766
18786
|
style: styles$a.slideContent
|
|
18767
|
-
}, /*#__PURE__*/
|
|
18787
|
+
}, /*#__PURE__*/React__namespace.createElement(BannerTile.Title, null), /*#__PURE__*/React__namespace.createElement(BannerTile.Description, null), /*#__PURE__*/React__namespace.createElement(BannerTile.CTA, null)));
|
|
18768
18788
|
};
|
|
18769
18789
|
var BannerTileImage = function () {
|
|
18770
18790
|
var configuration = useBannerContext().configuration;
|
|
18771
18791
|
var artworkUrl = configuration.artworkUrl;
|
|
18772
18792
|
if (!artworkUrl) return null;
|
|
18773
|
-
return /*#__PURE__*/
|
|
18793
|
+
return /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
18774
18794
|
style: styles$a.imageContainer
|
|
18775
|
-
}, /*#__PURE__*/
|
|
18795
|
+
}, /*#__PURE__*/React__namespace.createElement(ProgressiveImage, {
|
|
18776
18796
|
source: {
|
|
18777
18797
|
uri: artworkUrl
|
|
18778
18798
|
},
|
|
@@ -18786,7 +18806,7 @@ var BannerTileTitle = function () {
|
|
|
18786
18806
|
return (
|
|
18787
18807
|
/*#__PURE__*/
|
|
18788
18808
|
// @ts-ignore
|
|
18789
|
-
|
|
18809
|
+
React__namespace.createElement(Text, {
|
|
18790
18810
|
variant: "title",
|
|
18791
18811
|
style: styles$a.title
|
|
18792
18812
|
}, title)
|
|
@@ -18797,7 +18817,7 @@ var BannerTileDescription = function () {
|
|
|
18797
18817
|
var theme = useWllSdk().theme;
|
|
18798
18818
|
var description = configuration.description;
|
|
18799
18819
|
if (!description) return null;
|
|
18800
|
-
return /*#__PURE__*/
|
|
18820
|
+
return /*#__PURE__*/React__namespace.createElement(Text, {
|
|
18801
18821
|
style: [styles$a.description, {
|
|
18802
18822
|
color: theme.derivedSurfaceText[20]
|
|
18803
18823
|
}]
|
|
@@ -18825,7 +18845,7 @@ var BannerTileCTA = function () {
|
|
|
18825
18845
|
});
|
|
18826
18846
|
};
|
|
18827
18847
|
if (!ctaText) return null;
|
|
18828
|
-
return /*#__PURE__*/
|
|
18848
|
+
return /*#__PURE__*/React__namespace.createElement(Button, {
|
|
18829
18849
|
title: ctaText,
|
|
18830
18850
|
variant: "accent",
|
|
18831
18851
|
onPress: function () {
|
|
@@ -18876,30 +18896,30 @@ BannerTile.CTA = BannerTileCTA;
|
|
|
18876
18896
|
|
|
18877
18897
|
var ContentTileInner = function (_a) {
|
|
18878
18898
|
var tile = _a.tile;
|
|
18879
|
-
return /*#__PURE__*/
|
|
18899
|
+
return /*#__PURE__*/React__namespace.createElement(BaseTile, {
|
|
18880
18900
|
tile: tile
|
|
18881
|
-
}, /*#__PURE__*/
|
|
18901
|
+
}, /*#__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))));
|
|
18882
18902
|
};
|
|
18883
18903
|
var ContentTileRoot = function (_a) {
|
|
18884
18904
|
var children = _a.children;
|
|
18885
|
-
return /*#__PURE__*/
|
|
18905
|
+
return /*#__PURE__*/React__namespace.createElement(BaseTile.Root, null, children);
|
|
18886
18906
|
};
|
|
18887
18907
|
var ContentTileMedia = function () {
|
|
18888
|
-
return /*#__PURE__*/
|
|
18908
|
+
return /*#__PURE__*/React__namespace.createElement(BaseTile.Media, {
|
|
18889
18909
|
style: styles$9.media
|
|
18890
18910
|
});
|
|
18891
18911
|
};
|
|
18892
18912
|
var ContentTileContent = function (_a) {
|
|
18893
18913
|
var children = _a.children;
|
|
18894
|
-
return /*#__PURE__*/
|
|
18914
|
+
return /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
18895
18915
|
style: styles$9.content
|
|
18896
18916
|
}, children);
|
|
18897
18917
|
};
|
|
18898
18918
|
var ContentTileHeader = function () {
|
|
18899
|
-
return /*#__PURE__*/
|
|
18919
|
+
return /*#__PURE__*/React__namespace.createElement(BaseTile.Header, null, /*#__PURE__*/React__namespace.createElement(BaseTile.Title, null));
|
|
18900
18920
|
};
|
|
18901
18921
|
var ContentTileBody = function () {
|
|
18902
|
-
return /*#__PURE__*/
|
|
18922
|
+
return /*#__PURE__*/React__namespace.createElement(BaseTile.Body, null);
|
|
18903
18923
|
};
|
|
18904
18924
|
var styles$9 = StyleSheet$1.create({
|
|
18905
18925
|
content: createResponsiveStyle({
|
|
@@ -18917,11 +18937,11 @@ ContentTile.Content = ContentTileContent;
|
|
|
18917
18937
|
ContentTile.Header = ContentTileHeader;
|
|
18918
18938
|
ContentTile.Body = ContentTileBody;
|
|
18919
18939
|
|
|
18920
|
-
|
|
18940
|
+
exports.SectionType = void 0;
|
|
18921
18941
|
(function (SectionType) {
|
|
18922
18942
|
SectionType["Grid"] = "GRID";
|
|
18923
18943
|
SectionType["Banner"] = "BANNER";
|
|
18924
|
-
})(SectionType || (SectionType = {}));
|
|
18944
|
+
})(exports.SectionType || (exports.SectionType = {}));
|
|
18925
18945
|
|
|
18926
18946
|
var SectionHeader = function (_a) {
|
|
18927
18947
|
var title = _a.title,
|
|
@@ -18930,13 +18950,13 @@ var SectionHeader = function (_a) {
|
|
|
18930
18950
|
if (!title && !description) {
|
|
18931
18951
|
return null;
|
|
18932
18952
|
}
|
|
18933
|
-
return /*#__PURE__*/
|
|
18953
|
+
return /*#__PURE__*/React.createElement(View$2, {
|
|
18934
18954
|
style: styles$8.sectionHeader
|
|
18935
|
-
}, title && /*#__PURE__*/
|
|
18955
|
+
}, title && /*#__PURE__*/React.createElement(Text, {
|
|
18936
18956
|
style: [styles$8.sectionTitle, {
|
|
18937
18957
|
fontWeight: '700'
|
|
18938
18958
|
}]
|
|
18939
|
-
}, title), description && /*#__PURE__*/
|
|
18959
|
+
}, title), description && /*#__PURE__*/React.createElement(Text, {
|
|
18940
18960
|
style: [styles$8.sectionDescription, {
|
|
18941
18961
|
color: theme.alphaDerivedText[20]
|
|
18942
18962
|
}]
|
|
@@ -18958,21 +18978,21 @@ var styles$8 = StyleSheet$1.create({
|
|
|
18958
18978
|
var Carousel = function (_a) {
|
|
18959
18979
|
var section = _a.section;
|
|
18960
18980
|
var theme = useWllSdk().theme;
|
|
18961
|
-
var scrollViewRef = useRef(null);
|
|
18962
|
-
var _b = useState(0),
|
|
18981
|
+
var scrollViewRef = React.useRef(null);
|
|
18982
|
+
var _b = React.useState(0),
|
|
18963
18983
|
currentIndex = _b[0],
|
|
18964
18984
|
setCurrentIndex = _b[1];
|
|
18965
18985
|
var slideWidth = 1080;
|
|
18966
18986
|
var bannerTiles = section.tiles.filter(function (tile) {
|
|
18967
|
-
return tile.type === TileType.Banner;
|
|
18987
|
+
return tile.type === exports.TileType.Banner;
|
|
18968
18988
|
});
|
|
18969
|
-
var animatedIndex = useRef(new Animated$1.Value(0)).current;
|
|
18970
|
-
var handleScroll = useCallback(function (event) {
|
|
18989
|
+
var animatedIndex = React.useRef(new Animated$1.Value(0)).current;
|
|
18990
|
+
var handleScroll = React.useCallback(function (event) {
|
|
18971
18991
|
var contentOffsetX = event.nativeEvent.contentOffset.x;
|
|
18972
18992
|
var newIndex = contentOffsetX / slideWidth;
|
|
18973
18993
|
animatedIndex.setValue(newIndex);
|
|
18974
18994
|
}, [slideWidth, animatedIndex]);
|
|
18975
|
-
var handleScrollEnd = useCallback(function (event) {
|
|
18995
|
+
var handleScrollEnd = React.useCallback(function (event) {
|
|
18976
18996
|
var contentOffsetX = event.nativeEvent.contentOffset.x;
|
|
18977
18997
|
var newIndex = Math.round(contentOffsetX / slideWidth);
|
|
18978
18998
|
setCurrentIndex(newIndex);
|
|
@@ -18996,23 +19016,23 @@ var Carousel = function (_a) {
|
|
|
18996
19016
|
});
|
|
18997
19017
|
};
|
|
18998
19018
|
var displayControls = bannerTiles.length > 1;
|
|
18999
|
-
return /*#__PURE__*/
|
|
19019
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SectionHeader, {
|
|
19000
19020
|
title: section.title,
|
|
19001
19021
|
description: section.description
|
|
19002
|
-
}), /*#__PURE__*/
|
|
19022
|
+
}), /*#__PURE__*/React.createElement(View$2, {
|
|
19003
19023
|
style: styles$7.container
|
|
19004
|
-
}, /*#__PURE__*/
|
|
19024
|
+
}, /*#__PURE__*/React.createElement(View$2, {
|
|
19005
19025
|
style: styles$7.carouselContainer
|
|
19006
|
-
}, displayControls && /*#__PURE__*/
|
|
19026
|
+
}, displayControls && /*#__PURE__*/React.createElement(TouchableOpacity$1, {
|
|
19007
19027
|
style: [styles$7.navButton, styles$7.navButtonLeft, {
|
|
19008
19028
|
backgroundColor: theme.background
|
|
19009
19029
|
}],
|
|
19010
19030
|
onPress: handlePrev
|
|
19011
|
-
}, /*#__PURE__*/
|
|
19031
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
19012
19032
|
name: "ArrowLeft",
|
|
19013
19033
|
size: 20,
|
|
19014
19034
|
color: theme.primary
|
|
19015
|
-
})), /*#__PURE__*/
|
|
19035
|
+
})), /*#__PURE__*/React.createElement(ScrollView$2, {
|
|
19016
19036
|
ref: scrollViewRef,
|
|
19017
19037
|
horizontal: true,
|
|
19018
19038
|
pagingEnabled: true,
|
|
@@ -19037,24 +19057,24 @@ var Carousel = function (_a) {
|
|
|
19037
19057
|
// If priorities are equal, maintain original order
|
|
19038
19058
|
return bannerTiles.indexOf(a) - bannerTiles.indexOf(b);
|
|
19039
19059
|
}).map(function (tile, index) {
|
|
19040
|
-
return /*#__PURE__*/
|
|
19060
|
+
return /*#__PURE__*/React.createElement(View$2, {
|
|
19041
19061
|
key: index,
|
|
19042
19062
|
style: [{
|
|
19043
19063
|
width: slideWidth
|
|
19044
19064
|
}]
|
|
19045
|
-
}, /*#__PURE__*/
|
|
19065
|
+
}, /*#__PURE__*/React.createElement(BannerTile, {
|
|
19046
19066
|
tile: tile
|
|
19047
19067
|
}));
|
|
19048
|
-
})), displayControls && /*#__PURE__*/
|
|
19068
|
+
})), displayControls && /*#__PURE__*/React.createElement(TouchableOpacity$1, {
|
|
19049
19069
|
style: [styles$7.navButton, styles$7.navButtonRight, {
|
|
19050
19070
|
backgroundColor: theme.surface
|
|
19051
19071
|
}],
|
|
19052
19072
|
onPress: handleNext
|
|
19053
|
-
}, /*#__PURE__*/
|
|
19073
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
19054
19074
|
name: "ArrowRight",
|
|
19055
19075
|
size: 20,
|
|
19056
19076
|
color: theme.primary
|
|
19057
|
-
}))), displayControls && /*#__PURE__*/
|
|
19077
|
+
}))), displayControls && /*#__PURE__*/React.createElement(View$2, {
|
|
19058
19078
|
style: styles$7.indicators
|
|
19059
19079
|
}, bannerTiles.map(function (_, index) {
|
|
19060
19080
|
var width = animatedIndex.interpolate({
|
|
@@ -19062,7 +19082,7 @@ var Carousel = function (_a) {
|
|
|
19062
19082
|
outputRange: [8, 30, 8],
|
|
19063
19083
|
extrapolate: 'clamp'
|
|
19064
19084
|
});
|
|
19065
|
-
return /*#__PURE__*/
|
|
19085
|
+
return /*#__PURE__*/React.createElement(Animated$1.View, {
|
|
19066
19086
|
key: index,
|
|
19067
19087
|
style: [styles$7.indicator, {
|
|
19068
19088
|
backgroundColor: theme.derivedBackground,
|
|
@@ -19169,10 +19189,10 @@ var styles$7 = StyleSheet$1.create({
|
|
|
19169
19189
|
*/
|
|
19170
19190
|
|
|
19171
19191
|
function useWindowDimensions() {
|
|
19172
|
-
var _useState = useState(() => Dimensions.get('window')),
|
|
19192
|
+
var _useState = React.useState(() => Dimensions.get('window')),
|
|
19173
19193
|
dims = _useState[0],
|
|
19174
19194
|
setDims = _useState[1];
|
|
19175
|
-
useEffect(() => {
|
|
19195
|
+
React.useEffect(() => {
|
|
19176
19196
|
function handleChange(_ref) {
|
|
19177
19197
|
var window = _ref.window;
|
|
19178
19198
|
if (window != null) {
|
|
@@ -19201,7 +19221,7 @@ var Grid = function (_a) {
|
|
|
19201
19221
|
var tileContainers = [];
|
|
19202
19222
|
var currentTiles = [];
|
|
19203
19223
|
var gridTiles = section.tiles.filter(function (tile) {
|
|
19204
|
-
return tile.type !== TileType.Banner;
|
|
19224
|
+
return tile.type !== exports.TileType.Banner;
|
|
19205
19225
|
}).sort(function (a, b) {
|
|
19206
19226
|
if (a.priority !== b.priority) {
|
|
19207
19227
|
return b.priority - a.priority;
|
|
@@ -19209,12 +19229,12 @@ var Grid = function (_a) {
|
|
|
19209
19229
|
return section.tiles.indexOf(a) - section.tiles.indexOf(b);
|
|
19210
19230
|
});
|
|
19211
19231
|
var allHalfTiles = gridTiles.every(function (tile) {
|
|
19212
|
-
return tile.tileHeight === TileHeight.Half;
|
|
19232
|
+
return tile.tileHeight === exports.TileHeight.Half;
|
|
19213
19233
|
});
|
|
19214
19234
|
if (isDesktop && allHalfTiles) {
|
|
19215
19235
|
gridTiles.forEach(function (tile, index) {
|
|
19216
19236
|
var isLastInRow = (index + 1) % columnsPerRow === 0;
|
|
19217
|
-
tileContainers.push( /*#__PURE__*/
|
|
19237
|
+
tileContainers.push( /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
19218
19238
|
key: "container-".concat(index)
|
|
19219
19239
|
// @ts-ignore
|
|
19220
19240
|
,
|
|
@@ -19224,7 +19244,7 @@ var Grid = function (_a) {
|
|
|
19224
19244
|
marginBottom: gap,
|
|
19225
19245
|
height: 'auto'
|
|
19226
19246
|
}
|
|
19227
|
-
}, /*#__PURE__*/
|
|
19247
|
+
}, /*#__PURE__*/React__namespace.createElement(TileContainer, {
|
|
19228
19248
|
tiles: [tile]
|
|
19229
19249
|
})));
|
|
19230
19250
|
});
|
|
@@ -19235,12 +19255,12 @@ var Grid = function (_a) {
|
|
|
19235
19255
|
var nextTile = gridTiles[index + 1];
|
|
19236
19256
|
var shouldStartNewContainer = function (currentTiles, currentTile, nextTile) {
|
|
19237
19257
|
if (currentTiles.length === 2) return true;
|
|
19238
|
-
if (currentTile.tileHeight === TileHeight.Full) return true;
|
|
19239
|
-
if (currentTile.tileHeight === TileHeight.Half) {
|
|
19258
|
+
if (currentTile.tileHeight === exports.TileHeight.Full) return true;
|
|
19259
|
+
if (currentTile.tileHeight === exports.TileHeight.Half) {
|
|
19240
19260
|
if (!nextTile) return true;
|
|
19241
|
-
if (nextTile.tileHeight === TileHeight.Full) return true;
|
|
19261
|
+
if (nextTile.tileHeight === exports.TileHeight.Full) return true;
|
|
19242
19262
|
if (currentTiles.length === 0) return false;
|
|
19243
|
-
if (currentTiles.length === 1 && currentTiles[0].tileHeight === TileHeight.Half && nextTile.tileHeight === TileHeight.Half) {
|
|
19263
|
+
if (currentTiles.length === 1 && currentTiles[0].tileHeight === exports.TileHeight.Half && nextTile.tileHeight === exports.TileHeight.Half) {
|
|
19244
19264
|
return false;
|
|
19245
19265
|
}
|
|
19246
19266
|
}
|
|
@@ -19248,7 +19268,7 @@ var Grid = function (_a) {
|
|
|
19248
19268
|
};
|
|
19249
19269
|
if (shouldStartNewContainer(currentTiles, tile, nextTile)) {
|
|
19250
19270
|
var isLastInRow = (tileContainers.length + 1) % columnsPerRow === 0;
|
|
19251
|
-
tileContainers.push( /*#__PURE__*/
|
|
19271
|
+
tileContainers.push( /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
19252
19272
|
key: "container-".concat(index)
|
|
19253
19273
|
// @ts-ignore
|
|
19254
19274
|
,
|
|
@@ -19257,7 +19277,7 @@ var Grid = function (_a) {
|
|
|
19257
19277
|
marginRight: isLastInRow ? 0 : gap,
|
|
19258
19278
|
marginBottom: gap
|
|
19259
19279
|
}
|
|
19260
|
-
}, /*#__PURE__*/
|
|
19280
|
+
}, /*#__PURE__*/React__namespace.createElement(TileContainer, {
|
|
19261
19281
|
tiles: currentTiles
|
|
19262
19282
|
})));
|
|
19263
19283
|
currentTiles = [];
|
|
@@ -19265,10 +19285,10 @@ var Grid = function (_a) {
|
|
|
19265
19285
|
});
|
|
19266
19286
|
return tileContainers;
|
|
19267
19287
|
};
|
|
19268
|
-
return /*#__PURE__*/
|
|
19288
|
+
return /*#__PURE__*/React__namespace.createElement(View$2, null, /*#__PURE__*/React__namespace.createElement(SectionHeader, {
|
|
19269
19289
|
title: section.title,
|
|
19270
19290
|
description: section.description
|
|
19271
|
-
}), /*#__PURE__*/
|
|
19291
|
+
}), /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
19272
19292
|
style: styles$6.grid
|
|
19273
19293
|
}, renderGrid()));
|
|
19274
19294
|
};
|
|
@@ -19298,21 +19318,21 @@ var ProgressIndicator = function (_a) {
|
|
|
19298
19318
|
} else if (percentage < 50) {
|
|
19299
19319
|
progressVariant = 'accent';
|
|
19300
19320
|
}
|
|
19301
|
-
return /*#__PURE__*/
|
|
19321
|
+
return /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
19302
19322
|
style: styles$5.container
|
|
19303
|
-
}, /*#__PURE__*/
|
|
19323
|
+
}, /*#__PURE__*/React__namespace.createElement(ProgressBar, {
|
|
19304
19324
|
percentage: percentage,
|
|
19305
19325
|
variant: progressVariant,
|
|
19306
19326
|
height: height
|
|
19307
|
-
}), /*#__PURE__*/
|
|
19327
|
+
}), /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
19308
19328
|
style: [styles$5.circleContainer]
|
|
19309
|
-
}, /*#__PURE__*/
|
|
19329
|
+
}, /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
19310
19330
|
style: [styles$5.circle, {
|
|
19311
19331
|
borderColor: theme.derivedSurface[20],
|
|
19312
19332
|
backgroundColor: isComplete ? theme.primary : theme.surface,
|
|
19313
19333
|
borderWidth: isComplete ? 0 : 4
|
|
19314
19334
|
}]
|
|
19315
|
-
}, isComplete && /*#__PURE__*/
|
|
19335
|
+
}, isComplete && /*#__PURE__*/React__namespace.createElement(Icon, {
|
|
19316
19336
|
name: "Check",
|
|
19317
19337
|
size: 12,
|
|
19318
19338
|
color: theme.primaryText
|
|
@@ -19339,17 +19359,17 @@ var styles$5 = StyleSheet$1.create({
|
|
|
19339
19359
|
}
|
|
19340
19360
|
});
|
|
19341
19361
|
|
|
19342
|
-
var SectionContext = /*#__PURE__*/createContext(undefined);
|
|
19362
|
+
var SectionContext = /*#__PURE__*/React.createContext(undefined);
|
|
19343
19363
|
var Section = function (_a) {
|
|
19344
19364
|
var section = _a.section;
|
|
19345
19365
|
var renderSectionContent = function () {
|
|
19346
19366
|
switch (section.type) {
|
|
19347
|
-
case SectionType.Banner:
|
|
19348
|
-
return /*#__PURE__*/
|
|
19367
|
+
case exports.SectionType.Banner:
|
|
19368
|
+
return /*#__PURE__*/React.createElement(Carousel, {
|
|
19349
19369
|
section: section
|
|
19350
19370
|
});
|
|
19351
|
-
case SectionType.Grid:
|
|
19352
|
-
return /*#__PURE__*/
|
|
19371
|
+
case exports.SectionType.Grid:
|
|
19372
|
+
return /*#__PURE__*/React.createElement(Grid, {
|
|
19353
19373
|
section: section
|
|
19354
19374
|
});
|
|
19355
19375
|
default:
|
|
@@ -19357,11 +19377,11 @@ var Section = function (_a) {
|
|
|
19357
19377
|
return null;
|
|
19358
19378
|
}
|
|
19359
19379
|
};
|
|
19360
|
-
return /*#__PURE__*/
|
|
19380
|
+
return /*#__PURE__*/React.createElement(SectionContext.Provider, {
|
|
19361
19381
|
value: {
|
|
19362
19382
|
sectionData: section
|
|
19363
19383
|
}
|
|
19364
|
-
}, /*#__PURE__*/
|
|
19384
|
+
}, /*#__PURE__*/React.createElement(View$2, {
|
|
19365
19385
|
style: styles$4.section
|
|
19366
19386
|
}, renderSectionContent()));
|
|
19367
19387
|
};
|
|
@@ -19377,13 +19397,13 @@ var styles$4 = StyleSheet$1.create({
|
|
|
19377
19397
|
var Group = function (_a) {
|
|
19378
19398
|
var id = _a.id;
|
|
19379
19399
|
var getGroupByID = useWllSdk().getGroupByID;
|
|
19380
|
-
var _b = useState(null),
|
|
19400
|
+
var _b = React.useState(null),
|
|
19381
19401
|
groupData = _b[0],
|
|
19382
19402
|
setGroupData = _b[1];
|
|
19383
|
-
var _c = useState(true),
|
|
19403
|
+
var _c = React.useState(true),
|
|
19384
19404
|
loading = _c[0],
|
|
19385
19405
|
setLoading = _c[1];
|
|
19386
|
-
useEffect(function () {
|
|
19406
|
+
React.useEffect(function () {
|
|
19387
19407
|
var fetchGroup = function () {
|
|
19388
19408
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
19389
19409
|
var response;
|
|
@@ -19405,14 +19425,14 @@ var Group = function (_a) {
|
|
|
19405
19425
|
fetchGroup();
|
|
19406
19426
|
}, [id, getGroupByID]);
|
|
19407
19427
|
if (loading) {
|
|
19408
|
-
return /*#__PURE__*/
|
|
19428
|
+
return /*#__PURE__*/React.createElement(ActivityIndicator$1, {
|
|
19409
19429
|
size: "large"
|
|
19410
19430
|
});
|
|
19411
19431
|
}
|
|
19412
19432
|
if (!groupData) {
|
|
19413
|
-
return /*#__PURE__*/
|
|
19433
|
+
return /*#__PURE__*/React.createElement(Text$3, null, "No group data available");
|
|
19414
19434
|
}
|
|
19415
|
-
return /*#__PURE__*/
|
|
19435
|
+
return /*#__PURE__*/React.createElement(View$2, null, groupData.sections.sort(function (a, b) {
|
|
19416
19436
|
// Sort by priority (higher priority first)
|
|
19417
19437
|
if (a.priority !== b.priority) {
|
|
19418
19438
|
return b.priority - a.priority;
|
|
@@ -19420,7 +19440,7 @@ var Group = function (_a) {
|
|
|
19420
19440
|
// If priorities are equal, maintain original order
|
|
19421
19441
|
return groupData.sections.indexOf(a) - groupData.sections.indexOf(b);
|
|
19422
19442
|
}).map(function (section) {
|
|
19423
|
-
return /*#__PURE__*/
|
|
19443
|
+
return /*#__PURE__*/React.createElement(Section, {
|
|
19424
19444
|
key: section.id,
|
|
19425
19445
|
section: section
|
|
19426
19446
|
});
|
|
@@ -19443,22 +19463,22 @@ var PointsTile = function (_a) {
|
|
|
19443
19463
|
width: isFullSize ? '100%' : 'auto'
|
|
19444
19464
|
}
|
|
19445
19465
|
});
|
|
19446
|
-
return /*#__PURE__*/
|
|
19466
|
+
return /*#__PURE__*/React__namespace.createElement(BaseTile, {
|
|
19447
19467
|
tile: tile
|
|
19448
|
-
}, isFullSize && /*#__PURE__*/
|
|
19468
|
+
}, isFullSize && /*#__PURE__*/React__namespace.createElement(PointsTile.Image, {
|
|
19449
19469
|
isFullSize: isFullSize
|
|
19450
|
-
}), /*#__PURE__*/
|
|
19470
|
+
}), /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
19451
19471
|
style: styles.container
|
|
19452
|
-
}, !isFullSize && /*#__PURE__*/
|
|
19472
|
+
}, !isFullSize && /*#__PURE__*/React__namespace.createElement(PointsTile.Image, {
|
|
19453
19473
|
isFullSize: isFullSize
|
|
19454
|
-
}), /*#__PURE__*/
|
|
19474
|
+
}), /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
19455
19475
|
style: styles.contentContainer
|
|
19456
|
-
}, /*#__PURE__*/
|
|
19476
|
+
}, /*#__PURE__*/React__namespace.createElement(PointsTile.Title, null), /*#__PURE__*/React__namespace.createElement(PointsTile.Points, null))));
|
|
19457
19477
|
};
|
|
19458
19478
|
var PointsTileTitle = function () {
|
|
19459
19479
|
var configuration = useTileContext().configuration;
|
|
19460
19480
|
var title = configuration.title;
|
|
19461
|
-
return /*#__PURE__*/
|
|
19481
|
+
return /*#__PURE__*/React__namespace.createElement(Text, {
|
|
19462
19482
|
variant: "eyebrow"
|
|
19463
19483
|
}, title);
|
|
19464
19484
|
};
|
|
@@ -19483,11 +19503,11 @@ var PointsTilePoints = function () {
|
|
|
19483
19503
|
}
|
|
19484
19504
|
});
|
|
19485
19505
|
if (calculatedPoints === null) return null;
|
|
19486
|
-
return /*#__PURE__*/
|
|
19506
|
+
return /*#__PURE__*/React__namespace.createElement(Text, {
|
|
19487
19507
|
variant: "caption"
|
|
19488
|
-
}, prefix !== null && prefix !== void 0 ? prefix : '', /*#__PURE__*/
|
|
19508
|
+
}, prefix !== null && prefix !== void 0 ? prefix : '', /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
19489
19509
|
style: styles.pointsWithSuffix
|
|
19490
|
-
}, calculatedPoints, /*#__PURE__*/
|
|
19510
|
+
}, calculatedPoints, /*#__PURE__*/React__namespace.createElement(Text, {
|
|
19491
19511
|
style: styles.suffix
|
|
19492
19512
|
}, suffix !== null && suffix !== void 0 ? suffix : 'pts')));
|
|
19493
19513
|
};
|
|
@@ -19512,9 +19532,9 @@ var PointsTileImage = function (_a) {
|
|
|
19512
19532
|
}
|
|
19513
19533
|
});
|
|
19514
19534
|
if (!artworkUrl) return null;
|
|
19515
|
-
return /*#__PURE__*/
|
|
19535
|
+
return /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
19516
19536
|
style: styles.imageContainer
|
|
19517
|
-
}, /*#__PURE__*/
|
|
19537
|
+
}, /*#__PURE__*/React__namespace.createElement(Image$2, {
|
|
19518
19538
|
source: {
|
|
19519
19539
|
uri: artworkUrl
|
|
19520
19540
|
},
|
|
@@ -19529,9 +19549,9 @@ PointsTile.Image = PointsTileImage;
|
|
|
19529
19549
|
var RewardCategoryTile = function (_a) {
|
|
19530
19550
|
var tile = _a.tile;
|
|
19531
19551
|
if (!tile) return null;
|
|
19532
|
-
return /*#__PURE__*/
|
|
19552
|
+
return /*#__PURE__*/React__namespace.createElement(BaseTile, {
|
|
19533
19553
|
tile: tile
|
|
19534
|
-
}, /*#__PURE__*/
|
|
19554
|
+
}, /*#__PURE__*/React__namespace.createElement(RewardCategoryTile.Header, null), /*#__PURE__*/React__namespace.createElement(RewardCategoryTile.Background, null));
|
|
19535
19555
|
};
|
|
19536
19556
|
var RewardCategoryHeader = function () {
|
|
19537
19557
|
var theme = useWllSdk().theme;
|
|
@@ -19540,11 +19560,11 @@ var RewardCategoryHeader = function () {
|
|
|
19540
19560
|
showName = _a.showName,
|
|
19541
19561
|
name = _a.name;
|
|
19542
19562
|
if (!showName || !name) return null;
|
|
19543
|
-
return /*#__PURE__*/
|
|
19563
|
+
return /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
19544
19564
|
style: [styles$3.header, {
|
|
19545
19565
|
backgroundColor: theme.primary
|
|
19546
19566
|
}]
|
|
19547
|
-
}, /*#__PURE__*/
|
|
19567
|
+
}, /*#__PURE__*/React__namespace.createElement(Text, {
|
|
19548
19568
|
style: [styles$3.headerText, {
|
|
19549
19569
|
color: theme.primaryText
|
|
19550
19570
|
}],
|
|
@@ -19556,7 +19576,7 @@ var RewardCategoryBackground = function () {
|
|
|
19556
19576
|
var configuration = useTileContext().configuration;
|
|
19557
19577
|
var artworkUrl = configuration.artworkUrl;
|
|
19558
19578
|
if (!artworkUrl) return null;
|
|
19559
|
-
return /*#__PURE__*/
|
|
19579
|
+
return /*#__PURE__*/React__namespace.createElement(ProgressiveImage, {
|
|
19560
19580
|
source: {
|
|
19561
19581
|
uri: artworkUrl
|
|
19562
19582
|
},
|
|
@@ -19590,17 +19610,17 @@ RewardCategoryTile.Background = RewardCategoryBackground;
|
|
|
19590
19610
|
|
|
19591
19611
|
var RewardTile = function (_a) {
|
|
19592
19612
|
var tile = _a.tile;
|
|
19593
|
-
return /*#__PURE__*/
|
|
19613
|
+
return /*#__PURE__*/React__namespace.createElement(BaseTile, {
|
|
19594
19614
|
tile: tile
|
|
19595
|
-
}, /*#__PURE__*/
|
|
19615
|
+
}, /*#__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)));
|
|
19596
19616
|
};
|
|
19597
19617
|
var RewardTileMedia = function () {
|
|
19598
19618
|
var configuration = useTileContext().configuration;
|
|
19599
19619
|
var reward = configuration;
|
|
19600
19620
|
if (!(reward === null || reward === void 0 ? void 0 : reward.pictureUrl)) return null;
|
|
19601
|
-
return /*#__PURE__*/
|
|
19621
|
+
return /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
19602
19622
|
style: styles$2.imageContainer
|
|
19603
|
-
}, /*#__PURE__*/
|
|
19623
|
+
}, /*#__PURE__*/React__namespace.createElement(ProgressiveImage, {
|
|
19604
19624
|
source: {
|
|
19605
19625
|
uri: reward.pictureUrl
|
|
19606
19626
|
},
|
|
@@ -19611,7 +19631,7 @@ var RewardTileTitle = function () {
|
|
|
19611
19631
|
var configuration = useTileContext().configuration;
|
|
19612
19632
|
var reward = configuration;
|
|
19613
19633
|
if (!(reward === null || reward === void 0 ? void 0 : reward.name)) return null;
|
|
19614
|
-
return /*#__PURE__*/
|
|
19634
|
+
return /*#__PURE__*/React__namespace.createElement(Text, {
|
|
19615
19635
|
variant: "title",
|
|
19616
19636
|
ellipsizeMode: "tail",
|
|
19617
19637
|
numberOfLines: 1
|
|
@@ -19621,7 +19641,7 @@ var RewardTileDescription = function () {
|
|
|
19621
19641
|
var configuration = useTileContext().configuration;
|
|
19622
19642
|
var reward = configuration;
|
|
19623
19643
|
if (!(reward === null || reward === void 0 ? void 0 : reward.summary)) return null;
|
|
19624
|
-
return /*#__PURE__*/
|
|
19644
|
+
return /*#__PURE__*/React__namespace.createElement(Text, {
|
|
19625
19645
|
variant: "body"
|
|
19626
19646
|
}, reward.summary);
|
|
19627
19647
|
};
|
|
@@ -19633,12 +19653,12 @@ var RewardTilePoints = function () {
|
|
|
19633
19653
|
if ((reward === null || reward === void 0 ? void 0 : reward.price) === 0 || !reward.showPrice || calculatedPoints === null) {
|
|
19634
19654
|
return null;
|
|
19635
19655
|
}
|
|
19636
|
-
return /*#__PURE__*/
|
|
19656
|
+
return /*#__PURE__*/React__namespace.createElement(Text, {
|
|
19637
19657
|
variant: "caption",
|
|
19638
19658
|
style: styles$2.footer
|
|
19639
|
-
}, reward.pointsPrefix, /*#__PURE__*/
|
|
19659
|
+
}, reward.pointsPrefix, /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
19640
19660
|
style: styles$2.pointsContainer
|
|
19641
|
-
}, calculatedPoints, /*#__PURE__*/
|
|
19661
|
+
}, calculatedPoints, /*#__PURE__*/React__namespace.createElement(Text, {
|
|
19642
19662
|
style: [styles$2.suffix, {
|
|
19643
19663
|
color: theme.primary
|
|
19644
19664
|
}]
|
|
@@ -19646,13 +19666,13 @@ var RewardTilePoints = function () {
|
|
|
19646
19666
|
};
|
|
19647
19667
|
var RewardTileContent = function (_a) {
|
|
19648
19668
|
var children = _a.children;
|
|
19649
|
-
return /*#__PURE__*/
|
|
19669
|
+
return /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
19650
19670
|
style: styles$2.content
|
|
19651
19671
|
}, children);
|
|
19652
19672
|
};
|
|
19653
19673
|
var RewardTileChevron = function () {
|
|
19654
19674
|
var theme = useWllSdk().theme;
|
|
19655
|
-
return /*#__PURE__*/
|
|
19675
|
+
return /*#__PURE__*/React__namespace.createElement(Icon, {
|
|
19656
19676
|
name: "ChevronRight",
|
|
19657
19677
|
color: theme.derivedSurfaceText[20]
|
|
19658
19678
|
});
|
|
@@ -19724,39 +19744,39 @@ var TierTile$1 = function (_a) {
|
|
|
19724
19744
|
});
|
|
19725
19745
|
var renderTileContent = function () {
|
|
19726
19746
|
switch (configuration.type) {
|
|
19727
|
-
case TierTileType.currentTier:
|
|
19728
|
-
return /*#__PURE__*/
|
|
19747
|
+
case exports.TierTileType.currentTier:
|
|
19748
|
+
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(TierTile$1.Image, {
|
|
19729
19749
|
isFullSize: isFullSize
|
|
19730
|
-
}), /*#__PURE__*/
|
|
19750
|
+
}), /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
19731
19751
|
style: styles.container
|
|
19732
|
-
}, /*#__PURE__*/
|
|
19752
|
+
}, /*#__PURE__*/React__namespace.createElement(Text, {
|
|
19733
19753
|
variant: "caption"
|
|
19734
|
-
}, "Current Tier"), /*#__PURE__*/
|
|
19754
|
+
}, "Current Tier"), /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
19735
19755
|
style: styles.row
|
|
19736
|
-
}, /*#__PURE__*/
|
|
19737
|
-
case TierTileType.specificTier:
|
|
19738
|
-
return /*#__PURE__*/
|
|
19756
|
+
}, /*#__PURE__*/React__namespace.createElement(TierTile$1.Name, null), /*#__PURE__*/React__namespace.createElement(TierTile$1.Count, null))));
|
|
19757
|
+
case exports.TierTileType.specificTier:
|
|
19758
|
+
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(TierTile$1.Progress, null), /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
19739
19759
|
style: styles.container
|
|
19740
|
-
}, /*#__PURE__*/
|
|
19760
|
+
}, /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
19741
19761
|
style: styles.row
|
|
19742
|
-
}, /*#__PURE__*/
|
|
19762
|
+
}, /*#__PURE__*/React__namespace.createElement(View$2, null, /*#__PURE__*/React__namespace.createElement(Text, {
|
|
19743
19763
|
variant: "body"
|
|
19744
|
-
}, "Current Tier"), /*#__PURE__*/
|
|
19745
|
-
case TierTileType.currentTargetNext:
|
|
19746
|
-
return /*#__PURE__*/
|
|
19764
|
+
}, "Current Tier"), /*#__PURE__*/React__namespace.createElement(TierTile$1.Name, null)), /*#__PURE__*/React__namespace.createElement(View$2, null, /*#__PURE__*/React__namespace.createElement(TierTile$1.NextName, null)))));
|
|
19765
|
+
case exports.TierTileType.currentTargetNext:
|
|
19766
|
+
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(TierTile$1.Image, {
|
|
19747
19767
|
isFullSize: isFullSize
|
|
19748
|
-
}), /*#__PURE__*/
|
|
19768
|
+
}), /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
19749
19769
|
style: {
|
|
19750
19770
|
padding: 12
|
|
19751
19771
|
}
|
|
19752
|
-
}, /*#__PURE__*/
|
|
19772
|
+
}, /*#__PURE__*/React__namespace.createElement(TierTile$1.Progress, null), /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
19753
19773
|
style: styles.container
|
|
19754
|
-
}, /*#__PURE__*/
|
|
19774
|
+
}, /*#__PURE__*/React__namespace.createElement(TierTile$1.Count, null), /*#__PURE__*/React__namespace.createElement(TierTile$1.Description, null))));
|
|
19755
19775
|
default:
|
|
19756
19776
|
return null;
|
|
19757
19777
|
}
|
|
19758
19778
|
};
|
|
19759
|
-
return /*#__PURE__*/
|
|
19779
|
+
return /*#__PURE__*/React__namespace.createElement(BaseTile, {
|
|
19760
19780
|
tile: tile
|
|
19761
19781
|
}, renderTileContent());
|
|
19762
19782
|
};
|
|
@@ -19782,9 +19802,9 @@ var TierTileImage = function (_a) {
|
|
|
19782
19802
|
}
|
|
19783
19803
|
});
|
|
19784
19804
|
if (!tier) return null;
|
|
19785
|
-
return /*#__PURE__*/
|
|
19805
|
+
return /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
19786
19806
|
style: styles.imageContainer
|
|
19787
|
-
}, tier.artworkUrl && /*#__PURE__*/
|
|
19807
|
+
}, tier.artworkUrl && /*#__PURE__*/React__namespace.createElement(Image$2, {
|
|
19788
19808
|
source: {
|
|
19789
19809
|
uri: tier.artworkUrl
|
|
19790
19810
|
},
|
|
@@ -19794,44 +19814,44 @@ var TierTileImage = function (_a) {
|
|
|
19794
19814
|
var Name = function () {
|
|
19795
19815
|
var configuration = useTileContext().configuration;
|
|
19796
19816
|
var tier = configuration.tier;
|
|
19797
|
-
return /*#__PURE__*/
|
|
19817
|
+
return /*#__PURE__*/React__namespace.createElement(Text, {
|
|
19798
19818
|
variant: "title"
|
|
19799
19819
|
}, tier === null || tier === void 0 ? void 0 : tier.name);
|
|
19800
19820
|
};
|
|
19801
19821
|
var NextName = function () {
|
|
19802
19822
|
var configuration = useTileContext().configuration;
|
|
19803
19823
|
var targetTier = configuration.targetTier;
|
|
19804
|
-
return /*#__PURE__*/
|
|
19824
|
+
return /*#__PURE__*/React__namespace.createElement(Text, {
|
|
19805
19825
|
variant: "title"
|
|
19806
19826
|
}, targetTier === null || targetTier === void 0 ? void 0 : targetTier.name);
|
|
19807
19827
|
};
|
|
19808
19828
|
var Count = function () {
|
|
19809
19829
|
var configuration = useTileContext().configuration;
|
|
19810
19830
|
var tier = configuration.tier;
|
|
19811
|
-
return /*#__PURE__*/
|
|
19831
|
+
return /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
19812
19832
|
style: {
|
|
19813
19833
|
flexDirection: 'row',
|
|
19814
19834
|
alignItems: 'center',
|
|
19815
19835
|
justifyContent: 'flex-start'
|
|
19816
19836
|
}
|
|
19817
|
-
}, /*#__PURE__*/
|
|
19837
|
+
}, /*#__PURE__*/React__namespace.createElement(Text, {
|
|
19818
19838
|
variant: "tier-earned"
|
|
19819
|
-
}, "".concat(tier === null || tier === void 0 ? void 0 : tier.earnedPoints, "/")), /*#__PURE__*/
|
|
19839
|
+
}, "".concat(tier === null || tier === void 0 ? void 0 : tier.earnedPoints, "/")), /*#__PURE__*/React__namespace.createElement(Text, {
|
|
19820
19840
|
variant: "tier-requirement"
|
|
19821
19841
|
}, tier === null || tier === void 0 ? void 0 : tier.pointsRequirement));
|
|
19822
19842
|
};
|
|
19823
19843
|
var NextCount = function () {
|
|
19824
19844
|
var configuration = useTileContext().configuration;
|
|
19825
19845
|
var targetTier = configuration.targetTier;
|
|
19826
|
-
return /*#__PURE__*/
|
|
19846
|
+
return /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
19827
19847
|
style: {
|
|
19828
19848
|
flexDirection: 'row',
|
|
19829
19849
|
alignItems: 'center',
|
|
19830
19850
|
justifyContent: 'flex-start'
|
|
19831
19851
|
}
|
|
19832
|
-
}, /*#__PURE__*/
|
|
19852
|
+
}, /*#__PURE__*/React__namespace.createElement(Text, {
|
|
19833
19853
|
variant: "tier-earned"
|
|
19834
|
-
}, "".concat(targetTier === null || targetTier === void 0 ? void 0 : targetTier.earnedPoints, "/")), /*#__PURE__*/
|
|
19854
|
+
}, "".concat(targetTier === null || targetTier === void 0 ? void 0 : targetTier.earnedPoints, "/")), /*#__PURE__*/React__namespace.createElement(Text, {
|
|
19835
19855
|
variant: "tier-requirement"
|
|
19836
19856
|
}, targetTier === null || targetTier === void 0 ? void 0 : targetTier.pointsRequirement));
|
|
19837
19857
|
};
|
|
@@ -19841,7 +19861,7 @@ var Progress = function () {
|
|
|
19841
19861
|
if (!tier || tier.earnedPoints === undefined || tier.pointsRequirement === undefined) {
|
|
19842
19862
|
return null;
|
|
19843
19863
|
}
|
|
19844
|
-
return /*#__PURE__*/
|
|
19864
|
+
return /*#__PURE__*/React__namespace.createElement(ProgressIndicator, {
|
|
19845
19865
|
currentPoints: tier.earnedPoints,
|
|
19846
19866
|
maxPoints: tier.pointsRequirement,
|
|
19847
19867
|
attained: tier.attained
|
|
@@ -19850,7 +19870,7 @@ var Progress = function () {
|
|
|
19850
19870
|
var Description = function () {
|
|
19851
19871
|
var configuration = useTileContext().configuration;
|
|
19852
19872
|
var tier = configuration.tier;
|
|
19853
|
-
return /*#__PURE__*/
|
|
19873
|
+
return /*#__PURE__*/React__namespace.createElement(Text, {
|
|
19854
19874
|
variant: "body"
|
|
19855
19875
|
}, tier === null || tier === void 0 ? void 0 : tier.description);
|
|
19856
19876
|
};
|
|
@@ -19873,13 +19893,13 @@ var TierTileInner = function (_a) {
|
|
|
19873
19893
|
var isHalfSize = useTileSize(tile).isHalfSize;
|
|
19874
19894
|
// Determine which variant to show
|
|
19875
19895
|
if (!tier || Array.isArray(tier)) {
|
|
19876
|
-
return /*#__PURE__*/
|
|
19896
|
+
return /*#__PURE__*/React__namespace.createElement(TierTile.Empty, {
|
|
19877
19897
|
tile: tile
|
|
19878
19898
|
});
|
|
19879
19899
|
}
|
|
19880
|
-
return isHalfSize ? /*#__PURE__*/
|
|
19900
|
+
return isHalfSize ? /*#__PURE__*/React__namespace.createElement(TierTile.Half, {
|
|
19881
19901
|
tile: tile
|
|
19882
|
-
}) : /*#__PURE__*/
|
|
19902
|
+
}) : /*#__PURE__*/React__namespace.createElement(TierTile.Full, {
|
|
19883
19903
|
tile: tile
|
|
19884
19904
|
});
|
|
19885
19905
|
};
|
|
@@ -19893,27 +19913,27 @@ var TierTileFull = function (_a) {
|
|
|
19893
19913
|
artworkUrl = _b.artworkUrl,
|
|
19894
19914
|
name = _b.name,
|
|
19895
19915
|
description = _b.description;
|
|
19896
|
-
return /*#__PURE__*/
|
|
19916
|
+
return /*#__PURE__*/React__namespace.createElement(BaseTile, {
|
|
19897
19917
|
tile: tile
|
|
19898
|
-
}, artworkUrl && /*#__PURE__*/
|
|
19918
|
+
}, artworkUrl && /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
19899
19919
|
style: styles$1.header
|
|
19900
|
-
}, /*#__PURE__*/
|
|
19920
|
+
}, /*#__PURE__*/React__namespace.createElement(ProgressiveImage, {
|
|
19901
19921
|
source: {
|
|
19902
19922
|
uri: artworkUrl
|
|
19903
19923
|
},
|
|
19904
19924
|
style: styles$1.image,
|
|
19905
19925
|
resizeMode: "center"
|
|
19906
|
-
})), /*#__PURE__*/
|
|
19926
|
+
})), /*#__PURE__*/React__namespace.createElement(Column, {
|
|
19907
19927
|
align: "stretch",
|
|
19908
19928
|
justify: artworkUrl ? 'start' : 'center',
|
|
19909
19929
|
direction: "column"
|
|
19910
|
-
}, /*#__PURE__*/
|
|
19930
|
+
}, /*#__PURE__*/React__namespace.createElement(View$2, null, title && /*#__PURE__*/React__namespace.createElement(Text, {
|
|
19911
19931
|
variant: "eyebrow",
|
|
19912
19932
|
style: styles$1.title
|
|
19913
|
-
}, title), name && /*#__PURE__*/
|
|
19933
|
+
}, title), name && /*#__PURE__*/React__namespace.createElement(Text, {
|
|
19914
19934
|
variant: "title",
|
|
19915
19935
|
style: styles$1.title
|
|
19916
|
-
}, name), description && /*#__PURE__*/
|
|
19936
|
+
}, name), description && /*#__PURE__*/React__namespace.createElement(Text, {
|
|
19917
19937
|
variant: "body"
|
|
19918
19938
|
}, description))));
|
|
19919
19939
|
};
|
|
@@ -19925,24 +19945,24 @@ var TierTileHalf = function (_a) {
|
|
|
19925
19945
|
title = configuration.title;
|
|
19926
19946
|
var artworkUrl = tier.artworkUrl,
|
|
19927
19947
|
name = tier.name;
|
|
19928
|
-
return /*#__PURE__*/
|
|
19948
|
+
return /*#__PURE__*/React__namespace.createElement(BaseTile, {
|
|
19929
19949
|
tile: tile
|
|
19930
|
-
}, /*#__PURE__*/
|
|
19950
|
+
}, /*#__PURE__*/React__namespace.createElement(Column, {
|
|
19931
19951
|
align: "center",
|
|
19932
19952
|
justify: "between",
|
|
19933
19953
|
direction: "row",
|
|
19934
19954
|
style: {
|
|
19935
19955
|
paddingTop: 16
|
|
19936
19956
|
}
|
|
19937
|
-
}, /*#__PURE__*/
|
|
19957
|
+
}, /*#__PURE__*/React__namespace.createElement(View$2, null, title && /*#__PURE__*/React__namespace.createElement(Text, {
|
|
19938
19958
|
variant: "eyebrow",
|
|
19939
19959
|
style: styles$1.title
|
|
19940
|
-
}, title), name && /*#__PURE__*/
|
|
19960
|
+
}, title), name && /*#__PURE__*/React__namespace.createElement(Text, {
|
|
19941
19961
|
variant: "title",
|
|
19942
19962
|
style: styles$1.title
|
|
19943
|
-
}, name)), artworkUrl && /*#__PURE__*/
|
|
19963
|
+
}, name)), artworkUrl && /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
19944
19964
|
style: styles$1.smallImageContainer
|
|
19945
|
-
}, /*#__PURE__*/
|
|
19965
|
+
}, /*#__PURE__*/React__namespace.createElement(Image$2, {
|
|
19946
19966
|
source: {
|
|
19947
19967
|
uri: artworkUrl
|
|
19948
19968
|
},
|
|
@@ -19959,27 +19979,27 @@ var TierTileEmpty = function (_a) {
|
|
|
19959
19979
|
emptyArtworkUrl = configuration.emptyArtworkUrl;
|
|
19960
19980
|
var isHalfSize = useTileSize(tile).isHalfSize;
|
|
19961
19981
|
if (isHalfSize) {
|
|
19962
|
-
return /*#__PURE__*/
|
|
19982
|
+
return /*#__PURE__*/React__namespace.createElement(BaseTile, {
|
|
19963
19983
|
tile: tile
|
|
19964
|
-
}, /*#__PURE__*/
|
|
19984
|
+
}, /*#__PURE__*/React__namespace.createElement(Column, {
|
|
19965
19985
|
align: "center",
|
|
19966
19986
|
justify: "between",
|
|
19967
19987
|
direction: "row",
|
|
19968
19988
|
style: {
|
|
19969
19989
|
paddingTop: 16
|
|
19970
19990
|
}
|
|
19971
|
-
}, /*#__PURE__*/
|
|
19991
|
+
}, /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
19972
19992
|
style: {
|
|
19973
19993
|
flex: 1
|
|
19974
19994
|
}
|
|
19975
|
-
}, title && /*#__PURE__*/
|
|
19995
|
+
}, title && /*#__PURE__*/React__namespace.createElement(Text, {
|
|
19976
19996
|
variant: "title",
|
|
19977
19997
|
style: styles$1.title
|
|
19978
|
-
}, title), emptyDescription && /*#__PURE__*/
|
|
19998
|
+
}, title), emptyDescription && /*#__PURE__*/React__namespace.createElement(Text, {
|
|
19979
19999
|
variant: "body"
|
|
19980
|
-
}, emptyDescription)), emptyArtworkUrl && /*#__PURE__*/
|
|
20000
|
+
}, emptyDescription)), emptyArtworkUrl && /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
19981
20001
|
style: styles$1.smallImageContainer
|
|
19982
|
-
}, /*#__PURE__*/
|
|
20002
|
+
}, /*#__PURE__*/React__namespace.createElement(Image$2, {
|
|
19983
20003
|
source: {
|
|
19984
20004
|
uri: emptyArtworkUrl
|
|
19985
20005
|
},
|
|
@@ -19987,24 +20007,24 @@ var TierTileEmpty = function (_a) {
|
|
|
19987
20007
|
resizeMode: "contain"
|
|
19988
20008
|
}))));
|
|
19989
20009
|
}
|
|
19990
|
-
return /*#__PURE__*/
|
|
20010
|
+
return /*#__PURE__*/React__namespace.createElement(BaseTile, {
|
|
19991
20011
|
tile: tile
|
|
19992
|
-
}, emptyArtworkUrl && /*#__PURE__*/
|
|
20012
|
+
}, emptyArtworkUrl && /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
19993
20013
|
style: styles$1.header
|
|
19994
|
-
}, /*#__PURE__*/
|
|
20014
|
+
}, /*#__PURE__*/React__namespace.createElement(ProgressiveImage, {
|
|
19995
20015
|
source: {
|
|
19996
20016
|
uri: emptyArtworkUrl
|
|
19997
20017
|
},
|
|
19998
20018
|
style: styles$1.image,
|
|
19999
20019
|
resizeMode: "center"
|
|
20000
|
-
})), /*#__PURE__*/
|
|
20020
|
+
})), /*#__PURE__*/React__namespace.createElement(Column, {
|
|
20001
20021
|
align: "stretch",
|
|
20002
20022
|
justify: "center",
|
|
20003
20023
|
direction: "column"
|
|
20004
|
-
}, /*#__PURE__*/
|
|
20024
|
+
}, /*#__PURE__*/React__namespace.createElement(View$2, null, title && /*#__PURE__*/React__namespace.createElement(Text, {
|
|
20005
20025
|
variant: "title",
|
|
20006
20026
|
style: styles$1.title
|
|
20007
|
-
}, title), emptyDescription && /*#__PURE__*/
|
|
20027
|
+
}, title), emptyDescription && /*#__PURE__*/React__namespace.createElement(Text, {
|
|
20008
20028
|
variant: "body"
|
|
20009
20029
|
}, emptyDescription))));
|
|
20010
20030
|
};
|
|
@@ -20049,44 +20069,44 @@ var TileContainer = function (_a) {
|
|
|
20049
20069
|
var tiles = _a.tiles;
|
|
20050
20070
|
var renderTile = function (tile) {
|
|
20051
20071
|
switch (tile.type) {
|
|
20052
|
-
case TileType.Content:
|
|
20053
|
-
return /*#__PURE__*/
|
|
20072
|
+
case exports.TileType.Content:
|
|
20073
|
+
return /*#__PURE__*/React__namespace.createElement(ContentTile, {
|
|
20054
20074
|
tile: tile
|
|
20055
20075
|
});
|
|
20056
|
-
case TileType.Badge:
|
|
20057
|
-
return /*#__PURE__*/
|
|
20076
|
+
case exports.TileType.Badge:
|
|
20077
|
+
return /*#__PURE__*/React__namespace.createElement(BadgeTile, {
|
|
20058
20078
|
tile: tile
|
|
20059
20079
|
});
|
|
20060
|
-
case TileType.Tier:
|
|
20061
|
-
return /*#__PURE__*/
|
|
20080
|
+
case exports.TileType.Tier:
|
|
20081
|
+
return /*#__PURE__*/React__namespace.createElement(TierTile, {
|
|
20062
20082
|
tile: tile
|
|
20063
20083
|
});
|
|
20064
|
-
case TileType.Points:
|
|
20065
|
-
return /*#__PURE__*/
|
|
20084
|
+
case exports.TileType.Points:
|
|
20085
|
+
return /*#__PURE__*/React__namespace.createElement(PointsTile, {
|
|
20066
20086
|
tile: tile
|
|
20067
20087
|
});
|
|
20068
|
-
case TileType.Reward:
|
|
20069
|
-
return /*#__PURE__*/
|
|
20088
|
+
case exports.TileType.Reward:
|
|
20089
|
+
return /*#__PURE__*/React__namespace.createElement(RewardTile, {
|
|
20070
20090
|
tile: tile
|
|
20071
20091
|
});
|
|
20072
|
-
case TileType.RewardCategory:
|
|
20073
|
-
return /*#__PURE__*/
|
|
20092
|
+
case exports.TileType.RewardCategory:
|
|
20093
|
+
return /*#__PURE__*/React__namespace.createElement(RewardCategoryTile, {
|
|
20074
20094
|
tile: tile
|
|
20075
20095
|
});
|
|
20076
20096
|
}
|
|
20077
20097
|
};
|
|
20078
20098
|
// Check if all tiles are half height
|
|
20079
20099
|
var allHalfTiles = tiles.every(function (tile) {
|
|
20080
|
-
return tile.tileHeight === TileHeight.Half;
|
|
20100
|
+
return tile.tileHeight === exports.TileHeight.Half;
|
|
20081
20101
|
});
|
|
20082
|
-
return /*#__PURE__*/
|
|
20102
|
+
return /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
20083
20103
|
style: [styles.container, allHalfTiles ? {
|
|
20084
20104
|
aspectRatio: 2
|
|
20085
20105
|
} : {
|
|
20086
20106
|
aspectRatio: 1
|
|
20087
20107
|
}]
|
|
20088
20108
|
}, tiles.map(function (tile, index) {
|
|
20089
|
-
return /*#__PURE__*/
|
|
20109
|
+
return /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
20090
20110
|
key: tile.id,
|
|
20091
20111
|
style: [styles.tileContainer, index > 0 && {
|
|
20092
20112
|
marginTop: GRID_GAP
|
|
@@ -20109,5 +20129,40 @@ var Reward = /** @class */function () {
|
|
|
20109
20129
|
return Reward;
|
|
20110
20130
|
}();
|
|
20111
20131
|
|
|
20112
|
-
|
|
20132
|
+
exports.BadgeTile = BadgeTile$1;
|
|
20133
|
+
exports.BadgeTileConfig = BadgeTileConfig;
|
|
20134
|
+
exports.BadgeTileUpdated = BadgeTile;
|
|
20135
|
+
exports.BannerTile = BannerTile;
|
|
20136
|
+
exports.BannerTileConfig = BannerTileConfig;
|
|
20137
|
+
exports.BaseBanner = BaseBanner;
|
|
20138
|
+
exports.BaseTile = BaseTile;
|
|
20139
|
+
exports.Button = Button;
|
|
20140
|
+
exports.Carousel = Carousel;
|
|
20141
|
+
exports.Content = Column;
|
|
20142
|
+
exports.ContentTile = ContentTile;
|
|
20143
|
+
exports.ContentTileConfig = ContentTileConfig;
|
|
20144
|
+
exports.Grid = Grid;
|
|
20145
|
+
exports.Group = Group;
|
|
20146
|
+
exports.Icon = Icon;
|
|
20147
|
+
exports.LoadingIndicator = LoadingIndicator;
|
|
20148
|
+
exports.PointsTile = PointsTile;
|
|
20149
|
+
exports.PointsTileConfig = PointsTileConfig;
|
|
20150
|
+
exports.ProgressBar = ProgressBar;
|
|
20151
|
+
exports.ProgressIndicator = ProgressIndicator;
|
|
20152
|
+
exports.ProgressiveImage = ProgressiveImage;
|
|
20153
|
+
exports.Reward = Reward;
|
|
20154
|
+
exports.RewardCategoryTile = RewardCategoryTile;
|
|
20155
|
+
exports.RewardCategoryTileConfig = RewardCategoryTileConfig;
|
|
20156
|
+
exports.RewardTile = RewardTile;
|
|
20157
|
+
exports.RewardTileConfig = RewardTileConfig;
|
|
20158
|
+
exports.RowHeader = RowHeader;
|
|
20159
|
+
exports.Section = Section;
|
|
20160
|
+
exports.SectionHeader = SectionHeader;
|
|
20161
|
+
exports.Text = Text;
|
|
20162
|
+
exports.TierTile = TierTile$1;
|
|
20163
|
+
exports.TierTileConfig = TierTileConfig;
|
|
20164
|
+
exports.TierTileUpdated = TierTile;
|
|
20165
|
+
exports.TileContainer = TileContainer;
|
|
20166
|
+
exports.WllSdkProvider = WllSdkProvider;
|
|
20167
|
+
exports.useWllSdk = useWllSdk;
|
|
20113
20168
|
//# sourceMappingURL=index.js.map
|