@xaypay/tui 0.2.16 → 0.2.18

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
@@ -1135,6 +1135,7 @@ var packageResult = {
1135
1135
  wrapHeight: '100%'
1136
1136
  },
1137
1137
  icon: {
1138
+ className: 'tui_close-modal-icon'
1138
1139
  // zoom: React.createElement(SvgChecked, { fill: 'green' }),
1139
1140
  // prev: React.createElement(SvgChecked, { fill: 'green' }),
1140
1141
  // next: React.createElement(SvgChecked, { fill: 'green' }),
@@ -2244,7 +2245,7 @@ const File = /*#__PURE__*/forwardRef(({
2244
2245
  whiteSpace: 'nowrap',
2245
2246
  textOverflow: 'ellipsis'
2246
2247
  }
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", {
2248
+ }, 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
2249
  style: {
2249
2250
  position: 'absolute',
2250
2251
  top: '0px',
@@ -3190,7 +3191,7 @@ const Table = ({
3190
3191
  const [header, setHeader] = useState([]);
3191
3192
  const [disableArr, setDisableArr] = useState([]);
3192
3193
  const [classProps, setClassProps] = useState({});
3193
- const [checkDrag, setCheckDrag] = useState(false);
3194
+ const [checkDrag, setCheckDrag] = useState(null);
3194
3195
  const [checkedArray, setCheckedArray] = useState([]);
3195
3196
  const [configStyles, setConfigStyles] = useState({});
3196
3197
  const [dragging, setDragging] = useState(false);
@@ -3669,19 +3670,21 @@ const Table = ({
3669
3670
  });
3670
3671
  };
3671
3672
  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);
3673
+ if (checkDrag != null) {
3674
+ const draggableArray = body && body.length > 0 ? body.map((item, index) => {
3675
+ if (showOrder) {
3676
+ Object.values(item).map((innerItem, innerIndex) => {
3677
+ if (innerIndex === 1) {
3678
+ innerItem.content = index + 1, innerItem.draggable = true;
3679
+ }
3680
+ return innerItem;
3681
+ });
3682
+ }
3683
+ return item;
3684
+ }) : [];
3685
+ getDraggableData && getDraggableData(draggableArray);
3686
+ setBody(() => draggableArray);
3687
+ }
3685
3688
  }, [checkDrag]);
3686
3689
  useEffect(() => {
3687
3690
  const isEqual = handleSafeStringify(body) === handleSafeStringify(dataBody);
@@ -4116,6 +4119,7 @@ const Modal = ({
4116
4119
  nextIcon,
4117
4120
  closeIcon,
4118
4121
  showCloseIcon,
4122
+ closeIconClass,
4119
4123
  closeSlideIcon,
4120
4124
  selected,
4121
4125
  children,
@@ -4348,9 +4352,10 @@ const Modal = ({
4348
4352
  width: 'fit-content',
4349
4353
  alignItems: 'center',
4350
4354
  alignSelf: 'flex-end',
4351
- height: 'fit-content',
4355
+ height: '100%',
4352
4356
  justifyContent: 'center'
4353
- }
4357
+ },
4358
+ className: closeIconClass ? closeIconClass : configStyles.MODAL.icon.className
4354
4359
  }, closeIcon ? closeIcon : configStyles.MODAL.icon.close ? configStyles.MODAL.icon.close : /*#__PURE__*/React__default.createElement(SvgCloseIcon, null)) : ''), /*#__PURE__*/React__default.createElement("div", {
4355
4360
  style: {
4356
4361
  display: 'flex',
@@ -4500,6 +4505,7 @@ Modal.propTypes = {
4500
4505
  nextIcon: PropTypes.element,
4501
4506
  closeIcon: PropTypes.element,
4502
4507
  showCloseIcon: PropTypes.bool,
4508
+ closeIconClass: PropTypes.string,
4503
4509
  closeSlideIcon: PropTypes.element,
4504
4510
  headerText: PropTypes.string,
4505
4511
  headerSize: PropTypes.string,
@@ -7629,6 +7635,7 @@ const createSwipe = (id, title, child, props, swipable) => {
7629
7635
  });
7630
7636
  }
7631
7637
  const SwipifyBlock = document.getElementById('swipify_tui');
7638
+ SwipifyBlock.style.display = 'block';
7632
7639
  SwipifyBlock.appendChild(swipable);
7633
7640
  }
7634
7641
  swipable.appendChild(swipeBlock);
@@ -7693,6 +7700,7 @@ const swipe = {
7693
7700
  window.removeEventListener('popstate', handleNavigationChange);
7694
7701
  window.removeEventListener('navigationchange', handleNavigationChange);
7695
7702
  const SwipifyBlock = document.getElementById('swipify_tui');
7703
+ SwipifyBlock.style.display = 'none';
7696
7704
  SwipifyBlock.removeChild(swipable);
7697
7705
  }
7698
7706
  }, 200);
@@ -7702,12 +7710,14 @@ const swipe = {
7702
7710
  window.removeEventListener('popstate', handleNavigationChange);
7703
7711
  window.removeEventListener('navigationchange', handleNavigationChange);
7704
7712
  const SwipifyBlock = document.getElementById('swipify_tui');
7713
+ SwipifyBlock.style.display = 'none';
7705
7714
  SwipifyBlock.removeChild(swipable);
7706
7715
  }
7707
7716
  }
