@elliemae/ds-datagrids 3.16.0-next.17 → 3.16.0-next.19

Sign up to get free protection for your applications and to get access to all the features.
@@ -37,9 +37,10 @@ var import_jsx_runtime = require("react/jsx-runtime");
37
37
  var import_react_pagify = __toESM(require("react-pagify"));
38
38
  var import_segmentize = __toESM(require("segmentize"));
39
39
  var import_ds_classnames = require("@elliemae/ds-classnames");
40
+ const Comp = import_react_pagify.default?.default ?? import_react_pagify.default;
40
41
  const blockName = "data-grid";
41
42
  const PaginationContainer = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "pagination");
42
- const PagifyContext = (0, import_ds_classnames.aggregatedClasses)(import_react_pagify.default?.Context)(blockName, "pagify-pagination");
43
+ const PagifyContext = (0, import_ds_classnames.aggregatedClasses)(Comp?.Context)(blockName, "pagify-pagination");
43
44
  const Paginator = ({ pagination, pages, onSelect, labelPrevious = "Previous", labelNext = "Next" }) => {
44
45
  const prevPage = pagination.page - 1;
45
46
  const nextPage = pagination.page + 1;
@@ -55,15 +56,15 @@ const Paginator = ({ pagination, pages, onSelect, labelPrevious = "Previous", la
55
56
  sidePages: 1
56
57
  }),
57
58
  children: [
58
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_pagify.default.Button, { className: pagination.page <= 1 ? "button-disabled" : "", page: prevPage, children: labelPrevious }),
59
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_pagify.default.Segment, { field: "beginPages" }),
60
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_pagify.default.Ellipsis, { className: "ellipsis", nextField: "previousPages", previousField: "beginPages" }),
61
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_pagify.default.Segment, { field: "previousPages" }),
62
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_pagify.default.Segment, { className: "selected", field: "centerPage" }),
63
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_pagify.default.Segment, { field: "nextPages" }),
64
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_pagify.default.Ellipsis, { className: "ellipsis", nextField: "endPages", previousField: "nextPages" }),
65
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_pagify.default.Segment, { field: "endPages" }),
66
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_pagify.default.Button, { className: pagination.page >= pages ? "button-disabled" : "", page: nextPage, children: labelNext })
59
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp.Button, { className: pagination.page <= 1 ? "button-disabled" : "", page: prevPage, children: labelPrevious }),
60
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp.Segment, { field: "beginPages" }),
61
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp.Ellipsis, { className: "ellipsis", nextField: "previousPages", previousField: "beginPages" }),
62
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp.Segment, { field: "previousPages" }),
63
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp.Segment, { className: "selected", field: "centerPage" }),
64
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp.Segment, { field: "nextPages" }),
65
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp.Ellipsis, { className: "ellipsis", nextField: "endPages", previousField: "nextPages" }),
66
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp.Segment, { field: "endPages" }),
67
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp.Button, { className: pagination.page >= pages ? "button-disabled" : "", page: nextPage, children: labelNext })
67
68
  ]
68
69
  }
