@elliemae/ds-datagrids 3.16.0-next.2 → 3.16.0-next.4
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/DSDataGrid.js +128 -128
- package/dist/cjs/DSDataGrid.js.map +2 -2
- package/dist/cjs/package.json +7 -0
- package/dist/cjs/plugins/filterable/FilterablePlugin.js.map +2 -2
- package/dist/cjs/plugins/virtualization/AutoHeightList.js.map +2 -2
- package/dist/esm/DSDataGrid.js +1 -1
- package/dist/esm/DSDataGrid.js.map +1 -1
- package/dist/esm/package.json +7 -0
- package/dist/esm/plugins/filterable/FilterablePlugin.js.map +2 -2
- package/dist/esm/plugins/virtualization/AutoHeightList.js.map +2 -2
- package/package.json +21 -20
package/dist/cjs/DSDataGrid.js
CHANGED
@@ -32,7 +32,7 @@ __export(DSDataGrid_exports, {
|
|
32
32
|
module.exports = __toCommonJS(DSDataGrid_exports);
|
33
33
|
var React = __toESM(require("react"));
|
34
34
|
var import_jsx_runtime = require("react/jsx-runtime");
|
35
|
-
var
|
35
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
36
36
|
var import_ds_truncated_tooltip_text = require("@elliemae/ds-truncated-tooltip-text");
|
37
37
|
var import_DataGridImpl = require("./DataGridImpl");
|
38
38
|
var import_rowSizes = require("./rowSizes");
|
@@ -263,176 +263,176 @@ const DSDataGrids = ({
|
|
263
263
|
}
|
264
264
|
) });
|
265
265
|
const props = {
|
266
|
-
instanceRef:
|
266
|
+
instanceRef: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.func, import_ds_props_helpers.PropTypes.shape({ current: import_ds_props_helpers.PropTypes.any })]).description(
|
267
267
|
"ref to the instance of the datagrid, handle it imperatively"
|
268
268
|
),
|
269
|
-
className:
|
270
|
-
containerProps:
|
271
|
-
filterBarOptions:
|
272
|
-
minWidth:
|
273
|
-
maxWidth:
|
269
|
+
className: import_ds_props_helpers.PropTypes.string.description("class for data grid wrapper"),
|
270
|
+
containerProps: import_ds_props_helpers.PropTypes.object.description("inject props to datagrid wrapper"),
|
271
|
+
filterBarOptions: import_ds_props_helpers.PropTypes.shape({
|
272
|
+
minWidth: import_ds_props_helpers.PropTypes.number,
|
273
|
+
maxWidth: import_ds_props_helpers.PropTypes.number
|
274
274
|
}).description("FilterBar props passed down to FilterBar"),
|
275
|
-
columns:
|
276
|
-
|
277
|
-
property:
|
278
|
-
label:
|
279
|
-
width:
|
280
|
-
minWidth:
|
281
|
-
customEditor:
|
282
|
-
customRenderer:
|
283
|
-
searchable:
|
284
|
-
sortable:
|
285
|
-
resizable:
|
286
|
-
editable:
|
287
|
-
visible:
|
275
|
+
columns: import_ds_props_helpers.PropTypes.arrayOf(
|
276
|
+
import_ds_props_helpers.PropTypes.shape({
|
277
|
+
property: import_ds_props_helpers.PropTypes.string.isRequired,
|
278
|
+
label: import_ds_props_helpers.PropTypes.string,
|
279
|
+
width: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.number, import_ds_props_helpers.PropTypes.string]),
|
280
|
+
minWidth: import_ds_props_helpers.PropTypes.number,
|
281
|
+
customEditor: import_ds_props_helpers.PropTypes.func,
|
282
|
+
customRenderer: import_ds_props_helpers.PropTypes.func,
|
283
|
+
searchable: import_ds_props_helpers.PropTypes.bool,
|
284
|
+
sortable: import_ds_props_helpers.PropTypes.bool,
|
285
|
+
resizable: import_ds_props_helpers.PropTypes.bool,
|
286
|
+
editable: import_ds_props_helpers.PropTypes.bool,
|
287
|
+
visible: import_ds_props_helpers.PropTypes.bool
|
288
288
|
})
|
289
289
|
).description("datagrid columns"),
|
290
|
-
rows:
|
291
|
-
rowKey:
|
292
|
-
infiniteScrolling:
|
293
|
-
overscanCount:
|
290
|
+
rows: import_ds_props_helpers.PropTypes.arrayOf(import_ds_props_helpers.PropTypes.object).description("datagrid rows"),
|
291
|
+
rowKey: import_ds_props_helpers.PropTypes.string.description("key for each row"),
|
292
|
+
infiniteScrolling: import_ds_props_helpers.PropTypes.bool.description("toggle infinite scroll loading behavior"),
|
293
|
+
overscanCount: import_ds_props_helpers.PropTypes.number.description(
|
294
294
|
"Activates 'editable' feature on the DataGrid NOTE: needs to be activated in the column definition as well"
|
295
295
|
),
|
296
|
-
editable:
|
297
|
-
sortable:
|
296
|
+
editable: import_ds_props_helpers.PropTypes.bool.description("turn datagrid to editable mode"),
|
297
|
+
sortable: import_ds_props_helpers.PropTypes.bool.description(
|
298
298
|
"Activates 'sortable' feature on the GataGrid NOTE: needs to be activated in the column definition as well"
|
299
299
|
),
|
300
|
-
sortEmptyLast:
|
301
|
-
paginated:
|
300
|
+
sortEmptyLast: import_ds_props_helpers.PropTypes.bool.description("Put empty values always last on the column after sorting"),
|
301
|
+
paginated: import_ds_props_helpers.PropTypes.bool.description(
|
302
302
|
"Activates 'pagination' feature on the datagrid NOTE: needs to be activated in the column definition as well"
|
303
303
|
),
|
304
|
-
paginationStep:
|
305
|
-
dragAndDropRows:
|
304
|
+
paginationStep: import_ds_props_helpers.PropTypes.number.description("Pagination step for clicking the next pages"),
|
305
|
+
dragAndDropRows: import_ds_props_helpers.PropTypes.bool.description(
|
306
306
|
"Activates 'drag and drop rows' feature on the datagrid NOTE: needs to be activated in the column definition as well"
|
307
307
|
),
|
308
|
-
selectable:
|
308
|
+
selectable: import_ds_props_helpers.PropTypes.bool.description(
|
309
309
|
"Activates 'selection' feature on the datagrid NOTE: needs to be activated in the column definition as well"
|
310
310
|
),
|
311
|
-
resizeableColumns:
|
311
|
+
resizeableColumns: import_ds_props_helpers.PropTypes.bool.description(
|
312
312
|
"Activates 'resize' feature on the datagrid NOTE: needs to be activated in the column definition as well"
|
313
313
|
),
|
314
|
-
noResultsPlaceholder:
|
314
|
+
noResultsPlaceholder: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.string, import_ds_props_helpers.PropTypes.element]).description(
|
315
315
|
"Placeholder rendered when no rows are visible"
|
316
316
|
),
|
317
|
-
searchFilters:
|
317
|
+
searchFilters: import_ds_props_helpers.PropTypes.bool.description(
|
318
318
|
"activates 'filtering' feature on the datagrid NOTE: needs to be activated in the column definition as well"
|
319
319
|
),
|
320
|
-
dragAndDropColumns:
|
320
|
+
dragAndDropColumns: import_ds_props_helpers.PropTypes.bool.description(
|
321
321
|
"Activates 'drag and drop columns' feature on the datagrid NOTE: needs to be activated in the column definition as well"
|
322
322
|
),
|
323
|
-
useTreeData:
|
323
|
+
useTreeData: import_ds_props_helpers.PropTypes.bool.description(
|
324
324
|
"activates 'grouping and tree data' feature on the datagrid NOTE: needs to be activated in the column definition as well"
|
325
325
|
),
|
326
|
-
autoScrollToId:
|
327
|
-
selectAll:
|
328
|
-
selectedRows:
|
329
|
-
filters:
|
330
|
-
onExpandRow:
|
331
|
-
onExpandChange:
|
332
|
-
onToggleExpand:
|
333
|
-
onAddFilter:
|
334
|
-
onRemoveFilter:
|
335
|
-
onFiltersChange:
|
336
|
-
onDefaultFiltersLoad:
|
337
|
-
onMoveColumnOver:
|
338
|
-
onMoveColumnStart:
|
339
|
-
onMoveColumnEnd:
|
340
|
-
showFilterBar:
|
341
|
-
multiSelectFilterOptions:
|
326
|
+
autoScrollToId: import_ds_props_helpers.PropTypes.any.description("AutoScroll to row ID"),
|
327
|
+
selectAll: import_ds_props_helpers.PropTypes.bool.description("Whether all rows are selected or not"),
|
328
|
+
selectedRows: import_ds_props_helpers.PropTypes.arrayOf(import_ds_props_helpers.PropTypes.object).description(" Defines the selected rows"),
|
329
|
+
filters: import_ds_props_helpers.PropTypes.arrayOf(import_ds_props_helpers.PropTypes.object).description("Filters to be applied to the grid"),
|
330
|
+
onExpandRow: import_ds_props_helpers.PropTypes.func.description("Handler when user expands a row"),
|
331
|
+
onExpandChange: import_ds_props_helpers.PropTypes.func.description("Handler when user expands a row with full expand state"),
|
332
|
+
onToggleExpand: import_ds_props_helpers.PropTypes.func.description("Handler when user expands a row (old API)"),
|
333
|
+
onAddFilter: import_ds_props_helpers.PropTypes.func.description("Handler when user adds a filter"),
|
334
|
+
onRemoveFilter: import_ds_props_helpers.PropTypes.func.description("Handler when user removes a filter"),
|
335
|
+
onFiltersChange: import_ds_props_helpers.PropTypes.func.description("Handler when the filters state has changed "),
|
336
|
+
onDefaultFiltersLoad: import_ds_props_helpers.PropTypes.func.description("Handler when the default filters load. Returns the rows rendered"),
|
337
|
+
onMoveColumnOver: import_ds_props_helpers.PropTypes.func.description("Handler when column move is over another column"),
|
338
|
+
onMoveColumnStart: import_ds_props_helpers.PropTypes.func.description(" Handler when column move starts"),
|
339
|
+
onMoveColumnEnd: import_ds_props_helpers.PropTypes.func.description("Handler when column move ends"),
|
340
|
+
showFilterBar: import_ds_props_helpers.PropTypes.bool.description("Whether to show the filter bar or not"),
|
341
|
+
multiSelectFilterOptions: import_ds_props_helpers.PropTypes.arrayOf(import_ds_props_helpers.PropTypes.object).description(
|
342
342
|
"Custom option for the header with multi select"
|
343
343
|
),
|
344
|
-
multiSelectFilterLabel:
|
345
|
-
multiSelectFilterLabels:
|
346
|
-
aggregations:
|
347
|
-
groupingColumn:
|
348
|
-
groupedBy:
|
349
|
-
sortingColumns:
|
350
|
-
|
351
|
-
direction:
|
352
|
-
position:
|
344
|
+
multiSelectFilterLabel: import_ds_props_helpers.PropTypes.string.description("Label to the header column for multi select"),
|
345
|
+
multiSelectFilterLabels: import_ds_props_helpers.PropTypes.arrayOf(import_ds_props_helpers.PropTypes.string).description("Labels for multi selects"),
|
346
|
+
aggregations: import_ds_props_helpers.PropTypes.object.description("").deprecated(""),
|
347
|
+
groupingColumn: import_ds_props_helpers.PropTypes.string.description("Column which rows would be grouped by").deprecated(""),
|
348
|
+
groupedBy: import_ds_props_helpers.PropTypes.string.description("group by"),
|
349
|
+
sortingColumns: import_ds_props_helpers.PropTypes.objectOf(
|
350
|
+
import_ds_props_helpers.PropTypes.shape({
|
351
|
+
direction: import_ds_props_helpers.PropTypes.oneOf(["asc", "desc"]),
|
352
|
+
position: import_ds_props_helpers.PropTypes.number
|
353
353
|
})
|
354
354
|
).description("Defines the sorting state"),
|
355
|
-
visibleColumns:
|
356
|
-
minPerPage:
|
357
|
-
maxPerPage:
|
358
|
-
onPerPageChange:
|
359
|
-
onPageChange:
|
360
|
-
pagination:
|
361
|
-
page:
|
362
|
-
perPage:
|
355
|
+
visibleColumns: import_ds_props_helpers.PropTypes.arrayOf(import_ds_props_helpers.PropTypes.string).description("Visible columns property"),
|
356
|
+
minPerPage: import_ds_props_helpers.PropTypes.string.description("Pagination: Minimum number of rows per page"),
|
357
|
+
maxPerPage: import_ds_props_helpers.PropTypes.string.description("Pagination: Maximum number of rows per page"),
|
358
|
+
onPerPageChange: import_ds_props_helpers.PropTypes.string.description("Pagination: Handler when user changes the amount of rows per page"),
|
359
|
+
onPageChange: import_ds_props_helpers.PropTypes.string.description("Pagination: Handler when user changes the page"),
|
360
|
+
pagination: import_ds_props_helpers.PropTypes.shape({
|
361
|
+
page: import_ds_props_helpers.PropTypes.number,
|
362
|
+
perPage: import_ds_props_helpers.PropTypes.number
|
363
363
|
}).description("pagination state"),
|
364
|
-
showHeader:
|
365
|
-
fixedHeader:
|
366
|
-
height:
|
367
|
-
minColumnWidth:
|
368
|
-
showRowsLoader:
|
369
|
-
showSelectHighlight:
|
370
|
-
showSelectColumn:
|
364
|
+
showHeader: import_ds_props_helpers.PropTypes.bool.description("Whether to show the header or not"),
|
365
|
+
fixedHeader: import_ds_props_helpers.PropTypes.bool.description("Whether to header is fixed or not"),
|
366
|
+
height: import_ds_props_helpers.PropTypes.number.description("Defines the height of the DataGrid"),
|
367
|
+
minColumnWidth: import_ds_props_helpers.PropTypes.number.description("General min column width for all the columns "),
|
368
|
+
showRowsLoader: import_ds_props_helpers.PropTypes.bool.description("Whether to show a loader instead of the rows or not"),
|
369
|
+
showSelectHighlight: import_ds_props_helpers.PropTypes.bool.description("When a user selects a row, that row get highlighted"),
|
370
|
+
showSelectColumn: import_ds_props_helpers.PropTypes.bool.description(
|
371
371
|
"Whether to show the select column when the selection feature is active"
|
372
372
|
),
|
373
|
-
selectColumnSortable:
|
374
|
-
selectColumnFilterable:
|
375
|
-
selectionColumnDefinition:
|
376
|
-
renderToolbar:
|
377
|
-
toolbarDelayClose:
|
378
|
-
renderFilterToolbar:
|
379
|
-
multiSelectComponent:
|
380
|
-
normalizeDataKeys:
|
381
|
-
noResultsRender:
|
382
|
-
fluidHeight:
|
383
|
-
customHandlers:
|
384
|
-
onFilterMenuClose:
|
385
|
-
onFilterMenuOpen:
|
386
|
-
onReorder:
|
387
|
-
onMoveRowEnd:
|
388
|
-
onMoveRowStart:
|
389
|
-
onColumnResize:
|
390
|
-
onFilter:
|
391
|
-
onSort:
|
392
|
-
onColumnRowEdited:
|
393
|
-
onColumnRowEdit:
|
394
|
-
onSelectRow:
|
395
|
-
onSelectAll:
|
396
|
-
getData:
|
397
|
-
onInfiniteScrolling:
|
373
|
+
selectColumnSortable: import_ds_props_helpers.PropTypes.bool.description("activates sortable feature to selection column"),
|
374
|
+
selectColumnFilterable: import_ds_props_helpers.PropTypes.bool.description("Activates filterable feature to selection column"),
|
375
|
+
selectionColumnDefinition: import_ds_props_helpers.PropTypes.object.description("Define the definition for the selection column"),
|
376
|
+
renderToolbar: import_ds_props_helpers.PropTypes.func.description("Function that returns a toolbar to show when the user hovers the row"),
|
377
|
+
toolbarDelayClose: import_ds_props_helpers.PropTypes.number.description(" Timeout to close the toolbar"),
|
378
|
+
renderFilterToolbar: import_ds_props_helpers.PropTypes.func.description("Function that returns a toolbar in the FilterBar component"),
|
379
|
+
multiSelectComponent: import_ds_props_helpers.PropTypes.element.description("Custom component for the selection"),
|
380
|
+
normalizeDataKeys: import_ds_props_helpers.PropTypes.bool.description("Normalize the keys of the data received and the columns"),
|
381
|
+
noResultsRender: import_ds_props_helpers.PropTypes.func.description("Function that returns an Element when there are no rows"),
|
382
|
+
fluidHeight: import_ds_props_helpers.PropTypes.bool.description("The height of the DataGrid will expand to its container"),
|
383
|
+
customHandlers: import_ds_props_helpers.PropTypes.object.description("").deprecated(""),
|
384
|
+
onFilterMenuClose: import_ds_props_helpers.PropTypes.func.description("Handler when user closes the filter menu"),
|
385
|
+
onFilterMenuOpen: import_ds_props_helpers.PropTypes.func.description("Handler when user opens the filter menu"),
|
386
|
+
onReorder: import_ds_props_helpers.PropTypes.func.description("handler when user drags a row "),
|
387
|
+
onMoveRowEnd: import_ds_props_helpers.PropTypes.func.description("Handler when user stops dragging a row "),
|
388
|
+
onMoveRowStart: import_ds_props_helpers.PropTypes.func.description("Handler when user starts dragging a row"),
|
389
|
+
onColumnResize: import_ds_props_helpers.PropTypes.func.description("Handler when user has resized a column"),
|
390
|
+
onFilter: import_ds_props_helpers.PropTypes.func.description("Handler when user filters by a column"),
|
391
|
+
onSort: import_ds_props_helpers.PropTypes.func.description("Handler when user sorts by a column "),
|
392
|
+
onColumnRowEdited: import_ds_props_helpers.PropTypes.func.description("Handler when user has edited a cell row"),
|
393
|
+
onColumnRowEdit: import_ds_props_helpers.PropTypes.func.description(" Handler when user activates the cell row editing functionality"),
|
394
|
+
onSelectRow: import_ds_props_helpers.PropTypes.func.description("Handler when user selects a row"),
|
395
|
+
onSelectAll: import_ds_props_helpers.PropTypes.func.description("Handler when user checks the selection header controller"),
|
396
|
+
getData: import_ds_props_helpers.PropTypes.func.description("Handler to get more data when infinite scroll is activated"),
|
397
|
+
onInfiniteScrolling: import_ds_props_helpers.PropTypes.func.description(
|
398
398
|
"Handler to get more data when infinite scroll is activated without side-effect"
|
399
399
|
),
|
400
|
-
serverSideData:
|
401
|
-
virtualized:
|
402
|
-
numRowsVisible:
|
403
|
-
isColumnEditable:
|
404
|
-
groupedRows:
|
405
|
-
groupedRowsRenderHeader:
|
406
|
-
isDataSorted:
|
407
|
-
isDataFiltered:
|
408
|
-
rowSize:
|
409
|
-
wrapText:
|
410
|
-
renderExpandedDetails:
|
400
|
+
serverSideData: import_ds_props_helpers.PropTypes.bool.description("Flag to override empty sort when data is from server"),
|
401
|
+
virtualized: import_ds_props_helpers.PropTypes.bool.description("Flag to force virtualization. Not used"),
|
402
|
+
numRowsVisible: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.number, import_ds_props_helpers.PropTypes.oneOf(["all"])]).description("Number of rows visible. Not used"),
|
403
|
+
isColumnEditable: import_ds_props_helpers.PropTypes.func.description("Callback to check if column is editable"),
|
404
|
+
groupedRows: import_ds_props_helpers.PropTypes.bool.description("Flag for groupedRows"),
|
405
|
+
groupedRowsRenderHeader: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.func, import_ds_props_helpers.PropTypes.element]).description("Header for grouped rows"),
|
406
|
+
isDataSorted: import_ds_props_helpers.PropTypes.bool.description("Once activated will disable the internal logic for sorting"),
|
407
|
+
isDataFiltered: import_ds_props_helpers.PropTypes.bool.description("Once activated will disable the internal logic for filtering"),
|
408
|
+
rowSize: import_ds_props_helpers.PropTypes.oneOf(import_rowSizes.RowSizesOptionsArr).description("Change row size"),
|
409
|
+
wrapText: import_ds_props_helpers.PropTypes.bool.description("Whether to wrap the text of the data grid or not"),
|
410
|
+
renderExpandedDetails: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.func, import_ds_props_helpers.PropTypes.element]).description(
|
411
411
|
"Element to render expanded details"
|
412
412
|
),
|
413
|
-
detailColumns:
|
414
|
-
expandable:
|
415
|
-
getChildrenRows:
|
416
|
-
expandableSubrowsVisible:
|
417
|
-
renderRowDetails:
|
413
|
+
detailColumns: import_ds_props_helpers.PropTypes.arrayOf(import_ds_props_helpers.PropTypes.object).description("Columns to render on the details of an expanded row"),
|
414
|
+
expandable: import_ds_props_helpers.PropTypes.bool.description("Flag to enable the expandable feature "),
|
415
|
+
getChildrenRows: import_ds_props_helpers.PropTypes.func.description("Callback to get the row children"),
|
416
|
+
expandableSubrowsVisible: import_ds_props_helpers.PropTypes.number.description("Number of rows visible on the details of an expanded row"),
|
417
|
+
renderRowDetails: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.func, import_ds_props_helpers.PropTypes.element]).description(
|
418
418
|
"Element to render inside expanded row"
|
419
419
|
),
|
420
|
-
getExpandedRowSize:
|
421
|
-
getExpandedRowMinSize:
|
422
|
-
subRowSize:
|
423
|
-
bindColumnsSizeTo:
|
424
|
-
bindRowSizeTo:
|
425
|
-
onToggleShowAllRows:
|
426
|
-
expandedRows:
|
427
|
-
autoHeight:
|
428
|
-
noColumnsPlaceholder:
|
420
|
+
getExpandedRowSize: import_ds_props_helpers.PropTypes.func.description("Callback to get the expanded row size"),
|
421
|
+
getExpandedRowMinSize: import_ds_props_helpers.PropTypes.func.description("Callback to get the expanded row minimum size"),
|
422
|
+
subRowSize: import_ds_props_helpers.PropTypes.oneOf(import_rowSizes.RowSizesOptionsArr).description("Change expanded/details rows size"),
|
423
|
+
bindColumnsSizeTo: import_ds_props_helpers.PropTypes.string.description("Bind the column size to another grid instance"),
|
424
|
+
bindRowSizeTo: import_ds_props_helpers.PropTypes.string.description("Bind the row size to another grid instance"),
|
425
|
+
onToggleShowAllRows: import_ds_props_helpers.PropTypes.func.description("Handler when toggle show all is clicked"),
|
426
|
+
expandedRows: import_ds_props_helpers.PropTypes.object.description("Expanded row state"),
|
427
|
+
autoHeight: import_ds_props_helpers.PropTypes.bool.description("Flag to enable autoheight"),
|
428
|
+
noColumnsPlaceholder: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.string, import_ds_props_helpers.PropTypes.element]).description(
|
429
429
|
"Placeholder rendered when no columns are visible"
|
430
430
|
),
|
431
|
-
plugins:
|
431
|
+
plugins: import_ds_props_helpers.PropTypes.arrayOf(import_ds_props_helpers.PropTypes.any).description("Plugin additional array")
|
432
432
|
};
|
433
433
|
DSDataGrids.propTypes = props;
|
434
434
|
DSDataGrids.displayName = "DSDataGrids";
|
435
|
-
const DSDataGridsWithSchema = (0,
|
435
|
+
const DSDataGridsWithSchema = (0, import_ds_props_helpers.describe)(DSDataGrids);
|
436
436
|
DSDataGridsWithSchema.propTypes = props;
|
437
437
|
var DSDataGrid_default = DSDataGrids;
|
438
438
|
//# sourceMappingURL=DSDataGrid.js.map
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../src/DSDataGrid.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
4
|
-
"sourcesContent": ["/* eslint-disable max-lines */\nimport React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\nimport { TooltipTextProvider } from '@elliemae/ds-truncated-tooltip-text';\nimport { DataGridImpl } from './DataGridImpl';\nimport { RowSizesOptions, RowSizesOptionsArr } from './rowSizes';\n\nconst DSDataGrids = ({\n containerProps = {},\n instanceRef,\n className = '',\n\n // data\n columns = [],\n rows = [],\n rowKey = 'id',\n\n // features\n infiniteScrolling = false,\n editable = false,\n sortable = false,\n sortEmptyLast = false,\n paginated = false,\n dragAndDropRows = false,\n selectable = false,\n resizeableColumns = false,\n searchFilters = false,\n dragAndDropColumns = false,\n useTreeData = false,\n autoScrollToId,\n\n // virtualization props\n overscanCount = 10,\n\n // feature state\n selectAll = false, // todo: change to isAllSelected\n selectedRows = [],\n filters = undefined,\n onAddFilter = () => null,\n onRemoveFilter = () => null,\n onFiltersChange = () => null,\n showFilterBar = true,\n multiSelectFilterOptions = [\n { id: 'true', label: 'Selected' },\n { id: 'false', label: 'Not selected' },\n ],\n multiSelectFilterLabels = undefined,\n multiSelectFilterLabel = 'Selection',\n\n aggregations = {},\n groupingColumn = undefined,\n\n sortingColumns = {},\n\n // pagination\n minPerPage = 0,\n maxPerPage = 50,\n onPerPageChange = () => null,\n onPageChange = () => null,\n paginationStep = 2,\n pagination = {\n page: 1,\n perPage: 10,\n },\n // visual\n showHeader = true,\n fixedHeader = true,\n wrapText = false,\n height = undefined,\n minColumnWidth = 100,\n showRowsLoader = false,\n visibleColumns = undefined, // this enforces visibility of columns\n showSelectHighlight = false,\n showSelectColumn = true,\n selectColumnSortable = true,\n selectColumnFilterable = false,\n selectionColumnDefinition = {},\n filterBarOptions = undefined,\n // searchGrid = false,\n renderToolbar = undefined,\n toolbarDelayClose = 400,\n renderFilterToolbar = undefined,\n multiSelectComponent = undefined,\n // todo: deprecate this\n noResultsRender,\n noResultsPlaceholder,\n fluidHeight = false,\n\n customHandlers = {},\n\n // grouping feature\n groupedBy = undefined,\n\n // callbacks\n onDefaultFiltersLoad = () => null,\n onReorder = () => null,\n onMoveRowEnd = () => null,\n onMoveRowStart = () => null,\n onMoveColumnOver = () => null,\n onMoveColumnStart = () => null,\n onMoveColumnEnd = () => null,\n onColumnResize = () => null,\n onExpandChange = () => null,\n onToggleExpand = () => null,\n onExpandRow = () => null,\n onFilter = () => null,\n onSort = () => null,\n onColumnRowEdited = () => null,\n onColumnRowEdit = () => null,\n onSelectRow = () => null,\n onSelectAll = () => null,\n onInfiniteScrolling = () => null,\n onFilterMenuClose = () => null,\n onFilterMenuOpen = () => null,\n getData = undefined, // todo: change to onGetMoreData\n serverSideData = false,\n isDataSorted = false,\n isDataFiltered = false,\n virtualized = true,\n numRowsVisible = undefined,\n isColumnEditable = (column) => column.editable,\n\n // grouped props\n groupedRows = false,\n groupedRowsRenderHeader = undefined,\n // expandable props\n renderExpandedDetails = () => null,\n detailColumns,\n expandable = false,\n getChildrenRows = (row) => row.children,\n expandableSubrowsVisible = 7,\n renderRowDetails = () => null,\n getExpandedRowSize = undefined,\n getExpandedRowMinSize,\n rowSize = RowSizesOptions.normal,\n subRowSize = RowSizesOptions.normal,\n bindColumnsSizeTo = undefined,\n bindRowSizeTo = undefined,\n onToggleShowAllRows,\n expandedRows,\n autoHeight = false,\n noColumnsPlaceholder,\n plugins = [],\n normalizeDataKeys = false,\n}) => (\n <TooltipTextProvider>\n <DataGridImpl\n aggregations={aggregations}\n autoHeight={autoHeight && !fluidHeight}\n autoScrollToId={autoScrollToId}\n bindColumnsSizeTo={bindColumnsSizeTo}\n bindRowSizeTo={bindRowSizeTo}\n className={className}\n columns={columns}\n containerProps={containerProps}\n customHandlers={customHandlers}\n detailColumns={detailColumns}\n dragAndDropColumns={dragAndDropColumns}\n dragAndDropRows={dragAndDropRows}\n editable={editable}\n expandable={expandable}\n expandableSubrowsVisible={expandableSubrowsVisible}\n expandedRows={expandedRows}\n filterBarOptions={filterBarOptions}\n filters={filters}\n fixedHeader={fixedHeader}\n fluidHeight={fluidHeight}\n getChildrenRows={getChildrenRows}\n getData={getData}\n getExpandedRowMinSize={getExpandedRowMinSize}\n getExpandedRowSize={getExpandedRowSize}\n groupedBy={groupedBy}\n groupedRows={groupedRows}\n groupedRowsRenderHeader={groupedRowsRenderHeader}\n groupingColumn={groupingColumn}\n height={height}\n infiniteScrolling={infiniteScrolling}\n instanceRef={instanceRef}\n isColumnEditable={isColumnEditable}\n isDataFiltered={isDataFiltered}\n isDataSorted={isDataSorted}\n maxPerPage={maxPerPage}\n minColumnWidth={minColumnWidth}\n minPerPage={minPerPage}\n multiSelectComponent={multiSelectComponent}\n multiSelectFilterLabel={multiSelectFilterLabel}\n multiSelectFilterLabels={multiSelectFilterLabels}\n multiSelectFilterOptions={multiSelectFilterOptions}\n noColumnsPlaceholder={noColumnsPlaceholder}\n noResultsPlaceholder={noResultsPlaceholder}\n noResultsRender={noResultsRender}\n normalizeDataKeys={normalizeDataKeys}\n numRowsVisible={numRowsVisible} // if defined, fluidHeight is disabled\n onAddFilter={onAddFilter}\n onColumnResize={onColumnResize}\n onColumnRowEdit={onColumnRowEdit}\n onColumnRowEdited={onColumnRowEdited}\n onExpandRow={onExpandRow}\n onExpandChange={onExpandChange}\n onFilter={onFilter}\n onFiltersChange={onFiltersChange}\n onFilterMenuClose={onFilterMenuClose}\n onFilterMenuOpen={onFilterMenuOpen}\n onDefaultFiltersLoad={onDefaultFiltersLoad}\n onInfiniteScrolling={onInfiniteScrolling}\n onMoveColumnEnd={onMoveColumnEnd}\n onMoveColumnOver={onMoveColumnOver}\n onMoveColumnStart={onMoveColumnStart}\n onMoveRowEnd={onMoveRowEnd}\n onMoveRowStart={onMoveRowStart}\n onPageChange={onPageChange}\n onPerPageChange={onPerPageChange}\n onRemoveFilter={onRemoveFilter}\n onReorder={onReorder}\n onSelectAll={onSelectAll}\n onSelectRow={onSelectRow}\n onSort={onSort}\n onToggleExpand={onToggleExpand}\n onToggleShowAllRows={onToggleShowAllRows}\n overscanCount={overscanCount}\n paginated={paginated}\n pagination={pagination}\n paginationStep={paginationStep}\n plugins={plugins}\n renderExpandedDetails={renderExpandedDetails}\n renderFilterToolbar={renderFilterToolbar}\n renderRowDetails={renderRowDetails}\n renderToolbar={renderToolbar}\n resizeableColumns={resizeableColumns}\n rowKey={rowKey}\n rows={rows}\n rowSize={rowSize}\n searchFilters={searchFilters}\n selectable={selectable}\n selectAll={selectAll}\n selectColumnFilterable={selectColumnFilterable}\n selectColumnSortable={selectColumnSortable}\n selectedRows={selectedRows}\n selectionColumnDefinition={selectionColumnDefinition}\n serverSideData={serverSideData}\n showFilterBar={showFilterBar}\n showHeader={showHeader}\n showRowsLoader={showRowsLoader}\n showSelectColumn={showSelectColumn}\n showSelectHighlight={showSelectHighlight}\n sortable={sortable}\n sortEmptyLast={sortEmptyLast}\n sortingColumns={sortingColumns}\n subrowSize={subRowSize}\n toolbarDelayClose={toolbarDelayClose}\n useTreeData={useTreeData}\n virtualized={virtualized}\n visibleColumns={visibleColumns}\n wrapText={wrapText}\n />\n </TooltipTextProvider>\n);\n\nconst props = {\n /** ref to the instance of the datagrid, handle it imperatively */\n instanceRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.any })]).description(\n 'ref to the instance of the datagrid, handle it imperatively',\n ),\n /** class for data grid wrapper */\n className: PropTypes.string.description('class for data grid wrapper'),\n /** inject props to datagrid wrapper */\n containerProps: PropTypes.object.description('inject props to datagrid wrapper'),\n /** FilterBar props passed down to FilterBar */\n filterBarOptions: PropTypes.shape({\n minWidth: PropTypes.number,\n maxWidth: PropTypes.number,\n }).description('FilterBar props passed down to FilterBar'),\n /** datagrid columns */\n columns: PropTypes.arrayOf(\n PropTypes.shape({\n /** Column property as an identifier */\n property: PropTypes.string.isRequired,\n /** Label in the header */\n label: PropTypes.string,\n /** Defines the width of the column, can be a string with percentages (\"50%\"), if not defined the width is flexible */\n width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /** Min width for this column. NOTE: Has prevalence over the general minColumnWidth */\n minWidth: PropTypes.number,\n /** Function returning a custom editor for that cell ({ value, onValue, rowData }) => Element */\n customEditor: PropTypes.func,\n /** Function returning an element to render in the cell ({ value, customHandlers, metaData: { rowData } }) => Element */\n customRenderer: PropTypes.func,\n /** Activates 'searchable' feature for this column */\n searchable: PropTypes.bool,\n /** Activates 'sortable' feature for this column */\n sortable: PropTypes.bool,\n /** Activates 'resizable' feature for this column */\n resizable: PropTypes.bool,\n /** Activates 'editable' feature for this column */\n editable: PropTypes.bool,\n /** Whether this column is visible or not */\n visible: PropTypes.bool,\n }),\n ).description('datagrid columns'),\n /** datagrid rows */\n rows: PropTypes.arrayOf(PropTypes.object).description('datagrid rows'),\n /** key for each row */\n rowKey: PropTypes.string.description('key for each row'),\n /** toggle infinite scroll loading behavior */\n infiniteScrolling: PropTypes.bool.description('toggle infinite scroll loading behavior'),\n /** Activates 'editable' feature on the DataGrid NOTE: needs to be activated in the column definition as well */\n overscanCount: PropTypes.number.description(\n \"Activates 'editable' feature on the DataGrid NOTE: needs to be activated in the column definition as well\",\n ),\n /** turn datagrid to editable mode */\n editable: PropTypes.bool.description('turn datagrid to editable mode'),\n /** Activates 'sortable' feature on the GataGrid NOTE: needs to be activated in the column definition as well */\n sortable: PropTypes.bool.description(\n \"Activates 'sortable' feature on the GataGrid NOTE: needs to be activated in the column definition as well\",\n ),\n /** Put empty values always last on the column after sorting */\n sortEmptyLast: PropTypes.bool.description('Put empty values always last on the column after sorting'),\n /** Activates 'pagination' feature on the datagrid NOTE: needs to be activated in the column definition as well */\n paginated: PropTypes.bool.description(\n \"Activates 'pagination' feature on the datagrid NOTE: needs to be activated in the column definition as well\",\n ),\n /** Pagination step for clicking the next pages */\n paginationStep: PropTypes.number.description('Pagination step for clicking the next pages'),\n /** Activates 'drag and drop rows' feature on the datagrid NOTE: needs to be activated in the column definition as well */\n dragAndDropRows: PropTypes.bool.description(\n \"Activates 'drag and drop rows' feature on the datagrid NOTE: needs to be activated in the column definition as well\",\n ),\n /** Activates 'selection' feature on the datagrid NOTE: needs to be activated in the column definition as well */\n selectable: PropTypes.bool.description(\n \"Activates 'selection' feature on the datagrid NOTE: needs to be activated in the column definition as well\",\n ),\n /** Activates 'resize' feature on the datagrid NOTE: needs to be activated in the column definition as well */\n resizeableColumns: PropTypes.bool.description(\n \"Activates 'resize' feature on the datagrid NOTE: needs to be activated in the column definition as well\",\n ),\n /** Placeholder rendered when no rows are visible */\n noResultsPlaceholder: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).description(\n 'Placeholder rendered when no rows are visible',\n ),\n /** Activates 'filtering' feature on the datagrid NOTE: needs to be activated in the column definition as well */\n searchFilters: PropTypes.bool.description(\n \"activates 'filtering' feature on the datagrid NOTE: needs to be activated in the column definition as well\",\n ),\n /** Activates 'drag and drop columns' feature on the datagrid NOTE: needs to be activated in the column definition as well */\n dragAndDropColumns: PropTypes.bool.description(\n \"Activates 'drag and drop columns' feature on the datagrid NOTE: needs to be activated in the column definition as well\",\n ),\n /** Activates 'grouping and tree data' feature on the datagrid NOTE: needs to be activated in the column definition as well */\n useTreeData: PropTypes.bool.description(\n \"activates 'grouping and tree data' feature on the datagrid NOTE: needs to be activated in the column definition as well\",\n ),\n /** AutoScroll to row ID */\n autoScrollToId: PropTypes.any.description('AutoScroll to row ID'),\n /** Whether all rows are selected or not */\n selectAll: PropTypes.bool.description('Whether all rows are selected or not'),\n /** Defines the selected rows */\n selectedRows: PropTypes.arrayOf(PropTypes.object).description(' Defines the selected rows'),\n /** Filters to be applied to the grid */\n filters: PropTypes.arrayOf(PropTypes.object).description('Filters to be applied to the grid'),\n // todo: define params for handlers\n /** Handler when user expands a row */\n onExpandRow: PropTypes.func.description('Handler when user expands a row'),\n /** Handler when user expands a row with full expand state */\n onExpandChange: PropTypes.func.description('Handler when user expands a row with full expand state'),\n /** Handler when user expands a row (old API) */\n onToggleExpand: PropTypes.func.description('Handler when user expands a row (old API)'),\n /** Handler when user adds a filter */\n onAddFilter: PropTypes.func.description('Handler when user adds a filter'),\n /** Handler when user removes a filter */\n onRemoveFilter: PropTypes.func.description('Handler when user removes a filter'),\n /** Handler when the filters state has changed */\n onFiltersChange: PropTypes.func.description('Handler when the filters state has changed '),\n /** Handler when the default filters load. Returns the rows rendered */\n onDefaultFiltersLoad: PropTypes.func.description('Handler when the default filters load. Returns the rows rendered'),\n /** Handler when column move is over another column */\n onMoveColumnOver: PropTypes.func.description('Handler when column move is over another column'),\n /** Handler when column move starts */\n onMoveColumnStart: PropTypes.func.description(' Handler when column move starts'),\n /** Handler when column move ends */\n onMoveColumnEnd: PropTypes.func.description('Handler when column move ends'),\n /** Whether to show the filter bar or not */\n showFilterBar: PropTypes.bool.description('Whether to show the filter bar or not'),\n /** Custom option for the header with multi select */\n multiSelectFilterOptions: PropTypes.arrayOf(PropTypes.object).description(\n 'Custom option for the header with multi select',\n ),\n /** Label to the header column for multi select */\n multiSelectFilterLabel: PropTypes.string.description('Label to the header column for multi select'),\n /** Labels for multi selects */\n multiSelectFilterLabels: PropTypes.arrayOf(PropTypes.string).description('Labels for multi selects'),\n /** unstable */\n aggregations: PropTypes.object.description('').deprecated(''),\n /** unstable */\n /** Column which rows would be grouped by */\n groupingColumn: PropTypes.string.description('Column which rows would be grouped by').deprecated(''),\n /** group by */\n groupedBy: PropTypes.string.description('group by'),\n /** Defines the sorting state */\n sortingColumns: PropTypes.objectOf(\n PropTypes.shape({\n // eslint-disable-next-line react/no-unused-prop-types\n direction: PropTypes.oneOf(['asc', 'desc']),\n // eslint-disable-next-line react/no-unused-prop-types\n position: PropTypes.number,\n }),\n ).description('Defines the sorting state'),\n /** Visible columns property */\n visibleColumns: PropTypes.arrayOf(PropTypes.string).description('Visible columns property'),\n /** Pagination: Minimum number of rows per page */\n minPerPage: PropTypes.string.description('Pagination: Minimum number of rows per page'),\n /** Pagination: Maximum number of rows per page */\n maxPerPage: PropTypes.string.description('Pagination: Maximum number of rows per page'),\n /** Pagination: Handler when user changes the amount of rows per page */\n onPerPageChange: PropTypes.string.description('Pagination: Handler when user changes the amount of rows per page'),\n /** Pagination: Handler when user changes the page */\n onPageChange: PropTypes.string.description('Pagination: Handler when user changes the page'),\n /** Pagination state */\n pagination: PropTypes.shape({\n // eslint-disable-next-line react/no-unused-prop-types\n page: PropTypes.number,\n // eslint-disable-next-line react/no-unused-prop-types\n perPage: PropTypes.number,\n }).description('pagination state'),\n /** Whether to show the header or not */\n showHeader: PropTypes.bool.description('Whether to show the header or not'),\n /** Whether to header is fixed or not */\n fixedHeader: PropTypes.bool.description('Whether to header is fixed or not'),\n /** Defines the height of the DataGrid */\n height: PropTypes.number.description('Defines the height of the DataGrid'),\n /** General min column width for all the columns */\n minColumnWidth: PropTypes.number.description('General min column width for all the columns '),\n /** Whether to show a loader instead of the rows or not */\n showRowsLoader: PropTypes.bool.description('Whether to show a loader instead of the rows or not'),\n /** When a user selects a row, that row get highlighted */\n showSelectHighlight: PropTypes.bool.description('When a user selects a row, that row get highlighted'),\n /** Whether to show the select column when the selection feature is active */\n showSelectColumn: PropTypes.bool.description(\n 'Whether to show the select column when the selection feature is active',\n ),\n /** Activates sortable feature to selection column */\n selectColumnSortable: PropTypes.bool.description('activates sortable feature to selection column'),\n /** Activates filterable feature to selection column */\n selectColumnFilterable: PropTypes.bool.description('Activates filterable feature to selection column'),\n /** Define the definition for the selection column */\n selectionColumnDefinition: PropTypes.object.description('Define the definition for the selection column'),\n /** Function that returns a toolbar to show when the user hovers the row */\n renderToolbar: PropTypes.func.description('Function that returns a toolbar to show when the user hovers the row'),\n /** Timeout to close the toolbar */\n toolbarDelayClose: PropTypes.number.description(' Timeout to close the toolbar'),\n /** Function that returns a toolbar in the FilterBar component */\n renderFilterToolbar: PropTypes.func.description('Function that returns a toolbar in the FilterBar component'),\n /** Custom component for the selection */\n multiSelectComponent: PropTypes.element.description('Custom component for the selection'),\n /** Normalize the keys of the data received and the columns */\n normalizeDataKeys: PropTypes.bool.description('Normalize the keys of the data received and the columns'),\n /** Function that returns an Element when there are no rows */\n noResultsRender: PropTypes.func.description('Function that returns an Element when there are no rows'),\n /** The height of the DataGrid will expand to its container */\n fluidHeight: PropTypes.bool.description('The height of the DataGrid will expand to its container'),\n /** @deprecated */\n customHandlers: PropTypes.object.description('').deprecated(''),\n /** Handler when user closes the filter menu */\n onFilterMenuClose: PropTypes.func.description('Handler when user closes the filter menu'),\n /** Handler when user opens the filter menu */\n onFilterMenuOpen: PropTypes.func.description('Handler when user opens the filter menu'),\n /** Handler when user drags a row */\n onReorder: PropTypes.func.description('handler when user drags a row '),\n /** Handler when user stops dragging a row */\n onMoveRowEnd: PropTypes.func.description('Handler when user stops dragging a row '),\n /** Handler when user starts dragging a row */\n onMoveRowStart: PropTypes.func.description('Handler when user starts dragging a row'),\n /** Handler when user has resized a column */\n onColumnResize: PropTypes.func.description('Handler when user has resized a column'),\n /** Handler when user filters by a column */\n onFilter: PropTypes.func.description('Handler when user filters by a column'),\n /** Handler when user sorts by a column */\n onSort: PropTypes.func.description('Handler when user sorts by a column '),\n /** Handler when user has edited a cell row */\n onColumnRowEdited: PropTypes.func.description('Handler when user has edited a cell row'),\n /** Handler when user activates the cell row editing functionality */\n onColumnRowEdit: PropTypes.func.description(' Handler when user activates the cell row editing functionality'),\n /** Handler when user selects a row */\n onSelectRow: PropTypes.func.description('Handler when user selects a row'),\n /** Handler when user checks the selection header controller */\n onSelectAll: PropTypes.func.description('Handler when user checks the selection header controller'),\n /** Handler to get more data when infinite scroll is activated */\n getData: PropTypes.func.description('Handler to get more data when infinite scroll is activated'),\n /** Handler to get more data when infinite scroll is activated without side-effect */\n onInfiniteScrolling: PropTypes.func.description(\n 'Handler to get more data when infinite scroll is activated without side-effect',\n ),\n /** Flag to override empty sort when data is from server */\n serverSideData: PropTypes.bool.description('Flag to override empty sort when data is from server'),\n /** Flag to force virtualization. Not used */\n virtualized: PropTypes.bool.description('Flag to force virtualization. Not used'),\n /** Number of rows visible. Not used */\n numRowsVisible: PropTypes.oneOfType([PropTypes.number, PropTypes.oneOf(['all'])]).description('Number of rows visible. Not used'),\n /** Callback to check if column is editable */\n isColumnEditable: PropTypes.func.description('Callback to check if column is editable'),\n /** Flag for groupedRows */\n groupedRows: PropTypes.bool.description('Flag for groupedRows'),\n /** Header for grouped rows */\n groupedRowsRenderHeader: PropTypes.oneOfType([PropTypes.func, PropTypes.element]).description('Header for grouped rows'),\n /** Once activated will disable the internal logic for sorting */\n isDataSorted: PropTypes.bool.description('Once activated will disable the internal logic for sorting'),\n /** Once activated will disable the internal logic for filtering */\n isDataFiltered: PropTypes.bool.description('Once activated will disable the internal logic for filtering'),\n /** Change row size */\n rowSize: PropTypes.oneOf(RowSizesOptionsArr).description('Change row size'),\n /** Whether to wrap the text of the data grid or not */\n wrapText: PropTypes.bool.description('Whether to wrap the text of the data grid or not'),\n /** Element to render expanded details */\n renderExpandedDetails: PropTypes.oneOfType([PropTypes.func, PropTypes.element]).description(\n 'Element to render expanded details',\n ),\n /** Columns to render on the details of an expanded row */\n detailColumns: PropTypes.arrayOf(PropTypes.object).description('Columns to render on the details of an expanded row'),\n /** Flag to enable the expandable feature */\n expandable: PropTypes.bool.description('Flag to enable the expandable feature '),\n /** Callback to get the row children */\n getChildrenRows: PropTypes.func.description('Callback to get the row children'),\n /** Number of rows visible on the details of an expanded row */\n expandableSubrowsVisible: PropTypes.number.description('Number of rows visible on the details of an expanded row'),\n /** Element to render inside expanded row */\n renderRowDetails: PropTypes.oneOfType([PropTypes.func, PropTypes.element]).description(\n 'Element to render inside expanded row',\n ),\n /** Callback to get the expanded row size */\n getExpandedRowSize: PropTypes.func.description('Callback to get the expanded row size'),\n /** Callback to get the expanded row minimum size */\n getExpandedRowMinSize: PropTypes.func.description('Callback to get the expanded row minimum size'),\n /** Change expanded/details rows size */\n subRowSize: PropTypes.oneOf(RowSizesOptionsArr).description('Change expanded/details rows size'),\n /** Bind the column size to another grid instance */\n bindColumnsSizeTo: PropTypes.string.description('Bind the column size to another grid instance'),\n /** Bind the row size to another grid instance */\n bindRowSizeTo: PropTypes.string.description('Bind the row size to another grid instance'),\n /** Handler when toggle show all is clicked */\n onToggleShowAllRows: PropTypes.func.description('Handler when toggle show all is clicked'),\n /** Expanded row state */\n expandedRows: PropTypes.object.description('Expanded row state'),\n /** Flag to enable autoheight */\n autoHeight: PropTypes.bool.description('Flag to enable autoheight'),\n /** Placeholder rendered when no columns are visible */\n noColumnsPlaceholder: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).description(\n 'Placeholder rendered when no columns are visible',\n ),\n /** Plugin additional array */\n plugins: PropTypes.arrayOf(PropTypes.any).description('Plugin additional array'),\n};\n\nDSDataGrids.propTypes = props;\nDSDataGrids.displayName = 'DSDataGrids';\nconst DSDataGridsWithSchema = describe(DSDataGrids);\nDSDataGridsWithSchema.propTypes = props;\n\nexport { DSDataGridsWithSchema, DSDataGrids, DSDataGrids as DSDataGrid };\nexport default DSDataGrids;\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkJnB;AAhJJ,
|
4
|
+
"sourcesContent": ["/* eslint-disable max-lines */\nimport React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { TooltipTextProvider } from '@elliemae/ds-truncated-tooltip-text';\nimport { DataGridImpl } from './DataGridImpl';\nimport { RowSizesOptions, RowSizesOptionsArr } from './rowSizes';\n\nconst DSDataGrids = ({\n containerProps = {},\n instanceRef,\n className = '',\n\n // data\n columns = [],\n rows = [],\n rowKey = 'id',\n\n // features\n infiniteScrolling = false,\n editable = false,\n sortable = false,\n sortEmptyLast = false,\n paginated = false,\n dragAndDropRows = false,\n selectable = false,\n resizeableColumns = false,\n searchFilters = false,\n dragAndDropColumns = false,\n useTreeData = false,\n autoScrollToId,\n\n // virtualization props\n overscanCount = 10,\n\n // feature state\n selectAll = false, // todo: change to isAllSelected\n selectedRows = [],\n filters = undefined,\n onAddFilter = () => null,\n onRemoveFilter = () => null,\n onFiltersChange = () => null,\n showFilterBar = true,\n multiSelectFilterOptions = [\n { id: 'true', label: 'Selected' },\n { id: 'false', label: 'Not selected' },\n ],\n multiSelectFilterLabels = undefined,\n multiSelectFilterLabel = 'Selection',\n\n aggregations = {},\n groupingColumn = undefined,\n\n sortingColumns = {},\n\n // pagination\n minPerPage = 0,\n maxPerPage = 50,\n onPerPageChange = () => null,\n onPageChange = () => null,\n paginationStep = 2,\n pagination = {\n page: 1,\n perPage: 10,\n },\n // visual\n showHeader = true,\n fixedHeader = true,\n wrapText = false,\n height = undefined,\n minColumnWidth = 100,\n showRowsLoader = false,\n visibleColumns = undefined, // this enforces visibility of columns\n showSelectHighlight = false,\n showSelectColumn = true,\n selectColumnSortable = true,\n selectColumnFilterable = false,\n selectionColumnDefinition = {},\n filterBarOptions = undefined,\n // searchGrid = false,\n renderToolbar = undefined,\n toolbarDelayClose = 400,\n renderFilterToolbar = undefined,\n multiSelectComponent = undefined,\n // todo: deprecate this\n noResultsRender,\n noResultsPlaceholder,\n fluidHeight = false,\n\n customHandlers = {},\n\n // grouping feature\n groupedBy = undefined,\n\n // callbacks\n onDefaultFiltersLoad = () => null,\n onReorder = () => null,\n onMoveRowEnd = () => null,\n onMoveRowStart = () => null,\n onMoveColumnOver = () => null,\n onMoveColumnStart = () => null,\n onMoveColumnEnd = () => null,\n onColumnResize = () => null,\n onExpandChange = () => null,\n onToggleExpand = () => null,\n onExpandRow = () => null,\n onFilter = () => null,\n onSort = () => null,\n onColumnRowEdited = () => null,\n onColumnRowEdit = () => null,\n onSelectRow = () => null,\n onSelectAll = () => null,\n onInfiniteScrolling = () => null,\n onFilterMenuClose = () => null,\n onFilterMenuOpen = () => null,\n getData = undefined, // todo: change to onGetMoreData\n serverSideData = false,\n isDataSorted = false,\n isDataFiltered = false,\n virtualized = true,\n numRowsVisible = undefined,\n isColumnEditable = (column) => column.editable,\n\n // grouped props\n groupedRows = false,\n groupedRowsRenderHeader = undefined,\n // expandable props\n renderExpandedDetails = () => null,\n detailColumns,\n expandable = false,\n getChildrenRows = (row) => row.children,\n expandableSubrowsVisible = 7,\n renderRowDetails = () => null,\n getExpandedRowSize = undefined,\n getExpandedRowMinSize,\n rowSize = RowSizesOptions.normal,\n subRowSize = RowSizesOptions.normal,\n bindColumnsSizeTo = undefined,\n bindRowSizeTo = undefined,\n onToggleShowAllRows,\n expandedRows,\n autoHeight = false,\n noColumnsPlaceholder,\n plugins = [],\n normalizeDataKeys = false,\n}) => (\n <TooltipTextProvider>\n <DataGridImpl\n aggregations={aggregations}\n autoHeight={autoHeight && !fluidHeight}\n autoScrollToId={autoScrollToId}\n bindColumnsSizeTo={bindColumnsSizeTo}\n bindRowSizeTo={bindRowSizeTo}\n className={className}\n columns={columns}\n containerProps={containerProps}\n customHandlers={customHandlers}\n detailColumns={detailColumns}\n dragAndDropColumns={dragAndDropColumns}\n dragAndDropRows={dragAndDropRows}\n editable={editable}\n expandable={expandable}\n expandableSubrowsVisible={expandableSubrowsVisible}\n expandedRows={expandedRows}\n filterBarOptions={filterBarOptions}\n filters={filters}\n fixedHeader={fixedHeader}\n fluidHeight={fluidHeight}\n getChildrenRows={getChildrenRows}\n getData={getData}\n getExpandedRowMinSize={getExpandedRowMinSize}\n getExpandedRowSize={getExpandedRowSize}\n groupedBy={groupedBy}\n groupedRows={groupedRows}\n groupedRowsRenderHeader={groupedRowsRenderHeader}\n groupingColumn={groupingColumn}\n height={height}\n infiniteScrolling={infiniteScrolling}\n instanceRef={instanceRef}\n isColumnEditable={isColumnEditable}\n isDataFiltered={isDataFiltered}\n isDataSorted={isDataSorted}\n maxPerPage={maxPerPage}\n minColumnWidth={minColumnWidth}\n minPerPage={minPerPage}\n multiSelectComponent={multiSelectComponent}\n multiSelectFilterLabel={multiSelectFilterLabel}\n multiSelectFilterLabels={multiSelectFilterLabels}\n multiSelectFilterOptions={multiSelectFilterOptions}\n noColumnsPlaceholder={noColumnsPlaceholder}\n noResultsPlaceholder={noResultsPlaceholder}\n noResultsRender={noResultsRender}\n normalizeDataKeys={normalizeDataKeys}\n numRowsVisible={numRowsVisible} // if defined, fluidHeight is disabled\n onAddFilter={onAddFilter}\n onColumnResize={onColumnResize}\n onColumnRowEdit={onColumnRowEdit}\n onColumnRowEdited={onColumnRowEdited}\n onExpandRow={onExpandRow}\n onExpandChange={onExpandChange}\n onFilter={onFilter}\n onFiltersChange={onFiltersChange}\n onFilterMenuClose={onFilterMenuClose}\n onFilterMenuOpen={onFilterMenuOpen}\n onDefaultFiltersLoad={onDefaultFiltersLoad}\n onInfiniteScrolling={onInfiniteScrolling}\n onMoveColumnEnd={onMoveColumnEnd}\n onMoveColumnOver={onMoveColumnOver}\n onMoveColumnStart={onMoveColumnStart}\n onMoveRowEnd={onMoveRowEnd}\n onMoveRowStart={onMoveRowStart}\n onPageChange={onPageChange}\n onPerPageChange={onPerPageChange}\n onRemoveFilter={onRemoveFilter}\n onReorder={onReorder}\n onSelectAll={onSelectAll}\n onSelectRow={onSelectRow}\n onSort={onSort}\n onToggleExpand={onToggleExpand}\n onToggleShowAllRows={onToggleShowAllRows}\n overscanCount={overscanCount}\n paginated={paginated}\n pagination={pagination}\n paginationStep={paginationStep}\n plugins={plugins}\n renderExpandedDetails={renderExpandedDetails}\n renderFilterToolbar={renderFilterToolbar}\n renderRowDetails={renderRowDetails}\n renderToolbar={renderToolbar}\n resizeableColumns={resizeableColumns}\n rowKey={rowKey}\n rows={rows}\n rowSize={rowSize}\n searchFilters={searchFilters}\n selectable={selectable}\n selectAll={selectAll}\n selectColumnFilterable={selectColumnFilterable}\n selectColumnSortable={selectColumnSortable}\n selectedRows={selectedRows}\n selectionColumnDefinition={selectionColumnDefinition}\n serverSideData={serverSideData}\n showFilterBar={showFilterBar}\n showHeader={showHeader}\n showRowsLoader={showRowsLoader}\n showSelectColumn={showSelectColumn}\n showSelectHighlight={showSelectHighlight}\n sortable={sortable}\n sortEmptyLast={sortEmptyLast}\n sortingColumns={sortingColumns}\n subrowSize={subRowSize}\n toolbarDelayClose={toolbarDelayClose}\n useTreeData={useTreeData}\n virtualized={virtualized}\n visibleColumns={visibleColumns}\n wrapText={wrapText}\n />\n </TooltipTextProvider>\n);\n\nconst props = {\n /** ref to the instance of the datagrid, handle it imperatively */\n instanceRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.any })]).description(\n 'ref to the instance of the datagrid, handle it imperatively',\n ),\n /** class for data grid wrapper */\n className: PropTypes.string.description('class for data grid wrapper'),\n /** inject props to datagrid wrapper */\n containerProps: PropTypes.object.description('inject props to datagrid wrapper'),\n /** FilterBar props passed down to FilterBar */\n filterBarOptions: PropTypes.shape({\n minWidth: PropTypes.number,\n maxWidth: PropTypes.number,\n }).description('FilterBar props passed down to FilterBar'),\n /** datagrid columns */\n columns: PropTypes.arrayOf(\n PropTypes.shape({\n /** Column property as an identifier */\n property: PropTypes.string.isRequired,\n /** Label in the header */\n label: PropTypes.string,\n /** Defines the width of the column, can be a string with percentages (\"50%\"), if not defined the width is flexible */\n width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /** Min width for this column. NOTE: Has prevalence over the general minColumnWidth */\n minWidth: PropTypes.number,\n /** Function returning a custom editor for that cell ({ value, onValue, rowData }) => Element */\n customEditor: PropTypes.func,\n /** Function returning an element to render in the cell ({ value, customHandlers, metaData: { rowData } }) => Element */\n customRenderer: PropTypes.func,\n /** Activates 'searchable' feature for this column */\n searchable: PropTypes.bool,\n /** Activates 'sortable' feature for this column */\n sortable: PropTypes.bool,\n /** Activates 'resizable' feature for this column */\n resizable: PropTypes.bool,\n /** Activates 'editable' feature for this column */\n editable: PropTypes.bool,\n /** Whether this column is visible or not */\n visible: PropTypes.bool,\n }),\n ).description('datagrid columns'),\n /** datagrid rows */\n rows: PropTypes.arrayOf(PropTypes.object).description('datagrid rows'),\n /** key for each row */\n rowKey: PropTypes.string.description('key for each row'),\n /** toggle infinite scroll loading behavior */\n infiniteScrolling: PropTypes.bool.description('toggle infinite scroll loading behavior'),\n /** Activates 'editable' feature on the DataGrid NOTE: needs to be activated in the column definition as well */\n overscanCount: PropTypes.number.description(\n \"Activates 'editable' feature on the DataGrid NOTE: needs to be activated in the column definition as well\",\n ),\n /** turn datagrid to editable mode */\n editable: PropTypes.bool.description('turn datagrid to editable mode'),\n /** Activates 'sortable' feature on the GataGrid NOTE: needs to be activated in the column definition as well */\n sortable: PropTypes.bool.description(\n \"Activates 'sortable' feature on the GataGrid NOTE: needs to be activated in the column definition as well\",\n ),\n /** Put empty values always last on the column after sorting */\n sortEmptyLast: PropTypes.bool.description('Put empty values always last on the column after sorting'),\n /** Activates 'pagination' feature on the datagrid NOTE: needs to be activated in the column definition as well */\n paginated: PropTypes.bool.description(\n \"Activates 'pagination' feature on the datagrid NOTE: needs to be activated in the column definition as well\",\n ),\n /** Pagination step for clicking the next pages */\n paginationStep: PropTypes.number.description('Pagination step for clicking the next pages'),\n /** Activates 'drag and drop rows' feature on the datagrid NOTE: needs to be activated in the column definition as well */\n dragAndDropRows: PropTypes.bool.description(\n \"Activates 'drag and drop rows' feature on the datagrid NOTE: needs to be activated in the column definition as well\",\n ),\n /** Activates 'selection' feature on the datagrid NOTE: needs to be activated in the column definition as well */\n selectable: PropTypes.bool.description(\n \"Activates 'selection' feature on the datagrid NOTE: needs to be activated in the column definition as well\",\n ),\n /** Activates 'resize' feature on the datagrid NOTE: needs to be activated in the column definition as well */\n resizeableColumns: PropTypes.bool.description(\n \"Activates 'resize' feature on the datagrid NOTE: needs to be activated in the column definition as well\",\n ),\n /** Placeholder rendered when no rows are visible */\n noResultsPlaceholder: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).description(\n 'Placeholder rendered when no rows are visible',\n ),\n /** Activates 'filtering' feature on the datagrid NOTE: needs to be activated in the column definition as well */\n searchFilters: PropTypes.bool.description(\n \"activates 'filtering' feature on the datagrid NOTE: needs to be activated in the column definition as well\",\n ),\n /** Activates 'drag and drop columns' feature on the datagrid NOTE: needs to be activated in the column definition as well */\n dragAndDropColumns: PropTypes.bool.description(\n \"Activates 'drag and drop columns' feature on the datagrid NOTE: needs to be activated in the column definition as well\",\n ),\n /** Activates 'grouping and tree data' feature on the datagrid NOTE: needs to be activated in the column definition as well */\n useTreeData: PropTypes.bool.description(\n \"activates 'grouping and tree data' feature on the datagrid NOTE: needs to be activated in the column definition as well\",\n ),\n /** AutoScroll to row ID */\n autoScrollToId: PropTypes.any.description('AutoScroll to row ID'),\n /** Whether all rows are selected or not */\n selectAll: PropTypes.bool.description('Whether all rows are selected or not'),\n /** Defines the selected rows */\n selectedRows: PropTypes.arrayOf(PropTypes.object).description(' Defines the selected rows'),\n /** Filters to be applied to the grid */\n filters: PropTypes.arrayOf(PropTypes.object).description('Filters to be applied to the grid'),\n // todo: define params for handlers\n /** Handler when user expands a row */\n onExpandRow: PropTypes.func.description('Handler when user expands a row'),\n /** Handler when user expands a row with full expand state */\n onExpandChange: PropTypes.func.description('Handler when user expands a row with full expand state'),\n /** Handler when user expands a row (old API) */\n onToggleExpand: PropTypes.func.description('Handler when user expands a row (old API)'),\n /** Handler when user adds a filter */\n onAddFilter: PropTypes.func.description('Handler when user adds a filter'),\n /** Handler when user removes a filter */\n onRemoveFilter: PropTypes.func.description('Handler when user removes a filter'),\n /** Handler when the filters state has changed */\n onFiltersChange: PropTypes.func.description('Handler when the filters state has changed '),\n /** Handler when the default filters load. Returns the rows rendered */\n onDefaultFiltersLoad: PropTypes.func.description('Handler when the default filters load. Returns the rows rendered'),\n /** Handler when column move is over another column */\n onMoveColumnOver: PropTypes.func.description('Handler when column move is over another column'),\n /** Handler when column move starts */\n onMoveColumnStart: PropTypes.func.description(' Handler when column move starts'),\n /** Handler when column move ends */\n onMoveColumnEnd: PropTypes.func.description('Handler when column move ends'),\n /** Whether to show the filter bar or not */\n showFilterBar: PropTypes.bool.description('Whether to show the filter bar or not'),\n /** Custom option for the header with multi select */\n multiSelectFilterOptions: PropTypes.arrayOf(PropTypes.object).description(\n 'Custom option for the header with multi select',\n ),\n /** Label to the header column for multi select */\n multiSelectFilterLabel: PropTypes.string.description('Label to the header column for multi select'),\n /** Labels for multi selects */\n multiSelectFilterLabels: PropTypes.arrayOf(PropTypes.string).description('Labels for multi selects'),\n /** unstable */\n aggregations: PropTypes.object.description('').deprecated(''),\n /** unstable */\n /** Column which rows would be grouped by */\n groupingColumn: PropTypes.string.description('Column which rows would be grouped by').deprecated(''),\n /** group by */\n groupedBy: PropTypes.string.description('group by'),\n /** Defines the sorting state */\n sortingColumns: PropTypes.objectOf(\n PropTypes.shape({\n // eslint-disable-next-line react/no-unused-prop-types\n direction: PropTypes.oneOf(['asc', 'desc']),\n // eslint-disable-next-line react/no-unused-prop-types\n position: PropTypes.number,\n }),\n ).description('Defines the sorting state'),\n /** Visible columns property */\n visibleColumns: PropTypes.arrayOf(PropTypes.string).description('Visible columns property'),\n /** Pagination: Minimum number of rows per page */\n minPerPage: PropTypes.string.description('Pagination: Minimum number of rows per page'),\n /** Pagination: Maximum number of rows per page */\n maxPerPage: PropTypes.string.description('Pagination: Maximum number of rows per page'),\n /** Pagination: Handler when user changes the amount of rows per page */\n onPerPageChange: PropTypes.string.description('Pagination: Handler when user changes the amount of rows per page'),\n /** Pagination: Handler when user changes the page */\n onPageChange: PropTypes.string.description('Pagination: Handler when user changes the page'),\n /** Pagination state */\n pagination: PropTypes.shape({\n // eslint-disable-next-line react/no-unused-prop-types\n page: PropTypes.number,\n // eslint-disable-next-line react/no-unused-prop-types\n perPage: PropTypes.number,\n }).description('pagination state'),\n /** Whether to show the header or not */\n showHeader: PropTypes.bool.description('Whether to show the header or not'),\n /** Whether to header is fixed or not */\n fixedHeader: PropTypes.bool.description('Whether to header is fixed or not'),\n /** Defines the height of the DataGrid */\n height: PropTypes.number.description('Defines the height of the DataGrid'),\n /** General min column width for all the columns */\n minColumnWidth: PropTypes.number.description('General min column width for all the columns '),\n /** Whether to show a loader instead of the rows or not */\n showRowsLoader: PropTypes.bool.description('Whether to show a loader instead of the rows or not'),\n /** When a user selects a row, that row get highlighted */\n showSelectHighlight: PropTypes.bool.description('When a user selects a row, that row get highlighted'),\n /** Whether to show the select column when the selection feature is active */\n showSelectColumn: PropTypes.bool.description(\n 'Whether to show the select column when the selection feature is active',\n ),\n /** Activates sortable feature to selection column */\n selectColumnSortable: PropTypes.bool.description('activates sortable feature to selection column'),\n /** Activates filterable feature to selection column */\n selectColumnFilterable: PropTypes.bool.description('Activates filterable feature to selection column'),\n /** Define the definition for the selection column */\n selectionColumnDefinition: PropTypes.object.description('Define the definition for the selection column'),\n /** Function that returns a toolbar to show when the user hovers the row */\n renderToolbar: PropTypes.func.description('Function that returns a toolbar to show when the user hovers the row'),\n /** Timeout to close the toolbar */\n toolbarDelayClose: PropTypes.number.description(' Timeout to close the toolbar'),\n /** Function that returns a toolbar in the FilterBar component */\n renderFilterToolbar: PropTypes.func.description('Function that returns a toolbar in the FilterBar component'),\n /** Custom component for the selection */\n multiSelectComponent: PropTypes.element.description('Custom component for the selection'),\n /** Normalize the keys of the data received and the columns */\n normalizeDataKeys: PropTypes.bool.description('Normalize the keys of the data received and the columns'),\n /** Function that returns an Element when there are no rows */\n noResultsRender: PropTypes.func.description('Function that returns an Element when there are no rows'),\n /** The height of the DataGrid will expand to its container */\n fluidHeight: PropTypes.bool.description('The height of the DataGrid will expand to its container'),\n /** @deprecated */\n customHandlers: PropTypes.object.description('').deprecated(''),\n /** Handler when user closes the filter menu */\n onFilterMenuClose: PropTypes.func.description('Handler when user closes the filter menu'),\n /** Handler when user opens the filter menu */\n onFilterMenuOpen: PropTypes.func.description('Handler when user opens the filter menu'),\n /** Handler when user drags a row */\n onReorder: PropTypes.func.description('handler when user drags a row '),\n /** Handler when user stops dragging a row */\n onMoveRowEnd: PropTypes.func.description('Handler when user stops dragging a row '),\n /** Handler when user starts dragging a row */\n onMoveRowStart: PropTypes.func.description('Handler when user starts dragging a row'),\n /** Handler when user has resized a column */\n onColumnResize: PropTypes.func.description('Handler when user has resized a column'),\n /** Handler when user filters by a column */\n onFilter: PropTypes.func.description('Handler when user filters by a column'),\n /** Handler when user sorts by a column */\n onSort: PropTypes.func.description('Handler when user sorts by a column '),\n /** Handler when user has edited a cell row */\n onColumnRowEdited: PropTypes.func.description('Handler when user has edited a cell row'),\n /** Handler when user activates the cell row editing functionality */\n onColumnRowEdit: PropTypes.func.description(' Handler when user activates the cell row editing functionality'),\n /** Handler when user selects a row */\n onSelectRow: PropTypes.func.description('Handler when user selects a row'),\n /** Handler when user checks the selection header controller */\n onSelectAll: PropTypes.func.description('Handler when user checks the selection header controller'),\n /** Handler to get more data when infinite scroll is activated */\n getData: PropTypes.func.description('Handler to get more data when infinite scroll is activated'),\n /** Handler to get more data when infinite scroll is activated without side-effect */\n onInfiniteScrolling: PropTypes.func.description(\n 'Handler to get more data when infinite scroll is activated without side-effect',\n ),\n /** Flag to override empty sort when data is from server */\n serverSideData: PropTypes.bool.description('Flag to override empty sort when data is from server'),\n /** Flag to force virtualization. Not used */\n virtualized: PropTypes.bool.description('Flag to force virtualization. Not used'),\n /** Number of rows visible. Not used */\n numRowsVisible: PropTypes.oneOfType([PropTypes.number, PropTypes.oneOf(['all'])]).description('Number of rows visible. Not used'),\n /** Callback to check if column is editable */\n isColumnEditable: PropTypes.func.description('Callback to check if column is editable'),\n /** Flag for groupedRows */\n groupedRows: PropTypes.bool.description('Flag for groupedRows'),\n /** Header for grouped rows */\n groupedRowsRenderHeader: PropTypes.oneOfType([PropTypes.func, PropTypes.element]).description('Header for grouped rows'),\n /** Once activated will disable the internal logic for sorting */\n isDataSorted: PropTypes.bool.description('Once activated will disable the internal logic for sorting'),\n /** Once activated will disable the internal logic for filtering */\n isDataFiltered: PropTypes.bool.description('Once activated will disable the internal logic for filtering'),\n /** Change row size */\n rowSize: PropTypes.oneOf(RowSizesOptionsArr).description('Change row size'),\n /** Whether to wrap the text of the data grid or not */\n wrapText: PropTypes.bool.description('Whether to wrap the text of the data grid or not'),\n /** Element to render expanded details */\n renderExpandedDetails: PropTypes.oneOfType([PropTypes.func, PropTypes.element]).description(\n 'Element to render expanded details',\n ),\n /** Columns to render on the details of an expanded row */\n detailColumns: PropTypes.arrayOf(PropTypes.object).description('Columns to render on the details of an expanded row'),\n /** Flag to enable the expandable feature */\n expandable: PropTypes.bool.description('Flag to enable the expandable feature '),\n /** Callback to get the row children */\n getChildrenRows: PropTypes.func.description('Callback to get the row children'),\n /** Number of rows visible on the details of an expanded row */\n expandableSubrowsVisible: PropTypes.number.description('Number of rows visible on the details of an expanded row'),\n /** Element to render inside expanded row */\n renderRowDetails: PropTypes.oneOfType([PropTypes.func, PropTypes.element]).description(\n 'Element to render inside expanded row',\n ),\n /** Callback to get the expanded row size */\n getExpandedRowSize: PropTypes.func.description('Callback to get the expanded row size'),\n /** Callback to get the expanded row minimum size */\n getExpandedRowMinSize: PropTypes.func.description('Callback to get the expanded row minimum size'),\n /** Change expanded/details rows size */\n subRowSize: PropTypes.oneOf(RowSizesOptionsArr).description('Change expanded/details rows size'),\n /** Bind the column size to another grid instance */\n bindColumnsSizeTo: PropTypes.string.description('Bind the column size to another grid instance'),\n /** Bind the row size to another grid instance */\n bindRowSizeTo: PropTypes.string.description('Bind the row size to another grid instance'),\n /** Handler when toggle show all is clicked */\n onToggleShowAllRows: PropTypes.func.description('Handler when toggle show all is clicked'),\n /** Expanded row state */\n expandedRows: PropTypes.object.description('Expanded row state'),\n /** Flag to enable autoheight */\n autoHeight: PropTypes.bool.description('Flag to enable autoheight'),\n /** Placeholder rendered when no columns are visible */\n noColumnsPlaceholder: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).description(\n 'Placeholder rendered when no columns are visible',\n ),\n /** Plugin additional array */\n plugins: PropTypes.arrayOf(PropTypes.any).description('Plugin additional array'),\n};\n\nDSDataGrids.propTypes = props;\nDSDataGrids.displayName = 'DSDataGrids';\nconst DSDataGridsWithSchema = describe(DSDataGrids);\nDSDataGridsWithSchema.propTypes = props;\n\nexport { DSDataGridsWithSchema, DSDataGrids, DSDataGrids as DSDataGrid };\nexport default DSDataGrids;\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkJnB;AAhJJ,8BAAoC;AACpC,uCAAoC;AACpC,0BAA6B;AAC7B,sBAAoD;AAEpD,MAAM,cAAc,CAAC;AAAA,EACnB,iBAAiB,CAAC;AAAA,EAClB;AAAA,EACA,YAAY;AAAA,EAGZ,UAAU,CAAC;AAAA,EACX,OAAO,CAAC;AAAA,EACR,SAAS;AAAA,EAGT,oBAAoB;AAAA,EACpB,WAAW;AAAA,EACX,WAAW;AAAA,EACX,gBAAgB;AAAA,EAChB,YAAY;AAAA,EACZ,kBAAkB;AAAA,EAClB,aAAa;AAAA,EACb,oBAAoB;AAAA,EACpB,gBAAgB;AAAA,EAChB,qBAAqB;AAAA,EACrB,cAAc;AAAA,EACd;AAAA,EAGA,gBAAgB;AAAA,EAGhB,YAAY;AAAA,EACZ,eAAe,CAAC;AAAA,EAChB,UAAU;AAAA,EACV,cAAc,MAAM;AAAA,EACpB,iBAAiB,MAAM;AAAA,EACvB,kBAAkB,MAAM;AAAA,EACxB,gBAAgB;AAAA,EAChB,2BAA2B;AAAA,IACzB,EAAE,IAAI,QAAQ,OAAO,WAAW;AAAA,IAChC,EAAE,IAAI,SAAS,OAAO,eAAe;AAAA,EACvC;AAAA,EACA,0BAA0B;AAAA,EAC1B,yBAAyB;AAAA,EAEzB,eAAe,CAAC;AAAA,EAChB,iBAAiB;AAAA,EAEjB,iBAAiB,CAAC;AAAA,EAGlB,aAAa;AAAA,EACb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U,QAAQ,kCAAU,MAAM,EAAE,YAAY,qDAAqD;AAAA,EAEpH,YAAY,kCAAU,KAAK,YAAY,wCAAwC;AAAA,EAE/E,iBAAiB,kCAAU,KAAK,YAAY,kCAAkC;AAAA,EAE9E,0BAA0B,kCAAU,OAAO,YAAY,0DAA0D;AAAA,EAEjH,kBAAkB,kCAAU,UAAU,CAAC,kCAAU,MAAM,kCAAU,OAAO,CAAC,EAAE;AAAA,IACzE;AAAA,EACF;AAAA,EAEA,oBAAoB,kCAAU,KAAK,YAAY,uCAAuC;AAAA,EAEtF,uBAAuB,kCAAU,KAAK,YAAY,+CAA+C;AAAA,EAEjG,YAAY,kCAAU,MAAM,kCAAkB,EAAE,YAAY,mCAAmC;AAAA,EAE/F,mBAAmB,kCAAU,OAAO,YAAY,+CAA+C;AAAA,EAE/F,eAAe,kCAAU,OAAO,YAAY,4CAA4C;AAAA,EAExF,qBAAqB,kCAAU,KAAK,YAAY,yCAAyC;AAAA,EAEzF,cAAc,kCAAU,OAAO,YAAY,oBAAoB;AAAA,EAE/D,YAAY,kCAAU,KAAK,YAAY,2BAA2B;AAAA,EAElE,sBAAsB,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,OAAO,CAAC,EAAE;AAAA,IAC/E;AAAA,EACF;AAAA,EAEA,SAAS,kCAAU,QAAQ,kCAAU,GAAG,EAAE,YAAY,yBAAyB;AACjF;AAEA,YAAY,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,4BAAwB,kCAAS,WAAW;AAClD,sBAAsB,YAAY;AAGlC,IAAO,qBAAQ;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../src/plugins/filterable/FilterablePlugin.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
4
|
-
"sourcesContent": ["/* eslint-disable indent */\nimport { get, isFunction } from '@elliemae/ds-utilities';\nimport { createInstancePlugin } from '@elliemae/ds-shared';\nimport { addFilterToColumn } from './addFilterToColumn';\
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,0BAAgC;AAChC,uBAAqC;AACrC,+BAAkC;
|
4
|
+
"sourcesContent": ["/* eslint-disable indent */\nimport { get, isFunction } from '@elliemae/ds-utilities';\nimport { createInstancePlugin } from '@elliemae/ds-shared';\nimport { addFilterToColumn } from './addFilterToColumn';\nimport filterRowsByQuery, { filterRowsByQueryGroup } from './filtering-helper/filterRowsByQuery';\nimport { useFilterableState } from './useFilterableState';\n\nconst decorateColumn = (column, grid) => {\n const {\n props: { isFilterableColumnActive = (col) => col.searchable, onRemoveAllFilters },\n actions: { addFilter, removeFilter },\n state: { query, filters },\n } = grid;\n\n return isFilterableColumnActive(column)\n ? addFilterToColumn(\n {\n grid,\n onAddFilter: addFilter,\n onRemoveFilter: removeFilter,\n onRemoveAllFilters,\n query,\n filters,\n },\n column,\n )\n : column;\n};\n\nconst composeRows = (rows, grid) => {\n const {\n props: { isDataFiltered, groupedRows },\n state: { query },\n composedRows,\n } = grid.getInstance();\n const nextRows = !groupedRows ? filterRowsByQuery(rows, query) : filterRowsByQueryGroup(rows, query, composedRows);\n\n return !isDataFiltered ? nextRows : rows;\n};\n\nexport const FilterablePlugin = createInstancePlugin('filterable', {\n registerStateHook: useFilterableState,\n decorateColumn,\n composeRows,\n registerHotKeys(grid) {\n return {\n key: 'ctrl+f',\n handler: ({ cellIndex }) => {\n const { decoratedColumns } = grid.getInstance();\n\n const column = decoratedColumns[cellIndex];\n const toggleMenuMethod = get(column, ['filterMenu', 'current', 'toggleMenu']);\n if (isFunction(toggleMenuMethod)) toggleMenuMethod();\n },\n };\n },\n});\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,0BAAg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3
|
"sources": ["../../../../src/plugins/virtualization/AutoHeightList.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
4
|
-
"sourcesContent": ["import React, { forwardRef, useRef } from 'react';\nimport { FixedSizeList as List } from 'react-window';\nimport { mergeRefs
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD6BjB;AA7BN,mBAA0C;AAC1C,0BAAsC;AACtC,
|
4
|
+
"sourcesContent": ["import React, { forwardRef, useRef } from 'react';\nimport { FixedSizeList as List } from 'react-window';\nimport { mergeRefs, useWindowScrollerList, cx } from '@elliemae/ds-utilities';\n\n// eslint-disable-next-line react/display-name\nexport const AutoHeightList = forwardRef(\n (\n {\n itemCount,\n className,\n innerRef,\n itemData,\n itemKey,\n itemSize,\n outerRef,\n component: ListComponent = List,\n ...otherProps\n },\n ref,\n ) => {\n const listRef = useRef();\n const outerListRef = useRef();\n\n useWindowScrollerList({\n listInstance: listRef,\n outerListRef,\n });\n\n return (\n <ListComponent\n {...otherProps}\n ref={mergeRefs(ref, listRef)}\n className={cx(className, 'window-scroller-override')}\n height={window.innerHeight}\n innerRef={innerRef}\n itemCount={itemCount}\n itemData={itemData}\n itemKey={itemKey}\n itemSize={itemSize}\n outerRef={mergeRefs(outerListRef, outerRef)}\n overscanCount={10}\n useIsScrolling\n />\n );\n },\n);\n\nexport default AutoHeightList;\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD6BjB;AA7BN,mBAA0C;AAC1C,0BAAsC;AACtC,0BAAqD;AAG9C,MAAM,qBAAiB;AAAA,EAC5B,CACE;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW,gBAAgB,oBAAAA;AAAA,OACxB;AAAA,EACL,GACA,QACG;AACH,UAAM,cAAU,qBAAO;AACvB,UAAM,mBAAe,qBAAO;AAE5B,mDAAsB;AAAA,MACpB,cAAc;AAAA,MACd;AAAA,IACF,CAAC;AAED,WACE;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ,SAAK,+BAAU,KAAK,OAAO;AAAA,QAC3B,eAAW,wBAAG,WAAW,0BAA0B;AAAA,QACnD,QAAQ,OAAO;AAAA,QACf;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,cAAU,+BAAU,cAAc,QAAQ;AAAA,QAC1C,eAAe;AAAA,QACf,gBAAc;AAAA;AAAA,IAChB;AAAA,EAEJ;AACF;AAEA,IAAO,yBAAQ;",
|
6
6
|
"names": ["List"]
|
7
7
|
}
|
package/dist/esm/DSDataGrid.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as React from "react";
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
3
|
-
import { PropTypes, describe } from "@elliemae/ds-
|
3
|
+
import { PropTypes, describe } from "@elliemae/ds-props-helpers";
|
4
4
|
import { TooltipTextProvider } from "@elliemae/ds-truncated-tooltip-text";
|
5
5
|
import { DataGridImpl } from "./DataGridImpl";
|
6
6
|
import { RowSizesOptions, RowSizesOptionsArr } from "./rowSizes";
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSDataGrid.tsx"],
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\nimport { TooltipTextProvider } from '@elliemae/ds-truncated-tooltip-text';\nimport { DataGridImpl } from './DataGridImpl';\nimport { RowSizesOptions, RowSizesOptionsArr } from './rowSizes';\n\nconst DSDataGrids = ({\n containerProps = {},\n instanceRef,\n className = '',\n\n // data\n columns = [],\n rows = [],\n rowKey = 'id',\n\n // features\n infiniteScrolling = false,\n editable = false,\n sortable = false,\n sortEmptyLast = false,\n paginated = false,\n dragAndDropRows = false,\n selectable = false,\n resizeableColumns = false,\n searchFilters = false,\n dragAndDropColumns = false,\n useTreeData = false,\n autoScrollToId,\n\n // virtualization props\n overscanCount = 10,\n\n // feature state\n selectAll = false, // todo: change to isAllSelected\n selectedRows = [],\n filters = undefined,\n onAddFilter = () => null,\n onRemoveFilter = () => null,\n onFiltersChange = () => null,\n showFilterBar = true,\n multiSelectFilterOptions = [\n { id: 'true', label: 'Selected' },\n { id: 'false', label: 'Not selected' },\n ],\n multiSelectFilterLabels = undefined,\n multiSelectFilterLabel = 'Selection',\n\n aggregations = {},\n groupingColumn = undefined,\n\n sortingColumns = {},\n\n // pagination\n minPerPage = 0,\n maxPerPage = 50,\n onPerPageChange = () => null,\n onPageChange = () => null,\n paginationStep = 2,\n pagination = {\n page: 1,\n perPage: 10,\n },\n // visual\n showHeader = true,\n fixedHeader = true,\n wrapText = false,\n height = undefined,\n minColumnWidth = 100,\n showRowsLoader = false,\n visibleColumns = undefined, // this enforces visibility of columns\n showSelectHighlight = false,\n showSelectColumn = true,\n selectColumnSortable = true,\n selectColumnFilterable = false,\n selectionColumnDefinition = {},\n filterBarOptions = undefined,\n // searchGrid = false,\n renderToolbar = undefined,\n toolbarDelayClose = 400,\n renderFilterToolbar = undefined,\n multiSelectComponent = undefined,\n // todo: deprecate this\n noResultsRender,\n noResultsPlaceholder,\n fluidHeight = false,\n\n customHandlers = {},\n\n // grouping feature\n groupedBy = undefined,\n\n // callbacks\n onDefaultFiltersLoad = () => null,\n onReorder = () => null,\n onMoveRowEnd = () => null,\n onMoveRowStart = () => null,\n onMoveColumnOver = () => null,\n onMoveColumnStart = () => null,\n onMoveColumnEnd = () => null,\n onColumnResize = () => null,\n onExpandChange = () => null,\n onToggleExpand = () => null,\n onExpandRow = () => null,\n onFilter = () => null,\n onSort = () => null,\n onColumnRowEdited = () => null,\n onColumnRowEdit = () => null,\n onSelectRow = () => null,\n onSelectAll = () => null,\n onInfiniteScrolling = () => null,\n onFilterMenuClose = () => null,\n onFilterMenuOpen = () => null,\n getData = undefined, // todo: change to onGetMoreData\n serverSideData = false,\n isDataSorted = false,\n isDataFiltered = false,\n virtualized = true,\n numRowsVisible = undefined,\n isColumnEditable = (column) => column.editable,\n\n // grouped props\n groupedRows = false,\n groupedRowsRenderHeader = undefined,\n // expandable props\n renderExpandedDetails = () => null,\n detailColumns,\n expandable = false,\n getChildrenRows = (row) => row.children,\n expandableSubrowsVisible = 7,\n renderRowDetails = () => null,\n getExpandedRowSize = undefined,\n getExpandedRowMinSize,\n rowSize = RowSizesOptions.normal,\n subRowSize = RowSizesOptions.normal,\n bindColumnsSizeTo = undefined,\n bindRowSizeTo = undefined,\n onToggleShowAllRows,\n expandedRows,\n autoHeight = false,\n noColumnsPlaceholder,\n plugins = [],\n normalizeDataKeys = false,\n}) => (\n <TooltipTextProvider>\n <DataGridImpl\n aggregations={aggregations}\n autoHeight={autoHeight && !fluidHeight}\n autoScrollToId={autoScrollToId}\n bindColumnsSizeTo={bindColumnsSizeTo}\n bindRowSizeTo={bindRowSizeTo}\n className={className}\n columns={columns}\n containerProps={containerProps}\n customHandlers={customHandlers}\n detailColumns={detailColumns}\n dragAndDropColumns={dragAndDropColumns}\n dragAndDropRows={dragAndDropRows}\n editable={editable}\n expandable={expandable}\n expandableSubrowsVisible={expandableSubrowsVisible}\n expandedRows={expandedRows}\n filterBarOptions={filterBarOptions}\n filters={filters}\n fixedHeader={fixedHeader}\n fluidHeight={fluidHeight}\n getChildrenRows={getChildrenRows}\n getData={getData}\n getExpandedRowMinSize={getExpandedRowMinSize}\n getExpandedRowSize={getExpandedRowSize}\n groupedBy={groupedBy}\n groupedRows={groupedRows}\n groupedRowsRenderHeader={groupedRowsRenderHeader}\n groupingColumn={groupingColumn}\n height={height}\n infiniteScrolling={infiniteScrolling}\n instanceRef={instanceRef}\n isColumnEditable={isColumnEditable}\n isDataFiltered={isDataFiltered}\n isDataSorted={isDataSorted}\n maxPerPage={maxPerPage}\n minColumnWidth={minColumnWidth}\n minPerPage={minPerPage}\n multiSelectComponent={multiSelectComponent}\n multiSelectFilterLabel={multiSelectFilterLabel}\n multiSelectFilterLabels={multiSelectFilterLabels}\n multiSelectFilterOptions={multiSelectFilterOptions}\n noColumnsPlaceholder={noColumnsPlaceholder}\n noResultsPlaceholder={noResultsPlaceholder}\n noResultsRender={noResultsRender}\n normalizeDataKeys={normalizeDataKeys}\n numRowsVisible={numRowsVisible} // if defined, fluidHeight is disabled\n onAddFilter={onAddFilter}\n onColumnResize={onColumnResize}\n onColumnRowEdit={onColumnRowEdit}\n onColumnRowEdited={onColumnRowEdited}\n onExpandRow={onExpandRow}\n onExpandChange={onExpandChange}\n onFilter={onFilter}\n onFiltersChange={onFiltersChange}\n onFilterMenuClose={onFilterMenuClose}\n onFilterMenuOpen={onFilterMenuOpen}\n onDefaultFiltersLoad={onDefaultFiltersLoad}\n onInfiniteScrolling={onInfiniteScrolling}\n onMoveColumnEnd={onMoveColumnEnd}\n onMoveColumnOver={onMoveColumnOver}\n onMoveColumnStart={onMoveColumnStart}\n onMoveRowEnd={onMoveRowEnd}\n onMoveRowStart={onMoveRowStart}\n onPageChange={onPageChange}\n onPerPageChange={onPerPageChange}\n onRemoveFilter={onRemoveFilter}\n onReorder={onReorder}\n onSelectAll={onSelectAll}\n onSelectRow={onSelectRow}\n onSort={onSort}\n onToggleExpand={onToggleExpand}\n onToggleShowAllRows={onToggleShowAllRows}\n overscanCount={overscanCount}\n paginated={paginated}\n pagination={pagination}\n paginationStep={paginationStep}\n plugins={plugins}\n renderExpandedDetails={renderExpandedDetails}\n renderFilterToolbar={renderFilterToolbar}\n renderRowDetails={renderRowDetails}\n renderToolbar={renderToolbar}\n resizeableColumns={resizeableColumns}\n rowKey={rowKey}\n rows={rows}\n rowSize={rowSize}\n searchFilters={searchFilters}\n selectable={selectable}\n selectAll={selectAll}\n selectColumnFilterable={selectColumnFilterable}\n selectColumnSortable={selectColumnSortable}\n selectedRows={selectedRows}\n selectionColumnDefinition={selectionColumnDefinition}\n serverSideData={serverSideData}\n showFilterBar={showFilterBar}\n showHeader={showHeader}\n showRowsLoader={showRowsLoader}\n showSelectColumn={showSelectColumn}\n showSelectHighlight={showSelectHighlight}\n sortable={sortable}\n sortEmptyLast={sortEmptyLast}\n sortingColumns={sortingColumns}\n subrowSize={subRowSize}\n toolbarDelayClose={toolbarDelayClose}\n useTreeData={useTreeData}\n virtualized={virtualized}\n visibleColumns={visibleColumns}\n wrapText={wrapText}\n />\n </TooltipTextProvider>\n);\n\nconst props = {\n /** ref to the instance of the datagrid, handle it imperatively */\n instanceRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.any })]).description(\n 'ref to the instance of the datagrid, handle it imperatively',\n ),\n /** class for data grid wrapper */\n className: PropTypes.string.description('class for data grid wrapper'),\n /** inject props to datagrid wrapper */\n containerProps: PropTypes.object.description('inject props to datagrid wrapper'),\n /** FilterBar props passed down to FilterBar */\n filterBarOptions: PropTypes.shape({\n minWidth: PropTypes.number,\n maxWidth: PropTypes.number,\n }).description('FilterBar props passed down to FilterBar'),\n /** datagrid columns */\n columns: PropTypes.arrayOf(\n PropTypes.shape({\n /** Column property as an identifier */\n property: PropTypes.string.isRequired,\n /** Label in the header */\n label: PropTypes.string,\n /** Defines the width of the column, can be a string with percentages (\"50%\"), if not defined the width is flexible */\n width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /** Min width for this column. NOTE: Has prevalence over the general minColumnWidth */\n minWidth: PropTypes.number,\n /** Function returning a custom editor for that cell ({ value, onValue, rowData }) => Element */\n customEditor: PropTypes.func,\n /** Function returning an element to render in the cell ({ value, customHandlers, metaData: { rowData } }) => Element */\n customRenderer: PropTypes.func,\n /** Activates 'searchable' feature for this column */\n searchable: PropTypes.bool,\n /** Activates 'sortable' feature for this column */\n sortable: PropTypes.bool,\n /** Activates 'resizable' feature for this column */\n resizable: PropTypes.bool,\n /** Activates 'editable' feature for this column */\n editable: PropTypes.bool,\n /** Whether this column is visible or not */\n visible: PropTypes.bool,\n }),\n ).description('datagrid columns'),\n /** datagrid rows */\n rows: PropTypes.arrayOf(PropTypes.object).description('datagrid rows'),\n /** key for each row */\n rowKey: PropTypes.string.description('key for each row'),\n /** toggle infinite scroll loading behavior */\n infiniteScrolling: PropTypes.bool.description('toggle infinite scroll loading behavior'),\n /** Activates 'editable' feature on the DataGrid NOTE: needs to be activated in the column definition as well */\n overscanCount: PropTypes.number.description(\n \"Activates 'editable' feature on the DataGrid NOTE: needs to be activated in the column definition as well\",\n ),\n /** turn datagrid to editable mode */\n editable: PropTypes.bool.description('turn datagrid to editable mode'),\n /** Activates 'sortable' feature on the GataGrid NOTE: needs to be activated in the column definition as well */\n sortable: PropTypes.bool.description(\n \"Activates 'sortable' feature on the GataGrid NOTE: needs to be activated in the column definition as well\",\n ),\n /** Put empty values always last on the column after sorting */\n sortEmptyLast: PropTypes.bool.description('Put empty values always last on the column after sorting'),\n /** Activates 'pagination' feature on the datagrid NOTE: needs to be activated in the column definition as well */\n paginated: PropTypes.bool.description(\n \"Activates 'pagination' feature on the datagrid NOTE: needs to be activated in the column definition as well\",\n ),\n /** Pagination step for clicking the next pages */\n paginationStep: PropTypes.number.description('Pagination step for clicking the next pages'),\n /** Activates 'drag and drop rows' feature on the datagrid NOTE: needs to be activated in the column definition as well */\n dragAndDropRows: PropTypes.bool.description(\n \"Activates 'drag and drop rows' feature on the datagrid NOTE: needs to be activated in the column definition as well\",\n ),\n /** Activates 'selection' feature on the datagrid NOTE: needs to be activated in the column definition as well */\n selectable: PropTypes.bool.description(\n \"Activates 'selection' feature on the datagrid NOTE: needs to be activated in the column definition as well\",\n ),\n /** Activates 'resize' feature on the datagrid NOTE: needs to be activated in the column definition as well */\n resizeableColumns: PropTypes.bool.description(\n \"Activates 'resize' feature on the datagrid NOTE: needs to be activated in the column definition as well\",\n ),\n /** Placeholder rendered when no rows are visible */\n noResultsPlaceholder: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).description(\n 'Placeholder rendered when no rows are visible',\n ),\n /** Activates 'filtering' feature on the datagrid NOTE: needs to be activated in the column definition as well */\n searchFilters: PropTypes.bool.description(\n \"activates 'filtering' feature on the datagrid NOTE: needs to be activated in the column definition as well\",\n ),\n /** Activates 'drag and drop columns' feature on the datagrid NOTE: needs to be activated in the column definition as well */\n dragAndDropColumns: PropTypes.bool.description(\n \"Activates 'drag and drop columns' feature on the datagrid NOTE: needs to be activated in the column definition as well\",\n ),\n /** Activates 'grouping and tree data' feature on the datagrid NOTE: needs to be activated in the column definition as well */\n useTreeData: PropTypes.bool.description(\n \"activates 'grouping and tree data' feature on the datagrid NOTE: needs to be activated in the column definition as well\",\n ),\n /** AutoScroll to row ID */\n autoScrollToId: PropTypes.any.description('AutoScroll to row ID'),\n /** Whether all rows are selected or not */\n selectAll: PropTypes.bool.description('Whether all rows are selected or not'),\n /** Defines the selected rows */\n selectedRows: PropTypes.arrayOf(PropTypes.object).description(' Defines the selected rows'),\n /** Filters to be applied to the grid */\n filters: PropTypes.arrayOf(PropTypes.object).description('Filters to be applied to the grid'),\n // todo: define params for handlers\n /** Handler when user expands a row */\n onExpandRow: PropTypes.func.description('Handler when user expands a row'),\n /** Handler when user expands a row with full expand state */\n onExpandChange: PropTypes.func.description('Handler when user expands a row with full expand state'),\n /** Handler when user expands a row (old API) */\n onToggleExpand: PropTypes.func.description('Handler when user expands a row (old API)'),\n /** Handler when user adds a filter */\n onAddFilter: PropTypes.func.description('Handler when user adds a filter'),\n /** Handler when user removes a filter */\n onRemoveFilter: PropTypes.func.description('Handler when user removes a filter'),\n /** Handler when the filters state has changed */\n onFiltersChange: PropTypes.func.description('Handler when the filters state has changed '),\n /** Handler when the default filters load. Returns the rows rendered */\n onDefaultFiltersLoad: PropTypes.func.description('Handler when the default filters load. Returns the rows rendered'),\n /** Handler when column move is over another column */\n onMoveColumnOver: PropTypes.func.description('Handler when column move is over another column'),\n /** Handler when column move starts */\n onMoveColumnStart: PropTypes.func.description(' Handler when column move starts'),\n /** Handler when column move ends */\n onMoveColumnEnd: PropTypes.func.description('Handler when column move ends'),\n /** Whether to show the filter bar or not */\n showFilterBar: PropTypes.bool.description('Whether to show the filter bar or not'),\n /** Custom option for the header with multi select */\n multiSelectFilterOptions: PropTypes.arrayOf(PropTypes.object).description(\n 'Custom option for the header with multi select',\n ),\n /** Label to the header column for multi select */\n multiSelectFilterLabel: PropTypes.string.description('Label to the header column for multi select'),\n /** Labels for multi selects */\n multiSelectFilterLabels: PropTypes.arrayOf(PropTypes.string).description('Labels for multi selects'),\n /** unstable */\n aggregations: PropTypes.object.description('').deprecated(''),\n /** unstable */\n /** Column which rows would be grouped by */\n groupingColumn: PropTypes.string.description('Column which rows would be grouped by').deprecated(''),\n /** group by */\n groupedBy: PropTypes.string.description('group by'),\n /** Defines the sorting state */\n sortingColumns: PropTypes.objectOf(\n PropTypes.shape({\n // eslint-disable-next-line react/no-unused-prop-types\n direction: PropTypes.oneOf(['asc', 'desc']),\n // eslint-disable-next-line react/no-unused-prop-types\n position: PropTypes.number,\n }),\n ).description('Defines the sorting state'),\n /** Visible columns property */\n visibleColumns: PropTypes.arrayOf(PropTypes.string).description('Visible columns property'),\n /** Pagination: Minimum number of rows per page */\n minPerPage: PropTypes.string.description('Pagination: Minimum number of rows per page'),\n /** Pagination: Maximum number of rows per page */\n maxPerPage: PropTypes.string.description('Pagination: Maximum number of rows per page'),\n /** Pagination: Handler when user changes the amount of rows per page */\n onPerPageChange: PropTypes.string.description('Pagination: Handler when user changes the amount of rows per page'),\n /** Pagination: Handler when user changes the page */\n onPageChange: PropTypes.string.description('Pagination: Handler when user changes the page'),\n /** Pagination state */\n pagination: PropTypes.shape({\n // eslint-disable-next-line react/no-unused-prop-types\n page: PropTypes.number,\n // eslint-disable-next-line react/no-unused-prop-types\n perPage: PropTypes.number,\n }).description('pagination state'),\n /** Whether to show the header or not */\n showHeader: PropTypes.bool.description('Whether to show the header or not'),\n /** Whether to header is fixed or not */\n fixedHeader: PropTypes.bool.description('Whether to header is fixed or not'),\n /** Defines the height of the DataGrid */\n height: PropTypes.number.description('Defines the height of the DataGrid'),\n /** General min column width for all the columns */\n minColumnWidth: PropTypes.number.description('General min column width for all the columns '),\n /** Whether to show a loader instead of the rows or not */\n showRowsLoader: PropTypes.bool.description('Whether to show a loader instead of the rows or not'),\n /** When a user selects a row, that row get highlighted */\n showSelectHighlight: PropTypes.bool.description('When a user selects a row, that row get highlighted'),\n /** Whether to show the select column when the selection feature is active */\n showSelectColumn: PropTypes.bool.description(\n 'Whether to show the select column when the selection feature is active',\n ),\n /** Activates sortable feature to selection column */\n selectColumnSortable: PropTypes.bool.description('activates sortable feature to selection column'),\n /** Activates filterable feature to selection column */\n selectColumnFilterable: PropTypes.bool.description('Activates filterable feature to selection column'),\n /** Define the definition for the selection column */\n selectionColumnDefinition: PropTypes.object.description('Define the definition for the selection column'),\n /** Function that returns a toolbar to show when the user hovers the row */\n renderToolbar: PropTypes.func.description('Function that returns a toolbar to show when the user hovers the row'),\n /** Timeout to close the toolbar */\n toolbarDelayClose: PropTypes.number.description(' Timeout to close the toolbar'),\n /** Function that returns a toolbar in the FilterBar component */\n renderFilterToolbar: PropTypes.func.description('Function that returns a toolbar in the FilterBar component'),\n /** Custom component for the selection */\n multiSelectComponent: PropTypes.element.description('Custom component for the selection'),\n /** Normalize the keys of the data received and the columns */\n normalizeDataKeys: PropTypes.bool.description('Normalize the keys of the data received and the columns'),\n /** Function that returns an Element when there are no rows */\n noResultsRender: PropTypes.func.description('Function that returns an Element when there are no rows'),\n /** The height of the DataGrid will expand to its container */\n fluidHeight: PropTypes.bool.description('The height of the DataGrid will expand to its container'),\n /** @deprecated */\n customHandlers: PropTypes.object.description('').deprecated(''),\n /** Handler when user closes the filter menu */\n onFilterMenuClose: PropTypes.func.description('Handler when user closes the filter menu'),\n /** Handler when user opens the filter menu */\n onFilterMenuOpen: PropTypes.func.description('Handler when user opens the filter menu'),\n /** Handler when user drags a row */\n onReorder: PropTypes.func.description('handler when user drags a row '),\n /** Handler when user stops dragging a row */\n onMoveRowEnd: PropTypes.func.description('Handler when user stops dragging a row '),\n /** Handler when user starts dragging a row */\n onMoveRowStart: PropTypes.func.description('Handler when user starts dragging a row'),\n /** Handler when user has resized a column */\n onColumnResize: PropTypes.func.description('Handler when user has resized a column'),\n /** Handler when user filters by a column */\n onFilter: PropTypes.func.description('Handler when user filters by a column'),\n /** Handler when user sorts by a column */\n onSort: PropTypes.func.description('Handler when user sorts by a column '),\n /** Handler when user has edited a cell row */\n onColumnRowEdited: PropTypes.func.description('Handler when user has edited a cell row'),\n /** Handler when user activates the cell row editing functionality */\n onColumnRowEdit: PropTypes.func.description(' Handler when user activates the cell row editing functionality'),\n /** Handler when user selects a row */\n onSelectRow: PropTypes.func.description('Handler when user selects a row'),\n /** Handler when user checks the selection header controller */\n onSelectAll: PropTypes.func.description('Handler when user checks the selection header controller'),\n /** Handler to get more data when infinite scroll is activated */\n getData: PropTypes.func.description('Handler to get more data when infinite scroll is activated'),\n /** Handler to get more data when infinite scroll is activated without side-effect */\n onInfiniteScrolling: PropTypes.func.description(\n 'Handler to get more data when infinite scroll is activated without side-effect',\n ),\n /** Flag to override empty sort when data is from server */\n serverSideData: PropTypes.bool.description('Flag to override empty sort when data is from server'),\n /** Flag to force virtualization. Not used */\n virtualized: PropTypes.bool.description('Flag to force virtualization. Not used'),\n /** Number of rows visible. Not used */\n numRowsVisible: PropTypes.oneOfType([PropTypes.number, PropTypes.oneOf(['all'])]).description('Number of rows visible. Not used'),\n /** Callback to check if column is editable */\n isColumnEditable: PropTypes.func.description('Callback to check if column is editable'),\n /** Flag for groupedRows */\n groupedRows: PropTypes.bool.description('Flag for groupedRows'),\n /** Header for grouped rows */\n groupedRowsRenderHeader: PropTypes.oneOfType([PropTypes.func, PropTypes.element]).description('Header for grouped rows'),\n /** Once activated will disable the internal logic for sorting */\n isDataSorted: PropTypes.bool.description('Once activated will disable the internal logic for sorting'),\n /** Once activated will disable the internal logic for filtering */\n isDataFiltered: PropTypes.bool.description('Once activated will disable the internal logic for filtering'),\n /** Change row size */\n rowSize: PropTypes.oneOf(RowSizesOptionsArr).description('Change row size'),\n /** Whether to wrap the text of the data grid or not */\n wrapText: PropTypes.bool.description('Whether to wrap the text of the data grid or not'),\n /** Element to render expanded details */\n renderExpandedDetails: PropTypes.oneOfType([PropTypes.func, PropTypes.element]).description(\n 'Element to render expanded details',\n ),\n /** Columns to render on the details of an expanded row */\n detailColumns: PropTypes.arrayOf(PropTypes.object).description('Columns to render on the details of an expanded row'),\n /** Flag to enable the expandable feature */\n expandable: PropTypes.bool.description('Flag to enable the expandable feature '),\n /** Callback to get the row children */\n getChildrenRows: PropTypes.func.description('Callback to get the row children'),\n /** Number of rows visible on the details of an expanded row */\n expandableSubrowsVisible: PropTypes.number.description('Number of rows visible on the details of an expanded row'),\n /** Element to render inside expanded row */\n renderRowDetails: PropTypes.oneOfType([PropTypes.func, PropTypes.element]).description(\n 'Element to render inside expanded row',\n ),\n /** Callback to get the expanded row size */\n getExpandedRowSize: PropTypes.func.description('Callback to get the expanded row size'),\n /** Callback to get the expanded row minimum size */\n getExpandedRowMinSize: PropTypes.func.description('Callback to get the expanded row minimum size'),\n /** Change expanded/details rows size */\n subRowSize: PropTypes.oneOf(RowSizesOptionsArr).description('Change expanded/details rows size'),\n /** Bind the column size to another grid instance */\n bindColumnsSizeTo: PropTypes.string.description('Bind the column size to another grid instance'),\n /** Bind the row size to another grid instance */\n bindRowSizeTo: PropTypes.string.description('Bind the row size to another grid instance'),\n /** Handler when toggle show all is clicked */\n onToggleShowAllRows: PropTypes.func.description('Handler when toggle show all is clicked'),\n /** Expanded row state */\n expandedRows: PropTypes.object.description('Expanded row state'),\n /** Flag to enable autoheight */\n autoHeight: PropTypes.bool.description('Flag to enable autoheight'),\n /** Placeholder rendered when no columns are visible */\n noColumnsPlaceholder: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).description(\n 'Placeholder rendered when no columns are visible',\n ),\n /** Plugin additional array */\n plugins: PropTypes.arrayOf(PropTypes.any).description('Plugin additional array'),\n};\n\nDSDataGrids.propTypes = props;\nDSDataGrids.displayName = 'DSDataGrids';\nconst DSDataGridsWithSchema = describe(DSDataGrids);\nDSDataGridsWithSchema.propTypes = props;\n\nexport { DSDataGridsWithSchema, DSDataGrids, DSDataGrids as DSDataGrid };\nexport default DSDataGrids;\n"],
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { TooltipTextProvider } from '@elliemae/ds-truncated-tooltip-text';\nimport { DataGridImpl } from './DataGridImpl';\nimport { RowSizesOptions, RowSizesOptionsArr } from './rowSizes';\n\nconst DSDataGrids = ({\n containerProps = {},\n instanceRef,\n className = '',\n\n // data\n columns = [],\n rows = [],\n rowKey = 'id',\n\n // features\n infiniteScrolling = false,\n editable = false,\n sortable = false,\n sortEmptyLast = false,\n paginated = false,\n dragAndDropRows = false,\n selectable = false,\n resizeableColumns = false,\n searchFilters = false,\n dragAndDropColumns = false,\n useTreeData = false,\n autoScrollToId,\n\n // virtualization props\n overscanCount = 10,\n\n // feature state\n selectAll = false, // todo: change to isAllSelected\n selectedRows = [],\n filters = undefined,\n onAddFilter = () => null,\n onRemoveFilter = () => null,\n onFiltersChange = () => null,\n showFilterBar = true,\n multiSelectFilterOptions = [\n { id: 'true', label: 'Selected' },\n { id: 'false', label: 'Not selected' },\n ],\n multiSelectFilterLabels = undefined,\n multiSelectFilterLabel = 'Selection',\n\n aggregations = {},\n groupingColumn = undefined,\n\n sortingColumns = {},\n\n // pagination\n minPerPage = 0,\n maxPerPage = 50,\n onPerPageChange = () => null,\n onPageChange = () => null,\n paginationStep = 2,\n pagination = {\n page: 1,\n perPage: 10,\n },\n // visual\n showHeader = true,\n fixedHeader = true,\n wrapText = false,\n height = undefined,\n minColumnWidth = 100,\n showRowsLoader = false,\n visibleColumns = undefined, // this enforces visibility of columns\n showSelectHighlight = false,\n showSelectColumn = true,\n selectColumnSortable = true,\n selectColumnFilterable = false,\n selectionColumnDefinition = {},\n filterBarOptions = undefined,\n // searchGrid = false,\n renderToolbar = undefined,\n toolbarDelayClose = 400,\n renderFilterToolbar = undefined,\n multiSelectComponent = undefined,\n // todo: deprecate this\n noResultsRender,\n noResultsPlaceholder,\n fluidHeight = false,\n\n customHandlers = {},\n\n // grouping feature\n groupedBy = undefined,\n\n // callbacks\n onDefaultFiltersLoad = () => null,\n onReorder = () => null,\n onMoveRowEnd = () => null,\n onMoveRowStart = () => null,\n onMoveColumnOver = () => null,\n onMoveColumnStart = () => null,\n onMoveColumnEnd = () => null,\n onColumnResize = () => null,\n onExpandChange = () => null,\n onToggleExpand = () => null,\n onExpandRow = () => null,\n onFilter = () => null,\n onSort = () => null,\n onColumnRowEdited = () => null,\n onColumnRowEdit = () => null,\n onSelectRow = () => null,\n onSelectAll = () => null,\n onInfiniteScrolling = () => null,\n onFilterMenuClose = () => null,\n onFilterMenuOpen = () => null,\n getData = undefined, // todo: change to onGetMoreData\n serverSideData = false,\n isDataSorted = false,\n isDataFiltered = false,\n virtualized = true,\n numRowsVisible = undefined,\n isColumnEditable = (column) => column.editable,\n\n // grouped props\n groupedRows = false,\n groupedRowsRenderHeader = undefined,\n // expandable props\n renderExpandedDetails = () => null,\n detailColumns,\n expandable = false,\n getChildrenRows = (row) => row.children,\n expandableSubrowsVisible = 7,\n renderRowDetails = () => null,\n getExpandedRowSize = undefined,\n getExpandedRowMinSize,\n rowSize = RowSizesOptions.normal,\n subRowSize = RowSizesOptions.normal,\n bindColumnsSizeTo = undefined,\n bindRowSizeTo = undefined,\n onToggleShowAllRows,\n expandedRows,\n autoHeight = false,\n noColumnsPlaceholder,\n plugins = [],\n normalizeDataKeys = false,\n}) => (\n <TooltipTextProvider>\n <DataGridImpl\n aggregations={aggregations}\n autoHeight={autoHeight && !fluidHeight}\n autoScrollToId={autoScrollToId}\n bindColumnsSizeTo={bindColumnsSizeTo}\n bindRowSizeTo={bindRowSizeTo}\n className={className}\n columns={columns}\n containerProps={containerProps}\n customHandlers={customHandlers}\n detailColumns={detailColumns}\n dragAndDropColumns={dragAndDropColumns}\n dragAndDropRows={dragAndDropRows}\n editable={editable}\n expandable={expandable}\n expandableSubrowsVisible={expandableSubrowsVisible}\n expandedRows={expandedRows}\n filterBarOptions={filterBarOptions}\n filters={filters}\n fixedHeader={fixedHeader}\n fluidHeight={fluidHeight}\n getChildrenRows={getChildrenRows}\n getData={getData}\n getExpandedRowMinSize={getExpandedRowMinSize}\n getExpandedRowSize={getExpandedRowSize}\n groupedBy={groupedBy}\n groupedRows={groupedRows}\n groupedRowsRenderHeader={groupedRowsRenderHeader}\n groupingColumn={groupingColumn}\n height={height}\n infiniteScrolling={infiniteScrolling}\n instanceRef={instanceRef}\n isColumnEditable={isColumnEditable}\n isDataFiltered={isDataFiltered}\n isDataSorted={isDataSorted}\n maxPerPage={maxPerPage}\n minColumnWidth={minColumnWidth}\n minPerPage={minPerPage}\n multiSelectComponent={multiSelectComponent}\n multiSelectFilterLabel={multiSelectFilterLabel}\n multiSelectFilterLabels={multiSelectFilterLabels}\n multiSelectFilterOptions={multiSelectFilterOptions}\n noColumnsPlaceholder={noColumnsPlaceholder}\n noResultsPlaceholder={noResultsPlaceholder}\n noResultsRender={noResultsRender}\n normalizeDataKeys={normalizeDataKeys}\n numRowsVisible={numRowsVisible} // if defined, fluidHeight is disabled\n onAddFilter={onAddFilter}\n onColumnResize={onColumnResize}\n onColumnRowEdit={onColumnRowEdit}\n onColumnRowEdited={onColumnRowEdited}\n onExpandRow={onExpandRow}\n onExpandChange={onExpandChange}\n onFilter={onFilter}\n onFiltersChange={onFiltersChange}\n onFilterMenuClose={onFilterMenuClose}\n onFilterMenuOpen={onFilterMenuOpen}\n onDefaultFiltersLoad={onDefaultFiltersLoad}\n onInfiniteScrolling={onInfiniteScrolling}\n onMoveColumnEnd={onMoveColumnEnd}\n onMoveColumnOver={onMoveColumnOver}\n onMoveColumnStart={onMoveColumnStart}\n onMoveRowEnd={onMoveRowEnd}\n onMoveRowStart={onMoveRowStart}\n onPageChange={onPageChange}\n onPerPageChange={onPerPageChange}\n onRemoveFilter={onRemoveFilter}\n onReorder={onReorder}\n onSelectAll={onSelectAll}\n onSelectRow={onSelectRow}\n onSort={onSort}\n onToggleExpand={onToggleExpand}\n onToggleShowAllRows={onToggleShowAllRows}\n overscanCount={overscanCount}\n paginated={paginated}\n pagination={pagination}\n paginationStep={paginationStep}\n plugins={plugins}\n renderExpandedDetails={renderExpandedDetails}\n renderFilterToolbar={renderFilterToolbar}\n renderRowDetails={renderRowDetails}\n renderToolbar={renderToolbar}\n resizeableColumns={resizeableColumns}\n rowKey={rowKey}\n rows={rows}\n rowSize={rowSize}\n searchFilters={searchFilters}\n selectable={selectable}\n selectAll={selectAll}\n selectColumnFilterable={selectColumnFilterable}\n selectColumnSortable={selectColumnSortable}\n selectedRows={selectedRows}\n selectionColumnDefinition={selectionColumnDefinition}\n serverSideData={serverSideData}\n showFilterBar={showFilterBar}\n showHeader={showHeader}\n showRowsLoader={showRowsLoader}\n showSelectColumn={showSelectColumn}\n showSelectHighlight={showSelectHighlight}\n sortable={sortable}\n sortEmptyLast={sortEmptyLast}\n sortingColumns={sortingColumns}\n subrowSize={subRowSize}\n toolbarDelayClose={toolbarDelayClose}\n useTreeData={useTreeData}\n virtualized={virtualized}\n visibleColumns={visibleColumns}\n wrapText={wrapText}\n />\n </TooltipTextProvider>\n);\n\nconst props = {\n /** ref to the instance of the datagrid, handle it imperatively */\n instanceRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.any })]).description(\n 'ref to the instance of the datagrid, handle it imperatively',\n ),\n /** class for data grid wrapper */\n className: PropTypes.string.description('class for data grid wrapper'),\n /** inject props to datagrid wrapper */\n containerProps: PropTypes.object.description('inject props to datagrid wrapper'),\n /** FilterBar props passed down to FilterBar */\n filterBarOptions: PropTypes.shape({\n minWidth: PropTypes.number,\n maxWidth: PropTypes.number,\n }).description('FilterBar props passed down to FilterBar'),\n /** datagrid columns */\n columns: PropTypes.arrayOf(\n PropTypes.shape({\n /** Column property as an identifier */\n property: PropTypes.string.isRequired,\n /** Label in the header */\n label: PropTypes.string,\n /** Defines the width of the column, can be a string with percentages (\"50%\"), if not defined the width is flexible */\n width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /** Min width for this column. NOTE: Has prevalence over the general minColumnWidth */\n minWidth: PropTypes.number,\n /** Function returning a custom editor for that cell ({ value, onValue, rowData }) => Element */\n customEditor: PropTypes.func,\n /** Function returning an element to render in the cell ({ value, customHandlers, metaData: { rowData } }) => Element */\n customRenderer: PropTypes.func,\n /** Activates 'searchable' feature for this column */\n searchable: PropTypes.bool,\n /** Activates 'sortable' feature for this column */\n sortable: PropTypes.bool,\n /** Activates 'resizable' feature for this column */\n resizable: PropTypes.bool,\n /** Activates 'editable' feature for this column */\n editable: PropTypes.bool,\n /** Whether this column is visible or not */\n visible: PropTypes.bool,\n }),\n ).description('datagrid columns'),\n /** datagrid rows */\n rows: PropTypes.arrayOf(PropTypes.object).description('datagrid rows'),\n /** key for each row */\n rowKey: PropTypes.string.description('key for each row'),\n /** toggle infinite scroll loading behavior */\n infiniteScrolling: PropTypes.bool.description('toggle infinite scroll loading behavior'),\n /** Activates 'editable' feature on the DataGrid NOTE: needs to be activated in the column definition as well */\n overscanCount: PropTypes.number.description(\n \"Activates 'editable' feature on the DataGrid NOTE: needs to be activated in the column definition as well\",\n ),\n /** turn datagrid to editable mode */\n editable: PropTypes.bool.description('turn datagrid to editable mode'),\n /** Activates 'sortable' feature on the GataGrid NOTE: needs to be activated in the column definition as well */\n sortable: PropTypes.bool.description(\n \"Activates 'sortable' feature on the GataGrid NOTE: needs to be activated in the column definition as well\",\n ),\n /** Put empty values always last on the column after sorting */\n sortEmptyLast: PropTypes.bool.description('Put empty values always last on the column after sorting'),\n /** Activates 'pagination' feature on the datagrid NOTE: needs to be activated in the column definition as well */\n paginated: PropTypes.bool.description(\n \"Activates 'pagination' feature on the datagrid NOTE: needs to be activated in the column definition as well\",\n ),\n /** Pagination step for clicking the next pages */\n paginationStep: PropTypes.number.description('Pagination step for clicking the next pages'),\n /** Activates 'drag and drop rows' feature on the datagrid NOTE: needs to be activated in the column definition as well */\n dragAndDropRows: PropTypes.bool.description(\n \"Activates 'drag and drop rows' feature on the datagrid NOTE: needs to be activated in the column definition as well\",\n ),\n /** Activates 'selection' feature on the datagrid NOTE: needs to be activated in the column definition as well */\n selectable: PropTypes.bool.description(\n \"Activates 'selection' feature on the datagrid NOTE: needs to be activated in the column definition as well\",\n ),\n /** Activates 'resize' feature on the datagrid NOTE: needs to be activated in the column definition as well */\n resizeableColumns: PropTypes.bool.description(\n \"Activates 'resize' feature on the datagrid NOTE: needs to be activated in the column definition as well\",\n ),\n /** Placeholder rendered when no rows are visible */\n noResultsPlaceholder: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).description(\n 'Placeholder rendered when no rows are visible',\n ),\n /** Activates 'filtering' feature on the datagrid NOTE: needs to be activated in the column definition as well */\n searchFilters: PropTypes.bool.description(\n \"activates 'filtering' feature on the datagrid NOTE: needs to be activated in the column definition as well\",\n ),\n /** Activates 'drag and drop columns' feature on the datagrid NOTE: needs to be activated in the column definition as well */\n dragAndDropColumns: PropTypes.bool.description(\n \"Activates 'drag and drop columns' feature on the datagrid NOTE: needs to be activated in the column definition as well\",\n ),\n /** Activates 'grouping and tree data' feature on the datagrid NOTE: needs to be activated in the column definition as well */\n useTreeData: PropTypes.bool.description(\n \"activates 'grouping and tree data' feature on the datagrid NOTE: needs to be activated in the column definition as well\",\n ),\n /** AutoScroll to row ID */\n autoScrollToId: PropTypes.any.description('AutoScroll to row ID'),\n /** Whether all rows are selected or not */\n selectAll: PropTypes.bool.description('Whether all rows are selected or not'),\n /** Defines the selected rows */\n selectedRows: PropTypes.arrayOf(PropTypes.object).description(' Defines the selected rows'),\n /** Filters to be applied to the grid */\n filters: PropTypes.arrayOf(PropTypes.object).description('Filters to be applied to the grid'),\n // todo: define params for handlers\n /** Handler when user expands a row */\n onExpandRow: PropTypes.func.description('Handler when user expands a row'),\n /** Handler when user expands a row with full expand state */\n onExpandChange: PropTypes.func.description('Handler when user expands a row with full expand state'),\n /** Handler when user expands a row (old API) */\n onToggleExpand: PropTypes.func.description('Handler when user expands a row (old API)'),\n /** Handler when user adds a filter */\n onAddFilter: PropTypes.func.description('Handler when user adds a filter'),\n /** Handler when user removes a filter */\n onRemoveFilter: PropTypes.func.description('Handler when user removes a filter'),\n /** Handler when the filters state has changed */\n onFiltersChange: PropTypes.func.description('Handler when the filters state has changed '),\n /** Handler when the default filters load. Returns the rows rendered */\n onDefaultFiltersLoad: PropTypes.func.description('Handler when the default filters load. Returns the rows rendered'),\n /** Handler when column move is over another column */\n onMoveColumnOver: PropTypes.func.description('Handler when column move is over another column'),\n /** Handler when column move starts */\n onMoveColumnStart: PropTypes.func.description(' Handler when column move starts'),\n /** Handler when column move ends */\n onMoveColumnEnd: PropTypes.func.description('Handler when column move ends'),\n /** Whether to show the filter bar or not */\n showFilterBar: PropTypes.bool.description('Whether to show the filter bar or not'),\n /** Custom option for the header with multi select */\n multiSelectFilterOptions: PropTypes.arrayOf(PropTypes.object).description(\n 'Custom option for the header with multi select',\n ),\n /** Label to the header column for multi select */\n multiSelectFilterLabel: PropTypes.string.description('Label to the header column for multi select'),\n /** Labels for multi selects */\n multiSelectFilterLabels: PropTypes.arrayOf(PropTypes.string).description('Labels for multi selects'),\n /** unstable */\n aggregations: PropTypes.object.description('').deprecated(''),\n /** unstable */\n /** Column which rows would be grouped by */\n groupingColumn: PropTypes.string.description('Column which rows would be grouped by').deprecated(''),\n /** group by */\n groupedBy: PropTypes.string.description('group by'),\n /** Defines the sorting state */\n sortingColumns: PropTypes.objectOf(\n PropTypes.shape({\n // eslint-disable-next-line react/no-unused-prop-types\n direction: PropTypes.oneOf(['asc', 'desc']),\n // eslint-disable-next-line react/no-unused-prop-types\n position: PropTypes.number,\n }),\n ).description('Defines the sorting state'),\n /** Visible columns property */\n visibleColumns: PropTypes.arrayOf(PropTypes.string).description('Visible columns property'),\n /** Pagination: Minimum number of rows per page */\n minPerPage: PropTypes.string.description('Pagination: Minimum number of rows per page'),\n /** Pagination: Maximum number of rows per page */\n maxPerPage: PropTypes.string.description('Pagination: Maximum number of rows per page'),\n /** Pagination: Handler when user changes the amount of rows per page */\n onPerPageChange: PropTypes.string.description('Pagination: Handler when user changes the amount of rows per page'),\n /** Pagination: Handler when user changes the page */\n onPageChange: PropTypes.string.description('Pagination: Handler when user changes the page'),\n /** Pagination state */\n pagination: PropTypes.shape({\n // eslint-disable-next-line react/no-unused-prop-types\n page: PropTypes.number,\n // eslint-disable-next-line react/no-unused-prop-types\n perPage: PropTypes.number,\n }).description('pagination state'),\n /** Whether to show the header or not */\n showHeader: PropTypes.bool.description('Whether to show the header or not'),\n /** Whether to header is fixed or not */\n fixedHeader: PropTypes.bool.description('Whether to header is fixed or not'),\n /** Defines the height of the DataGrid */\n height: PropTypes.number.description('Defines the height of the DataGrid'),\n /** General min column width for all the columns */\n minColumnWidth: PropTypes.number.description('General min column width for all the columns '),\n /** Whether to show a loader instead of the rows or not */\n showRowsLoader: PropTypes.bool.description('Whether to show a loader instead of the rows or not'),\n /** When a user selects a row, that row get highlighted */\n showSelectHighlight: PropTypes.bool.description('When a user selects a row, that row get highlighted'),\n /** Whether to show the select column when the selection feature is active */\n showSelectColumn: PropTypes.bool.description(\n 'Whether to show the select column when the selection feature is active',\n ),\n /** Activates sortable feature to selection column */\n selectColumnSortable: PropTypes.bool.description('activates sortable feature to selection column'),\n /** Activates filterable feature to selection column */\n selectColumnFilterable: PropTypes.bool.description('Activates filterable feature to selection column'),\n /** Define the definition for the selection column */\n selectionColumnDefinition: PropTypes.object.description('Define the definition for the selection column'),\n /** Function that returns a toolbar to show when the user hovers the row */\n renderToolbar: PropTypes.func.description('Function that returns a toolbar to show when the user hovers the row'),\n /** Timeout to close the toolbar */\n toolbarDelayClose: PropTypes.number.description(' Timeout to close the toolbar'),\n /** Function that returns a toolbar in the FilterBar component */\n renderFilterToolbar: PropTypes.func.description('Function that returns a toolbar in the FilterBar component'),\n /** Custom component for the selection */\n multiSelectComponent: PropTypes.element.description('Custom component for the selection'),\n /** Normalize the keys of the data received and the columns */\n normalizeDataKeys: PropTypes.bool.description('Normalize the keys of the data received and the columns'),\n /** Function that returns an Element when there are no rows */\n noResultsRender: PropTypes.func.description('Function that returns an Element when there are no rows'),\n /** The height of the DataGrid will expand to its container */\n fluidHeight: PropTypes.bool.description('The height of the DataGrid will expand to its container'),\n /** @deprecated */\n customHandlers: PropTypes.object.description('').deprecated(''),\n /** Handler when user closes the filter menu */\n onFilterMenuClose: PropTypes.func.description('Handler when user closes the filter menu'),\n /** Handler when user opens the filter menu */\n onFilterMenuOpen: PropTypes.func.description('Handler when user opens the filter menu'),\n /** Handler when user drags a row */\n onReorder: PropTypes.func.description('handler when user drags a row '),\n /** Handler when user stops dragging a row */\n onMoveRowEnd: PropTypes.func.description('Handler when user stops dragging a row '),\n /** Handler when user starts dragging a row */\n onMoveRowStart: PropTypes.func.description('Handler when user starts dragging a row'),\n /** Handler when user has resized a column */\n onColumnResize: PropTypes.func.description('Handler when user has resized a column'),\n /** Handler when user filters by a column */\n onFilter: PropTypes.func.description('Handler when user filters by a column'),\n /** Handler when user sorts by a column */\n onSort: PropTypes.func.description('Handler when user sorts by a column '),\n /** Handler when user has edited a cell row */\n onColumnRowEdited: PropTypes.func.description('Handler when user has edited a cell row'),\n /** Handler when user activates the cell row editing functionality */\n onColumnRowEdit: PropTypes.func.description(' Handler when user activates the cell row editing functionality'),\n /** Handler when user selects a row */\n onSelectRow: PropTypes.func.description('Handler when user selects a row'),\n /** Handler when user checks the selection header controller */\n onSelectAll: PropTypes.func.description('Handler when user checks the selection header controller'),\n /** Handler to get more data when infinite scroll is activated */\n getData: PropTypes.func.description('Handler to get more data when infinite scroll is activated'),\n /** Handler to get more data when infinite scroll is activated without side-effect */\n onInfiniteScrolling: PropTypes.func.description(\n 'Handler to get more data when infinite scroll is activated without side-effect',\n ),\n /** Flag to override empty sort when data is from server */\n serverSideData: PropTypes.bool.description('Flag to override empty sort when data is from server'),\n /** Flag to force virtualization. Not used */\n virtualized: PropTypes.bool.description('Flag to force virtualization. Not used'),\n /** Number of rows visible. Not used */\n numRowsVisible: PropTypes.oneOfType([PropTypes.number, PropTypes.oneOf(['all'])]).description('Number of rows visible. Not used'),\n /** Callback to check if column is editable */\n isColumnEditable: PropTypes.func.description('Callback to check if column is editable'),\n /** Flag for groupedRows */\n groupedRows: PropTypes.bool.description('Flag for groupedRows'),\n /** Header for grouped rows */\n groupedRowsRenderHeader: PropTypes.oneOfType([PropTypes.func, PropTypes.element]).description('Header for grouped rows'),\n /** Once activated will disable the internal logic for sorting */\n isDataSorted: PropTypes.bool.description('Once activated will disable the internal logic for sorting'),\n /** Once activated will disable the internal logic for filtering */\n isDataFiltered: PropTypes.bool.description('Once activated will disable the internal logic for filtering'),\n /** Change row size */\n rowSize: PropTypes.oneOf(RowSizesOptionsArr).description('Change row size'),\n /** Whether to wrap the text of the data grid or not */\n wrapText: PropTypes.bool.description('Whether to wrap the text of the data grid or not'),\n /** Element to render expanded details */\n renderExpandedDetails: PropTypes.oneOfType([PropTypes.func, PropTypes.element]).description(\n 'Element to render expanded details',\n ),\n /** Columns to render on the details of an expanded row */\n detailColumns: PropTypes.arrayOf(PropTypes.object).description('Columns to render on the details of an expanded row'),\n /** Flag to enable the expandable feature */\n expandable: PropTypes.bool.description('Flag to enable the expandable feature '),\n /** Callback to get the row children */\n getChildrenRows: PropTypes.func.description('Callback to get the row children'),\n /** Number of rows visible on the details of an expanded row */\n expandableSubrowsVisible: PropTypes.number.description('Number of rows visible on the details of an expanded row'),\n /** Element to render inside expanded row */\n renderRowDetails: PropTypes.oneOfType([PropTypes.func, PropTypes.element]).description(\n 'Element to render inside expanded row',\n ),\n /** Callback to get the expanded row size */\n getExpandedRowSize: PropTypes.func.description('Callback to get the expanded row size'),\n /** Callback to get the expanded row minimum size */\n getExpandedRowMinSize: PropTypes.func.description('Callback to get the expanded row minimum size'),\n /** Change expanded/details rows size */\n subRowSize: PropTypes.oneOf(RowSizesOptionsArr).description('Change expanded/details rows size'),\n /** Bind the column size to another grid instance */\n bindColumnsSizeTo: PropTypes.string.description('Bind the column size to another grid instance'),\n /** Bind the row size to another grid instance */\n bindRowSizeTo: PropTypes.string.description('Bind the row size to another grid instance'),\n /** Handler when toggle show all is clicked */\n onToggleShowAllRows: PropTypes.func.description('Handler when toggle show all is clicked'),\n /** Expanded row state */\n expandedRows: PropTypes.object.description('Expanded row state'),\n /** Flag to enable autoheight */\n autoHeight: PropTypes.bool.description('Flag to enable autoheight'),\n /** Placeholder rendered when no columns are visible */\n noColumnsPlaceholder: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).description(\n 'Placeholder rendered when no columns are visible',\n ),\n /** Plugin additional array */\n plugins: PropTypes.arrayOf(PropTypes.any).description('Plugin additional array'),\n};\n\nDSDataGrids.propTypes = props;\nDSDataGrids.displayName = 'DSDataGrids';\nconst DSDataGridsWithSchema = describe(DSDataGrids);\nDSDataGridsWithSchema.propTypes = props;\n\nexport { DSDataGridsWithSchema, DSDataGrids, DSDataGrids as DSDataGrid };\nexport default DSDataGrids;\n"],
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACkJnB;AAhJJ,SAAS,WAAW,gBAAgB;AACpC,SAAS,2BAA2B;AACpC,SAAS,oBAAoB;AAC7B,SAAS,iBAAiB,0BAA0B;AAEpD,MAAM,cAAc,CAAC;AAAA,EACnB,iBAAiB,CAAC;AAAA,EAClB;AAAA,EACA,YAAY;AAAA,EAGZ,UAAU,CAAC;AAAA,EACX,OAAO,CAAC;AAAA,EACR,SAAS;AAAA,EAGT,oBAAoB;AAAA,EACpB,WAAW;AAAA,E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EAEA,SAAS,UAAU,QAAQ,UAAU,GAAG,EAAE,YAAY,yBAAyB;AACjF;AAEA,YAAY,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,wBAAwB,SAAS,WAAW;AAClD,sBAAsB,YAAY;AAGlC,IAAO,qBAAQ;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/filterable/FilterablePlugin.tsx"],
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable indent */\nimport { get, isFunction } from '@elliemae/ds-utilities';\nimport { createInstancePlugin } from '@elliemae/ds-shared';\nimport { addFilterToColumn } from './addFilterToColumn';\
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,KAAK,kBAAkB;AAChC,SAAS,4BAA4B;AACrC,SAAS,yBAAyB;
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable indent */\nimport { get, isFunction } from '@elliemae/ds-utilities';\nimport { createInstancePlugin } from '@elliemae/ds-shared';\nimport { addFilterToColumn } from './addFilterToColumn';\nimport filterRowsByQuery, { filterRowsByQueryGroup } from './filtering-helper/filterRowsByQuery';\nimport { useFilterableState } from './useFilterableState';\n\nconst decorateColumn = (column, grid) => {\n const {\n props: { isFilterableColumnActive = (col) => col.searchable, onRemoveAllFilters },\n actions: { addFilter, removeFilter },\n state: { query, filters },\n } = grid;\n\n return isFilterableColumnActive(column)\n ? addFilterToColumn(\n {\n grid,\n onAddFilter: addFilter,\n onRemoveFilter: removeFilter,\n onRemoveAllFilters,\n query,\n filters,\n },\n column,\n )\n : column;\n};\n\nconst composeRows = (rows, grid) => {\n const {\n props: { isDataFiltered, groupedRows },\n state: { query },\n composedRows,\n } = grid.getInstance();\n const nextRows = !groupedRows ? filterRowsByQuery(rows, query) : filterRowsByQueryGroup(rows, query, composedRows);\n\n return !isDataFiltered ? nextRows : rows;\n};\n\nexport const FilterablePlugin = createInstancePlugin('filterable', {\n registerStateHook: useFilterableState,\n decorateColumn,\n composeRows,\n registerHotKeys(grid) {\n return {\n key: 'ctrl+f',\n handler: ({ cellIndex }) => {\n const { decoratedColumns } = grid.getInstance();\n\n const column = decoratedColumns[cellIndex];\n const toggleMenuMethod = get(column, ['filterMenu', 'current', 'toggleMenu']);\n if (isFunction(toggleMenuMethod)) toggleMenuMethod();\n },\n };\n },\n});\n"],
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,KAAK,kBAAkB;AAChC,SAAS,4BAA4B;AACrC,SAAS,yBAAyB;AAClC,OAAO,qBAAqB,8BAA8B;AAC1D,SAAS,0BAA0B;AAEnC,MAAM,iBAAiB,CAAC,QAAQ,SAAS;AACvC,QAAM;AAAA,IACJ,OAAO,EAAE,2BAA2B,CAAC,QAAQ,IAAI,YAAY,mBAAmB;AAAA,IAChF,SAAS,EAAE,WAAW,aAAa;AAAA,IACnC,OAAO,EAAE,OAAO,QAAQ;AAAA,EAC1B,IAAI;AAEJ,SAAO,yBAAyB,MAAM,IAClC;AAAA,IACE;AAAA,MACE;AAAA,MACA,aAAa;AAAA,MACb,gBAAgB;AAAA,MAChB;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA;AAAA,EACF,IACA;AACN;AAEA,MAAM,cAAc,CAAC,MAAM,SAAS;AAClC,QAAM;AAAA,IACJ,OAAO,EAAE,gBAAgB,YAAY;AAAA,IACrC,OAAO,EAAE,MAAM;AAAA,IACf;AAAA,EACF,IAAI,KAAK,YAAY;AACrB,QAAM,WAAW,CAAC,cAAc,kBAAkB,MAAM,KAAK,IAAI,uBAAuB,MAAM,OAAO,YAAY;AAEjH,SAAO,CAAC,iBAAiB,WAAW;AACtC;AAEO,MAAM,mBAAmB,qBAAqB,cAAc;AAAA,EACjE,mBAAmB;AAAA,EACnB;AAAA,EACA;AAAA,EACA,gBAAgB,MAAM;AACpB,WAAO;AAAA,MACL,KAAK;AAAA,MACL,SAAS,CAAC,EAAE,UAAU,MAAM;AAC1B,cAAM,EAAE,iBAAiB,IAAI,KAAK,YAAY;AAE9C,cAAM,SAAS,iBAAiB;AAChC,cAAM,mBAAmB,IAAI,QAAQ,CAAC,cAAc,WAAW,YAAY,CAAC;AAC5E,YAAI,WAAW,gBAAgB;AAAG,2BAAiB;AAAA,MACrD;AAAA,IACF;AAAA,EACF;AACF,CAAC;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/virtualization/AutoHeightList.tsx"],
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { forwardRef, useRef } from 'react';\nimport { FixedSizeList as List } from 'react-window';\nimport { mergeRefs
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;AC6BjB;AA7BN,SAAgB,YAAY,cAAc;AAC1C,SAAS,iBAAiB,YAAY;AACtC,SAAS,
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { forwardRef, useRef } from 'react';\nimport { FixedSizeList as List } from 'react-window';\nimport { mergeRefs, useWindowScrollerList, cx } from '@elliemae/ds-utilities';\n\n// eslint-disable-next-line react/display-name\nexport const AutoHeightList = forwardRef(\n (\n {\n itemCount,\n className,\n innerRef,\n itemData,\n itemKey,\n itemSize,\n outerRef,\n component: ListComponent = List,\n ...otherProps\n },\n ref,\n ) => {\n const listRef = useRef();\n const outerListRef = useRef();\n\n useWindowScrollerList({\n listInstance: listRef,\n outerListRef,\n });\n\n return (\n <ListComponent\n {...otherProps}\n ref={mergeRefs(ref, listRef)}\n className={cx(className, 'window-scroller-override')}\n height={window.innerHeight}\n innerRef={innerRef}\n itemCount={itemCount}\n itemData={itemData}\n itemKey={itemKey}\n itemSize={itemSize}\n outerRef={mergeRefs(outerListRef, outerRef)}\n overscanCount={10}\n useIsScrolling\n />\n );\n },\n);\n\nexport default AutoHeightList;\n"],
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC6BjB;AA7BN,SAAgB,YAAY,cAAc;AAC1C,SAAS,iBAAiB,YAAY;AACtC,SAAS,WAAW,uBAAuB,UAAU;AAG9C,MAAM,iBAAiB;AAAA,EAC5B,CACE;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW,gBAAgB;AAAA,OACxB;AAAA,EACL,GACA,QACG;AACH,UAAM,UAAU,OAAO;AACvB,UAAM,eAAe,OAAO;AAE5B,0BAAsB;AAAA,MACpB,cAAc;AAAA,MACd;AAAA,IACF,CAAC;AAED,WACE;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ,KAAK,UAAU,KAAK,OAAO;AAAA,QAC3B,WAAW,GAAG,WAAW,0BAA0B;AAAA,QACnD,QAAQ,OAAO;AAAA,QACf;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,UAAU,UAAU,cAAc,QAAQ;AAAA,QAC1C,eAAe;AAAA,QACf,gBAAc;AAAA;AAAA,IAChB;AAAA,EAEJ;AACF;AAEA,IAAO,yBAAQ;",
|
6
6
|
"names": []
|
7
7
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@elliemae/ds-datagrids",
|
3
|
-
"version": "3.16.0-next.
|
3
|
+
"version": "3.16.0-next.4",
|
4
4
|
"license": "MIT",
|
5
5
|
"description": "ICE MT - Dimsum - Data Grids",
|
6
6
|
"files": [
|
@@ -556,24 +556,25 @@
|
|
556
556
|
"sortabular": "~1.6.0",
|
557
557
|
"stylesheet-helpers": "~0.2.2",
|
558
558
|
"uuid": "~8.3.2",
|
559
|
-
"@elliemae/ds-button": "3.16.0-next.
|
560
|
-
"@elliemae/ds-classnames": "3.16.0-next.
|
561
|
-
"@elliemae/ds-
|
562
|
-
"@elliemae/ds-
|
563
|
-
"@elliemae/ds-
|
564
|
-
"@elliemae/ds-
|
565
|
-
"@elliemae/ds-
|
566
|
-
"@elliemae/ds-
|
567
|
-
"@elliemae/ds-
|
568
|
-
"@elliemae/ds-
|
569
|
-
"@elliemae/ds-
|
570
|
-
"@elliemae/ds-
|
571
|
-
"@elliemae/ds-
|
572
|
-
"@elliemae/ds-
|
573
|
-
"@elliemae/ds-
|
574
|
-
"@elliemae/ds-
|
575
|
-
"@elliemae/ds-
|
576
|
-
"@elliemae/ds-
|
559
|
+
"@elliemae/ds-button": "3.16.0-next.4",
|
560
|
+
"@elliemae/ds-classnames": "3.16.0-next.4",
|
561
|
+
"@elliemae/ds-dropdownmenu": "3.16.0-next.4",
|
562
|
+
"@elliemae/ds-filterbar": "3.16.0-next.4",
|
563
|
+
"@elliemae/ds-form": "3.16.0-next.4",
|
564
|
+
"@elliemae/ds-grid": "3.16.0-next.4",
|
565
|
+
"@elliemae/ds-icons": "3.16.0-next.4",
|
566
|
+
"@elliemae/ds-popper": "3.16.0-next.4",
|
567
|
+
"@elliemae/ds-menu": "3.16.0-next.4",
|
568
|
+
"@elliemae/ds-props-helpers": "3.16.0-next.4",
|
569
|
+
"@elliemae/ds-separator": "3.16.0-next.4",
|
570
|
+
"@elliemae/ds-shared": "3.16.0-next.4",
|
571
|
+
"@elliemae/ds-spinner": "3.16.0-next.4",
|
572
|
+
"@elliemae/ds-system": "3.16.0-next.4",
|
573
|
+
"@elliemae/ds-toolbar": "3.16.0-next.4",
|
574
|
+
"@elliemae/ds-truncated-tooltip-text": "3.16.0-next.4",
|
575
|
+
"@elliemae/ds-utilities": "3.16.0-next.4",
|
576
|
+
"@elliemae/ds-datagrids": "3.16.0-next.4",
|
577
|
+
"@elliemae/ds-controlled-form": "3.16.0-next.4"
|
577
578
|
},
|
578
579
|
"devDependencies": {
|
579
580
|
"@testing-library/jest-dom": "~5.16.4",
|
@@ -594,7 +595,7 @@
|
|
594
595
|
"eslint:fix": "exit 0 | echo",
|
595
596
|
"dts": "exit 0 | echo",
|
596
597
|
"build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs",
|
597
|
-
"dev:build": "pnpm --filter {.}... build
|
598
|
+
"dev:build": "pnpm --filter {.}... build",
|
598
599
|
"dev:install": "pnpm --filter {.}... i --no-lockfile && pnpm run dev:build",
|
599
600
|
"checkDeps": "npx -yes ../ds-codemods check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
|
600
601
|
}
|