@okta/odyssey-react-mui 1.21.2 → 1.23.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/CHANGELOG.md +34 -0
- package/dist/@types/i18next.d.js.map +1 -1
- package/dist/Autocomplete.js +106 -38
- package/dist/Autocomplete.js.map +1 -1
- package/dist/Callout.js +12 -24
- package/dist/Callout.js.map +1 -1
- package/dist/Checkbox.js +26 -11
- package/dist/Checkbox.js.map +1 -1
- package/dist/CheckboxGroup.js +14 -3
- package/dist/CheckboxGroup.js.map +1 -1
- package/dist/DataTable/DataTable.js +10 -2
- package/dist/DataTable/DataTable.js.map +1 -1
- package/dist/DataTable/useScrollIndication.js +9 -5
- package/dist/DataTable/useScrollIndication.js.map +1 -1
- package/dist/Field.js +3 -1
- package/dist/Field.js.map +1 -1
- package/dist/FileUploader/FileUploadIllustration.js.map +1 -0
- package/dist/FileUploader/FileUploadPreview.js.map +1 -0
- package/dist/{labs/FileUpload.js → FileUploader/FileUploader.js} +6 -5
- package/dist/FileUploader/FileUploader.js.map +1 -0
- package/dist/FileUploader/index.js +13 -0
- package/dist/FileUploader/index.js.map +1 -0
- package/dist/OdysseyCacheProvider.js +4 -3
- package/dist/OdysseyCacheProvider.js.map +1 -1
- package/dist/OdysseyProvider.js +10 -3
- package/dist/OdysseyProvider.js.map +1 -1
- package/dist/OdysseyThemeProvider.js +3 -2
- package/dist/OdysseyThemeProvider.js.map +1 -1
- package/dist/Radio.js +33 -6
- package/dist/Radio.js.map +1 -1
- package/dist/RadioGroup.js +17 -5
- package/dist/RadioGroup.js.map +1 -1
- package/dist/Select.js +89 -31
- package/dist/Select.js.map +1 -1
- package/dist/{labs/Switch.js → Switch.js} +77 -23
- package/dist/Switch.js.map +1 -0
- package/dist/Tabs.js +7 -9
- package/dist/Tabs.js.map +1 -1
- package/dist/Tag.js +102 -4
- package/dist/Tag.js.map +1 -1
- package/dist/TextField.js +16 -39
- package/dist/TextField.js.map +1 -1
- package/dist/Toast.js +2 -2
- package/dist/Toast.js.map +1 -1
- package/dist/ToastStack.js.map +1 -1
- package/dist/createShadowDomElements.js +43 -0
- package/dist/createShadowDomElements.js.map +1 -0
- package/dist/i18n.js +1 -1
- package/dist/i18n.js.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/index.scss +96 -8
- package/dist/labs/AppTile.js +124 -0
- package/dist/labs/AppTile.js.map +1 -0
- package/dist/labs/DataView/BulkActionsMenu.js.map +1 -0
- package/dist/labs/{DataComponents/StackContent.js → DataView/CardLayoutContent.js} +14 -14
- package/dist/labs/DataView/CardLayoutContent.js.map +1 -0
- package/dist/labs/{DataComponents/StackCard.js → DataView/DataCard.js} +6 -6
- package/dist/labs/DataView/DataCard.js.map +1 -0
- package/dist/labs/{DataComponents → DataView}/DataTable.js +6 -2
- package/dist/labs/DataView/DataTable.js.map +1 -0
- package/dist/labs/{DataComponents → DataView}/DataView.js +79 -30
- package/dist/labs/DataView/DataView.js.map +1 -0
- package/dist/labs/DataView/DetailPanel.js.map +1 -0
- package/dist/labs/DataView/LayoutSwitcher.js.map +1 -0
- package/dist/labs/DataView/RowActions.js.map +1 -0
- package/dist/labs/{DataComponents/TableContent.js → DataView/TableLayoutContent.js} +34 -20
- package/dist/labs/DataView/TableLayoutContent.js.map +1 -0
- package/dist/labs/{DataComponents → DataView}/TableSettings.js +2 -2
- package/dist/labs/DataView/TableSettings.js.map +1 -0
- package/dist/labs/DataView/componentTypes.js.map +1 -0
- package/dist/labs/{DataComponents → DataView}/constants.js +2 -2
- package/dist/labs/DataView/constants.js.map +1 -0
- package/dist/labs/DataView/dataTypes.js.map +1 -0
- package/dist/labs/DataView/fetchData.js.map +1 -0
- package/dist/labs/{DataComponents → DataView}/index.js +0 -1
- package/dist/labs/DataView/index.js.map +1 -0
- package/dist/labs/DataView/tableConstants.js.map +1 -0
- package/dist/labs/DataView/useFilterConversion.js.map +1 -0
- package/dist/labs/DateField.js +2 -0
- package/dist/labs/DateField.js.map +1 -1
- package/dist/labs/DatePicker.js +5 -1
- package/dist/labs/DatePicker.js.map +1 -1
- package/dist/labs/SideNav/CollapseIcon.js +44 -0
- package/dist/labs/SideNav/CollapseIcon.js.map +1 -0
- package/dist/labs/SideNav/OktaLogo.js +36 -0
- package/dist/labs/SideNav/OktaLogo.js.map +1 -0
- package/dist/labs/SideNav/SideNav.js +335 -0
- package/dist/labs/SideNav/SideNav.js.map +1 -0
- package/dist/labs/SideNav/SideNavFooterContent.js +49 -0
- package/dist/labs/SideNav/SideNavFooterContent.js.map +1 -0
- package/dist/labs/SideNav/SideNavHeader.js +81 -0
- package/dist/labs/SideNav/SideNavHeader.js.map +1 -0
- package/dist/labs/SideNav/SideNavItemContent.js +157 -0
- package/dist/labs/SideNav/SideNavItemContent.js.map +1 -0
- package/dist/labs/SideNav/SideNavItemLinkContent.js +71 -0
- package/dist/labs/SideNav/SideNavItemLinkContent.js.map +1 -0
- package/dist/labs/SideNav/index.js +14 -0
- package/dist/labs/SideNav/index.js.map +1 -0
- package/dist/labs/SideNav/types.js +2 -0
- package/dist/labs/SideNav/types.js.map +1 -0
- package/dist/labs/TopNav.js +2 -1
- package/dist/labs/TopNav.js.map +1 -1
- package/dist/labs/index.js +3 -4
- package/dist/labs/index.js.map +1 -1
- package/dist/labs/useDateFieldsTranslations.js +1 -1
- package/dist/labs/useDateFieldsTranslations.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui.js +3 -1
- package/dist/properties/ts/odyssey-react-mui.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_cs.js +17 -3
- package/dist/properties/ts/odyssey-react-mui_cs.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_da.js +17 -3
- package/dist/properties/ts/odyssey-react-mui_da.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_de.js +16 -2
- package/dist/properties/ts/odyssey-react-mui_de.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_el.js +18 -4
- package/dist/properties/ts/odyssey-react-mui_el.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_es.js +17 -3
- package/dist/properties/ts/odyssey-react-mui_es.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_fi.js +17 -3
- package/dist/properties/ts/odyssey-react-mui_fi.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_fr.js +17 -3
- package/dist/properties/ts/odyssey-react-mui_fr.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_ht.js +18 -4
- package/dist/properties/ts/odyssey-react-mui_ht.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_hu.js +17 -3
- package/dist/properties/ts/odyssey-react-mui_hu.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_id.js +17 -3
- package/dist/properties/ts/odyssey-react-mui_id.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_it.js +17 -3
- package/dist/properties/ts/odyssey-react-mui_it.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_ja.js +16 -2
- package/dist/properties/ts/odyssey-react-mui_ja.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_ko.js +16 -2
- package/dist/properties/ts/odyssey-react-mui_ko.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_ms.js +17 -3
- package/dist/properties/ts/odyssey-react-mui_ms.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_nb.js +17 -3
- package/dist/properties/ts/odyssey-react-mui_nb.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_nl_NL.js +17 -3
- package/dist/properties/ts/odyssey-react-mui_nl_NL.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_pl.js +17 -3
- package/dist/properties/ts/odyssey-react-mui_pl.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_pt_BR.js +17 -3
- package/dist/properties/ts/odyssey-react-mui_pt_BR.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_ro.js +17 -3
- package/dist/properties/ts/odyssey-react-mui_ro.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_ru.js +17 -3
- package/dist/properties/ts/odyssey-react-mui_ru.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_sv.js +17 -3
- package/dist/properties/ts/odyssey-react-mui_sv.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_th.js +16 -2
- package/dist/properties/ts/odyssey-react-mui_th.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_tr.js +17 -3
- package/dist/properties/ts/odyssey-react-mui_tr.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_uk.js +17 -3
- package/dist/properties/ts/odyssey-react-mui_uk.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_vi.js +17 -3
- package/dist/properties/ts/odyssey-react-mui_vi.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_zh_CN.js +16 -2
- package/dist/properties/ts/odyssey-react-mui_zh_CN.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_zh_TW.js +16 -2
- package/dist/properties/ts/odyssey-react-mui_zh_TW.js.map +1 -1
- package/dist/src/Autocomplete.d.ts +30 -0
- package/dist/src/Autocomplete.d.ts.map +1 -1
- package/dist/src/Callout.d.ts +11 -23
- package/dist/src/Callout.d.ts.map +1 -1
- package/dist/src/Checkbox.d.ts +2 -2
- package/dist/src/Checkbox.d.ts.map +1 -1
- package/dist/src/CheckboxGroup.d.ts +3 -3
- package/dist/src/CheckboxGroup.d.ts.map +1 -1
- package/dist/src/DataTable/DataTable.d.ts +9 -1
- package/dist/src/DataTable/DataTable.d.ts.map +1 -1
- package/dist/src/DataTable/useScrollIndication.d.ts.map +1 -1
- package/dist/src/Field.d.ts +3 -2
- package/dist/src/Field.d.ts.map +1 -1
- package/dist/src/FileUploader/FileUploadIllustration.d.ts.map +1 -0
- package/dist/src/{labs → FileUploader}/FileUploadPreview.d.ts +2 -2
- package/dist/src/FileUploader/FileUploadPreview.d.ts.map +1 -0
- package/dist/src/{labs/FileUpload.d.ts → FileUploader/FileUploader.d.ts} +5 -4
- package/dist/src/FileUploader/FileUploader.d.ts.map +1 -0
- package/dist/src/FileUploader/index.d.ts +13 -0
- package/dist/src/FileUploader/index.d.ts.map +1 -0
- package/dist/src/NativeSelect.d.ts +1 -1
- package/dist/src/OdysseyCacheProvider.d.ts +7 -3
- package/dist/src/OdysseyCacheProvider.d.ts.map +1 -1
- package/dist/src/OdysseyProvider.d.ts +1 -1
- package/dist/src/OdysseyProvider.d.ts.map +1 -1
- package/dist/src/OdysseyThemeProvider.d.ts +3 -1
- package/dist/src/OdysseyThemeProvider.d.ts.map +1 -1
- package/dist/src/OdysseyTranslationProvider.d.ts +1 -1
- package/dist/src/OdysseyTranslationProvider.d.ts.map +1 -1
- package/dist/src/PasswordField.d.ts +1 -1
- package/dist/src/Radio.d.ts +6 -8
- package/dist/src/Radio.d.ts.map +1 -1
- package/dist/src/RadioGroup.d.ts +4 -5
- package/dist/src/RadioGroup.d.ts.map +1 -1
- package/dist/src/SearchField.d.ts +1 -1
- package/dist/src/Select.d.ts +38 -2
- package/dist/src/Select.d.ts.map +1 -1
- package/dist/src/{labs/Switch.d.ts → Switch.d.ts} +8 -4
- package/dist/src/Switch.d.ts.map +1 -0
- package/dist/src/Tabs.d.ts +6 -8
- package/dist/src/Tabs.d.ts.map +1 -1
- package/dist/src/Tag.d.ts +7 -1
- package/dist/src/Tag.d.ts.map +1 -1
- package/dist/src/TextField.d.ts +17 -40
- package/dist/src/TextField.d.ts.map +1 -1
- package/dist/src/ToastStack.d.ts +2 -2
- package/dist/src/ToastStack.d.ts.map +1 -1
- package/dist/src/{createShadowRootElement.d.ts → createShadowDomElements.d.ts} +6 -1
- package/dist/src/createShadowDomElements.d.ts.map +1 -0
- package/dist/src/i18n.d.ts +2 -2
- package/dist/src/i18n.d.ts.map +1 -1
- package/dist/src/index.d.ts +3 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/labs/AppTile.d.ts +39 -0
- package/dist/src/labs/AppTile.d.ts.map +1 -0
- package/dist/src/labs/DataView/BulkActionsMenu.d.ts.map +1 -0
- package/dist/src/labs/{DataComponents/StackContent.d.ts → DataView/CardLayoutContent.d.ts} +7 -7
- package/dist/src/labs/DataView/CardLayoutContent.d.ts.map +1 -0
- package/dist/src/labs/{DataComponents/StackCard.d.ts → DataView/DataCard.d.ts} +4 -4
- package/dist/src/labs/DataView/DataCard.d.ts.map +1 -0
- package/dist/src/labs/DataView/DataTable.d.ts +16 -0
- package/dist/src/labs/DataView/DataTable.d.ts.map +1 -0
- package/dist/src/labs/{DataComponents → DataView}/DataView.d.ts +1 -1
- package/dist/src/labs/DataView/DataView.d.ts.map +1 -0
- package/dist/src/labs/{DataComponents → DataView}/DetailPanel.d.ts +2 -2
- package/dist/src/labs/DataView/DetailPanel.d.ts.map +1 -0
- package/dist/src/labs/DataView/LayoutSwitcher.d.ts.map +1 -0
- package/dist/src/labs/DataView/RowActions.d.ts.map +1 -0
- package/dist/src/labs/{DataComponents/TableContent.d.ts → DataView/TableLayoutContent.d.ts} +8 -7
- package/dist/src/labs/DataView/TableLayoutContent.d.ts.map +1 -0
- package/dist/src/labs/{DataComponents → DataView}/TableSettings.d.ts +3 -3
- package/dist/src/labs/DataView/TableSettings.d.ts.map +1 -0
- package/dist/src/labs/{DataComponents → DataView}/componentTypes.d.ts +21 -9
- package/dist/src/labs/DataView/componentTypes.d.ts.map +1 -0
- package/dist/src/labs/{DataComponents → DataView}/constants.d.ts +1 -1
- package/dist/src/labs/DataView/constants.d.ts.map +1 -0
- package/dist/src/labs/DataView/dataTypes.d.ts.map +1 -0
- package/dist/src/labs/DataView/fetchData.d.ts.map +1 -0
- package/dist/src/labs/{DataComponents → DataView}/index.d.ts +0 -1
- package/dist/src/labs/DataView/index.d.ts.map +1 -0
- package/dist/src/labs/DataView/tableConstants.d.ts.map +1 -0
- package/dist/src/labs/{DataComponents → DataView}/useFilterConversion.d.ts +2 -2
- package/dist/src/labs/DataView/useFilterConversion.d.ts.map +1 -0
- package/dist/src/labs/DateField.d.ts +2 -2
- package/dist/src/labs/DateField.d.ts.map +1 -1
- package/dist/src/labs/DatePicker.d.ts +2 -2
- package/dist/src/labs/DatePicker.d.ts.map +1 -1
- package/dist/src/labs/SideNav/CollapseIcon.d.ts +17 -0
- package/dist/src/labs/SideNav/CollapseIcon.d.ts.map +1 -0
- package/dist/src/labs/SideNav/OktaLogo.d.ts +14 -0
- package/dist/src/labs/SideNav/OktaLogo.d.ts.map +1 -0
- package/dist/src/labs/SideNav/SideNav.d.ts +16 -0
- package/dist/src/labs/SideNav/SideNav.d.ts.map +1 -0
- package/dist/{test-selectors/odysseyTestSelectors.js → src/labs/SideNav/SideNavFooterContent.d.ts} +6 -9
- package/dist/src/labs/SideNav/SideNavFooterContent.d.ts.map +1 -0
- package/dist/src/labs/SideNav/SideNavHeader.d.ts +16 -0
- package/dist/src/labs/SideNav/SideNavHeader.d.ts.map +1 -0
- package/dist/src/labs/SideNav/SideNavItemContent.d.ts +33 -0
- package/dist/src/labs/SideNav/SideNavItemContent.d.ts.map +1 -0
- package/dist/src/labs/SideNav/SideNavItemLinkContent.d.ts +16 -0
- package/dist/src/labs/SideNav/SideNavItemLinkContent.d.ts.map +1 -0
- package/dist/src/labs/SideNav/index.d.ts +14 -0
- package/dist/src/labs/SideNav/index.d.ts.map +1 -0
- package/dist/src/labs/{SideNav.d.ts → SideNav/types.d.ts} +54 -33
- package/dist/src/labs/SideNav/types.d.ts.map +1 -0
- package/dist/src/labs/TopNav.d.ts +1 -0
- package/dist/src/labs/TopNav.d.ts.map +1 -1
- package/dist/src/labs/index.d.ts +2 -3
- package/dist/src/labs/index.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_cs.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_cs.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_da.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_da.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_de.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_de.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_el.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_el.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_es.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_es.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_fi.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_fi.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_fr.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_fr.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_ht.d.ts +16 -2
- package/dist/src/properties/ts/odyssey-react-mui_ht.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_hu.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_hu.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_id.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_id.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_it.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_it.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_ja.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_ja.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_ko.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_ko.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_ms.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_ms.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_nb.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_nb.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_nl_NL.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_nl_NL.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_pl.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_pl.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_pt_BR.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_pt_BR.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_ro.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_ro.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_ru.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_ru.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_sv.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_sv.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_th.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_th.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_tr.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_tr.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_uk.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_uk.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_vi.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_vi.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_zh_CN.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_zh_CN.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_zh_TW.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_zh_TW.d.ts.map +1 -1
- package/dist/src/test-selectors/getByQuerySelector.d.ts +148 -0
- package/dist/src/test-selectors/getByQuerySelector.d.ts.map +1 -0
- package/dist/src/test-selectors/getComputedAccessibleErrorMessageText.d.ts +14 -0
- package/dist/src/test-selectors/getComputedAccessibleErrorMessageText.d.ts.map +1 -0
- package/dist/src/test-selectors/getComputedAccessibleText.d.ts +23 -0
- package/dist/src/test-selectors/getComputedAccessibleText.d.ts.map +1 -0
- package/dist/src/test-selectors/index.d.ts +2 -2
- package/dist/src/test-selectors/index.d.ts.map +1 -1
- package/{src/test-selectors/odysseyTestSelectors.ts → dist/src/test-selectors/interpolateString.d.ts} +4 -11
- package/dist/src/test-selectors/interpolateString.d.ts.map +1 -0
- package/dist/src/test-selectors/linkedHtmlSelectors.d.ts +24 -0
- package/dist/src/test-selectors/linkedHtmlSelectors.d.ts.map +1 -0
- package/dist/src/test-selectors/queryOdysseySelector.d.ts +5755 -0
- package/dist/src/test-selectors/queryOdysseySelector.d.ts.map +1 -0
- package/dist/src/test-selectors/querySelector.d.ts +59 -3613
- package/dist/src/test-selectors/querySelector.d.ts.map +1 -1
- package/dist/src/test-selectors/sanityChecks.d.ts +18 -0
- package/dist/src/test-selectors/sanityChecks.d.ts.map +1 -0
- package/dist/src/test-selectors/testSelector.d.ts +46 -0
- package/dist/src/test-selectors/testSelector.d.ts.map +1 -0
- package/dist/src/theme/components.d.ts +3 -1
- package/dist/src/theme/components.d.ts.map +1 -1
- package/dist/src/theme/createOdysseyMuiTheme.d.ts +3 -1
- package/dist/src/theme/createOdysseyMuiTheme.d.ts.map +1 -1
- package/dist/test-selectors/getByQuerySelector.js +64 -0
- package/dist/test-selectors/getByQuerySelector.js.map +1 -0
- package/dist/test-selectors/getComputedAccessibleErrorMessageText.js +25 -0
- package/dist/test-selectors/getComputedAccessibleErrorMessageText.js.map +1 -0
- package/dist/test-selectors/getComputedAccessibleText.js +24 -0
- package/dist/test-selectors/getComputedAccessibleText.js.map +1 -0
- package/dist/test-selectors/index.js +2 -2
- package/dist/test-selectors/index.js.map +1 -1
- package/dist/test-selectors/interpolateString.js +25 -0
- package/dist/test-selectors/interpolateString.js.map +1 -0
- package/dist/test-selectors/linkedHtmlSelectors.js +34 -0
- package/dist/test-selectors/linkedHtmlSelectors.js.map +1 -0
- package/dist/test-selectors/queryOdysseySelector.js +26 -0
- package/dist/test-selectors/queryOdysseySelector.js.map +1 -0
- package/dist/test-selectors/querySelector.js +82 -58
- package/dist/test-selectors/querySelector.js.map +1 -1
- package/dist/test-selectors/sanityChecks.js +33 -0
- package/dist/test-selectors/sanityChecks.js.map +1 -0
- package/dist/test-selectors/testSelector.js +2 -0
- package/dist/test-selectors/testSelector.js.map +1 -0
- package/dist/test-selectors/testSelectors.json +1 -1
- package/dist/theme/components.js +231 -146
- package/dist/theme/components.js.map +1 -1
- package/dist/theme/createOdysseyMuiTheme.js +3 -2
- package/dist/theme/createOdysseyMuiTheme.js.map +1 -1
- package/dist/tsconfig.production.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/jest.setup.js +3 -0
- package/package.json +5 -5
- package/scripts/generateTestSelectorsJson.ts +1 -1
- package/src/@types/i18next.d.ts +1 -1
- package/src/Autocomplete.tsx +140 -45
- package/src/Callout.tsx +13 -25
- package/src/Checkbox.tsx +39 -9
- package/src/CheckboxGroup.tsx +20 -4
- package/src/DataTable/DataTable.tsx +24 -1
- package/src/DataTable/useScrollIndication.tsx +11 -4
- package/src/Field.tsx +5 -2
- package/src/{labs → FileUploader}/FileUploadPreview.tsx +3 -3
- package/src/{labs/FileUpload.tsx → FileUploader/FileUploader.tsx} +7 -6
- package/src/FileUploader/index.ts +13 -0
- package/src/OdysseyCacheProvider.test.tsx +1 -0
- package/src/OdysseyCacheProvider.tsx +18 -4
- package/src/OdysseyProvider.tsx +12 -4
- package/src/OdysseyThemeProvider.tsx +6 -2
- package/src/Radio.tsx +41 -12
- package/src/RadioGroup.tsx +26 -7
- package/src/Select.tsx +116 -45
- package/src/{labs/Switch.tsx → Switch.tsx} +95 -41
- package/src/Tabs.tsx +8 -10
- package/src/Tag.tsx +134 -3
- package/src/TextField.tsx +18 -41
- package/src/Toast.tsx +1 -1
- package/src/ToastStack.tsx +2 -2
- package/src/createShadowDomElements.ts +53 -0
- package/src/i18n.ts +3 -3
- package/src/index.ts +7 -2
- package/src/labs/AppTile.tsx +200 -0
- package/src/labs/{DataComponents/StackContent.tsx → DataView/CardLayoutContent.tsx} +24 -19
- package/src/labs/{DataComponents/StackCard.tsx → DataView/DataCard.tsx} +7 -7
- package/src/labs/{DataComponents → DataView}/DataTable.tsx +8 -4
- package/src/labs/DataView/DataView.test.tsx +158 -0
- package/src/labs/{DataComponents → DataView}/DataView.tsx +119 -42
- package/src/labs/{DataComponents → DataView}/DetailPanel.tsx +2 -2
- package/src/labs/{DataComponents/TableContent.tsx → DataView/TableLayoutContent.tsx} +59 -27
- package/src/labs/{DataComponents → DataView}/TableSettings.tsx +5 -4
- package/src/labs/{DataComponents → DataView}/componentTypes.ts +24 -9
- package/src/labs/{DataComponents → DataView}/constants.tsx +2 -2
- package/src/labs/{DataComponents → DataView}/index.tsx +0 -1
- package/src/labs/{DataComponents → DataView}/useFilterConversion.ts +2 -2
- package/src/labs/DateField.tsx +3 -0
- package/src/labs/DatePicker.tsx +12 -1
- package/src/labs/SideNav/CollapseIcon.tsx +48 -0
- package/src/labs/SideNav/OktaLogo.tsx +39 -0
- package/src/labs/SideNav/SideNav.tsx +486 -0
- package/src/labs/SideNav/SideNavFooterContent.tsx +64 -0
- package/src/labs/SideNav/SideNavHeader.tsx +88 -0
- package/src/labs/SideNav/SideNavItemContent.tsx +216 -0
- package/src/labs/SideNav/SideNavItemLinkContent.tsx +87 -0
- package/src/labs/SideNav/index.ts +15 -0
- package/src/labs/SideNav/types.ts +152 -0
- package/src/labs/TopNav.tsx +3 -1
- package/src/labs/index.ts +3 -4
- package/src/labs/useDateFieldsTranslations.ts +1 -1
- package/src/properties/odyssey-react-mui.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_cs.properties +15 -3
- package/src/properties/translations/odyssey-react-mui_da.properties +15 -3
- package/src/properties/translations/odyssey-react-mui_de.properties +14 -2
- package/src/properties/translations/odyssey-react-mui_el.properties +16 -4
- package/src/properties/translations/odyssey-react-mui_es.properties +15 -3
- package/src/properties/translations/odyssey-react-mui_fi.properties +15 -3
- package/src/properties/translations/odyssey-react-mui_fr.properties +15 -3
- package/src/properties/translations/odyssey-react-mui_ht.properties +17 -6
- package/src/properties/translations/odyssey-react-mui_hu.properties +15 -3
- package/src/properties/translations/odyssey-react-mui_id.properties +15 -3
- package/src/properties/translations/odyssey-react-mui_it.properties +15 -3
- package/src/properties/translations/odyssey-react-mui_ja.properties +14 -2
- package/src/properties/translations/odyssey-react-mui_ko.properties +14 -2
- package/src/properties/translations/odyssey-react-mui_ms.properties +15 -3
- package/src/properties/translations/odyssey-react-mui_nb.properties +15 -3
- package/src/properties/translations/odyssey-react-mui_nl_NL.properties +15 -3
- package/src/properties/translations/odyssey-react-mui_pl.properties +15 -3
- package/src/properties/translations/odyssey-react-mui_pt_BR.properties +15 -3
- package/src/properties/translations/odyssey-react-mui_ro.properties +15 -3
- package/src/properties/translations/odyssey-react-mui_ru.properties +15 -3
- package/src/properties/translations/odyssey-react-mui_sv.properties +15 -3
- package/src/properties/translations/odyssey-react-mui_th.properties +14 -2
- package/src/properties/translations/odyssey-react-mui_tr.properties +15 -3
- package/src/properties/translations/odyssey-react-mui_uk.properties +15 -3
- package/src/properties/translations/odyssey-react-mui_vi.properties +15 -3
- package/src/properties/translations/odyssey-react-mui_zh_CN.properties +14 -2
- package/src/properties/translations/odyssey-react-mui_zh_TW.properties +14 -2
- package/src/properties/ts/odyssey-react-mui.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_cs.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_da.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_de.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_el.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_es.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_fi.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_fr.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_ht.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_hu.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_id.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_it.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_ja.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_ko.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_ms.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_nb.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_nl_NL.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_pl.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_pt_BR.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_ro.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_ru.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_sv.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_th.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_tr.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_uk.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_vi.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_zh_CN.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_zh_TW.ts +1 -1
- package/src/test-selectors/getByQuerySelector.ts +176 -0
- package/src/test-selectors/getComputedAccessibleErrorMessageText.ts +52 -0
- package/src/test-selectors/getComputedAccessibleText.ts +36 -0
- package/src/test-selectors/index.ts +2 -2
- package/src/test-selectors/interpolateString.ts +41 -0
- package/src/test-selectors/linkedHtmlSelectors.ts +73 -0
- package/src/test-selectors/queryOdysseySelector.ts +36 -0
- package/src/test-selectors/querySelector.ts +221 -170
- package/src/test-selectors/sanityChecks.ts +53 -0
- package/src/test-selectors/testSelector.ts +143 -0
- package/src/theme/components.tsx +238 -150
- package/src/theme/createOdysseyMuiTheme.ts +4 -1
- package/dist/createShadowRootElement.js +0 -26
- package/dist/createShadowRootElement.js.map +0 -1
- package/dist/labs/DataComponents/BulkActionsMenu.js.map +0 -1
- package/dist/labs/DataComponents/DataStack.js +0 -85
- package/dist/labs/DataComponents/DataStack.js.map +0 -1
- package/dist/labs/DataComponents/DataTable.js.map +0 -1
- package/dist/labs/DataComponents/DataView.js.map +0 -1
- package/dist/labs/DataComponents/DetailPanel.js.map +0 -1
- package/dist/labs/DataComponents/LayoutSwitcher.js.map +0 -1
- package/dist/labs/DataComponents/RowActions.js.map +0 -1
- package/dist/labs/DataComponents/StackCard.js.map +0 -1
- package/dist/labs/DataComponents/StackContent.js.map +0 -1
- package/dist/labs/DataComponents/TableContent.js.map +0 -1
- package/dist/labs/DataComponents/TableSettings.js.map +0 -1
- package/dist/labs/DataComponents/componentTypes.js.map +0 -1
- package/dist/labs/DataComponents/constants.js.map +0 -1
- package/dist/labs/DataComponents/dataTypes.js.map +0 -1
- package/dist/labs/DataComponents/fetchData.js.map +0 -1
- package/dist/labs/DataComponents/index.js.map +0 -1
- package/dist/labs/DataComponents/tableConstants.js.map +0 -1
- package/dist/labs/DataComponents/useFilterConversion.js.map +0 -1
- package/dist/labs/FileUpload.js.map +0 -1
- package/dist/labs/FileUploadIllustration.js.map +0 -1
- package/dist/labs/FileUploadPreview.js.map +0 -1
- package/dist/labs/SideNav.js +0 -478
- package/dist/labs/SideNav.js.map +0 -1
- package/dist/labs/Switch.js.map +0 -1
- package/dist/src/createShadowRootElement.d.ts.map +0 -1
- package/dist/src/labs/DataComponents/BulkActionsMenu.d.ts.map +0 -1
- package/dist/src/labs/DataComponents/DataStack.d.ts +0 -20
- package/dist/src/labs/DataComponents/DataStack.d.ts.map +0 -1
- package/dist/src/labs/DataComponents/DataTable.d.ts +0 -16
- package/dist/src/labs/DataComponents/DataTable.d.ts.map +0 -1
- package/dist/src/labs/DataComponents/DataView.d.ts.map +0 -1
- package/dist/src/labs/DataComponents/DetailPanel.d.ts.map +0 -1
- package/dist/src/labs/DataComponents/LayoutSwitcher.d.ts.map +0 -1
- package/dist/src/labs/DataComponents/RowActions.d.ts.map +0 -1
- package/dist/src/labs/DataComponents/StackCard.d.ts.map +0 -1
- package/dist/src/labs/DataComponents/StackContent.d.ts.map +0 -1
- package/dist/src/labs/DataComponents/TableContent.d.ts.map +0 -1
- package/dist/src/labs/DataComponents/TableSettings.d.ts.map +0 -1
- package/dist/src/labs/DataComponents/componentTypes.d.ts.map +0 -1
- package/dist/src/labs/DataComponents/constants.d.ts.map +0 -1
- package/dist/src/labs/DataComponents/dataTypes.d.ts.map +0 -1
- package/dist/src/labs/DataComponents/fetchData.d.ts.map +0 -1
- package/dist/src/labs/DataComponents/index.d.ts.map +0 -1
- package/dist/src/labs/DataComponents/tableConstants.d.ts.map +0 -1
- package/dist/src/labs/DataComponents/useFilterConversion.d.ts.map +0 -1
- package/dist/src/labs/FileUpload.d.ts.map +0 -1
- package/dist/src/labs/FileUploadIllustration.d.ts.map +0 -1
- package/dist/src/labs/FileUploadPreview.d.ts.map +0 -1
- package/dist/src/labs/SideNav.d.ts.map +0 -1
- package/dist/src/labs/Switch.d.ts.map +0 -1
- package/dist/src/test-selectors/featureTestSelector.d.ts +0 -31
- package/dist/src/test-selectors/featureTestSelector.d.ts.map +0 -1
- package/dist/src/test-selectors/odysseyTestSelectors.d.ts +0 -120
- package/dist/src/test-selectors/odysseyTestSelectors.d.ts.map +0 -1
- package/dist/test-selectors/featureTestSelector.js +0 -2
- package/dist/test-selectors/featureTestSelector.js.map +0 -1
- package/dist/test-selectors/odysseyTestSelectors.js.map +0 -1
- package/src/createShadowRootElement.ts +0 -31
- package/src/labs/DataComponents/DataStack.tsx +0 -105
- package/src/labs/SideNav.tsx +0 -745
- package/src/test-selectors/featureTestSelector.ts +0 -41
- /package/dist/{labs → FileUploader}/FileUploadIllustration.js +0 -0
- /package/dist/{labs → FileUploader}/FileUploadPreview.js +0 -0
- /package/dist/labs/{DataComponents → DataView}/BulkActionsMenu.js +0 -0
- /package/dist/labs/{DataComponents → DataView}/DetailPanel.js +0 -0
- /package/dist/labs/{DataComponents → DataView}/LayoutSwitcher.js +0 -0
- /package/dist/labs/{DataComponents → DataView}/RowActions.js +0 -0
- /package/dist/labs/{DataComponents → DataView}/componentTypes.js +0 -0
- /package/dist/labs/{DataComponents → DataView}/dataTypes.js +0 -0
- /package/dist/labs/{DataComponents → DataView}/fetchData.js +0 -0
- /package/dist/labs/{DataComponents → DataView}/tableConstants.js +0 -0
- /package/dist/labs/{DataComponents → DataView}/useFilterConversion.js +0 -0
- /package/dist/src/{labs → FileUploader}/FileUploadIllustration.d.ts +0 -0
- /package/dist/src/labs/{DataComponents → DataView}/BulkActionsMenu.d.ts +0 -0
- /package/dist/src/labs/{DataComponents → DataView}/LayoutSwitcher.d.ts +0 -0
- /package/dist/src/labs/{DataComponents → DataView}/RowActions.d.ts +0 -0
- /package/dist/src/labs/{DataComponents → DataView}/dataTypes.d.ts +0 -0
- /package/dist/src/labs/{DataComponents → DataView}/fetchData.d.ts +0 -0
- /package/dist/src/labs/{DataComponents → DataView}/tableConstants.d.ts +0 -0
- /package/src/{labs → FileUploader}/FileUploadIllustration.tsx +0 -0
- /package/src/labs/{DataComponents → DataView}/BulkActionsMenu.tsx +0 -0
- /package/src/labs/{DataComponents → DataView}/LayoutSwitcher.tsx +0 -0
- /package/src/labs/{DataComponents → DataView}/RowActions.tsx +0 -0
- /package/src/labs/{DataComponents → DataView}/dataTypes.ts +0 -0
- /package/src/labs/{DataComponents → DataView}/fetchData.ts +0 -0
- /package/src/labs/{DataComponents → DataView}/tableConstants.tsx +0 -0
|
@@ -35,12 +35,15 @@ import { DataFilters } from "../DataFilters";
|
|
|
35
35
|
import { EmptyState } from "../../EmptyState";
|
|
36
36
|
import { fetchData } from "./fetchData";
|
|
37
37
|
import { LayoutSwitcher } from "./LayoutSwitcher";
|
|
38
|
+
import { MenuButton } from "../../MenuButton";
|
|
39
|
+
import { MoreIcon } from "../../icons.generated";
|
|
38
40
|
import { TableSettings } from "./TableSettings";
|
|
39
41
|
import { Pagination, usePagination } from "../../Pagination";
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
+
import { TableLayoutContent } from "./TableLayoutContent";
|
|
43
|
+
import { CardLayoutContent } from "./CardLayoutContent";
|
|
42
44
|
import { useFilterConversion } from "./useFilterConversion";
|
|
43
45
|
import { useRowReordering } from "../../DataTable/useRowReordering";
|
|
46
|
+
import { Typography } from "../../Typography";
|
|
44
47
|
import {
|
|
45
48
|
DesignTokens,
|
|
46
49
|
useOdysseyDesignTokens,
|
|
@@ -62,16 +65,36 @@ const BulkActionsContainer = styled("div")(() => ({
|
|
|
62
65
|
justifyContent: "space-between",
|
|
63
66
|
}));
|
|
64
67
|
|
|
65
|
-
const AdditionalActionsContainer = styled("div"
|
|
68
|
+
const AdditionalActionsContainer = styled("div", {
|
|
69
|
+
shouldForwardProp: (prop) => prop !== "odysseyDesignTokens",
|
|
70
|
+
})<{ odysseyDesignTokens: DesignTokens }>(({ odysseyDesignTokens }) => ({
|
|
66
71
|
display: "flex",
|
|
67
72
|
justifyContent: "flex-end",
|
|
73
|
+
gap: odysseyDesignTokens.Spacing2,
|
|
74
|
+
}));
|
|
75
|
+
|
|
76
|
+
const AdditionalActionsInner = styled("div", {
|
|
77
|
+
shouldForwardProp: (prop) => prop !== "odysseyDesignTokens",
|
|
78
|
+
})<{ odysseyDesignTokens: DesignTokens }>(({ odysseyDesignTokens }) => ({
|
|
79
|
+
display: "flex",
|
|
80
|
+
alignItems: "center",
|
|
81
|
+
gap: odysseyDesignTokens.Spacing2,
|
|
82
|
+
}));
|
|
83
|
+
|
|
84
|
+
const MetaTextContainer = styled("div", {
|
|
85
|
+
shouldForwardProp: (prop) => prop !== "odysseyDesignTokens",
|
|
86
|
+
})<{ odysseyDesignTokens: DesignTokens }>(({ odysseyDesignTokens }) => ({
|
|
87
|
+
marginInlineEnd: odysseyDesignTokens.Spacing2,
|
|
68
88
|
}));
|
|
69
89
|
|
|
70
90
|
const DataView = ({
|
|
91
|
+
additionalActionButton,
|
|
92
|
+
additionalActionMenuItems,
|
|
71
93
|
availableLayouts = allAvailableLayouts,
|
|
72
94
|
bulkActionMenuItems,
|
|
73
95
|
currentPage = 1,
|
|
74
96
|
emptyPlaceholder,
|
|
97
|
+
enableVirtualization: enableVirtualizationProp,
|
|
75
98
|
errorMessage: errorMessageProp,
|
|
76
99
|
filters: filtersProp,
|
|
77
100
|
getData,
|
|
@@ -88,17 +111,19 @@ const DataView = ({
|
|
|
88
111
|
isNoResults: isNoResultsProp,
|
|
89
112
|
isPaginationMoreDisabled,
|
|
90
113
|
isRowReorderingDisabled,
|
|
114
|
+
metaText,
|
|
91
115
|
noResultsPlaceholder,
|
|
92
116
|
onChangeRowSelection,
|
|
93
117
|
onReorderRows,
|
|
94
118
|
paginationType = "paged",
|
|
95
119
|
resultsPerPage = 20,
|
|
96
120
|
searchDelayTime,
|
|
97
|
-
|
|
98
|
-
|
|
121
|
+
cardLayoutOptions,
|
|
122
|
+
tableLayoutOptions,
|
|
99
123
|
totalRows,
|
|
100
124
|
maxPages,
|
|
101
125
|
maxResultsPerPage,
|
|
126
|
+
onPaginationChange,
|
|
102
127
|
}: DataViewProps) => {
|
|
103
128
|
const odysseyDesignTokens = useOdysseyDesignTokens();
|
|
104
129
|
const { t } = useTranslation();
|
|
@@ -139,14 +164,18 @@ const DataView = ({
|
|
|
139
164
|
const [tableState, setTableState] = useState<TableState>({
|
|
140
165
|
columnSorting: [],
|
|
141
166
|
columnVisibility: {},
|
|
142
|
-
rowDensity:
|
|
167
|
+
rowDensity: tableLayoutOptions?.initialDensity ?? densityValues[0],
|
|
143
168
|
});
|
|
144
169
|
|
|
145
|
-
const shouldShowFilters =
|
|
170
|
+
const shouldShowFilters =
|
|
171
|
+
hasSearch ||
|
|
172
|
+
hasFilters ||
|
|
173
|
+
additionalActionButton ||
|
|
174
|
+
additionalActionMenuItems;
|
|
146
175
|
|
|
147
176
|
const availableFilters = useFilterConversion({
|
|
148
177
|
filters: filters,
|
|
149
|
-
columns:
|
|
178
|
+
columns: tableLayoutOptions?.columns,
|
|
150
179
|
});
|
|
151
180
|
|
|
152
181
|
useEffect(() => {
|
|
@@ -186,9 +215,14 @@ const DataView = ({
|
|
|
186
215
|
useEffect(() => {
|
|
187
216
|
setPagination((prev) => ({
|
|
188
217
|
pageIndex: 1,
|
|
189
|
-
pageSize: prev.pageSize,
|
|
218
|
+
pageSize: paginationType == "loadMore" ? resultsPerPage : prev.pageSize,
|
|
190
219
|
}));
|
|
191
|
-
}, [filters, search]);
|
|
220
|
+
}, [filters, paginationType, resultsPerPage, search]);
|
|
221
|
+
|
|
222
|
+
// Fire onPaginationChange if pagination changes
|
|
223
|
+
useEffect(() => {
|
|
224
|
+
onPaginationChange?.(pagination);
|
|
225
|
+
}, [onPaginationChange, pagination]);
|
|
192
226
|
|
|
193
227
|
// Retrieve the data
|
|
194
228
|
useEffect(() => {
|
|
@@ -254,27 +288,66 @@ const DataView = ({
|
|
|
254
288
|
return;
|
|
255
289
|
}, [noResultsPlaceholder, t, isEmpty, isNoResults, emptyPlaceholder]);
|
|
256
290
|
|
|
257
|
-
const additionalActions = useMemo(
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
291
|
+
const additionalActions = useMemo(() => {
|
|
292
|
+
return (
|
|
293
|
+
(metaText ||
|
|
294
|
+
(currentLayout === "table" && tableLayoutOptions) ||
|
|
295
|
+
availableLayouts.length > 1 ||
|
|
296
|
+
additionalActionButton ||
|
|
297
|
+
additionalActionMenuItems) && (
|
|
298
|
+
<AdditionalActionsInner odysseyDesignTokens={odysseyDesignTokens}>
|
|
299
|
+
{metaText && (
|
|
300
|
+
<MetaTextContainer odysseyDesignTokens={odysseyDesignTokens}>
|
|
301
|
+
<Typography color="textSecondary">{metaText}</Typography>
|
|
302
|
+
</MetaTextContainer>
|
|
303
|
+
)}
|
|
304
|
+
|
|
305
|
+
{currentLayout === "table" && tableLayoutOptions && (
|
|
306
|
+
<TableSettings
|
|
307
|
+
setTableState={setTableState}
|
|
308
|
+
tableLayoutOptions={tableLayoutOptions}
|
|
309
|
+
tableState={tableState}
|
|
310
|
+
/>
|
|
311
|
+
)}
|
|
312
|
+
|
|
313
|
+
{availableLayouts.length > 1 && (
|
|
314
|
+
<LayoutSwitcher
|
|
315
|
+
availableLayouts={availableLayouts}
|
|
316
|
+
currentLayout={currentLayout}
|
|
317
|
+
setCurrentLayout={setCurrentLayout}
|
|
318
|
+
/>
|
|
319
|
+
)}
|
|
320
|
+
|
|
321
|
+
{additionalActionButton}
|
|
322
|
+
|
|
323
|
+
{additionalActionMenuItems && (
|
|
324
|
+
<MenuButton
|
|
325
|
+
endIcon={<MoreIcon />}
|
|
326
|
+
ariaLabel={t("table.moreactions.arialabel")}
|
|
327
|
+
buttonVariant="secondary"
|
|
328
|
+
menuAlignment="right"
|
|
329
|
+
>
|
|
330
|
+
{additionalActionMenuItems}
|
|
331
|
+
</MenuButton>
|
|
332
|
+
)}
|
|
333
|
+
</AdditionalActionsInner>
|
|
334
|
+
)
|
|
335
|
+
);
|
|
336
|
+
}, [
|
|
337
|
+
additionalActionButton,
|
|
338
|
+
additionalActionMenuItems,
|
|
339
|
+
availableLayouts,
|
|
340
|
+
currentLayout,
|
|
341
|
+
metaText,
|
|
342
|
+
odysseyDesignTokens,
|
|
343
|
+
tableLayoutOptions,
|
|
344
|
+
tableState,
|
|
345
|
+
t,
|
|
346
|
+
]);
|
|
267
347
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
currentLayout={currentLayout}
|
|
272
|
-
setCurrentLayout={setCurrentLayout}
|
|
273
|
-
/>
|
|
274
|
-
)}
|
|
275
|
-
</>
|
|
276
|
-
),
|
|
277
|
-
[currentLayout, tableOptions, tableState, availableLayouts],
|
|
348
|
+
const enableVirtualization = useMemo(
|
|
349
|
+
() => enableVirtualizationProp ?? paginationType === "loadMore",
|
|
350
|
+
[enableVirtualizationProp, paginationType],
|
|
278
351
|
);
|
|
279
352
|
|
|
280
353
|
const { lastRow: lastRowOnPage } = usePagination({
|
|
@@ -327,18 +400,22 @@ const DataView = ({
|
|
|
327
400
|
</BulkActionsContainer>
|
|
328
401
|
)}
|
|
329
402
|
|
|
330
|
-
{!shouldShowFilters &&
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
403
|
+
{!shouldShowFilters &&
|
|
404
|
+
!bulkActionMenuItems &&
|
|
405
|
+
!hasRowSelection &&
|
|
406
|
+
additionalActions && (
|
|
407
|
+
<AdditionalActionsContainer odysseyDesignTokens={odysseyDesignTokens}>
|
|
408
|
+
{additionalActions}
|
|
409
|
+
</AdditionalActionsContainer>
|
|
410
|
+
)}
|
|
335
411
|
|
|
336
|
-
{currentLayout === "table" &&
|
|
337
|
-
<
|
|
338
|
-
columns={
|
|
412
|
+
{currentLayout === "table" && tableLayoutOptions && (
|
|
413
|
+
<TableLayoutContent
|
|
414
|
+
columns={tableLayoutOptions.columns}
|
|
339
415
|
data={data}
|
|
340
416
|
draggingRow={draggingRow}
|
|
341
417
|
emptyState={emptyState}
|
|
418
|
+
enableVirtualization={enableVirtualization}
|
|
342
419
|
getRowId={getRowId}
|
|
343
420
|
hasRowReordering={hasRowReordering}
|
|
344
421
|
hasRowSelection={hasRowSelection}
|
|
@@ -352,14 +429,14 @@ const DataView = ({
|
|
|
352
429
|
rowSelection={rowSelection}
|
|
353
430
|
setRowSelection={setRowSelection}
|
|
354
431
|
setTableState={setTableState}
|
|
355
|
-
|
|
432
|
+
tableLayoutOptions={tableLayoutOptions}
|
|
356
433
|
tableState={tableState}
|
|
357
434
|
totalRows={totalRows}
|
|
358
435
|
/>
|
|
359
436
|
)}
|
|
360
437
|
{(currentLayout === "list" || currentLayout === "grid") &&
|
|
361
|
-
|
|
362
|
-
<
|
|
438
|
+
cardLayoutOptions && (
|
|
439
|
+
<CardLayoutContent
|
|
363
440
|
currentLayout={currentLayout}
|
|
364
441
|
data={data}
|
|
365
442
|
draggingRow={draggingRow}
|
|
@@ -376,7 +453,7 @@ const DataView = ({
|
|
|
376
453
|
rowReorderingUtilities={rowReorderingUtilities}
|
|
377
454
|
rowSelection={rowSelection}
|
|
378
455
|
setRowSelection={setRowSelection}
|
|
379
|
-
|
|
456
|
+
cardLayoutOptions={cardLayoutOptions}
|
|
380
457
|
totalRows={totalRows}
|
|
381
458
|
/>
|
|
382
459
|
)}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import { memo } from "react";
|
|
14
|
-
import {
|
|
14
|
+
import { CardLayoutProps } from "./componentTypes";
|
|
15
15
|
import { DataRow } from "./dataTypes";
|
|
16
16
|
|
|
17
17
|
const DetailPanel = ({
|
|
@@ -19,7 +19,7 @@ const DetailPanel = ({
|
|
|
19
19
|
renderDetailPanel,
|
|
20
20
|
}: {
|
|
21
21
|
row: DataRow;
|
|
22
|
-
renderDetailPanel:
|
|
22
|
+
renderDetailPanel: CardLayoutProps["renderDetailPanel"];
|
|
23
23
|
}) => {
|
|
24
24
|
if (!renderDetailPanel) return null;
|
|
25
25
|
return renderDetailPanel({ row });
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
ReactNode,
|
|
21
21
|
Dispatch,
|
|
22
22
|
ReactElement,
|
|
23
|
+
useEffect,
|
|
23
24
|
} from "react";
|
|
24
25
|
import styled, { CSSObject } from "@emotion/styled";
|
|
25
26
|
import {
|
|
@@ -41,7 +42,7 @@ import {
|
|
|
41
42
|
} from "../../icons.generated";
|
|
42
43
|
import { Box } from "../../Box";
|
|
43
44
|
import { Button } from "../../Button";
|
|
44
|
-
import {
|
|
45
|
+
import { TableLayoutProps, TableState, UniversalProps } from "./componentTypes";
|
|
45
46
|
import { DataTableCell } from "./dataTypes";
|
|
46
47
|
import {
|
|
47
48
|
dataTableImmutableSettings,
|
|
@@ -64,11 +65,12 @@ const RowActionsContainer = styled("div")(() => ({
|
|
|
64
65
|
display: "flex",
|
|
65
66
|
}));
|
|
66
67
|
|
|
67
|
-
export type
|
|
68
|
-
columns:
|
|
68
|
+
export type TableLayoutContentProps = {
|
|
69
|
+
columns: TableLayoutProps["columns"];
|
|
69
70
|
data: MRT_RowData[];
|
|
70
71
|
draggingRow?: MRT_Row<MRT_RowData> | null;
|
|
71
72
|
emptyState: ReactNode;
|
|
73
|
+
enableVirtualization?: boolean;
|
|
72
74
|
getRowId: UniversalProps["getRowId"];
|
|
73
75
|
hasRowReordering: UniversalProps["hasRowReordering"];
|
|
74
76
|
hasRowSelection: UniversalProps["hasRowSelection"];
|
|
@@ -121,16 +123,17 @@ export type TableContentProps = {
|
|
|
121
123
|
rowSelection: MRT_RowSelectionState;
|
|
122
124
|
setRowSelection: Dispatch<SetStateAction<MRT_RowSelectionState>>;
|
|
123
125
|
setTableState: Dispatch<SetStateAction<TableState>>;
|
|
124
|
-
|
|
126
|
+
tableLayoutOptions: TableLayoutProps;
|
|
125
127
|
tableState: TableState;
|
|
126
128
|
totalRows: UniversalProps["totalRows"];
|
|
127
129
|
};
|
|
128
130
|
|
|
129
|
-
const
|
|
131
|
+
const TableLayoutContent = ({
|
|
130
132
|
columns,
|
|
131
133
|
data,
|
|
132
134
|
draggingRow,
|
|
133
135
|
emptyState,
|
|
136
|
+
enableVirtualization,
|
|
134
137
|
getRowId,
|
|
135
138
|
hasRowReordering,
|
|
136
139
|
hasRowSelection,
|
|
@@ -144,16 +147,17 @@ const TableContent = ({
|
|
|
144
147
|
rowSelection,
|
|
145
148
|
setRowSelection,
|
|
146
149
|
setTableState,
|
|
147
|
-
|
|
150
|
+
tableLayoutOptions,
|
|
148
151
|
tableState,
|
|
149
152
|
totalRows,
|
|
150
|
-
}:
|
|
153
|
+
}: TableLayoutContentProps) => {
|
|
151
154
|
const [isTableContainerScrolledToStart, setIsTableContainerScrolledToStart] =
|
|
152
155
|
useState(true);
|
|
153
156
|
const [isTableContainerScrolledToEnd, setIsTableContainerScrolledToEnd] =
|
|
154
157
|
useState(true);
|
|
155
158
|
const [tableInnerContainerWidth, setTableInnerContainerWidth] =
|
|
156
159
|
useState<string>("100%");
|
|
160
|
+
const shouldUpdateScroll = useRef<boolean>(false);
|
|
157
161
|
const tableOuterContainerRef = useRef<HTMLDivElement>(null);
|
|
158
162
|
const tableInnerContainerRef = useRef<HTMLDivElement>(null);
|
|
159
163
|
const tableContentRef = useRef<HTMLTableElement>(null);
|
|
@@ -220,8 +224,8 @@ const TableContent = ({
|
|
|
220
224
|
row.index + (pagination.pageIndex - 1) * pagination.pageSize;
|
|
221
225
|
return (
|
|
222
226
|
<RowActionsContainer>
|
|
223
|
-
{
|
|
224
|
-
{(
|
|
227
|
+
{tableLayoutOptions.rowActionButtons?.(row)}
|
|
228
|
+
{(tableLayoutOptions.rowActionMenuItems || hasRowReordering) && (
|
|
225
229
|
<MenuButton
|
|
226
230
|
ariaLabel={t("table.moreactions.arialabel")}
|
|
227
231
|
buttonVariant="floating"
|
|
@@ -232,7 +236,7 @@ const TableContent = ({
|
|
|
232
236
|
<RowActions
|
|
233
237
|
isRowReorderingDisabled={isRowReorderingDisabled}
|
|
234
238
|
row={row}
|
|
235
|
-
rowActionMenuItems={
|
|
239
|
+
rowActionMenuItems={tableLayoutOptions.rowActionMenuItems}
|
|
236
240
|
rowIndex={currentIndex}
|
|
237
241
|
totalRows={totalRows}
|
|
238
242
|
updateRowOrder={
|
|
@@ -251,7 +255,7 @@ const TableContent = ({
|
|
|
251
255
|
pagination.pageIndex,
|
|
252
256
|
pagination.pageSize,
|
|
253
257
|
t,
|
|
254
|
-
|
|
258
|
+
tableLayoutOptions,
|
|
255
259
|
totalRows,
|
|
256
260
|
updateRowOrder,
|
|
257
261
|
],
|
|
@@ -267,18 +271,40 @@ const TableContent = ({
|
|
|
267
271
|
[innerWidthStyle, emptyState],
|
|
268
272
|
);
|
|
269
273
|
|
|
274
|
+
// Scroll to the bottom as soon as data loads after clicking the
|
|
275
|
+
// loadMore pagination button
|
|
276
|
+
useEffect(() => {
|
|
277
|
+
if (enableVirtualization) {
|
|
278
|
+
shouldUpdateScroll.current = true;
|
|
279
|
+
}
|
|
280
|
+
}, [enableVirtualization, pagination]);
|
|
281
|
+
|
|
282
|
+
useEffect(() => {
|
|
283
|
+
if (
|
|
284
|
+
shouldUpdateScroll.current &&
|
|
285
|
+
tableContentRef.current &&
|
|
286
|
+
typeof tableInnerContainerRef.current?.scrollTo !== "undefined"
|
|
287
|
+
) {
|
|
288
|
+
tableInnerContainerRef.current?.scrollTo(
|
|
289
|
+
0,
|
|
290
|
+
tableContentRef.current.clientHeight,
|
|
291
|
+
);
|
|
292
|
+
shouldUpdateScroll.current = false;
|
|
293
|
+
}
|
|
294
|
+
}, [data]);
|
|
295
|
+
|
|
270
296
|
const shouldDisplayRowActions = useMemo(
|
|
271
297
|
() =>
|
|
272
298
|
(hasRowReordering === true && onReorderRows) ||
|
|
273
|
-
|
|
274
|
-
|
|
299
|
+
tableLayoutOptions.rowActionButtons ||
|
|
300
|
+
tableLayoutOptions.rowActionMenuItems
|
|
275
301
|
? true
|
|
276
302
|
: false,
|
|
277
303
|
[
|
|
278
304
|
hasRowReordering,
|
|
279
305
|
onReorderRows,
|
|
280
|
-
|
|
281
|
-
|
|
306
|
+
tableLayoutOptions.rowActionButtons,
|
|
307
|
+
tableLayoutOptions.rowActionMenuItems,
|
|
282
308
|
],
|
|
283
309
|
);
|
|
284
310
|
|
|
@@ -323,10 +349,10 @@ const TableContent = ({
|
|
|
323
349
|
className: "ods-actions-cell",
|
|
324
350
|
children: (
|
|
325
351
|
<Box sx={{ display: "flex", visibility: "hidden" }}>
|
|
326
|
-
{
|
|
327
|
-
|
|
352
|
+
{tableLayoutOptions.rowActionButtons &&
|
|
353
|
+
tableLayoutOptions.rowActionButtons({ id: null })}
|
|
328
354
|
{((hasRowReordering === true && onReorderRows) ||
|
|
329
|
-
|
|
355
|
+
tableLayoutOptions.rowActionMenuItems) && (
|
|
330
356
|
<Box>
|
|
331
357
|
<Button
|
|
332
358
|
endIcon={<MoreIcon />}
|
|
@@ -345,7 +371,7 @@ const TableContent = ({
|
|
|
345
371
|
muiTableProps: {
|
|
346
372
|
ref: tableContentRef,
|
|
347
373
|
className:
|
|
348
|
-
!shouldDisplayRowActions &&
|
|
374
|
+
!shouldDisplayRowActions && tableLayoutOptions.hasColumnResizing
|
|
349
375
|
? "ods-hide-spacer-column"
|
|
350
376
|
: "",
|
|
351
377
|
},
|
|
@@ -354,12 +380,18 @@ const TableContent = ({
|
|
|
354
380
|
},
|
|
355
381
|
muiTableBodyProps: () => ({
|
|
356
382
|
className: rowDensityClassName,
|
|
383
|
+
tabIndex: enableVirtualization ? 0 : undefined,
|
|
357
384
|
}),
|
|
358
|
-
enableColumnResizing:
|
|
385
|
+
enableColumnResizing: tableLayoutOptions.hasColumnResizing,
|
|
359
386
|
defaultColumn: {
|
|
360
387
|
Cell: defaultCell,
|
|
361
388
|
},
|
|
362
|
-
enableRowActions:
|
|
389
|
+
enableRowActions:
|
|
390
|
+
(hasRowReordering === true && onReorderRows) ||
|
|
391
|
+
tableLayoutOptions.rowActionButtons ||
|
|
392
|
+
tableLayoutOptions.rowActionMenuItems
|
|
393
|
+
? true
|
|
394
|
+
: false,
|
|
363
395
|
renderRowActions: ({ row }) => renderRowActions({ row }),
|
|
364
396
|
enableRowOrdering: hasRowReordering && Boolean(onReorderRows),
|
|
365
397
|
enableRowDragging: hasRowReordering && Boolean(onReorderRows),
|
|
@@ -395,8 +427,8 @@ const TableContent = ({
|
|
|
395
427
|
sx: dragHandleStyles,
|
|
396
428
|
...dragHandleText,
|
|
397
429
|
}),
|
|
398
|
-
renderDetailPanel:
|
|
399
|
-
enableRowVirtualization:
|
|
430
|
+
renderDetailPanel: tableLayoutOptions.renderDetailPanel,
|
|
431
|
+
enableRowVirtualization: enableVirtualization,
|
|
400
432
|
muiTableHeadCellProps: ({ column: currentColumn }) => ({
|
|
401
433
|
className: tableState.columnSorting.find(
|
|
402
434
|
(sortedColumn) => sortedColumn.id === currentColumn.id,
|
|
@@ -407,7 +439,7 @@ const TableContent = ({
|
|
|
407
439
|
muiTableBodyCellProps: ({ column }) => ({
|
|
408
440
|
className: column.getIsResizing() ? "isResizing" : "",
|
|
409
441
|
}),
|
|
410
|
-
enableSorting:
|
|
442
|
+
enableSorting: tableLayoutOptions.hasSorting === true, // I don't know why this needs to be true, but it still works if undefined otherwise
|
|
411
443
|
onSortingChange: (sortingUpdater) => {
|
|
412
444
|
const newSortVal =
|
|
413
445
|
typeof sortingUpdater === "function"
|
|
@@ -441,7 +473,7 @@ const TableContent = ({
|
|
|
441
473
|
);
|
|
442
474
|
};
|
|
443
475
|
|
|
444
|
-
const
|
|
445
|
-
|
|
476
|
+
const MemoizedTableLayoutContent = memo(TableLayoutContent);
|
|
477
|
+
MemoizedTableLayoutContent.displayName = "TableLayoutContent";
|
|
446
478
|
|
|
447
|
-
export {
|
|
479
|
+
export { MemoizedTableLayoutContent as TableLayoutContent };
|
|
@@ -19,22 +19,23 @@ import { densityValues } from "./constants";
|
|
|
19
19
|
import { ListIcon, ShowIcon } from "../../icons.generated";
|
|
20
20
|
import { MenuButton } from "../../MenuButton";
|
|
21
21
|
import { MenuItem } from "../../MenuItem";
|
|
22
|
-
import {
|
|
22
|
+
import { TableLayoutProps, TableState } from "./componentTypes";
|
|
23
23
|
|
|
24
24
|
export type TableSettingsProps = {
|
|
25
25
|
setTableState: Dispatch<SetStateAction<TableState>>;
|
|
26
|
-
|
|
26
|
+
tableLayoutOptions: TableLayoutProps;
|
|
27
27
|
tableState: TableState;
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
const TableSettings = ({
|
|
31
31
|
setTableState,
|
|
32
|
-
|
|
32
|
+
tableLayoutOptions,
|
|
33
33
|
tableState,
|
|
34
34
|
}: TableSettingsProps) => {
|
|
35
35
|
const { t } = useTranslation();
|
|
36
36
|
|
|
37
|
-
const { hasChangeableDensity, hasColumnVisibility, columns } =
|
|
37
|
+
const { hasChangeableDensity, hasColumnVisibility, columns } =
|
|
38
|
+
tableLayoutOptions;
|
|
38
39
|
const { rowDensity, columnVisibility } = tableState;
|
|
39
40
|
|
|
40
41
|
const changeRowDensity = useCallback<(value: MRT_DensityState) => void>(
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
MRT_VisibilityState,
|
|
20
20
|
} from "material-react-table";
|
|
21
21
|
|
|
22
|
-
import { availableLayouts,
|
|
22
|
+
import { availableLayouts, availableCardLayouts } from "./constants";
|
|
23
23
|
import { DataFilter } from "../DataFilters";
|
|
24
24
|
import {
|
|
25
25
|
DataGetDataType,
|
|
@@ -31,20 +31,23 @@ import { DataTableRowActionsProps } from "../../DataTable/DataTableRowActions";
|
|
|
31
31
|
import { MenuButtonProps } from "../..";
|
|
32
32
|
import { paginationTypeValues } from "../DataTablePagination";
|
|
33
33
|
import { ReactNode } from "react";
|
|
34
|
-
import {
|
|
34
|
+
import { DataCardProps } from "./DataCard";
|
|
35
35
|
|
|
36
36
|
export type DataLayout = (typeof availableLayouts)[number];
|
|
37
|
-
export type
|
|
37
|
+
export type CardLayout = (typeof availableCardLayouts)[number];
|
|
38
38
|
|
|
39
39
|
export type AvailableLayouts = DataLayout[];
|
|
40
|
-
export type
|
|
40
|
+
export type AvailableCardLayouts = CardLayout[];
|
|
41
41
|
|
|
42
42
|
export type UniversalProps = {
|
|
43
|
+
additionalActionButton?: ReactNode;
|
|
44
|
+
additionalActionMenuItems?: ReactNode;
|
|
43
45
|
bulkActionMenuItems?: (
|
|
44
46
|
selectedRows: MRT_RowSelectionState,
|
|
45
47
|
) => MenuButtonProps["children"];
|
|
46
48
|
currentPage?: number;
|
|
47
49
|
emptyPlaceholder?: ReactNode;
|
|
50
|
+
enableVirtualization?: boolean;
|
|
48
51
|
errorMessage?: string;
|
|
49
52
|
filters?: Array<DataFilter | DataTableColumn<MRT_RowData> | string>;
|
|
50
53
|
getData: ({
|
|
@@ -68,16 +71,28 @@ export type UniversalProps = {
|
|
|
68
71
|
isRowReorderingDisabled?: boolean;
|
|
69
72
|
maxPages?: number;
|
|
70
73
|
maxResultsPerPage?: number;
|
|
74
|
+
metaText?: string;
|
|
71
75
|
noResultsPlaceholder?: ReactNode;
|
|
76
|
+
/**
|
|
77
|
+
* @deprecated onChangeRowSelection is now onRowSelectionChange
|
|
78
|
+
*/
|
|
72
79
|
onChangeRowSelection?: (rowSelection: DataRowSelectionState) => void;
|
|
80
|
+
onPaginationChange?: ({
|
|
81
|
+
pageIndex,
|
|
82
|
+
pageSize,
|
|
83
|
+
}: {
|
|
84
|
+
pageIndex: number;
|
|
85
|
+
pageSize: number;
|
|
86
|
+
}) => void;
|
|
73
87
|
onReorderRows?: ({ rowId, newRowIndex }: DataOnReorderRowsType) => void;
|
|
88
|
+
onRowSelectionChange?: (rowSelection: DataRowSelectionState) => void;
|
|
74
89
|
paginationType?: (typeof paginationTypeValues)[number];
|
|
75
90
|
resultsPerPage?: number;
|
|
76
91
|
searchDelayTime?: number;
|
|
77
92
|
totalRows?: number;
|
|
78
93
|
};
|
|
79
94
|
|
|
80
|
-
export type
|
|
95
|
+
export type TableLayoutProps = {
|
|
81
96
|
columns: DataTableColumn<MRT_RowData>[];
|
|
82
97
|
hasChangeableDensity?: boolean;
|
|
83
98
|
hasColumnResizing?: boolean;
|
|
@@ -89,8 +104,8 @@ export type TableProps = {
|
|
|
89
104
|
rowActionMenuItems?: DataTableRowActionsProps["rowActionMenuItems"];
|
|
90
105
|
};
|
|
91
106
|
|
|
92
|
-
export type
|
|
93
|
-
|
|
107
|
+
export type CardLayoutProps = {
|
|
108
|
+
itemProps: (row: MRT_RowData) => DataCardProps;
|
|
94
109
|
maxGridColumns?: number;
|
|
95
110
|
renderDetailPanel?: (props: { row: MRT_RowData }) => ReactNode;
|
|
96
111
|
rowActionMenuItems?: DataTableRowActionsProps["rowActionMenuItems"];
|
|
@@ -99,8 +114,8 @@ export type StackProps = {
|
|
|
99
114
|
export type ViewProps<L extends DataLayout> = {
|
|
100
115
|
availableLayouts?: L[];
|
|
101
116
|
initialLayout?: L;
|
|
102
|
-
|
|
103
|
-
|
|
117
|
+
cardLayoutOptions?: CardLayoutProps;
|
|
118
|
+
tableLayoutOptions?: TableLayoutProps;
|
|
104
119
|
};
|
|
105
120
|
|
|
106
121
|
export type TableState = {
|
|
@@ -14,11 +14,11 @@ import { MRT_DensityState } from "material-react-table";
|
|
|
14
14
|
|
|
15
15
|
export type DataViewLayout = "list" | "grid" | "table";
|
|
16
16
|
|
|
17
|
-
export const
|
|
17
|
+
export const availableCardLayouts: DataViewLayout[] = ["list", "grid"];
|
|
18
18
|
export const availableTableLayouts: DataViewLayout[] = ["table"];
|
|
19
19
|
export const availableLayouts: DataViewLayout[] = [
|
|
20
20
|
...availableTableLayouts,
|
|
21
|
-
...
|
|
21
|
+
...availableCardLayouts,
|
|
22
22
|
];
|
|
23
23
|
|
|
24
24
|
export const densityValues: MRT_DensityState[] = [
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
export { DataStack, type DataStackProps } from "./DataStack";
|
|
14
13
|
export { DataTable, type DataTableProps } from "./DataTable";
|
|
15
14
|
export { DataView, type DataViewProps } from "./DataView";
|
|
16
15
|
|
|
@@ -15,10 +15,10 @@ import { MRT_RowData } from "material-react-table";
|
|
|
15
15
|
|
|
16
16
|
import { DataFilter } from "../DataFilters";
|
|
17
17
|
import { DataTableColumn } from "../../DataTable";
|
|
18
|
-
import { UniversalProps,
|
|
18
|
+
import { UniversalProps, TableLayoutProps } from "./componentTypes";
|
|
19
19
|
|
|
20
20
|
type FilterConversionType = {
|
|
21
|
-
columns?:
|
|
21
|
+
columns?: TableLayoutProps["columns"];
|
|
22
22
|
filters?: UniversalProps["filters"];
|
|
23
23
|
};
|
|
24
24
|
|
package/src/labs/DateField.tsx
CHANGED
|
@@ -43,6 +43,7 @@ export type DateFieldProps = {
|
|
|
43
43
|
| "errorMessage"
|
|
44
44
|
| "hasInitialFocus"
|
|
45
45
|
| "hint"
|
|
46
|
+
| "HintLinkComponent"
|
|
46
47
|
| "id"
|
|
47
48
|
| "isDisabled"
|
|
48
49
|
| "isOptional"
|
|
@@ -71,6 +72,7 @@ const DateField = ({
|
|
|
71
72
|
errorMessage,
|
|
72
73
|
hasInitialFocus,
|
|
73
74
|
hint,
|
|
75
|
+
HintLinkComponent,
|
|
74
76
|
id: idOverride,
|
|
75
77
|
inputRef,
|
|
76
78
|
isDisabled = false,
|
|
@@ -253,6 +255,7 @@ const DateField = ({
|
|
|
253
255
|
fieldType="single"
|
|
254
256
|
hasVisibleLabel
|
|
255
257
|
hint={hint}
|
|
258
|
+
HintLinkComponent={HintLinkComponent}
|
|
256
259
|
id={idOverride}
|
|
257
260
|
isDisabled={isDisabled}
|
|
258
261
|
isOptional={isOptional}
|