69
70
  ) });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/plugins/pagination/components/Paginator.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\nimport React from 'react';\nimport ReactPagify from 'react-pagify';\nimport segmentize from 'segmentize';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\n\nconst blockName = 'data-grid';\n\nconst PaginationContainer = aggregatedClasses('div')(blockName, 'pagination');\nconst PagifyContext = aggregatedClasses(ReactPagify?.Context)(blockName, 'pagify-pagination');\n\nconst Paginator = ({ pagination, pages, onSelect, labelPrevious = 'Previous', labelNext = 'Next' }) => {\n const prevPage = pagination.page - 1;\n const nextPage = pagination.page + 1;\n return (\n <PaginationContainer>\n <PagifyContext\n onSelect={(page) => page !== pagination.page && onSelect(page)}\n segments={segmentize({\n page: pagination.page,\n pages,\n beginPages: 1,\n endPages: 1,\n sidePages: 1,\n })}\n >\n <ReactPagify.Button className={pagination.page <= 1 ? 'button-disabled' : ''} page={prevPage}>\n {labelPrevious}\n </ReactPagify.Button>\n\n <ReactPagify.Segment field=\"beginPages\" />\n\n <ReactPagify.Ellipsis className=\"ellipsis\" nextField=\"previousPages\" previousField=\"beginPages\" />\n\n <ReactPagify.Segment field=\"previousPages\" />\n <ReactPagify.Segment className=\"selected\" field=\"centerPage\" />\n <ReactPagify.Segment field=\"nextPages\" />\n\n <ReactPagify.Ellipsis className=\"ellipsis\" nextField=\"endPages\" previousField=\"nextPages\" />\n\n <ReactPagify.Segment field=\"endPages\" />\n\n <ReactPagify.Button className={pagination.page >= pages ? 'button-disabled' : ''} page={nextPage}>\n {labelNext}\n </ReactPagify.Button>\n </PagifyContext>\n </PaginationContainer>\n );\n};\n\nexport { Paginator };\nexport default Paginator;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADiBjB;AAdN,0BAAwB;AACxB,wBAAuB;AACvB,2BAAkC;AAElC,MAAM,YAAY;AAElB,MAAM,0BAAsB,wCAAkB,KAAK,EAAE,WAAW,YAAY;AAC5E,MAAM,oBAAgB,wCAAkB,oBAAAA,SAAa,OAAO,EAAE,WAAW,mBAAmB;AAE5F,MAAM,YAAY,CAAC,EAAE,YAAY,OAAO,UAAU,gBAAgB,YAAY,YAAY,OAAO,MAAM;AACrG,QAAM,WAAW,WAAW,OAAO;AACnC,QAAM,WAAW,WAAW,OAAO;AACnC,SACE,4CAAC,uBACC;AAAA,IAAC;AAAA;AAAA,MACC,UAAU,CAAC,SAAS,SAAS,WAAW,QAAQ,SAAS,IAAI;AAAA,MAC7D,cAAU,kBAAAC,SAAW;AAAA,QACnB,MAAM,WAAW;AAAA,QACjB;AAAA,QACA,YAAY;AAAA,QACZ,UAAU;AAAA,QACV,WAAW;AAAA,MACb,CAAC;AAAA,MAED;AAAA,oDAAC,oBAAAD,QAAY,QAAZ,EAAmB,WAAW,WAAW,QAAQ,IAAI,oBAAoB,IAAI,MAAM,UACjF,yBACH;AAAA,QAEA,4CAAC,oBAAAA,QAAY,SAAZ,EAAoB,OAAM,cAAa;AAAA,QAExC,4CAAC,oBAAAA,QAAY,UAAZ,EAAqB,WAAU,YAAW,WAAU,iBAAgB,eAAc,cAAa;AAAA,QAEhG,4CAAC,oBAAAA,QAAY,SAAZ,EAAoB,OAAM,iBAAgB;AAAA,QAC3C,4CAAC,oBAAAA,QAAY,SAAZ,EAAoB,WAAU,YAAW,OAAM,cAAa;AAAA,QAC7D,4CAAC,oBAAAA,QAAY,SAAZ,EAAoB,OAAM,aAAY;AAAA,QAEvC,4CAAC,oBAAAA,QAAY,UAAZ,EAAqB,WAAU,YAAW,WAAU,YAAW,eAAc,aAAY;AAAA,QAE1F,4CAAC,oBAAAA,QAAY,SAAZ,EAAoB,OAAM,YAAW;AAAA,QAEtC,4CAAC,oBAAAA,QAAY,QAAZ,EAAmB,WAAW,WAAW,QAAQ,QAAQ,oBAAoB,IAAI,MAAM,UACrF,qBACH;AAAA;AAAA;AAAA,EACF,GACF;AAEJ;AAGA,IAAO,oBAAQ;",
4
+ "sourcesContent": ["/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\nimport React from 'react';\nimport { default as ReactPagify } from 'react-pagify';\nimport segmentize from 'segmentize';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\n\nconst Comp = (ReactPagify as any)?.default ?? ReactPagify;\nconst blockName = 'data-grid';\nconst PaginationContainer = aggregatedClasses('div')(blockName, 'pagination');\nconst PagifyContext = aggregatedClasses(Comp?.Context)(blockName, 'pagify-pagination');\n\nconst Paginator = ({ pagination, pages, onSelect, labelPrevious = 'Previous', labelNext = 'Next' }) => {\n const prevPage = pagination.page - 1;\n const nextPage = pagination.page + 1;\n\n return (\n <PaginationContainer>\n <PagifyContext\n onSelect={(page) => page !== pagination.page && onSelect(page)}\n segments={segmentize({\n page: pagination.page,\n pages,\n beginPages: 1,\n endPages: 1,\n sidePages: 1,\n })}\n >\n <Comp.Button className={pagination.page <= 1 ? 'button-disabled' : ''} page={prevPage}>\n {labelPrevious}\n </Comp.Button>\n\n <Comp.Segment field=\"beginPages\" />\n\n <Comp.Ellipsis className=\"ellipsis\" nextField=\"previousPages\" previousField=\"beginPages\" />\n\n <Comp.Segment field=\"previousPages\" />\n <Comp.Segment className=\"selected\" field=\"centerPage\" />\n <Comp.Segment field=\"nextPages\" />\n\n <Comp.Ellipsis className=\"ellipsis\" nextField=\"endPages\" previousField=\"nextPages\" />\n\n <Comp.Segment field=\"endPages\" />\n\n <Comp.Button className={pagination.page >= pages ? 'button-disabled' : ''} page={nextPage}>\n {labelNext}\n </Comp.Button>\n </PagifyContext>\n </PaginationContainer>\n );\n};\n\nexport { Paginator };\nexport default Paginator;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkBjB;AAfN,0BAAuC;AACvC,wBAAuB;AACvB,2BAAkC;AAElC,MAAM,OAAQ,oBAAAA,SAAqB,WAAW,oBAAAA;AAC9C,MAAM,YAAY;AAClB,MAAM,0BAAsB,wCAAkB,KAAK,EAAE,WAAW,YAAY;AAC5E,MAAM,oBAAgB,wCAAkB,MAAM,OAAO,EAAE,WAAW,mBAAmB;AAErF,MAAM,YAAY,CAAC,EAAE,YAAY,OAAO,UAAU,gBAAgB,YAAY,YAAY,OAAO,MAAM;AACrG,QAAM,WAAW,WAAW,OAAO;AACnC,QAAM,WAAW,WAAW,OAAO;AAEnC,SACE,4CAAC,uBACC;AAAA,IAAC;AAAA;AAAA,MACC,UAAU,CAAC,SAAS,SAAS,WAAW,QAAQ,SAAS,IAAI;AAAA,MAC7D,cAAU,kBAAAC,SAAW;AAAA,QACnB,MAAM,WAAW;AAAA,QACjB;AAAA,QACA,YAAY;AAAA,QACZ,UAAU;AAAA,QACV,WAAW;AAAA,MACb,CAAC;AAAA,MAED;AAAA,oDAAC,KAAK,QAAL,EAAY,WAAW,WAAW,QAAQ,IAAI,oBAAoB,IAAI,MAAM,UAC1E,yBACH;AAAA,QAEA,4CAAC,KAAK,SAAL,EAAa,OAAM,cAAa;AAAA,QAEjC,4CAAC,KAAK,UAAL,EAAc,WAAU,YAAW,WAAU,iBAAgB,eAAc,cAAa;AAAA,QAEzF,4CAAC,KAAK,SAAL,EAAa,OAAM,iBAAgB;AAAA,QACpC,4CAAC,KAAK,SAAL,EAAa,WAAU,YAAW,OAAM,cAAa;AAAA,QACtD,4CAAC,KAAK,SAAL,EAAa,OAAM,aAAY;AAAA,QAEhC,4CAAC,KAAK,UAAL,EAAc,WAAU,YAAW,WAAU,YAAW,eAAc,aAAY;AAAA,QAEnF,4CAAC,KAAK,SAAL,EAAa,OAAM,YAAW;AAAA,QAE/B,4CAAC,KAAK,QAAL,EAAY,WAAW,WAAW,QAAQ,QAAQ,oBAAoB,IAAI,MAAM,UAC9E,qBACH;AAAA;AAAA;AAAA,EACF,GACF;AAEJ;AAGA,IAAO,oBAAQ;",
6
6
  "names": ["ReactPagify", "segmentize"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/plugins/virtualization/AutoHeightList.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { forwardRef, useRef } from 'react';\nimport { FixedSizeList as List } from 'react-window';\nimport { mergeRefs, useWindowScrollerList, cx } from '@elliemae/ds-utilities';\n\n// eslint-disable-next-line react/display-name\nexport const AutoHeightList = forwardRef(\n (\n {\n itemCount,\n className,\n innerRef,\n itemData,\n itemKey,\n itemSize,\n outerRef,\n component: ListComponent = List,\n ...otherProps\n },\n ref,\n ) => {\n const listRef = useRef();\n const outerListRef = useRef();\n\n useWindowScrollerList({\n listInstance: listRef,\n outerListRef,\n });\n\n return (\n <ListComponent\n {...otherProps}\n ref={mergeRefs(ref, listRef)}\n className={cx(className, 'window-scroller-override')}\n height={window.innerHeight}\n innerRef={innerRef}\n itemCount={itemCount}\n itemData={itemData}\n itemKey={itemKey}\n itemSize={itemSize}\n outerRef={mergeRefs(outerListRef, outerRef)}\n overscanCount={10}\n useIsScrolling\n />\n );\n },\n);\n\nexport default AutoHeightList;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD6BjB;AA7BN,mBAA0C;AAC1C,0BAAsC;AACtC,0BAAqD;AAG9C,MAAM,qBAAiB;AAAA,EAC5B,CACE;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW,gBAAgB,oBAAAA;AAAA,IAC3B,GAAG;AAAA,EACL,GACA,QACG;AACH,UAAM,cAAU,qBAAO;AACvB,UAAM,mBAAe,qBAAO;AAE5B,mDAAsB;AAAA,MACpB,cAAc;AAAA,MACd;AAAA,IACF,CAAC;AAED,WACE;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ,SAAK,+BAAU,KAAK,OAAO;AAAA,QAC3B,eAAW,wBAAG,WAAW,0BAA0B;AAAA,QACnD,QAAQ,OAAO;AAAA,QACf;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,cAAU,+BAAU,cAAc,QAAQ;AAAA,QAC1C,eAAe;AAAA,QACf,gBAAc;AAAA;AAAA,IAChB;AAAA,EAEJ;AACF;AAEA,IAAO,yBAAQ;",
4
+ "sourcesContent": ["import React, { forwardRef, useRef } from 'react';\nimport { FixedSizeList as List } from 'react-window';\nimport { mergeRefs, useWindowScrollerList, cx } from '@elliemae/ds-utilities';\n\n// eslint-disable-next-line react/display-name\nexport const AutoHeightList = forwardRef(\n (\n {\n itemCount,\n className,\n innerRef,\n itemData,\n itemKey,\n itemSize,\n outerRef,\n component: ListComponent = List,\n ...otherProps\n },\n ref,\n ) => {\n const listRef = useRef();\n const outerListRef = useRef();\n\n useWindowScrollerList({\n listInstance: listRef,\n outerListRef,\n });\n return (\n <ListComponent\n {...otherProps}\n ref={mergeRefs(ref, listRef)}\n className={cx(className, 'window-scroller-override')}\n height={window.innerHeight}\n innerRef={innerRef}\n itemCount={itemCount}\n itemData={itemData}\n itemKey={itemKey}\n itemSize={itemSize}\n outerRef={mergeRefs(outerListRef, outerRef)}\n overscanCount={10}\n useIsScrolling\n />\n );\n },\n);\n\nexport default AutoHeightList;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD4BjB;AA5BN,mBAA0C;AAC1C,0BAAsC;AACtC,0BAAqD;AAG9C,MAAM,qBAAiB;AAAA,EAC5B,CACE;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW,gBAAgB,oBAAAA;AAAA,IAC3B,GAAG;AAAA,EACL,GACA,QACG;AACH,UAAM,cAAU,qBAAO;AACvB,UAAM,mBAAe,qBAAO;AAE5B,mDAAsB;AAAA,MACpB,cAAc;AAAA,MACd;AAAA,IACF,CAAC;AACD,WACE;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ,SAAK,+BAAU,KAAK,OAAO;AAAA,QAC3B,eAAW,wBAAG,WAAW,0BAA0B;AAAA,QACnD,QAAQ,OAAO;AAAA,QACf;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,cAAU,+BAAU,cAAc,QAAQ;AAAA,QAC1C,eAAe;AAAA,QACf,gBAAc;AAAA;AAAA,IAChB;AAAA,EAEJ;AACF;AAEA,IAAO,yBAAQ;",
6
6
  "names": ["List"]
7
7
  }
@@ -1,11 +1,12 @@
1
1
  import * as React from "react";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import ReactPagify from "react-pagify";
3
+ import { default as ReactPagify } from "react-pagify";
4
4
  import segmentize from "segmentize";
5
5
  import { aggregatedClasses } from "@elliemae/ds-classnames";
6
+ const Comp = ReactPagify?.default ?? ReactPagify;
6
7
  const blockName = "data-grid";
7
8
  const PaginationContainer = aggregatedClasses("div")(blockName, "pagination");
8
- const PagifyContext = aggregatedClasses(ReactPagify?.Context)(blockName, "pagify-pagination");
9
+ const PagifyContext = aggregatedClasses(Comp?.Context)(blockName, "pagify-pagination");
9
10
  const Paginator = ({ pagination, pages, onSelect, labelPrevious = "Previous", labelNext = "Next" }) => {
10
11
  const prevPage = pagination.page - 1;
11
12
  const nextPage = pagination.page + 1;
@@ -21,15 +22,15 @@ const Paginator = ({ pagination, pages, onSelect, labelPrevious = "Previous", la
21
22
  sidePages: 1
22
23
  }),
23
24
  children: [
24
- /* @__PURE__ */ jsx(ReactPagify.Button, { className: pagination.page <= 1 ? "button-disabled" : "", page: prevPage, children: labelPrevious }),
25
- /* @__PURE__ */ jsx(ReactPagify.Segment, { field: "beginPages" }),
26
- /* @__PURE__ */ jsx(ReactPagify.Ellipsis, { className: "ellipsis", nextField: "previousPages", previousField: "beginPages" }),
27
- /* @__PURE__ */ jsx(ReactPagify.Segment, { field: "previousPages" }),
28
- /* @__PURE__ */ jsx(ReactPagify.Segment, { className: "selected", field: "centerPage" }),
29
- /* @__PURE__ */ jsx(ReactPagify.Segment, { field: "nextPages" }),
30
- /* @__PURE__ */ jsx(ReactPagify.Ellipsis, { className: "ellipsis", nextField: "endPages", previousField: "nextPages" }),
31
- /* @__PURE__ */ jsx(ReactPagify.Segment, { field: "endPages" }),
32
- /* @__PURE__ */ jsx(ReactPagify.Button, { className: pagination.page >= pages ? "button-disabled" : "", page: nextPage, children: labelNext })
25
+ /* @__PURE__ */ jsx(Comp.Button, { className: pagination.page <= 1 ? "button-disabled" : "", page: prevPage, children: labelPrevious }),
26
+ /* @__PURE__ */ jsx(Comp.Segment, { field: "beginPages" }),
27
+ /* @__PURE__ */ jsx(Comp.Ellipsis, { className: "ellipsis", nextField: "previousPages", previousField: "beginPages" }),
28
+ /* @__PURE__ */ jsx(Comp.Segment, { field: "previousPages" }),
29
+ /* @__PURE__ */ jsx(Comp.Segment, { className: "selected", field: "centerPage" }),
30
+ /* @__PURE__ */ jsx(Comp.Segment, { field: "nextPages" }),
31
+ /* @__PURE__ */ jsx(Comp.Ellipsis, { className: "ellipsis", nextField: "endPages", previousField: "nextPages" }),
32
+ /* @__PURE__ */ jsx(Comp.Segment, { field: "endPages" }),
33
+ /* @__PURE__ */ jsx(Comp.Button, { className: pagination.page >= pages ? "button-disabled" : "", page: nextPage, children: labelNext })
33
34
  ]
34
35
  }
35
36
  ) });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/plugins/pagination/components/Paginator.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\nimport React from 'react';\nimport ReactPagify from 'react-pagify';\nimport segmentize from 'segmentize';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\n\nconst blockName = 'data-grid';\n\nconst PaginationContainer = aggregatedClasses('div')(blockName, 'pagination');\nconst PagifyContext = aggregatedClasses(ReactPagify?.Context)(blockName, 'pagify-pagination');\n\nconst Paginator = ({ pagination, pages, onSelect, labelPrevious = 'Previous', labelNext = 'Next' }) => {\n const prevPage = pagination.page - 1;\n const nextPage = pagination.page + 1;\n return (\n <PaginationContainer>\n <PagifyContext\n onSelect={(page) => page !== pagination.page && onSelect(page)}\n segments={segmentize({\n page: pagination.page,\n pages,\n beginPages: 1,\n endPages: 1,\n sidePages: 1,\n })}\n >\n <ReactPagify.Button className={pagination.page <= 1 ? 'button-disabled' : ''} page={prevPage}>\n {labelPrevious}\n </ReactPagify.Button>\n\n <ReactPagify.Segment field=\"beginPages\" />\n\n <ReactPagify.Ellipsis className=\"ellipsis\" nextField=\"previousPages\" previousField=\"beginPages\" />\n\n <ReactPagify.Segment field=\"previousPages\" />\n <ReactPagify.Segment className=\"selected\" field=\"centerPage\" />\n <ReactPagify.Segment field=\"nextPages\" />\n\n <ReactPagify.Ellipsis className=\"ellipsis\" nextField=\"endPages\" previousField=\"nextPages\" />\n\n <ReactPagify.Segment field=\"endPages\" />\n\n <ReactPagify.Button className={pagination.page >= pages ? 'button-disabled' : ''} page={nextPage}>\n {labelNext}\n </ReactPagify.Button>\n </PagifyContext>\n </PaginationContainer>\n );\n};\n\nexport { Paginator };\nexport default Paginator;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACiBjB,SAUE,KAVF;AAdN,OAAO,iBAAiB;AACxB,OAAO,gBAAgB;AACvB,SAAS,yBAAyB;AAElC,MAAM,YAAY;AAElB,MAAM,sBAAsB,kBAAkB,KAAK,EAAE,WAAW,YAAY;AAC5E,MAAM,gBAAgB,kBAAkB,aAAa,OAAO,EAAE,WAAW,mBAAmB;AAE5F,MAAM,YAAY,CAAC,EAAE,YAAY,OAAO,UAAU,gBAAgB,YAAY,YAAY,OAAO,MAAM;AACrG,QAAM,WAAW,WAAW,OAAO;AACnC,QAAM,WAAW,WAAW,OAAO;AACnC,SACE,oBAAC,uBACC;AAAA,IAAC;AAAA;AAAA,MACC,UAAU,CAAC,SAAS,SAAS,WAAW,QAAQ,SAAS,IAAI;AAAA,MAC7D,UAAU,WAAW;AAAA,QACnB,MAAM,WAAW;AAAA,QACjB;AAAA,QACA,YAAY;AAAA,QACZ,UAAU;AAAA,QACV,WAAW;AAAA,MACb,CAAC;AAAA,MAED;AAAA,4BAAC,YAAY,QAAZ,EAAmB,WAAW,WAAW,QAAQ,IAAI,oBAAoB,IAAI,MAAM,UACjF,yBACH;AAAA,QAEA,oBAAC,YAAY,SAAZ,EAAoB,OAAM,cAAa;AAAA,QAExC,oBAAC,YAAY,UAAZ,EAAqB,WAAU,YAAW,WAAU,iBAAgB,eAAc,cAAa;AAAA,QAEhG,oBAAC,YAAY,SAAZ,EAAoB,OAAM,iBAAgB;AAAA,QAC3C,oBAAC,YAAY,SAAZ,EAAoB,WAAU,YAAW,OAAM,cAAa;AAAA,QAC7D,oBAAC,YAAY,SAAZ,EAAoB,OAAM,aAAY;AAAA,QAEvC,oBAAC,YAAY,UAAZ,EAAqB,WAAU,YAAW,WAAU,YAAW,eAAc,aAAY;AAAA,QAE1F,oBAAC,YAAY,SAAZ,EAAoB,OAAM,YAAW;AAAA,QAEtC,oBAAC,YAAY,QAAZ,EAAmB,WAAW,WAAW,QAAQ,QAAQ,oBAAoB,IAAI,MAAM,UACrF,qBACH;AAAA;AAAA;AAAA,EACF,GACF;AAEJ;AAGA,IAAO,oBAAQ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\nimport React from 'react';\nimport { default as ReactPagify } from 'react-pagify';\nimport segmentize from 'segmentize';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\n\nconst Comp = (ReactPagify as any)?.default ?? ReactPagify;\nconst blockName = 'data-grid';\nconst PaginationContainer = aggregatedClasses('div')(blockName, 'pagination');\nconst PagifyContext = aggregatedClasses(Comp?.Context)(blockName, 'pagify-pagination');\n\nconst Paginator = ({ pagination, pages, onSelect, labelPrevious = 'Previous', labelNext = 'Next' }) => {\n const prevPage = pagination.page - 1;\n const nextPage = pagination.page + 1;\n\n return (\n <PaginationContainer>\n <PagifyContext\n onSelect={(page) => page !== pagination.page && onSelect(page)}\n segments={segmentize({\n page: pagination.page,\n pages,\n beginPages: 1,\n endPages: 1,\n sidePages: 1,\n })}\n >\n <Comp.Button className={pagination.page <= 1 ? 'button-disabled' : ''} page={prevPage}>\n {labelPrevious}\n </Comp.Button>\n\n <Comp.Segment field=\"beginPages\" />\n\n <Comp.Ellipsis className=\"ellipsis\" nextField=\"previousPages\" previousField=\"beginPages\" />\n\n <Comp.Segment field=\"previousPages\" />\n <Comp.Segment className=\"selected\" field=\"centerPage\" />\n <Comp.Segment field=\"nextPages\" />\n\n <Comp.Ellipsis className=\"ellipsis\" nextField=\"endPages\" previousField=\"nextPages\" />\n\n <Comp.Segment field=\"endPages\" />\n\n <Comp.Button className={pagination.page >= pages ? 'button-disabled' : ''} page={nextPage}>\n {labelNext}\n </Comp.Button>\n </PagifyContext>\n </PaginationContainer>\n );\n};\n\nexport { Paginator };\nexport default Paginator;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACkBjB,SAUE,KAVF;AAfN,SAAS,WAAW,mBAAmB;AACvC,OAAO,gBAAgB;AACvB,SAAS,yBAAyB;AAElC,MAAM,OAAQ,aAAqB,WAAW;AAC9C,MAAM,YAAY;AAClB,MAAM,sBAAsB,kBAAkB,KAAK,EAAE,WAAW,YAAY;AAC5E,MAAM,gBAAgB,kBAAkB,MAAM,OAAO,EAAE,WAAW,mBAAmB;AAErF,MAAM,YAAY,CAAC,EAAE,YAAY,OAAO,UAAU,gBAAgB,YAAY,YAAY,OAAO,MAAM;AACrG,QAAM,WAAW,WAAW,OAAO;AACnC,QAAM,WAAW,WAAW,OAAO;AAEnC,SACE,oBAAC,uBACC;AAAA,IAAC;AAAA;AAAA,MACC,UAAU,CAAC,SAAS,SAAS,WAAW,QAAQ,SAAS,IAAI;AAAA,MAC7D,UAAU,WAAW;AAAA,QACnB,MAAM,WAAW;AAAA,QACjB;AAAA,QACA,YAAY;AAAA,QACZ,UAAU;AAAA,QACV,WAAW;AAAA,MACb,CAAC;AAAA,MAED;AAAA,4BAAC,KAAK,QAAL,EAAY,WAAW,WAAW,QAAQ,IAAI,oBAAoB,IAAI,MAAM,UAC1E,yBACH;AAAA,QAEA,oBAAC,KAAK,SAAL,EAAa,OAAM,cAAa;AAAA,QAEjC,oBAAC,KAAK,UAAL,EAAc,WAAU,YAAW,WAAU,iBAAgB,eAAc,cAAa;AAAA,QAEzF,oBAAC,KAAK,SAAL,EAAa,OAAM,iBAAgB;AAAA,QACpC,oBAAC,KAAK,SAAL,EAAa,WAAU,YAAW,OAAM,cAAa;AAAA,QACtD,oBAAC,KAAK,SAAL,EAAa,OAAM,aAAY;AAAA,QAEhC,oBAAC,KAAK,UAAL,EAAc,WAAU,YAAW,WAAU,YAAW,eAAc,aAAY;AAAA,QAEnF,oBAAC,KAAK,SAAL,EAAa,OAAM,YAAW;AAAA,QAE/B,oBAAC,KAAK,QAAL,EAAY,WAAW,WAAW,QAAQ,QAAQ,oBAAoB,IAAI,MAAM,UAC9E,qBACH;AAAA;AAAA;AAAA,EACF,GACF;AAEJ;AAGA,IAAO,oBAAQ;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/plugins/virtualization/AutoHeightList.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { forwardRef, useRef } from 'react';\nimport { FixedSizeList as List } from 'react-window';\nimport { mergeRefs, useWindowScrollerList, cx } from '@elliemae/ds-utilities';\n\n// eslint-disable-next-line react/display-name\nexport const AutoHeightList = forwardRef(\n (\n {\n itemCount,\n className,\n innerRef,\n itemData,\n itemKey,\n itemSize,\n outerRef,\n component: ListComponent = List,\n ...otherProps\n },\n ref,\n ) => {\n const listRef = useRef();\n const outerListRef = useRef();\n\n useWindowScrollerList({\n listInstance: listRef,\n outerListRef,\n });\n\n return (\n <ListComponent\n {...otherProps}\n ref={mergeRefs(ref, listRef)}\n className={cx(className, 'window-scroller-override')}\n height={window.innerHeight}\n innerRef={innerRef}\n itemCount={itemCount}\n itemData={itemData}\n itemKey={itemKey}\n itemSize={itemSize}\n outerRef={mergeRefs(outerListRef, outerRef)}\n overscanCount={10}\n useIsScrolling\n />\n );\n },\n);\n\nexport default AutoHeightList;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;AC6BjB;AA7BN,SAAgB,YAAY,cAAc;AAC1C,SAAS,iBAAiB,YAAY;AACtC,SAAS,WAAW,uBAAuB,UAAU;AAG9C,MAAM,iBAAiB;AAAA,EAC5B,CACE;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW,gBAAgB;AAAA,IAC3B,GAAG;AAAA,EACL,GACA,QACG;AACH,UAAM,UAAU,OAAO;AACvB,UAAM,eAAe,OAAO;AAE5B,0BAAsB;AAAA,MACpB,cAAc;AAAA,MACd;AAAA,IACF,CAAC;AAED,WACE;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ,KAAK,UAAU,KAAK,OAAO;AAAA,QAC3B,WAAW,GAAG,WAAW,0BAA0B;AAAA,QACnD,QAAQ,OAAO;AAAA,QACf;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,UAAU,UAAU,cAAc,QAAQ;AAAA,QAC1C,eAAe;AAAA,QACf,gBAAc;AAAA;AAAA,IAChB;AAAA,EAEJ;AACF;AAEA,IAAO,yBAAQ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { forwardRef, useRef } from 'react';\nimport { FixedSizeList as List } from 'react-window';\nimport { mergeRefs, useWindowScrollerList, cx } from '@elliemae/ds-utilities';\n\n// eslint-disable-next-line react/display-name\nexport const AutoHeightList = forwardRef(\n (\n {\n itemCount,\n className,\n innerRef,\n itemData,\n itemKey,\n itemSize,\n outerRef,\n component: ListComponent = List,\n ...otherProps\n },\n ref,\n ) => {\n const listRef = useRef();\n const outerListRef = useRef();\n\n useWindowScrollerList({\n listInstance: listRef,\n outerListRef,\n });\n return (\n <ListComponent\n {...otherProps}\n ref={mergeRefs(ref, listRef)}\n className={cx(className, 'window-scroller-override')}\n height={window.innerHeight}\n innerRef={innerRef}\n itemCount={itemCount}\n itemData={itemData}\n itemKey={itemKey}\n itemSize={itemSize}\n outerRef={mergeRefs(outerListRef, outerRef)}\n overscanCount={10}\n useIsScrolling\n />\n );\n },\n);\n\nexport default AutoHeightList;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;AC4BjB;AA5BN,SAAgB,YAAY,cAAc;AAC1C,SAAS,iBAAiB,YAAY;AACtC,SAAS,WAAW,uBAAuB,UAAU;AAG9C,MAAM,iBAAiB;AAAA,EAC5B,CACE;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW,gBAAgB;AAAA,IAC3B,GAAG;AAAA,EACL,GACA,QACG;AACH,UAAM,UAAU,OAAO;AACvB,UAAM,eAAe,OAAO;AAE5B,0BAAsB;AAAA,MACpB,cAAc;AAAA,MACd;AAAA,IACF,CAAC;AACD,WACE;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ,KAAK,UAAU,KAAK,OAAO;AAAA,QAC3B,WAAW,GAAG,WAAW,0BAA0B;AAAA,QACnD,QAAQ,OAAO;AAAA,QACf;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,UAAU,UAAU,cAAc,QAAQ;AAAA,QAC1C,eAAe;AAAA,QACf,gBAAc;AAAA;AAAA,IAChB;AAAA,EAEJ;AACF;AAEA,IAAO,yBAAQ;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-datagrids",
3
- "version": "3.16.0-next.17",
3
+ "version": "3.16.0-next.19",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Data Grids",
6
6
  "files": [
@@ -556,25 +556,25 @@
556
556
  "sortabular": "~1.6.0",
557
557
  "stylesheet-helpers": "~0.2.2",
558
558
  "uuid": "~8.3.2",
559
- "@elliemae/ds-button": "3.16.0-next.17",
560
- "@elliemae/ds-form": "3.16.0-next.17",
561
- "@elliemae/ds-dropdownmenu": "3.16.0-next.17",
562
- "@elliemae/ds-menu": "3.16.0-next.17",
563
- "@elliemae/ds-filterbar": "3.16.0-next.17",
564
- "@elliemae/ds-grid": "3.16.0-next.17",
565
- "@elliemae/ds-icons": "3.16.0-next.17",
566
- "@elliemae/ds-popper": "3.16.0-next.17",
567
- "@elliemae/ds-separator": "3.16.0-next.17",
568
- "@elliemae/ds-shared": "3.16.0-next.17",
569
- "@elliemae/ds-spinner": "3.16.0-next.17",
570
- "@elliemae/ds-system": "3.16.0-next.17",
571
- "@elliemae/ds-props-helpers": "3.16.0-next.17",
572
- "@elliemae/ds-toolbar": "3.16.0-next.17",
573
- "@elliemae/ds-truncated-tooltip-text": "3.16.0-next.17",
574
- "@elliemae/ds-utilities": "3.16.0-next.17",
575
- "@elliemae/ds-classnames": "3.16.0-next.17",
576
- "@elliemae/ds-controlled-form": "3.16.0-next.17",
577
- "@elliemae/ds-datagrids": "3.16.0-next.17"
559
+ "@elliemae/ds-button": "3.16.0-next.19",
560
+ "@elliemae/ds-controlled-form": "3.16.0-next.19",
561
+ "@elliemae/ds-dropdownmenu": "3.16.0-next.19",
562
+ "@elliemae/ds-classnames": "3.16.0-next.19",
563
+ "@elliemae/ds-filterbar": "3.16.0-next.19",
564
+ "@elliemae/ds-datagrids": "3.16.0-next.19",
565
+ "@elliemae/ds-form": "3.16.0-next.19",
566
+ "@elliemae/ds-grid": "3.16.0-next.19",
567
+ "@elliemae/ds-icons": "3.16.0-next.19",
568
+ "@elliemae/ds-menu": "3.16.0-next.19",
569
+ "@elliemae/ds-popper": "3.16.0-next.19",
570
+ "@elliemae/ds-props-helpers": "3.16.0-next.19",
571
+ "@elliemae/ds-separator": "3.16.0-next.19",
572
+ "@elliemae/ds-shared": "3.16.0-next.19",
573
+ "@elliemae/ds-spinner": "3.16.0-next.19",
574
+ "@elliemae/ds-system": "3.16.0-next.19",
575
+ "@elliemae/ds-toolbar": "3.16.0-next.19",
576
+ "@elliemae/ds-truncated-tooltip-text": "3.16.0-next.19",
577
+ "@elliemae/ds-utilities": "3.16.0-next.19"
578
578
  },
579
579
  "devDependencies": {
580
580
  "@testing-library/jest-dom": "~5.16.5",