@tsed/react-formio 2.0.3 → 2.1.1

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.
Files changed (39) hide show
  1. package/coverage.json +4 -4
  2. package/dist/components/actions-table/actionsTable.component.d.ts +1 -1
  3. package/dist/components/form-access/formAccess.component.d.ts +1 -1
  4. package/dist/components/form-edit/formEdit.stories.d.ts +1 -1
  5. package/dist/components/forms-table/formsTable.component.d.ts +1 -1
  6. package/dist/components/submissions-table/submissionsTable.component.d.ts +1 -1
  7. package/dist/components/table/components/defaultCells.component.d.ts +4 -0
  8. package/dist/components/table/components/defaultRow.component.d.ts +12 -0
  9. package/dist/components/table/components/dragNDropContainer.d.ts +4 -0
  10. package/dist/components/table/hooks/useCustomTable.hook.d.ts +187 -0
  11. package/dist/components/table/hooks/useDragnDropRow.hook.d.ts +266 -0
  12. package/dist/components/table/index.d.ts +2 -1
  13. package/dist/components/table/table.component.d.ts +2 -71
  14. package/dist/components/table/table.stories.d.ts +25 -0
  15. package/dist/components/table/utils/swapElements.d.ts +1 -0
  16. package/dist/components/table/utils/swapElements.spec.d.ts +1 -0
  17. package/dist/index.js +276 -49
  18. package/dist/index.js.map +1 -1
  19. package/dist/index.modern.js +269 -49
  20. package/dist/index.modern.js.map +1 -1
  21. package/package.json +5 -3
  22. package/src/components/actions-table/actionsTable.component.tsx +2 -1
  23. package/src/components/form-access/formAccess.component.tsx +1 -1
  24. package/src/components/form-edit/formEdit.stories.tsx +2 -2
  25. package/src/components/forms-table/formsTable.component.tsx +2 -1
  26. package/src/components/forms-table/formsTable.stories.tsx +2 -2
  27. package/src/components/submissions-table/submissionsTable.component.tsx +2 -1
  28. package/src/components/table/components/defaultCells.component.tsx +22 -0
  29. package/src/components/table/components/defaultRow.component.tsx +50 -0
  30. package/src/components/table/components/dragNDropContainer.tsx +7 -0
  31. package/src/components/table/hooks/useCustomTable.hook.tsx +231 -0
  32. package/src/components/table/hooks/useDragnDropRow.hook.ts +80 -0
  33. package/src/components/table/index.ts +2 -1
  34. package/src/components/table/table.component.tsx +83 -233
  35. package/src/components/table/table.stories.tsx +56 -0
  36. package/src/components/table/utils/swapElements.spec.ts +7 -0
  37. package/src/components/table/utils/swapElements.ts +7 -0
  38. /package/dist/components/table/{utils → hooks}/useOperations.hook.d.ts +0 -0
  39. /package/src/components/table/{utils → hooks}/useOperations.hook.tsx +0 -0
@@ -8,6 +8,8 @@ import { Templates, Form as Form$1, Components } from 'formiojs';
8
8
  export { Components, Formio, Templates, Utils } from 'formiojs';
9
9
  import Choices from '@formio/choices.js';
10
10
  import PropTypes from 'prop-types';
11
+ import { DndProvider, useDrop, useDrag } from 'react-dnd';
12
+ import { HTML5Backend } from 'react-dnd-html5-backend';
11
13
  import { useTable, useFilters, useGroupBy, useSortBy, usePagination } from 'react-table';
12
14
  import AllComponents from 'formiojs/components';
13
15
  import cloneDeep from 'lodash/cloneDeep';
@@ -235,6 +237,15 @@ Select.propTypes = {
235
237
  choices: PropTypes.array.isRequired
236
238
  };
237
239
 
240
+ function DrapNDropContainer({
241
+ enableDragNDrop,
242
+ children
243
+ }) {
244
+ return enableDragNDrop ? /*#__PURE__*/React.createElement(DndProvider, {
245
+ backend: HTML5Backend
246
+ }, children) : /*#__PURE__*/React.createElement(React.Fragment, null, children);
247
+ }
248
+
238
249
  const LEFT_PAGE = "LEFT";
239
250
  const RIGHT_PAGE = "RIGHT";
