@elliemae/ds-datagrids 2.3.0-alpha.8 → 2.3.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/DSDataGrid.js +639 -0
- package/cjs/DataGridImpl.js +169 -0
- package/cjs/PaginatedDataGrid.js +77 -0
- package/cjs/blockNames.js +11 -0
- package/cjs/columns/IconColumn.js +95 -0
- package/cjs/columns/NumberColumn.js +6 -0
- package/cjs/components/BodyCell.js +101 -0
- package/cjs/components/BodyList.js +54 -0
- package/cjs/components/ColumnVisibilityMenuOption.js +44 -0
- package/cjs/components/ColumnsOptionsMenuSection.js +49 -0
- package/cjs/components/EmptyState.js +51 -0
- package/cjs/components/HeaderCell.js +70 -0
- package/cjs/components/List.js +32 -0
- package/cjs/components/ListItem.js +44 -0
- package/cjs/components/NoResults.js +51 -0
- package/cjs/components/RowsLoader.js +22 -0
- package/cjs/components/Table.js +122 -0
- package/cjs/components/TableBody.js +69 -0
- package/cjs/components/TableHeader.js +37 -0
- package/cjs/components/footer/addOptionalFooterComponents.js +46 -0
- package/cjs/components/header/PrimaryControls.js +36 -0
- package/cjs/components/header/addOptionalHeaderComponents.js +47 -0
- package/cjs/components/index.js +17 -0
- package/cjs/components/renderers/defaultClassedRenderers.js +59 -0
- package/cjs/components/renderers/index.js +23 -0
- package/cjs/components/renderers/renderRowsLoader.js +18 -0
- package/cjs/components/tableContext.js +13 -0
- package/cjs/defaultPlugins.js +12 -0
- package/cjs/index.js +67 -0
- package/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +143 -0
- package/cjs/plugins/body-header-scroll-sync/index.js +9 -0
- package/cjs/plugins/column-dnd/DndColumnsPlugin.js +134 -0
- package/cjs/plugins/column-dnd/decorateGridWithDndColumns.js +30 -0
- package/cjs/plugins/column-dnd/index.js +9 -0
- package/cjs/plugins/column-sizing/ColumnSizingPlugin.js +88 -0
- package/cjs/plugins/column-sizing/columnMeasurerTransformer.js +74 -0
- package/cjs/plugins/column-sizing/ext-points/decorateColumn.js +17 -0
- package/cjs/plugins/column-sizing/ext-points/getTableProps.js +63 -0
- package/cjs/plugins/column-sizing/getColumnNameFromProperty.js +9 -0
- package/cjs/plugins/column-sizing/index.js +9 -0
- package/cjs/plugins/column-sizing/useColumnSizeService.js +162 -0
- package/cjs/plugins/column-sizing/useStylesheetHelpers.js +270 -0
- package/cjs/plugins/column-sizing/utils.js +45 -0
- package/cjs/plugins/custom-cell-renderer/CustomRendererPlugin.js +18 -0
- package/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js +72 -0
- package/cjs/plugins/custom-cell-renderer/getRendererComponent.js +65 -0
- package/cjs/plugins/custom-cell-renderer/index.js +9 -0
- package/cjs/plugins/editable/EditableComponents/ComboBox.js +71 -0
- package/cjs/plugins/editable/EditableComponents/TextBox.js +110 -0
- package/cjs/plugins/editable/EditableComponents/index.js +11 -0
- package/cjs/plugins/editable/EditablePlugin.js +123 -0
- package/cjs/plugins/editable/decorateEditable.js +122 -0
- package/cjs/plugins/editable/getEditorComponent.js +82 -0
- package/cjs/plugins/editable/index.js +13 -0
- package/cjs/plugins/expandable-grid/ExpandableColumn.js +156 -0
- package/cjs/plugins/expandable-grid/ExpandablePlugin.js +243 -0
- package/cjs/plugins/expandable-grid/ExpandedRow.js +156 -0
- package/cjs/plugins/expandable-grid/ExpandedRowExtra.js +54 -0
- package/cjs/plugins/expandable-grid/index.js +11 -0
- package/cjs/plugins/expandable-grid/useExpandGridState.js +79 -0
- package/cjs/plugins/export-data/ExportDataPlugin.js +168 -0
- package/cjs/plugins/export-data/index.js +12 -0
- package/cjs/plugins/filterable/FilterablePlugin.js +81 -0
- package/cjs/plugins/filterable/addFilterToColumn.js +31 -0
- package/cjs/plugins/filterable/components/FilterableHeader.js +120 -0
- package/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +157 -0
- package/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +107 -0
- package/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +195 -0
- package/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js +174 -0
- package/cjs/plugins/filterable/components/filterable-menus/defaultDateFormat.js +7 -0
- package/cjs/plugins/filterable/components/filterable-menus/getFilterMenuByType.js +18 -0
- package/cjs/plugins/filterable/filterableFormatter.js +63 -0
- package/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js +74 -0
- package/cjs/plugins/filterable/filtering-helper/strategiesOperators.js +23 -0
- package/cjs/plugins/filterable/helper.js +120 -0
- package/cjs/plugins/filterable/index.js +9 -0
- package/cjs/plugins/filterable/useFilterableState.js +117 -0
- package/cjs/plugins/grouping-by/GroupingByPlugin.js +40 -0
- package/cjs/plugins/grouping-grid/GroupingPlugin.js +149 -0
- package/cjs/plugins/grouping-grid/walkStrategy.js +56 -0
- package/cjs/plugins/index.js +48 -0
- package/cjs/plugins/infinite-scrolling/InfiniteScrollPlugin.js +124 -0
- package/cjs/plugins/infinite-scrolling/index.js +9 -0
- package/cjs/plugins/pagination/PaginationPlugin.js +109 -0
- package/cjs/plugins/pagination/components/Pagination.js +44 -0
- package/cjs/plugins/pagination/components/Paginator.js +67 -0
- package/cjs/plugins/pagination/components/PerPageDropdown.js +80 -0
- package/cjs/plugins/pagination/helper.js +41 -0
- package/cjs/plugins/pagination/index.js +9 -0
- package/cjs/plugins/pagination/usePaginationState.js +74 -0
- package/cjs/plugins/resizable/ResizablePlugin.js +113 -0
- package/cjs/plugins/resizable/decorateResizable.js +60 -0
- package/cjs/plugins/resizable/index.js +9 -0
- package/cjs/plugins/resizable/useResizeHandle.js +73 -0
- package/cjs/plugins/resizable/utils.js +33 -0
- package/cjs/plugins/row-dnd/DndRowsPlugin.js +115 -0
- package/cjs/plugins/row-dnd/index.js +9 -0
- package/cjs/plugins/selectable/SelectablePlugin.js +199 -0
- package/cjs/plugins/selectable/addSelectableColumn.js +93 -0
- package/cjs/plugins/selectable/helper.js +43 -0
- package/cjs/plugins/selectable/index.js +9 -0
- package/cjs/plugins/selectable/selectableFormatter.js +115 -0
- package/cjs/plugins/selectable/useSelectableState.js +143 -0
- package/cjs/plugins/sortable/SortablePlugin.js +109 -0
- package/cjs/plugins/sortable/checkIfSortable.js +22 -0
- package/cjs/plugins/sortable/index.js +9 -0
- package/cjs/plugins/sortable/sortHeaderFormatter.js +60 -0
- package/cjs/plugins/sortable/sortTree.js +51 -0
- package/cjs/plugins/sortable/sorter.js +176 -0
- package/cjs/plugins/sortable/useSortableState.js +99 -0
- package/cjs/plugins/toolbar/RowRenderer.js +97 -0
- package/cjs/plugins/toolbar/ToolbarPlugin.js +42 -0
- package/cjs/plugins/toolbar/ToolbarTrigger.js +86 -0
- package/cjs/plugins/toolbar/index.js +9 -0
- package/cjs/plugins/virtualization/AutoHeightList.js +59 -0
- package/cjs/plugins/virtualization/VirtualizationPlugin.js +108 -0
- package/cjs/plugins/virtualization/VirtualizedBody.js +275 -0
- package/cjs/plugins/virtualization/VirtualizedBodyRow.js +30 -0
- package/cjs/plugins/virtualization/helper.js +7 -0
- package/cjs/plugins/virtualization/index.js +9 -0
- package/cjs/renders/CellWithAddons.js +63 -0
- package/cjs/renders/index.js +11 -0
- package/cjs/renders/styled.js +27 -0
- package/cjs/rowSizes.js +19 -0
- package/cjs/utilities/getPluginsFromProps.js +44 -0
- package/cjs/utilities/getScrollbarSize.js +27 -0
- package/cjs/utilities/normalizeData.js +39 -0
- package/esm/DSDataGrid.js +630 -0
- package/esm/DataGridImpl.js +160 -0
- package/esm/PaginatedDataGrid.js +68 -0
- package/esm/blockNames.js +5 -0
- package/esm/columns/IconColumn.js +87 -0
- package/esm/columns/NumberColumn.js +4 -0
- package/esm/components/BodyCell.js +92 -0
- package/esm/components/BodyList.js +45 -0
- package/esm/components/ColumnVisibilityMenuOption.js +40 -0
- package/esm/components/ColumnsOptionsMenuSection.js +43 -0
- package/esm/components/EmptyState.js +41 -0
- package/esm/components/HeaderCell.js +62 -0
- package/esm/components/List.js +26 -0
- package/esm/components/ListItem.js +38 -0
- package/esm/components/NoResults.js +43 -0
- package/esm/components/RowsLoader.js +15 -0
- package/esm/components/Table.js +115 -0
- package/esm/components/TableBody.js +61 -0
- package/esm/components/TableHeader.js +31 -0
- package/esm/components/footer/addOptionalFooterComponents.js +40 -0
- package/esm/components/header/PrimaryControls.js +30 -0
- package/esm/components/header/addOptionalHeaderComponents.js +40 -0
- package/esm/components/index.js +5 -0
- package/esm/components/renderers/defaultClassedRenderers.js +46 -0
- package/esm/components/renderers/index.js +18 -0
- package/esm/components/renderers/renderRowsLoader.js +10 -0
- package/esm/components/tableContext.js +5 -0
- package/esm/defaultPlugins.js +8 -0
- package/esm/index.js +27 -0
- package/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +132 -0
- package/esm/plugins/body-header-scroll-sync/index.js +1 -0
- package/esm/plugins/column-dnd/DndColumnsPlugin.js +125 -0
- package/esm/plugins/column-dnd/decorateGridWithDndColumns.js +22 -0
- package/esm/plugins/column-dnd/index.js +1 -0
- package/esm/plugins/column-sizing/ColumnSizingPlugin.js +80 -0
- package/esm/plugins/column-sizing/columnMeasurerTransformer.js +66 -0
- package/esm/plugins/column-sizing/ext-points/decorateColumn.js +13 -0
- package/esm/plugins/column-sizing/ext-points/getTableProps.js +55 -0
- package/esm/plugins/column-sizing/getColumnNameFromProperty.js +7 -0
- package/esm/plugins/column-sizing/index.js +1 -0
- package/esm/plugins/column-sizing/useColumnSizeService.js +156 -0
- package/esm/plugins/column-sizing/useStylesheetHelpers.js +245 -0
- package/esm/plugins/column-sizing/utils.js +37 -0
- package/esm/plugins/custom-cell-renderer/CustomRendererPlugin.js +10 -0
- package/esm/plugins/custom-cell-renderer/addCustomRendererToCell.js +63 -0
- package/esm/plugins/custom-cell-renderer/getRendererComponent.js +56 -0
- package/esm/plugins/custom-cell-renderer/index.js +1 -0
- package/esm/plugins/editable/EditableComponents/ComboBox.js +65 -0
- package/esm/plugins/editable/EditableComponents/TextBox.js +103 -0
- package/esm/plugins/editable/EditableComponents/index.js +2 -0
- package/esm/plugins/editable/EditablePlugin.js +115 -0
- package/esm/plugins/editable/decorateEditable.js +92 -0
- package/esm/plugins/editable/getEditorComponent.js +74 -0
- package/esm/plugins/editable/index.js +3 -0
- package/esm/plugins/expandable-grid/ExpandableColumn.js +146 -0
- package/esm/plugins/expandable-grid/ExpandablePlugin.js +231 -0
- package/esm/plugins/expandable-grid/ExpandedRow.js +143 -0
- package/esm/plugins/expandable-grid/ExpandedRowExtra.js +46 -0
- package/esm/plugins/expandable-grid/index.js +2 -0
- package/esm/plugins/expandable-grid/useExpandGridState.js +75 -0
- package/esm/plugins/export-data/ExportDataPlugin.js +156 -0
- package/esm/plugins/export-data/index.js +1 -0
- package/esm/plugins/filterable/FilterablePlugin.js +73 -0
- package/esm/plugins/filterable/addFilterToColumn.js +23 -0
- package/esm/plugins/filterable/components/FilterableHeader.js +113 -0
- package/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +148 -0
- package/esm/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +97 -0
- package/esm/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +184 -0
- package/esm/plugins/filterable/components/filterable-menus/TextFilterMenu.js +163 -0
- package/esm/plugins/filterable/components/filterable-menus/defaultDateFormat.js +3 -0
- package/esm/plugins/filterable/components/filterable-menus/getFilterMenuByType.js +16 -0
- package/esm/plugins/filterable/filterableFormatter.js +57 -0
- package/esm/plugins/filterable/filtering-helper/filterRowsByQuery.js +65 -0
- package/esm/plugins/filterable/filtering-helper/strategiesOperators.js +17 -0
- package/esm/plugins/filterable/helper.js +106 -0
- package/esm/plugins/filterable/index.js +1 -0
- package/esm/plugins/filterable/useFilterableState.js +109 -0
- package/esm/plugins/grouping-by/GroupingByPlugin.js +32 -0
- package/esm/plugins/grouping-grid/GroupingPlugin.js +138 -0
- package/esm/plugins/grouping-grid/walkStrategy.js +52 -0
- package/esm/plugins/index.js +19 -0
- package/esm/plugins/infinite-scrolling/InfiniteScrollPlugin.js +114 -0
- package/esm/plugins/infinite-scrolling/index.js +1 -0
- package/esm/plugins/pagination/PaginationPlugin.js +96 -0
- package/esm/plugins/pagination/components/Pagination.js +36 -0
- package/esm/plugins/pagination/components/Paginator.js +59 -0
- package/esm/plugins/pagination/components/PerPageDropdown.js +71 -0
- package/esm/plugins/pagination/helper.js +36 -0
- package/esm/plugins/pagination/index.js +1 -0
- package/esm/plugins/pagination/usePaginationState.js +66 -0
- package/esm/plugins/resizable/ResizablePlugin.js +105 -0
- package/esm/plugins/resizable/decorateResizable.js +49 -0
- package/esm/plugins/resizable/index.js +1 -0
- package/esm/plugins/resizable/useResizeHandle.js +65 -0
- package/esm/plugins/resizable/utils.js +23 -0
- package/esm/plugins/row-dnd/DndRowsPlugin.js +105 -0
- package/esm/plugins/row-dnd/index.js +1 -0
- package/esm/plugins/selectable/SelectablePlugin.js +190 -0
- package/esm/plugins/selectable/addSelectableColumn.js +84 -0
- package/esm/plugins/selectable/helper.js +31 -0
- package/esm/plugins/selectable/index.js +1 -0
- package/esm/plugins/selectable/selectableFormatter.js +107 -0
- package/esm/plugins/selectable/useSelectableState.js +135 -0
- package/esm/plugins/sortable/SortablePlugin.js +82 -0
- package/esm/plugins/sortable/checkIfSortable.js +17 -0
- package/esm/plugins/sortable/index.js +1 -0
- package/esm/plugins/sortable/sortHeaderFormatter.js +53 -0
- package/esm/plugins/sortable/sortTree.js +26 -0
- package/esm/plugins/sortable/sorter.js +166 -0
- package/esm/plugins/sortable/useSortableState.js +71 -0
- package/esm/plugins/toolbar/RowRenderer.js +88 -0
- package/esm/plugins/toolbar/ToolbarPlugin.js +33 -0
- package/esm/plugins/toolbar/ToolbarTrigger.js +74 -0
- package/esm/plugins/toolbar/index.js +1 -0
- package/esm/plugins/virtualization/AutoHeightList.js +52 -0
- package/esm/plugins/virtualization/VirtualizationPlugin.js +97 -0
- package/esm/plugins/virtualization/VirtualizedBody.js +268 -0
- package/esm/plugins/virtualization/VirtualizedBodyRow.js +28 -0
- package/esm/plugins/virtualization/helper.js +3 -0
- package/esm/plugins/virtualization/index.js +1 -0
- package/esm/renders/CellWithAddons.js +53 -0
- package/esm/renders/index.js +2 -0
- package/esm/renders/styled.js +16 -0
- package/esm/rowSizes.js +13 -0
- package/esm/utilities/getPluginsFromProps.js +42 -0
- package/esm/utilities/getScrollbarSize.js +23 -0
- package/esm/utilities/normalizeData.js +29 -0
- package/package.json +288 -290
- package/types/DSDataGrid.d.ts +863 -0
- package/types/DataGridImpl.d.ts +12 -0
- package/types/PaginatedDataGrid.d.ts +16 -0
- package/types/blockNames.d.ts +4 -0
- package/types/columns/IconColumn.d.ts +35 -0
- package/types/columns/NumberColumn.d.ts +4 -0
- package/types/components/BodyCell.d.ts +33 -0
- package/types/components/BodyList.d.ts +12 -0
- package/types/components/ColumnVisibilityMenuOption.d.ts +15 -0
- package/types/components/ColumnsOptionsMenuSection.d.ts +8 -0
- package/types/components/EmptyState.d.ts +7 -0
- package/types/components/HeaderCell.d.ts +19 -0
- package/types/components/List.d.ts +3 -0
- package/types/components/ListItem.d.ts +3 -0
- package/types/components/NoResults.d.ts +8 -0
- package/types/components/RowsLoader.d.ts +5 -0
- package/types/components/Table.d.ts +13 -0
- package/types/components/TableBody.d.ts +9 -0
- package/types/components/TableHeader.d.ts +3 -0
- package/types/components/footer/addOptionalFooterComponents.d.ts +6 -0
- package/types/components/header/PrimaryControls.d.ts +5 -0
- package/types/components/header/addOptionalHeaderComponents.d.ts +11 -0
- package/types/components/index.d.ts +5 -0
- package/types/components/renderers/defaultClassedRenderers.d.ts +11 -0
- package/types/components/renderers/index.d.ts +15 -0
- package/types/components/renderers/renderRowsLoader.d.ts +2 -0
- package/types/components/tableContext.d.ts +2 -0
- package/types/components/tests/ColumnVisibilityMenu.test.d.ts +1 -0
- package/types/defaultPlugins.d.ts +1 -0
- package/types/index.d.ts +10 -0
- package/types/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.d.ts +1 -0
- package/types/plugins/body-header-scroll-sync/index.d.ts +1 -0
- package/types/plugins/column-dnd/DndColumnsPlugin.d.ts +1 -0
- package/types/plugins/column-dnd/decorateGridWithDndColumns.d.ts +2 -0
- package/types/plugins/column-dnd/index.d.ts +1 -0
- package/types/plugins/column-sizing/ColumnSizingPlugin.d.ts +1 -0
- package/types/plugins/column-sizing/columnMeasurerTransformer.d.ts +6 -0
- package/types/plugins/column-sizing/ext-points/decorateColumn.d.ts +1 -0
- package/types/plugins/column-sizing/ext-points/getTableProps.d.ts +10 -0
- package/types/plugins/column-sizing/getColumnNameFromProperty.d.ts +1 -0
- package/types/plugins/column-sizing/index.d.ts +1 -0
- package/types/plugins/column-sizing/useColumnSizeService.d.ts +17 -0
- package/types/plugins/column-sizing/useStylesheetHelpers.d.ts +22 -0
- package/types/plugins/column-sizing/utils.d.ts +5 -0
- package/types/plugins/custom-cell-renderer/CustomRendererPlugin.d.ts +1 -0
- package/types/plugins/custom-cell-renderer/addCustomRendererToCell.d.ts +3 -0
- package/types/plugins/custom-cell-renderer/getRendererComponent.d.ts +11 -0
- package/types/plugins/custom-cell-renderer/index.d.ts +1 -0
- package/types/plugins/editable/EditableComponents/ComboBox.d.ts +10 -0
- package/types/plugins/editable/EditableComponents/TextBox.d.ts +22 -0
- package/types/plugins/editable/EditableComponents/index.d.ts +2 -0
- package/types/plugins/editable/EditablePlugin.d.ts +1 -0
- package/types/plugins/editable/decorateEditable.d.ts +7 -0
- package/types/plugins/editable/getEditorComponent.d.ts +6 -0
- package/types/plugins/editable/index.d.ts +2 -0
- package/types/plugins/expandable-grid/ExpandableColumn.d.ts +28 -0
- package/types/plugins/expandable-grid/ExpandablePlugin.d.ts +1 -0
- package/types/plugins/expandable-grid/ExpandedRow.d.ts +11 -0
- package/types/plugins/expandable-grid/ExpandedRowExtra.d.ts +9 -0
- package/types/plugins/expandable-grid/index.d.ts +2 -0
- package/types/plugins/expandable-grid/tests/ExpandablePlugin.test.d.ts +1 -0
- package/types/plugins/expandable-grid/useExpandGridState.d.ts +14 -0
- package/types/plugins/export-data/ExportDataPlugin.d.ts +4 -0
- package/types/plugins/export-data/index.d.ts +1 -0
- package/types/plugins/filterable/FilterablePlugin.d.ts +1 -0
- package/types/plugins/filterable/addFilterToColumn.d.ts +1 -0
- package/types/plugins/filterable/components/FilterableHeader.d.ts +29 -0
- package/types/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.d.ts +30 -0
- package/types/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.d.ts +27 -0
- package/types/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.d.ts +30 -0
- package/types/plugins/filterable/components/filterable-menus/TextFilterMenu.d.ts +35 -0
- package/types/plugins/filterable/components/filterable-menus/defaultDateFormat.d.ts +1 -0
- package/types/plugins/filterable/components/filterable-menus/getFilterMenuByType.d.ts +1 -0
- package/types/plugins/filterable/filterableFormatter.d.ts +11 -0
- package/types/plugins/filterable/filtering-helper/filterRowsByQuery.d.ts +2 -0
- package/types/plugins/filterable/filtering-helper/strategiesOperators.d.ts +2 -0
- package/types/plugins/filterable/helper.d.ts +22 -0
- package/types/plugins/filterable/index.d.ts +1 -0
- package/types/plugins/filterable/useFilterableState.d.ts +18 -0
- package/types/plugins/grouping-by/GroupingByPlugin.d.ts +1 -0
- package/types/plugins/grouping-grid/GroupingPlugin.d.ts +1 -0
- package/types/plugins/grouping-grid/walkStrategy.d.ts +9 -0
- package/types/plugins/index.d.ts +16 -0
- package/types/plugins/infinite-scrolling/InfiniteScrollPlugin.d.ts +1 -0
- package/types/plugins/infinite-scrolling/index.d.ts +1 -0
- package/types/plugins/pagination/PaginationPlugin.d.ts +1 -0
- package/types/plugins/pagination/components/Pagination.d.ts +11 -0
- package/types/plugins/pagination/components/Paginator.d.ts +9 -0
- package/types/plugins/pagination/components/PerPageDropdown.d.ts +9 -0
- package/types/plugins/pagination/helper.d.ts +17 -0
- package/types/plugins/pagination/index.d.ts +1 -0
- package/types/plugins/pagination/usePaginationState.d.ts +9 -0
- package/types/plugins/resizable/ResizablePlugin.d.ts +1 -0
- package/types/plugins/resizable/decorateResizable.d.ts +4 -0
- package/types/plugins/resizable/index.d.ts +1 -0
- package/types/plugins/resizable/useResizeHandle.d.ts +13 -0
- package/types/plugins/resizable/utils.d.ts +3 -0
- package/types/plugins/row-dnd/DndRowsPlugin.d.ts +1 -0
- package/types/plugins/row-dnd/index.d.ts +1 -0
- package/types/plugins/selectable/SelectablePlugin.d.ts +1 -0
- package/types/plugins/selectable/addSelectableColumn.d.ts +30 -0
- package/types/plugins/selectable/helper.d.ts +5 -0
- package/types/plugins/selectable/index.d.ts +1 -0
- package/types/plugins/selectable/selectableFormatter.d.ts +9 -0
- package/types/plugins/selectable/useSelectableState.d.ts +9 -0
- package/types/plugins/sortable/SortablePlugin.d.ts +1 -0
- package/types/plugins/sortable/checkIfSortable.d.ts +2 -0
- package/types/plugins/sortable/index.d.ts +1 -0
- package/types/plugins/sortable/sortHeaderFormatter.d.ts +6 -0
- package/types/plugins/sortable/sortTree.d.ts +2 -0
- package/types/plugins/sortable/sorter.d.ts +12 -0
- package/types/plugins/sortable/useSortableState.d.ts +8 -0
- package/types/plugins/toolbar/RowRenderer.d.ts +11 -0
- package/types/plugins/toolbar/ToolbarPlugin.d.ts +1 -0
- package/types/plugins/toolbar/ToolbarTrigger.d.ts +8 -0
- package/types/plugins/toolbar/index.d.ts +1 -0
- package/types/plugins/virtualization/AutoHeightList.d.ts +3 -0
- package/types/plugins/virtualization/VirtualizationPlugin.d.ts +1 -0
- package/types/plugins/virtualization/VirtualizedBody.d.ts +32 -0
- package/types/plugins/virtualization/VirtualizedBodyRow.d.ts +8 -0
- package/types/plugins/virtualization/helper.d.ts +1 -0
- package/types/plugins/virtualization/index.d.ts +1 -0
- package/types/renders/CellWithAddons.d.ts +52 -0
- package/types/renders/index.d.ts +2 -0
- package/types/renders/styled.d.ts +3 -0
- package/types/rowSizes.d.ts +11 -0
- package/types/stories/datagrids-export.stories.d.ts +1 -0
- package/types/stories/datagrids-selectable-multi.stories.d.ts +1 -0
- package/types/tests/DataGrid-Columns.test.d.ts +1 -0
- package/types/tests/DataGrid-Editable.test.d.ts +1 -0
- package/types/tests/DataGrid-Export.test.d.ts +1 -0
- package/types/tests/DataGrid-Filter-helper.test.d.ts +1 -0
- package/types/tests/DataGrid-Filterable-Dates.test.d.ts +1 -0
- package/types/tests/DataGrid-Filterable-State.test.d.ts +1 -0
- package/types/tests/DataGrid-RowDnd.test.d.ts +1 -0
- package/types/tests/DataGrid-Selectable.test.d.ts +1 -0
- package/types/tests/DataGrid-Sortable.test.d.ts +1 -0
- package/types/tests/DataGrid-Toolbar.test.d.ts +1 -0
- package/types/tests/DataGrid-Virtualization.test.d.ts +1 -0
- package/types/tests/DataGrids-ColumnSizing.test.d.ts +1 -0
- package/types/tests/DataGrids-ConditionalPagination.test.d.ts +1 -0
- package/types/tests/DataGrids-Rows.test.d.ts +1 -0
- package/types/tests/DataGrids.test.d.ts +1 -0
- package/types/utilities/getPluginsFromProps.d.ts +1 -0
- package/types/utilities/getScrollbarSize.d.ts +1 -0
- package/types/utilities/normalizeData.d.ts +3 -0
- package/dist/cjs/DSDataGrid.js +0 -399
- package/dist/cjs/DSDataGrid.js.map +0 -7
- package/dist/cjs/DataGridImpl.js +0 -144
- package/dist/cjs/DataGridImpl.js.map +0 -7
- package/dist/cjs/PaginatedDataGrid.js +0 -77
- package/dist/cjs/PaginatedDataGrid.js.map +0 -7
- package/dist/cjs/blockNames.js +0 -39
- package/dist/cjs/blockNames.js.map +0 -7
- package/dist/cjs/columns/IconColumn.js +0 -111
- package/dist/cjs/columns/IconColumn.js.map +0 -7
- package/dist/cjs/columns/NumberColumn.js +0 -36
- package/dist/cjs/columns/NumberColumn.js.map +0 -7
- package/dist/cjs/components/BodyCell.js +0 -104
- package/dist/cjs/components/BodyCell.js.map +0 -7
- package/dist/cjs/components/BodyList.js +0 -54
- package/dist/cjs/components/BodyList.js.map +0 -7
- package/dist/cjs/components/ColumnVisibilityMenuOption.js +0 -66
- package/dist/cjs/components/ColumnVisibilityMenuOption.js.map +0 -7
- package/dist/cjs/components/ColumnsOptionsMenuSection.js +0 -64
- package/dist/cjs/components/ColumnsOptionsMenuSection.js.map +0 -7
- package/dist/cjs/components/EmptyState.js +0 -82
- package/dist/cjs/components/EmptyState.js.map +0 -7
- package/dist/cjs/components/HeaderCell.js +0 -76
- package/dist/cjs/components/HeaderCell.js.map +0 -7
- package/dist/cjs/components/List.js +0 -44
- package/dist/cjs/components/List.js.map +0 -7
- package/dist/cjs/components/ListItem.js +0 -51
- package/dist/cjs/components/ListItem.js.map +0 -7
- package/dist/cjs/components/NoResults.js +0 -55
- package/dist/cjs/components/NoResults.js.map +0 -7
- package/dist/cjs/components/RowsLoader.js +0 -42
- package/dist/cjs/components/RowsLoader.js.map +0 -7
- package/dist/cjs/components/Table.js +0 -113
- package/dist/cjs/components/Table.js.map +0 -7
- package/dist/cjs/components/TableBody.js +0 -70
- package/dist/cjs/components/TableBody.js.map +0 -7
- package/dist/cjs/components/TableHeader.js +0 -54
- package/dist/cjs/components/TableHeader.js.map +0 -7
- package/dist/cjs/components/footer/addOptionalFooterComponents.js +0 -56
- package/dist/cjs/components/footer/addOptionalFooterComponents.js.map +0 -7
- package/dist/cjs/components/header/PrimaryControls.js +0 -50
- package/dist/cjs/components/header/PrimaryControls.js.map +0 -7
- package/dist/cjs/components/header/addOptionalHeaderComponents.js +0 -58
- package/dist/cjs/components/header/addOptionalHeaderComponents.js.map +0 -7
- package/dist/cjs/components/index.js +0 -43
- package/dist/cjs/components/index.js.map +0 -7
- package/dist/cjs/components/renderers/defaultClassedRenderers.js +0 -66
- package/dist/cjs/components/renderers/defaultClassedRenderers.js.map +0 -7
- package/dist/cjs/components/renderers/index.js +0 -50
- package/dist/cjs/components/renderers/index.js.map +0 -7
- package/dist/cjs/components/renderers/renderRowsLoader.js +0 -39
- package/dist/cjs/components/renderers/renderRowsLoader.js.map +0 -7
- package/dist/cjs/components/tableContext.js +0 -36
- package/dist/cjs/components/tableContext.js.map +0 -7
- package/dist/cjs/defaultPlugins.js +0 -44
- package/dist/cjs/defaultPlugins.js.map +0 -7
- package/dist/cjs/index.js +0 -72
- package/dist/cjs/index.js.map +0 -7
- package/dist/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +0 -131
- package/dist/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js.map +0 -7
- package/dist/cjs/plugins/body-header-scroll-sync/index.js +0 -35
- package/dist/cjs/plugins/body-header-scroll-sync/index.js.map +0 -7
- package/dist/cjs/plugins/column-dnd/DndColumnsPlugin.js +0 -155
- package/dist/cjs/plugins/column-dnd/DndColumnsPlugin.js.map +0 -7
- package/dist/cjs/plugins/column-dnd/decorateGridWithDndColumns.js +0 -46
- package/dist/cjs/plugins/column-dnd/decorateGridWithDndColumns.js.map +0 -7
- package/dist/cjs/plugins/column-dnd/index.js +0 -35
- package/dist/cjs/plugins/column-dnd/index.js.map +0 -7
- package/dist/cjs/plugins/column-sizing/ColumnSizingPlugin.js +0 -92
- package/dist/cjs/plugins/column-sizing/ColumnSizingPlugin.js.map +0 -7
- package/dist/cjs/plugins/column-sizing/columnMeasurerTransformer.js +0 -69
- package/dist/cjs/plugins/column-sizing/columnMeasurerTransformer.js.map +0 -7
- package/dist/cjs/plugins/column-sizing/ext-points/decorateColumn.js +0 -44
- package/dist/cjs/plugins/column-sizing/ext-points/decorateColumn.js.map +0 -7
- package/dist/cjs/plugins/column-sizing/ext-points/getTableProps.js +0 -64
- package/dist/cjs/plugins/column-sizing/ext-points/getTableProps.js.map +0 -7
- package/dist/cjs/plugins/column-sizing/getColumnNameFromProperty.js +0 -37
- package/dist/cjs/plugins/column-sizing/getColumnNameFromProperty.js.map +0 -7
- package/dist/cjs/plugins/column-sizing/index.js +0 -35
- package/dist/cjs/plugins/column-sizing/index.js.map +0 -7
- package/dist/cjs/plugins/column-sizing/useColumnSizeService.js +0 -148
- package/dist/cjs/plugins/column-sizing/useColumnSizeService.js.map +0 -7
- package/dist/cjs/plugins/column-sizing/useStylesheetHelpers.js +0 -167
- package/dist/cjs/plugins/column-sizing/useStylesheetHelpers.js.map +0 -7
- package/dist/cjs/plugins/column-sizing/utils.js +0 -68
- package/dist/cjs/plugins/column-sizing/utils.js.map +0 -7
- package/dist/cjs/plugins/custom-cell-renderer/CustomRendererPlugin.js +0 -40
- package/dist/cjs/plugins/custom-cell-renderer/CustomRendererPlugin.js.map +0 -7
- package/dist/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js +0 -77
- package/dist/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js.map +0 -7
- package/dist/cjs/plugins/custom-cell-renderer/getRendererComponent.js +0 -63
- package/dist/cjs/plugins/custom-cell-renderer/getRendererComponent.js.map +0 -7
- package/dist/cjs/plugins/custom-cell-renderer/index.js +0 -35
- package/dist/cjs/plugins/custom-cell-renderer/index.js.map +0 -7
- package/dist/cjs/plugins/editable/EditableComponents/ComboBox.js +0 -68
- package/dist/cjs/plugins/editable/EditableComponents/ComboBox.js.map +0 -7
- package/dist/cjs/plugins/editable/EditableComponents/TextBox.js +0 -90
- package/dist/cjs/plugins/editable/EditableComponents/TextBox.js.map +0 -7
- package/dist/cjs/plugins/editable/EditableComponents/index.js +0 -37
- package/dist/cjs/plugins/editable/EditableComponents/index.js.map +0 -7
- package/dist/cjs/plugins/editable/EditablePlugin.js +0 -108
- package/dist/cjs/plugins/editable/EditablePlugin.js.map +0 -7
- package/dist/cjs/plugins/editable/decorateEditable.js +0 -85
- package/dist/cjs/plugins/editable/decorateEditable.js.map +0 -7
- package/dist/cjs/plugins/editable/getEditorComponent.js +0 -76
- package/dist/cjs/plugins/editable/getEditorComponent.js.map +0 -7
- package/dist/cjs/plugins/editable/index.js +0 -38
- package/dist/cjs/plugins/editable/index.js.map +0 -7
- package/dist/cjs/plugins/expandable-grid/ExpandableColumn.js +0 -124
- package/dist/cjs/plugins/expandable-grid/ExpandableColumn.js.map +0 -7
- package/dist/cjs/plugins/expandable-grid/ExpandablePlugin.js +0 -181
- package/dist/cjs/plugins/expandable-grid/ExpandablePlugin.js.map +0 -7
- package/dist/cjs/plugins/expandable-grid/ExpandedRow.js +0 -134
- package/dist/cjs/plugins/expandable-grid/ExpandedRow.js.map +0 -7
- package/dist/cjs/plugins/expandable-grid/ExpandedRowExtra.js +0 -56
- package/dist/cjs/plugins/expandable-grid/ExpandedRowExtra.js.map +0 -7
- package/dist/cjs/plugins/expandable-grid/index.js +0 -37
- package/dist/cjs/plugins/expandable-grid/index.js.map +0 -7
- package/dist/cjs/plugins/expandable-grid/useExpandGridState.js +0 -93
- package/dist/cjs/plugins/expandable-grid/useExpandGridState.js.map +0 -7
- package/dist/cjs/plugins/export-data/ExportDataPlugin.js +0 -134
- package/dist/cjs/plugins/export-data/ExportDataPlugin.js.map +0 -7
- package/dist/cjs/plugins/export-data/index.js +0 -35
- package/dist/cjs/plugins/export-data/index.js.map +0 -7
- package/dist/cjs/plugins/filterable/FilterablePlugin.js +0 -80
- package/dist/cjs/plugins/filterable/FilterablePlugin.js.map +0 -7
- package/dist/cjs/plugins/filterable/addFilterToColumn.js +0 -43
- package/dist/cjs/plugins/filterable/addFilterToColumn.js.map +0 -7
- package/dist/cjs/plugins/filterable/components/FilterableHeader.js +0 -132
- package/dist/cjs/plugins/filterable/components/FilterableHeader.js.map +0 -7
- package/dist/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +0 -157
- package/dist/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js.map +0 -7
- package/dist/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +0 -131
- package/dist/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js.map +0 -7
- package/dist/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +0 -201
- package/dist/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js.map +0 -7
- package/dist/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js +0 -170
- package/dist/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js.map +0 -7
- package/dist/cjs/plugins/filterable/components/filterable-menus/defaultDateFormat.js +0 -35
- package/dist/cjs/plugins/filterable/components/filterable-menus/defaultDateFormat.js.map +0 -7
- package/dist/cjs/plugins/filterable/components/filterable-menus/getFilterMenuByType.js +0 -49
- package/dist/cjs/plugins/filterable/components/filterable-menus/getFilterMenuByType.js.map +0 -7
- package/dist/cjs/plugins/filterable/filterableFormatter.js +0 -73
- package/dist/cjs/plugins/filterable/filterableFormatter.js.map +0 -7
- package/dist/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js +0 -79
- package/dist/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js.map +0 -7
- package/dist/cjs/plugins/filterable/filtering-helper/strategiesOperators.js +0 -44
- package/dist/cjs/plugins/filterable/filtering-helper/strategiesOperators.js.map +0 -7
- package/dist/cjs/plugins/filterable/helper.js +0 -109
- package/dist/cjs/plugins/filterable/helper.js.map +0 -7
- package/dist/cjs/plugins/filterable/index.js +0 -35
- package/dist/cjs/plugins/filterable/index.js.map +0 -7
- package/dist/cjs/plugins/filterable/useFilterableState.js +0 -113
- package/dist/cjs/plugins/filterable/useFilterableState.js.map +0 -7
- package/dist/cjs/plugins/grouping-by/GroupingByPlugin.js +0 -57
- package/dist/cjs/plugins/grouping-by/GroupingByPlugin.js.map +0 -7
- package/dist/cjs/plugins/grouping-grid/GroupingPlugin.js +0 -126
- package/dist/cjs/plugins/grouping-grid/GroupingPlugin.js.map +0 -7
- package/dist/cjs/plugins/grouping-grid/walkStrategy.js +0 -76
- package/dist/cjs/plugins/grouping-grid/walkStrategy.js.map +0 -7
- package/dist/cjs/plugins/index.js +0 -68
- package/dist/cjs/plugins/index.js.map +0 -7
- package/dist/cjs/plugins/infinite-scrolling/InfiniteScrollPlugin.js +0 -100
- package/dist/cjs/plugins/infinite-scrolling/InfiniteScrollPlugin.js.map +0 -7
- package/dist/cjs/plugins/infinite-scrolling/index.js +0 -35
- package/dist/cjs/plugins/infinite-scrolling/index.js.map +0 -7
- package/dist/cjs/plugins/pagination/PaginationPlugin.js +0 -92
- package/dist/cjs/plugins/pagination/PaginationPlugin.js.map +0 -7
- package/dist/cjs/plugins/pagination/components/Pagination.js +0 -63
- package/dist/cjs/plugins/pagination/components/Pagination.js.map +0 -7
- package/dist/cjs/plugins/pagination/components/Paginator.js +0 -82
- package/dist/cjs/plugins/pagination/components/Paginator.js.map +0 -7
- package/dist/cjs/plugins/pagination/components/PerPageDropdown.js +0 -68
- package/dist/cjs/plugins/pagination/components/PerPageDropdown.js.map +0 -7
- package/dist/cjs/plugins/pagination/helper.js +0 -62
- package/dist/cjs/plugins/pagination/helper.js.map +0 -7
- package/dist/cjs/plugins/pagination/index.js +0 -35
- package/dist/cjs/plugins/pagination/index.js.map +0 -7
- package/dist/cjs/plugins/pagination/usePaginationState.js +0 -82
- package/dist/cjs/plugins/pagination/usePaginationState.js.map +0 -7
- package/dist/cjs/plugins/resizable/ResizablePlugin.js +0 -109
- package/dist/cjs/plugins/resizable/ResizablePlugin.js.map +0 -7
- package/dist/cjs/plugins/resizable/decorateResizable.js +0 -56
- package/dist/cjs/plugins/resizable/decorateResizable.js.map +0 -7
- package/dist/cjs/plugins/resizable/index.js +0 -35
- package/dist/cjs/plugins/resizable/index.js.map +0 -7
- package/dist/cjs/plugins/resizable/useResizeHandle.js +0 -79
- package/dist/cjs/plugins/resizable/useResizeHandle.js.map +0 -7
- package/dist/cjs/plugins/resizable/utils.js +0 -54
- package/dist/cjs/plugins/resizable/utils.js.map +0 -7
- package/dist/cjs/plugins/row-dnd/DndRowsPlugin.js +0 -136
- package/dist/cjs/plugins/row-dnd/DndRowsPlugin.js.map +0 -7
- package/dist/cjs/plugins/row-dnd/index.js +0 -35
- package/dist/cjs/plugins/row-dnd/index.js.map +0 -7
- package/dist/cjs/plugins/selectable/SelectablePlugin.js +0 -166
- package/dist/cjs/plugins/selectable/SelectablePlugin.js.map +0 -7
- package/dist/cjs/plugins/selectable/addSelectableColumn.js +0 -92
- package/dist/cjs/plugins/selectable/addSelectableColumn.js.map +0 -7
- package/dist/cjs/plugins/selectable/helper.js +0 -54
- package/dist/cjs/plugins/selectable/helper.js.map +0 -7
- package/dist/cjs/plugins/selectable/index.js +0 -35
- package/dist/cjs/plugins/selectable/index.js.map +0 -7
- package/dist/cjs/plugins/selectable/selectableFormatter.js +0 -93
- package/dist/cjs/plugins/selectable/selectableFormatter.js.map +0 -7
- package/dist/cjs/plugins/selectable/useSelectableState.js +0 -116
- package/dist/cjs/plugins/selectable/useSelectableState.js.map +0 -7
- package/dist/cjs/plugins/sortable/SortablePlugin.js +0 -95
- package/dist/cjs/plugins/sortable/SortablePlugin.js.map +0 -7
- package/dist/cjs/plugins/sortable/checkIfSortable.js +0 -45
- package/dist/cjs/plugins/sortable/checkIfSortable.js.map +0 -7
- package/dist/cjs/plugins/sortable/index.js +0 -35
- package/dist/cjs/plugins/sortable/index.js.map +0 -7
- package/dist/cjs/plugins/sortable/sortHeaderFormatter.js +0 -66
- package/dist/cjs/plugins/sortable/sortHeaderFormatter.js.map +0 -7
- package/dist/cjs/plugins/sortable/sortTree.js +0 -44
- package/dist/cjs/plugins/sortable/sortTree.js.map +0 -7
- package/dist/cjs/plugins/sortable/sorter.js +0 -144
- package/dist/cjs/plugins/sortable/sorter.js.map +0 -7
- package/dist/cjs/plugins/sortable/useSortableState.js +0 -73
- package/dist/cjs/plugins/sortable/useSortableState.js.map +0 -7
- package/dist/cjs/plugins/toolbar/RowRenderer.js +0 -96
- package/dist/cjs/plugins/toolbar/RowRenderer.js.map +0 -7
- package/dist/cjs/plugins/toolbar/ToolbarPlugin.js +0 -58
- package/dist/cjs/plugins/toolbar/ToolbarPlugin.js.map +0 -7
- package/dist/cjs/plugins/toolbar/ToolbarTrigger.js +0 -105
- package/dist/cjs/plugins/toolbar/ToolbarTrigger.js.map +0 -7
- package/dist/cjs/plugins/toolbar/index.js +0 -35
- package/dist/cjs/plugins/toolbar/index.js.map +0 -7
- package/dist/cjs/plugins/virtualization/AutoHeightList.js +0 -71
- package/dist/cjs/plugins/virtualization/AutoHeightList.js.map +0 -7
- package/dist/cjs/plugins/virtualization/VirtualizationPlugin.js +0 -97
- package/dist/cjs/plugins/virtualization/VirtualizationPlugin.js.map +0 -7
- package/dist/cjs/plugins/virtualization/VirtualizedBody.js +0 -259
- package/dist/cjs/plugins/virtualization/VirtualizedBody.js.map +0 -7
- package/dist/cjs/plugins/virtualization/VirtualizedBodyRow.js +0 -52
- package/dist/cjs/plugins/virtualization/VirtualizedBodyRow.js.map +0 -7
- package/dist/cjs/plugins/virtualization/helper.js +0 -35
- package/dist/cjs/plugins/virtualization/helper.js.map +0 -7
- package/dist/cjs/plugins/virtualization/index.js +0 -35
- package/dist/cjs/plugins/virtualization/index.js.map +0 -7
- package/dist/cjs/renders/CellWithAddons.js +0 -111
- package/dist/cjs/renders/CellWithAddons.js.map +0 -7
- package/dist/cjs/renders/index.js +0 -37
- package/dist/cjs/renders/index.js.map +0 -7
- package/dist/cjs/renders/styled.js +0 -78
- package/dist/cjs/renders/styled.js.map +0 -7
- package/dist/cjs/rowSizes.js +0 -51
- package/dist/cjs/rowSizes.js.map +0 -7
- package/dist/cjs/utilities/DataGridUtilities.json +0 -1315
- package/dist/cjs/utilities/getPluginsFromProps.js +0 -72
- package/dist/cjs/utilities/getPluginsFromProps.js.map +0 -7
- package/dist/cjs/utilities/getScrollbarSize.js +0 -46
- package/dist/cjs/utilities/getScrollbarSize.js.map +0 -7
- package/dist/cjs/utilities/normalizeData.js +0 -49
- package/dist/cjs/utilities/normalizeData.js.map +0 -7
- package/dist/esm/DSDataGrid.js +0 -370
- package/dist/esm/DSDataGrid.js.map +0 -7
- package/dist/esm/DataGridImpl.js +0 -115
- package/dist/esm/DataGridImpl.js.map +0 -7
- package/dist/esm/PaginatedDataGrid.js +0 -48
- package/dist/esm/PaginatedDataGrid.js.map +0 -7
- package/dist/esm/blockNames.js +0 -10
- package/dist/esm/blockNames.js.map +0 -7
- package/dist/esm/columns/IconColumn.js +0 -82
- package/dist/esm/columns/IconColumn.js.map +0 -7
- package/dist/esm/columns/NumberColumn.js +0 -7
- package/dist/esm/columns/NumberColumn.js.map +0 -7
- package/dist/esm/components/BodyCell.js +0 -75
- package/dist/esm/components/BodyCell.js.map +0 -7
- package/dist/esm/components/BodyList.js +0 -25
- package/dist/esm/components/BodyList.js.map +0 -7
- package/dist/esm/components/ColumnVisibilityMenuOption.js +0 -37
- package/dist/esm/components/ColumnVisibilityMenuOption.js.map +0 -7
- package/dist/esm/components/ColumnsOptionsMenuSection.js +0 -35
- package/dist/esm/components/ColumnsOptionsMenuSection.js.map +0 -7
- package/dist/esm/components/EmptyState.js +0 -53
- package/dist/esm/components/EmptyState.js.map +0 -7
- package/dist/esm/components/HeaderCell.js +0 -47
- package/dist/esm/components/HeaderCell.js.map +0 -7
- package/dist/esm/components/List.js +0 -15
- package/dist/esm/components/List.js.map +0 -7
- package/dist/esm/components/ListItem.js +0 -22
- package/dist/esm/components/ListItem.js.map +0 -7
- package/dist/esm/components/NoResults.js +0 -26
- package/dist/esm/components/NoResults.js.map +0 -7
- package/dist/esm/components/RowsLoader.js +0 -13
- package/dist/esm/components/RowsLoader.js.map +0 -7
- package/dist/esm/components/Table.js +0 -84
- package/dist/esm/components/Table.js.map +0 -7
- package/dist/esm/components/TableBody.js +0 -41
- package/dist/esm/components/TableBody.js.map +0 -7
- package/dist/esm/components/TableHeader.js +0 -25
- package/dist/esm/components/TableHeader.js.map +0 -7
- package/dist/esm/components/footer/addOptionalFooterComponents.js +0 -27
- package/dist/esm/components/footer/addOptionalFooterComponents.js.map +0 -7
- package/dist/esm/components/header/PrimaryControls.js +0 -21
- package/dist/esm/components/header/PrimaryControls.js.map +0 -7
- package/dist/esm/components/header/addOptionalHeaderComponents.js +0 -29
- package/dist/esm/components/header/addOptionalHeaderComponents.js.map +0 -7
- package/dist/esm/components/index.js +0 -14
- package/dist/esm/components/index.js.map +0 -7
- package/dist/esm/components/renderers/defaultClassedRenderers.js +0 -41
- package/dist/esm/components/renderers/defaultClassedRenderers.js.map +0 -7
- package/dist/esm/components/renderers/index.js +0 -29
- package/dist/esm/components/renderers/index.js.map +0 -7
- package/dist/esm/components/renderers/renderRowsLoader.js +0 -10
- package/dist/esm/components/renderers/renderRowsLoader.js.map +0 -7
- package/dist/esm/components/tableContext.js +0 -7
- package/dist/esm/components/tableContext.js.map +0 -7
- package/dist/esm/defaultPlugins.js +0 -15
- package/dist/esm/defaultPlugins.js.map +0 -7
- package/dist/esm/index.js +0 -63
- package/dist/esm/index.js.map +0 -7
- package/dist/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +0 -102
- package/dist/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js.map +0 -7
- package/dist/esm/plugins/body-header-scroll-sync/index.js +0 -6
- package/dist/esm/plugins/body-header-scroll-sync/index.js.map +0 -7
- package/dist/esm/plugins/column-dnd/DndColumnsPlugin.js +0 -126
- package/dist/esm/plugins/column-dnd/DndColumnsPlugin.js.map +0 -7
- package/dist/esm/plugins/column-dnd/decorateGridWithDndColumns.js +0 -20
- package/dist/esm/plugins/column-dnd/decorateGridWithDndColumns.js.map +0 -7
- package/dist/esm/plugins/column-dnd/index.js +0 -6
- package/dist/esm/plugins/column-dnd/index.js.map +0 -7
- package/dist/esm/plugins/column-sizing/ColumnSizingPlugin.js +0 -63
- package/dist/esm/plugins/column-sizing/ColumnSizingPlugin.js.map +0 -7
- package/dist/esm/plugins/column-sizing/columnMeasurerTransformer.js +0 -40
- package/dist/esm/plugins/column-sizing/columnMeasurerTransformer.js.map +0 -7
- package/dist/esm/plugins/column-sizing/ext-points/decorateColumn.js +0 -15
- package/dist/esm/plugins/column-sizing/ext-points/decorateColumn.js.map +0 -7
- package/dist/esm/plugins/column-sizing/ext-points/getTableProps.js +0 -35
- package/dist/esm/plugins/column-sizing/ext-points/getTableProps.js.map +0 -7
- package/dist/esm/plugins/column-sizing/getColumnNameFromProperty.js +0 -8
- package/dist/esm/plugins/column-sizing/getColumnNameFromProperty.js.map +0 -7
- package/dist/esm/plugins/column-sizing/index.js +0 -6
- package/dist/esm/plugins/column-sizing/index.js.map +0 -7
- package/dist/esm/plugins/column-sizing/useColumnSizeService.js +0 -119
- package/dist/esm/plugins/column-sizing/useColumnSizeService.js.map +0 -7
- package/dist/esm/plugins/column-sizing/useStylesheetHelpers.js +0 -138
- package/dist/esm/plugins/column-sizing/useStylesheetHelpers.js.map +0 -7
- package/dist/esm/plugins/column-sizing/utils.js +0 -39
- package/dist/esm/plugins/column-sizing/utils.js.map +0 -7
- package/dist/esm/plugins/custom-cell-renderer/CustomRendererPlugin.js +0 -11
- package/dist/esm/plugins/custom-cell-renderer/CustomRendererPlugin.js.map +0 -7
- package/dist/esm/plugins/custom-cell-renderer/addCustomRendererToCell.js +0 -48
- package/dist/esm/plugins/custom-cell-renderer/addCustomRendererToCell.js.map +0 -7
- package/dist/esm/plugins/custom-cell-renderer/getRendererComponent.js +0 -34
- package/dist/esm/plugins/custom-cell-renderer/getRendererComponent.js.map +0 -7
- package/dist/esm/plugins/custom-cell-renderer/index.js +0 -6
- package/dist/esm/plugins/custom-cell-renderer/index.js.map +0 -7
- package/dist/esm/plugins/editable/EditableComponents/ComboBox.js +0 -39
- package/dist/esm/plugins/editable/EditableComponents/ComboBox.js.map +0 -7
- package/dist/esm/plugins/editable/EditableComponents/TextBox.js +0 -61
- package/dist/esm/plugins/editable/EditableComponents/TextBox.js.map +0 -7
- package/dist/esm/plugins/editable/EditableComponents/index.js +0 -8
- package/dist/esm/plugins/editable/EditableComponents/index.js.map +0 -7
- package/dist/esm/plugins/editable/EditablePlugin.js +0 -79
- package/dist/esm/plugins/editable/EditablePlugin.js.map +0 -7
- package/dist/esm/plugins/editable/decorateEditable.js +0 -56
- package/dist/esm/plugins/editable/decorateEditable.js.map +0 -7
- package/dist/esm/plugins/editable/getEditorComponent.js +0 -47
- package/dist/esm/plugins/editable/getEditorComponent.js.map +0 -7
- package/dist/esm/plugins/editable/index.js +0 -9
- package/dist/esm/plugins/editable/index.js.map +0 -7
- package/dist/esm/plugins/expandable-grid/ExpandableColumn.js +0 -95
- package/dist/esm/plugins/expandable-grid/ExpandableColumn.js.map +0 -7
- package/dist/esm/plugins/expandable-grid/ExpandablePlugin.js +0 -152
- package/dist/esm/plugins/expandable-grid/ExpandablePlugin.js.map +0 -7
- package/dist/esm/plugins/expandable-grid/ExpandedRow.js +0 -105
- package/dist/esm/plugins/expandable-grid/ExpandedRow.js.map +0 -7
- package/dist/esm/plugins/expandable-grid/ExpandedRowExtra.js +0 -27
- package/dist/esm/plugins/expandable-grid/ExpandedRowExtra.js.map +0 -7
- package/dist/esm/plugins/expandable-grid/index.js +0 -8
- package/dist/esm/plugins/expandable-grid/index.js.map +0 -7
- package/dist/esm/plugins/expandable-grid/useExpandGridState.js +0 -64
- package/dist/esm/plugins/expandable-grid/useExpandGridState.js.map +0 -7
- package/dist/esm/plugins/export-data/ExportDataPlugin.js +0 -105
- package/dist/esm/plugins/export-data/ExportDataPlugin.js.map +0 -7
- package/dist/esm/plugins/export-data/index.js +0 -6
- package/dist/esm/plugins/export-data/index.js.map +0 -7
- package/dist/esm/plugins/filterable/FilterablePlugin.js +0 -51
- package/dist/esm/plugins/filterable/FilterablePlugin.js.map +0 -7
- package/dist/esm/plugins/filterable/addFilterToColumn.js +0 -14
- package/dist/esm/plugins/filterable/addFilterToColumn.js.map +0 -7
- package/dist/esm/plugins/filterable/components/FilterableHeader.js +0 -103
- package/dist/esm/plugins/filterable/components/FilterableHeader.js.map +0 -7
- package/dist/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +0 -128
- package/dist/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js.map +0 -7
- package/dist/esm/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +0 -102
- package/dist/esm/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js.map +0 -7
- package/dist/esm/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +0 -176
- package/dist/esm/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js.map +0 -7
- package/dist/esm/plugins/filterable/components/filterable-menus/TextFilterMenu.js +0 -141
- package/dist/esm/plugins/filterable/components/filterable-menus/TextFilterMenu.js.map +0 -7
- package/dist/esm/plugins/filterable/components/filterable-menus/defaultDateFormat.js +0 -6
- package/dist/esm/plugins/filterable/components/filterable-menus/defaultDateFormat.js.map +0 -7
- package/dist/esm/plugins/filterable/components/filterable-menus/getFilterMenuByType.js +0 -20
- package/dist/esm/plugins/filterable/components/filterable-menus/getFilterMenuByType.js.map +0 -7
- package/dist/esm/plugins/filterable/filterableFormatter.js +0 -44
- package/dist/esm/plugins/filterable/filterableFormatter.js.map +0 -7
- package/dist/esm/plugins/filterable/filtering-helper/filterRowsByQuery.js +0 -50
- package/dist/esm/plugins/filterable/filtering-helper/filterRowsByQuery.js.map +0 -7
- package/dist/esm/plugins/filterable/filtering-helper/strategiesOperators.js +0 -15
- package/dist/esm/plugins/filterable/filtering-helper/strategiesOperators.js.map +0 -7
- package/dist/esm/plugins/filterable/helper.js +0 -86
- package/dist/esm/plugins/filterable/helper.js.map +0 -7
- package/dist/esm/plugins/filterable/index.js +0 -6
- package/dist/esm/plugins/filterable/index.js.map +0 -7
- package/dist/esm/plugins/filterable/useFilterableState.js +0 -88
- package/dist/esm/plugins/filterable/useFilterableState.js.map +0 -7
- package/dist/esm/plugins/grouping-by/GroupingByPlugin.js +0 -28
- package/dist/esm/plugins/grouping-by/GroupingByPlugin.js.map +0 -7
- package/dist/esm/plugins/grouping-grid/GroupingPlugin.js +0 -97
- package/dist/esm/plugins/grouping-grid/GroupingPlugin.js.map +0 -7
- package/dist/esm/plugins/grouping-grid/walkStrategy.js +0 -47
- package/dist/esm/plugins/grouping-grid/walkStrategy.js.map +0 -7
- package/dist/esm/plugins/index.js +0 -39
- package/dist/esm/plugins/index.js.map +0 -7
- package/dist/esm/plugins/infinite-scrolling/InfiniteScrollPlugin.js +0 -71
- package/dist/esm/plugins/infinite-scrolling/InfiniteScrollPlugin.js.map +0 -7
- package/dist/esm/plugins/infinite-scrolling/index.js +0 -6
- package/dist/esm/plugins/infinite-scrolling/index.js.map +0 -7
- package/dist/esm/plugins/pagination/PaginationPlugin.js +0 -63
- package/dist/esm/plugins/pagination/PaginationPlugin.js.map +0 -7
- package/dist/esm/plugins/pagination/components/Pagination.js +0 -34
- package/dist/esm/plugins/pagination/components/Pagination.js.map +0 -7
- package/dist/esm/plugins/pagination/components/Paginator.js +0 -53
- package/dist/esm/plugins/pagination/components/Paginator.js.map +0 -7
- package/dist/esm/plugins/pagination/components/PerPageDropdown.js +0 -39
- package/dist/esm/plugins/pagination/components/PerPageDropdown.js.map +0 -7
- package/dist/esm/plugins/pagination/helper.js +0 -33
- package/dist/esm/plugins/pagination/helper.js.map +0 -7
- package/dist/esm/plugins/pagination/index.js +0 -6
- package/dist/esm/plugins/pagination/index.js.map +0 -7
- package/dist/esm/plugins/pagination/usePaginationState.js +0 -53
- package/dist/esm/plugins/pagination/usePaginationState.js.map +0 -7
- package/dist/esm/plugins/resizable/ResizablePlugin.js +0 -80
- package/dist/esm/plugins/resizable/ResizablePlugin.js.map +0 -7
- package/dist/esm/plugins/resizable/decorateResizable.js +0 -27
- package/dist/esm/plugins/resizable/decorateResizable.js.map +0 -7
- package/dist/esm/plugins/resizable/index.js +0 -6
- package/dist/esm/plugins/resizable/index.js.map +0 -7
- package/dist/esm/plugins/resizable/useResizeHandle.js +0 -50
- package/dist/esm/plugins/resizable/useResizeHandle.js.map +0 -7
- package/dist/esm/plugins/resizable/utils.js +0 -25
- package/dist/esm/plugins/resizable/utils.js.map +0 -7
- package/dist/esm/plugins/row-dnd/DndRowsPlugin.js +0 -107
- package/dist/esm/plugins/row-dnd/DndRowsPlugin.js.map +0 -7
- package/dist/esm/plugins/row-dnd/index.js +0 -6
- package/dist/esm/plugins/row-dnd/index.js.map +0 -7
- package/dist/esm/plugins/selectable/SelectablePlugin.js +0 -137
- package/dist/esm/plugins/selectable/SelectablePlugin.js.map +0 -7
- package/dist/esm/plugins/selectable/addSelectableColumn.js +0 -66
- package/dist/esm/plugins/selectable/addSelectableColumn.js.map +0 -7
- package/dist/esm/plugins/selectable/helper.js +0 -25
- package/dist/esm/plugins/selectable/helper.js.map +0 -7
- package/dist/esm/plugins/selectable/index.js +0 -6
- package/dist/esm/plugins/selectable/index.js.map +0 -7
- package/dist/esm/plugins/selectable/selectableFormatter.js +0 -64
- package/dist/esm/plugins/selectable/selectableFormatter.js.map +0 -7
- package/dist/esm/plugins/selectable/useSelectableState.js +0 -91
- package/dist/esm/plugins/selectable/useSelectableState.js.map +0 -7
- package/dist/esm/plugins/sortable/SortablePlugin.js +0 -69
- package/dist/esm/plugins/sortable/SortablePlugin.js.map +0 -7
- package/dist/esm/plugins/sortable/checkIfSortable.js +0 -16
- package/dist/esm/plugins/sortable/checkIfSortable.js.map +0 -7
- package/dist/esm/plugins/sortable/index.js +0 -6
- package/dist/esm/plugins/sortable/index.js.map +0 -7
- package/dist/esm/plugins/sortable/sortHeaderFormatter.js +0 -37
- package/dist/esm/plugins/sortable/sortHeaderFormatter.js.map +0 -7
- package/dist/esm/plugins/sortable/sortTree.js +0 -15
- package/dist/esm/plugins/sortable/sortTree.js.map +0 -7
- package/dist/esm/plugins/sortable/sorter.js +0 -115
- package/dist/esm/plugins/sortable/sorter.js.map +0 -7
- package/dist/esm/plugins/sortable/useSortableState.js +0 -44
- package/dist/esm/plugins/sortable/useSortableState.js.map +0 -7
- package/dist/esm/plugins/toolbar/RowRenderer.js +0 -67
- package/dist/esm/plugins/toolbar/RowRenderer.js.map +0 -7
- package/dist/esm/plugins/toolbar/ToolbarPlugin.js +0 -29
- package/dist/esm/plugins/toolbar/ToolbarPlugin.js.map +0 -7
- package/dist/esm/plugins/toolbar/ToolbarTrigger.js +0 -76
- package/dist/esm/plugins/toolbar/ToolbarTrigger.js.map +0 -7
- package/dist/esm/plugins/toolbar/index.js +0 -6
- package/dist/esm/plugins/toolbar/index.js.map +0 -7
- package/dist/esm/plugins/virtualization/AutoHeightList.js +0 -42
- package/dist/esm/plugins/virtualization/AutoHeightList.js.map +0 -7
- package/dist/esm/plugins/virtualization/VirtualizationPlugin.js +0 -68
- package/dist/esm/plugins/virtualization/VirtualizationPlugin.js.map +0 -7
- package/dist/esm/plugins/virtualization/VirtualizedBody.js +0 -230
- package/dist/esm/plugins/virtualization/VirtualizedBody.js.map +0 -7
- package/dist/esm/plugins/virtualization/VirtualizedBodyRow.js +0 -23
- package/dist/esm/plugins/virtualization/VirtualizedBodyRow.js.map +0 -7
- package/dist/esm/plugins/virtualization/helper.js +0 -6
- package/dist/esm/plugins/virtualization/helper.js.map +0 -7
- package/dist/esm/plugins/virtualization/index.js +0 -6
- package/dist/esm/plugins/virtualization/index.js.map +0 -7
- package/dist/esm/renders/CellWithAddons.js +0 -82
- package/dist/esm/renders/CellWithAddons.js.map +0 -7
- package/dist/esm/renders/index.js +0 -8
- package/dist/esm/renders/index.js.map +0 -7
- package/dist/esm/renders/styled.js +0 -49
- package/dist/esm/renders/styled.js.map +0 -7
- package/dist/esm/rowSizes.js +0 -22
- package/dist/esm/rowSizes.js.map +0 -7
- package/dist/esm/utilities/DataGridUtilities.json +0 -1315
- package/dist/esm/utilities/getPluginsFromProps.js +0 -43
- package/dist/esm/utilities/getPluginsFromProps.js.map +0 -7
- package/dist/esm/utilities/getScrollbarSize.js +0 -17
- package/dist/esm/utilities/getScrollbarSize.js.map +0 -7
- package/dist/esm/utilities/normalizeData.js +0 -20
- package/dist/esm/utilities/normalizeData.js.map +0 -7
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
-
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(module2))
|
|
15
|
-
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
-
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return target;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (module2, isNodeMode) => {
|
|
21
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
-
return (module2, temp) => {
|
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
-
};
|
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
-
var usePaginationState_exports = {};
|
|
29
|
-
__export(usePaginationState_exports, {
|
|
30
|
-
usePaginationState: () => usePaginationState
|
|
31
|
-
});
|
|
32
|
-
var React = __toESM(require("react"));
|
|
33
|
-
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
34
|
-
var import_helper = require("./helper");
|
|
35
|
-
function usePaginationState(grid) {
|
|
36
|
-
const {
|
|
37
|
-
minPerPage = 0,
|
|
38
|
-
maxPerPage = 50,
|
|
39
|
-
onPerPageChange = () => null,
|
|
40
|
-
onPageChange = () => null,
|
|
41
|
-
pagination: paginationProp = {
|
|
42
|
-
page: 1,
|
|
43
|
-
perPage: 10
|
|
44
|
-
},
|
|
45
|
-
groupedRows
|
|
46
|
-
} = grid.props;
|
|
47
|
-
const { composedRows, rows } = grid.getInstance();
|
|
48
|
-
const [pagination, setPagination] = (0, import_ds_utilities.useDerivedStateFromProps)(paginationProp);
|
|
49
|
-
const onPerPage = (perPageNumber) => {
|
|
50
|
-
const parsedPerPageNumber = (0, import_helper.parsePerPageNumber)(perPageNumber, maxPerPage, minPerPage);
|
|
51
|
-
const actualNumber = parsedPerPageNumber ? parseInt(parsedPerPageNumber, 10) : 0;
|
|
52
|
-
setPagination((prevPagination) => {
|
|
53
|
-
onPerPageChange(actualNumber);
|
|
54
|
-
return {
|
|
55
|
-
page: prevPagination.page,
|
|
56
|
-
perPage: actualNumber
|
|
57
|
-
};
|
|
58
|
-
});
|
|
59
|
-
};
|
|
60
|
-
const onPageSelect = (page) => {
|
|
61
|
-
const length = groupedRows ? composedRows.length : rows.length;
|
|
62
|
-
setPagination((prevPagination) => {
|
|
63
|
-
const pages = Math.ceil(length / prevPagination.perPage);
|
|
64
|
-
onPageChange(page);
|
|
65
|
-
return {
|
|
66
|
-
...prevPagination,
|
|
67
|
-
page: Math.min(Math.max(page, 1), pages)
|
|
68
|
-
};
|
|
69
|
-
});
|
|
70
|
-
};
|
|
71
|
-
return {
|
|
72
|
-
state: {
|
|
73
|
-
pagination
|
|
74
|
-
},
|
|
75
|
-
actions: {
|
|
76
|
-
onPerPage,
|
|
77
|
-
onPageSelect
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
module.exports = __toCommonJS(usePaginationState_exports);
|
|
82
|
-
//# sourceMappingURL=usePaginationState.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/plugins/pagination/usePaginationState.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { useDerivedStateFromProps } from '@elliemae/ds-utilities';\nimport { parsePerPageNumber } from './helper';\n\nexport function usePaginationState(grid) {\n const {\n minPerPage = 0,\n maxPerPage = 50,\n onPerPageChange = () => null,\n onPageChange = () => null,\n pagination: paginationProp = {\n page: 1,\n perPage: 10,\n },\n groupedRows,\n } = grid.props;\n const { composedRows, rows } = grid.getInstance();\n const [pagination, setPagination] = useDerivedStateFromProps(paginationProp);\n\n const onPerPage = (perPageNumber) => {\n const parsedPerPageNumber = parsePerPageNumber(perPageNumber, maxPerPage, minPerPage);\n const actualNumber = parsedPerPageNumber ? parseInt(parsedPerPageNumber, 10) : 0;\n\n setPagination((prevPagination) => {\n onPerPageChange(actualNumber);\n return {\n page: prevPagination.page,\n perPage: actualNumber,\n };\n });\n };\n\n const onPageSelect = (page) => {\n const length = groupedRows ? composedRows.length : rows.length;\n setPagination((prevPagination) => {\n const pages = Math.ceil(length / prevPagination.perPage);\n onPageChange(page);\n return {\n ...prevPagination,\n page: Math.min(Math.max(page, 1), pages),\n };\n });\n };\n\n return {\n state: {\n pagination,\n },\n actions: {\n onPerPage,\n onPageSelect,\n },\n };\n}\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAAyC;AACzC,oBAAmC;AAE5B,4BAA4B,MAAM;AACvC,QAAM;AAAA,IACJ,aAAa;AAAA,IACb,aAAa;AAAA,IACb,kBAAkB,MAAM;AAAA,IACxB,eAAe,MAAM;AAAA,IACrB,YAAY,iBAAiB;AAAA,MAC3B,MAAM;AAAA,MACN,SAAS;AAAA;AAAA,IAEX;AAAA,MACE,KAAK;AACT,QAAM,EAAE,cAAc,SAAS,KAAK;AACpC,QAAM,CAAC,YAAY,iBAAiB,kDAAyB;AAE7D,QAAM,YAAY,CAAC,kBAAkB;AACnC,UAAM,sBAAsB,sCAAmB,eAAe,YAAY;AAC1E,UAAM,eAAe,sBAAsB,SAAS,qBAAqB,MAAM;AAE/E,kBAAc,CAAC,mBAAmB;AAChC,sBAAgB;AAChB,aAAO;AAAA,QACL,MAAM,eAAe;AAAA,QACrB,SAAS;AAAA;AAAA;AAAA;AAKf,QAAM,eAAe,CAAC,SAAS;AAC7B,UAAM,SAAS,cAAc,aAAa,SAAS,KAAK;AACxD,kBAAc,CAAC,mBAAmB;AAChC,YAAM,QAAQ,KAAK,KAAK,SAAS,eAAe;AAChD,mBAAa;AACb,aAAO;AAAA,WACF;AAAA,QACH,MAAM,KAAK,IAAI,KAAK,IAAI,MAAM,IAAI;AAAA;AAAA;AAAA;AAKxC,SAAO;AAAA,IACL,OAAO;AAAA,MACL;AAAA;AAAA,IAEF,SAAS;AAAA,MACP;AAAA,MACA;AAAA;AAAA;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
-
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(module2))
|
|
15
|
-
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
-
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return target;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (module2, isNodeMode) => {
|
|
21
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
-
return (module2, temp) => {
|
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
-
};
|
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
-
var ResizablePlugin_exports = {};
|
|
29
|
-
__export(ResizablePlugin_exports, {
|
|
30
|
-
ResizablePlugin: () => ResizablePlugin
|
|
31
|
-
});
|
|
32
|
-
var React = __toESM(require("react"));
|
|
33
|
-
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
34
|
-
var import_createInstancePlugin = require("@elliemae/ds-shared/createDataInstance/createInstancePlugin");
|
|
35
|
-
var import_decorateResizable = require("./decorateResizable");
|
|
36
|
-
const noop = () => null;
|
|
37
|
-
const DELTA_LAST_COLUMN = 25;
|
|
38
|
-
const decorateColumn = (column, grid, index) => {
|
|
39
|
-
const {
|
|
40
|
-
onResizeEnd = noop,
|
|
41
|
-
onResizeStart = noop,
|
|
42
|
-
minColumnWidth = 90,
|
|
43
|
-
isColumnResizeActive = (col) => col.resizable && !col.expandableColumn,
|
|
44
|
-
onColumnResize
|
|
45
|
-
} = grid.props;
|
|
46
|
-
const { decoratedColumns } = grid.getInstance();
|
|
47
|
-
const colIndex = decoratedColumns.findIndex((col) => col.property === column.property);
|
|
48
|
-
const isLast = colIndex === decoratedColumns.length - 1;
|
|
49
|
-
if (!isColumnResizeActive(column))
|
|
50
|
-
return column;
|
|
51
|
-
return (0, import_decorateResizable.addResizableToColumn)(column, (0, import_decorateResizable.resizableFormatter)({
|
|
52
|
-
onDragStart: () => {
|
|
53
|
-
grid.isDragging.current = true;
|
|
54
|
-
grid.disableEvents();
|
|
55
|
-
onResizeStart();
|
|
56
|
-
onColumnResize("onResizeStart", { column });
|
|
57
|
-
},
|
|
58
|
-
onDrag: (width, increasing) => {
|
|
59
|
-
const { resizedColumns, refs } = grid.getInstance();
|
|
60
|
-
if (isLast && increasing) {
|
|
61
|
-
const thisCol = resizedColumns.current[column.uuid] || 0;
|
|
62
|
-
width = Math.max(thisCol + DELTA_LAST_COLUMN, width);
|
|
63
|
-
}
|
|
64
|
-
column.updateBodyHeaderWidth(width, width);
|
|
65
|
-
grid.updateRowWidth();
|
|
66
|
-
if (isLast && increasing) {
|
|
67
|
-
refs.header.current.scrollLeft += DELTA_LAST_COLUMN;
|
|
68
|
-
refs.body.current.scrollLeft += DELTA_LAST_COLUMN;
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
onDragEnd: (width, increasing, extraData) => {
|
|
72
|
-
const { resizedColumns } = grid.getInstance();
|
|
73
|
-
if (isLast && increasing) {
|
|
74
|
-
const thisCol = resizedColumns.current[column.uuid] || 0;
|
|
75
|
-
width = Math.max(thisCol + DELTA_LAST_COLUMN, width);
|
|
76
|
-
}
|
|
77
|
-
resizedColumns.current[column.uuid] = width;
|
|
78
|
-
grid.isDragging.current = false;
|
|
79
|
-
grid.enableEvents();
|
|
80
|
-
try {
|
|
81
|
-
const total = grid.getInstance().refs.body.current.scrollWidth;
|
|
82
|
-
const sum = Object.keys(grid.resizedColumns.current).reduce((p, n) => grid.resizedColumns.current[n] + p, 0);
|
|
83
|
-
const lastKey = grid.decoratedColumns[grid.columns.length - 1].uuid;
|
|
84
|
-
if (sum < total) {
|
|
85
|
-
const lastCol = grid.getInstance().columnSizeService.columns[lastKey];
|
|
86
|
-
lastCol.updateWidth(grid.resizedColumns.current[lastKey] + total - sum);
|
|
87
|
-
lastCol.updateBodyHeaderWidth(grid.resizedColumns.current[lastKey] + total - sum);
|
|
88
|
-
grid.getInstance().columnSizeService.updateMissingWidths(total);
|
|
89
|
-
}
|
|
90
|
-
} catch (error) {
|
|
91
|
-
console.error("Unexpected error in the addResizableToColumn trying to use the remaining grid space to the last column", error);
|
|
92
|
-
}
|
|
93
|
-
onColumnResize("onResizeEnd", {
|
|
94
|
-
column,
|
|
95
|
-
width,
|
|
96
|
-
extraData
|
|
97
|
-
});
|
|
98
|
-
(0, import_ds_utilities.runAll)(onResizeEnd)(width, extraData);
|
|
99
|
-
grid.updateRowWidth();
|
|
100
|
-
},
|
|
101
|
-
minWidth: (column.minWidth || minColumnWidth) - (isLast ? DELTA_LAST_COLUMN : 0),
|
|
102
|
-
isLast
|
|
103
|
-
}));
|
|
104
|
-
};
|
|
105
|
-
const ResizablePlugin = (0, import_createInstancePlugin.createInstancePlugin)("resizable", {
|
|
106
|
-
decorateColumn
|
|
107
|
-
});
|
|
108
|
-
module.exports = __toCommonJS(ResizablePlugin_exports);
|
|
109
|
-
//# sourceMappingURL=ResizablePlugin.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/plugins/resizable/ResizablePlugin.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable no-param-reassign */\n/* eslint-disable max-statements */\nimport { runAll } from '@elliemae/ds-utilities';\nimport { createInstancePlugin } from '@elliemae/ds-shared/createDataInstance/createInstancePlugin';\nimport { addResizableToColumn, resizableFormatter } from './decorateResizable';\n\nconst noop = () => null;\n\nconst DELTA_LAST_COLUMN = 25;\n\n// eslint-disable-next-line no-unused-vars\nconst decorateColumn = (column, grid, index) => {\n const {\n onResizeEnd = noop,\n onResizeStart = noop,\n minColumnWidth = 90,\n isColumnResizeActive = (col) => col.resizable && !col.expandableColumn,\n onColumnResize,\n } = grid.props;\n\n const { decoratedColumns } = grid.getInstance();\n // need to do this because the decorated columns which the index in the function call\n // could be different from the final decorated columns because a plugin could add a\n // column afterwards\n const colIndex = decoratedColumns.findIndex((col) => col.property === column.property);\n const isLast = colIndex === decoratedColumns.length - 1;\n\n if (!isColumnResizeActive(column)) return column;\n return addResizableToColumn(\n column,\n resizableFormatter({\n onDragStart: () => {\n grid.isDragging.current = true;\n grid.disableEvents();\n onResizeStart();\n onColumnResize('onResizeStart', { column });\n },\n onDrag: (width, increasing) => {\n const { resizedColumns, refs } = grid.getInstance();\n if (isLast && increasing) {\n const thisCol = resizedColumns.current[column.uuid] || 0;\n width = Math.max(thisCol + DELTA_LAST_COLUMN, width);\n }\n column.updateBodyHeaderWidth(width, width);\n grid.updateRowWidth();\n if (isLast && increasing) {\n // TODO: Move this to packages/ds-shared/src/ScrollSync/ScrollSync.js\n // It isn't watching the scrollLeft so you have to move both at the same time\n refs.header.current.scrollLeft += DELTA_LAST_COLUMN;\n refs.body.current.scrollLeft += DELTA_LAST_COLUMN;\n }\n },\n onDragEnd: (width, increasing, extraData) => {\n const { resizedColumns } = grid.getInstance();\n if (isLast && increasing) {\n const thisCol = resizedColumns.current[column.uuid] || 0;\n width = Math.max(thisCol + DELTA_LAST_COLUMN, width);\n }\n resizedColumns.current[column.uuid] = width;\n\n grid.isDragging.current = false;\n grid.enableEvents();\n try {\n const total = grid.getInstance().refs.body.current.scrollWidth;\n const sum = Object.keys(grid.resizedColumns.current).reduce((p, n) => grid.resizedColumns.current[n] + p, 0);\n const lastKey = grid.decoratedColumns[grid.columns.length - 1].uuid;\n if (sum < total) {\n const lastCol = grid.getInstance().columnSizeService.columns[lastKey];\n lastCol.updateWidth(grid.resizedColumns.current[lastKey] + total - sum);\n lastCol.updateBodyHeaderWidth(grid.resizedColumns.current[lastKey] + total - sum);\n grid.getInstance().columnSizeService.updateMissingWidths(total);\n }\n } catch (error) {\n console.error(\n 'Unexpected error in the addResizableToColumn trying to use the remaining grid space to the last column',\n error,\n );\n }\n\n onColumnResize('onResizeEnd', {\n column,\n width,\n extraData,\n });\n runAll(onResizeEnd)(width, extraData);\n grid.updateRowWidth();\n },\n minWidth: (column.minWidth || minColumnWidth) - (isLast ? DELTA_LAST_COLUMN : 0),\n isLast,\n }),\n );\n};\n\nexport const ResizablePlugin = createInstancePlugin('resizable', {\n decorateColumn,\n});\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,0BAAuB;AACvB,kCAAqC;AACrC,+BAAyD;AAEzD,MAAM,OAAO,MAAM;AAEnB,MAAM,oBAAoB;AAG1B,MAAM,iBAAiB,CAAC,QAAQ,MAAM,UAAU;AAC9C,QAAM;AAAA,IACJ,cAAc;AAAA,IACd,gBAAgB;AAAA,IAChB,iBAAiB;AAAA,IACjB,uBAAuB,CAAC,QAAQ,IAAI,aAAa,CAAC,IAAI;AAAA,IACtD;AAAA,MACE,KAAK;AAET,QAAM,EAAE,qBAAqB,KAAK;AAIlC,QAAM,WAAW,iBAAiB,UAAU,CAAC,QAAQ,IAAI,aAAa,OAAO;AAC7E,QAAM,SAAS,aAAa,iBAAiB,SAAS;AAEtD,MAAI,CAAC,qBAAqB;AAAS,WAAO;AAC1C,SAAO,mDACL,QACA,iDAAmB;AAAA,IACjB,aAAa,MAAM;AACjB,WAAK,WAAW,UAAU;AAC1B,WAAK;AACL;AACA,qBAAe,iBAAiB,EAAE;AAAA;AAAA,IAEpC,QAAQ,CAAC,OAAO,eAAe;AAC7B,YAAM,EAAE,gBAAgB,SAAS,KAAK;AACtC,UAAI,UAAU,YAAY;AACxB,cAAM,UAAU,eAAe,QAAQ,OAAO,SAAS;AACvD,gBAAQ,KAAK,IAAI,UAAU,mBAAmB;AAAA;AAEhD,aAAO,sBAAsB,OAAO;AACpC,WAAK;AACL,UAAI,UAAU,YAAY;AAGxB,aAAK,OAAO,QAAQ,cAAc;AAClC,aAAK,KAAK,QAAQ,cAAc;AAAA;AAAA;AAAA,IAGpC,WAAW,CAAC,OAAO,YAAY,cAAc;AAC3C,YAAM,EAAE,mBAAmB,KAAK;AAChC,UAAI,UAAU,YAAY;AACxB,cAAM,UAAU,eAAe,QAAQ,OAAO,SAAS;AACvD,gBAAQ,KAAK,IAAI,UAAU,mBAAmB;AAAA;AAEhD,qBAAe,QAAQ,OAAO,QAAQ;AAEtC,WAAK,WAAW,UAAU;AAC1B,WAAK;AACL,UAAI;AACF,cAAM,QAAQ,KAAK,cAAc,KAAK,KAAK,QAAQ;AACnD,cAAM,MAAM,OAAO,KAAK,KAAK,eAAe,SAAS,OAAO,CAAC,GAAG,MAAM,KAAK,eAAe,QAAQ,KAAK,GAAG;AAC1G,cAAM,UAAU,KAAK,iBAAiB,KAAK,QAAQ,SAAS,GAAG;AAC/D,YAAI,MAAM,OAAO;AACf,gBAAM,UAAU,KAAK,cAAc,kBAAkB,QAAQ;AAC7D,kBAAQ,YAAY,KAAK,eAAe,QAAQ,WAAW,QAAQ;AACnE,kBAAQ,sBAAsB,KAAK,eAAe,QAAQ,WAAW,QAAQ;AAC7E,eAAK,cAAc,kBAAkB,oBAAoB;AAAA;AAAA,eAEpD,OAAP;AACA,gBAAQ,MACN,0GACA;AAAA;AAIJ,qBAAe,eAAe;AAAA,QAC5B;AAAA,QACA;AAAA,QACA;AAAA;AAEF,sCAAO,aAAa,OAAO;AAC3B,WAAK;AAAA;AAAA,IAEP,UAAW,QAAO,YAAY,kBAAmB,UAAS,oBAAoB;AAAA,IAC9E;AAAA;AAAA;AAKC,MAAM,kBAAkB,sDAAqB,aAAa;AAAA,EAC/D;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
-
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(module2))
|
|
15
|
-
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
-
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return target;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (module2, isNodeMode) => {
|
|
21
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
-
return (module2, temp) => {
|
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
-
};
|
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
-
var decorateResizable_exports = {};
|
|
29
|
-
__export(decorateResizable_exports, {
|
|
30
|
-
addResizableToColumn: () => addResizableToColumn,
|
|
31
|
-
resizableFormatter: () => resizableFormatter
|
|
32
|
-
});
|
|
33
|
-
var React = __toESM(require("react"));
|
|
34
|
-
var import_react = __toESM(require("react"));
|
|
35
|
-
var import_initColumnDefinition = require("@elliemae/ds-shared/useDataGrid/initColumnDefinition");
|
|
36
|
-
var import_useResizeHandle = require("./useResizeHandle");
|
|
37
|
-
const addResizableToColumn = (column, formatter) => (0, import_initColumnDefinition.appendHeaderFormatter)(formatter, column);
|
|
38
|
-
const ResizableWrapper = import_react.default.memo(({ value, onDrag, onDragEnd, onDragStart, minWidth, handleClassName }) => {
|
|
39
|
-
const { containerRef, Handle } = (0, import_useResizeHandle.useResizeHandle)({
|
|
40
|
-
onDrag,
|
|
41
|
-
onDragEnd,
|
|
42
|
-
onDragStart,
|
|
43
|
-
minWidth,
|
|
44
|
-
handleClassName
|
|
45
|
-
});
|
|
46
|
-
return /* @__PURE__ */ import_react.default.createElement("div", {
|
|
47
|
-
ref: containerRef,
|
|
48
|
-
className: "resize-container"
|
|
49
|
-
}, value, /* @__PURE__ */ import_react.default.createElement(Handle, null));
|
|
50
|
-
});
|
|
51
|
-
const resizableFormatter = (options) => (value) => /* @__PURE__ */ import_react.default.createElement(ResizableWrapper, {
|
|
52
|
-
...options,
|
|
53
|
-
value
|
|
54
|
-
});
|
|
55
|
-
module.exports = __toCommonJS(decorateResizable_exports);
|
|
56
|
-
//# sourceMappingURL=decorateResizable.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/plugins/resizable/decorateResizable.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { appendHeaderFormatter } from '@elliemae/ds-shared/useDataGrid/initColumnDefinition';\nimport { useResizeHandle } from './useResizeHandle';\n\nconst addResizableToColumn = (column, formatter) =>\n appendHeaderFormatter(formatter, column);\n\nconst ResizableWrapper = React.memo(\n ({ value, onDrag, onDragEnd, onDragStart, minWidth, handleClassName }) => {\n const { containerRef, Handle } = useResizeHandle({\n onDrag,\n onDragEnd,\n onDragStart,\n minWidth,\n handleClassName,\n });\n return (\n <div ref={containerRef} className=\"resize-container\">\n {value}\n <Handle />\n </div>\n );\n },\n);\n\n// eslint-disable-next-line react/display-name\nconst resizableFormatter = options => value => (\n <ResizableWrapper {...options} value={value} />\n);\n\nexport { addResizableToColumn, resizableFormatter };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,kCAAsC;AACtC,6BAAgC;AAEhC,MAAM,uBAAuB,CAAC,QAAQ,cACpC,uDAAsB,WAAW;AAEnC,MAAM,mBAAmB,qBAAM,KAC7B,CAAC,EAAE,OAAO,QAAQ,WAAW,aAAa,UAAU,sBAAsB;AACxE,QAAM,EAAE,cAAc,WAAW,4CAAgB;AAAA,IAC/C;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAEF,SACE,mDAAC,OAAD;AAAA,IAAK,KAAK;AAAA,IAAc,WAAU;AAAA,KAC/B,OACD,mDAAC,QAAD;AAAA;AAOR,MAAM,qBAAqB,aAAW,WACpC,mDAAC,kBAAD;AAAA,KAAsB;AAAA,EAAS;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
-
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(module2))
|
|
15
|
-
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
-
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return target;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (module2, isNodeMode) => {
|
|
21
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
-
return (module2, temp) => {
|
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
-
};
|
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
-
var resizable_exports = {};
|
|
29
|
-
__export(resizable_exports, {
|
|
30
|
-
ResizablePlugin: () => import_ResizablePlugin.ResizablePlugin
|
|
31
|
-
});
|
|
32
|
-
var React = __toESM(require("react"));
|
|
33
|
-
var import_ResizablePlugin = require("./ResizablePlugin");
|
|
34
|
-
module.exports = __toCommonJS(resizable_exports);
|
|
35
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/plugins/resizable/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export { ResizablePlugin } from './ResizablePlugin';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,6BAAgC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
-
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(module2))
|
|
15
|
-
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
-
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return target;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (module2, isNodeMode) => {
|
|
21
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
-
return (module2, temp) => {
|
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
-
};
|
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
-
var useResizeHandle_exports = {};
|
|
29
|
-
__export(useResizeHandle_exports, {
|
|
30
|
-
useResizeHandle: () => useResizeHandle
|
|
31
|
-
});
|
|
32
|
-
var React = __toESM(require("react"));
|
|
33
|
-
var import_react = __toESM(require("react"));
|
|
34
|
-
const useResizeHandle = ({
|
|
35
|
-
onDragStart,
|
|
36
|
-
onDrag,
|
|
37
|
-
onDragEnd,
|
|
38
|
-
minWidth = 10,
|
|
39
|
-
isLast = false
|
|
40
|
-
}) => {
|
|
41
|
-
const startX = (0, import_react.useRef)();
|
|
42
|
-
const startWidth = (0, import_react.useRef)();
|
|
43
|
-
const containerRef = (0, import_react.useRef)();
|
|
44
|
-
const triggerMove = (handler, event) => {
|
|
45
|
-
const increasing = startX.current - event.clientX < 0;
|
|
46
|
-
handler(Math.max(startWidth.current - startX.current + event.clientX, minWidth), increasing, {});
|
|
47
|
-
};
|
|
48
|
-
const onMouseMove = (event) => {
|
|
49
|
-
event.stopPropagation();
|
|
50
|
-
event.preventDefault();
|
|
51
|
-
triggerMove(onDrag, event);
|
|
52
|
-
};
|
|
53
|
-
const onMouseUp = (event) => {
|
|
54
|
-
event.stopPropagation();
|
|
55
|
-
event.preventDefault();
|
|
56
|
-
triggerMove(onDragEnd, event);
|
|
57
|
-
document.removeEventListener("mousemove", onMouseMove);
|
|
58
|
-
document.removeEventListener("mouseup", onMouseUp);
|
|
59
|
-
};
|
|
60
|
-
const onMouseDown = (event) => {
|
|
61
|
-
event.stopPropagation();
|
|
62
|
-
event.preventDefault();
|
|
63
|
-
document.addEventListener("mousemove", onMouseMove);
|
|
64
|
-
document.addEventListener("mouseup", onMouseUp);
|
|
65
|
-
startX.current = event.clientX;
|
|
66
|
-
startWidth.current = containerRef.current.offsetWidth;
|
|
67
|
-
triggerMove(onDragStart, event);
|
|
68
|
-
};
|
|
69
|
-
const HandleComponent = ({ className = "resize-handle" }) => /* @__PURE__ */ import_react.default.createElement("div", {
|
|
70
|
-
className,
|
|
71
|
-
onMouseDown
|
|
72
|
-
});
|
|
73
|
-
return {
|
|
74
|
-
containerRef,
|
|
75
|
-
Handle: HandleComponent
|
|
76
|
-
};
|
|
77
|
-
};
|
|
78
|
-
module.exports = __toCommonJS(useResizeHandle_exports);
|
|
79
|
-
//# sourceMappingURL=useResizeHandle.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/plugins/resizable/useResizeHandle.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React, { useCallback, useRef } from 'react';\n\nexport const useResizeHandle = ({\n onDragStart,\n onDrag,\n onDragEnd,\n minWidth = 10,\n isLast = false,\n}) => {\n const startX = useRef();\n const startWidth = useRef();\n const containerRef = useRef();\n\n const triggerMove = (handler, event) => {\n const increasing = startX.current - event.clientX < 0;\n handler(\n Math.max(startWidth.current - startX.current + event.clientX, minWidth),\n increasing,\n {},\n );\n };\n\n const onMouseMove = event => {\n event.stopPropagation();\n event.preventDefault();\n\n triggerMove(onDrag, event);\n };\n\n const onMouseUp = event => {\n event.stopPropagation();\n event.preventDefault();\n\n triggerMove(onDragEnd, event);\n\n document.removeEventListener('mousemove', onMouseMove);\n document.removeEventListener('mouseup', onMouseUp);\n };\n\n const onMouseDown = event => {\n event.stopPropagation();\n event.preventDefault();\n\n document.addEventListener('mousemove', onMouseMove);\n document.addEventListener('mouseup', onMouseUp);\n\n startX.current = event.clientX;\n startWidth.current = containerRef.current.offsetWidth;\n\n triggerMove(onDragStart, event);\n };\n\n const HandleComponent = ({ className = 'resize-handle' }) => (\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n <div className={className} onMouseDown={onMouseDown} />\n );\n\n return {\n containerRef,\n Handle: HandleComponent,\n };\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAA2C;AAEpC,MAAM,kBAAkB,CAAC;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX,SAAS;AAAA,MACL;AACJ,QAAM,SAAS;AACf,QAAM,aAAa;AACnB,QAAM,eAAe;AAErB,QAAM,cAAc,CAAC,SAAS,UAAU;AACtC,UAAM,aAAa,OAAO,UAAU,MAAM,UAAU;AACpD,YACE,KAAK,IAAI,WAAW,UAAU,OAAO,UAAU,MAAM,SAAS,WAC9D,YACA;AAAA;AAIJ,QAAM,cAAc,WAAS;AAC3B,UAAM;AACN,UAAM;AAEN,gBAAY,QAAQ;AAAA;AAGtB,QAAM,YAAY,WAAS;AACzB,UAAM;AACN,UAAM;AAEN,gBAAY,WAAW;AAEvB,aAAS,oBAAoB,aAAa;AAC1C,aAAS,oBAAoB,WAAW;AAAA;AAG1C,QAAM,cAAc,WAAS;AAC3B,UAAM;AACN,UAAM;AAEN,aAAS,iBAAiB,aAAa;AACvC,aAAS,iBAAiB,WAAW;AAErC,WAAO,UAAU,MAAM;AACvB,eAAW,UAAU,aAAa,QAAQ;AAE1C,gBAAY,aAAa;AAAA;AAG3B,QAAM,kBAAkB,CAAC,EAAE,YAAY,sBAErC,mDAAC,OAAD;AAAA,IAAK;AAAA,IAAsB;AAAA;AAG7B,SAAO;AAAA,IACL;AAAA,IACA,QAAQ;AAAA;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
-
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(module2))
|
|
15
|
-
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
-
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return target;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (module2, isNodeMode) => {
|
|
21
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
-
return (module2, temp) => {
|
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
-
};
|
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
-
var utils_exports = {};
|
|
29
|
-
__export(utils_exports, {
|
|
30
|
-
isPercentNumber: () => isPercentNumber,
|
|
31
|
-
isPxNumber: () => isPxNumber,
|
|
32
|
-
translatePercentageToPx: () => translatePercentageToPx
|
|
33
|
-
});
|
|
34
|
-
var React = __toESM(require("react"));
|
|
35
|
-
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
36
|
-
var import_memoize_one = __toESM(require("memoize-one"));
|
|
37
|
-
const isPercentNumber = (stringNumber) => typeof stringNumber === "string" && stringNumber.indexOf("%") !== -1;
|
|
38
|
-
const isPxNumber = (stringNumber) => typeof stringNumber === "string" && stringNumber.indexOf("px") !== -1;
|
|
39
|
-
const translatePercentageToPx = (0, import_memoize_one.default)((totalWidth, percentage, minWidth = 0) => {
|
|
40
|
-
const parsedPercentatge = (0, import_ds_utilities.parseInt)(percentage.replace("%", ""));
|
|
41
|
-
const width = totalWidth * parsedPercentatge / 100;
|
|
42
|
-
return width > minWidth ? width : minWidth;
|
|
43
|
-
});
|
|
44
|
-
const translateStringPxToNumberPx = (0, import_memoize_one.default)((pxNumber) => (0, import_ds_utilities.parseInt)(pxNumber.replace("%", "")));
|
|
45
|
-
const translatePxToPercentage = (0, import_memoize_one.default)((totalWidth, pxWidth) => `${pxWidth / totalWidth * 100}%`);
|
|
46
|
-
const getWidth = (0, import_memoize_one.default)((gridWidth, width = 0, minWidth) => {
|
|
47
|
-
if (isPercentNumber(width))
|
|
48
|
-
return translatePercentageToPx(gridWidth, width, minWidth);
|
|
49
|
-
if (isPxNumber(width))
|
|
50
|
-
return translateStringPxToNumberPx(width);
|
|
51
|
-
return width;
|
|
52
|
-
});
|
|
53
|
-
module.exports = __toCommonJS(utils_exports);
|
|
54
|
-
//# sourceMappingURL=utils.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/plugins/resizable/utils.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { parseInt } from '@elliemae/ds-utilities';\nimport memoizeOne from 'memoize-one';\n\nexport const isPercentNumber = (stringNumber) => typeof stringNumber === 'string' && stringNumber.indexOf('%') !== -1;\nexport const isPxNumber = (stringNumber) => typeof stringNumber === 'string' && stringNumber.indexOf('px') !== -1;\n\nexport const translatePercentageToPx = memoizeOne((totalWidth, percentage, minWidth = 0) => {\n const parsedPercentatge = parseInt(percentage.replace('%', ''));\n const width = (totalWidth * parsedPercentatge) / 100;\n return width > minWidth ? width : minWidth;\n});\n\nconst translateStringPxToNumberPx = memoizeOne((pxNumber) => parseInt(pxNumber.replace('%', '')));\nconst translatePxToPercentage = memoizeOne((totalWidth, pxWidth) => `${(pxWidth / totalWidth) * 100}%`);\n\nconst getWidth = memoizeOne((gridWidth, width = 0, minWidth) => {\n if (isPercentNumber(width)) return translatePercentageToPx(gridWidth, width, minWidth);\n if (isPxNumber(width)) return translateStringPxToNumberPx(width);\n return width;\n});\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAAyB;AACzB,yBAAuB;AAEhB,MAAM,kBAAkB,CAAC,iBAAiB,OAAO,iBAAiB,YAAY,aAAa,QAAQ,SAAS;AAC5G,MAAM,aAAa,CAAC,iBAAiB,OAAO,iBAAiB,YAAY,aAAa,QAAQ,UAAU;AAExG,MAAM,0BAA0B,gCAAW,CAAC,YAAY,YAAY,WAAW,MAAM;AAC1F,QAAM,oBAAoB,kCAAS,WAAW,QAAQ,KAAK;AAC3D,QAAM,QAAS,aAAa,oBAAqB;AACjD,SAAO,QAAQ,WAAW,QAAQ;AAAA;AAGpC,MAAM,8BAA8B,gCAAW,CAAC,aAAa,kCAAS,SAAS,QAAQ,KAAK;AAC5F,MAAM,0BAA0B,gCAAW,CAAC,YAAY,YAAY,GAAI,UAAU,aAAc;AAEhG,MAAM,WAAW,gCAAW,CAAC,WAAW,QAAQ,GAAG,aAAa;AAC9D,MAAI,gBAAgB;AAAQ,WAAO,wBAAwB,WAAW,OAAO;AAC7E,MAAI,WAAW;AAAQ,WAAO,4BAA4B;AAC1D,SAAO;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
-
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(module2))
|
|
15
|
-
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
-
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return target;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (module2, isNodeMode) => {
|
|
21
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
-
return (module2, temp) => {
|
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
-
};
|
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
-
var DndRowsPlugin_exports = {};
|
|
29
|
-
__export(DndRowsPlugin_exports, {
|
|
30
|
-
DndRowsPlugin: () => DndRowsPlugin
|
|
31
|
-
});
|
|
32
|
-
var React = __toESM(require("react"));
|
|
33
|
-
var import_react = __toESM(require("react"));
|
|
34
|
-
var import_react_sortable_hoc = require("react-sortable-hoc");
|
|
35
|
-
var import_ds_icons = require("@elliemae/ds-icons");
|
|
36
|
-
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
37
|
-
var import_initColumnDefinition = require("@elliemae/ds-shared/useDataGrid/initColumnDefinition");
|
|
38
|
-
var import_createInstancePlugin = require("@elliemae/ds-shared/createDataInstance/createInstancePlugin");
|
|
39
|
-
const keysToOmit = [
|
|
40
|
-
"axis",
|
|
41
|
-
"contentWindow",
|
|
42
|
-
"disableAutoscroll",
|
|
43
|
-
"distance",
|
|
44
|
-
"getContainer",
|
|
45
|
-
"getHelperDimensions",
|
|
46
|
-
"helperClass",
|
|
47
|
-
"helperContainer",
|
|
48
|
-
"hideSortableGhost",
|
|
49
|
-
"keyboardSortingTransitionDuration",
|
|
50
|
-
"lockAxis",
|
|
51
|
-
"lockOffset",
|
|
52
|
-
"lockToContainerEdges",
|
|
53
|
-
"onSortEnd",
|
|
54
|
-
"onSortMove",
|
|
55
|
-
"onSortOver",
|
|
56
|
-
"onSortStart",
|
|
57
|
-
"pressDelay",
|
|
58
|
-
"pressThreshold",
|
|
59
|
-
"shouldCancelStart",
|
|
60
|
-
"transitionDuration",
|
|
61
|
-
"updateBeforeSortStart",
|
|
62
|
-
"useDragHandle",
|
|
63
|
-
"useWindowAsScrollContainer"
|
|
64
|
-
];
|
|
65
|
-
const DragHandle = (0, import_react_sortable_hoc.SortableHandle)(() => /* @__PURE__ */ import_react.default.createElement(import_ds_icons.GripperVertical, {
|
|
66
|
-
className: "drag-handle"
|
|
67
|
-
}));
|
|
68
|
-
const translateDnDData = ({ oldIndex, newIndex, index }) => ({
|
|
69
|
-
sourceIndex: oldIndex,
|
|
70
|
-
targetIndex: newIndex,
|
|
71
|
-
fromIndex: index === void 0 ? oldIndex : index
|
|
72
|
-
});
|
|
73
|
-
const decorateColumns = (columns) => {
|
|
74
|
-
const dragColumn = {
|
|
75
|
-
property: "drag",
|
|
76
|
-
label: "",
|
|
77
|
-
visible: true,
|
|
78
|
-
width: 24,
|
|
79
|
-
minWidth: 24,
|
|
80
|
-
special: true
|
|
81
|
-
};
|
|
82
|
-
return [
|
|
83
|
-
(0, import_initColumnDefinition.appendCellFormatter)(() => /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(DragHandle, null)), dragColumn),
|
|
84
|
-
...columns
|
|
85
|
-
];
|
|
86
|
-
};
|
|
87
|
-
const getBodyProps = (props, grid) => {
|
|
88
|
-
const { onMoveRowEnd, onReorder, onMoveRowStart } = grid.props;
|
|
89
|
-
return {
|
|
90
|
-
...props,
|
|
91
|
-
onSortEnd: (data) => {
|
|
92
|
-
grid.enableEvents();
|
|
93
|
-
grid.setIsRowDragging(false);
|
|
94
|
-
onMoveRowEnd(translateDnDData(data));
|
|
95
|
-
},
|
|
96
|
-
onSortStart: (...args) => {
|
|
97
|
-
grid.disableEvents();
|
|
98
|
-
grid.setIsRowDragging(true);
|
|
99
|
-
onMoveRowStart(...args);
|
|
100
|
-
},
|
|
101
|
-
onSortOver: (data) => {
|
|
102
|
-
onReorder(translateDnDData(data));
|
|
103
|
-
},
|
|
104
|
-
lockAxis: "y",
|
|
105
|
-
useDragHandle: true,
|
|
106
|
-
helperClass: "row-drag-helper",
|
|
107
|
-
getContainer: () => new Promise((resolve) => {
|
|
108
|
-
setTimeout(() => {
|
|
109
|
-
resolve(grid.refs.innerBody.current || grid.refs.body.current);
|
|
110
|
-
}, 100);
|
|
111
|
-
})
|
|
112
|
-
};
|
|
113
|
-
};
|
|
114
|
-
const decorateRenderers = (renderers) => {
|
|
115
|
-
const RowComponent = renderers.body.row;
|
|
116
|
-
const BodyWrapperComponent = renderers.body.wrapper;
|
|
117
|
-
const Row = (0, import_react.useMemo)(() => (0, import_react_sortable_hoc.SortableElement)(RowComponent), []);
|
|
118
|
-
const BodyWrapper = (0, import_react.useMemo)(() => (0, import_react_sortable_hoc.SortableContainer)((props) => /* @__PURE__ */ import_react.default.createElement(BodyWrapperComponent, {
|
|
119
|
-
...(0, import_ds_utilities.omit)(props, keysToOmit)
|
|
120
|
-
})), []);
|
|
121
|
-
return {
|
|
122
|
-
...renderers,
|
|
123
|
-
body: {
|
|
124
|
-
...renderers.body,
|
|
125
|
-
wrapper: BodyWrapper,
|
|
126
|
-
row: Row
|
|
127
|
-
}
|
|
128
|
-
};
|
|
129
|
-
};
|
|
130
|
-
const DndRowsPlugin = (0, import_createInstancePlugin.createInstancePlugin)("dnd-rows", {
|
|
131
|
-
decorateColumns,
|
|
132
|
-
getBodyProps,
|
|
133
|
-
decorateRenderers
|
|
134
|
-
});
|
|
135
|
-
module.exports = __toCommonJS(DndRowsPlugin_exports);
|
|
136
|
-
//# sourceMappingURL=DndRowsPlugin.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/plugins/row-dnd/DndRowsPlugin.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable react-hooks/rules-of-hooks */\nimport React, { useMemo } from 'react';\nimport { SortableElement, SortableContainer, SortableHandle } from 'react-sortable-hoc';\nimport { GripperVertical } from '@elliemae/ds-icons';\nimport { omit } from '@elliemae/ds-utilities';\nimport { appendCellFormatter } from '@elliemae/ds-shared/useDataGrid/initColumnDefinition';\nimport { createInstancePlugin } from '@elliemae/ds-shared/createDataInstance/createInstancePlugin';\n\n// todo: remove once it's fixed in react-sortable-hoc library\nconst keysToOmit = [\n 'axis',\n 'contentWindow',\n 'disableAutoscroll',\n 'distance',\n 'getContainer',\n 'getHelperDimensions',\n 'helperClass',\n 'helperContainer',\n 'hideSortableGhost',\n 'keyboardSortingTransitionDuration',\n 'lockAxis',\n 'lockOffset',\n 'lockToContainerEdges',\n 'onSortEnd',\n 'onSortMove',\n 'onSortOver',\n 'onSortStart',\n 'pressDelay',\n 'pressThreshold',\n 'shouldCancelStart',\n 'transitionDuration',\n 'updateBeforeSortStart',\n 'useDragHandle',\n 'useWindowAsScrollContainer',\n];\n\nconst DragHandle = SortableHandle(() => <GripperVertical className=\"drag-handle\" />);\n\nconst translateDnDData = ({ oldIndex, newIndex, index }) => ({\n sourceIndex: oldIndex,\n targetIndex: newIndex,\n fromIndex: index === undefined ? oldIndex : index,\n});\n\nconst decorateColumns = (columns) => {\n const dragColumn = {\n property: 'drag',\n label: '',\n visible: true,\n width: 24,\n minWidth: 24,\n special: true,\n };\n return [\n appendCellFormatter(\n () => (\n <>\n <DragHandle />\n </>\n ),\n dragColumn,\n ),\n ...columns,\n ];\n};\n\nconst getBodyProps = (props, grid) => {\n const { onMoveRowEnd, onReorder, onMoveRowStart } = grid.props;\n return {\n ...props,\n onSortEnd: (data) => {\n grid.enableEvents();\n grid.setIsRowDragging(false);\n onMoveRowEnd(translateDnDData(data));\n },\n onSortStart: (...args) => {\n grid.disableEvents();\n grid.setIsRowDragging(true);\n onMoveRowStart(...args);\n },\n onSortOver: (data) => {\n onReorder(translateDnDData(data));\n },\n lockAxis: 'y',\n useDragHandle: true,\n helperClass: 'row-drag-helper',\n // a promise is needed, since sortable it's mounted before it's container\n getContainer: () =>\n new Promise((resolve) => {\n setTimeout(() => {\n resolve(grid.refs.innerBody.current || grid.refs.body.current);\n }, 100);\n }),\n };\n};\n\nconst decorateRenderers = (renderers) => {\n const RowComponent = renderers.body.row;\n const BodyWrapperComponent = renderers.body.wrapper;\n\n const Row = useMemo(() => SortableElement(RowComponent), []);\n\n const BodyWrapper = useMemo(\n () => SortableContainer((props) => <BodyWrapperComponent {...omit(props, keysToOmit)} />),\n [],\n );\n\n return {\n ...renderers,\n body: {\n ...renderers.body,\n wrapper: BodyWrapper,\n row: Row,\n },\n };\n};\n\nexport const DndRowsPlugin = createInstancePlugin('dnd-rows', {\n decorateColumns,\n getBodyProps,\n decorateRenderers,\n});\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,mBAA+B;AAC/B,gCAAmE;AACnE,sBAAgC;AAChC,0BAAqB;AACrB,kCAAoC;AACpC,kCAAqC;AAGrC,MAAM,aAAa;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAGF,MAAM,aAAa,8CAAe,MAAM,mDAAC,iCAAD;AAAA,EAAiB,WAAU;AAAA;AAEnE,MAAM,mBAAmB,CAAC,EAAE,UAAU,UAAU,YAAa;AAAA,EAC3D,aAAa;AAAA,EACb,aAAa;AAAA,EACb,WAAW,UAAU,SAAY,WAAW;AAAA;AAG9C,MAAM,kBAAkB,CAAC,YAAY;AACnC,QAAM,aAAa;AAAA,IACjB,UAAU;AAAA,IACV,OAAO;AAAA,IACP,SAAS;AAAA,IACT,OAAO;AAAA,IACP,UAAU;AAAA,IACV,SAAS;AAAA;AAEX,SAAO;AAAA,IACL,qDACE,MACE,wFACE,mDAAC,YAAD,QAGJ;AAAA,IAEF,GAAG;AAAA;AAAA;AAIP,MAAM,eAAe,CAAC,OAAO,SAAS;AACpC,QAAM,EAAE,cAAc,WAAW,mBAAmB,KAAK;AACzD,SAAO;AAAA,OACF;AAAA,IACH,WAAW,CAAC,SAAS;AACnB,WAAK;AACL,WAAK,iBAAiB;AACtB,mBAAa,iBAAiB;AAAA;AAAA,IAEhC,aAAa,IAAI,SAAS;AACxB,WAAK;AACL,WAAK,iBAAiB;AACtB,qBAAe,GAAG;AAAA;AAAA,IAEpB,YAAY,CAAC,SAAS;AACpB,gBAAU,iBAAiB;AAAA;AAAA,IAE7B,UAAU;AAAA,IACV,eAAe;AAAA,IACf,aAAa;AAAA,IAEb,cAAc,MACZ,IAAI,QAAQ,CAAC,YAAY;AACvB,iBAAW,MAAM;AACf,gBAAQ,KAAK,KAAK,UAAU,WAAW,KAAK,KAAK,KAAK;AAAA,SACrD;AAAA;AAAA;AAAA;AAKX,MAAM,oBAAoB,CAAC,cAAc;AACvC,QAAM,eAAe,UAAU,KAAK;AACpC,QAAM,uBAAuB,UAAU,KAAK;AAE5C,QAAM,MAAM,0BAAQ,MAAM,+CAAgB,eAAe;AAEzD,QAAM,cAAc,0BAClB,MAAM,iDAAkB,CAAC,UAAU,mDAAC,sBAAD;AAAA,OAA0B,8BAAK,OAAO;AAAA,OACzE;AAGF,SAAO;AAAA,OACF;AAAA,IACH,MAAM;AAAA,SACD,UAAU;AAAA,MACb,SAAS;AAAA,MACT,KAAK;AAAA;AAAA;AAAA;AAKJ,MAAM,gBAAgB,sDAAqB,YAAY;AAAA,EAC5D;AAAA,EACA;AAAA,EACA;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|