@elliemae/ds-datagrids 2.2.0-next.3 → 2.3.0-alpha.1
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 +395 -635
- package/cjs/DSDataGrid.js.map +7 -0
- package/cjs/DataGridImpl.js +103 -128
- package/cjs/DataGridImpl.js.map +7 -0
- package/cjs/PaginatedDataGrid.js +68 -68
- package/cjs/PaginatedDataGrid.js.map +7 -0
- package/cjs/blockNames.js +39 -11
- package/cjs/blockNames.js.map +7 -0
- package/cjs/columns/IconColumn.js +78 -62
- package/cjs/columns/IconColumn.js.map +7 -0
- package/cjs/columns/NumberColumn.js +35 -5
- package/cjs/columns/NumberColumn.js.map +7 -0
- package/cjs/components/BodyCell.js +83 -80
- package/cjs/components/BodyCell.js.map +7 -0
- package/cjs/components/BodyList.js +52 -52
- package/cjs/components/BodyList.js.map +7 -0
- package/cjs/components/ColumnVisibilityMenuOption.js +53 -31
- package/cjs/components/ColumnVisibilityMenuOption.js.map +7 -0
- package/cjs/components/ColumnsOptionsMenuSection.js +59 -44
- package/cjs/components/ColumnsOptionsMenuSection.js.map +7 -0
- package/cjs/components/EmptyState.js +81 -50
- package/cjs/components/EmptyState.js.map +7 -0
- package/cjs/components/HeaderCell.js +64 -58
- package/cjs/components/HeaderCell.js.map +7 -0
- package/cjs/components/List.js +41 -29
- package/cjs/components/List.js.map +7 -0
- package/cjs/components/ListItem.js +43 -36
- package/cjs/components/ListItem.js.map +7 -0
- package/cjs/components/NoResults.js +55 -51
- package/cjs/components/NoResults.js.map +7 -0
- package/cjs/components/RowsLoader.js +42 -22
- package/cjs/components/RowsLoader.js.map +7 -0
- package/cjs/components/Table.js +78 -87
- package/cjs/components/Table.js.map +7 -0
- package/cjs/components/TableBody.js +61 -60
- package/cjs/components/TableBody.js.map +7 -0
- package/cjs/components/TableHeader.js +47 -30
- package/cjs/components/TableHeader.js.map +7 -0
- package/cjs/components/footer/addOptionalFooterComponents.js +53 -43
- package/cjs/components/footer/addOptionalFooterComponents.js.map +7 -0
- package/cjs/components/header/PrimaryControls.js +49 -35
- package/cjs/components/header/PrimaryControls.js.map +7 -0
- package/cjs/components/header/addOptionalHeaderComponents.js +54 -43
- package/cjs/components/header/addOptionalHeaderComponents.js.map +7 -0
- package/cjs/components/index.js +43 -17
- package/cjs/components/index.js.map +7 -0
- package/cjs/components/renderers/defaultClassedRenderers.js +64 -57
- package/cjs/components/renderers/defaultClassedRenderers.js.map +7 -0
- package/cjs/components/renderers/index.js +44 -17
- package/cjs/components/renderers/index.js.map +7 -0
- package/cjs/components/renderers/renderRowsLoader.js +39 -18
- package/cjs/components/renderers/renderRowsLoader.js.map +7 -0
- package/cjs/components/tableContext.js +36 -13
- package/cjs/components/tableContext.js.map +7 -0
- package/cjs/defaultPlugins.js +44 -12
- package/cjs/defaultPlugins.js.map +7 -0
- package/cjs/index.js +72 -67
- package/cjs/index.js.map +7 -0
- package/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +102 -114
- package/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js.map +7 -0
- package/cjs/plugins/body-header-scroll-sync/index.js +35 -9
- package/cjs/plugins/body-header-scroll-sync/index.js.map +7 -0
- package/cjs/plugins/column-dnd/DndColumnsPlugin.js +107 -86
- package/cjs/plugins/column-dnd/DndColumnsPlugin.js.map +7 -0
- package/cjs/plugins/column-dnd/decorateGridWithDndColumns.js +43 -27
- package/cjs/plugins/column-dnd/decorateGridWithDndColumns.js.map +7 -0
- package/cjs/plugins/column-dnd/index.js +35 -9
- package/cjs/plugins/column-dnd/index.js.map +7 -0
- package/cjs/plugins/column-sizing/ColumnSizingPlugin.js +59 -55
- package/cjs/plugins/column-sizing/ColumnSizingPlugin.js.map +7 -0
- package/cjs/plugins/column-sizing/columnMeasurerTransformer.js +48 -53
- package/cjs/plugins/column-sizing/columnMeasurerTransformer.js.map +7 -0
- package/cjs/plugins/column-sizing/ext-points/decorateColumn.js +40 -13
- package/cjs/plugins/column-sizing/ext-points/decorateColumn.js.map +7 -0
- package/cjs/plugins/column-sizing/ext-points/getTableProps.js +55 -54
- package/cjs/plugins/column-sizing/ext-points/getTableProps.js.map +7 -0
- package/cjs/plugins/column-sizing/getColumnNameFromProperty.js +37 -9
- package/cjs/plugins/column-sizing/getColumnNameFromProperty.js.map +7 -0
- package/cjs/plugins/column-sizing/index.js +35 -9
- package/cjs/plugins/column-sizing/index.js.map +7 -0
- package/cjs/plugins/column-sizing/useColumnSizeService.js +72 -86
- package/cjs/plugins/column-sizing/useColumnSizeService.js.map +7 -0
- package/cjs/plugins/column-sizing/useStylesheetHelpers.js +96 -199
- package/cjs/plugins/column-sizing/useStylesheetHelpers.js.map +7 -0
- package/cjs/plugins/column-sizing/utils.js +52 -29
- package/cjs/plugins/column-sizing/utils.js.map +7 -0
- package/cjs/plugins/custom-cell-renderer/CustomRendererPlugin.js +38 -16
- package/cjs/plugins/custom-cell-renderer/CustomRendererPlugin.js.map +7 -0
- package/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js +61 -56
- package/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js.map +7 -0
- package/cjs/plugins/custom-cell-renderer/getRendererComponent.js +58 -60
- package/cjs/plugins/custom-cell-renderer/getRendererComponent.js.map +7 -0
- package/cjs/plugins/custom-cell-renderer/index.js +35 -9
- package/cjs/plugins/custom-cell-renderer/index.js.map +7 -0
- package/cjs/plugins/editable/EditableComponents/ComboBox.js +50 -53
- package/cjs/plugins/editable/EditableComponents/ComboBox.js.map +7 -0
- package/cjs/plugins/editable/EditableComponents/TextBox.js +56 -76
- package/cjs/plugins/editable/EditableComponents/TextBox.js.map +7 -0
- package/cjs/plugins/editable/EditableComponents/index.js +37 -11
- package/cjs/plugins/editable/EditableComponents/index.js.map +7 -0
- package/cjs/plugins/editable/EditablePlugin.js +60 -75
- package/cjs/plugins/editable/EditablePlugin.js.map +7 -0
- package/cjs/plugins/editable/decorateEditable.js +61 -98
- package/cjs/plugins/editable/decorateEditable.js.map +7 -0
- package/cjs/plugins/editable/getEditorComponent.js +70 -76
- package/cjs/plugins/editable/getEditorComponent.js.map +7 -0
- package/cjs/plugins/editable/index.js +38 -13
- package/cjs/plugins/editable/index.js.map +7 -0
- package/cjs/plugins/expandable-grid/ExpandableColumn.js +112 -144
- package/cjs/plugins/expandable-grid/ExpandableColumn.js.map +7 -0
- package/cjs/plugins/expandable-grid/ExpandablePlugin.js +118 -180
- package/cjs/plugins/expandable-grid/ExpandablePlugin.js.map +7 -0
- package/cjs/plugins/expandable-grid/ExpandedRow.js +117 -139
- package/cjs/plugins/expandable-grid/ExpandedRow.js.map +7 -0
- package/cjs/plugins/expandable-grid/ExpandedRowExtra.js +54 -52
- package/cjs/plugins/expandable-grid/ExpandedRowExtra.js.map +7 -0
- package/cjs/plugins/expandable-grid/index.js +37 -11
- package/cjs/plugins/expandable-grid/index.js.map +7 -0
- package/cjs/plugins/expandable-grid/useExpandGridState.js +45 -31
- package/cjs/plugins/expandable-grid/useExpandGridState.js.map +7 -0
- package/cjs/plugins/export-data/ExportDataPlugin.js +82 -116
- package/cjs/plugins/export-data/ExportDataPlugin.js.map +7 -0
- package/cjs/plugins/export-data/index.js +35 -12
- package/cjs/plugins/export-data/index.js.map +7 -0
- package/cjs/plugins/filterable/FilterablePlugin.js +54 -55
- package/cjs/plugins/filterable/FilterablePlugin.js.map +7 -0
- package/cjs/plugins/filterable/addFilterToColumn.js +40 -28
- package/cjs/plugins/filterable/addFilterToColumn.js.map +7 -0
- package/cjs/plugins/filterable/components/FilterableHeader.js +119 -107
- package/cjs/plugins/filterable/components/FilterableHeader.js.map +7 -0
- package/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +116 -116
- package/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js.map +7 -0
- package/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +97 -73
- package/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js.map +7 -0
- package/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +138 -132
- package/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js.map +7 -0
- package/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js +115 -119
- package/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js.map +7 -0
- package/cjs/plugins/filterable/components/filterable-menus/defaultDateFormat.js +35 -7
- package/cjs/plugins/filterable/components/filterable-menus/defaultDateFormat.js.map +7 -0
- package/cjs/plugins/filterable/components/filterable-menus/getFilterMenuByType.js +46 -15
- package/cjs/plugins/filterable/components/filterable-menus/getFilterMenuByType.js.map +7 -0
- package/cjs/plugins/filterable/filterableFormatter.js +61 -51
- package/cjs/plugins/filterable/filterableFormatter.js.map +7 -0
- package/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js +60 -55
- package/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js.map +7 -0
- package/cjs/plugins/filterable/filtering-helper/strategiesOperators.js +43 -22
- package/cjs/plugins/filterable/filtering-helper/strategiesOperators.js.map +7 -0
- package/cjs/plugins/filterable/helper.js +68 -79
- package/cjs/plugins/filterable/helper.js.map +7 -0
- package/cjs/plugins/filterable/index.js +35 -9
- package/cjs/plugins/filterable/index.js.map +7 -0
- package/cjs/plugins/filterable/useFilterableState.js +62 -66
- package/cjs/plugins/filterable/useFilterableState.js.map +7 -0
- package/cjs/plugins/grouping-by/GroupingByPlugin.js +40 -23
- package/cjs/plugins/grouping-by/GroupingByPlugin.js.map +7 -0
- package/cjs/plugins/grouping-grid/GroupingPlugin.js +86 -109
- package/cjs/plugins/grouping-grid/GroupingPlugin.js.map +7 -0
- package/cjs/plugins/grouping-grid/walkStrategy.js +46 -26
- package/cjs/plugins/grouping-grid/walkStrategy.js.map +7 -0
- package/cjs/plugins/index.js +68 -48
- package/cjs/plugins/index.js.map +7 -0
- package/cjs/plugins/infinite-scrolling/InfiniteScrollPlugin.js +64 -88
- package/cjs/plugins/infinite-scrolling/InfiniteScrollPlugin.js.map +7 -0
- package/cjs/plugins/infinite-scrolling/index.js +35 -9
- package/cjs/plugins/infinite-scrolling/index.js.map +7 -0
- package/cjs/plugins/pagination/PaginationPlugin.js +73 -90
- package/cjs/plugins/pagination/PaginationPlugin.js.map +7 -0
- package/cjs/plugins/pagination/components/Pagination.js +54 -35
- package/cjs/plugins/pagination/components/Pagination.js.map +7 -0
- package/cjs/plugins/pagination/components/Paginator.js +59 -44
- package/cjs/plugins/pagination/components/Paginator.js.map +7 -0
- package/cjs/plugins/pagination/components/PerPageDropdown.js +51 -63
- package/cjs/plugins/pagination/components/PerPageDropdown.js.map +7 -0
- package/cjs/plugins/pagination/helper.js +45 -24
- package/cjs/plugins/pagination/helper.js.map +7 -0
- package/cjs/plugins/pagination/index.js +35 -9
- package/cjs/plugins/pagination/index.js.map +7 -0
- package/cjs/plugins/pagination/usePaginationState.js +46 -38
- package/cjs/plugins/pagination/usePaginationState.js.map +7 -0
- package/cjs/plugins/resizable/ResizablePlugin.js +51 -55
- package/cjs/plugins/resizable/ResizablePlugin.js.map +7 -0
- package/cjs/plugins/resizable/decorateResizable.js +49 -53
- package/cjs/plugins/resizable/decorateResizable.js.map +7 -0
- package/cjs/plugins/resizable/index.js +35 -9
- package/cjs/plugins/resizable/index.js.map +7 -0
- package/cjs/plugins/resizable/useResizeHandle.js +56 -50
- package/cjs/plugins/resizable/useResizeHandle.js.map +7 -0
- package/cjs/plugins/resizable/utils.js +49 -28
- package/cjs/plugins/resizable/utils.js.map +7 -0
- package/cjs/plugins/row-dnd/DndRowsPlugin.js +103 -82
- package/cjs/plugins/row-dnd/DndRowsPlugin.js.map +7 -0
- package/cjs/plugins/row-dnd/index.js +35 -9
- package/cjs/plugins/row-dnd/index.js.map +7 -0
- package/cjs/plugins/selectable/SelectablePlugin.js +101 -134
- package/cjs/plugins/selectable/SelectablePlugin.js.map +7 -0
- package/cjs/plugins/selectable/addSelectableColumn.js +67 -68
- package/cjs/plugins/selectable/addSelectableColumn.js.map +7 -0
- package/cjs/plugins/selectable/helper.js +50 -39
- package/cjs/plugins/selectable/helper.js.map +7 -0
- package/cjs/plugins/selectable/index.js +35 -9
- package/cjs/plugins/selectable/index.js.map +7 -0
- package/cjs/plugins/selectable/selectableFormatter.js +83 -105
- package/cjs/plugins/selectable/selectableFormatter.js.map +7 -0
- package/cjs/plugins/selectable/useSelectableState.js +67 -94
- package/cjs/plugins/selectable/useSelectableState.js.map +7 -0
- package/cjs/plugins/sortable/SortablePlugin.js +62 -76
- package/cjs/plugins/sortable/SortablePlugin.js.map +7 -0
- package/cjs/plugins/sortable/checkIfSortable.js +37 -14
- package/cjs/plugins/sortable/checkIfSortable.js.map +7 -0
- package/cjs/plugins/sortable/index.js +35 -9
- package/cjs/plugins/sortable/index.js.map +7 -0
- package/cjs/plugins/sortable/sortHeaderFormatter.js +56 -50
- package/cjs/plugins/sortable/sortHeaderFormatter.js.map +7 -0
- package/cjs/plugins/sortable/sortTree.js +40 -47
- package/cjs/plugins/sortable/sortTree.js.map +7 -0
- package/cjs/plugins/sortable/sorter.js +140 -172
- package/cjs/plugins/sortable/sorter.js.map +7 -0
- package/cjs/plugins/sortable/useSortableState.js +53 -79
- package/cjs/plugins/sortable/useSortableState.js.map +7 -0
- package/cjs/plugins/toolbar/RowRenderer.js +75 -76
- package/cjs/plugins/toolbar/RowRenderer.js.map +7 -0
- package/cjs/plugins/toolbar/ToolbarPlugin.js +49 -33
- package/cjs/plugins/toolbar/ToolbarPlugin.js.map +7 -0
- package/cjs/plugins/toolbar/ToolbarTrigger.js +89 -70
- package/cjs/plugins/toolbar/ToolbarTrigger.js.map +7 -0
- package/cjs/plugins/toolbar/index.js +35 -9
- package/cjs/plugins/toolbar/index.js.map +7 -0
- package/cjs/plugins/virtualization/AutoHeightList.js +64 -52
- package/cjs/plugins/virtualization/AutoHeightList.js.map +7 -0
- package/cjs/plugins/virtualization/VirtualizationPlugin.js +86 -97
- package/cjs/plugins/virtualization/VirtualizationPlugin.js.map +7 -0
- package/cjs/plugins/virtualization/VirtualizedBody.js +139 -155
- package/cjs/plugins/virtualization/VirtualizedBody.js.map +7 -0
- package/cjs/plugins/virtualization/VirtualizedBodyRow.js +39 -17
- package/cjs/plugins/virtualization/VirtualizedBodyRow.js.map +7 -0
- package/cjs/plugins/virtualization/helper.js +35 -7
- package/cjs/plugins/virtualization/helper.js.map +7 -0
- package/cjs/plugins/virtualization/index.js +35 -9
- package/cjs/plugins/virtualization/index.js.map +7 -0
- package/cjs/renders/CellWithAddons.js +98 -50
- package/cjs/renders/CellWithAddons.js.map +7 -0
- package/cjs/renders/index.js +37 -11
- package/cjs/renders/index.js.map +7 -0
- package/cjs/renders/styled.js +78 -27
- package/cjs/renders/styled.js.map +7 -0
- package/cjs/rowSizes.js +44 -12
- package/cjs/rowSizes.js.map +7 -0
- package/cjs/utilities/DataGridUtilities.json +1315 -0
- package/cjs/utilities/getPluginsFromProps.js +67 -39
- package/cjs/utilities/getPluginsFromProps.js.map +7 -0
- package/cjs/utilities/getScrollbarSize.js +44 -25
- package/cjs/utilities/getScrollbarSize.js.map +7 -0
- package/cjs/utilities/normalizeData.js +44 -34
- package/cjs/utilities/normalizeData.js.map +7 -0
- package/esm/DSDataGrid.js +337 -597
- package/esm/DSDataGrid.js.map +7 -0
- package/esm/DataGridImpl.js +68 -113
- package/esm/DataGridImpl.js.map +7 -0
- package/esm/PaginatedDataGrid.js +39 -59
- package/esm/PaginatedDataGrid.js.map +7 -0
- package/esm/blockNames.js +10 -5
- package/esm/blockNames.js.map +7 -0
- package/esm/columns/IconColumn.js +49 -54
- package/esm/columns/IconColumn.js.map +7 -0
- package/esm/columns/NumberColumn.js +6 -3
- package/esm/columns/NumberColumn.js.map +7 -0
- package/esm/components/BodyCell.js +51 -68
- package/esm/components/BodyCell.js.map +7 -0
- package/esm/components/BodyList.js +23 -43
- package/esm/components/BodyList.js.map +7 -0
- package/esm/components/ColumnVisibilityMenuOption.js +24 -27
- package/esm/components/ColumnVisibilityMenuOption.js.map +7 -0
- package/esm/components/ColumnsOptionsMenuSection.js +30 -38
- package/esm/components/ColumnsOptionsMenuSection.js.map +7 -0
- package/esm/components/EmptyState.js +52 -40
- package/esm/components/EmptyState.js.map +7 -0
- package/esm/components/HeaderCell.js +33 -48
- package/esm/components/HeaderCell.js.map +7 -0
- package/esm/components/List.js +12 -23
- package/esm/components/List.js.map +7 -0
- package/esm/components/ListItem.js +14 -30
- package/esm/components/ListItem.js.map +7 -0
- package/esm/components/NoResults.js +26 -43
- package/esm/components/NoResults.js.map +7 -0
- package/esm/components/RowsLoader.js +13 -15
- package/esm/components/RowsLoader.js.map +7 -0
- package/esm/components/Table.js +45 -76
- package/esm/components/Table.js.map +7 -0
- package/esm/components/TableBody.js +32 -52
- package/esm/components/TableBody.js.map +7 -0
- package/esm/components/TableHeader.js +17 -23
- package/esm/components/TableHeader.js.map +7 -0
- package/esm/components/footer/addOptionalFooterComponents.js +24 -37
- package/esm/components/footer/addOptionalFooterComponents.js.map +7 -0
- package/esm/components/header/PrimaryControls.js +20 -29
- package/esm/components/header/PrimaryControls.js.map +7 -0
- package/esm/components/header/addOptionalHeaderComponents.js +25 -36
- package/esm/components/header/addOptionalHeaderComponents.js.map +7 -0
- package/esm/components/index.js +14 -5
- package/esm/components/index.js.map +7 -0
- package/esm/components/renderers/defaultClassedRenderers.js +41 -46
- package/esm/components/renderers/defaultClassedRenderers.js.map +7 -0
- package/esm/components/renderers/index.js +16 -5
- package/esm/components/renderers/index.js.map +7 -0
- package/esm/components/renderers/renderRowsLoader.js +10 -10
- package/esm/components/renderers/renderRowsLoader.js.map +7 -0
- package/esm/components/tableContext.js +7 -5
- package/esm/components/tableContext.js.map +7 -0
- package/esm/defaultPlugins.js +15 -8
- package/esm/defaultPlugins.js.map +7 -0
- package/esm/index.js +63 -27
- package/esm/index.js.map +7 -0
- package/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +71 -101
- package/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js.map +7 -0
- package/esm/plugins/body-header-scroll-sync/index.js +6 -1
- package/esm/plugins/body-header-scroll-sync/index.js.map +7 -0
- package/esm/plugins/column-dnd/DndColumnsPlugin.js +69 -68
- package/esm/plugins/column-dnd/DndColumnsPlugin.js.map +7 -0
- package/esm/plugins/column-dnd/decorateGridWithDndColumns.js +16 -18
- package/esm/plugins/column-dnd/decorateGridWithDndColumns.js.map +7 -0
- package/esm/plugins/column-dnd/index.js +6 -1
- package/esm/plugins/column-dnd/index.js.map +7 -0
- package/esm/plugins/column-sizing/ColumnSizingPlugin.js +20 -37
- package/esm/plugins/column-sizing/ColumnSizingPlugin.js.map +7 -0
- package/esm/plugins/column-sizing/columnMeasurerTransformer.js +16 -42
- package/esm/plugins/column-sizing/columnMeasurerTransformer.js.map +7 -0
- package/esm/plugins/column-sizing/ext-points/decorateColumn.js +9 -7
- package/esm/plugins/column-sizing/ext-points/decorateColumn.js.map +7 -0
- package/esm/plugins/column-sizing/ext-points/getTableProps.js +23 -43
- package/esm/plugins/column-sizing/ext-points/getTableProps.js.map +7 -0
- package/esm/plugins/column-sizing/getColumnNameFromProperty.js +8 -7
- package/esm/plugins/column-sizing/getColumnNameFromProperty.js.map +7 -0
- package/esm/plugins/column-sizing/index.js +6 -1
- package/esm/plugins/column-sizing/index.js.map +7 -0
- package/esm/plugins/column-sizing/useColumnSizeService.js +34 -71
- package/esm/plugins/column-sizing/useColumnSizeService.js.map +7 -0
- package/esm/plugins/column-sizing/useStylesheetHelpers.js +64 -171
- package/esm/plugins/column-sizing/useStylesheetHelpers.js.map +7 -0
- package/esm/plugins/column-sizing/utils.js +23 -21
- package/esm/plugins/column-sizing/utils.js.map +7 -0
- package/esm/plugins/custom-cell-renderer/CustomRendererPlugin.js +8 -7
- package/esm/plugins/custom-cell-renderer/CustomRendererPlugin.js.map +7 -0
- package/esm/plugins/custom-cell-renderer/addCustomRendererToCell.js +28 -43
- package/esm/plugins/custom-cell-renderer/addCustomRendererToCell.js.map +7 -0
- package/esm/plugins/custom-cell-renderer/getRendererComponent.js +22 -44
- package/esm/plugins/custom-cell-renderer/getRendererComponent.js.map +7 -0
- package/esm/plugins/custom-cell-renderer/index.js +6 -1
- package/esm/plugins/custom-cell-renderer/index.js.map +7 -0
- package/esm/plugins/editable/EditableComponents/ComboBox.js +20 -46
- package/esm/plugins/editable/EditableComponents/ComboBox.js.map +7 -0
- package/esm/plugins/editable/EditableComponents/TextBox.js +26 -68
- package/esm/plugins/editable/EditableComponents/TextBox.js.map +7 -0
- package/esm/plugins/editable/EditableComponents/index.js +8 -2
- package/esm/plugins/editable/EditableComponents/index.js.map +7 -0
- package/esm/plugins/editable/EditablePlugin.js +27 -63
- package/esm/plugins/editable/EditablePlugin.js.map +7 -0
- package/esm/plugins/editable/decorateEditable.js +32 -68
- package/esm/plugins/editable/decorateEditable.js.map +7 -0
- package/esm/plugins/editable/getEditorComponent.js +39 -66
- package/esm/plugins/editable/getEditorComponent.js.map +7 -0
- package/esm/plugins/editable/index.js +9 -3
- package/esm/plugins/editable/index.js.map +7 -0
- package/esm/plugins/expandable-grid/ExpandableColumn.js +82 -133
- package/esm/plugins/expandable-grid/ExpandableColumn.js.map +7 -0
- package/esm/plugins/expandable-grid/ExpandablePlugin.js +81 -160
- package/esm/plugins/expandable-grid/ExpandablePlugin.js.map +7 -0
- package/esm/plugins/expandable-grid/ExpandedRow.js +86 -124
- package/esm/plugins/expandable-grid/ExpandedRow.js.map +7 -0
- package/esm/plugins/expandable-grid/ExpandedRowExtra.js +25 -44
- package/esm/plugins/expandable-grid/ExpandedRowExtra.js.map +7 -0
- package/esm/plugins/expandable-grid/index.js +8 -2
- package/esm/plugins/expandable-grid/index.js.map +7 -0
- package/esm/plugins/expandable-grid/useExpandGridState.js +14 -25
- package/esm/plugins/expandable-grid/useExpandGridState.js.map +7 -0
- package/esm/plugins/export-data/ExportDataPlugin.js +52 -103
- package/esm/plugins/export-data/ExportDataPlugin.js.map +7 -0
- package/esm/plugins/export-data/index.js +6 -1
- package/esm/plugins/export-data/index.js.map +7 -0
- package/esm/plugins/filterable/FilterablePlugin.js +22 -44
- package/esm/plugins/filterable/FilterablePlugin.js.map +7 -0
- package/esm/plugins/filterable/addFilterToColumn.js +11 -20
- package/esm/plugins/filterable/addFilterToColumn.js.map +7 -0
- package/esm/plugins/filterable/components/FilterableHeader.js +85 -95
- package/esm/plugins/filterable/components/FilterableHeader.js.map +7 -0
- package/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +83 -103
- package/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js.map +7 -0
- package/esm/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +68 -63
- package/esm/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js.map +7 -0
- package/esm/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +108 -116
- package/esm/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js.map +7 -0
- package/esm/plugins/filterable/components/filterable-menus/TextFilterMenu.js +84 -106
- package/esm/plugins/filterable/components/filterable-menus/TextFilterMenu.js.map +7 -0
- package/esm/plugins/filterable/components/filterable-menus/defaultDateFormat.js +6 -3
- package/esm/plugins/filterable/components/filterable-menus/defaultDateFormat.js.map +7 -0
- package/esm/plugins/filterable/components/filterable-menus/getFilterMenuByType.js +16 -12
- package/esm/plugins/filterable/components/filterable-menus/getFilterMenuByType.js.map +7 -0
- package/esm/plugins/filterable/filterableFormatter.js +32 -45
- package/esm/plugins/filterable/filterableFormatter.js.map +7 -0
- package/esm/plugins/filterable/filtering-helper/filterRowsByQuery.js +29 -44
- package/esm/plugins/filterable/filtering-helper/filterRowsByQuery.js.map +7 -0
- package/esm/plugins/filterable/filtering-helper/strategiesOperators.js +11 -13
- package/esm/plugins/filterable/filtering-helper/strategiesOperators.js.map +7 -0
- package/esm/plugins/filterable/helper.js +42 -62
- package/esm/plugins/filterable/helper.js.map +7 -0
- package/esm/plugins/filterable/index.js +6 -1
- package/esm/plugins/filterable/index.js.map +7 -0
- package/esm/plugins/filterable/useFilterableState.js +33 -54
- package/esm/plugins/filterable/useFilterableState.js.map +7 -0
- package/esm/plugins/grouping-by/GroupingByPlugin.js +10 -14
- package/esm/plugins/grouping-by/GroupingByPlugin.js.map +7 -0
- package/esm/plugins/grouping-grid/GroupingPlugin.js +53 -94
- package/esm/plugins/grouping-grid/GroupingPlugin.js.map +7 -0
- package/esm/plugins/grouping-grid/walkStrategy.js +17 -22
- package/esm/plugins/grouping-grid/walkStrategy.js.map +7 -0
- package/esm/plugins/index.js +39 -19
- package/esm/plugins/index.js.map +7 -0
- package/esm/plugins/infinite-scrolling/InfiniteScrollPlugin.js +31 -74
- package/esm/plugins/infinite-scrolling/InfiniteScrollPlugin.js.map +7 -0
- package/esm/plugins/infinite-scrolling/index.js +6 -1
- package/esm/plugins/infinite-scrolling/index.js.map +7 -0
- package/esm/plugins/pagination/PaginationPlugin.js +42 -75
- package/esm/plugins/pagination/PaginationPlugin.js.map +7 -0
- package/esm/plugins/pagination/components/Pagination.js +25 -27
- package/esm/plugins/pagination/components/Pagination.js.map +7 -0
- package/esm/plugins/pagination/components/Paginator.js +29 -35
- package/esm/plugins/pagination/components/Paginator.js.map +7 -0
- package/esm/plugins/pagination/components/PerPageDropdown.js +22 -54
- package/esm/plugins/pagination/components/PerPageDropdown.js.map +7 -0
- package/esm/plugins/pagination/helper.js +16 -19
- package/esm/plugins/pagination/helper.js.map +7 -0
- package/esm/plugins/pagination/index.js +6 -1
- package/esm/plugins/pagination/index.js.map +7 -0
- package/esm/plugins/pagination/usePaginationState.js +15 -28
- package/esm/plugins/pagination/usePaginationState.js.map +7 -0
- package/esm/plugins/resizable/ResizablePlugin.js +20 -45
- package/esm/plugins/resizable/ResizablePlugin.js.map +7 -0
- package/esm/plugins/resizable/decorateResizable.js +19 -41
- package/esm/plugins/resizable/decorateResizable.js.map +7 -0
- package/esm/plugins/resizable/index.js +6 -1
- package/esm/plugins/resizable/index.js.map +7 -0
- package/esm/plugins/resizable/useResizeHandle.js +24 -39
- package/esm/plugins/resizable/useResizeHandle.js.map +7 -0
- package/esm/plugins/resizable/utils.js +20 -18
- package/esm/plugins/resizable/utils.js.map +7 -0
- package/esm/plugins/row-dnd/DndRowsPlugin.js +73 -71
- package/esm/plugins/row-dnd/DndRowsPlugin.js.map +7 -0
- package/esm/plugins/row-dnd/index.js +6 -1
- package/esm/plugins/row-dnd/index.js.map +7 -0
- package/esm/plugins/selectable/SelectablePlugin.js +64 -117
- package/esm/plugins/selectable/SelectablePlugin.js.map +7 -0
- package/esm/plugins/selectable/addSelectableColumn.js +39 -57
- package/esm/plugins/selectable/addSelectableColumn.js.map +7 -0
- package/esm/plugins/selectable/helper.js +19 -25
- package/esm/plugins/selectable/helper.js.map +7 -0
- package/esm/plugins/selectable/index.js +6 -1
- package/esm/plugins/selectable/index.js.map +7 -0
- package/esm/plugins/selectable/selectableFormatter.js +54 -97
- package/esm/plugins/selectable/selectableFormatter.js.map +7 -0
- package/esm/plugins/selectable/useSelectableState.js +34 -78
- package/esm/plugins/selectable/useSelectableState.js.map +7 -0
- package/esm/plugins/sortable/SortablePlugin.js +30 -43
- package/esm/plugins/sortable/SortablePlugin.js.map +7 -0
- package/esm/plugins/sortable/checkIfSortable.js +8 -9
- package/esm/plugins/sortable/checkIfSortable.js.map +7 -0
- package/esm/plugins/sortable/index.js +6 -1
- package/esm/plugins/sortable/index.js.map +7 -0
- package/esm/plugins/sortable/sortHeaderFormatter.js +27 -43
- package/esm/plugins/sortable/sortHeaderFormatter.js.map +7 -0
- package/esm/plugins/sortable/sortTree.js +13 -24
- package/esm/plugins/sortable/sortTree.js.map +7 -0
- package/esm/plugins/sortable/sorter.js +112 -163
- package/esm/plugins/sortable/sorter.js.map +7 -0
- package/esm/plugins/sortable/useSortableState.js +22 -49
- package/esm/plugins/sortable/useSortableState.js.map +7 -0
- package/esm/plugins/toolbar/RowRenderer.js +40 -61
- package/esm/plugins/toolbar/RowRenderer.js.map +7 -0
- package/esm/plugins/toolbar/ToolbarPlugin.js +19 -23
- package/esm/plugins/toolbar/ToolbarPlugin.js.map +7 -0
- package/esm/plugins/toolbar/ToolbarTrigger.js +59 -57
- package/esm/plugins/toolbar/ToolbarTrigger.js.map +7 -0
- package/esm/plugins/toolbar/index.js +6 -1
- package/esm/plugins/toolbar/index.js.map +7 -0
- package/esm/plugins/virtualization/AutoHeightList.js +30 -40
- package/esm/plugins/virtualization/AutoHeightList.js.map +7 -0
- package/esm/plugins/virtualization/VirtualizationPlugin.js +55 -84
- package/esm/plugins/virtualization/VirtualizationPlugin.js.map +7 -0
- package/esm/plugins/virtualization/VirtualizedBody.js +94 -132
- package/esm/plugins/virtualization/VirtualizedBody.js.map +7 -0
- package/esm/plugins/virtualization/VirtualizedBodyRow.js +10 -15
- package/esm/plugins/virtualization/VirtualizedBodyRow.js.map +7 -0
- package/esm/plugins/virtualization/helper.js +6 -3
- package/esm/plugins/virtualization/helper.js.map +7 -0
- package/esm/plugins/virtualization/index.js +6 -1
- package/esm/plugins/virtualization/index.js.map +7 -0
- package/esm/renders/CellWithAddons.js +69 -40
- package/esm/renders/CellWithAddons.js.map +7 -0
- package/esm/renders/index.js +8 -2
- package/esm/renders/index.js.map +7 -0
- package/esm/renders/styled.js +49 -16
- package/esm/renders/styled.js.map +7 -0
- package/esm/rowSizes.js +15 -6
- package/esm/rowSizes.js.map +7 -0
- package/esm/utilities/DataGridUtilities.json +1315 -0
- package/esm/utilities/getPluginsFromProps.js +25 -24
- package/esm/utilities/getPluginsFromProps.js.map +7 -0
- package/esm/utilities/getScrollbarSize.js +15 -21
- package/esm/utilities/getScrollbarSize.js.map +7 -0
- package/esm/utilities/normalizeData.js +15 -24
- package/esm/utilities/normalizeData.js.map +7 -0
- package/package.json +20 -20
- package/types/DSDataGrid.d.ts +2 -116
- package/types/DataGridImpl.d.ts +3 -2
- package/types/PaginatedDataGrid.d.ts +1 -2
- package/types/columns/IconColumn.d.ts +3 -2
- package/types/components/BodyCell.d.ts +13 -12
- package/types/components/ColumnVisibilityMenuOption.d.ts +2 -2
- package/types/components/ColumnsOptionsMenuSection.d.ts +1 -0
- 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 +6 -11
- package/types/components/TableBody.d.ts +3 -8
- package/types/components/TableHeader.d.ts +2 -1
- package/types/components/footer/addOptionalFooterComponents.d.ts +1 -0
- package/types/components/header/PrimaryControls.d.ts +1 -0
- 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 +7 -8
- 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 +2 -1
- package/types/plugins/column-sizing/index.d.ts +1 -1
- package/types/plugins/column-sizing/useColumnSizeService.d.ts +2 -1
- package/types/plugins/custom-cell-renderer/addCustomRendererToCell.d.ts +1 -0
- package/types/plugins/custom-cell-renderer/getRendererComponent.d.ts +1 -0
- package/types/plugins/custom-cell-renderer/index.d.ts +1 -1
- package/types/plugins/editable/EditableComponents/ComboBox.d.ts +3 -1
- package/types/plugins/editable/EditableComponents/TextBox.d.ts +3 -1
- package/types/plugins/editable/getEditorComponent.d.ts +1 -0
- package/types/plugins/editable/index.d.ts +2 -2
- package/types/plugins/expandable-grid/ExpandableColumn.d.ts +3 -2
- package/types/plugins/expandable-grid/ExpandedRow.d.ts +1 -0
- package/types/plugins/expandable-grid/ExpandedRowExtra.d.ts +1 -0
- 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 +1 -0
- package/types/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.d.ts +1 -0
- package/types/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.d.ts +2 -1
- package/types/plugins/filterable/components/filterable-menus/TextFilterMenu.d.ts +1 -0
- package/types/plugins/filterable/components/filterable-menus/getFilterMenuByType.d.ts +2 -1
- package/types/plugins/filterable/filterableFormatter.d.ts +3 -2
- package/types/plugins/filterable/filtering-helper/filterRowsByQuery.d.ts +2 -1
- 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 +1 -0
- package/types/plugins/pagination/components/PerPageDropdown.d.ts +1 -0
- package/types/plugins/pagination/helper.d.ts +3 -2
- 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 +1 -0
- package/types/plugins/sortable/index.d.ts +1 -1
- package/types/plugins/sortable/sortHeaderFormatter.d.ts +1 -0
- package/types/plugins/sortable/sortTree.d.ts +1 -0
- 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 +1 -0
- package/types/plugins/virtualization/VirtualizedBodyRow.d.ts +2 -2
- package/types/plugins/virtualization/index.d.ts +1 -1
- package/types/utilities/getPluginsFromProps.d.ts +2 -1
|
@@ -1,46 +1,27 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import DSSeparator from '@elliemae/ds-separator';
|
|
11
|
-
import { aggregatedClasses } from '@elliemae/ds-classnames';
|
|
12
|
-
import { dataGridBlockName } from '../../blockNames.js';
|
|
13
|
-
import { jsxs } from 'react/jsx-runtime';
|
|
14
|
-
|
|
15
|
-
var _DSSeparator;
|
|
16
|
-
|
|
17
|
-
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; }
|
|
18
|
-
|
|
19
|
-
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; }
|
|
20
|
-
const blockName = "".concat(dataGridBlockName, "-expanded-row");
|
|
21
|
-
const DetailsWrapper = aggregatedClasses('div')("".concat(blockName, "-details-wrapper"), null, () => ({
|
|
22
|
-
'ie-flex-basis-auto': true
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2 from "react";
|
|
3
|
+
import { cx } from "@elliemae/ds-utilities";
|
|
4
|
+
import { DSSeparator } from "@elliemae/ds-separator";
|
|
5
|
+
import { aggregatedClasses } from "@elliemae/ds-classnames";
|
|
6
|
+
import { dataGridBlockName } from "../../blockNames";
|
|
7
|
+
const blockName = `${dataGridBlockName}-expanded-row`;
|
|
8
|
+
const DetailsWrapper = aggregatedClasses("div")(`${blockName}-details-wrapper`, null, () => ({
|
|
9
|
+
"ie-flex-basis-auto": true
|
|
23
10
|
}));
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
className: cx(rowProps.className, 'expanded-detail-row'),
|
|
35
|
-
children: [/*#__PURE__*/_jsx(RowComponent, {
|
|
36
|
-
className: "master-row-expanded"
|
|
37
|
-
}, void 0, children), _DSSeparator || (_DSSeparator = /*#__PURE__*/_jsx(DSSeparator, {
|
|
38
|
-
dashed: true,
|
|
39
|
-
margin: "xs"
|
|
40
|
-
})), /*#__PURE__*/_jsx(DetailsWrapper, {}, void 0, renderRowDetails({
|
|
41
|
-
rowData
|
|
42
|
-
}))]
|
|
43
|
-
}));
|
|
11
|
+
function ExpandedRowExtra({ children, rowData, rowProps, rowComponent: RowComponent, renderRowDetails = () => null }) {
|
|
12
|
+
return /* @__PURE__ */ React2.createElement(RowComponent, {
|
|
13
|
+
...rowProps,
|
|
14
|
+
className: cx(rowProps.className, "expanded-detail-row")
|
|
15
|
+
}, /* @__PURE__ */ React2.createElement(RowComponent, {
|
|
16
|
+
className: "master-row-expanded"
|
|
17
|
+
}, children), /* @__PURE__ */ React2.createElement(DSSeparator, {
|
|
18
|
+
dashed: true,
|
|
19
|
+
margin: "xs"
|
|
20
|
+
}), /* @__PURE__ */ React2.createElement(DetailsWrapper, null, renderRowDetails({ rowData })));
|
|
44
21
|
}
|
|
45
|
-
|
|
46
|
-
export {
|
|
22
|
+
var ExpandedRowExtra_default = ExpandedRowExtra;
|
|
23
|
+
export {
|
|
24
|
+
ExpandedRowExtra,
|
|
25
|
+
ExpandedRowExtra_default as default
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=ExpandedRowExtra.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/expandable-grid/ExpandedRowExtra.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { cx } from '@elliemae/ds-utilities';\nimport { DSSeparator } from '@elliemae/ds-separator';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { dataGridBlockName } from '../../blockNames';\n\nconst blockName = `${dataGridBlockName}-expanded-row`;\n\nconst DetailsWrapper = aggregatedClasses('div')(`${blockName}-details-wrapper`, null, () => ({\n 'ie-flex-basis-auto': true,\n}));\n\nfunction ExpandedRowExtra({ children, rowData, rowProps, rowComponent: RowComponent, renderRowDetails = () => null }) {\n return (\n <RowComponent {...rowProps} className={cx(rowProps.className, 'expanded-detail-row')}>\n <RowComponent className=\"master-row-expanded\">{children}</RowComponent>\n <DSSeparator dashed margin=\"xs\" />\n <DetailsWrapper>{renderRowDetails({ rowData })}</DetailsWrapper>\n </RowComponent>\n );\n}\n\nexport { ExpandedRowExtra };\nexport default ExpandedRowExtra;\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AAEA,MAAM,YAAY,GAAG;AAErB,MAAM,iBAAiB,kBAAkB,OAAO,GAAG,6BAA6B,MAAM,MAAO;AAAA,EAC3F,sBAAsB;AAAA;AAGxB,0BAA0B,EAAE,UAAU,SAAS,UAAU,cAAc,cAAc,mBAAmB,MAAM,QAAQ;AACpH,SACE,qCAAC,cAAD;AAAA,OAAkB;AAAA,IAAU,WAAW,GAAG,SAAS,WAAW;AAAA,KAC5D,qCAAC,cAAD;AAAA,IAAc,WAAU;AAAA,KAAuB,WAC/C,qCAAC,aAAD;AAAA,IAAa,QAAM;AAAA,IAAC,QAAO;AAAA,MAC3B,qCAAC,gBAAD,MAAiB,iBAAiB,EAAE;AAAA;AAM1C,IAAO,2BAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { ExpandablePlugin } from "./ExpandablePlugin";
|
|
3
|
+
import { ExpandableColumn } from "./ExpandableColumn";
|
|
4
|
+
export {
|
|
5
|
+
ExpandableColumn,
|
|
6
|
+
ExpandablePlugin
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/expandable-grid/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { ExpandablePlugin } from './ExpandablePlugin';\nexport { ExpandableColumn } from './ExpandableColumn';\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { useState } from
|
|
4
|
-
|
|
5
|
-
const useExpandGridState = grid => {
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { isFunction, useExpandState } from "@elliemae/ds-utilities";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
const useExpandGridState = (grid) => {
|
|
6
5
|
const {
|
|
7
6
|
composedRows,
|
|
8
7
|
props: {
|
|
9
8
|
expandedRows: expandedRowsProp = {},
|
|
10
|
-
rowKey =
|
|
9
|
+
rowKey = "id",
|
|
11
10
|
onExpandRow,
|
|
12
11
|
onToggleShowAllRows,
|
|
13
12
|
onExpandChange,
|
|
@@ -16,10 +15,7 @@ const useExpandGridState = grid => {
|
|
|
16
15
|
onCollapseRow
|
|
17
16
|
}
|
|
18
17
|
} = grid;
|
|
19
|
-
const {
|
|
20
|
-
state,
|
|
21
|
-
actions
|
|
22
|
-
} = useExpandState({
|
|
18
|
+
const { state, actions } = useExpandState({
|
|
23
19
|
items: composedRows,
|
|
24
20
|
itemKey: rowKey,
|
|
25
21
|
expanded: expandedRowsProp,
|
|
@@ -30,22 +26,14 @@ const useExpandGridState = grid => {
|
|
|
30
26
|
onCollapse: onCollapseRow
|
|
31
27
|
});
|
|
32
28
|
const [shouldRefocus, setShouldReFocus] = useState(false);
|
|
33
|
-
|
|
34
|
-
const expandRow = row => actions.expand(row, {
|
|
35
|
-
showAllRows: false
|
|
36
|
-
});
|
|
37
|
-
|
|
29
|
+
const expandRow = (row) => actions.expand(row, { showAllRows: false });
|
|
38
30
|
const toggleExpandAllRows = actions.toggleExpandAll;
|
|
39
31
|
const collapseRow = actions.collapse;
|
|
40
|
-
|
|
41
|
-
const toggleExpand = row => {
|
|
32
|
+
const toggleExpand = (row) => {
|
|
42
33
|
setShouldReFocus(false);
|
|
43
|
-
actions.toggleExpand(row, {
|
|
44
|
-
showAllRows: false
|
|
45
|
-
});
|
|
34
|
+
actions.toggleExpand(row, { showAllRows: false });
|
|
46
35
|
};
|
|
47
|
-
|
|
48
|
-
const toggleShowAllRows = row => {
|
|
36
|
+
const toggleShowAllRows = (row) => {
|
|
49
37
|
if (isFunction(onToggleShowAllRows)) {
|
|
50
38
|
onToggleShowAllRows(row);
|
|
51
39
|
} else {
|
|
@@ -55,7 +43,6 @@ const useExpandGridState = grid => {
|
|
|
55
43
|
});
|
|
56
44
|
}
|
|
57
45
|
};
|
|
58
|
-
|
|
59
46
|
return {
|
|
60
47
|
state: {
|
|
61
48
|
expandedRows: state.expanded,
|
|
@@ -71,5 +58,7 @@ const useExpandGridState = grid => {
|
|
|
71
58
|
}
|
|
72
59
|
};
|
|
73
60
|
};
|
|
74
|
-
|
|
75
|
-
|
|
61
|
+
export {
|
|
62
|
+
useExpandGridState
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=useExpandGridState.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/expandable-grid/useExpandGridState.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { isFunction,useExpandState } from '@elliemae/ds-utilities';\nimport { useState } from 'react';\n\nexport const useExpandGridState = (grid) => {\n const {\n composedRows,\n props: {\n expandedRows: expandedRowsProp = {},\n rowKey = 'id',\n onExpandRow,\n onToggleShowAllRows,\n onExpandChange,\n onExpandAll,\n onToggleExpand,\n onCollapseRow,\n },\n } = grid;\n\n const { state, actions } = useExpandState({\n items: composedRows,\n itemKey: rowKey,\n expanded: expandedRowsProp,\n onExpand: onExpandRow,\n onExpandChange,\n onExpandAll,\n onToggleExpand,\n onCollapse: onCollapseRow,\n });\n\n const [shouldRefocus, setShouldReFocus] = useState(false);\n const expandRow = (row) => actions.expand(row, { showAllRows: false });\n\n const toggleExpandAllRows = actions.toggleExpandAll;\n\n const collapseRow = actions.collapse;\n\n const toggleExpand = (row) => {\n setShouldReFocus(false);\n actions.toggleExpand(row, { showAllRows: false });\n };\n\n const toggleShowAllRows = (row) => {\n if (isFunction(onToggleShowAllRows)) {\n onToggleShowAllRows(row);\n } else {\n const key = row[rowKey];\n actions.expand(row, {\n showAllRows: state.expanded[key] && !state.expanded[key].showAllRows,\n });\n }\n };\n\n return {\n state: {\n expandedRows: state.expanded,\n isExpandedAll: state.isExpandedAll,\n shouldRefocus,\n },\n actions: {\n expandRow,\n toggleExpandAllRows,\n toggleExpand,\n toggleShowAllRows,\n collapseRow,\n },\n };\n};\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AAEO,MAAM,qBAAqB,CAAC,SAAS;AAC1C,QAAM;AAAA,IACJ;AAAA,IACA,OAAO;AAAA,MACL,cAAc,mBAAmB;AAAA,MACjC,SAAS;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,MAEA;AAEJ,QAAM,EAAE,OAAO,YAAY,eAAe;AAAA,IACxC,OAAO;AAAA,IACP,SAAS;AAAA,IACT,UAAU;AAAA,IACV,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA,YAAY;AAAA;AAGd,QAAM,CAAC,eAAe,oBAAoB,SAAS;AACnD,QAAM,YAAY,CAAC,QAAQ,QAAQ,OAAO,KAAK,EAAE,aAAa;AAE9D,QAAM,sBAAsB,QAAQ;AAEpC,QAAM,cAAc,QAAQ;AAE5B,QAAM,eAAe,CAAC,QAAQ;AAC5B,qBAAiB;AACjB,YAAQ,aAAa,KAAK,EAAE,aAAa;AAAA;AAG3C,QAAM,oBAAoB,CAAC,QAAQ;AACjC,QAAI,WAAW,sBAAsB;AACnC,0BAAoB;AAAA,WACf;AACL,YAAM,MAAM,IAAI;AAChB,cAAQ,OAAO,KAAK;AAAA,QAClB,aAAa,MAAM,SAAS,QAAQ,CAAC,MAAM,SAAS,KAAK;AAAA;AAAA;AAAA;AAK/D,SAAO;AAAA,IACL,OAAO;AAAA,MACL,cAAc,MAAM;AAAA,MACpB,eAAe,MAAM;AAAA,MACrB;AAAA;AAAA,IAEF,SAAS;AAAA,MACP;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,156 +1,105 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import 'core-js/modules/esnext.iterator.reduce.js';
|
|
7
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
8
|
-
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
9
|
-
import 'core-js/modules/esnext.iterator.map.js';
|
|
10
|
-
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
11
|
-
import 'core-js/modules/esnext.iterator.filter.js';
|
|
12
|
-
import 'core-js/modules/es.string.replace.js';
|
|
13
|
-
import 'core-js/modules/web.url.js';
|
|
14
|
-
import 'core-js/modules/web.url-search-params.js';
|
|
15
|
-
import { get } from '@elliemae/ds-utilities';
|
|
16
|
-
import createInstancePlugin from '@elliemae/ds-shared/createDataInstance/createInstancePlugin';
|
|
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
|
-
const isVisible = column => {
|
|
23
|
-
if (typeof column === 'undefined') {
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { get } from "@elliemae/ds-utilities";
|
|
3
|
+
import { createInstancePlugin } from "@elliemae/ds-shared/createDataInstance/createInstancePlugin";
|
|
4
|
+
const isVisible = (column) => {
|
|
5
|
+
if (typeof column === "undefined") {
|
|
24
6
|
return false;
|
|
25
7
|
}
|
|
26
|
-
|
|
27
|
-
return typeof column.visible === 'undefined' || column.visible;
|
|
8
|
+
return typeof column.visible === "undefined" || column.visible;
|
|
28
9
|
};
|
|
29
|
-
|
|
30
10
|
const getColumnValue = (row, property) => get(row, property);
|
|
31
11
|
const getVisibleRowData = (row, columns) => columns.reduce((result, column) => {
|
|
32
12
|
const columnProperty = column.property;
|
|
33
|
-
return isVisible(column) ? [...result, getColumnValue(row,
|
|
13
|
+
return isVisible(column) ? [...result, getColumnValue(row, `_${columnProperty}`) || getColumnValue(row, columnProperty)] : result;
|
|
34
14
|
}, []);
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
type: 'csv',
|
|
15
|
+
const defaultOptions = (uuid) => ({
|
|
16
|
+
sheetName: "SheetName",
|
|
17
|
+
fileName: `datagrid-${uuid}`,
|
|
18
|
+
type: "csv",
|
|
40
19
|
onlySelection: false,
|
|
41
|
-
excludedColumns:
|
|
20
|
+
excludedColumns: void 0
|
|
42
21
|
});
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
22
|
+
const getOptions = (opts, uuid) => ({
|
|
23
|
+
...defaultOptions(uuid),
|
|
24
|
+
...opts
|
|
25
|
+
});
|
|
26
|
+
const getCellValue = (cell) => {
|
|
27
|
+
if (cell === void 0 || cell === null)
|
|
28
|
+
return "";
|
|
48
29
|
return cell;
|
|
49
30
|
};
|
|
50
|
-
|
|
51
31
|
const getExportedData = (rows, columns, range) => {
|
|
52
32
|
const rowsRanged = range ? rows.slice(...range) : rows;
|
|
53
|
-
const dataToExport = rowsRanged.map(row => getVisibleRowData(row, columns));
|
|
54
|
-
const columnsContent = columns.filter(c => isVisible(c)).reduce((acc, curr, idx) =>
|
|
55
|
-
const rowsContent = dataToExport.map(e => e.map(r => "
|
|
56
|
-
const csvContent =
|
|
33
|
+
const dataToExport = rowsRanged.map((row) => getVisibleRowData(row, columns));
|
|
34
|
+
const columnsContent = columns.filter((c) => isVisible(c)).reduce((acc, curr, idx) => `${acc}${idx === 0 ? "" : ","}${curr.label}`, "");
|
|
35
|
+
const rowsContent = dataToExport.map((e) => e.map((r) => `"${String(getCellValue(r)).replace(/"/g, '""')}"`).join(",")).join("\r\n");
|
|
36
|
+
const csvContent = `${columnsContent}\r
|
|
37
|
+
${rowsContent}`;
|
|
57
38
|
return csvContent;
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
const exportTo = (rows, columns, _ref) => {
|
|
61
|
-
let {
|
|
62
|
-
range,
|
|
63
|
-
fileName,
|
|
64
|
-
type,
|
|
65
|
-
excludedColumns
|
|
66
|
-
} = _ref;
|
|
67
|
-
|
|
39
|
+
};
|
|
40
|
+
const exportTo = (rows, columns, { range, fileName, type, excludedColumns }) => {
|
|
68
41
|
if (excludedColumns) {
|
|
69
|
-
|
|
70
|
-
columns = columns.filter(col => !excludedColumns.includes(col.property));
|
|
42
|
+
columns = columns.filter((col) => !excludedColumns.includes(col.property));
|
|
71
43
|
}
|
|
72
|
-
|
|
73
44
|
const csvContent = getExportedData(rows, columns, range);
|
|
74
|
-
const blob = new Blob([csvContent], {
|
|
75
|
-
type: 'text/csv;charset=utf-8;'
|
|
76
|
-
});
|
|
77
|
-
|
|
45
|
+
const blob = new Blob([csvContent], { type: "text/csv;charset=utf-8;" });
|
|
78
46
|
if (navigator.msSaveBlob) {
|
|
79
|
-
|
|
80
|
-
navigator.msSaveBlob(blob, "".concat(fileName, ".").concat(type));
|
|
47
|
+
navigator.msSaveBlob(blob, `${fileName}.${type}`);
|
|
81
48
|
} else {
|
|
82
|
-
const link = document.createElement(
|
|
83
|
-
|
|
84
|
-
if (link.download !== undefined) {
|
|
85
|
-
// feature detection
|
|
86
|
-
// Browsers that support HTML5 download attribute
|
|
49
|
+
const link = document.createElement("a");
|
|
50
|
+
if (link.download !== void 0) {
|
|
87
51
|
const url = URL.createObjectURL(blob);
|
|
88
|
-
link.setAttribute(
|
|
89
|
-
link.setAttribute(
|
|
90
|
-
link.style.visibility =
|
|
52
|
+
link.setAttribute("href", url);
|
|
53
|
+
link.setAttribute("download", `${fileName}.${type}`);
|
|
54
|
+
link.style.visibility = "hidden";
|
|
91
55
|
document.body.appendChild(link);
|
|
92
56
|
link.click();
|
|
93
57
|
document.body.removeChild(link);
|
|
94
58
|
}
|
|
95
59
|
}
|
|
96
60
|
};
|
|
97
|
-
|
|
98
|
-
const ExportDataPlugin = createInstancePlugin('export-data', {
|
|
61
|
+
const ExportDataPlugin = createInstancePlugin("export-data", {
|
|
99
62
|
decorateGrid(instance) {
|
|
100
63
|
return {
|
|
101
|
-
exportRows() {
|
|
102
|
-
let opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
64
|
+
exportRows(opts = {}) {
|
|
103
65
|
const {
|
|
104
66
|
composedRows: rows,
|
|
105
67
|
columns,
|
|
106
68
|
uuid,
|
|
107
|
-
props: {
|
|
108
|
-
|
|
109
|
-
},
|
|
110
|
-
state: {
|
|
111
|
-
selection
|
|
112
|
-
}
|
|
69
|
+
props: { rowKey },
|
|
70
|
+
state: { selection }
|
|
113
71
|
} = instance.getInstance();
|
|
114
|
-
const options = getOptions(opts, uuid);
|
|
115
|
-
|
|
72
|
+
const options = getOptions(opts, uuid);
|
|
116
73
|
let currentRows = rows.allRows || rows;
|
|
117
|
-
|
|
118
74
|
if (opts.onlySelection) {
|
|
119
75
|
const selectedRows = Object.keys(selection.selectedRows);
|
|
120
|
-
currentRows = currentRows.filter(r => selectedRows.includes(String(r[rowKey])));
|
|
76
|
+
currentRows = currentRows.filter((r) => selectedRows.includes(String(r[rowKey])));
|
|
121
77
|
}
|
|
122
|
-
|
|
123
78
|
exportTo(currentRows, columns, options);
|
|
124
79
|
},
|
|
125
|
-
|
|
126
|
-
exportVisibleRows() {
|
|
127
|
-
let opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
80
|
+
exportVisibleRows(opts = {}) {
|
|
128
81
|
const {
|
|
129
82
|
composedRows: rows,
|
|
130
83
|
columns,
|
|
131
84
|
uuid,
|
|
132
|
-
props: {
|
|
133
|
-
|
|
134
|
-
},
|
|
135
|
-
state: {
|
|
136
|
-
selection
|
|
137
|
-
}
|
|
85
|
+
props: { rowKey },
|
|
86
|
+
state: { selection }
|
|
138
87
|
} = instance.getInstance();
|
|
139
|
-
const options = getOptions(opts, uuid);
|
|
140
|
-
|
|
88
|
+
const options = getOptions(opts, uuid);
|
|
141
89
|
let currentRows = rows.rows || rows;
|
|
142
|
-
|
|
143
90
|
if (opts.onlySelection) {
|
|
144
91
|
const selectedRows = Object.keys(selection.selectedRows);
|
|
145
|
-
currentRows = currentRows.filter(r => selectedRows.includes(String(r[rowKey])));
|
|
92
|
+
currentRows = currentRows.filter((r) => selectedRows.includes(String(r[rowKey])));
|
|
146
93
|
}
|
|
147
|
-
|
|
148
94
|
exportTo(currentRows, columns, options);
|
|
149
95
|
}
|
|
150
|
-
|
|
151
96
|
};
|
|
152
97
|
}
|
|
153
|
-
|
|
154
98
|
});
|
|
155
|
-
|
|
156
|
-
|
|
99
|
+
export {
|
|
100
|
+
ExportDataPlugin,
|
|
101
|
+
getColumnValue,
|
|
102
|
+
getExportedData,
|
|
103
|
+
getVisibleRowData
|
|
104
|
+
};
|
|
105
|
+
//# sourceMappingURL=ExportDataPlugin.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/export-data/ExportDataPlugin.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable indent */\nimport { get } from '@elliemae/ds-utilities';\nimport { createInstancePlugin } from '@elliemae/ds-shared/createDataInstance/createInstancePlugin';\n\nconst isVisible = (column) => {\n if (typeof column === 'undefined') {\n return false;\n }\n return typeof column.visible === 'undefined' || column.visible;\n};\n\nexport const getColumnValue = (row, property) => get(row, property);\nexport const getVisibleRowData = (row, columns) =>\n columns.reduce((result, column) => {\n const columnProperty = column.property;\n return isVisible(column)\n ? [...result, getColumnValue(row, `_${columnProperty}`) || getColumnValue(row, columnProperty)]\n : result;\n }, []);\n\nconst defaultOptions = (uuid) => ({\n sheetName: 'SheetName',\n fileName: `datagrid-${uuid}`,\n type: 'csv',\n onlySelection: false,\n excludedColumns: undefined,\n});\n\nconst getOptions = (opts, uuid) => ({\n ...defaultOptions(uuid),\n ...opts,\n});\n\nconst getCellValue = (cell) => {\n if (cell === undefined || cell === null) return '';\n return cell;\n};\n\nexport const getExportedData = (rows, columns, range) => {\n const rowsRanged = range ? rows.slice(...range) : rows;\n const dataToExport = rowsRanged.map((row) => getVisibleRowData(row, columns));\n const columnsContent = columns\n .filter((c) => isVisible(c))\n .reduce((acc, curr, idx) => `${acc}${idx === 0 ? '' : ','}${curr.label}`, '');\n const rowsContent = dataToExport\n .map((e) => e.map((r) => `\"${String(getCellValue(r)).replace(/\"/g, '\"\"')}\"`).join(','))\n .join('\\r\\n');\n const csvContent = `${columnsContent}\\r\\n${rowsContent}`;\n return csvContent;\n};\n\n// eslint-disable-next-line max-statements\nconst exportTo = (rows, columns, { range, fileName, type, excludedColumns }) => {\n if (excludedColumns) {\n // eslint-disable-next-line no-param-reassign\n columns = columns.filter((col) => !excludedColumns.includes(col.property));\n }\n const csvContent = getExportedData(rows, columns, range);\n\n const blob = new Blob([csvContent], { type: 'text/csv;charset=utf-8;' });\n if (navigator.msSaveBlob) {\n // IE 10+\n navigator.msSaveBlob(blob, `${fileName}.${type}`);\n } else {\n const link = document.createElement('a');\n if (link.download !== undefined) {\n // feature detection\n // Browsers that support HTML5 download attribute\n const url = URL.createObjectURL(blob);\n link.setAttribute('href', url);\n link.setAttribute('download', `${fileName}.${type}`);\n link.style.visibility = 'hidden';\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n }\n }\n};\n\nexport const ExportDataPlugin = createInstancePlugin('export-data', {\n decorateGrid(instance) {\n return {\n exportRows(opts = {}) {\n const {\n composedRows: rows,\n columns,\n uuid,\n props: { rowKey },\n state: { selection },\n } = instance.getInstance();\n const options = getOptions(opts, uuid);\n // check paginated rows\n let currentRows = rows.allRows || rows;\n if (opts.onlySelection) {\n const selectedRows = Object.keys(selection.selectedRows);\n currentRows = currentRows.filter((r) => selectedRows.includes(String(r[rowKey])));\n }\n\n exportTo(currentRows, columns, options);\n },\n exportVisibleRows(opts = {}) {\n const {\n composedRows: rows,\n columns,\n uuid,\n props: { rowKey },\n state: { selection },\n } = instance.getInstance();\n const options = getOptions(opts, uuid);\n\n // check paginated rows\n let currentRows = rows.rows || rows;\n if (opts.onlySelection) {\n const selectedRows = Object.keys(selection.selectedRows);\n currentRows = currentRows.filter((r) => selectedRows.includes(String(r[rowKey])));\n }\n\n exportTo(currentRows, columns, options);\n },\n };\n },\n});\n"],
|
|
5
|
+
"mappings": "AAAA;ACEA;AACA;AAEA,MAAM,YAAY,CAAC,WAAW;AAC5B,MAAI,OAAO,WAAW,aAAa;AACjC,WAAO;AAAA;AAET,SAAO,OAAO,OAAO,YAAY,eAAe,OAAO;AAAA;AAGlD,MAAM,iBAAiB,CAAC,KAAK,aAAa,IAAI,KAAK;AACnD,MAAM,oBAAoB,CAAC,KAAK,YACrC,QAAQ,OAAO,CAAC,QAAQ,WAAW;AACjC,QAAM,iBAAiB,OAAO;AAC9B,SAAO,UAAU,UACb,CAAC,GAAG,QAAQ,eAAe,KAAK,IAAI,qBAAqB,eAAe,KAAK,mBAC7E;AAAA,GACH;AAEL,MAAM,iBAAiB,CAAC,SAAU;AAAA,EAChC,WAAW;AAAA,EACX,UAAU,YAAY;AAAA,EACtB,MAAM;AAAA,EACN,eAAe;AAAA,EACf,iBAAiB;AAAA;AAGnB,MAAM,aAAa,CAAC,MAAM,SAAU;AAAA,KAC/B,eAAe;AAAA,KACf;AAAA;AAGL,MAAM,eAAe,CAAC,SAAS;AAC7B,MAAI,SAAS,UAAa,SAAS;AAAM,WAAO;AAChD,SAAO;AAAA;AAGF,MAAM,kBAAkB,CAAC,MAAM,SAAS,UAAU;AACvD,QAAM,aAAa,QAAQ,KAAK,MAAM,GAAG,SAAS;AAClD,QAAM,eAAe,WAAW,IAAI,CAAC,QAAQ,kBAAkB,KAAK;AACpE,QAAM,iBAAiB,QACpB,OAAO,CAAC,MAAM,UAAU,IACxB,OAAO,CAAC,KAAK,MAAM,QAAQ,GAAG,MAAM,QAAQ,IAAI,KAAK,MAAM,KAAK,SAAS;AAC5E,QAAM,cAAc,aACjB,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,OAAO,aAAa,IAAI,QAAQ,MAAM,UAAU,KAAK,MACjF,KAAK;AACR,QAAM,aAAa,GAAG;AAAA,EAAqB;AAC3C,SAAO;AAAA;AAIT,MAAM,WAAW,CAAC,MAAM,SAAS,EAAE,OAAO,UAAU,MAAM,sBAAsB;AAC9E,MAAI,iBAAiB;AAEnB,cAAU,QAAQ,OAAO,CAAC,QAAQ,CAAC,gBAAgB,SAAS,IAAI;AAAA;AAElE,QAAM,aAAa,gBAAgB,MAAM,SAAS;AAElD,QAAM,OAAO,IAAI,KAAK,CAAC,aAAa,EAAE,MAAM;AAC5C,MAAI,UAAU,YAAY;AAExB,cAAU,WAAW,MAAM,GAAG,YAAY;AAAA,SACrC;AACL,UAAM,OAAO,SAAS,cAAc;AACpC,QAAI,KAAK,aAAa,QAAW;AAG/B,YAAM,MAAM,IAAI,gBAAgB;AAChC,WAAK,aAAa,QAAQ;AAC1B,WAAK,aAAa,YAAY,GAAG,YAAY;AAC7C,WAAK,MAAM,aAAa;AACxB,eAAS,KAAK,YAAY;AAC1B,WAAK;AACL,eAAS,KAAK,YAAY;AAAA;AAAA;AAAA;AAKzB,MAAM,mBAAmB,qBAAqB,eAAe;AAAA,EAClE,aAAa,UAAU;AACrB,WAAO;AAAA,MACL,WAAW,OAAO,IAAI;AACpB,cAAM;AAAA,UACJ,cAAc;AAAA,UACd;AAAA,UACA;AAAA,UACA,OAAO,EAAE;AAAA,UACT,OAAO,EAAE;AAAA,YACP,SAAS;AACb,cAAM,UAAU,WAAW,MAAM;AAEjC,YAAI,cAAc,KAAK,WAAW;AAClC,YAAI,KAAK,eAAe;AACtB,gBAAM,eAAe,OAAO,KAAK,UAAU;AAC3C,wBAAc,YAAY,OAAO,CAAC,MAAM,aAAa,SAAS,OAAO,EAAE;AAAA;AAGzE,iBAAS,aAAa,SAAS;AAAA;AAAA,MAEjC,kBAAkB,OAAO,IAAI;AAC3B,cAAM;AAAA,UACJ,cAAc;AAAA,UACd;AAAA,UACA;AAAA,UACA,OAAO,EAAE;AAAA,UACT,OAAO,EAAE;AAAA,YACP,SAAS;AACb,cAAM,UAAU,WAAW,MAAM;AAGjC,YAAI,cAAc,KAAK,QAAQ;AAC/B,YAAI,KAAK,eAAe;AACtB,gBAAM,eAAe,OAAO,KAAK,UAAU;AAC3C,wBAAc,YAAY,OAAO,CAAC,MAAM,aAAa,SAAS,OAAO,EAAE;AAAA;AAGzE,iBAAS,aAAa,SAAS;AAAA;AAAA;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { ExportDataPlugin } from "./ExportDataPlugin";
|
|
3
|
+
export {
|
|
4
|
+
ExportDataPlugin
|
|
5
|
+
};
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/export-data/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { ExportDataPlugin } from './ExportDataPlugin';\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,25 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
/* eslint-disable indent */
|
|
8
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { get, isFunction } from "@elliemae/ds-utilities";
|
|
3
|
+
import { createInstancePlugin } from "@elliemae/ds-shared/createDataInstance/createInstancePlugin";
|
|
4
|
+
import { addFilterToColumn } from "./addFilterToColumn";
|
|
5
|
+
import filterRowsByQuery, { filterRowsByQueryGroup } from "./filtering-helper/filterRowsByQuery";
|
|
6
|
+
import { useFilterableState } from "./useFilterableState";
|
|
9
7
|
const decorateColumn = (column, grid) => {
|
|
10
8
|
const {
|
|
11
|
-
props: {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
},
|
|
15
|
-
actions: {
|
|
16
|
-
addFilter,
|
|
17
|
-
removeFilter
|
|
18
|
-
},
|
|
19
|
-
state: {
|
|
20
|
-
query,
|
|
21
|
-
filters
|
|
22
|
-
}
|
|
9
|
+
props: { isFilterableColumnActive = (col) => col.searchable, onRemoveAllFilters },
|
|
10
|
+
actions: { addFilter, removeFilter },
|
|
11
|
+
state: { query, filters }
|
|
23
12
|
} = grid;
|
|
24
13
|
return isFilterableColumnActive(column) ? addFilterToColumn({
|
|
25
14
|
grid,
|
|
@@ -30,44 +19,33 @@ const decorateColumn = (column, grid) => {
|
|
|
30
19
|
filters
|
|
31
20
|
}, column) : column;
|
|
32
21
|
};
|
|
33
|
-
|
|
34
22
|
const composeRows = (rows, grid) => {
|
|
35
23
|
const {
|
|
36
|
-
props: {
|
|
37
|
-
|
|
38
|
-
groupedRows
|
|
39
|
-
},
|
|
40
|
-
state: {
|
|
41
|
-
query
|
|
42
|
-
},
|
|
24
|
+
props: { isDataFiltered, groupedRows },
|
|
25
|
+
state: { query },
|
|
43
26
|
composedRows
|
|
44
27
|
} = grid.getInstance();
|
|
45
28
|
const nextRows = !groupedRows ? filterRowsByQuery(rows, query) : filterRowsByQueryGroup(rows, query, composedRows);
|
|
46
29
|
return !isDataFiltered ? nextRows : rows;
|
|
47
30
|
};
|
|
48
|
-
|
|
49
|
-
const FilterablePlugin = createInstancePlugin('filterable', {
|
|
31
|
+
const FilterablePlugin = createInstancePlugin("filterable", {
|
|
50
32
|
registerStateHook: useFilterableState,
|
|
51
33
|
decorateColumn,
|
|
52
34
|
composeRows,
|
|
53
|
-
|
|
54
35
|
registerHotKeys(grid) {
|
|
55
36
|
return {
|
|
56
|
-
key:
|
|
57
|
-
handler:
|
|
58
|
-
|
|
59
|
-
cellIndex
|
|
60
|
-
} = _ref;
|
|
61
|
-
const {
|
|
62
|
-
decoratedColumns
|
|
63
|
-
} = grid.getInstance();
|
|
37
|
+
key: "ctrl+f",
|
|
38
|
+
handler: ({ cellIndex }) => {
|
|
39
|
+
const { decoratedColumns } = grid.getInstance();
|
|
64
40
|
const column = decoratedColumns[cellIndex];
|
|
65
|
-
const toggleMenuMethod = get(column, [
|
|
66
|
-
if (isFunction(toggleMenuMethod))
|
|
41
|
+
const toggleMenuMethod = get(column, ["filterMenu", "current", "toggleMenu"]);
|
|
42
|
+
if (isFunction(toggleMenuMethod))
|
|
43
|
+
toggleMenuMethod();
|
|
67
44
|
}
|
|
68
45
|
};
|
|
69
46
|
}
|
|
70
|
-
|
|
71
47
|
});
|
|
72
|
-
|
|
73
|
-
|
|
48
|
+
export {
|
|
49
|
+
FilterablePlugin
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=FilterablePlugin.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/filterable/FilterablePlugin.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable indent */\nimport { get, isFunction } from '@elliemae/ds-utilities';\nimport { createInstancePlugin } from '@elliemae/ds-shared/createDataInstance/createInstancePlugin';\nimport { addFilterToColumn } from './addFilterToColumn';\n\nimport filterRowsByQuery, { filterRowsByQueryGroup } from './filtering-helper/filterRowsByQuery';\nimport { useFilterableState } from './useFilterableState';\n\nconst decorateColumn = (column, grid) => {\n const {\n props: { isFilterableColumnActive = (col) => col.searchable, onRemoveAllFilters },\n actions: { addFilter, removeFilter },\n state: { query, filters },\n } = grid;\n\n return isFilterableColumnActive(column)\n ? addFilterToColumn(\n {\n grid,\n onAddFilter: addFilter,\n onRemoveFilter: removeFilter,\n onRemoveAllFilters,\n query,\n filters,\n },\n column,\n )\n : column;\n};\n\nconst composeRows = (rows, grid) => {\n const {\n props: { isDataFiltered, groupedRows },\n state: { query },\n composedRows,\n } = grid.getInstance();\n const nextRows = !groupedRows ? filterRowsByQuery(rows, query) : filterRowsByQueryGroup(rows, query, composedRows);\n\n return !isDataFiltered ? nextRows : rows;\n};\n\nexport const FilterablePlugin = createInstancePlugin('filterable', {\n registerStateHook: useFilterableState,\n decorateColumn,\n composeRows,\n registerHotKeys(grid) {\n return {\n key: 'ctrl+f',\n handler: ({ cellIndex }) => {\n const { decoratedColumns } = grid.getInstance();\n\n const column = decoratedColumns[cellIndex];\n const toggleMenuMethod = get(column, ['filterMenu', 'current', 'toggleMenu']);\n if (isFunction(toggleMenuMethod)) toggleMenuMethod();\n },\n };\n },\n});\n"],
|
|
5
|
+
"mappings": "AAAA;ACCA;AACA;AACA;AAEA;AACA;AAEA,MAAM,iBAAiB,CAAC,QAAQ,SAAS;AACvC,QAAM;AAAA,IACJ,OAAO,EAAE,2BAA2B,CAAC,QAAQ,IAAI,YAAY;AAAA,IAC7D,SAAS,EAAE,WAAW;AAAA,IACtB,OAAO,EAAE,OAAO;AAAA,MACd;AAEJ,SAAO,yBAAyB,UAC5B,kBACE;AAAA,IACE;AAAA,IACA,aAAa;AAAA,IACb,gBAAgB;AAAA,IAChB;AAAA,IACA;AAAA,IACA;AAAA,KAEF,UAEF;AAAA;AAGN,MAAM,cAAc,CAAC,MAAM,SAAS;AAClC,QAAM;AAAA,IACJ,OAAO,EAAE,gBAAgB;AAAA,IACzB,OAAO,EAAE;AAAA,IACT;AAAA,MACE,KAAK;AACT,QAAM,WAAW,CAAC,cAAc,kBAAkB,MAAM,SAAS,uBAAuB,MAAM,OAAO;AAErG,SAAO,CAAC,iBAAiB,WAAW;AAAA;AAG/B,MAAM,mBAAmB,qBAAqB,cAAc;AAAA,EACjE,mBAAmB;AAAA,EACnB;AAAA,EACA;AAAA,EACA,gBAAgB,MAAM;AACpB,WAAO;AAAA,MACL,KAAK;AAAA,MACL,SAAS,CAAC,EAAE,gBAAgB;AAC1B,cAAM,EAAE,qBAAqB,KAAK;AAElC,cAAM,SAAS,iBAAiB;AAChC,cAAM,mBAAmB,IAAI,QAAQ,CAAC,cAAc,WAAW;AAC/D,YAAI,WAAW;AAAmB;AAAA;AAAA;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,23 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
|
-
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
7
|
-
import { createRef } from 'react';
|
|
8
|
-
import { mergeClassNameToColumnHeader } from '@elliemae/ds-shared/useDataGrid/initColumnDefinition';
|
|
9
|
-
import FilterableFormatter from './filterableFormatter.js';
|
|
10
|
-
|
|
11
|
-
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; }
|
|
12
|
-
|
|
13
|
-
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; }
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { createRef } from "react";
|
|
3
|
+
import { mergeClassNameToColumnHeader } from "@elliemae/ds-shared/useDataGrid/initColumnDefinition";
|
|
4
|
+
import { FilterableFormatter } from "./filterableFormatter";
|
|
14
5
|
const addFilterToColumn = (props, column) => {
|
|
15
|
-
const filterMenuRef =
|
|
16
|
-
column.header.formatters.push(FilterableFormatter(
|
|
17
|
-
filterMenuRef
|
|
18
|
-
})));
|
|
6
|
+
const filterMenuRef = createRef();
|
|
7
|
+
column.header.formatters.push(FilterableFormatter({ ...props, filterMenuRef }));
|
|
19
8
|
column.filterMenu = filterMenuRef;
|
|
20
|
-
return mergeClassNameToColumnHeader(
|
|
9
|
+
return mergeClassNameToColumnHeader("with-filtering", column);
|
|
21
10
|
};
|
|
22
|
-
|
|
23
|
-
|
|
11
|
+
export {
|
|
12
|
+
addFilterToColumn
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=addFilterToColumn.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/filterable/addFilterToColumn.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { createRef } from 'react';\nimport { mergeClassNameToColumnHeader } from '@elliemae/ds-shared/useDataGrid/initColumnDefinition';\nimport { FilterableFormatter } from './filterableFormatter';\n\nexport const addFilterToColumn = (props, column) => {\n const filterMenuRef = createRef();\n column.header.formatters.push(\n FilterableFormatter({ ...props, filterMenuRef }),\n );\n column.filterMenu = filterMenuRef;\n return mergeClassNameToColumnHeader('with-filtering', column);\n};\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AACA;AAEO,MAAM,oBAAoB,CAAC,OAAO,WAAW;AAClD,QAAM,gBAAgB;AACtB,SAAO,OAAO,WAAW,KACvB,oBAAoB,KAAK,OAAO;AAElC,SAAO,aAAa;AACpB,SAAO,6BAA6B,kBAAkB;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|