kui-crm 0.0.293 → 0.0.294

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/cjs/index.js CHANGED
@@ -3716,19 +3716,24 @@ var templateObject_1$u, templateObject_2$l, templateObject_3$e;
3716
3716
 
3717
3717
  var GalleryThumbnails = function (_a) {
3718
3718
  var images = _a.images, activeSlide = _a.activeSlide, handleChange = _a.handleChange;
3719
+ var sliderRef = React.useRef();
3719
3720
  var params = {
3720
3721
  slidesPerView: "auto",
3721
3722
  spaceBetween: 12,
3722
3723
  grabCursor: true,
3723
3724
  slideToClickedSlide: true,
3724
- lazyPreloadPrevNext: 2,
3725
3725
  centeredSlides: true,
3726
3726
  centeredSlidesBounds: true,
3727
3727
  lazy: true,
3728
3728
  };
3729
+ React.useEffect(function () {
3730
+ var _a;
3731
+ // @ts-ignore
3732
+ (_a = sliderRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo(activeSlide);
3733
+ }, [activeSlide]);
3729
3734
  if (!images)
3730
3735
  return null;
3731
- return (jsxRuntime$1.jsx(Wrapper$4, { children: jsxRuntime$1.jsx(Swiper__default["default"], __assign({}, params, { children: images.map(function (image, index) { return (jsxRuntime$1.jsx(StyledSlide$2, __assign({
3736
+ return (jsxRuntime$1.jsx(Wrapper$4, { children: jsxRuntime$1.jsx(Swiper__default["default"], __assign({ ref: sliderRef }, params, { children: images.map(function (image, index) { return (jsxRuntime$1.jsx(StyledSlide$2, __assign({
3732
3737
  // css={index === activeSlide && activeStyles(theme)}
3733
3738
  onClick: function () { return handleChange(index); } }, { children: jsxRuntime$1.jsx(StyledImage$5, { active: index === activeSlide, src: image.mediumImageUrl, alt: "slide", loading: "lazy" }) }), index)); }) })) }));
3734
3739
  };
@@ -3747,7 +3752,6 @@ var GallerySlider = function (_a) {
3747
3752
  slidesPerView: 1,
3748
3753
  spaceBetween: 4,
3749
3754
  grabCursor: true,
3750
- lazyPreloadPrevNext: 1,
3751
3755
  lazy: true,
3752
3756
  on: {
3753
3757
  slideChange: function (swipe) {