@elliemae/ds-data-table 3.0.0-next.55 → 3.0.0-next.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/dist/cjs/DataTable.js +2 -8
  2. package/dist/cjs/DataTable.js.map +2 -2
  3. package/dist/cjs/addons/Filters/Components/CurrencyRangeFilter/index.js +2 -2
  4. package/dist/cjs/addons/Filters/Components/CurrencyRangeFilter/index.js.map +2 -2
  5. package/dist/cjs/addons/Filters/Components/NumberRangeFilter/index.js +2 -2
  6. package/dist/cjs/addons/Filters/Components/NumberRangeFilter/index.js.map +2 -2
  7. package/dist/cjs/addons/Filters/Components/SelectFilter/BaseSelectFilter.js +2 -2
  8. package/dist/cjs/addons/Filters/Components/SelectFilter/BaseSelectFilter.js.map +2 -2
  9. package/dist/cjs/configs/useDatatableConfig.js +20 -3
  10. package/dist/cjs/configs/useDatatableConfig.js.map +2 -2
  11. package/dist/cjs/{redux/reducers/headersReducers/logic.js → configs/useInternalStateConfig.js} +38 -12
  12. package/dist/cjs/configs/useInternalStateConfig.js.map +7 -0
  13. package/dist/cjs/exported-related/FilterPopover.js +2 -2
  14. package/dist/cjs/exported-related/FilterPopover.js.map +2 -2
  15. package/dist/cjs/exported-related/RowRenderer/DefaultRowContentRenderer.js +3 -3
  16. package/dist/cjs/exported-related/RowRenderer/DefaultRowContentRenderer.js.map +2 -2
  17. package/dist/cjs/exported-related/RowRenderer/index.js +3 -3
  18. package/dist/cjs/exported-related/RowRenderer/index.js.map +1 -1
  19. package/dist/cjs/exported-related/RowRenderer/useRowRendererHandlers.js +10 -10
  20. package/dist/cjs/exported-related/RowRenderer/useRowRendererHandlers.js.map +2 -2
  21. package/dist/cjs/parts/Filters/index.js +2 -2
  22. package/dist/cjs/parts/Filters/index.js.map +2 -2
  23. package/dist/cjs/parts/Headers/HeaderCell.js +6 -13
  24. package/dist/cjs/parts/Headers/HeaderCell.js.map +2 -2
  25. package/dist/cjs/parts/Row.js +6 -10
  26. package/dist/cjs/parts/Row.js.map +2 -2
  27. package/dist/cjs/parts/RowVariants/RowVariantHeader.js +4 -4
  28. package/dist/cjs/parts/RowVariants/RowVariantHeader.js.map +2 -2
  29. package/dist/cjs/parts/RowVariants/RowVariantPrimary.js +2 -2
  30. package/dist/cjs/parts/RowVariants/RowVariantPrimary.js.map +1 -1
  31. package/dist/cjs/parts/RowVariants/RowVariantSecondary.js +2 -2
  32. package/dist/cjs/parts/RowVariants/RowVariantSecondary.js.map +1 -1
  33. package/dist/cjs/parts/RowVariants/RowVariantSkeleton.js +2 -2
  34. package/dist/cjs/parts/RowVariants/RowVariantSkeleton.js.map +2 -2
  35. package/dist/cjs/parts/RowVariants/index.js.map +1 -1
  36. package/dist/cjs/parts/RowVariants/types.js.map +1 -1
  37. package/dist/cjs/parts/TableContent.js +1 -6
  38. package/dist/cjs/parts/TableContent.js.map +2 -2
  39. package/dist/cjs/parts/VirtualRowsList.js +3 -11
  40. package/dist/cjs/parts/VirtualRowsList.js.map +2 -2
  41. package/dist/cjs/types/props.js.map +1 -1
  42. package/dist/esm/DataTable.js +3 -9
  43. package/dist/esm/DataTable.js.map +2 -2
  44. package/dist/esm/addons/Filters/Components/CurrencyRangeFilter/index.js +3 -3
  45. package/dist/esm/addons/Filters/Components/CurrencyRangeFilter/index.js.map +2 -2
  46. package/dist/esm/addons/Filters/Components/NumberRangeFilter/index.js +3 -3
  47. package/dist/esm/addons/Filters/Components/NumberRangeFilter/index.js.map +2 -2
  48. package/dist/esm/addons/Filters/Components/SelectFilter/BaseSelectFilter.js +3 -3
  49. package/dist/esm/addons/Filters/Components/SelectFilter/BaseSelectFilter.js.map +2 -2
  50. package/dist/esm/configs/useDatatableConfig.js +22 -3
  51. package/dist/esm/configs/useDatatableConfig.js.map +2 -2
  52. package/dist/esm/configs/useInternalStateConfig.js +55 -0
  53. package/dist/esm/configs/useInternalStateConfig.js.map +7 -0
  54. package/dist/esm/exported-related/FilterPopover.js +3 -3
  55. package/dist/esm/exported-related/FilterPopover.js.map +2 -2
  56. package/dist/esm/exported-related/RowRenderer/DefaultRowContentRenderer.js +3 -3
  57. package/dist/esm/exported-related/RowRenderer/DefaultRowContentRenderer.js.map +2 -2
  58. package/dist/esm/exported-related/RowRenderer/index.js +3 -3
  59. package/dist/esm/exported-related/RowRenderer/index.js.map +1 -1
  60. package/dist/esm/exported-related/RowRenderer/useRowRendererHandlers.js +10 -10
  61. package/dist/esm/exported-related/RowRenderer/useRowRendererHandlers.js.map +2 -2
  62. package/dist/esm/parts/Filters/index.js +3 -3
  63. package/dist/esm/parts/Filters/index.js.map +2 -2
  64. package/dist/esm/parts/Headers/HeaderCell.js +6 -13
  65. package/dist/esm/parts/Headers/HeaderCell.js.map +2 -2
  66. package/dist/esm/parts/Row.js +6 -10
  67. package/dist/esm/parts/Row.js.map +2 -2
  68. package/dist/esm/parts/RowVariants/RowVariantHeader.js +4 -4
  69. package/dist/esm/parts/RowVariants/RowVariantHeader.js.map +2 -2
  70. package/dist/esm/parts/RowVariants/RowVariantPrimary.js +2 -2
  71. package/dist/esm/parts/RowVariants/RowVariantPrimary.js.map +1 -1
  72. package/dist/esm/parts/RowVariants/RowVariantSecondary.js +2 -2
  73. package/dist/esm/parts/RowVariants/RowVariantSecondary.js.map +1 -1
  74. package/dist/esm/parts/RowVariants/RowVariantSkeleton.js +2 -2
  75. package/dist/esm/parts/RowVariants/RowVariantSkeleton.js.map +2 -2
  76. package/dist/esm/parts/RowVariants/index.js.map +1 -1
  77. package/dist/esm/parts/TableContent.js +1 -6
  78. package/dist/esm/parts/TableContent.js.map +2 -2
  79. package/dist/esm/parts/VirtualRowsList.js +3 -11
  80. package/dist/esm/parts/VirtualRowsList.js.map +2 -2
  81. package/package.json +1 -1
  82. package/dist/cjs/redux/reducers/headersReducers/defaults.js +0 -28
  83. package/dist/cjs/redux/reducers/headersReducers/defaults.js.map +0 -7
  84. package/dist/cjs/redux/reducers/headersReducers/headersReducers.js +0 -50
  85. package/dist/cjs/redux/reducers/headersReducers/headersReducers.js.map +0 -7
  86. package/dist/cjs/redux/reducers/headersReducers/index.js +0 -23
  87. package/dist/cjs/redux/reducers/headersReducers/index.js.map +0 -7
  88. package/dist/cjs/redux/reducers/headersReducers/logic.js.map +0 -7
  89. package/dist/cjs/redux/reducers/headersReducers/useDispatchHeadersActions.js +0 -39
  90. package/dist/cjs/redux/reducers/headersReducers/useDispatchHeadersActions.js.map +0 -7
  91. package/dist/cjs/redux/reducers/index.js +0 -40
  92. package/dist/cjs/redux/reducers/index.js.map +0 -7
  93. package/dist/cjs/redux/reducers/rowsReducers/actions_types.js +0 -40
  94. package/dist/cjs/redux/reducers/rowsReducers/actions_types.js.map +0 -7
  95. package/dist/cjs/redux/reducers/rowsReducers/defaults.js +0 -48
  96. package/dist/cjs/redux/reducers/rowsReducers/defaults.js.map +0 -7
  97. package/dist/cjs/redux/reducers/rowsReducers/index.js +0 -23
  98. package/dist/cjs/redux/reducers/rowsReducers/index.js.map +0 -7
  99. package/dist/cjs/redux/reducers/rowsReducers/logic.js +0 -58
  100. package/dist/cjs/redux/reducers/rowsReducers/logic.js.map +0 -7
  101. package/dist/cjs/redux/reducers/rowsReducers/rowsReducer.js +0 -80
  102. package/dist/cjs/redux/reducers/rowsReducers/rowsReducer.js.map +0 -7
  103. package/dist/cjs/redux/reducers/rowsReducers/useDispatchRowsActions.js +0 -54
  104. package/dist/cjs/redux/reducers/rowsReducers/useDispatchRowsActions.js.map +0 -7
  105. package/dist/cjs/redux/storeConfig.js +0 -31
  106. package/dist/cjs/redux/storeConfig.js.map +0 -7
  107. package/dist/esm/redux/reducers/headersReducers/defaults.js +0 -6
  108. package/dist/esm/redux/reducers/headersReducers/defaults.js.map +0 -7
  109. package/dist/esm/redux/reducers/headersReducers/headersReducers.js +0 -28
  110. package/dist/esm/redux/reducers/headersReducers/headersReducers.js.map +0 -7
  111. package/dist/esm/redux/reducers/headersReducers/index.js +0 -4
  112. package/dist/esm/redux/reducers/headersReducers/index.js.map +0 -7
  113. package/dist/esm/redux/reducers/headersReducers/logic.js +0 -29
  114. package/dist/esm/redux/reducers/headersReducers/logic.js.map +0 -7
  115. package/dist/esm/redux/reducers/headersReducers/useDispatchHeadersActions.js +0 -17
  116. package/dist/esm/redux/reducers/headersReducers/useDispatchHeadersActions.js.map +0 -7
  117. package/dist/esm/redux/reducers/index.js +0 -18
  118. package/dist/esm/redux/reducers/index.js.map +0 -7
  119. package/dist/esm/redux/reducers/rowsReducers/actions_types.js +0 -18
  120. package/dist/esm/redux/reducers/rowsReducers/actions_types.js.map +0 -7
  121. package/dist/esm/redux/reducers/rowsReducers/defaults.js +0 -26
  122. package/dist/esm/redux/reducers/rowsReducers/defaults.js.map +0 -7
  123. package/dist/esm/redux/reducers/rowsReducers/index.js +0 -4
  124. package/dist/esm/redux/reducers/rowsReducers/index.js.map +0 -7
  125. package/dist/esm/redux/reducers/rowsReducers/logic.js +0 -36
  126. package/dist/esm/redux/reducers/rowsReducers/logic.js.map +0 -7
  127. package/dist/esm/redux/reducers/rowsReducers/rowsReducer.js +0 -67
  128. package/dist/esm/redux/reducers/rowsReducers/rowsReducer.js.map +0 -7
  129. package/dist/esm/redux/reducers/rowsReducers/useDispatchRowsActions.js +0 -41
  130. package/dist/esm/redux/reducers/rowsReducers/useDispatchRowsActions.js.map +0 -7
  131. package/dist/esm/redux/storeConfig.js +0 -9
  132. package/dist/esm/redux/storeConfig.js.map +0 -7
@@ -27,18 +27,19 @@ var React = __toESM(require("react"));
27
27
  var import_react = require("react");
28
28
  var import_constants = require("../../configs/constants");
29
29
  var import_DataTableContext = require("../../DataTableContext");
