@rahmatsaputra-my-id/react-js-library 0.0.88 → 0.0.90

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.
@@ -4,4 +4,5 @@ export interface IImageSlider {
4
4
  file: string;
5
5
  }[];
6
6
  style?: React.CSSProperties;
7
+ showIndicator?: boolean;
7
8
  }
package/dist/index.es.js CHANGED
@@ -156652,9 +156652,9 @@ var styles$8 = {
156652
156652
 
156653
156653
  var ImageSlider = function (_a) {
156654
156654
  var _b, _c;
156655
- var images$1 = _a.images, style = _a.style;
156656
- var _d = useState(0), currentIndex = _d[0], setCurrentIndex = _d[1];
156657
- var _e = useState(false), isPreviewVisible = _e[0], setIsPreviewVisible = _e[1];
156655
+ var images$1 = _a.images, style = _a.style, _d = _a.showIndicator, showIndicator = _d === void 0 ? true : _d;
156656
+ var _e = useState(0), currentIndex = _e[0], setCurrentIndex = _e[1];
156657
+ var _f = useState(false), isPreviewVisible = _f[0], setIsPreviewVisible = _f[1];
156658
156658
  var startX = useRef(0);
156659
156659
  var isSwiping = useRef(false);
156660
156660
  var handleTouchStart = function (e) {
@@ -156716,7 +156716,7 @@ var ImageSlider = function (_a) {
156716
156716
  var currentTarget = _a.currentTarget;
156717
156717
  currentTarget.onerror = null;
156718
156718
  currentTarget.src = images.image_not_available;
156719
- } }), jsxs("div", __assign({ style: styles$8.counter }, { children: [currentIndex + 1, " / ", images$1.length] }))] }))) : (jsx(Images, { src: '', style: __assign(__assign({}, styles$8.imageNotAvailable), style) })), jsx(PhotoPreviewModal, { visible: isPreviewVisible, onDismiss: function () { return setIsPreviewVisible(false); }, imageUrl: images$1.length > 0
156719
+ } }), showIndicator && (jsxs("div", __assign({ style: styles$8.counter }, { children: [currentIndex + 1, " / ", images$1.length] })))] }))) : (jsx(Images, { src: '', style: __assign(__assign({}, styles$8.imageNotAvailable), style) })), jsx(PhotoPreviewModal, { visible: isPreviewVisible, onDismiss: function () { return setIsPreviewVisible(false); }, imageUrl: images$1.length > 0
156720
156720
  ? (_c = images$1 === null || images$1 === void 0 ? void 0 : images$1[currentIndex]) === null || _c === void 0 ? void 0 : _c.file
156721
156721
  : images.image_not_available })] }));
156722
156722
  };
package/dist/index.js CHANGED
@@ -156661,9 +156661,9 @@ var styles$8 = {
156661
156661
 
156662
156662
  var ImageSlider = function (_a) {
156663
156663
  var _b, _c;
156664
- var images$1 = _a.images, style = _a.style;
156665
- var _d = React.useState(0), currentIndex = _d[0], setCurrentIndex = _d[1];
156666
- var _e = React.useState(false), isPreviewVisible = _e[0], setIsPreviewVisible = _e[1];
156664
+ var images$1 = _a.images, style = _a.style, _d = _a.showIndicator, showIndicator = _d === void 0 ? true : _d;
156665
+ var _e = React.useState(0), currentIndex = _e[0], setCurrentIndex = _e[1];
156666
+ var _f = React.useState(false), isPreviewVisible = _f[0], setIsPreviewVisible = _f[1];
156667
156667
  var startX = React.useRef(0);
156668
156668
  var isSwiping = React.useRef(false);
156669
156669
  var handleTouchStart = function (e) {
@@ -156725,7 +156725,7 @@ var ImageSlider = function (_a) {
156725
156725
  var currentTarget = _a.currentTarget;
156726
156726
  currentTarget.onerror = null;
156727
156727
  currentTarget.src = images.image_not_available;
156728
- } }), jsxRuntime.jsxs("div", __assign({ style: styles$8.counter }, { children: [currentIndex + 1, " / ", images$1.length] }))] }))) : (jsxRuntime.jsx(Images, { src: '', style: __assign(__assign({}, styles$8.imageNotAvailable), style) })), jsxRuntime.jsx(PhotoPreviewModal, { visible: isPreviewVisible, onDismiss: function () { return setIsPreviewVisible(false); }, imageUrl: images$1.length > 0
156728
+ } }), showIndicator && (jsxRuntime.jsxs("div", __assign({ style: styles$8.counter }, { children: [currentIndex + 1, " / ", images$1.length] })))] }))) : (jsxRuntime.jsx(Images, { src: '', style: __assign(__assign({}, styles$8.imageNotAvailable), style) })), jsxRuntime.jsx(PhotoPreviewModal, { visible: isPreviewVisible, onDismiss: function () { return setIsPreviewVisible(false); }, imageUrl: images$1.length > 0
156729
156729
  ? (_c = images$1 === null || images$1 === void 0 ? void 0 : images$1[currentIndex]) === null || _c === void 0 ? void 0 : _c.file
156730
156730
  : images.image_not_available })] }));
156731
156731
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rahmatsaputra-my-id/react-js-library",
3
- "version": "0.0.88",
3
+ "version": "0.0.90",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.es.js",
6
6
  "private": false,