7708
7717
  } else {
7709
7718
  if (swipeCount === 0 && swipable) {
7710
7719
  const SwipifyBlock = document.getElementById('swipify_tui');
7720
+ SwipifyBlock.style.display = 'none';
7711
7721
  SwipifyBlock.removeChild(swipable);
7712
7722
  }
7713
7723
  }
@@ -7727,10 +7737,12 @@ const SwipeModal = () => {
7727
7737
  ref: ref,
7728
7738
  id: "swipify_tui",
7729
7739
  style: {
7730
- position: 'relative',
7740
+ position: 'absolute',
7731
7741
  width: '100%',
7742
+ top: 0,
7732
7743
  overflow: 'hidden',
7733
- zIndex: 1
7744
+ zIndex: 1,
7745
+ display: 'none'
7734
7746
  }
7735
7747
  });
7736
7748
  };
package/dist/index.js CHANGED
@@ -1166,6 +1166,7 @@ var packageResult = {
1166
1166
  wrapHeight: '100%'
1167
1167
  },
1168
1168
  icon: {
1169
+ className: 'tui_close-modal-icon'
1169
1170
  // zoom: React.createElement(SvgChecked, { fill: 'green' }),
1170
1171
  // prev: React.createElement(SvgChecked, { fill: 'green' }),
1171
1172
  // next: React.createElement(SvgChecked, { fill: 'green' }),
@@ -2275,7 +2276,7 @@ const File = /*#__PURE__*/React.forwardRef(({
2275
2276
  whiteSpace: 'nowrap',
2276
2277
  textOverflow: 'ellipsis'
2277
2278
  }
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", {
2279
+ }, 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
2280
  style: {
2280
2281
  position: 'absolute',
2281
2282
  top: '0px',
@@ -3221,7 +3222,7 @@ const Table = ({
3221
3222
  const [header, setHeader] = React.useState([]);
3222
3223
  const [disableArr, setDisableArr] = React.useState([]);
3223
3224
  const [classProps, setClassProps] = React.useState({});
3224
- const [checkDrag, setCheckDrag] = React.useState(false);
3225
+ const [checkDrag, setCheckDrag] = React.useState(null);
3225
3226
  const [checkedArray, setCheckedArray] = React.useState([]);
3226
3227
  const [configStyles, setConfigStyles] = React.useState({});
3227
3228
  const [dragging, setDragging] = React.useState(false);
@@ -3700,19 +3701,21 @@ const Table = ({
3700
3701
  });
3701
3702
  };
3702
3703
  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);
3704
+ if (checkDrag != null) {
3705
+ const draggableArray = body && body.length > 0 ? body.map((item, index) => {
3706
+ if (showOrder) {
3707
+ Object.values(item).map((innerItem, innerIndex) => {
3708
+ if (innerIndex === 1) {
3709
+ innerItem.content = index + 1, innerItem.draggable = true;
3710
+ }
3711
+ return innerItem;
3712
+ });
3713
+ }
3714
+ return item;
3715
+ }) : [];
3716
+ getDraggableData && getDraggableData(draggableArray);
3717
+ setBody(() => draggableArray);
3718
+ }
3716
3719
  }, [checkDrag]);
3717
3720
  React.useEffect(() => {
3718
3721
  const isEqual = handleSafeStringify(body) === handleSafeStringify(dataBody);
@@ -4147,6 +4150,7 @@ const Modal = ({
4147
4150
  nextIcon,
4148
4151
  closeIcon,
4149
4152
  showCloseIcon,
4153
+ closeIconClass,
4150
4154
  closeSlideIcon,
4151
4155
  selected,
4152
4156
  children,
@@ -4379,9 +4383,10 @@ const Modal = ({
4379
4383
  width: 'fit-content',
4380
4384
  alignItems: 'center',
4381
4385
  alignSelf: 'flex-end',
4382
- height: 'fit-content',
4386
+ height: '100%',
4383
4387
  justifyContent: 'center'
4384
- }
4388
+ },
4389
+ className: closeIconClass ? closeIconClass : configStyles.MODAL.icon.className
4385
4390
  }, closeIcon ? closeIcon : configStyles.MODAL.icon.close ? configStyles.MODAL.icon.close : /*#__PURE__*/React__default["default"].createElement(SvgCloseIcon, null)) : ''), /*#__PURE__*/React__default["default"].createElement("div", {
4386
4391
  style: {
4387
4392
  display: 'flex',
@@ -4531,6 +4536,7 @@ Modal.propTypes = {
4531
4536
  nextIcon: PropTypes__default["default"].element,
4532
4537
  closeIcon: PropTypes__default["default"].element,
4533
4538
  showCloseIcon: PropTypes__default["default"].bool,
4539
+ closeIconClass: PropTypes__default["default"].string,
4534
4540
  closeSlideIcon: PropTypes__default["default"].element,
4535
4541
  headerText: PropTypes__default["default"].string,
4536
4542
  headerSize: PropTypes__default["default"].string,
@@ -7660,6 +7666,7 @@ const createSwipe = (id, title, child, props, swipable) => {
7660
7666
  });
7661
7667
  }
7662
7668
  const SwipifyBlock = document.getElementById('swipify_tui');
7669
+ SwipifyBlock.style.display = 'block';
7663
7670
  SwipifyBlock.appendChild(swipable);
7664
7671
  }
7665
7672
  swipable.appendChild(swipeBlock);
@@ -7724,6 +7731,7 @@ const swipe = {
7724
7731
  window.removeEventListener('popstate', handleNavigationChange);
7725
7732
  window.removeEventListener('navigationchange', handleNavigationChange);
7726
7733
  const SwipifyBlock = document.getElementById('swipify_tui');
7734
+ SwipifyBlock.style.display = 'none';
7727
7735
  SwipifyBlock.removeChild(swipable);
7728
7736
  }
7729
7737
  }, 200);
@@ -7733,12 +7741,14 @@ const swipe = {
7733
7741
  window.removeEventListener('popstate', handleNavigationChange);
7734
7742
  window.removeEventListener('navigationchange', handleNavigationChange);
7735
7743
  const SwipifyBlock = document.getElementById('swipify_tui');
7744
+ SwipifyBlock.style.display = 'none';
7736
7745
  SwipifyBlock.removeChild(swipable);
7737
7746
  }
7738
7747
  }
