@elliemae/ds-datagrids 3.0.0-next.2 → 3.0.0-next.3
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/dist/cjs/DSDataGrid.js +399 -0
- package/dist/cjs/DSDataGrid.js.map +7 -0
- package/dist/cjs/DataGridImpl.js +177 -0
- package/dist/cjs/DataGridImpl.js.map +7 -0
- package/dist/cjs/PaginatedDataGrid.js +114 -0
- package/dist/cjs/PaginatedDataGrid.js.map +7 -0
- package/dist/cjs/blockNames.js +39 -0
- package/dist/cjs/blockNames.js.map +7 -0
- package/dist/cjs/columns/IconColumn.js +111 -0
- package/dist/cjs/columns/IconColumn.js.map +7 -0
- package/dist/cjs/columns/NumberColumn.js +36 -0
- package/dist/cjs/columns/NumberColumn.js.map +7 -0
- package/dist/cjs/components/BodyCell.js +126 -0
- package/dist/cjs/components/BodyCell.js.map +7 -0
- package/dist/cjs/components/BodyList.js +89 -0
- package/dist/cjs/components/BodyList.js.map +7 -0
- package/dist/cjs/components/ColumnVisibilityMenuOption.js +66 -0
- package/dist/cjs/components/ColumnVisibilityMenuOption.js.map +7 -0
- package/dist/cjs/components/ColumnsOptionsMenuSection.js +64 -0
- package/dist/cjs/components/ColumnsOptionsMenuSection.js.map +7 -0
- package/dist/cjs/components/EmptyState.js +82 -0
- package/dist/cjs/components/EmptyState.js.map +7 -0
- package/dist/cjs/components/HeaderCell.js +87 -0
- package/dist/cjs/components/HeaderCell.js.map +7 -0
- package/dist/cjs/components/List.js +56 -0
- package/dist/cjs/components/List.js.map +7 -0
- package/dist/cjs/components/ListItem.js +64 -0
- package/dist/cjs/components/ListItem.js.map +7 -0
- package/dist/cjs/components/NoResults.js +84 -0
- package/dist/cjs/components/NoResults.js.map +7 -0
- package/dist/cjs/components/RowsLoader.js +42 -0
- package/dist/cjs/components/RowsLoader.js.map +7 -0
- package/dist/cjs/components/Table.js +125 -0
- package/dist/cjs/components/Table.js.map +7 -0
- package/dist/cjs/components/TableBody.js +101 -0
- package/dist/cjs/components/TableBody.js.map +7 -0
- package/dist/cjs/components/TableHeader.js +68 -0
- package/dist/cjs/components/TableHeader.js.map +7 -0
- package/dist/cjs/components/footer/addOptionalFooterComponents.js +56 -0
- package/dist/cjs/components/footer/addOptionalFooterComponents.js.map +7 -0
- package/dist/cjs/components/header/PrimaryControls.js +50 -0
- package/dist/cjs/components/header/PrimaryControls.js.map +7 -0
- package/dist/cjs/components/header/addOptionalHeaderComponents.js +58 -0
- package/dist/cjs/components/header/addOptionalHeaderComponents.js.map +7 -0
- package/dist/cjs/components/index.js +43 -0
- package/dist/cjs/components/index.js.map +7 -0
- package/dist/cjs/components/renderers/defaultClassedRenderers.js +66 -0
- package/dist/cjs/components/renderers/defaultClassedRenderers.js.map +7 -0
- package/dist/cjs/components/renderers/index.js +50 -0
- package/dist/cjs/components/renderers/index.js.map +7 -0
- package/dist/cjs/components/renderers/renderRowsLoader.js +39 -0
- package/dist/cjs/components/renderers/renderRowsLoader.js.map +7 -0
- package/dist/cjs/components/tableContext.js +36 -0
- package/dist/cjs/components/tableContext.js.map +7 -0
- package/dist/cjs/defaultPlugins.js +44 -0
- package/dist/cjs/defaultPlugins.js.map +7 -0
- package/dist/cjs/index.js +72 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +178 -0
- package/dist/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js.map +7 -0
- package/dist/cjs/plugins/body-header-scroll-sync/index.js +35 -0
- package/dist/cjs/plugins/body-header-scroll-sync/index.js.map +7 -0
- package/dist/cjs/plugins/column-dnd/DndColumnsPlugin.js +168 -0
- package/dist/cjs/plugins/column-dnd/DndColumnsPlugin.js.map +7 -0
- package/dist/cjs/plugins/column-dnd/decorateGridWithDndColumns.js +46 -0
- package/dist/cjs/plugins/column-dnd/decorateGridWithDndColumns.js.map +7 -0
- package/dist/cjs/plugins/column-dnd/index.js +35 -0
- package/dist/cjs/plugins/column-dnd/index.js.map +7 -0
- package/dist/cjs/plugins/column-sizing/ColumnSizingPlugin.js +92 -0
- package/dist/cjs/plugins/column-sizing/ColumnSizingPlugin.js.map +7 -0
- package/dist/cjs/plugins/column-sizing/columnMeasurerTransformer.js +85 -0
- package/dist/cjs/plugins/column-sizing/columnMeasurerTransformer.js.map +7 -0
- package/dist/cjs/plugins/column-sizing/ext-points/decorateColumn.js +44 -0
- package/dist/cjs/plugins/column-sizing/ext-points/decorateColumn.js.map +7 -0
- package/dist/cjs/plugins/column-sizing/ext-points/getTableProps.js +80 -0
- package/dist/cjs/plugins/column-sizing/ext-points/getTableProps.js.map +7 -0
- package/dist/cjs/plugins/column-sizing/getColumnNameFromProperty.js +37 -0
- package/dist/cjs/plugins/column-sizing/getColumnNameFromProperty.js.map +7 -0
- package/dist/cjs/plugins/column-sizing/index.js +35 -0
- package/dist/cjs/plugins/column-sizing/index.js.map +7 -0
- package/dist/cjs/plugins/column-sizing/useColumnSizeService.js +165 -0
- package/dist/cjs/plugins/column-sizing/useColumnSizeService.js.map +7 -0
- package/dist/cjs/plugins/column-sizing/useStylesheetHelpers.js +167 -0
- package/dist/cjs/plugins/column-sizing/useStylesheetHelpers.js.map +7 -0
- package/dist/cjs/plugins/column-sizing/utils.js +68 -0
- package/dist/cjs/plugins/column-sizing/utils.js.map +7 -0
- package/dist/cjs/plugins/custom-cell-renderer/CustomRendererPlugin.js +40 -0
- package/dist/cjs/plugins/custom-cell-renderer/CustomRendererPlugin.js.map +7 -0
- package/dist/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js +94 -0
- package/dist/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js.map +7 -0
- package/dist/cjs/plugins/custom-cell-renderer/getRendererComponent.js +86 -0
- package/dist/cjs/plugins/custom-cell-renderer/getRendererComponent.js.map +7 -0
- package/dist/cjs/plugins/custom-cell-renderer/index.js +35 -0
- package/dist/cjs/plugins/custom-cell-renderer/index.js.map +7 -0
- package/dist/cjs/plugins/editable/EditableComponents/ComboBox.js +84 -0
- package/dist/cjs/plugins/editable/EditableComponents/ComboBox.js.map +7 -0
- package/dist/cjs/plugins/editable/EditableComponents/TextBox.js +107 -0
- package/dist/cjs/plugins/editable/EditableComponents/TextBox.js.map +7 -0
- package/dist/cjs/plugins/editable/EditableComponents/index.js +37 -0
- package/dist/cjs/plugins/editable/EditableComponents/index.js.map +7 -0
- package/dist/cjs/plugins/editable/EditablePlugin.js +108 -0
- package/dist/cjs/plugins/editable/EditablePlugin.js.map +7 -0
- package/dist/cjs/plugins/editable/decorateEditable.js +111 -0
- package/dist/cjs/plugins/editable/decorateEditable.js.map +7 -0
- package/dist/cjs/plugins/editable/getEditorComponent.js +99 -0
- package/dist/cjs/plugins/editable/getEditorComponent.js.map +7 -0
- package/dist/cjs/plugins/editable/index.js +38 -0
- package/dist/cjs/plugins/editable/index.js.map +7 -0
- package/dist/cjs/plugins/expandable-grid/ExpandableColumn.js +163 -0
- package/dist/cjs/plugins/expandable-grid/ExpandableColumn.js.map +7 -0
- package/dist/cjs/plugins/expandable-grid/ExpandablePlugin.js +205 -0
- package/dist/cjs/plugins/expandable-grid/ExpandablePlugin.js.map +7 -0
- package/dist/cjs/plugins/expandable-grid/ExpandedRow.js +159 -0
- package/dist/cjs/plugins/expandable-grid/ExpandedRow.js.map +7 -0
- package/dist/cjs/plugins/expandable-grid/ExpandedRowExtra.js +72 -0
- package/dist/cjs/plugins/expandable-grid/ExpandedRowExtra.js.map +7 -0
- package/dist/cjs/plugins/expandable-grid/index.js +37 -0
- package/dist/cjs/plugins/expandable-grid/index.js.map +7 -0
- package/dist/cjs/plugins/expandable-grid/useExpandGridState.js +93 -0
- package/dist/cjs/plugins/expandable-grid/useExpandGridState.js.map +7 -0
- package/dist/cjs/plugins/export-data/ExportDataPlugin.js +145 -0
- package/dist/cjs/plugins/export-data/ExportDataPlugin.js.map +7 -0
- package/dist/cjs/plugins/export-data/index.js +35 -0
- package/dist/cjs/plugins/export-data/index.js.map +7 -0
- package/dist/cjs/plugins/filterable/FilterablePlugin.js +80 -0
- package/dist/cjs/plugins/filterable/FilterablePlugin.js.map +7 -0
- package/dist/cjs/plugins/filterable/addFilterToColumn.js +60 -0
- package/dist/cjs/plugins/filterable/addFilterToColumn.js.map +7 -0
- package/dist/cjs/plugins/filterable/components/FilterableHeader.js +145 -0
- package/dist/cjs/plugins/filterable/components/FilterableHeader.js.map +7 -0
- package/dist/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +157 -0
- package/dist/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js.map +7 -0
- package/dist/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +131 -0
- package/dist/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js.map +7 -0
- package/dist/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +201 -0
- package/dist/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js.map +7 -0
- package/dist/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js +196 -0
- package/dist/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js.map +7 -0
- package/dist/cjs/plugins/filterable/components/filterable-menus/defaultDateFormat.js +35 -0
- package/dist/cjs/plugins/filterable/components/filterable-menus/defaultDateFormat.js.map +7 -0
- package/dist/cjs/plugins/filterable/components/filterable-menus/getFilterMenuByType.js +49 -0
- package/dist/cjs/plugins/filterable/components/filterable-menus/getFilterMenuByType.js.map +7 -0
- package/dist/cjs/plugins/filterable/filterableFormatter.js +73 -0
- package/dist/cjs/plugins/filterable/filterableFormatter.js.map +7 -0
- package/dist/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js +94 -0
- package/dist/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js.map +7 -0
- package/dist/cjs/plugins/filterable/filtering-helper/strategiesOperators.js +44 -0
- package/dist/cjs/plugins/filterable/filtering-helper/strategiesOperators.js.map +7 -0
- package/dist/cjs/plugins/filterable/helper.js +125 -0
- package/dist/cjs/plugins/filterable/helper.js.map +7 -0
- package/dist/cjs/plugins/filterable/index.js +35 -0
- package/dist/cjs/plugins/filterable/index.js.map +7 -0
- package/dist/cjs/plugins/filterable/useFilterableState.js +127 -0
- package/dist/cjs/plugins/filterable/useFilterableState.js.map +7 -0
- package/dist/cjs/plugins/grouping-by/GroupingByPlugin.js +57 -0
- package/dist/cjs/plugins/grouping-by/GroupingByPlugin.js.map +7 -0
- package/dist/cjs/plugins/grouping-grid/GroupingPlugin.js +146 -0
- package/dist/cjs/plugins/grouping-grid/GroupingPlugin.js.map +7 -0
- package/dist/cjs/plugins/grouping-grid/walkStrategy.js +76 -0
- package/dist/cjs/plugins/grouping-grid/walkStrategy.js.map +7 -0
- package/dist/cjs/plugins/index.js +68 -0
- package/dist/cjs/plugins/index.js.map +7 -0
- package/dist/cjs/plugins/infinite-scrolling/InfiniteScrollPlugin.js +129 -0
- package/dist/cjs/plugins/infinite-scrolling/InfiniteScrollPlugin.js.map +7 -0
- package/dist/cjs/plugins/infinite-scrolling/index.js +35 -0
- package/dist/cjs/plugins/infinite-scrolling/index.js.map +7 -0
- package/dist/cjs/plugins/pagination/PaginationPlugin.js +128 -0
- package/dist/cjs/plugins/pagination/PaginationPlugin.js.map +7 -0
- package/dist/cjs/plugins/pagination/components/Pagination.js +63 -0
- package/dist/cjs/plugins/pagination/components/Pagination.js.map +7 -0
- package/dist/cjs/plugins/pagination/components/Paginator.js +82 -0
- package/dist/cjs/plugins/pagination/components/Paginator.js.map +7 -0
- package/dist/cjs/plugins/pagination/components/PerPageDropdown.js +95 -0
- package/dist/cjs/plugins/pagination/components/PerPageDropdown.js.map +7 -0
- package/dist/cjs/plugins/pagination/helper.js +62 -0
- package/dist/cjs/plugins/pagination/helper.js.map +7 -0
- package/dist/cjs/plugins/pagination/index.js +35 -0
- package/dist/cjs/plugins/pagination/index.js.map +7 -0
- package/dist/cjs/plugins/pagination/usePaginationState.js +98 -0
- package/dist/cjs/plugins/pagination/usePaginationState.js.map +7 -0
- package/dist/cjs/plugins/resizable/ResizablePlugin.js +109 -0
- package/dist/cjs/plugins/resizable/ResizablePlugin.js.map +7 -0
- package/dist/cjs/plugins/resizable/decorateResizable.js +72 -0
- package/dist/cjs/plugins/resizable/decorateResizable.js.map +7 -0
- package/dist/cjs/plugins/resizable/index.js +35 -0
- package/dist/cjs/plugins/resizable/index.js.map +7 -0
- package/dist/cjs/plugins/resizable/useResizeHandle.js +79 -0
- package/dist/cjs/plugins/resizable/useResizeHandle.js.map +7 -0
- package/dist/cjs/plugins/resizable/utils.js +54 -0
- package/dist/cjs/plugins/resizable/utils.js.map +7 -0
- package/dist/cjs/plugins/row-dnd/DndRowsPlugin.js +148 -0
- package/dist/cjs/plugins/row-dnd/DndRowsPlugin.js.map +7 -0
- package/dist/cjs/plugins/row-dnd/index.js +35 -0
- package/dist/cjs/plugins/row-dnd/index.js.map +7 -0
- package/dist/cjs/plugins/selectable/SelectablePlugin.js +166 -0
- package/dist/cjs/plugins/selectable/SelectablePlugin.js.map +7 -0
- package/dist/cjs/plugins/selectable/addSelectableColumn.js +129 -0
- package/dist/cjs/plugins/selectable/addSelectableColumn.js.map +7 -0
- package/dist/cjs/plugins/selectable/helper.js +70 -0
- package/dist/cjs/plugins/selectable/helper.js.map +7 -0
- package/dist/cjs/plugins/selectable/index.js +35 -0
- package/dist/cjs/plugins/selectable/index.js.map +7 -0
- package/dist/cjs/plugins/selectable/selectableFormatter.js +110 -0
- package/dist/cjs/plugins/selectable/selectableFormatter.js.map +7 -0
- package/dist/cjs/plugins/selectable/useSelectableState.js +130 -0
- package/dist/cjs/plugins/selectable/useSelectableState.js.map +7 -0
- package/dist/cjs/plugins/sortable/SortablePlugin.js +95 -0
- package/dist/cjs/plugins/sortable/SortablePlugin.js.map +7 -0
- package/dist/cjs/plugins/sortable/checkIfSortable.js +45 -0
- package/dist/cjs/plugins/sortable/checkIfSortable.js.map +7 -0
- package/dist/cjs/plugins/sortable/index.js +35 -0
- package/dist/cjs/plugins/sortable/index.js.map +7 -0
- package/dist/cjs/plugins/sortable/sortHeaderFormatter.js +66 -0
- package/dist/cjs/plugins/sortable/sortHeaderFormatter.js.map +7 -0
- package/dist/cjs/plugins/sortable/sortTree.js +60 -0
- package/dist/cjs/plugins/sortable/sortTree.js.map +7 -0
- package/dist/cjs/plugins/sortable/sorter.js +154 -0
- package/dist/cjs/plugins/sortable/sorter.js.map +7 -0
- package/dist/cjs/plugins/sortable/useSortableState.js +89 -0
- package/dist/cjs/plugins/sortable/useSortableState.js.map +7 -0
- package/dist/cjs/plugins/toolbar/RowRenderer.js +110 -0
- package/dist/cjs/plugins/toolbar/RowRenderer.js.map +7 -0
- package/dist/cjs/plugins/toolbar/ToolbarPlugin.js +58 -0
- package/dist/cjs/plugins/toolbar/ToolbarPlugin.js.map +7 -0
- package/dist/cjs/plugins/toolbar/ToolbarTrigger.js +121 -0
- package/dist/cjs/plugins/toolbar/ToolbarTrigger.js.map +7 -0
- package/dist/cjs/plugins/toolbar/index.js +35 -0
- package/dist/cjs/plugins/toolbar/index.js.map +7 -0
- package/dist/cjs/plugins/virtualization/AutoHeightList.js +108 -0
- package/dist/cjs/plugins/virtualization/AutoHeightList.js.map +7 -0
- package/dist/cjs/plugins/virtualization/VirtualizationPlugin.js +111 -0
- package/dist/cjs/plugins/virtualization/VirtualizationPlugin.js.map +7 -0
- package/dist/cjs/plugins/virtualization/VirtualizedBody.js +274 -0
- package/dist/cjs/plugins/virtualization/VirtualizedBody.js.map +7 -0
- package/dist/cjs/plugins/virtualization/VirtualizedBodyRow.js +52 -0
- package/dist/cjs/plugins/virtualization/VirtualizedBodyRow.js.map +7 -0
- package/dist/cjs/plugins/virtualization/helper.js +35 -0
- package/dist/cjs/plugins/virtualization/helper.js.map +7 -0
- package/dist/cjs/plugins/virtualization/index.js +35 -0
- package/dist/cjs/plugins/virtualization/index.js.map +7 -0
- package/dist/cjs/renders/CellWithAddons.js +111 -0
- package/dist/cjs/renders/CellWithAddons.js.map +7 -0
- package/dist/cjs/renders/index.js +37 -0
- package/dist/cjs/renders/index.js.map +7 -0
- package/dist/cjs/renders/styled.js +78 -0
- package/dist/cjs/renders/styled.js.map +7 -0
- package/dist/cjs/rowSizes.js +51 -0
- package/dist/cjs/rowSizes.js.map +7 -0
- package/dist/cjs/utilities/DataGridUtilities.json +1315 -0
- package/dist/cjs/utilities/getPluginsFromProps.js +72 -0
- package/dist/cjs/utilities/getPluginsFromProps.js.map +7 -0
- package/dist/cjs/utilities/getScrollbarSize.js +46 -0
- package/dist/cjs/utilities/getScrollbarSize.js.map +7 -0
- package/dist/cjs/utilities/normalizeData.js +65 -0
- package/dist/cjs/utilities/normalizeData.js.map +7 -0
- package/dist/esm/DSDataGrid.js +370 -0
- package/dist/esm/DSDataGrid.js.map +7 -0
- package/dist/esm/DataGridImpl.js +150 -0
- package/dist/esm/DataGridImpl.js.map +7 -0
- package/dist/esm/PaginatedDataGrid.js +87 -0
- package/dist/esm/PaginatedDataGrid.js.map +7 -0
- package/dist/esm/blockNames.js +10 -0
- package/dist/esm/blockNames.js.map +7 -0
- package/dist/esm/columns/IconColumn.js +82 -0
- package/dist/esm/columns/IconColumn.js.map +7 -0
- package/dist/esm/columns/NumberColumn.js +7 -0
- package/dist/esm/columns/NumberColumn.js.map +7 -0
- package/dist/esm/components/BodyCell.js +99 -0
- package/dist/esm/components/BodyCell.js.map +7 -0
- package/dist/esm/components/BodyList.js +62 -0
- package/dist/esm/components/BodyList.js.map +7 -0
- package/dist/esm/components/ColumnVisibilityMenuOption.js +37 -0
- package/dist/esm/components/ColumnVisibilityMenuOption.js.map +7 -0
- package/dist/esm/components/ColumnsOptionsMenuSection.js +35 -0
- package/dist/esm/components/ColumnsOptionsMenuSection.js.map +7 -0
- package/dist/esm/components/EmptyState.js +53 -0
- package/dist/esm/components/EmptyState.js.map +7 -0
- package/dist/esm/components/HeaderCell.js +60 -0
- package/dist/esm/components/HeaderCell.js.map +7 -0
- package/dist/esm/components/List.js +29 -0
- package/dist/esm/components/List.js.map +7 -0
- package/dist/esm/components/ListItem.js +37 -0
- package/dist/esm/components/ListItem.js.map +7 -0
- package/dist/esm/components/NoResults.js +57 -0
- package/dist/esm/components/NoResults.js.map +7 -0
- package/dist/esm/components/RowsLoader.js +13 -0
- package/dist/esm/components/RowsLoader.js.map +7 -0
- package/dist/esm/components/Table.js +98 -0
- package/dist/esm/components/Table.js.map +7 -0
- package/dist/esm/components/TableBody.js +74 -0
- package/dist/esm/components/TableBody.js.map +7 -0
- package/dist/esm/components/TableHeader.js +41 -0
- package/dist/esm/components/TableHeader.js.map +7 -0
- package/dist/esm/components/footer/addOptionalFooterComponents.js +27 -0
- package/dist/esm/components/footer/addOptionalFooterComponents.js.map +7 -0
- package/dist/esm/components/header/PrimaryControls.js +21 -0
- package/dist/esm/components/header/PrimaryControls.js.map +7 -0
- package/dist/esm/components/header/addOptionalHeaderComponents.js +29 -0
- package/dist/esm/components/header/addOptionalHeaderComponents.js.map +7 -0
- package/dist/esm/components/index.js +14 -0
- package/dist/esm/components/index.js.map +7 -0
- package/dist/esm/components/renderers/defaultClassedRenderers.js +41 -0
- package/dist/esm/components/renderers/defaultClassedRenderers.js.map +7 -0
- package/dist/esm/components/renderers/index.js +29 -0
- package/dist/esm/components/renderers/index.js.map +7 -0
- package/dist/esm/components/renderers/renderRowsLoader.js +10 -0
- package/dist/esm/components/renderers/renderRowsLoader.js.map +7 -0
- package/dist/esm/components/tableContext.js +7 -0
- package/dist/esm/components/tableContext.js.map +7 -0
- package/dist/esm/defaultPlugins.js +15 -0
- package/dist/esm/defaultPlugins.js.map +7 -0
- package/dist/esm/index.js +63 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +151 -0
- package/dist/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js.map +7 -0
- package/dist/esm/plugins/body-header-scroll-sync/index.js +6 -0
- package/dist/esm/plugins/body-header-scroll-sync/index.js.map +7 -0
- package/dist/esm/plugins/column-dnd/DndColumnsPlugin.js +141 -0
- package/dist/esm/plugins/column-dnd/DndColumnsPlugin.js.map +7 -0
- package/dist/esm/plugins/column-dnd/decorateGridWithDndColumns.js +20 -0
- package/dist/esm/plugins/column-dnd/decorateGridWithDndColumns.js.map +7 -0
- package/dist/esm/plugins/column-dnd/index.js +6 -0
- package/dist/esm/plugins/column-dnd/index.js.map +7 -0
- package/dist/esm/plugins/column-sizing/ColumnSizingPlugin.js +63 -0
- package/dist/esm/plugins/column-sizing/ColumnSizingPlugin.js.map +7 -0
- package/dist/esm/plugins/column-sizing/columnMeasurerTransformer.js +58 -0
- package/dist/esm/plugins/column-sizing/columnMeasurerTransformer.js.map +7 -0
- package/dist/esm/plugins/column-sizing/ext-points/decorateColumn.js +15 -0
- package/dist/esm/plugins/column-sizing/ext-points/decorateColumn.js.map +7 -0
- package/dist/esm/plugins/column-sizing/ext-points/getTableProps.js +53 -0
- package/dist/esm/plugins/column-sizing/ext-points/getTableProps.js.map +7 -0
- package/dist/esm/plugins/column-sizing/getColumnNameFromProperty.js +8 -0
- package/dist/esm/plugins/column-sizing/getColumnNameFromProperty.js.map +7 -0
- package/dist/esm/plugins/column-sizing/index.js +6 -0
- package/dist/esm/plugins/column-sizing/index.js.map +7 -0
- package/dist/esm/plugins/column-sizing/useColumnSizeService.js +138 -0
- package/dist/esm/plugins/column-sizing/useColumnSizeService.js.map +7 -0
- package/dist/esm/plugins/column-sizing/useStylesheetHelpers.js +138 -0
- package/dist/esm/plugins/column-sizing/useStylesheetHelpers.js.map +7 -0
- package/dist/esm/plugins/column-sizing/utils.js +39 -0
- package/dist/esm/plugins/column-sizing/utils.js.map +7 -0
- package/dist/esm/plugins/custom-cell-renderer/CustomRendererPlugin.js +11 -0
- package/dist/esm/plugins/custom-cell-renderer/CustomRendererPlugin.js.map +7 -0
- package/dist/esm/plugins/custom-cell-renderer/addCustomRendererToCell.js +67 -0
- package/dist/esm/plugins/custom-cell-renderer/addCustomRendererToCell.js.map +7 -0
- package/dist/esm/plugins/custom-cell-renderer/getRendererComponent.js +59 -0
- package/dist/esm/plugins/custom-cell-renderer/getRendererComponent.js.map +7 -0
- package/dist/esm/plugins/custom-cell-renderer/index.js +6 -0
- package/dist/esm/plugins/custom-cell-renderer/index.js.map +7 -0
- package/dist/esm/plugins/editable/EditableComponents/ComboBox.js +57 -0
- package/dist/esm/plugins/editable/EditableComponents/ComboBox.js.map +7 -0
- package/dist/esm/plugins/editable/EditableComponents/TextBox.js +80 -0
- package/dist/esm/plugins/editable/EditableComponents/TextBox.js.map +7 -0
- package/dist/esm/plugins/editable/EditableComponents/index.js +8 -0
- package/dist/esm/plugins/editable/EditableComponents/index.js.map +7 -0
- package/dist/esm/plugins/editable/EditablePlugin.js +79 -0
- package/dist/esm/plugins/editable/EditablePlugin.js.map +7 -0
- package/dist/esm/plugins/editable/decorateEditable.js +84 -0
- package/dist/esm/plugins/editable/decorateEditable.js.map +7 -0
- package/dist/esm/plugins/editable/getEditorComponent.js +72 -0
- package/dist/esm/plugins/editable/getEditorComponent.js.map +7 -0
- package/dist/esm/plugins/editable/index.js +9 -0
- package/dist/esm/plugins/editable/index.js.map +7 -0
- package/dist/esm/plugins/expandable-grid/ExpandableColumn.js +136 -0
- package/dist/esm/plugins/expandable-grid/ExpandableColumn.js.map +7 -0
- package/dist/esm/plugins/expandable-grid/ExpandablePlugin.js +178 -0
- package/dist/esm/plugins/expandable-grid/ExpandablePlugin.js.map +7 -0
- package/dist/esm/plugins/expandable-grid/ExpandedRow.js +132 -0
- package/dist/esm/plugins/expandable-grid/ExpandedRow.js.map +7 -0
- package/dist/esm/plugins/expandable-grid/ExpandedRowExtra.js +45 -0
- package/dist/esm/plugins/expandable-grid/ExpandedRowExtra.js.map +7 -0
- package/dist/esm/plugins/expandable-grid/index.js +8 -0
- package/dist/esm/plugins/expandable-grid/index.js.map +7 -0
- package/dist/esm/plugins/expandable-grid/useExpandGridState.js +64 -0
- package/dist/esm/plugins/expandable-grid/useExpandGridState.js.map +7 -0
- package/dist/esm/plugins/export-data/ExportDataPlugin.js +118 -0
- package/dist/esm/plugins/export-data/ExportDataPlugin.js.map +7 -0
- package/dist/esm/plugins/export-data/index.js +6 -0
- package/dist/esm/plugins/export-data/index.js.map +7 -0
- package/dist/esm/plugins/filterable/FilterablePlugin.js +51 -0
- package/dist/esm/plugins/filterable/FilterablePlugin.js.map +7 -0
- package/dist/esm/plugins/filterable/addFilterToColumn.js +33 -0
- package/dist/esm/plugins/filterable/addFilterToColumn.js.map +7 -0
- package/dist/esm/plugins/filterable/components/FilterableHeader.js +118 -0
- package/dist/esm/plugins/filterable/components/FilterableHeader.js.map +7 -0
- package/dist/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +128 -0
- package/dist/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js.map +7 -0
- package/dist/esm/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +102 -0
- package/dist/esm/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js.map +7 -0
- package/dist/esm/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +176 -0
- package/dist/esm/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js.map +7 -0
- package/dist/esm/plugins/filterable/components/filterable-menus/TextFilterMenu.js +169 -0
- package/dist/esm/plugins/filterable/components/filterable-menus/TextFilterMenu.js.map +7 -0
- package/dist/esm/plugins/filterable/components/filterable-menus/defaultDateFormat.js +6 -0
- package/dist/esm/plugins/filterable/components/filterable-menus/defaultDateFormat.js.map +7 -0
- package/dist/esm/plugins/filterable/components/filterable-menus/getFilterMenuByType.js +20 -0
- package/dist/esm/plugins/filterable/components/filterable-menus/getFilterMenuByType.js.map +7 -0
- package/dist/esm/plugins/filterable/filterableFormatter.js +44 -0
- package/dist/esm/plugins/filterable/filterableFormatter.js.map +7 -0
- package/dist/esm/plugins/filterable/filtering-helper/filterRowsByQuery.js +67 -0
- package/dist/esm/plugins/filterable/filtering-helper/filterRowsByQuery.js.map +7 -0
- package/dist/esm/plugins/filterable/filtering-helper/strategiesOperators.js +15 -0
- package/dist/esm/plugins/filterable/filtering-helper/strategiesOperators.js.map +7 -0
- package/dist/esm/plugins/filterable/helper.js +104 -0
- package/dist/esm/plugins/filterable/helper.js.map +7 -0
- package/dist/esm/plugins/filterable/index.js +6 -0
- package/dist/esm/plugins/filterable/index.js.map +7 -0
- package/dist/esm/plugins/filterable/useFilterableState.js +104 -0
- package/dist/esm/plugins/filterable/useFilterableState.js.map +7 -0
- package/dist/esm/plugins/grouping-by/GroupingByPlugin.js +28 -0
- package/dist/esm/plugins/grouping-by/GroupingByPlugin.js.map +7 -0
- package/dist/esm/plugins/grouping-grid/GroupingPlugin.js +119 -0
- package/dist/esm/plugins/grouping-grid/GroupingPlugin.js.map +7 -0
- package/dist/esm/plugins/grouping-grid/walkStrategy.js +47 -0
- package/dist/esm/plugins/grouping-grid/walkStrategy.js.map +7 -0
- package/dist/esm/plugins/index.js +39 -0
- package/dist/esm/plugins/index.js.map +7 -0
- package/dist/esm/plugins/infinite-scrolling/InfiniteScrollPlugin.js +102 -0
- package/dist/esm/plugins/infinite-scrolling/InfiniteScrollPlugin.js.map +7 -0
- package/dist/esm/plugins/infinite-scrolling/index.js +6 -0
- package/dist/esm/plugins/infinite-scrolling/index.js.map +7 -0
- package/dist/esm/plugins/pagination/PaginationPlugin.js +101 -0
- package/dist/esm/plugins/pagination/PaginationPlugin.js.map +7 -0
- package/dist/esm/plugins/pagination/components/Pagination.js +34 -0
- package/dist/esm/plugins/pagination/components/Pagination.js.map +7 -0
- package/dist/esm/plugins/pagination/components/Paginator.js +53 -0
- package/dist/esm/plugins/pagination/components/Paginator.js.map +7 -0
- package/dist/esm/plugins/pagination/components/PerPageDropdown.js +68 -0
- package/dist/esm/plugins/pagination/components/PerPageDropdown.js.map +7 -0
- package/dist/esm/plugins/pagination/helper.js +33 -0
- package/dist/esm/plugins/pagination/helper.js.map +7 -0
- package/dist/esm/plugins/pagination/index.js +6 -0
- package/dist/esm/plugins/pagination/index.js.map +7 -0
- package/dist/esm/plugins/pagination/usePaginationState.js +71 -0
- package/dist/esm/plugins/pagination/usePaginationState.js.map +7 -0
- package/dist/esm/plugins/resizable/ResizablePlugin.js +80 -0
- package/dist/esm/plugins/resizable/ResizablePlugin.js.map +7 -0
- package/dist/esm/plugins/resizable/decorateResizable.js +45 -0
- package/dist/esm/plugins/resizable/decorateResizable.js.map +7 -0
- package/dist/esm/plugins/resizable/index.js +6 -0
- package/dist/esm/plugins/resizable/index.js.map +7 -0
- package/dist/esm/plugins/resizable/useResizeHandle.js +50 -0
- package/dist/esm/plugins/resizable/useResizeHandle.js.map +7 -0
- package/dist/esm/plugins/resizable/utils.js +25 -0
- package/dist/esm/plugins/resizable/utils.js.map +7 -0
- package/dist/esm/plugins/row-dnd/DndRowsPlugin.js +121 -0
- package/dist/esm/plugins/row-dnd/DndRowsPlugin.js.map +7 -0
- package/dist/esm/plugins/row-dnd/index.js +6 -0
- package/dist/esm/plugins/row-dnd/index.js.map +7 -0
- package/dist/esm/plugins/selectable/SelectablePlugin.js +137 -0
- package/dist/esm/plugins/selectable/SelectablePlugin.js.map +7 -0
- package/dist/esm/plugins/selectable/addSelectableColumn.js +105 -0
- package/dist/esm/plugins/selectable/addSelectableColumn.js.map +7 -0
- package/dist/esm/plugins/selectable/helper.js +43 -0
- package/dist/esm/plugins/selectable/helper.js.map +7 -0
- package/dist/esm/plugins/selectable/index.js +6 -0
- package/dist/esm/plugins/selectable/index.js.map +7 -0
- package/dist/esm/plugins/selectable/selectableFormatter.js +83 -0
- package/dist/esm/plugins/selectable/selectableFormatter.js.map +7 -0
- package/dist/esm/plugins/selectable/useSelectableState.js +107 -0
- package/dist/esm/plugins/selectable/useSelectableState.js.map +7 -0
- package/dist/esm/plugins/sortable/SortablePlugin.js +69 -0
- package/dist/esm/plugins/sortable/SortablePlugin.js.map +7 -0
- package/dist/esm/plugins/sortable/checkIfSortable.js +16 -0
- package/dist/esm/plugins/sortable/checkIfSortable.js.map +7 -0
- package/dist/esm/plugins/sortable/index.js +6 -0
- package/dist/esm/plugins/sortable/index.js.map +7 -0
- package/dist/esm/plugins/sortable/sortHeaderFormatter.js +37 -0
- package/dist/esm/plugins/sortable/sortHeaderFormatter.js.map +7 -0
- package/dist/esm/plugins/sortable/sortTree.js +33 -0
- package/dist/esm/plugins/sortable/sortTree.js.map +7 -0
- package/dist/esm/plugins/sortable/sorter.js +127 -0
- package/dist/esm/plugins/sortable/sorter.js.map +7 -0
- package/dist/esm/plugins/sortable/useSortableState.js +62 -0
- package/dist/esm/plugins/sortable/useSortableState.js.map +7 -0
- package/dist/esm/plugins/toolbar/RowRenderer.js +83 -0
- package/dist/esm/plugins/toolbar/RowRenderer.js.map +7 -0
- package/dist/esm/plugins/toolbar/ToolbarPlugin.js +29 -0
- package/dist/esm/plugins/toolbar/ToolbarPlugin.js.map +7 -0
- package/dist/esm/plugins/toolbar/ToolbarTrigger.js +94 -0
- package/dist/esm/plugins/toolbar/ToolbarTrigger.js.map +7 -0
- package/dist/esm/plugins/toolbar/index.js +6 -0
- package/dist/esm/plugins/toolbar/index.js.map +7 -0
- package/dist/esm/plugins/virtualization/AutoHeightList.js +81 -0
- package/dist/esm/plugins/virtualization/AutoHeightList.js.map +7 -0
- package/dist/esm/plugins/virtualization/VirtualizationPlugin.js +84 -0
- package/dist/esm/plugins/virtualization/VirtualizationPlugin.js.map +7 -0
- package/dist/esm/plugins/virtualization/VirtualizedBody.js +247 -0
- package/dist/esm/plugins/virtualization/VirtualizedBody.js.map +7 -0
- package/dist/esm/plugins/virtualization/VirtualizedBodyRow.js +23 -0
- package/dist/esm/plugins/virtualization/VirtualizedBodyRow.js.map +7 -0
- package/dist/esm/plugins/virtualization/helper.js +6 -0
- package/dist/esm/plugins/virtualization/helper.js.map +7 -0
- package/dist/esm/plugins/virtualization/index.js +6 -0
- package/dist/esm/plugins/virtualization/index.js.map +7 -0
- package/dist/esm/renders/CellWithAddons.js +82 -0
- package/dist/esm/renders/CellWithAddons.js.map +7 -0
- package/dist/esm/renders/index.js +8 -0
- package/dist/esm/renders/index.js.map +7 -0
- package/dist/esm/renders/styled.js +49 -0
- package/dist/esm/renders/styled.js.map +7 -0
- package/dist/esm/rowSizes.js +22 -0
- package/dist/esm/rowSizes.js.map +7 -0
- package/dist/esm/utilities/DataGridUtilities.json +1315 -0
- package/dist/esm/utilities/getPluginsFromProps.js +43 -0
- package/dist/esm/utilities/getPluginsFromProps.js.map +7 -0
- package/dist/esm/utilities/getScrollbarSize.js +17 -0
- package/dist/esm/utilities/getScrollbarSize.js.map +7 -0
- package/dist/esm/utilities/normalizeData.js +38 -0
- package/dist/esm/utilities/normalizeData.js.map +7 -0
- package/package.json +295 -287
- package/cjs/DSDataGrid.js +0 -639
- package/cjs/DataGridImpl.js +0 -169
- package/cjs/PaginatedDataGrid.js +0 -77
- package/cjs/blockNames.js +0 -11
- package/cjs/columns/IconColumn.js +0 -95
- package/cjs/columns/NumberColumn.js +0 -6
- package/cjs/components/BodyCell.js +0 -101
- package/cjs/components/BodyList.js +0 -54
- package/cjs/components/ColumnVisibilityMenuOption.js +0 -44
- package/cjs/components/ColumnsOptionsMenuSection.js +0 -49
- package/cjs/components/EmptyState.js +0 -51
- package/cjs/components/HeaderCell.js +0 -70
- package/cjs/components/List.js +0 -32
- package/cjs/components/ListItem.js +0 -44
- package/cjs/components/NoResults.js +0 -51
- package/cjs/components/RowsLoader.js +0 -22
- package/cjs/components/Table.js +0 -122
- package/cjs/components/TableBody.js +0 -69
- package/cjs/components/TableHeader.js +0 -37
- package/cjs/components/footer/addOptionalFooterComponents.js +0 -46
- package/cjs/components/header/PrimaryControls.js +0 -36
- package/cjs/components/header/addOptionalHeaderComponents.js +0 -47
- package/cjs/components/index.js +0 -17
- package/cjs/components/renderers/defaultClassedRenderers.js +0 -59
- package/cjs/components/renderers/index.js +0 -23
- package/cjs/components/renderers/renderRowsLoader.js +0 -18
- package/cjs/components/tableContext.js +0 -13
- package/cjs/defaultPlugins.js +0 -12
- package/cjs/index.js +0 -67
- package/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +0 -143
- package/cjs/plugins/body-header-scroll-sync/index.js +0 -9
- package/cjs/plugins/column-dnd/DndColumnsPlugin.js +0 -134
- package/cjs/plugins/column-dnd/decorateGridWithDndColumns.js +0 -30
- package/cjs/plugins/column-dnd/index.js +0 -9
- package/cjs/plugins/column-sizing/ColumnSizingPlugin.js +0 -88
- package/cjs/plugins/column-sizing/columnMeasurerTransformer.js +0 -74
- package/cjs/plugins/column-sizing/ext-points/decorateColumn.js +0 -17
- package/cjs/plugins/column-sizing/ext-points/getTableProps.js +0 -63
- package/cjs/plugins/column-sizing/getColumnNameFromProperty.js +0 -9
- package/cjs/plugins/column-sizing/index.js +0 -9
- package/cjs/plugins/column-sizing/useColumnSizeService.js +0 -162
- package/cjs/plugins/column-sizing/useStylesheetHelpers.js +0 -270
- package/cjs/plugins/column-sizing/utils.js +0 -45
- package/cjs/plugins/custom-cell-renderer/CustomRendererPlugin.js +0 -18
- package/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js +0 -72
- package/cjs/plugins/custom-cell-renderer/getRendererComponent.js +0 -65
- package/cjs/plugins/custom-cell-renderer/index.js +0 -9
- package/cjs/plugins/editable/EditableComponents/ComboBox.js +0 -71
- package/cjs/plugins/editable/EditableComponents/TextBox.js +0 -110
- package/cjs/plugins/editable/EditableComponents/index.js +0 -11
- package/cjs/plugins/editable/EditablePlugin.js +0 -123
- package/cjs/plugins/editable/decorateEditable.js +0 -122
- package/cjs/plugins/editable/getEditorComponent.js +0 -82
- package/cjs/plugins/editable/index.js +0 -13
- package/cjs/plugins/expandable-grid/ExpandableColumn.js +0 -156
- package/cjs/plugins/expandable-grid/ExpandablePlugin.js +0 -243
- package/cjs/plugins/expandable-grid/ExpandedRow.js +0 -156
- package/cjs/plugins/expandable-grid/ExpandedRowExtra.js +0 -54
- package/cjs/plugins/expandable-grid/index.js +0 -11
- package/cjs/plugins/expandable-grid/useExpandGridState.js +0 -79
- package/cjs/plugins/export-data/ExportDataPlugin.js +0 -168
- package/cjs/plugins/export-data/index.js +0 -12
- package/cjs/plugins/filterable/FilterablePlugin.js +0 -81
- package/cjs/plugins/filterable/addFilterToColumn.js +0 -31
- package/cjs/plugins/filterable/components/FilterableHeader.js +0 -120
- package/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +0 -157
- package/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +0 -107
- package/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +0 -195
- package/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js +0 -174
- package/cjs/plugins/filterable/components/filterable-menus/defaultDateFormat.js +0 -7
- package/cjs/plugins/filterable/components/filterable-menus/getFilterMenuByType.js +0 -18
- package/cjs/plugins/filterable/filterableFormatter.js +0 -63
- package/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js +0 -74
- package/cjs/plugins/filterable/filtering-helper/strategiesOperators.js +0 -23
- package/cjs/plugins/filterable/helper.js +0 -120
- package/cjs/plugins/filterable/index.js +0 -9
- package/cjs/plugins/filterable/useFilterableState.js +0 -117
- package/cjs/plugins/grouping-by/GroupingByPlugin.js +0 -40
- package/cjs/plugins/grouping-grid/GroupingPlugin.js +0 -149
- package/cjs/plugins/grouping-grid/walkStrategy.js +0 -56
- package/cjs/plugins/index.js +0 -48
- package/cjs/plugins/infinite-scrolling/InfiniteScrollPlugin.js +0 -124
- package/cjs/plugins/infinite-scrolling/index.js +0 -9
- package/cjs/plugins/pagination/PaginationPlugin.js +0 -109
- package/cjs/plugins/pagination/components/Pagination.js +0 -44
- package/cjs/plugins/pagination/components/Paginator.js +0 -67
- package/cjs/plugins/pagination/components/PerPageDropdown.js +0 -80
- package/cjs/plugins/pagination/helper.js +0 -41
- package/cjs/plugins/pagination/index.js +0 -9
- package/cjs/plugins/pagination/usePaginationState.js +0 -74
- package/cjs/plugins/resizable/ResizablePlugin.js +0 -113
- package/cjs/plugins/resizable/decorateResizable.js +0 -60
- package/cjs/plugins/resizable/index.js +0 -9
- package/cjs/plugins/resizable/useResizeHandle.js +0 -73
- package/cjs/plugins/resizable/utils.js +0 -33
- package/cjs/plugins/row-dnd/DndRowsPlugin.js +0 -115
- package/cjs/plugins/row-dnd/index.js +0 -9
- package/cjs/plugins/selectable/SelectablePlugin.js +0 -199
- package/cjs/plugins/selectable/addSelectableColumn.js +0 -93
- package/cjs/plugins/selectable/helper.js +0 -43
- package/cjs/plugins/selectable/index.js +0 -9
- package/cjs/plugins/selectable/selectableFormatter.js +0 -115
- package/cjs/plugins/selectable/useSelectableState.js +0 -143
- package/cjs/plugins/sortable/SortablePlugin.js +0 -109
- package/cjs/plugins/sortable/checkIfSortable.js +0 -22
- package/cjs/plugins/sortable/index.js +0 -9
- package/cjs/plugins/sortable/sortHeaderFormatter.js +0 -60
- package/cjs/plugins/sortable/sortTree.js +0 -51
- package/cjs/plugins/sortable/sorter.js +0 -176
- package/cjs/plugins/sortable/useSortableState.js +0 -99
- package/cjs/plugins/toolbar/RowRenderer.js +0 -97
- package/cjs/plugins/toolbar/ToolbarPlugin.js +0 -42
- package/cjs/plugins/toolbar/ToolbarTrigger.js +0 -86
- package/cjs/plugins/toolbar/index.js +0 -9
- package/cjs/plugins/virtualization/AutoHeightList.js +0 -59
- package/cjs/plugins/virtualization/VirtualizationPlugin.js +0 -108
- package/cjs/plugins/virtualization/VirtualizedBody.js +0 -275
- package/cjs/plugins/virtualization/VirtualizedBodyRow.js +0 -30
- package/cjs/plugins/virtualization/helper.js +0 -7
- package/cjs/plugins/virtualization/index.js +0 -9
- package/cjs/renders/CellWithAddons.js +0 -63
- package/cjs/renders/index.js +0 -11
- package/cjs/renders/styled.js +0 -27
- package/cjs/rowSizes.js +0 -19
- package/cjs/utilities/getPluginsFromProps.js +0 -44
- package/cjs/utilities/getScrollbarSize.js +0 -27
- package/cjs/utilities/normalizeData.js +0 -39
- package/esm/DSDataGrid.js +0 -630
- package/esm/DataGridImpl.js +0 -160
- package/esm/PaginatedDataGrid.js +0 -68
- package/esm/blockNames.js +0 -5
- package/esm/columns/IconColumn.js +0 -87
- package/esm/columns/NumberColumn.js +0 -4
- package/esm/components/BodyCell.js +0 -92
- package/esm/components/BodyList.js +0 -45
- package/esm/components/ColumnVisibilityMenuOption.js +0 -40
- package/esm/components/ColumnsOptionsMenuSection.js +0 -43
- package/esm/components/EmptyState.js +0 -41
- package/esm/components/HeaderCell.js +0 -62
- package/esm/components/List.js +0 -26
- package/esm/components/ListItem.js +0 -38
- package/esm/components/NoResults.js +0 -43
- package/esm/components/RowsLoader.js +0 -15
- package/esm/components/Table.js +0 -115
- package/esm/components/TableBody.js +0 -61
- package/esm/components/TableHeader.js +0 -31
- package/esm/components/footer/addOptionalFooterComponents.js +0 -40
- package/esm/components/header/PrimaryControls.js +0 -30
- package/esm/components/header/addOptionalHeaderComponents.js +0 -40
- package/esm/components/index.js +0 -5
- package/esm/components/renderers/defaultClassedRenderers.js +0 -46
- package/esm/components/renderers/index.js +0 -18
- package/esm/components/renderers/renderRowsLoader.js +0 -10
- package/esm/components/tableContext.js +0 -5
- package/esm/defaultPlugins.js +0 -8
- package/esm/index.js +0 -27
- package/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +0 -132
- package/esm/plugins/body-header-scroll-sync/index.js +0 -1
- package/esm/plugins/column-dnd/DndColumnsPlugin.js +0 -125
- package/esm/plugins/column-dnd/decorateGridWithDndColumns.js +0 -22
- package/esm/plugins/column-dnd/index.js +0 -1
- package/esm/plugins/column-sizing/ColumnSizingPlugin.js +0 -80
- package/esm/plugins/column-sizing/columnMeasurerTransformer.js +0 -66
- package/esm/plugins/column-sizing/ext-points/decorateColumn.js +0 -13
- package/esm/plugins/column-sizing/ext-points/getTableProps.js +0 -55
- package/esm/plugins/column-sizing/getColumnNameFromProperty.js +0 -7
- package/esm/plugins/column-sizing/index.js +0 -1
- package/esm/plugins/column-sizing/useColumnSizeService.js +0 -156
- package/esm/plugins/column-sizing/useStylesheetHelpers.js +0 -245
- package/esm/plugins/column-sizing/utils.js +0 -37
- package/esm/plugins/custom-cell-renderer/CustomRendererPlugin.js +0 -10
- package/esm/plugins/custom-cell-renderer/addCustomRendererToCell.js +0 -63
- package/esm/plugins/custom-cell-renderer/getRendererComponent.js +0 -56
- package/esm/plugins/custom-cell-renderer/index.js +0 -1
- package/esm/plugins/editable/EditableComponents/ComboBox.js +0 -65
- package/esm/plugins/editable/EditableComponents/TextBox.js +0 -103
- package/esm/plugins/editable/EditableComponents/index.js +0 -2
- package/esm/plugins/editable/EditablePlugin.js +0 -115
- package/esm/plugins/editable/decorateEditable.js +0 -92
- package/esm/plugins/editable/getEditorComponent.js +0 -74
- package/esm/plugins/editable/index.js +0 -3
- package/esm/plugins/expandable-grid/ExpandableColumn.js +0 -146
- package/esm/plugins/expandable-grid/ExpandablePlugin.js +0 -231
- package/esm/plugins/expandable-grid/ExpandedRow.js +0 -143
- package/esm/plugins/expandable-grid/ExpandedRowExtra.js +0 -46
- package/esm/plugins/expandable-grid/index.js +0 -2
- package/esm/plugins/expandable-grid/useExpandGridState.js +0 -75
- package/esm/plugins/export-data/ExportDataPlugin.js +0 -156
- package/esm/plugins/export-data/index.js +0 -1
- package/esm/plugins/filterable/FilterablePlugin.js +0 -73
- package/esm/plugins/filterable/addFilterToColumn.js +0 -23
- package/esm/plugins/filterable/components/FilterableHeader.js +0 -113
- package/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +0 -148
- package/esm/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +0 -97
- package/esm/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +0 -184
- package/esm/plugins/filterable/components/filterable-menus/TextFilterMenu.js +0 -163
- package/esm/plugins/filterable/components/filterable-menus/defaultDateFormat.js +0 -3
- package/esm/plugins/filterable/components/filterable-menus/getFilterMenuByType.js +0 -16
- package/esm/plugins/filterable/filterableFormatter.js +0 -57
- package/esm/plugins/filterable/filtering-helper/filterRowsByQuery.js +0 -65
- package/esm/plugins/filterable/filtering-helper/strategiesOperators.js +0 -17
- package/esm/plugins/filterable/helper.js +0 -106
- package/esm/plugins/filterable/index.js +0 -1
- package/esm/plugins/filterable/useFilterableState.js +0 -109
- package/esm/plugins/grouping-by/GroupingByPlugin.js +0 -32
- package/esm/plugins/grouping-grid/GroupingPlugin.js +0 -138
- package/esm/plugins/grouping-grid/walkStrategy.js +0 -52
- package/esm/plugins/index.js +0 -19
- package/esm/plugins/infinite-scrolling/InfiniteScrollPlugin.js +0 -114
- package/esm/plugins/infinite-scrolling/index.js +0 -1
- package/esm/plugins/pagination/PaginationPlugin.js +0 -96
- package/esm/plugins/pagination/components/Pagination.js +0 -36
- package/esm/plugins/pagination/components/Paginator.js +0 -59
- package/esm/plugins/pagination/components/PerPageDropdown.js +0 -71
- package/esm/plugins/pagination/helper.js +0 -36
- package/esm/plugins/pagination/index.js +0 -1
- package/esm/plugins/pagination/usePaginationState.js +0 -66
- package/esm/plugins/resizable/ResizablePlugin.js +0 -105
- package/esm/plugins/resizable/decorateResizable.js +0 -49
- package/esm/plugins/resizable/index.js +0 -1
- package/esm/plugins/resizable/useResizeHandle.js +0 -65
- package/esm/plugins/resizable/utils.js +0 -23
- package/esm/plugins/row-dnd/DndRowsPlugin.js +0 -105
- package/esm/plugins/row-dnd/index.js +0 -1
- package/esm/plugins/selectable/SelectablePlugin.js +0 -190
- package/esm/plugins/selectable/addSelectableColumn.js +0 -84
- package/esm/plugins/selectable/helper.js +0 -31
- package/esm/plugins/selectable/index.js +0 -1
- package/esm/plugins/selectable/selectableFormatter.js +0 -107
- package/esm/plugins/selectable/useSelectableState.js +0 -135
- package/esm/plugins/sortable/SortablePlugin.js +0 -82
- package/esm/plugins/sortable/checkIfSortable.js +0 -17
- package/esm/plugins/sortable/index.js +0 -1
- package/esm/plugins/sortable/sortHeaderFormatter.js +0 -53
- package/esm/plugins/sortable/sortTree.js +0 -26
- package/esm/plugins/sortable/sorter.js +0 -166
- package/esm/plugins/sortable/useSortableState.js +0 -71
- package/esm/plugins/toolbar/RowRenderer.js +0 -88
- package/esm/plugins/toolbar/ToolbarPlugin.js +0 -33
- package/esm/plugins/toolbar/ToolbarTrigger.js +0 -74
- package/esm/plugins/toolbar/index.js +0 -1
- package/esm/plugins/virtualization/AutoHeightList.js +0 -52
- package/esm/plugins/virtualization/VirtualizationPlugin.js +0 -97
- package/esm/plugins/virtualization/VirtualizedBody.js +0 -268
- package/esm/plugins/virtualization/VirtualizedBodyRow.js +0 -28
- package/esm/plugins/virtualization/helper.js +0 -3
- package/esm/plugins/virtualization/index.js +0 -1
- package/esm/renders/CellWithAddons.js +0 -53
- package/esm/renders/index.js +0 -2
- package/esm/renders/styled.js +0 -16
- package/esm/rowSizes.js +0 -13
- package/esm/utilities/getPluginsFromProps.js +0 -42
- package/esm/utilities/getScrollbarSize.js +0 -23
- package/esm/utilities/normalizeData.js +0 -29
- package/types/DSDataGrid.d.ts +0 -977
- package/types/DataGridImpl.d.ts +0 -12
- package/types/PaginatedDataGrid.d.ts +0 -16
- package/types/blockNames.d.ts +0 -4
- package/types/columns/IconColumn.d.ts +0 -35
- package/types/columns/NumberColumn.d.ts +0 -4
- package/types/components/BodyCell.d.ts +0 -33
- package/types/components/BodyList.d.ts +0 -12
- package/types/components/ColumnVisibilityMenuOption.d.ts +0 -15
- package/types/components/ColumnsOptionsMenuSection.d.ts +0 -8
- package/types/components/EmptyState.d.ts +0 -7
- package/types/components/HeaderCell.d.ts +0 -19
- package/types/components/List.d.ts +0 -3
- package/types/components/ListItem.d.ts +0 -3
- package/types/components/NoResults.d.ts +0 -8
- package/types/components/RowsLoader.d.ts +0 -5
- package/types/components/Table.d.ts +0 -13
- package/types/components/TableBody.d.ts +0 -9
- package/types/components/TableHeader.d.ts +0 -3
- package/types/components/footer/addOptionalFooterComponents.d.ts +0 -6
- package/types/components/header/PrimaryControls.d.ts +0 -5
- package/types/components/header/addOptionalHeaderComponents.d.ts +0 -11
- package/types/components/index.d.ts +0 -5
- package/types/components/renderers/defaultClassedRenderers.d.ts +0 -11
- package/types/components/renderers/index.d.ts +0 -15
- package/types/components/renderers/renderRowsLoader.d.ts +0 -2
- package/types/components/tableContext.d.ts +0 -2
- package/types/components/tests/ColumnVisibilityMenu.test.d.ts +0 -1
- package/types/defaultPlugins.d.ts +0 -1
- package/types/index.d.ts +0 -10
- package/types/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.d.ts +0 -1
- package/types/plugins/body-header-scroll-sync/index.d.ts +0 -1
- package/types/plugins/column-dnd/DndColumnsPlugin.d.ts +0 -1
- package/types/plugins/column-dnd/decorateGridWithDndColumns.d.ts +0 -2
- package/types/plugins/column-dnd/index.d.ts +0 -1
- package/types/plugins/column-sizing/ColumnSizingPlugin.d.ts +0 -1
- package/types/plugins/column-sizing/columnMeasurerTransformer.d.ts +0 -6
- package/types/plugins/column-sizing/ext-points/decorateColumn.d.ts +0 -1
- package/types/plugins/column-sizing/ext-points/getTableProps.d.ts +0 -10
- package/types/plugins/column-sizing/getColumnNameFromProperty.d.ts +0 -1
- package/types/plugins/column-sizing/index.d.ts +0 -1
- package/types/plugins/column-sizing/useColumnSizeService.d.ts +0 -17
- package/types/plugins/column-sizing/useStylesheetHelpers.d.ts +0 -22
- package/types/plugins/column-sizing/utils.d.ts +0 -5
- package/types/plugins/custom-cell-renderer/CustomRendererPlugin.d.ts +0 -1
- package/types/plugins/custom-cell-renderer/addCustomRendererToCell.d.ts +0 -3
- package/types/plugins/custom-cell-renderer/getRendererComponent.d.ts +0 -11
- package/types/plugins/custom-cell-renderer/index.d.ts +0 -1
- package/types/plugins/editable/EditableComponents/ComboBox.d.ts +0 -10
- package/types/plugins/editable/EditableComponents/TextBox.d.ts +0 -22
- package/types/plugins/editable/EditableComponents/index.d.ts +0 -2
- package/types/plugins/editable/EditablePlugin.d.ts +0 -1
- package/types/plugins/editable/decorateEditable.d.ts +0 -7
- package/types/plugins/editable/getEditorComponent.d.ts +0 -6
- package/types/plugins/editable/index.d.ts +0 -2
- package/types/plugins/expandable-grid/ExpandableColumn.d.ts +0 -28
- package/types/plugins/expandable-grid/ExpandablePlugin.d.ts +0 -1
- package/types/plugins/expandable-grid/ExpandedRow.d.ts +0 -11
- package/types/plugins/expandable-grid/ExpandedRowExtra.d.ts +0 -9
- package/types/plugins/expandable-grid/index.d.ts +0 -2
- package/types/plugins/expandable-grid/tests/ExpandablePlugin.test.d.ts +0 -1
- package/types/plugins/expandable-grid/useExpandGridState.d.ts +0 -14
- package/types/plugins/export-data/ExportDataPlugin.d.ts +0 -4
- package/types/plugins/export-data/index.d.ts +0 -1
- package/types/plugins/filterable/FilterablePlugin.d.ts +0 -1
- package/types/plugins/filterable/addFilterToColumn.d.ts +0 -1
- package/types/plugins/filterable/components/FilterableHeader.d.ts +0 -29
- package/types/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.d.ts +0 -30
- package/types/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.d.ts +0 -27
- package/types/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.d.ts +0 -30
- package/types/plugins/filterable/components/filterable-menus/TextFilterMenu.d.ts +0 -35
- package/types/plugins/filterable/components/filterable-menus/defaultDateFormat.d.ts +0 -1
- package/types/plugins/filterable/components/filterable-menus/getFilterMenuByType.d.ts +0 -1
- package/types/plugins/filterable/filterableFormatter.d.ts +0 -11
- package/types/plugins/filterable/filtering-helper/filterRowsByQuery.d.ts +0 -2
- package/types/plugins/filterable/filtering-helper/strategiesOperators.d.ts +0 -2
- package/types/plugins/filterable/helper.d.ts +0 -22
- package/types/plugins/filterable/index.d.ts +0 -1
- package/types/plugins/filterable/useFilterableState.d.ts +0 -18
- package/types/plugins/grouping-by/GroupingByPlugin.d.ts +0 -1
- package/types/plugins/grouping-grid/GroupingPlugin.d.ts +0 -1
- package/types/plugins/grouping-grid/walkStrategy.d.ts +0 -9
- package/types/plugins/index.d.ts +0 -16
- package/types/plugins/infinite-scrolling/InfiniteScrollPlugin.d.ts +0 -1
- package/types/plugins/infinite-scrolling/index.d.ts +0 -1
- package/types/plugins/pagination/PaginationPlugin.d.ts +0 -1
- package/types/plugins/pagination/components/Pagination.d.ts +0 -11
- package/types/plugins/pagination/components/Paginator.d.ts +0 -9
- package/types/plugins/pagination/components/PerPageDropdown.d.ts +0 -9
- package/types/plugins/pagination/helper.d.ts +0 -17
- package/types/plugins/pagination/index.d.ts +0 -1
- package/types/plugins/pagination/usePaginationState.d.ts +0 -9
- package/types/plugins/resizable/ResizablePlugin.d.ts +0 -1
- package/types/plugins/resizable/decorateResizable.d.ts +0 -4
- package/types/plugins/resizable/index.d.ts +0 -1
- package/types/plugins/resizable/useResizeHandle.d.ts +0 -13
- package/types/plugins/resizable/utils.d.ts +0 -3
- package/types/plugins/row-dnd/DndRowsPlugin.d.ts +0 -1
- package/types/plugins/row-dnd/index.d.ts +0 -1
- package/types/plugins/selectable/SelectablePlugin.d.ts +0 -1
- package/types/plugins/selectable/addSelectableColumn.d.ts +0 -30
- package/types/plugins/selectable/helper.d.ts +0 -5
- package/types/plugins/selectable/index.d.ts +0 -1
- package/types/plugins/selectable/selectableFormatter.d.ts +0 -9
- package/types/plugins/selectable/useSelectableState.d.ts +0 -9
- package/types/plugins/sortable/SortablePlugin.d.ts +0 -1
- package/types/plugins/sortable/checkIfSortable.d.ts +0 -2
- package/types/plugins/sortable/index.d.ts +0 -1
- package/types/plugins/sortable/sortHeaderFormatter.d.ts +0 -6
- package/types/plugins/sortable/sortTree.d.ts +0 -2
- package/types/plugins/sortable/sorter.d.ts +0 -12
- package/types/plugins/sortable/useSortableState.d.ts +0 -8
- package/types/plugins/toolbar/RowRenderer.d.ts +0 -11
- package/types/plugins/toolbar/ToolbarPlugin.d.ts +0 -1
- package/types/plugins/toolbar/ToolbarTrigger.d.ts +0 -8
- package/types/plugins/toolbar/index.d.ts +0 -1
- package/types/plugins/virtualization/AutoHeightList.d.ts +0 -3
- package/types/plugins/virtualization/VirtualizationPlugin.d.ts +0 -1
- package/types/plugins/virtualization/VirtualizedBody.d.ts +0 -32
- package/types/plugins/virtualization/VirtualizedBodyRow.d.ts +0 -8
- package/types/plugins/virtualization/helper.d.ts +0 -1
- package/types/plugins/virtualization/index.d.ts +0 -1
- package/types/renders/CellWithAddons.d.ts +0 -52
- package/types/renders/index.d.ts +0 -2
- package/types/renders/styled.d.ts +0 -3
- package/types/rowSizes.d.ts +0 -11
- package/types/stories/datagrids-export.stories.d.ts +0 -1
- package/types/stories/datagrids-selectable-multi.stories.d.ts +0 -1
- package/types/tests/DataGrid-Columns.test.d.ts +0 -1
- package/types/tests/DataGrid-Editable.test.d.ts +0 -1
- package/types/tests/DataGrid-Export.test.d.ts +0 -1
- package/types/tests/DataGrid-Filter-helper.test.d.ts +0 -1
- package/types/tests/DataGrid-Filterable-Dates.test.d.ts +0 -1
- package/types/tests/DataGrid-Filterable-State.test.d.ts +0 -1
- package/types/tests/DataGrid-RowDnd.test.d.ts +0 -1
- package/types/tests/DataGrid-Selectable.test.d.ts +0 -1
- package/types/tests/DataGrid-Sortable.test.d.ts +0 -1
- package/types/tests/DataGrid-Toolbar.test.d.ts +0 -1
- package/types/tests/DataGrid-Virtualization.test.d.ts +0 -1
- package/types/tests/DataGrids-ColumnSizing.test.d.ts +0 -1
- package/types/tests/DataGrids-ConditionalPagination.test.d.ts +0 -1
- package/types/tests/DataGrids-Rows.test.d.ts +0 -1
- package/types/tests/DataGrids.test.d.ts +0 -1
- package/types/utilities/getPluginsFromProps.d.ts +0 -1
- package/types/utilities/getScrollbarSize.d.ts +0 -1
- package/types/utilities/normalizeData.d.ts +0 -3
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
import * as React from "react";
|
|
21
|
+
import {
|
|
22
|
+
isFunction,
|
|
23
|
+
uniqBy,
|
|
24
|
+
get,
|
|
25
|
+
groupBy,
|
|
26
|
+
property
|
|
27
|
+
} from "@elliemae/ds-utilities";
|
|
28
|
+
const getFilterLabel = (column, value) => column.filterLabels ? column.filterLabels[value] || value : value;
|
|
29
|
+
const getFilterLabels = (column, rows) => uniqBy(rows, property(column.searchBy || column.property)).map((row) => {
|
|
30
|
+
const value = get(row, column.searchBy || column.property);
|
|
31
|
+
if (value === void 0)
|
|
32
|
+
return {};
|
|
33
|
+
const rowColumnValue = String(get(row, column.searchBy || column.property));
|
|
34
|
+
if (isFunction(column.valueTransformation)) {
|
|
35
|
+
const nextValue = column.valueTransformation(rowColumnValue);
|
|
36
|
+
return { id: nextValue, label: nextValue };
|
|
37
|
+
}
|
|
38
|
+
const label = getFilterLabel(column, rowColumnValue);
|
|
39
|
+
return { id: rowColumnValue || label, label };
|
|
40
|
+
}).filter((row) => row.id).filter((row) => {
|
|
41
|
+
if (row.id.startsWith)
|
|
42
|
+
return !row.id.startsWith("grouped-by");
|
|
43
|
+
return true;
|
|
44
|
+
});
|
|
45
|
+
const getFilterLabelsGroup = (column, rows) => {
|
|
46
|
+
let flat = [];
|
|
47
|
+
rows.forEach((r) => {
|
|
48
|
+
if (r.children) {
|
|
49
|
+
flat = [...flat, ...r.children];
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
return getFilterLabels(column, flat);
|
|
53
|
+
};
|
|
54
|
+
function getFilterValue(filter, column) {
|
|
55
|
+
const { value } = filter;
|
|
56
|
+
if (!column)
|
|
57
|
+
return value;
|
|
58
|
+
const { filterOptions, filterLabels } = column;
|
|
59
|
+
if (filterOptions) {
|
|
60
|
+
const foundOption = column.filterOptions.filter((option) => option.id === value)[0];
|
|
61
|
+
if (foundOption)
|
|
62
|
+
return foundOption.label;
|
|
63
|
+
return value;
|
|
64
|
+
}
|
|
65
|
+
if (filterLabels) {
|
|
66
|
+
return filterLabels[value];
|
|
67
|
+
}
|
|
68
|
+
return value;
|
|
69
|
+
}
|
|
70
|
+
function buildFilterArray(newFilter, filters) {
|
|
71
|
+
return uniqBy([...filters, newFilter], (v) => [v.group, v.value].join());
|
|
72
|
+
}
|
|
73
|
+
const groupFilters = (filters) => filters.filter((filter) => !filter.fixed);
|
|
74
|
+
function parseFilterToRule(filter) {
|
|
75
|
+
return __spreadProps(__spreadValues({}, filter), {
|
|
76
|
+
value: filter.filterParams || filter.value,
|
|
77
|
+
field: filter.group
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
function parseFiltersToQuery(filters) {
|
|
81
|
+
const groupedFilters = groupBy(groupFilters(filters), (filter) => filter.group);
|
|
82
|
+
return Object.keys(groupedFilters).reduce((queryResult, field) => {
|
|
83
|
+
const filter = groupedFilters[field];
|
|
84
|
+
if (Array.isArray(filter) && filter.length > 1) {
|
|
85
|
+
queryResult.rules.push({
|
|
86
|
+
condition: "OR",
|
|
87
|
+
rules: filter.map(parseFilterToRule)
|
|
88
|
+
});
|
|
89
|
+
} else {
|
|
90
|
+
queryResult.rules.push(parseFilterToRule(filter[0]));
|
|
91
|
+
}
|
|
92
|
+
return queryResult;
|
|
93
|
+
}, { condition: "AND", rules: [] });
|
|
94
|
+
}
|
|
95
|
+
export {
|
|
96
|
+
buildFilterArray,
|
|
97
|
+
getFilterLabel,
|
|
98
|
+
getFilterLabels,
|
|
99
|
+
getFilterLabelsGroup,
|
|
100
|
+
getFilterValue,
|
|
101
|
+
groupFilters,
|
|
102
|
+
parseFiltersToQuery
|
|
103
|
+
};
|
|
104
|
+
//# sourceMappingURL=helper.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/filterable/helper.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import {\n isFunction,\n uniqBy,\n get,\n groupBy,\n property,\n} from '@elliemae/ds-utilities';\n\nexport const getFilterLabel = (column, value) => (column.filterLabels ? column.filterLabels[value] || value : value);\n\nexport const getFilterLabels = (column, rows) =>\n uniqBy(rows, property(column.searchBy || column.property))\n .map((row) => {\n const value = get(row, column.searchBy || column.property);\n if (value === undefined) return {};\n const rowColumnValue = String(get(row, column.searchBy || column.property));\n if (isFunction(column.valueTransformation)) {\n const nextValue = column.valueTransformation(rowColumnValue);\n return { id: nextValue, label: nextValue };\n }\n const label = getFilterLabel(column, rowColumnValue);\n return { id: rowColumnValue || label, label };\n })\n .filter((row) => row.id)\n .filter((row) => {\n if (row.id.startsWith) return !row.id.startsWith('grouped-by');\n return true;\n });\n\nexport const getFilterLabelsGroup = (column, rows) => {\n let flat = [];\n rows.forEach((r) => {\n if (r.children) {\n flat = [...flat, ...r.children];\n }\n });\n return getFilterLabels(column, flat);\n};\n\nexport function getFilterValue(filter, column) {\n const { value } = filter;\n\n if (!column) return value;\n\n const { filterOptions, filterLabels } = column;\n\n if (filterOptions) {\n const foundOption = column.filterOptions.filter((option) => option.id === value)[0];\n if (foundOption) return foundOption.label;\n return value;\n }\n if (filterLabels) {\n return filterLabels[value];\n }\n\n return value;\n}\n\nexport function buildFilterArray(newFilter, filters) {\n // if (newFilter.type && newFilter.type === 'date') return [...filters.slice(1), newFilter]\n return uniqBy([...filters, newFilter], (v) => [v.group, v.value].join());\n}\n\nexport const groupFilters = (filters) => filters.filter((filter) => !filter.fixed);\n\nfunction parseFilterToRule(filter) {\n return {\n ...filter,\n value: filter.filterParams || filter.value,\n field: filter.group,\n };\n}\n\nexport function parseFiltersToQuery(filters) {\n const groupedFilters = groupBy(groupFilters(filters), (filter) => filter.group);\n return Object.keys(groupedFilters).reduce(\n (queryResult, field) => {\n const filter = groupedFilters[field];\n if (Array.isArray(filter) && filter.length > 1) {\n // create query group with 'OR' condition\n queryResult.rules.push({\n condition: 'OR',\n rules: filter.map(parseFilterToRule),\n });\n } else {\n queryResult.rules.push(parseFilterToRule(filter[0]));\n }\n return queryResult;\n },\n { condition: 'AND', rules: [] },\n );\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQO,MAAM,iBAAiB,CAAC,QAAQ,UAAW,OAAO,eAAe,OAAO,aAAa,UAAU,QAAQ;AAEvG,MAAM,kBAAkB,CAAC,QAAQ,SACtC,OAAO,MAAM,SAAS,OAAO,YAAY,OAAO,WAC7C,IAAI,CAAC,QAAQ;AACZ,QAAM,QAAQ,IAAI,KAAK,OAAO,YAAY,OAAO;AACjD,MAAI,UAAU;AAAW,WAAO;AAChC,QAAM,iBAAiB,OAAO,IAAI,KAAK,OAAO,YAAY,OAAO;AACjE,MAAI,WAAW,OAAO,sBAAsB;AAC1C,UAAM,YAAY,OAAO,oBAAoB;AAC7C,WAAO,EAAE,IAAI,WAAW,OAAO;AAAA;AAEjC,QAAM,QAAQ,eAAe,QAAQ;AACrC,SAAO,EAAE,IAAI,kBAAkB,OAAO;AAAA,GAEvC,OAAO,CAAC,QAAQ,IAAI,IACpB,OAAO,CAAC,QAAQ;AACf,MAAI,IAAI,GAAG;AAAY,WAAO,CAAC,IAAI,GAAG,WAAW;AACjD,SAAO;AAAA;AAGN,MAAM,uBAAuB,CAAC,QAAQ,SAAS;AACpD,MAAI,OAAO;AACX,OAAK,QAAQ,CAAC,MAAM;AAClB,QAAI,EAAE,UAAU;AACd,aAAO,CAAC,GAAG,MAAM,GAAG,EAAE;AAAA;AAAA;AAG1B,SAAO,gBAAgB,QAAQ;AAAA;AAG1B,wBAAwB,QAAQ,QAAQ;AAC7C,QAAM,EAAE,UAAU;AAElB,MAAI,CAAC;AAAQ,WAAO;AAEpB,QAAM,EAAE,eAAe,iBAAiB;AAExC,MAAI,eAAe;AACjB,UAAM,cAAc,OAAO,cAAc,OAAO,CAAC,WAAW,OAAO,OAAO,OAAO;AACjF,QAAI;AAAa,aAAO,YAAY;AACpC,WAAO;AAAA;AAET,MAAI,cAAc;AAChB,WAAO,aAAa;AAAA;AAGtB,SAAO;AAAA;AAGF,0BAA0B,WAAW,SAAS;AAEnD,SAAO,OAAO,CAAC,GAAG,SAAS,YAAY,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,OAAO;AAAA;AAG5D,MAAM,eAAe,CAAC,YAAY,QAAQ,OAAO,CAAC,WAAW,CAAC,OAAO;AAE5E,2BAA2B,QAAQ;AACjC,SAAO,iCACF,SADE;AAAA,IAEL,OAAO,OAAO,gBAAgB,OAAO;AAAA,IACrC,OAAO,OAAO;AAAA;AAAA;AAIX,6BAA6B,SAAS;AAC3C,QAAM,iBAAiB,QAAQ,aAAa,UAAU,CAAC,WAAW,OAAO;AACzE,SAAO,OAAO,KAAK,gBAAgB,OACjC,CAAC,aAAa,UAAU;AACtB,UAAM,SAAS,eAAe;AAC9B,QAAI,MAAM,QAAQ,WAAW,OAAO,SAAS,GAAG;AAE9C,kBAAY,MAAM,KAAK;AAAA,QACrB,WAAW;AAAA,QACX,OAAO,OAAO,IAAI;AAAA;AAAA,WAEf;AACL,kBAAY,MAAM,KAAK,kBAAkB,OAAO;AAAA;AAElD,WAAO;AAAA,KAET,EAAE,WAAW,OAAO,OAAO;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/filterable/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { FilterablePlugin } from './FilterablePlugin';\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
import * as React from "react";
|
|
21
|
+
import { useMemo, useState, useEffect } from "react";
|
|
22
|
+
import { v4 as uuidv4 } from "uuid";
|
|
23
|
+
import {
|
|
24
|
+
buildFilterArray,
|
|
25
|
+
getFilterValue,
|
|
26
|
+
parseFiltersToQuery
|
|
27
|
+
} from "./helper";
|
|
28
|
+
const noop = () => null;
|
|
29
|
+
function useFilterableState(grid) {
|
|
30
|
+
const {
|
|
31
|
+
filters: filtersProp,
|
|
32
|
+
onAddFilter = noop,
|
|
33
|
+
onRemoveFilter = noop,
|
|
34
|
+
onRemoveAllFilters = noop,
|
|
35
|
+
onFiltersChange = noop
|
|
36
|
+
} = grid.props;
|
|
37
|
+
const [filters, setFilters] = useState(filtersProp || []);
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
if (filtersProp && filtersProp !== filters) {
|
|
40
|
+
setFilters(filtersProp);
|
|
41
|
+
}
|
|
42
|
+
}, [filtersProp]);
|
|
43
|
+
const queryFromFilters = useMemo(() => parseFiltersToQuery(filters || []), [
|
|
44
|
+
filters
|
|
45
|
+
]);
|
|
46
|
+
const handleFiltersChange = (nextFilters) => {
|
|
47
|
+
const {
|
|
48
|
+
refs: { body }
|
|
49
|
+
} = grid.getInstance();
|
|
50
|
+
body.current.scrollTop = 0;
|
|
51
|
+
setFilters(nextFilters);
|
|
52
|
+
grid.observeRows((rows) => onFiltersChange(nextFilters, queryFromFilters, rows));
|
|
53
|
+
};
|
|
54
|
+
const addFilter = (filter, column) => {
|
|
55
|
+
let hasBeenCalled = false;
|
|
56
|
+
const trimmedFilter = __spreadProps(__spreadValues({}, filter), {
|
|
57
|
+
value: String(filter.value).trim()
|
|
58
|
+
});
|
|
59
|
+
const parsedFilter = !filter.group ? __spreadProps(__spreadValues({}, trimmedFilter), {
|
|
60
|
+
value: String(filter.value).trim(),
|
|
61
|
+
group: "all",
|
|
62
|
+
label: "All",
|
|
63
|
+
id: uuidv4()
|
|
64
|
+
}) : __spreadProps(__spreadValues({}, trimmedFilter), {
|
|
65
|
+
value: String(filter.value).trim(),
|
|
66
|
+
id: uuidv4(),
|
|
67
|
+
label: column && column.filterLabel || trimmedFilter.label,
|
|
68
|
+
originalProperty: column.originalProperty || column.property,
|
|
69
|
+
customValue: getFilterValue(trimmedFilter, column)
|
|
70
|
+
});
|
|
71
|
+
setFilters((prevFilters) => {
|
|
72
|
+
if (hasBeenCalled) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
hasBeenCalled = true;
|
|
76
|
+
const nextFilters = buildFilterArray(parsedFilter, prevFilters);
|
|
77
|
+
handleFiltersChange(nextFilters, true);
|
|
78
|
+
onAddFilter(parsedFilter, nextFilters, column);
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
const removeFilter = ({ group, pill, nextFilters }) => {
|
|
82
|
+
onRemoveFilter(group, pill.value, nextFilters);
|
|
83
|
+
handleFiltersChange(nextFilters);
|
|
84
|
+
};
|
|
85
|
+
const removeAllFilters = () => {
|
|
86
|
+
onRemoveAllFilters();
|
|
87
|
+
handleFiltersChange([]);
|
|
88
|
+
};
|
|
89
|
+
return {
|
|
90
|
+
actions: {
|
|
91
|
+
addFilter,
|
|
92
|
+
removeFilter,
|
|
93
|
+
removeAllFilters
|
|
94
|
+
},
|
|
95
|
+
state: {
|
|
96
|
+
query: queryFromFilters,
|
|
97
|
+
filters
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
export {
|
|
102
|
+
useFilterableState
|
|
103
|
+
};
|
|
104
|
+
//# sourceMappingURL=useFilterableState.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/filterable/useFilterableState.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useMemo, useState, useEffect } from 'react';\nimport { v4 as uuidv4 } from 'uuid';\nimport {\n buildFilterArray,\n getFilterValue,\n parseFiltersToQuery,\n} from './helper';\n\nconst noop = () => null;\n\nexport function useFilterableState(grid) {\n const {\n filters: filtersProp,\n onAddFilter = noop,\n onRemoveFilter = noop,\n onRemoveAllFilters = noop,\n onFiltersChange = noop,\n } = grid.props;\n\n const [filters, setFilters] = useState(filtersProp || []);\n\n useEffect(() => {\n if (filtersProp && filtersProp !== filters) {\n setFilters(filtersProp);\n }\n }, [filtersProp]);\n\n const queryFromFilters = useMemo(() => parseFiltersToQuery(filters || []), [\n filters,\n ]);\n\n const handleFiltersChange = (nextFilters) => {\n const {\n refs: { body },\n } = grid.getInstance();\n body.current.scrollTop = 0;\n setFilters(nextFilters);\n grid.observeRows((rows) =>\n onFiltersChange(nextFilters, queryFromFilters, rows),\n );\n };\n\n const addFilter = (filter, column) => {\n let hasBeenCalled = false;\n const trimmedFilter = {\n ...filter,\n value: String(filter.value).trim(),\n };\n /* eslint-disable indent */\n const parsedFilter = !filter.group\n ? {\n ...trimmedFilter,\n value: String(filter.value).trim(),\n group: 'all',\n label: 'All',\n id: uuidv4(),\n }\n : {\n ...trimmedFilter,\n value: String(filter.value).trim(),\n id: uuidv4(),\n label: (column && column.filterLabel) || trimmedFilter.label,\n originalProperty: column.originalProperty || column.property,\n customValue: getFilterValue(trimmedFilter, column),\n };\n /* eslint-enable indent */\n setFilters((prevFilters) => {\n // This was setted for an issue that was recalling this function on the handleFiltersChange\n if (hasBeenCalled) {\n return;\n }\n hasBeenCalled = true;\n\n const nextFilters = buildFilterArray(parsedFilter, prevFilters);\n handleFiltersChange(nextFilters, true);\n onAddFilter(parsedFilter, nextFilters, column);\n });\n };\n\n const removeFilter = ({ group, pill, nextFilters }) => {\n onRemoveFilter(group, pill.value, nextFilters);\n handleFiltersChange(nextFilters);\n };\n\n const removeAllFilters = () => {\n onRemoveAllFilters();\n handleFiltersChange([]);\n };\n return {\n actions: {\n addFilter,\n removeFilter,\n removeAllFilters,\n },\n state: {\n query: queryFromFilters,\n filters,\n },\n };\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAMA,MAAM,OAAO,MAAM;AAEZ,4BAA4B,MAAM;AACvC,QAAM;AAAA,IACJ,SAAS;AAAA,IACT,cAAc;AAAA,IACd,iBAAiB;AAAA,IACjB,qBAAqB;AAAA,IACrB,kBAAkB;AAAA,MAChB,KAAK;AAET,QAAM,CAAC,SAAS,cAAc,SAAS,eAAe;AAEtD,YAAU,MAAM;AACd,QAAI,eAAe,gBAAgB,SAAS;AAC1C,iBAAW;AAAA;AAAA,KAEZ,CAAC;AAEJ,QAAM,mBAAmB,QAAQ,MAAM,oBAAoB,WAAW,KAAK;AAAA,IACzE;AAAA;AAGF,QAAM,sBAAsB,CAAC,gBAAgB;AAC3C,UAAM;AAAA,MACJ,MAAM,EAAE;AAAA,QACN,KAAK;AACT,SAAK,QAAQ,YAAY;AACzB,eAAW;AACX,SAAK,YAAY,CAAC,SAChB,gBAAgB,aAAa,kBAAkB;AAAA;AAInD,QAAM,YAAY,CAAC,QAAQ,WAAW;AACpC,QAAI,gBAAgB;AACpB,UAAM,gBAAgB,iCACjB,SADiB;AAAA,MAEpB,OAAO,OAAO,OAAO,OAAO;AAAA;AAG9B,UAAM,eAAe,CAAC,OAAO,QACzB,iCACK,gBADL;AAAA,MAEE,OAAO,OAAO,OAAO,OAAO;AAAA,MAC5B,OAAO;AAAA,MACP,OAAO;AAAA,MACP,IAAI;AAAA,SAEN,iCACK,gBADL;AAAA,MAEE,OAAO,OAAO,OAAO,OAAO;AAAA,MAC5B,IAAI;AAAA,MACJ,OAAQ,UAAU,OAAO,eAAgB,cAAc;AAAA,MACvD,kBAAkB,OAAO,oBAAoB,OAAO;AAAA,MACpD,aAAa,eAAe,eAAe;AAAA;AAGjD,eAAW,CAAC,gBAAgB;AAE1B,UAAI,eAAe;AACjB;AAAA;AAEF,sBAAgB;AAEhB,YAAM,cAAc,iBAAiB,cAAc;AACnD,0BAAoB,aAAa;AACjC,kBAAY,cAAc,aAAa;AAAA;AAAA;AAI3C,QAAM,eAAe,CAAC,EAAE,OAAO,MAAM,kBAAkB;AACrD,mBAAe,OAAO,KAAK,OAAO;AAClC,wBAAoB;AAAA;AAGtB,QAAM,mBAAmB,MAAM;AAC7B;AACA,wBAAoB;AAAA;AAEtB,SAAO;AAAA,IACL,SAAS;AAAA,MACP;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF,OAAO;AAAA,MACL,OAAO;AAAA,MACP;AAAA;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { createInstancePlugin } from "@elliemae/ds-shared/createDataInstance/createInstancePlugin";
|
|
3
|
+
import { groupBy } from "lodash";
|
|
4
|
+
const groupedByData = (groupedBy, composedRows) => {
|
|
5
|
+
const grouped = groupBy(composedRows, groupedBy);
|
|
6
|
+
return Object.keys(grouped).map((c, key) => ({
|
|
7
|
+
id: `grouped-by-${groupedBy}-${key}`,
|
|
8
|
+
key: groupedBy,
|
|
9
|
+
value: c,
|
|
10
|
+
children: grouped[c],
|
|
11
|
+
_isGroup: true,
|
|
12
|
+
isGroup: true
|
|
13
|
+
}));
|
|
14
|
+
};
|
|
15
|
+
const GroupingByPlugin = createInstancePlugin("groupedByRows", {
|
|
16
|
+
decorateGrid(grid) {
|
|
17
|
+
const {
|
|
18
|
+
composedRows,
|
|
19
|
+
props: { groupedBy }
|
|
20
|
+
} = grid.getInstance();
|
|
21
|
+
grid.composedRows = groupedBy ? groupedByData(groupedBy, composedRows) : composedRows;
|
|
22
|
+
return grid;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
export {
|
|
26
|
+
GroupingByPlugin
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=GroupingByPlugin.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/grouping-by/GroupingByPlugin.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { createInstancePlugin } from '@elliemae/ds-shared/createDataInstance/createInstancePlugin';\nimport { groupBy } from 'lodash';\n\nconst groupedByData = (groupedBy, composedRows) => {\n const grouped = groupBy(composedRows, groupedBy);\n return Object.keys(grouped).map((c, key) => ({\n id: `grouped-by-${groupedBy}-${key}`,\n key: groupedBy,\n value: c,\n children: grouped[c],\n _isGroup: true,\n isGroup: true,\n }));\n};\n\nexport const GroupingByPlugin = createInstancePlugin('groupedByRows', {\n decorateGrid(grid) {\n const {\n composedRows,\n props: { groupedBy },\n } = grid.getInstance();\n grid.composedRows = groupedBy\n ? groupedByData(groupedBy, composedRows)\n : composedRows;\n return grid;\n },\n});\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AAEA,MAAM,gBAAgB,CAAC,WAAW,iBAAiB;AACjD,QAAM,UAAU,QAAQ,cAAc;AACtC,SAAO,OAAO,KAAK,SAAS,IAAI,CAAC,GAAG,QAAS;AAAA,IAC3C,IAAI,cAAc,aAAa;AAAA,IAC/B,KAAK;AAAA,IACL,OAAO;AAAA,IACP,UAAU,QAAQ;AAAA,IAClB,UAAU;AAAA,IACV,SAAS;AAAA;AAAA;AAIN,MAAM,mBAAmB,qBAAqB,iBAAiB;AAAA,EACpE,aAAa,MAAM;AACjB,UAAM;AAAA,MACJ;AAAA,MACA,OAAO,EAAE;AAAA,QACP,KAAK;AACT,SAAK,eAAe,YAChB,cAAc,WAAW,gBACzB;AACJ,WAAO;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __objRest = (source, exclude) => {
|
|
21
|
+
var target = {};
|
|
22
|
+
for (var prop in source)
|
|
23
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
+
target[prop] = source[prop];
|
|
25
|
+
if (source != null && __getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
};
|
|
32
|
+
import * as React from "react";
|
|
33
|
+
import React2, { useMemo } from "react";
|
|
34
|
+
import { createInstancePlugin } from "@elliemae/ds-shared/createDataInstance/createInstancePlugin";
|
|
35
|
+
import { aggregatedClasses } from "@elliemae/ds-classnames";
|
|
36
|
+
import { VariableSizeList } from "react-window";
|
|
37
|
+
import { walkTreeStrategy } from "./walkStrategy";
|
|
38
|
+
import { RowSizes } from "../../rowSizes";
|
|
39
|
+
import { dataGridBlockName } from "../../blockNames";
|
|
40
|
+
const blockName = `${dataGridBlockName}-group-row-header`;
|
|
41
|
+
const GroupRowHeaderWrapper = aggregatedClasses("div")(blockName);
|
|
42
|
+
const GroupRowHeaderTitle = aggregatedClasses("div")(blockName, "title");
|
|
43
|
+
const GroupingPlugin = createInstancePlugin("groupedRows", {
|
|
44
|
+
decorateGrid(grid) {
|
|
45
|
+
const { columns, composedRows } = grid.getInstance();
|
|
46
|
+
const detailColumns = useMemo(() => columns.map((column) => __spreadProps(__spreadValues({}, column), {
|
|
47
|
+
customRenderer: column.detailCustomRenderer
|
|
48
|
+
})).filter((col) => !col.expandableColumn), [columns]);
|
|
49
|
+
const flatRows = [];
|
|
50
|
+
walkTreeStrategy({
|
|
51
|
+
data: composedRows,
|
|
52
|
+
cb: (n) => flatRows.push(n)
|
|
53
|
+
});
|
|
54
|
+
return {
|
|
55
|
+
detailColumns,
|
|
56
|
+
composedRows: flatRows
|
|
57
|
+
};
|
|
58
|
+
},
|
|
59
|
+
getBodyProps(bodyProps, grid) {
|
|
60
|
+
const { composedRows: rows } = grid.getInstance();
|
|
61
|
+
const getItemSize = (index) => {
|
|
62
|
+
const rowData = rows[index];
|
|
63
|
+
if (!rowData)
|
|
64
|
+
return RowSizes.normal;
|
|
65
|
+
return rowData._isGroup || rowData.isGroup ? RowSizes.compact : RowSizes.normal;
|
|
66
|
+
};
|
|
67
|
+
const getListHeight = () => {
|
|
68
|
+
const size = rows.reduce((h, r) => {
|
|
69
|
+
const rowHeight = r._isGroup || r.isGroup ? RowSizes.compact : RowSizes.normal;
|
|
70
|
+
return h + rowHeight;
|
|
71
|
+
}, 0);
|
|
72
|
+
return size;
|
|
73
|
+
};
|
|
74
|
+
return __spreadProps(__spreadValues({}, bodyProps), {
|
|
75
|
+
getListHeight,
|
|
76
|
+
listComponent: VariableSizeList,
|
|
77
|
+
listProps: { itemSize: getItemSize }
|
|
78
|
+
});
|
|
79
|
+
},
|
|
80
|
+
composeRows: (rows, grid) => {
|
|
81
|
+
const {
|
|
82
|
+
composedRows,
|
|
83
|
+
props: { rowKey }
|
|
84
|
+
} = grid.getInstance();
|
|
85
|
+
if (Array.isArray(rows)) {
|
|
86
|
+
const filterIds = rows.map((r) => r.data[rowKey]);
|
|
87
|
+
return composedRows.filter((c) => filterIds.includes(c.data[rowKey])).map((r) => __spreadProps(__spreadValues({}, r.data), {
|
|
88
|
+
children: Array.isArray(r.data.children) ? r.data.children.filter((c) => filterIds.includes(c[rowKey])) : r.data.children,
|
|
89
|
+
_isGroup: r.isGroup
|
|
90
|
+
})).filter((g) => g.children === void 0 || g.children.length > 0);
|
|
91
|
+
}
|
|
92
|
+
return __spreadProps(__spreadValues({}, rows), {
|
|
93
|
+
allRows: rows.allRows.map((r) => __spreadProps(__spreadValues({}, r.data), {
|
|
94
|
+
_isGroup: r.isGroup
|
|
95
|
+
})),
|
|
96
|
+
rows: rows.rows.map((r) => __spreadProps(__spreadValues({}, r.data), {
|
|
97
|
+
_isGroup: r.isGroup
|
|
98
|
+
}))
|
|
99
|
+
});
|
|
100
|
+
},
|
|
101
|
+
decorateRenderers(renderers, grid) {
|
|
102
|
+
const Row = renderers.body.row;
|
|
103
|
+
renderers.body.row = useMemo(() => (_a) => {
|
|
104
|
+
var _b = _a, { isExpanded } = _b, rowProps = __objRest(_b, ["isExpanded"]);
|
|
105
|
+
const { composedRows } = grid.getInstance();
|
|
106
|
+
const node = composedRows[rowProps.index] ? composedRows[rowProps.index] : rowProps.rowData;
|
|
107
|
+
const { groupedRowsRenderHeader } = grid.props;
|
|
108
|
+
if (node && node._isGroup) {
|
|
109
|
+
return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(GroupRowHeaderWrapper, __spreadValues({}, rowProps), /* @__PURE__ */ React2.createElement(GroupRowHeaderTitle, null, groupedRowsRenderHeader ? groupedRowsRenderHeader(node) : "Group")));
|
|
110
|
+
}
|
|
111
|
+
return /* @__PURE__ */ React2.createElement(Row, __spreadValues({}, rowProps));
|
|
112
|
+
}, []);
|
|
113
|
+
return renderers;
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
export {
|
|
117
|
+
GroupingPlugin
|
|
118
|
+
};
|
|
119
|
+
//# sourceMappingURL=GroupingPlugin.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/grouping-grid/GroupingPlugin.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable no-underscore-dangle */\nimport React, { useMemo } from 'react';\nimport { createInstancePlugin } from '@elliemae/ds-shared/createDataInstance/createInstancePlugin';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { VariableSizeList } from 'react-window';\nimport { walkTreeStrategy } from './walkStrategy';\nimport { RowSizes } from '../../rowSizes';\nimport { dataGridBlockName } from '../../blockNames';\n\nconst blockName = `${dataGridBlockName}-group-row-header`;\nconst GroupRowHeaderWrapper = aggregatedClasses('div')(blockName);\nconst GroupRowHeaderTitle = aggregatedClasses('div')(blockName, 'title');\n\nexport const GroupingPlugin = createInstancePlugin('groupedRows', {\n decorateGrid(grid) {\n const { columns, composedRows } = grid.getInstance();\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const detailColumns = useMemo(\n () =>\n columns\n .map((column) => ({\n ...column,\n customRenderer: column.detailCustomRenderer,\n }))\n .filter((col) => !col.expandableColumn),\n [columns],\n );\n const flatRows = [];\n walkTreeStrategy({\n data: composedRows,\n cb: (n) => flatRows.push(n),\n });\n return {\n detailColumns,\n composedRows: flatRows,\n };\n },\n getBodyProps(bodyProps, grid) {\n const { composedRows: rows } = grid.getInstance();\n // implementation of expandable row single column with aggregation\n const getItemSize = (index) => {\n const rowData = rows[index];\n if (!rowData) return RowSizes.normal;\n return rowData._isGroup || rowData.isGroup\n ? RowSizes.compact\n : RowSizes.normal;\n };\n // eslint-disable-next-line no-unused-vars\n const getListHeight = () => {\n const size = rows.reduce((h, r) => {\n const rowHeight =\n r._isGroup || r.isGroup ? RowSizes.compact : RowSizes.normal;\n return h + rowHeight;\n }, 0);\n return size;\n };\n return {\n ...bodyProps,\n getListHeight,\n listComponent: VariableSizeList,\n listProps: { itemSize: getItemSize },\n };\n },\n composeRows: (rows, grid) => {\n const {\n composedRows,\n props: { rowKey },\n } = grid.getInstance();\n\n if (Array.isArray(rows)) {\n const filterIds = rows.map((r) => r.data[rowKey]);\n return composedRows\n .filter((c) => filterIds.includes(c.data[rowKey]))\n .map((r) => ({\n ...r.data,\n children: Array.isArray(r.data.children)\n ? r.data.children.filter((c) => filterIds.includes(c[rowKey]))\n : r.data.children,\n _isGroup: r.isGroup,\n }))\n .filter((g) => g.children === undefined || g.children.length > 0);\n }\n return {\n ...rows,\n allRows: rows.allRows.map((r) => ({\n ...r.data,\n _isGroup: r.isGroup,\n })),\n rows: rows.rows.map((r) => ({\n ...r.data,\n _isGroup: r.isGroup,\n })),\n };\n },\n decorateRenderers(renderers, grid) {\n const Row = renderers.body.row;\n // eslint-disable-next-line react-hooks/rules-of-hooks\n renderers.body.row = useMemo(\n () =>\n // eslint-disable-next-line react/display-name\n // eslint-disable-next-line react/prop-types\n ({ isExpanded, ...rowProps }) => {\n const { composedRows } = grid.getInstance();\n // // https://jira.elliemae.io/browse/PUI-1667\n const node = composedRows[rowProps.index]\n ? composedRows[rowProps.index]\n : rowProps.rowData;\n const { groupedRowsRenderHeader } = grid.props;\n // eslint-disable-next-line no-underscore-dangle\n if (node && node._isGroup) {\n return (\n <>\n <GroupRowHeaderWrapper {...rowProps}>\n <GroupRowHeaderTitle>\n {groupedRowsRenderHeader\n ? groupedRowsRenderHeader(node)\n : 'Group'}\n </GroupRowHeaderTitle>\n </GroupRowHeaderWrapper>\n </>\n );\n }\n return <Row {...rowProps} />;\n },\n [],\n );\n\n return renderers;\n },\n});\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,YAAY,GAAG;AACrB,MAAM,wBAAwB,kBAAkB,OAAO;AACvD,MAAM,sBAAsB,kBAAkB,OAAO,WAAW;AAEzD,MAAM,iBAAiB,qBAAqB,eAAe;AAAA,EAChE,aAAa,MAAM;AACjB,UAAM,EAAE,SAAS,iBAAiB,KAAK;AAEvC,UAAM,gBAAgB,QACpB,MACE,QACG,IAAI,CAAC,WAAY,iCACb,SADa;AAAA,MAEhB,gBAAgB,OAAO;AAAA,QAExB,OAAO,CAAC,QAAQ,CAAC,IAAI,mBAC1B,CAAC;AAEH,UAAM,WAAW;AACjB,qBAAiB;AAAA,MACf,MAAM;AAAA,MACN,IAAI,CAAC,MAAM,SAAS,KAAK;AAAA;AAE3B,WAAO;AAAA,MACL;AAAA,MACA,cAAc;AAAA;AAAA;AAAA,EAGlB,aAAa,WAAW,MAAM;AAC5B,UAAM,EAAE,cAAc,SAAS,KAAK;AAEpC,UAAM,cAAc,CAAC,UAAU;AAC7B,YAAM,UAAU,KAAK;AACrB,UAAI,CAAC;AAAS,eAAO,SAAS;AAC9B,aAAO,QAAQ,YAAY,QAAQ,UAC/B,SAAS,UACT,SAAS;AAAA;AAGf,UAAM,gBAAgB,MAAM;AAC1B,YAAM,OAAO,KAAK,OAAO,CAAC,GAAG,MAAM;AACjC,cAAM,YACJ,EAAE,YAAY,EAAE,UAAU,SAAS,UAAU,SAAS;AACxD,eAAO,IAAI;AAAA,SACV;AACH,aAAO;AAAA;AAET,WAAO,iCACF,YADE;AAAA,MAEL;AAAA,MACA,eAAe;AAAA,MACf,WAAW,EAAE,UAAU;AAAA;AAAA;AAAA,EAG3B,aAAa,CAAC,MAAM,SAAS;AAC3B,UAAM;AAAA,MACJ;AAAA,MACA,OAAO,EAAE;AAAA,QACP,KAAK;AAET,QAAI,MAAM,QAAQ,OAAO;AACvB,YAAM,YAAY,KAAK,IAAI,CAAC,MAAM,EAAE,KAAK;AACzC,aAAO,aACJ,OAAO,CAAC,MAAM,UAAU,SAAS,EAAE,KAAK,UACxC,IAAI,CAAC,MAAO,iCACR,EAAE,OADM;AAAA,QAEX,UAAU,MAAM,QAAQ,EAAE,KAAK,YAC3B,EAAE,KAAK,SAAS,OAAO,CAAC,MAAM,UAAU,SAAS,EAAE,YACnD,EAAE,KAAK;AAAA,QACX,UAAU,EAAE;AAAA,UAEb,OAAO,CAAC,MAAM,EAAE,aAAa,UAAa,EAAE,SAAS,SAAS;AAAA;AAEnE,WAAO,iCACF,OADE;AAAA,MAEL,SAAS,KAAK,QAAQ,IAAI,CAAC,MAAO,iCAC7B,EAAE,OAD2B;AAAA,QAEhC,UAAU,EAAE;AAAA;AAAA,MAEd,MAAM,KAAK,KAAK,IAAI,CAAC,MAAO,iCACvB,EAAE,OADqB;AAAA,QAE1B,UAAU,EAAE;AAAA;AAAA;AAAA;AAAA,EAIlB,kBAAkB,WAAW,MAAM;AACjC,UAAM,MAAM,UAAU,KAAK;AAE3B,cAAU,KAAK,MAAM,QACnB,MAGE,CAAC,OAAgC;AAAhC,mBAAE,iBAAF,IAAiB,qBAAjB,IAAiB,CAAf;AACD,YAAM,EAAE,iBAAiB,KAAK;AAE9B,YAAM,OAAO,aAAa,SAAS,SAC/B,aAAa,SAAS,SACtB,SAAS;AACb,YAAM,EAAE,4BAA4B,KAAK;AAEzC,UAAI,QAAQ,KAAK,UAAU;AACzB,eACE,4DACE,qCAAC,uBAAD,mBAA2B,WACzB,qCAAC,qBAAD,MACG,0BACG,wBAAwB,QACxB;AAAA;AAMd,aAAO,qCAAC,KAAD,mBAAS;AAAA,OAEpB;AAGF,WAAO;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
function getPath(parentNode, index, childrenKey) {
|
|
3
|
+
if (!parentNode)
|
|
4
|
+
return [index];
|
|
5
|
+
return [...parentNode.path, childrenKey, index];
|
|
6
|
+
}
|
|
7
|
+
function walkTreeStrategy({
|
|
8
|
+
data,
|
|
9
|
+
childrenKey = "children",
|
|
10
|
+
level = 0,
|
|
11
|
+
getId = (item) => item.id,
|
|
12
|
+
parentNode,
|
|
13
|
+
shouldWalkChildren = () => true,
|
|
14
|
+
cb
|
|
15
|
+
}) {
|
|
16
|
+
for (let i = 0; i < data.length; i++) {
|
|
17
|
+
const currLevel = level + 1;
|
|
18
|
+
const children = data[i][childrenKey];
|
|
19
|
+
const isGroup = children && !!children.length;
|
|
20
|
+
const node = {
|
|
21
|
+
index: i,
|
|
22
|
+
id: getId(data[i]),
|
|
23
|
+
data: data[i],
|
|
24
|
+
path: getPath(parentNode, i, childrenKey),
|
|
25
|
+
isGroup,
|
|
26
|
+
nestingLevel: currLevel,
|
|
27
|
+
parentNode: parentNode || {
|
|
28
|
+
isGroup: true,
|
|
29
|
+
data: { children: data }
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
cb(node);
|
|
33
|
+
if (shouldWalkChildren(node) && children && children.length) {
|
|
34
|
+
walkTreeStrategy({
|
|
35
|
+
data: children,
|
|
36
|
+
level: currLevel,
|
|
37
|
+
parentNode: node,
|
|
38
|
+
shouldWalkChildren,
|
|
39
|
+
cb
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
walkTreeStrategy
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=walkStrategy.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/grouping-grid/walkStrategy.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "function getPath(parentNode, index, childrenKey) {\n if (!parentNode) return [index];\n return [...parentNode.path, childrenKey, index];\n}\n\nexport function walkTreeStrategy({\n data,\n childrenKey = 'children',\n level = 0,\n getId = item => item.id,\n parentNode,\n shouldWalkChildren = () => true,\n cb,\n}) {\n // eslint-disable-next-line no-loops/no-loops,no-plusplus\n for (let i = 0; i < data.length; i++) {\n const currLevel = level + 1;\n const children = data[i][childrenKey];\n const isGroup = children && !!children.length;\n const node = {\n index: i,\n id: getId(data[i]),\n data: data[i],\n path: getPath(parentNode, i, childrenKey),\n isGroup,\n nestingLevel: currLevel,\n parentNode: parentNode || {\n isGroup: true,\n data: { children: data },\n },\n };\n cb(node);\n if (shouldWalkChildren(node) && children && children.length) {\n walkTreeStrategy({\n data: children,\n level: currLevel,\n parentNode: node,\n shouldWalkChildren,\n cb,\n });\n }\n }\n}\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA,iBAAiB,YAAY,OAAO,aAAa;AAC/C,MAAI,CAAC;AAAY,WAAO,CAAC;AACzB,SAAO,CAAC,GAAG,WAAW,MAAM,aAAa;AAAA;AAGpC,0BAA0B;AAAA,EAC/B;AAAA,EACA,cAAc;AAAA,EACd,QAAQ;AAAA,EACR,QAAQ,UAAQ,KAAK;AAAA,EACrB;AAAA,EACA,qBAAqB,MAAM;AAAA,EAC3B;AAAA,GACC;AAED,WAAS,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;AACpC,UAAM,YAAY,QAAQ;AAC1B,UAAM,WAAW,KAAK,GAAG;AACzB,UAAM,UAAU,YAAY,CAAC,CAAC,SAAS;AACvC,UAAM,OAAO;AAAA,MACX,OAAO;AAAA,MACP,IAAI,MAAM,KAAK;AAAA,MACf,MAAM,KAAK;AAAA,MACX,MAAM,QAAQ,YAAY,GAAG;AAAA,MAC7B;AAAA,MACA,cAAc;AAAA,MACd,YAAY,cAAc;AAAA,QACxB,SAAS;AAAA,QACT,MAAM,EAAE,UAAU;AAAA;AAAA;AAGtB,OAAG;AACH,QAAI,mBAAmB,SAAS,YAAY,SAAS,QAAQ;AAC3D,uBAAiB;AAAA,QACf,MAAM;AAAA,QACN,OAAO;AAAA,QACP,YAAY;AAAA,QACZ;AAAA,QACA;AAAA;AAAA;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { BodyHeaderScrollSyncPlugin } from "./body-header-scroll-sync";
|
|
3
|
+
import { DndColumnsPlugin } from "./column-dnd";
|
|
4
|
+
import { ColumnSizingPlugin } from "./column-sizing";
|
|
5
|
+
import { CustomRendererPlugin } from "./custom-cell-renderer";
|
|
6
|
+
import { EditablePlugin, ComboBox, TextBox } from "./editable";
|
|
7
|
+
import { ExpandableColumn, ExpandablePlugin } from "./expandable-grid";
|
|
8
|
+
import { FilterablePlugin } from "./filterable";
|
|
9
|
+
import { InfiniteScrollPlugin } from "./infinite-scrolling";
|
|
10
|
+
import { PaginationPlugin } from "./pagination";
|
|
11
|
+
import { ResizablePlugin } from "./resizable";
|
|
12
|
+
import { DndRowsPlugin } from "./row-dnd";
|
|
13
|
+
import { SelectablePlugin } from "./selectable";
|
|
14
|
+
import { SortablePlugin } from "./sortable";
|
|
15
|
+
import { ToolbarPlugin } from "./toolbar";
|
|
16
|
+
import { ExportDataPlugin } from "./export-data";
|
|
17
|
+
import { VirtualizationPlugin } from "./virtualization";
|
|
18
|
+
export {
|
|
19
|
+
BodyHeaderScrollSyncPlugin,
|
|
20
|
+
ColumnSizingPlugin,
|
|
21
|
+
ComboBox,
|
|
22
|
+
CustomRendererPlugin,
|
|
23
|
+
DndColumnsPlugin,
|
|
24
|
+
DndRowsPlugin,
|
|
25
|
+
EditablePlugin,
|
|
26
|
+
ExpandableColumn,
|
|
27
|
+
ExpandablePlugin,
|
|
28
|
+
ExportDataPlugin,
|
|
29
|
+
FilterablePlugin,
|
|
30
|
+
InfiniteScrollPlugin,
|
|
31
|
+
PaginationPlugin,
|
|
32
|
+
ResizablePlugin,
|
|
33
|
+
SelectablePlugin,
|
|
34
|
+
SortablePlugin,
|
|
35
|
+
TextBox,
|
|
36
|
+
ToolbarPlugin,
|
|
37
|
+
VirtualizationPlugin
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/plugins/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { BodyHeaderScrollSyncPlugin } from './body-header-scroll-sync';\nexport { DndColumnsPlugin } from './column-dnd';\nexport { ColumnSizingPlugin } from './column-sizing';\nexport { CustomRendererPlugin } from './custom-cell-renderer';\nexport { EditablePlugin, ComboBox, TextBox } from './editable';\nexport { ExpandableColumn, ExpandablePlugin } from './expandable-grid';\nexport { FilterablePlugin } from './filterable';\nexport { InfiniteScrollPlugin } from './infinite-scrolling';\nexport { PaginationPlugin } from './pagination';\nexport { ResizablePlugin } from './resizable';\nexport { DndRowsPlugin } from './row-dnd';\nexport { SelectablePlugin } from './selectable';\nexport { SortablePlugin } from './sortable';\nexport { ToolbarPlugin } from './toolbar';\nexport { ExportDataPlugin } from './export-data';\nexport { VirtualizationPlugin } from './virtualization';\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __objRest = (source, exclude) => {
|
|
21
|
+
var target = {};
|
|
22
|
+
for (var prop in source)
|
|
23
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
+
target[prop] = source[prop];
|
|
25
|
+
if (source != null && __getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
};
|
|
32
|
+
import * as React from "react";
|
|
33
|
+
import { useRef, useEffect, useState } from "react";
|
|
34
|
+
import { createInstancePlugin } from "@elliemae/ds-shared/createDataInstance/createInstancePlugin";
|
|
35
|
+
const registerStateHook = (grid) => {
|
|
36
|
+
const {
|
|
37
|
+
props: { getData, onInfiniteScrolling = () => null },
|
|
38
|
+
actions: { updateRows }
|
|
39
|
+
} = grid;
|
|
40
|
+
const loading = useRef(false);
|
|
41
|
+
const addMoreData = (data = []) => {
|
|
42
|
+
loading.current = false;
|
|
43
|
+
updateRows((prevRows) => prevRows.concat(data || []));
|
|
44
|
+
};
|
|
45
|
+
const doLoadData = async (currentRows) => {
|
|
46
|
+
loading.current = true;
|
|
47
|
+
return Promise.resolve(getData(currentRows)).then(addMoreData);
|
|
48
|
+
};
|
|
49
|
+
const loadMoreData = (currentRows) => {
|
|
50
|
+
onInfiniteScrolling(currentRows);
|
|
51
|
+
if (loading.current || !getData)
|
|
52
|
+
return;
|
|
53
|
+
doLoadData(currentRows);
|
|
54
|
+
};
|
|
55
|
+
return {
|
|
56
|
+
actions: {
|
|
57
|
+
loadMoreData
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
const getBodyProps = (_a, grid) => {
|
|
62
|
+
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
63
|
+
const { loadMoreData } = grid.getInstance().actions;
|
|
64
|
+
const [bodyNode, setBodyRef] = useState();
|
|
65
|
+
const prevScroll = useRef();
|
|
66
|
+
prevScroll.current = 0;
|
|
67
|
+
const handleBodyScroll = (event, s) => {
|
|
68
|
+
const { target } = event;
|
|
69
|
+
const { scrollHeight, scrollTop, offsetHeight, scrollLeft } = target;
|
|
70
|
+
const { composedRows } = grid.getInstance();
|
|
71
|
+
if (prevScroll.current !== scrollLeft) {
|
|
72
|
+
prevScroll.current = scrollLeft;
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
if (bodyNode !== target)
|
|
76
|
+
return;
|
|
77
|
+
if (scrollTop + offsetHeight >= scrollHeight - 1) {
|
|
78
|
+
loadMoreData(composedRows);
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
useEffect(() => {
|
|
82
|
+
if (bodyNode) {
|
|
83
|
+
bodyNode.addEventListener("scroll", handleBodyScroll);
|
|
84
|
+
}
|
|
85
|
+
return () => {
|
|
86
|
+
if (bodyNode) {
|
|
87
|
+
bodyNode.removeEventListener("scroll", handleBodyScroll);
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
}, [bodyNode]);
|
|
91
|
+
return __spreadProps(__spreadValues({}, props), {
|
|
92
|
+
listProps: { outerRef: setBodyRef }
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
const InfiniteScrollPlugin = createInstancePlugin("infinite-scroll", {
|
|
96
|
+
registerStateHook,
|
|
97
|
+
getBodyProps
|
|
98
|
+
});
|
|
99
|
+
export {
|
|
100
|
+
InfiniteScrollPlugin
|
|
101
|
+
};
|
|
102
|
+
//# sourceMappingURL=InfiniteScrollPlugin.js.map
|