@elliemae/ds-datagrids 2.2.0-alpha.4 → 3.0.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/DSDataGrid.js +635 -395
- package/cjs/DataGridImpl.js +128 -103
- package/cjs/PaginatedDataGrid.js +68 -68
- package/cjs/blockNames.js +11 -39
- package/cjs/columns/IconColumn.js +62 -78
- package/cjs/columns/NumberColumn.js +5 -35
- package/cjs/components/BodyCell.js +80 -83
- package/cjs/components/BodyList.js +52 -52
- package/cjs/components/ColumnVisibilityMenuOption.js +31 -53
- package/cjs/components/ColumnsOptionsMenuSection.js +44 -59
- package/cjs/components/EmptyState.js +50 -81
- package/cjs/components/HeaderCell.js +58 -64
- package/cjs/components/List.js +29 -41
- package/cjs/components/ListItem.js +36 -43
- package/cjs/components/NoResults.js +51 -55
- package/cjs/components/RowsLoader.js +22 -42
- package/cjs/components/Table.js +87 -78
- package/cjs/components/TableBody.js +60 -61
- package/cjs/components/TableHeader.js +30 -47
- package/cjs/components/footer/addOptionalFooterComponents.js +43 -53
- package/cjs/components/header/PrimaryControls.js +35 -49
- package/cjs/components/header/addOptionalHeaderComponents.js +43 -54
- package/cjs/components/index.js +17 -43
- package/cjs/components/renderers/defaultClassedRenderers.js +57 -64
- package/cjs/components/renderers/index.js +17 -44
- package/cjs/components/renderers/renderRowsLoader.js +18 -39
- package/cjs/components/tableContext.js +13 -36
- package/cjs/defaultPlugins.js +12 -44
- package/cjs/index.js +67 -72
- package/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +114 -102
- package/cjs/plugins/body-header-scroll-sync/index.js +9 -35
- package/cjs/plugins/column-dnd/DndColumnsPlugin.js +86 -107
- package/cjs/plugins/column-dnd/decorateGridWithDndColumns.js +27 -43
- package/cjs/plugins/column-dnd/index.js +9 -35
- package/cjs/plugins/column-sizing/ColumnSizingPlugin.js +55 -59
- package/cjs/plugins/column-sizing/columnMeasurerTransformer.js +53 -48
- package/cjs/plugins/column-sizing/ext-points/decorateColumn.js +13 -40
- package/cjs/plugins/column-sizing/ext-points/getTableProps.js +54 -55
- package/cjs/plugins/column-sizing/getColumnNameFromProperty.js +9 -37
- package/cjs/plugins/column-sizing/index.js +9 -35
- package/cjs/plugins/column-sizing/useColumnSizeService.js +86 -72
- package/cjs/plugins/column-sizing/useStylesheetHelpers.js +199 -96
- package/cjs/plugins/column-sizing/utils.js +29 -52
- package/cjs/plugins/custom-cell-renderer/CustomRendererPlugin.js +16 -38
- package/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js +56 -61
- package/cjs/plugins/custom-cell-renderer/getRendererComponent.js +60 -58
- package/cjs/plugins/custom-cell-renderer/index.js +9 -35
- package/cjs/plugins/editable/EditableComponents/ComboBox.js +53 -50
- package/cjs/plugins/editable/EditableComponents/TextBox.js +76 -56
- package/cjs/plugins/editable/EditableComponents/index.js +11 -37
- package/cjs/plugins/editable/EditablePlugin.js +75 -60
- package/cjs/plugins/editable/decorateEditable.js +98 -61
- package/cjs/plugins/editable/getEditorComponent.js +76 -70
- package/cjs/plugins/editable/index.js +13 -38
- package/cjs/plugins/expandable-grid/ExpandableColumn.js +144 -112
- package/cjs/plugins/expandable-grid/ExpandablePlugin.js +180 -118
- package/cjs/plugins/expandable-grid/ExpandedRow.js +139 -117
- package/cjs/plugins/expandable-grid/ExpandedRowExtra.js +52 -54
- package/cjs/plugins/expandable-grid/index.js +11 -37
- package/cjs/plugins/expandable-grid/useExpandGridState.js +31 -45
- package/cjs/plugins/export-data/ExportDataPlugin.js +116 -82
- package/cjs/plugins/export-data/index.js +12 -35
- package/cjs/plugins/filterable/FilterablePlugin.js +55 -54
- package/cjs/plugins/filterable/addFilterToColumn.js +28 -40
- package/cjs/plugins/filterable/components/FilterableHeader.js +107 -119
- package/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +116 -116
- package/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +73 -97
- package/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +132 -138
- package/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js +119 -115
- package/cjs/plugins/filterable/components/filterable-menus/defaultDateFormat.js +7 -35
- package/cjs/plugins/filterable/components/filterable-menus/getFilterMenuByType.js +15 -46
- package/cjs/plugins/filterable/filterableFormatter.js +51 -61
- package/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js +55 -60
- package/cjs/plugins/filterable/filtering-helper/strategiesOperators.js +22 -43
- package/cjs/plugins/filterable/helper.js +79 -68
- package/cjs/plugins/filterable/index.js +9 -35
- package/cjs/plugins/filterable/useFilterableState.js +66 -62
- package/cjs/plugins/grouping-by/GroupingByPlugin.js +23 -40
- package/cjs/plugins/grouping-grid/GroupingPlugin.js +109 -86
- package/cjs/plugins/grouping-grid/walkStrategy.js +26 -46
- package/cjs/plugins/index.js +48 -68
- package/cjs/plugins/infinite-scrolling/InfiniteScrollPlugin.js +88 -64
- package/cjs/plugins/infinite-scrolling/index.js +9 -35
- package/cjs/plugins/pagination/PaginationPlugin.js +90 -73
- package/cjs/plugins/pagination/components/Pagination.js +35 -54
- package/cjs/plugins/pagination/components/Paginator.js +44 -59
- package/cjs/plugins/pagination/components/PerPageDropdown.js +63 -51
- package/cjs/plugins/pagination/helper.js +24 -45
- package/cjs/plugins/pagination/index.js +9 -35
- package/cjs/plugins/pagination/usePaginationState.js +38 -46
- package/cjs/plugins/resizable/ResizablePlugin.js +55 -51
- package/cjs/plugins/resizable/decorateResizable.js +53 -49
- package/cjs/plugins/resizable/index.js +9 -35
- package/cjs/plugins/resizable/useResizeHandle.js +50 -56
- package/cjs/plugins/resizable/utils.js +28 -49
- package/cjs/plugins/row-dnd/DndRowsPlugin.js +82 -103
- package/cjs/plugins/row-dnd/index.js +9 -35
- package/cjs/plugins/selectable/SelectablePlugin.js +134 -101
- package/cjs/plugins/selectable/addSelectableColumn.js +68 -67
- package/cjs/plugins/selectable/helper.js +39 -50
- package/cjs/plugins/selectable/index.js +9 -35
- package/cjs/plugins/selectable/selectableFormatter.js +105 -83
- package/cjs/plugins/selectable/useSelectableState.js +94 -67
- package/cjs/plugins/sortable/SortablePlugin.js +76 -62
- package/cjs/plugins/sortable/checkIfSortable.js +14 -37
- package/cjs/plugins/sortable/index.js +9 -35
- package/cjs/plugins/sortable/sortHeaderFormatter.js +50 -56
- package/cjs/plugins/sortable/sortTree.js +47 -40
- package/cjs/plugins/sortable/sorter.js +172 -140
- package/cjs/plugins/sortable/useSortableState.js +79 -53
- package/cjs/plugins/toolbar/RowRenderer.js +76 -75
- package/cjs/plugins/toolbar/ToolbarPlugin.js +33 -49
- package/cjs/plugins/toolbar/ToolbarTrigger.js +70 -89
- package/cjs/plugins/toolbar/index.js +9 -35
- package/cjs/plugins/virtualization/AutoHeightList.js +52 -64
- package/cjs/plugins/virtualization/VirtualizationPlugin.js +97 -86
- package/cjs/plugins/virtualization/VirtualizedBody.js +155 -139
- package/cjs/plugins/virtualization/VirtualizedBodyRow.js +17 -39
- package/cjs/plugins/virtualization/helper.js +7 -35
- package/cjs/plugins/virtualization/index.js +9 -35
- package/cjs/renders/CellWithAddons.js +50 -98
- package/cjs/renders/index.js +11 -37
- package/cjs/renders/styled.js +27 -78
- package/cjs/rowSizes.js +12 -44
- package/cjs/utilities/getPluginsFromProps.js +39 -67
- package/cjs/utilities/getScrollbarSize.js +25 -44
- package/cjs/utilities/normalizeData.js +34 -44
- package/esm/DSDataGrid.js +597 -337
- package/esm/DataGridImpl.js +113 -68
- package/esm/PaginatedDataGrid.js +59 -39
- package/esm/blockNames.js +5 -10
- package/esm/columns/IconColumn.js +54 -49
- package/esm/columns/NumberColumn.js +3 -6
- package/esm/components/BodyCell.js +68 -51
- package/esm/components/BodyList.js +43 -23
- package/esm/components/ColumnVisibilityMenuOption.js +27 -24
- package/esm/components/ColumnsOptionsMenuSection.js +38 -30
- package/esm/components/EmptyState.js +40 -52
- package/esm/components/HeaderCell.js +48 -33
- package/esm/components/List.js +23 -12
- package/esm/components/ListItem.js +30 -14
- package/esm/components/NoResults.js +43 -26
- package/esm/components/RowsLoader.js +15 -13
- package/esm/components/Table.js +76 -45
- package/esm/components/TableBody.js +52 -32
- package/esm/components/TableHeader.js +23 -17
- package/esm/components/footer/addOptionalFooterComponents.js +37 -24
- package/esm/components/header/PrimaryControls.js +29 -20
- package/esm/components/header/addOptionalHeaderComponents.js +36 -25
- package/esm/components/index.js +5 -14
- package/esm/components/renderers/defaultClassedRenderers.js +46 -41
- package/esm/components/renderers/index.js +5 -16
- package/esm/components/renderers/renderRowsLoader.js +10 -10
- package/esm/components/tableContext.js +5 -7
- package/esm/defaultPlugins.js +8 -15
- package/esm/index.js +27 -63
- package/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +101 -71
- package/esm/plugins/body-header-scroll-sync/index.js +1 -6
- package/esm/plugins/column-dnd/DndColumnsPlugin.js +68 -69
- package/esm/plugins/column-dnd/decorateGridWithDndColumns.js +18 -16
- package/esm/plugins/column-dnd/index.js +1 -6
- package/esm/plugins/column-sizing/ColumnSizingPlugin.js +37 -20
- package/esm/plugins/column-sizing/columnMeasurerTransformer.js +42 -16
- package/esm/plugins/column-sizing/ext-points/decorateColumn.js +7 -9
- package/esm/plugins/column-sizing/ext-points/getTableProps.js +43 -23
- package/esm/plugins/column-sizing/getColumnNameFromProperty.js +7 -8
- package/esm/plugins/column-sizing/index.js +1 -6
- package/esm/plugins/column-sizing/useColumnSizeService.js +71 -34
- package/esm/plugins/column-sizing/useStylesheetHelpers.js +171 -64
- package/esm/plugins/column-sizing/utils.js +21 -23
- package/esm/plugins/custom-cell-renderer/CustomRendererPlugin.js +7 -8
- package/esm/plugins/custom-cell-renderer/addCustomRendererToCell.js +43 -28
- package/esm/plugins/custom-cell-renderer/getRendererComponent.js +44 -22
- package/esm/plugins/custom-cell-renderer/index.js +1 -6
- package/esm/plugins/editable/EditableComponents/ComboBox.js +46 -20
- package/esm/plugins/editable/EditableComponents/TextBox.js +68 -26
- package/esm/plugins/editable/EditableComponents/index.js +2 -8
- package/esm/plugins/editable/EditablePlugin.js +63 -27
- package/esm/plugins/editable/decorateEditable.js +68 -32
- package/esm/plugins/editable/getEditorComponent.js +66 -39
- package/esm/plugins/editable/index.js +3 -9
- package/esm/plugins/expandable-grid/ExpandableColumn.js +133 -82
- package/esm/plugins/expandable-grid/ExpandablePlugin.js +160 -81
- package/esm/plugins/expandable-grid/ExpandedRow.js +124 -86
- package/esm/plugins/expandable-grid/ExpandedRowExtra.js +44 -25
- package/esm/plugins/expandable-grid/index.js +2 -8
- package/esm/plugins/expandable-grid/useExpandGridState.js +25 -14
- package/esm/plugins/export-data/ExportDataPlugin.js +103 -52
- package/esm/plugins/export-data/index.js +1 -6
- package/esm/plugins/filterable/FilterablePlugin.js +44 -22
- package/esm/plugins/filterable/addFilterToColumn.js +20 -11
- package/esm/plugins/filterable/components/FilterableHeader.js +95 -85
- package/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +103 -83
- package/esm/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +63 -68
- package/esm/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +116 -108
- package/esm/plugins/filterable/components/filterable-menus/TextFilterMenu.js +106 -84
- package/esm/plugins/filterable/components/filterable-menus/defaultDateFormat.js +3 -6
- package/esm/plugins/filterable/components/filterable-menus/getFilterMenuByType.js +12 -16
- package/esm/plugins/filterable/filterableFormatter.js +45 -32
- package/esm/plugins/filterable/filtering-helper/filterRowsByQuery.js +44 -29
- package/esm/plugins/filterable/filtering-helper/strategiesOperators.js +13 -11
- package/esm/plugins/filterable/helper.js +62 -42
- package/esm/plugins/filterable/index.js +1 -6
- package/esm/plugins/filterable/useFilterableState.js +54 -33
- package/esm/plugins/grouping-by/GroupingByPlugin.js +14 -10
- package/esm/plugins/grouping-grid/GroupingPlugin.js +94 -53
- package/esm/plugins/grouping-grid/walkStrategy.js +22 -17
- package/esm/plugins/index.js +19 -39
- package/esm/plugins/infinite-scrolling/InfiniteScrollPlugin.js +74 -31
- package/esm/plugins/infinite-scrolling/index.js +1 -6
- package/esm/plugins/pagination/PaginationPlugin.js +75 -42
- package/esm/plugins/pagination/components/Pagination.js +27 -25
- package/esm/plugins/pagination/components/Paginator.js +35 -29
- package/esm/plugins/pagination/components/PerPageDropdown.js +54 -22
- package/esm/plugins/pagination/helper.js +19 -16
- package/esm/plugins/pagination/index.js +1 -6
- package/esm/plugins/pagination/usePaginationState.js +28 -15
- package/esm/plugins/resizable/ResizablePlugin.js +45 -20
- package/esm/plugins/resizable/decorateResizable.js +41 -19
- package/esm/plugins/resizable/index.js +1 -6
- package/esm/plugins/resizable/useResizeHandle.js +39 -24
- package/esm/plugins/resizable/utils.js +18 -20
- package/esm/plugins/row-dnd/DndRowsPlugin.js +71 -73
- package/esm/plugins/row-dnd/index.js +1 -6
- package/esm/plugins/selectable/SelectablePlugin.js +117 -64
- package/esm/plugins/selectable/addSelectableColumn.js +57 -39
- package/esm/plugins/selectable/helper.js +25 -19
- package/esm/plugins/selectable/index.js +1 -6
- package/esm/plugins/selectable/selectableFormatter.js +97 -54
- package/esm/plugins/selectable/useSelectableState.js +78 -34
- package/esm/plugins/sortable/SortablePlugin.js +43 -30
- package/esm/plugins/sortable/checkIfSortable.js +9 -8
- package/esm/plugins/sortable/index.js +1 -6
- package/esm/plugins/sortable/sortHeaderFormatter.js +43 -27
- package/esm/plugins/sortable/sortTree.js +24 -13
- package/esm/plugins/sortable/sorter.js +163 -112
- package/esm/plugins/sortable/useSortableState.js +49 -22
- package/esm/plugins/toolbar/RowRenderer.js +61 -40
- package/esm/plugins/toolbar/ToolbarPlugin.js +23 -19
- package/esm/plugins/toolbar/ToolbarTrigger.js +57 -59
- package/esm/plugins/toolbar/index.js +1 -6
- package/esm/plugins/virtualization/AutoHeightList.js +40 -30
- package/esm/plugins/virtualization/VirtualizationPlugin.js +84 -55
- package/esm/plugins/virtualization/VirtualizedBody.js +132 -94
- package/esm/plugins/virtualization/VirtualizedBodyRow.js +15 -10
- package/esm/plugins/virtualization/helper.js +3 -6
- package/esm/plugins/virtualization/index.js +1 -6
- package/esm/renders/CellWithAddons.js +40 -69
- package/esm/renders/index.js +2 -8
- package/esm/renders/styled.js +16 -49
- package/esm/rowSizes.js +6 -15
- package/esm/utilities/getPluginsFromProps.js +24 -25
- package/esm/utilities/getScrollbarSize.js +21 -15
- package/esm/utilities/normalizeData.js +24 -15
- package/package.json +20 -20
- package/types/DSDataGrid.d.ts +1 -1
- package/types/DataGridImpl.d.ts +2 -3
- package/types/PaginatedDataGrid.d.ts +2 -1
- package/types/columns/IconColumn.d.ts +2 -3
- package/types/components/BodyCell.d.ts +12 -13
- package/types/components/ColumnVisibilityMenuOption.d.ts +2 -2
- package/types/components/ColumnsOptionsMenuSection.d.ts +0 -1
- package/types/components/HeaderCell.d.ts +10 -10
- package/types/components/NoResults.d.ts +2 -2
- package/types/components/RowsLoader.d.ts +2 -2
- package/types/components/Table.d.ts +11 -6
- package/types/components/TableBody.d.ts +8 -3
- package/types/components/TableHeader.d.ts +1 -2
- package/types/components/footer/addOptionalFooterComponents.d.ts +0 -1
- package/types/components/header/PrimaryControls.d.ts +0 -1
- package/types/components/header/addOptionalHeaderComponents.d.ts +1 -1
- package/types/components/renderers/index.d.ts +1 -1
- package/types/components/renderers/renderRowsLoader.d.ts +1 -1
- package/types/index.d.ts +8 -7
- package/types/plugins/body-header-scroll-sync/index.d.ts +1 -1
- package/types/plugins/column-dnd/index.d.ts +1 -1
- package/types/plugins/column-sizing/getColumnNameFromProperty.d.ts +1 -2
- package/types/plugins/column-sizing/index.d.ts +1 -1
- package/types/plugins/column-sizing/useColumnSizeService.d.ts +1 -2
- package/types/plugins/custom-cell-renderer/addCustomRendererToCell.d.ts +0 -1
- package/types/plugins/custom-cell-renderer/getRendererComponent.d.ts +0 -1
- package/types/plugins/custom-cell-renderer/index.d.ts +1 -1
- package/types/plugins/editable/EditableComponents/ComboBox.d.ts +1 -3
- package/types/plugins/editable/EditableComponents/TextBox.d.ts +1 -3
- package/types/plugins/editable/getEditorComponent.d.ts +0 -1
- package/types/plugins/editable/index.d.ts +2 -2
- package/types/plugins/expandable-grid/ExpandableColumn.d.ts +2 -3
- package/types/plugins/expandable-grid/ExpandedRow.d.ts +0 -1
- package/types/plugins/expandable-grid/ExpandedRowExtra.d.ts +0 -1
- package/types/plugins/expandable-grid/index.d.ts +2 -2
- package/types/plugins/export-data/index.d.ts +1 -1
- package/types/plugins/filterable/components/FilterableHeader.d.ts +15 -15
- package/types/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.d.ts +0 -1
- package/types/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.d.ts +0 -1
- package/types/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.d.ts +1 -2
- package/types/plugins/filterable/components/filterable-menus/TextFilterMenu.d.ts +0 -1
- package/types/plugins/filterable/components/filterable-menus/getFilterMenuByType.d.ts +1 -2
- package/types/plugins/filterable/filterableFormatter.d.ts +2 -3
- package/types/plugins/filterable/filtering-helper/filterRowsByQuery.d.ts +1 -2
- package/types/plugins/filterable/filtering-helper/strategiesOperators.d.ts +2 -2
- package/types/plugins/filterable/index.d.ts +1 -1
- package/types/plugins/index.d.ts +16 -16
- package/types/plugins/infinite-scrolling/index.d.ts +1 -1
- package/types/plugins/pagination/components/Paginator.d.ts +0 -1
- package/types/plugins/pagination/components/PerPageDropdown.d.ts +0 -1
- package/types/plugins/pagination/helper.d.ts +2 -3
- package/types/plugins/pagination/index.d.ts +1 -1
- package/types/plugins/resizable/index.d.ts +1 -1
- package/types/plugins/row-dnd/index.d.ts +1 -1
- package/types/plugins/selectable/index.d.ts +1 -1
- package/types/plugins/selectable/selectableFormatter.d.ts +0 -1
- package/types/plugins/sortable/index.d.ts +1 -1
- package/types/plugins/sortable/sortHeaderFormatter.d.ts +0 -1
- package/types/plugins/sortable/sortTree.d.ts +0 -1
- package/types/plugins/sortable/sorter.d.ts +1 -1
- package/types/plugins/toolbar/index.d.ts +1 -1
- package/types/plugins/virtualization/AutoHeightList.d.ts +1 -1
- package/types/plugins/virtualization/VirtualizedBody.d.ts +0 -1
- package/types/plugins/virtualization/VirtualizedBodyRow.d.ts +2 -2
- package/types/plugins/virtualization/index.d.ts +1 -1
- package/types/utilities/getPluginsFromProps.d.ts +1 -2
- package/cjs/DSDataGrid.js.map +0 -7
- package/cjs/DataGridImpl.js.map +0 -7
- package/cjs/PaginatedDataGrid.js.map +0 -7
- package/cjs/blockNames.js.map +0 -7
- package/cjs/columns/IconColumn.js.map +0 -7
- package/cjs/columns/NumberColumn.js.map +0 -7
- package/cjs/components/BodyCell.js.map +0 -7
- package/cjs/components/BodyList.js.map +0 -7
- package/cjs/components/ColumnVisibilityMenuOption.js.map +0 -7
- package/cjs/components/ColumnsOptionsMenuSection.js.map +0 -7
- package/cjs/components/EmptyState.js.map +0 -7
- package/cjs/components/HeaderCell.js.map +0 -7
- package/cjs/components/List.js.map +0 -7
- package/cjs/components/ListItem.js.map +0 -7
- package/cjs/components/NoResults.js.map +0 -7
- package/cjs/components/RowsLoader.js.map +0 -7
- package/cjs/components/Table.js.map +0 -7
- package/cjs/components/TableBody.js.map +0 -7
- package/cjs/components/TableHeader.js.map +0 -7
- package/cjs/components/footer/addOptionalFooterComponents.js.map +0 -7
- package/cjs/components/header/PrimaryControls.js.map +0 -7
- package/cjs/components/header/addOptionalHeaderComponents.js.map +0 -7
- package/cjs/components/index.js.map +0 -7
- package/cjs/components/renderers/defaultClassedRenderers.js.map +0 -7
- package/cjs/components/renderers/index.js.map +0 -7
- package/cjs/components/renderers/renderRowsLoader.js.map +0 -7
- package/cjs/components/tableContext.js.map +0 -7
- package/cjs/defaultPlugins.js.map +0 -7
- package/cjs/index.js.map +0 -7
- package/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js.map +0 -7
- package/cjs/plugins/body-header-scroll-sync/index.js.map +0 -7
- package/cjs/plugins/column-dnd/DndColumnsPlugin.js.map +0 -7
- package/cjs/plugins/column-dnd/decorateGridWithDndColumns.js.map +0 -7
- package/cjs/plugins/column-dnd/index.js.map +0 -7
- package/cjs/plugins/column-sizing/ColumnSizingPlugin.js.map +0 -7
- package/cjs/plugins/column-sizing/columnMeasurerTransformer.js.map +0 -7
- package/cjs/plugins/column-sizing/ext-points/decorateColumn.js.map +0 -7
- package/cjs/plugins/column-sizing/ext-points/getTableProps.js.map +0 -7
- package/cjs/plugins/column-sizing/getColumnNameFromProperty.js.map +0 -7
- package/cjs/plugins/column-sizing/index.js.map +0 -7
- package/cjs/plugins/column-sizing/useColumnSizeService.js.map +0 -7
- package/cjs/plugins/column-sizing/useStylesheetHelpers.js.map +0 -7
- package/cjs/plugins/column-sizing/utils.js.map +0 -7
- package/cjs/plugins/custom-cell-renderer/CustomRendererPlugin.js.map +0 -7
- package/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js.map +0 -7
- package/cjs/plugins/custom-cell-renderer/getRendererComponent.js.map +0 -7
- package/cjs/plugins/custom-cell-renderer/index.js.map +0 -7
- package/cjs/plugins/editable/EditableComponents/ComboBox.js.map +0 -7
- package/cjs/plugins/editable/EditableComponents/TextBox.js.map +0 -7
- package/cjs/plugins/editable/EditableComponents/index.js.map +0 -7
- package/cjs/plugins/editable/EditablePlugin.js.map +0 -7
- package/cjs/plugins/editable/decorateEditable.js.map +0 -7
- package/cjs/plugins/editable/getEditorComponent.js.map +0 -7
- package/cjs/plugins/editable/index.js.map +0 -7
- package/cjs/plugins/expandable-grid/ExpandableColumn.js.map +0 -7
- package/cjs/plugins/expandable-grid/ExpandablePlugin.js.map +0 -7
- package/cjs/plugins/expandable-grid/ExpandedRow.js.map +0 -7
- package/cjs/plugins/expandable-grid/ExpandedRowExtra.js.map +0 -7
- package/cjs/plugins/expandable-grid/index.js.map +0 -7
- package/cjs/plugins/expandable-grid/useExpandGridState.js.map +0 -7
- package/cjs/plugins/export-data/ExportDataPlugin.js.map +0 -7
- package/cjs/plugins/export-data/index.js.map +0 -7
- package/cjs/plugins/filterable/FilterablePlugin.js.map +0 -7
- package/cjs/plugins/filterable/addFilterToColumn.js.map +0 -7
- package/cjs/plugins/filterable/components/FilterableHeader.js.map +0 -7
- package/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js.map +0 -7
- package/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js.map +0 -7
- package/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js.map +0 -7
- package/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js.map +0 -7
- package/cjs/plugins/filterable/components/filterable-menus/defaultDateFormat.js.map +0 -7
- package/cjs/plugins/filterable/components/filterable-menus/getFilterMenuByType.js.map +0 -7
- package/cjs/plugins/filterable/filterableFormatter.js.map +0 -7
- package/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js.map +0 -7
- package/cjs/plugins/filterable/filtering-helper/strategiesOperators.js.map +0 -7
- package/cjs/plugins/filterable/helper.js.map +0 -7
- package/cjs/plugins/filterable/index.js.map +0 -7
- package/cjs/plugins/filterable/useFilterableState.js.map +0 -7
- package/cjs/plugins/grouping-by/GroupingByPlugin.js.map +0 -7
- package/cjs/plugins/grouping-grid/GroupingPlugin.js.map +0 -7
- package/cjs/plugins/grouping-grid/walkStrategy.js.map +0 -7
- package/cjs/plugins/index.js.map +0 -7
- package/cjs/plugins/infinite-scrolling/InfiniteScrollPlugin.js.map +0 -7
- package/cjs/plugins/infinite-scrolling/index.js.map +0 -7
- package/cjs/plugins/pagination/PaginationPlugin.js.map +0 -7
- package/cjs/plugins/pagination/components/Pagination.js.map +0 -7
- package/cjs/plugins/pagination/components/Paginator.js.map +0 -7
- package/cjs/plugins/pagination/components/PerPageDropdown.js.map +0 -7
- package/cjs/plugins/pagination/helper.js.map +0 -7
- package/cjs/plugins/pagination/index.js.map +0 -7
- package/cjs/plugins/pagination/usePaginationState.js.map +0 -7
- package/cjs/plugins/resizable/ResizablePlugin.js.map +0 -7
- package/cjs/plugins/resizable/decorateResizable.js.map +0 -7
- package/cjs/plugins/resizable/index.js.map +0 -7
- package/cjs/plugins/resizable/useResizeHandle.js.map +0 -7
- package/cjs/plugins/resizable/utils.js.map +0 -7
- package/cjs/plugins/row-dnd/DndRowsPlugin.js.map +0 -7
- package/cjs/plugins/row-dnd/index.js.map +0 -7
- package/cjs/plugins/selectable/SelectablePlugin.js.map +0 -7
- package/cjs/plugins/selectable/addSelectableColumn.js.map +0 -7
- package/cjs/plugins/selectable/helper.js.map +0 -7
- package/cjs/plugins/selectable/index.js.map +0 -7
- package/cjs/plugins/selectable/selectableFormatter.js.map +0 -7
- package/cjs/plugins/selectable/useSelectableState.js.map +0 -7
- package/cjs/plugins/sortable/SortablePlugin.js.map +0 -7
- package/cjs/plugins/sortable/checkIfSortable.js.map +0 -7
- package/cjs/plugins/sortable/index.js.map +0 -7
- package/cjs/plugins/sortable/sortHeaderFormatter.js.map +0 -7
- package/cjs/plugins/sortable/sortTree.js.map +0 -7
- package/cjs/plugins/sortable/sorter.js.map +0 -7
- package/cjs/plugins/sortable/useSortableState.js.map +0 -7
- package/cjs/plugins/toolbar/RowRenderer.js.map +0 -7
- package/cjs/plugins/toolbar/ToolbarPlugin.js.map +0 -7
- package/cjs/plugins/toolbar/ToolbarTrigger.js.map +0 -7
- package/cjs/plugins/toolbar/index.js.map +0 -7
- package/cjs/plugins/virtualization/AutoHeightList.js.map +0 -7
- package/cjs/plugins/virtualization/VirtualizationPlugin.js.map +0 -7
- package/cjs/plugins/virtualization/VirtualizedBody.js.map +0 -7
- package/cjs/plugins/virtualization/VirtualizedBodyRow.js.map +0 -7
- package/cjs/plugins/virtualization/helper.js.map +0 -7
- package/cjs/plugins/virtualization/index.js.map +0 -7
- package/cjs/renders/CellWithAddons.js.map +0 -7
- package/cjs/renders/index.js.map +0 -7
- package/cjs/renders/styled.js.map +0 -7
- package/cjs/rowSizes.js.map +0 -7
- package/cjs/utilities/DataGridUtilities.json +0 -1315
- package/cjs/utilities/getPluginsFromProps.js.map +0 -7
- package/cjs/utilities/getScrollbarSize.js.map +0 -7
- package/cjs/utilities/normalizeData.js.map +0 -7
- package/esm/DSDataGrid.js.map +0 -7
- package/esm/DataGridImpl.js.map +0 -7
- package/esm/PaginatedDataGrid.js.map +0 -7
- package/esm/blockNames.js.map +0 -7
- package/esm/columns/IconColumn.js.map +0 -7
- package/esm/columns/NumberColumn.js.map +0 -7
- package/esm/components/BodyCell.js.map +0 -7
- package/esm/components/BodyList.js.map +0 -7
- package/esm/components/ColumnVisibilityMenuOption.js.map +0 -7
- package/esm/components/ColumnsOptionsMenuSection.js.map +0 -7
- package/esm/components/EmptyState.js.map +0 -7
- package/esm/components/HeaderCell.js.map +0 -7
- package/esm/components/List.js.map +0 -7
- package/esm/components/ListItem.js.map +0 -7
- package/esm/components/NoResults.js.map +0 -7
- package/esm/components/RowsLoader.js.map +0 -7
- package/esm/components/Table.js.map +0 -7
- package/esm/components/TableBody.js.map +0 -7
- package/esm/components/TableHeader.js.map +0 -7
- package/esm/components/footer/addOptionalFooterComponents.js.map +0 -7
- package/esm/components/header/PrimaryControls.js.map +0 -7
- package/esm/components/header/addOptionalHeaderComponents.js.map +0 -7
- package/esm/components/index.js.map +0 -7
- package/esm/components/renderers/defaultClassedRenderers.js.map +0 -7
- package/esm/components/renderers/index.js.map +0 -7
- package/esm/components/renderers/renderRowsLoader.js.map +0 -7
- package/esm/components/tableContext.js.map +0 -7
- package/esm/defaultPlugins.js.map +0 -7
- package/esm/index.js.map +0 -7
- package/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js.map +0 -7
- package/esm/plugins/body-header-scroll-sync/index.js.map +0 -7
- package/esm/plugins/column-dnd/DndColumnsPlugin.js.map +0 -7
- package/esm/plugins/column-dnd/decorateGridWithDndColumns.js.map +0 -7
- package/esm/plugins/column-dnd/index.js.map +0 -7
- package/esm/plugins/column-sizing/ColumnSizingPlugin.js.map +0 -7
- package/esm/plugins/column-sizing/columnMeasurerTransformer.js.map +0 -7
- package/esm/plugins/column-sizing/ext-points/decorateColumn.js.map +0 -7
- package/esm/plugins/column-sizing/ext-points/getTableProps.js.map +0 -7
- package/esm/plugins/column-sizing/getColumnNameFromProperty.js.map +0 -7
- package/esm/plugins/column-sizing/index.js.map +0 -7
- package/esm/plugins/column-sizing/useColumnSizeService.js.map +0 -7
- package/esm/plugins/column-sizing/useStylesheetHelpers.js.map +0 -7
- package/esm/plugins/column-sizing/utils.js.map +0 -7
- package/esm/plugins/custom-cell-renderer/CustomRendererPlugin.js.map +0 -7
- package/esm/plugins/custom-cell-renderer/addCustomRendererToCell.js.map +0 -7
- package/esm/plugins/custom-cell-renderer/getRendererComponent.js.map +0 -7
- package/esm/plugins/custom-cell-renderer/index.js.map +0 -7
- package/esm/plugins/editable/EditableComponents/ComboBox.js.map +0 -7
- package/esm/plugins/editable/EditableComponents/TextBox.js.map +0 -7
- package/esm/plugins/editable/EditableComponents/index.js.map +0 -7
- package/esm/plugins/editable/EditablePlugin.js.map +0 -7
- package/esm/plugins/editable/decorateEditable.js.map +0 -7
- package/esm/plugins/editable/getEditorComponent.js.map +0 -7
- package/esm/plugins/editable/index.js.map +0 -7
- package/esm/plugins/expandable-grid/ExpandableColumn.js.map +0 -7
- package/esm/plugins/expandable-grid/ExpandablePlugin.js.map +0 -7
- package/esm/plugins/expandable-grid/ExpandedRow.js.map +0 -7
- package/esm/plugins/expandable-grid/ExpandedRowExtra.js.map +0 -7
- package/esm/plugins/expandable-grid/index.js.map +0 -7
- package/esm/plugins/expandable-grid/useExpandGridState.js.map +0 -7
- package/esm/plugins/export-data/ExportDataPlugin.js.map +0 -7
- package/esm/plugins/export-data/index.js.map +0 -7
- package/esm/plugins/filterable/FilterablePlugin.js.map +0 -7
- package/esm/plugins/filterable/addFilterToColumn.js.map +0 -7
- package/esm/plugins/filterable/components/FilterableHeader.js.map +0 -7
- package/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js.map +0 -7
- package/esm/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js.map +0 -7
- package/esm/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js.map +0 -7
- package/esm/plugins/filterable/components/filterable-menus/TextFilterMenu.js.map +0 -7
- package/esm/plugins/filterable/components/filterable-menus/defaultDateFormat.js.map +0 -7
- package/esm/plugins/filterable/components/filterable-menus/getFilterMenuByType.js.map +0 -7
- package/esm/plugins/filterable/filterableFormatter.js.map +0 -7
- package/esm/plugins/filterable/filtering-helper/filterRowsByQuery.js.map +0 -7
- package/esm/plugins/filterable/filtering-helper/strategiesOperators.js.map +0 -7
- package/esm/plugins/filterable/helper.js.map +0 -7
- package/esm/plugins/filterable/index.js.map +0 -7
- package/esm/plugins/filterable/useFilterableState.js.map +0 -7
- package/esm/plugins/grouping-by/GroupingByPlugin.js.map +0 -7
- package/esm/plugins/grouping-grid/GroupingPlugin.js.map +0 -7
- package/esm/plugins/grouping-grid/walkStrategy.js.map +0 -7
- package/esm/plugins/index.js.map +0 -7
- package/esm/plugins/infinite-scrolling/InfiniteScrollPlugin.js.map +0 -7
- package/esm/plugins/infinite-scrolling/index.js.map +0 -7
- package/esm/plugins/pagination/PaginationPlugin.js.map +0 -7
- package/esm/plugins/pagination/components/Pagination.js.map +0 -7
- package/esm/plugins/pagination/components/Paginator.js.map +0 -7
- package/esm/plugins/pagination/components/PerPageDropdown.js.map +0 -7
- package/esm/plugins/pagination/helper.js.map +0 -7
- package/esm/plugins/pagination/index.js.map +0 -7
- package/esm/plugins/pagination/usePaginationState.js.map +0 -7
- package/esm/plugins/resizable/ResizablePlugin.js.map +0 -7
- package/esm/plugins/resizable/decorateResizable.js.map +0 -7
- package/esm/plugins/resizable/index.js.map +0 -7
- package/esm/plugins/resizable/useResizeHandle.js.map +0 -7
- package/esm/plugins/resizable/utils.js.map +0 -7
- package/esm/plugins/row-dnd/DndRowsPlugin.js.map +0 -7
- package/esm/plugins/row-dnd/index.js.map +0 -7
- package/esm/plugins/selectable/SelectablePlugin.js.map +0 -7
- package/esm/plugins/selectable/addSelectableColumn.js.map +0 -7
- package/esm/plugins/selectable/helper.js.map +0 -7
- package/esm/plugins/selectable/index.js.map +0 -7
- package/esm/plugins/selectable/selectableFormatter.js.map +0 -7
- package/esm/plugins/selectable/useSelectableState.js.map +0 -7
- package/esm/plugins/sortable/SortablePlugin.js.map +0 -7
- package/esm/plugins/sortable/checkIfSortable.js.map +0 -7
- package/esm/plugins/sortable/index.js.map +0 -7
- package/esm/plugins/sortable/sortHeaderFormatter.js.map +0 -7
- package/esm/plugins/sortable/sortTree.js.map +0 -7
- package/esm/plugins/sortable/sorter.js.map +0 -7
- package/esm/plugins/sortable/useSortableState.js.map +0 -7
- package/esm/plugins/toolbar/RowRenderer.js.map +0 -7
- package/esm/plugins/toolbar/ToolbarPlugin.js.map +0 -7
- package/esm/plugins/toolbar/ToolbarTrigger.js.map +0 -7
- package/esm/plugins/toolbar/index.js.map +0 -7
- package/esm/plugins/virtualization/AutoHeightList.js.map +0 -7
- package/esm/plugins/virtualization/VirtualizationPlugin.js.map +0 -7
- package/esm/plugins/virtualization/VirtualizedBody.js.map +0 -7
- package/esm/plugins/virtualization/VirtualizedBodyRow.js.map +0 -7
- package/esm/plugins/virtualization/helper.js.map +0 -7
- package/esm/plugins/virtualization/index.js.map +0 -7
- package/esm/renders/CellWithAddons.js.map +0 -7
- package/esm/renders/index.js.map +0 -7
- package/esm/renders/styled.js.map +0 -7
- package/esm/rowSizes.js.map +0 -7
- package/esm/utilities/DataGridUtilities.json +0 -1315
- package/esm/utilities/getPluginsFromProps.js.map +0 -7
- package/esm/utilities/getScrollbarSize.js.map +0 -7
- package/esm/utilities/normalizeData.js.map +0 -7
|
@@ -1,124 +1,156 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
var
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
function ExpandableColumnCell({ label, description, isExpanded, expandableDetails, extraData, onToggleExpand }) {
|
|
50
|
-
const ref = (0, import_react.useRef)();
|
|
51
|
-
return /* @__PURE__ */ import_react.default.createElement(ExpandableColumnWrapper, {
|
|
52
|
-
ref,
|
|
53
|
-
tabindex: 0
|
|
54
|
-
}, /* @__PURE__ */ import_react.default.createElement(ExpandableMasterWrapper, {
|
|
55
|
-
style: { height: import_rowSizes.RowSizes.extend }
|
|
56
|
-
}, /* @__PURE__ */ import_react.default.createElement(import_ds_button.DSButton, {
|
|
57
|
-
buttonType: "text",
|
|
58
|
-
className: "expandable-arrow",
|
|
59
|
-
icon: isExpanded ? /* @__PURE__ */ import_react.default.createElement(import_ds_icons.ArrowheadDown, null) : /* @__PURE__ */ import_react.default.createElement(import_ds_icons.ArrowheadRight, null),
|
|
60
|
-
onClick: (e) => {
|
|
61
|
-
onToggleExpand(e);
|
|
62
|
-
if (ref && ref.current) {
|
|
63
|
-
ref.current.focus();
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
size: "s"
|
|
67
|
-
}), /* @__PURE__ */ import_react.default.createElement(LabelDescriptionWrapper, null, /* @__PURE__ */ import_react.default.createElement(Label, null, /* @__PURE__ */ import_react.default.createElement(import_ds_truncated_tooltip_text.DSTruncatedTooltipText, {
|
|
68
|
-
value: label
|
|
69
|
-
})), /* @__PURE__ */ import_react.default.createElement(Description, null, /* @__PURE__ */ import_react.default.createElement(import_ds_truncated_tooltip_text.DSTruncatedTooltipText, {
|
|
70
|
-
value: description
|
|
71
|
-
}))), /* @__PURE__ */ import_react.default.createElement(ExtraColumnData, null, extraData)), isExpanded && /* @__PURE__ */ import_react.default.createElement(ExpandableDetailsWrapper, null, expandableDetails));
|
|
72
|
-
}
|
|
73
|
-
const expandableColumnRenderer = ({ renderRowLabel, renderRowDescription, renderExtraData }) => (value, { rowData, isExpanded }, grid) => {
|
|
74
|
-
const {
|
|
75
|
-
props: { renderExpandedDetails },
|
|
76
|
-
actions: { toggleExpand }
|
|
77
|
-
} = grid.getInstance();
|
|
78
|
-
const expandableDetails = renderExpandedDetails({ rowData });
|
|
79
|
-
return /* @__PURE__ */ import_react.default.createElement(ExpandableColumnCell, {
|
|
80
|
-
description: renderRowDescription({ rowData }),
|
|
81
|
-
expandableDetails,
|
|
82
|
-
extraData: renderExtraData({ rowData }),
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
4
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
5
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
6
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
7
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
8
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
9
|
+
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
10
|
+
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
11
|
+
var React = require('react');
|
|
12
|
+
var dsIcons = require('@elliemae/ds-icons');
|
|
13
|
+
var dsClassnames = require('@elliemae/ds-classnames');
|
|
14
|
+
var DSButton = require('@elliemae/ds-button');
|
|
15
|
+
var DSTruncatedTooltipText = require('@elliemae/ds-truncated-tooltip-text');
|
|
16
|
+
var blockNames = require('../../blockNames.js');
|
|
17
|
+
var rowSizes = require('../../rowSizes.js');
|
|
18
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
19
|
+
|
|
20
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
21
|
+
|
|
22
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
23
|
+
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
24
|
+
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
25
|
+
var DSButton__default = /*#__PURE__*/_interopDefaultLegacy(DSButton);
|
|
26
|
+
var DSTruncatedTooltipText__default = /*#__PURE__*/_interopDefaultLegacy(DSTruncatedTooltipText);
|
|
27
|
+
|
|
28
|
+
const _excluded = ["property", "label", "renderRowLabel", "renderRowDescription", "renderExtraData", "width", "resizable", "sortable", "searchable", "customRenderer"];
|
|
29
|
+
|
|
30
|
+
var _ArrowheadDown, _ArrowheadRight;
|
|
31
|
+
|
|
32
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
33
|
+
|
|
34
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
35
|
+
const blockName = "".concat(blockNames.dataGridBlockName, "-expandable-column"); // todo: clean this when we move to css-js
|
|
36
|
+
|
|
37
|
+
const ExpandableColumnWrapper = dsClassnames.aggregatedClasses('div')(blockName);
|
|
38
|
+
const LabelDescriptionWrapper = dsClassnames.aggregatedClasses('div')(blockName, 'label-description-wrapper');
|
|
39
|
+
const Label = dsClassnames.aggregatedClasses('span')(blockName, 'label');
|
|
40
|
+
const Description = dsClassnames.aggregatedClasses('span')(blockName, 'description');
|
|
41
|
+
const ExtraColumnData = dsClassnames.aggregatedClasses('div')(blockName, 'extra-column-data');
|
|
42
|
+
const ExpandableMasterWrapper = dsClassnames.aggregatedClasses('div')("".concat(blockName, "-master-wrapper"));
|
|
43
|
+
const ExpandableDetailsWrapper = dsClassnames.aggregatedClasses('div')("".concat(blockName, "-details-wrapper"));
|
|
44
|
+
|
|
45
|
+
function ExpandableColumnCell(_ref) {
|
|
46
|
+
let {
|
|
47
|
+
label,
|
|
48
|
+
description,
|
|
83
49
|
isExpanded,
|
|
84
|
-
|
|
85
|
-
|
|
50
|
+
expandableDetails,
|
|
51
|
+
extraData,
|
|
52
|
+
onToggleExpand
|
|
53
|
+
} = _ref;
|
|
54
|
+
const ref = React.useRef();
|
|
55
|
+
return /*#__PURE__*/jsxRuntime.jsxs(ExpandableColumnWrapper, {
|
|
56
|
+
ref: ref,
|
|
57
|
+
tabindex: 0,
|
|
58
|
+
children: [/*#__PURE__*/_jsx__default["default"](ExpandableMasterWrapper, {
|
|
59
|
+
style: {
|
|
60
|
+
height: rowSizes.RowSizes.extend
|
|
61
|
+
}
|
|
62
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"](DSButton__default["default"], {
|
|
63
|
+
buttonType: "text",
|
|
64
|
+
className: "expandable-arrow",
|
|
65
|
+
icon: isExpanded ? _ArrowheadDown || (_ArrowheadDown = /*#__PURE__*/_jsx__default["default"](dsIcons.ArrowheadDown, {})) : _ArrowheadRight || (_ArrowheadRight = /*#__PURE__*/_jsx__default["default"](dsIcons.ArrowheadRight, {})),
|
|
66
|
+
onClick: e => {
|
|
67
|
+
onToggleExpand(e);
|
|
68
|
+
|
|
69
|
+
if (ref && ref.current) {
|
|
70
|
+
ref.current.focus();
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
size: "s"
|
|
74
|
+
}), /*#__PURE__*/_jsx__default["default"](LabelDescriptionWrapper, {}, void 0, /*#__PURE__*/_jsx__default["default"](Label, {}, void 0, /*#__PURE__*/_jsx__default["default"](DSTruncatedTooltipText__default["default"], {
|
|
75
|
+
value: label
|
|
76
|
+
})), /*#__PURE__*/_jsx__default["default"](Description, {}, void 0, /*#__PURE__*/_jsx__default["default"](DSTruncatedTooltipText__default["default"], {
|
|
77
|
+
value: description
|
|
78
|
+
}))), /*#__PURE__*/_jsx__default["default"](ExtraColumnData, {}, void 0, extraData)), isExpanded && /*#__PURE__*/_jsx__default["default"](ExpandableDetailsWrapper, {}, void 0, expandableDetails)]
|
|
86
79
|
});
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const expandableColumnRenderer = _ref2 => {
|
|
83
|
+
let {
|
|
84
|
+
renderRowLabel,
|
|
85
|
+
renderRowDescription,
|
|
86
|
+
renderExtraData
|
|
87
|
+
} = _ref2;
|
|
88
|
+
return (value, _ref3, grid) => {
|
|
89
|
+
let {
|
|
90
|
+
rowData,
|
|
91
|
+
isExpanded
|
|
92
|
+
} = _ref3;
|
|
93
|
+
const {
|
|
94
|
+
props: {
|
|
95
|
+
renderExpandedDetails
|
|
96
|
+
},
|
|
97
|
+
actions: {
|
|
98
|
+
toggleExpand
|
|
99
|
+
}
|
|
100
|
+
} = grid.getInstance();
|
|
101
|
+
const expandableDetails = renderExpandedDetails({
|
|
102
|
+
rowData
|
|
103
|
+
});
|
|
104
|
+
return /*#__PURE__*/_jsx__default["default"](ExpandableColumnCell, {
|
|
105
|
+
description: renderRowDescription({
|
|
106
|
+
rowData
|
|
107
|
+
}),
|
|
108
|
+
expandableDetails: expandableDetails,
|
|
109
|
+
extraData: renderExtraData({
|
|
110
|
+
rowData
|
|
111
|
+
}),
|
|
112
|
+
isExpanded: isExpanded,
|
|
113
|
+
label: renderRowLabel({
|
|
114
|
+
rowData
|
|
115
|
+
}),
|
|
116
|
+
onToggleExpand: () => toggleExpand(rowData)
|
|
117
|
+
});
|
|
118
|
+
};
|
|
87
119
|
};
|
|
120
|
+
|
|
88
121
|
const noop = () => null;
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
122
|
+
|
|
123
|
+
function createExpandableColumn(_ref4) {
|
|
124
|
+
let {
|
|
125
|
+
property,
|
|
126
|
+
label,
|
|
127
|
+
renderRowLabel = () => '----',
|
|
128
|
+
renderRowDescription = noop,
|
|
129
|
+
renderExtraData = noop,
|
|
130
|
+
width,
|
|
131
|
+
resizable,
|
|
132
|
+
sortable,
|
|
133
|
+
searchable,
|
|
134
|
+
customRenderer
|
|
135
|
+
} = _ref4,
|
|
136
|
+
rest = _objectWithoutProperties__default["default"](_ref4, _excluded);
|
|
137
|
+
|
|
138
|
+
return _objectSpread(_objectSpread({}, rest), {}, {
|
|
104
139
|
label,
|
|
105
140
|
property,
|
|
106
141
|
cell: {
|
|
107
|
-
formatters: [
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
})
|
|
113
|
-
]
|
|
142
|
+
formatters: [expandableColumnRenderer({
|
|
143
|
+
renderRowLabel,
|
|
144
|
+
renderRowDescription,
|
|
145
|
+
renderExtraData
|
|
146
|
+
})]
|
|
114
147
|
},
|
|
115
|
-
width: width ||
|
|
148
|
+
width: width || '50%',
|
|
116
149
|
expandableColumn: true,
|
|
117
150
|
resizable,
|
|
118
151
|
sortable,
|
|
119
152
|
searchable
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
module.exports =
|
|
124
|
-
//# sourceMappingURL=ExpandableColumn.js.map
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
module.exports = createExpandableColumn;
|
|
@@ -1,181 +1,243 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
6
|
+
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
7
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
8
|
+
require('core-js/modules/esnext.async-iterator.some.js');
|
|
9
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
10
|
+
require('core-js/modules/esnext.iterator.some.js');
|
|
11
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
12
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
13
|
+
require('core-js/modules/esnext.async-iterator.map.js');
|
|
14
|
+
require('core-js/modules/esnext.iterator.map.js');
|
|
15
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
16
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
17
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
18
|
+
var React = require('react');
|
|
19
|
+
var dsUtilities = require('@elliemae/ds-utilities');
|
|
20
|
+
var reactWindow = require('react-window');
|
|
21
|
+
var dsIcons = require('@elliemae/ds-icons');
|
|
22
|
+
var DSButton = require('@elliemae/ds-button');
|
|
23
|
+
var createInstancePlugin = require('@elliemae/ds-shared/createDataInstance/createInstancePlugin');
|
|
24
|
+
var initColumnDefinition = require('@elliemae/ds-shared/useDataGrid/initColumnDefinition');
|
|
25
|
+
var ExpandedRow = require('./ExpandedRow.js');
|
|
26
|
+
var ExpandedRowExtra = require('./ExpandedRowExtra.js');
|
|
27
|
+
var rowSizes = require('../../rowSizes.js');
|
|
28
|
+
var useExpandGridState = require('./useExpandGridState.js');
|
|
29
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
30
|
+
|
|
31
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
32
|
+
|
|
33
|
+
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
34
|
+
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
35
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
36
|
+
var DSButton__default = /*#__PURE__*/_interopDefaultLegacy(DSButton);
|
|
37
|
+
var createInstancePlugin__default = /*#__PURE__*/_interopDefaultLegacy(createInstancePlugin);
|
|
38
|
+
|
|
39
|
+
const _excluded = ["isExpanded"];
|
|
40
|
+
|
|
41
|
+
var _ArrowheadDown, _ArrowheadRight;
|
|
42
|
+
|
|
43
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
44
|
+
|
|
45
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
46
|
+
|
|
47
|
+
const getExpandedRowSizeBySubrows = _ref => {
|
|
48
|
+
let {
|
|
49
|
+
totalAmount,
|
|
50
|
+
amountVisible,
|
|
51
|
+
isShowingAll,
|
|
52
|
+
size = 36
|
|
53
|
+
} = _ref;
|
|
54
|
+
return isShowingAll ? size * (totalAmount + 1) - 6 : size * (amountVisible + 1) + 32;
|
|
11
55
|
};
|
|
12
|
-
|
|
13
|
-
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(module2))
|
|
15
|
-
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
-
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return target;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (module2, isNodeMode) => {
|
|
21
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
-
return (module2, temp) => {
|
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
-
};
|
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
-
var ExpandablePlugin_exports = {};
|
|
29
|
-
__export(ExpandablePlugin_exports, {
|
|
30
|
-
ExpandablePlugin: () => ExpandablePlugin
|
|
31
|
-
});
|
|
32
|
-
var React = __toESM(require("react"));
|
|
33
|
-
var import_react = __toESM(require("react"));
|
|
34
|
-
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
35
|
-
var import_react_window = require("react-window");
|
|
36
|
-
var import_ds_icons = require("@elliemae/ds-icons");
|
|
37
|
-
var import_ds_button = require("@elliemae/ds-button");
|
|
38
|
-
var import_createInstancePlugin = require("@elliemae/ds-shared/createDataInstance/createInstancePlugin");
|
|
39
|
-
var import_initColumnDefinition = require("@elliemae/ds-shared/useDataGrid/initColumnDefinition");
|
|
40
|
-
var import_ExpandedRow = require("./ExpandedRow");
|
|
41
|
-
var import_ExpandedRowExtra = require("./ExpandedRowExtra");
|
|
42
|
-
var import_rowSizes = require("../../rowSizes");
|
|
43
|
-
var import_useExpandGridState = require("./useExpandGridState");
|
|
44
|
-
const getExpandedRowSizeBySubrows = ({ totalAmount, amountVisible, isShowingAll, size = 36 }) => isShowingAll ? size * (totalAmount + 1) - 6 : size * (amountVisible + 1) + 32;
|
|
56
|
+
|
|
45
57
|
const ExpandedRows = {
|
|
46
|
-
SingleColumn:
|
|
47
|
-
Master:
|
|
58
|
+
SingleColumn: ExpandedRow,
|
|
59
|
+
Master: ExpandedRowExtra
|
|
48
60
|
};
|
|
49
|
-
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
61
|
+
|
|
62
|
+
const createExpandedRow = type => ExpandedRows[type] || ExpandedRows.Master;
|
|
63
|
+
|
|
64
|
+
const isExpandableSingleColumn = columns => columns.some(column => column.expandableColumn);
|
|
65
|
+
|
|
66
|
+
const ExpandablePlugin = createInstancePlugin__default["default"]('expandable', {
|
|
67
|
+
registerStateHook: useExpandGridState.useExpandGridState,
|
|
68
|
+
|
|
53
69
|
decorateGrid(grid) {
|
|
54
|
-
const {
|
|
55
|
-
|
|
56
|
-
|
|
70
|
+
const {
|
|
71
|
+
decoratedColumns,
|
|
72
|
+
columns
|
|
73
|
+
} = grid.getInstance();
|
|
74
|
+
const detailColumns = React.useMemo(() => decoratedColumns.map(column => _objectSpread(_objectSpread({}, column), {}, {
|
|
57
75
|
customRenderer: column.detailCustomRenderer
|
|
58
|
-
})).filter(
|
|
76
|
+
})).filter(col => !col.expandableColumn), [columns]);
|
|
59
77
|
return {
|
|
60
78
|
detailColumns
|
|
61
79
|
};
|
|
62
80
|
},
|
|
81
|
+
|
|
63
82
|
decorateColumns(columns, grid) {
|
|
64
|
-
if (isExpandableSingleColumn(columns))
|
|
65
|
-
|
|
66
|
-
const firstColumnIndex = columns.findIndex(
|
|
83
|
+
if (isExpandableSingleColumn(columns)) return columns; // get first column from user
|
|
84
|
+
|
|
85
|
+
const firstColumnIndex = columns.findIndex(column => column.isUserColumn);
|
|
67
86
|
const firstColumn = columns[firstColumnIndex];
|
|
68
87
|
firstColumn.formatExpandable = true;
|
|
69
|
-
return [
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
88
|
+
return [...columns.slice(0, firstColumnIndex), initColumnDefinition.appendCellFormatter((value, _ref2) => {
|
|
89
|
+
let {
|
|
90
|
+
isExpanded,
|
|
91
|
+
rowData
|
|
92
|
+
} = _ref2;
|
|
93
|
+
const {
|
|
94
|
+
actions: {
|
|
95
|
+
toggleExpand
|
|
96
|
+
}
|
|
97
|
+
} = grid.getInstance();
|
|
98
|
+
/*
|
|
99
|
+
* should return only 2 elements ../custom-cell-renderer/addCustomRendererToCell.js
|
|
100
|
+
* getRenderer it's checking that length to apply the custom render to value only
|
|
101
|
+
*/
|
|
102
|
+
|
|
103
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
104
|
+
children: [/*#__PURE__*/_jsx__default["default"](DSButton__default["default"], {
|
|
76
105
|
buttonType: "text",
|
|
77
106
|
className: "expandable-arrow",
|
|
78
|
-
icon: isExpanded ?
|
|
79
|
-
onClick:
|
|
107
|
+
icon: isExpanded ? _ArrowheadDown || (_ArrowheadDown = /*#__PURE__*/_jsx__default["default"](dsIcons.ArrowheadDown, {})) : _ArrowheadRight || (_ArrowheadRight = /*#__PURE__*/_jsx__default["default"](dsIcons.ArrowheadRight, {})),
|
|
108
|
+
onClick: e => {
|
|
80
109
|
e.stopPropagation();
|
|
81
110
|
toggleExpand(rowData);
|
|
82
111
|
},
|
|
83
112
|
size: "s"
|
|
84
|
-
}), value
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
];
|
|
113
|
+
}), value]
|
|
114
|
+
});
|
|
115
|
+
}, firstColumn), ...columns.slice(firstColumnIndex + 1)];
|
|
88
116
|
},
|
|
117
|
+
|
|
89
118
|
getBodyProps(bodyProps, grid) {
|
|
90
119
|
const {
|
|
91
120
|
composedRows: rows,
|
|
92
121
|
props: {
|
|
93
122
|
rowKey,
|
|
94
123
|
getChildrenRows,
|
|
95
|
-
rowSize =
|
|
96
|
-
subrowSize =
|
|
124
|
+
rowSize = 'normal',
|
|
125
|
+
subrowSize = 'normal',
|
|
97
126
|
getExpandedRowMinSize,
|
|
98
127
|
getExpandedRowSize,
|
|
99
128
|
expandableSubrowsVisible
|
|
100
129
|
},
|
|
101
|
-
state: {
|
|
130
|
+
state: {
|
|
131
|
+
expandedRows
|
|
132
|
+
}
|
|
102
133
|
} = grid.getInstance();
|
|
103
|
-
const rowSizePx =
|
|
104
|
-
const subrowSizePx =
|
|
105
|
-
const listRef =
|
|
106
|
-
|
|
107
|
-
if (listRef.current)
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
const getItemSize =
|
|
134
|
+
const rowSizePx = rowSizes.RowSizes[rowSize];
|
|
135
|
+
const subrowSizePx = rowSizes.RowSizes[subrowSize];
|
|
136
|
+
const listRef = React.useRef();
|
|
137
|
+
React.useEffect(() => {
|
|
138
|
+
if (listRef.current) listRef.current.resetAfterIndex(0, true);
|
|
139
|
+
}); // implementation of expandable row single column with aggregation
|
|
140
|
+
|
|
141
|
+
const getItemSize = index => {
|
|
111
142
|
const rowData = rows[index];
|
|
112
143
|
const key = rowData[rowKey];
|
|
113
|
-
const children = getChildrenRows({
|
|
114
|
-
|
|
144
|
+
const children = getChildrenRows({
|
|
145
|
+
rowData
|
|
146
|
+
});
|
|
147
|
+
const expandedSize = getExpandedRowSize ? getExpandedRowSize(index, {
|
|
148
|
+
rowData
|
|
149
|
+
}) // https://jira.elliemae.io/browse/PUI-1659
|
|
150
|
+
: getExpandedRowSizeBySubrows({
|
|
115
151
|
totalAmount: children.length,
|
|
116
152
|
amountVisible: children.length > expandableSubrowsVisible ? expandableSubrowsVisible : children.length,
|
|
117
153
|
isShowingAll: children.length < expandableSubrowsVisible || expandedRows[key] && expandedRows[key].showAllRows,
|
|
118
154
|
size: subrowSizePx
|
|
119
155
|
});
|
|
120
|
-
const expandedMinSize =
|
|
156
|
+
const expandedMinSize = dsUtilities.isFunction(getExpandedRowMinSize) && getExpandedRowMinSize(index); // eslint-disable-next-line no-nested-ternary
|
|
157
|
+
|
|
121
158
|
return expandedRows[key] ? expandedMinSize > expandedSize ? expandedMinSize : expandedSize : rowSizePx;
|
|
122
159
|
};
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
className:
|
|
126
|
-
listComponent:
|
|
127
|
-
listProps: {
|
|
128
|
-
|
|
160
|
+
|
|
161
|
+
return _objectSpread(_objectSpread({}, bodyProps), {}, {
|
|
162
|
+
className: dsUtilities.cx(bodyProps.className, 'expandable'),
|
|
163
|
+
listComponent: reactWindow.VariableSizeList,
|
|
164
|
+
listProps: {
|
|
165
|
+
ref: listRef,
|
|
166
|
+
itemSize: getItemSize
|
|
167
|
+
}
|
|
168
|
+
});
|
|
129
169
|
},
|
|
170
|
+
|
|
130
171
|
decorateRenderers(renderers, grid) {
|
|
131
172
|
const Row = renderers.body.row;
|
|
132
|
-
const Cell = renderers.body.cell;
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
173
|
+
const Cell = renderers.body.cell; // eslint-disable-next-line react/display-name
|
|
174
|
+
|
|
175
|
+
renderers.body.row = React.useMemo(() => {
|
|
176
|
+
// todo: the expandable grid should be created from another specific grid component
|
|
177
|
+
const expandedRowType = isExpandableSingleColumn(grid.decoratedColumns) ? 'SingleColumn' : 'Master';
|
|
178
|
+
const ExpandedRowComponent = createExpandedRow(expandedRowType); // eslint-disable-next-line react/display-name
|
|
179
|
+
|
|
180
|
+
return _ref3 => {
|
|
181
|
+
let {
|
|
182
|
+
isExpanded
|
|
183
|
+
} = _ref3,
|
|
184
|
+
rowProps = _objectWithoutProperties__default["default"](_ref3, _excluded);
|
|
185
|
+
|
|
137
186
|
if (isExpanded) {
|
|
138
187
|
const {
|
|
139
|
-
props: {
|
|
188
|
+
props: {
|
|
189
|
+
detailColumns,
|
|
190
|
+
getChildrenRows,
|
|
191
|
+
renderRowDetails
|
|
192
|
+
},
|
|
140
193
|
composedRows
|
|
141
|
-
} = grid.getInstance();
|
|
194
|
+
} = grid.getInstance(); // https://jira.elliemae.io/browse/PUI-1667
|
|
195
|
+
|
|
142
196
|
const rowData = composedRows[rowProps.index] ? composedRows[rowProps.index] : rowProps.rowData;
|
|
143
|
-
return
|
|
197
|
+
return /*#__PURE__*/_jsx__default["default"](ExpandedRowComponent, {
|
|
144
198
|
cellComponent: Cell,
|
|
145
|
-
detailColumns,
|
|
199
|
+
detailColumns: detailColumns,
|
|
146
200
|
parentGrid: grid,
|
|
147
|
-
renderRowDetails,
|
|
201
|
+
renderRowDetails: renderRowDetails,
|
|
148
202
|
rowComponent: Row,
|
|
149
|
-
rowData,
|
|
150
|
-
rowProps: {
|
|
203
|
+
rowData: rowData,
|
|
204
|
+
rowProps: _objectSpread({
|
|
151
205
|
rowData,
|
|
152
|
-
isExpanded
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
206
|
+
isExpanded
|
|
207
|
+
}, rowProps),
|
|
208
|
+
rows: getChildrenRows({
|
|
209
|
+
rowData
|
|
210
|
+
})
|
|
211
|
+
}, void 0, rowProps.children);
|
|
157
212
|
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
});
|
|
213
|
+
|
|
214
|
+
return /*#__PURE__*/jsxRuntime.jsx(Row, _objectSpread({}, rowProps));
|
|
161
215
|
};
|
|
162
216
|
}, []);
|
|
163
217
|
return renderers;
|
|
164
218
|
},
|
|
165
|
-
|
|
219
|
+
|
|
220
|
+
getRowProps(rowProps, grid, _ref4) {
|
|
221
|
+
let {
|
|
222
|
+
rowData
|
|
223
|
+
} = _ref4;
|
|
166
224
|
const {
|
|
167
|
-
props: {
|
|
168
|
-
|
|
225
|
+
props: {
|
|
226
|
+
rowKey
|
|
227
|
+
},
|
|
228
|
+
state: {
|
|
229
|
+
expandedRows
|
|
230
|
+
}
|
|
169
231
|
} = grid.getInstance();
|
|
170
232
|
const key = rowData[rowKey];
|
|
171
233
|
const isExpanded = !!expandedRows[key];
|
|
172
|
-
return {
|
|
173
|
-
|
|
174
|
-
className: (0, import_ds_utilities.cx)(rowProps.className, Object.keys(expandedRows).length > 0 && "expandable-row", isExpanded && "expanded"),
|
|
234
|
+
return _objectSpread(_objectSpread({}, rowProps), {}, {
|
|
235
|
+
className: dsUtilities.cx(rowProps.className, Object.keys(expandedRows).length > 0 && 'expandable-row', isExpanded && 'expanded'),
|
|
175
236
|
isExpanded,
|
|
176
237
|
showAllRows: expandedRows[key] && expandedRows[key].showAllRows
|
|
177
|
-
};
|
|
238
|
+
});
|
|
178
239
|
}
|
|
240
|
+
|
|
179
241
|
});
|
|
180
|
-
|
|
181
|
-
|
|
242
|
+
|
|
243
|
+
exports.ExpandablePlugin = ExpandablePlugin;
|