@okta/odyssey-react-mui 1.36.1 → 1.37.0
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/README.md +8 -3
- package/dist/cjs/Pagination/Pagination.cjs +1 -1
- package/dist/cjs/Pagination/Pagination.cjs.map +1 -1
- package/dist/cjs/Pagination/usePagination.cjs +3 -1
- package/dist/cjs/Pagination/usePagination.cjs.map +1 -1
- package/dist/cjs/labs/DataView/TableLayoutContent.cjs +3 -3
- package/dist/cjs/labs/DataView/TableLayoutContent.cjs.map +1 -1
- package/dist/cjs/labs/PageTemplate/DocumentationLink.cjs +41 -0
- package/dist/cjs/labs/PageTemplate/DocumentationLink.cjs.map +1 -0
- package/dist/cjs/labs/PageTemplate/PageTemplate.cjs +22 -8
- package/dist/cjs/labs/PageTemplate/PageTemplate.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui.cjs.map +1 -1
- package/dist/cjs/ui-shell/NarrowUiShellContent.cjs +2 -1
- package/dist/cjs/ui-shell/NarrowUiShellContent.cjs.map +1 -1
- package/dist/cjs/ui-shell/SideNav/SideNav.cjs +6 -2
- package/dist/cjs/ui-shell/SideNav/SideNav.cjs.map +1 -1
- package/dist/cjs/ui-shell/WideUiShellContent.cjs +0 -1
- package/dist/cjs/ui-shell/WideUiShellContent.cjs.map +1 -1
- package/dist/cjs/ui-shell/renderUiShell.cjs +12 -0
- package/dist/cjs/ui-shell/renderUiShell.cjs.map +1 -1
- package/dist/cjs/web-component/odysseyWebComponentVersion.generated.cjs +1 -1
- package/dist/cjs/web-component/odysseyWebComponentVersion.generated.cjs.map +1 -1
- package/dist/cjs/web-component/renderReactInWebComponent.cjs.map +1 -1
- package/dist/esm/Pagination/Pagination.js +1 -1
- package/dist/esm/Pagination/Pagination.js.map +1 -1
- package/dist/esm/Pagination/usePagination.js +3 -1
- package/dist/esm/Pagination/usePagination.js.map +1 -1
- package/dist/esm/labs/DataView/TableLayoutContent.js +3 -3
- package/dist/esm/labs/DataView/TableLayoutContent.js.map +1 -1
- package/dist/esm/labs/PageTemplate/DocumentationLink.js +35 -0
- package/dist/esm/labs/PageTemplate/DocumentationLink.js.map +1 -0
- package/dist/esm/labs/PageTemplate/PageTemplate.js +22 -8
- package/dist/esm/labs/PageTemplate/PageTemplate.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui.js.map +1 -1
- package/dist/esm/ui-shell/NarrowUiShellContent.js +2 -1
- package/dist/esm/ui-shell/NarrowUiShellContent.js.map +1 -1
- package/dist/esm/ui-shell/SideNav/SideNav.js +6 -2
- package/dist/esm/ui-shell/SideNav/SideNav.js.map +1 -1
- package/dist/esm/ui-shell/WideUiShellContent.js +0 -1
- package/dist/esm/ui-shell/WideUiShellContent.js.map +1 -1
- package/dist/esm/ui-shell/renderUiShell.js +12 -0
- package/dist/esm/ui-shell/renderUiShell.js.map +1 -1
- package/dist/esm/web-component/odysseyWebComponentVersion.generated.js +1 -1
- package/dist/esm/web-component/odysseyWebComponentVersion.generated.js.map +1 -1
- package/dist/esm/web-component/renderReactInWebComponent.js.map +1 -1
- package/dist/index.cjs +231 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +25 -0
- package/dist/index.mjs +229 -0
- package/dist/index.scss +549 -0
- package/dist/tsconfig.production.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/OdysseyTranslationProvider.d.ts +1 -1
- package/dist/types/OdysseyTranslationProvider.d.ts.map +1 -1
- package/dist/types/Pagination/usePagination.d.ts.map +1 -1
- package/dist/types/i18n.d.ts +1 -0
- package/dist/types/i18n.d.ts.map +1 -1
- package/dist/types/labs/PageTemplate/DocumentationLink.d.ts +34 -0
- package/dist/types/labs/PageTemplate/DocumentationLink.d.ts.map +1 -0
- package/dist/types/labs/PageTemplate/PageTemplate.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui.d.ts.map +1 -1
- package/dist/types/ui-shell/NarrowUiShellContent.d.ts.map +1 -1
- package/dist/types/ui-shell/SideNav/SideNav.d.ts.map +1 -1
- package/dist/types/ui-shell/WideUiShellContent.d.ts.map +1 -1
- package/dist/types/ui-shell/renderUiShell.d.ts +19 -4
- package/dist/types/ui-shell/renderUiShell.d.ts.map +1 -1
- package/dist/types/web-component/odysseyWebComponentVersion.generated.d.ts +1 -1
- package/dist/types/web-component/renderReactInWebComponent.d.ts.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -44,14 +44,17 @@ Add the Odyssey `OdysseyProvider` around your whole app:
|
|
|
44
44
|
import { OdysseyProvider } from "@okta/odyssey-react-mui";
|
|
45
45
|
|
|
46
46
|
const YourAppRoot = ({ children }) => (
|
|
47
|
-
<OdysseyProvider>
|
|
47
|
+
<OdysseyProvider>
|
|
48
|
+
<CssBaseline />
|
|
49
|
+
{children}
|
|
50
|
+
</OdysseyProvider>
|
|
48
51
|
);
|
|
49
52
|
```
|
|
50
53
|
|
|
51
54
|
Add Material-UI components not exported from Odyssey with Odyssey styling or add your own theme to MUI:
|
|
52
55
|
|
|
53
56
|
```sh
|
|
54
|
-
|
|
57
|
+
yarn add @mui/material
|
|
55
58
|
```
|
|
56
59
|
|
|
57
60
|
```jsx
|
|
@@ -60,7 +63,9 @@ import { OdysseyThemeProvider } from "@okta/odyssey-react-mui";
|
|
|
60
63
|
import { myMaterialUiTheme } from "./myMaterialUiTheme.js";
|
|
61
64
|
|
|
62
65
|
const YourAppRoot = ({ children }) => (
|
|
63
|
-
<OdysseyThemeProvider theme={myMaterialUiTheme}>
|
|
66
|
+
<OdysseyThemeProvider theme={myMaterialUiTheme}>
|
|
67
|
+
{children}
|
|
68
|
+
<OdysseyThemeProvider>
|
|
64
69
|
);
|
|
65
70
|
```
|
|
66
71
|
|
|
@@ -118,7 +118,7 @@ const Pagination = ({
|
|
|
118
118
|
} = (0, _usePagination.usePagination)({
|
|
119
119
|
pageIndex,
|
|
120
120
|
pageSize,
|
|
121
|
-
currentRowsCount: currentRowsCount ||
|
|
121
|
+
currentRowsCount: currentRowsCount || 0,
|
|
122
122
|
totalRows
|
|
123
123
|
});
|
|
124
124
|
const handlePaginationChange = (0, _react.useCallback)(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pagination.cjs","names":["_styled","_interopRequireDefault","require","_react","_reactI18next","_Box","_index","_index2","_OdysseyDesignTokensContext","_usePagination","_Typography","_jsxRuntime","e","__esModule","default","PaginationContainer","styled","display","justifyContent","PaginationSegment","shouldForwardProp","prop","odysseyDesignTokens","alignItems","gap","Spacing4","Spacing2","PaginationInput","_InputBase2","borderColor","HueNeutral200","borderRadius","BorderRadiusTight","height","Spacing6","width","HueNeutral400","PalettePrimaryMain","PaginationButtonContainer","marginInlineStart","Pagination","currentPageLabel","currentPageLabelProp","currentRowsCount","hasPageInput","hasRowCountInput","hasRowCountLabel","isDisabled","isMoreDisabled","lastRow","loadMoreLabel","loadMoreLabelProp","maxPageIndex","maxPageSize","nextLabel","nextLabelProp","onPaginationChange","onPaginationChangeProp","pageIndex","pageSize","previousLabel","previousLabelProp","rowsPerPageLabel","rowsPerPageLabelProp","totalRows","variant","useOdysseyDesignTokens","t","useTranslation","page","setPage","useState","rowsPerPage","setRowsPerPage","initialRowsPerPage","useRef","useEffect","useCallback","totalRowsLabel","usePagination","handlePaginationChange","updatedPage","updatedRowsPerPage","Math","ceil","handlePageSubmit","event","key","parseInt","currentTarget","value","handleRowsPerPageSubmit","setPageFromEvent","min","target","setRowsPerPageFromEvent","max","handleLoadMore","current","handleNextButton","handlePreviousButton","loadMoreIsDisabled","useMemo","nextButtonDisabled","previousButtonDisabled","rowsPerPageInputProps","currentPageInputProps","jsxs","children","Box","jsx","Paragraph","component","color","type","onChange","onBlur","onKeyDown","disabled","inputProps","Button","startIcon","ArrowLeftIcon","size","ariaLabel","onClick","endIcon","ArrowRightIcon","label","MemoizedPagination","exports","memo","displayName"],"sources":["../../../src/Pagination/Pagination.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport styled from \"@emotion/styled\";\nimport { InputBase } from \"@mui/material\";\nimport { memo, useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { Box } from \"../Box.js\";\nimport { Button } from \"../Buttons/index.js\";\nimport { paginationTypeValues } from \"./constants.js\";\nimport { ArrowLeftIcon, ArrowRightIcon } from \"../icons.generated/index.js\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"../OdysseyDesignTokensContext.js\";\nimport { usePagination } from \"./usePagination.js\";\nimport { Paragraph } from \"../Typography.js\";\n\nconst PaginationContainer = styled(\"nav\")({\n display: \"flex\",\n justifyContent: \"space-between\",\n});\n\nconst PaginationSegment = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{ odysseyDesignTokens: DesignTokens }>(({ odysseyDesignTokens }) => ({\n display: \"flex\",\n alignItems: \"center\",\n gap: odysseyDesignTokens.Spacing4,\n \"& > div\": {\n display: \"flex\",\n alignItems: \"center\",\n gap: odysseyDesignTokens.Spacing2,\n },\n}));\n\nconst PaginationInput = styled(InputBase, {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{ odysseyDesignTokens: DesignTokens }>(({ odysseyDesignTokens }) => ({\n borderColor: odysseyDesignTokens.HueNeutral200,\n borderRadius: odysseyDesignTokens.BorderRadiusTight,\n height: odysseyDesignTokens.Spacing6,\n width: \"4.5714285714rem\", // This is a hardcoded value, keep as string\n \"&:hover\": {\n borderColor: odysseyDesignTokens.HueNeutral400,\n },\n \"&.Mui-focused:hover\": {\n borderColor: odysseyDesignTokens.PalettePrimaryMain,\n },\n}));\n\nconst PaginationButtonContainer = styled(\"div\")({\n \"& > *\": {\n marginInlineStart: `0 !important`,\n },\n});\n\nexport type PaginationProps = {\n /**\n * The labeled rendered for the current page index\n */\n currentPageLabel?: string;\n /**\n * The number of items currently visible on the page\n */\n currentRowsCount?: number;\n /**\n * If true, the page input will be visible and the user can directly manipulate which page\n * is visible.\n */\n hasPageInput?: boolean;\n /**\n * If true, the row count input will be visible and the user can directly manipulate how many rows\n * are visible.\n */\n hasRowCountInput?: boolean;\n /**\n * If true, the \"X - X of total X\" label will be visible\n */\n hasRowCountLabel?: boolean;\n /**\n * If true, the pagination controls will be disabled\n */\n isDisabled?: boolean;\n /**\n * If true, the next or Show More button will be disabled\n */\n isMoreDisabled?: boolean;\n /**\n * The current page last row index\n */\n lastRow?: number;\n /**\n * If the pagination is of \"loadMore\" variant, then this is the the load more label\n */\n loadMoreLabel?: string;\n /**\n * The max page\n */\n maxPageIndex?: number;\n /**\n * The max rows per page\n */\n maxPageSize?: number;\n /**\n * The label for the next control\n */\n nextLabel?: string;\n /**\n * Page index and page size setter\n */\n onPaginationChange: ({\n pageIndex,\n pageSize,\n }: {\n pageIndex: number;\n pageSize: number;\n }) => void;\n /**\n * The current page index\n */\n pageIndex: number;\n /**\n * The current page size\n */\n pageSize: number;\n /**\n * The label for the previous control\n */\n previousLabel?: string;\n /**\n * The label that shows how many results are rendered per page\n */\n rowsPerPageLabel?: string;\n /**\n * Total rows count\n */\n totalRows?: number;\n /**\n * The type of pagination controls shown. Defaults to next/prev buttons, but can be\n * set to a simple \"Load more\" button by setting to \"loadMore\".\n */\n variant?: (typeof paginationTypeValues)[number];\n};\n\nconst Pagination = ({\n currentPageLabel: currentPageLabelProp,\n currentRowsCount,\n hasPageInput = true,\n hasRowCountInput = true,\n hasRowCountLabel = true,\n isDisabled,\n isMoreDisabled,\n lastRow,\n loadMoreLabel: loadMoreLabelProp,\n maxPageIndex,\n maxPageSize,\n nextLabel: nextLabelProp,\n onPaginationChange: onPaginationChangeProp,\n pageIndex,\n pageSize,\n previousLabel: previousLabelProp,\n rowsPerPageLabel: rowsPerPageLabelProp,\n totalRows,\n variant,\n}: PaginationProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const { t } = useTranslation();\n\n const [page, setPage] = useState<number>(pageIndex);\n const [rowsPerPage, setRowsPerPage] = useState<number>(pageSize);\n const initialRowsPerPage = useRef<number>(pageSize);\n\n const currentPageLabel = currentPageLabelProp ?? t(\"pagination.page\");\n const loadMoreLabel = loadMoreLabelProp ?? t(\"pagination.loadmore\");\n const nextLabel = nextLabelProp ?? t(\"pagination.next\");\n const previousLabel = previousLabelProp ?? t(\"pagination.previous\");\n const rowsPerPageLabel = rowsPerPageLabelProp ?? t(\"pagination.rowsperpage\");\n\n useEffect(() => {\n setPage(pageIndex);\n setRowsPerPage(pageSize);\n }, [pageIndex, pageSize]);\n\n const onPaginationChange = useCallback(\n ({ pageIndex, pageSize }: { pageIndex: number; pageSize: number }) => {\n onPaginationChangeProp({ pageIndex, pageSize });\n },\n [onPaginationChangeProp],\n );\n\n const { totalRowsLabel } = usePagination({\n pageIndex,\n pageSize,\n currentRowsCount: currentRowsCount || pageSize,\n totalRows,\n });\n\n const handlePaginationChange = useCallback(() => {\n let updatedPage = page;\n let updatedRowsPerPage = rowsPerPage;\n\n if (totalRows) {\n const maxPageIndex = Math.ceil(totalRows / updatedRowsPerPage);\n\n // Ensure rowsPerPage does not exceed totalRows\n if (updatedRowsPerPage > totalRows) {\n updatedRowsPerPage = totalRows;\n }\n\n // Ensure page is within valid range\n if (updatedPage > maxPageIndex) {\n updatedPage = maxPageIndex;\n } else if (updatedPage < 1) {\n updatedPage = 1;\n }\n }\n\n onPaginationChange({\n pageIndex: updatedPage,\n pageSize: updatedRowsPerPage,\n });\n }, [page, rowsPerPage, onPaginationChange, totalRows]);\n\n // The following handlers use React.KeyboardEvent (rather than just KeyboardEvent) becuase React.KeyboardEvent\n // is generic, while plain KeyboardEvent is not. We need this generic so we can specify the HTMLInputElement,\n // which allows us to use currentTarget.value\n const handlePageSubmit = useCallback(\n (event: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n if (event.key === \"Enter\") {\n onPaginationChange({\n pageIndex: parseInt(event.currentTarget.value),\n pageSize: rowsPerPage,\n });\n }\n },\n [rowsPerPage, onPaginationChange],\n );\n\n const handleRowsPerPageSubmit = useCallback(\n (event: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n if (event.key === \"Enter\") {\n onPaginationChange({\n pageIndex: page,\n pageSize: parseInt(event.currentTarget.value),\n });\n }\n },\n [page, onPaginationChange],\n );\n\n const setPageFromEvent = useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n const value = maxPageIndex\n ? Math.min(parseInt(event.target.value), maxPageIndex)\n : parseInt(event.target.value);\n setPage(value);\n },\n [setPage, maxPageIndex],\n );\n\n const setRowsPerPageFromEvent = useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n const value = maxPageSize\n ? Math.min(parseInt(event.target.value), maxPageSize)\n : parseInt(event.target.value);\n\n // Ensure the value can't be less than 1\n setRowsPerPage(Math.max(1, value));\n },\n [setRowsPerPage, maxPageSize],\n );\n\n const handleLoadMore = useCallback(() => {\n onPaginationChange({\n pageIndex: 1,\n pageSize: rowsPerPage + initialRowsPerPage.current,\n });\n }, [rowsPerPage, onPaginationChange]);\n\n const handleNextButton = useCallback(() => {\n onPaginationChange({ pageIndex: page + 1, pageSize: rowsPerPage });\n }, [onPaginationChange, page, rowsPerPage]);\n\n const handlePreviousButton = useCallback(() => {\n onPaginationChange({ pageIndex: page - 1, pageSize: rowsPerPage });\n }, [onPaginationChange, page, rowsPerPage]);\n\n const loadMoreIsDisabled = useMemo(() => {\n return isMoreDisabled || (totalRows ? rowsPerPage >= totalRows : false);\n }, [isMoreDisabled, rowsPerPage, totalRows]);\n\n const nextButtonDisabled = useMemo(\n () =>\n isMoreDisabled ||\n (lastRow && (totalRows ? lastRow >= totalRows : false)) ||\n isDisabled,\n [isMoreDisabled, totalRows, lastRow, isDisabled],\n );\n\n const previousButtonDisabled = useMemo(\n () => pageIndex <= 1 || isDisabled,\n [pageIndex, isDisabled],\n );\n\n const rowsPerPageInputProps = useMemo(\n () => ({\n \"aria-label\": rowsPerPageLabel,\n max: maxPageSize || totalRows,\n }),\n [maxPageSize, rowsPerPageLabel, totalRows],\n );\n\n const currentPageInputProps = useMemo(\n () => ({\n \"aria-label\": currentPageLabel,\n max: maxPageIndex,\n }),\n [currentPageLabel, maxPageIndex],\n );\n\n return variant === \"paged\" ? (\n <PaginationContainer aria-label={t(\"pagination.label\")}>\n <PaginationSegment odysseyDesignTokens={odysseyDesignTokens}>\n {hasRowCountInput && (\n <Box>\n <Paragraph component=\"span\" color=\"textSecondary\">\n {rowsPerPageLabel}\n </Paragraph>\n <PaginationInput\n odysseyDesignTokens={odysseyDesignTokens}\n type=\"number\"\n value={rowsPerPage}\n onChange={setRowsPerPageFromEvent}\n onBlur={handlePaginationChange}\n onKeyDown={handleRowsPerPageSubmit}\n disabled={isDisabled}\n inputProps={rowsPerPageInputProps}\n />\n </Box>\n )}\n {hasRowCountLabel && (\n <Paragraph component=\"span\" color=\"textSecondary\">\n {totalRowsLabel}\n </Paragraph>\n )}\n </PaginationSegment>\n\n <PaginationSegment odysseyDesignTokens={odysseyDesignTokens}>\n {totalRows && hasPageInput && (\n <Box>\n <Paragraph component=\"span\" color=\"textSecondary\">\n {currentPageLabel}\n </Paragraph>\n <PaginationInput\n odysseyDesignTokens={odysseyDesignTokens}\n type=\"number\"\n value={page}\n onChange={setPageFromEvent}\n onBlur={handlePaginationChange}\n onKeyDown={handlePageSubmit}\n disabled={isDisabled}\n inputProps={currentPageInputProps}\n />\n </Box>\n )}\n <PaginationButtonContainer>\n <Button\n startIcon={<ArrowLeftIcon />}\n variant=\"floating\"\n size=\"small\"\n ariaLabel={previousLabel}\n onClick={handlePreviousButton}\n isDisabled={previousButtonDisabled}\n />\n <Button\n endIcon={<ArrowRightIcon />}\n variant=\"floating\"\n size=\"small\"\n ariaLabel={nextLabel}\n onClick={handleNextButton}\n isDisabled={nextButtonDisabled}\n />\n </PaginationButtonContainer>\n </PaginationSegment>\n </PaginationContainer>\n ) : (\n <Button\n variant=\"secondary\"\n label={loadMoreLabel}\n onClick={handleLoadMore}\n isDisabled={loadMoreIsDisabled}\n />\n );\n};\n\nconst MemoizedPagination = memo(Pagination);\nMemoizedPagination.displayName = \"Pagination\";\n\nexport { MemoizedPagination as Pagination };\n"],"mappings":";;;;;;;AAYA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AAEA,IAAAG,IAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAEA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,2BAAA,GAAAN,OAAA;AAIA,IAAAO,cAAA,GAAAP,OAAA;AACA,IAAAQ,WAAA,GAAAR,OAAA;AAA6C,IAAAS,WAAA,GAAAT,OAAA;AAAA,SAAAD,uBAAAW,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AA1B7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAkBA,MAAMG,mBAAmB,GAAG,IAAAC,eAAM,EAAC,KAAK,CAAC,CAAC;EACxCC,OAAO,EAAE,MAAM;EACfC,cAAc,EAAE;AAClB,CAAC,CAAC;AAEF,MAAMC,iBAAiB,GAAG,IAA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CAAAmG,GAAA,EAACxG,MAAA,CAAAkH,MAAM;IACLvD,OAAO,EAAC,WAAW;IACnB+D,KAAK,EAAE9E,aAAc;IACrB2E,OAAO,EAAE5B,cAAe;IACxBlD,UAAU,EAAEsD;EAAmB,CAChC,CACF;AACH,CAAC;AAED,MAAM4B,kBAAkB,GAAAC,OAAA,CAAA1F,UAAA,GAAG,IAAA2F,WAAI,EAAC3F,UAAU,CAAC;AAC3CyF,kBAAkB,CAACG,WAAW,GAAG,YAAY","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"Pagination.cjs","names":["_styled","_interopRequireDefault","require","_react","_reactI18next","_Box","_index","_index2","_OdysseyDesignTokensContext","_usePagination","_Typography","_jsxRuntime","e","__esModule","default","PaginationContainer","styled","display","justifyContent","PaginationSegment","shouldForwardProp","prop","odysseyDesignTokens","alignItems","gap","Spacing4","Spacing2","PaginationInput","_InputBase2","borderColor","HueNeutral200","borderRadius","BorderRadiusTight","height","Spacing6","width","HueNeutral400","PalettePrimaryMain","PaginationButtonContainer","marginInlineStart","Pagination","currentPageLabel","currentPageLabelProp","currentRowsCount","hasPageInput","hasRowCountInput","hasRowCountLabel","isDisabled","isMoreDisabled","lastRow","loadMoreLabel","loadMoreLabelProp","maxPageIndex","maxPageSize","nextLabel","nextLabelProp","onPaginationChange","onPaginationChangeProp","pageIndex","pageSize","previousLabel","previousLabelProp","rowsPerPageLabel","rowsPerPageLabelProp","totalRows","variant","useOdysseyDesignTokens","t","useTranslation","page","setPage","useState","rowsPerPage","setRowsPerPage","initialRowsPerPage","useRef","useEffect","useCallback","totalRowsLabel","usePagination","handlePaginationChange","updatedPage","updatedRowsPerPage","Math","ceil","handlePageSubmit","event","key","parseInt","currentTarget","value","handleRowsPerPageSubmit","setPageFromEvent","min","target","setRowsPerPageFromEvent","max","handleLoadMore","current","handleNextButton","handlePreviousButton","loadMoreIsDisabled","useMemo","nextButtonDisabled","previousButtonDisabled","rowsPerPageInputProps","currentPageInputProps","jsxs","children","Box","jsx","Paragraph","component","color","type","onChange","onBlur","onKeyDown","disabled","inputProps","Button","startIcon","ArrowLeftIcon","size","ariaLabel","onClick","endIcon","ArrowRightIcon","label","MemoizedPagination","exports","memo","displayName"],"sources":["../../../src/Pagination/Pagination.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport styled from \"@emotion/styled\";\nimport { InputBase } from \"@mui/material\";\nimport { memo, useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { Box } from \"../Box.js\";\nimport { Button } from \"../Buttons/index.js\";\nimport { paginationTypeValues } from \"./constants.js\";\nimport { ArrowLeftIcon, ArrowRightIcon } from \"../icons.generated/index.js\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"../OdysseyDesignTokensContext.js\";\nimport { usePagination } from \"./usePagination.js\";\nimport { Paragraph } from \"../Typography.js\";\n\nconst PaginationContainer = styled(\"nav\")({\n display: \"flex\",\n justifyContent: \"space-between\",\n});\n\nconst PaginationSegment = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{ odysseyDesignTokens: DesignTokens }>(({ odysseyDesignTokens }) => ({\n display: \"flex\",\n alignItems: \"center\",\n gap: odysseyDesignTokens.Spacing4,\n \"& > div\": {\n display: \"flex\",\n alignItems: \"center\",\n gap: odysseyDesignTokens.Spacing2,\n },\n}));\n\nconst PaginationInput = styled(InputBase, {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{ odysseyDesignTokens: DesignTokens }>(({ odysseyDesignTokens }) => ({\n borderColor: odysseyDesignTokens.HueNeutral200,\n borderRadius: odysseyDesignTokens.BorderRadiusTight,\n height: odysseyDesignTokens.Spacing6,\n width: \"4.5714285714rem\", // This is a hardcoded value, keep as string\n \"&:hover\": {\n borderColor: odysseyDesignTokens.HueNeutral400,\n },\n \"&.Mui-focused:hover\": {\n borderColor: odysseyDesignTokens.PalettePrimaryMain,\n },\n}));\n\nconst PaginationButtonContainer = styled(\"div\")({\n \"& > *\": {\n marginInlineStart: `0 !important`,\n },\n});\n\nexport type PaginationProps = {\n /**\n * The labeled rendered for the current page index\n */\n currentPageLabel?: string;\n /**\n * The number of items currently visible on the page\n */\n currentRowsCount?: number;\n /**\n * If true, the page input will be visible and the user can directly manipulate which page\n * is visible.\n */\n hasPageInput?: boolean;\n /**\n * If true, the row count input will be visible and the user can directly manipulate how many rows\n * are visible.\n */\n hasRowCountInput?: boolean;\n /**\n * If true, the \"X - X of total X\" label will be visible\n */\n hasRowCountLabel?: boolean;\n /**\n * If true, the pagination controls will be disabled\n */\n isDisabled?: boolean;\n /**\n * If true, the next or Show More button will be disabled\n */\n isMoreDisabled?: boolean;\n /**\n * The current page last row index\n */\n lastRow?: number;\n /**\n * If the pagination is of \"loadMore\" variant, then this is the the load more label\n */\n loadMoreLabel?: string;\n /**\n * The max page\n */\n maxPageIndex?: number;\n /**\n * The max rows per page\n */\n maxPageSize?: number;\n /**\n * The label for the next control\n */\n nextLabel?: string;\n /**\n * Page index and page size setter\n */\n onPaginationChange: ({\n pageIndex,\n pageSize,\n }: {\n pageIndex: number;\n pageSize: number;\n }) => void;\n /**\n * The current page index\n */\n pageIndex: number;\n /**\n * The current page size\n */\n pageSize: number;\n /**\n * The label for the previous control\n */\n previousLabel?: string;\n /**\n * The label that shows how many results are rendered per page\n */\n rowsPerPageLabel?: string;\n /**\n * Total rows count\n */\n totalRows?: number;\n /**\n * The type of pagination controls shown. Defaults to next/prev buttons, but can be\n * set to a simple \"Load more\" button by setting to \"loadMore\".\n */\n variant?: (typeof paginationTypeValues)[number];\n};\n\nconst Pagination = ({\n currentPageLabel: currentPageLabelProp,\n currentRowsCount,\n hasPageInput = true,\n hasRowCountInput = true,\n hasRowCountLabel = true,\n isDisabled,\n isMoreDisabled,\n lastRow,\n loadMoreLabel: loadMoreLabelProp,\n maxPageIndex,\n maxPageSize,\n nextLabel: nextLabelProp,\n onPaginationChange: onPaginationChangeProp,\n pageIndex,\n pageSize,\n previousLabel: previousLabelProp,\n rowsPerPageLabel: rowsPerPageLabelProp,\n totalRows,\n variant,\n}: PaginationProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const { t } = useTranslation();\n\n const [page, setPage] = useState<number>(pageIndex);\n const [rowsPerPage, setRowsPerPage] = useState<number>(pageSize);\n const initialRowsPerPage = useRef<number>(pageSize);\n\n const currentPageLabel = currentPageLabelProp ?? t(\"pagination.page\");\n const loadMoreLabel = loadMoreLabelProp ?? t(\"pagination.loadmore\");\n const nextLabel = nextLabelProp ?? t(\"pagination.next\");\n const previousLabel = previousLabelProp ?? t(\"pagination.previous\");\n const rowsPerPageLabel = rowsPerPageLabelProp ?? t(\"pagination.rowsperpage\");\n\n useEffect(() => {\n setPage(pageIndex);\n setRowsPerPage(pageSize);\n }, [pageIndex, pageSize]);\n\n const onPaginationChange = useCallback(\n ({ pageIndex, pageSize }: { pageIndex: number; pageSize: number }) => {\n onPaginationChangeProp({ pageIndex, pageSize });\n },\n [onPaginationChangeProp],\n );\n\n const { totalRowsLabel } = usePagination({\n pageIndex,\n pageSize,\n currentRowsCount: currentRowsCount || 0,\n totalRows,\n });\n\n const handlePaginationChange = useCallback(() => {\n let updatedPage = page;\n let updatedRowsPerPage = rowsPerPage;\n\n if (totalRows) {\n const maxPageIndex = Math.ceil(totalRows / updatedRowsPerPage);\n\n // Ensure rowsPerPage does not exceed totalRows\n if (updatedRowsPerPage > totalRows) {\n updatedRowsPerPage = totalRows;\n }\n\n // Ensure page is within valid range\n if (updatedPage > maxPageIndex) {\n updatedPage = maxPageIndex;\n } else if (updatedPage < 1) {\n updatedPage = 1;\n }\n }\n\n onPaginationChange({\n pageIndex: updatedPage,\n pageSize: updatedRowsPerPage,\n });\n }, [page, rowsPerPage, onPaginationChange, totalRows]);\n\n // The following handlers use React.KeyboardEvent (rather than just KeyboardEvent) becuase React.KeyboardEvent\n // is generic, while plain KeyboardEvent is not. We need this generic so we can specify the HTMLInputElement,\n // which allows us to use currentTarget.value\n const handlePageSubmit = useCallback(\n (event: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n if (event.key === \"Enter\") {\n onPaginationChange({\n pageIndex: parseInt(event.currentTarget.value),\n pageSize: rowsPerPage,\n });\n }\n },\n [rowsPerPage, onPaginationChange],\n );\n\n const handleRowsPerPageSubmit = useCallback(\n (event: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n if (event.key === \"Enter\") {\n onPaginationChange({\n pageIndex: page,\n pageSize: parseInt(event.currentTarget.value),\n });\n }\n },\n [page, onPaginationChange],\n );\n\n const setPageFromEvent = useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n const value = maxPageIndex\n ? Math.min(parseInt(event.target.value), maxPageIndex)\n : parseInt(event.target.value);\n setPage(value);\n },\n [setPage, maxPageIndex],\n );\n\n const setRowsPerPageFromEvent = useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n const value = maxPageSize\n ? Math.min(parseInt(event.target.value), maxPageSize)\n : parseInt(event.target.value);\n\n // Ensure the value can't be less than 1\n setRowsPerPage(Math.max(1, value));\n },\n [setRowsPerPage, maxPageSize],\n );\n\n const handleLoadMore = useCallback(() => {\n onPaginationChange({\n pageIndex: 1,\n pageSize: rowsPerPage + initialRowsPerPage.current,\n });\n }, [rowsPerPage, onPaginationChange]);\n\n const handleNextButton = useCallback(() => {\n onPaginationChange({ pageIndex: page + 1, pageSize: rowsPerPage });\n }, [onPaginationChange, page, rowsPerPage]);\n\n const handlePreviousButton = useCallback(() => {\n onPaginationChange({ pageIndex: page - 1, pageSize: rowsPerPage });\n }, [onPaginationChange, page, rowsPerPage]);\n\n const loadMoreIsDisabled = useMemo(() => {\n return isMoreDisabled || (totalRows ? rowsPerPage >= totalRows : false);\n }, [isMoreDisabled, rowsPerPage, totalRows]);\n\n const nextButtonDisabled = useMemo(\n () =>\n isMoreDisabled ||\n (lastRow && (totalRows ? lastRow >= totalRows : false)) ||\n isDisabled,\n [isMoreDisabled, totalRows, lastRow, isDisabled],\n );\n\n const previousButtonDisabled = useMemo(\n () => pageIndex <= 1 || isDisabled,\n [pageIndex, isDisabled],\n );\n\n const rowsPerPageInputProps = useMemo(\n () => ({\n \"aria-label\": rowsPerPageLabel,\n max: maxPageSize || totalRows,\n }),\n [maxPageSize, rowsPerPageLabel, totalRows],\n );\n\n const currentPageInputProps = useMemo(\n () => ({\n \"aria-label\": currentPageLabel,\n max: maxPageIndex,\n }),\n [currentPageLabel, maxPageIndex],\n );\n\n return variant === \"paged\" ? (\n <PaginationContainer aria-label={t(\"pagination.label\")}>\n <PaginationSegment odysseyDesignTokens={odysseyDesignTokens}>\n {hasRowCountInput && (\n <Box>\n <Paragraph component=\"span\" color=\"textSecondary\">\n {rowsPerPageLabel}\n </Paragraph>\n <PaginationInput\n odysseyDesignTokens={odysseyDesignTokens}\n type=\"number\"\n value={rowsPerPage}\n onChange={setRowsPerPageFromEvent}\n onBlur={handlePaginationChange}\n onKeyDown={handleRowsPerPageSubmit}\n disabled={isDisabled}\n inputProps={rowsPerPageInputProps}\n />\n </Box>\n )}\n {hasRowCountLabel && (\n <Paragraph component=\"span\" color=\"textSecondary\">\n {totalRowsLabel}\n </Paragraph>\n )}\n </PaginationSegment>\n\n <PaginationSegment odysseyDesignTokens={odysseyDesignTokens}>\n {totalRows && hasPageInput && (\n <Box>\n <Paragraph component=\"span\" color=\"textSecondary\">\n {currentPageLabel}\n </Paragraph>\n <PaginationInput\n odysseyDesignTokens={odysseyDesignTokens}\n type=\"number\"\n value={page}\n onChange={setPageFromEvent}\n onBlur={handlePaginationChange}\n onKeyDown={handlePageSubmit}\n disabled={isDisabled}\n inputProps={currentPageInputProps}\n />\n </Box>\n )}\n <PaginationButtonContainer>\n <Button\n startIcon={<ArrowLeftIcon />}\n variant=\"floating\"\n size=\"small\"\n ariaLabel={previousLabel}\n onClick={handlePreviousButton}\n isDisabled={previousButtonDisabled}\n />\n <Button\n endIcon={<ArrowRightIcon />}\n variant=\"floating\"\n size=\"small\"\n ariaLabel={nextLabel}\n onClick={handleNextButton}\n isDisabled={nextButtonDisabled}\n />\n </PaginationButtonContainer>\n </PaginationSegment>\n </PaginationContainer>\n ) : (\n <Button\n variant=\"secondary\"\n label={loadMoreLabel}\n onClick={handleLoadMore}\n isDisabled={loadMoreIsDisabled}\n />\n );\n};\n\nconst MemoizedPagination = memo(Pagination);\nMemoizedPagination.displayName = \"Pagination\";\n\nexport { MemoizedPagination as Pagination };\n"],"mappings":";;;;;;;AAYA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AAEA,IAAAG,IAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAEA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,2BAAA,GAAAN,OAAA;AAIA,IAAAO,cAAA,GAAAP,OAAA;AACA,IAAAQ,WAAA,GAAAR,OAAA;AAA6C,IAAAS,WAAA,GAAAT,OAAA;AAAA,SAAAD,uBAAAW,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AA1B7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAkBA,MAAMG,mBAAmB,GAAG,IAAAC,eAAM,EAAC,KAAK,CAAC,CAAC;EACxCC,OAAO,EAAE,MAAM;EACfC,cAAc,EAAE;AAClB,CAAC,CAAC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,CAAC,GAEtB,IAAA5F,WAAA,CAAAmG,GAAA,EAACxG,MAAA,CAAAkH,MAAM;IACLvD,OAAO,EAAC,WAAW;IACnB+D,KAAK,EAAE9E,aAAc;IACrB2E,OAAO,EAAE5B,cAAe;IACxBlD,UAAU,EAAEsD;EAAmB,CAChC,CACF;AACH,CAAC;AAED,MAAM4B,kBAAkB,GAAAC,OAAA,CAAA1F,UAAA,GAAG,IAAA2F,WAAI,EAAC3F,UAAU,CAAC;AAC3CyF,kBAAkB,CAACG,WAAW,GAAG,YAAY","ignoreList":[]}
|
|
@@ -30,7 +30,9 @@ const usePagination = ({
|
|
|
30
30
|
return (0, _react.useMemo)(() => {
|
|
31
31
|
const firstRow = pageSize * (pageIndex - 1) + 1;
|
|
32
32
|
const lastRow = firstRow + (currentRowsCount - 1);
|
|
33
|
-
const totalRowsLabel =
|
|
33
|
+
const totalRowsLabel = currentRowsCount === 0 ? t("pagination.totalrows", {
|
|
34
|
+
totalRows: 0
|
|
35
|
+
}) : totalRows ? t("pagination.rowswithtotal", {
|
|
34
36
|
firstRow,
|
|
35
37
|
lastRow,
|
|
36
38
|
totalRows
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePagination.cjs","names":["_reactI18next","require","_react","usePagination","currentRowsCount","pageIndex","pageSize","totalRows","t","useTranslation","useMemo","firstRow","lastRow","totalRowsLabel","exports"],"sources":["../../../src/Pagination/usePagination.ts"],"sourcesContent":["/*!\n * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { useTranslation } from \"react-i18next\";\nimport { useMemo } from \"react\";\n\ntype UsePaginationType = {\n currentRowsCount: number;\n pageIndex: number;\n pageSize: number;\n totalRows?: number;\n};\n\nexport const usePagination = ({\n currentRowsCount,\n pageIndex,\n pageSize,\n totalRows,\n}: UsePaginationType) => {\n const { t } = useTranslation();\n\n return useMemo(() => {\n const firstRow = pageSize * (pageIndex - 1) + 1;\n const lastRow = firstRow + (currentRowsCount - 1);\n\n const totalRowsLabel
|
|
1
|
+
{"version":3,"file":"usePagination.cjs","names":["_reactI18next","require","_react","usePagination","currentRowsCount","pageIndex","pageSize","totalRows","t","useTranslation","useMemo","firstRow","lastRow","totalRowsLabel","exports"],"sources":["../../../src/Pagination/usePagination.ts"],"sourcesContent":["/*!\n * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { useTranslation } from \"react-i18next\";\nimport { useMemo } from \"react\";\n\ntype UsePaginationType = {\n currentRowsCount: number;\n pageIndex: number;\n pageSize: number;\n totalRows?: number;\n};\n\nexport const usePagination = ({\n currentRowsCount,\n pageIndex,\n pageSize,\n totalRows,\n}: UsePaginationType) => {\n const { t } = useTranslation();\n\n return useMemo(() => {\n const firstRow = pageSize * (pageIndex - 1) + 1;\n const lastRow = firstRow + (currentRowsCount - 1);\n\n const totalRowsLabel =\n currentRowsCount === 0\n ? t(\"pagination.totalrows\", { totalRows: 0 })\n : totalRows\n ? t(\"pagination.rowswithtotal\", { firstRow, lastRow, totalRows })\n : t(\"pagination.rowswithouttotal\", { firstRow, lastRow });\n\n return {\n firstRow,\n lastRow,\n totalRowsLabel,\n };\n }, [currentRowsCount, pageIndex, pageSize, totalRows, t]);\n};\n"],"mappings":";;;;;;AAYA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYO,MAAME,aAAa,GAAGA,CAAC;EAC5BC,gBAAgB;EAChBC,SAAS;EACTC,QAAQ;EACRC;AACiB,CAAC,KAAK;EACvB,MAAM;IAAEC;EAAE,CAAC,GAAG,IAAAC,4BAAc,EAAC,CAAC;EAE9B,OAAO,IAAAC,cAAO,EAAC,MAAM;IACnB,MAAMC,QAAQ,GAAGL,QAAQ,IAAID,SAAS,GAAG,CAAC,CAAC,GAAG,CAAC;IAC/C,MAAMO,OAAO,GAAGD,QAAQ,IAAIP,gBAAgB,GAAG,CAAC,CAAC;IAEjD,MAAMS,cAAc,GAClBT,gBAAgB,KAAK,CAAC,GAClBI,CAAC,CAAC,sBAAsB,EAAE;MAAED,SAAS,EAAE;IAAE,CAAC,CAAC,GAC3CA,SAAS,GACPC,CAAC,CAAC,0BAA0B,EAAE;MAAEG,QAAQ;MAAEC,OAAO;MAAEL;IAAU,CAAC,CAAC,GAC/DC,CAAC,CAAC,6BAA6B,EAAE;MAAEG,QAAQ;MAAEC;IAAQ,CAAC,CAAC;IAE/D,OAAO;MACLD,QAAQ;MACRC,OAAO;MACPC;IACF,CAAC;EACH,CAAC,EAAE,CAACT,gBAAgB,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,CAAC,CAAC,CAAC;AAC3D,CAAC;AAACM,OAAA,CAAAX,aAAA,GAAAA,aAAA","ignoreList":[]}
|
|
@@ -153,9 +153,9 @@ const TableLayoutContent = ({
|
|
|
153
153
|
state: {
|
|
154
154
|
sorting: tableState.columnSorting,
|
|
155
155
|
columnVisibility: tableState.columnVisibility,
|
|
156
|
-
isLoading
|
|
157
|
-
rowSelection
|
|
158
|
-
columnOrder
|
|
156
|
+
isLoading,
|
|
157
|
+
rowSelection,
|
|
158
|
+
columnOrder
|
|
159
159
|
},
|
|
160
160
|
icons: {
|
|
161
161
|
ArrowDownwardIcon: _index.ArrowDownIcon,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableLayoutContent.cjs","names":["_react","require","_styled","_interopRequireDefault","_materialReactTable","_reactI18next","_index","_Box","_index2","_tableConstants","_RowActions","_OdysseyDesignTokensContext","_useScrollIndication","_jsxRuntime","e","__esModule","default","TextWrapper","styled","whiteSpace","textOverflow","overflow","RowActionsContainer","display","TableLayoutContent","columns","data","draggingRow","emptyState","enableVirtualization","getRowId","hasRowReordering","hasRowSelection","isEmpty","isLoading","isNoResults","isRowReorderingDisabled","onReorderRows","pagination","rowReorderingUtilities","rowSelection","setRowSelection","setTableState","tableLayoutOptions","tableState","totalRows","isTableContainerScrolledToStart","setIsTableContainerScrolledToStart","useState","isTableContainerScrolledToEnd","setIsTableContainerScrolledToEnd","tableInnerContainerWidth","setTableInnerContainerWidth","shouldUpdateScroll","useRef","tableOuterContainerRef","tableInnerContainerRef","tableContentRef","useScrollIndication","tableInnerContainer","current","tableOuterContainer","odysseyDesignTokens","useOdysseyDesignTokens","t","useTranslation","columnIds","useMemo","map","column","accessorKey","columnOrder","filter","id","rowDensityClassName","rowDensity","defaultCell","useCallback","cell","value","getValue","hasTextWrapping","columnDef","enableWrapping","jsx","children","draggableTableBodyRowClassName","dragHandleStyles","dragHandleText","handleDragHandleKeyDown","handleDragHandleOnDragCapture","handleDragHandleOnDragEnd","resetDraggingAndHoveredRow","updateRowOrder","renderRowActions","row","currentIndex","index","pageIndex","pageSize","jsxs","rowActionButtons","rowActionMenuItems","MenuButton","ariaLabel","buttonVariant","endIcon","MoreIcon","menuAlignment","size","RowActions","rowIndex","undefined","innerWidthStyle","width","emptyStateContainer","Box","sx","useEffect","scrollTo","clientHeight","shouldDisplayRowActions","hasColumnWithGrow","some","grow","dataTable","useMaterialReactTable","state","sorting","columnSorting","columnVisibility","icons","ArrowDownwardIcon","ArrowDownIcon","DragHandleIcon","DragIndicatorIcon","SyncAltIcon","ArrowUnsortedIcon","ExpandMoreIcon","ChevronDownIcon","dataTableImmutableSettings","displayColumnDefOptions","header","muiTableBodyCellProps","align","className","muiTableHeadCellProps","visibility","Button","variant","isDisabled","muiTableProps","ref","hasColumnResizing","muiTableContainerProps","muiTableBodyProps","tabIndex","height","enableColumnResizing","defaultColumn","Cell","enableRowActions","enableRowOrdering","Boolean","enableRowDragging","muiDetailPanelProps","paddingBlock","getIsExpanded","Spacing3","muiTableBodyRowProps","table","isDetailPanel","currentRowId","draggingRowId","hoveredRowId","getState","hoveredRow","border","backgroundColor","HueNeutralWhite","muiRowDragHandleProps","onKeyDown","event","onBlur","onDragEnd","onDragCapture","disabled","renderDetailPanel","enableRowVirtualization","currentColumn","find","sortedColumn","getIsResizing","enableSorting","hasSorting","onSortingChange","sortingUpdater","newSortVal","prevState","enableRowSelection","onRowSelectionChange","renderEmptyRowsFallback","localization","collapse","collapseAll","expand","expandAll","ScrollableTableContainer","isScrollableEnd","isScrollableStart","MRT_TableContainer","MemoizedTableLayoutContent","exports","memo","displayName"],"sources":["../../../../src/labs/DataView/TableLayoutContent.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport {\n SetStateAction,\n memo,\n useCallback,\n useMemo,\n useRef,\n useState,\n ReactNode,\n Dispatch,\n ReactElement,\n useEffect,\n} from \"react\";\nimport styled, { CSSObject } from \"@emotion/styled\";\nimport {\n MRT_Row,\n MRT_RowData,\n MRT_RowSelectionState,\n MRT_TableContainer,\n MRT_TableInstance,\n MRT_TableOptions,\n useMaterialReactTable,\n} from \"material-react-table\";\nimport { useTranslation } from \"react-i18next\";\n\nimport {\n ArrowDownIcon,\n ArrowUnsortedIcon,\n ChevronDownIcon,\n DragIndicatorIcon,\n MoreIcon,\n} from \"../../icons.generated/index.js\";\nimport { Box } from \"../../Box.js\";\nimport { Button, MenuButton } from \"../../Buttons/index.js\";\nimport {\n TableLayoutProps,\n TableState,\n UniversalProps,\n} from \"./componentTypes.js\";\nimport { DataTableCell } from \"./dataTypes.js\";\nimport {\n dataTableImmutableSettings,\n displayColumnDefOptions,\n ScrollableTableContainer,\n} from \"./tableConstants.js\";\nimport { RowActions } from \"./RowActions.js\";\nimport { useOdysseyDesignTokens } from \"../../OdysseyDesignTokensContext.js\";\nimport { useScrollIndication } from \"../../DataTable/useScrollIndication.js\";\n\nconst TextWrapper = styled(\"div\")({\n whiteSpace: \"nowrap\",\n textOverflow: \"ellipsis\",\n overflow: \"hidden\",\n});\n\nconst RowActionsContainer = styled(\"div\")({\n display: \"flex\",\n});\n\nexport type TableLayoutContentProps<TData extends MRT_RowData> = {\n columns: TableLayoutProps<TData>[\"columns\"];\n data: MRT_RowData[];\n draggingRow?: MRT_Row<TData> | null;\n emptyState: ReactNode;\n enableVirtualization?: boolean;\n getRowId: UniversalProps<TData>[\"getRowId\"];\n hasRowReordering: UniversalProps<TData>[\"hasRowReordering\"];\n hasRowSelection: UniversalProps<TData>[\"hasRowSelection\"];\n isEmpty?: boolean;\n isLoading: boolean;\n isNoResults?: boolean;\n isRowReorderingDisabled?: boolean;\n onReorderRows: UniversalProps<TData>[\"onReorderRows\"];\n pagination: {\n pageIndex: number;\n pageSize: number;\n };\n rowReorderingUtilities: {\n dragHandleStyles: CSSObject;\n dragHandleText: {\n title: string;\n \"aria-label\": string;\n };\n draggableTableBodyRowClassName: ({\n currentRowId,\n draggingRowId,\n hoveredRowId,\n }: {\n currentRowId: string;\n draggingRowId?: string;\n hoveredRowId?: string;\n }) => string | undefined;\n handleDragHandleKeyDown: ({\n table,\n row,\n event,\n }: {\n table: MRT_TableInstance<TData>;\n row: MRT_Row<TData>;\n event: React.KeyboardEvent<HTMLButtonElement>;\n }) => void;\n handleDragHandleOnDragCapture: (table: MRT_TableInstance<TData>) => void;\n handleDragHandleOnDragEnd: (table: MRT_TableInstance<TData>) => void;\n resetDraggingAndHoveredRow: (table: MRT_TableInstance<TData>) => void;\n updateRowOrder: ({\n rowId,\n newRowIndex,\n }: {\n rowId: string;\n newRowIndex: number;\n }) => void;\n };\n rowSelection: MRT_RowSelectionState;\n setRowSelection: Dispatch<SetStateAction<MRT_RowSelectionState>>;\n setTableState: Dispatch<SetStateAction<TableState>>;\n tableLayoutOptions: TableLayoutProps<TData>;\n tableState: TableState;\n totalRows: UniversalProps<TData>[\"totalRows\"];\n};\n\ntype TableLayoutContentComponent = (<TData extends MRT_RowData>(\n props: TableLayoutContentProps<TData>,\n) => JSX.Element) & {\n displayName?: string;\n};\n\nconst TableLayoutContent = <TData extends MRT_RowData>({\n columns,\n data,\n draggingRow,\n emptyState,\n enableVirtualization,\n getRowId,\n hasRowReordering,\n hasRowSelection,\n isEmpty,\n isLoading,\n isNoResults,\n isRowReorderingDisabled,\n onReorderRows,\n pagination,\n rowReorderingUtilities,\n rowSelection,\n setRowSelection,\n setTableState,\n tableLayoutOptions,\n tableState,\n totalRows,\n}: TableLayoutContentProps<TData>) => {\n const [isTableContainerScrolledToStart, setIsTableContainerScrolledToStart] =\n useState(true);\n const [isTableContainerScrolledToEnd, setIsTableContainerScrolledToEnd] =\n useState(true);\n const [tableInnerContainerWidth, setTableInnerContainerWidth] =\n useState<string>(\"100%\");\n const shouldUpdateScroll = useRef<boolean>(false);\n const tableOuterContainerRef = useRef<HTMLDivElement>(null);\n const tableInnerContainerRef = useRef<HTMLDivElement>(null);\n const tableContentRef = useRef<HTMLTableElement>(null);\n\n useScrollIndication({\n setIsTableContainerScrolledToEnd: setIsTableContainerScrolledToEnd,\n setIsTableContainerScrolledToStart: setIsTableContainerScrolledToStart,\n setTableInnerContainerWidth: setTableInnerContainerWidth,\n tableInnerContainer: tableInnerContainerRef.current,\n tableOuterContainer: tableOuterContainerRef.current,\n });\n\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const { t } = useTranslation();\n\n const columnIds = useMemo(() => {\n return columns.map((column) => column.accessorKey) ?? [];\n }, [columns]);\n\n const columnOrder = useMemo(\n () => [\n \"mrt-row-drag\",\n \"mrt-row-select\",\n \"mrt-row-expand\",\n ...(columnIds?.filter((id): id is string => typeof id === \"string\") ||\n []),\n \"mrt-row-actions\",\n ],\n [columnIds],\n );\n\n const rowDensityClassName = useMemo(() => {\n return tableState.rowDensity === \"spacious\"\n ? \"MuiTableBody-spacious\"\n : tableState.rowDensity === \"compact\"\n ? \"MuiTableBody-compact\"\n : \"MuiTableBody-default\";\n }, [tableState]);\n\n const defaultCell = useCallback<\n ({ cell }: { cell: DataTableCell<TData, unknown> }) => ReactElement | string\n >(({ cell }) => {\n const value = cell.getValue<string>();\n const hasTextWrapping =\n cell.column.columnDef.hasTextWrapping ||\n cell.column.columnDef.enableWrapping;\n return hasTextWrapping ? value : <TextWrapper>{value}</TextWrapper>;\n }, []);\n\n const {\n draggableTableBodyRowClassName,\n dragHandleStyles,\n dragHandleText,\n handleDragHandleKeyDown,\n handleDragHandleOnDragCapture,\n handleDragHandleOnDragEnd,\n resetDraggingAndHoveredRow,\n updateRowOrder,\n } = rowReorderingUtilities;\n\n const renderRowActions = useCallback(\n ({ row }: { row: MRT_Row<TData> }) => {\n const currentIndex =\n row.index + (pagination.pageIndex - 1) * pagination.pageSize;\n return (\n <RowActionsContainer>\n {tableLayoutOptions.rowActionButtons?.(row)}\n {(tableLayoutOptions.rowActionMenuItems || hasRowReordering) && (\n <MenuButton\n ariaLabel={t(\"table.moreactions.arialabel\")}\n buttonVariant=\"floating\"\n endIcon={<MoreIcon />}\n menuAlignment=\"right\"\n size=\"small\"\n >\n <RowActions\n isRowReorderingDisabled={isRowReorderingDisabled}\n row={\n row as unknown as MRT_Row<MRT_RowData> // TODO: FIX THIS! The types are wrong. `row` is incorrectly set in `RowActions` to not be TData.\n }\n rowActionMenuItems={\n // TODO: FIX THIS! The types are wrong. `row` is incorrectly set in `RowActions` to not be TData.\n tableLayoutOptions.rowActionMenuItems as unknown as (\n row: MRT_Row<MRT_RowData>,\n ) => any // eslint-disable-line @typescript-eslint/no-explicit-any\n }\n rowIndex={currentIndex}\n totalRows={totalRows}\n updateRowOrder={\n hasRowReordering && onReorderRows ? updateRowOrder : undefined\n }\n />\n </MenuButton>\n )}\n </RowActionsContainer>\n );\n },\n [\n hasRowReordering,\n isRowReorderingDisabled,\n onReorderRows,\n pagination.pageIndex,\n pagination.pageSize,\n t,\n tableLayoutOptions,\n totalRows,\n updateRowOrder,\n ],\n );\n\n const innerWidthStyle = useMemo(\n () => ({ width: tableInnerContainerWidth }),\n [tableInnerContainerWidth],\n );\n\n const emptyStateContainer = useCallback(\n () => <Box sx={innerWidthStyle}>{emptyState}</Box>,\n [innerWidthStyle, emptyState],\n );\n\n // Scroll to the bottom as soon as data loads after clicking the\n // loadMore pagination button\n useEffect(() => {\n if (enableVirtualization) {\n shouldUpdateScroll.current = true;\n }\n }, [enableVirtualization, pagination]);\n\n useEffect(() => {\n if (\n shouldUpdateScroll.current &&\n tableContentRef.current &&\n typeof tableInnerContainerRef.current?.scrollTo !== \"undefined\"\n ) {\n tableInnerContainerRef.current?.scrollTo(\n 0,\n tableContentRef.current.clientHeight,\n );\n shouldUpdateScroll.current = false;\n }\n }, [data]);\n\n const shouldDisplayRowActions = useMemo(\n () =>\n (hasRowReordering === true && onReorderRows) ||\n tableLayoutOptions.rowActionButtons ||\n tableLayoutOptions.rowActionMenuItems\n ? true\n : false,\n [\n hasRowReordering,\n onReorderRows,\n tableLayoutOptions.rowActionButtons,\n tableLayoutOptions.rowActionMenuItems,\n ],\n );\n\n const hasColumnWithGrow = columns.some((column) => column.grow === true);\n\n const dataTable = useMaterialReactTable<TData>({\n data: (!isEmpty && !isNoResults ? data : []) as TData[],\n columns,\n getRowId,\n state: {\n sorting: tableState.columnSorting,\n columnVisibility: tableState.columnVisibility,\n isLoading: isLoading,\n rowSelection: rowSelection,\n columnOrder: columnOrder,\n },\n icons: {\n ArrowDownwardIcon: ArrowDownIcon,\n DragHandleIcon: DragIndicatorIcon,\n SyncAltIcon: ArrowUnsortedIcon,\n ExpandMoreIcon: ChevronDownIcon,\n },\n ...dataTableImmutableSettings,\n displayColumnDefOptions: {\n ...(displayColumnDefOptions satisfies Partial<\n MRT_TableOptions<MRT_RowData>[\"displayColumnDefOptions\"]\n >),\n \"mrt-row-actions\": {\n header: \"\",\n grow: !hasColumnWithGrow,\n muiTableBodyCellProps: {\n align: \"right\" as const,\n sx: {\n overflow: \"visible\",\n width: \"unset\",\n },\n className: \"ods-actions-cell\",\n },\n muiTableHeadCellProps: {\n align: \"right\" as const,\n sx: {\n width: \"unset\",\n },\n className: \"ods-actions-cell\",\n children: (\n <Box sx={{ display: \"flex\", visibility: \"hidden\" }}>\n {tableLayoutOptions.rowActionButtons &&\n // @ts-expect-error TODO: This type is wrong and needs to be fixed\n tableLayoutOptions.rowActionButtons({ id: null })}\n {((hasRowReordering === true && onReorderRows) ||\n tableLayoutOptions.rowActionMenuItems) && (\n <Box>\n <Button\n endIcon={<MoreIcon />}\n size=\"small\"\n variant=\"floating\"\n ariaLabel={t(\"table.moreactions.arialabel\")}\n isDisabled\n />\n </Box>\n )}\n </Box>\n ),\n },\n },\n },\n muiTableProps: {\n ref: tableContentRef,\n className:\n !shouldDisplayRowActions && tableLayoutOptions.hasColumnResizing\n ? hasColumnWithGrow\n ? \"ods-hide-spacer-column\"\n : \"ods-hide-spacer-column ods-column-grow\"\n : \"\",\n },\n muiTableContainerProps: {\n ref: tableInnerContainerRef,\n },\n muiTableBodyProps: () => ({\n className: rowDensityClassName,\n tabIndex: 0,\n /**\n * This is a fix for an issue related to the empty state creating a\n * vertical scrollbar when virtualization is enabled. The root cause\n * is tablebody having height: 0 when virtualization is enabled and there\n * being no data\n * https://okta.slack.com/archives/C7T2H3KNJ/p1742842106148929\n */\n sx:\n isEmpty || isNoResults\n ? {\n height: \"unset\",\n }\n : undefined,\n }),\n enableColumnResizing: tableLayoutOptions.hasColumnResizing,\n defaultColumn: {\n Cell: defaultCell,\n },\n enableRowActions:\n (hasRowReordering === true && onReorderRows) ||\n tableLayoutOptions.rowActionButtons ||\n tableLayoutOptions.rowActionMenuItems\n ? true\n : false,\n renderRowActions: ({ row }) => renderRowActions({ row }),\n enableRowOrdering: hasRowReordering && Boolean(onReorderRows),\n enableRowDragging: hasRowReordering && Boolean(onReorderRows),\n muiDetailPanelProps: ({ row }) => ({\n sx: {\n paddingBlock: row.getIsExpanded()\n ? `${odysseyDesignTokens.Spacing3} !important`\n : undefined,\n },\n }),\n muiTableBodyRowProps: ({ table, row, isDetailPanel }) => ({\n className: draggableTableBodyRowClassName({\n currentRowId: row.id,\n draggingRowId: draggingRow?.id,\n hoveredRowId: table.getState().hoveredRow?.id,\n }),\n sx: isDetailPanel\n ? {\n paddingBlock: \"0 !important\",\n border: 0,\n [\"&:hover\"]: {\n backgroundColor: `${odysseyDesignTokens.HueNeutralWhite} !important`,\n },\n }\n : {},\n }),\n muiRowDragHandleProps: ({ table, row }) => ({\n onKeyDown: (event) => handleDragHandleKeyDown({ table, row, event }),\n onBlur: () => resetDraggingAndHoveredRow(table),\n onDragEnd: () => handleDragHandleOnDragEnd(table),\n onDragCapture: () => handleDragHandleOnDragCapture(table),\n disabled: isRowReorderingDisabled,\n sx: dragHandleStyles,\n ...dragHandleText,\n }),\n renderDetailPanel: tableLayoutOptions.renderDetailPanel,\n enableRowVirtualization: enableVirtualization,\n muiTableHeadCellProps: ({ column: currentColumn }) => ({\n className: tableState.columnSorting.find(\n (sortedColumn) => sortedColumn.id === currentColumn.id,\n )\n ? \"isSorted\"\n : \"isUnsorted\",\n }),\n muiTableBodyCellProps: ({ column }) => ({\n className: column.getIsResizing() ? \"isResizing\" : \"\",\n }),\n enableSorting: tableLayoutOptions.hasSorting === true, // I don't know why this needs to be true, but it still works if undefined otherwise\n onSortingChange: (sortingUpdater) => {\n const newSortVal =\n typeof sortingUpdater === \"function\"\n ? sortingUpdater(tableState.columnSorting)\n : tableState.columnSorting;\n setTableState((prevState) => ({\n ...prevState,\n columnSorting: newSortVal,\n }));\n },\n enableRowSelection: hasRowSelection,\n onRowSelectionChange: setRowSelection,\n renderEmptyRowsFallback: emptyStateContainer,\n localization: {\n collapse: t(\"table.rowexpansion.collapse\"),\n collapseAll: t(\"table.rowexpansion.collapseall\"),\n expand: t(\"table.rowexpansion.expand\"),\n expandAll: t(\"table.rowexpansion.expandall\"),\n },\n });\n\n return (\n <ScrollableTableContainer\n isScrollableEnd={!isTableContainerScrolledToEnd}\n isScrollableStart={!isTableContainerScrolledToStart}\n odysseyDesignTokens={odysseyDesignTokens}\n ref={tableOuterContainerRef}\n >\n <MRT_TableContainer table={dataTable} />\n </ScrollableTableContainer>\n );\n};\n\nconst MemoizedTableLayoutContent = memo(\n TableLayoutContent,\n) as TableLayoutContentComponent;\nMemoizedTableLayoutContent.displayName = \"TableLayoutContent\";\n\nexport { MemoizedTableLayoutContent as TableLayoutContent };\n"],"mappings":";;;;;;AAYA,IAAAA,MAAA,GAAAC,OAAA;AAYA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,mBAAA,GAAAH,OAAA;AASA,IAAAI,aAAA,GAAAJ,OAAA;AAEA,IAAAK,MAAA,GAAAL,OAAA;AAOA,IAAAM,IAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AAOA,IAAAQ,eAAA,GAAAR,OAAA;AAKA,IAAAS,WAAA,GAAAT,OAAA;AACA,IAAAU,2BAAA,GAAAV,OAAA;AACA,IAAAW,oBAAA,GAAAX,OAAA;AAA6E,IAAAY,WAAA,GAAAZ,OAAA;AAAA,SAAAE,uB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CwK,oBAAoB,EAAE/J,eAAe;IACrCgK,uBAAuB,EAAEtF,mBAAmB;IAC5CuF,YAAY,EAAE;MACZC,QAAQ,EAAE3I,CAAC,CAAC,6BAA6B,CAAC;MAC1C4I,WAAW,EAAE5I,CAAC,CAAC,gCAAgC,CAAC;MAChD6I,MAAM,EAAE7I,CAAC,CAAC,2BAA2B,CAAC;MACtC8I,SAAS,EAAE9I,CAAC,CAAC,8BAA8B;IAC7C;EACF,CAAC,CAAC;EAEF,OACE,IAAAnD,WAAA,CAAAuE,GAAA,EAAC3E,eAAA,CAAAsM,wBAAwB;IACvBC,eAAe,EAAE,CAAC/J,6BAA8B;IAChDgK,iBAAiB,EAAE,CAACnK,+BAAgC;IACpDgB,mBAAmB,EAAEA,mBAAoB;IACzC0F,GAAG,EAAEjG,sBAAuB;IAAA8B,QAAA,EAE5B,IAAAxE,WAAA,CAAAuE,GAAA,EAAChF,mBAAA,CAAA8M,kBAAkB;MAACxC,KAAK,EAAE7C;IAAU,CAAE;EAAC,CAChB,CAAC;AAE/B,CAAC;AAED,MAAMsF,0BAA0B,GAAAC,OAAA,CAAA5L,kBAAA,GAAG,IAAA6L,WAAI,EACrC7L,kBACF,CAAgC;AAChC2L,0BAA0B,CAACG,WAAW,GAAG,oBAAoB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"TableLayoutContent.cjs","names":["_react","require","_styled","_interopRequireDefault","_materialReactTable","_reactI18next","_index","_Box","_index2","_tableConstants","_RowActions","_OdysseyDesignTokensContext","_useScrollIndication","_jsxRuntime","e","__esModule","default","TextWrapper","styled","whiteSpace","textOverflow","overflow","RowActionsContainer","display","TableLayoutContent","columns","data","draggingRow","emptyState","enableVirtualization","getRowId","hasRowReordering","hasRowSelection","isEmpty","isLoading","isNoResults","isRowReorderingDisabled","onReorderRows","pagination","rowReorderingUtilities","rowSelection","setRowSelection","setTableState","tableLayoutOptions","tableState","totalRows","isTableContainerScrolledToStart","setIsTableContainerScrolledToStart","useState","isTableContainerScrolledToEnd","setIsTableContainerScrolledToEnd","tableInnerContainerWidth","setTableInnerContainerWidth","shouldUpdateScroll","useRef","tableOuterContainerRef","tableInnerContainerRef","tableContentRef","useScrollIndication","tableInnerContainer","current","tableOuterContainer","odysseyDesignTokens","useOdysseyDesignTokens","t","useTranslation","columnIds","useMemo","map","column","accessorKey","columnOrder","filter","id","rowDensityClassName","rowDensity","defaultCell","useCallback","cell","value","getValue","hasTextWrapping","columnDef","enableWrapping","jsx","children","draggableTableBodyRowClassName","dragHandleStyles","dragHandleText","handleDragHandleKeyDown","handleDragHandleOnDragCapture","handleDragHandleOnDragEnd","resetDraggingAndHoveredRow","updateRowOrder","renderRowActions","row","currentIndex","index","pageIndex","pageSize","jsxs","rowActionButtons","rowActionMenuItems","MenuButton","ariaLabel","buttonVariant","endIcon","MoreIcon","menuAlignment","size","RowActions","rowIndex","undefined","innerWidthStyle","width","emptyStateContainer","Box","sx","useEffect","scrollTo","clientHeight","shouldDisplayRowActions","hasColumnWithGrow","some","grow","dataTable","useMaterialReactTable","state","sorting","columnSorting","columnVisibility","icons","ArrowDownwardIcon","ArrowDownIcon","DragHandleIcon","DragIndicatorIcon","SyncAltIcon","ArrowUnsortedIcon","ExpandMoreIcon","ChevronDownIcon","dataTableImmutableSettings","displayColumnDefOptions","header","muiTableBodyCellProps","align","className","muiTableHeadCellProps","visibility","Button","variant","isDisabled","muiTableProps","ref","hasColumnResizing","muiTableContainerProps","muiTableBodyProps","tabIndex","height","enableColumnResizing","defaultColumn","Cell","enableRowActions","enableRowOrdering","Boolean","enableRowDragging","muiDetailPanelProps","paddingBlock","getIsExpanded","Spacing3","muiTableBodyRowProps","table","isDetailPanel","currentRowId","draggingRowId","hoveredRowId","getState","hoveredRow","border","backgroundColor","HueNeutralWhite","muiRowDragHandleProps","onKeyDown","event","onBlur","onDragEnd","onDragCapture","disabled","renderDetailPanel","enableRowVirtualization","currentColumn","find","sortedColumn","getIsResizing","enableSorting","hasSorting","onSortingChange","sortingUpdater","newSortVal","prevState","enableRowSelection","onRowSelectionChange","renderEmptyRowsFallback","localization","collapse","collapseAll","expand","expandAll","ScrollableTableContainer","isScrollableEnd","isScrollableStart","MRT_TableContainer","MemoizedTableLayoutContent","exports","memo","displayName"],"sources":["../../../../src/labs/DataView/TableLayoutContent.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport {\n SetStateAction,\n memo,\n useCallback,\n useMemo,\n useRef,\n useState,\n ReactNode,\n Dispatch,\n ReactElement,\n useEffect,\n} from \"react\";\nimport styled, { CSSObject } from \"@emotion/styled\";\nimport {\n MRT_Row,\n MRT_RowData,\n MRT_RowSelectionState,\n MRT_TableContainer,\n MRT_TableInstance,\n MRT_TableOptions,\n useMaterialReactTable,\n} from \"material-react-table\";\nimport { useTranslation } from \"react-i18next\";\n\nimport {\n ArrowDownIcon,\n ArrowUnsortedIcon,\n ChevronDownIcon,\n DragIndicatorIcon,\n MoreIcon,\n} from \"../../icons.generated/index.js\";\nimport { Box } from \"../../Box.js\";\nimport { Button, MenuButton } from \"../../Buttons/index.js\";\nimport {\n TableLayoutProps,\n TableState,\n UniversalProps,\n} from \"./componentTypes.js\";\nimport { DataTableCell } from \"./dataTypes.js\";\nimport {\n dataTableImmutableSettings,\n displayColumnDefOptions,\n ScrollableTableContainer,\n} from \"./tableConstants.js\";\nimport { RowActions } from \"./RowActions.js\";\nimport { useOdysseyDesignTokens } from \"../../OdysseyDesignTokensContext.js\";\nimport { useScrollIndication } from \"../../DataTable/useScrollIndication.js\";\n\nconst TextWrapper = styled(\"div\")({\n whiteSpace: \"nowrap\",\n textOverflow: \"ellipsis\",\n overflow: \"hidden\",\n});\n\nconst RowActionsContainer = styled(\"div\")({\n display: \"flex\",\n});\n\nexport type TableLayoutContentProps<TData extends MRT_RowData> = {\n columns: TableLayoutProps<TData>[\"columns\"];\n data: MRT_RowData[];\n draggingRow?: MRT_Row<TData> | null;\n emptyState: ReactNode;\n enableVirtualization?: boolean;\n getRowId: UniversalProps<TData>[\"getRowId\"];\n hasRowReordering: UniversalProps<TData>[\"hasRowReordering\"];\n hasRowSelection: UniversalProps<TData>[\"hasRowSelection\"];\n isEmpty?: boolean;\n isLoading: boolean;\n isNoResults?: boolean;\n isRowReorderingDisabled?: boolean;\n onReorderRows: UniversalProps<TData>[\"onReorderRows\"];\n pagination: {\n pageIndex: number;\n pageSize: number;\n };\n rowReorderingUtilities: {\n dragHandleStyles: CSSObject;\n dragHandleText: {\n title: string;\n \"aria-label\": string;\n };\n draggableTableBodyRowClassName: ({\n currentRowId,\n draggingRowId,\n hoveredRowId,\n }: {\n currentRowId: string;\n draggingRowId?: string;\n hoveredRowId?: string;\n }) => string | undefined;\n handleDragHandleKeyDown: ({\n table,\n row,\n event,\n }: {\n table: MRT_TableInstance<TData>;\n row: MRT_Row<TData>;\n event: React.KeyboardEvent<HTMLButtonElement>;\n }) => void;\n handleDragHandleOnDragCapture: (table: MRT_TableInstance<TData>) => void;\n handleDragHandleOnDragEnd: (table: MRT_TableInstance<TData>) => void;\n resetDraggingAndHoveredRow: (table: MRT_TableInstance<TData>) => void;\n updateRowOrder: ({\n rowId,\n newRowIndex,\n }: {\n rowId: string;\n newRowIndex: number;\n }) => void;\n };\n rowSelection: MRT_RowSelectionState;\n setRowSelection: Dispatch<SetStateAction<MRT_RowSelectionState>>;\n setTableState: Dispatch<SetStateAction<TableState>>;\n tableLayoutOptions: TableLayoutProps<TData>;\n tableState: TableState;\n totalRows: UniversalProps<TData>[\"totalRows\"];\n};\n\ntype TableLayoutContentComponent = (<TData extends MRT_RowData>(\n props: TableLayoutContentProps<TData>,\n) => JSX.Element) & {\n displayName?: string;\n};\n\nconst TableLayoutContent = <TData extends MRT_RowData>({\n columns,\n data,\n draggingRow,\n emptyState,\n enableVirtualization,\n getRowId,\n hasRowReordering,\n hasRowSelection,\n isEmpty,\n isLoading,\n isNoResults,\n isRowReorderingDisabled,\n onReorderRows,\n pagination,\n rowReorderingUtilities,\n rowSelection,\n setRowSelection,\n setTableState,\n tableLayoutOptions,\n tableState,\n totalRows,\n}: TableLayoutContentProps<TData>) => {\n const [isTableContainerScrolledToStart, setIsTableContainerScrolledToStart] =\n useState(true);\n const [isTableContainerScrolledToEnd, setIsTableContainerScrolledToEnd] =\n useState(true);\n const [tableInnerContainerWidth, setTableInnerContainerWidth] =\n useState<string>(\"100%\");\n const shouldUpdateScroll = useRef<boolean>(false);\n const tableOuterContainerRef = useRef<HTMLDivElement>(null);\n const tableInnerContainerRef = useRef<HTMLDivElement>(null);\n const tableContentRef = useRef<HTMLTableElement>(null);\n\n useScrollIndication({\n setIsTableContainerScrolledToEnd: setIsTableContainerScrolledToEnd,\n setIsTableContainerScrolledToStart: setIsTableContainerScrolledToStart,\n setTableInnerContainerWidth: setTableInnerContainerWidth,\n tableInnerContainer: tableInnerContainerRef.current,\n tableOuterContainer: tableOuterContainerRef.current,\n });\n\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const { t } = useTranslation();\n\n const columnIds = useMemo(() => {\n return columns.map((column) => column.accessorKey) ?? [];\n }, [columns]);\n\n const columnOrder = useMemo(\n () => [\n \"mrt-row-drag\",\n \"mrt-row-select\",\n \"mrt-row-expand\",\n ...(columnIds?.filter((id): id is string => typeof id === \"string\") ||\n []),\n \"mrt-row-actions\",\n ],\n [columnIds],\n );\n\n const rowDensityClassName = useMemo(() => {\n return tableState.rowDensity === \"spacious\"\n ? \"MuiTableBody-spacious\"\n : tableState.rowDensity === \"compact\"\n ? \"MuiTableBody-compact\"\n : \"MuiTableBody-default\";\n }, [tableState]);\n\n const defaultCell = useCallback<\n ({ cell }: { cell: DataTableCell<TData, unknown> }) => ReactElement | string\n >(({ cell }) => {\n const value = cell.getValue<string>();\n const hasTextWrapping =\n cell.column.columnDef.hasTextWrapping ||\n cell.column.columnDef.enableWrapping;\n return hasTextWrapping ? value : <TextWrapper>{value}</TextWrapper>;\n }, []);\n\n const {\n draggableTableBodyRowClassName,\n dragHandleStyles,\n dragHandleText,\n handleDragHandleKeyDown,\n handleDragHandleOnDragCapture,\n handleDragHandleOnDragEnd,\n resetDraggingAndHoveredRow,\n updateRowOrder,\n } = rowReorderingUtilities;\n\n const renderRowActions = useCallback(\n ({ row }: { row: MRT_Row<TData> }) => {\n const currentIndex =\n row.index + (pagination.pageIndex - 1) * pagination.pageSize;\n return (\n <RowActionsContainer>\n {tableLayoutOptions.rowActionButtons?.(row)}\n {(tableLayoutOptions.rowActionMenuItems || hasRowReordering) && (\n <MenuButton\n ariaLabel={t(\"table.moreactions.arialabel\")}\n buttonVariant=\"floating\"\n endIcon={<MoreIcon />}\n menuAlignment=\"right\"\n size=\"small\"\n >\n <RowActions\n isRowReorderingDisabled={isRowReorderingDisabled}\n row={\n row as unknown as MRT_Row<MRT_RowData> // TODO: FIX THIS! The types are wrong. `row` is incorrectly set in `RowActions` to not be TData.\n }\n rowActionMenuItems={\n // TODO: FIX THIS! The types are wrong. `row` is incorrectly set in `RowActions` to not be TData.\n tableLayoutOptions.rowActionMenuItems as unknown as (\n row: MRT_Row<MRT_RowData>,\n ) => any // eslint-disable-line @typescript-eslint/no-explicit-any\n }\n rowIndex={currentIndex}\n totalRows={totalRows}\n updateRowOrder={\n hasRowReordering && onReorderRows ? updateRowOrder : undefined\n }\n />\n </MenuButton>\n )}\n </RowActionsContainer>\n );\n },\n [\n hasRowReordering,\n isRowReorderingDisabled,\n onReorderRows,\n pagination.pageIndex,\n pagination.pageSize,\n t,\n tableLayoutOptions,\n totalRows,\n updateRowOrder,\n ],\n );\n\n const innerWidthStyle = useMemo(\n () => ({ width: tableInnerContainerWidth }),\n [tableInnerContainerWidth],\n );\n\n const emptyStateContainer = useCallback(\n () => <Box sx={innerWidthStyle}>{emptyState}</Box>,\n [innerWidthStyle, emptyState],\n );\n\n // Scroll to the bottom as soon as data loads after clicking the\n // loadMore pagination button\n useEffect(() => {\n if (enableVirtualization) {\n shouldUpdateScroll.current = true;\n }\n }, [enableVirtualization, pagination]);\n\n useEffect(() => {\n if (\n shouldUpdateScroll.current &&\n tableContentRef.current &&\n typeof tableInnerContainerRef.current?.scrollTo !== \"undefined\"\n ) {\n tableInnerContainerRef.current?.scrollTo(\n 0,\n tableContentRef.current.clientHeight,\n );\n shouldUpdateScroll.current = false;\n }\n }, [data]);\n\n const shouldDisplayRowActions = useMemo(\n () =>\n (hasRowReordering === true && onReorderRows) ||\n tableLayoutOptions.rowActionButtons ||\n tableLayoutOptions.rowActionMenuItems\n ? true\n : false,\n [\n hasRowReordering,\n onReorderRows,\n tableLayoutOptions.rowActionButtons,\n tableLayoutOptions.rowActionMenuItems,\n ],\n );\n\n const hasColumnWithGrow = columns.some((column) => column.grow === true);\n\n const dataTable = useMaterialReactTable<TData>({\n data: (!isEmpty && !isNoResults ? data : []) as TData[],\n columns,\n getRowId,\n state: {\n sorting: tableState.columnSorting,\n columnVisibility: tableState.columnVisibility,\n isLoading,\n rowSelection,\n columnOrder,\n },\n icons: {\n ArrowDownwardIcon: ArrowDownIcon,\n DragHandleIcon: DragIndicatorIcon,\n SyncAltIcon: ArrowUnsortedIcon,\n ExpandMoreIcon: ChevronDownIcon,\n },\n ...dataTableImmutableSettings,\n displayColumnDefOptions: {\n ...(displayColumnDefOptions satisfies Partial<\n MRT_TableOptions<MRT_RowData>[\"displayColumnDefOptions\"]\n >),\n \"mrt-row-actions\": {\n header: \"\",\n grow: !hasColumnWithGrow,\n muiTableBodyCellProps: {\n align: \"right\" as const,\n sx: {\n overflow: \"visible\",\n width: \"unset\",\n },\n className: \"ods-actions-cell\",\n },\n muiTableHeadCellProps: {\n align: \"right\" as const,\n sx: {\n width: \"unset\",\n },\n className: \"ods-actions-cell\",\n children: (\n <Box sx={{ display: \"flex\", visibility: \"hidden\" }}>\n {tableLayoutOptions.rowActionButtons &&\n // @ts-expect-error TODO: This type is wrong and needs to be fixed\n tableLayoutOptions.rowActionButtons({ id: null })}\n {((hasRowReordering === true && onReorderRows) ||\n tableLayoutOptions.rowActionMenuItems) && (\n <Box>\n <Button\n endIcon={<MoreIcon />}\n size=\"small\"\n variant=\"floating\"\n ariaLabel={t(\"table.moreactions.arialabel\")}\n isDisabled\n />\n </Box>\n )}\n </Box>\n ),\n },\n },\n },\n muiTableProps: {\n ref: tableContentRef,\n className:\n !shouldDisplayRowActions && tableLayoutOptions.hasColumnResizing\n ? hasColumnWithGrow\n ? \"ods-hide-spacer-column\"\n : \"ods-hide-spacer-column ods-column-grow\"\n : \"\",\n },\n muiTableContainerProps: {\n ref: tableInnerContainerRef,\n },\n muiTableBodyProps: () => ({\n className: rowDensityClassName,\n tabIndex: 0,\n /**\n * This is a fix for an issue related to the empty state creating a\n * vertical scrollbar when virtualization is enabled. The root cause\n * is tablebody having height: 0 when virtualization is enabled and there\n * being no data\n * https://okta.slack.com/archives/C7T2H3KNJ/p1742842106148929\n */\n sx:\n isEmpty || isNoResults\n ? {\n height: \"unset\",\n }\n : undefined,\n }),\n enableColumnResizing: tableLayoutOptions.hasColumnResizing,\n defaultColumn: {\n Cell: defaultCell,\n },\n enableRowActions:\n (hasRowReordering === true && onReorderRows) ||\n tableLayoutOptions.rowActionButtons ||\n tableLayoutOptions.rowActionMenuItems\n ? true\n : false,\n renderRowActions: ({ row }) => renderRowActions({ row }),\n enableRowOrdering: hasRowReordering && Boolean(onReorderRows),\n enableRowDragging: hasRowReordering && Boolean(onReorderRows),\n muiDetailPanelProps: ({ row }) => ({\n sx: {\n paddingBlock: row.getIsExpanded()\n ? `${odysseyDesignTokens.Spacing3} !important`\n : undefined,\n },\n }),\n muiTableBodyRowProps: ({ table, row, isDetailPanel }) => ({\n className: draggableTableBodyRowClassName({\n currentRowId: row.id,\n draggingRowId: draggingRow?.id,\n hoveredRowId: table.getState().hoveredRow?.id,\n }),\n sx: isDetailPanel\n ? {\n paddingBlock: \"0 !important\",\n border: 0,\n [\"&:hover\"]: {\n backgroundColor: `${odysseyDesignTokens.HueNeutralWhite} !important`,\n },\n }\n : {},\n }),\n muiRowDragHandleProps: ({ table, row }) => ({\n onKeyDown: (event) => handleDragHandleKeyDown({ table, row, event }),\n onBlur: () => resetDraggingAndHoveredRow(table),\n onDragEnd: () => handleDragHandleOnDragEnd(table),\n onDragCapture: () => handleDragHandleOnDragCapture(table),\n disabled: isRowReorderingDisabled,\n sx: dragHandleStyles,\n ...dragHandleText,\n }),\n renderDetailPanel: tableLayoutOptions.renderDetailPanel,\n enableRowVirtualization: enableVirtualization,\n muiTableHeadCellProps: ({ column: currentColumn }) => ({\n className: tableState.columnSorting.find(\n (sortedColumn) => sortedColumn.id === currentColumn.id,\n )\n ? \"isSorted\"\n : \"isUnsorted\",\n }),\n muiTableBodyCellProps: ({ column }) => ({\n className: column.getIsResizing() ? \"isResizing\" : \"\",\n }),\n enableSorting: tableLayoutOptions.hasSorting === true, // I don't know why this needs to be true, but it still works if undefined otherwise\n onSortingChange: (sortingUpdater) => {\n const newSortVal =\n typeof sortingUpdater === \"function\"\n ? sortingUpdater(tableState.columnSorting)\n : tableState.columnSorting;\n setTableState((prevState) => ({\n ...prevState,\n columnSorting: newSortVal,\n }));\n },\n enableRowSelection: hasRowSelection,\n onRowSelectionChange: setRowSelection,\n renderEmptyRowsFallback: emptyStateContainer,\n localization: {\n collapse: t(\"table.rowexpansion.collapse\"),\n collapseAll: t(\"table.rowexpansion.collapseall\"),\n expand: t(\"table.rowexpansion.expand\"),\n expandAll: t(\"table.rowexpansion.expandall\"),\n },\n });\n\n return (\n <ScrollableTableContainer\n isScrollableEnd={!isTableContainerScrolledToEnd}\n isScrollableStart={!isTableContainerScrolledToStart}\n odysseyDesignTokens={odysseyDesignTokens}\n ref={tableOuterContainerRef}\n >\n <MRT_TableContainer table={dataTable} />\n </ScrollableTableContainer>\n );\n};\n\nconst MemoizedTableLayoutContent = memo(\n TableLayoutContent,\n) as TableLayoutContentComponent;\nMemoizedTableLayoutContent.displayName = \"TableLayoutContent\";\n\nexport { MemoizedTableLayoutContent as TableLayoutContent };\n"],"mappings":";;;;;;AAYA,IAAAA,MAAA,GAAAC,OAAA;AAYA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,mBAAA,GAAAH,OAAA;AASA,IAAAI,aAAA,GAAAJ,OAAA;AAEA,IAAAK,MAAA,GAAAL,OAAA;AAOA,IAAAM,IAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AAOA,IAAAQ,eAAA,GAAAR,OAAA;AAKA,IAAAS,WAAA,GAAAT,OAAA;AACA,IAAAU,2BAAA,GAAAV,OAAA;AACA,IAAAW,oBAAA,GAAAX,OAAA;AAA6E,IAAAY,WAAA,GAAAZ,OAAA;AAAA,SAAAE,uBAAAW,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AA1D7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAkDA,MAAMG,WAAW,GAAG,IAAAC,eAAM,EAAC,KAAK,CAAC,CAAC;EAChCC,UAAU,EAAE,QAAQ;EACpBC,YAAY,EAAE,UAAU;EACxBC,QAAQ,EAAE;AACZ,CAAC,CAAC;AAEF,MAAMC,mBAAmB,GAAG,IAAAJ,eAAM,EAAC,KAAK,CAAC,CAAC;EACxCK,OAAO,EAAE;AACX,CAAC,CAAC;AAqEF,MAAMC,kBAAkB,GAAGA,CAA4B;EACrDC,OAAO;EACPC,IAAI;EACJC,WAAW;EACXC,UAAU;EACVC,oBAAoB;EACpBC,QAAQ;EACRC,gBAAgB;EAChBC,eAAe;EACfC,OAAO;EACPC,SAAS;EACT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AAE;EAAC,CAChB,CAAC;AAE/B,CAAC;AAED,MAAMsF,0BAA0B,GAAAC,OAAA,CAAA5L,kBAAA,GAAG,IAAA6L,WAAI,EACrC7L,kBACF,CAAgC;AAChC2L,0BAA0B,CAACG,WAAW,GAAG,oBAAoB","ignoreList":[]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.linkVariantValues = exports.DocumentationLink = void 0;
|
|
7
|
+
var _Link2 = _interopRequireDefault(require("@mui/material/Link"));
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
/*!
|
|
12
|
+
* Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
13
|
+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
14
|
+
*
|
|
15
|
+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
16
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
17
|
+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
18
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
19
|
+
*
|
|
20
|
+
* See the License for the specific language governing permissions and limitations under the License.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
const linkVariantValues = exports.linkVariantValues = ["default", "monochrome"];
|
|
24
|
+
const DocumentationLink = ({
|
|
25
|
+
children,
|
|
26
|
+
href,
|
|
27
|
+
icon,
|
|
28
|
+
target
|
|
29
|
+
}) => {
|
|
30
|
+
return (0, _jsxRuntime.jsxs)(_Link2.default, {
|
|
31
|
+
href: href,
|
|
32
|
+
target: target,
|
|
33
|
+
children: [icon && (0, _jsxRuntime.jsx)("span", {
|
|
34
|
+
className: "Link-icon",
|
|
35
|
+
children: icon
|
|
36
|
+
}), children]
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
const MemoizedDocumentationLink = exports.DocumentationLink = (0, _react.memo)(DocumentationLink);
|
|
40
|
+
MemoizedDocumentationLink.displayName = "DocumentationLink";
|
|
41
|
+
//# sourceMappingURL=DocumentationLink.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocumentationLink.cjs","names":["_react","require","_jsxRuntime","_interopRequireDefault","e","__esModule","default","linkVariantValues","exports","DocumentationLink","children","href","icon","target","jsxs","_Link2","jsx","className","MemoizedDocumentationLink","memo","displayName"],"sources":["../../../../src/labs/PageTemplate/DocumentationLink.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { memo, ReactElement, ReactNode } from \"react\";\n\nimport { Link as MuiLink } from \"@mui/material\";\n\nexport const linkVariantValues = [\"default\", \"monochrome\"] as const;\n\nexport type DocumentationLinkProps = {\n /**\n * The content within the Link\n */\n children: ReactNode;\n /**\n * The Link destination\n */\n href: string;\n /**\n * An optional Icon component at the start of the Link\n */\n icon?: ReactElement;\n /**\n * The HTML `target` attribute for the Link\n */\n target?:\n | \"_self\"\n | \"_blank\"\n | \"_parent\"\n | \"_top\"\n | (string & NonNullable<unknown>);\n};\n\nconst DocumentationLink = ({\n children,\n href,\n icon,\n target,\n}: DocumentationLinkProps) => {\n return (\n <MuiLink href={href} target={target}>\n {icon && <span className=\"Link-icon\">{icon}</span>}\n\n {children}\n </MuiLink>\n );\n};\n\nconst MemoizedDocumentationLink = memo(DocumentationLink);\n\nMemoizedDocumentationLink.displayName = \"DocumentationLink\";\n\nexport { MemoizedDocumentationLink as DocumentationLink };\n"],"mappings":";;;;;;;AAYA,IAAAA,MAAA,GAAAC,OAAA;AAAsD,IAAAC,WAAA,GAAAD,OAAA;AAAA,SAAAE,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAZtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMO,MAAMG,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG,CAAC,SAAS,EAAE,YAAY,CAAU;AA0BnE,MAAME,iBAAiB,GAAGA,CAAC;EACzBC,QAAQ;EACRC,IAAI;EACJC,IAAI;EACJC;AACsB,CAAC,KAAK;EAC5B,OACE,IAAAX,WAAA,CAAAY,IAAA,EAAAC,MAAA,CAAAT,OAAA;IAASK,IAAI,EAAEA,IAAK;IAACE,MAAM,EAAEA,MAAO;IAAAH,QAAA,GACjCE,IAAI,IAAI,IAAAV,WAAA,CAAAc,GAAA;MAAMC,SAAS,EAAC,WAAW;MAAAP,QAAA,EAAEE;IAAI,CAAO,CAAC,EAEjDF,QAAQ;EAAA,CACF,CAAC;AAEd,CAAC;AAED,MAAMQ,yBAAyB,GAAAV,OAAA,CAAAC,iBAAA,GAAG,IAAAU,WAAI,EAACV,iBAAiB,CAAC;AAEzDS,yBAAyB,CAACE,WAAW,GAAG,mBAAmB","ignoreList":[]}
|
|
@@ -7,7 +7,7 @@ exports.PageTemplate = void 0;
|
|
|
7
7
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _index = require("../../icons.generated/index.cjs");
|
|
10
|
-
var
|
|
10
|
+
var _DocumentationLink = require("./DocumentationLink.cjs");
|
|
11
11
|
var _OdysseyDesignTokensContext = require("../../OdysseyDesignTokensContext.cjs");
|
|
12
12
|
var _Typography = require("../../Typography.cjs");
|
|
13
13
|
var _useHasUiShell = require("../../ui-shell/useHasUiShell.cjs");
|
|
@@ -36,12 +36,22 @@ const TemplateContainer = (0, _styled.default)("div", {
|
|
|
36
36
|
marginInline: isFullWidth && !hasUiShell ? odysseyDesignTokens.Spacing6 : "auto",
|
|
37
37
|
padding: hasUiShell ? 0 : odysseyDesignTokens.Spacing6
|
|
38
38
|
}));
|
|
39
|
-
const TemplateHeader = (0, _styled.default)("div"
|
|
39
|
+
const TemplateHeader = (0, _styled.default)("div", {
|
|
40
|
+
shouldForwardProp: prop => prop !== "odysseyDesignTokens"
|
|
41
|
+
})(({
|
|
42
|
+
odysseyDesignTokens
|
|
43
|
+
}) => ({
|
|
40
44
|
display: "flex",
|
|
41
|
-
alignItems: "flex-
|
|
42
|
-
justifyContent: "space-between"
|
|
45
|
+
alignItems: "flex-start",
|
|
46
|
+
justifyContent: "space-between",
|
|
47
|
+
gap: odysseyDesignTokens.Spacing4
|
|
43
48
|
}));
|
|
44
|
-
const TemplateHeaderPrimaryContent = (0, _styled.default)("div"
|
|
49
|
+
const TemplateHeaderPrimaryContent = (0, _styled.default)("div", {
|
|
50
|
+
shouldForwardProp: prop => prop !== "odysseyDesignTokens"
|
|
51
|
+
})(({
|
|
52
|
+
odysseyDesignTokens
|
|
53
|
+
}) => ({
|
|
54
|
+
maxWidth: odysseyDesignTokens.TypographyLineLengthMax,
|
|
45
55
|
[".MuiTypography-root:last-child"]: {
|
|
46
56
|
marginBlockEnd: "0"
|
|
47
57
|
}
|
|
@@ -54,9 +64,10 @@ const TemplateHeaderSecondaryContent = (0, _styled.default)("div", {
|
|
|
54
64
|
alignItems: "flex-end",
|
|
55
65
|
display: "flex",
|
|
56
66
|
flexDirection: "column",
|
|
57
|
-
gap: odysseyDesignTokens.
|
|
67
|
+
gap: odysseyDesignTokens.Spacing4,
|
|
58
68
|
minHeight: odysseyDesignTokens.Spacing7,
|
|
59
|
-
justifyContent: "center"
|
|
69
|
+
justifyContent: "center",
|
|
70
|
+
whiteSpace: "nowrap"
|
|
60
71
|
}));
|
|
61
72
|
const TemplateHeaderButtons = (0, _styled.default)("div", {
|
|
62
73
|
shouldForwardProp: prop => prop !== "odysseyDesignTokens"
|
|
@@ -119,7 +130,9 @@ const PageTemplate = ({
|
|
|
119
130
|
isFullWidth: isFullWidth,
|
|
120
131
|
odysseyDesignTokens: odysseyDesignTokens,
|
|
121
132
|
children: [(0, _jsxRuntime.jsxs)(TemplateHeader, {
|
|
133
|
+
odysseyDesignTokens: odysseyDesignTokens,
|
|
122
134
|
children: [(0, _jsxRuntime.jsxs)(TemplateHeaderPrimaryContent, {
|
|
135
|
+
odysseyDesignTokens: odysseyDesignTokens,
|
|
123
136
|
children: [title && (0, _jsxRuntime.jsx)(_Typography.Heading4, {
|
|
124
137
|
children: title
|
|
125
138
|
}), description && (0, _jsxRuntime.jsx)(_Typography.Subordinate, {
|
|
@@ -127,9 +140,10 @@ const PageTemplate = ({
|
|
|
127
140
|
})]
|
|
128
141
|
}), (0, _jsxRuntime.jsxs)(TemplateHeaderSecondaryContent, {
|
|
129
142
|
odysseyDesignTokens: odysseyDesignTokens,
|
|
130
|
-
children: [documentationLink && (0, _jsxRuntime.jsx)(
|
|
143
|
+
children: [documentationLink && (0, _jsxRuntime.jsx)(_DocumentationLink.DocumentationLink, {
|
|
131
144
|
href: documentationLink,
|
|
132
145
|
icon: (0, _jsxRuntime.jsx)(_index.DocumentationIcon, {}),
|
|
146
|
+
target: "_blank",
|
|
133
147
|
children: documentationText
|
|
134
148
|
}), (primaryCallToActionComponent || secondaryCallToActionComponent || tertiaryCallToActionComponent) && (0, _jsxRuntime.jsxs)(TemplateHeaderButtons, {
|
|
135
149
|
odysseyDesignTokens: odysseyDesignTokens,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageTemplate.cjs","names":["_styled","_interopRequireDefault","require","_react","_index","_Link","_OdysseyDesignTokensContext","_Typography","_useHasUiShell","_jsxRuntime","e","__esModule","default","TemplateContainer","styled","shouldForwardProp","prop","hasUiShell","isFullWidth","odysseyDesignTokens","maxWidth","Spacing6","marginInline","padding","TemplateHeader","display","alignItems","justifyContent","TemplateHeaderPrimaryContent","marginBlockEnd","TemplateHeaderSecondaryContent","flexDirection","gap","Spacing2","minHeight","Spacing7","TemplateHeaderButtons","TemplateContent","includes","isDrawerOpen","drawerVariant","gridTemplateColumns","gridGap","Spacing4","marginBlock","animation","PageTemplate","children","description","documentationLink","documentationText","drawer","primaryCallToActionComponent","secondaryCallToActionComponent","tertiaryCallToActionComponent","title","useOdysseyDesignTokens","isOpen","variant","props","useHasUiShell","jsxs","jsx","Heading4","Subordinate","Link","href","icon","DocumentationIcon","MemoizedPageTemplate","exports","memo","displayName"],"sources":["../../../../src/labs/PageTemplate/PageTemplate.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport styled from \"@emotion/styled\";\nimport { memo, ReactElement, ReactNode } from \"react\";\n\nimport { DrawerProps } from \"../../Drawer.js\";\nimport { DocumentationIcon } from \"../../icons.generated/index.js\";\nimport { Link } from \"../../Link.js\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"../../OdysseyDesignTokensContext.js\";\nimport { Heading4, Subordinate } from \"../../Typography.js\";\nimport { useHasUiShell } from \"../../ui-shell/useHasUiShell.js\";\n\nexport type PageTemplateProps = {\n /**\n * The title of the layout to be situated in the layout header\n */\n title?: string;\n /**\n * A supplementary description to be situated in the layout header\n */\n description?: string;\n /**\n * The destination for a documentation `Link` to be situated in the layout header\n */\n documentationLink?: string;\n /**\n * The text for a documentation `Link` to be situated in the layout header\n */\n documentationText?: string;\n /**\n * An optional `Drawer` object. Can be of variant 'temporary' or 'persistent'.\n */\n drawer?: ReactElement<DrawerProps>;\n /**\n * An optional `Button` object to be situated in the layout header. Should almost always be of variant `primary`.\n */\n primaryCallToActionComponent?: ReactElement;\n /**\n * An optional `Button` object to be situated in the layout header, alongside the `callToActionPrimaryComponent`.\n */\n secondaryCallToActionComponent?: ReactElement;\n /**\n * An optional `Button` object to be situated in the layout header, alongside the other two `callToAction` components.\n */\n tertiaryCallToActionComponent?: ReactElement;\n /**\n * The content of the layout. May be a `string` or any other `ReactNode` or array of `ReactNode`s. Will often be `Grid` objects.\n */\n children?: ReactNode;\n /**\n * When set to `true`, the layout expands past its max width of 1440px and spans the entire available screen width.\n */\n isFullWidth?: boolean;\n};\n\ntype TemplateContentProps = {\n odysseyDesignTokens: DesignTokens;\n isDrawerOpen?: boolean;\n drawerVariant?: string;\n};\n\nconst TemplateContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" &&\n prop !== \"hasUiShell\" &&\n prop !== \"isFullWidth\",\n})<{\n hasUiShell: boolean;\n isFullWidth: boolean;\n odysseyDesignTokens: DesignTokens;\n}>(({ hasUiShell, isFullWidth, odysseyDesignTokens }) => ({\n maxWidth: isFullWidth\n ? \"100%\"\n : `calc(1440px + ${odysseyDesignTokens.Spacing6} + ${odysseyDesignTokens.Spacing6})`,\n marginInline:\n isFullWidth && !hasUiShell ? odysseyDesignTokens.Spacing6 : \"auto\",\n padding: hasUiShell ? 0 : odysseyDesignTokens.Spacing6,\n}));\n\nconst TemplateHeader = styled(\"div\")(() => ({\n display: \"flex\",\n alignItems: \"flex-end\",\n justifyContent: \"space-between\",\n}));\n\nconst TemplateHeaderPrimaryContent = styled(\"div\")(() => ({\n [\".MuiTypography-root:last-child\"]: {\n marginBlockEnd: \"0\",\n },\n}));\n\nconst TemplateHeaderSecondaryContent = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens }) => ({\n alignItems: \"flex-end\",\n display: \"flex\",\n flexDirection: \"column\",\n gap: odysseyDesignTokens.Spacing2,\n minHeight: odysseyDesignTokens.Spacing7,\n justifyContent: \"center\",\n}));\n\nconst TemplateHeaderButtons = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens }) => ({\n display: \"flex\",\n gap: odysseyDesignTokens.Spacing2,\n}));\n\nconst TemplateContent = styled(\"div\", {\n shouldForwardProp: (prop) =>\n ![\"odysseyDesignTokens\", \"isDrawerOpen\", \"drawerVariant\"].includes(prop),\n})<TemplateContentProps>(\n ({ odysseyDesignTokens, isDrawerOpen, drawerVariant }) => ({\n \"@keyframes animate-drawer-open\": {\n \"0%\": {\n gridTemplateColumns: \"minmax(0, 1fr) 0\",\n },\n \"100%\": {\n gridTemplateColumns: \"minmax(0, 1fr) 360px\",\n },\n },\n \"@keyframes animate-drawer-close\": {\n \"0%\": {\n gridTemplateColumns: \"minmax(0, 1fr) 360px\",\n },\n \"100%\": {\n gridTemplateColumns: \"minmax(0, 1fr) 0\",\n },\n },\n display: \"grid\",\n gridGap:\n drawerVariant === \"persistent\" && !isDrawerOpen\n ? 0\n : odysseyDesignTokens.Spacing4,\n gap:\n drawerVariant === \"persistent\" && !isDrawerOpen\n ? 0\n : odysseyDesignTokens.Spacing4,\n marginBlock: odysseyDesignTokens.Spacing4,\n gridTemplateColumns:\n drawerVariant === \"persistent\"\n ? isDrawerOpen\n ? \"minmax(0, 1fr) 360px\"\n : \"minmax(0, 1fr) 0\"\n : \"minmax(0, 1fr)\",\n animation:\n drawerVariant === \"persistent\" && isDrawerOpen\n ? \"animate-drawer-open 225ms cubic-bezier(0, 0, 0.2, 1)\"\n : \"animate-drawer-close 225ms cubic-bezier(0, 0, 0.2, 1)\",\n }),\n);\n\nconst PageTemplate = ({\n children,\n description,\n documentationLink,\n documentationText,\n drawer,\n isFullWidth = false,\n primaryCallToActionComponent,\n secondaryCallToActionComponent,\n tertiaryCallToActionComponent,\n title,\n}: PageTemplateProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const { isOpen: isDrawerOpen, variant: drawerVariant } = drawer?.props ?? {};\n\n const hasUiShell = useHasUiShell();\n\n return (\n <TemplateContainer\n hasUiShell={hasUiShell}\n isFullWidth={isFullWidth}\n odysseyDesignTokens={odysseyDesignTokens}\n >\n <TemplateHeader>\n <TemplateHeaderPrimaryContent>\n {title && <Heading4>{title}</Heading4>}\n {description && <Subordinate>{description}</Subordinate>}\n </TemplateHeaderPrimaryContent>\n\n <TemplateHeaderSecondaryContent\n odysseyDesignTokens={odysseyDesignTokens}\n >\n {documentationLink && (\n <Link href={documentationLink} icon={<DocumentationIcon />}>\n {documentationText}\n </Link>\n )}\n {(primaryCallToActionComponent ||\n secondaryCallToActionComponent ||\n tertiaryCallToActionComponent) && (\n <TemplateHeaderButtons odysseyDesignTokens={odysseyDesignTokens}>\n {tertiaryCallToActionComponent}\n {secondaryCallToActionComponent}\n {primaryCallToActionComponent}\n </TemplateHeaderButtons>\n )}\n </TemplateHeaderSecondaryContent>\n </TemplateHeader>\n <TemplateContent\n odysseyDesignTokens={odysseyDesignTokens}\n isDrawerOpen={isDrawerOpen}\n drawerVariant={drawerVariant}\n >\n {children}\n {drawer}\n </TemplateContent>\n </TemplateContainer>\n );\n};\n\nconst MemoizedPageTemplate = memo(PageTemplate);\nMemoizedPageTemplate.displayName = \"PageTemplate\";\n\nexport { MemoizedPageTemplate as PageTemplate };\n"],"mappings":";;;;;;AAYA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAGA,IAAAE,MAAA,GAAAF,OA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AAC;MAAA,CAC5B,CAAC,EAE/B,IAAAvC,WAAA,CAAAoD,IAAA,EAAC/B,8BAA8B;QAC7BX,mBAAmB,EAAEA,mBAAoB;QAAA4B,QAAA,GAExCE,iBAAiB,IAChB,IAAAxC,WAAA,CAAAqD,GAAA,EAACzD,KAAA,CAAA4D,IAAI;UAACC,IAAI,EAAEjB,iBAAkB;UAACkB,IAAI,EAAE,IAAA1D,WAAA,CAAAqD,GAAA,EAAC1D,MAAA,CAAAgE,iBAAiB,IAAE,CAAE;UAAArB,QAAA,EACxDG;QAAiB,CACd,CACP,EACA,CAACE,4BAA4B,IAC5BC,8BAA8B,IAC9BC,6BAA6B,KAC7B,IAAA7C,WAAA,CAAAoD,IAAA,EAACzB,qBAAqB;UAACjB,mBAAmB,EAAEA,mBAAoB;UAAA4B,QAAA,GAC7DO,6BAA6B,EAC7BD,8BAA8B,EAC9BD,4BAA4B;QAAA,CACR,CACxB;MAAA,CAC6B,CAAC;IAAA,CACnB,CAAC,EACjB,IAAA3C,WAAA,CAAAoD,IAAA,EAACxB,eAAe;MACdlB,mBAAmB,EAAEA,mBAAoB;MACzCoB,YAAY,EAAEA,YAAa;MAC3BC,aAAa,EAAEA,aAAc;MAAAO,QAAA,GAE5BA,QAAQ,EACRI,MAAM;IAAA,CACQ,CAAC;EAAA,CACD,CAAC;AAExB,CAAC;AAED,MAAMkB,oBAAoB,GAAAC,OAAA,CAAAxB,YAAA,GAAG,IAAAyB,WAAI,EAACzB,YAAY,CAAC;AAC/CuB,oBAAoB,CAACG,WAAW,GAAG,cAAc","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"PageTemplate.cjs","names":["_styled","_interopRequireDefault","require","_react","_index","_DocumentationLink","_OdysseyDesignTokensContext","_Typography","_useHasUiShell","_jsxRuntime","e","__esModule","default","TemplateContainer","styled","shouldForwardProp","prop","hasUiShell","isFullWidth","odysseyDesignTokens","maxWidth","Spacing6","marginInline","padding","TemplateHeader","display","alignItems","justifyContent","gap","Spacing4","TemplateHeaderPrimaryContent","TypographyLineLengthMax","marginBlockEnd","TemplateHeaderSecondaryContent","flexDirection","minHeight","Spacing7","whiteSpace","TemplateHeaderButtons","Spacing2","TemplateContent","includes","isDrawerOpen","drawerVariant","gridTemplateColumns","gridGap","marginBlock","animation","PageTemplate","children","description","documentationLink","documentationText","drawer","primaryCallToActionComponent","secondaryCallToActionComponent","tertiaryCallToActionComponent","title","useOdysseyDesignTokens","isOpen","variant","props","useHasUiShell","jsxs","jsx","Heading4","Subordinate","DocumentationLink","href","icon","DocumentationIcon","target","MemoizedPageTemplate","exports","memo","displayName"],"sources":["../../../../src/labs/PageTemplate/PageTemplate.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport styled from \"@emotion/styled\";\nimport { memo, ReactElement, ReactNode } from \"react\";\n\nimport { DrawerProps } from \"../../Drawer.js\";\nimport { DocumentationIcon } from \"../../icons.generated/index.js\";\nimport { DocumentationLink } from \"./DocumentationLink.js\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"../../OdysseyDesignTokensContext.js\";\nimport { Heading4, Subordinate } from \"../../Typography.js\";\nimport { useHasUiShell } from \"../../ui-shell/useHasUiShell.js\";\n\nexport type PageTemplateProps = {\n /**\n * The title of the layout to be situated in the layout header\n */\n title?: string;\n /**\n * A supplementary description to be situated in the layout header\n */\n description?: string;\n /**\n * The destination for a documentation `Link` to be situated in the layout header\n */\n documentationLink?: string;\n /**\n * The text for a documentation `Link` to be situated in the layout header\n */\n documentationText?: string;\n /**\n * An optional `Drawer` object. Can be of variant 'temporary' or 'persistent'.\n */\n drawer?: ReactElement<DrawerProps>;\n /**\n * An optional `Button` object to be situated in the layout header. Should almost always be of variant `primary`.\n */\n primaryCallToActionComponent?: ReactElement;\n /**\n * An optional `Button` object to be situated in the layout header, alongside the `callToActionPrimaryComponent`.\n */\n secondaryCallToActionComponent?: ReactElement;\n /**\n * An optional `Button` object to be situated in the layout header, alongside the other two `callToAction` components.\n */\n tertiaryCallToActionComponent?: ReactElement;\n /**\n * The content of the layout. May be a `string` or any other `ReactNode` or array of `ReactNode`s. Will often be `Grid` objects.\n */\n children?: ReactNode;\n /**\n * When set to `true`, the layout expands past its max width of 1440px and spans the entire available screen width.\n */\n isFullWidth?: boolean;\n};\n\ntype TemplateContentProps = {\n odysseyDesignTokens: DesignTokens;\n isDrawerOpen?: boolean;\n drawerVariant?: string;\n};\n\nconst TemplateContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" &&\n prop !== \"hasUiShell\" &&\n prop !== \"isFullWidth\",\n})<{\n hasUiShell: boolean;\n isFullWidth: boolean;\n odysseyDesignTokens: DesignTokens;\n}>(({ hasUiShell, isFullWidth, odysseyDesignTokens }) => ({\n maxWidth: isFullWidth\n ? \"100%\"\n : `calc(1440px + ${odysseyDesignTokens.Spacing6} + ${odysseyDesignTokens.Spacing6})`,\n marginInline:\n isFullWidth && !hasUiShell ? odysseyDesignTokens.Spacing6 : \"auto\",\n padding: hasUiShell ? 0 : odysseyDesignTokens.Spacing6,\n}));\n\nconst TemplateHeader = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens }) => ({\n display: \"flex\",\n alignItems: \"flex-start\",\n justifyContent: \"space-between\",\n gap: odysseyDesignTokens.Spacing4,\n}));\n\nconst TemplateHeaderPrimaryContent = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens }) => ({\n maxWidth: odysseyDesignTokens.TypographyLineLengthMax,\n [\".MuiTypography-root:last-child\"]: {\n marginBlockEnd: \"0\",\n },\n}));\n\nconst TemplateHeaderSecondaryContent = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens }) => ({\n alignItems: \"flex-end\",\n display: \"flex\",\n flexDirection: \"column\",\n gap: odysseyDesignTokens.Spacing4,\n minHeight: odysseyDesignTokens.Spacing7,\n justifyContent: \"center\",\n whiteSpace: \"nowrap\",\n}));\n\nconst TemplateHeaderButtons = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens }) => ({\n display: \"flex\",\n gap: odysseyDesignTokens.Spacing2,\n}));\n\nconst TemplateContent = styled(\"div\", {\n shouldForwardProp: (prop) =>\n ![\"odysseyDesignTokens\", \"isDrawerOpen\", \"drawerVariant\"].includes(prop),\n})<TemplateContentProps>(\n ({ odysseyDesignTokens, isDrawerOpen, drawerVariant }) => ({\n \"@keyframes animate-drawer-open\": {\n \"0%\": {\n gridTemplateColumns: \"minmax(0, 1fr) 0\",\n },\n \"100%\": {\n gridTemplateColumns: \"minmax(0, 1fr) 360px\",\n },\n },\n \"@keyframes animate-drawer-close\": {\n \"0%\": {\n gridTemplateColumns: \"minmax(0, 1fr) 360px\",\n },\n \"100%\": {\n gridTemplateColumns: \"minmax(0, 1fr) 0\",\n },\n },\n display: \"grid\",\n gridGap:\n drawerVariant === \"persistent\" && !isDrawerOpen\n ? 0\n : odysseyDesignTokens.Spacing4,\n gap:\n drawerVariant === \"persistent\" && !isDrawerOpen\n ? 0\n : odysseyDesignTokens.Spacing4,\n marginBlock: odysseyDesignTokens.Spacing4,\n gridTemplateColumns:\n drawerVariant === \"persistent\"\n ? isDrawerOpen\n ? \"minmax(0, 1fr) 360px\"\n : \"minmax(0, 1fr) 0\"\n : \"minmax(0, 1fr)\",\n animation:\n drawerVariant === \"persistent\" && isDrawerOpen\n ? \"animate-drawer-open 225ms cubic-bezier(0, 0, 0.2, 1)\"\n : \"animate-drawer-close 225ms cubic-bezier(0, 0, 0.2, 1)\",\n }),\n);\n\nconst PageTemplate = ({\n children,\n description,\n documentationLink,\n documentationText,\n drawer,\n isFullWidth = false,\n primaryCallToActionComponent,\n secondaryCallToActionComponent,\n tertiaryCallToActionComponent,\n title,\n}: PageTemplateProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const { isOpen: isDrawerOpen, variant: drawerVariant } = drawer?.props ?? {};\n\n const hasUiShell = useHasUiShell();\n\n return (\n <TemplateContainer\n hasUiShell={hasUiShell}\n isFullWidth={isFullWidth}\n odysseyDesignTokens={odysseyDesignTokens}\n >\n <TemplateHeader odysseyDesignTokens={odysseyDesignTokens}>\n <TemplateHeaderPrimaryContent odysseyDesignTokens={odysseyDesignTokens}>\n {title && <Heading4>{title}</Heading4>}\n {description && <Subordinate>{description}</Subordinate>}\n </TemplateHeaderPrimaryContent>\n\n <TemplateHeaderSecondaryContent\n odysseyDesignTokens={odysseyDesignTokens}\n >\n {documentationLink && (\n <DocumentationLink\n href={documentationLink}\n icon={<DocumentationIcon />}\n target=\"_blank\"\n >\n {documentationText}\n </DocumentationLink>\n )}\n {(primaryCallToActionComponent ||\n secondaryCallToActionComponent ||\n tertiaryCallToActionComponent) && (\n <TemplateHeaderButtons odysseyDesignTokens={odysseyDesignTokens}>\n {tertiaryCallToActionComponent}\n {secondaryCallToActionComponent}\n {primaryCallToActionComponent}\n </TemplateHeaderButtons>\n )}\n </TemplateHeaderSecondaryContent>\n </TemplateHeader>\n <TemplateContent\n odysseyDesignTokens={odysseyDesignTokens}\n isDrawerOpen={isDrawerOpen}\n drawerVariant={drawerVariant}\n >\n {children}\n {drawer}\n </TemplateContent>\n </TemplateContainer>\n );\n};\n\nconst MemoizedPageTemplate = memo(PageTemplate);\nMemoizedPageTemplate.displayName = \"PageTemplate\";\n\nexport { MemoizedPageTemplate as PageTemplate };\n"],"mappings":";;;;;;AAYA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAGA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,kBAAA,GAAAH,OAAA;AACA,IAAAI,2BAAA,GAAAJ,OAAA;AAIA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,cAAA,GAAAN,OAAA;AAAgE,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAD,uBAAAS,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAvBhE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgEA,MAAMG,iBAAiB,GAAG,IAAAC,eAAM,EAAC,KAAK,EAAE;EACtCC,iBAAiB,EAAGC,IAAI,IACtBA,IAAI,KAAK,qBAAqB,IAC9BA,IAAI,KAAK,YAAY,IACrBA,IAAI,KAAK;AACb,CAAC,CAAC,CAIC,CAAC;EAAEC,UAAU;EAAEC,WAAW;EAAEC;AAAoB,CAAC,MAAM;EACxDC,QAAQ,EAAEF,WAAW,GACjB,MAAM,GACN,iBAAiBC,mBAAmB,CAACE,QAAQ,MAAMF,mBAAmB,CAACE,QAAQ,GAAG;EACtFC,YAAY,EACVJ,WAAW,IAAI,CAACD,UAAU,GAAGE,mBAAmB,CAACE,QAAQ,GAAG,MAAM;EACpEE,OAAO,EAAEN,UAAU,GAAG,CAAC,GAAGE,mBAAmB,CAACE;AAChD,CAAC,CAAC,CAAC;AAEH,MAAMG,cAAc,GAAG,IAAAV,eAAM,EAAC,KAAK,EAAE;EACnCC,iBAAiB,EAAGC,IAAI,IAAKA,IAAI,KAAK;AACxC,CAAC,CAAC,CAEC,CAAC;EAAEG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A,CACnB,CAAC,EACjB,IAAA7C,WAAA,CAAAsD,IAAA,EAACvB,eAAe;MACdrB,mBAAmB,EAAEA,mBAAoB;MACzCuB,YAAY,EAAEA,YAAa;MAC3BC,aAAa,EAAEA,aAAc;MAAAM,QAAA,GAE5BA,QAAQ,EACRI,MAAM;IAAA,CACQ,CAAC;EAAA,CACD,CAAC;AAExB,CAAC;AAED,MAAMmB,oBAAoB,GAAAC,OAAA,CAAAzB,YAAA,GAAG,IAAA0B,WAAI,EAAC1B,YAAY,CAAC;AAC/CwB,oBAAoB,CAACG,WAAW,GAAG,cAAc","ignoreList":[]}
|
|
@@ -120,6 +120,7 @@ const translation = exports.translation = {
|
|
|
120
120
|
"pagination.rowsperpage": "Rows per page",
|
|
121
121
|
"pagination.rowswithtotal": "{{firstRow}}-{{lastRow}} of {{totalRows}} rows",
|
|
122
122
|
"pagination.rowswithouttotal": "{{firstRow}}-{{lastRow}} rows",
|
|
123
|
+
"pagination.totalrows": "{{totalRows}} rows",
|
|
123
124
|
"table.actions.selectall": "Select all",
|
|
124
125
|
"table.actions.selectnone": "Select none",
|
|
125
126
|
"table.actions.selectsome": "{{selectedRowCount}} selected",
|