@procore/data-table 14.14.0 → 14.15.0

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.
@@ -9,6 +9,7 @@ var coreIcons = require('@procore/core-icons');
9
9
  var classNames = require('classnames');
10
10
  var dateFns = require('date-fns');
11
11
  var labsFinancialsUtils = require('@procore/labs-financials-utils');
12
+ var format = require('@procore/labs-financials-utils/dist/format');
12
13
  var ulid$1 = require('ulid');
13
14
  var toastAlert = require('@procore/toast-alert');
14
15
  var ReactDOM = require('react-dom');
@@ -1421,7 +1422,7 @@ ag-grid, ag-grid-angular, ag-grid-ng2, ag-grid-polymer, ag-grid-aurelia {
1421
1422
  animation-iteration-count: infinite;
1422
1423
  animation-name: ag-shake-left-to-right;
1423
1424
  }
1424
- @keyframes _ag-shake-left-to-right_1c24o_369 {
1425
+ @keyframes _ag-shake-left-to-right_ye2ai_369 {
1425
1426
  from {
1426
1427
  padding-left: 6px;
1427
1428
  padding-right: 2px;
@@ -5422,7 +5423,7 @@ input[class^=ag-][type=button]:focus, button[class^=ag-]:focus {
5422
5423
  animation-iteration-count: infinite;
5423
5424
  animation-timing-function: linear;
5424
5425
  }
5425
- @keyframes _spin_1c24o_1 {
5426
+ @keyframes _spin_ye2ai_1 {
5426
5427
  from {
5427
5428
  transform: rotate(0deg);
5428
5429
  }
@@ -7507,10 +7508,15 @@ input[class^=ag-][type=range]:disabled {
7507
7508
  }
7508
7509
  .ag-theme-alpine.ag-theme-alpine .ag-row--dt-active {
7509
7510
  background-color: #e4ecfb;
7510
- border-left: 4px solid #2066df;
7511
7511
  }
7512
- .ag-theme-alpine.ag-theme-alpine .ag-row--dt-active > .ag-cell {
7513
- padding-left: 12px;
7512
+ .ag-theme-alpine.ag-theme-alpine .ag-row--dt-active::before {
7513
+ background-color: #2066df;
7514
+ content: "";
7515
+ width: 4px;
7516
+ height: 100%;
7517
+ position: absolute;
7518
+ top: 0;
7519
+ left: 0;
7514
7520
  }
7515
7521
  .ag-theme-alpine.ag-theme-alpine .ag-row--dt-overdue span {
7516
7522
  color: #e61920;
@@ -7922,7 +7928,7 @@ input[class^=ag-][type=range]:disabled {
7922
7928
  padding-left: 16px;
7923
7929
  }
7924
7930
 
7925
- div._contextPanel_1c24o_7148 {
7931
+ div._contextPanel_ye2ai_7153 {
7926
7932
  width: 400px;
7927
7933
  transition: all ease 500ms;
7928
7934
  flex: 0 0 auto;
@@ -7931,7 +7937,7 @@ div._contextPanel_1c24o_7148 {
7931
7937
  border: 1px solid #d6dadc;
7932
7938
  display: flex;
7933
7939
  }
7934
- div._contextPanel--hidden_1c24o_7157 {
7940
+ div._contextPanel--hidden_ye2ai_7162 {
7935
7941
  border: none;
7936
7942
  overflow: hidden;
7937
7943
  padding: 0px;
@@ -7939,50 +7945,50 @@ div._contextPanel--hidden_1c24o_7157 {
7939
7945
  width: 0px;
7940
7946
  }
7941
7947
 
7942
- ._contextPanelWrapper_1c24o_7165 {
7948
+ ._contextPanelWrapper_ye2ai_7170 {
7943
7949
  position: relative;
7944
7950
  flex-grow: 1;
7945
7951
  }
7946
7952
 
7947
- ._contextPanelBody_1c24o_7170 {
7953
+ ._contextPanelBody_ye2ai_7175 {
7948
7954
  width: clamp(380px, 400px, 100%);
7949
7955
  }
7950
7956
 
7951
- ._contextPanel-stickyHeader_1c24o_7174 {
7957
+ ._contextPanel-stickyHeader_ye2ai_7179 {
7952
7958
  background-color: #ffffff;
7953
7959
  position: sticky;
7954
7960
  top: 0;
7955
7961
  z-index: 5;
7956
7962
  }
7957
7963
 
7958
- ._filters-list_1c24o_7181 {
7964
+ ._filters-list_ye2ai_7186 {
7959
7965
  padding: 0;
7960
7966
  margin: 0;
7961
7967
  }
7962
- ._filters-list_1c24o_7181 ol {
7968
+ ._filters-list_ye2ai_7186 ol {
7963
7969
  padding: 0;
7964
7970
  margin: 0;
7965
7971
  }
7966
7972
 
7967
- ._col-drag-column-icon_1c24o_7190 {
7973
+ ._col-drag-column-icon_ye2ai_7195 {
7968
7974
  color: #6a767c;
7969
7975
  }
7970
7976
 
7971
- ._tabular-nums_1c24o_7194 {
7977
+ ._tabular-nums_ye2ai_7199 {
7972
7978
  font-variant-numeric: tabular-nums;
7973
7979
  }`;
7974
7980
  document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(css));
7975
7981
  var styles_default = {
7976
- "contextPanel": "_contextPanel_1c24o_7148",
7977
- "contextPanel--hidden": "_contextPanel--hidden_1c24o_7157",
7978
- "contextPanelWrapper": "_contextPanelWrapper_1c24o_7165",
7979
- "contextPanelBody": "_contextPanelBody_1c24o_7170",
7980
- "contextPanel-stickyHeader": "_contextPanel-stickyHeader_1c24o_7174",
7981
- "filters-list": "_filters-list_1c24o_7181",
7982
- "col-drag-column-icon": "_col-drag-column-icon_1c24o_7190",
7983
- "tabular-nums": "_tabular-nums_1c24o_7194",
7984
- "ag-shake-left-to-right": "_ag-shake-left-to-right_1c24o_369",
7985
- "spin": "_spin_1c24o_1"
7982
+ "contextPanel": "_contextPanel_ye2ai_7153",
7983
+ "contextPanel--hidden": "_contextPanel--hidden_ye2ai_7162",
7984
+ "contextPanelWrapper": "_contextPanelWrapper_ye2ai_7170",
7985
+ "contextPanelBody": "_contextPanelBody_ye2ai_7175",
7986
+ "contextPanel-stickyHeader": "_contextPanel-stickyHeader_ye2ai_7179",
7987
+ "filters-list": "_filters-list_ye2ai_7186",
7988
+ "col-drag-column-icon": "_col-drag-column-icon_ye2ai_7195",
7989
+ "tabular-nums": "_tabular-nums_ye2ai_7199",
7990
+ "ag-shake-left-to-right": "_ag-shake-left-to-right_ye2ai_369",
7991
+ "spin": "_spin_ye2ai_1"
7986
7992
  };
7987
7993
 
7988
7994
  // src/utils/getCellValueTypographyProps.ts
@@ -8656,12 +8662,12 @@ var DateCellValue = ({
8656
8662
  isGroup,
8657
8663
  value
8658
8664
  }) => {
8659
- const { format } = coreReact.useDateTime();
8665
+ const { format: format2 } = coreReact.useDateTime();
8660
8666
  if (isGroup || isEmptyValue(value)) {
8661
8667
  return null;
8662
8668
  }
8663
8669
  const parsedValue = getDateObject(value);
8664
- const internalValue = parsedValue ? format(
8670
+ const internalValue = parsedValue ? format2(
8665
8671
  parsedValue,
8666
8672
  columnDefinition.cellRendererParams?.dateFormatType || "numeric-date"
8667
8673
  ) : void 0;
@@ -8727,12 +8733,12 @@ var DateTimeCellValue = ({
8727
8733
  isGroup,
8728
8734
  value
8729
8735
  }) => {
8730
- const { format } = coreReact.useDateTime();
8736
+ const { format: format2 } = coreReact.useDateTime();
8731
8737
  if (isGroup || isEmptyValue(value)) {
8732
8738
  return null;
8733
8739
  }
8734
8740
  const parsedValue = getDateObject2(value);
8735
- const internalValue = parsedValue ? format(
8741
+ const internalValue = parsedValue ? format2(
8736
8742
  parsedValue,
8737
8743
  columnDefinition.cellRendererParams?.dateFormatType || "abbr-weekday-abbr-date-at-time"
8738
8744
  ) : void 0;
@@ -16653,7 +16659,7 @@ var calculateOrdinal = (value) => {
16653
16659
  }
16654
16660
  return "th";
16655
16661
  };
16656
- function dateToFormattedString(date, format = "YYYY-MM-DD") {
16662
+ function dateToFormattedString(date, format2 = "YYYY-MM-DD") {
16657
16663
  const fullYear = padStartWidthZeros(date.getFullYear(), 4);
16658
16664
  const months = [
16659
16665
  "January",
@@ -16697,7 +16703,7 @@ function dateToFormattedString(date, format = "YYYY-MM-DD") {
16697
16703
  d: () => `${date.getDay()}`
16698
16704
  };
16699
16705
  const regexp = new RegExp(Object.keys(replace).join("|"), "g");
16700
- return format.replace(regexp, (match) => {
16706
+ return format2.replace(regexp, (match) => {
16701
16707
  if (match in replace) {
16702
16708
  return replace[match]();
16703
16709
  }
@@ -21340,14 +21346,14 @@ var DateFilterModelFormatter = class extends SimpleFilterModelFormatter {
21340
21346
  const isRange = type == SimpleFilter.IN_RANGE || numberOfInputs === 2;
21341
21347
  const dateFrom = parseDateTimeFromString(condition.dateFrom);
21342
21348
  const dateTo = parseDateTimeFromString(condition.dateTo);
21343
- const format = this.dateFilterParams.inRangeFloatingFilterDateFormat;
21349
+ const format2 = this.dateFilterParams.inRangeFloatingFilterDateFormat;
21344
21350
  if (isRange) {
21345
- const formattedFrom = dateFrom !== null ? dateToFormattedString(dateFrom, format) : "null";
21346
- const formattedTo = dateTo !== null ? dateToFormattedString(dateTo, format) : "null";
21351
+ const formattedFrom = dateFrom !== null ? dateToFormattedString(dateFrom, format2) : "null";
21352
+ const formattedTo = dateTo !== null ? dateToFormattedString(dateTo, format2) : "null";
21347
21353
  return `${formattedFrom}-${formattedTo}`;
21348
21354
  }
21349
21355
  if (dateFrom != null) {
21350
- return dateToFormattedString(dateFrom, format);
21356
+ return dateToFormattedString(dateFrom, format2);
21351
21357
  }
21352
21358
  return `${type}`;
21353
21359
  }
@@ -52969,7 +52975,27 @@ var InternalLinkCellRenderer = ({ columnDefinition, isGroup, data, rowHeight, va
52969
52975
  if (isGroup) {
52970
52976
  return /* @__PURE__ */ React76__default.default.createElement(coreReact.Typography, { ...typographyProps, className, weight: "semibold" }, value);
52971
52977
  }
52978
+ const isExternalLink = columnDefinition.cellRendererParams.isExternalLink ?? false;
52972
52979
  const URL = columnDefinition.cellRendererParams.getURL(value, data);
52980
+ if (isExternalLink && value && URL) {
52981
+ return /* @__PURE__ */ React76__default.default.createElement(
52982
+ coreReact.Typography,
52983
+ {
52984
+ ...typographyProps,
52985
+ className,
52986
+ style: { display: "flex", alignItems: "center", gap: "5px" }
52987
+ },
52988
+ internalValue,
52989
+ /* @__PURE__ */ React76__default.default.createElement(
52990
+ coreIcons.ExternalLink,
52991
+ {
52992
+ cursor: "pointer",
52993
+ size: "sm",
52994
+ onClick: () => window.open(URL, "_blank")
52995
+ }
52996
+ )
52997
+ );
52998
+ }
52973
52999
  return URL ? /* @__PURE__ */ React76__default.default.createElement(coreReact.Typography, { ...typographyProps, className }, /* @__PURE__ */ React76__default.default.createElement(coreReact.Link, { href: URL }, internalValue)) : /* @__PURE__ */ React76__default.default.createElement(coreReact.Typography, { ...typographyProps }, internalValue);
52974
53000
  };
52975
53001
  var LinkCellRenderer = withDataTableRenderer(
@@ -52997,9 +53023,10 @@ var InternalNumberCellRenderer = ({ columnDefinition, rowPinned, isGroup, value
52997
53023
  }
52998
53024
  return /* @__PURE__ */ React76__default.default.createElement(React76__default.default.Fragment, null);
52999
53025
  }
53000
- const internalValue = labsFinancialsUtils.formatNumber(value, {
53026
+ const internalValue = format.format(value, {
53001
53027
  maxDecimalPrecision: 15,
53002
53028
  minDecimalPrecision: 0,
53029
+ shouldUseGtk: true,
53003
53030
  symbol: "",
53004
53031
  ...columnDefinition.cellRendererParams?.formatConfig
53005
53032
  });
@@ -53380,7 +53407,7 @@ var Renderer9 = ({
53380
53407
  value,
53381
53408
  rowPinned
53382
53409
  }) => {
53383
- const { getColor } = columnDefinition.cellRendererParams;
53410
+ const { getColor, displayAsPill } = columnDefinition.cellRendererParams;
53384
53411
  const I18n = coreReact.useI18nContext();
53385
53412
  if (isEmptyValue(value)) {
53386
53413
  if (isGroup) {
@@ -53406,7 +53433,7 @@ var Renderer9 = ({
53406
53433
  const typographyProps = getCellValueTypographyProps(
53407
53434
  columnDefinition.cellRendererParams?.typographyProps
53408
53435
  );
53409
- if (isGroup || rowPinned && columnDefinition.aggFunc) {
53436
+ if ((isGroup || rowPinned && columnDefinition.aggFunc) && !displayAsPill) {
53410
53437
  return /* @__PURE__ */ React76__default.default.createElement(coreReact.Typography, { ...typographyProps, weight: "semibold" }, label);
53411
53438
  }
53412
53439
  return /* @__PURE__ */ React76__default.default.createElement(coreReact.Pill, { color: getColor(value), className: cx10("pill-cell") }, label);
@@ -54810,8 +54837,8 @@ function transformToExcelStyles(excelDataFormats) {
54810
54837
  if (excelDataFormats === void 0) {
54811
54838
  return void 0;
54812
54839
  }
54813
- return excelDataFormats.map((format) => {
54814
- const { id, ...rest } = format;
54840
+ return excelDataFormats.map((format2) => {
54841
+ const { id, ...rest } = format2;
54815
54842
  return {
54816
54843
  id: toExcelCellClass(id),
54817
54844
  ...rest
@@ -55867,6 +55894,8 @@ var DataTableCellRenderer = ({
55867
55894
  value
55868
55895
  };
55869
55896
  const hasValue = value !== void 0 && value !== null && value !== "";
55897
+ const isSelectCellComponent = columnDefinition.cellEditor?.render?.displayName === "SelectCellEditor";
55898
+ const URL = isSelectCellComponent && columnDefinition?.cellRendererParams?.getURL ? columnDefinition.cellRendererParams.getURL(value) : null;
55870
55899
  const startEditing = React76.useCallback(
55871
55900
  () => api.startEditingCell({
55872
55901
  rowIndex: node.rowIndex,
@@ -55874,34 +55903,54 @@ var DataTableCellRenderer = ({
55874
55903
  }),
55875
55904
  [column2, node]
55876
55905
  );
55877
- return /* @__PURE__ */ React76__default.default.createElement(React76__default.default.Fragment, null, shouldDisplayRowCheckbox(columnApi, column2, node) && /* @__PURE__ */ React76__default.default.createElement(coreReact.Box, { paddingLeft: "sm" }, /* @__PURE__ */ React76__default.default.createElement(RowCheckbox, { api, data, node })), columnDefinition.editable ? /* @__PURE__ */ React76__default.default.createElement(
55878
- PseudoInlineEditorWrapper,
55879
- {
55880
- showArrow: editorType === "select",
55881
- onClick: startEditing,
55882
- onClear: columnDefinition.cellEditorParams?.clearable && hasValue ? () => {
55883
- setValue?.(null);
55884
- } : void 0,
55885
- showCalendar: editorType === "date",
55886
- rightAligned: colDef.type === "rightAligned",
55887
- hasValue,
55888
- alwaysShowEditors: columnDefinition.cellEditorParams?.alwaysShowPseudoEditors,
55889
- ...validationOutput
55890
- },
55891
- /* @__PURE__ */ React76__default.default.createElement(Component4, { ...componentParams })
55892
- ) : /* @__PURE__ */ React76__default.default.createElement(
55893
- NonEditorWrapper,
55906
+ return /* @__PURE__ */ React76__default.default.createElement(React76__default.default.Fragment, null, shouldDisplayRowCheckbox(columnApi, column2, node) && /* @__PURE__ */ React76__default.default.createElement(coreReact.Box, { paddingLeft: "sm" }, /* @__PURE__ */ React76__default.default.createElement(RowCheckbox, { api, data, node })), /* @__PURE__ */ React76__default.default.createElement(
55907
+ coreReact.Flex,
55894
55908
  {
55895
- rightAligned: colDef.type === "rightAligned",
55896
- ...validationOutput,
55897
- rowPinned: Boolean(componentParams.rowPinned),
55898
- isGroup: Boolean(componentParams.isGroup)
55909
+ gap: "5px",
55910
+ alignItems: "center",
55911
+ justifyContent: "center",
55912
+ style: { width: "100%" }
55899
55913
  },
55900
- /* @__PURE__ */ React76__default.default.createElement(
55901
- Component4,
55914
+ columnDefinition.editable ? /* @__PURE__ */ React76__default.default.createElement(
55915
+ PseudoInlineEditorWrapper,
55916
+ {
55917
+ showArrow: editorType === "select",
55918
+ onClick: startEditing,
55919
+ onClear: columnDefinition.cellEditorParams?.clearable && hasValue ? () => {
55920
+ setValue?.(null);
55921
+ } : void 0,
55922
+ showCalendar: editorType === "date",
55923
+ rightAligned: colDef.type === "rightAligned",
55924
+ hasValue,
55925
+ alwaysShowEditors: columnDefinition.cellEditorParams?.alwaysShowPseudoEditors,
55926
+ ...validationOutput
55927
+ },
55928
+ /* @__PURE__ */ React76__default.default.createElement(Component4, { ...componentParams })
55929
+ ) : /* @__PURE__ */ React76__default.default.createElement(
55930
+ NonEditorWrapper,
55902
55931
  {
55903
- ...componentParams,
55904
- tableRef: columnDefinition.cellRendererParams.tableRef
55932
+ rightAligned: colDef.type === "rightAligned",
55933
+ ...validationOutput,
55934
+ rowPinned: Boolean(componentParams.rowPinned),
55935
+ isGroup: Boolean(componentParams.isGroup)
55936
+ },
55937
+ /* @__PURE__ */ React76__default.default.createElement(
55938
+ Component4,
55939
+ {
55940
+ ...componentParams,
55941
+ tableRef: columnDefinition.cellRendererParams.tableRef
55942
+ }
55943
+ )
55944
+ ),
55945
+ URL && /* @__PURE__ */ React76__default.default.createElement(
55946
+ coreIcons.ExternalLink,
55947
+ {
55948
+ cursor: "pointer",
55949
+ size: "sm",
55950
+ onClick: (e) => {
55951
+ e.stopPropagation();
55952
+ window.open(URL, "_blank");
55953
+ }
55905
55954
  }
55906
55955
  )
55907
55956
  ));
@@ -61443,14 +61492,14 @@ var protection_default = protection;
61443
61492
  // ../../node_modules/@ag-grid-enterprise/excel-export/dist/esm/es6/excelExport/files/xml/styles/numberFormat.mjs
61444
61493
  var numberFormat = {
61445
61494
  getTemplate(styleProperties) {
61446
- const { format } = styleProperties.numberFormat;
61495
+ const { format: format2 } = styleProperties.numberFormat;
61447
61496
  return {
61448
61497
  name: "NumberFormat",
61449
61498
  properties: {
61450
61499
  prefixedAttributes: [{
61451
61500
  prefix: "ss:",
61452
61501
  map: {
61453
- Format: format
61502
+ Format: format2
61454
61503
  }
61455
61504
  }]
61456
61505
  }
@@ -63401,15 +63450,15 @@ var registerFill = (fill) => {
63401
63450
  }
63402
63451
  return pos;
63403
63452
  };
63404
- var registerNumberFmt = (format) => {
63405
- format = _.utf8_encode(format);
63406
- if (numberFormatMap[format]) {
63407
- return numberFormatMap[format];
63453
+ var registerNumberFmt = (format2) => {
63454
+ format2 = _.utf8_encode(format2);
63455
+ if (numberFormatMap[format2]) {
63456
+ return numberFormatMap[format2];
63408
63457
  }
63409
- let pos = registeredNumberFmts.findIndex((currentFormat) => currentFormat.formatCode === format);
63458
+ let pos = registeredNumberFmts.findIndex((currentFormat) => currentFormat.formatCode === format2);
63410
63459
  if (pos === -1) {
63411
63460
  pos = registeredNumberFmts.length + 164;
63412
- registeredNumberFmts.push({ formatCode: format, numFmtId: pos });
63461
+ registeredNumberFmts.push({ formatCode: format2, numFmtId: pos });
63413
63462
  } else {
63414
63463
  pos = registeredNumberFmts[pos].numFmtId;
63415
63464
  }
@@ -80529,44 +80578,73 @@ function generateHTMLString({
80529
80578
  if (exportedDocument.querySelector(".ag-header-container") && showTableHeaderOnEveryPage) {
80530
80579
  const tableHeaderStylesElement = exportedDocument.createElement("style");
80531
80580
  tableHeaderStylesElement.innerHTML = `
80581
+ /* Original header styles */
80532
80582
  .ag-header-container {
80533
80583
  height: ${TABLE_HEADER_HEIGHT}px;
80534
80584
  background: ${coreReact.colors.gray96};
80535
80585
  border-bottom: 1px solid #d6dadc;
80536
- break-before: page;
80586
+ }
80587
+ /* Cloned header styles */
80588
+ .paginated-header {
80589
+ height: ${TABLE_HEADER_HEIGHT}px;
80590
+ background: ${coreReact.colors.gray96};
80591
+ border-bottom: 1px solid #d6dadc;
80592
+ /* Ensure cloned headers start on a new page */
80593
+ page-break-before: always;
80537
80594
  }
80538
80595
  `;
80539
80596
  exportedDocument.head.appendChild(tableHeaderStylesElement);
80540
- const tableHeader = exportedDocument.querySelector(".ag-header-container").cloneNode(true);
80597
+ const tableHeaderElement = exportedDocument.querySelector(
80598
+ ".ag-header-container"
80599
+ );
80600
+ if (!tableHeaderElement) {
80601
+ return reject(new Error("Table header container not found."));
80602
+ }
80603
+ const tableHeader = tableHeaderElement.cloneNode(true);
80604
+ tableHeader.classList.add("paginated-header");
80541
80605
  const tableRowsContainer = exportedDocument.querySelector(
80542
80606
  ".ag-center-cols-container"
80543
80607
  );
80544
- const totalRows = tableRowsContainer.children.length;
80545
- const maxPageContentHeight = pageHeight - pageFormat.marginInPixels.top - pageFormat.marginInPixels.bottom;
80546
- let pageContentHeight = TABLE_HEADER_HEIGHT;
80547
- let currentPage = 1;
80548
- for (let index = 0; index < totalRows; index++) {
80549
- const getScaledRowHeight = (row3) => {
80550
- const scale = pageHeight / tableWidth;
80551
- let rowHeight2 = Number(row3.style.height.replace("px", ""));
80552
- if (scale < 1) {
80553
- rowHeight2 *= scale;
80608
+ if (!tableRowsContainer) {
80609
+ console.error("Table rows container not found.");
80610
+ return;
80611
+ }
80612
+ const allRows = Array.from(
80613
+ tableRowsContainer.children
80614
+ );
80615
+ tableRowsContainer.innerHTML = "";
80616
+ const maxPageContentHeight = pageHeight - (pageFormat.marginInPixels?.top ?? DEFAULT_PAGE_MARGIN) - (pageFormat.marginInPixels?.bottom ?? DEFAULT_PAGE_MARGIN) - TABLE_HEADER_HEIGHT;
80617
+ let currentPageContentHeight = 0;
80618
+ let rowsInCurrentPage = [];
80619
+ let isFirstPage = true;
80620
+ const appendPage = () => {
80621
+ if (rowsInCurrentPage.length > 0) {
80622
+ if (!isFirstPage) {
80623
+ tableRowsContainer.appendChild(tableHeader.cloneNode(true));
80624
+ } else {
80625
+ isFirstPage = false;
80554
80626
  }
80555
- return rowHeight2;
80556
- };
80557
- const row2 = tableRowsContainer.children[index + currentPage - 1];
80558
- const rowHeight = getScaledRowHeight(row2);
80559
- if (pageContentHeight + rowHeight >= maxPageContentHeight) {
80560
- tableRowsContainer.insertBefore(
80561
- tableHeader.cloneNode(true),
80562
- row2
80627
+ rowsInCurrentPage.forEach(
80628
+ (row2) => tableRowsContainer.appendChild(row2)
80563
80629
  );
80564
- currentPage += 1;
80565
- pageContentHeight = TABLE_HEADER_HEIGHT;
80566
- } else {
80567
- pageContentHeight += rowHeight;
80630
+ rowsInCurrentPage = [];
80631
+ currentPageContentHeight = 0;
80568
80632
  }
80569
- }
80633
+ };
80634
+ allRows.forEach((row2) => {
80635
+ let rowHeight = parseFloat(row2.style.height.replace("px", "")) || row2.offsetHeight;
80636
+ const scale = pageHeight / tableWidth;
80637
+ if (scale < 1) {
80638
+ rowHeight *= scale;
80639
+ }
80640
+ if (currentPageContentHeight + rowHeight > maxPageContentHeight) {
80641
+ appendPage();
80642
+ isFirstPage = false;
80643
+ }
80644
+ rowsInCurrentPage.push(row2);
80645
+ currentPageContentHeight += rowHeight;
80646
+ });
80647
+ appendPage();
80570
80648
  }
80571
80649
  resolve(exportedDocument.getElementsByTagName("html")[0].outerHTML);
80572
80650
  }, 2e3);
@@ -303,6 +303,7 @@ declare const GroupCellRenderer: React$1.FC<any>;
303
303
  interface LinkCellRendererParams<TValue> {
304
304
  typographyProps?: TypographyProps;
305
305
  getURL: (value: TValue, data: any) => string;
306
+ isExternalLink?: boolean;
306
307
  }
307
308
  type LinkCellColumnDefinition<TValue = any> = GranularRequired<ColumnDefinition<TValue, typeof LinkCellRenderer, LinkCellRendererParams<TValue>>, 'cellRendererParams'>;
308
309
  interface LinkCellRendererProps<TValue = any> extends DataTableCellRendererProps<TValue, LinkCellColumnDefinition> {
@@ -385,6 +386,7 @@ declare const PercentCellEditor: React__default.ForwardRefExoticComponent<_ag_gr
385
386
  interface PillCellRendererParams<TValue> {
386
387
  getColor: (item: TValue) => PillColor;
387
388
  typographyProps?: TypographyProps;
389
+ displayAsPill?: boolean;
388
390
  }
389
391
  type PillCellColumnDefinition<TValue = any, TFilterOption = any, TFilterValue = number | string> = GranularRequired<ColumnDefinition<TValue, typeof PillCellRenderer, PillCellRendererParams<TValue>, typeof PillSelectCellEditor, PillCellEditorParams<TValue>, TFilterOption, TFilterValue>, 'cellRendererParams'>;
390
392
  interface PillCellRendererProps<TValue = any> extends DataTableCellRendererProps<TValue, PillCellColumnDefinition<TValue>> {
@@ -403,6 +405,7 @@ declare const PillSelectCellEditor: React__default.ForwardRefExoticComponent<_ag
403
405
 
404
406
  type SelectCellColumnDefinition<TValue = any, TFilterOption = any, TFilterValue = number | string> = GranularRequired<ColumnDefinition<TValue, typeof SelectCellRenderer, {
405
407
  typographyProps?: TypographyProps;
408
+ getURL?: (value: TValue) => string | null;
406
409
  }, typeof SelectCellEditor, SelectCellEditorParams<TValue>, TFilterOption, TFilterValue, 'select', SelectBulkEditorParams>, 'cellEditor' | 'cellEditorParams'>;
407
410
  interface SelectCellRendererProps<TValue = any> extends DataTableCellRendererProps<TValue, SelectCellColumnDefinition<TValue>> {
408
411
  }
@@ -303,6 +303,7 @@ declare const GroupCellRenderer: React$1.FC<any>;
303
303
  interface LinkCellRendererParams<TValue> {
304
304
  typographyProps?: TypographyProps;
305
305
  getURL: (value: TValue, data: any) => string;
306
+ isExternalLink?: boolean;
306
307
  }
307
308
  type LinkCellColumnDefinition<TValue = any> = GranularRequired<ColumnDefinition<TValue, typeof LinkCellRenderer, LinkCellRendererParams<TValue>>, 'cellRendererParams'>;
308
309
  interface LinkCellRendererProps<TValue = any> extends DataTableCellRendererProps<TValue, LinkCellColumnDefinition> {
@@ -385,6 +386,7 @@ declare const PercentCellEditor: React__default.ForwardRefExoticComponent<_ag_gr
385
386
  interface PillCellRendererParams<TValue> {
386
387
  getColor: (item: TValue) => PillColor;
387
388
  typographyProps?: TypographyProps;
389
+ displayAsPill?: boolean;
388
390
  }
389
391
  type PillCellColumnDefinition<TValue = any, TFilterOption = any, TFilterValue = number | string> = GranularRequired<ColumnDefinition<TValue, typeof PillCellRenderer, PillCellRendererParams<TValue>, typeof PillSelectCellEditor, PillCellEditorParams<TValue>, TFilterOption, TFilterValue>, 'cellRendererParams'>;
390
392
  interface PillCellRendererProps<TValue = any> extends DataTableCellRendererProps<TValue, PillCellColumnDefinition<TValue>> {
@@ -403,6 +405,7 @@ declare const PillSelectCellEditor: React__default.ForwardRefExoticComponent<_ag
403
405
 
404
406
  type SelectCellColumnDefinition<TValue = any, TFilterOption = any, TFilterValue = number | string> = GranularRequired<ColumnDefinition<TValue, typeof SelectCellRenderer, {
405
407
  typographyProps?: TypographyProps;
408
+ getURL?: (value: TValue) => string | null;
406
409
  }, typeof SelectCellEditor, SelectCellEditorParams<TValue>, TFilterOption, TFilterValue, 'select', SelectBulkEditorParams>, 'cellEditor' | 'cellEditorParams'>;
407
410
  interface SelectCellRendererProps<TValue = any> extends DataTableCellRendererProps<TValue, SelectCellColumnDefinition<TValue>> {
408
411
  }