@elliemae/ds-datagrids 2.3.0-alpha.8 → 2.3.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 +639 -0
- package/cjs/DataGridImpl.js +169 -0
- package/cjs/PaginatedDataGrid.js +77 -0
- package/cjs/blockNames.js +11 -0
- package/cjs/columns/IconColumn.js +95 -0
- package/cjs/columns/NumberColumn.js +6 -0
- package/cjs/components/BodyCell.js +101 -0
- package/cjs/components/BodyList.js +54 -0
- package/cjs/components/ColumnVisibilityMenuOption.js +44 -0
- package/cjs/components/ColumnsOptionsMenuSection.js +49 -0
- package/cjs/components/EmptyState.js +51 -0
- package/cjs/components/HeaderCell.js +70 -0
- package/cjs/components/List.js +32 -0
- package/cjs/components/ListItem.js +44 -0
- package/cjs/components/NoResults.js +51 -0
- package/cjs/components/RowsLoader.js +22 -0
- package/cjs/components/Table.js +122 -0
- package/cjs/components/TableBody.js +69 -0
- package/cjs/components/TableHeader.js +37 -0
- package/cjs/components/footer/addOptionalFooterComponents.js +46 -0
- package/cjs/components/header/PrimaryControls.js +36 -0
- package/cjs/components/header/addOptionalHeaderComponents.js +47 -0
- package/cjs/components/index.js +17 -0
- package/cjs/components/renderers/defaultClassedRenderers.js +59 -0
- package/cjs/components/renderers/index.js +23 -0
- package/cjs/components/renderers/renderRowsLoader.js +18 -0
- package/cjs/components/tableContext.js +13 -0
- package/cjs/defaultPlugins.js +12 -0
- package/cjs/index.js +67 -0
- package/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +143 -0
- package/cjs/plugins/body-header-scroll-sync/index.js +9 -0
- package/cjs/plugins/column-dnd/DndColumnsPlugin.js +134 -0
- package/cjs/plugins/column-dnd/decorateGridWithDndColumns.js +30 -0
- package/cjs/plugins/column-dnd/index.js +9 -0
- package/cjs/plugins/column-sizing/ColumnSizingPlugin.js +88 -0
- package/cjs/plugins/column-sizing/columnMeasurerTransformer.js +74 -0
- package/cjs/plugins/column-sizing/ext-points/decorateColumn.js +17 -0
- package/cjs/plugins/column-sizing/ext-points/getTableProps.js +63 -0
- package/cjs/plugins/column-sizing/getColumnNameFromProperty.js +9 -0
- package/cjs/plugins/column-sizing/index.js +9 -0
- package/cjs/plugins/column-sizing/useColumnSizeService.js +162 -0
- package/cjs/plugins/column-sizing/useStylesheetHelpers.js +270 -0
- package/cjs/plugins/column-sizing/utils.js +45 -0
- package/cjs/plugins/custom-cell-renderer/CustomRendererPlugin.js +18 -0
- package/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js +72 -0
- package/cjs/plugins/custom-cell-renderer/getRendererComponent.js +65 -0
- package/cjs/plugins/custom-cell-renderer/index.js +9 -0
- package/cjs/plugins/editable/EditableComponents/ComboBox.js +71 -0
- package/cjs/plugins/editable/EditableComponents/TextBox.js +110 -0
- package/cjs/plugins/editable/EditableComponents/index.js +11 -0
- package/cjs/plugins/editable/EditablePlugin.js +123 -0
- package/cjs/plugins/editable/decorateEditable.js +122 -0
- package/cjs/plugins/editable/getEditorComponent.js +82 -0
- package/cjs/plugins/editable/index.js +13 -0
- package/cjs/plugins/expandable-grid/ExpandableColumn.js +156 -0
- package/cjs/plugins/expandable-grid/ExpandablePlugin.js +243 -0
- package/cjs/plugins/expandable-grid/ExpandedRow.js +156 -0
- package/cjs/plugins/expandable-grid/ExpandedRowExtra.js +54 -0
- package/cjs/plugins/expandable-grid/index.js +11 -0
- package/cjs/plugins/expandable-grid/useExpandGridState.js +79 -0
- package/cjs/plugins/export-data/ExportDataPlugin.js +168 -0
- package/cjs/plugins/export-data/index.js +12 -0
- package/cjs/plugins/filterable/FilterablePlugin.js +81 -0
- package/cjs/plugins/filterable/addFilterToColumn.js +31 -0
- package/cjs/plugins/filterable/components/FilterableHeader.js +120 -0
- package/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +157 -0
- package/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +107 -0
- package/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +195 -0
- package/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js +174 -0
- package/cjs/plugins/filterable/components/filterable-menus/defaultDateFormat.js +7 -0
- package/cjs/plugins/filterable/components/filterable-menus/getFilterMenuByType.js +18 -0
- package/cjs/plugins/filterable/filterableFormatter.js +63 -0
- package/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js +74 -0
- package/cjs/plugins/filterable/filtering-helper/strategiesOperators.js +23 -0
- package/cjs/plugins/filterable/helper.js +120 -0
- package/cjs/plugins/filterable/index.js +9 -0
- package/cjs/plugins/filterable/useFilterableState.js +117 -0
- package/cjs/plugins/grouping-by/GroupingByPlugin.js +40 -0
- package/cjs/plugins/grouping-grid/GroupingPlugin.js +149 -0
- package/cjs/plugins/grouping-grid/walkStrategy.js +56 -0
- package/cjs/plugins/index.js +48 -0
- package/cjs/plugins/infinite-scrolling/InfiniteScrollPlugin.js +124 -0
- package/cjs/plugins/infinite-scrolling/index.js +9 -0
- package/cjs/plugins/pagination/PaginationPlugin.js +109 -0
- package/cjs/plugins/pagination/components/Pagination.js +44 -0
- package/cjs/plugins/pagination/components/Paginator.js +67 -0
- package/cjs/plugins/pagination/components/PerPageDropdown.js +80 -0
- package/cjs/plugins/pagination/helper.js +41 -0
- package/cjs/plugins/pagination/index.js +9 -0
- package/cjs/plugins/pagination/usePaginationState.js +74 -0
- package/cjs/plugins/resizable/ResizablePlugin.js +113 -0
- package/cjs/plugins/resizable/decorateResizable.js +60 -0
- package/cjs/plugins/resizable/index.js +9 -0
- package/cjs/plugins/resizable/useResizeHandle.js +73 -0
- package/cjs/plugins/resizable/utils.js +33 -0
- package/cjs/plugins/row-dnd/DndRowsPlugin.js +115 -0
- package/cjs/plugins/row-dnd/index.js +9 -0
- package/cjs/plugins/selectable/SelectablePlugin.js +199 -0
- package/cjs/plugins/selectable/addSelectableColumn.js +93 -0
- package/cjs/plugins/selectable/helper.js +43 -0
- package/cjs/plugins/selectable/index.js +9 -0
- package/cjs/plugins/selectable/selectableFormatter.js +115 -0
- package/cjs/plugins/selectable/useSelectableState.js +143 -0
- package/cjs/plugins/sortable/SortablePlugin.js +109 -0
- package/cjs/plugins/sortable/checkIfSortable.js +22 -0
- package/cjs/plugins/sortable/index.js +9 -0
- package/cjs/plugins/sortable/sortHeaderFormatter.js +60 -0
- package/cjs/plugins/sortable/sortTree.js +51 -0
- package/cjs/plugins/sortable/sorter.js +176 -0
- package/cjs/plugins/sortable/useSortableState.js +99 -0
- package/cjs/plugins/toolbar/RowRenderer.js +97 -0
- package/cjs/plugins/toolbar/ToolbarPlugin.js +42 -0
- package/cjs/plugins/toolbar/ToolbarTrigger.js +86 -0
- package/cjs/plugins/toolbar/index.js +9 -0
- package/cjs/plugins/virtualization/AutoHeightList.js +59 -0
- package/cjs/plugins/virtualization/VirtualizationPlugin.js +108 -0
- package/cjs/plugins/virtualization/VirtualizedBody.js +275 -0
- package/cjs/plugins/virtualization/VirtualizedBodyRow.js +30 -0
- package/cjs/plugins/virtualization/helper.js +7 -0
- package/cjs/plugins/virtualization/index.js +9 -0
- package/cjs/renders/CellWithAddons.js +63 -0
- package/cjs/renders/index.js +11 -0
- package/cjs/renders/styled.js +27 -0
- package/cjs/rowSizes.js +19 -0
- package/cjs/utilities/getPluginsFromProps.js +44 -0
- package/cjs/utilities/getScrollbarSize.js +27 -0
- package/cjs/utilities/normalizeData.js +39 -0
- package/esm/DSDataGrid.js +630 -0
- package/esm/DataGridImpl.js +160 -0
- package/esm/PaginatedDataGrid.js +68 -0
- package/esm/blockNames.js +5 -0
- package/esm/columns/IconColumn.js +87 -0
- package/esm/columns/NumberColumn.js +4 -0
- package/esm/components/BodyCell.js +92 -0
- package/esm/components/BodyList.js +45 -0
- package/esm/components/ColumnVisibilityMenuOption.js +40 -0
- package/esm/components/ColumnsOptionsMenuSection.js +43 -0
- package/esm/components/EmptyState.js +41 -0
- package/esm/components/HeaderCell.js +62 -0
- package/esm/components/List.js +26 -0
- package/esm/components/ListItem.js +38 -0
- package/esm/components/NoResults.js +43 -0
- package/esm/components/RowsLoader.js +15 -0
- package/esm/components/Table.js +115 -0
- package/esm/components/TableBody.js +61 -0
- package/esm/components/TableHeader.js +31 -0
- package/esm/components/footer/addOptionalFooterComponents.js +40 -0
- package/esm/components/header/PrimaryControls.js +30 -0
- package/esm/components/header/addOptionalHeaderComponents.js +40 -0
- package/esm/components/index.js +5 -0
- package/esm/components/renderers/defaultClassedRenderers.js +46 -0
- package/esm/components/renderers/index.js +18 -0
- package/esm/components/renderers/renderRowsLoader.js +10 -0
- package/esm/components/tableContext.js +5 -0
- package/esm/defaultPlugins.js +8 -0
- package/esm/index.js +27 -0
- package/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +132 -0
- package/esm/plugins/body-header-scroll-sync/index.js +1 -0
- package/esm/plugins/column-dnd/DndColumnsPlugin.js +125 -0
- package/esm/plugins/column-dnd/decorateGridWithDndColumns.js +22 -0
- package/esm/plugins/column-dnd/index.js +1 -0
- package/esm/plugins/column-sizing/ColumnSizingPlugin.js +80 -0
- package/esm/plugins/column-sizing/columnMeasurerTransformer.js +66 -0
- package/esm/plugins/column-sizing/ext-points/decorateColumn.js +13 -0
- package/esm/plugins/column-sizing/ext-points/getTableProps.js +55 -0
- package/esm/plugins/column-sizing/getColumnNameFromProperty.js +7 -0
- package/esm/plugins/column-sizing/index.js +1 -0
- package/esm/plugins/column-sizing/useColumnSizeService.js +156 -0
- package/esm/plugins/column-sizing/useStylesheetHelpers.js +245 -0
- package/esm/plugins/column-sizing/utils.js +37 -0
- package/esm/plugins/custom-cell-renderer/CustomRendererPlugin.js +10 -0
- package/esm/plugins/custom-cell-renderer/addCustomRendererToCell.js +63 -0
- package/esm/plugins/custom-cell-renderer/getRendererComponent.js +56 -0
- package/esm/plugins/custom-cell-renderer/index.js +1 -0
- package/esm/plugins/editable/EditableComponents/ComboBox.js +65 -0
- package/esm/plugins/editable/EditableComponents/TextBox.js +103 -0
- package/esm/plugins/editable/EditableComponents/index.js +2 -0
- package/esm/plugins/editable/EditablePlugin.js +115 -0
- package/esm/plugins/editable/decorateEditable.js +92 -0
- package/esm/plugins/editable/getEditorComponent.js +74 -0
- package/esm/plugins/editable/index.js +3 -0
- package/esm/plugins/expandable-grid/ExpandableColumn.js +146 -0
- package/esm/plugins/expandable-grid/ExpandablePlugin.js +231 -0
- package/esm/plugins/expandable-grid/ExpandedRow.js +143 -0
- package/esm/plugins/expandable-grid/ExpandedRowExtra.js +46 -0
- package/esm/plugins/expandable-grid/index.js +2 -0
- package/esm/plugins/expandable-grid/useExpandGridState.js +75 -0
- package/esm/plugins/export-data/ExportDataPlugin.js +156 -0
- package/esm/plugins/export-data/index.js +1 -0
- package/esm/plugins/filterable/FilterablePlugin.js +73 -0
- package/esm/plugins/filterable/addFilterToColumn.js +23 -0
- package/esm/plugins/filterable/components/FilterableHeader.js +113 -0
- package/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +148 -0
- package/esm/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +97 -0
- package/esm/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +184 -0
- package/esm/plugins/filterable/components/filterable-menus/TextFilterMenu.js +163 -0
- package/esm/plugins/filterable/components/filterable-menus/defaultDateFormat.js +3 -0
- package/esm/plugins/filterable/components/filterable-menus/getFilterMenuByType.js +16 -0
- package/esm/plugins/filterable/filterableFormatter.js +57 -0
- package/esm/plugins/filterable/filtering-helper/filterRowsByQuery.js +65 -0
- package/esm/plugins/filterable/filtering-helper/strategiesOperators.js +17 -0
- package/esm/plugins/filterable/helper.js +106 -0
- package/esm/plugins/filterable/index.js +1 -0
- package/esm/plugins/filterable/useFilterableState.js +109 -0
- package/esm/plugins/grouping-by/GroupingByPlugin.js +32 -0
- package/esm/plugins/grouping-grid/GroupingPlugin.js +138 -0
- package/esm/plugins/grouping-grid/walkStrategy.js +52 -0
- package/esm/plugins/index.js +19 -0
- package/esm/plugins/infinite-scrolling/InfiniteScrollPlugin.js +114 -0
- package/esm/plugins/infinite-scrolling/index.js +1 -0
- package/esm/plugins/pagination/PaginationPlugin.js +96 -0
- package/esm/plugins/pagination/components/Pagination.js +36 -0
- package/esm/plugins/pagination/components/Paginator.js +59 -0
- package/esm/plugins/pagination/components/PerPageDropdown.js +71 -0
- package/esm/plugins/pagination/helper.js +36 -0
- package/esm/plugins/pagination/index.js +1 -0
- package/esm/plugins/pagination/usePaginationState.js +66 -0
- package/esm/plugins/resizable/ResizablePlugin.js +105 -0
- package/esm/plugins/resizable/decorateResizable.js +49 -0
- package/esm/plugins/resizable/index.js +1 -0
- package/esm/plugins/resizable/useResizeHandle.js +65 -0
- package/esm/plugins/resizable/utils.js +23 -0
- package/esm/plugins/row-dnd/DndRowsPlugin.js +105 -0
- package/esm/plugins/row-dnd/index.js +1 -0
- package/esm/plugins/selectable/SelectablePlugin.js +190 -0
- package/esm/plugins/selectable/addSelectableColumn.js +84 -0
- package/esm/plugins/selectable/helper.js +31 -0
- package/esm/plugins/selectable/index.js +1 -0
- package/esm/plugins/selectable/selectableFormatter.js +107 -0
- package/esm/plugins/selectable/useSelectableState.js +135 -0
- package/esm/plugins/sortable/SortablePlugin.js +82 -0
- package/esm/plugins/sortable/checkIfSortable.js +17 -0
- package/esm/plugins/sortable/index.js +1 -0
- package/esm/plugins/sortable/sortHeaderFormatter.js +53 -0
- package/esm/plugins/sortable/sortTree.js +26 -0
- package/esm/plugins/sortable/sorter.js +166 -0
- package/esm/plugins/sortable/useSortableState.js +71 -0
- package/esm/plugins/toolbar/RowRenderer.js +88 -0
- package/esm/plugins/toolbar/ToolbarPlugin.js +33 -0
- package/esm/plugins/toolbar/ToolbarTrigger.js +74 -0
- package/esm/plugins/toolbar/index.js +1 -0
- package/esm/plugins/virtualization/AutoHeightList.js +52 -0
- package/esm/plugins/virtualization/VirtualizationPlugin.js +97 -0
- package/esm/plugins/virtualization/VirtualizedBody.js +268 -0
- package/esm/plugins/virtualization/VirtualizedBodyRow.js +28 -0
- package/esm/plugins/virtualization/helper.js +3 -0
- package/esm/plugins/virtualization/index.js +1 -0
- package/esm/renders/CellWithAddons.js +53 -0
- package/esm/renders/index.js +2 -0
- package/esm/renders/styled.js +16 -0
- package/esm/rowSizes.js +13 -0
- package/esm/utilities/getPluginsFromProps.js +42 -0
- package/esm/utilities/getScrollbarSize.js +23 -0
- package/esm/utilities/normalizeData.js +29 -0
- package/package.json +288 -290
- package/types/DSDataGrid.d.ts +863 -0
- package/types/DataGridImpl.d.ts +12 -0
- package/types/PaginatedDataGrid.d.ts +16 -0
- package/types/blockNames.d.ts +4 -0
- package/types/columns/IconColumn.d.ts +35 -0
- package/types/columns/NumberColumn.d.ts +4 -0
- package/types/components/BodyCell.d.ts +33 -0
- package/types/components/BodyList.d.ts +12 -0
- package/types/components/ColumnVisibilityMenuOption.d.ts +15 -0
- package/types/components/ColumnsOptionsMenuSection.d.ts +8 -0
- package/types/components/EmptyState.d.ts +7 -0
- package/types/components/HeaderCell.d.ts +19 -0
- package/types/components/List.d.ts +3 -0
- package/types/components/ListItem.d.ts +3 -0
- package/types/components/NoResults.d.ts +8 -0
- package/types/components/RowsLoader.d.ts +5 -0
- package/types/components/Table.d.ts +13 -0
- package/types/components/TableBody.d.ts +9 -0
- package/types/components/TableHeader.d.ts +3 -0
- package/types/components/footer/addOptionalFooterComponents.d.ts +6 -0
- package/types/components/header/PrimaryControls.d.ts +5 -0
- package/types/components/header/addOptionalHeaderComponents.d.ts +11 -0
- package/types/components/index.d.ts +5 -0
- package/types/components/renderers/defaultClassedRenderers.d.ts +11 -0
- package/types/components/renderers/index.d.ts +15 -0
- package/types/components/renderers/renderRowsLoader.d.ts +2 -0
- package/types/components/tableContext.d.ts +2 -0
- package/types/components/tests/ColumnVisibilityMenu.test.d.ts +1 -0
- package/types/defaultPlugins.d.ts +1 -0
- package/types/index.d.ts +10 -0
- package/types/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.d.ts +1 -0
- package/types/plugins/body-header-scroll-sync/index.d.ts +1 -0
- package/types/plugins/column-dnd/DndColumnsPlugin.d.ts +1 -0
- package/types/plugins/column-dnd/decorateGridWithDndColumns.d.ts +2 -0
- package/types/plugins/column-dnd/index.d.ts +1 -0
- package/types/plugins/column-sizing/ColumnSizingPlugin.d.ts +1 -0
- package/types/plugins/column-sizing/columnMeasurerTransformer.d.ts +6 -0
- package/types/plugins/column-sizing/ext-points/decorateColumn.d.ts +1 -0
- package/types/plugins/column-sizing/ext-points/getTableProps.d.ts +10 -0
- package/types/plugins/column-sizing/getColumnNameFromProperty.d.ts +1 -0
- package/types/plugins/column-sizing/index.d.ts +1 -0
- package/types/plugins/column-sizing/useColumnSizeService.d.ts +17 -0
- package/types/plugins/column-sizing/useStylesheetHelpers.d.ts +22 -0
- package/types/plugins/column-sizing/utils.d.ts +5 -0
- package/types/plugins/custom-cell-renderer/CustomRendererPlugin.d.ts +1 -0
- package/types/plugins/custom-cell-renderer/addCustomRendererToCell.d.ts +3 -0
- package/types/plugins/custom-cell-renderer/getRendererComponent.d.ts +11 -0
- package/types/plugins/custom-cell-renderer/index.d.ts +1 -0
- package/types/plugins/editable/EditableComponents/ComboBox.d.ts +10 -0
- package/types/plugins/editable/EditableComponents/TextBox.d.ts +22 -0
- package/types/plugins/editable/EditableComponents/index.d.ts +2 -0
- package/types/plugins/editable/EditablePlugin.d.ts +1 -0
- package/types/plugins/editable/decorateEditable.d.ts +7 -0
- package/types/plugins/editable/getEditorComponent.d.ts +6 -0
- package/types/plugins/editable/index.d.ts +2 -0
- package/types/plugins/expandable-grid/ExpandableColumn.d.ts +28 -0
- package/types/plugins/expandable-grid/ExpandablePlugin.d.ts +1 -0
- package/types/plugins/expandable-grid/ExpandedRow.d.ts +11 -0
- package/types/plugins/expandable-grid/ExpandedRowExtra.d.ts +9 -0
- package/types/plugins/expandable-grid/index.d.ts +2 -0
- package/types/plugins/expandable-grid/tests/ExpandablePlugin.test.d.ts +1 -0
- package/types/plugins/expandable-grid/useExpandGridState.d.ts +14 -0
- package/types/plugins/export-data/ExportDataPlugin.d.ts +4 -0
- package/types/plugins/export-data/index.d.ts +1 -0
- package/types/plugins/filterable/FilterablePlugin.d.ts +1 -0
- package/types/plugins/filterable/addFilterToColumn.d.ts +1 -0
- package/types/plugins/filterable/components/FilterableHeader.d.ts +29 -0
- package/types/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.d.ts +30 -0
- package/types/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.d.ts +27 -0
- package/types/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.d.ts +30 -0
- package/types/plugins/filterable/components/filterable-menus/TextFilterMenu.d.ts +35 -0
- package/types/plugins/filterable/components/filterable-menus/defaultDateFormat.d.ts +1 -0
- package/types/plugins/filterable/components/filterable-menus/getFilterMenuByType.d.ts +1 -0
- package/types/plugins/filterable/filterableFormatter.d.ts +11 -0
- package/types/plugins/filterable/filtering-helper/filterRowsByQuery.d.ts +2 -0
- package/types/plugins/filterable/filtering-helper/strategiesOperators.d.ts +2 -0
- package/types/plugins/filterable/helper.d.ts +22 -0
- package/types/plugins/filterable/index.d.ts +1 -0
- package/types/plugins/filterable/useFilterableState.d.ts +18 -0
- package/types/plugins/grouping-by/GroupingByPlugin.d.ts +1 -0
- package/types/plugins/grouping-grid/GroupingPlugin.d.ts +1 -0
- package/types/plugins/grouping-grid/walkStrategy.d.ts +9 -0
- package/types/plugins/index.d.ts +16 -0
- package/types/plugins/infinite-scrolling/InfiniteScrollPlugin.d.ts +1 -0
- package/types/plugins/infinite-scrolling/index.d.ts +1 -0
- package/types/plugins/pagination/PaginationPlugin.d.ts +1 -0
- package/types/plugins/pagination/components/Pagination.d.ts +11 -0
- package/types/plugins/pagination/components/Paginator.d.ts +9 -0
- package/types/plugins/pagination/components/PerPageDropdown.d.ts +9 -0
- package/types/plugins/pagination/helper.d.ts +17 -0
- package/types/plugins/pagination/index.d.ts +1 -0
- package/types/plugins/pagination/usePaginationState.d.ts +9 -0
- package/types/plugins/resizable/ResizablePlugin.d.ts +1 -0
- package/types/plugins/resizable/decorateResizable.d.ts +4 -0
- package/types/plugins/resizable/index.d.ts +1 -0
- package/types/plugins/resizable/useResizeHandle.d.ts +13 -0
- package/types/plugins/resizable/utils.d.ts +3 -0
- package/types/plugins/row-dnd/DndRowsPlugin.d.ts +1 -0
- package/types/plugins/row-dnd/index.d.ts +1 -0
- package/types/plugins/selectable/SelectablePlugin.d.ts +1 -0
- package/types/plugins/selectable/addSelectableColumn.d.ts +30 -0
- package/types/plugins/selectable/helper.d.ts +5 -0
- package/types/plugins/selectable/index.d.ts +1 -0
- package/types/plugins/selectable/selectableFormatter.d.ts +9 -0
- package/types/plugins/selectable/useSelectableState.d.ts +9 -0
- package/types/plugins/sortable/SortablePlugin.d.ts +1 -0
- package/types/plugins/sortable/checkIfSortable.d.ts +2 -0
- package/types/plugins/sortable/index.d.ts +1 -0
- package/types/plugins/sortable/sortHeaderFormatter.d.ts +6 -0
- package/types/plugins/sortable/sortTree.d.ts +2 -0
- package/types/plugins/sortable/sorter.d.ts +12 -0
- package/types/plugins/sortable/useSortableState.d.ts +8 -0
- package/types/plugins/toolbar/RowRenderer.d.ts +11 -0
- package/types/plugins/toolbar/ToolbarPlugin.d.ts +1 -0
- package/types/plugins/toolbar/ToolbarTrigger.d.ts +8 -0
- package/types/plugins/toolbar/index.d.ts +1 -0
- package/types/plugins/virtualization/AutoHeightList.d.ts +3 -0
- package/types/plugins/virtualization/VirtualizationPlugin.d.ts +1 -0
- package/types/plugins/virtualization/VirtualizedBody.d.ts +32 -0
- package/types/plugins/virtualization/VirtualizedBodyRow.d.ts +8 -0
- package/types/plugins/virtualization/helper.d.ts +1 -0
- package/types/plugins/virtualization/index.d.ts +1 -0
- package/types/renders/CellWithAddons.d.ts +52 -0
- package/types/renders/index.d.ts +2 -0
- package/types/renders/styled.d.ts +3 -0
- package/types/rowSizes.d.ts +11 -0
- package/types/stories/datagrids-export.stories.d.ts +1 -0
- package/types/stories/datagrids-selectable-multi.stories.d.ts +1 -0
- package/types/tests/DataGrid-Columns.test.d.ts +1 -0
- package/types/tests/DataGrid-Editable.test.d.ts +1 -0
- package/types/tests/DataGrid-Export.test.d.ts +1 -0
- package/types/tests/DataGrid-Filter-helper.test.d.ts +1 -0
- package/types/tests/DataGrid-Filterable-Dates.test.d.ts +1 -0
- package/types/tests/DataGrid-Filterable-State.test.d.ts +1 -0
- package/types/tests/DataGrid-RowDnd.test.d.ts +1 -0
- package/types/tests/DataGrid-Selectable.test.d.ts +1 -0
- package/types/tests/DataGrid-Sortable.test.d.ts +1 -0
- package/types/tests/DataGrid-Toolbar.test.d.ts +1 -0
- package/types/tests/DataGrid-Virtualization.test.d.ts +1 -0
- package/types/tests/DataGrids-ColumnSizing.test.d.ts +1 -0
- package/types/tests/DataGrids-ConditionalPagination.test.d.ts +1 -0
- package/types/tests/DataGrids-Rows.test.d.ts +1 -0
- package/types/tests/DataGrids.test.d.ts +1 -0
- package/types/utilities/getPluginsFromProps.d.ts +1 -0
- package/types/utilities/getScrollbarSize.d.ts +1 -0
- package/types/utilities/normalizeData.d.ts +3 -0
- package/dist/cjs/DSDataGrid.js +0 -399
- package/dist/cjs/DSDataGrid.js.map +0 -7
- package/dist/cjs/DataGridImpl.js +0 -144
- package/dist/cjs/DataGridImpl.js.map +0 -7
- package/dist/cjs/PaginatedDataGrid.js +0 -77
- package/dist/cjs/PaginatedDataGrid.js.map +0 -7
- package/dist/cjs/blockNames.js +0 -39
- package/dist/cjs/blockNames.js.map +0 -7
- package/dist/cjs/columns/IconColumn.js +0 -111
- package/dist/cjs/columns/IconColumn.js.map +0 -7
- package/dist/cjs/columns/NumberColumn.js +0 -36
- package/dist/cjs/columns/NumberColumn.js.map +0 -7
- package/dist/cjs/components/BodyCell.js +0 -104
- package/dist/cjs/components/BodyCell.js.map +0 -7
- package/dist/cjs/components/BodyList.js +0 -54
- package/dist/cjs/components/BodyList.js.map +0 -7
- package/dist/cjs/components/ColumnVisibilityMenuOption.js +0 -66
- package/dist/cjs/components/ColumnVisibilityMenuOption.js.map +0 -7
- package/dist/cjs/components/ColumnsOptionsMenuSection.js +0 -64
- package/dist/cjs/components/ColumnsOptionsMenuSection.js.map +0 -7
- package/dist/cjs/components/EmptyState.js +0 -82
- package/dist/cjs/components/EmptyState.js.map +0 -7
- package/dist/cjs/components/HeaderCell.js +0 -76
- package/dist/cjs/components/HeaderCell.js.map +0 -7
- package/dist/cjs/components/List.js +0 -44
- package/dist/cjs/components/List.js.map +0 -7
- package/dist/cjs/components/ListItem.js +0 -51
- package/dist/cjs/components/ListItem.js.map +0 -7
- package/dist/cjs/components/NoResults.js +0 -55
- package/dist/cjs/components/NoResults.js.map +0 -7
- package/dist/cjs/components/RowsLoader.js +0 -42
- package/dist/cjs/components/RowsLoader.js.map +0 -7
- package/dist/cjs/components/Table.js +0 -113
- package/dist/cjs/components/Table.js.map +0 -7
- package/dist/cjs/components/TableBody.js +0 -70
- package/dist/cjs/components/TableBody.js.map +0 -7
- package/dist/cjs/components/TableHeader.js +0 -54
- package/dist/cjs/components/TableHeader.js.map +0 -7
- package/dist/cjs/components/footer/addOptionalFooterComponents.js +0 -56
- package/dist/cjs/components/footer/addOptionalFooterComponents.js.map +0 -7
- package/dist/cjs/components/header/PrimaryControls.js +0 -50
- package/dist/cjs/components/header/PrimaryControls.js.map +0 -7
- package/dist/cjs/components/header/addOptionalHeaderComponents.js +0 -58
- package/dist/cjs/components/header/addOptionalHeaderComponents.js.map +0 -7
- package/dist/cjs/components/index.js +0 -43
- package/dist/cjs/components/index.js.map +0 -7
- package/dist/cjs/components/renderers/defaultClassedRenderers.js +0 -66
- package/dist/cjs/components/renderers/defaultClassedRenderers.js.map +0 -7
- package/dist/cjs/components/renderers/index.js +0 -50
- package/dist/cjs/components/renderers/index.js.map +0 -7
- package/dist/cjs/components/renderers/renderRowsLoader.js +0 -39
- package/dist/cjs/components/renderers/renderRowsLoader.js.map +0 -7
- package/dist/cjs/components/tableContext.js +0 -36
- package/dist/cjs/components/tableContext.js.map +0 -7
- package/dist/cjs/defaultPlugins.js +0 -44
- package/dist/cjs/defaultPlugins.js.map +0 -7
- package/dist/cjs/index.js +0 -72
- package/dist/cjs/index.js.map +0 -7
- package/dist/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +0 -131
- package/dist/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js.map +0 -7
- package/dist/cjs/plugins/body-header-scroll-sync/index.js +0 -35
- package/dist/cjs/plugins/body-header-scroll-sync/index.js.map +0 -7
- package/dist/cjs/plugins/column-dnd/DndColumnsPlugin.js +0 -155
- package/dist/cjs/plugins/column-dnd/DndColumnsPlugin.js.map +0 -7
- package/dist/cjs/plugins/column-dnd/decorateGridWithDndColumns.js +0 -46
- package/dist/cjs/plugins/column-dnd/decorateGridWithDndColumns.js.map +0 -7
- package/dist/cjs/plugins/column-dnd/index.js +0 -35
- package/dist/cjs/plugins/column-dnd/index.js.map +0 -7
- package/dist/cjs/plugins/column-sizing/ColumnSizingPlugin.js +0 -92
- package/dist/cjs/plugins/column-sizing/ColumnSizingPlugin.js.map +0 -7
- package/dist/cjs/plugins/column-sizing/columnMeasurerTransformer.js +0 -69
- package/dist/cjs/plugins/column-sizing/columnMeasurerTransformer.js.map +0 -7
- package/dist/cjs/plugins/column-sizing/ext-points/decorateColumn.js +0 -44
- package/dist/cjs/plugins/column-sizing/ext-points/decorateColumn.js.map +0 -7
- package/dist/cjs/plugins/column-sizing/ext-points/getTableProps.js +0 -64
- package/dist/cjs/plugins/column-sizing/ext-points/getTableProps.js.map +0 -7
- package/dist/cjs/plugins/column-sizing/getColumnNameFromProperty.js +0 -37
- package/dist/cjs/plugins/column-sizing/getColumnNameFromProperty.js.map +0 -7
- package/dist/cjs/plugins/column-sizing/index.js +0 -35
- package/dist/cjs/plugins/column-sizing/index.js.map +0 -7
- package/dist/cjs/plugins/column-sizing/useColumnSizeService.js +0 -148
- package/dist/cjs/plugins/column-sizing/useColumnSizeService.js.map +0 -7
- package/dist/cjs/plugins/column-sizing/useStylesheetHelpers.js +0 -167
- package/dist/cjs/plugins/column-sizing/useStylesheetHelpers.js.map +0 -7
- package/dist/cjs/plugins/column-sizing/utils.js +0 -68
- package/dist/cjs/plugins/column-sizing/utils.js.map +0 -7
- package/dist/cjs/plugins/custom-cell-renderer/CustomRendererPlugin.js +0 -40
- package/dist/cjs/plugins/custom-cell-renderer/CustomRendererPlugin.js.map +0 -7
- package/dist/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js +0 -77
- package/dist/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js.map +0 -7
- package/dist/cjs/plugins/custom-cell-renderer/getRendererComponent.js +0 -63
- package/dist/cjs/plugins/custom-cell-renderer/getRendererComponent.js.map +0 -7
- package/dist/cjs/plugins/custom-cell-renderer/index.js +0 -35
- package/dist/cjs/plugins/custom-cell-renderer/index.js.map +0 -7
- package/dist/cjs/plugins/editable/EditableComponents/ComboBox.js +0 -68
- package/dist/cjs/plugins/editable/EditableComponents/ComboBox.js.map +0 -7
- package/dist/cjs/plugins/editable/EditableComponents/TextBox.js +0 -90
- package/dist/cjs/plugins/editable/EditableComponents/TextBox.js.map +0 -7
- package/dist/cjs/plugins/editable/EditableComponents/index.js +0 -37
- package/dist/cjs/plugins/editable/EditableComponents/index.js.map +0 -7
- package/dist/cjs/plugins/editable/EditablePlugin.js +0 -108
- package/dist/cjs/plugins/editable/EditablePlugin.js.map +0 -7
- package/dist/cjs/plugins/editable/decorateEditable.js +0 -85
- package/dist/cjs/plugins/editable/decorateEditable.js.map +0 -7
- package/dist/cjs/plugins/editable/getEditorComponent.js +0 -76
- package/dist/cjs/plugins/editable/getEditorComponent.js.map +0 -7
- package/dist/cjs/plugins/editable/index.js +0 -38
- package/dist/cjs/plugins/editable/index.js.map +0 -7
- package/dist/cjs/plugins/expandable-grid/ExpandableColumn.js +0 -124
- package/dist/cjs/plugins/expandable-grid/ExpandableColumn.js.map +0 -7
- package/dist/cjs/plugins/expandable-grid/ExpandablePlugin.js +0 -181
- package/dist/cjs/plugins/expandable-grid/ExpandablePlugin.js.map +0 -7
- package/dist/cjs/plugins/expandable-grid/ExpandedRow.js +0 -134
- package/dist/cjs/plugins/expandable-grid/ExpandedRow.js.map +0 -7
- package/dist/cjs/plugins/expandable-grid/ExpandedRowExtra.js +0 -56
- package/dist/cjs/plugins/expandable-grid/ExpandedRowExtra.js.map +0 -7
- package/dist/cjs/plugins/expandable-grid/index.js +0 -37
- package/dist/cjs/plugins/expandable-grid/index.js.map +0 -7
- package/dist/cjs/plugins/expandable-grid/useExpandGridState.js +0 -93
- package/dist/cjs/plugins/expandable-grid/useExpandGridState.js.map +0 -7
- package/dist/cjs/plugins/export-data/ExportDataPlugin.js +0 -134
- package/dist/cjs/plugins/export-data/ExportDataPlugin.js.map +0 -7
- package/dist/cjs/plugins/export-data/index.js +0 -35
- package/dist/cjs/plugins/export-data/index.js.map +0 -7
- package/dist/cjs/plugins/filterable/FilterablePlugin.js +0 -80
- package/dist/cjs/plugins/filterable/FilterablePlugin.js.map +0 -7
- package/dist/cjs/plugins/filterable/addFilterToColumn.js +0 -43
- package/dist/cjs/plugins/filterable/addFilterToColumn.js.map +0 -7
- package/dist/cjs/plugins/filterable/components/FilterableHeader.js +0 -132
- package/dist/cjs/plugins/filterable/components/FilterableHeader.js.map +0 -7
- package/dist/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +0 -157
- package/dist/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js.map +0 -7
- package/dist/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +0 -131
- package/dist/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js.map +0 -7
- package/dist/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +0 -201
- package/dist/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js.map +0 -7
- package/dist/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js +0 -170
- package/dist/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js.map +0 -7
- package/dist/cjs/plugins/filterable/components/filterable-menus/defaultDateFormat.js +0 -35
- package/dist/cjs/plugins/filterable/components/filterable-menus/defaultDateFormat.js.map +0 -7
- package/dist/cjs/plugins/filterable/components/filterable-menus/getFilterMenuByType.js +0 -49
- package/dist/cjs/plugins/filterable/components/filterable-menus/getFilterMenuByType.js.map +0 -7
- package/dist/cjs/plugins/filterable/filterableFormatter.js +0 -73
- package/dist/cjs/plugins/filterable/filterableFormatter.js.map +0 -7
- package/dist/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js +0 -79
- package/dist/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js.map +0 -7
- package/dist/cjs/plugins/filterable/filtering-helper/strategiesOperators.js +0 -44
- package/dist/cjs/plugins/filterable/filtering-helper/strategiesOperators.js.map +0 -7
- package/dist/cjs/plugins/filterable/helper.js +0 -109
- package/dist/cjs/plugins/filterable/helper.js.map +0 -7
- package/dist/cjs/plugins/filterable/index.js +0 -35
- package/dist/cjs/plugins/filterable/index.js.map +0 -7
- package/dist/cjs/plugins/filterable/useFilterableState.js +0 -113
- package/dist/cjs/plugins/filterable/useFilterableState.js.map +0 -7
- package/dist/cjs/plugins/grouping-by/GroupingByPlugin.js +0 -57
- package/dist/cjs/plugins/grouping-by/GroupingByPlugin.js.map +0 -7
- package/dist/cjs/plugins/grouping-grid/GroupingPlugin.js +0 -126
- package/dist/cjs/plugins/grouping-grid/GroupingPlugin.js.map +0 -7
- package/dist/cjs/plugins/grouping-grid/walkStrategy.js +0 -76
- package/dist/cjs/plugins/grouping-grid/walkStrategy.js.map +0 -7
- package/dist/cjs/plugins/index.js +0 -68
- package/dist/cjs/plugins/index.js.map +0 -7
- package/dist/cjs/plugins/infinite-scrolling/InfiniteScrollPlugin.js +0 -100
- package/dist/cjs/plugins/infinite-scrolling/InfiniteScrollPlugin.js.map +0 -7
- package/dist/cjs/plugins/infinite-scrolling/index.js +0 -35
- package/dist/cjs/plugins/infinite-scrolling/index.js.map +0 -7
- package/dist/cjs/plugins/pagination/PaginationPlugin.js +0 -92
- package/dist/cjs/plugins/pagination/PaginationPlugin.js.map +0 -7
- package/dist/cjs/plugins/pagination/components/Pagination.js +0 -63
- package/dist/cjs/plugins/pagination/components/Pagination.js.map +0 -7
- package/dist/cjs/plugins/pagination/components/Paginator.js +0 -82
- package/dist/cjs/plugins/pagination/components/Paginator.js.map +0 -7
- package/dist/cjs/plugins/pagination/components/PerPageDropdown.js +0 -68
- package/dist/cjs/plugins/pagination/components/PerPageDropdown.js.map +0 -7
- package/dist/cjs/plugins/pagination/helper.js +0 -62
- package/dist/cjs/plugins/pagination/helper.js.map +0 -7
- package/dist/cjs/plugins/pagination/index.js +0 -35
- package/dist/cjs/plugins/pagination/index.js.map +0 -7
- package/dist/cjs/plugins/pagination/usePaginationState.js +0 -82
- package/dist/cjs/plugins/pagination/usePaginationState.js.map +0 -7
- package/dist/cjs/plugins/resizable/ResizablePlugin.js +0 -109
- package/dist/cjs/plugins/resizable/ResizablePlugin.js.map +0 -7
- package/dist/cjs/plugins/resizable/decorateResizable.js +0 -56
- package/dist/cjs/plugins/resizable/decorateResizable.js.map +0 -7
- package/dist/cjs/plugins/resizable/index.js +0 -35
- package/dist/cjs/plugins/resizable/index.js.map +0 -7
- package/dist/cjs/plugins/resizable/useResizeHandle.js +0 -79
- package/dist/cjs/plugins/resizable/useResizeHandle.js.map +0 -7
- package/dist/cjs/plugins/resizable/utils.js +0 -54
- package/dist/cjs/plugins/resizable/utils.js.map +0 -7
- package/dist/cjs/plugins/row-dnd/DndRowsPlugin.js +0 -136
- package/dist/cjs/plugins/row-dnd/DndRowsPlugin.js.map +0 -7
- package/dist/cjs/plugins/row-dnd/index.js +0 -35
- package/dist/cjs/plugins/row-dnd/index.js.map +0 -7
- package/dist/cjs/plugins/selectable/SelectablePlugin.js +0 -166
- package/dist/cjs/plugins/selectable/SelectablePlugin.js.map +0 -7
- package/dist/cjs/plugins/selectable/addSelectableColumn.js +0 -92
- package/dist/cjs/plugins/selectable/addSelectableColumn.js.map +0 -7
- package/dist/cjs/plugins/selectable/helper.js +0 -54
- package/dist/cjs/plugins/selectable/helper.js.map +0 -7
- package/dist/cjs/plugins/selectable/index.js +0 -35
- package/dist/cjs/plugins/selectable/index.js.map +0 -7
- package/dist/cjs/plugins/selectable/selectableFormatter.js +0 -93
- package/dist/cjs/plugins/selectable/selectableFormatter.js.map +0 -7
- package/dist/cjs/plugins/selectable/useSelectableState.js +0 -116
- package/dist/cjs/plugins/selectable/useSelectableState.js.map +0 -7
- package/dist/cjs/plugins/sortable/SortablePlugin.js +0 -95
- package/dist/cjs/plugins/sortable/SortablePlugin.js.map +0 -7
- package/dist/cjs/plugins/sortable/checkIfSortable.js +0 -45
- package/dist/cjs/plugins/sortable/checkIfSortable.js.map +0 -7
- package/dist/cjs/plugins/sortable/index.js +0 -35
- package/dist/cjs/plugins/sortable/index.js.map +0 -7
- package/dist/cjs/plugins/sortable/sortHeaderFormatter.js +0 -66
- package/dist/cjs/plugins/sortable/sortHeaderFormatter.js.map +0 -7
- package/dist/cjs/plugins/sortable/sortTree.js +0 -44
- package/dist/cjs/plugins/sortable/sortTree.js.map +0 -7
- package/dist/cjs/plugins/sortable/sorter.js +0 -144
- package/dist/cjs/plugins/sortable/sorter.js.map +0 -7
- package/dist/cjs/plugins/sortable/useSortableState.js +0 -73
- package/dist/cjs/plugins/sortable/useSortableState.js.map +0 -7
- package/dist/cjs/plugins/toolbar/RowRenderer.js +0 -96
- package/dist/cjs/plugins/toolbar/RowRenderer.js.map +0 -7
- package/dist/cjs/plugins/toolbar/ToolbarPlugin.js +0 -58
- package/dist/cjs/plugins/toolbar/ToolbarPlugin.js.map +0 -7
- package/dist/cjs/plugins/toolbar/ToolbarTrigger.js +0 -105
- package/dist/cjs/plugins/toolbar/ToolbarTrigger.js.map +0 -7
- package/dist/cjs/plugins/toolbar/index.js +0 -35
- package/dist/cjs/plugins/toolbar/index.js.map +0 -7
- package/dist/cjs/plugins/virtualization/AutoHeightList.js +0 -71
- package/dist/cjs/plugins/virtualization/AutoHeightList.js.map +0 -7
- package/dist/cjs/plugins/virtualization/VirtualizationPlugin.js +0 -97
- package/dist/cjs/plugins/virtualization/VirtualizationPlugin.js.map +0 -7
- package/dist/cjs/plugins/virtualization/VirtualizedBody.js +0 -259
- package/dist/cjs/plugins/virtualization/VirtualizedBody.js.map +0 -7
- package/dist/cjs/plugins/virtualization/VirtualizedBodyRow.js +0 -52
- package/dist/cjs/plugins/virtualization/VirtualizedBodyRow.js.map +0 -7
- package/dist/cjs/plugins/virtualization/helper.js +0 -35
- package/dist/cjs/plugins/virtualization/helper.js.map +0 -7
- package/dist/cjs/plugins/virtualization/index.js +0 -35
- package/dist/cjs/plugins/virtualization/index.js.map +0 -7
- package/dist/cjs/renders/CellWithAddons.js +0 -111
- package/dist/cjs/renders/CellWithAddons.js.map +0 -7
- package/dist/cjs/renders/index.js +0 -37
- package/dist/cjs/renders/index.js.map +0 -7
- package/dist/cjs/renders/styled.js +0 -78
- package/dist/cjs/renders/styled.js.map +0 -7
- package/dist/cjs/rowSizes.js +0 -51
- package/dist/cjs/rowSizes.js.map +0 -7
- package/dist/cjs/utilities/DataGridUtilities.json +0 -1315
- package/dist/cjs/utilities/getPluginsFromProps.js +0 -72
- package/dist/cjs/utilities/getPluginsFromProps.js.map +0 -7
- package/dist/cjs/utilities/getScrollbarSize.js +0 -46
- package/dist/cjs/utilities/getScrollbarSize.js.map +0 -7
- package/dist/cjs/utilities/normalizeData.js +0 -49
- package/dist/cjs/utilities/normalizeData.js.map +0 -7
- package/dist/esm/DSDataGrid.js +0 -370
- package/dist/esm/DSDataGrid.js.map +0 -7
- package/dist/esm/DataGridImpl.js +0 -115
- package/dist/esm/DataGridImpl.js.map +0 -7
- package/dist/esm/PaginatedDataGrid.js +0 -48
- package/dist/esm/PaginatedDataGrid.js.map +0 -7
- package/dist/esm/blockNames.js +0 -10
- package/dist/esm/blockNames.js.map +0 -7
- package/dist/esm/columns/IconColumn.js +0 -82
- package/dist/esm/columns/IconColumn.js.map +0 -7
- package/dist/esm/columns/NumberColumn.js +0 -7
- package/dist/esm/columns/NumberColumn.js.map +0 -7
- package/dist/esm/components/BodyCell.js +0 -75
- package/dist/esm/components/BodyCell.js.map +0 -7
- package/dist/esm/components/BodyList.js +0 -25
- package/dist/esm/components/BodyList.js.map +0 -7
- package/dist/esm/components/ColumnVisibilityMenuOption.js +0 -37
- package/dist/esm/components/ColumnVisibilityMenuOption.js.map +0 -7
- package/dist/esm/components/ColumnsOptionsMenuSection.js +0 -35
- package/dist/esm/components/ColumnsOptionsMenuSection.js.map +0 -7
- package/dist/esm/components/EmptyState.js +0 -53
- package/dist/esm/components/EmptyState.js.map +0 -7
- package/dist/esm/components/HeaderCell.js +0 -47
- package/dist/esm/components/HeaderCell.js.map +0 -7
- package/dist/esm/components/List.js +0 -15
- package/dist/esm/components/List.js.map +0 -7
- package/dist/esm/components/ListItem.js +0 -22
- package/dist/esm/components/ListItem.js.map +0 -7
- package/dist/esm/components/NoResults.js +0 -26
- package/dist/esm/components/NoResults.js.map +0 -7
- package/dist/esm/components/RowsLoader.js +0 -13
- package/dist/esm/components/RowsLoader.js.map +0 -7
- package/dist/esm/components/Table.js +0 -84
- package/dist/esm/components/Table.js.map +0 -7
- package/dist/esm/components/TableBody.js +0 -41
- package/dist/esm/components/TableBody.js.map +0 -7
- package/dist/esm/components/TableHeader.js +0 -25
- package/dist/esm/components/TableHeader.js.map +0 -7
- package/dist/esm/components/footer/addOptionalFooterComponents.js +0 -27
- package/dist/esm/components/footer/addOptionalFooterComponents.js.map +0 -7
- package/dist/esm/components/header/PrimaryControls.js +0 -21
- package/dist/esm/components/header/PrimaryControls.js.map +0 -7
- package/dist/esm/components/header/addOptionalHeaderComponents.js +0 -29
- package/dist/esm/components/header/addOptionalHeaderComponents.js.map +0 -7
- package/dist/esm/components/index.js +0 -14
- package/dist/esm/components/index.js.map +0 -7
- package/dist/esm/components/renderers/defaultClassedRenderers.js +0 -41
- package/dist/esm/components/renderers/defaultClassedRenderers.js.map +0 -7
- package/dist/esm/components/renderers/index.js +0 -29
- package/dist/esm/components/renderers/index.js.map +0 -7
- package/dist/esm/components/renderers/renderRowsLoader.js +0 -10
- package/dist/esm/components/renderers/renderRowsLoader.js.map +0 -7
- package/dist/esm/components/tableContext.js +0 -7
- package/dist/esm/components/tableContext.js.map +0 -7
- package/dist/esm/defaultPlugins.js +0 -15
- package/dist/esm/defaultPlugins.js.map +0 -7
- package/dist/esm/index.js +0 -63
- package/dist/esm/index.js.map +0 -7
- package/dist/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +0 -102
- package/dist/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js.map +0 -7
- package/dist/esm/plugins/body-header-scroll-sync/index.js +0 -6
- package/dist/esm/plugins/body-header-scroll-sync/index.js.map +0 -7
- package/dist/esm/plugins/column-dnd/DndColumnsPlugin.js +0 -126
- package/dist/esm/plugins/column-dnd/DndColumnsPlugin.js.map +0 -7
- package/dist/esm/plugins/column-dnd/decorateGridWithDndColumns.js +0 -20
- package/dist/esm/plugins/column-dnd/decorateGridWithDndColumns.js.map +0 -7
- package/dist/esm/plugins/column-dnd/index.js +0 -6
- package/dist/esm/plugins/column-dnd/index.js.map +0 -7
- package/dist/esm/plugins/column-sizing/ColumnSizingPlugin.js +0 -63
- package/dist/esm/plugins/column-sizing/ColumnSizingPlugin.js.map +0 -7
- package/dist/esm/plugins/column-sizing/columnMeasurerTransformer.js +0 -40
- package/dist/esm/plugins/column-sizing/columnMeasurerTransformer.js.map +0 -7
- package/dist/esm/plugins/column-sizing/ext-points/decorateColumn.js +0 -15
- package/dist/esm/plugins/column-sizing/ext-points/decorateColumn.js.map +0 -7
- package/dist/esm/plugins/column-sizing/ext-points/getTableProps.js +0 -35
- package/dist/esm/plugins/column-sizing/ext-points/getTableProps.js.map +0 -7
- package/dist/esm/plugins/column-sizing/getColumnNameFromProperty.js +0 -8
- package/dist/esm/plugins/column-sizing/getColumnNameFromProperty.js.map +0 -7
- package/dist/esm/plugins/column-sizing/index.js +0 -6
- package/dist/esm/plugins/column-sizing/index.js.map +0 -7
- package/dist/esm/plugins/column-sizing/useColumnSizeService.js +0 -119
- package/dist/esm/plugins/column-sizing/useColumnSizeService.js.map +0 -7
- package/dist/esm/plugins/column-sizing/useStylesheetHelpers.js +0 -138
- package/dist/esm/plugins/column-sizing/useStylesheetHelpers.js.map +0 -7
- package/dist/esm/plugins/column-sizing/utils.js +0 -39
- package/dist/esm/plugins/column-sizing/utils.js.map +0 -7
- package/dist/esm/plugins/custom-cell-renderer/CustomRendererPlugin.js +0 -11
- package/dist/esm/plugins/custom-cell-renderer/CustomRendererPlugin.js.map +0 -7
- package/dist/esm/plugins/custom-cell-renderer/addCustomRendererToCell.js +0 -48
- package/dist/esm/plugins/custom-cell-renderer/addCustomRendererToCell.js.map +0 -7
- package/dist/esm/plugins/custom-cell-renderer/getRendererComponent.js +0 -34
- package/dist/esm/plugins/custom-cell-renderer/getRendererComponent.js.map +0 -7
- package/dist/esm/plugins/custom-cell-renderer/index.js +0 -6
- package/dist/esm/plugins/custom-cell-renderer/index.js.map +0 -7
- package/dist/esm/plugins/editable/EditableComponents/ComboBox.js +0 -39
- package/dist/esm/plugins/editable/EditableComponents/ComboBox.js.map +0 -7
- package/dist/esm/plugins/editable/EditableComponents/TextBox.js +0 -61
- package/dist/esm/plugins/editable/EditableComponents/TextBox.js.map +0 -7
- package/dist/esm/plugins/editable/EditableComponents/index.js +0 -8
- package/dist/esm/plugins/editable/EditableComponents/index.js.map +0 -7
- package/dist/esm/plugins/editable/EditablePlugin.js +0 -79
- package/dist/esm/plugins/editable/EditablePlugin.js.map +0 -7
- package/dist/esm/plugins/editable/decorateEditable.js +0 -56
- package/dist/esm/plugins/editable/decorateEditable.js.map +0 -7
- package/dist/esm/plugins/editable/getEditorComponent.js +0 -47
- package/dist/esm/plugins/editable/getEditorComponent.js.map +0 -7
- package/dist/esm/plugins/editable/index.js +0 -9
- package/dist/esm/plugins/editable/index.js.map +0 -7
- package/dist/esm/plugins/expandable-grid/ExpandableColumn.js +0 -95
- package/dist/esm/plugins/expandable-grid/ExpandableColumn.js.map +0 -7
- package/dist/esm/plugins/expandable-grid/ExpandablePlugin.js +0 -152
- package/dist/esm/plugins/expandable-grid/ExpandablePlugin.js.map +0 -7
- package/dist/esm/plugins/expandable-grid/ExpandedRow.js +0 -105
- package/dist/esm/plugins/expandable-grid/ExpandedRow.js.map +0 -7
- package/dist/esm/plugins/expandable-grid/ExpandedRowExtra.js +0 -27
- package/dist/esm/plugins/expandable-grid/ExpandedRowExtra.js.map +0 -7
- package/dist/esm/plugins/expandable-grid/index.js +0 -8
- package/dist/esm/plugins/expandable-grid/index.js.map +0 -7
- package/dist/esm/plugins/expandable-grid/useExpandGridState.js +0 -64
- package/dist/esm/plugins/expandable-grid/useExpandGridState.js.map +0 -7
- package/dist/esm/plugins/export-data/ExportDataPlugin.js +0 -105
- package/dist/esm/plugins/export-data/ExportDataPlugin.js.map +0 -7
- package/dist/esm/plugins/export-data/index.js +0 -6
- package/dist/esm/plugins/export-data/index.js.map +0 -7
- package/dist/esm/plugins/filterable/FilterablePlugin.js +0 -51
- package/dist/esm/plugins/filterable/FilterablePlugin.js.map +0 -7
- package/dist/esm/plugins/filterable/addFilterToColumn.js +0 -14
- package/dist/esm/plugins/filterable/addFilterToColumn.js.map +0 -7
- package/dist/esm/plugins/filterable/components/FilterableHeader.js +0 -103
- package/dist/esm/plugins/filterable/components/FilterableHeader.js.map +0 -7
- package/dist/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +0 -128
- package/dist/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js.map +0 -7
- package/dist/esm/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +0 -102
- package/dist/esm/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js.map +0 -7
- package/dist/esm/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +0 -176
- package/dist/esm/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js.map +0 -7
- package/dist/esm/plugins/filterable/components/filterable-menus/TextFilterMenu.js +0 -141
- package/dist/esm/plugins/filterable/components/filterable-menus/TextFilterMenu.js.map +0 -7
- package/dist/esm/plugins/filterable/components/filterable-menus/defaultDateFormat.js +0 -6
- package/dist/esm/plugins/filterable/components/filterable-menus/defaultDateFormat.js.map +0 -7
- package/dist/esm/plugins/filterable/components/filterable-menus/getFilterMenuByType.js +0 -20
- package/dist/esm/plugins/filterable/components/filterable-menus/getFilterMenuByType.js.map +0 -7
- package/dist/esm/plugins/filterable/filterableFormatter.js +0 -44
- package/dist/esm/plugins/filterable/filterableFormatter.js.map +0 -7
- package/dist/esm/plugins/filterable/filtering-helper/filterRowsByQuery.js +0 -50
- package/dist/esm/plugins/filterable/filtering-helper/filterRowsByQuery.js.map +0 -7
- package/dist/esm/plugins/filterable/filtering-helper/strategiesOperators.js +0 -15
- package/dist/esm/plugins/filterable/filtering-helper/strategiesOperators.js.map +0 -7
- package/dist/esm/plugins/filterable/helper.js +0 -86
- package/dist/esm/plugins/filterable/helper.js.map +0 -7
- package/dist/esm/plugins/filterable/index.js +0 -6
- package/dist/esm/plugins/filterable/index.js.map +0 -7
- package/dist/esm/plugins/filterable/useFilterableState.js +0 -88
- package/dist/esm/plugins/filterable/useFilterableState.js.map +0 -7
- package/dist/esm/plugins/grouping-by/GroupingByPlugin.js +0 -28
- package/dist/esm/plugins/grouping-by/GroupingByPlugin.js.map +0 -7
- package/dist/esm/plugins/grouping-grid/GroupingPlugin.js +0 -97
- package/dist/esm/plugins/grouping-grid/GroupingPlugin.js.map +0 -7
- package/dist/esm/plugins/grouping-grid/walkStrategy.js +0 -47
- package/dist/esm/plugins/grouping-grid/walkStrategy.js.map +0 -7
- package/dist/esm/plugins/index.js +0 -39
- package/dist/esm/plugins/index.js.map +0 -7
- package/dist/esm/plugins/infinite-scrolling/InfiniteScrollPlugin.js +0 -71
- package/dist/esm/plugins/infinite-scrolling/InfiniteScrollPlugin.js.map +0 -7
- package/dist/esm/plugins/infinite-scrolling/index.js +0 -6
- package/dist/esm/plugins/infinite-scrolling/index.js.map +0 -7
- package/dist/esm/plugins/pagination/PaginationPlugin.js +0 -63
- package/dist/esm/plugins/pagination/PaginationPlugin.js.map +0 -7
- package/dist/esm/plugins/pagination/components/Pagination.js +0 -34
- package/dist/esm/plugins/pagination/components/Pagination.js.map +0 -7
- package/dist/esm/plugins/pagination/components/Paginator.js +0 -53
- package/dist/esm/plugins/pagination/components/Paginator.js.map +0 -7
- package/dist/esm/plugins/pagination/components/PerPageDropdown.js +0 -39
- package/dist/esm/plugins/pagination/components/PerPageDropdown.js.map +0 -7
- package/dist/esm/plugins/pagination/helper.js +0 -33
- package/dist/esm/plugins/pagination/helper.js.map +0 -7
- package/dist/esm/plugins/pagination/index.js +0 -6
- package/dist/esm/plugins/pagination/index.js.map +0 -7
- package/dist/esm/plugins/pagination/usePaginationState.js +0 -53
- package/dist/esm/plugins/pagination/usePaginationState.js.map +0 -7
- package/dist/esm/plugins/resizable/ResizablePlugin.js +0 -80
- package/dist/esm/plugins/resizable/ResizablePlugin.js.map +0 -7
- package/dist/esm/plugins/resizable/decorateResizable.js +0 -27
- package/dist/esm/plugins/resizable/decorateResizable.js.map +0 -7
- package/dist/esm/plugins/resizable/index.js +0 -6
- package/dist/esm/plugins/resizable/index.js.map +0 -7
- package/dist/esm/plugins/resizable/useResizeHandle.js +0 -50
- package/dist/esm/plugins/resizable/useResizeHandle.js.map +0 -7
- package/dist/esm/plugins/resizable/utils.js +0 -25
- package/dist/esm/plugins/resizable/utils.js.map +0 -7
- package/dist/esm/plugins/row-dnd/DndRowsPlugin.js +0 -107
- package/dist/esm/plugins/row-dnd/DndRowsPlugin.js.map +0 -7
- package/dist/esm/plugins/row-dnd/index.js +0 -6
- package/dist/esm/plugins/row-dnd/index.js.map +0 -7
- package/dist/esm/plugins/selectable/SelectablePlugin.js +0 -137
- package/dist/esm/plugins/selectable/SelectablePlugin.js.map +0 -7
- package/dist/esm/plugins/selectable/addSelectableColumn.js +0 -66
- package/dist/esm/plugins/selectable/addSelectableColumn.js.map +0 -7
- package/dist/esm/plugins/selectable/helper.js +0 -25
- package/dist/esm/plugins/selectable/helper.js.map +0 -7
- package/dist/esm/plugins/selectable/index.js +0 -6
- package/dist/esm/plugins/selectable/index.js.map +0 -7
- package/dist/esm/plugins/selectable/selectableFormatter.js +0 -64
- package/dist/esm/plugins/selectable/selectableFormatter.js.map +0 -7
- package/dist/esm/plugins/selectable/useSelectableState.js +0 -91
- package/dist/esm/plugins/selectable/useSelectableState.js.map +0 -7
- package/dist/esm/plugins/sortable/SortablePlugin.js +0 -69
- package/dist/esm/plugins/sortable/SortablePlugin.js.map +0 -7
- package/dist/esm/plugins/sortable/checkIfSortable.js +0 -16
- package/dist/esm/plugins/sortable/checkIfSortable.js.map +0 -7
- package/dist/esm/plugins/sortable/index.js +0 -6
- package/dist/esm/plugins/sortable/index.js.map +0 -7
- package/dist/esm/plugins/sortable/sortHeaderFormatter.js +0 -37
- package/dist/esm/plugins/sortable/sortHeaderFormatter.js.map +0 -7
- package/dist/esm/plugins/sortable/sortTree.js +0 -15
- package/dist/esm/plugins/sortable/sortTree.js.map +0 -7
- package/dist/esm/plugins/sortable/sorter.js +0 -115
- package/dist/esm/plugins/sortable/sorter.js.map +0 -7
- package/dist/esm/plugins/sortable/useSortableState.js +0 -44
- package/dist/esm/plugins/sortable/useSortableState.js.map +0 -7
- package/dist/esm/plugins/toolbar/RowRenderer.js +0 -67
- package/dist/esm/plugins/toolbar/RowRenderer.js.map +0 -7
- package/dist/esm/plugins/toolbar/ToolbarPlugin.js +0 -29
- package/dist/esm/plugins/toolbar/ToolbarPlugin.js.map +0 -7
- package/dist/esm/plugins/toolbar/ToolbarTrigger.js +0 -76
- package/dist/esm/plugins/toolbar/ToolbarTrigger.js.map +0 -7
- package/dist/esm/plugins/toolbar/index.js +0 -6
- package/dist/esm/plugins/toolbar/index.js.map +0 -7
- package/dist/esm/plugins/virtualization/AutoHeightList.js +0 -42
- package/dist/esm/plugins/virtualization/AutoHeightList.js.map +0 -7
- package/dist/esm/plugins/virtualization/VirtualizationPlugin.js +0 -68
- package/dist/esm/plugins/virtualization/VirtualizationPlugin.js.map +0 -7
- package/dist/esm/plugins/virtualization/VirtualizedBody.js +0 -230
- package/dist/esm/plugins/virtualization/VirtualizedBody.js.map +0 -7
- package/dist/esm/plugins/virtualization/VirtualizedBodyRow.js +0 -23
- package/dist/esm/plugins/virtualization/VirtualizedBodyRow.js.map +0 -7
- package/dist/esm/plugins/virtualization/helper.js +0 -6
- package/dist/esm/plugins/virtualization/helper.js.map +0 -7
- package/dist/esm/plugins/virtualization/index.js +0 -6
- package/dist/esm/plugins/virtualization/index.js.map +0 -7
- package/dist/esm/renders/CellWithAddons.js +0 -82
- package/dist/esm/renders/CellWithAddons.js.map +0 -7
- package/dist/esm/renders/index.js +0 -8
- package/dist/esm/renders/index.js.map +0 -7
- package/dist/esm/renders/styled.js +0 -49
- package/dist/esm/renders/styled.js.map +0 -7
- package/dist/esm/rowSizes.js +0 -22
- package/dist/esm/rowSizes.js.map +0 -7
- package/dist/esm/utilities/DataGridUtilities.json +0 -1315
- package/dist/esm/utilities/getPluginsFromProps.js +0 -43
- package/dist/esm/utilities/getPluginsFromProps.js.map +0 -7
- package/dist/esm/utilities/getScrollbarSize.js +0 -17
- package/dist/esm/utilities/getScrollbarSize.js.map +0 -7
- package/dist/esm/utilities/normalizeData.js +0 -20
- package/dist/esm/utilities/normalizeData.js.map +0 -7
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import React2, { useEffect, useRef, useState } from "react";
|
|
3
|
-
import PropTypes from "prop-types";
|
|
4
|
-
import { isEmpty } from "lodash";
|
|
5
|
-
import { omit } from "@elliemae/ds-utilities";
|
|
6
|
-
import { ToolbarTrigger } from "./ToolbarTrigger";
|
|
7
|
-
import { RowSizes } from "../../rowSizes";
|
|
8
|
-
const RowRenderer = (Row, grid) => {
|
|
9
|
-
const Wrapped = (props) => {
|
|
10
|
-
const ref = useRef();
|
|
11
|
-
const { rowData = {}, index, rowIndex, style } = props;
|
|
12
|
-
const {
|
|
13
|
-
props: { wrapText }
|
|
14
|
-
} = grid.getInstance();
|
|
15
|
-
const [popStyle, setPopStyle] = useState({});
|
|
16
|
-
const [rowStyle, setRowStyle] = useState(style);
|
|
17
|
-
const gridInstance = grid.getInstance();
|
|
18
|
-
const { refs, isRowDragging } = gridInstance;
|
|
19
|
-
const [hasVerticalScrollBar, setHasVerticalScrollBar] = useState(refs.body.current && refs.body.current.offsetWidth > refs.body.current.clientWidth);
|
|
20
|
-
useEffect(() => {
|
|
21
|
-
const shouldOmit = isRowDragging ? ["top"] : [];
|
|
22
|
-
setPopStyle({
|
|
23
|
-
...popStyle,
|
|
24
|
-
...{ top: style && !isRowDragging ? style.top : "0" }
|
|
25
|
-
});
|
|
26
|
-
if (style) {
|
|
27
|
-
setHasVerticalScrollBar(true);
|
|
28
|
-
} else {
|
|
29
|
-
setHasVerticalScrollBar(false);
|
|
30
|
-
}
|
|
31
|
-
setRowStyle(omit(style || {
|
|
32
|
-
height: !wrapText ? RowSizes[gridInstance.props.rowSize] : "auto",
|
|
33
|
-
position: "relative"
|
|
34
|
-
}, [shouldOmit]));
|
|
35
|
-
}, [style, isRowDragging]);
|
|
36
|
-
return /* @__PURE__ */ React2.createElement("div", {
|
|
37
|
-
className: "row-renderer-fixed-height",
|
|
38
|
-
style: {
|
|
39
|
-
height: !wrapText ? RowSizes[gridInstance.props.rowSize] : "auto",
|
|
40
|
-
position: style ? "auto" : "relative"
|
|
41
|
-
}
|
|
42
|
-
}, /* @__PURE__ */ React2.createElement(Row, {
|
|
43
|
-
ref,
|
|
44
|
-
...props,
|
|
45
|
-
style: rowStyle
|
|
46
|
-
}), isEmpty(rowData) && !rowData.index && !rowData.rowIndex ? null : /* @__PURE__ */ React2.createElement("div", {
|
|
47
|
-
className: `toolbar-trigger-container ${style ? "move" : "stay"}`,
|
|
48
|
-
style: { ...popStyle }
|
|
49
|
-
}, /* @__PURE__ */ React2.createElement(ToolbarTrigger, {
|
|
50
|
-
grid,
|
|
51
|
-
rowData: { rowData, index, rowIndex },
|
|
52
|
-
hasScrollBar: hasVerticalScrollBar,
|
|
53
|
-
rowRef: ref
|
|
54
|
-
})));
|
|
55
|
-
};
|
|
56
|
-
Wrapped.propTypes = {
|
|
57
|
-
rowData: PropTypes.any,
|
|
58
|
-
index: PropTypes.number,
|
|
59
|
-
rowIndex: PropTypes.number,
|
|
60
|
-
style: PropTypes.any
|
|
61
|
-
};
|
|
62
|
-
return Wrapped;
|
|
63
|
-
};
|
|
64
|
-
export {
|
|
65
|
-
RowRenderer
|
|
66
|
-
};
|
|
67
|
-
//# sourceMappingURL=RowRenderer.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/toolbar/RowRenderer.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react-hooks/rules-of-hooks */\n/* eslint-disable max-statements */\n/* eslint-disable react/prop-types */\nimport React, { useEffect, useRef, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { isEmpty } from 'lodash';\nimport { omit } from '@elliemae/ds-utilities';\nimport { ToolbarTrigger } from './ToolbarTrigger';\nimport { RowSizes } from '../../rowSizes';\n\nexport const RowRenderer = (Row, grid) => {\n const Wrapped = (props) => {\n const ref = useRef();\n const { rowData = {}, index, rowIndex, style } = props;\n const {\n props: { wrapText },\n } = grid.getInstance();\n const [popStyle, setPopStyle] = useState({});\n const [rowStyle, setRowStyle] = useState(style);\n const gridInstance = grid.getInstance();\n const { refs, isRowDragging } = gridInstance;\n const [hasVerticalScrollBar, setHasVerticalScrollBar] = useState(\n refs.body.current && refs.body.current.offsetWidth > refs.body.current.clientWidth,\n );\n\n useEffect(() => {\n const shouldOmit = isRowDragging ? ['top'] : [];\n setPopStyle({\n ...popStyle,\n ...{ top: style && !isRowDragging ? style.top : '0' },\n });\n if (style) {\n // style defined means it has virtualization\n setHasVerticalScrollBar(true);\n } else {\n setHasVerticalScrollBar(false);\n }\n setRowStyle(\n omit(\n style || {\n height: !wrapText ? RowSizes[gridInstance.props.rowSize] : 'auto',\n position: 'relative',\n },\n [shouldOmit],\n ),\n );\n }, [style, isRowDragging]);\n return (\n <div\n className=\"row-renderer-fixed-height\"\n style={{\n height: !wrapText ? RowSizes[gridInstance.props.rowSize] : 'auto',\n position: style ? 'auto' : 'relative',\n // top: isDragging ? rowStyle.top - RowSizes[gridInstance.props.rowSize] : 'auto',\n }}\n >\n <Row ref={ref} {...props} style={rowStyle} />\n {isEmpty(rowData) && !rowData.index && !rowData.rowIndex ? null : (\n <div className={`toolbar-trigger-container ${style ? 'move' : 'stay'}`} style={{ ...popStyle }}>\n <ToolbarTrigger\n grid={grid}\n rowData={{ rowData, index, rowIndex }}\n hasScrollBar={hasVerticalScrollBar}\n rowRef={ref}\n />\n </div>\n )}\n </div>\n );\n };\n\n Wrapped.propTypes = {\n rowData: PropTypes.any,\n index: PropTypes.number,\n rowIndex: PropTypes.number,\n style: PropTypes.any,\n };\n\n return Wrapped;\n};\n"],
|
|
5
|
-
"mappings": "AAAA;ACGA;AACA;AACA;AACA;AACA;AACA;AAEO,MAAM,cAAc,CAAC,KAAK,SAAS;AACxC,QAAM,UAAU,CAAC,UAAU;AACzB,UAAM,MAAM;AACZ,UAAM,EAAE,UAAU,IAAI,OAAO,UAAU,UAAU;AACjD,UAAM;AAAA,MACJ,OAAO,EAAE;AAAA,QACP,KAAK;AACT,UAAM,CAAC,UAAU,eAAe,SAAS;AACzC,UAAM,CAAC,UAAU,eAAe,SAAS;AACzC,UAAM,eAAe,KAAK;AAC1B,UAAM,EAAE,MAAM,kBAAkB;AAChC,UAAM,CAAC,sBAAsB,2BAA2B,SACtD,KAAK,KAAK,WAAW,KAAK,KAAK,QAAQ,cAAc,KAAK,KAAK,QAAQ;AAGzE,cAAU,MAAM;AACd,YAAM,aAAa,gBAAgB,CAAC,SAAS;AAC7C,kBAAY;AAAA,WACP;AAAA,WACA,EAAE,KAAK,SAAS,CAAC,gBAAgB,MAAM,MAAM;AAAA;AAElD,UAAI,OAAO;AAET,gCAAwB;AAAA,aACnB;AACL,gCAAwB;AAAA;AAE1B,kBACE,KACE,SAAS;AAAA,QACP,QAAQ,CAAC,WAAW,SAAS,aAAa,MAAM,WAAW;AAAA,QAC3D,UAAU;AAAA,SAEZ,CAAC;AAAA,OAGJ,CAAC,OAAO;AACX,WACE,qCAAC,OAAD;AAAA,MACE,WAAU;AAAA,MACV,OAAO;AAAA,QACL,QAAQ,CAAC,WAAW,SAAS,aAAa,MAAM,WAAW;AAAA,QAC3D,UAAU,QAAQ,SAAS;AAAA;AAAA,OAI7B,qCAAC,KAAD;AAAA,MAAK;AAAA,SAAc;AAAA,MAAO,OAAO;AAAA,QAChC,QAAQ,YAAY,CAAC,QAAQ,SAAS,CAAC,QAAQ,WAAW,OACzD,qCAAC,OAAD;AAAA,MAAK,WAAW,6BAA6B,QAAQ,SAAS;AAAA,MAAU,OAAO,KAAK;AAAA,OAClF,qCAAC,gBAAD;AAAA,MACE;AAAA,MACA,SAAS,EAAE,SAAS,OAAO;AAAA,MAC3B,cAAc;AAAA,MACd,QAAQ;AAAA;AAAA;AAQpB,UAAQ,YAAY;AAAA,IAClB,SAAS,UAAU;AAAA,IACnB,OAAO,UAAU;AAAA,IACjB,UAAU,UAAU;AAAA,IACpB,OAAO,UAAU;AAAA;AAGnB,SAAO;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import React2 from "react";
|
|
3
|
-
import { createInstancePlugin } from "@elliemae/ds-shared/createDataInstance/createInstancePlugin";
|
|
4
|
-
import { appendCellFormatter } from "@elliemae/ds-shared/useDataGrid/initColumnDefinition";
|
|
5
|
-
import { RowRenderer } from "./RowRenderer";
|
|
6
|
-
const decorateColumns = (columns) => {
|
|
7
|
-
const lastColumn = columns[columns.length - 1];
|
|
8
|
-
return [
|
|
9
|
-
...columns.slice(0, -1),
|
|
10
|
-
appendCellFormatter([
|
|
11
|
-
(value) => /* @__PURE__ */ React2.createElement(React2.Fragment, null, value, /* @__PURE__ */ React2.createElement("div", {
|
|
12
|
-
style: { width: 34, maxWidth: 34, overflow: "hidden" }
|
|
13
|
-
}))
|
|
14
|
-
], lastColumn, "fixedFormatters")
|
|
15
|
-
];
|
|
16
|
-
};
|
|
17
|
-
const decorateRenderers = (renderers, grid) => {
|
|
18
|
-
const Row = renderers.body.row;
|
|
19
|
-
renderers.body.row = RowRenderer(Row, grid);
|
|
20
|
-
return renderers;
|
|
21
|
-
};
|
|
22
|
-
const ToolbarPlugin = createInstancePlugin("toolbar", {
|
|
23
|
-
decorateRenderers,
|
|
24
|
-
decorateColumns
|
|
25
|
-
});
|
|
26
|
-
export {
|
|
27
|
-
ToolbarPlugin
|
|
28
|
-
};
|
|
29
|
-
//# sourceMappingURL=ToolbarPlugin.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/toolbar/ToolbarPlugin.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { createInstancePlugin } from '@elliemae/ds-shared/createDataInstance/createInstancePlugin';\nimport { appendCellFormatter } from '@elliemae/ds-shared/useDataGrid/initColumnDefinition';\nimport { RowRenderer } from './RowRenderer';\n\nconst decorateColumns = (columns) => {\n const lastColumn = columns[columns.length - 1];\n return [\n ...columns.slice(0, -1),\n appendCellFormatter(\n [\n (value) => (\n <>\n {value}\n <div style={{ width: 34, maxWidth: 34, overflow: 'hidden' }} />\n </>\n ),\n ],\n lastColumn,\n 'fixedFormatters',\n ),\n ];\n};\n\nconst decorateRenderers = (renderers, grid) => {\n const Row = renderers.body.row;\n renderers.body.row = RowRenderer(Row, grid);\n return renderers;\n};\n\nexport const ToolbarPlugin = createInstancePlugin('toolbar', {\n decorateRenderers,\n decorateColumns,\n});\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AAEA,MAAM,kBAAkB,CAAC,YAAY;AACnC,QAAM,aAAa,QAAQ,QAAQ,SAAS;AAC5C,SAAO;AAAA,IACL,GAAG,QAAQ,MAAM,GAAG;AAAA,IACpB,oBACE;AAAA,MACE,CAAC,UACC,4DACG,OACD,qCAAC,OAAD;AAAA,QAAK,OAAO,EAAE,OAAO,IAAI,UAAU,IAAI,UAAU;AAAA;AAAA,OAIvD,YACA;AAAA;AAAA;AAKN,MAAM,oBAAoB,CAAC,WAAW,SAAS;AAC7C,QAAM,MAAM,UAAU,KAAK;AAC3B,YAAU,KAAK,MAAM,YAAY,KAAK;AACtC,SAAO;AAAA;AAGF,MAAM,gBAAgB,qBAAqB,WAAW;AAAA,EAC3D;AAAA,EACA;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import React2, { useState } from "react";
|
|
3
|
-
import styled from "styled-components";
|
|
4
|
-
import { DSButton } from "@elliemae/ds-button";
|
|
5
|
-
import { MoreOptionsVert } from "@elliemae/ds-icons";
|
|
6
|
-
const ToolbarBtns = styled.div`
|
|
7
|
-
& > .em-ds-toolbar {
|
|
8
|
-
box-shadow: none;
|
|
9
|
-
}
|
|
10
|
-
`;
|
|
11
|
-
const ToolbarWrapper = styled.div`
|
|
12
|
-
display: flex;
|
|
13
|
-
align-items: center;
|
|
14
|
-
height: ${(props) => props.rowSize === "normal" ? "36px" : "28px"};
|
|
15
|
-
margin-left: -4px;
|
|
16
|
-
margin-right: ${(props) => props.hasScrollBar ? "0" : "-10px"};
|
|
17
|
-
padding-right: 4px;
|
|
18
|
-
pointer-events: all;
|
|
19
|
-
background: white;
|
|
20
|
-
${(props) => props.showShadow ? `box-shadow: -1px 0px 1px 0px rgba(0, 0, 0, 0.2),
|
|
21
|
-
1px 0px 2px 0px rgba(0, 0, 0, 0.2);` : ""}
|
|
22
|
-
&:hover {
|
|
23
|
-
box-shadow: -1px 0px 1px 0px rgba(0, 0, 0, 0.2), 1px 0px 2px 0px rgba(0, 0, 0, 0.2);
|
|
24
|
-
& > .toolbar-trigger {
|
|
25
|
-
border: none;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
`;
|
|
29
|
-
const ToolbarPosition = styled.div`
|
|
30
|
-
position: absolute;
|
|
31
|
-
z-index: 10;
|
|
32
|
-
display: flex;
|
|
33
|
-
justify-content: flex-end;
|
|
34
|
-
align-items: center;
|
|
35
|
-
width: 0;
|
|
36
|
-
pointer-events: none;
|
|
37
|
-
top: 0;
|
|
38
|
-
height: ${(props) => props.rowRef.current ? `${props.rowRef.current.offsetHeight}px` : "36px"};
|
|
39
|
-
margin-top: ${(props) => props.rowSize === "normal" ? "0" : "0"};
|
|
40
|
-
`;
|
|
41
|
-
const ToolbarTrigger = ({ grid, rowData, hasScrollBar, rowRef }) => {
|
|
42
|
-
const {
|
|
43
|
-
props: { renderToolbar, rowSize }
|
|
44
|
-
} = grid.getInstance();
|
|
45
|
-
const [show, setShow] = useState(false);
|
|
46
|
-
const toolbar = show ? renderToolbar({
|
|
47
|
-
...rowData,
|
|
48
|
-
size: rowSize,
|
|
49
|
-
isToolbarShown: show,
|
|
50
|
-
setToolbarShow: setShow
|
|
51
|
-
}) : null;
|
|
52
|
-
return /* @__PURE__ */ React2.createElement(ToolbarPosition, {
|
|
53
|
-
rowSize,
|
|
54
|
-
rowRef
|
|
55
|
-
}, /* @__PURE__ */ React2.createElement(ToolbarWrapper, {
|
|
56
|
-
onMouseEnter: () => setShow(true),
|
|
57
|
-
onMouseLeave: () => setShow(false),
|
|
58
|
-
showShadow: show,
|
|
59
|
-
rowSize,
|
|
60
|
-
hasScrollBar
|
|
61
|
-
}, show && /* @__PURE__ */ React2.createElement(ToolbarBtns, null, toolbar), /* @__PURE__ */ React2.createElement(DSButton, {
|
|
62
|
-
buttonType: "text",
|
|
63
|
-
className: "toolbar-trigger",
|
|
64
|
-
"data-testid": "toolbar-trigger",
|
|
65
|
-
icon: /* @__PURE__ */ React2.createElement(MoreOptionsVert, null),
|
|
66
|
-
index: rowData.index,
|
|
67
|
-
onClick: () => setShow(true),
|
|
68
|
-
tabIndex: -1
|
|
69
|
-
})));
|
|
70
|
-
};
|
|
71
|
-
var ToolbarTrigger_default = ToolbarTrigger;
|
|
72
|
-
export {
|
|
73
|
-
ToolbarTrigger,
|
|
74
|
-
ToolbarTrigger_default as default
|
|
75
|
-
};
|
|
76
|
-
//# sourceMappingURL=ToolbarTrigger.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/toolbar/ToolbarTrigger.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useState } from 'react';\nimport styled from 'styled-components';\nimport { DSButton } from '@elliemae/ds-button';\nimport { MoreOptionsVert } from '@elliemae/ds-icons';\n\nconst ToolbarBtns = styled.div`\n & > .em-ds-toolbar {\n box-shadow: none;\n }\n`;\n\nconst ToolbarWrapper = styled.div`\n display: flex;\n align-items: center;\n height: ${(props) => (props.rowSize === 'normal' ? '36px' : '28px')};\n margin-left: -4px;\n margin-right: ${(props) => (props.hasScrollBar ? '0' : '-10px')};\n padding-right: 4px;\n pointer-events: all;\n background: white;\n ${(props) =>\n props.showShadow\n ? `box-shadow: -1px 0px 1px 0px rgba(0, 0, 0, 0.2),\n 1px 0px 2px 0px rgba(0, 0, 0, 0.2);`\n : ''}\n &:hover {\n box-shadow: -1px 0px 1px 0px rgba(0, 0, 0, 0.2), 1px 0px 2px 0px rgba(0, 0, 0, 0.2);\n & > .toolbar-trigger {\n border: none;\n }\n }\n`;\n\nconst ToolbarPosition = styled.div`\n position: absolute;\n z-index: 10;\n display: flex;\n justify-content: flex-end;\n align-items: center;\n width: 0;\n pointer-events: none;\n top: 0;\n height: ${(props) => (props.rowRef.current ? `${props.rowRef.current.offsetHeight}px` : '36px')};\n margin-top: ${(props) => (props.rowSize === 'normal' ? '0' : '0')};\n`;\n\n// eslint-disable-next-line react/prop-types\nexport const ToolbarTrigger = ({ grid, rowData, hasScrollBar, rowRef }) => {\n const {\n props: { renderToolbar, rowSize },\n // eslint-disable-next-line react/prop-types\n } = grid.getInstance();\n const [show, setShow] = useState(false);\n /* eslint-disable indent */\n const toolbar = show\n ? renderToolbar({\n ...rowData,\n size: rowSize,\n isToolbarShown: show,\n setToolbarShow: setShow,\n })\n : null;\n /* eslint-enable indent */\n return (\n <ToolbarPosition rowSize={rowSize} rowRef={rowRef}>\n <ToolbarWrapper\n onMouseEnter={() => setShow(true)}\n onMouseLeave={() => setShow(false)}\n showShadow={show}\n rowSize={rowSize}\n hasScrollBar={hasScrollBar}\n >\n {show && <ToolbarBtns>{toolbar}</ToolbarBtns>}\n <DSButton\n buttonType=\"text\"\n className=\"toolbar-trigger\"\n data-testid=\"toolbar-trigger\"\n icon={<MoreOptionsVert />}\n // eslint-disable-next-line react/prop-types\n index={rowData.index}\n onClick={() => setShow(true)}\n tabIndex={-1}\n />\n </ToolbarWrapper>\n </ToolbarPosition>\n );\n};\n\nexport default ToolbarTrigger;\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AAEA,MAAM,cAAc,OAAO;AAAA;AAAA;AAAA;AAAA;AAM3B,MAAM,iBAAiB,OAAO;AAAA;AAAA;AAAA,YAGlB,CAAC,UAAW,MAAM,YAAY,WAAW,SAAS;AAAA;AAAA,kBAE5C,CAAC,UAAW,MAAM,eAAe,MAAM;AAAA;AAAA;AAAA;AAAA,IAIrD,CAAC,UACD,MAAM,aACF;AAAA,yCAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASR,MAAM,kBAAkB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YASnB,CAAC,UAAW,MAAM,OAAO,UAAU,GAAG,MAAM,OAAO,QAAQ,mBAAmB;AAAA,gBAC1E,CAAC,UAAW,MAAM,YAAY,WAAW,MAAM;AAAA;AAIxD,MAAM,iBAAiB,CAAC,EAAE,MAAM,SAAS,cAAc,aAAa;AACzE,QAAM;AAAA,IACJ,OAAO,EAAE,eAAe;AAAA,MAEtB,KAAK;AACT,QAAM,CAAC,MAAM,WAAW,SAAS;AAEjC,QAAM,UAAU,OACZ,cAAc;AAAA,OACT;AAAA,IACH,MAAM;AAAA,IACN,gBAAgB;AAAA,IAChB,gBAAgB;AAAA,OAElB;AAEJ,SACE,qCAAC,iBAAD;AAAA,IAAiB;AAAA,IAAkB;AAAA,KACjC,qCAAC,gBAAD;AAAA,IACE,cAAc,MAAM,QAAQ;AAAA,IAC5B,cAAc,MAAM,QAAQ;AAAA,IAC5B,YAAY;AAAA,IACZ;AAAA,IACA;AAAA,KAEC,QAAQ,qCAAC,aAAD,MAAc,UACvB,qCAAC,UAAD;AAAA,IACE,YAAW;AAAA,IACX,WAAU;AAAA,IACV,eAAY;AAAA,IACZ,MAAM,qCAAC,iBAAD;AAAA,IAEN,OAAO,QAAQ;AAAA,IACf,SAAS,MAAM,QAAQ;AAAA,IACvB,UAAU;AAAA;AAAA;AAOpB,IAAO,yBAAQ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/toolbar/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { ToolbarPlugin } from './ToolbarPlugin';\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import React2, { forwardRef, useRef } from "react";
|
|
3
|
-
import { FixedSizeList as List } from "react-window";
|
|
4
|
-
import { mergeRefs, useWindowScrollerList, cx } from "@elliemae/ds-utilities";
|
|
5
|
-
const AutoHeightList = forwardRef(({
|
|
6
|
-
itemCount,
|
|
7
|
-
className,
|
|
8
|
-
innerRef,
|
|
9
|
-
itemData,
|
|
10
|
-
itemKey,
|
|
11
|
-
itemSize,
|
|
12
|
-
outerRef,
|
|
13
|
-
component: ListComponent = List,
|
|
14
|
-
...otherProps
|
|
15
|
-
}, ref) => {
|
|
16
|
-
const listRef = useRef();
|
|
17
|
-
const outerListRef = useRef();
|
|
18
|
-
useWindowScrollerList({
|
|
19
|
-
listInstance: listRef,
|
|
20
|
-
outerListRef
|
|
21
|
-
});
|
|
22
|
-
return /* @__PURE__ */ React2.createElement(ListComponent, {
|
|
23
|
-
...otherProps,
|
|
24
|
-
ref: mergeRefs(ref, listRef),
|
|
25
|
-
className: cx(className, "window-scroller-override"),
|
|
26
|
-
height: window.innerHeight,
|
|
27
|
-
innerRef,
|
|
28
|
-
itemCount,
|
|
29
|
-
itemData,
|
|
30
|
-
itemKey,
|
|
31
|
-
itemSize,
|
|
32
|
-
outerRef: mergeRefs(outerListRef, outerRef),
|
|
33
|
-
overscanCount: 10,
|
|
34
|
-
useIsScrolling: true
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
var AutoHeightList_default = AutoHeightList;
|
|
38
|
-
export {
|
|
39
|
-
AutoHeightList,
|
|
40
|
-
AutoHeightList_default as default
|
|
41
|
-
};
|
|
42
|
-
//# sourceMappingURL=AutoHeightList.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/virtualization/AutoHeightList.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { forwardRef, useRef } from 'react';\nimport { FixedSizeList as List } from 'react-window';\nimport { mergeRefs , useWindowScrollerList, cx } from '@elliemae/ds-utilities';\n\n// eslint-disable-next-line react/display-name\nexport const AutoHeightList = forwardRef(\n (\n {\n itemCount,\n className,\n innerRef,\n itemData,\n itemKey,\n itemSize,\n outerRef,\n component: ListComponent = List,\n ...otherProps\n },\n ref,\n ) => {\n const listRef = useRef();\n const outerListRef = useRef();\n\n useWindowScrollerList({\n listInstance: listRef,\n outerListRef,\n });\n\n return (\n <ListComponent\n {...otherProps}\n ref={mergeRefs(ref, listRef)}\n className={cx(className, 'window-scroller-override')}\n height={window.innerHeight}\n innerRef={innerRef}\n itemCount={itemCount}\n itemData={itemData}\n itemKey={itemKey}\n itemSize={itemSize}\n outerRef={mergeRefs(outerListRef, outerRef)}\n overscanCount={10}\n useIsScrolling\n />\n );\n },\n);\n\nexport default AutoHeightList;\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;AACA;AAGO,MAAM,iBAAiB,WAC5B,CACE;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW,gBAAgB;AAAA,KACxB;AAAA,GAEL,QACG;AACH,QAAM,UAAU;AAChB,QAAM,eAAe;AAErB,wBAAsB;AAAA,IACpB,cAAc;AAAA,IACd;AAAA;AAGF,SACE,qCAAC,eAAD;AAAA,OACM;AAAA,IACJ,KAAK,UAAU,KAAK;AAAA,IACpB,WAAW,GAAG,WAAW;AAAA,IACzB,QAAQ,OAAO;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,UAAU,UAAU,cAAc;AAAA,IAClC,eAAe;AAAA,IACf,gBAAc;AAAA;AAAA;AAMtB,IAAO,yBAAQ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import React2, { useMemo, useRef } from "react";
|
|
3
|
-
import { get } from "lodash";
|
|
4
|
-
import { FocusGrid } from "@elliemae/ds-shared/FocusGroup/FocusGrid";
|
|
5
|
-
import { runAll } from "@elliemae/ds-utilities";
|
|
6
|
-
import { mergeRefs } from "@elliemae/ds-utilities";
|
|
7
|
-
import { createInstancePlugin } from "@elliemae/ds-shared/createDataInstance/createInstancePlugin";
|
|
8
|
-
import { VirtualizedBody } from "./VirtualizedBody";
|
|
9
|
-
const VirtualizationPlugin = createInstancePlugin("virtualization", {
|
|
10
|
-
decorateRenderers(renderers, grid) {
|
|
11
|
-
const BodyWrapper = renderers.body.wrapper;
|
|
12
|
-
renderers.body.wrapper = useMemo(() => (props) => {
|
|
13
|
-
const { listProps = {}, rows } = props;
|
|
14
|
-
const {
|
|
15
|
-
hotKeys,
|
|
16
|
-
props: { autoHeight, autoScrollToId, expandable, overscanCount, rowSize },
|
|
17
|
-
refs: { innerBody },
|
|
18
|
-
setHasScroll,
|
|
19
|
-
state: { filters }
|
|
20
|
-
} = grid.getInstance();
|
|
21
|
-
const listRef = useRef();
|
|
22
|
-
const nextListProps = {
|
|
23
|
-
...listProps,
|
|
24
|
-
ref: mergeRefs(listRef, listProps.ref)
|
|
25
|
-
};
|
|
26
|
-
return /* @__PURE__ */ React2.createElement(FocusGrid, {
|
|
27
|
-
hotKeys,
|
|
28
|
-
keyBindings: ({ defaultBindings }) => ({
|
|
29
|
-
...defaultBindings,
|
|
30
|
-
Home: runAll((e) => {
|
|
31
|
-
if (e.ctrlKey) {
|
|
32
|
-
listRef.current.scrollToItem(0);
|
|
33
|
-
setTimeout(() => defaultBindings.Home(e), 10);
|
|
34
|
-
} else {
|
|
35
|
-
defaultBindings.Home(e);
|
|
36
|
-
}
|
|
37
|
-
}),
|
|
38
|
-
End: runAll((e) => {
|
|
39
|
-
if (e.ctrlKey) {
|
|
40
|
-
listRef.current.scrollToItem(rows.length - 1);
|
|
41
|
-
setTimeout(() => defaultBindings.End(e), 10);
|
|
42
|
-
} else {
|
|
43
|
-
defaultBindings.End(e);
|
|
44
|
-
}
|
|
45
|
-
})
|
|
46
|
-
}),
|
|
47
|
-
shouldRefocus: false
|
|
48
|
-
}, /* @__PURE__ */ React2.createElement(VirtualizedBody, {
|
|
49
|
-
...props,
|
|
50
|
-
autoScrollToId,
|
|
51
|
-
autoHeight,
|
|
52
|
-
component: BodyWrapper,
|
|
53
|
-
expandable,
|
|
54
|
-
innerBody,
|
|
55
|
-
listProps: nextListProps,
|
|
56
|
-
overscanCount,
|
|
57
|
-
rowSize,
|
|
58
|
-
setHasScroll,
|
|
59
|
-
filters
|
|
60
|
-
}));
|
|
61
|
-
}, [get(grid.getInstance(), "rows.length")]);
|
|
62
|
-
return renderers;
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
export {
|
|
66
|
-
VirtualizationPlugin
|
|
67
|
-
};
|
|
68
|
-
//# sourceMappingURL=VirtualizationPlugin.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/virtualization/VirtualizationPlugin.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-param-reassign */\n/* eslint-disable react/prop-types */\n/* eslint-disable react-hooks/rules-of-hooks */\nimport React, { useMemo, useRef } from 'react';\nimport { get } from 'lodash';\nimport { FocusGrid } from '@elliemae/ds-shared/FocusGroup/FocusGrid';\nimport { runAll } from '@elliemae/ds-utilities';\nimport { mergeRefs } from '@elliemae/ds-utilities';\nimport { createInstancePlugin } from '@elliemae/ds-shared/createDataInstance/createInstancePlugin';\nimport { VirtualizedBody } from './VirtualizedBody';\n\nexport const VirtualizationPlugin = createInstancePlugin('virtualization', {\n decorateRenderers(renderers, grid) {\n const BodyWrapper = renderers.body.wrapper;\n // eslint-disable-next-line react/display-name\n renderers.body.wrapper = useMemo(\n () => (props) => {\n const { listProps = {}, rows } = props;\n const {\n hotKeys,\n props: { autoHeight, autoScrollToId, expandable, overscanCount, rowSize },\n refs: { innerBody },\n setHasScroll,\n state: { filters },\n } = grid.getInstance();\n\n const listRef = useRef();\n const nextListProps = {\n ...listProps,\n ref: mergeRefs(listRef, listProps.ref),\n };\n return (\n <FocusGrid\n hotKeys={hotKeys}\n keyBindings={({ defaultBindings }) => ({\n ...defaultBindings,\n // todo: this is kind of hacky, since it's virtualized and there's\n // the possibility that the firsts or lasts rows aren't rendered\n Home: runAll((e) => {\n if (e.ctrlKey) {\n listRef.current.scrollToItem(0);\n setTimeout(() => defaultBindings.Home(e), 10);\n } else {\n defaultBindings.Home(e);\n }\n }),\n End: runAll((e) => {\n if (e.ctrlKey) {\n listRef.current.scrollToItem(rows.length - 1);\n setTimeout(() => defaultBindings.End(e), 10);\n } else {\n defaultBindings.End(e);\n }\n }),\n })}\n shouldRefocus={false}\n >\n <VirtualizedBody\n {...props}\n autoScrollToId={autoScrollToId}\n autoHeight={autoHeight}\n component={BodyWrapper}\n expandable={expandable}\n innerBody={innerBody}\n listProps={nextListProps}\n overscanCount={overscanCount}\n rowSize={rowSize}\n setHasScroll={setHasScroll}\n filters={filters}\n />\n </FocusGrid>\n );\n },\n [get(grid.getInstance(), 'rows.length')],\n );\n return renderers;\n },\n});\n"],
|
|
5
|
-
"mappings": "AAAA;ACGA;AACA;AACA;AACA;AACA;AACA;AACA;AAEO,MAAM,uBAAuB,qBAAqB,kBAAkB;AAAA,EACzE,kBAAkB,WAAW,MAAM;AACjC,UAAM,cAAc,UAAU,KAAK;AAEnC,cAAU,KAAK,UAAU,QACvB,MAAM,CAAC,UAAU;AACf,YAAM,EAAE,YAAY,IAAI,SAAS;AACjC,YAAM;AAAA,QACJ;AAAA,QACA,OAAO,EAAE,YAAY,gBAAgB,YAAY,eAAe;AAAA,QAChE,MAAM,EAAE;AAAA,QACR;AAAA,QACA,OAAO,EAAE;AAAA,UACP,KAAK;AAET,YAAM,UAAU;AAChB,YAAM,gBAAgB;AAAA,WACjB;AAAA,QACH,KAAK,UAAU,SAAS,UAAU;AAAA;AAEpC,aACE,qCAAC,WAAD;AAAA,QACE;AAAA,QACA,aAAa,CAAC,EAAE,sBAAuB;AAAA,aAClC;AAAA,UAGH,MAAM,OAAO,CAAC,MAAM;AAClB,gBAAI,EAAE,SAAS;AACb,sBAAQ,QAAQ,aAAa;AAC7B,yBAAW,MAAM,gBAAgB,KAAK,IAAI;AAAA,mBACrC;AACL,8BAAgB,KAAK;AAAA;AAAA;AAAA,UAGzB,KAAK,OAAO,CAAC,MAAM;AACjB,gBAAI,EAAE,SAAS;AACb,sBAAQ,QAAQ,aAAa,KAAK,SAAS;AAC3C,yBAAW,MAAM,gBAAgB,IAAI,IAAI;AAAA,mBACpC;AACL,8BAAgB,IAAI;AAAA;AAAA;AAAA;AAAA,QAI1B,eAAe;AAAA,SAEf,qCAAC,iBAAD;AAAA,WACM;AAAA,QACJ;AAAA,QACA;AAAA,QACA,WAAW;AAAA,QACX;AAAA,QACA;AAAA,QACA,WAAW;AAAA,QACX;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,OAKR,CAAC,IAAI,KAAK,eAAe;AAE3B,WAAO;AAAA;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,230 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import React2, { useEffect, useState, useCallback, useRef, useLayoutEffect } from "react";
|
|
3
|
-
import PropTypes from "prop-types";
|
|
4
|
-
import { mergeRefs, debounce, isNaN } from "@elliemae/ds-utilities";
|
|
5
|
-
import { NoResults } from "../../components/NoResults";
|
|
6
|
-
import { VirtualizedBodyRow } from "./VirtualizedBodyRow";
|
|
7
|
-
import { RowSizes } from "../../rowSizes";
|
|
8
|
-
import { isSafari } from "./helper";
|
|
9
|
-
const wrapperSafari = {};
|
|
10
|
-
const wrapperGeneric = { overflowY: "auto", overflowX: "visible" };
|
|
11
|
-
const VirtualizedBody = (props) => {
|
|
12
|
-
const {
|
|
13
|
-
autoScrollToId,
|
|
14
|
-
columns,
|
|
15
|
-
component: Component,
|
|
16
|
-
expandable,
|
|
17
|
-
innerRef,
|
|
18
|
-
innerBody,
|
|
19
|
-
isPlaceholderActive,
|
|
20
|
-
listProps,
|
|
21
|
-
noResultsPlaceholder,
|
|
22
|
-
overscanCount,
|
|
23
|
-
rows,
|
|
24
|
-
rowHeight: defaultRowHeight,
|
|
25
|
-
rowKey,
|
|
26
|
-
rowRenderer,
|
|
27
|
-
rowSize,
|
|
28
|
-
setHasScroll,
|
|
29
|
-
filters
|
|
30
|
-
} = props;
|
|
31
|
-
const rowHeight = defaultRowHeight || RowSizes[rowSize];
|
|
32
|
-
const [scrollTop, setScrollTop] = useState(0);
|
|
33
|
-
const [visibleHeight, setVisibleHeight] = useState(0);
|
|
34
|
-
const [hasScrollBar, setHasScrollBar] = useState(false);
|
|
35
|
-
const rowStyleCache = useRef({});
|
|
36
|
-
const [renderedIndexes, setRenderedIndexes] = useState([0, 30]);
|
|
37
|
-
const getCalculatedHeightBetweenIndexes = (start, end) => {
|
|
38
|
-
const { itemSize = () => rowHeight } = listProps;
|
|
39
|
-
if (expandable) {
|
|
40
|
-
return rows.slice(start, end).map((_, idx) => idx).map((idx) => itemSize(idx)).reduce((acc, curr) => acc + curr, 0);
|
|
41
|
-
}
|
|
42
|
-
return (end - start) * rowHeight;
|
|
43
|
-
};
|
|
44
|
-
const generateRowPositionMap = () => rows.map((row, idx) => getCalculatedHeightBetweenIndexes(0, idx));
|
|
45
|
-
const rowPositionMap = useRef(generateRowPositionMap());
|
|
46
|
-
const [virtualizedBodyRef, setVirtualizedBodyRef] = useState(null);
|
|
47
|
-
const handlerRef = useRef();
|
|
48
|
-
const autoScrollTo = useCallback((scrollHeight) => {
|
|
49
|
-
const { itemSize = () => rowHeight } = listProps;
|
|
50
|
-
const idx = rows.findIndex((item) => item[rowKey] === autoScrollToId);
|
|
51
|
-
let val = rowPositionMap.current[idx] || 0;
|
|
52
|
-
const lastPositionIdx = rowPositionMap.current.length - 1;
|
|
53
|
-
let lastPosition = 0;
|
|
54
|
-
if (lastPositionIdx > -1) {
|
|
55
|
-
lastPosition = rowPositionMap.current[lastPositionIdx] - scrollHeight + itemSize(lastPositionIdx);
|
|
56
|
-
}
|
|
57
|
-
if (lastPosition < val) {
|
|
58
|
-
val = lastPosition;
|
|
59
|
-
}
|
|
60
|
-
if (virtualizedBodyRef) {
|
|
61
|
-
if (idx > -1) {
|
|
62
|
-
setScrollTop(val);
|
|
63
|
-
virtualizedBodyRef.scrollTop = val;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}, [rows, virtualizedBodyRef]);
|
|
67
|
-
useEffect(() => {
|
|
68
|
-
autoScrollTo(visibleHeight);
|
|
69
|
-
}, [autoScrollToId, visibleHeight]);
|
|
70
|
-
const handler = useCallback(debounce(({ target }) => {
|
|
71
|
-
setScrollTop(target.scrollTop || 0);
|
|
72
|
-
}, 100), [setScrollTop]);
|
|
73
|
-
useEffect(() => {
|
|
74
|
-
setScrollTop(0);
|
|
75
|
-
}, [filters]);
|
|
76
|
-
useEffect(() => {
|
|
77
|
-
handlerRef.current = handler;
|
|
78
|
-
}, [handler]);
|
|
79
|
-
useLayoutEffect(() => {
|
|
80
|
-
let top = Math.ceil(scrollTop / rowHeight);
|
|
81
|
-
let bot = Math.ceil((scrollTop + visibleHeight) / rowHeight);
|
|
82
|
-
if (expandable) {
|
|
83
|
-
rowPositionMap.current = generateRowPositionMap();
|
|
84
|
-
top = rowPositionMap.current.findIndex((item) => item > scrollTop);
|
|
85
|
-
bot = rowPositionMap.current.findIndex((item) => item > scrollTop + visibleHeight);
|
|
86
|
-
if (bot === -1)
|
|
87
|
-
bot = rowPositionMap.current.length;
|
|
88
|
-
}
|
|
89
|
-
let upperBound = top - 1 - overscanCount;
|
|
90
|
-
let lowerBound = bot - 1 + overscanCount;
|
|
91
|
-
if (upperBound < 0) {
|
|
92
|
-
upperBound = 0;
|
|
93
|
-
}
|
|
94
|
-
if (lowerBound - upperBound < overscanCount) {
|
|
95
|
-
lowerBound = upperBound + overscanCount;
|
|
96
|
-
}
|
|
97
|
-
if (lowerBound > rows.length) {
|
|
98
|
-
lowerBound = rows.length;
|
|
99
|
-
}
|
|
100
|
-
setHasScrollBar(visibleHeight < getHeight());
|
|
101
|
-
setHasScroll(visibleHeight < getHeight());
|
|
102
|
-
setRenderedIndexes([upperBound, lowerBound]);
|
|
103
|
-
}, [visibleHeight, scrollTop, rows]);
|
|
104
|
-
useLayoutEffect(() => {
|
|
105
|
-
if (virtualizedBodyRef) {
|
|
106
|
-
const parsedVisibleHeight = parseFloat(window.getComputedStyle(virtualizedBodyRef, null).getPropertyValue("height"));
|
|
107
|
-
if (!isNaN(parsedVisibleHeight)) {
|
|
108
|
-
setVisibleHeight(parsedVisibleHeight);
|
|
109
|
-
autoScrollTo(parsedVisibleHeight);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}, [rows, virtualizedBodyRef]);
|
|
113
|
-
useEffect(() => {
|
|
114
|
-
if (virtualizedBodyRef) {
|
|
115
|
-
const eventListener = (event) => handlerRef.current(event);
|
|
116
|
-
virtualizedBodyRef.addEventListener("scroll", eventListener);
|
|
117
|
-
return () => {
|
|
118
|
-
virtualizedBodyRef.removeEventListener("scroll", eventListener);
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
return () => null;
|
|
122
|
-
}, [virtualizedBodyRef]);
|
|
123
|
-
const getHeight = () => {
|
|
124
|
-
let returnHeight = 0;
|
|
125
|
-
if (expandable) {
|
|
126
|
-
returnHeight = getCalculatedHeightBetweenIndexes(0, rows.length) + 8;
|
|
127
|
-
} else {
|
|
128
|
-
returnHeight = rows.length * rowHeight + 8;
|
|
129
|
-
}
|
|
130
|
-
if (virtualizedBodyRef && virtualizedBodyRef.scrollHeight > virtualizedBodyRef.clientHeight) {
|
|
131
|
-
return returnHeight + 10;
|
|
132
|
-
}
|
|
133
|
-
return returnHeight;
|
|
134
|
-
};
|
|
135
|
-
const getRowStyle = (row, index, specificRowHeight) => {
|
|
136
|
-
const { itemSize } = listProps;
|
|
137
|
-
if (!expandable && rowStyleCache.current[index]) {
|
|
138
|
-
return rowStyleCache.current[index];
|
|
139
|
-
}
|
|
140
|
-
rowStyleCache.current[index] = {
|
|
141
|
-
height: itemSize ? itemSize(index) : specificRowHeight,
|
|
142
|
-
left: 0,
|
|
143
|
-
right: 0,
|
|
144
|
-
top: getCalculatedHeightBetweenIndexes(0, index),
|
|
145
|
-
position: "absolute"
|
|
146
|
-
};
|
|
147
|
-
return rowStyleCache.current[index];
|
|
148
|
-
};
|
|
149
|
-
const generateRenderedRows = () => rows.slice(renderedIndexes[0], renderedIndexes[1] + 1).map((_, index) => /* @__PURE__ */ React2.createElement(VirtualizedBodyRow, {
|
|
150
|
-
data: {
|
|
151
|
-
rows,
|
|
152
|
-
columns,
|
|
153
|
-
rowKey,
|
|
154
|
-
renderer: { rowRenderer }
|
|
155
|
-
},
|
|
156
|
-
index: renderedIndexes[0] + index,
|
|
157
|
-
key: rows[renderedIndexes[0] + index][rowKey],
|
|
158
|
-
style: getRowStyle(rows[renderedIndexes[0] + index], renderedIndexes[0] + index, rowHeight)
|
|
159
|
-
}));
|
|
160
|
-
const wrapperStyle = {
|
|
161
|
-
height: "100%",
|
|
162
|
-
...isSafari ? wrapperSafari : wrapperGeneric
|
|
163
|
-
};
|
|
164
|
-
const bodyStyle = {
|
|
165
|
-
height: getHeight(),
|
|
166
|
-
willChange: "transform",
|
|
167
|
-
backfaceVisibility: "hidden"
|
|
168
|
-
};
|
|
169
|
-
return /* @__PURE__ */ React2.createElement(Component, {
|
|
170
|
-
...props,
|
|
171
|
-
innerRef
|
|
172
|
-
}, !isPlaceholderActive ? /* @__PURE__ */ React2.createElement("div", {
|
|
173
|
-
className: "virtualized-body-wrapper",
|
|
174
|
-
style: wrapperStyle,
|
|
175
|
-
ref: (elem) => {
|
|
176
|
-
if (elem) {
|
|
177
|
-
if (isSafari) {
|
|
178
|
-
setVirtualizedBodyRef(elem.parentElement);
|
|
179
|
-
elem.parentElement.scrollTop = scrollTop;
|
|
180
|
-
mergeRefs(listProps.outerRef)(elem.parentElement);
|
|
181
|
-
} else {
|
|
182
|
-
setVirtualizedBodyRef(elem);
|
|
183
|
-
mergeRefs(listProps.outerRef)(elem);
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
}, /* @__PURE__ */ React2.createElement("div", {
|
|
188
|
-
"data-testid": "virtualized-body",
|
|
189
|
-
className: `virtualized-body${hasScrollBar ? " with-scrollbar" : ""}`,
|
|
190
|
-
style: bodyStyle,
|
|
191
|
-
ref: (r) => {
|
|
192
|
-
mergeRefs(innerBody)(r);
|
|
193
|
-
}
|
|
194
|
-
}, generateRenderedRows())) : /* @__PURE__ */ React2.createElement(NoResults, {
|
|
195
|
-
innerRef,
|
|
196
|
-
rowRenderer
|
|
197
|
-
}, noResultsPlaceholder));
|
|
198
|
-
};
|
|
199
|
-
VirtualizedBody.defaultProps = {
|
|
200
|
-
rows: [],
|
|
201
|
-
overscanCount: 10
|
|
202
|
-
};
|
|
203
|
-
VirtualizedBody.propTypes = {
|
|
204
|
-
autoScrollToId: PropTypes.number,
|
|
205
|
-
columns: PropTypes.arrayOf(PropTypes.shape({})),
|
|
206
|
-
component: PropTypes.element,
|
|
207
|
-
expandable: PropTypes.bool,
|
|
208
|
-
filters: PropTypes.any,
|
|
209
|
-
innerRef: PropTypes.any,
|
|
210
|
-
innerBody: PropTypes.any,
|
|
211
|
-
isPlaceholderActive: PropTypes.bool,
|
|
212
|
-
listProps: PropTypes.shape({
|
|
213
|
-
itemSize: PropTypes.func,
|
|
214
|
-
outerRef: PropTypes.any
|
|
215
|
-
}),
|
|
216
|
-
noResultsPlaceholder: PropTypes.oneOf([PropTypes.string, PropTypes.element]),
|
|
217
|
-
overscanCount: PropTypes.number,
|
|
218
|
-
rows: PropTypes.arrayOf(PropTypes.shape({})),
|
|
219
|
-
rowHeight: PropTypes.number,
|
|
220
|
-
rowKey: PropTypes.string,
|
|
221
|
-
rowRenderer: PropTypes.element,
|
|
222
|
-
rowSize: PropTypes.any,
|
|
223
|
-
setHasScroll: PropTypes.func
|
|
224
|
-
};
|
|
225
|
-
var VirtualizedBody_default = VirtualizedBody;
|
|
226
|
-
export {
|
|
227
|
-
VirtualizedBody,
|
|
228
|
-
VirtualizedBody_default as default
|
|
229
|
-
};
|
|
230
|
-
//# sourceMappingURL=VirtualizedBody.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/virtualization/VirtualizedBody.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable max-statements */\nimport React, { useEffect, useState, useCallback, useRef, useLayoutEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport { mergeRefs, debounce, isNaN } from '@elliemae/ds-utilities';\nimport { NoResults } from '../../components/NoResults';\nimport { VirtualizedBodyRow } from './VirtualizedBodyRow';\nimport { RowSizes } from '../../rowSizes';\nimport { isSafari } from './helper';\n\nconst wrapperSafari = {};\nconst wrapperGeneric = { overflowY: 'auto', overflowX: 'visible' };\n\nconst VirtualizedBody = (props) => {\n const {\n autoScrollToId,\n columns,\n component: Component,\n expandable,\n innerRef,\n innerBody,\n isPlaceholderActive,\n listProps,\n noResultsPlaceholder,\n overscanCount,\n rows,\n rowHeight: defaultRowHeight,\n rowKey,\n rowRenderer,\n rowSize,\n setHasScroll,\n filters, // hack to reset the scrollTop to 0 if filters change\n } = props;\n const rowHeight = defaultRowHeight || RowSizes[rowSize];\n const [scrollTop, setScrollTop] = useState(0);\n const [visibleHeight, setVisibleHeight] = useState(0);\n const [hasScrollBar, setHasScrollBar] = useState(false);\n const rowStyleCache = useRef({});\n const [renderedIndexes, setRenderedIndexes] = useState([0, 30]);\n\n const getCalculatedHeightBetweenIndexes = (start, end) => {\n const { itemSize = () => rowHeight } = listProps;\n if (expandable) {\n return rows\n .slice(start, end)\n .map((_, idx) => idx)\n .map((idx) => itemSize(idx))\n .reduce((acc, curr) => acc + curr, 0);\n }\n return (end - start) * rowHeight;\n };\n\n const generateRowPositionMap = () => rows.map((row, idx) => getCalculatedHeightBetweenIndexes(0, idx));\n\n const rowPositionMap = useRef(generateRowPositionMap());\n const [virtualizedBodyRef, setVirtualizedBodyRef] = useState(null);\n const handlerRef = useRef();\n\n const autoScrollTo = useCallback(\n (scrollHeight) => {\n const { itemSize = () => rowHeight } = listProps;\n const idx = rows.findIndex((item) => item[rowKey] === autoScrollToId);\n let val = rowPositionMap.current[idx] || 0;\n const lastPositionIdx = rowPositionMap.current.length - 1;\n let lastPosition = 0;\n if (lastPositionIdx > -1) {\n lastPosition = rowPositionMap.current[lastPositionIdx] - scrollHeight + itemSize(lastPositionIdx);\n }\n if (lastPosition < val) {\n val = lastPosition;\n }\n if (virtualizedBodyRef) {\n if (idx > -1) {\n setScrollTop(val);\n virtualizedBodyRef.scrollTop = val;\n }\n }\n },\n [rows, virtualizedBodyRef],\n );\n\n useEffect(() => {\n autoScrollTo(visibleHeight);\n }, [autoScrollToId, visibleHeight]);\n\n const handler = useCallback(\n debounce(({ target }) => {\n // Update coordinates\n setScrollTop(target.scrollTop || 0);\n }, 100),\n [setScrollTop],\n );\n\n useEffect(() => {\n setScrollTop(0);\n }, [filters]);\n\n useEffect(() => {\n handlerRef.current = handler;\n }, [handler]);\n\n useLayoutEffect(() => {\n let top = Math.ceil(scrollTop / rowHeight);\n let bot = Math.ceil((scrollTop + visibleHeight) / rowHeight);\n if (expandable) {\n // updateMapperFirst\n rowPositionMap.current = generateRowPositionMap();\n top = rowPositionMap.current.findIndex((item) => item > scrollTop);\n bot = rowPositionMap.current.findIndex((item) => item > scrollTop + visibleHeight);\n if (bot === -1) bot = rowPositionMap.current.length;\n }\n let upperBound = top - 1 - overscanCount;\n let lowerBound = bot - 1 + overscanCount;\n if (upperBound < 0) {\n upperBound = 0;\n }\n if (lowerBound - upperBound < overscanCount) {\n lowerBound = upperBound + overscanCount;\n }\n if (lowerBound > rows.length) {\n lowerBound = rows.length;\n }\n setHasScrollBar(visibleHeight < getHeight());\n setHasScroll(visibleHeight < getHeight());\n setRenderedIndexes([upperBound, lowerBound]);\n }, [visibleHeight, scrollTop, rows]);\n\n useLayoutEffect(() => {\n if (virtualizedBodyRef) {\n const parsedVisibleHeight = parseFloat(\n window.getComputedStyle(virtualizedBodyRef, null).getPropertyValue('height'),\n );\n // eslint-disable-next-line no-restricted-globals\n if (!isNaN(parsedVisibleHeight)) {\n setVisibleHeight(parsedVisibleHeight);\n autoScrollTo(parsedVisibleHeight);\n }\n }\n }, [rows, virtualizedBodyRef]);\n\n useEffect(() => {\n if (virtualizedBodyRef) {\n const eventListener = (event) => handlerRef.current(event);\n virtualizedBodyRef.addEventListener('scroll', eventListener);\n\n return () => {\n virtualizedBodyRef.removeEventListener('scroll', eventListener);\n };\n }\n return () => null;\n }, [virtualizedBodyRef]);\n\n const getHeight = () => {\n let returnHeight = 0;\n if (expandable) {\n returnHeight = getCalculatedHeightBetweenIndexes(0, rows.length) + 8;\n } else {\n returnHeight = rows.length * rowHeight + 8;\n }\n // if (visibleHeight > returnHeight) {\n // return visibleHeight;\n // }\n if (virtualizedBodyRef && virtualizedBodyRef.scrollHeight > virtualizedBodyRef.clientHeight) {\n return returnHeight + 10;\n }\n return returnHeight;\n };\n\n const getRowStyle = (row, index, specificRowHeight) => {\n const { itemSize } = listProps;\n\n if (!expandable && rowStyleCache.current[index]) {\n return rowStyleCache.current[index];\n }\n rowStyleCache.current[index] = {\n height: itemSize ? itemSize(index) : specificRowHeight,\n left: 0,\n right: 0,\n top: getCalculatedHeightBetweenIndexes(0, index),\n position: 'absolute',\n };\n return rowStyleCache.current[index];\n };\n\n const generateRenderedRows = () =>\n rows.slice(renderedIndexes[0], renderedIndexes[1] + 1).map((_, index) => (\n <VirtualizedBodyRow\n data={{\n rows,\n columns,\n rowKey,\n renderer: { rowRenderer },\n }}\n index={renderedIndexes[0] + index}\n key={rows[renderedIndexes[0] + index][rowKey]}\n style={getRowStyle(rows[renderedIndexes[0] + index], renderedIndexes[0] + index, rowHeight)}\n ></VirtualizedBodyRow>\n ));\n\n const wrapperStyle = {\n height: '100%',\n ...(isSafari ? wrapperSafari : wrapperGeneric),\n };\n const bodyStyle = {\n height: getHeight(),\n willChange: 'transform',\n backfaceVisibility: 'hidden',\n };\n\n return (\n <Component {...props} innerRef={innerRef}>\n {!isPlaceholderActive ? (\n <div\n className=\"virtualized-body-wrapper\"\n style={wrapperStyle}\n ref={(elem) => {\n if (elem) {\n if (isSafari) {\n setVirtualizedBodyRef(elem.parentElement);\n // eslint-disable-next-line no-param-reassign\n elem.parentElement.scrollTop = scrollTop;\n mergeRefs(listProps.outerRef)(elem.parentElement);\n } else {\n setVirtualizedBodyRef(elem);\n mergeRefs(listProps.outerRef)(elem);\n }\n }\n }}\n >\n <div\n data-testid=\"virtualized-body\"\n className={`virtualized-body${hasScrollBar ? ' with-scrollbar' : ''}`}\n style={bodyStyle}\n ref={(r) => {\n mergeRefs(innerBody)(r);\n }}\n >\n {generateRenderedRows()}\n </div>\n </div>\n ) : (\n <NoResults innerRef={innerRef} rowRenderer={rowRenderer}>\n {noResultsPlaceholder}\n </NoResults>\n )}\n </Component>\n );\n};\n\nVirtualizedBody.defaultProps = {\n rows: [],\n overscanCount: 10,\n};\n\nVirtualizedBody.propTypes = {\n autoScrollToId: PropTypes.number,\n columns: PropTypes.arrayOf(PropTypes.shape({})),\n component: PropTypes.element,\n expandable: PropTypes.bool,\n filters: PropTypes.any,\n innerRef: PropTypes.any,\n innerBody: PropTypes.any,\n isPlaceholderActive: PropTypes.bool,\n listProps: PropTypes.shape({\n itemSize: PropTypes.func,\n outerRef: PropTypes.any,\n }),\n noResultsPlaceholder: PropTypes.oneOf([PropTypes.string, PropTypes.element]),\n overscanCount: PropTypes.number,\n rows: PropTypes.arrayOf(PropTypes.shape({})),\n rowHeight: PropTypes.number,\n rowKey: PropTypes.string,\n rowRenderer: PropTypes.element,\n rowSize: PropTypes.any,\n setHasScroll: PropTypes.func,\n};\n\nexport { VirtualizedBody };\nexport default VirtualizedBody;\n"],
|
|
5
|
-
"mappings": "AAAA;ACEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,gBAAgB;AACtB,MAAM,iBAAiB,EAAE,WAAW,QAAQ,WAAW;AAEvD,MAAM,kBAAkB,CAAC,UAAU;AACjC,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACE;AACJ,QAAM,YAAY,oBAAoB,SAAS;AAC/C,QAAM,CAAC,WAAW,gBAAgB,SAAS;AAC3C,QAAM,CAAC,eAAe,oBAAoB,SAAS;AACnD,QAAM,CAAC,cAAc,mBAAmB,SAAS;AACjD,QAAM,gBAAgB,OAAO;AAC7B,QAAM,CAAC,iBAAiB,sBAAsB,SAAS,CAAC,GAAG;AAE3D,QAAM,oCAAoC,CAAC,OAAO,QAAQ;AACxD,UAAM,EAAE,WAAW,MAAM,cAAc;AACvC,QAAI,YAAY;AACd,aAAO,KACJ,MAAM,OAAO,KACb,IAAI,CAAC,GAAG,QAAQ,KAChB,IAAI,CAAC,QAAQ,SAAS,MACtB,OAAO,CAAC,KAAK,SAAS,MAAM,MAAM;AAAA;AAEvC,WAAQ,OAAM,SAAS;AAAA;AAGzB,QAAM,yBAAyB,MAAM,KAAK,IAAI,CAAC,KAAK,QAAQ,kCAAkC,GAAG;AAEjG,QAAM,iBAAiB,OAAO;AAC9B,QAAM,CAAC,oBAAoB,yBAAyB,SAAS;AAC7D,QAAM,aAAa;AAEnB,QAAM,eAAe,YACnB,CAAC,iBAAiB;AAChB,UAAM,EAAE,WAAW,MAAM,cAAc;AACvC,UAAM,MAAM,KAAK,UAAU,CAAC,SAAS,KAAK,YAAY;AACtD,QAAI,MAAM,eAAe,QAAQ,QAAQ;AACzC,UAAM,kBAAkB,eAAe,QAAQ,SAAS;AACxD,QAAI,eAAe;AACnB,QAAI,kBAAkB,IAAI;AACxB,qBAAe,eAAe,QAAQ,mBAAmB,eAAe,SAAS;AAAA;AAEnF,QAAI,eAAe,KAAK;AACtB,YAAM;AAAA;AAER,QAAI,oBAAoB;AACtB,UAAI,MAAM,IAAI;AACZ,qBAAa;AACb,2BAAmB,YAAY;AAAA;AAAA;AAAA,KAIrC,CAAC,MAAM;AAGT,YAAU,MAAM;AACd,iBAAa;AAAA,KACZ,CAAC,gBAAgB;AAEpB,QAAM,UAAU,YACd,SAAS,CAAC,EAAE,aAAa;AAEvB,iBAAa,OAAO,aAAa;AAAA,KAChC,MACH,CAAC;AAGH,YAAU,MAAM;AACd,iBAAa;AAAA,KACZ,CAAC;AAEJ,YAAU,MAAM;AACd,eAAW,UAAU;AAAA,KACpB,CAAC;AAEJ,kBAAgB,MAAM;AACpB,QAAI,MAAM,KAAK,KAAK,YAAY;AAChC,QAAI,MAAM,KAAK,KAAM,aAAY,iBAAiB;AAClD,QAAI,YAAY;AAEd,qBAAe,UAAU;AACzB,YAAM,eAAe,QAAQ,UAAU,CAAC,SAAS,OAAO;AACxD,YAAM,eAAe,QAAQ,UAAU,CAAC,SAAS,OAAO,YAAY;AACpE,UAAI,QAAQ;AAAI,cAAM,eAAe,QAAQ;AAAA;AAE/C,QAAI,aAAa,MAAM,IAAI;AAC3B,QAAI,aAAa,MAAM,IAAI;AAC3B,QAAI,aAAa,GAAG;AAClB,mBAAa;AAAA;AAEf,QAAI,aAAa,aAAa,eAAe;AAC3C,mBAAa,aAAa;AAAA;AAE5B,QAAI,aAAa,KAAK,QAAQ;AAC5B,mBAAa,KAAK;AAAA;AAEpB,oBAAgB,gBAAgB;AAChC,iBAAa,gBAAgB;AAC7B,uBAAmB,CAAC,YAAY;AAAA,KAC/B,CAAC,eAAe,WAAW;AAE9B,kBAAgB,MAAM;AACpB,QAAI,oBAAoB;AACtB,YAAM,sBAAsB,WAC1B,OAAO,iBAAiB,oBAAoB,MAAM,iBAAiB;AAGrE,UAAI,CAAC,MAAM,sBAAsB;AAC/B,yBAAiB;AACjB,qBAAa;AAAA;AAAA;AAAA,KAGhB,CAAC,MAAM;AAEV,YAAU,MAAM;AACd,QAAI,oBAAoB;AACtB,YAAM,gBAAgB,CAAC,UAAU,WAAW,QAAQ;AACpD,yBAAmB,iBAAiB,UAAU;AAE9C,aAAO,MAAM;AACX,2BAAmB,oBAAoB,UAAU;AAAA;AAAA;AAGrD,WAAO,MAAM;AAAA,KACZ,CAAC;AAEJ,QAAM,YAAY,MAAM;AACtB,QAAI,eAAe;AACnB,QAAI,YAAY;AACd,qBAAe,kCAAkC,GAAG,KAAK,UAAU;AAAA,WAC9D;AACL,qBAAe,KAAK,SAAS,YAAY;AAAA;AAK3C,QAAI,sBAAsB,mBAAmB,eAAe,mBAAmB,cAAc;AAC3F,aAAO,eAAe;AAAA;AAExB,WAAO;AAAA;AAGT,QAAM,cAAc,CAAC,KAAK,OAAO,sBAAsB;AACrD,UAAM,EAAE,aAAa;AAErB,QAAI,CAAC,cAAc,cAAc,QAAQ,QAAQ;AAC/C,aAAO,cAAc,QAAQ;AAAA;AAE/B,kBAAc,QAAQ,SAAS;AAAA,MAC7B,QAAQ,WAAW,SAAS,SAAS;AAAA,MACrC,MAAM;AAAA,MACN,OAAO;AAAA,MACP,KAAK,kCAAkC,GAAG;AAAA,MAC1C,UAAU;AAAA;AAEZ,WAAO,cAAc,QAAQ;AAAA;AAG/B,QAAM,uBAAuB,MAC3B,KAAK,MAAM,gBAAgB,IAAI,gBAAgB,KAAK,GAAG,IAAI,CAAC,GAAG,UAC7D,qCAAC,oBAAD;AAAA,IACE,MAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA,UAAU,EAAE;AAAA;AAAA,IAEd,OAAO,gBAAgB,KAAK;AAAA,IAC5B,KAAK,KAAK,gBAAgB,KAAK,OAAO;AAAA,IACtC,OAAO,YAAY,KAAK,gBAAgB,KAAK,QAAQ,gBAAgB,KAAK,OAAO;AAAA;AAIvF,QAAM,eAAe;AAAA,IACnB,QAAQ;AAAA,OACJ,WAAW,gBAAgB;AAAA;AAEjC,QAAM,YAAY;AAAA,IAChB,QAAQ;AAAA,IACR,YAAY;AAAA,IACZ,oBAAoB;AAAA;AAGtB,SACE,qCAAC,WAAD;AAAA,OAAe;AAAA,IAAO;AAAA,KACnB,CAAC,sBACA,qCAAC,OAAD;AAAA,IACE,WAAU;AAAA,IACV,OAAO;AAAA,IACP,KAAK,CAAC,SAAS;AACb,UAAI,MAAM;AACR,YAAI,UAAU;AACZ,gCAAsB,KAAK;AAE3B,eAAK,cAAc,YAAY;AAC/B,oBAAU,UAAU,UAAU,KAAK;AAAA,eAC9B;AACL,gCAAsB;AACtB,oBAAU,UAAU,UAAU;AAAA;AAAA;AAAA;AAAA,KAKpC,qCAAC,OAAD;AAAA,IACE,eAAY;AAAA,IACZ,WAAW,mBAAmB,eAAe,oBAAoB;AAAA,IACjE,OAAO;AAAA,IACP,KAAK,CAAC,MAAM;AACV,gBAAU,WAAW;AAAA;AAAA,KAGtB,2BAIL,qCAAC,WAAD;AAAA,IAAW;AAAA,IAAoB;AAAA,KAC5B;AAAA;AAOX,gBAAgB,eAAe;AAAA,EAC7B,MAAM;AAAA,EACN,eAAe;AAAA;AAGjB,gBAAgB,YAAY;AAAA,EAC1B,gBAAgB,UAAU;AAAA,EAC1B,SAAS,UAAU,QAAQ,UAAU,MAAM;AAAA,EAC3C,WAAW,UAAU;AAAA,EACrB,YAAY,UAAU;AAAA,EACtB,SAAS,UAAU;AAAA,EACnB,UAAU,UAAU;AAAA,EACpB,WAAW,UAAU;AAAA,EACrB,qBAAqB,UAAU;AAAA,EAC/B,WAAW,UAAU,MAAM;AAAA,IACzB,UAAU,UAAU;AAAA,IACpB,UAAU,UAAU;AAAA;AAAA,EAEtB,sBAAsB,UAAU,MAAM,CAAC,UAAU,QAAQ,UAAU;AAAA,EACnE,eAAe,UAAU;AAAA,EACzB,MAAM,UAAU,QAAQ,UAAU,MAAM;AAAA,EACxC,WAAW,UAAU;AAAA,EACrB,QAAQ,UAAU;AAAA,EAClB,aAAa,UAAU;AAAA,EACvB,SAAS,UAAU;AAAA,EACnB,cAAc,UAAU;AAAA;AAI1B,IAAO,0BAAQ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
const VirtualizedBodyRow = ({ data, index, style, key, isScrolling }) => {
|
|
3
|
-
const {
|
|
4
|
-
rows,
|
|
5
|
-
renderer: { rowRenderer }
|
|
6
|
-
} = data;
|
|
7
|
-
const rowData = rows[index];
|
|
8
|
-
return rowRenderer(rowData, {
|
|
9
|
-
style,
|
|
10
|
-
index,
|
|
11
|
-
rowIndex: index,
|
|
12
|
-
key
|
|
13
|
-
}, {
|
|
14
|
-
rowIndex: index,
|
|
15
|
-
isScrolling
|
|
16
|
-
});
|
|
17
|
-
};
|
|
18
|
-
var VirtualizedBodyRow_default = VirtualizedBodyRow;
|
|
19
|
-
export {
|
|
20
|
-
VirtualizedBodyRow,
|
|
21
|
-
VirtualizedBodyRow_default as default
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=VirtualizedBodyRow.js.map
|