@elliemae/ds-datagrids 3.16.0-next.11 → 3.16.0-next.13
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/DSDataGrid.js +143 -0
- package/dist/cjs/DSDataGrid.js.map +1 -1
- package/dist/cjs/DataGridImpl.js +4 -0
- package/dist/cjs/DataGridImpl.js.map +1 -1
- package/dist/cjs/PaginatedDataGrid.js +4 -0
- package/dist/cjs/PaginatedDataGrid.js.map +1 -1
- package/dist/cjs/blockNames.js +4 -0
- package/dist/cjs/blockNames.js.map +1 -1
- package/dist/cjs/columns/IconColumn.js +4 -0
- package/dist/cjs/columns/IconColumn.js.map +1 -1
- package/dist/cjs/columns/NumberColumn.js +4 -0
- package/dist/cjs/columns/NumberColumn.js.map +1 -1
- package/dist/cjs/components/BodyCell.js +6 -0
- package/dist/cjs/components/BodyCell.js.map +1 -1
- package/dist/cjs/components/BodyList.js +4 -0
- package/dist/cjs/components/BodyList.js.map +1 -1
- package/dist/cjs/components/ColumnVisibilityMenuOption.js +4 -0
- package/dist/cjs/components/ColumnVisibilityMenuOption.js.map +1 -1
- package/dist/cjs/components/ColumnsOptionsMenuSection.js +5 -0
- package/dist/cjs/components/ColumnsOptionsMenuSection.js.map +1 -1
- package/dist/cjs/components/EmptyState.js +4 -0
- package/dist/cjs/components/EmptyState.js.map +1 -1
- package/dist/cjs/components/HeaderCell.js +4 -0
- package/dist/cjs/components/HeaderCell.js.map +1 -1
- package/dist/cjs/components/List.js +4 -0
- package/dist/cjs/components/List.js.map +1 -1
- package/dist/cjs/components/ListItem.js +4 -0
- package/dist/cjs/components/ListItem.js.map +1 -1
- package/dist/cjs/components/NoResults.js +4 -0
- package/dist/cjs/components/NoResults.js.map +1 -1
- package/dist/cjs/components/RowsLoader.js +4 -0
- package/dist/cjs/components/RowsLoader.js.map +1 -1
- package/dist/cjs/components/Table.js +4 -0
- package/dist/cjs/components/Table.js.map +1 -1
- package/dist/cjs/components/TableBody.js +4 -0
- package/dist/cjs/components/TableBody.js.map +1 -1
- package/dist/cjs/components/TableHeader.js +4 -0
- package/dist/cjs/components/TableHeader.js.map +1 -1
- package/dist/cjs/components/footer/addOptionalFooterComponents.js +4 -0
- package/dist/cjs/components/footer/addOptionalFooterComponents.js.map +1 -1
- package/dist/cjs/components/header/PrimaryControls.js +4 -0
- package/dist/cjs/components/header/PrimaryControls.js.map +1 -1
- package/dist/cjs/components/header/addOptionalHeaderComponents.js +4 -0
- package/dist/cjs/components/header/addOptionalHeaderComponents.js.map +1 -1
- package/dist/cjs/components/index.js +4 -0
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/components/renderers/defaultClassedRenderers.js +4 -0
- package/dist/cjs/components/renderers/defaultClassedRenderers.js.map +1 -1
- package/dist/cjs/components/renderers/index.js +4 -0
- package/dist/cjs/components/renderers/index.js.map +1 -1
- package/dist/cjs/components/renderers/renderRowsLoader.js +4 -0
- package/dist/cjs/components/renderers/renderRowsLoader.js.map +1 -1
- package/dist/cjs/components/tableContext.js +4 -0
- package/dist/cjs/components/tableContext.js.map +1 -1
- package/dist/cjs/defaultPlugins.js +4 -0
- package/dist/cjs/defaultPlugins.js.map +1 -1
- package/dist/cjs/index.js +4 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +4 -0
- package/dist/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js.map +1 -1
- package/dist/cjs/plugins/body-header-scroll-sync/index.js +4 -0
- package/dist/cjs/plugins/body-header-scroll-sync/index.js.map +1 -1
- package/dist/cjs/plugins/column-dnd/DndColumnsPlugin.js +4 -0
- package/dist/cjs/plugins/column-dnd/DndColumnsPlugin.js.map +1 -1
- package/dist/cjs/plugins/column-dnd/decorateGridWithDndColumns.js +4 -0
- package/dist/cjs/plugins/column-dnd/decorateGridWithDndColumns.js.map +1 -1
- package/dist/cjs/plugins/column-dnd/index.js +4 -0
- package/dist/cjs/plugins/column-dnd/index.js.map +1 -1
- package/dist/cjs/plugins/column-sizing/ColumnSizingPlugin.js +4 -0
- package/dist/cjs/plugins/column-sizing/ColumnSizingPlugin.js.map +1 -1
- package/dist/cjs/plugins/column-sizing/columnMeasurerTransformer.js +4 -0
- package/dist/cjs/plugins/column-sizing/columnMeasurerTransformer.js.map +1 -1
- package/dist/cjs/plugins/column-sizing/ext-points/decorateColumn.js +4 -0
- package/dist/cjs/plugins/column-sizing/ext-points/decorateColumn.js.map +1 -1
- package/dist/cjs/plugins/column-sizing/ext-points/getTableProps.js +4 -0
- package/dist/cjs/plugins/column-sizing/ext-points/getTableProps.js.map +1 -1
- package/dist/cjs/plugins/column-sizing/getColumnNameFromProperty.js +4 -0
- package/dist/cjs/plugins/column-sizing/getColumnNameFromProperty.js.map +1 -1
- package/dist/cjs/plugins/column-sizing/index.js +4 -0
- package/dist/cjs/plugins/column-sizing/index.js.map +1 -1
- package/dist/cjs/plugins/column-sizing/useColumnSizeService.js +4 -0
- package/dist/cjs/plugins/column-sizing/useColumnSizeService.js.map +1 -1
- package/dist/cjs/plugins/column-sizing/useStylesheetHelpers.js +5 -0
- package/dist/cjs/plugins/column-sizing/useStylesheetHelpers.js.map +1 -1
- package/dist/cjs/plugins/column-sizing/utils.js +4 -0
- package/dist/cjs/plugins/column-sizing/utils.js.map +1 -1
- package/dist/cjs/plugins/custom-cell-renderer/CustomRendererPlugin.js +4 -0
- package/dist/cjs/plugins/custom-cell-renderer/CustomRendererPlugin.js.map +1 -1
- package/dist/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js +5 -0
- package/dist/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js.map +1 -1
- package/dist/cjs/plugins/custom-cell-renderer/getRendererComponent.js +4 -0
- package/dist/cjs/plugins/custom-cell-renderer/getRendererComponent.js.map +1 -1
- package/dist/cjs/plugins/custom-cell-renderer/index.js +4 -0
- package/dist/cjs/plugins/custom-cell-renderer/index.js.map +1 -1
- package/dist/cjs/plugins/editable/EditableComponents/ComboBox.js +4 -0
- package/dist/cjs/plugins/editable/EditableComponents/ComboBox.js.map +1 -1
- package/dist/cjs/plugins/editable/EditableComponents/TextBox.js +4 -0
- package/dist/cjs/plugins/editable/EditableComponents/TextBox.js.map +1 -1
- package/dist/cjs/plugins/editable/EditableComponents/index.js +4 -0
- package/dist/cjs/plugins/editable/EditableComponents/index.js.map +1 -1
- package/dist/cjs/plugins/editable/EditablePlugin.js +4 -0
- package/dist/cjs/plugins/editable/EditablePlugin.js.map +1 -1
- package/dist/cjs/plugins/editable/decorateEditable.js +4 -0
- package/dist/cjs/plugins/editable/decorateEditable.js.map +1 -1
- package/dist/cjs/plugins/editable/getEditorComponent.js +4 -0
- package/dist/cjs/plugins/editable/getEditorComponent.js.map +1 -1
- package/dist/cjs/plugins/editable/index.js +4 -0
- package/dist/cjs/plugins/editable/index.js.map +1 -1
- package/dist/cjs/plugins/expandable-grid/ExpandableColumn.js +4 -0
- package/dist/cjs/plugins/expandable-grid/ExpandableColumn.js.map +1 -1
- package/dist/cjs/plugins/expandable-grid/ExpandablePlugin.js +4 -0
- package/dist/cjs/plugins/expandable-grid/ExpandablePlugin.js.map +1 -1
- package/dist/cjs/plugins/expandable-grid/ExpandedRow.js +4 -0
- package/dist/cjs/plugins/expandable-grid/ExpandedRow.js.map +1 -1
- package/dist/cjs/plugins/expandable-grid/ExpandedRowExtra.js +4 -0
- package/dist/cjs/plugins/expandable-grid/ExpandedRowExtra.js.map +1 -1
- package/dist/cjs/plugins/expandable-grid/index.js +4 -0
- package/dist/cjs/plugins/expandable-grid/index.js.map +1 -1
- package/dist/cjs/plugins/expandable-grid/useExpandGridState.js +4 -0
- package/dist/cjs/plugins/expandable-grid/useExpandGridState.js.map +1 -1
- package/dist/cjs/plugins/export-data/ExportDataPlugin.js +4 -0
- package/dist/cjs/plugins/export-data/ExportDataPlugin.js.map +1 -1
- package/dist/cjs/plugins/export-data/index.js +4 -0
- package/dist/cjs/plugins/export-data/index.js.map +1 -1
- package/dist/cjs/plugins/filterable/FilterablePlugin.js +4 -0
- package/dist/cjs/plugins/filterable/FilterablePlugin.js.map +1 -1
- package/dist/cjs/plugins/filterable/addFilterToColumn.js +4 -0
- package/dist/cjs/plugins/filterable/addFilterToColumn.js.map +1 -1
- package/dist/cjs/plugins/filterable/components/FilterableHeader.js +4 -0
- package/dist/cjs/plugins/filterable/components/FilterableHeader.js.map +1 -1
- package/dist/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +5 -0
- package/dist/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js.map +1 -1
- package/dist/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +4 -0
- package/dist/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js.map +1 -1
- package/dist/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +5 -0
- package/dist/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js.map +1 -1
- package/dist/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js +4 -0
- package/dist/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js.map +1 -1
- package/dist/cjs/plugins/filterable/components/filterable-menus/defaultDateFormat.js +4 -0
- package/dist/cjs/plugins/filterable/components/filterable-menus/defaultDateFormat.js.map +1 -1
- package/dist/cjs/plugins/filterable/components/filterable-menus/getFilterMenuByType.js +4 -0
- package/dist/cjs/plugins/filterable/components/filterable-menus/getFilterMenuByType.js.map +1 -1
- package/dist/cjs/plugins/filterable/filterableFormatter.js +4 -0
- package/dist/cjs/plugins/filterable/filterableFormatter.js.map +1 -1
- package/dist/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js +4 -0
- package/dist/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js.map +1 -1
- package/dist/cjs/plugins/filterable/filtering-helper/strategiesOperators.js +4 -0
- package/dist/cjs/plugins/filterable/filtering-helper/strategiesOperators.js.map +1 -1
- package/dist/cjs/plugins/filterable/helper.js +4 -0
- package/dist/cjs/plugins/filterable/helper.js.map +1 -1
- package/dist/cjs/plugins/filterable/index.js +4 -0
- package/dist/cjs/plugins/filterable/index.js.map +1 -1
- package/dist/cjs/plugins/filterable/useFilterableState.js +4 -0
- package/dist/cjs/plugins/filterable/useFilterableState.js.map +1 -1
- package/dist/cjs/plugins/grouping-by/GroupingByPlugin.js +4 -0
- package/dist/cjs/plugins/grouping-by/GroupingByPlugin.js.map +1 -1
- package/dist/cjs/plugins/grouping-grid/GroupingPlugin.js +16 -8
- package/dist/cjs/plugins/grouping-grid/GroupingPlugin.js.map +1 -1
- package/dist/cjs/plugins/grouping-grid/walkStrategy.js +4 -0
- package/dist/cjs/plugins/grouping-grid/walkStrategy.js.map +1 -1
- package/dist/cjs/plugins/index.js +4 -0
- package/dist/cjs/plugins/index.js.map +1 -1
- package/dist/cjs/plugins/infinite-scrolling/InfiniteScrollPlugin.js +4 -0
- package/dist/cjs/plugins/infinite-scrolling/InfiniteScrollPlugin.js.map +1 -1
- package/dist/cjs/plugins/infinite-scrolling/index.js +4 -0
- package/dist/cjs/plugins/infinite-scrolling/index.js.map +1 -1
- package/dist/cjs/plugins/pagination/PaginationPlugin.js +5 -0
- package/dist/cjs/plugins/pagination/PaginationPlugin.js.map +1 -1
- package/dist/cjs/plugins/pagination/components/Pagination.js +4 -0
- package/dist/cjs/plugins/pagination/components/Pagination.js.map +1 -1
- package/dist/cjs/plugins/pagination/components/Paginator.js +4 -0
- package/dist/cjs/plugins/pagination/components/Paginator.js.map +1 -1
- package/dist/cjs/plugins/pagination/components/PerPageDropdown.js +4 -0
- package/dist/cjs/plugins/pagination/components/PerPageDropdown.js.map +1 -1
- package/dist/cjs/plugins/pagination/helper.js +4 -0
- package/dist/cjs/plugins/pagination/helper.js.map +1 -1
- package/dist/cjs/plugins/pagination/index.js +4 -0
- package/dist/cjs/plugins/pagination/index.js.map +1 -1
- package/dist/cjs/plugins/pagination/usePaginationState.js +4 -0
- package/dist/cjs/plugins/pagination/usePaginationState.js.map +1 -1
- package/dist/cjs/plugins/resizable/ResizablePlugin.js +4 -0
- package/dist/cjs/plugins/resizable/ResizablePlugin.js.map +1 -1
- package/dist/cjs/plugins/resizable/decorateResizable.js +4 -0
- package/dist/cjs/plugins/resizable/decorateResizable.js.map +1 -1
- package/dist/cjs/plugins/resizable/index.js +4 -0
- package/dist/cjs/plugins/resizable/index.js.map +1 -1
- package/dist/cjs/plugins/resizable/useResizeHandle.js +8 -1
- package/dist/cjs/plugins/resizable/useResizeHandle.js.map +1 -1
- package/dist/cjs/plugins/resizable/utils.js +4 -0
- package/dist/cjs/plugins/resizable/utils.js.map +1 -1
- package/dist/cjs/plugins/row-dnd/DndRowsPlugin.js +5 -0
- package/dist/cjs/plugins/row-dnd/DndRowsPlugin.js.map +1 -1
- package/dist/cjs/plugins/row-dnd/index.js +4 -0
- package/dist/cjs/plugins/row-dnd/index.js.map +1 -1
- package/dist/cjs/plugins/selectable/SelectablePlugin.js +4 -0
- package/dist/cjs/plugins/selectable/SelectablePlugin.js.map +1 -1
- package/dist/cjs/plugins/selectable/addSelectableColumn.js +6 -0
- package/dist/cjs/plugins/selectable/addSelectableColumn.js.map +1 -1
- package/dist/cjs/plugins/selectable/helper.js +4 -0
- package/dist/cjs/plugins/selectable/helper.js.map +1 -1
- package/dist/cjs/plugins/selectable/index.js +4 -0
- package/dist/cjs/plugins/selectable/index.js.map +1 -1
- package/dist/cjs/plugins/selectable/selectableFormatter.js +4 -0
- package/dist/cjs/plugins/selectable/selectableFormatter.js.map +1 -1
- package/dist/cjs/plugins/selectable/useSelectableState.js +6 -0
- package/dist/cjs/plugins/selectable/useSelectableState.js.map +1 -1
- package/dist/cjs/plugins/sortable/SortablePlugin.js +4 -0
- package/dist/cjs/plugins/sortable/SortablePlugin.js.map +1 -1
- package/dist/cjs/plugins/sortable/checkIfSortable.js +4 -0
- package/dist/cjs/plugins/sortable/checkIfSortable.js.map +1 -1
- package/dist/cjs/plugins/sortable/index.js +4 -0
- package/dist/cjs/plugins/sortable/index.js.map +1 -1
- package/dist/cjs/plugins/sortable/sortHeaderFormatter.js +4 -0
- package/dist/cjs/plugins/sortable/sortHeaderFormatter.js.map +1 -1
- package/dist/cjs/plugins/sortable/sortTree.js +4 -0
- package/dist/cjs/plugins/sortable/sortTree.js.map +1 -1
- package/dist/cjs/plugins/sortable/sorter.js +5 -0
- package/dist/cjs/plugins/sortable/sorter.js.map +1 -1
- package/dist/cjs/plugins/sortable/useSortableState.js +4 -0
- package/dist/cjs/plugins/sortable/useSortableState.js.map +1 -1
- package/dist/cjs/plugins/toolbar/RowRenderer.js +5 -0
- package/dist/cjs/plugins/toolbar/RowRenderer.js.map +1 -1
- package/dist/cjs/plugins/toolbar/ToolbarPlugin.js +4 -0
- package/dist/cjs/plugins/toolbar/ToolbarPlugin.js.map +1 -1
- package/dist/cjs/plugins/toolbar/ToolbarTrigger.js +5 -0
- package/dist/cjs/plugins/toolbar/ToolbarTrigger.js.map +1 -1
- package/dist/cjs/plugins/toolbar/index.js +4 -0
- package/dist/cjs/plugins/toolbar/index.js.map +1 -1
- package/dist/cjs/plugins/virtualization/AutoHeightList.js +4 -0
- package/dist/cjs/plugins/virtualization/AutoHeightList.js.map +1 -1
- package/dist/cjs/plugins/virtualization/VirtualizationPlugin.js +6 -0
- package/dist/cjs/plugins/virtualization/VirtualizationPlugin.js.map +1 -1
- package/dist/cjs/plugins/virtualization/VirtualizedBody.js +5 -0
- package/dist/cjs/plugins/virtualization/VirtualizedBody.js.map +1 -1
- package/dist/cjs/plugins/virtualization/VirtualizedBodyRow.js +5 -0
- package/dist/cjs/plugins/virtualization/VirtualizedBodyRow.js.map +1 -1
- package/dist/cjs/plugins/virtualization/helper.js +4 -0
- package/dist/cjs/plugins/virtualization/helper.js.map +1 -1
- package/dist/cjs/plugins/virtualization/index.js +4 -0
- package/dist/cjs/plugins/virtualization/index.js.map +1 -1
- package/dist/cjs/renders/CellWithAddons.js +14 -0
- package/dist/cjs/renders/CellWithAddons.js.map +1 -1
- package/dist/cjs/renders/index.js +4 -0
- package/dist/cjs/renders/index.js.map +1 -1
- package/dist/cjs/renders/styled.js +4 -0
- package/dist/cjs/renders/styled.js.map +1 -1
- package/dist/cjs/rowSizes.js +4 -0
- package/dist/cjs/rowSizes.js.map +1 -1
- package/dist/cjs/utilities/getPluginsFromProps.js +4 -0
- package/dist/cjs/utilities/getPluginsFromProps.js.map +1 -1
- package/dist/cjs/utilities/getScrollbarSize.js +4 -0
- package/dist/cjs/utilities/getScrollbarSize.js.map +1 -1
- package/dist/cjs/utilities/normalizeData.js +4 -0
- package/dist/cjs/utilities/normalizeData.js.map +1 -1
- package/dist/esm/DSDataGrid.js +139 -0
- package/dist/esm/DSDataGrid.js.map +1 -1
- package/dist/esm/DataGridImpl.js.map +1 -1
- package/dist/esm/PaginatedDataGrid.js.map +1 -1
- package/dist/esm/columns/IconColumn.js.map +1 -1
- package/dist/esm/components/BodyCell.js +2 -0
- package/dist/esm/components/BodyCell.js.map +1 -1
- package/dist/esm/components/BodyList.js.map +1 -1
- package/dist/esm/components/ColumnsOptionsMenuSection.js +1 -0
- package/dist/esm/components/ColumnsOptionsMenuSection.js.map +1 -1
- package/dist/esm/components/EmptyState.js.map +1 -1
- package/dist/esm/components/NoResults.js.map +1 -1
- package/dist/esm/components/Table.js.map +1 -1
- package/dist/esm/components/TableBody.js.map +1 -1
- package/dist/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js.map +1 -1
- package/dist/esm/plugins/column-dnd/DndColumnsPlugin.js.map +1 -1
- package/dist/esm/plugins/column-sizing/columnMeasurerTransformer.js.map +1 -1
- package/dist/esm/plugins/column-sizing/useColumnSizeService.js.map +1 -1
- package/dist/esm/plugins/column-sizing/useStylesheetHelpers.js +1 -0
- package/dist/esm/plugins/column-sizing/useStylesheetHelpers.js.map +1 -1
- package/dist/esm/plugins/column-sizing/utils.js.map +1 -1
- package/dist/esm/plugins/custom-cell-renderer/addCustomRendererToCell.js +1 -0
- package/dist/esm/plugins/custom-cell-renderer/addCustomRendererToCell.js.map +1 -1
- package/dist/esm/plugins/custom-cell-renderer/getRendererComponent.js.map +1 -1
- package/dist/esm/plugins/editable/EditablePlugin.js.map +1 -1
- package/dist/esm/plugins/editable/decorateEditable.js.map +1 -1
- package/dist/esm/plugins/editable/getEditorComponent.js.map +1 -1
- package/dist/esm/plugins/expandable-grid/ExpandableColumn.js.map +1 -1
- package/dist/esm/plugins/expandable-grid/ExpandablePlugin.js.map +1 -1
- package/dist/esm/plugins/expandable-grid/ExpandedRow.js.map +1 -1
- package/dist/esm/plugins/expandable-grid/useExpandGridState.js.map +1 -1
- package/dist/esm/plugins/export-data/ExportDataPlugin.js.map +1 -1
- package/dist/esm/plugins/filterable/FilterablePlugin.js.map +1 -1
- package/dist/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +1 -0
- package/dist/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js.map +1 -1
- package/dist/esm/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +1 -0
- package/dist/esm/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js.map +1 -1
- package/dist/esm/plugins/filterable/components/filterable-menus/TextFilterMenu.js.map +1 -1
- package/dist/esm/plugins/filterable/components/filterable-menus/getFilterMenuByType.js.map +1 -1
- package/dist/esm/plugins/filterable/filtering-helper/filterRowsByQuery.js.map +1 -1
- package/dist/esm/plugins/filterable/filtering-helper/strategiesOperators.js.map +1 -1
- package/dist/esm/plugins/filterable/helper.js.map +1 -1
- package/dist/esm/plugins/grouping-by/GroupingByPlugin.js.map +1 -1
- package/dist/esm/plugins/grouping-grid/GroupingPlugin.js +12 -8
- package/dist/esm/plugins/grouping-grid/GroupingPlugin.js.map +1 -1
- package/dist/esm/plugins/grouping-grid/walkStrategy.js.map +1 -1
- package/dist/esm/plugins/infinite-scrolling/InfiniteScrollPlugin.js.map +1 -1
- package/dist/esm/plugins/pagination/PaginationPlugin.js +1 -0
- package/dist/esm/plugins/pagination/PaginationPlugin.js.map +1 -1
- package/dist/esm/plugins/pagination/components/PerPageDropdown.js.map +1 -1
- package/dist/esm/plugins/resizable/ResizablePlugin.js.map +1 -1
- package/dist/esm/plugins/resizable/useResizeHandle.js +4 -1
- package/dist/esm/plugins/resizable/useResizeHandle.js.map +1 -1
- package/dist/esm/plugins/row-dnd/DndRowsPlugin.js +1 -0
- package/dist/esm/plugins/row-dnd/DndRowsPlugin.js.map +1 -1
- package/dist/esm/plugins/selectable/SelectablePlugin.js.map +1 -1
- package/dist/esm/plugins/selectable/addSelectableColumn.js +2 -0
- package/dist/esm/plugins/selectable/addSelectableColumn.js.map +1 -1
- package/dist/esm/plugins/selectable/helper.js.map +1 -1
- package/dist/esm/plugins/selectable/selectableFormatter.js.map +1 -1
- package/dist/esm/plugins/selectable/useSelectableState.js +2 -0
- package/dist/esm/plugins/selectable/useSelectableState.js.map +1 -1
- package/dist/esm/plugins/sortable/SortablePlugin.js.map +1 -1
- package/dist/esm/plugins/sortable/checkIfSortable.js.map +1 -1
- package/dist/esm/plugins/sortable/sortHeaderFormatter.js.map +1 -1
- package/dist/esm/plugins/sortable/sorter.js +1 -0
- package/dist/esm/plugins/sortable/sorter.js.map +1 -1
- package/dist/esm/plugins/toolbar/RowRenderer.js +1 -0
- package/dist/esm/plugins/toolbar/RowRenderer.js.map +1 -1
- package/dist/esm/plugins/toolbar/ToolbarPlugin.js.map +1 -1
- package/dist/esm/plugins/toolbar/ToolbarTrigger.js +1 -0
- package/dist/esm/plugins/toolbar/ToolbarTrigger.js.map +1 -1
- package/dist/esm/plugins/virtualization/AutoHeightList.js.map +1 -1
- package/dist/esm/plugins/virtualization/VirtualizationPlugin.js +2 -0
- package/dist/esm/plugins/virtualization/VirtualizationPlugin.js.map +1 -1
- package/dist/esm/plugins/virtualization/VirtualizedBody.js +1 -0
- package/dist/esm/plugins/virtualization/VirtualizedBody.js.map +1 -1
- package/dist/esm/plugins/virtualization/VirtualizedBodyRow.js +1 -0
- package/dist/esm/plugins/virtualization/VirtualizedBodyRow.js.map +1 -1
- package/dist/esm/renders/CellWithAddons.js +10 -0
- package/dist/esm/renders/CellWithAddons.js.map +1 -1
- package/dist/esm/renders/styled.js.map +1 -1
- package/dist/esm/utilities/getPluginsFromProps.js.map +1 -1
- package/dist/esm/utilities/normalizeData.js.map +1 -1
- package/package.json +24 -24
@@ -2,6 +2,6 @@
|
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/ColumnsOptionsMenuSection.tsx"],
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { Menu } from '@elliemae/ds-menu';\n\nconst ColumnsOptionsMenuSection = ({\n columns,\n onColumnVisibilityChange,\n searchable = false,\n height,\n // eslint-disable-next-line react/display-name\n}) =>\n function () {\n const { items, active } = columns.reduce(\n (result, column, index) => ({\n items: [\n ...result.items,\n {\n id: column.property,\n label: column.label,\n checked: column.visible,\n onClick: () => onColumnVisibilityChange(column, index),\n },\n ],\n active:\n typeof column.visible === 'undefined' || column.visible ? [...result.active, column.property] : result.active,\n }),\n { items: [], active: [] },\n );\n return <Menu.SelectionGroup active={active} height={height} items={items} multi searchable={searchable} />;\n };\n\nexport { ColumnsOptionsMenuSection };\nexport default ColumnsOptionsMenuSection;\n"],
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;AC2BZ;AA1BX,SAAS,YAAY;AAErB,MAAM,4BAA4B,CAAC;AAAA,EACjC;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb;AAEF,MACE,WAAY;AACV,QAAM,EAAE,OAAO,OAAO,IAAI,QAAQ;AAAA,IAChC,CAAC,QAAQ,QAAQ,WAAW;AAAA,MAC1B,OAAO;AAAA,QACL,GAAG,OAAO;AAAA,QACV;AAAA,UACE,IAAI,OAAO;AAAA,UACX,OAAO,OAAO;AAAA,UACd,SAAS,OAAO;AAAA,UAChB,SAAS,MAAM,yBAAyB,QAAQ,KAAK;AAAA,QACvD;AAAA,MACF;AAAA,MACA,QACE,OAAO,OAAO,YAAY,eAAe,OAAO,UAAU,CAAC,GAAG,OAAO,QAAQ,OAAO,QAAQ,IAAI,OAAO;AAAA,IAC3G;AAAA,IACA,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,EAAE;AAAA,EAC1B;AACA,SAAO,oBAAC,KAAK,gBAAL,EAAoB,QAAgB,QAAgB,OAAc,OAAK,MAAC,YAAwB;AAC1G;AAGF,IAAO,oCAAQ;",
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC2BZ;AA1BX,SAAS,YAAY;AAErB,MAAM,4BAA4B,CAAC;AAAA,EACjC;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb;AAAA;AAEF,MACE,WAAY;AACV,QAAM,EAAE,OAAO,OAAO,IAAI,QAAQ;AAAA,IAChC,CAAC,QAAQ,QAAQ,WAAW;AAAA,MAC1B,OAAO;AAAA,QACL,GAAG,OAAO;AAAA,QACV;AAAA,UACE,IAAI,OAAO;AAAA,UACX,OAAO,OAAO;AAAA,UACd,SAAS,OAAO;AAAA,UAChB,SAAS,MAAM,yBAAyB,QAAQ,KAAK;AAAA,QACvD;AAAA,MACF;AAAA,MACA,QACE,OAAO,OAAO,YAAY,eAAe,OAAO,UAAU,CAAC,GAAG,OAAO,QAAQ,OAAO,QAAQ,IAAI,OAAO;AAAA,IAC3G;AAAA,IACA,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,EAAE;AAAA,EAC1B;AACA,SAAO,oBAAC,KAAK,gBAAL,EAAoB,QAAgB,QAAgB,OAAc,OAAK,MAAC,YAAwB;AAC1G;AAGF,IAAO,oCAAQ;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -2,6 +2,6 @@
|
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/EmptyState.tsx"],
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { WarningTriangle } from '@elliemae/ds-icons';\nimport { __UNSAFE_SPACE_TO_DIMSUM, toMobile, styled } from '@elliemae/ds-system';\nimport { DSButton } from '@elliemae/ds-button';\n\nconst EmptyStateWrapper = styled(Grid)`\n min-width: 132px; /* fixed size in px according to specs */\n max-width: 384px; /* fixed size in px according to specs */\n height: fit-content;\n`;\n\nconst Icon = styled(WarningTriangle)`\n fill: ${(props) => props.theme.colors.neutral[300]};\n color: ${(props) => props.theme.colors.neutral[300]};\n justify-self: center;\n`;\n\nconst PrimaryMessage = styled.p`\n text-align: center;\n font-weight: 600;\n font-size: ${(props) => toMobile(props.theme.fontSizes.value[400])};\n color: ${(props) => props.theme.colors.neutral[600]};\n margin-top: ${(props) => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.s)};\n margin-bottom: ${(props) => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xs)};\n`;\nconst SecondaryMessage = styled.p`\n text-align: center;\n font-size: ${(props) => toMobile(props.theme.fontSizes.value[400])}; /* 13px */\n color: ${(props) => props.theme.colors.neutral[500]};\n margin: 0;\n`;\nconst Button = styled(DSButton)`\n margin-top: ${(props) => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.m)};\n justify-self: center;\n width: fit-content;\n`;\n\nexport const EmptyState = ({\n primaryMessage = 'No Results Found',\n secondaryMessage,\n buttonLabel,\n onButtonClick = () => {},\n}) => (\n <EmptyStateWrapper>\n <Icon size=\"xxl\" />\n {primaryMessage && <PrimaryMessage>{primaryMessage}</PrimaryMessage>}\n {secondaryMessage && <SecondaryMessage>{secondaryMessage}</SecondaryMessage>}\n {buttonLabel && <Button buttonType=\"secondary\" labelText={buttonLabel} onClick={onButtonClick} />}\n </EmptyStateWrapper>\n);\n"],
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;AC4CrB,SACE,KADF;AA3CF,SAAS,YAAY;AACrB,SAAS,uBAAuB;AAChC,SAAS,0BAA0B,UAAU,cAAc;AAC3D,SAAS,gBAAgB;AAE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kBAAkB,oBAAC,kBAAgB,0BAAe;AAAA,EAClD,oBAAoB,oBAAC,oBAAkB,4BAAiB;AAAA,EACxD,eAAe,oBAAC,UAAO,YAAW,aAAY,WAAW,aAAa,SAAS,eAAe;AAAA,GACjG;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -2,6 +2,6 @@
|
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/NoResults.tsx"],
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled, __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';\n\nconst NoResultsContainer = styled.div`\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n padding: ${(props) => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.s)};\n padding-bottom: 0;\n height: calc(100% - 36px);\n overflow: auto;\n`;\n\nexport const NoResults = ({ innerRef, rowRenderer, children, ...rest }) => (\n <>\n <NoResultsContainer {...rest} innerRef={innerRef}>\n {children}\n </NoResultsContainer>\n {/* Hack to expand to the width of the row so we can scroll\n if the columns are bigger than the grid */}\n {rowRenderer({}, { style: { visibility: 'hidden', marginBottom: 0 } }, {})}\n </>\n);\n\nexport default NoResults;\n"],
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACerB,mBACE,KADF;AAdF,SAAS,QAAQ,gCAAgC;AAEjD,MAAM,qBAAqB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,aAKrB,CAAC,UAAU,yBAAyB,MAAM,MAAM,MAAM,CAAC;AAAA;AAAA;AAAA;AAAA;AAM7D,MAAM,YAAY,CAAC,EAAE,UAAU,aAAa,
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACerB,mBACE,KADF;AAdF,SAAS,QAAQ,gCAAgC;AAEjD,MAAM,qBAAqB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,aAKrB,CAAC,UAAU,yBAAyB,MAAM,MAAM,MAAM,CAAC;AAAA;AAAA;AAAA;AAAA;AAM7D,MAAM,YAAY,CAAC,EAAE,UAAU,aAAa,UAAU,GAAG,KAAK,MACnE,iCACE;AAAA,sBAAC,sBAAoB,GAAG,MAAM,UAC3B,UACH;AAAA,EAGC,YAAY,CAAC,GAAG,EAAE,OAAO,EAAE,YAAY,UAAU,cAAc,EAAE,EAAE,GAAG,CAAC,CAAC;AAAA,GAC3E;AAGF,IAAO,oBAAQ;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -2,6 +2,6 @@
|
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/Table.tsx"],
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-loops/no-loops,no-plusplus */\nimport React, { useCallback, useMemo, useEffect } from 'react';\nimport { TableHeader } from './TableHeader.js';\nimport { TableBody } from './TableBody.js';\nimport { HeaderCell } from './HeaderCell.js';\nimport { BodyCell } from './BodyCell.js';\nimport { TableContext } from './tableContext.js';\n\nconst { Provider } = TableContext;\n\nconst Table = (props) => {\n const {\n decoratedRenderers: renderers,\n decoratedColumns: columns,\n getRowProps,\n getHeaderRowProps,\n getTableProps,\n children,\n tableRef,\n props: { wrapText },\n style,\n onDefaultFiltersLoad = () => null,\n } = props;\n\n useEffect(() => {\n onDefaultFiltersLoad(props.composedRows);\n }, [onDefaultFiltersLoad]);\n\n const headerRowRenderer = () => {\n const Row = renderers.header.row;\n const Cell = renderers.header.cell;\n const cells = [];\n\n // optimize the rendering using for loop\n for (let index = 0; index < columns.length; index++) {\n cells.push(\n <HeaderCell\n key={index}\n classProps={{ wrapText }}\n column={columns[index]}\n columnIndex={index}\n component={Cell}\n grid={props}\n />,\n );\n }\n\n const rowProps = getHeaderRowProps({}, {});\n return <Row {...rowProps}>{cells}</Row>;\n };\n\n const bodyRowRenderer = useCallback(\n (rowData, rowProps, extraParams) => {\n const Row = renderers.body.row;\n const Cell = renderers.body.cell;\n\n const nextRowProps = getRowProps(rowProps, { ...extraParams, rowData });\n\n // get cells from columns api\n const cells = [];\n\n // optimize the rendering using for loop\n for (let index = 0; index < columns.length; index++) {\n cells.push(\n <BodyCell\n key={index}\n classProps={{ wrapText }}\n column={columns[index]}\n columnIndex={index}\n component={Cell}\n grid={props}\n rowIndex={extraParams.rowIndex}\n rowProps={{ rowData, ...nextRowProps }}\n />,\n );\n }\n\n return (\n <Row {...nextRowProps} rowData={rowData}>\n {cells}\n </Row>\n );\n },\n [columns, renderers],\n );\n\n const TableComponent = renderers.table;\n\n const value = { ...props, bodyRowRenderer, headerRowRenderer };\n\n return (\n <Provider value={value}>\n <TableComponent\n {...getTableProps({\n innerRef: tableRef,\n style,\n })}\n >\n {children}\n </TableComponent>\n </Provider>\n );\n};\n\nTable.Header = TableHeader;\nTable.Body = TableBody;\n\nexport { Table };\nexport default Table;\n"],
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACoCf;AAnCR,SAAgB,aAAsB,iBAAiB;AACvD,SAAS,mBAAmB;AAC5B,SAAS,iBAAiB;AAC1B,SAAS,kBAAkB;AAC3B,SAAS,gBAAgB;AACzB,SAAS,oBAAoB;AAE7B,MAAM,EAAE,SAAS,IAAI;AAErB,MAAM,QAAQ,CAAC,UAAU;AACvB,QAAM;AAAA,IACJ,oBAAoB;AAAA,IACpB,kBAAkB;AAAA,IAClB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO,EAAE,SAAS;AAAA,IAClB;AAAA,IACA,uBAAuB,MAAM;AAAA,EAC/B,IAAI;AAEJ,YAAU,MAAM;AACd,yBAAqB,MAAM,YAAY;AAAA,EACzC,GAAG,CAAC,oBAAoB,CAAC;AAEzB,QAAM,oBAAoB,MAAM;AAC9B,UAAM,MAAM,UAAU,OAAO;AAC7B,UAAM,OAAO,UAAU,OAAO;AAC9B,UAAM,QAAQ,CAAC;AAGf,aAAS,QAAQ,GAAG,QAAQ,QAAQ,QAAQ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AK;AAE5B,YAAM,eAAe,YAAY,UAAU,EAAE,GAAG,aAAa,QAAQ,CAAC;AAGtE,YAAM,QAAQ,CAAC;AAGf,eAAS,QAAQ,GAAG,QAAQ,QAAQ,QAAQ,SAAS;AACnD,cAAM;AAAA,UACJ;AAAA,YAAC;AAAA;AAAA,cAEC,YAAY,EAAE,SAAS;AAAA,cACvB,QAAQ,QAAQ,KAAK;AAAA,cACrB,aAAa;AAAA,cACb,WAAW;AAAA,cACX,MAAM;AAAA,cACN,UAAU,YAAY;AAAA,cACtB,UAAU,EAAE,SAAS,GAAG,aAAa;AAAA;AAAA,YAPhC;AAAA,UAQP;AAAA,QACF;AAAA,MACF;AAEA,aACE,oBAAC,OAAK,GAAG,cAAc,SACpB,iBACH;AAAA,IAEJ;AAAA,IACA,CAAC,SAAS,SAAS;AAAA,EACrB;AAEA,QAAM,iBAAiB,UAAU;AAEjC,QAAM,QAAQ,EAAE,GAAG,OAAO,iBAAiB,kBAAkB;AAE7D,SACE,oBAAC,YAAS,OACR;AAAA,IAAC;AAAA;AAAA,MACE,GAAG,cAAc;AAAA,QAChB,UAAU;AAAA,QACV;AAAA,MACF,CAAC;AAAA,MAEA;AAAA;AAAA,EACH,GACF;AAEJ;AAEA,MAAM,SAAS;AACf,MAAM,OAAO;AAGb,IAAO,gBAAQ;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -2,6 +2,6 @@
|
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/TableBody.tsx"],
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useContext, memo } from 'react';\nimport { TableContext } from './tableContext.js';\n\nconst TableBody = memo(({ rows, noResultsPlaceholder = 'No data', isPlaceholderActive = false, ...props }) => {\n const {\n refs,\n decoratedColumns,\n decoratedRenderers: renderers,\n composedRows,\n getBodyProps,\n bodyRowRenderer: rowRenderer,\n props: { rowKey, numRowsVisible, groupedRows },\n } = useContext(TableContext);\n\n const BodyWrapperComponent = renderers.body.wrapper;\n return (\n <BodyWrapperComponent\n classProps={{ grouped: groupedRows }}\n {...getBodyProps({\n ...props,\n innerRef: refs.body,\n innerBodyRef: refs.innerBody,\n rows: rows || composedRows.rows || composedRows,\n noResultsPlaceholder,\n rowRenderer,\n columns: decoratedColumns,\n rowKey,\n numRowsVisible,\n isPlaceholderActive,\n })}\n >\n kajsd;klfajsd;fj\n </BodyWrapperComponent>\n );\n});\n\nexport { TableBody };\nexport default TableBody;\n"],
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACgBnB;AAhBJ,SAAgB,YAAY,YAAY;AACxC,SAAS,oBAAoB;AAE7B,MAAM,YAAY,KAAK,CAAC,EAAE,MAAM,uBAAuB,WAAW,sBAAsB,
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACgBnB;AAhBJ,SAAgB,YAAY,YAAY;AACxC,SAAS,oBAAoB;AAE7B,MAAM,YAAY,KAAK,CAAC,EAAE,MAAM,uBAAuB,WAAW,sBAAsB,OAAO,GAAG,MAAM,MAAM;AAC5G,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,oBAAoB;AAAA,IACpB;AAAA,IACA;AAAA,IACA,iBAAiB;AAAA,IACjB,OAAO,EAAE,QAAQ,gBAAgB,YAAY;AAAA,EAC/C,IAAI,WAAW,YAAY;AAE3B,QAAM,uBAAuB,UAAU,KAAK;AAC5C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,YAAY,EAAE,SAAS,YAAY;AAAA,MAClC,GAAG,aAAa;AAAA,QACf,GAAG;AAAA,QACH,UAAU,KAAK;AAAA,QACf,cAAc,KAAK;AAAA,QACnB,MAAM,QAAQ,aAAa,QAAQ;AAAA,QACnC;AAAA,QACA;AAAA,QACA,SAAS;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC;AAAA,MACF;AAAA;AAAA,EAED;AAEJ,CAAC;AAGD,IAAO,oBAAQ;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -2,6 +2,6 @@
|
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.tsx"],
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-shadow */\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable no-unused-vars */\n/* eslint-disable react/prop-types */\n/* eslint-disable max-lines */\n/* eslint-disable react-hooks/rules-of-hooks */\n/* eslint-disable no-param-reassign */\n/* eslint-disable react/display-name */\nimport React, { useMemo, useRef, useEffect } from 'react';\nimport { mergeRefs } from '@elliemae/ds-utilities';\nimport { ScrollSync, ScrollSyncPane, createInstancePlugin } from '@elliemae/ds-shared';\nimport { getScrollbarWidth } from '../../utilities/getScrollbarSize.js';\n\nconst SCROLLBAR_WIDTH = getScrollbarWidth(2);\n\nconst HeaderSyncHoc = (Component) =>\n function (props) {\n return (\n <ScrollSyncPane>\n {({ registerPane }) => <Component {...props} innerRef={mergeRefs(props.innerRef, registerPane)} />}\n </ScrollSyncPane>\n );\n };\nconst BodySyncHoc = (Component, notPaginated, grid) =>\n function ({\n children,\n classProps,\n columns,\n getContainer,\n helperClass,\n innerBodyRef,\n innerRef,\n isPlaceholderActive,\n listProps,\n lockAxis,\n noResultsPlaceholder,\n numRowsVisible,\n onSortEnd,\n onSortOver,\n onSortStart,\n rowKey,\n rowRenderer,\n rows,\n useDragHandle,\n className,\n listComponent,\n ...rest\n }) {\n const t = useRef();\n const repositionToolbarBasedOnBodyScrollPosition = (SCROLLBAR_WIDTH) => () => {\n grid.refs.body.current.style.setProperty(\n '--toolbar-scroll',\n `${grid.refs.body.current.offsetWidth + grid.refs.body.current.scrollLeft - 15}px`,\n );\n grid.refs.body.current.style.setProperty(\n '--toolbar-scroll-paginated',\n `${grid.refs.body.current.offsetWidth + grid.refs.body.current.scrollLeft - 19}px`,\n );\n };\n useEffect(() => {\n setTimeout(repositionToolbarBasedOnBodyScrollPosition(-SCROLLBAR_WIDTH), 300);\n }, []);\n useEffect(() => {\n window.addEventListener('resize', repositionToolbarBasedOnBodyScrollPosition(-SCROLLBAR_WIDTH));\n return () => {\n window.removeEventListener('resize', repositionToolbarBasedOnBodyScrollPosition(-SCROLLBAR_WIDTH));\n };\n });\n return (\n <ScrollSyncPane notPaginated={notPaginated}>\n {({ registerPane }) => (\n <Component\n ref={t}\n classProps={classProps}\n className={className}\n listComponent={listComponent}\n columns={columns}\n getContainer={getContainer}\n helperClass={helperClass}\n innerBodyRef={innerBodyRef}\n // innerRef={innerRef}\n isPlaceholderActive={isPlaceholderActive}\n listProps={listProps}\n lockAxis={lockAxis}\n noResultsPlaceholder={noResultsPlaceholder}\n numRowsVisible={numRowsVisible}\n onSortEnd={onSortEnd}\n onSortOver={onSortOver}\n onSortStart={onSortStart}\n rowKey={rowKey}\n rowRenderer={rowRenderer}\n rows={rows}\n useDragHandle={useDragHandle}\n innerRef={mergeRefs(innerRef, registerPane, t)}\n {...rest}\n />\n )}\n </ScrollSyncPane>\n );\n };\n\nconst TableSyncHoc = (Component) =>\n function (props) {\n return (\n <ScrollSync\n proportional={false}\n onScroll={(e) => {\n e.target.style.setProperty('--toolbar-scroll', `${e.target.offsetWidth + e.target.scrollLeft - 15}px`);\n e.target.style.setProperty(\n '--toolbar-scroll-paginated',\n `${e.target.offsetWidth + e.target.scrollLeft - 19}px`,\n );\n }}\n >\n <Component {...props} />\n </ScrollSync>\n );\n };\n\nconst decorateRenderers = (renderers, grid) => {\n const HeaderWrapper = renderers.header.wrapper;\n const BodyWrapper = renderers.body.wrapper;\n const Table = renderers.table;\n const { paginated } = grid.props;\n\n renderers.table = useMemo(() => TableSyncHoc(Table), []);\n renderers.header.wrapper = useMemo(() => HeaderSyncHoc(HeaderWrapper), []);\n renderers.body.wrapper = useMemo(() => BodySyncHoc(BodyWrapper, !paginated, grid), []);\n\n return renderers;\n};\n\nexport const BodyHeaderScrollSyncPlugin = createInstancePlugin('body-header-scroll-sync', {\n decorateRenderers,\n});\n"],
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACmBQ;AAX/B,SAAgB,SAAS,QAAQ,iBAAiB;AAClD,SAAS,iBAAiB;AAC1B,SAAS,YAAY,gBAAgB,4BAA4B;AACjE,SAAS,yBAAyB;AAElC,MAAM,kBAAkB,kBAAkB,CAAC;AAE3C,MAAM,gBAAgB,CAAC,cACrB,SAAU,OAAO;AACf,SACE,oBAAC,kBACE,WAAC,EAAE,aAAa,MAAM,oBAAC,aAAW,GAAG,OAAO,UAAU,UAAU,MAAM,UAAU,YAAY,GAAG,GAClG;AAEJ;AACF,MAAM,cAAc,CAAC,WAAW,cAAc,SAC5C,SAAU;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACmBQ;AAX/B,SAAgB,SAAS,QAAQ,iBAAiB;AAClD,SAAS,iBAAiB;AAC1B,SAAS,YAAY,gBAAgB,4BAA4B;AACjE,SAAS,yBAAyB;AAElC,MAAM,kBAAkB,kBAAkB,CAAC;AAE3C,MAAM,gBAAgB,CAAC,cACrB,SAAU,OAAO;AACf,SACE,oBAAC,kBACE,WAAC,EAAE,aAAa,MAAM,oBAAC,aAAW,GAAG,OAAO,UAAU,UAAU,MAAM,UAAU,YAAY,GAAG,GAClG;AAEJ;AACF,MAAM,cAAc,CAAC,WAAW,cAAc,SAC5C,SAAU;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,E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UAAU,CAAC,MAAM;AACf,UAAE,OAAO,MAAM,YAAY,oBAAoB,GAAG,EAAE,OAAO,cAAc,EAAE,OAAO,aAAa,MAAM;AACrG,UAAE,OAAO,MAAM;AAAA,UACb;AAAA,UACA,GAAG,EAAE,OAAO,cAAc,EAAE,OAAO,aAAa;AAAA,QAClD;AAAA,MACF;AAAA,MAEA,8BAAC,aAAW,GAAG,OAAO;AAAA;AAAA,EACxB;AAEJ;AAEF,MAAM,oBAAoB,CAAC,WAAW,SAAS;AAC7C,QAAM,gBAAgB,UAAU,OAAO;AACvC,QAAM,cAAc,UAAU,KAAK;AACnC,QAAM,QAAQ,UAAU;AACxB,QAAM,EAAE,UAAU,IAAI,KAAK;AAE3B,YAAU,QAAQ,QAAQ,MAAM,aAAa,KAAK,GAAG,CAAC,CAAC;AACvD,YAAU,OAAO,UAAU,QAAQ,MAAM,cAAc,aAAa,GAAG,CAAC,CAAC;AACzE,YAAU,KAAK,UAAU,QAAQ,MAAM,YAAY,aAAa,CAAC,WAAW,IAAI,GAAG,CAAC,CAAC;AAErF,SAAO;AACT;AAEO,MAAM,6BAA6B,qBAAqB,2BAA2B;AAAA,EACxF;AACF,CAAC;",
|
6
6
|
"names": ["SCROLLBAR_WIDTH"]
|
7
7
|
}
|
@@ -2,6 +2,6 @@
|
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/column-dnd/DndColumnsPlugin.tsx"],
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/display-name */\nimport React, { useEffect, useMemo, useRef } from 'react';\nimport { SortableContainer, SortableElement } from 'react-sortable-hoc';\nimport { arrayMove, omit, mergeRefs } from '@elliemae/ds-utilities';\nimport { createInstancePlugin } from '@elliemae/ds-shared';\nimport { addDragAndDropToColumn } from './decorateGridWithDndColumns.js';\n\n// todo: remove once it's fixed in react-sortable-hoc library\nconst keysToOmit = [\n 'axis',\n 'contentWindow',\n 'disableAutoscroll',\n 'distance',\n 'getContainer',\n 'getHelperDimensions',\n 'helperClass',\n 'helperContainer',\n 'hideSortableGhost',\n 'keyboardSortingTransitionDuration',\n 'lockAxis',\n 'lockOffset',\n 'lockToContainerEdges',\n 'onSortEnd',\n 'onSortMove',\n 'onSortOver',\n 'onSortStart',\n 'pressDelay',\n 'pressThreshold',\n 'shouldCancelStart',\n 'transitionDuration',\n 'updateBeforeSortStart',\n 'useDragHandle',\n 'useWindowAsScrollContainer',\n];\n\nconst decorateColumn = (column, grid) => (column.isUserColumn ? addDragAndDropToColumn(grid, column) : column);\n\nconst getHeaderRowProps = (props, grid) => {\n const { onMoveColumnStart, onMoveColumnEnd, onMoveColumnOver } = grid.props;\n\n const headerRowRef = useRef();\n const columnDraggingOffset = useRef(0);\n const sortedColumns = useRef(grid.getInstance().decoratedColumns);\n const nodeRef = useRef();\n\n useEffect(() => {\n sortedColumns.current = grid.getInstance().decoratedColumns;\n });\n\n const onSortOver = (params) => {\n const { index, newIndex, oldIndex } = params;\n const oldColumn = sortedColumns.current[oldIndex];\n const newColumn = sortedColumns.current[newIndex];\n\n if (!newColumn.isUserColumn || !oldColumn.isUserColumn) return;\n\n const columnWidth = nodeRef.current.offsetWidth;\n const newColumnWidth = headerRowRef.current.childNodes.item(newColumn.index).offsetWidth;\n\n const forward = newIndex > oldIndex;\n\n // eslint-disable-next-line no-nested-ternary\n const columnTranslate = forward ? (newIndex > index ? columnWidth * -1 : 0) : newIndex < index ? columnWidth : 0;\n\n columnDraggingOffset.current += forward ? newColumnWidth : newColumnWidth * -1;\n\n newColumn.updateStyle({\n transitionDuration: '300ms',\n transform: `translate3d(${columnTranslate}px, 0, 0)`,\n });\n oldColumn.updateStyle({\n transitionDuration: '300ms',\n transform: `translate3d(${columnDraggingOffset.current}px, 0, 0)`,\n });\n\n sortedColumns.current = arrayMove(sortedColumns.current, oldIndex, newIndex);\n onMoveColumnOver(params);\n };\n\n const onSortStart = (params) => {\n const { node } = params;\n grid.disableEvents();\n nodeRef.current = node;\n onMoveColumnStart(params);\n };\n\n const onSortEnd = (params) => {\n const { oldIndex, newIndex } = params;\n grid.enableEvents();\n columnDraggingOffset.current = 0;\n sortedColumns.current = grid.decoratedColumns;\n grid.decoratedColumns.forEach((column) => {\n if (!column.updateStyle) return;\n column.updateStyle({\n transitionDuration: null,\n transform: null,\n });\n });\n\n const originalOldColumnIndex = grid.columns.findIndex(\n (column) => column.property === grid.decoratedColumns[oldIndex].property,\n );\n const originalNewColumnIndex = grid.columns.findIndex(\n (column) => column.property === grid.decoratedColumns[newIndex].property,\n );\n\n onMoveColumnEnd({\n newIndex: originalNewColumnIndex,\n oldIndex: originalOldColumnIndex,\n });\n };\n\n return {\n axis: 'x',\n helperClass: 'header-dnd-column',\n innerRef: mergeRefs(props.innerRef, headerRowRef),\n lockAxis: 'x',\n onSortEnd,\n onSortOver,\n onSortStart,\n useDragHandle: true,\n };\n};\n\nconst decorateRenderers = (renderers) => {\n const RowComponent = renderers.header.row;\n const CellComponent = renderers.header.cell;\n\n const Row = useMemo(() => SortableContainer((props) => <RowComponent {...omit(props, keysToOmit)} />), []);\n\n const Cell = useMemo(() => SortableElement(CellComponent), []);\n\n return {\n ...renderers,\n header: {\n ...renderers.header,\n row: Row,\n cell: Cell,\n },\n };\n};\n\nexport const DndColumnsPlugin = createInstancePlugin('dnd-columns', {\n getHeaderRowProps,\n decorateColumn,\n decorateRenderers,\n});\n"],
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACgIkC;AA/HzD,SAAgB,WAAW,SAAS,cAAc;AAClD,SAAS,mBAAmB,uBAAuB;AACnD,SAAS,WAAW,MAAM,iBAAiB;AAC3C,SAAS,4BAA4B;AACrC,SAAS,8BAA8B;AAGvC,MAAM,aAAa;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;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AW;AACxC,UAAI,CAAC,OAAO;AAAa;AACzB,aAAO,YAAY;AAAA,QACjB,oBAAoB;AAAA,QACpB,WAAW;AAAA,MACb,CAAC;AAAA,IACH,CAAC;AAED,UAAM,yBAAyB,KAAK,QAAQ;AAAA,MAC1C,CAAC,WAAW,OAAO,aAAa,KAAK,iBAAiB,QAAQ,EAAE;AAAA,IAClE;AACA,UAAM,yBAAyB,KAAK,QAAQ;AAAA,MAC1C,CAAC,WAAW,OAAO,aAAa,KAAK,iBAAiB,QAAQ,EAAE;AAAA,IAClE;AAEA,oBAAgB;AAAA,MACd,UAAU;AAAA,MACV,UAAU;AAAA,IACZ,CAAC;AAAA,EACH;AAEA,SAAO;AAAA,IACL,MAAM;AAAA,IACN,aAAa;AAAA,IACb,UAAU,UAAU,MAAM,UAAU,YAAY;AAAA,IAChD,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA,eAAe;AAAA,EACjB;AACF;AAEA,MAAM,oBAAoB,CAAC,cAAc;AACvC,QAAM,eAAe,UAAU,OAAO;AACtC,QAAM,gBAAgB,UAAU,OAAO;AAEvC,QAAM,MAAM,QAAQ,MAAM,kBAAkB,CAAC,UAAU,oBAAC,gBAAc,GAAG,KAAK,OAAO,UAAU,GAAG,CAAE,GAAG,CAAC,CAAC;AAEzG,QAAM,OAAO,QAAQ,MAAM,gBAAgB,aAAa,GAAG,CAAC,CAAC;AAE7D,SAAO;AAAA,IACL,GAAG;AAAA,IACH,QAAQ;AAAA,MACN,GAAG,UAAU;AAAA,MACb,KAAK;AAAA,MACL,MAAM;AAAA,IACR;AAAA,EACF;AACF;AAEO,MAAM,mBAAmB,qBAAqB,eAAe;AAAA,EAClE;AAAA,EACA;AAAA,EACA;AACF,CAAC;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -2,6 +2,6 @@
|
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/column-sizing/columnMeasurerTransformer.tsx"],
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useLayoutEffect, useRef } from 'react';\nimport { mergeRefs } from '@elliemae/ds-utilities';\n\nexport const columnMeasurerTransformer =\n (columnSizeService) =>\n (value, { column, grid }, props = {}) => {\n const { registerColumn } = columnSizeService;\n const cellRef = useRef();\n\n useLayoutEffect(() => {\n const { columns, expandedToContentColumns } = columnSizeService;\n const {\n props: { minColumnWidth },\n resizedColumns,\n } = grid.getInstance();\n if (cellRef.current) {\n // FIX: merge\n // if (column.width && column.width !== 'string' && !initialUsedSpace[column.property]) {\n // increaseUsedSpace(getColumnWidthSize(column.width, minColumnWidth, column), column.property)\n // }\n if (column.expandWidthToContent && !expandedToContentColumns[column.uuid]) {\n // measure the content and reset to flex\n const originalWidth = cellRef.current.offsetWidth;\n cellRef.current.style.flex = 'initial';\n cellRef.current.style.minWidth = 'initial';\n const calcWidth = cellRef.current.offsetWidth + 20;\n if (originalWidth + 20 <= calcWidth) {\n resizedColumns.current[column.uuid] = calcWidth;\n columns[column.uuid].minWidth = calcWidth;\n } else {\n columns[column.uuid].minWidth = originalWidth;\n }\n expandedToContentColumns[column.uuid] = true;\n cellRef.current.style.minWidth = null;\n cellRef.current.style.flex = 1;\n column.node = cellRef.current;\n }\n }\n });\n\n return {\n ...props,\n innerRef: mergeRefs(cellRef, props.innerRef, registerColumn(column)),\n };\n };\n"],
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,iBAAiB,cAAc;AACxC,SAAS,iBAAiB;AAEnB,MAAM,4BACX,CAAC,sBACD,CAAC,OAAO,EAAE,QAAQ,KAAK,GAAG,QAAQ,CAAC,MAAM;AACvC,QAAM,EAAE,eAAe,IAAI;AAC3B,QAAM,UAAU,OAAO;AAEvB,kBAAgB,MAAM;AACpB,UAAM,EAAE,SAAS,yBAAyB,IAAI;AAC9C,UAAM;AAAA,MACJ,OAAO,EAAE,eAAe;AAAA,MACxB;AAAA,IACF,IAAI,KAA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pile/react-shim.js", "../../../../src/plugins/column-sizing/useColumnSizeService.tsx"],
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport { useRef, useState, useLayoutEffect } from 'react';\nimport { getColumnWidthSize, getPercentageValue } from './utils.js';\n\nexport const useColumnSizeService = (instance) => {\n const columns = useRef({});\n const [expandableGridDetailWidth, setExpandableGridDetailWidth] = useState(0);\n const [expandableColumnWidth, setExpandableColumnWidth] = useState(0);\n const expandedToContentColumns = useRef({});\n const previousTotalWidth = useRef(0);\n const initialUsedSpace = useRef({\n space: 0,\n amount: 0,\n percentage: 0,\n });\n\n const increaseUsedSpace = (space, columnUuid) => {\n if (typeof space === 'number') {\n initialUsedSpace.current.space += space;\n } else if (space && space.endsWith('%')) {\n initialUsedSpace.current.percentage += Number(space.slice(0, -1));\n }\n initialUsedSpace.current.amount += 1;\n initialUsedSpace.current[columnUuid] = true;\n };\n\n // eslint-disable-next-line no-return-assign\n const registerColumn = (column) => (node) => (columns.current[column.uuid] = { ...column, node });\n\n const unregisterColumn = (column) => {\n delete columns.current[column.property];\n };\n\n const setActualColumnsSizesFixed = () => {\n const columnsArray = Object.values(columns.current);\n\n columnsArray.forEach((column) => {\n const columnOffsetWidth = column.node.offsetWidth;\n column.updateBodyHeaderWidth(`${columnOffsetWidth}px`, `${columnOffsetWidth}px`);\n });\n };\n\n const updateMissingWidths = (totalWidth) => {\n if (totalWidth) {\n previousTotalWidth.current = totalWidth;\n }\n const gridWidth = previousTotalWidth.current - 4;\n const {\n props: { minColumnWidth, expandable },\n resizedColumns,\n decoratedColumns: columnDefinitions,\n } = instance.getInstance();\n if (!initialUsedSpace.current) return;\n const columnUuids = columnDefinitions.map((c) => c.uuid);\n const columnsArray = Object.values(columns.current).filter((c) => columnUuids.includes(c.uuid));\n // reset the initial space to the last columns\n initialUsedSpace.current = { space: 0, amount: 0, percentage: 0 };\n columnsArray.forEach((column) => {\n if (column.width && column.width !== 'string' && !initialUsedSpace[column.uuid]) {\n increaseUsedSpace(getColumnWidthSize(column.width, minColumnWidth, column), column.uuid);\n }\n });\n\n const nextColumnDict = {};\n // eslint-disable-next-line max-statements\n columnsArray.forEach((column) => {\n if (typeof column.width === 'number') {\n nextColumnDict[column.uuid] = column;\n return;\n }\n if (resizedColumns.current[column.uuid]) {\n nextColumnDict[column.uuid] = column;\n return;\n }\n const { space: usedSpace, amount: usedAmount, percentage: usedPercentage } = initialUsedSpace.current;\n\n const percentValue = getPercentageValue(column.width);\n // check if is percentage value\n if (percentValue) {\n const pxs = (gridWidth * percentValue) / 100;\n const pxWidths = `${getColumnWidthSize(pxs, minColumnWidth, column)}px`;\n column.updateBodyHeaderWidth(pxWidths, pxWidths);\n columns.current[column.uuid].computedWidth = pxs;\n if (expandable && column.expandableColumn) {\n setExpandableColumnWidth(pxs);\n }\n } else {\n // otherwise the values are auto calculated from the total size\n const columnFixWidth =\n (gridWidth * (1 - usedPercentage / 100) - usedSpace) / (columnsArray.length - usedAmount);\n const percentWidth = (columnFixWidth / gridWidth) * 100;\n const pxs = (gridWidth * percentWidth) / 100;\n const actualWidthAfterChecks = getColumnWidthSize(pxs, minColumnWidth, column);\n column.updateBodyHeaderWidth(\n `${actualWidthAfterChecks}px`,\n column.minWidth || minColumnWidth ? `${column.minWidth || minColumnWidth}px` : `${pxs}px`,\n );\n resizedColumns.current[column.uuid] = actualWidthAfterChecks;\n columns.current[column.uuid].computedWidth = actualWidthAfterChecks;\n }\n nextColumnDict[column.uuid] = column;\n });\n columns.current = nextColumnDict;\n };\n\n useLayoutEffect(() => {\n const totalWidth = computeColumnsTotalSize();\n setExpandableGridDetailWidth(totalWidth - expandableColumnWidth);\n }, [expandableColumnWidth]);\n\n // todo: make this incremental\n const computeColumnsTotalSize = () => {\n const columnsArray = Object.values(columns.current);\n return columnsArray.reduce((totalSize, column) => totalSize + column.node.offsetWidth, 0);\n };\n\n return {\n columns: columns.current,\n expandedToContentColumns: expandedToContentColumns.current,\n initialUsedSpace: initialUsedSpace.current,\n increaseUsedSpace,\n registerColumn,\n unregisterColumn,\n updateMissingWidths,\n computeColumnsTotalSize,\n setActualColumnsSizesFixed,\n expandableGridDetailWidth,\n expandableColumnWidth,\n };\n};\n\nexport default useColumnSizeService;\n"],
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,QAAQ,UAAU,uBAAuB;AAClD,SAAS,oBAAoB,0BAA0B;AAEhD,MAAM,uBAAuB,CAAC,aAAa;AAChD,QAAM,UAAU,OAAO,CAAC,CAAC;AACzB,QAAM,CAAC,2BAA2B,4BAA4B,IAAI,SAAS,CAAC;AAC5E,QAAM,CAAC,uBAAuB,wBAAwB,IAAI,SAAS,CAAC;AACpE,QAAM,2BAA2B,OAAO,CAAC,CAAC;AAC1C,QAAM,qBAAqB,OAAO,CAAC;AACnC,QAAM,mBAAmB,OAAO;AAAA,IAC9B,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,YAAY;AAAA,EACd,CAAC;AAED,QAAM,oBAAoB,CAAC,OAAO,eAAe;AAC/C,QAAI,OAAO,UAAU,UAAU;AAC7B,uBAAiB,QAAQ,SAAS;AAAA,IACpC,WAAW,SAAS,MAAM,SAAS,GAAG,GAAG;AACvC,uBAAiB,QAAQ,cAAc,OAAO,MAAM,MAAM,GAAG,EAAE,CAAC;AAAA,IAClE;AACA,qBAAiB,QAAQ,UAAU;AACnC,qBAAiB,QAAQ,
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,QAAQ,UAAU,uBAAuB;AAClD,SAAS,oBAAoB,0BAA0B;AAEhD,MAAM,uBAAuB,CAAC,aAAa;AAChD,QAAM,UAAU,OAAO,CAAC,CAAC;AACzB,QAAM,CAAC,2BAA2B,4BAA4B,IAAI,SAAS,CAAC;AAC5E,QAAM,CAAC,uBAAuB,wBAAwB,IAAI,SAAS,CAAC;AACpE,QAAM,2BAA2B,OAAO,CAAC,CAAC;AAC1C,QAAM,qBAAqB,OAAO,CAAC;AACnC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MAC/C;AACA,qBAAe,OAAO,IAAI,IAAI;AAAA,IAChC,CAAC;AACD,YAAQ,UAAU;AAAA,EACpB;AAEA,kBAAgB,MAAM;AACpB,UAAM,aAAa,wBAAwB;AAC3C,iCAA6B,aAAa,qBAAqB;AAAA,EACjE,GAAG,CAAC,qBAAqB,CAAC;AAG1B,QAAM,0BAA0B,MAAM;AACpC,UAAM,eAAe,OAAO,OAAO,QAAQ,OAAO;AAClD,WAAO,aAAa,OAAO,CAAC,WAAW,WAAW,YAAY,OAAO,KAAK,aAAa,CAAC;AAAA,EAC1F;AAEA,SAAO;AAAA,IACL,SAAS,QAAQ;AAAA,IACjB,0BAA0B,yBAAyB;AAAA,IACnD,kBAAkB,iBAAiB;AAAA,IACnC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEA,IAAO,+BAAQ;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -47,6 +47,7 @@ function setWidth({ styleSheet, className, width, minWidth }) {
|
|
47
47
|
stylesheet.updateProperties(window, styleSheet, className, {
|
48
48
|
width: `${widths || minWidths}`,
|
49
49
|
minWidth: `${widths || minWidths}`,
|
50
|
+
// minWidth: `${minWidths || widths}`,
|
50
51
|
maxWidth: `${widths || minWidths}`
|
51
52
|
});
|
52
53
|
}
|
@@ -2,6 +2,6 @@
|
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/column-sizing/useStylesheetHelpers.tsx"],
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-param-reassign */\n/* eslint-disable max-lines */\nimport * as stylesheet from 'stylesheet-helpers';\nimport { useState, useEffect } from 'react';\nimport { set } from '@elliemae/ds-utilities';\nimport { getColumnNameFromProperty } from './getColumnNameFromProperty.js';\nimport { getScrollbarWidth } from '../../utilities/getScrollbarSize.js';\n\nconst SCROLLBAR_WIDTH = getScrollbarWidth();\n\nexport const RowStylesheetHelper = ({ grid, className }) => {\n const { styleSheet, styleSheetElement } = stylesheet.create();\n const update = (width) => {\n const widths = typeof width === 'string' ? width : `${width}px`;\n stylesheet.updateProperties(\n window,\n styleSheet,\n className,\n width ? { width: widths, minWidth: widths, maxWidth: widths } : { width: null, minWidth: null, maxWidth: null },\n );\n const { hasScroll } = grid.getState();\n const headerWidth = `${width + (hasScroll ? SCROLLBAR_WIDTH : 0)}px`;\n stylesheet.updateProperties(\n window,\n styleSheet,\n `${className}-header`,\n width\n ? { width: headerWidth, minWidth: headerWidth, maxWidth: headerWidth }\n : { width: null, minWidth: null, maxWidth: null },\n );\n };\n const remove = () => styleSheetElement.remove();\n const getRowClassName = () => className;\n return {\n update,\n remove,\n getRowClassName,\n };\n};\n\nconst getColumnClassName = ({ globalId, column, isHeader = false, getId }) =>\n `column-${globalId}-${getId(column)}${isHeader ? '-header' : ''}`;\n\nfunction setWidth({ styleSheet, className, width, minWidth }) {\n let widths;\n if (typeof width === 'string') widths = width;\n if (typeof width === 'number') widths = `${width}px`;\n\n let minWidths;\n if (typeof minWidth === 'string') minWidths = minWidth;\n if (typeof minWidth === 'number') minWidths = `${minWidth}px`;\n\n stylesheet.updateProperties(window, styleSheet, className, {\n width: `${widths || minWidths}`,\n minWidth: `${widths || minWidths}`,\n // minWidth: `${minWidths || widths}`,\n maxWidth: `${widths || minWidths}`,\n });\n}\n\nfunction updateStyle({ styleSheet, className, style }) {\n stylesheet.updateProperties(window, styleSheet, className, style);\n}\n\nfunction columnSizesHelperImpl({ globalId, getId = ({ property }) => getColumnNameFromProperty(property) }) {\n const { styleSheetElement, styleSheet } = stylesheet.create();\n\n const updateBodyHeaderWidth = ({ className, headerClassName, width, minWidth }) => {\n setWidth({\n styleSheet,\n className,\n width,\n minWidth,\n });\n setWidth({\n styleSheet,\n className: headerClassName,\n width,\n minWidth,\n isHeader: true,\n });\n };\n\n return {\n decorateColumns: (columns, grid) => {\n const {\n props: { minColumnWidth },\n } = grid.getInstance();\n return columns.map((column) => {\n const cellClassName = getColumnClassName({ globalId, getId, column });\n const headerClassName = `${cellClassName}-header`;\n\n set(column, 'header.props.className', headerClassName);\n set(column, 'cell.props.className', cellClassName);\n\n column.updateBodyHeaderWidth = (width, minWidth) => {\n updateBodyHeaderWidth({\n className: cellClassName,\n headerClassName,\n width,\n minWidth,\n });\n };\n column.updateWidth = (width, minWidth) => {\n setWidth({\n styleSheet,\n className: cellClassName,\n width,\n minWidth,\n });\n };\n column.updateStyle = (style) =>\n updateStyle({\n styleSheet,\n className: cellClassName,\n style,\n });\n\n column.headerHookEffects = [\n () => {\n useEffect(() => {\n const { resizedColumns } = grid.getInstance();\n const resizedWidth = resizedColumns.current[column.uuid];\n updateBodyHeaderWidth({\n className: cellClassName,\n headerClassName,\n width: resizedWidth || column.width || minColumnWidth,\n minWidth: resizedWidth || column.minWidth || minColumnWidth || column.width,\n });\n }, [column.uuid]);\n },\n ];\n\n return column;\n });\n },\n getColumnCellClassName(column) {\n return getColumnClassName({ globalId, getId, column });\n },\n getColumnHeaderClassName(column) {\n return `${getColumnClassName({ globalId, getId, column })}-header`;\n },\n cleanup() {\n styleSheetElement.remove();\n },\n };\n}\n\nexport function useStylesheetHelpers(grid) {\n const {\n props: { bindColumnsSizeTo, bindRowSizeTo },\n } = grid;\n\n const [columnsStylesheet] = useState(() =>\n columnSizesHelperImpl({\n globalId: bindColumnsSizeTo || grid.uuid,\n getId: ({ uuid }) => getColumnNameFromProperty(uuid),\n }),\n );\n const rowClassName = `row-${bindRowSizeTo || grid.uuid}`;\n const [rowsStylesheet] = useState(() => RowStylesheetHelper({ grid, className: rowClassName }));\n\n return { columnsStylesheet, rowsStylesheet, rowClassName };\n}\n"],
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACEvB,YAAY,gBAAgB;AAC5B,SAAS,UAAU,iBAAiB;AACpC,SAAS,WAAW;AACpB,SAAS,iCAAiC;AAC1C,SAAS,yBAAyB;AAEl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M,oBAAoB,EAAE,MAAM,WAAW,aAAa,CAAC,CAAC;AAE9F,SAAO,EAAE,mBAAmB,gBAAgB,aAAa;AAC3D;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -2,6 +2,6 @@
|
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/column-sizing/utils.tsx"],
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { get } from '@elliemae/ds-utilities';\n\nexport function getScrollbarSizeFromHeaderAndBody(refs) {\n const innerBodyOffsetWidth = get(refs, ['innerBody', 'current', 'offsetWidth']);\n const headerOffsetWidth = get(refs, ['header', 'current', 'offsetWidth']);\n\n return headerOffsetWidth - innerBodyOffsetWidth;\n}\n\nexport const isScrollbarVisible = (element) => element.scrollHeight > element.clientHeight;\n\nexport const getPercentageValue = (percentString) => {\n if (typeof percentString !== 'string') return null;\n const result = percentString.match(/(\\d+|\\d*[.,]\\d{1,2})/);\n\n return result && Number(result[0]);\n};\n\nexport const getColumnWidthSize = (width, minWidth, column) => {\n if (column.special) {\n return column.width;\n }\n if (minWidth && minWidth > width) return minWidth;\n return width;\n};\n\nexport const calculateMinWidthForWrappedText = (columns) => {\n let longestWord = 0;\n\n columns.forEach(({ label }) => {\n const localLongestWord = label.split(' ').sort((a, b) => b.length - a.length)[0].length;\n if (localLongestWord > longestWord) longestWord = localLongestWord;\n });\n\n return longestWord * 8.5;\n};\n"],
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,WAAW;AAEb,SAAS,kCAAkC,MAAM;AACtD,QAAM,uBAAuB,IAAI,MAAM,CAAC,aAAa,WAAW,aAAa,CAAC;AAC9E,QAAM,oBAAoB,IAAI,MAAM,CAAC,UAAU,WAAW,aAAa,CAAC;AAExE,SAAO,oBAAoB;AAC7B;AAEO,MAAM,qBAAqB,CAAC,YAAY,QAAQ,eAAe,QAAQ;AAEvE,MAAM,qBAAqB,CAAC,kBAAkB;AACnD,MAAI,OAAO,kBAAkB;AAAU,WAAO;AAC9C,QAAM,SAAS,cAAc,MAAM,sBAAsB;AAEzD,SAAO,UAAU,OAAO,OAAO,
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,WAAW;AAEb,SAAS,kCAAkC,MAAM;AACtD,QAAM,uBAAuB,IAAI,MAAM,CAAC,aAAa,WAAW,aAAa,CAAC;AAC9E,QAAM,oBAAoB,IAAI,MAAM,CAAC,UAAU,WAAW,aAAa,CAAC;AAExE,SAAO,oBAAoB;AAC7B;AAEO,MAAM,qBAAqB,CAAC,YAAY,QAAQ,eAAe,QAAQ;AAEvE,MAAM,qBAAqB,CAAC,kBAAkB;AACnD,MAAI,OAAO,kBAAkB;AAAU,WAAO;AAC9C,QAAM,SAAS,cAAc,MAAM,sBAAsB;AAEzD,SAAO,UAAU,OAAO,OAAO,CAAC,CAAC;AACnC;AAEO,MAAM,qBAAqB,CAAC,OAAO,UAAU,WAAW;AAC7D,MAAI,OAAO,SAAS;AAClB,WAAO,OAAO;AAAA,EAChB;AACA,MAAI,YAAY,WAAW;AAAO,WAAO;AACzC,SAAO;AACT;AAEO,MAAM,kCAAkC,CAAC,YAAY;AAC1D,MAAI,cAAc;AAElB,UAAQ,QAAQ,CAAC,EAAE,MAAM,MAAM;AAC7B,UAAM,mBAAmB,MAAM,MAAM,GAAG,EAAE,KAAK,CAAC,GAAG,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,EAAE;AACjF,QAAI,mBAAmB;AAAa,oBAAc;AAAA,EACpD,CAAC;AAED,SAAO,cAAc;AACvB;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -11,6 +11,7 @@ const getRenderer = (renderer, grid, column) => (value, metaData) => {
|
|
11
11
|
value.props.children[0],
|
12
12
|
renderer({
|
13
13
|
value: value.props.children[1],
|
14
|
+
// apply custom render only to the original value not the arrow
|
14
15
|
metaData: { ...metaData, parentRowData },
|
15
16
|
customHandlers
|
16
17
|
})
|
@@ -2,6 +2,6 @@
|
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/custom-cell-renderer/addCustomRendererToCell.tsx"],
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-statements */\nimport { isFunction, get } from '@elliemae/ds-utilities';\nimport { appendCellFormatter } from '@elliemae/ds-shared';\nimport { getRendererComponent } from './getRendererComponent.js';\n\nexport const getRenderer = (renderer, grid, column) => (value, metaData) => {\n const {\n props: { customHandlers, parentRowData },\n } = grid.getInstance();\n if (\n column &&\n column.formatExpandable &&\n value &&\n value.props &&\n value.props.children &&\n value.props.children.length === 2\n ) {\n return [\n value.props.children[0],\n renderer({\n value: value.props.children[1], // apply custom render only to the original value not the arrow\n metaData: { ...metaData, parentRowData },\n customHandlers,\n }),\n ];\n }\n return renderer({\n value,\n metaData: { ...metaData, parentRowData },\n customHandlers,\n });\n};\n\nconst addCustomRendererToCell = (grid) => (column) => {\n const { customRenderer } = column;\n const customHeaderRenderer = get(column, ['header', 'customRenderer']);\n if (!customRenderer && !customHeaderRenderer) return column;\n\n if (isFunction(customHeaderRenderer)) {\n column.header.formatters.push(getRenderer(customHeaderRenderer, grid));\n }\n\n if (isFunction(customRenderer)) {\n column = appendCellFormatter(getRenderer(customRenderer, grid, column), column);\n } else {\n if (!customRenderer) return column;\n column.cell.formatters.push((value, columnData) => getRendererComponent(grid, customRenderer, columnData));\n }\n\n return column;\n};\n\nexport { addCustomRendererToCell };\nexport default addCustomRendererToCell;\n"],
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,YAAY,WAAW;AAChC,SAAS,2BAA2B;AACpC,SAAS,4BAA4B;AAE9B,MAAM,cAAc,CAAC,UAAU,MAAM,WAAW,CAAC,OAAO,aAAa;AAC1E,QAAM;AAAA,IACJ,OAAO,EAAE,gBAAgB,cAAc;AAAA,EACzC,IAAI,KAAK,YAAY;AACrB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C,OAAO,eAAe,qBAAqB,MAAM,gBAAgB,UAAU,CAAC;AAAA,EAC3G;AAEA,SAAO;AACT;AAGA,IAAO,kCAAQ;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -2,6 +2,6 @@
|
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/custom-cell-renderer/getRendererComponent.tsx"],
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { DSButton } from '@elliemae/ds-button';\nimport { DSCheckbox, DSComboBox, DSRadio, DSTextBox, DSToggle } from '@elliemae/ds-form';\nimport { DSDropdownMenu } from '@elliemae/ds-dropdownmenu';\nimport * as renderers from '../../components/renderers/index.js';\n\nconst components = {\n DSButton: DSButton,\n DSCheckbox: DSCheckbox,\n DSComboBox: DSComboBox,\n DSRadio: DSRadio,\n DSTextBox: DSTextBox,\n DSToggle: DSToggle,\n DSDropdownMenu: DSDropdownMenu,\n};\n\nconst getRendererComponent = ({ props }, { type = 'DSTextBox', handlers, ...rest }, { rowData }) => {\n const Component = components[type] || renderers[type];\n const { customHandlers, rowKey } = props;\n const mappedHandlers = {};\n\n Object.keys(handlers).forEach((key) => {\n mappedHandlers[handlers[key]] = () =>\n typeof customHandlers[key] === 'function' ? customHandlers[key](rowData, rowData[rowKey]) : null;\n });\n return <Component {...rowData} {...mappedHandlers} {...rest} />;\n};\n\nexport { getRendererComponent };\nexport default getRendererComponent;\n"],
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACyBd;AAxBT,SAAS,gBAAgB;AACzB,SAAS,YAAY,YAAY,SAAS,WAAW,gBAAgB;AACrE,SAAS,sBAAsB;AAC/B,YAAY,eAAe;AAE3B,MAAM,aAAa;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,MAAM,uBAAuB,CAAC,EAAE,MAAM,GAAG,EAAE,OAAO,aAAa,
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACyBd;AAxBT,SAAS,gBAAgB;AACzB,SAAS,YAAY,YAAY,SAAS,WAAW,gBAAgB;AACrE,SAAS,sBAAsB;AAC/B,YAAY,eAAe;AAE3B,MAAM,aAAa;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,MAAM,uBAAuB,CAAC,EAAE,MAAM,GAAG,EAAE,OAAO,aAAa,UAAU,GAAG,KAAK,GAAG,EAAE,QAAQ,MAAM;AAClG,QAAM,YAAY,WAAW,IAAI,KAAK,UAAU,IAAI;AACpD,QAAM,EAAE,gBAAgB,OAAO,IAAI;AACnC,QAAM,iBAAiB,CAAC;AAExB,SAAO,KAAK,QAAQ,EAAE,QAAQ,CAAC,QAAQ;AACrC,mBAAe,SAAS,GAAG,CAAC,IAAI,MAC9B,OAAO,eAAe,GAAG,MAAM,aAAa,eAAe,GAAG,EAAE,SAAS,QAAQ,MAAM,CAAC,IAAI;AAAA,EAChG,CAAC;AACD,SAAO,oBAAC,aAAW,GAAG,SAAU,GAAG,gBAAiB,GAAG,MAAM;AAC/D;AAGA,IAAO,+BAAQ;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -2,6 +2,6 @@
|
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/editable/EditablePlugin.tsx"],
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useDerivedStateFromProps, toggleInObject } from '@elliemae/ds-utilities';\nimport { createInstancePlugin } from '@elliemae/ds-shared';\nimport { addEditableToCell, makeEditableConfig } from './decorateEditable.js';\n\nconst registerStateHook = (grid) => {\n const { rowKey = 'id', editingRows: editingRowsProp, onColumnRowEdited, onColumnRowEdit } = grid.props;\n const [editingRows, setEditingRows] = useDerivedStateFromProps(editingRowsProp || {});\n\n const activateEdit = (editParams) => {\n const { shouldRefocus } = grid.getInstance();\n const { rowData, columnIndex } = editParams;\n shouldRefocus.current = { forced: true, value: false };\n setEditingRows((prevEditingRows) => {\n onColumnRowEdit(editParams);\n return toggleInObject(prevEditingRows, rowData[rowKey], columnIndex);\n });\n };\n\n const editValue = ({ value, rowData, property, rowIndex }) => {\n setEditingRows({});\n onColumnRowEdited({\n value,\n rowData,\n property,\n rowIndex,\n });\n };\n\n return {\n state: { editingRows },\n actions: {\n activateEdit,\n editValue,\n },\n };\n};\n\nconst decorateColumn = (column, grid) => {\n const {\n props: { isColumnEditable = (col) => col.editable, customHandlers },\n } = grid;\n\n const editableConfig = makeEditableConfig(grid);\n\n return isColumnEditable(column)\n ? addEditableToCell(\n {\n column,\n config: editableConfig,\n handlers: customHandlers,\n },\n grid,\n )\n : column;\n};\n\nexport const EditablePlugin = createInstancePlugin('editable', {\n registerStateHook,\n decorateColumn,\n registerHotKeys(grid) {\n return {\n key: 'enter',\n handler: ({ rowIndex, cellIndex }) => {\n const {\n composedRows,\n decoratedColumns,\n actions: { activateEdit },\n props: { isColumnEditable },\n } = grid.getInstance();\n\n if (!isColumnEditable(decoratedColumns[cellIndex])) return;\n\n const rows = composedRows.rows || composedRows;\n const row = rows[rowIndex];\n if (!row) return;\n\n activateEdit({\n rowData: row,\n columnIndex: cellIndex,\n });\n },\n options: {\n keydown: false,\n keyup: true,\n },\n };\n },\n});\n"],
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,0BAA0B,sBAAsB;AACzD,SAAS,4BAA4B;AACrC,SAAS,mBAAmB,0BAA0B;AAEtD,MAAM,oBAAoB,CAAC,SAAS;AAClC,QAAM,EAAE,SAAS,MAAM,aAAa,iBAAiB,mBAAmB,gBAAgB,IAAI,KAAK;AACjG,QAAM,CAAC,aAAa,cAAc,IAAI,yBAAyB,mBAAmB,CAAC,CAAC;AAEpF,QAAM,eAAe,CAAC,eAAe;AACnC,UAAM,EAAE,cAAc,IAAI,KAAK,YAAY;AAC3C,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,IACE;AAAA,MACE;AAAA,MACA,QAAQ;AAAA,MACR,UAAU;AAAA,IACZ;AAAA,IACA;AAAA,EACF,IACA;AACN;AAEO,MAAM,iBAAiB,qBAAqB,YAAY;AAAA,EAC7D;AAAA,EACA;AAAA,EACA,gBAAgB,MAAM;AACpB,WAAO;AAAA,MACL,KAAK;AAAA,MACL,SAAS,CAAC,EAAE,UAAU,UAAU,MAAM;AACpC,cAAM;AAAA,UACJ;AAAA,UACA;AAAA,UACA,SAAS,EAAE,aAAa;AAAA,UACxB,OAAO,EAAE,iBAAiB;AAAA,QAC5B,IAAI,KAAK,YAAY;AAErB,YAAI,CAAC,iBAAiB,iBAAiB,SAAS,CAAC;AAAG;AAEpD,cAAM,OAAO,aAAa,QAAQ;AAClC,cAAM,MAAM,KAAK,QAAQ;AACzB,YAAI,CAAC;AAAK;AAEV,qBAAa;AAAA,UACX,SAAS;AAAA,UACT,aAAa;AAAA,QACf,CAAC;AAAA,MACH;AAAA,MACA,SAAS;AAAA,QACP,SAAS;AAAA,QACT,OAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AACF,CAAC;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -2,6 +2,6 @@
|
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/editable/decorateEditable.tsx"],
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport * as edit from 'react-edit';\nimport { EditPencil } from '@elliemae/ds-icons';\nimport { cx } from '@elliemae/ds-utilities';\nimport { appendCellFormatter } from '@elliemae/ds-shared';\nimport { getEditorComponent } from './getEditorComponent.js';\n\nconst makeEditableConfig = (grid) =>\n edit.edit({\n isEditing: ({ columnIndex, rowData, column = {}, ...rest }) => {\n const {\n state: { editingRows },\n props: { rowKey },\n } = grid.getInstance();\n let isCustomEditing;\n\n if (typeof column.isEditing === 'function') {\n isCustomEditing = column.isEditing({\n columnIndex,\n rowData,\n column,\n ...rest,\n });\n }\n return editingRows[rowData[rowKey]] === columnIndex || column.alwaysEditing || isCustomEditing;\n },\n onActivate: () => null,\n onValue: (...args) => grid.getInstance().actions.editValue(...args),\n });\nconst addEditableToCell = ({ column, config, handlers }, grid) => {\n column.cell.transforms.push(config(getEditorComponent(column.customEditor, handlers)));\n column.cell.props.className = cx(\n column.cell.props.className,\n `editable${column.customEditor ? ' customEditor' : ''}`,\n );\n return appendCellFormatter(\n [\n (value, extraParams) => (\n <>\n <div\n onClick={(e) => {\n e.stopPropagation();\n grid.getInstance().actions.activateEdit(extraParams);\n }}\n onKeyUp={(e) => {\n e.stopPropagation();\n if (e.keyCode === 33) {\n grid.getInstance().actions.activateEdit(extraParams);\n }\n }}\n role=\"gridcell\"\n tabIndex={0}\n >\n {value}\n <EditPencil className=\"edit-pencil\" />\n <span className=\"edit-separator\"> </span>\n </div>\n </>\n ),\n ],\n column,\n );\n};\n\nexport { makeEditableConfig, addEditableToCell };\n"],
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACsCf,mBAgBI,KAfF,YADF;AArCR,YAAY,UAAU;AACtB,SAAS,kBAAkB;AAC3B,SAAS,UAAU;AACnB,SAAS,2BAA2B;AACpC,SAAS,0BAA0B;AAEnC,MAAM,qBAAqB,CAAC,SAC1B,KAAK,KAAK;AAAA,EACR,WAAW,CAAC,EAAE,aAAa,SAAS,SAAS,CAAC,
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACsCf,mBAgBI,KAfF,YADF;AArCR,YAAY,UAAU;AACtB,SAAS,kBAAkB;AAC3B,SAAS,UAAU;AACnB,SAAS,2BAA2B;AACpC,SAAS,0BAA0B;AAEnC,MAAM,qBAAqB,CAAC,SAC1B,KAAK,KAAK;AAAA,EACR,WAAW,CAAC,EAAE,aAAa,SAAS,SAAS,CAAC,GAAG,GAAG,KAAK,MAAM;AAC7D,UAAM;AAAA,MACJ,OAAO,EAAE,YAAY;AAAA,MACrB,OAAO,EAAE,OAAO;AAAA,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../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/editable/getEditorComponent.tsx"],
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* 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"],
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;AC6BX;AA3BZ,SAAS,UAAU,eAAe;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,
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC6BX;AA3BZ,SAAS,UAAU,eAAe;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,aAAa,GAAG,gBAAgB,IAAI;AACnD,QAAM,YAAY,WAAW,IAAI;AAEjC,MAAI,SAAS,cAAc;AAEzB,UAAM,aAAa,iBAAiB,SAAS,UAAU;AACvD,WACE,oBAAC,SAAI,OAAO,EAAE,QAAQ,EAAE,GACtB,8BAAC,aAAU,WAAS,MAAC,SAAkB,OAAc,YAAyB,GAAG,iBAAiB,GACpG;AAAA,EAEJ;AAEA,SAAO,oBAAC,aAAU,WAAS,MAAC,SAAkB,OAAe,GAAG,iBAAiB;AACnF;AAGJ,IAAO,6BAAQ;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -2,6 +2,6 @@
|
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/expandable-grid/ExpandableColumn.tsx"],
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* 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"],
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;AC4BM,cASrB,YATqB;AA3B7B,SAAgB,cAAc;AAC9B,SAAS,eAAe,sBAAsB;AAC9C,SAAS,yBAAyB;AAClC,SAAS,gBAAgB;AACzB,SAAS,8BAA8B;AACvC,SAAS,yBAAyB;AAClC,SAAS,gBAAgB;AAEzB,MAAM,YAAY,GAAG;AAGrB,MAAM,0BAA0B,kBAAkB,KAAK,EAAE,SAAS;AAClE,MAAM,0BAA0B,kBAAkB,KAAK,EAAE,WAAW,2BAA2B;AAC/F,MAAM,QAAQ,kBAAkB,MAAM,EAAE,WAAW,OAAO;AAC1D,MAAM,cAAc,kBAAkB,MAAM,EAAE,WAAW,aAAa;AACtE,MAAM,kBAAkB,kBAAkB,KAAK,EAAE,WAAW,mBAAmB;AAC/E,MAAM,0BAA0B,kBAAkB,KAAK,EAAE,GAAG,0BAA0B;AACtF,MAAM,2BAA2B,kBAAkB,KAAK,EAAE,GAAG,2BAA2B;AAExF,MAAM,uBAAuB,CAAC,EAAE,OAAO,aAAa,YAAY,mBAAmB,WAAW,eAAe,MAAM;AACjH,QAAM,MAAM,OAAO;AACnB,SACE,qBAAC,2BAAwB,KAAU,UAAU,GAC3C;AAAA,yBAAC,2BAAwB,OAAO,EAAE,QAAQ,SAAS,OAAO,GACxD;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,YAAW;AAAA,UACX,WAAU;AAAA,UACV,MAAM,aAAa,oBAAC,iBAAc,IAAK,oBAAC,kBAAe;AAAA,UACvD,SAAS,CAAC,MAAM;AACd,2BAAe,CAAC;AAChB,gBAAI,OAAO,IAAI,SAAS;AACtB,kBAAI,QAAQ,MAAM;AAAA,YACpB;AAAA,UACF;AAAA,UACA,MAAK;AAAA;AAAA,MACP;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,IAC/B,SAAS,EAAE,aAAa;AAAA,EAC1B,IAAI,KAAK,YAAY;AAErB,QAAM,oBAAoB,sBAAsB,EAAE,QAAQ,CAAC;AAC3D,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAa,qBAAqB,EAAE,QAAQ,CAAC;AAAA,MAC7C;AAAA,MACA,WAAW,gBAAgB,EAAE,QAAQ,CAAC;AAAA,MACtC;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,EACA,GAAG;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
|
}
|
@@ -2,6 +2,6 @@
|
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/expandable-grid/ExpandablePlugin.tsx"],
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* 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.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"],
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;AC6Db,mBAIuB,KAJvB;AA5DV,SAAgB,WAAW,SAAS,cAAc;AAClD,SAAS,IAAI,kBAAkB;AAC/B,SAAS,wBAAwB;AACjC,SAAS,eAAe,sBAAsB;AAC9C,SAAS,gBAAgB;AACzB,SAAS,sBAAsB,2BAA2B;AAC1D,SAAS,mBAAmB;AAC5B,SAAS,wBAAwB;AACjC,SAAS,gBAAgB;AACzB,SAAS,0BAA0B;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,
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC6Db,mBAIuB,KAJvB;AA5DV,SAAgB,WAAW,SAAS,cAAc;AAClD,SAAS,IAAI,kBAAkB;A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AAAA,IACxB,IAAI,KAAK,YAAY;AACrB,UAAM,MAAM,QAAQ,MAAM;AAC1B,UAAM,aAAa,CAAC,CAAC,aAAa,GAAG;AACrC,WAAO;AAAA,MACL,GAAG;AAAA,MACH,WAAW;AAAA,QACT,SAAS;AAAA,QACT,OAAO,KAAK,YAAY,EAAE,SAAS,KAAK;AAAA,QACxC,cAAc;AAAA,MAChB;AAAA,MACA;AAAA,MACA,aAAa,aAAa,GAAG,KAAK,aAAa,GAAG,EAAE;AAAA,IACtD;AAAA,EACF;AACF,CAAC;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -2,6 +2,6 @@
|
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/expandable-grid/ExpandedRow.tsx"],
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* 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 </R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,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
|
}
|
@@ -2,6 +2,6 @@
|
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/expandable-grid/useExpandGridState.tsx"],
|
4
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,YAAY,WAAW;ACAvB,SAAS,YAAY,sBAAsB;AAC3C,SAAS,gBAAgB;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,IAAI,eAAe;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,IAAI,SAAS,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,QAAI,WAAW,mBAAmB,GAAG;AACnC,0BAAoB,GAAG;AAAA,IACzB,OAAO;AACL,YAAM,MAAM,IAAI;
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,YAAY,sBAAsB;AAC3C,SAAS,gBAAgB;AAElB,MAAM,qBAAqB,CAAC,SAAS;AA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-shim.js", "../../../../src/plugins/export-data/ExportDataPlugin.tsx"],
|
4
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';\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,YAAY,WAAW;ACEvB,SAAS,WAAW;AACpB,SAAS,4BAA4B;AAErC,MAAM,YAAY,CAAC,WAAW;AAC5B,MAAI,OAAO,WAAW,aAAa;AACjC,WAAO;AAAA,EACT;AACA,SAAO,OAAO,OAAO,YAAY,eAAe,OAAO;AACzD;AAEO,MAAM,iBAAiB,CAAC,KAAK,aAAa,IAAI,KAAK,QAAQ;AAC3D,MAAM,oBAAoB,CAAC,KAAK,YACrC,QAAQ,OAAO,CAAC,QAAQ,WAAW;AACjC,QAAM,iBAAiB,OAAO;AAC9B,SAAO,UAAU,MAAM,IACnB,CAAC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Ac,KAAK,QAAQ;AAC/B,YAAI,KAAK,eAAe;AACtB,gBAAM,eAAe,OAAO,KAAK,UAAU,YAAY;AACvD,wBAAc,YAAY,OAAO,CAAC,MAAM,aAAa,SAAS,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;AAAA,QAClF;AAEA,iBAAS,aAAa,SAAS,OAAO;AAAA,MACxC;AAAA,IACF;AAAA,EACF;AACF,CAAC;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -2,6 +2,6 @@
|
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/filterable/FilterablePlugin.tsx"],
|
4
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';\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"],
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,KAAK,kBAAkB;AAChC,SAAS,4BAA4B;AACrC,SAAS,yBAAyB;AAClC,OAAO,qBAAqB,8BAA8B;AAC1D,SAAS,0BAA0B;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,IAClC;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,cAAc,kBAAkB,MAAM,KAAK,IAAI,uBAAuB,MAAM,OAAO,YAAY;AAEjH,SAAO,CAAC,iBAAiB,WAAW;AACtC;AAEO,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,UAAU,MAAM;AAC1B,cAAM,EAAE,iBAAiB,IAAI,KAAK,YAAY;AAE9C,cAAM,SAAS,iBAAiB;
|
5
|
+
"mappings": "AAAA,YAAY,WAAW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 const DateRangeFilterMenu = ({
|
|
102
102
|
label: column.label,
|
103
103
|
value: dateFormatter({ startDate, endDate }),
|
104
104
|
type: "date",
|
105
|
+
// todo: create constants for filter types
|
105
106
|
filterParams: { start: startDate, end: endDate },
|
106
107
|
transformRowValue: (value) => moment(value, column.dateFormat || DEFAULT_DATE_FORMAT),
|
107
108
|
operator: "range"
|
@@ -2,6 +2,6 @@
|
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../../src/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.tsx"],
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React, { useEffect, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { DSControlledDateRangePicker } from '@elliemae/ds-controlled-form';\nimport { DSPopper, PopperPositions as Position } from '@elliemae/ds-popper';\nimport { DatePicker2 } from '@elliemae/ds-icons';\nimport { DSButton } from '@elliemae/ds-button';\nimport moment from 'moment';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { DEFAULT_DATE_FORMAT } from './defaultDateFormat.js';\n\nconst blockname = 'date-range';\nconst Wrapper = aggregatedClasses('div')(blockname, 'wrapper');\nconst Header = aggregatedClasses('div')(blockname, 'header');\n\n// const randomString = (maxLength = 5) => Math.random().toString(36).slice(-maxLength);\n\nconst DateRangePickerContainer = ({ onChange = () => null, showHeader }) => {\n const [startDate, setStartDate] = useState('');\n const [endDate, setEndDate] = useState('');\n\n // For some reason it worked like this\n const [lastChangeWasPicker, setLastChangeWasPicker] = useState(false);\n\n useEffect(() => {\n const startMoment = moment(startDate);\n const endMoment = moment(endDate);\n if (\n lastChangeWasPicker &&\n startDate &&\n !startDate.includes('_') &&\n endDate &&\n !endDate.includes('_') &&\n endMoment.diff(startMoment) >= 0\n ) {\n onChange({ startDate: startMoment, endDate: endMoment });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [startDate, endDate, lastChangeWasPicker]);\n\n return (\n <Wrapper\n data-testid=\"date-range__wrapper\"\n onKeyDown={(e) => e.code === 'Enter' && setLastChangeWasPicker(true)}\n style={{ backgroundColor: 'white', boxShadow: '0 6px 20px 0 rgb(0 0 0 / 24%)', width: '261px' }}\n >\n {showHeader && (\n <Header style={{ padding: '8px', display: 'flex', justifyContent: 'center' }}>\n <DSControlledDateRangePicker\n fromDate={startDate}\n onFromDateChange={(_start) => {\n setStartDate(_start);\n setLastChangeWasPicker(false);\n }}\n toDate={endDate}\n onToDateChange={(_end) => {\n setEndDate(_end);\n setLastChangeWasPicker(false);\n }}\n type=\"date-range-inputs\"\n />\n </Header>\n )}\n <DSControlledDateRangePicker\n fromDate={startDate}\n onFromDateChange={(_start) => {\n setStartDate(_start);\n setLastChangeWasPicker(true);\n }}\n toDate={endDate}\n onToDateChange={(_end) => {\n setEndDate(_end);\n setLastChangeWasPicker(true);\n }}\n type=\"date-range-picker-controller-only\"\n />\n </Wrapper>\n );\n};\n\nDateRangePickerContainer.propTypes = {\n onChange: PropTypes.func,\n showHeader: PropTypes.bool,\n};\n\nconst formatRangeDate = ({ startDate, endDate }, format = DEFAULT_DATE_FORMAT) => {\n const sameDay = startDate.isSame(endDate, 'day');\n if (sameDay) return `${endDate.format(format)}`;\n return `${startDate.format(format)} - ${endDate.format(format)}`;\n};\n\nconst DateRangeFilterMenu = ({\n column,\n className,\n isMenuOpened = false,\n onOpenMenu = () => null,\n placement = Position.BOTTOM_END,\n onAddFilter = () => null,\n dateFormatter = formatRangeDate,\n showHeader = true,\n menuProps,\n}) => (\n <DSPopper\n contentComponent={\n <div className={className}>\n <DateRangePickerContainer\n minimumNights={0}\n onChange={({ startDate, endDate }) => {\n startDate.startOf('day');\n endDate.endOf('day');\n onAddFilter(\n {\n group: column.property,\n label: column.label,\n value: dateFormatter({ startDate, endDate }),\n type: 'date', // todo: create constants for filter types\n filterParams: { start: startDate, end: endDate },\n transformRowValue: (value) => moment(value, column.dateFormat || DEFAULT_DATE_FORMAT),\n operator: 'range',\n },\n column,\n );\n onOpenMenu(false);\n }}\n showHeader={showHeader}\n />\n </div>\n }\n isOpen={isMenuOpened}\n onOpen={onOpenMenu}\n placement={placement}\n showArrow={false}\n triggerComponent={\n <DSButton\n buttonType=\"text\"\n icon={<DatePicker2 />}\n onClick={() => (!isMenuOpened ? onOpenMenu(true) : onOpenMenu(false))}\n size=\"s\"\n />\n }\n zIndex={menuProps.zIndex}\n />\n);\n\nDateRangeFilterMenu.propTypes = {\n column: PropTypes.any,\n className: PropTypes.string,\n isMenuOpened: PropTypes.bool,\n onOpenMenu: PropTypes.func,\n placement: PropTypes.string,\n onAddFilter: PropTypes.func,\n dateFormatter: PropTypes.any,\n showHeader: PropTypes.bool,\n menuProps: PropTypes.any,\n};\n\nexport { DateRangeFilterMenu };\nexport default DateRangeFilterMenu;\n"],
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACyCnB,SAOM,KAPN;AAxCJ,SAAgB,WAAW,gBAAgB;AAC3C,OAAO,eAAe;AACtB,SAAS,mCAAmC;AAC5C,SAAS,UAAU,mBAAmB,gBAAgB;AACtD,SAAS,mBAAmB;AAC5B,SAAS,gBAAgB;AACzB,OAAO,YAAY;AACnB,SAAS,yBAAyB;AAClC,SAAS,2BAA2B;AAEpC,MAAM,YAAY;AAClB,MAAM,UAAU,kBAAkB,KAAK,EAAE,WAAW,SAAS;AAC7D,MAAM,SAAS,kBAAkB,KAAK,EAAE,WAAW,QAAQ;AAI3D,MAAM,2BAA2B,CAAC,EAAE,WAAW,MAAM,MAAM,WAAW,MAAM;AAC1E,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,EAAE;AAC7C,QAAM,CAAC,SAAS,UAAU,IAAI,SAAS,EAAE;AAGzC,QAAM,CAAC,qBAAqB,sBAAsB,IAAI,SAAS,KAAK;AAEpE,YAAU,MAAM;AACd,UAAM,cAAc,OAAO,SAAS;AACpC,UAAM,YAAY,OAAO,OAAO;AAChC,QACE,uBACA,aACA,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AAAA,MAAC;AAAA;AAAA,QACC,eAAe;AAAA,QACf,UAAU,CAAC,EAAE,WAAW,QAAQ,MAAM;AACpC,oBAAU,QAAQ,KAAK;AACvB,kBAAQ,MAAM,KAAK;AACnB;AAAA,YACE;AAAA,cACE,OAAO,OAAO;AAAA,cACd,OAAO,OAAO;AAAA,cACd,OAAO,cAAc,EAAE,WAAW,QAAQ,CAAC;AAAA,cAC3C,MAAM;AAAA;AAAA,cACN,cAAc,EAAE,OAAO,WAAW,KAAK,QAAQ;AAAA,cAC/C,mBAAmB,CAAC,UAAU,OAAO,OAAO,OAAO,cAAc,mBAAmB;AAAA,cACpF,UAAU;AAAA,YACZ;AAAA,YACA;AAAA,UACF;AACA,qBAAW,KAAK;AAAA,QAClB;AAAA,QACA;AAAA;AAAA,IACF,GACF;AAAA,IAEF,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR;AAAA,IACA,WAAW;AAAA,IACX,kBACE;AAAA,MAAC;AAAA;AAAA,QACC,YAAW;AAAA,QACX,MAAM,oBAAC,eAAY;AAAA,QACnB,SAAS,MAAO,CAAC,eAAe,WAAW,IAAI,IAAI,WAAW,KAAK;AAAA,QACnE,MAAK;AAAA;AAAA,IACP;AAAA,IAEF,QAAQ,UAAU;AAAA;AACpB;AAGF,oBAAoB,YAAY;AAAA,EAC9B,QAAQ,UAAU;AAAA,EAClB,WAAW,UAAU;AAAA,EACrB,cAAc,UAAU;AAAA,EACxB,YAAY,UAAU;AAAA,EACtB,WAAW,UAAU;AAAA,EACrB,aAAa,UAAU;AAAA,EACvB,eAAe,UAAU;AAAA,EACzB,YAAY,UAAU;AAAA,EACtB,WAAW,UAAU;AACvB;AAGA,IAAO,8BAAQ;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -159,6 +159,7 @@ const SingleRangeSwitcherMenu = ({
|
|
159
159
|
label: column.label,
|
160
160
|
value: dateFormatter({ startDate, endDate }, column.format),
|
161
161
|
type: "date",
|
162
|
+
// todo: create constants for filter types
|
162
163
|
filterParams: { start: startDate, end: endDate },
|
163
164
|
transformRowValue: (value) => moment(value, column.dateFormat || DEFAULT_DATE_FORMAT),
|
164
165
|
operator: "range"
|