@procore/data-table 14.32.0 → 14.33.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 +14 -0
- package/dist/legacy/index.cjs +342 -394
- package/dist/legacy/index.d.cts +55 -53
- package/dist/legacy/index.d.ts +55 -53
- package/dist/legacy/index.js +342 -394
- package/dist/modern/index.cjs +321 -346
- package/dist/modern/index.d.cts +55 -53
- package/dist/modern/index.d.ts +55 -53
- package/dist/modern/index.js +321 -346
- package/package.json +35 -37
package/dist/legacy/index.js
CHANGED
|
@@ -7984,32 +7984,15 @@ var styles_default = {
|
|
|
7984
7984
|
"spin": "_spin_if78k_1"
|
|
7985
7985
|
};
|
|
7986
7986
|
|
|
7987
|
-
// src/utils/getCellValueTypographyProps.ts
|
|
7988
|
-
function getCellValueTypographyProps(typographyProps) {
|
|
7989
|
-
return {
|
|
7990
|
-
intent: "small",
|
|
7991
|
-
...typographyProps ?? {}
|
|
7992
|
-
};
|
|
7993
|
-
}
|
|
7994
|
-
|
|
7995
7987
|
// src/CellRenderers/BooleanCell.tsx
|
|
7996
7988
|
var cx = classnames.bind(styles_default);
|
|
7997
|
-
var InternalBooleanCellRenderer = ({
|
|
7998
|
-
var _a;
|
|
7989
|
+
var InternalBooleanCellRenderer = ({ isGroup, value, typographyProps }) => {
|
|
7999
7990
|
const I18n = useI18nContext();
|
|
8000
7991
|
const internalValue = value ? I18n.t("dataTable.cells.booleanCell.options.yes") : I18n.t("dataTable.cells.booleanCell.options.no");
|
|
8001
7992
|
if (isGroup) {
|
|
8002
7993
|
return null;
|
|
8003
7994
|
}
|
|
8004
|
-
return /* @__PURE__ */ React80.createElement(
|
|
8005
|
-
Typography,
|
|
8006
|
-
{
|
|
8007
|
-
...getCellValueTypographyProps(
|
|
8008
|
-
(_a = columnDefinition.cellRendererParams) == null ? void 0 : _a.typographyProps
|
|
8009
|
-
)
|
|
8010
|
-
},
|
|
8011
|
-
internalValue
|
|
8012
|
-
);
|
|
7995
|
+
return /* @__PURE__ */ React80.createElement(Typography, { ...typographyProps }, internalValue);
|
|
8013
7996
|
};
|
|
8014
7997
|
var BooleanCellRenderer = withDataTableRenderer(
|
|
8015
7998
|
InternalBooleanCellRenderer,
|
|
@@ -8050,12 +8033,13 @@ var BooleanCellEditor = withDataTableEditor(
|
|
|
8050
8033
|
var Renderer = ({
|
|
8051
8034
|
columnDefinition,
|
|
8052
8035
|
rowPinned,
|
|
8036
|
+
buttons,
|
|
8053
8037
|
...props
|
|
8054
8038
|
}) => {
|
|
8055
8039
|
if (rowPinned) {
|
|
8056
8040
|
return null;
|
|
8057
8041
|
}
|
|
8058
|
-
return /* @__PURE__ */ React80.createElement(FlexList, { justifyContent: "center", alignItems: "center", size: "xs" },
|
|
8042
|
+
return /* @__PURE__ */ React80.createElement(FlexList, { justifyContent: "center", alignItems: "center", size: "xs" }, buttons.map((Button6) => /* @__PURE__ */ React80.createElement(
|
|
8059
8043
|
Button6,
|
|
8060
8044
|
{
|
|
8061
8045
|
key: Button6.displayName,
|
|
@@ -8157,12 +8141,13 @@ function ContactItem({
|
|
|
8157
8141
|
|
|
8158
8142
|
// src/CellRenderers/CompanyCell.tsx
|
|
8159
8143
|
var Renderer2 = ({
|
|
8160
|
-
columnDefinition,
|
|
8161
8144
|
rowHeight,
|
|
8162
8145
|
isGroup,
|
|
8163
|
-
value
|
|
8146
|
+
value,
|
|
8147
|
+
getCompanyName,
|
|
8148
|
+
getImageURL,
|
|
8149
|
+
typographyProps
|
|
8164
8150
|
}) => {
|
|
8165
|
-
var _a, _b, _c, _d, _e;
|
|
8166
8151
|
const [showAvatar, setShowAvatar] = React80.useState(false);
|
|
8167
8152
|
React80.useEffect(() => {
|
|
8168
8153
|
setShowAvatar(rowHeight === rowSize.lg || rowHeight === rowSize.md);
|
|
@@ -8170,18 +8155,9 @@ var Renderer2 = ({
|
|
|
8170
8155
|
if (value === void 0 || value === null) {
|
|
8171
8156
|
return null;
|
|
8172
8157
|
}
|
|
8173
|
-
const companyName = isGroup ? value : (
|
|
8174
|
-
const imageURL =
|
|
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(
|
|
8158
|
+
const companyName = isGroup ? value : (getCompanyName == null ? void 0 : getCompanyName(value)) ?? value.name;
|
|
8159
|
+
const imageURL = getImageURL == null ? void 0 : getImageURL(value);
|
|
8160
|
+
return isGroup ? /* @__PURE__ */ React80.createElement(Typography, { ...typographyProps, weight: "semibold" }, companyName) : /* @__PURE__ */ React80.createElement(
|
|
8185
8161
|
ContactItem,
|
|
8186
8162
|
{
|
|
8187
8163
|
imageUrl: showAvatar ? imageURL : void 0,
|
|
@@ -8216,29 +8192,19 @@ var Renderer3 = ({
|
|
|
8216
8192
|
columnDefinition,
|
|
8217
8193
|
isGroup,
|
|
8218
8194
|
rowPinned,
|
|
8219
|
-
value
|
|
8195
|
+
value,
|
|
8196
|
+
typographyProps,
|
|
8197
|
+
formatConfig,
|
|
8198
|
+
inputProps
|
|
8220
8199
|
}) => {
|
|
8221
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
8222
8200
|
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;
|
|
8201
|
+
const internalValue = value !== void 0 && formatCurrency(value == null ? void 0 : value.toString(), formatConfig) || void 0;
|
|
8227
8202
|
if (isEmptyValue(value)) {
|
|
8228
8203
|
if (isGroup) {
|
|
8229
8204
|
return null;
|
|
8230
8205
|
}
|
|
8231
8206
|
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
|
-
);
|
|
8207
|
+
return /* @__PURE__ */ React80.createElement(Typography, { ...typographyProps, className: cx3("input-placeholder") }, (inputProps == null ? void 0 : inputProps.placeholder) || I18n.t("dataTable.cells.currencyCell.placeholder"));
|
|
8242
8208
|
}
|
|
8243
8209
|
}
|
|
8244
8210
|
if (isGroup) {
|
|
@@ -8255,10 +8221,8 @@ var Renderer3 = ({
|
|
|
8255
8221
|
return /* @__PURE__ */ React80.createElement(
|
|
8256
8222
|
Typography,
|
|
8257
8223
|
{
|
|
8258
|
-
...
|
|
8259
|
-
|
|
8260
|
-
),
|
|
8261
|
-
weight: rowPinned ? "bold" : (_g = (_f = columnDefinition.cellRendererParams) == null ? void 0 : _f.typographyProps) == null ? void 0 : _g.weight,
|
|
8224
|
+
...typographyProps,
|
|
8225
|
+
weight: rowPinned ? "bold" : typographyProps == null ? void 0 : typographyProps.weight,
|
|
8262
8226
|
className: cx3("tabular-nums")
|
|
8263
8227
|
},
|
|
8264
8228
|
internalValue
|
|
@@ -8266,8 +8230,15 @@ var Renderer3 = ({
|
|
|
8266
8230
|
};
|
|
8267
8231
|
var CurrencyCellRenderer = withDataTableRenderer(Renderer3, "input");
|
|
8268
8232
|
var Editor = React80.forwardRef(
|
|
8269
|
-
({
|
|
8270
|
-
|
|
8233
|
+
({
|
|
8234
|
+
columnDefinition,
|
|
8235
|
+
eventKey,
|
|
8236
|
+
stopEditing,
|
|
8237
|
+
value,
|
|
8238
|
+
formatConfig,
|
|
8239
|
+
inputProps
|
|
8240
|
+
}, ref) => {
|
|
8241
|
+
var _a;
|
|
8271
8242
|
const I18n = useI18nContext();
|
|
8272
8243
|
if (isEmptyValue(value) && !columnDefinition.editable) {
|
|
8273
8244
|
return null;
|
|
@@ -8276,19 +8247,20 @@ var Editor = React80.forwardRef(
|
|
|
8276
8247
|
stopEditing(ensureIsHTMLElement(event.relatedTarget));
|
|
8277
8248
|
}
|
|
8278
8249
|
const defaultValue = eventKey ? value : formatNumber(value, {
|
|
8279
|
-
...
|
|
8250
|
+
...formatConfig || ((_a = columnDefinition.cellRendererParams) == null ? void 0 : _a.formatConfig),
|
|
8251
|
+
//TODO remove usage of columnDefinition.cellRendererParams in next major version
|
|
8280
8252
|
symbol: void 0,
|
|
8281
8253
|
symbolAfterValue: void 0
|
|
8282
8254
|
});
|
|
8283
8255
|
return /* @__PURE__ */ React80.createElement(
|
|
8284
8256
|
Input,
|
|
8285
8257
|
{
|
|
8286
|
-
placeholder: (
|
|
8258
|
+
placeholder: (inputProps == null ? void 0 : inputProps.placeholder) || I18n.t("dataTable.cells.currencyCell.placeholder"),
|
|
8287
8259
|
defaultValue,
|
|
8288
8260
|
onBlur,
|
|
8289
8261
|
ref,
|
|
8290
8262
|
className: cx3("input-cell", "input-cell--right-aligned"),
|
|
8291
|
-
...
|
|
8263
|
+
...inputProps
|
|
8292
8264
|
}
|
|
8293
8265
|
);
|
|
8294
8266
|
}
|
|
@@ -8702,6 +8674,14 @@ var DateFilterTokenText = ({
|
|
|
8702
8674
|
};
|
|
8703
8675
|
var DateFilterRenderer_default = DateFilterRenderer;
|
|
8704
8676
|
|
|
8677
|
+
// src/utils/getCellValueTypographyProps.ts
|
|
8678
|
+
function getCellValueTypographyProps(typographyProps) {
|
|
8679
|
+
return {
|
|
8680
|
+
intent: "small",
|
|
8681
|
+
...typographyProps
|
|
8682
|
+
};
|
|
8683
|
+
}
|
|
8684
|
+
|
|
8705
8685
|
// src/CellRenderers/DateCell.tsx
|
|
8706
8686
|
var cx4 = classnames.bind(styles_default);
|
|
8707
8687
|
function getDateObject(date) {
|
|
@@ -8791,39 +8771,32 @@ function getDateObject2(date) {
|
|
|
8791
8771
|
return date;
|
|
8792
8772
|
}
|
|
8793
8773
|
var DateTimeCellValue = ({
|
|
8794
|
-
columnDefinition,
|
|
8795
8774
|
isGroup,
|
|
8796
|
-
value
|
|
8775
|
+
value,
|
|
8776
|
+
typographyProps,
|
|
8777
|
+
dateFormatType
|
|
8797
8778
|
}) => {
|
|
8798
|
-
var _a, _b;
|
|
8799
8779
|
const { format: format3 } = useDateTime();
|
|
8800
8780
|
if (isGroup || isEmptyValue(value)) {
|
|
8801
8781
|
return null;
|
|
8802
8782
|
}
|
|
8803
8783
|
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
|
-
);
|
|
8784
|
+
const internalValue = parsedValue ? format3(parsedValue, dateFormatType || "abbr-weekday-abbr-date-at-time") : void 0;
|
|
8811
8785
|
return /* @__PURE__ */ React80.createElement(Typography, { ...typographyProps }, internalValue);
|
|
8812
8786
|
};
|
|
8813
8787
|
var Renderer5 = (props) => {
|
|
8814
|
-
|
|
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
|
-
);
|
|
8788
|
+
return /* @__PURE__ */ React80.createElement(OptionalDateTimeProvider, { timeZone: props.timeZone }, /* @__PURE__ */ React80.createElement(DateTimeCellValue, { ...props }));
|
|
8822
8789
|
};
|
|
8823
8790
|
var DateTimeCellRenderer = withDataTableRenderer(Renderer5, "date");
|
|
8824
8791
|
var Editor3 = React80.forwardRef(
|
|
8825
|
-
({
|
|
8826
|
-
|
|
8792
|
+
({
|
|
8793
|
+
columnDefinition,
|
|
8794
|
+
setDataValue,
|
|
8795
|
+
stopEditing,
|
|
8796
|
+
value,
|
|
8797
|
+
timeZone,
|
|
8798
|
+
disabledDate
|
|
8799
|
+
}, ref) => {
|
|
8827
8800
|
function afterHide(event) {
|
|
8828
8801
|
stopEditing(ensureIsHTMLElement(event == null ? void 0 : event.target));
|
|
8829
8802
|
}
|
|
@@ -8834,23 +8807,17 @@ var Editor3 = React80.forwardRef(
|
|
|
8834
8807
|
setDataValue(columnDefinition.field, void 0);
|
|
8835
8808
|
}
|
|
8836
8809
|
}
|
|
8837
|
-
return /* @__PURE__ */ React80.createElement(
|
|
8838
|
-
|
|
8810
|
+
return /* @__PURE__ */ React80.createElement(OptionalDateTimeProvider, { timeZone }, /* @__PURE__ */ React80.createElement(
|
|
8811
|
+
DateSelect,
|
|
8839
8812
|
{
|
|
8840
|
-
|
|
8841
|
-
|
|
8842
|
-
|
|
8843
|
-
|
|
8844
|
-
|
|
8845
|
-
|
|
8846
|
-
|
|
8847
|
-
|
|
8848
|
-
onChange,
|
|
8849
|
-
ref,
|
|
8850
|
-
value: getDateObject2(value)
|
|
8851
|
-
}
|
|
8852
|
-
)
|
|
8853
|
-
);
|
|
8813
|
+
afterHide,
|
|
8814
|
+
className: cx5("input-cell"),
|
|
8815
|
+
disabledDate,
|
|
8816
|
+
onChange,
|
|
8817
|
+
ref,
|
|
8818
|
+
value: getDateObject2(value)
|
|
8819
|
+
}
|
|
8820
|
+
));
|
|
8854
8821
|
}
|
|
8855
8822
|
);
|
|
8856
8823
|
var DateTimeCellEditor = withDataTableEditor(Editor3, "date");
|
|
@@ -52376,16 +52343,22 @@ globalObj.MouseEvent = typeof MouseEvent === "undefined" ? {} : MouseEvent;
|
|
|
52376
52343
|
var GroupCellRenderer2 = GroupCellRenderer;
|
|
52377
52344
|
var cx6 = classnames.bind(truncation_default);
|
|
52378
52345
|
var MIN_LINK_WIDTH = 48;
|
|
52379
|
-
var InternalLinkCellRenderer = ({
|
|
52380
|
-
|
|
52346
|
+
var InternalLinkCellRenderer = ({
|
|
52347
|
+
columnDefinition,
|
|
52348
|
+
isGroup,
|
|
52349
|
+
data,
|
|
52350
|
+
rowHeight,
|
|
52351
|
+
value,
|
|
52352
|
+
typographyProps,
|
|
52353
|
+
isExternalLink,
|
|
52354
|
+
getURL
|
|
52355
|
+
}) => {
|
|
52356
|
+
var _a;
|
|
52381
52357
|
const [isLinkWidthBelowMin, setIsLinkWidthBelowMin] = useState(false);
|
|
52382
52358
|
const linkRef = useRef(null);
|
|
52383
52359
|
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
52360
|
const className = cx6(
|
|
52388
|
-
|
|
52361
|
+
typographyProps == null ? void 0 : typographyProps.className,
|
|
52389
52362
|
"textCell",
|
|
52390
52363
|
"truncatingText",
|
|
52391
52364
|
{
|
|
@@ -52403,8 +52376,7 @@ var InternalLinkCellRenderer = ({ columnDefinition, isGroup, data, rowHeight, va
|
|
|
52403
52376
|
setIsLinkWidthBelowMin(width < MIN_LINK_WIDTH);
|
|
52404
52377
|
}
|
|
52405
52378
|
}, [internalValue]);
|
|
52406
|
-
const
|
|
52407
|
-
const URL = columnDefinition.cellRendererParams.getURL(value, data);
|
|
52379
|
+
const URL = getURL(value, data);
|
|
52408
52380
|
const extendClickableAreaClassNames = isLinkWidthBelowMin ? cx6("extendClickableArea", {
|
|
52409
52381
|
"extendClickableArea--rowHeightSm": rowHeight === rowSize.sm
|
|
52410
52382
|
}) : "";
|
|
@@ -52434,24 +52406,22 @@ var LinkCellRenderer = withDataTableRenderer(
|
|
|
52434
52406
|
"input"
|
|
52435
52407
|
);
|
|
52436
52408
|
var cx7 = classnames.bind(styles_default);
|
|
52437
|
-
var InternalNumberCellRenderer = ({
|
|
52438
|
-
|
|
52409
|
+
var InternalNumberCellRenderer = ({
|
|
52410
|
+
columnDefinition,
|
|
52411
|
+
rowPinned,
|
|
52412
|
+
isGroup,
|
|
52413
|
+
value,
|
|
52414
|
+
typographyProps,
|
|
52415
|
+
inputProps,
|
|
52416
|
+
formatConfig
|
|
52417
|
+
}) => {
|
|
52439
52418
|
const I18n = useI18nContext();
|
|
52440
52419
|
if (isEmptyValue(value)) {
|
|
52441
52420
|
if (isGroup) {
|
|
52442
52421
|
return null;
|
|
52443
52422
|
}
|
|
52444
52423
|
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
|
-
);
|
|
52424
|
+
return /* @__PURE__ */ React80.createElement(Typography, { ...typographyProps, className: cx7("input-placeholder") }, (inputProps == null ? void 0 : inputProps.placeholder) || I18n.t("dataTable.cells.numberCell.placeholder"));
|
|
52455
52425
|
}
|
|
52456
52426
|
return /* @__PURE__ */ React80.createElement(React80.Fragment, null);
|
|
52457
52427
|
}
|
|
@@ -52460,7 +52430,7 @@ var InternalNumberCellRenderer = ({ columnDefinition, rowPinned, isGroup, value
|
|
|
52460
52430
|
minDecimalPrecision: 0,
|
|
52461
52431
|
shouldUseGtk: true,
|
|
52462
52432
|
symbol: "",
|
|
52463
|
-
...
|
|
52433
|
+
...formatConfig
|
|
52464
52434
|
});
|
|
52465
52435
|
if (isGroup) {
|
|
52466
52436
|
return /* @__PURE__ */ React80.createElement(Typography, { intent: "small", weight: "semibold" }, internalValue);
|
|
@@ -52468,10 +52438,8 @@ var InternalNumberCellRenderer = ({ columnDefinition, rowPinned, isGroup, value
|
|
|
52468
52438
|
return /* @__PURE__ */ React80.createElement(
|
|
52469
52439
|
Typography,
|
|
52470
52440
|
{
|
|
52471
|
-
...
|
|
52472
|
-
|
|
52473
|
-
),
|
|
52474
|
-
weight: rowPinned ? "bold" : (_g = (_f = columnDefinition.cellRendererParams) == null ? void 0 : _f.typographyProps) == null ? void 0 : _g.weight
|
|
52441
|
+
...typographyProps,
|
|
52442
|
+
weight: rowPinned ? "bold" : typographyProps == null ? void 0 : typographyProps.weight
|
|
52475
52443
|
},
|
|
52476
52444
|
internalValue
|
|
52477
52445
|
);
|
|
@@ -52480,8 +52448,7 @@ var NumberCellRenderer = withDataTableRenderer(
|
|
|
52480
52448
|
InternalNumberCellRenderer,
|
|
52481
52449
|
"input"
|
|
52482
52450
|
);
|
|
52483
|
-
var InternalNumberCellEditor = React80.forwardRef(({ columnDefinition, stopEditing, value }, ref) => {
|
|
52484
|
-
var _a, _b, _c;
|
|
52451
|
+
var InternalNumberCellEditor = React80.forwardRef(({ columnDefinition, stopEditing, value, inputProps }, ref) => {
|
|
52485
52452
|
const I18n = useI18nContext();
|
|
52486
52453
|
if (isEmptyValue(value) && !columnDefinition.editable) {
|
|
52487
52454
|
return null;
|
|
@@ -52492,13 +52459,13 @@ var InternalNumberCellEditor = React80.forwardRef(({ columnDefinition, stopEditi
|
|
|
52492
52459
|
return /* @__PURE__ */ React80.createElement(
|
|
52493
52460
|
Input,
|
|
52494
52461
|
{
|
|
52495
|
-
placeholder: (
|
|
52462
|
+
placeholder: (inputProps == null ? void 0 : inputProps.placeholder) || I18n.t("dataTable.cells.numberCell.placeholder"),
|
|
52496
52463
|
type: "number",
|
|
52497
52464
|
defaultValue: value,
|
|
52498
52465
|
onBlur,
|
|
52499
52466
|
ref,
|
|
52500
52467
|
className: cx7("input-cell", "input-cell--right-aligned"),
|
|
52501
|
-
...
|
|
52468
|
+
...inputProps
|
|
52502
52469
|
}
|
|
52503
52470
|
);
|
|
52504
52471
|
});
|
|
@@ -52579,41 +52546,42 @@ var defaultAvatarStackItemFilter = (person) => !!person || !!person.id;
|
|
|
52579
52546
|
var Renderer6 = ({
|
|
52580
52547
|
columnDefinition,
|
|
52581
52548
|
rowHeight,
|
|
52582
|
-
value
|
|
52549
|
+
value,
|
|
52550
|
+
getValue: getValue2,
|
|
52551
|
+
getCompanyName: getCompanyNameParam,
|
|
52552
|
+
getPersonName: getPersonNameParam,
|
|
52553
|
+
getInitials,
|
|
52554
|
+
getImageURL,
|
|
52555
|
+
typographyProps
|
|
52583
52556
|
}) => {
|
|
52584
|
-
var _a
|
|
52557
|
+
var _a;
|
|
52585
52558
|
const [fullCellView, setFullCellView] = React80.useState(false);
|
|
52586
52559
|
const getPeople = React80.useCallback(() => {
|
|
52587
|
-
|
|
52588
|
-
|
|
52589
|
-
}, [(_a = columnDefinition.cellRendererParams) == null ? void 0 : _a.getValue, value]);
|
|
52560
|
+
return (getValue2 == null ? void 0 : getValue2(value)) || value || [];
|
|
52561
|
+
}, [getValue2, value]);
|
|
52590
52562
|
const getCompanyName = React80.useCallback(
|
|
52591
52563
|
(person) => {
|
|
52592
|
-
|
|
52593
|
-
return ((_b2 = (_a2 = columnDefinition.cellRendererParams) == null ? void 0 : _a2.getCompanyName) == null ? void 0 : _b2.call(_a2, person)) ?? person.company ?? "";
|
|
52564
|
+
return (getCompanyNameParam == null ? void 0 : getCompanyNameParam(person)) ?? person.company ?? "";
|
|
52594
52565
|
},
|
|
52595
|
-
[
|
|
52566
|
+
[getCompanyNameParam]
|
|
52596
52567
|
);
|
|
52597
52568
|
const getPersonName = React80.useCallback(
|
|
52598
52569
|
(person) => {
|
|
52599
|
-
|
|
52600
|
-
return ((_b2 = (_a2 = columnDefinition.cellRendererParams) == null ? void 0 : _a2.getPersonName) == null ? void 0 : _b2.call(_a2, person)) ?? person.name ?? "";
|
|
52570
|
+
return (getPersonNameParam == null ? void 0 : getPersonNameParam(person)) ?? person.name ?? "";
|
|
52601
52571
|
},
|
|
52602
|
-
[
|
|
52572
|
+
[getPersonNameParam]
|
|
52603
52573
|
);
|
|
52604
52574
|
const getPersonImageUrl = React80.useCallback(
|
|
52605
52575
|
(person) => {
|
|
52606
|
-
|
|
52607
|
-
return ((_b2 = (_a2 = columnDefinition.cellRendererParams) == null ? void 0 : _a2.getImageURL) == null ? void 0 : _b2.call(_a2, person)) ?? "";
|
|
52576
|
+
return (getImageURL == null ? void 0 : getImageURL(person)) ?? "";
|
|
52608
52577
|
},
|
|
52609
|
-
[
|
|
52578
|
+
[getImageURL]
|
|
52610
52579
|
);
|
|
52611
52580
|
const getPersonInitials = React80.useCallback(
|
|
52612
52581
|
(person) => {
|
|
52613
|
-
|
|
52614
|
-
return ((_b2 = (_a2 = columnDefinition.cellRendererParams) == null ? void 0 : _a2.getInitials) == null ? void 0 : _b2.call(_a2, person)) ?? "";
|
|
52582
|
+
return (getInitials == null ? void 0 : getInitials(person)) ?? "";
|
|
52615
52583
|
},
|
|
52616
|
-
[
|
|
52584
|
+
[getInitials]
|
|
52617
52585
|
);
|
|
52618
52586
|
const getPersonNameWithCompany = React80.useCallback(
|
|
52619
52587
|
(person) => {
|
|
@@ -52641,9 +52609,6 @@ var Renderer6 = ({
|
|
|
52641
52609
|
}
|
|
52642
52610
|
return avatarWidth * avatarCount;
|
|
52643
52611
|
}, [getPeople, rowHeight]);
|
|
52644
|
-
const typographyProps = getCellValueTypographyProps(
|
|
52645
|
-
(_f = columnDefinition.cellRendererParams) == null ? void 0 : _f.typographyProps
|
|
52646
|
-
);
|
|
52647
52612
|
const people = getPeople();
|
|
52648
52613
|
if (isEmptyValue(value) || people.length === 0) {
|
|
52649
52614
|
return null;
|
|
@@ -52657,7 +52622,7 @@ var Renderer6 = ({
|
|
|
52657
52622
|
type: person.type || "user"
|
|
52658
52623
|
};
|
|
52659
52624
|
}).filter(
|
|
52660
|
-
((
|
|
52625
|
+
((_a = columnDefinition.cellRendererParams) == null ? void 0 : _a.avatarStackItemFilter) ?? defaultAvatarStackItemFilter
|
|
52661
52626
|
);
|
|
52662
52627
|
const isAvatarStackDisplayed = fullCellView && avatarStackItems && !!avatarStackItems.length;
|
|
52663
52628
|
return /* @__PURE__ */ React80.createElement(
|
|
@@ -52752,31 +52717,21 @@ var Renderer7 = ({
|
|
|
52752
52717
|
columnDefinition,
|
|
52753
52718
|
isGroup,
|
|
52754
52719
|
rowPinned,
|
|
52755
|
-
value
|
|
52720
|
+
value,
|
|
52721
|
+
typographyProps,
|
|
52722
|
+
inputProps,
|
|
52723
|
+
formatConfig
|
|
52756
52724
|
}) => {
|
|
52757
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
52758
52725
|
const I18n = useI18nContext();
|
|
52759
52726
|
if (isEmptyValue(value)) {
|
|
52760
52727
|
if (isGroup) {
|
|
52761
52728
|
return null;
|
|
52762
52729
|
}
|
|
52763
52730
|
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
|
-
);
|
|
52731
|
+
return /* @__PURE__ */ React80.createElement(Typography, { ...typographyProps, className: cx9("input-placeholder") }, (inputProps == null ? void 0 : inputProps.placeholder) || I18n.t("dataTable.cells.percentCell.placeholder"));
|
|
52774
52732
|
}
|
|
52775
52733
|
}
|
|
52776
|
-
const internalValue = formatPercentage(
|
|
52777
|
-
(value == null ? void 0 : value.toString()) ?? "",
|
|
52778
|
-
(_d = columnDefinition.cellRendererParams) == null ? void 0 : _d.formatConfig
|
|
52779
|
-
);
|
|
52734
|
+
const internalValue = formatPercentage((value == null ? void 0 : value.toString()) ?? "", formatConfig);
|
|
52780
52735
|
if (isGroup) {
|
|
52781
52736
|
return /* @__PURE__ */ React80.createElement(
|
|
52782
52737
|
Typography,
|
|
@@ -52791,51 +52746,62 @@ var Renderer7 = ({
|
|
|
52791
52746
|
return /* @__PURE__ */ React80.createElement(
|
|
52792
52747
|
Typography,
|
|
52793
52748
|
{
|
|
52794
|
-
...
|
|
52795
|
-
|
|
52796
|
-
),
|
|
52797
|
-
weight: rowPinned ? "bold" : (_g = (_f = columnDefinition.cellRendererParams) == null ? void 0 : _f.typographyProps) == null ? void 0 : _g.weight,
|
|
52749
|
+
...typographyProps,
|
|
52750
|
+
weight: rowPinned ? "bold" : typographyProps == null ? void 0 : typographyProps.weight,
|
|
52798
52751
|
className: cx9("tabular-nums")
|
|
52799
52752
|
},
|
|
52800
52753
|
internalValue
|
|
52801
52754
|
);
|
|
52802
52755
|
};
|
|
52803
52756
|
var PercentCellRenderer = withDataTableRenderer(Renderer7, "input");
|
|
52804
|
-
var Editor4 = React80.forwardRef(
|
|
52805
|
-
|
|
52806
|
-
|
|
52807
|
-
|
|
52808
|
-
stopEditing
|
|
52809
|
-
|
|
52810
|
-
|
|
52811
|
-
|
|
52812
|
-
}
|
|
52813
|
-
|
|
52814
|
-
|
|
52815
|
-
|
|
52816
|
-
|
|
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) || {}
|
|
52757
|
+
var Editor4 = React80.forwardRef(
|
|
52758
|
+
({
|
|
52759
|
+
columnDefinition,
|
|
52760
|
+
eventKey,
|
|
52761
|
+
stopEditing,
|
|
52762
|
+
value,
|
|
52763
|
+
formatConfig,
|
|
52764
|
+
inputProps
|
|
52765
|
+
}, ref) => {
|
|
52766
|
+
var _a;
|
|
52767
|
+
const I18n = useI18nContext();
|
|
52768
|
+
function onBlur(event) {
|
|
52769
|
+
stopEditing(ensureIsHTMLElement(event.relatedTarget));
|
|
52828
52770
|
}
|
|
52829
|
-
|
|
52830
|
-
|
|
52771
|
+
if (isEmptyValue(value) && !columnDefinition.editable) {
|
|
52772
|
+
return null;
|
|
52773
|
+
}
|
|
52774
|
+
const defaultValue = eventKey ? value : formatNumber(value, {
|
|
52775
|
+
...formatConfig || ((_a = columnDefinition.cellRendererParams) == null ? void 0 : _a.formatConfig),
|
|
52776
|
+
//TODO remove usage of columnDefinition.cellRendererParams in next major version
|
|
52777
|
+
symbol: void 0,
|
|
52778
|
+
symbolAfterValue: void 0
|
|
52779
|
+
});
|
|
52780
|
+
return /* @__PURE__ */ React80.createElement(
|
|
52781
|
+
Input,
|
|
52782
|
+
{
|
|
52783
|
+
placeholder: (inputProps == null ? void 0 : inputProps.placeholder) || I18n.t("dataTable.cells.percentCell.placeholder"),
|
|
52784
|
+
className: cx9("input-cell", "input-cell--right-aligned"),
|
|
52785
|
+
defaultValue,
|
|
52786
|
+
onBlur,
|
|
52787
|
+
ref,
|
|
52788
|
+
style: { textAlign: "right" },
|
|
52789
|
+
...inputProps
|
|
52790
|
+
}
|
|
52791
|
+
);
|
|
52792
|
+
}
|
|
52793
|
+
);
|
|
52831
52794
|
var PercentCellEditor = withDataTableEditor(Editor4, "input");
|
|
52832
52795
|
var Renderer8 = ({
|
|
52833
|
-
columnDefinition,
|
|
52834
52796
|
rowHeight,
|
|
52835
52797
|
isGroup,
|
|
52836
|
-
value
|
|
52798
|
+
value,
|
|
52799
|
+
getPersonName,
|
|
52800
|
+
getCompanyName,
|
|
52801
|
+
getImageURL,
|
|
52802
|
+
getInitials,
|
|
52803
|
+
typographyProps
|
|
52837
52804
|
}) => {
|
|
52838
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
52839
52805
|
const [showAvatar, setShowAvatar] = React80.useState(false);
|
|
52840
52806
|
React80.useEffect(() => {
|
|
52841
52807
|
setShowAvatar(rowHeight === rowSize.lg || rowHeight === rowSize.md);
|
|
@@ -52843,13 +52809,10 @@ var Renderer8 = ({
|
|
|
52843
52809
|
if (value === void 0 || value === null) {
|
|
52844
52810
|
return null;
|
|
52845
52811
|
}
|
|
52846
|
-
const name =
|
|
52847
|
-
const companyName =
|
|
52848
|
-
const imageURL =
|
|
52849
|
-
const initials =
|
|
52850
|
-
const typographyProps = getCellValueTypographyProps(
|
|
52851
|
-
(_i = columnDefinition.cellRendererParams) == null ? void 0 : _i.typographyProps
|
|
52852
|
-
);
|
|
52812
|
+
const name = getPersonName == null ? void 0 : getPersonName(value);
|
|
52813
|
+
const companyName = getCompanyName == null ? void 0 : getCompanyName(value);
|
|
52814
|
+
const imageURL = getImageURL == null ? void 0 : getImageURL(value);
|
|
52815
|
+
const initials = getInitials == null ? void 0 : getInitials(value);
|
|
52853
52816
|
if (isGroup) {
|
|
52854
52817
|
return /* @__PURE__ */ React80.createElement(Typography, { ...typographyProps, weight: "semibold" }, name);
|
|
52855
52818
|
}
|
|
@@ -52873,35 +52836,26 @@ var Renderer9 = ({
|
|
|
52873
52836
|
columnDefinition,
|
|
52874
52837
|
isGroup,
|
|
52875
52838
|
value,
|
|
52876
|
-
rowPinned
|
|
52839
|
+
rowPinned,
|
|
52840
|
+
getColor,
|
|
52841
|
+
displayAsPill,
|
|
52842
|
+
typographyProps,
|
|
52843
|
+
placeholder
|
|
52877
52844
|
}) => {
|
|
52878
|
-
var _a
|
|
52879
|
-
const { getColor, displayAsPill } = columnDefinition.cellRendererParams;
|
|
52845
|
+
var _a;
|
|
52880
52846
|
const I18n = useI18nContext();
|
|
52881
52847
|
if (isEmptyValue(value)) {
|
|
52882
52848
|
if (isGroup) {
|
|
52883
52849
|
return null;
|
|
52884
52850
|
}
|
|
52885
52851
|
if (columnDefinition.editable) {
|
|
52886
|
-
return /* @__PURE__ */ React80.createElement(
|
|
52887
|
-
|
|
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
|
-
);
|
|
52852
|
+
return /* @__PURE__ */ React80.createElement(Typography, { ...typographyProps, className: cx10("input-placeholder") }, placeholder || I18n.t("dataTable.cells.pillCell.placeholder", {
|
|
52853
|
+
label: columnDefinition.headerName
|
|
52854
|
+
}));
|
|
52898
52855
|
}
|
|
52899
52856
|
return null;
|
|
52900
52857
|
}
|
|
52901
|
-
const label = ((
|
|
52902
|
-
const typographyProps = getCellValueTypographyProps(
|
|
52903
|
-
(_d = columnDefinition.cellRendererParams) == null ? void 0 : _d.typographyProps
|
|
52904
|
-
);
|
|
52858
|
+
const label = ((_a = columnDefinition.getStringFormattedValue) == null ? void 0 : _a.call(columnDefinition, value)) || value;
|
|
52905
52859
|
if ((isGroup || rowPinned && columnDefinition.aggFunc) && !displayAsPill) {
|
|
52906
52860
|
return /* @__PURE__ */ React80.createElement(Typography, { ...typographyProps, weight: "semibold" }, label);
|
|
52907
52861
|
}
|
|
@@ -52909,8 +52863,18 @@ var Renderer9 = ({
|
|
|
52909
52863
|
};
|
|
52910
52864
|
var PillCellRenderer = withDataTableRenderer(Renderer9, "select");
|
|
52911
52865
|
var Editor5 = React80.forwardRef(
|
|
52912
|
-
({
|
|
52913
|
-
|
|
52866
|
+
({
|
|
52867
|
+
columnDefinition,
|
|
52868
|
+
data,
|
|
52869
|
+
setDataValue,
|
|
52870
|
+
stopEditing,
|
|
52871
|
+
value,
|
|
52872
|
+
selectOptions,
|
|
52873
|
+
getId: getIdParam,
|
|
52874
|
+
placeholder,
|
|
52875
|
+
getColor,
|
|
52876
|
+
clearable
|
|
52877
|
+
}, ref) => {
|
|
52914
52878
|
const [options, setOptions] = React80.useState([]);
|
|
52915
52879
|
const [loading, setLoading] = React80.useState(false);
|
|
52916
52880
|
const I18n = useI18nContext();
|
|
@@ -52918,8 +52882,6 @@ var Editor5 = React80.forwardRef(
|
|
|
52918
52882
|
stopEditing();
|
|
52919
52883
|
}
|
|
52920
52884
|
async function beforeShow() {
|
|
52921
|
-
var _a2;
|
|
52922
|
-
const selectOptions = ((_a2 = columnDefinition.cellEditorParams) == null ? void 0 : _a2.selectOptions) || [];
|
|
52923
52885
|
if (Array.isArray(selectOptions)) {
|
|
52924
52886
|
setOptions(selectOptions);
|
|
52925
52887
|
} else {
|
|
@@ -52936,28 +52898,27 @@ var Editor5 = React80.forwardRef(
|
|
|
52936
52898
|
setDataValue(columnDefinition.field, null);
|
|
52937
52899
|
}
|
|
52938
52900
|
function getId3(item) {
|
|
52939
|
-
|
|
52940
|
-
return ((_b2 = (_a2 = columnDefinition.cellEditorParams) == null ? void 0 : _a2.getId) == null ? void 0 : _b2.call(_a2, item)) ?? item;
|
|
52901
|
+
return (getIdParam == null ? void 0 : getIdParam(item)) ?? item;
|
|
52941
52902
|
}
|
|
52942
52903
|
function getLabel3(item) {
|
|
52943
|
-
var
|
|
52944
|
-
const unformattedLabel = ((
|
|
52904
|
+
var _a;
|
|
52905
|
+
const unformattedLabel = ((_a = columnDefinition.getStringFormattedValue) == null ? void 0 : _a.call(columnDefinition, item)) || "";
|
|
52945
52906
|
return unformattedLabel;
|
|
52946
52907
|
}
|
|
52947
52908
|
return /* @__PURE__ */ React80.createElement(
|
|
52948
52909
|
PillSelect,
|
|
52949
52910
|
{
|
|
52950
|
-
placeholder:
|
|
52911
|
+
placeholder: placeholder || I18n.t("dataTable.cells.pillCell.placeholder", {
|
|
52951
52912
|
label: columnDefinition.headerName
|
|
52952
52913
|
}),
|
|
52953
52914
|
afterHide,
|
|
52954
52915
|
beforeShow,
|
|
52955
52916
|
block: true,
|
|
52956
|
-
getColor
|
|
52917
|
+
getColor,
|
|
52957
52918
|
getId: getId3,
|
|
52958
52919
|
getLabel: getLabel3,
|
|
52959
52920
|
loading,
|
|
52960
|
-
onClear:
|
|
52921
|
+
onClear: clearable ? onClear : void 0,
|
|
52961
52922
|
onSelect,
|
|
52962
52923
|
options,
|
|
52963
52924
|
ref,
|
|
@@ -53002,14 +52963,12 @@ function useSearch(data, onSearchFunction) {
|
|
|
53002
52963
|
setSearchResultOptions
|
|
53003
52964
|
};
|
|
53004
52965
|
}
|
|
53005
|
-
function useSelectOptions(
|
|
52966
|
+
function useSelectOptions(selectOptions, data) {
|
|
53006
52967
|
const [options, setOptions] = React80.useState([]);
|
|
53007
52968
|
const [loading, setLoading] = React80.useState(false);
|
|
53008
52969
|
const [totalOptions, setTotalOptions] = React80.useState(0);
|
|
53009
52970
|
const fetchOptions = async (offset4) => {
|
|
53010
|
-
var _a;
|
|
53011
52971
|
setLoading(true);
|
|
53012
|
-
const selectOptions = ((_a = columnDefinition.cellEditorParams) == null ? void 0 : _a.selectOptions) || [];
|
|
53013
52972
|
let newOptions = [];
|
|
53014
52973
|
let total = 0;
|
|
53015
52974
|
if (typeof selectOptions === "function") {
|
|
@@ -53041,33 +53000,23 @@ var cx11 = classnames.bind({ ...styles_default, ...truncation_default });
|
|
|
53041
53000
|
var Renderer10 = ({
|
|
53042
53001
|
columnDefinition,
|
|
53043
53002
|
isGroup,
|
|
53044
|
-
value
|
|
53003
|
+
value,
|
|
53004
|
+
typographyProps,
|
|
53005
|
+
placeholder
|
|
53045
53006
|
}) => {
|
|
53046
|
-
var _a
|
|
53007
|
+
var _a;
|
|
53047
53008
|
const I18n = useI18nContext();
|
|
53048
53009
|
if (isEmptyValue(value)) {
|
|
53049
53010
|
if (isGroup) {
|
|
53050
53011
|
return null;
|
|
53051
53012
|
}
|
|
53052
53013
|
if (columnDefinition.editable) {
|
|
53053
|
-
return /* @__PURE__ */ React80.createElement(
|
|
53054
|
-
|
|
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
|
-
);
|
|
53014
|
+
return /* @__PURE__ */ React80.createElement(Typography, { ...typographyProps, className: cx11("truncatingText") }, placeholder || I18n.t("dataTable.cells.selectCell.placeholder", {
|
|
53015
|
+
label: columnDefinition.headerName
|
|
53016
|
+
}));
|
|
53065
53017
|
}
|
|
53066
53018
|
}
|
|
53067
|
-
const internalValue = (
|
|
53068
|
-
const typographyProps = getCellValueTypographyProps(
|
|
53069
|
-
(_d = columnDefinition.cellRendererParams) == null ? void 0 : _d.typographyProps
|
|
53070
|
-
);
|
|
53019
|
+
const internalValue = (_a = columnDefinition.getStringFormattedValue) == null ? void 0 : _a.call(columnDefinition, value);
|
|
53071
53020
|
if (isGroup) {
|
|
53072
53021
|
return /* @__PURE__ */ React80.createElement(
|
|
53073
53022
|
Typography,
|
|
@@ -53083,15 +53032,25 @@ var Renderer10 = ({
|
|
|
53083
53032
|
};
|
|
53084
53033
|
var SelectCellRenderer = withDataTableRenderer(Renderer10, "select");
|
|
53085
53034
|
var Editor6 = React80.forwardRef(
|
|
53086
|
-
({
|
|
53087
|
-
|
|
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) => {
|
|
53088
53047
|
const { options, loading, totalOptions, fetchOptions } = useSelectOptions(
|
|
53089
|
-
|
|
53048
|
+
selectOptions,
|
|
53090
53049
|
data
|
|
53091
53050
|
);
|
|
53092
53051
|
const { onSearch, searchResultOptions, isSearching } = useSearch(
|
|
53093
53052
|
data,
|
|
53094
|
-
|
|
53053
|
+
onSearchParam
|
|
53095
53054
|
);
|
|
53096
53055
|
function onSelect(selection) {
|
|
53097
53056
|
if (selection.item !== value) {
|
|
@@ -53114,16 +53073,14 @@ var Editor6 = React80.forwardRef(
|
|
|
53114
53073
|
}
|
|
53115
53074
|
}, 500);
|
|
53116
53075
|
function getId3(val) {
|
|
53117
|
-
|
|
53118
|
-
return ((_b2 = (_a2 = columnDefinition.cellEditorParams) == null ? void 0 : _a2.getId) == null ? void 0 : _b2.call(_a2, val)) ?? val;
|
|
53076
|
+
return (getIdParam == null ? void 0 : getIdParam(val)) ?? val;
|
|
53119
53077
|
}
|
|
53120
53078
|
function getLabel3(val) {
|
|
53121
|
-
var
|
|
53122
|
-
return (
|
|
53079
|
+
var _a;
|
|
53080
|
+
return (_a = columnDefinition.getStringFormattedValue) == null ? void 0 : _a.call(columnDefinition, val);
|
|
53123
53081
|
}
|
|
53124
53082
|
function getOptionLabel(option) {
|
|
53125
|
-
|
|
53126
|
-
return ((_b2 = (_a2 = columnDefinition.cellEditorParams) == null ? void 0 : _a2.getOptionLabel) == null ? void 0 : _b2.call(_a2, option)) || getLabel3(option);
|
|
53083
|
+
return (getOptionLabelParam == null ? void 0 : getOptionLabelParam(option)) || getLabel3(option);
|
|
53127
53084
|
}
|
|
53128
53085
|
return /* @__PURE__ */ React80.createElement(
|
|
53129
53086
|
Select,
|
|
@@ -53135,7 +53092,7 @@ var Editor6 = React80.forwardRef(
|
|
|
53135
53092
|
loading: isSearching || loading,
|
|
53136
53093
|
onSearch,
|
|
53137
53094
|
onSelect,
|
|
53138
|
-
onClear:
|
|
53095
|
+
onClear: clearable ? onClear : void 0,
|
|
53139
53096
|
onScrollBottom,
|
|
53140
53097
|
ref,
|
|
53141
53098
|
className: cx11("input-cell", "truncatingText")
|
|
@@ -53159,28 +53116,21 @@ var Renderer11 = ({
|
|
|
53159
53116
|
rowHeight,
|
|
53160
53117
|
node,
|
|
53161
53118
|
isGroup,
|
|
53162
|
-
value
|
|
53119
|
+
value,
|
|
53120
|
+
typographyProps,
|
|
53121
|
+
inputProps
|
|
53163
53122
|
}) => {
|
|
53164
|
-
var _a
|
|
53123
|
+
var _a;
|
|
53165
53124
|
const I18n = useI18nContext();
|
|
53166
53125
|
if (isEmptyValue(value) && columnDefinition.editable) {
|
|
53167
53126
|
if (isGroup) {
|
|
53168
53127
|
return null;
|
|
53169
53128
|
}
|
|
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
|
-
);
|
|
53129
|
+
return /* @__PURE__ */ React80.createElement(Typography, { ...typographyProps, className: cx12("input-placeholder") }, (inputProps == null ? void 0 : inputProps.placeholder) || I18n.t("dataTable.cells.textCell.placeholder"));
|
|
53180
53130
|
}
|
|
53181
|
-
const internalValue = ((
|
|
53131
|
+
const internalValue = ((_a = columnDefinition.getStringFormattedValue) == null ? void 0 : _a.call(columnDefinition, value)) ?? value;
|
|
53182
53132
|
const className = cx12(
|
|
53183
|
-
|
|
53133
|
+
typographyProps == null ? void 0 : typographyProps.className,
|
|
53184
53134
|
"textCell",
|
|
53185
53135
|
"truncatingText",
|
|
53186
53136
|
{
|
|
@@ -53188,9 +53138,6 @@ var Renderer11 = ({
|
|
|
53188
53138
|
"truncatingText--lg": rowHeight === rowSize.lg
|
|
53189
53139
|
}
|
|
53190
53140
|
);
|
|
53191
|
-
const typographyProps = getCellValueTypographyProps(
|
|
53192
|
-
(_g = columnDefinition.cellRendererParams) == null ? void 0 : _g.typographyProps
|
|
53193
|
-
);
|
|
53194
53141
|
if (isGroup) {
|
|
53195
53142
|
const fontWeight = (node == null ? void 0 : node.footer) ? "regular" : "semibold";
|
|
53196
53143
|
return /* @__PURE__ */ React80.createElement(
|
|
@@ -53208,8 +53155,8 @@ var Renderer11 = ({
|
|
|
53208
53155
|
};
|
|
53209
53156
|
var TextCellRenderer = withDataTableRenderer(Renderer11, "input");
|
|
53210
53157
|
var Editor7 = React80.forwardRef(
|
|
53211
|
-
({ columnDefinition, eventKey, stopEditing, value }, ref) => {
|
|
53212
|
-
var _a
|
|
53158
|
+
({ columnDefinition, eventKey, stopEditing, value, inputProps }, ref) => {
|
|
53159
|
+
var _a;
|
|
53213
53160
|
function onBlur(event) {
|
|
53214
53161
|
stopEditing(ensureIsHTMLElement(event.relatedTarget));
|
|
53215
53162
|
}
|
|
@@ -53218,12 +53165,12 @@ var Editor7 = React80.forwardRef(
|
|
|
53218
53165
|
return /* @__PURE__ */ React80.createElement(
|
|
53219
53166
|
Input,
|
|
53220
53167
|
{
|
|
53221
|
-
placeholder: ((_c = (_b = columnDefinition.cellEditorParams) == null ? void 0 : _b.inputProps) == null ? void 0 : _c.placeholder) || I18n.t("dataTable.cells.textCell.placeholder"),
|
|
53222
53168
|
className: cx12("input-cell"),
|
|
53223
53169
|
defaultValue: internalValue,
|
|
53224
53170
|
onBlur,
|
|
53225
53171
|
ref,
|
|
53226
|
-
...
|
|
53172
|
+
...inputProps,
|
|
53173
|
+
placeholder: (inputProps == null ? void 0 : inputProps.placeholder) || I18n.t("dataTable.cells.textCell.placeholder")
|
|
53227
53174
|
}
|
|
53228
53175
|
);
|
|
53229
53176
|
}
|
|
@@ -53244,29 +53191,19 @@ var Renderer12 = ({
|
|
|
53244
53191
|
columnDefinition,
|
|
53245
53192
|
node,
|
|
53246
53193
|
isGroup,
|
|
53247
|
-
value
|
|
53194
|
+
value,
|
|
53195
|
+
typographyProps,
|
|
53196
|
+
textAreaProps
|
|
53248
53197
|
}) => {
|
|
53249
|
-
var _a
|
|
53198
|
+
var _a;
|
|
53250
53199
|
const I18n = useI18nContext();
|
|
53251
53200
|
if (isEmptyValue(value) && columnDefinition.editable) {
|
|
53252
53201
|
if (isGroup) {
|
|
53253
53202
|
return null;
|
|
53254
53203
|
}
|
|
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
|
-
);
|
|
53204
|
+
return /* @__PURE__ */ React80.createElement(Typography, { ...typographyProps, className: cx13("input-placeholder") }, (textAreaProps == null ? void 0 : textAreaProps.placeholder) || I18n.t("dataTable.cells.textCell.placeholder"));
|
|
53265
53205
|
}
|
|
53266
|
-
const internalValue = ((
|
|
53267
|
-
const typographyProps = getCellValueTypographyProps(
|
|
53268
|
-
(_e = columnDefinition.cellRendererParams) == null ? void 0 : _e.typographyProps
|
|
53269
|
-
);
|
|
53206
|
+
const internalValue = ((_a = columnDefinition.getStringFormattedValue) == null ? void 0 : _a.call(columnDefinition, value)) ?? value;
|
|
53270
53207
|
if (isGroup) {
|
|
53271
53208
|
const fontWeight = (node == null ? void 0 : node.footer) ? "regular" : "semibold";
|
|
53272
53209
|
return /* @__PURE__ */ React80.createElement(
|
|
@@ -53282,8 +53219,8 @@ var Renderer12 = ({
|
|
|
53282
53219
|
return /* @__PURE__ */ React80.createElement(Typography, { ...typographyProps, className: cx13("textarea-cell", "text") }, internalValue);
|
|
53283
53220
|
};
|
|
53284
53221
|
var Editor8 = React80.forwardRef(
|
|
53285
|
-
({ columnDefinition, stopEditing, value }, ref) => {
|
|
53286
|
-
var _a
|
|
53222
|
+
({ columnDefinition, stopEditing, value, textAreaProps }, ref) => {
|
|
53223
|
+
var _a;
|
|
53287
53224
|
function onBlur(event) {
|
|
53288
53225
|
stopEditing(ensureIsHTMLElement(event.relatedTarget));
|
|
53289
53226
|
}
|
|
@@ -53292,14 +53229,14 @@ var Editor8 = React80.forwardRef(
|
|
|
53292
53229
|
return /* @__PURE__ */ React80.createElement(
|
|
53293
53230
|
TextArea,
|
|
53294
53231
|
{
|
|
53295
|
-
placeholder: ((_c = (_b = columnDefinition.cellEditorParams) == null ? void 0 : _b.textAreaProps) == null ? void 0 : _c.placeholder) || I18n.t("dataTable.cells.textCell.placeholder"),
|
|
53296
53232
|
className: cx13("textarea-cell", "editor-text"),
|
|
53297
53233
|
defaultValue: internalValue,
|
|
53298
53234
|
onBlur,
|
|
53299
53235
|
ref,
|
|
53300
53236
|
resize: "none",
|
|
53301
53237
|
style: { lineHeight: "16px" },
|
|
53302
|
-
...
|
|
53238
|
+
...textAreaProps,
|
|
53239
|
+
placeholder: (textAreaProps == null ? void 0 : textAreaProps.placeholder) || I18n.t("dataTable.cells.textCell.placeholder")
|
|
53303
53240
|
}
|
|
53304
53241
|
);
|
|
53305
53242
|
}
|
|
@@ -55697,11 +55634,8 @@ function getRowActions(actions, rowProps) {
|
|
|
55697
55634
|
return actions;
|
|
55698
55635
|
}
|
|
55699
55636
|
var InternalRowActionsCellRenderer = (props) => {
|
|
55700
|
-
const actions = getRowActions(
|
|
55701
|
-
|
|
55702
|
-
props
|
|
55703
|
-
);
|
|
55704
|
-
if (props.rowPinned || props.columnDefinition.cellRendererParams.hideActionsOnGroupedRow && props.isGroup || actions.length === 0) {
|
|
55637
|
+
const actions = getRowActions(props.actions, props);
|
|
55638
|
+
if (props.rowPinned || props.hideActionsOnGroupedRow && props.isGroup || actions.length === 0) {
|
|
55705
55639
|
return null;
|
|
55706
55640
|
}
|
|
55707
55641
|
return /* @__PURE__ */ React80.createElement(
|
|
@@ -55973,7 +55907,8 @@ var DataTableCellRenderer = ({
|
|
|
55973
55907
|
node,
|
|
55974
55908
|
editorType,
|
|
55975
55909
|
value,
|
|
55976
|
-
setValue
|
|
55910
|
+
setValue,
|
|
55911
|
+
...props
|
|
55977
55912
|
}) => {
|
|
55978
55913
|
var _a, _b, _c, _d, _e;
|
|
55979
55914
|
const { columnApi } = useInternalTableContext();
|
|
@@ -56004,10 +55939,11 @@ var DataTableCellRenderer = ({
|
|
|
56004
55939
|
parentData: context == null ? void 0 : context.parentData,
|
|
56005
55940
|
parentId: context == null ? void 0 : context.parentId,
|
|
56006
55941
|
rowHeight,
|
|
56007
|
-
rowIndex: node.rowIndex,
|
|
56008
55942
|
rowPinned: node.rowPinned,
|
|
56009
55943
|
tableApi: tableRef == null ? void 0 : tableRef.current,
|
|
56010
|
-
value
|
|
55944
|
+
value,
|
|
55945
|
+
...props,
|
|
55946
|
+
typographyProps: getCellValueTypographyProps(props.typographyProps)
|
|
56011
55947
|
};
|
|
56012
55948
|
const hasValue = value !== void 0 && value !== null && value !== "";
|
|
56013
55949
|
const isSelectCellComponent = ((_c = (_b = columnDefinition.cellRendererSelector) == null ? void 0 : _b.call(columnDefinition, {
|
|
@@ -56087,7 +56023,8 @@ var DataTableCellEditor = React80.forwardRef(
|
|
|
56087
56023
|
node,
|
|
56088
56024
|
parseValue,
|
|
56089
56025
|
stopEditing,
|
|
56090
|
-
value
|
|
56026
|
+
value,
|
|
56027
|
+
...props
|
|
56091
56028
|
}, ref) => {
|
|
56092
56029
|
var _a;
|
|
56093
56030
|
const startingValue = getStartingValue(eventKey, editorType, value);
|
|
@@ -56198,7 +56135,7 @@ var DataTableCellEditor = React80.forwardRef(
|
|
|
56198
56135
|
setCurrentValue(newValue);
|
|
56199
56136
|
},
|
|
56200
56137
|
stopEditing: (relatedTarget) => {
|
|
56201
|
-
const isRelatedTargetOutsideTable = (relatedTarget == null ? void 0 : relatedTarget.closest('[data-qa="data-table-table')) === null;
|
|
56138
|
+
const isRelatedTargetOutsideTable = (relatedTarget == null ? void 0 : relatedTarget.closest('[data-qa="data-table-table"]')) === null;
|
|
56202
56139
|
stopEditing(isRelatedTargetOutsideTable);
|
|
56203
56140
|
if (isRelatedTargetOutsideTable) {
|
|
56204
56141
|
api.clearFocusedCell();
|
|
@@ -56207,7 +56144,8 @@ var DataTableCellEditor = React80.forwardRef(
|
|
|
56207
56144
|
},
|
|
56208
56145
|
tableApi: tableRef == null ? void 0 : tableRef.current,
|
|
56209
56146
|
value: currentValue,
|
|
56210
|
-
ref: handleRefs(editorType)
|
|
56147
|
+
ref: handleRefs(editorType),
|
|
56148
|
+
...props
|
|
56211
56149
|
}
|
|
56212
56150
|
)
|
|
56213
56151
|
);
|
|
@@ -57297,31 +57235,34 @@ function getLabel2(func, option) {
|
|
|
57297
57235
|
function getId2(func, option) {
|
|
57298
57236
|
return (func == null ? void 0 : func(option)) ?? (option == null ? void 0 : option.id) ?? option;
|
|
57299
57237
|
}
|
|
57300
|
-
var InternalMultiSelectCellRenderer = ({
|
|
57301
|
-
|
|
57238
|
+
var InternalMultiSelectCellRenderer = ({
|
|
57239
|
+
columnDefinition,
|
|
57240
|
+
rowHeight,
|
|
57241
|
+
value,
|
|
57242
|
+
getValue: getValueParam,
|
|
57243
|
+
enablePlaceholder: enablePlaceholderParam,
|
|
57244
|
+
placeholder: placeholderParam,
|
|
57245
|
+
typographyProps,
|
|
57246
|
+
getLabel: getLabelParam,
|
|
57247
|
+
getId: getIdParam
|
|
57248
|
+
}) => {
|
|
57302
57249
|
const I18n = useI18nContext();
|
|
57303
57250
|
const ref = React80.useRef();
|
|
57304
57251
|
React80.useLayoutEffect(() => {
|
|
57305
|
-
var
|
|
57306
|
-
(
|
|
57252
|
+
var _a, _b;
|
|
57253
|
+
(_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
57254
|
});
|
|
57308
57255
|
if (value === void 0 || value === null) {
|
|
57309
57256
|
return null;
|
|
57310
57257
|
}
|
|
57311
|
-
const options = getValue(
|
|
57312
|
-
|
|
57313
|
-
|
|
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");
|
|
57258
|
+
const options = getValue(getValueParam, value, emptyArray);
|
|
57259
|
+
const enablePlaceholder = (enablePlaceholderParam && columnDefinition.editable) ?? false;
|
|
57260
|
+
const placeholder = placeholderParam ?? I18n.t("dataTable.cells.multiSelectCell.placeholder");
|
|
57318
57261
|
return /* @__PURE__ */ React80.createElement(
|
|
57319
57262
|
Typography,
|
|
57320
57263
|
{
|
|
57321
57264
|
as: "ol",
|
|
57322
|
-
...
|
|
57323
|
-
(_d = columnDefinition.cellRendererParams) == null ? void 0 : _d.typographyProps
|
|
57324
|
-
),
|
|
57265
|
+
...typographyProps,
|
|
57325
57266
|
className: cx16("inlineListItems", "truncatingText", {
|
|
57326
57267
|
"truncatingText--md": rowHeight === rowSize.md,
|
|
57327
57268
|
"truncatingText--lg": rowHeight === rowSize.lg
|
|
@@ -57329,15 +57270,8 @@ var InternalMultiSelectCellRenderer = ({ columnDefinition, rowHeight, value }) =
|
|
|
57329
57270
|
ref
|
|
57330
57271
|
},
|
|
57331
57272
|
options.length ? options.map((option, idx, arr) => {
|
|
57332
|
-
|
|
57333
|
-
const
|
|
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
|
-
);
|
|
57273
|
+
const label = getLabel2(getLabelParam, option);
|
|
57274
|
+
const optionId = getId2(getIdParam, option);
|
|
57341
57275
|
const key = `${label}_${optionId}_idx_${idx}`;
|
|
57342
57276
|
return /* @__PURE__ */ React80.createElement(React80.Fragment, { key }, /* @__PURE__ */ React80.createElement("li", null, label, idx !== arr.length - 1 ? commaToken : null));
|
|
57343
57277
|
}) : enablePlaceholder ? /* @__PURE__ */ React80.createElement("li", { style: { color: colors.gray45 } }, placeholder) : null
|
|
@@ -57347,66 +57281,80 @@ var MultiSelectCellRenderer = withDataTableRenderer(
|
|
|
57347
57281
|
InternalMultiSelectCellRenderer,
|
|
57348
57282
|
"select"
|
|
57349
57283
|
);
|
|
57350
|
-
var MultiSelectEditor = React80.forwardRef(
|
|
57351
|
-
|
|
57352
|
-
const [selectedValue, setSelectedValue] = React80.useState(value);
|
|
57353
|
-
const { options, loading, totalOptions, fetchOptions } = useSelectOptions(
|
|
57284
|
+
var MultiSelectEditor = React80.forwardRef(
|
|
57285
|
+
({
|
|
57354
57286
|
columnDefinition,
|
|
57355
|
-
|
|
57356
|
-
|
|
57357
|
-
|
|
57358
|
-
|
|
57359
|
-
|
|
57360
|
-
|
|
57361
|
-
|
|
57362
|
-
|
|
57287
|
+
value = [],
|
|
57288
|
+
setDataValue,
|
|
57289
|
+
data,
|
|
57290
|
+
stopEditing,
|
|
57291
|
+
selectOptions,
|
|
57292
|
+
placeholder,
|
|
57293
|
+
onSearch: editorOnSearch,
|
|
57294
|
+
getLabel: getLabelParam,
|
|
57295
|
+
getId: getIdParam
|
|
57296
|
+
}, ref) => {
|
|
57297
|
+
const [selectedValue, setSelectedValue] = React80.useState(value);
|
|
57298
|
+
const { options, loading, totalOptions, fetchOptions } = useSelectOptions(
|
|
57299
|
+
selectOptions,
|
|
57300
|
+
data
|
|
57301
|
+
);
|
|
57302
|
+
const shouldSearch = options.length < totalOptions && !!editorOnSearch;
|
|
57303
|
+
const {
|
|
57304
|
+
onSearch,
|
|
57305
|
+
searchResultOptions,
|
|
57306
|
+
setSearchResultOptions,
|
|
57307
|
+
isSearching
|
|
57308
|
+
} = useSearch(data, shouldSearch ? editorOnSearch : void 0);
|
|
57309
|
+
async function beforeShow() {
|
|
57310
|
+
if (options.length === 0) {
|
|
57311
|
+
await fetchOptions();
|
|
57312
|
+
}
|
|
57313
|
+
return true;
|
|
57363
57314
|
}
|
|
57364
|
-
|
|
57365
|
-
|
|
57366
|
-
|
|
57367
|
-
|
|
57368
|
-
|
|
57369
|
-
|
|
57315
|
+
const onScrollBottom = debounce5(async () => {
|
|
57316
|
+
if (!searchResultOptions && options.length < totalOptions) {
|
|
57317
|
+
const nextOffset = options.length;
|
|
57318
|
+
await fetchOptions(nextOffset);
|
|
57319
|
+
}
|
|
57320
|
+
}, 500);
|
|
57321
|
+
function onChange(value2) {
|
|
57322
|
+
setSelectedValue(value2);
|
|
57323
|
+
setDataValue(columnDefinition.field, value2);
|
|
57324
|
+
if (searchResultOptions) {
|
|
57325
|
+
setSearchResultOptions(void 0);
|
|
57326
|
+
}
|
|
57370
57327
|
}
|
|
57371
|
-
|
|
57372
|
-
|
|
57373
|
-
setSelectedValue(value2);
|
|
57374
|
-
setDataValue(columnDefinition.field, value2);
|
|
57375
|
-
if (searchResultOptions) {
|
|
57376
|
-
setSearchResultOptions(void 0);
|
|
57328
|
+
function getLabel3(func, option) {
|
|
57329
|
+
return (func == null ? void 0 : func(option)) ?? (option == null ? void 0 : option.label) ?? (option == null ? void 0 : option.name) ?? option;
|
|
57377
57330
|
}
|
|
57378
|
-
|
|
57379
|
-
|
|
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
|
|
57331
|
+
function getId3(func, option) {
|
|
57332
|
+
return (func == null ? void 0 : func(option)) ?? (option == null ? void 0 : option.id) ?? option;
|
|
57407
57333
|
}
|
|
57408
|
-
|
|
57409
|
-
|
|
57334
|
+
return /* @__PURE__ */ React80.createElement(
|
|
57335
|
+
MultiSelect,
|
|
57336
|
+
{
|
|
57337
|
+
beforeShow,
|
|
57338
|
+
afterHide: () => stopEditing(),
|
|
57339
|
+
block: true,
|
|
57340
|
+
loading: isSearching || loading,
|
|
57341
|
+
getId: (option) => {
|
|
57342
|
+
return getId3(getIdParam, option);
|
|
57343
|
+
},
|
|
57344
|
+
getLabel: (option) => {
|
|
57345
|
+
return getLabel3(getLabelParam, option);
|
|
57346
|
+
},
|
|
57347
|
+
placeholder,
|
|
57348
|
+
onScrollBottom,
|
|
57349
|
+
onSearch,
|
|
57350
|
+
onChange,
|
|
57351
|
+
options: searchResultOptions || options,
|
|
57352
|
+
value: selectedValue,
|
|
57353
|
+
ref
|
|
57354
|
+
}
|
|
57355
|
+
);
|
|
57356
|
+
}
|
|
57357
|
+
);
|
|
57410
57358
|
var MultiSelectCellEditor = withDataTableEditor(
|
|
57411
57359
|
MultiSelectEditor,
|
|
57412
57360
|
"select"
|