@elliemae/ds-datagrids 3.16.0-rc.4 → 3.16.0-rc.6
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/DSDataGrid.js +145 -2
- package/dist/cjs/DSDataGrid.js.map +2 -2
- package/dist/cjs/DataGridImpl.js +15 -11
- package/dist/cjs/DataGridImpl.js.map +2 -2
- package/dist/cjs/PaginatedDataGrid.js +13 -9
- package/dist/cjs/PaginatedDataGrid.js.map +2 -2
- package/dist/cjs/blockNames.js +4 -0
- package/dist/cjs/blockNames.js.map +1 -1
- package/dist/cjs/columns/IconColumn.js +4 -0
- package/dist/cjs/columns/IconColumn.js.map +1 -1
- package/dist/cjs/columns/NumberColumn.js +4 -0
- package/dist/cjs/columns/NumberColumn.js.map +1 -1
- package/dist/cjs/components/BodyCell.js +6 -0
- package/dist/cjs/components/BodyCell.js.map +1 -1
- package/dist/cjs/components/BodyList.js +7 -5
- package/dist/cjs/components/BodyList.js.map +2 -2
- package/dist/cjs/components/ColumnVisibilityMenuOption.js +5 -6
- package/dist/cjs/components/ColumnVisibilityMenuOption.js.map +2 -2
- package/dist/cjs/components/ColumnsOptionsMenuSection.js +7 -11
- package/dist/cjs/components/ColumnsOptionsMenuSection.js.map +2 -2
- package/dist/cjs/components/EmptyState.js +9 -6
- package/dist/cjs/components/EmptyState.js.map +3 -3
- package/dist/cjs/components/HeaderCell.js +4 -0
- package/dist/cjs/components/HeaderCell.js.map +1 -1
- package/dist/cjs/components/List.js +6 -2
- package/dist/cjs/components/List.js.map +2 -2
- package/dist/cjs/components/ListItem.js +7 -6
- package/dist/cjs/components/ListItem.js.map +2 -2
- package/dist/cjs/components/NoResults.js +8 -10
- package/dist/cjs/components/NoResults.js.map +2 -2
- package/dist/cjs/components/RowsLoader.js +5 -1
- package/dist/cjs/components/RowsLoader.js.map +2 -2
- package/dist/cjs/components/Table.js +9 -5
- package/dist/cjs/components/Table.js.map +2 -2
- package/dist/cjs/components/TableBody.js +6 -7
- package/dist/cjs/components/TableBody.js.map +2 -2
- package/dist/cjs/components/TableHeader.js +5 -1
- package/dist/cjs/components/TableHeader.js.map +2 -2
- package/dist/cjs/components/footer/addOptionalFooterComponents.js +5 -1
- package/dist/cjs/components/footer/addOptionalFooterComponents.js.map +2 -2
- package/dist/cjs/components/header/PrimaryControls.js +4 -0
- package/dist/cjs/components/header/PrimaryControls.js.map +1 -1
- package/dist/cjs/components/header/addOptionalHeaderComponents.js +4 -0
- package/dist/cjs/components/header/addOptionalHeaderComponents.js.map +1 -1
- package/dist/cjs/components/index.js +9 -5
- package/dist/cjs/components/index.js.map +2 -2
- package/dist/cjs/components/renderers/defaultClassedRenderers.js +20 -36
- package/dist/cjs/components/renderers/defaultClassedRenderers.js.map +2 -2
- package/dist/cjs/components/renderers/index.js +6 -2
- package/dist/cjs/components/renderers/index.js.map +2 -2
- package/dist/cjs/components/renderers/renderRowsLoader.js +6 -4
- package/dist/cjs/components/renderers/renderRowsLoader.js.map +2 -2
- package/dist/cjs/components/tableContext.js +4 -0
- package/dist/cjs/components/tableContext.js.map +1 -1
- package/dist/cjs/defaultPlugins.js +9 -10
- package/dist/cjs/defaultPlugins.js.map +2 -2
- package/dist/cjs/index.js +13 -9
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/package.json +7 -0
- package/dist/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +26 -18
- package/dist/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js.map +2 -2
- package/dist/cjs/plugins/body-header-scroll-sync/index.js +5 -1
- package/dist/cjs/plugins/body-header-scroll-sync/index.js.map +2 -2
- package/dist/cjs/plugins/column-dnd/DndColumnsPlugin.js +5 -1
- package/dist/cjs/plugins/column-dnd/DndColumnsPlugin.js.map +2 -2
- package/dist/cjs/plugins/column-dnd/decorateGridWithDndColumns.js +4 -0
- package/dist/cjs/plugins/column-dnd/decorateGridWithDndColumns.js.map +1 -1
- package/dist/cjs/plugins/column-dnd/index.js +5 -1
- package/dist/cjs/plugins/column-dnd/index.js.map +2 -2
- package/dist/cjs/plugins/column-sizing/ColumnSizingPlugin.js +8 -4
- package/dist/cjs/plugins/column-sizing/ColumnSizingPlugin.js.map +2 -2
- package/dist/cjs/plugins/column-sizing/columnMeasurerTransformer.js +4 -0
- package/dist/cjs/plugins/column-sizing/columnMeasurerTransformer.js.map +1 -1
- package/dist/cjs/plugins/column-sizing/ext-points/decorateColumn.js +5 -1
- package/dist/cjs/plugins/column-sizing/ext-points/decorateColumn.js.map +2 -2
- package/dist/cjs/plugins/column-sizing/ext-points/getTableProps.js +5 -1
- package/dist/cjs/plugins/column-sizing/ext-points/getTableProps.js.map +2 -2
- package/dist/cjs/plugins/column-sizing/getColumnNameFromProperty.js +4 -0
- package/dist/cjs/plugins/column-sizing/getColumnNameFromProperty.js.map +1 -1
- package/dist/cjs/plugins/column-sizing/index.js +5 -1
- package/dist/cjs/plugins/column-sizing/index.js.map +2 -2
- package/dist/cjs/plugins/column-sizing/useColumnSizeService.js +11 -26
- package/dist/cjs/plugins/column-sizing/useColumnSizeService.js.map +2 -2
- package/dist/cjs/plugins/column-sizing/useStylesheetHelpers.js +7 -2
- package/dist/cjs/plugins/column-sizing/useStylesheetHelpers.js.map +2 -2
- package/dist/cjs/plugins/column-sizing/utils.js +4 -0
- package/dist/cjs/plugins/column-sizing/utils.js.map +1 -1
- package/dist/cjs/plugins/custom-cell-renderer/CustomRendererPlugin.js +5 -1
- package/dist/cjs/plugins/custom-cell-renderer/CustomRendererPlugin.js.map +2 -2
- package/dist/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js +6 -1
- package/dist/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js.map +2 -2
- package/dist/cjs/plugins/custom-cell-renderer/getRendererComponent.js +5 -1
- package/dist/cjs/plugins/custom-cell-renderer/getRendererComponent.js.map +2 -2
- package/dist/cjs/plugins/custom-cell-renderer/index.js +5 -1
- package/dist/cjs/plugins/custom-cell-renderer/index.js.map +2 -2
- package/dist/cjs/plugins/editable/EditableComponents/ComboBox.js +4 -0
- package/dist/cjs/plugins/editable/EditableComponents/ComboBox.js.map +2 -2
- package/dist/cjs/plugins/editable/EditableComponents/TextBox.js +4 -0
- package/dist/cjs/plugins/editable/EditableComponents/TextBox.js.map +2 -2
- package/dist/cjs/plugins/editable/EditableComponents/index.js +6 -2
- package/dist/cjs/plugins/editable/EditableComponents/index.js.map +2 -2
- package/dist/cjs/plugins/editable/EditablePlugin.js +5 -1
- package/dist/cjs/plugins/editable/EditablePlugin.js.map +2 -2
- package/dist/cjs/plugins/editable/decorateEditable.js +5 -1
- package/dist/cjs/plugins/editable/decorateEditable.js.map +2 -2
- package/dist/cjs/plugins/editable/getEditorComponent.js +7 -16
- package/dist/cjs/plugins/editable/getEditorComponent.js.map +2 -2
- package/dist/cjs/plugins/editable/index.js +6 -2
- package/dist/cjs/plugins/editable/index.js.map +2 -2
- package/dist/cjs/plugins/expandable-grid/ExpandableColumn.js +27 -25
- package/dist/cjs/plugins/expandable-grid/ExpandableColumn.js.map +2 -2
- package/dist/cjs/plugins/expandable-grid/ExpandablePlugin.js +9 -5
- package/dist/cjs/plugins/expandable-grid/ExpandablePlugin.js.map +2 -2
- package/dist/cjs/plugins/expandable-grid/ExpandedRow.js +10 -6
- package/dist/cjs/plugins/expandable-grid/ExpandedRow.js.map +2 -2
- package/dist/cjs/plugins/expandable-grid/ExpandedRowExtra.js +16 -8
- package/dist/cjs/plugins/expandable-grid/ExpandedRowExtra.js.map +2 -2
- package/dist/cjs/plugins/expandable-grid/index.js +6 -2
- package/dist/cjs/plugins/expandable-grid/index.js.map +2 -2
- package/dist/cjs/plugins/expandable-grid/useExpandGridState.js +4 -0
- package/dist/cjs/plugins/expandable-grid/useExpandGridState.js.map +2 -2
- package/dist/cjs/plugins/export-data/ExportDataPlugin.js +4 -0
- package/dist/cjs/plugins/export-data/ExportDataPlugin.js.map +1 -1
- package/dist/cjs/plugins/export-data/index.js +5 -1
- package/dist/cjs/plugins/export-data/index.js.map +2 -2
- package/dist/cjs/plugins/filterable/FilterablePlugin.js +7 -3
- package/dist/cjs/plugins/filterable/FilterablePlugin.js.map +2 -2
- package/dist/cjs/plugins/filterable/addFilterToColumn.js +5 -1
- package/dist/cjs/plugins/filterable/addFilterToColumn.js.map +2 -2
- package/dist/cjs/plugins/filterable/components/FilterableHeader.js +5 -1
- package/dist/cjs/plugins/filterable/components/FilterableHeader.js.map +2 -2
- package/dist/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +50 -47
- package/dist/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js.map +2 -2
- package/dist/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +50 -48
- package/dist/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js.map +2 -2
- package/dist/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +48 -45
- package/dist/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js.map +2 -2
- package/dist/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js +7 -3
- package/dist/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js.map +2 -2
- package/dist/cjs/plugins/filterable/components/filterable-menus/defaultDateFormat.js +4 -0
- package/dist/cjs/plugins/filterable/components/filterable-menus/defaultDateFormat.js.map +1 -1
- package/dist/cjs/plugins/filterable/components/filterable-menus/getFilterMenuByType.js +9 -7
- package/dist/cjs/plugins/filterable/components/filterable-menus/getFilterMenuByType.js.map +2 -2
- package/dist/cjs/plugins/filterable/filterableFormatter.js +33 -37
- package/dist/cjs/plugins/filterable/filterableFormatter.js.map +2 -2
- package/dist/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js +6 -4
- package/dist/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js.map +2 -2
- package/dist/cjs/plugins/filterable/filtering-helper/strategiesOperators.js +4 -0
- package/dist/cjs/plugins/filterable/filtering-helper/strategiesOperators.js.map +2 -2
- package/dist/cjs/plugins/filterable/helper.js +4 -0
- package/dist/cjs/plugins/filterable/helper.js.map +2 -2
- package/dist/cjs/plugins/filterable/index.js +5 -1
- package/dist/cjs/plugins/filterable/index.js.map +2 -2
- package/dist/cjs/plugins/filterable/useFilterableState.js +7 -7
- package/dist/cjs/plugins/filterable/useFilterableState.js.map +2 -2
- package/dist/cjs/plugins/grouping-by/GroupingByPlugin.js +4 -0
- package/dist/cjs/plugins/grouping-by/GroupingByPlugin.js.map +1 -1
- package/dist/cjs/plugins/grouping-grid/GroupingPlugin.js +19 -11
- package/dist/cjs/plugins/grouping-grid/GroupingPlugin.js.map +2 -2
- package/dist/cjs/plugins/grouping-grid/walkStrategy.js +4 -0
- package/dist/cjs/plugins/grouping-grid/walkStrategy.js.map +2 -2
- package/dist/cjs/plugins/index.js +20 -16
- package/dist/cjs/plugins/index.js.map +2 -2
- package/dist/cjs/plugins/infinite-scrolling/InfiniteScrollPlugin.js +4 -0
- package/dist/cjs/plugins/infinite-scrolling/InfiniteScrollPlugin.js.map +1 -1
- package/dist/cjs/plugins/infinite-scrolling/index.js +5 -1
- package/dist/cjs/plugins/infinite-scrolling/index.js.map +2 -2
- package/dist/cjs/plugins/pagination/PaginationPlugin.js +9 -4
- package/dist/cjs/plugins/pagination/PaginationPlugin.js.map +2 -2
- package/dist/cjs/plugins/pagination/components/Pagination.js +9 -24
- package/dist/cjs/plugins/pagination/components/Pagination.js.map +2 -2
- package/dist/cjs/plugins/pagination/components/Paginator.js +15 -10
- package/dist/cjs/plugins/pagination/components/Paginator.js.map +2 -2
- package/dist/cjs/plugins/pagination/components/PerPageDropdown.js +6 -2
- package/dist/cjs/plugins/pagination/components/PerPageDropdown.js.map +2 -2
- package/dist/cjs/plugins/pagination/helper.js +4 -0
- package/dist/cjs/plugins/pagination/helper.js.map +2 -2
- package/dist/cjs/plugins/pagination/index.js +5 -1
- package/dist/cjs/plugins/pagination/index.js.map +2 -2
- package/dist/cjs/plugins/pagination/usePaginationState.js +5 -1
- package/dist/cjs/plugins/pagination/usePaginationState.js.map +2 -2
- package/dist/cjs/plugins/resizable/ResizablePlugin.js +5 -1
- package/dist/cjs/plugins/resizable/ResizablePlugin.js.map +2 -2
- package/dist/cjs/plugins/resizable/decorateResizable.js +8 -2
- package/dist/cjs/plugins/resizable/decorateResizable.js.map +2 -2
- package/dist/cjs/plugins/resizable/index.js +5 -1
- package/dist/cjs/plugins/resizable/index.js.map +2 -2
- package/dist/cjs/plugins/resizable/useResizeHandle.js +10 -13
- package/dist/cjs/plugins/resizable/useResizeHandle.js.map +2 -2
- package/dist/cjs/plugins/resizable/utils.js +4 -0
- package/dist/cjs/plugins/resizable/utils.js.map +1 -1
- package/dist/cjs/plugins/row-dnd/DndRowsPlugin.js +5 -0
- package/dist/cjs/plugins/row-dnd/DndRowsPlugin.js.map +1 -1
- package/dist/cjs/plugins/row-dnd/index.js +5 -1
- package/dist/cjs/plugins/row-dnd/index.js.map +2 -2
- package/dist/cjs/plugins/selectable/SelectablePlugin.js +7 -3
- package/dist/cjs/plugins/selectable/SelectablePlugin.js.map +2 -2
- package/dist/cjs/plugins/selectable/addSelectableColumn.js +7 -1
- package/dist/cjs/plugins/selectable/addSelectableColumn.js.map +2 -2
- package/dist/cjs/plugins/selectable/helper.js +4 -0
- package/dist/cjs/plugins/selectable/helper.js.map +1 -1
- package/dist/cjs/plugins/selectable/index.js +5 -1
- package/dist/cjs/plugins/selectable/index.js.map +2 -2
- package/dist/cjs/plugins/selectable/selectableFormatter.js +5 -1
- package/dist/cjs/plugins/selectable/selectableFormatter.js.map +2 -2
- package/dist/cjs/plugins/selectable/useSelectableState.js +7 -1
- package/dist/cjs/plugins/selectable/useSelectableState.js.map +2 -2
- package/dist/cjs/plugins/sortable/SortablePlugin.js +7 -3
- package/dist/cjs/plugins/sortable/SortablePlugin.js.map +2 -2
- package/dist/cjs/plugins/sortable/checkIfSortable.js +4 -0
- package/dist/cjs/plugins/sortable/checkIfSortable.js.map +1 -1
- package/dist/cjs/plugins/sortable/index.js +5 -1
- package/dist/cjs/plugins/sortable/index.js.map +2 -2
- package/dist/cjs/plugins/sortable/sortHeaderFormatter.js +4 -0
- package/dist/cjs/plugins/sortable/sortHeaderFormatter.js.map +1 -1
- package/dist/cjs/plugins/sortable/sortTree.js +4 -0
- package/dist/cjs/plugins/sortable/sortTree.js.map +2 -2
- package/dist/cjs/plugins/sortable/sorter.js +5 -0
- package/dist/cjs/plugins/sortable/sorter.js.map +1 -1
- package/dist/cjs/plugins/sortable/useSortableState.js +6 -4
- package/dist/cjs/plugins/sortable/useSortableState.js.map +2 -2
- package/dist/cjs/plugins/toolbar/RowRenderer.js +7 -2
- package/dist/cjs/plugins/toolbar/RowRenderer.js.map +2 -2
- package/dist/cjs/plugins/toolbar/ToolbarPlugin.js +5 -1
- package/dist/cjs/plugins/toolbar/ToolbarPlugin.js.map +2 -2
- package/dist/cjs/plugins/toolbar/ToolbarTrigger.js +5 -0
- package/dist/cjs/plugins/toolbar/ToolbarTrigger.js.map +1 -1
- package/dist/cjs/plugins/toolbar/index.js +5 -1
- package/dist/cjs/plugins/toolbar/index.js.map +2 -2
- package/dist/cjs/plugins/virtualization/AutoHeightList.js +4 -0
- package/dist/cjs/plugins/virtualization/AutoHeightList.js.map +2 -2
- package/dist/cjs/plugins/virtualization/VirtualizationPlugin.js +8 -2
- package/dist/cjs/plugins/virtualization/VirtualizationPlugin.js.map +2 -2
- package/dist/cjs/plugins/virtualization/VirtualizedBody.js +9 -4
- package/dist/cjs/plugins/virtualization/VirtualizedBody.js.map +2 -2
- package/dist/cjs/plugins/virtualization/VirtualizedBodyRow.js +5 -0
- package/dist/cjs/plugins/virtualization/VirtualizedBodyRow.js.map +1 -1
- package/dist/cjs/plugins/virtualization/helper.js +4 -0
- package/dist/cjs/plugins/virtualization/helper.js.map +1 -1
- package/dist/cjs/plugins/virtualization/index.js +5 -1
- package/dist/cjs/plugins/virtualization/index.js.map +2 -2
- package/dist/cjs/renders/CellWithAddons.js +15 -1
- package/dist/cjs/renders/CellWithAddons.js.map +2 -2
- package/dist/cjs/renders/index.js +6 -2
- package/dist/cjs/renders/index.js.map +2 -2
- package/dist/cjs/renders/styled.js +4 -0
- package/dist/cjs/renders/styled.js.map +1 -1
- package/dist/cjs/rowSizes.js +5 -5
- package/dist/cjs/rowSizes.js.map +2 -2
- package/dist/cjs/utilities/getPluginsFromProps.js +17 -13
- package/dist/cjs/utilities/getPluginsFromProps.js.map +2 -2
- package/dist/cjs/utilities/getScrollbarSize.js +4 -0
- package/dist/cjs/utilities/getScrollbarSize.js.map +1 -1
- package/dist/cjs/utilities/normalizeData.js +4 -0
- package/dist/cjs/utilities/normalizeData.js.map +2 -2
- package/dist/esm/DSDataGrid.js +141 -2
- package/dist/esm/DSDataGrid.js.map +2 -2
- package/dist/esm/DataGridImpl.js +11 -11
- package/dist/esm/DataGridImpl.js.map +2 -2
- package/dist/esm/PaginatedDataGrid.js +9 -9
- package/dist/esm/PaginatedDataGrid.js.map +2 -2
- package/dist/esm/columns/IconColumn.js.map +1 -1
- package/dist/esm/components/BodyCell.js +2 -0
- package/dist/esm/components/BodyCell.js.map +1 -1
- package/dist/esm/components/BodyList.js +3 -5
- package/dist/esm/components/BodyList.js.map +2 -2
- package/dist/esm/components/ColumnVisibilityMenuOption.js +1 -6
- package/dist/esm/components/ColumnVisibilityMenuOption.js.map +2 -2
- package/dist/esm/components/ColumnsOptionsMenuSection.js +3 -11
- package/dist/esm/components/ColumnsOptionsMenuSection.js.map +2 -2
- package/dist/esm/components/EmptyState.js +1 -2
- package/dist/esm/components/EmptyState.js.map +2 -2
- package/dist/esm/components/List.js +2 -2
- package/dist/esm/components/List.js.map +2 -2
- package/dist/esm/components/ListItem.js +3 -6
- package/dist/esm/components/ListItem.js.map +2 -2
- package/dist/esm/components/NoResults.js +4 -10
- package/dist/esm/components/NoResults.js.map +2 -2
- package/dist/esm/components/RowsLoader.js +1 -1
- package/dist/esm/components/RowsLoader.js.map +1 -1
- package/dist/esm/components/Table.js +5 -5
- package/dist/esm/components/Table.js.map +2 -2
- package/dist/esm/components/TableBody.js +2 -7
- package/dist/esm/components/TableBody.js.map +2 -2
- package/dist/esm/components/TableHeader.js +1 -1
- package/dist/esm/components/TableHeader.js.map +2 -2
- package/dist/esm/components/footer/addOptionalFooterComponents.js +1 -1
- package/dist/esm/components/footer/addOptionalFooterComponents.js.map +1 -1
- package/dist/esm/components/index.js +5 -5
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/components/renderers/defaultClassedRenderers.js +16 -40
- package/dist/esm/components/renderers/defaultClassedRenderers.js.map +2 -2
- package/dist/esm/components/renderers/index.js +2 -2
- package/dist/esm/components/renderers/index.js.map +1 -1
- package/dist/esm/components/renderers/renderRowsLoader.js +2 -4
- package/dist/esm/components/renderers/renderRowsLoader.js.map +2 -2
- package/dist/esm/defaultPlugins.js +5 -10
- package/dist/esm/defaultPlugins.js.map +2 -2
- package/dist/esm/index.js +9 -9
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/package.json +7 -0
- package/dist/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +22 -18
- package/dist/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js.map +2 -2
- package/dist/esm/plugins/body-header-scroll-sync/index.js +1 -1
- package/dist/esm/plugins/body-header-scroll-sync/index.js.map +1 -1
- package/dist/esm/plugins/column-dnd/DndColumnsPlugin.js +1 -1
- package/dist/esm/plugins/column-dnd/DndColumnsPlugin.js.map +2 -2
- package/dist/esm/plugins/column-dnd/index.js +1 -1
- package/dist/esm/plugins/column-dnd/index.js.map +1 -1
- package/dist/esm/plugins/column-sizing/ColumnSizingPlugin.js +4 -4
- package/dist/esm/plugins/column-sizing/ColumnSizingPlugin.js.map +1 -1
- package/dist/esm/plugins/column-sizing/columnMeasurerTransformer.js.map +1 -1
- package/dist/esm/plugins/column-sizing/ext-points/decorateColumn.js +1 -1
- package/dist/esm/plugins/column-sizing/ext-points/decorateColumn.js.map +1 -1
- package/dist/esm/plugins/column-sizing/ext-points/getTableProps.js +1 -1
- package/dist/esm/plugins/column-sizing/ext-points/getTableProps.js.map +1 -1
- package/dist/esm/plugins/column-sizing/index.js +1 -1
- package/dist/esm/plugins/column-sizing/index.js.map +1 -1
- package/dist/esm/plugins/column-sizing/useColumnSizeService.js +7 -26
- package/dist/esm/plugins/column-sizing/useColumnSizeService.js.map +2 -2
- package/dist/esm/plugins/column-sizing/useStylesheetHelpers.js +3 -2
- package/dist/esm/plugins/column-sizing/useStylesheetHelpers.js.map +2 -2
- package/dist/esm/plugins/column-sizing/utils.js.map +1 -1
- package/dist/esm/plugins/custom-cell-renderer/CustomRendererPlugin.js +1 -1
- package/dist/esm/plugins/custom-cell-renderer/CustomRendererPlugin.js.map +1 -1
- package/dist/esm/plugins/custom-cell-renderer/addCustomRendererToCell.js +2 -1
- package/dist/esm/plugins/custom-cell-renderer/addCustomRendererToCell.js.map +2 -2
- package/dist/esm/plugins/custom-cell-renderer/getRendererComponent.js +1 -1
- package/dist/esm/plugins/custom-cell-renderer/getRendererComponent.js.map +2 -2
- package/dist/esm/plugins/custom-cell-renderer/index.js +1 -1
- package/dist/esm/plugins/custom-cell-renderer/index.js.map +1 -1
- package/dist/esm/plugins/editable/EditableComponents/ComboBox.js.map +1 -1
- package/dist/esm/plugins/editable/EditableComponents/TextBox.js.map +1 -1
- package/dist/esm/plugins/editable/EditableComponents/index.js +2 -2
- package/dist/esm/plugins/editable/EditableComponents/index.js.map +1 -1
- package/dist/esm/plugins/editable/EditablePlugin.js +1 -1
- package/dist/esm/plugins/editable/EditablePlugin.js.map +2 -2
- package/dist/esm/plugins/editable/decorateEditable.js +1 -1
- package/dist/esm/plugins/editable/decorateEditable.js.map +2 -2
- package/dist/esm/plugins/editable/getEditorComponent.js +3 -16
- package/dist/esm/plugins/editable/getEditorComponent.js.map +2 -2
- package/dist/esm/plugins/editable/index.js +2 -2
- package/dist/esm/plugins/editable/index.js.map +1 -1
- package/dist/esm/plugins/expandable-grid/ExpandableColumn.js +23 -25
- package/dist/esm/plugins/expandable-grid/ExpandableColumn.js.map +2 -2
- package/dist/esm/plugins/expandable-grid/ExpandablePlugin.js +5 -5
- package/dist/esm/plugins/expandable-grid/ExpandablePlugin.js.map +2 -2
- package/dist/esm/plugins/expandable-grid/ExpandedRow.js +6 -6
- package/dist/esm/plugins/expandable-grid/ExpandedRow.js.map +2 -2
- package/dist/esm/plugins/expandable-grid/ExpandedRowExtra.js +12 -8
- package/dist/esm/plugins/expandable-grid/ExpandedRowExtra.js.map +2 -2
- package/dist/esm/plugins/expandable-grid/index.js +2 -2
- package/dist/esm/plugins/expandable-grid/index.js.map +1 -1
- package/dist/esm/plugins/expandable-grid/useExpandGridState.js.map +2 -2
- package/dist/esm/plugins/export-data/ExportDataPlugin.js.map +1 -1
- package/dist/esm/plugins/export-data/index.js +1 -1
- package/dist/esm/plugins/export-data/index.js.map +1 -1
- package/dist/esm/plugins/filterable/FilterablePlugin.js +3 -3
- package/dist/esm/plugins/filterable/FilterablePlugin.js.map +2 -2
- package/dist/esm/plugins/filterable/addFilterToColumn.js +1 -1
- package/dist/esm/plugins/filterable/addFilterToColumn.js.map +1 -1
- package/dist/esm/plugins/filterable/components/FilterableHeader.js +1 -1
- package/dist/esm/plugins/filterable/components/FilterableHeader.js.map +2 -2
- package/dist/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +46 -47
- package/dist/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js.map +2 -2
- package/dist/esm/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +46 -48
- package/dist/esm/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js.map +2 -2
- package/dist/esm/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +44 -45
- package/dist/esm/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js.map +2 -2
- package/dist/esm/plugins/filterable/components/filterable-menus/TextFilterMenu.js +3 -3
- package/dist/esm/plugins/filterable/components/filterable-menus/TextFilterMenu.js.map +2 -2
- package/dist/esm/plugins/filterable/components/filterable-menus/getFilterMenuByType.js +5 -7
- package/dist/esm/plugins/filterable/components/filterable-menus/getFilterMenuByType.js.map +2 -2
- package/dist/esm/plugins/filterable/filterableFormatter.js +29 -37
- package/dist/esm/plugins/filterable/filterableFormatter.js.map +2 -2
- package/dist/esm/plugins/filterable/filtering-helper/filterRowsByQuery.js +2 -4
- package/dist/esm/plugins/filterable/filtering-helper/filterRowsByQuery.js.map +2 -2
- package/dist/esm/plugins/filterable/filtering-helper/strategiesOperators.js.map +2 -2
- package/dist/esm/plugins/filterable/helper.js +1 -7
- package/dist/esm/plugins/filterable/helper.js.map +2 -2
- package/dist/esm/plugins/filterable/index.js +1 -1
- package/dist/esm/plugins/filterable/index.js.map +1 -1
- package/dist/esm/plugins/filterable/useFilterableState.js +3 -11
- package/dist/esm/plugins/filterable/useFilterableState.js.map +2 -2
- package/dist/esm/plugins/grouping-by/GroupingByPlugin.js.map +1 -1
- package/dist/esm/plugins/grouping-grid/GroupingPlugin.js +15 -11
- package/dist/esm/plugins/grouping-grid/GroupingPlugin.js.map +2 -2
- package/dist/esm/plugins/grouping-grid/walkStrategy.js.map +2 -2
- package/dist/esm/plugins/index.js +16 -16
- package/dist/esm/plugins/index.js.map +1 -1
- package/dist/esm/plugins/infinite-scrolling/InfiniteScrollPlugin.js.map +1 -1
- package/dist/esm/plugins/infinite-scrolling/index.js +1 -1
- package/dist/esm/plugins/infinite-scrolling/index.js.map +1 -1
- package/dist/esm/plugins/pagination/PaginationPlugin.js +5 -4
- package/dist/esm/plugins/pagination/PaginationPlugin.js.map +2 -2
- package/dist/esm/plugins/pagination/components/Pagination.js +5 -24
- package/dist/esm/plugins/pagination/components/Pagination.js.map +2 -2
- package/dist/esm/plugins/pagination/components/Paginator.js +12 -11
- package/dist/esm/plugins/pagination/components/Paginator.js.map +2 -2
- package/dist/esm/plugins/pagination/components/PerPageDropdown.js +2 -2
- package/dist/esm/plugins/pagination/components/PerPageDropdown.js.map +2 -2
- package/dist/esm/plugins/pagination/helper.js.map +2 -2
- package/dist/esm/plugins/pagination/index.js +1 -1
- package/dist/esm/plugins/pagination/index.js.map +1 -1
- package/dist/esm/plugins/pagination/usePaginationState.js +1 -1
- package/dist/esm/plugins/pagination/usePaginationState.js.map +1 -1
- package/dist/esm/plugins/resizable/ResizablePlugin.js +1 -1
- package/dist/esm/plugins/resizable/ResizablePlugin.js.map +2 -2
- package/dist/esm/plugins/resizable/decorateResizable.js +4 -2
- package/dist/esm/plugins/resizable/decorateResizable.js.map +2 -2
- package/dist/esm/plugins/resizable/index.js +1 -1
- package/dist/esm/plugins/resizable/index.js.map +1 -1
- package/dist/esm/plugins/resizable/useResizeHandle.js +6 -13
- package/dist/esm/plugins/resizable/useResizeHandle.js.map +2 -2
- package/dist/esm/plugins/row-dnd/DndRowsPlugin.js +1 -0
- package/dist/esm/plugins/row-dnd/DndRowsPlugin.js.map +1 -1
- package/dist/esm/plugins/row-dnd/index.js +1 -1
- package/dist/esm/plugins/row-dnd/index.js.map +1 -1
- package/dist/esm/plugins/selectable/SelectablePlugin.js +3 -3
- package/dist/esm/plugins/selectable/SelectablePlugin.js.map +2 -2
- package/dist/esm/plugins/selectable/addSelectableColumn.js +3 -1
- package/dist/esm/plugins/selectable/addSelectableColumn.js.map +2 -2
- package/dist/esm/plugins/selectable/helper.js.map +1 -1
- package/dist/esm/plugins/selectable/index.js +1 -1
- package/dist/esm/plugins/selectable/index.js.map +1 -1
- package/dist/esm/plugins/selectable/selectableFormatter.js +1 -1
- package/dist/esm/plugins/selectable/selectableFormatter.js.map +2 -2
- package/dist/esm/plugins/selectable/useSelectableState.js +3 -5
- package/dist/esm/plugins/selectable/useSelectableState.js.map +2 -2
- package/dist/esm/plugins/sortable/SortablePlugin.js +3 -3
- package/dist/esm/plugins/sortable/SortablePlugin.js.map +2 -2
- package/dist/esm/plugins/sortable/checkIfSortable.js.map +1 -1
- package/dist/esm/plugins/sortable/index.js +1 -1
- package/dist/esm/plugins/sortable/index.js.map +1 -1
- package/dist/esm/plugins/sortable/sortHeaderFormatter.js.map +1 -1
- package/dist/esm/plugins/sortable/sortTree.js.map +2 -2
- package/dist/esm/plugins/sortable/sorter.js +1 -0
- package/dist/esm/plugins/sortable/sorter.js.map +1 -1
- package/dist/esm/plugins/sortable/useSortableState.js +2 -4
- package/dist/esm/plugins/sortable/useSortableState.js.map +2 -2
- package/dist/esm/plugins/toolbar/RowRenderer.js +3 -2
- package/dist/esm/plugins/toolbar/RowRenderer.js.map +2 -2
- package/dist/esm/plugins/toolbar/ToolbarPlugin.js +1 -1
- package/dist/esm/plugins/toolbar/ToolbarPlugin.js.map +2 -2
- package/dist/esm/plugins/toolbar/ToolbarTrigger.js +1 -0
- package/dist/esm/plugins/toolbar/ToolbarTrigger.js.map +1 -1
- package/dist/esm/plugins/toolbar/index.js +1 -1
- package/dist/esm/plugins/toolbar/index.js.map +1 -1
- package/dist/esm/plugins/virtualization/AutoHeightList.js.map +2 -2
- package/dist/esm/plugins/virtualization/VirtualizationPlugin.js +4 -2
- package/dist/esm/plugins/virtualization/VirtualizationPlugin.js.map +2 -2
- package/dist/esm/plugins/virtualization/VirtualizedBody.js +5 -4
- package/dist/esm/plugins/virtualization/VirtualizedBody.js.map +2 -2
- package/dist/esm/plugins/virtualization/VirtualizedBodyRow.js +1 -0
- package/dist/esm/plugins/virtualization/VirtualizedBodyRow.js.map +1 -1
- package/dist/esm/plugins/virtualization/index.js +1 -1
- package/dist/esm/plugins/virtualization/index.js.map +1 -1
- package/dist/esm/renders/CellWithAddons.js +11 -1
- package/dist/esm/renders/CellWithAddons.js.map +2 -2
- package/dist/esm/renders/index.js +2 -2
- package/dist/esm/renders/index.js.map +1 -1
- package/dist/esm/renders/styled.js.map +1 -1
- package/dist/esm/rowSizes.js +1 -5
- package/dist/esm/rowSizes.js.map +2 -2
- package/dist/esm/utilities/getPluginsFromProps.js +13 -13
- package/dist/esm/utilities/getPluginsFromProps.js.map +2 -2
- package/dist/esm/utilities/normalizeData.js.map +2 -2
- package/package.json +25 -25
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
18
18
|
return to;
|
19
19
|
};
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
22
26
|
mod
|
23
27
|
));
|
@@ -33,9 +37,9 @@ var import_react = require("react");
|
|
33
37
|
var import_ds_shared = require("@elliemae/ds-shared");
|
34
38
|
var import_ds_classnames = require("@elliemae/ds-classnames");
|
35
39
|
var import_react_window = require("react-window");
|
36
|
-
var import_walkStrategy = require("./walkStrategy");
|
37
|
-
var import_rowSizes = require("../../rowSizes");
|
38
|
-
var import_blockNames = require("../../blockNames");
|
40
|
+
var import_walkStrategy = require("./walkStrategy.js");
|
41
|
+
var import_rowSizes = require("../../rowSizes.js");
|
42
|
+
var import_blockNames = require("../../blockNames.js");
|
39
43
|
const blockName = `${import_blockNames.dataGridBlockName}-group-row-header`;
|
40
44
|
const GroupRowHeaderWrapper = (0, import_ds_classnames.aggregatedClasses)("div")(blockName);
|
41
45
|
const GroupRowHeaderTitle = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "title");
|
@@ -109,15 +113,19 @@ const GroupingPlugin = (0, import_ds_shared.createInstancePlugin)("groupedRows",
|
|
109
113
|
decorateRenderers(renderers, grid) {
|
110
114
|
const Row = renderers.body.row;
|
111
115
|
renderers.body.row = (0, import_react.useMemo)(
|
112
|
-
() => (
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
116
|
+
() => (
|
117
|
+
// eslint-disable-next-line react/display-name
|
118
|
+
// eslint-disable-next-line react/prop-types
|
119
|
+
function({ isExpanded, ...rowProps }) {
|
120
|
+
const { composedRows } = grid.getInstance();
|
121
|
+
const node = composedRows[rowProps.index] ? composedRows[rowProps.index] : rowProps.rowData;
|
122
|
+
const { groupedRowsRenderHeader } = grid.props;
|
123
|
+
if (node && node._isGroup) {
|
124
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(GroupRowHeaderWrapper, { ...rowProps, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(GroupRowHeaderTitle, { children: groupedRowsRenderHeader ? groupedRowsRenderHeader(node) : "Group" }) }) });
|
125
|
+
}
|
126
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Row, { ...rowProps });
|
118
127
|
}
|
119
|
-
|
120
|
-
},
|
128
|
+
),
|
121
129
|
[]
|
122
130
|
);
|
123
131
|
return renderers;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../src/plugins/grouping-grid/GroupingPlugin.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
4
|
-
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable no-underscore-dangle */\nimport React, { useMemo } from 'react';\nimport { createInstancePlugin } from '@elliemae/ds-shared';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { VariableSizeList } from 'react-window';\nimport { walkTreeStrategy } from './walkStrategy';\nimport { RowSizes } from '../../rowSizes';\nimport { dataGridBlockName } from '../../blockNames';\n\nconst blockName = `${dataGridBlockName}-group-row-header`;\nconst GroupRowHeaderWrapper = aggregatedClasses('div')(blockName);\nconst GroupRowHeaderTitle = aggregatedClasses('div')(blockName, 'title');\n\nexport const GroupingPlugin = createInstancePlugin('groupedRows', {\n decorateGrid(grid) {\n const { columns, composedRows } = grid.getInstance();\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const detailColumns = useMemo(\n () =>\n columns\n .map((column) => ({\n ...column,\n customRenderer: column.detailCustomRenderer,\n }))\n .filter((col) => !col.expandableColumn),\n [columns],\n );\n const flatRows = [];\n walkTreeStrategy({\n data: composedRows,\n cb: (n) => flatRows.push(n),\n });\n return {\n detailColumns,\n composedRows: flatRows,\n };\n },\n getBodyProps(bodyProps, grid) {\n const { composedRows: rows } = grid.getInstance();\n // implementation of expandable row single column with aggregation\n const getItemSize = (index) => {\n const rowData = rows[index];\n if (!rowData) return RowSizes.normal;\n return rowData._isGroup || rowData.isGroup ? RowSizes.compact : RowSizes.normal;\n };\n // eslint-disable-next-line no-unused-vars\n const getListHeight = () => {\n const size = rows.reduce((h, r) => {\n const rowHeight = r._isGroup || r.isGroup ? RowSizes.compact : RowSizes.normal;\n return h + rowHeight;\n }, 0);\n return size;\n };\n return {\n ...bodyProps,\n getListHeight,\n listComponent: VariableSizeList,\n listProps: { itemSize: getItemSize },\n };\n },\n composeRows: (rows, grid) => {\n const {\n composedRows,\n props: { rowKey },\n } = grid.getInstance();\n\n if (Array.isArray(rows)) {\n const filterIds = rows.map((r) => r.data[rowKey]);\n return composedRows\n .filter((c) => filterIds.includes(c.data[rowKey]))\n .map((r) => ({\n ...r.data,\n children: Array.isArray(r.data.children)\n ? r.data.children.filter((c) => filterIds.includes(c[rowKey]))\n : r.data.children,\n _isGroup: r.isGroup,\n }))\n .filter((g) => g.children === undefined || g.children.length > 0);\n }\n return {\n ...rows,\n allRows: rows.allRows.map((r) => ({\n ...r.data,\n _isGroup: r.isGroup,\n })),\n rows: rows.rows.map((r) => ({\n ...r.data,\n _isGroup: r.isGroup,\n })),\n };\n },\n decorateRenderers(renderers, grid) {\n const Row = renderers.body.row;\n // eslint-disable-next-line react-hooks/rules-of-hooks\n renderers.body.row = useMemo(\n () =>\n // eslint-disable-next-line react/display-name\n // eslint-disable-next-line react/prop-types\n ({ isExpanded, ...rowProps })
|
5
|
-
"mappings": "
|
4
|
+
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable no-underscore-dangle */\nimport React, { useMemo } from 'react';\nimport { createInstancePlugin } from '@elliemae/ds-shared';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { VariableSizeList } from 'react-window';\nimport { walkTreeStrategy } from './walkStrategy.js';\nimport { RowSizes } from '../../rowSizes.js';\nimport { dataGridBlockName } from '../../blockNames.js';\n\nconst blockName = `${dataGridBlockName}-group-row-header`;\nconst GroupRowHeaderWrapper = aggregatedClasses('div')(blockName);\nconst GroupRowHeaderTitle = aggregatedClasses('div')(blockName, 'title');\n\nexport const GroupingPlugin = createInstancePlugin('groupedRows', {\n decorateGrid(grid) {\n const { columns, composedRows } = grid.getInstance();\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const detailColumns = useMemo(\n () =>\n columns\n .map((column) => ({\n ...column,\n customRenderer: column.detailCustomRenderer,\n }))\n .filter((col) => !col.expandableColumn),\n [columns],\n );\n const flatRows = [];\n walkTreeStrategy({\n data: composedRows,\n cb: (n) => flatRows.push(n),\n });\n return {\n detailColumns,\n composedRows: flatRows,\n };\n },\n getBodyProps(bodyProps, grid) {\n const { composedRows: rows } = grid.getInstance();\n // implementation of expandable row single column with aggregation\n const getItemSize = (index) => {\n const rowData = rows[index];\n if (!rowData) return RowSizes.normal;\n return rowData._isGroup || rowData.isGroup ? RowSizes.compact : RowSizes.normal;\n };\n // eslint-disable-next-line no-unused-vars\n const getListHeight = () => {\n const size = rows.reduce((h, r) => {\n const rowHeight = r._isGroup || r.isGroup ? RowSizes.compact : RowSizes.normal;\n return h + rowHeight;\n }, 0);\n return size;\n };\n return {\n ...bodyProps,\n getListHeight,\n listComponent: VariableSizeList,\n listProps: { itemSize: getItemSize },\n };\n },\n composeRows: (rows, grid) => {\n const {\n composedRows,\n props: { rowKey },\n } = grid.getInstance();\n\n if (Array.isArray(rows)) {\n const filterIds = rows.map((r) => r.data[rowKey]);\n return composedRows\n .filter((c) => filterIds.includes(c.data[rowKey]))\n .map((r) => ({\n ...r.data,\n children: Array.isArray(r.data.children)\n ? r.data.children.filter((c) => filterIds.includes(c[rowKey]))\n : r.data.children,\n _isGroup: r.isGroup,\n }))\n .filter((g) => g.children === undefined || g.children.length > 0);\n }\n return {\n ...rows,\n allRows: rows.allRows.map((r) => ({\n ...r.data,\n _isGroup: r.isGroup,\n })),\n rows: rows.rows.map((r) => ({\n ...r.data,\n _isGroup: r.isGroup,\n })),\n };\n },\n decorateRenderers(renderers, grid) {\n const Row = renderers.body.row;\n // eslint-disable-next-line react-hooks/rules-of-hooks\n renderers.body.row = useMemo(\n () =>\n // eslint-disable-next-line react/display-name\n // eslint-disable-next-line react/prop-types\n function ({ isExpanded, ...rowProps }) {\n const { composedRows } = grid.getInstance();\n // // https://jira.elliemae.io/browse/PUI-1667\n const node = composedRows[rowProps.index] ? composedRows[rowProps.index] : rowProps.rowData;\n const { groupedRowsRenderHeader } = grid.props;\n // eslint-disable-next-line no-underscore-dangle\n if (node && node._isGroup) {\n return (\n <>\n <GroupRowHeaderWrapper {...rowProps}>\n <GroupRowHeaderTitle>\n {groupedRowsRenderHeader ? groupedRowsRenderHeader(node) : 'Group'}\n </GroupRowHeaderTitle>\n </GroupRowHeaderWrapper>\n </>\n );\n }\n return <Row {...rowProps} />;\n },\n [],\n );\n\n return renderers;\n },\n});\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD2GT;AAzGd,mBAA+B;AAC/B,uBAAqC;AACrC,2BAAkC;AAClC,0BAAiC;AACjC,0BAAiC;AACjC,sBAAyB;AACzB,wBAAkC;AAElC,MAAM,YAAY,GAAG;AACrB,MAAM,4BAAwB,wCAAkB,KAAK,EAAE,SAAS;AAChE,MAAM,0BAAsB,wCAAkB,KAAK,EAAE,WAAW,OAAO;AAEhE,MAAM,qBAAiB,uCAAqB,eAAe;AAAA,EAChE,aAAa,MAAM;AACjB,UAAM,EAAE,SAAS,aAAa,IAAI,KAAK,YAAY;AAEnD,UAAM,oBAAgB;AAAA,MACpB,MACE,QACG,IAAI,CAAC,YAAY;AAAA,QAChB,GAAG;AAAA,QACH,gBAAgB,OAAO;AAAA,MACzB,EAAE,EACD,OAAO,CAAC,QAAQ,CAAC,IAAI,gBAAgB;AAAA,MAC1C,CAAC,OAAO;AAAA,IACV;AACA,UAAM,WAAW,CAAC;AAClB,8CAAiB;AAAA,MACf,MAAM;AAAA,MACN,IAAI,CAAC,MAAM,SAAS,KAAK,CAAC;AAAA,IAC5B,CAAC;AACD,WAAO;AAAA,MACL;AAAA,MACA,cAAc;AAAA,IAChB;AAAA,EACF;AAAA,EACA,aAAa,WAAW,MAAM;AAC5B,UAAM,EAAE,cAAc,KAAK,IAAI,KAAK,YAAY;AAEhD,UAAM,cAAc,CAAC,UAAU;AAC7B,YAAM,UAAU,KAAK,KAAK;AAC1B,UAAI,CAAC;AAAS,eAAO,yBAAS;AAC9B,aAAO,QAAQ,YAAY,QAAQ,UAAU,yBAAS,UAAU,yBAAS;AAAA,IAC3E;AAEA,UAAM,gBAAgB,MAAM;AAC1B,YAAM,OAAO,KAAK,OAAO,CAAC,GAAG,MAAM;AACjC,cAAM,YAAY,EAAE,YAAY,EAAE,UAAU,yBAAS,UAAU,yBAAS;AACxE,eAAO,IAAI;AAAA,MACb,GAAG,CAAC;AACJ,aAAO;AAAA,IACT;AACA,WAAO;AAAA,MACL,GAAG;AAAA,MACH;AAAA,MACA,eAAe;AAAA,MACf,WAAW,EAAE,UAAU,YAAY;AAAA,IACrC;AAAA,EACF;AAAA,EACA,aAAa,CAAC,MAAM,SAAS;AAC3B,UAAM;AAAA,MACJ;AAAA,MACA,OAAO,EAAE,OAAO;AAAA,IAClB,IAAI,KAAK,YAAY;AAErB,QAAI,MAAM,QAAQ,IAAI,GAAG;AACvB,YAAM,YAAY,KAAK,IAAI,CAAC,MAAM,EAAE,KAAK,MAAM,CAAC;AAChD,aAAO,aACJ,OAAO,CAAC,MAAM,UAAU,SAAS,EAAE,KAAK,MAAM,CAAC,CAAC,EAChD,IAAI,CAAC,OAAO;AAAA,QACX,GAAG,EAAE;AAAA,QACL,UAAU,MAAM,QAAQ,EAAE,KAAK,QAAQ,IACnC,EAAE,KAAK,SAAS,OAAO,CAAC,MAAM,UAAU,SAAS,EAAE,MAAM,CAAC,CAAC,IAC3D,EAAE,KAAK;AAAA,QACX,UAAU,EAAE;AAAA,MACd,EAAE,EACD,OAAO,CAAC,MAAM,EAAE,aAAa,UAAa,EAAE,SAAS,SAAS,CAAC;AAAA,IACpE;AACA,WAAO;AAAA,MACL,GAAG;AAAA,MACH,SAAS,KAAK,QAAQ,IAAI,CAAC,OAAO;AAAA,QAChC,GAAG,EAAE;AAAA,QACL,UAAU,EAAE;AAAA,MACd,EAAE;AAAA,MACF,MAAM,KAAK,KAAK,IAAI,CAAC,OAAO;AAAA,QAC1B,GAAG,EAAE;AAAA,QACL,UAAU,EAAE;AAAA,MACd,EAAE;AAAA,IACJ;AAAA,EACF;AAAA,EACA,kBAAkB,WAAW,MAAM;AACjC,UAAM,MAAM,UAAU,KAAK;AAE3B,cAAU,KAAK,UAAM;AAAA,MACnB;AAAA;AAAA;AAAA,QAGE,SAAU,EAAE,YAAY,GAAG,SAAS,GAAG;AACrC,gBAAM,EAAE,aAAa,IAAI,KAAK,YAAY;AAE1C,gBAAM,OAAO,aAAa,SAAS,KAAK,IAAI,aAAa,SAAS,KAAK,IAAI,SAAS;AACpF,gBAAM,EAAE,wBAAwB,IAAI,KAAK;AAEzC,cAAI,QAAQ,KAAK,UAAU;AACzB,mBACE,2EACE,sDAAC,yBAAuB,GAAG,UACzB,sDAAC,uBACE,oCAA0B,wBAAwB,IAAI,IAAI,SAC7D,GACF,GACF;AAAA,UAEJ;AACA,iBAAO,4CAAC,OAAK,GAAG,UAAU;AAAA,QAC5B;AAAA;AAAA,MACF,CAAC;AAAA,IACH;AAEA,WAAO;AAAA,EACT;AACF,CAAC;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
18
18
|
return to;
|
19
19
|
};
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
22
26
|
mod
|
23
27
|
));
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../src/plugins/grouping-grid/walkStrategy.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
4
|
-
"sourcesContent": ["function getPath(parentNode, index, childrenKey) {\n if (!parentNode) return [index];\n return [...parentNode.path, childrenKey, index];\n}\n\nexport function walkTreeStrategy({\n data,\n childrenKey = 'children',\n level = 0,\n getId = item => item.id,\n parentNode,\n shouldWalkChildren = () => true,\n cb,\n}) {\n // eslint-disable-next-line no-loops/no-loops,no-plusplus\n for (let i = 0; i < data.length; i++) {\n const currLevel = level + 1;\n const children = data[i][childrenKey];\n const isGroup = children && !!children.length;\n const node = {\n index: i,\n id: getId(data[i]),\n data: data[i],\n path: getPath(parentNode, i, childrenKey),\n isGroup,\n nestingLevel: currLevel,\n parentNode: parentNode || {\n isGroup: true,\n data: { children: data },\n },\n };\n cb(node);\n if (shouldWalkChildren(node) && children && children.length) {\n walkTreeStrategy({\n data: children,\n level: currLevel,\n parentNode: node,\n shouldWalkChildren,\n cb,\n });\n }\n }\n}\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
-
"mappings": "
|
4
|
+
"sourcesContent": ["function getPath(parentNode, index, childrenKey) {\n if (!parentNode) return [index];\n return [...parentNode.path, childrenKey, index];\n}\n\nexport function walkTreeStrategy({\n data,\n childrenKey = 'children',\n level = 0,\n getId = (item) => item.id,\n parentNode,\n shouldWalkChildren = () => true,\n cb,\n}) {\n // eslint-disable-next-line no-loops/no-loops,no-plusplus\n for (let i = 0; i < data.length; i++) {\n const currLevel = level + 1;\n const children = data[i][childrenKey];\n const isGroup = children && !!children.length;\n const node = {\n index: i,\n id: getId(data[i]),\n data: data[i],\n path: getPath(parentNode, i, childrenKey),\n isGroup,\n nestingLevel: currLevel,\n parentNode: parentNode || {\n isGroup: true,\n data: { children: data },\n },\n };\n cb(node);\n if (shouldWalkChildren(node) && children && children.length) {\n walkTreeStrategy({\n data: children,\n level: currLevel,\n parentNode: node,\n shouldWalkChildren,\n cb,\n });\n }\n }\n}\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,SAAS,QAAQ,YAAY,OAAO,aAAa;AAC/C,MAAI,CAAC;AAAY,WAAO,CAAC,KAAK;AAC9B,SAAO,CAAC,GAAG,WAAW,MAAM,aAAa,KAAK;AAChD;AAEO,SAAS,iBAAiB;AAAA,EAC/B;AAAA,EACA,cAAc;AAAA,EACd,QAAQ;AAAA,EACR,QAAQ,CAAC,SAAS,KAAK;AAAA,EACvB;AAAA,EACA,qBAAqB,MAAM;AAAA,EAC3B;AACF,GAAG;AAED,WAAS,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;AACpC,UAAM,YAAY,QAAQ;AAC1B,UAAM,WAAW,KAAK,CAAC,EAAE,WAAW;AACpC,UAAM,UAAU,YAAY,CAAC,CAAC,SAAS;AACvC,UAAM,OAAO;AAAA,MACX,OAAO;AAAA,MACP,IAAI,MAAM,KAAK,CAAC,CAAC;AAAA,MACjB,MAAM,KAAK,CAAC;AAAA,MACZ,MAAM,QAAQ,YAAY,GAAG,WAAW;AAAA,MACxC;AAAA,MACA,cAAc;AAAA,MACd,YAAY,cAAc;AAAA,QACxB,SAAS;AAAA,QACT,MAAM,EAAE,UAAU,KAAK;AAAA,MACzB;AAAA,IACF;AACA,OAAG,IAAI;AACP,QAAI,mBAAmB,IAAI,KAAK,YAAY,SAAS,QAAQ;AAC3D,uBAAiB;AAAA,QACf,MAAM;AAAA,QACN,OAAO;AAAA,QACP,YAAY;AAAA,QACZ;AAAA,QACA;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AACF;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
18
18
|
return to;
|
19
19
|
};
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
22
26
|
mod
|
23
27
|
));
|
@@ -46,20 +50,20 @@ __export(plugins_exports, {
|
|
46
50
|
});
|
47
51
|
module.exports = __toCommonJS(plugins_exports);
|
48
52
|
var React = __toESM(require("react"));
|
49
|
-
var import_body_header_scroll_sync = require("./body-header-scroll-sync");
|
50
|
-
var import_column_dnd = require("./column-dnd");
|
51
|
-
var import_column_sizing = require("./column-sizing");
|
52
|
-
var import_custom_cell_renderer = require("./custom-cell-renderer");
|
53
|
-
var import_editable = require("./editable");
|
54
|
-
var import_expandable_grid = require("./expandable-grid");
|
55
|
-
var import_filterable = require("./filterable");
|
56
|
-
var import_infinite_scrolling = require("./infinite-scrolling");
|
57
|
-
var import_pagination = require("./pagination");
|
58
|
-
var import_resizable = require("./resizable");
|
59
|
-
var import_row_dnd = require("./row-dnd");
|
60
|
-
var import_selectable = require("./selectable");
|
61
|
-
var import_sortable = require("./sortable");
|
62
|
-
var import_toolbar = require("./toolbar");
|
63
|
-
var import_export_data = require("./export-data");
|
64
|
-
var import_virtualization = require("./virtualization");
|
53
|
+
var import_body_header_scroll_sync = require("./body-header-scroll-sync/index.js");
|
54
|
+
var import_column_dnd = require("./column-dnd/index.js");
|
55
|
+
var import_column_sizing = require("./column-sizing/index.js");
|
56
|
+
var import_custom_cell_renderer = require("./custom-cell-renderer/index.js");
|
57
|
+
var import_editable = require("./editable/index.js");
|
58
|
+
var import_expandable_grid = require("./expandable-grid/index.js");
|
59
|
+
var import_filterable = require("./filterable/index.js");
|
60
|
+
var import_infinite_scrolling = require("./infinite-scrolling/index.js");
|
61
|
+
var import_pagination = require("./pagination/index.js");
|
62
|
+
var import_resizable = require("./resizable/index.js");
|
63
|
+
var import_row_dnd = require("./row-dnd/index.js");
|
64
|
+
var import_selectable = require("./selectable/index.js");
|
65
|
+
var import_sortable = require("./sortable/index.js");
|
66
|
+
var import_toolbar = require("./toolbar/index.js");
|
67
|
+
var import_export_data = require("./export-data/index.js");
|
68
|
+
var import_virtualization = require("./virtualization/index.js");
|
65
69
|
//# sourceMappingURL=index.js.map
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../src/plugins/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
4
|
-
"sourcesContent": ["export { BodyHeaderScrollSyncPlugin } from './body-header-scroll-sync';\nexport { DndColumnsPlugin } from './column-dnd';\nexport { ColumnSizingPlugin } from './column-sizing';\nexport { CustomRendererPlugin } from './custom-cell-renderer';\nexport { EditablePlugin, ComboBox, TextBox } from './editable';\nexport { ExpandableColumn, ExpandablePlugin } from './expandable-grid';\nexport { FilterablePlugin } from './filterable';\nexport { InfiniteScrollPlugin } from './infinite-scrolling';\nexport { PaginationPlugin } from './pagination';\nexport { ResizablePlugin } from './resizable';\nexport { DndRowsPlugin } from './row-dnd';\nexport { SelectablePlugin } from './selectable';\nexport { SortablePlugin } from './sortable';\nexport { ToolbarPlugin } from './toolbar';\nexport { ExportDataPlugin } from './export-data';\nexport { VirtualizationPlugin } from './virtualization';\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
-
"mappings": "
|
4
|
+
"sourcesContent": ["export { BodyHeaderScrollSyncPlugin } from './body-header-scroll-sync/index.js';\nexport { DndColumnsPlugin } from './column-dnd/index.js';\nexport { ColumnSizingPlugin } from './column-sizing/index.js';\nexport { CustomRendererPlugin } from './custom-cell-renderer/index.js';\nexport { EditablePlugin, ComboBox, TextBox } from './editable/index.js';\nexport { ExpandableColumn, ExpandablePlugin } from './expandable-grid/index.js';\nexport { FilterablePlugin } from './filterable/index.js';\nexport { InfiniteScrollPlugin } from './infinite-scrolling/index.js';\nexport { PaginationPlugin } from './pagination/index.js';\nexport { ResizablePlugin } from './resizable/index.js';\nexport { DndRowsPlugin } from './row-dnd/index.js';\nexport { SelectablePlugin } from './selectable/index.js';\nexport { SortablePlugin } from './sortable/index.js';\nexport { ToolbarPlugin } from './toolbar/index.js';\nexport { ExportDataPlugin } from './export-data/index.js';\nexport { VirtualizationPlugin } from './virtualization/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,qCAA2C;AAC3C,wBAAiC;AACjC,2BAAmC;AACnC,kCAAqC;AACrC,sBAAkD;AAClD,6BAAmD;AACnD,wBAAiC;AACjC,gCAAqC;AACrC,wBAAiC;AACjC,uBAAgC;AAChC,qBAA8B;AAC9B,wBAAiC;AACjC,sBAA+B;AAC/B,qBAA8B;AAC9B,yBAAiC;AACjC,4BAAqC;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
18
18
|
return to;
|
19
19
|
};
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
22
26
|
mod
|
23
27
|
));
|
@@ -2,6 +2,6 @@
|
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../src/plugins/infinite-scrolling/InfiniteScrollPlugin.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
4
4
|
"sourcesContent": ["import { useRef, useEffect, useState } from 'react';\nimport { createInstancePlugin } from '@elliemae/ds-shared';\n\n// TODO: EXPORT A SEPARATED INFINITE LOADER GRID\n\nconst registerStateHook = (grid) => {\n const {\n props: { getData, onInfiniteScrolling = () => null },\n actions: { updateRows },\n } = grid;\n\n const loading = useRef(false);\n\n const addMoreData = (data = []) => {\n loading.current = false;\n updateRows((prevRows) => prevRows.concat(data || []));\n };\n\n const doLoadData = async (currentRows) => {\n loading.current = true;\n return Promise.resolve(getData(currentRows)).then(addMoreData);\n };\n\n const loadMoreData = (currentRows) => {\n onInfiniteScrolling(currentRows);\n if (loading.current || !getData) return;\n doLoadData(currentRows);\n };\n\n return {\n actions: {\n loadMoreData,\n },\n };\n};\n\nconst getBodyProps = ({ children, ...props }, grid) => {\n const { loadMoreData } = grid.getInstance().actions;\n\n const [bodyNode, setBodyRef] = useState();\n const prevScroll = useRef();\n prevScroll.current = 0;\n\n const handleBodyScroll = (event, s) => {\n const { target } = event;\n const { scrollHeight, scrollTop, offsetHeight, scrollLeft } = target;\n const { composedRows } = grid.getInstance();\n // prevent horizontal scroll triggering infinite scrolling callbacks\n if (prevScroll.current !== scrollLeft) {\n prevScroll.current = scrollLeft;\n return;\n }\n // todo: clean this. Better approach using another component for the infinite scroll\n if (bodyNode !== target) return;\n if (scrollTop + offsetHeight >= scrollHeight - 1) {\n loadMoreData(composedRows);\n }\n };\n\n useEffect(() => {\n if (bodyNode) {\n bodyNode.addEventListener('scroll', handleBodyScroll);\n }\n return () => {\n if (bodyNode) {\n bodyNode.removeEventListener('scroll', handleBodyScroll);\n }\n };\n }, [bodyNode]);\n\n return {\n ...props,\n listProps: { outerRef: setBodyRef },\n };\n};\n\nexport const InfiniteScrollPlugin = createInstancePlugin('infinite-scroll', {\n registerStateHook,\n getBodyProps,\n});\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
-
"mappings": "
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAA4C;AAC5C,uBAAqC;AAIrC,MAAM,oBAAoB,CAAC,SAAS;AAClC,QAAM;AAAA,IACJ,OAAO,EAAE,SAAS,sBAAsB,MAAM,KAAK;AAAA,IACnD,SAAS,EAAE,WAAW;AAAA,EACxB,IAAI;AAEJ,QAAM,cAAU,qBAAO,KAAK;AAE5B,QAAM,cAAc,CAAC,OAAO,CAAC,MAAM;AACjC,YAAQ,UAAU;AAClB,eAAW,CAAC,aAAa,SAAS,OAAO,QAAQ,CAAC,CAAC,CAAC;AAAA,EACtD;AAEA,QAAM,aAAa,OAAO,gBAAgB;AACxC,YAAQ,UAAU;AAClB,WAAO,QAAQ,QAAQ,QAAQ,WAAW,CAAC,EAAE,KAAK,WAAW;AAAA,EAC/D;AAEA,QAAM,eAAe,CAAC,gBAAgB;AACpC,wBAAoB,WAAW;AAC/B,QAAI,QAAQ,WAAW,CAAC;AAAS;AACjC,eAAW,WAAW;AAAA,EACxB;AAEA,SAAO;AAAA,IACL,SAAS;AAAA,MACP;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,eAAe,CAAC,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS;AACrD,QAAM,EAAE,aAAa,IAAI,KAAK,YAAY,EAAE;AAE5C,QAAM,CAAC,UAAU,UAAU,QAAI,uBAAS;AACxC,QAAM,iBAAa,qBAAO;AAC1B,aAAW,UAAU;AAErB,QAAM,mBAAmB,CAAC,OAAO,MAAM;AACrC,UAAM,EAAE,OAAO,IAAI;AACnB,UAAM,EAAE,cAAc,WAAW,cAAc,WAAW,IAAI;AAC9D,UAAM,EAAE,aAAa,IAAI,KAAK,YAAY;AAE1C,QAAI,WAAW,YAAY,YAAY;AACrC,iBAAW,UAAU;AACrB;AAAA,IACF;AAEA,QAAI,aAAa;AAAQ;AACzB,QAAI,YAAY,gBAAgB,eAAe,GAAG;AAChD,mBAAa,YAAY;AAAA,IAC3B;AAAA,EACF;AAEA,8BAAU,MAAM;AACd,QAAI,UAAU;AACZ,eAAS,iBAAiB,UAAU,gBAAgB;AAAA,IACtD;AACA,WAAO,MAAM;AACX,UAAI,UAAU;AACZ,iBAAS,oBAAoB,UAAU,gBAAgB;AAAA,MACzD;AAAA,IACF;AAAA,EACF,GAAG,CAAC,QAAQ,CAAC;AAEb,SAAO;AAAA,IACL,GAAG;AAAA,IACH,WAAW,EAAE,UAAU,WAAW;AAAA,EACpC;AACF;AAEO,MAAM,2BAAuB,uCAAqB,mBAAmB;AAAA,EAC1E;AAAA,EACA;AACF,CAAC;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
18
18
|
return to;
|
19
19
|
};
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
22
26
|
mod
|
23
27
|
));
|
@@ -28,5 +32,5 @@ __export(infinite_scrolling_exports, {
|
|
28
32
|
});
|
29
33
|
module.exports = __toCommonJS(infinite_scrolling_exports);
|
30
34
|
var React = __toESM(require("react"));
|
31
|
-
var import_InfiniteScrollPlugin = require("./InfiniteScrollPlugin");
|
35
|
+
var import_InfiniteScrollPlugin = require("./InfiniteScrollPlugin.js");
|
32
36
|
//# sourceMappingURL=index.js.map
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../src/plugins/infinite-scrolling/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
4
|
-
"sourcesContent": ["export { InfiniteScrollPlugin } from './InfiniteScrollPlugin';\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
-
"mappings": "
|
4
|
+
"sourcesContent": ["export { InfiniteScrollPlugin } from './InfiniteScrollPlugin.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,kCAAqC;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
18
18
|
return to;
|
19
19
|
};
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
22
26
|
mod
|
23
27
|
));
|
@@ -32,9 +36,9 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
32
36
|
var import_react = __toESM(require("react"));
|
33
37
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
34
38
|
var import_ds_shared = require("@elliemae/ds-shared");
|
35
|
-
var import_helper = require("./helper");
|
36
|
-
var import_usePaginationState = require("./usePaginationState");
|
37
|
-
var import_NoResults = require("../../components/NoResults");
|
39
|
+
var import_helper = require("./helper.js");
|
40
|
+
var import_usePaginationState = require("./usePaginationState.js");
|
41
|
+
var import_NoResults = require("../../components/NoResults.js");
|
38
42
|
const composeRows = (rows, grid) => {
|
39
43
|
const {
|
40
44
|
state: { pagination },
|
@@ -62,6 +66,7 @@ const Body = import_react.default.memo(
|
|
62
66
|
noResultsPlaceholder,
|
63
67
|
innerRef,
|
64
68
|
innerBodyRef,
|
69
|
+
// depends on body-header-scroll-sync
|
65
70
|
isPlaceholderActive = false,
|
66
71
|
...otherBodyProps
|
67
72
|
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, { ...otherBodyProps, innerRef: (0, import_ds_utilities.mergeRefs)(innerRef), children: !isPlaceholderActive ? rows.map((row, index) => rowRenderer(row, { index, rowIndex: index }, {})) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_NoResults.NoResults, { innerRef, rowRenderer, children: noResultsPlaceholder }) })
|
@@ -69,7 +74,7 @@ const Body = import_react.default.memo(
|
|
69
74
|
const decorateRenderers = (renderers, grid) => {
|
70
75
|
const BodyWrapper = renderers.body.wrapper;
|
71
76
|
renderers.body.wrapper = (0, import_react.useMemo)(
|
72
|
-
() => (props)
|
77
|
+
() => function(props) {
|
73
78
|
const { hotKeys, shouldRefocus, state } = grid.getInstance();
|
74
79
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_shared.FocusGrid, { hotKeys, shouldRefocus: false, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Body, { ...props, component: BodyWrapper }) });
|
75
80
|
},
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../src/plugins/pagination/PaginationPlugin.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
4
|
-
"sourcesContent": ["/* eslint-disable react/display-name */\nimport React, { useMemo } from 'react';\nimport { mergeRefs } from '@elliemae/ds-utilities';\nimport { createInstancePlugin, FocusGrid } from '@elliemae/ds-shared';\nimport { paginate } from './helper';\nimport { usePaginationState } from './usePaginationState';\nimport { NoResults } from '../../components/NoResults';\n\nconst composeRows = (rows, grid) => {\n const {\n state: { pagination },\n props: { groupedRows },\n } = grid.getInstance();\n if (groupedRows) return rows; // disable pagination with grouping\n if (groupedRows) {\n const filterIds = rows.map((r) => r.id);\n return paginate(\n rows\n .filter((c) => filterIds.includes(c.id))\n .map((r) => ({\n ...r,\n _isGroup: r.isGroup,\n })),\n pagination,\n );\n }\n\n return paginate(rows, pagination);\n};\n\nconst Body = React.memo(\n ({\n component: Component,\n rows,\n rowRenderer,\n noResultsPlaceholder,\n innerRef,\n innerBodyRef, // depends on body-header-scroll-sync\n isPlaceholderActive = false,\n ...otherBodyProps\n }) => (\n <Component {...otherBodyProps} innerRef={mergeRefs(innerRef)}>\n {!isPlaceholderActive ? (\n rows.map((row, index) => rowRenderer(row, { index, rowIndex: index }, {}))\n ) : (\n <NoResults innerRef={innerRef} rowRenderer={rowRenderer}>\n {noResultsPlaceholder}\n </NoResults>\n )}\n </Component>\n ),\n);\n\nconst decorateRenderers = (renderers, grid) => {\n const BodyWrapper = renderers.body.wrapper;\n renderers.body.wrapper = useMemo(\n ()
|
5
|
-
"mappings": "
|
4
|
+
"sourcesContent": ["/* eslint-disable react/display-name */\nimport React, { useMemo } from 'react';\nimport { mergeRefs } from '@elliemae/ds-utilities';\nimport { createInstancePlugin, FocusGrid } from '@elliemae/ds-shared';\nimport { paginate } from './helper.js';\nimport { usePaginationState } from './usePaginationState.js';\nimport { NoResults } from '../../components/NoResults.js';\n\nconst composeRows = (rows, grid) => {\n const {\n state: { pagination },\n props: { groupedRows },\n } = grid.getInstance();\n if (groupedRows) return rows; // disable pagination with grouping\n if (groupedRows) {\n const filterIds = rows.map((r) => r.id);\n return paginate(\n rows\n .filter((c) => filterIds.includes(c.id))\n .map((r) => ({\n ...r,\n _isGroup: r.isGroup,\n })),\n pagination,\n );\n }\n\n return paginate(rows, pagination);\n};\n\nconst Body = React.memo(\n ({\n component: Component,\n rows,\n rowRenderer,\n noResultsPlaceholder,\n innerRef,\n innerBodyRef, // depends on body-header-scroll-sync\n isPlaceholderActive = false,\n ...otherBodyProps\n }) => (\n <Component {...otherBodyProps} innerRef={mergeRefs(innerRef)}>\n {!isPlaceholderActive ? (\n rows.map((row, index) => rowRenderer(row, { index, rowIndex: index }, {}))\n ) : (\n <NoResults innerRef={innerRef} rowRenderer={rowRenderer}>\n {noResultsPlaceholder}\n </NoResults>\n )}\n </Component>\n ),\n);\n\nconst decorateRenderers = (renderers, grid) => {\n const BodyWrapper = renderers.body.wrapper;\n renderers.body.wrapper = useMemo(\n () =>\n function (props) {\n const { hotKeys, shouldRefocus, state } = grid.getInstance();\n return (\n <FocusGrid hotKeys={hotKeys} shouldRefocus={false}>\n <Body {...props} component={BodyWrapper} />\n </FocusGrid>\n );\n },\n [],\n );\n return renderers;\n};\n\nexport const PaginationPlugin = createInstancePlugin('pagination', {\n registerStateHook: usePaginationState,\n decorateRenderers,\n composeRows,\n});\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD6Cf;AA5CR,mBAA+B;AAC/B,0BAA0B;AAC1B,uBAAgD;AAChD,oBAAyB;AACzB,gCAAmC;AACnC,uBAA0B;AAE1B,MAAM,cAAc,CAAC,MAAM,SAAS;AAClC,QAAM;AAAA,IACJ,OAAO,EAAE,WAAW;AAAA,IACpB,OAAO,EAAE,YAAY;AAAA,EACvB,IAAI,KAAK,YAAY;AACrB,MAAI;AAAa,WAAO;AACxB,MAAI,aAAa;AACf,UAAM,YAAY,KAAK,IAAI,CAAC,MAAM,EAAE,EAAE;AACtC,eAAO;AAAA,MACL,KACG,OAAO,CAAC,MAAM,UAAU,SAAS,EAAE,EAAE,CAAC,EACtC,IAAI,CAAC,OAAO;AAAA,QACX,GAAG;AAAA,QACH,UAAU,EAAE;AAAA,MACd,EAAE;AAAA,MACJ;AAAA,IACF;AAAA,EACF;AAEA,aAAO,wBAAS,MAAM,UAAU;AAClC;AAEA,MAAM,OAAO,aAAAA,QAAM;AAAA,EACjB,CAAC;AAAA,IACC,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IACA,sBAAsB;AAAA,IACtB,GAAG;AAAA,EACL,MACE,4CAAC,aAAW,GAAG,gBAAgB,cAAU,+BAAU,QAAQ,GACxD,WAAC,sBACA,KAAK,IAAI,CAAC,KAAK,UAAU,YAAY,KAAK,EAAE,OAAO,UAAU,MAAM,GAAG,CAAC,CAAC,CAAC,IAEzE,4CAAC,8BAAU,UAAoB,aAC5B,gCACH,GAEJ;AAEJ;AAEA,MAAM,oBAAoB,CAAC,WAAW,SAAS;AAC7C,QAAM,cAAc,UAAU,KAAK;AACnC,YAAU,KAAK,cAAU;AAAA,IACvB,MACE,SAAU,OAAO;AACf,YAAM,EAAE,SAAS,eAAe,MAAM,IAAI,KAAK,YAAY;AAC3D,aACE,4CAAC,8BAAU,SAAkB,eAAe,OAC1C,sDAAC,QAAM,GAAG,OAAO,WAAW,aAAa,GAC3C;AAAA,IAEJ;AAAA,IACF,CAAC;AAAA,EACH;AACA,SAAO;AACT;AAEO,MAAM,uBAAmB,uCAAqB,cAAc;AAAA,EACjE,mBAAmB;AAAA,EACnB;AAAA,EACA;AACF,CAAC;",
|
6
6
|
"names": ["React"]
|
7
7
|
}
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
18
18
|
return to;
|
19
19
|
};
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
22
26
|
mod
|
23
27
|
));
|
@@ -30,12 +34,9 @@ module.exports = __toCommonJS(Pagination_exports);
|
|
30
34
|
var React = __toESM(require("react"));
|
31
35
|
var import_jsx_runtime = require("react/jsx-runtime");
|
32
36
|
var import_ds_classnames = require("@elliemae/ds-classnames");
|
33
|
-
var import_Paginator = require("./Paginator");
|
34
|
-
var import_PerPageDropdown = require("./PerPageDropdown");
|
35
|
-
const PaginationControls = (0, import_ds_classnames.aggregatedClasses)("div")(
|
36
|
-
"data-grid",
|
37
|
-
"controls-pagination"
|
38
|
-
);
|
37
|
+
var import_Paginator = require("./Paginator.js");
|
38
|
+
var import_PerPageDropdown = require("./PerPageDropdown.js");
|
39
|
+
const PaginationControls = (0, import_ds_classnames.aggregatedClasses)("div")("data-grid", "controls-pagination");
|
39
40
|
const Pagination = ({
|
40
41
|
paginated,
|
41
42
|
pagination = {},
|
@@ -49,24 +50,8 @@ const Pagination = ({
|
|
49
50
|
if (pagination && pagination.conditionalPagination === true && paginated.amount === 1)
|
50
51
|
return null;
|
51
52
|
return paginated.amount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(PaginationControls, { children: [
|
52
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
53
|
-
|
54
|
-
{
|
55
|
-
max: maxPerPage,
|
56
|
-
min: minPerPage,
|
57
|
-
onChange: onPerPage,
|
58
|
-
step: paginationStep,
|
59
|
-
value: perPage
|
60
|
-
}
|
61
|
-
),
|
62
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
63
|
-
import_Paginator.Paginator,
|
64
|
-
{
|
65
|
-
onSelect: onPageSelect,
|
66
|
-
pages: paginated.amount,
|
67
|
-
pagination
|
68
|
-
}
|
69
|
-
)
|
53
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_PerPageDropdown.PerPageDropdown, { max: maxPerPage, min: minPerPage, onChange: onPerPage, step: paginationStep, value: perPage }),
|
54
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Paginator.Paginator, { onSelect: onPageSelect, pages: paginated.amount, pagination })
|
70
55
|
] }) : null;
|
71
56
|
};
|
72
57
|
//# sourceMappingURL=Pagination.js.map
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../../src/plugins/pagination/components/Pagination.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { Paginator } from './Paginator';\nimport { PerPageDropdown } from './PerPageDropdown';\n\nconst PaginationControls = aggregatedClasses('div')(
|
5
|
-
"mappings": "
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { Paginator } from './Paginator.js';\nimport { PerPageDropdown } from './PerPageDropdown.js';\n\nconst PaginationControls = aggregatedClasses('div')('data-grid', 'controls-pagination');\n\nconst Pagination = ({\n paginated,\n pagination = {},\n onPerPage,\n onPageSelect,\n paginationStep = 5,\n maxPerPage = 10,\n minPerPage = 5,\n}) => {\n const { perPage } = pagination;\n if (pagination && pagination.conditionalPagination === true && paginated.amount === 1) return null;\n return paginated.amount > 0 ? (\n <PaginationControls>\n <PerPageDropdown max={maxPerPage} min={minPerPage} onChange={onPerPage} step={paginationStep} value={perPage} />\n <Paginator onSelect={onPageSelect} pages={paginated.amount} pagination={pagination} />\n </PaginationControls>\n ) : null;\n};\n\nexport { Pagination };\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADmBnB;AAlBJ,2BAAkC;AAClC,uBAA0B;AAC1B,6BAAgC;AAEhC,MAAM,yBAAqB,wCAAkB,KAAK,EAAE,aAAa,qBAAqB;AAEtF,MAAM,aAAa,CAAC;AAAA,EAClB;AAAA,EACA,aAAa,CAAC;AAAA,EACd;AAAA,EACA;AAAA,EACA,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,aAAa;AACf,MAAM;AACJ,QAAM,EAAE,QAAQ,IAAI;AACpB,MAAI,cAAc,WAAW,0BAA0B,QAAQ,UAAU,WAAW;AAAG,WAAO;AAC9F,SAAO,UAAU,SAAS,IACxB,6CAAC,sBACC;AAAA,gDAAC,0CAAgB,KAAK,YAAY,KAAK,YAAY,UAAU,WAAW,MAAM,gBAAgB,OAAO,SAAS;AAAA,IAC9G,4CAAC,8BAAU,UAAU,cAAc,OAAO,UAAU,QAAQ,YAAwB;AAAA,KACtF,IACE;AACN;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
18
18
|
return to;
|
19
19
|
};
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
22
26
|
mod
|
23
27
|
));
|
@@ -33,9 +37,10 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
33
37
|
var import_react_pagify = __toESM(require("react-pagify"));
|
34
38
|
var import_segmentize = __toESM(require("segmentize"));
|
35
39
|
var import_ds_classnames = require("@elliemae/ds-classnames");
|
40
|
+
const Comp = import_react_pagify.default?.default ?? import_react_pagify.default;
|
36
41
|
const blockName = "data-grid";
|
37
42
|
const PaginationContainer = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "pagination");
|
38
|
-
const PagifyContext = (0, import_ds_classnames.aggregatedClasses)(
|
43
|
+
const PagifyContext = (0, import_ds_classnames.aggregatedClasses)(Comp?.Context)(blockName, "pagify-pagination");
|
39
44
|
const Paginator = ({ pagination, pages, onSelect, labelPrevious = "Previous", labelNext = "Next" }) => {
|
40
45
|
const prevPage = pagination.page - 1;
|
41
46
|
const nextPage = pagination.page + 1;
|
@@ -51,15 +56,15 @@ const Paginator = ({ pagination, pages, onSelect, labelPrevious = "Previous", la
|
|
51
56
|
sidePages: 1
|
52
57
|
}),
|
53
58
|
children: [
|
54
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
55
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
56
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
57
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
58
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
59
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
60
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
61
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
62
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
59
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp.Button, { className: pagination.page <= 1 ? "button-disabled" : "", page: prevPage, children: labelPrevious }),
|
60
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp.Segment, { field: "beginPages" }),
|
61
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp.Ellipsis, { className: "ellipsis", nextField: "previousPages", previousField: "beginPages" }),
|
62
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp.Segment, { field: "previousPages" }),
|
63
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp.Segment, { className: "selected", field: "centerPage" }),
|
64
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp.Segment, { field: "nextPages" }),
|
65
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp.Ellipsis, { className: "ellipsis", nextField: "endPages", previousField: "nextPages" }),
|
66
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp.Segment, { field: "endPages" }),
|
67
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp.Button, { className: pagination.page >= pages ? "button-disabled" : "", page: nextPage, children: labelNext })
|
63
68
|
]
|
64
69
|
}
|
65
70
|
) });
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../../src/plugins/pagination/components/Paginator.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
4
|
-
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\nimport React from 'react';\nimport ReactPagify from 'react-pagify';\nimport segmentize from 'segmentize';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\n\nconst blockName = 'data-grid';\
|
5
|
-
"mappings": "
|
4
|
+
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\nimport React from 'react';\nimport { default as ReactPagify } from 'react-pagify';\nimport segmentize from 'segmentize';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\n\nconst Comp = (ReactPagify as any)?.default ?? ReactPagify;\nconst blockName = 'data-grid';\nconst PaginationContainer = aggregatedClasses('div')(blockName, 'pagination');\nconst PagifyContext = aggregatedClasses(Comp?.Context)(blockName, 'pagify-pagination');\n\nconst Paginator = ({ pagination, pages, onSelect, labelPrevious = 'Previous', labelNext = 'Next' }) => {\n const prevPage = pagination.page - 1;\n const nextPage = pagination.page + 1;\n\n return (\n <PaginationContainer>\n <PagifyContext\n onSelect={(page) => page !== pagination.page && onSelect(page)}\n segments={segmentize({\n page: pagination.page,\n pages,\n beginPages: 1,\n endPages: 1,\n sidePages: 1,\n })}\n >\n <Comp.Button className={pagination.page <= 1 ? 'button-disabled' : ''} page={prevPage}>\n {labelPrevious}\n </Comp.Button>\n\n <Comp.Segment field=\"beginPages\" />\n\n <Comp.Ellipsis className=\"ellipsis\" nextField=\"previousPages\" previousField=\"beginPages\" />\n\n <Comp.Segment field=\"previousPages\" />\n <Comp.Segment className=\"selected\" field=\"centerPage\" />\n <Comp.Segment field=\"nextPages\" />\n\n <Comp.Ellipsis className=\"ellipsis\" nextField=\"endPages\" previousField=\"nextPages\" />\n\n <Comp.Segment field=\"endPages\" />\n\n <Comp.Button className={pagination.page >= pages ? 'button-disabled' : ''} page={nextPage}>\n {labelNext}\n </Comp.Button>\n </PagifyContext>\n </PaginationContainer>\n );\n};\n\nexport { Paginator };\nexport default Paginator;\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkBjB;AAfN,0BAAuC;AACvC,wBAAuB;AACvB,2BAAkC;AAElC,MAAM,OAAQ,oBAAAA,SAAqB,WAAW,oBAAAA;AAC9C,MAAM,YAAY;AAClB,MAAM,0BAAsB,wCAAkB,KAAK,EAAE,WAAW,YAAY;AAC5E,MAAM,oBAAgB,wCAAkB,MAAM,OAAO,EAAE,WAAW,mBAAmB;AAErF,MAAM,YAAY,CAAC,EAAE,YAAY,OAAO,UAAU,gBAAgB,YAAY,YAAY,OAAO,MAAM;AACrG,QAAM,WAAW,WAAW,OAAO;AACnC,QAAM,WAAW,WAAW,OAAO;AAEnC,SACE,4CAAC,uBACC;AAAA,IAAC;AAAA;AAAA,MACC,UAAU,CAAC,SAAS,SAAS,WAAW,QAAQ,SAAS,IAAI;AAAA,MAC7D,cAAU,kBAAAC,SAAW;AAAA,QACnB,MAAM,WAAW;AAAA,QACjB;AAAA,QACA,YAAY;AAAA,QACZ,UAAU;AAAA,QACV,WAAW;AAAA,MACb,CAAC;AAAA,MAED;AAAA,oDAAC,KAAK,QAAL,EAAY,WAAW,WAAW,QAAQ,IAAI,oBAAoB,IAAI,MAAM,UAC1E,yBACH;AAAA,QAEA,4CAAC,KAAK,SAAL,EAAa,OAAM,cAAa;AAAA,QAEjC,4CAAC,KAAK,UAAL,EAAc,WAAU,YAAW,WAAU,iBAAgB,eAAc,cAAa;AAAA,QAEzF,4CAAC,KAAK,SAAL,EAAa,OAAM,iBAAgB;AAAA,QACpC,4CAAC,KAAK,SAAL,EAAa,WAAU,YAAW,OAAM,cAAa;AAAA,QACtD,4CAAC,KAAK,SAAL,EAAa,OAAM,aAAY;AAAA,QAEhC,4CAAC,KAAK,UAAL,EAAc,WAAU,YAAW,WAAU,YAAW,eAAc,aAAY;AAAA,QAEnF,4CAAC,KAAK,SAAL,EAAa,OAAM,YAAW;AAAA,QAE/B,4CAAC,KAAK,QAAL,EAAY,WAAW,WAAW,QAAQ,QAAQ,oBAAoB,IAAI,MAAM,UAC9E,qBACH;AAAA;AAAA;AAAA,EACF,GACF;AAEJ;AAGA,IAAO,oBAAQ;",
|
6
6
|
"names": ["ReactPagify", "segmentize"]
|
7
7
|
}
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
18
18
|
return to;
|
19
19
|
};
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
22
26
|
mod
|
23
27
|
));
|
@@ -46,7 +50,7 @@ const getOptions = (0, import_memoize_one.default)((step, min, max) => {
|
|
46
50
|
const options = (0, import_ds_utilities.range)(min, max + step, step).map(generateOption);
|
47
51
|
return min === 0 ? options.slice(1, options.length) : options;
|
48
52
|
});
|
49
|
-
|
53
|
+
const PerPageDropdown = ({ min = 0, max = 100, step = 5, value = 0, onChange = () => null }) => {
|
50
54
|
const options = getOptions(step, min, max);
|
51
55
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
52
56
|
import_ds_form.DSComboBox,
|
@@ -65,6 +69,6 @@ function PerPageDropdown({ min = 0, max = 100, step = 5, value = 0, onChange = (
|
|
65
69
|
value
|
66
70
|
}
|
67
71
|
);
|
68
|
-
}
|
72
|
+
};
|
69
73
|
var PerPageDropdown_default = PerPageDropdown;
|
70
74
|
//# sourceMappingURL=PerPageDropdown.js.map
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../../src/plugins/pagination/components/PerPageDropdown.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport memoize from 'memoize-one';\nimport { range } from '@elliemae/ds-utilities';\nimport { DSComboBox, components } from '@elliemae/ds-form';\n\nconst SingleValue = ({ children, ...props }) => (\n <components.SingleValue {...props}>\n {children} <span>per page</span>\n </components.SingleValue>\n);\n\nconst generateOption = (value) => ({\n value,\n label: value,\n});\nconst getOptions = memoize((step, min, max) => {\n const options = range(min, max + step, step).map(generateOption);\n return min === 0 ? options.slice(1, options.length) : options;\n});\n\
|
5
|
-
"mappings": "
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport memoize from 'memoize-one';\nimport { range } from '@elliemae/ds-utilities';\nimport { DSComboBox, components } from '@elliemae/ds-form';\n\nconst SingleValue = ({ children, ...props }) => (\n <components.SingleValue {...props}>\n {children} <span>per page</span>\n </components.SingleValue>\n);\n\nconst generateOption = (value) => ({\n value,\n label: value,\n});\nconst getOptions = memoize((step, min, max) => {\n const options = range(min, max + step, step).map(generateOption);\n return min === 0 ? options.slice(1, options.length) : options;\n});\n\nconst PerPageDropdown = ({ min = 0, max = 100, step = 5, value = 0, onChange = () => null }) => {\n const options = getOptions(step, min, max);\n return (\n <DSComboBox\n className=\"per-page-dropdown\"\n components={{\n SingleValue,\n }}\n containerProps={{\n 'data-testid': 'per-page-dropdown',\n }}\n maxOptions={10}\n onChange={onChange}\n options={options}\n searchable={false}\n value={value}\n />\n );\n};\n\nexport { PerPageDropdown };\nexport default PerPageDropdown;\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADMrB;AALF,yBAAoB;AACpB,0BAAsB;AACtB,qBAAuC;AAEvC,MAAM,cAAc,CAAC,EAAE,UAAU,GAAG,MAAM,MACxC,6CAAC,0BAAW,aAAX,EAAwB,GAAG,OACzB;AAAA;AAAA,EAAS;AAAA,EAAC,4CAAC,UAAK,sBAAQ;AAAA,GAC3B;AAGF,MAAM,iBAAiB,CAAC,WAAW;AAAA,EACjC;AAAA,EACA,OAAO;AACT;AACA,MAAM,iBAAa,mBAAAA,SAAQ,CAAC,MAAM,KAAK,QAAQ;AAC7C,QAAM,cAAU,2BAAM,KAAK,MAAM,MAAM,IAAI,EAAE,IAAI,cAAc;AAC/D,SAAO,QAAQ,IAAI,QAAQ,MAAM,GAAG,QAAQ,MAAM,IAAI;AACxD,CAAC;AAED,MAAM,kBAAkB,CAAC,EAAE,MAAM,GAAG,MAAM,KAAK,OAAO,GAAG,QAAQ,GAAG,WAAW,MAAM,KAAK,MAAM;AAC9F,QAAM,UAAU,WAAW,MAAM,KAAK,GAAG;AACzC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,YAAY;AAAA,QACV;AAAA,MACF;AAAA,MACA,gBAAgB;AAAA,QACd,eAAe;AAAA,MACjB;AAAA,MACA,YAAY;AAAA,MACZ;AAAA,MACA;AAAA,MACA,YAAY;AAAA,MACZ;AAAA;AAAA,EACF;AAEJ;AAGA,IAAO,0BAAQ;",
|
6
6
|
"names": ["memoize"]
|
7
7
|
}
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
18
18
|
return to;
|
19
19
|
};
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
22
26
|
mod
|
23
27
|
));
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../src/plugins/pagination/helper.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
4
|
-
"sourcesContent": ["export const parsePerPageNumber = (number, max, min = 1) => {\n if (number > max) return max;\n if (number < min) return min;\n return number;\n};\n\nexport const paginate = (
|
5
|
-
"mappings": "
|
4
|
+
"sourcesContent": ["export const parsePerPageNumber = (number, max, min = 1) => {\n if (number > max) return max;\n if (number < min) return min;\n return number;\n};\n\nexport const paginate = (rows, { page, perPage = 1, amountOfPages: amount, totalRows }) => {\n // return if pagination state is controlled\n if (amount && totalRows) {\n return {\n amount,\n rows,\n page,\n };\n }\n // adapt to zero indexed logic\n const p = page - 1 || 0;\n\n const amountOfPages = perPage ? Math.ceil(rows.length / (perPage > 0 ? perPage : 1)) : 1;\n const startPage = p < amountOfPages ? p : 0;\n\n return {\n amount: amountOfPages,\n rows: perPage ? rows.slice(startPage * perPage, startPage * perPage + perPage) : rows,\n allRows: rows,\n page: startPage,\n };\n};\n\nexport default paginate;\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,qBAAqB,CAAC,QAAQ,KAAK,MAAM,MAAM;AAC1D,MAAI,SAAS;AAAK,WAAO;AACzB,MAAI,SAAS;AAAK,WAAO;AACzB,SAAO;AACT;AAEO,MAAM,WAAW,CAAC,MAAM,EAAE,MAAM,UAAU,GAAG,eAAe,QAAQ,UAAU,MAAM;AAEzF,MAAI,UAAU,WAAW;AACvB,WAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,QAAM,IAAI,OAAO,KAAK;AAEtB,QAAM,gBAAgB,UAAU,KAAK,KAAK,KAAK,UAAU,UAAU,IAAI,UAAU,EAAE,IAAI;AACvF,QAAM,YAAY,IAAI,gBAAgB,IAAI;AAE1C,SAAO;AAAA,IACL,QAAQ;AAAA,IACR,MAAM,UAAU,KAAK,MAAM,YAAY,SAAS,YAAY,UAAU,OAAO,IAAI;AAAA,IACjF,SAAS;AAAA,IACT,MAAM;AAAA,EACR;AACF;AAEA,IAAO,iBAAQ;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
18
18
|
return to;
|
19
19
|
};
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
22
26
|
mod
|
23
27
|
));
|
@@ -28,5 +32,5 @@ __export(pagination_exports, {
|
|
28
32
|
});
|
29
33
|
module.exports = __toCommonJS(pagination_exports);
|
30
34
|
var React = __toESM(require("react"));
|
31
|
-
var import_PaginationPlugin = require("./PaginationPlugin");
|
35
|
+
var import_PaginationPlugin = require("./PaginationPlugin.js");
|
32
36
|
//# sourceMappingURL=index.js.map
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../src/plugins/pagination/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
4
|
-
"sourcesContent": ["export { PaginationPlugin } from './PaginationPlugin';\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
-
"mappings": "
|
4
|
+
"sourcesContent": ["export { PaginationPlugin } from './PaginationPlugin.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAAiC;",
|
6
6
|
"names": []
|
7
7
|
}
|