@elliemae/ds-datagrids 2.2.0-alpha.3 → 3.0.0-next.0
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
package/esm/DataGridImpl.js
CHANGED
|
@@ -1,38 +1,81 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
3
|
+
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
4
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
5
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
6
|
+
import 'core-js/modules/esnext.set.add-all.js';
|
|
7
|
+
import 'core-js/modules/esnext.set.delete-all.js';
|
|
8
|
+
import 'core-js/modules/esnext.set.difference.js';
|
|
9
|
+
import 'core-js/modules/esnext.set.every.js';
|
|
10
|
+
import 'core-js/modules/esnext.set.filter.js';
|
|
11
|
+
import 'core-js/modules/esnext.set.find.js';
|
|
12
|
+
import 'core-js/modules/esnext.set.intersection.js';
|
|
13
|
+
import 'core-js/modules/esnext.set.is-disjoint-from.js';
|
|
14
|
+
import 'core-js/modules/esnext.set.is-subset-of.js';
|
|
15
|
+
import 'core-js/modules/esnext.set.is-superset-of.js';
|
|
16
|
+
import 'core-js/modules/esnext.set.join.js';
|
|
17
|
+
import 'core-js/modules/esnext.set.map.js';
|
|
18
|
+
import 'core-js/modules/esnext.set.reduce.js';
|
|
19
|
+
import 'core-js/modules/esnext.set.some.js';
|
|
20
|
+
import 'core-js/modules/esnext.set.symmetric-difference.js';
|
|
21
|
+
import 'core-js/modules/esnext.set.union.js';
|
|
22
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
23
|
+
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
24
|
+
import 'core-js/modules/esnext.iterator.map.js';
|
|
25
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
26
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
27
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
28
|
+
import { useMemo } from 'react';
|
|
29
|
+
import { isFunction } from '@elliemae/ds-shared/utils';
|
|
30
|
+
import useDataGrid from '@elliemae/ds-shared/useDataGrid';
|
|
31
|
+
import Table from './components/Table.js';
|
|
32
|
+
import TableBody from './components/TableBody.js';
|
|
33
|
+
import TableHeader from './components/TableHeader.js';
|
|
34
|
+
import { defaultRenderers } from './components/renderers/index.js';
|
|
35
|
+
import { DatagridWrapper } from './components/renderers/defaultClassedRenderers.js';
|
|
36
|
+
import addOptionalFooterComponents from './components/footer/addOptionalFooterComponents.js';
|
|
37
|
+
import addOptionalHeaderComponents from './components/header/addOptionalHeaderComponents.js';
|
|
38
|
+
import { EmptyState } from './components/EmptyState.js';
|
|
39
|
+
import getPluginsFromProps from './utilities/getPluginsFromProps.js';
|
|
40
|
+
import { defaultPlugins } from './defaultPlugins.js';
|
|
41
|
+
import { normalizeRows } from './utilities/normalizeData.js';
|
|
42
|
+
import { jsxs } from 'react/jsx-runtime';
|
|
43
|
+
import { renderRowsLoader } from './components/renderers/renderRowsLoader.js';
|
|
44
|
+
|
|
45
|
+
var _EmptyState, _TableHeader;
|
|
46
|
+
|
|
47
|
+
const _excluded = ["className", "renderers", "columns", "rows", "containerProps", "plugins", "normalizeDataKeys"];
|
|
48
|
+
|
|
49
|
+
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; }
|
|
50
|
+
|
|
51
|
+
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(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; }
|
|
52
|
+
|
|
53
|
+
const isFluid = _ref => {
|
|
54
|
+
let {
|
|
55
|
+
autoHeight,
|
|
56
|
+
paginated,
|
|
57
|
+
numRowsVisible
|
|
58
|
+
} = _ref;
|
|
59
|
+
if (autoHeight) return false;
|
|
60
|
+
if (paginated) return false;
|
|
21
61
|
return !numRowsVisible;
|
|
22
62
|
};
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
63
|
+
|
|
64
|
+
function DataGridImpl(_ref2) {
|
|
65
|
+
let {
|
|
66
|
+
className,
|
|
67
|
+
renderers,
|
|
68
|
+
columns,
|
|
69
|
+
rows,
|
|
70
|
+
containerProps,
|
|
71
|
+
plugins: pluginsProp,
|
|
72
|
+
normalizeDataKeys
|
|
73
|
+
} = _ref2,
|
|
74
|
+
otherProps = _objectWithoutProperties(_ref2, _excluded);
|
|
75
|
+
|
|
33
76
|
const {
|
|
34
|
-
noResultsPlaceholder =
|
|
35
|
-
noColumnsPlaceholder =
|
|
77
|
+
noResultsPlaceholder = _EmptyState || (_EmptyState = /*#__PURE__*/_jsx(EmptyState, {})),
|
|
78
|
+
noColumnsPlaceholder = 'Please select one of more columns in order for data to be displayed.',
|
|
36
79
|
noResultsRender,
|
|
37
80
|
paginated,
|
|
38
81
|
height,
|
|
@@ -46,47 +89,48 @@ const DataGridImpl = ({
|
|
|
46
89
|
onDefaultFiltersLoad,
|
|
47
90
|
rowKey
|
|
48
91
|
} = otherProps;
|
|
49
|
-
const idKey = rowKey ||
|
|
50
|
-
const rowsIdsSet =
|
|
51
|
-
const rowsIds = rows.map(
|
|
52
|
-
if (row[idKey] ===
|
|
53
|
-
throw new Error("Missing id: each row must have an unique id");
|
|
92
|
+
const idKey = rowKey || 'id';
|
|
93
|
+
const rowsIdsSet = new Set();
|
|
94
|
+
const rowsIds = rows.map(row => {
|
|
95
|
+
if (row[idKey] === undefined) throw new Error('Missing id: each row must have an unique id');
|
|
54
96
|
rowsIdsSet.add(row[idKey]);
|
|
55
97
|
return row[idKey];
|
|
56
98
|
});
|
|
57
|
-
if (rowsIds.length !== rowsIdsSet.size)
|
|
58
|
-
|
|
59
|
-
const plugins = getPluginsFromProps({
|
|
60
|
-
...otherProps,
|
|
99
|
+
if (rowsIds.length !== rowsIdsSet.size) throw new Error('Repeated id: each row must have an unique id');
|
|
100
|
+
const plugins = getPluginsFromProps(_objectSpread(_objectSpread({}, otherProps), {}, {
|
|
61
101
|
virtualized: (!paginated || groupedRows) && !wrapText,
|
|
62
102
|
paginated: paginated && !groupedRows || wrapText,
|
|
63
103
|
sortable: sortable && !groupedRows
|
|
64
|
-
});
|
|
104
|
+
}));
|
|
105
|
+
|
|
65
106
|
if (normalizeDataKeys) {
|
|
66
107
|
normalizeRows(rows);
|
|
67
108
|
}
|
|
68
|
-
|
|
109
|
+
|
|
110
|
+
const grid = useDataGrid(_objectSpread({
|
|
69
111
|
columns,
|
|
70
112
|
rows,
|
|
71
113
|
renderers: defaultRenderers,
|
|
72
|
-
plugins: [...plugins, ...pluginsProp, ...defaultPlugins]
|
|
73
|
-
|
|
74
|
-
});
|
|
114
|
+
plugins: [...plugins, ...pluginsProp, ...defaultPlugins]
|
|
115
|
+
}, otherProps));
|
|
75
116
|
const noColumnsVisible = useMemo(() => {
|
|
76
|
-
const visibleUserColumns = grid.columns.filter(
|
|
117
|
+
const visibleUserColumns = grid.columns.filter(column => column.visible || typeof column.visible === 'undefined');
|
|
77
118
|
return visibleUserColumns.length === 0;
|
|
78
119
|
}, [grid.columns]);
|
|
79
120
|
const bodyPlaceholder = useMemo(() => {
|
|
80
121
|
if (noColumnsVisible) {
|
|
81
122
|
return noColumnsPlaceholder;
|
|
82
123
|
}
|
|
124
|
+
|
|
83
125
|
return isFunction(noResultsRender) ? noResultsRender() : noResultsPlaceholder;
|
|
84
126
|
}, [noResultsPlaceholder, noColumnsPlaceholder, noColumnsVisible]);
|
|
85
|
-
const {
|
|
127
|
+
const {
|
|
128
|
+
pagination
|
|
129
|
+
} = otherProps;
|
|
86
130
|
const conditionalPagination = pagination && pagination.conditionalPagination === true && rows.length <= otherProps.pagination.perPage;
|
|
87
131
|
const usePagination = paginated && !conditionalPagination;
|
|
88
|
-
return
|
|
89
|
-
className:
|
|
132
|
+
return /*#__PURE__*/jsxs(DatagridWrapper, _objectSpread(_objectSpread({
|
|
133
|
+
className: "".concat(className, " ds-row-size-").concat(rowSize),
|
|
90
134
|
classProps: {
|
|
91
135
|
fluidHeight: isFluid({
|
|
92
136
|
autoHeight: otherProps.autoHeight,
|
|
@@ -94,22 +138,23 @@ const DataGridImpl = ({
|
|
|
94
138
|
paginated: usePagination
|
|
95
139
|
})
|
|
96
140
|
},
|
|
97
|
-
style: {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
141
|
+
style: {
|
|
142
|
+
height
|
|
143
|
+
}
|
|
144
|
+
}, containerProps), {}, {
|
|
145
|
+
children: [addOptionalHeaderComponents({
|
|
146
|
+
grid
|
|
147
|
+
}), /*#__PURE__*/jsxs(Table, _objectSpread(_objectSpread({}, grid), {}, {
|
|
148
|
+
onDefaultFiltersLoad: onDefaultFiltersLoad,
|
|
149
|
+
children: [showHeader && (_TableHeader || (_TableHeader = /*#__PURE__*/_jsx(TableHeader, {}))), showRowsLoader ? rowsLoaderRenderer() : /*#__PURE__*/_jsx(TableBody, {
|
|
150
|
+
isPlaceholderActive: noColumnsVisible || grid.composedRows.rows && grid.composedRows.rows.length === 0 || grid.composedRows.length === 0,
|
|
151
|
+
noResultsPlaceholder: bodyPlaceholder
|
|
152
|
+
})]
|
|
153
|
+
})), addOptionalFooterComponents({
|
|
154
|
+
grid,
|
|
155
|
+
rows: grid.composedRows
|
|
156
|
+
})]
|
|
108
157
|
}));
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
export {
|
|
112
|
-
DataGridImpl,
|
|
113
|
-
DataGridImpl_default as default
|
|
114
|
-
};
|
|
115
|
-
//# sourceMappingURL=DataGridImpl.js.map
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export { DataGridImpl as default };
|
package/esm/PaginatedDataGrid.js
CHANGED
|
@@ -1,48 +1,68 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
7
|
+
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
8
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
9
|
+
import 'react';
|
|
10
|
+
import useDataGrid from '@elliemae/ds-shared/src/useDataGrid/useDataGrid';
|
|
11
|
+
import Table from './components/Table.js';
|
|
12
|
+
import { defaultRenderers } from './components/renderers/index.js';
|
|
13
|
+
import { DatagridWrapper } from './components/renderers/defaultClassedRenderers.js';
|
|
14
|
+
import addOptionalHeaderComponents from './components/header/addOptionalHeaderComponents.js';
|
|
15
|
+
import getPluginsFromProps from './utilities/getPluginsFromProps.js';
|
|
16
|
+
import { Pagination } from './plugins/pagination/components/Pagination.js';
|
|
17
|
+
import { jsxs } from 'react/jsx-runtime';
|
|
18
|
+
import { renderRowsLoader } from './components/renderers/renderRowsLoader.js';
|
|
19
|
+
|
|
20
|
+
var _Table$Header;
|
|
21
|
+
|
|
22
|
+
const _excluded = ["columns", "rows", "showRowsLoader", "noResultsPlaceholder", "rowsLoaderRenderer", "maxPerPage", "minPerPage", "onPageSelect", "onPerPage", "pagination"];
|
|
23
|
+
|
|
24
|
+
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; }
|
|
25
|
+
|
|
26
|
+
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(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; }
|
|
27
|
+
|
|
28
|
+
function PaginatedDataGrid(_ref) {
|
|
29
|
+
let {
|
|
26
30
|
columns,
|
|
27
31
|
rows,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
return /* @__PURE__ */ React2.createElement(DatagridWrapper, null, addOptionalHeaderComponents({ grid }), /* @__PURE__ */ React2.createElement(Table, {
|
|
32
|
-
...grid
|
|
33
|
-
}, /* @__PURE__ */ React2.createElement(Table.Header, null), showRowsLoader ? rowsLoaderRenderer() : /* @__PURE__ */ React2.createElement(Table.Body, {
|
|
34
|
-
rows: grid.composedRows.rows || grid.composedRows
|
|
35
|
-
})), /* @__PURE__ */ React2.createElement(Pagination, {
|
|
32
|
+
showRowsLoader,
|
|
33
|
+
noResultsPlaceholder,
|
|
34
|
+
rowsLoaderRenderer = renderRowsLoader,
|
|
36
35
|
maxPerPage,
|
|
37
36
|
minPerPage,
|
|
38
37
|
onPageSelect,
|
|
39
38
|
onPerPage,
|
|
40
|
-
paginated: rows,
|
|
41
39
|
pagination
|
|
40
|
+
} = _ref,
|
|
41
|
+
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
42
|
+
|
|
43
|
+
const plugins = getPluginsFromProps(otherProps, {
|
|
44
|
+
infiniteScrolling: true
|
|
45
|
+
});
|
|
46
|
+
const grid = useDataGrid(_objectSpread(_objectSpread({}, otherProps), {}, {
|
|
47
|
+
columns,
|
|
48
|
+
rows,
|
|
49
|
+
renderers: defaultRenderers,
|
|
50
|
+
plugins
|
|
51
|
+
}));
|
|
52
|
+
return /*#__PURE__*/_jsx(DatagridWrapper, {}, void 0, addOptionalHeaderComponents({
|
|
53
|
+
grid
|
|
54
|
+
}), /*#__PURE__*/jsxs(Table, _objectSpread(_objectSpread({}, grid), {}, {
|
|
55
|
+
children: [_Table$Header || (_Table$Header = /*#__PURE__*/_jsx(Table.Header, {})), showRowsLoader ? rowsLoaderRenderer() : /*#__PURE__*/_jsx(Table.Body, {
|
|
56
|
+
rows: grid.composedRows.rows || grid.composedRows
|
|
57
|
+
})]
|
|
58
|
+
})), /*#__PURE__*/_jsx(Pagination, {
|
|
59
|
+
maxPerPage: maxPerPage,
|
|
60
|
+
minPerPage: minPerPage,
|
|
61
|
+
onPageSelect: onPageSelect,
|
|
62
|
+
onPerPage: onPerPage,
|
|
63
|
+
paginated: rows,
|
|
64
|
+
pagination: pagination
|
|
42
65
|
}));
|
|
43
66
|
}
|
|
44
|
-
|
|
45
|
-
export {
|
|
46
|
-
PaginatedDataGrid_default as default
|
|
47
|
-
};
|
|
48
|
-
//# sourceMappingURL=PaginatedDataGrid.js.map
|
|
67
|
+
|
|
68
|
+
export { PaginatedDataGrid as default };
|
package/esm/blockNames.js
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
export {
|
|
6
|
-
bodyBlockName,
|
|
7
|
-
dataGridBlockName,
|
|
8
|
-
headerBlockName
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=blockNames.js.map
|
|
1
|
+
const dataGridBlockName = 'data-grid';
|
|
2
|
+
const headerBlockName = "".concat(dataGridBlockName, "-header");
|
|
3
|
+
const bodyBlockName = "".concat(dataGridBlockName, "-body");
|
|
4
|
+
|
|
5
|
+
export { bodyBlockName, dataGridBlockName, headerBlockName };
|
|
@@ -1,82 +1,87 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { cx } from
|
|
4
|
-
import
|
|
5
|
-
import { aggregatedClasses } from
|
|
1
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { cx } from '@elliemae/ds-utilities';
|
|
4
|
+
import DSButton from '@elliemae/ds-button';
|
|
5
|
+
import { aggregatedClasses } from '@elliemae/ds-classnames';
|
|
6
|
+
|
|
6
7
|
const Intents = {
|
|
7
|
-
SUCCESS:
|
|
8
|
-
INFO:
|
|
9
|
-
DANGER:
|
|
10
|
-
WARNING:
|
|
8
|
+
SUCCESS: 'success',
|
|
9
|
+
INFO: 'info',
|
|
10
|
+
DANGER: 'danger',
|
|
11
|
+
WARNING: 'warning'
|
|
11
12
|
};
|
|
12
13
|
const IntentIconColors = {
|
|
13
|
-
[Intents.SUCCESS]: [
|
|
14
|
-
[Intents.INFO]: [
|
|
15
|
-
[Intents.DANGER]: [
|
|
16
|
-
[Intents.WARNING]: [
|
|
14
|
+
[Intents.SUCCESS]: ['success', 900],
|
|
15
|
+
[Intents.INFO]: ['brand-primary', 600],
|
|
16
|
+
[Intents.DANGER]: ['danger', 900],
|
|
17
|
+
[Intents.WARNING]: ['warning', 900]
|
|
17
18
|
};
|
|
18
|
-
const ValueWrapper = aggregatedClasses(
|
|
19
|
+
const ValueWrapper = aggregatedClasses('span')('icon-column-cell');
|
|
20
|
+
|
|
19
21
|
const addColorToIcon = (icon, intentColor) => {
|
|
20
22
|
if (icon.props.color) {
|
|
21
23
|
return icon;
|
|
22
24
|
}
|
|
23
|
-
|
|
25
|
+
|
|
26
|
+
return /*#__PURE__*/React.cloneElement(icon, {
|
|
27
|
+
color: intentColor
|
|
28
|
+
});
|
|
24
29
|
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
30
|
+
|
|
31
|
+
function createColumn(_ref) {
|
|
32
|
+
let {
|
|
33
|
+
property,
|
|
34
|
+
label,
|
|
35
|
+
headerIcon,
|
|
36
|
+
getRowIcon = () => null,
|
|
37
|
+
isVisited = () => null,
|
|
38
|
+
intent = Intents.SUCCESS,
|
|
39
|
+
width = 60,
|
|
40
|
+
onClick,
|
|
41
|
+
visible,
|
|
42
|
+
resizable,
|
|
43
|
+
sortable,
|
|
44
|
+
searchable
|
|
45
|
+
} = _ref;
|
|
46
|
+
|
|
39
47
|
const formatter = (value, extraParams) => {
|
|
40
48
|
const icon = getRowIcon(value, extraParams);
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
49
|
+
|
|
50
|
+
const onClickHandler = e => onClick(e, extraParams);
|
|
51
|
+
|
|
52
|
+
return /*#__PURE__*/_jsx(ValueWrapper, {
|
|
53
|
+
className: cx("icc-".concat(intent), isVisited(value, extraParams))
|
|
54
|
+
}, void 0, icon && addColorToIcon(icon, IntentIconColors[intent]), onClick && typeof value !== 'undefined' ? /*#__PURE__*/_jsx(DSButton, {
|
|
45
55
|
buttonType: "text",
|
|
46
|
-
intent,
|
|
56
|
+
intent: intent,
|
|
47
57
|
labelText: value,
|
|
48
58
|
onClick: onClickHandler
|
|
49
59
|
}) : value);
|
|
50
60
|
};
|
|
61
|
+
|
|
51
62
|
return {
|
|
52
63
|
property,
|
|
53
64
|
label,
|
|
54
65
|
headerStyle: {
|
|
55
|
-
justifyContent:
|
|
66
|
+
justifyContent: 'center'
|
|
56
67
|
},
|
|
57
68
|
header: {
|
|
58
|
-
formatters: [
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}))
|
|
62
|
-
]
|
|
69
|
+
formatters: [() => /*#__PURE__*/_jsx("span", {}, void 0, /*#__PURE__*/React.cloneElement(headerIcon, {
|
|
70
|
+
color: IntentIconColors[intent]
|
|
71
|
+
}))]
|
|
63
72
|
},
|
|
64
73
|
cell: {
|
|
65
74
|
formatters: [formatter]
|
|
66
75
|
},
|
|
67
76
|
cellStyle: {
|
|
68
|
-
justifyContent:
|
|
77
|
+
justifyContent: 'center'
|
|
69
78
|
},
|
|
70
79
|
width,
|
|
71
|
-
visible: typeof visible ===
|
|
80
|
+
visible: typeof visible === 'undefined' || visible,
|
|
72
81
|
resizable,
|
|
73
82
|
sortable,
|
|
74
83
|
searchable
|
|
75
84
|
};
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export {
|
|
79
|
-
IconColumn,
|
|
80
|
-
IconColumn_default as default
|
|
81
|
-
};
|
|
82
|
-
//# sourceMappingURL=IconColumn.js.map
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export { createColumn as default };
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
function createNumberColumn({ label, property }) {
|
|
1
|
+
function createNumberColumn(_ref) {
|
|
3
2
|
}
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
//# sourceMappingURL=NumberColumn.js.map
|
|
3
|
+
|
|
4
|
+
export { createNumberColumn as default };
|
|
@@ -1,16 +1,53 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
7
|
+
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
8
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
9
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
10
|
+
import { useRef, useContext, useCallback, useEffect } from 'react';
|
|
11
|
+
import { FocusGridContext } from '@elliemae/ds-shared/FocusGroup/FocusGrid';
|
|
12
|
+
import { evaluateTransforms, evaluateFormatters } from '@elliemae/ds-shared/createDataInstance/utils';
|
|
13
|
+
import DSTruncatedTooltipText from '@elliemae/ds-truncated-tooltip-text';
|
|
14
|
+
import { jsx } from 'react/jsx-runtime';
|
|
15
|
+
|
|
16
|
+
const _excluded = ["rowData", "rowKey", "isScrolling"];
|
|
17
|
+
|
|
18
|
+
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; }
|
|
19
|
+
|
|
20
|
+
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(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; }
|
|
21
|
+
|
|
22
|
+
function BodyCell(_ref) {
|
|
23
|
+
let {
|
|
24
|
+
component: Component,
|
|
25
|
+
classProps,
|
|
26
|
+
rowProps,
|
|
27
|
+
column,
|
|
28
|
+
columnIndex,
|
|
29
|
+
rowIndex,
|
|
30
|
+
grid
|
|
31
|
+
} = _ref;
|
|
32
|
+
|
|
33
|
+
const {
|
|
34
|
+
rowData,
|
|
35
|
+
rowKey,
|
|
36
|
+
isScrolling
|
|
37
|
+
} = rowProps,
|
|
38
|
+
extraRowProps = _objectWithoutProperties(rowProps, _excluded);
|
|
39
|
+
|
|
40
|
+
const {
|
|
41
|
+
property,
|
|
42
|
+
cell,
|
|
43
|
+
props
|
|
44
|
+
} = column;
|
|
10
45
|
const evaluatedProperty = property || cell && cell.property;
|
|
11
46
|
const ref = useRef(null);
|
|
12
|
-
const {
|
|
13
|
-
|
|
47
|
+
const {
|
|
48
|
+
register
|
|
49
|
+
} = useContext(FocusGridContext);
|
|
50
|
+
const registerFocus = useCallback(node => {
|
|
14
51
|
register(node, rowIndex, columnIndex);
|
|
15
52
|
}, []);
|
|
16
53
|
useEffect(() => {
|
|
@@ -20,9 +57,11 @@ const BodyCell = ({ component: Component, classProps, rowProps, column, columnIn
|
|
|
20
57
|
transforms = [],
|
|
21
58
|
formatters = [],
|
|
22
59
|
fixedFormatters = [],
|
|
60
|
+
// useful for the toolbar trigger at the last column
|
|
23
61
|
scrollingFormatters = []
|
|
24
62
|
} = cell || {};
|
|
25
|
-
|
|
63
|
+
|
|
64
|
+
const extraParameters = _objectSpread({
|
|
26
65
|
columnIndex,
|
|
27
66
|
property: evaluatedProperty,
|
|
28
67
|
column,
|
|
@@ -30,46 +69,24 @@ const BodyCell = ({ component: Component, classProps, rowProps, column, columnIn
|
|
|
30
69
|
rowIndex,
|
|
31
70
|
rowKey,
|
|
32
71
|
isScrolling,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
};
|
|
36
|
-
|
|
72
|
+
// improve performance on scroll rendering a lightweight component instead
|
|
73
|
+
registerFocus
|
|
74
|
+
}, extraRowProps);
|
|
75
|
+
|
|
76
|
+
const withTooltip = v => classProps && classProps.wrapText ? v : /*#__PURE__*/_jsx(DSTruncatedTooltipText, {
|
|
37
77
|
value: v
|
|
38
78
|
});
|
|
39
|
-
|
|
79
|
+
|
|
80
|
+
const value = rowData["_".concat(evaluatedProperty)] || rowData[evaluatedProperty];
|
|
40
81
|
const transformed = evaluateTransforms(transforms, value, extraParameters);
|
|
41
|
-
return
|
|
42
|
-
ref,
|
|
43
|
-
"data-testid":
|
|
82
|
+
return /*#__PURE__*/jsx(Component, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
83
|
+
ref: ref,
|
|
84
|
+
"data-testid": "column-".concat(property),
|
|
44
85
|
tabIndex: -1,
|
|
45
|
-
classProps
|
|
46
|
-
|
|
47
|
-
...
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
BodyCell
|
|
52
|
-
component: PropTypes.element,
|
|
53
|
-
classProps: PropTypes.shape({
|
|
54
|
-
wrapText: PropTypes.bool
|
|
55
|
-
}),
|
|
56
|
-
rowProps: PropTypes.shape({
|
|
57
|
-
rowData: PropTypes.shape({}),
|
|
58
|
-
rowKey: PropTypes.string,
|
|
59
|
-
isScrolling: PropTypes.bool
|
|
60
|
-
}),
|
|
61
|
-
column: PropTypes.shape({
|
|
62
|
-
property: PropTypes.string,
|
|
63
|
-
cell: PropTypes.any,
|
|
64
|
-
props: PropTypes.shape({})
|
|
65
|
-
}),
|
|
66
|
-
columnIndex: PropTypes.number,
|
|
67
|
-
rowIndex: PropTypes.number,
|
|
68
|
-
grid: PropTypes.any
|
|
69
|
-
};
|
|
70
|
-
var BodyCell_default = BodyCell;
|
|
71
|
-
export {
|
|
72
|
-
BodyCell,
|
|
73
|
-
BodyCell_default as default
|
|
74
|
-
};
|
|
75
|
-
//# sourceMappingURL=BodyCell.js.map
|
|
86
|
+
classProps: classProps
|
|
87
|
+
}, props), cell && cell.props), transformed), {}, {
|
|
88
|
+
children: transformed.children || evaluateFormatters(!isScrolling ? [withTooltip, ...formatters, ...fixedFormatters] : [...scrollingFormatters, ...fixedFormatters], value, extraParameters, grid)
|
|
89
|
+
}));
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export { BodyCell as default };
|