@elliemae/ds-pagination 3.25.0-next.2 → 3.25.0-next.4
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/DSPaginator/getOptions.js.map +1 -1
- package/dist/cjs/parts/DSPaginator/index.js +2 -2
- package/dist/cjs/parts/DSPaginator/index.js.map +2 -2
- package/dist/cjs/parts/DSPerPageSelector/getOptions.js.map +1 -1
- package/dist/cjs/parts/DSPerPageSelector/index.js +2 -2
- package/dist/cjs/parts/DSPerPageSelector/index.js.map +2 -2
- package/dist/cjs/react-desc-prop-types.js.map +1 -1
- package/dist/esm/parts/DSPaginator/getOptions.js.map +1 -1
- package/dist/esm/parts/DSPaginator/index.js +1 -1
- package/dist/esm/parts/DSPaginator/index.js.map +1 -1
- package/dist/esm/parts/DSPerPageSelector/getOptions.js.map +1 -1
- package/dist/esm/parts/DSPerPageSelector/index.js +1 -1
- package/dist/esm/parts/DSPerPageSelector/index.js.map +1 -1
- package/dist/esm/react-desc-prop-types.js.map +1 -1
- package/dist/types/parts/DSPaginator/getOptions.d.ts +1 -1
- package/dist/types/parts/DSPaginator/usePaginator.d.ts +1 -1
- package/dist/types/parts/DSPerPageSelector/getOptions.d.ts +1 -1
- package/dist/types/parts/DSPerPageSelector/usePerPageSelector.d.ts +1 -1
- package/dist/types/react-desc-prop-types.d.ts +1 -1
- package/package.json +11 -11
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/parts/DSPaginator/getOptions.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { Checkmark } from '@elliemae/ds-icons';\nimport type { DSDropdownMenuT } from '@elliemae/ds-dropdownmenu';\n\ninterface OptionWithDetailsT {\n pageInfoWidth: number;\n pageIndex: number;\n index: number;\n pageDetails: string[];\n}\n\nconst OptionWithDetails = (props: OptionWithDetailsT) => {\n const Comp = () => {\n const { pageInfoWidth, pageIndex, index, pageDetails } = props;\n return (\n <Grid cols={['16px', `${pageInfoWidth + 16}px`, 'auto']} gutter=\"xxs\" alignItems=\"center\">\n {pageIndex - 1 === index ? <Checkmark size=\"s\" color={['brand-primary', '600']} /> : <div />}\n <span>{index + 1}</span>\n <span\n style={{\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n }}\n >\n {pageDetails[index]}\n </span>\n </Grid>\n );\n };\n return Comp;\n};\n\nexport const getOptions = (args: {\n pageCount: number | string;\n pageIndex: number;\n pageDetails: string[];\n pageInfoWidth: number;\n}): DSDropdownMenuT.ItemSingleOptions[] => {\n const { pageCount, pageIndex, pageDetails, pageInfoWidth } = args;\n\n const amountOfPages = typeof pageCount === 'string' ? pageIndex + 1 : pageCount;\n\n const options = new Array(amountOfPages).fill(0).map((_, index) => {\n const option: DSDropdownMenuT.ItemSingleOptions = {\n dsId: (index + 1).toString(),\n label: (index + 1).toString(),\n value: index + 1,\n type: 'single',\n };\n if (pageDetails?.length) {\n option.render = OptionWithDetails({ pageInfoWidth, pageIndex, index, pageDetails });\n }\n return option;\n });\n return options;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { Checkmark } from '@elliemae/ds-icons';\nimport type { DSDropdownMenuT } from '@elliemae/ds-dropdownmenu-v2';\n\ninterface OptionWithDetailsT {\n pageInfoWidth: number;\n pageIndex: number;\n index: number;\n pageDetails: string[];\n}\n\nconst OptionWithDetails = (props: OptionWithDetailsT) => {\n const Comp = () => {\n const { pageInfoWidth, pageIndex, index, pageDetails } = props;\n return (\n <Grid cols={['16px', `${pageInfoWidth + 16}px`, 'auto']} gutter=\"xxs\" alignItems=\"center\">\n {pageIndex - 1 === index ? <Checkmark size=\"s\" color={['brand-primary', '600']} /> : <div />}\n <span>{index + 1}</span>\n <span\n style={{\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n }}\n >\n {pageDetails[index]}\n </span>\n </Grid>\n );\n };\n return Comp;\n};\n\nexport const getOptions = (args: {\n pageCount: number | string;\n pageIndex: number;\n pageDetails: string[];\n pageInfoWidth: number;\n}): DSDropdownMenuT.ItemSingleOptions[] => {\n const { pageCount, pageIndex, pageDetails, pageInfoWidth } = args;\n\n const amountOfPages = typeof pageCount === 'string' ? pageIndex + 1 : pageCount;\n\n const options = new Array(amountOfPages).fill(0).map((_, index) => {\n const option: DSDropdownMenuT.ItemSingleOptions = {\n dsId: (index + 1).toString(),\n label: (index + 1).toString(),\n value: index + 1,\n type: 'single',\n };\n if (pageDetails?.length) {\n option.render = OptionWithDetails({ pageInfoWidth, pageIndex, index, pageDetails });\n }\n return option;\n });\n return options;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgBjB;AAfN,qBAAqB;AACrB,sBAA0B;AAU1B,MAAM,oBAAoB,CAAC,UAA8B;AACvD,QAAM,OAAO,MAAM;AACjB,UAAM,EAAE,eAAe,WAAW,OAAO,YAAY,IAAI;AACzD,WACE,6CAAC,uBAAK,MAAM,CAAC,QAAQ,GAAG,gBAAgB,QAAQ,MAAM,GAAG,QAAO,OAAM,YAAW,UAC9E;AAAA,kBAAY,MAAM,QAAQ,4CAAC,6BAAU,MAAK,KAAI,OAAO,CAAC,iBAAiB,KAAK,GAAG,IAAK,4CAAC,SAAI;AAAA,MAC1F,4CAAC,UAAM,kBAAQ,GAAE;AAAA,MACjB;AAAA,QAAC;AAAA;AAAA,UACC,OAAO;AAAA,YACL,YAAY;AAAA,YACZ,cAAc;AAAA,YACd,UAAU;AAAA,UACZ;AAAA,UAEC,sBAAY,KAAK;AAAA;AAAA,MACpB;AAAA,OACF;AAAA,EAEJ;AACA,SAAO;AACT;AAEO,MAAM,aAAa,CAAC,SAKgB;AACzC,QAAM,EAAE,WAAW,WAAW,aAAa,cAAc,IAAI;AAE7D,QAAM,gBAAgB,OAAO,cAAc,WAAW,YAAY,IAAI;AAEtE,QAAM,UAAU,IAAI,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,IAAI,CAAC,GAAG,UAAU;AACjE,UAAM,SAA4C;AAAA,MAChD,OAAO,QAAQ,GAAG,SAAS;AAAA,MAC3B,QAAQ,QAAQ,GAAG,SAAS;AAAA,MAC5B,OAAO,QAAQ;AAAA,MACf,MAAM;AAAA,IACR;AACA,QAAI,aAAa,QAAQ;AACvB,aAAO,SAAS,kBAAkB,EAAE,eAAe,WAAW,OAAO,YAAY,CAAC;AAAA,IACpF;AACA,WAAO;AAAA,EACT,CAAC;AACD,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -38,7 +38,7 @@ var import_react = require("react");
|
|
|
38
38
|
var import_ds_icons = require("@elliemae/ds-icons");
|
|
39
39
|
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
40
40
|
var import_ds_grid = require("@elliemae/ds-grid");
|
|
41
|
-
var
|
|
41
|
+
var import_ds_dropdownmenu_v2 = require("@elliemae/ds-dropdownmenu-v2");
|
|
42
42
|
var import_ds_typography = require("@elliemae/ds-typography");
|
|
43
43
|
var import_ds_circular_progress_indicator = require("@elliemae/ds-circular-progress-indicator");
|
|
44
44
|
var import_styled = require("../../styled.js");
|
|
@@ -77,7 +77,7 @@ const DSPaginator = (props) => {
|
|
|
77
77
|
return () => setIsOpened((prev) => !prev);
|
|
78
78
|
}, [globalAttributes.onClick, setIsOpened]);
|
|
79
79
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
80
|
-
|
|
80
|
+
import_ds_dropdownmenu_v2.DSDropdownMenuV2,
|
|
81
81
|
{
|
|
82
82
|
isOpened,
|
|
83
83
|
options,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/parts/DSPaginator/index.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable react/prop-types */\nimport React, { useMemo } from 'react';\nimport type { DSButtonT } from '@elliemae/ds-button-v2';\nimport { ChevronDown } from '@elliemae/ds-icons';\nimport { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSDropdownMenuV2 } from '@elliemae/ds-dropdownmenu';\nimport { DSTypography } from '@elliemae/ds-typography';\nimport { DSCircularIndeterminateIndicator } from '@elliemae/ds-circular-progress-indicator';\nimport { InvisibleDiv, PaginationDropdownButton, DSPaginationSeparator } from '../../styled.js';\nimport { paginatorDefaultProps, DSPaginatorPropTypesSchema } from '../../react-desc-prop-types.js';\nimport { PaginatorName } from '../../DSPaginationDefinitions.js';\nimport { usePaginator } from './usePaginator.js';\nimport { createPaginatorHeader } from './createPaginatorHeader.js';\nimport { PAGINATION_DATA_TESTID } from '../../PaginationDataTestID.js';\nimport type { DSDropdownMenuT } from '@elliemae/ds-dropdownmenu';\nimport type { DSPaginationT } from '../../react-desc-prop-types.js';\n\nexport const DSPaginator: React.ComponentType<DSPaginationT.PaginatorProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSPaginationT.PaginatorInternalProps>(\n props,\n paginatorDefaultProps,\n );\n useValidateTypescriptPropTypes(propsWithDefault, DSPaginatorPropTypesSchema, PaginatorName);\n\n const { pageIndex, pageCount, isLoadingPageCount, onPageChange, pageDetails, pageDetailsTitle } = propsWithDefault;\n\n const {\n btnRef,\n btnWidth,\n pageInfoWidth,\n options,\n isOpened,\n setIsOpened,\n detailWidth,\n globalAttributes,\n xstyledAttributes,\n actionRef,\n onKeyDown,\n } = usePaginator(propsWithDefault);\n\n const Header = useMemo(\n () => createPaginatorHeader({ pageDetailsTitle, pageInfoWidth }),\n [pageDetailsTitle, pageInfoWidth],\n );\n\n const buttonOnClick: DSButtonT.Props['onClick'] = useMemo(() => {\n if (globalAttributes.onClick) return globalAttributes.onClick as DSButtonT.Props['onClick'];\n return () => setIsOpened((prev) => !prev);\n }, [globalAttributes.onClick, setIsOpened]);\n\n return (\n <DSDropdownMenuV2\n isOpened={isOpened}\n options={options}\n selectedOptions={{ [pageIndex.toString()]: true }}\n onOptionClick={(_, clickedOption) => {\n onPageChange((clickedOption as DSDropdownMenuT.ItemSingleOptions).value as number);\n setIsOpened(false);\n btnRef.current?.focus();\n }}\n onClickOutside={() => {\n setIsOpened(false);\n btnRef.current?.focus();\n }}\n customOffset={[-23, 2]}\n startPlacementPreference=\"top-start\"\n actionRef={actionRef}\n onKeyDown={onKeyDown}\n minWidth={pageDetails.length !== 0 ? btnWidth + 23 : pageCount.toString().length * 6 + 90}\n maxHeight={300}\n HeaderComp={Header}\n >\n <PaginationDropdownButton\n buttonType=\"raw\"\n disabled={isLoadingPageCount}\n innerRef={btnRef}\n aria-pressed={isOpened}\n aria-label={`Page ${pageIndex} out of ${pageCount}, ${\n pageDetails.length !== 0 ? pageDetails[pageIndex - 1] : '\\b\\b'\n }. Press to change the current page`}\n data-testid={PAGINATION_DATA_TESTID.PAGINATOR}\n {...globalAttributes}\n {...xstyledAttributes}\n onClick={buttonOnClick}\n >\n <Grid gutter=\"xxxs\" alignItems=\"center\" style={{ gridAutoFlow: 'column' }}>\n <DSTypography fontSize=\"18px\" variant=\"b1\" as=\"span\" fontWeight=\"semibold\" textAlign=\"start\">\n {pageIndex}\n </DSTypography>\n / {pageCount}\n {isLoadingPageCount && <DSCircularIndeterminateIndicator ml=\"xxxs\" mr=\"xxxs\" size=\"xs\" />}\n {pageDetails.length !== 0 && (\n <>\n <DSPaginationSeparator height=\"12px\" ml=\"12px\" mr=\"xxxs\" />\n <DSTypography\n fontSize=\"13px\"\n w={detailWidth}\n mr=\"xxs\"\n variant=\"b1\"\n as=\"span\"\n fontWeight=\"semibold\"\n textAlign=\"start\"\n >\n {pageDetails[pageIndex - 1]}\n </DSTypography>\n </>\n )}\n <ChevronDown ml=\"xxxs\" color={['brand-primary', '700']} />\n </Grid>\n </PaginationDropdownButton>\n {/* We calculate the length of the longest detail here (this is as per specs) */}\n <Grid style={{ position: 'relative' }}>\n {pageDetails.map((pageDetail) => (\n <InvisibleDiv data-testid=\"ds-pagination-invisible-detail-for-width-calc\" key={pageDetail}>\n <DSTypography fontSize=\"13px\" mr=\"xxs\" variant=\"b1\" as=\"span\" fontWeight=\"semibold\" textAlign=\"start\">\n {pageDetail}\n </DSTypography>\n </InvisibleDiv>\n ))}\n </Grid>\n </DSDropdownMenuV2>\n );\n};\n\nDSPaginator.propTypes = DSPaginatorPropTypesSchema;\nDSPaginator.displayName = PaginatorName;\nexport const DSPaginatorWithSchema = describe(DSPaginator).description('Per Page Selector');\nDSPaginatorWithSchema.propTypes = DSPaginatorPropTypesSchema;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADuFb;AAtFV,mBAA+B;AAE/B,sBAA4B;AAC5B,8BAAuF;AACvF,qBAAqB;AACrB,
|
|
4
|
+
"sourcesContent": ["/* eslint-disable react/prop-types */\nimport React, { useMemo } from 'react';\nimport type { DSButtonT } from '@elliemae/ds-button-v2';\nimport { ChevronDown } from '@elliemae/ds-icons';\nimport { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSDropdownMenuV2 } from '@elliemae/ds-dropdownmenu-v2';\nimport { DSTypography } from '@elliemae/ds-typography';\nimport { DSCircularIndeterminateIndicator } from '@elliemae/ds-circular-progress-indicator';\nimport { InvisibleDiv, PaginationDropdownButton, DSPaginationSeparator } from '../../styled.js';\nimport { paginatorDefaultProps, DSPaginatorPropTypesSchema } from '../../react-desc-prop-types.js';\nimport { PaginatorName } from '../../DSPaginationDefinitions.js';\nimport { usePaginator } from './usePaginator.js';\nimport { createPaginatorHeader } from './createPaginatorHeader.js';\nimport { PAGINATION_DATA_TESTID } from '../../PaginationDataTestID.js';\nimport type { DSDropdownMenuT } from '@elliemae/ds-dropdownmenu-v2';\nimport type { DSPaginationT } from '../../react-desc-prop-types.js';\n\nexport const DSPaginator: React.ComponentType<DSPaginationT.PaginatorProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSPaginationT.PaginatorInternalProps>(\n props,\n paginatorDefaultProps,\n );\n useValidateTypescriptPropTypes(propsWithDefault, DSPaginatorPropTypesSchema, PaginatorName);\n\n const { pageIndex, pageCount, isLoadingPageCount, onPageChange, pageDetails, pageDetailsTitle } = propsWithDefault;\n\n const {\n btnRef,\n btnWidth,\n pageInfoWidth,\n options,\n isOpened,\n setIsOpened,\n detailWidth,\n globalAttributes,\n xstyledAttributes,\n actionRef,\n onKeyDown,\n } = usePaginator(propsWithDefault);\n\n const Header = useMemo(\n () => createPaginatorHeader({ pageDetailsTitle, pageInfoWidth }),\n [pageDetailsTitle, pageInfoWidth],\n );\n\n const buttonOnClick: DSButtonT.Props['onClick'] = useMemo(() => {\n if (globalAttributes.onClick) return globalAttributes.onClick as DSButtonT.Props['onClick'];\n return () => setIsOpened((prev) => !prev);\n }, [globalAttributes.onClick, setIsOpened]);\n\n return (\n <DSDropdownMenuV2\n isOpened={isOpened}\n options={options}\n selectedOptions={{ [pageIndex.toString()]: true }}\n onOptionClick={(_, clickedOption) => {\n onPageChange((clickedOption as DSDropdownMenuT.ItemSingleOptions).value as number);\n setIsOpened(false);\n btnRef.current?.focus();\n }}\n onClickOutside={() => {\n setIsOpened(false);\n btnRef.current?.focus();\n }}\n customOffset={[-23, 2]}\n startPlacementPreference=\"top-start\"\n actionRef={actionRef}\n onKeyDown={onKeyDown}\n minWidth={pageDetails.length !== 0 ? btnWidth + 23 : pageCount.toString().length * 6 + 90}\n maxHeight={300}\n HeaderComp={Header}\n >\n <PaginationDropdownButton\n buttonType=\"raw\"\n disabled={isLoadingPageCount}\n innerRef={btnRef}\n aria-pressed={isOpened}\n aria-label={`Page ${pageIndex} out of ${pageCount}, ${\n pageDetails.length !== 0 ? pageDetails[pageIndex - 1] : '\\b\\b'\n }. Press to change the current page`}\n data-testid={PAGINATION_DATA_TESTID.PAGINATOR}\n {...globalAttributes}\n {...xstyledAttributes}\n onClick={buttonOnClick}\n >\n <Grid gutter=\"xxxs\" alignItems=\"center\" style={{ gridAutoFlow: 'column' }}>\n <DSTypography fontSize=\"18px\" variant=\"b1\" as=\"span\" fontWeight=\"semibold\" textAlign=\"start\">\n {pageIndex}\n </DSTypography>\n / {pageCount}\n {isLoadingPageCount && <DSCircularIndeterminateIndicator ml=\"xxxs\" mr=\"xxxs\" size=\"xs\" />}\n {pageDetails.length !== 0 && (\n <>\n <DSPaginationSeparator height=\"12px\" ml=\"12px\" mr=\"xxxs\" />\n <DSTypography\n fontSize=\"13px\"\n w={detailWidth}\n mr=\"xxs\"\n variant=\"b1\"\n as=\"span\"\n fontWeight=\"semibold\"\n textAlign=\"start\"\n >\n {pageDetails[pageIndex - 1]}\n </DSTypography>\n </>\n )}\n <ChevronDown ml=\"xxxs\" color={['brand-primary', '700']} />\n </Grid>\n </PaginationDropdownButton>\n {/* We calculate the length of the longest detail here (this is as per specs) */}\n <Grid style={{ position: 'relative' }}>\n {pageDetails.map((pageDetail) => (\n <InvisibleDiv data-testid=\"ds-pagination-invisible-detail-for-width-calc\" key={pageDetail}>\n <DSTypography fontSize=\"13px\" mr=\"xxs\" variant=\"b1\" as=\"span\" fontWeight=\"semibold\" textAlign=\"start\">\n {pageDetail}\n </DSTypography>\n </InvisibleDiv>\n ))}\n </Grid>\n </DSDropdownMenuV2>\n );\n};\n\nDSPaginator.propTypes = DSPaginatorPropTypesSchema;\nDSPaginator.displayName = PaginatorName;\nexport const DSPaginatorWithSchema = describe(DSPaginator).description('Per Page Selector');\nDSPaginatorWithSchema.propTypes = DSPaginatorPropTypesSchema;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/parts/DSPerPageSelector/getOptions.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { range } from '@elliemae/ds-utilities';\nimport type { DSDropdownMenuT } from '@elliemae/ds-dropdownmenu';\n\nexport const generateOption = (\n value: number | DSDropdownMenuT.ItemSingleOptions,\n): DSDropdownMenuT.ItemSingleOptions => {\n if (typeof value === 'object') {\n return value;\n }\n return {\n dsId: value.toString(),\n value,\n label: value.toString(),\n type: 'single',\n } as const;\n};\n\nexport const getOptions = (step: number, min: number, max: number) => {\n const options = range(min, max + step, step).map(generateOption);\n return min === 0 ? options.slice(1, options.length) : options;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
4
|
+
"sourcesContent": ["import { range } from '@elliemae/ds-utilities';\nimport type { DSDropdownMenuT } from '@elliemae/ds-dropdownmenu-v2';\n\nexport const generateOption = (\n value: number | DSDropdownMenuT.ItemSingleOptions,\n): DSDropdownMenuT.ItemSingleOptions => {\n if (typeof value === 'object') {\n return value;\n }\n return {\n dsId: value.toString(),\n value,\n label: value.toString(),\n type: 'single',\n } as const;\n};\n\nexport const getOptions = (step: number, min: number, max: number) => {\n const options = range(min, max + step, step).map(generateOption);\n return min === 0 ? options.slice(1, options.length) : options;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAAsB;AAGf,MAAM,iBAAiB,CAC5B,UACsC;AACtC,MAAI,OAAO,UAAU,UAAU;AAC7B,WAAO;AAAA,EACT;AACA,SAAO;AAAA,IACL,MAAM,MAAM,SAAS;AAAA,IACrB;AAAA,IACA,OAAO,MAAM,SAAS;AAAA,IACtB,MAAM;AAAA,EACR;AACF;AAEO,MAAM,aAAa,CAAC,MAAc,KAAa,QAAgB;AACpE,QAAM,cAAU,2BAAM,KAAK,MAAM,MAAM,IAAI,EAAE,IAAI,cAAc;AAC/D,SAAO,QAAQ,IAAI,QAAQ,MAAM,GAAG,QAAQ,MAAM,IAAI;AACxD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -36,7 +36,7 @@ var React = __toESM(require("react"));
|
|
|
36
36
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
37
|
var import_react = require("react");
|
|
38
38
|
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
39
|
-
var
|
|
39
|
+
var import_ds_dropdownmenu_v2 = require("@elliemae/ds-dropdownmenu-v2");
|
|
40
40
|
var import_ds_icons = require("@elliemae/ds-icons");
|
|
41
41
|
var import_react_desc_prop_types = require("../../react-desc-prop-types.js");
|
|
42
42
|
var import_styled = require("../../styled.js");
|
|
@@ -58,7 +58,7 @@ const DSPerPageSelector = (props) => {
|
|
|
58
58
|
return () => setIsOpened((prev) => !prev);
|
|
59
59
|
}, [globalAttributes.onClick, setIsOpened]);
|
|
60
60
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
61
|
-
|
|
61
|
+
import_ds_dropdownmenu_v2.DSDropdownMenuV2,
|
|
62
62
|
{
|
|
63
63
|
isOpened,
|
|
64
64
|
options,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/parts/DSPerPageSelector/index.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React, { useMemo } from 'react';\nimport { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport type { DSDropdownMenuT } from '@elliemae/ds-dropdownmenu';\nimport { DSDropdownMenuV2 } from '@elliemae/ds-dropdownmenu';\nimport { ChevronDown } from '@elliemae/ds-icons';\nimport { perPageSelectorDefaultProps, DSPerPageSelectorPropTypesSchema } from '../../react-desc-prop-types.js';\nimport { PaginationDropdownButton } from '../../styled.js';\nimport { PerPageSelectorName } from '../../DSPaginationDefinitions.js';\nimport { usePerPageSelector } from './usePerPageSelector.js';\nimport { PAGINATION_DATA_TESTID } from '../../PaginationDataTestID.js';\nimport type { DSPaginationT } from '../../react-desc-prop-types.js';\nimport type { DSButtonT } from '@elliemae/ds-button-v2';\n\nconst Header = () => <>{'Per Page'}</>;\n\nexport const DSPerPageSelector: React.ComponentType<DSPaginationT.PerPageSelectorProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSPaginationT.PerPageSelectorInternalProps>(\n props,\n perPageSelectorDefaultProps,\n );\n useValidateTypescriptPropTypes(propsWithDefault, DSPerPageSelectorPropTypesSchema, PerPageSelectorName);\n\n const { pageSize, onPageSizeChange } = propsWithDefault;\n\n const { actionRef, btnRef, width, isOpened, setIsOpened, options, globalAttributes, xstyledAttributes } =\n usePerPageSelector(propsWithDefault);\n\n const buttonOnClick: DSButtonT.Props['onClick'] = useMemo(() => {\n if (globalAttributes.onClick) return globalAttributes.onClick as DSButtonT.Props['onClick'];\n return () => setIsOpened((prev) => !prev);\n }, [globalAttributes.onClick, setIsOpened]);\n\n return (\n <DSDropdownMenuV2\n isOpened={isOpened}\n options={options}\n selectedOptions={{ [pageSize.toString()]: true }}\n onOptionClick={(_, clickedOption) => {\n onPageSizeChange((clickedOption as DSDropdownMenuT.ItemSingleOptions).value as number);\n setIsOpened(false);\n btnRef.current?.focus();\n }}\n onClickOutside={() => {\n setIsOpened(false);\n btnRef.current?.focus();\n }}\n customOffset={[-23, 2]}\n startPlacementPreference=\"top-start\"\n actionRef={actionRef}\n minWidth={width}\n maxHeight={300}\n HeaderComp={Header}\n >\n <PaginationDropdownButton\n buttonType=\"raw\"\n innerRef={btnRef}\n aria-pressed={isOpened}\n aria-label={`${pageSize} rows per page. Press to select rows per page`}\n data-testid={PAGINATION_DATA_TESTID.PER_PAGE_SELECTOR}\n {...globalAttributes}\n {...xstyledAttributes}\n onClick={buttonOnClick}\n >\n {pageSize} / page\n <ChevronDown color={['brand-primary', '700']} />\n </PaginationDropdownButton>\n </DSDropdownMenuV2>\n );\n};\n\nDSPerPageSelector.propTypes = DSPerPageSelectorPropTypesSchema;\nDSPerPageSelector.displayName = PerPageSelectorName;\nexport const DSPerPageSelectorWithSchema = describe(DSPerPageSelector).description('Per Page Selector');\nDSPerPageSelectorWithSchema.propTypes = DSPerPageSelectorPropTypesSchema;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADaF;AAbrB,mBAA+B;AAC/B,8BAAuF;AAEvF,
|
|
4
|
+
"sourcesContent": ["import React, { useMemo } from 'react';\nimport { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport type { DSDropdownMenuT } from '@elliemae/ds-dropdownmenu-v2';\nimport { DSDropdownMenuV2 } from '@elliemae/ds-dropdownmenu-v2';\nimport { ChevronDown } from '@elliemae/ds-icons';\nimport { perPageSelectorDefaultProps, DSPerPageSelectorPropTypesSchema } from '../../react-desc-prop-types.js';\nimport { PaginationDropdownButton } from '../../styled.js';\nimport { PerPageSelectorName } from '../../DSPaginationDefinitions.js';\nimport { usePerPageSelector } from './usePerPageSelector.js';\nimport { PAGINATION_DATA_TESTID } from '../../PaginationDataTestID.js';\nimport type { DSPaginationT } from '../../react-desc-prop-types.js';\nimport type { DSButtonT } from '@elliemae/ds-button-v2';\n\nconst Header = () => <>{'Per Page'}</>;\n\nexport const DSPerPageSelector: React.ComponentType<DSPaginationT.PerPageSelectorProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSPaginationT.PerPageSelectorInternalProps>(\n props,\n perPageSelectorDefaultProps,\n );\n useValidateTypescriptPropTypes(propsWithDefault, DSPerPageSelectorPropTypesSchema, PerPageSelectorName);\n\n const { pageSize, onPageSizeChange } = propsWithDefault;\n\n const { actionRef, btnRef, width, isOpened, setIsOpened, options, globalAttributes, xstyledAttributes } =\n usePerPageSelector(propsWithDefault);\n\n const buttonOnClick: DSButtonT.Props['onClick'] = useMemo(() => {\n if (globalAttributes.onClick) return globalAttributes.onClick as DSButtonT.Props['onClick'];\n return () => setIsOpened((prev) => !prev);\n }, [globalAttributes.onClick, setIsOpened]);\n\n return (\n <DSDropdownMenuV2\n isOpened={isOpened}\n options={options}\n selectedOptions={{ [pageSize.toString()]: true }}\n onOptionClick={(_, clickedOption) => {\n onPageSizeChange((clickedOption as DSDropdownMenuT.ItemSingleOptions).value as number);\n setIsOpened(false);\n btnRef.current?.focus();\n }}\n onClickOutside={() => {\n setIsOpened(false);\n btnRef.current?.focus();\n }}\n customOffset={[-23, 2]}\n startPlacementPreference=\"top-start\"\n actionRef={actionRef}\n minWidth={width}\n maxHeight={300}\n HeaderComp={Header}\n >\n <PaginationDropdownButton\n buttonType=\"raw\"\n innerRef={btnRef}\n aria-pressed={isOpened}\n aria-label={`${pageSize} rows per page. Press to select rows per page`}\n data-testid={PAGINATION_DATA_TESTID.PER_PAGE_SELECTOR}\n {...globalAttributes}\n {...xstyledAttributes}\n onClick={buttonOnClick}\n >\n {pageSize} / page\n <ChevronDown color={['brand-primary', '700']} />\n </PaginationDropdownButton>\n </DSDropdownMenuV2>\n );\n};\n\nDSPerPageSelector.propTypes = DSPerPageSelectorPropTypesSchema;\nDSPerPageSelector.displayName = PerPageSelectorName;\nexport const DSPerPageSelectorWithSchema = describe(DSPerPageSelector).description('Per Page Selector');\nDSPerPageSelectorWithSchema.propTypes = DSPerPageSelectorPropTypesSchema;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADaF;AAbrB,mBAA+B;AAC/B,8BAAuF;AAEvF,gCAAiC;AACjC,sBAA4B;AAC5B,mCAA8E;AAC9E,oBAAyC;AACzC,qCAAoC;AACpC,gCAAmC;AACnC,kCAAuC;AAIvC,MAAM,SAAS,MAAM,2EAAG,sBAAW;AAE5B,MAAM,oBAA6E,CAAC,UAAU;AACnG,QAAM,uBAAmB;AAAA,IACvB;AAAA,IACA;AAAA,EACF;AACA,8DAA+B,kBAAkB,+DAAkC,kDAAmB;AAEtG,QAAM,EAAE,UAAU,iBAAiB,IAAI;AAEvC,QAAM,EAAE,WAAW,QAAQ,OAAO,UAAU,aAAa,SAAS,kBAAkB,kBAAkB,QACpG,8CAAmB,gBAAgB;AAErC,QAAM,oBAA4C,sBAAQ,MAAM;AAC9D,QAAI,iBAAiB;AAAS,aAAO,iBAAiB;AACtD,WAAO,MAAM,YAAY,CAAC,SAAS,CAAC,IAAI;AAAA,EAC1C,GAAG,CAAC,iBAAiB,SAAS,WAAW,CAAC;AAE1C,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,iBAAiB,EAAE,CAAC,SAAS,SAAS,CAAC,GAAG,KAAK;AAAA,MAC/C,eAAe,CAAC,GAAG,kBAAkB;AACnC,yBAAkB,cAAoD,KAAe;AACrF,oBAAY,KAAK;AACjB,eAAO,SAAS,MAAM;AAAA,MACxB;AAAA,MACA,gBAAgB,MAAM;AACpB,oBAAY,KAAK;AACjB,eAAO,SAAS,MAAM;AAAA,MACxB;AAAA,MACA,cAAc,CAAC,KAAK,CAAC;AAAA,MACrB,0BAAyB;AAAA,MACzB;AAAA,MACA,UAAU;AAAA,MACV,WAAW;AAAA,MACX,YAAY;AAAA,MAEZ;AAAA,QAAC;AAAA;AAAA,UACC,YAAW;AAAA,UACX,UAAU;AAAA,UACV,gBAAc;AAAA,UACd,cAAY,GAAG;AAAA,UACf,eAAa,mDAAuB;AAAA,UACnC,GAAG;AAAA,UACH,GAAG;AAAA,UACJ,SAAS;AAAA,UAER;AAAA;AAAA,YAAS;AAAA,YACV,4CAAC,+BAAY,OAAO,CAAC,iBAAiB,KAAK,GAAG;AAAA;AAAA;AAAA,MAChD;AAAA;AAAA,EACF;AAEJ;AAEA,kBAAkB,YAAY;AAC9B,kBAAkB,cAAc;AACzB,MAAM,kCAA8B,kCAAS,iBAAiB,EAAE,YAAY,mBAAmB;AACtG,4BAA4B,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/react-desc-prop-types.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable @typescript-eslint/no-empty-interface */\nimport { globalAttributesPropTypes, PropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport type { WeakValidationMap } from 'react';\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-props-helpers';\nimport type { DSDropdownMenuT } from '@elliemae/ds-dropdownmenu';\n\nexport namespace DSPaginationT {\n type PropsT<D, R, O, E> = Partial<D> & R & O & Omit<GlobalAttributesT<E>, keyof D | keyof R | keyof O> & XstyledProps;\n type InternalPropsT<D, R, O, E> = D & R & O & Omit<GlobalAttributesT<E>, keyof D | keyof R | keyof O> & XstyledProps;\n\n export interface PerPageSelectorDefaultProps {\n pageSize: number;\n onPageSizeChange: (pageSize: number) => void;\n perPageStep: number;\n minPerPage: number;\n maxPerPage: number;\n }\n export interface PerPageSelectorOptionalProps {\n perPageOptions?: (number | DSDropdownMenuT.ItemSingleOptions)[];\n }\n export interface PerPageSelectorRequiredProps {}\n\n export type PerPageSelectorProps = PropsT<\n PerPageSelectorDefaultProps,\n PerPageSelectorRequiredProps,\n PerPageSelectorOptionalProps,\n HTMLDivElement\n >;\n\n export type PerPageSelectorInternalProps = InternalPropsT<\n PerPageSelectorDefaultProps,\n PerPageSelectorRequiredProps,\n PerPageSelectorOptionalProps,\n HTMLDivElement\n >;\n\n export interface PagePrevButtonDefaultProps {\n canPreviousPage: boolean;\n onPreviousPage: () => void;\n }\n export interface PagePrevButtonOptionalProps {}\n export interface PagePrevButtonRequiredProps {}\n\n export type PagePrevButtonProps = PropsT<\n PagePrevButtonDefaultProps,\n PagePrevButtonRequiredProps,\n PagePrevButtonOptionalProps,\n HTMLButtonElement\n >;\n\n export type PagePrevButtonInternalProps = InternalPropsT<\n PagePrevButtonDefaultProps,\n PagePrevButtonRequiredProps,\n PagePrevButtonOptionalProps,\n HTMLButtonElement\n >;\n\n export interface PageNextButtonDefaultProps {\n canNextPage: boolean;\n onNextPage: () => void;\n }\n export interface PageNextButtonOptionalProps {}\n export interface PageNextButtonRequiredProps {}\n\n export type PageNextButtonProps = PropsT<\n PageNextButtonDefaultProps,\n PageNextButtonRequiredProps,\n PageNextButtonOptionalProps,\n HTMLButtonElement\n >;\n\n export type PageNextButtonInternalProps = InternalPropsT<\n PageNextButtonDefaultProps,\n PageNextButtonRequiredProps,\n PageNextButtonOptionalProps,\n HTMLButtonElement\n >;\n\n export interface PaginatorDefaultProps {\n pageCount: number | string;\n isLoadingPageCount: boolean;\n pageIndex: number;\n onPageChange: (page: number) => void;\n pageDetails: string[];\n pageDetailsTitle: string;\n }\n export interface PaginatorOptionalProps {}\n export interface PaginatorRequiredProps {}\n\n export type PaginatorProps = PropsT<\n PaginatorDefaultProps,\n PaginatorRequiredProps,\n PaginatorOptionalProps,\n HTMLDivElement\n >;\n\n export type PaginatorInternalProps = InternalPropsT<\n PaginatorDefaultProps,\n PaginatorRequiredProps,\n PaginatorOptionalProps,\n HTMLDivElement\n >;\n\n export interface ContainerDefaultProps {}\n export interface ContainerOptionalProps {}\n export interface ContainerRequiredProps {\n children: React.ReactNode;\n }\n\n export type ContainerProps = PropsT<\n ContainerDefaultProps,\n ContainerRequiredProps,\n ContainerOptionalProps,\n HTMLDivElement\n >;\n\n export type ContainerInternalProps = InternalPropsT<\n ContainerDefaultProps,\n ContainerRequiredProps,\n ContainerOptionalProps,\n HTMLDivElement\n >;\n\n // LEGACY WAY OF USING THE PAGINATION COMPONENT\n export interface DefaultProps {\n pageCount: number | string;\n isLoadingPageCount: boolean;\n pageIndex: number;\n canPreviousPage: boolean;\n canNextPage: boolean;\n pageSize: number;\n showPerPageSelector: boolean;\n perPageStep: number;\n minPerPage: number;\n maxPerPage: number;\n onPageSizeChange: (pageSize: number) => void;\n onPreviousPage: () => void;\n onNextPage: () => void;\n onPageChange: (page: number) => void;\n pageDetails: string[];\n pageDetailsTitle: string;\n width: string | number;\n }\n export interface OptionalProps {\n perPageOptions?: (number | DSDropdownMenuT.ItemSingleOptions)[];\n }\n export interface RequiredProps {}\n\n export type Props = PropsT<DefaultProps, RequiredProps, OptionalProps, HTMLDivElement>;\n\n export type InternalProps = InternalPropsT<DefaultProps, RequiredProps, OptionalProps, HTMLDivElement>;\n}\n\nexport const perPageSelectorDefaultProps: DSPaginationT.PerPageSelectorDefaultProps = {\n pageSize: 10,\n onPageSizeChange: () => null,\n perPageStep: 5,\n minPerPage: 0,\n maxPerPage: 100,\n};\n\nexport const pagePrevButtonDefaultProps: DSPaginationT.PagePrevButtonDefaultProps = {\n canPreviousPage: true,\n onPreviousPage: () => null,\n};\n\nexport const pageNextButtonDefaultProps: DSPaginationT.PageNextButtonDefaultProps = {\n canNextPage: true,\n onNextPage: () => null,\n};\n\nexport const paginatorDefaultProps: DSPaginationT.PaginatorDefaultProps = {\n pageCount: 0,\n isLoadingPageCount: false,\n pageIndex: 1,\n onPageChange: () => null,\n pageDetails: [],\n pageDetailsTitle: '',\n};\n\nexport const defaultProps: DSPaginationT.DefaultProps = {\n pageCount: 0,\n pageIndex: 1,\n isLoadingPageCount: false,\n canPreviousPage: true,\n canNextPage: true,\n pageSize: 10,\n showPerPageSelector: true,\n perPageStep: 5,\n minPerPage: 0,\n maxPerPage: 100,\n onPageSizeChange: () => null,\n onPreviousPage: () => null,\n onNextPage: () => null,\n onPageChange: () => null,\n pageDetails: [],\n pageDetailsTitle: '',\n width: '100%',\n};\n\nexport const DSPaginationPropTypes: DSPropTypesSchema<DSPaginationT.Props> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n pageIndex: PropTypes.number.description('Index of the current page, starting from 1').defaultValue(1),\n pageCount: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('How many pages are there'),\n pageSize: PropTypes.number.description('The current page size').defaultValue(10),\n canPreviousPage: PropTypes.bool.description('Whether the previous button is disabled or not').defaultValue(true),\n canNextPage: PropTypes.bool.description('Whether the next button is disabled or not').defaultValue(true),\n onPreviousPage: PropTypes.func\n .description('Function invoked when the previous button is pressed')\n .defaultValue(() => null),\n onPageChange: PropTypes.func.description('Function invoked when the page changes').defaultValue(() => null),\n onNextPage: PropTypes.func.description('Function invoked when next button is pressed').defaultValue(() => null),\n showPerPageSelector: PropTypes.bool.description('Whether to show the page selector').defaultValue(true),\n perPageOptions: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.object]))\n .description('The available options for page size')\n .defaultValue([10]),\n minPerPage: PropTypes.number.description('Min for the per page options').defaultValue(0),\n maxPerPage: PropTypes.number.description('Max for the per page options').defaultValue(100),\n perPageStep: PropTypes.number.description('Step for the per page options').defaultValue(5),\n onPageSizeChange: PropTypes.func.description('Function invoked when the page size changes').defaultValue(() => null),\n pageDetails: PropTypes.arrayOf(PropTypes.string).description('Details to provide for each page').defaultValue([]),\n pageDetailsTitle: PropTypes.string\n .description('The title of the details (usually a column of your dataset)')\n .defaultValue(''),\n width: PropTypes.any.description('Width for the container of the pagination').defaultValue('100%'),\n isLoadingPageCount: PropTypes.bool.description('Whether the page count is loading or not').defaultValue(false),\n};\n\nexport const DSPaginationPropTypesSchema = DSPaginationPropTypes as unknown as WeakValidationMap<DSPaginationT.Props>;\n\nexport const DSPerPageSelectorPropTypes: DSPropTypesSchema<DSPaginationT.PerPageSelectorProps> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n pageSize: PropTypes.number.description('The current page size').defaultValue(10),\n onPageSizeChange: PropTypes.func.description('Function invoked when the page size changes').defaultValue(() => null),\n perPageOptions: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.object]))\n .description('The available options for page size')\n .defaultValue([10]),\n minPerPage: PropTypes.number.description('Min for the per page options').defaultValue(0),\n maxPerPage: PropTypes.number.description('Max for the per page options').defaultValue(100),\n perPageStep: PropTypes.number.description('Step for the per page options').defaultValue(5),\n};\n\nexport const DSPerPageSelectorPropTypesSchema =\n DSPerPageSelectorPropTypes as unknown as WeakValidationMap<DSPaginationT.PerPageSelectorProps>;\n\nexport const DSPagePrevButtonPropTypes: DSPropTypesSchema<DSPaginationT.PagePrevButtonProps> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n canPreviousPage: PropTypes.bool.description('Whether the previous button is disabled or not').defaultValue(true),\n onPreviousPage: PropTypes.func\n .description('Function invoked when the previous button is pressed')\n .defaultValue(() => null),\n};\n\nexport const DSPagePrevButtonPropTypesSchema =\n DSPagePrevButtonPropTypes as unknown as WeakValidationMap<DSPaginationT.PagePrevButtonProps>;\n\nexport const DSPageNextButtonPropTypes: DSPropTypesSchema<DSPaginationT.PageNextButtonProps> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n canNextPage: PropTypes.bool.description('Whether the next button is disabled or not').defaultValue(true),\n onNextPage: PropTypes.func.description('Function invoked when next button is pressed').defaultValue(() => null),\n};\n\nexport const DSPageNextButtonPropTypesSchema =\n DSPageNextButtonPropTypes as unknown as WeakValidationMap<DSPaginationT.PageNextButtonProps>;\n\nexport const DSPaginatorPropTypes: DSPropTypesSchema<DSPaginationT.PaginatorProps> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n pageIndex: PropTypes.number.description('Index of the current page, starting from 1').defaultValue(1),\n pageCount: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('How many pages are there'),\n onPageChange: PropTypes.func.description('Function invoked when the page changes').defaultValue(() => null),\n isLoadingPageCount: PropTypes.bool.description('Whether the page count is loading or not').defaultValue(false),\n pageDetails: PropTypes.arrayOf(PropTypes.string).description('Details to provide for each page').defaultValue([]),\n pageDetailsTitle: PropTypes.string\n .description('The title of the details (usually a column of your dataset)')\n .defaultValue(''),\n};\n\nexport const DSPaginatorPropTypesSchema =\n DSPaginatorPropTypes as unknown as WeakValidationMap<DSPaginationT.PaginatorProps>;\n\nexport const DSPaginationContainerPropTypes: DSPropTypesSchema<DSPaginationT.ContainerProps> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n};\n\nexport const DSPaginationContainerPropTypesSchema =\n DSPaginationContainerPropTypes as unknown as WeakValidationMap<DSPaginationT.ContainerProps>;\n\nexport const DSPaginationStyledPartPropTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n};\n\nexport const DSPaginationStyledPartPropTypesSchema =\n DSPaginationStyledPartPropTypes as unknown as WeakValidationMap<unknown>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable @typescript-eslint/no-empty-interface */\nimport { globalAttributesPropTypes, PropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport type { WeakValidationMap } from 'react';\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-props-helpers';\nimport type { DSDropdownMenuT } from '@elliemae/ds-dropdownmenu-v2';\n\nexport namespace DSPaginationT {\n type PropsT<D, R, O, E> = Partial<D> & R & O & Omit<GlobalAttributesT<E>, keyof D | keyof R | keyof O> & XstyledProps;\n type InternalPropsT<D, R, O, E> = D & R & O & Omit<GlobalAttributesT<E>, keyof D | keyof R | keyof O> & XstyledProps;\n\n export interface PerPageSelectorDefaultProps {\n pageSize: number;\n onPageSizeChange: (pageSize: number) => void;\n perPageStep: number;\n minPerPage: number;\n maxPerPage: number;\n }\n export interface PerPageSelectorOptionalProps {\n perPageOptions?: (number | DSDropdownMenuT.ItemSingleOptions)[];\n }\n export interface PerPageSelectorRequiredProps {}\n\n export type PerPageSelectorProps = PropsT<\n PerPageSelectorDefaultProps,\n PerPageSelectorRequiredProps,\n PerPageSelectorOptionalProps,\n HTMLDivElement\n >;\n\n export type PerPageSelectorInternalProps = InternalPropsT<\n PerPageSelectorDefaultProps,\n PerPageSelectorRequiredProps,\n PerPageSelectorOptionalProps,\n HTMLDivElement\n >;\n\n export interface PagePrevButtonDefaultProps {\n canPreviousPage: boolean;\n onPreviousPage: () => void;\n }\n export interface PagePrevButtonOptionalProps {}\n export interface PagePrevButtonRequiredProps {}\n\n export type PagePrevButtonProps = PropsT<\n PagePrevButtonDefaultProps,\n PagePrevButtonRequiredProps,\n PagePrevButtonOptionalProps,\n HTMLButtonElement\n >;\n\n export type PagePrevButtonInternalProps = InternalPropsT<\n PagePrevButtonDefaultProps,\n PagePrevButtonRequiredProps,\n PagePrevButtonOptionalProps,\n HTMLButtonElement\n >;\n\n export interface PageNextButtonDefaultProps {\n canNextPage: boolean;\n onNextPage: () => void;\n }\n export interface PageNextButtonOptionalProps {}\n export interface PageNextButtonRequiredProps {}\n\n export type PageNextButtonProps = PropsT<\n PageNextButtonDefaultProps,\n PageNextButtonRequiredProps,\n PageNextButtonOptionalProps,\n HTMLButtonElement\n >;\n\n export type PageNextButtonInternalProps = InternalPropsT<\n PageNextButtonDefaultProps,\n PageNextButtonRequiredProps,\n PageNextButtonOptionalProps,\n HTMLButtonElement\n >;\n\n export interface PaginatorDefaultProps {\n pageCount: number | string;\n isLoadingPageCount: boolean;\n pageIndex: number;\n onPageChange: (page: number) => void;\n pageDetails: string[];\n pageDetailsTitle: string;\n }\n export interface PaginatorOptionalProps {}\n export interface PaginatorRequiredProps {}\n\n export type PaginatorProps = PropsT<\n PaginatorDefaultProps,\n PaginatorRequiredProps,\n PaginatorOptionalProps,\n HTMLDivElement\n >;\n\n export type PaginatorInternalProps = InternalPropsT<\n PaginatorDefaultProps,\n PaginatorRequiredProps,\n PaginatorOptionalProps,\n HTMLDivElement\n >;\n\n export interface ContainerDefaultProps {}\n export interface ContainerOptionalProps {}\n export interface ContainerRequiredProps {\n children: React.ReactNode;\n }\n\n export type ContainerProps = PropsT<\n ContainerDefaultProps,\n ContainerRequiredProps,\n ContainerOptionalProps,\n HTMLDivElement\n >;\n\n export type ContainerInternalProps = InternalPropsT<\n ContainerDefaultProps,\n ContainerRequiredProps,\n ContainerOptionalProps,\n HTMLDivElement\n >;\n\n // LEGACY WAY OF USING THE PAGINATION COMPONENT\n export interface DefaultProps {\n pageCount: number | string;\n isLoadingPageCount: boolean;\n pageIndex: number;\n canPreviousPage: boolean;\n canNextPage: boolean;\n pageSize: number;\n showPerPageSelector: boolean;\n perPageStep: number;\n minPerPage: number;\n maxPerPage: number;\n onPageSizeChange: (pageSize: number) => void;\n onPreviousPage: () => void;\n onNextPage: () => void;\n onPageChange: (page: number) => void;\n pageDetails: string[];\n pageDetailsTitle: string;\n width: string | number;\n }\n export interface OptionalProps {\n perPageOptions?: (number | DSDropdownMenuT.ItemSingleOptions)[];\n }\n export interface RequiredProps {}\n\n export type Props = PropsT<DefaultProps, RequiredProps, OptionalProps, HTMLDivElement>;\n\n export type InternalProps = InternalPropsT<DefaultProps, RequiredProps, OptionalProps, HTMLDivElement>;\n}\n\nexport const perPageSelectorDefaultProps: DSPaginationT.PerPageSelectorDefaultProps = {\n pageSize: 10,\n onPageSizeChange: () => null,\n perPageStep: 5,\n minPerPage: 0,\n maxPerPage: 100,\n};\n\nexport const pagePrevButtonDefaultProps: DSPaginationT.PagePrevButtonDefaultProps = {\n canPreviousPage: true,\n onPreviousPage: () => null,\n};\n\nexport const pageNextButtonDefaultProps: DSPaginationT.PageNextButtonDefaultProps = {\n canNextPage: true,\n onNextPage: () => null,\n};\n\nexport const paginatorDefaultProps: DSPaginationT.PaginatorDefaultProps = {\n pageCount: 0,\n isLoadingPageCount: false,\n pageIndex: 1,\n onPageChange: () => null,\n pageDetails: [],\n pageDetailsTitle: '',\n};\n\nexport const defaultProps: DSPaginationT.DefaultProps = {\n pageCount: 0,\n pageIndex: 1,\n isLoadingPageCount: false,\n canPreviousPage: true,\n canNextPage: true,\n pageSize: 10,\n showPerPageSelector: true,\n perPageStep: 5,\n minPerPage: 0,\n maxPerPage: 100,\n onPageSizeChange: () => null,\n onPreviousPage: () => null,\n onNextPage: () => null,\n onPageChange: () => null,\n pageDetails: [],\n pageDetailsTitle: '',\n width: '100%',\n};\n\nexport const DSPaginationPropTypes: DSPropTypesSchema<DSPaginationT.Props> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n pageIndex: PropTypes.number.description('Index of the current page, starting from 1').defaultValue(1),\n pageCount: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('How many pages are there'),\n pageSize: PropTypes.number.description('The current page size').defaultValue(10),\n canPreviousPage: PropTypes.bool.description('Whether the previous button is disabled or not').defaultValue(true),\n canNextPage: PropTypes.bool.description('Whether the next button is disabled or not').defaultValue(true),\n onPreviousPage: PropTypes.func\n .description('Function invoked when the previous button is pressed')\n .defaultValue(() => null),\n onPageChange: PropTypes.func.description('Function invoked when the page changes').defaultValue(() => null),\n onNextPage: PropTypes.func.description('Function invoked when next button is pressed').defaultValue(() => null),\n showPerPageSelector: PropTypes.bool.description('Whether to show the page selector').defaultValue(true),\n perPageOptions: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.object]))\n .description('The available options for page size')\n .defaultValue([10]),\n minPerPage: PropTypes.number.description('Min for the per page options').defaultValue(0),\n maxPerPage: PropTypes.number.description('Max for the per page options').defaultValue(100),\n perPageStep: PropTypes.number.description('Step for the per page options').defaultValue(5),\n onPageSizeChange: PropTypes.func.description('Function invoked when the page size changes').defaultValue(() => null),\n pageDetails: PropTypes.arrayOf(PropTypes.string).description('Details to provide for each page').defaultValue([]),\n pageDetailsTitle: PropTypes.string\n .description('The title of the details (usually a column of your dataset)')\n .defaultValue(''),\n width: PropTypes.any.description('Width for the container of the pagination').defaultValue('100%'),\n isLoadingPageCount: PropTypes.bool.description('Whether the page count is loading or not').defaultValue(false),\n};\n\nexport const DSPaginationPropTypesSchema = DSPaginationPropTypes as unknown as WeakValidationMap<DSPaginationT.Props>;\n\nexport const DSPerPageSelectorPropTypes: DSPropTypesSchema<DSPaginationT.PerPageSelectorProps> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n pageSize: PropTypes.number.description('The current page size').defaultValue(10),\n onPageSizeChange: PropTypes.func.description('Function invoked when the page size changes').defaultValue(() => null),\n perPageOptions: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.object]))\n .description('The available options for page size')\n .defaultValue([10]),\n minPerPage: PropTypes.number.description('Min for the per page options').defaultValue(0),\n maxPerPage: PropTypes.number.description('Max for the per page options').defaultValue(100),\n perPageStep: PropTypes.number.description('Step for the per page options').defaultValue(5),\n};\n\nexport const DSPerPageSelectorPropTypesSchema =\n DSPerPageSelectorPropTypes as unknown as WeakValidationMap<DSPaginationT.PerPageSelectorProps>;\n\nexport const DSPagePrevButtonPropTypes: DSPropTypesSchema<DSPaginationT.PagePrevButtonProps> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n canPreviousPage: PropTypes.bool.description('Whether the previous button is disabled or not').defaultValue(true),\n onPreviousPage: PropTypes.func\n .description('Function invoked when the previous button is pressed')\n .defaultValue(() => null),\n};\n\nexport const DSPagePrevButtonPropTypesSchema =\n DSPagePrevButtonPropTypes as unknown as WeakValidationMap<DSPaginationT.PagePrevButtonProps>;\n\nexport const DSPageNextButtonPropTypes: DSPropTypesSchema<DSPaginationT.PageNextButtonProps> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n canNextPage: PropTypes.bool.description('Whether the next button is disabled or not').defaultValue(true),\n onNextPage: PropTypes.func.description('Function invoked when next button is pressed').defaultValue(() => null),\n};\n\nexport const DSPageNextButtonPropTypesSchema =\n DSPageNextButtonPropTypes as unknown as WeakValidationMap<DSPaginationT.PageNextButtonProps>;\n\nexport const DSPaginatorPropTypes: DSPropTypesSchema<DSPaginationT.PaginatorProps> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n pageIndex: PropTypes.number.description('Index of the current page, starting from 1').defaultValue(1),\n pageCount: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('How many pages are there'),\n onPageChange: PropTypes.func.description('Function invoked when the page changes').defaultValue(() => null),\n isLoadingPageCount: PropTypes.bool.description('Whether the page count is loading or not').defaultValue(false),\n pageDetails: PropTypes.arrayOf(PropTypes.string).description('Details to provide for each page').defaultValue([]),\n pageDetailsTitle: PropTypes.string\n .description('The title of the details (usually a column of your dataset)')\n .defaultValue(''),\n};\n\nexport const DSPaginatorPropTypesSchema =\n DSPaginatorPropTypes as unknown as WeakValidationMap<DSPaginationT.PaginatorProps>;\n\nexport const DSPaginationContainerPropTypes: DSPropTypesSchema<DSPaginationT.ContainerProps> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n};\n\nexport const DSPaginationContainerPropTypesSchema =\n DSPaginationContainerPropTypes as unknown as WeakValidationMap<DSPaginationT.ContainerProps>;\n\nexport const DSPaginationStyledPartPropTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n};\n\nexport const DSPaginationStyledPartPropTypesSchema =\n DSPaginationStyledPartPropTypes as unknown as WeakValidationMap<unknown>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": "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",
|
|
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/parts/DSPaginator/getOptions.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { Checkmark } from '@elliemae/ds-icons';\nimport type { DSDropdownMenuT } from '@elliemae/ds-dropdownmenu';\n\ninterface OptionWithDetailsT {\n pageInfoWidth: number;\n pageIndex: number;\n index: number;\n pageDetails: string[];\n}\n\nconst OptionWithDetails = (props: OptionWithDetailsT) => {\n const Comp = () => {\n const { pageInfoWidth, pageIndex, index, pageDetails } = props;\n return (\n <Grid cols={['16px', `${pageInfoWidth + 16}px`, 'auto']} gutter=\"xxs\" alignItems=\"center\">\n {pageIndex - 1 === index ? <Checkmark size=\"s\" color={['brand-primary', '600']} /> : <div />}\n <span>{index + 1}</span>\n <span\n style={{\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n }}\n >\n {pageDetails[index]}\n </span>\n </Grid>\n );\n };\n return Comp;\n};\n\nexport const getOptions = (args: {\n pageCount: number | string;\n pageIndex: number;\n pageDetails: string[];\n pageInfoWidth: number;\n}): DSDropdownMenuT.ItemSingleOptions[] => {\n const { pageCount, pageIndex, pageDetails, pageInfoWidth } = args;\n\n const amountOfPages = typeof pageCount === 'string' ? pageIndex + 1 : pageCount;\n\n const options = new Array(amountOfPages).fill(0).map((_, index) => {\n const option: DSDropdownMenuT.ItemSingleOptions = {\n dsId: (index + 1).toString(),\n label: (index + 1).toString(),\n value: index + 1,\n type: 'single',\n };\n if (pageDetails?.length) {\n option.render = OptionWithDetails({ pageInfoWidth, pageIndex, index, pageDetails });\n }\n return option;\n });\n return options;\n};\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { Checkmark } from '@elliemae/ds-icons';\nimport type { DSDropdownMenuT } from '@elliemae/ds-dropdownmenu-v2';\n\ninterface OptionWithDetailsT {\n pageInfoWidth: number;\n pageIndex: number;\n index: number;\n pageDetails: string[];\n}\n\nconst OptionWithDetails = (props: OptionWithDetailsT) => {\n const Comp = () => {\n const { pageInfoWidth, pageIndex, index, pageDetails } = props;\n return (\n <Grid cols={['16px', `${pageInfoWidth + 16}px`, 'auto']} gutter=\"xxs\" alignItems=\"center\">\n {pageIndex - 1 === index ? <Checkmark size=\"s\" color={['brand-primary', '600']} /> : <div />}\n <span>{index + 1}</span>\n <span\n style={{\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n }}\n >\n {pageDetails[index]}\n </span>\n </Grid>\n );\n };\n return Comp;\n};\n\nexport const getOptions = (args: {\n pageCount: number | string;\n pageIndex: number;\n pageDetails: string[];\n pageInfoWidth: number;\n}): DSDropdownMenuT.ItemSingleOptions[] => {\n const { pageCount, pageIndex, pageDetails, pageInfoWidth } = args;\n\n const amountOfPages = typeof pageCount === 'string' ? pageIndex + 1 : pageCount;\n\n const options = new Array(amountOfPages).fill(0).map((_, index) => {\n const option: DSDropdownMenuT.ItemSingleOptions = {\n dsId: (index + 1).toString(),\n label: (index + 1).toString(),\n value: index + 1,\n type: 'single',\n };\n if (pageDetails?.length) {\n option.render = OptionWithDetails({ pageInfoWidth, pageIndex, index, pageDetails });\n }\n return option;\n });\n return options;\n};\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACgBjB,SAC6B,KAD7B;AAfN,SAAS,YAAY;AACrB,SAAS,iBAAiB;AAU1B,MAAM,oBAAoB,CAAC,UAA8B;AACvD,QAAM,OAAO,MAAM;AACjB,UAAM,EAAE,eAAe,WAAW,OAAO,YAAY,IAAI;AACzD,WACE,qBAAC,QAAK,MAAM,CAAC,QAAQ,GAAG,gBAAgB,QAAQ,MAAM,GAAG,QAAO,OAAM,YAAW,UAC9E;AAAA,kBAAY,MAAM,QAAQ,oBAAC,aAAU,MAAK,KAAI,OAAO,CAAC,iBAAiB,KAAK,GAAG,IAAK,oBAAC,SAAI;AAAA,MAC1F,oBAAC,UAAM,kBAAQ,GAAE;AAAA,MACjB;AAAA,QAAC;AAAA;AAAA,UACC,OAAO;AAAA,YACL,YAAY;AAAA,YACZ,cAAc;AAAA,YACd,UAAU;AAAA,UACZ;AAAA,UAEC,sBAAY,KAAK;AAAA;AAAA,MACpB;AAAA,OACF;AAAA,EAEJ;AACA,SAAO;AACT;AAEO,MAAM,aAAa,CAAC,SAKgB;AACzC,QAAM,EAAE,WAAW,WAAW,aAAa,cAAc,IAAI;AAE7D,QAAM,gBAAgB,OAAO,cAAc,WAAW,YAAY,IAAI;AAEtE,QAAM,UAAU,IAAI,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,IAAI,CAAC,GAAG,UAAU;AACjE,UAAM,SAA4C;AAAA,MAChD,OAAO,QAAQ,GAAG,SAAS;AAAA,MAC3B,QAAQ,QAAQ,GAAG,SAAS;AAAA,MAC5B,OAAO,QAAQ;AAAA,MACf,MAAM;AAAA,IACR;AACA,QAAI,aAAa,QAAQ;AACvB,aAAO,SAAS,kBAAkB,EAAE,eAAe,WAAW,OAAO,YAAY,CAAC;AAAA,IACpF;AACA,WAAO;AAAA,EACT,CAAC;AACD,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -4,7 +4,7 @@ import { useMemo } from "react";
|
|
|
4
4
|
import { ChevronDown } from "@elliemae/ds-icons";
|
|
5
5
|
import { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from "@elliemae/ds-props-helpers";
|
|
6
6
|
import { Grid } from "@elliemae/ds-grid";
|
|
7
|
-
import { DSDropdownMenuV2 } from "@elliemae/ds-dropdownmenu";
|
|
7
|
+
import { DSDropdownMenuV2 } from "@elliemae/ds-dropdownmenu-v2";
|
|
8
8
|
import { DSTypography } from "@elliemae/ds-typography";
|
|
9
9
|
import { DSCircularIndeterminateIndicator } from "@elliemae/ds-circular-progress-indicator";
|
|
10
10
|
import { InvisibleDiv, PaginationDropdownButton, DSPaginationSeparator } from "../../styled.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/DSPaginator/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/prop-types */\nimport React, { useMemo } from 'react';\nimport type { DSButtonT } from '@elliemae/ds-button-v2';\nimport { ChevronDown } from '@elliemae/ds-icons';\nimport { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSDropdownMenuV2 } from '@elliemae/ds-dropdownmenu';\nimport { DSTypography } from '@elliemae/ds-typography';\nimport { DSCircularIndeterminateIndicator } from '@elliemae/ds-circular-progress-indicator';\nimport { InvisibleDiv, PaginationDropdownButton, DSPaginationSeparator } from '../../styled.js';\nimport { paginatorDefaultProps, DSPaginatorPropTypesSchema } from '../../react-desc-prop-types.js';\nimport { PaginatorName } from '../../DSPaginationDefinitions.js';\nimport { usePaginator } from './usePaginator.js';\nimport { createPaginatorHeader } from './createPaginatorHeader.js';\nimport { PAGINATION_DATA_TESTID } from '../../PaginationDataTestID.js';\nimport type { DSDropdownMenuT } from '@elliemae/ds-dropdownmenu';\nimport type { DSPaginationT } from '../../react-desc-prop-types.js';\n\nexport const DSPaginator: React.ComponentType<DSPaginationT.PaginatorProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSPaginationT.PaginatorInternalProps>(\n props,\n paginatorDefaultProps,\n );\n useValidateTypescriptPropTypes(propsWithDefault, DSPaginatorPropTypesSchema, PaginatorName);\n\n const { pageIndex, pageCount, isLoadingPageCount, onPageChange, pageDetails, pageDetailsTitle } = propsWithDefault;\n\n const {\n btnRef,\n btnWidth,\n pageInfoWidth,\n options,\n isOpened,\n setIsOpened,\n detailWidth,\n globalAttributes,\n xstyledAttributes,\n actionRef,\n onKeyDown,\n } = usePaginator(propsWithDefault);\n\n const Header = useMemo(\n () => createPaginatorHeader({ pageDetailsTitle, pageInfoWidth }),\n [pageDetailsTitle, pageInfoWidth],\n );\n\n const buttonOnClick: DSButtonT.Props['onClick'] = useMemo(() => {\n if (globalAttributes.onClick) return globalAttributes.onClick as DSButtonT.Props['onClick'];\n return () => setIsOpened((prev) => !prev);\n }, [globalAttributes.onClick, setIsOpened]);\n\n return (\n <DSDropdownMenuV2\n isOpened={isOpened}\n options={options}\n selectedOptions={{ [pageIndex.toString()]: true }}\n onOptionClick={(_, clickedOption) => {\n onPageChange((clickedOption as DSDropdownMenuT.ItemSingleOptions).value as number);\n setIsOpened(false);\n btnRef.current?.focus();\n }}\n onClickOutside={() => {\n setIsOpened(false);\n btnRef.current?.focus();\n }}\n customOffset={[-23, 2]}\n startPlacementPreference=\"top-start\"\n actionRef={actionRef}\n onKeyDown={onKeyDown}\n minWidth={pageDetails.length !== 0 ? btnWidth + 23 : pageCount.toString().length * 6 + 90}\n maxHeight={300}\n HeaderComp={Header}\n >\n <PaginationDropdownButton\n buttonType=\"raw\"\n disabled={isLoadingPageCount}\n innerRef={btnRef}\n aria-pressed={isOpened}\n aria-label={`Page ${pageIndex} out of ${pageCount}, ${\n pageDetails.length !== 0 ? pageDetails[pageIndex - 1] : '\\b\\b'\n }. Press to change the current page`}\n data-testid={PAGINATION_DATA_TESTID.PAGINATOR}\n {...globalAttributes}\n {...xstyledAttributes}\n onClick={buttonOnClick}\n >\n <Grid gutter=\"xxxs\" alignItems=\"center\" style={{ gridAutoFlow: 'column' }}>\n <DSTypography fontSize=\"18px\" variant=\"b1\" as=\"span\" fontWeight=\"semibold\" textAlign=\"start\">\n {pageIndex}\n </DSTypography>\n / {pageCount}\n {isLoadingPageCount && <DSCircularIndeterminateIndicator ml=\"xxxs\" mr=\"xxxs\" size=\"xs\" />}\n {pageDetails.length !== 0 && (\n <>\n <DSPaginationSeparator height=\"12px\" ml=\"12px\" mr=\"xxxs\" />\n <DSTypography\n fontSize=\"13px\"\n w={detailWidth}\n mr=\"xxs\"\n variant=\"b1\"\n as=\"span\"\n fontWeight=\"semibold\"\n textAlign=\"start\"\n >\n {pageDetails[pageIndex - 1]}\n </DSTypography>\n </>\n )}\n <ChevronDown ml=\"xxxs\" color={['brand-primary', '700']} />\n </Grid>\n </PaginationDropdownButton>\n {/* We calculate the length of the longest detail here (this is as per specs) */}\n <Grid style={{ position: 'relative' }}>\n {pageDetails.map((pageDetail) => (\n <InvisibleDiv data-testid=\"ds-pagination-invisible-detail-for-width-calc\" key={pageDetail}>\n <DSTypography fontSize=\"13px\" mr=\"xxs\" variant=\"b1\" as=\"span\" fontWeight=\"semibold\" textAlign=\"start\">\n {pageDetail}\n </DSTypography>\n </InvisibleDiv>\n ))}\n </Grid>\n </DSDropdownMenuV2>\n );\n};\n\nDSPaginator.propTypes = DSPaginatorPropTypesSchema;\nDSPaginator.displayName = PaginatorName;\nexport const DSPaginatorWithSchema = describe(DSPaginator).description('Per Page Selector');\nDSPaginatorWithSchema.propTypes = DSPaginatorPropTypesSchema;\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/prop-types */\nimport React, { useMemo } from 'react';\nimport type { DSButtonT } from '@elliemae/ds-button-v2';\nimport { ChevronDown } from '@elliemae/ds-icons';\nimport { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSDropdownMenuV2 } from '@elliemae/ds-dropdownmenu-v2';\nimport { DSTypography } from '@elliemae/ds-typography';\nimport { DSCircularIndeterminateIndicator } from '@elliemae/ds-circular-progress-indicator';\nimport { InvisibleDiv, PaginationDropdownButton, DSPaginationSeparator } from '../../styled.js';\nimport { paginatorDefaultProps, DSPaginatorPropTypesSchema } from '../../react-desc-prop-types.js';\nimport { PaginatorName } from '../../DSPaginationDefinitions.js';\nimport { usePaginator } from './usePaginator.js';\nimport { createPaginatorHeader } from './createPaginatorHeader.js';\nimport { PAGINATION_DATA_TESTID } from '../../PaginationDataTestID.js';\nimport type { DSDropdownMenuT } from '@elliemae/ds-dropdownmenu-v2';\nimport type { DSPaginationT } from '../../react-desc-prop-types.js';\n\nexport const DSPaginator: React.ComponentType<DSPaginationT.PaginatorProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSPaginationT.PaginatorInternalProps>(\n props,\n paginatorDefaultProps,\n );\n useValidateTypescriptPropTypes(propsWithDefault, DSPaginatorPropTypesSchema, PaginatorName);\n\n const { pageIndex, pageCount, isLoadingPageCount, onPageChange, pageDetails, pageDetailsTitle } = propsWithDefault;\n\n const {\n btnRef,\n btnWidth,\n pageInfoWidth,\n options,\n isOpened,\n setIsOpened,\n detailWidth,\n globalAttributes,\n xstyledAttributes,\n actionRef,\n onKeyDown,\n } = usePaginator(propsWithDefault);\n\n const Header = useMemo(\n () => createPaginatorHeader({ pageDetailsTitle, pageInfoWidth }),\n [pageDetailsTitle, pageInfoWidth],\n );\n\n const buttonOnClick: DSButtonT.Props['onClick'] = useMemo(() => {\n if (globalAttributes.onClick) return globalAttributes.onClick as DSButtonT.Props['onClick'];\n return () => setIsOpened((prev) => !prev);\n }, [globalAttributes.onClick, setIsOpened]);\n\n return (\n <DSDropdownMenuV2\n isOpened={isOpened}\n options={options}\n selectedOptions={{ [pageIndex.toString()]: true }}\n onOptionClick={(_, clickedOption) => {\n onPageChange((clickedOption as DSDropdownMenuT.ItemSingleOptions).value as number);\n setIsOpened(false);\n btnRef.current?.focus();\n }}\n onClickOutside={() => {\n setIsOpened(false);\n btnRef.current?.focus();\n }}\n customOffset={[-23, 2]}\n startPlacementPreference=\"top-start\"\n actionRef={actionRef}\n onKeyDown={onKeyDown}\n minWidth={pageDetails.length !== 0 ? btnWidth + 23 : pageCount.toString().length * 6 + 90}\n maxHeight={300}\n HeaderComp={Header}\n >\n <PaginationDropdownButton\n buttonType=\"raw\"\n disabled={isLoadingPageCount}\n innerRef={btnRef}\n aria-pressed={isOpened}\n aria-label={`Page ${pageIndex} out of ${pageCount}, ${\n pageDetails.length !== 0 ? pageDetails[pageIndex - 1] : '\\b\\b'\n }. Press to change the current page`}\n data-testid={PAGINATION_DATA_TESTID.PAGINATOR}\n {...globalAttributes}\n {...xstyledAttributes}\n onClick={buttonOnClick}\n >\n <Grid gutter=\"xxxs\" alignItems=\"center\" style={{ gridAutoFlow: 'column' }}>\n <DSTypography fontSize=\"18px\" variant=\"b1\" as=\"span\" fontWeight=\"semibold\" textAlign=\"start\">\n {pageIndex}\n </DSTypography>\n / {pageCount}\n {isLoadingPageCount && <DSCircularIndeterminateIndicator ml=\"xxxs\" mr=\"xxxs\" size=\"xs\" />}\n {pageDetails.length !== 0 && (\n <>\n <DSPaginationSeparator height=\"12px\" ml=\"12px\" mr=\"xxxs\" />\n <DSTypography\n fontSize=\"13px\"\n w={detailWidth}\n mr=\"xxs\"\n variant=\"b1\"\n as=\"span\"\n fontWeight=\"semibold\"\n textAlign=\"start\"\n >\n {pageDetails[pageIndex - 1]}\n </DSTypography>\n </>\n )}\n <ChevronDown ml=\"xxxs\" color={['brand-primary', '700']} />\n </Grid>\n </PaginationDropdownButton>\n {/* We calculate the length of the longest detail here (this is as per specs) */}\n <Grid style={{ position: 'relative' }}>\n {pageDetails.map((pageDetail) => (\n <InvisibleDiv data-testid=\"ds-pagination-invisible-detail-for-width-calc\" key={pageDetail}>\n <DSTypography fontSize=\"13px\" mr=\"xxs\" variant=\"b1\" as=\"span\" fontWeight=\"semibold\" textAlign=\"start\">\n {pageDetail}\n </DSTypography>\n </InvisibleDiv>\n ))}\n </Grid>\n </DSDropdownMenuV2>\n );\n};\n\nDSPaginator.propTypes = DSPaginatorPropTypesSchema;\nDSPaginator.displayName = PaginatorName;\nexport const DSPaginatorWithSchema = describe(DSPaginator).description('Per Page Selector');\nDSPaginatorWithSchema.propTypes = DSPaginatorPropTypesSchema;\n"],
|
|
5
5
|
"mappings": "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",
|
|
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/parts/DSPerPageSelector/getOptions.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { range } from '@elliemae/ds-utilities';\nimport type { DSDropdownMenuT } from '@elliemae/ds-dropdownmenu';\n\nexport const generateOption = (\n value: number | DSDropdownMenuT.ItemSingleOptions,\n): DSDropdownMenuT.ItemSingleOptions => {\n if (typeof value === 'object') {\n return value;\n }\n return {\n dsId: value.toString(),\n value,\n label: value.toString(),\n type: 'single',\n } as const;\n};\n\nexport const getOptions = (step: number, min: number, max: number) => {\n const options = range(min, max + step, step).map(generateOption);\n return min === 0 ? options.slice(1, options.length) : options;\n};\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { range } from '@elliemae/ds-utilities';\nimport type { DSDropdownMenuT } from '@elliemae/ds-dropdownmenu-v2';\n\nexport const generateOption = (\n value: number | DSDropdownMenuT.ItemSingleOptions,\n): DSDropdownMenuT.ItemSingleOptions => {\n if (typeof value === 'object') {\n return value;\n }\n return {\n dsId: value.toString(),\n value,\n label: value.toString(),\n type: 'single',\n } as const;\n};\n\nexport const getOptions = (step: number, min: number, max: number) => {\n const options = range(min, max + step, step).map(generateOption);\n return min === 0 ? options.slice(1, options.length) : options;\n};\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,aAAa;AAGf,MAAM,iBAAiB,CAC5B,UACsC;AACtC,MAAI,OAAO,UAAU,UAAU;AAC7B,WAAO;AAAA,EACT;AACA,SAAO;AAAA,IACL,MAAM,MAAM,SAAS;AAAA,IACrB;AAAA,IACA,OAAO,MAAM,SAAS;AAAA,IACtB,MAAM;AAAA,EACR;AACF;AAEO,MAAM,aAAa,CAAC,MAAc,KAAa,QAAgB;AACpE,QAAM,UAAU,MAAM,KAAK,MAAM,MAAM,IAAI,EAAE,IAAI,cAAc;AAC/D,SAAO,QAAQ,IAAI,QAAQ,MAAM,GAAG,QAAQ,MAAM,IAAI;AACxD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
import { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from "@elliemae/ds-props-helpers";
|
|
5
|
-
import { DSDropdownMenuV2 } from "@elliemae/ds-dropdownmenu";
|
|
5
|
+
import { DSDropdownMenuV2 } from "@elliemae/ds-dropdownmenu-v2";
|
|
6
6
|
import { ChevronDown } from "@elliemae/ds-icons";
|
|
7
7
|
import { perPageSelectorDefaultProps, DSPerPageSelectorPropTypesSchema } from "../../react-desc-prop-types.js";
|
|
8
8
|
import { PaginationDropdownButton } from "../../styled.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/DSPerPageSelector/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useMemo } from 'react';\nimport { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport type { DSDropdownMenuT } from '@elliemae/ds-dropdownmenu';\nimport { DSDropdownMenuV2 } from '@elliemae/ds-dropdownmenu';\nimport { ChevronDown } from '@elliemae/ds-icons';\nimport { perPageSelectorDefaultProps, DSPerPageSelectorPropTypesSchema } from '../../react-desc-prop-types.js';\nimport { PaginationDropdownButton } from '../../styled.js';\nimport { PerPageSelectorName } from '../../DSPaginationDefinitions.js';\nimport { usePerPageSelector } from './usePerPageSelector.js';\nimport { PAGINATION_DATA_TESTID } from '../../PaginationDataTestID.js';\nimport type { DSPaginationT } from '../../react-desc-prop-types.js';\nimport type { DSButtonT } from '@elliemae/ds-button-v2';\n\nconst Header = () => <>{'Per Page'}</>;\n\nexport const DSPerPageSelector: React.ComponentType<DSPaginationT.PerPageSelectorProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSPaginationT.PerPageSelectorInternalProps>(\n props,\n perPageSelectorDefaultProps,\n );\n useValidateTypescriptPropTypes(propsWithDefault, DSPerPageSelectorPropTypesSchema, PerPageSelectorName);\n\n const { pageSize, onPageSizeChange } = propsWithDefault;\n\n const { actionRef, btnRef, width, isOpened, setIsOpened, options, globalAttributes, xstyledAttributes } =\n usePerPageSelector(propsWithDefault);\n\n const buttonOnClick: DSButtonT.Props['onClick'] = useMemo(() => {\n if (globalAttributes.onClick) return globalAttributes.onClick as DSButtonT.Props['onClick'];\n return () => setIsOpened((prev) => !prev);\n }, [globalAttributes.onClick, setIsOpened]);\n\n return (\n <DSDropdownMenuV2\n isOpened={isOpened}\n options={options}\n selectedOptions={{ [pageSize.toString()]: true }}\n onOptionClick={(_, clickedOption) => {\n onPageSizeChange((clickedOption as DSDropdownMenuT.ItemSingleOptions).value as number);\n setIsOpened(false);\n btnRef.current?.focus();\n }}\n onClickOutside={() => {\n setIsOpened(false);\n btnRef.current?.focus();\n }}\n customOffset={[-23, 2]}\n startPlacementPreference=\"top-start\"\n actionRef={actionRef}\n minWidth={width}\n maxHeight={300}\n HeaderComp={Header}\n >\n <PaginationDropdownButton\n buttonType=\"raw\"\n innerRef={btnRef}\n aria-pressed={isOpened}\n aria-label={`${pageSize} rows per page. Press to select rows per page`}\n data-testid={PAGINATION_DATA_TESTID.PER_PAGE_SELECTOR}\n {...globalAttributes}\n {...xstyledAttributes}\n onClick={buttonOnClick}\n >\n {pageSize} / page\n <ChevronDown color={['brand-primary', '700']} />\n </PaginationDropdownButton>\n </DSDropdownMenuV2>\n );\n};\n\nDSPerPageSelector.propTypes = DSPerPageSelectorPropTypesSchema;\nDSPerPageSelector.displayName = PerPageSelectorName;\nexport const DSPerPageSelectorWithSchema = describe(DSPerPageSelector).description('Per Page Selector');\nDSPerPageSelectorWithSchema.propTypes = DSPerPageSelectorPropTypesSchema;\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useMemo } from 'react';\nimport { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport type { DSDropdownMenuT } from '@elliemae/ds-dropdownmenu-v2';\nimport { DSDropdownMenuV2 } from '@elliemae/ds-dropdownmenu-v2';\nimport { ChevronDown } from '@elliemae/ds-icons';\nimport { perPageSelectorDefaultProps, DSPerPageSelectorPropTypesSchema } from '../../react-desc-prop-types.js';\nimport { PaginationDropdownButton } from '../../styled.js';\nimport { PerPageSelectorName } from '../../DSPaginationDefinitions.js';\nimport { usePerPageSelector } from './usePerPageSelector.js';\nimport { PAGINATION_DATA_TESTID } from '../../PaginationDataTestID.js';\nimport type { DSPaginationT } from '../../react-desc-prop-types.js';\nimport type { DSButtonT } from '@elliemae/ds-button-v2';\n\nconst Header = () => <>{'Per Page'}</>;\n\nexport const DSPerPageSelector: React.ComponentType<DSPaginationT.PerPageSelectorProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSPaginationT.PerPageSelectorInternalProps>(\n props,\n perPageSelectorDefaultProps,\n );\n useValidateTypescriptPropTypes(propsWithDefault, DSPerPageSelectorPropTypesSchema, PerPageSelectorName);\n\n const { pageSize, onPageSizeChange } = propsWithDefault;\n\n const { actionRef, btnRef, width, isOpened, setIsOpened, options, globalAttributes, xstyledAttributes } =\n usePerPageSelector(propsWithDefault);\n\n const buttonOnClick: DSButtonT.Props['onClick'] = useMemo(() => {\n if (globalAttributes.onClick) return globalAttributes.onClick as DSButtonT.Props['onClick'];\n return () => setIsOpened((prev) => !prev);\n }, [globalAttributes.onClick, setIsOpened]);\n\n return (\n <DSDropdownMenuV2\n isOpened={isOpened}\n options={options}\n selectedOptions={{ [pageSize.toString()]: true }}\n onOptionClick={(_, clickedOption) => {\n onPageSizeChange((clickedOption as DSDropdownMenuT.ItemSingleOptions).value as number);\n setIsOpened(false);\n btnRef.current?.focus();\n }}\n onClickOutside={() => {\n setIsOpened(false);\n btnRef.current?.focus();\n }}\n customOffset={[-23, 2]}\n startPlacementPreference=\"top-start\"\n actionRef={actionRef}\n minWidth={width}\n maxHeight={300}\n HeaderComp={Header}\n >\n <PaginationDropdownButton\n buttonType=\"raw\"\n innerRef={btnRef}\n aria-pressed={isOpened}\n aria-label={`${pageSize} rows per page. Press to select rows per page`}\n data-testid={PAGINATION_DATA_TESTID.PER_PAGE_SELECTOR}\n {...globalAttributes}\n {...xstyledAttributes}\n onClick={buttonOnClick}\n >\n {pageSize} / page\n <ChevronDown color={['brand-primary', '700']} />\n </PaginationDropdownButton>\n </DSDropdownMenuV2>\n );\n};\n\nDSPerPageSelector.propTypes = DSPerPageSelectorPropTypesSchema;\nDSPerPageSelector.displayName = PerPageSelectorName;\nexport const DSPerPageSelectorWithSchema = describe(DSPerPageSelector).description('Per Page Selector');\nDSPerPageSelectorWithSchema.propTypes = DSPerPageSelectorPropTypesSchema;\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACaF,wBAwCf,YAxCe;AAbrB,SAAgB,eAAe;AAC/B,SAAS,UAAU,8BAA8B,sCAAsC;AAEvF,SAAS,wBAAwB;AACjC,SAAS,mBAAmB;AAC5B,SAAS,6BAA6B,wCAAwC;AAC9E,SAAS,gCAAgC;AACzC,SAAS,2BAA2B;AACpC,SAAS,0BAA0B;AACnC,SAAS,8BAA8B;AAIvC,MAAM,SAAS,MAAM,gCAAG,sBAAW;AAE5B,MAAM,oBAA6E,CAAC,UAAU;AACnG,QAAM,mBAAmB;AAAA,IACvB;AAAA,IACA;AAAA,EACF;AACA,iCAA+B,kBAAkB,kCAAkC,mBAAmB;AAEtG,QAAM,EAAE,UAAU,iBAAiB,IAAI;AAEvC,QAAM,EAAE,WAAW,QAAQ,OAAO,UAAU,aAAa,SAAS,kBAAkB,kBAAkB,IACpG,mBAAmB,gBAAgB;AAErC,QAAM,gBAA4C,QAAQ,MAAM;AAC9D,QAAI,iBAAiB;AAAS,aAAO,iBAAiB;AACtD,WAAO,MAAM,YAAY,CAAC,SAAS,CAAC,IAAI;AAAA,EAC1C,GAAG,CAAC,iBAAiB,SAAS,WAAW,CAAC;AAE1C,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,iBAAiB,EAAE,CAAC,SAAS,SAAS,CAAC,GAAG,KAAK;AAAA,MAC/C,eAAe,CAAC,GAAG,kBAAkB;AACnC,yBAAkB,cAAoD,KAAe;AACrF,oBAAY,KAAK;AACjB,eAAO,SAAS,MAAM;AAAA,MACxB;AAAA,MACA,gBAAgB,MAAM;AACpB,oBAAY,KAAK;AACjB,eAAO,SAAS,MAAM;AAAA,MACxB;AAAA,MACA,cAAc,CAAC,KAAK,CAAC;AAAA,MACrB,0BAAyB;AAAA,MACzB;AAAA,MACA,UAAU;AAAA,MACV,WAAW;AAAA,MACX,YAAY;AAAA,MAEZ;AAAA,QAAC;AAAA;AAAA,UACC,YAAW;AAAA,UACX,UAAU;AAAA,UACV,gBAAc;AAAA,UACd,cAAY,GAAG;AAAA,UACf,eAAa,uBAAuB;AAAA,UACnC,GAAG;AAAA,UACH,GAAG;AAAA,UACJ,SAAS;AAAA,UAER;AAAA;AAAA,YAAS;AAAA,YACV,oBAAC,eAAY,OAAO,CAAC,iBAAiB,KAAK,GAAG;AAAA;AAAA;AAAA,MAChD;AAAA;AAAA,EACF;AAEJ;AAEA,kBAAkB,YAAY;AAC9B,kBAAkB,cAAc;AACzB,MAAM,8BAA8B,SAAS,iBAAiB,EAAE,YAAY,mBAAmB;AACtG,4BAA4B,YAAY;",
|
|
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/react-desc-prop-types.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable @typescript-eslint/no-empty-interface */\nimport { globalAttributesPropTypes, PropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport type { WeakValidationMap } from 'react';\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-props-helpers';\nimport type { DSDropdownMenuT } from '@elliemae/ds-dropdownmenu';\n\nexport namespace DSPaginationT {\n type PropsT<D, R, O, E> = Partial<D> & R & O & Omit<GlobalAttributesT<E>, keyof D | keyof R | keyof O> & XstyledProps;\n type InternalPropsT<D, R, O, E> = D & R & O & Omit<GlobalAttributesT<E>, keyof D | keyof R | keyof O> & XstyledProps;\n\n export interface PerPageSelectorDefaultProps {\n pageSize: number;\n onPageSizeChange: (pageSize: number) => void;\n perPageStep: number;\n minPerPage: number;\n maxPerPage: number;\n }\n export interface PerPageSelectorOptionalProps {\n perPageOptions?: (number | DSDropdownMenuT.ItemSingleOptions)[];\n }\n export interface PerPageSelectorRequiredProps {}\n\n export type PerPageSelectorProps = PropsT<\n PerPageSelectorDefaultProps,\n PerPageSelectorRequiredProps,\n PerPageSelectorOptionalProps,\n HTMLDivElement\n >;\n\n export type PerPageSelectorInternalProps = InternalPropsT<\n PerPageSelectorDefaultProps,\n PerPageSelectorRequiredProps,\n PerPageSelectorOptionalProps,\n HTMLDivElement\n >;\n\n export interface PagePrevButtonDefaultProps {\n canPreviousPage: boolean;\n onPreviousPage: () => void;\n }\n export interface PagePrevButtonOptionalProps {}\n export interface PagePrevButtonRequiredProps {}\n\n export type PagePrevButtonProps = PropsT<\n PagePrevButtonDefaultProps,\n PagePrevButtonRequiredProps,\n PagePrevButtonOptionalProps,\n HTMLButtonElement\n >;\n\n export type PagePrevButtonInternalProps = InternalPropsT<\n PagePrevButtonDefaultProps,\n PagePrevButtonRequiredProps,\n PagePrevButtonOptionalProps,\n HTMLButtonElement\n >;\n\n export interface PageNextButtonDefaultProps {\n canNextPage: boolean;\n onNextPage: () => void;\n }\n export interface PageNextButtonOptionalProps {}\n export interface PageNextButtonRequiredProps {}\n\n export type PageNextButtonProps = PropsT<\n PageNextButtonDefaultProps,\n PageNextButtonRequiredProps,\n PageNextButtonOptionalProps,\n HTMLButtonElement\n >;\n\n export type PageNextButtonInternalProps = InternalPropsT<\n PageNextButtonDefaultProps,\n PageNextButtonRequiredProps,\n PageNextButtonOptionalProps,\n HTMLButtonElement\n >;\n\n export interface PaginatorDefaultProps {\n pageCount: number | string;\n isLoadingPageCount: boolean;\n pageIndex: number;\n onPageChange: (page: number) => void;\n pageDetails: string[];\n pageDetailsTitle: string;\n }\n export interface PaginatorOptionalProps {}\n export interface PaginatorRequiredProps {}\n\n export type PaginatorProps = PropsT<\n PaginatorDefaultProps,\n PaginatorRequiredProps,\n PaginatorOptionalProps,\n HTMLDivElement\n >;\n\n export type PaginatorInternalProps = InternalPropsT<\n PaginatorDefaultProps,\n PaginatorRequiredProps,\n PaginatorOptionalProps,\n HTMLDivElement\n >;\n\n export interface ContainerDefaultProps {}\n export interface ContainerOptionalProps {}\n export interface ContainerRequiredProps {\n children: React.ReactNode;\n }\n\n export type ContainerProps = PropsT<\n ContainerDefaultProps,\n ContainerRequiredProps,\n ContainerOptionalProps,\n HTMLDivElement\n >;\n\n export type ContainerInternalProps = InternalPropsT<\n ContainerDefaultProps,\n ContainerRequiredProps,\n ContainerOptionalProps,\n HTMLDivElement\n >;\n\n // LEGACY WAY OF USING THE PAGINATION COMPONENT\n export interface DefaultProps {\n pageCount: number | string;\n isLoadingPageCount: boolean;\n pageIndex: number;\n canPreviousPage: boolean;\n canNextPage: boolean;\n pageSize: number;\n showPerPageSelector: boolean;\n perPageStep: number;\n minPerPage: number;\n maxPerPage: number;\n onPageSizeChange: (pageSize: number) => void;\n onPreviousPage: () => void;\n onNextPage: () => void;\n onPageChange: (page: number) => void;\n pageDetails: string[];\n pageDetailsTitle: string;\n width: string | number;\n }\n export interface OptionalProps {\n perPageOptions?: (number | DSDropdownMenuT.ItemSingleOptions)[];\n }\n export interface RequiredProps {}\n\n export type Props = PropsT<DefaultProps, RequiredProps, OptionalProps, HTMLDivElement>;\n\n export type InternalProps = InternalPropsT<DefaultProps, RequiredProps, OptionalProps, HTMLDivElement>;\n}\n\nexport const perPageSelectorDefaultProps: DSPaginationT.PerPageSelectorDefaultProps = {\n pageSize: 10,\n onPageSizeChange: () => null,\n perPageStep: 5,\n minPerPage: 0,\n maxPerPage: 100,\n};\n\nexport const pagePrevButtonDefaultProps: DSPaginationT.PagePrevButtonDefaultProps = {\n canPreviousPage: true,\n onPreviousPage: () => null,\n};\n\nexport const pageNextButtonDefaultProps: DSPaginationT.PageNextButtonDefaultProps = {\n canNextPage: true,\n onNextPage: () => null,\n};\n\nexport const paginatorDefaultProps: DSPaginationT.PaginatorDefaultProps = {\n pageCount: 0,\n isLoadingPageCount: false,\n pageIndex: 1,\n onPageChange: () => null,\n pageDetails: [],\n pageDetailsTitle: '',\n};\n\nexport const defaultProps: DSPaginationT.DefaultProps = {\n pageCount: 0,\n pageIndex: 1,\n isLoadingPageCount: false,\n canPreviousPage: true,\n canNextPage: true,\n pageSize: 10,\n showPerPageSelector: true,\n perPageStep: 5,\n minPerPage: 0,\n maxPerPage: 100,\n onPageSizeChange: () => null,\n onPreviousPage: () => null,\n onNextPage: () => null,\n onPageChange: () => null,\n pageDetails: [],\n pageDetailsTitle: '',\n width: '100%',\n};\n\nexport const DSPaginationPropTypes: DSPropTypesSchema<DSPaginationT.Props> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n pageIndex: PropTypes.number.description('Index of the current page, starting from 1').defaultValue(1),\n pageCount: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('How many pages are there'),\n pageSize: PropTypes.number.description('The current page size').defaultValue(10),\n canPreviousPage: PropTypes.bool.description('Whether the previous button is disabled or not').defaultValue(true),\n canNextPage: PropTypes.bool.description('Whether the next button is disabled or not').defaultValue(true),\n onPreviousPage: PropTypes.func\n .description('Function invoked when the previous button is pressed')\n .defaultValue(() => null),\n onPageChange: PropTypes.func.description('Function invoked when the page changes').defaultValue(() => null),\n onNextPage: PropTypes.func.description('Function invoked when next button is pressed').defaultValue(() => null),\n showPerPageSelector: PropTypes.bool.description('Whether to show the page selector').defaultValue(true),\n perPageOptions: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.object]))\n .description('The available options for page size')\n .defaultValue([10]),\n minPerPage: PropTypes.number.description('Min for the per page options').defaultValue(0),\n maxPerPage: PropTypes.number.description('Max for the per page options').defaultValue(100),\n perPageStep: PropTypes.number.description('Step for the per page options').defaultValue(5),\n onPageSizeChange: PropTypes.func.description('Function invoked when the page size changes').defaultValue(() => null),\n pageDetails: PropTypes.arrayOf(PropTypes.string).description('Details to provide for each page').defaultValue([]),\n pageDetailsTitle: PropTypes.string\n .description('The title of the details (usually a column of your dataset)')\n .defaultValue(''),\n width: PropTypes.any.description('Width for the container of the pagination').defaultValue('100%'),\n isLoadingPageCount: PropTypes.bool.description('Whether the page count is loading or not').defaultValue(false),\n};\n\nexport const DSPaginationPropTypesSchema = DSPaginationPropTypes as unknown as WeakValidationMap<DSPaginationT.Props>;\n\nexport const DSPerPageSelectorPropTypes: DSPropTypesSchema<DSPaginationT.PerPageSelectorProps> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n pageSize: PropTypes.number.description('The current page size').defaultValue(10),\n onPageSizeChange: PropTypes.func.description('Function invoked when the page size changes').defaultValue(() => null),\n perPageOptions: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.object]))\n .description('The available options for page size')\n .defaultValue([10]),\n minPerPage: PropTypes.number.description('Min for the per page options').defaultValue(0),\n maxPerPage: PropTypes.number.description('Max for the per page options').defaultValue(100),\n perPageStep: PropTypes.number.description('Step for the per page options').defaultValue(5),\n};\n\nexport const DSPerPageSelectorPropTypesSchema =\n DSPerPageSelectorPropTypes as unknown as WeakValidationMap<DSPaginationT.PerPageSelectorProps>;\n\nexport const DSPagePrevButtonPropTypes: DSPropTypesSchema<DSPaginationT.PagePrevButtonProps> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n canPreviousPage: PropTypes.bool.description('Whether the previous button is disabled or not').defaultValue(true),\n onPreviousPage: PropTypes.func\n .description('Function invoked when the previous button is pressed')\n .defaultValue(() => null),\n};\n\nexport const DSPagePrevButtonPropTypesSchema =\n DSPagePrevButtonPropTypes as unknown as WeakValidationMap<DSPaginationT.PagePrevButtonProps>;\n\nexport const DSPageNextButtonPropTypes: DSPropTypesSchema<DSPaginationT.PageNextButtonProps> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n canNextPage: PropTypes.bool.description('Whether the next button is disabled or not').defaultValue(true),\n onNextPage: PropTypes.func.description('Function invoked when next button is pressed').defaultValue(() => null),\n};\n\nexport const DSPageNextButtonPropTypesSchema =\n DSPageNextButtonPropTypes as unknown as WeakValidationMap<DSPaginationT.PageNextButtonProps>;\n\nexport const DSPaginatorPropTypes: DSPropTypesSchema<DSPaginationT.PaginatorProps> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n pageIndex: PropTypes.number.description('Index of the current page, starting from 1').defaultValue(1),\n pageCount: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('How many pages are there'),\n onPageChange: PropTypes.func.description('Function invoked when the page changes').defaultValue(() => null),\n isLoadingPageCount: PropTypes.bool.description('Whether the page count is loading or not').defaultValue(false),\n pageDetails: PropTypes.arrayOf(PropTypes.string).description('Details to provide for each page').defaultValue([]),\n pageDetailsTitle: PropTypes.string\n .description('The title of the details (usually a column of your dataset)')\n .defaultValue(''),\n};\n\nexport const DSPaginatorPropTypesSchema =\n DSPaginatorPropTypes as unknown as WeakValidationMap<DSPaginationT.PaginatorProps>;\n\nexport const DSPaginationContainerPropTypes: DSPropTypesSchema<DSPaginationT.ContainerProps> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n};\n\nexport const DSPaginationContainerPropTypesSchema =\n DSPaginationContainerPropTypes as unknown as WeakValidationMap<DSPaginationT.ContainerProps>;\n\nexport const DSPaginationStyledPartPropTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n};\n\nexport const DSPaginationStyledPartPropTypesSchema =\n DSPaginationStyledPartPropTypes as unknown as WeakValidationMap<unknown>;\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable @typescript-eslint/no-empty-interface */\nimport { globalAttributesPropTypes, PropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport type { WeakValidationMap } from 'react';\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-props-helpers';\nimport type { DSDropdownMenuT } from '@elliemae/ds-dropdownmenu-v2';\n\nexport namespace DSPaginationT {\n type PropsT<D, R, O, E> = Partial<D> & R & O & Omit<GlobalAttributesT<E>, keyof D | keyof R | keyof O> & XstyledProps;\n type InternalPropsT<D, R, O, E> = D & R & O & Omit<GlobalAttributesT<E>, keyof D | keyof R | keyof O> & XstyledProps;\n\n export interface PerPageSelectorDefaultProps {\n pageSize: number;\n onPageSizeChange: (pageSize: number) => void;\n perPageStep: number;\n minPerPage: number;\n maxPerPage: number;\n }\n export interface PerPageSelectorOptionalProps {\n perPageOptions?: (number | DSDropdownMenuT.ItemSingleOptions)[];\n }\n export interface PerPageSelectorRequiredProps {}\n\n export type PerPageSelectorProps = PropsT<\n PerPageSelectorDefaultProps,\n PerPageSelectorRequiredProps,\n PerPageSelectorOptionalProps,\n HTMLDivElement\n >;\n\n export type PerPageSelectorInternalProps = InternalPropsT<\n PerPageSelectorDefaultProps,\n PerPageSelectorRequiredProps,\n PerPageSelectorOptionalProps,\n HTMLDivElement\n >;\n\n export interface PagePrevButtonDefaultProps {\n canPreviousPage: boolean;\n onPreviousPage: () => void;\n }\n export interface PagePrevButtonOptionalProps {}\n export interface PagePrevButtonRequiredProps {}\n\n export type PagePrevButtonProps = PropsT<\n PagePrevButtonDefaultProps,\n PagePrevButtonRequiredProps,\n PagePrevButtonOptionalProps,\n HTMLButtonElement\n >;\n\n export type PagePrevButtonInternalProps = InternalPropsT<\n PagePrevButtonDefaultProps,\n PagePrevButtonRequiredProps,\n PagePrevButtonOptionalProps,\n HTMLButtonElement\n >;\n\n export interface PageNextButtonDefaultProps {\n canNextPage: boolean;\n onNextPage: () => void;\n }\n export interface PageNextButtonOptionalProps {}\n export interface PageNextButtonRequiredProps {}\n\n export type PageNextButtonProps = PropsT<\n PageNextButtonDefaultProps,\n PageNextButtonRequiredProps,\n PageNextButtonOptionalProps,\n HTMLButtonElement\n >;\n\n export type PageNextButtonInternalProps = InternalPropsT<\n PageNextButtonDefaultProps,\n PageNextButtonRequiredProps,\n PageNextButtonOptionalProps,\n HTMLButtonElement\n >;\n\n export interface PaginatorDefaultProps {\n pageCount: number | string;\n isLoadingPageCount: boolean;\n pageIndex: number;\n onPageChange: (page: number) => void;\n pageDetails: string[];\n pageDetailsTitle: string;\n }\n export interface PaginatorOptionalProps {}\n export interface PaginatorRequiredProps {}\n\n export type PaginatorProps = PropsT<\n PaginatorDefaultProps,\n PaginatorRequiredProps,\n PaginatorOptionalProps,\n HTMLDivElement\n >;\n\n export type PaginatorInternalProps = InternalPropsT<\n PaginatorDefaultProps,\n PaginatorRequiredProps,\n PaginatorOptionalProps,\n HTMLDivElement\n >;\n\n export interface ContainerDefaultProps {}\n export interface ContainerOptionalProps {}\n export interface ContainerRequiredProps {\n children: React.ReactNode;\n }\n\n export type ContainerProps = PropsT<\n ContainerDefaultProps,\n ContainerRequiredProps,\n ContainerOptionalProps,\n HTMLDivElement\n >;\n\n export type ContainerInternalProps = InternalPropsT<\n ContainerDefaultProps,\n ContainerRequiredProps,\n ContainerOptionalProps,\n HTMLDivElement\n >;\n\n // LEGACY WAY OF USING THE PAGINATION COMPONENT\n export interface DefaultProps {\n pageCount: number | string;\n isLoadingPageCount: boolean;\n pageIndex: number;\n canPreviousPage: boolean;\n canNextPage: boolean;\n pageSize: number;\n showPerPageSelector: boolean;\n perPageStep: number;\n minPerPage: number;\n maxPerPage: number;\n onPageSizeChange: (pageSize: number) => void;\n onPreviousPage: () => void;\n onNextPage: () => void;\n onPageChange: (page: number) => void;\n pageDetails: string[];\n pageDetailsTitle: string;\n width: string | number;\n }\n export interface OptionalProps {\n perPageOptions?: (number | DSDropdownMenuT.ItemSingleOptions)[];\n }\n export interface RequiredProps {}\n\n export type Props = PropsT<DefaultProps, RequiredProps, OptionalProps, HTMLDivElement>;\n\n export type InternalProps = InternalPropsT<DefaultProps, RequiredProps, OptionalProps, HTMLDivElement>;\n}\n\nexport const perPageSelectorDefaultProps: DSPaginationT.PerPageSelectorDefaultProps = {\n pageSize: 10,\n onPageSizeChange: () => null,\n perPageStep: 5,\n minPerPage: 0,\n maxPerPage: 100,\n};\n\nexport const pagePrevButtonDefaultProps: DSPaginationT.PagePrevButtonDefaultProps = {\n canPreviousPage: true,\n onPreviousPage: () => null,\n};\n\nexport const pageNextButtonDefaultProps: DSPaginationT.PageNextButtonDefaultProps = {\n canNextPage: true,\n onNextPage: () => null,\n};\n\nexport const paginatorDefaultProps: DSPaginationT.PaginatorDefaultProps = {\n pageCount: 0,\n isLoadingPageCount: false,\n pageIndex: 1,\n onPageChange: () => null,\n pageDetails: [],\n pageDetailsTitle: '',\n};\n\nexport const defaultProps: DSPaginationT.DefaultProps = {\n pageCount: 0,\n pageIndex: 1,\n isLoadingPageCount: false,\n canPreviousPage: true,\n canNextPage: true,\n pageSize: 10,\n showPerPageSelector: true,\n perPageStep: 5,\n minPerPage: 0,\n maxPerPage: 100,\n onPageSizeChange: () => null,\n onPreviousPage: () => null,\n onNextPage: () => null,\n onPageChange: () => null,\n pageDetails: [],\n pageDetailsTitle: '',\n width: '100%',\n};\n\nexport const DSPaginationPropTypes: DSPropTypesSchema<DSPaginationT.Props> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n pageIndex: PropTypes.number.description('Index of the current page, starting from 1').defaultValue(1),\n pageCount: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('How many pages are there'),\n pageSize: PropTypes.number.description('The current page size').defaultValue(10),\n canPreviousPage: PropTypes.bool.description('Whether the previous button is disabled or not').defaultValue(true),\n canNextPage: PropTypes.bool.description('Whether the next button is disabled or not').defaultValue(true),\n onPreviousPage: PropTypes.func\n .description('Function invoked when the previous button is pressed')\n .defaultValue(() => null),\n onPageChange: PropTypes.func.description('Function invoked when the page changes').defaultValue(() => null),\n onNextPage: PropTypes.func.description('Function invoked when next button is pressed').defaultValue(() => null),\n showPerPageSelector: PropTypes.bool.description('Whether to show the page selector').defaultValue(true),\n perPageOptions: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.object]))\n .description('The available options for page size')\n .defaultValue([10]),\n minPerPage: PropTypes.number.description('Min for the per page options').defaultValue(0),\n maxPerPage: PropTypes.number.description('Max for the per page options').defaultValue(100),\n perPageStep: PropTypes.number.description('Step for the per page options').defaultValue(5),\n onPageSizeChange: PropTypes.func.description('Function invoked when the page size changes').defaultValue(() => null),\n pageDetails: PropTypes.arrayOf(PropTypes.string).description('Details to provide for each page').defaultValue([]),\n pageDetailsTitle: PropTypes.string\n .description('The title of the details (usually a column of your dataset)')\n .defaultValue(''),\n width: PropTypes.any.description('Width for the container of the pagination').defaultValue('100%'),\n isLoadingPageCount: PropTypes.bool.description('Whether the page count is loading or not').defaultValue(false),\n};\n\nexport const DSPaginationPropTypesSchema = DSPaginationPropTypes as unknown as WeakValidationMap<DSPaginationT.Props>;\n\nexport const DSPerPageSelectorPropTypes: DSPropTypesSchema<DSPaginationT.PerPageSelectorProps> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n pageSize: PropTypes.number.description('The current page size').defaultValue(10),\n onPageSizeChange: PropTypes.func.description('Function invoked when the page size changes').defaultValue(() => null),\n perPageOptions: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.object]))\n .description('The available options for page size')\n .defaultValue([10]),\n minPerPage: PropTypes.number.description('Min for the per page options').defaultValue(0),\n maxPerPage: PropTypes.number.description('Max for the per page options').defaultValue(100),\n perPageStep: PropTypes.number.description('Step for the per page options').defaultValue(5),\n};\n\nexport const DSPerPageSelectorPropTypesSchema =\n DSPerPageSelectorPropTypes as unknown as WeakValidationMap<DSPaginationT.PerPageSelectorProps>;\n\nexport const DSPagePrevButtonPropTypes: DSPropTypesSchema<DSPaginationT.PagePrevButtonProps> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n canPreviousPage: PropTypes.bool.description('Whether the previous button is disabled or not').defaultValue(true),\n onPreviousPage: PropTypes.func\n .description('Function invoked when the previous button is pressed')\n .defaultValue(() => null),\n};\n\nexport const DSPagePrevButtonPropTypesSchema =\n DSPagePrevButtonPropTypes as unknown as WeakValidationMap<DSPaginationT.PagePrevButtonProps>;\n\nexport const DSPageNextButtonPropTypes: DSPropTypesSchema<DSPaginationT.PageNextButtonProps> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n canNextPage: PropTypes.bool.description('Whether the next button is disabled or not').defaultValue(true),\n onNextPage: PropTypes.func.description('Function invoked when next button is pressed').defaultValue(() => null),\n};\n\nexport const DSPageNextButtonPropTypesSchema =\n DSPageNextButtonPropTypes as unknown as WeakValidationMap<DSPaginationT.PageNextButtonProps>;\n\nexport const DSPaginatorPropTypes: DSPropTypesSchema<DSPaginationT.PaginatorProps> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n pageIndex: PropTypes.number.description('Index of the current page, starting from 1').defaultValue(1),\n pageCount: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('How many pages are there'),\n onPageChange: PropTypes.func.description('Function invoked when the page changes').defaultValue(() => null),\n isLoadingPageCount: PropTypes.bool.description('Whether the page count is loading or not').defaultValue(false),\n pageDetails: PropTypes.arrayOf(PropTypes.string).description('Details to provide for each page').defaultValue([]),\n pageDetailsTitle: PropTypes.string\n .description('The title of the details (usually a column of your dataset)')\n .defaultValue(''),\n};\n\nexport const DSPaginatorPropTypesSchema =\n DSPaginatorPropTypes as unknown as WeakValidationMap<DSPaginationT.PaginatorProps>;\n\nexport const DSPaginationContainerPropTypes: DSPropTypesSchema<DSPaginationT.ContainerProps> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n};\n\nexport const DSPaginationContainerPropTypesSchema =\n DSPaginationContainerPropTypes as unknown as WeakValidationMap<DSPaginationT.ContainerProps>;\n\nexport const DSPaginationStyledPartPropTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n};\n\nexport const DSPaginationStyledPartPropTypesSchema =\n DSPaginationStyledPartPropTypes as unknown as WeakValidationMap<unknown>;\n"],
|
|
5
5
|
"mappings": "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",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -5,7 +5,7 @@ export declare const usePaginator: (props: DSPaginationT.PaginatorInternalProps)
|
|
|
5
5
|
btnRef: import("react").RefObject<HTMLButtonElement>;
|
|
6
6
|
btnWidth: number;
|
|
7
7
|
pageInfoWidth: number;
|
|
8
|
-
options: import("@elliemae/ds-dropdownmenu").DSDropdownMenuT.ItemSingleOptions[];
|
|
8
|
+
options: import("@elliemae/ds-dropdownmenu-v2").DSDropdownMenuT.ItemSingleOptions[];
|
|
9
9
|
isOpened: boolean;
|
|
10
10
|
setIsOpened: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
11
11
|
detailWidth: number;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { DSDropdownMenuT } from '@elliemae/ds-dropdownmenu';
|
|
1
|
+
import type { DSDropdownMenuT } from '@elliemae/ds-dropdownmenu-v2';
|
|
2
2
|
export declare const generateOption: (value: number | DSDropdownMenuT.ItemSingleOptions) => DSDropdownMenuT.ItemSingleOptions;
|
|
3
3
|
export declare const getOptions: (step: number, min: number, max: number) => DSDropdownMenuT.ItemSingleOptions[];
|
|
@@ -7,7 +7,7 @@ export declare const usePerPageSelector: (props: DSPaginationT.PerPageSelectorIn
|
|
|
7
7
|
width: number;
|
|
8
8
|
isOpened: boolean;
|
|
9
9
|
setIsOpened: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
10
|
-
options: import("@elliemae/ds-dropdownmenu").DSDropdownMenuT.ItemSingleOptions[];
|
|
10
|
+
options: import("@elliemae/ds-dropdownmenu-v2").DSDropdownMenuT.ItemSingleOptions[];
|
|
11
11
|
globalAttributes: import("lodash").Omit<import("@elliemae/ds-props-helpers").GlobalAttributesT<Element>, "type" | "shape" | "size">;
|
|
12
12
|
xstyledAttributes: import("@elliemae/ds-props-helpers").XstyledProps;
|
|
13
13
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { WeakValidationMap } from 'react';
|
|
2
2
|
import type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-props-helpers';
|
|
3
|
-
import type { DSDropdownMenuT } from '@elliemae/ds-dropdownmenu';
|
|
3
|
+
import type { DSDropdownMenuT } from '@elliemae/ds-dropdownmenu-v2';
|
|
4
4
|
export declare namespace DSPaginationT {
|
|
5
5
|
type PropsT<D, R, O, E> = Partial<D> & R & O & Omit<GlobalAttributesT<E>, keyof D | keyof R | keyof O> & XstyledProps;
|
|
6
6
|
type InternalPropsT<D, R, O, E> = D & R & O & Omit<GlobalAttributesT<E>, keyof D | keyof R | keyof O> & XstyledProps;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-pagination",
|
|
3
|
-
"version": "3.25.0-next.
|
|
3
|
+
"version": "3.25.0-next.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Pagination",
|
|
6
6
|
"files": [
|
|
@@ -76,21 +76,21 @@
|
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
78
|
"@xstyled/system": "~3.7.3",
|
|
79
|
-
"@elliemae/ds-
|
|
80
|
-
"@elliemae/ds-
|
|
81
|
-
"@elliemae/ds-
|
|
82
|
-
"@elliemae/ds-
|
|
83
|
-
"@elliemae/ds-
|
|
84
|
-
"@elliemae/ds-icons": "3.25.0-next.
|
|
85
|
-
"@elliemae/ds-typography": "3.25.0-next.
|
|
86
|
-
"@elliemae/ds-
|
|
87
|
-
"@elliemae/ds-
|
|
79
|
+
"@elliemae/ds-button-v2": "3.25.0-next.4",
|
|
80
|
+
"@elliemae/ds-dropdownmenu-v2": "3.25.0-next.4",
|
|
81
|
+
"@elliemae/ds-grid": "3.25.0-next.4",
|
|
82
|
+
"@elliemae/ds-props-helpers": "3.25.0-next.4",
|
|
83
|
+
"@elliemae/ds-circular-progress-indicator": "3.25.0-next.4",
|
|
84
|
+
"@elliemae/ds-icons": "3.25.0-next.4",
|
|
85
|
+
"@elliemae/ds-typography": "3.25.0-next.4",
|
|
86
|
+
"@elliemae/ds-system": "3.25.0-next.4",
|
|
87
|
+
"@elliemae/ds-utilities": "3.25.0-next.4"
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
90
90
|
"@elliemae/pui-cli": "~9.0.0-next.31",
|
|
91
91
|
"styled-components": "~5.3.9",
|
|
92
92
|
"styled-system": "~5.1.5",
|
|
93
|
-
"@elliemae/ds-monorepo-devops": "3.25.0-next.
|
|
93
|
+
"@elliemae/ds-monorepo-devops": "3.25.0-next.4"
|
|
94
94
|
},
|
|
95
95
|
"peerDependencies": {
|
|
96
96
|
"lodash": "^4.17.21",
|