@okta/odyssey-react-mui 1.20.0 → 1.21.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 +43 -0
- package/dist/DataTable/DataTable.js +101 -63
- package/dist/DataTable/DataTable.js.map +1 -1
- package/dist/Pagination/Pagination.js +29 -20
- package/dist/Pagination/Pagination.js.map +1 -1
- package/dist/Pagination/usePagination.js +13 -22
- package/dist/Pagination/usePagination.js.map +1 -1
- package/dist/assertEnv.js +1 -1
- package/dist/index.scss +1 -1
- package/dist/labs/DataComponents/DataStack.js +6 -0
- package/dist/labs/DataComponents/DataStack.js.map +1 -1
- package/dist/labs/DataComponents/DataTable.js +6 -0
- package/dist/labs/DataComponents/DataTable.js.map +1 -1
- package/dist/labs/DataComponents/DataView.js +15 -1
- package/dist/labs/DataComponents/DataView.js.map +1 -1
- package/dist/labs/DataComponents/TableContent.js +49 -3
- package/dist/labs/DataComponents/TableContent.js.map +1 -1
- package/dist/labs/DataComponents/TableSettings.js +28 -38
- package/dist/labs/DataComponents/TableSettings.js.map +1 -1
- package/dist/labs/DataComponents/componentTypes.js.map +1 -1
- package/dist/labs/DataComponents/constants.js.map +1 -1
- package/dist/labs/DataComponents/tableConstants.js +0 -19
- package/dist/labs/DataComponents/tableConstants.js.map +1 -1
- package/dist/labs/DataComponents/useFilterConversion.js +8 -15
- package/dist/labs/DataComponents/useFilterConversion.js.map +1 -1
- package/dist/labs/DateField.js +97 -10
- package/dist/labs/DateField.js.map +1 -1
- package/dist/labs/DatePicker.js +113 -51
- package/dist/labs/DatePicker.js.map +1 -1
- package/dist/labs/TimeZonePicker.js +37 -0
- package/dist/labs/TimeZonePicker.js.map +1 -0
- package/dist/labs/TopNav.js +280 -0
- package/dist/labs/TopNav.js.map +1 -0
- package/dist/labs/datePickerTheme.js +8 -5
- package/dist/labs/datePickerTheme.js.map +1 -1
- package/dist/labs/index.js +1 -0
- package/dist/labs/index.js.map +1 -1
- package/dist/labs/{useDatePickerTranslations.js → useDateFieldsTranslations.js} +2 -2
- package/dist/labs/{useDatePickerTranslations.js.map → useDateFieldsTranslations.js.map} +1 -1
- package/dist/labs/useOdysseyDateFields.js +101 -0
- package/dist/labs/useOdysseyDateFields.js.map +1 -0
- package/dist/properties/ts/odyssey-react-mui.js +3 -0
- package/dist/properties/ts/odyssey-react-mui.js.map +1 -1
- package/dist/src/Autocomplete.d.ts +2 -1
- package/dist/src/Autocomplete.d.ts.map +1 -1
- package/dist/src/Badge.d.ts +0 -1
- package/dist/src/Badge.d.ts.map +1 -1
- package/dist/src/Banner.d.ts +0 -1
- package/dist/src/Banner.d.ts.map +1 -1
- package/dist/src/ButtonContext.d.ts +0 -1
- package/dist/src/ButtonContext.d.ts.map +1 -1
- package/dist/src/Checkbox.d.ts +0 -1
- package/dist/src/Checkbox.d.ts.map +1 -1
- package/dist/src/CircularProgress.d.ts +0 -1
- package/dist/src/CircularProgress.d.ts.map +1 -1
- package/dist/src/DataTable/DataTable.d.ts +14 -1
- package/dist/src/DataTable/DataTable.d.ts.map +1 -1
- package/dist/src/DataTable/useRowReordering.d.ts.map +1 -1
- package/dist/src/ErrorMessageList.d.ts +0 -1
- package/dist/src/ErrorMessageList.d.ts.map +1 -1
- package/dist/src/Field.d.ts.map +1 -1
- package/dist/src/FieldError.d.ts +0 -1
- package/dist/src/FieldError.d.ts.map +1 -1
- package/dist/src/FieldHint.d.ts +0 -1
- package/dist/src/FieldHint.d.ts.map +1 -1
- package/dist/src/FieldLabel.d.ts +0 -1
- package/dist/src/FieldLabel.d.ts.map +1 -1
- package/dist/src/FieldsetContext.d.ts +0 -1
- package/dist/src/FieldsetContext.d.ts.map +1 -1
- package/dist/src/HintLink.d.ts +0 -1
- package/dist/src/HintLink.d.ts.map +1 -1
- package/dist/src/MuiPropsContext.d.ts +0 -1
- package/dist/src/MuiPropsContext.d.ts.map +1 -1
- package/dist/src/NativeSelect.d.ts +4 -4
- package/dist/src/NativeSelect.d.ts.map +1 -1
- package/dist/src/OdysseyDesignTokensContext.d.ts +0 -1
- package/dist/src/OdysseyDesignTokensContext.d.ts.map +1 -1
- package/dist/src/OdysseyProvider.d.ts +2 -1
- package/dist/src/OdysseyProvider.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/Pagination/Pagination.d.ts +41 -26
- package/dist/src/Pagination/Pagination.d.ts.map +1 -1
- package/dist/src/Pagination/usePagination.d.ts +2 -1
- package/dist/src/Pagination/usePagination.d.ts.map +1 -1
- package/dist/src/PasswordField.d.ts +10 -10
- package/dist/src/PasswordField.d.ts.map +1 -1
- package/dist/src/Radio.d.ts +0 -1
- package/dist/src/Radio.d.ts.map +1 -1
- package/dist/src/SearchField.d.ts +11 -11
- package/dist/src/SearchField.d.ts.map +1 -1
- package/dist/src/Select.d.ts +0 -1
- package/dist/src/Select.d.ts.map +1 -1
- package/dist/src/Status.d.ts +0 -1
- package/dist/src/Status.d.ts.map +1 -1
- package/dist/src/Tabs.d.ts.map +1 -1
- package/dist/src/TagListContext.d.ts +0 -1
- package/dist/src/TagListContext.d.ts.map +1 -1
- package/dist/src/TextField.d.ts +12 -12
- package/dist/src/TextField.d.ts.map +1 -1
- package/dist/src/Toast.d.ts +0 -1
- package/dist/src/Toast.d.ts.map +1 -1
- package/dist/src/icons.generated/Add.d.ts +0 -1
- package/dist/src/icons.generated/Add.d.ts.map +1 -1
- package/dist/src/icons.generated/AddCircle.d.ts +0 -1
- package/dist/src/icons.generated/AddCircle.d.ts.map +1 -1
- package/dist/src/icons.generated/Apps.d.ts +0 -1
- package/dist/src/icons.generated/Apps.d.ts.map +1 -1
- package/dist/src/icons.generated/ArrowBottom.d.ts +0 -1
- package/dist/src/icons.generated/ArrowBottom.d.ts.map +1 -1
- package/dist/src/icons.generated/ArrowDown.d.ts +0 -1
- package/dist/src/icons.generated/ArrowDown.d.ts.map +1 -1
- package/dist/src/icons.generated/ArrowLeft.d.ts +0 -1
- package/dist/src/icons.generated/ArrowLeft.d.ts.map +1 -1
- package/dist/src/icons.generated/ArrowLowerLeft.d.ts +0 -1
- package/dist/src/icons.generated/ArrowLowerLeft.d.ts.map +1 -1
- package/dist/src/icons.generated/ArrowLowerRight.d.ts +0 -1
- package/dist/src/icons.generated/ArrowLowerRight.d.ts.map +1 -1
- package/dist/src/icons.generated/ArrowRight.d.ts +0 -1
- package/dist/src/icons.generated/ArrowRight.d.ts.map +1 -1
- package/dist/src/icons.generated/ArrowTop.d.ts +0 -1
- package/dist/src/icons.generated/ArrowTop.d.ts.map +1 -1
- package/dist/src/icons.generated/ArrowUnsorted.d.ts +0 -1
- package/dist/src/icons.generated/ArrowUnsorted.d.ts.map +1 -1
- package/dist/src/icons.generated/ArrowUp.d.ts +0 -1
- package/dist/src/icons.generated/ArrowUp.d.ts.map +1 -1
- package/dist/src/icons.generated/ArrowUpperLeft.d.ts +0 -1
- package/dist/src/icons.generated/ArrowUpperLeft.d.ts.map +1 -1
- package/dist/src/icons.generated/ArrowUpperRight.d.ts +0 -1
- package/dist/src/icons.generated/ArrowUpperRight.d.ts.map +1 -1
- package/dist/src/icons.generated/Bug.d.ts +0 -1
- package/dist/src/icons.generated/Bug.d.ts.map +1 -1
- package/dist/src/icons.generated/Calendar.d.ts +0 -1
- package/dist/src/icons.generated/Calendar.d.ts.map +1 -1
- package/dist/src/icons.generated/Call.d.ts +0 -1
- package/dist/src/icons.generated/Call.d.ts.map +1 -1
- package/dist/src/icons.generated/Chat.d.ts +0 -1
- package/dist/src/icons.generated/Chat.d.ts.map +1 -1
- package/dist/src/icons.generated/Check.d.ts +0 -1
- package/dist/src/icons.generated/Check.d.ts.map +1 -1
- package/dist/src/icons.generated/CheckCircleFilled.d.ts +0 -1
- package/dist/src/icons.generated/CheckCircleFilled.d.ts.map +1 -1
- package/dist/src/icons.generated/ChevronDown.d.ts +0 -1
- package/dist/src/icons.generated/ChevronDown.d.ts.map +1 -1
- package/dist/src/icons.generated/ChevronLeft.d.ts +0 -1
- package/dist/src/icons.generated/ChevronLeft.d.ts.map +1 -1
- package/dist/src/icons.generated/ChevronRight.d.ts +0 -1
- package/dist/src/icons.generated/ChevronRight.d.ts.map +1 -1
- package/dist/src/icons.generated/ChevronUp.d.ts +0 -1
- package/dist/src/icons.generated/ChevronUp.d.ts.map +1 -1
- package/dist/src/icons.generated/Clock.d.ts +0 -1
- package/dist/src/icons.generated/Clock.d.ts.map +1 -1
- package/dist/src/icons.generated/Close.d.ts +0 -1
- package/dist/src/icons.generated/Close.d.ts.map +1 -1
- package/dist/src/icons.generated/CloseCircleFilled.d.ts +0 -1
- package/dist/src/icons.generated/CloseCircleFilled.d.ts.map +1 -1
- package/dist/src/icons.generated/CollapseLeft.d.ts +0 -1
- package/dist/src/icons.generated/CollapseLeft.d.ts.map +1 -1
- package/dist/src/icons.generated/CollapseRight.d.ts +0 -1
- package/dist/src/icons.generated/CollapseRight.d.ts.map +1 -1
- package/dist/src/icons.generated/Copy.d.ts +0 -1
- package/dist/src/icons.generated/Copy.d.ts.map +1 -1
- package/dist/src/icons.generated/Custom.d.ts +0 -1
- package/dist/src/icons.generated/Custom.d.ts.map +1 -1
- package/dist/src/icons.generated/DangerDiamond.d.ts +0 -1
- package/dist/src/icons.generated/DangerDiamond.d.ts.map +1 -1
- package/dist/src/icons.generated/DangerDiamondFilled.d.ts +0 -1
- package/dist/src/icons.generated/DangerDiamondFilled.d.ts.map +1 -1
- package/dist/src/icons.generated/Delete.d.ts +0 -1
- package/dist/src/icons.generated/Delete.d.ts.map +1 -1
- package/dist/src/icons.generated/Deny.d.ts +0 -1
- package/dist/src/icons.generated/Deny.d.ts.map +1 -1
- package/dist/src/icons.generated/Devices.d.ts +0 -1
- package/dist/src/icons.generated/Devices.d.ts.map +1 -1
- package/dist/src/icons.generated/Directory.d.ts +0 -1
- package/dist/src/icons.generated/Directory.d.ts.map +1 -1
- package/dist/src/icons.generated/Documentation.d.ts +0 -1
- package/dist/src/icons.generated/Documentation.d.ts.map +1 -1
- package/dist/src/icons.generated/Download.d.ts +0 -1
- package/dist/src/icons.generated/Download.d.ts.map +1 -1
- package/dist/src/icons.generated/DragIndicator.d.ts +0 -1
- package/dist/src/icons.generated/DragIndicator.d.ts.map +1 -1
- package/dist/src/icons.generated/Duo.d.ts +0 -1
- package/dist/src/icons.generated/Duo.d.ts.map +1 -1
- package/dist/src/icons.generated/Edit.d.ts +0 -1
- package/dist/src/icons.generated/Edit.d.ts.map +1 -1
- package/dist/src/icons.generated/Email.d.ts +0 -1
- package/dist/src/icons.generated/Email.d.ts.map +1 -1
- package/dist/src/icons.generated/ExpandLeft.d.ts +0 -1
- package/dist/src/icons.generated/ExpandLeft.d.ts.map +1 -1
- package/dist/src/icons.generated/ExpandRight.d.ts +0 -1
- package/dist/src/icons.generated/ExpandRight.d.ts.map +1 -1
- package/dist/src/icons.generated/ExternalLink.d.ts +0 -1
- package/dist/src/icons.generated/ExternalLink.d.ts.map +1 -1
- package/dist/src/icons.generated/Fido2.d.ts +0 -1
- package/dist/src/icons.generated/Fido2.d.ts.map +1 -1
- package/dist/src/icons.generated/Filter.d.ts +0 -1
- package/dist/src/icons.generated/Filter.d.ts.map +1 -1
- package/dist/src/icons.generated/Folder.d.ts +0 -1
- package/dist/src/icons.generated/Folder.d.ts.map +1 -1
- package/dist/src/icons.generated/Globe.d.ts +0 -1
- package/dist/src/icons.generated/Globe.d.ts.map +1 -1
- package/dist/src/icons.generated/GoogleAuth.d.ts +0 -1
- package/dist/src/icons.generated/GoogleAuth.d.ts.map +1 -1
- package/dist/src/icons.generated/Grid.d.ts +0 -1
- package/dist/src/icons.generated/Grid.d.ts.map +1 -1
- package/dist/src/icons.generated/Group.d.ts +0 -1
- package/dist/src/icons.generated/Group.d.ts.map +1 -1
- package/dist/src/icons.generated/Hide.d.ts +0 -1
- package/dist/src/icons.generated/Hide.d.ts.map +1 -1
- package/dist/src/icons.generated/Home.d.ts +0 -1
- package/dist/src/icons.generated/Home.d.ts.map +1 -1
- package/dist/src/icons.generated/Idp.d.ts +0 -1
- package/dist/src/icons.generated/Idp.d.ts.map +1 -1
- package/dist/src/icons.generated/InformationCircle.d.ts +0 -1
- package/dist/src/icons.generated/InformationCircle.d.ts.map +1 -1
- package/dist/src/icons.generated/InformationCircleFilled.d.ts +0 -1
- package/dist/src/icons.generated/InformationCircleFilled.d.ts.map +1 -1
- package/dist/src/icons.generated/Link.d.ts +0 -1
- package/dist/src/icons.generated/Link.d.ts.map +1 -1
- package/dist/src/icons.generated/List.d.ts +0 -1
- package/dist/src/icons.generated/List.d.ts.map +1 -1
- package/dist/src/icons.generated/Lock.d.ts +0 -1
- package/dist/src/icons.generated/Lock.d.ts.map +1 -1
- package/dist/src/icons.generated/More.d.ts +0 -1
- package/dist/src/icons.generated/More.d.ts.map +1 -1
- package/dist/src/icons.generated/Notification.d.ts +0 -1
- package/dist/src/icons.generated/Notification.d.ts.map +1 -1
- package/dist/src/icons.generated/OktaVerify.d.ts +0 -1
- package/dist/src/icons.generated/OktaVerify.d.ts.map +1 -1
- package/dist/src/icons.generated/OnPremMfa.d.ts +0 -1
- package/dist/src/icons.generated/OnPremMfa.d.ts.map +1 -1
- package/dist/src/icons.generated/OneTimePassword.d.ts +0 -1
- package/dist/src/icons.generated/OneTimePassword.d.ts.map +1 -1
- package/dist/src/icons.generated/Password.d.ts +0 -1
- package/dist/src/icons.generated/Password.d.ts.map +1 -1
- package/dist/src/icons.generated/Pause.d.ts +0 -1
- package/dist/src/icons.generated/Pause.d.ts.map +1 -1
- package/dist/src/icons.generated/QuestionCircle.d.ts +0 -1
- package/dist/src/icons.generated/QuestionCircle.d.ts.map +1 -1
- package/dist/src/icons.generated/QuestionCircleFilled.d.ts +0 -1
- package/dist/src/icons.generated/QuestionCircleFilled.d.ts.map +1 -1
- package/dist/src/icons.generated/Refresh.d.ts +0 -1
- package/dist/src/icons.generated/Refresh.d.ts.map +1 -1
- package/dist/src/icons.generated/Reset.d.ts +0 -1
- package/dist/src/icons.generated/Reset.d.ts.map +1 -1
- package/dist/src/icons.generated/Resume.d.ts +0 -1
- package/dist/src/icons.generated/Resume.d.ts.map +1 -1
- package/dist/src/icons.generated/Search.d.ts +0 -1
- package/dist/src/icons.generated/Search.d.ts.map +1 -1
- package/dist/src/icons.generated/SecurityQuestion.d.ts +0 -1
- package/dist/src/icons.generated/SecurityQuestion.d.ts.map +1 -1
- package/dist/src/icons.generated/Server.d.ts +0 -1
- package/dist/src/icons.generated/Server.d.ts.map +1 -1
- package/dist/src/icons.generated/Settings.d.ts +0 -1
- package/dist/src/icons.generated/Settings.d.ts.map +1 -1
- package/dist/src/icons.generated/Show.d.ts +0 -1
- package/dist/src/icons.generated/Show.d.ts.map +1 -1
- package/dist/src/icons.generated/SmartCard.d.ts +0 -1
- package/dist/src/icons.generated/SmartCard.d.ts.map +1 -1
- package/dist/src/icons.generated/Sms.d.ts +0 -1
- package/dist/src/icons.generated/Sms.d.ts.map +1 -1
- package/dist/src/icons.generated/Subtract.d.ts +0 -1
- package/dist/src/icons.generated/Subtract.d.ts.map +1 -1
- package/dist/src/icons.generated/SymantecVip.d.ts +0 -1
- package/dist/src/icons.generated/SymantecVip.d.ts.map +1 -1
- package/dist/src/icons.generated/Sync.d.ts +0 -1
- package/dist/src/icons.generated/Sync.d.ts.map +1 -1
- package/dist/src/icons.generated/ThumbsDown.d.ts +0 -1
- package/dist/src/icons.generated/ThumbsDown.d.ts.map +1 -1
- package/dist/src/icons.generated/ThumbsUp.d.ts +0 -1
- package/dist/src/icons.generated/ThumbsUp.d.ts.map +1 -1
- package/dist/src/icons.generated/Unlock.d.ts +0 -1
- package/dist/src/icons.generated/Unlock.d.ts.map +1 -1
- package/dist/src/icons.generated/Upload.d.ts +0 -1
- package/dist/src/icons.generated/Upload.d.ts.map +1 -1
- package/dist/src/icons.generated/User.d.ts +0 -1
- package/dist/src/icons.generated/User.d.ts.map +1 -1
- package/dist/src/icons.generated/Video.d.ts +0 -1
- package/dist/src/icons.generated/Video.d.ts.map +1 -1
- package/dist/src/icons.generated/VoiceCall.d.ts +0 -1
- package/dist/src/icons.generated/VoiceCall.d.ts.map +1 -1
- package/dist/src/icons.generated/Warning.d.ts +0 -1
- package/dist/src/icons.generated/Warning.d.ts.map +1 -1
- package/dist/src/icons.generated/WarningFilled.d.ts +0 -1
- package/dist/src/icons.generated/WarningFilled.d.ts.map +1 -1
- package/dist/src/icons.generated/Yubikey.d.ts +0 -1
- package/dist/src/icons.generated/Yubikey.d.ts.map +1 -1
- package/dist/src/inputUtils.d.ts.map +1 -1
- package/dist/src/labs/DataComponents/DataStack.d.ts +1 -2
- package/dist/src/labs/DataComponents/DataStack.d.ts.map +1 -1
- package/dist/src/labs/DataComponents/DataTable.d.ts +1 -2
- package/dist/src/labs/DataComponents/DataTable.d.ts.map +1 -1
- package/dist/src/labs/DataComponents/DataView.d.ts +1 -2
- package/dist/src/labs/DataComponents/DataView.d.ts.map +1 -1
- package/dist/src/labs/DataComponents/DetailPanel.d.ts +0 -1
- package/dist/src/labs/DataComponents/DetailPanel.d.ts.map +1 -1
- package/dist/src/labs/DataComponents/TableContent.d.ts.map +1 -1
- package/dist/src/labs/DataComponents/TableSettings.d.ts.map +1 -1
- package/dist/src/labs/DataComponents/componentTypes.d.ts +5 -2
- package/dist/src/labs/DataComponents/componentTypes.d.ts.map +1 -1
- package/dist/src/labs/DataComponents/constants.d.ts +6 -4
- package/dist/src/labs/DataComponents/constants.d.ts.map +1 -1
- package/dist/src/labs/DataComponents/tableConstants.d.ts +6 -25
- package/dist/src/labs/DataComponents/tableConstants.d.ts.map +1 -1
- package/dist/src/labs/DataComponents/useFilterConversion.d.ts.map +1 -1
- package/dist/src/labs/DataTablePagination.d.ts +0 -1
- package/dist/src/labs/DataTablePagination.d.ts.map +1 -1
- package/dist/src/labs/DateField.d.ts +3 -6
- package/dist/src/labs/DateField.d.ts.map +1 -1
- package/dist/src/labs/DatePicker.d.ts +20 -19
- package/dist/src/labs/DatePicker.d.ts.map +1 -1
- package/dist/src/labs/FileUpload.d.ts +0 -1
- package/dist/src/labs/FileUpload.d.ts.map +1 -1
- package/dist/src/labs/FileUploadIllustration.d.ts +0 -1
- package/dist/src/labs/FileUploadIllustration.d.ts.map +1 -1
- package/dist/src/labs/FileUploadPreview.d.ts +0 -1
- package/dist/src/labs/FileUploadPreview.d.ts.map +1 -1
- package/dist/src/labs/GroupPicker.d.ts +2 -1
- package/dist/src/labs/GroupPicker.d.ts.map +1 -1
- package/dist/src/labs/PaginatedTable.d.ts +2 -1
- package/dist/src/labs/PaginatedTable.d.ts.map +1 -1
- package/dist/src/labs/StaticTable.d.ts +2 -1
- package/dist/src/labs/StaticTable.d.ts.map +1 -1
- package/dist/src/labs/Switch.d.ts +0 -1
- package/dist/src/labs/Switch.d.ts.map +1 -1
- package/dist/src/labs/TimeZonePicker.d.ts +22 -0
- package/dist/src/labs/TimeZonePicker.d.ts.map +1 -0
- package/dist/src/labs/TopNav.d.ts +77 -0
- package/dist/src/labs/TopNav.d.ts.map +1 -0
- package/dist/src/labs/datePickerTheme.d.ts.map +1 -1
- package/dist/src/labs/index.d.ts +1 -0
- package/dist/src/labs/index.d.ts.map +1 -1
- package/dist/src/labs/{useDatePickerTranslations.d.ts → useDateFieldsTranslations.d.ts} +3 -2
- package/dist/src/labs/useDateFieldsTranslations.d.ts.map +1 -0
- package/dist/src/labs/useOdysseyDateFields.d.ts +82 -0
- package/dist/src/labs/useOdysseyDateFields.d.ts.map +1 -0
- package/dist/src/properties/ts/odyssey-react-mui.d.ts +3 -0
- package/dist/src/properties/ts/odyssey-react-mui.d.ts.map +1 -1
- package/dist/src/test-selectors/querySelector.d.ts +2 -2
- package/dist/src/test-selectors/querySelector.d.ts.map +1 -1
- package/dist/src/theme/components.d.ts.map +1 -1
- package/dist/theme/components.js +44 -9
- package/dist/theme/components.js.map +1 -1
- package/dist/tsconfig.production.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/DataTable/DataTable.tsx +118 -64
- package/src/Pagination/Pagination.tsx +82 -46
- package/src/Pagination/usePagination.ts +14 -18
- package/src/labs/DataComponents/DataStack.tsx +6 -0
- package/src/labs/DataComponents/DataTable.tsx +6 -0
- package/src/labs/DataComponents/DataView.tsx +16 -0
- package/src/labs/DataComponents/TableContent.tsx +66 -9
- package/src/labs/DataComponents/TableSettings.tsx +60 -60
- package/src/labs/DataComponents/componentTypes.ts +5 -6
- package/src/labs/DataComponents/constants.tsx +12 -4
- package/src/labs/DataComponents/tableConstants.tsx +0 -19
- package/src/labs/DataComponents/useFilterConversion.ts +14 -18
- package/src/labs/DateField.tsx +175 -26
- package/src/labs/DatePicker.tsx +155 -93
- package/src/labs/TimeZonePicker.tsx +55 -0
- package/src/labs/TopNav.tsx +394 -0
- package/src/labs/datePickerTheme.tsx +6 -4
- package/src/labs/index.ts +1 -0
- package/src/labs/{useDatePickerTranslations.ts → useDateFieldsTranslations.ts} +3 -1
- package/src/labs/useOdysseyDateFields.ts +201 -0
- package/src/properties/odyssey-react-mui.properties +3 -0
- package/src/properties/ts/odyssey-react-mui.ts +1 -1
- package/src/theme/components.tsx +50 -7
- package/dist/src/labs/useDatePickerTranslations.d.ts.map +0 -1
|
@@ -10,11 +10,19 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export
|
|
13
|
+
import { MRT_DensityState } from "material-react-table";
|
|
14
|
+
|
|
15
|
+
export type DataViewLayout = "list" | "grid" | "table";
|
|
16
|
+
|
|
17
|
+
export const availableStackLayouts: DataViewLayout[] = ["list", "grid"];
|
|
18
|
+
export const availableTableLayouts: DataViewLayout[] = ["table"];
|
|
19
|
+
export const availableLayouts: DataViewLayout[] = [
|
|
16
20
|
...availableTableLayouts,
|
|
17
21
|
...availableStackLayouts,
|
|
18
22
|
];
|
|
19
23
|
|
|
20
|
-
export const densityValues
|
|
24
|
+
export const densityValues: MRT_DensityState[] = [
|
|
25
|
+
"comfortable",
|
|
26
|
+
"spacious",
|
|
27
|
+
"compact",
|
|
28
|
+
];
|
|
@@ -44,25 +44,6 @@ export const dataTableImmutableSettings = {
|
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
export const displayColumnDefOptions = {
|
|
47
|
-
"mrt-row-actions": {
|
|
48
|
-
header: "",
|
|
49
|
-
grow: true,
|
|
50
|
-
muiTableBodyCellProps: {
|
|
51
|
-
align: "right" as const,
|
|
52
|
-
sx: {
|
|
53
|
-
overflow: "visible",
|
|
54
|
-
width: "unset",
|
|
55
|
-
},
|
|
56
|
-
className: "ods-actions-cell",
|
|
57
|
-
},
|
|
58
|
-
muiTableHeadCellProps: {
|
|
59
|
-
align: "right" as const,
|
|
60
|
-
sx: {
|
|
61
|
-
width: "unset",
|
|
62
|
-
},
|
|
63
|
-
className: "ods-actions-cell",
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
47
|
"mrt-row-drag": {
|
|
67
48
|
header: "",
|
|
68
49
|
muiTableBodyCellProps: {
|
|
@@ -58,32 +58,28 @@ export const useFilterConversion = ({
|
|
|
58
58
|
);
|
|
59
59
|
|
|
60
60
|
const dataTableFilters = useMemo(() => {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
// Filters may be manually set via the `filters` variable;
|
|
62
|
+
// If not, they may be inferred from `columns`
|
|
63
|
+
const providedFilters = filters || columns || [];
|
|
64
|
+
|
|
65
65
|
return providedFilters.reduce<DataFilter[]>((accumulator, item) => {
|
|
66
66
|
if (typeof item === "string") {
|
|
67
67
|
const foundColumn = columns?.find(
|
|
68
68
|
(column) => column.accessorKey === item,
|
|
69
69
|
);
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
} else if ("accessorKey" in item) {
|
|
77
|
-
// Checks if it's a column
|
|
70
|
+
const filter = foundColumn && convertColumnToFilter(foundColumn);
|
|
71
|
+
return filter ? accumulator.concat(filter) : accumulator;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if ("accessorKey" in item) {
|
|
78
75
|
const filter = convertColumnToFilter(item);
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
// Checks if it's a DataFilter
|
|
76
|
+
return filter ? accumulator.concat(filter) : accumulator;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if ("label" in item) {
|
|
84
80
|
return accumulator.concat(item);
|
|
85
81
|
}
|
|
86
|
-
|
|
82
|
+
|
|
87
83
|
return accumulator;
|
|
88
84
|
}, []);
|
|
89
85
|
}, [columns, filters]);
|
package/src/labs/DateField.tsx
CHANGED
|
@@ -10,35 +10,60 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
FocusEventHandler,
|
|
15
|
+
memo,
|
|
16
|
+
useCallback,
|
|
17
|
+
useEffect,
|
|
18
|
+
useImperativeHandle,
|
|
19
|
+
useRef,
|
|
20
|
+
useState,
|
|
21
|
+
} from "react";
|
|
14
22
|
import { InputAdornment } from "@mui/material";
|
|
15
23
|
import {
|
|
16
24
|
DateField as MuiDateField,
|
|
17
25
|
DateFieldProps as MuiDateFieldProps,
|
|
26
|
+
DateValidationError,
|
|
18
27
|
} from "@mui/x-date-pickers";
|
|
19
28
|
import { DateTime } from "luxon";
|
|
29
|
+
import { useTranslation } from "react-i18next";
|
|
20
30
|
|
|
21
31
|
import { Field, RenderFieldComponentProps } from "../Field";
|
|
22
32
|
import { TextFieldProps } from "../TextField";
|
|
23
33
|
|
|
24
34
|
export type DateFieldProps = {
|
|
25
|
-
|
|
26
|
-
onChange: ChangeEventHandler<HTMLInputElement>;
|
|
27
|
-
value?: MuiDateFieldProps<DateTime>["value"];
|
|
35
|
+
onChange?: (value: string) => void;
|
|
28
36
|
} & Pick<
|
|
29
|
-
|
|
30
|
-
| "
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
MuiDateFieldProps<DateTime>,
|
|
38
|
+
"defaultValue" | "inputRef" | "minDate" | "maxDate" | "timezone" | "value"
|
|
39
|
+
> &
|
|
40
|
+
Pick<
|
|
41
|
+
TextFieldProps,
|
|
42
|
+
| "endAdornment"
|
|
43
|
+
| "errorMessage"
|
|
44
|
+
| "hasInitialFocus"
|
|
45
|
+
| "hint"
|
|
46
|
+
| "id"
|
|
47
|
+
| "isDisabled"
|
|
48
|
+
| "isOptional"
|
|
49
|
+
| "isReadOnly"
|
|
50
|
+
| "label"
|
|
51
|
+
| "onBlur"
|
|
52
|
+
| "onFocus"
|
|
53
|
+
>;
|
|
54
|
+
|
|
55
|
+
const useOdysseyDateError = () => {
|
|
56
|
+
const { t } = useTranslation();
|
|
57
|
+
|
|
58
|
+
return new Map<DateValidationError, string>([
|
|
59
|
+
["invalidDate", t("picker.error.invalid")],
|
|
60
|
+
["maxDate", t("picker.error.maxdate")],
|
|
61
|
+
["minDate", t("picker.error.mindate")],
|
|
62
|
+
]);
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
const formatDateTimeToUtcIsoDateString = (value: DateTime) =>
|
|
66
|
+
value.toUTC().toISO();
|
|
42
67
|
|
|
43
68
|
const DateField = ({
|
|
44
69
|
defaultValue,
|
|
@@ -47,17 +72,127 @@ const DateField = ({
|
|
|
47
72
|
hasInitialFocus,
|
|
48
73
|
hint,
|
|
49
74
|
id: idOverride,
|
|
75
|
+
inputRef,
|
|
50
76
|
isDisabled = false,
|
|
51
77
|
isOptional = false,
|
|
52
78
|
isReadOnly,
|
|
53
79
|
label,
|
|
80
|
+
minDate,
|
|
81
|
+
maxDate,
|
|
54
82
|
onBlur,
|
|
55
83
|
onChange,
|
|
56
84
|
onFocus,
|
|
85
|
+
timezone,
|
|
57
86
|
value,
|
|
58
87
|
}: DateFieldProps) => {
|
|
88
|
+
const errorMap = useOdysseyDateError();
|
|
89
|
+
const [displayedErrorMessage, setDisplayedErrorMessage] =
|
|
90
|
+
useState(errorMessage);
|
|
91
|
+
|
|
92
|
+
const internalValidationError = useRef<string | undefined>();
|
|
93
|
+
const localInputRef = useRef<HTMLInputElement>(null);
|
|
94
|
+
|
|
95
|
+
useImperativeHandle(
|
|
96
|
+
inputRef,
|
|
97
|
+
() => {
|
|
98
|
+
return {
|
|
99
|
+
focus: () => {
|
|
100
|
+
localInputRef.current?.focus();
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
},
|
|
104
|
+
[],
|
|
105
|
+
);
|
|
106
|
+
|
|
107
|
+
const checkMinMaxValidity = useCallback(
|
|
108
|
+
(value: DateTime) => {
|
|
109
|
+
const hasMinError = minDate && value.toUTC() < minDate.toUTC();
|
|
110
|
+
const hasMaxError = maxDate && value.toUTC() > maxDate.toUTC();
|
|
111
|
+
|
|
112
|
+
if (hasMinError || hasMaxError) {
|
|
113
|
+
if (hasMinError) {
|
|
114
|
+
setDisplayedErrorMessage(errorMap.get("minDate"));
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if (hasMaxError) {
|
|
118
|
+
setDisplayedErrorMessage(errorMap.get("maxDate"));
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
return false;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
return true;
|
|
125
|
+
},
|
|
126
|
+
[errorMap, minDate, maxDate],
|
|
127
|
+
);
|
|
128
|
+
|
|
129
|
+
useEffect(() => {
|
|
130
|
+
if (value) {
|
|
131
|
+
checkMinMaxValidity(value);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
if (defaultValue) {
|
|
135
|
+
checkMinMaxValidity(defaultValue);
|
|
136
|
+
}
|
|
137
|
+
}, [checkMinMaxValidity, defaultValue, minDate, maxDate, value]);
|
|
138
|
+
|
|
139
|
+
const clearErrorMessages = useCallback(() => {
|
|
140
|
+
setDisplayedErrorMessage(undefined);
|
|
141
|
+
internalValidationError.current = undefined;
|
|
142
|
+
}, [internalValidationError, setDisplayedErrorMessage]);
|
|
143
|
+
|
|
144
|
+
const validateAndCallOnChange = useCallback<
|
|
145
|
+
NonNullable<MuiDateFieldProps<DateTime>["onChange"]>
|
|
146
|
+
>(
|
|
147
|
+
(value, validationContext) => {
|
|
148
|
+
clearErrorMessages();
|
|
149
|
+
const { validationError } = validationContext;
|
|
150
|
+
const hasEnteredFullYear = value?.year.toString().length === 4;
|
|
151
|
+
|
|
152
|
+
if (validationError) {
|
|
153
|
+
const odysseyValidationError = errorMap.get(validationError);
|
|
154
|
+
|
|
155
|
+
if (odysseyValidationError) {
|
|
156
|
+
internalValidationError.current = odysseyValidationError;
|
|
157
|
+
|
|
158
|
+
if (value?.isValid && hasEnteredFullYear) {
|
|
159
|
+
setDisplayedErrorMessage(odysseyValidationError);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
if (value?.isValid && !validationError) {
|
|
165
|
+
const dateStringFromDateTime = formatDateTimeToUtcIsoDateString(value);
|
|
166
|
+
|
|
167
|
+
if (dateStringFromDateTime && checkMinMaxValidity(value)) {
|
|
168
|
+
onChange?.(dateStringFromDateTime);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
[checkMinMaxValidity, clearErrorMessages, errorMap, onChange],
|
|
173
|
+
);
|
|
174
|
+
|
|
175
|
+
const checkFieldValidityAndSetError = useCallback<
|
|
176
|
+
FocusEventHandler<HTMLInputElement>
|
|
177
|
+
>(
|
|
178
|
+
(event) => {
|
|
179
|
+
if (internalValidationError?.current && !displayedErrorMessage) {
|
|
180
|
+
setDisplayedErrorMessage(internalValidationError.current);
|
|
181
|
+
}
|
|
182
|
+
onBlur?.(event);
|
|
183
|
+
},
|
|
184
|
+
[displayedErrorMessage, internalValidationError, onBlur],
|
|
185
|
+
);
|
|
186
|
+
|
|
187
|
+
const hasVisibleAdornment = !isReadOnly && !isDisabled;
|
|
188
|
+
|
|
59
189
|
const renderFieldComponent = useCallback(
|
|
60
|
-
({
|
|
190
|
+
({
|
|
191
|
+
ariaDescribedBy,
|
|
192
|
+
errorMessageElementId,
|
|
193
|
+
id,
|
|
194
|
+
labelElementId,
|
|
195
|
+
}: RenderFieldComponentProps) => (
|
|
61
196
|
<MuiDateField
|
|
62
197
|
/* eslint-disable-next-line jsx-a11y/no-autofocus */
|
|
63
198
|
autoFocus={hasInitialFocus}
|
|
@@ -66,41 +201,55 @@ const DateField = ({
|
|
|
66
201
|
id={id}
|
|
67
202
|
inputProps={{
|
|
68
203
|
"aria-describedby": ariaDescribedBy,
|
|
204
|
+
"aria-errormessage": errorMessageElementId,
|
|
69
205
|
"aria-labelledby": labelElementId,
|
|
70
|
-
onChange: (event) =>
|
|
71
|
-
onChange?.(event as ChangeEvent<HTMLInputElement>),
|
|
72
206
|
}}
|
|
73
207
|
InputProps={{
|
|
74
|
-
error: Boolean(errorMessage),
|
|
208
|
+
error: Boolean(displayedErrorMessage || errorMessage),
|
|
75
209
|
endAdornment: (
|
|
76
|
-
|
|
210
|
+
<>
|
|
211
|
+
{hasVisibleAdornment && (
|
|
212
|
+
<InputAdornment position="end">{endAdornment}</InputAdornment>
|
|
213
|
+
)}
|
|
214
|
+
</>
|
|
77
215
|
),
|
|
78
216
|
}}
|
|
217
|
+
inputRef={localInputRef}
|
|
218
|
+
minDate={minDate}
|
|
219
|
+
maxDate={maxDate}
|
|
79
220
|
name={id}
|
|
80
|
-
onBlur={
|
|
221
|
+
onBlur={checkFieldValidityAndSetError}
|
|
222
|
+
onChange={validateAndCallOnChange}
|
|
81
223
|
onFocus={onFocus}
|
|
82
224
|
readOnly={isReadOnly}
|
|
225
|
+
timezone={timezone}
|
|
83
226
|
value={value}
|
|
84
227
|
variant="standard"
|
|
85
228
|
/>
|
|
86
229
|
),
|
|
87
230
|
[
|
|
231
|
+
checkFieldValidityAndSetError,
|
|
88
232
|
defaultValue,
|
|
233
|
+
displayedErrorMessage,
|
|
89
234
|
endAdornment,
|
|
90
235
|
errorMessage,
|
|
91
236
|
hasInitialFocus,
|
|
237
|
+
hasVisibleAdornment,
|
|
92
238
|
isDisabled,
|
|
93
|
-
|
|
239
|
+
localInputRef,
|
|
240
|
+
minDate,
|
|
241
|
+
maxDate,
|
|
94
242
|
onFocus,
|
|
95
|
-
onBlur,
|
|
96
243
|
isReadOnly,
|
|
244
|
+
timezone,
|
|
245
|
+
validateAndCallOnChange,
|
|
97
246
|
value,
|
|
98
247
|
],
|
|
99
248
|
);
|
|
100
249
|
|
|
101
250
|
return (
|
|
102
251
|
<Field
|
|
103
|
-
errorMessage={errorMessage}
|
|
252
|
+
errorMessage={displayedErrorMessage || errorMessage}
|
|
104
253
|
fieldType="single"
|
|
105
254
|
hasVisibleLabel
|
|
106
255
|
hint={hint}
|