@procore/data-table 14.32.0 → 14.34.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.
@@ -12,6 +12,7 @@ var labsFinancialsUtils = require('@procore/labs-financials-utils');
12
12
  var styled4 = require('styled-components');
13
13
  var format = require('@procore/labs-financials-utils/dist/format');
14
14
  var ulid$1 = require('ulid');
15
+ var cdnTranslations = require('@procore/cdn-translations');
15
16
  var toastAlert = require('@procore/toast-alert');
16
17
  var ReactDOM = require('react-dom');
17
18
  var server = require('react-dom/server');
@@ -7997,32 +7998,15 @@ var styles_default = {
7997
7998
  "spin": "_spin_if78k_1"
7998
7999
  };
7999
8000
 
8000
- // src/utils/getCellValueTypographyProps.ts
8001
- function getCellValueTypographyProps(typographyProps) {
8002
- return {
8003
- intent: "small",
8004
- ...typographyProps ?? {}
8005
- };
8006
- }
8007
-
8008
8001
  // src/CellRenderers/BooleanCell.tsx
8009
8002
  var cx = classnames__default.default.bind(styles_default);
8010
- var InternalBooleanCellRenderer = ({ columnDefinition, isGroup, value }) => {
8011
- var _a;
8003
+ var InternalBooleanCellRenderer = ({ isGroup, value, typographyProps }) => {
8012
8004
  const I18n = coreReact.useI18nContext();
8013
8005
  const internalValue = value ? I18n.t("dataTable.cells.booleanCell.options.yes") : I18n.t("dataTable.cells.booleanCell.options.no");
8014
8006
  if (isGroup) {
8015
8007
  return null;
8016
8008
  }
8017
- return /* @__PURE__ */ React80__default.default.createElement(
8018
- coreReact.Typography,
8019
- {
8020
- ...getCellValueTypographyProps(
8021
- (_a = columnDefinition.cellRendererParams) == null ? void 0 : _a.typographyProps
8022
- )
8023
- },
8024
- internalValue
8025
- );
8009
+ return /* @__PURE__ */ React80__default.default.createElement(coreReact.Typography, { ...typographyProps }, internalValue);
8026
8010
  };
8027
8011
  var BooleanCellRenderer = withDataTableRenderer(
8028
8012
  InternalBooleanCellRenderer,
@@ -8063,12 +8047,13 @@ var BooleanCellEditor = withDataTableEditor(
8063
8047
  var Renderer = ({
8064
8048
  columnDefinition,
8065
8049
  rowPinned,
8050
+ buttons,
8066
8051
  ...props
8067
8052
  }) => {
8068
8053
  if (rowPinned) {
8069
8054
  return null;
8070
8055
  }
8071
- return /* @__PURE__ */ React80__default.default.createElement(coreReact.FlexList, { justifyContent: "center", alignItems: "center", size: "xs" }, columnDefinition.cellRendererParams.buttons.map((Button6) => /* @__PURE__ */ React80__default.default.createElement(
8056
+ return /* @__PURE__ */ React80__default.default.createElement(coreReact.FlexList, { justifyContent: "center", alignItems: "center", size: "xs" }, buttons.map((Button6) => /* @__PURE__ */ React80__default.default.createElement(
8072
8057
  Button6,
8073
8058
  {
8074
8059
  key: Button6.displayName,
@@ -8170,12 +8155,13 @@ function ContactItem({
8170
8155
 
8171
8156
  // src/CellRenderers/CompanyCell.tsx
8172
8157
  var Renderer2 = ({
8173
- columnDefinition,
8174
8158
  rowHeight,
8175
8159
  isGroup,
8176
- value
8160
+ value,
8161
+ getCompanyName,
8162
+ getImageURL,
8163
+ typographyProps
8177
8164
  }) => {
8178
- var _a, _b, _c, _d, _e;
8179
8165
  const [showAvatar, setShowAvatar] = React80__default.default.useState(false);
8180
8166
  React80__default.default.useEffect(() => {
8181
8167
  setShowAvatar(rowHeight === rowSize.lg || rowHeight === rowSize.md);
@@ -8183,18 +8169,9 @@ var Renderer2 = ({
8183
8169
  if (value === void 0 || value === null) {
8184
8170
  return null;
8185
8171
  }
8186
- const companyName = isGroup ? value : ((_b = (_a = columnDefinition.cellRendererParams) == null ? void 0 : _a.getCompanyName) == null ? void 0 : _b.call(_a, value)) ?? value.name;
8187
- const imageURL = (_d = (_c = columnDefinition.cellRendererParams) == null ? void 0 : _c.getImageURL) == null ? void 0 : _d.call(_c, value);
8188
- return isGroup ? /* @__PURE__ */ React80__default.default.createElement(
8189
- coreReact.Typography,
8190
- {
8191
- ...getCellValueTypographyProps(
8192
- (_e = columnDefinition.cellRendererParams) == null ? void 0 : _e.typographyProps
8193
- ),
8194
- weight: "semibold"
8195
- },
8196
- companyName
8197
- ) : /* @__PURE__ */ React80__default.default.createElement(
8172
+ const companyName = isGroup ? value : (getCompanyName == null ? void 0 : getCompanyName(value)) ?? value.name;
8173
+ const imageURL = getImageURL == null ? void 0 : getImageURL(value);
8174
+ return isGroup ? /* @__PURE__ */ React80__default.default.createElement(coreReact.Typography, { ...typographyProps, weight: "semibold" }, companyName) : /* @__PURE__ */ React80__default.default.createElement(
8198
8175
  ContactItem,
8199
8176
  {
8200
8177
  imageUrl: showAvatar ? imageURL : void 0,
@@ -8229,29 +8206,19 @@ var Renderer3 = ({
8229
8206
  columnDefinition,
8230
8207
  isGroup,
8231
8208
  rowPinned,
8232
- value
8209
+ value,
8210
+ typographyProps,
8211
+ formatConfig,
8212
+ inputProps
8233
8213
  }) => {
8234
- var _a, _b, _c, _d, _e, _f, _g;
8235
8214
  const I18n = coreReact.useI18nContext();
8236
- const internalValue = value !== void 0 && labsFinancialsUtils.formatCurrency(
8237
- value == null ? void 0 : value.toString(),
8238
- (_a = columnDefinition.cellRendererParams) == null ? void 0 : _a.formatConfig
8239
- ) || void 0;
8215
+ const internalValue = value !== void 0 && labsFinancialsUtils.formatCurrency(value == null ? void 0 : value.toString(), formatConfig) || void 0;
8240
8216
  if (isEmptyValue(value)) {
8241
8217
  if (isGroup) {
8242
8218
  return null;
8243
8219
  }
8244
8220
  if (columnDefinition.editable) {
8245
- return /* @__PURE__ */ React80__default.default.createElement(
8246
- coreReact.Typography,
8247
- {
8248
- ...getCellValueTypographyProps(
8249
- (_b = columnDefinition.cellRendererParams) == null ? void 0 : _b.typographyProps
8250
- ),
8251
- className: cx3("input-placeholder")
8252
- },
8253
- ((_d = (_c = columnDefinition.cellEditorParams) == null ? void 0 : _c.inputProps) == null ? void 0 : _d.placeholder) || I18n.t("dataTable.cells.currencyCell.placeholder")
8254
- );
8221
+ return /* @__PURE__ */ React80__default.default.createElement(coreReact.Typography, { ...typographyProps, className: cx3("input-placeholder") }, (inputProps == null ? void 0 : inputProps.placeholder) || I18n.t("dataTable.cells.currencyCell.placeholder"));
8255
8222
  }
8256
8223
  }
8257
8224
  if (isGroup) {
@@ -8268,10 +8235,8 @@ var Renderer3 = ({
8268
8235
  return /* @__PURE__ */ React80__default.default.createElement(
8269
8236
  coreReact.Typography,
8270
8237
  {
8271
- ...getCellValueTypographyProps(
8272
- (_e = columnDefinition.cellRendererParams) == null ? void 0 : _e.typographyProps
8273
- ),
8274
- weight: rowPinned ? "bold" : (_g = (_f = columnDefinition.cellRendererParams) == null ? void 0 : _f.typographyProps) == null ? void 0 : _g.weight,
8238
+ ...typographyProps,
8239
+ weight: rowPinned ? "bold" : typographyProps == null ? void 0 : typographyProps.weight,
8275
8240
  className: cx3("tabular-nums")
8276
8241
  },
8277
8242
  internalValue
@@ -8279,8 +8244,15 @@ var Renderer3 = ({
8279
8244
  };
8280
8245
  var CurrencyCellRenderer = withDataTableRenderer(Renderer3, "input");
8281
8246
  var Editor = React80__default.default.forwardRef(
8282
- ({ columnDefinition, eventKey, stopEditing, value }, ref) => {
8283
- var _a, _b, _c, _d, _e;
8247
+ ({
8248
+ columnDefinition,
8249
+ eventKey,
8250
+ stopEditing,
8251
+ value,
8252
+ formatConfig,
8253
+ inputProps
8254
+ }, ref) => {
8255
+ var _a;
8284
8256
  const I18n = coreReact.useI18nContext();
8285
8257
  if (isEmptyValue(value) && !columnDefinition.editable) {
8286
8258
  return null;
@@ -8289,19 +8261,20 @@ var Editor = React80__default.default.forwardRef(
8289
8261
  stopEditing(ensureIsHTMLElement(event.relatedTarget));
8290
8262
  }
8291
8263
  const defaultValue = eventKey ? value : labsFinancialsUtils.formatNumber(value, {
8292
- ...((_a = columnDefinition.cellEditorParams) == null ? void 0 : _a.formatConfig) ?? ((_b = columnDefinition.cellRendererParams) == null ? void 0 : _b.formatConfig) ?? {},
8264
+ ...formatConfig || ((_a = columnDefinition.cellRendererParams) == null ? void 0 : _a.formatConfig),
8265
+ //TODO remove usage of columnDefinition.cellRendererParams in next major version
8293
8266
  symbol: void 0,
8294
8267
  symbolAfterValue: void 0
8295
8268
  });
8296
8269
  return /* @__PURE__ */ React80__default.default.createElement(
8297
8270
  coreReact.Input,
8298
8271
  {
8299
- placeholder: ((_d = (_c = columnDefinition.cellEditorParams) == null ? void 0 : _c.inputProps) == null ? void 0 : _d.placeholder) || I18n.t("dataTable.cells.currencyCell.placeholder"),
8272
+ placeholder: (inputProps == null ? void 0 : inputProps.placeholder) || I18n.t("dataTable.cells.currencyCell.placeholder"),
8300
8273
  defaultValue,
8301
8274
  onBlur,
8302
8275
  ref,
8303
8276
  className: cx3("input-cell", "input-cell--right-aligned"),
8304
- ...((_e = columnDefinition.cellEditorParams) == null ? void 0 : _e.inputProps) || {}
8277
+ ...inputProps
8305
8278
  }
8306
8279
  );
8307
8280
  }
@@ -8715,6 +8688,14 @@ var DateFilterTokenText = ({
8715
8688
  };
8716
8689
  var DateFilterRenderer_default = DateFilterRenderer;
8717
8690
 
8691
+ // src/utils/getCellValueTypographyProps.ts
8692
+ function getCellValueTypographyProps(typographyProps) {
8693
+ return {
8694
+ intent: "small",
8695
+ ...typographyProps
8696
+ };
8697
+ }
8698
+
8718
8699
  // src/CellRenderers/DateCell.tsx
8719
8700
  var cx4 = classnames__default.default.bind(styles_default);
8720
8701
  function getDateObject(date) {
@@ -8804,39 +8785,32 @@ function getDateObject2(date) {
8804
8785
  return date;
8805
8786
  }
8806
8787
  var DateTimeCellValue = ({
8807
- columnDefinition,
8808
8788
  isGroup,
8809
- value
8789
+ value,
8790
+ typographyProps,
8791
+ dateFormatType
8810
8792
  }) => {
8811
- var _a, _b;
8812
8793
  const { format: format3 } = coreReact.useDateTime();
8813
8794
  if (isGroup || isEmptyValue(value)) {
8814
8795
  return null;
8815
8796
  }
8816
8797
  const parsedValue = getDateObject2(value);
8817
- const internalValue = parsedValue ? format3(
8818
- parsedValue,
8819
- ((_a = columnDefinition.cellRendererParams) == null ? void 0 : _a.dateFormatType) || "abbr-weekday-abbr-date-at-time"
8820
- ) : void 0;
8821
- const typographyProps = getCellValueTypographyProps(
8822
- (_b = columnDefinition.cellRendererParams) == null ? void 0 : _b.typographyProps
8823
- );
8798
+ const internalValue = parsedValue ? format3(parsedValue, dateFormatType || "abbr-weekday-abbr-date-at-time") : void 0;
8824
8799
  return /* @__PURE__ */ React80__default.default.createElement(coreReact.Typography, { ...typographyProps }, internalValue);
8825
8800
  };
8826
8801
  var Renderer5 = (props) => {
8827
- var _a, _b;
8828
- return /* @__PURE__ */ React80__default.default.createElement(
8829
- OptionalDateTimeProvider,
8830
- {
8831
- timeZone: (_b = (_a = props.columnDefinition) == null ? void 0 : _a.cellRendererParams) == null ? void 0 : _b.timeZone
8832
- },
8833
- /* @__PURE__ */ React80__default.default.createElement(DateTimeCellValue, { ...props })
8834
- );
8802
+ return /* @__PURE__ */ React80__default.default.createElement(OptionalDateTimeProvider, { timeZone: props.timeZone }, /* @__PURE__ */ React80__default.default.createElement(DateTimeCellValue, { ...props }));
8835
8803
  };
8836
8804
  var DateTimeCellRenderer = withDataTableRenderer(Renderer5, "date");
8837
8805
  var Editor3 = React80__default.default.forwardRef(
8838
- ({ columnDefinition, setDataValue, stopEditing, value }, ref) => {
8839
- var _a, _b;
8806
+ ({
8807
+ columnDefinition,
8808
+ setDataValue,
8809
+ stopEditing,
8810
+ value,
8811
+ timeZone,
8812
+ disabledDate
8813
+ }, ref) => {
8840
8814
  function afterHide(event) {
8841
8815
  stopEditing(ensureIsHTMLElement(event == null ? void 0 : event.target));
8842
8816
  }
@@ -8847,23 +8821,17 @@ var Editor3 = React80__default.default.forwardRef(
8847
8821
  setDataValue(columnDefinition.field, void 0);
8848
8822
  }
8849
8823
  }
8850
- return /* @__PURE__ */ React80__default.default.createElement(
8851
- OptionalDateTimeProvider,
8824
+ return /* @__PURE__ */ React80__default.default.createElement(OptionalDateTimeProvider, { timeZone }, /* @__PURE__ */ React80__default.default.createElement(
8825
+ coreReact.DateSelect,
8852
8826
  {
8853
- timeZone: (_a = columnDefinition.cellEditorParams) == null ? void 0 : _a.timeZone
8854
- },
8855
- /* @__PURE__ */ React80__default.default.createElement(
8856
- coreReact.DateSelect,
8857
- {
8858
- afterHide,
8859
- className: cx5("input-cell"),
8860
- disabledDate: (_b = columnDefinition.cellEditorParams) == null ? void 0 : _b.disabledDate,
8861
- onChange,
8862
- ref,
8863
- value: getDateObject2(value)
8864
- }
8865
- )
8866
- );
8827
+ afterHide,
8828
+ className: cx5("input-cell"),
8829
+ disabledDate,
8830
+ onChange,
8831
+ ref,
8832
+ value: getDateObject2(value)
8833
+ }
8834
+ ));
8867
8835
  }
8868
8836
  );
8869
8837
  var DateTimeCellEditor = withDataTableEditor(Editor3, "date");
@@ -52389,16 +52357,22 @@ globalObj.MouseEvent = typeof MouseEvent === "undefined" ? {} : MouseEvent;
52389
52357
  var GroupCellRenderer2 = GroupCellRenderer;
52390
52358
  var cx6 = classnames__default.default.bind(truncation_default);
52391
52359
  var MIN_LINK_WIDTH = 48;
52392
- var InternalLinkCellRenderer = ({ columnDefinition, isGroup, data, rowHeight, value }) => {
52393
- var _a, _b, _c, _d;
52360
+ var InternalLinkCellRenderer = ({
52361
+ columnDefinition,
52362
+ isGroup,
52363
+ data,
52364
+ rowHeight,
52365
+ value,
52366
+ typographyProps,
52367
+ isExternalLink,
52368
+ getURL
52369
+ }) => {
52370
+ var _a;
52394
52371
  const [isLinkWidthBelowMin, setIsLinkWidthBelowMin] = React80.useState(false);
52395
52372
  const linkRef = React80.useRef(null);
52396
52373
  const internalValue = value ? (_a = columnDefinition.getStringFormattedValue) == null ? void 0 : _a.call(columnDefinition, value) : "";
52397
- const typographyProps = getCellValueTypographyProps(
52398
- (_b = columnDefinition.cellRendererParams) == null ? void 0 : _b.typographyProps
52399
- );
52400
52374
  const className = cx6(
52401
- (_d = (_c = columnDefinition.cellRendererParams) == null ? void 0 : _c.typographyProps) == null ? void 0 : _d.className,
52375
+ typographyProps == null ? void 0 : typographyProps.className,
52402
52376
  "textCell",
52403
52377
  "truncatingText",
52404
52378
  {
@@ -52416,8 +52390,7 @@ var InternalLinkCellRenderer = ({ columnDefinition, isGroup, data, rowHeight, va
52416
52390
  setIsLinkWidthBelowMin(width < MIN_LINK_WIDTH);
52417
52391
  }
52418
52392
  }, [internalValue]);
52419
- const isExternalLink = columnDefinition.cellRendererParams.isExternalLink ?? false;
52420
- const URL = columnDefinition.cellRendererParams.getURL(value, data);
52393
+ const URL = getURL(value, data);
52421
52394
  const extendClickableAreaClassNames = isLinkWidthBelowMin ? cx6("extendClickableArea", {
52422
52395
  "extendClickableArea--rowHeightSm": rowHeight === rowSize.sm
52423
52396
  }) : "";
@@ -52447,24 +52420,22 @@ var LinkCellRenderer = withDataTableRenderer(
52447
52420
  "input"
52448
52421
  );
52449
52422
  var cx7 = classnames__default.default.bind(styles_default);
52450
- var InternalNumberCellRenderer = ({ columnDefinition, rowPinned, isGroup, value }) => {
52451
- var _a, _b, _c, _d, _e, _f, _g;
52423
+ var InternalNumberCellRenderer = ({
52424
+ columnDefinition,
52425
+ rowPinned,
52426
+ isGroup,
52427
+ value,
52428
+ typographyProps,
52429
+ inputProps,
52430
+ formatConfig
52431
+ }) => {
52452
52432
  const I18n = coreReact.useI18nContext();
52453
52433
  if (isEmptyValue(value)) {
52454
52434
  if (isGroup) {
52455
52435
  return null;
52456
52436
  }
52457
52437
  if (columnDefinition.editable) {
52458
- return /* @__PURE__ */ React80__default.default.createElement(
52459
- coreReact.Typography,
52460
- {
52461
- ...getCellValueTypographyProps(
52462
- (_a = columnDefinition.cellRendererParams) == null ? void 0 : _a.typographyProps
52463
- ),
52464
- className: cx7("input-placeholder")
52465
- },
52466
- ((_c = (_b = columnDefinition.cellEditorParams) == null ? void 0 : _b.inputProps) == null ? void 0 : _c.placeholder) || I18n.t("dataTable.cells.numberCell.placeholder")
52467
- );
52438
+ return /* @__PURE__ */ React80__default.default.createElement(coreReact.Typography, { ...typographyProps, className: cx7("input-placeholder") }, (inputProps == null ? void 0 : inputProps.placeholder) || I18n.t("dataTable.cells.numberCell.placeholder"));
52468
52439
  }
52469
52440
  return /* @__PURE__ */ React80__default.default.createElement(React80__default.default.Fragment, null);
52470
52441
  }
@@ -52473,7 +52444,7 @@ var InternalNumberCellRenderer = ({ columnDefinition, rowPinned, isGroup, value
52473
52444
  minDecimalPrecision: 0,
52474
52445
  shouldUseGtk: true,
52475
52446
  symbol: "",
52476
- ...(_d = columnDefinition.cellRendererParams) == null ? void 0 : _d.formatConfig
52447
+ ...formatConfig
52477
52448
  });
52478
52449
  if (isGroup) {
52479
52450
  return /* @__PURE__ */ React80__default.default.createElement(coreReact.Typography, { intent: "small", weight: "semibold" }, internalValue);
@@ -52481,10 +52452,8 @@ var InternalNumberCellRenderer = ({ columnDefinition, rowPinned, isGroup, value
52481
52452
  return /* @__PURE__ */ React80__default.default.createElement(
52482
52453
  coreReact.Typography,
52483
52454
  {
52484
- ...getCellValueTypographyProps(
52485
- (_e = columnDefinition.cellRendererParams) == null ? void 0 : _e.typographyProps
52486
- ),
52487
- weight: rowPinned ? "bold" : (_g = (_f = columnDefinition.cellRendererParams) == null ? void 0 : _f.typographyProps) == null ? void 0 : _g.weight
52455
+ ...typographyProps,
52456
+ weight: rowPinned ? "bold" : typographyProps == null ? void 0 : typographyProps.weight
52488
52457
  },
52489
52458
  internalValue
52490
52459
  );
@@ -52493,8 +52462,7 @@ var NumberCellRenderer = withDataTableRenderer(
52493
52462
  InternalNumberCellRenderer,
52494
52463
  "input"
52495
52464
  );
52496
- var InternalNumberCellEditor = React80__default.default.forwardRef(({ columnDefinition, stopEditing, value }, ref) => {
52497
- var _a, _b, _c;
52465
+ var InternalNumberCellEditor = React80__default.default.forwardRef(({ columnDefinition, stopEditing, value, inputProps }, ref) => {
52498
52466
  const I18n = coreReact.useI18nContext();
52499
52467
  if (isEmptyValue(value) && !columnDefinition.editable) {
52500
52468
  return null;
@@ -52505,13 +52473,13 @@ var InternalNumberCellEditor = React80__default.default.forwardRef(({ columnDefi
52505
52473
  return /* @__PURE__ */ React80__default.default.createElement(
52506
52474
  coreReact.Input,
52507
52475
  {
52508
- placeholder: ((_b = (_a = columnDefinition.cellEditorParams) == null ? void 0 : _a.inputProps) == null ? void 0 : _b.placeholder) || I18n.t("dataTable.cells.numberCell.placeholder"),
52476
+ placeholder: (inputProps == null ? void 0 : inputProps.placeholder) || I18n.t("dataTable.cells.numberCell.placeholder"),
52509
52477
  type: "number",
52510
52478
  defaultValue: value,
52511
52479
  onBlur,
52512
52480
  ref,
52513
52481
  className: cx7("input-cell", "input-cell--right-aligned"),
52514
- ...((_c = columnDefinition.cellEditorParams) == null ? void 0 : _c.inputProps) || {}
52482
+ ...inputProps
52515
52483
  }
52516
52484
  );
52517
52485
  });
@@ -52592,41 +52560,42 @@ var defaultAvatarStackItemFilter = (person) => !!person || !!person.id;
52592
52560
  var Renderer6 = ({
52593
52561
  columnDefinition,
52594
52562
  rowHeight,
52595
- value
52563
+ value,
52564
+ getValue: getValue2,
52565
+ getCompanyName: getCompanyNameParam,
52566
+ getPersonName: getPersonNameParam,
52567
+ getInitials,
52568
+ getImageURL,
52569
+ typographyProps
52596
52570
  }) => {
52597
- var _a, _b, _c, _d, _e, _f, _g;
52571
+ var _a;
52598
52572
  const [fullCellView, setFullCellView] = React80__default.default.useState(false);
52599
52573
  const getPeople = React80__default.default.useCallback(() => {
52600
- var _a2, _b2;
52601
- return ((_b2 = (_a2 = columnDefinition.cellRendererParams) == null ? void 0 : _a2.getValue) == null ? void 0 : _b2.call(_a2, value)) || value || [];
52602
- }, [(_a = columnDefinition.cellRendererParams) == null ? void 0 : _a.getValue, value]);
52574
+ return (getValue2 == null ? void 0 : getValue2(value)) || value || [];
52575
+ }, [getValue2, value]);
52603
52576
  const getCompanyName = React80__default.default.useCallback(
52604
52577
  (person) => {
52605
- var _a2, _b2;
52606
- return ((_b2 = (_a2 = columnDefinition.cellRendererParams) == null ? void 0 : _a2.getCompanyName) == null ? void 0 : _b2.call(_a2, person)) ?? person.company ?? "";
52578
+ return (getCompanyNameParam == null ? void 0 : getCompanyNameParam(person)) ?? person.company ?? "";
52607
52579
  },
52608
- [(_b = columnDefinition.cellRendererParams) == null ? void 0 : _b.getCompanyName]
52580
+ [getCompanyNameParam]
52609
52581
  );
52610
52582
  const getPersonName = React80__default.default.useCallback(
52611
52583
  (person) => {
52612
- var _a2, _b2;
52613
- return ((_b2 = (_a2 = columnDefinition.cellRendererParams) == null ? void 0 : _a2.getPersonName) == null ? void 0 : _b2.call(_a2, person)) ?? person.name ?? "";
52584
+ return (getPersonNameParam == null ? void 0 : getPersonNameParam(person)) ?? person.name ?? "";
52614
52585
  },
52615
- [(_c = columnDefinition.cellRendererParams) == null ? void 0 : _c.getPersonName]
52586
+ [getPersonNameParam]
52616
52587
  );
52617
52588
  const getPersonImageUrl = React80__default.default.useCallback(
52618
52589
  (person) => {
52619
- var _a2, _b2;
52620
- return ((_b2 = (_a2 = columnDefinition.cellRendererParams) == null ? void 0 : _a2.getImageURL) == null ? void 0 : _b2.call(_a2, person)) ?? "";
52590
+ return (getImageURL == null ? void 0 : getImageURL(person)) ?? "";
52621
52591
  },
52622
- [(_d = columnDefinition.cellRendererParams) == null ? void 0 : _d.getImageURL]
52592
+ [getImageURL]
52623
52593
  );
52624
52594
  const getPersonInitials = React80__default.default.useCallback(
52625
52595
  (person) => {
52626
- var _a2, _b2;
52627
- return ((_b2 = (_a2 = columnDefinition.cellRendererParams) == null ? void 0 : _a2.getInitials) == null ? void 0 : _b2.call(_a2, person)) ?? "";
52596
+ return (getInitials == null ? void 0 : getInitials(person)) ?? "";
52628
52597
  },
52629
- [(_e = columnDefinition.cellRendererParams) == null ? void 0 : _e.getInitials]
52598
+ [getInitials]
52630
52599
  );
52631
52600
  const getPersonNameWithCompany = React80__default.default.useCallback(
52632
52601
  (person) => {
@@ -52654,9 +52623,6 @@ var Renderer6 = ({
52654
52623
  }
52655
52624
  return avatarWidth * avatarCount;
52656
52625
  }, [getPeople, rowHeight]);
52657
- const typographyProps = getCellValueTypographyProps(
52658
- (_f = columnDefinition.cellRendererParams) == null ? void 0 : _f.typographyProps
52659
- );
52660
52626
  const people = getPeople();
52661
52627
  if (isEmptyValue(value) || people.length === 0) {
52662
52628
  return null;
@@ -52670,7 +52636,7 @@ var Renderer6 = ({
52670
52636
  type: person.type || "user"
52671
52637
  };
52672
52638
  }).filter(
52673
- ((_g = columnDefinition.cellRendererParams) == null ? void 0 : _g.avatarStackItemFilter) ?? defaultAvatarStackItemFilter
52639
+ ((_a = columnDefinition.cellRendererParams) == null ? void 0 : _a.avatarStackItemFilter) ?? defaultAvatarStackItemFilter
52674
52640
  );
52675
52641
  const isAvatarStackDisplayed = fullCellView && avatarStackItems && !!avatarStackItems.length;
52676
52642
  return /* @__PURE__ */ React80__default.default.createElement(
@@ -52765,31 +52731,21 @@ var Renderer7 = ({
52765
52731
  columnDefinition,
52766
52732
  isGroup,
52767
52733
  rowPinned,
52768
- value
52734
+ value,
52735
+ typographyProps,
52736
+ inputProps,
52737
+ formatConfig
52769
52738
  }) => {
52770
- var _a, _b, _c, _d, _e, _f, _g;
52771
52739
  const I18n = coreReact.useI18nContext();
52772
52740
  if (isEmptyValue(value)) {
52773
52741
  if (isGroup) {
52774
52742
  return null;
52775
52743
  }
52776
52744
  if (columnDefinition.editable) {
52777
- return /* @__PURE__ */ React80__default.default.createElement(
52778
- coreReact.Typography,
52779
- {
52780
- ...getCellValueTypographyProps(
52781
- (_a = columnDefinition.cellRendererParams) == null ? void 0 : _a.typographyProps
52782
- ),
52783
- className: cx9("input-placeholder")
52784
- },
52785
- ((_c = (_b = columnDefinition.cellEditorParams) == null ? void 0 : _b.inputProps) == null ? void 0 : _c.placeholder) || I18n.t("dataTable.cells.percentCell.placeholder")
52786
- );
52745
+ return /* @__PURE__ */ React80__default.default.createElement(coreReact.Typography, { ...typographyProps, className: cx9("input-placeholder") }, (inputProps == null ? void 0 : inputProps.placeholder) || I18n.t("dataTable.cells.percentCell.placeholder"));
52787
52746
  }
52788
52747
  }
52789
- const internalValue = labsFinancialsUtils.formatPercentage(
52790
- (value == null ? void 0 : value.toString()) ?? "",
52791
- (_d = columnDefinition.cellRendererParams) == null ? void 0 : _d.formatConfig
52792
- );
52748
+ const internalValue = labsFinancialsUtils.formatPercentage((value == null ? void 0 : value.toString()) ?? "", formatConfig);
52793
52749
  if (isGroup) {
52794
52750
  return /* @__PURE__ */ React80__default.default.createElement(
52795
52751
  coreReact.Typography,
@@ -52804,51 +52760,62 @@ var Renderer7 = ({
52804
52760
  return /* @__PURE__ */ React80__default.default.createElement(
52805
52761
  coreReact.Typography,
52806
52762
  {
52807
- ...getCellValueTypographyProps(
52808
- (_e = columnDefinition.cellRendererParams) == null ? void 0 : _e.typographyProps
52809
- ),
52810
- weight: rowPinned ? "bold" : (_g = (_f = columnDefinition.cellRendererParams) == null ? void 0 : _f.typographyProps) == null ? void 0 : _g.weight,
52763
+ ...typographyProps,
52764
+ weight: rowPinned ? "bold" : typographyProps == null ? void 0 : typographyProps.weight,
52811
52765
  className: cx9("tabular-nums")
52812
52766
  },
52813
52767
  internalValue
52814
52768
  );
52815
52769
  };
52816
52770
  var PercentCellRenderer = withDataTableRenderer(Renderer7, "input");
52817
- var Editor4 = React80__default.default.forwardRef(({ columnDefinition, eventKey, stopEditing, value }, ref) => {
52818
- var _a, _b, _c, _d, _e;
52819
- const I18n = coreReact.useI18nContext();
52820
- function onBlur(event) {
52821
- stopEditing(ensureIsHTMLElement(event.relatedTarget));
52822
- }
52823
- if (isEmptyValue(value) && !columnDefinition.editable) {
52824
- return null;
52825
- }
52826
- const defaultValue = eventKey ? value : labsFinancialsUtils.formatNumber(value, {
52827
- ...((_a = columnDefinition.cellEditorParams) == null ? void 0 : _a.formatConfig) ?? ((_b = columnDefinition.cellRendererParams) == null ? void 0 : _b.formatConfig) ?? {},
52828
- symbol: void 0,
52829
- symbolAfterValue: void 0
52830
- });
52831
- return /* @__PURE__ */ React80__default.default.createElement(
52832
- coreReact.Input,
52833
- {
52834
- placeholder: ((_d = (_c = columnDefinition.cellEditorParams) == null ? void 0 : _c.inputProps) == null ? void 0 : _d.placeholder) || I18n.t("dataTable.cells.percentCell.placeholder"),
52835
- className: cx9("input-cell", "input-cell--right-aligned"),
52836
- defaultValue,
52837
- onBlur,
52838
- ref,
52839
- style: { textAlign: "right" },
52840
- ...((_e = columnDefinition.cellEditorParams) == null ? void 0 : _e.inputProps) || {}
52771
+ var Editor4 = React80__default.default.forwardRef(
52772
+ ({
52773
+ columnDefinition,
52774
+ eventKey,
52775
+ stopEditing,
52776
+ value,
52777
+ formatConfig,
52778
+ inputProps
52779
+ }, ref) => {
52780
+ var _a;
52781
+ const I18n = coreReact.useI18nContext();
52782
+ function onBlur(event) {
52783
+ stopEditing(ensureIsHTMLElement(event.relatedTarget));
52841
52784
  }
52842
- );
52843
- });
52785
+ if (isEmptyValue(value) && !columnDefinition.editable) {
52786
+ return null;
52787
+ }
52788
+ const defaultValue = eventKey ? value : labsFinancialsUtils.formatNumber(value, {
52789
+ ...formatConfig || ((_a = columnDefinition.cellRendererParams) == null ? void 0 : _a.formatConfig),
52790
+ //TODO remove usage of columnDefinition.cellRendererParams in next major version
52791
+ symbol: void 0,
52792
+ symbolAfterValue: void 0
52793
+ });
52794
+ return /* @__PURE__ */ React80__default.default.createElement(
52795
+ coreReact.Input,
52796
+ {
52797
+ placeholder: (inputProps == null ? void 0 : inputProps.placeholder) || I18n.t("dataTable.cells.percentCell.placeholder"),
52798
+ className: cx9("input-cell", "input-cell--right-aligned"),
52799
+ defaultValue,
52800
+ onBlur,
52801
+ ref,
52802
+ style: { textAlign: "right" },
52803
+ ...inputProps
52804
+ }
52805
+ );
52806
+ }
52807
+ );
52844
52808
  var PercentCellEditor = withDataTableEditor(Editor4, "input");
52845
52809
  var Renderer8 = ({
52846
- columnDefinition,
52847
52810
  rowHeight,
52848
52811
  isGroup,
52849
- value
52812
+ value,
52813
+ getPersonName,
52814
+ getCompanyName,
52815
+ getImageURL,
52816
+ getInitials,
52817
+ typographyProps
52850
52818
  }) => {
52851
- var _a, _b, _c, _d, _e, _f, _g, _h, _i;
52852
52819
  const [showAvatar, setShowAvatar] = React80__default.default.useState(false);
52853
52820
  React80__default.default.useEffect(() => {
52854
52821
  setShowAvatar(rowHeight === rowSize.lg || rowHeight === rowSize.md);
@@ -52856,13 +52823,10 @@ var Renderer8 = ({
52856
52823
  if (value === void 0 || value === null) {
52857
52824
  return null;
52858
52825
  }
52859
- const name = (_b = (_a = columnDefinition.cellRendererParams) == null ? void 0 : _a.getPersonName) == null ? void 0 : _b.call(_a, value);
52860
- const companyName = (_d = (_c = columnDefinition.cellRendererParams) == null ? void 0 : _c.getCompanyName) == null ? void 0 : _d.call(_c, value);
52861
- const imageURL = (_f = (_e = columnDefinition.cellRendererParams) == null ? void 0 : _e.getImageURL) == null ? void 0 : _f.call(_e, value);
52862
- const initials = (_h = (_g = columnDefinition.cellRendererParams) == null ? void 0 : _g.getInitials) == null ? void 0 : _h.call(_g, value);
52863
- const typographyProps = getCellValueTypographyProps(
52864
- (_i = columnDefinition.cellRendererParams) == null ? void 0 : _i.typographyProps
52865
- );
52826
+ const name = getPersonName == null ? void 0 : getPersonName(value);
52827
+ const companyName = getCompanyName == null ? void 0 : getCompanyName(value);
52828
+ const imageURL = getImageURL == null ? void 0 : getImageURL(value);
52829
+ const initials = getInitials == null ? void 0 : getInitials(value);
52866
52830
  if (isGroup) {
52867
52831
  return /* @__PURE__ */ React80__default.default.createElement(coreReact.Typography, { ...typographyProps, weight: "semibold" }, name);
52868
52832
  }
@@ -52886,35 +52850,26 @@ var Renderer9 = ({
52886
52850
  columnDefinition,
52887
52851
  isGroup,
52888
52852
  value,
52889
- rowPinned
52853
+ rowPinned,
52854
+ getColor,
52855
+ displayAsPill,
52856
+ typographyProps,
52857
+ placeholder
52890
52858
  }) => {
52891
- var _a, _b, _c, _d;
52892
- const { getColor, displayAsPill } = columnDefinition.cellRendererParams;
52859
+ var _a;
52893
52860
  const I18n = coreReact.useI18nContext();
52894
52861
  if (isEmptyValue(value)) {
52895
52862
  if (isGroup) {
52896
52863
  return null;
52897
52864
  }
52898
52865
  if (columnDefinition.editable) {
52899
- return /* @__PURE__ */ React80__default.default.createElement(
52900
- coreReact.Typography,
52901
- {
52902
- ...getCellValueTypographyProps(
52903
- (_a = columnDefinition.cellRendererParams) == null ? void 0 : _a.typographyProps
52904
- ),
52905
- className: cx10("input-placeholder")
52906
- },
52907
- ((_b = columnDefinition.cellEditorParams) == null ? void 0 : _b.placeholder) || I18n.t("dataTable.cells.pillCell.placeholder", {
52908
- label: columnDefinition.headerName
52909
- })
52910
- );
52866
+ return /* @__PURE__ */ React80__default.default.createElement(coreReact.Typography, { ...typographyProps, className: cx10("input-placeholder") }, placeholder || I18n.t("dataTable.cells.pillCell.placeholder", {
52867
+ label: columnDefinition.headerName
52868
+ }));
52911
52869
  }
52912
52870
  return null;
52913
52871
  }
52914
- const label = ((_c = columnDefinition.getStringFormattedValue) == null ? void 0 : _c.call(columnDefinition, value)) || value;
52915
- const typographyProps = getCellValueTypographyProps(
52916
- (_d = columnDefinition.cellRendererParams) == null ? void 0 : _d.typographyProps
52917
- );
52872
+ const label = ((_a = columnDefinition.getStringFormattedValue) == null ? void 0 : _a.call(columnDefinition, value)) || value;
52918
52873
  if ((isGroup || rowPinned && columnDefinition.aggFunc) && !displayAsPill) {
52919
52874
  return /* @__PURE__ */ React80__default.default.createElement(coreReact.Typography, { ...typographyProps, weight: "semibold" }, label);
52920
52875
  }
@@ -52922,8 +52877,18 @@ var Renderer9 = ({
52922
52877
  };
52923
52878
  var PillCellRenderer = withDataTableRenderer(Renderer9, "select");
52924
52879
  var Editor5 = React80__default.default.forwardRef(
52925
- ({ columnDefinition, data, setDataValue, stopEditing, value }, ref) => {
52926
- var _a, _b, _c;
52880
+ ({
52881
+ columnDefinition,
52882
+ data,
52883
+ setDataValue,
52884
+ stopEditing,
52885
+ value,
52886
+ selectOptions,
52887
+ getId: getIdParam,
52888
+ placeholder,
52889
+ getColor,
52890
+ clearable
52891
+ }, ref) => {
52927
52892
  const [options, setOptions] = React80__default.default.useState([]);
52928
52893
  const [loading, setLoading] = React80__default.default.useState(false);
52929
52894
  const I18n = coreReact.useI18nContext();
@@ -52931,8 +52896,6 @@ var Editor5 = React80__default.default.forwardRef(
52931
52896
  stopEditing();
52932
52897
  }
52933
52898
  async function beforeShow() {
52934
- var _a2;
52935
- const selectOptions = ((_a2 = columnDefinition.cellEditorParams) == null ? void 0 : _a2.selectOptions) || [];
52936
52899
  if (Array.isArray(selectOptions)) {
52937
52900
  setOptions(selectOptions);
52938
52901
  } else {
@@ -52949,28 +52912,27 @@ var Editor5 = React80__default.default.forwardRef(
52949
52912
  setDataValue(columnDefinition.field, null);
52950
52913
  }
52951
52914
  function getId3(item) {
52952
- var _a2, _b2;
52953
- return ((_b2 = (_a2 = columnDefinition.cellEditorParams) == null ? void 0 : _a2.getId) == null ? void 0 : _b2.call(_a2, item)) ?? item;
52915
+ return (getIdParam == null ? void 0 : getIdParam(item)) ?? item;
52954
52916
  }
52955
52917
  function getLabel3(item) {
52956
- var _a2;
52957
- const unformattedLabel = ((_a2 = columnDefinition.getStringFormattedValue) == null ? void 0 : _a2.call(columnDefinition, item)) || "";
52918
+ var _a;
52919
+ const unformattedLabel = ((_a = columnDefinition.getStringFormattedValue) == null ? void 0 : _a.call(columnDefinition, item)) || "";
52958
52920
  return unformattedLabel;
52959
52921
  }
52960
52922
  return /* @__PURE__ */ React80__default.default.createElement(
52961
52923
  coreReact.PillSelect,
52962
52924
  {
52963
- placeholder: ((_a = columnDefinition.cellEditorParams) == null ? void 0 : _a.placeholder) || I18n.t("dataTable.cells.pillCell.placeholder", {
52925
+ placeholder: placeholder || I18n.t("dataTable.cells.pillCell.placeholder", {
52964
52926
  label: columnDefinition.headerName
52965
52927
  }),
52966
52928
  afterHide,
52967
52929
  beforeShow,
52968
52930
  block: true,
52969
- getColor: ((_b = columnDefinition.cellEditorParams) == null ? void 0 : _b.getColor) ?? columnDefinition.cellRendererParams.getColor,
52931
+ getColor,
52970
52932
  getId: getId3,
52971
52933
  getLabel: getLabel3,
52972
52934
  loading,
52973
- onClear: ((_c = columnDefinition.cellEditorParams) == null ? void 0 : _c.clearable) ? onClear : void 0,
52935
+ onClear: clearable ? onClear : void 0,
52974
52936
  onSelect,
52975
52937
  options,
52976
52938
  ref,
@@ -53015,14 +52977,12 @@ function useSearch(data, onSearchFunction) {
53015
52977
  setSearchResultOptions
53016
52978
  };
53017
52979
  }
53018
- function useSelectOptions(columnDefinition, data) {
52980
+ function useSelectOptions(selectOptions, data) {
53019
52981
  const [options, setOptions] = React80__default.default.useState([]);
53020
52982
  const [loading, setLoading] = React80__default.default.useState(false);
53021
52983
  const [totalOptions, setTotalOptions] = React80__default.default.useState(0);
53022
52984
  const fetchOptions = async (offset4) => {
53023
- var _a;
53024
52985
  setLoading(true);
53025
- const selectOptions = ((_a = columnDefinition.cellEditorParams) == null ? void 0 : _a.selectOptions) || [];
53026
52986
  let newOptions = [];
53027
52987
  let total = 0;
53028
52988
  if (typeof selectOptions === "function") {
@@ -53054,33 +53014,23 @@ var cx11 = classnames__default.default.bind({ ...styles_default, ...truncation_d
53054
53014
  var Renderer10 = ({
53055
53015
  columnDefinition,
53056
53016
  isGroup,
53057
- value
53017
+ value,
53018
+ typographyProps,
53019
+ placeholder
53058
53020
  }) => {
53059
- var _a, _b, _c, _d;
53021
+ var _a;
53060
53022
  const I18n = coreReact.useI18nContext();
53061
53023
  if (isEmptyValue(value)) {
53062
53024
  if (isGroup) {
53063
53025
  return null;
53064
53026
  }
53065
53027
  if (columnDefinition.editable) {
53066
- return /* @__PURE__ */ React80__default.default.createElement(
53067
- coreReact.Typography,
53068
- {
53069
- ...getCellValueTypographyProps(
53070
- (_a = columnDefinition.cellRendererParams) == null ? void 0 : _a.typographyProps
53071
- ),
53072
- className: cx11("truncatingText")
53073
- },
53074
- ((_b = columnDefinition.cellEditorParams) == null ? void 0 : _b.placeholder) || I18n.t("dataTable.cells.selectCell.placeholder", {
53075
- label: columnDefinition.headerName
53076
- })
53077
- );
53028
+ return /* @__PURE__ */ React80__default.default.createElement(coreReact.Typography, { ...typographyProps, className: cx11("truncatingText") }, placeholder || I18n.t("dataTable.cells.selectCell.placeholder", {
53029
+ label: columnDefinition.headerName
53030
+ }));
53078
53031
  }
53079
53032
  }
53080
- const internalValue = (_c = columnDefinition.getStringFormattedValue) == null ? void 0 : _c.call(columnDefinition, value);
53081
- const typographyProps = getCellValueTypographyProps(
53082
- (_d = columnDefinition.cellRendererParams) == null ? void 0 : _d.typographyProps
53083
- );
53033
+ const internalValue = (_a = columnDefinition.getStringFormattedValue) == null ? void 0 : _a.call(columnDefinition, value);
53084
53034
  if (isGroup) {
53085
53035
  return /* @__PURE__ */ React80__default.default.createElement(
53086
53036
  coreReact.Typography,
@@ -53096,15 +53046,25 @@ var Renderer10 = ({
53096
53046
  };
53097
53047
  var SelectCellRenderer = withDataTableRenderer(Renderer10, "select");
53098
53048
  var Editor6 = React80__default.default.forwardRef(
53099
- ({ columnDefinition, data, setDataValue, stopEditing, value }, ref) => {
53100
- var _a, _b;
53049
+ ({
53050
+ columnDefinition,
53051
+ data,
53052
+ setDataValue,
53053
+ stopEditing,
53054
+ value,
53055
+ clearable,
53056
+ selectOptions,
53057
+ onSearch: onSearchParam,
53058
+ getId: getIdParam,
53059
+ getOptionLabel: getOptionLabelParam
53060
+ }, ref) => {
53101
53061
  const { options, loading, totalOptions, fetchOptions } = useSelectOptions(
53102
- columnDefinition,
53062
+ selectOptions,
53103
53063
  data
53104
53064
  );
53105
53065
  const { onSearch, searchResultOptions, isSearching } = useSearch(
53106
53066
  data,
53107
- (_a = columnDefinition.cellEditorParams) == null ? void 0 : _a.onSearch
53067
+ onSearchParam
53108
53068
  );
53109
53069
  function onSelect(selection) {
53110
53070
  if (selection.item !== value) {
@@ -53127,16 +53087,14 @@ var Editor6 = React80__default.default.forwardRef(
53127
53087
  }
53128
53088
  }, 500);
53129
53089
  function getId3(val) {
53130
- var _a2, _b2;
53131
- return ((_b2 = (_a2 = columnDefinition.cellEditorParams) == null ? void 0 : _a2.getId) == null ? void 0 : _b2.call(_a2, val)) ?? val;
53090
+ return (getIdParam == null ? void 0 : getIdParam(val)) ?? val;
53132
53091
  }
53133
53092
  function getLabel3(val) {
53134
- var _a2;
53135
- return (_a2 = columnDefinition.getStringFormattedValue) == null ? void 0 : _a2.call(columnDefinition, val);
53093
+ var _a;
53094
+ return (_a = columnDefinition.getStringFormattedValue) == null ? void 0 : _a.call(columnDefinition, val);
53136
53095
  }
53137
53096
  function getOptionLabel(option) {
53138
- var _a2, _b2;
53139
- return ((_b2 = (_a2 = columnDefinition.cellEditorParams) == null ? void 0 : _a2.getOptionLabel) == null ? void 0 : _b2.call(_a2, option)) || getLabel3(option);
53097
+ return (getOptionLabelParam == null ? void 0 : getOptionLabelParam(option)) || getLabel3(option);
53140
53098
  }
53141
53099
  return /* @__PURE__ */ React80__default.default.createElement(
53142
53100
  coreReact.Select,
@@ -53148,7 +53106,7 @@ var Editor6 = React80__default.default.forwardRef(
53148
53106
  loading: isSearching || loading,
53149
53107
  onSearch,
53150
53108
  onSelect,
53151
- onClear: ((_b = columnDefinition.cellEditorParams) == null ? void 0 : _b.clearable) ? onClear : void 0,
53109
+ onClear: clearable ? onClear : void 0,
53152
53110
  onScrollBottom,
53153
53111
  ref,
53154
53112
  className: cx11("input-cell", "truncatingText")
@@ -53172,28 +53130,21 @@ var Renderer11 = ({
53172
53130
  rowHeight,
53173
53131
  node,
53174
53132
  isGroup,
53175
- value
53133
+ value,
53134
+ typographyProps,
53135
+ inputProps
53176
53136
  }) => {
53177
- var _a, _b, _c, _d, _e, _f, _g;
53137
+ var _a;
53178
53138
  const I18n = coreReact.useI18nContext();
53179
53139
  if (isEmptyValue(value) && columnDefinition.editable) {
53180
53140
  if (isGroup) {
53181
53141
  return null;
53182
53142
  }
53183
- return /* @__PURE__ */ React80__default.default.createElement(
53184
- coreReact.Typography,
53185
- {
53186
- ...getCellValueTypographyProps(
53187
- (_a = columnDefinition.cellRendererParams) == null ? void 0 : _a.typographyProps
53188
- ),
53189
- className: cx12("input-placeholder")
53190
- },
53191
- ((_c = (_b = columnDefinition.cellEditorParams) == null ? void 0 : _b.inputProps) == null ? void 0 : _c.placeholder) || I18n.t("dataTable.cells.textCell.placeholder")
53192
- );
53143
+ return /* @__PURE__ */ React80__default.default.createElement(coreReact.Typography, { ...typographyProps, className: cx12("input-placeholder") }, (inputProps == null ? void 0 : inputProps.placeholder) || I18n.t("dataTable.cells.textCell.placeholder"));
53193
53144
  }
53194
- const internalValue = ((_d = columnDefinition.getStringFormattedValue) == null ? void 0 : _d.call(columnDefinition, value)) ?? value;
53145
+ const internalValue = ((_a = columnDefinition.getStringFormattedValue) == null ? void 0 : _a.call(columnDefinition, value)) ?? value;
53195
53146
  const className = cx12(
53196
- (_f = (_e = columnDefinition.cellRendererParams) == null ? void 0 : _e.typographyProps) == null ? void 0 : _f.className,
53147
+ typographyProps == null ? void 0 : typographyProps.className,
53197
53148
  "textCell",
53198
53149
  "truncatingText",
53199
53150
  {
@@ -53201,9 +53152,6 @@ var Renderer11 = ({
53201
53152
  "truncatingText--lg": rowHeight === rowSize.lg
53202
53153
  }
53203
53154
  );
53204
- const typographyProps = getCellValueTypographyProps(
53205
- (_g = columnDefinition.cellRendererParams) == null ? void 0 : _g.typographyProps
53206
- );
53207
53155
  if (isGroup) {
53208
53156
  const fontWeight = (node == null ? void 0 : node.footer) ? "regular" : "semibold";
53209
53157
  return /* @__PURE__ */ React80__default.default.createElement(
@@ -53221,8 +53169,8 @@ var Renderer11 = ({
53221
53169
  };
53222
53170
  var TextCellRenderer = withDataTableRenderer(Renderer11, "input");
53223
53171
  var Editor7 = React80__default.default.forwardRef(
53224
- ({ columnDefinition, eventKey, stopEditing, value }, ref) => {
53225
- var _a, _b, _c, _d;
53172
+ ({ columnDefinition, eventKey, stopEditing, value, inputProps }, ref) => {
53173
+ var _a;
53226
53174
  function onBlur(event) {
53227
53175
  stopEditing(ensureIsHTMLElement(event.relatedTarget));
53228
53176
  }
@@ -53231,12 +53179,12 @@ var Editor7 = React80__default.default.forwardRef(
53231
53179
  return /* @__PURE__ */ React80__default.default.createElement(
53232
53180
  coreReact.Input,
53233
53181
  {
53234
- placeholder: ((_c = (_b = columnDefinition.cellEditorParams) == null ? void 0 : _b.inputProps) == null ? void 0 : _c.placeholder) || I18n.t("dataTable.cells.textCell.placeholder"),
53235
53182
  className: cx12("input-cell"),
53236
53183
  defaultValue: internalValue,
53237
53184
  onBlur,
53238
53185
  ref,
53239
- ...((_d = columnDefinition.cellEditorParams) == null ? void 0 : _d.inputProps) || {}
53186
+ ...inputProps,
53187
+ placeholder: (inputProps == null ? void 0 : inputProps.placeholder) || I18n.t("dataTable.cells.textCell.placeholder")
53240
53188
  }
53241
53189
  );
53242
53190
  }
@@ -53257,29 +53205,19 @@ var Renderer12 = ({
53257
53205
  columnDefinition,
53258
53206
  node,
53259
53207
  isGroup,
53260
- value
53208
+ value,
53209
+ typographyProps,
53210
+ textAreaProps
53261
53211
  }) => {
53262
- var _a, _b, _c, _d, _e;
53212
+ var _a;
53263
53213
  const I18n = coreReact.useI18nContext();
53264
53214
  if (isEmptyValue(value) && columnDefinition.editable) {
53265
53215
  if (isGroup) {
53266
53216
  return null;
53267
53217
  }
53268
- return /* @__PURE__ */ React80__default.default.createElement(
53269
- coreReact.Typography,
53270
- {
53271
- ...getCellValueTypographyProps(
53272
- (_a = columnDefinition.cellRendererParams) == null ? void 0 : _a.typographyProps
53273
- ),
53274
- className: cx13("input-placeholder")
53275
- },
53276
- ((_c = (_b = columnDefinition.cellEditorParams) == null ? void 0 : _b.textAreaProps) == null ? void 0 : _c.placeholder) || I18n.t("dataTable.cells.textCell.placeholder")
53277
- );
53218
+ return /* @__PURE__ */ React80__default.default.createElement(coreReact.Typography, { ...typographyProps, className: cx13("input-placeholder") }, (textAreaProps == null ? void 0 : textAreaProps.placeholder) || I18n.t("dataTable.cells.textCell.placeholder"));
53278
53219
  }
53279
- const internalValue = ((_d = columnDefinition.getStringFormattedValue) == null ? void 0 : _d.call(columnDefinition, value)) ?? value;
53280
- const typographyProps = getCellValueTypographyProps(
53281
- (_e = columnDefinition.cellRendererParams) == null ? void 0 : _e.typographyProps
53282
- );
53220
+ const internalValue = ((_a = columnDefinition.getStringFormattedValue) == null ? void 0 : _a.call(columnDefinition, value)) ?? value;
53283
53221
  if (isGroup) {
53284
53222
  const fontWeight = (node == null ? void 0 : node.footer) ? "regular" : "semibold";
53285
53223
  return /* @__PURE__ */ React80__default.default.createElement(
@@ -53295,8 +53233,8 @@ var Renderer12 = ({
53295
53233
  return /* @__PURE__ */ React80__default.default.createElement(coreReact.Typography, { ...typographyProps, className: cx13("textarea-cell", "text") }, internalValue);
53296
53234
  };
53297
53235
  var Editor8 = React80__default.default.forwardRef(
53298
- ({ columnDefinition, stopEditing, value }, ref) => {
53299
- var _a, _b, _c, _d;
53236
+ ({ columnDefinition, stopEditing, value, textAreaProps }, ref) => {
53237
+ var _a;
53300
53238
  function onBlur(event) {
53301
53239
  stopEditing(ensureIsHTMLElement(event.relatedTarget));
53302
53240
  }
@@ -53305,14 +53243,14 @@ var Editor8 = React80__default.default.forwardRef(
53305
53243
  return /* @__PURE__ */ React80__default.default.createElement(
53306
53244
  coreReact.TextArea,
53307
53245
  {
53308
- placeholder: ((_c = (_b = columnDefinition.cellEditorParams) == null ? void 0 : _b.textAreaProps) == null ? void 0 : _c.placeholder) || I18n.t("dataTable.cells.textCell.placeholder"),
53309
53246
  className: cx13("textarea-cell", "editor-text"),
53310
53247
  defaultValue: internalValue,
53311
53248
  onBlur,
53312
53249
  ref,
53313
53250
  resize: "none",
53314
53251
  style: { lineHeight: "16px" },
53315
- ...((_d = columnDefinition.cellEditorParams) == null ? void 0 : _d.textAreaProps) || {}
53252
+ ...textAreaProps,
53253
+ placeholder: (textAreaProps == null ? void 0 : textAreaProps.placeholder) || I18n.t("dataTable.cells.textCell.placeholder")
53316
53254
  }
53317
53255
  );
53318
53256
  }
@@ -55482,19 +55420,15 @@ function getAffectedRows(currentRows, selectionNode, affectedRows) {
55482
55420
  function noop2() {
55483
55421
  }
55484
55422
  function getSelectedState(node, affectedRows) {
55485
- var _a;
55486
55423
  const self = affectedRows[node.id];
55487
55424
  if ((self == null ? void 0 : self.selectedState) === "selected") {
55488
55425
  return true;
55489
- } else if (node.parent && !isNodeRootLevelOfGrid(node.parent) && ((_a = affectedRows[node.parent.id]) == null ? void 0 : _a.selectedState) === "selected") {
55490
- node.setSelected(true, void 0, self == null ? void 0 : self.selectedState);
55491
- affectedRows[node.id] = {
55492
- node,
55493
- selectedState: "selected"
55494
- };
55426
+ } else if (node.isSelected()) {
55427
+ node.setSelected(true, void 0);
55428
+ affectedRows[node.id] = { node, selectedState: "selected" };
55495
55429
  return true;
55496
55430
  } else {
55497
- return !!node.isSelected();
55431
+ return false;
55498
55432
  }
55499
55433
  }
55500
55434
  function getCheckboxState(node, isServerSideDataRequest, rowSelectionRef) {
@@ -55710,11 +55644,8 @@ function getRowActions(actions, rowProps) {
55710
55644
  return actions;
55711
55645
  }
55712
55646
  var InternalRowActionsCellRenderer = (props) => {
55713
- const actions = getRowActions(
55714
- props.columnDefinition.cellRendererParams.actions,
55715
- props
55716
- );
55717
- if (props.rowPinned || props.columnDefinition.cellRendererParams.hideActionsOnGroupedRow && props.isGroup || actions.length === 0) {
55647
+ const actions = getRowActions(props.actions, props);
55648
+ if (props.rowPinned || props.hideActionsOnGroupedRow && props.isGroup || actions.length === 0) {
55718
55649
  return null;
55719
55650
  }
55720
55651
  return /* @__PURE__ */ React80__default.default.createElement(
@@ -55986,7 +55917,8 @@ var DataTableCellRenderer = ({
55986
55917
  node,
55987
55918
  editorType,
55988
55919
  value,
55989
- setValue
55920
+ setValue,
55921
+ ...props
55990
55922
  }) => {
55991
55923
  var _a, _b, _c, _d, _e;
55992
55924
  const { columnApi } = useInternalTableContext();
@@ -56017,10 +55949,11 @@ var DataTableCellRenderer = ({
56017
55949
  parentData: context == null ? void 0 : context.parentData,
56018
55950
  parentId: context == null ? void 0 : context.parentId,
56019
55951
  rowHeight,
56020
- rowIndex: node.rowIndex,
56021
55952
  rowPinned: node.rowPinned,
56022
55953
  tableApi: tableRef == null ? void 0 : tableRef.current,
56023
- value
55954
+ value,
55955
+ ...props,
55956
+ typographyProps: getCellValueTypographyProps(props.typographyProps)
56024
55957
  };
56025
55958
  const hasValue = value !== void 0 && value !== null && value !== "";
56026
55959
  const isSelectCellComponent = ((_c = (_b = columnDefinition.cellRendererSelector) == null ? void 0 : _b.call(columnDefinition, {
@@ -56100,7 +56033,8 @@ var DataTableCellEditor = React80__default.default.forwardRef(
56100
56033
  node,
56101
56034
  parseValue,
56102
56035
  stopEditing,
56103
- value
56036
+ value,
56037
+ ...props
56104
56038
  }, ref) => {
56105
56039
  var _a;
56106
56040
  const startingValue = getStartingValue(eventKey, editorType, value);
@@ -56211,7 +56145,7 @@ var DataTableCellEditor = React80__default.default.forwardRef(
56211
56145
  setCurrentValue(newValue);
56212
56146
  },
56213
56147
  stopEditing: (relatedTarget) => {
56214
- const isRelatedTargetOutsideTable = (relatedTarget == null ? void 0 : relatedTarget.closest('[data-qa="data-table-table')) === null;
56148
+ const isRelatedTargetOutsideTable = (relatedTarget == null ? void 0 : relatedTarget.closest('[data-qa="data-table-table"]')) === null;
56215
56149
  stopEditing(isRelatedTargetOutsideTable);
56216
56150
  if (isRelatedTargetOutsideTable) {
56217
56151
  api.clearFocusedCell();
@@ -56220,7 +56154,8 @@ var DataTableCellEditor = React80__default.default.forwardRef(
56220
56154
  },
56221
56155
  tableApi: tableRef == null ? void 0 : tableRef.current,
56222
56156
  value: currentValue,
56223
- ref: handleRefs(editorType)
56157
+ ref: handleRefs(editorType),
56158
+ ...props
56224
56159
  }
56225
56160
  )
56226
56161
  );
@@ -57310,31 +57245,34 @@ function getLabel2(func, option) {
57310
57245
  function getId2(func, option) {
57311
57246
  return (func == null ? void 0 : func(option)) ?? (option == null ? void 0 : option.id) ?? option;
57312
57247
  }
57313
- var InternalMultiSelectCellRenderer = ({ columnDefinition, rowHeight, value }) => {
57314
- var _a, _b, _c, _d;
57248
+ var InternalMultiSelectCellRenderer = ({
57249
+ columnDefinition,
57250
+ rowHeight,
57251
+ value,
57252
+ getValue: getValueParam,
57253
+ enablePlaceholder: enablePlaceholderParam,
57254
+ placeholder: placeholderParam,
57255
+ typographyProps,
57256
+ getLabel: getLabelParam,
57257
+ getId: getIdParam
57258
+ }) => {
57315
57259
  const I18n = coreReact.useI18nContext();
57316
57260
  const ref = React80__default.default.useRef();
57317
57261
  React80__default.default.useLayoutEffect(() => {
57318
- var _a2, _b2;
57319
- (_b2 = ref == null ? void 0 : ref.current) == null ? void 0 : _b2.setAttribute("title", (_a2 = ref == null ? void 0 : ref.current) == null ? void 0 : _a2.innerText);
57262
+ var _a, _b;
57263
+ (_b = ref == null ? void 0 : ref.current) == null ? void 0 : _b.setAttribute("title", (_a = ref == null ? void 0 : ref.current) == null ? void 0 : _a.innerText);
57320
57264
  });
57321
57265
  if (value === void 0 || value === null) {
57322
57266
  return null;
57323
57267
  }
57324
- const options = getValue(
57325
- (_a = columnDefinition.cellRendererParams) == null ? void 0 : _a.getValue,
57326
- value,
57327
- emptyArray
57328
- );
57329
- const enablePlaceholder = (((_b = columnDefinition.cellRendererParams) == null ? void 0 : _b.enablePlaceholder) && columnDefinition.editable) ?? false;
57330
- const placeholder = ((_c = columnDefinition.cellRendererParams) == null ? void 0 : _c.placeholder) ?? I18n.t("dataTable.cells.multiSelectCell.placeholder");
57268
+ const options = getValue(getValueParam, value, emptyArray);
57269
+ const enablePlaceholder = (enablePlaceholderParam && columnDefinition.editable) ?? false;
57270
+ const placeholder = placeholderParam ?? I18n.t("dataTable.cells.multiSelectCell.placeholder");
57331
57271
  return /* @__PURE__ */ React80__default.default.createElement(
57332
57272
  coreReact.Typography,
57333
57273
  {
57334
57274
  as: "ol",
57335
- ...getCellValueTypographyProps(
57336
- (_d = columnDefinition.cellRendererParams) == null ? void 0 : _d.typographyProps
57337
- ),
57275
+ ...typographyProps,
57338
57276
  className: cx16("inlineListItems", "truncatingText", {
57339
57277
  "truncatingText--md": rowHeight === rowSize.md,
57340
57278
  "truncatingText--lg": rowHeight === rowSize.lg
@@ -57342,15 +57280,8 @@ var InternalMultiSelectCellRenderer = ({ columnDefinition, rowHeight, value }) =
57342
57280
  ref
57343
57281
  },
57344
57282
  options.length ? options.map((option, idx, arr) => {
57345
- var _a2, _b2;
57346
- const label = getLabel2(
57347
- (_a2 = columnDefinition.cellRendererParams) == null ? void 0 : _a2.getLabel,
57348
- option
57349
- );
57350
- const optionId = getId2(
57351
- (_b2 = columnDefinition.cellRendererParams) == null ? void 0 : _b2.getId,
57352
- option
57353
- );
57283
+ const label = getLabel2(getLabelParam, option);
57284
+ const optionId = getId2(getIdParam, option);
57354
57285
  const key = `${label}_${optionId}_idx_${idx}`;
57355
57286
  return /* @__PURE__ */ React80__default.default.createElement(React80__default.default.Fragment, { key }, /* @__PURE__ */ React80__default.default.createElement("li", null, label, idx !== arr.length - 1 ? commaToken : null));
57356
57287
  }) : enablePlaceholder ? /* @__PURE__ */ React80__default.default.createElement("li", { style: { color: coreReact.colors.gray45 } }, placeholder) : null
@@ -57360,66 +57291,80 @@ var MultiSelectCellRenderer = withDataTableRenderer(
57360
57291
  InternalMultiSelectCellRenderer,
57361
57292
  "select"
57362
57293
  );
57363
- var MultiSelectEditor = React80__default.default.forwardRef(({ columnDefinition, value = [], setDataValue, data, stopEditing }, ref) => {
57364
- var _a;
57365
- const [selectedValue, setSelectedValue] = React80__default.default.useState(value);
57366
- const { options, loading, totalOptions, fetchOptions } = useSelectOptions(
57294
+ var MultiSelectEditor = React80__default.default.forwardRef(
57295
+ ({
57367
57296
  columnDefinition,
57368
- data
57369
- );
57370
- const { onSearch: editorOnSearch } = columnDefinition.cellEditorParams || {};
57371
- const shouldSearch = options.length < totalOptions && !!editorOnSearch;
57372
- const { onSearch, searchResultOptions, setSearchResultOptions, isSearching } = useSearch(data, shouldSearch ? editorOnSearch : void 0);
57373
- async function beforeShow() {
57374
- if (options.length === 0) {
57375
- await fetchOptions();
57297
+ value = [],
57298
+ setDataValue,
57299
+ data,
57300
+ stopEditing,
57301
+ selectOptions,
57302
+ placeholder,
57303
+ onSearch: editorOnSearch,
57304
+ getLabel: getLabelParam,
57305
+ getId: getIdParam
57306
+ }, ref) => {
57307
+ const [selectedValue, setSelectedValue] = React80__default.default.useState(value);
57308
+ const { options, loading, totalOptions, fetchOptions } = useSelectOptions(
57309
+ selectOptions,
57310
+ data
57311
+ );
57312
+ const shouldSearch = options.length < totalOptions && !!editorOnSearch;
57313
+ const {
57314
+ onSearch,
57315
+ searchResultOptions,
57316
+ setSearchResultOptions,
57317
+ isSearching
57318
+ } = useSearch(data, shouldSearch ? editorOnSearch : void 0);
57319
+ async function beforeShow() {
57320
+ if (options.length === 0) {
57321
+ await fetchOptions();
57322
+ }
57323
+ return true;
57376
57324
  }
57377
- return true;
57378
- }
57379
- const onScrollBottom = debounce5__default.default(async () => {
57380
- if (!searchResultOptions && options.length < totalOptions) {
57381
- const nextOffset = options.length;
57382
- await fetchOptions(nextOffset);
57325
+ const onScrollBottom = debounce5__default.default(async () => {
57326
+ if (!searchResultOptions && options.length < totalOptions) {
57327
+ const nextOffset = options.length;
57328
+ await fetchOptions(nextOffset);
57329
+ }
57330
+ }, 500);
57331
+ function onChange(value2) {
57332
+ setSelectedValue(value2);
57333
+ setDataValue(columnDefinition.field, value2);
57334
+ if (searchResultOptions) {
57335
+ setSearchResultOptions(void 0);
57336
+ }
57383
57337
  }
57384
- }, 500);
57385
- function onChange(value2) {
57386
- setSelectedValue(value2);
57387
- setDataValue(columnDefinition.field, value2);
57388
- if (searchResultOptions) {
57389
- setSearchResultOptions(void 0);
57338
+ function getLabel3(func, option) {
57339
+ return (func == null ? void 0 : func(option)) ?? (option == null ? void 0 : option.label) ?? (option == null ? void 0 : option.name) ?? option;
57390
57340
  }
57391
- }
57392
- function getLabel3(func, option) {
57393
- return (func == null ? void 0 : func(option)) ?? (option == null ? void 0 : option.label) ?? (option == null ? void 0 : option.name) ?? option;
57394
- }
57395
- function getId3(func, option) {
57396
- return (func == null ? void 0 : func(option)) ?? (option == null ? void 0 : option.id) ?? option;
57397
- }
57398
- return /* @__PURE__ */ React80__default.default.createElement(
57399
- coreReact.MultiSelect,
57400
- {
57401
- beforeShow,
57402
- afterHide: () => stopEditing(),
57403
- block: true,
57404
- loading: isSearching || loading,
57405
- getId: (option) => {
57406
- var _a2;
57407
- return getId3((_a2 = columnDefinition.cellEditorParams) == null ? void 0 : _a2.getId, option);
57408
- },
57409
- getLabel: (option) => {
57410
- var _a2;
57411
- return getLabel3((_a2 = columnDefinition.cellEditorParams) == null ? void 0 : _a2.getLabel, option);
57412
- },
57413
- placeholder: (_a = columnDefinition.cellEditorParams) == null ? void 0 : _a.placeholder,
57414
- onScrollBottom,
57415
- onSearch,
57416
- onChange,
57417
- options: searchResultOptions || options,
57418
- value: selectedValue,
57419
- ref
57341
+ function getId3(func, option) {
57342
+ return (func == null ? void 0 : func(option)) ?? (option == null ? void 0 : option.id) ?? option;
57420
57343
  }
57421
- );
57422
- });
57344
+ return /* @__PURE__ */ React80__default.default.createElement(
57345
+ coreReact.MultiSelect,
57346
+ {
57347
+ beforeShow,
57348
+ afterHide: () => stopEditing(),
57349
+ block: true,
57350
+ loading: isSearching || loading,
57351
+ getId: (option) => {
57352
+ return getId3(getIdParam, option);
57353
+ },
57354
+ getLabel: (option) => {
57355
+ return getLabel3(getLabelParam, option);
57356
+ },
57357
+ placeholder,
57358
+ onScrollBottom,
57359
+ onSearch,
57360
+ onChange,
57361
+ options: searchResultOptions || options,
57362
+ value: selectedValue,
57363
+ ref
57364
+ }
57365
+ );
57366
+ }
57367
+ );
57423
57368
  var MultiSelectCellEditor = withDataTableEditor(
57424
57369
  MultiSelectEditor,
57425
57370
  "select"
@@ -108258,7 +108203,8 @@ var DataTable = ({
108258
108203
  showExpandCollapseAllToggle,
108259
108204
  translations: translations2 = {},
108260
108205
  enableCellTextSelection,
108261
- localStoragePersistenceKey
108206
+ localStoragePersistenceKey,
108207
+ enableCDN
108262
108208
  }) => {
108263
108209
  const initialTableConfig = localStoragePersistenceKey && webSdkStorage.storage.local.getItem(localStoragePersistenceKey) || _initialTableConfig;
108264
108210
  const onServerSideDataRequestRef = React80__default.default.useRef(onServerSideDataRequest);
@@ -108270,14 +108216,28 @@ var DataTable = ({
108270
108216
  );
108271
108217
  const contextPanel = useContextPanel();
108272
108218
  const clientI18n = coreReact.useI18nContext();
108219
+ const isCDNEnabled = cdnTranslations.isCDNFeatureFlagEnabled(clientI18n, enableCDN);
108220
+ const cdnTranslations$1 = cdnTranslations.useRequestTranslations(
108221
+ {
108222
+ locale: clientI18n.locale,
108223
+ type: "file",
108224
+ absolute_file_path: (locale) => `core/packages/data-table/src/locales/${locale}.json`
108225
+ },
108226
+ { en: translations.en, pseudo: translations.pseudo },
108227
+ {
108228
+ oldTranslations: translations,
108229
+ enableCDN: isCDNEnabled
108230
+ }
108231
+ );
108273
108232
  const internalI18n = coreReact.useI18n({
108274
- ...clientI18n,
108233
+ locale: clientI18n.locale,
108275
108234
  translations: ramda.mergeDeepLeft(
108276
108235
  ramda.mergeDeepLeft(clientI18n.translations, {
108277
108236
  [clientI18n.locale]: translations2
108278
108237
  }),
108279
- translations
108280
- )
108238
+ cdnTranslations$1.translations
108239
+ ),
108240
+ enableCDN: isCDNEnabled
108281
108241
  });
108282
108242
  const rowSelectionRef = React80__default.default.useRef({
108283
108243
  affectedRows: {},
@@ -109407,7 +109367,10 @@ var Table = (props) => {
109407
109367
  groupDefaultExpanded: props.groupsAlwaysExpanded ? -1 : props.groupDefaultExpanded,
109408
109368
  groupIncludeFooter: !onSSDR && props.groupIncludeFooter === void 0 ? true : props.groupIncludeFooter,
109409
109369
  getGroupRowAgg: props.getGroupRowAgg ? getGroupRowAgg : void 0,
109410
- groupSelectsChildren: internalTableContext.totalRowCount > 0 && props.groupSelectsChildren || !onSSDR,
109370
+ groupSelectsChildren: (
109371
+ // Always true for client side, defaults to true for server side
109372
+ internalTableContext.totalRowCount > 0 && props.groupSelectsChildren !== false || !onSSDR
109373
+ ),
109411
109374
  groupSelectsFiltered: true,
109412
109375
  headerHeight: props.headerHeight,
109413
109376
  icons: tableIcons,
@@ -111540,7 +111503,8 @@ var ClientSideDataTable = ({
111540
111503
  onTableConfigChange,
111541
111504
  translations: translations2 = {},
111542
111505
  enableCellTextSelection,
111543
- localStoragePersistenceKey
111506
+ localStoragePersistenceKey,
111507
+ enableCDN
111544
111508
  }) => {
111545
111509
  return /* @__PURE__ */ React80__default.default.createElement(
111546
111510
  DataTable,
@@ -111558,7 +111522,8 @@ var ClientSideDataTable = ({
111558
111522
  translations: translations2,
111559
111523
  localStoragePersistenceKey,
111560
111524
  customBulkEditorFields,
111561
- enableCellTextSelection
111525
+ enableCellTextSelection,
111526
+ enableCDN
111562
111527
  },
111563
111528
  children
111564
111529
  );
@@ -115949,7 +115914,8 @@ var ServerSideDataTable = ({
115949
115914
  enableCellTextSelection,
115950
115915
  showExpandCollapseAllToggle,
115951
115916
  translations: translations2 = {},
115952
- localStoragePersistenceKey
115917
+ localStoragePersistenceKey,
115918
+ enableCDN
115953
115919
  }) => {
115954
115920
  return /* @__PURE__ */ React80__default.default.createElement(
115955
115921
  DataTable,
@@ -115968,7 +115934,8 @@ var ServerSideDataTable = ({
115968
115934
  translations: translations2,
115969
115935
  customBulkEditorFields,
115970
115936
  enableCellTextSelection,
115971
- localStoragePersistenceKey
115937
+ localStoragePersistenceKey,
115938
+ enableCDN
115972
115939
  },
115973
115940
  children
115974
115941
  );