@xaypay/tui 0.2.16 → 0.2.17

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/index.es.js CHANGED
@@ -2244,7 +2244,7 @@ const File = /*#__PURE__*/forwardRef(({
2244
2244
  whiteSpace: 'nowrap',
2245
2245
  textOverflow: 'ellipsis'
2246
2246
  }
2247
- }, singleFile ? singleFile.name : /*#__PURE__*/React__default.createElement("span", null, fileSizeText ?? configStyles.FILE.sizeText, " ", maxSize, " \u0544\u0532 (", ' ', fileExtensions.toString().split(',').join(', '), " )"))))), /*#__PURE__*/React__default.createElement("div", {
2247
+ }, singleFile && singleFile[`${0}`] ? singleFile[`${0}`].name : /*#__PURE__*/React__default.createElement("span", null, fileSizeText ?? configStyles.FILE.sizeText, " ", maxSize, " \u0544\u0532 (", ' ', fileExtensions.toString().split(',').join(', '), " )"))))), /*#__PURE__*/React__default.createElement("div", {
2248
2248
  style: {
2249
2249
  position: 'absolute',
2250
2250
  top: '0px',
@@ -3190,7 +3190,7 @@ const Table = ({
3190
3190
  const [header, setHeader] = useState([]);
3191
3191
  const [disableArr, setDisableArr] = useState([]);
3192
3192
  const [classProps, setClassProps] = useState({});
3193
- const [checkDrag, setCheckDrag] = useState(false);
3193
+ const [checkDrag, setCheckDrag] = useState(null);
3194
3194
  const [checkedArray, setCheckedArray] = useState([]);
3195
3195
  const [configStyles, setConfigStyles] = useState({});
3196
3196
  const [dragging, setDragging] = useState(false);
@@ -3669,19 +3669,21 @@ const Table = ({
3669
3669
  });
3670
3670
  };
3671
3671
  useEffect(() => {
3672
- const draggableArray = body && body.length > 0 ? body.map((item, index) => {
3673
- if (showOrder) {
3674
- Object.values(item).map((innerItem, innerIndex) => {
3675
- if (innerIndex === 1) {
3676
- innerItem.content = index + 1, innerItem.draggable = true;
3677
- }
3678
- return innerItem;
3679
- });
3680
- }
3681
- return item;
3682
- }) : [];
3683
- getDraggableData && getDraggableData(draggableArray);
3684
- setBody(() => draggableArray);
3672
+ if (checkDrag != null) {
3673
+ const draggableArray = body && body.length > 0 ? body.map((item, index) => {
3674
+ if (showOrder) {
3675
+ Object.values(item).map((innerItem, innerIndex) => {
3676
+ if (innerIndex === 1) {
3677
+ innerItem.content = index + 1, innerItem.draggable = true;
3678
+ }
3679
+ return innerItem;
3680
+ });
3681
+ }
3682
+ return item;
3683
+ }) : [];
3684
+ getDraggableData && getDraggableData(draggableArray);
3685
+ setBody(() => draggableArray);
3686
+ }
3685
3687
  }, [checkDrag]);
3686
3688
  useEffect(() => {
3687
3689
  const isEqual = handleSafeStringify(body) === handleSafeStringify(dataBody);
@@ -7629,6 +7631,7 @@ const createSwipe = (id, title, child, props, swipable) => {
7629
7631
  });
7630
7632
  }
7631
7633
  const SwipifyBlock = document.getElementById('swipify_tui');
7634
+ SwipifyBlock.style.display = 'block';
7632
7635
  SwipifyBlock.appendChild(swipable);
7633
7636
  }
7634
7637
  swipable.appendChild(swipeBlock);
@@ -7693,6 +7696,7 @@ const swipe = {
7693
7696
  window.removeEventListener('popstate', handleNavigationChange);
7694
7697
  window.removeEventListener('navigationchange', handleNavigationChange);
7695
7698
  const SwipifyBlock = document.getElementById('swipify_tui');
7699
+ SwipifyBlock.style.display = 'none';
7696
7700
  SwipifyBlock.removeChild(swipable);
7697
7701
  }
7698
7702
  }, 200);
@@ -7702,12 +7706,14 @@ const swipe = {
7702
7706
  window.removeEventListener('popstate', handleNavigationChange);
7703
7707
  window.removeEventListener('navigationchange', handleNavigationChange);
7704
7708
  const SwipifyBlock = document.getElementById('swipify_tui');
7709
+ SwipifyBlock.style.display = 'none';
7705
7710
  SwipifyBlock.removeChild(swipable);
7706
7711
  }
7707
7712
  }
7708
7713
  } else {
7709
7714
  if (swipeCount === 0 && swipable) {
7710
7715
  const SwipifyBlock = document.getElementById('swipify_tui');
7716
+ SwipifyBlock.style.display = 'none';
7711
7717
  SwipifyBlock.removeChild(swipable);
7712
7718
  }
7713
7719
  }
@@ -7727,10 +7733,12 @@ const SwipeModal = () => {
7727
7733
  ref: ref,
7728
7734
  id: "swipify_tui",
7729
7735
  style: {
7730
- position: 'relative',
7736
+ position: 'absolute',
7731
7737
  width: '100%',
7738
+ top: 0,
7732
7739
  overflow: 'hidden',
7733
- zIndex: 1
7740
+ zIndex: 1,
7741
+ display: 'none'
7734
7742
  }
7735
7743
  });
7736
7744
  };