30
- var import_reducers = require("../../redux/reducers");
31
30
  const useRowRendererHandlers = ({
32
31
  row,
33
32
  itemIndex,
34
33
  items,
35
34
  draggableProps,
36
35
  isDragOverlay,
37
- selectedRowId
36
+ drilldownRowId
38
37
  }) => {
39
38
  const {
40
39
  tableProps: { onRowClick, onRowFocus, disabledRows },
41
- virtualListHelpers: { scrollToIndex }
40
+ virtualListHelpers: { scrollToIndex },
41
+ setDrilldownRowId,
42
+ setFocusedRowId
42
43
  } = (0, import_react.useContext)(import_DataTableContext.DataTableContext);
43
44
  const isOptionFocuseable = (opt) => !disabledRows[opt.uid];
44
45
  const findInCircularList = (list, from, criteria, step = 1) => {
@@ -48,7 +49,6 @@ const useRowRendererHandlers = ({
48
49
  }
49
50
  return from;
50
51
  };
51
- const { setSelectedRowId, setFocusedRowId } = (0, import_reducers.useDispatchRowsActions)();
52
52
  const handleItemClick = (0, import_react.useCallback)((e, { original, uid } = row) => {
53
53
  if (disabledRows[uid])
54
54
  return;
@@ -69,8 +69,8 @@ const useRowRendererHandlers = ({
69
69
  }
70
70
  if (e.code === "Enter") {
71
71
  e.preventDefault();
72
- if (selectedRowId !== row.uid) {
73
- setSelectedRowId(row.uid);
72
+ if (drilldownRowId !== row.uid) {
73
+ setDrilldownRowId(row.uid);
74
74
  setTimeout(() => {
75
75
  const focuseableCell = row.cells.find((cell) => cell.ref.current !== null);
76
76
  if (focuseableCell)
@@ -96,9 +96,9 @@ const useRowRendererHandlers = ({
96
96
  }, [
97
97
  isDragOverlay,
98
98
  isActive,
99
- selectedRowId,
99
+ drilldownRowId,
100
100
  row,
101
- setSelectedRowId,
101
+ setDrilldownRowId,
102
102
  handleItemClick,
103
103
  items,
104
104
  itemIndex,
@@ -107,9 +107,9 @@ const useRowRendererHandlers = ({
107
107
  ]);
108
108
  const handleOnBlur = (0, import_react.useCallback)((e) => {
109
109
  if (e.relatedTarget?.getAttribute("data-testid") === "data-table-row-content") {
110
- setSelectedRowId(null);
110
+ setDrilldownRowId(null);
111
111
  }
112
- }, [setSelectedRowId]);
112
+ }, [setDrilldownRowId]);
113
113
  const handleOnFocus = (0, import_react.useCallback)((e) => {
114
114
  if (!disabledRows[row.uid] && e.target && e.target.getAttribute("data-testid") === import_constants.DATA_TESTID.DATA_TABLE_ROW_CONTENT) {
115
115
  setFocusedRowId(row.uid);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/exported-related/RowRenderer/useRowRendererHandlers.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable complexity */\nimport React, { useCallback, useContext } from 'react';\nimport { DATA_TESTID } from '../../configs/constants';\nimport { DataTableContext } from '../../DataTableContext';\nimport { SortableItemContextType } from '../../parts/HoC/SortableItemContext';\nimport { useDispatchRowsActions } from '../../redux/reducers';\nimport { TypescriptRow } from '../../types/props';\n\nexport const useRowRendererHandlers = ({\n row,\n itemIndex,\n items,\n draggableProps,\n isDragOverlay,\n selectedRowId,\n}: {\n row: TypescriptRow;\n itemIndex: number;\n items: TypescriptRow[];\n draggableProps: SortableItemContextType['draggableProps'];\n isDragOverlay: boolean;\n selectedRowId: string;\n}): {\n handleItemClick: React.MouseEventHandler;\n handleKeyDown: React.KeyboardEventHandler;\n handleOnBlur: React.FocusEventHandler;\n handleOnFocus: React.FocusEventHandler;\n} => {\n const {\n tableProps: { onRowClick, onRowFocus, disabledRows },\n virtualListHelpers: { scrollToIndex },\n } = useContext(DataTableContext);\n\n const isOptionFocuseable = (opt): boolean => !disabledRows[opt.uid];\n\n const findInCircularList = (\n list,\n from: number,\n criteria: (item) => boolean,\n step = 1,\n // eslint-disable-next-line max-params\n ): number => {\n for (\n let i = (from + step + list.length) % list.length;\n i !== from && from > -1;\n i = (i + step + list.length) % list.length\n ) {\n if (criteria(list[i])) return i;\n }\n return from; // return same item\n };\n\n const { setSelectedRowId, setFocusedRowId } = useDispatchRowsActions();\n\n const handleItemClick = useCallback(\n (e, { original, uid } = row) => {\n // setSelectedRowId(null);\n if (disabledRows[uid]) return;\n onRowClick(original, e, uid);\n onRowFocus(\n {\n itemIndex,\n scrollToItem: (\n opts: { align: 'auto' | 'start' | 'center' | 'end' } = {\n align: 'start',\n },\n ) => scrollToIndex(itemIndex, opts),\n original,\n },\n e,\n );\n },\n [row, disabledRows, onRowClick, onRowFocus, itemIndex, scrollToIndex],\n );\n\n const isActive = draggableProps && draggableProps.active;\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (isDragOverlay || isActive) {\n e.preventDefault();\n return;\n }\n if (e.code === 'Enter') {\n e.preventDefault();\n if (selectedRowId !== row.uid) {\n setSelectedRowId(row.uid);\n setTimeout(() => {\n const focuseableCell = row.cells.find((cell) => cell.ref.current !== null);\n if (focuseableCell) focuseableCell.ref.current.focus();\n });\n }\n }\n if (e.code === 'Space') {\n e.preventDefault();\n handleItemClick(e, row);\n }\n if (e.code === 'ArrowDown') {\n e.preventDefault();\n e.stopPropagation();\n const next = findInCircularList(items, itemIndex, isOptionFocuseable);\n setFocusedRowId(items[next].uid);\n }\n if (e.code === 'ArrowUp') {\n e.preventDefault();\n const prev = findInCircularList(items, itemIndex, isOptionFocuseable, -1);\n setFocusedRowId(items[prev].uid);\n }\n },\n [\n isDragOverlay,\n isActive,\n selectedRowId,\n row,\n setSelectedRowId,\n handleItemClick,\n items,\n itemIndex,\n isOptionFocuseable,\n setFocusedRowId,\n ],\n );\n\n const handleOnBlur = useCallback(\n (e) => {\n if (e.relatedTarget?.getAttribute('data-testid') === 'data-table-row-content') {\n setSelectedRowId(null);\n }\n },\n [setSelectedRowId],\n );\n\n const handleOnFocus: React.FocusEventHandler = useCallback(\n (e) => {\n if (\n !disabledRows[row.uid] &&\n e.target &&\n e.target.getAttribute('data-testid') === DATA_TESTID.DATA_TABLE_ROW_CONTENT\n ) {\n setFocusedRowId(row.uid);\n }\n },\n [row.uid, setFocusedRowId, disabledRows],\n );\n\n return { handleItemClick, handleKeyDown, handleOnBlur, handleOnFocus };\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAA+C;AAC/C,uBAA4B;AAC5B,8BAAiC;AAEjC,sBAAuC;AAGhC,MAAM,yBAAyB,CAAC;AAAA,EACrC;A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AC;AAAA,MACH;AAAA,IACF;AACA,QAAI,EAAE,SAAS,SAAS;AACtB,QAAE,eAAe;AACjB,sBAAgB,GAAG,GAAG;AAAA,IACxB;AACA,QAAI,EAAE,SAAS,aAAa;AAC1B,QAAE,eAAe;AACjB,QAAE,gBAAgB;AAClB,YAAM,OAAO,mBAAmB,OAAO,WAAW,kBAAkB;AACpE,sBAAgB,MAAM,MAAM,GAAG;AAAA,IACjC;AACA,QAAI,EAAE,SAAS,WAAW;AACxB,QAAE,eAAe;AACjB,YAAM,OAAO,mBAAmB,OAAO,WAAW,oBAAoB,EAAE;AACxE,sBAAgB,MAAM,MAAM,GAAG;AAAA,IACjC;AAAA,EACF,GACA;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CACF;AAEA,QAAM,eAAe,8BACnB,CAAC,MAAM;AACL,QAAI,EAAE,eAAe,aAAa,aAAa,MAAM,0BAA0B;AAC7E,uBAAiB,IAAI;AAAA,IACvB;AAAA,EACF,GACA,CAAC,gBAAgB,CACnB;AAEA,QAAM,gBAAyC,8BAC7C,CAAC,MAAM;AACL,QACE,CAAC,aAAa,IAAI,QAClB,EAAE,UACF,EAAE,OAAO,aAAa,aAAa,MAAM,6BAAY,wBACrD;AACA,sBAAgB,IAAI,GAAG;AAAA,IACzB;AAAA,EACF,GACA,CAAC,IAAI,KAAK,iBAAiB,YAAY,CACzC;AAEA,SAAO,EAAE,iBAAiB,eAAe,cAAc,cAAc;AACvE;",
4
+ "sourcesContent": ["/* eslint-disable complexity */\nimport React, { useCallback, useContext } from 'react';\nimport { DATA_TESTID } from '../../configs/constants';\nimport { DataTableContext } from '../../DataTableContext';\nimport { SortableItemContextType } from '../../parts/HoC/SortableItemContext';\nimport { TypescriptRow } from '../../types/props';\n\nexport const useRowRendererHandlers = ({\n row,\n itemIndex,\n items,\n draggableProps,\n isDragOverlay,\n drilldownRowId,\n}: {\n row: TypescriptRow;\n itemIndex: number;\n items: TypescriptRow[];\n draggableProps: SortableItemContextType['draggableProps'];\n isDragOverlay: boolean;\n drilldownRowId: string | null;\n}): {\n handleItemClick: React.MouseEventHandler;\n handleKeyDown: React.KeyboardEventHandler;\n handleOnBlur: React.FocusEventHandler;\n handleOnFocus: React.FocusEventHandler;\n} => {\n const {\n tableProps: { onRowClick, onRowFocus, disabledRows },\n virtualListHelpers: { scrollToIndex },\n setDrilldownRowId,\n setFocusedRowId,\n } = useContext(DataTableContext);\n\n const isOptionFocuseable = (opt): boolean => !disabledRows[opt.uid];\n\n const findInCircularList = (\n list,\n from: number,\n criteria: (item) => boolean,\n step = 1,\n // eslint-disable-next-line max-params\n ): number => {\n for (\n let i = (from + step + list.length) % list.length;\n i !== from && from > -1;\n i = (i + step + list.length) % list.length\n ) {\n if (criteria(list[i])) return i;\n }\n return from; // return same item\n };\n\n const handleItemClick = useCallback(\n (e, { original, uid } = row) => {\n if (disabledRows[uid]) return;\n onRowClick(original, e, uid);\n onRowFocus(\n {\n itemIndex,\n scrollToItem: (\n opts: { align: 'auto' | 'start' | 'center' | 'end' } = {\n align: 'start',\n },\n ) => scrollToIndex(itemIndex, opts),\n original,\n },\n e,\n );\n },\n [row, disabledRows, onRowClick, onRowFocus, itemIndex, scrollToIndex],\n );\n\n const isActive = draggableProps && draggableProps.active;\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (isDragOverlay || isActive) {\n e.preventDefault();\n return;\n }\n if (e.code === 'Enter') {\n e.preventDefault();\n if (drilldownRowId !== row.uid) {\n setDrilldownRowId(row.uid);\n setTimeout(() => {\n const focuseableCell = row.cells.find((cell) => cell.ref.current !== null);\n if (focuseableCell) focuseableCell.ref.current.focus();\n });\n }\n }\n if (e.code === 'Space') {\n e.preventDefault();\n handleItemClick(e, row);\n }\n if (e.code === 'ArrowDown') {\n e.preventDefault();\n e.stopPropagation();\n const next = findInCircularList(items, itemIndex, isOptionFocuseable);\n setFocusedRowId(items[next].uid);\n }\n if (e.code === 'ArrowUp') {\n e.preventDefault();\n const prev = findInCircularList(items, itemIndex, isOptionFocuseable, -1);\n setFocusedRowId(items[prev].uid);\n }\n },\n [\n isDragOverlay,\n isActive,\n drilldownRowId,\n row,\n setDrilldownRowId,\n handleItemClick,\n items,\n itemIndex,\n isOptionFocuseable,\n setFocusedRowId,\n ],\n );\n\n const handleOnBlur = useCallback(\n (e) => {\n if (e.relatedTarget?.getAttribute('data-testid') === 'data-table-row-content') {\n setDrilldownRowId(null);\n }\n },\n [setDrilldownRowId],\n );\n\n const handleOnFocus: React.FocusEventHandler = useCallback(\n (e) => {\n if (\n !disabledRows[row.uid] &&\n e.target &&\n e.target.getAttribute('data-testid') === DATA_TESTID.DATA_TABLE_ROW_CONTENT\n ) {\n setFocusedRowId(row.uid);\n }\n },\n [row.uid, setFocusedRowId, disabledRows],\n );\n\n return { handleItemClick, handleKeyDown, handleOnBlur, handleOnFocus };\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAA+C;AAC/C,uBAA4B;AAC5B,8BAAiC;AAI1B,MAAM,yBAAyB,CAAC;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,MAaG;AACH,QAAM;AAAA,IACJ,YAAY,EAAE,YAAY,YAAY;AAAA,IACtC,oBAAoB,EAAE;AAAA,IACtB;AAAA,IACA;AAAA,MACE,6BAAW,wCAAgB;AAE/B,QAAM,qBAAqB,CAAC,QAAiB,CAAC,aAAa,IAAI;AAE/D,QAAM,qBAAqB,CACzB,MACA,MACA,UACA,OAAO,MAEI;AACX,aACM,IAAK,QAAO,OAAO,KAAK,UAAU,KAAK,QAC3C,MAAM,QAAQ,OAAO,IACrB,IAAK,KAAI,OAAO,KAAK,UAAU,KAAK,QACpC;AACA,U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AAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CACF;AAEA,QAAM,eAAe,8BACnB,CAAC,MAAM;AACL,QAAI,EAAE,eAAe,aAAa,aAAa,MAAM,0BAA0B;AAC7E,wBAAkB,IAAI;AAAA,IACxB;AAAA,EACF,GACA,CAAC,iBAAiB,CACpB;AAEA,QAAM,gBAAyC,8BAC7C,CAAC,MAAM;AACL,QACE,CAAC,aAAa,IAAI,QAClB,EAAE,UACF,EAAE,OAAO,aAAa,aAAa,MAAM,6BAAY,wBACrD;AACA,sBAAgB,IAAI,GAAG;AAAA,IACzB;AAAA,EACF,GACA,CAAC,IAAI,KAAK,iBAAiB,YAAY,CACzC;AAEA,SAAO,EAAE,iBAAiB,eAAe,cAAc,cAAc;AACvE;",
6
6
  "names": []
7
7
  }
@@ -44,7 +44,7 @@ var React = __toESM(require("react"));
44
44
  var import_react = __toESM(require("react"));
45
45
  var import_Filters = require("../../addons/Filters");
46
46
  var import_exported_related = require("../../exported-related");
47
- var import_reducers = require("../../redux/reducers");
47
+ var import_DataTableContext = __toESM(require("../../DataTableContext"));
48
48
  const FilterMapper = {
49
49
  [import_exported_related.FILTER_TYPES.SELECT]: import_Filters.SingleSelectFilter,
50
50
  [import_exported_related.FILTER_TYPES.MULTI_SELECT]: import_Filters.MultiSelectFilter,
@@ -56,7 +56,7 @@ const FilterMapper = {
56
56
  };
57
57
  const FilterMapItem = (props) => {
58
58
  const { column, filterValue: filters, onFiltersChange } = props;
59
- const { patchHeaderFilterButtonAndMenu, patchHeader } = (0, import_reducers.useDispatchHeadersActions)();
59
+ const { patchHeaderFilterButtonAndMenu, patchHeader } = (0, import_react.useContext)(import_DataTableContext.default);
60
60
  const filterValue = filters.find((filter) => filter.id === column.id);
61
61
  const onValueChange = (0, import_react.useCallback)((type, newValue) => {
62
62
  const filterIndex = filters.findIndex((filter) => filter.id === column.id);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/parts/Filters/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable @typescript-eslint/indent */\n/* eslint-disable react/prop-types */\nimport React, { useCallback } from 'react';\nimport {\n DateRangeFilter,\n DateSwitcherFilter,\n NumberRangeFilter,\n MultiSelectFilter,\n SingleSelectFilter,\n SingleDateFilter,\n CurrencyRangeFilter,\n} from '../../addons/Filters';\nimport { FILTER_TYPES } from '../../exported-related';\nimport { useDispatchHeadersActions } from '../../redux/reducers';\nimport { FilterProps } from '../../types/props';\n\nconst FilterMapper: Record<string, React.ComponentType<FilterProps>> = {\n [FILTER_TYPES.SELECT]: SingleSelectFilter,\n [FILTER_TYPES.MULTI_SELECT]: MultiSelectFilter,\n [FILTER_TYPES.SINGLE_DATE]: SingleDateFilter,\n [FILTER_TYPES.DATE_RANGE]: DateRangeFilter,\n [FILTER_TYPES.DATE_SWITCHER]: DateSwitcherFilter,\n [FILTER_TYPES.NUMBER_RANGE]: NumberRangeFilter,\n [FILTER_TYPES.CURRENCY_RANGE]: CurrencyRangeFilter,\n};\nexport const FilterMapItem: React.ComponentType<\n Omit<FilterProps, 'patchHeaderFilterButtonAndMenu' | 'patchHeader' | 'onValueChange'>\n> = (props) => {\n const { column, filterValue: filters, onFiltersChange } = props;\n\n const { patchHeaderFilterButtonAndMenu, patchHeader } = useDispatchHeadersActions();\n\n const filterValue = filters.find((filter) => filter.id === column.id);\n\n const onValueChange = useCallback(\n (type: string, newValue: any) => {\n const filterIndex = filters.findIndex((filter) => filter.id === column.id);\n if (newValue === undefined) {\n const newFilters = filters.filter((filter) => filter.id !== column.id);\n onFiltersChange(newFilters);\n } else if (filterIndex === -1) {\n onFiltersChange([...filters, { id: column.id, type, value: newValue }]);\n } else {\n const newFilters = [...filters];\n newFilters[filterIndex].type = type;\n newFilters[filterIndex].value = newValue;\n onFiltersChange(newFilters);\n }\n },\n [column.id, filters, onFiltersChange],\n );\n\n const filterProps = {\n ...props,\n filterValue: filterValue?.value,\n onValueChange,\n patchHeader,\n patchHeaderFilterButtonAndMenu,\n };\n\n if (typeof column.filter === 'string') {\n if (!(column.filter in FilterMapper)) {\n throw new Error(`column.filter must be a supported out-of-the-box filter in ${column}`);\n }\n const FilterComp = FilterMapper[column.filter];\n return <FilterComp {...filterProps} />;\n }\n\n if (column.Filter) {\n if (typeof column.Filter !== 'function') {\n throw new Error(`column.Filter must be a component`);\n }\n const FilterComp = column.Filter;\n return <FilterComp {...filterProps} />;\n }\n\n // Column doesn't have any filters\n return null;\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,mBAAmC;AACnC,qBAQO;AACP,8BAA6B;AAC7B,sBAA0C;AAG1C,MAAM,eAAiE;AAAA,GACpE,qCAAa,SAAS;AAAA,GACtB,qCAAa,eAAe;AAAA,GAC5B,qCAAa,cAAc;AAAA,GAC3B,qCAAa,aAAa;AAAA,GAC1B,qCAAa,gBAAgB;AAAA,GAC7B,qCAAa,eAAe;AAAA,GAC5B,qCAAa,iBAAiB;AACjC;AACO,MAAM,gBAET,CAAC,UAAU;AACb,QAAM,EAAE,QAAQ,aAAa,SAAS,oBAAoB;AAE1D,QAAM,EAAE,gCAAgC,gBAAgB,+CAA0B;AAElF,QAAM,cAAc,QAAQ,KAAK,CAAC,WAAW,OAAO,OAAO,OAAO,EAAE;AAEpE,QAAM,gBAAgB,8BACpB,CAAC,MAAc,aAAkB;AAC/B,UAAM,cAAc,QAAQ,UAAU,CAAC,WAAW,OAAO,OAAO,OAAO,EAAE;AACzE,QAAI,aAAa,QAAW;AAC1B,YAAM,aAAa,QAAQ,OAAO,CAAC,WAAW,OAAO,OAAO,OAAO,EAAE;AACrE,sBAAgB,UAAU;AAAA,IAC5B,WAAW,gBAAgB,IAAI;AAC7B,sBAAgB,CAAC,GAAG,SAAS,EAAE,IAAI,OAAO,IAAI,MAAM,OAAO,SAAS,CAAC,CAAC;AAAA,IACxE,OAAO;AACL,YAAM,aAAa,CAAC,GAAG,OAAO;AAC9B,iBAAW,aAAa,OAAO;AAC/B,iBAAW,aAAa,QAAQ;AAChC,sBAAgB,UAAU;AAAA,IAC5B;AAAA,EACF,GACA,CAAC,OAAO,IAAI,SAAS,eAAe,CACtC;AAEA,QAAM,cAAc,iCACf,QADe;AAAA,IAElB,aAAa,aAAa;AAAA,IAC1B;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,MAAI,OAAO,OAAO,WAAW,UAAU;AACrC,QAAI,CAAE,QAAO,UAAU,eAAe;AACpC,YAAM,IAAI,MAAM,8DAA8D,QAAQ;AAAA,IACxF;AACA,UAAM,aAAa,aAAa,OAAO;AACvC,WAAO,mDAAC,+BAAe,YAAa;AAAA,EACtC;AAEA,MAAI,OAAO,QAAQ;AACjB,QAAI,OAAO,OAAO,WAAW,YAAY;AACvC,YAAM,IAAI,MAAM,mCAAmC;AAAA,IACrD;AACA,UAAM,aAAa,OAAO;AAC1B,WAAO,mDAAC,+BAAe,YAAa;AAAA,EACtC;AAGA,SAAO;AACT;",
4
+ "sourcesContent": ["/* eslint-disable @typescript-eslint/indent */\n/* eslint-disable react/prop-types */\nimport React, { useCallback, useContext } from 'react';\nimport {\n DateRangeFilter,\n DateSwitcherFilter,\n NumberRangeFilter,\n MultiSelectFilter,\n SingleSelectFilter,\n SingleDateFilter,\n CurrencyRangeFilter,\n} from '../../addons/Filters';\nimport { FILTER_TYPES } from '../../exported-related';\nimport DataTableContext from '../../DataTableContext';\nimport { FilterProps } from '../../types/props';\n\nconst FilterMapper: Record<string, React.ComponentType<FilterProps>> = {\n [FILTER_TYPES.SELECT]: SingleSelectFilter,\n [FILTER_TYPES.MULTI_SELECT]: MultiSelectFilter,\n [FILTER_TYPES.SINGLE_DATE]: SingleDateFilter,\n [FILTER_TYPES.DATE_RANGE]: DateRangeFilter,\n [FILTER_TYPES.DATE_SWITCHER]: DateSwitcherFilter,\n [FILTER_TYPES.NUMBER_RANGE]: NumberRangeFilter,\n [FILTER_TYPES.CURRENCY_RANGE]: CurrencyRangeFilter,\n};\nexport const FilterMapItem: React.ComponentType<\n Omit<FilterProps, 'patchHeaderFilterButtonAndMenu' | 'patchHeader' | 'onValueChange'>\n> = (props) => {\n const { column, filterValue: filters, onFiltersChange } = props;\n\n const { patchHeaderFilterButtonAndMenu, patchHeader } = useContext(DataTableContext);\n\n const filterValue = filters.find((filter) => filter.id === column.id);\n\n const onValueChange = useCallback(\n (type: string, newValue: any) => {\n const filterIndex = filters.findIndex((filter) => filter.id === column.id);\n if (newValue === undefined) {\n const newFilters = filters.filter((filter) => filter.id !== column.id);\n onFiltersChange(newFilters);\n } else if (filterIndex === -1) {\n onFiltersChange([...filters, { id: column.id, type, value: newValue }]);\n } else {\n const newFilters = [...filters];\n newFilters[filterIndex].type = type;\n newFilters[filterIndex].value = newValue;\n onFiltersChange(newFilters);\n }\n },\n [column.id, filters, onFiltersChange],\n );\n\n const filterProps = {\n ...props,\n filterValue: filterValue?.value,\n onValueChange,\n patchHeader,\n patchHeaderFilterButtonAndMenu,\n };\n\n if (typeof column.filter === 'string') {\n if (!(column.filter in FilterMapper)) {\n throw new Error(`column.filter must be a supported out-of-the-box filter in ${column}`);\n }\n const FilterComp = FilterMapper[column.filter];\n return <FilterComp {...filterProps} />;\n }\n\n if (column.Filter) {\n if (typeof column.Filter !== 'function') {\n throw new Error(`column.Filter must be a component`);\n }\n const FilterComp = column.Filter;\n return <FilterComp {...filterProps} />;\n }\n\n // Column doesn't have any filters\n return null;\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,mBAA+C;AAC/C,qBAQO;AACP,8BAA6B;AAC7B,8B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Ae,YAAa;AAAA,EACtC;AAEA,MAAI,OAAO,QAAQ;AACjB,QAAI,OAAO,OAAO,WAAW,YAAY;AACvC,YAAM,IAAI,MAAM,mCAAmC;AAAA,IACrD;AACA,UAAM,aAAa,OAAO;AAC1B,WAAO,mDAAC,+BAAe,YAAa;AAAA,EACtC;AAGA,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -42,9 +42,7 @@ __export(HeaderCell_exports, {
42
42
  module.exports = __toCommonJS(HeaderCell_exports);
43
43
  var React = __toESM(require("react"));
44
44
  var import_react = __toESM(require("react"));
45
- var import_react_redux = require("react-redux");
46
45
  var import_ds_grid = require("@elliemae/ds-grid");
47
- var import_reducers = require("../../redux/reducers");
48
46
  var import_styled = require("../../styled");
49
47
  var import_DataTableContext = require("../../DataTableContext");
50
48
  var import_SortByCaret = require("../SortByCaret");
@@ -69,20 +67,16 @@ const buildScreenReaderInstructions = (colSpan, draggable, filterable, sortable)
69
67
  }
70
68
  return `${preffix}${message}`;
71
69
  };
72
- function mapStateToProps(state, ownProps) {
73
- return {
74
- reduxHeader: state.headers?.[ownProps.column.id]
75
- };
76
- }
77
- const connector = (0, import_react_redux.connect)(mapStateToProps);
78
- const HeaderCellComp = (props) => {
79
- const { reduxHeader, column, isDragOverlay, colSpan } = props;
70
+ const HeaderCell = (props) => {
71
+ const { column, isDragOverlay, colSpan } = props;
80
72
  const ctx = (0, import_react.useContext)(import_DataTableContext.DataTableContext);
81
73
  const {
82
74
  tableProps: { isResizeable, onColumnSortChange, dragAndDropColumns, onFiltersChange, filters, textWrap },
83
- flattenedData
75
+ flattenedData,
76
+ reduxHeaders,
77
+ patchHeader
84
78
  } = ctx;
85
- const { patchHeader } = (0, import_reducers.useDispatchHeadersActions)();
79
+ const reduxHeader = (0, import_react.useMemo)(() => reduxHeaders[column.id], [reduxHeaders, column]);
86
80
  const dragHandleRef = (0, import_react.useRef)(null);
87
81
  const filterIconRef = (0, import_react.useRef)(null);
88
82
  const { draggableProps } = (0, import_react.useContext)(import_SortableItemContext.SortableItemContext);
@@ -162,5 +156,4 @@ const HeaderCellComp = (props) => {
162
156
  "aria-hidden": "false"
163
157
  }, buildScreenReaderInstructions(colSpan, dragAndDropColumns && column.disableDnD !== true, hasFilter, column.canSort)));
164
158
  };
165
- const HeaderCell = connector(HeaderCellComp);
166
159
  //# sourceMappingURL=HeaderCell.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/parts/Headers/HeaderCell.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable max-params */\n/* eslint-disable max-lines */\n/* eslint-disable complexity */\n/* eslint-disable react/prop-types */\nimport React, { useContext, useMemo, useRef } from 'react';\nimport { connect, ConnectedProps } from 'react-redux';\nimport { Grid } from '@elliemae/ds-grid';\nimport { useDispatchHeadersActions } from '../../redux/reducers';\nimport { StyledHeadTh, StyledHeaderRightIconsWrapper, StyledFocusWithin } from '../../styled';\nimport { DataTableContext } from '../../DataTableContext';\nimport { SortByCaret } from '../SortByCaret';\nimport { DnDHandle } from '..';\nimport { SortableItemContext } from '../HoC/SortableItemContext';\nimport { FilterMapItem } from '../Filters';\nimport { HeaderResizer } from './HeaderResizer';\nimport { TypescriptColumn } from '../../types/props';\nimport { useHeaderCellHandlers } from './useHeaderCellHandlers';\nimport { useHeaderCellConfig } from './useHeaderCellConfig';\nimport { useRecoverFocusCol } from '../../hooks/useRecoverFocusCol';\nimport { DATA_TESTID } from '../../configs/constants';\nimport { HeaderCellTitle } from './HeaderCellTitle';\n\nconst buildScreenReaderInstructions = (colSpan: number, draggable: boolean, filterable: boolean, sortable: boolean) => {\n const preffix = colSpan === 1 ? '' : 'Column Group. ';\n if (!draggable && !filterable && !sortable) return preffix;\n\n let message = sortable\n ? 'You can sort the data ascendingly/descendingly by this column. Use the up / down arrows keys to do so'\n : '';\n if (draggable && filterable) {\n message = `This column is draggable and filterable. To enable these interactions press the enter key. ${message}`;\n } else if (draggable || filterable) {\n message = `This column is ${\n draggable ? 'draggable' : 'filterable'\n }. To enable this interaction press the enter key. ${message}`;\n }\n return `${preffix}${message}`;\n};\n\ninterface HeaderCellCompProps {\n column: TypescriptColumn;\n isDragOverlay: boolean;\n colSpan: number;\n}\n\nfunction mapStateToProps(state, ownProps) {\n return {\n reduxHeader: state.headers?.[ownProps.column.id],\n };\n}\n\nconst connector = connect(mapStateToProps);\n\nconst HeaderCellComp: React.ComponentType<HeaderCellCompProps & ConnectedProps<typeof connector>> = (props) => {\n const { reduxHeader, column, isDragOverlay, colSpan } = props;\n const ctx = useContext(DataTableContext);\n const {\n tableProps: { isResizeable, onColumnSortChange, dragAndDropColumns, onFiltersChange, filters, textWrap },\n flattenedData,\n } = ctx;\n const { patchHeader } = useDispatchHeadersActions();\n const dragHandleRef = useRef<HTMLDivElement>(null);\n const filterIconRef = useRef<HTMLDivElement>(null);\n\n const { draggableProps } = useContext(SortableItemContext);\n\n const { hasFilter, hasDnD, hasSortingCaret, hasRightIcons, shouldShowDnD, hCols, isDragging } = useHeaderCellConfig({\n column,\n dragAndDropColumns,\n draggableProps,\n reduxHeader,\n isDragOverlay,\n });\n\n useRecoverFocusCol(isDragging, dragHandleRef);\n\n const rightIcons = useMemo(() => {\n if (!hasRightIcons) return null;\n return (\n <StyledHeaderRightIconsWrapper>\n <FilterMapItem\n column={column}\n ctx={ctx}\n onFiltersChange={onFiltersChange}\n reduxHeader={reduxHeader}\n filterValue={filters}\n innerRef={filterIconRef}\n />\n {hasSortingCaret && <SortByCaret isSortedDesc={column.isSortedDesc} />}\n </StyledHeaderRightIconsWrapper>\n );\n }, [hasRightIcons, column, ctx, onFiltersChange, reduxHeader, filters, hasSortingCaret]);\n\n const DnDHandleComponent = useMemo(\n () => (\n <Grid mr=\"2px\" alignItems=\"center\" style={{ position: 'relative' }}>\n <StyledFocusWithin hideFocus={isDragging}>\n <DnDHandle\n key={column.id}\n innerRef={dragHandleRef}\n isReachable={reduxHeader?.withTabStops}\n id={column.id}\n isDragOverlay={isDragOverlay}\n />\n </StyledFocusWithin>\n </Grid>\n ),\n [column.id, isDragOverlay, isDragging, reduxHeader?.withTabStops],\n );\n\n const handlers = useHeaderCellHandlers({\n hasFilter,\n patchHeader,\n column,\n reduxHeader,\n hasDnD,\n onColumnSortChange,\n dragHandleRef,\n filterIconRef,\n headerRef: column.ref,\n });\n\n return (\n <StyledHeadTh\n column={column}\n {...handlers}\n role={colSpan === 1 ? 'columnheader' : 'group'}\n colSpan={colSpan}\n aria-describedby={`${column.id}-instructions`}\n // eslint-disable-next-line no-nested-ternary\n aria-sort={hasSortingCaret ? (column.isSortedDesc ? 'descending' : 'ascending') : 'none'}\n data-testid={DATA_TESTID.DATA_TABLE_HEADER}\n isFirstRowGroup={!!flattenedData[0]?.original?.dimsumHeaderValue}\n tabIndex={column.isFocuseable === false ? -1 : 0}\n isDragOverlay={isDragOverlay}\n isDraggingActive={draggableProps && draggableProps.active}\n shouldShowDnD={shouldShowDnD}\n ref={column.ref}\n >\n <Grid width=\"100%\" cols={hCols}>\n {shouldShowDnD && DnDHandleComponent}\n <HeaderCellTitle column={column} ctx={ctx} draggableProps={draggableProps} textWrap={textWrap} />\n {rightIcons}\n {isResizeable && column.canResize !== false && <HeaderResizer column={column} />}\n </Grid>\n <span id={`${column.id}-instructions`} style={{ display: 'none' }} aria-hidden=\"false\">\n {buildScreenReaderInstructions(\n colSpan,\n dragAndDropColumns && column.disableDnD !== true,\n hasFilter,\n column.canSort,\n )}\n </span>\n </StyledHeadTh>\n );\n};\n\nexport const HeaderCell = connector(HeaderCellComp);\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADIvB,mBAAmD;AACnD,yBAAwC;AACxC,qBAAqB;AACrB,sBAA0C;AAC1C,oBAA+E;AAC/E,8BAAiC;AACjC,yBAA4B;AAC5B,eAA0B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C;AAAA,GAAoB,GAC9F,YACA,gBAAgB,OAAO,cAAc,SAAS,mDAAC;AAAA,IAAc;AAAA,GAAgB,CAChF,GACA,mDAAC;AAAA,IAAK,IAAI,GAAG,OAAO;AAAA,IAAmB,OAAO,EAAE,SAAS,OAAO;AAAA,IAAG,eAAY;AAAA,KAC5E,8BACC,SACA,sBAAsB,OAAO,eAAe,MAC5C,WACA,OAAO,OACT,CACF,CACF;AAEJ;AAEO,MAAM,aAAa,UAAU,cAAc;",
4
+ "sourcesContent": ["/* eslint-disable max-params */\n/* eslint-disable max-lines */\n/* eslint-disable complexity */\n/* eslint-disable react/prop-types */\nimport React, { useContext, useMemo, useRef } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { StyledHeadTh, StyledHeaderRightIconsWrapper, StyledFocusWithin } from '../../styled';\nimport { DataTableContext } from '../../DataTableContext';\nimport { SortByCaret } from '../SortByCaret';\nimport { DnDHandle } from '..';\nimport { SortableItemContext } from '../HoC/SortableItemContext';\nimport { FilterMapItem } from '../Filters';\nimport { HeaderResizer } from './HeaderResizer';\nimport { TypescriptColumn } from '../../types/props';\nimport { useHeaderCellHandlers } from './useHeaderCellHandlers';\nimport { useHeaderCellConfig } from './useHeaderCellConfig';\nimport { useRecoverFocusCol } from '../../hooks/useRecoverFocusCol';\nimport { DATA_TESTID } from '../../configs/constants';\nimport { HeaderCellTitle } from './HeaderCellTitle';\n\nconst buildScreenReaderInstructions = (colSpan: number, draggable: boolean, filterable: boolean, sortable: boolean) => {\n const preffix = colSpan === 1 ? '' : 'Column Group. ';\n if (!draggable && !filterable && !sortable) return preffix;\n\n let message = sortable\n ? 'You can sort the data ascendingly/descendingly by this column. Use the up / down arrows keys to do so'\n : '';\n if (draggable && filterable) {\n message = `This column is draggable and filterable. To enable these interactions press the enter key. ${message}`;\n } else if (draggable || filterable) {\n message = `This column is ${\n draggable ? 'draggable' : 'filterable'\n }. To enable this interaction press the enter key. ${message}`;\n }\n return `${preffix}${message}`;\n};\n\ninterface HeaderCellCompProps {\n column: TypescriptColumn;\n isDragOverlay: boolean;\n colSpan: number;\n}\n\nexport const HeaderCell: React.ComponentType<HeaderCellCompProps> = (props) => {\n const { column, isDragOverlay, colSpan } = props;\n const ctx = useContext(DataTableContext);\n const {\n tableProps: { isResizeable, onColumnSortChange, dragAndDropColumns, onFiltersChange, filters, textWrap },\n flattenedData,\n reduxHeaders,\n patchHeader,\n } = ctx;\n const reduxHeader = useMemo(() => reduxHeaders[column.id], [reduxHeaders, column]);\n const dragHandleRef = useRef<HTMLDivElement>(null);\n const filterIconRef = useRef<HTMLDivElement>(null);\n\n const { draggableProps } = useContext(SortableItemContext);\n\n const { hasFilter, hasDnD, hasSortingCaret, hasRightIcons, shouldShowDnD, hCols, isDragging } = useHeaderCellConfig({\n column,\n dragAndDropColumns,\n draggableProps,\n reduxHeader,\n isDragOverlay,\n });\n\n useRecoverFocusCol(isDragging, dragHandleRef);\n\n const rightIcons = useMemo(() => {\n if (!hasRightIcons) return null;\n return (\n <StyledHeaderRightIconsWrapper>\n <FilterMapItem\n column={column}\n ctx={ctx}\n onFiltersChange={onFiltersChange}\n reduxHeader={reduxHeader}\n filterValue={filters}\n innerRef={filterIconRef}\n />\n {hasSortingCaret && <SortByCaret isSortedDesc={column.isSortedDesc} />}\n </StyledHeaderRightIconsWrapper>\n );\n }, [hasRightIcons, column, ctx, onFiltersChange, reduxHeader, filters, hasSortingCaret]);\n\n const DnDHandleComponent = useMemo(\n () => (\n <Grid mr=\"2px\" alignItems=\"center\" style={{ position: 'relative' }}>\n <StyledFocusWithin hideFocus={isDragging}>\n <DnDHandle\n key={column.id}\n innerRef={dragHandleRef}\n isReachable={reduxHeader?.withTabStops}\n id={column.id}\n isDragOverlay={isDragOverlay}\n />\n </StyledFocusWithin>\n </Grid>\n ),\n [column.id, isDragOverlay, isDragging, reduxHeader?.withTabStops],\n );\n\n const handlers = useHeaderCellHandlers({\n hasFilter,\n patchHeader,\n column,\n reduxHeader,\n hasDnD,\n onColumnSortChange,\n dragHandleRef,\n filterIconRef,\n headerRef: column.ref,\n });\n\n return (\n <StyledHeadTh\n column={column}\n {...handlers}\n role={colSpan === 1 ? 'columnheader' : 'group'}\n colSpan={colSpan}\n aria-describedby={`${column.id}-instructions`}\n // eslint-disable-next-line no-nested-ternary\n aria-sort={hasSortingCaret ? (column.isSortedDesc ? 'descending' : 'ascending') : 'none'}\n data-testid={DATA_TESTID.DATA_TABLE_HEADER}\n isFirstRowGroup={!!flattenedData[0]?.original?.dimsumHeaderValue}\n tabIndex={column.isFocuseable === false ? -1 : 0}\n isDragOverlay={isDragOverlay}\n isDraggingActive={draggableProps && draggableProps.active}\n shouldShowDnD={shouldShowDnD}\n ref={column.ref}\n >\n <Grid width=\"100%\" cols={hCols}>\n {shouldShowDnD && DnDHandleComponent}\n <HeaderCellTitle column={column} ctx={ctx} draggableProps={draggableProps} textWrap={textWrap} />\n {rightIcons}\n {isResizeable && column.canResize !== false && <HeaderResizer column={column} />}\n </Grid>\n <span id={`${column.id}-instructions`} style={{ display: 'none' }} aria-hidden=\"false\">\n {buildScreenReaderInstructions(\n colSpan,\n dragAndDropColumns && column.disableDnD !== true,\n hasFilter,\n column.canSort,\n )}\n </span>\n </StyledHeadTh>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADIvB,mBAAmD;AACnD,qBAAqB;AACrB,oBAA+E;AAC/E,8BAAiC;AACjC,yBAA4B;AAC5B,eAA0B;AAC1B,iCAAoC;AACpC,qBAA8B;AAC9B,2BAA8B;AAE9B,mCAAsC;AACtC,iCAAoC;AACpC,gCAAmC;AACnC,uBAA4B;AAC5B,6BAAgC;AAEhC,MAAM,gCAAgC,CAAC,SAAiB,WAAoB,YAAqB,aAAsB;AACrH,QAAM,UAAU,YAAY,IAAI,KAAK;AACrC,MAAI,CAAC,aAAa,CA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__export(Row_exports, {
27
27
  module.exports = __toCommonJS(Row_exports);
28
28
  var React = __toESM(require("react"));
29
29
  var import_react = __toESM(require("react"));
30
- var import_react_redux = require("react-redux");
31
30
  var import_ds_system = require("@elliemae/ds-system");
32
31
  var import_DataTableContext = __toESM(require("../DataTableContext"));
33
32
  var import_helpers = require("../helpers");
@@ -45,11 +44,13 @@ const setItemRefs = (measureRef, draggableRef, ref) => {
45
44
  const StyledRow = (0, import_ds_system.styled)("div")`
46
45
  cursor: ${({ disabled }) => disabled ? "not-allowed" : "normal"};
47
46
  `;
48
- const RowComp = (props) => {
49
- const { row, measureRef, itemWrapperStyle, isDragOverlay, focusedRowId, selectedRowId } = props;
47
+ const Row = (props) => {
48
+ const { row, measureRef, itemWrapperStyle, isDragOverlay } = props;
50
49
  const ctx = (0, import_react.useContext)(import_DataTableContext.default);
51
50
  const {
52
- tableProps: { disabledRows }
51
+ tableProps: { disabledRows },
52
+ focusedRowId,
53
+ drilldownRowId
53
54
  } = ctx;
54
55
  const { draggableProps } = (0, import_react.useContext)(import_SortableItemContext.SortableItemContext);
55
56
  const draggableRef = draggableProps && draggableProps.setNodeRef;
@@ -63,14 +64,9 @@ const RowComp = (props) => {
63
64
  isDragOverlay,
64
65
  ctx,
65
66
  focusedRowId,
66
- selectedRowId
67
+ drilldownRowId
67
68
  }));
68
69
  };
69
- const mapStateToProps = (state) => ({
70
- focusedRowId: state.rows.focusedRowId,
71
- selectedRowId: state.rows.selectedRowId
72
- });
73
- const Row = (0, import_react_redux.connect)(mapStateToProps)(RowComp);
74
70
  const RowWithContext = (0, import_withDnDSortableRowContext.withDnDSortableRowContext)(Row);
75
71
  var Row_default = RowWithContext;
76
72
  //# sourceMappingURL=Row.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/parts/Row.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable react/prop-types */\nimport React, { useContext } from 'react';\nimport { connect } from 'react-redux';\nimport { styled } from '@elliemae/ds-system';\nimport DataTableContext from '../DataTableContext';\nimport { setMultipleRefs } from '../helpers';\nimport { SortableItemContext } from './HoC/SortableItemContext';\nimport { withDnDSortableRowContext } from './HoC/withDnDSortableRowContext';\nimport { RowVariantMapItem } from './RowVariants';\n\n// Sortable Items needs to update\n// - the virtual list ref (for react-virtual requirement)\n// - (conditionally) draggableProps.setNodeRef for drag and drop of rows\nconst setItemRefs = (measureRef, draggableRef, ref) => {\n const refsToSet = [];\n if (measureRef) refsToSet.push(measureRef);\n if (draggableRef) refsToSet.push(draggableRef);\n setMultipleRefs(...refsToSet)(ref);\n};\n\nconst StyledRow = styled('div')`\n cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'normal')};\n`;\n\nconst RowComp = (props) => {\n const { row, measureRef, itemWrapperStyle, isDragOverlay, focusedRowId, selectedRowId } = props;\n\n const ctx = useContext(DataTableContext);\n const {\n tableProps: { disabledRows },\n } = ctx;\n const { draggableProps } = useContext(SortableItemContext);\n const draggableRef = draggableProps && draggableProps.setNodeRef;\n return (\n <StyledRow\n disabled={disabledRows[row.uid]}\n style={!isDragOverlay ? itemWrapperStyle : {}}\n ref={(ref) => setItemRefs(measureRef, draggableRef, ref)}\n >\n <RowVariantMapItem\n row={row}\n itemIndex={row.realIndex}\n isDragOverlay={isDragOverlay}\n ctx={ctx}\n focusedRowId={focusedRowId}\n selectedRowId={selectedRowId}\n />\n </StyledRow>\n );\n};\n\nconst mapStateToProps = (state) => ({\n focusedRowId: state.rows.focusedRowId,\n selectedRowId: state.rows.selectedRowId,\n});\n\nexport const Row = connect(mapStateToProps)(RowComp);\n\nconst RowWithContext = withDnDSortableRowContext(Row);\nexport { RowWithContext };\nexport default RowWithContext;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAkC;AAClC,yBAAwB;AACxB,uBAAuB;AACvB,8BAA6B;AAC7B,qBAAgC;AAChC,iCAAoC;AACpC,uCAA0C;AAC1C,yBAAkC;AAKlC,MAAM,cAAc,CAAC,YAAY,cAAc,QAAQ;AACrD,QAAM,YAAY,CAAC;AACnB,MAAI;AAAY,cAAU,KAAK,UAAU;AACzC,MAAI;AAAc,cAAU,KAAK,YAAY;AAC7C,sCAAgB,GAAG,SAAS,EAAE,GAAG;AACnC;AAEA,MAAM,YAAY,6BAAO,KAAK;AAAA,YAClB,CAAC,EAAE,eAAgB,WAAW,gBAAgB;AAAA;AAG1D,MAAM,UAAU,CAAC,UAAU;AACzB,QAAM,EAAE,KAAK,YAAY,kBAAkB,eAAe,cAAc,kBAAkB;AAE1F,QAAM,MAAM,6BAAW,+BAAgB;AACvC,QAAM;AAAA,IACJ,YAAY,EAAE;AAAA,MACZ;AACJ,QAAM,EAAE,mBAAmB,6BAAW,8CAAmB;AACzD,QAAM,eAAe,kBAAkB,eAAe;AACtD,SACE,mDAAC;AAAA,IACC,UAAU,aAAa,IAAI;AAAA,IAC3B,OAAO,CAAC,gBAAgB,mBAAmB,CAAC;AAAA,IAC5C,KAAK,CAAC,QAAQ,YAAY,YAAY,cAAc,GAAG;AAAA,KAEvD,mDAAC;AAAA,IACC;AAAA,IACA,WAAW,IAAI;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,GACF,CACF;AAEJ;AAEA,MAAM,kBAAkB,CAAC,UAAW;AAAA,EAClC,cAAc,MAAM,KAAK;AAAA,EACzB,eAAe,MAAM,KAAK;AAC5B;AAEO,MAAM,MAAM,gCAAQ,eAAe,EAAE,OAAO;AAEnD,MAAM,iBAAiB,gEAA0B,GAAG;AAEpD,IAAO,cAAQ;",
4
+ "sourcesContent": ["/* eslint-disable react/prop-types */\nimport React, { useContext } from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport DataTableContext from '../DataTableContext';\nimport { setMultipleRefs } from '../helpers';\nimport { SortableItemContext } from './HoC/SortableItemContext';\nimport { withDnDSortableRowContext } from './HoC/withDnDSortableRowContext';\nimport { RowVariantMapItem } from './RowVariants';\n\n// Sortable Items needs to update\n// - the virtual list ref (for react-virtual requirement)\n// - (conditionally) draggableProps.setNodeRef for drag and drop of rows\nconst setItemRefs = (measureRef, draggableRef, ref) => {\n const refsToSet = [];\n if (measureRef) refsToSet.push(measureRef);\n if (draggableRef) refsToSet.push(draggableRef);\n setMultipleRefs(...refsToSet)(ref);\n};\n\nconst StyledRow = styled('div')`\n cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'normal')};\n`;\n\nexport const Row = (props) => {\n const { row, measureRef, itemWrapperStyle, isDragOverlay } = props;\n\n const ctx = useContext(DataTableContext);\n const {\n tableProps: { disabledRows },\n focusedRowId,\n drilldownRowId,\n } = ctx;\n const { draggableProps } = useContext(SortableItemContext);\n const draggableRef = draggableProps && draggableProps.setNodeRef;\n return (\n <StyledRow\n disabled={disabledRows[row.uid]}\n style={!isDragOverlay ? itemWrapperStyle : {}}\n ref={(ref) => setItemRefs(measureRef, draggableRef, ref)}\n >\n <RowVariantMapItem\n row={row}\n itemIndex={row.realIndex}\n isDragOverlay={isDragOverlay}\n ctx={ctx}\n focusedRowId={focusedRowId}\n drilldownRowId={drilldownRowId}\n />\n </StyledRow>\n );\n};\n\nconst RowWithContext = withDnDSortableRowContext(Row);\nexport { RowWithContext };\nexport default RowWithContext;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAkC;AAClC,uBAAuB;AACvB,8BAA6B;AAC7B,qBAAgC;AAChC,iCAAoC;AACpC,uCAA0C;AAC1C,yBAAkC;AAKlC,MAAM,cAAc,CAAC,YAAY,cAAc,QAAQ;AACrD,QAAM,YAAY,CAAC;AACnB,MAAI;AAAY,cAAU,KAAK,UAAU;AACzC,MAAI;AAAc,cAAU,KAAK,YAAY;AAC7C,sCAAgB,GAAG,SAAS,EAAE,GAAG;AACnC;AAEA,MAAM,YAAY,6BAAO,KAAK;AAAA,YAClB,CAAC,EAAE,eAAgB,WAAW,gBAAgB;AAAA;AAGnD,MAAM,MAAM,CAAC,UAAU;AAC5B,QAAM,EAAE,KAAK,YAAY,kBAAkB,kBAAkB;AAE7D,QAAM,MAAM,6BAAW,+BAAgB;AACvC,QAAM;AAAA,IACJ,YAAY,EAAE;AAAA,IACd;AAAA,IACA;AAAA,MACE;AACJ,QAAM,EAAE,mBAAmB,6BAAW,8CAAmB;AACzD,QAAM,eAAe,kBAAkB,eAAe;AACtD,SACE,mDAAC;AAAA,IACC,UAAU,aAAa,IAAI;AAAA,IAC3B,OAAO,CAAC,gBAAgB,mBAAmB,CAAC;AAAA,IAC5C,KAAK,CAAC,QAAQ,YAAY,YAAY,cAAc,GAAG;AAAA,KAEvD,mDAAC;AAAA,IACC;AAAA,IACA,WAAW,IAAI;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,GACF,CACF;AAEJ;AAEA,MAAM,iBAAiB,gEAA0B,GAAG;AAEpD,IAAO,cAAQ;",
6
6
  "names": []
7
7
  }
@@ -39,7 +39,7 @@ const RowContent = (props) => {
39
39
  },
40
40
  backgroundColor = "white",
41
41
  focusedRowId,
42
- selectedRowId
42
+ drilldownRowId
43
43
  } = props;
44
44
  const rowRef = (0, import_react.useRef)(null);
45
45
  const hasExpandCell = (0, import_react.useMemo)(() => row.original.subRows && row.cells.find((cell) => cell.column.accessor === "expandRowColumn"), [row]);
@@ -67,7 +67,7 @@ const RowContent = (props) => {
67
67
  }, hasExpandCell ? /* @__PURE__ */ import_react.default.createElement(import_Columns.expandRowColumn.Cell, {
68
68
  row,
69
69
  cell: row.cells[0],
70
- isRowSelected: selectedRowId === row.uid,
70
+ isRowSelected: drilldownRowId === row.uid,
71
71
  ctx,
72
72
  draggableProps: {}
73
73
  }) : /* @__PURE__ */ import_react.default.createElement(import_ds_grid.Grid, {
@@ -79,7 +79,7 @@ const RowVariantHeader = ({
79
79
  itemIndex,
80
80
  isDragOverlay,
81
81
  focusedRowId,
82
- selectedRowId
82
+ drilldownRowId
83
83
  }) => /* @__PURE__ */ import_react.default.createElement(import_RowRenderer.RowRenderer, {
84
84
  row,
85
85
  itemIndex,
@@ -88,6 +88,6 @@ const RowVariantHeader = ({
88
88
  height: "24px",
89
89
  CustomRowContentRenderer: RowContent,
90
90
  focusedRowId,
91
- selectedRowId
91
+ drilldownRowId
92
92
  });
93
93
  //# sourceMappingURL=RowVariantHeader.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/parts/RowVariants/RowVariantHeader.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable react/prop-types */\nimport React, { useLayoutEffect, useMemo, useRef } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { RowRenderer } from '../../exported-related/RowRenderer';\nimport { GroupHeaderContainer, GroupHeaderTitle, StyledCellContainer } from '../../styled';\nimport { RowVariantProps } from './types';\nimport { expandRowColumn } from '../../addons/Columns';\nimport { DATA_TESTID } from '../../configs/constants';\n\nconst RowContent: React.ComponentType<RowVariantProps> = (props) => {\n const {\n row,\n ctx,\n ctx: {\n tableProps: { groupedRowsRenderHeader },\n },\n backgroundColor = 'white',\n focusedRowId,\n selectedRowId,\n } = props;\n\n const rowRef = useRef<HTMLDivElement>(null);\n\n const hasExpandCell = useMemo(\n () => row.original.subRows && row.cells.find((cell) => cell.column.accessor === 'expandRowColumn'),\n [row],\n );\n\n const titleContent = useMemo(() => {\n if (typeof groupedRowsRenderHeader === 'function') {\n return groupedRowsRenderHeader(row.original.dimsumHeaderValue, row.original.subRows);\n }\n return row.original.dimsumHeaderValue;\n }, [groupedRowsRenderHeader, row]);\n\n useLayoutEffect(() => {\n if (row.uid === focusedRowId) {\n rowRef.current.focus();\n }\n }, [focusedRowId, row.uid]);\n\n return (\n <StyledCellContainer\n ref={rowRef}\n minHeight=\"0px\"\n tabIndex={0}\n backgroundColor={backgroundColor}\n data-testid={DATA_TESTID.DATA_TABLE_ROW_HEADER_CONTENT}\n >\n <GroupHeaderContainer\n data-testid={DATA_TESTID.DATA_TABLE_ROW_GROUP_HEADER}\n cols={hasExpandCell ? ['min-content', 'auto'] : ['auto']}\n padding={hasExpandCell ? '4px' : '16px'}\n >\n {hasExpandCell ? (\n <expandRowColumn.Cell\n row={row}\n cell={row.cells[0]}\n isRowSelected={selectedRowId === row.uid}\n ctx={ctx}\n draggableProps={{}}\n />\n ) : (\n <Grid width=\"16px\" />\n )}\n <GroupHeaderTitle>{titleContent}</GroupHeaderTitle>\n </GroupHeaderContainer>\n </StyledCellContainer>\n );\n};\n\nexport const RowVariantHeader: React.ComponentType<RowVariantProps> = ({\n row,\n itemIndex,\n isDragOverlay,\n focusedRowId,\n selectedRowId,\n}) => (\n <RowRenderer\n row={row}\n itemIndex={itemIndex}\n isDragOverlay={isDragOverlay}\n minHeight=\"0px\"\n height=\"24px\"\n CustomRowContentRenderer={RowContent}\n focusedRowId={focusedRowId}\n selectedRowId={selectedRowId}\n />\n);\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAwD;AACxD,qBAAqB;AACrB,yBAA4B;AAC5B,oBAA4E;AAE5E,qBAAgC;AAChC,uBAA4B;AAE5B,MAAM,aAAmD,CAAC,UAAU;AAClE,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,KAAK;AAAA,MACH,YAAY,EAAE;AAAA;AAAA,IAEhB,kBAAkB;AAAA,IAClB;AAAA,IACA;AAAA,MACE;AAEJ,QAAM,SAAS,yBAAuB,IAAI;AAE1C,QAAM,gBAAgB,0BACpB,MAAM,IAAI,SAAS,WAAW,IAAI,MAAM,KAAK,CAAC,SAAS,KAAK,OAAO,aAAa,iBAAiB,GACjG,CAAC,GAAG,CACN;AAEA,QAAM,eAAe,0BAAQ,MAAM;AACjC,QAAI,OAAO,4BAA4B,YAAY;AACjD,aAAO,wBAAwB,IAAI,SAAS,mBAAmB,IAAI,SAAS,OAAO;AAAA,IACrF;AACA,WAAO,IAAI,SAAS;AAAA,EACtB,GAAG,CAAC,yBAAyB,GAAG,CAAC;AAEjC,oCAAgB,MAAM;AACpB,QAAI,IAAI,QAAQ,cAAc;AAC5B,aAAO,QAAQ,MAAM;AAAA,IACvB;AAAA,EACF,GAAG,CAAC,cAAc,IAAI,GAAG,CAAC;AAE1B,SACE,mDAAC;AAAA,IACC,KAAK;AAAA,IACL,WAAU;AAAA,IACV,UAAU;AAAA,IACV;AAAA,IACA,eAAa,6BAAY;AAAA,KAEzB,mDAAC;AAAA,IACC,eAAa,6BAAY;AAAA,IACzB,MAAM,gBAAgB,CAAC,eAAe,MAAM,IAAI,CAAC,MAAM;AAAA,IACvD,SAAS,gBAAgB,QAAQ;AAAA,KAEhC,gBACC,mDAAC,+BAAgB,MAAhB;AAAA,IACC;AAAA,IACA,MAAM,IAAI,MAAM;AAAA,IAChB,eAAe,kBAAkB,IAAI;AAAA,IACrC;AAAA,IACA,gBAAgB,CAAC;AAAA,GACnB,IAEA,mDAAC;AAAA,IAAK,OAAM;AAAA,GAAO,GAErB,mDAAC,sCAAkB,YAAa,CAClC,CACF;AAEJ;AAEO,MAAM,mBAAyD,CAAC;AAAA,EACrE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,MAEA,mDAAC;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAU;AAAA,EACV,QAAO;AAAA,EACP,0BAA0B;AAAA,EAC1B;AAAA,EACA;AAAA,CACF;",
4
+ "sourcesContent": ["/* eslint-disable react/prop-types */\nimport React, { useLayoutEffect, useMemo, useRef } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { RowRenderer } from '../../exported-related/RowRenderer';\nimport { GroupHeaderContainer, GroupHeaderTitle, StyledCellContainer } from '../../styled';\nimport { RowVariantProps } from './types';\nimport { expandRowColumn } from '../../addons/Columns';\nimport { DATA_TESTID } from '../../configs/constants';\n\nconst RowContent: React.ComponentType<RowVariantProps> = (props) => {\n const {\n row,\n ctx,\n ctx: {\n tableProps: { groupedRowsRenderHeader },\n },\n backgroundColor = 'white',\n focusedRowId,\n drilldownRowId,\n } = props;\n\n const rowRef = useRef<HTMLDivElement>(null);\n\n const hasExpandCell = useMemo(\n () => row.original.subRows && row.cells.find((cell) => cell.column.accessor === 'expandRowColumn'),\n [row],\n );\n\n const titleContent = useMemo(() => {\n if (typeof groupedRowsRenderHeader === 'function') {\n return groupedRowsRenderHeader(row.original.dimsumHeaderValue, row.original.subRows);\n }\n return row.original.dimsumHeaderValue;\n }, [groupedRowsRenderHeader, row]);\n\n useLayoutEffect(() => {\n if (row.uid === focusedRowId) {\n rowRef.current.focus();\n }\n }, [focusedRowId, row.uid]);\n\n return (\n <StyledCellContainer\n ref={rowRef}\n minHeight=\"0px\"\n tabIndex={0}\n backgroundColor={backgroundColor}\n data-testid={DATA_TESTID.DATA_TABLE_ROW_HEADER_CONTENT}\n >\n <GroupHeaderContainer\n data-testid={DATA_TESTID.DATA_TABLE_ROW_GROUP_HEADER}\n cols={hasExpandCell ? ['min-content', 'auto'] : ['auto']}\n padding={hasExpandCell ? '4px' : '16px'}\n >\n {hasExpandCell ? (\n <expandRowColumn.Cell\n row={row}\n cell={row.cells[0]}\n isRowSelected={drilldownRowId === row.uid}\n ctx={ctx}\n draggableProps={{}}\n />\n ) : (\n <Grid width=\"16px\" />\n )}\n <GroupHeaderTitle>{titleContent}</GroupHeaderTitle>\n </GroupHeaderContainer>\n </StyledCellContainer>\n );\n};\n\nexport const RowVariantHeader: React.ComponentType<RowVariantProps> = ({\n row,\n itemIndex,\n isDragOverlay,\n focusedRowId,\n drilldownRowId,\n}) => (\n <RowRenderer\n row={row}\n itemIndex={itemIndex}\n isDragOverlay={isDragOverlay}\n minHeight=\"0px\"\n height=\"24px\"\n CustomRowContentRenderer={RowContent}\n focusedRowId={focusedRowId}\n drilldownRowId={drilldownRowId}\n />\n);\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAwD;AACxD,qBAAqB;AACrB,yBAA4B;AAC5B,oBAA4E;AAE5E,qBAAgC;AAChC,uBAA4B;AAE5B,MAAM,aAAmD,CAAC,UAAU;AAClE,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,KAAK;AAAA,MACH,YAAY,EAAE;AAAA;AAAA,IAEhB,kBAAkB;AAAA,IAClB;AAAA,IACA;AAAA,MACE;AAEJ,QAAM,SAAS,yBAAuB,IAAI;AAE1C,QAAM,gBAAgB,0BACpB,MAAM,IAAI,SAAS,WAAW,IAAI,MAAM,KAAK,CAAC,SAAS,KAAK,OAAO,aAAa,iBAAiB,GACjG,CAAC,GAAG,CACN;AAEA,QAAM,eAAe,0BAAQ,MAAM;AACjC,QAAI,OAAO,4BAA4B,YAAY;AACjD,aAAO,wBAAwB,IAAI,SAAS,mBAAmB,IAAI,SAAS,OAAO;AAAA,IACrF;AACA,WAAO,IAAI,SAAS;AAAA,EACtB,GAAG,CAAC,yBAAyB,GAAG,CAAC;AAEjC,oCAAgB,MAAM;AACpB,QAAI,IAAI,QAAQ,cAAc;AAC5B,aAAO,QAAQ,MAAM;AAAA,IACvB;AAAA,EACF,GAAG,CAAC,cAAc,IAAI,GAAG,CAAC;AAE1B,SACE,mDAAC;AAAA,IACC,KAAK;AAAA,IACL,WAAU;AAAA,IACV,UAAU;AAAA,IACV;AAAA,IACA,eAAa,6BAAY;AAAA,KAEzB,mDAAC;AAAA,IACC,eAAa,6BAAY;AAAA,IACzB,MAAM,gBAAgB,CAAC,eAAe,MAAM,IAAI,CAAC,MAAM;AAAA,IACvD,SAAS,gBAAgB,QAAQ;AAAA,KAEhC,gBACC,mDAAC,+BAAgB,MAAhB;AAAA,IACC;AAAA,IACA,MAAM,IAAI,MAAM;AAAA,IAChB,eAAe,mBAAmB,IAAI;AAAA,IACtC;AAAA,IACA,gBAAgB,CAAC;AAAA,GACnB,IAEA,mDAAC;AAAA,IAAK,OAAM;AAAA,GAAO,GAErB,mDAAC,sCAAkB,YAAa,CAClC,CACF;AAEJ;AAEO,MAAM,mBAAyD,CAAC;AAAA,EACrE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,MAEA,mDAAC;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAU;AAAA,EACV,QAAO;AAAA,EACP,0BAA0B;AAAA,EAC1B;AAAA,EACA;AAAA,CACF;",
6
6
  "names": []
7
7
  }
@@ -32,7 +32,7 @@ const RowVariantPrimary = ({
32
32
  isDragOverlay,
33
33
  ctx,
34
34
  focusedRowId,
35
- selectedRowId,
35
+ drilldownRowId,
36
36
  compact
37
37
  }) => {
38
38
  const {
@@ -48,7 +48,7 @@ const RowVariantPrimary = ({
48
48
  colsLayout: row.isExpanded ? void 0 : gridLayout,
49
49
  rowsLayout: row.isExpanded ? ["auto", "auto"] : [1],
50
50
  focusedRowId,
51
- selectedRowId
51
+ drilldownRowId
52
52
  });
53
53
  };
54
54
  //# sourceMappingURL=RowVariantPrimary.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/parts/RowVariants/RowVariantPrimary.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { RowVariantProps } from './types';\nimport { RowRenderer } from '../../exported-related/RowRenderer';\n\nexport const RowVariantPrimary: React.ComponentType<RowVariantProps> = ({\n row,\n itemIndex,\n isDragOverlay,\n ctx,\n focusedRowId,\n selectedRowId,\n compact,\n}) => {\n const {\n layoutHelpers: { gridLayout },\n } = ctx;\n\n return (\n <RowRenderer\n row={row}\n itemIndex={itemIndex}\n isDragOverlay={isDragOverlay}\n compact={compact}\n height={compact ? '24px' : 'auto'}\n minHeight={compact ? '24px' : '36px'}\n colsLayout={row.isExpanded ? undefined : gridLayout}\n rowsLayout={row.isExpanded ? ['auto', 'auto'] : [1]}\n focusedRowId={focusedRowId}\n selectedRowId={selectedRowId}\n />\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
4
+ "sourcesContent": ["/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { RowVariantProps } from './types';\nimport { RowRenderer } from '../../exported-related/RowRenderer';\n\nexport const RowVariantPrimary: React.ComponentType<RowVariantProps> = ({\n row,\n itemIndex,\n isDragOverlay,\n ctx,\n focusedRowId,\n drilldownRowId,\n compact,\n}) => {\n const {\n layoutHelpers: { gridLayout },\n } = ctx;\n\n return (\n <RowRenderer\n row={row}\n itemIndex={itemIndex}\n isDragOverlay={isDragOverlay}\n compact={compact}\n height={compact ? '24px' : 'auto'}\n minHeight={compact ? '24px' : '36px'}\n colsLayout={row.isExpanded ? undefined : gridLayout}\n rowsLayout={row.isExpanded ? ['auto', 'auto'] : [1]}\n focusedRowId={focusedRowId}\n drilldownRowId={drilldownRowId}\n />\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAkB;AAElB,yBAA4B;AAErB,MAAM,oBAA0D,CAAC;AAAA,EACtE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,MACI;AACJ,QAAM;AAAA,IACJ,eAAe,EAAE;AAAA,MACf;AAEJ,SACE,mDAAC;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,QAAQ,UAAU,SAAS;AAAA,IAC3B,WAAW,UAAU,SAAS;AAAA,IAC9B,YAAY,IAAI,aAAa,SAAY;AAAA,IACzC,YAAY,IAAI,aAAa,CAAC,QAAQ,MAAM,IAAI,CAAC,CAAC;AAAA,IAClD;AAAA,IACA;AAAA,GACF;AAEJ;",
6
6
  "names": []
7
7
  }
@@ -32,7 +32,7 @@ const RowVariantSecondary = ({
32
32
  isDragOverlay,
33
33
  ctx,
34
34
  focusedRowId,
35
- selectedRowId,
35
+ drilldownRowId,
36
36
  compact
37
37
  }) => {
38
38
  const {
@@ -49,7 +49,7 @@ const RowVariantSecondary = ({
49
49
  rowsLayout: row.isExpanded ? ["auto", "auto"] : [1],
50
50
  backgroundColor: "#F6F7F9",
51
51
  focusedRowId,
52
- selectedRowId
52
+ drilldownRowId
53
53
  });
54
54
  };
55
55
  //# sourceMappingURL=RowVariantSecondary.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/parts/RowVariants/RowVariantSecondary.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { RowVariantProps } from './types';\nimport { RowRenderer } from '../../exported-related/RowRenderer';\n\nexport const RowVariantSecondary: React.ComponentType<RowVariantProps> = ({\n row,\n itemIndex,\n isDragOverlay,\n ctx,\n focusedRowId,\n selectedRowId,\n compact,\n}) => {\n const {\n layoutHelpers: { gridLayout },\n } = ctx;\n\n return (\n <RowRenderer\n row={row}\n itemIndex={itemIndex}\n isDragOverlay={isDragOverlay}\n compact={compact}\n height={compact ? '24px' : 'auto'}\n minHeight={compact ? '24px' : '36px'}\n colsLayout={row.isExpanded ? undefined : gridLayout}\n rowsLayout={row.isExpanded ? ['auto', 'auto'] : [1]}\n backgroundColor=\"#F6F7F9\"\n focusedRowId={focusedRowId}\n selectedRowId={selectedRowId}\n />\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
4
+ "sourcesContent": ["/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { RowVariantProps } from './types';\nimport { RowRenderer } from '../../exported-related/RowRenderer';\n\nexport const RowVariantSecondary: React.ComponentType<RowVariantProps> = ({\n row,\n itemIndex,\n isDragOverlay,\n ctx,\n focusedRowId,\n drilldownRowId,\n compact,\n}) => {\n const {\n layoutHelpers: { gridLayout },\n } = ctx;\n\n return (\n <RowRenderer\n row={row}\n itemIndex={itemIndex}\n isDragOverlay={isDragOverlay}\n compact={compact}\n height={compact ? '24px' : 'auto'}\n minHeight={compact ? '24px' : '36px'}\n colsLayout={row.isExpanded ? undefined : gridLayout}\n rowsLayout={row.isExpanded ? ['auto', 'auto'] : [1]}\n backgroundColor=\"#F6F7F9\"\n focusedRowId={focusedRowId}\n drilldownRowId={drilldownRowId}\n />\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAkB;AAElB,yBAA4B;AAErB,MAAM,sBAA4D,CAAC;AAAA,EACxE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,MACI;AACJ,QAAM;AAAA,IACJ,eAAe,EAAE;AAAA,MACf;AAEJ,SACE,mDAAC;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,QAAQ,UAAU,SAAS;AAAA,IAC3B,WAAW,UAAU,SAAS;AAAA,IAC9B,YAAY,IAAI,aAAa,SAAY;AAAA,IACzC,YAAY,IAAI,aAAa,CAAC,QAAQ,MAAM,IAAI,CAAC,CAAC;AAAA,IAClD,iBAAgB;AAAA,IAChB;AAAA,IACA;AAAA,GACF;AAEJ;",
6
6
  "names": []
7
7
  }
@@ -56,7 +56,7 @@ const RowVariantSkeleton = ({
56
56
  itemIndex,
57
57
  isDragOverlay,
58
58
  focusedRowId,
59
- selectedRowId
59
+ drilldownRowId
60
60
  }) => {
61
61
  const newCells = row.cells.map((cell) => __spreadProps(__spreadValues({}, cell), {
62
62
  render: RandomSkeleton
@@ -68,7 +68,7 @@ const RowVariantSkeleton = ({
68
68
  minHeight: "0px",
69
69
  height: "36px",
70
70
  focusedRowId,
71
- selectedRowId
71
+ drilldownRowId
72
72
  });
73
73
  };
74
74
  //# sourceMappingURL=RowVariantSkeleton.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/parts/RowVariants/RowVariantSkeleton.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable react/prop-types */\nimport React, { useContext, useLayoutEffect, useMemo, useRef } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSSkeleton } from '@elliemae/ds-skeleton';\nimport { RowRenderer } from '../../exported-related/RowRenderer';\nimport { GroupHeaderContainer, GroupHeaderTitle, StyledCellContainer } from '../../styled';\nimport { RowVariantProps } from './types';\nimport { expandRowColumn } from '../../addons/Columns';\nimport { DATA_TESTID } from '../../configs/constants';\n\nconst RandomSkeleton = () => {\n const randomPercentage = useMemo(() => Math.floor(Math.random() * 70 + 30), []);\n return <DSSkeleton w={`${randomPercentage}%`} h=\"90%\" />;\n};\n\nexport const RowVariantSkeleton: React.ComponentType<RowVariantProps> = ({\n row,\n itemIndex,\n isDragOverlay,\n focusedRowId,\n selectedRowId,\n}) => {\n const newCells = row.cells.map((cell) => ({\n ...cell,\n render: RandomSkeleton,\n }));\n\n return (\n <RowRenderer\n row={{ ...row, cells: newCells }}\n itemIndex={itemIndex}\n isDragOverlay={isDragOverlay}\n minHeight=\"0px\"\n height=\"36px\"\n focusedRowId={focusedRowId}\n selectedRowId={selectedRowId}\n />\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAoE;AAEpE,yBAA2B;AAC3B,yBAA4B;AAM5B,MAAM,iBAAiB,MAAM;AAC3B,QAAM,mBAAmB,0BAAQ,MAAM,KAAK,MAAM,KAAK,OAAO,IAAI,KAAK,EAAE,GAAG,CAAC,CAAC;AAC9E,SAAO,mDAAC;AAAA,IAAW,GAAG,GAAG;AAAA,IAAqB,GAAE;AAAA,GAAM;AACxD;AAEO,MAAM,qBAA2D,CAAC;AAAA,EACvE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,MACI;AACJ,QAAM,WAAW,IAAI,MAAM,IAAI,CAAC,SAAU,iCACrC,OADqC;AAAA,IAExC,QAAQ;AAAA,EACV,EAAE;AAEF,SACE,mDAAC;AAAA,IACC,KAAK,iCAAK,MAAL,EAAU,OAAO,SAAS;AAAA,IAC/B;AAAA,IACA;AAAA,IACA,WAAU;AAAA,IACV,QAAO;AAAA,IACP;AAAA,IACA;AAAA,GACF;AAEJ;",
4
+ "sourcesContent": ["import React, { useMemo } from 'react';\nimport { DSSkeleton } from '@elliemae/ds-skeleton';\nimport { RowRenderer } from '../../exported-related/RowRenderer';\nimport { RowVariantProps } from './types';\n\nconst RandomSkeleton = () => {\n const randomPercentage = useMemo(() => Math.floor(Math.random() * 70 + 30), []);\n return <DSSkeleton w={`${randomPercentage}%`} h=\"90%\" />;\n};\n\nexport const RowVariantSkeleton: React.ComponentType<RowVariantProps> = ({\n row,\n itemIndex,\n isDragOverlay,\n focusedRowId,\n drilldownRowId,\n}) => {\n const newCells = row.cells.map((cell) => ({\n ...cell,\n render: RandomSkeleton,\n }));\n\n return (\n <RowRenderer\n row={{ ...row, cells: newCells }}\n itemIndex={itemIndex}\n isDragOverlay={isDragOverlay}\n minHeight=\"0px\"\n height=\"36px\"\n focusedRowId={focusedRowId}\n drilldownRowId={drilldownRowId}\n />\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAA+B;AAC/B,yBAA2B;AAC3B,yBAA4B;AAG5B,MAAM,iBAAiB,MAAM;AAC3B,QAAM,mBAAmB,0BAAQ,MAAM,KAAK,MAAM,KAAK,OAAO,IAAI,KAAK,EAAE,GAAG,CAAC,CAAC;AAC9E,SAAO,mDAAC;AAAA,IAAW,GAAG,GAAG;AAAA,IAAqB,GAAE;AAAA,GAAM;AACxD;AAEO,MAAM,qBAA2D,CAAC;AAAA,EACvE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,MACI;AACJ,QAAM,WAAW,IAAI,MAAM,IAAI,CAAC,SAAU,iCACrC,OADqC;AAAA,IAExC,QAAQ;AAAA,EACV,EAAE;AAEF,SACE,mDAAC;AAAA,IACC,KAAK,iCAAK,MAAL,EAAU,OAAO,SAAS;AAAA,IAC/B;AAAA,IACA;AAAA,IACA,WAAU;AAAA,IACV,QAAO;AAAA,IACP;AAAA,IACA;AAAA,GACF;AAEJ;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/parts/RowVariants/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { ROW_VARIANTS } from '../../exported-related';\nimport { TypescriptContext, TypescriptRow } from '../../types/props';\nimport { Cells } from '../Cells';\nimport { RowVariantHeader } from './RowVariantHeader';\nimport { RowVariantPrimary } from './RowVariantPrimary';\nimport { RowVariantSecondary } from './RowVariantSecondary';\nimport { RowVariantSkeleton } from './RowVariantSkeleton';\nimport { RowVariantProps } from './types';\n\nconst RowVariantMapper: Record<string, React.ComponentType<RowVariantProps>> = {\n [ROW_VARIANTS.HEADER_GROUP]: RowVariantHeader,\n [ROW_VARIANTS.PRIMARY]: RowVariantPrimary,\n [ROW_VARIANTS.SECONDARY]: RowVariantSecondary,\n [ROW_VARIANTS.COMPACT_PRIMARY]: (props) => <RowVariantPrimary compact {...props} />,\n [ROW_VARIANTS.COMPACT_SECONDARY]: (props) => <RowVariantSecondary compact {...props} />,\n [ROW_VARIANTS.SKELETON]: RowVariantSkeleton,\n};\n\ninterface RowVariantMapItemProps {\n row: TypescriptRow;\n itemIndex: number;\n isDragOverlay: boolean;\n ctx: TypescriptContext;\n focusedRowId: string;\n selectedRowId: string;\n}\n\nexport const RowVariantMapItem: React.ComponentType<RowVariantMapItemProps> = (props) => {\n const {\n row,\n ctx: {\n tableProps: { getRowVariant },\n },\n } = props;\n\n const variant = getRowVariant(row, Cells);\n\n let Component: React.ComponentType<any>;\n\n if (typeof variant === 'string') {\n if (!(variant in RowVariantMapper)) {\n throw new Error(`${variant} is not an out-of-the-box row variant`);\n }\n Component = RowVariantMapper[variant];\n } else {\n Component = variant;\n }\n\n return <Component {...props} />;\n};\n", "import * as React from 'react';\nexport { React };\n"],
4
+ "sourcesContent": ["/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { ROW_VARIANTS } from '../../exported-related';\nimport { TypescriptContext, TypescriptRow } from '../../types/props';\nimport { Cells } from '../Cells';\nimport { RowVariantHeader } from './RowVariantHeader';\nimport { RowVariantPrimary } from './RowVariantPrimary';\nimport { RowVariantSecondary } from './RowVariantSecondary';\nimport { RowVariantSkeleton } from './RowVariantSkeleton';\nimport { RowVariantProps } from './types';\n\nconst RowVariantMapper: Record<string, React.ComponentType<RowVariantProps>> = {\n [ROW_VARIANTS.HEADER_GROUP]: RowVariantHeader,\n [ROW_VARIANTS.PRIMARY]: RowVariantPrimary,\n [ROW_VARIANTS.SECONDARY]: RowVariantSecondary,\n [ROW_VARIANTS.COMPACT_PRIMARY]: (props) => <RowVariantPrimary compact {...props} />,\n [ROW_VARIANTS.COMPACT_SECONDARY]: (props) => <RowVariantSecondary compact {...props} />,\n [ROW_VARIANTS.SKELETON]: RowVariantSkeleton,\n};\n\ninterface RowVariantMapItemProps {\n row: TypescriptRow;\n itemIndex: number;\n isDragOverlay: boolean;\n ctx: TypescriptContext;\n focusedRowId: string | null;\n drilldownRowId: string | null;\n}\n\nexport const RowVariantMapItem: React.ComponentType<RowVariantMapItemProps> = (props) => {\n const {\n row,\n ctx: {\n tableProps: { getRowVariant },\n },\n } = props;\n\n const variant = getRowVariant(row, Cells);\n\n let Component: React.ComponentType<any>;\n\n if (typeof variant === 'string') {\n if (!(variant in RowVariantMapper)) {\n throw new Error(`${variant} is not an out-of-the-box row variant`);\n }\n Component = RowVariantMapper[variant];\n } else {\n Component = variant;\n }\n\n return <Component {...props} />;\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAkB;AAClB,8BAA6B;AAE7B,mBAAsB;AACtB,8BAAiC;AACjC,+BAAkC;AAClC,iCAAoC;AACpC,gCAAmC;AAGnC,MAAM,mBAAyE;AAAA,GAC5E,qCAAa,eAAe;AAAA,GAC5B,qCAAa,UAAU;AAAA,GACvB,qCAAa,YAAY;AAAA,GACzB,qCAAa,kBAAkB,CAAC,UAAU,mDAAC;AAAA,IAAkB,SAAO;AAAA,KAAK,MAAO;AAAA,GAChF,qCAAa,oBAAoB,CAAC,UAAU,mDAAC;AAAA,IAAoB,SAAO;AAAA,KAAK,MAAO;AAAA,GACpF,qCAAa,WAAW;AAC3B;AAWO,MAAM,oBAAiE,CAAC,UAAU;AACvF,QAAM;AAAA,IACJ;AAAA,IACA,KAAK;AAAA,MACH,YAAY,EAAE;AAAA;AAAA,MAEd;AAEJ,QAAM,UAAU,cAAc,KAAK,kBAAK;AAExC,MAAI;AAEJ,MAAI,OAAO,YAAY,UAAU;AAC/B,QAAI,CAAE,YAAW,mBAAmB;AAClC,YAAM,IAAI,MAAM,GAAG,8CAA8C;AAAA,IACnE;AACA,gBAAY,iBAAiB;AAAA,EAC/B,OAAO;AACL,gBAAY;AAAA,EACd;AAEA,SAAO,mDAAC,8BAAc,MAAO;AAC/B;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/parts/RowVariants/types.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { TypescriptContext, TypescriptRow } from '../../types/props';\nimport { DropIndicatorPosition, SortableItemContextType } from '../HoC/SortableItemContext';\n\nexport interface RowVariantProps {\n row: TypescriptRow;\n ctx: TypescriptContext;\n compact?: boolean;\n focusedRowId?: string;\n selectedRowId?: string;\n itemIndex: number;\n draggableProps: SortableItemContextType['draggableProps'];\n backgroundColor?: string;\n isDragOverlay: boolean;\n minHeight: string;\n height: string;\n rowsLayout?: (string | number)[];\n dropIndicatorPosition: DropIndicatorPosition;\n CustomRowContentRenderer?: React.ComponentType<RowVariantProps>;\n}\n", "import * as React from 'react';\nexport { React };\n"],
4
+ "sourcesContent": ["import { TypescriptContext, TypescriptRow } from '../../types/props';\nimport { DropIndicatorPosition, SortableItemContextType } from '../HoC/SortableItemContext';\n\nexport interface RowVariantProps {\n row: TypescriptRow;\n ctx: TypescriptContext;\n compact?: boolean;\n focusedRowId: string | null;\n drilldownRowId: string | null;\n itemIndex: number;\n draggableProps: SortableItemContextType['draggableProps'];\n backgroundColor?: string;\n isDragOverlay: boolean;\n minHeight: string;\n height: string;\n rowsLayout?: (string | number)[];\n dropIndicatorPosition: DropIndicatorPosition;\n CustomRowContentRenderer?: React.ComponentType<RowVariantProps>;\n}\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;",
6
6
  "names": []
7
7
  }
@@ -43,15 +43,11 @@ __export(TableContent_exports, {
43
43
  module.exports = __toCommonJS(TableContent_exports);
44
44
  var React = __toESM(require("react"));
45
45
  var import_react = __toESM(require("react"));
46
- var import_react_redux = require("react-redux");
47
46
  var import_styled = require("../styled");
48
47
  var import_DataTableContext = __toESM(require("../DataTableContext"));
49
48
  var import_Pagination = require("../addons/Pagination");
50
49
  var import_VirtualRowsList = require("./VirtualRowsList");
51
50
  var import_constants = require("../configs/constants");
52
- const mapStateToProps = (state) => ({
53
- reduxFilters: state.filters
54
- });
55
51
  const TableContentComponent = (props) => {
56
52
  const { forwardedRef } = props;
57
53
  const {
@@ -78,8 +74,7 @@ const TableContentComponent = (props) => {
78
74
  }, /* @__PURE__ */ import_react.default.createElement(import_VirtualRowsList.VirtualRowsList, null)), pagination ? /* @__PURE__ */ import_react.default.createElement(import_Pagination.Pagination, null) : null), [height, width, forwardedRef, allDataFlattened.length, visibleColumns.length, pagination, shiftKeyPressed]);
79
75
  return PureTableContent;
80
76
  };
81
- const ConnectedTableContent = (0, import_react_redux.connect)(mapStateToProps)(TableContentComponent);
82
- const TableContent = import_react.default.forwardRef((props, ref) => /* @__PURE__ */ import_react.default.createElement(ConnectedTableContent, __spreadProps(__spreadValues({}, props), {
77
+ const TableContent = import_react.default.forwardRef((props, ref) => /* @__PURE__ */ import_react.default.createElement(TableContentComponent, __spreadProps(__spreadValues({}, props), {
83
78
  forwardedRef: ref
84
79
  })));
85
80
  var TableContent_default = TableContent;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/parts/TableContent.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { useContext, useMemo, useState } from 'react';\nimport { connect } from 'react-redux';\n\nimport { StyledTableWrapper, StyledDataTableContentWrapper } from '../styled';\nimport DataTableContext from '../DataTableContext';\nimport { Pagination } from '../addons/Pagination';\nimport { VirtualRowsList } from './VirtualRowsList';\nimport { TypescriptAppliedFilter } from '../types/props';\nimport { DATA_TESTID } from '../configs/constants';\n\nconst mapStateToProps = (state: { filters: TypescriptAppliedFilter }) => ({\n reduxFilters: state.filters,\n});\n// must manually declare typescript types for mapStateToProps props\n// because react-redux is not smart enough\ntype TableContentProps = {\n reduxFilters: TypescriptAppliedFilter;\n forwardedRef: React.ForwardedRef<HTMLDivElement>;\n};\n\nconst TableContentComponent = (props: TableContentProps) => {\n const { forwardedRef } = props;\n const {\n tableProps: { height, width, pagination },\n allDataFlattened,\n visibleColumns,\n } = useContext(DataTableContext);\n\n const [shiftKeyPressed, setShiftKeyPressed] = useState(false);\n\n const PureTableContent = useMemo(\n () => (\n <StyledDataTableContentWrapper\n data-testid={DATA_TESTID.DATA_TABLE_CONTENT_WRAPPER}\n height={height}\n width={width}\n ref={forwardedRef}\n noSelectionAllowed={shiftKeyPressed}\n onKeyDown={(e) => setShiftKeyPressed((prevShiftKeyPressed) => prevShiftKeyPressed || e.shiftKey)}\n onKeyUp={(e) => setShiftKeyPressed((prevShiftKeyPressed) => prevShiftKeyPressed && e.code !== 'Shift')}\n >\n <StyledTableWrapper\n role=\"table\"\n aria-rowcount={allDataFlattened.length}\n aria-colcount={visibleColumns.length}\n data-testid={DATA_TESTID.DATA_TABLE_TABLE}\n height={height}\n width={width}\n >\n <VirtualRowsList />\n </StyledTableWrapper>\n {pagination ? <Pagination /> : null}\n </StyledDataTableContentWrapper>\n ),\n [height, width, forwardedRef, allDataFlattened.length, visibleColumns.length, pagination, shiftKeyPressed],\n );\n\n return PureTableContent;\n};\n\nconst ConnectedTableContent = connect(mapStateToProps)(TableContentComponent);\n\nconst TableContent = React.forwardRef<HTMLDivElement>((props, ref) => (\n <ConnectedTableContent {...props} forwardedRef={ref} />\n));\n\nexport { TableContent };\nexport default TableContent;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAqD;AACrD,yBAAwB;AAExB,oBAAkE;AAClE,8BAA6B;AAC7B,wBAA2B;AAC3B,6BAAgC;AAEhC,uBAA4B;AAE5B,MAAM,kBAAkB,CAAC,UAAiD;AAAA,EACxE,cAAc,MAAM;AACtB;AAQA,MAAM,wBAAwB,CAAC,UAA6B;AAC1D,QAAM,EAAE,iBAAiB;AACzB,QAAM;AAAA,IACJ,YAAY,EAAE,QAAQ,OAAO;AAAA,IAC7B;AAAA,IACA;AAAA,MACE,6BAAW,+BAAgB;AAE/B,QAAM,CAAC,iBAAiB,sBAAsB,2BAAS,KAAK;AAE5D,QAAM,mBAAmB,0BACvB,MACE,mDAAC;AAAA,IACC,eAAa,6BAAY;AAAA,IACzB;AAAA,IACA;AAAA,IACA,KAAK;AAAA,IACL,oBAAoB;AAAA,IACpB,WAAW,CAAC,MAAM,mBAAmB,CAAC,wBAAwB,uBAAuB,EAAE,QAAQ;AAAA,IAC/F,SAAS,CAAC,MAAM,mBAAmB,CAAC,wBAAwB,uBAAuB,EAAE,SAAS,OAAO;AAAA,KAErG,mDAAC;AAAA,IACC,MAAK;AAAA,IACL,iBAAe,iBAAiB;AAAA,IAChC,iBAAe,eAAe;AAAA,IAC9B,eAAa,6BAAY;AAAA,IACzB;AAAA,IACA;AAAA,KAEA,mDAAC,4CAAgB,CACnB,GACC,aAAa,mDAAC,kCAAW,IAAK,IACjC,GAEF,CAAC,QAAQ,OAAO,cAAc,iBAAiB,QAAQ,eAAe,QAAQ,YAAY,eAAe,CAC3G;AAEA,SAAO;AACT;AAEA,MAAM,wBAAwB,gCAAQ,eAAe,EAAE,qBAAqB;AAE5E,MAAM,eAAe,qBAAM,WAA2B,CAAC,OAAO,QAC5D,mDAAC,wDAA0B,QAA1B;AAAA,EAAiC,cAAc;AAAA,EAAK,CACtD;AAGD,IAAO,uBAAQ;",
4
+ "sourcesContent": ["import React, { useContext, useMemo, useState } from 'react';\n\nimport { StyledTableWrapper, StyledDataTableContentWrapper } from '../styled';\nimport DataTableContext from '../DataTableContext';\nimport { Pagination } from '../addons/Pagination';\nimport { VirtualRowsList } from './VirtualRowsList';\nimport { DATA_TESTID } from '../configs/constants';\n\ntype TableContentProps = {\n forwardedRef: React.ForwardedRef<HTMLDivElement>;\n};\n\nconst TableContentComponent = (props: TableContentProps) => {\n const { forwardedRef } = props;\n const {\n tableProps: { height, width, pagination },\n allDataFlattened,\n visibleColumns,\n } = useContext(DataTableContext);\n\n const [shiftKeyPressed, setShiftKeyPressed] = useState(false);\n\n const PureTableContent = useMemo(\n () => (\n <StyledDataTableContentWrapper\n data-testid={DATA_TESTID.DATA_TABLE_CONTENT_WRAPPER}\n height={height}\n width={width}\n ref={forwardedRef}\n noSelectionAllowed={shiftKeyPressed}\n onKeyDown={(e) => setShiftKeyPressed((prevShiftKeyPressed) => prevShiftKeyPressed || e.shiftKey)}\n onKeyUp={(e) => setShiftKeyPressed((prevShiftKeyPressed) => prevShiftKeyPressed && e.code !== 'Shift')}\n >\n <StyledTableWrapper\n role=\"table\"\n aria-rowcount={allDataFlattened.length}\n aria-colcount={visibleColumns.length}\n data-testid={DATA_TESTID.DATA_TABLE_TABLE}\n height={height}\n width={width}\n >\n <VirtualRowsList />\n </StyledTableWrapper>\n {pagination ? <Pagination /> : null}\n </StyledDataTableContentWrapper>\n ),\n [height, width, forwardedRef, allDataFlattened.length, visibleColumns.length, pagination, shiftKeyPressed],\n );\n\n return PureTableContent;\n};\n\nexport const TableContent = React.forwardRef<HTMLDivElement>((props, ref) => (\n <TableContentComponent {...props} forwardedRef={ref} />\n));\n\nexport default TableContent;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAqD;AAErD,oBAAkE;AAClE,8BAA6B;AAC7B,wBAA2B;AAC3B,6BAAgC;AAChC,uBAA4B;AAM5B,MAAM,wBAAwB,CAAC,UAA6B;AAC1D,QAAM,EAAE,iBAAiB;AACzB,QAAM;AAAA,IACJ,YAAY,EAAE,QAAQ,OAAO;AAAA,IAC7B;AAAA,IACA;AAAA,MACE,6BAAW,+BAAgB;AAE/B,QAAM,CAAC,iBAAiB,sBAAsB,2BAAS,KAAK;AAE5D,QAAM,mBAAmB,0BACvB,MACE,mDAAC;AAAA,IACC,eAAa,6BAAY;AAAA,IACzB;AAAA,IACA;AAAA,IACA,KAAK;AAAA,IACL,oBAAoB;AAAA,IACpB,WAAW,CAAC,MAAM,mBAAmB,CAAC,wBAAwB,uBAAuB,EAAE,QAAQ;AAAA,IAC/F,SAAS,CAAC,MAAM,mBAAmB,CAAC,wBAAwB,uBAAuB,EAAE,SAAS,OAAO;AAAA,KAErG,mDAAC;AAAA,IACC,MAAK;AAAA,IACL,iBAAe,iBAAiB;AAAA,IAChC,iBAAe,eAAe;AAAA,IAC9B,eAAa,6BAAY;AAAA,IACzB;AAAA,IACA;AAAA,KAEA,mDAAC,4CAAgB,CACnB,GACC,aAAa,mDAAC,kCAAW,IAAK,IACjC,GAEF,CAAC,QAAQ,OAAO,cAAc,iBAAiB,QAAQ,eAAe,QAAQ,YAAY,eAAe,CAC3G;AAEA,SAAO;AACT;AAEO,MAAM,eAAe,qBAAM,WAA2B,CAAC,OAAO,QACnE,mDAAC,wDAA0B,QAA1B;AAAA,EAAiC,cAAc;AAAA,EAAK,CACtD;AAED,IAAO,uBAAQ;",
6
6
  "names": []
7
7
  }
@@ -26,7 +26,6 @@ __export(VirtualRowsList_exports, {
26
26
  module.exports = __toCommonJS(VirtualRowsList_exports);
27
27
  var React = __toESM(require("react"));
28
28
  var import_react = __toESM(require("react"));
29
- var import_react_redux = require("react-redux");
30
29
  var import_RowLoading = require("./RowLoading");
31
30
  var import_EmptyContent = require("./EmptyContent");
32
31
  var import_Rows = require("./Rows");
@@ -36,23 +35,17 @@ var import_DataTableContext = require("../DataTableContext");
36
35
  var import_fixedSizes = require("../configs/fixedSizes");
37
36
  var import_styled = require("../styled");
38
37
  var import_Loader = require("./Loader");
39
- var import_reducers = require("../redux/reducers");
40
38
  var import_constants = require("../configs/constants");
41
- function mapStateToProps(state) {
42
- return {
43
- relativeRowMouseCord: state.rows.relativeRowMouseCord
44
- };
45
- }
46
- const VirtualRowsListComponent = () => {
39
+ const VirtualRowsList = () => {
47
40
  const {
48
41
  virtualListRef,
49
42
  tableProps: { height, width, isLoading, isLoadingAppended },
50
43
  virtualListHelpers,
51
44
  layoutHelpers: { totalColumnsWidth },
52
- flattenedData
45
+ flattenedData,
46
+ setFocusedRowId
53
47
  } = (0, import_react.useContext)(import_DataTableContext.DataTableContext);
54
48
  const { totalSize, scrollToIndex } = virtualListHelpers;
55
- const { setFocusedRowId } = (0, import_reducers.useDispatchRowsActions)();
56
49
  const isEmptyContent = (0, import_react.useMemo)(() => !isLoading && flattenedData.length === 0, [isLoading, flattenedData.length]);
57
50
  const tableHeight = (0, import_react.useMemo)(() => {
58
51
  if (typeof height === "string")
@@ -82,6 +75,5 @@ const VirtualRowsListComponent = () => {
82
75
  width: totalColumnsWidth
83
76
  }), isLoading ? /* @__PURE__ */ import_react.default.createElement(import_Loader.MemoizedLoader, null) : null, !isLoading && !isEmptyContent && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_Rows.RowsWithContext, null), /* @__PURE__ */ import_react.default.createElement(import_Footer.Footer, null), isLoadingAppended && /* @__PURE__ */ import_react.default.createElement(import_RowLoading.RowLoading, null))));
84
77
  };
85
- const VirtualRowsList = (0, import_react_redux.connect)(mapStateToProps)(VirtualRowsListComponent);
86
78
  var VirtualRowsList_default = VirtualRowsList;
87
79
  //# sourceMappingURL=VirtualRowsList.js.map