@elliemae/ds-datagrids 3.22.0-next.6 → 3.22.0-rc.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (257) hide show
  1. package/dist/cjs/DSDataGrid.js.map +1 -1
  2. package/dist/cjs/DataGridImpl.js.map +1 -1
  3. package/dist/cjs/PaginatedDataGrid.js.map +1 -1
  4. package/dist/cjs/blockNames.js.map +1 -1
  5. package/dist/cjs/columns/IconColumn.js.map +1 -1
  6. package/dist/cjs/columns/NumberColumn.js.map +1 -1
  7. package/dist/cjs/components/BodyCell.js.map +1 -1
  8. package/dist/cjs/components/BodyList.js.map +1 -1
  9. package/dist/cjs/components/ColumnVisibilityMenuOption.js.map +1 -1
  10. package/dist/cjs/components/ColumnsOptionsMenuSection.js.map +1 -1
  11. package/dist/cjs/components/EmptyState.js.map +1 -1
  12. package/dist/cjs/components/HeaderCell.js.map +1 -1
  13. package/dist/cjs/components/List.js.map +1 -1
  14. package/dist/cjs/components/ListItem.js.map +1 -1
  15. package/dist/cjs/components/NoResults.js.map +1 -1
  16. package/dist/cjs/components/RowsLoader.js.map +1 -1
  17. package/dist/cjs/components/Table.js.map +1 -1
  18. package/dist/cjs/components/TableBody.js.map +1 -1
  19. package/dist/cjs/components/TableHeader.js.map +1 -1
  20. package/dist/cjs/components/footer/addOptionalFooterComponents.js.map +1 -1
  21. package/dist/cjs/components/header/PrimaryControls.js.map +1 -1
  22. package/dist/cjs/components/header/addOptionalHeaderComponents.js.map +1 -1
  23. package/dist/cjs/components/index.js.map +1 -1
  24. package/dist/cjs/components/renderers/defaultClassedRenderers.js.map +1 -1
  25. package/dist/cjs/components/renderers/index.js.map +1 -1
  26. package/dist/cjs/components/renderers/renderRowsLoader.js.map +1 -1
  27. package/dist/cjs/components/tableContext.js.map +1 -1
  28. package/dist/cjs/defaultPlugins.js.map +1 -1
  29. package/dist/cjs/index.js.map +1 -1
  30. package/dist/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js.map +1 -1
  31. package/dist/cjs/plugins/body-header-scroll-sync/index.js.map +1 -1
  32. package/dist/cjs/plugins/column-dnd/DndColumnsPlugin.js.map +1 -1
  33. package/dist/cjs/plugins/column-dnd/decorateGridWithDndColumns.js.map +1 -1
  34. package/dist/cjs/plugins/column-dnd/index.js.map +1 -1
  35. package/dist/cjs/plugins/column-sizing/ColumnSizingPlugin.js.map +1 -1
  36. package/dist/cjs/plugins/column-sizing/columnMeasurerTransformer.js.map +1 -1
  37. package/dist/cjs/plugins/column-sizing/ext-points/decorateColumn.js.map +1 -1
  38. package/dist/cjs/plugins/column-sizing/ext-points/getTableProps.js.map +1 -1
  39. package/dist/cjs/plugins/column-sizing/getColumnNameFromProperty.js.map +1 -1
  40. package/dist/cjs/plugins/column-sizing/index.js.map +1 -1
  41. package/dist/cjs/plugins/column-sizing/useColumnSizeService.js.map +1 -1
  42. package/dist/cjs/plugins/column-sizing/useStylesheetHelpers.js.map +1 -1
  43. package/dist/cjs/plugins/column-sizing/utils.js.map +1 -1
  44. package/dist/cjs/plugins/custom-cell-renderer/CustomRendererPlugin.js.map +1 -1
  45. package/dist/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js.map +1 -1
  46. package/dist/cjs/plugins/custom-cell-renderer/getRendererComponent.js.map +1 -1
  47. package/dist/cjs/plugins/custom-cell-renderer/index.js.map +1 -1
  48. package/dist/cjs/plugins/editable/EditableComponents/ComboBox.js.map +1 -1
  49. package/dist/cjs/plugins/editable/EditableComponents/TextBox.js.map +1 -1
  50. package/dist/cjs/plugins/editable/EditableComponents/index.js.map +1 -1
  51. package/dist/cjs/plugins/editable/EditablePlugin.js.map +1 -1
  52. package/dist/cjs/plugins/editable/decorateEditable.js.map +1 -1
  53. package/dist/cjs/plugins/editable/getEditorComponent.js.map +1 -1
  54. package/dist/cjs/plugins/editable/index.js.map +1 -1
  55. package/dist/cjs/plugins/expandable-grid/ExpandableColumn.js.map +1 -1
  56. package/dist/cjs/plugins/expandable-grid/ExpandablePlugin.js.map +1 -1
  57. package/dist/cjs/plugins/expandable-grid/ExpandedRow.js.map +1 -1
  58. package/dist/cjs/plugins/expandable-grid/ExpandedRowExtra.js.map +1 -1
  59. package/dist/cjs/plugins/expandable-grid/index.js.map +1 -1
  60. package/dist/cjs/plugins/expandable-grid/useExpandGridState.js.map +1 -1
  61. package/dist/cjs/plugins/export-data/ExportDataPlugin.js.map +1 -1
  62. package/dist/cjs/plugins/export-data/index.js.map +1 -1
  63. package/dist/cjs/plugins/filterable/FilterablePlugin.js.map +1 -1
  64. package/dist/cjs/plugins/filterable/addFilterToColumn.js.map +1 -1
  65. package/dist/cjs/plugins/filterable/components/FilterableHeader.js.map +1 -1
  66. package/dist/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js.map +1 -1
  67. package/dist/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js.map +1 -1
  68. package/dist/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js.map +1 -1
  69. package/dist/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js.map +1 -1
  70. package/dist/cjs/plugins/filterable/components/filterable-menus/defaultDateFormat.js.map +1 -1
  71. package/dist/cjs/plugins/filterable/components/filterable-menus/getFilterMenuByType.js.map +1 -1
  72. package/dist/cjs/plugins/filterable/filterableFormatter.js.map +1 -1
  73. package/dist/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js.map +1 -1
  74. package/dist/cjs/plugins/filterable/filtering-helper/strategiesOperators.js.map +1 -1
  75. package/dist/cjs/plugins/filterable/helper.js.map +1 -1
  76. package/dist/cjs/plugins/filterable/index.js.map +1 -1
  77. package/dist/cjs/plugins/filterable/useFilterableState.js.map +1 -1
  78. package/dist/cjs/plugins/grouping-by/GroupingByPlugin.js.map +1 -1
  79. package/dist/cjs/plugins/grouping-grid/GroupingPlugin.js.map +1 -1
  80. package/dist/cjs/plugins/grouping-grid/walkStrategy.js.map +1 -1
  81. package/dist/cjs/plugins/index.js.map +1 -1
  82. package/dist/cjs/plugins/infinite-scrolling/InfiniteScrollPlugin.js.map +1 -1
  83. package/dist/cjs/plugins/infinite-scrolling/index.js.map +1 -1
  84. package/dist/cjs/plugins/pagination/PaginationPlugin.js.map +1 -1
  85. package/dist/cjs/plugins/pagination/components/Pagination.js.map +1 -1
  86. package/dist/cjs/plugins/pagination/components/Paginator.js.map +1 -1
  87. package/dist/cjs/plugins/pagination/components/PerPageDropdown.js.map +1 -1
  88. package/dist/cjs/plugins/pagination/helper.js.map +1 -1
  89. package/dist/cjs/plugins/pagination/index.js.map +1 -1
  90. package/dist/cjs/plugins/pagination/usePaginationState.js.map +1 -1
  91. package/dist/cjs/plugins/resizable/ResizablePlugin.js.map +1 -1
  92. package/dist/cjs/plugins/resizable/decorateResizable.js.map +1 -1
  93. package/dist/cjs/plugins/resizable/index.js.map +1 -1
  94. package/dist/cjs/plugins/resizable/useResizeHandle.js.map +1 -1
  95. package/dist/cjs/plugins/resizable/utils.js.map +1 -1
  96. package/dist/cjs/plugins/row-dnd/DndRowsPlugin.js.map +1 -1
  97. package/dist/cjs/plugins/row-dnd/index.js.map +1 -1
  98. package/dist/cjs/plugins/selectable/SelectablePlugin.js.map +1 -1
  99. package/dist/cjs/plugins/selectable/addSelectableColumn.js.map +1 -1
  100. package/dist/cjs/plugins/selectable/helper.js.map +1 -1
  101. package/dist/cjs/plugins/selectable/index.js.map +1 -1
  102. package/dist/cjs/plugins/selectable/selectableFormatter.js.map +1 -1
  103. package/dist/cjs/plugins/selectable/useSelectableState.js.map +1 -1
  104. package/dist/cjs/plugins/sortable/SortablePlugin.js.map +1 -1
  105. package/dist/cjs/plugins/sortable/checkIfSortable.js.map +1 -1
  106. package/dist/cjs/plugins/sortable/index.js.map +1 -1
  107. package/dist/cjs/plugins/sortable/sortHeaderFormatter.js.map +1 -1
  108. package/dist/cjs/plugins/sortable/sortTree.js.map +1 -1
  109. package/dist/cjs/plugins/sortable/sorter.js.map +1 -1
  110. package/dist/cjs/plugins/sortable/useSortableState.js.map +1 -1
  111. package/dist/cjs/plugins/toolbar/RowRenderer.js.map +1 -1
  112. package/dist/cjs/plugins/toolbar/ToolbarPlugin.js.map +1 -1
  113. package/dist/cjs/plugins/toolbar/ToolbarTrigger.js.map +1 -1
  114. package/dist/cjs/plugins/toolbar/index.js.map +1 -1
  115. package/dist/cjs/plugins/virtualization/AutoHeightList.js.map +1 -1
  116. package/dist/cjs/plugins/virtualization/VirtualizationPlugin.js.map +1 -1
  117. package/dist/cjs/plugins/virtualization/VirtualizedBody.js.map +1 -1
  118. package/dist/cjs/plugins/virtualization/VirtualizedBodyRow.js.map +1 -1
  119. package/dist/cjs/plugins/virtualization/helper.js.map +1 -1
  120. package/dist/cjs/plugins/virtualization/index.js.map +1 -1
  121. package/dist/cjs/renders/CellWithAddons.js.map +1 -1
  122. package/dist/cjs/renders/index.js.map +1 -1
  123. package/dist/cjs/renders/styled.js.map +1 -1
  124. package/dist/cjs/rowSizes.js.map +1 -1
  125. package/dist/cjs/utilities/getPluginsFromProps.js.map +1 -1
  126. package/dist/cjs/utilities/getScrollbarSize.js.map +1 -1
  127. package/dist/cjs/utilities/normalizeData.js.map +1 -1
  128. package/dist/esm/DSDataGrid.js.map +1 -1
  129. package/dist/esm/DataGridImpl.js.map +1 -1
  130. package/dist/esm/PaginatedDataGrid.js.map +1 -1
  131. package/dist/esm/blockNames.js.map +1 -1
  132. package/dist/esm/columns/IconColumn.js.map +1 -1
  133. package/dist/esm/columns/NumberColumn.js.map +1 -1
  134. package/dist/esm/components/BodyCell.js.map +1 -1
  135. package/dist/esm/components/BodyList.js.map +1 -1
  136. package/dist/esm/components/ColumnVisibilityMenuOption.js.map +1 -1
  137. package/dist/esm/components/ColumnsOptionsMenuSection.js.map +1 -1
  138. package/dist/esm/components/EmptyState.js.map +1 -1
  139. package/dist/esm/components/HeaderCell.js.map +1 -1
  140. package/dist/esm/components/List.js.map +1 -1
  141. package/dist/esm/components/ListItem.js.map +1 -1
  142. package/dist/esm/components/NoResults.js.map +1 -1
  143. package/dist/esm/components/RowsLoader.js.map +1 -1
  144. package/dist/esm/components/Table.js.map +1 -1
  145. package/dist/esm/components/TableBody.js.map +1 -1
  146. package/dist/esm/components/TableHeader.js.map +1 -1
  147. package/dist/esm/components/footer/addOptionalFooterComponents.js.map +1 -1
  148. package/dist/esm/components/header/PrimaryControls.js.map +1 -1
  149. package/dist/esm/components/header/addOptionalHeaderComponents.js.map +1 -1
  150. package/dist/esm/components/index.js.map +1 -1
  151. package/dist/esm/components/renderers/defaultClassedRenderers.js.map +1 -1
  152. package/dist/esm/components/renderers/index.js.map +1 -1
  153. package/dist/esm/components/renderers/renderRowsLoader.js.map +1 -1
  154. package/dist/esm/components/tableContext.js.map +1 -1
  155. package/dist/esm/defaultPlugins.js.map +1 -1
  156. package/dist/esm/index.js.map +1 -1
  157. package/dist/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js.map +1 -1
  158. package/dist/esm/plugins/body-header-scroll-sync/index.js.map +1 -1
  159. package/dist/esm/plugins/column-dnd/DndColumnsPlugin.js.map +1 -1
  160. package/dist/esm/plugins/column-dnd/decorateGridWithDndColumns.js.map +1 -1
  161. package/dist/esm/plugins/column-dnd/index.js.map +1 -1
  162. package/dist/esm/plugins/column-sizing/ColumnSizingPlugin.js.map +1 -1
  163. package/dist/esm/plugins/column-sizing/columnMeasurerTransformer.js.map +1 -1
  164. package/dist/esm/plugins/column-sizing/ext-points/decorateColumn.js.map +1 -1
  165. package/dist/esm/plugins/column-sizing/ext-points/getTableProps.js.map +1 -1
  166. package/dist/esm/plugins/column-sizing/getColumnNameFromProperty.js.map +1 -1
  167. package/dist/esm/plugins/column-sizing/index.js.map +1 -1
  168. package/dist/esm/plugins/column-sizing/useColumnSizeService.js.map +1 -1
  169. package/dist/esm/plugins/column-sizing/useStylesheetHelpers.js.map +1 -1
  170. package/dist/esm/plugins/column-sizing/utils.js.map +1 -1
  171. package/dist/esm/plugins/custom-cell-renderer/CustomRendererPlugin.js.map +1 -1
  172. package/dist/esm/plugins/custom-cell-renderer/addCustomRendererToCell.js.map +1 -1
  173. package/dist/esm/plugins/custom-cell-renderer/getRendererComponent.js.map +1 -1
  174. package/dist/esm/plugins/custom-cell-renderer/index.js.map +1 -1
  175. package/dist/esm/plugins/editable/EditableComponents/ComboBox.js.map +1 -1
  176. package/dist/esm/plugins/editable/EditableComponents/TextBox.js.map +1 -1
  177. package/dist/esm/plugins/editable/EditableComponents/index.js.map +1 -1
  178. package/dist/esm/plugins/editable/EditablePlugin.js.map +1 -1
  179. package/dist/esm/plugins/editable/decorateEditable.js.map +1 -1
  180. package/dist/esm/plugins/editable/getEditorComponent.js.map +1 -1
  181. package/dist/esm/plugins/editable/index.js.map +1 -1
  182. package/dist/esm/plugins/expandable-grid/ExpandableColumn.js.map +1 -1
  183. package/dist/esm/plugins/expandable-grid/ExpandablePlugin.js.map +1 -1
  184. package/dist/esm/plugins/expandable-grid/ExpandedRow.js.map +1 -1
  185. package/dist/esm/plugins/expandable-grid/ExpandedRowExtra.js.map +1 -1
  186. package/dist/esm/plugins/expandable-grid/index.js.map +1 -1
  187. package/dist/esm/plugins/expandable-grid/useExpandGridState.js.map +1 -1
  188. package/dist/esm/plugins/export-data/ExportDataPlugin.js.map +1 -1
  189. package/dist/esm/plugins/export-data/index.js.map +1 -1
  190. package/dist/esm/plugins/filterable/FilterablePlugin.js.map +1 -1
  191. package/dist/esm/plugins/filterable/addFilterToColumn.js.map +1 -1
  192. package/dist/esm/plugins/filterable/components/FilterableHeader.js.map +1 -1
  193. package/dist/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js.map +1 -1
  194. package/dist/esm/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js.map +1 -1
  195. package/dist/esm/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js.map +1 -1
  196. package/dist/esm/plugins/filterable/components/filterable-menus/TextFilterMenu.js.map +1 -1
  197. package/dist/esm/plugins/filterable/components/filterable-menus/defaultDateFormat.js.map +1 -1
  198. package/dist/esm/plugins/filterable/components/filterable-menus/getFilterMenuByType.js.map +1 -1
  199. package/dist/esm/plugins/filterable/filterableFormatter.js.map +1 -1
  200. package/dist/esm/plugins/filterable/filtering-helper/filterRowsByQuery.js.map +1 -1
  201. package/dist/esm/plugins/filterable/filtering-helper/strategiesOperators.js.map +1 -1
  202. package/dist/esm/plugins/filterable/helper.js.map +1 -1
  203. package/dist/esm/plugins/filterable/index.js.map +1 -1
  204. package/dist/esm/plugins/filterable/useFilterableState.js.map +1 -1
  205. package/dist/esm/plugins/grouping-by/GroupingByPlugin.js.map +1 -1
  206. package/dist/esm/plugins/grouping-grid/GroupingPlugin.js.map +1 -1
  207. package/dist/esm/plugins/grouping-grid/walkStrategy.js.map +1 -1
  208. package/dist/esm/plugins/index.js.map +1 -1
  209. package/dist/esm/plugins/infinite-scrolling/InfiniteScrollPlugin.js.map +1 -1
  210. package/dist/esm/plugins/infinite-scrolling/index.js.map +1 -1
  211. package/dist/esm/plugins/pagination/PaginationPlugin.js.map +1 -1
  212. package/dist/esm/plugins/pagination/components/Pagination.js.map +1 -1
  213. package/dist/esm/plugins/pagination/components/Paginator.js.map +1 -1
  214. package/dist/esm/plugins/pagination/components/PerPageDropdown.js.map +1 -1
  215. package/dist/esm/plugins/pagination/helper.js.map +1 -1
  216. package/dist/esm/plugins/pagination/index.js.map +1 -1
  217. package/dist/esm/plugins/pagination/usePaginationState.js.map +1 -1
  218. package/dist/esm/plugins/resizable/ResizablePlugin.js.map +1 -1
  219. package/dist/esm/plugins/resizable/decorateResizable.js.map +1 -1
  220. package/dist/esm/plugins/resizable/index.js.map +1 -1
  221. package/dist/esm/plugins/resizable/useResizeHandle.js.map +1 -1
  222. package/dist/esm/plugins/resizable/utils.js.map +1 -1
  223. package/dist/esm/plugins/row-dnd/DndRowsPlugin.js.map +1 -1
  224. package/dist/esm/plugins/row-dnd/index.js.map +1 -1
  225. package/dist/esm/plugins/selectable/SelectablePlugin.js.map +1 -1
  226. package/dist/esm/plugins/selectable/addSelectableColumn.js.map +1 -1
  227. package/dist/esm/plugins/selectable/helper.js.map +1 -1
  228. package/dist/esm/plugins/selectable/index.js.map +1 -1
  229. package/dist/esm/plugins/selectable/selectableFormatter.js.map +1 -1
  230. package/dist/esm/plugins/selectable/useSelectableState.js.map +1 -1
  231. package/dist/esm/plugins/sortable/SortablePlugin.js.map +1 -1
  232. package/dist/esm/plugins/sortable/checkIfSortable.js.map +1 -1
  233. package/dist/esm/plugins/sortable/index.js.map +1 -1
  234. package/dist/esm/plugins/sortable/sortHeaderFormatter.js.map +1 -1
  235. package/dist/esm/plugins/sortable/sortTree.js.map +1 -1
  236. package/dist/esm/plugins/sortable/sorter.js.map +1 -1
  237. package/dist/esm/plugins/sortable/useSortableState.js.map +1 -1
  238. package/dist/esm/plugins/toolbar/RowRenderer.js.map +1 -1
  239. package/dist/esm/plugins/toolbar/ToolbarPlugin.js.map +1 -1
  240. package/dist/esm/plugins/toolbar/ToolbarTrigger.js.map +1 -1
  241. package/dist/esm/plugins/toolbar/index.js.map +1 -1
  242. package/dist/esm/plugins/virtualization/AutoHeightList.js.map +1 -1
  243. package/dist/esm/plugins/virtualization/VirtualizationPlugin.js.map +1 -1
  244. package/dist/esm/plugins/virtualization/VirtualizedBody.js.map +1 -1
  245. package/dist/esm/plugins/virtualization/VirtualizedBodyRow.js.map +1 -1
  246. package/dist/esm/plugins/virtualization/helper.js.map +1 -1
  247. package/dist/esm/plugins/virtualization/index.js.map +1 -1
  248. package/dist/esm/renders/CellWithAddons.js.map +1 -1
  249. package/dist/esm/renders/index.js.map +1 -1
  250. package/dist/esm/renders/styled.js.map +1 -1
  251. package/dist/esm/rowSizes.js.map +1 -1
  252. package/dist/esm/utilities/getPluginsFromProps.js.map +1 -1
  253. package/dist/esm/utilities/getScrollbarSize.js.map +1 -1
  254. package/dist/esm/utilities/normalizeData.js.map +1 -1
  255. package/dist/types/blockNames.d.ts +2 -2
  256. package/dist/types/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.d.ts +1 -0
  257. package/package.json +27 -26
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/column-sizing/columnMeasurerTransformer.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/column-sizing/columnMeasurerTransformer.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAwC;AACxC,0BAA0B;AAEnB,MAAM,4BACX,CAAC,sBACD,CAAC,OAAO,EAAE,QAAQ,KAAK,GAAG,QAAQ,CAAC,MAAM;AACvC,QAAM,EAAE,eAAe,IAAI;AAC3B,QAAM,cAAU,qBAAO;AAEvB,oCAAgB,MAAM;AACpB,UAAM,EAAE,SAAS,yBAAyB,IAAI;AAC9C,UAAM;AAAA,MACJ,OAAO,EAAE,eAAe;AAAA,MACxB;AAAA,IACF,IAAI,KAAK,YAAY;AACrB,QAAI,QAAQ,SAAS;AAKnB,UAAI,OAAO,wBAAwB,CAAC,yBAAyB,OAAO,IAAI,GAAG;AAEzE,cAAM,gBAAgB,QAAQ,QAAQ;AACtC,gBAAQ,QAAQ,MAAM,OAAO;AAC7B,gBAAQ,QAAQ,MAAM,WAAW;AACjC,cAAM,YAAY,QAAQ,QAAQ,cAAc;AAChD,YAAI,gBAAgB,MAAM,WAAW;AACnC,yBAAe,QAAQ,OAAO,IAAI,IAAI;AACtC,kBAAQ,OAAO,IAAI,EAAE,WAAW;AAAA,QAClC,OAAO;AACL,kBAAQ,OAAO,IAAI,EAAE,WAAW;AAAA,QAClC;AACA,iCAAyB,OAAO,IAAI,IAAI;AACxC,gBAAQ,QAAQ,MAAM,WAAW;AACjC,gBAAQ,QAAQ,MAAM,OAAO;AAC7B,eAAO,OAAO,QAAQ;AAAA,MACxB;AAAA,IACF;AAAA,EACF,CAAC;AAED,SAAO;AAAA,IACL,GAAG;AAAA,IACH,cAAU,+BAAU,SAAS,MAAM,UAAU,eAAe,MAAM,CAAC;AAAA,EACrE;AACF;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../../src/plugins/column-sizing/ext-points/decorateColumn.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../../src/plugins/column-sizing/ext-points/decorateColumn.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import { get, set } from '@elliemae/ds-utilities';\nimport { columnMeasurerTransformer } from '../columnMeasurerTransformer.js';\n\nexport function decorateColumn(column, grid, index) {\n const transformsPath = ['header', 'transforms'];\n const transforms = get(column, transformsPath, []);\n transforms.push(columnMeasurerTransformer(grid.columnSizeService, grid));\n column.index = index;\n set(column, transformsPath, transforms);\n\n return column;\n}\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAAyB;AACzB,uCAA0C;AAEnC,SAAS,eAAe,QAAQ,MAAM,OAAO;AAClD,QAAM,iBAAiB,CAAC,UAAU,YAAY;AAC9C,QAAM,iBAAa,yBAAI,QAAQ,gBAAgB,CAAC,CAAC;AACjD,aAAW,SAAK,4DAA0B,KAAK,mBAAmB,IAAI,CAAC;AACvE,SAAO,QAAQ;AACf,+BAAI,QAAQ,gBAAgB,UAAU;AAEtC,SAAO;AACT;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../../src/plugins/column-sizing/ext-points/getTableProps.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../../src/plugins/column-sizing/ext-points/getTableProps.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import { useEffect, useState } from 'react';\nimport { useResizeObserver, mergeRefs } from '@elliemae/ds-utilities';\nimport { getScrollbarSizeFromHeaderAndBody } from '../utils.js';\n\nexport function getTableProps(\n tableProps,\n { refs, tableRef, bodyWidth, scrollbarWidth, isDragging, columnSizeService, updateRowWidth, columns },\n) {\n const [tableNode, tableRefCallback] = useState();\n\n useResizeObserver(({ width }) => {\n if (!refs.header.current) return;\n if (typeof scrollbarWidth.current !== 'number')\n scrollbarWidth.current = getScrollbarSizeFromHeaderAndBody(refs, width);\n if (typeof bodyWidth.current !== 'number') bodyWidth.current = refs.body.offsetWidth;\n // DataGrid: header with width 0 after redirect from details page (https://jira.elliemae.io/browse/PUI-2162)\n // if (scrollbarWidth.current !== 0 && width - scrollbarWidth.current > 0) {\n // refs.header.current.style.width = `${width - scrollbarWidth.current}px`\n // }\n\n if (isDragging.current) return;\n columnSizeService.updateMissingWidths(width);\n updateRowWidth(width);\n }, tableNode);\n\n useEffect(() => {\n if (tableNode) {\n columnSizeService.updateMissingWidths(tableNode.clientWidth);\n updateRowWidth(tableNode.clientWidth);\n }\n if (typeof bodyWidth.current !== 'number') bodyWidth.current = refs.body.clientWidth;\n }, [columns, tableNode]);\n\n return {\n ...tableProps,\n innerRef: mergeRefs(tableRefCallback, tableProps.innerRef, tableRef),\n };\n}\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAoC;AACpC,0BAA6C;AAC7C,mBAAkD;AAE3C,SAAS,cACd,YACA,EAAE,MAAM,UAAU,WAAW,gBAAgB,YAAY,mBAAmB,gBAAgB,QAAQ,GACpG;AACA,QAAM,CAAC,WAAW,gBAAgB,QAAI,uBAAS;AAE/C,6CAAkB,CAAC,EAAE,MAAM,MAAM;AAC/B,QAAI,CAAC,KAAK,OAAO;AAAS;AAC1B,QAAI,OAAO,eAAe,YAAY;AACpC,qBAAe,cAAU,gDAAkC,MAAM,KAAK;AACxE,QAAI,OAAO,UAAU,YAAY;AAAU,gBAAU,UAAU,KAAK,KAAK;AAMzE,QAAI,WAAW;AAAS;AACxB,sBAAkB,oBAAoB,KAAK;AAC3C,mBAAe,KAAK;AAAA,EACtB,GAAG,SAAS;AAEZ,8BAAU,MAAM;AACd,QAAI,WAAW;AACb,wBAAkB,oBAAoB,UAAU,WAAW;AAC3D,qBAAe,UAAU,WAAW;AAAA,IACtC;AACA,QAAI,OAAO,UAAU,YAAY;AAAU,gBAAU,UAAU,KAAK,KAAK;AAAA,EAC3E,GAAG,CAAC,SAAS,SAAS,CAAC;AAEvB,SAAO;AAAA,IACL,GAAG;AAAA,IACH,cAAU,+BAAU,kBAAkB,WAAW,UAAU,QAAQ;AAAA,EACrE;AACF;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/column-sizing/getColumnNameFromProperty.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/column-sizing/getColumnNameFromProperty.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["export const getColumnNameFromProperty = (property) => property && property.replace(/\\./g, '-');\n\nexport default getColumnNameFromProperty;\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,4BAA4B,CAAC,aAAa,YAAY,SAAS,QAAQ,OAAO,GAAG;AAE9F,IAAO,oCAAQ;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/column-sizing/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/column-sizing/index.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["export { ColumnSizingPlugin } from './ColumnSizingPlugin.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,gCAAmC;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/column-sizing/useColumnSizeService.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/column-sizing/useColumnSizeService.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* 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 expandableGridD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gBAAgB;AAC7C,YAAI,cAAc,OAAO,kBAAkB;AACzC,mCAAyB,GAAG;AAAA,QAC9B;AAAA,MACF,OAAO;AAEL,cAAM,kBACH,aAAa,IAAI,iBAAiB,OAAO,cAAc,aAAa,SAAS;AAChF,cAAM,eAAgB,iBAAiB,YAAa;AACpD,cAAM,MAAO,YAAY,eAAgB;AACzC,cAAM,6BAAyB,iCAAmB,KAAK,gBAAgB,MAAM;AAC7E,eAAO;AAAA,UACL,GAAG;AAAA,UACH,OAAO,YAAY,iBAAiB,GAAG,OAAO,YAAY,qBAAqB,GAAG;AAAA,QACpF;AACA,uBAAe,QAAQ,OAAO,IAAI,IAAI;AACtC,gBAAQ,QAAQ,OAAO,IAAI,EAAE,gBAAgB;AAAA,MAC/C;AACA,qBAAe,OAAO,IAAI,IAAI;AAAA,IAChC,CAAC;AACD,YAAQ,UAAU;AAAA,EACpB;AAEA,oCAAgB,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": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/column-sizing/useStylesheetHelpers.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/column-sizing/useStylesheetHelpers.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* 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", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,iBAA4B;AAC5B,mBAAoC;AACpC,0BAAoB;AACpB,uCAA0C;AAC1C,8BAAkC;AAElC,MAAM,sBAAkB,2CAAkB;AAEnC,MAAM,sBAAsB,CAAC,EAAE,MAAM,UAAU,MAAM;AAC1D,QAAM,EAAE,YAAY,kBAAkB,IAAI,WAAW,OAAO;AAC5D,QAAM,SAAS,CAAC,UAAU;AACxB,UAAM,SAAS,OAAO,UAAU,WAAW,QAAQ,GAAG;AACtD,eAAW;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,MACA,QAAQ,EAAE,OAAO,QAAQ,UAAU,QAAQ,UAAU,OAAO,IAAI,EAAE,OAAO,MAAM,UAAU,MAAM,UAAU,KAAK;AAAA,IAChH;AACA,UAAM,EAAE,UAAU,IAAI,KAAK,SAAS;AACpC,UAAM,cAAc,GAAG,SAAS,YAAY,kBAAkB;AAC9D,eAAW;AAAA,MACT;AAAA,MACA;AAAA,MACA,GAAG;AAAA,MACH,QACI,EAAE,OAAO,aAAa,UAAU,aAAa,UAAU,YAAY,IACnE,EAAE,OAAO,MAAM,UAAU,MAAM,UAAU,KAAK;AAAA,IACpD;AAAA,EACF;AACA,QAAM,SAAS,MAAM,kBAAkB,OAAO;AAC9C,QAAM,kBAAkB,MAAM;AAC9B,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEA,MAAM,qBAAqB,CAAC,EAAE,UAAU,QAAQ,WAAW,OAAO,MAAM,MACtE,UAAU,YAAY,MAAM,MAAM,IAAI,WAAW,YAAY;AAE/D,SAAS,SAAS,EAAE,YAAY,WAAW,OA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,OAAO,iBAAiB,KAAK;AAClD,QAAM,CAAC,cAAc,QAAI,uBAAS,MAAM,oBAAoB,EAAE,MAAM,WAAW,aAAa,CAAC,CAAC;AAE9F,SAAO,EAAE,mBAAmB,gBAAgB,aAAa;AAC3D;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/column-sizing/utils.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/column-sizing/utils.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAAoB;AAEb,SAAS,kCAAkC,MAAM;AACtD,QAAM,2BAAuB,yBAAI,MAAM,CAAC,aAAa,WAAW,aAAa,CAAC;AAC9E,QAAM,wBAAoB,yBAAI,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": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/custom-cell-renderer/CustomRendererPlugin.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/custom-cell-renderer/CustomRendererPlugin.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import { createInstancePlugin } from '@elliemae/ds-shared';\nimport { addCustomRendererToCell } from './addCustomRendererToCell.js';\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", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAqC;AACrC,qCAAwC;AAIxC,MAAM,iBAAiB,CAAC,QAAQ,aAAS,wDAAwB,IAAI,EAAE,MAAM;AAEtE,MAAM,2BAAuB,uCAAqB,mBAAmB;AAAA,EAC1E;AACF,CAAC;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/custom-cell-renderer/addCustomRendererToCell.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/custom-cell-renderer/addCustomRendererToCell.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* 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", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,0BAAgC;AAChC,uBAAoC;AACpC,kCAAqC;AAE9B,MAAM,cAAc,CAAC,UAAU,MAAM,WAAW,CAAC,OAAO,aAAa;AAC1E,QAAM;AAAA,IACJ,OAAO,EAAE,gBAAgB,cAAc;AAAA,EACzC,IAAI,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,CAAC;AAAA,MACtB,SAAS;AAAA,QACP,OAAO,MAAM,MAAM,SAAS,CAAC;AAAA;AAAA,QAC7B,UAAU,EAAE,GAAG,UAAU,cAAc;AAAA,QACvC;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AACA,SAAO,SAAS;AAAA,IACd;AAAA,IACA,UAAU,EAAE,GAAG,UAAU,cAAc;AAAA,IACvC;AAAA,EACF,CAAC;AACH;AAEA,MAAM,0BAA0B,CAAC,SAAS,CAAC,WAAW;AACpD,QAAM,EAAE,eAAe,IAAI;AAC3B,QAAM,2BAAuB,yBAAI,QAAQ,CAAC,UAAU,gBAAgB,CAAC;AACrE,MAAI,CAAC,kBAAkB,CAAC;AAAsB,WAAO;AAErD,UAAI,gCAAW,oBAAoB,GAAG;AACpC,WAAO,OAAO,WAAW,KAAK,YAAY,sBAAsB,IAAI,CAAC;AAAA,EACvE;AAEA,UAAI,gCAAW,cAAc,GAAG;AAC9B,iBAAS,sCAAoB,YAAY,gBAAgB,MAAM,MAAM,GAAG,MAAM;AAAA,EAChF,OAAO;AACL,QAAI,CAAC;AAAgB,aAAO;AAC5B,WAAO,KAAK,WAAW,KAAK,CAAC,OAAO,mBAAe,kDAAqB,MAAM,gBAAgB,UAAU,CAAC;AAAA,EAC3G;AAEA,SAAO;AACT;AAGA,IAAO,kCAAQ;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/custom-cell-renderer/getRendererComponent.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/custom-cell-renderer/getRendererComponent.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADyBd;AAxBT,uBAAyB;AACzB,qBAAqE;AACrE,6BAA+B;AAC/B,gBAA2B;AAE3B,MAAM,aAAa;AAAA,EACjB,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,WAAW;AAAA,EACX,UAAU;AAAA,EACV,gBAAgB;AAClB;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,4CAAC,aAAW,GAAG,SAAU,GAAG,gBAAiB,GAAG,MAAM;AAC/D;AAGA,IAAO,+BAAQ;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/custom-cell-renderer/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/custom-cell-renderer/index.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["export { CustomRendererPlugin } from './CustomRendererPlugin.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,kCAAqC;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../../src/plugins/editable/EditableComponents/ComboBox.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../../src/plugins/editable/EditableComponents/ComboBox.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgCjB;AAhCN,mBAAiC;AACjC,qBAA2B;AAE3B,MAAM,iBAAiB,uBAAU;AAAA,EAK/B,YAAY,OAAO;AACjB,UAAM,KAAK;AAIb,wBAAe,CAAC,UAAU;AACxB,YAAM,EAAE,QAAQ,IAAI,KAAK;AAKzB,iBAAW,MAAM,QAAQ,KAAK,GAAG,CAAC;AAClC,WAAK,SAAS,EAAE,MAAM,CAAC;AAAA,IACzB;AAEA,sBAAa,MAAM;AACjB,YAAM,EAAE,QAAQ,IAAI,KAAK;AACzB,YAAM,EAAE,MAAM,IAAI,KAAK;AACvB,cAAQ,KAAK;AAAA,IACf;AAjBE,SAAK,QAAQ,EAAE,OAAO,MAAM,MAAM;AAAA,EACpC;AAAA,EAkBA,SAAS;AACP,UAAM,EAAE,MAAM,IAAI,KAAK;AACvB,WACE;AAAA,MAAC;AAAA;AAAA,QACE,GAAG,KAAK;AAAA,QACT,YAAU;AAAA,QACV,QAAQ,KAAK;AAAA,QACb,UAAU,KAAK;AAAA,QACf,SAAS,CAAC,MAAM,EAAE,gBAAgB;AAAA,QAClC;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAvCM,SACG,eAAe;AAAA,EACpB,SAAS,MAAM;AACjB;AAuCF,IAAO,mBAAQ;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../../src/plugins/editable/EditableComponents/TextBox.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../../src/plugins/editable/EditableComponents/TextBox.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* 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", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;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,KAAK;AAAA,QAChB;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AA7DM,QACG,eAAe;AAAA,EACpB,SAAS,MAAM;AACjB;AA6DF,IAAO,kBAAQ;",
6
6
  "names": ["React"]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../../src/plugins/editable/EditableComponents/index.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../../src/plugins/editable/EditableComponents/index.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["export { default as ComboBox } from './ComboBox.js';\nexport { default as TextBox } from './TextBox.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,sBAAoC;AACpC,qBAAmC;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/editable/EditablePlugin.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/editable/EditablePlugin.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAAyD;AACzD,uBAAqC;AACrC,8BAAsD;AAEtD,MAAM,oBAAoB,CAAC,SAAS;AAClC,QAAM,EAAE,SAAS,MAAM,aAAa,iBAAiB,mBAAmB,gBAAgB,IAAI,KAAK;AACjG,QAAM,CAAC,aAAa,cAAc,QAAI,8CAAyB,mBAAmB,CAAC,CAAC;AAEpF,QAAM,eAAe,CAAC,eAAe;AACnC,UAAM,EAAE,cAAc,IAAI,KAAK,YAAY;AAC3C,UAAM,EAAE,SAAS,YAAY,IAAI;AACjC,kBAAc,UAAU,EAAE,QAAQ,MAAM,OAAO,MAAM;AACrD,mBAAe,CAAC,oBAAoB;AAClC,sBAAgB,UAA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ACT;AAAA,IACF;AAAA,EACF;AACF,CAAC;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/editable/decorateEditable.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/editable/decorateEditable.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
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I,EAAE,YAAY,IAAI;AACpB,mBAAK,YAAY,EAAE,QAAQ,aAAa,WAAW;AAAA,YACrD;AAAA,UACF;AAAA,UACA,MAAK;AAAA,UACL,UAAU;AAAA,UAET;AAAA;AAAA,YACD,4CAAC,8BAAW,WAAU,eAAc;AAAA,YACpC,4CAAC,UAAK,WAAU,kBAAiB,eAAC;AAAA;AAAA;AAAA,MACpC,GACF;AAAA,IAEJ;AAAA,IACA;AAAA,EACF;AACF;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/editable/getEditorComponent.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/editable/getEditorComponent.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable react/display-name */\nimport React from 'react';\nimport { ComboBox, TextBox } from './EditableComponents/index.js';\n\nconst components = {\n DSComboBox: ComboBox,\n DSTextBox: TextBox,\n};\n\nconst getEditorComponent =\n (editorComponent = {}, handlers) =>\n ({ value, onValue, extraParameters }) => {\n if (typeof editorComponent === 'function') {\n return editorComponent({\n value,\n onValue,\n customHandlers: handlers,\n ...extraParameters,\n });\n }\n\n const { type = 'DSTextBox', ...restEditorProps } = editorComponent;\n const Component = components[type];\n\n if (type === 'DSComboBox') {\n // TODO: remove this whole condition when combobox v3 is out and fully working without \"maxOptions\" parameter\n const maxOptions = restEditorProps?.options?.length || 100;\n return (\n <div style={{ zIndex: 0 }}>\n <Component autoFocus onValue={onValue} value={value} maxOptions={maxOptions} {...restEditorProps} />\n </div>\n );\n }\n\n return <Component autoFocus onValue={onValue} value={value} {...restEditorProps} />;\n };\n\nexport { getEditorComponent };\nexport default getEditorComponent;\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD6BX;AA3BZ,gCAAkC;AAElC,MAAM,aAAa;AAAA,EACjB,YAAY;AAAA,EACZ,WAAW;AACb;AAEA,MAAM,qBACJ,CAAC,kBAAkB,CAAC,GAAG,aACrB,CAAC,EAAE,OAAO,SAAS,gBAAgB,MAAM;AACvC,MAAI,OAAO,oBAAoB,YAAY;AACzC,WAAO,gBAAgB;AAAA,MACrB;AAAA,MACA;AAAA,MACA,gBAAgB;AAAA,MAChB,GAAG;AAAA,IACL,CAAC;AAAA,EACH;AAEA,QAAM,EAAE,OAAO,aAAa,GAAG,gBAAgB,IAAI;AACnD,QAAM,YAAY,WAAW,IAAI;AAEjC,MAAI,SAAS,cAAc;AAEzB,UAAM,aAAa,iBAAiB,SAAS,UAAU;AACvD,WACE,4CAAC,SAAI,OAAO,EAAE,QAAQ,EAAE,GACtB,sDAAC,aAAU,WAAS,MAAC,SAAkB,OAAc,YAAyB,GAAG,iBAAiB,GACpG;AAAA,EAEJ;AAEA,SAAO,4CAAC,aAAU,WAAS,MAAC,SAAkB,OAAe,GAAG,iBAAiB;AACnF;AAGJ,IAAO,6BAAQ;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/editable/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/editable/index.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["export { EditablePlugin } from './EditablePlugin.js';\nexport { ComboBox, TextBox } from './EditableComponents/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,4BAA+B;AAC/B,gCAAkC;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/expandable-grid/ExpandableColumn.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/expandable-grid/ExpandableColumn.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable react/display-name */\nimport React, { useRef } from 'react';\nimport { ArrowheadDown, ArrowheadRight } from '@elliemae/ds-icons';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { DSButton } from '@elliemae/ds-button';\nimport { DSTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { dataGridBlockName } from '../../blockNames.js';\nimport { RowSizes } from '../../rowSizes.js';\n\nconst blockName = `${dataGridBlockName}-expandable-column`;\n\n// todo: clean this when we move to css-js\nconst ExpandableColumnWrapper = aggregatedClasses('div')(blockName);\nconst LabelDescriptionWrapper = aggregatedClasses('div')(blockName, 'label-description-wrapper');\nconst Label = aggregatedClasses('span')(blockName, 'label');\nconst Description = aggregatedClasses('span')(blockName, 'description');\nconst ExtraColumnData = aggregatedClasses('div')(blockName, 'extra-column-data');\nconst ExpandableMasterWrapper = aggregatedClasses('div')(`${blockName}-master-wrapper`);\nconst ExpandableDetailsWrapper = aggregatedClasses('div')(`${blockName}-details-wrapper`);\n\nconst ExpandableColumnCell = ({ label, description, isExpanded, expandableDetails, extraData, onToggleExpand }) => {\n const ref = useRef();\n return (\n <ExpandableColumnWrapper ref={ref} tabindex={0}>\n <ExpandableMasterWrapper style={{ height: RowSizes.extend }}>\n <DSButton\n buttonType=\"text\"\n className=\"expandable-arrow\"\n icon={isExpanded ? <ArrowheadDown /> : <ArrowheadRight />}\n onClick={(e) => {\n onToggleExpand(e);\n if (ref && ref.current) {\n ref.current.focus();\n }\n }}\n size=\"s\"\n />\n <LabelDescriptionWrapper>\n <Label>\n <DSTruncatedTooltipText value={label} />\n </Label>\n <Description>\n <DSTruncatedTooltipText value={description} />\n </Description>\n </LabelDescriptionWrapper>\n <ExtraColumnData>{extraData}</ExtraColumnData>\n </ExpandableMasterWrapper>\n {isExpanded && <ExpandableDetailsWrapper>{expandableDetails}</ExpandableDetailsWrapper>}\n </ExpandableColumnWrapper>\n );\n};\n\nconst expandableColumnRenderer =\n ({ renderRowLabel, renderRowDescription, renderExtraData }) =>\n (value, { rowData, isExpanded }, grid) => {\n const {\n props: { renderExpandedDetails },\n actions: { toggleExpand },\n } = grid.getInstance();\n\n const expandableDetails = renderExpandedDetails({ rowData });\n return (\n <ExpandableColumnCell\n description={renderRowDescription({ rowData })}\n expandableDetails={expandableDetails}\n extraData={renderExtraData({ rowData })}\n isExpanded={isExpanded}\n label={renderRowLabel({ rowData })}\n onToggleExpand={() => toggleExpand(rowData)}\n />\n );\n };\nconst noop = () => null;\nexport const ExpandableColumn = ({\n property,\n label,\n renderRowLabel = () => '----',\n renderRowDescription = noop,\n renderExtraData = noop,\n width,\n resizable,\n sortable,\n searchable,\n customRenderer,\n ...rest\n}) => ({\n ...rest,\n label,\n property,\n cell: {\n formatters: [\n expandableColumnRenderer({\n renderRowLabel,\n renderRowDescription,\n renderExtraData,\n }),\n ],\n },\n width: width || '50%',\n expandableColumn: true,\n resizable,\n sortable,\n searchable,\n});\n\nexport default ExpandableColumn;\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD4BM;AA3B7B,mBAA8B;AAC9B,sBAA8C;AAC9C,2BAAkC;AAClC,uBAAyB;AACzB,uCAAuC;AACvC,wBAAkC;AAClC,sBAAyB;AAEzB,MAAM,YAAY,GAAG;AAGrB,MAAM,8BAA0B,wCAAkB,KAAK,EAAE,SAAS;AAClE,MAAM,8BAA0B,wCAAkB,KAAK,EAAE,WAAW,2BAA2B;AAC/F,MAAM,YAAQ,wCAAkB,MAAM,EAAE,WAAW,OAAO;AAC1D,MAAM,kBAAc,wCAAkB,MAAM,EAAE,WAAW,aAAa;AACtE,MAAM,sBAAkB,wCAAkB,KAAK,EAAE,WAAW,mBAAmB;AAC/E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AAC;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": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/expandable-grid/ExpandablePlugin.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/expandable-grid/ExpandablePlugin.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable max-lines */\nimport React, { useEffect, useMemo, useRef } from 'react';\nimport { cx, isFunction } from '@elliemae/ds-utilities';\nimport { VariableSizeList } from 'react-window';\nimport { ArrowheadDown, ArrowheadRight } from '@elliemae/ds-icons';\nimport { DSButton } from '@elliemae/ds-button';\nimport { createInstancePlugin, appendCellFormatter } from '@elliemae/ds-shared';\nimport { ExpandedRow } from './ExpandedRow.js';\nimport { ExpandedRowExtra } from './ExpandedRowExtra.js';\nimport { RowSizes } from '../../rowSizes.js';\nimport { useExpandGridState } from './useExpandGridState.js';\n\nconst getExpandedRowSizeBySubrows = ({ totalAmount, amountVisible, isShowingAll, size = 36 }) =>\n isShowingAll ? size * (totalAmount + 1) - 6 : size * (amountVisible + 1) + 32;\n\nconst ExpandedRows = {\n SingleColumn: ExpandedRow,\n Master: ExpandedRowExtra,\n};\n\nconst createExpandedRow = (type) => ExpandedRows[type] || ExpandedRows.Master;\n\nconst isExpandableSingleColumn = (columns) => columns.some((column) => column.expandableColumn);\n\nexport const ExpandablePlugin = createInstancePlugin('expandable', {\n registerStateHook: useExpandGridState,\n decorateGrid(grid) {\n const { decoratedColumns, columns } = grid.getInstance();\n const detailColumns = useMemo(\n () =>\n decoratedColumns\n .map((column) => ({\n ...column,\n customRenderer: column.detailCustomRenderer,\n }))\n .filter((col) => !col.expandableColumn),\n [columns],\n );\n return {\n detailColumns,\n };\n },\n\n decorateColumns(columns, grid) {\n if (isExpandableSingleColumn(columns)) return columns;\n // get first column from user\n const firstColumnIndex = columns.findIndex((column) => column.isUserColumn);\n const firstColumn = columns[firstColumnIndex];\n firstColumn.formatExpandable = true;\n\n return [\n ...columns.slice(0, firstColumnIndex),\n appendCellFormatter((value, { isExpanded, rowData }) => {\n const {\n actions: { toggleExpand },\n } = grid.getInstance();\n /*\n * should return only 2 elements ../custom-cell-renderer/addCustomRendererToCell.js\n * getRenderer it's checking that length to apply the custom render to value only\n */\n return (\n <>\n <DSButton\n buttonType=\"text\"\n className=\"expandable-arrow\"\n icon={isExpanded ? <ArrowheadDown /> : <ArrowheadRight />}\n onClick={(e) => {\n e.stopPropagation();\n toggleExpand(rowData);\n }}\n size=\"s\"\n />\n {value}\n </>\n );\n }, firstColumn),\n ...columns.slice(firstColumnIndex + 1),\n ];\n },\n\n getBodyProps(bodyProps, grid) {\n const {\n composedRows: rows,\n props: {\n rowKey,\n getChildrenRows,\n rowSize = 'normal',\n subrowSize = 'normal',\n getExpandedRowMinSize,\n getExpandedRowSize,\n expandableSubrowsVisible,\n },\n state: { expandedRows },\n } = grid.getInstance();\n const rowSizePx = RowSizes[rowSize];\n const subrowSizePx = RowSizes[subrowSize];\n const listRef = useRef();\n\n useEffect(() => {\n if (listRef.current) listRef.current.resetAfterIndex(0, true);\n });\n\n // implementation of expandable row single column with aggregation\n const getItemSize = (index) => {\n const rowData = rows[index];\n const key = rowData[rowKey];\n const children = getChildrenRows({ rowData });\n\n const expandedSize = getExpandedRowSize\n ? getExpandedRowSize(index, { rowData }) // https://jira.elliemae.io/browse/PUI-1659\n : getExpandedRowSizeBySubrows({\n totalAmount: children.length,\n amountVisible: children.length > expandableSubrowsVisible ? expandableSubrowsVisible : children.length,\n isShowingAll:\n children.length < expandableSubrowsVisible || (expandedRows[key] && expandedRows[key].showAllRows),\n size: subrowSizePx,\n });\n\n const expandedMinSize = isFunction(getExpandedRowMinSize) && getExpandedRowMinSize(index);\n\n // eslint-disable-next-line no-nested-ternary\n return expandedRows[key] ? (expandedMinSize > expandedSize ? expandedMinSize : expandedSize) : rowSizePx;\n };\n\n return {\n ...bodyProps,\n className: cx(bodyProps.className, 'expandable'),\n listComponent: VariableSizeList,\n listProps: { ref: listRef, itemSize: getItemSize },\n };\n },\n\n decorateRenderers(renderers, grid) {\n const Row = renderers.body.row;\n const Cell = renderers.body.cell;\n\n // eslint-disable-next-line react/display-name\n renderers.body.row = useMemo(() => {\n // todo: the expandable grid should be created from another specific grid component\n const expandedRowType = isExpandableSingleColumn(grid.decoratedColumns) ? 'SingleColumn' : 'Master';\n const ExpandedRowComponent = createExpandedRow(expandedRowType);\n // eslint-disable-next-line react/display-name\n return function ({ isExpanded, ...rowProps }) {\n if (isExpanded) {\n const {\n props: { detailColumns, getChildrenRows, renderRowDetails },\n composedRows,\n } = grid.getInstance();\n // https://jira.elliemae.io/browse/PUI-1667\n const rowData = composedRows[rowProps.index] ? composedRows[rowProps.index] : rowProps.rowData;\n return (\n <ExpandedRowComponent\n cellComponent={Cell}\n detailColumns={detailColumns}\n parentGrid={grid}\n renderRowDetails={renderRowDetails}\n rowComponent={Row}\n rowData={rowData}\n rowProps={{\n rowData,\n isExpanded,\n ...rowProps,\n }}\n rows={getChildrenRows({ rowData })}\n >\n {rowProps.children}\n </ExpandedRowComponent>\n );\n }\n return <Row {...rowProps} />;\n };\n }, []);\n\n return renderers;\n },\n\n getRowProps(rowProps, grid, { rowData }) {\n const {\n props: { rowKey },\n state: { expandedRows },\n } = grid.getInstance();\n const key = rowData[rowKey];\n const isExpanded = !!expandedRows[key];\n return {\n ...rowProps,\n className: cx(\n rowProps.className,\n Object.keys(expandedRows).length > 0 && 'expandable-row',\n isExpanded && 'expanded',\n ),\n isExpanded,\n showAllRows: expandedRows[key] && expandedRows[key].showAllRows,\n };\n },\n});\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD6Db;AA5DV,mBAAkD;AAClD,0BAA+B;AAC/B,0BAAiC;AACjC,sBAA8C;AAC9C,uBAAyB;AACzB,uBAA0D;AAC1D,yBAA4B;AAC5B,8BAAiC;AACjC,sBAAyB;AACzB,gCAAmC;AAEnC,MAAM,8BAA8B,CAAC,EAAE,aAAa,eAAe,cAAc,OAAO,GAAG,MACzF,eAAe,QAAQ,cAAc,KAAK,IAAI,QAAQ,gBAAgB,KAAK;AAE7E,MAAM,eAAe;AAAA,EACnB,cAAc;AAAA,EACd,QAAQ;AACV;AAEA,MAAM,oBAAoB,CAAC,SAAS,aAAa,IAAI,KAAK,aAAa;AAEvE,MAAM,2BAA2B,CAAC,YAAY,QAAQ,KAAK,CAAC,WAAW,OAAO,gBAAgB;AAEvF,MAAM,uBAAmB,uCAAqB,cAAc;AAAA,EACjE,mBAAmB;AAAA,EACnB,aAAa,MAAM;AACjB,UAAM,EAAE,kBAAkB,QAAQ,IAAI,KAAK,YAAY;AACvD,UAAM,oBAAgB;AAAA,MACpB,MACE,iBACG,IAAI,CAAC,YAAY;AAAA,QAChB,GAAG;AAAA,QACH,gBAAgB,OAAO;AAAA,MACzB,EAAE,E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AAA,YAAC;AAAA;AAAA,cACC,eAAe;AAAA,cACf;AAAA,cACA,YAAY;AAAA,cACZ;AAAA,cACA,cAAc;AAAA,cACd;AAAA,cACA,UAAU;AAAA,gBACR;AAAA,gBACA;AAAA,gBACA,GAAG;AAAA,cACL;AAAA,cACA,MAAM,gBAAgB,EAAE,QAAQ,CAAC;AAAA,cAEhC,mBAAS;AAAA;AAAA,UACZ;AAAA,QAEJ;AACA,eAAO,4CAAC,OAAK,GAAG,UAAU;AAAA,MAC5B;AAAA,IACF,GAAG,CAAC,CAAC;AAEL,WAAO;AAAA,EACT;AAAA,EAEA,YAAY,UAAU,MAAM,EAAE,QAAQ,GAAG;AACvC,UAAM;AAAA,MACJ,OAAO,EAAE,OAAO;AAAA,MAChB,OAAO,EAAE,aAAa;AAAA,IACxB,IAAI,KAAK,YAAY;AACrB,UAAM,MAAM,QAAQ,MAAM;AAC1B,UAAM,aAAa,CAAC,CAAC,aAAa,GAAG;AACrC,WAAO;AAAA,MACL,GAAG;AAAA,MACH,eAAW;AAAA,QACT,SAAS;AAAA,QACT,OAAO,KAAK,YAAY,EAAE,SAAS,KAAK;AAAA,QACxC,cAAc;AAAA,MAChB;AAAA,MACA;AAAA,MACA,aAAa,aAAa,GAAG,KAAK,aAAa,GAAG,EAAE;AAAA,IACtD;AAAA,EACF;AACF,CAAC;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/expandable-grid/ExpandedRow.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/expandable-grid/ExpandedRow.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable react/prop-types */\n/* eslint-disable max-lines */\nimport React from 'react';\nimport { DSSeparator } from '@elliemae/ds-separator';\nimport { DSButton } from '@elliemae/ds-button';\nimport { styled } from '@elliemae/ds-system';\nimport { get } from '@elliemae/ds-utilities';\nimport { deferComponentRender, useDataGrid } from '@elliemae/ds-shared';\nimport { PaginationPlugin } from '../pagination/index.js';\nimport { BodyCell } from '../../components/BodyCell.js';\nimport { defaultRenderers } from '../../components/renderers/index.js';\nimport { TableBody } from '../../components/TableBody.js';\nimport { Table } from '../../components/Table.js';\nimport { ColumnSizingPlugin } from '../column-sizing/index.js';\n\nconst DetailGrid = deferComponentRender(({ parentGrid, parentRowData, rows }) => {\n const { instanceRef, ...parentProps } = parentGrid.props;\n const grid = useDataGrid({\n uuid: parentGrid.getInstance().uuid,\n ...parentProps,\n columns: parentGrid\n .getInstance()\n .decoratedColumns.filter((col) => !col.expandableColumn)\n .map((c) => ({ ...c, expandableColumn: false })),\n rows,\n plugins: [ColumnSizingPlugin, PaginationPlugin],\n renderers: defaultRenderers,\n bindColumnsSizeTo: parentGrid.uuid,\n numRowsVisible: 'all',\n paginated: true,\n pagination: {\n perPage: rows.length,\n conditionalPagination: true,\n },\n parentRowData,\n });\n\n return (\n <Table {...grid}>\n <TableBody />\n </Table>\n );\n}, null);\n\nconst DetailsWrapper = styled.span`\n flex: 1;\n width: ${(props) => props.width}px;\n`;\n\nconst DetailGridWrapper = styled.div`\n display: flex;\n height: calc(100% - ${(props) => (props.allRowsVisible ? 18 : 60)}px);\n width: ${(props) => props.expandableGridDetailWidth}px;\n margin: 12px 0;\n`;\n\nconst ExpandedRow = ({\n parentGrid,\n detailColumns,\n rowData,\n rows,\n rowProps,\n cellComponent: CellComponent,\n rowComponent: RowComponent,\n}) => {\n const {\n decoratedColumns,\n actions: { toggleShowAllRows },\n state: { expandedRows },\n props: {\n rowKey,\n showMoreRowsText = 'SHOW ALL ROWS',\n showLessRowsText = 'SHOW LESS ROWS',\n expandableSubrowsVisible,\n },\n columnSizeService: { expandableGridDetailWidth },\n } = parentGrid.getInstance();\n\n const { showAllRows, ...restRowProps } = rowProps;\n return (\n <RowComponent {...restRowProps}>\n <BodyCell\n column={decoratedColumns[0]}\n columnIndex={0}\n component={CellComponent}\n grid={parentGrid}\n rowProps={{ rowData, ...rowProps }}\n />\n <DetailsWrapper width={expandableGridDetailWidth}>\n <DetailGridWrapper\n allRowsVisible={rows.length < expandableSubrowsVisible || get(expandedRows, [rowKey, 'showAllRows'])}\n expandableGridDetailWidth={expandableGridDetailWidth}\n >\n <DSSeparator dashed orientation=\"vertical\" />\n <DetailGrid\n detailColumns={detailColumns}\n parentGrid={parentGrid.getInstance()}\n parentRowData={rowData}\n rows={showAllRows ? rows : (rows || []).slice(0, expandableSubrowsVisible)}\n />\n </DetailGridWrapper>\n {rows.length > expandableSubrowsVisible && (\n <DSButton\n buttonType=\"text\"\n labelText={showAllRows ? showLessRowsText : showMoreRowsText}\n onClick={(e) => {\n e.stopPropagation();\n toggleShowAllRows(rowData);\n }}\n style={{ marginBottom: '10px' }}\n />\n )}\n </DetailsWrapper>\n </RowComponent>\n );\n};\n\nexport { ExpandedRow };\nexport default ExpandedRow;\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADuCjB;AApCN,0BAA4B;AAC5B,uBAAyB;AACzB,uBAAuB;AACvB,0BAAoB;AACpB,uBAAkD;AAClD,wBAAiC;AACjC,sBAAyB;AACzB,uBAAiC;AACjC,uBAA0B;AAC1B,mBAAsB;AACtB,2BAAmC;AAEnC,MAAM,iBAAa,uCAAqB,CAAC,EAAE,YAAY,eAAe,KAAK,MAAM;AAC/E,QAAM,EAAE,aAAa,GAAG,YAAY,IAAI,WAAW;AACnD,QAAM,WAAO,8BAAY;AAAA,IACvB,MAAM,WAAW,YAAY,EAAE;AAAA,IAC/B,GAAG;AAAA,IACH,SAAS,WACN,YAAY,EACZ,iBAAiB,OAAO,CAAC,QAAQ,CAAC,IAAI,gBAAgB,EACtD,IAAI,CAAC,OAAO,EAAE,GAAG,GAAG,kBAAkB,MAAM,EAAE;AAAA,IACjD;AAAA,IACA,SAAS,C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A,UACnG;AAAA,UAEA;AAAA,wDAAC,mCAAY,QAAM,MAAC,aAAY,YAAW;AAAA,YAC3C;AAAA,cAAC;AAAA;AAAA,gBACC;AAAA,gBACA,YAAY,WAAW,YAAY;AAAA,gBACnC,eAAe;AAAA,gBACf,MAAM,cAAc,QAAQ,QAAQ,CAAC,GAAG,MAAM,GAAG,wBAAwB;AAAA;AAAA,YAC3E;AAAA;AAAA;AAAA,MACF;AAAA,MACC,KAAK,SAAS,4BACb;AAAA,QAAC;AAAA;AAAA,UACC,YAAW;AAAA,UACX,WAAW,cAAc,mBAAmB;AAAA,UAC5C,SAAS,CAAC,MAAM;AACd,cAAE,gBAAgB;AAClB,8BAAkB,OAAO;AAAA,UAC3B;AAAA,UACA,OAAO,EAAE,cAAc,OAAO;AAAA;AAAA,MAChC;AAAA,OAEJ;AAAA,KACF;AAEJ;AAGA,IAAO,sBAAQ;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/expandable-grid/ExpandedRowExtra.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/expandable-grid/ExpandedRowExtra.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import React from 'react';\nimport { cx } from '@elliemae/ds-utilities';\nimport { DSSeparator } from '@elliemae/ds-separator';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { dataGridBlockName } from '../../blockNames.js';\n\nconst blockName = `${dataGridBlockName}-expanded-row`;\n\nconst DetailsWrapper = aggregatedClasses('div')(`${blockName}-details-wrapper`, null, () => ({\n 'ie-flex-basis-auto': true,\n}));\n\nconst ExpandedRowExtra = ({\n children,\n rowData,\n rowProps,\n rowComponent: RowComponent,\n renderRowDetails = () => null,\n}) => (\n <RowComponent {...rowProps} className={cx(rowProps.className, 'expanded-detail-row')}>\n <RowComponent className=\"master-row-expanded\">{children}</RowComponent>\n <DSSeparator dashed margin=\"xs\" />\n <DetailsWrapper>{renderRowDetails({ rowData })}</DetailsWrapper>\n </RowComponent>\n);\n\nexport { ExpandedRowExtra };\nexport default ExpandedRowExtra;\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADmBrB;AAlBF,0BAAmB;AACnB,0BAA4B;AAC5B,2BAAkC;AAClC,wBAAkC;AAElC,MAAM,YAAY,GAAG;AAErB,MAAM,qBAAiB,wCAAkB,KAAK,EAAE,GAAG,6BAA6B,MAAM,OAAO;AAAA,EAC3F,sBAAsB;AACxB,EAAE;AAEF,MAAM,mBAAmB,CAAC;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd,mBAAmB,MAAM;AAC3B,MACE,6CAAC,gBAAc,GAAG,UAAU,eAAW,wBAAG,SAAS,WAAW,qBAAqB,GACjF;AAAA,8CAAC,gBAAa,WAAU,uBAAuB,UAAS;AAAA,EACxD,4CAAC,mCAAY,QAAM,MAAC,QAAO,MAAK;AAAA,EAChC,4CAAC,kBAAgB,2BAAiB,EAAE,QAAQ,CAAC,GAAE;AAAA,GACjD;AAIF,IAAO,2BAAQ;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/expandable-grid/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/expandable-grid/index.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["export { ExpandablePlugin } from './ExpandablePlugin.js';\nexport { ExpandableColumn } from './ExpandableColumn.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAAiC;AACjC,8BAAiC;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/expandable-grid/useExpandGridState.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/expandable-grid/useExpandGridState.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import { isFunction, useExpandState } from '@elliemae/ds-utilities';\nimport { useState } from 'react';\n\nexport const useExpandGridState = (grid) => {\n const {\n composedRows,\n props: {\n expandedRows: expandedRowsProp = {},\n rowKey = 'id',\n onExpandRow,\n onToggleShowAllRows,\n onExpandChange,\n onExpandAll,\n onToggleExpand,\n onCollapseRow,\n },\n } = grid;\n\n const { state, actions } = useExpandState({\n items: composedRows,\n itemKey: rowKey,\n expanded: expandedRowsProp,\n onExpand: onExpandRow,\n onExpandChange,\n onExpandAll,\n onToggleExpand,\n onCollapse: onCollapseRow,\n });\n\n const [shouldRefocus, setShouldReFocus] = useState(false);\n const expandRow = (row) => actions.expand(row, { showAllRows: false });\n\n const toggleExpandAllRows = actions.toggleExpandAll;\n\n const collapseRow = actions.collapse;\n\n const toggleExpand = (row) => {\n setShouldReFocus(false);\n actions.toggleExpand(row, { showAllRows: false });\n };\n\n const toggleShowAllRows = (row) => {\n if (isFunction(onToggleShowAllRows)) {\n onToggleShowAllRows(row);\n } else {\n const key = row[rowKey];\n actions.expand(row, {\n showAllRows: state.expanded[key] && !state.expanded[key].showAllRows,\n });\n }\n };\n\n return {\n state: {\n expandedRows: state.expanded,\n isExpandedAll: state.isExpandedAll,\n shouldRefocus,\n },\n actions: {\n expandRow,\n toggleExpandAllRows,\n toggleExpand,\n toggleShowAllRows,\n collapseRow,\n },\n };\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAA2C;AAC3C,mBAAyB;AAElB,M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/export-data/ExportDataPlugin.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/export-data/ExportDataPlugin.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* 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", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,0BAAoB;AACpB,uBAAqC;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,iBAAa,yBAA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UAChB,OAAO,EAAE,UAAU;AAAA,QACrB,IAAI,SAAS,YAAY;AACzB,cAAM,UAAU,WAAW,MAAM,IAAI;AAGrC,YAAI,cAAc,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": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/export-data/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/export-data/index.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["export { ExportDataPlugin } from './ExportDataPlugin.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAAiC;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/filterable/FilterablePlugin.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/filterable/FilterablePlugin.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable indent */\nimport { get, isFunction } from '@elliemae/ds-utilities';\nimport { createInstancePlugin } from '@elliemae/ds-shared';\nimport { addFilterToColumn } from './addFilterToColumn.js';\nimport filterRowsByQuery, { filterRowsByQueryGroup } from './filtering-helper/filterRowsByQuery.js';\nimport { useFilterableState } from './useFilterableState.js';\n\nconst decorateColumn = (column, grid) => {\n const {\n props: { isFilterableColumnActive = (col) => col.searchable, onRemoveAllFilters },\n actions: { addFilter, removeFilter },\n state: { query, filters },\n } = grid;\n\n return isFilterableColumnActive(column)\n ? addFilterToColumn(\n {\n grid,\n onAddFilter: addFilter,\n onRemoveFilter: removeFilter,\n onRemoveAllFilters,\n query,\n filters,\n },\n column,\n )\n : column;\n};\n\nconst composeRows = (rows, grid) => {\n const {\n props: { isDataFiltered, groupedRows },\n state: { query },\n composedRows,\n } = grid.getInstance();\n const nextRows = !groupedRows ? filterRowsByQuery(rows, query) : filterRowsByQueryGroup(rows, query, composedRows);\n\n return !isDataFiltered ? nextRows : rows;\n};\n\nexport const FilterablePlugin = createInstancePlugin('filterable', {\n registerStateHook: useFilterableState,\n decorateColumn,\n composeRows,\n registerHotKeys(grid) {\n return {\n key: 'ctrl+f',\n handler: ({ cellIndex }) => {\n const { decoratedColumns } = grid.getInstance();\n\n const column = decoratedColumns[cellIndex];\n const toggleMenuMethod = get(column, ['filterMenu', 'current', 'toggleMenu']);\n if (isFunction(toggleMenuMethod)) toggleMenuMethod();\n },\n };\n },\n});\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,0BAAgC;AAChC,uBAAqC;AACrC,+BAAkC;AAClC,+BAA0D;AAC1D,gCAAmC;AAEnC,MAAM,iBAAiB,CAAC,QAAQ,SAAS;AACvC,QAAM;AAAA,IACJ,OAAO,EAAE,2BAA2B,CAAC,QAAQ,IAAI,YAAY,mBAAmB;AAAA,IAChF,SAAS,EAAE,WAAW,aAAa;AAAA,IACnC,OAAO,EAAE,OAAO,QAAQ;AAAA,EAC1B,IAAI;AAEJ,SAAO,yBAAyB,MAAM,QAClC;AAAA,IACE;AAAA,MACE;AAAA,MACA,aAAa;AAAA,MACb,gBAAgB;AAAA,MAChB;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA;AAAA,EACF,IACA;AACN;AAEA,MAAM,cAAc,CAAC,MAAM,SAAS;AAClC,QAAM;AAAA,IACJ,OAAO,EAAE,gBAAgB,YAAY;AAAA,IACrC,OAAO,EAAE,MAAM;AAAA,IACf;AAAA,EACF,IAAI,KAAK,YAAY;AACrB,QAAM,WAAW,CAAC,kBAAc,yBAAAA,SAAkB,MAAM,KAAK,QAAI,iDAAuB,MAAM,OAAO,YAAY;AAEjH,SAAO,CAAC,iBAAiB,WAAW;AACtC;AAEO,MAAM,uBAAmB,uCAAqB,cAAc;AAAA,EACjE,mBAAmB;AAAA,EACnB;AAAA,EACA;AAAA,EACA,gBAAgB,MAAM;AACpB,WAAO;AAAA,MACL,KAAK;AAAA,MACL,SAAS,CAAC,EAAE,UAAU,MAAM;AAC1B,cAAM,EAAE,iBAAiB,IAAI,KAAK,YAAY;AAE9C,cAAM,SAAS,iBAAiB,SAAS;AACzC,cAAM,uBAAmB,yBAAI,QAAQ,CAAC,cAAc,WAAW,YAAY,CAAC;AAC5E,gBAAI,gCAAW,gBAAgB;AAAG,2BAAiB;AAAA,MACrD;AAAA,IACF;AAAA,EACF;AACF,CAAC;",
6
6
  "names": ["filterRowsByQuery"]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/filterable/addFilterToColumn.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/filterable/addFilterToColumn.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import { createRef } from 'react';\nimport { mergeClassNameToColumnHeader } from '@elliemae/ds-shared';\nimport { FilterableFormatter } from './filterableFormatter.js';\n\nexport const addFilterToColumn = (props, column) => {\n const filterMenuRef = createRef();\n column.header.formatters.push(FilterableFormatter({ ...props, filterMenuRef }));\n column.filterMenu = filterMenuRef;\n return mergeClassNameToColumnHeader('with-filtering', column);\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAA0B;AAC1B,uBAA6C;AAC7C,iCAAoC;AAE7B,MAAM,oBAAoB,CAAC,OAAO,WAAW;AAClD,QAAM,oBAAgB,wBAAU;AAChC,SAAO,OAAO,WAAW,SAAK,gDAAoB,EAAE,GAAG,OAAO,cAAc,CAAC,CAAC;AAC9E,SAAO,aAAa;AACpB,aAAO,+CAA6B,kBAAkB,MAAM;AAC9D;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../../src/plugins/filterable/components/FilterableHeader.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../../src/plugins/filterable/components/FilterableHeader.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable no-param-reassign */\nimport React, { useCallback, useEffect, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { get, debounce, useResizeObserver } from '@elliemae/ds-utilities';\nimport { useTheme } from '@elliemae/ds-system';\nimport { getFilterMenuByType } from './filterable-menus/getFilterMenuByType.js';\n\nconst blockName = 'data-grid-filter-header';\n\nconst Container = aggregatedClasses('div')(blockName, null, ({ showFilter }) => ({\n 'show-filter': showFilter,\n}));\nconst FilterHeaderValue = aggregatedClasses('div')(blockName, 'value');\nconst FilterHeaderButton = aggregatedClasses('div')(blockName, 'button');\n\nexport const FilterableHeader = ({\n column,\n value,\n columnData,\n onAddFilter,\n onRemoveFilter,\n filterMenuRef,\n onFilterMenuClose,\n onFilterMenuOpen,\n filters,\n isMulti,\n}) => {\n const [isMenuOpened, setMenuOpened] = useState(false);\n const [headerWidth, setHeaderWidth] = useState();\n const debouncedWidthSetter = debounce(setHeaderWidth, 200);\n const { filterMenuMinWidth, filterMenuMaxWidth } = column;\n const theme = useTheme();\n const dropdownMinWidth = filterMenuMinWidth || Number(theme.space.xl.replace('px', '')) * 2;\n\n const defineHeaderWidth = ({ width }) => {\n let nextWidth = width + 16; // todo: use dimsum space once we convert it to JS\n if (nextWidth < dropdownMinWidth) nextWidth = dropdownMinWidth;\n if (filterMenuMaxWidth && nextWidth > filterMenuMaxWidth) nextWidth = filterMenuMaxWidth;\n return !isMenuOpened ? debouncedWidthSetter(nextWidth) : setHeaderWidth(nextWidth);\n };\n\n useEffect(() => {\n if (filterMenuRef) {\n filterMenuRef.current = {\n toggleMenu: () => setMenuOpened((prevState) => !prevState),\n };\n }\n }, [filterMenuRef]);\n\n useEffect(() => {\n if (!isMenuOpened) onFilterMenuClose(column);\n else onFilterMenuOpen(column);\n });\n\n const [ref] = useResizeObserver(defineHeaderWidth);\n const handleOpenMenu = useCallback((open) => {\n setMenuOpened(open);\n if (open) onFilterMenuOpen();\n }, []);\n const FilterMenuComponent = getFilterMenuByType(get(column, ['filter', 'type']));\n return (\n <Container ref={ref} classProps={{ showFilter: isMenuOpened }}>\n <FilterHeaderValue className=\"header-value\">{value}</FilterHeaderValue>\n <FilterHeaderButton data-testid=\"data-grid-filter-header__button\">\n <FilterMenuComponent\n className=\"filter-header-menu\"\n column={column}\n filters={filters}\n isMenuOpened={isMenuOpened}\n isMulti={isMulti}\n menuProps={{\n options: columnData || [],\n style: { minWidth: headerWidth, maxWidth: filterMenuMaxWidth },\n zIndex: 100,\n }}\n onAddFilter={onAddFilter}\n onRemoveFilter={onRemoveFilter}\n onOpenMenu={handleOpenMenu}\n onClose={onFilterMenuClose}\n width={headerWidth}\n {...get(column, ['filter'], {})}\n />\n </FilterHeaderButton>\n </Container>\n );\n};\n\nFilterableHeader.propTypes = {\n column: PropTypes.any,\n value: PropTypes.any,\n columnData: PropTypes.any,\n onAddFilter: PropTypes.func,\n onRemoveFilter: PropTypes.func,\n filterMenuRef: PropTypes.any,\n onFilterMenuClose: PropTypes.func,\n onFilterMenuOpen: PropTypes.func,\n filters: PropTypes.arrayOf(PropTypes.shape({})),\n isMulti: PropTypes.bool,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EAC5B,SAAS,kBAAAA,QAAU,QAAQ,kBAAAA,QAAU,MAAM,CAAC,CAAC,CAAC;AAAA,EAC9C,SAAS,kBAAAA,QAAU;AACrB;AAEA,IAAO,2BAAQ;",
6
6
  "names": ["PropTypes"]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../../../src/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../../../src/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.tsx", "../../../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* 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", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADyCnB;AAxCJ,mBAA2C;AAC3C,wBAAsB;AACtB,gCAA4C;AAC5C,uBAAsD;AACtD,sBAA4B;AAC5B,uBAAyB;AACzB,oBAAmB;AACnB,2BAAkC;AAClC,+BAAoC;AAEpC,MAAM,YAAY;AAClB,MAAM,cAAU,wCAAkB,KAAK,EAAE,WAAW,SAAS;AAC7D,MAAM,aAAS,wCAAkB,KAAK,EAAE,WAAW,QAAQ;AAI3D,MAAM,2BAA2B,CAAC,EAAE,WAAW,MAAM,MAAM,WAAW,MAAM;AAC1E,QAAM,CAAC,WAAW,YAAY,QAAI,uBAAS,EAAE;AAC7C,QAAM,CAAC,SAAS,UAAU,QAAI,uBAAS,EAAE;AAGzC,QAAM,CAAC,qBAAqB,sBAAsB,QAAI,uBAAS,KAAK;AAEpE,8BAAU,MAAM;AACd,UAAM,kBAAc,cAAAA,SAAO,SAAS;AACpC,UAAM,gBAAY,cAAAA,SAAO,OAAO;AACh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AQ,kBAAAC,QAAU;AAAA,EAClB,WAAW,kBAAAA,QAAU;AAAA,EACrB,cAAc,kBAAAA,QAAU;AAAA,EACxB,YAAY,kBAAAA,QAAU;AAAA,EACtB,WAAW,kBAAAA,QAAU;AAAA,EACrB,aAAa,kBAAAA,QAAU;AAAA,EACvB,eAAe,kBAAAA,QAAU;AAAA,EACzB,YAAY,kBAAAA,QAAU;AAAA,EACtB,WAAW,kBAAAA,QAAU;AACvB;AAGA,IAAO,8BAAQ;",
6
6
  "names": ["moment", "PropTypes", "Position"]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../../../src/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../../../src/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.tsx", "../../../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import React, { useCallback, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSControlledDateTimePicker } 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 { DEFAULT_DATE_FORMAT } from './defaultDateFormat.js';\n\nconst SingleDatePickerContainer = ({ onChange = () => null, showHeader }) => {\n const [date, setDate] = useState('');\n\n const handleDateChange = useCallback(\n (data) => {\n if (!data.includes('_')) onChange(moment(data));\n setDate(data);\n },\n [onChange],\n );\n\n return (\n <div style={{ boxShadow: '0 6px 20px 0 rgb(0 0 0 / 24%)' }}>\n {showHeader && (\n <Grid p=\"xxs\">\n <DSControlledDateTimePicker date={date} onDateChange={handleDateChange} type=\"date-inputs\" isClearable />\n </Grid>\n )}\n <DSControlledDateTimePicker date={date} onDateChange={handleDateChange} type=\"date-picker-controller-only\" />\n </div>\n );\n};\n\nSingleDatePickerContainer.propTypes = {\n onChange: PropTypes.func,\n showHeader: PropTypes.bool,\n};\n\nconst formatDate = (date, format = DEFAULT_DATE_FORMAT) => date.format(format);\n\nconst SingleDateFilterMenu = ({\n column,\n className,\n isMenuOpened = false,\n onOpenMenu = () => null,\n placement = Position.BOTTOM_END,\n onAddFilter = () => null,\n dateFormatter = formatDate,\n showHeader = false,\n menuProps,\n}) => (\n <DSPopper\n contentComponent={\n <div className={className} data-testid=\"date-single__wrapper\">\n <SingleDatePickerContainer\n minimumNights={0}\n onChange={(date) => {\n const t = date.clone();\n onAddFilter(\n {\n group: column.property,\n label: column.label,\n value: dateFormatter(date, column.dateFormat),\n type: 'date',\n operator: 'range',\n filterParams: {\n start: date.startOf('day'),\n end: t.endOf('day'),\n },\n transformRowValue: (value) => moment(value, column.dateFormat || DEFAULT_DATE_FORMAT),\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\nSingleDateFilterMenu.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 { SingleDateFilterMenu };\nexport default SingleDateFilterMenu;\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADsBnB;AAtBJ,mBAA6C;AAC7C,wBAAsB;AACtB,qBAAqB;AACrB,gC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c,MAAM,OAAO,UAAU;AAAA,cAC5C,MAAM;AAAA,cACN,UAAU;AAAA,cACV,cAAc;AAAA,gBACZ,OAAO,KAAK,QAAQ,KAAK;AAAA,gBACzB,KAAK,EAAE,MAAM,KAAK;AAAA,cACpB;AAAA,cACA,mBAAmB,CAAC,cAAU,cAAAF,SAAO,OAAO,OAAO,cAAc,4CAAmB;AAAA,YACtF;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,4CAAC,+BAAY;AAAA,QACnB,SAAS,MAAO,CAAC,eAAe,WAAW,IAAI,IAAI,WAAW,KAAK;AAAA,QACnE,MAAK;AAAA;AAAA,IACP;AAAA,IAEF,QAAQ,UAAU;AAAA;AACpB;AAGF,qBAAqB,YAAY;AAAA,EAC/B,QAAQ,kBAAAC,QAAU;AAAA,EAClB,WAAW,kBAAAA,QAAU;AAAA,EACrB,cAAc,kBAAAA,QAAU;AAAA,EACxB,YAAY,kBAAAA,QAAU;AAAA,EACtB,WAAW,kBAAAA,QAAU;AAAA,EACrB,aAAa,kBAAAA,QAAU;AAAA,EACvB,eAAe,kBAAAA,QAAU;AAAA,EACzB,YAAY,kBAAAA,QAAU;AAAA,EACtB,WAAW,kBAAAA,QAAU;AACvB;AAGA,IAAO,+BAAQ;",
6
6
  "names": ["moment", "PropTypes", "Position"]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../../../src/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../../../src/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.tsx", "../../../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable max-lines */\nimport React, { useEffect, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport {\n DSControlledDateTimePicker,\n DSControlledDateRangePicker,\n DSControlledCheckbox,\n} 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 { Grid } from '@elliemae/ds-grid';\nimport moment from 'moment';\nimport { styled } from '@elliemae/ds-system';\nimport { DEFAULT_DATE_FORMAT } from './defaultDateFormat.js';\n\nconst StyledGridWrapper = styled(Grid)`\n .notCurrentMonth {\n opacity: ${(props) => (props.enableOutsideDays ? '1' : '0')};\n pointer-events: ${(props) => (props.enableOutsideDays ? 'auto' : 'none')};\n }\n`;\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function\nconst noop = (...args) => {};\n\nconst SingleRangeSwitcherContainer = ({ onChange = noop, enableOutsideDays }) => {\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 const [isDateRange, setIsDateRange] = 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 <StyledGridWrapper\n data-testid=\"date-single-range__wrapper\"\n style={{\n backgroundColor: 'white',\n boxShadow: '0 6px 20px 0 rgb(0 0 0 / 24%)',\n width: '261px',\n display: 'grid',\n justifyContent: 'center',\n }}\n cols={['100%']}\n enableOutsideDays={enableOutsideDays}\n onKeyDown={(e) => e.code === 'Enter' && setLastChangeWasPicker(true)}\n >\n <Grid gutter=\"xxs\" alignItems=\"center\" p=\"xxs\">\n <DSControlledCheckbox\n checked={isDateRange}\n name=\"Date range\"\n label=\"Range\"\n id=\"date-range-switcher-id-internal\"\n onChange={() => {\n setIsDateRange(!isDateRange);\n setStartDate('');\n setEndDate('');\n }}\n />\n <div style={{ width: 'fit-content' }}>\n {isDateRange ? (\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 ) : (\n <DSControlledDateTimePicker\n date={startDate}\n onDateChange={(_date) => {\n setLastChangeWasPicker(false);\n setStartDate(_date);\n setEndDate(_date);\n }}\n type=\"date-inputs\"\n />\n )}\n </div>\n </Grid>\n <Grid>\n {isDateRange ? (\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 ) : (\n <DSControlledDateTimePicker\n date={startDate}\n onDateChange={(_date) => {\n setLastChangeWasPicker(true);\n setStartDate(_date);\n setEndDate(_date);\n }}\n type=\"date-picker-controller-only\"\n />\n )}\n </Grid>\n </StyledGridWrapper>\n );\n};\n\nSingleRangeSwitcherContainer.propTypes = {\n onChange: PropTypes.func,\n enableOutsideDays: 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\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nconst SingleRangeSwitcherMenu = ({\n column,\n className,\n isMenuOpened = false,\n onOpenMenu = noop,\n placement = Position.BOTTOM_END,\n onAddFilter = noop,\n dateFormatter = formatRangeDate,\n enableOutsideDays = true,\n menuProps,\n}): JSX.Element => (\n <DSPopper\n contentComponent={\n <div className={className}>\n <SingleRangeSwitcherContainer\n enableOutsideDays={enableOutsideDays}\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 }, column.format),\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 />\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\nSingleRangeSwitcherMenu.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 enableOutsideDays: PropTypes.bool,\n menuProps: PropTypes.any,\n};\n\nexport { SingleRangeSwitcherMenu };\nexport default SingleRangeSwitcherMenu;\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADiEjB;AAhEN,mBAA2C;AAC3C,wBAAsB;AACtB,gCAIO;AACP,uBAAsD;AACtD,sBAA4B;AAC5B,uBAAyB;AACzB,qBAAqB;AACrB,oBAAmB;AACnB,uBAAuB;AACvB,+BAAoC;AAEpC,MAAM,wBAAoB,yBAAO,mBA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