@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,12 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} from
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
|
+
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
7
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
8
|
+
import { useState, useEffect, useMemo } from 'react';
|
|
9
|
+
import { v4 } from 'uuid';
|
|
10
|
+
import { parseFiltersToQuery, getFilterValue, buildFilterArray } from './helper.js';
|
|
11
|
+
|
|
12
|
+
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; }
|
|
13
|
+
|
|
14
|
+
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(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; }
|
|
15
|
+
|
|
9
16
|
const noop = () => null;
|
|
17
|
+
|
|
10
18
|
function useFilterableState(grid) {
|
|
11
19
|
const {
|
|
12
20
|
filters: filtersProp,
|
|
@@ -21,55 +29,70 @@ function useFilterableState(grid) {
|
|
|
21
29
|
setFilters(filtersProp);
|
|
22
30
|
}
|
|
23
31
|
}, [filtersProp]);
|
|
24
|
-
const queryFromFilters = useMemo(() => parseFiltersToQuery(filters || []), [
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const handleFiltersChange = (nextFilters) => {
|
|
32
|
+
const queryFromFilters = useMemo(() => parseFiltersToQuery(filters || []), [filters]);
|
|
33
|
+
|
|
34
|
+
const handleFiltersChange = nextFilters => {
|
|
28
35
|
const {
|
|
29
|
-
refs: {
|
|
36
|
+
refs: {
|
|
37
|
+
body
|
|
38
|
+
}
|
|
30
39
|
} = grid.getInstance();
|
|
31
40
|
body.current.scrollTop = 0;
|
|
32
41
|
setFilters(nextFilters);
|
|
33
|
-
grid.observeRows(
|
|
42
|
+
grid.observeRows(rows => onFiltersChange(nextFilters, queryFromFilters, rows));
|
|
34
43
|
};
|
|
44
|
+
|
|
35
45
|
const addFilter = (filter, column) => {
|
|
36
46
|
let hasBeenCalled = false;
|
|
37
|
-
|
|
38
|
-
|
|
47
|
+
|
|
48
|
+
const trimmedFilter = _objectSpread(_objectSpread({}, filter), {}, {
|
|
39
49
|
value: String(filter.value).trim()
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
|
|
50
|
+
});
|
|
51
|
+
/* eslint-disable indent */
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
const parsedFilter = !filter.group ? _objectSpread(_objectSpread({}, trimmedFilter), {}, {
|
|
43
55
|
value: String(filter.value).trim(),
|
|
44
|
-
group:
|
|
45
|
-
label:
|
|
46
|
-
id:
|
|
47
|
-
} : {
|
|
48
|
-
...trimmedFilter,
|
|
56
|
+
group: 'all',
|
|
57
|
+
label: 'All',
|
|
58
|
+
id: v4()
|
|
59
|
+
}) : _objectSpread(_objectSpread({}, trimmedFilter), {}, {
|
|
49
60
|
value: String(filter.value).trim(),
|
|
50
|
-
id:
|
|
61
|
+
id: v4(),
|
|
51
62
|
label: column && column.filterLabel || trimmedFilter.label,
|
|
52
63
|
originalProperty: column.originalProperty || column.property,
|
|
53
64
|
customValue: getFilterValue(trimmedFilter, column)
|
|
54
|
-
};
|
|
55
|
-
|
|
65
|
+
});
|
|
66
|
+
/* eslint-enable indent */
|
|
67
|
+
|
|
68
|
+
setFilters(prevFilters => {
|
|
69
|
+
// This was setted for an issue that was recalling this function on the handleFiltersChange
|
|
56
70
|
if (hasBeenCalled) {
|
|
57
71
|
return;
|
|
58
72
|
}
|
|
73
|
+
|
|
59
74
|
hasBeenCalled = true;
|
|
60
75
|
const nextFilters = buildFilterArray(parsedFilter, prevFilters);
|
|
61
|
-
handleFiltersChange(nextFilters
|
|
76
|
+
handleFiltersChange(nextFilters);
|
|
62
77
|
onAddFilter(parsedFilter, nextFilters, column);
|
|
63
78
|
});
|
|
64
79
|
};
|
|
65
|
-
|
|
80
|
+
|
|
81
|
+
const removeFilter = _ref => {
|
|
82
|
+
let {
|
|
83
|
+
group,
|
|
84
|
+
pill,
|
|
85
|
+
nextFilters
|
|
86
|
+
} = _ref;
|
|
66
87
|
onRemoveFilter(group, pill.value, nextFilters);
|
|
67
88
|
handleFiltersChange(nextFilters);
|
|
68
89
|
};
|
|
90
|
+
|
|
69
91
|
const removeAllFilters = () => {
|
|
70
92
|
onRemoveAllFilters();
|
|
71
93
|
handleFiltersChange([]);
|
|
72
94
|
};
|
|
95
|
+
|
|
73
96
|
return {
|
|
74
97
|
actions: {
|
|
75
98
|
addFilter,
|
|
@@ -82,7 +105,5 @@ function useFilterableState(grid) {
|
|
|
82
105
|
}
|
|
83
106
|
};
|
|
84
107
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
};
|
|
88
|
-
//# sourceMappingURL=useFilterableState.js.map
|
|
108
|
+
|
|
109
|
+
export { useFilterableState };
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.map.js';
|
|
3
|
+
import createInstancePlugin from '@elliemae/ds-shared/createDataInstance/createInstancePlugin';
|
|
4
|
+
import { groupBy } from 'lodash';
|
|
5
|
+
|
|
4
6
|
const groupedByData = (groupedBy, composedRows) => {
|
|
5
7
|
const grouped = groupBy(composedRows, groupedBy);
|
|
6
8
|
return Object.keys(grouped).map((c, key) => ({
|
|
7
|
-
id:
|
|
9
|
+
id: "grouped-by-".concat(groupedBy, "-").concat(key),
|
|
8
10
|
key: groupedBy,
|
|
9
11
|
value: c,
|
|
10
12
|
children: grouped[c],
|
|
@@ -12,17 +14,19 @@ const groupedByData = (groupedBy, composedRows) => {
|
|
|
12
14
|
isGroup: true
|
|
13
15
|
}));
|
|
14
16
|
};
|
|
15
|
-
|
|
17
|
+
|
|
18
|
+
const GroupingByPlugin = createInstancePlugin('groupedByRows', {
|
|
16
19
|
decorateGrid(grid) {
|
|
17
20
|
const {
|
|
18
21
|
composedRows,
|
|
19
|
-
props: {
|
|
22
|
+
props: {
|
|
23
|
+
groupedBy
|
|
24
|
+
}
|
|
20
25
|
} = grid.getInstance();
|
|
21
26
|
grid.composedRows = groupedBy ? groupedByData(groupedBy, composedRows) : composedRows;
|
|
22
27
|
return grid;
|
|
23
28
|
}
|
|
29
|
+
|
|
24
30
|
});
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
28
|
-
//# sourceMappingURL=GroupingByPlugin.js.map
|
|
31
|
+
|
|
32
|
+
export { GroupingByPlugin };
|
|
@@ -1,39 +1,65 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
3
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
4
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
5
|
+
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
6
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
7
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
8
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
9
|
+
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
10
|
+
import 'core-js/modules/esnext.iterator.map.js';
|
|
11
|
+
import 'core-js/modules/esnext.async-iterator.reduce.js';
|
|
12
|
+
import 'core-js/modules/esnext.iterator.reduce.js';
|
|
13
|
+
import { useMemo } from 'react';
|
|
14
|
+
import createInstancePlugin from '@elliemae/ds-shared/createDataInstance/createInstancePlugin';
|
|
15
|
+
import { aggregatedClasses } from '@elliemae/ds-classnames';
|
|
16
|
+
import { VariableSizeList } from 'react-window';
|
|
17
|
+
import { walkTreeStrategy } from './walkStrategy.js';
|
|
18
|
+
import { RowSizes } from '../../rowSizes.js';
|
|
19
|
+
import { dataGridBlockName } from '../../blockNames.js';
|
|
20
|
+
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
21
|
+
|
|
22
|
+
const _excluded = ["isExpanded"];
|
|
23
|
+
|
|
24
|
+
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; }
|
|
25
|
+
|
|
26
|
+
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(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; }
|
|
27
|
+
const blockName = "".concat(dataGridBlockName, "-group-row-header");
|
|
28
|
+
const GroupRowHeaderWrapper = aggregatedClasses('div')(blockName);
|
|
29
|
+
const GroupRowHeaderTitle = aggregatedClasses('div')(blockName, 'title');
|
|
30
|
+
const GroupingPlugin = createInstancePlugin('groupedRows', {
|
|
13
31
|
decorateGrid(grid) {
|
|
14
|
-
const {
|
|
15
|
-
|
|
16
|
-
|
|
32
|
+
const {
|
|
33
|
+
columns,
|
|
34
|
+
composedRows
|
|
35
|
+
} = grid.getInstance(); // eslint-disable-next-line react-hooks/rules-of-hooks
|
|
36
|
+
|
|
37
|
+
const detailColumns = useMemo(() => columns.map(column => _objectSpread(_objectSpread({}, column), {}, {
|
|
17
38
|
customRenderer: column.detailCustomRenderer
|
|
18
|
-
})).filter(
|
|
39
|
+
})).filter(col => !col.expandableColumn), [columns]);
|
|
19
40
|
const flatRows = [];
|
|
20
41
|
walkTreeStrategy({
|
|
21
42
|
data: composedRows,
|
|
22
|
-
cb:
|
|
43
|
+
cb: n => flatRows.push(n)
|
|
23
44
|
});
|
|
24
45
|
return {
|
|
25
46
|
detailColumns,
|
|
26
47
|
composedRows: flatRows
|
|
27
48
|
};
|
|
28
49
|
},
|
|
50
|
+
|
|
29
51
|
getBodyProps(bodyProps, grid) {
|
|
30
|
-
const {
|
|
31
|
-
|
|
52
|
+
const {
|
|
53
|
+
composedRows: rows
|
|
54
|
+
} = grid.getInstance(); // implementation of expandable row single column with aggregation
|
|
55
|
+
|
|
56
|
+
const getItemSize = index => {
|
|
32
57
|
const rowData = rows[index];
|
|
33
|
-
if (!rowData)
|
|
34
|
-
return RowSizes.normal;
|
|
58
|
+
if (!rowData) return RowSizes.normal;
|
|
35
59
|
return rowData._isGroup || rowData.isGroup ? RowSizes.compact : RowSizes.normal;
|
|
36
|
-
};
|
|
60
|
+
}; // eslint-disable-next-line no-unused-vars
|
|
61
|
+
|
|
62
|
+
|
|
37
63
|
const getListHeight = () => {
|
|
38
64
|
const size = rows.reduce((h, r) => {
|
|
39
65
|
const rowHeight = r._isGroup || r.isGroup ? RowSizes.compact : RowSizes.normal;
|
|
@@ -41,57 +67,72 @@ const GroupingPlugin = createInstancePlugin("groupedRows", {
|
|
|
41
67
|
}, 0);
|
|
42
68
|
return size;
|
|
43
69
|
};
|
|
44
|
-
|
|
45
|
-
|
|
70
|
+
|
|
71
|
+
return _objectSpread(_objectSpread({}, bodyProps), {}, {
|
|
46
72
|
getListHeight,
|
|
47
73
|
listComponent: VariableSizeList,
|
|
48
|
-
listProps: {
|
|
49
|
-
|
|
74
|
+
listProps: {
|
|
75
|
+
itemSize: getItemSize
|
|
76
|
+
}
|
|
77
|
+
});
|
|
50
78
|
},
|
|
79
|
+
|
|
51
80
|
composeRows: (rows, grid) => {
|
|
52
81
|
const {
|
|
53
82
|
composedRows,
|
|
54
|
-
props: {
|
|
83
|
+
props: {
|
|
84
|
+
rowKey
|
|
85
|
+
}
|
|
55
86
|
} = grid.getInstance();
|
|
87
|
+
|
|
56
88
|
if (Array.isArray(rows)) {
|
|
57
|
-
const filterIds = rows.map(
|
|
58
|
-
return composedRows.filter(
|
|
59
|
-
|
|
60
|
-
children: Array.isArray(r.data.children) ? r.data.children.filter((c) => filterIds.includes(c[rowKey])) : r.data.children,
|
|
89
|
+
const filterIds = rows.map(r => r.data[rowKey]);
|
|
90
|
+
return composedRows.filter(c => filterIds.includes(c.data[rowKey])).map(r => _objectSpread(_objectSpread({}, r.data), {}, {
|
|
91
|
+
children: Array.isArray(r.data.children) ? r.data.children.filter(c => filterIds.includes(c[rowKey])) : r.data.children,
|
|
61
92
|
_isGroup: r.isGroup
|
|
62
|
-
})).filter(
|
|
93
|
+
})).filter(g => g.children === undefined || g.children.length > 0);
|
|
63
94
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
allRows: rows.allRows.map(
|
|
67
|
-
...r.data,
|
|
95
|
+
|
|
96
|
+
return _objectSpread(_objectSpread({}, rows), {}, {
|
|
97
|
+
allRows: rows.allRows.map(r => _objectSpread(_objectSpread({}, r.data), {}, {
|
|
68
98
|
_isGroup: r.isGroup
|
|
69
99
|
})),
|
|
70
|
-
rows: rows.rows.map(
|
|
71
|
-
...r.data,
|
|
100
|
+
rows: rows.rows.map(r => _objectSpread(_objectSpread({}, r.data), {}, {
|
|
72
101
|
_isGroup: r.isGroup
|
|
73
102
|
}))
|
|
74
|
-
};
|
|
103
|
+
});
|
|
75
104
|
},
|
|
105
|
+
|
|
76
106
|
decorateRenderers(renderers, grid) {
|
|
77
|
-
const Row = renderers.body.row;
|
|
78
|
-
|
|
79
|
-
|
|
107
|
+
const Row = renderers.body.row; // eslint-disable-next-line react-hooks/rules-of-hooks
|
|
108
|
+
|
|
109
|
+
renderers.body.row = useMemo(() => // eslint-disable-next-line react/display-name
|
|
110
|
+
// eslint-disable-next-line react/prop-types
|
|
111
|
+
_ref => {
|
|
112
|
+
let rowProps = _objectWithoutProperties(_ref, _excluded);
|
|
113
|
+
|
|
114
|
+
const {
|
|
115
|
+
composedRows
|
|
116
|
+
} = grid.getInstance(); // // https://jira.elliemae.io/browse/PUI-1667
|
|
117
|
+
|
|
80
118
|
const node = composedRows[rowProps.index] ? composedRows[rowProps.index] : rowProps.rowData;
|
|
81
|
-
const {
|
|
119
|
+
const {
|
|
120
|
+
groupedRowsRenderHeader
|
|
121
|
+
} = grid.props; // eslint-disable-next-line no-underscore-dangle
|
|
122
|
+
|
|
82
123
|
if (node && node._isGroup) {
|
|
83
|
-
return
|
|
84
|
-
|
|
85
|
-
|
|
124
|
+
return /*#__PURE__*/jsx(Fragment, {
|
|
125
|
+
children: /*#__PURE__*/jsx(GroupRowHeaderWrapper, _objectSpread(_objectSpread({}, rowProps), {}, {
|
|
126
|
+
children: /*#__PURE__*/_jsx(GroupRowHeaderTitle, {}, void 0, groupedRowsRenderHeader ? groupedRowsRenderHeader(node) : 'Group')
|
|
127
|
+
}))
|
|
128
|
+
});
|
|
86
129
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
});
|
|
130
|
+
|
|
131
|
+
return /*#__PURE__*/jsx(Row, _objectSpread({}, rowProps));
|
|
90
132
|
}, []);
|
|
91
133
|
return renderers;
|
|
92
134
|
}
|
|
135
|
+
|
|
93
136
|
});
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
};
|
|
97
|
-
//# sourceMappingURL=GroupingPlugin.js.map
|
|
137
|
+
|
|
138
|
+
export { GroupingPlugin };
|
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
import
|
|
1
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
2
|
+
|
|
2
3
|
function getPath(parentNode, index, childrenKey) {
|
|
3
|
-
if (!parentNode)
|
|
4
|
-
return [index];
|
|
4
|
+
if (!parentNode) return [index];
|
|
5
5
|
return [...parentNode.path, childrenKey, index];
|
|
6
6
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
|
|
8
|
+
function walkTreeStrategy(_ref) {
|
|
9
|
+
let {
|
|
10
|
+
data,
|
|
11
|
+
childrenKey = 'children',
|
|
12
|
+
level = 0,
|
|
13
|
+
getId = item => item.id,
|
|
14
|
+
parentNode,
|
|
15
|
+
shouldWalkChildren = () => true,
|
|
16
|
+
cb
|
|
17
|
+
} = _ref;
|
|
18
|
+
|
|
19
|
+
// eslint-disable-next-line no-loops/no-loops,no-plusplus
|
|
16
20
|
for (let i = 0; i < data.length; i++) {
|
|
17
21
|
const currLevel = level + 1;
|
|
18
22
|
const children = data[i][childrenKey];
|
|
@@ -26,10 +30,13 @@ function walkTreeStrategy({
|
|
|
26
30
|
nestingLevel: currLevel,
|
|
27
31
|
parentNode: parentNode || {
|
|
28
32
|
isGroup: true,
|
|
29
|
-
data: {
|
|
33
|
+
data: {
|
|
34
|
+
children: data
|
|
35
|
+
}
|
|
30
36
|
}
|
|
31
37
|
};
|
|
32
38
|
cb(node);
|
|
39
|
+
|
|
33
40
|
if (shouldWalkChildren(node) && children && children.length) {
|
|
34
41
|
walkTreeStrategy({
|
|
35
42
|
data: children,
|
|
@@ -41,7 +48,5 @@ function walkTreeStrategy({
|
|
|
41
48
|
}
|
|
42
49
|
}
|
|
43
50
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
};
|
|
47
|
-
//# sourceMappingURL=walkStrategy.js.map
|
|
51
|
+
|
|
52
|
+
export { walkTreeStrategy };
|
package/esm/plugins/index.js
CHANGED
|
@@ -1,39 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
export {
|
|
19
|
-
|
|
20
|
-
ColumnSizingPlugin,
|
|
21
|
-
ComboBox,
|
|
22
|
-
CustomRendererPlugin,
|
|
23
|
-
DndColumnsPlugin,
|
|
24
|
-
DndRowsPlugin,
|
|
25
|
-
EditablePlugin,
|
|
26
|
-
ExpandableColumn,
|
|
27
|
-
ExpandablePlugin,
|
|
28
|
-
ExportDataPlugin,
|
|
29
|
-
FilterablePlugin,
|
|
30
|
-
InfiniteScrollPlugin,
|
|
31
|
-
PaginationPlugin,
|
|
32
|
-
ResizablePlugin,
|
|
33
|
-
SelectablePlugin,
|
|
34
|
-
SortablePlugin,
|
|
35
|
-
TextBox,
|
|
36
|
-
ToolbarPlugin,
|
|
37
|
-
VirtualizationPlugin
|
|
38
|
-
};
|
|
39
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export { BodyHeaderScrollSyncPlugin } from './body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js';
|
|
2
|
+
export { DndColumnsPlugin } from './column-dnd/DndColumnsPlugin.js';
|
|
3
|
+
export { ColumnSizingPlugin } from './column-sizing/ColumnSizingPlugin.js';
|
|
4
|
+
export { CustomRendererPlugin } from './custom-cell-renderer/CustomRendererPlugin.js';
|
|
5
|
+
export { EditablePlugin } from './editable/EditablePlugin.js';
|
|
6
|
+
export { default as ComboBox } from './editable/EditableComponents/ComboBox.js';
|
|
7
|
+
export { default as TextBox } from './editable/EditableComponents/TextBox.js';
|
|
8
|
+
export { ExpandablePlugin } from './expandable-grid/ExpandablePlugin.js';
|
|
9
|
+
export { default as ExpandableColumn } from './expandable-grid/ExpandableColumn.js';
|
|
10
|
+
export { FilterablePlugin } from './filterable/FilterablePlugin.js';
|
|
11
|
+
export { InfiniteScrollPlugin } from './infinite-scrolling/InfiniteScrollPlugin.js';
|
|
12
|
+
export { PaginationPlugin } from './pagination/PaginationPlugin.js';
|
|
13
|
+
export { ResizablePlugin } from './resizable/ResizablePlugin.js';
|
|
14
|
+
export { DndRowsPlugin } from './row-dnd/DndRowsPlugin.js';
|
|
15
|
+
export { SelectablePlugin } from './selectable/SelectablePlugin.js';
|
|
16
|
+
export { SortablePlugin } from './sortable/SortablePlugin.js';
|
|
17
|
+
export { ToolbarPlugin } from './toolbar/ToolbarPlugin.js';
|
|
18
|
+
export { ExportDataPlugin, getColumnValue, getExportedData, getVisibleRowData } from './export-data/ExportDataPlugin.js';
|
|
19
|
+
export { VirtualizationPlugin } from './virtualization/VirtualizationPlugin.js';
|
|
@@ -1,71 +1,114 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
3
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
6
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
7
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
8
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
9
|
+
import { useRef, useState, useEffect } from 'react';
|
|
10
|
+
import createInstancePlugin from '@elliemae/ds-shared/createDataInstance/createInstancePlugin';
|
|
11
|
+
|
|
12
|
+
const _excluded = ["children"];
|
|
13
|
+
|
|
14
|
+
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; }
|
|
15
|
+
|
|
16
|
+
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(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; }
|
|
17
|
+
|
|
18
|
+
const registerStateHook = grid => {
|
|
5
19
|
const {
|
|
6
|
-
props: {
|
|
7
|
-
|
|
20
|
+
props: {
|
|
21
|
+
getData,
|
|
22
|
+
onInfiniteScrolling = () => null
|
|
23
|
+
},
|
|
24
|
+
actions: {
|
|
25
|
+
updateRows
|
|
26
|
+
}
|
|
8
27
|
} = grid;
|
|
9
28
|
const loading = useRef(false);
|
|
10
|
-
|
|
29
|
+
|
|
30
|
+
const addMoreData = function () {
|
|
31
|
+
let data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
11
32
|
loading.current = false;
|
|
12
|
-
updateRows(
|
|
33
|
+
updateRows(prevRows => prevRows.concat(data || []));
|
|
13
34
|
};
|
|
14
|
-
|
|
35
|
+
|
|
36
|
+
const doLoadData = async currentRows => {
|
|
15
37
|
loading.current = true;
|
|
16
38
|
return Promise.resolve(getData(currentRows)).then(addMoreData);
|
|
17
39
|
};
|
|
18
|
-
|
|
40
|
+
|
|
41
|
+
const loadMoreData = currentRows => {
|
|
19
42
|
onInfiniteScrolling(currentRows);
|
|
20
|
-
if (loading.current || !getData)
|
|
21
|
-
return;
|
|
43
|
+
if (loading.current || !getData) return;
|
|
22
44
|
doLoadData(currentRows);
|
|
23
45
|
};
|
|
46
|
+
|
|
24
47
|
return {
|
|
25
48
|
actions: {
|
|
26
49
|
loadMoreData
|
|
27
50
|
}
|
|
28
51
|
};
|
|
29
52
|
};
|
|
30
|
-
|
|
31
|
-
|
|
53
|
+
|
|
54
|
+
const getBodyProps = (_ref, grid) => {
|
|
55
|
+
let props = _objectWithoutProperties(_ref, _excluded);
|
|
56
|
+
|
|
57
|
+
const {
|
|
58
|
+
loadMoreData
|
|
59
|
+
} = grid.getInstance().actions;
|
|
32
60
|
const [bodyNode, setBodyRef] = useState();
|
|
33
61
|
const prevScroll = useRef();
|
|
34
62
|
prevScroll.current = 0;
|
|
63
|
+
|
|
35
64
|
const handleBodyScroll = (event, s) => {
|
|
36
|
-
const {
|
|
37
|
-
|
|
38
|
-
|
|
65
|
+
const {
|
|
66
|
+
target
|
|
67
|
+
} = event;
|
|
68
|
+
const {
|
|
69
|
+
scrollHeight,
|
|
70
|
+
scrollTop,
|
|
71
|
+
offsetHeight,
|
|
72
|
+
scrollLeft
|
|
73
|
+
} = target;
|
|
74
|
+
const {
|
|
75
|
+
composedRows
|
|
76
|
+
} = grid.getInstance(); // prevent horizontal scroll triggering infinite scrolling callbacks
|
|
77
|
+
|
|
39
78
|
if (prevScroll.current !== scrollLeft) {
|
|
40
79
|
prevScroll.current = scrollLeft;
|
|
41
80
|
return;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
81
|
+
} // todo: clean this. Better approach using another component for the infinite scroll
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
if (bodyNode !== target) return;
|
|
85
|
+
|
|
45
86
|
if (scrollTop + offsetHeight >= scrollHeight - 1) {
|
|
46
87
|
loadMoreData(composedRows);
|
|
47
88
|
}
|
|
48
89
|
};
|
|
90
|
+
|
|
49
91
|
useEffect(() => {
|
|
50
92
|
if (bodyNode) {
|
|
51
|
-
bodyNode.addEventListener(
|
|
93
|
+
bodyNode.addEventListener('scroll', handleBodyScroll);
|
|
52
94
|
}
|
|
95
|
+
|
|
53
96
|
return () => {
|
|
54
97
|
if (bodyNode) {
|
|
55
|
-
bodyNode.removeEventListener(
|
|
98
|
+
bodyNode.removeEventListener('scroll', handleBodyScroll);
|
|
56
99
|
}
|
|
57
100
|
};
|
|
58
101
|
}, [bodyNode]);
|
|
59
|
-
return {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
102
|
+
return _objectSpread(_objectSpread({}, props), {}, {
|
|
103
|
+
listProps: {
|
|
104
|
+
outerRef: setBodyRef
|
|
105
|
+
}
|
|
106
|
+
});
|
|
63
107
|
};
|
|
64
|
-
|
|
108
|
+
|
|
109
|
+
const InfiniteScrollPlugin = createInstancePlugin('infinite-scroll', {
|
|
65
110
|
registerStateHook,
|
|
66
111
|
getBodyProps
|
|
67
112
|
});
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
};
|
|
71
|
-
//# sourceMappingURL=InfiniteScrollPlugin.js.map
|
|
113
|
+
|
|
114
|
+
export { InfiniteScrollPlugin };
|