@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.
@@ -10,6 +10,7 @@ import { formatNumber, formatCurrency, formatPercentage } from '@procore/labs-fi
10
10
  import styled4, { css as css$1 } from 'styled-components';
11
11
  import { format } from '@procore/labs-financials-utils/dist/format';
12
12
  import { detectPrng, factory } from 'ulid';
13
+ import { isCDNFeatureFlagEnabled, useRequestTranslations } from '@procore/cdn-translations';
13
14
  import { useToastAlertContext, ToastAlertProvider } from '@procore/toast-alert';
14
15
  import ReactDOM, { createPortal } from 'react-dom';
15
16
  import { renderToString, renderToStaticMarkup } from 'react-dom/server';
@@ -7984,32 +7985,15 @@ var styles_default = {
7984
7985
  "spin": "_spin_if78k_1"
7985
7986
  };
7986
7987
 
7987
- // src/utils/getCellValueTypographyProps.ts
7988
- function getCellValueTypographyProps(typographyProps) {
7989
- return {
7990
- intent: "small",
7991
- ...typographyProps ?? {}
7992
- };
7993
- }
7994
-
7995
7988
  // src/CellRenderers/BooleanCell.tsx
7996
7989
  var cx = classnames.bind(styles_default);
7997
- var InternalBooleanCellRenderer = ({ columnDefinition, isGroup, value }) => {
7998
- var _a;
7990
+ var InternalBooleanCellRenderer = ({ isGroup, value, typographyProps }) => {
7999
7991
  const I18n = useI18nContext();
8000
7992
  const internalValue = value ? I18n.t("dataTable.cells.booleanCell.options.yes") : I18n.t("dataTable.cells.booleanCell.options.no");
8001
7993
  if (isGroup) {
8002
7994
  return null;
8003
7995
  }
8004
- return /* @__PURE__ */ React80.createElement(
8005
- Typography,
8006
- {
8007
- ...getCellValueTypographyProps(
8008
- (_a = columnDefinition.cellRendererParams) == null ? void 0 : _a.typographyProps
8009
- )
8010
- },
8011
- internalValue
8012
- );
7996
+ return /* @__PURE__ */ React80.createElement(Typography, { ...typographyProps }, internalValue);
8013
7997
  };
8014
7998
  var BooleanCellRenderer = withDataTableRenderer(
8015
7999
  InternalBooleanCellRenderer,
@@ -8050,12 +8034,13 @@ var BooleanCellEditor = withDataTableEditor(
8050
8034
  var Renderer = ({
8051
8035
  columnDefinition,
8052
8036
  rowPinned,
8037
+ buttons,
8053
8038
  ...props
8054
8039
  }) => {
8055
8040
  if (rowPinned) {
8056
8041
  return null;
8057
8042
  }
8058
- return /* @__PURE__ */ React80.createElement(FlexList, { justifyContent: "center", alignItems: "center", size: "xs" }, columnDefinition.cellRendererParams.buttons.map((Button6) => /* @__PURE__ */ React80.createElement(
8043
+ return /* @__PURE__ */ React80.createElement(FlexList, { justifyContent: "center", alignItems: "center", size: "xs" }, buttons.map((Button6) => /* @__PURE__ */ React80.createElement(
8059
8044
  Button6,
8060
8045
  {
8061
8046
  key: Button6.displayName,
@@ -8157,12 +8142,13 @@ function ContactItem({
8157
8142
 
8158
8143
  // src/CellRenderers/CompanyCell.tsx
8159
8144
  var Renderer2 = ({
8160
- columnDefinition,
8161
8145
  rowHeight,
8162
8146
  isGroup,
8163
- value
8147
+ value,
8148
+ getCompanyName,
8149
+ getImageURL,
8150
+ typographyProps
8164
8151
  }) => {
8165
- var _a, _b, _c, _d, _e;
8166
8152
  const [showAvatar, setShowAvatar] = React80.useState(false);
8167
8153
  React80.useEffect(() => {
8168
8154
  setShowAvatar(rowHeight === rowSize.lg || rowHeight === rowSize.md);
@@ -8170,18 +8156,9 @@ var Renderer2 = ({
8170
8156
  if (value === void 0 || value === null) {
8171
8157
  return null;
8172
8158
  }
8173
- const companyName = isGroup ? value : ((_b = (_a = columnDefinition.cellRendererParams) == null ? void 0 : _a.getCompanyName) == null ? void 0 : _b.call(_a, value)) ?? value.name;
8174
- const imageURL = (_d = (_c = columnDefinition.cellRendererParams) == null ? void 0 : _c.getImageURL) == null ? void 0 : _d.call(_c, value);
8175
- return isGroup ? /* @__PURE__ */ React80.createElement(
8176
- Typography,
8177
- {
8178
- ...getCellValueTypographyProps(
8179
- (_e = columnDefinition.cellRendererParams) == null ? void 0 : _e.typographyProps
8180
- ),
8181
- weight: "semibold"
8182
- },
8183
- companyName
8184
- ) : /* @__PURE__ */ React80.createElement(
8159
+ const companyName = isGroup ? value : (getCompanyName == null ? void 0 : getCompanyName(value)) ?? value.name;
8160
+ const imageURL = getImageURL == null ? void 0 : getImageURL(value);
8161
+ return isGroup ? /* @__PURE__ */ React80.createElement(Typography, { ...typographyProps, weight: "semibold" }, companyName) : /* @__PURE__ */ React80.createElement(
8185
8162
  ContactItem,
8186
8163
  {
8187
8164
  imageUrl: showAvatar ? imageURL : void 0,
@@ -8216,29 +8193,19 @@ var Renderer3 = ({
8216
8193
  columnDefinition,
8217
8194
  isGroup,
8218
8195
  rowPinned,
8219
- value
8196
+ value,
8197
+ typographyProps,
8198
+ formatConfig,
8199
+ inputProps
8220
8200
  }) => {
8221
- var _a, _b, _c, _d, _e, _f, _g;
8222
8201
  const I18n = useI18nContext();
8223
- const internalValue = value !== void 0 && formatCurrency(
8224
- value == null ? void 0 : value.toString(),
8225
- (_a = columnDefinition.cellRendererParams) == null ? void 0 : _a.formatConfig
8226
- ) || void 0;
8202
+ const internalValue = value !== void 0 && formatCurrency(value == null ? void 0 : value.toString(), formatConfig) || void 0;
8227
8203
  if (isEmptyValue(value)) {
8228
8204
  if (isGroup) {
8229
8205
  return null;
8230
8206
  }
8231
8207
  if (columnDefinition.editable) {
8232
- return /* @__PURE__ */ React80.createElement(
8233
- Typography,
8234
- {
8235
- ...getCellValueTypographyProps(
8236
- (_b = columnDefinition.cellRendererParams) == null ? void 0 : _b.typographyProps
8237
- ),
8238
- className: cx3("input-placeholder")
8239
- },
8240
- ((_d = (_c = columnDefinition.cellEditorParams) == null ? void 0 : _c.inputProps) == null ? void 0 : _d.placeholder) || I18n.t("dataTable.cells.currencyCell.placeholder")
8241
- );
8208
+ return /* @__PURE__ */ React80.createElement(Typography, { ...typographyProps, className: cx3("input-placeholder") }, (inputProps == null ? void 0 : inputProps.placeholder) || I18n.t("dataTable.cells.currencyCell.placeholder"));
8242
8209
  }
8243
8210
  }
8244
8211
  if (isGroup) {
@@ -8255,10 +8222,8 @@ var Renderer3 = ({
8255
8222
  return /* @__PURE__ */ React80.createElement(
8256
8223
  Typography,
8257
8224
  {
8258
- ...getCellValueTypographyProps(
8259
- (_e = columnDefinition.cellRendererParams) == null ? void 0 : _e.typographyProps
8260
- ),
8261
- weight: rowPinned ? "bold" : (_g = (_f = columnDefinition.cellRendererParams) == null ? void 0 : _f.typographyProps) == null ? void 0 : _g.weight,
8225
+ ...typographyProps,
8226
+ weight: rowPinned ? "bold" : typographyProps == null ? void 0 : typographyProps.weight,
8262
8227
  className: cx3("tabular-nums")
8263
8228
  },
8264
8229
  internalValue
@@ -8266,8 +8231,15 @@ var Renderer3 = ({
8266
8231
  };
8267
8232
  var CurrencyCellRenderer = withDataTableRenderer(Renderer3, "input");
8268
8233
  var Editor = React80.forwardRef(
8269
- ({ columnDefinition, eventKey, stopEditing, value }, ref) => {
8270
- var _a, _b, _c, _d, _e;
8234
+ ({
8235
+ columnDefinition,
8236
+ eventKey,
8237
+ stopEditing,
8238
+ value,
8239
+ formatConfig,
8240
+ inputProps
8241
+ }, ref) => {
8242
+ var _a;
8271
8243
  const I18n = useI18nContext();
8272
8244
  if (isEmptyValue(value) && !columnDefinition.editable) {
8273
8245
  return null;
@@ -8276,19 +8248,20 @@ var Editor = React80.forwardRef(
8276
8248
  stopEditing(ensureIsHTMLElement(event.relatedTarget));
8277
8249
  }
8278
8250
  const defaultValue = eventKey ? value : formatNumber(value, {
8279
- ...((_a = columnDefinition.cellEditorParams) == null ? void 0 : _a.formatConfig) ?? ((_b = columnDefinition.cellRendererParams) == null ? void 0 : _b.formatConfig) ?? {},
8251
+ ...formatConfig || ((_a = columnDefinition.cellRendererParams) == null ? void 0 : _a.formatConfig),
8252
+ //TODO remove usage of columnDefinition.cellRendererParams in next major version
8280
8253
  symbol: void 0,
8281
8254
  symbolAfterValue: void 0
8282
8255
  });
8283
8256
  return /* @__PURE__ */ React80.createElement(
8284
8257
  Input,
8285
8258
  {
8286
- placeholder: ((_d = (_c = columnDefinition.cellEditorParams) == null ? void 0 : _c.inputProps) == null ? void 0 : _d.placeholder) || I18n.t("dataTable.cells.currencyCell.placeholder"),
8259
+ placeholder: (inputProps == null ? void 0 : inputProps.placeholder) || I18n.t("dataTable.cells.currencyCell.placeholder"),
8287
8260
  defaultValue,
8288
8261
  onBlur,
8289
8262
  ref,
8290
8263
  className: cx3("input-cell", "input-cell--right-aligned"),
8291
- ...((_e = columnDefinition.cellEditorParams) == null ? void 0 : _e.inputProps) || {}
8264
+ ...inputProps
8292
8265
  }
8293
8266
  );
8294
8267
  }
@@ -8702,6 +8675,14 @@ var DateFilterTokenText = ({
8702
8675
  };
8703
8676
  var DateFilterRenderer_default = DateFilterRenderer;
8704
8677
 
8678
+ // src/utils/getCellValueTypographyProps.ts
8679
+ function getCellValueTypographyProps(typographyProps) {
8680
+ return {
8681
+ intent: "small",
8682
+ ...typographyProps
8683
+ };
8684
+ }
8685
+
8705
8686
  // src/CellRenderers/DateCell.tsx
8706
8687
  var cx4 = classnames.bind(styles_default);
8707
8688
  function getDateObject(date) {
@@ -8791,39 +8772,32 @@ function getDateObject2(date) {
8791
8772
  return date;
8792
8773
  }
8793
8774
  var DateTimeCellValue = ({
8794
- columnDefinition,
8795
8775
  isGroup,
8796
- value
8776
+ value,
8777
+ typographyProps,
8778
+ dateFormatType
8797
8779
  }) => {
8798
- var _a, _b;
8799
8780
  const { format: format3 } = useDateTime();
8800
8781
  if (isGroup || isEmptyValue(value)) {
8801
8782
  return null;
8802
8783
  }
8803
8784
  const parsedValue = getDateObject2(value);
8804
- const internalValue = parsedValue ? format3(
8805
- parsedValue,
8806
- ((_a = columnDefinition.cellRendererParams) == null ? void 0 : _a.dateFormatType) || "abbr-weekday-abbr-date-at-time"
8807
- ) : void 0;
8808
- const typographyProps = getCellValueTypographyProps(
8809
- (_b = columnDefinition.cellRendererParams) == null ? void 0 : _b.typographyProps
8810
- );
8785
+ const internalValue = parsedValue ? format3(parsedValue, dateFormatType || "abbr-weekday-abbr-date-at-time") : void 0;
8811
8786
  return /* @__PURE__ */ React80.createElement(Typography, { ...typographyProps }, internalValue);
8812
8787
  };
8813
8788
  var Renderer5 = (props) => {
8814
- var _a, _b;
8815
- return /* @__PURE__ */ React80.createElement(
8816
- OptionalDateTimeProvider,
8817
- {
8818
- timeZone: (_b = (_a = props.columnDefinition) == null ? void 0 : _a.cellRendererParams) == null ? void 0 : _b.timeZone
8819
- },
8820
- /* @__PURE__ */ React80.createElement(DateTimeCellValue, { ...props })
8821
- );
8789
+ return /* @__PURE__ */ React80.createElement(OptionalDateTimeProvider, { timeZone: props.timeZone }, /* @__PURE__ */ React80.createElement(DateTimeCellValue, { ...props }));
8822
8790
  };
8823
8791
  var DateTimeCellRenderer = withDataTableRenderer(Renderer5, "date");
8824
8792
  var Editor3 = React80.forwardRef(
8825
- ({ columnDefinition, setDataValue, stopEditing, value }, ref) => {
8826
- var _a, _b;
8793
+ ({
8794
+ columnDefinition,
8795
+ setDataValue,
8796
+ stopEditing,
8797
+ value,
8798
+ timeZone,
8799
+ disabledDate
8800
+ }, ref) => {
8827
8801
  function afterHide(event) {
8828
8802
  stopEditing(ensureIsHTMLElement(event == null ? void 0 : event.target));
8829
8803
  }
@@ -8834,23 +8808,17 @@ var Editor3 = React80.forwardRef(
8834
8808
  setDataValue(columnDefinition.field, void 0);
8835
8809
  }
8836
8810
  }
8837
- return /* @__PURE__ */ React80.createElement(
8838
- OptionalDateTimeProvider,
8811
+ return /* @__PURE__ */ React80.createElement(OptionalDateTimeProvider, { timeZone }, /* @__PURE__ */ React80.createElement(
8812
+ DateSelect,
8839
8813
  {
8840
- timeZone: (_a = columnDefinition.cellEditorParams) == null ? void 0 : _a.timeZone
8841
- },
8842
- /* @__PURE__ */ React80.createElement(
8843
- DateSelect,
8844
- {
8845
- afterHide,
8846
- className: cx5("input-cell"),
8847
- disabledDate: (_b = columnDefinition.cellEditorParams) == null ? void 0 : _b.disabledDate,
8848
- onChange,
8849
- ref,
8850
- value: getDateObject2(value)
8851
- }
8852
- )
8853
- );
8814
+ afterHide,
8815
+ className: cx5("input-cell"),
8816
+ disabledDate,
8817
+ onChange,
8818
+ ref,
8819
+ value: getDateObject2(value)
8820
+ }
8821
+ ));
8854
8822
  }
8855
8823
  );
8856
8824
  var DateTimeCellEditor = withDataTableEditor(Editor3, "date");
@@ -52376,16 +52344,22 @@ globalObj.MouseEvent = typeof MouseEvent === "undefined" ? {} : MouseEvent;
52376
52344
  var GroupCellRenderer2 = GroupCellRenderer;
52377
52345
  var cx6 = classnames.bind(truncation_default);
52378
52346
  var MIN_LINK_WIDTH = 48;
52379
- var InternalLinkCellRenderer = ({ columnDefinition, isGroup, data, rowHeight, value }) => {
52380
- var _a, _b, _c, _d;
52347
+ var InternalLinkCellRenderer = ({
52348
+ columnDefinition,
52349
+ isGroup,
52350
+ data,
52351
+ rowHeight,
52352
+ value,
52353
+ typographyProps,
52354
+ isExternalLink,
52355
+ getURL
52356
+ }) => {
52357
+ var _a;
52381
52358
  const [isLinkWidthBelowMin, setIsLinkWidthBelowMin] = useState(false);
52382
52359
  const linkRef = useRef(null);
52383
52360
  const internalValue = value ? (_a = columnDefinition.getStringFormattedValue) == null ? void 0 : _a.call(columnDefinition, value) : "";
52384
- const typographyProps = getCellValueTypographyProps(
52385
- (_b = columnDefinition.cellRendererParams) == null ? void 0 : _b.typographyProps
52386
- );
52387
52361
  const className = cx6(
52388
- (_d = (_c = columnDefinition.cellRendererParams) == null ? void 0 : _c.typographyProps) == null ? void 0 : _d.className,
52362
+ typographyProps == null ? void 0 : typographyProps.className,
52389
52363
  "textCell",
52390
52364
  "truncatingText",
52391
52365
  {
@@ -52403,8 +52377,7 @@ var InternalLinkCellRenderer = ({ columnDefinition, isGroup, data, rowHeight, va
52403
52377
  setIsLinkWidthBelowMin(width < MIN_LINK_WIDTH);
52404
52378
  }
52405
52379
  }, [internalValue]);
52406
- const isExternalLink = columnDefinition.cellRendererParams.isExternalLink ?? false;
52407
- const URL = columnDefinition.cellRendererParams.getURL(value, data);
52380
+ const URL = getURL(value, data);
52408
52381
  const extendClickableAreaClassNames = isLinkWidthBelowMin ? cx6("extendClickableArea", {
52409
52382
  "extendClickableArea--rowHeightSm": rowHeight === rowSize.sm
52410
52383
  }) : "";
@@ -52434,24 +52407,22 @@ var LinkCellRenderer = withDataTableRenderer(
52434
52407
  "input"
52435
52408
  );
52436
52409
  var cx7 = classnames.bind(styles_default);
52437
- var InternalNumberCellRenderer = ({ columnDefinition, rowPinned, isGroup, value }) => {
52438
- var _a, _b, _c, _d, _e, _f, _g;
52410
+ var InternalNumberCellRenderer = ({
52411
+ columnDefinition,
52412
+ rowPinned,
52413
+ isGroup,
52414
+ value,
52415
+ typographyProps,
52416
+ inputProps,
52417
+ formatConfig
52418
+ }) => {
52439
52419
  const I18n = useI18nContext();
52440
52420
  if (isEmptyValue(value)) {
52441
52421
  if (isGroup) {
52442
52422
  return null;
52443
52423
  }
52444
52424
  if (columnDefinition.editable) {
52445
- return /* @__PURE__ */ React80.createElement(
52446
- Typography,
52447
- {
52448
- ...getCellValueTypographyProps(
52449
- (_a = columnDefinition.cellRendererParams) == null ? void 0 : _a.typographyProps
52450
- ),
52451
- className: cx7("input-placeholder")
52452
- },
52453
- ((_c = (_b = columnDefinition.cellEditorParams) == null ? void 0 : _b.inputProps) == null ? void 0 : _c.placeholder) || I18n.t("dataTable.cells.numberCell.placeholder")
52454
- );
52425
+ return /* @__PURE__ */ React80.createElement(Typography, { ...typographyProps, className: cx7("input-placeholder") }, (inputProps == null ? void 0 : inputProps.placeholder) || I18n.t("dataTable.cells.numberCell.placeholder"));
52455
52426
  }
52456
52427
  return /* @__PURE__ */ React80.createElement(React80.Fragment, null);
52457
52428
  }
@@ -52460,7 +52431,7 @@ var InternalNumberCellRenderer = ({ columnDefinition, rowPinned, isGroup, value
52460
52431
  minDecimalPrecision: 0,
52461
52432
  shouldUseGtk: true,
52462
52433
  symbol: "",
52463
- ...(_d = columnDefinition.cellRendererParams) == null ? void 0 : _d.formatConfig
52434
+ ...formatConfig
52464
52435
  });
52465
52436
  if (isGroup) {
52466
52437
  return /* @__PURE__ */ React80.createElement(Typography, { intent: "small", weight: "semibold" }, internalValue);
@@ -52468,10 +52439,8 @@ var InternalNumberCellRenderer = ({ columnDefinition, rowPinned, isGroup, value
52468
52439
  return /* @__PURE__ */ React80.createElement(
52469
52440
  Typography,
52470
52441
  {
52471
- ...getCellValueTypographyProps(
52472
- (_e = columnDefinition.cellRendererParams) == null ? void 0 : _e.typographyProps
52473
- ),
52474
- weight: rowPinned ? "bold" : (_g = (_f = columnDefinition.cellRendererParams) == null ? void 0 : _f.typographyProps) == null ? void 0 : _g.weight
52442
+ ...typographyProps,
52443
+ weight: rowPinned ? "bold" : typographyProps == null ? void 0 : typographyProps.weight
52475
52444
  },
52476
52445
  internalValue
52477
52446
  );
@@ -52480,8 +52449,7 @@ var NumberCellRenderer = withDataTableRenderer(
52480
52449
  InternalNumberCellRenderer,
52481
52450
  "input"
52482
52451
  );
52483
- var InternalNumberCellEditor = React80.forwardRef(({ columnDefinition, stopEditing, value }, ref) => {
52484
- var _a, _b, _c;
52452
+ var InternalNumberCellEditor = React80.forwardRef(({ columnDefinition, stopEditing, value, inputProps }, ref) => {
52485
52453
  const I18n = useI18nContext();
52486
52454
  if (isEmptyValue(value) && !columnDefinition.editable) {
52487
52455
  return null;
@@ -52492,13 +52460,13 @@ var InternalNumberCellEditor = React80.forwardRef(({ columnDefinition, stopEditi
52492
52460
  return /* @__PURE__ */ React80.createElement(
52493
52461
  Input,
52494
52462
  {
52495
- placeholder: ((_b = (_a = columnDefinition.cellEditorParams) == null ? void 0 : _a.inputProps) == null ? void 0 : _b.placeholder) || I18n.t("dataTable.cells.numberCell.placeholder"),
52463
+ placeholder: (inputProps == null ? void 0 : inputProps.placeholder) || I18n.t("dataTable.cells.numberCell.placeholder"),
52496
52464
  type: "number",
52497
52465
  defaultValue: value,
52498
52466
  onBlur,
52499
52467
  ref,
52500
52468
  className: cx7("input-cell", "input-cell--right-aligned"),
52501
- ...((_c = columnDefinition.cellEditorParams) == null ? void 0 : _c.inputProps) || {}
52469
+ ...inputProps
52502
52470
  }
52503
52471
  );
52504
52472
  });
@@ -52579,41 +52547,42 @@ var defaultAvatarStackItemFilter = (person) => !!person || !!person.id;
52579
52547
  var Renderer6 = ({
52580
52548
  columnDefinition,
52581
52549
  rowHeight,
52582
- value
52550
+ value,
52551
+ getValue: getValue2,
52552
+ getCompanyName: getCompanyNameParam,
52553
+ getPersonName: getPersonNameParam,
52554
+ getInitials,
52555
+ getImageURL,
52556
+ typographyProps
52583
52557
  }) => {
52584
- var _a, _b, _c, _d, _e, _f, _g;
52558
+ var _a;
52585
52559
  const [fullCellView, setFullCellView] = React80.useState(false);
52586
52560
  const getPeople = React80.useCallback(() => {
52587
- var _a2, _b2;
52588
- return ((_b2 = (_a2 = columnDefinition.cellRendererParams) == null ? void 0 : _a2.getValue) == null ? void 0 : _b2.call(_a2, value)) || value || [];
52589
- }, [(_a = columnDefinition.cellRendererParams) == null ? void 0 : _a.getValue, value]);
52561
+ return (getValue2 == null ? void 0 : getValue2(value)) || value || [];
52562
+ }, [getValue2, value]);
52590
52563
  const getCompanyName = React80.useCallback(
52591
52564
  (person) => {
52592
- var _a2, _b2;
52593
- return ((_b2 = (_a2 = columnDefinition.cellRendererParams) == null ? void 0 : _a2.getCompanyName) == null ? void 0 : _b2.call(_a2, person)) ?? person.company ?? "";
52565
+ return (getCompanyNameParam == null ? void 0 : getCompanyNameParam(person)) ?? person.company ?? "";
52594
52566
  },
52595
- [(_b = columnDefinition.cellRendererParams) == null ? void 0 : _b.getCompanyName]
52567
+ [getCompanyNameParam]
52596
52568
  );
52597
52569
  const getPersonName = React80.useCallback(
52598
52570
  (person) => {
52599
- var _a2, _b2;
52600
- return ((_b2 = (_a2 = columnDefinition.cellRendererParams) == null ? void 0 : _a2.getPersonName) == null ? void 0 : _b2.call(_a2, person)) ?? person.name ?? "";
52571
+ return (getPersonNameParam == null ? void 0 : getPersonNameParam(person)) ?? person.name ?? "";
52601
52572
  },
52602
- [(_c = columnDefinition.cellRendererParams) == null ? void 0 : _c.getPersonName]
52573
+ [getPersonNameParam]
52603
52574
  );
52604
52575
  const getPersonImageUrl = React80.useCallback(
52605
52576
  (person) => {
52606
- var _a2, _b2;
52607
- return ((_b2 = (_a2 = columnDefinition.cellRendererParams) == null ? void 0 : _a2.getImageURL) == null ? void 0 : _b2.call(_a2, person)) ?? "";
52577
+ return (getImageURL == null ? void 0 : getImageURL(person)) ?? "";
52608
52578
  },
52609
- [(_d = columnDefinition.cellRendererParams) == null ? void 0 : _d.getImageURL]
52579
+ [getImageURL]
52610
52580
  );
52611
52581
  const getPersonInitials = React80.useCallback(
52612
52582
  (person) => {
52613
- var _a2, _b2;
52614
- return ((_b2 = (_a2 = columnDefinition.cellRendererParams) == null ? void 0 : _a2.getInitials) == null ? void 0 : _b2.call(_a2, person)) ?? "";
52583
+ return (getInitials == null ? void 0 : getInitials(person)) ?? "";
52615
52584
  },
52616
- [(_e = columnDefinition.cellRendererParams) == null ? void 0 : _e.getInitials]
52585
+ [getInitials]
52617
52586
  );
52618
52587
  const getPersonNameWithCompany = React80.useCallback(
52619
52588
  (person) => {
@@ -52641,9 +52610,6 @@ var Renderer6 = ({
52641
52610
  }
52642
52611
  return avatarWidth * avatarCount;
52643
52612
  }, [getPeople, rowHeight]);
52644
- const typographyProps = getCellValueTypographyProps(
52645
- (_f = columnDefinition.cellRendererParams) == null ? void 0 : _f.typographyProps
52646
- );
52647
52613
  const people = getPeople();
52648
52614
  if (isEmptyValue(value) || people.length === 0) {
52649
52615
  return null;
@@ -52657,7 +52623,7 @@ var Renderer6 = ({
52657
52623
  type: person.type || "user"
52658
52624
  };
52659
52625
  }).filter(
52660
- ((_g = columnDefinition.cellRendererParams) == null ? void 0 : _g.avatarStackItemFilter) ?? defaultAvatarStackItemFilter
52626
+ ((_a = columnDefinition.cellRendererParams) == null ? void 0 : _a.avatarStackItemFilter) ?? defaultAvatarStackItemFilter
52661
52627
  );
52662
52628
  const isAvatarStackDisplayed = fullCellView && avatarStackItems && !!avatarStackItems.length;
52663
52629
  return /* @__PURE__ */ React80.createElement(
@@ -52752,31 +52718,21 @@ var Renderer7 = ({
52752
52718
  columnDefinition,
52753
52719
  isGroup,
52754
52720
  rowPinned,
52755
- value
52721
+ value,
52722
+ typographyProps,
52723
+ inputProps,
52724
+ formatConfig
52756
52725
  }) => {
52757
- var _a, _b, _c, _d, _e, _f, _g;
52758
52726
  const I18n = useI18nContext();
52759
52727
  if (isEmptyValue(value)) {
52760
52728
  if (isGroup) {
52761
52729
  return null;
52762
52730
  }
52763
52731
  if (columnDefinition.editable) {
52764
- return /* @__PURE__ */ React80.createElement(
52765
- Typography,
52766
- {
52767
- ...getCellValueTypographyProps(
52768
- (_a = columnDefinition.cellRendererParams) == null ? void 0 : _a.typographyProps
52769
- ),
52770
- className: cx9("input-placeholder")
52771
- },
52772
- ((_c = (_b = columnDefinition.cellEditorParams) == null ? void 0 : _b.inputProps) == null ? void 0 : _c.placeholder) || I18n.t("dataTable.cells.percentCell.placeholder")
52773
- );
52732
+ return /* @__PURE__ */ React80.createElement(Typography, { ...typographyProps, className: cx9("input-placeholder") }, (inputProps == null ? void 0 : inputProps.placeholder) || I18n.t("dataTable.cells.percentCell.placeholder"));
52774
52733
  }
52775
52734
  }
52776
- const internalValue = formatPercentage(
52777
- (value == null ? void 0 : value.toString()) ?? "",
52778
- (_d = columnDefinition.cellRendererParams) == null ? void 0 : _d.formatConfig
52779
- );
52735
+ const internalValue = formatPercentage((value == null ? void 0 : value.toString()) ?? "", formatConfig);
52780
52736
  if (isGroup) {
52781
52737
  return /* @__PURE__ */ React80.createElement(
52782
52738
  Typography,
@@ -52791,51 +52747,62 @@ var Renderer7 = ({
52791
52747
  return /* @__PURE__ */ React80.createElement(
52792
52748
  Typography,
52793
52749
  {
52794
- ...getCellValueTypographyProps(
52795
- (_e = columnDefinition.cellRendererParams) == null ? void 0 : _e.typographyProps
52796
- ),
52797
- weight: rowPinned ? "bold" : (_g = (_f = columnDefinition.cellRendererParams) == null ? void 0 : _f.typographyProps) == null ? void 0 : _g.weight,
52750
+ ...typographyProps,
52751
+ weight: rowPinned ? "bold" : typographyProps == null ? void 0 : typographyProps.weight,
52798
52752
  className: cx9("tabular-nums")
52799
52753
  },
52800
52754
  internalValue
52801
52755
  );
52802
52756
  };
52803
52757
  var PercentCellRenderer = withDataTableRenderer(Renderer7, "input");
52804
- var Editor4 = React80.forwardRef(({ columnDefinition, eventKey, stopEditing, value }, ref) => {
52805
- var _a, _b, _c, _d, _e;
52806
- const I18n = useI18nContext();
52807
- function onBlur(event) {
52808
- stopEditing(ensureIsHTMLElement(event.relatedTarget));
52809
- }
52810
- if (isEmptyValue(value) && !columnDefinition.editable) {
52811
- return null;
52812
- }
52813
- const defaultValue = eventKey ? value : formatNumber(value, {
52814
- ...((_a = columnDefinition.cellEditorParams) == null ? void 0 : _a.formatConfig) ?? ((_b = columnDefinition.cellRendererParams) == null ? void 0 : _b.formatConfig) ?? {},
52815
- symbol: void 0,
52816
- symbolAfterValue: void 0
52817
- });
52818
- return /* @__PURE__ */ React80.createElement(
52819
- Input,
52820
- {
52821
- placeholder: ((_d = (_c = columnDefinition.cellEditorParams) == null ? void 0 : _c.inputProps) == null ? void 0 : _d.placeholder) || I18n.t("dataTable.cells.percentCell.placeholder"),
52822
- className: cx9("input-cell", "input-cell--right-aligned"),
52823
- defaultValue,
52824
- onBlur,
52825
- ref,
52826
- style: { textAlign: "right" },
52827
- ...((_e = columnDefinition.cellEditorParams) == null ? void 0 : _e.inputProps) || {}
52758
+ var Editor4 = React80.forwardRef(
52759
+ ({
52760
+ columnDefinition,
52761
+ eventKey,
52762
+ stopEditing,
52763
+ value,
52764
+ formatConfig,
52765
+ inputProps
52766
+ }, ref) => {
52767
+ var _a;
52768
+ const I18n = useI18nContext();
52769
+ function onBlur(event) {
52770
+ stopEditing(ensureIsHTMLElement(event.relatedTarget));
52828
52771
  }
52829
- );
52830
- });
52772
+ if (isEmptyValue(value) && !columnDefinition.editable) {
52773
+ return null;
52774
+ }
52775
+ const defaultValue = eventKey ? value : formatNumber(value, {
52776
+ ...formatConfig || ((_a = columnDefinition.cellRendererParams) == null ? void 0 : _a.formatConfig),
52777
+ //TODO remove usage of columnDefinition.cellRendererParams in next major version
52778
+ symbol: void 0,
52779
+ symbolAfterValue: void 0
52780
+ });
52781
+ return /* @__PURE__ */ React80.createElement(
52782
+ Input,
52783
+ {
52784
+ placeholder: (inputProps == null ? void 0 : inputProps.placeholder) || I18n.t("dataTable.cells.percentCell.placeholder"),
52785
+ className: cx9("input-cell", "input-cell--right-aligned"),
52786
+ defaultValue,
52787
+ onBlur,
52788
+ ref,
52789
+ style: { textAlign: "right" },
52790
+ ...inputProps
52791
+ }
52792
+ );
52793
+ }
52794
+ );
52831
52795
  var PercentCellEditor = withDataTableEditor(Editor4, "input");
52832
52796
  var Renderer8 = ({
52833
- columnDefinition,
52834
52797
  rowHeight,
52835
52798
  isGroup,
52836
- value
52799
+ value,
52800
+ getPersonName,
52801
+ getCompanyName,
52802
+ getImageURL,
52803
+ getInitials,
52804
+ typographyProps
52837
52805
  }) => {
52838
- var _a, _b, _c, _d, _e, _f, _g, _h, _i;
52839
52806
  const [showAvatar, setShowAvatar] = React80.useState(false);
52840
52807
  React80.useEffect(() => {
52841
52808
  setShowAvatar(rowHeight === rowSize.lg || rowHeight === rowSize.md);
@@ -52843,13 +52810,10 @@ var Renderer8 = ({
52843
52810
  if (value === void 0 || value === null) {
52844
52811
  return null;
52845
52812
  }
52846
- const name = (_b = (_a = columnDefinition.cellRendererParams) == null ? void 0 : _a.getPersonName) == null ? void 0 : _b.call(_a, value);
52847
- const companyName = (_d = (_c = columnDefinition.cellRendererParams) == null ? void 0 : _c.getCompanyName) == null ? void 0 : _d.call(_c, value);
52848
- const imageURL = (_f = (_e = columnDefinition.cellRendererParams) == null ? void 0 : _e.getImageURL) == null ? void 0 : _f.call(_e, value);
52849
- const initials = (_h = (_g = columnDefinition.cellRendererParams) == null ? void 0 : _g.getInitials) == null ? void 0 : _h.call(_g, value);
52850
- const typographyProps = getCellValueTypographyProps(
52851
- (_i = columnDefinition.cellRendererParams) == null ? void 0 : _i.typographyProps
52852
- );
52813
+ const name = getPersonName == null ? void 0 : getPersonName(value);
52814
+ const companyName = getCompanyName == null ? void 0 : getCompanyName(value);
52815
+ const imageURL = getImageURL == null ? void 0 : getImageURL(value);
52816
+ const initials = getInitials == null ? void 0 : getInitials(value);
52853
52817
  if (isGroup) {
52854
52818
  return /* @__PURE__ */ React80.createElement(Typography, { ...typographyProps, weight: "semibold" }, name);
52855
52819
  }
@@ -52873,35 +52837,26 @@ var Renderer9 = ({
52873
52837
  columnDefinition,
52874
52838
  isGroup,
52875
52839
  value,
52876
- rowPinned
52840
+ rowPinned,
52841
+ getColor,
52842
+ displayAsPill,
52843
+ typographyProps,
52844
+ placeholder
52877
52845
  }) => {
52878
- var _a, _b, _c, _d;
52879
- const { getColor, displayAsPill } = columnDefinition.cellRendererParams;
52846
+ var _a;
52880
52847
  const I18n = useI18nContext();
52881
52848
  if (isEmptyValue(value)) {
52882
52849
  if (isGroup) {
52883
52850
  return null;
52884
52851
  }
52885
52852
  if (columnDefinition.editable) {
52886
- return /* @__PURE__ */ React80.createElement(
52887
- Typography,
52888
- {
52889
- ...getCellValueTypographyProps(
52890
- (_a = columnDefinition.cellRendererParams) == null ? void 0 : _a.typographyProps
52891
- ),
52892
- className: cx10("input-placeholder")
52893
- },
52894
- ((_b = columnDefinition.cellEditorParams) == null ? void 0 : _b.placeholder) || I18n.t("dataTable.cells.pillCell.placeholder", {
52895
- label: columnDefinition.headerName
52896
- })
52897
- );
52853
+ return /* @__PURE__ */ React80.createElement(Typography, { ...typographyProps, className: cx10("input-placeholder") }, placeholder || I18n.t("dataTable.cells.pillCell.placeholder", {
52854
+ label: columnDefinition.headerName
52855
+ }));
52898
52856
  }
52899
52857
  return null;
52900
52858
  }
52901
- const label = ((_c = columnDefinition.getStringFormattedValue) == null ? void 0 : _c.call(columnDefinition, value)) || value;
52902
- const typographyProps = getCellValueTypographyProps(
52903
- (_d = columnDefinition.cellRendererParams) == null ? void 0 : _d.typographyProps
52904
- );
52859
+ const label = ((_a = columnDefinition.getStringFormattedValue) == null ? void 0 : _a.call(columnDefinition, value)) || value;
52905
52860
  if ((isGroup || rowPinned && columnDefinition.aggFunc) && !displayAsPill) {
52906
52861
  return /* @__PURE__ */ React80.createElement(Typography, { ...typographyProps, weight: "semibold" }, label);
52907
52862
  }
@@ -52909,8 +52864,18 @@ var Renderer9 = ({
52909
52864
  };
52910
52865
  var PillCellRenderer = withDataTableRenderer(Renderer9, "select");
52911
52866
  var Editor5 = React80.forwardRef(
52912
- ({ columnDefinition, data, setDataValue, stopEditing, value }, ref) => {
52913
- var _a, _b, _c;
52867
+ ({
52868
+ columnDefinition,
52869
+ data,
52870
+ setDataValue,
52871
+ stopEditing,
52872
+ value,
52873
+ selectOptions,
52874
+ getId: getIdParam,
52875
+ placeholder,
52876
+ getColor,
52877
+ clearable
52878
+ }, ref) => {
52914
52879
  const [options, setOptions] = React80.useState([]);
52915
52880
  const [loading, setLoading] = React80.useState(false);
52916
52881
  const I18n = useI18nContext();
@@ -52918,8 +52883,6 @@ var Editor5 = React80.forwardRef(
52918
52883
  stopEditing();
52919
52884
  }
52920
52885
  async function beforeShow() {
52921
- var _a2;
52922
- const selectOptions = ((_a2 = columnDefinition.cellEditorParams) == null ? void 0 : _a2.selectOptions) || [];
52923
52886
  if (Array.isArray(selectOptions)) {
52924
52887
  setOptions(selectOptions);
52925
52888
  } else {
@@ -52936,28 +52899,27 @@ var Editor5 = React80.forwardRef(
52936
52899
  setDataValue(columnDefinition.field, null);
52937
52900
  }
52938
52901
  function getId3(item) {
52939
- var _a2, _b2;
52940
- return ((_b2 = (_a2 = columnDefinition.cellEditorParams) == null ? void 0 : _a2.getId) == null ? void 0 : _b2.call(_a2, item)) ?? item;
52902
+ return (getIdParam == null ? void 0 : getIdParam(item)) ?? item;
52941
52903
  }
52942
52904
  function getLabel3(item) {
52943
- var _a2;
52944
- const unformattedLabel = ((_a2 = columnDefinition.getStringFormattedValue) == null ? void 0 : _a2.call(columnDefinition, item)) || "";
52905
+ var _a;
52906
+ const unformattedLabel = ((_a = columnDefinition.getStringFormattedValue) == null ? void 0 : _a.call(columnDefinition, item)) || "";
52945
52907
  return unformattedLabel;
52946
52908
  }
52947
52909
  return /* @__PURE__ */ React80.createElement(
52948
52910
  PillSelect,
52949
52911
  {
52950
- placeholder: ((_a = columnDefinition.cellEditorParams) == null ? void 0 : _a.placeholder) || I18n.t("dataTable.cells.pillCell.placeholder", {
52912
+ placeholder: placeholder || I18n.t("dataTable.cells.pillCell.placeholder", {
52951
52913
  label: columnDefinition.headerName
52952
52914
  }),
52953
52915
  afterHide,
52954
52916
  beforeShow,
52955
52917
  block: true,
52956
- getColor: ((_b = columnDefinition.cellEditorParams) == null ? void 0 : _b.getColor) ?? columnDefinition.cellRendererParams.getColor,
52918
+ getColor,
52957
52919
  getId: getId3,
52958
52920
  getLabel: getLabel3,
52959
52921
  loading,
52960
- onClear: ((_c = columnDefinition.cellEditorParams) == null ? void 0 : _c.clearable) ? onClear : void 0,
52922
+ onClear: clearable ? onClear : void 0,
52961
52923
  onSelect,
52962
52924
  options,
52963
52925
  ref,
@@ -53002,14 +52964,12 @@ function useSearch(data, onSearchFunction) {
53002
52964
  setSearchResultOptions
53003
52965
  };
53004
52966
  }
53005
- function useSelectOptions(columnDefinition, data) {
52967
+ function useSelectOptions(selectOptions, data) {
53006
52968
  const [options, setOptions] = React80.useState([]);
53007
52969
  const [loading, setLoading] = React80.useState(false);
53008
52970
  const [totalOptions, setTotalOptions] = React80.useState(0);
53009
52971
  const fetchOptions = async (offset4) => {
53010
- var _a;
53011
52972
  setLoading(true);
53012
- const selectOptions = ((_a = columnDefinition.cellEditorParams) == null ? void 0 : _a.selectOptions) || [];
53013
52973
  let newOptions = [];
53014
52974
  let total = 0;
53015
52975
  if (typeof selectOptions === "function") {
@@ -53041,33 +53001,23 @@ var cx11 = classnames.bind({ ...styles_default, ...truncation_default });
53041
53001
  var Renderer10 = ({
53042
53002
  columnDefinition,
53043
53003
  isGroup,
53044
- value
53004
+ value,
53005
+ typographyProps,
53006
+ placeholder
53045
53007
  }) => {
53046
- var _a, _b, _c, _d;
53008
+ var _a;
53047
53009
  const I18n = useI18nContext();
53048
53010
  if (isEmptyValue(value)) {
53049
53011
  if (isGroup) {
53050
53012
  return null;
53051
53013
  }
53052
53014
  if (columnDefinition.editable) {
53053
- return /* @__PURE__ */ React80.createElement(
53054
- Typography,
53055
- {
53056
- ...getCellValueTypographyProps(
53057
- (_a = columnDefinition.cellRendererParams) == null ? void 0 : _a.typographyProps
53058
- ),
53059
- className: cx11("truncatingText")
53060
- },
53061
- ((_b = columnDefinition.cellEditorParams) == null ? void 0 : _b.placeholder) || I18n.t("dataTable.cells.selectCell.placeholder", {
53062
- label: columnDefinition.headerName
53063
- })
53064
- );
53015
+ return /* @__PURE__ */ React80.createElement(Typography, { ...typographyProps, className: cx11("truncatingText") }, placeholder || I18n.t("dataTable.cells.selectCell.placeholder", {
53016
+ label: columnDefinition.headerName
53017
+ }));
53065
53018
  }
53066
53019
  }
53067
- const internalValue = (_c = columnDefinition.getStringFormattedValue) == null ? void 0 : _c.call(columnDefinition, value);
53068
- const typographyProps = getCellValueTypographyProps(
53069
- (_d = columnDefinition.cellRendererParams) == null ? void 0 : _d.typographyProps
53070
- );
53020
+ const internalValue = (_a = columnDefinition.getStringFormattedValue) == null ? void 0 : _a.call(columnDefinition, value);
53071
53021
  if (isGroup) {
53072
53022
  return /* @__PURE__ */ React80.createElement(
53073
53023
  Typography,
@@ -53083,15 +53033,25 @@ var Renderer10 = ({
53083
53033
  };
53084
53034
  var SelectCellRenderer = withDataTableRenderer(Renderer10, "select");
53085
53035
  var Editor6 = React80.forwardRef(
53086
- ({ columnDefinition, data, setDataValue, stopEditing, value }, ref) => {
53087
- var _a, _b;
53036
+ ({
53037
+ columnDefinition,
53038
+ data,
53039
+ setDataValue,
53040
+ stopEditing,
53041
+ value,
53042
+ clearable,
53043
+ selectOptions,
53044
+ onSearch: onSearchParam,
53045
+ getId: getIdParam,
53046
+ getOptionLabel: getOptionLabelParam
53047
+ }, ref) => {
53088
53048
  const { options, loading, totalOptions, fetchOptions } = useSelectOptions(
53089
- columnDefinition,
53049
+ selectOptions,
53090
53050
  data
53091
53051
  );
53092
53052
  const { onSearch, searchResultOptions, isSearching } = useSearch(
53093
53053
  data,
53094
- (_a = columnDefinition.cellEditorParams) == null ? void 0 : _a.onSearch
53054
+ onSearchParam
53095
53055
  );
53096
53056
  function onSelect(selection) {
53097
53057
  if (selection.item !== value) {
@@ -53114,16 +53074,14 @@ var Editor6 = React80.forwardRef(
53114
53074
  }
53115
53075
  }, 500);
53116
53076
  function getId3(val) {
53117
- var _a2, _b2;
53118
- return ((_b2 = (_a2 = columnDefinition.cellEditorParams) == null ? void 0 : _a2.getId) == null ? void 0 : _b2.call(_a2, val)) ?? val;
53077
+ return (getIdParam == null ? void 0 : getIdParam(val)) ?? val;
53119
53078
  }
53120
53079
  function getLabel3(val) {
53121
- var _a2;
53122
- return (_a2 = columnDefinition.getStringFormattedValue) == null ? void 0 : _a2.call(columnDefinition, val);
53080
+ var _a;
53081
+ return (_a = columnDefinition.getStringFormattedValue) == null ? void 0 : _a.call(columnDefinition, val);
53123
53082
  }
53124
53083
  function getOptionLabel(option) {
53125
- var _a2, _b2;
53126
- return ((_b2 = (_a2 = columnDefinition.cellEditorParams) == null ? void 0 : _a2.getOptionLabel) == null ? void 0 : _b2.call(_a2, option)) || getLabel3(option);
53084
+ return (getOptionLabelParam == null ? void 0 : getOptionLabelParam(option)) || getLabel3(option);
53127
53085
  }
53128
53086
  return /* @__PURE__ */ React80.createElement(
53129
53087
  Select,
@@ -53135,7 +53093,7 @@ var Editor6 = React80.forwardRef(
53135
53093
  loading: isSearching || loading,
53136
53094
  onSearch,
53137
53095
  onSelect,
53138
- onClear: ((_b = columnDefinition.cellEditorParams) == null ? void 0 : _b.clearable) ? onClear : void 0,
53096
+ onClear: clearable ? onClear : void 0,
53139
53097
  onScrollBottom,
53140
53098
  ref,
53141
53099
  className: cx11("input-cell", "truncatingText")
@@ -53159,28 +53117,21 @@ var Renderer11 = ({
53159
53117
  rowHeight,
53160
53118
  node,
53161
53119
  isGroup,
53162
- value
53120
+ value,
53121
+ typographyProps,
53122
+ inputProps
53163
53123
  }) => {
53164
- var _a, _b, _c, _d, _e, _f, _g;
53124
+ var _a;
53165
53125
  const I18n = useI18nContext();
53166
53126
  if (isEmptyValue(value) && columnDefinition.editable) {
53167
53127
  if (isGroup) {
53168
53128
  return null;
53169
53129
  }
53170
- return /* @__PURE__ */ React80.createElement(
53171
- Typography,
53172
- {
53173
- ...getCellValueTypographyProps(
53174
- (_a = columnDefinition.cellRendererParams) == null ? void 0 : _a.typographyProps
53175
- ),
53176
- className: cx12("input-placeholder")
53177
- },
53178
- ((_c = (_b = columnDefinition.cellEditorParams) == null ? void 0 : _b.inputProps) == null ? void 0 : _c.placeholder) || I18n.t("dataTable.cells.textCell.placeholder")
53179
- );
53130
+ return /* @__PURE__ */ React80.createElement(Typography, { ...typographyProps, className: cx12("input-placeholder") }, (inputProps == null ? void 0 : inputProps.placeholder) || I18n.t("dataTable.cells.textCell.placeholder"));
53180
53131
  }
53181
- const internalValue = ((_d = columnDefinition.getStringFormattedValue) == null ? void 0 : _d.call(columnDefinition, value)) ?? value;
53132
+ const internalValue = ((_a = columnDefinition.getStringFormattedValue) == null ? void 0 : _a.call(columnDefinition, value)) ?? value;
53182
53133
  const className = cx12(
53183
- (_f = (_e = columnDefinition.cellRendererParams) == null ? void 0 : _e.typographyProps) == null ? void 0 : _f.className,
53134
+ typographyProps == null ? void 0 : typographyProps.className,
53184
53135
  "textCell",
53185
53136
  "truncatingText",
53186
53137
  {
@@ -53188,9 +53139,6 @@ var Renderer11 = ({
53188
53139
  "truncatingText--lg": rowHeight === rowSize.lg
53189
53140
  }
53190
53141
  );
53191
- const typographyProps = getCellValueTypographyProps(
53192
- (_g = columnDefinition.cellRendererParams) == null ? void 0 : _g.typographyProps
53193
- );
53194
53142
  if (isGroup) {
53195
53143
  const fontWeight = (node == null ? void 0 : node.footer) ? "regular" : "semibold";
53196
53144
  return /* @__PURE__ */ React80.createElement(
@@ -53208,8 +53156,8 @@ var Renderer11 = ({
53208
53156
  };
53209
53157
  var TextCellRenderer = withDataTableRenderer(Renderer11, "input");
53210
53158
  var Editor7 = React80.forwardRef(
53211
- ({ columnDefinition, eventKey, stopEditing, value }, ref) => {
53212
- var _a, _b, _c, _d;
53159
+ ({ columnDefinition, eventKey, stopEditing, value, inputProps }, ref) => {
53160
+ var _a;
53213
53161
  function onBlur(event) {
53214
53162
  stopEditing(ensureIsHTMLElement(event.relatedTarget));
53215
53163
  }
@@ -53218,12 +53166,12 @@ var Editor7 = React80.forwardRef(
53218
53166
  return /* @__PURE__ */ React80.createElement(
53219
53167
  Input,
53220
53168
  {
53221
- placeholder: ((_c = (_b = columnDefinition.cellEditorParams) == null ? void 0 : _b.inputProps) == null ? void 0 : _c.placeholder) || I18n.t("dataTable.cells.textCell.placeholder"),
53222
53169
  className: cx12("input-cell"),
53223
53170
  defaultValue: internalValue,
53224
53171
  onBlur,
53225
53172
  ref,
53226
- ...((_d = columnDefinition.cellEditorParams) == null ? void 0 : _d.inputProps) || {}
53173
+ ...inputProps,
53174
+ placeholder: (inputProps == null ? void 0 : inputProps.placeholder) || I18n.t("dataTable.cells.textCell.placeholder")
53227
53175
  }
53228
53176
  );
53229
53177
  }
@@ -53244,29 +53192,19 @@ var Renderer12 = ({
53244
53192
  columnDefinition,
53245
53193
  node,
53246
53194
  isGroup,
53247
- value
53195
+ value,
53196
+ typographyProps,
53197
+ textAreaProps
53248
53198
  }) => {
53249
- var _a, _b, _c, _d, _e;
53199
+ var _a;
53250
53200
  const I18n = useI18nContext();
53251
53201
  if (isEmptyValue(value) && columnDefinition.editable) {
53252
53202
  if (isGroup) {
53253
53203
  return null;
53254
53204
  }
53255
- return /* @__PURE__ */ React80.createElement(
53256
- Typography,
53257
- {
53258
- ...getCellValueTypographyProps(
53259
- (_a = columnDefinition.cellRendererParams) == null ? void 0 : _a.typographyProps
53260
- ),
53261
- className: cx13("input-placeholder")
53262
- },
53263
- ((_c = (_b = columnDefinition.cellEditorParams) == null ? void 0 : _b.textAreaProps) == null ? void 0 : _c.placeholder) || I18n.t("dataTable.cells.textCell.placeholder")
53264
- );
53205
+ return /* @__PURE__ */ React80.createElement(Typography, { ...typographyProps, className: cx13("input-placeholder") }, (textAreaProps == null ? void 0 : textAreaProps.placeholder) || I18n.t("dataTable.cells.textCell.placeholder"));
53265
53206
  }
53266
- const internalValue = ((_d = columnDefinition.getStringFormattedValue) == null ? void 0 : _d.call(columnDefinition, value)) ?? value;
53267
- const typographyProps = getCellValueTypographyProps(
53268
- (_e = columnDefinition.cellRendererParams) == null ? void 0 : _e.typographyProps
53269
- );
53207
+ const internalValue = ((_a = columnDefinition.getStringFormattedValue) == null ? void 0 : _a.call(columnDefinition, value)) ?? value;
53270
53208
  if (isGroup) {
53271
53209
  const fontWeight = (node == null ? void 0 : node.footer) ? "regular" : "semibold";
53272
53210
  return /* @__PURE__ */ React80.createElement(
@@ -53282,8 +53220,8 @@ var Renderer12 = ({
53282
53220
  return /* @__PURE__ */ React80.createElement(Typography, { ...typographyProps, className: cx13("textarea-cell", "text") }, internalValue);
53283
53221
  };
53284
53222
  var Editor8 = React80.forwardRef(
53285
- ({ columnDefinition, stopEditing, value }, ref) => {
53286
- var _a, _b, _c, _d;
53223
+ ({ columnDefinition, stopEditing, value, textAreaProps }, ref) => {
53224
+ var _a;
53287
53225
  function onBlur(event) {
53288
53226
  stopEditing(ensureIsHTMLElement(event.relatedTarget));
53289
53227
  }
@@ -53292,14 +53230,14 @@ var Editor8 = React80.forwardRef(
53292
53230
  return /* @__PURE__ */ React80.createElement(
53293
53231
  TextArea,
53294
53232
  {
53295
- placeholder: ((_c = (_b = columnDefinition.cellEditorParams) == null ? void 0 : _b.textAreaProps) == null ? void 0 : _c.placeholder) || I18n.t("dataTable.cells.textCell.placeholder"),
53296
53233
  className: cx13("textarea-cell", "editor-text"),
53297
53234
  defaultValue: internalValue,
53298
53235
  onBlur,
53299
53236
  ref,
53300
53237
  resize: "none",
53301
53238
  style: { lineHeight: "16px" },
53302
- ...((_d = columnDefinition.cellEditorParams) == null ? void 0 : _d.textAreaProps) || {}
53239
+ ...textAreaProps,
53240
+ placeholder: (textAreaProps == null ? void 0 : textAreaProps.placeholder) || I18n.t("dataTable.cells.textCell.placeholder")
53303
53241
  }
53304
53242
  );
53305
53243
  }
@@ -55469,19 +55407,15 @@ function getAffectedRows(currentRows, selectionNode, affectedRows) {
55469
55407
  function noop2() {
55470
55408
  }
55471
55409
  function getSelectedState(node, affectedRows) {
55472
- var _a;
55473
55410
  const self = affectedRows[node.id];
55474
55411
  if ((self == null ? void 0 : self.selectedState) === "selected") {
55475
55412
  return true;
55476
- } else if (node.parent && !isNodeRootLevelOfGrid(node.parent) && ((_a = affectedRows[node.parent.id]) == null ? void 0 : _a.selectedState) === "selected") {
55477
- node.setSelected(true, void 0, self == null ? void 0 : self.selectedState);
55478
- affectedRows[node.id] = {
55479
- node,
55480
- selectedState: "selected"
55481
- };
55413
+ } else if (node.isSelected()) {
55414
+ node.setSelected(true, void 0);
55415
+ affectedRows[node.id] = { node, selectedState: "selected" };
55482
55416
  return true;
55483
55417
  } else {
55484
- return !!node.isSelected();
55418
+ return false;
55485
55419
  }
55486
55420
  }
55487
55421
  function getCheckboxState(node, isServerSideDataRequest, rowSelectionRef) {
@@ -55697,11 +55631,8 @@ function getRowActions(actions, rowProps) {
55697
55631
  return actions;
55698
55632
  }
55699
55633
  var InternalRowActionsCellRenderer = (props) => {
55700
- const actions = getRowActions(
55701
- props.columnDefinition.cellRendererParams.actions,
55702
- props
55703
- );
55704
- if (props.rowPinned || props.columnDefinition.cellRendererParams.hideActionsOnGroupedRow && props.isGroup || actions.length === 0) {
55634
+ const actions = getRowActions(props.actions, props);
55635
+ if (props.rowPinned || props.hideActionsOnGroupedRow && props.isGroup || actions.length === 0) {
55705
55636
  return null;
55706
55637
  }
55707
55638
  return /* @__PURE__ */ React80.createElement(
@@ -55973,7 +55904,8 @@ var DataTableCellRenderer = ({
55973
55904
  node,
55974
55905
  editorType,
55975
55906
  value,
55976
- setValue
55907
+ setValue,
55908
+ ...props
55977
55909
  }) => {
55978
55910
  var _a, _b, _c, _d, _e;
55979
55911
  const { columnApi } = useInternalTableContext();
@@ -56004,10 +55936,11 @@ var DataTableCellRenderer = ({
56004
55936
  parentData: context == null ? void 0 : context.parentData,
56005
55937
  parentId: context == null ? void 0 : context.parentId,
56006
55938
  rowHeight,
56007
- rowIndex: node.rowIndex,
56008
55939
  rowPinned: node.rowPinned,
56009
55940
  tableApi: tableRef == null ? void 0 : tableRef.current,
56010
- value
55941
+ value,
55942
+ ...props,
55943
+ typographyProps: getCellValueTypographyProps(props.typographyProps)
56011
55944
  };
56012
55945
  const hasValue = value !== void 0 && value !== null && value !== "";
56013
55946
  const isSelectCellComponent = ((_c = (_b = columnDefinition.cellRendererSelector) == null ? void 0 : _b.call(columnDefinition, {
@@ -56087,7 +56020,8 @@ var DataTableCellEditor = React80.forwardRef(
56087
56020
  node,
56088
56021
  parseValue,
56089
56022
  stopEditing,
56090
- value
56023
+ value,
56024
+ ...props
56091
56025
  }, ref) => {
56092
56026
  var _a;
56093
56027
  const startingValue = getStartingValue(eventKey, editorType, value);
@@ -56198,7 +56132,7 @@ var DataTableCellEditor = React80.forwardRef(
56198
56132
  setCurrentValue(newValue);
56199
56133
  },
56200
56134
  stopEditing: (relatedTarget) => {
56201
- const isRelatedTargetOutsideTable = (relatedTarget == null ? void 0 : relatedTarget.closest('[data-qa="data-table-table')) === null;
56135
+ const isRelatedTargetOutsideTable = (relatedTarget == null ? void 0 : relatedTarget.closest('[data-qa="data-table-table"]')) === null;
56202
56136
  stopEditing(isRelatedTargetOutsideTable);
56203
56137
  if (isRelatedTargetOutsideTable) {
56204
56138
  api.clearFocusedCell();
@@ -56207,7 +56141,8 @@ var DataTableCellEditor = React80.forwardRef(
56207
56141
  },
56208
56142
  tableApi: tableRef == null ? void 0 : tableRef.current,
56209
56143
  value: currentValue,
56210
- ref: handleRefs(editorType)
56144
+ ref: handleRefs(editorType),
56145
+ ...props
56211
56146
  }
56212
56147
  )
56213
56148
  );
@@ -57297,31 +57232,34 @@ function getLabel2(func, option) {
57297
57232
  function getId2(func, option) {
57298
57233
  return (func == null ? void 0 : func(option)) ?? (option == null ? void 0 : option.id) ?? option;
57299
57234
  }
57300
- var InternalMultiSelectCellRenderer = ({ columnDefinition, rowHeight, value }) => {
57301
- var _a, _b, _c, _d;
57235
+ var InternalMultiSelectCellRenderer = ({
57236
+ columnDefinition,
57237
+ rowHeight,
57238
+ value,
57239
+ getValue: getValueParam,
57240
+ enablePlaceholder: enablePlaceholderParam,
57241
+ placeholder: placeholderParam,
57242
+ typographyProps,
57243
+ getLabel: getLabelParam,
57244
+ getId: getIdParam
57245
+ }) => {
57302
57246
  const I18n = useI18nContext();
57303
57247
  const ref = React80.useRef();
57304
57248
  React80.useLayoutEffect(() => {
57305
- var _a2, _b2;
57306
- (_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);
57249
+ var _a, _b;
57250
+ (_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);
57307
57251
  });
57308
57252
  if (value === void 0 || value === null) {
57309
57253
  return null;
57310
57254
  }
57311
- const options = getValue(
57312
- (_a = columnDefinition.cellRendererParams) == null ? void 0 : _a.getValue,
57313
- value,
57314
- emptyArray
57315
- );
57316
- const enablePlaceholder = (((_b = columnDefinition.cellRendererParams) == null ? void 0 : _b.enablePlaceholder) && columnDefinition.editable) ?? false;
57317
- const placeholder = ((_c = columnDefinition.cellRendererParams) == null ? void 0 : _c.placeholder) ?? I18n.t("dataTable.cells.multiSelectCell.placeholder");
57255
+ const options = getValue(getValueParam, value, emptyArray);
57256
+ const enablePlaceholder = (enablePlaceholderParam && columnDefinition.editable) ?? false;
57257
+ const placeholder = placeholderParam ?? I18n.t("dataTable.cells.multiSelectCell.placeholder");
57318
57258
  return /* @__PURE__ */ React80.createElement(
57319
57259
  Typography,
57320
57260
  {
57321
57261
  as: "ol",
57322
- ...getCellValueTypographyProps(
57323
- (_d = columnDefinition.cellRendererParams) == null ? void 0 : _d.typographyProps
57324
- ),
57262
+ ...typographyProps,
57325
57263
  className: cx16("inlineListItems", "truncatingText", {
57326
57264
  "truncatingText--md": rowHeight === rowSize.md,
57327
57265
  "truncatingText--lg": rowHeight === rowSize.lg
@@ -57329,15 +57267,8 @@ var InternalMultiSelectCellRenderer = ({ columnDefinition, rowHeight, value }) =
57329
57267
  ref
57330
57268
  },
57331
57269
  options.length ? options.map((option, idx, arr) => {
57332
- var _a2, _b2;
57333
- const label = getLabel2(
57334
- (_a2 = columnDefinition.cellRendererParams) == null ? void 0 : _a2.getLabel,
57335
- option
57336
- );
57337
- const optionId = getId2(
57338
- (_b2 = columnDefinition.cellRendererParams) == null ? void 0 : _b2.getId,
57339
- option
57340
- );
57270
+ const label = getLabel2(getLabelParam, option);
57271
+ const optionId = getId2(getIdParam, option);
57341
57272
  const key = `${label}_${optionId}_idx_${idx}`;
57342
57273
  return /* @__PURE__ */ React80.createElement(React80.Fragment, { key }, /* @__PURE__ */ React80.createElement("li", null, label, idx !== arr.length - 1 ? commaToken : null));
57343
57274
  }) : enablePlaceholder ? /* @__PURE__ */ React80.createElement("li", { style: { color: colors.gray45 } }, placeholder) : null
@@ -57347,66 +57278,80 @@ var MultiSelectCellRenderer = withDataTableRenderer(
57347
57278
  InternalMultiSelectCellRenderer,
57348
57279
  "select"
57349
57280
  );
57350
- var MultiSelectEditor = React80.forwardRef(({ columnDefinition, value = [], setDataValue, data, stopEditing }, ref) => {
57351
- var _a;
57352
- const [selectedValue, setSelectedValue] = React80.useState(value);
57353
- const { options, loading, totalOptions, fetchOptions } = useSelectOptions(
57281
+ var MultiSelectEditor = React80.forwardRef(
57282
+ ({
57354
57283
  columnDefinition,
57355
- data
57356
- );
57357
- const { onSearch: editorOnSearch } = columnDefinition.cellEditorParams || {};
57358
- const shouldSearch = options.length < totalOptions && !!editorOnSearch;
57359
- const { onSearch, searchResultOptions, setSearchResultOptions, isSearching } = useSearch(data, shouldSearch ? editorOnSearch : void 0);
57360
- async function beforeShow() {
57361
- if (options.length === 0) {
57362
- await fetchOptions();
57284
+ value = [],
57285
+ setDataValue,
57286
+ data,
57287
+ stopEditing,
57288
+ selectOptions,
57289
+ placeholder,
57290
+ onSearch: editorOnSearch,
57291
+ getLabel: getLabelParam,
57292
+ getId: getIdParam
57293
+ }, ref) => {
57294
+ const [selectedValue, setSelectedValue] = React80.useState(value);
57295
+ const { options, loading, totalOptions, fetchOptions } = useSelectOptions(
57296
+ selectOptions,
57297
+ data
57298
+ );
57299
+ const shouldSearch = options.length < totalOptions && !!editorOnSearch;
57300
+ const {
57301
+ onSearch,
57302
+ searchResultOptions,
57303
+ setSearchResultOptions,
57304
+ isSearching
57305
+ } = useSearch(data, shouldSearch ? editorOnSearch : void 0);
57306
+ async function beforeShow() {
57307
+ if (options.length === 0) {
57308
+ await fetchOptions();
57309
+ }
57310
+ return true;
57363
57311
  }
57364
- return true;
57365
- }
57366
- const onScrollBottom = debounce5(async () => {
57367
- if (!searchResultOptions && options.length < totalOptions) {
57368
- const nextOffset = options.length;
57369
- await fetchOptions(nextOffset);
57312
+ const onScrollBottom = debounce5(async () => {
57313
+ if (!searchResultOptions && options.length < totalOptions) {
57314
+ const nextOffset = options.length;
57315
+ await fetchOptions(nextOffset);
57316
+ }
57317
+ }, 500);
57318
+ function onChange(value2) {
57319
+ setSelectedValue(value2);
57320
+ setDataValue(columnDefinition.field, value2);
57321
+ if (searchResultOptions) {
57322
+ setSearchResultOptions(void 0);
57323
+ }
57370
57324
  }
57371
- }, 500);
57372
- function onChange(value2) {
57373
- setSelectedValue(value2);
57374
- setDataValue(columnDefinition.field, value2);
57375
- if (searchResultOptions) {
57376
- setSearchResultOptions(void 0);
57325
+ function getLabel3(func, option) {
57326
+ return (func == null ? void 0 : func(option)) ?? (option == null ? void 0 : option.label) ?? (option == null ? void 0 : option.name) ?? option;
57377
57327
  }
57378
- }
57379
- function getLabel3(func, option) {
57380
- return (func == null ? void 0 : func(option)) ?? (option == null ? void 0 : option.label) ?? (option == null ? void 0 : option.name) ?? option;
57381
- }
57382
- function getId3(func, option) {
57383
- return (func == null ? void 0 : func(option)) ?? (option == null ? void 0 : option.id) ?? option;
57384
- }
57385
- return /* @__PURE__ */ React80.createElement(
57386
- MultiSelect,
57387
- {
57388
- beforeShow,
57389
- afterHide: () => stopEditing(),
57390
- block: true,
57391
- loading: isSearching || loading,
57392
- getId: (option) => {
57393
- var _a2;
57394
- return getId3((_a2 = columnDefinition.cellEditorParams) == null ? void 0 : _a2.getId, option);
57395
- },
57396
- getLabel: (option) => {
57397
- var _a2;
57398
- return getLabel3((_a2 = columnDefinition.cellEditorParams) == null ? void 0 : _a2.getLabel, option);
57399
- },
57400
- placeholder: (_a = columnDefinition.cellEditorParams) == null ? void 0 : _a.placeholder,
57401
- onScrollBottom,
57402
- onSearch,
57403
- onChange,
57404
- options: searchResultOptions || options,
57405
- value: selectedValue,
57406
- ref
57328
+ function getId3(func, option) {
57329
+ return (func == null ? void 0 : func(option)) ?? (option == null ? void 0 : option.id) ?? option;
57407
57330
  }
57408
- );
57409
- });
57331
+ return /* @__PURE__ */ React80.createElement(
57332
+ MultiSelect,
57333
+ {
57334
+ beforeShow,
57335
+ afterHide: () => stopEditing(),
57336
+ block: true,
57337
+ loading: isSearching || loading,
57338
+ getId: (option) => {
57339
+ return getId3(getIdParam, option);
57340
+ },
57341
+ getLabel: (option) => {
57342
+ return getLabel3(getLabelParam, option);
57343
+ },
57344
+ placeholder,
57345
+ onScrollBottom,
57346
+ onSearch,
57347
+ onChange,
57348
+ options: searchResultOptions || options,
57349
+ value: selectedValue,
57350
+ ref
57351
+ }
57352
+ );
57353
+ }
57354
+ );
57410
57355
  var MultiSelectCellEditor = withDataTableEditor(
57411
57356
  MultiSelectEditor,
57412
57357
  "select"
@@ -108245,7 +108190,8 @@ var DataTable = ({
108245
108190
  showExpandCollapseAllToggle,
108246
108191
  translations: translations2 = {},
108247
108192
  enableCellTextSelection,
108248
- localStoragePersistenceKey
108193
+ localStoragePersistenceKey,
108194
+ enableCDN
108249
108195
  }) => {
108250
108196
  const initialTableConfig = localStoragePersistenceKey && storage.local.getItem(localStoragePersistenceKey) || _initialTableConfig;
108251
108197
  const onServerSideDataRequestRef = React80.useRef(onServerSideDataRequest);
@@ -108257,14 +108203,28 @@ var DataTable = ({
108257
108203
  );
108258
108204
  const contextPanel = useContextPanel();
108259
108205
  const clientI18n = useI18nContext();
108206
+ const isCDNEnabled = isCDNFeatureFlagEnabled(clientI18n, enableCDN);
108207
+ const cdnTranslations = useRequestTranslations(
108208
+ {
108209
+ locale: clientI18n.locale,
108210
+ type: "file",
108211
+ absolute_file_path: (locale) => `core/packages/data-table/src/locales/${locale}.json`
108212
+ },
108213
+ { en: translations.en, pseudo: translations.pseudo },
108214
+ {
108215
+ oldTranslations: translations,
108216
+ enableCDN: isCDNEnabled
108217
+ }
108218
+ );
108260
108219
  const internalI18n = useI18n({
108261
- ...clientI18n,
108220
+ locale: clientI18n.locale,
108262
108221
  translations: mergeDeepLeft(
108263
108222
  mergeDeepLeft(clientI18n.translations, {
108264
108223
  [clientI18n.locale]: translations2
108265
108224
  }),
108266
- translations
108267
- )
108225
+ cdnTranslations.translations
108226
+ ),
108227
+ enableCDN: isCDNEnabled
108268
108228
  });
108269
108229
  const rowSelectionRef = React80.useRef({
108270
108230
  affectedRows: {},
@@ -109394,7 +109354,10 @@ var Table = (props) => {
109394
109354
  groupDefaultExpanded: props.groupsAlwaysExpanded ? -1 : props.groupDefaultExpanded,
109395
109355
  groupIncludeFooter: !onSSDR && props.groupIncludeFooter === void 0 ? true : props.groupIncludeFooter,
109396
109356
  getGroupRowAgg: props.getGroupRowAgg ? getGroupRowAgg : void 0,
109397
- groupSelectsChildren: internalTableContext.totalRowCount > 0 && props.groupSelectsChildren || !onSSDR,
109357
+ groupSelectsChildren: (
109358
+ // Always true for client side, defaults to true for server side
109359
+ internalTableContext.totalRowCount > 0 && props.groupSelectsChildren !== false || !onSSDR
109360
+ ),
109398
109361
  groupSelectsFiltered: true,
109399
109362
  headerHeight: props.headerHeight,
109400
109363
  icons: tableIcons,
@@ -111527,7 +111490,8 @@ var ClientSideDataTable = ({
111527
111490
  onTableConfigChange,
111528
111491
  translations: translations2 = {},
111529
111492
  enableCellTextSelection,
111530
- localStoragePersistenceKey
111493
+ localStoragePersistenceKey,
111494
+ enableCDN
111531
111495
  }) => {
111532
111496
  return /* @__PURE__ */ React80.createElement(
111533
111497
  DataTable,
@@ -111545,7 +111509,8 @@ var ClientSideDataTable = ({
111545
111509
  translations: translations2,
111546
111510
  localStoragePersistenceKey,
111547
111511
  customBulkEditorFields,
111548
- enableCellTextSelection
111512
+ enableCellTextSelection,
111513
+ enableCDN
111549
111514
  },
111550
111515
  children
111551
111516
  );
@@ -115936,7 +115901,8 @@ var ServerSideDataTable = ({
115936
115901
  enableCellTextSelection,
115937
115902
  showExpandCollapseAllToggle,
115938
115903
  translations: translations2 = {},
115939
- localStoragePersistenceKey
115904
+ localStoragePersistenceKey,
115905
+ enableCDN
115940
115906
  }) => {
115941
115907
  return /* @__PURE__ */ React80.createElement(
115942
115908
  DataTable,
@@ -115955,7 +115921,8 @@ var ServerSideDataTable = ({
115955
115921
  translations: translations2,
115956
115922
  customBulkEditorFields,
115957
115923
  enableCellTextSelection,
115958
- localStoragePersistenceKey
115924
+ localStoragePersistenceKey,
115925
+ enableCDN
115959
115926
  },
115960
115927
  children
115961
115928
  );