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