@elliemae/ds-data-table 3.13.1-rc.7 → 3.13.1-rc.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/parts/Rows.js +22 -26
- package/dist/cjs/parts/Rows.js.map +2 -2
- package/dist/esm/parts/Rows.js +23 -27
- package/dist/esm/parts/Rows.js.map +2 -2
- package/package.json +18 -18
package/dist/cjs/parts/Rows.js
CHANGED
|
@@ -44,32 +44,28 @@ const Rows = () => {
|
|
|
44
44
|
} = (0, import_react.useContext)(import_DataTableContext.DataTableContext);
|
|
45
45
|
const ctx = (0, import_react.useContext)(import_DnDTreeContext.DnDTreeContext);
|
|
46
46
|
const items = ctx?.visibleItems || flattenedData;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}) }),
|
|
70
|
-
[virtualItems, items, visibleColumns]
|
|
71
|
-
);
|
|
72
|
-
return PureVirtualizedRows;
|
|
47
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: virtualItems.map((virtualItem) => {
|
|
48
|
+
const { index, measureRef, start } = virtualItem;
|
|
49
|
+
const row = items[index];
|
|
50
|
+
if (!row)
|
|
51
|
+
return null;
|
|
52
|
+
(0, import_helpers.addCellData)(row, visibleColumns);
|
|
53
|
+
const style = {
|
|
54
|
+
position: "absolute",
|
|
55
|
+
top: `${start}px`,
|
|
56
|
+
left: 0,
|
|
57
|
+
width: totalColumnsWidth
|
|
58
|
+
};
|
|
59
|
+
const rowProps = {
|
|
60
|
+
key: `ds-table-row-${row.uid}`,
|
|
61
|
+
row,
|
|
62
|
+
measureRef,
|
|
63
|
+
index,
|
|
64
|
+
itemIndex: index,
|
|
65
|
+
itemWrapperStyle: style
|
|
66
|
+
};
|
|
67
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Row.RowWithContext, { ...rowProps });
|
|
68
|
+
}) });
|
|
73
69
|
};
|
|
74
70
|
Rows.propTypes = {};
|
|
75
71
|
const RowsWithContext = (0, import_withConditionalDnDRowContext.withConditionalDnDRowContext)(Rows);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/parts/Rows.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable no-underscore-dangle */\nimport React, { useContext, useMemo } from 'react';\n\nimport { RowWithContext as Row } from './Row';\nimport { DataTableContext } from '../DataTableContext';\nimport { withConditionalDnDRowContext } from './HoC/withConditionalDnDRowContext';\nimport { DnDTreeContext } from './HoC/DnDTreeContext';\nimport { addCellData } from '../helpers';\n\nconst Rows = (): JSX.Element => {\n const {\n virtualListHelpers: { virtualItems },\n flattenedData,\n visibleColumns,\n layoutHelpers: { totalColumnsWidth },\n } = useContext(DataTableContext);\n\n const ctx = useContext(DnDTreeContext);\n\n const items = ctx?.visibleItems || flattenedData;\n\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["/* eslint-disable no-underscore-dangle */\nimport React, { useContext, useMemo } from 'react';\n\nimport { RowWithContext as Row } from './Row';\nimport { DataTableContext } from '../DataTableContext';\nimport { withConditionalDnDRowContext } from './HoC/withConditionalDnDRowContext';\nimport { DnDTreeContext } from './HoC/DnDTreeContext';\nimport { addCellData } from '../helpers';\n\nconst Rows = (): JSX.Element => {\n const {\n virtualListHelpers: { virtualItems },\n flattenedData,\n visibleColumns,\n layoutHelpers: { totalColumnsWidth },\n } = useContext(DataTableContext);\n\n const ctx = useContext(DnDTreeContext);\n\n const items = ctx?.visibleItems || flattenedData;\n\n return (\n <>\n {virtualItems.map((virtualItem) => {\n const { index, measureRef, start } = virtualItem;\n const row = items[index];\n if (!row) return null;\n addCellData(row, visibleColumns);\n const style = {\n position: 'absolute',\n top: `${start}px`,\n left: 0,\n width: totalColumnsWidth,\n };\n const rowProps = {\n key: `ds-table-row-${row.uid}`,\n row,\n measureRef,\n index, // this is consumed by the DnD HOC\n itemIndex: index,\n itemWrapperStyle: style,\n };\n return <Row {...rowProps} />;\n })}\n </>\n );\n};\n\nRows.propTypes = {};\n\nexport const RowsWithContext = withConditionalDnDRowContext(Rows);\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADsBnB;AArBJ,mBAA2C;AAE3C,iBAAsC;AACtC,8BAAiC;AACjC,0CAA6C;AAC7C,4BAA+B;AAC/B,qBAA4B;AAE5B,MAAM,OAAO,MAAmB;AAC9B,QAAM;AAAA,IACJ,oBAAoB,EAAE,aAAa;AAAA,IACnC;AAAA,IACA;AAAA,IACA,eAAe,EAAE,kBAAkB;AAAA,EACrC,QAAI,yBAAW,wCAAgB;AAE/B,QAAM,UAAM,yBAAW,oCAAc;AAErC,QAAM,QAAQ,KAAK,gBAAgB;AAEnC,SACE,2EACG,uBAAa,IAAI,CAAC,gBAAgB;AACjC,UAAM,EAAE,OAAO,YAAY,MAAM,IAAI;AACrC,UAAM,MAAM,MAAM;AAClB,QAAI,CAAC;AAAK,aAAO;AACjB,oCAAY,KAAK,cAAc;AAC/B,UAAM,QAAQ;AAAA,MACZ,UAAU;AAAA,MACV,KAAK,GAAG;AAAA,MACR,MAAM;AAAA,MACN,OAAO;AAAA,IACT;AACA,UAAM,WAAW;AAAA,MACf,KAAK,gBAAgB,IAAI;AAAA,MACzB;AAAA,MACA;AAAA,MACA;AAAA,MACA,WAAW;AAAA,MACX,kBAAkB;AAAA,IACpB;AACA,WAAO,4CAAC,WAAAA,gBAAA,EAAK,GAAG,UAAU;AAAA,EAC5B,CAAC,GACH;AAEJ;AAEA,KAAK,YAAY,CAAC;AAEX,MAAM,sBAAkB,kEAA6B,IAAI;",
|
|
6
6
|
"names": ["Row"]
|
|
7
7
|
}
|
package/dist/esm/parts/Rows.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
3
|
-
import { useContext
|
|
3
|
+
import { useContext } from "react";
|
|
4
4
|
import { RowWithContext as Row } from "./Row";
|
|
5
5
|
import { DataTableContext } from "../DataTableContext";
|
|
6
6
|
import { withConditionalDnDRowContext } from "./HoC/withConditionalDnDRowContext";
|
|
@@ -15,32 +15,28 @@ const Rows = () => {
|
|
|
15
15
|
} = useContext(DataTableContext);
|
|
16
16
|
const ctx = useContext(DnDTreeContext);
|
|
17
17
|
const items = ctx?.visibleItems || flattenedData;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}) }),
|
|
41
|
-
[virtualItems, items, visibleColumns]
|
|
42
|
-
);
|
|
43
|
-
return PureVirtualizedRows;
|
|
18
|
+
return /* @__PURE__ */ jsx(Fragment, { children: virtualItems.map((virtualItem) => {
|
|
19
|
+
const { index, measureRef, start } = virtualItem;
|
|
20
|
+
const row = items[index];
|
|
21
|
+
if (!row)
|
|
22
|
+
return null;
|
|
23
|
+
addCellData(row, visibleColumns);
|
|
24
|
+
const style = {
|
|
25
|
+
position: "absolute",
|
|
26
|
+
top: `${start}px`,
|
|
27
|
+
left: 0,
|
|
28
|
+
width: totalColumnsWidth
|
|
29
|
+
};
|
|
30
|
+
const rowProps = {
|
|
31
|
+
key: `ds-table-row-${row.uid}`,
|
|
32
|
+
row,
|
|
33
|
+
measureRef,
|
|
34
|
+
index,
|
|
35
|
+
itemIndex: index,
|
|
36
|
+
itemWrapperStyle: style
|
|
37
|
+
};
|
|
38
|
+
return /* @__PURE__ */ jsx(Row, { ...rowProps });
|
|
39
|
+
}) });
|
|
44
40
|
};
|
|
45
41
|
Rows.propTypes = {};
|
|
46
42
|
const RowsWithContext = withConditionalDnDRowContext(Rows);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/parts/Rows.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-underscore-dangle */\nimport React, { useContext, useMemo } from 'react';\n\nimport { RowWithContext as Row } from './Row';\nimport { DataTableContext } from '../DataTableContext';\nimport { withConditionalDnDRowContext } from './HoC/withConditionalDnDRowContext';\nimport { DnDTreeContext } from './HoC/DnDTreeContext';\nimport { addCellData } from '../helpers';\n\nconst Rows = (): JSX.Element => {\n const {\n virtualListHelpers: { virtualItems },\n flattenedData,\n visibleColumns,\n layoutHelpers: { totalColumnsWidth },\n } = useContext(DataTableContext);\n\n const ctx = useContext(DnDTreeContext);\n\n const items = ctx?.visibleItems || flattenedData;\n\n
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-underscore-dangle */\nimport React, { useContext, useMemo } from 'react';\n\nimport { RowWithContext as Row } from './Row';\nimport { DataTableContext } from '../DataTableContext';\nimport { withConditionalDnDRowContext } from './HoC/withConditionalDnDRowContext';\nimport { DnDTreeContext } from './HoC/DnDTreeContext';\nimport { addCellData } from '../helpers';\n\nconst Rows = (): JSX.Element => {\n const {\n virtualListHelpers: { virtualItems },\n flattenedData,\n visibleColumns,\n layoutHelpers: { totalColumnsWidth },\n } = useContext(DataTableContext);\n\n const ctx = useContext(DnDTreeContext);\n\n const items = ctx?.visibleItems || flattenedData;\n\n return (\n <>\n {virtualItems.map((virtualItem) => {\n const { index, measureRef, start } = virtualItem;\n const row = items[index];\n if (!row) return null;\n addCellData(row, visibleColumns);\n const style = {\n position: 'absolute',\n top: `${start}px`,\n left: 0,\n width: totalColumnsWidth,\n };\n const rowProps = {\n key: `ds-table-row-${row.uid}`,\n row,\n measureRef,\n index, // this is consumed by the DnD HOC\n itemIndex: index,\n itemWrapperStyle: style,\n };\n return <Row {...rowProps} />;\n })}\n </>\n );\n};\n\nRows.propTypes = {};\n\nexport const RowsWithContext = withConditionalDnDRowContext(Rows);\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACsBnB,mBAoBW,WApBX;AArBJ,SAAgB,kBAA2B;AAE3C,SAAS,kBAAkB,WAAW;AACtC,SAAS,wBAAwB;AACjC,SAAS,oCAAoC;AAC7C,SAAS,sBAAsB;AAC/B,SAAS,mBAAmB;AAE5B,MAAM,OAAO,MAAmB;AAC9B,QAAM;AAAA,IACJ,oBAAoB,EAAE,aAAa;AAAA,IACnC;AAAA,IACA;AAAA,IACA,eAAe,EAAE,kBAAkB;AAAA,EACrC,IAAI,WAAW,gBAAgB;AAE/B,QAAM,MAAM,WAAW,cAAc;AAErC,QAAM,QAAQ,KAAK,gBAAgB;AAEnC,SACE,gCACG,uBAAa,IAAI,CAAC,gBAAgB;AACjC,UAAM,EAAE,OAAO,YAAY,MAAM,IAAI;AACrC,UAAM,MAAM,MAAM;AAClB,QAAI,CAAC;AAAK,aAAO;AACjB,gBAAY,KAAK,cAAc;AAC/B,UAAM,QAAQ;AAAA,MACZ,UAAU;AAAA,MACV,KAAK,GAAG;AAAA,MACR,MAAM;AAAA,MACN,OAAO;AAAA,IACT;AACA,UAAM,WAAW;AAAA,MACf,KAAK,gBAAgB,IAAI;AAAA,MACzB;AAAA,MACA;AAAA,MACA;AAAA,MACA,WAAW;AAAA,MACX,kBAAkB;AAAA,IACpB;AACA,WAAO,oBAAC,OAAK,GAAG,UAAU;AAAA,EAC5B,CAAC,GACH;AAEJ;AAEA,KAAK,YAAY,CAAC;AAEX,MAAM,kBAAkB,6BAA6B,IAAI;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-data-table",
|
|
3
|
-
"version": "3.13.1-rc.
|
|
3
|
+
"version": "3.13.1-rc.9",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Data Table",
|
|
6
6
|
"files": [
|
|
@@ -573,23 +573,23 @@
|
|
|
573
573
|
"dependencies": {
|
|
574
574
|
"react-virtual": "~2.10.4",
|
|
575
575
|
"uid": "~2.0.0",
|
|
576
|
-
"@elliemae/ds-button": "3.13.1-rc.
|
|
577
|
-
"@elliemae/ds-
|
|
578
|
-
"@elliemae/ds-
|
|
579
|
-
"@elliemae/ds-drag-and-drop": "3.13.1-rc.
|
|
580
|
-
"@elliemae/ds-
|
|
581
|
-
"@elliemae/ds-
|
|
582
|
-
"@elliemae/ds-form-layout-blocks": "3.13.1-rc.
|
|
583
|
-
"@elliemae/ds-
|
|
584
|
-
"@elliemae/ds-
|
|
585
|
-
"@elliemae/ds-
|
|
586
|
-
"@elliemae/ds-
|
|
587
|
-
"@elliemae/ds-
|
|
588
|
-
"@elliemae/ds-skeleton": "3.13.1-rc.
|
|
589
|
-
"@elliemae/ds-
|
|
590
|
-
"@elliemae/ds-
|
|
591
|
-
"@elliemae/ds-truncated-tooltip-text": "3.13.1-rc.
|
|
592
|
-
"@elliemae/ds-utilities": "3.13.1-rc.
|
|
576
|
+
"@elliemae/ds-button": "3.13.1-rc.9",
|
|
577
|
+
"@elliemae/ds-circular-progress-indicator": "3.13.1-rc.9",
|
|
578
|
+
"@elliemae/ds-controlled-form": "3.13.1-rc.9",
|
|
579
|
+
"@elliemae/ds-drag-and-drop": "3.13.1-rc.9",
|
|
580
|
+
"@elliemae/ds-form": "3.13.1-rc.9",
|
|
581
|
+
"@elliemae/ds-dropdownmenu": "3.13.1-rc.9",
|
|
582
|
+
"@elliemae/ds-form-layout-blocks": "3.13.1-rc.9",
|
|
583
|
+
"@elliemae/ds-icons": "3.13.1-rc.9",
|
|
584
|
+
"@elliemae/ds-pagination": "3.13.1-rc.9",
|
|
585
|
+
"@elliemae/ds-grid": "3.13.1-rc.9",
|
|
586
|
+
"@elliemae/ds-pills": "3.13.1-rc.9",
|
|
587
|
+
"@elliemae/ds-popperjs": "3.13.1-rc.9",
|
|
588
|
+
"@elliemae/ds-skeleton": "3.13.1-rc.9",
|
|
589
|
+
"@elliemae/ds-toolbar": "3.13.1-rc.9",
|
|
590
|
+
"@elliemae/ds-system": "3.13.1-rc.9",
|
|
591
|
+
"@elliemae/ds-truncated-tooltip-text": "3.13.1-rc.9",
|
|
592
|
+
"@elliemae/ds-utilities": "3.13.1-rc.9"
|
|
593
593
|
},
|
|
594
594
|
"devDependencies": {
|
|
595
595
|
"@testing-library/react": "~12.1.3",
|