@xaypay/tui 0.0.109 → 0.0.110

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.js CHANGED
@@ -74,16 +74,16 @@ const SvgRequired = ({
74
74
  titleId,
75
75
  ...props
76
76
  }) => /*#__PURE__*/React__namespace.createElement("svg", _extends({
77
- width: "12",
78
- height: "12",
79
- viewBox: "0 0 12 12",
77
+ width: "10",
78
+ height: "10",
79
+ viewBox: "0 0 10 10",
80
80
  fill: "none",
81
81
  xmlns: "http://www.w3.org/2000/svg",
82
82
  "aria-labelledby": titleId
83
83
  }, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
84
84
  id: titleId
85
85
  }, title) : null, /*#__PURE__*/React__namespace.createElement("path", {
86
- d: "M9.281 7.317 7 6l2.281-1.317a.5.5 0 0 0-.5-.866L6.5 5.134V2.5a.5.5 0 1 0-1 0v2.634L3.219 3.817a.5.5 0 0 0-.5.866L5 6 2.719 7.317a.5.5 0 0 0 .5.866L5.5 6.866V9.5a.5.5 0 1 0 1 0V6.866l2.281 1.317a.5.5 0 0 0 .5-.866Z",
86
+ d: "M7.734 6.097 5.834 5l1.9-1.098a.417.417 0 0 0-.417-.721l-1.9 1.097V2.083a.417.417 0 0 0-.834 0v2.195l-1.9-1.097a.417.417 0 0 0-.417.721L4.166 5l-1.9 1.097a.417.417 0 0 0 .416.722l1.901-1.097v2.195a.417.417 0 1 0 .834 0V5.722l1.9 1.097a.417.417 0 0 0 .417-.722Z",
87
87
  fill: "#E00"
88
88
  }));
89
89
 
@@ -115,7 +115,7 @@ function styleInject(css, ref) {
115
115
  }
116
116
 
117
117
  var css_248z$f = ".file-module_file-form__l13d5{align-items:center;background:#fbfbfb;border:2px dashed;border-radius:6px;cursor:pointer;display:flex;flex-direction:column;height:190px;justify-content:space-between;overflow:hidden;padding:4px 0;position:relative;width:100%}.file-module_file-form-wrap__qY--B:before{background:rgba(60,57,62,.4);border-radius:6px;content:\"\";height:100%;left:0;opacity:0;pointer-events:none;position:absolute;top:0;transition:opacity .24s;width:100%;z-index:1}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover:before{opacity:1;pointer-events:unset}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover .file-module_delete-upload-icon__PWN66{opacity:1}.file-module_file-form-inner-upload__tq3Dn{align-items:center;display:flex;flex-direction:column;justify-content:space-between;padding-bottom:16px;padding-top:48px}.file-module_file-form-inner-upload__tq3Dn>img{display:block;margin-bottom:14px}.file-module_upload-info__a8GFs{margin-bottom:40px;max-width:150px;text-align:center}.file-module_upload-info-txt__l11uN{color:#0da574}.file-module_file-form__l13d5.file-module_default__t7KU0{border-color:#d1d1d1}.file-module_file-form__l13d5.file-module_error__H-M4Z{border-color:#e00!important}.file-module_file-form__l13d5.file-module_accept__WTW6V{border-color:#00236a}.file-module_delete-upload-icon__PWN66{align-items:center;background:#fff;border-radius:6px;cursor:pointer;display:flex;height:26px;justify-content:center;opacity:0;position:absolute;right:10px;top:10px;transition:opacity .24s;width:26px;z-index:11}.file-module_delete-upload-icon__PWN66>i{color:#00236a;font-size:16px}.file-module_upload-file-content__QHMjn{align-items:center;display:flex;height:100%;justify-content:center;max-height:190px;overflow:hidden;position:relative;width:100%}.file-module_upload-file-content__QHMjn>img{display:block;height:auto;max-height:95%;object-fit:contain;width:27.8rem}.file-module_file-form-title__zWTSB{margin-bottom:10px;max-width:390px;word-break:break-all}.file-module_file-form-wrap__qY--B{position:relative;transform:translateZ(0)}";
118
- var styles$c = {"file-form-wrap":"file-module_file-form-wrap__qY--B","file-form":"file-module_file-form__l13d5","active":"file-module_active__L1gPt","delete-upload-icon":"file-module_delete-upload-icon__PWN66","file-form-inner-upload":"file-module_file-form-inner-upload__tq3Dn","upload-info":"file-module_upload-info__a8GFs","upload-info-txt":"file-module_upload-info-txt__l11uN","default":"file-module_default__t7KU0","error":"file-module_error__H-M4Z","accept":"file-module_accept__WTW6V","upload-file-content":"file-module_upload-file-content__QHMjn","file-form-title":"file-module_file-form-title__zWTSB"};
118
+ var styles$d = {"file-form-wrap":"file-module_file-form-wrap__qY--B","file-form":"file-module_file-form__l13d5","active":"file-module_active__L1gPt","delete-upload-icon":"file-module_delete-upload-icon__PWN66","file-form-inner-upload":"file-module_file-form-inner-upload__tq3Dn","upload-info":"file-module_upload-info__a8GFs","upload-info-txt":"file-module_upload-info-txt__l11uN","default":"file-module_default__t7KU0","error":"file-module_error__H-M4Z","accept":"file-module_accept__WTW6V","upload-file-content":"file-module_upload-file-content__QHMjn","file-form-title":"file-module_file-form-title__zWTSB"};
119
119
  styleInject(css_248z$f);
120
120
 
