@teselagen/ui 0.9.1 → 0.9.3

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/index.es.js CHANGED
@@ -57237,13 +57237,15 @@ const DataTable = /* @__PURE__ */ __name((_I) => {
57237
57237
  acc[e.id || e.code] = i2;
57238
57238
  return acc;
57239
57239
  }, {});
57240
- const rowNumbersToCopy = selectedRecords.map((rec) => idToIndex[rec.id || rec.code] + 1).sort();
57240
+ const rowNumbersToCopy = Array.from(
57241
+ new Set(selectedRecords.map((rec) => idToIndex[rec.id || rec.code] + 1))
57242
+ ).sort();
57241
57243
  if (!rowNumbersToCopy.length) return;
57242
57244
  rowNumbersToCopy.unshift(0);
57243
57245
  try {
57244
57246
  const allRowEls = getAllRows(tableRef);
57245
57247
  if (!allRowEls) return;
57246
- const rowEls = rowNumbersToCopy.map((i2) => allRowEls[i2]);
57248
+ const rowEls = rowNumbersToCopy.map((i2) => allRowEls[i2]).filter(identity$1);
57247
57249
  if (window.Cypress) window.Cypress.__copiedRowsLength = rowEls.length;
57248
57250
  handleCopyRows(rowEls, {
57249
57251
  onFinishMsg: "Selected rows copied"
@@ -58686,350 +58688,359 @@ const DataTable = /* @__PURE__ */ __name((_I) => {
58686
58688
  noVirtual
58687
58689
  ]
58688
58690
  );
58689
- return /* @__PURE__ */ React__default.createElement("div", { tabIndex: "1", onKeyDown: handleKeyDown, onKeyUp: handleKeyUp }, /* @__PURE__ */ React__default.createElement(
58691
+ return /* @__PURE__ */ React__default.createElement(
58690
58692
  "div",
58691
58693
  {
58692
- className: classNames(
58693
- "data-table-container",
58694
- extraClasses,
58695
- className,
58696
- compactClassName,
58697
- {
58698
- fullscreen,
58699
- in_cypress_test: window.Cypress,
58700
- //tnr: this is a hack to make cypress be able to correctly click the table without the sticky header getting in the way. remove me once https://github.com/cypress-io/cypress/issues/871 is fixed
58701
- "dt-isViewable": isViewable,
58702
- "dt-minimalStyle": minimalStyle,
58703
- "no-padding": noPadding,
58704
- "hide-column-header": hideColumnHeader
58705
- }
58706
- )
58694
+ tabIndex: "1",
58695
+ style: { height: "100%" },
58696
+ onKeyDown: handleKeyDown,
58697
+ onKeyUp: handleKeyUp
58707
58698
  },
58708
58699
  /* @__PURE__ */ React__default.createElement(
58709
58700
  "div",
58710
- __spreadValues({
58711
- className: "data-table-container-inner"
58712
- }, isCellEditable && {
58713
- tabIndex: -1,
58714
- onKeyDown: /* @__PURE__ */ __name((e) => {
58715
- var _a2, _b, _c, _d, _e, _f, _g, _h;
58716
- const isTabKey = e.key === "Tab";
58717
- const isArrowKey = e.key.startsWith("Arrow");
58718
- if (isArrowKey && ((_a2 = e.target) == null ? void 0 : _a2.tagName) !== "INPUT" || isTabKey) {
58719
- const left2 = e.key === "ArrowLeft";
58720
- const up = e.key === "ArrowUp";
58721
- const down = e.key === "ArrowDown" || e.key === "Enter";
58722
- let cellIdToUse = primarySelectedCellId;
58723
- const pathToIndex = getFieldPathToIndex(schema);
58724
- const entityMap = getEntityIdToEntity(entities);
58725
- if (!cellIdToUse) return;
58726
- const {
58727
- isRect,
58728
- firstCellIndex,
58729
- lastCellIndex,
58730
- lastRowIndex,
58731
- firstRowIndex
58732
- } = isSelectionARectangle();
58733
- if (isRect) {
58734
- const [rowId3, columnPath2] = cellIdToUse.split(":");
58735
- const columnIndex2 = pathToIndex[columnPath2];
58736
- const indexToPath = invert(pathToIndex);
58737
- if (firstCellIndex === columnIndex2 && firstRowIndex === ((_b = entityMap[rowId3]) == null ? void 0 : _b.i)) {
58738
- cellIdToUse = `${entities[lastRowIndex].id}:${indexToPath[lastCellIndex]}`;
58739
- } else if (firstCellIndex === columnIndex2 && lastRowIndex === ((_c = entityMap[rowId3]) == null ? void 0 : _c.i)) {
58740
- cellIdToUse = `${entities[firstRowIndex].id}:${indexToPath[lastCellIndex]}`;
58741
- } else if (lastCellIndex === columnIndex2 && firstRowIndex === ((_d = entityMap[rowId3]) == null ? void 0 : _d.i)) {
58742
- cellIdToUse = `${entities[lastRowIndex].id}:${indexToPath[firstCellIndex]}`;
58743
- } else {
58744
- cellIdToUse = `${entities[firstRowIndex].id}:${indexToPath[firstCellIndex]}`;
58745
- }
58746
- }
58747
- if (!cellIdToUse) return;
58748
- const [rowId2, columnPath] = cellIdToUse.split(":");
58749
- const columnIndex = pathToIndex[columnPath];
58750
- const { i: rowIndex } = entityMap[rowId2];
58751
- const {
58752
- cellIdAbove,
58753
- cellIdToRight,
58754
- cellIdBelow,
58755
- cellIdToLeft
58756
- } = getCellInfo({
58757
- columnIndex,
58758
- columnPath,
58759
- rowId: rowId2,
58760
- schema,
58761
- entities,
58762
- rowIndex,
58763
- isEntityDisabled,
58764
- entity: entityMap[rowId2].e
58765
- });
58766
- const nextCellId = up ? cellIdAbove : down ? cellIdBelow : left2 ? cellIdToLeft : cellIdToRight;
58767
- e.stopPropagation();
58768
- e.preventDefault();
58769
- if (!nextCellId) return;
58770
- if ((_f = (_e = document.activeElement) == null ? void 0 : _e.parentElement) == null ? void 0 : _f.classList.contains(
58771
- "rt-td"
58772
- )) {
58773
- document.activeElement.blur();
58774
- }
58775
- handleCellClick({
58776
- event: e,
58777
- cellId: nextCellId
58778
- });
58779
- }
58780
- if (e.metaKey || e.ctrlKey || e.altKey) return;
58781
- if (!primarySelectedCellId) return;
58782
- const entityIdToEntity = getEntityIdToEntity(entities);
58783
- const [rowId] = primarySelectedCellId.split(":");
58784
- if (!rowId) return;
58785
- const entity = entityIdToEntity[rowId].e;
58786
- if (!entity) return;
58787
- const rowDisabled = isEntityDisabled(entity);
58788
- const isNum = (_g = e.code) == null ? void 0 : _g.startsWith("Digit");
58789
- const isLetter = (_h = e.code) == null ? void 0 : _h.startsWith("Key");
58790
- const allowedSpecialChars = [
58791
- "Minus",
58792
- "Equal",
58793
- "Backquote",
58794
- "BracketLeft",
58795
- "BracketRight",
58796
- "Backslash",
58797
- "IntlBackslash",
58798
- "Semicolon",
58799
- "Quote",
58800
- "Comma",
58801
- "Period",
58802
- "Slash",
58803
- "IntlRo",
58804
- "IntlYen",
58805
- "Space"
58806
- ];
58807
- const isSpecialChar = allowedSpecialChars.includes(e.code);
58808
- if (!isNum && !isLetter && !isSpecialChar) {
58809
- return;
58701
+ {
58702
+ className: classNames(
58703
+ "data-table-container",
58704
+ extraClasses,
58705
+ className,
58706
+ compactClassName,
58707
+ {
58708
+ fullscreen,
58709
+ in_cypress_test: window.Cypress,
58710
+ //tnr: this is a hack to make cypress be able to correctly click the table without the sticky header getting in the way. remove me once https://github.com/cypress-io/cypress/issues/871 is fixed
58711
+ "dt-isViewable": isViewable,
58712
+ "dt-minimalStyle": minimalStyle,
58713
+ "no-padding": noPadding,
58714
+ "hide-column-header": hideColumnHeader
58810
58715
  }
58811
- if (rowDisabled) return;
58812
- e.stopPropagation();
58813
- startCellEdit(primarySelectedCellId, true);
58814
- }, "onKeyDown")
58815
- }),
58816
- isCellEditable && entities.length > 50 && // test for this!!
58716
+ )
58717
+ },
58817
58718
  /* @__PURE__ */ React__default.createElement(
58818
- SwitchField,
58819
- {
58820
- name: "onlyShowRowsWErrors",
58821
- inlineLabel: true,
58822
- label: "Only Show Rows With Errors",
58823
- onChange: /* @__PURE__ */ __name((e) => {
58824
- setOnlyShowRowsWErrors(e.target.value);
58825
- }, "onChange")
58826
- }
58827
- ),
58828
- showHeader && /* @__PURE__ */ React__default.createElement("div", { className: "data-table-header" }, /* @__PURE__ */ React__default.createElement("div", { className: "data-table-title-and-buttons" }, tableName && withTitle && /* @__PURE__ */ React__default.createElement("span", { className: "data-table-title" }, tableName), children, topLeftItems), errorParsingUrlString && /* @__PURE__ */ React__default.createElement(
58829
- Callout,
58830
- {
58831
- icon: "error",
58832
- style: {
58833
- width: "unset"
58834
- },
58835
- intent: Intent.WARNING
58836
- },
58837
- "Error parsing URL"
58838
- ), nonDisplayedFilterComp, withSearch && /* @__PURE__ */ React__default.createElement("div", { className: "data-table-search-and-clear-filter-container" }, leftOfSearchBarItems, hasFilters ? /* @__PURE__ */ React__default.createElement(Tooltip, { content: "Clear Filters" }, /* @__PURE__ */ React__default.createElement(
58839
- Button,
58840
- {
58841
- minimal: true,
58842
- intent: "danger",
58843
- icon: "filter-remove",
58844
- disabled,
58845
- className: "data-table-clear-filters",
58846
- onClick: /* @__PURE__ */ __name(() => {
58847
- clearFilters(additionalFilterKeys);
58848
- }, "onClick")
58849
- }
58850
- )) : "", /* @__PURE__ */ React__default.createElement(
58851
- SearchBar,
58852
- {
58853
- noForm,
58854
- searchInput: currentParams.searchTerm,
58855
- setSearchTerm,
58856
- loading: isLoading,
58857
- searchMenuButton,
58858
- disabled,
58859
- autoFocusSearch
58860
- }
58861
- ))),
58862
- subHeader,
58863
- showSelectAll && !isSingleSelect && /* @__PURE__ */ React__default.createElement(
58864
58719
  "div",
58865
- {
58866
- style: {
58867
- marginTop: 5,
58868
- marginBottom: 5,
58869
- display: "flex",
58870
- alignItems: "center"
58871
- }
58872
- },
58873
- "All items on this page are selected.",
58874
- " ",
58875
- /* @__PURE__ */ React__default.createElement(
58876
- Button,
58877
- {
58878
- small: true,
58879
- minimal: true,
58880
- intent: "primary",
58881
- text: `Select all ${entityCount || entitiesAcrossPages.length} items`,
58882
- loading: selectingAll,
58883
- onClick: /* @__PURE__ */ __name(() => __async(void 0, null, function* () {
58884
- if (withSelectAll) {
58885
- setSelectingAll(true);
58886
- try {
58887
- const allEntities = yield safeQuery(fragment, {
58888
- variables: {
58889
- where: variables.where,
58890
- sort: variables.sort
58891
- },
58892
- canCancel: true
58893
- });
58894
- addEntitiesToSelection(allEntities);
58895
- } catch (error) {
58896
- console.error(`error:`, error);
58897
- window.toastr.error("Error selecting all constructs");
58720
+ __spreadValues({
58721
+ className: "data-table-container-inner"
58722
+ }, isCellEditable && {
58723
+ tabIndex: -1,
58724
+ onKeyDown: /* @__PURE__ */ __name((e) => {
58725
+ var _a2, _b, _c, _d, _e, _f, _g, _h;
58726
+ const isTabKey = e.key === "Tab";
58727
+ const isArrowKey = e.key.startsWith("Arrow");
58728
+ if (isArrowKey && ((_a2 = e.target) == null ? void 0 : _a2.tagName) !== "INPUT" || isTabKey) {
58729
+ const left2 = e.key === "ArrowLeft";
58730
+ const up = e.key === "ArrowUp";
58731
+ const down = e.key === "ArrowDown" || e.key === "Enter";
58732
+ let cellIdToUse = primarySelectedCellId;
58733
+ const pathToIndex = getFieldPathToIndex(schema);
58734
+ const entityMap = getEntityIdToEntity(entities);
58735
+ if (!cellIdToUse) return;
58736
+ const {
58737
+ isRect,
58738
+ firstCellIndex,
58739
+ lastCellIndex,
58740
+ lastRowIndex,
58741
+ firstRowIndex
58742
+ } = isSelectionARectangle();
58743
+ if (isRect) {
58744
+ const [rowId3, columnPath2] = cellIdToUse.split(":");
58745
+ const columnIndex2 = pathToIndex[columnPath2];
58746
+ const indexToPath = invert(pathToIndex);
58747
+ if (firstCellIndex === columnIndex2 && firstRowIndex === ((_b = entityMap[rowId3]) == null ? void 0 : _b.i)) {
58748
+ cellIdToUse = `${entities[lastRowIndex].id}:${indexToPath[lastCellIndex]}`;
58749
+ } else if (firstCellIndex === columnIndex2 && lastRowIndex === ((_c = entityMap[rowId3]) == null ? void 0 : _c.i)) {
58750
+ cellIdToUse = `${entities[firstRowIndex].id}:${indexToPath[lastCellIndex]}`;
58751
+ } else if (lastCellIndex === columnIndex2 && firstRowIndex === ((_d = entityMap[rowId3]) == null ? void 0 : _d.i)) {
58752
+ cellIdToUse = `${entities[lastRowIndex].id}:${indexToPath[firstCellIndex]}`;
58753
+ } else {
58754
+ cellIdToUse = `${entities[firstRowIndex].id}:${indexToPath[firstCellIndex]}`;
58898
58755
  }
58899
- setSelectingAll(false);
58900
- } else {
58901
- addEntitiesToSelection(entitiesAcrossPages);
58902
58756
  }
58903
- }), "onClick")
58904
- }
58905
- )
58906
- ),
58907
- showClearAll > 0 && /* @__PURE__ */ React__default.createElement(
58908
- "div",
58909
- {
58910
- style: {
58911
- marginTop: 5,
58912
- marginBottom: 5,
58913
- display: "flex",
58914
- alignItems: "center"
58915
- }
58916
- },
58917
- "All ",
58918
- showClearAll,
58919
- " items are selected.",
58757
+ if (!cellIdToUse) return;
58758
+ const [rowId2, columnPath] = cellIdToUse.split(":");
58759
+ const columnIndex = pathToIndex[columnPath];
58760
+ const { i: rowIndex } = entityMap[rowId2];
58761
+ const {
58762
+ cellIdAbove,
58763
+ cellIdToRight,
58764
+ cellIdBelow,
58765
+ cellIdToLeft
58766
+ } = getCellInfo({
58767
+ columnIndex,
58768
+ columnPath,
58769
+ rowId: rowId2,
58770
+ schema,
58771
+ entities,
58772
+ rowIndex,
58773
+ isEntityDisabled,
58774
+ entity: entityMap[rowId2].e
58775
+ });
58776
+ const nextCellId = up ? cellIdAbove : down ? cellIdBelow : left2 ? cellIdToLeft : cellIdToRight;
58777
+ e.stopPropagation();
58778
+ e.preventDefault();
58779
+ if (!nextCellId) return;
58780
+ if ((_f = (_e = document.activeElement) == null ? void 0 : _e.parentElement) == null ? void 0 : _f.classList.contains(
58781
+ "rt-td"
58782
+ )) {
58783
+ document.activeElement.blur();
58784
+ }
58785
+ handleCellClick({
58786
+ event: e,
58787
+ cellId: nextCellId
58788
+ });
58789
+ }
58790
+ if (e.metaKey || e.ctrlKey || e.altKey) return;
58791
+ if (!primarySelectedCellId) return;
58792
+ const entityIdToEntity = getEntityIdToEntity(entities);
58793
+ const [rowId] = primarySelectedCellId.split(":");
58794
+ if (!rowId) return;
58795
+ const entity = entityIdToEntity[rowId].e;
58796
+ if (!entity) return;
58797
+ const rowDisabled = isEntityDisabled(entity);
58798
+ const isNum = (_g = e.code) == null ? void 0 : _g.startsWith("Digit");
58799
+ const isLetter = (_h = e.code) == null ? void 0 : _h.startsWith("Key");
58800
+ const allowedSpecialChars = [
58801
+ "Minus",
58802
+ "Equal",
58803
+ "Backquote",
58804
+ "BracketLeft",
58805
+ "BracketRight",
58806
+ "Backslash",
58807
+ "IntlBackslash",
58808
+ "Semicolon",
58809
+ "Quote",
58810
+ "Comma",
58811
+ "Period",
58812
+ "Slash",
58813
+ "IntlRo",
58814
+ "IntlYen",
58815
+ "Space"
58816
+ ];
58817
+ const isSpecialChar = allowedSpecialChars.includes(e.code);
58818
+ if (!isNum && !isLetter && !isSpecialChar) {
58819
+ return;
58820
+ }
58821
+ if (rowDisabled) return;
58822
+ e.stopPropagation();
58823
+ startCellEdit(primarySelectedCellId, true);
58824
+ }, "onKeyDown")
58825
+ }),
58826
+ isCellEditable && entities.length > 50 && // test for this!!
58920
58827
  /* @__PURE__ */ React__default.createElement(
58828
+ SwitchField,
58829
+ {
58830
+ name: "onlyShowRowsWErrors",
58831
+ inlineLabel: true,
58832
+ label: "Only Show Rows With Errors",
58833
+ onChange: /* @__PURE__ */ __name((e) => {
58834
+ setOnlyShowRowsWErrors(e.target.value);
58835
+ }, "onChange")
58836
+ }
58837
+ ),
58838
+ showHeader && /* @__PURE__ */ React__default.createElement("div", { className: "data-table-header" }, /* @__PURE__ */ React__default.createElement("div", { className: "data-table-title-and-buttons" }, tableName && withTitle && /* @__PURE__ */ React__default.createElement("span", { className: "data-table-title" }, tableName), children, topLeftItems), errorParsingUrlString && /* @__PURE__ */ React__default.createElement(
58839
+ Callout,
58840
+ {
58841
+ icon: "error",
58842
+ style: {
58843
+ width: "unset"
58844
+ },
58845
+ intent: Intent.WARNING
58846
+ },
58847
+ "Error parsing URL"
58848
+ ), nonDisplayedFilterComp, withSearch && /* @__PURE__ */ React__default.createElement("div", { className: "data-table-search-and-clear-filter-container" }, leftOfSearchBarItems, hasFilters ? /* @__PURE__ */ React__default.createElement(Tooltip, { content: "Clear Filters" }, /* @__PURE__ */ React__default.createElement(
58921
58849
  Button,
58922
58850
  {
58923
- small: true,
58924
58851
  minimal: true,
58925
- intent: "primary",
58926
- text: "Clear Selection",
58852
+ intent: "danger",
58853
+ icon: "filter-remove",
58854
+ disabled,
58855
+ className: "data-table-clear-filters",
58927
58856
  onClick: /* @__PURE__ */ __name(() => {
58928
- finalizeSelection({
58929
- idMap: {},
58930
- entities,
58931
- props: {
58932
- onDeselect,
58933
- onSingleRowSelect,
58934
- onMultiRowSelect,
58935
- noDeselectAll,
58936
- onRowSelect,
58937
- noSelect,
58938
- change: change$1
58939
- }
58940
- });
58857
+ clearFilters(additionalFilterKeys);
58941
58858
  }, "onClick")
58942
58859
  }
58943
- )
58944
- ),
58945
- reactTable,
58946
- isCellEditable && /* @__PURE__ */ React__default.createElement("div", { style: { display: "flex" } }, /* @__PURE__ */ React__default.createElement(
58947
- "div",
58948
- {
58949
- style: {
58950
- width: "100%",
58951
- display: "flex",
58952
- justifyContent: "center"
58860
+ )) : "", /* @__PURE__ */ React__default.createElement(
58861
+ SearchBar,
58862
+ {
58863
+ noForm,
58864
+ searchInput: currentParams.searchTerm,
58865
+ setSearchTerm,
58866
+ loading: isLoading,
58867
+ searchMenuButton,
58868
+ disabled,
58869
+ autoFocusSearch
58953
58870
  }
58954
- },
58955
- !onlyShowRowsWErrors && /* @__PURE__ */ React__default.createElement(
58871
+ ))),
58872
+ subHeader,
58873
+ showSelectAll && !isSingleSelect && /* @__PURE__ */ React__default.createElement(
58874
+ "div",
58875
+ {
58876
+ style: {
58877
+ marginTop: 5,
58878
+ marginBottom: 5,
58879
+ display: "flex",
58880
+ alignItems: "center"
58881
+ }
58882
+ },
58883
+ "All items on this page are selected.",
58884
+ " ",
58885
+ /* @__PURE__ */ React__default.createElement(
58886
+ Button,
58887
+ {
58888
+ small: true,
58889
+ minimal: true,
58890
+ intent: "primary",
58891
+ text: `Select all ${entityCount || entitiesAcrossPages.length} items`,
58892
+ loading: selectingAll,
58893
+ onClick: /* @__PURE__ */ __name(() => __async(void 0, null, function* () {
58894
+ if (withSelectAll) {
58895
+ setSelectingAll(true);
58896
+ try {
58897
+ const allEntities = yield safeQuery(fragment, {
58898
+ variables: {
58899
+ where: variables.where,
58900
+ sort: variables.sort
58901
+ },
58902
+ canCancel: true
58903
+ });
58904
+ addEntitiesToSelection(allEntities);
58905
+ } catch (error) {
58906
+ console.error(`error:`, error);
58907
+ window.toastr.error("Error selecting all constructs");
58908
+ }
58909
+ setSelectingAll(false);
58910
+ } else {
58911
+ addEntitiesToSelection(entitiesAcrossPages);
58912
+ }
58913
+ }), "onClick")
58914
+ }
58915
+ )
58916
+ ),
58917
+ showClearAll > 0 && /* @__PURE__ */ React__default.createElement(
58918
+ "div",
58919
+ {
58920
+ style: {
58921
+ marginTop: 5,
58922
+ marginBottom: 5,
58923
+ display: "flex",
58924
+ alignItems: "center"
58925
+ }
58926
+ },
58927
+ "All ",
58928
+ showClearAll,
58929
+ " items are selected.",
58930
+ /* @__PURE__ */ React__default.createElement(
58931
+ Button,
58932
+ {
58933
+ small: true,
58934
+ minimal: true,
58935
+ intent: "primary",
58936
+ text: "Clear Selection",
58937
+ onClick: /* @__PURE__ */ __name(() => {
58938
+ finalizeSelection({
58939
+ idMap: {},
58940
+ entities,
58941
+ props: {
58942
+ onDeselect,
58943
+ onSingleRowSelect,
58944
+ onMultiRowSelect,
58945
+ noDeselectAll,
58946
+ onRowSelect,
58947
+ noSelect,
58948
+ change: change$1
58949
+ }
58950
+ });
58951
+ }, "onClick")
58952
+ }
58953
+ )
58954
+ ),
58955
+ reactTable,
58956
+ isCellEditable && /* @__PURE__ */ React__default.createElement("div", { style: { display: "flex" } }, /* @__PURE__ */ React__default.createElement(
58957
+ "div",
58958
+ {
58959
+ style: {
58960
+ width: "100%",
58961
+ display: "flex",
58962
+ justifyContent: "center"
58963
+ }
58964
+ },
58965
+ !onlyShowRowsWErrors && /* @__PURE__ */ React__default.createElement(
58966
+ Button,
58967
+ {
58968
+ icon: "add",
58969
+ onClick: /* @__PURE__ */ __name(() => {
58970
+ insertRows({ numRows: 10, appendToBottom: true });
58971
+ }, "onClick"),
58972
+ minimal: true
58973
+ },
58974
+ "Add 10 Rows"
58975
+ )
58976
+ ), /* @__PURE__ */ React__default.createElement(
58956
58977
  Button,
58957
58978
  {
58958
- icon: "add",
58959
58979
  onClick: /* @__PURE__ */ __name(() => {
58960
- insertRows({ numRows: 10, appendToBottom: true });
58980
+ handleCopyTable(tableRef, { isDownload: true });
58961
58981
  }, "onClick"),
58962
- minimal: true
58963
- },
58964
- "Add 10 Rows"
58965
- )
58966
- ), /* @__PURE__ */ React__default.createElement(
58967
- Button,
58968
- {
58969
- onClick: /* @__PURE__ */ __name(() => {
58970
- handleCopyTable(tableRef, { isDownload: true });
58971
- }, "onClick"),
58972
- "data-tip": "Download Table as CSV",
58973
- minimal: true,
58974
- icon: "download"
58975
- }
58976
- )),
58977
- !noFooter && /* @__PURE__ */ React__default.createElement(
58978
- "div",
58979
- {
58980
- className: "data-table-footer",
58981
- style: {
58982
- justifyContent: !showNumSelected && !showCount ? "flex-end" : "space-between"
58983
- }
58984
- },
58985
- selectedAndTotalMessage,
58986
- /* @__PURE__ */ React__default.createElement("div", { style: { display: "flex", flexWrap: "wrap" } }, additionalFooterButtons, !noFullscreenButton && toggleFullscreenButton, withDisplayOptions && /* @__PURE__ */ React__default.createElement(
58987
- DisplayOptions,
58988
- {
58989
- compact,
58990
- extraCompact,
58991
- disabled,
58992
- hideDisplayOptionsIcon,
58993
- resetDefaultVisibility,
58994
- updateColumnVisibility,
58995
- updateTableDisplayDensity,
58996
- showForcedHiddenColumns,
58997
- setShowForcedHidden,
58998
- hasOptionForForcedHidden: withDisplayOptions && (isSimple || isInfinite),
58999
- schema
58982
+ "data-tip": "Download Table as CSV",
58983
+ minimal: true,
58984
+ icon: "download"
59000
58985
  }
59001
- ), shouldShowPaging && /* @__PURE__ */ React__default.createElement(
59002
- PagingTool,
58986
+ )),
58987
+ !noFooter && /* @__PURE__ */ React__default.createElement(
58988
+ "div",
59003
58989
  {
59004
- controlled_hasNextPage,
59005
- controlled_onRefresh,
59006
- controlled_page,
59007
- controlled_setPage,
59008
- controlled_setPageSize,
59009
- controlled_total,
59010
- disabled,
59011
- disableSetPageSize,
59012
- entities,
59013
- entityCount,
59014
- hideSetPageSize,
59015
- hideTotalPages,
59016
- keepSelectionOnPageChange,
59017
- onRefresh,
59018
- page,
59019
- pageSize,
59020
- pagingDisabled,
59021
- persistPageSize,
59022
- setPage,
59023
- setPageSize,
59024
- setSelectedEntityIdMap: /* @__PURE__ */ __name((newIdMap) => {
59025
- change$1("reduxFormSelectedEntityIdMap", newIdMap);
59026
- }, "setSelectedEntityIdMap"),
59027
- scrollToTop
59028
- }
59029
- ))
58990
+ className: "data-table-footer",
58991
+ style: {
58992
+ justifyContent: !showNumSelected && !showCount ? "flex-end" : "space-between"
58993
+ }
58994
+ },
58995
+ selectedAndTotalMessage,
58996
+ /* @__PURE__ */ React__default.createElement("div", { style: { display: "flex", flexWrap: "wrap" } }, additionalFooterButtons, !noFullscreenButton && toggleFullscreenButton, withDisplayOptions && /* @__PURE__ */ React__default.createElement(
58997
+ DisplayOptions,
58998
+ {
58999
+ compact,
59000
+ extraCompact,
59001
+ disabled,
59002
+ hideDisplayOptionsIcon,
59003
+ resetDefaultVisibility,
59004
+ updateColumnVisibility,
59005
+ updateTableDisplayDensity,
59006
+ showForcedHiddenColumns,
59007
+ setShowForcedHidden,
59008
+ hasOptionForForcedHidden: withDisplayOptions && (isSimple || isInfinite),
59009
+ schema
59010
+ }
59011
+ ), shouldShowPaging && /* @__PURE__ */ React__default.createElement(
59012
+ PagingTool,
59013
+ {
59014
+ controlled_hasNextPage,
59015
+ controlled_onRefresh,
59016
+ controlled_page,
59017
+ controlled_setPage,
59018
+ controlled_setPageSize,
59019
+ controlled_total,
59020
+ disabled,
59021
+ disableSetPageSize,
59022
+ entities,
59023
+ entityCount,
59024
+ hideSetPageSize,
59025
+ hideTotalPages,
59026
+ keepSelectionOnPageChange,
59027
+ onRefresh,
59028
+ page,
59029
+ pageSize,
59030
+ pagingDisabled,
59031
+ persistPageSize,
59032
+ setPage,
59033
+ setPageSize,
59034
+ setSelectedEntityIdMap: /* @__PURE__ */ __name((newIdMap) => {
59035
+ change$1("reduxFormSelectedEntityIdMap", newIdMap);
59036
+ }, "setSelectedEntityIdMap"),
59037
+ scrollToTop
59038
+ }
59039
+ ))
59040
+ )
59030
59041
  )
59031
59042
  )
59032
- ));
59043
+ );
59033
59044
  }, "DataTable");
59034
59045
  const WrappedDT = dataTableEnhancer(DataTable);
59035
59046
  const ConnectedPagingTool = dataTableEnhancer(PagingTool);