@elliemae/ds-datagrids 3.16.0-next.1 → 3.16.0-next.11
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/DSDataGrid.js +249 -241
- package/dist/cjs/DSDataGrid.js.map +2 -2
- package/dist/cjs/DataGridImpl.js +11 -11
- package/dist/cjs/DataGridImpl.js.map +1 -1
- package/dist/cjs/PaginatedDataGrid.js +9 -9
- package/dist/cjs/PaginatedDataGrid.js.map +2 -2
- package/dist/cjs/components/BodyList.js +3 -5
- package/dist/cjs/components/BodyList.js.map +2 -2
- package/dist/cjs/components/ColumnVisibilityMenuOption.js +1 -6
- package/dist/cjs/components/ColumnVisibilityMenuOption.js.map +2 -2
- package/dist/cjs/components/ColumnsOptionsMenuSection.js +2 -11
- package/dist/cjs/components/ColumnsOptionsMenuSection.js.map +2 -2
- package/dist/cjs/components/EmptyState.js +5 -6
- package/dist/cjs/components/EmptyState.js.map +3 -3
- package/dist/cjs/components/List.js +2 -2
- package/dist/cjs/components/List.js.map +2 -2
- package/dist/cjs/components/ListItem.js +3 -6
- package/dist/cjs/components/ListItem.js.map +2 -2
- package/dist/cjs/components/NoResults.js +4 -10
- package/dist/cjs/components/NoResults.js.map +2 -2
- package/dist/cjs/components/RowsLoader.js +1 -1
- package/dist/cjs/components/RowsLoader.js.map +1 -1
- package/dist/cjs/components/Table.js +5 -5
- package/dist/cjs/components/Table.js.map +1 -1
- package/dist/cjs/components/TableBody.js +2 -7
- package/dist/cjs/components/TableBody.js.map +2 -2
- package/dist/cjs/components/TableHeader.js +1 -1
- package/dist/cjs/components/TableHeader.js.map +2 -2
- package/dist/cjs/components/footer/addOptionalFooterComponents.js +1 -1
- package/dist/cjs/components/footer/addOptionalFooterComponents.js.map +1 -1
- package/dist/cjs/components/index.js +5 -5
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/components/renderers/defaultClassedRenderers.js +16 -36
- package/dist/cjs/components/renderers/defaultClassedRenderers.js.map +2 -2
- package/dist/cjs/components/renderers/index.js +2 -2
- package/dist/cjs/components/renderers/index.js.map +1 -1
- package/dist/cjs/components/renderers/renderRowsLoader.js +2 -4
- package/dist/cjs/components/renderers/renderRowsLoader.js.map +2 -2
- package/dist/cjs/defaultPlugins.js +5 -10
- package/dist/cjs/defaultPlugins.js.map +2 -2
- package/dist/cjs/index.js +9 -9
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/package.json +7 -0
- package/dist/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +22 -18
- package/dist/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js.map +2 -2
- package/dist/cjs/plugins/body-header-scroll-sync/index.js +1 -1
- package/dist/cjs/plugins/body-header-scroll-sync/index.js.map +1 -1
- package/dist/cjs/plugins/column-dnd/DndColumnsPlugin.js +1 -1
- package/dist/cjs/plugins/column-dnd/DndColumnsPlugin.js.map +1 -1
- package/dist/cjs/plugins/column-dnd/index.js +1 -1
- package/dist/cjs/plugins/column-dnd/index.js.map +1 -1
- package/dist/cjs/plugins/column-sizing/ColumnSizingPlugin.js +4 -4
- package/dist/cjs/plugins/column-sizing/ColumnSizingPlugin.js.map +1 -1
- package/dist/cjs/plugins/column-sizing/ext-points/decorateColumn.js +1 -1
- package/dist/cjs/plugins/column-sizing/ext-points/decorateColumn.js.map +1 -1
- package/dist/cjs/plugins/column-sizing/ext-points/getTableProps.js +1 -1
- package/dist/cjs/plugins/column-sizing/ext-points/getTableProps.js.map +1 -1
- package/dist/cjs/plugins/column-sizing/index.js +1 -1
- package/dist/cjs/plugins/column-sizing/index.js.map +1 -1
- package/dist/cjs/plugins/column-sizing/useColumnSizeService.js +7 -26
- package/dist/cjs/plugins/column-sizing/useColumnSizeService.js.map +2 -2
- package/dist/cjs/plugins/column-sizing/useStylesheetHelpers.js +2 -2
- package/dist/cjs/plugins/column-sizing/useStylesheetHelpers.js.map +1 -1
- package/dist/cjs/plugins/custom-cell-renderer/CustomRendererPlugin.js +1 -1
- package/dist/cjs/plugins/custom-cell-renderer/CustomRendererPlugin.js.map +1 -1
- package/dist/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js +1 -1
- package/dist/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js.map +1 -1
- package/dist/cjs/plugins/custom-cell-renderer/getRendererComponent.js +1 -1
- package/dist/cjs/plugins/custom-cell-renderer/getRendererComponent.js.map +1 -1
- package/dist/cjs/plugins/custom-cell-renderer/index.js +1 -1
- package/dist/cjs/plugins/custom-cell-renderer/index.js.map +1 -1
- package/dist/cjs/plugins/editable/EditableComponents/ComboBox.js.map +1 -1
- package/dist/cjs/plugins/editable/EditableComponents/TextBox.js.map +1 -1
- package/dist/cjs/plugins/editable/EditableComponents/index.js +2 -2
- package/dist/cjs/plugins/editable/EditableComponents/index.js.map +1 -1
- package/dist/cjs/plugins/editable/EditablePlugin.js +1 -1
- package/dist/cjs/plugins/editable/EditablePlugin.js.map +1 -1
- package/dist/cjs/plugins/editable/decorateEditable.js +1 -1
- package/dist/cjs/plugins/editable/decorateEditable.js.map +1 -1
- package/dist/cjs/plugins/editable/getEditorComponent.js +3 -16
- package/dist/cjs/plugins/editable/getEditorComponent.js.map +2 -2
- package/dist/cjs/plugins/editable/index.js +2 -2
- package/dist/cjs/plugins/editable/index.js.map +1 -1
- package/dist/cjs/plugins/expandable-grid/ExpandableColumn.js +23 -25
- package/dist/cjs/plugins/expandable-grid/ExpandableColumn.js.map +2 -2
- package/dist/cjs/plugins/expandable-grid/ExpandablePlugin.js +5 -5
- package/dist/cjs/plugins/expandable-grid/ExpandablePlugin.js.map +2 -2
- package/dist/cjs/plugins/expandable-grid/ExpandedRow.js +6 -6
- package/dist/cjs/plugins/expandable-grid/ExpandedRow.js.map +1 -1
- package/dist/cjs/plugins/expandable-grid/ExpandedRowExtra.js +12 -8
- package/dist/cjs/plugins/expandable-grid/ExpandedRowExtra.js.map +2 -2
- package/dist/cjs/plugins/expandable-grid/index.js +2 -2
- package/dist/cjs/plugins/expandable-grid/index.js.map +1 -1
- package/dist/cjs/plugins/expandable-grid/useExpandGridState.js.map +2 -2
- package/dist/cjs/plugins/export-data/index.js +1 -1
- package/dist/cjs/plugins/export-data/index.js.map +1 -1
- package/dist/cjs/plugins/filterable/FilterablePlugin.js +3 -3
- package/dist/cjs/plugins/filterable/FilterablePlugin.js.map +2 -2
- package/dist/cjs/plugins/filterable/addFilterToColumn.js +1 -1
- package/dist/cjs/plugins/filterable/addFilterToColumn.js.map +1 -1
- package/dist/cjs/plugins/filterable/components/FilterableHeader.js +1 -1
- package/dist/cjs/plugins/filterable/components/FilterableHeader.js.map +2 -2
- package/dist/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +45 -47
- package/dist/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js.map +2 -2
- package/dist/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +46 -48
- package/dist/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js.map +2 -2
- package/dist/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +43 -45
- package/dist/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js.map +2 -2
- package/dist/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js +3 -3
- package/dist/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js.map +2 -2
- package/dist/cjs/plugins/filterable/components/filterable-menus/getFilterMenuByType.js +5 -7
- package/dist/cjs/plugins/filterable/components/filterable-menus/getFilterMenuByType.js.map +2 -2
- package/dist/cjs/plugins/filterable/filterableFormatter.js +29 -37
- package/dist/cjs/plugins/filterable/filterableFormatter.js.map +2 -2
- package/dist/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js +2 -4
- package/dist/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js.map +2 -2
- package/dist/cjs/plugins/filterable/filtering-helper/strategiesOperators.js.map +2 -2
- package/dist/cjs/plugins/filterable/helper.js.map +2 -2
- package/dist/cjs/plugins/filterable/index.js +1 -1
- package/dist/cjs/plugins/filterable/index.js.map +1 -1
- package/dist/cjs/plugins/filterable/useFilterableState.js +3 -7
- package/dist/cjs/plugins/filterable/useFilterableState.js.map +2 -2
- package/dist/cjs/plugins/grouping-grid/GroupingPlugin.js +4 -4
- package/dist/cjs/plugins/grouping-grid/GroupingPlugin.js.map +2 -2
- package/dist/cjs/plugins/grouping-grid/walkStrategy.js.map +2 -2
- package/dist/cjs/plugins/index.js +16 -16
- package/dist/cjs/plugins/index.js.map +1 -1
- package/dist/cjs/plugins/infinite-scrolling/index.js +1 -1
- package/dist/cjs/plugins/infinite-scrolling/index.js.map +1 -1
- package/dist/cjs/plugins/pagination/PaginationPlugin.js +4 -4
- package/dist/cjs/plugins/pagination/PaginationPlugin.js.map +2 -2
- package/dist/cjs/plugins/pagination/components/Pagination.js +5 -24
- package/dist/cjs/plugins/pagination/components/Pagination.js.map +2 -2
- package/dist/cjs/plugins/pagination/components/PerPageDropdown.js +2 -2
- package/dist/cjs/plugins/pagination/components/PerPageDropdown.js.map +2 -2
- package/dist/cjs/plugins/pagination/helper.js.map +2 -2
- package/dist/cjs/plugins/pagination/index.js +1 -1
- package/dist/cjs/plugins/pagination/index.js.map +1 -1
- package/dist/cjs/plugins/pagination/usePaginationState.js +1 -1
- package/dist/cjs/plugins/pagination/usePaginationState.js.map +1 -1
- package/dist/cjs/plugins/resizable/ResizablePlugin.js +1 -1
- package/dist/cjs/plugins/resizable/ResizablePlugin.js.map +1 -1
- package/dist/cjs/plugins/resizable/decorateResizable.js +4 -2
- package/dist/cjs/plugins/resizable/decorateResizable.js.map +2 -2
- package/dist/cjs/plugins/resizable/index.js +1 -1
- package/dist/cjs/plugins/resizable/index.js.map +1 -1
- package/dist/cjs/plugins/resizable/useResizeHandle.js +2 -12
- package/dist/cjs/plugins/resizable/useResizeHandle.js.map +2 -2
- package/dist/cjs/plugins/row-dnd/index.js +1 -1
- package/dist/cjs/plugins/row-dnd/index.js.map +1 -1
- package/dist/cjs/plugins/selectable/SelectablePlugin.js +3 -3
- package/dist/cjs/plugins/selectable/SelectablePlugin.js.map +1 -1
- package/dist/cjs/plugins/selectable/addSelectableColumn.js +1 -1
- package/dist/cjs/plugins/selectable/addSelectableColumn.js.map +1 -1
- package/dist/cjs/plugins/selectable/index.js +1 -1
- package/dist/cjs/plugins/selectable/index.js.map +1 -1
- package/dist/cjs/plugins/selectable/selectableFormatter.js +1 -1
- package/dist/cjs/plugins/selectable/selectableFormatter.js.map +2 -2
- package/dist/cjs/plugins/selectable/useSelectableState.js +1 -1
- package/dist/cjs/plugins/selectable/useSelectableState.js.map +2 -2
- package/dist/cjs/plugins/sortable/SortablePlugin.js +3 -3
- package/dist/cjs/plugins/sortable/SortablePlugin.js.map +1 -1
- package/dist/cjs/plugins/sortable/index.js +1 -1
- package/dist/cjs/plugins/sortable/index.js.map +1 -1
- package/dist/cjs/plugins/sortable/sortTree.js.map +2 -2
- package/dist/cjs/plugins/sortable/useSortableState.js +2 -4
- package/dist/cjs/plugins/sortable/useSortableState.js.map +2 -2
- package/dist/cjs/plugins/toolbar/RowRenderer.js +2 -2
- package/dist/cjs/plugins/toolbar/RowRenderer.js.map +1 -1
- package/dist/cjs/plugins/toolbar/ToolbarPlugin.js +1 -1
- package/dist/cjs/plugins/toolbar/ToolbarPlugin.js.map +1 -1
- package/dist/cjs/plugins/toolbar/index.js +1 -1
- package/dist/cjs/plugins/toolbar/index.js.map +1 -1
- package/dist/cjs/plugins/virtualization/AutoHeightList.js.map +2 -2
- package/dist/cjs/plugins/virtualization/VirtualizationPlugin.js +2 -2
- package/dist/cjs/plugins/virtualization/VirtualizationPlugin.js.map +2 -2
- package/dist/cjs/plugins/virtualization/VirtualizedBody.js +4 -4
- package/dist/cjs/plugins/virtualization/VirtualizedBody.js.map +1 -1
- package/dist/cjs/plugins/virtualization/index.js +1 -1
- package/dist/cjs/plugins/virtualization/index.js.map +1 -1
- package/dist/cjs/renders/CellWithAddons.js +1 -1
- package/dist/cjs/renders/CellWithAddons.js.map +1 -1
- package/dist/cjs/renders/index.js +2 -2
- package/dist/cjs/renders/index.js.map +1 -1
- package/dist/cjs/rowSizes.js +1 -5
- package/dist/cjs/rowSizes.js.map +2 -2
- package/dist/cjs/utilities/getPluginsFromProps.js +13 -13
- package/dist/cjs/utilities/getPluginsFromProps.js.map +1 -1
- package/dist/cjs/utilities/normalizeData.js.map +2 -2
- package/dist/esm/DSDataGrid.js +125 -117
- package/dist/esm/DSDataGrid.js.map +2 -2
- package/dist/esm/DataGridImpl.js +11 -11
- package/dist/esm/DataGridImpl.js.map +1 -1
- package/dist/esm/PaginatedDataGrid.js +9 -9
- package/dist/esm/PaginatedDataGrid.js.map +2 -2
- package/dist/esm/components/BodyList.js +3 -5
- package/dist/esm/components/BodyList.js.map +2 -2
- package/dist/esm/components/ColumnVisibilityMenuOption.js +1 -6
- package/dist/esm/components/ColumnVisibilityMenuOption.js.map +2 -2
- package/dist/esm/components/ColumnsOptionsMenuSection.js +2 -11
- package/dist/esm/components/ColumnsOptionsMenuSection.js.map +2 -2
- package/dist/esm/components/EmptyState.js +1 -2
- package/dist/esm/components/EmptyState.js.map +2 -2
- package/dist/esm/components/List.js +2 -2
- package/dist/esm/components/List.js.map +2 -2
- package/dist/esm/components/ListItem.js +3 -6
- package/dist/esm/components/ListItem.js.map +2 -2
- package/dist/esm/components/NoResults.js +4 -10
- package/dist/esm/components/NoResults.js.map +2 -2
- package/dist/esm/components/RowsLoader.js +1 -1
- package/dist/esm/components/RowsLoader.js.map +1 -1
- package/dist/esm/components/Table.js +5 -5
- package/dist/esm/components/Table.js.map +1 -1
- package/dist/esm/components/TableBody.js +2 -7
- package/dist/esm/components/TableBody.js.map +2 -2
- package/dist/esm/components/TableHeader.js +1 -1
- package/dist/esm/components/TableHeader.js.map +2 -2
- package/dist/esm/components/footer/addOptionalFooterComponents.js +1 -1
- package/dist/esm/components/footer/addOptionalFooterComponents.js.map +1 -1
- package/dist/esm/components/index.js +5 -5
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/components/renderers/defaultClassedRenderers.js +16 -40
- package/dist/esm/components/renderers/defaultClassedRenderers.js.map +2 -2
- package/dist/esm/components/renderers/index.js +2 -2
- package/dist/esm/components/renderers/index.js.map +1 -1
- package/dist/esm/components/renderers/renderRowsLoader.js +2 -4
- package/dist/esm/components/renderers/renderRowsLoader.js.map +2 -2
- package/dist/esm/defaultPlugins.js +5 -10
- package/dist/esm/defaultPlugins.js.map +2 -2
- package/dist/esm/index.js +9 -9
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/package.json +7 -0
- package/dist/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +22 -18
- package/dist/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js.map +2 -2
- package/dist/esm/plugins/body-header-scroll-sync/index.js +1 -1
- package/dist/esm/plugins/body-header-scroll-sync/index.js.map +1 -1
- package/dist/esm/plugins/column-dnd/DndColumnsPlugin.js +1 -1
- package/dist/esm/plugins/column-dnd/DndColumnsPlugin.js.map +1 -1
- package/dist/esm/plugins/column-dnd/index.js +1 -1
- package/dist/esm/plugins/column-dnd/index.js.map +1 -1
- package/dist/esm/plugins/column-sizing/ColumnSizingPlugin.js +4 -4
- package/dist/esm/plugins/column-sizing/ColumnSizingPlugin.js.map +1 -1
- package/dist/esm/plugins/column-sizing/ext-points/decorateColumn.js +1 -1
- package/dist/esm/plugins/column-sizing/ext-points/decorateColumn.js.map +1 -1
- package/dist/esm/plugins/column-sizing/ext-points/getTableProps.js +1 -1
- package/dist/esm/plugins/column-sizing/ext-points/getTableProps.js.map +1 -1
- package/dist/esm/plugins/column-sizing/index.js +1 -1
- package/dist/esm/plugins/column-sizing/index.js.map +1 -1
- package/dist/esm/plugins/column-sizing/useColumnSizeService.js +7 -26
- package/dist/esm/plugins/column-sizing/useColumnSizeService.js.map +2 -2
- package/dist/esm/plugins/column-sizing/useStylesheetHelpers.js +2 -2
- package/dist/esm/plugins/column-sizing/useStylesheetHelpers.js.map +1 -1
- package/dist/esm/plugins/custom-cell-renderer/CustomRendererPlugin.js +1 -1
- package/dist/esm/plugins/custom-cell-renderer/CustomRendererPlugin.js.map +1 -1
- package/dist/esm/plugins/custom-cell-renderer/addCustomRendererToCell.js +1 -1
- package/dist/esm/plugins/custom-cell-renderer/addCustomRendererToCell.js.map +1 -1
- package/dist/esm/plugins/custom-cell-renderer/getRendererComponent.js +1 -1
- package/dist/esm/plugins/custom-cell-renderer/getRendererComponent.js.map +1 -1
- package/dist/esm/plugins/custom-cell-renderer/index.js +1 -1
- package/dist/esm/plugins/custom-cell-renderer/index.js.map +1 -1
- package/dist/esm/plugins/editable/EditableComponents/ComboBox.js.map +1 -1
- package/dist/esm/plugins/editable/EditableComponents/TextBox.js.map +1 -1
- package/dist/esm/plugins/editable/EditableComponents/index.js +2 -2
- package/dist/esm/plugins/editable/EditableComponents/index.js.map +1 -1
- package/dist/esm/plugins/editable/EditablePlugin.js +1 -1
- package/dist/esm/plugins/editable/EditablePlugin.js.map +1 -1
- package/dist/esm/plugins/editable/decorateEditable.js +1 -1
- package/dist/esm/plugins/editable/decorateEditable.js.map +1 -1
- package/dist/esm/plugins/editable/getEditorComponent.js +3 -16
- package/dist/esm/plugins/editable/getEditorComponent.js.map +2 -2
- package/dist/esm/plugins/editable/index.js +2 -2
- package/dist/esm/plugins/editable/index.js.map +1 -1
- package/dist/esm/plugins/expandable-grid/ExpandableColumn.js +23 -25
- package/dist/esm/plugins/expandable-grid/ExpandableColumn.js.map +2 -2
- package/dist/esm/plugins/expandable-grid/ExpandablePlugin.js +5 -5
- package/dist/esm/plugins/expandable-grid/ExpandablePlugin.js.map +2 -2
- package/dist/esm/plugins/expandable-grid/ExpandedRow.js +6 -6
- package/dist/esm/plugins/expandable-grid/ExpandedRow.js.map +1 -1
- package/dist/esm/plugins/expandable-grid/ExpandedRowExtra.js +12 -8
- package/dist/esm/plugins/expandable-grid/ExpandedRowExtra.js.map +2 -2
- package/dist/esm/plugins/expandable-grid/index.js +2 -2
- package/dist/esm/plugins/expandable-grid/index.js.map +1 -1
- package/dist/esm/plugins/expandable-grid/useExpandGridState.js.map +2 -2
- package/dist/esm/plugins/export-data/index.js +1 -1
- package/dist/esm/plugins/export-data/index.js.map +1 -1
- package/dist/esm/plugins/filterable/FilterablePlugin.js +3 -3
- package/dist/esm/plugins/filterable/FilterablePlugin.js.map +2 -2
- package/dist/esm/plugins/filterable/addFilterToColumn.js +1 -1
- package/dist/esm/plugins/filterable/addFilterToColumn.js.map +1 -1
- package/dist/esm/plugins/filterable/components/FilterableHeader.js +1 -1
- package/dist/esm/plugins/filterable/components/FilterableHeader.js.map +2 -2
- package/dist/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +45 -47
- package/dist/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js.map +2 -2
- package/dist/esm/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +46 -48
- package/dist/esm/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js.map +2 -2
- package/dist/esm/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +43 -45
- package/dist/esm/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js.map +2 -2
- package/dist/esm/plugins/filterable/components/filterable-menus/TextFilterMenu.js +3 -3
- package/dist/esm/plugins/filterable/components/filterable-menus/TextFilterMenu.js.map +2 -2
- package/dist/esm/plugins/filterable/components/filterable-menus/getFilterMenuByType.js +5 -7
- package/dist/esm/plugins/filterable/components/filterable-menus/getFilterMenuByType.js.map +2 -2
- package/dist/esm/plugins/filterable/filterableFormatter.js +29 -37
- package/dist/esm/plugins/filterable/filterableFormatter.js.map +2 -2
- package/dist/esm/plugins/filterable/filtering-helper/filterRowsByQuery.js +2 -4
- package/dist/esm/plugins/filterable/filtering-helper/filterRowsByQuery.js.map +2 -2
- package/dist/esm/plugins/filterable/filtering-helper/strategiesOperators.js.map +2 -2
- package/dist/esm/plugins/filterable/helper.js +1 -7
- package/dist/esm/plugins/filterable/helper.js.map +2 -2
- package/dist/esm/plugins/filterable/index.js +1 -1
- package/dist/esm/plugins/filterable/index.js.map +1 -1
- package/dist/esm/plugins/filterable/useFilterableState.js +3 -11
- package/dist/esm/plugins/filterable/useFilterableState.js.map +2 -2
- package/dist/esm/plugins/grouping-grid/GroupingPlugin.js +4 -4
- package/dist/esm/plugins/grouping-grid/GroupingPlugin.js.map +2 -2
- package/dist/esm/plugins/grouping-grid/walkStrategy.js.map +2 -2
- package/dist/esm/plugins/index.js +16 -16
- package/dist/esm/plugins/index.js.map +1 -1
- package/dist/esm/plugins/infinite-scrolling/index.js +1 -1
- package/dist/esm/plugins/infinite-scrolling/index.js.map +1 -1
- package/dist/esm/plugins/pagination/PaginationPlugin.js +4 -4
- package/dist/esm/plugins/pagination/PaginationPlugin.js.map +2 -2
- package/dist/esm/plugins/pagination/components/Pagination.js +5 -24
- package/dist/esm/plugins/pagination/components/Pagination.js.map +2 -2
- package/dist/esm/plugins/pagination/components/PerPageDropdown.js +2 -2
- package/dist/esm/plugins/pagination/components/PerPageDropdown.js.map +2 -2
- package/dist/esm/plugins/pagination/helper.js.map +2 -2
- package/dist/esm/plugins/pagination/index.js +1 -1
- package/dist/esm/plugins/pagination/index.js.map +1 -1
- package/dist/esm/plugins/pagination/usePaginationState.js +1 -1
- package/dist/esm/plugins/pagination/usePaginationState.js.map +1 -1
- package/dist/esm/plugins/resizable/ResizablePlugin.js +1 -1
- package/dist/esm/plugins/resizable/ResizablePlugin.js.map +1 -1
- package/dist/esm/plugins/resizable/decorateResizable.js +4 -2
- package/dist/esm/plugins/resizable/decorateResizable.js.map +2 -2
- package/dist/esm/plugins/resizable/index.js +1 -1
- package/dist/esm/plugins/resizable/index.js.map +1 -1
- package/dist/esm/plugins/resizable/useResizeHandle.js +2 -12
- package/dist/esm/plugins/resizable/useResizeHandle.js.map +2 -2
- package/dist/esm/plugins/row-dnd/index.js +1 -1
- package/dist/esm/plugins/row-dnd/index.js.map +1 -1
- package/dist/esm/plugins/selectable/SelectablePlugin.js +3 -3
- package/dist/esm/plugins/selectable/SelectablePlugin.js.map +1 -1
- package/dist/esm/plugins/selectable/addSelectableColumn.js +1 -1
- package/dist/esm/plugins/selectable/addSelectableColumn.js.map +1 -1
- package/dist/esm/plugins/selectable/index.js +1 -1
- package/dist/esm/plugins/selectable/index.js.map +1 -1
- package/dist/esm/plugins/selectable/selectableFormatter.js +1 -1
- package/dist/esm/plugins/selectable/selectableFormatter.js.map +2 -2
- package/dist/esm/plugins/selectable/useSelectableState.js +1 -5
- package/dist/esm/plugins/selectable/useSelectableState.js.map +2 -2
- package/dist/esm/plugins/sortable/SortablePlugin.js +3 -3
- package/dist/esm/plugins/sortable/SortablePlugin.js.map +1 -1
- package/dist/esm/plugins/sortable/index.js +1 -1
- package/dist/esm/plugins/sortable/index.js.map +1 -1
- package/dist/esm/plugins/sortable/sortTree.js.map +2 -2
- package/dist/esm/plugins/sortable/useSortableState.js +2 -4
- package/dist/esm/plugins/sortable/useSortableState.js.map +2 -2
- package/dist/esm/plugins/toolbar/RowRenderer.js +2 -2
- package/dist/esm/plugins/toolbar/RowRenderer.js.map +1 -1
- package/dist/esm/plugins/toolbar/ToolbarPlugin.js +1 -1
- package/dist/esm/plugins/toolbar/ToolbarPlugin.js.map +1 -1
- package/dist/esm/plugins/toolbar/index.js +1 -1
- package/dist/esm/plugins/toolbar/index.js.map +1 -1
- package/dist/esm/plugins/virtualization/AutoHeightList.js.map +2 -2
- package/dist/esm/plugins/virtualization/VirtualizationPlugin.js +2 -2
- package/dist/esm/plugins/virtualization/VirtualizationPlugin.js.map +2 -2
- package/dist/esm/plugins/virtualization/VirtualizedBody.js +4 -4
- package/dist/esm/plugins/virtualization/VirtualizedBody.js.map +1 -1
- package/dist/esm/plugins/virtualization/index.js +1 -1
- package/dist/esm/plugins/virtualization/index.js.map +1 -1
- package/dist/esm/renders/CellWithAddons.js +1 -1
- package/dist/esm/renders/CellWithAddons.js.map +1 -1
- package/dist/esm/renders/index.js +2 -2
- package/dist/esm/renders/index.js.map +1 -1
- package/dist/esm/rowSizes.js +1 -5
- package/dist/esm/rowSizes.js.map +2 -2
- package/dist/esm/utilities/getPluginsFromProps.js +13 -13
- package/dist/esm/utilities/getPluginsFromProps.js.map +1 -1
- package/dist/esm/utilities/normalizeData.js.map +2 -2
- package/package.json +22 -21
@@ -30,16 +30,12 @@ __export(getEditorComponent_exports, {
|
|
30
30
|
module.exports = __toCommonJS(getEditorComponent_exports);
|
31
31
|
var React = __toESM(require("react"));
|
32
32
|
var import_jsx_runtime = require("react/jsx-runtime");
|
33
|
-
var import_EditableComponents = require("./EditableComponents");
|
33
|
+
var import_EditableComponents = require("./EditableComponents/index.js");
|
34
34
|
const components = {
|
35
35
|
DSComboBox: import_EditableComponents.ComboBox,
|
36
36
|
DSTextBox: import_EditableComponents.TextBox
|
37
37
|
};
|
38
|
-
const getEditorComponent = (editorComponent = {}, handlers) => ({
|
39
|
-
value,
|
40
|
-
onValue,
|
41
|
-
extraParameters
|
42
|
-
}) => {
|
38
|
+
const getEditorComponent = (editorComponent = {}, handlers) => ({ value, onValue, extraParameters }) => {
|
43
39
|
if (typeof editorComponent === "function") {
|
44
40
|
return editorComponent({
|
45
41
|
value,
|
@@ -52,16 +48,7 @@ const getEditorComponent = (editorComponent = {}, handlers) => ({
|
|
52
48
|
const Component = components[type];
|
53
49
|
if (type === "DSComboBox") {
|
54
50
|
const maxOptions = restEditorProps?.options?.length || 100;
|
55
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { zIndex: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
56
|
-
Component,
|
57
|
-
{
|
58
|
-
autoFocus: true,
|
59
|
-
onValue,
|
60
|
-
value,
|
61
|
-
maxOptions,
|
62
|
-
...restEditorProps
|
63
|
-
}
|
64
|
-
) });
|
51
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { zIndex: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, { autoFocus: true, onValue, value, maxOptions, ...restEditorProps }) });
|
65
52
|
}
|
66
53
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, { autoFocus: true, onValue, value, ...restEditorProps });
|
67
54
|
};
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../src/plugins/editable/getEditorComponent.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
4
|
-
"sourcesContent": ["/* eslint-disable react/display-name */\nimport React from 'react';\nimport { ComboBox, TextBox } from './EditableComponents';\n\nconst components = {\n DSComboBox: ComboBox,\n DSTextBox: TextBox,\n};\n\nconst getEditorComponent
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
4
|
+
"sourcesContent": ["/* eslint-disable react/display-name */\nimport React from 'react';\nimport { ComboBox, TextBox } from './EditableComponents/index.js';\n\nconst components = {\n DSComboBox: ComboBox,\n DSTextBox: TextBox,\n};\n\nconst getEditorComponent =\n (editorComponent = {}, handlers) =>\n ({ value, onValue, extraParameters }) => {\n if (typeof editorComponent === 'function') {\n return editorComponent({\n value,\n onValue,\n customHandlers: handlers,\n ...extraParameters,\n });\n }\n\n const { type = 'DSTextBox', ...restEditorProps } = editorComponent;\n const Component = components[type];\n\n if (type === 'DSComboBox') {\n // TODO: remove this whole condition when combobox v3 is out and fully working without \"maxOptions\" parameter\n const maxOptions = restEditorProps?.options?.length || 100;\n return (\n <div style={{ zIndex: 0 }}>\n <Component autoFocus onValue={onValue} value={value} maxOptions={maxOptions} {...restEditorProps} />\n </div>\n );\n }\n\n return <Component autoFocus onValue={onValue} value={value} {...restEditorProps} />;\n };\n\nexport { getEditorComponent };\nexport default getEditorComponent;\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD6BX;AA3BZ,gCAAkC;AAElC,MAAM,aAAa;AAAA,EACjB,YAAY;AAAA,EACZ,WAAW;AACb;AAEA,MAAM,qBACJ,CAAC,kBAAkB,CAAC,GAAG,aACrB,CAAC,EAAE,OAAO,SAAS,gBAAgB,MAAM;AACvC,MAAI,OAAO,oBAAoB,YAAY;AACzC,WAAO,gBAAgB;AAAA,MACrB;AAAA,MACA;AAAA,MACA,gBAAgB;AAAA,MAChB,GAAG;AAAA,IACL,CAAC;AAAA,EACH;AAEA,QAAM,EAAE,OAAO,gBAAgB,gBAAgB,IAAI;AACnD,QAAM,YAAY,WAAW;AAE7B,MAAI,SAAS,cAAc;AAEzB,UAAM,aAAa,iBAAiB,SAAS,UAAU;AACvD,WACE,4CAAC,SAAI,OAAO,EAAE,QAAQ,EAAE,GACtB,sDAAC,aAAU,WAAS,MAAC,SAAkB,OAAc,YAAyB,GAAG,iBAAiB,GACpG;AAAA,EAEJ;AAEA,SAAO,4CAAC,aAAU,WAAS,MAAC,SAAkB,OAAe,GAAG,iBAAiB;AACnF;AAGJ,IAAO,6BAAQ;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -30,6 +30,6 @@ __export(editable_exports, {
|
|
30
30
|
});
|
31
31
|
module.exports = __toCommonJS(editable_exports);
|
32
32
|
var React = __toESM(require("react"));
|
33
|
-
var import_EditablePlugin = require("./EditablePlugin");
|
34
|
-
var import_EditableComponents = require("./EditableComponents");
|
33
|
+
var import_EditablePlugin = require("./EditablePlugin.js");
|
34
|
+
var import_EditableComponents = require("./EditableComponents/index.js");
|
35
35
|
//# sourceMappingURL=index.js.map
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../src/plugins/editable/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
4
|
-
"sourcesContent": ["export { EditablePlugin } from './EditablePlugin';\nexport { ComboBox, TextBox } from './EditableComponents';\n", "import * as React from 'react';\nexport { React };\n"],
|
4
|
+
"sourcesContent": ["export { EditablePlugin } from './EditablePlugin.js';\nexport { ComboBox, TextBox } from './EditableComponents/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,4BAA+B;AAC/B,gCAAkC;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -35,8 +35,8 @@ var import_ds_icons = require("@elliemae/ds-icons");
|
|
35
35
|
var import_ds_classnames = require("@elliemae/ds-classnames");
|
36
36
|
var import_ds_button = require("@elliemae/ds-button");
|
37
37
|
var import_ds_truncated_tooltip_text = require("@elliemae/ds-truncated-tooltip-text");
|
38
|
-
var import_blockNames = require("../../blockNames");
|
39
|
-
var import_rowSizes = require("../../rowSizes");
|
38
|
+
var import_blockNames = require("../../blockNames.js");
|
39
|
+
var import_rowSizes = require("../../rowSizes.js");
|
40
40
|
const blockName = `${import_blockNames.dataGridBlockName}-expandable-column`;
|
41
41
|
const ExpandableColumnWrapper = (0, import_ds_classnames.aggregatedClasses)("div")(blockName);
|
42
42
|
const LabelDescriptionWrapper = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "label-description-wrapper");
|
@@ -45,7 +45,7 @@ const Description = (0, import_ds_classnames.aggregatedClasses)("span")(blockNam
|
|
45
45
|
const ExtraColumnData = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "extra-column-data");
|
46
46
|
const ExpandableMasterWrapper = (0, import_ds_classnames.aggregatedClasses)("div")(`${blockName}-master-wrapper`);
|
47
47
|
const ExpandableDetailsWrapper = (0, import_ds_classnames.aggregatedClasses)("div")(`${blockName}-details-wrapper`);
|
48
|
-
|
48
|
+
const ExpandableColumnCell = ({ label, description, isExpanded, expandableDetails, extraData, onToggleExpand }) => {
|
49
49
|
const ref = (0, import_react.useRef)();
|
50
50
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ExpandableColumnWrapper, { ref, tabindex: 0, children: [
|
51
51
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ExpandableMasterWrapper, { style: { height: import_rowSizes.RowSizes.extend }, children: [
|
@@ -72,7 +72,7 @@ function ExpandableColumnCell({ label, description, isExpanded, expandableDetail
|
|
72
72
|
] }),
|
73
73
|
isExpanded && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ExpandableDetailsWrapper, { children: expandableDetails })
|
74
74
|
] });
|
75
|
-
}
|
75
|
+
};
|
76
76
|
const expandableColumnRenderer = ({ renderRowLabel, renderRowDescription, renderExtraData }) => (value, { rowData, isExpanded }, grid) => {
|
77
77
|
const {
|
78
78
|
props: { renderExpandedDetails },
|
@@ -104,26 +104,24 @@ const ExpandableColumn = ({
|
|
104
104
|
searchable,
|
105
105
|
customRenderer,
|
106
106
|
...rest
|
107
|
-
}) => {
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
};
|
127
|
-
};
|
107
|
+
}) => ({
|
108
|
+
...rest,
|
109
|
+
label,
|
110
|
+
property,
|
111
|
+
cell: {
|
112
|
+
formatters: [
|
113
|
+
expandableColumnRenderer({
|
114
|
+
renderRowLabel,
|
115
|
+
renderRowDescription,
|
116
|
+
renderExtraData
|
117
|
+
})
|
118
|
+
]
|
119
|
+
},
|
120
|
+
width: width || "50%",
|
121
|
+
expandableColumn: true,
|
122
|
+
resizable,
|
123
|
+
sortable,
|
124
|
+
searchable
|
125
|
+
});
|
128
126
|
var ExpandableColumn_default = ExpandableColumn;
|
129
127
|
//# sourceMappingURL=ExpandableColumn.js.map
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../src/plugins/expandable-grid/ExpandableColumn.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
4
|
-
"sourcesContent": ["/* eslint-disable react/display-name */\nimport React, { useRef } from 'react';\nimport { ArrowheadDown, ArrowheadRight } from '@elliemae/ds-icons';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { DSButton } from '@elliemae/ds-button';\nimport { DSTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { dataGridBlockName } from '../../blockNames';\nimport { RowSizes } from '../../rowSizes';\n\nconst blockName = `${dataGridBlockName}-expandable-column`;\n\n// todo: clean this when we move to css-js\nconst ExpandableColumnWrapper = aggregatedClasses('div')(blockName);\nconst LabelDescriptionWrapper = aggregatedClasses('div')(blockName, 'label-description-wrapper');\nconst Label = aggregatedClasses('span')(blockName, 'label');\nconst Description = aggregatedClasses('span')(blockName, 'description');\nconst ExtraColumnData = aggregatedClasses('div')(blockName, 'extra-column-data');\nconst ExpandableMasterWrapper = aggregatedClasses('div')(`${blockName}-master-wrapper`);\nconst ExpandableDetailsWrapper = aggregatedClasses('div')(`${blockName}-details-wrapper`);\n\
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD4BM;AA3B7B,mBAA8B;AAC9B,sBAA8C;AAC9C,2BAAkC;AAClC,uBAAyB;AACzB,uCAAuC;AACvC,wBAAkC;AAClC,sBAAyB;AAEzB,MAAM,YAAY,GAAG;AAGrB,MAAM,8BAA0B,wCAAkB,KAAK,EAAE,SAAS;AAClE,MAAM,8BAA0B,wCAAkB,KAAK,EAAE,WAAW,2BAA2B;AAC/F,MAAM,YAAQ,wCAAkB,MAAM,EAAE,WAAW,OAAO;AAC1D,MAAM,kBAAc,wCAAkB,MAAM,EAAE,WAAW,aAAa;AACtE,MAAM,sBAAkB,wCAAkB,KAAK,EAAE,WAAW,mBAAmB;AAC/E,MAAM,8BAA0B,wCAAkB,KAAK,EAAE,GAAG,0BAA0B;AACtF,MAAM,+BAA2B,wCAAkB,KAAK,EAAE,GAAG,2BAA2B;AAExF,
|
4
|
+
"sourcesContent": ["/* eslint-disable react/display-name */\nimport React, { useRef } from 'react';\nimport { ArrowheadDown, ArrowheadRight } from '@elliemae/ds-icons';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { DSButton } from '@elliemae/ds-button';\nimport { DSTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { dataGridBlockName } from '../../blockNames.js';\nimport { RowSizes } from '../../rowSizes.js';\n\nconst blockName = `${dataGridBlockName}-expandable-column`;\n\n// todo: clean this when we move to css-js\nconst ExpandableColumnWrapper = aggregatedClasses('div')(blockName);\nconst LabelDescriptionWrapper = aggregatedClasses('div')(blockName, 'label-description-wrapper');\nconst Label = aggregatedClasses('span')(blockName, 'label');\nconst Description = aggregatedClasses('span')(blockName, 'description');\nconst ExtraColumnData = aggregatedClasses('div')(blockName, 'extra-column-data');\nconst ExpandableMasterWrapper = aggregatedClasses('div')(`${blockName}-master-wrapper`);\nconst ExpandableDetailsWrapper = aggregatedClasses('div')(`${blockName}-details-wrapper`);\n\nconst ExpandableColumnCell = ({ label, description, isExpanded, expandableDetails, extraData, onToggleExpand }) => {\n const ref = useRef();\n return (\n <ExpandableColumnWrapper ref={ref} tabindex={0}>\n <ExpandableMasterWrapper style={{ height: RowSizes.extend }}>\n <DSButton\n buttonType=\"text\"\n className=\"expandable-arrow\"\n icon={isExpanded ? <ArrowheadDown /> : <ArrowheadRight />}\n onClick={(e) => {\n onToggleExpand(e);\n if (ref && ref.current) {\n ref.current.focus();\n }\n }}\n size=\"s\"\n />\n <LabelDescriptionWrapper>\n <Label>\n <DSTruncatedTooltipText value={label} />\n </Label>\n <Description>\n <DSTruncatedTooltipText value={description} />\n </Description>\n </LabelDescriptionWrapper>\n <ExtraColumnData>{extraData}</ExtraColumnData>\n </ExpandableMasterWrapper>\n {isExpanded && <ExpandableDetailsWrapper>{expandableDetails}</ExpandableDetailsWrapper>}\n </ExpandableColumnWrapper>\n );\n};\n\nconst expandableColumnRenderer =\n ({ renderRowLabel, renderRowDescription, renderExtraData }) =>\n (value, { rowData, isExpanded }, grid) => {\n const {\n props: { renderExpandedDetails },\n actions: { toggleExpand },\n } = grid.getInstance();\n\n const expandableDetails = renderExpandedDetails({ rowData });\n return (\n <ExpandableColumnCell\n description={renderRowDescription({ rowData })}\n expandableDetails={expandableDetails}\n extraData={renderExtraData({ rowData })}\n isExpanded={isExpanded}\n label={renderRowLabel({ rowData })}\n onToggleExpand={() => toggleExpand(rowData)}\n />\n );\n };\nconst noop = () => null;\nexport const ExpandableColumn = ({\n property,\n label,\n renderRowLabel = () => '----',\n renderRowDescription = noop,\n renderExtraData = noop,\n width,\n resizable,\n sortable,\n searchable,\n customRenderer,\n ...rest\n}) => ({\n ...rest,\n label,\n property,\n cell: {\n formatters: [\n expandableColumnRenderer({\n renderRowLabel,\n renderRowDescription,\n renderExtraData,\n }),\n ],\n },\n width: width || '50%',\n expandableColumn: true,\n resizable,\n sortable,\n searchable,\n});\n\nexport default ExpandableColumn;\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD4BM;AA3B7B,mBAA8B;AAC9B,sBAA8C;AAC9C,2BAAkC;AAClC,uBAAyB;AACzB,uCAAuC;AACvC,wBAAkC;AAClC,sBAAyB;AAEzB,MAAM,YAAY,GAAG;AAGrB,MAAM,8BAA0B,wCAAkB,KAAK,EAAE,SAAS;AAClE,MAAM,8BAA0B,wCAAkB,KAAK,EAAE,WAAW,2BAA2B;AAC/F,MAAM,YAAQ,wCAAkB,MAAM,EAAE,WAAW,OAAO;AAC1D,MAAM,kBAAc,wCAAkB,MAAM,EAAE,WAAW,aAAa;AACtE,MAAM,sBAAkB,wCAAkB,KAAK,EAAE,WAAW,mBAAmB;AAC/E,MAAM,8BAA0B,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;AAAA,MACA,OAAO,eAAe,EAAE,QAAQ,CAAC;AAAA,MACjC,gBAAgB,MAAM,aAAa,OAAO;AAAA;AAAA,EAC5C;AAEJ;AACF,MAAM,OAAO,MAAM;AACZ,MAAM,mBAAmB,CAAC;AAAA,EAC/B;AAAA,EACA;AAAA,EACA,iBAAiB,MAAM;AAAA,EACvB,uBAAuB;AAAA,EACvB,kBAAkB;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,KACG;AACL,OAAO;AAAA,EACL,GAAG;AAAA,EACH;AAAA,EACA;AAAA,EACA,MAAM;AAAA,IACJ,YAAY;AAAA,MACV,yBAAyB;AAAA,QACvB;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EACA,OAAO,SAAS;AAAA,EAChB,kBAAkB;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AACF;AAEA,IAAO,2BAAQ;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -35,10 +35,10 @@ var import_react_window = require("react-window");
|
|
35
35
|
var import_ds_icons = require("@elliemae/ds-icons");
|
36
36
|
var import_ds_button = require("@elliemae/ds-button");
|
37
37
|
var import_ds_shared = require("@elliemae/ds-shared");
|
38
|
-
var import_ExpandedRow = require("./ExpandedRow");
|
39
|
-
var import_ExpandedRowExtra = require("./ExpandedRowExtra");
|
40
|
-
var import_rowSizes = require("../../rowSizes");
|
41
|
-
var import_useExpandGridState = require("./useExpandGridState");
|
38
|
+
var import_ExpandedRow = require("./ExpandedRow.js");
|
39
|
+
var import_ExpandedRowExtra = require("./ExpandedRowExtra.js");
|
40
|
+
var import_rowSizes = require("../../rowSizes.js");
|
41
|
+
var import_useExpandGridState = require("./useExpandGridState.js");
|
42
42
|
const getExpandedRowSizeBySubrows = ({ totalAmount, amountVisible, isShowingAll, size = 36 }) => isShowingAll ? size * (totalAmount + 1) - 6 : size * (amountVisible + 1) + 32;
|
43
43
|
const ExpandedRows = {
|
44
44
|
SingleColumn: import_ExpandedRow.ExpandedRow,
|
@@ -140,7 +140,7 @@ const ExpandablePlugin = (0, import_ds_shared.createInstancePlugin)("expandable"
|
|
140
140
|
renderers.body.row = (0, import_react.useMemo)(() => {
|
141
141
|
const expandedRowType = isExpandableSingleColumn(grid.decoratedColumns) ? "SingleColumn" : "Master";
|
142
142
|
const ExpandedRowComponent = createExpandedRow(expandedRowType);
|
143
|
-
return ({ isExpanded, ...rowProps })
|
143
|
+
return function({ isExpanded, ...rowProps }) {
|
144
144
|
if (isExpanded) {
|
145
145
|
const {
|
146
146
|
props: { detailColumns, getChildrenRows, renderRowDetails },
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../src/plugins/expandable-grid/ExpandablePlugin.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
4
|
-
"sourcesContent": ["/* eslint-disable max-lines */\nimport React, { useEffect, useMemo, useRef } from 'react';\nimport { cx, isFunction } from '@elliemae/ds-utilities';\nimport { VariableSizeList } from 'react-window';\nimport { ArrowheadDown, ArrowheadRight } from '@elliemae/ds-icons';\nimport { DSButton } from '@elliemae/ds-button';\nimport { createInstancePlugin, appendCellFormatter } from '@elliemae/ds-shared';\nimport { ExpandedRow } from './ExpandedRow';\nimport { ExpandedRowExtra } from './ExpandedRowExtra';\nimport { RowSizes } from '../../rowSizes';\nimport { useExpandGridState } from './useExpandGridState';\n\nconst getExpandedRowSizeBySubrows = ({ totalAmount, amountVisible, isShowingAll, size = 36 }) =>\n isShowingAll ? size * (totalAmount + 1) - 6 : size * (amountVisible + 1) + 32;\n\nconst ExpandedRows = {\n SingleColumn: ExpandedRow,\n Master: ExpandedRowExtra,\n};\n\nconst createExpandedRow = (type) => ExpandedRows[type] || ExpandedRows.Master;\n\nconst isExpandableSingleColumn = (columns) => columns.some((column) => column.expandableColumn);\n\nexport const ExpandablePlugin = createInstancePlugin('expandable', {\n registerStateHook: useExpandGridState,\n decorateGrid(grid) {\n const { decoratedColumns, columns } = grid.getInstance();\n const detailColumns = useMemo(\n () =>\n decoratedColumns\n .map((column) => ({\n ...column,\n customRenderer: column.detailCustomRenderer,\n }))\n .filter((col) => !col.expandableColumn),\n [columns],\n );\n return {\n detailColumns,\n };\n },\n\n decorateColumns(columns, grid) {\n if (isExpandableSingleColumn(columns)) return columns;\n // get first column from user\n const firstColumnIndex = columns.findIndex((column) => column.isUserColumn);\n const firstColumn = columns[firstColumnIndex];\n firstColumn.formatExpandable = true;\n\n return [\n ...columns.slice(0, firstColumnIndex),\n appendCellFormatter((value, { isExpanded, rowData }) => {\n const {\n actions: { toggleExpand },\n } = grid.getInstance();\n /*\n * should return only 2 elements ../custom-cell-renderer/addCustomRendererToCell.js\n * getRenderer it's checking that length to apply the custom render to value only\n */\n return (\n <>\n <DSButton\n buttonType=\"text\"\n className=\"expandable-arrow\"\n icon={isExpanded ? <ArrowheadDown /> : <ArrowheadRight />}\n onClick={(e) => {\n e.stopPropagation();\n toggleExpand(rowData);\n }}\n size=\"s\"\n />\n {value}\n </>\n );\n }, firstColumn),\n ...columns.slice(firstColumnIndex + 1),\n ];\n },\n\n getBodyProps(bodyProps, grid) {\n const {\n composedRows: rows,\n props: {\n rowKey,\n getChildrenRows,\n rowSize = 'normal',\n subrowSize = 'normal',\n getExpandedRowMinSize,\n getExpandedRowSize,\n expandableSubrowsVisible,\n },\n state: { expandedRows },\n } = grid.getInstance();\n const rowSizePx = RowSizes[rowSize];\n const subrowSizePx = RowSizes[subrowSize];\n const listRef = useRef();\n\n useEffect(() => {\n if (listRef.current) listRef.current.resetAfterIndex(0, true);\n });\n\n // implementation of expandable row single column with aggregation\n const getItemSize = (index) => {\n const rowData = rows[index];\n const key = rowData[rowKey];\n const children = getChildrenRows({ rowData });\n\n const expandedSize = getExpandedRowSize\n ? getExpandedRowSize(index, { rowData }) // https://jira.elliemae.io/browse/PUI-1659\n : getExpandedRowSizeBySubrows({\n totalAmount: children.length,\n amountVisible: children.length > expandableSubrowsVisible ? expandableSubrowsVisible : children.length,\n isShowingAll:\n children.length < expandableSubrowsVisible || (expandedRows[key] && expandedRows[key].showAllRows),\n size: subrowSizePx,\n });\n\n const expandedMinSize = isFunction(getExpandedRowMinSize) && getExpandedRowMinSize(index);\n\n // eslint-disable-next-line no-nested-ternary\n return expandedRows[key] ? (expandedMinSize > expandedSize ? expandedMinSize : expandedSize) : rowSizePx;\n };\n\n return {\n ...bodyProps,\n className: cx(bodyProps.className, 'expandable'),\n listComponent: VariableSizeList,\n listProps: { ref: listRef, itemSize: getItemSize },\n };\n },\n\n decorateRenderers(renderers, grid) {\n const Row = renderers.body.row;\n const Cell = renderers.body.cell;\n\n // eslint-disable-next-line react/display-name\n renderers.body.row = useMemo(() => {\n // todo: the expandable grid should be created from another specific grid component\n const expandedRowType = isExpandableSingleColumn(grid.decoratedColumns) ? 'SingleColumn' : 'Master';\n const ExpandedRowComponent = createExpandedRow(expandedRowType);\n // eslint-disable-next-line react/display-name\n return ({ isExpanded, ...rowProps })
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD6Db;AA5DV,mBAAkD;AAClD,0BAA+B;AAC/B,0BAAiC;AACjC,sBAA8C;AAC9C,uBAAyB;AACzB,uBAA0D;AAC1D,yBAA4B;AAC5B,8BAAiC;AACjC,sBAAyB;AACzB,gCAAmC;AAEnC,MAAM,8BAA8B,CAAC,EAAE,aAAa,eAAe,cAAc,OAAO,GAAG,MACzF,eAAe,QAAQ,cAAc,KAAK,IAAI,QAAQ,gBAAgB,KAAK;AAE7E,MAAM,eAAe;AAAA,EACnB,cAAc;AAAA,EACd,QAAQ;AACV;AAEA,MAAM,oBAAoB,CAAC,SAAS,aAAa,SAAS,aAAa;AAEvE,MAAM,2BAA2B,CAAC,YAAY,QAAQ,KAAK,CAAC,WAAW,OAAO,gBAAgB;AAEvF,MAAM,uBAAmB,uCAAqB,cAAc;AAA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{ cx, isFunction } from '@elliemae/ds-utilities';\nimport { VariableSizeList } from 'react-window';\nimport { ArrowheadDown, ArrowheadRight } from '@elliemae/ds-icons';\nimport { DSButton } from '@elliemae/ds-button';\nimport { createInstancePlugin, appendCellFormatter } from '@elliemae/ds-shared';\nimport { ExpandedRow } from './ExpandedRow.js';\nimport { ExpandedRowExtra } from './ExpandedRowExtra.js';\nimport { RowSizes } from '../../rowSizes.js';\nimport { useExpandGridState } from './useExpandGridState.js';\n\nconst getExpandedRowSizeBySubrows = ({ totalAmount, amountVisible, isShowingAll, size = 36 }) =>\n isShowingAll ? size * (totalAmount + 1) - 6 : size * (amountVisible + 1) + 32;\n\nconst ExpandedRows = {\n SingleColumn: ExpandedRow,\n Master: ExpandedRowExtra,\n};\n\nconst createExpandedRow = (type) => ExpandedRows[type] || ExpandedRows.Master;\n\nconst isExpandableSingleColumn = (columns) => columns.some((column) => column.expandableColumn);\n\nexport const ExpandablePlugin = createInstancePlugin('expandable', {\n registerStateHook: useExpandGridState,\n decorateGrid(grid) {\n const { decoratedColumns, columns } = grid.getInstance();\n const detailColumns = useMemo(\n () =>\n decoratedColumns\n .map((column) => ({\n ...column,\n customRenderer: column.detailCustomRenderer,\n }))\n .filter((col) => !col.expandableColumn),\n [columns],\n );\n return {\n detailColumns,\n };\n },\n\n decorateColumns(columns, grid) {\n if (isExpandableSingleColumn(columns)) return columns;\n // get first column from user\n const firstColumnIndex = columns.findIndex((column) => column.isUserColumn);\n const firstColumn = columns[firstColumnIndex];\n firstColumn.formatExpandable = true;\n\n return [\n ...columns.slice(0, firstColumnIndex),\n appendCellFormatter((value, { isExpanded, rowData }) => {\n const {\n actions: { toggleExpand },\n } = grid.getInstance();\n /*\n * should return only 2 elements ../custom-cell-renderer/addCustomRendererToCell.js\n * getRenderer it's checking that length to apply the custom render to value only\n */\n return (\n <>\n <DSButton\n buttonType=\"text\"\n className=\"expandable-arrow\"\n icon={isExpanded ? <ArrowheadDown /> : <ArrowheadRight />}\n onClick={(e) => {\n e.stopPropagation();\n toggleExpand(rowData);\n }}\n size=\"s\"\n />\n {value}\n </>\n );\n }, firstColumn),\n ...columns.slice(firstColumnIndex + 1),\n ];\n },\n\n getBodyProps(bodyProps, grid) {\n const {\n composedRows: rows,\n props: {\n rowKey,\n getChildrenRows,\n rowSize = 'normal',\n subrowSize = 'normal',\n getExpandedRowMinSize,\n getExpandedRowSize,\n expandableSubrowsVisible,\n },\n state: { expandedRows },\n } = grid.getInstance();\n const rowSizePx = RowSizes[rowSize];\n const subrowSizePx = RowSizes[subrowSize];\n const listRef = useRef();\n\n useEffect(() => {\n if (listRef.current) listRef.current.resetAfterIndex(0, true);\n });\n\n // implementation of expandable row single column with aggregation\n const getItemSize = (index) => {\n const rowData = rows[index];\n const key = rowData[rowKey];\n const children = getChildrenRows({ rowData });\n\n const expandedSize = getExpandedRowSize\n ? getExpandedRowSize(index, { rowData }) // https://jira.elliemae.io/browse/PUI-1659\n : getExpandedRowSizeBySubrows({\n totalAmount: children.length,\n amountVisible: children.length > expandableSubrowsVisible ? expandableSubrowsVisible : children.length,\n isShowingAll:\n children.length < expandableSubrowsVisible || (expandedRows[key] && expandedRows[key].showAllRows),\n size: subrowSizePx,\n });\n\n const expandedMinSize = isFunction(getExpandedRowMinSize) && getExpandedRowMinSize(index);\n\n // eslint-disable-next-line no-nested-ternary\n return expandedRows[key] ? (expandedMinSize > expandedSize ? expandedMinSize : expandedSize) : rowSizePx;\n };\n\n return {\n ...bodyProps,\n className: cx(bodyProps.className, 'expandable'),\n listComponent: VariableSizeList,\n listProps: { ref: listRef, itemSize: getItemSize },\n };\n },\n\n decorateRenderers(renderers, grid) {\n const Row = renderers.body.row;\n const Cell = renderers.body.cell;\n\n // eslint-disable-next-line react/display-name\n renderers.body.row = useMemo(() => {\n // todo: the expandable grid should be created from another specific grid component\n const expandedRowType = isExpandableSingleColumn(grid.decoratedColumns) ? 'SingleColumn' : 'Master';\n const ExpandedRowComponent = createExpandedRow(expandedRowType);\n // eslint-disable-next-line react/display-name\n return function ({ isExpanded, ...rowProps }) {\n if (isExpanded) {\n const {\n props: { detailColumns, getChildrenRows, renderRowDetails },\n composedRows,\n } = grid.getInstance();\n // https://jira.elliemae.io/browse/PUI-1667\n const rowData = composedRows[rowProps.index] ? composedRows[rowProps.index] : rowProps.rowData;\n return (\n <ExpandedRowComponent\n cellComponent={Cell}\n detailColumns={detailColumns}\n parentGrid={grid}\n renderRowDetails={renderRowDetails}\n rowComponent={Row}\n rowData={rowData}\n rowProps={{\n rowData,\n isExpanded,\n ...rowProps,\n }}\n rows={getChildrenRows({ rowData })}\n >\n {rowProps.children}\n </ExpandedRowComponent>\n );\n }\n return <Row {...rowProps} />;\n };\n }, []);\n\n return renderers;\n },\n\n getRowProps(rowProps, grid, { rowData }) {\n const {\n props: { rowKey },\n state: { expandedRows },\n } = grid.getInstance();\n const key = rowData[rowKey];\n const isExpanded = !!expandedRows[key];\n return {\n ...rowProps,\n className: cx(\n rowProps.className,\n Object.keys(expandedRows).length > 0 && 'expandable-row',\n isExpanded && 'expanded',\n ),\n isExpanded,\n showAllRows: expandedRows[key] && expandedRows[key].showAllRows,\n };\n },\n});\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD6Db;AA5DV,mBAAkD;AAClD,0BAA+B;AAC/B,0BAAiC;AACjC,sBAA8C;AAC9C,uBAAyB;AACzB,uBAA0D;AAC1D,yBAA4B;AAC5B,8BAAiC;AACjC,sBAAyB;AACzB,gCAAmC;AAEnC,MAAM,8BAA8B,CAAC,EAAE,aAAa,eAAe,cAAc,OAAO,GAAG,MACzF,eAAe,QAAQ,cAAc,KAAK,IAAI,QAAQ,gBAAgB,KAAK;AAE7E,MAAM,eAAe;AAAA,EACnB,cAAc;AAAA,EACd,QAAQ;AACV;AAEA,MAAM,oBAAoB,CAAC,SAAS,aAAa,SAAS,aAAa;AAEvE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AuB,kBAAkB,eAAe;AAE9D,aAAO,SAAU,EAAE,eAAe,SAAS,GAAG;AAC5C,YAAI,YAAY;AACd,gBAAM;AAAA,YACJ,OAAO,EAAE,eAAe,iBAAiB,iBAAiB;AAAA,YAC1D;AAAA,UACF,IAAI,KAAK,YAAY;AAErB,gBAAM,UAAU,aAAa,SAAS,SAAS,aAAa,SAAS,SAAS,SAAS;AACvF,iBACE;AAAA,YAAC;AAAA;AAAA,cACC,eAAe;AAAA,cACf;AAAA,cACA,YAAY;AAAA,cACZ;AAAA,cACA,cAAc;AAAA,cACd;AAAA,cACA,UAAU;AAAA,gBACR;AAAA,gBACA;AAAA,gBACA,GAAG;AAAA,cACL;AAAA,cACA,MAAM,gBAAgB,EAAE,QAAQ,CAAC;AAAA,cAEhC,mBAAS;AAAA;AAAA,UACZ;AAAA,QAEJ;AACA,eAAO,4CAAC,OAAK,GAAG,UAAU;AAAA,MAC5B;AAAA,IACF,GAAG,CAAC,CAAC;AAEL,WAAO;AAAA,EACT;AAAA,EAEA,YAAY,UAAU,MAAM,EAAE,QAAQ,GAAG;AACvC,UAAM;AAAA,MACJ,OAAO,EAAE,OAAO;AAAA,MAChB,OAAO,EAAE,aAAa;AAAA,IACxB,IAAI,KAAK,YAAY;AACrB,UAAM,MAAM,QAAQ;AACpB,UAAM,aAAa,CAAC,CAAC,aAAa;AAClC,WAAO;AAAA,MACL,GAAG;AAAA,MACH,eAAW;AAAA,QACT,SAAS;AAAA,QACT,OAAO,KAAK,YAAY,EAAE,SAAS,KAAK;AAAA,QACxC,cAAc;AAAA,MAChB;AAAA,MACA;AAAA,MACA,aAAa,aAAa,QAAQ,aAAa,KAAK;AAAA,IACtD;AAAA,EACF;AACF,CAAC;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -35,12 +35,12 @@ var import_ds_button = require("@elliemae/ds-button");
|
|
35
35
|
var import_ds_system = require("@elliemae/ds-system");
|
36
36
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
37
37
|
var import_ds_shared = require("@elliemae/ds-shared");
|
38
|
-
var import_pagination = require("../pagination");
|
39
|
-
var import_BodyCell = require("../../components/BodyCell");
|
40
|
-
var import_renderers = require("../../components/renderers");
|
41
|
-
var import_TableBody = require("../../components/TableBody");
|
42
|
-
var import_Table = require("../../components/Table");
|
43
|
-
var import_column_sizing = require("../column-sizing");
|
38
|
+
var import_pagination = require("../pagination/index.js");
|
39
|
+
var import_BodyCell = require("../../components/BodyCell.js");
|
40
|
+
var import_renderers = require("../../components/renderers/index.js");
|
41
|
+
var import_TableBody = require("../../components/TableBody.js");
|
42
|
+
var import_Table = require("../../components/Table.js");
|
43
|
+
var import_column_sizing = require("../column-sizing/index.js");
|
44
44
|
const DetailGrid = (0, import_ds_shared.deferComponentRender)(({ parentGrid, parentRowData, rows }) => {
|
45
45
|
const { instanceRef, ...parentProps } = parentGrid.props;
|
46
46
|
const grid = (0, import_ds_shared.useDataGrid)({
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../src/plugins/expandable-grid/ExpandedRow.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
4
|
-
"sourcesContent": ["/* eslint-disable react/prop-types */\n/* eslint-disable max-lines */\nimport React from 'react';\nimport { DSSeparator } from '@elliemae/ds-separator';\nimport { DSButton } from '@elliemae/ds-button';\nimport { styled } from '@elliemae/ds-system';\nimport { get } from '@elliemae/ds-utilities';\nimport { deferComponentRender, useDataGrid } from '@elliemae/ds-shared';\nimport { PaginationPlugin } from '../pagination';\nimport { BodyCell } from '../../components/BodyCell';\nimport { defaultRenderers } from '../../components/renderers';\nimport { TableBody } from '../../components/TableBody';\nimport { Table } from '../../components/Table';\nimport { ColumnSizingPlugin } from '../column-sizing';\n\nconst DetailGrid = deferComponentRender(({ parentGrid, parentRowData, rows }) => {\n const { instanceRef, ...parentProps } = parentGrid.props;\n const grid = useDataGrid({\n uuid: parentGrid.getInstance().uuid,\n ...parentProps,\n columns: parentGrid\n .getInstance()\n .decoratedColumns.filter((col) => !col.expandableColumn)\n .map((c) => ({ ...c, expandableColumn: false })),\n rows,\n plugins: [ColumnSizingPlugin, PaginationPlugin],\n renderers: defaultRenderers,\n bindColumnsSizeTo: parentGrid.uuid,\n numRowsVisible: 'all',\n paginated: true,\n pagination: {\n perPage: rows.length,\n conditionalPagination: true,\n },\n parentRowData,\n });\n\n return (\n <Table {...grid}>\n <TableBody />\n </Table>\n );\n}, null);\n\nconst DetailsWrapper = styled.span`\n flex: 1;\n width: ${(props) => props.width}px;\n`;\n\nconst DetailGridWrapper = styled.div`\n display: flex;\n height: calc(100% - ${(props) => (props.allRowsVisible ? 18 : 60)}px);\n width: ${(props) => props.expandableGridDetailWidth}px;\n margin: 12px 0;\n`;\n\nconst ExpandedRow = ({\n parentGrid,\n detailColumns,\n rowData,\n rows,\n rowProps,\n cellComponent: CellComponent,\n rowComponent: RowComponent,\n}) => {\n const {\n decoratedColumns,\n actions: { toggleShowAllRows },\n state: { expandedRows },\n props: {\n rowKey,\n showMoreRowsText = 'SHOW ALL ROWS',\n showLessRowsText = 'SHOW LESS ROWS',\n expandableSubrowsVisible,\n },\n columnSizeService: { expandableGridDetailWidth },\n } = parentGrid.getInstance();\n\n const { showAllRows, ...restRowProps } = rowProps;\n return (\n <RowComponent {...restRowProps}>\n <BodyCell\n column={decoratedColumns[0]}\n columnIndex={0}\n component={CellComponent}\n grid={parentGrid}\n rowProps={{ rowData, ...rowProps }}\n />\n <DetailsWrapper width={expandableGridDetailWidth}>\n <DetailGridWrapper\n allRowsVisible={rows.length < expandableSubrowsVisible || get(expandedRows, [rowKey, 'showAllRows'])}\n expandableGridDetailWidth={expandableGridDetailWidth}\n >\n <DSSeparator dashed orientation=\"vertical\" />\n <DetailGrid\n detailColumns={detailColumns}\n parentGrid={parentGrid.getInstance()}\n parentRowData={rowData}\n rows={showAllRows ? rows : (rows || []).slice(0, expandableSubrowsVisible)}\n />\n </DetailGridWrapper>\n {rows.length > expandableSubrowsVisible && (\n <DSButton\n buttonType=\"text\"\n labelText={showAllRows ? showLessRowsText : showMoreRowsText}\n onClick={(e) => {\n e.stopPropagation();\n toggleShowAllRows(rowData);\n }}\n style={{ marginBottom: '10px' }}\n />\n )}\n </DetailsWrapper>\n </RowComponent>\n );\n};\n\nexport { ExpandedRow };\nexport default ExpandedRow;\n", "import * as React from 'react';\nexport { React };\n"],
|
4
|
+
"sourcesContent": ["/* eslint-disable react/prop-types */\n/* eslint-disable max-lines */\nimport React from 'react';\nimport { DSSeparator } from '@elliemae/ds-separator';\nimport { DSButton } from '@elliemae/ds-button';\nimport { styled } from '@elliemae/ds-system';\nimport { get } from '@elliemae/ds-utilities';\nimport { deferComponentRender, useDataGrid } from '@elliemae/ds-shared';\nimport { PaginationPlugin } from '../pagination/index.js';\nimport { BodyCell } from '../../components/BodyCell.js';\nimport { defaultRenderers } from '../../components/renderers/index.js';\nimport { TableBody } from '../../components/TableBody.js';\nimport { Table } from '../../components/Table.js';\nimport { ColumnSizingPlugin } from '../column-sizing/index.js';\n\nconst DetailGrid = deferComponentRender(({ parentGrid, parentRowData, rows }) => {\n const { instanceRef, ...parentProps } = parentGrid.props;\n const grid = useDataGrid({\n uuid: parentGrid.getInstance().uuid,\n ...parentProps,\n columns: parentGrid\n .getInstance()\n .decoratedColumns.filter((col) => !col.expandableColumn)\n .map((c) => ({ ...c, expandableColumn: false })),\n rows,\n plugins: [ColumnSizingPlugin, PaginationPlugin],\n renderers: defaultRenderers,\n bindColumnsSizeTo: parentGrid.uuid,\n numRowsVisible: 'all',\n paginated: true,\n pagination: {\n perPage: rows.length,\n conditionalPagination: true,\n },\n parentRowData,\n });\n\n return (\n <Table {...grid}>\n <TableBody />\n </Table>\n );\n}, null);\n\nconst DetailsWrapper = styled.span`\n flex: 1;\n width: ${(props) => props.width}px;\n`;\n\nconst DetailGridWrapper = styled.div`\n display: flex;\n height: calc(100% - ${(props) => (props.allRowsVisible ? 18 : 60)}px);\n width: ${(props) => props.expandableGridDetailWidth}px;\n margin: 12px 0;\n`;\n\nconst ExpandedRow = ({\n parentGrid,\n detailColumns,\n rowData,\n rows,\n rowProps,\n cellComponent: CellComponent,\n rowComponent: RowComponent,\n}) => {\n const {\n decoratedColumns,\n actions: { toggleShowAllRows },\n state: { expandedRows },\n props: {\n rowKey,\n showMoreRowsText = 'SHOW ALL ROWS',\n showLessRowsText = 'SHOW LESS ROWS',\n expandableSubrowsVisible,\n },\n columnSizeService: { expandableGridDetailWidth },\n } = parentGrid.getInstance();\n\n const { showAllRows, ...restRowProps } = rowProps;\n return (\n <RowComponent {...restRowProps}>\n <BodyCell\n column={decoratedColumns[0]}\n columnIndex={0}\n component={CellComponent}\n grid={parentGrid}\n rowProps={{ rowData, ...rowProps }}\n />\n <DetailsWrapper width={expandableGridDetailWidth}>\n <DetailGridWrapper\n allRowsVisible={rows.length < expandableSubrowsVisible || get(expandedRows, [rowKey, 'showAllRows'])}\n expandableGridDetailWidth={expandableGridDetailWidth}\n >\n <DSSeparator dashed orientation=\"vertical\" />\n <DetailGrid\n detailColumns={detailColumns}\n parentGrid={parentGrid.getInstance()}\n parentRowData={rowData}\n rows={showAllRows ? rows : (rows || []).slice(0, expandableSubrowsVisible)}\n />\n </DetailGridWrapper>\n {rows.length > expandableSubrowsVisible && (\n <DSButton\n buttonType=\"text\"\n labelText={showAllRows ? showLessRowsText : showMoreRowsText}\n onClick={(e) => {\n e.stopPropagation();\n toggleShowAllRows(rowData);\n }}\n style={{ marginBottom: '10px' }}\n />\n )}\n </DetailsWrapper>\n </RowComponent>\n );\n};\n\nexport { ExpandedRow };\nexport default ExpandedRow;\n", "import * as React from 'react';\nexport { React };\n"],
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADuCjB;AApCN,0BAA4B;AAC5B,uBAAyB;AACzB,uBAAuB;AACvB,0BAAoB;AACpB,uBAAkD;AAClD,wBAAiC;AACj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AE,0BAA0B;AAAA,EACjD,IAAI,WAAW,YAAY;AAE3B,QAAM,EAAE,gBAAgB,aAAa,IAAI;AACzC,SACE,6CAAC,gBAAc,GAAG,cAChB;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,QAAQ,iBAAiB;AAAA,QACzB,aAAa;AAAA,QACb,WAAW;AAAA,QACX,MAAM;AAAA,QACN,UAAU,EAAE,SAAS,GAAG,SAAS;AAAA;AAAA,IACnC;AAAA,IACA,6CAAC,kBAAe,OAAO,2BACrB;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,gBAAgB,KAAK,SAAS,gCAA4B,yBAAI,cAAc,CAAC,QAAQ,aAAa,CAAC;AAAA,UACnG;AAAA,UAEA;AAAA,wDAAC,mCAAY,QAAM,MAAC,aAAY,YAAW;AAAA,YAC3C;AAAA,cAAC;AAAA;AAAA,gBACC;AAAA,gBACA,YAAY,WAAW,YAAY;AAAA,gBACnC,eAAe;AAAA,gBACf,MAAM,cAAc,QAAQ,QAAQ,CAAC,GAAG,MAAM,GAAG,wBAAwB;AAAA;AAAA,YAC3E;AAAA;AAAA;AAAA,MACF;AAAA,MACC,KAAK,SAAS,4BACb;AAAA,QAAC;AAAA;AAAA,UACC,YAAW;AAAA,UACX,WAAW,cAAc,mBAAmB;AAAA,UAC5C,SAAS,CAAC,MAAM;AACd,cAAE,gBAAgB;AAClB,8BAAkB,OAAO;AAAA,UAC3B;AAAA,UACA,OAAO,EAAE,cAAc,OAAO;AAAA;AAAA,MAChC;AAAA,OAEJ;AAAA,KACF;AAEJ;AAGA,IAAO,sBAAQ;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -33,17 +33,21 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
33
33
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
34
34
|
var import_ds_separator = require("@elliemae/ds-separator");
|
35
35
|
var import_ds_classnames = require("@elliemae/ds-classnames");
|
36
|
-
var import_blockNames = require("../../blockNames");
|
36
|
+
var import_blockNames = require("../../blockNames.js");
|
37
37
|
const blockName = `${import_blockNames.dataGridBlockName}-expanded-row`;
|
38
38
|
const DetailsWrapper = (0, import_ds_classnames.aggregatedClasses)("div")(`${blockName}-details-wrapper`, null, () => ({
|
39
39
|
"ie-flex-basis-auto": true
|
40
40
|
}));
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
}
|
41
|
+
const ExpandedRowExtra = ({
|
42
|
+
children,
|
43
|
+
rowData,
|
44
|
+
rowProps,
|
45
|
+
rowComponent: RowComponent,
|
46
|
+
renderRowDetails = () => null
|
47
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(RowComponent, { ...rowProps, className: (0, import_ds_utilities.cx)(rowProps.className, "expanded-detail-row"), children: [
|
48
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(RowComponent, { className: "master-row-expanded", children }),
|
49
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_separator.DSSeparator, { dashed: true, margin: "xs" }),
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(DetailsWrapper, { children: renderRowDetails({ rowData }) })
|
51
|
+
] });
|
48
52
|
var ExpandedRowExtra_default = ExpandedRowExtra;
|
49
53
|
//# sourceMappingURL=ExpandedRowExtra.js.map
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../src/plugins/expandable-grid/ExpandedRowExtra.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { cx } from '@elliemae/ds-utilities';\nimport { DSSeparator } from '@elliemae/ds-separator';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { dataGridBlockName } from '../../blockNames';\n\nconst blockName = `${dataGridBlockName}-expanded-row`;\n\nconst DetailsWrapper = aggregatedClasses('div')(`${blockName}-details-wrapper`, null, () => ({\n 'ie-flex-basis-auto': true,\n}));\n\
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { cx } from '@elliemae/ds-utilities';\nimport { DSSeparator } from '@elliemae/ds-separator';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { dataGridBlockName } from '../../blockNames.js';\n\nconst blockName = `${dataGridBlockName}-expanded-row`;\n\nconst DetailsWrapper = aggregatedClasses('div')(`${blockName}-details-wrapper`, null, () => ({\n 'ie-flex-basis-auto': true,\n}));\n\nconst ExpandedRowExtra = ({\n children,\n rowData,\n rowProps,\n rowComponent: RowComponent,\n renderRowDetails = () => null,\n}) => (\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\nexport { ExpandedRowExtra };\nexport default ExpandedRowExtra;\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADmBrB;AAlBF,0BAAmB;AACnB,0BAA4B;AAC5B,2BAAkC;AAClC,wBAAkC;AAElC,MAAM,YAAY,GAAG;AAErB,MAAM,qBAAiB,wCAAkB,KAAK,EAAE,GAAG,6BAA6B,MAAM,OAAO;AAAA,EAC3F,sBAAsB;AACxB,EAAE;AAEF,MAAM,mBAAmB,CAAC;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd,mBAAmB,MAAM;AAC3B,MACE,6CAAC,gBAAc,GAAG,UAAU,eAAW,wBAAG,SAAS,WAAW,qBAAqB,GACjF;AAAA,8CAAC,gBAAa,WAAU,uBAAuB,UAAS;AAAA,EACxD,4CAAC,mCAAY,QAAM,MAAC,QAAO,MAAK;AAAA,EAChC,4CAAC,kBAAgB,2BAAiB,EAAE,QAAQ,CAAC,GAAE;AAAA,GACjD;AAIF,IAAO,2BAAQ;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -29,6 +29,6 @@ __export(expandable_grid_exports, {
|
|
29
29
|
});
|
30
30
|
module.exports = __toCommonJS(expandable_grid_exports);
|
31
31
|
var React = __toESM(require("react"));
|
32
|
-
var import_ExpandablePlugin = require("./ExpandablePlugin");
|
33
|
-
var import_ExpandableColumn = require("./ExpandableColumn");
|
32
|
+
var import_ExpandablePlugin = require("./ExpandablePlugin.js");
|
33
|
+
var import_ExpandableColumn = require("./ExpandableColumn.js");
|
34
34
|
//# sourceMappingURL=index.js.map
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../src/plugins/expandable-grid/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
4
|
-
"sourcesContent": ["export { ExpandablePlugin } from './ExpandablePlugin';\nexport { ExpandableColumn } from './ExpandableColumn';\n", "import * as React from 'react';\nexport { React };\n"],
|
4
|
+
"sourcesContent": ["export { ExpandablePlugin } from './ExpandablePlugin.js';\nexport { ExpandableColumn } from './ExpandableColumn.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAAiC;AACjC,8BAAiC;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../src/plugins/expandable-grid/useExpandGridState.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
4
|
-
"sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,
|
4
|
+
"sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAA2C;AAC3C,mBAAyB;AAElB,MAAM,qBAAqB,CAAC,SAAS;AAC1C,QAAM;AAAA,IACJ;AAAA,IACA,OAAO;AAAA,MACL,cAAc,mBAAmB,CAAC;AAAA,MAClC,SAAS;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF,IAAI;AAEJ,QAAM,EAAE,OAAO,QAAQ,QAAI,oCAAe;AAAA,IACxC,OAAO;AAAA,IACP,SAAS;AAAA,IACT,UAAU;AAAA,IACV,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA,YAAY;AAAA,EACd,CAAC;AAED,QAAM,CAAC,eAAe,gBAAgB,QAAI,uBAAS,KAAK;AACxD,QAAM,YAAY,CAAC,QAAQ,QAAQ,OAAO,KAAK,EAAE,aAAa,MAAM,CAAC;AAErE,QAAM,sBAAsB,QAAQ;AAEpC,QAAM,cAAc,QAAQ;AAE5B,QAAM,eAAe,CAAC,QAAQ;AAC5B,qBAAiB,KAAK;AACtB,YAAQ,aAAa,KAAK,EAAE,aAAa,MAAM,CAAC;AAAA,EAClD;AAEA,QAAM,oBAAoB,CAAC,QAAQ;AACjC,YAAI,gCAAW,mBAAmB,GAAG;AACnC,0BAAoB,GAAG;AAAA,IACzB,OAAO;AACL,YAAM,MAAM,IAAI;AAChB,cAAQ,OAAO,KAAK;AAAA,QAClB,aAAa,MAAM,SAAS,QAAQ,CAAC,MAAM,SAAS,KAAK;AAAA,MAC3D,CAAC;AAAA,IACH;AAAA,EACF;AAEA,SAAO;AAAA,IACL,OAAO;AAAA,MACL,cAAc,MAAM;AAAA,MACpB,eAAe,MAAM;AAAA,MACrB;AAAA,IACF;AAAA,IACA,SAAS;AAAA,MACP;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -28,5 +28,5 @@ __export(export_data_exports, {
|
|
28
28
|
});
|
29
29
|
module.exports = __toCommonJS(export_data_exports);
|
30
30
|
var React = __toESM(require("react"));
|
31
|
-
var import_ExportDataPlugin = require("./ExportDataPlugin");
|
31
|
+
var import_ExportDataPlugin = require("./ExportDataPlugin.js");
|
32
32
|
//# sourceMappingURL=index.js.map
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../src/plugins/export-data/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
4
|
-
"sourcesContent": ["export { ExportDataPlugin } from './ExportDataPlugin';\n", "import * as React from 'react';\nexport { React };\n"],
|
4
|
+
"sourcesContent": ["export { ExportDataPlugin } from './ExportDataPlugin.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAAiC;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -30,9 +30,9 @@ module.exports = __toCommonJS(FilterablePlugin_exports);
|
|
30
30
|
var React = __toESM(require("react"));
|
31
31
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
32
32
|
var import_ds_shared = require("@elliemae/ds-shared");
|
33
|
-
var import_addFilterToColumn = require("./addFilterToColumn");
|
34
|
-
var import_filterRowsByQuery = __toESM(require("./filtering-helper/filterRowsByQuery"));
|
35
|
-
var import_useFilterableState = require("./useFilterableState");
|
33
|
+
var import_addFilterToColumn = require("./addFilterToColumn.js");
|
34
|
+
var import_filterRowsByQuery = __toESM(require("./filtering-helper/filterRowsByQuery.js"));
|
35
|
+
var import_useFilterableState = require("./useFilterableState.js");
|
36
36
|
const decorateColumn = (column, grid) => {
|
37
37
|
const {
|
38
38
|
props: { isFilterableColumnActive = (col) => col.searchable, onRemoveAllFilters },
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../src/plugins/filterable/FilterablePlugin.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
4
|
-
"sourcesContent": ["/* eslint-disable indent */\nimport { get, isFunction } from '@elliemae/ds-utilities';\nimport { createInstancePlugin } from '@elliemae/ds-shared';\nimport { addFilterToColumn } from './addFilterToColumn';\
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,0BAAgC;AAChC,uBAAqC;AACrC,+BAAkC;
|
4
|
+
"sourcesContent": ["/* eslint-disable indent */\nimport { get, isFunction } from '@elliemae/ds-utilities';\nimport { createInstancePlugin } from '@elliemae/ds-shared';\nimport { addFilterToColumn } from './addFilterToColumn.js';\nimport filterRowsByQuery, { filterRowsByQueryGroup } from './filtering-helper/filterRowsByQuery.js';\nimport { useFilterableState } from './useFilterableState.js';\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", "import * as React from 'react';\nexport { React };\n"],
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,0BAAgC;AAChC,uBAAqC;AACrC,+BAAkC;AAClC,+BAA0D;AAC1D,gCAAmC;AAEnC,MAAM,iBAAiB,CAAC,QAAQ,SAAS;AACvC,QAAM;AAAA,IACJ,OAAO,EAAE,2BAA2B,CAAC,QAAQ,IAAI,YAAY,mBAAmB;AAAA,IAChF,SAAS,EAAE,WAAW,aAAa;AAAA,IACnC,OAAO,EAAE,OAAO,QAAQ;AAAA,EAC1B,IAAI;AAEJ,SAAO,yBAAyB,MAAM,QAClC;AAAA,IACE;AAAA,MACE;AAAA,MACA,aAAa;AAAA,MACb,gBAAgB;AAAA,MAChB;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA;AAAA,EACF,IACA;AACN;AAEA,MAAM,cAAc,CAAC,MAAM,SAAS;AAClC,QAAM;AAAA,IACJ,OAAO,EAAE,gBAAgB,YAAY;AAAA,IACrC,OAAO,EAAE,MAAM;AAAA,IACf;AAAA,EACF,IAAI,KAAK,YAAY;AACrB,QAAM,WAAW,CAAC,kBAAc,yBAAAA,SAAkB,MAAM,KAAK,QAAI,iDAAuB,MAAM,OAAO,YAAY;AAEjH,SAAO,CAAC,iBAAiB,WAAW;AACtC;AAEO,MAAM,uBAAmB,uCAAqB,cAAc;AAAA,EACjE,mBAAmB;AAAA,EACnB;AAAA,EACA;AAAA,EACA,gBAAgB,MAAM;AACpB,WAAO;AAAA,MACL,KAAK;AAAA,MACL,SAAS,CAAC,EAAE,UAAU,MAAM;AAC1B,cAAM,EAAE,iBAAiB,IAAI,KAAK,YAAY;AAE9C,cAAM,SAAS,iBAAiB;AAChC,cAAM,uBAAmB,yBAAI,QAAQ,CAAC,cAAc,WAAW,YAAY,CAAC;AAC5E,gBAAI,gCAAW,gBAAgB;AAAG,2BAAiB;AAAA,MACrD;AAAA,IACF;AAAA,EACF;AACF,CAAC;",
|
6
6
|
"names": ["filterRowsByQuery"]
|
7
7
|
}
|
@@ -30,7 +30,7 @@ module.exports = __toCommonJS(addFilterToColumn_exports);
|
|
30
30
|
var React = __toESM(require("react"));
|
31
31
|
var import_react = require("react");
|
32
32
|
var import_ds_shared = require("@elliemae/ds-shared");
|
33
|
-
var import_filterableFormatter = require("./filterableFormatter");
|
33
|
+
var import_filterableFormatter = require("./filterableFormatter.js");
|
34
34
|
const addFilterToColumn = (props, column) => {
|
35
35
|
const filterMenuRef = (0, import_react.createRef)();
|
36
36
|
column.header.formatters.push((0, import_filterableFormatter.FilterableFormatter)({ ...props, filterMenuRef }));
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../src/plugins/filterable/addFilterToColumn.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
4
|
-
"sourcesContent": ["import { createRef } from 'react';\nimport { mergeClassNameToColumnHeader } from '@elliemae/ds-shared';\nimport { FilterableFormatter } from './filterableFormatter';\n\nexport const addFilterToColumn = (props, column) => {\n const filterMenuRef = createRef();\n column.header.formatters.push(FilterableFormatter({ ...props, filterMenuRef }));\n column.filterMenu = filterMenuRef;\n return mergeClassNameToColumnHeader('with-filtering', column);\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
4
|
+
"sourcesContent": ["import { createRef } from 'react';\nimport { mergeClassNameToColumnHeader } from '@elliemae/ds-shared';\nimport { FilterableFormatter } from './filterableFormatter.js';\n\nexport const addFilterToColumn = (props, column) => {\n const filterMenuRef = createRef();\n column.header.formatters.push(FilterableFormatter({ ...props, filterMenuRef }));\n column.filterMenu = filterMenuRef;\n return mergeClassNameToColumnHeader('with-filtering', column);\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAA0B;AAC1B,uBAA6C;AAC7C,iCAAoC;AAE7B,MAAM,oBAAoB,CAAC,OAAO,WAAW;AAClD,QAAM,oBAAgB,wBAAU;AAChC,SAAO,OAAO,WAAW,SAAK,gDAAoB,EAAE,GAAG,OAAO,cAAc,CAAC,CAAC;AAC9E,SAAO,aAAa;AACpB,aAAO,+CAA6B,kBAAkB,MAAM;AAC9D;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -35,7 +35,7 @@ var import_prop_types = __toESM(require("prop-types"));
|
|
35
35
|
var import_ds_classnames = require("@elliemae/ds-classnames");
|
36
36
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
37
37
|
var import_ds_system = require("@elliemae/ds-system");
|
38
|
-
var import_getFilterMenuByType = require("./filterable-menus/getFilterMenuByType");
|
38
|
+
var import_getFilterMenuByType = require("./filterable-menus/getFilterMenuByType.js");
|
39
39
|
const blockName = "data-grid-filter-header";
|
40
40
|
const Container = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, null, ({ showFilter }) => ({
|
41
41
|
"show-filter": showFilter
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../../src/plugins/filterable/components/FilterableHeader.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
4
|
-
"sourcesContent": ["/* eslint-disable no-param-reassign */\nimport React, { useCallback, useEffect, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { get, debounce, useResizeObserver} from '@elliemae/ds-utilities';\nimport { useTheme } from '@elliemae/ds-system';\nimport { getFilterMenuByType } from './filterable-menus/getFilterMenuByType';\n\nconst blockName = 'data-grid-filter-header';\n\nconst Container = aggregatedClasses('div')(blockName, null, ({ showFilter }) => ({\n 'show-filter': showFilter,\n}));\nconst FilterHeaderValue = aggregatedClasses('div')(blockName, 'value');\nconst FilterHeaderButton = aggregatedClasses('div')(blockName, 'button');\n\nexport const FilterableHeader = ({\n column,\n value,\n columnData,\n onAddFilter,\n onRemoveFilter,\n filterMenuRef,\n onFilterMenuClose,\n onFilterMenuOpen,\n filters,\n isMulti,\n}) => {\n const [isMenuOpened, setMenuOpened] = useState(false);\n const [headerWidth, setHeaderWidth] = useState();\n const debouncedWidthSetter = debounce(setHeaderWidth, 200);\n const { filterMenuMinWidth, filterMenuMaxWidth } = column;\n const theme = useTheme();\n const dropdownMinWidth = filterMenuMinWidth || Number(theme.space.xl.replace('px', '')) * 2;\n\n const defineHeaderWidth = ({ width }) => {\n let nextWidth = width + 16; // todo: use dimsum space once we convert it to JS\n if (nextWidth < dropdownMinWidth) nextWidth = dropdownMinWidth;\n if (filterMenuMaxWidth && nextWidth > filterMenuMaxWidth) nextWidth = filterMenuMaxWidth;\n return !isMenuOpened ? debouncedWidthSetter(nextWidth) : setHeaderWidth(nextWidth);\n };\n\n useEffect(() => {\n if (filterMenuRef) {\n filterMenuRef.current = {\n toggleMenu: () => setMenuOpened((prevState) => !prevState),\n };\n }\n }, [filterMenuRef]);\n\n useEffect(() => {\n if (!isMenuOpened) onFilterMenuClose(column);\n else onFilterMenuOpen(column);\n });\n\n const [ref] = useResizeObserver(defineHeaderWidth);\n const handleOpenMenu = useCallback((open) => {\n setMenuOpened(open);\n if (open) onFilterMenuOpen();\n }, []);\n const FilterMenuComponent = getFilterMenuByType(get(column, ['filter', 'type']));\n return (\n <Container ref={ref} classProps={{ showFilter: isMenuOpened }}>\n <FilterHeaderValue className=\"header-value\">{value}</FilterHeaderValue>\n <FilterHeaderButton data-testid=\"data-grid-filter-header__button\">\n <FilterMenuComponent\n className=\"filter-header-menu\"\n column={column}\n filters={filters}\n isMenuOpened={isMenuOpened}\n isMulti={isMulti}\n menuProps={{\n options: columnData || [],\n style: { minWidth: headerWidth, maxWidth: filterMenuMaxWidth },\n zIndex: 100,\n }}\n onAddFilter={onAddFilter}\n onRemoveFilter={onRemoveFilter}\n onOpenMenu={handleOpenMenu}\n onClose={onFilterMenuClose}\n width={headerWidth}\n {...get(column, ['filter'], {})}\n />\n </FilterHeaderButton>\n </Container>\n );\n}
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD8DnB;AA7DJ,mBAAwD;AACxD,wBAAsB;AACtB,2BAAkC;AAClC,
|
4
|
+
"sourcesContent": ["/* eslint-disable no-param-reassign */\nimport React, { useCallback, useEffect, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { get, debounce, useResizeObserver } from '@elliemae/ds-utilities';\nimport { useTheme } from '@elliemae/ds-system';\nimport { getFilterMenuByType } from './filterable-menus/getFilterMenuByType.js';\n\nconst blockName = 'data-grid-filter-header';\n\nconst Container = aggregatedClasses('div')(blockName, null, ({ showFilter }) => ({\n 'show-filter': showFilter,\n}));\nconst FilterHeaderValue = aggregatedClasses('div')(blockName, 'value');\nconst FilterHeaderButton = aggregatedClasses('div')(blockName, 'button');\n\nexport const FilterableHeader = ({\n column,\n value,\n columnData,\n onAddFilter,\n onRemoveFilter,\n filterMenuRef,\n onFilterMenuClose,\n onFilterMenuOpen,\n filters,\n isMulti,\n}) => {\n const [isMenuOpened, setMenuOpened] = useState(false);\n const [headerWidth, setHeaderWidth] = useState();\n const debouncedWidthSetter = debounce(setHeaderWidth, 200);\n const { filterMenuMinWidth, filterMenuMaxWidth } = column;\n const theme = useTheme();\n const dropdownMinWidth = filterMenuMinWidth || Number(theme.space.xl.replace('px', '')) * 2;\n\n const defineHeaderWidth = ({ width }) => {\n let nextWidth = width + 16; // todo: use dimsum space once we convert it to JS\n if (nextWidth < dropdownMinWidth) nextWidth = dropdownMinWidth;\n if (filterMenuMaxWidth && nextWidth > filterMenuMaxWidth) nextWidth = filterMenuMaxWidth;\n return !isMenuOpened ? debouncedWidthSetter(nextWidth) : setHeaderWidth(nextWidth);\n };\n\n useEffect(() => {\n if (filterMenuRef) {\n filterMenuRef.current = {\n toggleMenu: () => setMenuOpened((prevState) => !prevState),\n };\n }\n }, [filterMenuRef]);\n\n useEffect(() => {\n if (!isMenuOpened) onFilterMenuClose(column);\n else onFilterMenuOpen(column);\n });\n\n const [ref] = useResizeObserver(defineHeaderWidth);\n const handleOpenMenu = useCallback((open) => {\n setMenuOpened(open);\n if (open) onFilterMenuOpen();\n }, []);\n const FilterMenuComponent = getFilterMenuByType(get(column, ['filter', 'type']));\n return (\n <Container ref={ref} classProps={{ showFilter: isMenuOpened }}>\n <FilterHeaderValue className=\"header-value\">{value}</FilterHeaderValue>\n <FilterHeaderButton data-testid=\"data-grid-filter-header__button\">\n <FilterMenuComponent\n className=\"filter-header-menu\"\n column={column}\n filters={filters}\n isMenuOpened={isMenuOpened}\n isMulti={isMulti}\n menuProps={{\n options: columnData || [],\n style: { minWidth: headerWidth, maxWidth: filterMenuMaxWidth },\n zIndex: 100,\n }}\n onAddFilter={onAddFilter}\n onRemoveFilter={onRemoveFilter}\n onOpenMenu={handleOpenMenu}\n onClose={onFilterMenuClose}\n width={headerWidth}\n {...get(column, ['filter'], {})}\n />\n </FilterHeaderButton>\n </Container>\n );\n};\n\nFilterableHeader.propTypes = {\n column: PropTypes.any,\n value: PropTypes.any,\n columnData: PropTypes.any,\n onAddFilter: PropTypes.func,\n onRemoveFilter: PropTypes.func,\n filterMenuRef: PropTypes.any,\n onFilterMenuClose: PropTypes.func,\n onFilterMenuOpen: PropTypes.func,\n filters: PropTypes.arrayOf(PropTypes.shape({})),\n isMulti: PropTypes.bool,\n};\n\nexport default FilterableHeader;\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD8DnB;AA7DJ,mBAAwD;AACxD,wBAAsB;AACtB,2BAAkC;AAClC,0BAAiD;AACjD,uBAAyB;AACzB,iCAAoC;AAEpC,MAAM,YAAY;AAElB,MAAM,gBAAY,wCAAkB,KAAK,EAAE,WAAW,MAAM,CAAC,EAAE,WAAW,OAAO;AAAA,EAC/E,eAAe;AACjB,EAAE;AACF,MAAM,wBAAoB,wCAAkB,KAAK,EAAE,WAAW,OAAO;AACrE,MAAM,yBAAqB,wCAAkB,KAAK,EAAE,WAAW,QAAQ;AAEhE,MAAM,mBAAmB,CAAC;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,CAAC,cAAc,aAAa,QAAI,uBAAS,KAAK;AACpD,QAAM,CAAC,aAAa,cAAc,QAAI,uBAAS;AAC/C,QAAM,2BAAuB,8BAAS,gBAAgB,GAAG;AACzD,QAAM,EAAE,oBAAoB,mBAAmB,IAAI;AACnD,QAAM,YAAQ,2BAAS;AACvB,QAAM,mBAAmB,sBAAsB,OAAO,MAAM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