@wlloyalty/wll-react-sdk 1.0.24 → 1.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +13 -1
- package/dist/index.js +586 -330
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6395,7 +6395,7 @@ var Text$2 = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
6395
6395
|
}
|
|
6396
6396
|
supportedProps.style = [numberOfLines != null && numberOfLines > 1 && {
|
|
6397
6397
|
WebkitLineClamp: numberOfLines
|
|
6398
|
-
}, hasTextAncestor === true ? styles$
|
|
6398
|
+
}, hasTextAncestor === true ? styles$w.textHasAncestor$raw : styles$w.text$raw, numberOfLines === 1 && styles$w.textOneLine, numberOfLines != null && numberOfLines > 1 && styles$w.textMultiLine, props.style, selectable === true && styles$w.selectable, selectable === false && styles$w.notSelectable, onPress && styles$w.pressable];
|
|
6399
6399
|
if (props.href != null) {
|
|
6400
6400
|
component = 'a';
|
|
6401
6401
|
if (hrefAttrs != null) {
|
|
@@ -6440,7 +6440,7 @@ var textStyle = {
|
|
|
6440
6440
|
whiteSpace: 'pre-wrap',
|
|
6441
6441
|
wordWrap: 'break-word'
|
|
6442
6442
|
};
|
|
6443
|
-
var styles$
|
|
6443
|
+
var styles$w = StyleSheet$1.create({
|
|
6444
6444
|
text$raw: textStyle,
|
|
6445
6445
|
textHasAncestor$raw: _objectSpread2(_objectSpread2({}, textStyle), {}, {
|
|
6446
6446
|
color: 'inherit',
|
|
@@ -7075,7 +7075,7 @@ var View$1 = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
7075
7075
|
var writingDirection = componentDirection || contextDirection;
|
|
7076
7076
|
var supportedProps = pickProps(rest);
|
|
7077
7077
|
supportedProps.dir = componentDirection;
|
|
7078
|
-
supportedProps.style = [styles$
|
|
7078
|
+
supportedProps.style = [styles$v.view$raw, hasTextAncestor && styles$v.inline, props.style];
|
|
7079
7079
|
if (props.href != null) {
|
|
7080
7080
|
component = 'a';
|
|
7081
7081
|
if (hrefAttrs != null) {
|
|
@@ -7101,7 +7101,7 @@ var View$1 = /*#__PURE__*/React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
7101
7101
|
});
|
|
7102
7102
|
});
|
|
7103
7103
|
View$1.displayName = 'View';
|
|
7104
|
-
var styles$
|
|
7104
|
+
var styles$v = StyleSheet$1.create({
|
|
7105
7105
|
view$raw: {
|
|
7106
7106
|
alignItems: 'stretch',
|
|
7107
7107
|
backgroundColor: 'transparent',
|
|
@@ -7202,14 +7202,14 @@ function TouchableOpacity(props, forwardedRef) {
|
|
|
7202
7202
|
focusable: !disabled && focusable !== false,
|
|
7203
7203
|
pointerEvents: disabled ? 'box-none' : undefined,
|
|
7204
7204
|
ref: setRef,
|
|
7205
|
-
style: [styles$
|
|
7205
|
+
style: [styles$u.root, !disabled && styles$u.actionable, style, opacityOverride != null && {
|
|
7206
7206
|
opacity: opacityOverride
|
|
7207
7207
|
}, {
|
|
7208
7208
|
transitionDuration: duration
|
|
7209
7209
|
}]
|
|
7210
7210
|
}));
|
|
7211
7211
|
}
|
|
7212
|
-
var styles$
|
|
7212
|
+
var styles$u = StyleSheet$1.create({
|
|
7213
7213
|
root: {
|
|
7214
7214
|
transitionProperty: 'opacity',
|
|
7215
7215
|
transitionDuration: '0.15s',
|
|
@@ -7302,6 +7302,16 @@ function __generator(thisArg, body) {
|
|
|
7302
7302
|
}
|
|
7303
7303
|
}
|
|
7304
7304
|
|
|
7305
|
+
function __spreadArray(to, from, pack) {
|
|
7306
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
7307
|
+
if (ar || !(i in from)) {
|
|
7308
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
7309
|
+
ar[i] = from[i];
|
|
7310
|
+
}
|
|
7311
|
+
}
|
|
7312
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
7313
|
+
}
|
|
7314
|
+
|
|
7305
7315
|
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
7306
7316
|
var e = new Error(message);
|
|
7307
7317
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
@@ -7496,75 +7506,45 @@ var desaturateColor = function (color) {
|
|
|
7496
7506
|
var getStateColor = function (baseColor, type, count) {
|
|
7497
7507
|
return shouldDesaturate(type, count) ? desaturateColor(baseColor) : baseColor;
|
|
7498
7508
|
};
|
|
7499
|
-
|
|
7500
|
-
|
|
7501
|
-
|
|
7502
|
-
|
|
7503
|
-
|
|
7504
|
-
|
|
7505
|
-
|
|
7506
|
-
|
|
7507
|
-
|
|
7508
|
-
|
|
7509
|
-
|
|
7510
|
-
|
|
7511
|
-
|
|
7512
|
-
|
|
7513
|
-
|
|
7514
|
-
|
|
7515
|
-
|
|
7516
|
-
|
|
7517
|
-
|
|
7518
|
-
|
|
7519
|
-
|
|
7520
|
-
|
|
7521
|
-
|
|
7522
|
-
|
|
7523
|
-
|
|
7524
|
-
|
|
7525
|
-
|
|
7526
|
-
|
|
7527
|
-
|
|
7528
|
-
|
|
7529
|
-
|
|
7530
|
-
|
|
7531
|
-
|
|
7532
|
-
|
|
7533
|
-
|
|
7534
|
-
|
|
7535
|
-
|
|
7536
|
-
|
|
7537
|
-
|
|
7538
|
-
var setTheme = React.useCallback(function (newTheme) {
|
|
7539
|
-
setThemeState(function (prevTheme) {
|
|
7540
|
-
return createTheme(__assign(__assign({}, prevTheme), newTheme));
|
|
7541
|
-
});
|
|
7542
|
-
}, []);
|
|
7543
|
-
var getGroupByID = useGetGroupByID(config);
|
|
7544
|
-
var getSectionByID = useGetSectionByID(config);
|
|
7545
|
-
var getTileByID = useGetTileByID(config);
|
|
7546
|
-
var handleNavigation = useNavigation(navigationConfig);
|
|
7547
|
-
var contextValue = React.useMemo(function () {
|
|
7548
|
-
return {
|
|
7549
|
-
theme: theme,
|
|
7550
|
-
setTheme: setTheme,
|
|
7551
|
-
getGroupByID: getGroupByID,
|
|
7552
|
-
getSectionByID: getSectionByID,
|
|
7553
|
-
getTileByID: getTileByID,
|
|
7554
|
-
handleNavigation: handleNavigation
|
|
7555
|
-
};
|
|
7556
|
-
}, [theme, setTheme, getGroupByID, getSectionByID, getTileByID, handleNavigation]);
|
|
7557
|
-
return /*#__PURE__*/React.createElement(WllSdkContext.Provider, {
|
|
7558
|
-
value: contextValue
|
|
7559
|
-
}, children);
|
|
7560
|
-
};
|
|
7561
|
-
var useWllSdk = function () {
|
|
7562
|
-
var context = React.useContext(WllSdkContext);
|
|
7563
|
-
if (context === undefined) {
|
|
7564
|
-
throw new Error('useWllSdk must be used within a WllSdkProvider');
|
|
7565
|
-
}
|
|
7566
|
-
return context;
|
|
7567
|
-
};
|
|
7509
|
+
// Storybook Themes
|
|
7510
|
+
({
|
|
7511
|
+
modern: __assign(__assign({}, defaultTheme), {
|
|
7512
|
+
primary: '#f72585',
|
|
7513
|
+
accent: '#ffc300',
|
|
7514
|
+
background: '#e5e5e5',
|
|
7515
|
+
surface: '#f4f3ee',
|
|
7516
|
+
surfaceText: '#f72585'
|
|
7517
|
+
}),
|
|
7518
|
+
warm: __assign(__assign({}, defaultTheme), {
|
|
7519
|
+
primary: '#014F5C',
|
|
7520
|
+
accent: '#F38A51',
|
|
7521
|
+
background: '#BE9C80',
|
|
7522
|
+
surface: '#F1CFB3',
|
|
7523
|
+
surfaceText: '#014F5C'
|
|
7524
|
+
}),
|
|
7525
|
+
dark: __assign(__assign({}, defaultTheme), {
|
|
7526
|
+
background: '#1e1e1e',
|
|
7527
|
+
text: '#ffffff',
|
|
7528
|
+
primary: '#ffbe0b',
|
|
7529
|
+
accent: '#d00000',
|
|
7530
|
+
surface: '#2f3037',
|
|
7531
|
+
surfaceText: '#ffffff'
|
|
7532
|
+
}),
|
|
7533
|
+
forest: __assign(__assign({}, defaultTheme), {
|
|
7534
|
+
primary: '#354f52',
|
|
7535
|
+
accent: '#84a98c',
|
|
7536
|
+
background: '#f0f4f0',
|
|
7537
|
+
surface: '#cad2c5',
|
|
7538
|
+
surfaceText: '#2d3436'
|
|
7539
|
+
}),
|
|
7540
|
+
sunset: __assign(__assign({}, defaultTheme), {
|
|
7541
|
+
primary: '#c32f27',
|
|
7542
|
+
accent: '#db7c26',
|
|
7543
|
+
background: '#f9edcc',
|
|
7544
|
+
surface: '#f0dfad',
|
|
7545
|
+
surfaceText: '#2d3436'
|
|
7546
|
+
})
|
|
7547
|
+
});
|
|
7568
7548
|
|
|
7569
7549
|
/**
|
|
7570
7550
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
@@ -7739,6 +7719,196 @@ if (canUseDOM$1) {
|
|
|
7739
7719
|
}
|
|
7740
7720
|
}
|
|
7741
7721
|
|
|
7722
|
+
var DIMENSION_MODES = {
|
|
7723
|
+
DESKTOP: 'desktop',
|
|
7724
|
+
TABLET: 'tablet',
|
|
7725
|
+
MOBILE: 'mobile'
|
|
7726
|
+
};
|
|
7727
|
+
var TABLET_SCREEN_WIDTH = 728;
|
|
7728
|
+
var SMALL_SCREEN_WIDTH = 530;
|
|
7729
|
+
|
|
7730
|
+
/**
|
|
7731
|
+
* Copyright (c) Nicolas Gallagher.
|
|
7732
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
7733
|
+
*
|
|
7734
|
+
* This source code is licensed under the MIT license found in the
|
|
7735
|
+
* LICENSE file in the root directory of this source tree.
|
|
7736
|
+
*
|
|
7737
|
+
*
|
|
7738
|
+
*/
|
|
7739
|
+
|
|
7740
|
+
var Platform = {
|
|
7741
|
+
OS: 'web',
|
|
7742
|
+
select: obj => 'web' in obj ? obj.web : obj.default,
|
|
7743
|
+
get isTesting() {
|
|
7744
|
+
if (process.env.NODE_ENV === 'test') {
|
|
7745
|
+
return true;
|
|
7746
|
+
}
|
|
7747
|
+
return false;
|
|
7748
|
+
}
|
|
7749
|
+
};
|
|
7750
|
+
var Platform$1 = Platform;
|
|
7751
|
+
|
|
7752
|
+
var isWeb = Platform$1.OS === 'web';
|
|
7753
|
+
function getDimensionMode(window) {
|
|
7754
|
+
if (!window || !window.width) {
|
|
7755
|
+
return DIMENSION_MODES.MOBILE;
|
|
7756
|
+
}
|
|
7757
|
+
var screenWidth = window.width;
|
|
7758
|
+
if (screenWidth >= TABLET_SCREEN_WIDTH) {
|
|
7759
|
+
return DIMENSION_MODES.DESKTOP;
|
|
7760
|
+
}
|
|
7761
|
+
if (screenWidth >= SMALL_SCREEN_WIDTH) {
|
|
7762
|
+
return DIMENSION_MODES.TABLET;
|
|
7763
|
+
}
|
|
7764
|
+
return DIMENSION_MODES.MOBILE;
|
|
7765
|
+
}
|
|
7766
|
+
function useResponsive$1() {
|
|
7767
|
+
var deviceWindow = Dimensions.get('window');
|
|
7768
|
+
var _a = React.useState(getDimensionMode(deviceWindow)),
|
|
7769
|
+
dimensionMode = _a[0],
|
|
7770
|
+
setDimensionMode = _a[1];
|
|
7771
|
+
React.useEffect(function () {
|
|
7772
|
+
if (!isWeb) return;
|
|
7773
|
+
var subscription = Dimensions.addEventListener('change', function (_a) {
|
|
7774
|
+
var window = _a.window;
|
|
7775
|
+
if (window) {
|
|
7776
|
+
var mode = getDimensionMode(window);
|
|
7777
|
+
setDimensionMode(mode);
|
|
7778
|
+
}
|
|
7779
|
+
});
|
|
7780
|
+
return function () {
|
|
7781
|
+
if (subscription) {
|
|
7782
|
+
subscription.remove();
|
|
7783
|
+
}
|
|
7784
|
+
};
|
|
7785
|
+
}, []);
|
|
7786
|
+
return {
|
|
7787
|
+
dimensionMode: dimensionMode,
|
|
7788
|
+
isDesktop: dimensionMode === DIMENSION_MODES.DESKTOP,
|
|
7789
|
+
isTablet: dimensionMode === DIMENSION_MODES.TABLET,
|
|
7790
|
+
isMobile: dimensionMode === DIMENSION_MODES.MOBILE
|
|
7791
|
+
};
|
|
7792
|
+
}
|
|
7793
|
+
|
|
7794
|
+
var ResponsiveContext = /*#__PURE__*/React.createContext(undefined);
|
|
7795
|
+
function ResponsiveProvider(_a) {
|
|
7796
|
+
var children = _a.children;
|
|
7797
|
+
var _b = React.useState(function () {
|
|
7798
|
+
var window = Dimensions.get('window');
|
|
7799
|
+
var dimensionMode = getDimensionMode(window);
|
|
7800
|
+
return {
|
|
7801
|
+
dimensionMode: dimensionMode,
|
|
7802
|
+
isDesktop: dimensionMode === DIMENSION_MODES.DESKTOP,
|
|
7803
|
+
isTablet: dimensionMode === DIMENSION_MODES.TABLET,
|
|
7804
|
+
isMobile: dimensionMode === DIMENSION_MODES.MOBILE
|
|
7805
|
+
};
|
|
7806
|
+
}),
|
|
7807
|
+
state = _b[0],
|
|
7808
|
+
setState = _b[1];
|
|
7809
|
+
React.useEffect(function () {
|
|
7810
|
+
var subscription = Dimensions.addEventListener('change', function (_a) {
|
|
7811
|
+
var window = _a.window;
|
|
7812
|
+
if (window) {
|
|
7813
|
+
var dimensionMode = getDimensionMode(window);
|
|
7814
|
+
setState({
|
|
7815
|
+
dimensionMode: dimensionMode,
|
|
7816
|
+
isDesktop: dimensionMode === DIMENSION_MODES.DESKTOP,
|
|
7817
|
+
isTablet: dimensionMode === DIMENSION_MODES.TABLET,
|
|
7818
|
+
isMobile: dimensionMode === DIMENSION_MODES.MOBILE
|
|
7819
|
+
});
|
|
7820
|
+
}
|
|
7821
|
+
});
|
|
7822
|
+
return function () {
|
|
7823
|
+
if (subscription) {
|
|
7824
|
+
subscription.remove();
|
|
7825
|
+
}
|
|
7826
|
+
};
|
|
7827
|
+
}, []);
|
|
7828
|
+
return /*#__PURE__*/React.createElement(ResponsiveContext.Provider, {
|
|
7829
|
+
value: state
|
|
7830
|
+
}, children);
|
|
7831
|
+
}
|
|
7832
|
+
function useResponsive() {
|
|
7833
|
+
var context = React.useContext(ResponsiveContext);
|
|
7834
|
+
if (context === undefined) {
|
|
7835
|
+
throw new Error('useResponsive must be used within a ResponsiveProvider');
|
|
7836
|
+
}
|
|
7837
|
+
return context;
|
|
7838
|
+
}
|
|
7839
|
+
|
|
7840
|
+
var createTheme = function (baseTheme) {
|
|
7841
|
+
if (baseTheme === void 0) {
|
|
7842
|
+
baseTheme = {};
|
|
7843
|
+
}
|
|
7844
|
+
var mergedTheme = __assign(__assign({}, defaultTheme), baseTheme);
|
|
7845
|
+
var background = mergedTheme.background,
|
|
7846
|
+
primary = mergedTheme.primary,
|
|
7847
|
+
accent = mergedTheme.accent,
|
|
7848
|
+
positive = mergedTheme.positive,
|
|
7849
|
+
negative = mergedTheme.negative,
|
|
7850
|
+
surfaceText = mergedTheme.surfaceText,
|
|
7851
|
+
surface = mergedTheme.surface,
|
|
7852
|
+
text = mergedTheme.text;
|
|
7853
|
+
return __assign(__assign({}, mergedTheme), {
|
|
7854
|
+
sizes: sizes,
|
|
7855
|
+
derivedBackground: getDerivedColor(background),
|
|
7856
|
+
primaryText: getReadableTextColor(primary),
|
|
7857
|
+
accentText: getReadableTextColor(accent),
|
|
7858
|
+
positiveText: getReadableTextColor(positive),
|
|
7859
|
+
negativeText: getReadableTextColor(negative),
|
|
7860
|
+
derivedSurface: getDerivedColorPercentages(surface),
|
|
7861
|
+
derivedSurfaceText: getDerivedColorPercentages(surfaceText),
|
|
7862
|
+
alphaDerivedPrimary: getAlphaDerivedColors(primary),
|
|
7863
|
+
alphaDerivedText: getAlphaDerivedColors(text)
|
|
7864
|
+
});
|
|
7865
|
+
};
|
|
7866
|
+
var WllSdkContext = /*#__PURE__*/React.createContext(undefined);
|
|
7867
|
+
var WllSdkProvider = function (_a) {
|
|
7868
|
+
var children = _a.children,
|
|
7869
|
+
providedTheme = _a.theme,
|
|
7870
|
+
config = _a.config,
|
|
7871
|
+
_b = _a.navigationConfig,
|
|
7872
|
+
navigationConfig = _b === void 0 ? {} : _b;
|
|
7873
|
+
var _c = React.useState(function () {
|
|
7874
|
+
return createTheme(providedTheme || {});
|
|
7875
|
+
}),
|
|
7876
|
+
theme = _c[0],
|
|
7877
|
+
setThemeState = _c[1];
|
|
7878
|
+
React.useEffect(function () {
|
|
7879
|
+
setThemeState(createTheme(providedTheme || {}));
|
|
7880
|
+
}, [providedTheme]);
|
|
7881
|
+
var setTheme = React.useCallback(function (newTheme) {
|
|
7882
|
+
setThemeState(function (prevTheme) {
|
|
7883
|
+
return createTheme(__assign(__assign({}, prevTheme), newTheme));
|
|
7884
|
+
});
|
|
7885
|
+
}, []);
|
|
7886
|
+
var getGroupByID = useGetGroupByID(config);
|
|
7887
|
+
var getSectionByID = useGetSectionByID(config);
|
|
7888
|
+
var getTileByID = useGetTileByID(config);
|
|
7889
|
+
var handleNavigation = useNavigation(navigationConfig);
|
|
7890
|
+
var contextValue = React.useMemo(function () {
|
|
7891
|
+
return {
|
|
7892
|
+
theme: theme,
|
|
7893
|
+
setTheme: setTheme,
|
|
7894
|
+
getGroupByID: getGroupByID,
|
|
7895
|
+
getSectionByID: getSectionByID,
|
|
7896
|
+
getTileByID: getTileByID,
|
|
7897
|
+
handleNavigation: handleNavigation
|
|
7898
|
+
};
|
|
7899
|
+
}, [theme, setTheme, getGroupByID, getSectionByID, getTileByID, handleNavigation]);
|
|
7900
|
+
return /*#__PURE__*/React.createElement(WllSdkContext.Provider, {
|
|
7901
|
+
value: contextValue
|
|
7902
|
+
}, /*#__PURE__*/React.createElement(ResponsiveProvider, null, children));
|
|
7903
|
+
};
|
|
7904
|
+
var useWllSdk = function () {
|
|
7905
|
+
var context = React.useContext(WllSdkContext);
|
|
7906
|
+
if (context === undefined) {
|
|
7907
|
+
throw new Error('useWllSdk must be used within a WllSdkProvider');
|
|
7908
|
+
}
|
|
7909
|
+
return context;
|
|
7910
|
+
};
|
|
7911
|
+
|
|
7742
7912
|
var BREAKPOINTS = {
|
|
7743
7913
|
MOBILE: 0,
|
|
7744
7914
|
TABLET: 767,
|
|
@@ -7764,6 +7934,11 @@ var createResponsiveStyle = function (style) {
|
|
|
7764
7934
|
}, {});
|
|
7765
7935
|
return responsiveStyle;
|
|
7766
7936
|
};
|
|
7937
|
+
var getResponsiveValue = function (desktopValue, mobileValue, isDesktop, isTablet) {
|
|
7938
|
+
if (isDesktop) return desktopValue;
|
|
7939
|
+
if (isTablet) return Math.round((desktopValue + mobileValue) / 2); // Tablet gets the middle value
|
|
7940
|
+
return mobileValue;
|
|
7941
|
+
};
|
|
7767
7942
|
|
|
7768
7943
|
function createVariantSystem(baseStyle, variantStyles) {
|
|
7769
7944
|
return function (theme, variant) {
|
|
@@ -7772,22 +7947,7 @@ function createVariantSystem(baseStyle, variantStyles) {
|
|
|
7772
7947
|
};
|
|
7773
7948
|
}
|
|
7774
7949
|
|
|
7775
|
-
var
|
|
7776
|
-
button: createResponsiveStyle({
|
|
7777
|
-
justifyContent: 'center',
|
|
7778
|
-
alignItems: 'center',
|
|
7779
|
-
paddingHorizontal: [12, 12, 24],
|
|
7780
|
-
paddingVertical: [12, 12, 12],
|
|
7781
|
-
alignSelf: 'flex-start'
|
|
7782
|
-
}),
|
|
7783
|
-
// @ts-ignore
|
|
7784
|
-
text: createResponsiveStyle({
|
|
7785
|
-
textAlign: 'center',
|
|
7786
|
-
textTransform: 'uppercase',
|
|
7787
|
-
fontSize: [12, 12, 18]
|
|
7788
|
-
})
|
|
7789
|
-
});
|
|
7790
|
-
var useButtonStyles = createVariantSystem(styles$s.button, function (theme) {
|
|
7950
|
+
var useButtonStyles = createVariantSystem({}, function (theme) {
|
|
7791
7951
|
return {
|
|
7792
7952
|
primary: {
|
|
7793
7953
|
backgroundColor: theme.primary
|
|
@@ -7803,7 +7963,7 @@ var useButtonStyles = createVariantSystem(styles$s.button, function (theme) {
|
|
|
7803
7963
|
}
|
|
7804
7964
|
};
|
|
7805
7965
|
});
|
|
7806
|
-
var useTextStyles = createVariantSystem(
|
|
7966
|
+
var useTextStyles = createVariantSystem({}, function (theme) {
|
|
7807
7967
|
return {
|
|
7808
7968
|
primary: {
|
|
7809
7969
|
color: theme.primaryText
|
|
@@ -7824,17 +7984,33 @@ var Button = function (_a) {
|
|
|
7824
7984
|
onPress = _a.onPress,
|
|
7825
7985
|
variant = _a.variant;
|
|
7826
7986
|
var theme = useWllSdk().theme;
|
|
7987
|
+
var _b = useResponsive$1(),
|
|
7988
|
+
isDesktop = _b.isDesktop,
|
|
7989
|
+
isTablet = _b.isTablet;
|
|
7827
7990
|
var buttonStyle = useButtonStyles(theme, variant);
|
|
7828
7991
|
var textStyle = useTextStyles(theme, variant);
|
|
7992
|
+
var dynamicStyles = StyleSheet$1.create({
|
|
7993
|
+
button: {
|
|
7994
|
+
justifyContent: 'center',
|
|
7995
|
+
alignItems: 'center',
|
|
7996
|
+
paddingHorizontal: getResponsiveValue(24, 12, isDesktop, isTablet),
|
|
7997
|
+
paddingVertical: 12,
|
|
7998
|
+
alignSelf: 'flex-start'
|
|
7999
|
+
},
|
|
8000
|
+
text: {
|
|
8001
|
+
textAlign: 'center',
|
|
8002
|
+
textTransform: 'uppercase',
|
|
8003
|
+
fontSize: getResponsiveValue(18, 12, isDesktop, isTablet),
|
|
8004
|
+
fontWeight: '700'
|
|
8005
|
+
}
|
|
8006
|
+
});
|
|
7829
8007
|
return /*#__PURE__*/React__namespace.createElement(TouchableOpacity$1, {
|
|
7830
|
-
style: [buttonStyle, {
|
|
8008
|
+
style: [dynamicStyles.button, buttonStyle, {
|
|
7831
8009
|
borderRadius: theme.sizes.borderRadiusButton
|
|
7832
8010
|
}],
|
|
7833
8011
|
onPress: onPress
|
|
7834
8012
|
}, /*#__PURE__*/React__namespace.createElement(Text$3, {
|
|
7835
|
-
style: [
|
|
7836
|
-
fontWeight: '700'
|
|
7837
|
-
}]
|
|
8013
|
+
style: [dynamicStyles.text, textStyle]
|
|
7838
8014
|
}, title));
|
|
7839
8015
|
};
|
|
7840
8016
|
|
|
@@ -7863,14 +8039,14 @@ var Column = function (_a) {
|
|
|
7863
8039
|
_e = _a.style,
|
|
7864
8040
|
style = _e === void 0 ? {} : _e;
|
|
7865
8041
|
return /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
7866
|
-
style: [styles$
|
|
8042
|
+
style: [styles$t.column, {
|
|
7867
8043
|
justifyContent: justifyMap[justify],
|
|
7868
8044
|
alignItems: alignMap[align],
|
|
7869
8045
|
flexDirection: direction
|
|
7870
8046
|
}, style]
|
|
7871
8047
|
}, children);
|
|
7872
8048
|
};
|
|
7873
|
-
var styles$
|
|
8049
|
+
var styles$t = StyleSheet$1.create({
|
|
7874
8050
|
column: __assign({
|
|
7875
8051
|
flex: 1
|
|
7876
8052
|
}, createResponsiveStyle({
|
|
@@ -7937,17 +8113,17 @@ var ActivityIndicator = /*#__PURE__*/React__namespace.forwardRef((props, forward
|
|
|
7937
8113
|
"aria-valuemin": 0,
|
|
7938
8114
|
ref: forwardedRef,
|
|
7939
8115
|
role: "progressbar",
|
|
7940
|
-
style: [styles$
|
|
8116
|
+
style: [styles$s.container, style]
|
|
7941
8117
|
}), /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
7942
8118
|
children: svg,
|
|
7943
8119
|
style: [typeof size === 'number' ? {
|
|
7944
8120
|
height: size,
|
|
7945
8121
|
width: size
|
|
7946
|
-
} : indicatorSizes[size], styles$
|
|
8122
|
+
} : indicatorSizes[size], styles$s.animation, !animating && styles$s.animationPause, !animating && hidesWhenStopped && styles$s.hidesWhenStopped]
|
|
7947
8123
|
}));
|
|
7948
8124
|
});
|
|
7949
8125
|
ActivityIndicator.displayName = 'ActivityIndicator';
|
|
7950
|
-
var styles$
|
|
8126
|
+
var styles$s = StyleSheet$1.create({
|
|
7951
8127
|
container: {
|
|
7952
8128
|
alignItems: 'center',
|
|
7953
8129
|
justifyContent: 'center'
|
|
@@ -7987,7 +8163,7 @@ var ActivityIndicator$1 = ActivityIndicator;
|
|
|
7987
8163
|
var LoadingIndicator = function () {
|
|
7988
8164
|
var theme = useWllSdk().theme;
|
|
7989
8165
|
return /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
7990
|
-
style: [styles$
|
|
8166
|
+
style: [styles$r.container, {
|
|
7991
8167
|
borderRadius: theme.sizes.borderRadiusSm,
|
|
7992
8168
|
padding: theme.sizes.md
|
|
7993
8169
|
}]
|
|
@@ -7996,7 +8172,7 @@ var LoadingIndicator = function () {
|
|
|
7996
8172
|
color: theme.primary
|
|
7997
8173
|
}));
|
|
7998
8174
|
};
|
|
7999
|
-
var styles$
|
|
8175
|
+
var styles$r = StyleSheet$1.create({
|
|
8000
8176
|
container: {
|
|
8001
8177
|
width: '100%',
|
|
8002
8178
|
height: '100%',
|
|
@@ -8007,28 +8183,6 @@ var styles$p = StyleSheet$1.create({
|
|
|
8007
8183
|
}
|
|
8008
8184
|
});
|
|
8009
8185
|
|
|
8010
|
-
/**
|
|
8011
|
-
* Copyright (c) Nicolas Gallagher.
|
|
8012
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
8013
|
-
*
|
|
8014
|
-
* This source code is licensed under the MIT license found in the
|
|
8015
|
-
* LICENSE file in the root directory of this source tree.
|
|
8016
|
-
*
|
|
8017
|
-
*
|
|
8018
|
-
*/
|
|
8019
|
-
|
|
8020
|
-
var Platform = {
|
|
8021
|
-
OS: 'web',
|
|
8022
|
-
select: obj => 'web' in obj ? obj.web : obj.default,
|
|
8023
|
-
get isTesting() {
|
|
8024
|
-
if (process.env.NODE_ENV === 'test') {
|
|
8025
|
-
return true;
|
|
8026
|
-
}
|
|
8027
|
-
return false;
|
|
8028
|
-
}
|
|
8029
|
-
};
|
|
8030
|
-
var Platform$1 = Platform;
|
|
8031
|
-
|
|
8032
8186
|
/**
|
|
8033
8187
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
8034
8188
|
*
|
|
@@ -8332,14 +8486,14 @@ var ScrollViewBase = /*#__PURE__*/React__namespace.forwardRef((props, forwardedR
|
|
|
8332
8486
|
onTouchMove: createPreventableScrollHandler(onTouchMove),
|
|
8333
8487
|
onWheel: createPreventableScrollHandler(onWheel),
|
|
8334
8488
|
ref: useMergeRefs$1(scrollRef, forwardedRef),
|
|
8335
|
-
style: [style, !scrollEnabled && styles$
|
|
8489
|
+
style: [style, !scrollEnabled && styles$q.scrollDisabled, hideScrollbar && styles$q.hideScrollbar]
|
|
8336
8490
|
}));
|
|
8337
8491
|
});
|
|
8338
8492
|
|
|
8339
8493
|
// Chrome doesn't support e.preventDefault in this case; touch-action must be
|
|
8340
8494
|
// used to disable scrolling.
|
|
8341
8495
|
// https://developers.google.com/web/updates/2017/01/scrolling-intervention
|
|
8342
|
-
var styles$
|
|
8496
|
+
var styles$q = StyleSheet$1.create({
|
|
8343
8497
|
scrollDisabled: {
|
|
8344
8498
|
overflowX: 'hidden',
|
|
8345
8499
|
overflowY: 'hidden',
|
|
@@ -8978,7 +9132,7 @@ let ScrollView$1 = class ScrollView extends React.Component {
|
|
|
8978
9132
|
var isSticky = hasStickyHeaderIndices && stickyHeaderIndices.indexOf(i) > -1;
|
|
8979
9133
|
if (child != null && (isSticky || pagingEnabled)) {
|
|
8980
9134
|
return /*#__PURE__*/React.createElement(View$2, {
|
|
8981
|
-
style: [isSticky && styles$
|
|
9135
|
+
style: [isSticky && styles$p.stickyHeader, pagingEnabled && styles$p.pagingEnabledChild]
|
|
8982
9136
|
}, child);
|
|
8983
9137
|
} else {
|
|
8984
9138
|
return child;
|
|
@@ -8988,10 +9142,10 @@ let ScrollView$1 = class ScrollView extends React.Component {
|
|
|
8988
9142
|
children: children,
|
|
8989
9143
|
collapsable: false,
|
|
8990
9144
|
ref: this._setInnerViewRef,
|
|
8991
|
-
style: [horizontal && styles$
|
|
9145
|
+
style: [horizontal && styles$p.contentContainerHorizontal, centerContent && styles$p.contentContainerCenterContent, contentContainerStyle]
|
|
8992
9146
|
}));
|
|
8993
|
-
var baseStyle = horizontal ? styles$
|
|
8994
|
-
var pagingEnabledStyle = horizontal ? styles$
|
|
9147
|
+
var baseStyle = horizontal ? styles$p.baseHorizontal : styles$p.baseVertical;
|
|
9148
|
+
var pagingEnabledStyle = horizontal ? styles$p.pagingEnabledHorizontal : styles$p.pagingEnabledVertical;
|
|
8995
9149
|
var props = _objectSpread2(_objectSpread2({}, other), {}, {
|
|
8996
9150
|
style: [baseStyle, pagingEnabled && pagingEnabledStyle, this.props.style],
|
|
8997
9151
|
onTouchStart: this.scrollResponderHandleTouchStart,
|
|
@@ -9034,7 +9188,7 @@ var commonStyle = {
|
|
|
9034
9188
|
// iOS native scrolling
|
|
9035
9189
|
WebkitOverflowScrolling: 'touch'
|
|
9036
9190
|
};
|
|
9037
|
-
var styles$
|
|
9191
|
+
var styles$p = StyleSheet$1.create({
|
|
9038
9192
|
baseVertical: _objectSpread2(_objectSpread2({}, commonStyle), {}, {
|
|
9039
9193
|
flexDirection: 'column',
|
|
9040
9194
|
overflowX: 'hidden',
|
|
@@ -10247,7 +10401,7 @@ class CellRenderer extends React__namespace.Component {
|
|
|
10247
10401
|
ItemSeparatorComponent :
|
|
10248
10402
|
// $FlowFixMe[incompatible-type]
|
|
10249
10403
|
ItemSeparatorComponent && /*#__PURE__*/React__namespace.createElement(ItemSeparatorComponent, this.state.separatorProps);
|
|
10250
|
-
var cellStyle = inversionStyle ? horizontal ? [styles$
|
|
10404
|
+
var cellStyle = inversionStyle ? horizontal ? [styles$o.rowReverse, inversionStyle] : [styles$o.columnReverse, inversionStyle] : horizontal ? [styles$o.row, inversionStyle] : inversionStyle;
|
|
10251
10405
|
var result = !CellRendererComponent ? /*#__PURE__*/React__namespace.createElement(View$2, _extends$1({
|
|
10252
10406
|
style: cellStyle,
|
|
10253
10407
|
onFocusCapture: onCellFocusCapture
|
|
@@ -10267,7 +10421,7 @@ class CellRenderer extends React__namespace.Component {
|
|
|
10267
10421
|
}, result);
|
|
10268
10422
|
}
|
|
10269
10423
|
}
|
|
10270
|
-
var styles$
|
|
10424
|
+
var styles$o = StyleSheet$1.create({
|
|
10271
10425
|
row: {
|
|
10272
10426
|
flexDirection: 'row'
|
|
10273
10427
|
},
|
|
@@ -11447,7 +11601,7 @@ class VirtualizedList extends StateSafePureComponent {
|
|
|
11447
11601
|
var _this$props6 = this.props,
|
|
11448
11602
|
data = _this$props6.data,
|
|
11449
11603
|
horizontal = _this$props6.horizontal;
|
|
11450
|
-
var inversionStyle = this.props.inverted ? horizontalOrDefault(this.props.horizontal) ? styles$
|
|
11604
|
+
var inversionStyle = this.props.inverted ? horizontalOrDefault(this.props.horizontal) ? styles$n.horizontallyInverted : styles$n.verticallyInverted : null;
|
|
11451
11605
|
var cells = [];
|
|
11452
11606
|
var stickyIndicesFromProps = new Set(this.props.stickyHeaderIndices);
|
|
11453
11607
|
var stickyHeaderIndices = [];
|
|
@@ -11611,7 +11765,7 @@ class VirtualizedList extends StateSafePureComponent {
|
|
|
11611
11765
|
}*/
|
|
11612
11766
|
if (this.props.debug) {
|
|
11613
11767
|
return /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
11614
|
-
style: styles$
|
|
11768
|
+
style: styles$n.debug
|
|
11615
11769
|
}, ret, this._renderDebugOverlay());
|
|
11616
11770
|
} else {
|
|
11617
11771
|
return ret;
|
|
@@ -11728,20 +11882,20 @@ class VirtualizedList extends StateSafePureComponent {
|
|
|
11728
11882
|
var visTop = this._scrollMetrics.offset;
|
|
11729
11883
|
var visLen = this._scrollMetrics.visibleLength;
|
|
11730
11884
|
return /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
11731
|
-
style: [styles$
|
|
11885
|
+
style: [styles$n.debugOverlayBase, styles$n.debugOverlay]
|
|
11732
11886
|
}, framesInLayout.map((f, ii) => /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
11733
11887
|
key: 'f' + ii,
|
|
11734
|
-
style: [styles$
|
|
11888
|
+
style: [styles$n.debugOverlayBase, styles$n.debugOverlayFrame, {
|
|
11735
11889
|
top: f.offset * normalize,
|
|
11736
11890
|
height: f.length * normalize
|
|
11737
11891
|
}]
|
|
11738
11892
|
})), /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
11739
|
-
style: [styles$
|
|
11893
|
+
style: [styles$n.debugOverlayBase, styles$n.debugOverlayFrameLast, {
|
|
11740
11894
|
top: windowTop * normalize,
|
|
11741
11895
|
height: windowLen * normalize
|
|
11742
11896
|
}]
|
|
11743
11897
|
}), /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
11744
|
-
style: [styles$
|
|
11898
|
+
style: [styles$n.debugOverlayBase, styles$n.debugOverlayFrameVis, {
|
|
11745
11899
|
top: visTop * normalize,
|
|
11746
11900
|
height: visLen * normalize
|
|
11747
11901
|
}]
|
|
@@ -11882,7 +12036,7 @@ class VirtualizedList extends StateSafePureComponent {
|
|
|
11882
12036
|
}
|
|
11883
12037
|
}
|
|
11884
12038
|
VirtualizedList.contextType = VirtualizedListContext;
|
|
11885
|
-
var styles$
|
|
12039
|
+
var styles$n = StyleSheet$1.create({
|
|
11886
12040
|
verticallyInverted: {
|
|
11887
12041
|
transform: 'scaleY(-1)'
|
|
11888
12042
|
},
|
|
@@ -12259,7 +12413,7 @@ let FlatList$1 = class FlatList extends React__namespace.PureComponent {
|
|
|
12259
12413
|
_index = info.index;
|
|
12260
12414
|
invariant$1(Array.isArray(_item2), 'Expected array of items with numColumns > 1');
|
|
12261
12415
|
return /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
12262
|
-
style: [styles$
|
|
12416
|
+
style: [styles$m.row, columnWrapperStyle]
|
|
12263
12417
|
}, _item2.map((it, kk) => {
|
|
12264
12418
|
var element = render({
|
|
12265
12419
|
// $FlowFixMe[incompatible-call]
|
|
@@ -12385,7 +12539,7 @@ let FlatList$1 = class FlatList extends React__namespace.PureComponent {
|
|
|
12385
12539
|
);
|
|
12386
12540
|
}
|
|
12387
12541
|
};
|
|
12388
|
-
var styles$
|
|
12542
|
+
var styles$m = StyleSheet$1.create({
|
|
12389
12543
|
row: {
|
|
12390
12544
|
flexDirection: 'row'
|
|
12391
12545
|
}
|
|
@@ -14772,7 +14926,7 @@ var Image$1 = /*#__PURE__*/React__namespace.forwardRef((props, ref) => {
|
|
|
14772
14926
|
// Accessibility image allows users to trigger the browser's image context menu
|
|
14773
14927
|
var hiddenImage = displayImageUri ? createElement$1('img', {
|
|
14774
14928
|
alt: ariaLabel || '',
|
|
14775
|
-
style: styles$
|
|
14929
|
+
style: styles$l.accessibilityImage$raw,
|
|
14776
14930
|
draggable: draggable || false,
|
|
14777
14931
|
ref: hiddenImageRef,
|
|
14778
14932
|
src: displayImageUri
|
|
@@ -14844,14 +14998,14 @@ var Image$1 = /*#__PURE__*/React__namespace.forwardRef((props, ref) => {
|
|
|
14844
14998
|
onLayout: handleLayout,
|
|
14845
14999
|
pointerEvents: pointerEvents,
|
|
14846
15000
|
ref: ref,
|
|
14847
|
-
style: [styles$
|
|
15001
|
+
style: [styles$l.root, hasTextAncestor && styles$l.inline, imageSizeStyle, style, styles$l.undo,
|
|
14848
15002
|
// TEMP: avoid deprecated shadow props regression
|
|
14849
15003
|
// until Image refactored to use createElement.
|
|
14850
15004
|
{
|
|
14851
15005
|
boxShadow: null
|
|
14852
15006
|
}]
|
|
14853
15007
|
}), /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
14854
|
-
style: [styles$
|
|
15008
|
+
style: [styles$l.image, resizeModeStyles[resizeMode], {
|
|
14855
15009
|
backgroundImage,
|
|
14856
15010
|
filter
|
|
14857
15011
|
}, backgroundSize != null && {
|
|
@@ -14873,7 +15027,7 @@ ImageWithStatics.prefetch = function (uri) {
|
|
|
14873
15027
|
ImageWithStatics.queryCache = function (uris) {
|
|
14874
15028
|
return ImageLoader$1.queryCache(uris);
|
|
14875
15029
|
};
|
|
14876
|
-
var styles$
|
|
15030
|
+
var styles$l = StyleSheet$1.create({
|
|
14877
15031
|
root: {
|
|
14878
15032
|
flexBasis: 'auto',
|
|
14879
15033
|
overflow: 'hidden',
|
|
@@ -17977,7 +18131,7 @@ function _extends() {
|
|
|
17977
18131
|
}, _extends.apply(null, arguments);
|
|
17978
18132
|
}
|
|
17979
18133
|
|
|
17980
|
-
var styles$
|
|
18134
|
+
var styles$k = StyleSheet$1.create({
|
|
17981
18135
|
imageOverlay: {
|
|
17982
18136
|
position: 'absolute',
|
|
17983
18137
|
left: 0,
|
|
@@ -18012,25 +18166,25 @@ var ProgressiveImage = function (_a) {
|
|
|
18012
18166
|
var baseColor = theme.alphaDerivedPrimary[20];
|
|
18013
18167
|
var desaturatedColor = desaturateColor(baseColor);
|
|
18014
18168
|
return /*#__PURE__*/React.createElement(View$2, {
|
|
18015
|
-
style: [styles$
|
|
18169
|
+
style: [styles$k.container, style, {
|
|
18016
18170
|
backgroundColor: isDesaturated ? desaturatedColor : baseColor
|
|
18017
18171
|
}]
|
|
18018
18172
|
}, isDesaturated ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Animated$1.Image, _extends({}, props, {
|
|
18019
18173
|
source: source,
|
|
18020
|
-
style: [styles$
|
|
18174
|
+
style: [styles$k.imageOverlay, {
|
|
18021
18175
|
opacity: imageAnimated,
|
|
18022
18176
|
tintColor: desaturatedColor
|
|
18023
18177
|
}],
|
|
18024
18178
|
onLoad: onImageLoad
|
|
18025
18179
|
})), /*#__PURE__*/React.createElement(Animated$1.Image, _extends({}, props, {
|
|
18026
18180
|
source: source,
|
|
18027
|
-
style: [styles$
|
|
18181
|
+
style: [styles$k.imageOverlay, {
|
|
18028
18182
|
opacity: 0.1
|
|
18029
18183
|
}],
|
|
18030
18184
|
onLoad: onImageLoad
|
|
18031
18185
|
}))) : /*#__PURE__*/React.createElement(Animated$1.Image, _extends({}, props, {
|
|
18032
18186
|
source: source,
|
|
18033
|
-
style: [styles$
|
|
18187
|
+
style: [styles$k.imageOverlay, {
|
|
18034
18188
|
opacity: imageAnimated
|
|
18035
18189
|
}],
|
|
18036
18190
|
onLoad: onImageLoad
|
|
@@ -18042,10 +18196,10 @@ var RowHeader = function (_a) {
|
|
|
18042
18196
|
style = _a.style,
|
|
18043
18197
|
props = __rest(_a, ["children", "style"]);
|
|
18044
18198
|
return /*#__PURE__*/React__namespace.createElement(View$2, _extends({
|
|
18045
|
-
style: [styles$
|
|
18199
|
+
style: [styles$j.header, style]
|
|
18046
18200
|
}, props), children);
|
|
18047
18201
|
};
|
|
18048
|
-
var styles$
|
|
18202
|
+
var styles$j = StyleSheet$1.create({
|
|
18049
18203
|
header: createResponsiveStyle({
|
|
18050
18204
|
flexDirection: 'row',
|
|
18051
18205
|
alignItems: 'center',
|
|
@@ -18061,56 +18215,59 @@ var Text = function (_a) {
|
|
|
18061
18215
|
_a.isSurface;
|
|
18062
18216
|
var props = __rest(_a, ["variant", "style", "isSurface"]);
|
|
18063
18217
|
var theme = useWllSdk().theme;
|
|
18218
|
+
var _d = useResponsive(),
|
|
18219
|
+
isDesktop = _d.isDesktop,
|
|
18220
|
+
isTablet = _d.isTablet;
|
|
18064
18221
|
var getVariantStyle = function (variant) {
|
|
18065
18222
|
var baseStyle = {
|
|
18066
18223
|
color: theme.surfaceText
|
|
18067
18224
|
};
|
|
18068
18225
|
switch (variant) {
|
|
18069
18226
|
case 'eyebrow':
|
|
18070
|
-
return
|
|
18071
|
-
fontSize:
|
|
18072
|
-
marginBottom:
|
|
18073
|
-
})
|
|
18227
|
+
return __assign(__assign({}, baseStyle), {
|
|
18228
|
+
fontSize: getResponsiveValue(14, 12, isDesktop, isTablet),
|
|
18229
|
+
marginBottom: getResponsiveValue(8, 4, isDesktop, isTablet)
|
|
18230
|
+
});
|
|
18074
18231
|
case 'title':
|
|
18075
|
-
return
|
|
18076
|
-
fontSize:
|
|
18232
|
+
return __assign(__assign({}, baseStyle), {
|
|
18233
|
+
fontSize: getResponsiveValue(24, 14, isDesktop, isTablet),
|
|
18077
18234
|
fontWeight: 'bold'
|
|
18078
|
-
})
|
|
18079
|
-
case 'description':
|
|
18080
|
-
return createResponsiveStyle(__assign({}, baseStyle));
|
|
18235
|
+
});
|
|
18081
18236
|
case 'body':
|
|
18082
|
-
return
|
|
18237
|
+
return {
|
|
18083
18238
|
color: theme.derivedSurfaceText[20],
|
|
18084
|
-
fontSize:
|
|
18085
|
-
}
|
|
18239
|
+
fontSize: getResponsiveValue(14, 10, isDesktop, isTablet)
|
|
18240
|
+
};
|
|
18086
18241
|
case 'caption':
|
|
18087
|
-
return
|
|
18242
|
+
return __assign(__assign({}, baseStyle), {
|
|
18088
18243
|
fontWeight: 'bold',
|
|
18089
|
-
fontSize:
|
|
18244
|
+
fontSize: getResponsiveValue(24, 18, isDesktop, isTablet),
|
|
18090
18245
|
color: theme.primary
|
|
18091
|
-
})
|
|
18092
|
-
case 'label':
|
|
18093
|
-
return createResponsiveStyle(__assign({}, baseStyle));
|
|
18246
|
+
});
|
|
18094
18247
|
case 'tier-earned':
|
|
18095
|
-
return
|
|
18096
|
-
fontSize:
|
|
18248
|
+
return __assign(__assign({}, baseStyle), {
|
|
18249
|
+
fontSize: getResponsiveValue(20, 14, isDesktop, isTablet),
|
|
18097
18250
|
fontWeight: 'bold'
|
|
18098
|
-
})
|
|
18251
|
+
});
|
|
18099
18252
|
case 'tier-requirement':
|
|
18100
|
-
return
|
|
18101
|
-
fontSize:
|
|
18253
|
+
return __assign(__assign({}, baseStyle), {
|
|
18254
|
+
fontSize: getResponsiveValue(18, 12, isDesktop, isTablet),
|
|
18102
18255
|
fontWeight: 'bold'
|
|
18103
|
-
})
|
|
18256
|
+
});
|
|
18257
|
+
case 'description':
|
|
18258
|
+
case 'label':
|
|
18104
18259
|
default:
|
|
18105
|
-
return
|
|
18260
|
+
return __assign(__assign({}, baseStyle), {
|
|
18261
|
+
fontSize: getResponsiveValue(12, 10, isDesktop, isTablet)
|
|
18262
|
+
});
|
|
18106
18263
|
}
|
|
18107
18264
|
};
|
|
18108
18265
|
var variantStyle = getVariantStyle(variant);
|
|
18109
18266
|
return /*#__PURE__*/React__namespace.createElement(Text$3, _extends({
|
|
18110
|
-
style: [styles$
|
|
18267
|
+
style: [styles$i.base, variantStyle, style]
|
|
18111
18268
|
}, props));
|
|
18112
18269
|
};
|
|
18113
|
-
var styles$
|
|
18270
|
+
var styles$i = StyleSheet$1.create({
|
|
18114
18271
|
base: {}
|
|
18115
18272
|
});
|
|
18116
18273
|
|
|
@@ -18673,7 +18830,7 @@ function Pressable(props, forwardedRef) {
|
|
|
18673
18830
|
onFocus: focusHandler,
|
|
18674
18831
|
onKeyDown: keyDownHandler,
|
|
18675
18832
|
ref: setRef,
|
|
18676
|
-
style: [disabled ? styles$
|
|
18833
|
+
style: [disabled ? styles$h.disabled : styles$h.active, typeof style === 'function' ? style(interactionState) : style],
|
|
18677
18834
|
tabIndex: _tabIndex
|
|
18678
18835
|
}), typeof children === 'function' ? children(interactionState) : children);
|
|
18679
18836
|
}
|
|
@@ -18683,7 +18840,7 @@ function useForceableState(forced) {
|
|
|
18683
18840
|
setBool = _useState[1];
|
|
18684
18841
|
return [bool || forced, setBool];
|
|
18685
18842
|
}
|
|
18686
|
-
var styles$
|
|
18843
|
+
var styles$h = StyleSheet$1.create({
|
|
18687
18844
|
active: {
|
|
18688
18845
|
cursor: 'pointer',
|
|
18689
18846
|
touchAction: 'manipulation'
|
|
@@ -18728,7 +18885,7 @@ var BaseBanner = function (_a) {
|
|
|
18728
18885
|
}, /*#__PURE__*/React__namespace.createElement(Pressable$1, {
|
|
18729
18886
|
style: function (_a) {
|
|
18730
18887
|
var pressed = _a.pressed;
|
|
18731
|
-
return [styles$
|
|
18888
|
+
return [styles$g.container, {
|
|
18732
18889
|
backgroundColor: theme.surface,
|
|
18733
18890
|
borderRadius: theme.sizes.borderRadiusLg,
|
|
18734
18891
|
opacity: pressed ? 0.7 : 1
|
|
@@ -18741,7 +18898,7 @@ var BaseBanner = function (_a) {
|
|
|
18741
18898
|
accessibilityLabel: "".concat(title).concat(ctaLink ? ' - Click to open' : '')
|
|
18742
18899
|
}, children));
|
|
18743
18900
|
};
|
|
18744
|
-
var styles$
|
|
18901
|
+
var styles$g = StyleSheet$1.create({
|
|
18745
18902
|
container: {
|
|
18746
18903
|
width: '100%',
|
|
18747
18904
|
maxWidth: 1080,
|
|
@@ -18880,6 +19037,7 @@ var TierTileConfig = /** @class */function () {
|
|
|
18880
19037
|
this.emptyArtworkUrl = '';
|
|
18881
19038
|
this.pointsToTierPrefix = '';
|
|
18882
19039
|
this.pointsToTierSuffix = '';
|
|
19040
|
+
this.locale = 'en';
|
|
18883
19041
|
}
|
|
18884
19042
|
return TierTileConfig;
|
|
18885
19043
|
}();
|
|
@@ -18930,7 +19088,7 @@ var BaseTileRoot = function (_a) {
|
|
|
18930
19088
|
return /*#__PURE__*/React.createElement(Pressable$1, {
|
|
18931
19089
|
style: function (_a) {
|
|
18932
19090
|
var pressed = _a.pressed;
|
|
18933
|
-
return [styles$
|
|
19091
|
+
return [styles$f.container, {
|
|
18934
19092
|
backgroundColor: theme.surface,
|
|
18935
19093
|
borderRadius: responsiveStyles.borderRadius,
|
|
18936
19094
|
aspectRatio: isHalfSize ? 2 : 1,
|
|
@@ -18952,8 +19110,9 @@ var BaseTileContent = function (_a) {
|
|
|
18952
19110
|
// For half tiles with an image, don't show other content
|
|
18953
19111
|
if (isHalfSize && artworkUrl) return null;
|
|
18954
19112
|
return /*#__PURE__*/React.createElement(View$2, {
|
|
18955
|
-
style: [styles$
|
|
18956
|
-
justifyContent: 'center'
|
|
19113
|
+
style: [styles$f.content, {
|
|
19114
|
+
justifyContent: 'center',
|
|
19115
|
+
height: !artworkUrl ? '100%' : undefined
|
|
18957
19116
|
}]
|
|
18958
19117
|
}, children);
|
|
18959
19118
|
};
|
|
@@ -18968,7 +19127,7 @@ var BaseTileHeader = function (_a) {
|
|
|
18968
19127
|
marginTop: [8, 8, 12]
|
|
18969
19128
|
});
|
|
18970
19129
|
return /*#__PURE__*/React.createElement(View$2, {
|
|
18971
|
-
style: [styles$
|
|
19130
|
+
style: [styles$f.header, {
|
|
18972
19131
|
marginTop: !isHalfSize && artworkUrl ? headerStyle.marginTop : undefined,
|
|
18973
19132
|
// @ts-ignore
|
|
18974
19133
|
textAlign: isHalfSize && 'center'
|
|
@@ -18990,7 +19149,7 @@ var BaseTileMedia = function (props) {
|
|
|
18990
19149
|
source: {
|
|
18991
19150
|
uri: artworkUrl
|
|
18992
19151
|
},
|
|
18993
|
-
style: [props.style, styles$
|
|
19152
|
+
style: [props.style, styles$f.media, {
|
|
18994
19153
|
flexBasis: !isHalfSize && hasTitle && hasDescription ? '50%' : '100%',
|
|
18995
19154
|
height: isHalfSize ? '100%' : undefined
|
|
18996
19155
|
}]
|
|
@@ -19034,7 +19193,7 @@ BaseTile.Content = BaseTileContent;
|
|
|
19034
19193
|
BaseTile.Header = BaseTileHeader;
|
|
19035
19194
|
BaseTile.Title = BaseTileTitle;
|
|
19036
19195
|
BaseTile.Body = BaseTileBody;
|
|
19037
|
-
var styles$
|
|
19196
|
+
var styles$f = StyleSheet$1.create({
|
|
19038
19197
|
container: {
|
|
19039
19198
|
width: '100%',
|
|
19040
19199
|
height: '100%',
|
|
@@ -19056,8 +19215,121 @@ var styles$d = StyleSheet$1.create({
|
|
|
19056
19215
|
})
|
|
19057
19216
|
});
|
|
19058
19217
|
|
|
19218
|
+
var Indicator = function () {
|
|
19219
|
+
var _a = useResponsive$1(),
|
|
19220
|
+
isDesktop = _a.isDesktop,
|
|
19221
|
+
isTablet = _a.isTablet;
|
|
19222
|
+
var getCurrentLayout = function () {
|
|
19223
|
+
if (isDesktop) return 'Desktop Layout';
|
|
19224
|
+
if (isTablet) return 'Tablet Layout';
|
|
19225
|
+
return 'Mobile Layout';
|
|
19226
|
+
};
|
|
19227
|
+
return /*#__PURE__*/React.createElement(View$2, {
|
|
19228
|
+
style: styles$e.indicator
|
|
19229
|
+
}, /*#__PURE__*/React.createElement(Text$3, {
|
|
19230
|
+
style: styles$e.indicatorText
|
|
19231
|
+
}, getCurrentLayout()));
|
|
19232
|
+
};
|
|
19233
|
+
var styles$e = StyleSheet$1.create({
|
|
19234
|
+
indicator: {
|
|
19235
|
+
position: 'absolute',
|
|
19236
|
+
top: 10,
|
|
19237
|
+
right: 10,
|
|
19238
|
+
backgroundColor: 'red',
|
|
19239
|
+
paddingHorizontal: 12,
|
|
19240
|
+
paddingVertical: 6,
|
|
19241
|
+
borderRadius: 4
|
|
19242
|
+
},
|
|
19243
|
+
indicatorText: {
|
|
19244
|
+
color: 'white',
|
|
19245
|
+
fontSize: 12,
|
|
19246
|
+
fontWeight: 'bold'
|
|
19247
|
+
}
|
|
19248
|
+
});
|
|
19249
|
+
|
|
19059
19250
|
var GRID_GAP = 16;
|
|
19060
19251
|
|
|
19252
|
+
var Skeleton = function (_a) {
|
|
19253
|
+
var style = _a.style,
|
|
19254
|
+
_b = _a.numberOfSquares,
|
|
19255
|
+
numberOfSquares = _b === void 0 ? 4 : _b;
|
|
19256
|
+
var theme = useWllSdk().theme;
|
|
19257
|
+
var animatedValue = React__namespace.useRef(new Animated$1.Value(0)).current;
|
|
19258
|
+
React__namespace.useEffect(function () {
|
|
19259
|
+
var pulseAnimation = Animated$1.loop(Animated$1.sequence([Animated$1.timing(animatedValue, {
|
|
19260
|
+
toValue: 1,
|
|
19261
|
+
duration: 1000,
|
|
19262
|
+
useNativeDriver: true
|
|
19263
|
+
}), Animated$1.timing(animatedValue, {
|
|
19264
|
+
toValue: 0,
|
|
19265
|
+
duration: 1000,
|
|
19266
|
+
useNativeDriver: true
|
|
19267
|
+
})]));
|
|
19268
|
+
pulseAnimation.start();
|
|
19269
|
+
return function () {
|
|
19270
|
+
return pulseAnimation.stop();
|
|
19271
|
+
};
|
|
19272
|
+
}, [animatedValue]);
|
|
19273
|
+
var opacity = animatedValue.interpolate({
|
|
19274
|
+
inputRange: [0, 1],
|
|
19275
|
+
outputRange: [0.3, 0.7]
|
|
19276
|
+
});
|
|
19277
|
+
var sharedSkeletonStyle = {
|
|
19278
|
+
opacity: opacity,
|
|
19279
|
+
backgroundColor: theme.alphaDerivedText[20],
|
|
19280
|
+
borderRadius: theme.sizes.borderRadiusLg
|
|
19281
|
+
};
|
|
19282
|
+
return /*#__PURE__*/React__namespace.createElement(View$2, null, /*#__PURE__*/React__namespace.createElement(Animated$1.View, {
|
|
19283
|
+
style: [styles$d.skeleton, styles$d.title, {
|
|
19284
|
+
opacity: opacity,
|
|
19285
|
+
backgroundColor: theme.alphaDerivedText[20],
|
|
19286
|
+
borderRadius: 6
|
|
19287
|
+
}]
|
|
19288
|
+
}), /*#__PURE__*/React__namespace.createElement(Animated$1.View, {
|
|
19289
|
+
style: [styles$d.skeleton, styles$d.body, {
|
|
19290
|
+
opacity: opacity,
|
|
19291
|
+
backgroundColor: theme.alphaDerivedText[20],
|
|
19292
|
+
borderRadius: 6
|
|
19293
|
+
}]
|
|
19294
|
+
}), /*#__PURE__*/React__namespace.createElement(Animated$1.View, {
|
|
19295
|
+
style: [styles$d.container, style]
|
|
19296
|
+
}, Array.from({
|
|
19297
|
+
length: numberOfSquares
|
|
19298
|
+
}).map(function (_, index) {
|
|
19299
|
+
return /*#__PURE__*/React__namespace.createElement(Animated$1.View, {
|
|
19300
|
+
key: index,
|
|
19301
|
+
style: [styles$d.skeleton, styles$d.square, sharedSkeletonStyle]
|
|
19302
|
+
});
|
|
19303
|
+
})));
|
|
19304
|
+
};
|
|
19305
|
+
var styles$d = StyleSheet$1.create({
|
|
19306
|
+
container: {
|
|
19307
|
+
flexDirection: 'row',
|
|
19308
|
+
flexWrap: 'wrap',
|
|
19309
|
+
gap: GRID_GAP,
|
|
19310
|
+
justifyContent: 'space-between',
|
|
19311
|
+
width: '100%',
|
|
19312
|
+
maxWidth: 1080
|
|
19313
|
+
},
|
|
19314
|
+
title: {
|
|
19315
|
+
height: 40,
|
|
19316
|
+
marginBottom: 10,
|
|
19317
|
+
width: 300
|
|
19318
|
+
},
|
|
19319
|
+
body: {
|
|
19320
|
+
height: 25,
|
|
19321
|
+
width: '85%',
|
|
19322
|
+
marginBottom: 24
|
|
19323
|
+
},
|
|
19324
|
+
skeleton: {
|
|
19325
|
+
overflow: 'hidden'
|
|
19326
|
+
},
|
|
19327
|
+
square: {
|
|
19328
|
+
width: 1000 / 4,
|
|
19329
|
+
aspectRatio: 1
|
|
19330
|
+
}
|
|
19331
|
+
});
|
|
19332
|
+
|
|
19061
19333
|
var BadgeTileInner$1 = function (_a) {
|
|
19062
19334
|
var tile = _a.tile;
|
|
19063
19335
|
useWllSdk().theme;
|
|
@@ -19407,11 +19679,12 @@ var styles$a = StyleSheet$1.create({
|
|
|
19407
19679
|
flex: 1
|
|
19408
19680
|
}),
|
|
19409
19681
|
mediaContainer: createResponsiveStyle({
|
|
19410
|
-
width: '
|
|
19682
|
+
width: '30%',
|
|
19411
19683
|
aspectRatio: 1,
|
|
19412
19684
|
position: 'relative',
|
|
19413
19685
|
overflow: 'hidden',
|
|
19414
|
-
marginRight: [8, 8, 24]
|
|
19686
|
+
marginRight: [8, 8, 24],
|
|
19687
|
+
height: 320
|
|
19415
19688
|
}),
|
|
19416
19689
|
media: {
|
|
19417
19690
|
position: 'absolute',
|
|
@@ -19478,6 +19751,22 @@ ContentTile.Content = ContentTileContent;
|
|
|
19478
19751
|
ContentTile.Header = ContentTileHeader;
|
|
19479
19752
|
ContentTile.Body = ContentTileBody;
|
|
19480
19753
|
|
|
19754
|
+
/**
|
|
19755
|
+
* Sorts tiles by priority (higher priority first) and maintains original order for equal priorities
|
|
19756
|
+
* @param tiles Array of tiles to sort
|
|
19757
|
+
* @returns Sorted array of tiles
|
|
19758
|
+
*/
|
|
19759
|
+
var sortByPriority = function (tiles) {
|
|
19760
|
+
return __spreadArray([], tiles, true).sort(function (a, b) {
|
|
19761
|
+
// Sort by priority (higher priority first)
|
|
19762
|
+
if (a.priority !== b.priority) {
|
|
19763
|
+
return b.priority - a.priority;
|
|
19764
|
+
}
|
|
19765
|
+
// If priorities are equal, maintain original order
|
|
19766
|
+
return tiles.indexOf(a) - tiles.indexOf(b);
|
|
19767
|
+
});
|
|
19768
|
+
};
|
|
19769
|
+
|
|
19481
19770
|
exports.SectionType = void 0;
|
|
19482
19771
|
(function (SectionType) {
|
|
19483
19772
|
SectionType["Grid"] = "GRID";
|
|
@@ -19488,33 +19777,37 @@ var SectionHeader = function (_a) {
|
|
|
19488
19777
|
var title = _a.title,
|
|
19489
19778
|
description = _a.description;
|
|
19490
19779
|
var theme = useWllSdk().theme;
|
|
19780
|
+
var _b = useResponsive$1(),
|
|
19781
|
+
isDesktop = _b.isDesktop,
|
|
19782
|
+
isTablet = _b.isTablet;
|
|
19491
19783
|
if (!title && !description) {
|
|
19492
19784
|
return null;
|
|
19493
19785
|
}
|
|
19786
|
+
var dynamicStyles = StyleSheet$1.create({
|
|
19787
|
+
sectionHeader: {
|
|
19788
|
+
marginBottom: getResponsiveValue(16, 8, isDesktop, isTablet)
|
|
19789
|
+
},
|
|
19790
|
+
sectionTitle: {
|
|
19791
|
+
fontSize: getResponsiveValue(32, 18, isDesktop, isTablet),
|
|
19792
|
+
marginBottom: getResponsiveValue(8, 4, isDesktop, isTablet)
|
|
19793
|
+
},
|
|
19794
|
+
sectionDescription: {
|
|
19795
|
+
fontSize: getResponsiveValue(24, 14, isDesktop, isTablet)
|
|
19796
|
+
}
|
|
19797
|
+
});
|
|
19494
19798
|
return /*#__PURE__*/React.createElement(View$2, {
|
|
19495
|
-
style:
|
|
19799
|
+
style: dynamicStyles.sectionHeader
|
|
19496
19800
|
}, title && /*#__PURE__*/React.createElement(Text, {
|
|
19497
|
-
style: [
|
|
19498
|
-
fontWeight: '700'
|
|
19801
|
+
style: [dynamicStyles.sectionTitle, {
|
|
19802
|
+
fontWeight: '700',
|
|
19803
|
+
color: theme.text
|
|
19499
19804
|
}]
|
|
19500
19805
|
}, title), description && /*#__PURE__*/React.createElement(Text, {
|
|
19501
|
-
style: [
|
|
19502
|
-
color: theme.alphaDerivedText[
|
|
19806
|
+
style: [dynamicStyles.sectionDescription, {
|
|
19807
|
+
color: theme.alphaDerivedText[80]
|
|
19503
19808
|
}]
|
|
19504
19809
|
}, description));
|
|
19505
19810
|
};
|
|
19506
|
-
var styles$8 = StyleSheet$1.create({
|
|
19507
|
-
sectionHeader: createResponsiveStyle({
|
|
19508
|
-
marginBottom: [8, 8, 16]
|
|
19509
|
-
}),
|
|
19510
|
-
sectionTitle: createResponsiveStyle({
|
|
19511
|
-
fontSize: [18, 18, 32],
|
|
19512
|
-
marginBottom: [4, 4, 8]
|
|
19513
|
-
}),
|
|
19514
|
-
sectionDescription: createResponsiveStyle({
|
|
19515
|
-
fontSize: [14, 14, 24]
|
|
19516
|
-
})
|
|
19517
|
-
});
|
|
19518
19811
|
|
|
19519
19812
|
var Carousel = function (_a) {
|
|
19520
19813
|
var section = _a.section;
|
|
@@ -19527,6 +19820,7 @@ var Carousel = function (_a) {
|
|
|
19527
19820
|
var bannerTiles = section.tiles.filter(function (tile) {
|
|
19528
19821
|
return tile.type === exports.TileType.Banner;
|
|
19529
19822
|
});
|
|
19823
|
+
var sortedTiles = sortByPriority(bannerTiles);
|
|
19530
19824
|
var animatedIndex = React.useRef(new Animated$1.Value(0)).current;
|
|
19531
19825
|
var handleScroll = React.useCallback(function (event) {
|
|
19532
19826
|
var contentOffsetX = event.nativeEvent.contentOffset.x;
|
|
@@ -19549,23 +19843,23 @@ var Carousel = function (_a) {
|
|
|
19549
19843
|
};
|
|
19550
19844
|
var handleNext = function () {
|
|
19551
19845
|
var _a;
|
|
19552
|
-
var newIndex = Math.min(
|
|
19846
|
+
var newIndex = Math.min(sortedTiles.length - 1, currentIndex + 1);
|
|
19553
19847
|
setCurrentIndex(newIndex);
|
|
19554
19848
|
(_a = scrollViewRef.current) === null || _a === void 0 ? void 0 : _a.scrollTo({
|
|
19555
19849
|
x: newIndex * slideWidth,
|
|
19556
19850
|
animated: true
|
|
19557
19851
|
});
|
|
19558
19852
|
};
|
|
19559
|
-
var displayControls =
|
|
19853
|
+
var displayControls = sortedTiles.length > 1;
|
|
19560
19854
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SectionHeader, {
|
|
19561
19855
|
title: section.title,
|
|
19562
19856
|
description: section.description
|
|
19563
19857
|
}), /*#__PURE__*/React.createElement(View$2, {
|
|
19564
|
-
style: styles$
|
|
19858
|
+
style: styles$8.container
|
|
19565
19859
|
}, /*#__PURE__*/React.createElement(View$2, {
|
|
19566
|
-
style: styles$
|
|
19860
|
+
style: styles$8.carouselContainer
|
|
19567
19861
|
}, displayControls && /*#__PURE__*/React.createElement(TouchableOpacity$1, {
|
|
19568
|
-
style: [styles$
|
|
19862
|
+
style: [styles$8.navButton, styles$8.navButtonLeft, {
|
|
19569
19863
|
backgroundColor: theme.background
|
|
19570
19864
|
}],
|
|
19571
19865
|
onPress: handlePrev
|
|
@@ -19581,23 +19875,16 @@ var Carousel = function (_a) {
|
|
|
19581
19875
|
onScroll: handleScroll,
|
|
19582
19876
|
onMomentumScrollEnd: handleScrollEnd,
|
|
19583
19877
|
scrollEventThrottle: 16,
|
|
19584
|
-
style: [styles$
|
|
19878
|
+
style: [styles$8.carouselContent, {
|
|
19585
19879
|
width: slideWidth
|
|
19586
19880
|
}],
|
|
19587
19881
|
contentContainerStyle: {
|
|
19588
|
-
width: slideWidth *
|
|
19882
|
+
width: slideWidth * sortedTiles.length
|
|
19589
19883
|
},
|
|
19590
19884
|
decelerationRate: "fast",
|
|
19591
19885
|
snapToInterval: slideWidth,
|
|
19592
19886
|
snapToAlignment: "start"
|
|
19593
|
-
},
|
|
19594
|
-
// Sort by priority (higher priority first)
|
|
19595
|
-
if (a.priority !== b.priority) {
|
|
19596
|
-
return b.priority - a.priority;
|
|
19597
|
-
}
|
|
19598
|
-
// If priorities are equal, maintain original order
|
|
19599
|
-
return bannerTiles.indexOf(a) - bannerTiles.indexOf(b);
|
|
19600
|
-
}).map(function (tile, index) {
|
|
19887
|
+
}, sortedTiles.map(function (tile, index) {
|
|
19601
19888
|
return /*#__PURE__*/React.createElement(View$2, {
|
|
19602
19889
|
key: index,
|
|
19603
19890
|
style: [{
|
|
@@ -19607,7 +19894,7 @@ var Carousel = function (_a) {
|
|
|
19607
19894
|
tile: tile
|
|
19608
19895
|
}));
|
|
19609
19896
|
})), displayControls && /*#__PURE__*/React.createElement(TouchableOpacity$1, {
|
|
19610
|
-
style: [styles$
|
|
19897
|
+
style: [styles$8.navButton, styles$8.navButtonRight, {
|
|
19611
19898
|
backgroundColor: theme.surface
|
|
19612
19899
|
}],
|
|
19613
19900
|
onPress: handleNext
|
|
@@ -19616,8 +19903,8 @@ var Carousel = function (_a) {
|
|
|
19616
19903
|
size: 20,
|
|
19617
19904
|
color: theme.primary
|
|
19618
19905
|
}))), displayControls && /*#__PURE__*/React.createElement(View$2, {
|
|
19619
|
-
style: styles$
|
|
19620
|
-
},
|
|
19906
|
+
style: styles$8.indicators
|
|
19907
|
+
}, sortedTiles.map(function (_, index) {
|
|
19621
19908
|
var width = animatedIndex.interpolate({
|
|
19622
19909
|
inputRange: [index - 1, index, index + 1],
|
|
19623
19910
|
outputRange: [8, 30, 8],
|
|
@@ -19625,7 +19912,7 @@ var Carousel = function (_a) {
|
|
|
19625
19912
|
});
|
|
19626
19913
|
return /*#__PURE__*/React.createElement(Animated$1.View, {
|
|
19627
19914
|
key: index,
|
|
19628
|
-
style: [styles$
|
|
19915
|
+
style: [styles$8.indicator, {
|
|
19629
19916
|
backgroundColor: theme.derivedBackground,
|
|
19630
19917
|
width: width
|
|
19631
19918
|
}, index === currentIndex && {
|
|
@@ -19634,8 +19921,8 @@ var Carousel = function (_a) {
|
|
|
19634
19921
|
});
|
|
19635
19922
|
}))));
|
|
19636
19923
|
};
|
|
19637
|
-
var buttonSize =
|
|
19638
|
-
var styles$
|
|
19924
|
+
var buttonSize = 42;
|
|
19925
|
+
var styles$8 = StyleSheet$1.create({
|
|
19639
19926
|
container: {
|
|
19640
19927
|
width: '100%',
|
|
19641
19928
|
maxWidth: 1080,
|
|
@@ -19663,22 +19950,6 @@ var styles$7 = StyleSheet$1.create({
|
|
|
19663
19950
|
carouselContent: {
|
|
19664
19951
|
overflow: 'hidden'
|
|
19665
19952
|
},
|
|
19666
|
-
slideContent: {
|
|
19667
|
-
padding: 20,
|
|
19668
|
-
flex: 1
|
|
19669
|
-
},
|
|
19670
|
-
imageContainer: {
|
|
19671
|
-
width: '20%',
|
|
19672
|
-
aspectRatio: 1,
|
|
19673
|
-
position: 'relative',
|
|
19674
|
-
overflow: 'hidden'
|
|
19675
|
-
},
|
|
19676
|
-
image: {
|
|
19677
|
-
position: 'absolute',
|
|
19678
|
-
width: '100%',
|
|
19679
|
-
height: '100%',
|
|
19680
|
-
objectFit: 'cover'
|
|
19681
|
-
},
|
|
19682
19953
|
navButton: {
|
|
19683
19954
|
padding: 10,
|
|
19684
19955
|
alignItems: 'center',
|
|
@@ -19719,45 +19990,10 @@ var styles$7 = StyleSheet$1.create({
|
|
|
19719
19990
|
}
|
|
19720
19991
|
});
|
|
19721
19992
|
|
|
19722
|
-
/**
|
|
19723
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
19724
|
-
*
|
|
19725
|
-
* This source code is licensed under the MIT license found in the
|
|
19726
|
-
* LICENSE file in the root directory of this source tree.
|
|
19727
|
-
*
|
|
19728
|
-
* @format
|
|
19729
|
-
*
|
|
19730
|
-
*/
|
|
19731
|
-
|
|
19732
|
-
function useWindowDimensions() {
|
|
19733
|
-
var _useState = React.useState(() => Dimensions.get('window')),
|
|
19734
|
-
dims = _useState[0],
|
|
19735
|
-
setDims = _useState[1];
|
|
19736
|
-
React.useEffect(() => {
|
|
19737
|
-
function handleChange(_ref) {
|
|
19738
|
-
var window = _ref.window;
|
|
19739
|
-
if (window != null) {
|
|
19740
|
-
setDims(window);
|
|
19741
|
-
}
|
|
19742
|
-
}
|
|
19743
|
-
Dimensions.addEventListener('change', handleChange);
|
|
19744
|
-
// We might have missed an update between calling `get` in render and
|
|
19745
|
-
// `addEventListener` in this handler, so we set it here. If there was
|
|
19746
|
-
// no change, React will filter out this update as a no-op.
|
|
19747
|
-
setDims(Dimensions.get('window'));
|
|
19748
|
-
return () => {
|
|
19749
|
-
Dimensions.removeEventListener('change', handleChange);
|
|
19750
|
-
};
|
|
19751
|
-
}, []);
|
|
19752
|
-
return dims;
|
|
19753
|
-
}
|
|
19754
|
-
|
|
19755
19993
|
var Grid = function (_a) {
|
|
19756
19994
|
var section = _a.section;
|
|
19757
|
-
var
|
|
19758
|
-
var isDesktop = width >= 700;
|
|
19995
|
+
var isDesktop = useResponsive().isDesktop;
|
|
19759
19996
|
var columnsPerRow = isDesktop ? 4 : 2;
|
|
19760
|
-
var gap = GRID_GAP;
|
|
19761
19997
|
var renderGrid = function () {
|
|
19762
19998
|
var tileContainers = [];
|
|
19763
19999
|
var currentTiles = [];
|
|
@@ -19772,28 +20008,33 @@ var Grid = function (_a) {
|
|
|
19772
20008
|
var allHalfTiles = gridTiles.every(function (tile) {
|
|
19773
20009
|
return tile.tileHeight === exports.TileHeight.Half;
|
|
19774
20010
|
});
|
|
20011
|
+
var getTileWidth = function (columns) {
|
|
20012
|
+
return {
|
|
20013
|
+
width: "calc(".concat(100 / columns, "% - ").concat((columns - 1) * GRID_GAP / columns, "px)"),
|
|
20014
|
+
marginBottom: GRID_GAP,
|
|
20015
|
+
height: 'auto'
|
|
20016
|
+
};
|
|
20017
|
+
};
|
|
19775
20018
|
if (isDesktop && allHalfTiles) {
|
|
19776
20019
|
gridTiles.forEach(function (tile, index) {
|
|
19777
20020
|
var isLastInRow = (index + 1) % columnsPerRow === 0;
|
|
19778
20021
|
tileContainers.push( /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
19779
|
-
key: "container-".concat(index)
|
|
20022
|
+
key: "container-".concat(index),
|
|
20023
|
+
style: [
|
|
19780
20024
|
// @ts-ignore
|
|
19781
|
-
,
|
|
19782
|
-
|
|
19783
|
-
|
|
19784
|
-
marginRight: isLastInRow ? 0 : gap,
|
|
19785
|
-
marginBottom: gap,
|
|
19786
|
-
height: 'auto'
|
|
19787
|
-
}
|
|
20025
|
+
getTileWidth(columnsPerRow), !isLastInRow && {
|
|
20026
|
+
marginRight: GRID_GAP
|
|
20027
|
+
}]
|
|
19788
20028
|
}, /*#__PURE__*/React__namespace.createElement(TileContainer, {
|
|
19789
20029
|
tiles: [tile]
|
|
19790
20030
|
})));
|
|
19791
20031
|
});
|
|
19792
20032
|
return tileContainers;
|
|
19793
20033
|
}
|
|
19794
|
-
|
|
20034
|
+
var sortedTiles = sortByPriority(gridTiles);
|
|
20035
|
+
sortedTiles.forEach(function (tile, index) {
|
|
19795
20036
|
currentTiles.push(tile);
|
|
19796
|
-
var nextTile =
|
|
20037
|
+
var nextTile = sortedTiles[index + 1];
|
|
19797
20038
|
var shouldStartNewContainer = function (currentTiles, currentTile, nextTile) {
|
|
19798
20039
|
if (currentTiles.length === 2) return true;
|
|
19799
20040
|
if (currentTile.tileHeight === exports.TileHeight.Full) return true;
|
|
@@ -19810,14 +20051,12 @@ var Grid = function (_a) {
|
|
|
19810
20051
|
if (shouldStartNewContainer(currentTiles, tile, nextTile)) {
|
|
19811
20052
|
var isLastInRow = (tileContainers.length + 1) % columnsPerRow === 0;
|
|
19812
20053
|
tileContainers.push( /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
19813
|
-
key: "container-".concat(index)
|
|
20054
|
+
key: "container-".concat(index),
|
|
20055
|
+
style: [
|
|
19814
20056
|
// @ts-ignore
|
|
19815
|
-
,
|
|
19816
|
-
|
|
19817
|
-
|
|
19818
|
-
marginRight: isLastInRow ? 0 : gap,
|
|
19819
|
-
marginBottom: gap
|
|
19820
|
-
}
|
|
20057
|
+
getTileWidth(columnsPerRow), !isLastInRow && {
|
|
20058
|
+
marginRight: GRID_GAP
|
|
20059
|
+
}]
|
|
19821
20060
|
}, /*#__PURE__*/React__namespace.createElement(TileContainer, {
|
|
19822
20061
|
tiles: currentTiles
|
|
19823
20062
|
})));
|
|
@@ -19830,14 +20069,14 @@ var Grid = function (_a) {
|
|
|
19830
20069
|
title: section.title,
|
|
19831
20070
|
description: section.description
|
|
19832
20071
|
}), /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
19833
|
-
style: styles$
|
|
20072
|
+
style: styles$7.grid
|
|
19834
20073
|
}, renderGrid()));
|
|
19835
20074
|
};
|
|
19836
|
-
var styles$
|
|
20075
|
+
var styles$7 = StyleSheet$1.create({
|
|
19837
20076
|
grid: {
|
|
19838
20077
|
flexDirection: 'row',
|
|
19839
20078
|
flexWrap: 'wrap',
|
|
19840
|
-
|
|
20079
|
+
width: '100%'
|
|
19841
20080
|
}
|
|
19842
20081
|
});
|
|
19843
20082
|
|
|
@@ -19860,15 +20099,15 @@ var ProgressIndicator = function (_a) {
|
|
|
19860
20099
|
progressVariant = 'accent';
|
|
19861
20100
|
}
|
|
19862
20101
|
return /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
19863
|
-
style: styles$
|
|
20102
|
+
style: styles$6.container
|
|
19864
20103
|
}, /*#__PURE__*/React__namespace.createElement(ProgressBar, {
|
|
19865
20104
|
percentage: percentage,
|
|
19866
20105
|
variant: progressVariant,
|
|
19867
20106
|
height: height
|
|
19868
20107
|
}), /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
19869
|
-
style: [styles$
|
|
20108
|
+
style: [styles$6.circleContainer]
|
|
19870
20109
|
}, /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
19871
|
-
style: [styles$
|
|
20110
|
+
style: [styles$6.circle, {
|
|
19872
20111
|
borderColor: theme.derivedSurface[20],
|
|
19873
20112
|
backgroundColor: isComplete ? theme.primary : theme.surface,
|
|
19874
20113
|
borderWidth: isComplete ? 0 : 4
|
|
@@ -19879,7 +20118,7 @@ var ProgressIndicator = function (_a) {
|
|
|
19879
20118
|
color: theme.primaryText
|
|
19880
20119
|
}))));
|
|
19881
20120
|
};
|
|
19882
|
-
var styles$
|
|
20121
|
+
var styles$6 = StyleSheet$1.create({
|
|
19883
20122
|
container: {
|
|
19884
20123
|
width: '100%',
|
|
19885
20124
|
flexDirection: 'row',
|
|
@@ -19923,10 +20162,10 @@ var Section = function (_a) {
|
|
|
19923
20162
|
sectionData: section
|
|
19924
20163
|
}
|
|
19925
20164
|
}, /*#__PURE__*/React.createElement(View$2, {
|
|
19926
|
-
style: styles$
|
|
20165
|
+
style: styles$5.section
|
|
19927
20166
|
}, renderSectionContent()));
|
|
19928
20167
|
};
|
|
19929
|
-
var styles$
|
|
20168
|
+
var styles$5 = StyleSheet$1.create({
|
|
19930
20169
|
section: createResponsiveStyle({
|
|
19931
20170
|
width: '100%',
|
|
19932
20171
|
maxWidth: 1080,
|
|
@@ -19955,7 +20194,6 @@ var Group = function (_a) {
|
|
|
19955
20194
|
return [4 /*yield*/, getGroupByID(id)];
|
|
19956
20195
|
case 1:
|
|
19957
20196
|
response = _a.sent();
|
|
19958
|
-
console.log(response.data);
|
|
19959
20197
|
setGroupData(response.data);
|
|
19960
20198
|
setLoading(false);
|
|
19961
20199
|
return [2 /*return*/];
|
|
@@ -19966,27 +20204,35 @@ var Group = function (_a) {
|
|
|
19966
20204
|
fetchGroup();
|
|
19967
20205
|
}, [id, getGroupByID]);
|
|
19968
20206
|
if (loading) {
|
|
19969
|
-
return /*#__PURE__*/React.createElement(
|
|
19970
|
-
|
|
19971
|
-
});
|
|
20207
|
+
return /*#__PURE__*/React.createElement(View$2, {
|
|
20208
|
+
style: styles$4.emptyConatiner
|
|
20209
|
+
}, /*#__PURE__*/React.createElement(Skeleton, null));
|
|
19972
20210
|
}
|
|
19973
20211
|
if (!groupData) {
|
|
19974
|
-
return /*#__PURE__*/React.createElement(
|
|
20212
|
+
return /*#__PURE__*/React.createElement(View$2, {
|
|
20213
|
+
style: styles$4.emptyConatiner
|
|
20214
|
+
}, /*#__PURE__*/React.createElement(Text$3, null, "No group data available"));
|
|
19975
20215
|
}
|
|
19976
|
-
|
|
19977
|
-
|
|
19978
|
-
|
|
19979
|
-
|
|
19980
|
-
|
|
19981
|
-
|
|
19982
|
-
|
|
19983
|
-
}).map(function (section) {
|
|
20216
|
+
if (!groupData.sections || groupData.sections.length === 0) {
|
|
20217
|
+
return /*#__PURE__*/React.createElement(View$2, {
|
|
20218
|
+
style: styles$4.emptyConatiner
|
|
20219
|
+
}, /*#__PURE__*/React.createElement(Text$3, null, "No sections available"));
|
|
20220
|
+
}
|
|
20221
|
+
var sortedSections = sortByPriority(groupData.sections);
|
|
20222
|
+
return /*#__PURE__*/React.createElement(View$2, null, sortedSections.map(function (section) {
|
|
19984
20223
|
return /*#__PURE__*/React.createElement(Section, {
|
|
19985
20224
|
key: section.id,
|
|
19986
20225
|
section: section
|
|
19987
20226
|
});
|
|
19988
20227
|
}));
|
|
19989
20228
|
};
|
|
20229
|
+
var styles$4 = StyleSheet$1.create({
|
|
20230
|
+
emptyConatiner: {
|
|
20231
|
+
flex: 1,
|
|
20232
|
+
justifyContent: 'center',
|
|
20233
|
+
alignItems: 'center'
|
|
20234
|
+
}
|
|
20235
|
+
});
|
|
19990
20236
|
|
|
19991
20237
|
var PointsTile = function (_a) {
|
|
19992
20238
|
var tile = _a.tile;
|
|
@@ -20064,12 +20310,14 @@ var PointsTileImage = function (_a) {
|
|
|
20064
20310
|
marginBottom: isFullSize ? [8, 8, 12] : 0,
|
|
20065
20311
|
backgroundColor: isFullSize ? theme.alphaDerivedPrimary[20] : theme.surface,
|
|
20066
20312
|
justifyContent: 'center',
|
|
20067
|
-
alignItems: 'center'
|
|
20313
|
+
alignItems: 'center',
|
|
20314
|
+
overflow: 'hidden'
|
|
20068
20315
|
}),
|
|
20069
20316
|
image: {
|
|
20070
20317
|
width: '100%',
|
|
20071
20318
|
height: '100%',
|
|
20072
|
-
position: 'absolute'
|
|
20319
|
+
position: 'absolute',
|
|
20320
|
+
resizeMode: 'contain'
|
|
20073
20321
|
}
|
|
20074
20322
|
});
|
|
20075
20323
|
if (!artworkUrl) return null;
|
|
@@ -20080,7 +20328,7 @@ var PointsTileImage = function (_a) {
|
|
|
20080
20328
|
uri: artworkUrl
|
|
20081
20329
|
},
|
|
20082
20330
|
style: styles.image,
|
|
20083
|
-
resizeMode: "
|
|
20331
|
+
resizeMode: "contain"
|
|
20084
20332
|
}));
|
|
20085
20333
|
};
|
|
20086
20334
|
PointsTile.Title = PointsTileTitle;
|
|
@@ -20100,13 +20348,22 @@ var RewardCategoryHeader = function () {
|
|
|
20100
20348
|
var _a = configuration,
|
|
20101
20349
|
showName = _a.showName,
|
|
20102
20350
|
name = _a.name;
|
|
20351
|
+
var _b = useResponsive$1(),
|
|
20352
|
+
isDesktop = _b.isDesktop,
|
|
20353
|
+
isTablet = _b.isTablet;
|
|
20103
20354
|
if (!showName || !name) return null;
|
|
20355
|
+
var dynamicStyles = StyleSheet$1.create({
|
|
20356
|
+
headerText: {
|
|
20357
|
+
fontSize: getResponsiveValue(16, 12, isDesktop, isTablet),
|
|
20358
|
+
paddingHorizontal: getResponsiveValue(40, 20, isDesktop, isTablet)
|
|
20359
|
+
}
|
|
20360
|
+
});
|
|
20104
20361
|
return /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
20105
20362
|
style: [styles$3.header, {
|
|
20106
20363
|
backgroundColor: theme.primary
|
|
20107
20364
|
}]
|
|
20108
20365
|
}, /*#__PURE__*/React__namespace.createElement(Text, {
|
|
20109
|
-
style: [
|
|
20366
|
+
style: [dynamicStyles.headerText, {
|
|
20110
20367
|
color: theme.primaryText
|
|
20111
20368
|
}],
|
|
20112
20369
|
ellipsizeMode: "tail",
|
|
@@ -20135,10 +20392,6 @@ var styles$3 = StyleSheet$1.create({
|
|
|
20135
20392
|
alignItems: 'center',
|
|
20136
20393
|
justifyContent: 'center'
|
|
20137
20394
|
},
|
|
20138
|
-
headerText: {
|
|
20139
|
-
fontSize: 16,
|
|
20140
|
-
paddingHorizontal: 30
|
|
20141
|
-
},
|
|
20142
20395
|
background: {
|
|
20143
20396
|
position: 'absolute',
|
|
20144
20397
|
width: '100%',
|
|
@@ -20608,6 +20861,7 @@ var styles$1 = StyleSheet$1.create({
|
|
|
20608
20861
|
|
|
20609
20862
|
var TileContainer = function (_a) {
|
|
20610
20863
|
var tiles = _a.tiles;
|
|
20864
|
+
var isDesktop = useResponsive$1().isDesktop;
|
|
20611
20865
|
var renderTile = function (tile) {
|
|
20612
20866
|
switch (tile.type) {
|
|
20613
20867
|
case exports.TileType.Content:
|
|
@@ -20641,7 +20895,7 @@ var TileContainer = function (_a) {
|
|
|
20641
20895
|
return tile.tileHeight === exports.TileHeight.Half;
|
|
20642
20896
|
});
|
|
20643
20897
|
return /*#__PURE__*/React__namespace.createElement(View$2, {
|
|
20644
|
-
style: [styles.container, allHalfTiles ? {
|
|
20898
|
+
style: [styles.container, isDesktop && allHalfTiles ? {
|
|
20645
20899
|
aspectRatio: 2
|
|
20646
20900
|
} : {
|
|
20647
20901
|
aspectRatio: 1
|
|
@@ -20685,6 +20939,7 @@ exports.ContentTileConfig = ContentTileConfig;
|
|
|
20685
20939
|
exports.Grid = Grid;
|
|
20686
20940
|
exports.Group = Group;
|
|
20687
20941
|
exports.Icon = Icon;
|
|
20942
|
+
exports.Indicator = Indicator;
|
|
20688
20943
|
exports.LoadingIndicator = LoadingIndicator;
|
|
20689
20944
|
exports.PointsTile = PointsTile;
|
|
20690
20945
|
exports.PointsTileConfig = PointsTileConfig;
|
|
@@ -20699,6 +20954,7 @@ exports.RewardTileConfig = RewardTileConfig;
|
|
|
20699
20954
|
exports.RowHeader = RowHeader;
|
|
20700
20955
|
exports.Section = Section;
|
|
20701
20956
|
exports.SectionHeader = SectionHeader;
|
|
20957
|
+
exports.Skeleton = Skeleton;
|
|
20702
20958
|
exports.Text = Text;
|
|
20703
20959
|
exports.TierTile = TierTile$1;
|
|
20704
20960
|
exports.TierTileConfig = TierTileConfig;
|