@procore/data-table 14.40.0 → 14.41.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 +12 -0
- package/dist/legacy/index.cjs +14 -11
- package/dist/legacy/index.d.cts +3 -0
- package/dist/legacy/index.d.ts +3 -0
- package/dist/legacy/index.js +14 -11
- package/dist/modern/index.cjs +14 -11
- package/dist/modern/index.d.cts +3 -0
- package/dist/modern/index.d.ts +3 -0
- package/dist/modern/index.js +14 -11
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 14.41.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- f1804f1: Support using required and optional groups at the same time
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 83c2765: Fixed variable name conflicting with type name that leads to an error on storybook.
|
|
12
|
+
- Updated dependencies [27c6ad8]
|
|
13
|
+
- @procore/toast-alert@5.1.2
|
|
14
|
+
|
|
3
15
|
## 14.40.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/dist/legacy/index.cjs
CHANGED
|
@@ -103539,13 +103539,13 @@ var BulkEditInput = (props) => {
|
|
|
103539
103539
|
);
|
|
103540
103540
|
case "peopleMultiSelect":
|
|
103541
103541
|
const {
|
|
103542
|
-
placeholder:
|
|
103543
|
-
...
|
|
103542
|
+
placeholder: peopleMultiSelectPlaceholder,
|
|
103543
|
+
...peopleMultiSelectParams
|
|
103544
103544
|
} = props.editorParams;
|
|
103545
103545
|
return /* @__PURE__ */ React80__default.default.createElement(
|
|
103546
103546
|
coreReact.Form.MultiSelect,
|
|
103547
103547
|
{
|
|
103548
|
-
...
|
|
103548
|
+
...peopleMultiSelectParams,
|
|
103549
103549
|
beforeShow: getBulkEditorOptions,
|
|
103550
103550
|
colWidth: 12,
|
|
103551
103551
|
"data-qa": `data-table-bulk-edit-input-${props.name}`,
|
|
@@ -103557,7 +103557,7 @@ var BulkEditInput = (props) => {
|
|
|
103557
103557
|
name: field.input.name,
|
|
103558
103558
|
optionRenderer: personOptionRenderer(props.editorParams),
|
|
103559
103559
|
options,
|
|
103560
|
-
placeholder:
|
|
103560
|
+
placeholder: peopleMultiSelectPlaceholder ?? placeholderForField
|
|
103561
103561
|
}
|
|
103562
103562
|
);
|
|
103563
103563
|
case "radio":
|
|
@@ -112126,7 +112126,7 @@ var FiltersPanelButton = () => {
|
|
|
112126
112126
|
}
|
|
112127
112127
|
return /* @__PURE__ */ React80__default.default.createElement(ClientSideFiltersPanelToggleButton, null);
|
|
112128
112128
|
};
|
|
112129
|
-
var RowGroupSelector = ({ localeText }) => {
|
|
112129
|
+
var RowGroupSelector = ({ localeText, modifyRowGroupFieldsOnSelection }) => {
|
|
112130
112130
|
const {
|
|
112131
112131
|
columnDefinitions: _columnDefinitions,
|
|
112132
112132
|
columnApi,
|
|
@@ -112149,24 +112149,26 @@ var RowGroupSelector = ({ localeText }) => {
|
|
|
112149
112149
|
});
|
|
112150
112150
|
}, [columnDefinitions]);
|
|
112151
112151
|
const selectedColumns = React80__default.default.useMemo(
|
|
112152
|
-
() => mapColumnsToOptions(groupedColumns),
|
|
112152
|
+
() => mapColumnsToOptions(groupedColumns.filter((col) => col.enableRowGroup)),
|
|
112153
112153
|
[groupedColumns]
|
|
112154
112154
|
);
|
|
112155
112155
|
const onGroupedClear = React80__default.default.useCallback(() => {
|
|
112156
112156
|
var _a;
|
|
112157
|
-
|
|
112158
|
-
|
|
112157
|
+
const modifiedFields = (modifyRowGroupFieldsOnSelection == null ? void 0 : modifyRowGroupFieldsOnSelection([])) ?? [];
|
|
112158
|
+
(_a = tableRef == null ? void 0 : tableRef.current) == null ? void 0 : _a.setRowGrouping(modifiedFields);
|
|
112159
|
+
}, [tableRef, modifyRowGroupFieldsOnSelection]);
|
|
112159
112160
|
const onGroupedRowChange = React80__default.default.useCallback(
|
|
112160
112161
|
(newValue) => {
|
|
112161
112162
|
var _a;
|
|
112162
112163
|
const fields = newValue.map((val) => {
|
|
112163
112164
|
return val.id;
|
|
112164
112165
|
});
|
|
112166
|
+
const modifiedFields = (modifyRowGroupFieldsOnSelection == null ? void 0 : modifyRowGroupFieldsOnSelection(fields)) ?? fields;
|
|
112165
112167
|
if (!ramda.equals(selectedColumns, newValue)) {
|
|
112166
|
-
(_a = tableRef == null ? void 0 : tableRef.current) == null ? void 0 : _a.setRowGrouping(
|
|
112168
|
+
(_a = tableRef == null ? void 0 : tableRef.current) == null ? void 0 : _a.setRowGrouping(modifiedFields);
|
|
112167
112169
|
}
|
|
112168
112170
|
},
|
|
112169
|
-
[selectedColumns]
|
|
112171
|
+
[selectedColumns, modifyRowGroupFieldsOnSelection]
|
|
112170
112172
|
);
|
|
112171
112173
|
React80__default.default.useEffect(() => {
|
|
112172
112174
|
function onDisplayedColumnsChanged(event) {
|
|
@@ -112310,7 +112312,8 @@ var QuickControls = (props) => {
|
|
|
112310
112312
|
reset: I18n.t("dataTable.tableSettings.reset"),
|
|
112311
112313
|
placeholder: I18n.t("dataTable.tableSettings.selectColumnGroup"),
|
|
112312
112314
|
selectedItemsPrefix: I18n.t("dataTable.tableSettings.groupBy")
|
|
112313
|
-
}
|
|
112315
|
+
},
|
|
112316
|
+
modifyRowGroupFieldsOnSelection: props.modifyRowGroupFieldsOnSelection
|
|
112314
112317
|
}
|
|
112315
112318
|
), /* @__PURE__ */ React80__default.default.createElement(ConfigPanelButton, null))), /* @__PURE__ */ React80__default.default.createElement(
|
|
112316
112319
|
QuickFilters,
|
package/dist/legacy/index.d.cts
CHANGED
|
@@ -1452,6 +1452,7 @@ interface QuickControlsProps extends Omit<SearchProps, 'disabled'> {
|
|
|
1452
1452
|
style?: React__default.CSSProperties;
|
|
1453
1453
|
disabledSearch?: boolean;
|
|
1454
1454
|
filterOverlayMatchesTriggerWidth?: boolean;
|
|
1455
|
+
modifyRowGroupFieldsOnSelection?: (userSelection: string[]) => string[];
|
|
1455
1456
|
}
|
|
1456
1457
|
|
|
1457
1458
|
interface ActionButtonProps {
|
|
@@ -1484,6 +1485,7 @@ declare const _default$1: (({ analytics, children, columnDefinitions: _columnDef
|
|
|
1484
1485
|
placeholder: string;
|
|
1485
1486
|
selectedItemsPrefix?: string | undefined;
|
|
1486
1487
|
};
|
|
1488
|
+
modifyRowGroupFieldsOnSelection?: ((userSelection: string[]) => string[]) | undefined;
|
|
1487
1489
|
}>;
|
|
1488
1490
|
Search: React__default.FunctionComponent<SearchProps>;
|
|
1489
1491
|
Table: React__default.FC<Omit<TableProps<any, any>, "selectionSSREnabled" | "modules">>;
|
|
@@ -1521,6 +1523,7 @@ declare const _default: (({ analytics, children, columnDefinitions: _columnDefin
|
|
|
1521
1523
|
placeholder: string;
|
|
1522
1524
|
selectedItemsPrefix?: string | undefined;
|
|
1523
1525
|
};
|
|
1526
|
+
modifyRowGroupFieldsOnSelection?: ((userSelection: string[]) => string[]) | undefined;
|
|
1524
1527
|
}>;
|
|
1525
1528
|
Search: React__default.FunctionComponent<SearchProps>;
|
|
1526
1529
|
Table: React__default.FC<Omit<TableProps<any, any>, "rows" | "modules">>;
|
package/dist/legacy/index.d.ts
CHANGED
|
@@ -1452,6 +1452,7 @@ interface QuickControlsProps extends Omit<SearchProps, 'disabled'> {
|
|
|
1452
1452
|
style?: React__default.CSSProperties;
|
|
1453
1453
|
disabledSearch?: boolean;
|
|
1454
1454
|
filterOverlayMatchesTriggerWidth?: boolean;
|
|
1455
|
+
modifyRowGroupFieldsOnSelection?: (userSelection: string[]) => string[];
|
|
1455
1456
|
}
|
|
1456
1457
|
|
|
1457
1458
|
interface ActionButtonProps {
|
|
@@ -1484,6 +1485,7 @@ declare const _default$1: (({ analytics, children, columnDefinitions: _columnDef
|
|
|
1484
1485
|
placeholder: string;
|
|
1485
1486
|
selectedItemsPrefix?: string | undefined;
|
|
1486
1487
|
};
|
|
1488
|
+
modifyRowGroupFieldsOnSelection?: ((userSelection: string[]) => string[]) | undefined;
|
|
1487
1489
|
}>;
|
|
1488
1490
|
Search: React__default.FunctionComponent<SearchProps>;
|
|
1489
1491
|
Table: React__default.FC<Omit<TableProps<any, any>, "selectionSSREnabled" | "modules">>;
|
|
@@ -1521,6 +1523,7 @@ declare const _default: (({ analytics, children, columnDefinitions: _columnDefin
|
|
|
1521
1523
|
placeholder: string;
|
|
1522
1524
|
selectedItemsPrefix?: string | undefined;
|
|
1523
1525
|
};
|
|
1526
|
+
modifyRowGroupFieldsOnSelection?: ((userSelection: string[]) => string[]) | undefined;
|
|
1524
1527
|
}>;
|
|
1525
1528
|
Search: React__default.FunctionComponent<SearchProps>;
|
|
1526
1529
|
Table: React__default.FC<Omit<TableProps<any, any>, "rows" | "modules">>;
|
package/dist/legacy/index.js
CHANGED
|
@@ -103526,13 +103526,13 @@ var BulkEditInput = (props) => {
|
|
|
103526
103526
|
);
|
|
103527
103527
|
case "peopleMultiSelect":
|
|
103528
103528
|
const {
|
|
103529
|
-
placeholder:
|
|
103530
|
-
...
|
|
103529
|
+
placeholder: peopleMultiSelectPlaceholder,
|
|
103530
|
+
...peopleMultiSelectParams
|
|
103531
103531
|
} = props.editorParams;
|
|
103532
103532
|
return /* @__PURE__ */ React80.createElement(
|
|
103533
103533
|
Form.MultiSelect,
|
|
103534
103534
|
{
|
|
103535
|
-
...
|
|
103535
|
+
...peopleMultiSelectParams,
|
|
103536
103536
|
beforeShow: getBulkEditorOptions,
|
|
103537
103537
|
colWidth: 12,
|
|
103538
103538
|
"data-qa": `data-table-bulk-edit-input-${props.name}`,
|
|
@@ -103544,7 +103544,7 @@ var BulkEditInput = (props) => {
|
|
|
103544
103544
|
name: field.input.name,
|
|
103545
103545
|
optionRenderer: personOptionRenderer(props.editorParams),
|
|
103546
103546
|
options,
|
|
103547
|
-
placeholder:
|
|
103547
|
+
placeholder: peopleMultiSelectPlaceholder ?? placeholderForField
|
|
103548
103548
|
}
|
|
103549
103549
|
);
|
|
103550
103550
|
case "radio":
|
|
@@ -112113,7 +112113,7 @@ var FiltersPanelButton = () => {
|
|
|
112113
112113
|
}
|
|
112114
112114
|
return /* @__PURE__ */ React80.createElement(ClientSideFiltersPanelToggleButton, null);
|
|
112115
112115
|
};
|
|
112116
|
-
var RowGroupSelector = ({ localeText }) => {
|
|
112116
|
+
var RowGroupSelector = ({ localeText, modifyRowGroupFieldsOnSelection }) => {
|
|
112117
112117
|
const {
|
|
112118
112118
|
columnDefinitions: _columnDefinitions,
|
|
112119
112119
|
columnApi,
|
|
@@ -112136,24 +112136,26 @@ var RowGroupSelector = ({ localeText }) => {
|
|
|
112136
112136
|
});
|
|
112137
112137
|
}, [columnDefinitions]);
|
|
112138
112138
|
const selectedColumns = React80.useMemo(
|
|
112139
|
-
() => mapColumnsToOptions(groupedColumns),
|
|
112139
|
+
() => mapColumnsToOptions(groupedColumns.filter((col) => col.enableRowGroup)),
|
|
112140
112140
|
[groupedColumns]
|
|
112141
112141
|
);
|
|
112142
112142
|
const onGroupedClear = React80.useCallback(() => {
|
|
112143
112143
|
var _a;
|
|
112144
|
-
|
|
112145
|
-
|
|
112144
|
+
const modifiedFields = (modifyRowGroupFieldsOnSelection == null ? void 0 : modifyRowGroupFieldsOnSelection([])) ?? [];
|
|
112145
|
+
(_a = tableRef == null ? void 0 : tableRef.current) == null ? void 0 : _a.setRowGrouping(modifiedFields);
|
|
112146
|
+
}, [tableRef, modifyRowGroupFieldsOnSelection]);
|
|
112146
112147
|
const onGroupedRowChange = React80.useCallback(
|
|
112147
112148
|
(newValue) => {
|
|
112148
112149
|
var _a;
|
|
112149
112150
|
const fields = newValue.map((val) => {
|
|
112150
112151
|
return val.id;
|
|
112151
112152
|
});
|
|
112153
|
+
const modifiedFields = (modifyRowGroupFieldsOnSelection == null ? void 0 : modifyRowGroupFieldsOnSelection(fields)) ?? fields;
|
|
112152
112154
|
if (!equals(selectedColumns, newValue)) {
|
|
112153
|
-
(_a = tableRef == null ? void 0 : tableRef.current) == null ? void 0 : _a.setRowGrouping(
|
|
112155
|
+
(_a = tableRef == null ? void 0 : tableRef.current) == null ? void 0 : _a.setRowGrouping(modifiedFields);
|
|
112154
112156
|
}
|
|
112155
112157
|
},
|
|
112156
|
-
[selectedColumns]
|
|
112158
|
+
[selectedColumns, modifyRowGroupFieldsOnSelection]
|
|
112157
112159
|
);
|
|
112158
112160
|
React80.useEffect(() => {
|
|
112159
112161
|
function onDisplayedColumnsChanged(event) {
|
|
@@ -112297,7 +112299,8 @@ var QuickControls = (props) => {
|
|
|
112297
112299
|
reset: I18n.t("dataTable.tableSettings.reset"),
|
|
112298
112300
|
placeholder: I18n.t("dataTable.tableSettings.selectColumnGroup"),
|
|
112299
112301
|
selectedItemsPrefix: I18n.t("dataTable.tableSettings.groupBy")
|
|
112300
|
-
}
|
|
112302
|
+
},
|
|
112303
|
+
modifyRowGroupFieldsOnSelection: props.modifyRowGroupFieldsOnSelection
|
|
112301
112304
|
}
|
|
112302
112305
|
), /* @__PURE__ */ React80.createElement(ConfigPanelButton, null))), /* @__PURE__ */ React80.createElement(
|
|
112303
112306
|
QuickFilters,
|
package/dist/modern/index.cjs
CHANGED
|
@@ -103427,13 +103427,13 @@ var BulkEditInput = (props) => {
|
|
|
103427
103427
|
);
|
|
103428
103428
|
case "peopleMultiSelect":
|
|
103429
103429
|
const {
|
|
103430
|
-
placeholder:
|
|
103431
|
-
...
|
|
103430
|
+
placeholder: peopleMultiSelectPlaceholder,
|
|
103431
|
+
...peopleMultiSelectParams
|
|
103432
103432
|
} = props.editorParams;
|
|
103433
103433
|
return /* @__PURE__ */ React80__default.default.createElement(
|
|
103434
103434
|
coreReact.Form.MultiSelect,
|
|
103435
103435
|
{
|
|
103436
|
-
...
|
|
103436
|
+
...peopleMultiSelectParams,
|
|
103437
103437
|
beforeShow: getBulkEditorOptions,
|
|
103438
103438
|
colWidth: 12,
|
|
103439
103439
|
"data-qa": `data-table-bulk-edit-input-${props.name}`,
|
|
@@ -103445,7 +103445,7 @@ var BulkEditInput = (props) => {
|
|
|
103445
103445
|
name: field.input.name,
|
|
103446
103446
|
optionRenderer: personOptionRenderer(props.editorParams),
|
|
103447
103447
|
options,
|
|
103448
|
-
placeholder:
|
|
103448
|
+
placeholder: peopleMultiSelectPlaceholder ?? placeholderForField
|
|
103449
103449
|
}
|
|
103450
103450
|
);
|
|
103451
103451
|
case "radio":
|
|
@@ -111900,7 +111900,7 @@ var FiltersPanelButton = () => {
|
|
|
111900
111900
|
}
|
|
111901
111901
|
return /* @__PURE__ */ React80__default.default.createElement(ClientSideFiltersPanelToggleButton, null);
|
|
111902
111902
|
};
|
|
111903
|
-
var RowGroupSelector = ({ localeText }) => {
|
|
111903
|
+
var RowGroupSelector = ({ localeText, modifyRowGroupFieldsOnSelection }) => {
|
|
111904
111904
|
const {
|
|
111905
111905
|
columnDefinitions: _columnDefinitions,
|
|
111906
111906
|
columnApi,
|
|
@@ -111923,22 +111923,24 @@ var RowGroupSelector = ({ localeText }) => {
|
|
|
111923
111923
|
});
|
|
111924
111924
|
}, [columnDefinitions]);
|
|
111925
111925
|
const selectedColumns = React80__default.default.useMemo(
|
|
111926
|
-
() => mapColumnsToOptions(groupedColumns),
|
|
111926
|
+
() => mapColumnsToOptions(groupedColumns.filter((col) => col.enableRowGroup)),
|
|
111927
111927
|
[groupedColumns]
|
|
111928
111928
|
);
|
|
111929
111929
|
const onGroupedClear = React80__default.default.useCallback(() => {
|
|
111930
|
-
|
|
111931
|
-
|
|
111930
|
+
const modifiedFields = modifyRowGroupFieldsOnSelection?.([]) ?? [];
|
|
111931
|
+
tableRef?.current?.setRowGrouping(modifiedFields);
|
|
111932
|
+
}, [tableRef, modifyRowGroupFieldsOnSelection]);
|
|
111932
111933
|
const onGroupedRowChange = React80__default.default.useCallback(
|
|
111933
111934
|
(newValue) => {
|
|
111934
111935
|
const fields = newValue.map((val) => {
|
|
111935
111936
|
return val.id;
|
|
111936
111937
|
});
|
|
111938
|
+
const modifiedFields = modifyRowGroupFieldsOnSelection?.(fields) ?? fields;
|
|
111937
111939
|
if (!ramda.equals(selectedColumns, newValue)) {
|
|
111938
|
-
tableRef?.current?.setRowGrouping(
|
|
111940
|
+
tableRef?.current?.setRowGrouping(modifiedFields);
|
|
111939
111941
|
}
|
|
111940
111942
|
},
|
|
111941
|
-
[selectedColumns]
|
|
111943
|
+
[selectedColumns, modifyRowGroupFieldsOnSelection]
|
|
111942
111944
|
);
|
|
111943
111945
|
React80__default.default.useEffect(() => {
|
|
111944
111946
|
function onDisplayedColumnsChanged(event) {
|
|
@@ -112080,7 +112082,8 @@ var QuickControls = (props) => {
|
|
|
112080
112082
|
reset: I18n.t("dataTable.tableSettings.reset"),
|
|
112081
112083
|
placeholder: I18n.t("dataTable.tableSettings.selectColumnGroup"),
|
|
112082
112084
|
selectedItemsPrefix: I18n.t("dataTable.tableSettings.groupBy")
|
|
112083
|
-
}
|
|
112085
|
+
},
|
|
112086
|
+
modifyRowGroupFieldsOnSelection: props.modifyRowGroupFieldsOnSelection
|
|
112084
112087
|
}
|
|
112085
112088
|
), /* @__PURE__ */ React80__default.default.createElement(ConfigPanelButton, null))), /* @__PURE__ */ React80__default.default.createElement(
|
|
112086
112089
|
QuickFilters,
|
package/dist/modern/index.d.cts
CHANGED
|
@@ -1452,6 +1452,7 @@ interface QuickControlsProps extends Omit<SearchProps, 'disabled'> {
|
|
|
1452
1452
|
style?: React__default.CSSProperties;
|
|
1453
1453
|
disabledSearch?: boolean;
|
|
1454
1454
|
filterOverlayMatchesTriggerWidth?: boolean;
|
|
1455
|
+
modifyRowGroupFieldsOnSelection?: (userSelection: string[]) => string[];
|
|
1455
1456
|
}
|
|
1456
1457
|
|
|
1457
1458
|
interface ActionButtonProps {
|
|
@@ -1484,6 +1485,7 @@ declare const _default$1: (({ analytics, children, columnDefinitions: _columnDef
|
|
|
1484
1485
|
placeholder: string;
|
|
1485
1486
|
selectedItemsPrefix?: string | undefined;
|
|
1486
1487
|
};
|
|
1488
|
+
modifyRowGroupFieldsOnSelection?: ((userSelection: string[]) => string[]) | undefined;
|
|
1487
1489
|
}>;
|
|
1488
1490
|
Search: React__default.FunctionComponent<SearchProps>;
|
|
1489
1491
|
Table: React__default.FC<Omit<TableProps<any, any>, "selectionSSREnabled" | "modules">>;
|
|
@@ -1521,6 +1523,7 @@ declare const _default: (({ analytics, children, columnDefinitions: _columnDefin
|
|
|
1521
1523
|
placeholder: string;
|
|
1522
1524
|
selectedItemsPrefix?: string | undefined;
|
|
1523
1525
|
};
|
|
1526
|
+
modifyRowGroupFieldsOnSelection?: ((userSelection: string[]) => string[]) | undefined;
|
|
1524
1527
|
}>;
|
|
1525
1528
|
Search: React__default.FunctionComponent<SearchProps>;
|
|
1526
1529
|
Table: React__default.FC<Omit<TableProps<any, any>, "rows" | "modules">>;
|
package/dist/modern/index.d.ts
CHANGED
|
@@ -1452,6 +1452,7 @@ interface QuickControlsProps extends Omit<SearchProps, 'disabled'> {
|
|
|
1452
1452
|
style?: React__default.CSSProperties;
|
|
1453
1453
|
disabledSearch?: boolean;
|
|
1454
1454
|
filterOverlayMatchesTriggerWidth?: boolean;
|
|
1455
|
+
modifyRowGroupFieldsOnSelection?: (userSelection: string[]) => string[];
|
|
1455
1456
|
}
|
|
1456
1457
|
|
|
1457
1458
|
interface ActionButtonProps {
|
|
@@ -1484,6 +1485,7 @@ declare const _default$1: (({ analytics, children, columnDefinitions: _columnDef
|
|
|
1484
1485
|
placeholder: string;
|
|
1485
1486
|
selectedItemsPrefix?: string | undefined;
|
|
1486
1487
|
};
|
|
1488
|
+
modifyRowGroupFieldsOnSelection?: ((userSelection: string[]) => string[]) | undefined;
|
|
1487
1489
|
}>;
|
|
1488
1490
|
Search: React__default.FunctionComponent<SearchProps>;
|
|
1489
1491
|
Table: React__default.FC<Omit<TableProps<any, any>, "selectionSSREnabled" | "modules">>;
|
|
@@ -1521,6 +1523,7 @@ declare const _default: (({ analytics, children, columnDefinitions: _columnDefin
|
|
|
1521
1523
|
placeholder: string;
|
|
1522
1524
|
selectedItemsPrefix?: string | undefined;
|
|
1523
1525
|
};
|
|
1526
|
+
modifyRowGroupFieldsOnSelection?: ((userSelection: string[]) => string[]) | undefined;
|
|
1524
1527
|
}>;
|
|
1525
1528
|
Search: React__default.FunctionComponent<SearchProps>;
|
|
1526
1529
|
Table: React__default.FC<Omit<TableProps<any, any>, "rows" | "modules">>;
|
package/dist/modern/index.js
CHANGED
|
@@ -103414,13 +103414,13 @@ var BulkEditInput = (props) => {
|
|
|
103414
103414
|
);
|
|
103415
103415
|
case "peopleMultiSelect":
|
|
103416
103416
|
const {
|
|
103417
|
-
placeholder:
|
|
103418
|
-
...
|
|
103417
|
+
placeholder: peopleMultiSelectPlaceholder,
|
|
103418
|
+
...peopleMultiSelectParams
|
|
103419
103419
|
} = props.editorParams;
|
|
103420
103420
|
return /* @__PURE__ */ React80.createElement(
|
|
103421
103421
|
Form.MultiSelect,
|
|
103422
103422
|
{
|
|
103423
|
-
...
|
|
103423
|
+
...peopleMultiSelectParams,
|
|
103424
103424
|
beforeShow: getBulkEditorOptions,
|
|
103425
103425
|
colWidth: 12,
|
|
103426
103426
|
"data-qa": `data-table-bulk-edit-input-${props.name}`,
|
|
@@ -103432,7 +103432,7 @@ var BulkEditInput = (props) => {
|
|
|
103432
103432
|
name: field.input.name,
|
|
103433
103433
|
optionRenderer: personOptionRenderer(props.editorParams),
|
|
103434
103434
|
options,
|
|
103435
|
-
placeholder:
|
|
103435
|
+
placeholder: peopleMultiSelectPlaceholder ?? placeholderForField
|
|
103436
103436
|
}
|
|
103437
103437
|
);
|
|
103438
103438
|
case "radio":
|
|
@@ -111887,7 +111887,7 @@ var FiltersPanelButton = () => {
|
|
|
111887
111887
|
}
|
|
111888
111888
|
return /* @__PURE__ */ React80.createElement(ClientSideFiltersPanelToggleButton, null);
|
|
111889
111889
|
};
|
|
111890
|
-
var RowGroupSelector = ({ localeText }) => {
|
|
111890
|
+
var RowGroupSelector = ({ localeText, modifyRowGroupFieldsOnSelection }) => {
|
|
111891
111891
|
const {
|
|
111892
111892
|
columnDefinitions: _columnDefinitions,
|
|
111893
111893
|
columnApi,
|
|
@@ -111910,22 +111910,24 @@ var RowGroupSelector = ({ localeText }) => {
|
|
|
111910
111910
|
});
|
|
111911
111911
|
}, [columnDefinitions]);
|
|
111912
111912
|
const selectedColumns = React80.useMemo(
|
|
111913
|
-
() => mapColumnsToOptions(groupedColumns),
|
|
111913
|
+
() => mapColumnsToOptions(groupedColumns.filter((col) => col.enableRowGroup)),
|
|
111914
111914
|
[groupedColumns]
|
|
111915
111915
|
);
|
|
111916
111916
|
const onGroupedClear = React80.useCallback(() => {
|
|
111917
|
-
|
|
111918
|
-
|
|
111917
|
+
const modifiedFields = modifyRowGroupFieldsOnSelection?.([]) ?? [];
|
|
111918
|
+
tableRef?.current?.setRowGrouping(modifiedFields);
|
|
111919
|
+
}, [tableRef, modifyRowGroupFieldsOnSelection]);
|
|
111919
111920
|
const onGroupedRowChange = React80.useCallback(
|
|
111920
111921
|
(newValue) => {
|
|
111921
111922
|
const fields = newValue.map((val) => {
|
|
111922
111923
|
return val.id;
|
|
111923
111924
|
});
|
|
111925
|
+
const modifiedFields = modifyRowGroupFieldsOnSelection?.(fields) ?? fields;
|
|
111924
111926
|
if (!equals(selectedColumns, newValue)) {
|
|
111925
|
-
tableRef?.current?.setRowGrouping(
|
|
111927
|
+
tableRef?.current?.setRowGrouping(modifiedFields);
|
|
111926
111928
|
}
|
|
111927
111929
|
},
|
|
111928
|
-
[selectedColumns]
|
|
111930
|
+
[selectedColumns, modifyRowGroupFieldsOnSelection]
|
|
111929
111931
|
);
|
|
111930
111932
|
React80.useEffect(() => {
|
|
111931
111933
|
function onDisplayedColumnsChanged(event) {
|
|
@@ -112067,7 +112069,8 @@ var QuickControls = (props) => {
|
|
|
112067
112069
|
reset: I18n.t("dataTable.tableSettings.reset"),
|
|
112068
112070
|
placeholder: I18n.t("dataTable.tableSettings.selectColumnGroup"),
|
|
112069
112071
|
selectedItemsPrefix: I18n.t("dataTable.tableSettings.groupBy")
|
|
112070
|
-
}
|
|
112072
|
+
},
|
|
112073
|
+
modifyRowGroupFieldsOnSelection: props.modifyRowGroupFieldsOnSelection
|
|
112071
112074
|
}
|
|
112072
112075
|
), /* @__PURE__ */ React80.createElement(ConfigPanelButton, null))), /* @__PURE__ */ React80.createElement(
|
|
112073
112076
|
QuickFilters,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@procore/data-table",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.41.0",
|
|
4
4
|
"description": "Complex data grid built on top of ag-grid, with DST components and styles.",
|
|
5
5
|
"author": "Procore Technologies",
|
|
6
6
|
"homepage": "https://github.com/procore/core/tree/main/packages/data-table",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"@procore/error-pages": "^0.2.3",
|
|
78
78
|
"@procore/labs-datetime-select": "^0.2.0",
|
|
79
79
|
"@procore/labs-group-by-select": "4.1.0",
|
|
80
|
-
"@procore/toast-alert": "^5.1.
|
|
80
|
+
"@procore/toast-alert": "^5.1.2",
|
|
81
81
|
"@procore/web-sdk-storage": "^0.1.0",
|
|
82
82
|
"classnames": "2.5.1",
|
|
83
83
|
"date-fns": "2.29.1",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"@procore/core-css": "10.17.0",
|
|
109
109
|
"@procore/core-icons": "^12.12.0",
|
|
110
110
|
"@procore/core-prettier": "10.2.0",
|
|
111
|
-
"@procore/core-react": "^12.
|
|
111
|
+
"@procore/core-react": "^12.35.0",
|
|
112
112
|
"@procore/eslint-config": "10.0.0",
|
|
113
113
|
"@procore/globalization-toolkit": "3.1.0",
|
|
114
114
|
"@procore/labs-financials-utils": "4.3.1",
|