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