@economic/taco 2.1.3 → 2.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. package/dist/components/Provider/Localization.d.ts +7 -0
  2. package/dist/components/Table3/components/toolbar/PrintButton/WarningDialog.d.ts +8 -0
  3. package/dist/components/Table3/hooks/features/usePrinting.d.ts +4 -1
  4. package/dist/components/Table3/types.d.ts +8 -0
  5. package/dist/esm/packages/taco/src/components/Provider/Localization.js +8 -1
  6. package/dist/esm/packages/taco/src/components/Provider/Localization.js.map +1 -1
  7. package/dist/esm/packages/taco/src/components/Table3/Table3.js +4 -0
  8. package/dist/esm/packages/taco/src/components/Table3/Table3.js.map +1 -1
  9. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Menu.js +1 -1
  10. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Menu.js.map +1 -1
  11. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/PrintButton.js +48 -6
  12. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/PrintButton.js.map +1 -1
  13. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/WarningDialog.js +56 -0
  14. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/WarningDialog.js.map +1 -0
  15. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/hooks/useParentStylesheets.js +2 -2
  16. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/hooks/useParentStylesheets.js.map +1 -1
  17. package/dist/esm/packages/taco/src/components/Table3/hooks/features/usePrinting.js +7 -2
  18. package/dist/esm/packages/taco/src/components/Table3/hooks/features/usePrinting.js.map +1 -1
  19. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useSettingsStateListener.js +2 -1
  20. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useSettingsStateListener.js.map +1 -1
  21. package/dist/esm/packages/taco/src/components/Table3/hooks/useTable.js +9 -9
  22. package/dist/esm/packages/taco/src/components/Table3/hooks/useTable.js.map +1 -1
  23. package/dist/esm/packages/taco/src/components/Table3/types.js.map +1 -1
  24. package/dist/esm/packages/taco/src/index.js +1 -1
  25. package/dist/esm/packages/taco/src/utils/keyboard.js +17 -14
  26. package/dist/esm/packages/taco/src/utils/keyboard.js.map +1 -1
  27. package/dist/taco.cjs.development.js +140 -35
  28. package/dist/taco.cjs.development.js.map +1 -1
  29. package/dist/taco.cjs.production.min.js +1 -1
  30. package/dist/taco.cjs.production.min.js.map +1 -1
  31. package/dist/utils/keyboard.d.ts +1 -0
  32. package/package.json +2 -2
  33. package/types.json +6075 -5317
@@ -3707,24 +3707,27 @@ const useMergedRef = ref => {
3707
3707
  return internalRef;
3708
3708
  };
3709
3709
 
