@elliemae/ds-datagrids 3.16.0-rc.5 → 3.16.0-rc.7
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
|
));
|
@@ -30,7 +34,7 @@ module.exports = __toCommonJS(useSelectableState_exports);
|
|
30
34
|
var React = __toESM(require("react"));
|
31
35
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
32
36
|
var import_ds_utilities2 = require("@elliemae/ds-utilities");
|
33
|
-
var import_helper = require("./helper");
|
37
|
+
var import_helper = require("./helper.js");
|
34
38
|
function deriveSelectedStateFromPropsOnUpdate(rows) {
|
35
39
|
return (nextProp = {}, prevProp = {}) => {
|
36
40
|
if (nextProp.selectAll !== prevProp.selectAll) {
|
@@ -61,6 +65,8 @@ function useSelectableState(grid) {
|
|
61
65
|
setSelectedRowsState((prevState) => {
|
62
66
|
const { rows: nextRows } = grid.getInstance();
|
63
67
|
const wasSelected = Object.keys(prevState.selectedRows).some(
|
68
|
+
// we need to match softly as the id may be a number
|
69
|
+
// eslint-disable-next-line eqeqeq
|
64
70
|
(elem) => elem == id
|
65
71
|
);
|
66
72
|
let nextSelectedRows = multiple ? (0, import_ds_utilities2.toggleInObject)(prevState.selectedRows, id, true) : (0, import_helper.toggleSingleSelectable)(prevState.selectedRows, id);
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../src/plugins/selectable/useSelectableState.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
4
|
-
"sourcesContent": ["/* eslint-disable max-lines */\nimport { useDerivedStateFromProps } from '@elliemae/ds-utilities';\nimport { toggleInObject, hashArray, omit } from '@elliemae/ds-utilities';\nimport {
|
5
|
-
"mappings": "
|
4
|
+
"sourcesContent": ["/* eslint-disable max-lines */\nimport { useDerivedStateFromProps } from '@elliemae/ds-utilities';\nimport { toggleInObject, hashArray, omit } from '@elliemae/ds-utilities';\nimport { checkAllRowsSelected, toggleSelectAll, toggleSingleSelectable } from './helper.js';\n\nfunction deriveSelectedStateFromPropsOnUpdate(rows) {\n return (nextProp = {}, prevProp = {}) => {\n if (nextProp.selectAll !== prevProp.selectAll) {\n const nextSelectedRows = nextProp.selectAll\n ? toggleSelectAll(rows, true)\n : hashArray(nextProp.selectedRows || []);\n return {\n selectedRows: nextSelectedRows,\n selectAll: checkAllRowsSelected(rows, Object.keys(nextSelectedRows)),\n };\n }\n return {\n selectedRows: hashArray(nextProp.selectedRows || []),\n selectAll: checkAllRowsSelected(rows, Object.keys(nextProp.selectedRows)),\n };\n };\n}\n\nexport function useSelectableState(grid) {\n const {\n props: { rowKey = 'id', selectedRows, selectAll, selectable, onSelectRow, onSelectAll },\n rows,\n setLastSelectedRow,\n } = grid.getInstance();\n\n const multiple = selectable === 'multi';\n const [selection, setSelectedRowsState] = useDerivedStateFromProps(\n { selectedRows, selectAll },\n { onUpdate: deriveSelectedStateFromPropsOnUpdate(rows) },\n );\n\n // ACTIONS\n const handleSelectRow = (\n id,\n index,\n shift = false,\n lastSelectedRow = null,\n // eslint-disable-next-line max-params\n ) => {\n setSelectedRowsState((prevState) => {\n const { rows: nextRows } = grid.getInstance();\n const wasSelected = Object.keys(prevState.selectedRows).some(\n // we need to match softly as the id may be a number\n // eslint-disable-next-line eqeqeq\n (elem) => elem == id,\n );\n let nextSelectedRows = multiple\n ? toggleInObject(prevState.selectedRows, id, true)\n : toggleSingleSelectable(prevState.selectedRows, id);\n setLastSelectedRow({ index, mode: wasSelected ? 'deselect' : 'select' });\n if (shift && lastSelectedRow) {\n const prevSmallest = lastSelectedRow.index < index + 1;\n const sliceStart = prevSmallest ? lastSelectedRow.index : index;\n const sliceEnd = prevSmallest ? index + 1 : lastSelectedRow.index + 1;\n const rowSegment = nextRows.slice(sliceStart, sliceEnd).map((row) => row[rowKey]);\n if (lastSelectedRow.mode === 'deselect') {\n nextSelectedRows = omit(prevState.selectedRows, rowSegment);\n } else {\n const selectedSegment = rowSegment.reduce((o, key) => ({ ...o, [key]: true }), {});\n nextSelectedRows = {\n ...prevState.selectedRows,\n ...selectedSegment,\n };\n }\n }\n\n const nextState = {\n selectedRows: nextSelectedRows,\n selectAll: checkAllRowsSelected(nextRows, Object.keys(nextSelectedRows)),\n };\n if (index !== null && index !== undefined) {\n onSelectRow(\n nextRows.filter((row) => nextState.selectedRows[row[rowKey]]),\n nextState.selectAll,\n index,\n );\n }\n\n return nextState;\n });\n };\n\n const handleSelectAll = (checked) => {\n if (!multiple) return;\n setLastSelectedRow(null);\n setSelectedRowsState(() => {\n const { composedRows: nextRows } = grid.getInstance();\n\n const nextState = {\n selectAll: checked,\n selectedRows: toggleSelectAll(nextRows, checked),\n };\n\n onSelectAll(nextState.selectAll);\n onSelectRow(checked ? nextRows : [], nextState.selectAll);\n\n return nextState;\n });\n };\n\n return {\n actions: {\n selectRow: handleSelectRow,\n selectAll: handleSelectAll,\n },\n state: {\n selection,\n },\n };\n}\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,0BAAyC;AACzC,IAAAA,uBAAgD;AAChD,oBAA8E;AAE9E,SAAS,qCAAqC,MAAM;AAClD,SAAO,CAAC,WAAW,CAAC,GAAG,WAAW,CAAC,MAAM;AACvC,QAAI,SAAS,cAAc,SAAS,WAAW;AAC7C,YAAM,mBAAmB,SAAS,gBAC9B,+BAAgB,MAAM,IAAI,QAC1B,gCAAU,SA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AAChF,YAAI,gBAAgB,SAAS,YAAY;AACvC,iCAAmB,2BAAK,UAAU,cAAc,UAAU;AAAA,QAC5D,OAAO;AACL,gBAAM,kBAAkB,WAAW,OAAO,CAAC,GAAG,SAAS,EAAE,GAAG,GAAG,CAAC,GAAG,GAAG,KAAK,IAAI,CAAC,CAAC;AACjF,6BAAmB;AAAA,YACjB,GAAG,UAAU;AAAA,YACb,GAAG;AAAA,UACL;AAAA,QACF;AAAA,MACF;AAEA,YAAM,YAAY;AAAA,QAChB,cAAc;AAAA,QACd,eAAW,oCAAqB,UAAU,OAAO,KAAK,gBAAgB,CAAC;AAAA,MACzE;AACA,UAAI,UAAU,QAAQ,UAAU,QAAW;AACzC;AAAA,UACE,SAAS,OAAO,CAAC,QAAQ,UAAU,aAAa,IAAI,MAAM,CAAC,CAAC;AAAA,UAC5D,UAAU;AAAA,UACV;AAAA,QACF;AAAA,MACF;AAEA,aAAO;AAAA,IACT,CAAC;AAAA,EACH;AAEA,QAAM,kBAAkB,CAAC,YAAY;AACnC,QAAI,CAAC;AAAU;AACf,uBAAmB,IAAI;AACvB,yBAAqB,MAAM;AACzB,YAAM,EAAE,cAAc,SAAS,IAAI,KAAK,YAAY;AAEpD,YAAM,YAAY;AAAA,QAChB,WAAW;AAAA,QACX,kBAAc,+BAAgB,UAAU,OAAO;AAAA,MACjD;AAEA,kBAAY,UAAU,SAAS;AAC/B,kBAAY,UAAU,WAAW,CAAC,GAAG,UAAU,SAAS;AAExD,aAAO;AAAA,IACT,CAAC;AAAA,EACH;AAEA,SAAO;AAAA,IACL,SAAS;AAAA,MACP,WAAW;AAAA,MACX,WAAW;AAAA,IACb;AAAA,IACA,OAAO;AAAA,MACL;AAAA,IACF;AAAA,EACF;AACF;",
|
6
6
|
"names": ["import_ds_utilities"]
|
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
|
));
|
@@ -31,9 +35,9 @@ var React = __toESM(require("react"));
|
|
31
35
|
var sortabular = __toESM(require("sortabular"));
|
32
36
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
33
37
|
var import_ds_shared = require("@elliemae/ds-shared");
|
34
|
-
var import_sortHeaderFormatter = require("./sortHeaderFormatter");
|
35
|
-
var import_useSortableState = require("./useSortableState");
|
36
|
-
var import_sorter = require("./sorter");
|
38
|
+
var import_sortHeaderFormatter = require("./sortHeaderFormatter.js");
|
39
|
+
var import_useSortableState = require("./useSortableState.js");
|
40
|
+
var import_sorter = require("./sorter.js");
|
37
41
|
const decorateColumn = (column, grid) => {
|
38
42
|
const {
|
39
43
|
props: { isSortableColumnActive = (col) => col.sortable, groupedRows }
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../src/plugins/sortable/SortablePlugin.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
4
|
-
"sourcesContent": ["import * as sortabular from 'sortabular';\nimport { compose, isEmpty, orderBy } from '@elliemae/ds-utilities';\nimport { createInstancePlugin, appendHeaderFormatter, mergeClassNameToColumnHeader } from '@elliemae/ds-shared';\nimport { sortHeaderFormatter } from './sortHeaderFormatter';\nimport { useSortableState } from './useSortableState';\nimport { sorter, sorterGroups } from './sorter';\n\nconst decorateColumn = (column, grid) => {\n const {\n props: { isSortableColumnActive = (col) => col.sortable, groupedRows },\n } = grid;\n\n if (groupedRows) return column;\n if (!isSortableColumnActive(column)) return column;\n\n const formatter = sortHeaderFormatter(\n sortabular.sort({\n getSortingColumns: () => grid.getState().sortingColumns || [],\n onSort: grid.actions.sort,\n strategy: sortabular.strategies.byProperty,\n }),\n grid,\n );\n\n return compose(appendHeaderFormatter(formatter), mergeClassNameToColumnHeader('with-sortable'))(column);\n};\n\nconst composeRows = (rows, grid) => {\n const {\n state: { sortingColumns },\n props: { isDataSorted, groupedRows, groupedBy, sortEmptyLast },\n rows: rowsData,\n composedRows,\n decoratedColumns,\n } = grid.getInstance();\n\n const sortingConfig = {\n columns: decoratedColumns,\n sortingColumns: !isEmpty(sortingColumns) && sortingColumns,\n sort: orderBy,\n emptyLast: sortEmptyLast,\n };\n\n // TODO: 1572 FIX\n if (groupedRows && !groupedBy) {\n return !isDataSorted ? sorterGroups(sortingConfig)(composedRows, rowsData, groupedBy) : rows;\n }\n\n return !isDataSorted ? sorter(sortingConfig)(rows) : rows;\n};\n\nexport const SortablePlugin = createInstancePlugin('sortable', {\n registerStateHook: useSortableState,\n decorateColumn,\n composeRows,\n registerHotKeys(grid) {\n return {\n key: 'ctrl+s',\n handler: ({ cellIndex }) => {\n const {\n actions: { sort },\n decoratedColumns,\n } = grid.getInstance();\n const column = decoratedColumns[cellIndex];\n if (!column) return;\n sort(column.property);\n },\n };\n },\n});\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
-
"mappings": "
|
4
|
+
"sourcesContent": ["import * as sortabular from 'sortabular';\nimport { compose, isEmpty, orderBy } from '@elliemae/ds-utilities';\nimport { createInstancePlugin, appendHeaderFormatter, mergeClassNameToColumnHeader } from '@elliemae/ds-shared';\nimport { sortHeaderFormatter } from './sortHeaderFormatter.js';\nimport { useSortableState } from './useSortableState.js';\nimport { sorter, sorterGroups } from './sorter.js';\n\nconst decorateColumn = (column, grid) => {\n const {\n props: { isSortableColumnActive = (col) => col.sortable, groupedRows },\n } = grid;\n\n if (groupedRows) return column;\n if (!isSortableColumnActive(column)) return column;\n\n const formatter = sortHeaderFormatter(\n sortabular.sort({\n getSortingColumns: () => grid.getState().sortingColumns || [],\n onSort: grid.actions.sort,\n strategy: sortabular.strategies.byProperty,\n }),\n grid,\n );\n\n return compose(appendHeaderFormatter(formatter), mergeClassNameToColumnHeader('with-sortable'))(column);\n};\n\nconst composeRows = (rows, grid) => {\n const {\n state: { sortingColumns },\n props: { isDataSorted, groupedRows, groupedBy, sortEmptyLast },\n rows: rowsData,\n composedRows,\n decoratedColumns,\n } = grid.getInstance();\n\n const sortingConfig = {\n columns: decoratedColumns,\n sortingColumns: !isEmpty(sortingColumns) && sortingColumns,\n sort: orderBy,\n emptyLast: sortEmptyLast,\n };\n\n // TODO: 1572 FIX\n if (groupedRows && !groupedBy) {\n return !isDataSorted ? sorterGroups(sortingConfig)(composedRows, rowsData, groupedBy) : rows;\n }\n\n return !isDataSorted ? sorter(sortingConfig)(rows) : rows;\n};\n\nexport const SortablePlugin = createInstancePlugin('sortable', {\n registerStateHook: useSortableState,\n decorateColumn,\n composeRows,\n registerHotKeys(grid) {\n return {\n key: 'ctrl+s',\n handler: ({ cellIndex }) => {\n const {\n actions: { sort },\n decoratedColumns,\n } = grid.getInstance();\n const column = decoratedColumns[cellIndex];\n if (!column) return;\n sort(column.property);\n },\n };\n },\n});\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,iBAA4B;AAC5B,0BAA0C;AAC1C,uBAA0F;AAC1F,iCAAoC;AACpC,8BAAiC;AACjC,oBAAqC;AAErC,MAAM,iBAAiB,CAAC,QAAQ,SAAS;AACvC,QAAM;AAAA,IACJ,OAAO,EAAE,yBAAyB,CAAC,QAAQ,IAAI,UAAU,YAAY;AAAA,EACvE,IAAI;AAEJ,MAAI;AAAa,WAAO;AACxB,MAAI,CAAC,uBAAuB,MAAM;AAAG,WAAO;AAE5C,QAAM,gBAAY;AAAA,IAChB,WAAW,KAAK;AAAA,MAC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|
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/sortable/checkIfSortable.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
4
4
|
"sourcesContent": ["/* eslint-disable no-plusplus */\n/* eslint-disable no-loops/no-loops */\nexport const checkIfSortable = (column, rows) => {\n for (let index = 0; index < rows.length; index++) {\n const element = rows[index][column];\n if (!(element === null || element === undefined)) {\n // PUI-6452\n return true;\n }\n }\n return false;\n};\n\nexport default checkIfSortable;\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
-
"mappings": "
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEhB,MAAM,kBAAkB,CAAC,QAAQ,SAAS;AAC/C,WAAS,QAAQ,GAAG,QAAQ,KAAK,QAAQ,SAAS;AAChD,UAAM,UAAU,KAAK,KAAK,EAAE,MAAM;AAClC,QAAI,EAAE,YAAY,QAAQ,YAAY,SAAY;AAEhD,aAAO;AAAA,IACT;AAAA,EACF;AACA,SAAO;AACT;AAEA,IAAO,0BAAQ;",
|
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(sortable_exports, {
|
|
28
32
|
});
|
29
33
|
module.exports = __toCommonJS(sortable_exports);
|
30
34
|
var React = __toESM(require("react"));
|
31
|
-
var import_SortablePlugin = require("./SortablePlugin");
|
35
|
+
var import_SortablePlugin = require("./SortablePlugin.js");
|
32
36
|
//# sourceMappingURL=index.js.map
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../src/plugins/sortable/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
4
|
-
"sourcesContent": ["export { SortablePlugin } from './SortablePlugin';\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
-
"mappings": "
|
4
|
+
"sourcesContent": ["export { SortablePlugin } from './SortablePlugin.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,4BAA+B;",
|
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/sortable/sortHeaderFormatter.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
4
4
|
"sourcesContent": ["import React from 'react';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { ArrowheadDown, ArrowheadUp } from '@elliemae/ds-icons';\n\nconst blockName = 'data-grid-sort-header';\n\nconst SortHeaderContainer = aggregatedClasses('div')(blockName);\n\nconst iconColor = ['brand-primary', 800];\n\nconst SortHeader = React.memo(({ value, onClick, sortState }) => {\n const sortIndicator = sortState === 'asc' ? <ArrowheadUp color={iconColor} /> : <ArrowheadDown color={iconColor} />;\n return (\n <SortHeaderContainer onClick={onClick}>\n <span className=\"header-value\">{value}</span>\n {sortState && sortIndicator}\n </SortHeaderContainer>\n );\n});\n\nconst sortHeaderFormatter =\n (sortable, grid) =>\n (value, { columnIndex, property }) => {\n const {\n state: { sortingColumns },\n } = grid.getInstance();\n const { onClick, className } = sortable(value, { columnIndex, property });\n return (\n <SortHeader\n className={className}\n onClick={onClick}\n sortState={sortingColumns[property] && sortingColumns[property].direction}\n value={value}\n />\n );\n };\n\nexport { sortHeaderFormatter };\nexport default sortHeaderFormatter;\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
-
"mappings": "
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADWuB;AAX9C,mBAAkB;AAClB,2BAAkC;AAClC,sBAA2C;AAE3C,MAAM,YAAY;AAElB,MAAM,0BAAsB,wCAAkB,KAAK,EAAE,SAAS;AAE9D,MAAM,YAAY,CAAC,iBAAiB,GAAG;AAEvC,MAAM,aAAa,aAAAA,QAAM,KAAK,CAAC,EAAE,OAAO,SAAS,UAAU,MAAM;AAC/D,QAAM,gBAAgB,cAAc,QAAQ,4CAAC,+BAAY,OAAO,WAAW,IAAK,4CAAC,iCAAc,OAAO,WAAW;AACjH,SACE,6CAAC,uBAAoB,SACnB;AAAA,gDAAC,UAAK,WAAU,gBAAgB,iBAAM;AAAA,IACrC,aAAa;AAAA,KAChB;AAEJ,CAAC;AAED,MAAM,sBACJ,CAAC,UAAU,SACX,CAAC,OAAO,EAAE,aAAa,SAAS,MAAM;AACpC,QAAM;AAAA,IACJ,OAAO,EAAE,eAAe;AAAA,EAC1B,IAAI,KAAK,YAAY;AACrB,QAAM,EAAE,SAAS,UAAU,IAAI,SAAS,OAAO,EAAE,aAAa,SAAS,CAAC;AACxE,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,WAAW,eAAe,QAAQ,KAAK,eAAe,QAAQ,EAAE;AAAA,MAChE;AAAA;AAAA,EACF;AAEJ;AAGF,IAAO,8BAAQ;",
|
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
|
));
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../src/plugins/sortable/sortTree.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
4
|
-
"sourcesContent": ["import * as sort from 'sortabular';\n\nconst deepSorting = (sortConfig, rows = []) =>\n sort.sorter(sortConfig)(\n rows.map(row =>\n row.children && row.children.length\n ? {\n ...row,\n children: deepSorting(sortConfig, row.children),\n }\n : row,\n ),\n );\nfunction sortTree(sortConfig) {\n return rows => deepSorting(sortConfig, rows);\n}\n\nexport { sortTree };\nexport default sortTree;\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
-
"mappings": "
|
4
|
+
"sourcesContent": ["import * as sort from 'sortabular';\n\nconst deepSorting = (sortConfig, rows = []) =>\n sort.sorter(sortConfig)(\n rows.map((row) =>\n row.children && row.children.length\n ? {\n ...row,\n children: deepSorting(sortConfig, row.children),\n }\n : row,\n ),\n );\nfunction sortTree(sortConfig) {\n return (rows) => deepSorting(sortConfig, rows);\n}\n\nexport { sortTree };\nexport default sortTree;\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,WAAsB;AAEtB,MAAM,cAAc,CAAC,YAAY,OAAO,CAAC,MACvC,KAAK,OAAO,UAAU;AAAA,EACpB,KAAK;AAAA,IAAI,CAAC,QACR,IAAI,YAAY,IAAI,SAAS,SACzB;AAAA,MACE,GAAG;AAAA,MACH,UAAU,YAAY,YAAY,IAAI,QAAQ;AAAA,IAChD,IACA;AAAA,EACN;AACF;AACF,SAAS,SAAS,YAAY;AAC5B,SAAO,CAAC,SAAS,YAAY,YAAY,IAAI;AAC/C;AAGA,IAAO,mBAAQ;",
|
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
|
));
|
@@ -127,6 +131,7 @@ const sorterGroups = ({ columns, sortingColumns, sort, emptyLast } = {}) => (dat
|
|
127
131
|
columnIndexList,
|
128
132
|
orderList
|
129
133
|
)
|
134
|
+
// sort internally
|
130
135
|
};
|
131
136
|
});
|
132
137
|
const sorted = actualSortFunction(
|
@@ -2,6 +2,6 @@
|
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../src/plugins/sortable/sorter.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
4
4
|
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable max-statements */\nimport { get } from '@elliemae/ds-utilities';\nimport moment from 'moment';\n\nexport const sorter =\n ({ columns, sortingColumns, sort, emptyLast } = {}) =>\n (data) => {\n if (!columns) {\n throw new Error('sort.sorter - Missing \"columns\" argument!');\n }\n\n if (!sort) {\n throw new Error('sort.sorter - Missing \"sort\" argument!');\n }\n\n if (!sortingColumns) {\n return data;\n }\n const columnIndexList = new Array(sortingColumns.length);\n const orderList = new Array(sortingColumns.length);\n\n let actualSortFunction = sort;\n if (emptyLast) {\n actualSortFunction = (innerData, innerColumnIndexList, innerOrderList) => {\n const sortedData = sort(innerData, innerColumnIndexList, innerOrderList);\n\n const keys = Object.keys(sortingColumns);\n\n const withData = sortedData.filter((r) => keys.some((key) => !!r[key]));\n const withoutData = sortedData.filter((r) => keys.some((key) => !r[key]));\n\n return [...withData, ...withoutData];\n };\n }\n\n Object.keys(sortingColumns).forEach((sortingColumnKey) => {\n const realColumn = columns.find((column) => column.property === sortingColumnKey);\n if (!realColumn) return;\n const columnSorter =\n realColumn.sort ||\n function resolveValue(row) {\n const { property, sortBy } = realColumn;\n const value = row[sortBy || property];\n // Pick resolved value by convention\n const resolvedValue = get(row, `_${property}`, value);\n\n if (realColumn.type === 'DateTime') {\n return moment(resolvedValue);\n }\n\n return typeof resolvedValue === 'string' ? resolvedValue.toLowerCase() : resolvedValue;\n };\n\n const sortingColumn = sortingColumns[sortingColumnKey];\n\n columnIndexList[sortingColumn.position] = columnSorter;\n\n orderList[sortingColumn.position] = sortingColumn.direction;\n });\n return actualSortFunction(data, columnIndexList, orderList);\n };\n\nexport const sorterGroups =\n ({ columns, sortingColumns, sort, emptyLast } = {}) =>\n (data, rowsData) => {\n if (!columns) {\n throw new Error('sort.sorter - Missing \"columns\" argument!');\n }\n\n if (!sort) {\n throw new Error('sort.sorter - Missing \"sort\" argument!');\n }\n\n if (!sortingColumns) {\n return data;\n }\n\n const columnIndexList = new Array(sortingColumns.length);\n const orderList = new Array(sortingColumns.length);\n\n let actualSortFunction = sort;\n if (emptyLast) {\n actualSortFunction = (innerData, innerColumnIndexList, innerOrderList) => {\n const sortedData = sort(innerData, innerColumnIndexList, innerOrderList);\n\n const keys = Object.keys(sortingColumns);\n\n const withData = sortedData.filter((r) => keys.some((key) => !!r[key]));\n const withoutData = sortedData.filter((r) => keys.some((key) => !r[key]));\n\n return [...withData, ...withoutData];\n };\n }\n\n Object.keys(sortingColumns).forEach((sortingColumnKey) => {\n const realColumn = columns.find((column) => column.property === sortingColumnKey);\n if (!realColumn) return;\n const columnSorter =\n realColumn.sort ||\n function resolveValue(row) {\n const { property, sortBy } = realColumn;\n const value = row[sortBy || property];\n // Pick resolved value by convention\n const resolvedValue = get(row, `_${property}`, value);\n\n if (realColumn.type === 'DateTime') {\n return moment(resolvedValue);\n }\n\n return typeof resolvedValue === 'string' ? resolvedValue.toLowerCase() : resolvedValue;\n };\n\n const sortingColumn = sortingColumns[sortingColumnKey];\n\n columnIndexList[sortingColumn.position] = columnSorter;\n\n orderList[sortingColumn.position] = sortingColumn.direction;\n });\n\n const groups = {};\n const preserveData = {};\n data.forEach((c) => {\n preserveData[c.id] = { ...c };\n });\n\n rowsData.forEach((group) => {\n groups[group.id] = {\n children: actualSortFunction(\n group.children.map((c) => ({\n parentNode: preserveData[c.id].parentNode,\n data: c,\n ...c,\n })),\n columnIndexList,\n orderList,\n ), // sort internally\n };\n });\n\n const sorted = actualSortFunction(\n data.map((r) => ({\n ...r.data,\n ...r,\n })),\n columnIndexList,\n orderList,\n ); // sort global\n let ssortGlobal = [];\n sorted\n .filter((s) => !s.isGroup)\n .forEach((sr) => {\n if (groups[sr.parentNode.id]) {\n ssortGlobal = [...ssortGlobal, preserveData[sr.parentNode.id], ...groups[sr.parentNode.id].children];\n delete groups[sr.parentNode.id];\n }\n });\n return ssortGlobal;\n };\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
-
"mappings": "
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,0BAAoB;AACpB,oBAAmB;AAEZ,MAAM,SACX,CAAC,EAAE,SAAS,gBAAgB,MAAM,UAAU,IAAI,CAAC,MACjD,CAAC,SAAS;AACR,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,2CAA2C;AAAA,EAC7D;AAEA,MAAI,CAAC,MAAM;AACT,UAAM,IAAI,MAAM,wCAAwC;AAAA,EAC1D;AAEA,MAAI,CAAC,gBAAgB;AACnB,WAAO;AAAA,EACT;AACA,QAAM,kBAAkB,IAAI,MAAM,eAAe,MAAM;AACvD,QAAM,YAAY,IAAI,MAAM,eAAe,MAAM;AAEjD,MAAI,qBAAqB;AACzB,MAAI,WAAW;AACb,yBAAqB,CAAC,WAAW,sBAAsB,mBAAmB;AACxE,YAAM,aAAa,KAAK,WAAW,sBAAsB,cAAc;AAEvE,YAAM,OAAO,OAAO,KAAK,cAAc;AAEvC,YAAM,WAAW,WAAW,OAAO,CAAC,MAAM,KAAK,KAAK,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AACtE,YAAM,cAAc,WAAW,OAAO,CAAC,MAAM,KAAK,KAAK,CAAC,QAAQ,CAAC,EAAE,GAAG,CAAC,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A,MACF;AAAA;AAAA,IACF;AAAA,EACF,CAAC;AAED,QAAM,SAAS;AAAA,IACb,KAAK,IAAI,CAAC,OAAO;AAAA,MACf,GAAG,EAAE;AAAA,MACL,GAAG;AAAA,IACL,EAAE;AAAA,IACF;AAAA,IACA;AAAA,EACF;AACA,MAAI,cAAc,CAAC;AACnB,SACG,OAAO,CAAC,MAAM,CAAC,EAAE,OAAO,EACxB,QAAQ,CAAC,OAAO;AACf,QAAI,OAAO,GAAG,WAAW,EAAE,GAAG;AAC5B,oBAAc,CAAC,GAAG,aAAa,aAAa,GAAG,WAAW,EAAE,GAAG,GAAG,OAAO,GAAG,WAAW,EAAE,EAAE,QAAQ;AACnG,aAAO,OAAO,GAAG,WAAW,EAAE;AAAA,IAChC;AAAA,EACF,CAAC;AACH,SAAO;AACT;",
|
6
6
|
"names": ["moment"]
|
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,10 @@ module.exports = __toCommonJS(useSortableState_exports);
|
|
30
34
|
var React = __toESM(require("react"));
|
31
35
|
var sortabular = __toESM(require("sortabular/dist/index.js"));
|
32
36
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
33
|
-
var import_checkIfSortable = require("./checkIfSortable");
|
37
|
+
var import_checkIfSortable = require("./checkIfSortable.js");
|
34
38
|
function useSortableState(grid) {
|
35
39
|
const { onSort, sortingColumns: sortingColumnsProp, pagination } = grid.props;
|
36
|
-
const [sortingColumns, setSortingColumns] = (0, import_ds_utilities.useDerivedStateFromProps)(
|
37
|
-
sortingColumnsProp
|
38
|
-
);
|
40
|
+
const [sortingColumns, setSortingColumns] = (0, import_ds_utilities.useDerivedStateFromProps)(sortingColumnsProp);
|
39
41
|
const handleSort = (selectedColumn) => {
|
40
42
|
const { composedRows = {}, props } = grid.getInstance();
|
41
43
|
const { allRows, rows } = composedRows;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../src/plugins/sortable/useSortableState.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
4
|
-
"sourcesContent": ["import * as sortabular from 'sortabular/dist/index.js';\nimport { useDerivedStateFromProps } from '@elliemae/ds-utilities';\nimport { checkIfSortable } from './checkIfSortable';\n\nexport function useSortableState(grid) {\n const { onSort, sortingColumns: sortingColumnsProp, pagination } = grid.props;\n\n const [sortingColumns, setSortingColumns] = useDerivedStateFromProps(
|
5
|
-
"mappings": "
|
4
|
+
"sourcesContent": ["import * as sortabular from 'sortabular/dist/index.js';\nimport { useDerivedStateFromProps } from '@elliemae/ds-utilities';\nimport { checkIfSortable } from './checkIfSortable.js';\n\nexport function useSortableState(grid) {\n const { onSort, sortingColumns: sortingColumnsProp, pagination } = grid.props;\n\n const [sortingColumns, setSortingColumns] = useDerivedStateFromProps(sortingColumnsProp);\n\n const handleSort = (selectedColumn) => {\n // support for pagination\n const { composedRows = {}, props } = grid.getInstance();\n const { allRows, rows } = composedRows;\n const serverSidePagination = pagination && composedRows.amount !== (composedRows.rows && composedRows.rows.length);\n if (\n props.serverSideData ||\n serverSidePagination ||\n checkIfSortable(selectedColumn, allRows || rows || composedRows)\n ) {\n setSortingColumns((prevSortingColumns) => {\n const nextSortingColumns = sortabular.byColumn({\n sortingColumns: prevSortingColumns,\n sortingOrder: {\n FIRST: 'asc',\n asc: 'desc',\n desc: 'asc',\n },\n selectedColumn,\n });\n const { columns } = grid.getInstance();\n let columnSorted = columns.find((col) => col.property === selectedColumn);\n columnSorted = {\n ...columnSorted,\n originalProperty: columnSorted.property,\n };\n onSort(nextSortingColumns, selectedColumn, columnSorted);\n return nextSortingColumns;\n });\n }\n };\n\n return {\n state: { sortingColumns },\n actions: {\n sort: handleSort,\n },\n };\n}\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,iBAA4B;AAC5B,0BAAyC;AACzC,6BAAgC;AAEzB,SAAS,iBAAiB,MAAM;AACrC,QAAM,EAAE,QAAQ,gBAAgB,oBAAoB,WAAW,IAAI,KAAK;AAExE,QAAM,CAAC,gBAAgB,iBAAiB,QAAI,8CAAyB,kBAAkB;AAEvF,QAAM,aAAa,CAAC,mBAAmB;AAErC,UAAM,EAAE,eAAe,CAAC,GAAG,MAAM,IAAI,KAAK,YAAY;AACtD,UAAM,EAAE,SAAS,KAAK,IAAI;AAC1B,UAAM,uBAAuB,cAAc,aAAa,YAAY,aAAa,QAAQ,aAAa,KAAK;AAC3G,QACE,MAAM,kBACN,4BACA,wCAAgB,gBAAgB,WAAW,QAAQ,YAAY,GAC/D;AACA,wBAAkB,CAAC,uBAAuB;AACxC,cAAM,qBAAqB,WAAW,SAAS;AAAA,UAC7C,gBAAgB;AAAA,UAChB,cAAc;AAAA,YACZ,OAAO;AAAA,YACP,KAAK;AAAA,YACL,MAAM;AAAA,UACR;AAAA,UACA;AAAA,QACF,CAAC;AACD,cAAM,EAAE,QAAQ,IAAI,KAAK,YAAY;AACrC,YAAI,eAAe,QAAQ,KAAK,CAAC,QAAQ,IAAI,aAAa,cAAc;AACxE,uBAAe;AAAA,UACb,GAAG;AAAA,UACH,kBAAkB,aAAa;AAAA,QACjC;AACA,eAAO,oBAAoB,gBAAgB,YAAY;AACvD,eAAO;AAAA,MACT,CAAC;AAAA,IACH;AAAA,EACF;AAEA,SAAO;AAAA,IACL,OAAO,EAAE,eAAe;AAAA,IACxB,SAAS;AAAA,MACP,MAAM;AAAA,IACR;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
|
));
|
@@ -33,8 +37,8 @@ var import_react = require("react");
|
|
33
37
|
var import_prop_types = __toESM(require("prop-types"));
|
34
38
|
var import_lodash = require("lodash");
|
35
39
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
36
|
-
var import_ToolbarTrigger = require("./ToolbarTrigger");
|
37
|
-
var import_rowSizes = require("../../rowSizes");
|
40
|
+
var import_ToolbarTrigger = require("./ToolbarTrigger.js");
|
41
|
+
var import_rowSizes = require("../../rowSizes.js");
|
38
42
|
const RowRenderer = (Row, grid) => {
|
39
43
|
const Wrapped = (props) => {
|
40
44
|
const ref = (0, import_react.useRef)();
|
@@ -77,6 +81,7 @@ const RowRenderer = (Row, grid) => {
|
|
77
81
|
style: {
|
78
82
|
height: !wrapText ? import_rowSizes.RowSizes[gridInstance.props.rowSize] : "auto",
|
79
83
|
position: style ? "auto" : "relative"
|
84
|
+
// top: isDragging ? rowStyle.top - RowSizes[gridInstance.props.rowSize] : 'auto',
|
80
85
|
},
|
81
86
|
children: [
|
82
87
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Row, { ref, ...props, style: rowStyle }),
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../src/plugins/toolbar/RowRenderer.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
4
|
-
"sourcesContent": ["/* eslint-disable react-hooks/rules-of-hooks */\n/* eslint-disable max-statements */\n/* eslint-disable react/prop-types */\nimport React, { useEffect, useRef, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { isEmpty } from 'lodash';\nimport { omit } from '@elliemae/ds-utilities';\nimport { ToolbarTrigger } from './ToolbarTrigger';\nimport { RowSizes } from '../../rowSizes';\n\nexport const RowRenderer = (Row, grid) => {\n const Wrapped = (props) => {\n const ref = useRef();\n const { rowData = {}, index, rowIndex, style } = props;\n const {\n props: { wrapText },\n } = grid.getInstance();\n const [popStyle, setPopStyle] = useState({});\n const [rowStyle, setRowStyle] = useState(style);\n const gridInstance = grid.getInstance();\n const { refs, isRowDragging } = gridInstance;\n const [hasVerticalScrollBar, setHasVerticalScrollBar] = useState(\n refs.body.current && refs.body.current.offsetWidth > refs.body.current.clientWidth,\n );\n\n useEffect(() => {\n const shouldOmit = isRowDragging ? ['top'] : [];\n setPopStyle({\n ...popStyle,\n ...{ top: style && !isRowDragging ? style.top : '0' },\n });\n if (style) {\n // style defined means it has virtualization\n setHasVerticalScrollBar(true);\n } else {\n setHasVerticalScrollBar(false);\n }\n setRowStyle(\n omit(\n style || {\n height: !wrapText ? RowSizes[gridInstance.props.rowSize] : 'auto',\n position: 'relative',\n },\n [shouldOmit],\n ),\n );\n }, [style, isRowDragging]);\n return (\n <div\n className=\"row-renderer-fixed-height\"\n style={{\n height: !wrapText ? RowSizes[gridInstance.props.rowSize] : 'auto',\n position: style ? 'auto' : 'relative',\n // top: isDragging ? rowStyle.top - RowSizes[gridInstance.props.rowSize] : 'auto',\n }}\n >\n <Row ref={ref} {...props} style={rowStyle} />\n {isEmpty(rowData) && !rowData.index && !rowData.rowIndex ? null : (\n <div className={`toolbar-trigger-container ${style ? 'move' : 'stay'}`} style={{ ...popStyle }}>\n <ToolbarTrigger\n grid={grid}\n rowData={{ rowData, index, rowIndex }}\n hasScrollBar={hasVerticalScrollBar}\n rowRef={ref}\n />\n </div>\n )}\n </div>\n );\n };\n\n Wrapped.propTypes = {\n rowData: PropTypes.any,\n index: PropTypes.number,\n rowIndex: PropTypes.number,\n style: PropTypes.any,\n };\n\n return Wrapped;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
-
"mappings": "
|
4
|
+
"sourcesContent": ["/* eslint-disable react-hooks/rules-of-hooks */\n/* eslint-disable max-statements */\n/* eslint-disable react/prop-types */\nimport React, { useEffect, useRef, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { isEmpty } from 'lodash';\nimport { omit } from '@elliemae/ds-utilities';\nimport { ToolbarTrigger } from './ToolbarTrigger.js';\nimport { RowSizes } from '../../rowSizes.js';\n\nexport const RowRenderer = (Row, grid) => {\n const Wrapped = (props) => {\n const ref = useRef();\n const { rowData = {}, index, rowIndex, style } = props;\n const {\n props: { wrapText },\n } = grid.getInstance();\n const [popStyle, setPopStyle] = useState({});\n const [rowStyle, setRowStyle] = useState(style);\n const gridInstance = grid.getInstance();\n const { refs, isRowDragging } = gridInstance;\n const [hasVerticalScrollBar, setHasVerticalScrollBar] = useState(\n refs.body.current && refs.body.current.offsetWidth > refs.body.current.clientWidth,\n );\n\n useEffect(() => {\n const shouldOmit = isRowDragging ? ['top'] : [];\n setPopStyle({\n ...popStyle,\n ...{ top: style && !isRowDragging ? style.top : '0' },\n });\n if (style) {\n // style defined means it has virtualization\n setHasVerticalScrollBar(true);\n } else {\n setHasVerticalScrollBar(false);\n }\n setRowStyle(\n omit(\n style || {\n height: !wrapText ? RowSizes[gridInstance.props.rowSize] : 'auto',\n position: 'relative',\n },\n [shouldOmit],\n ),\n );\n }, [style, isRowDragging]);\n return (\n <div\n className=\"row-renderer-fixed-height\"\n style={{\n height: !wrapText ? RowSizes[gridInstance.props.rowSize] : 'auto',\n position: style ? 'auto' : 'relative',\n // top: isDragging ? rowStyle.top - RowSizes[gridInstance.props.rowSize] : 'auto',\n }}\n >\n <Row ref={ref} {...props} style={rowStyle} />\n {isEmpty(rowData) && !rowData.index && !rowData.rowIndex ? null : (\n <div className={`toolbar-trigger-container ${style ? 'move' : 'stay'}`} style={{ ...popStyle }}>\n <ToolbarTrigger\n grid={grid}\n rowData={{ rowData, index, rowIndex }}\n hasScrollBar={hasVerticalScrollBar}\n rowRef={ref}\n />\n </div>\n )}\n </div>\n );\n };\n\n Wrapped.propTypes = {\n rowData: PropTypes.any,\n index: PropTypes.number,\n rowIndex: PropTypes.number,\n style: PropTypes.any,\n };\n\n return Wrapped;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgDjB;AA7CN,mBAAmD;AACnD,wBAAsB;AACtB,oBAAwB;AACxB,0BAAqB;AACrB,4BAA+B;AAC/B,sBAAyB;AAElB,MAAM,cAAc,CAAC,KAAK,SAAS;AACxC,QAAM,UAAU,CAAC,UAAU;AACzB,UAAM,UAAM,qBAAO;AACnB,UAAM,EAAE,UAAU,CAAC,GAAG,OAAO,UAAU,MAAM,IAAI;AACjD,UAAM;AAAA,MACJ,OAAO,EAAE,SAAS;AAAA,IACpB,IAAI,KAAK,YAAY;AACrB,UAAM,CAAC,UAAU,WAAW,QAAI,uBAAS,CAAC,CAAC;AAC3C,UAAM,CAAC,UAAU,WAAW,QAAI,uBAAS,KAAK;AAC9C,UAAM,eAAe,KAAK,YAAY;AACtC,UAAM,EAAE,MAAM,cAAc,IAAI;AAChC,UAAM,CAAC,sBAAsB,uBAAuB,QAAI;AAAA,MACtD,KAAK,KAAK,WAAW,KAAK,KAAK,QAAQ,cAAc,KAAK,KAAK,QAAQ;AAAA,IACzE;AAEA,gCAAU,MAAM;AACd,YAAM,aAAa,gBAAgB,CAAC,KAA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yProps = (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,7 +34,7 @@ module.exports = __toCommonJS(ToolbarPlugin_exports);
|
|
30
34
|
var React = __toESM(require("react"));
|
31
35
|
var import_jsx_runtime = require("react/jsx-runtime");
|
32
36
|
var import_ds_shared = require("@elliemae/ds-shared");
|
33
|
-
var import_RowRenderer = require("./RowRenderer");
|
37
|
+
var import_RowRenderer = require("./RowRenderer.js");
|
34
38
|
const decorateColumns = (columns) => {
|
35
39
|
const lastColumn = columns[columns.length - 1];
|
36
40
|
return [
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../src/plugins/toolbar/ToolbarPlugin.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { createInstancePlugin, appendCellFormatter } from '@elliemae/ds-shared';\nimport { RowRenderer } from './RowRenderer';\n\nconst decorateColumns = (columns) => {\n const lastColumn = columns[columns.length - 1];\n return [\n ...columns.slice(0, -1),\n appendCellFormatter(\n [\n (value) => (\n <>\n {value}\n <div style={{ width: 34, maxWidth: 34, overflow: 'hidden' }} />\n </>\n ),\n ],\n lastColumn,\n 'fixedFormatters',\n ),\n ];\n};\n\nconst decorateRenderers = (renderers, grid) => {\n const Row = renderers.body.row;\n renderers.body.row = RowRenderer(Row, grid);\n return renderers;\n};\n\nexport const ToolbarPlugin = createInstancePlugin('toolbar', {\n decorateRenderers,\n decorateColumns,\n});\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
-
"mappings": "
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { createInstancePlugin, appendCellFormatter } from '@elliemae/ds-shared';\nimport { RowRenderer } from './RowRenderer.js';\n\nconst decorateColumns = (columns) => {\n const lastColumn = columns[columns.length - 1];\n return [\n ...columns.slice(0, -1),\n appendCellFormatter(\n [\n (value) => (\n <>\n {value}\n <div style={{ width: 34, maxWidth: 34, overflow: 'hidden' }} />\n </>\n ),\n ],\n lastColumn,\n 'fixedFormatters',\n ),\n ];\n};\n\nconst decorateRenderers = (renderers, grid) => {\n const Row = renderers.body.row;\n renderers.body.row = RowRenderer(Row, grid);\n return renderers;\n};\n\nexport const ToolbarPlugin = createInstancePlugin('toolbar', {\n decorateRenderers,\n decorateColumns,\n});\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADWb;AAVV,uBAA0D;AAC1D,yBAA4B;AAE5B,MAAM,kBAAkB,CAAC,YAAY;AACnC,QAAM,aAAa,QAAQ,QAAQ,SAAS,CAAC;AAC7C,SAAO;AAAA,IACL,GAAG,QAAQ,MAAM,GAAG,EAAE;AAAA,QACtB;AAAA,MACE;AAAA,QACE,CAAC,UACC,4EACG;AAAA;AAAA,UACD,4CAAC,SAAI,OAAO,EAAE,OAAO,IAAI,UAAU,IAAI,UAAU,SAAS,GAAG;AAAA,WAC/D;AAAA,MAEJ;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,oBAAoB,CAAC,WAAW,SAAS;AAC7C,QAAM,MAAM,UAAU,KAAK;AAC3B,YAAU,KAAK,UAAM,gCAAY,KAAK,IAAI;AAC1C,SAAO;AACT;AAEO,MAAM,oBAAgB,uCAAqB,WAAW;AAAA,EAC3D;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
|
));
|
@@ -72,6 +76,7 @@ const ToolbarPosition = import_ds_system.styled.div`
|
|
72
76
|
const ToolbarTrigger = ({ grid, rowData, hasScrollBar, rowRef }) => {
|
73
77
|
const {
|
74
78
|
props: { renderToolbar, rowSize }
|
79
|
+
// eslint-disable-next-line react/prop-types
|
75
80
|
} = grid.getInstance();
|
76
81
|
const [show, setShow] = (0, import_react.useState)(false);
|
77
82
|
const toolbar = show ? renderToolbar({
|
@@ -2,6 +2,6 @@
|
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../src/plugins/toolbar/ToolbarTrigger.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
4
4
|
"sourcesContent": ["import React, { useState } from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { DSButton } from '@elliemae/ds-button';\nimport { MoreOptionsVert } from '@elliemae/ds-icons';\n\nconst ToolbarBtns = styled.div`\n & > .em-ds-toolbar {\n box-shadow: none;\n }\n`;\n\nconst ToolbarWrapper = styled.div`\n display: flex;\n align-items: center;\n height: ${(props) => (props.rowSize === 'normal' ? '36px' : '28px')};\n margin-left: -4px;\n margin-right: ${(props) => (props.hasScrollBar ? '0' : '-10px')};\n padding-right: 4px;\n pointer-events: all;\n background: white;\n ${(props) =>\n props.showShadow\n ? `box-shadow: -1px 0px 1px 0px rgba(0, 0, 0, 0.2),\n 1px 0px 2px 0px rgba(0, 0, 0, 0.2);`\n : ''}\n &:hover {\n box-shadow: -1px 0px 1px 0px rgba(0, 0, 0, 0.2), 1px 0px 2px 0px rgba(0, 0, 0, 0.2);\n & > .toolbar-trigger {\n border: none;\n }\n }\n`;\n\nconst ToolbarPosition = styled.div`\n position: absolute;\n z-index: 10;\n display: flex;\n justify-content: flex-end;\n align-items: center;\n width: 0;\n pointer-events: none;\n top: 0;\n height: ${(props) => (props.rowRef.current ? `${props.rowRef.current.offsetHeight}px` : '36px')};\n margin-top: ${(props) => (props.rowSize === 'normal' ? '0' : '0')};\n`;\n\n// eslint-disable-next-line react/prop-types\nexport const ToolbarTrigger = ({ grid, rowData, hasScrollBar, rowRef }) => {\n const {\n props: { renderToolbar, rowSize },\n // eslint-disable-next-line react/prop-types\n } = grid.getInstance();\n const [show, setShow] = useState(false);\n /* eslint-disable indent */\n const toolbar = show\n ? renderToolbar({\n ...rowData,\n size: rowSize,\n isToolbarShown: show,\n setToolbarShow: setShow,\n })\n : null;\n /* eslint-enable indent */\n return (\n <ToolbarPosition rowSize={rowSize} rowRef={rowRef}>\n <ToolbarWrapper\n onMouseEnter={() => setShow(true)}\n onMouseLeave={() => setShow(false)}\n showShadow={show}\n rowSize={rowSize}\n hasScrollBar={hasScrollBar}\n >\n {show && <ToolbarBtns>{toolbar}</ToolbarBtns>}\n <DSButton\n buttonType=\"text\"\n className=\"toolbar-trigger\"\n data-testid=\"toolbar-trigger\"\n icon={<MoreOptionsVert />}\n // eslint-disable-next-line react/prop-types\n index={rowData.index}\n onClick={() => setShow(true)}\n tabIndex={-1}\n />\n </ToolbarWrapper>\n </ToolbarPosition>\n );\n};\n\nexport default ToolbarTrigger;\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
-
"mappings": "
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;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AAgB;AAAA,YAEvB,OAAO,QAAQ;AAAA,YACf,SAAS,MAAM,QAAQ,IAAI;AAAA,YAC3B,UAAU;AAAA;AAAA,QACZ;AAAA;AAAA;AAAA,EACF,GACF;AAEJ;AAEA,IAAO,yBAAQ;",
|
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(toolbar_exports, {
|
|
28
32
|
});
|
29
33
|
module.exports = __toCommonJS(toolbar_exports);
|
30
34
|
var React = __toESM(require("react"));
|
31
|
-
var import_ToolbarPlugin = require("./ToolbarPlugin");
|
35
|
+
var import_ToolbarPlugin = require("./ToolbarPlugin.js");
|
32
36
|
//# sourceMappingURL=index.js.map
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../src/plugins/toolbar/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
4
|
-
"sourcesContent": ["export { ToolbarPlugin } from './ToolbarPlugin';\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
-
"mappings": "
|
4
|
+
"sourcesContent": ["export { ToolbarPlugin } from './ToolbarPlugin.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,2BAA8B;",
|
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/virtualization/AutoHeightList.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
4
|
-
"sourcesContent": ["import React, { forwardRef, useRef } from 'react';\nimport { FixedSizeList as List } from 'react-window';\nimport { mergeRefs, useWindowScrollerList, cx } from '@elliemae/ds-utilities';\n\n// eslint-disable-next-line react/display-name\nexport const AutoHeightList = forwardRef(\n (\n {\n itemCount,\n className,\n innerRef,\n itemData,\n itemKey,\n itemSize,\n outerRef,\n component: ListComponent = List,\n ...otherProps\n },\n ref,\n ) => {\n const listRef = useRef();\n const outerListRef = useRef();\n\n useWindowScrollerList({\n listInstance: listRef,\n outerListRef,\n });\n
|
5
|
-
"mappings": "
|
4
|
+
"sourcesContent": ["import React, { forwardRef, useRef } from 'react';\nimport { FixedSizeList as List } from 'react-window';\nimport { mergeRefs, useWindowScrollerList, cx } from '@elliemae/ds-utilities';\n\n// eslint-disable-next-line react/display-name\nexport const AutoHeightList = forwardRef(\n (\n {\n itemCount,\n className,\n innerRef,\n itemData,\n itemKey,\n itemSize,\n outerRef,\n component: ListComponent = List,\n ...otherProps\n },\n ref,\n ) => {\n const listRef = useRef();\n const outerListRef = useRef();\n\n useWindowScrollerList({\n listInstance: listRef,\n outerListRef,\n });\n return (\n <ListComponent\n {...otherProps}\n ref={mergeRefs(ref, listRef)}\n className={cx(className, 'window-scroller-override')}\n height={window.innerHeight}\n innerRef={innerRef}\n itemCount={itemCount}\n itemData={itemData}\n itemKey={itemKey}\n itemSize={itemSize}\n outerRef={mergeRefs(outerListRef, outerRef)}\n overscanCount={10}\n useIsScrolling\n />\n );\n },\n);\n\nexport default AutoHeightList;\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD4BjB;AA5BN,mBAA0C;AAC1C,0BAAsC;AACtC,0BAAqD;AAG9C,MAAM,qBAAiB;AAAA,EAC5B,CACE;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW,gBAAgB,oBAAAA;AAAA,IAC3B,GAAG;AAAA,EACL,GACA,QACG;AACH,UAAM,cAAU,qBAAO;AACvB,UAAM,mBAAe,qBAAO;AAE5B,mDAAsB;AAAA,MACpB,cAAc;AAAA,MACd;AAAA,IACF,CAAC;AACD,WACE;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ,SAAK,+BAAU,KAAK,OAAO;AAAA,QAC3B,eAAW,wBAAG,WAAW,0BAA0B;AAAA,QACnD,QAAQ,OAAO;AAAA,QACf;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,cAAU,+BAAU,cAAc,QAAQ;AAAA,QAC1C,eAAe;AAAA,QACf,gBAAc;AAAA;AAAA,IAChB;AAAA,EAEJ;AACF;AAEA,IAAO,yBAAQ;",
|
6
6
|
"names": ["List"]
|
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,12 +37,12 @@ var import_react = require("react");
|
|
33
37
|
var import_lodash = require("lodash");
|
34
38
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
35
39
|
var import_ds_shared = require("@elliemae/ds-shared");
|
36
|
-
var import_VirtualizedBody = require("./VirtualizedBody");
|
40
|
+
var import_VirtualizedBody = require("./VirtualizedBody.js");
|
37
41
|
const VirtualizationPlugin = (0, import_ds_shared.createInstancePlugin)("virtualization", {
|
38
42
|
decorateRenderers(renderers, grid) {
|
39
43
|
const BodyWrapper = renderers.body.wrapper;
|
40
44
|
renderers.body.wrapper = (0, import_react.useMemo)(
|
41
|
-
() => (props)
|
45
|
+
() => function(props) {
|
42
46
|
const { listProps = {}, rows } = props;
|
43
47
|
const {
|
44
48
|
hotKeys,
|
@@ -58,6 +62,8 @@ const VirtualizationPlugin = (0, import_ds_shared.createInstancePlugin)("virtual
|
|
58
62
|
hotKeys,
|
59
63
|
keyBindings: ({ defaultBindings }) => ({
|
60
64
|
...defaultBindings,
|
65
|
+
// todo: this is kind of hacky, since it's virtualized and there's
|
66
|
+
// the possibility that the firsts or lasts rows aren't rendered
|
61
67
|
Home: (0, import_ds_utilities.runAll)((e) => {
|
62
68
|
if (e.ctrlKey) {
|
63
69
|
listRef.current.scrollToItem(0);
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../src/plugins/virtualization/VirtualizationPlugin.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
4
|
-
"sourcesContent": ["/* eslint-disable no-param-reassign */\n/* eslint-disable react/prop-types */\n/* eslint-disable react-hooks/rules-of-hooks */\nimport React, { useMemo, useRef } from 'react';\nimport { get } from 'lodash';\nimport { runAll, mergeRefs } from '@elliemae/ds-utilities';\nimport { createInstancePlugin, FocusGrid } from '@elliemae/ds-shared';\nimport { VirtualizedBody } from './VirtualizedBody';\n\nexport const VirtualizationPlugin = createInstancePlugin('virtualization', {\n decorateRenderers(renderers, grid) {\n const BodyWrapper = renderers.body.wrapper;\n // eslint-disable-next-line react/display-name\n renderers.body.wrapper = useMemo(\n ()
|
5
|
-
"mappings": "
|
4
|
+
"sourcesContent": ["/* eslint-disable no-param-reassign */\n/* eslint-disable react/prop-types */\n/* eslint-disable react-hooks/rules-of-hooks */\nimport React, { useMemo, useRef } from 'react';\nimport { get } from 'lodash';\nimport { runAll, mergeRefs } from '@elliemae/ds-utilities';\nimport { createInstancePlugin, FocusGrid } from '@elliemae/ds-shared';\nimport { VirtualizedBody } from './VirtualizedBody.js';\n\nexport const VirtualizationPlugin = createInstancePlugin('virtualization', {\n decorateRenderers(renderers, grid) {\n const BodyWrapper = renderers.body.wrapper;\n // eslint-disable-next-line react/display-name\n renderers.body.wrapper = useMemo(\n () =>\n function (props) {\n const { listProps = {}, rows } = props;\n const {\n hotKeys,\n props: { autoHeight, autoScrollToId, expandable, overscanCount, rowSize },\n refs: { innerBody },\n setHasScroll,\n state: { filters },\n } = grid.getInstance();\n\n const listRef = useRef();\n const nextListProps = {\n ...listProps,\n ref: mergeRefs(listRef, listProps.ref),\n };\n return (\n <FocusGrid\n hotKeys={hotKeys}\n keyBindings={({ defaultBindings }) => ({\n ...defaultBindings,\n // todo: this is kind of hacky, since it's virtualized and there's\n // the possibility that the firsts or lasts rows aren't rendered\n Home: runAll((e) => {\n if (e.ctrlKey) {\n listRef.current.scrollToItem(0);\n setTimeout(() => defaultBindings.Home(e), 10);\n } else {\n defaultBindings.Home(e);\n }\n }),\n End: runAll((e) => {\n if (e.ctrlKey) {\n listRef.current.scrollToItem(rows.length - 1);\n setTimeout(() => defaultBindings.End(e), 10);\n } else {\n defaultBindings.End(e);\n }\n }),\n })}\n shouldRefocus={false}\n >\n <VirtualizedBody\n {...props}\n autoScrollToId={autoScrollToId}\n autoHeight={autoHeight}\n component={BodyWrapper}\n expandable={expandable}\n innerBody={innerBody}\n listProps={nextListProps}\n overscanCount={overscanCount}\n rowSize={rowSize}\n setHasScroll={setHasScroll}\n filters={filters}\n />\n </FocusGrid>\n );\n },\n [get(grid.getInstance(), 'rows.length')],\n );\n return renderers;\n },\n});\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADwDT;AArDd,mBAAuC;AACvC,oBAAoB;AACpB,0BAAkC;AAClC,uBAAgD;AAChD,6BAAgC;AAEzB,MAAM,2BAAuB,uCAAqB,kBAAkB;AAAA,EACzE,kBAAkB,WAAW,MAAM;AACjC,UAAM,cAAc,UAAU,KAAK;AAEnC,cAAU,KAAK,cAAU;AAAA,MACvB,MACE,SAAU,OAAO;AACf,cAAM,EAAE,YAAY,CAAC,GAAG,KAAK,IAAI;AACjC,cAAM;AAAA,UACJ;AAAA,UACA,OAAO,EAAE,YAAY,gBAAgB,YAAY,eAAe,QAAQ;AAAA,UACxE,MAAM,EAAE,UAAU;AAAA,UAClB;AAAA,UACA,OAAO,EAAE,QAAQ;AAAA,QACnB,IAAI,KAAK,YAAY;AAErB,cAAM,cAAU,qBAAO;AACvB,cAAM,gBAAgB;AAAA,UACpB,GAAG;AAAA,UACH,SAAK,+BAAU,SAAS,UAAU,GAAG;AAAA,QACvC;AACA,eACE;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA,aAAa,CAAC,EAAE,gBAAgB,OAAO;AAAA,cACrC,GAAG;AAAA;AAAA;AAAA,cAGH,UAAM,4BAAO,CAAC,MAA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