@wlloyalty/wll-react-sdk 1.0.95 → 1.0.97
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/native.js +26 -28
- package/dist/native.js.map +1 -1
- package/dist/web.js +43 -39
- package/dist/web.js.map +1 -1
- package/package.json +1 -1
package/dist/web.js
CHANGED
|
@@ -6599,7 +6599,7 @@ function isPrimaryPointerDown(domEvent) {
|
|
|
6599
6599
|
* when touches end and start again.
|
|
6600
6600
|
*/
|
|
6601
6601
|
|
|
6602
|
-
var __DEV__$
|
|
6602
|
+
var __DEV__$4 = process.env.NODE_ENV !== 'production';
|
|
6603
6603
|
var MAX_TOUCH_BANK = 20;
|
|
6604
6604
|
function timestampForTouch(touch) {
|
|
6605
6605
|
// The legacy internal implementation provides "timeStamp", which has been
|
|
@@ -6642,7 +6642,7 @@ function getTouchIdentifier(_ref) {
|
|
|
6642
6642
|
if (identifier == null) {
|
|
6643
6643
|
console.error('Touch object is missing identifier.');
|
|
6644
6644
|
}
|
|
6645
|
-
if (__DEV__$
|
|
6645
|
+
if (__DEV__$4) {
|
|
6646
6646
|
if (identifier > MAX_TOUCH_BANK) {
|
|
6647
6647
|
console.error('Touch identifier %s is greater than maximum supported %s which causes ' + 'performance issues backfilling array locations for all of the indices.', identifier, MAX_TOUCH_BANK);
|
|
6648
6648
|
}
|
|
@@ -6740,7 +6740,7 @@ class ResponderTouchHistoryStore {
|
|
|
6740
6740
|
break;
|
|
6741
6741
|
}
|
|
6742
6742
|
}
|
|
6743
|
-
if (__DEV__$
|
|
6743
|
+
if (__DEV__$4) {
|
|
6744
6744
|
var activeRecord = touchBank[touchHistory.indexOfSingleActiveTouch];
|
|
6745
6745
|
if (!(activeRecord != null && activeRecord.touchActive)) {
|
|
6746
6746
|
console.error('Cannot find single active touch.');
|
|
@@ -8228,11 +8228,16 @@ var isValidColor = function (color) {
|
|
|
8228
8228
|
* @returns Boolean indicating if theme is valid
|
|
8229
8229
|
*/
|
|
8230
8230
|
var validateTheme = function (theme) {
|
|
8231
|
-
var requiredColors = ['accent', 'background', 'primary', 'surface', 'surfaceText', '
|
|
8231
|
+
var requiredColors = ['accent', 'background', 'primary', 'surface', 'surfaceText', 'text'];
|
|
8232
8232
|
// fontFamily is optional - it has a default value in defaultTheme
|
|
8233
|
-
|
|
8234
|
-
|
|
8233
|
+
// Log missing or invalid colors for debugging
|
|
8234
|
+
var missingOrInvalidColors = requiredColors.filter(function (color) {
|
|
8235
|
+
return !theme[color] || !isValidColor(theme[color]);
|
|
8235
8236
|
});
|
|
8237
|
+
if (missingOrInvalidColors.length > 0) {
|
|
8238
|
+
console.warn('[WLL SDK] Missing or invalid required colors:', missingOrInvalidColors);
|
|
8239
|
+
}
|
|
8240
|
+
return missingOrInvalidColors.length === 0;
|
|
8236
8241
|
};
|
|
8237
8242
|
/**
|
|
8238
8243
|
* Safely creates a Color instance with error handling
|
|
@@ -8458,14 +8463,12 @@ var createTheme = function (baseTheme) {
|
|
|
8458
8463
|
baseTheme = {};
|
|
8459
8464
|
}
|
|
8460
8465
|
var mergedTheme = __assign(__assign({}, defaultTheme), baseTheme);
|
|
8461
|
-
//
|
|
8462
|
-
|
|
8463
|
-
|
|
8464
|
-
|
|
8465
|
-
|
|
8466
|
-
|
|
8467
|
-
});
|
|
8468
|
-
}
|
|
8466
|
+
// Always log theme information to help with debugging
|
|
8467
|
+
console.debug('[WLL SDK] Theme created:', {
|
|
8468
|
+
fontFamily: mergedTheme.fontFamily,
|
|
8469
|
+
baseTheme: baseTheme === null || baseTheme === void 0 ? void 0 : baseTheme.fontFamily,
|
|
8470
|
+
defaultTheme: defaultTheme.fontFamily
|
|
8471
|
+
});
|
|
8469
8472
|
return __assign(__assign({}, mergedTheme), {
|
|
8470
8473
|
sizes: sizes,
|
|
8471
8474
|
derivedBackground: getDerivedColor(mergedTheme.background),
|
|
@@ -8501,16 +8504,14 @@ var WllSdkProvider = function (_a) {
|
|
|
8501
8504
|
if (!validateTheme(themeToUse)) {
|
|
8502
8505
|
console.warn('Invalid theme provided. Some required colors are missing or invalid.');
|
|
8503
8506
|
}
|
|
8504
|
-
//
|
|
8505
|
-
|
|
8506
|
-
|
|
8507
|
-
|
|
8508
|
-
|
|
8509
|
-
|
|
8510
|
-
|
|
8511
|
-
|
|
8512
|
-
});
|
|
8513
|
-
}
|
|
8507
|
+
// Always log theme updates to help with debugging
|
|
8508
|
+
console.debug('[WLL SDK] Theme update details:', {
|
|
8509
|
+
'providedTheme (full)': providedTheme,
|
|
8510
|
+
'themeToUse.fontFamily': themeToUse.fontFamily,
|
|
8511
|
+
'providedTheme.fontFamily': providedTheme === null || providedTheme === void 0 ? void 0 : providedTheme.fontFamily,
|
|
8512
|
+
'defaultTheme.fontFamily': defaultTheme.fontFamily,
|
|
8513
|
+
'providedTheme keys': providedTheme ? Object.keys(providedTheme) : 'none'
|
|
8514
|
+
});
|
|
8514
8515
|
setThemeState(createTheme(themeToUse));
|
|
8515
8516
|
}, [providedTheme]);
|
|
8516
8517
|
var setTheme = React.useCallback(function (newTheme) {
|
|
@@ -10932,9 +10933,9 @@ function _isEntirelyVisible(top, bottom, viewportHeight) {
|
|
|
10932
10933
|
}
|
|
10933
10934
|
var ViewabilityHelper$1 = ViewabilityHelper;
|
|
10934
10935
|
|
|
10935
|
-
var __DEV__$
|
|
10936
|
+
var __DEV__$3 = process.env.NODE_ENV !== 'production';
|
|
10936
10937
|
var VirtualizedListContext = /*#__PURE__*/React__namespace.createContext(null);
|
|
10937
|
-
if (__DEV__$
|
|
10938
|
+
if (__DEV__$3) {
|
|
10938
10939
|
VirtualizedListContext.displayName = 'VirtualizedListContext';
|
|
10939
10940
|
}
|
|
10940
10941
|
|
|
@@ -11304,7 +11305,7 @@ Object.defineProperty(nullthrows$2.exports, '__esModule', {value: true});
|
|
|
11304
11305
|
var nullthrowsExports = nullthrows$2.exports;
|
|
11305
11306
|
var nullthrows$1 = /*@__PURE__*/getDefaultExportFromCjs(nullthrowsExports);
|
|
11306
11307
|
|
|
11307
|
-
var __DEV__$
|
|
11308
|
+
var __DEV__$2 = process.env.NODE_ENV !== 'production';
|
|
11308
11309
|
var ON_EDGE_REACHED_EPSILON = 0.001;
|
|
11309
11310
|
var _usedIndexForKey = false;
|
|
11310
11311
|
var _keylessItemComponentName = '';
|
|
@@ -12013,7 +12014,7 @@ class VirtualizedList extends StateSafePureComponent {
|
|
|
12013
12014
|
console.warn("initialScrollIndex \"" + initialScrollIndex + "\" is not valid (list has " + itemCount + " items)");
|
|
12014
12015
|
this._hasWarned.initialScrollIndex = true;
|
|
12015
12016
|
}
|
|
12016
|
-
if (__DEV__$
|
|
12017
|
+
if (__DEV__$2 && !this._hasWarned.flexWrap) {
|
|
12017
12018
|
// $FlowFixMe[underconstrained-implicit-instantiation]
|
|
12018
12019
|
var flatStyles = StyleSheet$1.flatten(this.props.contentContainerStyle);
|
|
12019
12020
|
if (flatStyles != null && flatStyles.flexWrap === 'wrap') {
|
|
@@ -13965,7 +13966,7 @@ var AnimatedWithChildren$1 = AnimatedWithChildren;
|
|
|
13965
13966
|
* @format
|
|
13966
13967
|
*/
|
|
13967
13968
|
|
|
13968
|
-
var __DEV__$
|
|
13969
|
+
var __DEV__$1 = process.env.NODE_ENV !== 'production';
|
|
13969
13970
|
var linear = t => t;
|
|
13970
13971
|
|
|
13971
13972
|
/**
|
|
@@ -13978,7 +13979,7 @@ function createInterpolation(config) {
|
|
|
13978
13979
|
}
|
|
13979
13980
|
var outputRange = config.outputRange;
|
|
13980
13981
|
var inputRange = config.inputRange;
|
|
13981
|
-
if (__DEV__$
|
|
13982
|
+
if (__DEV__$1) {
|
|
13982
13983
|
checkInfiniteRange('outputRange', outputRange);
|
|
13983
13984
|
checkInfiniteRange('inputRange', inputRange);
|
|
13984
13985
|
checkValidInputRange(inputRange);
|
|
@@ -14193,7 +14194,7 @@ class AnimatedInterpolation extends AnimatedWithChildren$1 {
|
|
|
14193
14194
|
return range.map(NativeAnimatedHelper.transformDataType);
|
|
14194
14195
|
}
|
|
14195
14196
|
__getNativeConfig() {
|
|
14196
|
-
if (__DEV__$
|
|
14197
|
+
if (__DEV__$1) {
|
|
14197
14198
|
NativeAnimatedHelper.validateInterpolation(this._config);
|
|
14198
14199
|
}
|
|
14199
14200
|
return {
|
|
@@ -14482,7 +14483,7 @@ var AnimatedValue$1 = AnimatedValue;
|
|
|
14482
14483
|
* @format
|
|
14483
14484
|
*/
|
|
14484
14485
|
|
|
14485
|
-
var __DEV__
|
|
14486
|
+
var __DEV__ = process.env.NODE_ENV !== 'production';
|
|
14486
14487
|
function attachNativeEvent(viewRef, eventName, argMapping) {
|
|
14487
14488
|
// Find animated values in `argMapping` and create an array representing their
|
|
14488
14489
|
// key path inside the `nativeEvent` object. Ex.: ['contentOffset', 'x'].
|
|
@@ -14576,7 +14577,7 @@ class AnimatedEvent {
|
|
|
14576
14577
|
__getHandler() {
|
|
14577
14578
|
var _this = this;
|
|
14578
14579
|
if (this.__isNative) {
|
|
14579
|
-
if (__DEV__
|
|
14580
|
+
if (__DEV__) {
|
|
14580
14581
|
var _validatedMapping = false;
|
|
14581
14582
|
return function () {
|
|
14582
14583
|
for (var _len = arguments.length, args = new Array(_len), _key2 = 0; _key2 < _len; _key2++) {
|
|
@@ -14597,7 +14598,7 @@ class AnimatedEvent {
|
|
|
14597
14598
|
for (var _len2 = arguments.length, args = new Array(_len2), _key3 = 0; _key3 < _len2; _key3++) {
|
|
14598
14599
|
args[_key3] = arguments[_key3];
|
|
14599
14600
|
}
|
|
14600
|
-
if (__DEV__
|
|
14601
|
+
if (__DEV__ && !validatedMapping) {
|
|
14601
14602
|
validateMapping(_this._argMapping, args);
|
|
14602
14603
|
validatedMapping = true;
|
|
14603
14604
|
}
|
|
@@ -18919,10 +18920,11 @@ var Text = function (_a) {
|
|
|
18919
18920
|
}
|
|
18920
18921
|
};
|
|
18921
18922
|
var variantStyle = getVariantStyle(variant);
|
|
18923
|
+
var baseTextStyle = {
|
|
18924
|
+
fontFamily: theme.fontFamily
|
|
18925
|
+
};
|
|
18922
18926
|
return /*#__PURE__*/React__namespace.createElement(Text$3, __assign({
|
|
18923
|
-
style: [variantStyle, style
|
|
18924
|
-
fontFamily: theme.fontFamily
|
|
18925
|
-
}]
|
|
18927
|
+
style: [baseTextStyle, variantStyle, style]
|
|
18926
18928
|
}, props));
|
|
18927
18929
|
};
|
|
18928
18930
|
|
|
@@ -20401,11 +20403,13 @@ var useSectionHeaderStyles = function () {
|
|
|
20401
20403
|
fontSize: useResponsiveValue(theme.sizes.xxxl, theme.sizes.xl, isDesktop, isTablet),
|
|
20402
20404
|
marginBottom: useResponsiveValue(theme.sizes.xxs, theme.sizes.xxxs, isDesktop, isTablet),
|
|
20403
20405
|
fontWeight: '700',
|
|
20404
|
-
color: theme.text
|
|
20406
|
+
color: theme.text,
|
|
20407
|
+
fontFamily: theme.fontFamily
|
|
20405
20408
|
},
|
|
20406
20409
|
sectionDescription: {
|
|
20407
20410
|
fontSize: useResponsiveValue(theme.sizes.xxl, theme.sizes.md, isDesktop, isTablet),
|
|
20408
|
-
color: theme.alphaDerivedText[80]
|
|
20411
|
+
color: theme.alphaDerivedText[80],
|
|
20412
|
+
fontFamily: theme.fontFamily
|
|
20409
20413
|
}
|
|
20410
20414
|
});
|
|
20411
20415
|
};
|