@okta/odyssey-react-mui 1.6.19 → 1.6.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/Button.js +2 -2
  3. package/dist/Button.js.map +1 -1
  4. package/dist/CssBaseline.js +3 -1
  5. package/dist/CssBaseline.js.map +1 -1
  6. package/dist/MenuButton.js +16 -2
  7. package/dist/MenuButton.js.map +1 -1
  8. package/dist/MenuContext.js +2 -1
  9. package/dist/MenuContext.js.map +1 -1
  10. package/dist/MenuItem.js +6 -3
  11. package/dist/MenuItem.js.map +1 -1
  12. package/dist/SearchField.js.map +1 -1
  13. package/dist/icons.generated/ArrowBottom.js +33 -0
  14. package/dist/icons.generated/ArrowBottom.js.map +1 -0
  15. package/dist/icons.generated/ArrowTop.js +33 -0
  16. package/dist/icons.generated/ArrowTop.js.map +1 -0
  17. package/dist/icons.generated/index.js +2 -0
  18. package/dist/icons.generated/index.js.map +1 -1
  19. package/dist/labs/DataFilters.js +366 -0
  20. package/dist/labs/DataFilters.js.map +1 -0
  21. package/dist/labs/DataTable.js +366 -0
  22. package/dist/labs/DataTable.js.map +1 -0
  23. package/dist/labs/DataTablePagination.js +74 -0
  24. package/dist/labs/DataTablePagination.js.map +1 -0
  25. package/dist/labs/PaginatedTable.js +9 -6
  26. package/dist/labs/PaginatedTable.js.map +1 -1
  27. package/dist/labs/StaticTable.js +8 -5
  28. package/dist/labs/StaticTable.js.map +1 -1
  29. package/dist/labs/index.js +4 -1
  30. package/dist/labs/index.js.map +1 -1
  31. package/dist/labs/materialReactTableTypes.js.map +1 -1
  32. package/dist/src/CssBaseline.d.ts +2 -1
  33. package/dist/src/CssBaseline.d.ts.map +1 -1
  34. package/dist/src/MenuButton.d.ts +12 -2
  35. package/dist/src/MenuButton.d.ts.map +1 -1
  36. package/dist/src/MenuContext.d.ts +1 -0
  37. package/dist/src/MenuContext.d.ts.map +1 -1
  38. package/dist/src/MenuItem.d.ts.map +1 -1
  39. package/dist/src/SearchField.d.ts +16 -0
  40. package/dist/src/SearchField.d.ts.map +1 -1
  41. package/dist/src/icons.generated/ArrowBottom.d.ts +16 -0
  42. package/dist/src/icons.generated/ArrowBottom.d.ts.map +1 -0
  43. package/dist/src/icons.generated/ArrowTop.d.ts +16 -0
  44. package/dist/src/icons.generated/ArrowTop.d.ts.map +1 -0
  45. package/dist/src/icons.generated/index.d.ts +2 -0
  46. package/dist/src/icons.generated/index.d.ts.map +1 -1
  47. package/dist/src/labs/DataFilters.d.ts +85 -0
  48. package/dist/src/labs/DataFilters.d.ts.map +1 -0
  49. package/dist/src/labs/DataTable.d.ts +193 -0
  50. package/dist/src/labs/DataTable.d.ts.map +1 -0
  51. package/dist/src/labs/DataTablePagination.d.ts +25 -0
  52. package/dist/src/labs/DataTablePagination.d.ts.map +1 -0
  53. package/dist/src/labs/PaginatedTable.d.ts.map +1 -1
  54. package/dist/src/labs/StaticTable.d.ts.map +1 -1
  55. package/dist/src/labs/index.d.ts +4 -2
  56. package/dist/src/labs/index.d.ts.map +1 -1
  57. package/dist/src/labs/materialReactTableTypes.d.ts +1 -1
  58. package/dist/src/labs/materialReactTableTypes.d.ts.map +1 -1
  59. package/dist/src/theme/components.d.ts.map +1 -1
  60. package/dist/theme/components.js +137 -64
  61. package/dist/theme/components.js.map +1 -1
  62. package/dist/tsconfig.production.tsbuildinfo +1 -1
  63. package/package.json +4 -4
  64. package/src/Button.tsx +2 -2
  65. package/src/CssBaseline.tsx +7 -2
  66. package/src/MenuButton.tsx +50 -8
  67. package/src/MenuContext.ts +2 -0
  68. package/src/MenuItem.tsx +5 -3
  69. package/src/SearchField.tsx +8 -0
  70. package/src/icons.generated/ArrowBottom.tsx +43 -0
  71. package/src/icons.generated/ArrowTop.tsx +43 -0
  72. package/src/icons.generated/index.ts +2 -0
  73. package/src/labs/DataFilters.tsx +601 -0
  74. package/src/labs/DataTable.tsx +681 -0
  75. package/src/labs/DataTablePagination.tsx +88 -0
  76. package/src/labs/PaginatedTable.tsx +35 -33
  77. package/src/labs/StaticTable.tsx +26 -29
  78. package/src/labs/index.ts +6 -3
  79. package/src/labs/{materialReactTableTypes.ts → materialReactTableTypes.tsx} +1 -1
  80. package/src/theme/components.tsx +154 -62