package/dist/index.js CHANGED
@@ -2275,7 +2275,7 @@ const File = /*#__PURE__*/React.forwardRef(({
2275
2275
  whiteSpace: 'nowrap',
2276
2276
  textOverflow: 'ellipsis'
2277
2277
  }
2278
- }, singleFile ? singleFile.name : /*#__PURE__*/React__default["default"].createElement("span", null, fileSizeText ?? configStyles.FILE.sizeText, " ", maxSize, " \u0544\u0532 (", ' ', fileExtensions.toString().split(',').join(', '), " )"))))), /*#__PURE__*/React__default["default"].createElement("div", {
2278
+ }, singleFile && singleFile[`${0}`] ? singleFile[`${0}`].name : /*#__PURE__*/React__default["default"].createElement("span", null, fileSizeText ?? configStyles.FILE.sizeText, " ", maxSize, " \u0544\u0532 (", ' ', fileExtensions.toString().split(',').join(', '), " )"))))), /*#__PURE__*/React__default["default"].createElement("div", {
2279
2279
  style: {
2280
2280
  position: 'absolute',
2281
2281
  top: '0px',
@@ -3221,7 +3221,7 @@ const Table = ({
3221
3221
  const [header, setHeader] = React.useState([]);
3222
3222
  const [disableArr, setDisableArr] = React.useState([]);
3223
3223
  const [classProps, setClassProps] = React.useState({});
3224
- const [checkDrag, setCheckDrag] = React.useState(false);
3224
+ const [checkDrag, setCheckDrag] = React.useState(null);
3225
3225
  const [checkedArray, setCheckedArray] = React.useState([]);
3226
3226
  const [configStyles, setConfigStyles] = React.useState({});
3227
3227
  const [dragging, setDragging] = React.useState(false);
@@ -3700,19 +3700,21 @@ const Table = ({
3700
3700
  });
3701
3701
  };
3702
3702
  React.useEffect(() => {
3703
- const draggableArray = body && body.length > 0 ? body.map((item, index) => {
3704
- if (showOrder) {
3705
- Object.values(item).map((innerItem, innerIndex) => {
3706
- if (innerIndex === 1) {
3707
- innerItem.content = index + 1, innerItem.draggable = true;
3708
- }
3709
- return innerItem;
3710
- });
3711
- }
3712
- return item;
3713
- }) : [];
3714
- getDraggableData && getDraggableData(draggableArray);
3715
- setBody(() => draggableArray);
3703
+ if (checkDrag != null) {
3704
+ const draggableArray = body && body.length > 0 ? body.map((item, index) => {
3705
+ if (showOrder) {
3706
+ Object.values(item).map((innerItem, innerIndex) => {
3707
+ if (innerIndex === 1) {
3708
+ innerItem.content = index + 1, innerItem.draggable = true;
3709
+ }
3710
+ return innerItem;
3711
+ });
3712
+ }
3713
+ return item;
3714
+ }) : [];
3715
+ getDraggableData && getDraggableData(draggableArray);
3716
+ setBody(() => draggableArray);
3717
+ }
3716
3718
  }, [checkDrag]);
3717
3719
  React.useEffect(() => {
3718
3720
  const isEqual = handleSafeStringify(body) === handleSafeStringify(dataBody);
@@ -7660,6 +7662,7 @@ const createSwipe = (id, title, child, props, swipable) => {
7660
7662
  });
7661
7663
  }
7662
7664
  const SwipifyBlock = document.getElementById('swipify_tui');
7665
+ SwipifyBlock.style.display = 'block';
7663
7666
  SwipifyBlock.appendChild(swipable);
7664
7667
  }
7665
7668
  swipable.appendChild(swipeBlock);
@@ -7724,6 +7727,7 @@ const swipe = {
7724
7727
  window.removeEventListener('popstate', handleNavigationChange);
7725
7728
  window.removeEventListener('navigationchange', handleNavigationChange);
7726
7729
  const SwipifyBlock = document.getElementById('swipify_tui');
7730
+ SwipifyBlock.style.display = 'none';
7727
7731
  SwipifyBlock.removeChild(swipable);
7728
7732
  }
7729
7733
  }, 200);
@@ -7733,12 +7737,14 @@ const swipe = {
7733
7737
  window.removeEventListener('popstate', handleNavigationChange);
7734
7738
  window.removeEventListener('navigationchange', handleNavigationChange);
7735
7739
  const SwipifyBlock = document.getElementById('swipify_tui');
7740
+ SwipifyBlock.style.display = 'none';
7736
7741
  SwipifyBlock.removeChild(swipable);
7737
7742
  }
7738
7743
  }
7739
7744
  } else {
7740
7745
  if (swipeCount === 0 && swipable) {
7741
7746
  const SwipifyBlock = document.getElementById('swipify_tui');
7747
+ SwipifyBlock.style.display = 'none';
7742
7748
  SwipifyBlock.removeChild(swipable);
7743
7749
  }
7744
7750
  }
@@ -7758,10 +7764,12 @@ const SwipeModal = () => {
7758
7764
  ref: ref,
7759
7765
  id: "swipify_tui",
7760
7766
  style: {
7761
- position: 'relative',
7767
+ position: 'absolute',
7762
7768
  width: '100%',
7769
+ top: 0,
7763
7770
  overflow: 'hidden',
7764
- zIndex: 1
7771
+ zIndex: 1,
7772
+ display: 'none'
7765
7773
  }
7766
7774
  });
7767
7775
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xaypay/tui",
3
- "version": "0.2.16",
3
+ "version": "0.2.17",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",