@redneckz/wildless-cms-uni-blocks 0.7.2 → 0.7.4
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/bundle/bundle.umd.js +9 -4
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/content-page-repository/transformPicture.js +1 -1
- package/dist/content-page-repository/transformPicture.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListContainer.js +8 -3
- package/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/content-page-repository/transformPicture.js +1 -1
- package/lib/content-page-repository/transformPicture.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListContainer.js +8 -3
- package/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControl.fixture.d.ts +12 -0
- package/mobile/bundle/bundle.umd.js +9 -4
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/content-page-repository/transformPicture.js +1 -1
- package/mobile/dist/content-page-repository/transformPicture.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.js +8 -3
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/mobile/lib/content-page-repository/transformPicture.js +1 -1
- package/mobile/lib/content-page-repository/transformPicture.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.js +8 -3
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/mobile/src/content-page-repository/transformPicture.ts +5 -1
- package/mobile/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +9 -4
- package/package.json +1 -1
- package/src/components/SwipeListControlBlock/SwipeListControlBlock.fixture.tsx +1 -1
- package/src/content-page-repository/transformPicture.ts +5 -1
- package/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +9 -4
- package/src/ui-kit/SwipeListControl/SwipeListControl.fixture.mobile.tsx +2 -2
- package/src/ui-kit/SwipeListControl/SwipeListControl.fixture.tsx +53 -0
package/bundle/bundle.umd.js
CHANGED
|
@@ -1400,15 +1400,17 @@
|
|
|
1400
1400
|
onVisibleIndicesChange && onVisibleIndicesChange(getVisibleIndices(itemsVisibilityList));
|
|
1401
1401
|
}, [onVisibleItemsChange, onVisibleIndicesChange]);
|
|
1402
1402
|
const additionPadding = visibleItemCount > 0 ? gap * Number(visibleItemCount) - 1 : 0;
|
|
1403
|
+
const isVerticalList = listType === 'vertical-list';
|
|
1403
1404
|
const isHorizontalList = listType === 'horizontal-list';
|
|
1404
1405
|
const containerStyle = {
|
|
1405
|
-
...(isHorizontalList ?
|
|
1406
|
+
...(isHorizontalList ? getContainerOffset(padding, additionPadding) : {}),
|
|
1407
|
+
...(isVerticalList ? getContainerHeight(containerRef) : {}),
|
|
1406
1408
|
gap: `${gap}px`,
|
|
1407
1409
|
};
|
|
1408
|
-
return (jsx("div", { className: style('box-border overflow-auto no-scrollbar', listType, className), style: containerStyle, role: "list", ref: containerRef, children: mapChildren((child, idx) => (jsx(SwipeListItem, { className: style(snapAlign, visibleItemCount ? childStyleMap[visibleItemCount - 1] : ''
|
|
1410
|
+
return (jsx("div", { className: style('box-border overflow-auto no-scrollbar', listType, className), style: containerStyle, role: "list", ref: containerRef, children: mapChildren((child, idx) => (jsx(SwipeListItem, { className: style(snapAlign, visibleItemCount ? childStyleMap[visibleItemCount - 1] : ''), style: isHorizontalList ? getContainerOffset(padding / 4) : {}, activeIndex: activeIndex, idx: idx, observerOptions: observerOptions, onIntersection: handleIntersection, children: child }, String(idx))))(children) }));
|
|
1409
1411
|
});
|
|
1410
1412
|
// Styles used to compensate outer container padding to get rid of clipping effect
|
|
1411
|
-
const
|
|
1413
|
+
const getContainerOffset = (padding, additionalPadding = 0) => ({
|
|
1412
1414
|
marginLeft: `${-padding}px`,
|
|
1413
1415
|
marginRight: `${-padding}px`,
|
|
1414
1416
|
paddingLeft: `${padding}px`,
|
|
@@ -1418,6 +1420,9 @@
|
|
|
1418
1420
|
.map((_, i) => [_, i])
|
|
1419
1421
|
.filter(([_]) => _ && _.intersectionRatio >= 0.9)
|
|
1420
1422
|
.map(([, i]) => i);
|
|
1423
|
+
const getContainerHeight = (ref) => ({
|
|
1424
|
+
height: ref?.current?.firstElementChild?.clientHeight || 0,
|
|
1425
|
+
});
|
|
1421
1426
|
|
|
1422
1427
|
const areArraysEqual = (as, bs) => as === bs || Boolean(as && bs && as?.length === bs?.length && as.every((_, i) => _ === bs[i]));
|
|
1423
1428
|
|
|
@@ -3996,7 +4001,7 @@
|
|
|
3996
4001
|
return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto" }) }));
|
|
3997
4002
|
}
|
|
3998
4003
|
|
|
3999
|
-
const packageVersion = "0.7.
|
|
4004
|
+
const packageVersion = "0.7.4";
|
|
4000
4005
|
|
|
4001
4006
|
exports.Blocks = Blocks;
|
|
4002
4007
|
exports.ContentPage = ContentPage;
|