@procore/data-table 14.21.0 → 14.21.1
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 +6 -0
- package/dist/legacy/index.cjs +9 -7
- package/dist/legacy/index.d.cts +8 -0
- package/dist/legacy/index.d.ts +8 -0
- package/dist/legacy/index.js +9 -7
- package/dist/modern/index.cjs +9 -7
- package/dist/modern/index.d.cts +8 -0
- package/dist/modern/index.d.ts +8 -0
- package/dist/modern/index.js +9 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/legacy/index.cjs
CHANGED
|
@@ -55284,7 +55284,10 @@ function transformServerSideRequestObj(request, filtersState, searchValue) {
|
|
|
55284
55284
|
)
|
|
55285
55285
|
};
|
|
55286
55286
|
}
|
|
55287
|
-
var transformFilterValue = (value) => {
|
|
55287
|
+
var transformFilterValue = (value, field, formatter) => {
|
|
55288
|
+
const formattedValue = formatter == null ? void 0 : formatter(value, field);
|
|
55289
|
+
if (formattedValue)
|
|
55290
|
+
return formattedValue;
|
|
55288
55291
|
if (value == null ? void 0 : value.date)
|
|
55289
55292
|
return dateFns.formatISO(value.date, { representation: "date" });
|
|
55290
55293
|
return value.toString();
|
|
@@ -55311,8 +55314,11 @@ function getServerSideParams(request, filtersState, searchValue, options = {}) {
|
|
|
55311
55314
|
params.set("group", group);
|
|
55312
55315
|
}
|
|
55313
55316
|
if (options.filters !== false) {
|
|
55317
|
+
const formatter = options.filterValueFormatter;
|
|
55314
55318
|
filtersState.forEach((filter) => {
|
|
55315
|
-
const value = filter.selected.length === 1 ? transformFilterValue(filter.selected[0]) : `[${filter.selected.map(
|
|
55319
|
+
const value = filter.selected.length === 1 ? transformFilterValue(filter.selected[0], filter.field, formatter) : `[${filter.selected.map(
|
|
55320
|
+
(value2) => transformFilterValue(value2, filter.field, formatter)
|
|
55321
|
+
)}]`;
|
|
55316
55322
|
params.set(`filters[${filter.field}]`, value);
|
|
55317
55323
|
});
|
|
55318
55324
|
request.groupKeys.forEach((groupKey, index) => {
|
|
@@ -57656,7 +57662,7 @@ function useFilterStorage({
|
|
|
57656
57662
|
setFiltersState((prev) => {
|
|
57657
57663
|
const columnDefinition = getColumnDefinition(field);
|
|
57658
57664
|
return {
|
|
57659
|
-
...
|
|
57665
|
+
...prev,
|
|
57660
57666
|
selectedFilters: {
|
|
57661
57667
|
...prev.selectedFilters,
|
|
57662
57668
|
[field]: {
|
|
@@ -82848,9 +82854,6 @@ var Table = (props) => {
|
|
|
82848
82854
|
);
|
|
82849
82855
|
(_c2 = (_b2 = props.UNSAFE_internalAGGridOverrides) == null ? void 0 : _b2.onGridReady) == null ? void 0 : _c2.call(_b2, params);
|
|
82850
82856
|
};
|
|
82851
|
-
const postProcessPopup = (params) => {
|
|
82852
|
-
params.ePopup.style.top = `${HEADER_HEIGHT}px`;
|
|
82853
|
-
};
|
|
82854
82857
|
const internalOnRowSelected = (event) => {
|
|
82855
82858
|
var _a2, _b2, _c2;
|
|
82856
82859
|
(_a2 = props.onRowSelected) == null ? void 0 : _a2.call(props, event);
|
|
@@ -83113,7 +83116,6 @@ var Table = (props) => {
|
|
|
83113
83116
|
paginationPageSize: props.paginationPageSize || defaultPaginationPageSize,
|
|
83114
83117
|
popupParent: props.popupParent,
|
|
83115
83118
|
pinnedBottomRowData: props.pinnedBottomRowData,
|
|
83116
|
-
postProcessPopup,
|
|
83117
83119
|
rowBuffer: props.rowBuffer,
|
|
83118
83120
|
rowClassRules,
|
|
83119
83121
|
rowDragManaged: onSSDR ? false : props.rowDragManaged ?? true,
|
package/dist/legacy/index.d.cts
CHANGED
|
@@ -470,6 +470,8 @@ interface ColumnDefinition<TValue = any, TRenderer = React.FC<ICellRendererParam
|
|
|
470
470
|
groupId?: string;
|
|
471
471
|
cellEditor?: TEditor;
|
|
472
472
|
cellEditorParams?: TEditorParams;
|
|
473
|
+
cellEditorPopup?: boolean;
|
|
474
|
+
cellEditorPopupPosition?: 'over' | 'under';
|
|
473
475
|
cellCSVFormatter?: (value: TValue) => string;
|
|
474
476
|
cellExcelFormatter?: (value: TValue) => string;
|
|
475
477
|
cellExcelDataType?: string;
|
|
@@ -887,6 +889,12 @@ type ServerSideParamsOptions = {
|
|
|
887
889
|
* @default filters[search]
|
|
888
890
|
*/
|
|
889
891
|
searchKey?: string;
|
|
892
|
+
/**
|
|
893
|
+
* Custom function for formatting URL params.
|
|
894
|
+
* This function will help you to format URL params when value is an object.
|
|
895
|
+
* If the function does not return anything, the default behavior will be used.
|
|
896
|
+
*/
|
|
897
|
+
filterValueFormatter?: (value: any, field: string) => string | void;
|
|
890
898
|
};
|
|
891
899
|
interface RowActionsConfig extends Omit<ColDef, 'field' | 'pinned' | 'lockPinned' | 'lockVisible'> {
|
|
892
900
|
}
|
package/dist/legacy/index.d.ts
CHANGED
|
@@ -470,6 +470,8 @@ interface ColumnDefinition<TValue = any, TRenderer = React.FC<ICellRendererParam
|
|
|
470
470
|
groupId?: string;
|
|
471
471
|
cellEditor?: TEditor;
|
|
472
472
|
cellEditorParams?: TEditorParams;
|
|
473
|
+
cellEditorPopup?: boolean;
|
|
474
|
+
cellEditorPopupPosition?: 'over' | 'under';
|
|
473
475
|
cellCSVFormatter?: (value: TValue) => string;
|
|
474
476
|
cellExcelFormatter?: (value: TValue) => string;
|
|
475
477
|
cellExcelDataType?: string;
|
|
@@ -887,6 +889,12 @@ type ServerSideParamsOptions = {
|
|
|
887
889
|
* @default filters[search]
|
|
888
890
|
*/
|
|
889
891
|
searchKey?: string;
|
|
892
|
+
/**
|
|
893
|
+
* Custom function for formatting URL params.
|
|
894
|
+
* This function will help you to format URL params when value is an object.
|
|
895
|
+
* If the function does not return anything, the default behavior will be used.
|
|
896
|
+
*/
|
|
897
|
+
filterValueFormatter?: (value: any, field: string) => string | void;
|
|
890
898
|
};
|
|
891
899
|
interface RowActionsConfig extends Omit<ColDef, 'field' | 'pinned' | 'lockPinned' | 'lockVisible'> {
|
|
892
900
|
}
|
package/dist/legacy/index.js
CHANGED
|
@@ -55270,7 +55270,10 @@ function transformServerSideRequestObj(request, filtersState, searchValue) {
|
|
|
55270
55270
|
)
|
|
55271
55271
|
};
|
|
55272
55272
|
}
|
|
55273
|
-
var transformFilterValue = (value) => {
|
|
55273
|
+
var transformFilterValue = (value, field, formatter) => {
|
|
55274
|
+
const formattedValue = formatter == null ? void 0 : formatter(value, field);
|
|
55275
|
+
if (formattedValue)
|
|
55276
|
+
return formattedValue;
|
|
55274
55277
|
if (value == null ? void 0 : value.date)
|
|
55275
55278
|
return formatISO(value.date, { representation: "date" });
|
|
55276
55279
|
return value.toString();
|
|
@@ -55297,8 +55300,11 @@ function getServerSideParams(request, filtersState, searchValue, options = {}) {
|
|
|
55297
55300
|
params.set("group", group);
|
|
55298
55301
|
}
|
|
55299
55302
|
if (options.filters !== false) {
|
|
55303
|
+
const formatter = options.filterValueFormatter;
|
|
55300
55304
|
filtersState.forEach((filter) => {
|
|
55301
|
-
const value = filter.selected.length === 1 ? transformFilterValue(filter.selected[0]) : `[${filter.selected.map(
|
|
55305
|
+
const value = filter.selected.length === 1 ? transformFilterValue(filter.selected[0], filter.field, formatter) : `[${filter.selected.map(
|
|
55306
|
+
(value2) => transformFilterValue(value2, filter.field, formatter)
|
|
55307
|
+
)}]`;
|
|
55302
55308
|
params.set(`filters[${filter.field}]`, value);
|
|
55303
55309
|
});
|
|
55304
55310
|
request.groupKeys.forEach((groupKey, index) => {
|
|
@@ -57642,7 +57648,7 @@ function useFilterStorage({
|
|
|
57642
57648
|
setFiltersState((prev) => {
|
|
57643
57649
|
const columnDefinition = getColumnDefinition(field);
|
|
57644
57650
|
return {
|
|
57645
|
-
...
|
|
57651
|
+
...prev,
|
|
57646
57652
|
selectedFilters: {
|
|
57647
57653
|
...prev.selectedFilters,
|
|
57648
57654
|
[field]: {
|
|
@@ -82834,9 +82840,6 @@ var Table = (props) => {
|
|
|
82834
82840
|
);
|
|
82835
82841
|
(_c2 = (_b2 = props.UNSAFE_internalAGGridOverrides) == null ? void 0 : _b2.onGridReady) == null ? void 0 : _c2.call(_b2, params);
|
|
82836
82842
|
};
|
|
82837
|
-
const postProcessPopup = (params) => {
|
|
82838
|
-
params.ePopup.style.top = `${HEADER_HEIGHT}px`;
|
|
82839
|
-
};
|
|
82840
82843
|
const internalOnRowSelected = (event) => {
|
|
82841
82844
|
var _a2, _b2, _c2;
|
|
82842
82845
|
(_a2 = props.onRowSelected) == null ? void 0 : _a2.call(props, event);
|
|
@@ -83099,7 +83102,6 @@ var Table = (props) => {
|
|
|
83099
83102
|
paginationPageSize: props.paginationPageSize || defaultPaginationPageSize,
|
|
83100
83103
|
popupParent: props.popupParent,
|
|
83101
83104
|
pinnedBottomRowData: props.pinnedBottomRowData,
|
|
83102
|
-
postProcessPopup,
|
|
83103
83105
|
rowBuffer: props.rowBuffer,
|
|
83104
83106
|
rowClassRules,
|
|
83105
83107
|
rowDragManaged: onSSDR ? false : props.rowDragManaged ?? true,
|
package/dist/modern/index.cjs
CHANGED
|
@@ -55215,7 +55215,10 @@ function transformServerSideRequestObj(request, filtersState, searchValue) {
|
|
|
55215
55215
|
)
|
|
55216
55216
|
};
|
|
55217
55217
|
}
|
|
55218
|
-
var transformFilterValue = (value) => {
|
|
55218
|
+
var transformFilterValue = (value, field, formatter) => {
|
|
55219
|
+
const formattedValue = formatter?.(value, field);
|
|
55220
|
+
if (formattedValue)
|
|
55221
|
+
return formattedValue;
|
|
55219
55222
|
if (value?.date)
|
|
55220
55223
|
return dateFns.formatISO(value.date, { representation: "date" });
|
|
55221
55224
|
return value.toString();
|
|
@@ -55241,8 +55244,11 @@ function getServerSideParams(request, filtersState, searchValue, options = {}) {
|
|
|
55241
55244
|
params.set("group", group);
|
|
55242
55245
|
}
|
|
55243
55246
|
if (options.filters !== false) {
|
|
55247
|
+
const formatter = options.filterValueFormatter;
|
|
55244
55248
|
filtersState.forEach((filter) => {
|
|
55245
|
-
const value = filter.selected.length === 1 ? transformFilterValue(filter.selected[0]) : `[${filter.selected.map(
|
|
55249
|
+
const value = filter.selected.length === 1 ? transformFilterValue(filter.selected[0], filter.field, formatter) : `[${filter.selected.map(
|
|
55250
|
+
(value2) => transformFilterValue(value2, filter.field, formatter)
|
|
55251
|
+
)}]`;
|
|
55246
55252
|
params.set(`filters[${filter.field}]`, value);
|
|
55247
55253
|
});
|
|
55248
55254
|
request.groupKeys.forEach((groupKey, index) => {
|
|
@@ -57541,7 +57547,7 @@ function useFilterStorage({
|
|
|
57541
57547
|
setFiltersState((prev) => {
|
|
57542
57548
|
const columnDefinition = getColumnDefinition(field);
|
|
57543
57549
|
return {
|
|
57544
|
-
...
|
|
57550
|
+
...prev,
|
|
57545
57551
|
selectedFilters: {
|
|
57546
57552
|
...prev.selectedFilters,
|
|
57547
57553
|
[field]: {
|
|
@@ -82639,9 +82645,6 @@ var Table = (props) => {
|
|
|
82639
82645
|
);
|
|
82640
82646
|
props.UNSAFE_internalAGGridOverrides?.onGridReady?.(params);
|
|
82641
82647
|
};
|
|
82642
|
-
const postProcessPopup = (params) => {
|
|
82643
|
-
params.ePopup.style.top = `${HEADER_HEIGHT}px`;
|
|
82644
|
-
};
|
|
82645
82648
|
const internalOnRowSelected = (event) => {
|
|
82646
82649
|
props.onRowSelected?.(event);
|
|
82647
82650
|
if (props.siblingGroupsRowSelectionDisabled) {
|
|
@@ -82901,7 +82904,6 @@ var Table = (props) => {
|
|
|
82901
82904
|
paginationPageSize: props.paginationPageSize || defaultPaginationPageSize,
|
|
82902
82905
|
popupParent: props.popupParent,
|
|
82903
82906
|
pinnedBottomRowData: props.pinnedBottomRowData,
|
|
82904
|
-
postProcessPopup,
|
|
82905
82907
|
rowBuffer: props.rowBuffer,
|
|
82906
82908
|
rowClassRules,
|
|
82907
82909
|
rowDragManaged: onSSDR ? false : props.rowDragManaged ?? true,
|
package/dist/modern/index.d.cts
CHANGED
|
@@ -470,6 +470,8 @@ interface ColumnDefinition<TValue = any, TRenderer = React.FC<ICellRendererParam
|
|
|
470
470
|
groupId?: string;
|
|
471
471
|
cellEditor?: TEditor;
|
|
472
472
|
cellEditorParams?: TEditorParams;
|
|
473
|
+
cellEditorPopup?: boolean;
|
|
474
|
+
cellEditorPopupPosition?: 'over' | 'under';
|
|
473
475
|
cellCSVFormatter?: (value: TValue) => string;
|
|
474
476
|
cellExcelFormatter?: (value: TValue) => string;
|
|
475
477
|
cellExcelDataType?: string;
|
|
@@ -887,6 +889,12 @@ type ServerSideParamsOptions = {
|
|
|
887
889
|
* @default filters[search]
|
|
888
890
|
*/
|
|
889
891
|
searchKey?: string;
|
|
892
|
+
/**
|
|
893
|
+
* Custom function for formatting URL params.
|
|
894
|
+
* This function will help you to format URL params when value is an object.
|
|
895
|
+
* If the function does not return anything, the default behavior will be used.
|
|
896
|
+
*/
|
|
897
|
+
filterValueFormatter?: (value: any, field: string) => string | void;
|
|
890
898
|
};
|
|
891
899
|
interface RowActionsConfig extends Omit<ColDef, 'field' | 'pinned' | 'lockPinned' | 'lockVisible'> {
|
|
892
900
|
}
|
package/dist/modern/index.d.ts
CHANGED
|
@@ -470,6 +470,8 @@ interface ColumnDefinition<TValue = any, TRenderer = React.FC<ICellRendererParam
|
|
|
470
470
|
groupId?: string;
|
|
471
471
|
cellEditor?: TEditor;
|
|
472
472
|
cellEditorParams?: TEditorParams;
|
|
473
|
+
cellEditorPopup?: boolean;
|
|
474
|
+
cellEditorPopupPosition?: 'over' | 'under';
|
|
473
475
|
cellCSVFormatter?: (value: TValue) => string;
|
|
474
476
|
cellExcelFormatter?: (value: TValue) => string;
|
|
475
477
|
cellExcelDataType?: string;
|
|
@@ -887,6 +889,12 @@ type ServerSideParamsOptions = {
|
|
|
887
889
|
* @default filters[search]
|
|
888
890
|
*/
|
|
889
891
|
searchKey?: string;
|
|
892
|
+
/**
|
|
893
|
+
* Custom function for formatting URL params.
|
|
894
|
+
* This function will help you to format URL params when value is an object.
|
|
895
|
+
* If the function does not return anything, the default behavior will be used.
|
|
896
|
+
*/
|
|
897
|
+
filterValueFormatter?: (value: any, field: string) => string | void;
|
|
890
898
|
};
|
|
891
899
|
interface RowActionsConfig extends Omit<ColDef, 'field' | 'pinned' | 'lockPinned' | 'lockVisible'> {
|
|
892
900
|
}
|
package/dist/modern/index.js
CHANGED
|
@@ -55201,7 +55201,10 @@ function transformServerSideRequestObj(request, filtersState, searchValue) {
|
|
|
55201
55201
|
)
|
|
55202
55202
|
};
|
|
55203
55203
|
}
|
|
55204
|
-
var transformFilterValue = (value) => {
|
|
55204
|
+
var transformFilterValue = (value, field, formatter) => {
|
|
55205
|
+
const formattedValue = formatter?.(value, field);
|
|
55206
|
+
if (formattedValue)
|
|
55207
|
+
return formattedValue;
|
|
55205
55208
|
if (value?.date)
|
|
55206
55209
|
return formatISO(value.date, { representation: "date" });
|
|
55207
55210
|
return value.toString();
|
|
@@ -55227,8 +55230,11 @@ function getServerSideParams(request, filtersState, searchValue, options = {}) {
|
|
|
55227
55230
|
params.set("group", group);
|
|
55228
55231
|
}
|
|
55229
55232
|
if (options.filters !== false) {
|
|
55233
|
+
const formatter = options.filterValueFormatter;
|
|
55230
55234
|
filtersState.forEach((filter) => {
|
|
55231
|
-
const value = filter.selected.length === 1 ? transformFilterValue(filter.selected[0]) : `[${filter.selected.map(
|
|
55235
|
+
const value = filter.selected.length === 1 ? transformFilterValue(filter.selected[0], filter.field, formatter) : `[${filter.selected.map(
|
|
55236
|
+
(value2) => transformFilterValue(value2, filter.field, formatter)
|
|
55237
|
+
)}]`;
|
|
55232
55238
|
params.set(`filters[${filter.field}]`, value);
|
|
55233
55239
|
});
|
|
55234
55240
|
request.groupKeys.forEach((groupKey, index) => {
|
|
@@ -57527,7 +57533,7 @@ function useFilterStorage({
|
|
|
57527
57533
|
setFiltersState((prev) => {
|
|
57528
57534
|
const columnDefinition = getColumnDefinition(field);
|
|
57529
57535
|
return {
|
|
57530
|
-
...
|
|
57536
|
+
...prev,
|
|
57531
57537
|
selectedFilters: {
|
|
57532
57538
|
...prev.selectedFilters,
|
|
57533
57539
|
[field]: {
|
|
@@ -82625,9 +82631,6 @@ var Table = (props) => {
|
|
|
82625
82631
|
);
|
|
82626
82632
|
props.UNSAFE_internalAGGridOverrides?.onGridReady?.(params);
|
|
82627
82633
|
};
|
|
82628
|
-
const postProcessPopup = (params) => {
|
|
82629
|
-
params.ePopup.style.top = `${HEADER_HEIGHT}px`;
|
|
82630
|
-
};
|
|
82631
82634
|
const internalOnRowSelected = (event) => {
|
|
82632
82635
|
props.onRowSelected?.(event);
|
|
82633
82636
|
if (props.siblingGroupsRowSelectionDisabled) {
|
|
@@ -82887,7 +82890,6 @@ var Table = (props) => {
|
|
|
82887
82890
|
paginationPageSize: props.paginationPageSize || defaultPaginationPageSize,
|
|
82888
82891
|
popupParent: props.popupParent,
|
|
82889
82892
|
pinnedBottomRowData: props.pinnedBottomRowData,
|
|
82890
|
-
postProcessPopup,
|
|
82891
82893
|
rowBuffer: props.rowBuffer,
|
|
82892
82894
|
rowClassRules,
|
|
82893
82895
|
rowDragManaged: onSSDR ? false : props.rowDragManaged ?? true,
|