240
251
  function range(from, to, step = 1) {
@@ -394,6 +405,154 @@ function DefaultCellHeader({
394
405
  }, column.render("Filter")) : null);
395
406
  }
396
407
 
408
+ const _excluded$2 = ["onDrag", "onDrop", "index"];
409
+ const DND_ITEM_TYPE = "row";
410
+ function useDndRow(_ref) {
411
+ let {
412
+ onDrag,
413
+ onDrop,
414
+ index
415
+ } = _ref,
416
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
417
+ const dropRef = useRef(null);
418
+ const dragRef = useRef(null);
419
+ const [, drop] = useDrop({
420
+ accept: DND_ITEM_TYPE,
421
+ drop(item) {
422
+ onDrop(item);
423
+ },
424
+ hover(item, monitor) {
425
+ if (!dropRef.current) {
426
+ return;
427
+ }
428
+ const dragIndex = item.index;
429
+ const hoverIndex = index;
430
+ // Don't replace items with themselves
431
+ if (dragIndex === hoverIndex) {
432
+ return;
433
+ }
434
+ // Determine rectangle on screen
435
+ const hoverBoundingRect = dropRef.current.getBoundingClientRect();
436
+ // Get vertical middle
437
+ const hoverMiddleY = (hoverBoundingRect.bottom - hoverBoundingRect.top) / 2;
438
+ // Determine mouse position
439
+ const clientOffset = monitor.getClientOffset();
440
+ if (!clientOffset) {
441
+ return;
442
+ }
443
+ // Get pixels to the top
444
+ const hoverClientY = clientOffset.y - hoverBoundingRect.top;
445
+ // Only perform the move when the mouse has crossed half of the items height
446
+ // When dragging downwards, only move when the cursor is below 50%
447
+ // When dragging upwards, only move when the cursor is above 50%
448
+ // Dragging downwards
449
+ if (dragIndex < hoverIndex && hoverClientY < hoverMiddleY) {
450
+ return;
451
+ }
452
+ // Dragging upwards
453
+ if (dragIndex > hoverIndex && hoverClientY > hoverMiddleY) {
454
+ return;
455
+ }
456
+ // Time to actually perform the action
457
+ onDrag(dragIndex, hoverIndex);
458
+ // Note: we're mutating the monitor item here!
459
+ // Generally it's better to avoid mutations,
460
+ // but it's good here for the sake of performance
461
+ // to avoid expensive index searches.
462
+ item.index = hoverIndex;
463
+ }
464
+ });
465
+ const [{
466
+ isDragging
467
+ }, drag, preview] = useDrag(() => ({
468
+ type: DND_ITEM_TYPE,
469
+ item: {
470
+ index
471
+ },
472
+ collect: monitor => ({
473
+ isDragging: monitor.isDragging()
474
+ })
475
+ }));
476
+ const opacity = isDragging ? 0 : 1;
477
+ preview(drop(dropRef));
478
+ drag(dragRef);
479
+ return _extends({}, props, {
480
+ opacity,
481
+ isDragging,
482
+ dropRef,
483
+ dragRef
484
+ });
485
+ }
486
+
487
+ function DefaultCells({
488
+ row
489
+ }) {
490
+ return /*#__PURE__*/React.createElement(React.Fragment, null, row.cells.map((cell, i) => {
491
+ const {
492
+ hidden,
493
+ colspan
494
+ } = cell.column;
495
+ if (hidden) {
496
+ return null;
497
+ }
498
+ return /*#__PURE__*/React.createElement("td", _extends({
499
+ colSpan: colspan
500
+ }, cell.getCellProps(), {
501
+ key: `tableInstance.page.cells.${cell.value || "value"}.${i}`
502
+ }), cell.render("Cell"));
503
+ }));
504
+ }
505
+
506
+ const _excluded$3 = ["onClick", "row", "enableDragNDrop", "onDrop", "onDrag"];
507
+ function DefaultDndRow(props) {
508
+ const {
509
+ isDragging,
510
+ dragRef,
511
+ dropRef,
512
+ opacity
513
+ } = useDndRow(props);
514
+ return /*#__PURE__*/React.createElement("tr", {
515
+ ref: dropRef,
516
+ style: {
517
+ opacity
518
+ }
519
+ }, /*#__PURE__*/React.createElement("td", {
520
+ ref: dragRef,
521
+ role: "cell",
522
+ style: {
523
+ cursor: isDragging ? "grabbing" : "grab"
524
+ },
525
+ className: "align-middle"
526
+ }, /*#__PURE__*/React.createElement("div", {
527
+ className: "flex items-center justify-center"
528
+ }, /*#__PURE__*/React.createElement("i", {
529
+ className: classnames(iconClass(undefined, "dots-vertical-rounded"))
530
+ }))), /*#__PURE__*/React.createElement(DefaultCells, props));
531
+ }
532
+ function DefaultRow(_ref) {
533
+ let {
534
+ onClick,
535
+ row,
536
+ enableDragNDrop,
537
+ onDrop,
538
+ onDrag
539
+ } = _ref,
540
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$3);
541
+ const opts = _extends({}, props, {
542
+ onClick: () => onClick(row.original, "row")
543
+ }, row.getRowProps());
544
+ if (enableDragNDrop) {
545
+ return /*#__PURE__*/React.createElement(DefaultDndRow, _extends({}, opts, {
546
+ row: row,
547
+ onDrag: onDrag,
548
+ onDrop: onDrop
549
+ }));
550
+ }
551
+ return /*#__PURE__*/React.createElement("tr", opts, /*#__PURE__*/React.createElement(DefaultCells, {
552
+ row: row
553
+ }));
554
+ }
555
+
397
556
  function callLast(fn, time) {
398
557
  let last = null;
399
558
  return (...args) => {
@@ -405,7 +564,7 @@ function callLast(fn, time) {
405
564
  };
406
565
  }
407
566
 
408
- const _excluded$2 = ["name", "value", "label", "onChange", "required", "size", "type", "prefix", "suffix", "description", "className", "placeholder"];
567
+ const _excluded$4 = ["name", "value", "label", "onChange", "required", "size", "type", "prefix", "suffix", "description", "className", "placeholder"];
409
568
  function InputText(_ref) {
410
569
  let {
411
570
  name,
@@ -421,7 +580,7 @@ function InputText(_ref) {
421
580
  className,
422
581
  placeholder
423
582
  } = _ref,
424
- props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
583
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$4);
425
584
  const [localValue, setValue] = useState(value);
426
585
  const change = useMemo(() => onChange && callLast(onChange, 300), [onChange]);
427
586
  useEffect(() => {
@@ -491,6 +650,12 @@ function DefaultColumnFilter(props) {
491
650
  });
492
651
  }
493
652
 
653
+ const swapElements = (myArray, index1, index2) => {
654
+ myArray = [...myArray];
655
+ [myArray[index1], myArray[index2]] = [myArray[index2], myArray[index1]];
656
+ return myArray;
657
+ };
658
+
494
659
  const stopPropagationWrapper = fn => event => {
495
660
  event.stopPropagation();
496
661
  fn();
@@ -518,7 +683,7 @@ function DefaultOperationButton(props) {
518
683
  }, i18n(title)));
519
684
  }
