@elliemae/ds-datagrids 1.56.0 → 1.57.0-rc.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/DSDataGrid.js +12 -29
- package/cjs/DSDataGrid.js.map +1 -1
- package/cjs/DataGridImpl.js +12 -29
- package/cjs/DataGridImpl.js.map +1 -1
- package/cjs/PaginatedDataGrid.js +12 -26
- package/cjs/PaginatedDataGrid.js.map +1 -1
- package/cjs/columns/IconColumn.js +3 -3
- package/cjs/columns/IconColumn.js.map +1 -1
- package/cjs/components/BodyCell.js +1 -1
- package/cjs/components/BodyCell.js.map +1 -1
- package/cjs/components/EmptyState.js +4 -5
- package/cjs/components/EmptyState.js.map +1 -1
- package/cjs/components/HeaderCell.js +1 -1
- package/cjs/components/HeaderCell.js.map +1 -1
- package/cjs/components/RowsLoader.js +1 -1
- package/cjs/components/RowsLoader.js.map +1 -1
- package/cjs/components/Table.js +1 -1
- package/cjs/components/footer/addOptionalFooterComponents.js +2 -2
- package/cjs/components/header/PrimaryControls.js +2 -3
- package/cjs/components/header/PrimaryControls.js.map +1 -1
- package/cjs/components/index.js +1 -1
- package/cjs/components/renderers/index.js +2 -2
- package/cjs/components/renderers/renderRowsLoader.js +1 -1
- package/cjs/defaultPlugins.js +5 -11
- package/cjs/defaultPlugins.js.map +1 -1
- package/cjs/{index-9d448b9a.js → index-0be12eb8.js} +1 -1
- package/cjs/{index-9d448b9a.js.map → index-0be12eb8.js.map} +1 -1
- package/cjs/index.js +12 -29
- package/cjs/index.js.map +1 -1
- package/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +3 -3
- package/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js.map +1 -1
- package/cjs/plugins/body-header-scroll-sync/index.js +1 -1
- package/cjs/plugins/column-dnd/DndColumnsPlugin.js +5 -6
- package/cjs/plugins/column-dnd/DndColumnsPlugin.js.map +1 -1
- package/cjs/plugins/column-dnd/decorateGridWithDndColumns.js +2 -3
- package/cjs/plugins/column-dnd/decorateGridWithDndColumns.js.map +1 -1
- package/cjs/plugins/column-dnd/index.js +2 -3
- package/cjs/plugins/column-dnd/index.js.map +1 -1
- package/cjs/plugins/column-sizing/ColumnSizingPlugin.js +2 -4
- package/cjs/plugins/column-sizing/ColumnSizingPlugin.js.map +1 -1
- package/cjs/plugins/column-sizing/columnMeasurerTransformer.js +2 -2
- package/cjs/plugins/column-sizing/columnMeasurerTransformer.js.map +1 -1
- package/cjs/plugins/column-sizing/ext-points/decorateColumn.js +3 -4
- package/cjs/plugins/column-sizing/ext-points/decorateColumn.js.map +1 -1
- package/cjs/plugins/column-sizing/ext-points/getTableProps.js +3 -6
- package/cjs/plugins/column-sizing/ext-points/getTableProps.js.map +1 -1
- package/cjs/plugins/column-sizing/index.js +1 -3
- package/cjs/plugins/column-sizing/index.js.map +1 -1
- package/cjs/plugins/column-sizing/useColumnSizeService.js +1 -1
- package/cjs/plugins/column-sizing/useStylesheetHelpers.js +3 -3
- package/cjs/plugins/column-sizing/useStylesheetHelpers.js.map +1 -1
- package/cjs/plugins/column-sizing/utils.js +3 -3
- package/cjs/plugins/column-sizing/utils.js.map +1 -1
- package/cjs/plugins/custom-cell-renderer/CustomRendererPlugin.js +5 -9
- package/cjs/plugins/custom-cell-renderer/CustomRendererPlugin.js.map +1 -1
- package/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js +8 -12
- package/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js.map +1 -1
- package/cjs/plugins/custom-cell-renderer/getRendererComponent.js +9 -18
- package/cjs/plugins/custom-cell-renderer/getRendererComponent.js.map +1 -1
- package/cjs/plugins/custom-cell-renderer/index.js +5 -9
- package/cjs/plugins/custom-cell-renderer/index.js.map +1 -1
- package/cjs/plugins/editable/EditableComponents/ComboBox.js +2 -3
- package/cjs/plugins/editable/EditableComponents/ComboBox.js.map +1 -1
- package/cjs/plugins/editable/EditableComponents/TextBox.js +2 -3
- package/cjs/plugins/editable/EditableComponents/TextBox.js.map +1 -1
- package/cjs/plugins/editable/EditableComponents/index.js +1 -2
- package/cjs/plugins/editable/EditableComponents/index.js.map +1 -1
- package/cjs/plugins/editable/EditablePlugin.js +5 -8
- package/cjs/plugins/editable/EditablePlugin.js.map +1 -1
- package/cjs/plugins/editable/decorateEditable.js +5 -7
- package/cjs/plugins/editable/decorateEditable.js.map +1 -1
- package/cjs/plugins/editable/getEditorComponent.js +1 -2
- package/cjs/plugins/editable/getEditorComponent.js.map +1 -1
- package/cjs/plugins/editable/index.js +3 -5
- package/cjs/plugins/editable/index.js.map +1 -1
- package/cjs/plugins/expandable-grid/ExpandableColumn.js +4 -7
- package/cjs/plugins/expandable-grid/ExpandableColumn.js.map +1 -1
- package/cjs/plugins/expandable-grid/ExpandablePlugin.js +11 -18
- package/cjs/plugins/expandable-grid/ExpandablePlugin.js.map +1 -1
- package/cjs/plugins/expandable-grid/ExpandedRow.js +7 -10
- package/cjs/plugins/expandable-grid/ExpandedRow.js.map +1 -1
- package/cjs/plugins/expandable-grid/ExpandedRowExtra.js +3 -3
- package/cjs/plugins/expandable-grid/ExpandedRowExtra.js.map +1 -1
- package/cjs/plugins/expandable-grid/index.js +7 -12
- package/cjs/plugins/expandable-grid/index.js.map +1 -1
- package/cjs/plugins/expandable-grid/useExpandGridState.js +3 -5
- package/cjs/plugins/expandable-grid/useExpandGridState.js.map +1 -1
- package/cjs/plugins/export-data/ExportDataPlugin.js +2 -2
- package/cjs/plugins/export-data/ExportDataPlugin.js.map +1 -1
- package/cjs/plugins/export-data/index.js +1 -1
- package/cjs/plugins/filterable/FilterablePlugin.js +10 -11
- package/cjs/plugins/filterable/FilterablePlugin.js.map +1 -1
- package/cjs/plugins/filterable/addFilterToColumn.js +8 -9
- package/cjs/plugins/filterable/addFilterToColumn.js.map +1 -1
- package/cjs/plugins/filterable/components/FilterableHeader.js +13 -15
- package/cjs/plugins/filterable/components/FilterableHeader.js.map +1 -1
- package/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +9 -8
- package/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js.map +1 -1
- package/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +4 -5
- package/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js.map +1 -1
- package/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +133 -168
- package/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js.map +1 -1
- package/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js +4 -5
- package/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js.map +1 -1
- package/cjs/plugins/filterable/components/filterable-menus/getFilterMenuByType.js +7 -7
- package/cjs/plugins/filterable/filterableFormatter.js +9 -10
- package/cjs/plugins/filterable/filterableFormatter.js.map +1 -1
- package/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js +3 -3
- package/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js.map +1 -1
- package/cjs/plugins/filterable/helper.js +7 -7
- package/cjs/plugins/filterable/helper.js.map +1 -1
- package/cjs/plugins/filterable/index.js +8 -9
- package/cjs/plugins/filterable/index.js.map +1 -1
- package/cjs/plugins/filterable/useFilterableState.js +1 -1
- package/cjs/plugins/index.js +11 -26
- package/cjs/plugins/index.js.map +1 -1
- package/cjs/plugins/infinite-scrolling/InfiniteScrollPlugin.js.map +1 -1
- package/cjs/plugins/pagination/PaginationPlugin.js +2 -3
- package/cjs/plugins/pagination/PaginationPlugin.js.map +1 -1
- package/cjs/plugins/pagination/components/Pagination.js +2 -2
- package/cjs/plugins/pagination/components/PerPageDropdown.js +5 -6
- package/cjs/plugins/pagination/components/PerPageDropdown.js.map +1 -1
- package/cjs/plugins/pagination/index.js +1 -2
- package/cjs/plugins/pagination/index.js.map +1 -1
- package/cjs/plugins/pagination/usePaginationState.js +2 -3
- package/cjs/plugins/pagination/usePaginationState.js.map +1 -1
- package/cjs/plugins/resizable/ResizablePlugin.js +2 -2
- package/cjs/plugins/resizable/ResizablePlugin.js.map +1 -1
- package/cjs/plugins/resizable/index.js +1 -1
- package/cjs/plugins/resizable/utils.js +3 -3
- package/cjs/plugins/resizable/utils.js.map +1 -1
- package/cjs/plugins/row-dnd/DndRowsPlugin.js +4 -5
- package/cjs/plugins/row-dnd/DndRowsPlugin.js.map +1 -1
- package/cjs/plugins/row-dnd/index.js +2 -2
- package/cjs/plugins/selectable/SelectablePlugin.js +3 -5
- package/cjs/plugins/selectable/SelectablePlugin.js.map +1 -1
- package/cjs/plugins/selectable/addSelectableColumn.js +2 -3
- package/cjs/plugins/selectable/addSelectableColumn.js.map +1 -1
- package/cjs/plugins/selectable/helper.js +3 -3
- package/cjs/plugins/selectable/helper.js.map +1 -1
- package/cjs/plugins/selectable/index.js +2 -4
- package/cjs/plugins/selectable/index.js.map +1 -1
- package/cjs/plugins/selectable/selectableFormatter.js +4 -7
- package/cjs/plugins/selectable/selectableFormatter.js.map +1 -1
- package/cjs/plugins/selectable/useSelectableState.js +6 -8
- package/cjs/plugins/selectable/useSelectableState.js.map +1 -1
- package/cjs/plugins/sortable/SortablePlugin.js +5 -7
- package/cjs/plugins/sortable/SortablePlugin.js.map +1 -1
- package/cjs/plugins/sortable/index.js +2 -4
- package/cjs/plugins/sortable/index.js.map +1 -1
- package/cjs/plugins/sortable/sortHeaderFormatter.js +3 -6
- package/cjs/plugins/sortable/sortHeaderFormatter.js.map +1 -1
- package/cjs/plugins/sortable/sorter.js +3 -3
- package/cjs/plugins/sortable/sorter.js.map +1 -1
- package/cjs/plugins/sortable/useSortableState.js +2 -3
- package/cjs/plugins/sortable/useSortableState.js.map +1 -1
- package/cjs/plugins/toolbar/RowRenderer.js +4 -4
- package/cjs/plugins/toolbar/RowRenderer.js.map +1 -1
- package/cjs/plugins/toolbar/ToolbarPlugin.js +3 -3
- package/cjs/plugins/toolbar/ToolbarTrigger.js +3 -4
- package/cjs/plugins/toolbar/ToolbarTrigger.js.map +1 -1
- package/cjs/plugins/toolbar/index.js +3 -3
- package/cjs/plugins/virtualization/AutoHeightList.js +5 -8
- package/cjs/plugins/virtualization/AutoHeightList.js.map +1 -1
- package/cjs/plugins/virtualization/VirtualizationPlugin.js +4 -5
- package/cjs/plugins/virtualization/VirtualizationPlugin.js.map +1 -1
- package/cjs/plugins/virtualization/VirtualizedBody.js +6 -7
- package/cjs/plugins/virtualization/VirtualizedBody.js.map +1 -1
- package/cjs/plugins/virtualization/index.js +1 -2
- package/cjs/plugins/virtualization/index.js.map +1 -1
- package/cjs/renders/CellWithAddons.js +7 -6
- package/cjs/renders/CellWithAddons.js.map +1 -1
- package/cjs/renders/index.js +2 -2
- package/cjs/renders/styled.js +3 -2
- package/cjs/renders/styled.js.map +1 -1
- package/cjs/utilities/getPluginsFromProps.js +12 -26
- package/cjs/utilities/getPluginsFromProps.js.map +1 -1
- package/esm/DSDataGrid.js +12 -29
- package/esm/DSDataGrid.js.map +1 -1
- package/esm/DataGridImpl.js +12 -29
- package/esm/DataGridImpl.js.map +1 -1
- package/esm/PaginatedDataGrid.js +12 -26
- package/esm/PaginatedDataGrid.js.map +1 -1
- package/esm/columns/IconColumn.js +2 -2
- package/esm/columns/IconColumn.js.map +1 -1
- package/esm/components/BodyCell.js +1 -1
- package/esm/components/BodyCell.js.map +1 -1
- package/esm/components/EmptyState.js +3 -3
- package/esm/components/EmptyState.js.map +1 -1
- package/esm/components/HeaderCell.js +1 -1
- package/esm/components/HeaderCell.js.map +1 -1
- package/esm/components/RowsLoader.js +1 -1
- package/esm/components/RowsLoader.js.map +1 -1
- package/esm/components/Table.js +1 -1
- package/esm/components/footer/addOptionalFooterComponents.js +2 -2
- package/esm/components/header/PrimaryControls.js +1 -1
- package/esm/components/header/PrimaryControls.js.map +1 -1
- package/esm/components/index.js +1 -1
- package/esm/components/renderers/index.js +2 -2
- package/esm/components/renderers/renderRowsLoader.js +1 -1
- package/esm/defaultPlugins.js +5 -11
- package/esm/defaultPlugins.js.map +1 -1
- package/esm/{index-203a51cc.js → index-afbbe9c8.js} +1 -1
- package/esm/{index-203a51cc.js.map → index-afbbe9c8.js.map} +1 -1
- package/esm/index.js +12 -29
- package/esm/index.js.map +1 -1
- package/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +1 -1
- package/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js.map +1 -1
- package/esm/plugins/body-header-scroll-sync/index.js +1 -1
- package/esm/plugins/column-dnd/DndColumnsPlugin.js +2 -3
- package/esm/plugins/column-dnd/DndColumnsPlugin.js.map +1 -1
- package/esm/plugins/column-dnd/decorateGridWithDndColumns.js +1 -1
- package/esm/plugins/column-dnd/decorateGridWithDndColumns.js.map +1 -1
- package/esm/plugins/column-dnd/index.js +2 -3
- package/esm/plugins/column-dnd/index.js.map +1 -1
- package/esm/plugins/column-sizing/ColumnSizingPlugin.js +1 -3
- package/esm/plugins/column-sizing/ColumnSizingPlugin.js.map +1 -1
- package/esm/plugins/column-sizing/columnMeasurerTransformer.js +1 -1
- package/esm/plugins/column-sizing/columnMeasurerTransformer.js.map +1 -1
- package/esm/plugins/column-sizing/ext-points/decorateColumn.js +1 -2
- package/esm/plugins/column-sizing/ext-points/decorateColumn.js.map +1 -1
- package/esm/plugins/column-sizing/ext-points/getTableProps.js +1 -3
- package/esm/plugins/column-sizing/ext-points/getTableProps.js.map +1 -1
- package/esm/plugins/column-sizing/index.js +1 -3
- package/esm/plugins/column-sizing/index.js.map +1 -1
- package/esm/plugins/column-sizing/useColumnSizeService.js +1 -1
- package/esm/plugins/column-sizing/useStylesheetHelpers.js +1 -1
- package/esm/plugins/column-sizing/useStylesheetHelpers.js.map +1 -1
- package/esm/plugins/column-sizing/utils.js +1 -1
- package/esm/plugins/column-sizing/utils.js.map +1 -1
- package/esm/plugins/custom-cell-renderer/CustomRendererPlugin.js +5 -9
- package/esm/plugins/custom-cell-renderer/CustomRendererPlugin.js.map +1 -1
- package/esm/plugins/custom-cell-renderer/addCustomRendererToCell.js +5 -9
- package/esm/plugins/custom-cell-renderer/addCustomRendererToCell.js.map +1 -1
- package/esm/plugins/custom-cell-renderer/getRendererComponent.js +4 -8
- package/esm/plugins/custom-cell-renderer/getRendererComponent.js.map +1 -1
- package/esm/plugins/custom-cell-renderer/index.js +5 -9
- package/esm/plugins/custom-cell-renderer/index.js.map +1 -1
- package/esm/plugins/editable/EditableComponents/ComboBox.js +1 -1
- package/esm/plugins/editable/EditableComponents/ComboBox.js.map +1 -1
- package/esm/plugins/editable/EditableComponents/TextBox.js +1 -1
- package/esm/plugins/editable/EditableComponents/TextBox.js.map +1 -1
- package/esm/plugins/editable/EditableComponents/index.js +1 -2
- package/esm/plugins/editable/EditableComponents/index.js.map +1 -1
- package/esm/plugins/editable/EditablePlugin.js +3 -5
- package/esm/plugins/editable/EditablePlugin.js.map +1 -1
- package/esm/plugins/editable/decorateEditable.js +3 -4
- package/esm/plugins/editable/decorateEditable.js.map +1 -1
- package/esm/plugins/editable/getEditorComponent.js +1 -2
- package/esm/plugins/editable/getEditorComponent.js.map +1 -1
- package/esm/plugins/editable/index.js +3 -5
- package/esm/plugins/editable/index.js.map +1 -1
- package/esm/plugins/expandable-grid/ExpandableColumn.js +3 -4
- package/esm/plugins/expandable-grid/ExpandableColumn.js.map +1 -1
- package/esm/plugins/expandable-grid/ExpandablePlugin.js +7 -12
- package/esm/plugins/expandable-grid/ExpandablePlugin.js.map +1 -1
- package/esm/plugins/expandable-grid/ExpandedRow.js +6 -9
- package/esm/plugins/expandable-grid/ExpandedRow.js.map +1 -1
- package/esm/plugins/expandable-grid/ExpandedRowExtra.js +2 -2
- package/esm/plugins/expandable-grid/ExpandedRowExtra.js.map +1 -1
- package/esm/plugins/expandable-grid/index.js +7 -12
- package/esm/plugins/expandable-grid/index.js.map +1 -1
- package/esm/plugins/expandable-grid/useExpandGridState.js +1 -2
- package/esm/plugins/expandable-grid/useExpandGridState.js.map +1 -1
- package/esm/plugins/export-data/ExportDataPlugin.js +1 -1
- package/esm/plugins/export-data/ExportDataPlugin.js.map +1 -1
- package/esm/plugins/export-data/index.js +1 -1
- package/esm/plugins/filterable/FilterablePlugin.js +8 -9
- package/esm/plugins/filterable/FilterablePlugin.js.map +1 -1
- package/esm/plugins/filterable/addFilterToColumn.js +8 -9
- package/esm/plugins/filterable/addFilterToColumn.js.map +1 -1
- package/esm/plugins/filterable/components/FilterableHeader.js +9 -10
- package/esm/plugins/filterable/components/FilterableHeader.js.map +1 -1
- package/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +9 -7
- package/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js.map +1 -1
- package/esm/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +4 -4
- package/esm/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js.map +1 -1
- package/esm/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +132 -165
- package/esm/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js.map +1 -1
- package/esm/plugins/filterable/components/filterable-menus/TextFilterMenu.js +3 -3
- package/esm/plugins/filterable/components/filterable-menus/TextFilterMenu.js.map +1 -1
- package/esm/plugins/filterable/components/filterable-menus/getFilterMenuByType.js +7 -7
- package/esm/plugins/filterable/filterableFormatter.js +9 -10
- package/esm/plugins/filterable/filterableFormatter.js.map +1 -1
- package/esm/plugins/filterable/filtering-helper/filterRowsByQuery.js +1 -1
- package/esm/plugins/filterable/filtering-helper/filterRowsByQuery.js.map +1 -1
- package/esm/plugins/filterable/helper.js +1 -1
- package/esm/plugins/filterable/helper.js.map +1 -1
- package/esm/plugins/filterable/index.js +8 -9
- package/esm/plugins/filterable/index.js.map +1 -1
- package/esm/plugins/filterable/useFilterableState.js +1 -1
- package/esm/plugins/index.js +11 -26
- package/esm/plugins/index.js.map +1 -1
- package/esm/plugins/infinite-scrolling/InfiniteScrollPlugin.js.map +1 -1
- package/esm/plugins/pagination/PaginationPlugin.js +1 -2
- package/esm/plugins/pagination/PaginationPlugin.js.map +1 -1
- package/esm/plugins/pagination/components/Pagination.js +2 -2
- package/esm/plugins/pagination/components/PerPageDropdown.js +2 -2
- package/esm/plugins/pagination/components/PerPageDropdown.js.map +1 -1
- package/esm/plugins/pagination/index.js +1 -2
- package/esm/plugins/pagination/index.js.map +1 -1
- package/esm/plugins/pagination/usePaginationState.js +1 -1
- package/esm/plugins/pagination/usePaginationState.js.map +1 -1
- package/esm/plugins/resizable/ResizablePlugin.js +1 -1
- package/esm/plugins/resizable/ResizablePlugin.js.map +1 -1
- package/esm/plugins/resizable/index.js +1 -1
- package/esm/plugins/resizable/utils.js +1 -1
- package/esm/plugins/resizable/utils.js.map +1 -1
- package/esm/plugins/row-dnd/DndRowsPlugin.js +2 -2
- package/esm/plugins/row-dnd/DndRowsPlugin.js.map +1 -1
- package/esm/plugins/row-dnd/index.js +2 -2
- package/esm/plugins/selectable/SelectablePlugin.js +2 -4
- package/esm/plugins/selectable/SelectablePlugin.js.map +1 -1
- package/esm/plugins/selectable/addSelectableColumn.js +2 -3
- package/esm/plugins/selectable/addSelectableColumn.js.map +1 -1
- package/esm/plugins/selectable/helper.js +1 -1
- package/esm/plugins/selectable/helper.js.map +1 -1
- package/esm/plugins/selectable/index.js +2 -4
- package/esm/plugins/selectable/index.js.map +1 -1
- package/esm/plugins/selectable/selectableFormatter.js +2 -3
- package/esm/plugins/selectable/selectableFormatter.js.map +1 -1
- package/esm/plugins/selectable/useSelectableState.js +1 -2
- package/esm/plugins/selectable/useSelectableState.js.map +1 -1
- package/esm/plugins/sortable/SortablePlugin.js +2 -4
- package/esm/plugins/sortable/SortablePlugin.js.map +1 -1
- package/esm/plugins/sortable/index.js +2 -4
- package/esm/plugins/sortable/index.js.map +1 -1
- package/esm/plugins/sortable/sortHeaderFormatter.js +1 -2
- package/esm/plugins/sortable/sortHeaderFormatter.js.map +1 -1
- package/esm/plugins/sortable/sorter.js +1 -1
- package/esm/plugins/sortable/sorter.js.map +1 -1
- package/esm/plugins/sortable/useSortableState.js +1 -1
- package/esm/plugins/sortable/useSortableState.js.map +1 -1
- package/esm/plugins/toolbar/RowRenderer.js +3 -3
- package/esm/plugins/toolbar/RowRenderer.js.map +1 -1
- package/esm/plugins/toolbar/ToolbarPlugin.js +3 -3
- package/esm/plugins/toolbar/ToolbarTrigger.js +2 -2
- package/esm/plugins/toolbar/ToolbarTrigger.js.map +1 -1
- package/esm/plugins/toolbar/index.js +3 -3
- package/esm/plugins/virtualization/AutoHeightList.js +1 -3
- package/esm/plugins/virtualization/AutoHeightList.js.map +1 -1
- package/esm/plugins/virtualization/VirtualizationPlugin.js +1 -2
- package/esm/plugins/virtualization/VirtualizationPlugin.js.map +1 -1
- package/esm/plugins/virtualization/VirtualizedBody.js +1 -2
- package/esm/plugins/virtualization/VirtualizedBody.js.map +1 -1
- package/esm/plugins/virtualization/index.js +1 -2
- package/esm/plugins/virtualization/index.js.map +1 -1
- package/esm/renders/CellWithAddons.js +2 -2
- package/esm/renders/CellWithAddons.js.map +1 -1
- package/esm/renders/index.js +2 -2
- package/esm/renders/styled.js +1 -1
- package/esm/renders/styled.js.map +1 -1
- package/esm/utilities/getPluginsFromProps.js +12 -26
- package/esm/utilities/getPluginsFromProps.js.map +1 -1
- package/package.json +15 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorateEditable.js","sources":["../../../../src/plugins/editable/decorateEditable.tsx"],"sourcesContent":["import React from 'react';\nimport * as edit from 'react-edit';\nimport EditPencil from '@elliemae/ds-icons
|
|
1
|
+
{"version":3,"file":"decorateEditable.js","sources":["../../../../src/plugins/editable/decorateEditable.tsx"],"sourcesContent":["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/useDataGrid/initColumnDefinition';\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"],"names":["makeEditableConfig","grid","edit","isEditing","columnIndex","rowData","column","rest","getInstance","editingRows","state","rowKey","props","isCustomEditing","alwaysEditing","onActivate","onValue","actions","editValue","addEditableToCell","config","handlers","cell","transforms","push","getEditorComponent","customEditor","className","cx","appendCellFormatter","value","extraParams","React","e","stopPropagation","activateEdit","keyCode","EditPencil"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAOMA,kBAAkB,GAAG,SAArBA,kBAAqB,CAACC,IAAD;AAAA,SACzBC,eAAI,CAACA,IAAL,CAAU;AACRC,IAAAA,SAAS,EAAE,yBAAoD;AAAA,UAAjDC,WAAiD,QAAjDA,WAAiD;AAAA,UAApCC,OAAoC,QAApCA,OAAoC;AAAA,6BAA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CAAkBe,SADY,oBAEnBrB,MAAM,CAACoB,YAAP,GAAsB,eAAtB,GAAwC,EAFrB,EAAhC;AAIA,SAAOG,wCAAmB,CACxB,CACE,UAACC,KAAD,EAAQC,WAAR;AAAA,wBACEC,+FACEA;AACE,MAAA,OAAO,EAAE,iBAACC,CAAD,EAAO;AACdA,QAAAA,CAAC,CAACC,eAAF;AACAjC,QAAAA,IAAI,CAACO,WAAL,GAAmBS,OAAnB,CAA2BkB,YAA3B,CAAwCJ,WAAxC;AACD,OAJH;AAKE,MAAA,OAAO,EAAE,iBAACE,CAAD,EAAO;AACdA,QAAAA,CAAC,CAACC,eAAF;;AACA,YAAID,CAAC,CAACG,OAAF,KAAc,EAAlB,EAAsB;AACpBnC,UAAAA,IAAI,CAACO,WAAL,GAAmBS,OAAnB,CAA2BkB,YAA3B,CAAwCJ,WAAxC;AACD;AACF,OAVH;AAWE,MAAA,IAAI,EAAC,UAXP;AAYE,MAAA,QAAQ,EAAE;AAZZ,OAcGD,KAdH,eAeEE,wCAACK,kBAAD;AAAY,MAAA,SAAS,EAAC;AAAtB,MAfF,eAgBEL;AAAM,MAAA,SAAS,EAAC;AAAhB,WAhBF,CADF,CADF;AAAA,GADF,CADwB,EAyBxB1B,MAzBwB,CAA1B;AA2BD;;;;;"}
|
|
@@ -12,8 +12,7 @@ require('@babel/runtime/helpers/assertThisInitialized');
|
|
|
12
12
|
require('@babel/runtime/helpers/inherits');
|
|
13
13
|
require('@babel/runtime/helpers/possibleConstructorReturn');
|
|
14
14
|
require('@babel/runtime/helpers/getPrototypeOf');
|
|
15
|
-
require('@elliemae/ds-
|
|
16
|
-
require('@elliemae/ds-basic/form/TextBox');
|
|
15
|
+
require('@elliemae/ds-form');
|
|
17
16
|
|
|
18
17
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
19
18
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getEditorComponent.js","sources":["../../../../src/plugins/editable/getEditorComponent.tsx"],"sourcesContent":["/* 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 default getEditorComponent;\n"],"names":["components","DSComboBox","ComboBox","DSTextBox","TextBox","getEditorComponent","editorComponent","handlers","value","onValue","extraParameters","customHandlers","type","restEditorProps","Component","maxOptions","options","length","React","zIndex"],"mappings":"
|
|
1
|
+
{"version":3,"file":"getEditorComponent.js","sources":["../../../../src/plugins/editable/getEditorComponent.tsx"],"sourcesContent":["/* 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 default getEditorComponent;\n"],"names":["components","DSComboBox","ComboBox","DSTextBox","TextBox","getEditorComponent","editorComponent","handlers","value","onValue","extraParameters","customHandlers","type","restEditorProps","Component","maxOptions","options","length","React","zIndex"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAMA,UAAU,GAAG;AACjBC,EAAAA,UAAU,EAAEC,4CADK;AAEjBC,EAAAA,SAAS,EAAEC;AAFM,CAAnB;;IAKMC,kBAAkB,GAAG,SAArBA,kBAAqB;AAAA,MAACC,eAAD,uEAAmB,EAAnB;AAAA,MAAuBC,QAAvB;AAAA,SAAoC,gBAIzD;AAAA,QAHJC,KAGI,QAHJA,KAGI;AAAA,QAFJC,OAEI,QAFJA,OAEI;AAAA,QADJC,eACI,QADJA,eACI;;AACJ,QAAI,OAAOJ,eAAP,KAA2B,UAA/B,EAA2C;AACzC,aAAOA,eAAe;AACpBE,QAAAA,KAAK,EAALA,KADoB;AAEpBC,QAAAA,OAAO,EAAPA,OAFoB;AAGpBE,QAAAA,cAAc,EAAEJ;AAHI,SAIjBG,eAJiB,EAAtB;AAMD;;AAED,gCAAmDJ,eAAnD,CAAQM,IAAR;AAAA,QAAQA,IAAR,sCAAe,WAAf;AAAA,QAA+BC,eAA/B,gDAAmDP,eAAnD;;AACA,QAAMQ,SAAS,GAAGd,UAAU,CAACY,IAAD,CAA5B;;AAEA,QAAIA,IAAI,KAAK,YAAb,EAA2B;AAAA;;AACzB;AACA,UAAMG,UAAU,GAAG,CAAAF,eAAe,SAAf,IAAAA,eAAe,WAAf,qCAAAA,eAAe,CAAEG,OAAjB,gFAA0BC,MAA1B,KAAoC,GAAvD;AACA,0BACEC;AAAK,QAAA,KAAK,EAAE;AAAEC,UAAAA,MAAM,EAAE;AAAV;AAAZ,sBACED,wCAAC,SAAD;AACE,QAAA,SAAS,MADX;AAEE,QAAA,OAAO,EAAET,OAFX;AAGE,QAAA,KAAK,EAAED,KAHT;AAIE,QAAA,UAAU,EAAEO;AAJd,SAKMF,eALN,EADF,CADF;AAWD;;AAED,wBACEK,wCAAC,SAAD;AAAW,MAAA,SAAS,MAApB;AAAqB,MAAA,OAAO,EAAET,OAA9B;AAAuC,MAAA,KAAK,EAAED;AAA9C,OAAyDK,eAAzD,EADF;AAGD,GApC0B;AAAA;;;;"}
|
|
@@ -6,15 +6,14 @@ var plugins_editable_EditablePlugin = require('./EditablePlugin.js');
|
|
|
6
6
|
var plugins_editable_EditableComponents_ComboBox = require('./EditableComponents/ComboBox.js');
|
|
7
7
|
var plugins_editable_EditableComponents_TextBox = require('./EditableComponents/TextBox.js');
|
|
8
8
|
require('@babel/runtime/helpers/slicedToArray');
|
|
9
|
-
require('@elliemae/ds-utilities
|
|
10
|
-
require('@elliemae/ds-utilities/utils');
|
|
9
|
+
require('@elliemae/ds-utilities');
|
|
11
10
|
require('@elliemae/ds-shared/createDataInstance/createInstancePlugin');
|
|
12
11
|
require('./decorateEditable.js');
|
|
13
12
|
require('@babel/runtime/helpers/defineProperty');
|
|
14
13
|
require('@babel/runtime/helpers/objectWithoutProperties');
|
|
15
14
|
require('react');
|
|
16
15
|
require('react-edit');
|
|
17
|
-
require('@elliemae/ds-icons
|
|
16
|
+
require('@elliemae/ds-icons');
|
|
18
17
|
require('@elliemae/ds-shared/useDataGrid/initColumnDefinition');
|
|
19
18
|
require('./getEditorComponent.js');
|
|
20
19
|
require('@babel/runtime/helpers/extends');
|
|
@@ -24,8 +23,7 @@ require('@babel/runtime/helpers/assertThisInitialized');
|
|
|
24
23
|
require('@babel/runtime/helpers/inherits');
|
|
25
24
|
require('@babel/runtime/helpers/possibleConstructorReturn');
|
|
26
25
|
require('@babel/runtime/helpers/getPrototypeOf');
|
|
27
|
-
require('@elliemae/ds-
|
|
28
|
-
require('@elliemae/ds-basic/form/TextBox');
|
|
26
|
+
require('@elliemae/ds-form');
|
|
29
27
|
|
|
30
28
|
|
|
31
29
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -3,11 +3,10 @@
|
|
|
3
3
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
4
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var
|
|
7
|
-
var ArrowheadRight = require('@elliemae/ds-icons/ArrowheadRight');
|
|
6
|
+
var dsIcons = require('@elliemae/ds-icons');
|
|
8
7
|
var dsClassnames = require('@elliemae/ds-classnames');
|
|
9
|
-
var DSButton = require('@elliemae/ds-
|
|
10
|
-
var DSTruncatedTooltipText = require('@elliemae/ds-
|
|
8
|
+
var DSButton = require('@elliemae/ds-button');
|
|
9
|
+
var DSTruncatedTooltipText = require('@elliemae/ds-truncated-tooltip-text');
|
|
11
10
|
var blockNames = require('../../blockNames.js');
|
|
12
11
|
var rowSizes = require('../../rowSizes.js');
|
|
13
12
|
|
|
@@ -16,8 +15,6 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
16
15
|
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
17
16
|
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
18
17
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
19
|
-
var ArrowheadDown__default = /*#__PURE__*/_interopDefaultLegacy(ArrowheadDown);
|
|
20
|
-
var ArrowheadRight__default = /*#__PURE__*/_interopDefaultLegacy(ArrowheadRight);
|
|
21
18
|
var DSButton__default = /*#__PURE__*/_interopDefaultLegacy(DSButton);
|
|
22
19
|
var DSTruncatedTooltipText__default = /*#__PURE__*/_interopDefaultLegacy(DSTruncatedTooltipText);
|
|
23
20
|
|
|
@@ -54,7 +51,7 @@ function ExpandableColumnCell(_ref) {
|
|
|
54
51
|
}, /*#__PURE__*/React__default['default'].createElement(DSButton__default['default'], {
|
|
55
52
|
buttonType: "text",
|
|
56
53
|
className: "expandable-arrow",
|
|
57
|
-
icon: isExpanded ? /*#__PURE__*/React__default['default'].createElement(
|
|
54
|
+
icon: isExpanded ? /*#__PURE__*/React__default['default'].createElement(dsIcons.ArrowheadDown, null) : /*#__PURE__*/React__default['default'].createElement(dsIcons.ArrowheadRight, null),
|
|
58
55
|
onClick: function onClick(e) {
|
|
59
56
|
onToggleExpand(e);
|
|
60
57
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpandableColumn.js","sources":["../../../../src/plugins/expandable-grid/ExpandableColumn.tsx"],"sourcesContent":["/* eslint-disable react/display-name */\nimport React, { useRef } from 'react';\nimport
|
|
1
|
+
{"version":3,"file":"ExpandableColumn.js","sources":["../../../../src/plugins/expandable-grid/ExpandableColumn.tsx"],"sourcesContent":["/* 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 default function createExpandableColumn({\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"],"names":["blockName","dataGridBlockName","ExpandableColumnWrapper","aggregatedClasses","LabelDescriptionWrapper","Label","Description","ExtraColumnData","ExpandableMasterWrapper","ExpandableDetailsWrapper","ExpandableColumnCell","label","description","isExpanded","expandableDetails","extraData","onToggleExpand","ref","useRef","React","height","RowSizes","extend","DSButton","ArrowheadDown","ArrowheadRight","e","current","focus","DSTruncatedTooltipText","expandableColumnRenderer","renderRowLabel","renderRowDescription","renderExtraData","value","grid","rowData","getInstance","renderExpandedDetails","props","toggleExpand","actions","noop","createExpandableColumn","property","width","resizable","sortable","searchable","customRenderer","rest","cell","formatters","expandableColumn"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AASA,IAAMA,SAAS,aAAMC,4BAAN,uBAAf;;AAGA,IAAMC,uBAAuB,GAAGC,8BAAiB,CAAC,KAAD,CAAjB,CAAyBH,SAAzB,CAAhC;AACA,IAAMI,uBAAuB,GAAGD,8BAAiB,CAAC,KAAD,CAAjB,CAAyBH,SAAzB,EAAoC,2BAApC,CAAhC;AACA,IAAMK,KAAK,GAAGF,8BAAiB,CAAC,MAAD,CAAjB,CAA0BH,SAA1B,EAAqC,OAArC,CAAd;AACA,IAAMM,WAAW,GAAGH,8BAAiB,CAAC,MAAD,CAAjB,CAA0BH,SAA1B,EAAqC,aAArC,CAApB;AACA,IAAMO,eAAe,GAAGJ,8BAAiB,CAAC,KAAD,CAAjB,CAAyBH,SAAzB,EAAoC,mBAApC,CAAxB;AACA,IAAMQ,uBAAuB,GAAGL,8BAAiB,CAAC,KAAD,CAAjB,WAA4BH,SAA5B,qBAAhC;AACA,IAAMS,wBAAwB,GAAGN,8BAAiB,CAAC,KAAD,CAAjB,WAA4BH,SAA5B,sBAAjC;;AAEA,SAASU,oBAAT,OAAgH;AAAA,MAAhFC,KAAgF,QAAhFA,KAAgF;AAAA,MAAz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,SANDA,KAMC;AAAA,MALDC,SAKC,SALDA,SAKC;AAAA,MAJDC,QAIC,SAJDA,QAIC;AAAA,MAHDC,UAGC,SAHDA,UAGC;AAAA,YAFDC,cAEC;AAAA,UADEC,IACF;;AACD,yCACKA,IADL;AAEEvC,IAAAA,KAAK,EAALA,KAFF;AAGEiC,IAAAA,QAAQ,EAARA,QAHF;AAIEO,IAAAA,IAAI,EAAE;AACJC,MAAAA,UAAU,EAAE,CACVtB,wBAAwB,CAAC;AACvBC,QAAAA,cAAc,EAAdA,cADuB;AAEvBC,QAAAA,oBAAoB,EAApBA,oBAFuB;AAGvBC,QAAAA,eAAe,EAAfA;AAHuB,OAAD,CADd;AADR,KAJR;AAaEY,IAAAA,KAAK,EAAEA,KAAK,IAAI,KAblB;AAcEQ,IAAAA,gBAAgB,EAAE,IAdpB;AAeEP,IAAAA,SAAS,EAATA,SAfF;AAgBEC,IAAAA,QAAQ,EAARA,QAhBF;AAiBEC,IAAAA,UAAU,EAAVA;AAjBF;AAmBD;;;;"}
|
|
@@ -6,42 +6,39 @@ var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProp
|
|
|
6
6
|
var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
|
|
7
7
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
8
8
|
var React = require('react');
|
|
9
|
-
var
|
|
9
|
+
var dsUtilities = require('@elliemae/ds-utilities');
|
|
10
10
|
var reactWindow = require('react-window');
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var DSButton = require('@elliemae/ds-basic/Button');
|
|
11
|
+
var dsIcons = require('@elliemae/ds-icons');
|
|
12
|
+
var DSButton = require('@elliemae/ds-button');
|
|
14
13
|
var createInstancePlugin = require('@elliemae/ds-shared/createDataInstance/createInstancePlugin');
|
|
15
14
|
var initColumnDefinition = require('@elliemae/ds-shared/useDataGrid/initColumnDefinition');
|
|
16
15
|
var plugins_expandableGrid_ExpandedRow = require('./ExpandedRow.js');
|
|
17
16
|
var plugins_expandableGrid_ExpandedRowExtra = require('./ExpandedRowExtra.js');
|
|
18
17
|
var rowSizes = require('../../rowSizes.js');
|
|
19
18
|
var plugins_expandableGrid_useExpandGridState = require('./useExpandGridState.js');
|
|
20
|
-
require('@elliemae/ds-
|
|
19
|
+
require('@elliemae/ds-separator');
|
|
21
20
|
require('styled-components');
|
|
22
21
|
require('@elliemae/ds-shared/defer-render-hoc');
|
|
23
22
|
require('@elliemae/ds-shared/useDataGrid');
|
|
24
23
|
require('../pagination/PaginationPlugin.js');
|
|
25
24
|
require('@babel/runtime/helpers/extends');
|
|
26
|
-
require('@elliemae/ds-utilities/system');
|
|
27
25
|
require('@elliemae/ds-shared/FocusGroup/FocusGrid');
|
|
28
26
|
require('../pagination/helper.js');
|
|
29
27
|
require('../pagination/usePaginationState.js');
|
|
30
28
|
require('@babel/runtime/helpers/slicedToArray');
|
|
31
|
-
require('@elliemae/ds-utilities/hooks/useDerivedStateFromProps');
|
|
32
29
|
require('../../components/NoResults.js');
|
|
33
30
|
require('@elliemae/ds-system');
|
|
34
31
|
require('../../components/BodyCell.js');
|
|
35
32
|
require('prop-types');
|
|
36
33
|
require('@elliemae/ds-shared/createDataInstance/utils');
|
|
37
|
-
require('@elliemae/ds-
|
|
38
|
-
require('../../index-
|
|
34
|
+
require('@elliemae/ds-truncated-tooltip-text');
|
|
35
|
+
require('../../index-0be12eb8.js');
|
|
39
36
|
require('../../components/renderers/defaultClassedRenderers.js');
|
|
40
37
|
require('@elliemae/ds-classnames');
|
|
41
38
|
require('../../blockNames.js');
|
|
42
39
|
require('../../components/renderers/renderRowsLoader.js');
|
|
43
40
|
require('../../components/RowsLoader.js');
|
|
44
|
-
require('@elliemae/ds-
|
|
41
|
+
require('@elliemae/ds-spinner');
|
|
45
42
|
require('../../components/TableBody.js');
|
|
46
43
|
require('../../components/tableContext.js');
|
|
47
44
|
require('../../components/Table.js');
|
|
@@ -55,10 +52,8 @@ require('../../utilities/getScrollbarSize.js');
|
|
|
55
52
|
require('../column-sizing/useColumnSizeService.js');
|
|
56
53
|
require('../column-sizing/utils.js');
|
|
57
54
|
require('../column-sizing/ext-points/getTableProps.js');
|
|
58
|
-
require('@elliemae/ds-utilities/hooks/useResizeObserver');
|
|
59
55
|
require('../column-sizing/ext-points/decorateColumn.js');
|
|
60
56
|
require('../column-sizing/columnMeasurerTransformer.js');
|
|
61
|
-
require('@elliemae/ds-utilities/hooks/useExpandState');
|
|
62
57
|
|
|
63
58
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
64
59
|
|
|
@@ -66,8 +61,6 @@ var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_obje
|
|
|
66
61
|
var _toConsumableArray__default = /*#__PURE__*/_interopDefaultLegacy(_toConsumableArray);
|
|
67
62
|
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
68
63
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
69
|
-
var ArrowheadDown__default = /*#__PURE__*/_interopDefaultLegacy(ArrowheadDown);
|
|
70
|
-
var ArrowheadRight__default = /*#__PURE__*/_interopDefaultLegacy(ArrowheadRight);
|
|
71
64
|
var DSButton__default = /*#__PURE__*/_interopDefaultLegacy(DSButton);
|
|
72
65
|
var createInstancePlugin__default = /*#__PURE__*/_interopDefaultLegacy(createInstancePlugin);
|
|
73
66
|
|
|
@@ -144,7 +137,7 @@ var ExpandablePlugin = createInstancePlugin__default['default']('expandable', {
|
|
|
144
137
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(DSButton__default['default'], {
|
|
145
138
|
buttonType: "text",
|
|
146
139
|
className: "expandable-arrow",
|
|
147
|
-
icon: isExpanded ? /*#__PURE__*/React__default['default'].createElement(
|
|
140
|
+
icon: isExpanded ? /*#__PURE__*/React__default['default'].createElement(dsIcons.ArrowheadDown, null) : /*#__PURE__*/React__default['default'].createElement(dsIcons.ArrowheadRight, null),
|
|
148
141
|
onClick: function onClick(e) {
|
|
149
142
|
e.stopPropagation();
|
|
150
143
|
toggleExpand(rowData);
|
|
@@ -190,13 +183,13 @@ var ExpandablePlugin = createInstancePlugin__default['default']('expandable', {
|
|
|
190
183
|
isShowingAll: children.length < expandableSubrowsVisible || expandedRows[key] && expandedRows[key].showAllRows,
|
|
191
184
|
size: subrowSizePx
|
|
192
185
|
});
|
|
193
|
-
var expandedMinSize =
|
|
186
|
+
var expandedMinSize = dsUtilities.isFunction(getExpandedRowMinSize) && getExpandedRowMinSize(index); // eslint-disable-next-line no-nested-ternary
|
|
194
187
|
|
|
195
188
|
return expandedRows[key] ? expandedMinSize > expandedSize ? expandedMinSize : expandedSize : rowSizePx;
|
|
196
189
|
};
|
|
197
190
|
|
|
198
191
|
return _objectSpread(_objectSpread({}, bodyProps), {}, {
|
|
199
|
-
className:
|
|
192
|
+
className: dsUtilities.cx(bodyProps.className, 'expandable'),
|
|
200
193
|
listComponent: reactWindow.VariableSizeList,
|
|
201
194
|
listProps: {
|
|
202
195
|
ref: listRef,
|
|
@@ -259,7 +252,7 @@ var ExpandablePlugin = createInstancePlugin__default['default']('expandable', {
|
|
|
259
252
|
var key = rowData[rowKey];
|
|
260
253
|
var isExpanded = !!expandedRows[key];
|
|
261
254
|
return _objectSpread(_objectSpread({}, rowProps), {}, {
|
|
262
|
-
className:
|
|
255
|
+
className: dsUtilities.cx(rowProps.className, Object.keys(expandedRows).length > 0 && 'expandable-row', isExpanded && 'expanded'),
|
|
263
256
|
isExpanded: isExpanded,
|
|
264
257
|
showAllRows: expandedRows[key] && expandedRows[key].showAllRows
|
|
265
258
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpandablePlugin.js","sources":["../../../../src/plugins/expandable-grid/ExpandablePlugin.tsx"],"sourcesContent":["/* eslint-disable max-lines */\nimport React, { useEffect, useMemo, useRef } from 'react';\nimport { cx, isFunction } from '@elliemae/ds-utilities/utils';\nimport { VariableSizeList } from 'react-window';\nimport ArrowheadDown from '@elliemae/ds-icons/ArrowheadDown';\nimport ArrowheadRight from '@elliemae/ds-icons/ArrowheadRight';\nimport DSButton from '@elliemae/ds-basic/Button';\nimport createInstancePlugin from '@elliemae/ds-shared/createDataInstance/createInstancePlugin';\nimport { appendCellFormatter } from '@elliemae/ds-shared/useDataGrid/initColumnDefinition';\nimport ExpandedRow from './ExpandedRow';\nimport ExpandedRowExtra from './ExpandedRowExtra';\nimport { RowSizes } from '../../rowSizes';\nimport { useExpandGridState } from './useExpandGridState';\n\nconst getExpandedRowSizeBySubrows = ({\n totalAmount,\n amountVisible,\n isShowingAll,\n size = 36,\n}) =>\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 =>\n 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:\n children.length > expandableSubrowsVisible\n ? expandableSubrowsVisible\n : children.length,\n isShowingAll:\n children.length < expandableSubrowsVisible ||\n (expandedRows[key] && expandedRows[key].showAllRows),\n size: subrowSizePx,\n });\n\n const expandedMinSize =\n isFunction(getExpandedRowMinSize) && getExpandedRowMinSize(index);\n\n // eslint-disable-next-line no-nested-ternary\n return expandedRows[key]\n ? expandedMinSize > expandedSize\n ? expandedMinSize\n : expandedSize\n : 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)\n ? 'SingleColumn'\n : '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]\n ? composedRows[rowProps.index]\n : 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"],"names":["getExpandedRowSizeBySubrows","totalAmount","amountVisible","isShowingAll","size","ExpandedRows","SingleColumn","ExpandedRow","Master","ExpandedRowExtra","createExpandedRow","type","isExpandableSingleColumn","columns","some","column","expandableColumn","ExpandablePlugin","createInstancePlugin","registerStateHook","useExpandGridState","decorateGrid","grid","getInstance","decoratedColumns","detailColumns","useMemo","map","customRenderer","detailCustomRenderer","filter","col","decorateColumns","firstColumnIndex","findIndex","isUserColumn","firstColumn","formatExpandable","slice","appendCellFormatter","value","isExpanded","rowData","toggleExpand","actions","React","DSButton","ArrowheadDown","ArrowheadRight","e","stopPropagation","getBodyProps","bodyProps","rows","composedRows","props","rowKey","getChildrenRows","rowSize","subrowSize","getExpandedRowMinSize","getExpandedRowSize","expandableSubrowsVisible","expandedRows","state","rowSizePx","RowSizes","subrowSizePx","listRef","useRef","useEffect","current","resetAfterIndex","getItemSize","index","key","children","expandedSize","length","showAllRows","expandedMinSize","isFunction","className","cx","listComponent","VariableSizeList","listProps","ref","itemSize","decorateRenderers","renderers","Row","body","row","Cell","cell","expandedRowType","ExpandedRowComponent","rowProps","renderRowDetails","getRowProps","Object","keys"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,IAAMA,2BAA2B,GAAG,SAA9BA,2BAA8B;AAAA,MAClCC,WADkC,QAClCA,WADkC;AAAA,MAElCC,aAFkC,QAElCA,aAFkC;AAAA,MAGlCC,YAHkC,QAGlCA,YAHkC;AAAA,uBAIlCC,IAJkC;AAAA,MAIlCA,IAJkC,0BAI3B,EAJ2B;AAAA,SAMlCD,YAAY,GAAGC,IAAI,IAAIH,WAAW,GAAG,CAAlB,CAAJ,GAA2B,CAA9B,GAAkCG,IAAI,IAAIF,aAAa,GAAG,CAApB,CAAJ,GAA6B,EANzC;AAAA,CAApC;;AAQA,IAAMG,YAAY,GAAG;AACnBC,EAAAA,YAAY,EAAEC,kCADK;AAEnBC,EAAAA,MAAM,EAAEC;AAFW,CAArB;;AAKA,IAAMC,iBAAiB,GAAG,SAApBA,iBAAoB,CAAAC,IAAI;AAAA,SAAIN,YAAY,CAACM,IAAD,CAAZ,IAAsBN,YAAY,CAACG,MAAvC;AAAA,CAA9B;;AAEA,IAAMI,wBAAwB,GAAG,SAA3BA,wBAA2B,CAAAC,OAAO;AAAA,SACtCA,OAAO,CAACC,IAAR,CAAa,UAAAC,MAAM;AAAA,WAAIA,MAAM,CAACC,gBAAX;AAAA,GAAnB,CADsC;AAAA,CAAxC;;IAGaC,gBAAgB,GAAGC,wCAAoB,CAAC,YAAD,EAAe;AACjEC,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AAA,UAAU,EAAVA;AAFM,eAGHyD,QAHG,CAPV;AAYE,YAAA,IAAI,EAAEzC,eAAe,CAAC;AAAEf,cAAAA,OAAO,EAAPA;AAAF,aAAD;AAZvB,aAcGwD,QAAQ,CAACtB,QAdZ,CADF;AAkBD;;AACD,4BAAO/B,wCAAC,GAAD,EAASqD,QAAT,CAAP;AACD,OA9BD;AA+BD,KAtC2B,EAsCzB,EAtCyB,CAA5B;AAwCA,WAAOR,SAAP;AACD,GAnKgE;AAqKjEU,EAAAA,WArKiE,uBAqKrDF,QArKqD,EAqK3C5E,IArK2C,SAqKxB;AAAA,QAAXoB,OAAW,SAAXA,OAAW;;AACvC,6BAGIpB,IAAI,CAACC,WAAL,EAHJ;AAAA,QACWiC,MADX,sBACED,KADF,CACWC,MADX;AAAA,QAEWO,YAFX,sBAEEC,KAFF,CAEWD,YAFX;;AAIA,QAAMY,GAAG,GAAGjC,OAAO,CAACc,MAAD,CAAnB;AACA,QAAMf,UAAU,GAAG,CAAC,CAACsB,YAAY,CAACY,GAAD,CAAjC;AACA,2CACKuB,QADL;AAEEhB,MAAAA,SAAS,EAAEC,QAAE,CACXe,QAAQ,CAAChB,SADE,EAEXmB,MAAM,CAACC,IAAP,CAAYvC,YAAZ,EAA0Be,MAA1B,GAAmC,CAAnC,IAAwC,gBAF7B,EAGXrC,UAAU,IAAI,UAHH,CAFf;AAOEA,MAAAA,UAAU,EAAVA,UAPF;AAQEsC,MAAAA,WAAW,EAAEhB,YAAY,CAACY,GAAD,CAAZ,IAAqBZ,YAAY,CAACY,GAAD,CAAZ,CAAkBI;AARtD;AAUD;AAtLgE,CAAf;;;;"}
|
|
1
|
+
{"version":3,"file":"ExpandablePlugin.js","sources":["../../../../src/plugins/expandable-grid/ExpandablePlugin.tsx"],"sourcesContent":["/* 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 from '@elliemae/ds-shared/createDataInstance/createInstancePlugin';\nimport { appendCellFormatter } from '@elliemae/ds-shared/useDataGrid/initColumnDefinition';\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"],"names":["getExpandedRowSizeBySubrows","totalAmount","amountVisible","isShowingAll","size","ExpandedRows","SingleColumn","ExpandedRow","Master","ExpandedRowExtra","createExpandedRow","type","isExpandableSingleColumn","columns","some","column","expandableColumn","ExpandablePlugin","createInstancePlugin","registerStateHook","useExpandGridState","decorateGrid","grid","getInstance","decoratedColumns","detailColumns","useMemo","map","customRenderer","detailCustomRenderer","filter","col","decorateColumns","firstColumnIndex","findIndex","isUserColumn","firstColumn","formatExpandable","slice","appendCellFormatter","value","isExpanded","rowData","toggleExpand","actions","React","DSButton","ArrowheadDown","ArrowheadRight","e","stopPropagation","getBodyProps","bodyProps","rows","composedRows","props","rowKey","getChildrenRows","rowSize","subrowSize","getExpandedRowMinSize","getExpandedRowSize","expandableSubrowsVisible","expandedRows","state","rowSizePx","RowSizes","subrowSizePx","listRef","useRef","useEffect","current","resetAfterIndex","getItemSize","index","key","children","expandedSize","length","showAllRows","expandedMinSize","isFunction","className","cx","listComponent","VariableSizeList","listProps","ref","itemSize","decorateRenderers","renderers","Row","body","row","Cell","cell","expandedRowType","ExpandedRowComponent","rowProps","renderRowDetails","getRowProps","Object","keys"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,IAAMA,2BAA2B,GAAG,SAA9BA,2BAA8B;AAAA,MAAGC,WAAH,QAAGA,WAAH;AAAA,MAAgBC,aAAhB,QAAgBA,aAAhB;AAAA,MAA+BC,YAA/B,QAA+BA,YAA/B;AAAA,uBAA6CC,IAA7C;AAAA,MAA6CA,IAA7C,0BAAoD,EAApD;AAAA,SAClCD,YAAY,GAAGC,IAAI,IAAIH,WAAW,GAAG,CAAlB,CAAJ,GAA2B,CAA9B,GAAkCG,IAAI,IAAIF,aAAa,GAAG,CAApB,CAAJ,GAA6B,EADzC;AAAA,CAApC;;AAGA,IAAMG,YAAY,GAAG;AACnBC,EAAAA,YAAY,EAAEC,kCADK;AAEnBC,EAAAA,MAAM,EAAEC;AAFW,CAArB;;AAKA,IAAMC,iBAAiB,GAAG,SAApBA,iBAAoB,CAACC,IAAD;AAAA,SAAUN,YAAY,CAACM,IAAD,CAAZ,IAAsBN,YAAY,CAACG,MAA7C;AAAA,CAA1B;;AAEA,IAAMI,wBAAwB,GAAG,SAA3BA,wBAA2B,CAACC,OAAD;AAAA,SAAaA,OAAO,CAACC,IAAR,CAAa,UAACC,MAAD;AAAA,WAAYA,MAAM,CAACC,gBAAnB;AAAA,GAAb,CAAb;AAAA,CAAjC;;IAEaC,gBAAgB,GAAGC,wCAAoB,CAAC,YAAD,EAAe;AACjEC,EAAAA,iBAAiB,EAAEC,4DAD8C;AAEjEC,EAAAA,YAFiE,wBAEpDC,IAFoD,EAE9C;AACjB,4BAAsCA,IAAI,CAACC,WAAL,EAAtC;AAAA,QAAQC,gBAAR,qB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AAAF,aAAD;AAZvB,aAcGwD,QAAQ,CAACtB,QAdZ,CADF;AAkBD;;AACD,4BAAO/B,wCAAC,GAAD,EAASqD,QAAT,CAAP;AACD,OA5BD;AA6BD,KAlC2B,EAkCzB,EAlCyB,CAA5B;AAoCA,WAAOR,SAAP;AACD,GAtJgE;AAwJjEU,EAAAA,WAxJiE,uBAwJrDF,QAxJqD,EAwJ3C5E,IAxJ2C,SAwJxB;AAAA,QAAXoB,OAAW,SAAXA,OAAW;;AACvC,6BAGIpB,IAAI,CAACC,WAAL,EAHJ;AAAA,QACWiC,MADX,sBACED,KADF,CACWC,MADX;AAAA,QAEWO,YAFX,sBAEEC,KAFF,CAEWD,YAFX;;AAIA,QAAMY,GAAG,GAAGjC,OAAO,CAACc,MAAD,CAAnB;AACA,QAAMf,UAAU,GAAG,CAAC,CAACsB,YAAY,CAACY,GAAD,CAAjC;AACA,2CACKuB,QADL;AAEEhB,MAAAA,SAAS,EAAEC,cAAE,CACXe,QAAQ,CAAChB,SADE,EAEXmB,MAAM,CAACC,IAAP,CAAYvC,YAAZ,EAA0Be,MAA1B,GAAmC,CAAnC,IAAwC,gBAF7B,EAGXrC,UAAU,IAAI,UAHH,CAFf;AAOEA,MAAAA,UAAU,EAAVA,UAPF;AAQEsC,MAAAA,WAAW,EAAEhB,YAAY,CAACY,GAAD,CAAZ,IAAqBZ,YAAY,CAACY,GAAD,CAAZ,CAAkBI;AARtD;AAUD;AAzKgE,CAAf;;;;"}
|
|
@@ -3,38 +3,36 @@
|
|
|
3
3
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
4
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var DSSeparator = require('@elliemae/ds-
|
|
7
|
-
var DSButton = require('@elliemae/ds-
|
|
6
|
+
var DSSeparator = require('@elliemae/ds-separator');
|
|
7
|
+
var DSButton = require('@elliemae/ds-button');
|
|
8
8
|
var styled = require('styled-components');
|
|
9
|
-
var
|
|
9
|
+
var dsUtilities = require('@elliemae/ds-utilities');
|
|
10
10
|
var deferComponentRender = require('@elliemae/ds-shared/defer-render-hoc');
|
|
11
11
|
var useDataGrid = require('@elliemae/ds-shared/useDataGrid');
|
|
12
12
|
var plugins_pagination_PaginationPlugin = require('../pagination/PaginationPlugin.js');
|
|
13
13
|
var components_BodyCell = require('../../components/BodyCell.js');
|
|
14
|
-
var components_renderers_index = require('../../index-
|
|
14
|
+
var components_renderers_index = require('../../index-0be12eb8.js');
|
|
15
15
|
var components_TableBody = require('../../components/TableBody.js');
|
|
16
16
|
var components_Table = require('../../components/Table.js');
|
|
17
17
|
var plugins_columnSizing_ColumnSizingPlugin = require('../column-sizing/ColumnSizingPlugin.js');
|
|
18
18
|
require('@babel/runtime/helpers/extends');
|
|
19
|
-
require('@elliemae/ds-utilities/system');
|
|
20
19
|
require('@elliemae/ds-shared/FocusGroup/FocusGrid');
|
|
21
20
|
require('@elliemae/ds-shared/createDataInstance/createInstancePlugin');
|
|
22
21
|
require('../pagination/helper.js');
|
|
23
22
|
require('../pagination/usePaginationState.js');
|
|
24
23
|
require('@babel/runtime/helpers/slicedToArray');
|
|
25
|
-
require('@elliemae/ds-utilities/hooks/useDerivedStateFromProps');
|
|
26
24
|
require('../../components/NoResults.js');
|
|
27
25
|
require('@elliemae/ds-system');
|
|
28
26
|
require('@babel/runtime/helpers/toConsumableArray');
|
|
29
27
|
require('prop-types');
|
|
30
28
|
require('@elliemae/ds-shared/createDataInstance/utils');
|
|
31
|
-
require('@elliemae/ds-
|
|
29
|
+
require('@elliemae/ds-truncated-tooltip-text');
|
|
32
30
|
require('../../components/renderers/defaultClassedRenderers.js');
|
|
33
31
|
require('@elliemae/ds-classnames');
|
|
34
32
|
require('../../blockNames.js');
|
|
35
33
|
require('../../components/renderers/renderRowsLoader.js');
|
|
36
34
|
require('../../components/RowsLoader.js');
|
|
37
|
-
require('@elliemae/ds-
|
|
35
|
+
require('@elliemae/ds-spinner');
|
|
38
36
|
require('../../components/tableContext.js');
|
|
39
37
|
require('../../components/TableHeader.js');
|
|
40
38
|
require('../../components/HeaderCell.js');
|
|
@@ -45,7 +43,6 @@ require('../../utilities/getScrollbarSize.js');
|
|
|
45
43
|
require('../column-sizing/useColumnSizeService.js');
|
|
46
44
|
require('../column-sizing/utils.js');
|
|
47
45
|
require('../column-sizing/ext-points/getTableProps.js');
|
|
48
|
-
require('@elliemae/ds-utilities/hooks/useResizeObserver');
|
|
49
46
|
require('../column-sizing/ext-points/decorateColumn.js');
|
|
50
47
|
require('../column-sizing/columnMeasurerTransformer.js');
|
|
51
48
|
|
|
@@ -148,7 +145,7 @@ function ExpandedRow(_ref2) {
|
|
|
148
145
|
}), /*#__PURE__*/React__default['default'].createElement(DetailsWrapper, {
|
|
149
146
|
width: expandableGridDetailWidth
|
|
150
147
|
}, /*#__PURE__*/React__default['default'].createElement(DetailGridWrapper, {
|
|
151
|
-
allRowsVisible: rows.length < expandableSubrowsVisible ||
|
|
148
|
+
allRowsVisible: rows.length < expandableSubrowsVisible || dsUtilities.get(expandedRows, [rowKey, 'showAllRows']),
|
|
152
149
|
expandableGridDetailWidth: expandableGridDetailWidth
|
|
153
150
|
}, /*#__PURE__*/React__default['default'].createElement(DSSeparator__default['default'], {
|
|
154
151
|
dashed: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpandedRow.js","sources":["../../../../src/plugins/expandable-grid/ExpandedRow.tsx"],"sourcesContent":["/* eslint-disable react/prop-types */\n/* eslint-disable max-lines */\nimport React from 'react';\nimport DSSeparator from '@elliemae/ds-
|
|
1
|
+
{"version":3,"file":"ExpandedRow.js","sources":["../../../../src/plugins/expandable-grid/ExpandedRow.tsx"],"sourcesContent":["/* eslint-disable react/prop-types */\n/* eslint-disable max-lines */\nimport React from 'react';\nimport DSSeparator from '@elliemae/ds-separator';\nimport DSButton from '@elliemae/ds-button';\nimport styled from 'styled-components';\nimport { get } from '@elliemae/ds-utilities';\nimport deferComponentRender from '@elliemae/ds-shared/defer-render-hoc';\nimport useDataGrid from '@elliemae/ds-shared/useDataGrid';\nimport { PaginationPlugin } from '../pagination';\nimport BodyCell from '../../components/BodyCell';\nimport { defaultRenderers } from '../../components/renderers';\nimport TableBody from '../../components/TableBody';\nimport Table from '../../components/Table';\nimport { ColumnSizingPlugin } from '../column-sizing';\n\nconst DetailGrid = deferComponentRender(({ parentGrid, parentRowData, rows }) => {\n const { instanceRef, ...parentProps } = parentGrid.props;\n const grid = useDataGrid({\n uuid: parentGrid.getInstance().uuid,\n ...parentProps,\n columns: parentGrid\n .getInstance()\n .decoratedColumns.filter((col) => !col.expandableColumn)\n .map((c) => ({ ...c, expandableColumn: false })),\n rows,\n plugins: [ColumnSizingPlugin, PaginationPlugin],\n renderers: defaultRenderers,\n bindColumnsSizeTo: parentGrid.uuid,\n numRowsVisible: 'all',\n paginated: true,\n pagination: {\n perPage: rows.length,\n conditionalPagination: true,\n },\n parentRowData,\n });\n\n return (\n <Table {...grid}>\n <TableBody />\n </Table>\n );\n}, null);\n\nconst DetailsWrapper = styled.span`\n flex: 1;\n width: ${(props) => props.width}px;\n`;\n\nconst DetailGridWrapper = styled.div`\n display: flex;\n height: calc(100% - ${(props) => (props.allRowsVisible ? 18 : 60)}px);\n width: ${(props) => props.expandableGridDetailWidth}px;\n margin: 12px 0;\n`;\n\nfunction ExpandedRow({\n parentGrid,\n detailColumns,\n rowData,\n rows,\n rowProps,\n cellComponent: CellComponent,\n rowComponent: RowComponent,\n}) {\n const {\n decoratedColumns,\n actions: { toggleShowAllRows },\n state: { expandedRows },\n props: {\n rowKey,\n showMoreRowsText = 'SHOW ALL ROWS',\n showLessRowsText = 'SHOW LESS ROWS',\n expandableSubrowsVisible,\n },\n columnSizeService: { expandableGridDetailWidth },\n } = parentGrid.getInstance();\n\n const { showAllRows, ...restRowProps } = rowProps;\n return (\n <RowComponent {...restRowProps}>\n <BodyCell\n column={decoratedColumns[0]}\n columnIndex={0}\n component={CellComponent}\n grid={parentGrid}\n rowProps={{ rowData, ...rowProps }}\n />\n <DetailsWrapper width={expandableGridDetailWidth}>\n <DetailGridWrapper\n allRowsVisible={rows.length < expandableSubrowsVisible || get(expandedRows, [rowKey, 'showAllRows'])}\n expandableGridDetailWidth={expandableGridDetailWidth}\n >\n <DSSeparator dashed orientation=\"vertical\" />\n <DetailGrid\n detailColumns={detailColumns}\n parentGrid={parentGrid.getInstance()}\n parentRowData={rowData}\n rows={showAllRows ? rows : (rows || []).slice(0, expandableSubrowsVisible)}\n />\n </DetailGridWrapper>\n {rows.length > expandableSubrowsVisible && (\n <DSButton\n buttonType=\"text\"\n labelText={showAllRows ? showLessRowsText : showMoreRowsText}\n onClick={(e) => {\n e.stopPropagation();\n toggleShowAllRows(rowData);\n }}\n style={{ marginBottom: '10px' }}\n />\n )}\n </DetailsWrapper>\n </RowComponent>\n );\n}\n\nexport default ExpandedRow;\n"],"names":["DetailGrid","deferComponentRender","parentGrid","parentRowData","rows","props","instanceRef","parentProps","grid","useDataGrid","uuid","getInstance","columns","decoratedColumns","filter","col","expandableColumn","map","c","plugins","ColumnSizingPlugin","PaginationPlugin","renderers","defaultRenderers","bindColumnsSizeTo","numRowsVisible","paginated","pagination","perPage","length","conditionalPagination","React","Table","TableBody","DetailsWrapper","styled","span","width","DetailGridWrapper","div","allRowsVisible","expandableGridDetailWidth","ExpandedRow","detailColumns","rowData","rowProps","CellComponent","cellComponent","RowComponent","rowComponent","toggleShowAllRows","actions","expandedRows","state","rowKey","showMoreRowsText","showLessRowsText","expandableSubrowsVisible","columnSizeService","showAllRows","restRowProps","BodyCell","get","DSSeparator","slice","DSButton","e","stopPropagation","marginBottom"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,IAAMA,UAAU,GAAGC,wCAAoB,CAAC,gBAAyC;AAAA,MAAtCC,UAAsC,QAAtCA,UAAsC;AAAA,MAA1BC,a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,cAAD;AAAgB,IAAA,KAAK,EAAEU;AAAvB,kBACEV,wCAAC,iBAAD;AACE,IAAA,cAAc,EAAE3B,IAAI,CAACyB,MAAL,GAAc4B,wBAAd,IAA0CK,eAAG,CAACV,YAAD,EAAe,CAACE,MAAD,EAAS,aAAT,CAAf,CAD/D;AAEE,IAAA,yBAAyB,EAAEb;AAF7B,kBAIEV,wCAACgC,+BAAD;AAAa,IAAA,MAAM,MAAnB;AAAoB,IAAA,WAAW,EAAC;AAAhC,IAJF,eAKEhC,wCAAC,UAAD;AACE,IAAA,aAAa,EAAEY,aADjB;AAEE,IAAA,UAAU,EAAEzC,UAAU,CAACS,WAAX,EAFd;AAGE,IAAA,aAAa,EAAEiC,OAHjB;AAIE,IAAA,IAAI,EAAEe,WAAW,GAAGvD,IAAH,GAAU,CAACA,IAAI,IAAI,EAAT,EAAa4D,KAAb,CAAmB,CAAnB,EAAsBP,wBAAtB;AAJ7B,IALF,CADF,EAaGrD,IAAI,CAACyB,MAAL,GAAc4B,wBAAd,iBACC1B,wCAACkC,4BAAD;AACE,IAAA,UAAU,EAAC,MADb;AAEE,IAAA,SAAS,EAAEN,WAAW,GAAGH,gBAAH,GAAsBD,gBAF9C;AAGE,IAAA,OAAO,EAAE,iBAACW,CAAD,EAAO;AACdA,MAAAA,CAAC,CAACC,eAAF;AACAjB,MAAAA,iBAAiB,CAACN,OAAD,CAAjB;AACD,KANH;AAOE,IAAA,KAAK,EAAE;AAAEwB,MAAAA,YAAY,EAAE;AAAhB;AAPT,IAdJ,CARF,CADF;AAoCD;;;;"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var _extends = require('@babel/runtime/helpers/extends');
|
|
4
4
|
var React = require('react');
|
|
5
|
-
var
|
|
6
|
-
var DSSeparator = require('@elliemae/ds-
|
|
5
|
+
var dsUtilities = require('@elliemae/ds-utilities');
|
|
6
|
+
var DSSeparator = require('@elliemae/ds-separator');
|
|
7
7
|
var dsClassnames = require('@elliemae/ds-classnames');
|
|
8
8
|
var blockNames = require('../../blockNames.js');
|
|
9
9
|
|
|
@@ -30,7 +30,7 @@ function ExpandedRowExtra(_ref) {
|
|
|
30
30
|
return null;
|
|
31
31
|
} : _ref$renderRowDetails;
|
|
32
32
|
return /*#__PURE__*/React__default['default'].createElement(RowComponent, _extends__default['default']({}, rowProps, {
|
|
33
|
-
className:
|
|
33
|
+
className: dsUtilities.cx(rowProps.className, 'expanded-detail-row')
|
|
34
34
|
}), /*#__PURE__*/React__default['default'].createElement(RowComponent, {
|
|
35
35
|
className: "master-row-expanded"
|
|
36
36
|
}, children), /*#__PURE__*/React__default['default'].createElement(DSSeparator__default['default'], {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpandedRowExtra.js","sources":["../../../../src/plugins/expandable-grid/ExpandedRowExtra.tsx"],"sourcesContent":["import React from 'react';\nimport { cx } from '@elliemae/ds-utilities
|
|
1
|
+
{"version":3,"file":"ExpandedRowExtra.js","sources":["../../../../src/plugins/expandable-grid/ExpandedRowExtra.tsx"],"sourcesContent":["import React from 'react';\nimport { cx } from '@elliemae/ds-utilities';\nimport DSSeparator from '@elliemae/ds-separator';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { dataGridBlockName } from '../../blockNames';\n\nconst blockName = `${dataGridBlockName}-expanded-row`;\n\nconst DetailsWrapper = aggregatedClasses('div')(`${blockName}-details-wrapper`, null, () => ({\n 'ie-flex-basis-auto': true,\n}));\n\nfunction ExpandedRowExtra({ children, rowData, rowProps, rowComponent: RowComponent, renderRowDetails = () => null }) {\n return (\n <RowComponent {...rowProps} className={cx(rowProps.className, 'expanded-detail-row')}>\n <RowComponent className=\"master-row-expanded\">{children}</RowComponent>\n <DSSeparator dashed margin=\"xs\" />\n <DetailsWrapper>{renderRowDetails({ rowData })}</DetailsWrapper>\n </RowComponent>\n );\n}\n\nexport default ExpandedRowExtra;\n"],"names":["blockName","dataGridBlockName","DetailsWrapper","aggregatedClasses","ExpandedRowExtra","children","rowData","rowProps","RowComponent","rowComponent","renderRowDetails","React","cx","className","DSSeparator"],"mappings":";;;;;;;;;;;;;;;AAMA,IAAMA,SAAS,aAAMC,4BAAN,kBAAf;AAEA,IAAMC,cAAc,GAAGC,8BAAiB,CAAC,KAAD,CAAjB,WAA4BH,SAA5B,uBAAyD,IAAzD,EAA+D;AAAA,SAAO;AAC3F,0BAAsB;AADqE,GAAP;AAAA,CAA/D,CAAvB;;AAIA,SAASI,gBAAT,OAAsH;AAAA,MAA1FC,QAA0F,QAA1FA,QAA0F;AAAA,MAAhFC,OAAgF,QAAhFA,OAAgF;AAAA,MAAvEC,QAAuE,QAAvEA,QAAuE;AAAA,MAA/CC,YAA+C,QAA7DC,YAA6D;AAAA,mCAAjCC,gBAAiC;AAAA,MAAjCA,gBAAiC,sCAAd;AAAA,WAAM,IAAN;AAAA,GAAc;AACpH,sBACEC,wCAAC,YAAD,mCAAkBJ,QAAlB;AAA4B,IAAA,SAAS,EAAEK,cAAE,CAACL,QAAQ,CAACM,SAAV,EAAqB,qBAArB;AAAzC,mBACEF,wCAAC,YAAD;AAAc,IAAA,SAAS,EAAC;AAAxB,KAA+CN,QAA/C,CADF,eAEEM,wCAACG,+BAAD;AAAa,IAAA,MAAM,MAAnB;AAAoB,IAAA,MAAM,EAAC;AAA3B,IAFF,eAGEH,wCAAC,cAAD,QAAiBD,gBAAgB,CAAC;AAAEJ,IAAAA,OAAO,EAAPA;AAAF,GAAD,CAAjC,CAHF,CADF;AAOD;;;;"}
|
|
@@ -8,39 +8,36 @@ require('@babel/runtime/helpers/objectWithoutProperties');
|
|
|
8
8
|
require('@babel/runtime/helpers/toConsumableArray');
|
|
9
9
|
require('@babel/runtime/helpers/defineProperty');
|
|
10
10
|
require('react');
|
|
11
|
-
require('@elliemae/ds-utilities
|
|
11
|
+
require('@elliemae/ds-utilities');
|
|
12
12
|
require('react-window');
|
|
13
|
-
require('@elliemae/ds-icons
|
|
14
|
-
require('@elliemae/ds-
|
|
15
|
-
require('@elliemae/ds-basic/Button');
|
|
13
|
+
require('@elliemae/ds-icons');
|
|
14
|
+
require('@elliemae/ds-button');
|
|
16
15
|
require('@elliemae/ds-shared/createDataInstance/createInstancePlugin');
|
|
17
16
|
require('@elliemae/ds-shared/useDataGrid/initColumnDefinition');
|
|
18
17
|
require('./ExpandedRow.js');
|
|
19
|
-
require('@elliemae/ds-
|
|
18
|
+
require('@elliemae/ds-separator');
|
|
20
19
|
require('styled-components');
|
|
21
20
|
require('@elliemae/ds-shared/defer-render-hoc');
|
|
22
21
|
require('@elliemae/ds-shared/useDataGrid');
|
|
23
22
|
require('../pagination/PaginationPlugin.js');
|
|
24
23
|
require('@babel/runtime/helpers/extends');
|
|
25
|
-
require('@elliemae/ds-utilities/system');
|
|
26
24
|
require('@elliemae/ds-shared/FocusGroup/FocusGrid');
|
|
27
25
|
require('../pagination/helper.js');
|
|
28
26
|
require('../pagination/usePaginationState.js');
|
|
29
27
|
require('@babel/runtime/helpers/slicedToArray');
|
|
30
|
-
require('@elliemae/ds-utilities/hooks/useDerivedStateFromProps');
|
|
31
28
|
require('../../components/NoResults.js');
|
|
32
29
|
require('@elliemae/ds-system');
|
|
33
30
|
require('../../components/BodyCell.js');
|
|
34
31
|
require('prop-types');
|
|
35
32
|
require('@elliemae/ds-shared/createDataInstance/utils');
|
|
36
|
-
require('@elliemae/ds-
|
|
37
|
-
require('../../index-
|
|
33
|
+
require('@elliemae/ds-truncated-tooltip-text');
|
|
34
|
+
require('../../index-0be12eb8.js');
|
|
38
35
|
require('../../components/renderers/defaultClassedRenderers.js');
|
|
39
36
|
require('@elliemae/ds-classnames');
|
|
40
37
|
require('../../blockNames.js');
|
|
41
38
|
require('../../components/renderers/renderRowsLoader.js');
|
|
42
39
|
require('../../components/RowsLoader.js');
|
|
43
|
-
require('@elliemae/ds-
|
|
40
|
+
require('@elliemae/ds-spinner');
|
|
44
41
|
require('../../components/TableBody.js');
|
|
45
42
|
require('../../components/tableContext.js');
|
|
46
43
|
require('../../components/Table.js');
|
|
@@ -54,13 +51,11 @@ require('../../utilities/getScrollbarSize.js');
|
|
|
54
51
|
require('../column-sizing/useColumnSizeService.js');
|
|
55
52
|
require('../column-sizing/utils.js');
|
|
56
53
|
require('../column-sizing/ext-points/getTableProps.js');
|
|
57
|
-
require('@elliemae/ds-utilities/hooks/useResizeObserver');
|
|
58
54
|
require('../column-sizing/ext-points/decorateColumn.js');
|
|
59
55
|
require('../column-sizing/columnMeasurerTransformer.js');
|
|
60
56
|
require('./ExpandedRowExtra.js');
|
|
61
57
|
require('../../rowSizes.js');
|
|
62
58
|
require('./useExpandGridState.js');
|
|
63
|
-
require('@elliemae/ds-utilities/hooks/useExpandState');
|
|
64
59
|
|
|
65
60
|
|
|
66
61
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -3,14 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
6
|
-
var
|
|
7
|
-
var useExpandState = require('@elliemae/ds-utilities/hooks/useExpandState');
|
|
6
|
+
var dsUtilities = require('@elliemae/ds-utilities');
|
|
8
7
|
var React = require('react');
|
|
9
8
|
|
|
10
9
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
10
|
|
|
12
11
|
var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
|
|
13
|
-
var useExpandState__default = /*#__PURE__*/_interopDefaultLegacy(useExpandState);
|
|
14
12
|
|
|
15
13
|
var useExpandGridState = function useExpandGridState(grid) {
|
|
16
14
|
var composedRows = grid.composedRows,
|
|
@@ -26,7 +24,7 @@ var useExpandGridState = function useExpandGridState(grid) {
|
|
|
26
24
|
onToggleExpand = _grid$props.onToggleExpand,
|
|
27
25
|
onCollapseRow = _grid$props.onCollapseRow;
|
|
28
26
|
|
|
29
|
-
var _useExpandState =
|
|
27
|
+
var _useExpandState = dsUtilities.useExpandState({
|
|
30
28
|
items: composedRows,
|
|
31
29
|
itemKey: rowKey,
|
|
32
30
|
expanded: expandedRowsProp,
|
|
@@ -61,7 +59,7 @@ var useExpandGridState = function useExpandGridState(grid) {
|
|
|
61
59
|
};
|
|
62
60
|
|
|
63
61
|
var toggleShowAllRows = function toggleShowAllRows(row) {
|
|
64
|
-
if (
|
|
62
|
+
if (dsUtilities.isFunction(onToggleShowAllRows)) {
|
|
65
63
|
onToggleShowAllRows(row);
|
|
66
64
|
} else {
|
|
67
65
|
var key = row[rowKey];
|