7739
7748
  } else {
7740
7749
  if (swipeCount === 0 && swipable) {
7741
7750
  const SwipifyBlock = document.getElementById('swipify_tui');
7751
+ SwipifyBlock.style.display = 'none';
7742
7752
  SwipifyBlock.removeChild(swipable);
7743
7753
  }
7744
7754
  }
@@ -7758,10 +7768,12 @@ const SwipeModal = () => {
7758
7768
  ref: ref,
7759
7769
  id: "swipify_tui",
7760
7770
  style: {
7761
- position: 'relative',
7771
+ position: 'absolute',
7762
7772
  width: '100%',
7773
+ top: 0,
7763
7774
  overflow: 'hidden',
7764
- zIndex: 1
7775
+ zIndex: 1,
7776
+ display: 'none'
7765
7777
  }
7766
7778
  });
7767
7779
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xaypay/tui",
3
- "version": "0.2.16",
3
+ "version": "0.2.18",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",
package/tui.config.js CHANGED
@@ -720,6 +720,7 @@ export default {
720
720
  },
721
721
 
722
722
  icon: {
723
+ className: 'tui_close-modal-icon'
723
724
  // zoom: React.createElement(SvgChecked, { fill: 'green' }),
724
725
  // prev: React.createElement(SvgChecked, { fill: 'green' }),
725
726
  // next: React.createElement(SvgChecked, { fill: 'green' }),