520
685
 
521
- const _excluded$3 = ["OperationButton"];
686
+ const _excluded$5 = ["OperationButton"];
522
687
  function DefaultCellOperations({
523
688
  operations,
524
689
  row,
@@ -535,7 +700,7 @@ function DefaultCellOperations({
535
700
  let {
536
701
  OperationButton = DefaultOperationButton
537
702
  } = _ref,
538
- operation = _objectWithoutPropertiesLoose(_ref, _excluded$3);
703
+ operation = _objectWithoutPropertiesLoose(_ref, _excluded$5);
539
704
  return /*#__PURE__*/React.createElement(OperationButton, _extends({
540
705
  key: operation.action
541
706
  }, operation, {
@@ -576,7 +741,7 @@ function useOperations({
576
741
  };
577
742
  }
578
743
 
579
- const _excluded$4 = ["children", "className", "columns", "data", "onChange", "onClick", "operations", "pageSizes", "filters", "filterId", "pageSize", "pageIndex", "sortBy", "isLoading", "disableFilters", "disablePagination", "ArrowSort", "ColumnFilter", "EmptyData", "Loader", "Pagination", "CellHeader", "CellOperations", "i18n"];
744
+ const _excluded$6 = ["children", "className", "columns", "data", "onChange", "onClick", "onDrag", "onDrop", "operations", "pageSizes", "filters", "filterId", "pageSize", "pageIndex", "sortBy", "isLoading", "disableFilters", "disablePagination", "ArrowSort", "ColumnFilter", "EmptyData", "Loader", "Pagination", "Row", "CellHeader", "CellOperations", "i18n"];
580
745
  function getOperationCallback(operations, onClick) {
581
746
  return (data, action) => {
582
747
  const operation = operations.find(operation => operation.action === action || operation.alias === action);
@@ -596,7 +761,7 @@ function DefaultEmptyData() {
596
761
  }, "No data found");
597
762
  }
598
763
  const hooks = [useFilters, useGroupBy, useSortBy, usePagination];
599
- function Table(props) {
764
+ function useCustomTable(props) {
600
765
  const {
601
766
  children,
602
767
  className = "",
@@ -604,6 +769,8 @@ function Table(props) {
604
769
  data,
605
770
  onChange = noop,
606
771
  onClick = noop,
772
+ onDrag = noop,
773
+ onDrop = noop,
607
774
  operations = [],
608
775
  pageSizes = [10, 25, 50, 100],
609
776
  filters: controlledFilters,
@@ -619,11 +786,12 @@ function Table(props) {
619
786
  EmptyData = DefaultEmptyData,
620
787
  Loader = DefaultLoader,
621
788
  Pagination: Pagination$1 = Pagination,
789
+ Row = DefaultRow,
622
790
  CellHeader = DefaultCellHeader,
623
791
  CellOperations,
624
792
  i18n = f => f
625
793
  } = props,
626
- ctx = _objectWithoutPropertiesLoose(props, _excluded$4);
794
+ ctx = _objectWithoutPropertiesLoose(props, _excluded$6);
627
795
  const _onClick = getOperationCallback(operations, onClick);
628
796
  const defaultColumn = React.useMemo(() => ({
629
797
  // Let's set up our default Filter UI
@@ -631,11 +799,19 @@ function Table(props) {
631
799
  ArrowSort
632
800
  }), [ColumnFilter, ArrowSort]);
633
801
  const [filterId, setFilterId] = React.useState(controlledFilterId);
802
+ // DND
803
+ const [records, setRecords] = useState(data);
804
+ const _onDrag = (dragIndex, hoverIndex) => {
805
+ const newRecords = swapElements([...records], dragIndex, hoverIndex);
806
+ setRecords(newRecords);
807
+ onDrag(newRecords);
808
+ };
634
809
  const tableInstance = useTable(_extends({}, props, {
635
810
  columns,
636
811
  data,
637
812
  ctx,
638
813
  defaultColumn,
814
+ // getRowId,
639
815
  initialState: _extends({}, props.initialState || {}, {
640
816
  filters: controlledFilters || [],
641
817
  pageIndex: controlledPageIndex || 0,
@@ -673,50 +849,94 @@ function Table(props) {
673
849
  filterId
674
850
  });
675
851
  }, [onChange, pageIndex, pageSize, sortBy, filters, filterId]);
852
+ return _extends({}, props, {
853
+ className,
854
+ tableInstance,
855
+ CellHeader,
856
+ isLoading,
857
+ onClick: _onClick,
858
+ Loader,
859
+ EmptyData,
860
+ Row,
861
+ data,
862
+ disablePagination,
863
+ Pagination: Pagination$1,
864
+ pageIndex,
865
+ pageSize,
866
+ pageSizes,
867
+ setPageSize,
868
+ i18n,
869
+ children,
870
+ onDrag: _onDrag,
871
+ onDrop: onDrop
872
+ });
873
+ }
874
+
875
+ function Table(props) {
876
+ const {
877
+ className,
878
+ tableInstance,
879
+ CellHeader,
880
+ isLoading,
881
+ onClick,
882
+ Loader,
883
+ EmptyData,
884
+ Row,
885
+ data,
886
+ disablePagination,
887
+ Pagination,
888
+ pageIndex,
889
+ pageSize,
890
+ pageSizes,
891
+ setPageSize,
892
+ i18n,
893
+ enableDragNDrop,
894
+ children,
895
+ onDrag,
896
+ onDrop
897
+ } = useCustomTable(props);
676
898
  // Render the UI for your table
677
- return /*#__PURE__*/React.createElement("div", {
899
+ return /*#__PURE__*/React.createElement(DrapNDropContainer, {
900
+ enableDragNDrop: enableDragNDrop
901
+ }, /*#__PURE__*/React.createElement("div", {
678
902
  className: classnames("table-group table-responsive", className)
679
903
  }, /*#__PURE__*/React.createElement("table", _extends({
680
904
  className: "table table-striped table-hover"
681
905
  }, tableInstance.getTableProps()), /*#__PURE__*/React.createElement("thead", null, tableInstance.headerGroups.map((headerGroup, i) => /*#__PURE__*/React.createElement("tr", _extends({}, headerGroup.getHeaderGroupProps(), {
682
906
  key: `tableInstance.headerGroups${i}`
683
- }), headerGroup.headers.map(column => /*#__PURE__*/React.createElement("th", _extends({}, column.getHeaderProps(), {
907
+ }), enableDragNDrop ? /*#__PURE__*/React.createElement("th", {
908
+ role: "columnheader",
909
+ className: "text-center"
910
+ }, /*#__PURE__*/React.createElement("div", {
911
+ className: "table-cell-header"
912
+ })) : null, headerGroup.headers.map(column => /*#__PURE__*/React.createElement("th", _extends({}, column.getHeaderProps(), {
684
913
  key: `tableInstance.headers.column.${column.id}`
685
914
  }), /*#__PURE__*/React.createElement(CellHeader, {
686
915
  column: column
687
- })))))), !isLoading ? /*#__PURE__*/React.createElement("tbody", tableInstance.getTableBodyProps(), tableInstance.page.map(row => {
916
+ })))))), !isLoading ? /*#__PURE__*/React.createElement("tbody", tableInstance.getTableBodyProps(), tableInstance.page.map((row, index) => {
688
917
  tableInstance.prepareRow(row);
689
- return /*#__PURE__*/React.createElement("tr", _extends({
690
- onClick: () => _onClick(row.original, "row")
691
- }, row.getRowProps(), {
692
- key: `tableInstance.page.${row.id}`
693
- }), row.cells.map((cell, i) => {
694
- const {
695
- hidden,
696
- colspan
697
- } = cell.column;
698
- if (hidden) {
699
- return null;
700
- }
701
- return /*#__PURE__*/React.createElement("td", _extends({
702
- colSpan: colspan
703
- }, cell.getCellProps(), {
704
- key: `tableInstance.page.cells.${cell.value || "value"}.${i}`
705
- }), cell.render("Cell"));
706
- }));
918
+ return /*#__PURE__*/React.createElement(Row, {
919
+ index: index,
920
+ enableDragNDrop: enableDragNDrop,
921
+ onClick: onClick,
922
+ row: row,
923
+ key: `tableInstance.page.${row.id}`,
924
+ onDrag: onDrag,
925
+ onDrop: onDrop
926
+ });
707
927
  })) : null), isLoading ? /*#__PURE__*/React.createElement(Loader, null) : null, !data.length ? /*#__PURE__*/React.createElement(EmptyData, null) : null, !isLoading && data.length && !disablePagination ? /*#__PURE__*/React.createElement("div", {
708
928
  className: "overflow-hidden"
709
- }, /*#__PURE__*/React.createElement(Pagination$1, _extends({}, tableInstance, {
929
+ }, /*#__PURE__*/React.createElement(Pagination, _extends({}, tableInstance, {
710
930
  className: "text-sm",
711
931
  pageIndex: pageIndex,
712
932
  pageSize: pageSize,
713
933
  pageSizes: pageSizes,
714
934
  setPageSize: setPageSize,
715
935
  i18n: i18n
716
- }))) : null, children);
936
+ }))) : null, children));
717
937
  }
718
938
 
719
- const _excluded$5 = ["disableFilters", "disablePagination", "availableActions", "onAddAction"];
939
+ const _excluded$7 = ["disableFilters", "disablePagination", "availableActions", "onAddAction"];
720
940
  function ActionsTable(_ref) {
721
941
  let {
722
942
  disableFilters = true,
@@ -724,7 +944,7 @@ function ActionsTable(_ref) {
724
944
  availableActions = [],
725
945
  onAddAction = noop
726
946
  } = _ref,
727
- props = _objectWithoutPropertiesLoose(_ref, _excluded$5);
947
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$7);
728
948
  const {
729
949
  i18n = f => f
730
950
  } = props;
@@ -824,7 +1044,7 @@ function Card({
824
1044
  }, children));
825
1045
  }
826
1046
 
827
- const _excluded$6 = ["src", "form", "options", "submission", "url"];
1047
+ const _excluded$8 = ["src", "form", "options", "submission", "url"];
828
1048
  function useEvent(event, callback, events) {
829
1049
  useEffect(() => {
830
1050
  if (callback) {
@@ -875,7 +1095,7 @@ function useForm(props) {
875
1095
  submission,
876
1096
  url
877
1097
  } = props,
878
- funcs = _objectWithoutPropertiesLoose(props, _excluded$6);
1098
+ funcs = _objectWithoutPropertiesLoose(props, _excluded$8);
879
1099
  const element = useRef();
880
1100
  const isLoaded = useRef();
881
1101
  const instance = useRef();
@@ -1352,13 +1572,13 @@ FormAccess.propTypes = {
1352
1572
  onSubmit: PropTypes.func
1353
1573
  };
1354
1574
 
1355
- const _excluded$7 = ["action"],
1575
+ const _excluded$9 = ["action"],
1356
1576
  _excluded2 = ["actionInfo", "children", "onSubmit", "options"];
1357
1577
  function mapData(options, defaults) {
1358
1578
  return _extends({}, defaults, options);
1359
1579
  }
1360
1580
  function mapSettingsForm(_ref) {
1361
- let settingsForm = _objectWithoutPropertiesLoose(_ref, _excluded$7);
1581
+ let settingsForm = _objectWithoutPropertiesLoose(_ref, _excluded$9);
1362
1582
  FormioUtils.eachComponent(settingsForm.components, component => {
1363
1583
  const resourceExclude = "";
1364
1584
  if (component.type === "resourcefields") {
@@ -1631,7 +1851,7 @@ FormEditCTAs.propTypes = {
1631
1851
  onReset: PropTypes.func
1632
1852
  };
1633
1853
 
1634
- const _excluded$8 = ["name", "value", "label", "onChange", "required", "description", "prefix", "suffix"];
1854
+ const _excluded$a = ["name", "value", "label", "onChange", "required", "description", "prefix", "suffix"];
1635
1855
  function InputTags(_ref) {
1636
1856
  let {
1637
1857
  name,
@@ -1643,7 +1863,7 @@ function InputTags(_ref) {
1643
1863
  prefix,
1644
1864
  suffix
1645
1865
  } = _ref,
1646
- props = _objectWithoutPropertiesLoose(_ref, _excluded$8);
1866
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$a);
1647
1867
  const ref = useRef();
1648
1868
  useEffect(() => {
1649
1869
  const instance = new Choices(ref.current, {
@@ -6695,12 +6915,12 @@ function FormsCell(props) {
6695
6915
  }), tag)))));
6696
6916
  }
6697
6917
 
6698
- const _excluded$9 = ["Cell"];
6918
+ const _excluded$b = ["Cell"];
6699
6919
  function FormsTable(_ref) {
6700
6920
  let {
6701
6921
  Cell
6702
6922
  } = _ref,
6703
- props = _objectWithoutPropertiesLoose(_ref, _excluded$9);
6923
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$b);
6704
6924
  const {
6705
6925
  i18n = f => f,
6706
6926
  tags
@@ -6756,7 +6976,7 @@ Loader.propTypes = {
6756
6976
  className: PropTypes.string
6757
6977
  };
6758
6978
 
6759
- const _excluded$a = ["show", "children", "closeModal", "onClose", "title", "footer", "style", "className"];
6979
+ const _excluded$c = ["show", "children", "closeModal", "onClose", "title", "footer", "style", "className"];
6760
6980
  function useModal() {
6761
6981
  const [show, setShowModal] = useState(false);
6762
6982
  return {
@@ -6781,7 +7001,7 @@ function Modal(_ref) {
6781
7001
  style,
6782
7002
  className = ""
6783
7003
  } = _ref,
6784
- props = _objectWithoutPropertiesLoose(_ref, _excluded$a);
7004
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$c);
6785
7005
  const titleRef = useRef();
6786
7006
  const footerRef = useRef();
6787
7007
  const [maxHeight, setMaxHeight] = useState();
@@ -6837,7 +7057,7 @@ function Modal(_ref) {
6837
7057
  })));
6838
7058
  }
6839
7059
 
6840
- const _excluded$b = ["maxWidth", "children"];
7060
+ const _excluded$d = ["maxWidth", "children"];
6841
7061
  function RemoveModalFooter({
6842
7062
  value,
6843
7063
  valueToCompare,
@@ -6870,7 +7090,7 @@ function RemoveModal(_ref) {
6870
7090
  maxWidth = "300px",
6871
7091
  children
6872
7092
  } = _ref,
6873
- props = _objectWithoutPropertiesLoose(_ref, _excluded$b);
7093
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$d);
6874
7094
  const {
6875
7095
  i18n = noop
6876
7096
  } = props;
@@ -7103,12 +7323,12 @@ function mapFormToColumns(form) {
7103
7323
  return columns;
7104
7324
  }
7105
7325
 
7106
- const _excluded$c = ["form"];
7326
+ const _excluded$e = ["form"];
7107
7327
  function SubmissionsTable(_ref) {
7108
7328
  let {
7109
7329
  form
7110
7330
  } = _ref,
7111
- props = _objectWithoutPropertiesLoose(_ref, _excluded$c);
7331
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$e);
7112
7332
  const columns = form && mapFormToColumns(form);
7113
7333
  return /*#__PURE__*/React.createElement(Table, _extends({}, props, {
7114
7334
  columns: columns
@@ -7145,7 +7365,7 @@ function SliderColumnFilter({
7145
7365
  }, "Off"));
7146
7366
  }
7147
7367
 
7148
- const _excluded$d = ["style", "current", "items", "children", "HeaderChildren", "AddButton", "Button", "className", "onClick", "i18n"];
7368
+ const _excluded$f = ["style", "current", "items", "children", "HeaderChildren", "AddButton", "Button", "className", "onClick", "i18n"];
7149
7369
  function ButtonTab({
7150
7370
  icon,
7151
7371
  back,
@@ -7184,7 +7404,7 @@ function Tabs(_ref) {
7184
7404
  onClick,
7185
7405
  i18n = f => f
7186
7406
  } = _ref,
7187
- additionalProps = _objectWithoutPropertiesLoose(_ref, _excluded$d);
7407
+ additionalProps = _objectWithoutPropertiesLoose(_ref, _excluded$f);
7188
7408
  return /*#__PURE__*/React.createElement("div", {
7189
7409
  "data-testid": "tabs-comp",
7190
7410
  className: `tw-tabs ${className}`,
@@ -7231,5 +7451,5 @@ function mapPagination({
7231
7451
  };
7232
7452
  }
7233
7453
 
7234
- export { ActionsTable, Alert, ButtonTab, Card, DefaultArrowSort, DefaultCell, DefaultCellHeader, DefaultCellOperations, DefaultColumnFilter, DefaultOperationButton, Form, FormAccess, FormAction, FormBuilder, FormControl, FormEdit, FormEditCTAs, FormParameters, FormSettings, FormsTable, InputTags, InputText, Loader, Modal, Pagination, ReactComponent, RemoveModal, Select, SelectColumnFilter, SliderColumnFilter, SubmissionsTable, Table, Tabs, callLast, defaultDisplayChoices, iconClass, mapPagination, stopPropagationWrapper, useForm, useFormEdit, useModal, useOperations, useTooltip };
7454
+ export { ActionsTable, Alert, ButtonTab, Card, DefaultArrowSort, DefaultCell, DefaultCellHeader, DefaultCellOperations, DefaultColumnFilter, DefaultOperationButton, Form, FormAccess, FormAction, FormBuilder, FormControl, FormEdit, FormEditCTAs, FormParameters, FormSettings, FormsTable, InputTags, InputText, Loader, Modal, Pagination, ReactComponent, RemoveModal, Select, SelectColumnFilter, SliderColumnFilter, SubmissionsTable, Table, Tabs, callLast, defaultDisplayChoices, getOperationCallback, iconClass, mapPagination, stopPropagationWrapper, useCustomTable, useForm, useFormEdit, useModal, useOperations, useTooltip };
7235
7455
  //# sourceMappingURL=index.modern.js.map