3710
- const WHITELISTED_ELEMENTS = ['INPUT', 'TEXTAREA', 'SELECT'];
3710
+ const WHITELISTED_ELEMENTS = ['A', 'BUTTON', 'INPUT', 'TEXTAREA', 'SELECT'];
3711
+ function isEventTriggeredOnInteractiveElement(eventTarget) {
3712
+ return WHITELISTED_ELEMENTS.includes(eventTarget.tagName);
3713
+ }
3711
3714
  function createShortcutKeyDownHandler(key, handler) {
3712
3715
  return function (event) {
3713
- let condition = false;
3714
- if (event.target !== event.currentTarget && WHITELISTED_ELEMENTS.includes(event.target.tagName)) {
3716
+ const keyOptions = typeof key === 'string' ? {
3717
+ key,
3718
+ meta: false,
3719
+ shift: false
3720
+ } : key;
3721
+ if (event.target !== event.currentTarget && isEventTriggeredOnInteractiveElement(event.target)) {
3715
3722
  return;
3716
3723
  }
3717
- if (typeof key === 'string') {
3718
- condition = event.key.toLowerCase() === key.toLowerCase();
3719
- } else {
3720
- if (key.meta && (isMacOs() ? !event.metaKey : !event.ctrlKey) || !key.meta && (isMacOs() ? event.metaKey : event.ctrlKey)) {
3721
- return;
3722
- }
3723
- if (key.shift && !event.shiftKey || key.shift === false && event.shiftKey) {
3724
- return;
3725
- }
3726
- condition = event.key.toLowerCase() === key.key.toLowerCase();
3724
+ if (keyOptions.meta && (isMacOs() ? !event.metaKey : !event.ctrlKey) || !keyOptions.meta && (isMacOs() ? event.metaKey : event.ctrlKey)) {
3725
+ return;
3726
+ }
3727
+ if (keyOptions.shift && !event.shiftKey || keyOptions.shift === false && event.shiftKey) {
3728
+ return;
3727
3729
  }
3730
+ const condition = event.key.toLowerCase() === keyOptions.key.toLowerCase();
3728
3731
  if (condition) {
3729
3732
  var _event$stopImmediateP;
3730
3733
  // stops react handlers bubbling up to global
@@ -4210,7 +4213,14 @@ const defaultLocalisationTexts = {
4210
4213
  print: {
4211
4214
  error: 'An error occurred while creating a print preview',
4212
4215
  loading: 'Creating a print preview',
4213
- tooltip: 'Print'
4216
+ tooltip: 'Print',
4217
+ warningDialog: {
4218
+ title: 'Extra loading time',
4219
+ description: 'Please note that printing a large amount of data may result in a slightly longer waiting time due to data loading.',
4220
+ checkboxVisibilityLabel: "Don't show again",
4221
+ cancelButtonText: 'Cancel',
4222
+ printButtonText: 'Print'
4223
+ }
4214
4224
  },
4215
4225
  rowHeight: {
4216
4226
  tooltip: 'Row height',
@@ -15803,7 +15813,7 @@ function Menu$3(props) {
15803
15813
  return menuItems.map((item, key) => /*#__PURE__*/React__default.cloneElement(item, {
15804
15814
  key
15805
15815
  }));
15806
- }, [menu, index, canFreeze, canHide, tableMeta.columnFreezing.frozenColumnIndex]);
15816
+ }, [menu, index, canFreeze, canHide, handleGoto, tableMeta.columnFreezing.frozenColumnIndex]);
15807
15817
  return /*#__PURE__*/React__default.createElement(IconButton, {
15808
15818
  className: className,
15809
15819
  icon: "more",
@@ -16564,12 +16574,13 @@ function useSettingsStateListener$1(table, onChangeSettings) {
16564
16574
  columnVisibility: state.columnVisibility,
16565
16575
  excludeUnmatchedRecordsInSearch: meta.search.excludeUnmatchedResults,
16566
16576
  fontSize: meta.fontSize.size,
16577
+ showWarningWhenPrintingLargeDataset: meta.printing.printWarningDialogVisibility,
16567
16578
  rowHeight: meta.rowHeight.height,
16568
16579
  sorting: state.sorting
16569
16580
  }), 250);
16570
16581
  }
16571
16582
  return () => clearTimeout(handler);
16572
- }, [onChangeSettings, meta.columnFreezing.frozenColumnIndex, state.columnOrder, state.columnPinning, state.columnSizing, state.columnVisibility, meta.search.excludeUnmatchedResults, meta.fontSize.size, meta.rowHeight.height, state.sorting]);
16583
+ }, [onChangeSettings, meta.columnFreezing.frozenColumnIndex, state.columnOrder, state.columnPinning, state.columnSizing, state.columnVisibility, meta.search.excludeUnmatchedResults, meta.fontSize.size, meta.rowHeight.height, meta.printing.printWarningDialogVisibility, state.sorting]);
16573
16584
  }
16574
16585
 
16575
16586
  var Table3FilterComparator;
@@ -18012,10 +18023,13 @@ function useConvertChildrenToColumns(props, options, editing) {
18012
18023
  };
18013
18024
  }
18014
18025
 
18015
- function usePrinting(isEnabled, loadAll) {
18026
+ function usePrinting(isEnabled, loadAll, showWarningWhenPrintingLargeDataset = true) {
18027
+ const [printWarningDialogVisibility, setPrintWarningDialogVisibility] = React__default.useState(showWarningWhenPrintingLargeDataset);
18016
18028
  return {
18017
18029
  isEnabled,
18018
- loadAll
18030
+ loadAll,
18031
+ printWarningDialogVisibility,
18032
+ setPrintWarningDialogVisibility: isEnabled ? setPrintWarningDialogVisibility : () => undefined
18019
18033
  };
18020
18034
  }
18021
18035
 
@@ -18126,7 +18140,7 @@ function useSearch(isEnabled, excludeUnmatchedResultsInSearch = false, loadAll)
18126
18140
  }
18127
18141
 
