@wlloyalty/wll-react-sdk 1.0.84 → 1.0.86
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 +28 -3
- package/dist/native.js.map +1 -1
- package/dist/web.js +45 -17
- package/dist/web.js.map +1 -1
- package/package.json +1 -1
package/dist/native.js
CHANGED
|
@@ -3651,12 +3651,25 @@ var Grid = function (_a) {
|
|
|
3651
3651
|
};
|
|
3652
3652
|
}
|
|
3653
3653
|
else {
|
|
3654
|
+
// Calculate available width accounting for screen width and section padding
|
|
3654
3655
|
var availableWidth = SCREEN_WIDTH - GRID_GAP * 2;
|
|
3655
3656
|
var gapSpace = (columns - 1) * GRID_GAP;
|
|
3656
3657
|
var tileWidth = Math.floor((availableWidth - gapSpace) / columns);
|
|
3658
|
+
var halfTileHeight = Math.floor(tileWidth / 2);
|
|
3659
|
+
// Detailed logging for debugging
|
|
3660
|
+
console.log('=== GRID DEBUG ===');
|
|
3661
|
+
console.log("SCREEN_WIDTH: ".concat(SCREEN_WIDTH, "px, GRID_GAP: ").concat(GRID_GAP, "px"));
|
|
3662
|
+
console.log("Columns: ".concat(columns, ", Section padding: ").concat(GRID_GAP * 2, "px"));
|
|
3663
|
+
console.log("Available width: ".concat(availableWidth, "px, Gap space: ").concat(gapSpace, "px"));
|
|
3664
|
+
console.log("Calculated tile width: ".concat(tileWidth, "px"));
|
|
3665
|
+
console.log("Half tile height should be: ".concat(halfTileHeight, "px"));
|
|
3666
|
+
console.log("Expected full tile: ".concat(tileWidth, "x").concat(tileWidth, "px"));
|
|
3667
|
+
console.log("Expected half tile: ".concat(tileWidth, "x").concat(halfTileHeight, "px"));
|
|
3668
|
+
console.log('=== END DEBUG ===');
|
|
3657
3669
|
return {
|
|
3658
3670
|
width: tileWidth,
|
|
3659
3671
|
marginBottom: GRID_GAP,
|
|
3672
|
+
aspectRatio: 1,
|
|
3660
3673
|
};
|
|
3661
3674
|
}
|
|
3662
3675
|
}, []);
|
|
@@ -4638,11 +4651,23 @@ var TileContainer = function (_a) {
|
|
|
4638
4651
|
return (jsxRuntimeExports.jsx(reactNative.View, { style: styles.container, testID: "tile-container", children: tiles.map(function (tile, index) {
|
|
4639
4652
|
var TileComponent = TILE_COMPONENTS[tile.type];
|
|
4640
4653
|
var isHalfSize = useTileSize(tile).isHalfSize;
|
|
4654
|
+
// Log tile dimensions for debugging
|
|
4655
|
+
if (!__DEV__) {
|
|
4656
|
+
console.log("Tile ".concat(index, " (").concat(tile.id, "): ").concat(isHalfSize ? 'Half' : 'Full', " size"));
|
|
4657
|
+
}
|
|
4641
4658
|
return (jsxRuntimeExports.jsx(reactNative.View, { style: [
|
|
4642
4659
|
styles.tileContainer,
|
|
4643
4660
|
isHalfSize && styles.halfTileContainer,
|
|
4644
4661
|
index > 0 && { marginTop: GRID_GAP },
|
|
4645
|
-
],
|
|
4662
|
+
], onLayout: function (event) {
|
|
4663
|
+
if (__DEV__) {
|
|
4664
|
+
var _a = event.nativeEvent.layout, width = _a.width, height = _a.height;
|
|
4665
|
+
console.log("=== TILE ".concat(index, " LAYOUT ==="));
|
|
4666
|
+
console.log("Tile ID: ".concat(tile.id, ", Type: ").concat(tile.type));
|
|
4667
|
+
console.log("Is Half Size: ".concat(isHalfSize));
|
|
4668
|
+
console.log("Actual dimensions: ".concat(width.toFixed(2), "x").concat(height.toFixed(2), "px"));
|
|
4669
|
+
}
|
|
4670
|
+
}, children: TileComponent ? jsxRuntimeExports.jsx(TileComponent, { tile: tile }) : null }, tile.id));
|
|
4646
4671
|
}) }));
|
|
4647
4672
|
};
|
|
4648
4673
|
var styles = reactNative.StyleSheet.create({
|
|
@@ -4659,8 +4684,8 @@ var styles = reactNative.StyleSheet.create({
|
|
|
4659
4684
|
width: '100%',
|
|
4660
4685
|
},
|
|
4661
4686
|
halfTileContainer: {
|
|
4662
|
-
|
|
4663
|
-
|
|
4687
|
+
aspectRatio: 2,
|
|
4688
|
+
backgroundColor: 'red',
|
|
4664
4689
|
},
|
|
4665
4690
|
});
|
|
4666
4691
|
|