@procore/data-table 13.3.2 → 14.0.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 +8 -0
- package/dist/legacy/index.d.mts +67 -20
- package/dist/legacy/index.d.ts +67 -20
- package/dist/legacy/index.js +1122 -1005
- package/dist/legacy/index.mjs +822 -708
- package/dist/modern/index.d.mts +67 -20
- package/dist/modern/index.d.ts +67 -20
- package/dist/modern/index.js +1122 -1005
- package/dist/modern/index.mjs +822 -708
- package/package.json +11 -9
package/dist/modern/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { startsWith, equals, omit, isNil, mergeDeepLeft, intersection, isEmpty, groupBy } from 'ramda';
|
|
1
|
+
import React83, { useState, forwardRef, useContext, useRef, useImperativeHandle, useLayoutEffect, useCallback, useMemo, memo, useEffect, Component as Component$1, createElement } from 'react';
|
|
2
|
+
import { startsWith, mergeDeepRight, equals, omit, isNil, mergeDeepLeft, intersection, isEmpty, groupBy } from 'ramda';
|
|
3
3
|
import { useI18nContext, Select, Input, UNSAFE_useOverlayTriggerContext, Card, Flex, Box, SegmentedController, Calendar, useDateTime, OverlayTrigger, isEventSource, DateInput, UNSAFE_isValidYearRange, DateSelect, PillSelect, TextArea, UNSAFE_useMenuImperativeControlNavigation, UNSAFE_Menu, UNSAFE_menuItemsWrapperAttribute, Spinner as Spinner$1, FlexList, Typography, Tooltip, Button, Required, colors, Form, spacing, Switch, Panel, UNSAFE_StyledFilterTokenLabel, typographyWeights, SelectButton, StyledSelectButton, StyledSelectButtonLabel, StyledButton, StyledSelectArrow, Popover, UNSAFE_StyledSuperSelectTrigger, UNSAFE_StyledSuperSelectLabel, UNSAFE_StyledSuperSelectArrow, DateTimeProvider, useField, Label, UNSAFE_mergeRefs, ContactItem as ContactItem$1, ToggleButton, Pagination, Link, AvatarStack, Pill, Typeahead, UNSAFE_FilterToken, useI18n, I18nContext, UNSAFE_SuperSelect, Avatar, MultiSelect, H3, Checkbox, useVisibility, UNSAFE_useSuperSelectContext, DropdownFlyout, StyledDropdownFlyoutLabel, StyledDropdownFlyoutExpandIcon, EmptyState as EmptyState$1 } from '@procore/core-react';
|
|
4
4
|
import classnames from 'classnames/bind';
|
|
5
5
|
import { Error as Error$1, Grip, Pencil, Building, Calendar as Calendar$1, CaretsInVertical, CaretsOutVertical, CaretsOutVerticalWithLine, CaretsIn, CaretsOut, CaretDown, CaretRight, ArrowDown, ArrowUp } from '@procore/core-icons';
|
|
@@ -8,7 +8,8 @@ import { isDate, parseISO, isSameDay, formatISO, isBefore } from 'date-fns';
|
|
|
8
8
|
import { formatNumber, formatCurrency, formatPercentage } from '@procore/labs-financials-utils';
|
|
9
9
|
import debounce2 from 'lodash.debounce';
|
|
10
10
|
import Clear from '@procore/core-icons/dist/icons/Clear';
|
|
11
|
-
import {
|
|
11
|
+
import { detectPrng, factory } from 'ulid';
|
|
12
|
+
import { useToastAlertContext, ToastAlertProvider } from '@procore/toast-alert';
|
|
12
13
|
import ReactDOM, { createPortal } from 'react-dom';
|
|
13
14
|
import { renderToString, renderToStaticMarkup } from 'react-dom/server';
|
|
14
15
|
import _isEqual from 'lodash.isequal';
|
|
@@ -999,7 +1000,7 @@ var rowHeightMap = {
|
|
|
999
1000
|
var Spinner = ({
|
|
1000
1001
|
loading,
|
|
1001
1002
|
...rest
|
|
1002
|
-
}) => /* @__PURE__ */
|
|
1003
|
+
}) => /* @__PURE__ */ React83.createElement(Box, { "data-qa": loading ? "loading" : "loaded", display: "flex-row", flex: 1 }, /* @__PURE__ */ React83.createElement(Spinner$1, { loading, size: "md", centered: true, ...rest }));
|
|
1003
1004
|
function isNestedColumnDefinition(Column2) {
|
|
1004
1005
|
return "children" in Column2;
|
|
1005
1006
|
}
|
|
@@ -7962,7 +7963,7 @@ var InternalBooleanCellRenderer = ({ columnDefinition, isGroup, value }) => {
|
|
|
7962
7963
|
if (isGroup) {
|
|
7963
7964
|
return null;
|
|
7964
7965
|
}
|
|
7965
|
-
return /* @__PURE__ */
|
|
7966
|
+
return /* @__PURE__ */ React83.createElement(
|
|
7966
7967
|
Typography,
|
|
7967
7968
|
{
|
|
7968
7969
|
...getCellValueTypographyProps(
|
|
@@ -7976,14 +7977,14 @@ var BooleanCellRenderer = withDataTableRenderer(
|
|
|
7976
7977
|
InternalBooleanCellRenderer,
|
|
7977
7978
|
"select"
|
|
7978
7979
|
);
|
|
7979
|
-
var InternalBooleanCellEditor =
|
|
7980
|
+
var InternalBooleanCellEditor = React83.forwardRef(({ columnDefinition, setDataValue, stopEditing, value }, ref) => {
|
|
7980
7981
|
const I18n = useI18nContext();
|
|
7981
7982
|
function onSelect(selection) {
|
|
7982
7983
|
if (selection.item !== value) {
|
|
7983
7984
|
setDataValue(columnDefinition.field, selection.item);
|
|
7984
7985
|
}
|
|
7985
7986
|
}
|
|
7986
|
-
return /* @__PURE__ */
|
|
7987
|
+
return /* @__PURE__ */ React83.createElement(
|
|
7987
7988
|
Select,
|
|
7988
7989
|
{
|
|
7989
7990
|
afterHide: stopEditing,
|
|
@@ -7993,7 +7994,7 @@ var InternalBooleanCellEditor = React82.forwardRef(({ columnDefinition, setDataV
|
|
|
7993
7994
|
onSelect,
|
|
7994
7995
|
ref
|
|
7995
7996
|
},
|
|
7996
|
-
/* @__PURE__ */
|
|
7997
|
+
/* @__PURE__ */ React83.createElement(
|
|
7997
7998
|
Select.Option,
|
|
7998
7999
|
{
|
|
7999
8000
|
value: true,
|
|
@@ -8001,7 +8002,7 @@ var InternalBooleanCellEditor = React82.forwardRef(({ columnDefinition, setDataV
|
|
|
8001
8002
|
},
|
|
8002
8003
|
I18n.t("dataTable.cells.booleanCell.options.yes")
|
|
8003
8004
|
),
|
|
8004
|
-
/* @__PURE__ */
|
|
8005
|
+
/* @__PURE__ */ React83.createElement(Select.Option, { value: false, selected: !value }, I18n.t("dataTable.cells.booleanCell.options.no"))
|
|
8005
8006
|
);
|
|
8006
8007
|
});
|
|
8007
8008
|
var BooleanCellEditor = withDataTableEditor(
|
|
@@ -8016,7 +8017,7 @@ var Renderer = ({
|
|
|
8016
8017
|
if (rowPinned) {
|
|
8017
8018
|
return null;
|
|
8018
8019
|
}
|
|
8019
|
-
return /* @__PURE__ */
|
|
8020
|
+
return /* @__PURE__ */ React83.createElement(FlexList, { justifyContent: "center", alignItems: "center", size: "xs" }, columnDefinition.cellRendererParams.buttons.map((Button6) => /* @__PURE__ */ React83.createElement(
|
|
8020
8021
|
Button6,
|
|
8021
8022
|
{
|
|
8022
8023
|
key: Button6.displayName,
|
|
@@ -8067,18 +8068,18 @@ function ContactItem({
|
|
|
8067
8068
|
"truncatingText--md": rowHeight === rowSize.md,
|
|
8068
8069
|
"truncatingText--lg": rowHeight === rowSize.lg
|
|
8069
8070
|
});
|
|
8070
|
-
return /* @__PURE__ */
|
|
8071
|
+
return /* @__PURE__ */ React83.createElement(Flex, { alignItems: "center" }, showAvatar && /* @__PURE__ */ React83.createElement(Avatar, { size: "md" }, (() => {
|
|
8071
8072
|
if (imageUrl) {
|
|
8072
|
-
return /* @__PURE__ */
|
|
8073
|
+
return /* @__PURE__ */ React83.createElement(Avatar.Portrait, { imageUrl });
|
|
8073
8074
|
}
|
|
8074
8075
|
if (icon) {
|
|
8075
|
-
return /* @__PURE__ */
|
|
8076
|
+
return /* @__PURE__ */ React83.createElement(Avatar.Icon, { icon });
|
|
8076
8077
|
}
|
|
8077
8078
|
if (initials) {
|
|
8078
|
-
return /* @__PURE__ */
|
|
8079
|
+
return /* @__PURE__ */ React83.createElement(Avatar.Label, null, initials);
|
|
8079
8080
|
}
|
|
8080
8081
|
return null;
|
|
8081
|
-
})()), /* @__PURE__ */
|
|
8082
|
+
})()), /* @__PURE__ */ React83.createElement(Flex, { direction: "column", paddingLeft: showAvatar ? "md" : void 0 }, /* @__PURE__ */ React83.createElement(
|
|
8082
8083
|
Typography,
|
|
8083
8084
|
{
|
|
8084
8085
|
color: "gray15",
|
|
@@ -8087,7 +8088,7 @@ function ContactItem({
|
|
|
8087
8088
|
className: truncation
|
|
8088
8089
|
},
|
|
8089
8090
|
title
|
|
8090
|
-
), description && /* @__PURE__ */
|
|
8091
|
+
), description && /* @__PURE__ */ React83.createElement(Typography, { color: "gray45", intent: "small", className: truncation }, description)));
|
|
8091
8092
|
}
|
|
8092
8093
|
|
|
8093
8094
|
// src/CellRenderers/CompanyCell.tsx
|
|
@@ -8097,8 +8098,8 @@ var Renderer2 = ({
|
|
|
8097
8098
|
isGroup,
|
|
8098
8099
|
value
|
|
8099
8100
|
}) => {
|
|
8100
|
-
const [showAvatar, setShowAvatar] =
|
|
8101
|
-
|
|
8101
|
+
const [showAvatar, setShowAvatar] = React83.useState(false);
|
|
8102
|
+
React83.useEffect(() => {
|
|
8102
8103
|
setShowAvatar(rowHeight === rowSize.lg || rowHeight === rowSize.md);
|
|
8103
8104
|
}, [rowHeight]);
|
|
8104
8105
|
if (value === void 0 || value === null) {
|
|
@@ -8106,7 +8107,7 @@ var Renderer2 = ({
|
|
|
8106
8107
|
}
|
|
8107
8108
|
const companyName = isGroup ? value : columnDefinition.cellRendererParams?.getCompanyName?.(value) ?? value.name;
|
|
8108
8109
|
const imageURL = columnDefinition.cellRendererParams?.getImageURL?.(value);
|
|
8109
|
-
return isGroup ? /* @__PURE__ */
|
|
8110
|
+
return isGroup ? /* @__PURE__ */ React83.createElement(
|
|
8110
8111
|
Typography,
|
|
8111
8112
|
{
|
|
8112
8113
|
...getCellValueTypographyProps(
|
|
@@ -8115,11 +8116,11 @@ var Renderer2 = ({
|
|
|
8115
8116
|
weight: "semibold"
|
|
8116
8117
|
},
|
|
8117
8118
|
companyName
|
|
8118
|
-
) : /* @__PURE__ */
|
|
8119
|
+
) : /* @__PURE__ */ React83.createElement(
|
|
8119
8120
|
ContactItem,
|
|
8120
8121
|
{
|
|
8121
8122
|
imageUrl: showAvatar ? imageURL : void 0,
|
|
8122
|
-
icon: showAvatar ? /* @__PURE__ */
|
|
8123
|
+
icon: showAvatar ? /* @__PURE__ */ React83.createElement(Building, { size: "sm" }) : void 0,
|
|
8123
8124
|
title: companyName,
|
|
8124
8125
|
rowHeight
|
|
8125
8126
|
}
|
|
@@ -8162,7 +8163,7 @@ var Renderer3 = ({
|
|
|
8162
8163
|
return null;
|
|
8163
8164
|
}
|
|
8164
8165
|
if (columnDefinition.editable) {
|
|
8165
|
-
return /* @__PURE__ */
|
|
8166
|
+
return /* @__PURE__ */ React83.createElement(
|
|
8166
8167
|
Typography,
|
|
8167
8168
|
{
|
|
8168
8169
|
...getCellValueTypographyProps(
|
|
@@ -8175,7 +8176,7 @@ var Renderer3 = ({
|
|
|
8175
8176
|
}
|
|
8176
8177
|
}
|
|
8177
8178
|
if (isGroup) {
|
|
8178
|
-
return /* @__PURE__ */
|
|
8179
|
+
return /* @__PURE__ */ React83.createElement(
|
|
8179
8180
|
Typography,
|
|
8180
8181
|
{
|
|
8181
8182
|
intent: "small",
|
|
@@ -8185,7 +8186,7 @@ var Renderer3 = ({
|
|
|
8185
8186
|
internalValue
|
|
8186
8187
|
);
|
|
8187
8188
|
}
|
|
8188
|
-
return /* @__PURE__ */
|
|
8189
|
+
return /* @__PURE__ */ React83.createElement(
|
|
8189
8190
|
Typography,
|
|
8190
8191
|
{
|
|
8191
8192
|
...getCellValueTypographyProps(
|
|
@@ -8198,7 +8199,7 @@ var Renderer3 = ({
|
|
|
8198
8199
|
);
|
|
8199
8200
|
};
|
|
8200
8201
|
var CurrencyCellRenderer = withDataTableRenderer(Renderer3, "input");
|
|
8201
|
-
var Editor =
|
|
8202
|
+
var Editor = React83.forwardRef(
|
|
8202
8203
|
({ columnDefinition, eventKey, stopEditing, value }, ref) => {
|
|
8203
8204
|
const I18n = useI18nContext();
|
|
8204
8205
|
if (isEmptyValue(value) && !columnDefinition.editable) {
|
|
@@ -8212,7 +8213,7 @@ var Editor = React82.forwardRef(
|
|
|
8212
8213
|
symbol: void 0,
|
|
8213
8214
|
symbolAfterValue: void 0
|
|
8214
8215
|
});
|
|
8215
|
-
return /* @__PURE__ */
|
|
8216
|
+
return /* @__PURE__ */ React83.createElement(
|
|
8216
8217
|
Input,
|
|
8217
8218
|
{
|
|
8218
8219
|
placeholder: columnDefinition.cellEditorParams?.inputProps?.placeholder || I18n.t("dataTable.cells.currencyCell.placeholder"),
|
|
@@ -8286,9 +8287,9 @@ function getPlacement(currentSelectionType, position) {
|
|
|
8286
8287
|
return "bottom-right";
|
|
8287
8288
|
}
|
|
8288
8289
|
var OptionalDateTimeProvider = ({ timeZone, children }) => {
|
|
8289
|
-
return timeZone ? /* @__PURE__ */
|
|
8290
|
+
return timeZone ? /* @__PURE__ */ React83.createElement(DateTimeProvider, { timeZone }, children) : /* @__PURE__ */ React83.createElement(React83.Fragment, null, children);
|
|
8290
8291
|
};
|
|
8291
|
-
var DateFilterOverlay =
|
|
8292
|
+
var DateFilterOverlay = React83.forwardRef(
|
|
8292
8293
|
// eslint-disable-next-line complexity
|
|
8293
8294
|
({
|
|
8294
8295
|
dateInputSegmentRef,
|
|
@@ -8322,13 +8323,13 @@ var DateFilterOverlay = React82.forwardRef(
|
|
|
8322
8323
|
onSelect(day);
|
|
8323
8324
|
hide({});
|
|
8324
8325
|
}
|
|
8325
|
-
return /* @__PURE__ */
|
|
8326
|
+
return /* @__PURE__ */ React83.createElement(Card, { "data-qa": "data-table-date-filter-calendar", ref, ...props }, /* @__PURE__ */ React83.createElement(Flex, { direction: "column" }, selectionType === "either" && /* @__PURE__ */ React83.createElement(Box, { padding: "md", style: { width: "100%" } }, /* @__PURE__ */ React83.createElement(
|
|
8326
8327
|
SegmentedController,
|
|
8327
8328
|
{
|
|
8328
8329
|
block: true,
|
|
8329
8330
|
"data-qa": "data-table-date-filter-selection-control"
|
|
8330
8331
|
},
|
|
8331
|
-
/* @__PURE__ */
|
|
8332
|
+
/* @__PURE__ */ React83.createElement(
|
|
8332
8333
|
SegmentedController.Segment,
|
|
8333
8334
|
{
|
|
8334
8335
|
active: selectedValue.type === "single",
|
|
@@ -8336,7 +8337,7 @@ var DateFilterOverlay = React82.forwardRef(
|
|
|
8336
8337
|
},
|
|
8337
8338
|
I18n.t("dataTable.filterRenders.dateFilter.single")
|
|
8338
8339
|
),
|
|
8339
|
-
/* @__PURE__ */
|
|
8340
|
+
/* @__PURE__ */ React83.createElement(
|
|
8340
8341
|
SegmentedController.Segment,
|
|
8341
8342
|
{
|
|
8342
8343
|
active: selectedValue.type === "range",
|
|
@@ -8344,7 +8345,7 @@ var DateFilterOverlay = React82.forwardRef(
|
|
|
8344
8345
|
},
|
|
8345
8346
|
I18n.t("dataTable.filterRenders.dateFilter.range")
|
|
8346
8347
|
)
|
|
8347
|
-
)), /* @__PURE__ */
|
|
8348
|
+
)), /* @__PURE__ */ React83.createElement(
|
|
8348
8349
|
Calendar,
|
|
8349
8350
|
{
|
|
8350
8351
|
displayDate,
|
|
@@ -8358,7 +8359,7 @@ var DateFilterOverlay = React82.forwardRef(
|
|
|
8358
8359
|
)));
|
|
8359
8360
|
}
|
|
8360
8361
|
);
|
|
8361
|
-
var DateFilterSelect =
|
|
8362
|
+
var DateFilterSelect = React83.forwardRef(
|
|
8362
8363
|
({
|
|
8363
8364
|
afterHide,
|
|
8364
8365
|
onChange,
|
|
@@ -8371,11 +8372,11 @@ var DateFilterSelect = React82.forwardRef(
|
|
|
8371
8372
|
const dateTime = useDateTime();
|
|
8372
8373
|
const { start, end } = selectedValue;
|
|
8373
8374
|
const selectedDate = (position === "start" ? start : end) ?? void 0;
|
|
8374
|
-
const [displayed, setDisplayed2] =
|
|
8375
|
+
const [displayed, setDisplayed2] = React83.useState(
|
|
8375
8376
|
// @ts-ignore
|
|
8376
8377
|
selectedDate || dateTime.newDate()
|
|
8377
8378
|
);
|
|
8378
|
-
|
|
8379
|
+
React83.useEffect(() => {
|
|
8379
8380
|
if (isDate(start) && !isDate(end) && position === "end") {
|
|
8380
8381
|
setDisplayed2(start);
|
|
8381
8382
|
}
|
|
@@ -8384,12 +8385,12 @@ var DateFilterSelect = React82.forwardRef(
|
|
|
8384
8385
|
}
|
|
8385
8386
|
}, [position, selectedValue]);
|
|
8386
8387
|
const segmentRefs = {
|
|
8387
|
-
segmentThree:
|
|
8388
|
+
segmentThree: React83.useRef(null)
|
|
8388
8389
|
};
|
|
8389
|
-
const clearRef =
|
|
8390
|
-
const monthRef =
|
|
8391
|
-
const yearRef =
|
|
8392
|
-
const overlay = /* @__PURE__ */
|
|
8390
|
+
const clearRef = React83.useRef(null);
|
|
8391
|
+
const monthRef = React83.useRef(null);
|
|
8392
|
+
const yearRef = React83.useRef(null);
|
|
8393
|
+
const overlay = /* @__PURE__ */ React83.createElement(
|
|
8393
8394
|
DateFilterOverlay,
|
|
8394
8395
|
{
|
|
8395
8396
|
dateInputSegmentRef: segmentRefs.segmentThree,
|
|
@@ -8406,7 +8407,7 @@ var DateFilterSelect = React82.forwardRef(
|
|
|
8406
8407
|
yearRef
|
|
8407
8408
|
}
|
|
8408
8409
|
);
|
|
8409
|
-
return /* @__PURE__ */
|
|
8410
|
+
return /* @__PURE__ */ React83.createElement(
|
|
8410
8411
|
OverlayTrigger,
|
|
8411
8412
|
{
|
|
8412
8413
|
afterHide,
|
|
@@ -8421,7 +8422,7 @@ var DateFilterSelect = React82.forwardRef(
|
|
|
8421
8422
|
placement: getPlacement(selectedValue.type, position),
|
|
8422
8423
|
ref
|
|
8423
8424
|
},
|
|
8424
|
-
/* @__PURE__ */
|
|
8425
|
+
/* @__PURE__ */ React83.createElement(
|
|
8425
8426
|
DateInput,
|
|
8426
8427
|
{
|
|
8427
8428
|
"data-qa": `data-table-date-filter-input-${position}`,
|
|
@@ -8461,10 +8462,10 @@ function DateFilter({
|
|
|
8461
8462
|
value,
|
|
8462
8463
|
...props
|
|
8463
8464
|
}) {
|
|
8464
|
-
const [selectedValue, setSelectedValue] =
|
|
8465
|
+
const [selectedValue, setSelectedValue] = React83.useState({
|
|
8465
8466
|
type: selectionType === "either" ? "range" : selectionType
|
|
8466
8467
|
});
|
|
8467
|
-
|
|
8468
|
+
React83.useEffect(() => {
|
|
8468
8469
|
const parsedValue = value.map((date) => {
|
|
8469
8470
|
if (isDate(date)) {
|
|
8470
8471
|
return date;
|
|
@@ -8474,7 +8475,7 @@ function DateFilter({
|
|
|
8474
8475
|
const type = isSameDay(parsedValue[0], parsedValue[1]) ? "single" : "range";
|
|
8475
8476
|
setSelectedValue({ type, start: parsedValue[0], end: parsedValue[1] });
|
|
8476
8477
|
}, [value]);
|
|
8477
|
-
const dateRangeEndDateRef =
|
|
8478
|
+
const dateRangeEndDateRef = React83.useRef(null);
|
|
8478
8479
|
function dateFilterOnChange(date, position) {
|
|
8479
8480
|
const newValue = getValueFromSelection(selectedValue, date, position);
|
|
8480
8481
|
setSelectedValue(newValue);
|
|
@@ -8487,7 +8488,7 @@ function DateFilter({
|
|
|
8487
8488
|
);
|
|
8488
8489
|
}
|
|
8489
8490
|
}
|
|
8490
|
-
const onSelectionTypeChange =
|
|
8491
|
+
const onSelectionTypeChange = React83.useCallback(
|
|
8491
8492
|
(newSelectionType) => {
|
|
8492
8493
|
setSelectedValue({ type: newSelectionType });
|
|
8493
8494
|
},
|
|
@@ -8499,7 +8500,7 @@ function DateFilter({
|
|
|
8499
8500
|
}
|
|
8500
8501
|
return true;
|
|
8501
8502
|
}
|
|
8502
|
-
return /* @__PURE__ */
|
|
8503
|
+
return /* @__PURE__ */ React83.createElement(FlexList, { space: "xs", "data-qa": props["data-qa"] }, /* @__PURE__ */ React83.createElement(
|
|
8503
8504
|
DateFilterSelect,
|
|
8504
8505
|
{
|
|
8505
8506
|
afterHide: dateRangeAfterHide,
|
|
@@ -8509,7 +8510,7 @@ function DateFilter({
|
|
|
8509
8510
|
selectionType,
|
|
8510
8511
|
setSelectionType: onSelectionTypeChange
|
|
8511
8512
|
}
|
|
8512
|
-
), selectedValue.type !== "single" && /* @__PURE__ */
|
|
8513
|
+
), selectedValue.type !== "single" && /* @__PURE__ */ React83.createElement(
|
|
8513
8514
|
DateFilterSelect,
|
|
8514
8515
|
{
|
|
8515
8516
|
onChange: dateFilterOnChange,
|
|
@@ -8529,7 +8530,7 @@ function ServerSideDateSelectFilterRenderer({
|
|
|
8529
8530
|
...props
|
|
8530
8531
|
}) {
|
|
8531
8532
|
const colDef = columnDefinition;
|
|
8532
|
-
return /* @__PURE__ */
|
|
8533
|
+
return /* @__PURE__ */ React83.createElement(OptionalDateTimeProvider, { timeZone: colDef.timeZone }, /* @__PURE__ */ React83.createElement(
|
|
8533
8534
|
DateFilter,
|
|
8534
8535
|
{
|
|
8535
8536
|
...props,
|
|
@@ -8554,7 +8555,7 @@ function ServerSideDateSelectFilterRenderer({
|
|
|
8554
8555
|
var DateFilterRenderer = (props) => {
|
|
8555
8556
|
const { onServerSideDataRequest } = useInternalTableContext();
|
|
8556
8557
|
if (onServerSideDataRequest) {
|
|
8557
|
-
return /* @__PURE__ */
|
|
8558
|
+
return /* @__PURE__ */ React83.createElement(ServerSideDateSelectFilterRenderer, { ...props });
|
|
8558
8559
|
}
|
|
8559
8560
|
console.error(
|
|
8560
8561
|
"Warning: Date Filters are currently only implemented for the serverside row model"
|
|
@@ -8570,9 +8571,9 @@ var DateFilterTokenText = ({
|
|
|
8570
8571
|
const parsedStart = parseISO(start);
|
|
8571
8572
|
const parsedEnd = parseISO(end);
|
|
8572
8573
|
if (isSameDay(parsedStart, parsedEnd)) {
|
|
8573
|
-
return /* @__PURE__ */
|
|
8574
|
+
return /* @__PURE__ */ React83.createElement(React83.Fragment, null, `${headerName}: ${dateTime.format(parsedStart, "numeric-date")}`);
|
|
8574
8575
|
}
|
|
8575
|
-
return /* @__PURE__ */
|
|
8576
|
+
return /* @__PURE__ */ React83.createElement(React83.Fragment, null, `${headerName}: ${dateTime.format(
|
|
8576
8577
|
parsedStart,
|
|
8577
8578
|
"numeric-date"
|
|
8578
8579
|
)} - ${dateTime.format(parsedEnd, "numeric-date")}`);
|
|
@@ -8607,19 +8608,19 @@ var DateCellValue = ({
|
|
|
8607
8608
|
const typographyProps = getCellValueTypographyProps(
|
|
8608
8609
|
columnDefinition.cellRendererParams?.typographyProps
|
|
8609
8610
|
);
|
|
8610
|
-
return /* @__PURE__ */
|
|
8611
|
+
return /* @__PURE__ */ React83.createElement(Typography, { ...typographyProps }, internalValue);
|
|
8611
8612
|
};
|
|
8612
8613
|
var Renderer4 = (props) => {
|
|
8613
|
-
return /* @__PURE__ */
|
|
8614
|
+
return /* @__PURE__ */ React83.createElement(
|
|
8614
8615
|
OptionalDateTimeProvider,
|
|
8615
8616
|
{
|
|
8616
8617
|
timeZone: props.columnDefinition?.cellRendererParams?.timeZone
|
|
8617
8618
|
},
|
|
8618
|
-
/* @__PURE__ */
|
|
8619
|
+
/* @__PURE__ */ React83.createElement(DateCellValue, { ...props })
|
|
8619
8620
|
);
|
|
8620
8621
|
};
|
|
8621
8622
|
var DateCellRenderer = withDataTableRenderer(Renderer4, "date");
|
|
8622
|
-
var Editor2 =
|
|
8623
|
+
var Editor2 = React83.forwardRef(
|
|
8623
8624
|
({ columnDefinition, setDataValue, stopEditing, value }, ref) => {
|
|
8624
8625
|
function afterHide() {
|
|
8625
8626
|
stopEditing();
|
|
@@ -8631,12 +8632,12 @@ var Editor2 = React82.forwardRef(
|
|
|
8631
8632
|
setDataValue(columnDefinition.field, void 0);
|
|
8632
8633
|
}
|
|
8633
8634
|
}
|
|
8634
|
-
return /* @__PURE__ */
|
|
8635
|
+
return /* @__PURE__ */ React83.createElement(
|
|
8635
8636
|
OptionalDateTimeProvider,
|
|
8636
8637
|
{
|
|
8637
8638
|
timeZone: columnDefinition.cellEditorParams?.timeZone
|
|
8638
8639
|
},
|
|
8639
|
-
/* @__PURE__ */
|
|
8640
|
+
/* @__PURE__ */ React83.createElement(
|
|
8640
8641
|
DateSelect,
|
|
8641
8642
|
{
|
|
8642
8643
|
afterHide,
|
|
@@ -8678,19 +8679,19 @@ var DateTimeCellValue = ({
|
|
|
8678
8679
|
const typographyProps = getCellValueTypographyProps(
|
|
8679
8680
|
columnDefinition.cellRendererParams?.typographyProps
|
|
8680
8681
|
);
|
|
8681
|
-
return /* @__PURE__ */
|
|
8682
|
+
return /* @__PURE__ */ React83.createElement(Typography, { ...typographyProps }, internalValue);
|
|
8682
8683
|
};
|
|
8683
8684
|
var Renderer5 = (props) => {
|
|
8684
|
-
return /* @__PURE__ */
|
|
8685
|
+
return /* @__PURE__ */ React83.createElement(
|
|
8685
8686
|
OptionalDateTimeProvider,
|
|
8686
8687
|
{
|
|
8687
8688
|
timeZone: props.columnDefinition?.cellRendererParams?.timeZone
|
|
8688
8689
|
},
|
|
8689
|
-
/* @__PURE__ */
|
|
8690
|
+
/* @__PURE__ */ React83.createElement(DateTimeCellValue, { ...props })
|
|
8690
8691
|
);
|
|
8691
8692
|
};
|
|
8692
8693
|
var DateTimeCellRenderer = withDataTableRenderer(Renderer5, "date");
|
|
8693
|
-
var Editor3 =
|
|
8694
|
+
var Editor3 = React83.forwardRef(
|
|
8694
8695
|
({ columnDefinition, setDataValue, stopEditing, value }, ref) => {
|
|
8695
8696
|
function afterHide() {
|
|
8696
8697
|
stopEditing();
|
|
@@ -8702,12 +8703,12 @@ var Editor3 = React82.forwardRef(
|
|
|
8702
8703
|
setDataValue(columnDefinition.field, void 0);
|
|
8703
8704
|
}
|
|
8704
8705
|
}
|
|
8705
|
-
return /* @__PURE__ */
|
|
8706
|
+
return /* @__PURE__ */ React83.createElement(
|
|
8706
8707
|
OptionalDateTimeProvider,
|
|
8707
8708
|
{
|
|
8708
8709
|
timeZone: columnDefinition.cellEditorParams?.timeZone
|
|
8709
8710
|
},
|
|
8710
|
-
/* @__PURE__ */
|
|
8711
|
+
/* @__PURE__ */ React83.createElement(
|
|
8711
8712
|
DateSelect,
|
|
8712
8713
|
{
|
|
8713
8714
|
afterHide,
|
|
@@ -52906,10 +52907,10 @@ var InternalLinkCellRenderer = ({ columnDefinition, isGroup, data, rowHeight, va
|
|
|
52906
52907
|
}
|
|
52907
52908
|
);
|
|
52908
52909
|
if (isGroup) {
|
|
52909
|
-
return /* @__PURE__ */
|
|
52910
|
+
return /* @__PURE__ */ React83.createElement(Typography, { ...typographyProps, className, weight: "semibold" }, value);
|
|
52910
52911
|
}
|
|
52911
52912
|
const URL = columnDefinition.cellRendererParams.getURL(value, data);
|
|
52912
|
-
return URL ? /* @__PURE__ */
|
|
52913
|
+
return URL ? /* @__PURE__ */ React83.createElement(Typography, { ...typographyProps, className }, /* @__PURE__ */ React83.createElement(Link, { href: URL }, internalValue)) : /* @__PURE__ */ React83.createElement(Typography, { ...typographyProps }, internalValue);
|
|
52913
52914
|
};
|
|
52914
52915
|
var LinkCellRenderer = withDataTableRenderer(
|
|
52915
52916
|
InternalLinkCellRenderer,
|
|
@@ -52923,7 +52924,7 @@ var InternalNumberCellRenderer = ({ columnDefinition, rowPinned, isGroup, value
|
|
|
52923
52924
|
return null;
|
|
52924
52925
|
}
|
|
52925
52926
|
if (columnDefinition.editable) {
|
|
52926
|
-
return /* @__PURE__ */
|
|
52927
|
+
return /* @__PURE__ */ React83.createElement(
|
|
52927
52928
|
Typography,
|
|
52928
52929
|
{
|
|
52929
52930
|
...getCellValueTypographyProps(
|
|
@@ -52934,7 +52935,7 @@ var InternalNumberCellRenderer = ({ columnDefinition, rowPinned, isGroup, value
|
|
|
52934
52935
|
columnDefinition.cellEditorParams?.inputProps?.placeholder || I18n.t("dataTable.cells.numberCell.placeholder")
|
|
52935
52936
|
);
|
|
52936
52937
|
}
|
|
52937
|
-
return /* @__PURE__ */
|
|
52938
|
+
return /* @__PURE__ */ React83.createElement(React83.Fragment, null);
|
|
52938
52939
|
}
|
|
52939
52940
|
const internalValue = formatNumber(value, {
|
|
52940
52941
|
maxDecimalPrecision: 15,
|
|
@@ -52943,9 +52944,9 @@ var InternalNumberCellRenderer = ({ columnDefinition, rowPinned, isGroup, value
|
|
|
52943
52944
|
...columnDefinition.cellRendererParams?.formatConfig
|
|
52944
52945
|
});
|
|
52945
52946
|
if (isGroup) {
|
|
52946
|
-
return /* @__PURE__ */
|
|
52947
|
+
return /* @__PURE__ */ React83.createElement(Typography, { intent: "small", weight: "semibold" }, internalValue);
|
|
52947
52948
|
}
|
|
52948
|
-
return /* @__PURE__ */
|
|
52949
|
+
return /* @__PURE__ */ React83.createElement(
|
|
52949
52950
|
Typography,
|
|
52950
52951
|
{
|
|
52951
52952
|
...getCellValueTypographyProps(
|
|
@@ -52960,7 +52961,7 @@ var NumberCellRenderer = withDataTableRenderer(
|
|
|
52960
52961
|
InternalNumberCellRenderer,
|
|
52961
52962
|
"input"
|
|
52962
52963
|
);
|
|
52963
|
-
var InternalNumberCellEditor =
|
|
52964
|
+
var InternalNumberCellEditor = React83.forwardRef(({ columnDefinition, stopEditing, value }, ref) => {
|
|
52964
52965
|
const I18n = useI18nContext();
|
|
52965
52966
|
if (isEmptyValue(value) && !columnDefinition.editable) {
|
|
52966
52967
|
return null;
|
|
@@ -52968,7 +52969,7 @@ var InternalNumberCellEditor = React82.forwardRef(({ columnDefinition, stopEditi
|
|
|
52968
52969
|
function onBlur() {
|
|
52969
52970
|
stopEditing();
|
|
52970
52971
|
}
|
|
52971
|
-
return /* @__PURE__ */
|
|
52972
|
+
return /* @__PURE__ */ React83.createElement(
|
|
52972
52973
|
Input,
|
|
52973
52974
|
{
|
|
52974
52975
|
placeholder: columnDefinition.cellEditorParams?.inputProps?.placeholder || I18n.t("dataTable.cells.numberCell.placeholder"),
|
|
@@ -53034,38 +53035,38 @@ var Renderer6 = ({
|
|
|
53034
53035
|
rowHeight,
|
|
53035
53036
|
value
|
|
53036
53037
|
}) => {
|
|
53037
|
-
const [fullCellView, setFullCellView] =
|
|
53038
|
-
const getPeople =
|
|
53038
|
+
const [fullCellView, setFullCellView] = React83.useState(false);
|
|
53039
|
+
const getPeople = React83.useCallback(() => {
|
|
53039
53040
|
return columnDefinition.cellRendererParams?.getValue?.(value) || value || [];
|
|
53040
53041
|
}, [columnDefinition.cellRendererParams?.getValue, value]);
|
|
53041
|
-
const getCompanyName =
|
|
53042
|
+
const getCompanyName = React83.useCallback(
|
|
53042
53043
|
(person) => {
|
|
53043
53044
|
return columnDefinition.cellRendererParams?.getCompanyName?.(person) ?? person.company ?? "";
|
|
53044
53045
|
},
|
|
53045
53046
|
[columnDefinition.cellRendererParams?.getCompanyName]
|
|
53046
53047
|
);
|
|
53047
|
-
const getPersonName =
|
|
53048
|
+
const getPersonName = React83.useCallback(
|
|
53048
53049
|
(person) => {
|
|
53049
53050
|
return columnDefinition.cellRendererParams?.getPersonName?.(person) ?? person.name ?? "";
|
|
53050
53051
|
},
|
|
53051
53052
|
[columnDefinition.cellRendererParams?.getPersonName]
|
|
53052
53053
|
);
|
|
53053
|
-
const getPersonImageUrl =
|
|
53054
|
+
const getPersonImageUrl = React83.useCallback(
|
|
53054
53055
|
(person) => {
|
|
53055
53056
|
return columnDefinition.cellRendererParams?.getImageURL?.(person) ?? "";
|
|
53056
53057
|
},
|
|
53057
53058
|
[columnDefinition.cellRendererParams?.getImageURL]
|
|
53058
53059
|
);
|
|
53059
|
-
const getPersonInitials =
|
|
53060
|
+
const getPersonInitials = React83.useCallback(
|
|
53060
53061
|
(person) => {
|
|
53061
53062
|
return columnDefinition.cellRendererParams?.getInitials?.(person) ?? "";
|
|
53062
53063
|
},
|
|
53063
53064
|
[columnDefinition.cellRendererParams?.getInitials]
|
|
53064
53065
|
);
|
|
53065
|
-
|
|
53066
|
+
React83.useEffect(() => {
|
|
53066
53067
|
setFullCellView(rowHeight === rowSize.lg || rowHeight === rowSize.md);
|
|
53067
53068
|
}, [rowHeight]);
|
|
53068
|
-
const getPersonNameWithCompany =
|
|
53069
|
+
const getPersonNameWithCompany = React83.useCallback(
|
|
53069
53070
|
(person) => {
|
|
53070
53071
|
const name = getPersonName(person);
|
|
53071
53072
|
const company = getCompanyName(person);
|
|
@@ -53073,14 +53074,14 @@ var Renderer6 = ({
|
|
|
53073
53074
|
},
|
|
53074
53075
|
[getCompanyName, getPersonName]
|
|
53075
53076
|
);
|
|
53076
|
-
const namesWithCompany =
|
|
53077
|
+
const namesWithCompany = React83.useMemo(
|
|
53077
53078
|
() => getPeople().map(getPersonNameWithCompany).join(", "),
|
|
53078
53079
|
[getPeople, getPersonNameWithCompany]
|
|
53079
53080
|
);
|
|
53080
53081
|
const largeAvatarWidth = 35;
|
|
53081
53082
|
const smallAvatarWidth = 27;
|
|
53082
53083
|
const avatarOverlap = 7;
|
|
53083
|
-
const avatarWidthCalc =
|
|
53084
|
+
const avatarWidthCalc = React83.useMemo(() => {
|
|
53084
53085
|
const avatarWidth = rowHeight === rowSize.lg ? largeAvatarWidth : smallAvatarWidth;
|
|
53085
53086
|
const avatarCount = getPeople().length > NUM_AVATARS_SHOWN ? NUM_AVATARS_SHOWN + 1 : getPeople().length;
|
|
53086
53087
|
if (avatarCount === 1) {
|
|
@@ -53107,13 +53108,13 @@ var Renderer6 = ({
|
|
|
53107
53108
|
columnDefinition.cellRendererParams?.avatarStackItemFilter ?? defaultAvatarStackItemFilter
|
|
53108
53109
|
);
|
|
53109
53110
|
const isAvatarStackDisplayed = fullCellView && avatarStackItems && !!avatarStackItems.length;
|
|
53110
|
-
return /* @__PURE__ */
|
|
53111
|
+
return /* @__PURE__ */ React83.createElement(
|
|
53111
53112
|
Flex,
|
|
53112
53113
|
{
|
|
53113
53114
|
direction: columnDefinition.autoHeight ? "column" : "row",
|
|
53114
53115
|
className: cx8("dynamicRowHeightSpacing", columnDefinition.autoHeight)
|
|
53115
53116
|
},
|
|
53116
|
-
isAvatarStackDisplayed && /* @__PURE__ */
|
|
53117
|
+
isAvatarStackDisplayed && /* @__PURE__ */ React83.createElement(
|
|
53117
53118
|
Box,
|
|
53118
53119
|
{
|
|
53119
53120
|
marginRight: "sm",
|
|
@@ -53124,7 +53125,7 @@ var Renderer6 = ({
|
|
|
53124
53125
|
height: "32px"
|
|
53125
53126
|
}
|
|
53126
53127
|
},
|
|
53127
|
-
/* @__PURE__ */
|
|
53128
|
+
/* @__PURE__ */ React83.createElement(
|
|
53128
53129
|
AvatarStack,
|
|
53129
53130
|
{
|
|
53130
53131
|
items: avatarStackItems,
|
|
@@ -53133,13 +53134,13 @@ var Renderer6 = ({
|
|
|
53133
53134
|
}
|
|
53134
53135
|
)
|
|
53135
53136
|
),
|
|
53136
|
-
people.length > 1 ? /* @__PURE__ */
|
|
53137
|
+
people.length > 1 ? /* @__PURE__ */ React83.createElement(
|
|
53137
53138
|
Flex,
|
|
53138
53139
|
{
|
|
53139
53140
|
direction: fullCellView ? "column" : "row",
|
|
53140
53141
|
style: { alignSelf: "center" }
|
|
53141
53142
|
},
|
|
53142
|
-
/* @__PURE__ */
|
|
53143
|
+
/* @__PURE__ */ React83.createElement(
|
|
53143
53144
|
Typography,
|
|
53144
53145
|
{
|
|
53145
53146
|
className: !columnDefinition.autoHeight ? cx8("truncatingText", {
|
|
@@ -53151,13 +53152,13 @@ var Renderer6 = ({
|
|
|
53151
53152
|
},
|
|
53152
53153
|
namesWithCompany
|
|
53153
53154
|
)
|
|
53154
|
-
) : /* @__PURE__ */
|
|
53155
|
+
) : /* @__PURE__ */ React83.createElement(
|
|
53155
53156
|
Flex,
|
|
53156
53157
|
{
|
|
53157
53158
|
direction: fullCellView ? "column" : "row",
|
|
53158
53159
|
style: { alignSelf: "center" }
|
|
53159
53160
|
},
|
|
53160
|
-
/* @__PURE__ */
|
|
53161
|
+
/* @__PURE__ */ React83.createElement(
|
|
53161
53162
|
Typography,
|
|
53162
53163
|
{
|
|
53163
53164
|
...typographyProps,
|
|
@@ -53165,7 +53166,7 @@ var Renderer6 = ({
|
|
|
53165
53166
|
},
|
|
53166
53167
|
getPersonName(people[0])
|
|
53167
53168
|
),
|
|
53168
|
-
getCompanyName(people[0]) && rowHeight === rowSize.sm ? /* @__PURE__ */
|
|
53169
|
+
getCompanyName(people[0]) && rowHeight === rowSize.sm ? /* @__PURE__ */ React83.createElement(React83.Fragment, null, /* @__PURE__ */ React83.createElement(
|
|
53169
53170
|
Typography,
|
|
53170
53171
|
{
|
|
53171
53172
|
...typographyProps,
|
|
@@ -53173,7 +53174,7 @@ var Renderer6 = ({
|
|
|
53173
53174
|
style: { whiteSpace: "pre" }
|
|
53174
53175
|
},
|
|
53175
53176
|
" / "
|
|
53176
|
-
), /* @__PURE__ */
|
|
53177
|
+
), /* @__PURE__ */ React83.createElement(
|
|
53177
53178
|
Typography,
|
|
53178
53179
|
{
|
|
53179
53180
|
...typographyProps,
|
|
@@ -53181,7 +53182,7 @@ var Renderer6 = ({
|
|
|
53181
53182
|
className: cx8("truncatingText")
|
|
53182
53183
|
},
|
|
53183
53184
|
getCompanyName(people[0])
|
|
53184
|
-
)) : /* @__PURE__ */
|
|
53185
|
+
)) : /* @__PURE__ */ React83.createElement(
|
|
53185
53186
|
Typography,
|
|
53186
53187
|
{
|
|
53187
53188
|
...typographyProps,
|
|
@@ -53207,7 +53208,7 @@ var Renderer7 = ({
|
|
|
53207
53208
|
return null;
|
|
53208
53209
|
}
|
|
53209
53210
|
if (columnDefinition.editable) {
|
|
53210
|
-
return /* @__PURE__ */
|
|
53211
|
+
return /* @__PURE__ */ React83.createElement(
|
|
53211
53212
|
Typography,
|
|
53212
53213
|
{
|
|
53213
53214
|
...getCellValueTypographyProps(
|
|
@@ -53224,7 +53225,7 @@ var Renderer7 = ({
|
|
|
53224
53225
|
columnDefinition.cellRendererParams?.formatConfig
|
|
53225
53226
|
);
|
|
53226
53227
|
if (isGroup) {
|
|
53227
|
-
return /* @__PURE__ */
|
|
53228
|
+
return /* @__PURE__ */ React83.createElement(
|
|
53228
53229
|
Typography,
|
|
53229
53230
|
{
|
|
53230
53231
|
intent: "small",
|
|
@@ -53234,7 +53235,7 @@ var Renderer7 = ({
|
|
|
53234
53235
|
internalValue
|
|
53235
53236
|
);
|
|
53236
53237
|
}
|
|
53237
|
-
return /* @__PURE__ */
|
|
53238
|
+
return /* @__PURE__ */ React83.createElement(
|
|
53238
53239
|
Typography,
|
|
53239
53240
|
{
|
|
53240
53241
|
...getCellValueTypographyProps(
|
|
@@ -53247,7 +53248,7 @@ var Renderer7 = ({
|
|
|
53247
53248
|
);
|
|
53248
53249
|
};
|
|
53249
53250
|
var PercentCellRenderer = withDataTableRenderer(Renderer7, "input");
|
|
53250
|
-
var Editor4 =
|
|
53251
|
+
var Editor4 = React83.forwardRef(({ columnDefinition, eventKey, stopEditing, value }, ref) => {
|
|
53251
53252
|
const I18n = useI18nContext();
|
|
53252
53253
|
function onBlur() {
|
|
53253
53254
|
stopEditing();
|
|
@@ -53260,7 +53261,7 @@ var Editor4 = React82.forwardRef(({ columnDefinition, eventKey, stopEditing, val
|
|
|
53260
53261
|
symbol: void 0,
|
|
53261
53262
|
symbolAfterValue: void 0
|
|
53262
53263
|
});
|
|
53263
|
-
return /* @__PURE__ */
|
|
53264
|
+
return /* @__PURE__ */ React83.createElement(
|
|
53264
53265
|
Input,
|
|
53265
53266
|
{
|
|
53266
53267
|
placeholder: columnDefinition.cellEditorParams?.inputProps?.placeholder || I18n.t("dataTable.cells.percentCell.placeholder"),
|
|
@@ -53280,8 +53281,8 @@ var Renderer8 = ({
|
|
|
53280
53281
|
isGroup,
|
|
53281
53282
|
value
|
|
53282
53283
|
}) => {
|
|
53283
|
-
const [showAvatar, setShowAvatar] =
|
|
53284
|
-
|
|
53284
|
+
const [showAvatar, setShowAvatar] = React83.useState(false);
|
|
53285
|
+
React83.useEffect(() => {
|
|
53285
53286
|
setShowAvatar(rowHeight === rowSize.lg || rowHeight === rowSize.md);
|
|
53286
53287
|
}, [rowHeight]);
|
|
53287
53288
|
if (value === void 0 || value === null) {
|
|
@@ -53295,12 +53296,12 @@ var Renderer8 = ({
|
|
|
53295
53296
|
columnDefinition.cellRendererParams?.typographyProps
|
|
53296
53297
|
);
|
|
53297
53298
|
if (isGroup) {
|
|
53298
|
-
return /* @__PURE__ */
|
|
53299
|
+
return /* @__PURE__ */ React83.createElement(Typography, { ...typographyProps, weight: "semibold" }, name);
|
|
53299
53300
|
}
|
|
53300
53301
|
if (!showAvatar) {
|
|
53301
|
-
return /* @__PURE__ */
|
|
53302
|
+
return /* @__PURE__ */ React83.createElement(React83.Fragment, null, /* @__PURE__ */ React83.createElement(Typography, { ...typographyProps, weight: "semibold", color: "gray15" }, name), companyName && /* @__PURE__ */ React83.createElement(React83.Fragment, null, /* @__PURE__ */ React83.createElement(Typography, { ...typographyProps, color: "gray15" }, " / "), /* @__PURE__ */ React83.createElement(Typography, { ...typographyProps, color: "gray45" }, companyName)));
|
|
53302
53303
|
}
|
|
53303
|
-
return /* @__PURE__ */
|
|
53304
|
+
return /* @__PURE__ */ React83.createElement(
|
|
53304
53305
|
ContactItem,
|
|
53305
53306
|
{
|
|
53306
53307
|
description: companyName,
|
|
@@ -53326,7 +53327,7 @@ var Renderer9 = ({
|
|
|
53326
53327
|
return null;
|
|
53327
53328
|
}
|
|
53328
53329
|
if (columnDefinition.editable) {
|
|
53329
|
-
return /* @__PURE__ */
|
|
53330
|
+
return /* @__PURE__ */ React83.createElement(
|
|
53330
53331
|
Typography,
|
|
53331
53332
|
{
|
|
53332
53333
|
...getCellValueTypographyProps(
|
|
@@ -53346,15 +53347,15 @@ var Renderer9 = ({
|
|
|
53346
53347
|
columnDefinition.cellRendererParams?.typographyProps
|
|
53347
53348
|
);
|
|
53348
53349
|
if (isGroup || rowPinned && columnDefinition.aggFunc) {
|
|
53349
|
-
return /* @__PURE__ */
|
|
53350
|
+
return /* @__PURE__ */ React83.createElement(Typography, { ...typographyProps, weight: "semibold" }, label);
|
|
53350
53351
|
}
|
|
53351
|
-
return /* @__PURE__ */
|
|
53352
|
+
return /* @__PURE__ */ React83.createElement(Pill, { color: getColor(value), className: cx10("pill-cell") }, label?.toUpperCase());
|
|
53352
53353
|
};
|
|
53353
53354
|
var PillCellRenderer = withDataTableRenderer(Renderer9, "select");
|
|
53354
|
-
var Editor5 =
|
|
53355
|
+
var Editor5 = React83.forwardRef(
|
|
53355
53356
|
({ columnDefinition, data, setDataValue, stopEditing, value }, ref) => {
|
|
53356
|
-
const [options, setOptions] =
|
|
53357
|
-
const [loading, setLoading] =
|
|
53357
|
+
const [options, setOptions] = React83.useState([]);
|
|
53358
|
+
const [loading, setLoading] = React83.useState(false);
|
|
53358
53359
|
const I18n = useI18nContext();
|
|
53359
53360
|
function afterHide() {
|
|
53360
53361
|
stopEditing();
|
|
@@ -53383,7 +53384,7 @@ var Editor5 = React82.forwardRef(
|
|
|
53383
53384
|
const unformattedLabel = columnDefinition.getStringFormattedValue?.(item) || "";
|
|
53384
53385
|
return unformattedLabel.toUpperCase();
|
|
53385
53386
|
}
|
|
53386
|
-
return /* @__PURE__ */
|
|
53387
|
+
return /* @__PURE__ */ React83.createElement(
|
|
53387
53388
|
PillSelect,
|
|
53388
53389
|
{
|
|
53389
53390
|
placeholder: columnDefinition.cellEditorParams?.placeholder || I18n.t("dataTable.cells.pillCell.placeholder", {
|
|
@@ -53419,7 +53420,7 @@ var Renderer10 = ({
|
|
|
53419
53420
|
return null;
|
|
53420
53421
|
}
|
|
53421
53422
|
if (columnDefinition.editable) {
|
|
53422
|
-
return /* @__PURE__ */
|
|
53423
|
+
return /* @__PURE__ */ React83.createElement(
|
|
53423
53424
|
Typography,
|
|
53424
53425
|
{
|
|
53425
53426
|
...getCellValueTypographyProps(
|
|
@@ -53438,7 +53439,7 @@ var Renderer10 = ({
|
|
|
53438
53439
|
columnDefinition.cellRendererParams?.typographyProps
|
|
53439
53440
|
);
|
|
53440
53441
|
if (isGroup) {
|
|
53441
|
-
return /* @__PURE__ */
|
|
53442
|
+
return /* @__PURE__ */ React83.createElement(
|
|
53442
53443
|
Typography,
|
|
53443
53444
|
{
|
|
53444
53445
|
className: cx11("truncatingText"),
|
|
@@ -53448,14 +53449,14 @@ var Renderer10 = ({
|
|
|
53448
53449
|
internalValue
|
|
53449
53450
|
);
|
|
53450
53451
|
}
|
|
53451
|
-
return /* @__PURE__ */
|
|
53452
|
+
return /* @__PURE__ */ React83.createElement(Typography, { className: cx11("truncatingText"), ...typographyProps }, internalValue);
|
|
53452
53453
|
};
|
|
53453
53454
|
var SelectCellRenderer = withDataTableRenderer(Renderer10, "select");
|
|
53454
53455
|
function useSearch(data, onSearchFunction) {
|
|
53455
|
-
const [searchResultOptions, setSearchResultOptions] =
|
|
53456
|
-
const searchTerm =
|
|
53456
|
+
const [searchResultOptions, setSearchResultOptions] = React83.useState(void 0);
|
|
53457
|
+
const searchTerm = React83.useRef("");
|
|
53457
53458
|
const searchEnabled = typeof onSearchFunction === "function";
|
|
53458
|
-
const onSearch =
|
|
53459
|
+
const onSearch = React83.useCallback(
|
|
53459
53460
|
async (event) => {
|
|
53460
53461
|
searchTerm.current = event.target.value;
|
|
53461
53462
|
if (searchTerm.current.length === 0) {
|
|
@@ -53480,10 +53481,10 @@ function useSearch(data, onSearchFunction) {
|
|
|
53480
53481
|
searchResultOptions
|
|
53481
53482
|
};
|
|
53482
53483
|
}
|
|
53483
|
-
var Editor6 =
|
|
53484
|
+
var Editor6 = React83.forwardRef(
|
|
53484
53485
|
({ columnDefinition, data, setDataValue, stopEditing, value }, ref) => {
|
|
53485
|
-
const [options, setOptions] =
|
|
53486
|
-
const [loading, setLoading] =
|
|
53486
|
+
const [options, setOptions] = React83.useState([]);
|
|
53487
|
+
const [loading, setLoading] = React83.useState(false);
|
|
53487
53488
|
const { onSearch, searchResultOptions } = useSearch(
|
|
53488
53489
|
data,
|
|
53489
53490
|
columnDefinition.cellEditorParams?.onSearch
|
|
@@ -53516,7 +53517,7 @@ var Editor6 = React82.forwardRef(
|
|
|
53516
53517
|
function getOptionLabel(option) {
|
|
53517
53518
|
return columnDefinition.cellEditorParams?.getOptionLabel?.(option) || getLabel3(option);
|
|
53518
53519
|
}
|
|
53519
|
-
return /* @__PURE__ */
|
|
53520
|
+
return /* @__PURE__ */ React83.createElement(
|
|
53520
53521
|
Select,
|
|
53521
53522
|
{
|
|
53522
53523
|
afterHide: () => stopEditing(),
|
|
@@ -53530,7 +53531,7 @@ var Editor6 = React82.forwardRef(
|
|
|
53530
53531
|
ref,
|
|
53531
53532
|
className: cx11("input-cell", "truncatingText")
|
|
53532
53533
|
},
|
|
53533
|
-
(searchResultOptions || options).map((item) => /* @__PURE__ */
|
|
53534
|
+
(searchResultOptions || options).map((item) => /* @__PURE__ */ React83.createElement(
|
|
53534
53535
|
Select.Option,
|
|
53535
53536
|
{
|
|
53536
53537
|
key: getId3(item),
|
|
@@ -53556,7 +53557,7 @@ var Renderer11 = ({
|
|
|
53556
53557
|
if (isGroup) {
|
|
53557
53558
|
return null;
|
|
53558
53559
|
}
|
|
53559
|
-
return /* @__PURE__ */
|
|
53560
|
+
return /* @__PURE__ */ React83.createElement(
|
|
53560
53561
|
Typography,
|
|
53561
53562
|
{
|
|
53562
53563
|
...getCellValueTypographyProps(
|
|
@@ -53582,7 +53583,7 @@ var Renderer11 = ({
|
|
|
53582
53583
|
);
|
|
53583
53584
|
if (isGroup) {
|
|
53584
53585
|
const fontWeight = node?.footer ? "regular" : "semibold";
|
|
53585
|
-
return /* @__PURE__ */
|
|
53586
|
+
return /* @__PURE__ */ React83.createElement(
|
|
53586
53587
|
Typography,
|
|
53587
53588
|
{
|
|
53588
53589
|
...typographyProps,
|
|
@@ -53593,17 +53594,17 @@ var Renderer11 = ({
|
|
|
53593
53594
|
node?.footer ? value : internalValue
|
|
53594
53595
|
);
|
|
53595
53596
|
}
|
|
53596
|
-
return /* @__PURE__ */
|
|
53597
|
+
return /* @__PURE__ */ React83.createElement(Typography, { ...typographyProps, className }, internalValue);
|
|
53597
53598
|
};
|
|
53598
53599
|
var TextCellRenderer = withDataTableRenderer(Renderer11, "input");
|
|
53599
|
-
var Editor7 =
|
|
53600
|
+
var Editor7 = React83.forwardRef(
|
|
53600
53601
|
({ columnDefinition, eventKey, stopEditing, value }, ref) => {
|
|
53601
53602
|
function onBlur() {
|
|
53602
53603
|
stopEditing();
|
|
53603
53604
|
}
|
|
53604
53605
|
const I18n = useI18nContext();
|
|
53605
53606
|
const internalValue = eventKey ? value : columnDefinition.getStringFormattedValue?.(value) ?? value;
|
|
53606
|
-
return /* @__PURE__ */
|
|
53607
|
+
return /* @__PURE__ */ React83.createElement(
|
|
53607
53608
|
Input,
|
|
53608
53609
|
{
|
|
53609
53610
|
placeholder: columnDefinition.cellEditorParams?.inputProps?.placeholder || I18n.t("dataTable.cells.textCell.placeholder"),
|
|
@@ -53622,7 +53623,7 @@ var GrandTotalsLabelRenderer = (props) => {
|
|
|
53622
53623
|
const { grandTotalsLabelInnerRenderer: GrandTotalsLabelInnerRenderer } = useInternalTableContext();
|
|
53623
53624
|
const isFirstColumn2 = props.columnApi.getAllDisplayedColumns()?.[0]?.getId() === props.column?.getId();
|
|
53624
53625
|
if (isFirstColumn2) {
|
|
53625
|
-
return GrandTotalsLabelInnerRenderer ? /* @__PURE__ */
|
|
53626
|
+
return GrandTotalsLabelInnerRenderer ? /* @__PURE__ */ React83.createElement(GrandTotalsLabelInnerRenderer, { ...props }) : /* @__PURE__ */ React83.createElement(Typography, { intent: "small", weight: "semibold" }, I18n.t("dataTable.grandTotals"));
|
|
53626
53627
|
}
|
|
53627
53628
|
return null;
|
|
53628
53629
|
};
|
|
@@ -53638,7 +53639,7 @@ var Renderer12 = ({
|
|
|
53638
53639
|
if (isGroup) {
|
|
53639
53640
|
return null;
|
|
53640
53641
|
}
|
|
53641
|
-
return /* @__PURE__ */
|
|
53642
|
+
return /* @__PURE__ */ React83.createElement(
|
|
53642
53643
|
Typography,
|
|
53643
53644
|
{
|
|
53644
53645
|
...getCellValueTypographyProps(
|
|
@@ -53655,7 +53656,7 @@ var Renderer12 = ({
|
|
|
53655
53656
|
);
|
|
53656
53657
|
if (isGroup) {
|
|
53657
53658
|
const fontWeight = node?.footer ? "regular" : "semibold";
|
|
53658
|
-
return /* @__PURE__ */
|
|
53659
|
+
return /* @__PURE__ */ React83.createElement(
|
|
53659
53660
|
Typography,
|
|
53660
53661
|
{
|
|
53661
53662
|
...typographyProps,
|
|
@@ -53665,16 +53666,16 @@ var Renderer12 = ({
|
|
|
53665
53666
|
node?.footer ? value : internalValue
|
|
53666
53667
|
);
|
|
53667
53668
|
}
|
|
53668
|
-
return /* @__PURE__ */
|
|
53669
|
+
return /* @__PURE__ */ React83.createElement(Typography, { ...typographyProps, className: cx13("textarea-cell", "text") }, internalValue);
|
|
53669
53670
|
};
|
|
53670
|
-
var Editor8 =
|
|
53671
|
+
var Editor8 = React83.forwardRef(
|
|
53671
53672
|
({ columnDefinition, stopEditing, value }, ref) => {
|
|
53672
53673
|
function onBlur() {
|
|
53673
53674
|
stopEditing();
|
|
53674
53675
|
}
|
|
53675
53676
|
const I18n = useI18nContext();
|
|
53676
53677
|
const internalValue = columnDefinition.getStringFormattedValue?.(value) ?? value;
|
|
53677
|
-
return /* @__PURE__ */
|
|
53678
|
+
return /* @__PURE__ */ React83.createElement(
|
|
53678
53679
|
TextArea,
|
|
53679
53680
|
{
|
|
53680
53681
|
placeholder: columnDefinition.cellEditorParams?.textAreaProps?.placeholder || I18n.t("dataTable.cells.textCell.placeholder"),
|
|
@@ -53720,7 +53721,7 @@ function defaultGetLabel(option) {
|
|
|
53720
53721
|
function defaultGetId(option) {
|
|
53721
53722
|
return option?.id ?? option;
|
|
53722
53723
|
}
|
|
53723
|
-
var LocationFilterOverlay =
|
|
53724
|
+
var LocationFilterOverlay = React83.forwardRef(
|
|
53724
53725
|
({
|
|
53725
53726
|
getId: getId3,
|
|
53726
53727
|
getLabel: getLabel3,
|
|
@@ -53734,9 +53735,9 @@ var LocationFilterOverlay = React82.forwardRef(
|
|
|
53734
53735
|
columnDefinition,
|
|
53735
53736
|
value
|
|
53736
53737
|
}, ref) => {
|
|
53737
|
-
const [items, setItems] =
|
|
53738
|
-
const [searching, setSearching] =
|
|
53739
|
-
const menuRef =
|
|
53738
|
+
const [items, setItems] = React83.useState(options);
|
|
53739
|
+
const [searching, setSearching] = React83.useState(false);
|
|
53740
|
+
const menuRef = React83.useRef(null);
|
|
53740
53741
|
const I18n = useI18nContext();
|
|
53741
53742
|
const { menuProps, menuNavigationTriggerProps } = UNSAFE_useMenuImperativeControlNavigation(menuRef);
|
|
53742
53743
|
const selectAllOption = {
|
|
@@ -53770,10 +53771,10 @@ var LocationFilterOverlay = React82.forwardRef(
|
|
|
53770
53771
|
}
|
|
53771
53772
|
}
|
|
53772
53773
|
const _onSearch = columnDefinition.filterProps.onSearch || defaultOnSearch;
|
|
53773
|
-
|
|
53774
|
+
React83.useEffect(() => {
|
|
53774
53775
|
menuRef.current?.highlightSuggested();
|
|
53775
53776
|
}, []);
|
|
53776
|
-
return /* @__PURE__ */
|
|
53777
|
+
return /* @__PURE__ */ React83.createElement(Card, { ref }, /* @__PURE__ */ React83.createElement(
|
|
53777
53778
|
UNSAFE_Menu,
|
|
53778
53779
|
{
|
|
53779
53780
|
...menuProps,
|
|
@@ -53783,20 +53784,20 @@ var LocationFilterOverlay = React82.forwardRef(
|
|
|
53783
53784
|
onSelect,
|
|
53784
53785
|
className: locationFilterStyles_default.locationFilterMenu
|
|
53785
53786
|
},
|
|
53786
|
-
/* @__PURE__ */
|
|
53787
|
+
/* @__PURE__ */ React83.createElement(
|
|
53787
53788
|
UNSAFE_Menu.Search,
|
|
53788
53789
|
{
|
|
53789
53790
|
...menuNavigationTriggerProps,
|
|
53790
53791
|
onChange: _onSearch
|
|
53791
53792
|
}
|
|
53792
53793
|
),
|
|
53793
|
-
/* @__PURE__ */
|
|
53794
|
+
/* @__PURE__ */ React83.createElement(UNSAFE_Menu.Options, null, !searching && /* @__PURE__ */ React83.createElement(
|
|
53794
53795
|
Box,
|
|
53795
53796
|
{
|
|
53796
53797
|
className: locationFilterStyles_default.controlsContainer,
|
|
53797
53798
|
...UNSAFE_menuItemsWrapperAttribute
|
|
53798
53799
|
},
|
|
53799
|
-
/* @__PURE__ */
|
|
53800
|
+
/* @__PURE__ */ React83.createElement(
|
|
53800
53801
|
UNSAFE_Menu.CheckboxItem,
|
|
53801
53802
|
{
|
|
53802
53803
|
key: getId3(includeSublocationOption),
|
|
@@ -53805,7 +53806,7 @@ var LocationFilterOverlay = React82.forwardRef(
|
|
|
53805
53806
|
},
|
|
53806
53807
|
getLabel3(includeSublocationOption)
|
|
53807
53808
|
),
|
|
53808
|
-
/* @__PURE__ */
|
|
53809
|
+
/* @__PURE__ */ React83.createElement(
|
|
53809
53810
|
UNSAFE_Menu.CheckboxItem,
|
|
53810
53811
|
{
|
|
53811
53812
|
key: getId3(selectAllOption),
|
|
@@ -53816,7 +53817,7 @@ var LocationFilterOverlay = React82.forwardRef(
|
|
|
53816
53817
|
getLabel3(selectAllOption)
|
|
53817
53818
|
)
|
|
53818
53819
|
), !loading && items.map((item, i) => {
|
|
53819
|
-
return /* @__PURE__ */
|
|
53820
|
+
return /* @__PURE__ */ React83.createElement(
|
|
53820
53821
|
UNSAFE_Menu.CheckboxItem,
|
|
53821
53822
|
{
|
|
53822
53823
|
key: getId3(item),
|
|
@@ -53827,11 +53828,11 @@ var LocationFilterOverlay = React82.forwardRef(
|
|
|
53827
53828
|
getLabel3(item)
|
|
53828
53829
|
);
|
|
53829
53830
|
})),
|
|
53830
|
-
loading && /* @__PURE__ */
|
|
53831
|
+
loading && /* @__PURE__ */ React83.createElement(UNSAFE_Menu.Footer, null, /* @__PURE__ */ React83.createElement(Flex, { justifyContent: "center" }, /* @__PURE__ */ React83.createElement(Spinner$1, { size: "sm" })))
|
|
53831
53832
|
));
|
|
53832
53833
|
}
|
|
53833
53834
|
);
|
|
53834
|
-
var ServerSideLocationFilterRenderer =
|
|
53835
|
+
var ServerSideLocationFilterRenderer = React83.forwardRef(
|
|
53835
53836
|
({ value = [], options, columnDefinition, onChange, loading, getOptions }, ref) => {
|
|
53836
53837
|
const getId3 = columnDefinition.filterProps?.getId || defaultGetId;
|
|
53837
53838
|
const getLabel3 = columnDefinition.filterProps?.getLabel || defaultGetLabel;
|
|
@@ -53847,18 +53848,18 @@ var ServerSideLocationFilterRenderer = React82.forwardRef(
|
|
|
53847
53848
|
}
|
|
53848
53849
|
return "none";
|
|
53849
53850
|
};
|
|
53850
|
-
const ids =
|
|
53851
|
-
const [selectedValueIds, setSelectedValueIds] =
|
|
53852
|
-
const [selectState, setSelectState] =
|
|
53851
|
+
const ids = React83.useMemo(() => value.map(({ id }) => id), [value]);
|
|
53852
|
+
const [selectedValueIds, setSelectedValueIds] = React83.useState(ids);
|
|
53853
|
+
const [selectState, setSelectState] = React83.useState(
|
|
53853
53854
|
determineSelectedState(value)
|
|
53854
53855
|
);
|
|
53855
|
-
const [enableSublocations, setEnableSublocations] =
|
|
53856
|
-
const onSelectSublocations =
|
|
53856
|
+
const [enableSublocations, setEnableSublocations] = React83.useState(false);
|
|
53857
|
+
const onSelectSublocations = React83.useCallback(() => {
|
|
53857
53858
|
setEnableSublocations(!enableSublocations);
|
|
53858
53859
|
}, [enableSublocations]);
|
|
53859
53860
|
const I18n = useI18nContext();
|
|
53860
|
-
const selectRef =
|
|
53861
|
-
const onSelectAll =
|
|
53861
|
+
const selectRef = React83.useRef(null);
|
|
53862
|
+
const onSelectAll = React83.useCallback(() => {
|
|
53862
53863
|
if (selectState === "none" || selectState === "partial") {
|
|
53863
53864
|
setSelectState("all");
|
|
53864
53865
|
setSelectedValueIds(options.map(({ id }) => id));
|
|
@@ -53896,7 +53897,7 @@ var ServerSideLocationFilterRenderer = React82.forwardRef(
|
|
|
53896
53897
|
return [];
|
|
53897
53898
|
}
|
|
53898
53899
|
};
|
|
53899
|
-
const removeSelections =
|
|
53900
|
+
const removeSelections = React83.useCallback(
|
|
53900
53901
|
function(selection, selected) {
|
|
53901
53902
|
const sublocations = handleSelectSublocations(selection);
|
|
53902
53903
|
return enableSublocations ? selected.filter(
|
|
@@ -53908,10 +53909,10 @@ var ServerSideLocationFilterRenderer = React82.forwardRef(
|
|
|
53908
53909
|
},
|
|
53909
53910
|
[enableSublocations]
|
|
53910
53911
|
);
|
|
53911
|
-
|
|
53912
|
+
React83.useEffect(() => {
|
|
53912
53913
|
setSelectState(determineSelectedState(value));
|
|
53913
53914
|
}, [value]);
|
|
53914
|
-
const overlay = /* @__PURE__ */
|
|
53915
|
+
const overlay = /* @__PURE__ */ React83.createElement(
|
|
53915
53916
|
LocationFilterOverlay,
|
|
53916
53917
|
{
|
|
53917
53918
|
columnDefinition,
|
|
@@ -53929,7 +53930,7 @@ var ServerSideLocationFilterRenderer = React82.forwardRef(
|
|
|
53929
53930
|
ref: selectRef
|
|
53930
53931
|
}
|
|
53931
53932
|
);
|
|
53932
|
-
return /* @__PURE__ */
|
|
53933
|
+
return /* @__PURE__ */ React83.createElement(
|
|
53933
53934
|
OverlayTrigger,
|
|
53934
53935
|
{
|
|
53935
53936
|
overlay,
|
|
@@ -53937,7 +53938,7 @@ var ServerSideLocationFilterRenderer = React82.forwardRef(
|
|
|
53937
53938
|
beforeShow: getOptions,
|
|
53938
53939
|
placement: "bottom-left"
|
|
53939
53940
|
},
|
|
53940
|
-
/* @__PURE__ */
|
|
53941
|
+
/* @__PURE__ */ React83.createElement(
|
|
53941
53942
|
Select.Button,
|
|
53942
53943
|
{
|
|
53943
53944
|
block: true,
|
|
@@ -53953,7 +53954,7 @@ var ServerSideLocationFilterRenderer = React82.forwardRef(
|
|
|
53953
53954
|
var LocationFilterRenderer = (props) => {
|
|
53954
53955
|
const { onServerSideDataRequest } = useInternalTableContext();
|
|
53955
53956
|
if (onServerSideDataRequest) {
|
|
53956
|
-
return /* @__PURE__ */
|
|
53957
|
+
return /* @__PURE__ */ React83.createElement(ServerSideLocationFilterRenderer, { ...props });
|
|
53957
53958
|
}
|
|
53958
53959
|
console.error(
|
|
53959
53960
|
"Warning: Location Filters are currently only implemented for the serverside row model"
|
|
@@ -53986,9 +53987,9 @@ function useFilterState({
|
|
|
53986
53987
|
gridApi,
|
|
53987
53988
|
enabled
|
|
53988
53989
|
}) {
|
|
53989
|
-
const [allAvailableFilters, setAllAvailableFilters] =
|
|
53990
|
-
const listenersEnabled =
|
|
53991
|
-
const getFieldFilter =
|
|
53990
|
+
const [allAvailableFilters, setAllAvailableFilters] = React83.useState([]);
|
|
53991
|
+
const listenersEnabled = React83.useRef(false);
|
|
53992
|
+
const getFieldFilter = React83.useCallback(
|
|
53992
53993
|
(fieldName) => {
|
|
53993
53994
|
const fieldFieldInstance = gridApi?.getFilterInstance(fieldName);
|
|
53994
53995
|
if (fieldFieldInstance === null || fieldFieldInstance === void 0) {
|
|
@@ -53998,7 +53999,7 @@ function useFilterState({
|
|
|
53998
53999
|
},
|
|
53999
54000
|
[gridApi]
|
|
54000
54001
|
);
|
|
54001
|
-
const getFieldFilters =
|
|
54002
|
+
const getFieldFilters = React83.useCallback(() => {
|
|
54002
54003
|
return filterableColumns.map((column2) => {
|
|
54003
54004
|
const filterInstance = getFieldFilter(column2.field);
|
|
54004
54005
|
const instanceOptions = getInstanceOptions(
|
|
@@ -54012,7 +54013,7 @@ function useFilterState({
|
|
|
54012
54013
|
};
|
|
54013
54014
|
}).filter((filter) => filter.instance !== void 0);
|
|
54014
54015
|
}, [getFieldFilter, gridApi]);
|
|
54015
|
-
const filterableColumns =
|
|
54016
|
+
const filterableColumns = React83.useMemo(() => {
|
|
54016
54017
|
return columnDefinitions.filter((colDef) => !!colDef.filterRenderer).sort(sortColumnDefinitionsByFilterIndex);
|
|
54017
54018
|
}, [columnDefinitions]);
|
|
54018
54019
|
const filterEventFunction = function filterEventFunction2() {
|
|
@@ -54021,7 +54022,7 @@ function useFilterState({
|
|
|
54021
54022
|
allFilters && setAllAvailableFilters(allFilters);
|
|
54022
54023
|
}
|
|
54023
54024
|
};
|
|
54024
|
-
|
|
54025
|
+
React83.useEffect(() => {
|
|
54025
54026
|
if (enabled) {
|
|
54026
54027
|
listenersEnabled.current = true;
|
|
54027
54028
|
gridApi?.addEventListener("filterChanged", filterEventFunction);
|
|
@@ -54093,7 +54094,7 @@ function ServerSideMultiSelectFilterRenderer({
|
|
|
54093
54094
|
value = [],
|
|
54094
54095
|
...props
|
|
54095
54096
|
}) {
|
|
54096
|
-
return /* @__PURE__ */
|
|
54097
|
+
return /* @__PURE__ */ React83.createElement(
|
|
54097
54098
|
MultiSelect,
|
|
54098
54099
|
{
|
|
54099
54100
|
...props,
|
|
@@ -54121,7 +54122,7 @@ function ClientSideMultiSelectFilterRenderer({
|
|
|
54121
54122
|
value = [],
|
|
54122
54123
|
...props
|
|
54123
54124
|
}) {
|
|
54124
|
-
return /* @__PURE__ */
|
|
54125
|
+
return /* @__PURE__ */ React83.createElement(
|
|
54125
54126
|
MultiSelect,
|
|
54126
54127
|
{
|
|
54127
54128
|
...props,
|
|
@@ -54149,13 +54150,13 @@ var MultiSelectFilterRenderer = (props) => {
|
|
|
54149
54150
|
);
|
|
54150
54151
|
return null;
|
|
54151
54152
|
}
|
|
54152
|
-
return /* @__PURE__ */
|
|
54153
|
+
return /* @__PURE__ */ React83.createElement(Renderer13, { value, ...otherProps });
|
|
54153
54154
|
};
|
|
54154
54155
|
var MultiSelectFilterRenderer_default = MultiSelectFilterRenderer;
|
|
54155
54156
|
var scope = "dataTable.filters.numberFilter";
|
|
54156
54157
|
function useFilterOptions() {
|
|
54157
54158
|
const I18n = useI18nContext();
|
|
54158
|
-
const filterOptions =
|
|
54159
|
+
const filterOptions = React83.useMemo(() => {
|
|
54159
54160
|
return [
|
|
54160
54161
|
{
|
|
54161
54162
|
id: "any_value",
|
|
@@ -54207,18 +54208,18 @@ function useFilterOptions() {
|
|
|
54207
54208
|
}, [I18n]);
|
|
54208
54209
|
return filterOptions;
|
|
54209
54210
|
}
|
|
54210
|
-
var NumberFilterRenderer =
|
|
54211
|
+
var NumberFilterRenderer = React83.memo(
|
|
54211
54212
|
function(props) {
|
|
54212
54213
|
const I18n = useI18nContext();
|
|
54213
54214
|
const defaultFilterOptions = useFilterOptions();
|
|
54214
|
-
const lowerLimitInputRef =
|
|
54215
|
-
const [localValue, setLocalValue] =
|
|
54215
|
+
const lowerLimitInputRef = React83.useRef(null);
|
|
54216
|
+
const [localValue, setLocalValue] = React83.useState(
|
|
54216
54217
|
toNumberFilterValue(props.value)
|
|
54217
54218
|
);
|
|
54218
|
-
const [externalValue, setExternalValue] =
|
|
54219
|
+
const [externalValue, setExternalValue] = React83.useState(
|
|
54219
54220
|
toNumberFilterValue(props.value)
|
|
54220
54221
|
);
|
|
54221
|
-
const localLabel =
|
|
54222
|
+
const localLabel = React83.useMemo(() => {
|
|
54222
54223
|
if (localValue === void 0 || localValue === null) {
|
|
54223
54224
|
return void 0;
|
|
54224
54225
|
}
|
|
@@ -54226,17 +54227,17 @@ var NumberFilterRenderer = React82.memo(
|
|
|
54226
54227
|
(option) => option.id === localValue.type
|
|
54227
54228
|
)?.label;
|
|
54228
54229
|
}, [localValue]);
|
|
54229
|
-
const hasNumberInputsEnabled =
|
|
54230
|
+
const hasNumberInputsEnabled = React83.useMemo(() => {
|
|
54230
54231
|
return localValue && localValue.type !== "any_value" && localValue.type !== "no_value";
|
|
54231
54232
|
}, [localValue]);
|
|
54232
|
-
const hasUpperLimitValue =
|
|
54233
|
+
const hasUpperLimitValue = React83.useMemo(() => {
|
|
54233
54234
|
return localValue?.type === "inRange";
|
|
54234
54235
|
}, [localValue]);
|
|
54235
|
-
const onClear =
|
|
54236
|
+
const onClear = React83.useCallback(() => {
|
|
54236
54237
|
setLocalValue(void 0);
|
|
54237
54238
|
props.onChange(void 0);
|
|
54238
54239
|
}, []);
|
|
54239
|
-
const onSelect =
|
|
54240
|
+
const onSelect = React83.useCallback(({ item }) => {
|
|
54240
54241
|
setLocalValue((prev) => {
|
|
54241
54242
|
return getOnSelectChangeValue(prev, item.id);
|
|
54242
54243
|
});
|
|
@@ -54245,7 +54246,7 @@ var NumberFilterRenderer = React82.memo(
|
|
|
54245
54246
|
});
|
|
54246
54247
|
queueMicrotask(() => lowerLimitInputRef.current?.focus());
|
|
54247
54248
|
}, []);
|
|
54248
|
-
const onUpdateLowerLimit =
|
|
54249
|
+
const onUpdateLowerLimit = React83.useCallback((event) => {
|
|
54249
54250
|
const inputValue = event.target.value;
|
|
54250
54251
|
setLocalValue((prev) => {
|
|
54251
54252
|
return getLowerLimitChangeValue(prev, inputValue);
|
|
@@ -54257,7 +54258,7 @@ var NumberFilterRenderer = React82.memo(
|
|
|
54257
54258
|
return getLowerLimitChangeValue(prev, inputValue);
|
|
54258
54259
|
});
|
|
54259
54260
|
}, []);
|
|
54260
|
-
const onUpdateUpperLimit =
|
|
54261
|
+
const onUpdateUpperLimit = React83.useCallback((event) => {
|
|
54261
54262
|
const inputValue = event.target.value;
|
|
54262
54263
|
setLocalValue((prev) => {
|
|
54263
54264
|
return {
|
|
@@ -54277,11 +54278,11 @@ var NumberFilterRenderer = React82.memo(
|
|
|
54277
54278
|
};
|
|
54278
54279
|
});
|
|
54279
54280
|
}, []);
|
|
54280
|
-
const valueUpdate =
|
|
54281
|
-
|
|
54281
|
+
const valueUpdate = React83.useCallback(debounce2(props.onChange, 500), []);
|
|
54282
|
+
React83.useEffect(() => {
|
|
54282
54283
|
setLocalValue(toNumberFilterValue(props.value));
|
|
54283
54284
|
}, [props.value]);
|
|
54284
|
-
|
|
54285
|
+
React83.useEffect(() => {
|
|
54285
54286
|
const value = toNumberFilterModel({
|
|
54286
54287
|
type: externalValue?.type ?? localValue?.type,
|
|
54287
54288
|
filter: externalValue?.filter ?? localValue?.filter,
|
|
@@ -54289,7 +54290,7 @@ var NumberFilterRenderer = React82.memo(
|
|
|
54289
54290
|
});
|
|
54290
54291
|
isValidInput(value) && valueUpdate(value);
|
|
54291
54292
|
}, [externalValue]);
|
|
54292
|
-
return /* @__PURE__ */
|
|
54293
|
+
return /* @__PURE__ */ React83.createElement(React83.Fragment, null, /* @__PURE__ */ React83.createElement(
|
|
54293
54294
|
Select,
|
|
54294
54295
|
{
|
|
54295
54296
|
block: true,
|
|
@@ -54301,7 +54302,7 @@ var NumberFilterRenderer = React82.memo(
|
|
|
54301
54302
|
scope
|
|
54302
54303
|
})
|
|
54303
54304
|
},
|
|
54304
|
-
defaultFilterOptions.map((item) => /* @__PURE__ */
|
|
54305
|
+
defaultFilterOptions.map((item) => /* @__PURE__ */ React83.createElement(
|
|
54305
54306
|
Select.Option,
|
|
54306
54307
|
{
|
|
54307
54308
|
key: item.id,
|
|
@@ -54310,7 +54311,7 @@ var NumberFilterRenderer = React82.memo(
|
|
|
54310
54311
|
},
|
|
54311
54312
|
item.label
|
|
54312
54313
|
))
|
|
54313
|
-
), hasNumberInputsEnabled && /* @__PURE__ */
|
|
54314
|
+
), hasNumberInputsEnabled && /* @__PURE__ */ React83.createElement(
|
|
54314
54315
|
FlexList,
|
|
54315
54316
|
{
|
|
54316
54317
|
alignItems: "center",
|
|
@@ -54320,7 +54321,7 @@ var NumberFilterRenderer = React82.memo(
|
|
|
54320
54321
|
padding: "md none",
|
|
54321
54322
|
size: "xs"
|
|
54322
54323
|
},
|
|
54323
|
-
/* @__PURE__ */
|
|
54324
|
+
/* @__PURE__ */ React83.createElement(
|
|
54324
54325
|
Input,
|
|
54325
54326
|
{
|
|
54326
54327
|
ref: lowerLimitInputRef,
|
|
@@ -54333,11 +54334,11 @@ var NumberFilterRenderer = React82.memo(
|
|
|
54333
54334
|
onChange: onUpdateLowerLimit
|
|
54334
54335
|
}
|
|
54335
54336
|
),
|
|
54336
|
-
hasUpperLimitValue && /* @__PURE__ */
|
|
54337
|
+
hasUpperLimitValue && /* @__PURE__ */ React83.createElement(Typography, null, I18n.t("labels.and", {
|
|
54337
54338
|
defaultValue: "and",
|
|
54338
54339
|
scope
|
|
54339
54340
|
})),
|
|
54340
|
-
hasUpperLimitValue && /* @__PURE__ */
|
|
54341
|
+
hasUpperLimitValue && /* @__PURE__ */ React83.createElement(
|
|
54341
54342
|
Input,
|
|
54342
54343
|
{
|
|
54343
54344
|
type: "number",
|
|
@@ -54448,7 +54449,7 @@ var useServerSideFilter = ({
|
|
|
54448
54449
|
},
|
|
54449
54450
|
updateServerSideDataSource
|
|
54450
54451
|
} = useInternalTableContext();
|
|
54451
|
-
const [loadingFilter, setLoadingFilter] =
|
|
54452
|
+
const [loadingFilter, setLoadingFilter] = React83.useState(false);
|
|
54452
54453
|
const fieldName = columnDefinition.field;
|
|
54453
54454
|
async function getFilterOptions() {
|
|
54454
54455
|
if (!getOptions(fieldName)) {
|
|
@@ -54498,7 +54499,7 @@ var ServerSideFilter = ({
|
|
|
54498
54499
|
);
|
|
54499
54500
|
return null;
|
|
54500
54501
|
}
|
|
54501
|
-
return /* @__PURE__ */
|
|
54502
|
+
return /* @__PURE__ */ React83.createElement(
|
|
54502
54503
|
Box,
|
|
54503
54504
|
{
|
|
54504
54505
|
as: "li",
|
|
@@ -54506,8 +54507,8 @@ var ServerSideFilter = ({
|
|
|
54506
54507
|
paddingBottom: "xl",
|
|
54507
54508
|
style: { width: "100%" }
|
|
54508
54509
|
},
|
|
54509
|
-
filterHeading ? /* @__PURE__ */
|
|
54510
|
-
/* @__PURE__ */
|
|
54510
|
+
filterHeading ? /* @__PURE__ */ React83.createElement(H3, { "data-qa": `data-table-filter-heading-${fieldName}` }, filterHeading) : null,
|
|
54511
|
+
/* @__PURE__ */ React83.createElement(
|
|
54511
54512
|
Component4,
|
|
54512
54513
|
{
|
|
54513
54514
|
columnDefinition,
|
|
@@ -55221,7 +55222,7 @@ function ClientSideRowCheckbox(props) {
|
|
|
55221
55222
|
removeEventListenerFromGrid("rowSelected", handleRowSelection, props.api);
|
|
55222
55223
|
};
|
|
55223
55224
|
}, []);
|
|
55224
|
-
return /* @__PURE__ */
|
|
55225
|
+
return /* @__PURE__ */ React83.createElement(Box, { paddingRight: "md" }, /* @__PURE__ */ React83.createElement(
|
|
55225
55226
|
Checkbox,
|
|
55226
55227
|
{
|
|
55227
55228
|
checked: selectedState,
|
|
@@ -55258,7 +55259,7 @@ function ServerSideRowCheckbox(props) {
|
|
|
55258
55259
|
props.node,
|
|
55259
55260
|
rowSelectionRef.current?.affectedRows
|
|
55260
55261
|
);
|
|
55261
|
-
return /* @__PURE__ */
|
|
55262
|
+
return /* @__PURE__ */ React83.createElement(Box, { paddingRight: "md" }, /* @__PURE__ */ React83.createElement(
|
|
55262
55263
|
Checkbox,
|
|
55263
55264
|
{
|
|
55264
55265
|
checked,
|
|
@@ -55280,7 +55281,7 @@ function ServerSideRowCheckbox(props) {
|
|
|
55280
55281
|
}
|
|
55281
55282
|
function RowCheckbox(props) {
|
|
55282
55283
|
const { onServerSideDataRequest } = useInternalTableContext();
|
|
55283
|
-
return onServerSideDataRequest ? /* @__PURE__ */
|
|
55284
|
+
return onServerSideDataRequest ? /* @__PURE__ */ React83.createElement(ServerSideRowCheckbox, { ...props }) : /* @__PURE__ */ React83.createElement(ClientSideRowCheckbox, { ...props });
|
|
55284
55285
|
}
|
|
55285
55286
|
|
|
55286
55287
|
// src/CellRenderers/AutoGroupCell.tsx
|
|
@@ -55297,7 +55298,7 @@ var LevelIndents = (props) => {
|
|
|
55297
55298
|
if (levels.length === 0) {
|
|
55298
55299
|
return null;
|
|
55299
55300
|
}
|
|
55300
|
-
return /* @__PURE__ */
|
|
55301
|
+
return /* @__PURE__ */ React83.createElement("div", { style: { paddingLeft: `${props.level * INDENT_WIDTH_BASE}px` } }, levels.map((_level, index) => /* @__PURE__ */ React83.createElement(
|
|
55301
55302
|
"div",
|
|
55302
55303
|
{
|
|
55303
55304
|
className: classNames([
|
|
@@ -55314,7 +55315,7 @@ var LevelIndents = (props) => {
|
|
|
55314
55315
|
)));
|
|
55315
55316
|
};
|
|
55316
55317
|
function GroupCaret(props) {
|
|
55317
|
-
const mounted =
|
|
55318
|
+
const mounted = React83.useRef(false);
|
|
55318
55319
|
const [expanded, setExpanded] = useState(props.node.expanded);
|
|
55319
55320
|
const ExpandableCaret = expanded ? CaretDown : CaretRight;
|
|
55320
55321
|
function handleRowGroupToggle(event) {
|
|
@@ -55336,7 +55337,7 @@ function GroupCaret(props) {
|
|
|
55336
55337
|
);
|
|
55337
55338
|
};
|
|
55338
55339
|
}, []);
|
|
55339
|
-
return /* @__PURE__ */
|
|
55340
|
+
return /* @__PURE__ */ React83.createElement(Box, { className: AutoGroupCell_default.expandableCaret }, props.node.isExpandable() && /* @__PURE__ */ React83.createElement(
|
|
55340
55341
|
ExpandableCaret,
|
|
55341
55342
|
{
|
|
55342
55343
|
className: expanded ? AutoGroupCell_default.collapseCaret : AutoGroupCell_default.expandCaret,
|
|
@@ -55367,20 +55368,20 @@ var AutoGroupCellRenderer = (props) => {
|
|
|
55367
55368
|
};
|
|
55368
55369
|
}, []);
|
|
55369
55370
|
const adjustedLevel = props.node.footer ? props.node.level + 1 : props.node.level;
|
|
55370
|
-
return /* @__PURE__ */
|
|
55371
|
+
return /* @__PURE__ */ React83.createElement(Flex, { className: AutoGroupCell_default.autoGroupCell, alignItems: "center" }, /* @__PURE__ */ React83.createElement(
|
|
55371
55372
|
LevelIndents,
|
|
55372
55373
|
{
|
|
55373
55374
|
level: adjustedLevel,
|
|
55374
55375
|
lastRowInGroup: isLastRowInGroup(props)
|
|
55375
55376
|
}
|
|
55376
|
-
), !props.node.footer && /* @__PURE__ */
|
|
55377
|
+
), !props.node.footer && /* @__PURE__ */ React83.createElement(GroupCaret, { ...props }), props.node.selectable && !props.node.footer && !props.node.rowPinned && /* @__PURE__ */ React83.createElement(RowCheckbox, { ...props }), /* @__PURE__ */ React83.createElement(
|
|
55377
55378
|
"div",
|
|
55378
55379
|
{
|
|
55379
55380
|
className: classNames(AutoGroupCell_default.value, {
|
|
55380
55381
|
[AutoGroupCell_default.footer]: props.node.footer
|
|
55381
55382
|
})
|
|
55382
55383
|
},
|
|
55383
|
-
/* @__PURE__ */
|
|
55384
|
+
/* @__PURE__ */ React83.createElement(
|
|
55384
55385
|
InnerRenderer,
|
|
55385
55386
|
{
|
|
55386
55387
|
...props,
|
|
@@ -55421,7 +55422,7 @@ var InternalRowActionsCellRenderer = (props) => {
|
|
|
55421
55422
|
if (props.rowPinned || props.columnDefinition.cellRendererParams.hideActionsOnGroupedRow && props.isGroup) {
|
|
55422
55423
|
return null;
|
|
55423
55424
|
}
|
|
55424
|
-
return /* @__PURE__ */
|
|
55425
|
+
return /* @__PURE__ */ React83.createElement(
|
|
55425
55426
|
FlexList,
|
|
55426
55427
|
{
|
|
55427
55428
|
justifyContent: "flex-end",
|
|
@@ -55431,7 +55432,7 @@ var InternalRowActionsCellRenderer = (props) => {
|
|
|
55431
55432
|
},
|
|
55432
55433
|
props.columnDefinition.cellRendererParams.actions.map((Action, idx) => {
|
|
55433
55434
|
const key = `${Action.displayName}${idx}`;
|
|
55434
|
-
return /* @__PURE__ */
|
|
55435
|
+
return /* @__PURE__ */ React83.createElement(Action, { ...props, key });
|
|
55435
55436
|
})
|
|
55436
55437
|
);
|
|
55437
55438
|
};
|
|
@@ -55439,9 +55440,9 @@ var RowActionsCellRenderer = withDataTableRenderer(
|
|
|
55439
55440
|
InternalRowActionsCellRenderer
|
|
55440
55441
|
);
|
|
55441
55442
|
var cx14 = classNames.bind(styles_exports);
|
|
55442
|
-
var InlineEditError =
|
|
55443
|
-
const buttonRef =
|
|
55444
|
-
|
|
55443
|
+
var InlineEditError = React83.forwardRef(function InlineError({ errorMessage }, ref) {
|
|
55444
|
+
const buttonRef = React83.useRef(null);
|
|
55445
|
+
React83.useImperativeHandle(ref, () => ({
|
|
55445
55446
|
show: () => {
|
|
55446
55447
|
buttonRef.current?.dispatchEvent(new MouseEvent("mouseenter"));
|
|
55447
55448
|
},
|
|
@@ -55450,22 +55451,22 @@ var InlineEditError = React82.forwardRef(function InlineError({ errorMessage },
|
|
|
55450
55451
|
}
|
|
55451
55452
|
}));
|
|
55452
55453
|
const hasMessage = Array.isArray(errorMessage) ? errorMessage.length > 0 : Boolean(errorMessage);
|
|
55453
|
-
const overlay = Array.isArray(errorMessage) ? /* @__PURE__ */
|
|
55454
|
-
return /* @__PURE__ */
|
|
55454
|
+
const overlay = Array.isArray(errorMessage) ? /* @__PURE__ */ React83.createElement(Tooltip.Content, null, errorMessage.map((err) => /* @__PURE__ */ React83.createElement("div", { key: err }, err))) : errorMessage;
|
|
55455
|
+
return /* @__PURE__ */ React83.createElement("div", { className: cx14("cell-error") }, /* @__PURE__ */ React83.createElement(
|
|
55455
55456
|
Tooltip,
|
|
55456
55457
|
{
|
|
55457
55458
|
ref: buttonRef,
|
|
55458
55459
|
overlay,
|
|
55459
55460
|
trigger: hasMessage ? "hover" : "none"
|
|
55460
55461
|
},
|
|
55461
|
-
/* @__PURE__ */
|
|
55462
|
+
/* @__PURE__ */ React83.createElement(
|
|
55462
55463
|
Button,
|
|
55463
55464
|
{
|
|
55464
55465
|
className: cx14("cell-error__button"),
|
|
55465
55466
|
variant: "tertiary",
|
|
55466
55467
|
size: "sm"
|
|
55467
55468
|
},
|
|
55468
|
-
/* @__PURE__ */
|
|
55469
|
+
/* @__PURE__ */ React83.createElement(Typography, { color: "red50" }, /* @__PURE__ */ React83.createElement(Error$1, null))
|
|
55469
55470
|
)
|
|
55470
55471
|
));
|
|
55471
55472
|
});
|
|
@@ -55485,7 +55486,7 @@ function PseudoInlineEditorWrapper({
|
|
|
55485
55486
|
children,
|
|
55486
55487
|
...props
|
|
55487
55488
|
}) {
|
|
55488
|
-
return /* @__PURE__ */
|
|
55489
|
+
return /* @__PURE__ */ React83.createElement(
|
|
55489
55490
|
"div",
|
|
55490
55491
|
{
|
|
55491
55492
|
className: cx15("pseudo-inline-edit-wrapper", {
|
|
@@ -55493,7 +55494,7 @@ function PseudoInlineEditorWrapper({
|
|
|
55493
55494
|
"inline-wrapper--with-show-pseudo-editors": alwaysShowEditors
|
|
55494
55495
|
})
|
|
55495
55496
|
},
|
|
55496
|
-
/* @__PURE__ */
|
|
55497
|
+
/* @__PURE__ */ React83.createElement(
|
|
55497
55498
|
"span",
|
|
55498
55499
|
{
|
|
55499
55500
|
className: cx15("pseudo-inline-edit-content", "truncatingText", {
|
|
@@ -55506,12 +55507,12 @@ function PseudoInlineEditorWrapper({
|
|
|
55506
55507
|
...props
|
|
55507
55508
|
},
|
|
55508
55509
|
children,
|
|
55509
|
-
/* @__PURE__ */
|
|
55510
|
-
hasValue && onClear && /* @__PURE__ */
|
|
55511
|
-
showArrow && /* @__PURE__ */
|
|
55512
|
-
showCalendar && /* @__PURE__ */
|
|
55510
|
+
/* @__PURE__ */ React83.createElement("div", { className: cx15("inline-edit-spacer") }),
|
|
55511
|
+
hasValue && onClear && /* @__PURE__ */ React83.createElement("div", { className: cx15("clear-wrapper") }, /* @__PURE__ */ React83.createElement(Clear, { size: "sm", onMouseDown: onClear })),
|
|
55512
|
+
showArrow && /* @__PURE__ */ React83.createElement("div", { className: cx15("arrow-down-wrapper") }, /* @__PURE__ */ React83.createElement("div", { className: cx15("arrow-down") })),
|
|
55513
|
+
showCalendar && /* @__PURE__ */ React83.createElement("div", { className: cx15("calendar-wrapper") }, /* @__PURE__ */ React83.createElement(Calendar$1, { size: "sm" }))
|
|
55513
55514
|
),
|
|
55514
|
-
/* @__PURE__ */
|
|
55515
|
+
/* @__PURE__ */ React83.createElement(
|
|
55515
55516
|
ValidationOutput,
|
|
55516
55517
|
{
|
|
55517
55518
|
isRequired,
|
|
@@ -55521,8 +55522,8 @@ function PseudoInlineEditorWrapper({
|
|
|
55521
55522
|
)
|
|
55522
55523
|
);
|
|
55523
55524
|
}
|
|
55524
|
-
var InlineEditorWrapper =
|
|
55525
|
-
return /* @__PURE__ */
|
|
55525
|
+
var InlineEditorWrapper = React83.forwardRef(function InlineEditorWrapper2({ rightAligned, errorMessage, isValid, isRequired, children }, ref) {
|
|
55526
|
+
return /* @__PURE__ */ React83.createElement(
|
|
55526
55527
|
"div",
|
|
55527
55528
|
{
|
|
55528
55529
|
className: cx15("inline-edit-wrapper", {
|
|
@@ -55530,7 +55531,7 @@ var InlineEditorWrapper = React82.forwardRef(function InlineEditorWrapper2({ rig
|
|
|
55530
55531
|
})
|
|
55531
55532
|
},
|
|
55532
55533
|
children,
|
|
55533
|
-
/* @__PURE__ */
|
|
55534
|
+
/* @__PURE__ */ React83.createElement(
|
|
55534
55535
|
ValidationOutput,
|
|
55535
55536
|
{
|
|
55536
55537
|
ref,
|
|
@@ -55541,7 +55542,7 @@ var InlineEditorWrapper = React82.forwardRef(function InlineEditorWrapper2({ rig
|
|
|
55541
55542
|
)
|
|
55542
55543
|
);
|
|
55543
55544
|
});
|
|
55544
|
-
var NonEditorWrapper =
|
|
55545
|
+
var NonEditorWrapper = React83.forwardRef(function NonEditorWrapper2({
|
|
55545
55546
|
rightAligned,
|
|
55546
55547
|
errorMessage,
|
|
55547
55548
|
isValid,
|
|
@@ -55550,7 +55551,7 @@ var NonEditorWrapper = React82.forwardRef(function NonEditorWrapper2({
|
|
|
55550
55551
|
isGroup,
|
|
55551
55552
|
rowPinned
|
|
55552
55553
|
}, ref) {
|
|
55553
|
-
return /* @__PURE__ */
|
|
55554
|
+
return /* @__PURE__ */ React83.createElement(
|
|
55554
55555
|
"div",
|
|
55555
55556
|
{
|
|
55556
55557
|
className: cx15("inline-nonedit-wrapper", {
|
|
@@ -55558,7 +55559,7 @@ var NonEditorWrapper = React82.forwardRef(function NonEditorWrapper2({
|
|
|
55558
55559
|
})
|
|
55559
55560
|
},
|
|
55560
55561
|
children,
|
|
55561
|
-
/* @__PURE__ */
|
|
55562
|
+
/* @__PURE__ */ React83.createElement(
|
|
55562
55563
|
ValidationOutput,
|
|
55563
55564
|
{
|
|
55564
55565
|
ref,
|
|
@@ -55571,9 +55572,9 @@ var NonEditorWrapper = React82.forwardRef(function NonEditorWrapper2({
|
|
|
55571
55572
|
)
|
|
55572
55573
|
);
|
|
55573
55574
|
});
|
|
55574
|
-
var ValidationOutput =
|
|
55575
|
+
var ValidationOutput = React83.forwardRef(function ValidationOutput2({ isRequired, isValid, errorMessage, rowPinned }, ref) {
|
|
55575
55576
|
const showError = !isValid && errorMessage;
|
|
55576
|
-
return /* @__PURE__ */
|
|
55577
|
+
return /* @__PURE__ */ React83.createElement(React83.Fragment, null, !showError && isRequired && !rowPinned && /* @__PURE__ */ React83.createElement(Required, { className: cx15("cell-asterisk") }), showError && /* @__PURE__ */ React83.createElement(InlineEditError, { ref, errorMessage }));
|
|
55577
55578
|
});
|
|
55578
55579
|
|
|
55579
55580
|
// src/CellRenderers/DataTableCell.tsx
|
|
@@ -55641,7 +55642,7 @@ var DataTableCellRenderer = ({
|
|
|
55641
55642
|
}),
|
|
55642
55643
|
[column2, node]
|
|
55643
55644
|
);
|
|
55644
|
-
return /* @__PURE__ */
|
|
55645
|
+
return /* @__PURE__ */ React83.createElement(React83.Fragment, null, shouldDisplayRowCheckbox(columnApi, column2, node) && /* @__PURE__ */ React83.createElement(Box, { paddingLeft: "sm" }, /* @__PURE__ */ React83.createElement(RowCheckbox, { api, data, node })), columnDefinition.editable ? /* @__PURE__ */ React83.createElement(
|
|
55645
55646
|
PseudoInlineEditorWrapper,
|
|
55646
55647
|
{
|
|
55647
55648
|
showArrow: editorType === "select",
|
|
@@ -55655,8 +55656,8 @@ var DataTableCellRenderer = ({
|
|
|
55655
55656
|
alwaysShowEditors: columnDefinition.cellEditorParams?.alwaysShowPseudoEditors,
|
|
55656
55657
|
...validationOutput
|
|
55657
55658
|
},
|
|
55658
|
-
/* @__PURE__ */
|
|
55659
|
-
) : /* @__PURE__ */
|
|
55659
|
+
/* @__PURE__ */ React83.createElement(Component4, { ...componentParams })
|
|
55660
|
+
) : /* @__PURE__ */ React83.createElement(
|
|
55660
55661
|
NonEditorWrapper,
|
|
55661
55662
|
{
|
|
55662
55663
|
rightAligned: colDef.type === "rightAligned",
|
|
@@ -55664,7 +55665,7 @@ var DataTableCellRenderer = ({
|
|
|
55664
55665
|
rowPinned: Boolean(componentParams.rowPinned),
|
|
55665
55666
|
isGroup: Boolean(componentParams.isGroup)
|
|
55666
55667
|
},
|
|
55667
|
-
/* @__PURE__ */
|
|
55668
|
+
/* @__PURE__ */ React83.createElement(
|
|
55668
55669
|
Component4,
|
|
55669
55670
|
{
|
|
55670
55671
|
...componentParams,
|
|
@@ -55682,7 +55683,7 @@ function getStartingValue(eventKey, editorType, existingValue) {
|
|
|
55682
55683
|
}
|
|
55683
55684
|
return existingValue;
|
|
55684
55685
|
}
|
|
55685
|
-
var DataTableCellEditor =
|
|
55686
|
+
var DataTableCellEditor = React83.forwardRef(
|
|
55686
55687
|
({
|
|
55687
55688
|
api,
|
|
55688
55689
|
colDef,
|
|
@@ -55699,10 +55700,10 @@ var DataTableCellEditor = React82.forwardRef(
|
|
|
55699
55700
|
const startingValue = getStartingValue(eventKey, editorType, value);
|
|
55700
55701
|
const [currentValue, setCurrentValue] = useState(startingValue);
|
|
55701
55702
|
const { rowHeight, tableRef } = useInternalTableContext();
|
|
55702
|
-
const inlineEditorRef =
|
|
55703
|
-
const inputRef =
|
|
55704
|
-
const selectRef =
|
|
55705
|
-
const textAreaRef =
|
|
55703
|
+
const inlineEditorRef = React83.useRef(null);
|
|
55704
|
+
const inputRef = React83.useRef(null);
|
|
55705
|
+
const selectRef = React83.useRef(null);
|
|
55706
|
+
const textAreaRef = React83.useRef(null);
|
|
55706
55707
|
const columnDefinition = transformToColumnDefinition(colDef);
|
|
55707
55708
|
const validationOutput = colDef.valueValidator?.({
|
|
55708
55709
|
data,
|
|
@@ -55710,7 +55711,7 @@ var DataTableCellEditor = React82.forwardRef(
|
|
|
55710
55711
|
columnDefinition,
|
|
55711
55712
|
node: serializeNode(node)
|
|
55712
55713
|
}) ?? defaultValidationOutput;
|
|
55713
|
-
|
|
55714
|
+
React83.useImperativeHandle(ref, () => {
|
|
55714
55715
|
return {
|
|
55715
55716
|
getValue: () => {
|
|
55716
55717
|
if (editorType === "input") {
|
|
@@ -55745,7 +55746,7 @@ var DataTableCellEditor = React82.forwardRef(
|
|
|
55745
55746
|
}
|
|
55746
55747
|
}
|
|
55747
55748
|
}
|
|
55748
|
-
|
|
55749
|
+
React83.useEffect(() => {
|
|
55749
55750
|
if (editorType === "input") {
|
|
55750
55751
|
if (eventKey) {
|
|
55751
55752
|
inputRef.current?.focus();
|
|
@@ -55777,14 +55778,14 @@ var DataTableCellEditor = React82.forwardRef(
|
|
|
55777
55778
|
return selectRef;
|
|
55778
55779
|
}
|
|
55779
55780
|
};
|
|
55780
|
-
return /* @__PURE__ */
|
|
55781
|
+
return /* @__PURE__ */ React83.createElement(
|
|
55781
55782
|
InlineEditorWrapper,
|
|
55782
55783
|
{
|
|
55783
55784
|
rightAligned: colDef.type === "rightAligned",
|
|
55784
55785
|
ref: inlineEditorRef,
|
|
55785
55786
|
...validationOutput
|
|
55786
55787
|
},
|
|
55787
|
-
/* @__PURE__ */
|
|
55788
|
+
/* @__PURE__ */ React83.createElement(
|
|
55788
55789
|
Component4,
|
|
55789
55790
|
{
|
|
55790
55791
|
columnDefinition,
|
|
@@ -55835,7 +55836,7 @@ function DefaultEmptyStateRenderer({
|
|
|
55835
55836
|
const showFilterState = !!hasFilters || !!hasSearch;
|
|
55836
55837
|
const title = getTitle(I18n, showFilterState, itemsLabel);
|
|
55837
55838
|
const description = getDescription(I18n, showFilterState);
|
|
55838
|
-
return /* @__PURE__ */
|
|
55839
|
+
return /* @__PURE__ */ React83.createElement(EmptyState$1, null, /* @__PURE__ */ React83.createElement(EmptyState$1.Title, null, title), /* @__PURE__ */ React83.createElement(EmptyState$1.Description, null, description), !showFilterState && children ? /* @__PURE__ */ React83.createElement(EmptyState$1.Actions, null, children) : null);
|
|
55839
55840
|
}
|
|
55840
55841
|
var EmptyState = ({
|
|
55841
55842
|
emptyStateRenderer: EmptyStateRenderer
|
|
@@ -55844,7 +55845,7 @@ var EmptyState = ({
|
|
|
55844
55845
|
const hasFilters = internalTableContext.tableRef?.current?.isAnyFilterPresent() ?? false;
|
|
55845
55846
|
const hasSearch = internalTableContext.tableRef?.current?.isSearchPresent() ?? false;
|
|
55846
55847
|
const Renderer13 = EmptyStateRenderer ?? DefaultEmptyStateRenderer;
|
|
55847
|
-
return /* @__PURE__ */
|
|
55848
|
+
return /* @__PURE__ */ React83.createElement(Renderer13, { hasFilters, hasSearch });
|
|
55848
55849
|
};
|
|
55849
55850
|
|
|
55850
55851
|
// src/types.ts
|
|
@@ -55855,7 +55856,7 @@ var SelectAllState = /* @__PURE__ */ ((SelectAllState2) => {
|
|
|
55855
55856
|
return SelectAllState2;
|
|
55856
55857
|
})(SelectAllState || {});
|
|
55857
55858
|
function withMenuProps(defaultMenuConfig, onSelectAll, selectionSSREnabled) {
|
|
55858
|
-
return ({ ...genericHeaderprops }) => /* @__PURE__ */
|
|
55859
|
+
return ({ ...genericHeaderprops }) => /* @__PURE__ */ React83.createElement(
|
|
55859
55860
|
GenericHeaderRenderer,
|
|
55860
55861
|
{
|
|
55861
55862
|
...genericHeaderprops,
|
|
@@ -56080,9 +56081,9 @@ var tooltipDelay = {
|
|
|
56080
56081
|
show: 500
|
|
56081
56082
|
};
|
|
56082
56083
|
function useOverflowObserver() {
|
|
56083
|
-
const recalculate =
|
|
56084
|
-
const [isOverflowingX, setIsOverflowingX] =
|
|
56085
|
-
const [isOverflowingY, setIsOverflowingY] =
|
|
56084
|
+
const recalculate = React83.useRef();
|
|
56085
|
+
const [isOverflowingX, setIsOverflowingX] = React83.useState(false);
|
|
56086
|
+
const [isOverflowingY, setIsOverflowingY] = React83.useState(false);
|
|
56086
56087
|
function isContentOverflowing(length, visibleLength) {
|
|
56087
56088
|
return Math.abs(length - visibleLength) > 1;
|
|
56088
56089
|
}
|
|
@@ -56118,7 +56119,7 @@ function useOverflowObserver() {
|
|
|
56118
56119
|
}
|
|
56119
56120
|
function defaultOptionRenderer(option) {
|
|
56120
56121
|
const isSelected = option.value === "pinnedLeft" || option.value === "pinnedRight";
|
|
56121
|
-
return /* @__PURE__ */
|
|
56122
|
+
return /* @__PURE__ */ React83.createElement(React83.Fragment, null, /* @__PURE__ */ React83.createElement(StyledDropdownFlyoutLabel, { "data-flyout": true, style: { width: "100%" } }, isSelected ? /* @__PURE__ */ React83.createElement(Typography, { color: "blue50", weight: "bold" }, option.label) : option.label), Array.isArray(option.children) && /* @__PURE__ */ React83.createElement(
|
|
56122
56123
|
StyledDropdownFlyoutExpandIcon,
|
|
56123
56124
|
{
|
|
56124
56125
|
"data-qa": "core-dropdown-flyout-option-expand-icon",
|
|
@@ -56142,7 +56143,7 @@ var SortComponent = (props) => {
|
|
|
56142
56143
|
let sortIcon = null;
|
|
56143
56144
|
switch (sort) {
|
|
56144
56145
|
case "asc":
|
|
56145
|
-
sortIcon = /* @__PURE__ */
|
|
56146
|
+
sortIcon = /* @__PURE__ */ React83.createElement(
|
|
56146
56147
|
ArrowUp,
|
|
56147
56148
|
{
|
|
56148
56149
|
size: "sm",
|
|
@@ -56152,7 +56153,7 @@ var SortComponent = (props) => {
|
|
|
56152
56153
|
);
|
|
56153
56154
|
break;
|
|
56154
56155
|
case "desc":
|
|
56155
|
-
sortIcon = /* @__PURE__ */
|
|
56156
|
+
sortIcon = /* @__PURE__ */ React83.createElement(
|
|
56156
56157
|
ArrowDown,
|
|
56157
56158
|
{
|
|
56158
56159
|
size: "sm",
|
|
@@ -56165,14 +56166,14 @@ var SortComponent = (props) => {
|
|
|
56165
56166
|
sortIcon = null;
|
|
56166
56167
|
break;
|
|
56167
56168
|
}
|
|
56168
|
-
return /* @__PURE__ */
|
|
56169
|
+
return /* @__PURE__ */ React83.createElement(Flex, { inline: true, paddingTop: "xs" }, /* @__PURE__ */ React83.createElement(
|
|
56169
56170
|
"span",
|
|
56170
56171
|
{
|
|
56171
56172
|
className: "ag-header-icon ag-header-label-icon ag-sort-order",
|
|
56172
56173
|
"aria-hidden": "true"
|
|
56173
56174
|
},
|
|
56174
56175
|
currentSortIndex
|
|
56175
|
-
), /* @__PURE__ */
|
|
56176
|
+
), /* @__PURE__ */ React83.createElement("span", { className: "ag-header-icon", role: "presentation" }, sortIcon));
|
|
56176
56177
|
}
|
|
56177
56178
|
return null;
|
|
56178
56179
|
};
|
|
@@ -56185,8 +56186,8 @@ var GenericHeaderRenderer = (props) => {
|
|
|
56185
56186
|
const I18n = useI18nContext();
|
|
56186
56187
|
const { columnApi, tableRef, onServerSideDataRequest } = useInternalTableContext();
|
|
56187
56188
|
const onSSDR = Boolean(onServerSideDataRequest);
|
|
56188
|
-
const [sortOrder, setSortOrder] =
|
|
56189
|
-
const [isFirstColumn2, setIsFirstColumn] =
|
|
56189
|
+
const [sortOrder, setSortOrder] = React83.useState(props.column.getSort());
|
|
56190
|
+
const [isFirstColumn2, setIsFirstColumn] = React83.useState(false);
|
|
56190
56191
|
const defaultMenuOptions = getMainMenuItems(props, I18n);
|
|
56191
56192
|
const headerCellRef = useRef(null);
|
|
56192
56193
|
const headerCheckboxSelection = colDef.headerCheckboxSelection;
|
|
@@ -56199,7 +56200,7 @@ var GenericHeaderRenderer = (props) => {
|
|
|
56199
56200
|
}) : !!headerCheckboxSelection;
|
|
56200
56201
|
const checkbox = useRef(null);
|
|
56201
56202
|
const colId = props.column.getId();
|
|
56202
|
-
|
|
56203
|
+
React83.useEffect(() => {
|
|
56203
56204
|
function calculatePosition() {
|
|
56204
56205
|
const columns = props.columnApi.getColumnState();
|
|
56205
56206
|
if (!columns?.length) {
|
|
@@ -56264,15 +56265,15 @@ var GenericHeaderRenderer = (props) => {
|
|
|
56264
56265
|
});
|
|
56265
56266
|
return useDefaultMenuOptions ? filteredOptions : [...defaultMenuOptions, ...filteredOptions, ...menuOptions];
|
|
56266
56267
|
};
|
|
56267
|
-
|
|
56268
|
+
React83.useEffect(() => {
|
|
56268
56269
|
const onSortChanged = () => {
|
|
56269
56270
|
setSortOrder(props.column.getSort());
|
|
56270
56271
|
};
|
|
56271
56272
|
props.column.addEventListener("sortChanged", onSortChanged);
|
|
56272
56273
|
return () => props.column.removeEventListener("sortChanged", onSortChanged);
|
|
56273
56274
|
}, [props.column]);
|
|
56274
|
-
const [isExpandable, setIsExpandable] =
|
|
56275
|
-
|
|
56275
|
+
const [isExpandable, setIsExpandable] = React83.useState(false);
|
|
56276
|
+
React83.useEffect(() => {
|
|
56276
56277
|
if (onSSDR) {
|
|
56277
56278
|
return;
|
|
56278
56279
|
}
|
|
@@ -56284,8 +56285,8 @@ var GenericHeaderRenderer = (props) => {
|
|
|
56284
56285
|
!props.menuConfig.suppressExpandGroupsButton && hasExpandableNodes && props.column.getColId() === "ag-Grid-AutoColumn"
|
|
56285
56286
|
);
|
|
56286
56287
|
});
|
|
56287
|
-
const [expansionVariant, setExpansionVariant] =
|
|
56288
|
-
|
|
56288
|
+
const [expansionVariant, setExpansionVariant] = React83.useState("closed");
|
|
56289
|
+
React83.useEffect(() => {
|
|
56289
56290
|
const onExpandAllChange = (event) => {
|
|
56290
56291
|
setExpansionVariant(event.source === "expandAll" ? "all" : "closed");
|
|
56291
56292
|
};
|
|
@@ -56298,7 +56299,7 @@ var GenericHeaderRenderer = (props) => {
|
|
|
56298
56299
|
);
|
|
56299
56300
|
};
|
|
56300
56301
|
}, [props.api]);
|
|
56301
|
-
|
|
56302
|
+
React83.useEffect(() => {
|
|
56302
56303
|
const hasTierOneCollapsedNodes = !!findNode(
|
|
56303
56304
|
(node) => node.level === 0 && !node.expanded,
|
|
56304
56305
|
props.api
|
|
@@ -56355,10 +56356,10 @@ var GenericHeaderRenderer = (props) => {
|
|
|
56355
56356
|
),
|
|
56356
56357
|
all: I18n.t("dataTable.rowGroupToggle.collapseAll")
|
|
56357
56358
|
};
|
|
56358
|
-
const [selectAll, setSelectAll] =
|
|
56359
|
+
const [selectAll, setSelectAll] = React83.useState(
|
|
56359
56360
|
"none" /* None */
|
|
56360
56361
|
);
|
|
56361
|
-
|
|
56362
|
+
React83.useEffect(() => {
|
|
56362
56363
|
if (onSSDR || !isFirstColumn2) {
|
|
56363
56364
|
return;
|
|
56364
56365
|
}
|
|
@@ -56394,7 +56395,7 @@ var GenericHeaderRenderer = (props) => {
|
|
|
56394
56395
|
};
|
|
56395
56396
|
}, [isFirstColumn2, selectAll]);
|
|
56396
56397
|
const { ref, isOverflowing, recalculate } = useOverflowObserver();
|
|
56397
|
-
|
|
56398
|
+
React83.useEffect(() => {
|
|
56398
56399
|
const handler = () => recalculate.current?.();
|
|
56399
56400
|
props.api.addEventListener("cellMouseOver", handler);
|
|
56400
56401
|
props.api.addEventListener("columnResized", handler);
|
|
@@ -56403,7 +56404,7 @@ var GenericHeaderRenderer = (props) => {
|
|
|
56403
56404
|
removeEventListenerFromGrid("columnResized", handler, props.api);
|
|
56404
56405
|
};
|
|
56405
56406
|
}, []);
|
|
56406
|
-
|
|
56407
|
+
React83.useEffect(() => {
|
|
56407
56408
|
if (!onSSDR || !isFirstColumn2 || !props.selectionSSREnabled) {
|
|
56408
56409
|
return;
|
|
56409
56410
|
}
|
|
@@ -56438,7 +56439,7 @@ var GenericHeaderRenderer = (props) => {
|
|
|
56438
56439
|
);
|
|
56439
56440
|
};
|
|
56440
56441
|
}, [isFirstColumn2, props.selectionSSREnabled, props.api, onSSDR]);
|
|
56441
|
-
const toggleSelectAll =
|
|
56442
|
+
const toggleSelectAll = React83.useCallback(() => {
|
|
56442
56443
|
const nextSelectedState = selectAll === "all" /* All */ ? "none" /* None */ : "all" /* All */;
|
|
56443
56444
|
setSelectAll(nextSelectedState);
|
|
56444
56445
|
props.onSelectAll?.(nextSelectedState);
|
|
@@ -56466,7 +56467,7 @@ var GenericHeaderRenderer = (props) => {
|
|
|
56466
56467
|
props.selectionSSREnabled,
|
|
56467
56468
|
props.api
|
|
56468
56469
|
]);
|
|
56469
|
-
return /* @__PURE__ */
|
|
56470
|
+
return /* @__PURE__ */ React83.createElement(
|
|
56470
56471
|
Flex,
|
|
56471
56472
|
{
|
|
56472
56473
|
alignItems: "center",
|
|
@@ -56475,7 +56476,7 @@ var GenericHeaderRenderer = (props) => {
|
|
|
56475
56476
|
className: "data-table-header-cell-container",
|
|
56476
56477
|
ref: headerCellRef
|
|
56477
56478
|
},
|
|
56478
|
-
/* @__PURE__ */
|
|
56479
|
+
/* @__PURE__ */ React83.createElement(
|
|
56479
56480
|
"div",
|
|
56480
56481
|
{
|
|
56481
56482
|
className: "ag-header-cell-label-container",
|
|
@@ -56483,16 +56484,16 @@ var GenericHeaderRenderer = (props) => {
|
|
|
56483
56484
|
onClick: onSortToggled,
|
|
56484
56485
|
onTouchEnd: onSortToggled
|
|
56485
56486
|
},
|
|
56486
|
-
isExpandable && /* @__PURE__ */
|
|
56487
|
+
isExpandable && /* @__PURE__ */ React83.createElement(
|
|
56487
56488
|
Tooltip,
|
|
56488
56489
|
{
|
|
56489
56490
|
hideDelay: tooltipDelay.hide,
|
|
56490
56491
|
showDelay: tooltipDelay.show,
|
|
56491
|
-
overlay: /* @__PURE__ */
|
|
56492
|
+
overlay: /* @__PURE__ */ React83.createElement(Tooltip.Content, { className: "auto-column-expand-tooltip-content" }, tooltipText[expansionVariant])
|
|
56492
56493
|
},
|
|
56493
|
-
/* @__PURE__ */
|
|
56494
|
+
/* @__PURE__ */ React83.createElement("div", { className: "expand-button", onClick: onExpandToggle }, expansionVariant === "all" && /* @__PURE__ */ React83.createElement(CaretsInVertical, { size: "sm" }), expansionVariant === "closed" && /* @__PURE__ */ React83.createElement(CaretsOutVertical, { size: "sm" }), expansionVariant === "tierOne" && (onSSDR ? /* @__PURE__ */ React83.createElement(CaretsInVertical, { size: "sm" }) : /* @__PURE__ */ React83.createElement(CaretsOutVerticalWithLine, { size: "sm" })))
|
|
56494
56495
|
),
|
|
56495
|
-
isFirstColumn2 && headerCheckboxSelectionEnabled && /* @__PURE__ */
|
|
56496
|
+
isFirstColumn2 && headerCheckboxSelectionEnabled && /* @__PURE__ */ React83.createElement(
|
|
56496
56497
|
Checkbox,
|
|
56497
56498
|
{
|
|
56498
56499
|
"data-qa": "select-all-checkbox",
|
|
@@ -56504,14 +56505,14 @@ var GenericHeaderRenderer = (props) => {
|
|
|
56504
56505
|
onChange: toggleSelectAll
|
|
56505
56506
|
}
|
|
56506
56507
|
),
|
|
56507
|
-
/* @__PURE__ */
|
|
56508
|
+
/* @__PURE__ */ React83.createElement("div", { className: "ag-header-cell-label" }, /* @__PURE__ */ React83.createElement(
|
|
56508
56509
|
Tooltip,
|
|
56509
56510
|
{
|
|
56510
56511
|
trigger: isOverflowing ? "hover" : "none",
|
|
56511
|
-
overlay: /* @__PURE__ */
|
|
56512
|
+
overlay: /* @__PURE__ */ React83.createElement(Tooltip.Content, null, /* @__PURE__ */ React83.createElement("span", null, props.displayName))
|
|
56512
56513
|
},
|
|
56513
|
-
/* @__PURE__ */
|
|
56514
|
-
), HeaderNode && /* @__PURE__ */
|
|
56514
|
+
/* @__PURE__ */ React83.createElement("div", null, /* @__PURE__ */ React83.createElement("span", { ref, className: "data-table-header-display-name" }, props.displayName))
|
|
56515
|
+
), HeaderNode && /* @__PURE__ */ React83.createElement(
|
|
56515
56516
|
Flex,
|
|
56516
56517
|
{
|
|
56517
56518
|
marginLeft: "sm",
|
|
@@ -56519,15 +56520,15 @@ var GenericHeaderRenderer = (props) => {
|
|
|
56519
56520
|
justifyContent: "center",
|
|
56520
56521
|
style: { width: "24px" }
|
|
56521
56522
|
},
|
|
56522
|
-
/* @__PURE__ */
|
|
56523
|
+
/* @__PURE__ */ React83.createElement(
|
|
56523
56524
|
HeaderNode,
|
|
56524
56525
|
{
|
|
56525
56526
|
columnDefinition: transformToColumnDefinition(colDef)
|
|
56526
56527
|
}
|
|
56527
56528
|
)
|
|
56528
|
-
), props.enableSorting && /* @__PURE__ */
|
|
56529
|
+
), props.enableSorting && /* @__PURE__ */ React83.createElement(SortComponent, { ...props }))
|
|
56529
56530
|
),
|
|
56530
|
-
props.enableMenu && /* @__PURE__ */
|
|
56531
|
+
props.enableMenu && /* @__PURE__ */ React83.createElement(
|
|
56531
56532
|
DropdownFlyout,
|
|
56532
56533
|
{
|
|
56533
56534
|
className: "data-table-header-menu",
|
|
@@ -56546,14 +56547,14 @@ var GenericHeaderRenderer = (props) => {
|
|
|
56546
56547
|
function GenericColumnGroupHeader(props) {
|
|
56547
56548
|
const I18n = useI18nContext();
|
|
56548
56549
|
const { expanded: initialExpanded, expandable } = props.columnGroup.providedColumnGroup;
|
|
56549
|
-
const [isExpanded, setIsExpanded] =
|
|
56550
|
-
|
|
56550
|
+
const [isExpanded, setIsExpanded] = React83.useState(initialExpanded);
|
|
56551
|
+
React83.useEffect(() => {
|
|
56551
56552
|
props.setExpanded(isExpanded);
|
|
56552
56553
|
}, [isExpanded]);
|
|
56553
56554
|
if (!props.displayName) {
|
|
56554
56555
|
return null;
|
|
56555
56556
|
}
|
|
56556
|
-
return /* @__PURE__ */
|
|
56557
|
+
return /* @__PURE__ */ React83.createElement(React83.Fragment, null, /* @__PURE__ */ React83.createElement("div", { className: "ag-header-group-cell-label", role: "presentation" }, /* @__PURE__ */ React83.createElement("span", { className: "ag-header-group-text", role: "presentation" }, props.displayName)), expandable && /* @__PURE__ */ React83.createElement(
|
|
56557
56558
|
Tooltip,
|
|
56558
56559
|
{
|
|
56559
56560
|
hideDelay: tooltipDelay.hide,
|
|
@@ -56562,13 +56563,13 @@ function GenericColumnGroupHeader(props) {
|
|
|
56562
56563
|
`dataTable.columnGroupToggle.${isExpanded ? "collapse" : "expand"}`
|
|
56563
56564
|
)
|
|
56564
56565
|
},
|
|
56565
|
-
/* @__PURE__ */
|
|
56566
|
+
/* @__PURE__ */ React83.createElement(
|
|
56566
56567
|
"div",
|
|
56567
56568
|
{
|
|
56568
56569
|
className: "expand-button",
|
|
56569
56570
|
onClick: () => setIsExpanded((v) => !v)
|
|
56570
56571
|
},
|
|
56571
|
-
isExpanded ? /* @__PURE__ */
|
|
56572
|
+
isExpanded ? /* @__PURE__ */ React83.createElement(CaretsIn, { size: "sm" }) : /* @__PURE__ */ React83.createElement(CaretsOut, { size: "sm" })
|
|
56572
56573
|
)
|
|
56573
56574
|
));
|
|
56574
56575
|
}
|
|
@@ -56589,8 +56590,8 @@ var getPaginationPageStartEnd = ({
|
|
|
56589
56590
|
|
|
56590
56591
|
// src/utils/cellHelpers.tsx
|
|
56591
56592
|
function withDataTableEditor(Component4, editorType) {
|
|
56592
|
-
return
|
|
56593
|
-
(agGridProps, ref) => /* @__PURE__ */
|
|
56593
|
+
return React83.forwardRef(
|
|
56594
|
+
(agGridProps, ref) => /* @__PURE__ */ React83.createElement(
|
|
56594
56595
|
DataTableCellEditor,
|
|
56595
56596
|
{
|
|
56596
56597
|
...agGridProps,
|
|
@@ -56602,7 +56603,7 @@ function withDataTableEditor(Component4, editorType) {
|
|
|
56602
56603
|
);
|
|
56603
56604
|
}
|
|
56604
56605
|
function withDataTableRenderer(Component4, editorType) {
|
|
56605
|
-
return ({ colDef, ...agGridProps }) => /* @__PURE__ */
|
|
56606
|
+
return ({ colDef, ...agGridProps }) => /* @__PURE__ */ React83.createElement(
|
|
56606
56607
|
DataTableCellRenderer,
|
|
56607
56608
|
{
|
|
56608
56609
|
...agGridProps,
|
|
@@ -56637,17 +56638,17 @@ function CustomLoader(params) {
|
|
|
56637
56638
|
const I18n = useI18nContext();
|
|
56638
56639
|
const groupNodes = getGroupNodes(params);
|
|
56639
56640
|
if (params.node === groupNodes.firstLoading) {
|
|
56640
|
-
return /* @__PURE__ */
|
|
56641
|
+
return /* @__PURE__ */ React83.createElement(Flex, { style: { paddingLeft: "16px" } }, /* @__PURE__ */ React83.createElement(
|
|
56641
56642
|
LevelIndents,
|
|
56642
56643
|
{
|
|
56643
56644
|
level: params.node.level,
|
|
56644
56645
|
lastRowInGroup: params.node === groupNodes.last
|
|
56645
56646
|
}
|
|
56646
|
-
), /* @__PURE__ */
|
|
56647
|
+
), /* @__PURE__ */ React83.createElement(Spinner, { loading: true, size: "sm" }), /* @__PURE__ */ React83.createElement(Box, { paddingLeft: "sm" }, /* @__PURE__ */ React83.createElement(Typography, { color: "gray15", italic: true, intent: "small" }, I18n.t(
|
|
56647
56648
|
`dataTable.loading.${params.node === groupNodes.first ? "initial" : "secondary"}`
|
|
56648
56649
|
))));
|
|
56649
56650
|
}
|
|
56650
|
-
return /* @__PURE__ */
|
|
56651
|
+
return /* @__PURE__ */ React83.createElement(LevelIndents, { level: params.node.level, lastRowInGroup: false });
|
|
56651
56652
|
}
|
|
56652
56653
|
var DefaultFrameworkComponents = {
|
|
56653
56654
|
agColumnHeader: GenericHeaderRenderer,
|
|
@@ -56761,14 +56762,14 @@ function getId2(func, option) {
|
|
|
56761
56762
|
return func?.(option) ?? option?.id ?? option;
|
|
56762
56763
|
}
|
|
56763
56764
|
var InternalMultiSelectCellRenderer = ({ columnDefinition, rowHeight, value }) => {
|
|
56764
|
-
const ref =
|
|
56765
|
-
|
|
56765
|
+
const ref = React83.useRef();
|
|
56766
|
+
React83.useLayoutEffect(() => {
|
|
56766
56767
|
ref?.current?.setAttribute("title", ref?.current?.innerText);
|
|
56767
56768
|
});
|
|
56768
56769
|
if (value === void 0 || value === null) {
|
|
56769
56770
|
return null;
|
|
56770
56771
|
}
|
|
56771
|
-
return /* @__PURE__ */
|
|
56772
|
+
return /* @__PURE__ */ React83.createElement(
|
|
56772
56773
|
Typography,
|
|
56773
56774
|
{
|
|
56774
56775
|
as: "ol",
|
|
@@ -56785,8 +56786,8 @@ var InternalMultiSelectCellRenderer = ({ columnDefinition, rowHeight, value }) =
|
|
|
56785
56786
|
columnDefinition.cellRendererParams?.getValue,
|
|
56786
56787
|
value,
|
|
56787
56788
|
emptyArray
|
|
56788
|
-
).map((option, idx, arr) => /* @__PURE__ */
|
|
56789
|
-
|
|
56789
|
+
).map((option, idx, arr) => /* @__PURE__ */ React83.createElement(
|
|
56790
|
+
React83.Fragment,
|
|
56790
56791
|
{
|
|
56791
56792
|
key: (
|
|
56792
56793
|
// eslint-disable-next-line react/no-array-index-key
|
|
@@ -56799,7 +56800,7 @@ var InternalMultiSelectCellRenderer = ({ columnDefinition, rowHeight, value }) =
|
|
|
56799
56800
|
)}_idx_${idx}`
|
|
56800
56801
|
)
|
|
56801
56802
|
},
|
|
56802
|
-
/* @__PURE__ */
|
|
56803
|
+
/* @__PURE__ */ React83.createElement("li", null, getLabel2(columnDefinition.cellRendererParams?.getLabel, option), idx !== arr.length - 1 ? commaToken : null)
|
|
56803
56804
|
))
|
|
56804
56805
|
);
|
|
56805
56806
|
};
|
|
@@ -56836,7 +56837,7 @@ function useFilterStorage({
|
|
|
56836
56837
|
initialSelectedFilters = emptyArray2,
|
|
56837
56838
|
getColumnDefinition
|
|
56838
56839
|
}) {
|
|
56839
|
-
const [filtersState, setFiltersState] =
|
|
56840
|
+
const [filtersState, setFiltersState] = React83.useState({
|
|
56840
56841
|
filterable: emptyObj,
|
|
56841
56842
|
filterOptions: emptyObj,
|
|
56842
56843
|
possibleFilters: emptyArray2,
|
|
@@ -56856,10 +56857,10 @@ function useFilterStorage({
|
|
|
56856
56857
|
field
|
|
56857
56858
|
};
|
|
56858
56859
|
}
|
|
56859
|
-
const hasDefinedFilters =
|
|
56860
|
+
const hasDefinedFilters = React83.useMemo(() => {
|
|
56860
56861
|
return Object.keys(filtersState.filterable).length > 0;
|
|
56861
56862
|
}, [filtersState.filterable]);
|
|
56862
|
-
|
|
56863
|
+
React83.useEffect(() => {
|
|
56863
56864
|
const filterableColumns = columnDefinitions.filter(
|
|
56864
56865
|
(col) => col.filterRenderer
|
|
56865
56866
|
);
|
|
@@ -56882,7 +56883,7 @@ function useFilterStorage({
|
|
|
56882
56883
|
selectedFilters: emptyObj
|
|
56883
56884
|
}));
|
|
56884
56885
|
}
|
|
56885
|
-
const setSelectedFilters =
|
|
56886
|
+
const setSelectedFilters = React83.useCallback(
|
|
56886
56887
|
(selectedFilters) => {
|
|
56887
56888
|
setFiltersState((prev) => ({
|
|
56888
56889
|
...prev,
|
|
@@ -57006,13 +57007,13 @@ var EmptyResultsControlTooltip = ({
|
|
|
57006
57007
|
}) => {
|
|
57007
57008
|
const I18n = useI18nContext();
|
|
57008
57009
|
if (!enabled) {
|
|
57009
|
-
return /* @__PURE__ */
|
|
57010
|
+
return /* @__PURE__ */ React83.createElement(React83.Fragment, null, children);
|
|
57010
57011
|
}
|
|
57011
57012
|
const tooltipText = I18n.t(`dataTable.emptyState.noResults.tooltip`, {
|
|
57012
57013
|
tableName: I18n.t(`tableName`) || I18n.t(`dataTable.emptyState.noResults.tableNameFallback`),
|
|
57013
57014
|
featureName: I18n.t(`dataTable.emptyState.noResults.${featureI18nKey}`)
|
|
57014
57015
|
});
|
|
57015
|
-
return /* @__PURE__ */
|
|
57016
|
+
return /* @__PURE__ */ React83.createElement(Tooltip, { placement: "bottom", trigger: "hover", overlay: tooltipText }, /* @__PURE__ */ React83.createElement("span", null, children));
|
|
57016
57017
|
};
|
|
57017
57018
|
|
|
57018
57019
|
// src/QuickControls/quickControlsStyles.scss
|
|
@@ -57053,7 +57054,7 @@ var quickControlsStyles_default = {
|
|
|
57053
57054
|
// src/QuickControls/ServerSideSearch.tsx
|
|
57054
57055
|
var cx17 = classnames.bind(quickControlsStyles_default);
|
|
57055
57056
|
function useSearchStorage() {
|
|
57056
|
-
const [searchValue, setSearchValue] =
|
|
57057
|
+
const [searchValue, setSearchValue] = React83.useState("");
|
|
57057
57058
|
return { searchValue, setSearchValue };
|
|
57058
57059
|
}
|
|
57059
57060
|
var defaultSearchStorage = {
|
|
@@ -57065,16 +57066,16 @@ var ServerSideSearch = ({
|
|
|
57065
57066
|
placeholder,
|
|
57066
57067
|
disabled = false
|
|
57067
57068
|
}) => {
|
|
57068
|
-
const [internalValue, setInternalValue] =
|
|
57069
|
+
const [internalValue, setInternalValue] = React83.useState("");
|
|
57069
57070
|
const { updateServerSideDataSource } = useInternalTableContext();
|
|
57070
57071
|
const I18n = useI18nContext();
|
|
57071
|
-
const debouncedSetSearchValue =
|
|
57072
|
+
const debouncedSetSearchValue = React83.useCallback(
|
|
57072
57073
|
debounce2((value) => {
|
|
57073
57074
|
updateServerSideDataSource({ search: value });
|
|
57074
57075
|
}, 250),
|
|
57075
57076
|
[updateServerSideDataSource]
|
|
57076
57077
|
);
|
|
57077
|
-
const onChange =
|
|
57078
|
+
const onChange = React83.useCallback(
|
|
57078
57079
|
(value, event) => {
|
|
57079
57080
|
setInternalValue(value);
|
|
57080
57081
|
if (onSearch) {
|
|
@@ -57085,13 +57086,13 @@ var ServerSideSearch = ({
|
|
|
57085
57086
|
},
|
|
57086
57087
|
[debouncedSetSearchValue, onSearch]
|
|
57087
57088
|
);
|
|
57088
|
-
return /* @__PURE__ */
|
|
57089
|
+
return /* @__PURE__ */ React83.createElement(
|
|
57089
57090
|
EmptyResultsControlTooltip,
|
|
57090
57091
|
{
|
|
57091
57092
|
featureI18nKey: "featureSearch",
|
|
57092
57093
|
enabled: disabled
|
|
57093
57094
|
},
|
|
57094
|
-
/* @__PURE__ */
|
|
57095
|
+
/* @__PURE__ */ React83.createElement(
|
|
57095
57096
|
Typeahead,
|
|
57096
57097
|
{
|
|
57097
57098
|
disabled,
|
|
@@ -57105,7 +57106,7 @@ var ServerSideSearch = ({
|
|
|
57105
57106
|
};
|
|
57106
57107
|
|
|
57107
57108
|
// src/utils/internalTableContext.ts
|
|
57108
|
-
var InternalTableContext =
|
|
57109
|
+
var InternalTableContext = React83.createContext({
|
|
57109
57110
|
columnDefinitions: [],
|
|
57110
57111
|
contextPanel: {
|
|
57111
57112
|
content: void 0,
|
|
@@ -57151,7 +57152,120 @@ var InternalTableContext = React82.createContext({
|
|
|
57151
57152
|
setTotalRowCount: () => {
|
|
57152
57153
|
}
|
|
57153
57154
|
});
|
|
57154
|
-
var useInternalTableContext = () =>
|
|
57155
|
+
var useInternalTableContext = () => React83.useContext(InternalTableContext);
|
|
57156
|
+
var prng = detectPrng(true);
|
|
57157
|
+
var ulid = factory(prng);
|
|
57158
|
+
var Analytics = class {
|
|
57159
|
+
constructor({
|
|
57160
|
+
bodyParams = {},
|
|
57161
|
+
client,
|
|
57162
|
+
endpoint,
|
|
57163
|
+
headers = {}
|
|
57164
|
+
}) {
|
|
57165
|
+
this.endpoint = endpoint;
|
|
57166
|
+
this.headers = headers;
|
|
57167
|
+
this.bodyParams = bodyParams;
|
|
57168
|
+
this.client = client;
|
|
57169
|
+
this.trackEvent = this.trackEvent.bind(this);
|
|
57170
|
+
}
|
|
57171
|
+
trackEvent(event, properties = {}) {
|
|
57172
|
+
const time = /* @__PURE__ */ new Date();
|
|
57173
|
+
return this.client(this.endpoint, {
|
|
57174
|
+
method: "POST",
|
|
57175
|
+
headers: this.headers,
|
|
57176
|
+
body: JSON.stringify(
|
|
57177
|
+
mergeDeepRight(
|
|
57178
|
+
{
|
|
57179
|
+
key: event,
|
|
57180
|
+
properties,
|
|
57181
|
+
timestamp: time,
|
|
57182
|
+
event_id: ulid(),
|
|
57183
|
+
page_id: ulid()
|
|
57184
|
+
},
|
|
57185
|
+
this.bodyParams
|
|
57186
|
+
)
|
|
57187
|
+
)
|
|
57188
|
+
});
|
|
57189
|
+
}
|
|
57190
|
+
};
|
|
57191
|
+
|
|
57192
|
+
// src/Analytics/Analytics.tsx
|
|
57193
|
+
var defaultTrackEvent = (e, params) => {
|
|
57194
|
+
console.log("analytics::trackEvent", e, params);
|
|
57195
|
+
};
|
|
57196
|
+
var AnalyticsContext = React83.createContext({});
|
|
57197
|
+
function AnalyticsProvider({
|
|
57198
|
+
analytics,
|
|
57199
|
+
children
|
|
57200
|
+
}) {
|
|
57201
|
+
return /* @__PURE__ */ React83.createElement(
|
|
57202
|
+
AnalyticsContext.Provider,
|
|
57203
|
+
{
|
|
57204
|
+
value: { trackEvent: analytics?.trackEvent || defaultTrackEvent }
|
|
57205
|
+
},
|
|
57206
|
+
children
|
|
57207
|
+
);
|
|
57208
|
+
}
|
|
57209
|
+
var isAnalyticsHydrated = (analytics) => {
|
|
57210
|
+
return Object.keys(analytics).length > 0;
|
|
57211
|
+
};
|
|
57212
|
+
var useAnalyticsContext = () => {
|
|
57213
|
+
const context = React83.useContext(AnalyticsContext);
|
|
57214
|
+
if (!isAnalyticsHydrated(context)) {
|
|
57215
|
+
throw new Error("Must wrap app in Analytics.Provider");
|
|
57216
|
+
}
|
|
57217
|
+
return context;
|
|
57218
|
+
};
|
|
57219
|
+
var Analytics_default = {
|
|
57220
|
+
Client: Analytics,
|
|
57221
|
+
Consumer: AnalyticsContext.Consumer,
|
|
57222
|
+
Provider: AnalyticsProvider,
|
|
57223
|
+
Context: AnalyticsContext
|
|
57224
|
+
};
|
|
57225
|
+
var prng2 = detectPrng(true);
|
|
57226
|
+
var ulid2 = factory(prng2);
|
|
57227
|
+
var AnalyticsBulkClient = class extends Analytics_default.Client {
|
|
57228
|
+
constructor({
|
|
57229
|
+
projectId,
|
|
57230
|
+
bulkEndpoint,
|
|
57231
|
+
bodyParams = {},
|
|
57232
|
+
headers = {},
|
|
57233
|
+
...coreAnalyticsConfig
|
|
57234
|
+
}) {
|
|
57235
|
+
super({ ...coreAnalyticsConfig, bodyParams, headers });
|
|
57236
|
+
this.events = [];
|
|
57237
|
+
this.projectId = projectId;
|
|
57238
|
+
this.bulkEndpoint = bulkEndpoint;
|
|
57239
|
+
}
|
|
57240
|
+
addEvent(event, properties) {
|
|
57241
|
+
this.events.push({
|
|
57242
|
+
key: event,
|
|
57243
|
+
properties,
|
|
57244
|
+
timestamp: /* @__PURE__ */ new Date(),
|
|
57245
|
+
project_id: this.projectId,
|
|
57246
|
+
event_id: ulid2(),
|
|
57247
|
+
page_id: ulid2()
|
|
57248
|
+
});
|
|
57249
|
+
}
|
|
57250
|
+
async sendAllEvents() {
|
|
57251
|
+
if (this.events.length === 0) {
|
|
57252
|
+
return;
|
|
57253
|
+
}
|
|
57254
|
+
const body = {
|
|
57255
|
+
analytic_events: this.events,
|
|
57256
|
+
project_id: this.projectId
|
|
57257
|
+
};
|
|
57258
|
+
try {
|
|
57259
|
+
await this.client(this.bulkEndpoint, {
|
|
57260
|
+
method: "POST",
|
|
57261
|
+
headers: this.headers,
|
|
57262
|
+
body: JSON.stringify(body)
|
|
57263
|
+
});
|
|
57264
|
+
} catch {
|
|
57265
|
+
}
|
|
57266
|
+
this.events = [];
|
|
57267
|
+
}
|
|
57268
|
+
};
|
|
57155
57269
|
|
|
57156
57270
|
// ../../node_modules/@ag-grid-community/client-side-row-model/dist/esm/es6/clientSideRowModel/clientSideNodeManager.mjs
|
|
57157
57271
|
var ClientSideNodeManager = class _ClientSideNodeManager {
|
|
@@ -58786,9 +58900,9 @@ var getSelectedRows = ({
|
|
|
58786
58900
|
return gridApi?.getModel().getType() === "serverSide" ? serverSideRows : gridApi?.getSelectedNodes() ?? [];
|
|
58787
58901
|
};
|
|
58788
58902
|
var useRowSelectionState = () => {
|
|
58789
|
-
const [selectedRows, setSelectedRows] =
|
|
58903
|
+
const [selectedRows, setSelectedRows] = React83.useState([]);
|
|
58790
58904
|
const { gridApi, rowSelectionRef } = useInternalTableContext();
|
|
58791
|
-
|
|
58905
|
+
React83.useEffect(() => {
|
|
58792
58906
|
function selectionEventFunction() {
|
|
58793
58907
|
if (!gridApi?.destroyCalled) {
|
|
58794
58908
|
setSelectedRows(getSelectedRows({ gridApi, rowSelectionRef }));
|
|
@@ -58810,12 +58924,12 @@ var BulkEditActionButton = (props) => {
|
|
|
58810
58924
|
const { contextPanel } = useInternalTableContext();
|
|
58811
58925
|
const i18n = useI18nContext();
|
|
58812
58926
|
const editActionLabel = props.actionText ?? i18n.t("dataTable.bulkActions.editValues");
|
|
58813
|
-
return /* @__PURE__ */
|
|
58927
|
+
return /* @__PURE__ */ React83.createElement(
|
|
58814
58928
|
Button,
|
|
58815
58929
|
{
|
|
58816
58930
|
"aria-label": i18n.t("dataTable.bulkActions.bulkEdit"),
|
|
58817
58931
|
"data-qa": "bulkEditIcon",
|
|
58818
|
-
icon: /* @__PURE__ */
|
|
58932
|
+
icon: /* @__PURE__ */ React83.createElement(Pencil, null),
|
|
58819
58933
|
onClick: () => contextPanel.show("bulkEdit"),
|
|
58820
58934
|
variant: "tertiary"
|
|
58821
58935
|
},
|
|
@@ -58834,9 +58948,9 @@ var BulkActions = (props) => {
|
|
|
58834
58948
|
} = props;
|
|
58835
58949
|
const selectedRows = useRowSelectionState();
|
|
58836
58950
|
const I18n = useI18nContext();
|
|
58837
|
-
const Children =
|
|
58838
|
-
if (
|
|
58839
|
-
return /* @__PURE__ */
|
|
58951
|
+
const Children = React83.useMemo(() => {
|
|
58952
|
+
if (React83.Children.count(children) === 0) {
|
|
58953
|
+
return /* @__PURE__ */ React83.createElement(
|
|
58840
58954
|
BulkEditActionButton,
|
|
58841
58955
|
{
|
|
58842
58956
|
showLabel: showEditButtonLabel,
|
|
@@ -58853,7 +58967,7 @@ var BulkActions = (props) => {
|
|
|
58853
58967
|
count: selectedRows.length,
|
|
58854
58968
|
number: selectedRows.length > 1 ? I18n.t("dataTable.bulkActions.many") : I18n.t("dataTable.bulkActions.one")
|
|
58855
58969
|
});
|
|
58856
|
-
return /* @__PURE__ */
|
|
58970
|
+
return /* @__PURE__ */ React83.createElement(
|
|
58857
58971
|
Box,
|
|
58858
58972
|
{
|
|
58859
58973
|
padding: "md",
|
|
@@ -58862,8 +58976,8 @@ var BulkActions = (props) => {
|
|
|
58862
58976
|
style: { backgroundColor: ACTION_BAR_BLUE, ...props.style },
|
|
58863
58977
|
"data-qa": "bulkActions"
|
|
58864
58978
|
},
|
|
58865
|
-
/* @__PURE__ */
|
|
58866
|
-
/* @__PURE__ */
|
|
58979
|
+
/* @__PURE__ */ React83.createElement(FlexList, { size: "xs", alignItems: "center" }, Children),
|
|
58980
|
+
/* @__PURE__ */ React83.createElement(FlexList, { size: "xs", alignItems: "center" }, /* @__PURE__ */ React83.createElement(Typography, null, selectedItemsDesc))
|
|
58867
58981
|
);
|
|
58868
58982
|
};
|
|
58869
58983
|
|
|
@@ -63994,12 +64108,12 @@ var ExcelCreator = class ExcelCreator2 extends BaseCreator {
|
|
|
63994
64108
|
return this.packageFile(exportParams);
|
|
63995
64109
|
}
|
|
63996
64110
|
setFactoryMode(factoryMode, exportMode = "xlsx") {
|
|
63997
|
-
const
|
|
63998
|
-
|
|
64111
|
+
const factory3 = exportMode === "xlsx" ? ExcelXlsxFactory : ExcelXmlFactory;
|
|
64112
|
+
factory3.factoryMode = factoryMode;
|
|
63999
64113
|
}
|
|
64000
64114
|
getFactoryMode(exportMode) {
|
|
64001
|
-
const
|
|
64002
|
-
return
|
|
64115
|
+
const factory3 = exportMode === "xlsx" ? ExcelXlsxFactory : ExcelXmlFactory;
|
|
64116
|
+
return factory3.factoryMode;
|
|
64003
64117
|
}
|
|
64004
64118
|
getSheetDataForExcel(params) {
|
|
64005
64119
|
const mergedParams = this.getMergedParams(params);
|
|
@@ -66720,7 +66834,7 @@ var PortalManager = class _PortalManager {
|
|
|
66720
66834
|
}
|
|
66721
66835
|
};
|
|
66722
66836
|
PortalManager.MAX_COMPONENT_CREATION_TIME_IN_MS = 1e3;
|
|
66723
|
-
var BeansContext =
|
|
66837
|
+
var BeansContext = React83.createContext({});
|
|
66724
66838
|
|
|
66725
66839
|
// ../../node_modules/@ag-grid-community/react/lib/reactUi/jsComp.mjs
|
|
66726
66840
|
var showJsComp = (compDetails, context, eParent, ref) => {
|
|
@@ -66914,19 +67028,19 @@ var GroupCellRenderer3 = forwardRef((props, ref) => {
|
|
|
66914
67028
|
const FwRenderer = useFwRenderer ? innerCompDetails.componentClass : void 0;
|
|
66915
67029
|
const useValue = innerCompDetails == null && value != null;
|
|
66916
67030
|
const escapedValue = _.escapeString(value, true);
|
|
66917
|
-
return
|
|
67031
|
+
return React83.createElement(
|
|
66918
67032
|
"span",
|
|
66919
67033
|
Object.assign({ className, ref: setRef2 }, !props.colDef ? { role: "gridcell" } : {}),
|
|
66920
|
-
|
|
66921
|
-
|
|
66922
|
-
|
|
66923
|
-
|
|
67034
|
+
React83.createElement("span", { className: expandedClassName, ref: eExpandedRef }),
|
|
67035
|
+
React83.createElement("span", { className: contractedClassName, ref: eContractedRef }),
|
|
67036
|
+
React83.createElement("span", { className: checkboxClassName, ref: eCheckboxRef }),
|
|
67037
|
+
React83.createElement(
|
|
66924
67038
|
"span",
|
|
66925
67039
|
{ className: "ag-group-value", ref: eValueRef },
|
|
66926
|
-
useValue &&
|
|
66927
|
-
useFwRenderer &&
|
|
67040
|
+
useValue && React83.createElement(React83.Fragment, null, escapedValue),
|
|
67041
|
+
useFwRenderer && React83.createElement(FwRenderer, Object.assign({}, innerCompDetails.params))
|
|
66928
67042
|
),
|
|
66929
|
-
|
|
67043
|
+
React83.createElement("span", { className: "ag-group-child-count" }, childCount)
|
|
66930
67044
|
);
|
|
66931
67045
|
});
|
|
66932
67046
|
var groupCellRenderer_default = GroupCellRenderer3;
|
|
@@ -66983,15 +67097,15 @@ var HeaderCellComp2 = (props) => {
|
|
|
66983
67097
|
}, [userCompDetails]);
|
|
66984
67098
|
const reactUserComp = userCompDetails && userCompDetails.componentFromFramework;
|
|
66985
67099
|
const UserCompClass = userCompDetails && userCompDetails.componentClass;
|
|
66986
|
-
return
|
|
67100
|
+
return React83.createElement(
|
|
66987
67101
|
"div",
|
|
66988
67102
|
{ ref: setRef2, className: "ag-header-cell", "col-id": colId, role: "columnheader", tabIndex: -1 },
|
|
66989
|
-
|
|
66990
|
-
|
|
67103
|
+
React83.createElement("div", { ref: eResize, className: "ag-header-cell-resize", role: "presentation" }),
|
|
67104
|
+
React83.createElement(
|
|
66991
67105
|
"div",
|
|
66992
67106
|
{ ref: eHeaderCompWrapper, className: "ag-header-cell-comp-wrapper", role: "presentation" },
|
|
66993
|
-
reactUserComp && userCompStateless &&
|
|
66994
|
-
reactUserComp && !userCompStateless &&
|
|
67107
|
+
reactUserComp && userCompStateless && React83.createElement(UserCompClass, Object.assign({}, userCompDetails.params)),
|
|
67108
|
+
reactUserComp && !userCompStateless && React83.createElement(UserCompClass, Object.assign({}, userCompDetails.params, { ref: userCompRef }))
|
|
66995
67109
|
)
|
|
66996
67110
|
);
|
|
66997
67111
|
};
|
|
@@ -67038,11 +67152,11 @@ var HeaderGroupCellComp2 = (props) => {
|
|
|
67038
67152
|
const resizableClassName = useMemo(() => "ag-header-cell-resize " + cssResizableClasses.toString(), [cssResizableClasses]);
|
|
67039
67153
|
const reactUserComp = userCompDetails && userCompDetails.componentFromFramework;
|
|
67040
67154
|
const UserCompClass = userCompDetails && userCompDetails.componentClass;
|
|
67041
|
-
return
|
|
67155
|
+
return React83.createElement(
|
|
67042
67156
|
"div",
|
|
67043
67157
|
{ ref: setRef2, className, "col-id": colId, role: "columnheader", tabIndex: -1, "aria-expanded": ariaExpanded },
|
|
67044
|
-
reactUserComp &&
|
|
67045
|
-
|
|
67158
|
+
reactUserComp && React83.createElement(UserCompClass, Object.assign({}, userCompDetails.params)),
|
|
67159
|
+
React83.createElement("div", { ref: eResize, "aria-hidden": resizableAriaHidden, className: resizableClassName })
|
|
67046
67160
|
);
|
|
67047
67161
|
};
|
|
67048
67162
|
var headerGroupCellComp_default = memo(HeaderGroupCellComp2);
|
|
@@ -67105,19 +67219,19 @@ var HeaderFilterCellComp2 = (props) => {
|
|
|
67105
67219
|
}, [userCompDetails]);
|
|
67106
67220
|
const reactUserComp = userCompDetails && userCompDetails.componentFromFramework;
|
|
67107
67221
|
const UserCompClass = userCompDetails && userCompDetails.componentClass;
|
|
67108
|
-
return
|
|
67222
|
+
return React83.createElement(
|
|
67109
67223
|
"div",
|
|
67110
67224
|
{ ref: setRef2, className, role: "gridcell", tabIndex: -1 },
|
|
67111
|
-
|
|
67225
|
+
React83.createElement(
|
|
67112
67226
|
"div",
|
|
67113
67227
|
{ ref: eFloatingFilterBody, className: bodyClassName, role: "presentation" },
|
|
67114
|
-
reactUserComp && userCompStateless &&
|
|
67115
|
-
reactUserComp && !userCompStateless &&
|
|
67228
|
+
reactUserComp && userCompStateless && React83.createElement(UserCompClass, Object.assign({}, userCompDetails.params)),
|
|
67229
|
+
reactUserComp && !userCompStateless && React83.createElement(UserCompClass, Object.assign({}, userCompDetails.params, { ref: userCompRef }))
|
|
67116
67230
|
),
|
|
67117
|
-
|
|
67231
|
+
React83.createElement(
|
|
67118
67232
|
"div",
|
|
67119
67233
|
{ ref: eButtonWrapper, "aria-hidden": buttonWrapperAriaHidden, className: buttonWrapperClassName, role: "presentation" },
|
|
67120
|
-
|
|
67234
|
+
React83.createElement("button", { ref: eButtonShowMainFilter, type: "button", className: "ag-button ag-floating-filter-button-button", tabIndex: -1 })
|
|
67121
67235
|
)
|
|
67122
67236
|
);
|
|
67123
67237
|
};
|
|
@@ -67159,14 +67273,14 @@ var HeaderRowComp2 = (props) => {
|
|
|
67159
67273
|
const createCellJsx = useCallback((cellCtrl) => {
|
|
67160
67274
|
switch (ctrl.getType()) {
|
|
67161
67275
|
case HeaderRowType.COLUMN_GROUP:
|
|
67162
|
-
return
|
|
67276
|
+
return React83.createElement(headerGroupCellComp_default, { ctrl: cellCtrl, key: cellCtrl.getInstanceId() });
|
|
67163
67277
|
case HeaderRowType.FLOATING_FILTER:
|
|
67164
|
-
return
|
|
67278
|
+
return React83.createElement(headerFilterCellComp_default, { ctrl: cellCtrl, key: cellCtrl.getInstanceId() });
|
|
67165
67279
|
default:
|
|
67166
|
-
return
|
|
67280
|
+
return React83.createElement(headerCellComp_default, { ctrl: cellCtrl, key: cellCtrl.getInstanceId() });
|
|
67167
67281
|
}
|
|
67168
67282
|
}, []);
|
|
67169
|
-
return
|
|
67283
|
+
return React83.createElement("div", { ref: setRef2, className, role: "row", style: style2, "aria-rowindex": ariaRowIndex }, cellCtrls.map(createCellJsx));
|
|
67170
67284
|
};
|
|
67171
67285
|
var headerRowComp_default = memo(HeaderRowComp2);
|
|
67172
67286
|
|
|
@@ -67219,16 +67333,16 @@ var HeaderRowContainerComp2 = (props) => {
|
|
|
67219
67333
|
headerRowCtrlRef.current.setComp(compProxy, eGui.current);
|
|
67220
67334
|
}, []);
|
|
67221
67335
|
const className = useMemo(() => cssClasses.toString(), [cssClasses]);
|
|
67222
|
-
const insertRowsJsx = () => headerRowCtrls.map((ctrl) =>
|
|
67223
|
-
return
|
|
67224
|
-
|
|
67336
|
+
const insertRowsJsx = () => headerRowCtrls.map((ctrl) => React83.createElement(headerRowComp_default, { ctrl, key: ctrl.getInstanceId() }));
|
|
67337
|
+
return React83.createElement(
|
|
67338
|
+
React83.Fragment,
|
|
67225
67339
|
null,
|
|
67226
|
-
pinnedLeft &&
|
|
67227
|
-
pinnedRight &&
|
|
67228
|
-
centre &&
|
|
67340
|
+
pinnedLeft && React83.createElement("div", { ref: setRef2, className: "ag-pinned-left-header " + className, "aria-hidden": ariaHidden, role: "presentation" }, insertRowsJsx()),
|
|
67341
|
+
pinnedRight && React83.createElement("div", { ref: setRef2, className: "ag-pinned-right-header " + className, "aria-hidden": ariaHidden, role: "presentation" }, insertRowsJsx()),
|
|
67342
|
+
centre && React83.createElement(
|
|
67229
67343
|
"div",
|
|
67230
67344
|
{ ref: setRef2, className: "ag-header-viewport " + className, role: "presentation" },
|
|
67231
|
-
|
|
67345
|
+
React83.createElement("div", { ref: eCenterContainer, className: "ag-header-container", role: "rowgroup" }, insertRowsJsx())
|
|
67232
67346
|
)
|
|
67233
67347
|
);
|
|
67234
67348
|
};
|
|
@@ -67263,12 +67377,12 @@ var GridHeaderComp2 = () => {
|
|
|
67263
67377
|
height,
|
|
67264
67378
|
minHeight: height
|
|
67265
67379
|
}), [height]);
|
|
67266
|
-
return
|
|
67380
|
+
return React83.createElement(
|
|
67267
67381
|
"div",
|
|
67268
67382
|
{ ref: setRef2, className, style: style2, role: "presentation" },
|
|
67269
|
-
|
|
67270
|
-
|
|
67271
|
-
|
|
67383
|
+
React83.createElement(headerRowContainerComp_default, { pinned: "left" }),
|
|
67384
|
+
React83.createElement(headerRowContainerComp_default, { pinned: null }),
|
|
67385
|
+
React83.createElement(headerRowContainerComp_default, { pinned: "right" })
|
|
67272
67386
|
);
|
|
67273
67387
|
};
|
|
67274
67388
|
var gridHeaderComp_default = memo(GridHeaderComp2);
|
|
@@ -67362,7 +67476,7 @@ var PopupEditorComp = (props) => {
|
|
|
67362
67476
|
context.destroyBean(wrapper);
|
|
67363
67477
|
};
|
|
67364
67478
|
});
|
|
67365
|
-
return
|
|
67479
|
+
return React83.createElement(React83.Fragment, null, popupEditorWrapper && props.wrappedContent && createPortal(props.wrappedContent, popupEditorWrapper.getGui()));
|
|
67366
67480
|
};
|
|
67367
67481
|
var popupEditorComp_default = memo(PopupEditorComp);
|
|
67368
67482
|
var useJsCellRenderer = (showDetails, showTools, eCellValue, cellValueVersion, jsCellRendererRef, eGui) => {
|
|
@@ -67444,12 +67558,12 @@ var jsxEditValue = (editDetails, setInlineCellEditorRef, setPopupCellEditorRef,
|
|
|
67444
67558
|
const reactInlineEditor = compDetails.componentFromFramework && !editDetails.popup;
|
|
67445
67559
|
const reactPopupEditor = compDetails.componentFromFramework && editDetails.popup;
|
|
67446
67560
|
const jsPopupEditor = !compDetails.componentFromFramework && editDetails.popup;
|
|
67447
|
-
return
|
|
67448
|
-
|
|
67561
|
+
return React83.createElement(
|
|
67562
|
+
React83.Fragment,
|
|
67449
67563
|
null,
|
|
67450
|
-
reactInlineEditor &&
|
|
67451
|
-
reactPopupEditor &&
|
|
67452
|
-
jsPopupEditor && jsEditorComp &&
|
|
67564
|
+
reactInlineEditor && React83.createElement(CellEditorClass, Object.assign({}, editDetails.compDetails.params, { ref: setInlineCellEditorRef })),
|
|
67565
|
+
reactPopupEditor && React83.createElement(popupEditorComp_default, { editDetails, cellCtrl, eParentCell: eGui, wrappedContent: React83.createElement(CellEditorClass, Object.assign({}, editDetails.compDetails.params, { ref: setPopupCellEditorRef })) }),
|
|
67566
|
+
jsPopupEditor && jsEditorComp && React83.createElement(popupEditorComp_default, { editDetails, cellCtrl, eParentCell: eGui, jsChildComp: jsEditorComp })
|
|
67453
67567
|
);
|
|
67454
67568
|
};
|
|
67455
67569
|
var jsxShowValue = (showDetails, key, parentId, cellRendererRef, showCellWrapper, reactCellRendererStateless, setECellValue) => {
|
|
@@ -67458,14 +67572,14 @@ var jsxShowValue = (showDetails, key, parentId, cellRendererRef, showCellWrapper
|
|
|
67458
67572
|
const reactCellRenderer = compDetails && compDetails.componentFromFramework;
|
|
67459
67573
|
const CellRendererClass = compDetails && compDetails.componentClass;
|
|
67460
67574
|
const valueForNoCellRenderer = (value === null || value === void 0 ? void 0 : value.toString) ? value.toString() : value;
|
|
67461
|
-
const bodyJsxFunc = () =>
|
|
67462
|
-
|
|
67575
|
+
const bodyJsxFunc = () => React83.createElement(
|
|
67576
|
+
React83.Fragment,
|
|
67463
67577
|
null,
|
|
67464
|
-
noCellRenderer &&
|
|
67465
|
-
reactCellRenderer && !reactCellRendererStateless &&
|
|
67466
|
-
reactCellRenderer && reactCellRendererStateless &&
|
|
67578
|
+
noCellRenderer && React83.createElement(React83.Fragment, null, valueForNoCellRenderer),
|
|
67579
|
+
reactCellRenderer && !reactCellRendererStateless && React83.createElement(CellRendererClass, Object.assign({}, compDetails.params, { key, ref: cellRendererRef })),
|
|
67580
|
+
reactCellRenderer && reactCellRendererStateless && React83.createElement(CellRendererClass, Object.assign({}, compDetails.params, { key }))
|
|
67467
67581
|
);
|
|
67468
|
-
return
|
|
67582
|
+
return React83.createElement(React83.Fragment, null, showCellWrapper ? React83.createElement("span", { role: "presentation", id: `cell-${parentId}`, className: "ag-cell-value", ref: setECellValue }, bodyJsxFunc()) : bodyJsxFunc());
|
|
67469
67583
|
};
|
|
67470
67584
|
var CellComp2 = (props) => {
|
|
67471
67585
|
const { context } = useContext(BeansContext);
|
|
@@ -67662,13 +67776,13 @@ var CellComp2 = (props) => {
|
|
|
67662
67776
|
eGui.current.focus({ preventScroll: true });
|
|
67663
67777
|
}
|
|
67664
67778
|
});
|
|
67665
|
-
const showContents = () =>
|
|
67666
|
-
|
|
67779
|
+
const showContents = () => React83.createElement(
|
|
67780
|
+
React83.Fragment,
|
|
67667
67781
|
null,
|
|
67668
67782
|
renderDetails != null && jsxShowValue(renderDetails, renderKey, cellInstanceId, cellRendererRef, showCellWrapper, reactCellRendererStateless, setCellValueRef),
|
|
67669
67783
|
editDetails != null && jsxEditValue(editDetails, setInlineCellEditorRef, setPopupCellEditorRef, eGui.current, cellCtrl, jsEditorComp)
|
|
67670
67784
|
);
|
|
67671
|
-
return
|
|
67785
|
+
return React83.createElement("div", { ref: setRef2, style: userStyles, tabIndex, role: "gridcell", "col-id": colId }, showCellWrapper ? React83.createElement("div", { className: "ag-cell-wrapper", role: "presentation", ref: setCellWrapperRef }, showContents()) : showContents());
|
|
67672
67786
|
};
|
|
67673
67787
|
var cellComp_default = memo(CellComp2);
|
|
67674
67788
|
|
|
@@ -67760,17 +67874,17 @@ var RowComp2 = (params) => {
|
|
|
67760
67874
|
const res = (fullWidthCompDetails === null || fullWidthCompDetails === void 0 ? void 0 : fullWidthCompDetails.componentFromFramework) && isComponentStateless(fullWidthCompDetails.componentClass);
|
|
67761
67875
|
return !!res;
|
|
67762
67876
|
}, [fullWidthCompDetails]);
|
|
67763
|
-
const showCellsJsx = () => cellCtrls === null || cellCtrls === void 0 ? void 0 : cellCtrls.map((cellCtrl) =>
|
|
67877
|
+
const showCellsJsx = () => cellCtrls === null || cellCtrls === void 0 ? void 0 : cellCtrls.map((cellCtrl) => React83.createElement(cellComp_default, { cellCtrl, editingRow: rowCtrl.isEditing(), printLayout: rowCtrl.isPrintLayout(), key: cellCtrl.getInstanceId() }));
|
|
67764
67878
|
const showFullWidthFrameworkJsx = () => {
|
|
67765
67879
|
const FullWidthComp = fullWidthCompDetails.componentClass;
|
|
67766
|
-
return
|
|
67767
|
-
|
|
67880
|
+
return React83.createElement(
|
|
67881
|
+
React83.Fragment,
|
|
67768
67882
|
null,
|
|
67769
|
-
reactFullWidthCellRendererStateless &&
|
|
67770
|
-
!reactFullWidthCellRendererStateless &&
|
|
67883
|
+
reactFullWidthCellRendererStateless && React83.createElement(FullWidthComp, Object.assign({}, fullWidthCompDetails.params)),
|
|
67884
|
+
!reactFullWidthCellRendererStateless && React83.createElement(FullWidthComp, Object.assign({}, fullWidthCompDetails.params, { ref: fullWidthCompRef }))
|
|
67771
67885
|
);
|
|
67772
67886
|
};
|
|
67773
|
-
return
|
|
67887
|
+
return React83.createElement(
|
|
67774
67888
|
"div",
|
|
67775
67889
|
{ ref: setRef2, role: "row", style: rowStyles, "row-index": rowIndex, "row-id": rowId, "row-business-key": rowBusinessKey, tabIndex },
|
|
67776
67890
|
showCells && showCellsJsx(),
|
|
@@ -67872,16 +67986,16 @@ var RowContainerComp2 = (params) => {
|
|
|
67872
67986
|
eWrapper.current = e;
|
|
67873
67987
|
setRef2();
|
|
67874
67988
|
}, [setRef2]);
|
|
67875
|
-
const buildContainer = () =>
|
|
67876
|
-
return
|
|
67877
|
-
|
|
67989
|
+
const buildContainer = () => React83.createElement("div", { className: containerClasses, ref: setContainerRef, role: rowCtrlsOrdered.length ? "rowgroup" : "presentation" }, rowCtrlsOrdered.map((rowCtrl) => React83.createElement(rowComp_default, { rowCtrl, containerType, key: rowCtrl.getInstanceId() })));
|
|
67990
|
+
return React83.createElement(
|
|
67991
|
+
React83.Fragment,
|
|
67878
67992
|
null,
|
|
67879
|
-
template1 &&
|
|
67993
|
+
template1 && React83.createElement(
|
|
67880
67994
|
"div",
|
|
67881
67995
|
{ className: wrapperClasses, ref: setWrapperRef, role: "presentation" },
|
|
67882
|
-
|
|
67996
|
+
React83.createElement("div", { className: viewportClasses, ref: setViewportRef, role: "presentation" }, buildContainer())
|
|
67883
67997
|
),
|
|
67884
|
-
template2 &&
|
|
67998
|
+
template2 && React83.createElement("div", { className: viewportClasses, ref: setViewportRef, role: "presentation" }, buildContainer()),
|
|
67885
67999
|
template3 && buildContainer()
|
|
67886
68000
|
);
|
|
67887
68001
|
};
|
|
@@ -68013,22 +68127,22 @@ var GridBodyComp2 = () => {
|
|
|
68013
68127
|
display: bottomDisplay,
|
|
68014
68128
|
overflowY: topAndBottomOverflowY
|
|
68015
68129
|
}), [bottomHeight, bottomDisplay, topAndBottomOverflowY]);
|
|
68016
|
-
const createRowContainer = (container) =>
|
|
68017
|
-
const createSection = ({ section, children, className, style: style2 }) =>
|
|
68018
|
-
return
|
|
68130
|
+
const createRowContainer = (container) => React83.createElement(rowContainerComp_default, { name: container, key: `${container}-container` });
|
|
68131
|
+
const createSection = ({ section, children, className, style: style2 }) => React83.createElement("div", { ref: section, className, role: "presentation", style: style2 }, children.map(createRowContainer));
|
|
68132
|
+
return React83.createElement(
|
|
68019
68133
|
"div",
|
|
68020
68134
|
{ ref: setRef2, className: rootClasses, role: "treegrid" },
|
|
68021
|
-
|
|
68135
|
+
React83.createElement(gridHeaderComp_default, null),
|
|
68022
68136
|
createSection({ section: eTop, className: topClasses, style: topStyle, children: [
|
|
68023
68137
|
RowContainerName.TOP_LEFT,
|
|
68024
68138
|
RowContainerName.TOP_CENTER,
|
|
68025
68139
|
RowContainerName.TOP_RIGHT,
|
|
68026
68140
|
RowContainerName.TOP_FULL_WIDTH
|
|
68027
68141
|
] }),
|
|
68028
|
-
|
|
68142
|
+
React83.createElement(
|
|
68029
68143
|
"div",
|
|
68030
68144
|
{ className: bodyClasses, ref: eBody, role: "presentation" },
|
|
68031
|
-
|
|
68145
|
+
React83.createElement("div", { className: bodyClipperClasses, role: "presentation" }, createSection({
|
|
68032
68146
|
section: eBodyViewport,
|
|
68033
68147
|
className: bodyViewportClasses,
|
|
68034
68148
|
children: [
|
|
@@ -68107,10 +68221,10 @@ var TabGuardCompRef = (props, forwardRef4) => {
|
|
|
68107
68221
|
}, [setupCtrl]);
|
|
68108
68222
|
const createTabGuard = (side) => {
|
|
68109
68223
|
const className = side === "top" ? TabGuardClassNames.TAB_GUARD_TOP : TabGuardClassNames.TAB_GUARD_BOTTOM;
|
|
68110
|
-
return
|
|
68224
|
+
return React83.createElement("div", { className: `${TabGuardClassNames.TAB_GUARD} ${className}`, role: "presentation", ref: side === "top" ? setTopRef : setBottomRef });
|
|
68111
68225
|
};
|
|
68112
|
-
return
|
|
68113
|
-
|
|
68226
|
+
return React83.createElement(
|
|
68227
|
+
React83.Fragment,
|
|
68114
68228
|
null,
|
|
68115
68229
|
createTabGuard("top"),
|
|
68116
68230
|
children,
|
|
@@ -68256,13 +68370,13 @@ var GridComp2 = ({ context }) => {
|
|
|
68256
68370
|
tabGuardRef.current = ref;
|
|
68257
68371
|
setTabGuardReady(ref !== null);
|
|
68258
68372
|
}, []);
|
|
68259
|
-
return
|
|
68373
|
+
return React83.createElement(
|
|
68260
68374
|
"div",
|
|
68261
68375
|
{ ref: setRef2, className: rootWrapperClasses, style: topStyle, role: "presentation" },
|
|
68262
|
-
|
|
68376
|
+
React83.createElement("div", { className: rootWrapperBodyClasses, ref: setGridBodyParent, role: "presentation" }, initialised && eGridBodyParent && beans && React83.createElement(
|
|
68263
68377
|
BeansContext.Provider,
|
|
68264
68378
|
{ value: beans },
|
|
68265
|
-
|
|
68379
|
+
React83.createElement(
|
|
68266
68380
|
tabGuardComp_default,
|
|
68267
68381
|
{ ref: setTabGuardCompRef, eFocusableElement: eGridBodyParent, onTabKeyDown, gridCtrl: gridCtrlRef.current },
|
|
68268
68382
|
// we wait for initialised before rending the children, so GridComp has created and registered with it's
|
|
@@ -68270,7 +68384,7 @@ var GridComp2 = ({ context }) => {
|
|
|
68270
68384
|
// before we have set the the Layout CSS classes, causing the GridBodyComp to render rows to a grid that
|
|
68271
68385
|
// doesn't have it's height specified, which would result if all the rows getting rendered (and if many rows,
|
|
68272
68386
|
// hangs the UI)
|
|
68273
|
-
|
|
68387
|
+
React83.createElement(gridBodyComp_default, null)
|
|
68274
68388
|
)
|
|
68275
68389
|
))
|
|
68276
68390
|
);
|
|
@@ -68370,10 +68484,10 @@ var AgGridReactUi = (props) => {
|
|
|
68370
68484
|
}
|
|
68371
68485
|
});
|
|
68372
68486
|
}, [props]);
|
|
68373
|
-
return
|
|
68487
|
+
return React83.createElement(
|
|
68374
68488
|
"div",
|
|
68375
68489
|
{ style: style2, className: props.className, ref: setRef2 },
|
|
68376
|
-
context && !context.isDestroyed() ?
|
|
68490
|
+
context && !context.isDestroyed() ? React83.createElement(gridComp_default, { context }) : null,
|
|
68377
68491
|
(_b = (_a = portalManager.current) === null || _a === void 0 ? void 0 : _a.getPortals()) !== null && _b !== void 0 ? _b : null
|
|
68378
68492
|
);
|
|
68379
68493
|
};
|
|
@@ -68487,7 +68601,7 @@ var DetailCellRenderer = (props, ref) => {
|
|
|
68487
68601
|
var _a;
|
|
68488
68602
|
(_a = ctrlRef.current) === null || _a === void 0 ? void 0 : _a.registerDetailWithMaster(api, columnApi);
|
|
68489
68603
|
}, []);
|
|
68490
|
-
return
|
|
68604
|
+
return React83.createElement("div", { className: topClassName, ref: setRef2 }, detailGridOptions && React83.createElement(AgGridReactUi, Object.assign({ className: gridClassName }, detailGridOptions, { modules: parentModules, rowData: detailRowData, setGridApi })));
|
|
68491
68605
|
};
|
|
68492
68606
|
var detailCellRenderer_default = forwardRef(DetailCellRenderer);
|
|
68493
68607
|
|
|
@@ -68530,7 +68644,7 @@ var AgGridReactLegacy = class extends Component$1 {
|
|
|
68530
68644
|
this.portalManager = new LegacyPortalManager(this, props.componentWrappingElement, props.maxComponentCreationTimeMs);
|
|
68531
68645
|
}
|
|
68532
68646
|
render() {
|
|
68533
|
-
return
|
|
68647
|
+
return React83.createElement("div", {
|
|
68534
68648
|
style: this.createStyleForDiv(),
|
|
68535
68649
|
className: this.props.className,
|
|
68536
68650
|
ref: (e) => {
|
|
@@ -68690,7 +68804,7 @@ var AgGridReact = class extends Component$1 {
|
|
|
68690
68804
|
};
|
|
68691
68805
|
}
|
|
68692
68806
|
render() {
|
|
68693
|
-
const ReactComponentToUse = this.props.suppressReactUi ?
|
|
68807
|
+
const ReactComponentToUse = this.props.suppressReactUi ? React83.createElement(AgGridReactLegacy, Object.assign({}, this.props, { setGridApi: this.setGridApi })) : React83.createElement(AgGridReactUi, Object.assign({}, this.props, { setGridApi: this.setGridApi }));
|
|
68694
68808
|
return ReactComponentToUse;
|
|
68695
68809
|
}
|
|
68696
68810
|
};
|
|
@@ -76264,45 +76378,45 @@ function isLastRowInGroup2(props) {
|
|
|
76264
76378
|
}
|
|
76265
76379
|
var FullWidthCellRenderer = (FullWidthInnerCellRenderer) => {
|
|
76266
76380
|
return (props) => {
|
|
76267
|
-
return /* @__PURE__ */
|
|
76381
|
+
return /* @__PURE__ */ React83.createElement(Flex, { style: { height: "100%", alignItems: "center" } }, /* @__PURE__ */ React83.createElement(React83.Fragment, null, /* @__PURE__ */ React83.createElement(
|
|
76268
76382
|
LevelIndents,
|
|
76269
76383
|
{
|
|
76270
76384
|
level: props.node.level,
|
|
76271
76385
|
lastRowInGroup: isLastRowInGroup2(props)
|
|
76272
76386
|
}
|
|
76273
|
-
), FullWidthInnerCellRenderer && /* @__PURE__ */
|
|
76387
|
+
), FullWidthInnerCellRenderer && /* @__PURE__ */ React83.createElement("div", { style: { paddingLeft: "12px" } }, /* @__PURE__ */ React83.createElement(FullWidthInnerCellRenderer, { ...props }))));
|
|
76274
76388
|
};
|
|
76275
76389
|
};
|
|
76276
|
-
var rowDrag = renderToString(/* @__PURE__ */
|
|
76390
|
+
var rowDrag = renderToString(/* @__PURE__ */ React83.createElement(Grip, { size: "sm" }));
|
|
76277
76391
|
function companyOptionRenderer(editorParams) {
|
|
76278
76392
|
return function renderer(option, optionProps) {
|
|
76279
|
-
return /* @__PURE__ */
|
|
76393
|
+
return /* @__PURE__ */ React83.createElement(Select.Option, { value: option, ...optionProps }, /* @__PURE__ */ React83.createElement(
|
|
76280
76394
|
ContactItem$1,
|
|
76281
76395
|
{
|
|
76282
76396
|
imageUrl: editorParams?.getImageURL?.(option),
|
|
76283
|
-
icon: /* @__PURE__ */
|
|
76397
|
+
icon: /* @__PURE__ */ React83.createElement(Building, null),
|
|
76284
76398
|
selected: optionProps.selected
|
|
76285
76399
|
},
|
|
76286
|
-
/* @__PURE__ */
|
|
76400
|
+
/* @__PURE__ */ React83.createElement(ContactItem$1.Title, null, editorParams?.getCompanyName?.(option))
|
|
76287
76401
|
));
|
|
76288
76402
|
};
|
|
76289
76403
|
}
|
|
76290
76404
|
function personOptionRenderer(editorParams) {
|
|
76291
76405
|
return function renderer(option, optionProps) {
|
|
76292
|
-
return /* @__PURE__ */
|
|
76406
|
+
return /* @__PURE__ */ React83.createElement(Select.Option, { value: option, ...optionProps }, /* @__PURE__ */ React83.createElement(
|
|
76293
76407
|
ContactItem$1,
|
|
76294
76408
|
{
|
|
76295
76409
|
imageUrl: editorParams?.getImageURL?.(option),
|
|
76296
76410
|
initials: editorParams?.getInitials?.(option),
|
|
76297
76411
|
selected: optionProps.selected
|
|
76298
76412
|
},
|
|
76299
|
-
/* @__PURE__ */
|
|
76300
|
-
editorParams?.getCompanyName?.(option) && /* @__PURE__ */
|
|
76413
|
+
/* @__PURE__ */ React83.createElement(ContactItem$1.Title, null, editorParams?.getPersonName?.(option)),
|
|
76414
|
+
editorParams?.getCompanyName?.(option) && /* @__PURE__ */ React83.createElement(ContactItem$1.Description, null, editorParams?.getCompanyName?.(option))
|
|
76301
76415
|
));
|
|
76302
76416
|
};
|
|
76303
76417
|
}
|
|
76304
76418
|
function LoadingField() {
|
|
76305
|
-
return /* @__PURE__ */
|
|
76419
|
+
return /* @__PURE__ */ React83.createElement(Box, { marginTop: "md" }, /* @__PURE__ */ React83.createElement(Spinner$1, { size: "sm", loading: true }));
|
|
76306
76420
|
}
|
|
76307
76421
|
function RadioList({
|
|
76308
76422
|
getId: getId3,
|
|
@@ -76313,10 +76427,10 @@ function RadioList({
|
|
|
76313
76427
|
name,
|
|
76314
76428
|
options = []
|
|
76315
76429
|
}) {
|
|
76316
|
-
|
|
76430
|
+
React83.useEffect(() => {
|
|
76317
76431
|
getOptions();
|
|
76318
76432
|
}, []);
|
|
76319
|
-
return loading ? /* @__PURE__ */
|
|
76433
|
+
return loading ? /* @__PURE__ */ React83.createElement(
|
|
76320
76434
|
Form.Field,
|
|
76321
76435
|
{
|
|
76322
76436
|
as: LoadingField,
|
|
@@ -76326,7 +76440,7 @@ function RadioList({
|
|
|
76326
76440
|
label,
|
|
76327
76441
|
name
|
|
76328
76442
|
}
|
|
76329
|
-
) : /* @__PURE__ */
|
|
76443
|
+
) : /* @__PURE__ */ React83.createElement(
|
|
76330
76444
|
Form.RadioButtons,
|
|
76331
76445
|
{
|
|
76332
76446
|
colWidth: 12,
|
|
@@ -76361,7 +76475,7 @@ function parseValues(columns, values2) {
|
|
|
76361
76475
|
var BulkEditInput = (props) => {
|
|
76362
76476
|
const I18n = useI18nContext();
|
|
76363
76477
|
const { customBulkEditorFields } = useInternalTableContext();
|
|
76364
|
-
const [loading, setLoading] =
|
|
76478
|
+
const [loading, setLoading] = React83.useState(false);
|
|
76365
76479
|
const field = useField({ name: props.name });
|
|
76366
76480
|
const placeholderForField = I18n.t(
|
|
76367
76481
|
"dataTable.bulkActions.placeholderForField",
|
|
@@ -76386,7 +76500,7 @@ var BulkEditInput = (props) => {
|
|
|
76386
76500
|
const getOptionLabel = (option) => {
|
|
76387
76501
|
return props.editorParams?.getOptionLabel?.(option) || getLabel3(option);
|
|
76388
76502
|
};
|
|
76389
|
-
const defaultField = /* @__PURE__ */
|
|
76503
|
+
const defaultField = /* @__PURE__ */ React83.createElement(
|
|
76390
76504
|
Form.Text,
|
|
76391
76505
|
{
|
|
76392
76506
|
colWidth: 12,
|
|
@@ -76399,7 +76513,7 @@ var BulkEditInput = (props) => {
|
|
|
76399
76513
|
);
|
|
76400
76514
|
switch (props.editor) {
|
|
76401
76515
|
case "checkbox":
|
|
76402
|
-
return /* @__PURE__ */
|
|
76516
|
+
return /* @__PURE__ */ React83.createElement(
|
|
76403
76517
|
Form.Checkbox,
|
|
76404
76518
|
{
|
|
76405
76519
|
colWidth: 12,
|
|
@@ -76414,7 +76528,7 @@ var BulkEditInput = (props) => {
|
|
|
76414
76528
|
placeholder: currencyPlaceholder,
|
|
76415
76529
|
...currencyParams
|
|
76416
76530
|
} = props.editorParams;
|
|
76417
|
-
return /* @__PURE__ */
|
|
76531
|
+
return /* @__PURE__ */ React83.createElement(
|
|
76418
76532
|
Form.Currency,
|
|
76419
76533
|
{
|
|
76420
76534
|
...currencyParams,
|
|
@@ -76429,7 +76543,7 @@ var BulkEditInput = (props) => {
|
|
|
76429
76543
|
);
|
|
76430
76544
|
case "dateSelect":
|
|
76431
76545
|
const dateSelectParams = props.editorParams;
|
|
76432
|
-
return /* @__PURE__ */
|
|
76546
|
+
return /* @__PURE__ */ React83.createElement(
|
|
76433
76547
|
Form.DateSelect,
|
|
76434
76548
|
{
|
|
76435
76549
|
...dateSelectParams,
|
|
@@ -76442,7 +76556,7 @@ var BulkEditInput = (props) => {
|
|
|
76442
76556
|
);
|
|
76443
76557
|
case "dateTimeSelect":
|
|
76444
76558
|
const dateTimeSelectParams = props.editorParams;
|
|
76445
|
-
return /* @__PURE__ */
|
|
76559
|
+
return /* @__PURE__ */ React83.createElement(
|
|
76446
76560
|
DateTimeSelectField,
|
|
76447
76561
|
{
|
|
76448
76562
|
...dateTimeSelectParams,
|
|
@@ -76458,7 +76572,7 @@ var BulkEditInput = (props) => {
|
|
|
76458
76572
|
placeholder: multiSelectPlaceholder,
|
|
76459
76573
|
...multiSelectParams
|
|
76460
76574
|
} = props.editorParams;
|
|
76461
|
-
return /* @__PURE__ */
|
|
76575
|
+
return /* @__PURE__ */ React83.createElement(
|
|
76462
76576
|
Form.MultiSelect,
|
|
76463
76577
|
{
|
|
76464
76578
|
...multiSelectParams,
|
|
@@ -76476,7 +76590,7 @@ var BulkEditInput = (props) => {
|
|
|
76476
76590
|
}
|
|
76477
76591
|
);
|
|
76478
76592
|
case "number":
|
|
76479
|
-
return /* @__PURE__ */
|
|
76593
|
+
return /* @__PURE__ */ React83.createElement(
|
|
76480
76594
|
Form.Number,
|
|
76481
76595
|
{
|
|
76482
76596
|
colWidth: 12,
|
|
@@ -76493,7 +76607,7 @@ var BulkEditInput = (props) => {
|
|
|
76493
76607
|
placeholder: personPlaceholder,
|
|
76494
76608
|
...personParams
|
|
76495
76609
|
} = props.editorParams;
|
|
76496
|
-
return /* @__PURE__ */
|
|
76610
|
+
return /* @__PURE__ */ React83.createElement(
|
|
76497
76611
|
Form.Select,
|
|
76498
76612
|
{
|
|
76499
76613
|
...personParams,
|
|
@@ -76516,7 +76630,7 @@ var BulkEditInput = (props) => {
|
|
|
76516
76630
|
placeholder: MultiSelectBulkEditorParams,
|
|
76517
76631
|
...PeopleBulkEditorParams
|
|
76518
76632
|
} = props.editorParams;
|
|
76519
|
-
return /* @__PURE__ */
|
|
76633
|
+
return /* @__PURE__ */ React83.createElement(
|
|
76520
76634
|
Form.MultiSelect,
|
|
76521
76635
|
{
|
|
76522
76636
|
...PeopleBulkEditorParams,
|
|
@@ -76535,7 +76649,7 @@ var BulkEditInput = (props) => {
|
|
|
76535
76649
|
}
|
|
76536
76650
|
);
|
|
76537
76651
|
case "radio":
|
|
76538
|
-
return /* @__PURE__ */
|
|
76652
|
+
return /* @__PURE__ */ React83.createElement(
|
|
76539
76653
|
RadioList,
|
|
76540
76654
|
{
|
|
76541
76655
|
getId: getId3,
|
|
@@ -76552,7 +76666,7 @@ var BulkEditInput = (props) => {
|
|
|
76552
76666
|
placeholder: selectPlaceholder,
|
|
76553
76667
|
...selectParams
|
|
76554
76668
|
} = props.editorParams;
|
|
76555
|
-
return /* @__PURE__ */
|
|
76669
|
+
return /* @__PURE__ */ React83.createElement(
|
|
76556
76670
|
Form.Select,
|
|
76557
76671
|
{
|
|
76558
76672
|
...selectParams,
|
|
@@ -76574,7 +76688,7 @@ var BulkEditInput = (props) => {
|
|
|
76574
76688
|
placeholder: companyPlaceholder,
|
|
76575
76689
|
...companyParams
|
|
76576
76690
|
} = props.editorParams;
|
|
76577
|
-
return /* @__PURE__ */
|
|
76691
|
+
return /* @__PURE__ */ React83.createElement(
|
|
76578
76692
|
Form.Select,
|
|
76579
76693
|
{
|
|
76580
76694
|
...companyParams,
|
|
@@ -76597,7 +76711,7 @@ var BulkEditInput = (props) => {
|
|
|
76597
76711
|
placeholder: companiesMultiSelectPlaceholder,
|
|
76598
76712
|
...companiesBulkEditorParams
|
|
76599
76713
|
} = props.editorParams;
|
|
76600
|
-
return /* @__PURE__ */
|
|
76714
|
+
return /* @__PURE__ */ React83.createElement(
|
|
76601
76715
|
Form.MultiSelect,
|
|
76602
76716
|
{
|
|
76603
76717
|
...companiesBulkEditorParams,
|
|
@@ -76617,7 +76731,7 @@ var BulkEditInput = (props) => {
|
|
|
76617
76731
|
);
|
|
76618
76732
|
default:
|
|
76619
76733
|
if (props.editor && customBulkEditorFields?.[props.editor]) {
|
|
76620
|
-
return /* @__PURE__ */
|
|
76734
|
+
return /* @__PURE__ */ React83.createElement(
|
|
76621
76735
|
Form.Field,
|
|
76622
76736
|
{
|
|
76623
76737
|
as: customBulkEditorFields[props.editor].component,
|
|
@@ -76636,7 +76750,7 @@ var BulkEditInput = (props) => {
|
|
|
76636
76750
|
}
|
|
76637
76751
|
}
|
|
76638
76752
|
};
|
|
76639
|
-
var BulkEdit =
|
|
76753
|
+
var BulkEdit = React83.forwardRef(
|
|
76640
76754
|
({ onReset = noop3 }, ref) => {
|
|
76641
76755
|
const {
|
|
76642
76756
|
analytics,
|
|
@@ -76649,12 +76763,12 @@ var BulkEdit = React82.forwardRef(
|
|
|
76649
76763
|
getRowId,
|
|
76650
76764
|
tableRef
|
|
76651
76765
|
} = useInternalTableContext();
|
|
76652
|
-
const formRef =
|
|
76766
|
+
const formRef = React83.useRef();
|
|
76653
76767
|
const bulkEditCols = tableRef?.current?.getBulkEditColumns() ?? [];
|
|
76654
76768
|
const selectedRows = useRowSelectionState();
|
|
76655
76769
|
const { showToast } = useToastAlertContext();
|
|
76656
76770
|
const I18n = useI18nContext();
|
|
76657
|
-
const [fieldOptions, setFieldOptions] =
|
|
76771
|
+
const [fieldOptions, setFieldOptions] = React83.useState({});
|
|
76658
76772
|
function getEditorParams(field) {
|
|
76659
76773
|
return getColumnDefinition(field)?.bulkEditEditorParams;
|
|
76660
76774
|
}
|
|
@@ -76762,7 +76876,7 @@ var BulkEdit = React82.forwardRef(
|
|
|
76762
76876
|
}
|
|
76763
76877
|
}
|
|
76764
76878
|
};
|
|
76765
|
-
|
|
76879
|
+
React83.useImperativeHandle(
|
|
76766
76880
|
ref,
|
|
76767
76881
|
() => ({
|
|
76768
76882
|
reset: () => formRef.current?.resetForm({}),
|
|
@@ -76770,7 +76884,7 @@ var BulkEdit = React82.forwardRef(
|
|
|
76770
76884
|
}),
|
|
76771
76885
|
[]
|
|
76772
76886
|
);
|
|
76773
|
-
return /* @__PURE__ */
|
|
76887
|
+
return /* @__PURE__ */ React83.createElement(Form, { innerRef: formRef, view: "update", onSubmit: handleSubmit }, /* @__PURE__ */ React83.createElement(Form.Form, { "data-qa": "bulkEditForm" }, bulkEditCols.map((col) => /* @__PURE__ */ React83.createElement(Form.Row, { key: col.field }, /* @__PURE__ */ React83.createElement(
|
|
76774
76888
|
BulkEditInput,
|
|
76775
76889
|
{
|
|
76776
76890
|
key: col.field,
|
|
@@ -76788,8 +76902,8 @@ var BulkEdit = React82.forwardRef(
|
|
|
76788
76902
|
var BulkEditPanel = ({}) => {
|
|
76789
76903
|
const { contextPanel } = useInternalTableContext();
|
|
76790
76904
|
const I18n = useI18nContext();
|
|
76791
|
-
const bulkEditRef =
|
|
76792
|
-
return /* @__PURE__ */
|
|
76905
|
+
const bulkEditRef = React83.useRef(null);
|
|
76906
|
+
return /* @__PURE__ */ React83.createElement(Panel, null, /* @__PURE__ */ React83.createElement(
|
|
76793
76907
|
Panel.Header,
|
|
76794
76908
|
{
|
|
76795
76909
|
onClose: () => {
|
|
@@ -76797,8 +76911,8 @@ var BulkEditPanel = ({}) => {
|
|
|
76797
76911
|
contextPanel.hide();
|
|
76798
76912
|
}
|
|
76799
76913
|
},
|
|
76800
|
-
/* @__PURE__ */
|
|
76801
|
-
), /* @__PURE__ */
|
|
76914
|
+
/* @__PURE__ */ React83.createElement(Panel.Title, null, I18n.t("dataTable.bulkActions.editValues"))
|
|
76915
|
+
), /* @__PURE__ */ React83.createElement(Panel.Body, null, /* @__PURE__ */ React83.createElement(Panel.Section, null, /* @__PURE__ */ React83.createElement(BulkEdit, { ref: bulkEditRef, onReset: contextPanel.hide }))), /* @__PURE__ */ React83.createElement(Panel.Footer, null, /* @__PURE__ */ React83.createElement(Panel.FooterActions, null, /* @__PURE__ */ React83.createElement(
|
|
76802
76916
|
Button,
|
|
76803
76917
|
{
|
|
76804
76918
|
key: "cancel",
|
|
@@ -76811,7 +76925,7 @@ var BulkEditPanel = ({}) => {
|
|
|
76811
76925
|
}
|
|
76812
76926
|
},
|
|
76813
76927
|
I18n.t("dataTable.bulkActions.cancel")
|
|
76814
|
-
), /* @__PURE__ */
|
|
76928
|
+
), /* @__PURE__ */ React83.createElement(
|
|
76815
76929
|
Button,
|
|
76816
76930
|
{
|
|
76817
76931
|
key: "save",
|
|
@@ -77025,7 +77139,7 @@ function traverseTree(nodes) {
|
|
|
77025
77139
|
var ConfigurationRowHeight = () => {
|
|
77026
77140
|
const { rowHeight, setRowHeight } = useInternalTableContext();
|
|
77027
77141
|
const I18n = useI18nContext();
|
|
77028
|
-
return /* @__PURE__ */
|
|
77142
|
+
return /* @__PURE__ */ React83.createElement(SegmentedController, { block: true }, /* @__PURE__ */ React83.createElement(
|
|
77029
77143
|
SegmentedController.Segment,
|
|
77030
77144
|
{
|
|
77031
77145
|
active: rowHeight === rowSize.sm,
|
|
@@ -77034,7 +77148,7 @@ var ConfigurationRowHeight = () => {
|
|
|
77034
77148
|
}
|
|
77035
77149
|
},
|
|
77036
77150
|
I18n.t("dataTable.tableSettings.small")
|
|
77037
|
-
), /* @__PURE__ */
|
|
77151
|
+
), /* @__PURE__ */ React83.createElement(
|
|
77038
77152
|
SegmentedController.Segment,
|
|
77039
77153
|
{
|
|
77040
77154
|
active: rowHeight === rowSize.md,
|
|
@@ -77043,7 +77157,7 @@ var ConfigurationRowHeight = () => {
|
|
|
77043
77157
|
}
|
|
77044
77158
|
},
|
|
77045
77159
|
I18n.t("dataTable.tableSettings.medium")
|
|
77046
|
-
), /* @__PURE__ */
|
|
77160
|
+
), /* @__PURE__ */ React83.createElement(
|
|
77047
77161
|
SegmentedController.Segment,
|
|
77048
77162
|
{
|
|
77049
77163
|
active: rowHeight === rowSize.lg,
|
|
@@ -77054,7 +77168,7 @@ var ConfigurationRowHeight = () => {
|
|
|
77054
77168
|
I18n.t("dataTable.tableSettings.large")
|
|
77055
77169
|
));
|
|
77056
77170
|
};
|
|
77057
|
-
var ConfigurationColumns =
|
|
77171
|
+
var ConfigurationColumns = React83.forwardRef(
|
|
77058
77172
|
({
|
|
77059
77173
|
onDisplayedColumnsChange
|
|
77060
77174
|
}, ref) => {
|
|
@@ -77066,7 +77180,7 @@ var ConfigurationColumns = React82.forwardRef(
|
|
|
77066
77180
|
columnApi,
|
|
77067
77181
|
onTableConfigChange
|
|
77068
77182
|
} = useInternalTableContext();
|
|
77069
|
-
const [colDefs, setColumnDefs] =
|
|
77183
|
+
const [colDefs, setColumnDefs] = React83.useState(() => {
|
|
77070
77184
|
const columnDefs = gridApi?.getColumnDefs();
|
|
77071
77185
|
if (columnDefs) {
|
|
77072
77186
|
return columnDefs;
|
|
@@ -77080,7 +77194,7 @@ var ConfigurationColumns = React82.forwardRef(
|
|
|
77080
77194
|
);
|
|
77081
77195
|
return toGroupedCols(columnDefinitionsMappedToDefs);
|
|
77082
77196
|
});
|
|
77083
|
-
|
|
77197
|
+
React83.useEffect(() => {
|
|
77084
77198
|
function onDisplayedColumnsChanged(event) {
|
|
77085
77199
|
if (event.api.getColumnDefs()?.length) {
|
|
77086
77200
|
setColumnDefs(event.api.getColumnDefs());
|
|
@@ -77098,18 +77212,18 @@ var ConfigurationColumns = React82.forwardRef(
|
|
|
77098
77212
|
);
|
|
77099
77213
|
};
|
|
77100
77214
|
}, [gridApi, colDefs]);
|
|
77101
|
-
|
|
77215
|
+
React83.useEffect(() => {
|
|
77102
77216
|
onDisplayedColumnsChange(
|
|
77103
77217
|
flattenColDefs(colDefs).every((colDef) => !colDef.hide)
|
|
77104
77218
|
);
|
|
77105
77219
|
}, [colDefs]);
|
|
77106
|
-
const configPanelColumns =
|
|
77220
|
+
const configPanelColumns = React83.useMemo(() => {
|
|
77107
77221
|
return getAllConfigPanelColumns(colDefs);
|
|
77108
77222
|
}, [colDefs]);
|
|
77109
|
-
const configPanelColumnFields =
|
|
77223
|
+
const configPanelColumnFields = React83.useMemo(() => {
|
|
77110
77224
|
return getConfigPanelColumnFields(configPanelColumns);
|
|
77111
77225
|
}, [configPanelColumns]);
|
|
77112
|
-
const toggleColumnVisibility =
|
|
77226
|
+
const toggleColumnVisibility = React83.useCallback(
|
|
77113
77227
|
(column2) => (event) => {
|
|
77114
77228
|
const show = event.target.checked;
|
|
77115
77229
|
if (column2.children) {
|
|
@@ -77126,14 +77240,14 @@ var ConfigurationColumns = React82.forwardRef(
|
|
|
77126
77240
|
},
|
|
77127
77241
|
[columnApi, gridApi, onTableConfigChange]
|
|
77128
77242
|
);
|
|
77129
|
-
const toggleAllColumnVisibility =
|
|
77243
|
+
const toggleAllColumnVisibility = React83.useCallback(
|
|
77130
77244
|
(show) => {
|
|
77131
77245
|
columnApi?.setColumnsVisible(configPanelColumnFields, show);
|
|
77132
77246
|
onTableConfigChange();
|
|
77133
77247
|
},
|
|
77134
77248
|
[columnApi, configPanelColumnFields, onTableConfigChange]
|
|
77135
77249
|
);
|
|
77136
|
-
const getColumnState =
|
|
77250
|
+
const getColumnState = React83.useCallback(
|
|
77137
77251
|
(col) => {
|
|
77138
77252
|
if (isColGroupDef3(col) && col.children && col.groupId !== void 0) {
|
|
77139
77253
|
return columnApi?.getColumnGroup(col.groupId)?.getProvidedColumnGroup();
|
|
@@ -77146,14 +77260,14 @@ var ConfigurationColumns = React82.forwardRef(
|
|
|
77146
77260
|
},
|
|
77147
77261
|
[columnApi]
|
|
77148
77262
|
);
|
|
77149
|
-
const reset =
|
|
77263
|
+
const reset = React83.useCallback(() => {
|
|
77150
77264
|
toggleAllColumnVisibility(true);
|
|
77151
77265
|
}, [toggleAllColumnVisibility]);
|
|
77152
|
-
|
|
77266
|
+
React83.useImperativeHandle(ref, () => ({
|
|
77153
77267
|
reset
|
|
77154
77268
|
}));
|
|
77155
|
-
return /* @__PURE__ */
|
|
77156
|
-
(column2) => column2.headerName && /* @__PURE__ */
|
|
77269
|
+
return /* @__PURE__ */ React83.createElement("div", null, configPanelColumns?.map(
|
|
77270
|
+
(column2) => column2.headerName && /* @__PURE__ */ React83.createElement(
|
|
77157
77271
|
Flex,
|
|
77158
77272
|
{
|
|
77159
77273
|
alignItems: "center",
|
|
@@ -77165,14 +77279,14 @@ var ConfigurationColumns = React82.forwardRef(
|
|
|
77165
77279
|
paddingLeft: `${spacing.lg + spacing.md * column2.depth}px`
|
|
77166
77280
|
}
|
|
77167
77281
|
},
|
|
77168
|
-
/* @__PURE__ */
|
|
77282
|
+
/* @__PURE__ */ React83.createElement(
|
|
77169
77283
|
Switch,
|
|
77170
77284
|
{
|
|
77171
77285
|
checked: getColumnState(column2)?.isVisible() || false,
|
|
77172
77286
|
onChange: toggleColumnVisibility(column2),
|
|
77173
77287
|
disabled: column2.lockVisible
|
|
77174
77288
|
},
|
|
77175
|
-
/* @__PURE__ */
|
|
77289
|
+
/* @__PURE__ */ React83.createElement(
|
|
77176
77290
|
Typography,
|
|
77177
77291
|
{
|
|
77178
77292
|
style: {
|
|
@@ -77189,21 +77303,21 @@ var ConfigurationColumns = React82.forwardRef(
|
|
|
77189
77303
|
var ConfigurationPanel = ({}) => {
|
|
77190
77304
|
const { contextPanel, onServerSideDataRequest, enableDynamicRowHeight } = useInternalTableContext();
|
|
77191
77305
|
const I18n = useI18nContext();
|
|
77192
|
-
const configurationColumnsRef =
|
|
77193
|
-
const [isAllColumnsVisible, setIsAllColumnsVisible] =
|
|
77194
|
-
return /* @__PURE__ */
|
|
77306
|
+
const configurationColumnsRef = React83.useRef();
|
|
77307
|
+
const [isAllColumnsVisible, setIsAllColumnsVisible] = React83.useState(false);
|
|
77308
|
+
return /* @__PURE__ */ React83.createElement(Panel, null, /* @__PURE__ */ React83.createElement(Panel.Header, { onClose: contextPanel.hide }, /* @__PURE__ */ React83.createElement(Panel.Title, null, I18n.t("dataTable.tableSettings.tableSettings"))), /* @__PURE__ */ React83.createElement(Panel.Body, { className: cx18("contextPanelBody") }, !onServerSideDataRequest && !enableDynamicRowHeight && /* @__PURE__ */ React83.createElement(
|
|
77195
77309
|
Panel.Section,
|
|
77196
77310
|
{
|
|
77197
77311
|
"data-qa": "data-table-config-panel-section-row-height",
|
|
77198
77312
|
heading: I18n.t("dataTable.tableSettings.rowHeight")
|
|
77199
77313
|
},
|
|
77200
|
-
/* @__PURE__ */
|
|
77201
|
-
), /* @__PURE__ */
|
|
77314
|
+
/* @__PURE__ */ React83.createElement(ConfigurationRowHeight, null)
|
|
77315
|
+
), /* @__PURE__ */ React83.createElement(
|
|
77202
77316
|
Panel.Section,
|
|
77203
77317
|
{
|
|
77204
77318
|
"data-qa": "data-table-config-panel-section-configure-columns",
|
|
77205
77319
|
heading: I18n.t("dataTable.tableSettings.configureColumns"),
|
|
77206
|
-
actions: /* @__PURE__ */
|
|
77320
|
+
actions: /* @__PURE__ */ React83.createElement(
|
|
77207
77321
|
Button,
|
|
77208
77322
|
{
|
|
77209
77323
|
disabled: isAllColumnsVisible,
|
|
@@ -77213,7 +77327,7 @@ var ConfigurationPanel = ({}) => {
|
|
|
77213
77327
|
I18n.t("dataTable.tableSettings.resetToDefault")
|
|
77214
77328
|
)
|
|
77215
77329
|
},
|
|
77216
|
-
/* @__PURE__ */
|
|
77330
|
+
/* @__PURE__ */ React83.createElement(
|
|
77217
77331
|
ConfigurationColumns,
|
|
77218
77332
|
{
|
|
77219
77333
|
onDisplayedColumnsChange: setIsAllColumnsVisible,
|
|
@@ -77225,11 +77339,11 @@ var ConfigurationPanel = ({}) => {
|
|
|
77225
77339
|
function ClientSideFilterInner(props) {
|
|
77226
77340
|
const { Component: Component4, columnDefinition, onChange, options, value } = props;
|
|
77227
77341
|
const filterHeading = columnDefinition.filterProps?.getFilterHeadingText?.(columnDefinition) ?? columnDefinition.headerName;
|
|
77228
|
-
const filterOptions =
|
|
77342
|
+
const filterOptions = React83.useMemo(
|
|
77229
77343
|
() => (options ?? [])?.filter((option) => !!option),
|
|
77230
77344
|
[options]
|
|
77231
77345
|
);
|
|
77232
|
-
return /* @__PURE__ */
|
|
77346
|
+
return /* @__PURE__ */ React83.createElement(Box, { as: "li", display: "block", paddingBottom: "xl", style: { width: "100%" } }, filterHeading ? /* @__PURE__ */ React83.createElement(Label, { "data-qa": `data-table-filter-heading-${columnDefinition.field}` }, filterHeading) : null, /* @__PURE__ */ React83.createElement(
|
|
77233
77347
|
Component4,
|
|
77234
77348
|
{
|
|
77235
77349
|
"data-qa": `data-table-filter-input-${columnDefinition.field}`,
|
|
@@ -77240,7 +77354,7 @@ function ClientSideFilterInner(props) {
|
|
|
77240
77354
|
}
|
|
77241
77355
|
));
|
|
77242
77356
|
}
|
|
77243
|
-
var ClientSideFilter =
|
|
77357
|
+
var ClientSideFilter = React83.memo(
|
|
77244
77358
|
ClientSideFilterInner,
|
|
77245
77359
|
(prev, next) => prev.value === next.value && prev.options === next.options
|
|
77246
77360
|
);
|
|
@@ -77339,7 +77453,7 @@ var Filters = ({
|
|
|
77339
77453
|
FilterListItem
|
|
77340
77454
|
}) => {
|
|
77341
77455
|
const { getColumnDefinition } = useInternalTableContext();
|
|
77342
|
-
return /* @__PURE__ */
|
|
77456
|
+
return /* @__PURE__ */ React83.createElement(
|
|
77343
77457
|
"ol",
|
|
77344
77458
|
{
|
|
77345
77459
|
className: cx19("filters-list"),
|
|
@@ -77351,7 +77465,7 @@ var Filters = ({
|
|
|
77351
77465
|
return null;
|
|
77352
77466
|
}
|
|
77353
77467
|
let FilterRenderer = columnDefinition?.filterRenderer ?? MultiSelectFilterRenderer_default;
|
|
77354
|
-
return /* @__PURE__ */
|
|
77468
|
+
return /* @__PURE__ */ React83.createElement(
|
|
77355
77469
|
FilterListItem,
|
|
77356
77470
|
{
|
|
77357
77471
|
key: fieldName,
|
|
@@ -77366,7 +77480,7 @@ function FilterListItems(props) {
|
|
|
77366
77480
|
const { filtersInGroup, FilterListItem } = props;
|
|
77367
77481
|
const { filterState, onServerSideDataRequest, tableRef } = useInternalTableContext();
|
|
77368
77482
|
if (isServerSideFilterGroups(filtersInGroup, !!onServerSideDataRequest)) {
|
|
77369
|
-
return /* @__PURE__ */
|
|
77483
|
+
return /* @__PURE__ */ React83.createElement(
|
|
77370
77484
|
Filters,
|
|
77371
77485
|
{
|
|
77372
77486
|
filters: filtersInGroup.map((filter) => filter.field),
|
|
@@ -77374,7 +77488,7 @@ function FilterListItems(props) {
|
|
|
77374
77488
|
}
|
|
77375
77489
|
);
|
|
77376
77490
|
}
|
|
77377
|
-
return /* @__PURE__ */
|
|
77491
|
+
return /* @__PURE__ */ React83.createElement(
|
|
77378
77492
|
"ol",
|
|
77379
77493
|
{
|
|
77380
77494
|
className: cx19("filters-list"),
|
|
@@ -77387,7 +77501,7 @@ function FilterListItems(props) {
|
|
|
77387
77501
|
return null;
|
|
77388
77502
|
}
|
|
77389
77503
|
const FilterRenderer = columnDefinition.filterRenderer ?? MultiSelectFilterRenderer_default;
|
|
77390
|
-
return /* @__PURE__ */
|
|
77504
|
+
return /* @__PURE__ */ React83.createElement(
|
|
77391
77505
|
FilterListItem,
|
|
77392
77506
|
{
|
|
77393
77507
|
key: filterRecord.field,
|
|
@@ -77410,7 +77524,7 @@ function FilterGroupWrapper(props) {
|
|
|
77410
77524
|
if (filterGroup === null) {
|
|
77411
77525
|
return props.children;
|
|
77412
77526
|
}
|
|
77413
|
-
return /* @__PURE__ */
|
|
77527
|
+
return /* @__PURE__ */ React83.createElement(
|
|
77414
77528
|
StyledPanelSection,
|
|
77415
77529
|
{
|
|
77416
77530
|
className: "filters-list-group-section",
|
|
@@ -77433,7 +77547,7 @@ function FiltersList(props) {
|
|
|
77433
77547
|
if (!filterGroupsMap) {
|
|
77434
77548
|
return null;
|
|
77435
77549
|
}
|
|
77436
|
-
return /* @__PURE__ */
|
|
77550
|
+
return /* @__PURE__ */ React83.createElement(
|
|
77437
77551
|
Box,
|
|
77438
77552
|
{
|
|
77439
77553
|
className: cx19("filters-list"),
|
|
@@ -77447,7 +77561,7 @@ function FiltersList(props) {
|
|
|
77447
77561
|
);
|
|
77448
77562
|
return null;
|
|
77449
77563
|
}
|
|
77450
|
-
return /* @__PURE__ */
|
|
77564
|
+
return /* @__PURE__ */ React83.createElement(FilterGroupWrapper, { filterGroup: group, key: group.name }, /* @__PURE__ */ React83.createElement(
|
|
77451
77565
|
FilterListItems,
|
|
77452
77566
|
{
|
|
77453
77567
|
...props,
|
|
@@ -77455,7 +77569,7 @@ function FiltersList(props) {
|
|
|
77455
77569
|
}
|
|
77456
77570
|
));
|
|
77457
77571
|
}),
|
|
77458
|
-
filterGroupsMap[FILTER_GROUP_NO_KEY] && /* @__PURE__ */
|
|
77572
|
+
filterGroupsMap[FILTER_GROUP_NO_KEY] && /* @__PURE__ */ React83.createElement(
|
|
77459
77573
|
FilterListItems,
|
|
77460
77574
|
{
|
|
77461
77575
|
...props,
|
|
@@ -77472,7 +77586,7 @@ var BaseFiltersPanel = ({
|
|
|
77472
77586
|
}) => {
|
|
77473
77587
|
const { contextPanel } = useInternalTableContext();
|
|
77474
77588
|
const I18n = useI18nContext();
|
|
77475
|
-
return /* @__PURE__ */
|
|
77589
|
+
return /* @__PURE__ */ React83.createElement(
|
|
77476
77590
|
Card,
|
|
77477
77591
|
{
|
|
77478
77592
|
style: { maxHeight: "100vh" },
|
|
@@ -77482,7 +77596,7 @@ var BaseFiltersPanel = ({
|
|
|
77482
77596
|
"data-qa": "data-table-filters-context-panel",
|
|
77483
77597
|
...props
|
|
77484
77598
|
},
|
|
77485
|
-
/* @__PURE__ */
|
|
77599
|
+
/* @__PURE__ */ React83.createElement(Box, { className: cx19("contextPanelWrapper"), display: "flex-column" }, /* @__PURE__ */ React83.createElement(Panel, null, /* @__PURE__ */ React83.createElement(Panel.Header, { onClose: contextPanel.hide }, /* @__PURE__ */ React83.createElement(Panel.Title, null, I18n.t("dataTable.filters.filters")), /* @__PURE__ */ React83.createElement(
|
|
77486
77600
|
Button,
|
|
77487
77601
|
{
|
|
77488
77602
|
"data-qa": "data-table-remove-all-filters",
|
|
@@ -77491,37 +77605,37 @@ var BaseFiltersPanel = ({
|
|
|
77491
77605
|
variant: "tertiary"
|
|
77492
77606
|
},
|
|
77493
77607
|
I18n.t("dataTable.filters.clearAllFilters")
|
|
77494
|
-
)), /* @__PURE__ */
|
|
77608
|
+
)), /* @__PURE__ */ React83.createElement(Panel.Body, { className: cx19("contextPanelBody") }, /* @__PURE__ */ React83.createElement(Panel.Section, null, children))))
|
|
77495
77609
|
);
|
|
77496
77610
|
};
|
|
77497
77611
|
function ClientSideFiltersPanel(props) {
|
|
77498
77612
|
const { tableRef } = useInternalTableContext();
|
|
77499
|
-
return /* @__PURE__ */
|
|
77613
|
+
return /* @__PURE__ */ React83.createElement(
|
|
77500
77614
|
BaseFiltersPanel,
|
|
77501
77615
|
{
|
|
77502
77616
|
onClearAllFilters: tableRef?.current?.removeAllFilters,
|
|
77503
77617
|
...props
|
|
77504
77618
|
},
|
|
77505
|
-
/* @__PURE__ */
|
|
77619
|
+
/* @__PURE__ */ React83.createElement(FiltersList, { FilterListItem: ClientSideFilter })
|
|
77506
77620
|
);
|
|
77507
77621
|
}
|
|
77508
77622
|
var ServerSideFiltersPanel = (props) => {
|
|
77509
77623
|
const { filterStorage } = useInternalTableContext();
|
|
77510
|
-
return /* @__PURE__ */
|
|
77624
|
+
return /* @__PURE__ */ React83.createElement(
|
|
77511
77625
|
BaseFiltersPanel,
|
|
77512
77626
|
{
|
|
77513
77627
|
onClearAllFilters: filterStorage.onClearAllFilters,
|
|
77514
77628
|
...props
|
|
77515
77629
|
},
|
|
77516
|
-
/* @__PURE__ */
|
|
77630
|
+
/* @__PURE__ */ React83.createElement(FiltersList, { FilterListItem: ServerSideFilter })
|
|
77517
77631
|
);
|
|
77518
77632
|
};
|
|
77519
77633
|
var FiltersPanel = (props) => {
|
|
77520
77634
|
const { onServerSideDataRequest } = useInternalTableContext();
|
|
77521
77635
|
if (onServerSideDataRequest) {
|
|
77522
|
-
return /* @__PURE__ */
|
|
77636
|
+
return /* @__PURE__ */ React83.createElement(ServerSideFiltersPanel, { ...props });
|
|
77523
77637
|
}
|
|
77524
|
-
return /* @__PURE__ */
|
|
77638
|
+
return /* @__PURE__ */ React83.createElement(ClientSideFiltersPanel, { ...props });
|
|
77525
77639
|
};
|
|
77526
77640
|
function useContextPanel() {
|
|
77527
77641
|
const [content, setContent] = useState();
|
|
@@ -77543,13 +77657,13 @@ function useContextPanel() {
|
|
|
77543
77657
|
}
|
|
77544
77658
|
var ConfigPanelButton = () => {
|
|
77545
77659
|
const { contextPanel, totalRowCount } = useInternalTableContext();
|
|
77546
|
-
return /* @__PURE__ */
|
|
77660
|
+
return /* @__PURE__ */ React83.createElement(
|
|
77547
77661
|
EmptyResultsControlTooltip,
|
|
77548
77662
|
{
|
|
77549
77663
|
featureI18nKey: "featureConfigure",
|
|
77550
77664
|
enabled: totalRowCount === 0
|
|
77551
77665
|
},
|
|
77552
|
-
/* @__PURE__ */
|
|
77666
|
+
/* @__PURE__ */ React83.createElement(
|
|
77553
77667
|
ToggleButton,
|
|
77554
77668
|
{
|
|
77555
77669
|
disabled: totalRowCount === 0,
|
|
@@ -77563,7 +77677,7 @@ var ConfigPanelButton = () => {
|
|
|
77563
77677
|
selected: contextPanel.content === "configuration",
|
|
77564
77678
|
"data-qa": "table-config-button"
|
|
77565
77679
|
},
|
|
77566
|
-
/* @__PURE__ */
|
|
77680
|
+
/* @__PURE__ */ React83.createElement(
|
|
77567
77681
|
"svg",
|
|
77568
77682
|
{
|
|
77569
77683
|
style: { marginTop: "6px" },
|
|
@@ -77574,7 +77688,7 @@ var ConfigPanelButton = () => {
|
|
|
77574
77688
|
fill: "none",
|
|
77575
77689
|
xmlns: "http://www.w3.org/2000/svg"
|
|
77576
77690
|
},
|
|
77577
|
-
/* @__PURE__ */
|
|
77691
|
+
/* @__PURE__ */ React83.createElement(
|
|
77578
77692
|
"path",
|
|
77579
77693
|
{
|
|
77580
77694
|
d: "M0 11.5V13.5H4.5V11.5H0ZM0 1.5V3.5H7.5V1.5H0ZM8.5 15V13.5H15V11.5H8.5V10H6.66667V15H8.5ZM3.5 5V6.5H0V8.5H3.5V10H5.5V5H3.5ZM15 8.5V6.5H7.5V8.5H15ZM9.5 5H11.6667V3.5H15V1.5H11.6667V0H9.5V5Z",
|
|
@@ -77593,12 +77707,12 @@ function getFilterTokenText(columnDefinition, filterValue) {
|
|
|
77593
77707
|
});
|
|
77594
77708
|
}
|
|
77595
77709
|
if (columnDefinition.filterRenderer === DateFilterRenderer_default) {
|
|
77596
|
-
return /* @__PURE__ */
|
|
77710
|
+
return /* @__PURE__ */ React83.createElement(
|
|
77597
77711
|
OptionalDateTimeProvider,
|
|
77598
77712
|
{
|
|
77599
77713
|
timeZone: columnDefinition.timeZone
|
|
77600
77714
|
},
|
|
77601
|
-
/* @__PURE__ */
|
|
77715
|
+
/* @__PURE__ */ React83.createElement(
|
|
77602
77716
|
DateFilterTokenText,
|
|
77603
77717
|
{
|
|
77604
77718
|
headerName: columnDefinition.headerName,
|
|
@@ -77630,18 +77744,18 @@ var FiltersPanelToggleButton = ({ hasSelectedFilters, hasDefinedFilters }) => {
|
|
|
77630
77744
|
if (!hasDefinedFilters) {
|
|
77631
77745
|
return null;
|
|
77632
77746
|
}
|
|
77633
|
-
return /* @__PURE__ */
|
|
77747
|
+
return /* @__PURE__ */ React83.createElement(
|
|
77634
77748
|
EmptyResultsControlTooltip,
|
|
77635
77749
|
{
|
|
77636
77750
|
featureI18nKey: "featureFilter",
|
|
77637
77751
|
enabled: totalRowCount === 0
|
|
77638
77752
|
},
|
|
77639
|
-
/* @__PURE__ */
|
|
77753
|
+
/* @__PURE__ */ React83.createElement(
|
|
77640
77754
|
ToggleButton,
|
|
77641
77755
|
{
|
|
77642
77756
|
"data-qa": "data-table-show-filters-button",
|
|
77643
77757
|
disabled: totalRowCount === 0,
|
|
77644
|
-
icon: /* @__PURE__ */
|
|
77758
|
+
icon: /* @__PURE__ */ React83.createElement(FilterIcon, null),
|
|
77645
77759
|
onClick: () => {
|
|
77646
77760
|
if (contextPanel.content === "filters") {
|
|
77647
77761
|
contextPanel.hide();
|
|
@@ -77659,7 +77773,7 @@ var ServerSideFiltersPanelToggleButton = () => {
|
|
|
77659
77773
|
const {
|
|
77660
77774
|
filterStorage: { hasDefinedFilters, hasSelectedFilters }
|
|
77661
77775
|
} = useInternalTableContext();
|
|
77662
|
-
return /* @__PURE__ */
|
|
77776
|
+
return /* @__PURE__ */ React83.createElement(
|
|
77663
77777
|
FiltersPanelToggleButton,
|
|
77664
77778
|
{
|
|
77665
77779
|
hasDefinedFilters,
|
|
@@ -77669,12 +77783,12 @@ var ServerSideFiltersPanelToggleButton = () => {
|
|
|
77669
77783
|
};
|
|
77670
77784
|
var ClientSideFiltersPanelToggleButton = () => {
|
|
77671
77785
|
const { filterState } = useInternalTableContext();
|
|
77672
|
-
const activeFilters =
|
|
77786
|
+
const activeFilters = React83.useMemo(() => {
|
|
77673
77787
|
return filterState.allAvailableFilters.filter(({ instance }) => {
|
|
77674
77788
|
return instance.isFilterActive();
|
|
77675
77789
|
});
|
|
77676
77790
|
}, [filterState.allAvailableFilters]);
|
|
77677
|
-
return /* @__PURE__ */
|
|
77791
|
+
return /* @__PURE__ */ React83.createElement(
|
|
77678
77792
|
FiltersPanelToggleButton,
|
|
77679
77793
|
{
|
|
77680
77794
|
hasDefinedFilters: filterState.allAvailableFilters.length > 0,
|
|
@@ -77685,7 +77799,7 @@ var ClientSideFiltersPanelToggleButton = () => {
|
|
|
77685
77799
|
|
|
77686
77800
|
// src/QuickControls/QuickFilters.tsx
|
|
77687
77801
|
var FilterIcon = () => {
|
|
77688
|
-
return /* @__PURE__ */
|
|
77802
|
+
return /* @__PURE__ */ React83.createElement(
|
|
77689
77803
|
"svg",
|
|
77690
77804
|
{
|
|
77691
77805
|
focusable: false,
|
|
@@ -77695,7 +77809,7 @@ var FilterIcon = () => {
|
|
|
77695
77809
|
fill: "none",
|
|
77696
77810
|
xmlns: "http://www.w3.org/2000/svg"
|
|
77697
77811
|
},
|
|
77698
|
-
/* @__PURE__ */
|
|
77812
|
+
/* @__PURE__ */ React83.createElement(
|
|
77699
77813
|
"path",
|
|
77700
77814
|
{
|
|
77701
77815
|
fillRule: "evenodd",
|
|
@@ -77713,7 +77827,7 @@ var StyledFilterTokenWrapper = styled4.div`
|
|
|
77713
77827
|
`;
|
|
77714
77828
|
var ClientSideQuickFilters = ({ overlayMatchesTriggerWidth }) => {
|
|
77715
77829
|
const { tableRef, filterState, getColumnDefinition } = useInternalTableContext();
|
|
77716
|
-
const { quickFilters, tokens } =
|
|
77830
|
+
const { quickFilters, tokens } = React83.useMemo(() => {
|
|
77717
77831
|
return filterState.allAvailableFilters.reduce(
|
|
77718
77832
|
(acc, filter) => {
|
|
77719
77833
|
const colDef = getColumnDefinition(filter.field);
|
|
@@ -77734,7 +77848,7 @@ var ClientSideQuickFilters = ({ overlayMatchesTriggerWidth }) => {
|
|
|
77734
77848
|
);
|
|
77735
77849
|
}, [filterState.allAvailableFilters, getColumnDefinition]);
|
|
77736
77850
|
const isEmpty2 = quickFilters.length === 0 && tokens.length === 0;
|
|
77737
|
-
return isEmpty2 ? null : /* @__PURE__ */
|
|
77851
|
+
return isEmpty2 ? null : /* @__PURE__ */ React83.createElement(
|
|
77738
77852
|
FlexList,
|
|
77739
77853
|
{
|
|
77740
77854
|
padding: "xs none",
|
|
@@ -77749,7 +77863,7 @@ var ClientSideQuickFilters = ({ overlayMatchesTriggerWidth }) => {
|
|
|
77749
77863
|
if (!colDef || !QuickFilter) {
|
|
77750
77864
|
return null;
|
|
77751
77865
|
}
|
|
77752
|
-
return /* @__PURE__ */
|
|
77866
|
+
return /* @__PURE__ */ React83.createElement(
|
|
77753
77867
|
QuickFilter,
|
|
77754
77868
|
{
|
|
77755
77869
|
key: filter.field,
|
|
@@ -77766,7 +77880,7 @@ var ClientSideQuickFilters = ({ overlayMatchesTriggerWidth }) => {
|
|
|
77766
77880
|
if (!colDef) {
|
|
77767
77881
|
return null;
|
|
77768
77882
|
}
|
|
77769
|
-
return /* @__PURE__ */
|
|
77883
|
+
return /* @__PURE__ */ React83.createElement(StyledFilterTokenWrapper, { key: filter.field }, /* @__PURE__ */ React83.createElement(UNSAFE_FilterToken, null, /* @__PURE__ */ React83.createElement(UNSAFE_FilterToken.Label, null, getFilterTokenText(colDef, filter.filterValues)), /* @__PURE__ */ React83.createElement(
|
|
77770
77884
|
UNSAFE_FilterToken.Remove,
|
|
77771
77885
|
{
|
|
77772
77886
|
onClick: () => tableRef?.current?.removeFilter(filter.field)
|
|
@@ -77786,7 +77900,7 @@ var ServerSideQuickFilters = ({ overlayMatchesTriggerWidth }) => {
|
|
|
77786
77900
|
},
|
|
77787
77901
|
getColumnDefinition
|
|
77788
77902
|
} = useInternalTableContext();
|
|
77789
|
-
const { quickFilterNames, tokenNames } =
|
|
77903
|
+
const { quickFilterNames, tokenNames } = React83.useMemo(() => {
|
|
77790
77904
|
const appliedFilterNames = Object.keys(selectedFilters);
|
|
77791
77905
|
const isActiveFilter = (filterName) => appliedFilterNames.includes(filterName);
|
|
77792
77906
|
return possibleFilters.reduce(
|
|
@@ -77815,7 +77929,7 @@ var ServerSideQuickFilters = ({ overlayMatchesTriggerWidth }) => {
|
|
|
77815
77929
|
return null;
|
|
77816
77930
|
}
|
|
77817
77931
|
const isEmpty2 = quickFilterNames.length === 0 && tokenNames.length === 0;
|
|
77818
|
-
return isEmpty2 ? null : /* @__PURE__ */
|
|
77932
|
+
return isEmpty2 ? null : /* @__PURE__ */ React83.createElement(
|
|
77819
77933
|
FlexList,
|
|
77820
77934
|
{
|
|
77821
77935
|
padding: "xs none",
|
|
@@ -77831,7 +77945,7 @@ var ServerSideQuickFilters = ({ overlayMatchesTriggerWidth }) => {
|
|
|
77831
77945
|
if (!colDef || !QuickFilter) {
|
|
77832
77946
|
return null;
|
|
77833
77947
|
}
|
|
77834
|
-
return /* @__PURE__ */
|
|
77948
|
+
return /* @__PURE__ */ React83.createElement(
|
|
77835
77949
|
QuickFilter,
|
|
77836
77950
|
{
|
|
77837
77951
|
key: fieldName,
|
|
@@ -77846,10 +77960,10 @@ var ServerSideQuickFilters = ({ overlayMatchesTriggerWidth }) => {
|
|
|
77846
77960
|
return null;
|
|
77847
77961
|
}
|
|
77848
77962
|
const filter = getListFilter(fieldName);
|
|
77849
|
-
return /* @__PURE__ */
|
|
77963
|
+
return /* @__PURE__ */ React83.createElement(StyledFilterTokenWrapper, { key: fieldName }, /* @__PURE__ */ React83.createElement(UNSAFE_FilterToken, null, /* @__PURE__ */ React83.createElement(UNSAFE_FilterToken.Label, null, getFilterTokenText(
|
|
77850
77964
|
colDef,
|
|
77851
77965
|
colDef.filterRenderer === DateFilterRenderer_default ? filter.value : filter.selected
|
|
77852
|
-
)), /* @__PURE__ */
|
|
77966
|
+
)), /* @__PURE__ */ React83.createElement(
|
|
77853
77967
|
UNSAFE_FilterToken.Remove,
|
|
77854
77968
|
{
|
|
77855
77969
|
"data-qa": "data-table-quick-filter-remove-token",
|
|
@@ -77862,14 +77976,14 @@ var ServerSideQuickFilters = ({ overlayMatchesTriggerWidth }) => {
|
|
|
77862
77976
|
var QuickFilters = ({ overlayMatchesTriggerWidth }) => {
|
|
77863
77977
|
const { onServerSideDataRequest } = useInternalTableContext();
|
|
77864
77978
|
if (onServerSideDataRequest) {
|
|
77865
|
-
return /* @__PURE__ */
|
|
77979
|
+
return /* @__PURE__ */ React83.createElement(
|
|
77866
77980
|
ServerSideQuickFilters,
|
|
77867
77981
|
{
|
|
77868
77982
|
overlayMatchesTriggerWidth
|
|
77869
77983
|
}
|
|
77870
77984
|
);
|
|
77871
77985
|
}
|
|
77872
|
-
return /* @__PURE__ */
|
|
77986
|
+
return /* @__PURE__ */ React83.createElement(
|
|
77873
77987
|
ClientSideQuickFilters,
|
|
77874
77988
|
{
|
|
77875
77989
|
overlayMatchesTriggerWidth
|
|
@@ -77879,9 +77993,9 @@ var QuickFilters = ({ overlayMatchesTriggerWidth }) => {
|
|
|
77879
77993
|
var FiltersPanelButton = () => {
|
|
77880
77994
|
const { onServerSideDataRequest } = useInternalTableContext();
|
|
77881
77995
|
if (onServerSideDataRequest) {
|
|
77882
|
-
return /* @__PURE__ */
|
|
77996
|
+
return /* @__PURE__ */ React83.createElement(ServerSideFiltersPanelToggleButton, null);
|
|
77883
77997
|
}
|
|
77884
|
-
return /* @__PURE__ */
|
|
77998
|
+
return /* @__PURE__ */ React83.createElement(ClientSideFiltersPanelToggleButton, null);
|
|
77885
77999
|
};
|
|
77886
78000
|
var RowGroupSelector = ({ localeText }) => {
|
|
77887
78001
|
const {
|
|
@@ -77891,28 +78005,28 @@ var RowGroupSelector = ({ localeText }) => {
|
|
|
77891
78005
|
tableRef,
|
|
77892
78006
|
totalRowCount
|
|
77893
78007
|
} = useInternalTableContext();
|
|
77894
|
-
const [columnDefinitions, setColumnDefinitions] =
|
|
77895
|
-
const groupableColumns =
|
|
78008
|
+
const [columnDefinitions, setColumnDefinitions] = React83.useState(_columnDefinitions);
|
|
78009
|
+
const groupableColumns = React83.useMemo(
|
|
77896
78010
|
() => mapColumnsToOptions(
|
|
77897
78011
|
columnDefinitions.filter((column2) => column2.enableRowGroup)
|
|
77898
78012
|
),
|
|
77899
78013
|
[columnDefinitions]
|
|
77900
78014
|
);
|
|
77901
|
-
const groupedColumns =
|
|
78015
|
+
const groupedColumns = React83.useMemo(() => {
|
|
77902
78016
|
const rowGrouping = columnApi?.getRowGroupColumns() ?? [];
|
|
77903
78017
|
return rowGrouping.map((column2) => {
|
|
77904
78018
|
const colDef = column2.getColDef();
|
|
77905
78019
|
return transformToColumnDefinition(colDef);
|
|
77906
78020
|
});
|
|
77907
78021
|
}, [columnDefinitions]);
|
|
77908
|
-
const selectedColumns =
|
|
78022
|
+
const selectedColumns = React83.useMemo(
|
|
77909
78023
|
() => mapColumnsToOptions(groupedColumns),
|
|
77910
78024
|
[groupedColumns]
|
|
77911
78025
|
);
|
|
77912
|
-
const onGroupedClear =
|
|
78026
|
+
const onGroupedClear = React83.useCallback(() => {
|
|
77913
78027
|
tableRef?.current?.setRowGrouping([]);
|
|
77914
78028
|
}, [tableRef]);
|
|
77915
|
-
const onGroupedRowChange =
|
|
78029
|
+
const onGroupedRowChange = React83.useCallback(
|
|
77916
78030
|
(newValue) => {
|
|
77917
78031
|
const fields = newValue.map((val) => {
|
|
77918
78032
|
return val.id;
|
|
@@ -77923,7 +78037,7 @@ var RowGroupSelector = ({ localeText }) => {
|
|
|
77923
78037
|
},
|
|
77924
78038
|
[selectedColumns]
|
|
77925
78039
|
);
|
|
77926
|
-
|
|
78040
|
+
React83.useEffect(() => {
|
|
77927
78041
|
function onDisplayedColumnsChanged(event) {
|
|
77928
78042
|
const agColumnDefs = event.api.getColumnDefs();
|
|
77929
78043
|
if (agColumnDefs?.length) {
|
|
@@ -77949,13 +78063,13 @@ var RowGroupSelector = ({ localeText }) => {
|
|
|
77949
78063
|
if (groupableColumns.length === 0) {
|
|
77950
78064
|
return null;
|
|
77951
78065
|
}
|
|
77952
|
-
return /* @__PURE__ */
|
|
78066
|
+
return /* @__PURE__ */ React83.createElement(
|
|
77953
78067
|
EmptyResultsControlTooltip,
|
|
77954
78068
|
{
|
|
77955
78069
|
featureI18nKey: "featureGroupBy",
|
|
77956
78070
|
enabled: totalRowCount === 0
|
|
77957
78071
|
},
|
|
77958
|
-
/* @__PURE__ */
|
|
78072
|
+
/* @__PURE__ */ React83.createElement(
|
|
77959
78073
|
GroupBySelect,
|
|
77960
78074
|
{
|
|
77961
78075
|
isDisabled: totalRowCount === 0,
|
|
@@ -77983,17 +78097,17 @@ var ClientSideSearch = ({
|
|
|
77983
78097
|
onSearch,
|
|
77984
78098
|
placeholder
|
|
77985
78099
|
}) => {
|
|
77986
|
-
const [internalValue, setInternalValue] =
|
|
78100
|
+
const [internalValue, setInternalValue] = React83.useState("");
|
|
77987
78101
|
const { tableRef, totalRowCount } = useInternalTableContext();
|
|
77988
78102
|
const disabled = totalRowCount === 0;
|
|
77989
78103
|
const I18n = useI18nContext();
|
|
77990
|
-
const debouncedSetSearchValue =
|
|
78104
|
+
const debouncedSetSearchValue = React83.useCallback(
|
|
77991
78105
|
debounce2((value) => {
|
|
77992
78106
|
tableRef?.current?.setSearchValue(value);
|
|
77993
78107
|
}, 250),
|
|
77994
78108
|
[tableRef?.current?.setSearchValue]
|
|
77995
78109
|
);
|
|
77996
|
-
const onChange =
|
|
78110
|
+
const onChange = React83.useCallback(
|
|
77997
78111
|
(value, event) => {
|
|
77998
78112
|
setInternalValue(value);
|
|
77999
78113
|
if (onSearch) {
|
|
@@ -78004,13 +78118,13 @@ var ClientSideSearch = ({
|
|
|
78004
78118
|
},
|
|
78005
78119
|
[debouncedSetSearchValue, onSearch]
|
|
78006
78120
|
);
|
|
78007
|
-
return /* @__PURE__ */
|
|
78121
|
+
return /* @__PURE__ */ React83.createElement(
|
|
78008
78122
|
EmptyResultsControlTooltip,
|
|
78009
78123
|
{
|
|
78010
78124
|
featureI18nKey: "featureSearch",
|
|
78011
78125
|
enabled: disabled
|
|
78012
78126
|
},
|
|
78013
|
-
/* @__PURE__ */
|
|
78127
|
+
/* @__PURE__ */ React83.createElement(
|
|
78014
78128
|
Typeahead,
|
|
78015
78129
|
{
|
|
78016
78130
|
disabled,
|
|
@@ -78028,16 +78142,16 @@ var ClientSideSearch = ({
|
|
|
78028
78142
|
var Search = (props) => {
|
|
78029
78143
|
const { onServerSideDataRequest } = useInternalTableContext();
|
|
78030
78144
|
if (onServerSideDataRequest) {
|
|
78031
|
-
return /* @__PURE__ */
|
|
78145
|
+
return /* @__PURE__ */ React83.createElement(ServerSideSearch, { ...props });
|
|
78032
78146
|
}
|
|
78033
|
-
return /* @__PURE__ */
|
|
78147
|
+
return /* @__PURE__ */ React83.createElement(ClientSideSearch, { ...props });
|
|
78034
78148
|
};
|
|
78035
78149
|
|
|
78036
78150
|
// src/QuickControls/QuickControls.tsx
|
|
78037
78151
|
var QuickControls = (props) => {
|
|
78038
78152
|
const I18n = useI18nContext();
|
|
78039
78153
|
if (props.children) {
|
|
78040
|
-
return /* @__PURE__ */
|
|
78154
|
+
return /* @__PURE__ */ React83.createElement(
|
|
78041
78155
|
Box,
|
|
78042
78156
|
{
|
|
78043
78157
|
"data-qa": "data-table-quick-controls",
|
|
@@ -78047,14 +78161,14 @@ var QuickControls = (props) => {
|
|
|
78047
78161
|
props.children
|
|
78048
78162
|
);
|
|
78049
78163
|
}
|
|
78050
|
-
return /* @__PURE__ */
|
|
78164
|
+
return /* @__PURE__ */ React83.createElement(Box, { padding: "xs none", style: props.style }, /* @__PURE__ */ React83.createElement(Box, { padding: "xs none", display: "flex-row", justifyContent: "space-between" }, /* @__PURE__ */ React83.createElement(FlexList, { size: "xs", alignItems: "center", marginRight: "sm" }, /* @__PURE__ */ React83.createElement(
|
|
78051
78165
|
Search,
|
|
78052
78166
|
{
|
|
78053
78167
|
onSearch: props.onSearch,
|
|
78054
78168
|
placeholder: props.placeholder,
|
|
78055
78169
|
disabled: props.disabledSearch
|
|
78056
78170
|
}
|
|
78057
|
-
), /* @__PURE__ */
|
|
78171
|
+
), /* @__PURE__ */ React83.createElement(FiltersPanelButton, null)), /* @__PURE__ */ React83.createElement(FlexList, { size: "xs", alignItems: "center" }, /* @__PURE__ */ React83.createElement(
|
|
78058
78172
|
RowGroupSelector,
|
|
78059
78173
|
{
|
|
78060
78174
|
localeText: {
|
|
@@ -78063,7 +78177,7 @@ var QuickControls = (props) => {
|
|
|
78063
78177
|
selectedItemsPrefix: I18n.t("dataTable.tableSettings.groupBy")
|
|
78064
78178
|
}
|
|
78065
78179
|
}
|
|
78066
|
-
), /* @__PURE__ */
|
|
78180
|
+
), /* @__PURE__ */ React83.createElement(ConfigPanelButton, null))), /* @__PURE__ */ React83.createElement(
|
|
78067
78181
|
QuickFilters,
|
|
78068
78182
|
{
|
|
78069
78183
|
overlayMatchesTriggerWidth: props.filterOverlayMatchesTriggerWidth
|
|
@@ -80422,7 +80536,7 @@ function generateHTMLString({
|
|
|
80422
80536
|
printStylesElement.innerHTML = pageOptions;
|
|
80423
80537
|
if (Header) {
|
|
80424
80538
|
const printHeader = exportedDocument.createElement("div");
|
|
80425
|
-
printHeader.innerHTML = renderToString(/* @__PURE__ */
|
|
80539
|
+
printHeader.innerHTML = renderToString(/* @__PURE__ */ React83.createElement(Header, null));
|
|
80426
80540
|
printHeader.style.paddingBottom = "12px";
|
|
80427
80541
|
exportedDocument.body.appendChild(printHeader);
|
|
80428
80542
|
}
|
|
@@ -80565,14 +80679,14 @@ var useTableApi = ({
|
|
|
80565
80679
|
setRowHeight: internalSetRowHeight,
|
|
80566
80680
|
searchStorage
|
|
80567
80681
|
} = useInternalTableContext();
|
|
80568
|
-
const columnDefinitionsMap =
|
|
80682
|
+
const columnDefinitionsMap = React83.useMemo(
|
|
80569
80683
|
() => getColumnDefinitionsMap(columnDefinitions),
|
|
80570
80684
|
[columnDefinitions]
|
|
80571
80685
|
);
|
|
80572
|
-
const resetPagination =
|
|
80686
|
+
const resetPagination = React83.useCallback(() => {
|
|
80573
80687
|
gridApi?.paginationGoToPage(0);
|
|
80574
80688
|
}, [gridApi]);
|
|
80575
|
-
const applyListFilter =
|
|
80689
|
+
const applyListFilter = React83.useCallback(
|
|
80576
80690
|
async (field, values2) => {
|
|
80577
80691
|
const filterInstance = gridApi?.getFilterInstance(field);
|
|
80578
80692
|
if (!filterInstance) {
|
|
@@ -80594,7 +80708,7 @@ var useTableApi = ({
|
|
|
80594
80708
|
},
|
|
80595
80709
|
[gridApi, analytics, onTableConfigChange, resetPagination]
|
|
80596
80710
|
);
|
|
80597
|
-
const applyNumberFilter =
|
|
80711
|
+
const applyNumberFilter = React83.useCallback(
|
|
80598
80712
|
async (field, values2) => {
|
|
80599
80713
|
const filterInstance = gridApi?.getFilterInstance(field);
|
|
80600
80714
|
if (!filterInstance) {
|
|
@@ -80617,13 +80731,13 @@ var useTableApi = ({
|
|
|
80617
80731
|
},
|
|
80618
80732
|
[gridApi, analytics, onTableConfigChange, resetPagination]
|
|
80619
80733
|
);
|
|
80620
|
-
const refreshServerSide =
|
|
80734
|
+
const refreshServerSide = React83.useCallback(
|
|
80621
80735
|
(params) => {
|
|
80622
80736
|
gridApi?.refreshServerSide(params);
|
|
80623
80737
|
},
|
|
80624
80738
|
[gridApi]
|
|
80625
80739
|
);
|
|
80626
|
-
const removeFilter =
|
|
80740
|
+
const removeFilter = React83.useCallback(
|
|
80627
80741
|
async (field) => {
|
|
80628
80742
|
await gridApi?.getFilterInstance(field)?.setModel(null);
|
|
80629
80743
|
gridApi?.onFilterChanged();
|
|
@@ -80632,13 +80746,13 @@ var useTableApi = ({
|
|
|
80632
80746
|
},
|
|
80633
80747
|
[gridApi, onTableConfigChange, resetPagination]
|
|
80634
80748
|
);
|
|
80635
|
-
const removeAllFilters =
|
|
80749
|
+
const removeAllFilters = React83.useCallback(() => {
|
|
80636
80750
|
gridApi?.setFilterModel(null);
|
|
80637
80751
|
gridApi?.onFilterChanged();
|
|
80638
80752
|
onTableConfigChange();
|
|
80639
80753
|
resetPagination();
|
|
80640
80754
|
}, [gridApi, onTableConfigChange, resetPagination]);
|
|
80641
|
-
const getListFilter =
|
|
80755
|
+
const getListFilter = React83.useCallback(
|
|
80642
80756
|
async (field) => {
|
|
80643
80757
|
const filterInstance = gridApi?.getFilterInstance(field);
|
|
80644
80758
|
if (!filterInstance) {
|
|
@@ -80665,7 +80779,7 @@ var useTableApi = ({
|
|
|
80665
80779
|
},
|
|
80666
80780
|
[gridApi]
|
|
80667
80781
|
);
|
|
80668
|
-
const getListFilters =
|
|
80782
|
+
const getListFilters = React83.useCallback(
|
|
80669
80783
|
async (fields) => {
|
|
80670
80784
|
const listFields = fields || columnDefinitions.filter((colDef) => colDef.filterRenderer).sort(sortColumnDefinitionsByFilterIndex).map((colDef) => colDef.field);
|
|
80671
80785
|
const listFilters = await Promise.all(
|
|
@@ -80675,11 +80789,11 @@ var useTableApi = ({
|
|
|
80675
80789
|
},
|
|
80676
80790
|
[getListFilter, columnDefinitions]
|
|
80677
80791
|
);
|
|
80678
|
-
const getCellEditorInstances =
|
|
80792
|
+
const getCellEditorInstances = React83.useCallback(
|
|
80679
80793
|
() => gridApi?.getCellEditorInstances() || [],
|
|
80680
80794
|
[gridApi]
|
|
80681
80795
|
);
|
|
80682
|
-
const getBulkEditColumns =
|
|
80796
|
+
const getBulkEditColumns = React83.useCallback(
|
|
80683
80797
|
() => columnDefinitions.filter((colDef) => {
|
|
80684
80798
|
if (!colDef.bulkEditEditor) {
|
|
80685
80799
|
return false;
|
|
@@ -80717,15 +80831,15 @@ var useTableApi = ({
|
|
|
80717
80831
|
}),
|
|
80718
80832
|
[columnDefinitions]
|
|
80719
80833
|
);
|
|
80720
|
-
const isAnyFilterPresent =
|
|
80834
|
+
const isAnyFilterPresent = React83.useCallback(
|
|
80721
80835
|
() => (gridApi?.isColumnFilterPresent() || filterStorage.hasSelectedFilters) ?? false,
|
|
80722
80836
|
[gridApi, filterStorage.hasSelectedFilters]
|
|
80723
80837
|
);
|
|
80724
|
-
const isSearchPresent =
|
|
80838
|
+
const isSearchPresent = React83.useCallback(
|
|
80725
80839
|
() => (gridApi?.isQuickFilterPresent() || !!searchStorage?.searchValue) ?? false,
|
|
80726
80840
|
[gridApi, searchStorage?.searchValue]
|
|
80727
80841
|
);
|
|
80728
|
-
const setColumnVisibility =
|
|
80842
|
+
const setColumnVisibility = React83.useCallback(
|
|
80729
80843
|
(field, visibility) => {
|
|
80730
80844
|
columnApi?.setColumnVisible(field, visibility);
|
|
80731
80845
|
analytics?.client.addEvent(
|
|
@@ -80740,34 +80854,34 @@ var useTableApi = ({
|
|
|
80740
80854
|
},
|
|
80741
80855
|
[columnApi, analytics, onTableConfigChange]
|
|
80742
80856
|
);
|
|
80743
|
-
const setSearchValue =
|
|
80857
|
+
const setSearchValue = React83.useCallback(
|
|
80744
80858
|
(value) => {
|
|
80745
80859
|
gridApi?.setQuickFilter(value);
|
|
80746
80860
|
resetPagination();
|
|
80747
80861
|
},
|
|
80748
80862
|
[gridApi]
|
|
80749
80863
|
);
|
|
80750
|
-
const setLoading =
|
|
80864
|
+
const setLoading = React83.useCallback((loading, message = "") => {
|
|
80751
80865
|
setLoadingStatus({
|
|
80752
80866
|
loading,
|
|
80753
80867
|
message
|
|
80754
80868
|
});
|
|
80755
80869
|
}, []);
|
|
80756
|
-
const setRowGrouping =
|
|
80870
|
+
const setRowGrouping = React83.useCallback(
|
|
80757
80871
|
(value) => {
|
|
80758
80872
|
columnApi?.setRowGroupColumns(value);
|
|
80759
80873
|
resetPagination();
|
|
80760
80874
|
},
|
|
80761
80875
|
[columnApi]
|
|
80762
80876
|
);
|
|
80763
|
-
const setColumnsVisibility =
|
|
80877
|
+
const setColumnsVisibility = React83.useCallback(
|
|
80764
80878
|
(fields, visibility) => {
|
|
80765
80879
|
columnApi?.setColumnsVisible(fields, visibility);
|
|
80766
80880
|
onTableConfigChange();
|
|
80767
80881
|
},
|
|
80768
80882
|
[columnApi, onTableConfigChange]
|
|
80769
80883
|
);
|
|
80770
|
-
const setTableConfiguration =
|
|
80884
|
+
const setTableConfiguration = React83.useCallback(
|
|
80771
80885
|
(config) => {
|
|
80772
80886
|
if (!columnApi || !gridApi) {
|
|
80773
80887
|
return;
|
|
@@ -80799,7 +80913,7 @@ var useTableApi = ({
|
|
|
80799
80913
|
},
|
|
80800
80914
|
[columnApi, gridApi, internalSetRowHeight, filterStorage.setSelectedFilters]
|
|
80801
80915
|
);
|
|
80802
|
-
const exportToCSV =
|
|
80916
|
+
const exportToCSV = React83.useCallback(
|
|
80803
80917
|
({
|
|
80804
80918
|
fileName,
|
|
80805
80919
|
columnKeys,
|
|
@@ -80827,7 +80941,7 @@ var useTableApi = ({
|
|
|
80827
80941
|
},
|
|
80828
80942
|
[analytics, columnDefinitions, gridApi]
|
|
80829
80943
|
);
|
|
80830
|
-
const exportToExcel =
|
|
80944
|
+
const exportToExcel = React83.useCallback(
|
|
80831
80945
|
({ fileName, columnKeys, sheetName = fileName }) => {
|
|
80832
80946
|
function processCellCallback(params) {
|
|
80833
80947
|
const columnId = params?.column?.getColId();
|
|
@@ -80848,7 +80962,7 @@ var useTableApi = ({
|
|
|
80848
80962
|
[analytics, columnDefinitions, gridApi]
|
|
80849
80963
|
);
|
|
80850
80964
|
const I18n = useI18nContext();
|
|
80851
|
-
const exportToHTMLString =
|
|
80965
|
+
const exportToHTMLString = React83.useCallback(
|
|
80852
80966
|
async (config = {}) => {
|
|
80853
80967
|
const tableContainer = wrapperRef.current;
|
|
80854
80968
|
if (!columnApi || !gridApi || !tableContainer) {
|
|
@@ -80875,13 +80989,13 @@ var useTableApi = ({
|
|
|
80875
80989
|
},
|
|
80876
80990
|
[analytics, columnApi, gridApi, I18n, setLoading]
|
|
80877
80991
|
);
|
|
80878
|
-
const setRowHeight =
|
|
80992
|
+
const setRowHeight = React83.useCallback(
|
|
80879
80993
|
(size) => {
|
|
80880
80994
|
internalSetRowHeight(size);
|
|
80881
80995
|
},
|
|
80882
80996
|
[internalSetRowHeight]
|
|
80883
80997
|
);
|
|
80884
|
-
const gridApiMethods =
|
|
80998
|
+
const gridApiMethods = React83.useMemo(
|
|
80885
80999
|
() => buildPartialTableApi({
|
|
80886
81000
|
gridApi,
|
|
80887
81001
|
columnApi,
|
|
@@ -80926,7 +81040,7 @@ var useTableApi = ({
|
|
|
80926
81040
|
rowNodes: rowValues.map((rowValue) => rowValue.node)
|
|
80927
81041
|
});
|
|
80928
81042
|
};
|
|
80929
|
-
const selectRows =
|
|
81043
|
+
const selectRows = React83.useCallback(
|
|
80930
81044
|
(rowIds, source) => {
|
|
80931
81045
|
rowIds?.forEach((id) => {
|
|
80932
81046
|
const rowNode = gridApi?.getRowNode(id.toString());
|
|
@@ -80938,7 +81052,7 @@ var useTableApi = ({
|
|
|
80938
81052
|
},
|
|
80939
81053
|
[gridApi]
|
|
80940
81054
|
);
|
|
80941
|
-
const deselectRows =
|
|
81055
|
+
const deselectRows = React83.useCallback(
|
|
80942
81056
|
(rowIds, source) => {
|
|
80943
81057
|
rowIds?.forEach((id) => {
|
|
80944
81058
|
const rowNode = gridApi?.getRowNode(id.toString());
|
|
@@ -81210,12 +81324,12 @@ var DataTable = ({
|
|
|
81210
81324
|
onTableConfigChange,
|
|
81211
81325
|
translations: translations2 = {}
|
|
81212
81326
|
}) => {
|
|
81213
|
-
const [initialTableConfig] =
|
|
81214
|
-
const onServerSideDataRequestRef =
|
|
81215
|
-
const tableRef =
|
|
81216
|
-
const [totalRowCount, setTotalRowCount] =
|
|
81217
|
-
const [selectedGroupIndex, setSelectedGroupIndex] =
|
|
81218
|
-
const [initialConfigSet, setInitialConfigSet] =
|
|
81327
|
+
const [initialTableConfig] = React83.useState(_initialTableConfig);
|
|
81328
|
+
const onServerSideDataRequestRef = React83.useRef(onServerSideDataRequest);
|
|
81329
|
+
const tableRef = React83.useRef(null);
|
|
81330
|
+
const [totalRowCount, setTotalRowCount] = React83.useState(0);
|
|
81331
|
+
const [selectedGroupIndex, setSelectedGroupIndex] = React83.useState(null);
|
|
81332
|
+
const [initialConfigSet, setInitialConfigSet] = React83.useState(
|
|
81219
81333
|
!_initialTableConfig
|
|
81220
81334
|
);
|
|
81221
81335
|
const contextPanel = useContextPanel();
|
|
@@ -81229,7 +81343,7 @@ var DataTable = ({
|
|
|
81229
81343
|
translations
|
|
81230
81344
|
)
|
|
81231
81345
|
});
|
|
81232
|
-
const rowSelectionRef =
|
|
81346
|
+
const rowSelectionRef = React83.useRef({
|
|
81233
81347
|
affectedRows: {},
|
|
81234
81348
|
getRowId
|
|
81235
81349
|
});
|
|
@@ -81244,18 +81358,18 @@ var DataTable = ({
|
|
|
81244
81358
|
}
|
|
81245
81359
|
return missingTranslation(scope2, options);
|
|
81246
81360
|
};
|
|
81247
|
-
const columns =
|
|
81361
|
+
const columns = React83.useMemo(
|
|
81248
81362
|
() => flattenColumnDefinitions(_columnDefinitions),
|
|
81249
81363
|
[_columnDefinitions]
|
|
81250
81364
|
);
|
|
81251
|
-
const columnMapByField =
|
|
81365
|
+
const columnMapByField = React83.useMemo(() => {
|
|
81252
81366
|
const mapByField = /* @__PURE__ */ new Map();
|
|
81253
81367
|
columns.forEach((column2) => {
|
|
81254
81368
|
mapByField.set(column2.field, column2);
|
|
81255
81369
|
});
|
|
81256
81370
|
return mapByField;
|
|
81257
81371
|
}, [columns]);
|
|
81258
|
-
const getColumnDefinition =
|
|
81372
|
+
const getColumnDefinition = React83.useCallback(
|
|
81259
81373
|
(field) => {
|
|
81260
81374
|
if (field === void 0) {
|
|
81261
81375
|
return void 0;
|
|
@@ -81264,14 +81378,14 @@ var DataTable = ({
|
|
|
81264
81378
|
},
|
|
81265
81379
|
[columnMapByField]
|
|
81266
81380
|
);
|
|
81267
|
-
const [rowHeight, setRowHeight] =
|
|
81381
|
+
const [rowHeight, setRowHeight] = React83.useState(
|
|
81268
81382
|
initialTableConfig?.rowHeight || rowSize.md
|
|
81269
81383
|
);
|
|
81270
|
-
const rowHeightRef =
|
|
81384
|
+
const rowHeightRef = React83.useRef(
|
|
81271
81385
|
initialTableConfig?.rowHeight || rowSize.md
|
|
81272
81386
|
);
|
|
81273
|
-
const [gridApi, setGridApi] =
|
|
81274
|
-
const [columnApi, setColumnApi] =
|
|
81387
|
+
const [gridApi, setGridApi] = React83.useState();
|
|
81388
|
+
const [columnApi, setColumnApi] = React83.useState();
|
|
81275
81389
|
const searchStorage = useSearchStorage();
|
|
81276
81390
|
const filterState = useFilterState({
|
|
81277
81391
|
columnDefinitions: columns,
|
|
@@ -81283,8 +81397,8 @@ var DataTable = ({
|
|
|
81283
81397
|
initialSelectedFilters: initialTableConfig?.serverFilters,
|
|
81284
81398
|
getColumnDefinition
|
|
81285
81399
|
});
|
|
81286
|
-
const checkboxColumn =
|
|
81287
|
-
|
|
81400
|
+
const checkboxColumn = React83.useRef(null);
|
|
81401
|
+
React83.useEffect(() => {
|
|
81288
81402
|
if (gridApi && columnApi) {
|
|
81289
81403
|
if (!checkboxColumn.current) {
|
|
81290
81404
|
checkboxColumn.current = getCheckboxColumn(columnApi);
|
|
@@ -81295,7 +81409,7 @@ var DataTable = ({
|
|
|
81295
81409
|
}
|
|
81296
81410
|
}
|
|
81297
81411
|
}, [gridApi, columnApi, initialTableConfig, initialConfigSet]);
|
|
81298
|
-
const internalOnTableConfigChange =
|
|
81412
|
+
const internalOnTableConfigChange = React83.useCallback(() => {
|
|
81299
81413
|
const newCheckboxColumn = getCheckboxColumn(columnApi);
|
|
81300
81414
|
if (newCheckboxColumn !== checkboxColumn.current) {
|
|
81301
81415
|
gridApi?.refreshCells({
|
|
@@ -81320,10 +81434,10 @@ var DataTable = ({
|
|
|
81320
81434
|
if (!_isEqual(filtersRef.current, filterStorage.selectedFilters)) {
|
|
81321
81435
|
filtersRef.current = filterStorage.selectedFilters;
|
|
81322
81436
|
}
|
|
81323
|
-
|
|
81437
|
+
React83.useEffect(() => {
|
|
81324
81438
|
onServerSideDataRequestRef.current = onServerSideDataRequest;
|
|
81325
81439
|
}, [onServerSideDataRequest]);
|
|
81326
|
-
|
|
81440
|
+
React83.useEffect(() => {
|
|
81327
81441
|
if (onServerSideDataRequestRef.current && gridApi && initialConfigSet) {
|
|
81328
81442
|
gridApi?.setServerSideDatasource(
|
|
81329
81443
|
getServerSideDatasource(
|
|
@@ -81344,7 +81458,7 @@ var DataTable = ({
|
|
|
81344
81458
|
searchStorage.searchValue,
|
|
81345
81459
|
initialConfigSet
|
|
81346
81460
|
]);
|
|
81347
|
-
const internalSetRowHeight =
|
|
81461
|
+
const internalSetRowHeight = React83.useCallback(
|
|
81348
81462
|
(tableRowHeight, createTrackEvent = true, triggerTableConfigChange = true) => {
|
|
81349
81463
|
rowHeightRef.current = tableRowHeight;
|
|
81350
81464
|
setRowHeight(tableRowHeight);
|
|
@@ -81367,7 +81481,7 @@ var DataTable = ({
|
|
|
81367
81481
|
},
|
|
81368
81482
|
[analytics, gridApi, internalOnTableConfigChange]
|
|
81369
81483
|
);
|
|
81370
|
-
const getRowHeight =
|
|
81484
|
+
const getRowHeight = React83.useCallback(
|
|
81371
81485
|
(customFooters) => (params) => {
|
|
81372
81486
|
if (params.node.rowPinned === "bottom") {
|
|
81373
81487
|
if (params.data.footerId === "grandTotal") {
|
|
@@ -81389,7 +81503,7 @@ var DataTable = ({
|
|
|
81389
81503
|
Object.prototype.hasOwnProperty.call(params, "search") && searchStorage.setSearchValue(params.search || "");
|
|
81390
81504
|
params.filter && filterStorage.onChangeFilterValue(params.filter);
|
|
81391
81505
|
};
|
|
81392
|
-
return /* @__PURE__ */
|
|
81506
|
+
return /* @__PURE__ */ React83.createElement(I18nContext.Provider, { value: internalI18n }, /* @__PURE__ */ React83.createElement(ToastAlertProvider, null, /* @__PURE__ */ React83.createElement(
|
|
81393
81507
|
InternalTableContext.Provider,
|
|
81394
81508
|
{
|
|
81395
81509
|
value: {
|
|
@@ -81483,12 +81597,12 @@ var Table = (props) => {
|
|
|
81483
81597
|
const clientSideRowData = props.rows ? { rowData: props.rows } : {};
|
|
81484
81598
|
const serverSideInfiniteScroll = internalTableContext.onServerSideDataRequest ? { serverSideInfiniteScroll: true } : {};
|
|
81485
81599
|
const { columnApi, getRowHeight, gridApi } = internalTableContext;
|
|
81486
|
-
const [viewportWidth, setViewportWidth] =
|
|
81487
|
-
const rowActionsWidth =
|
|
81488
|
-
const [tableHeight, setTableHeight] =
|
|
81489
|
-
const frameworkComponentsInitialized =
|
|
81600
|
+
const [viewportWidth, setViewportWidth] = React83.useState(0);
|
|
81601
|
+
const rowActionsWidth = React83.useRef(0);
|
|
81602
|
+
const [tableHeight, setTableHeight] = React83.useState(0);
|
|
81603
|
+
const frameworkComponentsInitialized = React83.useRef(false);
|
|
81490
81604
|
const selectedGroupIndex = internalTableContext.selectedGroupIndex ?? null;
|
|
81491
|
-
const tableRowSelectionEnabled =
|
|
81605
|
+
const tableRowSelectionEnabled = React83.useMemo(() => {
|
|
81492
81606
|
const bulkActionsEnabled = internalTableContext.columnDefinitions.some(
|
|
81493
81607
|
(colDef) => {
|
|
81494
81608
|
return !!colDef.bulkEditEditor;
|
|
@@ -81497,15 +81611,15 @@ var Table = (props) => {
|
|
|
81497
81611
|
return Boolean(bulkActionsEnabled || props.rowSelectionEnabled);
|
|
81498
81612
|
}, [props.rowSelectionEnabled, internalTableContext.columnDefinitions]);
|
|
81499
81613
|
const { rowSelectionRef } = internalTableContext;
|
|
81500
|
-
const [frameworkComponents, setFrameworkComponents] =
|
|
81614
|
+
const [frameworkComponents, setFrameworkComponents] = React83.useState(
|
|
81501
81615
|
getFrameworkComponents(
|
|
81502
81616
|
headerMenuConfig,
|
|
81503
81617
|
props.onSelectAll,
|
|
81504
81618
|
props.selectionSSREnabled
|
|
81505
81619
|
)
|
|
81506
81620
|
);
|
|
81507
|
-
const wrapperRef =
|
|
81508
|
-
const [loadingStatus, setLoadingStatus] =
|
|
81621
|
+
const wrapperRef = React83.useRef(null);
|
|
81622
|
+
const [loadingStatus, setLoadingStatus] = React83.useState({
|
|
81509
81623
|
loading: props.loading || false,
|
|
81510
81624
|
message: I18n.t("loadingLabel") || ""
|
|
81511
81625
|
});
|
|
@@ -81516,10 +81630,10 @@ var Table = (props) => {
|
|
|
81516
81630
|
setLoadingStatus,
|
|
81517
81631
|
wrapperRef
|
|
81518
81632
|
});
|
|
81519
|
-
|
|
81633
|
+
React83.useImperativeHandle(internalTableContext.tableRef, () => tableApi, [
|
|
81520
81634
|
tableApi
|
|
81521
81635
|
]);
|
|
81522
|
-
const decoratedColDefs =
|
|
81636
|
+
const decoratedColDefs = React83.useMemo(
|
|
81523
81637
|
() => internalTableContext.columnDefinitions?.map(
|
|
81524
81638
|
(colDef) => transformToColDef(
|
|
81525
81639
|
colDef,
|
|
@@ -81529,24 +81643,24 @@ var Table = (props) => {
|
|
|
81529
81643
|
),
|
|
81530
81644
|
[internalTableContext.columnDefinitions]
|
|
81531
81645
|
);
|
|
81532
|
-
const hasRowActions =
|
|
81646
|
+
const hasRowActions = React83.useMemo(
|
|
81533
81647
|
() => decoratedColDefs.some(({ field }) => field === "rowActions"),
|
|
81534
81648
|
[decoratedColDefs]
|
|
81535
81649
|
);
|
|
81536
81650
|
if (props.rowActions && !hasRowActions) {
|
|
81537
81651
|
rowActionsWidth.current = 70 + 40 * (props.rowActions.length - 1);
|
|
81538
81652
|
}
|
|
81539
|
-
const columnGroupBordersEnabled =
|
|
81653
|
+
const columnGroupBordersEnabled = React83.useMemo(() => {
|
|
81540
81654
|
if (props.suppressColumnGroupBorders !== void 0) {
|
|
81541
81655
|
return !props.suppressColumnGroupBorders;
|
|
81542
81656
|
}
|
|
81543
81657
|
return true;
|
|
81544
81658
|
}, [props.suppressColumnGroupBorders]);
|
|
81545
|
-
const getMainTableRowHeight =
|
|
81659
|
+
const getMainTableRowHeight = React83.useMemo(
|
|
81546
81660
|
() => getRowHeight(props.customFooters),
|
|
81547
81661
|
[props.customFooters]
|
|
81548
81662
|
);
|
|
81549
|
-
const updateDomLayout =
|
|
81663
|
+
const updateDomLayout = React83.useCallback(() => {
|
|
81550
81664
|
if (!gridApi) {
|
|
81551
81665
|
return;
|
|
81552
81666
|
}
|
|
@@ -81564,7 +81678,7 @@ var Table = (props) => {
|
|
|
81564
81678
|
gridApi.setDomLayout(domLayout);
|
|
81565
81679
|
setTableHeight(internalTableHeight);
|
|
81566
81680
|
}, [getMainTableRowHeight, gridApi, props.maxHeight]);
|
|
81567
|
-
const rowClassRules =
|
|
81681
|
+
const rowClassRules = React83.useMemo(() => {
|
|
81568
81682
|
return {
|
|
81569
81683
|
/**
|
|
81570
81684
|
* Row active class
|
|
@@ -81599,7 +81713,7 @@ var Table = (props) => {
|
|
|
81599
81713
|
gridApi?.setHeaderHeight(maxHeight);
|
|
81600
81714
|
}
|
|
81601
81715
|
}
|
|
81602
|
-
|
|
81716
|
+
React83.useEffect(() => {
|
|
81603
81717
|
if (gridApi && columnApi && internalTableContext.tableRef?.current) {
|
|
81604
81718
|
props.onTableReady?.(
|
|
81605
81719
|
internalTableContext.tableRef.current,
|
|
@@ -81617,19 +81731,19 @@ var Table = (props) => {
|
|
|
81617
81731
|
}
|
|
81618
81732
|
return;
|
|
81619
81733
|
}, [gridApi, columnApi]);
|
|
81620
|
-
|
|
81734
|
+
React83.useEffect(() => {
|
|
81621
81735
|
if (props.onRowDragEnd && Boolean(decoratedColDefs[0].rowDrag) === false) {
|
|
81622
81736
|
decoratedColDefs[0].rowDrag = true;
|
|
81623
81737
|
}
|
|
81624
81738
|
}, [props.onRowDragEnd, decoratedColDefs]);
|
|
81625
81739
|
const loadingLabel = I18n.t("loadingLabel");
|
|
81626
|
-
|
|
81740
|
+
React83.useEffect(() => {
|
|
81627
81741
|
tableApi.setLoading(props.loading || false, loadingLabel);
|
|
81628
81742
|
}, [props.loading]);
|
|
81629
|
-
|
|
81743
|
+
React83.useEffect(() => {
|
|
81630
81744
|
updateDomLayout();
|
|
81631
81745
|
}, [updateDomLayout]);
|
|
81632
|
-
|
|
81746
|
+
React83.useEffect(() => {
|
|
81633
81747
|
if (!gridApi) {
|
|
81634
81748
|
return;
|
|
81635
81749
|
}
|
|
@@ -81682,7 +81796,7 @@ var Table = (props) => {
|
|
|
81682
81796
|
props.rowActions,
|
|
81683
81797
|
props.suppressColumnVirtualisation
|
|
81684
81798
|
]);
|
|
81685
|
-
|
|
81799
|
+
React83.useEffect(() => {
|
|
81686
81800
|
if (frameworkComponentsInitialized.current === true) {
|
|
81687
81801
|
console.warn("Don't update custom cells after the initial render.");
|
|
81688
81802
|
setFrameworkComponents(
|
|
@@ -81695,7 +81809,7 @@ var Table = (props) => {
|
|
|
81695
81809
|
}
|
|
81696
81810
|
frameworkComponentsInitialized.current = true;
|
|
81697
81811
|
}, []);
|
|
81698
|
-
|
|
81812
|
+
React83.useEffect(() => {
|
|
81699
81813
|
if (props.siblingGroupsRowSelectionDisabled) {
|
|
81700
81814
|
setSiblingGroupsRowSelection(selectedGroupIndex, gridApi);
|
|
81701
81815
|
}
|
|
@@ -81708,7 +81822,7 @@ var Table = (props) => {
|
|
|
81708
81822
|
params.getValue(params.colDef.field)
|
|
81709
81823
|
);
|
|
81710
81824
|
}
|
|
81711
|
-
return /* @__PURE__ */
|
|
81825
|
+
return /* @__PURE__ */ React83.createElement(React83.Fragment, null, /* @__PURE__ */ React83.createElement(Typography, { weight: "semibold", intent: "small", color: "gray45" }, params.getValue(params.colDef.field)), " ", I18n.t("core.dataTable.subtotals"));
|
|
81712
81826
|
}
|
|
81713
81827
|
function onCellValueChanged(event) {
|
|
81714
81828
|
if (props.onCellValueChanged) {
|
|
@@ -81721,7 +81835,7 @@ var Table = (props) => {
|
|
|
81721
81835
|
});
|
|
81722
81836
|
}
|
|
81723
81837
|
}
|
|
81724
|
-
const onModelUpdated =
|
|
81838
|
+
const onModelUpdated = React83.useCallback(
|
|
81725
81839
|
async (event) => {
|
|
81726
81840
|
if (!props.pinnedBottomRowData) {
|
|
81727
81841
|
const pinnedBottomRows = buildPinnedBottomRows(
|
|
@@ -81754,7 +81868,7 @@ var Table = (props) => {
|
|
|
81754
81868
|
gridApi
|
|
81755
81869
|
]
|
|
81756
81870
|
);
|
|
81757
|
-
const internalOnCellValueChanged =
|
|
81871
|
+
const internalOnCellValueChanged = React83.useCallback(
|
|
81758
81872
|
async (event) => {
|
|
81759
81873
|
if (event.api?.isAnyFilterPresent()) {
|
|
81760
81874
|
event.api.onFilterChanged();
|
|
@@ -81766,7 +81880,7 @@ var Table = (props) => {
|
|
|
81766
81880
|
},
|
|
81767
81881
|
[onModelUpdated]
|
|
81768
81882
|
);
|
|
81769
|
-
const isFullWidthRow =
|
|
81883
|
+
const isFullWidthRow = React83.useCallback(
|
|
81770
81884
|
(node) => {
|
|
81771
81885
|
if (props.isFullWidth) {
|
|
81772
81886
|
return props.isFullWidth(node.data);
|
|
@@ -81775,7 +81889,7 @@ var Table = (props) => {
|
|
|
81775
81889
|
},
|
|
81776
81890
|
[props]
|
|
81777
81891
|
);
|
|
81778
|
-
const isRowSelectable =
|
|
81892
|
+
const isRowSelectable = React83.useCallback(
|
|
81779
81893
|
(node) => {
|
|
81780
81894
|
if (typeof props.rowSelectionEnabled === "boolean") {
|
|
81781
81895
|
return props.rowSelectionEnabled;
|
|
@@ -81792,7 +81906,7 @@ var Table = (props) => {
|
|
|
81792
81906
|
},
|
|
81793
81907
|
[props]
|
|
81794
81908
|
);
|
|
81795
|
-
const decoratedAutoGroupColDef =
|
|
81909
|
+
const decoratedAutoGroupColDef = React83.useMemo(
|
|
81796
81910
|
() => getDecoratedAutoGroupColDef(
|
|
81797
81911
|
props?.autoGroupColumnDefinition,
|
|
81798
81912
|
internalTableContext.enableGroupEditAndValidation,
|
|
@@ -81802,7 +81916,7 @@ var Table = (props) => {
|
|
|
81802
81916
|
),
|
|
81803
81917
|
[props?.autoGroupColumnDefinition]
|
|
81804
81918
|
);
|
|
81805
|
-
const onColumnGroupOpened =
|
|
81919
|
+
const onColumnGroupOpened = React83.useCallback(
|
|
81806
81920
|
(event) => {
|
|
81807
81921
|
internalTableContext.analytics?.client.addEvent(
|
|
81808
81922
|
"design_system.data_table.column.expand_toggled",
|
|
@@ -81819,7 +81933,7 @@ var Table = (props) => {
|
|
|
81819
81933
|
},
|
|
81820
81934
|
[internalTableContext, columnGroupBordersEnabled]
|
|
81821
81935
|
);
|
|
81822
|
-
const onColumnPinned =
|
|
81936
|
+
const onColumnPinned = React83.useCallback(
|
|
81823
81937
|
(event) => {
|
|
81824
81938
|
internalTableContext.analytics?.client.addEvent(
|
|
81825
81939
|
"design_system.data_table.column.pinned",
|
|
@@ -81837,11 +81951,11 @@ var Table = (props) => {
|
|
|
81837
81951
|
},
|
|
81838
81952
|
[columnApi, internalTableContext]
|
|
81839
81953
|
);
|
|
81840
|
-
const onColumnResized =
|
|
81954
|
+
const onColumnResized = React83.useCallback(() => {
|
|
81841
81955
|
internalTableContext.onTableConfigChange();
|
|
81842
81956
|
setHeaderHeight();
|
|
81843
81957
|
}, [internalTableContext.onTableConfigChange]);
|
|
81844
|
-
const onDisplayedColumnsChanged =
|
|
81958
|
+
const onDisplayedColumnsChanged = React83.useCallback(
|
|
81845
81959
|
(event) => {
|
|
81846
81960
|
if (props.onRowDragEnd) {
|
|
81847
81961
|
if (event.columnApi?.destroyCalled)
|
|
@@ -81854,14 +81968,14 @@ var Table = (props) => {
|
|
|
81854
81968
|
},
|
|
81855
81969
|
[props.onRowDragEnd]
|
|
81856
81970
|
);
|
|
81857
|
-
const onColumnMoved =
|
|
81971
|
+
const onColumnMoved = React83.useCallback(
|
|
81858
81972
|
(event) => {
|
|
81859
81973
|
moveColumnEvent = event;
|
|
81860
81974
|
internalTableContext.onTableConfigChange();
|
|
81861
81975
|
},
|
|
81862
81976
|
[internalTableContext.onTableConfigChange]
|
|
81863
81977
|
);
|
|
81864
|
-
const onSortEventChanged =
|
|
81978
|
+
const onSortEventChanged = React83.useCallback(
|
|
81865
81979
|
(event) => {
|
|
81866
81980
|
const { columnApi: columnApi2 } = event;
|
|
81867
81981
|
const columnState = columnApi2.getColumnState();
|
|
@@ -81901,7 +82015,7 @@ var Table = (props) => {
|
|
|
81901
82015
|
});
|
|
81902
82016
|
}
|
|
81903
82017
|
}
|
|
81904
|
-
const onDragStopped =
|
|
82018
|
+
const onDragStopped = React83.useCallback(
|
|
81905
82019
|
// eslint-disable-next-line complexity
|
|
81906
82020
|
(event) => {
|
|
81907
82021
|
if (event.target.className.includes("ag-header-cell")) {
|
|
@@ -81950,16 +82064,16 @@ var Table = (props) => {
|
|
|
81950
82064
|
props.rows
|
|
81951
82065
|
]
|
|
81952
82066
|
);
|
|
81953
|
-
const onRowDragEnd =
|
|
82067
|
+
const onRowDragEnd = React83.useCallback((event) => {
|
|
81954
82068
|
rowDragEndEvent = event;
|
|
81955
82069
|
}, []);
|
|
81956
|
-
const onRowDragMove =
|
|
82070
|
+
const onRowDragMove = React83.useCallback((event) => {
|
|
81957
82071
|
rowDragMoveEvent = event;
|
|
81958
82072
|
}, []);
|
|
81959
|
-
const previousGroupedFields =
|
|
82073
|
+
const previousGroupedFields = React83.useRef(
|
|
81960
82074
|
internalTableContext.initialTableConfig?.columnState?.filter((cs) => cs.rowGroup).sort((a, b) => a.rowGroupIndex - b.rowGroupIndex).map((cs) => cs.field) || []
|
|
81961
82075
|
);
|
|
81962
|
-
const onColumnRowGroupChanged =
|
|
82076
|
+
const onColumnRowGroupChanged = React83.useCallback(() => {
|
|
81963
82077
|
const currentGroupedFields = columnApi?.getRowGroupColumns().map((c) => c.getColId()) || [];
|
|
81964
82078
|
const groupedFieldsAdded = currentGroupedFields.filter(
|
|
81965
82079
|
(f) => !previousGroupedFields.current.includes(f)
|
|
@@ -81993,7 +82107,7 @@ var Table = (props) => {
|
|
|
81993
82107
|
previousGroupedFields.current = currentGroupedFields;
|
|
81994
82108
|
internalTableContext.onTableConfigChange();
|
|
81995
82109
|
}, [columnApi, internalTableContext]);
|
|
81996
|
-
const onContainerResize =
|
|
82110
|
+
const onContainerResize = React83.useCallback(() => {
|
|
81997
82111
|
setViewportWidth(
|
|
81998
82112
|
document.getElementsByClassName("ag-body-viewport")[0]?.clientWidth
|
|
81999
82113
|
);
|
|
@@ -82022,7 +82136,7 @@ var Table = (props) => {
|
|
|
82022
82136
|
}
|
|
82023
82137
|
}
|
|
82024
82138
|
};
|
|
82025
|
-
const internalRowGroupOpened =
|
|
82139
|
+
const internalRowGroupOpened = React83.useCallback(
|
|
82026
82140
|
(event) => {
|
|
82027
82141
|
props.onRowGroupOpened?.({
|
|
82028
82142
|
expanded: event.expanded,
|
|
@@ -82032,7 +82146,7 @@ var Table = (props) => {
|
|
|
82032
82146
|
},
|
|
82033
82147
|
[props.onRowGroupOpened]
|
|
82034
82148
|
);
|
|
82035
|
-
const getGroupRowAgg =
|
|
82149
|
+
const getGroupRowAgg = React83.useCallback(
|
|
82036
82150
|
(params) => {
|
|
82037
82151
|
const agNodes = params.nodes;
|
|
82038
82152
|
if (!props.getGroupRowAgg) {
|
|
@@ -82053,7 +82167,7 @@ var Table = (props) => {
|
|
|
82053
82167
|
},
|
|
82054
82168
|
[props.getGroupRowAgg]
|
|
82055
82169
|
);
|
|
82056
|
-
const defaultColDef =
|
|
82170
|
+
const defaultColDef = React83.useMemo(
|
|
82057
82171
|
function() {
|
|
82058
82172
|
return {
|
|
82059
82173
|
cellDataType: false,
|
|
@@ -82099,7 +82213,7 @@ var Table = (props) => {
|
|
|
82099
82213
|
props.detailRowConfig
|
|
82100
82214
|
]
|
|
82101
82215
|
);
|
|
82102
|
-
const detailRowConfigProps =
|
|
82216
|
+
const detailRowConfigProps = React83.useMemo(() => {
|
|
82103
82217
|
return buildDetailRowsConfig({
|
|
82104
82218
|
detailRowConfig: props.detailRowConfig,
|
|
82105
82219
|
detailRowConfigs: props.detailRowConfigs,
|
|
@@ -82120,12 +82234,12 @@ var Table = (props) => {
|
|
|
82120
82234
|
props.emptyStateRenderer,
|
|
82121
82235
|
frameworkComponents
|
|
82122
82236
|
]);
|
|
82123
|
-
|
|
82237
|
+
React83.useEffect(() => {
|
|
82124
82238
|
getCurrentRows(gridApi).forEach(
|
|
82125
82239
|
(rowNode) => rowNode.selectable = !!isRowSelectable(rowNode)
|
|
82126
82240
|
);
|
|
82127
82241
|
}, [isRowSelectable]);
|
|
82128
|
-
|
|
82242
|
+
React83.useEffect(() => {
|
|
82129
82243
|
rowSelectionRef.current = {
|
|
82130
82244
|
affectedRows: {},
|
|
82131
82245
|
enabled: props.rowSelectionEnabled,
|
|
@@ -82138,7 +82252,7 @@ var Table = (props) => {
|
|
|
82138
82252
|
["onGridReady"],
|
|
82139
82253
|
props.UNSAFE_internalAGGridOverrides ?? {}
|
|
82140
82254
|
);
|
|
82141
|
-
return /* @__PURE__ */
|
|
82255
|
+
return /* @__PURE__ */ React83.createElement(
|
|
82142
82256
|
Spinner,
|
|
82143
82257
|
{
|
|
82144
82258
|
loading: loadingStatus.loading,
|
|
@@ -82150,14 +82264,14 @@ var Table = (props) => {
|
|
|
82150
82264
|
flexDirection: "column"
|
|
82151
82265
|
}
|
|
82152
82266
|
},
|
|
82153
|
-
/* @__PURE__ */
|
|
82267
|
+
/* @__PURE__ */ React83.createElement(
|
|
82154
82268
|
ReactResizeDetector,
|
|
82155
82269
|
{
|
|
82156
82270
|
onResize: onContainerResize,
|
|
82157
82271
|
refreshMode: "debounce",
|
|
82158
82272
|
refreshRate: 400
|
|
82159
82273
|
},
|
|
82160
|
-
/* @__PURE__ */
|
|
82274
|
+
/* @__PURE__ */ React83.createElement(
|
|
82161
82275
|
"div",
|
|
82162
82276
|
{
|
|
82163
82277
|
style: {
|
|
@@ -82171,11 +82285,11 @@ var Table = (props) => {
|
|
|
82171
82285
|
ref: wrapperRef,
|
|
82172
82286
|
"data-qa": loadingStatus.loading ? "loading" : "loaded"
|
|
82173
82287
|
},
|
|
82174
|
-
/* @__PURE__ */
|
|
82288
|
+
/* @__PURE__ */ React83.createElement("style", null, `:root {
|
|
82175
82289
|
--viewport-width: ${viewportWidth}px;
|
|
82176
82290
|
--rowActions-width: ${rowActionsWidth.current}px;
|
|
82177
82291
|
}`),
|
|
82178
|
-
/* @__PURE__ */
|
|
82292
|
+
/* @__PURE__ */ React83.createElement(
|
|
82179
82293
|
AgGridReact,
|
|
82180
82294
|
{
|
|
82181
82295
|
aggFuncs: aggregationFunctions_exports,
|
|
@@ -82274,7 +82388,7 @@ var Table = (props) => {
|
|
|
82274
82388
|
)
|
|
82275
82389
|
)
|
|
82276
82390
|
),
|
|
82277
|
-
props.pagination && gridApi && /* @__PURE__ */
|
|
82391
|
+
props.pagination && gridApi && /* @__PURE__ */ React83.createElement(
|
|
82278
82392
|
TablePagination,
|
|
82279
82393
|
{
|
|
82280
82394
|
gridApi,
|
|
@@ -82291,11 +82405,11 @@ var TablePagination = ({
|
|
|
82291
82405
|
pageSize,
|
|
82292
82406
|
totalRowCount
|
|
82293
82407
|
}) => {
|
|
82294
|
-
const [pagination, setPagination] =
|
|
82408
|
+
const [pagination, setPagination] = React83.useState({
|
|
82295
82409
|
page: 0,
|
|
82296
82410
|
items: 0
|
|
82297
82411
|
});
|
|
82298
|
-
|
|
82412
|
+
React83.useEffect(() => {
|
|
82299
82413
|
function onPaginationChanged(params) {
|
|
82300
82414
|
if (gridApi && params.api.paginationGetCurrentPage() !== pagination.page || pagination.items !== params.api.paginationGetRowCount()) {
|
|
82301
82415
|
setPagination({
|
|
@@ -82313,7 +82427,7 @@ var TablePagination = ({
|
|
|
82313
82427
|
);
|
|
82314
82428
|
};
|
|
82315
82429
|
}, []);
|
|
82316
|
-
return /* @__PURE__ */
|
|
82430
|
+
return /* @__PURE__ */ React83.createElement(
|
|
82317
82431
|
Pagination,
|
|
82318
82432
|
{
|
|
82319
82433
|
activePage: pagination.page + 1,
|
|
@@ -82332,7 +82446,7 @@ var ContextPanel = ({
|
|
|
82332
82446
|
...props
|
|
82333
82447
|
}) => {
|
|
82334
82448
|
const { contextPanel } = useInternalTableContext();
|
|
82335
|
-
return /* @__PURE__ */
|
|
82449
|
+
return /* @__PURE__ */ React83.createElement(
|
|
82336
82450
|
Card,
|
|
82337
82451
|
{
|
|
82338
82452
|
className: cx21("contextPanel", className, {
|
|
@@ -82341,7 +82455,7 @@ var ContextPanel = ({
|
|
|
82341
82455
|
"data-qa": "data-table-context-panel",
|
|
82342
82456
|
...props
|
|
82343
82457
|
},
|
|
82344
|
-
/* @__PURE__ */
|
|
82458
|
+
/* @__PURE__ */ React83.createElement(Box, { className: cx21("contextPanelWrapper"), display: "flex-column" }, contextPanel.content === "configuration" && /* @__PURE__ */ React83.createElement(ConfigurationPanel, null), contextPanel.content === "bulkEdit" && /* @__PURE__ */ React83.createElement(BulkEditPanel, null), contextPanel.content === "custom" && children)
|
|
82345
82459
|
);
|
|
82346
82460
|
};
|
|
82347
82461
|
function isLastColumnInGroup(params) {
|
|
@@ -82395,7 +82509,7 @@ var ClientSideDataTable = ({
|
|
|
82395
82509
|
onTableConfigChange,
|
|
82396
82510
|
translations: translations2 = {}
|
|
82397
82511
|
}) => {
|
|
82398
|
-
return /* @__PURE__ */
|
|
82512
|
+
return /* @__PURE__ */ React83.createElement(
|
|
82399
82513
|
DataTable,
|
|
82400
82514
|
{
|
|
82401
82515
|
analytics,
|
|
@@ -82415,10 +82529,10 @@ var ClientSideDataTable = ({
|
|
|
82415
82529
|
};
|
|
82416
82530
|
var Table2 = (props) => {
|
|
82417
82531
|
const internalTableContext = useInternalTableContext();
|
|
82418
|
-
|
|
82532
|
+
React83.useEffect(() => {
|
|
82419
82533
|
internalTableContext.setTotalRowCount(props.rows?.length ?? 0);
|
|
82420
82534
|
}, [props.rows]);
|
|
82421
|
-
return /* @__PURE__ */
|
|
82535
|
+
return /* @__PURE__ */ React83.createElement(Table, { ...props, modules: [ClientSideRowModelModule] });
|
|
82422
82536
|
};
|
|
82423
82537
|
BulkActions.displayName = "ClientSideDataTable.BulkActions";
|
|
82424
82538
|
ConfigPanelButton.displayName = "ClientSideDataTable.ConfigPanelButton";
|
|
@@ -82445,8 +82559,8 @@ var ClientSideDataTable_default = addSubcomponents(
|
|
|
82445
82559
|
},
|
|
82446
82560
|
ClientSideDataTable
|
|
82447
82561
|
);
|
|
82448
|
-
var QuickFilterLabel =
|
|
82449
|
-
return /* @__PURE__ */
|
|
82562
|
+
var QuickFilterLabel = React83.forwardRef(({ enabled, ...props }, ref) => {
|
|
82563
|
+
return /* @__PURE__ */ React83.createElement(StyledQuickFilterLabel, { $enabled: enabled }, /* @__PURE__ */ React83.createElement(SelectButton, { ref, ...props }));
|
|
82450
82564
|
});
|
|
82451
82565
|
var StyledQuickFilterLabel = styled4.div`
|
|
82452
82566
|
${StyledSelectButton} {
|
|
@@ -82489,9 +82603,9 @@ function getPlacement2(currentSelectionType, position) {
|
|
|
82489
82603
|
return "bottom-right";
|
|
82490
82604
|
}
|
|
82491
82605
|
var OptionalDateTimeProvider2 = ({ timeZone, children }) => {
|
|
82492
|
-
return timeZone ? /* @__PURE__ */
|
|
82606
|
+
return timeZone ? /* @__PURE__ */ React83.createElement(DateTimeProvider, { timeZone }, children) : /* @__PURE__ */ React83.createElement(React83.Fragment, null, children);
|
|
82493
82607
|
};
|
|
82494
|
-
var DateFilterSelect2 =
|
|
82608
|
+
var DateFilterSelect2 = React83.forwardRef(
|
|
82495
82609
|
({
|
|
82496
82610
|
afterHide,
|
|
82497
82611
|
selectionType = "either",
|
|
@@ -82505,11 +82619,11 @@ var DateFilterSelect2 = React82.forwardRef(
|
|
|
82505
82619
|
const dateTime = useDateTime();
|
|
82506
82620
|
const { start, end } = selectedValue;
|
|
82507
82621
|
const selectedDate = (position === "start" ? start : end) ?? void 0;
|
|
82508
|
-
const [displayed, setDisplayed2] =
|
|
82622
|
+
const [displayed, setDisplayed2] = React83.useState(
|
|
82509
82623
|
// @ts-ignore
|
|
82510
82624
|
selectedDate || dateTime.newDate()
|
|
82511
82625
|
);
|
|
82512
|
-
|
|
82626
|
+
React83.useEffect(() => {
|
|
82513
82627
|
if (isDate(start) && !isDate(end) && position === "end") {
|
|
82514
82628
|
setDisplayed2(start);
|
|
82515
82629
|
}
|
|
@@ -82520,10 +82634,10 @@ var DateFilterSelect2 = React82.forwardRef(
|
|
|
82520
82634
|
function onClear() {
|
|
82521
82635
|
onChange(null, position);
|
|
82522
82636
|
}
|
|
82523
|
-
const clearRef =
|
|
82524
|
-
const monthRef =
|
|
82525
|
-
const yearRef =
|
|
82526
|
-
const overlay = /* @__PURE__ */
|
|
82637
|
+
const clearRef = React83.useRef(null);
|
|
82638
|
+
const monthRef = React83.useRef(null);
|
|
82639
|
+
const yearRef = React83.useRef(null);
|
|
82640
|
+
const overlay = /* @__PURE__ */ React83.createElement(
|
|
82527
82641
|
DateFilterOverlay,
|
|
82528
82642
|
{
|
|
82529
82643
|
displayDate: displayed,
|
|
@@ -82539,7 +82653,7 @@ var DateFilterSelect2 = React82.forwardRef(
|
|
|
82539
82653
|
yearRef
|
|
82540
82654
|
}
|
|
82541
82655
|
);
|
|
82542
|
-
return /* @__PURE__ */
|
|
82656
|
+
return /* @__PURE__ */ React83.createElement(
|
|
82543
82657
|
OverlayTrigger,
|
|
82544
82658
|
{
|
|
82545
82659
|
afterHide,
|
|
@@ -82557,7 +82671,7 @@ var DateFilterSelect2 = React82.forwardRef(
|
|
|
82557
82671
|
restoreFocusOnHide: true,
|
|
82558
82672
|
role: "dialog"
|
|
82559
82673
|
},
|
|
82560
|
-
/* @__PURE__ */
|
|
82674
|
+
/* @__PURE__ */ React83.createElement(
|
|
82561
82675
|
DateQuickFilterLabel,
|
|
82562
82676
|
{
|
|
82563
82677
|
headerName,
|
|
@@ -82578,10 +82692,10 @@ function DateFilter3({
|
|
|
82578
82692
|
value,
|
|
82579
82693
|
...props
|
|
82580
82694
|
}) {
|
|
82581
|
-
const [selectedValue, setSelectedValue] =
|
|
82695
|
+
const [selectedValue, setSelectedValue] = React83.useState({
|
|
82582
82696
|
type: selectionType === "either" ? "range" : selectionType
|
|
82583
82697
|
});
|
|
82584
|
-
|
|
82698
|
+
React83.useEffect(() => {
|
|
82585
82699
|
const parsedValue = value.map((date) => {
|
|
82586
82700
|
if (isDate(date)) {
|
|
82587
82701
|
return date;
|
|
@@ -82591,7 +82705,7 @@ function DateFilter3({
|
|
|
82591
82705
|
const type = isSameDay(parsedValue[0], parsedValue[1]) ? "single" : "range";
|
|
82592
82706
|
setSelectedValue({ type, start: parsedValue[0], end: parsedValue[1] });
|
|
82593
82707
|
}, [value]);
|
|
82594
|
-
const dateRangeEndDateRef =
|
|
82708
|
+
const dateRangeEndDateRef = React83.useRef(null);
|
|
82595
82709
|
function dateFilterOnChange(date, position) {
|
|
82596
82710
|
const newValue = getValueFromSelection(selectedValue, date, position);
|
|
82597
82711
|
setSelectedValue(newValue);
|
|
@@ -82604,7 +82718,7 @@ function DateFilter3({
|
|
|
82604
82718
|
);
|
|
82605
82719
|
}
|
|
82606
82720
|
}
|
|
82607
|
-
const onSelectionTypeChange =
|
|
82721
|
+
const onSelectionTypeChange = React83.useCallback(
|
|
82608
82722
|
(newSelectionType) => {
|
|
82609
82723
|
setSelectedValue({ type: newSelectionType });
|
|
82610
82724
|
},
|
|
@@ -82616,7 +82730,7 @@ function DateFilter3({
|
|
|
82616
82730
|
}
|
|
82617
82731
|
return true;
|
|
82618
82732
|
}
|
|
82619
|
-
return /* @__PURE__ */
|
|
82733
|
+
return /* @__PURE__ */ React83.createElement(FlexList, { space: "xs", "data-qa": props["data-qa"] }, /* @__PURE__ */ React83.createElement(
|
|
82620
82734
|
DateFilterSelect2,
|
|
82621
82735
|
{
|
|
82622
82736
|
afterHide: dateRangeAfterHide,
|
|
@@ -82627,7 +82741,7 @@ function DateFilter3({
|
|
|
82627
82741
|
selectionType,
|
|
82628
82742
|
setSelectionType: onSelectionTypeChange
|
|
82629
82743
|
}
|
|
82630
|
-
), selectedValue.type === "range" && /* @__PURE__ */
|
|
82744
|
+
), selectedValue.type === "range" && /* @__PURE__ */ React83.createElement(
|
|
82631
82745
|
DateFilterSelect2,
|
|
82632
82746
|
{
|
|
82633
82747
|
headerName,
|
|
@@ -82647,7 +82761,7 @@ function ServerSideQuickDateFilterRenderer({
|
|
|
82647
82761
|
columnDefinition
|
|
82648
82762
|
});
|
|
82649
82763
|
const colDef = columnDefinition;
|
|
82650
|
-
return /* @__PURE__ */
|
|
82764
|
+
return /* @__PURE__ */ React83.createElement(OptionalDateTimeProvider2, { timeZone: colDef.timeZone }, /* @__PURE__ */ React83.createElement(
|
|
82651
82765
|
DateFilter3,
|
|
82652
82766
|
{
|
|
82653
82767
|
selectionType: colDef.filterProps?.selectionType ?? "either",
|
|
@@ -82672,7 +82786,7 @@ function ServerSideQuickDateFilterRenderer({
|
|
|
82672
82786
|
var QuickDateFilterRenderer = (props) => {
|
|
82673
82787
|
const { onServerSideDataRequest } = useInternalTableContext();
|
|
82674
82788
|
if (onServerSideDataRequest) {
|
|
82675
|
-
return /* @__PURE__ */
|
|
82789
|
+
return /* @__PURE__ */ React83.createElement(ServerSideQuickDateFilterRenderer, { ...props });
|
|
82676
82790
|
}
|
|
82677
82791
|
console.error(
|
|
82678
82792
|
"Warning: Date Filters are currently only implemented for the serverside row model"
|
|
@@ -82702,7 +82816,7 @@ var dateInputLocales = {
|
|
|
82702
82816
|
placeholders: { day: "tt", month: "MM", year: "jjjj" }
|
|
82703
82817
|
}
|
|
82704
82818
|
};
|
|
82705
|
-
var DateQuickFilterLabel =
|
|
82819
|
+
var DateQuickFilterLabel = React83.forwardRef(({ headerName, onClear, value }, ref) => {
|
|
82706
82820
|
const dateTime = useDateTime();
|
|
82707
82821
|
const i18n = useI18nContext();
|
|
82708
82822
|
const placeholders = dateInputLocales[i18n.locale]?.placeholders || {
|
|
@@ -82711,7 +82825,7 @@ var DateQuickFilterLabel = React82.forwardRef(({ headerName, onClear, value }, r
|
|
|
82711
82825
|
year: "yyyy"
|
|
82712
82826
|
};
|
|
82713
82827
|
if (value !== void 0 && isDate(value)) {
|
|
82714
|
-
return /* @__PURE__ */
|
|
82828
|
+
return /* @__PURE__ */ React83.createElement(
|
|
82715
82829
|
QuickFilterLabel,
|
|
82716
82830
|
{
|
|
82717
82831
|
enabled: true,
|
|
@@ -82721,7 +82835,7 @@ var DateQuickFilterLabel = React82.forwardRef(({ headerName, onClear, value }, r
|
|
|
82721
82835
|
}
|
|
82722
82836
|
);
|
|
82723
82837
|
}
|
|
82724
|
-
return /* @__PURE__ */
|
|
82838
|
+
return /* @__PURE__ */ React83.createElement(
|
|
82725
82839
|
QuickFilterLabel,
|
|
82726
82840
|
{
|
|
82727
82841
|
enabled: false,
|
|
@@ -82741,7 +82855,7 @@ var useSuperSelectOptionAsValueWorkaround = ({
|
|
|
82741
82855
|
getId: getId3 = defaultGetId2,
|
|
82742
82856
|
loading
|
|
82743
82857
|
}) => {
|
|
82744
|
-
const isValueFromOptions =
|
|
82858
|
+
const isValueFromOptions = React83.useRef(false);
|
|
82745
82859
|
const getValueFromOptions = () => {
|
|
82746
82860
|
const valueIds = originValue.map(getId3);
|
|
82747
82861
|
isValueFromOptions.current = true;
|
|
@@ -82757,7 +82871,7 @@ var useSuperSelectOptionAsValueWorkaround = ({
|
|
|
82757
82871
|
getOptionValue: (option) => option
|
|
82758
82872
|
};
|
|
82759
82873
|
};
|
|
82760
|
-
var LocationQuickFilterOverlay =
|
|
82874
|
+
var LocationQuickFilterOverlay = React83.forwardRef(
|
|
82761
82875
|
({
|
|
82762
82876
|
getId: getId3,
|
|
82763
82877
|
getLabel: getLabel3,
|
|
@@ -82777,9 +82891,9 @@ var LocationQuickFilterOverlay = React82.forwardRef(
|
|
|
82777
82891
|
);
|
|
82778
82892
|
return null;
|
|
82779
82893
|
}
|
|
82780
|
-
const [items, setItems] =
|
|
82781
|
-
const [searching, setSearching] =
|
|
82782
|
-
const menuRef =
|
|
82894
|
+
const [items, setItems] = React83.useState(options);
|
|
82895
|
+
const [searching, setSearching] = React83.useState(false);
|
|
82896
|
+
const menuRef = React83.useRef(null);
|
|
82783
82897
|
const { menuProps, menuNavigationTriggerProps } = UNSAFE_useMenuImperativeControlNavigation(menuRef);
|
|
82784
82898
|
const I18n = useI18nContext();
|
|
82785
82899
|
const selectAllOption = {
|
|
@@ -82813,10 +82927,10 @@ var LocationQuickFilterOverlay = React82.forwardRef(
|
|
|
82813
82927
|
}
|
|
82814
82928
|
}
|
|
82815
82929
|
const _onSearch = columnDefinition.filterProps.onSearch || defaultOnSearch;
|
|
82816
|
-
|
|
82930
|
+
React83.useEffect(() => {
|
|
82817
82931
|
menuRef.current?.highlightSuggested();
|
|
82818
82932
|
}, []);
|
|
82819
|
-
return /* @__PURE__ */
|
|
82933
|
+
return /* @__PURE__ */ React83.createElement(Card, { ref }, /* @__PURE__ */ React83.createElement(
|
|
82820
82934
|
UNSAFE_Menu,
|
|
82821
82935
|
{
|
|
82822
82936
|
...menuProps,
|
|
@@ -82826,20 +82940,20 @@ var LocationQuickFilterOverlay = React82.forwardRef(
|
|
|
82826
82940
|
onSelect,
|
|
82827
82941
|
className: locationFilterStyles_default.locationFilterMenu
|
|
82828
82942
|
},
|
|
82829
|
-
/* @__PURE__ */
|
|
82943
|
+
/* @__PURE__ */ React83.createElement(
|
|
82830
82944
|
UNSAFE_Menu.Search,
|
|
82831
82945
|
{
|
|
82832
82946
|
...menuNavigationTriggerProps,
|
|
82833
82947
|
onChange: _onSearch
|
|
82834
82948
|
}
|
|
82835
82949
|
),
|
|
82836
|
-
/* @__PURE__ */
|
|
82950
|
+
/* @__PURE__ */ React83.createElement(UNSAFE_Menu.Options, null, !searching && /* @__PURE__ */ React83.createElement(
|
|
82837
82951
|
Box,
|
|
82838
82952
|
{
|
|
82839
82953
|
className: locationFilterStyles_default.controlsContainer,
|
|
82840
82954
|
...UNSAFE_menuItemsWrapperAttribute
|
|
82841
82955
|
},
|
|
82842
|
-
/* @__PURE__ */
|
|
82956
|
+
/* @__PURE__ */ React83.createElement(
|
|
82843
82957
|
UNSAFE_Menu.CheckboxItem,
|
|
82844
82958
|
{
|
|
82845
82959
|
key: getId3(includeSublocationOption),
|
|
@@ -82848,7 +82962,7 @@ var LocationQuickFilterOverlay = React82.forwardRef(
|
|
|
82848
82962
|
},
|
|
82849
82963
|
getLabel3(includeSublocationOption)
|
|
82850
82964
|
),
|
|
82851
|
-
/* @__PURE__ */
|
|
82965
|
+
/* @__PURE__ */ React83.createElement(
|
|
82852
82966
|
UNSAFE_Menu.CheckboxItem,
|
|
82853
82967
|
{
|
|
82854
82968
|
key: getId3(selectAllOption),
|
|
@@ -82859,7 +82973,7 @@ var LocationQuickFilterOverlay = React82.forwardRef(
|
|
|
82859
82973
|
getLabel3(selectAllOption)
|
|
82860
82974
|
)
|
|
82861
82975
|
), !loading && items.map((item, i) => {
|
|
82862
|
-
return /* @__PURE__ */
|
|
82976
|
+
return /* @__PURE__ */ React83.createElement(
|
|
82863
82977
|
UNSAFE_Menu.CheckboxItem,
|
|
82864
82978
|
{
|
|
82865
82979
|
key: getId3(item),
|
|
@@ -82870,7 +82984,7 @@ var LocationQuickFilterOverlay = React82.forwardRef(
|
|
|
82870
82984
|
getLabel3(item)
|
|
82871
82985
|
);
|
|
82872
82986
|
})),
|
|
82873
|
-
loading && /* @__PURE__ */
|
|
82987
|
+
loading && /* @__PURE__ */ React83.createElement(UNSAFE_Menu.Footer, null, /* @__PURE__ */ React83.createElement(Flex, { justifyContent: "center" }, /* @__PURE__ */ React83.createElement(Spinner$1, { size: "sm" })))
|
|
82874
82988
|
));
|
|
82875
82989
|
}
|
|
82876
82990
|
);
|
|
@@ -82905,16 +83019,16 @@ var LocationQuickFilterRenderer = ({
|
|
|
82905
83019
|
}
|
|
82906
83020
|
return "none";
|
|
82907
83021
|
};
|
|
82908
|
-
const ids =
|
|
82909
|
-
const [selectedValueIds, setSelectedValueIds] =
|
|
82910
|
-
const [selectState, setSelectState] =
|
|
83022
|
+
const ids = React83.useMemo(() => value.map(({ id }) => id), [value]);
|
|
83023
|
+
const [selectedValueIds, setSelectedValueIds] = React83.useState(ids);
|
|
83024
|
+
const [selectState, setSelectState] = React83.useState(
|
|
82911
83025
|
determineSelectedState(value)
|
|
82912
83026
|
);
|
|
82913
|
-
const [enableSublocations, setEnableSublocations] =
|
|
82914
|
-
const onSelectSublocations =
|
|
83027
|
+
const [enableSublocations, setEnableSublocations] = React83.useState(false);
|
|
83028
|
+
const onSelectSublocations = React83.useCallback(() => {
|
|
82915
83029
|
setEnableSublocations(!enableSublocations);
|
|
82916
83030
|
}, [enableSublocations]);
|
|
82917
|
-
const onSelectAll =
|
|
83031
|
+
const onSelectAll = React83.useCallback(() => {
|
|
82918
83032
|
if (selectState === "none" || selectState === "partial") {
|
|
82919
83033
|
setSelectState("all");
|
|
82920
83034
|
setSelectedValueIds(options.map(({ id }) => id));
|
|
@@ -82948,7 +83062,7 @@ var LocationQuickFilterRenderer = ({
|
|
|
82948
83062
|
return [];
|
|
82949
83063
|
}
|
|
82950
83064
|
};
|
|
82951
|
-
const removeSelections =
|
|
83065
|
+
const removeSelections = React83.useCallback(
|
|
82952
83066
|
function(selection, selected) {
|
|
82953
83067
|
const sublocations = handleSelectSublocations(selection);
|
|
82954
83068
|
return enableSublocations ? selected.filter(
|
|
@@ -82959,10 +83073,10 @@ var LocationQuickFilterRenderer = ({
|
|
|
82959
83073
|
},
|
|
82960
83074
|
[enableSublocations]
|
|
82961
83075
|
);
|
|
82962
|
-
|
|
83076
|
+
React83.useEffect(() => {
|
|
82963
83077
|
setSelectState(determineSelectedState(value));
|
|
82964
83078
|
}, [value]);
|
|
82965
|
-
const overlay = /* @__PURE__ */
|
|
83079
|
+
const overlay = /* @__PURE__ */ React83.createElement(
|
|
82966
83080
|
LocationQuickFilterOverlay,
|
|
82967
83081
|
{
|
|
82968
83082
|
columnDefinition,
|
|
@@ -82980,14 +83094,14 @@ var LocationQuickFilterRenderer = ({
|
|
|
82980
83094
|
}
|
|
82981
83095
|
);
|
|
82982
83096
|
const triggerLabel = value.length ? value.length === 1 ? `: ${value[0].label}` : `: (${value.length})` : "";
|
|
82983
|
-
return /* @__PURE__ */
|
|
83097
|
+
return /* @__PURE__ */ React83.createElement(
|
|
82984
83098
|
OverlayTrigger,
|
|
82985
83099
|
{
|
|
82986
83100
|
overlay,
|
|
82987
83101
|
beforeShow: getOptions,
|
|
82988
83102
|
placement: "bottom-left"
|
|
82989
83103
|
},
|
|
82990
|
-
value.length ? /* @__PURE__ */
|
|
83104
|
+
value.length ? /* @__PURE__ */ React83.createElement(
|
|
82991
83105
|
QuickFilterLabel,
|
|
82992
83106
|
{
|
|
82993
83107
|
enabled: true,
|
|
@@ -82999,7 +83113,7 @@ var LocationQuickFilterRenderer = ({
|
|
|
82999
83113
|
},
|
|
83000
83114
|
block: true
|
|
83001
83115
|
}
|
|
83002
|
-
) : /* @__PURE__ */
|
|
83116
|
+
) : /* @__PURE__ */ React83.createElement(
|
|
83003
83117
|
QuickFilterLabel,
|
|
83004
83118
|
{
|
|
83005
83119
|
enabled: false,
|
|
@@ -83030,22 +83144,22 @@ var getSuperSelectFilterPreset = (columnDefinition) => {
|
|
|
83030
83144
|
} : void 0;
|
|
83031
83145
|
return {
|
|
83032
83146
|
components: {
|
|
83033
|
-
Label:
|
|
83147
|
+
Label: React83.forwardRef(() => {
|
|
83034
83148
|
const ctx = UNSAFE_useSuperSelectContext();
|
|
83035
83149
|
const isValueEmpty = ["", null, void 0].includes(
|
|
83036
83150
|
ctx.state.value
|
|
83037
83151
|
);
|
|
83038
|
-
return /* @__PURE__ */
|
|
83152
|
+
return /* @__PURE__ */ React83.createElement(UNSAFE_StyledSuperSelectLabel, { $hoverable: false }, typeof getValueLabel_ === "function" ? getValueLabel_(ctx.state.value) : getValueLabel(
|
|
83039
83153
|
isValueEmpty,
|
|
83040
83154
|
ctx.state.selectedLabel,
|
|
83041
83155
|
ctx.config.placeholder,
|
|
83042
83156
|
filterName
|
|
83043
83157
|
));
|
|
83044
83158
|
}),
|
|
83045
|
-
TriggerContainer:
|
|
83159
|
+
TriggerContainer: React83.forwardRef((props, ref) => {
|
|
83046
83160
|
const ctx = UNSAFE_useSuperSelectContext();
|
|
83047
83161
|
if (!Array.isArray(ctx.state.value)) {
|
|
83048
|
-
return /* @__PURE__ */
|
|
83162
|
+
return /* @__PURE__ */ React83.createElement(
|
|
83049
83163
|
UNSAFE_StyledSuperSelectTrigger,
|
|
83050
83164
|
{
|
|
83051
83165
|
$block: ctx.config.block,
|
|
@@ -83054,19 +83168,19 @@ var getSuperSelectFilterPreset = (columnDefinition) => {
|
|
|
83054
83168
|
}
|
|
83055
83169
|
);
|
|
83056
83170
|
}
|
|
83057
|
-
return /* @__PURE__ */
|
|
83171
|
+
return /* @__PURE__ */ React83.createElement(
|
|
83058
83172
|
Popover,
|
|
83059
83173
|
{
|
|
83060
83174
|
placement: "top",
|
|
83061
83175
|
trigger: ctx.state.value.length > 1 ? "hover" : "none",
|
|
83062
|
-
overlay: /* @__PURE__ */
|
|
83176
|
+
overlay: /* @__PURE__ */ React83.createElement(StyledFilterPresetPopoverContent, null, /* @__PURE__ */ React83.createElement(Typography, null, ctx.state.value.map((v) => {
|
|
83063
83177
|
const option = ctx.state.options.find(
|
|
83064
83178
|
(option2) => ctx.option.value(option2) === v
|
|
83065
83179
|
);
|
|
83066
83180
|
return option ? ctx.option.label(option) : "";
|
|
83067
83181
|
}).join(", ")))
|
|
83068
83182
|
},
|
|
83069
|
-
/* @__PURE__ */
|
|
83183
|
+
/* @__PURE__ */ React83.createElement(
|
|
83070
83184
|
UNSAFE_StyledSuperSelectTrigger,
|
|
83071
83185
|
{
|
|
83072
83186
|
$block: ctx.config.block,
|
|
@@ -83081,14 +83195,14 @@ var getSuperSelectFilterPreset = (columnDefinition) => {
|
|
|
83081
83195
|
if (Array.isArray(ctx.state.value)) {
|
|
83082
83196
|
const isValueEmpty = !ctx.state.value.length;
|
|
83083
83197
|
const value = ctx.state.value.length > 1 ? `(${ctx.state.value.length})` : ctx.state.value.length === 1 ? `${ctx.state.selectedLabel}` : "";
|
|
83084
|
-
return /* @__PURE__ */
|
|
83198
|
+
return /* @__PURE__ */ React83.createElement(UNSAFE_StyledSuperSelectLabel, { $hoverable: false }, typeof getValueLabel_ === "function" ? getValueLabel_(ctx.state.value) : getValueLabel(
|
|
83085
83199
|
isValueEmpty,
|
|
83086
83200
|
value,
|
|
83087
83201
|
ctx.config.placeholder,
|
|
83088
83202
|
filterName
|
|
83089
83203
|
));
|
|
83090
83204
|
}
|
|
83091
|
-
return /* @__PURE__ */
|
|
83205
|
+
return /* @__PURE__ */ React83.createElement("div", null, "Value is not an array");
|
|
83092
83206
|
}
|
|
83093
83207
|
},
|
|
83094
83208
|
selectionStyle: "highlight"
|
|
@@ -83145,7 +83259,7 @@ var ClientSideMultiSelectQuickFilter = ({
|
|
|
83145
83259
|
onRemove,
|
|
83146
83260
|
overlayMatchesTriggerWidth
|
|
83147
83261
|
}) => {
|
|
83148
|
-
return /* @__PURE__ */
|
|
83262
|
+
return /* @__PURE__ */ React83.createElement(StyledSuperSelectWrapper, { $enabled: Boolean(filter.filterValues?.length) }, /* @__PURE__ */ React83.createElement(
|
|
83149
83263
|
UNSAFE_SuperSelect,
|
|
83150
83264
|
{
|
|
83151
83265
|
overlayMatchesTriggerWidth,
|
|
@@ -83176,7 +83290,7 @@ var useSuperSelectOptionAsValueWorkaround2 = ({
|
|
|
83176
83290
|
getId: getId3,
|
|
83177
83291
|
loading
|
|
83178
83292
|
}) => {
|
|
83179
|
-
const isValueFromOptions =
|
|
83293
|
+
const isValueFromOptions = React83.useRef(false);
|
|
83180
83294
|
const getValueFromOptions = () => {
|
|
83181
83295
|
const valueIds = originValue.map((option) => getId(getId3, option));
|
|
83182
83296
|
isValueFromOptions.current = true;
|
|
@@ -83210,7 +83324,7 @@ var ServerSideMultiSelectQuickFilter = ({ columnDefinition, overlayMatchesTrigge
|
|
|
83210
83324
|
loading,
|
|
83211
83325
|
getId: columnDefinition.filterProps?.getId
|
|
83212
83326
|
});
|
|
83213
|
-
return /* @__PURE__ */
|
|
83327
|
+
return /* @__PURE__ */ React83.createElement(StyledSuperSelectWrapper, { $enabled: Boolean(value?.length) }, /* @__PURE__ */ React83.createElement(
|
|
83214
83328
|
UNSAFE_SuperSelect,
|
|
83215
83329
|
{
|
|
83216
83330
|
overlayMatchesTriggerWidth,
|
|
@@ -83243,9 +83357,9 @@ var ServerSideMultiSelectQuickFilter = ({ columnDefinition, overlayMatchesTrigge
|
|
|
83243
83357
|
var MultiSelectQuickFilterRenderer = (props) => {
|
|
83244
83358
|
const { onServerSideDataRequest } = useInternalTableContext();
|
|
83245
83359
|
if (!isClientSideFilterProps(props, !!onServerSideDataRequest)) {
|
|
83246
|
-
return /* @__PURE__ */
|
|
83360
|
+
return /* @__PURE__ */ React83.createElement(ServerSideMultiSelectQuickFilter, { ...props });
|
|
83247
83361
|
}
|
|
83248
|
-
return /* @__PURE__ */
|
|
83362
|
+
return /* @__PURE__ */ React83.createElement(ClientSideMultiSelectQuickFilter, { ...props });
|
|
83249
83363
|
};
|
|
83250
83364
|
var MultiSelectQuickFilterRenderer_default = MultiSelectQuickFilterRenderer;
|
|
83251
83365
|
|
|
@@ -87670,7 +87784,7 @@ var ServerSideDataTable = ({
|
|
|
87670
87784
|
onTableConfigChange,
|
|
87671
87785
|
translations: translations2 = {}
|
|
87672
87786
|
}) => {
|
|
87673
|
-
return /* @__PURE__ */
|
|
87787
|
+
return /* @__PURE__ */ React83.createElement(
|
|
87674
87788
|
DataTable,
|
|
87675
87789
|
{
|
|
87676
87790
|
analytics,
|
|
@@ -87689,7 +87803,7 @@ var ServerSideDataTable = ({
|
|
|
87689
87803
|
children
|
|
87690
87804
|
);
|
|
87691
87805
|
};
|
|
87692
|
-
var Table3 = (props) => /* @__PURE__ */
|
|
87806
|
+
var Table3 = (props) => /* @__PURE__ */ React83.createElement(
|
|
87693
87807
|
Table,
|
|
87694
87808
|
{
|
|
87695
87809
|
...{
|
|
@@ -87782,4 +87896,4 @@ object-assign/index.js:
|
|
|
87782
87896
|
*)
|
|
87783
87897
|
*/
|
|
87784
87898
|
|
|
87785
|
-
export { BooleanCellEditor, BooleanCellRenderer, ButtonsCellRenderer, ClientSideDataTable_default as ClientSideDataTable, CompanyCellRenderer, CurrencyCellEditor, CurrencyCellRenderer, DateCellEditor, DateCellRenderer, DateFilterRenderer_default as DateFilterRenderer, DateQuickFilterRenderer_default as DateQuickFilterRenderer, DateTimeCellEditor, DateTimeCellRenderer, GrandTotalsLabelRenderer, GroupCellRenderer2 as GroupCellRenderer, LinkCellRenderer, LocationFilterRenderer, LocationQuickFilterRenderer_default as LocationQuickFilterRenderer, MultiSelectCellRenderer, MultiSelectFilterRenderer_default as MultiSelectFilterRenderer, MultiSelectQuickFilterRenderer_default as MultiSelectQuickFilterRenderer, NumberCellEditor2 as NumberCellEditor, NumberCellRenderer, NumberFilterRenderer, PeopleCellRenderer, PercentCellEditor, PercentCellRenderer, PersonCellRenderer, PillCellRenderer, PillSelectCellEditor, SelectAllState, SelectCellEditor2 as SelectCellEditor, SelectCellRenderer, ServerSideDataTable_default as ServerSideDataTable, TextCellEditor2 as TextCellEditor, TextCellRenderer, UNSAFE_useTableContext, rowSize, useRowSelectionState, waitForAsyncCondition, withDataTableEditor, withDataTableRenderer };
|
|
87899
|
+
export { Analytics_default as Analytics, AnalyticsBulkClient, BooleanCellEditor, BooleanCellRenderer, ButtonsCellRenderer, ClientSideDataTable_default as ClientSideDataTable, CompanyCellRenderer, CurrencyCellEditor, CurrencyCellRenderer, DateCellEditor, DateCellRenderer, DateFilterRenderer_default as DateFilterRenderer, DateQuickFilterRenderer_default as DateQuickFilterRenderer, DateTimeCellEditor, DateTimeCellRenderer, GrandTotalsLabelRenderer, GroupCellRenderer2 as GroupCellRenderer, LinkCellRenderer, LocationFilterRenderer, LocationQuickFilterRenderer_default as LocationQuickFilterRenderer, MultiSelectCellRenderer, MultiSelectFilterRenderer_default as MultiSelectFilterRenderer, MultiSelectQuickFilterRenderer_default as MultiSelectQuickFilterRenderer, NumberCellEditor2 as NumberCellEditor, NumberCellRenderer, NumberFilterRenderer, PeopleCellRenderer, PercentCellEditor, PercentCellRenderer, PersonCellRenderer, PillCellRenderer, PillSelectCellEditor, SelectAllState, SelectCellEditor2 as SelectCellEditor, SelectCellRenderer, ServerSideDataTable_default as ServerSideDataTable, TextCellEditor2 as TextCellEditor, TextCellRenderer, UNSAFE_useTableContext, rowSize, useAnalyticsContext, useRowSelectionState, waitForAsyncCondition, withDataTableEditor, withDataTableRenderer };
|