18128
18142
  function useTable$2(props) {
18129
- var _ref, _props$defaultSetting, _props$defaultSetting2, _props$defaultSetting3, _props$defaultSetting4, _props$defaultSetting5, _props$defaultSetting6, _props$defaultSetting7, _props$defaultSetting8, _props$length;
18143
+ var _ref, _props$defaultSetting, _props$defaultSetting2, _props$defaultSetting3, _props$defaultSetting4, _props$defaultSetting5, _props$defaultSetting6, _props$defaultSetting7, _props$defaultSetting8, _props$defaultSetting9, _props$length;
18130
18144
  // options
18131
18145
  const options = useTablePreset(props);
18132
18146
  const tableOptions = {
@@ -18182,15 +18196,15 @@ function useTable$2(props) {
18182
18196
  const editing = useEditing(options.enableEditing, props.onSave);
18183
18197
  const fontSize = useFontSize(options.enableFontSize, (_props$defaultSetting4 = props.defaultSettings) === null || _props$defaultSetting4 === void 0 ? void 0 : _props$defaultSetting4.fontSize);
18184
18198
  const hoverState = usePauseHoverState();
18185
- const printing = usePrinting(options.enablePrinting, props.loadAll);
18199
+ const printing = usePrinting(options.enablePrinting, props.loadAll, (_props$defaultSetting5 = props.defaultSettings) === null || _props$defaultSetting5 === void 0 ? void 0 : _props$defaultSetting5.showWarningWhenPrintingLargeDataset);
18186
18200
  const rowClick = useRowClick(props.onRowClick);
18187
18201
  const rowDrag = useRowDrag(options.enableRowDrag);
18188
18202
  const rowDrop = useRowDrop(options.enableRowDrop, props.onRowDrop);
18189
18203
  const rowGoto = useRowGoto(options.enableRowGoto, props.onRowGoto);
18190
18204
  const rowHeight = useRowHeight(options.enableRowHeight, // temporarily see if deprecated rowDensity is there
18191
- (_props$defaultSetting5 = (_props$defaultSetting6 = props.defaultSettings) === null || _props$defaultSetting6 === void 0 ? void 0 : _props$defaultSetting6.rowHeight) !== null && _props$defaultSetting5 !== void 0 ? _props$defaultSetting5 : (_props$defaultSetting7 = props.defaultSettings) === null || _props$defaultSetting7 === void 0 ? void 0 : _props$defaultSetting7.rowDensity);
18205
+ (_props$defaultSetting6 = (_props$defaultSetting7 = props.defaultSettings) === null || _props$defaultSetting7 === void 0 ? void 0 : _props$defaultSetting7.rowHeight) !== null && _props$defaultSetting6 !== void 0 ? _props$defaultSetting6 : (_props$defaultSetting8 = props.defaultSettings) === null || _props$defaultSetting8 === void 0 ? void 0 : _props$defaultSetting8.rowDensity);
18192
18206
  const rowSelection = useRowSelection();
18193
- const search = useSearch(options.enableSearch, (_props$defaultSetting8 = props.defaultSettings) === null || _props$defaultSetting8 === void 0 ? void 0 : _props$defaultSetting8.excludeUnmatchedRecordsInSearch, props.loadAll);
18207
+ const search = useSearch(options.enableSearch, (_props$defaultSetting9 = props.defaultSettings) === null || _props$defaultSetting9 === void 0 ? void 0 : _props$defaultSetting9.excludeUnmatchedRecordsInSearch, props.loadAll);
18194
18208
  // columns
18195
18209
  const {
18196
18210
  columns,
@@ -18200,13 +18214,13 @@ function useTable$2(props) {
18200
18214
  } = useConvertChildrenToColumns(props, options, editing);
18201
18215
  // built-in features
18202
18216
  const initialState = React__default.useMemo(() => {
18203
- var _props$defaultSetting9, _props$defaultSetting10, _props$defaultSetting11, _props$defaultSetting12, _props$defaultSetting13, _props$defaultSetting14, _props$defaultSetting15;
18217
+ var _props$defaultSetting10, _props$defaultSetting11, _props$defaultSetting12, _props$defaultSetting13, _props$defaultSetting14, _props$defaultSetting15, _props$defaultSetting16;
18204
18218
  const sanitizeSortedColumns = column => columns.find(definedColumn => definedColumn.id === column.id);
18205
18219
  return {
18206
- columnOrder: ensureOrdering$1(columns, (_props$defaultSetting9 = props.defaultSettings) === null || _props$defaultSetting9 === void 0 ? void 0 : _props$defaultSetting9.columnOrder),
18207
- columnSizing: (_props$defaultSetting10 = (_props$defaultSetting11 = props.defaultSettings) === null || _props$defaultSetting11 === void 0 ? void 0 : _props$defaultSetting11.columnSizing) !== null && _props$defaultSetting10 !== void 0 ? _props$defaultSetting10 : defaultColumnSizing,
18208
- columnVisibility: (_props$defaultSetting12 = (_props$defaultSetting13 = props.defaultSettings) === null || _props$defaultSetting13 === void 0 ? void 0 : _props$defaultSetting13.columnVisibility) !== null && _props$defaultSetting12 !== void 0 ? _props$defaultSetting12 : defaultColumnVisibility,
18209
- sorting: (_props$defaultSetting14 = props.defaultSettings) !== null && _props$defaultSetting14 !== void 0 && _props$defaultSetting14.sorting ? (_props$defaultSetting15 = props.defaultSettings) === null || _props$defaultSetting15 === void 0 ? void 0 : _props$defaultSetting15.sorting.filter(sanitizeSortedColumns) : defaultSorting
18220
+ columnOrder: ensureOrdering$1(columns, (_props$defaultSetting10 = props.defaultSettings) === null || _props$defaultSetting10 === void 0 ? void 0 : _props$defaultSetting10.columnOrder),
18221
+ columnSizing: (_props$defaultSetting11 = (_props$defaultSetting12 = props.defaultSettings) === null || _props$defaultSetting12 === void 0 ? void 0 : _props$defaultSetting12.columnSizing) !== null && _props$defaultSetting11 !== void 0 ? _props$defaultSetting11 : defaultColumnSizing,
18222
+ columnVisibility: (_props$defaultSetting13 = (_props$defaultSetting14 = props.defaultSettings) === null || _props$defaultSetting14 === void 0 ? void 0 : _props$defaultSetting14.columnVisibility) !== null && _props$defaultSetting13 !== void 0 ? _props$defaultSetting13 : defaultColumnVisibility,
18223
+ sorting: (_props$defaultSetting15 = props.defaultSettings) !== null && _props$defaultSetting15 !== void 0 && _props$defaultSetting15.sorting ? (_props$defaultSetting16 = props.defaultSettings) === null || _props$defaultSetting16 === void 0 ? void 0 : _props$defaultSetting16.sorting.filter(sanitizeSortedColumns) : defaultSorting
18210
18224
  };
18211
18225
  }, []);
18212
18226
  const table = reactTable$1.useReactTable({
@@ -19375,7 +19389,7 @@ const PRINT_STYLES = `
19375
19389
  }
19376
19390
 
19377
19391
  @media print {
19378
- #root, html, body {
19392
+ html, body, #root {
19379
19393
  overflow: auto !important;
19380
19394
  height: auto !important;
19381
19395
  width: auto !important;
@@ -19394,7 +19408,7 @@ const PRINT_STYLES = `
19394
19408
  * Summary row cells
19395
19409
  */
19396
19410
  [role="table"] [role="rowgroup"]:last-child [role="cell"] {
19397
- border-top-width: 1px !important;
19411
+ border-width: 0 !important;
19398
19412
  }
19399
19413
 
19400
19414
  [role="table"] a {
@@ -19594,6 +19608,53 @@ function PrintIFrame({
19594
19608
  }, mountNode && stylesReady ? /*#__PURE__*/ReactDOM.createPortal( /*#__PURE__*/React__default.createElement(Table3, Object.assign({}, printTableProps)), mountNode) : null);
19595
19609
  }
19596
19610
 
19611
+ const WarningDialog = ({
19612
+ onAccept,
19613
+ onClose,
19614
+ onVisibilityChange,
19615
+ ...props
19616
+ }) => {
19617
+ const [hideWarningDialog, setHideWarningDialog] = React__default.useState(false);
19618
+ const {
19619
+ texts
19620
+ } = useLocalization();
19621
+ const handleClose = () => {
19622
+ onClose();
19623
+ // Change visibility state when the dialog is closing
19624
+ onVisibilityChange === null || onVisibilityChange === void 0 ? void 0 : onVisibilityChange(!hideWarningDialog);
19625
+ };
19626
+ return /*#__PURE__*/React__default.createElement(Dialog, Object.assign({}, props, {
19627
+ closeOnEscape: true,
19628
+ onClose: handleClose,
19629
+ showCloseButton: false,
19630
+ size: "xs"
19631
+ }), /*#__PURE__*/React__default.createElement(Dialog.Content, {
19632
+ "aria-label": texts.table3.print.warningDialog.title
19633
+ }, /*#__PURE__*/React__default.createElement(Dialog.Title, {
19634
+ className: "text-center"
19635
+ }, /*#__PURE__*/React__default.createElement(BadgeIcon, {
19636
+ icon: "warning",
19637
+ color: "yellow",
19638
+ className: "mr-2"
19639
+ }), texts.table3.print.warningDialog.title), /*#__PURE__*/React__default.createElement("p", null, texts.table3.print.warningDialog.description), /*#__PURE__*/React__default.createElement(Dialog.Footer, {
19640
+ className: "flex items-center justify-between"
19641
+ }, /*#__PURE__*/React__default.createElement(Checkbox, {
19642
+ label: texts.table3.print.warningDialog.checkboxVisibilityLabel,
19643
+ checked: hideWarningDialog,
19644
+ onChange: setHideWarningDialog
19645
+ }), /*#__PURE__*/React__default.createElement(Group, null, /*#__PURE__*/React__default.createElement(Button$1, {
19646
+ onClick: handleClose
19647
+ }, texts.table3.print.warningDialog.cancelButtonText), /*#__PURE__*/React__default.createElement(Button$1, {
19648
+ appearance: "primary",
19649
+ autoFocus: true,
19650
+ onClick: () => {
19651
+ handleClose();
19652
+ onAccept();
19653
+ }
19654
+ }, texts.table3.print.warningDialog.printButtonText)))));
19655
+ };
19656
+
19657
+ const SAFE_PRINT_CELL_COUNT = 10000;
19597
19658
  function PrintButton(props) {
19598
19659
  const {
19599
19660
  table,
@@ -19604,10 +19665,14 @@ function PrintButton(props) {
19604
19665
  } = useLocalization();
19605
19666
  const toast = useToast();
19606
19667
  const [isPrinting, setIsPrinting] = React__default.useState(false);
19668
+ const [showWarningDialog, setShowWarningDialog] = React__default.useState(false);
19607
19669
  const loadingToastRef = React__default.useRef(null);
19608
19670
  const buttonRef = React__default.useRef(null);
19609
19671
  const tableMeta = table.options.meta;
19610
19672
  const state = table.getState();
19673
+ const {
19674
+ printWarningDialogVisibility
19675
+ } = tableMeta.printing;
19611
19676
  const settings = React__default.useMemo(() => ({
19612
19677
  columnFilters: state.columnFilters,
19613
19678
  columnOrder: state.columnOrder,
@@ -19620,7 +19685,6 @@ function PrintButton(props) {
19620
19685
  }), [state.columnFilters, state.columnOrder, state.columnPinning, state.columnSizing, state.columnVisibility, state.sorting, tableMeta.rowHeight.height, tableMeta.columnFreezing.frozenColumnIndex]);
19621
19686
  const iframeTableProps = {
19622
19687
  ...tableProps,
19623
- data: tableProps.data,
19624
19688
  defaultSettings: settings
19625
19689
  };
19626
19690
  useGlobalKeyDown({
@@ -19644,31 +19708,63 @@ function PrintButton(props) {
19644
19708
  };
19645
19709
  const handlePrint = function () {
19646
19710
  try {
19711
+ let _exit = false;
19712
+ function _temp3(_result2) {
19713
+ if (_exit) return _result2;
19714
+ if (hasNonSafeCellCount && printWarningDialogVisibility) {
19715
+ setShowWarningDialog(true);
19716
+ } else {
19717
+ // only set printing (mount the iframe) when the data has loaded, it prevents repaint performance slow downs
19718
+ setIsPrinting(true);
19719
+ }
19720
+ }
19647
19721
  loadingToastRef.current = toast.loading(texts.table3.print.loading);
19722
+ const getCellCount = data => data.length ? data.length * Object.keys(data[0]).length : 0;
19723
+ let hasNonSafeCellCount = false;
19648
19724
  // if loadAll is not defined, just print with what we've got
19649
19725
  // don't compare length to data.length because the api might be choosing not to return all for performance
19650
- return Promise.resolve(function () {
19726
+ const _temp2 = function () {
19651
19727
  if (!tableMeta.printing.loadAll) {
19652
- setIsPrinting(true);
19728
+ const {
19729
+ data
19730
+ } = tableProps;
19731
+ const cellCount = getCellCount(data);
19732
+ hasNonSafeCellCount = cellCount > SAFE_PRINT_CELL_COUNT;
19653
19733
  } else {
19654
19734
  const _temp = _catch(function () {
19655
19735
  return Promise.resolve(tableMeta.printing.loadAll(table.getState().sorting, table.getState().columnFilters, tableMeta.search.query)).then(function () {
19656
- // only set printing (mount the iframe) when the data has loaded, it prevents repaint performance slow downs
19657
- setIsPrinting(true);
19736
+ // After the loadAll call above, the data changes. Hence, it becomes essential to acquire the data after
19737
+ // this call rather than before it.
19738
+ const {
19739
+ data
19740
+ } = tableProps;
19741
+ const cellCount = getCellCount(data);
19742
+ hasNonSafeCellCount = cellCount > SAFE_PRINT_CELL_COUNT;
19658
19743
  });
19659
19744
  }, function (error) {
19660
19745
  var _loadingToastRef$curr3;
19661
19746
  const errorMessage = `${texts.table3.print.error}: ${error}`;
19662
19747
  console.error(errorMessage);
19663
19748
  (_loadingToastRef$curr3 = loadingToastRef.current) === null || _loadingToastRef$curr3 === void 0 ? void 0 : _loadingToastRef$curr3.error(errorMessage);
19749
+ // in case of error, we return early
19750
+ _exit = true;
19664
19751
  });
19665
19752
  if (_temp && _temp.then) return _temp.then(function () {});
19666
19753
  }
19667
- }());
19754
+ }();
19755
+ return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(_temp3) : _temp3(_temp2));
19668
19756
  } catch (e) {
19669
19757
  return Promise.reject(e);
19670
19758
  }
19671
19759
  };
19760
+ const handleWarningDialogAccept = () => {
19761
+ setIsPrinting(true);
19762
+ };
19763
+ const handleWarningDialogClose = () => {
19764
+ var _loadingToastRef$curr4;
19765
+ (_loadingToastRef$curr4 = loadingToastRef.current) === null || _loadingToastRef$curr4 === void 0 ? void 0 : _loadingToastRef$curr4.close();
19766
+ setShowWarningDialog(false);
19767
+ };
19672
19768
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(IconButton, {
19673
19769
  disabled: isPrinting,
19674
19770
  icon: "print",
@@ -19680,6 +19776,11 @@ function PrintButton(props) {
19680
19776
  onAfterPrint: handleAfterPrint,
19681
19777
  onBeforePrint: handleBeforePrint,
19682
19778
  tableProps: iframeTableProps
19779
+ }), /*#__PURE__*/React__default.createElement(WarningDialog, {
19780
+ open: showWarningDialog,
19781
+ onAccept: handleWarningDialogAccept,
19782
+ onClose: handleWarningDialogClose,
19783
+ onVisibilityChange: tableMeta.printing.setPrintWarningDialogVisibility
19683
19784
  }));
19684
19785
  }
19685
19786
 
@@ -20025,6 +20126,9 @@ const Table$1 = /*#__PURE__*/fixedForwardRef(function Table3(props, ref) {
20025
20126
  const tableMeta = table.options.meta;
20026
20127
  const state = table.getState();
20027
20128
  const handleKeyDown = event => {
20129
+ if (isEventTriggeredOnInteractiveElement(event.target)) {
20130
+ return;
20131
+ }
20028
20132
  tableMeta.hoverState.handleKeyDown(event);
20029
20133
  tableMeta.currentRow.handleKeyDown(event, table.getRowModel().rows.length, scrollToIndex);
20030
20134
  tableMeta.rowClick.handleKeyDown(event, table);
@@ -21195,6 +21299,7 @@ exports.getParentRowIndexPath = getParentRowIndexPath;
21195
21299
  exports.getRadioGroupItemValueAsString = getRadioGroupItemValueAsString;
21196
21300
  exports.icons = icons;
21197
21301
  exports.insertChildTableRow = insertChildTableRow;
21302
+ exports.isEventTriggeredOnInteractiveElement = isEventTriggeredOnInteractiveElement;
21198
21303
  exports.isMacOs = isMacOs;
21199
21304
  exports.isWeakEqual = isWeakEqual;
21200
21305
  exports.mergeRefs = mergeRefs;