@elliemae/ds-datagrids 2.2.0-alpha.4 → 3.0.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/DSDataGrid.js +635 -395
- package/cjs/DataGridImpl.js +128 -103
- package/cjs/PaginatedDataGrid.js +68 -68
- package/cjs/blockNames.js +11 -39
- package/cjs/columns/IconColumn.js +62 -78
- package/cjs/columns/NumberColumn.js +5 -35
- package/cjs/components/BodyCell.js +80 -83
- package/cjs/components/BodyList.js +52 -52
- package/cjs/components/ColumnVisibilityMenuOption.js +31 -53
- package/cjs/components/ColumnsOptionsMenuSection.js +44 -59
- package/cjs/components/EmptyState.js +50 -81
- package/cjs/components/HeaderCell.js +58 -64
- package/cjs/components/List.js +29 -41
- package/cjs/components/ListItem.js +36 -43
- package/cjs/components/NoResults.js +51 -55
- package/cjs/components/RowsLoader.js +22 -42
- package/cjs/components/Table.js +87 -78
- package/cjs/components/TableBody.js +60 -61
- package/cjs/components/TableHeader.js +30 -47
- package/cjs/components/footer/addOptionalFooterComponents.js +43 -53
- package/cjs/components/header/PrimaryControls.js +35 -49
- package/cjs/components/header/addOptionalHeaderComponents.js +43 -54
- package/cjs/components/index.js +17 -43
- package/cjs/components/renderers/defaultClassedRenderers.js +57 -64
- package/cjs/components/renderers/index.js +17 -44
- package/cjs/components/renderers/renderRowsLoader.js +18 -39
- package/cjs/components/tableContext.js +13 -36
- package/cjs/defaultPlugins.js +12 -44
- package/cjs/index.js +67 -72
- package/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +114 -102
- package/cjs/plugins/body-header-scroll-sync/index.js +9 -35
- package/cjs/plugins/column-dnd/DndColumnsPlugin.js +86 -107
- package/cjs/plugins/column-dnd/decorateGridWithDndColumns.js +27 -43
- package/cjs/plugins/column-dnd/index.js +9 -35
- package/cjs/plugins/column-sizing/ColumnSizingPlugin.js +55 -59
- package/cjs/plugins/column-sizing/columnMeasurerTransformer.js +53 -48
- package/cjs/plugins/column-sizing/ext-points/decorateColumn.js +13 -40
- package/cjs/plugins/column-sizing/ext-points/getTableProps.js +54 -55
- package/cjs/plugins/column-sizing/getColumnNameFromProperty.js +9 -37
- package/cjs/plugins/column-sizing/index.js +9 -35
- package/cjs/plugins/column-sizing/useColumnSizeService.js +86 -72
- package/cjs/plugins/column-sizing/useStylesheetHelpers.js +199 -96
- package/cjs/plugins/column-sizing/utils.js +29 -52
- package/cjs/plugins/custom-cell-renderer/CustomRendererPlugin.js +16 -38
- package/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js +56 -61
- package/cjs/plugins/custom-cell-renderer/getRendererComponent.js +60 -58
- package/cjs/plugins/custom-cell-renderer/index.js +9 -35
- package/cjs/plugins/editable/EditableComponents/ComboBox.js +53 -50
- package/cjs/plugins/editable/EditableComponents/TextBox.js +76 -56
- package/cjs/plugins/editable/EditableComponents/index.js +11 -37
- package/cjs/plugins/editable/EditablePlugin.js +75 -60
- package/cjs/plugins/editable/decorateEditable.js +98 -61
- package/cjs/plugins/editable/getEditorComponent.js +76 -70
- package/cjs/plugins/editable/index.js +13 -38
- package/cjs/plugins/expandable-grid/ExpandableColumn.js +144 -112
- package/cjs/plugins/expandable-grid/ExpandablePlugin.js +180 -118
- package/cjs/plugins/expandable-grid/ExpandedRow.js +139 -117
- package/cjs/plugins/expandable-grid/ExpandedRowExtra.js +52 -54
- package/cjs/plugins/expandable-grid/index.js +11 -37
- package/cjs/plugins/expandable-grid/useExpandGridState.js +31 -45
- package/cjs/plugins/export-data/ExportDataPlugin.js +116 -82
- package/cjs/plugins/export-data/index.js +12 -35
- package/cjs/plugins/filterable/FilterablePlugin.js +55 -54
- package/cjs/plugins/filterable/addFilterToColumn.js +28 -40
- package/cjs/plugins/filterable/components/FilterableHeader.js +107 -119
- package/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +116 -116
- package/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +73 -97
- package/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +132 -138
- package/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js +119 -115
- package/cjs/plugins/filterable/components/filterable-menus/defaultDateFormat.js +7 -35
- package/cjs/plugins/filterable/components/filterable-menus/getFilterMenuByType.js +15 -46
- package/cjs/plugins/filterable/filterableFormatter.js +51 -61
- package/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js +55 -60
- package/cjs/plugins/filterable/filtering-helper/strategiesOperators.js +22 -43
- package/cjs/plugins/filterable/helper.js +79 -68
- package/cjs/plugins/filterable/index.js +9 -35
- package/cjs/plugins/filterable/useFilterableState.js +66 -62
- package/cjs/plugins/grouping-by/GroupingByPlugin.js +23 -40
- package/cjs/plugins/grouping-grid/GroupingPlugin.js +109 -86
- package/cjs/plugins/grouping-grid/walkStrategy.js +26 -46
- package/cjs/plugins/index.js +48 -68
- package/cjs/plugins/infinite-scrolling/InfiniteScrollPlugin.js +88 -64
- package/cjs/plugins/infinite-scrolling/index.js +9 -35
- package/cjs/plugins/pagination/PaginationPlugin.js +90 -73
- package/cjs/plugins/pagination/components/Pagination.js +35 -54
- package/cjs/plugins/pagination/components/Paginator.js +44 -59
- package/cjs/plugins/pagination/components/PerPageDropdown.js +63 -51
- package/cjs/plugins/pagination/helper.js +24 -45
- package/cjs/plugins/pagination/index.js +9 -35
- package/cjs/plugins/pagination/usePaginationState.js +38 -46
- package/cjs/plugins/resizable/ResizablePlugin.js +55 -51
- package/cjs/plugins/resizable/decorateResizable.js +53 -49
- package/cjs/plugins/resizable/index.js +9 -35
- package/cjs/plugins/resizable/useResizeHandle.js +50 -56
- package/cjs/plugins/resizable/utils.js +28 -49
- package/cjs/plugins/row-dnd/DndRowsPlugin.js +82 -103
- package/cjs/plugins/row-dnd/index.js +9 -35
- package/cjs/plugins/selectable/SelectablePlugin.js +134 -101
- package/cjs/plugins/selectable/addSelectableColumn.js +68 -67
- package/cjs/plugins/selectable/helper.js +39 -50
- package/cjs/plugins/selectable/index.js +9 -35
- package/cjs/plugins/selectable/selectableFormatter.js +105 -83
- package/cjs/plugins/selectable/useSelectableState.js +94 -67
- package/cjs/plugins/sortable/SortablePlugin.js +76 -62
- package/cjs/plugins/sortable/checkIfSortable.js +14 -37
- package/cjs/plugins/sortable/index.js +9 -35
- package/cjs/plugins/sortable/sortHeaderFormatter.js +50 -56
- package/cjs/plugins/sortable/sortTree.js +47 -40
- package/cjs/plugins/sortable/sorter.js +172 -140
- package/cjs/plugins/sortable/useSortableState.js +79 -53
- package/cjs/plugins/toolbar/RowRenderer.js +76 -75
- package/cjs/plugins/toolbar/ToolbarPlugin.js +33 -49
- package/cjs/plugins/toolbar/ToolbarTrigger.js +70 -89
- package/cjs/plugins/toolbar/index.js +9 -35
- package/cjs/plugins/virtualization/AutoHeightList.js +52 -64
- package/cjs/plugins/virtualization/VirtualizationPlugin.js +97 -86
- package/cjs/plugins/virtualization/VirtualizedBody.js +155 -139
- package/cjs/plugins/virtualization/VirtualizedBodyRow.js +17 -39
- package/cjs/plugins/virtualization/helper.js +7 -35
- package/cjs/plugins/virtualization/index.js +9 -35
- package/cjs/renders/CellWithAddons.js +50 -98
- package/cjs/renders/index.js +11 -37
- package/cjs/renders/styled.js +27 -78
- package/cjs/rowSizes.js +12 -44
- package/cjs/utilities/getPluginsFromProps.js +39 -67
- package/cjs/utilities/getScrollbarSize.js +25 -44
- package/cjs/utilities/normalizeData.js +34 -44
- package/esm/DSDataGrid.js +597 -337
- package/esm/DataGridImpl.js +113 -68
- package/esm/PaginatedDataGrid.js +59 -39
- package/esm/blockNames.js +5 -10
- package/esm/columns/IconColumn.js +54 -49
- package/esm/columns/NumberColumn.js +3 -6
- package/esm/components/BodyCell.js +68 -51
- package/esm/components/BodyList.js +43 -23
- package/esm/components/ColumnVisibilityMenuOption.js +27 -24
- package/esm/components/ColumnsOptionsMenuSection.js +38 -30
- package/esm/components/EmptyState.js +40 -52
- package/esm/components/HeaderCell.js +48 -33
- package/esm/components/List.js +23 -12
- package/esm/components/ListItem.js +30 -14
- package/esm/components/NoResults.js +43 -26
- package/esm/components/RowsLoader.js +15 -13
- package/esm/components/Table.js +76 -45
- package/esm/components/TableBody.js +52 -32
- package/esm/components/TableHeader.js +23 -17
- package/esm/components/footer/addOptionalFooterComponents.js +37 -24
- package/esm/components/header/PrimaryControls.js +29 -20
- package/esm/components/header/addOptionalHeaderComponents.js +36 -25
- package/esm/components/index.js +5 -14
- package/esm/components/renderers/defaultClassedRenderers.js +46 -41
- package/esm/components/renderers/index.js +5 -16
- package/esm/components/renderers/renderRowsLoader.js +10 -10
- package/esm/components/tableContext.js +5 -7
- package/esm/defaultPlugins.js +8 -15
- package/esm/index.js +27 -63
- package/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +101 -71
- package/esm/plugins/body-header-scroll-sync/index.js +1 -6
- package/esm/plugins/column-dnd/DndColumnsPlugin.js +68 -69
- package/esm/plugins/column-dnd/decorateGridWithDndColumns.js +18 -16
- package/esm/plugins/column-dnd/index.js +1 -6
- package/esm/plugins/column-sizing/ColumnSizingPlugin.js +37 -20
- package/esm/plugins/column-sizing/columnMeasurerTransformer.js +42 -16
- package/esm/plugins/column-sizing/ext-points/decorateColumn.js +7 -9
- package/esm/plugins/column-sizing/ext-points/getTableProps.js +43 -23
- package/esm/plugins/column-sizing/getColumnNameFromProperty.js +7 -8
- package/esm/plugins/column-sizing/index.js +1 -6
- package/esm/plugins/column-sizing/useColumnSizeService.js +71 -34
- package/esm/plugins/column-sizing/useStylesheetHelpers.js +171 -64
- package/esm/plugins/column-sizing/utils.js +21 -23
- package/esm/plugins/custom-cell-renderer/CustomRendererPlugin.js +7 -8
- package/esm/plugins/custom-cell-renderer/addCustomRendererToCell.js +43 -28
- package/esm/plugins/custom-cell-renderer/getRendererComponent.js +44 -22
- package/esm/plugins/custom-cell-renderer/index.js +1 -6
- package/esm/plugins/editable/EditableComponents/ComboBox.js +46 -20
- package/esm/plugins/editable/EditableComponents/TextBox.js +68 -26
- package/esm/plugins/editable/EditableComponents/index.js +2 -8
- package/esm/plugins/editable/EditablePlugin.js +63 -27
- package/esm/plugins/editable/decorateEditable.js +68 -32
- package/esm/plugins/editable/getEditorComponent.js +66 -39
- package/esm/plugins/editable/index.js +3 -9
- package/esm/plugins/expandable-grid/ExpandableColumn.js +133 -82
- package/esm/plugins/expandable-grid/ExpandablePlugin.js +160 -81
- package/esm/plugins/expandable-grid/ExpandedRow.js +124 -86
- package/esm/plugins/expandable-grid/ExpandedRowExtra.js +44 -25
- package/esm/plugins/expandable-grid/index.js +2 -8
- package/esm/plugins/expandable-grid/useExpandGridState.js +25 -14
- package/esm/plugins/export-data/ExportDataPlugin.js +103 -52
- package/esm/plugins/export-data/index.js +1 -6
- package/esm/plugins/filterable/FilterablePlugin.js +44 -22
- package/esm/plugins/filterable/addFilterToColumn.js +20 -11
- package/esm/plugins/filterable/components/FilterableHeader.js +95 -85
- package/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +103 -83
- package/esm/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +63 -68
- package/esm/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +116 -108
- package/esm/plugins/filterable/components/filterable-menus/TextFilterMenu.js +106 -84
- package/esm/plugins/filterable/components/filterable-menus/defaultDateFormat.js +3 -6
- package/esm/plugins/filterable/components/filterable-menus/getFilterMenuByType.js +12 -16
- package/esm/plugins/filterable/filterableFormatter.js +45 -32
- package/esm/plugins/filterable/filtering-helper/filterRowsByQuery.js +44 -29
- package/esm/plugins/filterable/filtering-helper/strategiesOperators.js +13 -11
- package/esm/plugins/filterable/helper.js +62 -42
- package/esm/plugins/filterable/index.js +1 -6
- package/esm/plugins/filterable/useFilterableState.js +54 -33
- package/esm/plugins/grouping-by/GroupingByPlugin.js +14 -10
- package/esm/plugins/grouping-grid/GroupingPlugin.js +94 -53
- package/esm/plugins/grouping-grid/walkStrategy.js +22 -17
- package/esm/plugins/index.js +19 -39
- package/esm/plugins/infinite-scrolling/InfiniteScrollPlugin.js +74 -31
- package/esm/plugins/infinite-scrolling/index.js +1 -6
- package/esm/plugins/pagination/PaginationPlugin.js +75 -42
- package/esm/plugins/pagination/components/Pagination.js +27 -25
- package/esm/plugins/pagination/components/Paginator.js +35 -29
- package/esm/plugins/pagination/components/PerPageDropdown.js +54 -22
- package/esm/plugins/pagination/helper.js +19 -16
- package/esm/plugins/pagination/index.js +1 -6
- package/esm/plugins/pagination/usePaginationState.js +28 -15
- package/esm/plugins/resizable/ResizablePlugin.js +45 -20
- package/esm/plugins/resizable/decorateResizable.js +41 -19
- package/esm/plugins/resizable/index.js +1 -6
- package/esm/plugins/resizable/useResizeHandle.js +39 -24
- package/esm/plugins/resizable/utils.js +18 -20
- package/esm/plugins/row-dnd/DndRowsPlugin.js +71 -73
- package/esm/plugins/row-dnd/index.js +1 -6
- package/esm/plugins/selectable/SelectablePlugin.js +117 -64
- package/esm/plugins/selectable/addSelectableColumn.js +57 -39
- package/esm/plugins/selectable/helper.js +25 -19
- package/esm/plugins/selectable/index.js +1 -6
- package/esm/plugins/selectable/selectableFormatter.js +97 -54
- package/esm/plugins/selectable/useSelectableState.js +78 -34
- package/esm/plugins/sortable/SortablePlugin.js +43 -30
- package/esm/plugins/sortable/checkIfSortable.js +9 -8
- package/esm/plugins/sortable/index.js +1 -6
- package/esm/plugins/sortable/sortHeaderFormatter.js +43 -27
- package/esm/plugins/sortable/sortTree.js +24 -13
- package/esm/plugins/sortable/sorter.js +163 -112
- package/esm/plugins/sortable/useSortableState.js +49 -22
- package/esm/plugins/toolbar/RowRenderer.js +61 -40
- package/esm/plugins/toolbar/ToolbarPlugin.js +23 -19
- package/esm/plugins/toolbar/ToolbarTrigger.js +57 -59
- package/esm/plugins/toolbar/index.js +1 -6
- package/esm/plugins/virtualization/AutoHeightList.js +40 -30
- package/esm/plugins/virtualization/VirtualizationPlugin.js +84 -55
- package/esm/plugins/virtualization/VirtualizedBody.js +132 -94
- package/esm/plugins/virtualization/VirtualizedBodyRow.js +15 -10
- package/esm/plugins/virtualization/helper.js +3 -6
- package/esm/plugins/virtualization/index.js +1 -6
- package/esm/renders/CellWithAddons.js +40 -69
- package/esm/renders/index.js +2 -8
- package/esm/renders/styled.js +16 -49
- package/esm/rowSizes.js +6 -15
- package/esm/utilities/getPluginsFromProps.js +24 -25
- package/esm/utilities/getScrollbarSize.js +21 -15
- package/esm/utilities/normalizeData.js +24 -15
- package/package.json +20 -20
- package/types/DSDataGrid.d.ts +1 -1
- package/types/DataGridImpl.d.ts +2 -3
- package/types/PaginatedDataGrid.d.ts +2 -1
- package/types/columns/IconColumn.d.ts +2 -3
- package/types/components/BodyCell.d.ts +12 -13
- package/types/components/ColumnVisibilityMenuOption.d.ts +2 -2
- package/types/components/ColumnsOptionsMenuSection.d.ts +0 -1
- package/types/components/HeaderCell.d.ts +10 -10
- package/types/components/NoResults.d.ts +2 -2
- package/types/components/RowsLoader.d.ts +2 -2
- package/types/components/Table.d.ts +11 -6
- package/types/components/TableBody.d.ts +8 -3
- package/types/components/TableHeader.d.ts +1 -2
- package/types/components/footer/addOptionalFooterComponents.d.ts +0 -1
- package/types/components/header/PrimaryControls.d.ts +0 -1
- package/types/components/header/addOptionalHeaderComponents.d.ts +1 -1
- package/types/components/renderers/index.d.ts +1 -1
- package/types/components/renderers/renderRowsLoader.d.ts +1 -1
- package/types/index.d.ts +8 -7
- package/types/plugins/body-header-scroll-sync/index.d.ts +1 -1
- package/types/plugins/column-dnd/index.d.ts +1 -1
- package/types/plugins/column-sizing/getColumnNameFromProperty.d.ts +1 -2
- package/types/plugins/column-sizing/index.d.ts +1 -1
- package/types/plugins/column-sizing/useColumnSizeService.d.ts +1 -2
- package/types/plugins/custom-cell-renderer/addCustomRendererToCell.d.ts +0 -1
- package/types/plugins/custom-cell-renderer/getRendererComponent.d.ts +0 -1
- package/types/plugins/custom-cell-renderer/index.d.ts +1 -1
- package/types/plugins/editable/EditableComponents/ComboBox.d.ts +1 -3
- package/types/plugins/editable/EditableComponents/TextBox.d.ts +1 -3
- package/types/plugins/editable/getEditorComponent.d.ts +0 -1
- package/types/plugins/editable/index.d.ts +2 -2
- package/types/plugins/expandable-grid/ExpandableColumn.d.ts +2 -3
- package/types/plugins/expandable-grid/ExpandedRow.d.ts +0 -1
- package/types/plugins/expandable-grid/ExpandedRowExtra.d.ts +0 -1
- package/types/plugins/expandable-grid/index.d.ts +2 -2
- package/types/plugins/export-data/index.d.ts +1 -1
- package/types/plugins/filterable/components/FilterableHeader.d.ts +15 -15
- package/types/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.d.ts +0 -1
- package/types/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.d.ts +0 -1
- package/types/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.d.ts +1 -2
- package/types/plugins/filterable/components/filterable-menus/TextFilterMenu.d.ts +0 -1
- package/types/plugins/filterable/components/filterable-menus/getFilterMenuByType.d.ts +1 -2
- package/types/plugins/filterable/filterableFormatter.d.ts +2 -3
- package/types/plugins/filterable/filtering-helper/filterRowsByQuery.d.ts +1 -2
- package/types/plugins/filterable/filtering-helper/strategiesOperators.d.ts +2 -2
- package/types/plugins/filterable/index.d.ts +1 -1
- package/types/plugins/index.d.ts +16 -16
- package/types/plugins/infinite-scrolling/index.d.ts +1 -1
- package/types/plugins/pagination/components/Paginator.d.ts +0 -1
- package/types/plugins/pagination/components/PerPageDropdown.d.ts +0 -1
- package/types/plugins/pagination/helper.d.ts +2 -3
- package/types/plugins/pagination/index.d.ts +1 -1
- package/types/plugins/resizable/index.d.ts +1 -1
- package/types/plugins/row-dnd/index.d.ts +1 -1
- package/types/plugins/selectable/index.d.ts +1 -1
- package/types/plugins/selectable/selectableFormatter.d.ts +0 -1
- package/types/plugins/sortable/index.d.ts +1 -1
- package/types/plugins/sortable/sortHeaderFormatter.d.ts +0 -1
- package/types/plugins/sortable/sortTree.d.ts +0 -1
- package/types/plugins/sortable/sorter.d.ts +1 -1
- package/types/plugins/toolbar/index.d.ts +1 -1
- package/types/plugins/virtualization/AutoHeightList.d.ts +1 -1
- package/types/plugins/virtualization/VirtualizedBody.d.ts +0 -1
- package/types/plugins/virtualization/VirtualizedBodyRow.d.ts +2 -2
- package/types/plugins/virtualization/index.d.ts +1 -1
- package/types/utilities/getPluginsFromProps.d.ts +1 -2
- package/cjs/DSDataGrid.js.map +0 -7
- package/cjs/DataGridImpl.js.map +0 -7
- package/cjs/PaginatedDataGrid.js.map +0 -7
- package/cjs/blockNames.js.map +0 -7
- package/cjs/columns/IconColumn.js.map +0 -7
- package/cjs/columns/NumberColumn.js.map +0 -7
- package/cjs/components/BodyCell.js.map +0 -7
- package/cjs/components/BodyList.js.map +0 -7
- package/cjs/components/ColumnVisibilityMenuOption.js.map +0 -7
- package/cjs/components/ColumnsOptionsMenuSection.js.map +0 -7
- package/cjs/components/EmptyState.js.map +0 -7
- package/cjs/components/HeaderCell.js.map +0 -7
- package/cjs/components/List.js.map +0 -7
- package/cjs/components/ListItem.js.map +0 -7
- package/cjs/components/NoResults.js.map +0 -7
- package/cjs/components/RowsLoader.js.map +0 -7
- package/cjs/components/Table.js.map +0 -7
- package/cjs/components/TableBody.js.map +0 -7
- package/cjs/components/TableHeader.js.map +0 -7
- package/cjs/components/footer/addOptionalFooterComponents.js.map +0 -7
- package/cjs/components/header/PrimaryControls.js.map +0 -7
- package/cjs/components/header/addOptionalHeaderComponents.js.map +0 -7
- package/cjs/components/index.js.map +0 -7
- package/cjs/components/renderers/defaultClassedRenderers.js.map +0 -7
- package/cjs/components/renderers/index.js.map +0 -7
- package/cjs/components/renderers/renderRowsLoader.js.map +0 -7
- package/cjs/components/tableContext.js.map +0 -7
- package/cjs/defaultPlugins.js.map +0 -7
- package/cjs/index.js.map +0 -7
- package/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js.map +0 -7
- package/cjs/plugins/body-header-scroll-sync/index.js.map +0 -7
- package/cjs/plugins/column-dnd/DndColumnsPlugin.js.map +0 -7
- package/cjs/plugins/column-dnd/decorateGridWithDndColumns.js.map +0 -7
- package/cjs/plugins/column-dnd/index.js.map +0 -7
- package/cjs/plugins/column-sizing/ColumnSizingPlugin.js.map +0 -7
- package/cjs/plugins/column-sizing/columnMeasurerTransformer.js.map +0 -7
- package/cjs/plugins/column-sizing/ext-points/decorateColumn.js.map +0 -7
- package/cjs/plugins/column-sizing/ext-points/getTableProps.js.map +0 -7
- package/cjs/plugins/column-sizing/getColumnNameFromProperty.js.map +0 -7
- package/cjs/plugins/column-sizing/index.js.map +0 -7
- package/cjs/plugins/column-sizing/useColumnSizeService.js.map +0 -7
- package/cjs/plugins/column-sizing/useStylesheetHelpers.js.map +0 -7
- package/cjs/plugins/column-sizing/utils.js.map +0 -7
- package/cjs/plugins/custom-cell-renderer/CustomRendererPlugin.js.map +0 -7
- package/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js.map +0 -7
- package/cjs/plugins/custom-cell-renderer/getRendererComponent.js.map +0 -7
- package/cjs/plugins/custom-cell-renderer/index.js.map +0 -7
- package/cjs/plugins/editable/EditableComponents/ComboBox.js.map +0 -7
- package/cjs/plugins/editable/EditableComponents/TextBox.js.map +0 -7
- package/cjs/plugins/editable/EditableComponents/index.js.map +0 -7
- package/cjs/plugins/editable/EditablePlugin.js.map +0 -7
- package/cjs/plugins/editable/decorateEditable.js.map +0 -7
- package/cjs/plugins/editable/getEditorComponent.js.map +0 -7
- package/cjs/plugins/editable/index.js.map +0 -7
- package/cjs/plugins/expandable-grid/ExpandableColumn.js.map +0 -7
- package/cjs/plugins/expandable-grid/ExpandablePlugin.js.map +0 -7
- package/cjs/plugins/expandable-grid/ExpandedRow.js.map +0 -7
- package/cjs/plugins/expandable-grid/ExpandedRowExtra.js.map +0 -7
- package/cjs/plugins/expandable-grid/index.js.map +0 -7
- package/cjs/plugins/expandable-grid/useExpandGridState.js.map +0 -7
- package/cjs/plugins/export-data/ExportDataPlugin.js.map +0 -7
- package/cjs/plugins/export-data/index.js.map +0 -7
- package/cjs/plugins/filterable/FilterablePlugin.js.map +0 -7
- package/cjs/plugins/filterable/addFilterToColumn.js.map +0 -7
- package/cjs/plugins/filterable/components/FilterableHeader.js.map +0 -7
- package/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js.map +0 -7
- package/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js.map +0 -7
- package/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js.map +0 -7
- package/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js.map +0 -7
- package/cjs/plugins/filterable/components/filterable-menus/defaultDateFormat.js.map +0 -7
- package/cjs/plugins/filterable/components/filterable-menus/getFilterMenuByType.js.map +0 -7
- package/cjs/plugins/filterable/filterableFormatter.js.map +0 -7
- package/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js.map +0 -7
- package/cjs/plugins/filterable/filtering-helper/strategiesOperators.js.map +0 -7
- package/cjs/plugins/filterable/helper.js.map +0 -7
- package/cjs/plugins/filterable/index.js.map +0 -7
- package/cjs/plugins/filterable/useFilterableState.js.map +0 -7
- package/cjs/plugins/grouping-by/GroupingByPlugin.js.map +0 -7
- package/cjs/plugins/grouping-grid/GroupingPlugin.js.map +0 -7
- package/cjs/plugins/grouping-grid/walkStrategy.js.map +0 -7
- package/cjs/plugins/index.js.map +0 -7
- package/cjs/plugins/infinite-scrolling/InfiniteScrollPlugin.js.map +0 -7
- package/cjs/plugins/infinite-scrolling/index.js.map +0 -7
- package/cjs/plugins/pagination/PaginationPlugin.js.map +0 -7
- package/cjs/plugins/pagination/components/Pagination.js.map +0 -7
- package/cjs/plugins/pagination/components/Paginator.js.map +0 -7
- package/cjs/plugins/pagination/components/PerPageDropdown.js.map +0 -7
- package/cjs/plugins/pagination/helper.js.map +0 -7
- package/cjs/plugins/pagination/index.js.map +0 -7
- package/cjs/plugins/pagination/usePaginationState.js.map +0 -7
- package/cjs/plugins/resizable/ResizablePlugin.js.map +0 -7
- package/cjs/plugins/resizable/decorateResizable.js.map +0 -7
- package/cjs/plugins/resizable/index.js.map +0 -7
- package/cjs/plugins/resizable/useResizeHandle.js.map +0 -7
- package/cjs/plugins/resizable/utils.js.map +0 -7
- package/cjs/plugins/row-dnd/DndRowsPlugin.js.map +0 -7
- package/cjs/plugins/row-dnd/index.js.map +0 -7
- package/cjs/plugins/selectable/SelectablePlugin.js.map +0 -7
- package/cjs/plugins/selectable/addSelectableColumn.js.map +0 -7
- package/cjs/plugins/selectable/helper.js.map +0 -7
- package/cjs/plugins/selectable/index.js.map +0 -7
- package/cjs/plugins/selectable/selectableFormatter.js.map +0 -7
- package/cjs/plugins/selectable/useSelectableState.js.map +0 -7
- package/cjs/plugins/sortable/SortablePlugin.js.map +0 -7
- package/cjs/plugins/sortable/checkIfSortable.js.map +0 -7
- package/cjs/plugins/sortable/index.js.map +0 -7
- package/cjs/plugins/sortable/sortHeaderFormatter.js.map +0 -7
- package/cjs/plugins/sortable/sortTree.js.map +0 -7
- package/cjs/plugins/sortable/sorter.js.map +0 -7
- package/cjs/plugins/sortable/useSortableState.js.map +0 -7
- package/cjs/plugins/toolbar/RowRenderer.js.map +0 -7
- package/cjs/plugins/toolbar/ToolbarPlugin.js.map +0 -7
- package/cjs/plugins/toolbar/ToolbarTrigger.js.map +0 -7
- package/cjs/plugins/toolbar/index.js.map +0 -7
- package/cjs/plugins/virtualization/AutoHeightList.js.map +0 -7
- package/cjs/plugins/virtualization/VirtualizationPlugin.js.map +0 -7
- package/cjs/plugins/virtualization/VirtualizedBody.js.map +0 -7
- package/cjs/plugins/virtualization/VirtualizedBodyRow.js.map +0 -7
- package/cjs/plugins/virtualization/helper.js.map +0 -7
- package/cjs/plugins/virtualization/index.js.map +0 -7
- package/cjs/renders/CellWithAddons.js.map +0 -7
- package/cjs/renders/index.js.map +0 -7
- package/cjs/renders/styled.js.map +0 -7
- package/cjs/rowSizes.js.map +0 -7
- package/cjs/utilities/DataGridUtilities.json +0 -1315
- package/cjs/utilities/getPluginsFromProps.js.map +0 -7
- package/cjs/utilities/getScrollbarSize.js.map +0 -7
- package/cjs/utilities/normalizeData.js.map +0 -7
- package/esm/DSDataGrid.js.map +0 -7
- package/esm/DataGridImpl.js.map +0 -7
- package/esm/PaginatedDataGrid.js.map +0 -7
- package/esm/blockNames.js.map +0 -7
- package/esm/columns/IconColumn.js.map +0 -7
- package/esm/columns/NumberColumn.js.map +0 -7
- package/esm/components/BodyCell.js.map +0 -7
- package/esm/components/BodyList.js.map +0 -7
- package/esm/components/ColumnVisibilityMenuOption.js.map +0 -7
- package/esm/components/ColumnsOptionsMenuSection.js.map +0 -7
- package/esm/components/EmptyState.js.map +0 -7
- package/esm/components/HeaderCell.js.map +0 -7
- package/esm/components/List.js.map +0 -7
- package/esm/components/ListItem.js.map +0 -7
- package/esm/components/NoResults.js.map +0 -7
- package/esm/components/RowsLoader.js.map +0 -7
- package/esm/components/Table.js.map +0 -7
- package/esm/components/TableBody.js.map +0 -7
- package/esm/components/TableHeader.js.map +0 -7
- package/esm/components/footer/addOptionalFooterComponents.js.map +0 -7
- package/esm/components/header/PrimaryControls.js.map +0 -7
- package/esm/components/header/addOptionalHeaderComponents.js.map +0 -7
- package/esm/components/index.js.map +0 -7
- package/esm/components/renderers/defaultClassedRenderers.js.map +0 -7
- package/esm/components/renderers/index.js.map +0 -7
- package/esm/components/renderers/renderRowsLoader.js.map +0 -7
- package/esm/components/tableContext.js.map +0 -7
- package/esm/defaultPlugins.js.map +0 -7
- package/esm/index.js.map +0 -7
- package/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js.map +0 -7
- package/esm/plugins/body-header-scroll-sync/index.js.map +0 -7
- package/esm/plugins/column-dnd/DndColumnsPlugin.js.map +0 -7
- package/esm/plugins/column-dnd/decorateGridWithDndColumns.js.map +0 -7
- package/esm/plugins/column-dnd/index.js.map +0 -7
- package/esm/plugins/column-sizing/ColumnSizingPlugin.js.map +0 -7
- package/esm/plugins/column-sizing/columnMeasurerTransformer.js.map +0 -7
- package/esm/plugins/column-sizing/ext-points/decorateColumn.js.map +0 -7
- package/esm/plugins/column-sizing/ext-points/getTableProps.js.map +0 -7
- package/esm/plugins/column-sizing/getColumnNameFromProperty.js.map +0 -7
- package/esm/plugins/column-sizing/index.js.map +0 -7
- package/esm/plugins/column-sizing/useColumnSizeService.js.map +0 -7
- package/esm/plugins/column-sizing/useStylesheetHelpers.js.map +0 -7
- package/esm/plugins/column-sizing/utils.js.map +0 -7
- package/esm/plugins/custom-cell-renderer/CustomRendererPlugin.js.map +0 -7
- package/esm/plugins/custom-cell-renderer/addCustomRendererToCell.js.map +0 -7
- package/esm/plugins/custom-cell-renderer/getRendererComponent.js.map +0 -7
- package/esm/plugins/custom-cell-renderer/index.js.map +0 -7
- package/esm/plugins/editable/EditableComponents/ComboBox.js.map +0 -7
- package/esm/plugins/editable/EditableComponents/TextBox.js.map +0 -7
- package/esm/plugins/editable/EditableComponents/index.js.map +0 -7
- package/esm/plugins/editable/EditablePlugin.js.map +0 -7
- package/esm/plugins/editable/decorateEditable.js.map +0 -7
- package/esm/plugins/editable/getEditorComponent.js.map +0 -7
- package/esm/plugins/editable/index.js.map +0 -7
- package/esm/plugins/expandable-grid/ExpandableColumn.js.map +0 -7
- package/esm/plugins/expandable-grid/ExpandablePlugin.js.map +0 -7
- package/esm/plugins/expandable-grid/ExpandedRow.js.map +0 -7
- package/esm/plugins/expandable-grid/ExpandedRowExtra.js.map +0 -7
- package/esm/plugins/expandable-grid/index.js.map +0 -7
- package/esm/plugins/expandable-grid/useExpandGridState.js.map +0 -7
- package/esm/plugins/export-data/ExportDataPlugin.js.map +0 -7
- package/esm/plugins/export-data/index.js.map +0 -7
- package/esm/plugins/filterable/FilterablePlugin.js.map +0 -7
- package/esm/plugins/filterable/addFilterToColumn.js.map +0 -7
- package/esm/plugins/filterable/components/FilterableHeader.js.map +0 -7
- package/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js.map +0 -7
- package/esm/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js.map +0 -7
- package/esm/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js.map +0 -7
- package/esm/plugins/filterable/components/filterable-menus/TextFilterMenu.js.map +0 -7
- package/esm/plugins/filterable/components/filterable-menus/defaultDateFormat.js.map +0 -7
- package/esm/plugins/filterable/components/filterable-menus/getFilterMenuByType.js.map +0 -7
- package/esm/plugins/filterable/filterableFormatter.js.map +0 -7
- package/esm/plugins/filterable/filtering-helper/filterRowsByQuery.js.map +0 -7
- package/esm/plugins/filterable/filtering-helper/strategiesOperators.js.map +0 -7
- package/esm/plugins/filterable/helper.js.map +0 -7
- package/esm/plugins/filterable/index.js.map +0 -7
- package/esm/plugins/filterable/useFilterableState.js.map +0 -7
- package/esm/plugins/grouping-by/GroupingByPlugin.js.map +0 -7
- package/esm/plugins/grouping-grid/GroupingPlugin.js.map +0 -7
- package/esm/plugins/grouping-grid/walkStrategy.js.map +0 -7
- package/esm/plugins/index.js.map +0 -7
- package/esm/plugins/infinite-scrolling/InfiniteScrollPlugin.js.map +0 -7
- package/esm/plugins/infinite-scrolling/index.js.map +0 -7
- package/esm/plugins/pagination/PaginationPlugin.js.map +0 -7
- package/esm/plugins/pagination/components/Pagination.js.map +0 -7
- package/esm/plugins/pagination/components/Paginator.js.map +0 -7
- package/esm/plugins/pagination/components/PerPageDropdown.js.map +0 -7
- package/esm/plugins/pagination/helper.js.map +0 -7
- package/esm/plugins/pagination/index.js.map +0 -7
- package/esm/plugins/pagination/usePaginationState.js.map +0 -7
- package/esm/plugins/resizable/ResizablePlugin.js.map +0 -7
- package/esm/plugins/resizable/decorateResizable.js.map +0 -7
- package/esm/plugins/resizable/index.js.map +0 -7
- package/esm/plugins/resizable/useResizeHandle.js.map +0 -7
- package/esm/plugins/resizable/utils.js.map +0 -7
- package/esm/plugins/row-dnd/DndRowsPlugin.js.map +0 -7
- package/esm/plugins/row-dnd/index.js.map +0 -7
- package/esm/plugins/selectable/SelectablePlugin.js.map +0 -7
- package/esm/plugins/selectable/addSelectableColumn.js.map +0 -7
- package/esm/plugins/selectable/helper.js.map +0 -7
- package/esm/plugins/selectable/index.js.map +0 -7
- package/esm/plugins/selectable/selectableFormatter.js.map +0 -7
- package/esm/plugins/selectable/useSelectableState.js.map +0 -7
- package/esm/plugins/sortable/SortablePlugin.js.map +0 -7
- package/esm/plugins/sortable/checkIfSortable.js.map +0 -7
- package/esm/plugins/sortable/index.js.map +0 -7
- package/esm/plugins/sortable/sortHeaderFormatter.js.map +0 -7
- package/esm/plugins/sortable/sortTree.js.map +0 -7
- package/esm/plugins/sortable/sorter.js.map +0 -7
- package/esm/plugins/sortable/useSortableState.js.map +0 -7
- package/esm/plugins/toolbar/RowRenderer.js.map +0 -7
- package/esm/plugins/toolbar/ToolbarPlugin.js.map +0 -7
- package/esm/plugins/toolbar/ToolbarTrigger.js.map +0 -7
- package/esm/plugins/toolbar/index.js.map +0 -7
- package/esm/plugins/virtualization/AutoHeightList.js.map +0 -7
- package/esm/plugins/virtualization/VirtualizationPlugin.js.map +0 -7
- package/esm/plugins/virtualization/VirtualizedBody.js.map +0 -7
- package/esm/plugins/virtualization/VirtualizedBodyRow.js.map +0 -7
- package/esm/plugins/virtualization/helper.js.map +0 -7
- package/esm/plugins/virtualization/index.js.map +0 -7
- package/esm/renders/CellWithAddons.js.map +0 -7
- package/esm/renders/index.js.map +0 -7
- package/esm/renders/styled.js.map +0 -7
- package/esm/rowSizes.js.map +0 -7
- package/esm/utilities/DataGridUtilities.json +0 -1315
- package/esm/utilities/getPluginsFromProps.js.map +0 -7
- package/esm/utilities/getScrollbarSize.js.map +0 -7
- package/esm/utilities/normalizeData.js.map +0 -7
|
@@ -1,97 +1,108 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
});
|
|
32
|
-
var React = __toESM(require("react"));
|
|
33
|
-
var import_react = __toESM(require("react"));
|
|
34
|
-
var import_lodash = require("lodash");
|
|
35
|
-
var import_FocusGrid = require("@elliemae/ds-shared/FocusGroup/FocusGrid");
|
|
36
|
-
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
37
|
-
var import_ds_utilities2 = require("@elliemae/ds-utilities");
|
|
38
|
-
var import_createInstancePlugin = require("@elliemae/ds-shared/createDataInstance/createInstancePlugin");
|
|
39
|
-
var import_VirtualizedBody = require("./VirtualizedBody");
|
|
40
|
-
const VirtualizationPlugin = (0, import_createInstancePlugin.createInstancePlugin)("virtualization", {
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
6
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
7
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
8
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
9
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
10
|
+
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
11
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
12
|
+
var React = require('react');
|
|
13
|
+
var lodash = require('lodash');
|
|
14
|
+
var FocusGridManager = require('@elliemae/ds-shared/FocusGroup/FocusGrid');
|
|
15
|
+
var dsUtilities = require('@elliemae/ds-utilities');
|
|
16
|
+
var createInstancePlugin = require('@elliemae/ds-shared/createDataInstance/createInstancePlugin');
|
|
17
|
+
var VirtualizedBody = require('./VirtualizedBody.js');
|
|
18
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
19
|
+
|
|
20
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
21
|
+
|
|
22
|
+
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
23
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
24
|
+
var FocusGridManager__default = /*#__PURE__*/_interopDefaultLegacy(FocusGridManager);
|
|
25
|
+
var createInstancePlugin__default = /*#__PURE__*/_interopDefaultLegacy(createInstancePlugin);
|
|
26
|
+
|
|
27
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
28
|
+
|
|
29
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
30
|
+
const VirtualizationPlugin = createInstancePlugin__default["default"]('virtualization', {
|
|
41
31
|
decorateRenderers(renderers, grid) {
|
|
42
|
-
const BodyWrapper = renderers.body.wrapper;
|
|
43
|
-
|
|
44
|
-
|
|
32
|
+
const BodyWrapper = renderers.body.wrapper; // eslint-disable-next-line react/display-name
|
|
33
|
+
|
|
34
|
+
renderers.body.wrapper = React.useMemo(() => props => {
|
|
35
|
+
const {
|
|
36
|
+
listProps = {},
|
|
37
|
+
rows
|
|
38
|
+
} = props;
|
|
45
39
|
const {
|
|
46
40
|
hotKeys,
|
|
47
|
-
props: {
|
|
48
|
-
|
|
41
|
+
props: {
|
|
42
|
+
autoHeight,
|
|
43
|
+
autoScrollToId,
|
|
44
|
+
expandable,
|
|
45
|
+
overscanCount,
|
|
46
|
+
rowSize
|
|
47
|
+
},
|
|
48
|
+
refs: {
|
|
49
|
+
innerBody
|
|
50
|
+
},
|
|
49
51
|
setHasScroll,
|
|
50
|
-
state: {
|
|
52
|
+
state: {
|
|
53
|
+
filters
|
|
54
|
+
}
|
|
51
55
|
} = grid.getInstance();
|
|
52
|
-
const listRef =
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
ref:
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
56
|
+
const listRef = React.useRef();
|
|
57
|
+
|
|
58
|
+
const nextListProps = _objectSpread(_objectSpread({}, listProps), {}, {
|
|
59
|
+
ref: dsUtilities.mergeRefs(listRef, listProps.ref)
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
return /*#__PURE__*/_jsx__default["default"](FocusGridManager__default["default"], {
|
|
63
|
+
hotKeys: hotKeys,
|
|
64
|
+
keyBindings: _ref => {
|
|
65
|
+
let {
|
|
66
|
+
defaultBindings
|
|
67
|
+
} = _ref;
|
|
68
|
+
return _objectSpread(_objectSpread({}, defaultBindings), {}, {
|
|
69
|
+
// todo: this is kind of hacky, since it's virtualized and there's
|
|
70
|
+
// the possibility that the firsts or lasts rows aren't rendered
|
|
71
|
+
Home: dsUtilities.runAll(e => {
|
|
72
|
+
if (e.ctrlKey) {
|
|
73
|
+
listRef.current.scrollToItem(0);
|
|
74
|
+
setTimeout(() => defaultBindings.Home(e), 10);
|
|
75
|
+
} else {
|
|
76
|
+
defaultBindings.Home(e);
|
|
77
|
+
}
|
|
78
|
+
}),
|
|
79
|
+
End: dsUtilities.runAll(e => {
|
|
80
|
+
if (e.ctrlKey) {
|
|
81
|
+
listRef.current.scrollToItem(rows.length - 1);
|
|
82
|
+
setTimeout(() => defaultBindings.End(e), 10);
|
|
83
|
+
} else {
|
|
84
|
+
defaultBindings.End(e);
|
|
85
|
+
}
|
|
86
|
+
})
|
|
87
|
+
});
|
|
88
|
+
},
|
|
78
89
|
shouldRefocus: false
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
autoHeight,
|
|
90
|
+
}, void 0, /*#__PURE__*/jsxRuntime.jsx(VirtualizedBody, _objectSpread(_objectSpread({}, props), {}, {
|
|
91
|
+
autoScrollToId: autoScrollToId,
|
|
92
|
+
autoHeight: autoHeight,
|
|
83
93
|
component: BodyWrapper,
|
|
84
|
-
expandable,
|
|
85
|
-
innerBody,
|
|
94
|
+
expandable: expandable,
|
|
95
|
+
innerBody: innerBody,
|
|
86
96
|
listProps: nextListProps,
|
|
87
|
-
overscanCount,
|
|
88
|
-
rowSize,
|
|
89
|
-
setHasScroll,
|
|
90
|
-
filters
|
|
91
|
-
}));
|
|
92
|
-
}, [
|
|
97
|
+
overscanCount: overscanCount,
|
|
98
|
+
rowSize: rowSize,
|
|
99
|
+
setHasScroll: setHasScroll,
|
|
100
|
+
filters: filters
|
|
101
|
+
})));
|
|
102
|
+
}, [lodash.get(grid.getInstance(), 'rows.length')]);
|
|
93
103
|
return renderers;
|
|
94
104
|
}
|
|
105
|
+
|
|
95
106
|
});
|
|
96
|
-
|
|
97
|
-
|
|
107
|
+
|
|
108
|
+
exports.VirtualizationPlugin = VirtualizationPlugin;
|
|
@@ -1,46 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
default: () => VirtualizedBody_default
|
|
32
|
-
});
|
|
33
|
-
var React = __toESM(require("react"));
|
|
34
|
-
var import_react = __toESM(require("react"));
|
|
35
|
-
var import_prop_types = __toESM(require("prop-types"));
|
|
36
|
-
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
37
|
-
var import_NoResults = require("../../components/NoResults");
|
|
38
|
-
var import_VirtualizedBodyRow = require("./VirtualizedBodyRow");
|
|
39
|
-
var import_rowSizes = require("../../rowSizes");
|
|
40
|
-
var import_helper = require("./helper");
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
|
+
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
5
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
6
|
+
require('core-js/modules/esnext.async-iterator.reduce.js');
|
|
7
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
8
|
+
require('core-js/modules/esnext.iterator.reduce.js');
|
|
9
|
+
require('core-js/modules/esnext.async-iterator.map.js');
|
|
10
|
+
require('core-js/modules/esnext.iterator.map.js');
|
|
11
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
12
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
13
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
14
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
15
|
+
var React = require('react');
|
|
16
|
+
var dsUtilities = require('@elliemae/ds-utilities');
|
|
17
|
+
var NoResults = require('../../components/NoResults.js');
|
|
18
|
+
var VirtualizedBodyRow = require('./VirtualizedBodyRow.js');
|
|
19
|
+
var rowSizes = require('../../rowSizes.js');
|
|
20
|
+
var helper = require('./helper.js');
|
|
21
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
22
|
+
|
|
23
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
24
|
+
|
|
25
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
26
|
+
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
27
|
+
|
|
28
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
29
|
+
|
|
30
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
41
31
|
const wrapperSafari = {};
|
|
42
|
-
const wrapperGeneric = {
|
|
43
|
-
|
|
32
|
+
const wrapperGeneric = {
|
|
33
|
+
overflowY: 'auto',
|
|
34
|
+
overflowX: 'visible'
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const VirtualizedBody = props => {
|
|
44
38
|
const {
|
|
45
39
|
autoScrollToId,
|
|
46
40
|
columns,
|
|
@@ -58,37 +52,50 @@ const VirtualizedBody = (props) => {
|
|
|
58
52
|
rowRenderer,
|
|
59
53
|
rowSize,
|
|
60
54
|
setHasScroll,
|
|
61
|
-
filters
|
|
55
|
+
filters // hack to reset the scrollTop to 0 if filters change
|
|
56
|
+
|
|
62
57
|
} = props;
|
|
63
|
-
const rowHeight = defaultRowHeight ||
|
|
64
|
-
const [scrollTop, setScrollTop] =
|
|
65
|
-
const [visibleHeight, setVisibleHeight] =
|
|
66
|
-
const [hasScrollBar, setHasScrollBar] =
|
|
67
|
-
const rowStyleCache =
|
|
68
|
-
const [renderedIndexes, setRenderedIndexes] =
|
|
58
|
+
const rowHeight = defaultRowHeight || rowSizes.RowSizes[rowSize];
|
|
59
|
+
const [scrollTop, setScrollTop] = React.useState(0);
|
|
60
|
+
const [visibleHeight, setVisibleHeight] = React.useState(0);
|
|
61
|
+
const [hasScrollBar, setHasScrollBar] = React.useState(false);
|
|
62
|
+
const rowStyleCache = React.useRef({});
|
|
63
|
+
const [renderedIndexes, setRenderedIndexes] = React.useState([0, 30]);
|
|
64
|
+
|
|
69
65
|
const getCalculatedHeightBetweenIndexes = (start, end) => {
|
|
70
|
-
const {
|
|
66
|
+
const {
|
|
67
|
+
itemSize = () => rowHeight
|
|
68
|
+
} = listProps;
|
|
69
|
+
|
|
71
70
|
if (expandable) {
|
|
72
|
-
return rows.slice(start, end).map((_, idx) => idx).map(
|
|
71
|
+
return rows.slice(start, end).map((_, idx) => idx).map(idx => itemSize(idx)).reduce((acc, curr) => acc + curr, 0);
|
|
73
72
|
}
|
|
73
|
+
|
|
74
74
|
return (end - start) * rowHeight;
|
|
75
75
|
};
|
|
76
|
+
|
|
76
77
|
const generateRowPositionMap = () => rows.map((row, idx) => getCalculatedHeightBetweenIndexes(0, idx));
|
|
77
|
-
|
|
78
|
-
const
|
|
79
|
-
const
|
|
80
|
-
const
|
|
81
|
-
|
|
82
|
-
const
|
|
78
|
+
|
|
79
|
+
const rowPositionMap = React.useRef(generateRowPositionMap());
|
|
80
|
+
const [virtualizedBodyRef, setVirtualizedBodyRef] = React.useState(null);
|
|
81
|
+
const handlerRef = React.useRef();
|
|
82
|
+
const autoScrollTo = React.useCallback(scrollHeight => {
|
|
83
|
+
const {
|
|
84
|
+
itemSize = () => rowHeight
|
|
85
|
+
} = listProps;
|
|
86
|
+
const idx = rows.findIndex(item => item[rowKey] === autoScrollToId);
|
|
83
87
|
let val = rowPositionMap.current[idx] || 0;
|
|
84
88
|
const lastPositionIdx = rowPositionMap.current.length - 1;
|
|
85
89
|
let lastPosition = 0;
|
|
90
|
+
|
|
86
91
|
if (lastPositionIdx > -1) {
|
|
87
92
|
lastPosition = rowPositionMap.current[lastPositionIdx] - scrollHeight + itemSize(lastPositionIdx);
|
|
88
93
|
}
|
|
94
|
+
|
|
89
95
|
if (lastPosition < val) {
|
|
90
96
|
val = lastPosition;
|
|
91
97
|
}
|
|
98
|
+
|
|
92
99
|
if (virtualizedBodyRef) {
|
|
93
100
|
if (idx > -1) {
|
|
94
101
|
setScrollTop(val);
|
|
@@ -96,164 +103,173 @@ const VirtualizedBody = (props) => {
|
|
|
96
103
|
}
|
|
97
104
|
}
|
|
98
105
|
}, [rows, virtualizedBodyRef]);
|
|
99
|
-
|
|
106
|
+
React.useEffect(() => {
|
|
100
107
|
autoScrollTo(visibleHeight);
|
|
101
108
|
}, [autoScrollToId, visibleHeight]);
|
|
102
|
-
const handler =
|
|
109
|
+
const handler = React.useCallback(dsUtilities.debounce(_ref => {
|
|
110
|
+
let {
|
|
111
|
+
target
|
|
112
|
+
} = _ref;
|
|
113
|
+
// Update coordinates
|
|
103
114
|
setScrollTop(target.scrollTop || 0);
|
|
104
115
|
}, 100), [setScrollTop]);
|
|
105
|
-
|
|
116
|
+
React.useEffect(() => {
|
|
106
117
|
setScrollTop(0);
|
|
107
118
|
}, [filters]);
|
|
108
|
-
|
|
119
|
+
React.useEffect(() => {
|
|
109
120
|
handlerRef.current = handler;
|
|
110
121
|
}, [handler]);
|
|
111
|
-
|
|
122
|
+
React.useLayoutEffect(() => {
|
|
112
123
|
let top = Math.ceil(scrollTop / rowHeight);
|
|
113
124
|
let bot = Math.ceil((scrollTop + visibleHeight) / rowHeight);
|
|
125
|
+
|
|
114
126
|
if (expandable) {
|
|
127
|
+
// updateMapperFirst
|
|
115
128
|
rowPositionMap.current = generateRowPositionMap();
|
|
116
|
-
top = rowPositionMap.current.findIndex(
|
|
117
|
-
bot = rowPositionMap.current.findIndex(
|
|
118
|
-
if (bot === -1)
|
|
119
|
-
bot = rowPositionMap.current.length;
|
|
129
|
+
top = rowPositionMap.current.findIndex(item => item > scrollTop);
|
|
130
|
+
bot = rowPositionMap.current.findIndex(item => item > scrollTop + visibleHeight);
|
|
131
|
+
if (bot === -1) bot = rowPositionMap.current.length;
|
|
120
132
|
}
|
|
133
|
+
|
|
121
134
|
let upperBound = top - 1 - overscanCount;
|
|
122
135
|
let lowerBound = bot - 1 + overscanCount;
|
|
136
|
+
|
|
123
137
|
if (upperBound < 0) {
|
|
124
138
|
upperBound = 0;
|
|
125
139
|
}
|
|
140
|
+
|
|
126
141
|
if (lowerBound - upperBound < overscanCount) {
|
|
127
142
|
lowerBound = upperBound + overscanCount;
|
|
128
143
|
}
|
|
144
|
+
|
|
129
145
|
if (lowerBound > rows.length) {
|
|
130
146
|
lowerBound = rows.length;
|
|
131
147
|
}
|
|
148
|
+
|
|
132
149
|
setHasScrollBar(visibleHeight < getHeight());
|
|
133
150
|
setHasScroll(visibleHeight < getHeight());
|
|
134
151
|
setRenderedIndexes([upperBound, lowerBound]);
|
|
135
152
|
}, [visibleHeight, scrollTop, rows]);
|
|
136
|
-
|
|
153
|
+
React.useLayoutEffect(() => {
|
|
137
154
|
if (virtualizedBodyRef) {
|
|
138
|
-
const parsedVisibleHeight = parseFloat(window.getComputedStyle(virtualizedBodyRef, null).getPropertyValue(
|
|
139
|
-
|
|
155
|
+
const parsedVisibleHeight = parseFloat(window.getComputedStyle(virtualizedBodyRef, null).getPropertyValue('height')); // eslint-disable-next-line no-restricted-globals
|
|
156
|
+
|
|
157
|
+
if (!dsUtilities.isNaN(parsedVisibleHeight)) {
|
|
140
158
|
setVisibleHeight(parsedVisibleHeight);
|
|
141
159
|
autoScrollTo(parsedVisibleHeight);
|
|
142
160
|
}
|
|
143
161
|
}
|
|
144
162
|
}, [rows, virtualizedBodyRef]);
|
|
145
|
-
|
|
163
|
+
React.useEffect(() => {
|
|
146
164
|
if (virtualizedBodyRef) {
|
|
147
|
-
const eventListener =
|
|
148
|
-
|
|
165
|
+
const eventListener = event => handlerRef.current(event);
|
|
166
|
+
|
|
167
|
+
virtualizedBodyRef.addEventListener('scroll', eventListener);
|
|
149
168
|
return () => {
|
|
150
|
-
virtualizedBodyRef.removeEventListener(
|
|
169
|
+
virtualizedBodyRef.removeEventListener('scroll', eventListener);
|
|
151
170
|
};
|
|
152
171
|
}
|
|
172
|
+
|
|
153
173
|
return () => null;
|
|
154
174
|
}, [virtualizedBodyRef]);
|
|
175
|
+
|
|
155
176
|
const getHeight = () => {
|
|
156
177
|
let returnHeight = 0;
|
|
178
|
+
|
|
157
179
|
if (expandable) {
|
|
158
180
|
returnHeight = getCalculatedHeightBetweenIndexes(0, rows.length) + 8;
|
|
159
181
|
} else {
|
|
160
182
|
returnHeight = rows.length * rowHeight + 8;
|
|
161
|
-
}
|
|
183
|
+
} // if (visibleHeight > returnHeight) {
|
|
184
|
+
// return visibleHeight;
|
|
185
|
+
// }
|
|
186
|
+
|
|
187
|
+
|
|
162
188
|
if (virtualizedBodyRef && virtualizedBodyRef.scrollHeight > virtualizedBodyRef.clientHeight) {
|
|
163
189
|
return returnHeight + 10;
|
|
164
190
|
}
|
|
191
|
+
|
|
165
192
|
return returnHeight;
|
|
166
193
|
};
|
|
194
|
+
|
|
167
195
|
const getRowStyle = (row, index, specificRowHeight) => {
|
|
168
|
-
const {
|
|
196
|
+
const {
|
|
197
|
+
itemSize
|
|
198
|
+
} = listProps;
|
|
199
|
+
|
|
169
200
|
if (!expandable && rowStyleCache.current[index]) {
|
|
170
201
|
return rowStyleCache.current[index];
|
|
171
202
|
}
|
|
203
|
+
|
|
172
204
|
rowStyleCache.current[index] = {
|
|
173
205
|
height: itemSize ? itemSize(index) : specificRowHeight,
|
|
174
206
|
left: 0,
|
|
175
207
|
right: 0,
|
|
176
208
|
top: getCalculatedHeightBetweenIndexes(0, index),
|
|
177
|
-
position:
|
|
209
|
+
position: 'absolute'
|
|
178
210
|
};
|
|
179
211
|
return rowStyleCache.current[index];
|
|
180
212
|
};
|
|
181
|
-
|
|
213
|
+
|
|
214
|
+
const generateRenderedRows = () => rows.slice(renderedIndexes[0], renderedIndexes[1] + 1).map((_, index) => /*#__PURE__*/_jsx__default["default"](VirtualizedBodyRow, {
|
|
182
215
|
data: {
|
|
183
216
|
rows,
|
|
184
217
|
columns,
|
|
185
218
|
rowKey,
|
|
186
|
-
renderer: {
|
|
219
|
+
renderer: {
|
|
220
|
+
rowRenderer
|
|
221
|
+
}
|
|
187
222
|
},
|
|
188
223
|
index: renderedIndexes[0] + index,
|
|
189
|
-
key: rows[renderedIndexes[0] + index][rowKey],
|
|
190
224
|
style: getRowStyle(rows[renderedIndexes[0] + index], renderedIndexes[0] + index, rowHeight)
|
|
191
|
-
}));
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
};
|
|
225
|
+
}, rows[renderedIndexes[0] + index][rowKey]));
|
|
226
|
+
|
|
227
|
+
const wrapperStyle = _objectSpread({
|
|
228
|
+
height: '100%'
|
|
229
|
+
}, helper.isSafari ? wrapperSafari : wrapperGeneric);
|
|
230
|
+
|
|
196
231
|
const bodyStyle = {
|
|
197
232
|
height: getHeight(),
|
|
198
|
-
willChange:
|
|
199
|
-
backfaceVisibility:
|
|
233
|
+
willChange: 'transform',
|
|
234
|
+
backfaceVisibility: 'hidden'
|
|
200
235
|
};
|
|
201
|
-
return
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
236
|
+
return /*#__PURE__*/jsxRuntime.jsx(Component, _objectSpread(_objectSpread({}, props), {}, {
|
|
237
|
+
innerRef: innerRef,
|
|
238
|
+
children: !isPlaceholderActive ? /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
239
|
+
className: "virtualized-body-wrapper",
|
|
240
|
+
style: wrapperStyle,
|
|
241
|
+
ref: elem => {
|
|
242
|
+
if (elem) {
|
|
243
|
+
if (helper.isSafari) {
|
|
244
|
+
setVirtualizedBodyRef(elem.parentElement); // eslint-disable-next-line no-param-reassign
|
|
245
|
+
|
|
246
|
+
elem.parentElement.scrollTop = scrollTop;
|
|
247
|
+
dsUtilities.mergeRefs(listProps.outerRef)(elem.parentElement);
|
|
248
|
+
} else {
|
|
249
|
+
setVirtualizedBodyRef(elem);
|
|
250
|
+
dsUtilities.mergeRefs(listProps.outerRef)(elem);
|
|
251
|
+
}
|
|
216
252
|
}
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
253
|
+
},
|
|
254
|
+
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
255
|
+
"data-testid": "virtualized-body",
|
|
256
|
+
className: "virtualized-body".concat(hasScrollBar ? ' with-scrollbar' : ''),
|
|
257
|
+
style: bodyStyle,
|
|
258
|
+
ref: r => {
|
|
259
|
+
dsUtilities.mergeRefs(innerBody)(r);
|
|
260
|
+
},
|
|
261
|
+
children: generateRenderedRows()
|
|
262
|
+
})
|
|
263
|
+
}) : /*#__PURE__*/_jsx__default["default"](NoResults, {
|
|
264
|
+
innerRef: innerRef,
|
|
265
|
+
rowRenderer: rowRenderer
|
|
266
|
+
}, void 0, noResultsPlaceholder)
|
|
267
|
+
}));
|
|
230
268
|
};
|
|
269
|
+
|
|
231
270
|
VirtualizedBody.defaultProps = {
|
|
232
271
|
rows: [],
|
|
233
272
|
overscanCount: 10
|
|
234
273
|
};
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
columns: import_prop_types.default.arrayOf(import_prop_types.default.shape({})),
|
|
238
|
-
component: import_prop_types.default.element,
|
|
239
|
-
expandable: import_prop_types.default.bool,
|
|
240
|
-
filters: import_prop_types.default.any,
|
|
241
|
-
innerRef: import_prop_types.default.any,
|
|
242
|
-
innerBody: import_prop_types.default.any,
|
|
243
|
-
isPlaceholderActive: import_prop_types.default.bool,
|
|
244
|
-
listProps: import_prop_types.default.shape({
|
|
245
|
-
itemSize: import_prop_types.default.func,
|
|
246
|
-
outerRef: import_prop_types.default.any
|
|
247
|
-
}),
|
|
248
|
-
noResultsPlaceholder: import_prop_types.default.oneOf([import_prop_types.default.string, import_prop_types.default.element]),
|
|
249
|
-
overscanCount: import_prop_types.default.number,
|
|
250
|
-
rows: import_prop_types.default.arrayOf(import_prop_types.default.shape({})),
|
|
251
|
-
rowHeight: import_prop_types.default.number,
|
|
252
|
-
rowKey: import_prop_types.default.string,
|
|
253
|
-
rowRenderer: import_prop_types.default.element,
|
|
254
|
-
rowSize: import_prop_types.default.any,
|
|
255
|
-
setHasScroll: import_prop_types.default.func
|
|
256
|
-
};
|
|
257
|
-
var VirtualizedBody_default = VirtualizedBody;
|
|
258
|
-
module.exports = __toCommonJS(VirtualizedBody_exports);
|
|
259
|
-
//# sourceMappingURL=VirtualizedBody.js.map
|
|
274
|
+
|
|
275
|
+
module.exports = VirtualizedBody;
|