@elliemae/ds-datagrids 3.0.0-next.4 → 3.0.0-next.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/DSDataGrid.js.map +1 -1
- package/dist/cjs/DataGridImpl.js +3 -4
- package/dist/cjs/DataGridImpl.js.map +2 -2
- package/dist/cjs/PaginatedDataGrid.js +2 -2
- package/dist/cjs/PaginatedDataGrid.js.map +2 -2
- package/dist/cjs/columns/IconColumn.js.map +1 -1
- package/dist/cjs/columns/NumberColumn.js.map +1 -1
- package/dist/cjs/components/BodyCell.js +4 -5
- package/dist/cjs/components/BodyCell.js.map +2 -2
- package/dist/cjs/components/BodyList.js.map +1 -1
- package/dist/cjs/components/ColumnVisibilityMenuOption.js.map +1 -1
- package/dist/cjs/components/ColumnsOptionsMenuSection.js.map +1 -1
- package/dist/cjs/components/EmptyState.js.map +1 -1
- package/dist/cjs/components/HeaderCell.js +3 -3
- package/dist/cjs/components/HeaderCell.js.map +2 -2
- package/dist/cjs/components/List.js.map +1 -1
- package/dist/cjs/components/ListItem.js.map +1 -1
- package/dist/cjs/components/NoResults.js.map +1 -1
- package/dist/cjs/components/RowsLoader.js.map +1 -1
- package/dist/cjs/components/Table.js.map +1 -1
- package/dist/cjs/components/TableBody.js.map +1 -1
- package/dist/cjs/components/TableHeader.js.map +1 -1
- package/dist/cjs/components/footer/addOptionalFooterComponents.js.map +1 -1
- package/dist/cjs/components/header/PrimaryControls.js.map +1 -1
- package/dist/cjs/components/header/addOptionalHeaderComponents.js.map +1 -1
- package/dist/cjs/components/renderers/defaultClassedRenderers.js.map +1 -1
- package/dist/cjs/components/renderers/index.js.map +1 -1
- package/dist/cjs/components/renderers/renderRowsLoader.js.map +1 -1
- package/dist/cjs/components/tableContext.js.map +1 -1
- package/dist/cjs/defaultPlugins.js.map +1 -1
- package/dist/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +5 -6
- package/dist/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js.map +2 -2
- package/dist/cjs/plugins/column-dnd/DndColumnsPlugin.js +2 -2
- package/dist/cjs/plugins/column-dnd/DndColumnsPlugin.js.map +2 -2
- package/dist/cjs/plugins/column-dnd/decorateGridWithDndColumns.js +3 -3
- package/dist/cjs/plugins/column-dnd/decorateGridWithDndColumns.js.map +2 -2
- package/dist/cjs/plugins/column-sizing/ColumnSizingPlugin.js +2 -2
- package/dist/cjs/plugins/column-sizing/ColumnSizingPlugin.js.map +2 -2
- package/dist/cjs/plugins/column-sizing/columnMeasurerTransformer.js.map +1 -1
- package/dist/cjs/plugins/column-sizing/ext-points/decorateColumn.js.map +1 -1
- package/dist/cjs/plugins/column-sizing/ext-points/getTableProps.js.map +1 -1
- package/dist/cjs/plugins/column-sizing/getColumnNameFromProperty.js.map +1 -1
- package/dist/cjs/plugins/column-sizing/useColumnSizeService.js.map +1 -1
- package/dist/cjs/plugins/column-sizing/useStylesheetHelpers.js.map +1 -1
- package/dist/cjs/plugins/column-sizing/utils.js.map +1 -1
- package/dist/cjs/plugins/custom-cell-renderer/CustomRendererPlugin.js +2 -2
- package/dist/cjs/plugins/custom-cell-renderer/CustomRendererPlugin.js.map +2 -2
- package/dist/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js +2 -2
- package/dist/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js.map +2 -2
- package/dist/cjs/plugins/custom-cell-renderer/getRendererComponent.js.map +1 -1
- package/dist/cjs/plugins/editable/EditableComponents/ComboBox.js +10 -10
- package/dist/cjs/plugins/editable/EditableComponents/ComboBox.js.map +2 -2
- package/dist/cjs/plugins/editable/EditableComponents/TextBox.js +21 -21
- package/dist/cjs/plugins/editable/EditableComponents/TextBox.js.map +2 -2
- package/dist/cjs/plugins/editable/EditablePlugin.js +2 -2
- package/dist/cjs/plugins/editable/EditablePlugin.js.map +2 -2
- package/dist/cjs/plugins/editable/decorateEditable.js +2 -2
- package/dist/cjs/plugins/editable/decorateEditable.js.map +2 -2
- package/dist/cjs/plugins/editable/getEditorComponent.js.map +1 -1
- package/dist/cjs/plugins/expandable-grid/ExpandableColumn.js.map +1 -1
- package/dist/cjs/plugins/expandable-grid/ExpandablePlugin.js +3 -4
- package/dist/cjs/plugins/expandable-grid/ExpandablePlugin.js.map +2 -2
- package/dist/cjs/plugins/expandable-grid/ExpandedRow.js +3 -4
- package/dist/cjs/plugins/expandable-grid/ExpandedRow.js.map +2 -2
- package/dist/cjs/plugins/expandable-grid/ExpandedRowExtra.js.map +1 -1
- package/dist/cjs/plugins/expandable-grid/useExpandGridState.js.map +1 -1
- package/dist/cjs/plugins/export-data/ExportDataPlugin.js +2 -2
- package/dist/cjs/plugins/export-data/ExportDataPlugin.js.map +2 -2
- package/dist/cjs/plugins/filterable/FilterablePlugin.js +2 -2
- package/dist/cjs/plugins/filterable/FilterablePlugin.js.map +2 -2
- package/dist/cjs/plugins/filterable/addFilterToColumn.js +2 -2
- package/dist/cjs/plugins/filterable/addFilterToColumn.js.map +2 -2
- package/dist/cjs/plugins/filterable/components/FilterableHeader.js.map +1 -1
- package/dist/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js.map +1 -1
- package/dist/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js.map +1 -1
- package/dist/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js.map +1 -1
- package/dist/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js.map +1 -1
- package/dist/cjs/plugins/filterable/components/filterable-menus/getFilterMenuByType.js.map +1 -1
- package/dist/cjs/plugins/filterable/filterableFormatter.js.map +1 -1
- package/dist/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js.map +1 -1
- package/dist/cjs/plugins/filterable/filtering-helper/strategiesOperators.js.map +1 -1
- package/dist/cjs/plugins/filterable/helper.js.map +1 -1
- package/dist/cjs/plugins/filterable/useFilterableState.js.map +1 -1
- package/dist/cjs/plugins/grouping-by/GroupingByPlugin.js +2 -2
- package/dist/cjs/plugins/grouping-by/GroupingByPlugin.js.map +2 -2
- package/dist/cjs/plugins/grouping-grid/GroupingPlugin.js +2 -2
- package/dist/cjs/plugins/grouping-grid/GroupingPlugin.js.map +2 -2
- package/dist/cjs/plugins/grouping-grid/walkStrategy.js.map +1 -1
- package/dist/cjs/plugins/infinite-scrolling/InfiniteScrollPlugin.js +2 -2
- package/dist/cjs/plugins/infinite-scrolling/InfiniteScrollPlugin.js.map +2 -2
- package/dist/cjs/plugins/pagination/PaginationPlugin.js +3 -4
- package/dist/cjs/plugins/pagination/PaginationPlugin.js.map +2 -2
- package/dist/cjs/plugins/pagination/components/Pagination.js.map +1 -1
- package/dist/cjs/plugins/pagination/components/Paginator.js.map +1 -1
- package/dist/cjs/plugins/pagination/components/PerPageDropdown.js.map +1 -1
- package/dist/cjs/plugins/pagination/helper.js.map +1 -1
- package/dist/cjs/plugins/pagination/usePaginationState.js.map +1 -1
- package/dist/cjs/plugins/resizable/ResizablePlugin.js +2 -2
- package/dist/cjs/plugins/resizable/ResizablePlugin.js.map +2 -2
- package/dist/cjs/plugins/resizable/decorateResizable.js +2 -2
- package/dist/cjs/plugins/resizable/decorateResizable.js.map +2 -2
- package/dist/cjs/plugins/resizable/useResizeHandle.js.map +1 -1
- package/dist/cjs/plugins/resizable/utils.js.map +1 -1
- package/dist/cjs/plugins/row-dnd/DndRowsPlugin.js +3 -4
- package/dist/cjs/plugins/row-dnd/DndRowsPlugin.js.map +2 -2
- package/dist/cjs/plugins/selectable/SelectablePlugin.js +2 -2
- package/dist/cjs/plugins/selectable/SelectablePlugin.js.map +2 -2
- package/dist/cjs/plugins/selectable/addSelectableColumn.js +3 -3
- package/dist/cjs/plugins/selectable/addSelectableColumn.js.map +2 -2
- package/dist/cjs/plugins/selectable/helper.js.map +1 -1
- package/dist/cjs/plugins/selectable/selectableFormatter.js.map +1 -1
- package/dist/cjs/plugins/selectable/useSelectableState.js.map +1 -1
- package/dist/cjs/plugins/sortable/SortablePlugin.js +3 -4
- package/dist/cjs/plugins/sortable/SortablePlugin.js.map +2 -2
- package/dist/cjs/plugins/sortable/checkIfSortable.js.map +1 -1
- package/dist/cjs/plugins/sortable/sortHeaderFormatter.js.map +1 -1
- package/dist/cjs/plugins/sortable/sortTree.js.map +1 -1
- package/dist/cjs/plugins/sortable/sorter.js.map +1 -1
- package/dist/cjs/plugins/sortable/useSortableState.js.map +1 -1
- package/dist/cjs/plugins/toolbar/RowRenderer.js.map +1 -1
- package/dist/cjs/plugins/toolbar/ToolbarPlugin.js +3 -4
- package/dist/cjs/plugins/toolbar/ToolbarPlugin.js.map +2 -2
- package/dist/cjs/plugins/toolbar/ToolbarTrigger.js.map +1 -1
- package/dist/cjs/plugins/virtualization/AutoHeightList.js.map +1 -1
- package/dist/cjs/plugins/virtualization/VirtualizationPlugin.js +4 -6
- package/dist/cjs/plugins/virtualization/VirtualizationPlugin.js.map +2 -2
- package/dist/cjs/plugins/virtualization/VirtualizedBody.js.map +1 -1
- package/dist/cjs/plugins/virtualization/VirtualizedBodyRow.js.map +1 -1
- package/dist/cjs/plugins/virtualization/helper.js.map +1 -1
- package/dist/cjs/renders/CellWithAddons.js.map +1 -1
- package/dist/cjs/renders/styled.js.map +1 -1
- package/dist/cjs/rowSizes.js.map +1 -1
- package/dist/cjs/utilities/getPluginsFromProps.js.map +1 -1
- package/dist/cjs/utilities/getScrollbarSize.js.map +1 -1
- package/dist/cjs/utilities/normalizeData.js.map +1 -1
- package/dist/esm/DSDataGrid.js.map +1 -1
- package/dist/esm/DataGridImpl.js +1 -2
- package/dist/esm/DataGridImpl.js.map +2 -2
- package/dist/esm/PaginatedDataGrid.js +1 -1
- package/dist/esm/PaginatedDataGrid.js.map +2 -2
- package/dist/esm/columns/IconColumn.js.map +1 -1
- package/dist/esm/columns/NumberColumn.js.map +1 -1
- package/dist/esm/components/BodyCell.js +1 -2
- package/dist/esm/components/BodyCell.js.map +2 -2
- package/dist/esm/components/BodyList.js.map +1 -1
- package/dist/esm/components/ColumnVisibilityMenuOption.js.map +1 -1
- package/dist/esm/components/ColumnsOptionsMenuSection.js.map +1 -1
- package/dist/esm/components/EmptyState.js.map +1 -1
- package/dist/esm/components/HeaderCell.js +1 -1
- package/dist/esm/components/HeaderCell.js.map +2 -2
- package/dist/esm/components/List.js.map +1 -1
- package/dist/esm/components/ListItem.js.map +1 -1
- package/dist/esm/components/NoResults.js.map +1 -1
- package/dist/esm/components/RowsLoader.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/components/TableHeader.js.map +1 -1
- package/dist/esm/components/footer/addOptionalFooterComponents.js.map +1 -1
- package/dist/esm/components/header/PrimaryControls.js.map +1 -1
- package/dist/esm/components/header/addOptionalHeaderComponents.js.map +1 -1
- package/dist/esm/components/renderers/defaultClassedRenderers.js.map +1 -1
- package/dist/esm/components/renderers/index.js.map +1 -1
- package/dist/esm/components/renderers/renderRowsLoader.js.map +1 -1
- package/dist/esm/components/tableContext.js.map +1 -1
- package/dist/esm/defaultPlugins.js.map +1 -1
- package/dist/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +1 -2
- package/dist/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js.map +2 -2
- package/dist/esm/plugins/column-dnd/DndColumnsPlugin.js +1 -1
- package/dist/esm/plugins/column-dnd/DndColumnsPlugin.js.map +2 -2
- package/dist/esm/plugins/column-dnd/decorateGridWithDndColumns.js +1 -4
- package/dist/esm/plugins/column-dnd/decorateGridWithDndColumns.js.map +2 -2
- package/dist/esm/plugins/column-sizing/ColumnSizingPlugin.js +1 -1
- package/dist/esm/plugins/column-sizing/ColumnSizingPlugin.js.map +2 -2
- package/dist/esm/plugins/column-sizing/columnMeasurerTransformer.js.map +1 -1
- package/dist/esm/plugins/column-sizing/ext-points/decorateColumn.js.map +1 -1
- package/dist/esm/plugins/column-sizing/ext-points/getTableProps.js.map +1 -1
- package/dist/esm/plugins/column-sizing/getColumnNameFromProperty.js.map +1 -1
- package/dist/esm/plugins/column-sizing/useColumnSizeService.js.map +1 -1
- 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/CustomRendererPlugin.js +1 -1
- package/dist/esm/plugins/custom-cell-renderer/CustomRendererPlugin.js.map +2 -2
- package/dist/esm/plugins/custom-cell-renderer/addCustomRendererToCell.js +1 -1
- package/dist/esm/plugins/custom-cell-renderer/addCustomRendererToCell.js.map +2 -2
- package/dist/esm/plugins/custom-cell-renderer/getRendererComponent.js.map +1 -1
- package/dist/esm/plugins/editable/EditableComponents/ComboBox.js +10 -10
- package/dist/esm/plugins/editable/EditableComponents/ComboBox.js.map +2 -2
- package/dist/esm/plugins/editable/EditableComponents/TextBox.js +21 -21
- package/dist/esm/plugins/editable/EditableComponents/TextBox.js.map +2 -2
- package/dist/esm/plugins/editable/EditablePlugin.js +1 -1
- package/dist/esm/plugins/editable/EditablePlugin.js.map +2 -2
- package/dist/esm/plugins/editable/decorateEditable.js +1 -1
- package/dist/esm/plugins/editable/decorateEditable.js.map +2 -2
- 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 +1 -2
- package/dist/esm/plugins/expandable-grid/ExpandablePlugin.js.map +2 -2
- package/dist/esm/plugins/expandable-grid/ExpandedRow.js +1 -2
- package/dist/esm/plugins/expandable-grid/ExpandedRow.js.map +2 -2
- package/dist/esm/plugins/expandable-grid/ExpandedRowExtra.js.map +1 -1
- package/dist/esm/plugins/expandable-grid/useExpandGridState.js.map +1 -1
- package/dist/esm/plugins/export-data/ExportDataPlugin.js +1 -1
- package/dist/esm/plugins/export-data/ExportDataPlugin.js.map +2 -2
- package/dist/esm/plugins/filterable/FilterablePlugin.js +1 -1
- package/dist/esm/plugins/filterable/FilterablePlugin.js.map +2 -2
- package/dist/esm/plugins/filterable/addFilterToColumn.js +1 -1
- package/dist/esm/plugins/filterable/addFilterToColumn.js.map +2 -2
- package/dist/esm/plugins/filterable/components/FilterableHeader.js.map +1 -1
- package/dist/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js.map +1 -1
- package/dist/esm/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js.map +1 -1
- 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/filterableFormatter.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/filterable/useFilterableState.js.map +1 -1
- package/dist/esm/plugins/grouping-by/GroupingByPlugin.js +1 -1
- package/dist/esm/plugins/grouping-by/GroupingByPlugin.js.map +2 -2
- package/dist/esm/plugins/grouping-grid/GroupingPlugin.js +1 -1
- package/dist/esm/plugins/grouping-grid/GroupingPlugin.js.map +2 -2
- package/dist/esm/plugins/grouping-grid/walkStrategy.js.map +1 -1
- package/dist/esm/plugins/infinite-scrolling/InfiniteScrollPlugin.js +1 -1
- package/dist/esm/plugins/infinite-scrolling/InfiniteScrollPlugin.js.map +2 -2
- package/dist/esm/plugins/pagination/PaginationPlugin.js +1 -2
- package/dist/esm/plugins/pagination/PaginationPlugin.js.map +2 -2
- package/dist/esm/plugins/pagination/components/Pagination.js.map +1 -1
- package/dist/esm/plugins/pagination/components/Paginator.js.map +1 -1
- package/dist/esm/plugins/pagination/components/PerPageDropdown.js.map +1 -1
- package/dist/esm/plugins/pagination/helper.js.map +1 -1
- package/dist/esm/plugins/pagination/usePaginationState.js.map +1 -1
- package/dist/esm/plugins/resizable/ResizablePlugin.js +1 -1
- package/dist/esm/plugins/resizable/ResizablePlugin.js.map +2 -2
- package/dist/esm/plugins/resizable/decorateResizable.js +1 -1
- package/dist/esm/plugins/resizable/decorateResizable.js.map +2 -2
- package/dist/esm/plugins/resizable/useResizeHandle.js.map +1 -1
- package/dist/esm/plugins/resizable/utils.js.map +1 -1
- package/dist/esm/plugins/row-dnd/DndRowsPlugin.js +1 -2
- package/dist/esm/plugins/row-dnd/DndRowsPlugin.js.map +2 -2
- package/dist/esm/plugins/selectable/SelectablePlugin.js +1 -1
- package/dist/esm/plugins/selectable/SelectablePlugin.js.map +2 -2
- package/dist/esm/plugins/selectable/addSelectableColumn.js +1 -4
- package/dist/esm/plugins/selectable/addSelectableColumn.js.map +2 -2
- 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.map +1 -1
- package/dist/esm/plugins/sortable/SortablePlugin.js +1 -5
- package/dist/esm/plugins/sortable/SortablePlugin.js.map +2 -2
- 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/sortTree.js.map +1 -1
- package/dist/esm/plugins/sortable/sorter.js.map +1 -1
- package/dist/esm/plugins/sortable/useSortableState.js.map +1 -1
- package/dist/esm/plugins/toolbar/RowRenderer.js.map +1 -1
- package/dist/esm/plugins/toolbar/ToolbarPlugin.js +1 -2
- package/dist/esm/plugins/toolbar/ToolbarPlugin.js.map +2 -2
- 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 -4
- package/dist/esm/plugins/virtualization/VirtualizationPlugin.js.map +2 -2
- package/dist/esm/plugins/virtualization/VirtualizedBody.js.map +1 -1
- package/dist/esm/plugins/virtualization/VirtualizedBodyRow.js.map +1 -1
- package/dist/esm/plugins/virtualization/helper.js.map +1 -1
- package/dist/esm/renders/CellWithAddons.js.map +1 -1
- package/dist/esm/renders/styled.js.map +1 -1
- package/dist/esm/rowSizes.js.map +1 -1
- package/dist/esm/utilities/getPluginsFromProps.js.map +1 -1
- package/dist/esm/utilities/getScrollbarSize.js.map +1 -1
- package/dist/esm/utilities/normalizeData.js.map +1 -1
- package/package.json +21 -21
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { createInstancePlugin } from "@elliemae/ds-shared
|
|
2
|
+
import { createInstancePlugin } from "@elliemae/ds-shared";
|
|
3
3
|
import { addCustomRendererToCell } from "./addCustomRendererToCell";
|
|
4
4
|
const decorateColumn = (column, grid) => addCustomRendererToCell(grid)(column);
|
|
5
5
|
const CustomRendererPlugin = createInstancePlugin("custom-renderer", {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/custom-cell-renderer/CustomRendererPlugin.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { createInstancePlugin } from '@elliemae/ds-shared
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;AAIA,MAAM,iBAAiB,CAAC,QAAQ,SAAS,wBAAwB,MAAM;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { createInstancePlugin } from '@elliemae/ds-shared';\nimport { addCustomRendererToCell } from './addCustomRendererToCell';\n\n// todo: this probably needs to go to the core\n\nconst decorateColumn = (column, grid) => addCustomRendererToCell(grid)(column);\n\nexport const CustomRendererPlugin = createInstancePlugin('custom-renderer', {\n decorateColumn,\n});\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AAIA,MAAM,iBAAiB,CAAC,QAAQ,SAAS,wBAAwB,IAAI,EAAE,MAAM;AAEtE,MAAM,uBAAuB,qBAAqB,mBAAmB;AAAA,EAC1E;AACF,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -19,7 +19,7 @@ var __spreadValues = (a, b) => {
|
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import * as React from "react";
|
|
21
21
|
import { isFunction, get } from "@elliemae/ds-utilities";
|
|
22
|
-
import { appendCellFormatter } from "@elliemae/ds-shared
|
|
22
|
+
import { appendCellFormatter } from "@elliemae/ds-shared";
|
|
23
23
|
import { getRendererComponent } from "./getRendererComponent";
|
|
24
24
|
const getRenderer = (renderer, grid, column) => (value, metaData) => {
|
|
25
25
|
const {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/custom-cell-renderer/addCustomRendererToCell.tsx"],
|
|
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
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;ACCA;AACA;AACA;AAEO,MAAM,cAAc,CAAC,UAAU,MAAM,WAAW,CAAC,OAAO,aAAa;AAC1E,QAAM;AAAA,IACJ,OAAO,EAAE,gBAAgB;AAAA,MACvB,KAAK;
|
|
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';\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;ACCA;AACA;AACA;AAEO,MAAM,cAAc,CAAC,UAAU,MAAM,WAAW,CAAC,OAAO,aAAa;AAC1E,QAAM;AAAA,IACJ,OAAO,EAAE,gBAAgB;AAAA,MACvB,KAAK,YAAY;AACrB,MACE,UACA,OAAO,oBACP,SACA,MAAM,SACN,MAAM,MAAM,YACZ,MAAM,MAAM,SAAS,WAAW,GAChC;AACA,WAAO;AAAA,MACL,MAAM,MAAM,SAAS;AAAA,MACrB,SAAS;AAAA,QACP,OAAO,MAAM,MAAM,SAAS;AAAA,QAC5B,UAAU,iCAAK,WAAL,EAAe,cAAc;AAAA,QACvC;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AACA,SAAO,SAAS;AAAA,IACd;AAAA,IACA,UAAU,iCAAK,WAAL,EAAe,cAAc;AAAA,IACvC;AAAA,EACF,CAAC;AACH;AAEA,MAAM,0BAA0B,CAAC,SAAS,CAAC,WAAW;AACpD,QAAM,EAAE,mBAAmB;AAC3B,QAAM,uBAAuB,IAAI,QAAQ,CAAC,UAAU,gBAAgB,CAAC;AACrE,MAAI,CAAC,kBAAkB,CAAC;AAAsB,WAAO;AAErD,MAAI,WAAW,oBAAoB,GAAG;AACpC,WAAO,OAAO,WAAW,KAAK,YAAY,sBAAsB,IAAI,CAAC;AAAA,EACvE;AAEA,MAAI,WAAW,cAAc,GAAG;AAC9B,aAAS,oBAAoB,YAAY,gBAAgB,MAAM,MAAM,GAAG,MAAM;AAAA,EAChF,OAAO;AACL,QAAI,CAAC;AAAgB,aAAO;AAC5B,WAAO,KAAK,WAAW,KAAK,CAAC,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';\n\nconst components = {\n DSButton,\n DSCheckbox,\n DSComboBox,\n DSRadio,\n DSTextBox,\n DSToggle,\n 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;ACAA;AACA;AACA;AACA;AACA;AAEA,MAAM,aAAa;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AACA;AACA;AAEA,MAAM,aAAa;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,MAAM,uBAAuB,CAAC,EAAE,SAAS,IAA2C,EAAE,cAAc;AAA3D,eAAE,SAAO,aAAa,aAAtB,IAAmC,iBAAnC,IAAmC,CAAjC,QAAoB;AAC7D,QAAM,YAAY,WAAW,SAAS,UAAU;AAChD,QAAM,EAAE,gBAAgB,WAAW;AACnC,QAAM,iBAAiB,CAAC;AAExB,SAAO,KAAK,QAAQ,EAAE,QAAQ,CAAC,QAAQ;AACrC,mBAAe,SAAS,QAAQ,MAC9B,OAAO,eAAe,SAAS,aAAa,eAAe,KAAK,SAAS,QAAQ,OAAO,IAAI;AAAA,EAChG,CAAC;AACD,SAAO,qCAAC,4DAAc,UAAa,iBAAoB,KAAM;AAC/D;AAGA,IAAO,+BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -23,18 +23,18 @@ import { DSComboBox } from "@elliemae/ds-form";
|
|
|
23
23
|
class ComboBox extends Component {
|
|
24
24
|
constructor(props) {
|
|
25
25
|
super(props);
|
|
26
|
+
this.handleChange = (value) => {
|
|
27
|
+
const { onValue } = this.props;
|
|
28
|
+
setTimeout(() => onValue(value), 1);
|
|
29
|
+
this.setState({ value });
|
|
30
|
+
};
|
|
31
|
+
this.handleBlur = () => {
|
|
32
|
+
const { onValue } = this.props;
|
|
33
|
+
const { value } = this.state;
|
|
34
|
+
onValue(value);
|
|
35
|
+
};
|
|
26
36
|
this.state = { value: props.value };
|
|
27
37
|
}
|
|
28
|
-
handleChange(value) {
|
|
29
|
-
const { onValue } = this.props;
|
|
30
|
-
setTimeout(() => onValue(value), 1);
|
|
31
|
-
this.setState({ value });
|
|
32
|
-
}
|
|
33
|
-
handleBlur() {
|
|
34
|
-
const { onValue } = this.props;
|
|
35
|
-
const { value } = this.state;
|
|
36
|
-
onValue(value);
|
|
37
|
-
}
|
|
38
38
|
render() {
|
|
39
39
|
const { value } = this.state;
|
|
40
40
|
return /* @__PURE__ */ React2.createElement(DSComboBox, __spreadProps(__spreadValues({}, this.props), {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/plugins/editable/EditableComponents/ComboBox.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { Component } from 'react';\nimport { DSComboBox } from '@elliemae/ds-form';\n\nclass ComboBox extends Component {\n static defaultProps = {\n onValue: () => null,\n };\n\n constructor(props) {\n super(props);\n this.state = { value: props.value };\n }\n\n handleChange(value) {\n const { onValue } = this.props;\n\n // some how this is executed before handleBlur, and handleBlur before the value is set\n // causing the value to be the same as the prevProp\n // todo: find a better solution to this\n setTimeout(() => onValue(value), 1);\n this.setState({ value });\n }\n\n handleBlur() {\n const { onValue } = this.props;\n const { value } = this.state;\n onValue(value);\n }\n\n render() {\n const { value } = this.state;\n return (\n <DSComboBox\n {...this.props}\n menuIsOpen\n onBlur={this.handleBlur}\n onChange={this.handleChange}\n onClick={(e) => e.stopPropagation()}\n value={value}\n />\n );\n }\n}\n\nexport { ComboBox };\nexport default ComboBox;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AAEA,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { Component } from 'react';\nimport { DSComboBox } from '@elliemae/ds-form';\n\nclass ComboBox extends Component {\n static defaultProps = {\n onValue: () => null,\n };\n\n constructor(props) {\n super(props);\n this.state = { value: props.value };\n }\n\n handleChange = (value) => {\n const { onValue } = this.props;\n\n // some how this is executed before handleBlur, and handleBlur before the value is set\n // causing the value to be the same as the prevProp\n // todo: find a better solution to this\n setTimeout(() => onValue(value), 1);\n this.setState({ value });\n }\n\n handleBlur = () => {\n const { onValue } = this.props;\n const { value } = this.state;\n onValue(value);\n }\n\n render() {\n const { value } = this.state;\n return (\n <DSComboBox\n {...this.props}\n menuIsOpen\n onBlur={this.handleBlur}\n onChange={this.handleChange}\n onClick={(e) => e.stopPropagation()}\n value={value}\n />\n );\n }\n}\n\nexport { ComboBox };\nexport default ComboBox;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AAEA,MAAM,iBAAiB,UAAU;AAAA,EAK/B,YAAY,OAAO;AACjB,UAAM,KAAK;AAIb,wBAAe,CAAC,UAAU;AACxB,YAAM,EAAE,YAAY,KAAK;AAKzB,iBAAW,MAAM,QAAQ,KAAK,GAAG,CAAC;AAClC,WAAK,SAAS,EAAE,MAAM,CAAC;AAAA,IACzB;AAEA,sBAAa,MAAM;AACjB,YAAM,EAAE,YAAY,KAAK;AACzB,YAAM,EAAE,UAAU,KAAK;AACvB,cAAQ,KAAK;AAAA,IACf;AAjBE,SAAK,QAAQ,EAAE,OAAO,MAAM,MAAM;AAAA,EACpC;AAAA,EAkBA,SAAS;AACP,UAAM,EAAE,UAAU,KAAK;AACvB,WACE,qCAAC,6CACK,KAAK,QADV;AAAA,MAEC,YAAU;AAAA,MACV,QAAQ,KAAK;AAAA,MACb,UAAU,KAAK;AAAA,MACf,SAAS,CAAC,MAAM,EAAE,gBAAgB;AAAA,MAClC;AAAA,MACF;AAAA,EAEJ;AACF;AAtCS,AADT,SACS,eAAe;AAAA,EACpB,SAAS,MAAM;AACjB;AAuCF,IAAO,mBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -23,6 +23,27 @@ import { DSTextBox } from "@elliemae/ds-form";
|
|
|
23
23
|
class TextBox extends Component {
|
|
24
24
|
constructor(props) {
|
|
25
25
|
super(props);
|
|
26
|
+
this.handleKeyUp = ({ key, target: { value } }) => {
|
|
27
|
+
const { onValue } = this.props;
|
|
28
|
+
if (key === "Enter") {
|
|
29
|
+
onValue(value);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
this.handleKeyDown = (e) => {
|
|
33
|
+
if (e.key === "Enter") {
|
|
34
|
+
e.preventDefault();
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
this.handleBlur = (e) => {
|
|
38
|
+
const { onValue } = this.props;
|
|
39
|
+
const {
|
|
40
|
+
target: { value }
|
|
41
|
+
} = e;
|
|
42
|
+
onValue(value);
|
|
43
|
+
};
|
|
44
|
+
this.handleChange = ({ target: { value } }) => {
|
|
45
|
+
this.setState({ value });
|
|
46
|
+
};
|
|
26
47
|
this.inputRef = React2.createRef();
|
|
27
48
|
this.state = { value: props.value };
|
|
28
49
|
}
|
|
@@ -33,27 +54,6 @@ class TextBox extends Component {
|
|
|
33
54
|
}
|
|
34
55
|
}, 50);
|
|
35
56
|
}
|
|
36
|
-
handleKeyUp({ key, target: { value } }) {
|
|
37
|
-
const { onValue } = this.props;
|
|
38
|
-
if (key === "Enter") {
|
|
39
|
-
onValue(value);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
handleKeyDown(e) {
|
|
43
|
-
if (e.key === "Enter") {
|
|
44
|
-
e.preventDefault();
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
handleBlur(e) {
|
|
48
|
-
const { onValue } = this.props;
|
|
49
|
-
const {
|
|
50
|
-
target: { value }
|
|
51
|
-
} = e;
|
|
52
|
-
onValue(value);
|
|
53
|
-
}
|
|
54
|
-
handleChange({ target: { value } }) {
|
|
55
|
-
this.setState({ value });
|
|
56
|
-
}
|
|
57
57
|
render() {
|
|
58
58
|
const { value } = this.state;
|
|
59
59
|
return /* @__PURE__ */ React2.createElement(DSTextBox, __spreadProps(__spreadValues({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/plugins/editable/EditableComponents/TextBox.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/prop-types */\n/* eslint-disable react/static-property-placement */\nimport React, { Component } from 'react';\nimport { DSTextBox } from '@elliemae/ds-form';\n\n// todo: redo with hooks\nclass TextBox extends Component {\n static defaultProps = {\n onValue: () => null,\n };\n\n constructor(props) {\n super(props);\n this.inputRef = React.createRef();\n this.state = { value: props.value };\n }\n\n componentDidMount() {\n setTimeout(() => {\n if (this.inputRef && this.inputRef.current) {\n this.inputRef.current.focus();\n }\n }, 50);\n }\n\n handleKeyUp({ key, target: { value } }) {\n const { onValue } = this.props;\n if (key === 'Enter') {\n onValue(value);\n }\n }\n\n handleKeyDown(e) {\n // PUI-2553 prevent form submit on `Enter` keypress\n if (e.key === 'Enter') {\n e.preventDefault();\n }\n }\n\n handleBlur(e) {\n const { onValue } = this.props;\n const {\n target: { value },\n } = e;\n onValue(value);\n }\n\n handleChange({ target: { value } }) {\n this.setState({ value });\n }\n\n render() {\n const { value } = this.state;\n return (\n <DSTextBox\n data-testid=\"ds-datagrids-editable-text-box\"\n {...this.props}\n innerRef={this.inputRef}\n onBlur={this.handleBlur}\n onChange={this.handleChange}\n onClick={(e) => e.stopPropagation()}\n onKeyUp={this.handleKeyUp}\n onKeyDown={this.handleKeyDown}\n value={value}\n />\n );\n }\n}\n\nexport { TextBox };\nexport default TextBox;\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;ACEA;AACA;AAGA,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/prop-types */\n/* eslint-disable react/static-property-placement */\nimport React, { Component } from 'react';\nimport { DSTextBox } from '@elliemae/ds-form';\n\n// todo: redo with hooks\nclass TextBox extends Component {\n static defaultProps = {\n onValue: () => null,\n };\n\n constructor(props) {\n super(props);\n this.inputRef = React.createRef();\n this.state = { value: props.value };\n }\n\n componentDidMount() {\n setTimeout(() => {\n if (this.inputRef && this.inputRef.current) {\n this.inputRef.current.focus();\n }\n }, 50);\n }\n\n handleKeyUp = ({ key, target: { value } }) => {\n const { onValue } = this.props;\n if (key === 'Enter') {\n onValue(value);\n }\n }\n\n handleKeyDown = (e) => {\n // PUI-2553 prevent form submit on `Enter` keypress\n if (e.key === 'Enter') {\n e.preventDefault();\n }\n }\n\n handleBlur = (e) => {\n const { onValue } = this.props;\n const {\n target: { value },\n } = e;\n onValue(value);\n }\n\n handleChange = ({ target: { value } }) => {\n this.setState({ value });\n }\n\n render() {\n const { value } = this.state;\n return (\n <DSTextBox\n data-testid=\"ds-datagrids-editable-text-box\"\n {...this.props}\n innerRef={this.inputRef}\n onBlur={this.handleBlur}\n onChange={this.handleChange}\n onClick={(e) => e.stopPropagation()}\n onKeyUp={this.handleKeyUp}\n onKeyDown={this.handleKeyDown}\n value={value}\n />\n );\n }\n}\n\nexport { TextBox };\nexport default TextBox;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;ACEA;AACA;AAGA,MAAM,gBAAgB,UAAU;AAAA,EAK9B,YAAY,OAAO;AACjB,UAAM,KAAK;AAab,uBAAc,CAAC,EAAE,KAAK,QAAQ,EAAE,cAAc;AAC5C,YAAM,EAAE,YAAY,KAAK;AACzB,UAAI,QAAQ,SAAS;AACnB,gBAAQ,KAAK;AAAA,MACf;AAAA,IACF;AAEA,yBAAgB,CAAC,MAAM;AAErB,UAAI,EAAE,QAAQ,SAAS;AACrB,UAAE,eAAe;AAAA,MACnB;AAAA,IACF;AAEA,sBAAa,CAAC,MAAM;AAClB,YAAM,EAAE,YAAY,KAAK;AACzB,YAAM;AAAA,QACJ,QAAQ,EAAE;AAAA,UACR;AACJ,cAAQ,KAAK;AAAA,IACf;AAEA,wBAAe,CAAC,EAAE,QAAQ,EAAE,cAAc;AACxC,WAAK,SAAS,EAAE,MAAM,CAAC;AAAA,IACzB;AApCE,SAAK,WAAW,OAAM,UAAU;AAChC,SAAK,QAAQ,EAAE,OAAO,MAAM,MAAM;AAAA,EACpC;AAAA,EAEA,oBAAoB;AAClB,eAAW,MAAM;AACf,UAAI,KAAK,YAAY,KAAK,SAAS,SAAS;AAC1C,aAAK,SAAS,QAAQ,MAAM;AAAA,MAC9B;AAAA,IACF,GAAG,EAAE;AAAA,EACP;AAAA,EA4BA,SAAS;AACP,UAAM,EAAE,UAAU,KAAK;AACvB,WACE,qCAAC;AAAA,MACC,eAAY;AAAA,OACR,KAAK,QAFV;AAAA,MAGC,UAAU,KAAK;AAAA,MACf,QAAQ,KAAK;AAAA,MACb,UAAU,KAAK;AAAA,MACf,SAAS,CAAC,MAAM,EAAE,gBAAgB;AAAA,MAClC,SAAS,KAAK;AAAA,MACd,WAAW,KAAK;AAAA,MAChB;AAAA,MACF;AAAA,EAEJ;AACF;AA5DS,AADT,QACS,eAAe;AAAA,EACpB,SAAS,MAAM;AACjB;AA6DF,IAAO,kBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { useDerivedStateFromProps, toggleInObject } from "@elliemae/ds-utilities";
|
|
3
|
-
import { createInstancePlugin } from "@elliemae/ds-shared
|
|
3
|
+
import { createInstancePlugin } from "@elliemae/ds-shared";
|
|
4
4
|
import { addEditableToCell, makeEditableConfig } from "./decorateEditable";
|
|
5
5
|
const registerStateHook = (grid) => {
|
|
6
6
|
const { rowKey = "id", editingRows: editingRowsProp, onColumnRowEdited, onColumnRowEdit } = grid.props;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/editable/EditablePlugin.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useDerivedStateFromProps, toggleInObject } from '@elliemae/ds-utilities';\nimport { createInstancePlugin } from '@elliemae/ds-shared
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;AACA;AAEA,MAAM,oBAAoB,CAAC,SAAS;AAClC,QAAM,EAAE,SAAS,MAAM,aAAa,iBAAiB,mBAAmB,oBAAoB,KAAK;AACjG,QAAM,CAAC,aAAa,kBAAkB,yBAAyB,mBAAmB;
|
|
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';\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;ACAA;AACA;AACA;AAEA,MAAM,oBAAoB,CAAC,SAAS;AAClC,QAAM,EAAE,SAAS,MAAM,aAAa,iBAAiB,mBAAmB,oBAAoB,KAAK;AACjG,QAAM,CAAC,aAAa,kBAAkB,yBAAyB,mBAAmB,CAAC,CAAC;AAEpF,QAAM,eAAe,CAAC,eAAe;AACnC,UAAM,EAAE,kBAAkB,KAAK,YAAY;AAC3C,UAAM,EAAE,SAAS,gBAAgB;AACjC,kBAAc,UAAU,EAAE,QAAQ,MAAM,OAAO,MAAM;AACrD,mBAAe,CAAC,oBAAoB;AAClC,sBAAgB,UAAU;AAC1B,aAAO,eAAe,iBAAiB,QAAQ,SAAS,WAAW;AAAA,IACrE,CAAC;AAAA,EACH;AAEA,QAAM,YAAY,CAAC,EAAE,OAAO,SAAS,UAAU,eAAe;AAC5D,mBAAe,CAAC,CAAC;AACjB,sBAAkB;AAAA,MAChB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;AAAA,EACH;AAEA,SAAO;AAAA,IACL,OAAO,EAAE,YAAY;AAAA,IACrB,SAAS;AAAA,MACP;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,iBAAiB,CAAC,QAAQ,SAAS;AACvC,QAAM;AAAA,IACJ,OAAO,EAAE,mBAAmB,CAAC,QAAQ,IAAI,UAAU;AAAA,MACjD;AAEJ,QAAM,iBAAiB,mBAAmB,IAAI;AAE9C,SAAO,iBAAiB,MAAM,IAC1B,kBACE;AAAA,IACE;AAAA,IACA,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ,GACA,IACF,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,gBAAgB;AACpC,cAAM;AAAA,UACJ;AAAA,UACA;AAAA,UACA,SAAS,EAAE;AAAA,UACX,OAAO,EAAE;AAAA,YACP,KAAK,YAAY;AAErB,YAAI,CAAC,iBAAiB,iBAAiB,UAAU;AAAG;AAEpD,cAAM,OAAO,aAAa,QAAQ;AAClC,cAAM,MAAM,KAAK;AACjB,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
|
}
|
|
@@ -31,7 +31,7 @@ import React2 from "react";
|
|
|
31
31
|
import * as edit from "react-edit";
|
|
32
32
|
import { EditPencil } from "@elliemae/ds-icons";
|
|
33
33
|
import { cx } from "@elliemae/ds-utilities";
|
|
34
|
-
import { appendCellFormatter } from "@elliemae/ds-shared
|
|
34
|
+
import { appendCellFormatter } from "@elliemae/ds-shared";
|
|
35
35
|
import { getEditorComponent } from "./getEditorComponent";
|
|
36
36
|
const makeEditableConfig = (grid) => edit.edit({
|
|
37
37
|
isEditing: (_a) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/editable/decorateEditable.tsx"],
|
|
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
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,qBAAqB,CAAC,SAC1B,KAAK,KAAK;AAAA,EACR,WAAW,CAAC,OAAmD;AAAnD,iBAAE,eAAa,SAAS,SAAS,
|
|
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';\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;ACAA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,qBAAqB,CAAC,SAC1B,KAAK,KAAK;AAAA,EACR,WAAW,CAAC,OAAmD;AAAnD,iBAAE,eAAa,SAAS,SAAS,CAAC,MAAlC,IAAwC,iBAAxC,IAAwC,CAAtC,eAAa,WAAS;AAClC,UAAM;AAAA,MACJ,OAAO,EAAE;AAAA,MACT,OAAO,EAAE;AAAA,QACP,KAAK,YAAY;AACrB,QAAI;AAEJ,QAAI,OAAO,OAAO,cAAc,YAAY;AAC1C,wBAAkB,OAAO,UAAU;AAAA,QACjC;AAAA,QACA;AAAA,QACA;AAAA,SACG,KACJ;AAAA,IACH;AACA,WAAO,YAAY,QAAQ,aAAa,eAAe,OAAO,iBAAiB;AAAA,EACjF;AAAA,EACA,YAAY,MAAM;AAAA,EAClB,SAAS,IAAI,SAAS,KAAK,YAAY,EAAE,QAAQ,UAAU,GAAG,IAAI;AACpE,CAAC;AACH,MAAM,oBAAoB,CAAC,EAAE,QAAQ,QAAQ,YAAY,SAAS;AAChE,SAAO,KAAK,WAAW,KAAK,OAAO,mBAAmB,OAAO,cAAc,QAAQ,CAAC,CAAC;AACrF,SAAO,KAAK,MAAM,YAAY,GAC5B,OAAO,KAAK,MAAM,WAClB,WAAW,OAAO,eAAe,kBAAkB,IACrD;AACA,SAAO,oBACL;AAAA,IACE,CAAC,OAAO,gBACN,4DACE,qCAAC;AAAA,MACC,SAAS,CAAC,MAAM;AACd,UAAE,gBAAgB;AAClB,aAAK,YAAY,EAAE,QAAQ,aAAa,WAAW;AAAA,MACrD;AAAA,MACA,SAAS,CAAC,MAAM;AACd,UAAE,gBAAgB;AAClB,YAAI,EAAE,YAAY,IAAI;AACpB,eAAK,YAAY,EAAE,QAAQ,aAAa,WAAW;AAAA,QACrD;AAAA,MACF;AAAA,MACA,MAAK;AAAA,MACL,UAAU;AAAA,OAET,OACD,qCAAC;AAAA,MAAW,WAAU;AAAA,KAAc,GACpC,qCAAC;AAAA,MAAK,WAAU;AAAA,OAAiB,GAAC,CACpC,CACF;AAAA,EAEJ,GACA,MACF;AACF;",
|
|
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/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';\n\nconst components = {\n DSComboBox: ComboBox,\n DSTextBox: TextBox,\n};\n\nconst getEditorComponent = (editorComponent = {}, handlers) => ({\n value,\n onValue,\n extraParameters,\n}) => {\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\n autoFocus\n onValue={onValue}\n value={value}\n maxOptions={maxOptions}\n {...restEditorProps}\n />\n </div>\n );\n }\n\n return (\n <Component autoFocus onValue={onValue} value={value} {...restEditorProps} />\n );\n};\n\nexport { getEditorComponent };\nexport default getEditorComponent;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACCA;AACA;AAEA,MAAM,aAAa;AAAA,EACjB,YAAY;AAAA,EACZ,WAAW;
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACCA;AACA;AAEA,MAAM,aAAa;AAAA,EACjB,YAAY;AAAA,EACZ,WAAW;AACb;AAEA,MAAM,qBAAqB,CAAC,kBAAkB,CAAC,GAAG,aAAa,CAAC;AAAA,EAC9D;AAAA,EACA;AAAA,EACA;AAAA,MACI;AACJ,MAAI,OAAO,oBAAoB,YAAY;AACzC,WAAO,gBAAgB;AAAA,MACrB;AAAA,MACA;AAAA,MACA,gBAAgB;AAAA,OACb,gBACJ;AAAA,EACH;AAEA,QAAmD,sBAA3C,SAAO,gBAAoC,IAApB,4BAAoB,IAApB,CAAvB;AACR,QAAM,YAAY,WAAW;AAE7B,MAAI,SAAS,cAAc;AAEzB,UAAM,aAAa,iBAAiB,SAAS,UAAU;AACvD,WACE,qCAAC;AAAA,MAAI,OAAO,EAAE,QAAQ,EAAE;AAAA,OACtB,qCAAC;AAAA,MACC,WAAS;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,OACI,gBACN,CACF;AAAA,EAEJ;AAEA,SACE,qCAAC;AAAA,IAAU,WAAS;AAAA,IAAC;AAAA,IAAkB;AAAA,KAAkB,gBAAiB;AAE9E;AAGA,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';\nimport { RowSizes } from '../../rowSizes';\n\nconst blockName = `${dataGridBlockName}-expandable-column`;\n\n// todo: clean this when we move to css-js\nconst ExpandableColumnWrapper = aggregatedClasses('div')(blockName);\nconst LabelDescriptionWrapper = aggregatedClasses('div')(blockName, 'label-description-wrapper');\nconst Label = aggregatedClasses('span')(blockName, 'label');\nconst Description = aggregatedClasses('span')(blockName, 'description');\nconst ExtraColumnData = aggregatedClasses('div')(blockName, 'extra-column-data');\nconst ExpandableMasterWrapper = aggregatedClasses('div')(`${blockName}-master-wrapper`);\nconst ExpandableDetailsWrapper = aggregatedClasses('div')(`${blockName}-details-wrapper`);\n\nfunction 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 return {\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};\n\nexport default ExpandableColumn;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACCA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,YAAY,GAAG;AAGrB,MAAM,0BAA0B,kBAAkB,
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACCA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,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,8BAA8B,EAAE,OAAO,aAAa,YAAY,mBAAmB,WAAW,kBAAkB;AAC9G,QAAM,MAAM,OAAO;AACnB,SACE,qCAAC;AAAA,IAAwB;AAAA,IAAU,UAAU;AAAA,KAC3C,qCAAC;AAAA,IAAwB,OAAO,EAAE,QAAQ,SAAS,OAAO;AAAA,KACxD,qCAAC;AAAA,IACC,YAAW;AAAA,IACX,WAAU;AAAA,IACV,MAAM,aAAa,qCAAC,mBAAc,IAAK,qCAAC,oBAAe;AAAA,IACvD,SAAS,CAAC,MAAM;AACd,qBAAe,CAAC;AAChB,UAAI,OAAO,IAAI,SAAS;AACtB,YAAI,QAAQ,MAAM;AAAA,MACpB;AAAA,IACF;AAAA,IACA,MAAK;AAAA,GACP,GACA,qCAAC,+BACC,qCAAC,aACC,qCAAC;AAAA,IAAuB,OAAO;AAAA,GAAO,CACxC,GACA,qCAAC,mBACC,qCAAC;AAAA,IAAuB,OAAO;AAAA,GAAa,CAC9C,CACF,GACA,qCAAC,uBAAiB,SAAU,CAC9B,GACC,cAAc,qCAAC,gCAA0B,iBAAkB,CAC9D;AAEJ;AAEA,MAAM,2BACJ,CAAC,EAAE,gBAAgB,sBAAsB,sBACzC,CAAC,OAAO,EAAE,SAAS,cAAc,SAAS;AACxC,QAAM;AAAA,IACJ,OAAO,EAAE;AAAA,IACT,SAAS,EAAE;AAAA,MACT,KAAK,YAAY;AAErB,QAAM,oBAAoB,sBAAsB,EAAE,QAAQ,CAAC;AAC3D,SACE,qCAAC;AAAA,IACC,aAAa,qBAAqB,EAAE,QAAQ,CAAC;AAAA,IAC7C;AAAA,IACA,WAAW,gBAAgB,EAAE,QAAQ,CAAC;AAAA,IACtC;AAAA,IACA,OAAO,eAAe,EAAE,QAAQ,CAAC;AAAA,IACjC,gBAAgB,MAAM,aAAa,OAAO;AAAA,GAC5C;AAEJ;AACF,MAAM,OAAO,MAAM;AACZ,MAAM,mBAAmB,CAAC,OAY3B;AAZ2B,eAC/B;AAAA;AAAA,IACA;AAAA,IACA,iBAAiB,MAAM;AAAA,IACvB,uBAAuB;AAAA,IACvB,kBAAkB;AAAA,IAClB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MAV+B,IAW5B,iBAX4B,IAW5B;AAAA,IAVH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAGA,SAAO,iCACF,OADE;AAAA,IAEL;AAAA,IACA;AAAA,IACA,MAAM;AAAA,MACJ,YAAY;AAAA,QACV,yBAAyB;AAAA,UACvB;AAAA,UACA;AAAA,UACA;AAAA,QACF,CAAC;AAAA,MACH;AAAA,IACF;AAAA,IACA,OAAO,SAAS;AAAA,IAChB,kBAAkB;AAAA,IAClB;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEA,IAAO,2BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -35,8 +35,7 @@ import { cx, isFunction } from "@elliemae/ds-utilities";
|
|
|
35
35
|
import { VariableSizeList } from "react-window";
|
|
36
36
|
import { ArrowheadDown, ArrowheadRight } from "@elliemae/ds-icons";
|
|
37
37
|
import { DSButton } from "@elliemae/ds-button";
|
|
38
|
-
import { createInstancePlugin } from "@elliemae/ds-shared
|
|
39
|
-
import { appendCellFormatter } from "@elliemae/ds-shared/useDataGrid/initColumnDefinition";
|
|
38
|
+
import { createInstancePlugin, appendCellFormatter } from "@elliemae/ds-shared";
|
|
40
39
|
import { ExpandedRow } from "./ExpandedRow";
|
|
41
40
|
import { ExpandedRowExtra } from "./ExpandedRowExtra";
|
|
42
41
|
import { RowSizes } from "../../rowSizes";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/expandable-grid/ExpandablePlugin.tsx"],
|
|
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
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
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';\nimport { ExpandedRowExtra } from './ExpandedRowExtra';\nimport { RowSizes } from '../../rowSizes';\nimport { useExpandGridState } from './useExpandGridState';\n\nconst getExpandedRowSizeBySubrows = ({ totalAmount, amountVisible, isShowingAll, size = 36 }) =>\n isShowingAll ? size * (totalAmount + 1) - 6 : size * (amountVisible + 1) + 32;\n\nconst ExpandedRows = {\n SingleColumn: ExpandedRow,\n Master: ExpandedRowExtra,\n};\n\nconst createExpandedRow = (type) => ExpandedRows[type] || ExpandedRows.Master;\n\nconst isExpandableSingleColumn = (columns) => columns.some((column) => column.expandableColumn);\n\nexport const ExpandablePlugin = createInstancePlugin('expandable', {\n registerStateHook: useExpandGridState,\n decorateGrid(grid) {\n const { decoratedColumns, columns } = grid.getInstance();\n const detailColumns = useMemo(\n () =>\n decoratedColumns\n .map((column) => ({\n ...column,\n customRenderer: column.detailCustomRenderer,\n }))\n .filter((col) => !col.expandableColumn),\n [columns],\n );\n return {\n detailColumns,\n };\n },\n\n decorateColumns(columns, grid) {\n if (isExpandableSingleColumn(columns)) return columns;\n // get first column from user\n const firstColumnIndex = columns.findIndex((column) => column.isUserColumn);\n const firstColumn = columns[firstColumnIndex];\n firstColumn.formatExpandable = true;\n\n return [\n ...columns.slice(0, firstColumnIndex),\n appendCellFormatter((value, { isExpanded, rowData }) => {\n const {\n actions: { toggleExpand },\n } = grid.getInstance();\n /*\n * should return only 2 elements ../custom-cell-renderer/addCustomRendererToCell.js\n * getRenderer it's checking that length to apply the custom render to value only\n */\n return (\n <>\n <DSButton\n buttonType=\"text\"\n className=\"expandable-arrow\"\n icon={isExpanded ? <ArrowheadDown /> : <ArrowheadRight />}\n onClick={(e) => {\n e.stopPropagation();\n toggleExpand(rowData);\n }}\n size=\"s\"\n />\n {value}\n </>\n );\n }, firstColumn),\n ...columns.slice(firstColumnIndex + 1),\n ];\n },\n\n getBodyProps(bodyProps, grid) {\n const {\n composedRows: rows,\n props: {\n rowKey,\n getChildrenRows,\n rowSize = 'normal',\n subrowSize = 'normal',\n getExpandedRowMinSize,\n getExpandedRowSize,\n expandableSubrowsVisible,\n },\n state: { expandedRows },\n } = grid.getInstance();\n const rowSizePx = RowSizes[rowSize];\n const subrowSizePx = RowSizes[subrowSize];\n const listRef = useRef();\n\n useEffect(() => {\n if (listRef.current) listRef.current.resetAfterIndex(0, true);\n });\n\n // implementation of expandable row single column with aggregation\n const getItemSize = (index) => {\n const rowData = rows[index];\n const key = rowData[rowKey];\n const children = getChildrenRows({ rowData });\n\n const expandedSize = getExpandedRowSize\n ? getExpandedRowSize(index, { rowData }) // https://jira.elliemae.io/browse/PUI-1659\n : getExpandedRowSizeBySubrows({\n totalAmount: children.length,\n amountVisible: children.length > expandableSubrowsVisible ? expandableSubrowsVisible : children.length,\n isShowingAll:\n children.length < expandableSubrowsVisible || (expandedRows[key] && expandedRows[key].showAllRows),\n size: subrowSizePx,\n });\n\n const expandedMinSize = isFunction(getExpandedRowMinSize) && getExpandedRowMinSize(index);\n\n // eslint-disable-next-line no-nested-ternary\n return expandedRows[key] ? (expandedMinSize > expandedSize ? expandedMinSize : expandedSize) : rowSizePx;\n };\n\n return {\n ...bodyProps,\n className: cx(bodyProps.className, 'expandable'),\n listComponent: VariableSizeList,\n listProps: { ref: listRef, itemSize: getItemSize },\n };\n },\n\n decorateRenderers(renderers, grid) {\n const Row = renderers.body.row;\n const Cell = renderers.body.cell;\n\n // eslint-disable-next-line react/display-name\n renderers.body.row = useMemo(() => {\n // todo: the expandable grid should be created from another specific grid component\n const expandedRowType = isExpandableSingleColumn(grid.decoratedColumns) ? 'SingleColumn' : 'Master';\n const ExpandedRowComponent = createExpandedRow(expandedRowType);\n // eslint-disable-next-line react/display-name\n return ({ isExpanded, ...rowProps }) => {\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": "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",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -35,8 +35,7 @@ import { DSSeparator } from "@elliemae/ds-separator";
|
|
|
35
35
|
import { DSButton } from "@elliemae/ds-button";
|
|
36
36
|
import styled from "styled-components";
|
|
37
37
|
import { get } from "@elliemae/ds-utilities";
|
|
38
|
-
import { deferComponentRender } from "@elliemae/ds-shared
|
|
39
|
-
import { useDataGrid } from "@elliemae/ds-shared/useDataGrid";
|
|
38
|
+
import { deferComponentRender, useDataGrid } from "@elliemae/ds-shared";
|
|
40
39
|
import { PaginationPlugin } from "../pagination";
|
|
41
40
|
import { BodyCell } from "../../components/BodyCell";
|
|
42
41
|
import { defaultRenderers } from "../../components/renderers";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/expandable-grid/ExpandedRow.tsx"],
|
|
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 'styled-components';\nimport { get } from '@elliemae/ds-utilities';\nimport { deferComponentRender
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
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 'styled-components';\nimport { get } from '@elliemae/ds-utilities';\nimport { deferComponentRender, useDataGrid } from '@elliemae/ds-shared';\nimport { PaginationPlugin } from '../pagination';\nimport { BodyCell } from '../../components/BodyCell';\nimport { defaultRenderers } from '../../components/renderers';\nimport { TableBody } from '../../components/TableBody';\nimport { Table } from '../../components/Table';\nimport { ColumnSizingPlugin } from '../column-sizing';\n\nconst DetailGrid = deferComponentRender(({ parentGrid, parentRowData, rows }) => {\n const { instanceRef, ...parentProps } = parentGrid.props;\n const grid = useDataGrid({\n uuid: parentGrid.getInstance().uuid,\n ...parentProps,\n columns: parentGrid\n .getInstance()\n .decoratedColumns.filter((col) => !col.expandableColumn)\n .map((c) => ({ ...c, expandableColumn: false })),\n rows,\n plugins: [ColumnSizingPlugin, PaginationPlugin],\n renderers: defaultRenderers,\n bindColumnsSizeTo: parentGrid.uuid,\n numRowsVisible: 'all',\n paginated: true,\n pagination: {\n perPage: rows.length,\n conditionalPagination: true,\n },\n parentRowData,\n });\n\n return (\n <Table {...grid}>\n <TableBody />\n </Table>\n );\n}, null);\n\nconst DetailsWrapper = styled.span`\n flex: 1;\n width: ${(props) => props.width}px;\n`;\n\nconst DetailGridWrapper = styled.div`\n display: flex;\n height: calc(100% - ${(props) => (props.allRowsVisible ? 18 : 60)}px);\n width: ${(props) => props.expandableGridDetailWidth}px;\n margin: 12px 0;\n`;\n\nfunction ExpandedRow({\n parentGrid,\n detailColumns,\n rowData,\n rows,\n rowProps,\n cellComponent: CellComponent,\n rowComponent: RowComponent,\n}) {\n const {\n decoratedColumns,\n actions: { toggleShowAllRows },\n state: { expandedRows },\n props: {\n rowKey,\n showMoreRowsText = 'SHOW ALL ROWS',\n showLessRowsText = 'SHOW LESS ROWS',\n expandableSubrowsVisible,\n },\n columnSizeService: { expandableGridDetailWidth },\n } = parentGrid.getInstance();\n\n const { showAllRows, ...restRowProps } = rowProps;\n return (\n <RowComponent {...restRowProps}>\n <BodyCell\n column={decoratedColumns[0]}\n columnIndex={0}\n component={CellComponent}\n grid={parentGrid}\n rowProps={{ rowData, ...rowProps }}\n />\n <DetailsWrapper width={expandableGridDetailWidth}>\n <DetailGridWrapper\n allRowsVisible={rows.length < expandableSubrowsVisible || get(expandedRows, [rowKey, 'showAllRows'])}\n expandableGridDetailWidth={expandableGridDetailWidth}\n >\n <DSSeparator dashed orientation=\"vertical\" />\n <DetailGrid\n detailColumns={detailColumns}\n parentGrid={parentGrid.getInstance()}\n parentRowData={rowData}\n rows={showAllRows ? rows : (rows || []).slice(0, expandableSubrowsVisible)}\n />\n </DetailGridWrapper>\n {rows.length > expandableSubrowsVisible && (\n <DSButton\n buttonType=\"text\"\n labelText={showAllRows ? showLessRowsText : showMoreRowsText}\n onClick={(e) => {\n e.stopPropagation();\n toggleShowAllRows(rowData);\n }}\n style={{ marginBottom: '10px' }}\n />\n )}\n </DetailsWrapper>\n </RowComponent>\n );\n}\n\nexport { ExpandedRow };\nexport default ExpandedRow;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,aAAa,qBAAqB,CAAC,EAAE,YAAY,eAAe,WAAW;AAC/E,QAAwC,gBAAW,OAA3C,kBAAgC,IAAhB,wBAAgB,IAAhB,CAAhB;AACR,QAAM,OAAO,YAAY;AAAA,IACvB,MAAM,WAAW,YAAY,EAAE;AAAA,KAC5B,cAFoB;AAAA,IAGvB,SAAS,WACN,YAAY,EACZ,iBAAiB,OAAO,CAAC,QAAQ,CAAC,IAAI,gBAAgB,EACtD,IAAI,CAAC,MAAO,iCAAK,IAAL,EAAQ,kBAAkB,MAAM,EAAE;AAAA,IACjD;AAAA,IACA,SAAS,CAAC,oBAAoB,gBAAgB;AAAA,IAC9C,WAAW;AAAA,IACX,mBAAmB,WAAW;AAAA,IAC9B,gBAAgB;AAAA,IAChB,WAAW;AAAA,IACX,YAAY;AAAA,MACV,SAAS,KAAK;AAAA,MACd,uBAAuB;AAAA,IACzB;AAAA,IACA;AAAA,EACF,EAAC;AAED,SACE,qCAAC,0BAAU,OACT,qCAAC,eAAU,CACb;AAEJ,GAAG,IAAI;AAEP,MAAM,iBAAiB,OAAO;AAAA;AAAA,WAEnB,CAAC,UAAU,MAAM;AAAA;AAG5B,MAAM,oBAAoB,OAAO;AAAA;AAAA,wBAET,CAAC,UAAW,MAAM,iBAAiB,KAAK;AAAA,WACrD,CAAC,UAAU,MAAM;AAAA;AAAA;AAI5B,qBAAqB;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf,cAAc;AAAA,GACb;AACD,QAAM;AAAA,IACJ;AAAA,IACA,SAAS,EAAE;AAAA,IACX,OAAO,EAAE;AAAA,IACT,OAAO;AAAA,MACL;AAAA,MACA,mBAAmB;AAAA,MACnB,mBAAmB;AAAA,MACnB;AAAA;AAAA,IAEF,mBAAmB,EAAE;AAAA,MACnB,WAAW,YAAY;AAE3B,QAAyC,eAAjC,kBAAiC,IAAjB,yBAAiB,IAAjB,CAAhB;AACR,SACE,qCAAC,iCAAiB,eAChB,qCAAC;AAAA,IACC,QAAQ,iBAAiB;AAAA,IACzB,aAAa;AAAA,IACb,WAAW;AAAA,IACX,MAAM;AAAA,IACN,UAAU,iBAAE,WAAY;AAAA,GAC1B,GACA,qCAAC;AAAA,IAAe,OAAO;AAAA,KACrB,qCAAC;AAAA,IACC,gBAAgB,KAAK,SAAS,4BAA4B,IAAI,cAAc,CAAC,QAAQ,aAAa,CAAC;AAAA,IACnG;AAAA,KAEA,qCAAC;AAAA,IAAY,QAAM;AAAA,IAAC,aAAY;AAAA,GAAW,GAC3C,qCAAC;AAAA,IACC;AAAA,IACA,YAAY,WAAW,YAAY;AAAA,IACnC,eAAe;AAAA,IACf,MAAM,cAAc,OAAQ,SAAQ,CAAC,GAAG,MAAM,GAAG,wBAAwB;AAAA,GAC3E,CACF,GACC,KAAK,SAAS,4BACb,qCAAC;AAAA,IACC,YAAW;AAAA,IACX,WAAW,cAAc,mBAAmB;AAAA,IAC5C,SAAS,CAAC,MAAM;AACd,QAAE,gBAAgB;AAClB,wBAAkB,OAAO;AAAA,IAC3B;AAAA,IACA,OAAO,EAAE,cAAc,OAAO;AAAA,GAChC,CAEJ,CACF;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/ExpandedRowExtra.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { cx } from '@elliemae/ds-utilities';\nimport { DSSeparator } from '@elliemae/ds-separator';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { dataGridBlockName } from '../../blockNames';\n\nconst blockName = `${dataGridBlockName}-expanded-row`;\n\nconst DetailsWrapper = aggregatedClasses('div')(`${blockName}-details-wrapper`, null, () => ({\n 'ie-flex-basis-auto': true,\n}));\n\nfunction ExpandedRowExtra({ children, rowData, rowProps, rowComponent: RowComponent, renderRowDetails = () => null }) {\n return (\n <RowComponent {...rowProps} className={cx(rowProps.className, 'expanded-detail-row')}>\n <RowComponent className=\"master-row-expanded\">{children}</RowComponent>\n <DSSeparator dashed margin=\"xs\" />\n <DetailsWrapper>{renderRowDetails({ rowData })}</DetailsWrapper>\n </RowComponent>\n );\n}\n\nexport { ExpandedRowExtra };\nexport default ExpandedRowExtra;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AACA;AACA;AAEA,MAAM,YAAY,GAAG;AAErB,MAAM,iBAAiB,kBAAkB,
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AACA;AACA;AAEA,MAAM,YAAY,GAAG;AAErB,MAAM,iBAAiB,kBAAkB,KAAK,EAAE,GAAG,6BAA6B,MAAM,MAAO;AAAA,EAC3F,sBAAsB;AACxB,EAAE;AAEF,0BAA0B,EAAE,UAAU,SAAS,UAAU,cAAc,cAAc,mBAAmB,MAAM,QAAQ;AACpH,SACE,qCAAC,+CAAiB,WAAjB;AAAA,IAA2B,WAAW,GAAG,SAAS,WAAW,qBAAqB;AAAA,MACjF,qCAAC;AAAA,IAAa,WAAU;AAAA,KAAuB,QAAS,GACxD,qCAAC;AAAA,IAAY,QAAM;AAAA,IAAC,QAAO;AAAA,GAAK,GAChC,qCAAC,sBAAgB,iBAAiB,EAAE,QAAQ,CAAC,CAAE,CACjD;AAEJ;AAGA,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/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;ACAA;AACA;AAEO,MAAM,qBAAqB,CAAC,SAAS;AAC1C,QAAM;AAAA,IACJ;AAAA,IACA,OAAO;AAAA,MACL,cAAc,mBAAmB;AAAA,
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AAEO,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;AAAA,MAEA;AAEJ,QAAM,EAAE,OAAO,YAAY,eAAe;AAAA,IACxC,OAAO;AAAA,IACP,SAAS;AAAA,IACT,UAAU;AAAA,IACV,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA,YAAY;AAAA,EACd,CAAC;AAED,QAAM,CAAC,eAAe,oBAAoB,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;AAChB,cAAQ,OAAO,KAAK;AAAA,QAClB,aAAa,MAAM,SAAS,QAAQ,CAAC,MAAM,SAAS,KAAK;AAAA,MAC3D,CAAC;AAAA,IACH;AAAA,EACF;AAEA,SAAO;AAAA,IACL,OAAO;AAAA,MACL,cAAc,MAAM;AAAA,MACpB,eAAe,MAAM;AAAA,MACrB;AAAA,IACF;AAAA,IACA,SAAS;AAAA,MACP;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -16,7 +16,7 @@ var __spreadValues = (a, b) => {
|
|
|
16
16
|
};
|
|
17
17
|
import * as React from "react";
|
|
18
18
|
import { get } from "@elliemae/ds-utilities";
|
|
19
|
-
import { createInstancePlugin } from "@elliemae/ds-shared
|
|
19
|
+
import { createInstancePlugin } from "@elliemae/ds-shared";
|
|
20
20
|
const isVisible = (column) => {
|
|
21
21
|
if (typeof column === "undefined") {
|
|
22
22
|
return false;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/export-data/ExportDataPlugin.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable indent */\nimport { get } from '@elliemae/ds-utilities';\nimport { createInstancePlugin } from '@elliemae/ds-shared
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;AAAA;ACEA;AACA;AAEA,MAAM,YAAY,CAAC,WAAW;AAC5B,MAAI,OAAO,WAAW,aAAa;AACjC,WAAO;AAAA;
|
|
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": "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",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { get, isFunction } from "@elliemae/ds-utilities";
|
|
3
|
-
import { createInstancePlugin } from "@elliemae/ds-shared
|
|
3
|
+
import { createInstancePlugin } from "@elliemae/ds-shared";
|
|
4
4
|
import { addFilterToColumn } from "./addFilterToColumn";
|
|
5
5
|
import filterRowsByQuery, { filterRowsByQueryGroup } from "./filtering-helper/filterRowsByQuery";
|
|
6
6
|
import { useFilterableState } from "./useFilterableState";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/filterable/FilterablePlugin.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable indent */\nimport { get, isFunction } from '@elliemae/ds-utilities';\nimport { createInstancePlugin } from '@elliemae/ds-shared
|
|
5
|
-
"mappings": "AAAA;ACCA;AACA;AACA;AAEA;AACA;AAEA,MAAM,iBAAiB,CAAC,QAAQ,SAAS;AACvC,QAAM;AAAA,IACJ,OAAO,EAAE,2BAA2B,CAAC,QAAQ,IAAI,YAAY;AAAA,IAC7D,SAAS,EAAE,WAAW;AAAA,IACtB,OAAO,EAAE,OAAO;AAAA,MACd;AAEJ,SAAO,yBAAyB,
|
|
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';\n\nimport filterRowsByQuery, { filterRowsByQueryGroup } from './filtering-helper/filterRowsByQuery';\nimport { useFilterableState } from './useFilterableState';\n\nconst decorateColumn = (column, grid) => {\n const {\n props: { isFilterableColumnActive = (col) => col.searchable, onRemoveAllFilters },\n actions: { addFilter, removeFilter },\n state: { query, filters },\n } = grid;\n\n return isFilterableColumnActive(column)\n ? addFilterToColumn(\n {\n grid,\n onAddFilter: addFilter,\n onRemoveFilter: removeFilter,\n onRemoveAllFilters,\n query,\n filters,\n },\n column,\n )\n : column;\n};\n\nconst composeRows = (rows, grid) => {\n const {\n props: { isDataFiltered, groupedRows },\n state: { query },\n composedRows,\n } = grid.getInstance();\n const nextRows = !groupedRows ? filterRowsByQuery(rows, query) : filterRowsByQueryGroup(rows, query, composedRows);\n\n return !isDataFiltered ? nextRows : rows;\n};\n\nexport const FilterablePlugin = createInstancePlugin('filterable', {\n registerStateHook: useFilterableState,\n decorateColumn,\n composeRows,\n registerHotKeys(grid) {\n return {\n key: 'ctrl+f',\n handler: ({ cellIndex }) => {\n const { decoratedColumns } = grid.getInstance();\n\n const column = decoratedColumns[cellIndex];\n const toggleMenuMethod = get(column, ['filterMenu', 'current', 'toggleMenu']);\n if (isFunction(toggleMenuMethod)) toggleMenuMethod();\n },\n };\n },\n});\n"],
|
|
5
|
+
"mappings": "AAAA;ACCA;AACA;AACA;AAEA;AACA;AAEA,MAAM,iBAAiB,CAAC,QAAQ,SAAS;AACvC,QAAM;AAAA,IACJ,OAAO,EAAE,2BAA2B,CAAC,QAAQ,IAAI,YAAY;AAAA,IAC7D,SAAS,EAAE,WAAW;AAAA,IACtB,OAAO,EAAE,OAAO;AAAA,MACd;AAEJ,SAAO,yBAAyB,MAAM,IAClC,kBACE;AAAA,IACE;AAAA,IACA,aAAa;AAAA,IACb,gBAAgB;AAAA,IAChB;AAAA,IACA;AAAA,IACA;AAAA,EACF,GACA,MACF,IACA;AACN;AAEA,MAAM,cAAc,CAAC,MAAM,SAAS;AAClC,QAAM;AAAA,IACJ,OAAO,EAAE,gBAAgB;AAAA,IACzB,OAAO,EAAE;AAAA,IACT;AAAA,MACE,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,gBAAgB;AAC1B,cAAM,EAAE,qBAAqB,KAAK,YAAY;AAE9C,cAAM,SAAS,iBAAiB;AAChC,cAAM,mBAAmB,IAAI,QAAQ,CAAC,cAAc,WAAW,YAAY,CAAC;AAC5E,YAAI,WAAW,gBAAgB;AAAG,2BAAiB;AAAA,MACrD;AAAA,IACF;AAAA,EACF;AACF,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -19,7 +19,7 @@ var __spreadValues = (a, b) => {
|
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import * as React from "react";
|
|
21
21
|
import { createRef } from "react";
|
|
22
|
-
import { mergeClassNameToColumnHeader } from "@elliemae/ds-shared
|
|
22
|
+
import { mergeClassNameToColumnHeader } from "@elliemae/ds-shared";
|
|
23
23
|
import { FilterableFormatter } from "./filterableFormatter";
|
|
24
24
|
const addFilterToColumn = (props, column) => {
|
|
25
25
|
const filterMenuRef = createRef();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/filterable/addFilterToColumn.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { createRef } from 'react';\nimport { mergeClassNameToColumnHeader } from '@elliemae/ds-shared
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AAEO,MAAM,oBAAoB,CAAC,OAAO,WAAW;AAClD,QAAM,gBAAgB;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { createRef } from 'react';\nimport { mergeClassNameToColumnHeader } from '@elliemae/ds-shared';\nimport { FilterableFormatter } from './filterableFormatter';\n\nexport const addFilterToColumn = (props, column) => {\n const filterMenuRef = createRef();\n column.header.formatters.push(FilterableFormatter({ ...props, filterMenuRef }));\n column.filterMenu = filterMenuRef;\n return mergeClassNameToColumnHeader('with-filtering', column);\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AAEO,MAAM,oBAAoB,CAAC,OAAO,WAAW;AAClD,QAAM,gBAAgB,UAAU;AAChC,SAAO,OAAO,WAAW,KAAK,oBAAoB,iCAAK,QAAL,EAAY,cAAc,EAAC,CAAC;AAC9E,SAAO,aAAa;AACpB,SAAO,6BAA6B,kBAAkB,MAAM;AAC9D;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|