121
121
  const File = ({
@@ -176,11 +176,11 @@ const File = ({
176
176
  document.querySelector(`.${name}`).value = '';
177
177
  };
178
178
  return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("p", {
179
- className: `${styles$c['file-form-title']} ile-form-title-rem`
179
+ className: `${styles$d['file-form-title']} ile-form-title-rem`
180
180
  }, label, required && /*#__PURE__*/React__default["default"].createElement("sup", null, /*#__PURE__*/React__default["default"].createElement(SvgRequired, null))), /*#__PURE__*/React__default["default"].createElement("div", {
181
- className: classnames__default["default"](`${styles$c['file-form-wrap']} file-form-wrap-rem`, image ? styles$c['active'] : '')
181
+ className: classnames__default["default"](`${styles$d['file-form-wrap']} file-form-wrap-rem`, image ? styles$d['active'] : '')
182
182
  }, /*#__PURE__*/React__default["default"].createElement("div", {
183
- className: `${styles$c['file-form']} file-form-rem ${error || errorMessage ? styles$c['error'] : ''}`,
183
+ className: `${styles$d['file-form']} file-form-rem ${error || errorMessage ? styles$d['error'] : ''}`,
184
184
  onClick: () => document.querySelector(`.${name}`).click()
185
185
  }, /*#__PURE__*/React__default["default"].createElement("input", {
186
186
  hidden: true,
@@ -189,23 +189,23 @@ const File = ({
189
189
  disabled: disabled,
190
190
  onChange: e => handleCheckFile(e)
191
191
  }), image ? /*#__PURE__*/React__default["default"].createElement("div", {
192
- className: `${styles$c['upload-file-content']} upload-file-content-rem`
192
+ className: `${styles$d['upload-file-content']} upload-file-content-rem`
193
193
  }, image === 'pdf' ? /*#__PURE__*/React__default["default"].createElement(SvgPdf, null) : /*#__PURE__*/React__default["default"].createElement("img", {
194
194
  src: image,
195
195
  alt: fileName
196
196
  })) : /*#__PURE__*/React__default["default"].createElement("div", {
197
- className: `${styles$c['file-form-inner-upload']} ile-form-inner-upload-rem`
197
+ className: `${styles$d['file-form-inner-upload']} ile-form-inner-upload-rem`
198
198
  }, /*#__PURE__*/React__default["default"].createElement("img", {
199
199
  src: "../../assets/upload.svg",
200
200
  alt: ""
201
201
  }), /*#__PURE__*/React__default["default"].createElement("span", {
202
- className: `${styles$c['upload-info']} upload-info-rem`
202
+ className: `${styles$d['upload-info']} upload-info-rem`
203
203
  }, /*#__PURE__*/React__default["default"].createElement("span", {
204
- className: `${styles$c['upload-info-txt']} upload-info-txt-rem`
204
+ className: `${styles$d['upload-info-txt']} upload-info-txt-rem`
205
205
  }, "\u0532\u0565\u057C\u0576\u0565\u056C")), /*#__PURE__*/React__default["default"].createElement("span", {
206
- className: `${styles$c['upload-info-size']} upload-info-size-rem`
206
+ className: `${styles$d['upload-info-size']} upload-info-size-rem`
207
207
  }, "\u0531\u057C\u0561\u057E\u0565\u056C\u0561\u0563\u0578\u0582\u0575\u0576\u0568 ", maxSize, "\u0544\u0532 ( ", fileExtensions.toString().split(',').join(', '), " )"))), !disabled && /*#__PURE__*/React__default["default"].createElement("div", {
208
- className: `${styles$c['delete-upload-icon']} delete-upload-icon-rem`,
208
+ className: `${styles$d['delete-upload-icon']} delete-upload-icon-rem`,
209
209
  onClick: handleRemoveFile
210
210
  }, /*#__PURE__*/React__default["default"].createElement("i", {
211
211
  className: "icon-delete"
@@ -380,15 +380,769 @@ SingleCheckbox.propTypes = {
380
380
  ignoreDisabledForChecked: PropTypes__default["default"].bool
381
381
  };
382
382
 
383
- var css_248z$e = ".table-module_sorting-arrows__BaN-G:after{content:\"▲\";font-size:11px;position:absolute;right:0;top:calc(50% - 12px)}.table-module_sorting-arrows__BaN-G:before{bottom:calc(50% - 12px);content:\"▼\";font-size:11px;position:absolute;right:0}.table-module_td-span__XHo6k{cursor:pointer;display:inline-block;position:relative}.table-module_td-span__XHo6k>svg{left:0;position:absolute;top:0;z-index:-1}";
383
+ var css_248z$e = ".table-module_sorting-arrows__BaN-G:after{content:\"▲\";font-size:11px;position:absolute;right:0;top:calc(50% - 12px)}.table-module_sorting-arrows__BaN-G:before{bottom:calc(50% - 12px);content:\"▼\";font-size:11px;position:absolute;right:0}.table-module_td-span__XHo6k{display:inline-block;position:relative}.table-module_td-span__XHo6k>svg{left:0;position:absolute;top:0;z-index:-1}.table-module_list-text__kmKIq{cursor:pointer;margin:0 0 8px;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.table-module_dots-option-item__jNOxO{box-sizing:border-box;cursor:pointer;display:flex;height:39px;margin-bottom:2px;padding:10px;position:relative;width:100%}.table-module_dots-option-item__jNOxO:after{background-color:#eee;border-radius:1px;-webkit-border-radius:1px;-moz-border-radius:1px;-ms-border-radius:1px;-o-border-radius:1px;content:\"\";height:2px;left:10px;position:absolute;top:calc(100% - 2px);width:calc(100% - 20px)}.table-module_dots-option-item__jNOxO:last-child:after{display:none}";
384
+ var styles$c = {"sorting-arrows":"table-module_sorting-arrows__BaN-G","td-span":"table-module_td-span__XHo6k","list-text":"table-module_list-text__kmKIq","dots-option-item":"table-module_dots-option-item__jNOxO"};
384
385
  styleInject(css_248z$e);
385
386
 
386
- ({
387
+ /* eslint-disable no-prototype-builtins */
388
+ const TH = ({
389
+ item,
390
+ tHeadFamily,
391
+ tHeadPadding,
392
+ tHeadFontSize,
393
+ tHeadFontWeight,
394
+ handleCheckedHeader,
395
+ borderTopLeftRadius,
396
+ borderTopRightRadius,
397
+ handleHeaderItemClick,
398
+ handleCheckArrowActionHeader
399
+ }) => {
400
+ return /*#__PURE__*/React__default["default"].createElement("th", {
401
+ style: {
402
+ width: 'auto',
403
+ cursor: 'pointer',
404
+ whiteSpace: 'nowrap',
405
+ position: 'relative',
406
+ padding: tHeadPadding,
407
+ fontSize: tHeadFontSize,
408
+ fontFamily: tHeadFamily,
409
+ fontWeight: tHeadFontWeight,
410
+ borderTopLeftRadius: borderTopLeftRadius,
411
+ borderTopRightRadius: borderTopRightRadius
412
+ },
413
+ onClick: handleHeaderItemClick,
414
+ className: `${item.sortingArrows && styles$c['sorting-arrows']}`
415
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
416
+ style: {
417
+ display: 'flex',
418
+ alignItems: 'flex-start',
419
+ justifyContent: Object.prototype.hasOwnProperty.call(item, 'checkBox') ? 'space-between' : 'center'
420
+ }
421
+ }, item.hasOwnProperty('checkBox') ? /*#__PURE__*/React__default["default"].createElement(SingleCheckbox, {
422
+ data: item,
423
+ float: "left",
424
+ checked: item.checkBox.checked,
425
+ disabled: item.checkBox.disabled,
426
+ handleChecked: !item.checkBox.disabled ? handleCheckedHeader : _ => _,
427
+ checkedColor: item.checkBox.checkedColor ? item.checkBox.checkedColor : '',
428
+ unCheckedColor: item.checkBox.unCheckedColor ? item.checkBox.unCheckedColor : ''
429
+ }) : '', /*#__PURE__*/React__default["default"].createElement("p", {
430
+ style: {
431
+ margin: '0px'
432
+ },
433
+ onClick: Object.prototype.hasOwnProperty.call(item, 'arrowComponent') ? e => handleCheckArrowActionHeader(e, item) : _ => _
434
+ }, item.type === 'show' ? item.content : Object.prototype.hasOwnProperty.call(item, 'arrowComponent') ? item.status === 'close' ? item.closeArrow : item.openArrow : '')));
435
+ };
436
+
437
+ const TD = ({
438
+ item,
439
+ index,
440
+ innerIndex,
441
+ tBodyColor,
442
+ borderRight,
443
+ tBodyPadding,
444
+ tBodyFontSize,
445
+ openListColor,
446
+ tBodyTextAlign,
447
+ tBodyFontFamily,
448
+ tBodyFontWeight,
449
+ handleCheckDots,
450
+ handleCheckedBody,
451
+ handleBodyActionClick,
452
+ handleCheckArrowAction,
453
+ handleOpenCloseRowSingleArrow
454
+ }) => {
455
+ return /*#__PURE__*/React__default["default"].createElement("td", {
456
+ style: {
457
+ width: 'auto',
458
+ color: tBodyColor,
459
+ verticalAlign: 'top',
460
+ whiteSpace: 'nowrap',
461
+ padding: tBodyPadding,
462
+ fontSize: tBodyFontSize,
463
+ borderRight: borderRight,
464
+ textAlign: tBodyTextAlign,
465
+ fontFamily: tBodyFontFamily,
466
+ fontWeight: tBodyFontWeight,
467
+ boxShadow: item.colorStatus ? `inset 3px 0px 0px 0px ${item.colorStatus}` : ''
468
+ }
469
+ }, Array.isArray(item) ? item.length > 0 ? item.map((newItem, newIndex) => {
470
+ if (newItem && !Array.isArray(newItem) && typeof newItem === 'object') {
471
+ return /*#__PURE__*/React__default["default"].createElement("span", {
472
+ style: {
473
+ width: '32px',
474
+ height: '32px',
475
+ marginRight: '10px',
476
+ cursor: Object.prototype.hasOwnProperty.call(newItem, 'type') ? 'pointer' : 'auto'
477
+ },
478
+ id: newItem.id,
479
+ type: newItem.type,
480
+ className: styles$c['td-span'],
481
+ key: `${newItem.id}_${newIndex}`,
482
+ onClick: Object.prototype.hasOwnProperty.call(newItem, 'type') ? e => handleBodyActionClick(e, {
483
+ item,
484
+ index,
485
+ innerIndex
486
+ }) : _ => _
487
+ }, newItem.content);
488
+ } else if (newItem && Array.isArray(newItem)) {
489
+ return /*#__PURE__*/React__default["default"].createElement("span", {
490
+ key: `${newItem.id}_${newIndex}`,
491
+ style: {
492
+ display: 'inline-block',
493
+ marginRight: newIndex !== item.length - 1 ? '10px' : '0px',
494
+ borderRight: newIndex !== item.length - 1 ? '1px solid rgb(238, 238, 238)' : 'none'
495
+ }
496
+ }, item[newIndex].map((iT, iN) => {
497
+ return /*#__PURE__*/React__default["default"].createElement("span", {
498
+ style: {
499
+ width: '32px',
500
+ height: '32px',
501
+ marginRight: '10px',
502
+ cursor: Object.prototype.hasOwnProperty.call(iT, 'type') ? 'pointer' : 'auto'
503
+ },
504
+ id: iT.id ? iT.id : '',
505
+ type: iT.type ? iT.type : '',
506
+ className: styles$c['td-span'],
507
+ onClick: Object.prototype.hasOwnProperty.call(iT, 'type') ? e => handleBodyActionClick(e, {
508
+ index,
509
+ innerIndex,
510
+ items: item,
511
+ item: iT,
512
+ itemIndex: iN
513
+ }) : _ => _,
514
+ key: `${iT.id || iT.content}_${iN}`
515
+ }, iT.content);
516
+ }));
517
+ } else {
518
+ return /*#__PURE__*/React__default["default"].createElement("span", {
519
+ key: `${newItem.id}_${newIndex}`
520
+ }, newItem);
521
+ }
522
+ }) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null) : item !== null && !Array.isArray(item) && typeof item === 'object' ? /*#__PURE__*/React__default["default"].createElement("div", {
523
+ style: {
524
+ display: 'flex',
525
+ alignItems: 'flex-start',
526
+ justifyContent: item.contentList || item.checkBox ? 'space-between' : 'center'
527
+ }
528
+ }, item.contentList && /*#__PURE__*/React__default["default"].createElement("div", {
529
+ id: item.id,
530
+ style: {
531
+ width: '21px',
532
+ height: '21px'
533
+ },
534
+ onClick: () => handleOpenCloseRowSingleArrow(index, innerIndex),
535
+ className: styles$c['td-span']
536
+ }, item.status === 'close' ? item.closeArrow : item.openArrow), item.checkBox && /*#__PURE__*/React__default["default"].createElement(SingleCheckbox, {
537
+ data: item,
538
+ handleChecked: handleCheckedBody,
539
+ checked: item.checkBox.checked,
540
+ disabled: item.checkBox.disabled,
541
+ checkedColor: item.checkBox.checkedColor,
542
+ unCheckedColor: item.checkBox.unCheckedColor
543
+ }), /*#__PURE__*/React__default["default"].createElement("div", {
544
+ style: {
545
+ marginLeft: item.contentList ? '10px' : '0px'
546
+ }
547
+ }, /*#__PURE__*/React__default["default"].createElement("p", {
548
+ style: {
549
+ margin: '0px',
550
+ cursor: Object.prototype.hasOwnProperty.call(item, 'arrowComponent') || Object.prototype.hasOwnProperty.call(item, 'dots') ? 'pointer' : 'auto'
551
+ },
552
+ onClick: Object.prototype.hasOwnProperty.call(item, 'arrowComponent') ? () => handleCheckArrowAction(item, item.checkIndex) : Object.prototype.hasOwnProperty.call(item, 'dots') ? e => handleCheckDots(e, item, index, innerIndex) : _ => _
553
+ }, item.content ? item.content : Object.prototype.hasOwnProperty.call(item, 'arrowComponent') ? item.status === 'close' ? item.closeArrow : item.openArrow : Object.prototype.hasOwnProperty.call(item, 'dots') ? /*#__PURE__*/React__default["default"].createElement("span", {
554
+ style: {
555
+ display: 'block',
556
+ position: 'relative'
557
+ }
558
+ }, item.dotsStatus === 'deActive' ? item.deActiveIcon : item.activeIcon, /*#__PURE__*/React__default["default"].createElement("span", {
559
+ style: {
560
+ position: 'absolute',
561
+ display: item.dotsStatus === 'deActive' ? 'none' : 'block',
562
+ top: '0px',
563
+ right: 'calc(100% + 6px)',
564
+ width: '223px',
565
+ height: 'auto',
566
+ overflow: 'auto',
567
+ minHeight: '40px',
568
+ maxHeight: '246px',
569
+ borderRadius: '6px',
570
+ backgroundColor: '#FFFFFF',
571
+ boxShadow: '0px 0px 20px 0px #3C393E4D'
572
+ }
573
+ }, item.options && item.options.map((item, index) => {
574
+ return /*#__PURE__*/React__default["default"].createElement("span", {
575
+ key: `${item.content}_${index}`,
576
+ className: styles$c['dots-option-item'],
577
+ style: {
578
+ color: '#3C393E',
579
+ fontSize: '14px',
580
+ fontFamily: 'Noto Sans Armenian'
581
+ }
582
+ // TODO: onClick
583
+ }, /*#__PURE__*/React__default["default"].createElement("span", {
584
+ style: {
585
+ marginRight: '10px'
586
+ }
587
+ }, item.icon), /*#__PURE__*/React__default["default"].createElement("span", {
588
+ style: {
589
+ width: 'calc(100% - 36px)',
590
+ textAlign: 'left',
591
+ overflow: 'hidden',
592
+ whiteSpace: 'nowrap',
593
+ textOverflow: 'ellipsis'
594
+ },
595
+ title: item.content
596
+ }, item.content));
597
+ }))) : ''), item.contentList && /*#__PURE__*/React__default["default"].createElement("div", {
598
+ style: {
599
+ overflow: 'hidden',
600
+ marginTop: '10px',
601
+ height: item.status === 'close' ? '0px' : 'auto'
602
+ }
603
+ }, item.contentList.map((innerItem, innerIndex) => {
604
+ return /*#__PURE__*/React__default["default"].createElement("p", {
605
+ key: `${innerItem}_${innerIndex}`,
606
+ className: styles$c['list-text'],
607
+ style: {
608
+ color: openListColor
609
+ }
610
+ // TODO: add onClick
611
+ }, innerItem);
612
+ })))) : '');
613
+ };
614
+
615
+ const SvgUpArrow = ({
616
+ title,
617
+ titleId,
618
+ ...props
619
+ }) => /*#__PURE__*/React__namespace.createElement("svg", _extends({
620
+ width: "21",
621
+ height: "21",
622
+ viewBox: "0 0 21 21",
623
+ fill: "none",
624
+ xmlns: "http://www.w3.org/2000/svg",
625
+ "aria-labelledby": titleId
626
+ }, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
627
+ id: titleId
628
+ }, title) : null, /*#__PURE__*/React__namespace.createElement("rect", {
629
+ x: 0.5,
630
+ y: 0.5,
631
+ width: 20,
632
+ height: 20,
633
+ rx: 0.5,
634
+ fill: "#fff",
635
+ stroke: "#EEE"
636
+ }), /*#__PURE__*/React__namespace.createElement("path", {
637
+ d: "M10.509 8.002c.183 0 .36.07.502.197l4.706 4.284a.912.912 0 0 1 .102 1.208.767.767 0 0 1-.532.305.742.742 0 0 1-.574-.194l-4.204-3.838-4.204 3.7a.765.765 0 0 1-.272.157.721.721 0 0 1-.599-.07.805.805 0 0 1-.235-.215.879.879 0 0 1-.16-.303.932.932 0 0 1 .06-.683.84.84 0 0 1 .21-.264l4.705-4.138a.735.735 0 0 1 .495-.146Z",
638
+ fill: "#3C393E"
639
+ }));
640
+
641
+ const SvgDownArrow = ({
642
+ title,
643
+ titleId,
644
+ ...props
645
+ }) => /*#__PURE__*/React__namespace.createElement("svg", _extends({
646
+ width: "21",
647
+ height: "21",
648
+ viewBox: "0 0 21 21",
649
+ fill: "none",
650
+ xmlns: "http://www.w3.org/2000/svg",
651
+ "aria-labelledby": titleId
652
+ }, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
653
+ id: titleId
654
+ }, title) : null, /*#__PURE__*/React__namespace.createElement("rect", {
655
+ x: 0.5,
656
+ y: 0.5,
657
+ width: 20,
658
+ height: 20,
659
+ rx: 0.5,
660
+ fill: "#fff",
661
+ stroke: "#EEE"
662
+ }), /*#__PURE__*/React__namespace.createElement("path", {
663
+ d: "M10.491 13.998a.745.745 0 0 1-.502-.197L5.283 9.517a.912.912 0 0 1-.102-1.208.767.767 0 0 1 .532-.305c.208-.021.414.049.574.194l4.204 3.838 4.204-3.7a.765.765 0 0 1 .272-.157.721.721 0 0 1 .599.07c.09.054.17.127.235.215a.88.88 0 0 1 .16.303.933.933 0 0 1-.06.683.841.841 0 0 1-.21.264l-4.706 4.138a.735.735 0 0 1-.494.146Z",
664
+ fill: "#3C393E"
665
+ }));
666
+
667
+ const Table = ({
668
+ getData,
669
+ dataBody,
670
+ arrowShow,
671
+ dataHeader,
672
+ arrowColumn,
673
+ tHeadColor,
674
+ tHeadFamily,
675
+ tHeadPadding,
676
+ tHeadFontSize,
677
+ tHeadFontWeight,
678
+ tHeadBorderRadius,
679
+ tHeadBackgroundColor,
680
+ tBodyColor,
681
+ tBodyPadding,
682
+ tBodyFontSize,
683
+ tBodyTextAlign,
684
+ tBodyFontWeight,
685
+ tBodyFontFamily,
686
+ tBodyRowBorder,
687
+ openListColor
688
+ }) => {
689
+ const [body, setBody] = React.useState([]);
690
+ const [header, setHeader] = React.useState([]);
691
+ const [disableArr, setDisableArr] = React.useState([]);
692
+ const [checkedArray, setCheckedArray] = React.useState([]);
693
+ const configStyles = compereConfigs();
694
+ const handleHeaderItemClick = e => {
695
+ e.stopPropagation();
696
+ if (!e.target.tagName.startsWith('svg') && e.target.innerText !== undefined && e.target.innerText !== '') {
697
+ let removeItemIndex;
698
+ let headerWithoutArrow;
699
+ header.map((item, index) => {
700
+ if (Object.prototype.hasOwnProperty.call(item, 'arrowComponent')) {
701
+ removeItemIndex = index;
702
+ }
703
+ });
704
+ if (removeItemIndex !== undefined) {
705
+ const firstPart = header.slice(0, removeItemIndex);
706
+ const secondPart = header.slice(removeItemIndex + 1, header.length);
707
+ headerWithoutArrow = [...firstPart, ...secondPart];
708
+ }
709
+ const returnedData = {
710
+ from: 'header',
711
+ content: e.target.innerText,
712
+ row: headerWithoutArrow !== undefined ? headerWithoutArrow : header
713
+ };
714
+ getData(returnedData);
715
+ }
716
+ };
717
+ const handleBodyActionClick = (e, data) => {
718
+ e.stopPropagation();
719
+ // const dataRow =
720
+
721
+ const actionData = {
722
+ row: '',
723
+ item: data.item,
724
+ id: data.item.id,
725
+ items: data.items,
726
+ type: data.item.type,
727
+ rowIndex: data.index,
728
+ itemIndex: data.innerIndex,
729
+ itemInnerIndex: data.itemIndex
730
+ };
731
+ console.log(actionData);
732
+ };
733
+ const handleSetCheckboxArray = data => {
734
+ let checkedItems = [];
735
+ data.map((item, index) => {
736
+ item.map((innerItem, innerIndex) => {
737
+ if (Object.prototype.hasOwnProperty.call(innerItem, 'checkBox')) {
738
+ if (!checkedItems[innerIndex]) {
739
+ checkedItems[innerIndex] = [];
740
+ }
741
+ checkedItems[innerIndex].push({
742
+ rowCount: index,
743
+ columnCount: innerIndex,
744
+ checked: innerItem.checkBox.checked
745
+ });
746
+ }
747
+ });
748
+ });
749
+ return checkedItems;
750
+ };
751
+ const handleSetInsertIndex = (data, count) => {
752
+ let arrowColumnCount;
753
+ if (typeof count !== 'number') {
754
+ alert('arrowColumn props must be a number, please check it');
755
+ } else {
756
+ if (count <= 0) {
757
+ arrowColumnCount = 0;
758
+ } else {
759
+ if (count >= data.length - 1) {
760
+ arrowColumnCount = data.length;
761
+ } else {
762
+ arrowColumnCount = count;
763
+ }
764
+ }
765
+ }
766
+ return arrowColumnCount;
767
+ };
768
+ const handleInsertArrow = (data, count, arrowObject) => {
769
+ if (count === 0) {
770
+ data.unshift(arrowObject);
771
+ } else if (count >= data.length - 1) {
772
+ data.push(arrowObject);
773
+ } else {
774
+ data.splice(count, 0, arrowObject);
775
+ }
776
+ return data;
777
+ };
778
+ const handleTransformDataForInsertArrow = (data, count, type) => {
779
+ const arrowObject = {
780
+ status: 'close',
781
+ checkIndex: null,
782
+ arrowComponent: true,
783
+ openArrow: /*#__PURE__*/React__default["default"].createElement(SvgUpArrow, null),
784
+ closeArrow: /*#__PURE__*/React__default["default"].createElement(SvgDownArrow, null)
785
+ };
786
+ if (type === 'body') {
787
+ return data.map((item, index) => {
788
+ const newObjWithArrow = {
789
+ ...arrowObject
790
+ };
791
+ newObjWithArrow.checkIndex = index;
792
+ return handleInsertArrow(item, count, newObjWithArrow);
793
+ });
794
+ } else {
795
+ const newObjWithArrow = {
796
+ ...arrowObject
797
+ };
798
+ newObjWithArrow.checkIndex = count;
799
+ return handleInsertArrow(data, count, newObjWithArrow);
800
+ }
801
+ };
802
+ const handleCheckedHeader = (data, e) => {
803
+ e.stopPropagation();
804
+ let removeItemIndex;
805
+ let checkableItemBool;
806
+ let checkableItemIndex;
807
+ let headerWithoutArrow;
808
+ let checkableBodyRowItems = [];
809
+ const updatedHeader = header.slice();
810
+ const updatedBody = body.slice().map(item => Object.values(item));
811
+ const newData = updatedHeader.map((item, index) => {
812
+ if (item.content === data.content) {
813
+ checkableItemIndex = index;
814
+ checkableItemBool = !item.checkBox.checked;
815
+ item.checkBox.checked = !item.checkBox.checked;
816
+ }
817
+ if (Object.prototype.hasOwnProperty.call(item, 'arrowComponent')) {
818
+ removeItemIndex = index;
819
+ }
820
+ return item;
821
+ });
822
+ const newUpdatedBody = updatedBody.map((item, index) => {
823
+ return item.map((innerItem, innerIndex) => {
824
+ if (checkableItemIndex === innerIndex) {
825
+ innerItem.checkBox.checked = checkableItemBool;
826
+ checkableBodyRowItems.push({
827
+ column: innerIndex,
828
+ columnItem: innerItem
829
+ });
830
+ handleHeaderCheckedUpdate({
831
+ row: index,
832
+ column: innerIndex,
833
+ checked: {
834
+ checked: checkableItemBool
835
+ }
836
+ });
837
+ }
838
+ return innerItem;
839
+ });
840
+ });
841
+ if (removeItemIndex !== undefined) {
842
+ const firstPart = newData.slice(0, removeItemIndex);
843
+ const secondPart = newData.slice(removeItemIndex + 1, newData.length);
844
+ headerWithoutArrow = [...firstPart, ...secondPart];
845
+ }
846
+ const returnedData = {
847
+ from: 'header',
848
+ content: data.content,
849
+ checkBox: data.checkBox,
850
+ columnArray: checkableBodyRowItems,
851
+ row: headerWithoutArrow !== undefined ? headerWithoutArrow : newData
852
+ };
853
+ getData(returnedData);
854
+ setHeader(newData);
855
+ setBody(newUpdatedBody);
856
+ };
857
+ const handleCheckedBody = (data, e) => {
858
+ e.stopPropagation();
859
+ const updatedBody = body.slice().map(item => Object.values(item));
860
+ const newData = updatedBody.map((item, index) => {
861
+ return item.map((innerItem, innerIndex) => {
862
+ if (innerItem.id === data.id && innerItem.content === data.content && innerItem.checkBox) {
863
+ innerItem.checkBox.checked = !innerItem.checkBox.checked;
864
+ handleHeaderCheckedUpdate({
865
+ row: index,
866
+ column: innerIndex,
867
+ checked: innerItem.checkBox
868
+ });
869
+ }
870
+ return innerItem;
871
+ });
872
+ });
873
+ setBody(newData);
874
+ };
875
+ const handleHeaderCheckedUpdate = checkedData => {
876
+ const updatedHeader = header.slice();
877
+ const newCheckedArray = checkedArray.map((item, index) => {
878
+ return item.map((innerItem, innerIndex) => {
879
+ if (index === checkedData.column) {
880
+ if (innerIndex === checkedData.row) {
881
+ innerItem.checked = checkedData.checked.checked;
882
+ }
883
+ }
884
+ return innerItem;
885
+ });
886
+ });
887
+ const newData = updatedHeader.map((item, index) => {
888
+ if (newCheckedArray[index]) {
889
+ const tempCheckedArray = [];
890
+ newCheckedArray[index].map(innerItem => {
891
+ tempCheckedArray.push(innerItem.checked);
892
+ });
893
+ if (tempCheckedArray.every(i => i)) {
894
+ item.checkBox.checked = true;
895
+ } else {
896
+ item.checkBox.checked = false;
897
+ }
898
+ }
899
+ return item;
900
+ });
901
+ setHeader(newData);
902
+ setCheckedArray(newCheckedArray);
903
+ };
904
+ const handleCheckArrowAction = (item, rowPosition) => {
905
+ const status = item.status;
906
+ const checkedOpenableRow = body[rowPosition].map(innerItem => {
907
+ if (Object.prototype.hasOwnProperty.call(innerItem, 'status')) {
908
+ if (status === 'close') {
909
+ innerItem.status = 'open';
910
+ } else {
911
+ innerItem.status = 'close';
912
+ }
913
+ }
914
+ return innerItem;
915
+ });
916
+ setBody(prev => {
917
+ prev[rowPosition] = checkedOpenableRow;
918
+ return [...prev];
919
+ });
920
+ };
921
+ const handleOpenCloseRowSingleArrow = (arrowRowIndex, arrowIndex) => {
922
+ let single = {};
923
+ const allArrows = [];
924
+ const checkedOpenableRow = body[arrowRowIndex].map((item, index) => {
925
+ if (index === arrowIndex) {
926
+ if (item.status === 'close') {
927
+ item.status = 'open';
928
+ } else {
929
+ item.status = 'close';
930
+ }
931
+ single = item;
932
+ }
933
+ if (Object.prototype.hasOwnProperty.call(item, 'status') && !Object.prototype.hasOwnProperty.call(item, 'arrowComponent')) {
934
+ allArrows.push(item);
935
+ }
936
+ return item;
937
+ });
938
+ const checkedOpenableRowArrow = checkedOpenableRow.map(item => {
939
+ if (Object.prototype.hasOwnProperty.call(item, 'arrowComponent')) {
940
+ if (single && single.status === 'close') {
941
+ item.status = 'close';
942
+ } else if (single && single.status === 'open') {
943
+ if (allArrows.every(i => i.status === 'open')) {
944
+ item.status = 'open';
945
+ }
946
+ }
947
+ }
948
+ return item;
949
+ });
950
+ setBody(prev => {
951
+ prev[arrowRowIndex] = checkedOpenableRowArrow;
952
+ return [...prev];
953
+ });
954
+ };
955
+ const handleCheckArrowActionHeader = (e, item) => {
956
+ e.stopPropagation();
957
+ const checkedOpenableAllRows = header.map((innerItem, innerIndex) => {
958
+ if (item.checkIndex === innerIndex) {
959
+ if (item.status === 'close') {
960
+ innerItem.status = 'open';
961
+ } else {
962
+ innerItem.status = 'close';
963
+ }
964
+ }
965
+ return innerItem;
966
+ });
967
+ const checkedOpenableAllRowsBody = body.map(innerItem => {
968
+ return innerItem.map(iElem => {
969
+ if (Object.prototype.hasOwnProperty.call(iElem, 'status')) {
970
+ if (item.status === 'open') {
971
+ iElem.status = 'open';
972
+ } else {
973
+ iElem.status = 'close';
974
+ }
975
+ }
976
+ return iElem;
977
+ });
978
+ });
979
+ setHeader(() => checkedOpenableAllRows);
980
+ setBody(() => checkedOpenableAllRowsBody);
981
+ };
982
+ const handleCheckDots = (e, item, index, innerIndex) => {
983
+ e.stopPropagation();
984
+ const checkBodyMore = body.map((elemItem, elemIndex) => {
985
+ return elemItem.map((elemInnerItem, elemInnerIndex) => {
986
+ if (elemIndex === index && Object.prototype.hasOwnProperty.call(elemInnerItem, 'dots')) {
987
+ if (elemInnerIndex === innerIndex) {
988
+ if (item.dotsStatus === 'deActive') {
989
+ elemInnerItem.dotsStatus = 'active';
990
+ } else {
991
+ elemInnerItem.dotsStatus = 'deActive';
992
+ }
993
+ }
994
+ } else if (elemIndex !== index && Object.prototype.hasOwnProperty.call(elemInnerItem, 'dots')) {
995
+ if (elemInnerIndex === innerIndex) {
996
+ elemInnerItem.dotsStatus = 'deActive';
997
+ }
998
+ }
999
+ return elemInnerItem;
1000
+ });
1001
+ });
1002
+ setBody(() => checkBodyMore);
1003
+ };
1004
+ const handleCheckDisable = (arr, disableArr) => {
1005
+ let headerWithDisabled = [];
1006
+ if (disableArr && disableArr.length > 0) {
1007
+ headerWithDisabled = arr.map((item, index) => {
1008
+ if (disableArr[index]) {
1009
+ if (Object.prototype.hasOwnProperty.call(item, 'checkBox')) {
1010
+ item.checkBox.disabled = true;
1011
+ }
1012
+ }
1013
+ return item;
1014
+ });
1015
+ }
1016
+ return headerWithDisabled;
1017
+ };
1018
+ React.useEffect(() => {
1019
+ let checkedItems = [];
1020
+ const disabledArray = [];
1021
+ const checkBodyForChackedItems = dataBody.slice().map(item => Object.values(item));
1022
+ if (arrowShow) {
1023
+ const arrowColumnCount = handleSetInsertIndex(checkBodyForChackedItems[0], arrowColumn);
1024
+ const checkForInsertArrow = handleTransformDataForInsertArrow(checkBodyForChackedItems, arrowColumnCount, 'body');
1025
+ checkForInsertArrow.map((item, index) => {
1026
+ item.map((innerItem, innerIndex) => {
1027
+ if (Object.prototype.hasOwnProperty.call(innerItem, 'checkBox')) {
1028
+ if (Object.prototype.hasOwnProperty.call(innerItem.checkBox, 'disabled')) {
1029
+ if (innerItem.checkBox.disabled === true) {
1030
+ if (!disabledArray[innerIndex]) {
1031
+ disabledArray[innerIndex] = {
1032
+ rowIndex: index,
1033
+ columnIndex: innerIndex
1034
+ };
1035
+ }
1036
+ }
1037
+ }
1038
+ }
1039
+ });
1040
+ });
1041
+ checkedItems = handleSetCheckboxArray(checkForInsertArrow);
1042
+ setBody(() => checkForInsertArrow);
1043
+ } else {
1044
+ checkedItems = handleSetCheckboxArray(checkBodyForChackedItems);
1045
+ checkBodyForChackedItems.map((item, index) => {
1046
+ item.map((innerItem, innerIndex) => {
1047
+ if (Object.prototype.hasOwnProperty.call(innerItem, 'checkBox')) {
1048
+ if (Object.prototype.hasOwnProperty.call(innerItem.checkBox, 'disabled')) {
1049
+ if (innerItem.checkBox.disabled === true) {
1050
+ if (!disabledArray[innerIndex]) {
1051
+ disabledArray[innerIndex] = {
1052
+ rowIndex: index,
1053
+ columnIndex: innerIndex
1054
+ };
1055
+ }
1056
+ }
1057
+ }
1058
+ }
1059
+ });
1060
+ });
1061
+ setBody(() => dataBody);
1062
+ }
1063
+ setDisableArr(disabledArray);
1064
+ setCheckedArray(() => checkedItems);
1065
+ }, [dataBody, arrowColumn, arrowShow]);
1066
+ React.useEffect(() => {
1067
+ if (arrowShow) {
1068
+ const header = dataHeader.slice();
1069
+ const arrowColumnCount = handleSetInsertIndex(header, arrowColumn);
1070
+ const checkForInsertArrow = handleTransformDataForInsertArrow(header, arrowColumnCount, 'header');
1071
+ const headerWithDisabled = handleCheckDisable(checkForInsertArrow, disableArr);
1072
+ setHeader(() => headerWithDisabled.length > 0 ? headerWithDisabled : checkForInsertArrow);
1073
+ } else {
1074
+ const headerWithDisabled = handleCheckDisable(dataHeader, disableArr);
1075
+ setHeader(() => headerWithDisabled.length > 0 ? headerWithDisabled : dataHeader);
1076
+ }
1077
+ }, [dataHeader, arrowColumn, arrowShow, disableArr]);
1078
+ return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("table", {
1079
+ style: {
1080
+ width: '100%',
1081
+ borderCollapse: 'collapse'
1082
+ }
1083
+ }, header && header.length > 0 && /*#__PURE__*/React__default["default"].createElement("thead", null, /*#__PURE__*/React__default["default"].createElement("tr", {
1084
+ style: {
1085
+ color: tHeadColor ? tHeadColor : configStyles.TABLE.tHeadColor,
1086
+ backgroundColor: tHeadBackgroundColor ? tHeadBackgroundColor : configStyles.TABLE.tHeadBackgroundColor
1087
+ }
1088
+ }, header.map((item, index) => {
1089
+ return /*#__PURE__*/React__default["default"].createElement(TH, {
1090
+ item: item,
1091
+ key: `${item}_${index}`,
1092
+ handleCheckedHeader: handleCheckedHeader,
1093
+ handleHeaderItemClick: handleHeaderItemClick,
1094
+ handleCheckArrowActionHeader: handleCheckArrowActionHeader,
1095
+ tHeadFamily: tHeadFamily ? tHeadFamily : configStyles.TABLE.tHeadFamily,
1096
+ tHeadPadding: tHeadPadding ? tHeadPadding : configStyles.TABLE.tHeadPadding,
1097
+ tHeadFontSize: tHeadFontSize ? tHeadFontSize : configStyles.TABLE.tHeadFontSize,
1098
+ tHeadFontWeight: tHeadFontWeight ? tHeadFontWeight : configStyles.TABLE.tHeadFontWeight,
1099
+ borderTopLeftRadius: index === 0 ? tHeadBorderRadius ? tHeadBorderRadius : configStyles.TABLE.tHeadBorderRadius : '0px',
1100
+ borderTopRightRadius: index === header.length - 1 ? tHeadBorderRadius ? tHeadBorderRadius : configStyles.TABLE.tHeadBorderRadius : '0px'
1101
+ });
1102
+ }))), body && body.length > 0 && /*#__PURE__*/React__default["default"].createElement("tbody", {
1103
+ style: {
1104
+ boxShadow: '0px 10px 30px rgba(0, 35, 106, 0.06)'
1105
+ }
1106
+ }, body.map((item, index) => {
1107
+ return /*#__PURE__*/React__default["default"].createElement("tr", {
1108
+ key: `${item}_${index}`,
1109
+ style: {
1110
+ borderBottom: index === body.length - 1 ? 'none' : tBodyRowBorder ? tBodyRowBorder : configStyles.TABLE.tBodyRowBorder
1111
+ }
1112
+ }, Object.values(item).map((innerItem, innerIndex) => {
1113
+ return /*#__PURE__*/React__default["default"].createElement(TD, {
1114
+ index: index,
1115
+ item: innerItem,
1116
+ innerIndex: innerIndex,
1117
+ id: item.id ? item.id : '',
1118
+ handleCheckDots: handleCheckDots,
1119
+ key: `${innerItem}_${index}_${innerIndex}`,
1120
+ openListColor: openListColor ? openListColor : configStyles.TABLE.openListColor,
1121
+ handleCheckedBody: handleCheckedBody,
1122
+ handleBodyActionClick: handleBodyActionClick,
1123
+ tBodyColor: tBodyColor ? tBodyColor : configStyles.TABLE.tBodyColor,
1124
+ tBodyPadding: tBodyPadding ? tBodyPadding : configStyles.TABLE.tBodyPadding,
1125
+ tBodyFontSize: tBodyFontSize ? tBodyFontSize : configStyles.TABLE.tBodyFontSize,
1126
+ tBodyTextAlign: tBodyTextAlign ? tBodyTextAlign : configStyles.TABLE.tBodyTextAlign,
1127
+ tBodyFontFamily: tBodyFontFamily ? tBodyFontFamily : configStyles.TABLE.tBodyFontFamily,
1128
+ tBodyFontWeight: tBodyFontWeight ? tBodyFontWeight : configStyles.TABLE.tBodyFontWeight,
1129
+ borderRight: innerIndex === Object.values(item).length - 1 ? 'none' : configStyles.TABLE.tBodyRowBorder,
1130
+ handleCheckArrowAction: handleCheckArrowAction,
1131
+ handleOpenCloseRowSingleArrow: handleOpenCloseRowSingleArrow
1132
+ });
1133
+ }));
1134
+ }))));
1135
+ };
1136
+ Table.propTypes = {
1137
+ getData: PropTypes__default["default"].func,
387
1138
  dataBody: PropTypes__default["default"].array,
1139
+ arrowShow: PropTypes__default["default"].bool,
388
1140
  dataHeader: PropTypes__default["default"].array,
1141
+ arrowColumn: PropTypes__default["default"].number,
389
1142
  tHeadColor: PropTypes__default["default"].string,
390
1143
  tHeadFamily: PropTypes__default["default"].string,
391
1144
  tHeadPadding: PropTypes__default["default"].string,
1145
+ tHeadFontSize: PropTypes__default["default"].string,
392
1146
  tHeadFontWeight: PropTypes__default["default"].number,
393
1147
  tHeadBorderRadius: PropTypes__default["default"].string,
394
1148
  tHeadBackgroundColor: PropTypes__default["default"].string,
@@ -399,8 +1153,8 @@ styleInject(css_248z$e);
399
1153
  tBodyFontWeight: PropTypes__default["default"].string,
400
1154
  tBodyFontFamily: PropTypes__default["default"].string,
401
1155
  tBodyRowBorder: PropTypes__default["default"].string,
402
- setTableDataHeader: PropTypes__default["default"].func
403
- });
1156
+ openListColor: PropTypes__default["default"].string
1157
+ };
404
1158
 
405
1159
  var css_248z$d = ".modal-module_animation__modal__3mt48{animation:modal-module_show-popup__WrH7a .15s;-webkit-animation:modal-module_show-popup__WrH7a .15s}@keyframes modal-module_show-popup__WrH7a{0%{transform:translate3d(0,-50%,0);-webkit-transform:translate3d(0,-50%,0);-moz-transform:translate3d(0,-50%,0);-ms-transform:translate3d(0,-50%,0);-o-transform:translate3d(0,-50%,0)}to{opacity:1;transform:translateZ(0);-webkit-transform:translateZ(0);-moz-transform:translateZ(0);-ms-transform:translateZ(0);-o-transform:translateZ(0)}}";
406
1160
  var styles$b = {"animation__modal":"modal-module_animation__modal__3mt48","show-popup":"modal-module_show-popup__WrH7a"};
@@ -2981,6 +3735,7 @@ const NewFile = ({
2981
3735
  labelColor,
2982
3736
  errorColor,
2983
3737
  filesArray,
3738
+ componentId,
2984
3739
  putFileHere,
2985
3740
  borderColor,
2986
3741
  uploadColor,
@@ -2995,6 +3750,7 @@ const NewFile = ({
2995
3750
  listItemHeight,
2996
3751
  backgroundColor,
2997
3752
  deleteComponent,
3753
+ removeComponent,
2998
3754
  listItemPadding,
2999
3755
  progressFontSize,
3000
3756
  borderHoverColor,
@@ -3030,6 +3786,7 @@ const NewFile = ({
3030
3786
  } else {
3031
3787
  removeFile && removeFile(filesArray);
3032
3788
  }
3789
+ removeComponent(componentId);
3033
3790
  };
3034
3791
  const handleRemoveFile = () => {
3035
3792
  setImage(null);
@@ -3149,6 +3906,11 @@ const NewFile = ({
3149
3906
  alert('Please add removeFile prop on NewFile component, it is a require in multiple mode');
3150
3907
  }
3151
3908
  }, [multiple, removeFile, filesArray && filesArray.length, defaultData]);
3909
+ React.useEffect(() => {
3910
+ if (deleteComponent && !removeComponent) {
3911
+ alert('Please add removeComponent prop on NewFile component it is require when deleteComponent prop is true');
3912
+ }
3913
+ }, [deleteComponent]);
3152
3914
  React.useEffect(() => {
3153
3915
  if (errorMessage) {
3154
3916
  setError(errorMessage);
@@ -3333,12 +4095,14 @@ NewFile.propTypes = {
3333
4095
  borderColor: PropTypes__default["default"].string,
3334
4096
  uploadColor: PropTypes__default["default"].string,
3335
4097
  defaultData: PropTypes__default["default"].object,
4098
+ componentId: PropTypes__default["default"].number,
3336
4099
  maxSizeError: PropTypes__default["default"].string,
3337
4100
  errorMessage: PropTypes__default["default"].string,
3338
4101
  fileSizeText: PropTypes__default["default"].string,
3339
4102
  noChoosenFile: PropTypes__default["default"].string,
3340
4103
  progressColor: PropTypes__default["default"].string,
3341
4104
  deleteComponent: PropTypes__default["default"].bool,
4105
+ removeComponent: PropTypes__default["default"].func,
3342
4106
  listItemHeight: PropTypes__default["default"].string,
3343
4107
  backgroundColor: PropTypes__default["default"].string,
3344
4108
  change: PropTypes__default["default"].func.isRequired,
@@ -3729,7 +4493,7 @@ Typography.propTypes = {
3729
4493
  textDecoration: PropTypes__default["default"].string,
3730
4494
  backgroundColor: PropTypes__default["default"].string,
3731
4495
  variant: PropTypes__default["default"].oneOf(Object.values(TypographyType)),
3732
- size: PropTypes__default["default"].oneOf(PropTypes__default["default"].string, PropTypes__default["default"].number)
4496
+ size: PropTypes__default["default"].oneOf([PropTypes__default["default"].string, PropTypes__default["default"].number])
3733
4497
  };
3734
4498
  Typography.defaultProps = {
3735
4499
  variant: 'p'
@@ -4501,6 +5265,7 @@ exports.Radio = Radio;
4501
5265
  exports.Select = Select;
4502
5266
  exports.SingleCheckbox = SingleCheckbox;
4503
5267
  exports.Stepper = Stepper;
5268
+ exports.Table = Table;
4504
5269
  exports.Textarea = Textarea;
4505
5270
  exports.Toaster = Toaster;
4506
5271
  exports.Tooltip = Tooltip;