@@ -1 +1 @@
1
- {"version":3,"file":"PaginatedTable.js","names":["Typography","MaterialReactTable","memo","useCallback","useEffect","useMemo","useRef","useState","Trans","useTranslation","jsx","_jsx","Fragment","_Fragment","PaginatedTable","_ref","columns","data","fetchMoreData","getRowId","hasError","hasRowSelection","initialState","isFetching","onGlobalFilterChange","onPaginationChange","onRowSelectionChange","onRowSelectionChangeProp","rowsPerPage","state","ToolbarButtons","t","rowVirtualizerInstanceRef","columnFilters","setColumnFilters","globalFilter","setGlobalFilter","undefined","current","scrollToIndex","error","console","totalFetchedRows","length","renderBottomToolbarCustomActions","children","count","i18nKey","values","totalRows","renderTopToolbarCustomActions","_ref2","table","rowSelection","setRowSelection","pagination","setPagination","pageIndex","pageSize","dataLengthRef","updatePagination","paginationFunction","previousPagination","nextPagination","numberOfPages","Math","floor","modifiedInitialState","modifiedState","muiToolbarAlertBannerProps","severity","muiTablePaginationProps","rowsPerPageOptions","showFirstButton","showLastButton","muiCheckboxStyles","theme","components","MuiCheckbox","styleOverrides","root","ownerState","enableMultiRowSelection","enablePagination","enableRowSelection","enableSorting","muiSelectAllCheckboxProps","sx","muiSelectCheckboxProps","onColumnFiltersChange","rowVirtualizerProps","overscan","MemoizedPaginatedTable","displayName"],"sources":["../../src/labs/PaginatedTable.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 { AlertProps, TablePaginationProps } from \"@mui/material\";\nimport { Typography } from \"../Typography\";\nimport MaterialReactTable, {\n MRT_PaginationState,\n type MRT_ColumnFiltersState,\n type MRT_RowSelectionState,\n type MRT_TableInstance,\n type MRT_Virtualizer,\n} from \"material-react-table\";\nimport {\n FunctionComponent,\n memo,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { Trans, useTranslation } from \"react-i18next\";\n\nimport type {\n DefaultMaterialReactTableData,\n MaterialReactTableProps,\n} from \"./materialReactTableTypes\";\n\nexport type PaginatedTableProps<TData extends DefaultMaterialReactTableData> = {\n columns: MaterialReactTableProps<TData>[\"columns\"];\n data: MaterialReactTableProps<TData>[\"data\"];\n fetchMoreData?: () => void;\n getRowId?: MaterialReactTableProps<TData>[\"getRowId\"];\n hasError?: boolean;\n hasRowSelection?: boolean;\n initialState?: MaterialReactTableProps<TData>[\"initialState\"];\n isFetching?: boolean;\n onGlobalFilterChange?: MaterialReactTableProps<TData>[\"onGlobalFilterChange\"];\n onPaginationChange?: MaterialReactTableProps<TData>[\"onPaginationChange\"];\n onRowSelectionChange?: MaterialReactTableProps<TData>[\"onRowSelectionChange\"];\n rowsPerPage?: number;\n state?: MaterialReactTableProps<TData>[\"state\"];\n ToolbarButtons?: FunctionComponent<\n { table: MRT_TableInstance<TData> } & unknown\n >;\n};\n\nconst PaginatedTable = <TData extends DefaultMaterialReactTableData>({\n columns,\n data,\n fetchMoreData,\n getRowId,\n hasError,\n hasRowSelection,\n initialState,\n isFetching,\n onGlobalFilterChange,\n onPaginationChange,\n onRowSelectionChange: onRowSelectionChangeProp,\n rowsPerPage = 10,\n state,\n ToolbarButtons,\n}: PaginatedTableProps<TData>) => {\n const { t } = useTranslation();\n\n const rowVirtualizerInstanceRef =\n useRef<MRT_Virtualizer<HTMLDivElement, HTMLTableRowElement>>(null);\n\n const [columnFilters, setColumnFilters] = useState<MRT_ColumnFiltersState>(\n []\n );\n\n const [globalFilter, setGlobalFilter] = useState<string>();\n\n useEffect(() => {\n if (globalFilter !== undefined) {\n onGlobalFilterChange?.(globalFilter);\n }\n }, [globalFilter, onGlobalFilterChange]);\n\n useEffect(() => {\n try {\n // Scroll to top of table when sorting or filters change.\n rowVirtualizerInstanceRef.current?.scrollToIndex?.(0);\n } catch (error) {\n console.error(error);\n }\n }, [columnFilters, globalFilter]);\n\n const totalFetchedRows = data.length ?? 0;\n\n const renderBottomToolbarCustomActions = useCallback(\n () =>\n fetchMoreData ? (\n <Typography>\n <Trans\n count={totalFetchedRows}\n i18nKey=\"table.fetchedrows.text\"\n values={{\n totalRows: totalFetchedRows,\n }}\n />\n </Typography>\n ) : (\n <Typography>\n <Trans\n count={totalFetchedRows}\n i18nKey=\"table.rows.text\"\n values={{\n totalRows: totalFetchedRows,\n }}\n />\n </Typography>\n ),\n [fetchMoreData, totalFetchedRows]\n );\n\n const renderTopToolbarCustomActions = useCallback<\n Exclude<\n MaterialReactTableProps<TData>[\"renderTopToolbarCustomActions\"],\n undefined\n >\n >(\n ({ table }) => <>{ToolbarButtons && <ToolbarButtons table={table} />}</>,\n [ToolbarButtons]\n );\n\n const [rowSelection, setRowSelection] = useState<MRT_RowSelectionState>({});\n\n useEffect(() => {\n onRowSelectionChangeProp?.(rowSelection);\n }, [onRowSelectionChangeProp, rowSelection]);\n\n const [pagination, setPagination] = useState<MRT_PaginationState>(\n initialState?.pagination || {\n pageIndex: 0,\n pageSize: rowsPerPage,\n }\n );\n\n const dataLengthRef = useRef(data.length);\n\n const updatePagination = useCallback(\n (paginationFunction) => {\n if (data.length === dataLengthRef.current) {\n setPagination((previousPagination) => {\n const nextPagination = paginationFunction(previousPagination);\n return nextPagination;\n });\n } else {\n dataLengthRef.current = data.length;\n }\n },\n [data.length]\n );\n\n useEffect(() => {\n const numberOfPages = Math.floor(data.length / pagination.pageSize);\n\n if (!isFetching && pagination.pageIndex > numberOfPages - 1) {\n fetchMoreData?.();\n }\n }, [\n data.length,\n fetchMoreData,\n isFetching,\n pagination.pageIndex,\n pagination.pageSize,\n ]);\n\n useEffect(() => {\n onPaginationChange?.({\n pageIndex: pagination.pageIndex,\n pageSize: pagination.pageSize,\n });\n }, [onPaginationChange, pagination.pageIndex, pagination.pageSize]);\n\n const modifiedInitialState = useMemo(\n () => ({\n pagination,\n ...initialState,\n }),\n [initialState, pagination]\n );\n\n const modifiedState = useMemo(\n () => ({\n pagination: {\n pageIndex: pagination.pageIndex,\n pageSize: pagination.pageSize,\n },\n rowSelection,\n globalFilter,\n columnFilters,\n ...state,\n }),\n [\n pagination.pageIndex,\n pagination.pageSize,\n rowSelection,\n globalFilter,\n columnFilters,\n state,\n ]\n );\n\n const muiToolbarAlertBannerProps: AlertProps = useMemo(\n () =>\n hasError\n ? {\n children: t(\"table.error\"),\n severity: \"error\",\n }\n : {},\n [hasError, t]\n );\n\n const muiTablePaginationProps: Partial<\n Omit<TablePaginationProps, \"rowsPerPage\">\n > = useMemo(\n () => ({\n rowsPerPageOptions: [],\n showFirstButton: false,\n showLastButton: false,\n }),\n []\n );\n\n const muiCheckboxStyles = useCallback(\n (theme) =>\n typeof theme.components?.MuiCheckbox?.styleOverrides?.root === \"function\"\n ? theme.components?.MuiCheckbox?.styleOverrides?.root?.({\n ownerState: {},\n theme,\n })\n : \"\",\n []\n );\n\n return (\n <MaterialReactTable\n columns={columns}\n data={data}\n enableMultiRowSelection={hasRowSelection}\n enablePagination\n enableRowSelection={hasRowSelection}\n enableSorting={false}\n getRowId={getRowId}\n initialState={modifiedInitialState}\n muiSelectAllCheckboxProps={{ sx: muiCheckboxStyles }}\n muiSelectCheckboxProps={{ sx: muiCheckboxStyles }}\n muiTablePaginationProps={muiTablePaginationProps}\n muiToolbarAlertBannerProps={muiToolbarAlertBannerProps}\n onColumnFiltersChange={setColumnFilters}\n onGlobalFilterChange={setGlobalFilter}\n onPaginationChange={updatePagination}\n onRowSelectionChange={setRowSelection}\n renderBottomToolbarCustomActions={renderBottomToolbarCustomActions}\n renderTopToolbarCustomActions={renderTopToolbarCustomActions}\n rowVirtualizerInstanceRef={rowVirtualizerInstanceRef}\n rowVirtualizerProps={{ overscan: 4 }}\n state={modifiedState}\n />\n );\n};\n\nconst MemoizedPaginatedTable = memo(PaginatedTable) as typeof PaginatedTable;\n\n// @ts-expect-error | This is going to error because the component isn't and can't be defined as a `FunctionComponent`, and therefore, doesn't have a `displayName` prop.\nMemoizedPaginatedTable.displayName = \"PaginatedTable\";\n\nexport { MemoizedPaginatedTable as PaginatedTable };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVA,SAaSA,UAAU;AACnB,OAAOC,kBAAkB,MAMlB,sBAAsB;AAC7B,SAEEC,IAAI,EACJC,WAAW,EACXC,SAAS,EACTC,OAAO,EACPC,MAAM,EACNC,QAAQ,QACH,OAAO;AACd,SAASC,KAAK,EAAEC,cAAc,QAAQ,eAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AA0BtD,MAAMC,cAAc,GAAGC,IAAA,IAeW;EAAA,IAfmC;IACnEC,OAAO;IACPC,IAAI;IACJC,aAAa;IACbC,QAAQ;IACRC,QAAQ;IACRC,eAAe;IACfC,YAAY;IACZC,UAAU;IACVC,oBAAoB;IACpBC,kBAAkB;IAClBC,oBAAoB,EAAEC,wBAAwB;IAC9CC,WAAW,GAAG,EAAE;IAChBC,KAAK;IACLC;EAC0B,CAAC,GAAAf,IAAA;EAC3B,MAAM;IAAEgB;EAAE,CAAC,GAAGtB,cAAc,CAAC,CAAC;EAE9B,MAAMuB,yBAAyB,GAC7B1B,MAAM,CAAuD,IAAI,CAAC;EAEpE,MAAM,CAAC2B,aAAa,EAAEC,gBAAgB,CAAC,GAAG3B,QAAQ,CAChD,EACF,CAAC;EAED,MAAM,CAAC4B,YAAY,EAAEC,eAAe,CAAC,GAA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WAAW,EAAEC,cAAc,EAAEC,IAAI,GAAG;IACpDC,UAAU,EAAE,CAAC,CAAC;IACdL;EACF,CAAC,CAAC,GACF,EAAE,EACR,EACF,CAAC;EAED,OACEjE,IAAA,CAACV,kBAAkB;IACjBe,OAAO,EAAEA,OAAQ;IACjBC,IAAI,EAAEA,IAAK;IACXiE,uBAAuB,EAAE7D,eAAgB;IACzC8D,gBAAgB;IAChBC,kBAAkB,EAAE/D,eAAgB;IACpCgE,aAAa,EAAE,KAAM;IACrBlE,QAAQ,EAAEA,QAAS;IACnBG,YAAY,EAAE6C,oBAAqB;IACnCmB,yBAAyB,EAAE;MAAEC,EAAE,EAAEZ;IAAkB,CAAE;IACrDa,sBAAsB,EAAE;MAAED,EAAE,EAAEZ;IAAkB,CAAE;IAClDJ,uBAAuB,EAAEA,uBAAwB;IACjDF,0BAA0B,EAAEA,0BAA2B;IACvDoB,qBAAqB,EAAEvD,gBAAiB;IACxCV,oBAAoB,EAAEY,eAAgB;IACtCX,kBAAkB,EAAEmC,gBAAiB;IACrClC,oBAAoB,EAAE4B,eAAgB;IACtCV,gCAAgC,EAAEA,gCAAiC;IACnEM,6BAA6B,EAAEA,6BAA8B;IAC7DlB,yBAAyB,EAAEA,yBAA0B;IACrD0D,mBAAmB,EAAE;MAAEC,QAAQ,EAAE;IAAE,CAAE;IACrC9D,KAAK,EAAEuC;EAAc,CACtB,CAAC;AAEN,CAAC;AAED,MAAMwB,sBAAsB,GAAG1F,IAAI,CAACY,cAAc,CAA0B;AAG5E8E,sBAAsB,CAACC,WAAW,GAAG,gBAAgB;AAErD,SAASD,sBAAsB,IAAI9E,cAAc"}
1
+ {"version":3,"file":"PaginatedTable.js","names":["Typography","useMaterialReactTable","MaterialReactTable","memo","useCallback","useEffect","useMemo","useRef","useState","Trans","useTranslation","jsx","_jsx","Fragment","_Fragment","PaginatedTable","_ref","columns","data","fetchMoreData","getRowId","hasError","hasRowSelection","initialState","isFetching","onGlobalFilterChange","onPaginationChange","onRowSelectionChange","onRowSelectionChangeProp","rowsPerPage","state","ToolbarButtons","t","rowVirtualizerInstanceRef","columnFilters","setColumnFilters","globalFilter","setGlobalFilter","undefined","current","scrollToIndex","error","console","totalFetchedRows","length","renderBottomToolbarCustomActions","children","count","i18nKey","values","totalRows","renderTopToolbarCustomActions","_ref2","table","rowSelection","setRowSelection","pagination","setPagination","pageIndex","pageSize","dataLengthRef","updatePagination","paginationFunction","previousPagination","nextPagination","numberOfPages","Math","floor","modifiedInitialState","modifiedState","muiToolbarAlertBannerProps","severity","muiTablePaginationProps","rowsPerPageOptions","showFirstButton","showLastButton","muiCheckboxStyles","theme","components","MuiCheckbox","styleOverrides","root","ownerState","enableMultiRowSelection","enablePagination","enableRowSelection","enableSorting","muiSelectAllCheckboxProps","sx","muiSelectCheckboxProps","muiPaginationProps","onColumnFiltersChange","rowVirtualizerOptions","overscan","MemoizedPaginatedTable","displayName"],"sources":["../../src/labs/PaginatedTable.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 { AlertProps } from \"@mui/material\";\nimport { Typography } from \"../Typography\";\nimport {\n MRT_PaginationState,\n type MRT_ColumnFiltersState,\n type MRT_RowSelectionState,\n type MRT_TableInstance,\n type MRT_Virtualizer,\n useMaterialReactTable,\n MaterialReactTable,\n} from \"material-react-table\";\nimport {\n FunctionComponent,\n memo,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { Trans, useTranslation } from \"react-i18next\";\n\nimport type {\n DefaultMaterialReactTableData,\n MaterialReactTableProps,\n} from \"./materialReactTableTypes\";\n\nexport type PaginatedTableProps<TData extends DefaultMaterialReactTableData> = {\n columns: MaterialReactTableProps<TData>[\"columns\"];\n data: MaterialReactTableProps<TData>[\"data\"];\n fetchMoreData?: () => void;\n getRowId?: MaterialReactTableProps<TData>[\"getRowId\"];\n hasError?: boolean;\n hasRowSelection?: boolean;\n initialState?: MaterialReactTableProps<TData>[\"initialState\"];\n isFetching?: boolean;\n onGlobalFilterChange?: MaterialReactTableProps<TData>[\"onGlobalFilterChange\"];\n onPaginationChange?: MaterialReactTableProps<TData>[\"onPaginationChange\"];\n onRowSelectionChange?: MaterialReactTableProps<TData>[\"onRowSelectionChange\"];\n rowsPerPage?: number;\n state?: MaterialReactTableProps<TData>[\"state\"];\n ToolbarButtons?: FunctionComponent<\n { table: MRT_TableInstance<TData> } & unknown\n >;\n};\n\nconst PaginatedTable = <TData extends DefaultMaterialReactTableData>({\n columns = [],\n data = [],\n fetchMoreData,\n getRowId,\n hasError,\n hasRowSelection,\n initialState,\n isFetching,\n onGlobalFilterChange,\n onPaginationChange,\n onRowSelectionChange: onRowSelectionChangeProp,\n rowsPerPage = 10,\n state,\n ToolbarButtons,\n}: PaginatedTableProps<TData>) => {\n const { t } = useTranslation();\n\n const rowVirtualizerInstanceRef =\n useRef<MRT_Virtualizer<HTMLDivElement, HTMLTableRowElement>>(null);\n\n const [columnFilters, setColumnFilters] = useState<MRT_ColumnFiltersState>(\n []\n );\n\n const [globalFilter, setGlobalFilter] = useState<string>();\n\n useEffect(() => {\n if (globalFilter !== undefined) {\n onGlobalFilterChange?.(globalFilter);\n }\n }, [globalFilter, onGlobalFilterChange]);\n\n useEffect(() => {\n try {\n // Scroll to top of table when sorting or filters change.\n rowVirtualizerInstanceRef.current?.scrollToIndex?.(0);\n } catch (error) {\n console.error(error);\n }\n }, [columnFilters, globalFilter]);\n\n const totalFetchedRows = data.length ?? 0;\n\n const renderBottomToolbarCustomActions = useCallback(\n () =>\n fetchMoreData ? (\n <Typography>\n <Trans\n count={totalFetchedRows}\n i18nKey=\"table.fetchedrows.text\"\n values={{\n totalRows: totalFetchedRows,\n }}\n />\n </Typography>\n ) : (\n <Typography>\n <Trans\n count={totalFetchedRows}\n i18nKey=\"table.rows.text\"\n values={{\n totalRows: totalFetchedRows,\n }}\n />\n </Typography>\n ),\n [fetchMoreData, totalFetchedRows]\n );\n\n const renderTopToolbarCustomActions = useCallback<\n Exclude<\n MaterialReactTableProps<TData>[\"renderTopToolbarCustomActions\"],\n undefined\n >\n >(\n ({ table }: { table: MRT_TableInstance<TData> }) => (\n <>{ToolbarButtons && <ToolbarButtons table={table} />}</>\n ),\n [ToolbarButtons]\n );\n\n const [rowSelection, setRowSelection] = useState<MRT_RowSelectionState>({});\n\n useEffect(() => {\n onRowSelectionChangeProp?.(rowSelection);\n }, [onRowSelectionChangeProp, rowSelection]);\n\n const [pagination, setPagination] = useState<MRT_PaginationState>(\n initialState?.pagination || {\n pageIndex: 0,\n pageSize: rowsPerPage,\n }\n );\n\n const dataLengthRef = useRef(data.length);\n\n const updatePagination = useCallback(\n (paginationFunction) => {\n if (data.length === dataLengthRef.current) {\n setPagination((previousPagination) => {\n const nextPagination = paginationFunction(previousPagination);\n return nextPagination;\n });\n } else {\n dataLengthRef.current = data.length;\n }\n },\n [data.length]\n );\n\n useEffect(() => {\n const numberOfPages = Math.floor(data.length / pagination.pageSize);\n\n if (!isFetching && pagination.pageIndex > numberOfPages - 1) {\n fetchMoreData?.();\n }\n }, [\n data.length,\n fetchMoreData,\n isFetching,\n pagination.pageIndex,\n pagination.pageSize,\n ]);\n\n useEffect(() => {\n onPaginationChange?.({\n pageIndex: pagination.pageIndex,\n pageSize: pagination.pageSize,\n });\n }, [onPaginationChange, pagination.pageIndex, pagination.pageSize]);\n\n const modifiedInitialState = useMemo(\n () => ({\n pagination,\n ...initialState,\n }),\n [initialState, pagination]\n );\n\n const modifiedState = useMemo(\n () => ({\n pagination: {\n pageIndex: pagination.pageIndex,\n pageSize: pagination.pageSize,\n },\n rowSelection,\n globalFilter,\n columnFilters,\n ...state,\n }),\n [\n pagination.pageIndex,\n pagination.pageSize,\n rowSelection,\n globalFilter,\n columnFilters,\n state,\n ]\n );\n\n const muiToolbarAlertBannerProps: AlertProps = useMemo(\n () =>\n hasError\n ? {\n children: t(\"table.error\"),\n severity: \"error\",\n }\n : {},\n [hasError, t]\n );\n\n const muiTablePaginationProps = useMemo(\n () => ({\n rowsPerPageOptions: [],\n showFirstButton: false,\n showLastButton: false,\n }),\n []\n );\n\n const muiCheckboxStyles = useCallback(\n (theme) =>\n typeof theme.components?.MuiCheckbox?.styleOverrides?.root === \"function\"\n ? theme.components?.MuiCheckbox?.styleOverrides?.root?.({\n ownerState: {},\n theme,\n })\n : \"\",\n []\n );\n\n const table = useMaterialReactTable({\n columns: columns,\n data: data,\n enableMultiRowSelection: hasRowSelection,\n enablePagination: true,\n enableRowSelection: hasRowSelection,\n enableSorting: false,\n getRowId: getRowId,\n initialState: modifiedInitialState,\n muiSelectAllCheckboxProps: { sx: muiCheckboxStyles },\n muiSelectCheckboxProps: { sx: muiCheckboxStyles },\n muiPaginationProps: muiTablePaginationProps,\n muiToolbarAlertBannerProps: muiToolbarAlertBannerProps,\n onColumnFiltersChange: setColumnFilters,\n onGlobalFilterChange: setGlobalFilter,\n onPaginationChange: updatePagination,\n onRowSelectionChange: setRowSelection,\n renderBottomToolbarCustomActions: renderBottomToolbarCustomActions,\n renderTopToolbarCustomActions: renderTopToolbarCustomActions,\n rowVirtualizerInstanceRef: rowVirtualizerInstanceRef,\n rowVirtualizerOptions: { overscan: 4 },\n state: modifiedState,\n });\n\n return <MaterialReactTable table={table} />;\n};\n\nconst MemoizedPaginatedTable = memo(PaginatedTable) as typeof PaginatedTable;\n\n// @ts-expect-error | This is going to error because the component isn't and can't be defined as a `FunctionComponent`, and therefore, doesn't have a `displayName` prop.\nMemoizedPaginatedTable.displayName = \"PaginatedTable\";\n\nexport { MemoizedPaginatedTable as PaginatedTable };\n"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AAK;IACpBlE,QAAQ,EAAEA,QAAQ;IAClBG,YAAY,EAAE6C,oBAAoB;IAClCmB,yBAAyB,EAAE;MAAEC,EAAE,EAAEZ;IAAkB,CAAC;IACpDa,sBAAsB,EAAE;MAAED,EAAE,EAAEZ;IAAkB,CAAC;IACjDc,kBAAkB,EAAElB,uBAAuB;IAC3CF,0BAA0B,EAAEA,0BAA0B;IACtDqB,qBAAqB,EAAExD,gBAAgB;IACvCV,oBAAoB,EAAEY,eAAe;IACrCX,kBAAkB,EAAEmC,gBAAgB;IACpClC,oBAAoB,EAAE4B,eAAe;IACrCV,gCAAgC,EAAEA,gCAAgC;IAClEM,6BAA6B,EAAEA,6BAA6B;IAC5DlB,yBAAyB,EAAEA,yBAAyB;IACpD2D,qBAAqB,EAAE;MAAEC,QAAQ,EAAE;IAAE,CAAC;IACtC/D,KAAK,EAAEuC;EACT,CAAC,CAAC;EAEF,OAAOzD,IAAA,CAACV,kBAAkB;IAACmD,KAAK,EAAEA;EAAM,CAAE,CAAC;AAC7C,CAAC;AAED,MAAMyC,sBAAsB,GAAG3F,IAAI,CAACY,cAAc,CAA0B;AAG5E+E,sBAAsB,CAACC,WAAW,GAAG,gBAAgB;AAErD,SAASD,sBAAsB,IAAI/E,cAAc"}
@@ -10,15 +10,15 @@
10
10
  * See the License for the specific language governing permissions and limitations under the License.
11
11
  */
12
12
 
13
- import MaterialReactTable from "material-react-table";
13
+ import { useMaterialReactTable, MaterialReactTable } from "material-react-table";
14
14
  import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react";
15
15
  import { useTranslation } from "react-i18next";
16
16
  import { jsx as _jsx } from "react/jsx-runtime";
17
17
  import { Fragment as _Fragment } from "react/jsx-runtime";
18
18
  const StaticTable = _ref => {
19
19
  let {
20
- columns,
21
- data,
20
+ columns = [],
21
+ data = [],
22
22
  getRowId,
23
23
  hasError,
24
24
  initialState,
@@ -59,7 +59,7 @@ const StaticTable = _ref => {
59
59
  console.error(error);
60
60
  }
61
61
  }, [columnFilters, globalFilter]);
62
- return _jsx(MaterialReactTable, {
62
+ const table = useMaterialReactTable({
63
63
  columns: columns,
64
64
  data: data,
65
65
  enableBottomToolbar: false,
@@ -76,11 +76,14 @@ const StaticTable = _ref => {
76
76
  onGlobalFilterChange: setGlobalFilter,
77
77
  renderTopToolbarCustomActions: renderTopToolbarCustomActions,
78
78
  rowVirtualizerInstanceRef: rowVirtualizerInstanceRef,
79
- rowVirtualizerProps: {
79
+ rowVirtualizerOptions: {
80
80
  overscan: 4
81
81
  },
82
82
  state: modifiedState
83
83
  });
84
+ return _jsx(MaterialReactTable, {
85
+ table: table
86
+ });
84
87
  };
85
88
  const MemoizedStaticTable = memo(StaticTable);
86
89
  export { MemoizedStaticTable as StaticTable };
@@ -1 +1 @@
1
- {"version":3,"file":"StaticTable.js","names":["MaterialReactTable","memo","useCallback","useEffect","useMemo","useRef","useState","useTranslation","jsx","_jsx","Fragment","_Fragment","StaticTable","_ref","columns","data","getRowId","hasError","initialState","onGlobalFilterChange","state","ToolbarButtons","t","rowVirtualizerInstanceRef","columnFilters","setColumnFilters","globalFilter","setGlobalFilter","undefined","modifiedState","renderTopToolbarCustomActions","_ref2","table","children","current","scrollToIndex","error","console","enableBottomToolbar","enablePagination","enableRowVirtualization","enableSorting","muiToolbarAlertBannerProps","color","onColumnFiltersChange","rowVirtualizerProps","overscan","MemoizedStaticTable"],"sources":["../../src/labs/StaticTable.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 MaterialReactTable, {\n type MRT_ColumnFiltersState,\n type MRT_TableInstance,\n type MRT_Virtualizer,\n} from \"material-react-table\";\nimport {\n FunctionComponent,\n memo,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { useTranslation } from \"react-i18next\";\n\nimport type {\n DefaultMaterialReactTableData,\n MaterialReactTableProps,\n} from \"./materialReactTableTypes\";\n\nexport type StaticTableProps<TData extends DefaultMaterialReactTableData> = {\n columns: MaterialReactTableProps<TData>[\"columns\"];\n data: MaterialReactTableProps<TData>[\"data\"];\n getRowId?: MaterialReactTableProps<TData>[\"getRowId\"];\n hasError?: boolean;\n initialState?: MaterialReactTableProps<TData>[\"initialState\"];\n onGlobalFilterChange?: MaterialReactTableProps<TData>[\"onGlobalFilterChange\"];\n state?: MaterialReactTableProps<TData>[\"state\"];\n ToolbarButtons?: FunctionComponent<\n { table: MRT_TableInstance<TData> } & unknown\n >;\n};\n\nconst StaticTable = <TData extends DefaultMaterialReactTableData>({\n columns,\n data,\n getRowId,\n hasError,\n initialState,\n onGlobalFilterChange,\n state,\n ToolbarButtons,\n}: StaticTableProps<TData>) => {\n const { t } = useTranslation();\n\n const rowVirtualizerInstanceRef =\n useRef<MRT_Virtualizer<HTMLDivElement, HTMLTableRowElement>>(null);\n\n const [columnFilters, setColumnFilters] = useState<MRT_ColumnFiltersState>(\n []\n );\n\n const [globalFilter, setGlobalFilter] = useState<string>();\n\n useEffect(() => {\n if (globalFilter !== undefined) {\n onGlobalFilterChange?.(globalFilter);\n }\n }, [globalFilter, onGlobalFilterChange]);\n\n const modifiedState = useMemo(\n () => ({\n globalFilter,\n columnFilters,\n ...state,\n }),\n [globalFilter, columnFilters, state]\n );\n\n const renderTopToolbarCustomActions = useCallback<\n Exclude<\n MaterialReactTableProps<TData>[\"renderTopToolbarCustomActions\"],\n undefined\n >\n >(\n ({ table }) => <>{ToolbarButtons && <ToolbarButtons table={table} />}</>,\n [ToolbarButtons]\n );\n\n useEffect(() => {\n try {\n // Scroll to top of table when sorting or filters change.\n rowVirtualizerInstanceRef.current?.scrollToIndex?.(0);\n } catch (error) {\n console.error(error);\n }\n }, [columnFilters, globalFilter]);\n\n return (\n <MaterialReactTable\n columns={columns}\n data={data}\n enableBottomToolbar={false}\n enablePagination={false}\n enableRowVirtualization\n enableSorting={false}\n getRowId={getRowId}\n initialState={initialState}\n muiToolbarAlertBannerProps={\n hasError\n ? {\n children: t(\"table.error\"),\n color: \"error\",\n }\n : undefined\n }\n onColumnFiltersChange={setColumnFilters}\n onGlobalFilterChange={setGlobalFilter}\n renderTopToolbarCustomActions={renderTopToolbarCustomActions}\n rowVirtualizerInstanceRef={rowVirtualizerInstanceRef}\n rowVirtualizerProps={{ overscan: 4 }}\n state={modifiedState}\n />\n );\n};\n\nconst MemoizedStaticTable = memo(StaticTable) as typeof StaticTable;\n\nexport { MemoizedStaticTable as StaticTable };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,kBAAkB,MAIlB,sBAAsB;AAC7B,SAEEC,IAAI,EACJC,WAAW,EACXC,SAAS,EACTC,OAAO,EACPC,MAAM,EACNC,QAAQ,QACH,OAAO;AACd,SAASC,cAAc,QAAQ,eAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAoB/C,MAAMC,WAAW,GAAGC,IAAA,IASW;EAAA,IATmC;IAChEC,OAAO;IACPC,IAAI;IACJC,QAAQ;IACRC,QAAQ;IACRC,YAAY;IACZC,oBAAoB;IACpBC,KAAK;IACLC;EACuB,CAAC,GAAAR,IAAA;EACxB,MAAM;IAAES;EAAE,CAAC,GAAGf,cAAc,CAAC,CAAC;EAE9B,MAAMgB,yBAAyB,GAC7BlB,MAAM,CAAuD,IAAI,CAAC;EAEpE,MAAM,CAACmB,aAAa,EAAEC,gBAAgB,CAAC,GAAGnB,QAAQ,CAChD,EACF,CAAC;EAED,MAAM,CAACoB,YAAY,EAAEC,eAAe,CAAC,GA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,qBAAqB,EAAEnB,gBAAiB;IACxCN,oBAAoB,EAAEQ,eAAgB;IACtCG,6BAA6B,EAAEA,6BAA8B;IAC7DP,yBAAyB,EAAEA,yBAA0B;IACrDsB,mBAAmB,EAAE;MAAEC,QAAQ,EAAE;IAAE,CAAE;IACrC1B,KAAK,EAAES;EAAc,CACtB,CAAC;AAEN,CAAC;AAED,MAAMkB,mBAAmB,GAAG9C,IAAI,CAACW,WAAW,CAAuB;AAEnE,SAASmC,mBAAmB,IAAInC,WAAW"}
1
+ {"version":3,"file":"StaticTable.js","names":["useMaterialReactTable","MaterialReactTable","memo","useCallback","useEffect","useMemo","useRef","useState","useTranslation","jsx","_jsx","Fragment","_Fragment","StaticTable","_ref","columns","data","getRowId","hasError","initialState","onGlobalFilterChange","state","ToolbarButtons","t","rowVirtualizerInstanceRef","columnFilters","setColumnFilters","globalFilter","setGlobalFilter","undefined","modifiedState","renderTopToolbarCustomActions","_ref2","table","children","current","scrollToIndex","error","console","enableBottomToolbar","enablePagination","enableRowVirtualization","enableSorting","muiToolbarAlertBannerProps","color","onColumnFiltersChange","rowVirtualizerOptions","overscan","MemoizedStaticTable"],"sources":["../../src/labs/StaticTable.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 {\n useMaterialReactTable,\n type MRT_ColumnFiltersState,\n type MRT_TableInstance,\n type MRT_Virtualizer,\n MaterialReactTable,\n} from \"material-react-table\";\nimport {\n FunctionComponent,\n memo,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { useTranslation } from \"react-i18next\";\n\nimport type {\n DefaultMaterialReactTableData,\n MaterialReactTableProps,\n} from \"./materialReactTableTypes\";\n\nexport type StaticTableProps<TData extends DefaultMaterialReactTableData> = {\n columns: MaterialReactTableProps<TData>[\"columns\"];\n data: MaterialReactTableProps<TData>[\"data\"];\n getRowId?: MaterialReactTableProps<TData>[\"getRowId\"];\n hasError?: boolean;\n initialState?: MaterialReactTableProps<TData>[\"initialState\"];\n onGlobalFilterChange?: MaterialReactTableProps<TData>[\"onGlobalFilterChange\"];\n state?: MaterialReactTableProps<TData>[\"state\"];\n ToolbarButtons?: FunctionComponent<\n { table: MRT_TableInstance<TData> } & unknown\n >;\n};\n\nconst StaticTable = <TData extends DefaultMaterialReactTableData>({\n columns = [],\n data = [],\n getRowId,\n hasError,\n initialState,\n onGlobalFilterChange,\n state,\n ToolbarButtons,\n}: StaticTableProps<TData>) => {\n const { t } = useTranslation();\n\n const rowVirtualizerInstanceRef =\n useRef<MRT_Virtualizer<HTMLDivElement, HTMLTableRowElement>>(null);\n\n const [columnFilters, setColumnFilters] = useState<MRT_ColumnFiltersState>(\n []\n );\n\n const [globalFilter, setGlobalFilter] = useState<string>();\n\n useEffect(() => {\n if (globalFilter !== undefined) {\n onGlobalFilterChange?.(globalFilter);\n }\n }, [globalFilter, onGlobalFilterChange]);\n\n const modifiedState = useMemo(\n () => ({\n globalFilter,\n columnFilters,\n ...state,\n }),\n [globalFilter, columnFilters, state]\n );\n\n const renderTopToolbarCustomActions = useCallback<\n Exclude<\n MaterialReactTableProps<TData>[\"renderTopToolbarCustomActions\"],\n undefined\n >\n >(\n ({ table }) => <>{ToolbarButtons && <ToolbarButtons table={table} />}</>,\n [ToolbarButtons]\n );\n\n useEffect(() => {\n try {\n // Scroll to top of table when sorting or filters change.\n rowVirtualizerInstanceRef.current?.scrollToIndex?.(0);\n } catch (error) {\n console.error(error);\n }\n }, [columnFilters, globalFilter]);\n\n const table = useMaterialReactTable({\n columns: columns,\n data: data,\n enableBottomToolbar: false,\n enablePagination: false,\n enableRowVirtualization: true,\n enableSorting: false,\n getRowId: getRowId,\n initialState: initialState,\n muiToolbarAlertBannerProps: hasError\n ? { children: t(\"table.error\"), color: \"error\" }\n : undefined,\n onColumnFiltersChange: setColumnFilters,\n onGlobalFilterChange: setGlobalFilter,\n renderTopToolbarCustomActions: renderTopToolbarCustomActions,\n rowVirtualizerInstanceRef: rowVirtualizerInstanceRef,\n rowVirtualizerOptions: { overscan: 4 },\n state: modifiedState,\n });\n\n return <MaterialReactTable table={table} />;\n};\n\nconst MemoizedStaticTable = memo(StaticTable) as typeof StaticTable;\n\nexport { MemoizedStaticTable as StaticTable };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SACEA,qBAAqB,EAIrBC,kBAAkB,QACb,sBAAsB;AAC7B,SAEEC,IAAI,EACJC,WAAW,EACXC,SAAS,EACTC,OAAO,EACPC,MAAM,EACNC,QAAQ,QACH,OAAO;AACd,SAASC,cAAc,QAAQ,eAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAoB/C,MAAMC,WAAW,GAAGC,IAAA,IASW;EAAA,IATmC;IAChEC,OAAO,GAAG,EAAE;IACZC,IAAI,GAAG,EAAE;IACTC,QAAQ;IACRC,QAAQ;IACRC,YAAY;IACZC,oBAAoB;IACpBC,KAAK;IACLC;EACuB,CAAC,GAAAR,IAAA;EACxB,MAAM;IAAES;EAAE,CAAC,GAAGf,cAAc,CAAC,CAAC;EAE9B,MAAMgB,yBAAyB,GAC7BlB,MAAM,CAAuD,IAAI,CAAC;EAEpE,MAAM,CAACmB,aAAa,EAAEC,gBAAgB,CAAC,GAAGnB,QAAQ,CAChD,EACF,CAAC;EAED,MAAM,CAACoB,YAAY,EAAEC,eAAe,CAAC,GAAGrB,QAAQ,CAAS,CAAC;EAE1DH,SAAS,CAAC,MAAM;IACd,IAAIuB,YAAY,K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AAEQ,eAAe;IACrCG,6BAA6B,EAAEA,6BAA6B;IAC5DP,yBAAyB,EAAEA,yBAAyB;IACpDsB,qBAAqB,EAAE;MAAEC,QAAQ,EAAE;IAAE,CAAC;IACtC1B,KAAK,EAAES;EACT,CAAC,CAAC;EAEF,OAAOpB,IAAA,CAACT,kBAAkB;IAACgC,KAAK,EAAEA;EAAM,CAAE,CAAC;AAC7C,CAAC;AAED,MAAMe,mBAAmB,GAAG9C,IAAI,CAACW,WAAW,CAAuB;AAEnE,SAASmC,mBAAmB,IAAInC,WAAW"}
@@ -14,9 +14,12 @@ export { AdapterDateFns } from "@mui/x-date-pickers/AdapterDateFns";
14
14
  export { LocalizationProvider } from "@mui/x-date-pickers";
15
15
  export * from "./DatePicker.js";
16
16
  export * from "./datePickerTheme.js";
17
+ export * from "./DataTable.js";
18
+ export * from "./DataTablePagination.js";
19
+ export * from "./DataFilters.js";
17
20
  export * from "./materialReactTableTypes.js";
18
- export * from "./PaginatedTable.js";
19
21
  export * from "./StaticTable.js";
22
+ export * from "./PaginatedTable.js";
20
23
  export * from "./GroupPicker.js";
21
24
  export * from "./VirtualizedAutocomplete.js";
22
25
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["AdapterDateFns","LocalizationProvider"],"sources":["../../src/labs/index.ts"],"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\nexport { AdapterDateFns } from \"@mui/x-date-pickers/AdapterDateFns\";\nexport { LocalizationProvider } from \"@mui/x-date-pickers\";\nexport type { LocalizationProviderProps } from \"@mui/x-date-pickers\";\n\nexport type { MRT_ColumnDef as TableColumn } from \"material-react-table\";\n\nexport * from \"./DatePicker\";\nexport * from \"./datePickerTheme\";\n\nexport * from \"./materialReactTableTypes\";\nexport * from \"./PaginatedTable\";\nexport * from \"./StaticTable\";\nexport * from \"./GroupPicker\";\nexport * from \"./VirtualizedAutocomplete\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,cAAc,QAAQ,oCAAoC;AACnE,SAASC,oBAAoB,QAAQ,qBAAqB;AAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA"}
1
+ {"version":3,"file":"index.js","names":["AdapterDateFns","LocalizationProvider"],"sources":["../../src/labs/index.ts"],"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\nexport { AdapterDateFns } from \"@mui/x-date-pickers/AdapterDateFns\";\nexport { LocalizationProvider } from \"@mui/x-date-pickers\";\nexport type { LocalizationProviderProps } from \"@mui/x-date-pickers\";\n\nexport * from \"./DatePicker\";\nexport * from \"./datePickerTheme\";\n\nexport * from \"./DataTable\";\nexport * from \"./DataTablePagination\";\nexport * from \"./DataFilters\";\n\nexport * from \"./materialReactTableTypes\";\nexport * from \"./StaticTable\";\nexport * from \"./PaginatedTable\";\n\nexport * from \"./GroupPicker\";\nexport * from \"./VirtualizedAutocomplete\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,cAAc,QAAQ,oCAAoC;AACnE,SAASC,oBAAoB,QAAQ,qBAAqB;AAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"materialReactTableTypes.js","names":[],"sources":["../../src/labs/materialReactTableTypes.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 MaterialReactTable from \"material-react-table\";\n\nexport type DefaultMaterialReactTableData = Record<string, unknown>;\n\nexport type MaterialReactTableProps<\n TData extends DefaultMaterialReactTableData\n> = Parameters<typeof MaterialReactTable<TData>>[0];\n"],"mappings":""}
1
+ {"version":3,"file":"materialReactTableTypes.js","names":[],"sources":["../../src/labs/materialReactTableTypes.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 { MaterialReactTable } from \"material-react-table\";\n\nexport type DefaultMaterialReactTableData = Record<string, unknown>;\n\nexport type MaterialReactTableProps<\n TData extends DefaultMaterialReactTableData\n> = Parameters<typeof MaterialReactTable<TData>>[0];\n"],"mappings":""}
@@ -9,5 +9,6 @@
9
9
  *
10
10
  * See the License for the specific language governing permissions and limitations under the License.
11
11
  */
12
- export declare const CssBaseline: () => JSX.Element;
12
+ import { CssBaselineProps as MuiCssBaselineProps } from "@mui/material";
13
+ export declare const CssBaseline: (props: MuiCssBaselineProps) => JSX.Element;
13
14
  //# sourceMappingURL=CssBaseline.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CssBaseline.d.ts","sourceRoot":"","sources":["../../src/CssBaseline.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,eAAO,MAAM,WAAW,mBAA2B,CAAC"}
1
+ {"version":3,"file":"CssBaseline.d.ts","sourceRoot":"","sources":["../../src/CssBaseline.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAEL,gBAAgB,IAAI,mBAAmB,EACxC,MAAM,eAAe,CAAC;AAEvB,eAAO,MAAM,WAAW,UAAW,mBAAmB,gBAErD,CAAC"}
@@ -14,6 +14,7 @@ import { Divider, ListSubheader } from "@mui/material";
14
14
  import { type ReactElement } from "react";
15
15
  import { NullElement } from "./NullElement";
16
16
  import type { SeleniumProps } from "./SeleniumProps";
17
+ export declare const menuAlignmentValues: readonly ["left", "right"];
17
18
  export type MenuButtonProps = {
18
19
  /**
19
20
  * The ARIA label for the Button
@@ -38,7 +39,7 @@ export type MenuButtonProps = {
38
39
  /**
39
40
  * The <MenuItem> components within the Menu.
40
41
  */
41
- children: Array<ReactElement<typeof MenuItem | typeof Divider | typeof ListSubheader> | NullElement>;
42
+ children: ReactElement<typeof MenuItem | typeof Divider | typeof ListSubheader> | Array<ReactElement<typeof MenuItem | typeof Divider | typeof ListSubheader> | NullElement> | NullElement;
42
43
  /**
43
44
  * The end Icon on the trigggering Button
44
45
  */
@@ -51,6 +52,15 @@ export type MenuButtonProps = {
51
52
  * If the MenuButton is an overflow menu or standard menu.
52
53
  */
53
54
  isOverflow?: boolean;
55
+ /**
56
+ * The horizontal alignment of the menu.
57
+ */
58
+ menuAlignment?: (typeof menuAlignmentValues)[number];
59
+ /**
60
+ * If true (the default), the menu will close when a child MenuItem is clicked.
61
+ * Otherwise, it will remain open.
62
+ */
63
+ shouldCloseOnSelect?: boolean;
54
64
  /**
55
65
  * The size of the button
56
66
  */
@@ -72,6 +82,6 @@ export type MenuButtonProps = {
72
82
  ariaLabelledBy: string;
73
83
  buttonLabel?: undefined | "";
74
84
  }) & SeleniumProps;
75
- declare const MemoizedMenuButton: import("react").MemoExoticComponent<({ ariaLabel, ariaLabelledBy, ariaDescribedBy, buttonLabel, buttonVariant, children, endIcon: endIconProp, id: idOverride, isOverflow, size, testId, tooltipText, }: MenuButtonProps) => JSX.Element>;
85
+ declare const MemoizedMenuButton: import("react").MemoExoticComponent<({ ariaLabel, ariaLabelledBy, ariaDescribedBy, buttonLabel, buttonVariant, children, shouldCloseOnSelect, endIcon: endIconProp, id: idOverride, isOverflow, menuAlignment, size, testId, tooltipText, }: MenuButtonProps) => JSX.Element>;
76
86
  export { MemoizedMenuButton as MenuButton };
77
87
  //# sourceMappingURL=MenuButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MenuButton.d.ts","sourceRoot":"","sources":["../../src/MenuButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAEL,gBAAgB,EAChB,mBAAmB,EACnB,QAAQ,EAET,MAAM,IAAI,CAAC;AACZ,OAAO,EAAE,OAAO,EAAE,aAAa,EAAQ,MAAM,eAAe,CAAC;AAE7D,OAAO,EAAQ,KAAK,YAAY,EAAkC,MAAM,OAAO,CAAC;AAGhF,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,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;IACE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;CACrB,GACD;IACE,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,SAAS,GAAG,EAAE,CAAC;CAC9B,GACD;IACE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,SAAS,GAAG,EAAE,CAAC;CAC9B,CACJ,GACC,aAAa,CAAC;AA4GhB,QAAA,MAAM,kBAAkB,+OA3FrB,eAAe,iBA2FyB,CAAC;AAG5C,OAAO,EAAE,kBAAkB,IAAI,UAAU,EAAE,CAAC"}
@@ -13,6 +13,7 @@ import { MouseEventHandler } from "react";
13
13
  export type MenuContextType = {
14
14
  closeMenu: () => void;
15
15
  openMenu: MouseEventHandler<HTMLElement>;
16
+ shouldCloseOnSelect: boolean;
16
17
  };
17
18
  export declare const MenuContext: import("react").Context<MenuContextType>;
18
19
  //# sourceMappingURL=MenuContext.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MenuContext.d.ts","sourceRoot":"","sources":["../../src/MenuContext.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAiB,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAEzD,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAC;CAC1C,CAAC;AAEF,eAAO,MAAM,WAAW,0CAKtB,CAAC"}
1
+ {"version":3,"file":"MenuContext.d.ts","sourceRoot":"","sources":["../../src/MenuContext.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAiB,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAEzD,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAC;IACzC,mBAAmB,EAAE,OAAO,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,WAAW,0CAMtB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"MenuItem.d.ts","sourceRoot":"","sources":["../../src/MenuItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAEL,aAAa,IAAI,gBAAgB,EAClC,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAiC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGtE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,OAAO,CAAC,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC;IACtC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC;CACrC,GAAG,aAAa,CAAC;AA0ClB,QAAA,MAAM,gBAAgB,6IA/BnB,aAAa,iBA+BuB,CAAC;AAGxC,OAAO,EAAE,gBAAgB,IAAI,QAAQ,EAAE,CAAC"}
1
+ {"version":3,"file":"MenuItem.d.ts","sourceRoot":"","sources":["../../src/MenuItem.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAEL,aAAa,IAAI,gBAAgB,EAClC,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAiC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGtE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,OAAO,CAAC,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC;IACtC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC;CACrC,GAAG,aAAa,CAAC;AA4ClB,QAAA,MAAM,gBAAgB,6IAjCnB,aAAa,iBAiCuB,CAAC;AAGxC,OAAO,EAAE,gBAAgB,IAAI,QAAQ,EAAE,CAAC"}
@@ -23,6 +23,14 @@ export type SearchFieldProps = {
23
23
  * If `true`, the component will receive focus automatically.
24
24
  */
25
25
  hasInitialFocus?: boolean;
26
+ /**
27
+ * The id of the `input` element.
28
+ */
29
+ id?: string;
30
+ /**
31
+ * If `true`, the component is disabled.
32
+ */
33
+ isDisabled?: boolean;
26
34
  /**
27
35
  * This label won't show up visually, but it's required for accessibility.
28
36
  */
@@ -63,6 +71,14 @@ declare const MemoizedSearchField: import("react").MemoExoticComponent<import("r
63
71
  * If `true`, the component will receive focus automatically.
64
72
  */
65
73
  hasInitialFocus?: boolean | undefined;
74
+ /**
75
+ * The id of the `input` element.
76
+ */
77
+ id?: string | undefined;
78
+ /**
79
+ * If `true`, the component is disabled.
80
+ */
81
+ isDisabled?: boolean | undefined;
66
82
  /**
67
83
  * This label won't show up visually, but it's required for accessibility.
68
84
  */
@@ -1 +1 @@
1
- {"version":3,"file":"SearchField.d.ts","sourceRoot":"","sources":["../../src/SearchField.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,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AAM;IACb;;OAEG;;IAEH;;OAEG;qBACa,IAAI;IACpB;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;+HAqHwC,CAAC;AAG9C,OAAO,EAAE,mBAAmB,IAAI,WAAW,EAAE,CAAC"}
@@ -0,0 +1,16 @@
1
+ /*!
2
+ * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.
3
+ * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
4
+ *
5
+ * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
6
+ * Unless required by applicable law or agreed to in writing, software
7
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
8
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9
+ *
10
+ * See the License for the specific language governing permissions and limitations under the License.
11
+ */
12
+ /// <reference types="react" />
13
+ import { type SvgIconNoChildrenProps } from "../SvgIcon";
14
+ export type ArrowBottomIconProps = SvgIconNoChildrenProps;
15
+ export declare const ArrowBottomIcon: import("react").ForwardRefExoticComponent<Pick<SvgIconNoChildrenProps, "string" | "className" | "style" | "classes" | "children" | "color" | "fontSize" | "htmlColor" | "inheritViewBox" | "shapeRendering" | "sx" | "titleAccess" | "viewBox" | "clipPath" | "filter" | "mask" | "path" | "height" | "id" | "lang" | "max" | "media" | "method" | "min" | "name" | "target" | "type" | "width" | "role" | "tabIndex" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "alignmentBaseline" | "allowReorder" | "alphabetic" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "azimuth" | "baseFrequency" | "baselineShift" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clip" | "clipPathUnits" | "clipRule" | "colorInterpolation" | "colorInterpolationFilters" | "colorProfile" | "colorRendering" | "contentScriptType" | "contentStyleType" | "cursor" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "direction" | "display" | "divisor" | "dominantBaseline" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "end" | "exponent" | "externalResourcesRequired" | "fill" | "fillOpacity" | "fillRule" | "filterRes" | "filterUnits" | "floodColor" | "floodOpacity" | "focusable" | "fontFamily" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "format" | "fr" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphOrientationVertical" | "glyphRef" | "gradientTransform" | "gradientUnits" | "hanging" | "horizAdvX" | "horizOriginX" | "href" | "ideographic" | "imageRendering" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "letterSpacing" | "lightingColor" | "limitingConeAngle" | "local" | "markerEnd" | "markerHeight" | "markerMid" | "markerStart" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mathematical" | "mode" | "numOctaves" | "offset" | "opacity" | "operator" | "order" | "orient" | "orientation" | "origin" | "overflow" | "overlinePosition" | "overlineThickness" | "paintOrder" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "pointerEvents" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rotate" | "rx" | "ry" | "scale" | "seed" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "stopColor" | "stopOpacity" | "strikethroughPosition" | "strikethroughThickness" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textAnchor" | "textDecoration" | "textLength" | "textRendering" | "to" | "transform" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeBidi" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "values" | "vectorEffect" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewTarget" | "visibility" | "vMathematical" | "widths" | "wordSpacing" | "writingMode" | "x1" | "x2" | "x" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "y" | "yChannelSelector" | "z" | "zoomAndPan" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key"> & import("react").RefAttributes<SVGSVGElement>>;
16
+ //# sourceMappingURL=ArrowBottom.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ArrowBottom.d.ts","sourceRoot":"","sources":["../../../src/icons.generated/ArrowBottom.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;;AAKH,OAAO,EAAW,KAAK,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAElE,MAAM,MAAM,oBAAoB,GAAG,sBAAsB,CAAC;AAE1D,eAAO,MAAM,eAAe,8pPAqB3B,CAAC"}
@@ -0,0 +1,16 @@
1
+ /*!
2
+ * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.
3
+ * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
4
+ *
5
+ * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
6
+ * Unless required by applicable law or agreed to in writing, software
7
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
8
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9
+ *
10
+ * See the License for the specific language governing permissions and limitations under the License.
11
+ */
12
+ /// <reference types="react" />
13
+ import { type SvgIconNoChildrenProps } from "../SvgIcon";
14
+ export type ArrowTopIconProps = SvgIconNoChildrenProps;
15
+ export declare const ArrowTopIcon: import("react").ForwardRefExoticComponent<Pick<SvgIconNoChildrenProps, "string" | "className" | "style" | "classes" | "children" | "color" | "fontSize" | "htmlColor" | "inheritViewBox" | "shapeRendering" | "sx" | "titleAccess" | "viewBox" | "clipPath" | "filter" | "mask" | "path" | "height" | "id" | "lang" | "max" | "media" | "method" | "min" | "name" | "target" | "type" | "width" | "role" | "tabIndex" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "alignmentBaseline" | "allowReorder" | "alphabetic" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "azimuth" | "baseFrequency" | "baselineShift" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clip" | "clipPathUnits" | "clipRule" | "colorInterpolation" | "colorInterpolationFilters" | "colorProfile" | "colorRendering" | "contentScriptType" | "contentStyleType" | "cursor" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "direction" | "display" | "divisor" | "dominantBaseline" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "end" | "exponent" | "externalResourcesRequired" | "fill" | "fillOpacity" | "fillRule" | "filterRes" | "filterUnits" | "floodColor" | "floodOpacity" | "focusable" | "fontFamily" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "format" | "fr" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphOrientationVertical" | "glyphRef" | "gradientTransform" | "gradientUnits" | "hanging" | "horizAdvX" | "horizOriginX" | "href" | "ideographic" | "imageRendering" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "letterSpacing" | "lightingColor" | "limitingConeAngle" | "local" | "markerEnd" | "markerHeight" | "markerMid" | "markerStart" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mathematical" | "mode" | "numOctaves" | "offset" | "opacity" | "operator" | "order" | "orient" | "orientation" | "origin" | "overflow" | "overlinePosition" | "overlineThickness" | "paintOrder" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "pointerEvents" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rotate" | "rx" | "ry" | "scale" | "seed" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "stopColor" | "stopOpacity" | "strikethroughPosition" | "strikethroughThickness" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textAnchor" | "textDecoration" | "textLength" | "textRendering" | "to" | "transform" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeBidi" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "values" | "vectorEffect" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewTarget" | "visibility" | "vMathematical" | "widths" | "wordSpacing" | "writingMode" | "x1" | "x2" | "x" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "y" | "yChannelSelector" | "z" | "zoomAndPan" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key"> & import("react").RefAttributes<SVGSVGElement>>;
16
+ //# sourceMappingURL=ArrowTop.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ArrowTop.d.ts","sourceRoot":"","sources":["../../../src/icons.generated/ArrowTop.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;;AAKH,OAAO,EAAW,KAAK,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAElE,MAAM,MAAM,iBAAiB,GAAG,sBAAsB,CAAC;AAEvD,eAAO,MAAM,YAAY,8pPAqBxB,CAAC"}
@@ -12,11 +12,13 @@
12
12
  export * from "./Add";
13
13
  export * from "./AddCircle";
14
14
  export * from "./Apps";
15
+ export * from "./ArrowBottom";
15
16
  export * from "./ArrowDown";
16
17
  export * from "./ArrowLeft";
17
18
  export * from "./ArrowLowerLeft";
18
19
  export * from "./ArrowLowerRight";
19
20
  export * from "./ArrowRight";
21
+ export * from "./ArrowTop";
20
22
  export * from "./ArrowUnsorted";
21
23
  export * from "./ArrowUp";
22
24
  export * from "./ArrowUpperLeft";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/icons.generated/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,cAAc,OAAO,CAAC;AACtB,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB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AChC,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,85 @@
1
+ /*!
2
+ * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.
3
+ * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
4
+ *
5
+ * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
6
+ * Unless required by applicable law or agreed to in writing, software
7
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
8
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9
+ *
10
+ * See the License for the specific language governing permissions and limitations under the License.
11
+ */
12
+ import { ReactNode } from "react";
13
+ import { MRT_ColumnDef, MRT_RowData } from "material-react-table";
14
+ export type DataFilterValue = string | string[] | undefined;
15
+ export type DataFilter = {
16
+ /**
17
+ * A unique ID for the filter, typically the same id
18
+ * as the column it'll be applied to.
19
+ */
20
+ id: string;
21
+ /**
22
+ * The human-friendly name of the filter.
23
+ */
24
+ label: string;
25
+ /**
26
+ * The type of filter, which determines which filtering control
27
+ * is shown.
28
+ */
29
+ variant?: MRT_ColumnDef<MRT_RowData>["filterVariant"];
30
+ /**
31
+ * The current value of the filter. Typically a string, but
32
+ * filters that allow for multiple selections (such as multi-select)
33
+ * can accept an array.
34
+ */
35
+ value?: DataFilterValue;
36
+ /**
37
+ * If the filter control has preset options (such as a select or multi-select),
38
+ * these are the options provided.
39
+ */
40
+ options?: Array<{
41
+ label: string;
42
+ value: string;
43
+ }>;
44
+ };
45
+ export type DataFiltersProps = {
46
+ /**
47
+ * The callback that's fired when the search input changes
48
+ * (either on change or on submit, based on the value of `hasSearchSubmitButton`).
49
+ * If this is undefined, the search input will not be shown.
50
+ */
51
+ onChangeSearch?: (value: string) => void;
52
+ /**
53
+ * The callback that's fired when filter values change.
54
+ */
55
+ onChangeFilters?: (filters: Array<DataFilter>) => void;
56
+ /**
57
+ * If true, a Search button will be provided alongside the search input
58
+ * and `onChangeSearch` will fire when the button is clicked, rather than
59
+ * whenever the input value changes.
60
+ */
61
+ hasSearchSubmitButton?: boolean;
62
+ /**
63
+ * The debounce time, in milliseconds, for the search input firing
64
+ * `onChangeSearch` when changed. If `hasSearchSubmitButton` is true,
65
+ * this doesn't do anything.
66
+ */
67
+ searchDelayTime?: number;
68
+ /**
69
+ * The starting value of the search input
70
+ */
71
+ defaultSearchTerm?: string;
72
+ /**
73
+ * A slot for optional additional actions, like buttons, to be displayed
74
+ * on the opposite side of the top row from the search and filter controls.
75
+ */
76
+ additionalActions?: ReactNode;
77
+ /**
78
+ * The filters available in the filter menu. If undefined,
79
+ * the filter menu won't be shown.
80
+ */
81
+ filters?: Array<DataFilter>;
82
+ };
83
+ declare const MemoizedDataFilters: import("react").MemoExoticComponent<({ onChangeSearch, onChangeFilters, hasSearchSubmitButton, searchDelayTime, defaultSearchTerm, additionalActions, filters: filtersProp, }: DataFiltersProps) => JSX.Element>;
84
+ export { MemoizedDataFilters as DataFilters };
85
+ //# sourceMappingURL=DataFilters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataFilters.d.ts","sourceRoot":"","sources":["../../../src/labs/DataFilters.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAEL,SAAS,EAOV,MAAM,OAAO,CAAC;AAyBf,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAElE,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC;AAG5D,MAAM,MAAM,UAAU,GAAG;IACvB;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC,eAAe,CAAC,CAAC;IACtD;;;;OAIG;IACH,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB;;;OAGG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACnD,CAAC;AAGF,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;;;OAIG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC;;OAEG;IACH,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;IAC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