@okta/odyssey-react-mui 1.32.0 → 1.33.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/dist/cjs/Autocomplete.cjs +1 -1
- package/dist/cjs/Autocomplete.cjs.map +1 -1
- package/dist/cjs/Breadcrumbs.cjs +23 -7
- package/dist/cjs/Breadcrumbs.cjs.map +1 -1
- package/dist/cjs/DatePickers/datePickerTheme.cjs +1 -1
- package/dist/cjs/DatePickers/datePickerTheme.cjs.map +1 -1
- package/dist/cjs/OdysseyProvider.cjs +2 -2
- package/dist/cjs/OdysseyProvider.cjs.map +1 -1
- package/dist/cjs/OdysseyThemeProvider.cjs +2 -2
- package/dist/cjs/OdysseyThemeProvider.cjs.map +1 -1
- package/dist/cjs/hexToRgb.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/properties/ts/odyssey-react-mui_cs.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_cs.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_da.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_da.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_de.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_de.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_el.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_el.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_es.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_es.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_fi.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_fi.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_fr.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_fr.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ht.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_ht.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_hu.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_hu.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_id.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_id.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_it.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_it.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ja.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_ja.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ko.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_ko.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ms.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_ms.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_nb.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_nb.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_nl_NL.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_nl_NL.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_pl.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_pl.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_pt_BR.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_pt_BR.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ro.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_ro.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ru.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_ru.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_sv.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_sv.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_th.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_th.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_tr.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_tr.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_uk.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_uk.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_vi.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_vi.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_zh_CN.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_zh_CN.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_zh_TW.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_zh_TW.cjs.map +1 -1
- package/dist/cjs/theme/components.cjs +6 -0
- package/dist/cjs/theme/components.cjs.map +1 -1
- package/{src/theme/palette.types.ts → dist/cjs/theme/pxToRem.cjs} +10 -13
- package/dist/cjs/theme/pxToRem.cjs.map +1 -0
- package/dist/cjs/theme/theme.cjs +22 -0
- package/dist/cjs/theme/theme.cjs.map +1 -1
- package/dist/cjs/theme/useMediaQuery.cjs +34 -0
- package/dist/cjs/theme/useMediaQuery.cjs.map +1 -0
- package/dist/cjs/ui-shell/AppSwitcher/AppSwitcher.cjs +3 -3
- package/dist/cjs/ui-shell/AppSwitcher/AppSwitcher.cjs.map +1 -1
- package/dist/cjs/ui-shell/NarrowUiShellContent.cjs +340 -0
- package/dist/cjs/ui-shell/NarrowUiShellContent.cjs.map +1 -0
- package/dist/cjs/ui-shell/SideNav/SideNav.cjs +64 -45
- package/dist/cjs/ui-shell/SideNav/SideNav.cjs.map +1 -1
- package/dist/cjs/ui-shell/SideNav/SideNavHeader.cjs +8 -5
- package/dist/cjs/ui-shell/SideNav/SideNavHeader.cjs.map +1 -1
- package/dist/cjs/ui-shell/SideNav/SideNavItemContent.cjs +39 -11
- package/dist/cjs/ui-shell/SideNav/SideNavItemContent.cjs.map +1 -1
- package/dist/cjs/ui-shell/SideNav/SideNavItemLinkContent.cjs +3 -1
- package/dist/cjs/ui-shell/SideNav/SideNavItemLinkContent.cjs.map +1 -1
- package/dist/cjs/ui-shell/SideNav/SideNavLogo.cjs +14 -2
- package/dist/cjs/ui-shell/SideNav/SideNavLogo.cjs.map +1 -1
- package/dist/cjs/ui-shell/SideNav/SideNavToggleButton.cjs +2 -1
- package/dist/cjs/ui-shell/SideNav/SideNavToggleButton.cjs.map +1 -1
- package/dist/cjs/ui-shell/SideNav/types.cjs.map +1 -1
- package/dist/cjs/ui-shell/TopNav/HamburgerMenuIcon.cjs +37 -0
- package/dist/cjs/ui-shell/TopNav/HamburgerMenuIcon.cjs.map +1 -0
- package/dist/cjs/ui-shell/TopNav/TopNav.cjs +5 -5
- package/dist/cjs/ui-shell/TopNav/TopNav.cjs.map +1 -1
- package/dist/cjs/ui-shell/UiShell.cjs +37 -18
- package/dist/cjs/ui-shell/UiShell.cjs.map +1 -1
- package/dist/cjs/ui-shell/UiShellProvider.cjs +10 -3
- package/dist/cjs/ui-shell/UiShellProvider.cjs.map +1 -1
- package/dist/cjs/ui-shell/WideUiShellContent.cjs +171 -0
- package/dist/cjs/ui-shell/WideUiShellContent.cjs.map +1 -0
- package/dist/cjs/ui-shell/index.cjs +36 -0
- package/dist/cjs/ui-shell/index.cjs.map +1 -1
- package/dist/cjs/ui-shell/renderUiShell.cjs +19 -20
- package/dist/cjs/ui-shell/renderUiShell.cjs.map +1 -1
- package/{src/TagListContext.tsx → dist/cjs/ui-shell/uiShellContentTypes.cjs} +9 -12
- package/dist/cjs/ui-shell/uiShellContentTypes.cjs.map +1 -0
- package/dist/cjs/ui-shell/uiShellSharedConstants.cjs +22 -0
- package/dist/cjs/ui-shell/uiShellSharedConstants.cjs.map +1 -0
- package/dist/cjs/ui-shell/useMatchAppElementToUiShellAppArea.cjs +108 -0
- package/dist/cjs/ui-shell/useMatchAppElementToUiShellAppArea.cjs.map +1 -0
- package/dist/cjs/ui-shell/useScrollState.cjs +2 -4
- package/dist/cjs/ui-shell/useScrollState.cjs.map +1 -1
- package/dist/cjs/ui-shell/useUiShellBreakpoints.cjs +41 -0
- package/dist/cjs/ui-shell/useUiShellBreakpoints.cjs.map +1 -0
- package/dist/cjs/useContrastMode.cjs +1 -1
- package/dist/cjs/useContrastMode.cjs.map +1 -1
- package/dist/cjs/web-component/createReactRootElements.cjs.map +1 -1
- package/dist/cjs/web-component/renderReactInWebComponent.cjs +6 -1
- package/dist/cjs/web-component/renderReactInWebComponent.cjs.map +1 -1
- package/dist/esm/Autocomplete.js +1 -1
- package/dist/esm/Autocomplete.js.map +1 -1
- package/dist/esm/Breadcrumbs.js +23 -7
- package/dist/esm/Breadcrumbs.js.map +1 -1
- package/dist/esm/DatePickers/datePickerTheme.js +1 -1
- package/dist/esm/DatePickers/datePickerTheme.js.map +1 -1
- package/dist/esm/OdysseyProvider.js +2 -2
- package/dist/esm/OdysseyProvider.js.map +1 -1
- package/dist/esm/OdysseyThemeProvider.js +2 -2
- package/dist/esm/OdysseyThemeProvider.js.map +1 -1
- package/dist/esm/hexToRgb.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/properties/ts/odyssey-react-mui_cs.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_cs.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_da.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_da.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_de.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_de.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_el.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_el.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_es.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_es.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_fi.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_fi.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_fr.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_fr.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ht.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_ht.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_hu.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_hu.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_id.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_id.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_it.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_it.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ja.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_ja.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ko.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_ko.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ms.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_ms.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_nb.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_nb.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_nl_NL.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_nl_NL.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_pl.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_pl.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_pt_BR.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_pt_BR.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ro.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_ro.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ru.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_ru.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_sv.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_sv.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_th.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_th.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_tr.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_tr.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_uk.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_uk.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_vi.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_vi.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_zh_CN.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_zh_CN.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_zh_TW.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_zh_TW.js.map +1 -1
- package/dist/esm/theme/components.js +6 -0
- package/dist/esm/theme/components.js.map +1 -1
- package/{src/shadow-dom/index.ts → dist/esm/theme/pxToRem.js} +2 -1
- package/dist/esm/theme/pxToRem.js.map +1 -0
- package/dist/esm/theme/theme.js +2 -0
- package/dist/esm/theme/theme.js.map +1 -1
- package/{src/ui-shell/useHasUiShell.ts → dist/esm/theme/useMediaQuery.js} +13 -11
- package/dist/esm/theme/useMediaQuery.js.map +1 -0
- package/dist/esm/ui-shell/AppSwitcher/AppSwitcher.js +2 -2
- package/dist/esm/ui-shell/AppSwitcher/AppSwitcher.js.map +1 -1
- package/dist/esm/ui-shell/NarrowUiShellContent.js +334 -0
- package/dist/esm/ui-shell/NarrowUiShellContent.js.map +1 -0
- package/dist/esm/ui-shell/SideNav/SideNav.js +63 -44
- package/dist/esm/ui-shell/SideNav/SideNav.js.map +1 -1
- package/dist/esm/ui-shell/SideNav/SideNavHeader.js +7 -4
- package/dist/esm/ui-shell/SideNav/SideNavHeader.js.map +1 -1
- package/dist/esm/ui-shell/SideNav/SideNavItemContent.js +40 -12
- package/dist/esm/ui-shell/SideNav/SideNavItemContent.js.map +1 -1
- package/dist/esm/ui-shell/SideNav/SideNavItemLinkContent.js +3 -1
- package/dist/esm/ui-shell/SideNav/SideNavItemLinkContent.js.map +1 -1
- package/dist/esm/ui-shell/SideNav/SideNavLogo.js +14 -2
- package/dist/esm/ui-shell/SideNav/SideNavLogo.js.map +1 -1
- package/dist/esm/ui-shell/SideNav/SideNavToggleButton.js +2 -1
- package/dist/esm/ui-shell/SideNav/SideNavToggleButton.js.map +1 -1
- package/dist/esm/ui-shell/SideNav/types.js.map +1 -1
- package/dist/esm/ui-shell/TopNav/HamburgerMenuIcon.js +32 -0
- package/dist/esm/ui-shell/TopNav/HamburgerMenuIcon.js.map +1 -0
- package/dist/esm/ui-shell/TopNav/TopNav.js +2 -2
- package/dist/esm/ui-shell/TopNav/TopNav.js.map +1 -1
- package/dist/esm/ui-shell/UiShell.js +37 -18
- package/dist/esm/ui-shell/UiShell.js.map +1 -1
- package/dist/esm/ui-shell/UiShellProvider.js +10 -3
- package/dist/esm/ui-shell/UiShellProvider.js.map +1 -1
- package/dist/esm/ui-shell/WideUiShellContent.js +165 -0
- package/dist/esm/ui-shell/WideUiShellContent.js.map +1 -0
- package/dist/esm/ui-shell/index.js +3 -0
- package/dist/esm/ui-shell/index.js.map +1 -1
- package/dist/esm/ui-shell/renderUiShell.js +19 -20
- package/dist/esm/ui-shell/renderUiShell.js.map +1 -1
- package/{src/DataTable/constants.ts → dist/esm/ui-shell/uiShellContentTypes.js} +3 -2
- package/dist/esm/ui-shell/uiShellContentTypes.js.map +1 -0
- package/{src/CssBaseline.tsx → dist/esm/ui-shell/uiShellSharedConstants.js} +7 -11
- package/dist/esm/ui-shell/uiShellSharedConstants.js.map +1 -0
- package/dist/esm/ui-shell/useMatchAppElementToUiShellAppArea.js +99 -0
- package/dist/esm/ui-shell/useMatchAppElementToUiShellAppArea.js.map +1 -0
- package/dist/esm/ui-shell/useScrollState.js +3 -5
- package/dist/esm/ui-shell/useScrollState.js.map +1 -1
- package/dist/esm/ui-shell/useUiShellBreakpoints.js +34 -0
- package/dist/esm/ui-shell/useUiShellBreakpoints.js.map +1 -0
- package/dist/esm/useContrastMode.js +2 -2
- package/dist/esm/useContrastMode.js.map +1 -1
- package/dist/esm/web-component/createReactRootElements.js.map +1 -1
- package/dist/esm/web-component/renderReactInWebComponent.js +6 -1
- package/dist/esm/web-component/renderReactInWebComponent.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.scss +1 -1
- package/dist/tsconfig.production.tsbuildinfo +1 -1
- package/dist/types/Autocomplete.d.ts +1 -1
- package/dist/types/Breadcrumbs.d.ts +4 -3
- package/dist/types/Breadcrumbs.d.ts.map +1 -1
- package/dist/types/OdysseyProvider.d.ts +1 -1
- package/dist/types/OdysseyProvider.d.ts.map +1 -1
- package/dist/types/OdysseyThemeProvider.d.ts.map +1 -1
- package/dist/types/OdysseyTranslationProvider.d.ts +1 -1
- package/dist/types/OdysseyTranslationProvider.d.ts.map +1 -1
- package/dist/types/hexToRgb.d.ts.map +1 -1
- package/dist/types/i18n.d.ts +28 -0
- package/dist/types/i18n.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/properties/ts/odyssey-react-mui_cs.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_cs.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_da.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_da.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_de.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_de.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_el.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_el.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_es.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_es.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_fi.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_fi.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_fr.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_fr.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ht.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_ht.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_hu.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_hu.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_id.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_id.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_it.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_it.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ja.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_ja.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ko.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_ko.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ms.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_ms.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_nb.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_nb.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_nl_NL.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_nl_NL.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_pl.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_pl.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_pt_BR.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_pt_BR.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ro.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_ro.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ru.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_ru.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_sv.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_sv.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_th.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_th.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_tr.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_tr.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_uk.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_uk.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_vi.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_vi.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_zh_CN.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_zh_CN.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_zh_TW.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_zh_TW.d.ts.map +1 -1
- package/dist/types/theme/components.d.ts.map +1 -1
- package/{src/DatePickers/index.ts → dist/types/theme/pxToRem.d.ts} +3 -5
- package/dist/types/theme/pxToRem.d.ts.map +1 -0
- package/dist/types/theme/theme.d.ts +2 -0
- package/dist/types/theme/theme.d.ts.map +1 -1
- package/{src/web-component/index.ts → dist/types/theme/useMediaQuery.d.ts} +2 -2
- package/dist/types/theme/useMediaQuery.d.ts.map +1 -0
- package/dist/types/ui-shell/AppSwitcher/AppSwitcher.d.ts.map +1 -1
- package/dist/types/ui-shell/NarrowUiShellContent.d.ts +17 -0
- package/dist/types/ui-shell/NarrowUiShellContent.d.ts.map +1 -0
- package/dist/types/ui-shell/SideNav/SideNav.d.ts +1 -3
- package/dist/types/ui-shell/SideNav/SideNav.d.ts.map +1 -1
- package/dist/types/ui-shell/SideNav/SideNavHeader.d.ts.map +1 -1
- package/dist/types/ui-shell/SideNav/SideNavItemContent.d.ts +9 -7
- package/dist/types/ui-shell/SideNav/SideNavItemContent.d.ts.map +1 -1
- package/dist/types/ui-shell/SideNav/SideNavItemLinkContent.d.ts +1 -1
- package/dist/types/ui-shell/SideNav/SideNavItemLinkContent.d.ts.map +1 -1
- package/dist/types/ui-shell/SideNav/SideNavLogo.d.ts.map +1 -1
- package/dist/types/ui-shell/SideNav/SideNavToggleButton.d.ts.map +1 -1
- package/dist/types/ui-shell/SideNav/types.d.ts +12 -2
- package/dist/types/ui-shell/SideNav/types.d.ts.map +1 -1
- package/{src/Buttons/ButtonContext.tsx → dist/types/ui-shell/TopNav/HamburgerMenuIcon.d.ts} +5 -12
- package/dist/types/ui-shell/TopNav/HamburgerMenuIcon.d.ts.map +1 -0
- package/dist/types/ui-shell/TopNav/TopNav.d.ts +0 -1
- package/dist/types/ui-shell/TopNav/TopNav.d.ts.map +1 -1
- package/dist/types/ui-shell/UiShell.d.ts +20 -7
- package/dist/types/ui-shell/UiShell.d.ts.map +1 -1
- package/dist/types/ui-shell/UiShellProvider.d.ts +8 -6
- package/dist/types/ui-shell/UiShellProvider.d.ts.map +1 -1
- package/{src/Buttons/index.ts → dist/types/ui-shell/WideUiShellContent.d.ts} +5 -14
- package/dist/types/ui-shell/WideUiShellContent.d.ts.map +1 -0
- package/dist/types/ui-shell/index.d.ts +3 -1
- package/dist/types/ui-shell/index.d.ts.map +1 -1
- package/dist/types/ui-shell/renderUiShell.d.ts +7 -11
- package/dist/types/ui-shell/renderUiShell.d.ts.map +1 -1
- package/dist/types/ui-shell/uiShellContentTypes.d.ts +96 -0
- package/dist/types/ui-shell/uiShellContentTypes.d.ts.map +1 -0
- package/{src/@types/i18next.d.ts → dist/types/ui-shell/uiShellSharedConstants.d.ts} +7 -14
- package/dist/types/ui-shell/uiShellSharedConstants.d.ts.map +1 -0
- package/dist/types/ui-shell/useMatchAppElementToUiShellAppArea.d.ts +38 -0
- package/dist/types/ui-shell/useMatchAppElementToUiShellAppArea.d.ts.map +1 -0
- package/dist/types/ui-shell/useScrollState.d.ts +0 -1
- package/dist/types/ui-shell/useScrollState.d.ts.map +1 -1
- package/{src/FieldsetContext.tsx → dist/types/ui-shell/useUiShellBreakpoints.d.ts} +7 -12
- package/dist/types/ui-shell/useUiShellBreakpoints.d.ts.map +1 -0
- package/dist/types/web-component/createReactRootElements.d.ts +6 -4
- package/dist/types/web-component/createReactRootElements.d.ts.map +1 -1
- package/dist/types/web-component/renderReactInWebComponent.d.ts +12 -5
- package/dist/types/web-component/renderReactInWebComponent.d.ts.map +1 -1
- package/package.json +4 -4
- package/.browserslistrc +0 -1
- package/.svgrrc.cjs +0 -13
- package/CHANGELOG.md +0 -1490
- package/babel.config.cjs +0 -112
- package/dist/cjs/ui-shell/UiShellContent.cjs +0 -226
- package/dist/cjs/ui-shell/UiShellContent.cjs.map +0 -1
- package/dist/esm/ui-shell/UiShellContent.js +0 -220
- package/dist/esm/ui-shell/UiShellContent.js.map +0 -1
- package/dist/types/ui-shell/UiShellContent.d.ts +0 -76
- package/dist/types/ui-shell/UiShellContent.d.ts.map +0 -1
- package/i18n.config.json +0 -10
- package/scripts/generateIconsIndex.ts +0 -49
- package/scripts/generateTestSelectorsJson.ts +0 -33
- package/scripts/properties-to-ts.ts +0 -111
- package/src/@types/properties.d.ts +0 -292
- package/src/@types/react-augment.d.ts +0 -22
- package/src/Accordion.tsx +0 -117
- package/src/Autocomplete.tsx +0 -321
- package/src/Badge.tsx +0 -112
- package/src/Banner.tsx +0 -112
- package/src/Box.tsx +0 -44
- package/src/Breadcrumbs.tsx +0 -221
- package/src/Buttons/BaseButton.tsx +0 -250
- package/src/Buttons/BaseMenuButton.tsx +0 -342
- package/src/Buttons/Button.tsx +0 -30
- package/src/Buttons/MenuButton.tsx +0 -33
- package/src/Buttons/MenuContext.ts +0 -25
- package/src/Buttons/MenuItem.tsx +0 -103
- package/src/Callout.tsx +0 -176
- package/src/Card.tsx +0 -186
- package/src/Checkbox.tsx +0 -261
- package/src/CheckboxGroup.tsx +0 -127
- package/src/CircularProgress.tsx +0 -42
- package/src/DataTable/DataTable.tsx +0 -968
- package/src/DataTable/DataTableRowActions.tsx +0 -132
- package/src/DataTable/DataTableSettings.tsx +0 -136
- package/src/DataTable/index.tsx +0 -28
- package/src/DataTable/reorderDataRowsLocally.tsx +0 -48
- package/src/DataTable/useRowReordering.tsx +0 -232
- package/src/DataTable/useScrollIndication.tsx +0 -125
- package/src/DatePickers/DateField.tsx +0 -267
- package/src/DatePickers/DateFieldActionBar.tsx +0 -65
- package/src/DatePickers/DateFieldLocalizationProvider.tsx +0 -46
- package/src/DatePickers/DatePicker.test.tsx +0 -66
- package/src/DatePickers/DatePicker.tsx +0 -299
- package/src/DatePickers/DatePicker.types.d.ts +0 -14
- package/src/DatePickers/TimeZonePicker.tsx +0 -59
- package/src/DatePickers/datePickerTheme.tsx +0 -377
- package/src/DatePickers/useDateFieldsTranslations.ts +0 -94
- package/src/DatePickers/useOdysseyDateFields.ts +0 -303
- package/src/Dialog.tsx +0 -178
- package/src/Drawer.tsx +0 -255
- package/src/EmptyState.tsx +0 -79
- package/src/ErrorMessageList.tsx +0 -56
- package/src/Field.tsx +0 -189
- package/src/FieldComponentProps.ts +0 -66
- package/src/FieldError.tsx +0 -59
- package/src/FieldHint.tsx +0 -72
- package/src/FieldLabel.tsx +0 -67
- package/src/Fieldset.tsx +0 -116
- package/src/FileUploader/FileUploadIllustration.tsx +0 -66
- package/src/FileUploader/FileUploadPreview.tsx +0 -151
- package/src/FileUploader/FileUploader.tsx +0 -311
- package/src/FileUploader/index.ts +0 -13
- package/src/Form.tsx +0 -185
- package/src/FormCheckedProps.ts +0 -59
- package/src/HintLink.tsx +0 -28
- package/src/HtmlProps.ts +0 -112
- package/src/IconWithTooltip.tsx +0 -90
- package/src/Link.tsx +0 -115
- package/src/MuiPropsChild.tsx +0 -42
- package/src/MuiPropsContext.ts +0 -18
- package/src/NativeSelect.tsx +0 -249
- package/src/NullElement.tsx +0 -13
- package/src/OdysseyCacheProvider.test.tsx +0 -39
- package/src/OdysseyCacheProvider.tsx +0 -86
- package/src/OdysseyDesignTokensContext.tsx +0 -23
- package/src/OdysseyProvider.tsx +0 -92
- package/src/OdysseyThemeProvider.test.tsx +0 -211
- package/src/OdysseyThemeProvider.tsx +0 -109
- package/src/OdysseyTranslationProvider.test.tsx +0 -95
- package/src/OdysseyTranslationProvider.tsx +0 -77
- package/src/OdysseyTranslationProvider.types.ts +0 -47
- package/src/Pagination/Pagination.test.tsx +0 -327
- package/src/Pagination/Pagination.tsx +0 -417
- package/src/Pagination/constants.ts +0 -13
- package/src/Pagination/index.ts +0 -15
- package/src/Pagination/usePagination.ts +0 -45
- package/src/PasswordField.tsx +0 -253
- package/src/Radio.tsx +0 -199
- package/src/RadioGroup.tsx +0 -164
- package/src/ScreenReaderText.tsx +0 -53
- package/src/SearchField.tsx +0 -240
- package/src/Select.tsx +0 -576
- package/src/Stack.tsx +0 -56
- package/src/Status.tsx +0 -67
- package/src/Surface.tsx +0 -61
- package/src/SvgIcon.ts +0 -22
- package/src/Switch.tsx +0 -425
- package/src/Tabs.tsx +0 -259
- package/src/Tag.tsx +0 -317
- package/src/TagList.tsx +0 -55
- package/src/TextField.tsx +0 -298
- package/src/Toast.tsx +0 -151
- package/src/ToastStack.tsx +0 -43
- package/src/Tooltip.tsx +0 -61
- package/src/Typography.test.tsx +0 -26
- package/src/Typography.tsx +0 -474
- package/src/createContrastColors.ts +0 -112
- package/src/createUniqueAlphabeticalId.test.ts +0 -22
- package/src/createUniqueAlphabeticalId.ts +0 -17
- package/src/createUniqueId.test.ts +0 -22
- package/src/createUniqueId.ts +0 -17
- package/src/getTypedObjectKeys.ts +0 -15
- package/src/hexToRgb.ts +0 -40
- package/src/i18n.ts +0 -110
- package/src/icons.generated/Add.tsx +0 -44
- package/src/icons.generated/AddCircle.tsx +0 -46
- package/src/icons.generated/Apps.tsx +0 -44
- package/src/icons.generated/ArrowBottom.tsx +0 -46
- package/src/icons.generated/ArrowDown.tsx +0 -46
- package/src/icons.generated/ArrowLeft.tsx +0 -46
- package/src/icons.generated/ArrowLowerLeft.tsx +0 -46
- package/src/icons.generated/ArrowLowerRight.tsx +0 -46
- package/src/icons.generated/ArrowRight.tsx +0 -46
- package/src/icons.generated/ArrowTop.tsx +0 -46
- package/src/icons.generated/ArrowUnsorted.tsx +0 -46
- package/src/icons.generated/ArrowUp.tsx +0 -46
- package/src/icons.generated/ArrowUpperLeft.tsx +0 -46
- package/src/icons.generated/ArrowUpperRight.tsx +0 -46
- package/src/icons.generated/Bug.tsx +0 -44
- package/src/icons.generated/Calendar.tsx +0 -46
- package/src/icons.generated/Call.tsx +0 -44
- package/src/icons.generated/Chat.tsx +0 -44
- package/src/icons.generated/Check.tsx +0 -44
- package/src/icons.generated/CheckCircleFilled.tsx +0 -47
- package/src/icons.generated/ChevronDown.tsx +0 -46
- package/src/icons.generated/ChevronLeft.tsx +0 -46
- package/src/icons.generated/ChevronRight.tsx +0 -46
- package/src/icons.generated/ChevronUp.tsx +0 -46
- package/src/icons.generated/Clock.tsx +0 -44
- package/src/icons.generated/Close.tsx +0 -44
- package/src/icons.generated/CloseCircleFilled.tsx +0 -47
- package/src/icons.generated/CollapseLeft.tsx +0 -46
- package/src/icons.generated/CollapseRight.tsx +0 -46
- package/src/icons.generated/Copy.tsx +0 -44
- package/src/icons.generated/Custom.tsx +0 -50
- package/src/icons.generated/DangerDiamond.tsx +0 -46
- package/src/icons.generated/DangerDiamondFilled.tsx +0 -47
- package/src/icons.generated/Delete.tsx +0 -44
- package/src/icons.generated/Deny.tsx +0 -44
- package/src/icons.generated/Devices.tsx +0 -46
- package/src/icons.generated/Directory.tsx +0 -46
- package/src/icons.generated/Documentation.tsx +0 -46
- package/src/icons.generated/Download.tsx +0 -46
- package/src/icons.generated/DragIndicator.tsx +0 -46
- package/src/icons.generated/Duo.tsx +0 -62
- package/src/icons.generated/Edit.tsx +0 -44
- package/src/icons.generated/Email.tsx +0 -49
- package/src/icons.generated/ExpandLeft.tsx +0 -46
- package/src/icons.generated/ExpandRight.tsx +0 -46
- package/src/icons.generated/ExternalLink.tsx +0 -44
- package/src/icons.generated/Fido2.tsx +0 -72
- package/src/icons.generated/Filter.tsx +0 -44
- package/src/icons.generated/Folder.tsx +0 -44
- package/src/icons.generated/Globe.tsx +0 -44
- package/src/icons.generated/GoogleAuth.tsx +0 -70
- package/src/icons.generated/Grid.tsx +0 -47
- package/src/icons.generated/Group.tsx +0 -44
- package/src/icons.generated/Hide.tsx +0 -44
- package/src/icons.generated/Home.tsx +0 -44
- package/src/icons.generated/Idp.tsx +0 -54
- package/src/icons.generated/InformationCircle.tsx +0 -47
- package/src/icons.generated/InformationCircleFilled.tsx +0 -47
- package/src/icons.generated/Link.tsx +0 -44
- package/src/icons.generated/List.tsx +0 -44
- package/src/icons.generated/Lock.tsx +0 -44
- package/src/icons.generated/More.tsx +0 -44
- package/src/icons.generated/Notification.tsx +0 -46
- package/src/icons.generated/OktaVerify.tsx +0 -46
- package/src/icons.generated/OnPremMfa.tsx +0 -52
- package/src/icons.generated/OneTimePassword.tsx +0 -65
- package/src/icons.generated/Password.tsx +0 -80
- package/src/icons.generated/Pause.tsx +0 -44
- package/src/icons.generated/QuestionCircle.tsx +0 -46
- package/src/icons.generated/QuestionCircleFilled.tsx +0 -47
- package/src/icons.generated/Refresh.tsx +0 -46
- package/src/icons.generated/Reset.tsx +0 -44
- package/src/icons.generated/Resume.tsx +0 -44
- package/src/icons.generated/Search.tsx +0 -44
- package/src/icons.generated/SecurityQuestion.tsx +0 -51
- package/src/icons.generated/Server.tsx +0 -44
- package/src/icons.generated/Settings.tsx +0 -46
- package/src/icons.generated/Show.tsx +0 -44
- package/src/icons.generated/SmartCard.tsx +0 -65
- package/src/icons.generated/Sms.tsx +0 -55
- package/src/icons.generated/Subtract.tsx +0 -46
- package/src/icons.generated/SymantecVip.tsx +0 -52
- package/src/icons.generated/Sync.tsx +0 -44
- package/src/icons.generated/ThumbsDown.tsx +0 -46
- package/src/icons.generated/ThumbsUp.tsx +0 -46
- package/src/icons.generated/Unlock.tsx +0 -44
- package/src/icons.generated/Upload.tsx +0 -44
- package/src/icons.generated/User.tsx +0 -44
- package/src/icons.generated/Video.tsx +0 -44
- package/src/icons.generated/VoiceCall.tsx +0 -62
- package/src/icons.generated/Warning.tsx +0 -46
- package/src/icons.generated/WarningFilled.tsx +0 -46
- package/src/icons.generated/Yubikey.tsx +0 -44
- package/src/icons.generated/index.ts +0 -107
- package/src/index.ts +0 -118
- package/src/inputUtils.ts +0 -80
- package/src/labs/AppTile.tsx +0 -421
- package/src/labs/DataFilters.tsx +0 -871
- package/src/labs/DataTable.tsx +0 -877
- package/src/labs/DataTablePagination.tsx +0 -88
- package/src/labs/DataView/BulkActionsMenu.tsx +0 -98
- package/src/labs/DataView/CardLayoutContent.tsx +0 -272
- package/src/labs/DataView/DataCard.tsx +0 -357
- package/src/labs/DataView/DataTable.tsx +0 -128
- package/src/labs/DataView/DataView.test.tsx +0 -1168
- package/src/labs/DataView/DataView.tsx +0 -504
- package/src/labs/DataView/DetailPanel.tsx +0 -31
- package/src/labs/DataView/LayoutSwitcher.tsx +0 -72
- package/src/labs/DataView/RowActions.tsx +0 -125
- package/src/labs/DataView/TableLayoutContent.tsx +0 -500
- package/src/labs/DataView/TableSettings.tsx +0 -144
- package/src/labs/DataView/componentTypes.ts +0 -129
- package/src/labs/DataView/constants.tsx +0 -28
- package/src/labs/DataView/dataTypes.ts +0 -83
- package/src/labs/DataView/fetchData.ts +0 -49
- package/src/labs/DataView/index.ts +0 -19
- package/src/labs/DataView/tableConstants.tsx +0 -137
- package/src/labs/DataView/testSupportData.tsx +0 -301
- package/src/labs/DataView/useFilterConversion.ts +0 -88
- package/src/labs/DatePickers/DateTimeField.tsx +0 -267
- package/src/labs/DatePickers/DateTimePicker.test.tsx +0 -70
- package/src/labs/DatePickers/DateTimePicker.tsx +0 -303
- package/src/labs/DatePickers/dateTimePickerTheme.ts +0 -216
- package/src/labs/DatePickers/index.ts +0 -13
- package/src/labs/GroupPicker.tsx +0 -261
- package/src/labs/OdysseyPickers/ComposablePicker.test.tsx +0 -32
- package/src/labs/OdysseyPickers/ComposablePicker.tsx +0 -188
- package/src/labs/OdysseyPickers/Picker.tsx +0 -381
- package/src/labs/OdysseyPickers/PickerVirtualizationListBox.tsx +0 -192
- package/src/labs/OdysseyPickers/PickerWithOptionAdornment.tsx +0 -429
- package/src/labs/OdysseyPickers/index.ts +0 -15
- package/src/labs/PageTemplate/Layout.tsx +0 -85
- package/src/labs/PageTemplate/PageTemplate.tsx +0 -234
- package/src/labs/PageTemplate/index.ts +0 -14
- package/src/labs/PaginatedTable.tsx +0 -290
- package/src/labs/README.md +0 -46
- package/src/labs/StaticTable.tsx +0 -131
- package/src/labs/UserProfile.tsx +0 -104
- package/src/labs/UserProfileMenuButton.tsx +0 -86
- package/src/labs/index.ts +0 -47
- package/src/labs/materialReactTableTypes.tsx +0 -19
- package/src/properties/odyssey-react-mui.properties +0 -140
- package/src/properties/translations/odyssey-react-mui_cs.properties +0 -140
- package/src/properties/translations/odyssey-react-mui_da.properties +0 -140
- package/src/properties/translations/odyssey-react-mui_de.properties +0 -140
- package/src/properties/translations/odyssey-react-mui_el.properties +0 -140
- package/src/properties/translations/odyssey-react-mui_es.properties +0 -140
- package/src/properties/translations/odyssey-react-mui_fi.properties +0 -140
- package/src/properties/translations/odyssey-react-mui_fr.properties +0 -140
- package/src/properties/translations/odyssey-react-mui_ht.properties +0 -140
- package/src/properties/translations/odyssey-react-mui_hu.properties +0 -140
- package/src/properties/translations/odyssey-react-mui_id.properties +0 -140
- package/src/properties/translations/odyssey-react-mui_it.properties +0 -140
- package/src/properties/translations/odyssey-react-mui_ja.properties +0 -140
- package/src/properties/translations/odyssey-react-mui_ko.properties +0 -140
- package/src/properties/translations/odyssey-react-mui_ms.properties +0 -140
- package/src/properties/translations/odyssey-react-mui_nb.properties +0 -140
- package/src/properties/translations/odyssey-react-mui_nl_NL.properties +0 -140
- package/src/properties/translations/odyssey-react-mui_ok_PL.properties +0 -126
- package/src/properties/translations/odyssey-react-mui_ok_SK.properties +0 -126
- package/src/properties/translations/odyssey-react-mui_pl.properties +0 -140
- package/src/properties/translations/odyssey-react-mui_pt_BR.properties +0 -140
- package/src/properties/translations/odyssey-react-mui_ro.properties +0 -140
- package/src/properties/translations/odyssey-react-mui_ru.properties +0 -140
- package/src/properties/translations/odyssey-react-mui_sv.properties +0 -140
- package/src/properties/translations/odyssey-react-mui_th.properties +0 -140
- package/src/properties/translations/odyssey-react-mui_tr.properties +0 -140
- package/src/properties/translations/odyssey-react-mui_uk.properties +0 -140
- package/src/properties/translations/odyssey-react-mui_vi.properties +0 -140
- package/src/properties/translations/odyssey-react-mui_zh_CN.properties +0 -140
- package/src/properties/translations/odyssey-react-mui_zh_TW.properties +0 -140
- package/src/properties/ts/odyssey-react-mui.ts +0 -1
- package/src/properties/ts/odyssey-react-mui_cs.ts +0 -1
- package/src/properties/ts/odyssey-react-mui_da.ts +0 -1
- package/src/properties/ts/odyssey-react-mui_de.ts +0 -1
- package/src/properties/ts/odyssey-react-mui_el.ts +0 -1
- package/src/properties/ts/odyssey-react-mui_es.ts +0 -1
- package/src/properties/ts/odyssey-react-mui_fi.ts +0 -1
- package/src/properties/ts/odyssey-react-mui_fr.ts +0 -1
- package/src/properties/ts/odyssey-react-mui_ht.ts +0 -1
- package/src/properties/ts/odyssey-react-mui_hu.ts +0 -1
- package/src/properties/ts/odyssey-react-mui_id.ts +0 -1
- package/src/properties/ts/odyssey-react-mui_it.ts +0 -1
- package/src/properties/ts/odyssey-react-mui_ja.ts +0 -1
- package/src/properties/ts/odyssey-react-mui_ko.ts +0 -1
- package/src/properties/ts/odyssey-react-mui_ms.ts +0 -1
- package/src/properties/ts/odyssey-react-mui_nb.ts +0 -1
- package/src/properties/ts/odyssey-react-mui_nl_NL.ts +0 -1
- package/src/properties/ts/odyssey-react-mui_ok_PL.ts +0 -1
- package/src/properties/ts/odyssey-react-mui_ok_SK.ts +0 -1
- package/src/properties/ts/odyssey-react-mui_pl.ts +0 -1
- package/src/properties/ts/odyssey-react-mui_pt_BR.ts +0 -1
- package/src/properties/ts/odyssey-react-mui_ro.ts +0 -1
- package/src/properties/ts/odyssey-react-mui_ru.ts +0 -1
- package/src/properties/ts/odyssey-react-mui_sv.ts +0 -1
- package/src/properties/ts/odyssey-react-mui_th.ts +0 -1
- package/src/properties/ts/odyssey-react-mui_tr.ts +0 -1
- package/src/properties/ts/odyssey-react-mui_uk.ts +0 -1
- package/src/properties/ts/odyssey-react-mui_vi.ts +0 -1
- package/src/properties/ts/odyssey-react-mui_zh_CN.ts +0 -1
- package/src/properties/ts/odyssey-react-mui_zh_TW.ts +0 -1
- package/src/remUtils.ts +0 -27
- package/src/shadow-dom/shadow-dom.test.ts +0 -24
- package/src/shadow-dom/shadow-dom.ts +0 -54
- package/src/test-selectors/getByQuerySelector.ts +0 -176
- package/src/test-selectors/getComputedAccessibleErrorMessageText.ts +0 -52
- package/src/test-selectors/getComputedAccessibleText.ts +0 -36
- package/src/test-selectors/index.ts +0 -15
- package/src/test-selectors/interpolateString.ts +0 -41
- package/src/test-selectors/linkedHtmlSelectors.ts +0 -73
- package/src/test-selectors/queryOdysseySelector.ts +0 -36
- package/src/test-selectors/querySelector.ts +0 -249
- package/src/test-selectors/sanityChecks.ts +0 -53
- package/src/test-selectors/testSelector.ts +0 -143
- package/src/theme/components.tsx +0 -3275
- package/src/theme/components.types.ts +0 -111
- package/src/theme/createOdysseyMuiTheme.ts +0 -54
- package/src/theme/index.ts +0 -13
- package/src/theme/mixins.ts +0 -29
- package/src/theme/mixins.types.ts +0 -31
- package/src/theme/palette.ts +0 -112
- package/src/theme/shape.ts +0 -31
- package/src/theme/spacing.ts +0 -34
- package/src/theme/theme.ts +0 -13
- package/src/theme/typography.ts +0 -137
- package/src/theme/typography.types.ts +0 -41
- package/src/theme/useContrastMode.test.tsx +0 -504
- package/src/ui-shell/AppSwitcher/AppSwitcher.tsx +0 -94
- package/src/ui-shell/AppSwitcher/AppSwitcherApp.tsx +0 -146
- package/src/ui-shell/AppSwitcher/OktaAura.tsx +0 -50
- package/src/ui-shell/AppSwitcher/index.ts +0 -13
- package/src/ui-shell/SideNav/CollapseIcon.tsx +0 -34
- package/src/ui-shell/SideNav/HandleIcon.tsx +0 -35
- package/src/ui-shell/SideNav/NavAccordion.tsx +0 -243
- package/src/ui-shell/SideNav/OktaLogo.tsx +0 -34
- package/src/ui-shell/SideNav/SideNav.test.tsx +0 -326
- package/src/ui-shell/SideNav/SideNav.tsx +0 -810
- package/src/ui-shell/SideNav/SideNavFooterContent.tsx +0 -85
- package/src/ui-shell/SideNav/SideNavHeader.tsx +0 -134
- package/src/ui-shell/SideNav/SideNavItemContent.tsx +0 -402
- package/src/ui-shell/SideNav/SideNavItemContentContext.tsx +0 -29
- package/src/ui-shell/SideNav/SideNavItemLinkContent.tsx +0 -90
- package/src/ui-shell/SideNav/SideNavLogo.tsx +0 -65
- package/src/ui-shell/SideNav/SideNavToggleButton.tsx +0 -272
- package/src/ui-shell/SideNav/SortableList/SortableItem.tsx +0 -237
- package/src/ui-shell/SideNav/SortableList/SortableList.tsx +0 -132
- package/src/ui-shell/SideNav/SortableList/SortableOverlay.tsx +0 -34
- package/src/ui-shell/SideNav/index.ts +0 -16
- package/src/ui-shell/SideNav/types.ts +0 -224
- package/src/ui-shell/TopNav/TopNav.tsx +0 -109
- package/src/ui-shell/TopNav/TopNavLinksList.tsx +0 -68
- package/src/ui-shell/TopNav/TopNavListItem.tsx +0 -209
- package/src/ui-shell/TopNav/index.ts +0 -13
- package/src/ui-shell/UiShell.test.tsx +0 -366
- package/src/ui-shell/UiShell.tsx +0 -153
- package/src/ui-shell/UiShellContent.tsx +0 -350
- package/src/ui-shell/UiShellProvider.tsx +0 -103
- package/src/ui-shell/bufferLatest.test.ts +0 -79
- package/src/ui-shell/bufferLatest.ts +0 -64
- package/src/ui-shell/createMessageBus.test.ts +0 -115
- package/src/ui-shell/createMessageBus.ts +0 -53
- package/src/ui-shell/createStore.test.ts +0 -103
- package/src/ui-shell/createStore.ts +0 -37
- package/src/ui-shell/index.ts +0 -21
- package/src/ui-shell/renderUiShell.test.tsx +0 -203
- package/src/ui-shell/renderUiShell.tsx +0 -158
- package/src/ui-shell/useScrollState.ts +0 -59
- package/src/useAutocomplete.tsx +0 -184
- package/src/useContrastMode.tsx +0 -143
- package/src/useNormalizedKey.ts +0 -17
- package/src/useUniqueAlphabeticalId.ts +0 -21
- package/src/useUniqueId.ts +0 -21
- package/src/web-component/createReactRootElements.test.ts +0 -40
- package/src/web-component/createReactRootElements.ts +0 -39
- package/src/web-component/renderReactInWebComponent.test.tsx +0 -128
- package/src/web-component/renderReactInWebComponent.ts +0 -135
- package/tsconfig.json +0 -16
- package/tsconfig.production.json +0 -13
- package/vitest.config.ts +0 -36
- package/vitest.setup.ts +0 -32
|
@@ -1,1168 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) 2024-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
|
-
|
|
13
|
-
import { render, screen, waitFor, within } from "@testing-library/react";
|
|
14
|
-
import { userEvent } from "@testing-library/user-event";
|
|
15
|
-
import { OdysseyProvider } from "../../OdysseyProvider.js";
|
|
16
|
-
import { MRT_RowSelectionState } from "material-react-table";
|
|
17
|
-
|
|
18
|
-
import {
|
|
19
|
-
CardLayoutProps,
|
|
20
|
-
DataOnReorderRowsType,
|
|
21
|
-
DataView,
|
|
22
|
-
TableLayoutProps,
|
|
23
|
-
} from "./index.js";
|
|
24
|
-
import {
|
|
25
|
-
data,
|
|
26
|
-
columns,
|
|
27
|
-
filterData,
|
|
28
|
-
reorderData,
|
|
29
|
-
Person,
|
|
30
|
-
} from "./testSupportData.js";
|
|
31
|
-
import { Button, MenuItem } from "../../Buttons/index.js";
|
|
32
|
-
import { DataTableRowData } from "../../DataTable/index.js";
|
|
33
|
-
import { EmptyState } from "../../EmptyState.js";
|
|
34
|
-
import { getControlledElement } from "../../test-selectors/linkedHtmlSelectors.js";
|
|
35
|
-
|
|
36
|
-
const getData = ({ ...props }) => {
|
|
37
|
-
return filterData({ data, ...props });
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
const listItemProps: CardLayoutProps<Person>["itemProps"] = (row) => ({
|
|
41
|
-
title: row.name,
|
|
42
|
-
overline: "List card",
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
const gridItemProps: CardLayoutProps<Person>["itemProps"] = (row) => ({
|
|
46
|
-
title: row.name,
|
|
47
|
-
overline: "Grid card",
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
const waitUntilTableLoadedHack = async () => {
|
|
51
|
-
return expect(await screen.findByText(data[0].name)).toBeVisible();
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
describe("DataView", () => {
|
|
55
|
-
describe("DataView layouts", () => {
|
|
56
|
-
test("displays a table view", async () => {
|
|
57
|
-
const { container } = render(
|
|
58
|
-
<OdysseyProvider>
|
|
59
|
-
<DataView
|
|
60
|
-
availableLayouts={["table"]}
|
|
61
|
-
getData={getData}
|
|
62
|
-
tableLayoutOptions={{
|
|
63
|
-
columns,
|
|
64
|
-
}}
|
|
65
|
-
/>
|
|
66
|
-
</OdysseyProvider>,
|
|
67
|
-
);
|
|
68
|
-
|
|
69
|
-
await waitUntilTableLoadedHack();
|
|
70
|
-
|
|
71
|
-
expect(within(container).queryByRole("table")).not.toBeNull();
|
|
72
|
-
expect(within(container).queryByRole("list")).toBeNull();
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
test("displays a list view", async () => {
|
|
76
|
-
const { container } = render(
|
|
77
|
-
<OdysseyProvider>
|
|
78
|
-
<DataView
|
|
79
|
-
availableLayouts={["list"]}
|
|
80
|
-
getData={getData}
|
|
81
|
-
cardLayoutOptions={{
|
|
82
|
-
itemProps: listItemProps,
|
|
83
|
-
}}
|
|
84
|
-
/>
|
|
85
|
-
</OdysseyProvider>,
|
|
86
|
-
);
|
|
87
|
-
|
|
88
|
-
await waitUntilTableLoadedHack();
|
|
89
|
-
|
|
90
|
-
expect(within(container).queryByRole("table")).toBeNull();
|
|
91
|
-
expect(within(container).queryByRole("list")).not.toBeNull();
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
test("displays a grid view", async () => {
|
|
95
|
-
const { container } = render(
|
|
96
|
-
<OdysseyProvider>
|
|
97
|
-
<DataView
|
|
98
|
-
availableLayouts={["grid"]}
|
|
99
|
-
getData={getData}
|
|
100
|
-
cardLayoutOptions={{
|
|
101
|
-
itemProps: gridItemProps,
|
|
102
|
-
}}
|
|
103
|
-
/>
|
|
104
|
-
</OdysseyProvider>,
|
|
105
|
-
);
|
|
106
|
-
|
|
107
|
-
await waitUntilTableLoadedHack();
|
|
108
|
-
|
|
109
|
-
expect(within(container).queryByRole("table")).toBeNull();
|
|
110
|
-
expect(within(container).queryByRole("list")).not.toBeNull();
|
|
111
|
-
});
|
|
112
|
-
|
|
113
|
-
test("displays the layout switcher", async () => {
|
|
114
|
-
const user = userEvent.setup();
|
|
115
|
-
|
|
116
|
-
render(
|
|
117
|
-
<OdysseyProvider>
|
|
118
|
-
<DataView
|
|
119
|
-
availableLayouts={["table", "list"]}
|
|
120
|
-
getData={getData}
|
|
121
|
-
tableLayoutOptions={{
|
|
122
|
-
columns,
|
|
123
|
-
}}
|
|
124
|
-
cardLayoutOptions={{
|
|
125
|
-
itemProps: listItemProps,
|
|
126
|
-
}}
|
|
127
|
-
/>
|
|
128
|
-
</OdysseyProvider>,
|
|
129
|
-
);
|
|
130
|
-
|
|
131
|
-
const layoutSwitcherButton = screen.getByLabelText("Layout", {
|
|
132
|
-
selector: "button",
|
|
133
|
-
});
|
|
134
|
-
await user.click(layoutSwitcherButton);
|
|
135
|
-
|
|
136
|
-
const layoutSwitcherMenu = getControlledElement({
|
|
137
|
-
element: layoutSwitcherButton,
|
|
138
|
-
});
|
|
139
|
-
expect(within(layoutSwitcherMenu).getAllByRole("menuitem")).toHaveLength(
|
|
140
|
-
2,
|
|
141
|
-
);
|
|
142
|
-
|
|
143
|
-
expect(
|
|
144
|
-
within(layoutSwitcherMenu).getByRole("menuitem", { name: "Table" }),
|
|
145
|
-
).toBeVisible();
|
|
146
|
-
expect(
|
|
147
|
-
within(layoutSwitcherMenu).getByRole("menuitem", { name: "List" }),
|
|
148
|
-
).toBeVisible();
|
|
149
|
-
});
|
|
150
|
-
});
|
|
151
|
-
|
|
152
|
-
test("can display meta text", () => {
|
|
153
|
-
const metaText = "Last updated 12 hours ago";
|
|
154
|
-
|
|
155
|
-
render(
|
|
156
|
-
<OdysseyProvider>
|
|
157
|
-
<DataView
|
|
158
|
-
availableLayouts={["table"]}
|
|
159
|
-
getData={getData}
|
|
160
|
-
tableLayoutOptions={{
|
|
161
|
-
columns,
|
|
162
|
-
}}
|
|
163
|
-
metaText={metaText}
|
|
164
|
-
/>
|
|
165
|
-
</OdysseyProvider>,
|
|
166
|
-
);
|
|
167
|
-
|
|
168
|
-
expect(screen.getByText(metaText)).toBeVisible();
|
|
169
|
-
});
|
|
170
|
-
|
|
171
|
-
describe("Filter and search", () => {
|
|
172
|
-
test("can filter rows", async () => {
|
|
173
|
-
const user = userEvent.setup();
|
|
174
|
-
|
|
175
|
-
render(
|
|
176
|
-
<OdysseyProvider>
|
|
177
|
-
<DataView
|
|
178
|
-
availableLayouts={["table"]}
|
|
179
|
-
hasFilters
|
|
180
|
-
getData={getData}
|
|
181
|
-
tableLayoutOptions={{
|
|
182
|
-
columns,
|
|
183
|
-
}}
|
|
184
|
-
/>
|
|
185
|
-
</OdysseyProvider>,
|
|
186
|
-
);
|
|
187
|
-
|
|
188
|
-
expect(await screen.findByText(data[0].name)).toBeVisible();
|
|
189
|
-
expect(await screen.findByText(data[1].name)).toBeVisible();
|
|
190
|
-
|
|
191
|
-
const filterButton = screen.getByLabelText("Filters", {
|
|
192
|
-
selector: "button",
|
|
193
|
-
});
|
|
194
|
-
await user.click(filterButton);
|
|
195
|
-
|
|
196
|
-
const filterMenu = getControlledElement({ element: filterButton });
|
|
197
|
-
const nameMenuItem = within(filterMenu).getByRole("menuitem", {
|
|
198
|
-
name: /Name/i,
|
|
199
|
-
});
|
|
200
|
-
await user.click(nameMenuItem);
|
|
201
|
-
|
|
202
|
-
const nameFilterMenu = getControlledElement({ element: nameMenuItem });
|
|
203
|
-
const nameInput = within(nameFilterMenu).getByLabelText("Name");
|
|
204
|
-
const submitButton = within(nameFilterMenu).getByRole("button");
|
|
205
|
-
|
|
206
|
-
await user.click(nameInput);
|
|
207
|
-
await user.keyboard(`${data[1].name}{ENTER}`);
|
|
208
|
-
await user.click(submitButton);
|
|
209
|
-
|
|
210
|
-
await screen.findByText("Clear filters");
|
|
211
|
-
|
|
212
|
-
const table = screen.getByRole("table");
|
|
213
|
-
expect(screen.queryByText(data[0].name)).toBeNull();
|
|
214
|
-
expect(await within(table).findByText(data[1].name)).toBeVisible();
|
|
215
|
-
});
|
|
216
|
-
|
|
217
|
-
test("can search rows", async () => {
|
|
218
|
-
const user = userEvent.setup();
|
|
219
|
-
|
|
220
|
-
render(
|
|
221
|
-
<OdysseyProvider>
|
|
222
|
-
<DataView
|
|
223
|
-
availableLayouts={["table"]}
|
|
224
|
-
hasSearch
|
|
225
|
-
hasSearchSubmitButton
|
|
226
|
-
getData={getData}
|
|
227
|
-
tableLayoutOptions={{
|
|
228
|
-
columns,
|
|
229
|
-
}}
|
|
230
|
-
/>
|
|
231
|
-
</OdysseyProvider>,
|
|
232
|
-
);
|
|
233
|
-
|
|
234
|
-
expect(await screen.findByText(data[0].name)).toBeVisible();
|
|
235
|
-
expect(await screen.findByText(data[1].name)).toBeVisible();
|
|
236
|
-
|
|
237
|
-
const searchInput = screen.getByPlaceholderText(/Search/i);
|
|
238
|
-
const submitButton = screen.getByText("Search", { selector: "button" });
|
|
239
|
-
await user.click(searchInput);
|
|
240
|
-
await user.keyboard(`${data[1].name}`);
|
|
241
|
-
await user.click(submitButton);
|
|
242
|
-
|
|
243
|
-
const table = screen.getByRole("table");
|
|
244
|
-
expect(screen.queryByText(data[0].name)).toBeNull();
|
|
245
|
-
expect(await within(table).findByText(data[1].name)).toBeVisible();
|
|
246
|
-
});
|
|
247
|
-
|
|
248
|
-
test("can clear the search input", async () => {
|
|
249
|
-
const user = userEvent.setup();
|
|
250
|
-
|
|
251
|
-
render(
|
|
252
|
-
<OdysseyProvider>
|
|
253
|
-
<DataView
|
|
254
|
-
availableLayouts={["table"]}
|
|
255
|
-
hasSearch
|
|
256
|
-
hasSearchSubmitButton
|
|
257
|
-
getData={getData}
|
|
258
|
-
tableLayoutOptions={{
|
|
259
|
-
columns,
|
|
260
|
-
}}
|
|
261
|
-
/>
|
|
262
|
-
</OdysseyProvider>,
|
|
263
|
-
);
|
|
264
|
-
|
|
265
|
-
expect(await screen.findByText(data[0].name)).toBeVisible();
|
|
266
|
-
expect(await screen.findByText(data[1].name)).toBeVisible();
|
|
267
|
-
|
|
268
|
-
const searchInput = screen.getByPlaceholderText(/Search/i);
|
|
269
|
-
const submitButton = screen.getByText("Search", { selector: "button" });
|
|
270
|
-
await user.click(searchInput);
|
|
271
|
-
await user.keyboard(`${data[1].name}`);
|
|
272
|
-
await user.click(submitButton);
|
|
273
|
-
|
|
274
|
-
const table = screen.getByRole("table");
|
|
275
|
-
expect(screen.queryByText(data[0].name)).toBeNull();
|
|
276
|
-
expect(await within(table).findByText(data[1].name)).toBeVisible();
|
|
277
|
-
|
|
278
|
-
const clearButton = screen.getByLabelText("Clear", {
|
|
279
|
-
selector: "button",
|
|
280
|
-
});
|
|
281
|
-
await user.click(clearButton);
|
|
282
|
-
|
|
283
|
-
waitFor(() => {
|
|
284
|
-
expect(searchInput).toHaveValue("");
|
|
285
|
-
expect(screen.getAllByRole("row")).toHaveLength(7);
|
|
286
|
-
expect(screen.getByText(data[0].name)).toBeVisible();
|
|
287
|
-
expect(screen.getByText(data[1].name)).toBeVisible();
|
|
288
|
-
});
|
|
289
|
-
});
|
|
290
|
-
});
|
|
291
|
-
|
|
292
|
-
describe("Row actions", () => {
|
|
293
|
-
test("can display row action menu", async () => {
|
|
294
|
-
const user = userEvent.setup();
|
|
295
|
-
|
|
296
|
-
const rowActionMenuItems: TableLayoutProps<Person>["rowActionMenuItems"] =
|
|
297
|
-
(row) => <MenuItem>Action for {row.original.name}</MenuItem>;
|
|
298
|
-
|
|
299
|
-
render(
|
|
300
|
-
<OdysseyProvider>
|
|
301
|
-
<DataView
|
|
302
|
-
availableLayouts={["table"]}
|
|
303
|
-
getData={getData}
|
|
304
|
-
tableLayoutOptions={{
|
|
305
|
-
columns,
|
|
306
|
-
rowActionMenuItems,
|
|
307
|
-
}}
|
|
308
|
-
/>
|
|
309
|
-
</OdysseyProvider>,
|
|
310
|
-
);
|
|
311
|
-
|
|
312
|
-
await waitUntilTableLoadedHack();
|
|
313
|
-
|
|
314
|
-
// Index 1 because row[0] is the th row
|
|
315
|
-
const firstBodyRow = (await screen.findAllByRole("row"))[1];
|
|
316
|
-
const firstBodyRowActionButton = within(firstBodyRow).getByRole("button");
|
|
317
|
-
await user.click(firstBodyRowActionButton);
|
|
318
|
-
|
|
319
|
-
const actionMenu = getControlledElement({
|
|
320
|
-
element: firstBodyRowActionButton,
|
|
321
|
-
});
|
|
322
|
-
const actionMenuItem = within(actionMenu).getByRole("menuitem");
|
|
323
|
-
expect(
|
|
324
|
-
within(actionMenuItem).getByText(`Action for ${data[0].name}`),
|
|
325
|
-
).toBeVisible();
|
|
326
|
-
});
|
|
327
|
-
|
|
328
|
-
test("can display row action buttons", async () => {
|
|
329
|
-
const rowActionButtons: TableLayoutProps<Person>["rowActionButtons"] = (
|
|
330
|
-
row,
|
|
331
|
-
) => (
|
|
332
|
-
<Button variant="primary" label={`Button for ${row.original?.name}`} />
|
|
333
|
-
);
|
|
334
|
-
|
|
335
|
-
render(
|
|
336
|
-
<OdysseyProvider>
|
|
337
|
-
<DataView
|
|
338
|
-
availableLayouts={["table"]}
|
|
339
|
-
getData={getData}
|
|
340
|
-
tableLayoutOptions={{
|
|
341
|
-
columns,
|
|
342
|
-
rowActionButtons,
|
|
343
|
-
}}
|
|
344
|
-
/>
|
|
345
|
-
</OdysseyProvider>,
|
|
346
|
-
);
|
|
347
|
-
|
|
348
|
-
await waitUntilTableLoadedHack();
|
|
349
|
-
|
|
350
|
-
// Index 1 because row[0] is the th row
|
|
351
|
-
const firstBodyRow = (await screen.findAllByRole("row"))[1];
|
|
352
|
-
const firstBodyRowActionButton = within(firstBodyRow).getByText(
|
|
353
|
-
`Button for ${data[0].name}`,
|
|
354
|
-
{ selector: "button" },
|
|
355
|
-
);
|
|
356
|
-
|
|
357
|
-
expect(firstBodyRowActionButton).toBeVisible();
|
|
358
|
-
});
|
|
359
|
-
});
|
|
360
|
-
|
|
361
|
-
describe("Row selection", () => {
|
|
362
|
-
test("can select table rows", async () => {
|
|
363
|
-
const user = userEvent.setup();
|
|
364
|
-
|
|
365
|
-
render(
|
|
366
|
-
<OdysseyProvider>
|
|
367
|
-
<DataView
|
|
368
|
-
availableLayouts={["table"]}
|
|
369
|
-
getData={getData}
|
|
370
|
-
hasRowSelection
|
|
371
|
-
tableLayoutOptions={{
|
|
372
|
-
columns,
|
|
373
|
-
}}
|
|
374
|
-
/>
|
|
375
|
-
</OdysseyProvider>,
|
|
376
|
-
);
|
|
377
|
-
|
|
378
|
-
await waitUntilTableLoadedHack();
|
|
379
|
-
|
|
380
|
-
const checkboxes = screen.getAllByRole("checkbox");
|
|
381
|
-
await user.click(checkboxes[1]);
|
|
382
|
-
|
|
383
|
-
const selectedText = screen.getByText("1 selected", {
|
|
384
|
-
selector: "button",
|
|
385
|
-
});
|
|
386
|
-
expect(selectedText).toBeVisible();
|
|
387
|
-
});
|
|
388
|
-
|
|
389
|
-
test("can select all rows", async () => {
|
|
390
|
-
const user = userEvent.setup();
|
|
391
|
-
|
|
392
|
-
render(
|
|
393
|
-
<OdysseyProvider>
|
|
394
|
-
<DataView
|
|
395
|
-
availableLayouts={["table"]}
|
|
396
|
-
getData={getData}
|
|
397
|
-
hasRowSelection
|
|
398
|
-
tableLayoutOptions={{
|
|
399
|
-
columns,
|
|
400
|
-
}}
|
|
401
|
-
/>
|
|
402
|
-
</OdysseyProvider>,
|
|
403
|
-
);
|
|
404
|
-
|
|
405
|
-
await waitUntilTableLoadedHack();
|
|
406
|
-
|
|
407
|
-
const checkboxes = screen.getAllByRole("checkbox");
|
|
408
|
-
await user.click(checkboxes[0]);
|
|
409
|
-
|
|
410
|
-
const selectedText = screen.getByText(`${data.length} selected`, {
|
|
411
|
-
selector: "button",
|
|
412
|
-
});
|
|
413
|
-
expect(selectedText).toBeVisible();
|
|
414
|
-
});
|
|
415
|
-
|
|
416
|
-
test("can select card rows", async () => {
|
|
417
|
-
const user = userEvent.setup();
|
|
418
|
-
|
|
419
|
-
render(
|
|
420
|
-
<OdysseyProvider>
|
|
421
|
-
<DataView
|
|
422
|
-
availableLayouts={["grid"]}
|
|
423
|
-
getData={getData}
|
|
424
|
-
hasRowSelection
|
|
425
|
-
cardLayoutOptions={{
|
|
426
|
-
itemProps: gridItemProps,
|
|
427
|
-
}}
|
|
428
|
-
/>
|
|
429
|
-
</OdysseyProvider>,
|
|
430
|
-
);
|
|
431
|
-
|
|
432
|
-
await waitUntilTableLoadedHack();
|
|
433
|
-
|
|
434
|
-
const checkboxes = screen.getAllByRole("checkbox");
|
|
435
|
-
await user.click(checkboxes[1]);
|
|
436
|
-
|
|
437
|
-
const selectedText = screen.getByText("1 selected", {
|
|
438
|
-
selector: "button",
|
|
439
|
-
});
|
|
440
|
-
expect(selectedText).toBeVisible();
|
|
441
|
-
});
|
|
442
|
-
|
|
443
|
-
test("can select all card rows", async () => {
|
|
444
|
-
const user = userEvent.setup();
|
|
445
|
-
|
|
446
|
-
render(
|
|
447
|
-
<OdysseyProvider>
|
|
448
|
-
<DataView
|
|
449
|
-
availableLayouts={["table"]}
|
|
450
|
-
getData={getData}
|
|
451
|
-
hasRowSelection
|
|
452
|
-
tableLayoutOptions={{
|
|
453
|
-
columns,
|
|
454
|
-
}}
|
|
455
|
-
/>
|
|
456
|
-
</OdysseyProvider>,
|
|
457
|
-
);
|
|
458
|
-
|
|
459
|
-
await waitUntilTableLoadedHack();
|
|
460
|
-
|
|
461
|
-
const checkboxes = screen.getAllByRole("checkbox");
|
|
462
|
-
await user.click(checkboxes[0]);
|
|
463
|
-
|
|
464
|
-
const selectedText = screen.getByText(`${data.length} selected`, {
|
|
465
|
-
selector: "button",
|
|
466
|
-
});
|
|
467
|
-
expect(selectedText).toBeVisible();
|
|
468
|
-
});
|
|
469
|
-
|
|
470
|
-
test("can deselect rows", async () => {
|
|
471
|
-
const user = userEvent.setup();
|
|
472
|
-
|
|
473
|
-
render(
|
|
474
|
-
<OdysseyProvider>
|
|
475
|
-
<DataView
|
|
476
|
-
availableLayouts={["table"]}
|
|
477
|
-
getData={getData}
|
|
478
|
-
hasRowSelection
|
|
479
|
-
tableLayoutOptions={{
|
|
480
|
-
columns,
|
|
481
|
-
}}
|
|
482
|
-
/>
|
|
483
|
-
</OdysseyProvider>,
|
|
484
|
-
);
|
|
485
|
-
|
|
486
|
-
await waitUntilTableLoadedHack();
|
|
487
|
-
|
|
488
|
-
const checkboxes = screen.getAllByRole("checkbox");
|
|
489
|
-
await user.click(checkboxes[1]);
|
|
490
|
-
await user.click(checkboxes[2]);
|
|
491
|
-
|
|
492
|
-
expect(
|
|
493
|
-
screen.getByText("2 selected", { selector: "button" }),
|
|
494
|
-
).toBeVisible();
|
|
495
|
-
|
|
496
|
-
await user.click(checkboxes[1]);
|
|
497
|
-
|
|
498
|
-
expect(
|
|
499
|
-
screen.getByText("1 selected", { selector: "button" }),
|
|
500
|
-
).toBeVisible();
|
|
501
|
-
});
|
|
502
|
-
|
|
503
|
-
test("can deselect all rows", async () => {
|
|
504
|
-
const user = userEvent.setup();
|
|
505
|
-
|
|
506
|
-
render(
|
|
507
|
-
<OdysseyProvider>
|
|
508
|
-
<DataView
|
|
509
|
-
availableLayouts={["table"]}
|
|
510
|
-
getData={getData}
|
|
511
|
-
hasRowSelection
|
|
512
|
-
tableLayoutOptions={{
|
|
513
|
-
columns,
|
|
514
|
-
}}
|
|
515
|
-
/>
|
|
516
|
-
</OdysseyProvider>,
|
|
517
|
-
);
|
|
518
|
-
|
|
519
|
-
await waitUntilTableLoadedHack();
|
|
520
|
-
|
|
521
|
-
const checkboxes = screen.getAllByRole("checkbox");
|
|
522
|
-
await user.click(checkboxes[0]);
|
|
523
|
-
|
|
524
|
-
const selectedText = screen.getByText(`${data.length} selected`, {
|
|
525
|
-
selector: "button",
|
|
526
|
-
});
|
|
527
|
-
expect(selectedText).toBeVisible();
|
|
528
|
-
|
|
529
|
-
await user.click(checkboxes[0]);
|
|
530
|
-
|
|
531
|
-
expect(
|
|
532
|
-
screen.queryByText(`${data.length} selected`, { selector: "button" }),
|
|
533
|
-
).toBeNull();
|
|
534
|
-
});
|
|
535
|
-
|
|
536
|
-
test("can perform bulk actions on rows", async () => {
|
|
537
|
-
const user = userEvent.setup();
|
|
538
|
-
|
|
539
|
-
const bulkActionMenuItems = (selectedRows: MRT_RowSelectionState) => (
|
|
540
|
-
<MenuItem>Bulk action for {Object.keys(selectedRows).length}</MenuItem>
|
|
541
|
-
);
|
|
542
|
-
|
|
543
|
-
render(
|
|
544
|
-
<OdysseyProvider>
|
|
545
|
-
<DataView
|
|
546
|
-
availableLayouts={["table"]}
|
|
547
|
-
getData={getData}
|
|
548
|
-
hasRowSelection
|
|
549
|
-
tableLayoutOptions={{
|
|
550
|
-
columns,
|
|
551
|
-
}}
|
|
552
|
-
bulkActionMenuItems={bulkActionMenuItems}
|
|
553
|
-
/>
|
|
554
|
-
</OdysseyProvider>,
|
|
555
|
-
);
|
|
556
|
-
|
|
557
|
-
await waitUntilTableLoadedHack();
|
|
558
|
-
|
|
559
|
-
const selectAllButton = screen.getByText("Select all", {
|
|
560
|
-
selector: "button",
|
|
561
|
-
});
|
|
562
|
-
await user.click(selectAllButton);
|
|
563
|
-
|
|
564
|
-
const selectedButton = screen.getByText(`${data.length} selected`, {
|
|
565
|
-
selector: "button",
|
|
566
|
-
});
|
|
567
|
-
await user.click(selectedButton);
|
|
568
|
-
|
|
569
|
-
const bulkActionsMenu = getControlledElement({ element: selectedButton });
|
|
570
|
-
const bulkActionsMenuItem = within(bulkActionsMenu).getByRole("menuitem");
|
|
571
|
-
expect(bulkActionsMenuItem.textContent).toBe(
|
|
572
|
-
`Bulk action for ${data.length}`,
|
|
573
|
-
);
|
|
574
|
-
});
|
|
575
|
-
});
|
|
576
|
-
|
|
577
|
-
describe("Row reordering", () => {
|
|
578
|
-
test("can reorder rows", async () => {
|
|
579
|
-
const user = userEvent.setup();
|
|
580
|
-
|
|
581
|
-
let updatedData = data.slice();
|
|
582
|
-
|
|
583
|
-
const handleReorderRows = ({
|
|
584
|
-
rowId,
|
|
585
|
-
newRowIndex,
|
|
586
|
-
}: DataOnReorderRowsType) => {
|
|
587
|
-
updatedData = reorderData({ data: updatedData, rowId, newRowIndex });
|
|
588
|
-
};
|
|
589
|
-
|
|
590
|
-
render(
|
|
591
|
-
<OdysseyProvider>
|
|
592
|
-
<DataView
|
|
593
|
-
availableLayouts={["table"]}
|
|
594
|
-
getData={() => updatedData}
|
|
595
|
-
hasRowReordering
|
|
596
|
-
onReorderRows={handleReorderRows}
|
|
597
|
-
tableLayoutOptions={{
|
|
598
|
-
columns,
|
|
599
|
-
}}
|
|
600
|
-
/>
|
|
601
|
-
</OdysseyProvider>,
|
|
602
|
-
);
|
|
603
|
-
|
|
604
|
-
expect(await screen.findByText(data[0].name)).toBeVisible();
|
|
605
|
-
expect(await screen.findByText(data[1].name)).toBeVisible();
|
|
606
|
-
|
|
607
|
-
const moreActionsButton = within(
|
|
608
|
-
screen.getAllByRole("row")[2],
|
|
609
|
-
).getByLabelText("More actions", { selector: "button" });
|
|
610
|
-
await user.click(moreActionsButton);
|
|
611
|
-
|
|
612
|
-
const moreActionsMenu = getControlledElement({
|
|
613
|
-
element: moreActionsButton,
|
|
614
|
-
});
|
|
615
|
-
const moveForwardButton = within(moreActionsMenu).getByRole("menuitem", {
|
|
616
|
-
name: "Bring forward",
|
|
617
|
-
});
|
|
618
|
-
await user.click(moveForwardButton);
|
|
619
|
-
|
|
620
|
-
const updatedRows = await screen.findAllByRole("row");
|
|
621
|
-
|
|
622
|
-
// Confirm that the first two rows have swapped
|
|
623
|
-
expect(updatedRows[1].textContent).toContain(data[1].name);
|
|
624
|
-
expect(updatedRows[2].textContent).toContain(data[0].name);
|
|
625
|
-
});
|
|
626
|
-
|
|
627
|
-
test("can reorder to front", async () => {
|
|
628
|
-
const user = userEvent.setup();
|
|
629
|
-
|
|
630
|
-
let updatedData = data.slice();
|
|
631
|
-
|
|
632
|
-
const handleReorderRows = ({
|
|
633
|
-
rowId,
|
|
634
|
-
newRowIndex,
|
|
635
|
-
}: DataOnReorderRowsType) => {
|
|
636
|
-
updatedData = reorderData({ data: updatedData, rowId, newRowIndex });
|
|
637
|
-
};
|
|
638
|
-
|
|
639
|
-
render(
|
|
640
|
-
<OdysseyProvider>
|
|
641
|
-
<DataView
|
|
642
|
-
availableLayouts={["table"]}
|
|
643
|
-
getData={() => updatedData}
|
|
644
|
-
hasRowReordering
|
|
645
|
-
onReorderRows={handleReorderRows}
|
|
646
|
-
tableLayoutOptions={{
|
|
647
|
-
columns,
|
|
648
|
-
}}
|
|
649
|
-
/>
|
|
650
|
-
</OdysseyProvider>,
|
|
651
|
-
);
|
|
652
|
-
|
|
653
|
-
expect(await screen.findByText(data[0].name)).toBeVisible();
|
|
654
|
-
expect(await screen.findByText(data[5].name)).toBeVisible();
|
|
655
|
-
|
|
656
|
-
const moreActionsButton = within(
|
|
657
|
-
screen.getAllByRole("row")[6],
|
|
658
|
-
).getByLabelText("More actions", { selector: "button" });
|
|
659
|
-
await user.click(moreActionsButton);
|
|
660
|
-
|
|
661
|
-
const moreActionsMenu = getControlledElement({
|
|
662
|
-
element: moreActionsButton,
|
|
663
|
-
});
|
|
664
|
-
const moveToFrontButton = within(moreActionsMenu).getByRole("menuitem", {
|
|
665
|
-
name: "Bring to front",
|
|
666
|
-
});
|
|
667
|
-
await user.click(moveToFrontButton);
|
|
668
|
-
|
|
669
|
-
const updatedRows = await screen.findAllByRole("row");
|
|
670
|
-
|
|
671
|
-
// Confirm that the first two rows have swapped
|
|
672
|
-
expect(updatedRows[1].textContent).toContain(data[5].name);
|
|
673
|
-
expect(updatedRows[2].textContent).toContain(data[0].name);
|
|
674
|
-
});
|
|
675
|
-
|
|
676
|
-
test("can reorder to back", async () => {
|
|
677
|
-
const user = userEvent.setup();
|
|
678
|
-
|
|
679
|
-
let updatedData = data.slice();
|
|
680
|
-
|
|
681
|
-
const handleReorderRows = ({
|
|
682
|
-
rowId,
|
|
683
|
-
newRowIndex,
|
|
684
|
-
}: DataOnReorderRowsType) => {
|
|
685
|
-
updatedData = reorderData({ data: updatedData, rowId, newRowIndex });
|
|
686
|
-
};
|
|
687
|
-
|
|
688
|
-
render(
|
|
689
|
-
<OdysseyProvider>
|
|
690
|
-
<DataView
|
|
691
|
-
availableLayouts={["table"]}
|
|
692
|
-
getData={() => updatedData}
|
|
693
|
-
hasRowReordering
|
|
694
|
-
onReorderRows={handleReorderRows}
|
|
695
|
-
totalRows={updatedData.length}
|
|
696
|
-
tableLayoutOptions={{
|
|
697
|
-
columns,
|
|
698
|
-
}}
|
|
699
|
-
/>
|
|
700
|
-
</OdysseyProvider>,
|
|
701
|
-
);
|
|
702
|
-
|
|
703
|
-
expect(await screen.findByText(data[0].name)).toBeVisible();
|
|
704
|
-
expect(await screen.findByText(data[5].name)).toBeVisible();
|
|
705
|
-
|
|
706
|
-
const moreActionsButton = within(
|
|
707
|
-
screen.getAllByRole("row")[1],
|
|
708
|
-
).getByLabelText("More actions", { selector: "button" });
|
|
709
|
-
await user.click(moreActionsButton);
|
|
710
|
-
|
|
711
|
-
const moreActionsMenu = getControlledElement({
|
|
712
|
-
element: moreActionsButton,
|
|
713
|
-
});
|
|
714
|
-
const moveToBackButton = within(moreActionsMenu).getByRole("menuitem", {
|
|
715
|
-
name: "Send to back",
|
|
716
|
-
});
|
|
717
|
-
await user.click(moveToBackButton);
|
|
718
|
-
|
|
719
|
-
const updatedRows = await screen.findAllByRole("row");
|
|
720
|
-
|
|
721
|
-
expect(updatedRows[6].textContent).toContain(data[0].name);
|
|
722
|
-
expect(updatedRows[5].textContent).toContain(data[5].name);
|
|
723
|
-
});
|
|
724
|
-
|
|
725
|
-
test("can expand table rows", async () => {
|
|
726
|
-
const user = userEvent.setup();
|
|
727
|
-
|
|
728
|
-
const tableDetails: TableLayoutProps<Person>["renderDetailPanel"] = ({
|
|
729
|
-
row,
|
|
730
|
-
}) => {
|
|
731
|
-
return <p>This is additional content for {row.original.name}</p>;
|
|
732
|
-
};
|
|
733
|
-
|
|
734
|
-
render(
|
|
735
|
-
<OdysseyProvider>
|
|
736
|
-
<DataView
|
|
737
|
-
availableLayouts={["table"]}
|
|
738
|
-
getData={getData}
|
|
739
|
-
tableLayoutOptions={{
|
|
740
|
-
columns,
|
|
741
|
-
renderDetailPanel: tableDetails,
|
|
742
|
-
}}
|
|
743
|
-
/>
|
|
744
|
-
</OdysseyProvider>,
|
|
745
|
-
);
|
|
746
|
-
|
|
747
|
-
await waitUntilTableLoadedHack();
|
|
748
|
-
expect(
|
|
749
|
-
screen.queryByText(`This is additional content for ${data[0].name}`),
|
|
750
|
-
).toBeNull();
|
|
751
|
-
|
|
752
|
-
const firstBodyRow = (await screen.findAllByRole("row"))[1];
|
|
753
|
-
const firstBodyRowExpandButton = within(firstBodyRow).getByLabelText(
|
|
754
|
-
"Expand",
|
|
755
|
-
{ selector: "button" },
|
|
756
|
-
);
|
|
757
|
-
await user.click(firstBodyRowExpandButton);
|
|
758
|
-
|
|
759
|
-
expect(
|
|
760
|
-
screen.queryByText(`This is additional content for ${data[0].name}`),
|
|
761
|
-
).not.toBeNull();
|
|
762
|
-
});
|
|
763
|
-
});
|
|
764
|
-
|
|
765
|
-
test("can expand card rows", async () => {
|
|
766
|
-
const user = userEvent.setup();
|
|
767
|
-
|
|
768
|
-
const cardDetails = ({ row }: { row: DataTableRowData }) => {
|
|
769
|
-
return <p>This is additional content for {row.name}</p>;
|
|
770
|
-
};
|
|
771
|
-
|
|
772
|
-
render(
|
|
773
|
-
<OdysseyProvider>
|
|
774
|
-
<DataView
|
|
775
|
-
availableLayouts={["grid"]}
|
|
776
|
-
getData={getData}
|
|
777
|
-
cardLayoutOptions={{
|
|
778
|
-
itemProps: gridItemProps,
|
|
779
|
-
renderDetailPanel: cardDetails,
|
|
780
|
-
}}
|
|
781
|
-
/>
|
|
782
|
-
</OdysseyProvider>,
|
|
783
|
-
);
|
|
784
|
-
|
|
785
|
-
expect(await screen.findAllByText(data[0].name)).toHaveLength(1);
|
|
786
|
-
expect(
|
|
787
|
-
screen.queryByText(`This is additional content for ${data[0].name}`),
|
|
788
|
-
).toBeNull();
|
|
789
|
-
|
|
790
|
-
const firstCard = (await screen.findAllByRole("listitem"))[0];
|
|
791
|
-
const firstCardExpandButton = within(firstCard).getByLabelText("Expand", {
|
|
792
|
-
selector: "button",
|
|
793
|
-
});
|
|
794
|
-
await user.click(firstCardExpandButton);
|
|
795
|
-
|
|
796
|
-
expect(
|
|
797
|
-
screen.queryByText(`This is additional content for ${data[0].name}`),
|
|
798
|
-
).not.toBeNull();
|
|
799
|
-
});
|
|
800
|
-
|
|
801
|
-
test("can display empty state", async () => {
|
|
802
|
-
const emptyText = "This is the empty state text.";
|
|
803
|
-
|
|
804
|
-
render(
|
|
805
|
-
<OdysseyProvider>
|
|
806
|
-
<DataView
|
|
807
|
-
availableLayouts={["table"]}
|
|
808
|
-
getData={() => []}
|
|
809
|
-
tableLayoutOptions={{
|
|
810
|
-
columns,
|
|
811
|
-
}}
|
|
812
|
-
emptyPlaceholder={
|
|
813
|
-
<EmptyState heading="Empty" description={emptyText} />
|
|
814
|
-
}
|
|
815
|
-
/>
|
|
816
|
-
</OdysseyProvider>,
|
|
817
|
-
);
|
|
818
|
-
|
|
819
|
-
expect(await screen.findByText(emptyText)).not.toBeNull();
|
|
820
|
-
});
|
|
821
|
-
|
|
822
|
-
test("can display no-results state", async () => {
|
|
823
|
-
const noResultsText = "This is the no results state text.";
|
|
824
|
-
|
|
825
|
-
render(
|
|
826
|
-
<OdysseyProvider>
|
|
827
|
-
<DataView
|
|
828
|
-
availableLayouts={["table"]}
|
|
829
|
-
getData={() => []}
|
|
830
|
-
tableLayoutOptions={{
|
|
831
|
-
columns,
|
|
832
|
-
}}
|
|
833
|
-
noResultsPlaceholder={
|
|
834
|
-
<EmptyState heading="No results" description={noResultsText} />
|
|
835
|
-
}
|
|
836
|
-
/>
|
|
837
|
-
</OdysseyProvider>,
|
|
838
|
-
);
|
|
839
|
-
|
|
840
|
-
expect(await screen.findByText(noResultsText)).not.toBeNull();
|
|
841
|
-
});
|
|
842
|
-
|
|
843
|
-
test("can sort rows", async () => {
|
|
844
|
-
const user = userEvent.setup();
|
|
845
|
-
|
|
846
|
-
render(
|
|
847
|
-
<OdysseyProvider>
|
|
848
|
-
<DataView
|
|
849
|
-
availableLayouts={["table"]}
|
|
850
|
-
getData={getData}
|
|
851
|
-
tableLayoutOptions={{
|
|
852
|
-
columns,
|
|
853
|
-
hasSorting: true,
|
|
854
|
-
}}
|
|
855
|
-
/>
|
|
856
|
-
</OdysseyProvider>,
|
|
857
|
-
);
|
|
858
|
-
|
|
859
|
-
await waitUntilTableLoadedHack();
|
|
860
|
-
|
|
861
|
-
const initialRows = screen.getAllByRole("row");
|
|
862
|
-
expect(initialRows[1].textContent).toContain(data[0].name);
|
|
863
|
-
|
|
864
|
-
const idHeader = screen.getByRole("button", {
|
|
865
|
-
name: "Sort by ID descending",
|
|
866
|
-
});
|
|
867
|
-
await user.click(idHeader);
|
|
868
|
-
|
|
869
|
-
expect(await screen.findByText(data[0].name)).toBeVisible();
|
|
870
|
-
|
|
871
|
-
const sortedRows = screen.getAllByRole("row");
|
|
872
|
-
expect(sortedRows[6].textContent).toContain(data[0].name);
|
|
873
|
-
});
|
|
874
|
-
|
|
875
|
-
test("can change row density", async () => {
|
|
876
|
-
const user = userEvent.setup();
|
|
877
|
-
|
|
878
|
-
render(
|
|
879
|
-
<OdysseyProvider>
|
|
880
|
-
<DataView
|
|
881
|
-
availableLayouts={["table"]}
|
|
882
|
-
getData={getData}
|
|
883
|
-
tableLayoutOptions={{
|
|
884
|
-
columns,
|
|
885
|
-
hasChangeableDensity: true,
|
|
886
|
-
}}
|
|
887
|
-
/>
|
|
888
|
-
</OdysseyProvider>,
|
|
889
|
-
);
|
|
890
|
-
|
|
891
|
-
await waitUntilTableLoadedHack();
|
|
892
|
-
|
|
893
|
-
// Since table density is a purely visible attribute, there's no ARIA
|
|
894
|
-
// attribute to target here. We're forced to use the className directly.
|
|
895
|
-
const tBody = screen.getAllByRole("row")[1].parentElement;
|
|
896
|
-
expect(tBody?.className).not.toContain("MuiTableBody-compact");
|
|
897
|
-
|
|
898
|
-
const densityButton = screen.getByLabelText("Table density", {
|
|
899
|
-
selector: "button",
|
|
900
|
-
});
|
|
901
|
-
await user.click(densityButton);
|
|
902
|
-
|
|
903
|
-
const densityMenu = getControlledElement({ element: densityButton });
|
|
904
|
-
const densityCompact = within(densityMenu).getByRole("menuitem", {
|
|
905
|
-
name: "Compact",
|
|
906
|
-
});
|
|
907
|
-
await user.click(densityCompact);
|
|
908
|
-
|
|
909
|
-
expect(tBody?.className).toContain("MuiTableBody-compact");
|
|
910
|
-
});
|
|
911
|
-
|
|
912
|
-
test("can change column visibility", async () => {
|
|
913
|
-
const user = userEvent.setup();
|
|
914
|
-
|
|
915
|
-
render(
|
|
916
|
-
<OdysseyProvider>
|
|
917
|
-
<DataView
|
|
918
|
-
availableLayouts={["table"]}
|
|
919
|
-
getData={getData}
|
|
920
|
-
tableLayoutOptions={{
|
|
921
|
-
columns,
|
|
922
|
-
hasColumnVisibility: true,
|
|
923
|
-
}}
|
|
924
|
-
/>
|
|
925
|
-
</OdysseyProvider>,
|
|
926
|
-
);
|
|
927
|
-
|
|
928
|
-
// Detect if the data has loaded in
|
|
929
|
-
await screen.findByText(data[0].city);
|
|
930
|
-
|
|
931
|
-
const visibilityButton = screen.getByLabelText("Show/hide columns", {
|
|
932
|
-
selector: "button",
|
|
933
|
-
});
|
|
934
|
-
await user.click(visibilityButton);
|
|
935
|
-
|
|
936
|
-
const visibilityMenu = getControlledElement({ element: visibilityButton });
|
|
937
|
-
|
|
938
|
-
const cityCheckbox = within(visibilityMenu).getByText("City");
|
|
939
|
-
await user.click(cityCheckbox);
|
|
940
|
-
|
|
941
|
-
expect(screen.queryByText(data[0].city)).toBeNull();
|
|
942
|
-
});
|
|
943
|
-
|
|
944
|
-
test("can resize columns", async () => {
|
|
945
|
-
render(
|
|
946
|
-
<OdysseyProvider>
|
|
947
|
-
<DataView
|
|
948
|
-
availableLayouts={["table"]}
|
|
949
|
-
getData={getData}
|
|
950
|
-
tableLayoutOptions={{
|
|
951
|
-
columns,
|
|
952
|
-
hasColumnResizing: true,
|
|
953
|
-
}}
|
|
954
|
-
/>
|
|
955
|
-
</OdysseyProvider>,
|
|
956
|
-
);
|
|
957
|
-
|
|
958
|
-
await waitUntilTableLoadedHack();
|
|
959
|
-
|
|
960
|
-
const rows = await screen.findAllByRole("row");
|
|
961
|
-
const tHead = rows[0].parentElement;
|
|
962
|
-
|
|
963
|
-
// Ensure that the resize handle is displayed when
|
|
964
|
-
// hasColumnResizing is true
|
|
965
|
-
const hrElement = tHead!.querySelector("hr");
|
|
966
|
-
expect(tHead).toContainElement(hrElement);
|
|
967
|
-
});
|
|
968
|
-
|
|
969
|
-
describe("Pagination", () => {
|
|
970
|
-
test("displays paged pagination", async () => {
|
|
971
|
-
render(
|
|
972
|
-
<OdysseyProvider>
|
|
973
|
-
<DataView
|
|
974
|
-
availableLayouts={["table"]}
|
|
975
|
-
getData={getData}
|
|
976
|
-
hasPagination
|
|
977
|
-
paginationType="paged"
|
|
978
|
-
tableLayoutOptions={{
|
|
979
|
-
columns,
|
|
980
|
-
}}
|
|
981
|
-
/>
|
|
982
|
-
</OdysseyProvider>,
|
|
983
|
-
);
|
|
984
|
-
|
|
985
|
-
await waitUntilTableLoadedHack();
|
|
986
|
-
|
|
987
|
-
const paginationContainer = await screen.findByLabelText("Pagination", {
|
|
988
|
-
selector: "nav",
|
|
989
|
-
});
|
|
990
|
-
expect(
|
|
991
|
-
within(paginationContainer).getByLabelText("Next page", {
|
|
992
|
-
selector: "button",
|
|
993
|
-
}),
|
|
994
|
-
).toBeInTheDocument();
|
|
995
|
-
});
|
|
996
|
-
|
|
997
|
-
test("displays loadMore pagination", async () => {
|
|
998
|
-
render(
|
|
999
|
-
<OdysseyProvider>
|
|
1000
|
-
<DataView
|
|
1001
|
-
availableLayouts={["table"]}
|
|
1002
|
-
getData={getData}
|
|
1003
|
-
hasPagination
|
|
1004
|
-
paginationType="loadMore"
|
|
1005
|
-
enableVirtualization={false}
|
|
1006
|
-
tableLayoutOptions={{
|
|
1007
|
-
columns,
|
|
1008
|
-
}}
|
|
1009
|
-
/>
|
|
1010
|
-
</OdysseyProvider>,
|
|
1011
|
-
);
|
|
1012
|
-
|
|
1013
|
-
await waitUntilTableLoadedHack();
|
|
1014
|
-
|
|
1015
|
-
expect(
|
|
1016
|
-
screen.getByText("Show more", { selector: "button" }),
|
|
1017
|
-
).toBeInTheDocument();
|
|
1018
|
-
});
|
|
1019
|
-
|
|
1020
|
-
test("can load more rows via loadMore pagination", async () => {
|
|
1021
|
-
const user = userEvent.setup();
|
|
1022
|
-
|
|
1023
|
-
render(
|
|
1024
|
-
<OdysseyProvider>
|
|
1025
|
-
<DataView
|
|
1026
|
-
availableLayouts={["table"]}
|
|
1027
|
-
getData={getData}
|
|
1028
|
-
hasPagination
|
|
1029
|
-
paginationType="loadMore"
|
|
1030
|
-
resultsPerPage={3}
|
|
1031
|
-
enableVirtualization={false}
|
|
1032
|
-
tableLayoutOptions={{
|
|
1033
|
-
columns,
|
|
1034
|
-
}}
|
|
1035
|
-
/>
|
|
1036
|
-
</OdysseyProvider>,
|
|
1037
|
-
);
|
|
1038
|
-
|
|
1039
|
-
await waitUntilTableLoadedHack();
|
|
1040
|
-
|
|
1041
|
-
expect(screen.getAllByRole("row")).toHaveLength(4);
|
|
1042
|
-
|
|
1043
|
-
const loadMoreButton = screen.getByText("Show more", {
|
|
1044
|
-
selector: "button",
|
|
1045
|
-
});
|
|
1046
|
-
await user.click(loadMoreButton);
|
|
1047
|
-
|
|
1048
|
-
await waitFor(() => {
|
|
1049
|
-
expect(screen.getAllByRole("row")).toHaveLength(7); // 6 data rows + header row
|
|
1050
|
-
});
|
|
1051
|
-
});
|
|
1052
|
-
|
|
1053
|
-
test("can go to the next page", async () => {
|
|
1054
|
-
const user = userEvent.setup();
|
|
1055
|
-
|
|
1056
|
-
render(
|
|
1057
|
-
<OdysseyProvider>
|
|
1058
|
-
<DataView
|
|
1059
|
-
availableLayouts={["table"]}
|
|
1060
|
-
getData={getData}
|
|
1061
|
-
hasPagination
|
|
1062
|
-
paginationType="paged"
|
|
1063
|
-
resultsPerPage={2}
|
|
1064
|
-
tableLayoutOptions={{
|
|
1065
|
-
columns,
|
|
1066
|
-
}}
|
|
1067
|
-
/>
|
|
1068
|
-
</OdysseyProvider>,
|
|
1069
|
-
);
|
|
1070
|
-
|
|
1071
|
-
await waitUntilTableLoadedHack();
|
|
1072
|
-
|
|
1073
|
-
expect(screen.queryByText(data[0].name)).not.toBeNull();
|
|
1074
|
-
expect(screen.queryByText(data[2].name)).toBeNull();
|
|
1075
|
-
|
|
1076
|
-
const nextPageButton = screen.getByLabelText("Next page", {
|
|
1077
|
-
selector: "button",
|
|
1078
|
-
});
|
|
1079
|
-
await user.click(nextPageButton);
|
|
1080
|
-
|
|
1081
|
-
await screen.findByText(data[2].name);
|
|
1082
|
-
|
|
1083
|
-
expect(screen.queryByText(data[0].name)).toBeNull();
|
|
1084
|
-
expect(screen.queryByText(data[2].name)).not.toBeNull();
|
|
1085
|
-
});
|
|
1086
|
-
|
|
1087
|
-
test("can go to the previous page", async () => {
|
|
1088
|
-
const user = userEvent.setup();
|
|
1089
|
-
|
|
1090
|
-
render(
|
|
1091
|
-
<OdysseyProvider>
|
|
1092
|
-
<DataView
|
|
1093
|
-
availableLayouts={["table"]}
|
|
1094
|
-
getData={getData}
|
|
1095
|
-
hasPagination
|
|
1096
|
-
paginationType="paged"
|
|
1097
|
-
resultsPerPage={2}
|
|
1098
|
-
tableLayoutOptions={{
|
|
1099
|
-
columns,
|
|
1100
|
-
}}
|
|
1101
|
-
/>
|
|
1102
|
-
</OdysseyProvider>,
|
|
1103
|
-
);
|
|
1104
|
-
|
|
1105
|
-
await waitUntilTableLoadedHack();
|
|
1106
|
-
|
|
1107
|
-
expect(screen.queryByText(data[0].name)).not.toBeNull();
|
|
1108
|
-
expect(screen.queryByText(data[2].name)).toBeNull();
|
|
1109
|
-
|
|
1110
|
-
const nextPageButton = screen.getByLabelText("Next page", {
|
|
1111
|
-
selector: "button",
|
|
1112
|
-
});
|
|
1113
|
-
await user.click(nextPageButton);
|
|
1114
|
-
|
|
1115
|
-
await screen.findByText(data[2].name);
|
|
1116
|
-
|
|
1117
|
-
expect(screen.queryByText(data[0].name)).toBeNull();
|
|
1118
|
-
expect(screen.queryByText(data[2].name)).not.toBeNull();
|
|
1119
|
-
|
|
1120
|
-
const prevPageButton = screen.getByLabelText("Previous page", {
|
|
1121
|
-
selector: "button",
|
|
1122
|
-
});
|
|
1123
|
-
await user.click(prevPageButton);
|
|
1124
|
-
|
|
1125
|
-
await waitUntilTableLoadedHack();
|
|
1126
|
-
|
|
1127
|
-
expect(screen.queryByText(data[0].name)).not.toBeNull();
|
|
1128
|
-
expect(screen.queryByText(data[2].name)).toBeNull();
|
|
1129
|
-
});
|
|
1130
|
-
|
|
1131
|
-
test("can disable the next page button based on max rows", async () => {
|
|
1132
|
-
const user = userEvent.setup();
|
|
1133
|
-
|
|
1134
|
-
render(
|
|
1135
|
-
<OdysseyProvider>
|
|
1136
|
-
<DataView
|
|
1137
|
-
availableLayouts={["table"]}
|
|
1138
|
-
getData={getData}
|
|
1139
|
-
hasPagination
|
|
1140
|
-
paginationType="paged"
|
|
1141
|
-
resultsPerPage={data.length - 1}
|
|
1142
|
-
totalRows={data.length}
|
|
1143
|
-
tableLayoutOptions={{
|
|
1144
|
-
columns,
|
|
1145
|
-
}}
|
|
1146
|
-
/>
|
|
1147
|
-
</OdysseyProvider>,
|
|
1148
|
-
);
|
|
1149
|
-
|
|
1150
|
-
await waitUntilTableLoadedHack();
|
|
1151
|
-
|
|
1152
|
-
const nextPageButton = screen.getByLabelText("Next page", {
|
|
1153
|
-
selector: "button",
|
|
1154
|
-
});
|
|
1155
|
-
const prevPageButton = screen.getByLabelText("Previous page", {
|
|
1156
|
-
selector: "button",
|
|
1157
|
-
});
|
|
1158
|
-
|
|
1159
|
-
expect(prevPageButton).toBeDisabled();
|
|
1160
|
-
expect(nextPageButton).not.toBeDisabled();
|
|
1161
|
-
|
|
1162
|
-
await user.click(nextPageButton);
|
|
1163
|
-
|
|
1164
|
-
expect(prevPageButton).not.toBeDisabled();
|
|
1165
|
-
expect(nextPageButton).toBeDisabled();
|
|
1166
|
-
});
|
|
1167
|
-
});
|
|
1168
|
-
});
|