@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.
- package/CHANGELOG.md +24 -0
- package/dist/legacy/index.cjs +378 -411
- package/dist/legacy/index.d.cts +61 -55
- package/dist/legacy/index.d.ts +61 -55
- package/dist/legacy/index.js +378 -411
- package/dist/modern/index.cjs +357 -362
- package/dist/modern/index.d.cts +61 -55
- package/dist/modern/index.d.ts +61 -55
- package/dist/modern/index.js +357 -362
- package/package.json +36 -37
package/dist/modern/index.cjs
CHANGED
|
@@ -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');
|
|
@@ -7995,31 +7996,15 @@ var styles_default = {
|
|
|
7995
7996
|
"spin": "_spin_if78k_1"
|
|
7996
7997
|
};
|
|
7997
7998
|
|
|
7998
|
-
// src/utils/getCellValueTypographyProps.ts
|
|
7999
|
-
function getCellValueTypographyProps(typographyProps) {
|
|
8000
|
-
return {
|
|
8001
|
-
intent: "small",
|
|
8002
|
-
...typographyProps ?? {}
|
|
8003
|
-
};
|
|
8004
|
-
}
|
|
8005
|
-
|
|
8006
7999
|
// src/CellRenderers/BooleanCell.tsx
|
|
8007
8000
|
var cx = classnames__default.default.bind(styles_default);
|
|
8008
|
-
var InternalBooleanCellRenderer = ({
|
|
8001
|
+
var InternalBooleanCellRenderer = ({ isGroup, value, typographyProps }) => {
|
|
8009
8002
|
const I18n = coreReact.useI18nContext();
|
|
8010
8003
|
const internalValue = value ? I18n.t("dataTable.cells.booleanCell.options.yes") : I18n.t("dataTable.cells.booleanCell.options.no");
|
|
8011
8004
|
if (isGroup) {
|
|
8012
8005
|
return null;
|
|
8013
8006
|
}
|
|
8014
|
-
return /* @__PURE__ */ React80__default.default.createElement(
|
|
8015
|
-
coreReact.Typography,
|
|
8016
|
-
{
|
|
8017
|
-
...getCellValueTypographyProps(
|
|
8018
|
-
columnDefinition.cellRendererParams?.typographyProps
|
|
8019
|
-
)
|
|
8020
|
-
},
|
|
8021
|
-
internalValue
|
|
8022
|
-
);
|
|
8007
|
+
return /* @__PURE__ */ React80__default.default.createElement(coreReact.Typography, { ...typographyProps }, internalValue);
|
|
8023
8008
|
};
|
|
8024
8009
|
var BooleanCellRenderer = withDataTableRenderer(
|
|
8025
8010
|
InternalBooleanCellRenderer,
|
|
@@ -8060,12 +8045,13 @@ var BooleanCellEditor = withDataTableEditor(
|
|
|
8060
8045
|
var Renderer = ({
|
|
8061
8046
|
columnDefinition,
|
|
8062
8047
|
rowPinned,
|
|
8048
|
+
buttons,
|
|
8063
8049
|
...props
|
|
8064
8050
|
}) => {
|
|
8065
8051
|
if (rowPinned) {
|
|
8066
8052
|
return null;
|
|
8067
8053
|
}
|
|
8068
|
-
return /* @__PURE__ */ React80__default.default.createElement(coreReact.FlexList, { justifyContent: "center", alignItems: "center", size: "xs" },
|
|
8054
|
+
return /* @__PURE__ */ React80__default.default.createElement(coreReact.FlexList, { justifyContent: "center", alignItems: "center", size: "xs" }, buttons.map((Button6) => /* @__PURE__ */ React80__default.default.createElement(
|
|
8069
8055
|
Button6,
|
|
8070
8056
|
{
|
|
8071
8057
|
key: Button6.displayName,
|
|
@@ -8167,10 +8153,12 @@ function ContactItem({
|
|
|
8167
8153
|
|
|
8168
8154
|
// src/CellRenderers/CompanyCell.tsx
|
|
8169
8155
|
var Renderer2 = ({
|
|
8170
|
-
columnDefinition,
|
|
8171
8156
|
rowHeight,
|
|
8172
8157
|
isGroup,
|
|
8173
|
-
value
|
|
8158
|
+
value,
|
|
8159
|
+
getCompanyName,
|
|
8160
|
+
getImageURL,
|
|
8161
|
+
typographyProps
|
|
8174
8162
|
}) => {
|
|
8175
8163
|
const [showAvatar, setShowAvatar] = React80__default.default.useState(false);
|
|
8176
8164
|
React80__default.default.useEffect(() => {
|
|
@@ -8179,18 +8167,9 @@ var Renderer2 = ({
|
|
|
8179
8167
|
if (value === void 0 || value === null) {
|
|
8180
8168
|
return null;
|
|
8181
8169
|
}
|
|
8182
|
-
const companyName = isGroup ? value :
|
|
8183
|
-
const imageURL =
|
|
8184
|
-
return isGroup ? /* @__PURE__ */ React80__default.default.createElement(
|
|
8185
|
-
coreReact.Typography,
|
|
8186
|
-
{
|
|
8187
|
-
...getCellValueTypographyProps(
|
|
8188
|
-
columnDefinition.cellRendererParams?.typographyProps
|
|
8189
|
-
),
|
|
8190
|
-
weight: "semibold"
|
|
8191
|
-
},
|
|
8192
|
-
companyName
|
|
8193
|
-
) : /* @__PURE__ */ React80__default.default.createElement(
|
|
8170
|
+
const companyName = isGroup ? value : getCompanyName?.(value) ?? value.name;
|
|
8171
|
+
const imageURL = getImageURL?.(value);
|
|
8172
|
+
return isGroup ? /* @__PURE__ */ React80__default.default.createElement(coreReact.Typography, { ...typographyProps, weight: "semibold" }, companyName) : /* @__PURE__ */ React80__default.default.createElement(
|
|
8194
8173
|
ContactItem,
|
|
8195
8174
|
{
|
|
8196
8175
|
imageUrl: showAvatar ? imageURL : void 0,
|
|
@@ -8225,28 +8204,19 @@ var Renderer3 = ({
|
|
|
8225
8204
|
columnDefinition,
|
|
8226
8205
|
isGroup,
|
|
8227
8206
|
rowPinned,
|
|
8228
|
-
value
|
|
8207
|
+
value,
|
|
8208
|
+
typographyProps,
|
|
8209
|
+
formatConfig,
|
|
8210
|
+
inputProps
|
|
8229
8211
|
}) => {
|
|
8230
8212
|
const I18n = coreReact.useI18nContext();
|
|
8231
|
-
const internalValue = value !== void 0 && labsFinancialsUtils.formatCurrency(
|
|
8232
|
-
value?.toString(),
|
|
8233
|
-
columnDefinition.cellRendererParams?.formatConfig
|
|
8234
|
-
) || void 0;
|
|
8213
|
+
const internalValue = value !== void 0 && labsFinancialsUtils.formatCurrency(value?.toString(), formatConfig) || void 0;
|
|
8235
8214
|
if (isEmptyValue(value)) {
|
|
8236
8215
|
if (isGroup) {
|
|
8237
8216
|
return null;
|
|
8238
8217
|
}
|
|
8239
8218
|
if (columnDefinition.editable) {
|
|
8240
|
-
return /* @__PURE__ */ React80__default.default.createElement(
|
|
8241
|
-
coreReact.Typography,
|
|
8242
|
-
{
|
|
8243
|
-
...getCellValueTypographyProps(
|
|
8244
|
-
columnDefinition.cellRendererParams?.typographyProps
|
|
8245
|
-
),
|
|
8246
|
-
className: cx3("input-placeholder")
|
|
8247
|
-
},
|
|
8248
|
-
columnDefinition.cellEditorParams?.inputProps?.placeholder || I18n.t("dataTable.cells.currencyCell.placeholder")
|
|
8249
|
-
);
|
|
8219
|
+
return /* @__PURE__ */ React80__default.default.createElement(coreReact.Typography, { ...typographyProps, className: cx3("input-placeholder") }, inputProps?.placeholder || I18n.t("dataTable.cells.currencyCell.placeholder"));
|
|
8250
8220
|
}
|
|
8251
8221
|
}
|
|
8252
8222
|
if (isGroup) {
|
|
@@ -8263,10 +8233,8 @@ var Renderer3 = ({
|
|
|
8263
8233
|
return /* @__PURE__ */ React80__default.default.createElement(
|
|
8264
8234
|
coreReact.Typography,
|
|
8265
8235
|
{
|
|
8266
|
-
...
|
|
8267
|
-
|
|
8268
|
-
),
|
|
8269
|
-
weight: rowPinned ? "bold" : columnDefinition.cellRendererParams?.typographyProps?.weight,
|
|
8236
|
+
...typographyProps,
|
|
8237
|
+
weight: rowPinned ? "bold" : typographyProps?.weight,
|
|
8270
8238
|
className: cx3("tabular-nums")
|
|
8271
8239
|
},
|
|
8272
8240
|
internalValue
|
|
@@ -8274,7 +8242,14 @@ var Renderer3 = ({
|
|
|
8274
8242
|
};
|
|
8275
8243
|
var CurrencyCellRenderer = withDataTableRenderer(Renderer3, "input");
|
|
8276
8244
|
var Editor = React80__default.default.forwardRef(
|
|
8277
|
-
({
|
|
8245
|
+
({
|
|
8246
|
+
columnDefinition,
|
|
8247
|
+
eventKey,
|
|
8248
|
+
stopEditing,
|
|
8249
|
+
value,
|
|
8250
|
+
formatConfig,
|
|
8251
|
+
inputProps
|
|
8252
|
+
}, ref) => {
|
|
8278
8253
|
const I18n = coreReact.useI18nContext();
|
|
8279
8254
|
if (isEmptyValue(value) && !columnDefinition.editable) {
|
|
8280
8255
|
return null;
|
|
@@ -8283,19 +8258,20 @@ var Editor = React80__default.default.forwardRef(
|
|
|
8283
8258
|
stopEditing(ensureIsHTMLElement(event.relatedTarget));
|
|
8284
8259
|
}
|
|
8285
8260
|
const defaultValue = eventKey ? value : labsFinancialsUtils.formatNumber(value, {
|
|
8286
|
-
...
|
|
8261
|
+
...formatConfig || columnDefinition.cellRendererParams?.formatConfig,
|
|
8262
|
+
//TODO remove usage of columnDefinition.cellRendererParams in next major version
|
|
8287
8263
|
symbol: void 0,
|
|
8288
8264
|
symbolAfterValue: void 0
|
|
8289
8265
|
});
|
|
8290
8266
|
return /* @__PURE__ */ React80__default.default.createElement(
|
|
8291
8267
|
coreReact.Input,
|
|
8292
8268
|
{
|
|
8293
|
-
placeholder:
|
|
8269
|
+
placeholder: inputProps?.placeholder || I18n.t("dataTable.cells.currencyCell.placeholder"),
|
|
8294
8270
|
defaultValue,
|
|
8295
8271
|
onBlur,
|
|
8296
8272
|
ref,
|
|
8297
8273
|
className: cx3("input-cell", "input-cell--right-aligned"),
|
|
8298
|
-
...
|
|
8274
|
+
...inputProps
|
|
8299
8275
|
}
|
|
8300
8276
|
);
|
|
8301
8277
|
}
|
|
@@ -8707,6 +8683,14 @@ var DateFilterTokenText = ({
|
|
|
8707
8683
|
};
|
|
8708
8684
|
var DateFilterRenderer_default = DateFilterRenderer;
|
|
8709
8685
|
|
|
8686
|
+
// src/utils/getCellValueTypographyProps.ts
|
|
8687
|
+
function getCellValueTypographyProps(typographyProps) {
|
|
8688
|
+
return {
|
|
8689
|
+
intent: "small",
|
|
8690
|
+
...typographyProps
|
|
8691
|
+
};
|
|
8692
|
+
}
|
|
8693
|
+
|
|
8710
8694
|
// src/CellRenderers/DateCell.tsx
|
|
8711
8695
|
var cx4 = classnames__default.default.bind(styles_default);
|
|
8712
8696
|
function getDateObject(date) {
|
|
@@ -8793,36 +8777,32 @@ function getDateObject2(date) {
|
|
|
8793
8777
|
return date;
|
|
8794
8778
|
}
|
|
8795
8779
|
var DateTimeCellValue = ({
|
|
8796
|
-
columnDefinition,
|
|
8797
8780
|
isGroup,
|
|
8798
|
-
value
|
|
8781
|
+
value,
|
|
8782
|
+
typographyProps,
|
|
8783
|
+
dateFormatType
|
|
8799
8784
|
}) => {
|
|
8800
8785
|
const { format: format3 } = coreReact.useDateTime();
|
|
8801
8786
|
if (isGroup || isEmptyValue(value)) {
|
|
8802
8787
|
return null;
|
|
8803
8788
|
}
|
|
8804
8789
|
const parsedValue = getDateObject2(value);
|
|
8805
|
-
const internalValue = parsedValue ? format3(
|
|
8806
|
-
parsedValue,
|
|
8807
|
-
columnDefinition.cellRendererParams?.dateFormatType || "abbr-weekday-abbr-date-at-time"
|
|
8808
|
-
) : void 0;
|
|
8809
|
-
const typographyProps = getCellValueTypographyProps(
|
|
8810
|
-
columnDefinition.cellRendererParams?.typographyProps
|
|
8811
|
-
);
|
|
8790
|
+
const internalValue = parsedValue ? format3(parsedValue, dateFormatType || "abbr-weekday-abbr-date-at-time") : void 0;
|
|
8812
8791
|
return /* @__PURE__ */ React80__default.default.createElement(coreReact.Typography, { ...typographyProps }, internalValue);
|
|
8813
8792
|
};
|
|
8814
8793
|
var Renderer5 = (props) => {
|
|
8815
|
-
return /* @__PURE__ */ React80__default.default.createElement(
|
|
8816
|
-
OptionalDateTimeProvider,
|
|
8817
|
-
{
|
|
8818
|
-
timeZone: props.columnDefinition?.cellRendererParams?.timeZone
|
|
8819
|
-
},
|
|
8820
|
-
/* @__PURE__ */ React80__default.default.createElement(DateTimeCellValue, { ...props })
|
|
8821
|
-
);
|
|
8794
|
+
return /* @__PURE__ */ React80__default.default.createElement(OptionalDateTimeProvider, { timeZone: props.timeZone }, /* @__PURE__ */ React80__default.default.createElement(DateTimeCellValue, { ...props }));
|
|
8822
8795
|
};
|
|
8823
8796
|
var DateTimeCellRenderer = withDataTableRenderer(Renderer5, "date");
|
|
8824
8797
|
var Editor3 = React80__default.default.forwardRef(
|
|
8825
|
-
({
|
|
8798
|
+
({
|
|
8799
|
+
columnDefinition,
|
|
8800
|
+
setDataValue,
|
|
8801
|
+
stopEditing,
|
|
8802
|
+
value,
|
|
8803
|
+
timeZone,
|
|
8804
|
+
disabledDate
|
|
8805
|
+
}, ref) => {
|
|
8826
8806
|
function afterHide(event) {
|
|
8827
8807
|
stopEditing(ensureIsHTMLElement(event?.target));
|
|
8828
8808
|
}
|
|
@@ -8833,23 +8813,17 @@ var Editor3 = React80__default.default.forwardRef(
|
|
|
8833
8813
|
setDataValue(columnDefinition.field, void 0);
|
|
8834
8814
|
}
|
|
8835
8815
|
}
|
|
8836
|
-
return /* @__PURE__ */ React80__default.default.createElement(
|
|
8837
|
-
|
|
8816
|
+
return /* @__PURE__ */ React80__default.default.createElement(OptionalDateTimeProvider, { timeZone }, /* @__PURE__ */ React80__default.default.createElement(
|
|
8817
|
+
coreReact.DateSelect,
|
|
8838
8818
|
{
|
|
8839
|
-
|
|
8840
|
-
|
|
8841
|
-
|
|
8842
|
-
|
|
8843
|
-
|
|
8844
|
-
|
|
8845
|
-
|
|
8846
|
-
|
|
8847
|
-
onChange,
|
|
8848
|
-
ref,
|
|
8849
|
-
value: getDateObject2(value)
|
|
8850
|
-
}
|
|
8851
|
-
)
|
|
8852
|
-
);
|
|
8819
|
+
afterHide,
|
|
8820
|
+
className: cx5("input-cell"),
|
|
8821
|
+
disabledDate,
|
|
8822
|
+
onChange,
|
|
8823
|
+
ref,
|
|
8824
|
+
value: getDateObject2(value)
|
|
8825
|
+
}
|
|
8826
|
+
));
|
|
8853
8827
|
}
|
|
8854
8828
|
);
|
|
8855
8829
|
var DateTimeCellEditor = withDataTableEditor(Editor3, "date");
|
|
@@ -52375,15 +52349,21 @@ globalObj.MouseEvent = typeof MouseEvent === "undefined" ? {} : MouseEvent;
|
|
|
52375
52349
|
var GroupCellRenderer2 = GroupCellRenderer;
|
|
52376
52350
|
var cx6 = classnames__default.default.bind(truncation_default);
|
|
52377
52351
|
var MIN_LINK_WIDTH = 48;
|
|
52378
|
-
var InternalLinkCellRenderer = ({
|
|
52352
|
+
var InternalLinkCellRenderer = ({
|
|
52353
|
+
columnDefinition,
|
|
52354
|
+
isGroup,
|
|
52355
|
+
data,
|
|
52356
|
+
rowHeight,
|
|
52357
|
+
value,
|
|
52358
|
+
typographyProps,
|
|
52359
|
+
isExternalLink,
|
|
52360
|
+
getURL
|
|
52361
|
+
}) => {
|
|
52379
52362
|
const [isLinkWidthBelowMin, setIsLinkWidthBelowMin] = React80.useState(false);
|
|
52380
52363
|
const linkRef = React80.useRef(null);
|
|
52381
52364
|
const internalValue = value ? columnDefinition.getStringFormattedValue?.(value) : "";
|
|
52382
|
-
const typographyProps = getCellValueTypographyProps(
|
|
52383
|
-
columnDefinition.cellRendererParams?.typographyProps
|
|
52384
|
-
);
|
|
52385
52365
|
const className = cx6(
|
|
52386
|
-
|
|
52366
|
+
typographyProps?.className,
|
|
52387
52367
|
"textCell",
|
|
52388
52368
|
"truncatingText",
|
|
52389
52369
|
{
|
|
@@ -52401,8 +52381,7 @@ var InternalLinkCellRenderer = ({ columnDefinition, isGroup, data, rowHeight, va
|
|
|
52401
52381
|
setIsLinkWidthBelowMin(width < MIN_LINK_WIDTH);
|
|
52402
52382
|
}
|
|
52403
52383
|
}, [internalValue]);
|
|
52404
|
-
const
|
|
52405
|
-
const URL = columnDefinition.cellRendererParams.getURL(value, data);
|
|
52384
|
+
const URL = getURL(value, data);
|
|
52406
52385
|
const extendClickableAreaClassNames = isLinkWidthBelowMin ? cx6("extendClickableArea", {
|
|
52407
52386
|
"extendClickableArea--rowHeightSm": rowHeight === rowSize.sm
|
|
52408
52387
|
}) : "";
|
|
@@ -52432,23 +52411,22 @@ var LinkCellRenderer = withDataTableRenderer(
|
|
|
52432
52411
|
"input"
|
|
52433
52412
|
);
|
|
52434
52413
|
var cx7 = classnames__default.default.bind(styles_default);
|
|
52435
|
-
var InternalNumberCellRenderer = ({
|
|
52414
|
+
var InternalNumberCellRenderer = ({
|
|
52415
|
+
columnDefinition,
|
|
52416
|
+
rowPinned,
|
|
52417
|
+
isGroup,
|
|
52418
|
+
value,
|
|
52419
|
+
typographyProps,
|
|
52420
|
+
inputProps,
|
|
52421
|
+
formatConfig
|
|
52422
|
+
}) => {
|
|
52436
52423
|
const I18n = coreReact.useI18nContext();
|
|
52437
52424
|
if (isEmptyValue(value)) {
|
|
52438
52425
|
if (isGroup) {
|
|
52439
52426
|
return null;
|
|
52440
52427
|
}
|
|
52441
52428
|
if (columnDefinition.editable) {
|
|
52442
|
-
return /* @__PURE__ */ React80__default.default.createElement(
|
|
52443
|
-
coreReact.Typography,
|
|
52444
|
-
{
|
|
52445
|
-
...getCellValueTypographyProps(
|
|
52446
|
-
columnDefinition.cellRendererParams?.typographyProps
|
|
52447
|
-
),
|
|
52448
|
-
className: cx7("input-placeholder")
|
|
52449
|
-
},
|
|
52450
|
-
columnDefinition.cellEditorParams?.inputProps?.placeholder || I18n.t("dataTable.cells.numberCell.placeholder")
|
|
52451
|
-
);
|
|
52429
|
+
return /* @__PURE__ */ React80__default.default.createElement(coreReact.Typography, { ...typographyProps, className: cx7("input-placeholder") }, inputProps?.placeholder || I18n.t("dataTable.cells.numberCell.placeholder"));
|
|
52452
52430
|
}
|
|
52453
52431
|
return /* @__PURE__ */ React80__default.default.createElement(React80__default.default.Fragment, null);
|
|
52454
52432
|
}
|
|
@@ -52457,7 +52435,7 @@ var InternalNumberCellRenderer = ({ columnDefinition, rowPinned, isGroup, value
|
|
|
52457
52435
|
minDecimalPrecision: 0,
|
|
52458
52436
|
shouldUseGtk: true,
|
|
52459
52437
|
symbol: "",
|
|
52460
|
-
...
|
|
52438
|
+
...formatConfig
|
|
52461
52439
|
});
|
|
52462
52440
|
if (isGroup) {
|
|
52463
52441
|
return /* @__PURE__ */ React80__default.default.createElement(coreReact.Typography, { intent: "small", weight: "semibold" }, internalValue);
|
|
@@ -52465,10 +52443,8 @@ var InternalNumberCellRenderer = ({ columnDefinition, rowPinned, isGroup, value
|
|
|
52465
52443
|
return /* @__PURE__ */ React80__default.default.createElement(
|
|
52466
52444
|
coreReact.Typography,
|
|
52467
52445
|
{
|
|
52468
|
-
...
|
|
52469
|
-
|
|
52470
|
-
),
|
|
52471
|
-
weight: rowPinned ? "bold" : columnDefinition.cellRendererParams?.typographyProps?.weight
|
|
52446
|
+
...typographyProps,
|
|
52447
|
+
weight: rowPinned ? "bold" : typographyProps?.weight
|
|
52472
52448
|
},
|
|
52473
52449
|
internalValue
|
|
52474
52450
|
);
|
|
@@ -52477,7 +52453,7 @@ var NumberCellRenderer = withDataTableRenderer(
|
|
|
52477
52453
|
InternalNumberCellRenderer,
|
|
52478
52454
|
"input"
|
|
52479
52455
|
);
|
|
52480
|
-
var InternalNumberCellEditor = React80__default.default.forwardRef(({ columnDefinition, stopEditing, value }, ref) => {
|
|
52456
|
+
var InternalNumberCellEditor = React80__default.default.forwardRef(({ columnDefinition, stopEditing, value, inputProps }, ref) => {
|
|
52481
52457
|
const I18n = coreReact.useI18nContext();
|
|
52482
52458
|
if (isEmptyValue(value) && !columnDefinition.editable) {
|
|
52483
52459
|
return null;
|
|
@@ -52488,13 +52464,13 @@ var InternalNumberCellEditor = React80__default.default.forwardRef(({ columnDefi
|
|
|
52488
52464
|
return /* @__PURE__ */ React80__default.default.createElement(
|
|
52489
52465
|
coreReact.Input,
|
|
52490
52466
|
{
|
|
52491
|
-
placeholder:
|
|
52467
|
+
placeholder: inputProps?.placeholder || I18n.t("dataTable.cells.numberCell.placeholder"),
|
|
52492
52468
|
type: "number",
|
|
52493
52469
|
defaultValue: value,
|
|
52494
52470
|
onBlur,
|
|
52495
52471
|
ref,
|
|
52496
52472
|
className: cx7("input-cell", "input-cell--right-aligned"),
|
|
52497
|
-
...
|
|
52473
|
+
...inputProps
|
|
52498
52474
|
}
|
|
52499
52475
|
);
|
|
52500
52476
|
});
|
|
@@ -52575,35 +52551,41 @@ var defaultAvatarStackItemFilter = (person) => !!person || !!person.id;
|
|
|
52575
52551
|
var Renderer6 = ({
|
|
52576
52552
|
columnDefinition,
|
|
52577
52553
|
rowHeight,
|
|
52578
|
-
value
|
|
52554
|
+
value,
|
|
52555
|
+
getValue: getValue2,
|
|
52556
|
+
getCompanyName: getCompanyNameParam,
|
|
52557
|
+
getPersonName: getPersonNameParam,
|
|
52558
|
+
getInitials,
|
|
52559
|
+
getImageURL,
|
|
52560
|
+
typographyProps
|
|
52579
52561
|
}) => {
|
|
52580
52562
|
const [fullCellView, setFullCellView] = React80__default.default.useState(false);
|
|
52581
52563
|
const getPeople = React80__default.default.useCallback(() => {
|
|
52582
|
-
return
|
|
52583
|
-
}, [
|
|
52564
|
+
return getValue2?.(value) || value || [];
|
|
52565
|
+
}, [getValue2, value]);
|
|
52584
52566
|
const getCompanyName = React80__default.default.useCallback(
|
|
52585
52567
|
(person) => {
|
|
52586
|
-
return
|
|
52568
|
+
return getCompanyNameParam?.(person) ?? person.company ?? "";
|
|
52587
52569
|
},
|
|
52588
|
-
[
|
|
52570
|
+
[getCompanyNameParam]
|
|
52589
52571
|
);
|
|
52590
52572
|
const getPersonName = React80__default.default.useCallback(
|
|
52591
52573
|
(person) => {
|
|
52592
|
-
return
|
|
52574
|
+
return getPersonNameParam?.(person) ?? person.name ?? "";
|
|
52593
52575
|
},
|
|
52594
|
-
[
|
|
52576
|
+
[getPersonNameParam]
|
|
52595
52577
|
);
|
|
52596
52578
|
const getPersonImageUrl = React80__default.default.useCallback(
|
|
52597
52579
|
(person) => {
|
|
52598
|
-
return
|
|
52580
|
+
return getImageURL?.(person) ?? "";
|
|
52599
52581
|
},
|
|
52600
|
-
[
|
|
52582
|
+
[getImageURL]
|
|
52601
52583
|
);
|
|
52602
52584
|
const getPersonInitials = React80__default.default.useCallback(
|
|
52603
52585
|
(person) => {
|
|
52604
|
-
return
|
|
52586
|
+
return getInitials?.(person) ?? "";
|
|
52605
52587
|
},
|
|
52606
|
-
[
|
|
52588
|
+
[getInitials]
|
|
52607
52589
|
);
|
|
52608
52590
|
const getPersonNameWithCompany = React80__default.default.useCallback(
|
|
52609
52591
|
(person) => {
|
|
@@ -52631,9 +52613,6 @@ var Renderer6 = ({
|
|
|
52631
52613
|
}
|
|
52632
52614
|
return avatarWidth * avatarCount;
|
|
52633
52615
|
}, [getPeople, rowHeight]);
|
|
52634
|
-
const typographyProps = getCellValueTypographyProps(
|
|
52635
|
-
columnDefinition.cellRendererParams?.typographyProps
|
|
52636
|
-
);
|
|
52637
52616
|
const people = getPeople();
|
|
52638
52617
|
if (isEmptyValue(value) || people.length === 0) {
|
|
52639
52618
|
return null;
|
|
@@ -52742,7 +52721,10 @@ var Renderer7 = ({
|
|
|
52742
52721
|
columnDefinition,
|
|
52743
52722
|
isGroup,
|
|
52744
52723
|
rowPinned,
|
|
52745
|
-
value
|
|
52724
|
+
value,
|
|
52725
|
+
typographyProps,
|
|
52726
|
+
inputProps,
|
|
52727
|
+
formatConfig
|
|
52746
52728
|
}) => {
|
|
52747
52729
|
const I18n = coreReact.useI18nContext();
|
|
52748
52730
|
if (isEmptyValue(value)) {
|
|
@@ -52750,22 +52732,10 @@ var Renderer7 = ({
|
|
|
52750
52732
|
return null;
|
|
52751
52733
|
}
|
|
52752
52734
|
if (columnDefinition.editable) {
|
|
52753
|
-
return /* @__PURE__ */ React80__default.default.createElement(
|
|
52754
|
-
coreReact.Typography,
|
|
52755
|
-
{
|
|
52756
|
-
...getCellValueTypographyProps(
|
|
52757
|
-
columnDefinition.cellRendererParams?.typographyProps
|
|
52758
|
-
),
|
|
52759
|
-
className: cx9("input-placeholder")
|
|
52760
|
-
},
|
|
52761
|
-
columnDefinition.cellEditorParams?.inputProps?.placeholder || I18n.t("dataTable.cells.percentCell.placeholder")
|
|
52762
|
-
);
|
|
52735
|
+
return /* @__PURE__ */ React80__default.default.createElement(coreReact.Typography, { ...typographyProps, className: cx9("input-placeholder") }, inputProps?.placeholder || I18n.t("dataTable.cells.percentCell.placeholder"));
|
|
52763
52736
|
}
|
|
52764
52737
|
}
|
|
52765
|
-
const internalValue = labsFinancialsUtils.formatPercentage(
|
|
52766
|
-
value?.toString() ?? "",
|
|
52767
|
-
columnDefinition.cellRendererParams?.formatConfig
|
|
52768
|
-
);
|
|
52738
|
+
const internalValue = labsFinancialsUtils.formatPercentage(value?.toString() ?? "", formatConfig);
|
|
52769
52739
|
if (isGroup) {
|
|
52770
52740
|
return /* @__PURE__ */ React80__default.default.createElement(
|
|
52771
52741
|
coreReact.Typography,
|
|
@@ -52780,48 +52750,60 @@ var Renderer7 = ({
|
|
|
52780
52750
|
return /* @__PURE__ */ React80__default.default.createElement(
|
|
52781
52751
|
coreReact.Typography,
|
|
52782
52752
|
{
|
|
52783
|
-
...
|
|
52784
|
-
|
|
52785
|
-
),
|
|
52786
|
-
weight: rowPinned ? "bold" : columnDefinition.cellRendererParams?.typographyProps?.weight,
|
|
52753
|
+
...typographyProps,
|
|
52754
|
+
weight: rowPinned ? "bold" : typographyProps?.weight,
|
|
52787
52755
|
className: cx9("tabular-nums")
|
|
52788
52756
|
},
|
|
52789
52757
|
internalValue
|
|
52790
52758
|
);
|
|
52791
52759
|
};
|
|
52792
52760
|
var PercentCellRenderer = withDataTableRenderer(Renderer7, "input");
|
|
52793
|
-
var Editor4 = React80__default.default.forwardRef(
|
|
52794
|
-
|
|
52795
|
-
|
|
52796
|
-
|
|
52797
|
-
|
|
52798
|
-
|
|
52799
|
-
|
|
52800
|
-
|
|
52801
|
-
|
|
52802
|
-
|
|
52803
|
-
|
|
52804
|
-
|
|
52805
|
-
});
|
|
52806
|
-
return /* @__PURE__ */ React80__default.default.createElement(
|
|
52807
|
-
coreReact.Input,
|
|
52808
|
-
{
|
|
52809
|
-
placeholder: columnDefinition.cellEditorParams?.inputProps?.placeholder || I18n.t("dataTable.cells.percentCell.placeholder"),
|
|
52810
|
-
className: cx9("input-cell", "input-cell--right-aligned"),
|
|
52811
|
-
defaultValue,
|
|
52812
|
-
onBlur,
|
|
52813
|
-
ref,
|
|
52814
|
-
style: { textAlign: "right" },
|
|
52815
|
-
...columnDefinition.cellEditorParams?.inputProps || {}
|
|
52761
|
+
var Editor4 = React80__default.default.forwardRef(
|
|
52762
|
+
({
|
|
52763
|
+
columnDefinition,
|
|
52764
|
+
eventKey,
|
|
52765
|
+
stopEditing,
|
|
52766
|
+
value,
|
|
52767
|
+
formatConfig,
|
|
52768
|
+
inputProps
|
|
52769
|
+
}, ref) => {
|
|
52770
|
+
const I18n = coreReact.useI18nContext();
|
|
52771
|
+
function onBlur(event) {
|
|
52772
|
+
stopEditing(ensureIsHTMLElement(event.relatedTarget));
|
|
52816
52773
|
}
|
|
52817
|
-
|
|
52818
|
-
|
|
52774
|
+
if (isEmptyValue(value) && !columnDefinition.editable) {
|
|
52775
|
+
return null;
|
|
52776
|
+
}
|
|
52777
|
+
const defaultValue = eventKey ? value : labsFinancialsUtils.formatNumber(value, {
|
|
52778
|
+
...formatConfig || columnDefinition.cellRendererParams?.formatConfig,
|
|
52779
|
+
//TODO remove usage of columnDefinition.cellRendererParams in next major version
|
|
52780
|
+
symbol: void 0,
|
|
52781
|
+
symbolAfterValue: void 0
|
|
52782
|
+
});
|
|
52783
|
+
return /* @__PURE__ */ React80__default.default.createElement(
|
|
52784
|
+
coreReact.Input,
|
|
52785
|
+
{
|
|
52786
|
+
placeholder: inputProps?.placeholder || I18n.t("dataTable.cells.percentCell.placeholder"),
|
|
52787
|
+
className: cx9("input-cell", "input-cell--right-aligned"),
|
|
52788
|
+
defaultValue,
|
|
52789
|
+
onBlur,
|
|
52790
|
+
ref,
|
|
52791
|
+
style: { textAlign: "right" },
|
|
52792
|
+
...inputProps
|
|
52793
|
+
}
|
|
52794
|
+
);
|
|
52795
|
+
}
|
|
52796
|
+
);
|
|
52819
52797
|
var PercentCellEditor = withDataTableEditor(Editor4, "input");
|
|
52820
52798
|
var Renderer8 = ({
|
|
52821
|
-
columnDefinition,
|
|
52822
52799
|
rowHeight,
|
|
52823
52800
|
isGroup,
|
|
52824
|
-
value
|
|
52801
|
+
value,
|
|
52802
|
+
getPersonName,
|
|
52803
|
+
getCompanyName,
|
|
52804
|
+
getImageURL,
|
|
52805
|
+
getInitials,
|
|
52806
|
+
typographyProps
|
|
52825
52807
|
}) => {
|
|
52826
52808
|
const [showAvatar, setShowAvatar] = React80__default.default.useState(false);
|
|
52827
52809
|
React80__default.default.useEffect(() => {
|
|
@@ -52830,13 +52812,10 @@ var Renderer8 = ({
|
|
|
52830
52812
|
if (value === void 0 || value === null) {
|
|
52831
52813
|
return null;
|
|
52832
52814
|
}
|
|
52833
|
-
const name =
|
|
52834
|
-
const companyName =
|
|
52835
|
-
const imageURL =
|
|
52836
|
-
const initials =
|
|
52837
|
-
const typographyProps = getCellValueTypographyProps(
|
|
52838
|
-
columnDefinition.cellRendererParams?.typographyProps
|
|
52839
|
-
);
|
|
52815
|
+
const name = getPersonName?.(value);
|
|
52816
|
+
const companyName = getCompanyName?.(value);
|
|
52817
|
+
const imageURL = getImageURL?.(value);
|
|
52818
|
+
const initials = getInitials?.(value);
|
|
52840
52819
|
if (isGroup) {
|
|
52841
52820
|
return /* @__PURE__ */ React80__default.default.createElement(coreReact.Typography, { ...typographyProps, weight: "semibold" }, name);
|
|
52842
52821
|
}
|
|
@@ -52860,34 +52839,25 @@ var Renderer9 = ({
|
|
|
52860
52839
|
columnDefinition,
|
|
52861
52840
|
isGroup,
|
|
52862
52841
|
value,
|
|
52863
|
-
rowPinned
|
|
52842
|
+
rowPinned,
|
|
52843
|
+
getColor,
|
|
52844
|
+
displayAsPill,
|
|
52845
|
+
typographyProps,
|
|
52846
|
+
placeholder
|
|
52864
52847
|
}) => {
|
|
52865
|
-
const { getColor, displayAsPill } = columnDefinition.cellRendererParams;
|
|
52866
52848
|
const I18n = coreReact.useI18nContext();
|
|
52867
52849
|
if (isEmptyValue(value)) {
|
|
52868
52850
|
if (isGroup) {
|
|
52869
52851
|
return null;
|
|
52870
52852
|
}
|
|
52871
52853
|
if (columnDefinition.editable) {
|
|
52872
|
-
return /* @__PURE__ */ React80__default.default.createElement(
|
|
52873
|
-
|
|
52874
|
-
|
|
52875
|
-
...getCellValueTypographyProps(
|
|
52876
|
-
columnDefinition.cellRendererParams?.typographyProps
|
|
52877
|
-
),
|
|
52878
|
-
className: cx10("input-placeholder")
|
|
52879
|
-
},
|
|
52880
|
-
columnDefinition.cellEditorParams?.placeholder || I18n.t("dataTable.cells.pillCell.placeholder", {
|
|
52881
|
-
label: columnDefinition.headerName
|
|
52882
|
-
})
|
|
52883
|
-
);
|
|
52854
|
+
return /* @__PURE__ */ React80__default.default.createElement(coreReact.Typography, { ...typographyProps, className: cx10("input-placeholder") }, placeholder || I18n.t("dataTable.cells.pillCell.placeholder", {
|
|
52855
|
+
label: columnDefinition.headerName
|
|
52856
|
+
}));
|
|
52884
52857
|
}
|
|
52885
52858
|
return null;
|
|
52886
52859
|
}
|
|
52887
52860
|
const label = columnDefinition.getStringFormattedValue?.(value) || value;
|
|
52888
|
-
const typographyProps = getCellValueTypographyProps(
|
|
52889
|
-
columnDefinition.cellRendererParams?.typographyProps
|
|
52890
|
-
);
|
|
52891
52861
|
if ((isGroup || rowPinned && columnDefinition.aggFunc) && !displayAsPill) {
|
|
52892
52862
|
return /* @__PURE__ */ React80__default.default.createElement(coreReact.Typography, { ...typographyProps, weight: "semibold" }, label);
|
|
52893
52863
|
}
|
|
@@ -52895,7 +52865,18 @@ var Renderer9 = ({
|
|
|
52895
52865
|
};
|
|
52896
52866
|
var PillCellRenderer = withDataTableRenderer(Renderer9, "select");
|
|
52897
52867
|
var Editor5 = React80__default.default.forwardRef(
|
|
52898
|
-
({
|
|
52868
|
+
({
|
|
52869
|
+
columnDefinition,
|
|
52870
|
+
data,
|
|
52871
|
+
setDataValue,
|
|
52872
|
+
stopEditing,
|
|
52873
|
+
value,
|
|
52874
|
+
selectOptions,
|
|
52875
|
+
getId: getIdParam,
|
|
52876
|
+
placeholder,
|
|
52877
|
+
getColor,
|
|
52878
|
+
clearable
|
|
52879
|
+
}, ref) => {
|
|
52899
52880
|
const [options, setOptions] = React80__default.default.useState([]);
|
|
52900
52881
|
const [loading, setLoading] = React80__default.default.useState(false);
|
|
52901
52882
|
const I18n = coreReact.useI18nContext();
|
|
@@ -52903,7 +52884,6 @@ var Editor5 = React80__default.default.forwardRef(
|
|
|
52903
52884
|
stopEditing();
|
|
52904
52885
|
}
|
|
52905
52886
|
async function beforeShow() {
|
|
52906
|
-
const selectOptions = columnDefinition.cellEditorParams?.selectOptions || [];
|
|
52907
52887
|
if (Array.isArray(selectOptions)) {
|
|
52908
52888
|
setOptions(selectOptions);
|
|
52909
52889
|
} else {
|
|
@@ -52920,7 +52900,7 @@ var Editor5 = React80__default.default.forwardRef(
|
|
|
52920
52900
|
setDataValue(columnDefinition.field, null);
|
|
52921
52901
|
}
|
|
52922
52902
|
function getId3(item) {
|
|
52923
|
-
return
|
|
52903
|
+
return getIdParam?.(item) ?? item;
|
|
52924
52904
|
}
|
|
52925
52905
|
function getLabel3(item) {
|
|
52926
52906
|
const unformattedLabel = columnDefinition.getStringFormattedValue?.(item) || "";
|
|
@@ -52929,17 +52909,17 @@ var Editor5 = React80__default.default.forwardRef(
|
|
|
52929
52909
|
return /* @__PURE__ */ React80__default.default.createElement(
|
|
52930
52910
|
coreReact.PillSelect,
|
|
52931
52911
|
{
|
|
52932
|
-
placeholder:
|
|
52912
|
+
placeholder: placeholder || I18n.t("dataTable.cells.pillCell.placeholder", {
|
|
52933
52913
|
label: columnDefinition.headerName
|
|
52934
52914
|
}),
|
|
52935
52915
|
afterHide,
|
|
52936
52916
|
beforeShow,
|
|
52937
52917
|
block: true,
|
|
52938
|
-
getColor
|
|
52918
|
+
getColor,
|
|
52939
52919
|
getId: getId3,
|
|
52940
52920
|
getLabel: getLabel3,
|
|
52941
52921
|
loading,
|
|
52942
|
-
onClear:
|
|
52922
|
+
onClear: clearable ? onClear : void 0,
|
|
52943
52923
|
onSelect,
|
|
52944
52924
|
options,
|
|
52945
52925
|
ref,
|
|
@@ -52984,13 +52964,12 @@ function useSearch(data, onSearchFunction) {
|
|
|
52984
52964
|
setSearchResultOptions
|
|
52985
52965
|
};
|
|
52986
52966
|
}
|
|
52987
|
-
function useSelectOptions(
|
|
52967
|
+
function useSelectOptions(selectOptions, data) {
|
|
52988
52968
|
const [options, setOptions] = React80__default.default.useState([]);
|
|
52989
52969
|
const [loading, setLoading] = React80__default.default.useState(false);
|
|
52990
52970
|
const [totalOptions, setTotalOptions] = React80__default.default.useState(0);
|
|
52991
52971
|
const fetchOptions = async (offset4) => {
|
|
52992
52972
|
setLoading(true);
|
|
52993
|
-
const selectOptions = columnDefinition.cellEditorParams?.selectOptions || [];
|
|
52994
52973
|
let newOptions = [];
|
|
52995
52974
|
let total = 0;
|
|
52996
52975
|
if (typeof selectOptions === "function") {
|
|
@@ -53022,7 +53001,9 @@ var cx11 = classnames__default.default.bind({ ...styles_default, ...truncation_d
|
|
|
53022
53001
|
var Renderer10 = ({
|
|
53023
53002
|
columnDefinition,
|
|
53024
53003
|
isGroup,
|
|
53025
|
-
value
|
|
53004
|
+
value,
|
|
53005
|
+
typographyProps,
|
|
53006
|
+
placeholder
|
|
53026
53007
|
}) => {
|
|
53027
53008
|
const I18n = coreReact.useI18nContext();
|
|
53028
53009
|
if (isEmptyValue(value)) {
|
|
@@ -53030,24 +53011,12 @@ var Renderer10 = ({
|
|
|
53030
53011
|
return null;
|
|
53031
53012
|
}
|
|
53032
53013
|
if (columnDefinition.editable) {
|
|
53033
|
-
return /* @__PURE__ */ React80__default.default.createElement(
|
|
53034
|
-
|
|
53035
|
-
|
|
53036
|
-
...getCellValueTypographyProps(
|
|
53037
|
-
columnDefinition.cellRendererParams?.typographyProps
|
|
53038
|
-
),
|
|
53039
|
-
className: cx11("truncatingText")
|
|
53040
|
-
},
|
|
53041
|
-
columnDefinition.cellEditorParams?.placeholder || I18n.t("dataTable.cells.selectCell.placeholder", {
|
|
53042
|
-
label: columnDefinition.headerName
|
|
53043
|
-
})
|
|
53044
|
-
);
|
|
53014
|
+
return /* @__PURE__ */ React80__default.default.createElement(coreReact.Typography, { ...typographyProps, className: cx11("truncatingText") }, placeholder || I18n.t("dataTable.cells.selectCell.placeholder", {
|
|
53015
|
+
label: columnDefinition.headerName
|
|
53016
|
+
}));
|
|
53045
53017
|
}
|
|
53046
53018
|
}
|
|
53047
53019
|
const internalValue = columnDefinition.getStringFormattedValue?.(value);
|
|
53048
|
-
const typographyProps = getCellValueTypographyProps(
|
|
53049
|
-
columnDefinition.cellRendererParams?.typographyProps
|
|
53050
|
-
);
|
|
53051
53020
|
if (isGroup) {
|
|
53052
53021
|
return /* @__PURE__ */ React80__default.default.createElement(
|
|
53053
53022
|
coreReact.Typography,
|
|
@@ -53063,14 +53032,25 @@ var Renderer10 = ({
|
|
|
53063
53032
|
};
|
|
53064
53033
|
var SelectCellRenderer = withDataTableRenderer(Renderer10, "select");
|
|
53065
53034
|
var Editor6 = React80__default.default.forwardRef(
|
|
53066
|
-
({
|
|
53035
|
+
({
|
|
53036
|
+
columnDefinition,
|
|
53037
|
+
data,
|
|
53038
|
+
setDataValue,
|
|
53039
|
+
stopEditing,
|
|
53040
|
+
value,
|
|
53041
|
+
clearable,
|
|
53042
|
+
selectOptions,
|
|
53043
|
+
onSearch: onSearchParam,
|
|
53044
|
+
getId: getIdParam,
|
|
53045
|
+
getOptionLabel: getOptionLabelParam
|
|
53046
|
+
}, ref) => {
|
|
53067
53047
|
const { options, loading, totalOptions, fetchOptions } = useSelectOptions(
|
|
53068
|
-
|
|
53048
|
+
selectOptions,
|
|
53069
53049
|
data
|
|
53070
53050
|
);
|
|
53071
53051
|
const { onSearch, searchResultOptions, isSearching } = useSearch(
|
|
53072
53052
|
data,
|
|
53073
|
-
|
|
53053
|
+
onSearchParam
|
|
53074
53054
|
);
|
|
53075
53055
|
function onSelect(selection) {
|
|
53076
53056
|
if (selection.item !== value) {
|
|
@@ -53093,13 +53073,13 @@ var Editor6 = React80__default.default.forwardRef(
|
|
|
53093
53073
|
}
|
|
53094
53074
|
}, 500);
|
|
53095
53075
|
function getId3(val) {
|
|
53096
|
-
return
|
|
53076
|
+
return getIdParam?.(val) ?? val;
|
|
53097
53077
|
}
|
|
53098
53078
|
function getLabel3(val) {
|
|
53099
53079
|
return columnDefinition.getStringFormattedValue?.(val);
|
|
53100
53080
|
}
|
|
53101
53081
|
function getOptionLabel(option) {
|
|
53102
|
-
return
|
|
53082
|
+
return getOptionLabelParam?.(option) || getLabel3(option);
|
|
53103
53083
|
}
|
|
53104
53084
|
return /* @__PURE__ */ React80__default.default.createElement(
|
|
53105
53085
|
coreReact.Select,
|
|
@@ -53111,7 +53091,7 @@ var Editor6 = React80__default.default.forwardRef(
|
|
|
53111
53091
|
loading: isSearching || loading,
|
|
53112
53092
|
onSearch,
|
|
53113
53093
|
onSelect,
|
|
53114
|
-
onClear:
|
|
53094
|
+
onClear: clearable ? onClear : void 0,
|
|
53115
53095
|
onScrollBottom,
|
|
53116
53096
|
ref,
|
|
53117
53097
|
className: cx11("input-cell", "truncatingText")
|
|
@@ -53135,27 +53115,20 @@ var Renderer11 = ({
|
|
|
53135
53115
|
rowHeight,
|
|
53136
53116
|
node,
|
|
53137
53117
|
isGroup,
|
|
53138
|
-
value
|
|
53118
|
+
value,
|
|
53119
|
+
typographyProps,
|
|
53120
|
+
inputProps
|
|
53139
53121
|
}) => {
|
|
53140
53122
|
const I18n = coreReact.useI18nContext();
|
|
53141
53123
|
if (isEmptyValue(value) && columnDefinition.editable) {
|
|
53142
53124
|
if (isGroup) {
|
|
53143
53125
|
return null;
|
|
53144
53126
|
}
|
|
53145
|
-
return /* @__PURE__ */ React80__default.default.createElement(
|
|
53146
|
-
coreReact.Typography,
|
|
53147
|
-
{
|
|
53148
|
-
...getCellValueTypographyProps(
|
|
53149
|
-
columnDefinition.cellRendererParams?.typographyProps
|
|
53150
|
-
),
|
|
53151
|
-
className: cx12("input-placeholder")
|
|
53152
|
-
},
|
|
53153
|
-
columnDefinition.cellEditorParams?.inputProps?.placeholder || I18n.t("dataTable.cells.textCell.placeholder")
|
|
53154
|
-
);
|
|
53127
|
+
return /* @__PURE__ */ React80__default.default.createElement(coreReact.Typography, { ...typographyProps, className: cx12("input-placeholder") }, inputProps?.placeholder || I18n.t("dataTable.cells.textCell.placeholder"));
|
|
53155
53128
|
}
|
|
53156
53129
|
const internalValue = columnDefinition.getStringFormattedValue?.(value) ?? value;
|
|
53157
53130
|
const className = cx12(
|
|
53158
|
-
|
|
53131
|
+
typographyProps?.className,
|
|
53159
53132
|
"textCell",
|
|
53160
53133
|
"truncatingText",
|
|
53161
53134
|
{
|
|
@@ -53163,9 +53136,6 @@ var Renderer11 = ({
|
|
|
53163
53136
|
"truncatingText--lg": rowHeight === rowSize.lg
|
|
53164
53137
|
}
|
|
53165
53138
|
);
|
|
53166
|
-
const typographyProps = getCellValueTypographyProps(
|
|
53167
|
-
columnDefinition.cellRendererParams?.typographyProps
|
|
53168
|
-
);
|
|
53169
53139
|
if (isGroup) {
|
|
53170
53140
|
const fontWeight = node?.footer ? "regular" : "semibold";
|
|
53171
53141
|
return /* @__PURE__ */ React80__default.default.createElement(
|
|
@@ -53183,7 +53153,7 @@ var Renderer11 = ({
|
|
|
53183
53153
|
};
|
|
53184
53154
|
var TextCellRenderer = withDataTableRenderer(Renderer11, "input");
|
|
53185
53155
|
var Editor7 = React80__default.default.forwardRef(
|
|
53186
|
-
({ columnDefinition, eventKey, stopEditing, value }, ref) => {
|
|
53156
|
+
({ columnDefinition, eventKey, stopEditing, value, inputProps }, ref) => {
|
|
53187
53157
|
function onBlur(event) {
|
|
53188
53158
|
stopEditing(ensureIsHTMLElement(event.relatedTarget));
|
|
53189
53159
|
}
|
|
@@ -53192,12 +53162,12 @@ var Editor7 = React80__default.default.forwardRef(
|
|
|
53192
53162
|
return /* @__PURE__ */ React80__default.default.createElement(
|
|
53193
53163
|
coreReact.Input,
|
|
53194
53164
|
{
|
|
53195
|
-
placeholder: columnDefinition.cellEditorParams?.inputProps?.placeholder || I18n.t("dataTable.cells.textCell.placeholder"),
|
|
53196
53165
|
className: cx12("input-cell"),
|
|
53197
53166
|
defaultValue: internalValue,
|
|
53198
53167
|
onBlur,
|
|
53199
53168
|
ref,
|
|
53200
|
-
...
|
|
53169
|
+
...inputProps,
|
|
53170
|
+
placeholder: inputProps?.placeholder || I18n.t("dataTable.cells.textCell.placeholder")
|
|
53201
53171
|
}
|
|
53202
53172
|
);
|
|
53203
53173
|
}
|
|
@@ -53217,28 +53187,18 @@ var Renderer12 = ({
|
|
|
53217
53187
|
columnDefinition,
|
|
53218
53188
|
node,
|
|
53219
53189
|
isGroup,
|
|
53220
|
-
value
|
|
53190
|
+
value,
|
|
53191
|
+
typographyProps,
|
|
53192
|
+
textAreaProps
|
|
53221
53193
|
}) => {
|
|
53222
53194
|
const I18n = coreReact.useI18nContext();
|
|
53223
53195
|
if (isEmptyValue(value) && columnDefinition.editable) {
|
|
53224
53196
|
if (isGroup) {
|
|
53225
53197
|
return null;
|
|
53226
53198
|
}
|
|
53227
|
-
return /* @__PURE__ */ React80__default.default.createElement(
|
|
53228
|
-
coreReact.Typography,
|
|
53229
|
-
{
|
|
53230
|
-
...getCellValueTypographyProps(
|
|
53231
|
-
columnDefinition.cellRendererParams?.typographyProps
|
|
53232
|
-
),
|
|
53233
|
-
className: cx13("input-placeholder")
|
|
53234
|
-
},
|
|
53235
|
-
columnDefinition.cellEditorParams?.textAreaProps?.placeholder || I18n.t("dataTable.cells.textCell.placeholder")
|
|
53236
|
-
);
|
|
53199
|
+
return /* @__PURE__ */ React80__default.default.createElement(coreReact.Typography, { ...typographyProps, className: cx13("input-placeholder") }, textAreaProps?.placeholder || I18n.t("dataTable.cells.textCell.placeholder"));
|
|
53237
53200
|
}
|
|
53238
53201
|
const internalValue = columnDefinition.getStringFormattedValue?.(value) ?? value;
|
|
53239
|
-
const typographyProps = getCellValueTypographyProps(
|
|
53240
|
-
columnDefinition.cellRendererParams?.typographyProps
|
|
53241
|
-
);
|
|
53242
53202
|
if (isGroup) {
|
|
53243
53203
|
const fontWeight = node?.footer ? "regular" : "semibold";
|
|
53244
53204
|
return /* @__PURE__ */ React80__default.default.createElement(
|
|
@@ -53254,7 +53214,7 @@ var Renderer12 = ({
|
|
|
53254
53214
|
return /* @__PURE__ */ React80__default.default.createElement(coreReact.Typography, { ...typographyProps, className: cx13("textarea-cell", "text") }, internalValue);
|
|
53255
53215
|
};
|
|
53256
53216
|
var Editor8 = React80__default.default.forwardRef(
|
|
53257
|
-
({ columnDefinition, stopEditing, value }, ref) => {
|
|
53217
|
+
({ columnDefinition, stopEditing, value, textAreaProps }, ref) => {
|
|
53258
53218
|
function onBlur(event) {
|
|
53259
53219
|
stopEditing(ensureIsHTMLElement(event.relatedTarget));
|
|
53260
53220
|
}
|
|
@@ -53263,14 +53223,14 @@ var Editor8 = React80__default.default.forwardRef(
|
|
|
53263
53223
|
return /* @__PURE__ */ React80__default.default.createElement(
|
|
53264
53224
|
coreReact.TextArea,
|
|
53265
53225
|
{
|
|
53266
|
-
placeholder: columnDefinition.cellEditorParams?.textAreaProps?.placeholder || I18n.t("dataTable.cells.textCell.placeholder"),
|
|
53267
53226
|
className: cx13("textarea-cell", "editor-text"),
|
|
53268
53227
|
defaultValue: internalValue,
|
|
53269
53228
|
onBlur,
|
|
53270
53229
|
ref,
|
|
53271
53230
|
resize: "none",
|
|
53272
53231
|
style: { lineHeight: "16px" },
|
|
53273
|
-
...
|
|
53232
|
+
...textAreaProps,
|
|
53233
|
+
placeholder: textAreaProps?.placeholder || I18n.t("dataTable.cells.textCell.placeholder")
|
|
53274
53234
|
}
|
|
53275
53235
|
);
|
|
53276
53236
|
}
|
|
@@ -55402,15 +55362,12 @@ function getSelectedState(node, affectedRows) {
|
|
|
55402
55362
|
const self = affectedRows[node.id];
|
|
55403
55363
|
if (self?.selectedState === "selected") {
|
|
55404
55364
|
return true;
|
|
55405
|
-
} else if (node.
|
|
55406
|
-
node.setSelected(true, void 0
|
|
55407
|
-
affectedRows[node.id] = {
|
|
55408
|
-
node,
|
|
55409
|
-
selectedState: "selected"
|
|
55410
|
-
};
|
|
55365
|
+
} else if (node.isSelected()) {
|
|
55366
|
+
node.setSelected(true, void 0);
|
|
55367
|
+
affectedRows[node.id] = { node, selectedState: "selected" };
|
|
55411
55368
|
return true;
|
|
55412
55369
|
} else {
|
|
55413
|
-
return
|
|
55370
|
+
return false;
|
|
55414
55371
|
}
|
|
55415
55372
|
}
|
|
55416
55373
|
function getCheckboxState(node, isServerSideDataRequest, rowSelectionRef) {
|
|
@@ -55622,11 +55579,8 @@ function getRowActions(actions, rowProps) {
|
|
|
55622
55579
|
return actions;
|
|
55623
55580
|
}
|
|
55624
55581
|
var InternalRowActionsCellRenderer = (props) => {
|
|
55625
|
-
const actions = getRowActions(
|
|
55626
|
-
|
|
55627
|
-
props
|
|
55628
|
-
);
|
|
55629
|
-
if (props.rowPinned || props.columnDefinition.cellRendererParams.hideActionsOnGroupedRow && props.isGroup || actions.length === 0) {
|
|
55582
|
+
const actions = getRowActions(props.actions, props);
|
|
55583
|
+
if (props.rowPinned || props.hideActionsOnGroupedRow && props.isGroup || actions.length === 0) {
|
|
55630
55584
|
return null;
|
|
55631
55585
|
}
|
|
55632
55586
|
return /* @__PURE__ */ React80__default.default.createElement(
|
|
@@ -55892,7 +55846,8 @@ var DataTableCellRenderer = ({
|
|
|
55892
55846
|
node,
|
|
55893
55847
|
editorType,
|
|
55894
55848
|
value,
|
|
55895
|
-
setValue
|
|
55849
|
+
setValue,
|
|
55850
|
+
...props
|
|
55896
55851
|
}) => {
|
|
55897
55852
|
const { columnApi } = useInternalTableContext();
|
|
55898
55853
|
const columnDefinition = transformToColumnDefinition(colDef);
|
|
@@ -55922,10 +55877,11 @@ var DataTableCellRenderer = ({
|
|
|
55922
55877
|
parentData: context?.parentData,
|
|
55923
55878
|
parentId: context?.parentId,
|
|
55924
55879
|
rowHeight,
|
|
55925
|
-
rowIndex: node.rowIndex,
|
|
55926
55880
|
rowPinned: node.rowPinned,
|
|
55927
55881
|
tableApi: tableRef?.current,
|
|
55928
|
-
value
|
|
55882
|
+
value,
|
|
55883
|
+
...props,
|
|
55884
|
+
typographyProps: getCellValueTypographyProps(props.typographyProps)
|
|
55929
55885
|
};
|
|
55930
55886
|
const hasValue = value !== void 0 && value !== null && value !== "";
|
|
55931
55887
|
const isSelectCellComponent = columnDefinition.cellRendererSelector?.({
|
|
@@ -56005,7 +55961,8 @@ var DataTableCellEditor = React80__default.default.forwardRef(
|
|
|
56005
55961
|
node,
|
|
56006
55962
|
parseValue,
|
|
56007
55963
|
stopEditing,
|
|
56008
|
-
value
|
|
55964
|
+
value,
|
|
55965
|
+
...props
|
|
56009
55966
|
}, ref) => {
|
|
56010
55967
|
const startingValue = getStartingValue(eventKey, editorType, value);
|
|
56011
55968
|
const [currentValue, setCurrentValue] = React80.useState(startingValue);
|
|
@@ -56112,7 +56069,7 @@ var DataTableCellEditor = React80__default.default.forwardRef(
|
|
|
56112
56069
|
setCurrentValue(newValue);
|
|
56113
56070
|
},
|
|
56114
56071
|
stopEditing: (relatedTarget) => {
|
|
56115
|
-
const isRelatedTargetOutsideTable = relatedTarget?.closest('[data-qa="data-table-table') === null;
|
|
56072
|
+
const isRelatedTargetOutsideTable = relatedTarget?.closest('[data-qa="data-table-table"]') === null;
|
|
56116
56073
|
stopEditing(isRelatedTargetOutsideTable);
|
|
56117
56074
|
if (isRelatedTargetOutsideTable) {
|
|
56118
56075
|
api.clearFocusedCell();
|
|
@@ -56121,7 +56078,8 @@ var DataTableCellEditor = React80__default.default.forwardRef(
|
|
|
56121
56078
|
},
|
|
56122
56079
|
tableApi: tableRef?.current,
|
|
56123
56080
|
value: currentValue,
|
|
56124
|
-
ref: handleRefs(editorType)
|
|
56081
|
+
ref: handleRefs(editorType),
|
|
56082
|
+
...props
|
|
56125
56083
|
}
|
|
56126
56084
|
)
|
|
56127
56085
|
);
|
|
@@ -57198,7 +57156,17 @@ function getLabel2(func, option) {
|
|
|
57198
57156
|
function getId2(func, option) {
|
|
57199
57157
|
return func?.(option) ?? option?.id ?? option;
|
|
57200
57158
|
}
|
|
57201
|
-
var InternalMultiSelectCellRenderer = ({
|
|
57159
|
+
var InternalMultiSelectCellRenderer = ({
|
|
57160
|
+
columnDefinition,
|
|
57161
|
+
rowHeight,
|
|
57162
|
+
value,
|
|
57163
|
+
getValue: getValueParam,
|
|
57164
|
+
enablePlaceholder: enablePlaceholderParam,
|
|
57165
|
+
placeholder: placeholderParam,
|
|
57166
|
+
typographyProps,
|
|
57167
|
+
getLabel: getLabelParam,
|
|
57168
|
+
getId: getIdParam
|
|
57169
|
+
}) => {
|
|
57202
57170
|
const I18n = coreReact.useI18nContext();
|
|
57203
57171
|
const ref = React80__default.default.useRef();
|
|
57204
57172
|
React80__default.default.useLayoutEffect(() => {
|
|
@@ -57207,20 +57175,14 @@ var InternalMultiSelectCellRenderer = ({ columnDefinition, rowHeight, value }) =
|
|
|
57207
57175
|
if (value === void 0 || value === null) {
|
|
57208
57176
|
return null;
|
|
57209
57177
|
}
|
|
57210
|
-
const options = getValue(
|
|
57211
|
-
|
|
57212
|
-
|
|
57213
|
-
emptyArray
|
|
57214
|
-
);
|
|
57215
|
-
const enablePlaceholder = (columnDefinition.cellRendererParams?.enablePlaceholder && columnDefinition.editable) ?? false;
|
|
57216
|
-
const placeholder = columnDefinition.cellRendererParams?.placeholder ?? I18n.t("dataTable.cells.multiSelectCell.placeholder");
|
|
57178
|
+
const options = getValue(getValueParam, value, emptyArray);
|
|
57179
|
+
const enablePlaceholder = (enablePlaceholderParam && columnDefinition.editable) ?? false;
|
|
57180
|
+
const placeholder = placeholderParam ?? I18n.t("dataTable.cells.multiSelectCell.placeholder");
|
|
57217
57181
|
return /* @__PURE__ */ React80__default.default.createElement(
|
|
57218
57182
|
coreReact.Typography,
|
|
57219
57183
|
{
|
|
57220
57184
|
as: "ol",
|
|
57221
|
-
...
|
|
57222
|
-
columnDefinition.cellRendererParams?.typographyProps
|
|
57223
|
-
),
|
|
57185
|
+
...typographyProps,
|
|
57224
57186
|
className: cx16("inlineListItems", "truncatingText", {
|
|
57225
57187
|
"truncatingText--md": rowHeight === rowSize.md,
|
|
57226
57188
|
"truncatingText--lg": rowHeight === rowSize.lg
|
|
@@ -57228,14 +57190,8 @@ var InternalMultiSelectCellRenderer = ({ columnDefinition, rowHeight, value }) =
|
|
|
57228
57190
|
ref
|
|
57229
57191
|
},
|
|
57230
57192
|
options.length ? options.map((option, idx, arr) => {
|
|
57231
|
-
const label = getLabel2(
|
|
57232
|
-
|
|
57233
|
-
option
|
|
57234
|
-
);
|
|
57235
|
-
const optionId = getId2(
|
|
57236
|
-
columnDefinition.cellRendererParams?.getId,
|
|
57237
|
-
option
|
|
57238
|
-
);
|
|
57193
|
+
const label = getLabel2(getLabelParam, option);
|
|
57194
|
+
const optionId = getId2(getIdParam, option);
|
|
57239
57195
|
const key = `${label}_${optionId}_idx_${idx}`;
|
|
57240
57196
|
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));
|
|
57241
57197
|
}) : enablePlaceholder ? /* @__PURE__ */ React80__default.default.createElement("li", { style: { color: coreReact.colors.gray45 } }, placeholder) : null
|
|
@@ -57245,63 +57201,80 @@ var MultiSelectCellRenderer = withDataTableRenderer(
|
|
|
57245
57201
|
InternalMultiSelectCellRenderer,
|
|
57246
57202
|
"select"
|
|
57247
57203
|
);
|
|
57248
|
-
var MultiSelectEditor = React80__default.default.forwardRef(
|
|
57249
|
-
|
|
57250
|
-
const { options, loading, totalOptions, fetchOptions } = useSelectOptions(
|
|
57204
|
+
var MultiSelectEditor = React80__default.default.forwardRef(
|
|
57205
|
+
({
|
|
57251
57206
|
columnDefinition,
|
|
57252
|
-
|
|
57253
|
-
|
|
57254
|
-
|
|
57255
|
-
|
|
57256
|
-
|
|
57257
|
-
|
|
57258
|
-
|
|
57259
|
-
|
|
57207
|
+
value = [],
|
|
57208
|
+
setDataValue,
|
|
57209
|
+
data,
|
|
57210
|
+
stopEditing,
|
|
57211
|
+
selectOptions,
|
|
57212
|
+
placeholder,
|
|
57213
|
+
onSearch: editorOnSearch,
|
|
57214
|
+
getLabel: getLabelParam,
|
|
57215
|
+
getId: getIdParam
|
|
57216
|
+
}, ref) => {
|
|
57217
|
+
const [selectedValue, setSelectedValue] = React80__default.default.useState(value);
|
|
57218
|
+
const { options, loading, totalOptions, fetchOptions } = useSelectOptions(
|
|
57219
|
+
selectOptions,
|
|
57220
|
+
data
|
|
57221
|
+
);
|
|
57222
|
+
const shouldSearch = options.length < totalOptions && !!editorOnSearch;
|
|
57223
|
+
const {
|
|
57224
|
+
onSearch,
|
|
57225
|
+
searchResultOptions,
|
|
57226
|
+
setSearchResultOptions,
|
|
57227
|
+
isSearching
|
|
57228
|
+
} = useSearch(data, shouldSearch ? editorOnSearch : void 0);
|
|
57229
|
+
async function beforeShow() {
|
|
57230
|
+
if (options.length === 0) {
|
|
57231
|
+
await fetchOptions();
|
|
57232
|
+
}
|
|
57233
|
+
return true;
|
|
57260
57234
|
}
|
|
57261
|
-
|
|
57262
|
-
|
|
57263
|
-
|
|
57264
|
-
|
|
57265
|
-
|
|
57266
|
-
|
|
57235
|
+
const onScrollBottom = debounce5__default.default(async () => {
|
|
57236
|
+
if (!searchResultOptions && options.length < totalOptions) {
|
|
57237
|
+
const nextOffset = options.length;
|
|
57238
|
+
await fetchOptions(nextOffset);
|
|
57239
|
+
}
|
|
57240
|
+
}, 500);
|
|
57241
|
+
function onChange(value2) {
|
|
57242
|
+
setSelectedValue(value2);
|
|
57243
|
+
setDataValue(columnDefinition.field, value2);
|
|
57244
|
+
if (searchResultOptions) {
|
|
57245
|
+
setSearchResultOptions(void 0);
|
|
57246
|
+
}
|
|
57267
57247
|
}
|
|
57268
|
-
|
|
57269
|
-
|
|
57270
|
-
setSelectedValue(value2);
|
|
57271
|
-
setDataValue(columnDefinition.field, value2);
|
|
57272
|
-
if (searchResultOptions) {
|
|
57273
|
-
setSearchResultOptions(void 0);
|
|
57248
|
+
function getLabel3(func, option) {
|
|
57249
|
+
return func?.(option) ?? option?.label ?? option?.name ?? option;
|
|
57274
57250
|
}
|
|
57275
|
-
|
|
57276
|
-
|
|
57277
|
-
return func?.(option) ?? option?.label ?? option?.name ?? option;
|
|
57278
|
-
}
|
|
57279
|
-
function getId3(func, option) {
|
|
57280
|
-
return func?.(option) ?? option?.id ?? option;
|
|
57281
|
-
}
|
|
57282
|
-
return /* @__PURE__ */ React80__default.default.createElement(
|
|
57283
|
-
coreReact.MultiSelect,
|
|
57284
|
-
{
|
|
57285
|
-
beforeShow,
|
|
57286
|
-
afterHide: () => stopEditing(),
|
|
57287
|
-
block: true,
|
|
57288
|
-
loading: isSearching || loading,
|
|
57289
|
-
getId: (option) => {
|
|
57290
|
-
return getId3(columnDefinition.cellEditorParams?.getId, option);
|
|
57291
|
-
},
|
|
57292
|
-
getLabel: (option) => {
|
|
57293
|
-
return getLabel3(columnDefinition.cellEditorParams?.getLabel, option);
|
|
57294
|
-
},
|
|
57295
|
-
placeholder: columnDefinition.cellEditorParams?.placeholder,
|
|
57296
|
-
onScrollBottom,
|
|
57297
|
-
onSearch,
|
|
57298
|
-
onChange,
|
|
57299
|
-
options: searchResultOptions || options,
|
|
57300
|
-
value: selectedValue,
|
|
57301
|
-
ref
|
|
57251
|
+
function getId3(func, option) {
|
|
57252
|
+
return func?.(option) ?? option?.id ?? option;
|
|
57302
57253
|
}
|
|
57303
|
-
|
|
57304
|
-
|
|
57254
|
+
return /* @__PURE__ */ React80__default.default.createElement(
|
|
57255
|
+
coreReact.MultiSelect,
|
|
57256
|
+
{
|
|
57257
|
+
beforeShow,
|
|
57258
|
+
afterHide: () => stopEditing(),
|
|
57259
|
+
block: true,
|
|
57260
|
+
loading: isSearching || loading,
|
|
57261
|
+
getId: (option) => {
|
|
57262
|
+
return getId3(getIdParam, option);
|
|
57263
|
+
},
|
|
57264
|
+
getLabel: (option) => {
|
|
57265
|
+
return getLabel3(getLabelParam, option);
|
|
57266
|
+
},
|
|
57267
|
+
placeholder,
|
|
57268
|
+
onScrollBottom,
|
|
57269
|
+
onSearch,
|
|
57270
|
+
onChange,
|
|
57271
|
+
options: searchResultOptions || options,
|
|
57272
|
+
value: selectedValue,
|
|
57273
|
+
ref
|
|
57274
|
+
}
|
|
57275
|
+
);
|
|
57276
|
+
}
|
|
57277
|
+
);
|
|
57305
57278
|
var MultiSelectCellEditor = withDataTableEditor(
|
|
57306
57279
|
MultiSelectEditor,
|
|
57307
57280
|
"select"
|
|
@@ -108078,7 +108051,8 @@ var DataTable = ({
|
|
|
108078
108051
|
showExpandCollapseAllToggle,
|
|
108079
108052
|
translations: translations2 = {},
|
|
108080
108053
|
enableCellTextSelection,
|
|
108081
|
-
localStoragePersistenceKey
|
|
108054
|
+
localStoragePersistenceKey,
|
|
108055
|
+
enableCDN
|
|
108082
108056
|
}) => {
|
|
108083
108057
|
const initialTableConfig = localStoragePersistenceKey && webSdkStorage.storage.local.getItem(localStoragePersistenceKey) || _initialTableConfig;
|
|
108084
108058
|
const onServerSideDataRequestRef = React80__default.default.useRef(onServerSideDataRequest);
|
|
@@ -108090,14 +108064,28 @@ var DataTable = ({
|
|
|
108090
108064
|
);
|
|
108091
108065
|
const contextPanel = useContextPanel();
|
|
108092
108066
|
const clientI18n = coreReact.useI18nContext();
|
|
108067
|
+
const isCDNEnabled = cdnTranslations.isCDNFeatureFlagEnabled(clientI18n, enableCDN);
|
|
108068
|
+
const cdnTranslations$1 = cdnTranslations.useRequestTranslations(
|
|
108069
|
+
{
|
|
108070
|
+
locale: clientI18n.locale,
|
|
108071
|
+
type: "file",
|
|
108072
|
+
absolute_file_path: (locale) => `core/packages/data-table/src/locales/${locale}.json`
|
|
108073
|
+
},
|
|
108074
|
+
{ en: translations.en, pseudo: translations.pseudo },
|
|
108075
|
+
{
|
|
108076
|
+
oldTranslations: translations,
|
|
108077
|
+
enableCDN: isCDNEnabled
|
|
108078
|
+
}
|
|
108079
|
+
);
|
|
108093
108080
|
const internalI18n = coreReact.useI18n({
|
|
108094
|
-
|
|
108081
|
+
locale: clientI18n.locale,
|
|
108095
108082
|
translations: ramda.mergeDeepLeft(
|
|
108096
108083
|
ramda.mergeDeepLeft(clientI18n.translations, {
|
|
108097
108084
|
[clientI18n.locale]: translations2
|
|
108098
108085
|
}),
|
|
108099
|
-
translations
|
|
108100
|
-
)
|
|
108086
|
+
cdnTranslations$1.translations
|
|
108087
|
+
),
|
|
108088
|
+
enableCDN: isCDNEnabled
|
|
108101
108089
|
});
|
|
108102
108090
|
const rowSelectionRef = React80__default.default.useRef({
|
|
108103
108091
|
affectedRows: {},
|
|
@@ -109190,7 +109178,10 @@ var Table = (props) => {
|
|
|
109190
109178
|
groupDefaultExpanded: props.groupsAlwaysExpanded ? -1 : props.groupDefaultExpanded,
|
|
109191
109179
|
groupIncludeFooter: !onSSDR && props.groupIncludeFooter === void 0 ? true : props.groupIncludeFooter,
|
|
109192
109180
|
getGroupRowAgg: props.getGroupRowAgg ? getGroupRowAgg : void 0,
|
|
109193
|
-
groupSelectsChildren:
|
|
109181
|
+
groupSelectsChildren: (
|
|
109182
|
+
// Always true for client side, defaults to true for server side
|
|
109183
|
+
internalTableContext.totalRowCount > 0 && props.groupSelectsChildren !== false || !onSSDR
|
|
109184
|
+
),
|
|
109194
109185
|
groupSelectsFiltered: true,
|
|
109195
109186
|
headerHeight: props.headerHeight,
|
|
109196
109187
|
icons: tableIcons,
|
|
@@ -111281,7 +111272,8 @@ var ClientSideDataTable = ({
|
|
|
111281
111272
|
onTableConfigChange,
|
|
111282
111273
|
translations: translations2 = {},
|
|
111283
111274
|
enableCellTextSelection,
|
|
111284
|
-
localStoragePersistenceKey
|
|
111275
|
+
localStoragePersistenceKey,
|
|
111276
|
+
enableCDN
|
|
111285
111277
|
}) => {
|
|
111286
111278
|
return /* @__PURE__ */ React80__default.default.createElement(
|
|
111287
111279
|
DataTable,
|
|
@@ -111299,7 +111291,8 @@ var ClientSideDataTable = ({
|
|
|
111299
111291
|
translations: translations2,
|
|
111300
111292
|
localStoragePersistenceKey,
|
|
111301
111293
|
customBulkEditorFields,
|
|
111302
|
-
enableCellTextSelection
|
|
111294
|
+
enableCellTextSelection,
|
|
111295
|
+
enableCDN
|
|
111303
111296
|
},
|
|
111304
111297
|
children
|
|
111305
111298
|
);
|
|
@@ -115689,7 +115682,8 @@ var ServerSideDataTable = ({
|
|
|
115689
115682
|
enableCellTextSelection,
|
|
115690
115683
|
showExpandCollapseAllToggle,
|
|
115691
115684
|
translations: translations2 = {},
|
|
115692
|
-
localStoragePersistenceKey
|
|
115685
|
+
localStoragePersistenceKey,
|
|
115686
|
+
enableCDN
|
|
115693
115687
|
}) => {
|
|
115694
115688
|
return /* @__PURE__ */ React80__default.default.createElement(
|
|
115695
115689
|
DataTable,
|
|
@@ -115708,7 +115702,8 @@ var ServerSideDataTable = ({
|
|
|
115708
115702
|
translations: translations2,
|
|
115709
115703
|
customBulkEditorFields,
|
|
115710
115704
|
enableCellTextSelection,
|
|
115711
|
-
localStoragePersistenceKey
|
|
115705
|
+
localStoragePersistenceKey,
|
|
115706
|
+
enableCDN
|
|
115712
115707
|
},
|
|
115713
115708
|
children
|
|
115714
115709
|
);
|