@teselagen/ui 0.9.1 → 0.9.4

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