@elliemae/ds-datagrids 3.4.3-rc.1 → 3.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/DSDataGrid.js +188 -145
- package/dist/cjs/DSDataGrid.js.map +1 -1
- package/dist/cjs/DataGridImpl.js +28 -15
- package/dist/cjs/DataGridImpl.js.map +1 -1
- package/dist/cjs/PaginatedDataGrid.js +27 -14
- package/dist/cjs/PaginatedDataGrid.js.map +1 -1
- package/dist/cjs/blockNames.js +4 -1
- package/dist/cjs/blockNames.js.map +1 -1
- package/dist/cjs/columns/IconColumn.js +22 -12
- package/dist/cjs/columns/IconColumn.js.map +2 -2
- package/dist/cjs/columns/NumberColumn.js +4 -1
- package/dist/cjs/columns/NumberColumn.js.map +1 -1
- package/dist/cjs/components/BodyCell.js +16 -6
- package/dist/cjs/components/BodyCell.js.map +2 -2
- package/dist/cjs/components/BodyList.js +12 -6
- package/dist/cjs/components/BodyList.js.map +2 -2
- package/dist/cjs/components/ColumnVisibilityMenuOption.js +22 -16
- package/dist/cjs/components/ColumnVisibilityMenuOption.js.map +1 -1
- package/dist/cjs/components/ColumnsOptionsMenuSection.js +21 -15
- package/dist/cjs/components/ColumnsOptionsMenuSection.js.map +1 -1
- package/dist/cjs/components/EmptyState.js +23 -9
- package/dist/cjs/components/EmptyState.js.map +2 -2
- package/dist/cjs/components/HeaderCell.js +10 -7
- package/dist/cjs/components/HeaderCell.js.map +2 -2
- package/dist/cjs/components/List.js +6 -3
- package/dist/cjs/components/List.js.map +1 -1
- package/dist/cjs/components/ListItem.js +13 -6
- package/dist/cjs/components/ListItem.js.map +1 -1
- package/dist/cjs/components/NoResults.js +19 -6
- package/dist/cjs/components/NoResults.js.map +1 -1
- package/dist/cjs/components/RowsLoader.js +10 -5
- package/dist/cjs/components/RowsLoader.js.map +1 -1
- package/dist/cjs/components/Table.js +55 -42
- package/dist/cjs/components/Table.js.map +1 -1
- package/dist/cjs/components/TableBody.js +10 -5
- package/dist/cjs/components/TableBody.js.map +1 -1
- package/dist/cjs/components/TableHeader.js +10 -5
- package/dist/cjs/components/TableHeader.js.map +1 -1
- package/dist/cjs/components/footer/addOptionalFooterComponents.js +16 -11
- package/dist/cjs/components/footer/addOptionalFooterComponents.js.map +1 -1
- package/dist/cjs/components/header/PrimaryControls.js +17 -10
- package/dist/cjs/components/header/PrimaryControls.js.map +1 -1
- package/dist/cjs/components/header/addOptionalHeaderComponents.js +15 -10
- package/dist/cjs/components/header/addOptionalHeaderComponents.js.map +2 -2
- package/dist/cjs/components/index.js +4 -1
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/components/renderers/defaultClassedRenderers.js +39 -16
- package/dist/cjs/components/renderers/defaultClassedRenderers.js.map +1 -1
- package/dist/cjs/components/renderers/index.js +4 -1
- package/dist/cjs/components/renderers/index.js.map +1 -1
- package/dist/cjs/components/renderers/renderRowsLoader.js +6 -3
- package/dist/cjs/components/renderers/renderRowsLoader.js.map +1 -1
- package/dist/cjs/components/tableContext.js +4 -1
- package/dist/cjs/components/tableContext.js.map +2 -2
- package/dist/cjs/defaultPlugins.js +4 -1
- package/dist/cjs/defaultPlugins.js.map +1 -1
- package/dist/cjs/index.js +4 -1
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +57 -40
- package/dist/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js.map +2 -2
- package/dist/cjs/plugins/body-header-scroll-sync/index.js +4 -1
- package/dist/cjs/plugins/body-header-scroll-sync/index.js.map +1 -1
- package/dist/cjs/plugins/column-dnd/DndColumnsPlugin.js +13 -5
- package/dist/cjs/plugins/column-dnd/DndColumnsPlugin.js.map +1 -1
- package/dist/cjs/plugins/column-dnd/decorateGridWithDndColumns.js +12 -4
- package/dist/cjs/plugins/column-dnd/decorateGridWithDndColumns.js.map +1 -1
- package/dist/cjs/plugins/column-dnd/index.js +4 -1
- package/dist/cjs/plugins/column-dnd/index.js.map +1 -1
- package/dist/cjs/plugins/column-sizing/ColumnSizingPlugin.js +4 -1
- package/dist/cjs/plugins/column-sizing/ColumnSizingPlugin.js.map +1 -1
- package/dist/cjs/plugins/column-sizing/columnMeasurerTransformer.js +4 -1
- package/dist/cjs/plugins/column-sizing/columnMeasurerTransformer.js.map +1 -1
- package/dist/cjs/plugins/column-sizing/ext-points/decorateColumn.js +4 -1
- package/dist/cjs/plugins/column-sizing/ext-points/decorateColumn.js.map +1 -1
- package/dist/cjs/plugins/column-sizing/ext-points/getTableProps.js +4 -1
- package/dist/cjs/plugins/column-sizing/ext-points/getTableProps.js.map +1 -1
- package/dist/cjs/plugins/column-sizing/getColumnNameFromProperty.js +4 -1
- package/dist/cjs/plugins/column-sizing/getColumnNameFromProperty.js.map +1 -1
- package/dist/cjs/plugins/column-sizing/index.js +4 -1
- package/dist/cjs/plugins/column-sizing/index.js.map +1 -1
- package/dist/cjs/plugins/column-sizing/useColumnSizeService.js +28 -7
- package/dist/cjs/plugins/column-sizing/useColumnSizeService.js.map +1 -1
- package/dist/cjs/plugins/column-sizing/useStylesheetHelpers.js +22 -7
- package/dist/cjs/plugins/column-sizing/useStylesheetHelpers.js.map +1 -1
- package/dist/cjs/plugins/column-sizing/utils.js +4 -1
- package/dist/cjs/plugins/column-sizing/utils.js.map +1 -1
- package/dist/cjs/plugins/custom-cell-renderer/CustomRendererPlugin.js +4 -1
- package/dist/cjs/plugins/custom-cell-renderer/CustomRendererPlugin.js.map +1 -1
- package/dist/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js +4 -1
- package/dist/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js.map +1 -1
- package/dist/cjs/plugins/custom-cell-renderer/getRendererComponent.js +6 -3
- package/dist/cjs/plugins/custom-cell-renderer/getRendererComponent.js.map +1 -1
- package/dist/cjs/plugins/custom-cell-renderer/index.js +4 -1
- package/dist/cjs/plugins/custom-cell-renderer/index.js.map +1 -1
- package/dist/cjs/plugins/editable/EditableComponents/ComboBox.js +7 -3
- package/dist/cjs/plugins/editable/EditableComponents/ComboBox.js.map +1 -1
- package/dist/cjs/plugins/editable/EditableComponents/TextBox.js +6 -2
- package/dist/cjs/plugins/editable/EditableComponents/TextBox.js.map +2 -2
- package/dist/cjs/plugins/editable/EditableComponents/index.js +4 -1
- package/dist/cjs/plugins/editable/EditableComponents/index.js.map +1 -1
- package/dist/cjs/plugins/editable/EditablePlugin.js +12 -6
- package/dist/cjs/plugins/editable/EditablePlugin.js.map +1 -1
- package/dist/cjs/plugins/editable/decorateEditable.js +40 -23
- package/dist/cjs/plugins/editable/decorateEditable.js.map +1 -1
- package/dist/cjs/plugins/editable/getEditorComponent.js +16 -12
- package/dist/cjs/plugins/editable/getEditorComponent.js.map +1 -1
- package/dist/cjs/plugins/editable/index.js +4 -1
- package/dist/cjs/plugins/editable/index.js.map +1 -1
- package/dist/cjs/plugins/expandable-grid/ExpandableColumn.js +49 -23
- package/dist/cjs/plugins/expandable-grid/ExpandableColumn.js.map +1 -1
- package/dist/cjs/plugins/expandable-grid/ExpandablePlugin.js +38 -21
- package/dist/cjs/plugins/expandable-grid/ExpandablePlugin.js.map +1 -1
- package/dist/cjs/plugins/expandable-grid/ExpandedRow.js +51 -35
- package/dist/cjs/plugins/expandable-grid/ExpandedRow.js.map +1 -1
- package/dist/cjs/plugins/expandable-grid/ExpandedRowExtra.js +21 -10
- package/dist/cjs/plugins/expandable-grid/ExpandedRowExtra.js.map +1 -1
- package/dist/cjs/plugins/expandable-grid/index.js +4 -1
- package/dist/cjs/plugins/expandable-grid/index.js.map +1 -1
- package/dist/cjs/plugins/expandable-grid/useExpandGridState.js +4 -1
- package/dist/cjs/plugins/expandable-grid/useExpandGridState.js.map +1 -1
- package/dist/cjs/plugins/export-data/ExportDataPlugin.js +4 -1
- package/dist/cjs/plugins/export-data/ExportDataPlugin.js.map +1 -1
- package/dist/cjs/plugins/export-data/index.js +4 -1
- package/dist/cjs/plugins/export-data/index.js.map +1 -1
- package/dist/cjs/plugins/filterable/FilterablePlugin.js +15 -9
- package/dist/cjs/plugins/filterable/FilterablePlugin.js.map +2 -2
- package/dist/cjs/plugins/filterable/addFilterToColumn.js +4 -1
- package/dist/cjs/plugins/filterable/addFilterToColumn.js.map +1 -1
- package/dist/cjs/plugins/filterable/components/FilterableHeader.js +36 -26
- package/dist/cjs/plugins/filterable/components/FilterableHeader.js.map +2 -2
- package/dist/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +67 -54
- package/dist/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js.map +2 -2
- package/dist/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +62 -46
- package/dist/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js.map +2 -2
- package/dist/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +102 -83
- package/dist/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js.map +2 -2
- package/dist/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js +43 -32
- package/dist/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js.map +2 -2
- package/dist/cjs/plugins/filterable/components/filterable-menus/defaultDateFormat.js +4 -1
- package/dist/cjs/plugins/filterable/components/filterable-menus/defaultDateFormat.js.map +1 -1
- package/dist/cjs/plugins/filterable/components/filterable-menus/getFilterMenuByType.js +4 -1
- package/dist/cjs/plugins/filterable/components/filterable-menus/getFilterMenuByType.js.map +1 -1
- package/dist/cjs/plugins/filterable/filterableFormatter.js +6 -3
- package/dist/cjs/plugins/filterable/filterableFormatter.js.map +1 -1
- package/dist/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js +10 -2
- package/dist/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js.map +1 -1
- package/dist/cjs/plugins/filterable/filtering-helper/strategiesOperators.js +4 -1
- package/dist/cjs/plugins/filterable/filtering-helper/strategiesOperators.js.map +2 -2
- package/dist/cjs/plugins/filterable/helper.js +19 -13
- package/dist/cjs/plugins/filterable/helper.js.map +1 -1
- package/dist/cjs/plugins/filterable/index.js +4 -1
- package/dist/cjs/plugins/filterable/index.js.map +1 -1
- package/dist/cjs/plugins/filterable/useFilterableState.js +7 -2
- package/dist/cjs/plugins/filterable/useFilterableState.js.map +2 -2
- package/dist/cjs/plugins/grouping-by/GroupingByPlugin.js +4 -1
- package/dist/cjs/plugins/grouping-by/GroupingByPlugin.js.map +1 -1
- package/dist/cjs/plugins/grouping-grid/GroupingPlugin.js +33 -18
- package/dist/cjs/plugins/grouping-grid/GroupingPlugin.js.map +1 -1
- package/dist/cjs/plugins/grouping-grid/walkStrategy.js +4 -1
- package/dist/cjs/plugins/grouping-grid/walkStrategy.js.map +1 -1
- package/dist/cjs/plugins/index.js +4 -1
- package/dist/cjs/plugins/index.js.map +1 -1
- package/dist/cjs/plugins/infinite-scrolling/InfiniteScrollPlugin.js +4 -1
- package/dist/cjs/plugins/infinite-scrolling/InfiniteScrollPlugin.js.map +1 -1
- package/dist/cjs/plugins/infinite-scrolling/index.js +4 -1
- package/dist/cjs/plugins/infinite-scrolling/index.js.map +1 -1
- package/dist/cjs/plugins/pagination/PaginationPlugin.js +46 -31
- package/dist/cjs/plugins/pagination/PaginationPlugin.js.map +2 -2
- package/dist/cjs/plugins/pagination/components/Pagination.js +25 -14
- package/dist/cjs/plugins/pagination/components/Pagination.js.map +1 -1
- package/dist/cjs/plugins/pagination/components/Paginator.js +54 -36
- package/dist/cjs/plugins/pagination/components/Paginator.js.map +2 -2
- package/dist/cjs/plugins/pagination/components/PerPageDropdown.js +16 -6
- package/dist/cjs/plugins/pagination/components/PerPageDropdown.js.map +2 -2
- package/dist/cjs/plugins/pagination/helper.js +4 -1
- package/dist/cjs/plugins/pagination/helper.js.map +1 -1
- package/dist/cjs/plugins/pagination/index.js +4 -1
- package/dist/cjs/plugins/pagination/index.js.map +1 -1
- package/dist/cjs/plugins/pagination/usePaginationState.js +4 -1
- package/dist/cjs/plugins/pagination/usePaginationState.js.map +1 -1
- package/dist/cjs/plugins/resizable/ResizablePlugin.js +62 -53
- package/dist/cjs/plugins/resizable/ResizablePlugin.js.map +1 -1
- package/dist/cjs/plugins/resizable/decorateResizable.js +13 -5
- package/dist/cjs/plugins/resizable/decorateResizable.js.map +2 -2
- package/dist/cjs/plugins/resizable/index.js +4 -1
- package/dist/cjs/plugins/resizable/index.js.map +1 -1
- package/dist/cjs/plugins/resizable/useResizeHandle.js +12 -4
- package/dist/cjs/plugins/resizable/useResizeHandle.js.map +1 -1
- package/dist/cjs/plugins/resizable/utils.js +4 -1
- package/dist/cjs/plugins/resizable/utils.js.map +2 -2
- package/dist/cjs/plugins/row-dnd/DndRowsPlugin.js +19 -7
- package/dist/cjs/plugins/row-dnd/DndRowsPlugin.js.map +1 -1
- package/dist/cjs/plugins/row-dnd/index.js +4 -1
- package/dist/cjs/plugins/row-dnd/index.js.map +1 -1
- package/dist/cjs/plugins/selectable/SelectablePlugin.js +8 -2
- package/dist/cjs/plugins/selectable/SelectablePlugin.js.map +2 -2
- package/dist/cjs/plugins/selectable/addSelectableColumn.js +28 -15
- package/dist/cjs/plugins/selectable/addSelectableColumn.js.map +1 -1
- package/dist/cjs/plugins/selectable/helper.js +4 -1
- package/dist/cjs/plugins/selectable/helper.js.map +1 -1
- package/dist/cjs/plugins/selectable/index.js +4 -1
- package/dist/cjs/plugins/selectable/index.js.map +1 -1
- package/dist/cjs/plugins/selectable/selectableFormatter.js +39 -27
- package/dist/cjs/plugins/selectable/selectableFormatter.js.map +2 -2
- package/dist/cjs/plugins/selectable/useSelectableState.js +16 -4
- package/dist/cjs/plugins/selectable/useSelectableState.js.map +2 -2
- package/dist/cjs/plugins/sortable/SortablePlugin.js +12 -6
- package/dist/cjs/plugins/sortable/SortablePlugin.js.map +1 -1
- package/dist/cjs/plugins/sortable/checkIfSortable.js +4 -1
- package/dist/cjs/plugins/sortable/checkIfSortable.js.map +1 -1
- package/dist/cjs/plugins/sortable/index.js +4 -1
- package/dist/cjs/plugins/sortable/index.js.map +1 -1
- package/dist/cjs/plugins/sortable/sortHeaderFormatter.js +18 -9
- package/dist/cjs/plugins/sortable/sortHeaderFormatter.js.map +2 -2
- package/dist/cjs/plugins/sortable/sortTree.js +12 -5
- package/dist/cjs/plugins/sortable/sortTree.js.map +1 -1
- package/dist/cjs/plugins/sortable/sorter.js +21 -10
- package/dist/cjs/plugins/sortable/sorter.js.map +2 -2
- package/dist/cjs/plugins/sortable/useSortableState.js +7 -2
- package/dist/cjs/plugins/sortable/useSortableState.js.map +1 -1
- package/dist/cjs/plugins/toolbar/RowRenderer.js +38 -22
- package/dist/cjs/plugins/toolbar/RowRenderer.js.map +2 -2
- package/dist/cjs/plugins/toolbar/ToolbarPlugin.js +19 -7
- package/dist/cjs/plugins/toolbar/ToolbarPlugin.js.map +1 -1
- package/dist/cjs/plugins/toolbar/ToolbarTrigger.js +30 -19
- package/dist/cjs/plugins/toolbar/ToolbarTrigger.js.map +1 -1
- package/dist/cjs/plugins/toolbar/index.js +4 -1
- package/dist/cjs/plugins/toolbar/index.js.map +1 -1
- package/dist/cjs/plugins/virtualization/AutoHeightList.js +36 -30
- package/dist/cjs/plugins/virtualization/AutoHeightList.js.map +2 -2
- package/dist/cjs/plugins/virtualization/VirtualizationPlugin.js +58 -50
- package/dist/cjs/plugins/virtualization/VirtualizationPlugin.js.map +1 -1
- package/dist/cjs/plugins/virtualization/VirtualizedBody.js +69 -54
- package/dist/cjs/plugins/virtualization/VirtualizedBody.js.map +2 -2
- package/dist/cjs/plugins/virtualization/VirtualizedBodyRow.js +17 -10
- package/dist/cjs/plugins/virtualization/VirtualizedBodyRow.js.map +1 -1
- package/dist/cjs/plugins/virtualization/helper.js +4 -1
- package/dist/cjs/plugins/virtualization/helper.js.map +1 -1
- package/dist/cjs/plugins/virtualization/index.js +4 -1
- package/dist/cjs/plugins/virtualization/index.js.map +1 -1
- package/dist/cjs/renders/CellWithAddons.js +35 -22
- package/dist/cjs/renders/CellWithAddons.js.map +2 -2
- package/dist/cjs/renders/index.js +4 -1
- package/dist/cjs/renders/index.js.map +1 -1
- package/dist/cjs/renders/styled.js +4 -1
- package/dist/cjs/renders/styled.js.map +1 -1
- package/dist/cjs/rowSizes.js +4 -1
- package/dist/cjs/rowSizes.js.map +1 -1
- package/dist/cjs/utilities/getPluginsFromProps.js +4 -1
- package/dist/cjs/utilities/getPluginsFromProps.js.map +1 -1
- package/dist/cjs/utilities/getScrollbarSize.js +4 -1
- package/dist/cjs/utilities/getScrollbarSize.js.map +1 -1
- package/dist/cjs/utilities/normalizeData.js +4 -1
- package/dist/cjs/utilities/normalizeData.js.map +1 -1
- package/dist/esm/DSDataGrid.js +184 -144
- package/dist/esm/DSDataGrid.js.map +1 -1
- package/dist/esm/DataGridImpl.js +24 -14
- package/dist/esm/DataGridImpl.js.map +1 -1
- package/dist/esm/PaginatedDataGrid.js +23 -13
- package/dist/esm/PaginatedDataGrid.js.map +1 -1
- package/dist/esm/blockNames.js.map +1 -1
- package/dist/esm/columns/IconColumn.js +18 -11
- package/dist/esm/columns/IconColumn.js.map +2 -2
- package/dist/esm/columns/NumberColumn.js.map +1 -1
- package/dist/esm/components/BodyCell.js +12 -5
- package/dist/esm/components/BodyCell.js.map +1 -1
- package/dist/esm/components/BodyList.js +8 -5
- package/dist/esm/components/BodyList.js.map +2 -2
- package/dist/esm/components/ColumnVisibilityMenuOption.js +18 -15
- package/dist/esm/components/ColumnVisibilityMenuOption.js.map +1 -1
- package/dist/esm/components/ColumnsOptionsMenuSection.js +17 -14
- package/dist/esm/components/ColumnsOptionsMenuSection.js.map +1 -1
- package/dist/esm/components/EmptyState.js +19 -8
- package/dist/esm/components/EmptyState.js.map +1 -1
- package/dist/esm/components/HeaderCell.js +6 -6
- package/dist/esm/components/HeaderCell.js.map +1 -1
- package/dist/esm/components/List.js +2 -2
- package/dist/esm/components/List.js.map +1 -1
- package/dist/esm/components/ListItem.js +9 -5
- package/dist/esm/components/ListItem.js.map +1 -1
- package/dist/esm/components/NoResults.js +15 -5
- package/dist/esm/components/NoResults.js.map +1 -1
- package/dist/esm/components/RowsLoader.js +6 -4
- package/dist/esm/components/RowsLoader.js.map +1 -1
- package/dist/esm/components/Table.js +51 -41
- package/dist/esm/components/Table.js.map +1 -1
- package/dist/esm/components/TableBody.js +6 -4
- package/dist/esm/components/TableBody.js.map +1 -1
- package/dist/esm/components/TableHeader.js +6 -4
- package/dist/esm/components/TableHeader.js.map +1 -1
- package/dist/esm/components/footer/addOptionalFooterComponents.js +12 -10
- package/dist/esm/components/footer/addOptionalFooterComponents.js.map +1 -1
- package/dist/esm/components/header/PrimaryControls.js +13 -9
- package/dist/esm/components/header/PrimaryControls.js.map +1 -1
- package/dist/esm/components/header/addOptionalHeaderComponents.js +11 -9
- package/dist/esm/components/header/addOptionalHeaderComponents.js.map +1 -1
- package/dist/esm/components/index.js.map +2 -2
- package/dist/esm/components/renderers/defaultClassedRenderers.js +35 -15
- package/dist/esm/components/renderers/defaultClassedRenderers.js.map +1 -1
- package/dist/esm/components/renderers/index.js.map +1 -1
- package/dist/esm/components/renderers/renderRowsLoader.js +2 -2
- package/dist/esm/components/renderers/renderRowsLoader.js.map +1 -1
- package/dist/esm/components/tableContext.js.map +2 -2
- package/dist/esm/defaultPlugins.js.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +53 -39
- package/dist/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js.map +2 -2
- package/dist/esm/plugins/body-header-scroll-sync/index.js.map +1 -1
- package/dist/esm/plugins/column-dnd/DndColumnsPlugin.js +9 -4
- package/dist/esm/plugins/column-dnd/DndColumnsPlugin.js.map +1 -1
- package/dist/esm/plugins/column-dnd/decorateGridWithDndColumns.js +8 -3
- package/dist/esm/plugins/column-dnd/decorateGridWithDndColumns.js.map +1 -1
- package/dist/esm/plugins/column-dnd/index.js.map +1 -1
- 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.map +1 -1
- package/dist/esm/plugins/column-sizing/ext-points/getTableProps.js.map +1 -1
- package/dist/esm/plugins/column-sizing/getColumnNameFromProperty.js.map +1 -1
- package/dist/esm/plugins/column-sizing/index.js.map +1 -1
- package/dist/esm/plugins/column-sizing/useColumnSizeService.js +24 -6
- package/dist/esm/plugins/column-sizing/useColumnSizeService.js.map +1 -1
- package/dist/esm/plugins/column-sizing/useStylesheetHelpers.js +18 -6
- package/dist/esm/plugins/column-sizing/useStylesheetHelpers.js.map +1 -1
- package/dist/esm/plugins/column-sizing/utils.js.map +1 -1
- package/dist/esm/plugins/custom-cell-renderer/CustomRendererPlugin.js.map +1 -1
- package/dist/esm/plugins/custom-cell-renderer/addCustomRendererToCell.js.map +1 -1
- package/dist/esm/plugins/custom-cell-renderer/getRendererComponent.js +2 -2
- package/dist/esm/plugins/custom-cell-renderer/getRendererComponent.js.map +1 -1
- package/dist/esm/plugins/custom-cell-renderer/index.js.map +1 -1
- package/dist/esm/plugins/editable/EditableComponents/ComboBox.js +3 -2
- package/dist/esm/plugins/editable/EditableComponents/ComboBox.js.map +1 -1
- package/dist/esm/plugins/editable/EditableComponents/TextBox.js +2 -1
- package/dist/esm/plugins/editable/EditableComponents/TextBox.js.map +2 -2
- package/dist/esm/plugins/editable/EditableComponents/index.js.map +2 -2
- package/dist/esm/plugins/editable/EditablePlugin.js +8 -5
- package/dist/esm/plugins/editable/EditablePlugin.js.map +1 -1
- package/dist/esm/plugins/editable/decorateEditable.js +36 -22
- package/dist/esm/plugins/editable/decorateEditable.js.map +1 -1
- package/dist/esm/plugins/editable/getEditorComponent.js +12 -11
- package/dist/esm/plugins/editable/getEditorComponent.js.map +1 -1
- package/dist/esm/plugins/editable/index.js.map +1 -1
- package/dist/esm/plugins/expandable-grid/ExpandableColumn.js +45 -22
- package/dist/esm/plugins/expandable-grid/ExpandableColumn.js.map +1 -1
- package/dist/esm/plugins/expandable-grid/ExpandablePlugin.js +34 -20
- package/dist/esm/plugins/expandable-grid/ExpandablePlugin.js.map +1 -1
- package/dist/esm/plugins/expandable-grid/ExpandedRow.js +47 -34
- package/dist/esm/plugins/expandable-grid/ExpandedRow.js.map +1 -1
- package/dist/esm/plugins/expandable-grid/ExpandedRowExtra.js +17 -9
- package/dist/esm/plugins/expandable-grid/ExpandedRowExtra.js.map +1 -1
- package/dist/esm/plugins/expandable-grid/index.js.map +1 -1
- package/dist/esm/plugins/expandable-grid/useExpandGridState.js.map +1 -1
- package/dist/esm/plugins/export-data/ExportDataPlugin.js.map +1 -1
- package/dist/esm/plugins/export-data/index.js.map +1 -1
- package/dist/esm/plugins/filterable/FilterablePlugin.js +11 -8
- package/dist/esm/plugins/filterable/FilterablePlugin.js.map +1 -1
- package/dist/esm/plugins/filterable/addFilterToColumn.js.map +1 -1
- package/dist/esm/plugins/filterable/components/FilterableHeader.js +32 -25
- package/dist/esm/plugins/filterable/components/FilterableHeader.js.map +1 -1
- package/dist/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +63 -53
- package/dist/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js.map +1 -1
- package/dist/esm/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +58 -45
- package/dist/esm/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js.map +1 -1
- package/dist/esm/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +98 -82
- package/dist/esm/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js.map +1 -1
- package/dist/esm/plugins/filterable/components/filterable-menus/TextFilterMenu.js +39 -31
- package/dist/esm/plugins/filterable/components/filterable-menus/TextFilterMenu.js.map +2 -2
- package/dist/esm/plugins/filterable/components/filterable-menus/defaultDateFormat.js.map +1 -1
- package/dist/esm/plugins/filterable/components/filterable-menus/getFilterMenuByType.js.map +1 -1
- package/dist/esm/plugins/filterable/filterableFormatter.js +2 -2
- package/dist/esm/plugins/filterable/filterableFormatter.js.map +1 -1
- package/dist/esm/plugins/filterable/filtering-helper/filterRowsByQuery.js +6 -1
- package/dist/esm/plugins/filterable/filtering-helper/filterRowsByQuery.js.map +1 -1
- package/dist/esm/plugins/filterable/filtering-helper/strategiesOperators.js.map +1 -1
- package/dist/esm/plugins/filterable/helper.js +15 -12
- package/dist/esm/plugins/filterable/helper.js.map +1 -1
- package/dist/esm/plugins/filterable/index.js.map +1 -1
- package/dist/esm/plugins/filterable/useFilterableState.js +3 -1
- package/dist/esm/plugins/filterable/useFilterableState.js.map +1 -1
- package/dist/esm/plugins/grouping-by/GroupingByPlugin.js.map +1 -1
- package/dist/esm/plugins/grouping-grid/GroupingPlugin.js +29 -17
- package/dist/esm/plugins/grouping-grid/GroupingPlugin.js.map +1 -1
- package/dist/esm/plugins/grouping-grid/walkStrategy.js.map +1 -1
- 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.map +1 -1
- package/dist/esm/plugins/pagination/PaginationPlugin.js +42 -30
- package/dist/esm/plugins/pagination/PaginationPlugin.js.map +2 -2
- package/dist/esm/plugins/pagination/components/Pagination.js +21 -13
- package/dist/esm/plugins/pagination/components/Pagination.js.map +1 -1
- package/dist/esm/plugins/pagination/components/Paginator.js +50 -35
- package/dist/esm/plugins/pagination/components/Paginator.js.map +1 -1
- package/dist/esm/plugins/pagination/components/PerPageDropdown.js +12 -5
- package/dist/esm/plugins/pagination/components/PerPageDropdown.js.map +1 -1
- package/dist/esm/plugins/pagination/helper.js.map +1 -1
- package/dist/esm/plugins/pagination/index.js.map +1 -1
- package/dist/esm/plugins/pagination/usePaginationState.js.map +1 -1
- package/dist/esm/plugins/resizable/ResizablePlugin.js +58 -52
- package/dist/esm/plugins/resizable/ResizablePlugin.js.map +1 -1
- package/dist/esm/plugins/resizable/decorateResizable.js +9 -4
- package/dist/esm/plugins/resizable/decorateResizable.js.map +2 -2
- package/dist/esm/plugins/resizable/index.js.map +1 -1
- package/dist/esm/plugins/resizable/useResizeHandle.js +8 -3
- package/dist/esm/plugins/resizable/useResizeHandle.js.map +1 -1
- package/dist/esm/plugins/resizable/utils.js.map +1 -1
- package/dist/esm/plugins/row-dnd/DndRowsPlugin.js +15 -6
- package/dist/esm/plugins/row-dnd/DndRowsPlugin.js.map +1 -1
- package/dist/esm/plugins/row-dnd/index.js.map +1 -1
- package/dist/esm/plugins/selectable/SelectablePlugin.js +4 -1
- package/dist/esm/plugins/selectable/SelectablePlugin.js.map +1 -1
- package/dist/esm/plugins/selectable/addSelectableColumn.js +24 -14
- package/dist/esm/plugins/selectable/addSelectableColumn.js.map +1 -1
- package/dist/esm/plugins/selectable/helper.js.map +1 -1
- package/dist/esm/plugins/selectable/index.js.map +1 -1
- package/dist/esm/plugins/selectable/selectableFormatter.js +35 -26
- package/dist/esm/plugins/selectable/selectableFormatter.js.map +2 -2
- package/dist/esm/plugins/selectable/useSelectableState.js +12 -3
- package/dist/esm/plugins/selectable/useSelectableState.js.map +1 -1
- package/dist/esm/plugins/sortable/SortablePlugin.js +8 -5
- package/dist/esm/plugins/sortable/SortablePlugin.js.map +1 -1
- package/dist/esm/plugins/sortable/checkIfSortable.js.map +1 -1
- package/dist/esm/plugins/sortable/index.js.map +1 -1
- package/dist/esm/plugins/sortable/sortHeaderFormatter.js +14 -8
- package/dist/esm/plugins/sortable/sortHeaderFormatter.js.map +2 -2
- package/dist/esm/plugins/sortable/sortTree.js +8 -4
- package/dist/esm/plugins/sortable/sortTree.js.map +1 -1
- package/dist/esm/plugins/sortable/sorter.js +17 -9
- package/dist/esm/plugins/sortable/sorter.js.map +1 -1
- package/dist/esm/plugins/sortable/useSortableState.js +3 -1
- package/dist/esm/plugins/sortable/useSortableState.js.map +1 -1
- package/dist/esm/plugins/toolbar/RowRenderer.js +34 -21
- package/dist/esm/plugins/toolbar/RowRenderer.js.map +1 -1
- package/dist/esm/plugins/toolbar/ToolbarPlugin.js +15 -6
- package/dist/esm/plugins/toolbar/ToolbarPlugin.js.map +1 -1
- package/dist/esm/plugins/toolbar/ToolbarTrigger.js +26 -18
- package/dist/esm/plugins/toolbar/ToolbarTrigger.js.map +1 -1
- package/dist/esm/plugins/toolbar/index.js.map +1 -1
- package/dist/esm/plugins/virtualization/AutoHeightList.js +32 -29
- package/dist/esm/plugins/virtualization/AutoHeightList.js.map +1 -1
- package/dist/esm/plugins/virtualization/VirtualizationPlugin.js +54 -49
- package/dist/esm/plugins/virtualization/VirtualizationPlugin.js.map +1 -1
- package/dist/esm/plugins/virtualization/VirtualizedBody.js +65 -53
- package/dist/esm/plugins/virtualization/VirtualizedBody.js.map +1 -1
- package/dist/esm/plugins/virtualization/VirtualizedBodyRow.js +13 -9
- package/dist/esm/plugins/virtualization/VirtualizedBodyRow.js.map +1 -1
- package/dist/esm/plugins/virtualization/helper.js.map +1 -1
- package/dist/esm/plugins/virtualization/index.js.map +1 -1
- package/dist/esm/renders/CellWithAddons.js +31 -21
- package/dist/esm/renders/CellWithAddons.js.map +1 -1
- package/dist/esm/renders/index.js.map +1 -1
- package/dist/esm/renders/styled.js.map +1 -1
- package/dist/esm/rowSizes.js.map +1 -1
- package/dist/esm/utilities/getPluginsFromProps.js.map +1 -1
- package/dist/esm/utilities/getScrollbarSize.js.map +1 -1
- package/dist/esm/utilities/normalizeData.js.map +1 -1
- package/package.json +19 -19
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Component } from "react";
|
|
3
4
|
import { DSComboBox } from "@elliemae/ds-form";
|
|
4
5
|
class ComboBox extends Component {
|
|
5
6
|
constructor(props) {
|
|
@@ -18,7 +19,7 @@ class ComboBox extends Component {
|
|
|
18
19
|
}
|
|
19
20
|
render() {
|
|
20
21
|
const { value } = this.state;
|
|
21
|
-
return /* @__PURE__ */
|
|
22
|
+
return /* @__PURE__ */ jsx(DSComboBox, {
|
|
22
23
|
...this.props,
|
|
23
24
|
menuIsOpen: true,
|
|
24
25
|
onBlur: this.handleBlur,
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/plugins/editable/EditableComponents/ComboBox.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { Component } from 'react';\nimport { DSComboBox } from '@elliemae/ds-form';\n\nclass ComboBox extends Component {\n static defaultProps = {\n onValue: () => null,\n };\n\n constructor(props) {\n super(props);\n this.state = { value: props.value };\n }\n\n handleChange = (value) => {\n const { onValue } = this.props;\n\n // some how this is executed before handleBlur, and handleBlur before the value is set\n // causing the value to be the same as the prevProp\n // todo: find a better solution to this\n setTimeout(() => onValue(value), 1);\n this.setState({ value });\n }\n\n handleBlur = () => {\n const { onValue } = this.props;\n const { value } = this.state;\n onValue(value);\n }\n\n render() {\n const { value } = this.state;\n return (\n <DSComboBox\n {...this.props}\n menuIsOpen\n onBlur={this.handleBlur}\n onChange={this.handleChange}\n onClick={(e) => e.stopPropagation()}\n value={value}\n />\n );\n }\n}\n\nexport { ComboBox };\nexport default ComboBox;\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,SAAgB,iBAAiB;AACjC,SAAS,kBAAkB;AAE3B,MAAM,iBAAiB,UAAU;AAAA,EAK/B,YAAY,OAAO;AACjB,UAAM,KAAK;AAIb,wBAAe,CAAC,UAAU;AACxB,YAAM,EAAE,QAAQ,IAAI,KAAK;AAKzB,iBAAW,MAAM,QAAQ,KAAK,GAAG,CAAC;AAClC,WAAK,SAAS,EAAE,MAAM,CAAC;AAAA,IACzB;AAEA,sBAAa,MAAM;AACjB,YAAM,EAAE,QAAQ,IAAI,KAAK;AACzB,YAAM,EAAE,MAAM,IAAI,KAAK;AACvB,cAAQ,KAAK;AAAA,IACf;AAjBE,SAAK,QAAQ,EAAE,OAAO,MAAM,MAAM;AAAA,EACpC;AAAA,EAkBA,SAAS;AACP,UAAM,EAAE,MAAM,IAAI,KAAK;AACvB,WACE,oBAAC;AAAA,MACE,GAAG,KAAK;AAAA,MACT,YAAU;AAAA,MACV,QAAQ,KAAK;AAAA,MACb,UAAU,KAAK;AAAA,MACf,SAAS,CAAC,MAAM,EAAE,gBAAgB;AAAA,MAClC;AAAA,KACF;AAAA,EAEJ;AACF;AAvCM,SACG,eAAe;AAAA,EACpB,SAAS,MAAM;AACjB;AAuCF,IAAO,mBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
import React2, { Component } from "react";
|
|
3
4
|
import { DSTextBox } from "@elliemae/ds-form";
|
|
4
5
|
class TextBox extends Component {
|
|
@@ -37,7 +38,7 @@ class TextBox extends Component {
|
|
|
37
38
|
}
|
|
38
39
|
render() {
|
|
39
40
|
const { value } = this.state;
|
|
40
|
-
return /* @__PURE__ */
|
|
41
|
+
return /* @__PURE__ */ jsx(DSTextBox, {
|
|
41
42
|
"data-testid": "ds-datagrids-editable-text-box",
|
|
42
43
|
...this.props,
|
|
43
44
|
innerRef: this.inputRef,
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/plugins/editable/EditableComponents/TextBox.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/prop-types */\n/* eslint-disable react/static-property-placement */\nimport React, { Component } from 'react';\nimport { DSTextBox } from '@elliemae/ds-form';\n\n// todo: redo with hooks\nclass TextBox extends Component {\n static defaultProps = {\n onValue: () => null,\n };\n\n constructor(props) {\n super(props);\n this.inputRef = React.createRef();\n this.state = { value: props.value };\n }\n\n componentDidMount() {\n setTimeout(() => {\n if (this.inputRef && this.inputRef.current) {\n this.inputRef.current.focus();\n }\n }, 50);\n }\n\n handleKeyUp = ({ key, target: { value } }) => {\n const { onValue } = this.props;\n if (key === 'Enter') {\n onValue(value);\n }\n }\n\n handleKeyDown = (e) => {\n // PUI-2553 prevent form submit on `Enter` keypress\n if (e.key === 'Enter') {\n e.preventDefault();\n }\n }\n\n handleBlur = (e) => {\n const { onValue } = this.props;\n const {\n target: { value },\n } = e;\n onValue(value);\n }\n\n handleChange = ({ target: { value } }) => {\n this.setState({ value });\n }\n\n render() {\n const { value } = this.state;\n return (\n <DSTextBox\n data-testid=\"ds-datagrids-editable-text-box\"\n {...this.props}\n innerRef={this.inputRef}\n onBlur={this.handleBlur}\n onChange={this.handleChange}\n onClick={(e) => e.stopPropagation()}\n onKeyUp={this.handleKeyUp}\n onKeyDown={this.handleKeyDown}\n value={value}\n />\n );\n }\n}\n\nexport { TextBox };\nexport default TextBox;\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAEA,OAAOA,UAAS,iBAAiB;AACjC,SAAS,iBAAiB;AAG1B,MAAM,gBAAgB,UAAU;AAAA,EAK9B,YAAY,OAAO;AACjB,UAAM,KAAK;AAab,uBAAc,CAAC,EAAE,KAAK,QAAQ,EAAE,MAAM,EAAE,MAAM;AAC5C,YAAM,EAAE,QAAQ,IAAI,KAAK;AACzB,UAAI,QAAQ,SAAS;AACnB,gBAAQ,KAAK;AAAA,MACf;AAAA,IACF;AAEA,yBAAgB,CAAC,MAAM;AAErB,UAAI,EAAE,QAAQ,SAAS;AACrB,UAAE,eAAe;AAAA,MACnB;AAAA,IACF;AAEA,sBAAa,CAAC,MAAM;AAClB,YAAM,EAAE,QAAQ,IAAI,KAAK;AACzB,YAAM;AAAA,QACJ,QAAQ,EAAE,MAAM;AAAA,MAClB,IAAI;AACJ,cAAQ,KAAK;AAAA,IACf;AAEA,wBAAe,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM;AACxC,WAAK,SAAS,EAAE,MAAM,CAAC;AAAA,IACzB;AApCE,SAAK,WAAWA,OAAM,UAAU;AAChC,SAAK,QAAQ,EAAE,OAAO,MAAM,MAAM;AAAA,EACpC;AAAA,EAEA,oBAAoB;AAClB,eAAW,MAAM;AACf,UAAI,KAAK,YAAY,KAAK,SAAS,SAAS;AAC1C,aAAK,SAAS,QAAQ,MAAM;AAAA,MAC9B;AAAA,IACF,GAAG,EAAE;AAAA,EACP;AAAA,EA4BA,SAAS;AACP,UAAM,EAAE,MAAM,IAAI,KAAK;AACvB,WACE,oBAAC;AAAA,MACC,eAAY;AAAA,MACX,GAAG,KAAK;AAAA,MACT,UAAU,KAAK;AAAA,MACf,QAAQ,KAAK;AAAA,MACb,UAAU,KAAK;AAAA,MACf,SAAS,CAAC,MAAM,EAAE,gBAAgB;AAAA,MAClC,SAAS,KAAK;AAAA,MACd,WAAW,KAAK;AAAA,MAChB;AAAA,KACF;AAAA,EAEJ;AACF;AA7DM,QACG,eAAe;AAAA,EACpB,SAAS,MAAM;AACjB;AA6DF,IAAO,kBAAQ;",
|
|
6
|
+
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/plugins/editable/EditableComponents/index.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { default as ComboBox } from './ComboBox';\nexport { default as TextBox } from './TextBox';\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAoB,WAAXA,gBAA2B;AACpC,SAAoB,WAAXA,gBAA0B;",
|
|
6
|
+
"names": ["default"]
|
|
7
7
|
}
|
|
@@ -36,11 +36,14 @@ const decorateColumn = (column, grid) => {
|
|
|
36
36
|
props: { isColumnEditable = (col) => col.editable, customHandlers }
|
|
37
37
|
} = grid;
|
|
38
38
|
const editableConfig = makeEditableConfig(grid);
|
|
39
|
-
return isColumnEditable(column) ? addEditableToCell(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
return isColumnEditable(column) ? addEditableToCell(
|
|
40
|
+
{
|
|
41
|
+
column,
|
|
42
|
+
config: editableConfig,
|
|
43
|
+
handlers: customHandlers
|
|
44
|
+
},
|
|
45
|
+
grid
|
|
46
|
+
) : column;
|
|
44
47
|
};
|
|
45
48
|
const EditablePlugin = createInstancePlugin("editable", {
|
|
46
49
|
registerStateHook,
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/editable/EditablePlugin.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useDerivedStateFromProps, toggleInObject } from '@elliemae/ds-utilities';\nimport { createInstancePlugin } from '@elliemae/ds-shared';\nimport { addEditableToCell, makeEditableConfig } from './decorateEditable';\n\nconst registerStateHook = (grid) => {\n const { rowKey = 'id', editingRows: editingRowsProp, onColumnRowEdited, onColumnRowEdit } = grid.props;\n const [editingRows, setEditingRows] = useDerivedStateFromProps(editingRowsProp || {});\n\n const activateEdit = (editParams) => {\n const { shouldRefocus } = grid.getInstance();\n const { rowData, columnIndex } = editParams;\n shouldRefocus.current = { forced: true, value: false };\n setEditingRows((prevEditingRows) => {\n onColumnRowEdit(editParams);\n return toggleInObject(prevEditingRows, rowData[rowKey], columnIndex);\n });\n };\n\n const editValue = ({ value, rowData, property, rowIndex }) => {\n setEditingRows({});\n onColumnRowEdited({\n value,\n rowData,\n property,\n rowIndex,\n });\n };\n\n return {\n state: { editingRows },\n actions: {\n activateEdit,\n editValue,\n },\n };\n};\n\nconst decorateColumn = (column, grid) => {\n const {\n props: { isColumnEditable = (col) => col.editable, customHandlers },\n } = grid;\n\n const editableConfig = makeEditableConfig(grid);\n\n return isColumnEditable(column)\n ? addEditableToCell(\n {\n column,\n config: editableConfig,\n handlers: customHandlers,\n },\n grid,\n )\n : column;\n};\n\nexport const EditablePlugin = createInstancePlugin('editable', {\n registerStateHook,\n decorateColumn,\n registerHotKeys(grid) {\n return {\n key: 'enter',\n handler: ({ rowIndex, cellIndex }) => {\n const {\n composedRows,\n decoratedColumns,\n actions: { activateEdit },\n props: { isColumnEditable },\n } = grid.getInstance();\n\n if (!isColumnEditable(decoratedColumns[cellIndex])) return;\n\n const rows = composedRows.rows || composedRows;\n const row = rows[rowIndex];\n if (!row) return;\n\n activateEdit({\n rowData: row,\n columnIndex: cellIndex,\n });\n },\n options: {\n keydown: false,\n keyup: true,\n },\n };\n },\n});\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,0BAA0B,sBAAsB;AACzD,SAAS,4BAA4B;AACrC,SAAS,mBAAmB,0BAA0B;AAEtD,MAAM,oBAAoB,CAAC,SAAS;AAClC,QAAM,EAAE,SAAS,MAAM,aAAa,iBAAiB,mBAAmB,gBAAgB,IAAI,KAAK;AACjG,QAAM,CAAC,aAAa,cAAc,IAAI,yBAAyB,mBAAmB,CAAC,CAAC;AAEpF,QAAM,eAAe,CAAC,eAAe;AACnC,UAAM,EAAE,cAAc,IAAI,KAAK,YAAY;AAC3C,UAAM,EAAE,SAAS,YAAY,IAAI;AACjC,kBAAc,UAAU,EAAE,QAAQ,MAAM,OAAO,MAAM;AACrD,mBAAe,CAAC,oBAAoB;AAClC,sBAAgB,UAAU;AAC1B,aAAO,eAAe,iBAAiB,QAAQ,SAAS,WAAW;AAAA,IACrE,CAAC;AAAA,EACH;AAEA,QAAM,YAAY,CAAC,EAAE,OAAO,SAAS,UAAU,S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Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as edit from "react-edit";
|
|
4
4
|
import { EditPencil } from "@elliemae/ds-icons";
|
|
5
5
|
import { cx } from "@elliemae/ds-utilities";
|
|
@@ -27,27 +27,41 @@ const makeEditableConfig = (grid) => edit.edit({
|
|
|
27
27
|
});
|
|
28
28
|
const addEditableToCell = ({ column, config, handlers }, grid) => {
|
|
29
29
|
column.cell.transforms.push(config(getEditorComponent(column.customEditor, handlers)));
|
|
30
|
-
column.cell.props.className = cx(
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
30
|
+
column.cell.props.className = cx(
|
|
31
|
+
column.cell.props.className,
|
|
32
|
+
`editable${column.customEditor ? " customEditor" : ""}`
|
|
33
|
+
);
|
|
34
|
+
return appendCellFormatter(
|
|
35
|
+
[
|
|
36
|
+
(value, extraParams) => /* @__PURE__ */ jsx(Fragment, {
|
|
37
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
38
|
+
onClick: (e) => {
|
|
39
|
+
e.stopPropagation();
|
|
40
|
+
grid.getInstance().actions.activateEdit(extraParams);
|
|
41
|
+
},
|
|
42
|
+
onKeyUp: (e) => {
|
|
43
|
+
e.stopPropagation();
|
|
44
|
+
if (e.keyCode === 33) {
|
|
45
|
+
grid.getInstance().actions.activateEdit(extraParams);
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
role: "gridcell",
|
|
49
|
+
tabIndex: 0,
|
|
50
|
+
children: [
|
|
51
|
+
value,
|
|
52
|
+
/* @__PURE__ */ jsx(EditPencil, {
|
|
53
|
+
className: "edit-pencil"
|
|
54
|
+
}),
|
|
55
|
+
/* @__PURE__ */ jsx("span", {
|
|
56
|
+
className: "edit-separator",
|
|
57
|
+
children: " "
|
|
58
|
+
})
|
|
59
|
+
]
|
|
60
|
+
})
|
|
61
|
+
})
|
|
62
|
+
],
|
|
63
|
+
column
|
|
64
|
+
);
|
|
51
65
|
};
|
|
52
66
|
export {
|
|
53
67
|
addEditableToCell,
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/editable/decorateEditable.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport * as edit from 'react-edit';\nimport { EditPencil } from '@elliemae/ds-icons';\nimport { cx } from '@elliemae/ds-utilities';\nimport { appendCellFormatter } from '@elliemae/ds-shared';\nimport { getEditorComponent } from './getEditorComponent';\n\nconst makeEditableConfig = (grid) =>\n edit.edit({\n isEditing: ({ columnIndex, rowData, column = {}, ...rest }) => {\n const {\n state: { editingRows },\n props: { rowKey },\n } = grid.getInstance();\n let isCustomEditing;\n\n if (typeof column.isEditing === 'function') {\n isCustomEditing = column.isEditing({\n columnIndex,\n rowData,\n column,\n ...rest,\n });\n }\n return editingRows[rowData[rowKey]] === columnIndex || column.alwaysEditing || isCustomEditing;\n },\n onActivate: () => null,\n onValue: (...args) => grid.getInstance().actions.editValue(...args),\n });\nconst addEditableToCell = ({ column, config, handlers }, grid) => {\n column.cell.transforms.push(config(getEditorComponent(column.customEditor, handlers)));\n column.cell.props.className = cx(\n column.cell.props.className,\n `editable${column.customEditor ? ' customEditor' : ''}`,\n );\n return appendCellFormatter(\n [\n (value, extraParams) => (\n <>\n <div\n onClick={(e) => {\n e.stopPropagation();\n grid.getInstance().actions.activateEdit(extraParams);\n }}\n onKeyUp={(e) => {\n e.stopPropagation();\n if (e.keyCode === 33) {\n grid.getInstance().actions.activateEdit(extraParams);\n }\n }}\n role=\"gridcell\"\n tabIndex={0}\n >\n {value}\n <EditPencil className=\"edit-pencil\" />\n <span className=\"edit-separator\"> </span>\n </div>\n </>\n ),\n ],\n column,\n );\n};\n\nexport { makeEditableConfig, addEditableToCell };\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AACA,YAAY,UAAU;AACtB,SAAS,kBAAkB;AAC3B,SAAS,UAAU;AACnB,SAAS,2BAA2B;AACpC,SAAS,0BAA0B;AAEnC,MAAM,qBAAqB,CAAC,SAC1B,KAAK,KAAK;AAAA,EACR,WAAW,CAAC,EAAE,aAAa,SAAS,SAAS,CAAC,MAAM,KAAK,MAAM;AAC7D,UAAM;AAAA,MACJ,OAAO,EAAE,YAAY;AAAA,MACrB,OAAO,EAAE,OAAO;AAAA,IAClB,IAAI,KAAK,YAAY;AACrB,QAAI;AAEJ,QAAI,OAAO,OAAO,cAAc,YAAY;AAC1C,wBAAkB,OAAO,UAAU;AAAA,QACjC;AAAA,QACA;AAAA,QACA;AAAA,QACA,GAAG;AAAA,MACL,CAAC;AAAA,IACH;AACA,WAAO,YAAY,QAAQ,aAAa,eAAe,OAAO,iBAAiB;AAAA,EACjF;AAAA,EACA,YAAY,MAAM;AAAA,EAClB,SAAS,IAAI,SAAS,KAAK,YAAY,EAAE,QAAQ,UAAU,GAAG,IAAI;AACpE,CAAC;AACH,MAAM,oBAAoB,CAAC,EAAE,QAAQ,QAAQ,SAAS,GAAG,SAAS;AAChE,SAAO,KAAK,WAAW,KAAK,OAAO,mBAAmB,OAAO,cAAc,QAAQ,CAAC,CAAC;AACrF,SAAO,KAAK,MAAM,YAAY;AAAA,IAC5B,OAAO,KAAK,MAAM;AAAA,IAClB,WAAW,OAAO,eAAe,kBAAkB;AAAA,EACrD;AACA,SAAO;AAAA,IACL;AAAA,MACE,CAAC,OAAO,gBACN;AAAA,QACE,+BAAC;AAAA,UACC,SAAS,CAAC,MAAM;AACd,cAAE,gBAAgB;AAClB,iBAAK,YAAY,EAAE,QAAQ,aAAa,WAAW;AAAA,UACrD;AAAA,UACA,SAAS,CAAC,MAAM;AACd,cAAE,gBAAgB;AAClB,gBAAI,EAAE,YAAY,IAAI;AACpB,mBAAK,YAAY,EAAE,QAAQ,aAAa,WAAW;AAAA,YACrD;AAAA,UACF;AAAA,UACA,MAAK;AAAA,UACL,UAAU;AAAA,UAET;AAAA;AAAA,YACD,oBAAC;AAAA,cAAW,WAAU;AAAA,aAAc;AAAA,YACpC,oBAAC;AAAA,cAAK,WAAU;AAAA,cAAiB;AAAA,aAAC;AAAA;AAAA,SACpC;AAAA,OACF;AAAA,IAEJ;AAAA,IACA;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { ComboBox, TextBox } from "./EditableComponents";
|
|
4
4
|
const components = {
|
|
5
5
|
DSComboBox: ComboBox,
|
|
@@ -22,17 +22,18 @@ const getEditorComponent = (editorComponent = {}, handlers) => ({
|
|
|
22
22
|
const Component = components[type];
|
|
23
23
|
if (type === "DSComboBox") {
|
|
24
24
|
const maxOptions = restEditorProps?.options?.length || 100;
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
-
style: { zIndex: 0 }
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
25
|
+
return /* @__PURE__ */ jsx("div", {
|
|
26
|
+
style: { zIndex: 0 },
|
|
27
|
+
children: /* @__PURE__ */ jsx(Component, {
|
|
28
|
+
autoFocus: true,
|
|
29
|
+
onValue,
|
|
30
|
+
value,
|
|
31
|
+
maxOptions,
|
|
32
|
+
...restEditorProps
|
|
33
|
+
})
|
|
34
|
+
});
|
|
34
35
|
}
|
|
35
|
-
return /* @__PURE__ */
|
|
36
|
+
return /* @__PURE__ */ jsx(Component, {
|
|
36
37
|
autoFocus: true,
|
|
37
38
|
onValue,
|
|
38
39
|
value,
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/editable/getEditorComponent.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/display-name */\nimport React from 'react';\nimport { ComboBox, TextBox } from './EditableComponents';\n\nconst components = {\n DSComboBox: ComboBox,\n DSTextBox: TextBox,\n};\n\nconst getEditorComponent = (editorComponent = {}, handlers) => ({\n value,\n onValue,\n extraParameters,\n}) => {\n if (typeof editorComponent === 'function') {\n return editorComponent({\n value,\n onValue,\n customHandlers: handlers,\n ...extraParameters,\n });\n }\n\n const { type = 'DSTextBox', ...restEditorProps } = editorComponent;\n const Component = components[type];\n\n if (type === 'DSComboBox') {\n // TODO: remove this whole condition when combobox v3 is out and fully working without \"maxOptions\" parameter\n const maxOptions = restEditorProps?.options?.length || 100;\n return (\n <div style={{ zIndex: 0 }}>\n <Component\n autoFocus\n onValue={onValue}\n value={value}\n maxOptions={maxOptions}\n {...restEditorProps}\n />\n </div>\n );\n }\n\n return (\n <Component autoFocus onValue={onValue} value={value} {...restEditorProps} />\n );\n};\n\nexport { getEditorComponent };\nexport default getEditorComponent;\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAEA,SAAS,UAAU,eAAe;AAElC,MAAM,aAAa;AAAA,EACjB,YAAY;AAAA,EACZ,WAAW;AACb;AAEA,MAAM,qBAAqB,CAAC,kBAAkB,CAAC,GAAG,aAAa,CAAC;AAAA,EAC9D;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,MAAI,OAAO,oBAAoB,YAAY;AACzC,WAAO,gBAAgB;AAAA,MACrB;AAAA,MACA;AAAA,MACA,gBAAgB;AAAA,MAChB,GAAG;AAAA,IACL,CAAC;AAAA,EACH;AAEA,QAAM,EAAE,OAAO,gBAAgB,gBAAgB,IAAI;AACnD,QAAM,YAAY,WAAW;AAE7B,MAAI,SAAS,cAAc;AAEzB,UAAM,aAAa,iBAAiB,SAAS,UAAU;AACvD,WACE,oBAAC;AAAA,MAAI,OAAO,EAAE,QAAQ,EAAE;AAAA,MACtB,8BAAC;AAAA,QACC,WAAS;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACC,GAAG;AAAA,OACN;AAAA,KACF;AAAA,EAEJ;AAEA,SACE,oBAAC;AAAA,IAAU,WAAS;AAAA,IAAC;AAAA,IAAkB;AAAA,IAAe,GAAG;AAAA,GAAiB;AAE9E;AAGA,IAAO,6BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/editable/index.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { EditablePlugin } from './EditablePlugin';\nexport { ComboBox, TextBox } from './EditableComponents';\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,sBAAsB;AAC/B,SAAS,UAAU,eAAe;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useRef } from "react";
|
|
3
4
|
import { ArrowheadDown, ArrowheadRight } from "@elliemae/ds-icons";
|
|
4
5
|
import { aggregatedClasses } from "@elliemae/ds-classnames";
|
|
5
6
|
import { DSButton } from "@elliemae/ds-button";
|
|
@@ -16,27 +17,49 @@ const ExpandableMasterWrapper = aggregatedClasses("div")(`${blockName}-master-wr
|
|
|
16
17
|
const ExpandableDetailsWrapper = aggregatedClasses("div")(`${blockName}-details-wrapper`);
|
|
17
18
|
function ExpandableColumnCell({ label, description, isExpanded, expandableDetails, extraData, onToggleExpand }) {
|
|
18
19
|
const ref = useRef();
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
+
return /* @__PURE__ */ jsxs(ExpandableColumnWrapper, {
|
|
20
21
|
ref,
|
|
21
|
-
tabindex: 0
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
22
|
+
tabindex: 0,
|
|
23
|
+
children: [
|
|
24
|
+
/* @__PURE__ */ jsxs(ExpandableMasterWrapper, {
|
|
25
|
+
style: { height: RowSizes.extend },
|
|
26
|
+
children: [
|
|
27
|
+
/* @__PURE__ */ jsx(DSButton, {
|
|
28
|
+
buttonType: "text",
|
|
29
|
+
className: "expandable-arrow",
|
|
30
|
+
icon: isExpanded ? /* @__PURE__ */ jsx(ArrowheadDown, {}) : /* @__PURE__ */ jsx(ArrowheadRight, {}),
|
|
31
|
+
onClick: (e) => {
|
|
32
|
+
onToggleExpand(e);
|
|
33
|
+
if (ref && ref.current) {
|
|
34
|
+
ref.current.focus();
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
size: "s"
|
|
38
|
+
}),
|
|
39
|
+
/* @__PURE__ */ jsxs(LabelDescriptionWrapper, {
|
|
40
|
+
children: [
|
|
41
|
+
/* @__PURE__ */ jsx(Label, {
|
|
42
|
+
children: /* @__PURE__ */ jsx(DSTruncatedTooltipText, {
|
|
43
|
+
value: label
|
|
44
|
+
})
|
|
45
|
+
}),
|
|
46
|
+
/* @__PURE__ */ jsx(Description, {
|
|
47
|
+
children: /* @__PURE__ */ jsx(DSTruncatedTooltipText, {
|
|
48
|
+
value: description
|
|
49
|
+
})
|
|
50
|
+
})
|
|
51
|
+
]
|
|
52
|
+
}),
|
|
53
|
+
/* @__PURE__ */ jsx(ExtraColumnData, {
|
|
54
|
+
children: extraData
|
|
55
|
+
})
|
|
56
|
+
]
|
|
57
|
+
}),
|
|
58
|
+
isExpanded && /* @__PURE__ */ jsx(ExpandableDetailsWrapper, {
|
|
59
|
+
children: expandableDetails
|
|
60
|
+
})
|
|
61
|
+
]
|
|
62
|
+
});
|
|
40
63
|
}
|
|
41
64
|
const expandableColumnRenderer = ({ renderRowLabel, renderRowDescription, renderExtraData }) => (value, { rowData, isExpanded }, grid) => {
|
|
42
65
|
const {
|
|
@@ -44,7 +67,7 @@ const expandableColumnRenderer = ({ renderRowLabel, renderRowDescription, render
|
|
|
44
67
|
actions: { toggleExpand }
|
|
45
68
|
} = grid.getInstance();
|
|
46
69
|
const expandableDetails = renderExpandedDetails({ rowData });
|
|
47
|
-
return /* @__PURE__ */
|
|
70
|
+
return /* @__PURE__ */ jsx(ExpandableColumnCell, {
|
|
48
71
|
description: renderRowDescription({ rowData }),
|
|
49
72
|
expandableDetails,
|
|
50
73
|
extraData: renderExtraData({ rowData }),
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/expandable-grid/ExpandableColumn.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/display-name */\nimport React, { useRef } from 'react';\nimport { ArrowheadDown, ArrowheadRight } from '@elliemae/ds-icons';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { DSButton } from '@elliemae/ds-button';\nimport { DSTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { dataGridBlockName } from '../../blockNames';\nimport { RowSizes } from '../../rowSizes';\n\nconst blockName = `${dataGridBlockName}-expandable-column`;\n\n// todo: clean this when we move to css-js\nconst ExpandableColumnWrapper = aggregatedClasses('div')(blockName);\nconst LabelDescriptionWrapper = aggregatedClasses('div')(blockName, 'label-description-wrapper');\nconst Label = aggregatedClasses('span')(blockName, 'label');\nconst Description = aggregatedClasses('span')(blockName, 'description');\nconst ExtraColumnData = aggregatedClasses('div')(blockName, 'extra-column-data');\nconst ExpandableMasterWrapper = aggregatedClasses('div')(`${blockName}-master-wrapper`);\nconst ExpandableDetailsWrapper = aggregatedClasses('div')(`${blockName}-details-wrapper`);\n\nfunction ExpandableColumnCell({ label, description, isExpanded, expandableDetails, extraData, onToggleExpand }) {\n const ref = useRef();\n return (\n <ExpandableColumnWrapper ref={ref} tabindex={0}>\n <ExpandableMasterWrapper style={{ height: RowSizes.extend }}>\n <DSButton\n buttonType=\"text\"\n className=\"expandable-arrow\"\n icon={isExpanded ? <ArrowheadDown /> : <ArrowheadRight />}\n onClick={(e) => {\n onToggleExpand(e);\n if (ref && ref.current) {\n ref.current.focus();\n }\n }}\n size=\"s\"\n />\n <LabelDescriptionWrapper>\n <Label>\n <DSTruncatedTooltipText value={label} />\n </Label>\n <Description>\n <DSTruncatedTooltipText value={description} />\n </Description>\n </LabelDescriptionWrapper>\n <ExtraColumnData>{extraData}</ExtraColumnData>\n </ExpandableMasterWrapper>\n {isExpanded && <ExpandableDetailsWrapper>{expandableDetails}</ExpandableDetailsWrapper>}\n </ExpandableColumnWrapper>\n );\n}\n\nconst expandableColumnRenderer =\n ({ renderRowLabel, renderRowDescription, renderExtraData }) =>\n (value, { rowData, isExpanded }, grid) => {\n const {\n props: { renderExpandedDetails },\n actions: { toggleExpand },\n } = grid.getInstance();\n\n const expandableDetails = renderExpandedDetails({ rowData });\n return (\n <ExpandableColumnCell\n description={renderRowDescription({ rowData })}\n expandableDetails={expandableDetails}\n extraData={renderExtraData({ rowData })}\n isExpanded={isExpanded}\n label={renderRowLabel({ rowData })}\n onToggleExpand={() => toggleExpand(rowData)}\n />\n );\n };\nconst noop = () => null;\nexport const ExpandableColumn = ({\n property,\n label,\n renderRowLabel = () => '----',\n renderRowDescription = noop,\n renderExtraData = noop,\n width,\n resizable,\n sortable,\n searchable,\n customRenderer,\n ...rest\n}) => {\n return {\n ...rest,\n label,\n property,\n cell: {\n formatters: [\n expandableColumnRenderer({\n renderRowLabel,\n renderRowDescription,\n renderExtraData,\n }),\n ],\n },\n width: width || '50%',\n expandableColumn: true,\n resizable,\n sortable,\n searchable,\n };\n};\n\nexport default ExpandableColumn;\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AACA,SAAgB,cAAc;AAC9B,SAAS,eAAe,sBAAsB;AAC9C,SAAS,yBAAyB;AAClC,SAAS,gBAAgB;AACzB,SAAS,8BAA8B;AACvC,SAAS,yBAAyB;AAClC,SAAS,gBAAgB;AAEzB,MAAM,YAAY,GAAG;AAGrB,MAAM,0BAA0B,kBAAkB,KAAK,EAAE,SAAS;AAClE,MAAM,0BAA0B,kBAAkB,KAAK,EAAE,WAAW,2BAA2B;AAC/F,MAAM,QAAQ,kBAAkB,MAAM,EAAE,WAAW,OAAO;AAC1D,MAAM,cAAc,kBAAkB,MAAM,EAAE,WAAW,aAAa;AACtE,MAAM,kBAAkB,kBAAkB,KAAK,EAAE,WAAW,mBAAmB;AAC/E,MAAM,0BAA0B,kBAAkB,KAAK,EAAE,GAAG,0BAA0B;AACtF,MAAM,2BAA2B,kBAAkB,KAAK,EAAE,GAAG,2BAA2B;AAExF,SAAS,qBAAqB,EAAE,OAAO,aAAa,YAAY,mBAAmB,WAAW,eAAe,GAAG;AAC9G,QAAM,MAAM,OAAO;AACnB,SACE,qBAAC;AAAA,IAAwB;AAAA,IAAU,UAAU;AAAA,IAC3C;AAAA,2BAAC;AAAA,QAAwB,OAAO,EAAE,QAAQ,SAAS,OAAO;AAAA,QACxD;AAAA,8BAAC;AAAA,YACC,YAAW;AAAA,YACX,WAAU;AAAA,YACV,MAAM,aAAa,oBAAC,iBAAc,IAAK,oBAAC,kBAAe;AAAA,YACvD,SAAS,CAAC,MAAM;AACd,6BAAe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ACA,MAAM;AAAA,MACJ,YAAY;AAAA,QACV,yBAAyB;AAAA,UACvB;AAAA,UACA;AAAA,UACA;AAAA,QACF,CAAC;AAAA,MACH;AAAA,IACF;AAAA,IACA,OAAO,SAAS;AAAA,IAChB,kBAAkB;AAAA,IAClB;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEA,IAAO,2BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useMemo, useRef } from "react";
|
|
3
4
|
import { cx, isFunction } from "@elliemae/ds-utilities";
|
|
4
5
|
import { VariableSizeList } from "react-window";
|
|
5
6
|
import { ArrowheadDown, ArrowheadRight } from "@elliemae/ds-icons";
|
|
@@ -20,10 +21,13 @@ const ExpandablePlugin = createInstancePlugin("expandable", {
|
|
|
20
21
|
registerStateHook: useExpandGridState,
|
|
21
22
|
decorateGrid(grid) {
|
|
22
23
|
const { decoratedColumns, columns } = grid.getInstance();
|
|
23
|
-
const detailColumns = useMemo(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
const detailColumns = useMemo(
|
|
25
|
+
() => decoratedColumns.map((column) => ({
|
|
26
|
+
...column,
|
|
27
|
+
customRenderer: column.detailCustomRenderer
|
|
28
|
+
})).filter((col) => !col.expandableColumn),
|
|
29
|
+
[columns]
|
|
30
|
+
);
|
|
27
31
|
return {
|
|
28
32
|
detailColumns
|
|
29
33
|
};
|
|
@@ -40,16 +44,21 @@ const ExpandablePlugin = createInstancePlugin("expandable", {
|
|
|
40
44
|
const {
|
|
41
45
|
actions: { toggleExpand }
|
|
42
46
|
} = grid.getInstance();
|
|
43
|
-
return /* @__PURE__ */
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
47
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ jsx(DSButton, {
|
|
50
|
+
buttonType: "text",
|
|
51
|
+
className: "expandable-arrow",
|
|
52
|
+
icon: isExpanded ? /* @__PURE__ */ jsx(ArrowheadDown, {}) : /* @__PURE__ */ jsx(ArrowheadRight, {}),
|
|
53
|
+
onClick: (e) => {
|
|
54
|
+
e.stopPropagation();
|
|
55
|
+
toggleExpand(rowData);
|
|
56
|
+
},
|
|
57
|
+
size: "s"
|
|
58
|
+
}),
|
|
59
|
+
value
|
|
60
|
+
]
|
|
61
|
+
});
|
|
53
62
|
}, firstColumn),
|
|
54
63
|
...columns.slice(firstColumnIndex + 1)
|
|
55
64
|
];
|
|
@@ -108,7 +117,7 @@ const ExpandablePlugin = createInstancePlugin("expandable", {
|
|
|
108
117
|
composedRows
|
|
109
118
|
} = grid.getInstance();
|
|
110
119
|
const rowData = composedRows[rowProps.index] ? composedRows[rowProps.index] : rowProps.rowData;
|
|
111
|
-
return /* @__PURE__ */
|
|
120
|
+
return /* @__PURE__ */ jsx(ExpandedRowComponent, {
|
|
112
121
|
cellComponent: Cell,
|
|
113
122
|
detailColumns,
|
|
114
123
|
parentGrid: grid,
|
|
@@ -120,10 +129,11 @@ const ExpandablePlugin = createInstancePlugin("expandable", {
|
|
|
120
129
|
isExpanded,
|
|
121
130
|
...rowProps
|
|
122
131
|
},
|
|
123
|
-
rows: getChildrenRows({ rowData })
|
|
124
|
-
|
|
132
|
+
rows: getChildrenRows({ rowData }),
|
|
133
|
+
children: rowProps.children
|
|
134
|
+
});
|
|
125
135
|
}
|
|
126
|
-
return /* @__PURE__ */
|
|
136
|
+
return /* @__PURE__ */ jsx(Row, {
|
|
127
137
|
...rowProps
|
|
128
138
|
});
|
|
129
139
|
};
|
|
@@ -139,7 +149,11 @@ const ExpandablePlugin = createInstancePlugin("expandable", {
|
|
|
139
149
|
const isExpanded = !!expandedRows[key];
|
|
140
150
|
return {
|
|
141
151
|
...rowProps,
|
|
142
|
-
className: cx(
|
|
152
|
+
className: cx(
|
|
153
|
+
rowProps.className,
|
|
154
|
+
Object.keys(expandedRows).length > 0 && "expandable-row",
|
|
155
|
+
isExpanded && "expanded"
|
|
156
|
+
),
|
|
143
157
|
isExpanded,
|
|
144
158
|
showAllRows: expandedRows[key] && expandedRows[key].showAllRows
|
|
145
159
|
};
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/expandable-grid/ExpandablePlugin.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React, { useEffect, useMemo, useRef } from 'react';\nimport { cx, isFunction } from '@elliemae/ds-utilities';\nimport { VariableSizeList } from 'react-window';\nimport { ArrowheadDown, ArrowheadRight } from '@elliemae/ds-icons';\nimport { DSButton } from '@elliemae/ds-button';\nimport { createInstancePlugin, appendCellFormatter } from '@elliemae/ds-shared';\nimport { ExpandedRow } from './ExpandedRow';\nimport { ExpandedRowExtra } from './ExpandedRowExtra';\nimport { RowSizes } from '../../rowSizes';\nimport { useExpandGridState } from './useExpandGridState';\n\nconst getExpandedRowSizeBySubrows = ({ totalAmount, amountVisible, isShowingAll, size = 36 }) =>\n isShowingAll ? size * (totalAmount + 1) - 6 : size * (amountVisible + 1) + 32;\n\nconst ExpandedRows = {\n SingleColumn: ExpandedRow,\n Master: ExpandedRowExtra,\n};\n\nconst createExpandedRow = (type) => ExpandedRows[type] || ExpandedRows.Master;\n\nconst isExpandableSingleColumn = (columns) => columns.some((column) => column.expandableColumn);\n\nexport const ExpandablePlugin = createInstancePlugin('expandable', {\n registerStateHook: useExpandGridState,\n decorateGrid(grid) {\n const { decoratedColumns, columns } = grid.getInstance();\n const detailColumns = useMemo(\n () =>\n decoratedColumns\n .map((column) => ({\n ...column,\n customRenderer: column.detailCustomRenderer,\n }))\n .filter((col) => !col.expandableColumn),\n [columns],\n );\n return {\n detailColumns,\n };\n },\n\n decorateColumns(columns, grid) {\n if (isExpandableSingleColumn(columns)) return columns;\n // get first column from user\n const firstColumnIndex = columns.findIndex((column) => column.isUserColumn);\n const firstColumn = columns[firstColumnIndex];\n firstColumn.formatExpandable = true;\n\n return [\n ...columns.slice(0, firstColumnIndex),\n appendCellFormatter((value, { isExpanded, rowData }) => {\n const {\n actions: { toggleExpand },\n } = grid.getInstance();\n /*\n * should return only 2 elements ../custom-cell-renderer/addCustomRendererToCell.js\n * getRenderer it's checking that length to apply the custom render to value only\n */\n return (\n <>\n <DSButton\n buttonType=\"text\"\n className=\"expandable-arrow\"\n icon={isExpanded ? <ArrowheadDown /> : <ArrowheadRight />}\n onClick={(e) => {\n e.stopPropagation();\n toggleExpand(rowData);\n }}\n size=\"s\"\n />\n {value}\n </>\n );\n }, firstColumn),\n ...columns.slice(firstColumnIndex + 1),\n ];\n },\n\n getBodyProps(bodyProps, grid) {\n const {\n composedRows: rows,\n props: {\n rowKey,\n getChildrenRows,\n rowSize = 'normal',\n subrowSize = 'normal',\n getExpandedRowMinSize,\n getExpandedRowSize,\n expandableSubrowsVisible,\n },\n state: { expandedRows },\n } = grid.getInstance();\n const rowSizePx = RowSizes[rowSize];\n const subrowSizePx = RowSizes[subrowSize];\n const listRef = useRef();\n\n useEffect(() => {\n if (listRef.current) listRef.current.resetAfterIndex(0, true);\n });\n\n // implementation of expandable row single column with aggregation\n const getItemSize = (index) => {\n const rowData = rows[index];\n const key = rowData[rowKey];\n const children = getChildrenRows({ rowData });\n\n const expandedSize = getExpandedRowSize\n ? getExpandedRowSize(index, { rowData }) // https://jira.elliemae.io/browse/PUI-1659\n : getExpandedRowSizeBySubrows({\n totalAmount: children.length,\n amountVisible: children.length > expandableSubrowsVisible ? expandableSubrowsVisible : children.length,\n isShowingAll:\n children.length < expandableSubrowsVisible || (expandedRows[key] && expandedRows[key].showAllRows),\n size: subrowSizePx,\n });\n\n const expandedMinSize = isFunction(getExpandedRowMinSize) && getExpandedRowMinSize(index);\n\n // eslint-disable-next-line no-nested-ternary\n return expandedRows[key] ? (expandedMinSize > expandedSize ? expandedMinSize : expandedSize) : rowSizePx;\n };\n\n return {\n ...bodyProps,\n className: cx(bodyProps.className, 'expandable'),\n listComponent: VariableSizeList,\n listProps: { ref: listRef, itemSize: getItemSize },\n };\n },\n\n decorateRenderers(renderers, grid) {\n const Row = renderers.body.row;\n const Cell = renderers.body.cell;\n\n // eslint-disable-next-line react/display-name\n renderers.body.row = useMemo(() => {\n // todo: the expandable grid should be created from another specific grid component\n const expandedRowType = isExpandableSingleColumn(grid.decoratedColumns) ? 'SingleColumn' : 'Master';\n const ExpandedRowComponent = createExpandedRow(expandedRowType);\n // eslint-disable-next-line react/display-name\n return ({ isExpanded, ...rowProps }) => {\n if (isExpanded) {\n const {\n props: { detailColumns, getChildrenRows, renderRowDetails },\n composedRows,\n } = grid.getInstance();\n // https://jira.elliemae.io/browse/PUI-1667\n const rowData = composedRows[rowProps.index] ? composedRows[rowProps.index] : rowProps.rowData;\n return (\n <ExpandedRowComponent\n cellComponent={Cell}\n detailColumns={detailColumns}\n parentGrid={grid}\n renderRowDetails={renderRowDetails}\n rowComponent={Row}\n rowData={rowData}\n rowProps={{\n rowData,\n isExpanded,\n ...rowProps,\n }}\n rows={getChildrenRows({ rowData })}\n >\n {rowProps.children}\n </ExpandedRowComponent>\n );\n }\n return <Row {...rowProps} />;\n };\n }, []);\n\n return renderers;\n },\n\n getRowProps(rowProps, grid, { rowData }) {\n const {\n props: { rowKey },\n state: { expandedRows },\n } = grid.getInstance();\n const key = rowData[rowKey];\n const isExpanded = !!expandedRows[key];\n return {\n ...rowProps,\n className: cx(\n rowProps.className,\n Object.keys(expandedRows).length > 0 && 'expandable-row',\n isExpanded && 'expanded',\n ),\n isExpanded,\n showAllRows: expandedRows[key] && expandedRows[key].showAllRows,\n };\n },\n});\n"],
|
|
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OAAO;AAAA,MAChB,OAAO,EAAE,aAAa;AAAA,IACxB,IAAI,KAAK,YAAY;AACrB,UAAM,MAAM,QAAQ;AACpB,UAAM,aAAa,CAAC,CAAC,aAAa;AAClC,WAAO;AAAA,MACL,GAAG;AAAA,MACH,WAAW;AAAA,QACT,SAAS;AAAA,QACT,OAAO,KAAK,YAAY,EAAE,SAAS,KAAK;AAAA,QACxC,cAAc;AAAA,MAChB;AAAA,MACA;AAAA,MACA,aAAa,aAAa,QAAQ,aAAa,KAAK;AAAA,IACtD;AAAA,EACF;AACF,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { DSSeparator } from "@elliemae/ds-separator";
|
|
4
4
|
import { DSButton } from "@elliemae/ds-button";
|
|
5
5
|
import { styled } from "@elliemae/ds-system";
|
|
@@ -29,9 +29,10 @@ const DetailGrid = deferComponentRender(({ parentGrid, parentRowData, rows }) =>
|
|
|
29
29
|
},
|
|
30
30
|
parentRowData
|
|
31
31
|
});
|
|
32
|
-
return /* @__PURE__ */
|
|
33
|
-
...grid
|
|
34
|
-
|
|
32
|
+
return /* @__PURE__ */ jsx(Table, {
|
|
33
|
+
...grid,
|
|
34
|
+
children: /* @__PURE__ */ jsx(TableBody, {})
|
|
35
|
+
});
|
|
35
36
|
}, null);
|
|
36
37
|
const DetailsWrapper = styled.span`
|
|
37
38
|
flex: 1;
|
|
@@ -65,36 +66,48 @@ const ExpandedRow = ({
|
|
|
65
66
|
columnSizeService: { expandableGridDetailWidth }
|
|
66
67
|
} = parentGrid.getInstance();
|
|
67
68
|
const { showAllRows, ...restRowProps } = rowProps;
|
|
68
|
-
return /* @__PURE__ */
|
|
69
|
-
...restRowProps
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
69
|
+
return /* @__PURE__ */ jsxs(RowComponent, {
|
|
70
|
+
...restRowProps,
|
|
71
|
+
children: [
|
|
72
|
+
/* @__PURE__ */ jsx(BodyCell, {
|
|
73
|
+
column: decoratedColumns[0],
|
|
74
|
+
columnIndex: 0,
|
|
75
|
+
component: CellComponent,
|
|
76
|
+
grid: parentGrid,
|
|
77
|
+
rowProps: { rowData, ...rowProps }
|
|
78
|
+
}),
|
|
79
|
+
/* @__PURE__ */ jsxs(DetailsWrapper, {
|
|
80
|
+
width: expandableGridDetailWidth,
|
|
81
|
+
children: [
|
|
82
|
+
/* @__PURE__ */ jsxs(DetailGridWrapper, {
|
|
83
|
+
allRowsVisible: rows.length < expandableSubrowsVisible || get(expandedRows, [rowKey, "showAllRows"]),
|
|
84
|
+
expandableGridDetailWidth,
|
|
85
|
+
children: [
|
|
86
|
+
/* @__PURE__ */ jsx(DSSeparator, {
|
|
87
|
+
dashed: true,
|
|
88
|
+
orientation: "vertical"
|
|
89
|
+
}),
|
|
90
|
+
/* @__PURE__ */ jsx(DetailGrid, {
|
|
91
|
+
detailColumns,
|
|
92
|
+
parentGrid: parentGrid.getInstance(),
|
|
93
|
+
parentRowData: rowData,
|
|
94
|
+
rows: showAllRows ? rows : (rows || []).slice(0, expandableSubrowsVisible)
|
|
95
|
+
})
|
|
96
|
+
]
|
|
97
|
+
}),
|
|
98
|
+
rows.length > expandableSubrowsVisible && /* @__PURE__ */ jsx(DSButton, {
|
|
99
|
+
buttonType: "text",
|
|
100
|
+
labelText: showAllRows ? showLessRowsText : showMoreRowsText,
|
|
101
|
+
onClick: (e) => {
|
|
102
|
+
e.stopPropagation();
|
|
103
|
+
toggleShowAllRows(rowData);
|
|
104
|
+
},
|
|
105
|
+
style: { marginBottom: "10px" }
|
|
106
|
+
})
|
|
107
|
+
]
|
|
108
|
+
})
|
|
109
|
+
]
|
|
110
|
+
});
|
|
98
111
|
};
|
|
99
112
|
var ExpandedRow_default = ExpandedRow;
|
|
100
113
|
export {
|