diff --git a/imports/api/publication/useTracker.ts b/imports/api/publication/useTracker.ts index 106024442..4ee41d972 100644 --- a/imports/api/publication/useTracker.ts +++ b/imports/api/publication/useTracker.ts @@ -51,24 +51,27 @@ const useTrackerClientImpl = ( ): T => { const [iteration, forceUpdate] = useUniqueObject(); - const data = useMemo(() => { - let data: T = shouldNeverBeReturned as T; - - // Use Tracker.nonreactive in case we are inside a Tracker Computation. - // This can happen if someone calls `ReactDOM.render` inside a Computation. - // In that case, we want to opt out of the normal behavior of nested - // Computations, where if the outer one is invalidated or stopped, - // it stops the inner one. - - Tracker.nonreactive(() => - Tracker.autorun((c: Tracker.Computation) => { - assert(c.firstRun); - data = reactiveFn(c); - }), - ).stop(); - - return data; - }, deps && [iteration, ...deps]); + const data = useMemo( + () => { + let data: T = shouldNeverBeReturned as T; + + // Use Tracker.nonreactive in case we are inside a Tracker Computation. + // This can happen if someone calls `ReactDOM.render` inside a Computation. + // In that case, we want to opt out of the normal behavior of nested + // Computations, where if the outer one is invalidated or stopped, + // it stops the inner one. + + Tracker.nonreactive(() => + Tracker.autorun((c: Tracker.Computation) => { + assert(c.firstRun); + data = reactiveFn(c); + }), + ).stop(); + + return data; + }, + deps === undefined ? [] : [iteration, ...deps], + ); useEffect(() => { let prevData = data; diff --git a/imports/i18n/datetime.ts b/imports/i18n/datetime.ts index fe75a2d85..3477d33f9 100644 --- a/imports/i18n/datetime.ts +++ b/imports/i18n/datetime.ts @@ -1,5 +1,7 @@ import {useState, useMemo, useEffect} from 'react'; +import {type PickersLocaleText} from '@mui/x-date-pickers'; + import dateFormat from 'date-fns/format'; import dateFormatDistance from 'date-fns/formatDistance'; import dateFormatDistanceStrict from 'date-fns/formatDistanceStrict'; @@ -28,76 +30,169 @@ const localeLoaders: Readonly Promise>> = { 'fr-BE': async () => import('date-fns/locale/fr/index.js') as Promise, }; -const loadLocale = async (key: string): Promise => - localeLoaders[key]?.(); +type LocaleText = Partial>; -export const dateMaskMap = { - 'en-US': '__/__/____', - 'nl-BE': '__.__.____', - 'fr-BE': '__/__/____', +type PickersLocalization = { + components: { + MuiLocalizationProvider: { + defaultProps: { + localeText: LocaleText; + }; + }; + }; }; -export const dateTimeMaskMap = { - 'en-US': `${dateMaskMap['en-US']} __:__ _M`, - 'nl-BE': `${dateMaskMap['nl-BE']} __:__`, - 'fr-BE': `${dateMaskMap['fr-BE']} __:__`, +const pickersLocalizationLoaders: Readonly< + Record Promise> +> = { + async 'nl-BE'() { + const module = await import('@mui/x-date-pickers/locales/nlNL.js'); + return module.nlNL; + }, + async 'fr-BE'() { + const module = await import('@mui/x-date-pickers/locales/frFR.js'); + return module.frFR; + }, }; +const loadLocale = async (key: string): Promise => + localeLoaders[key]?.(); + +const loadPickersLocalization = async ( + key: string, +): Promise => + pickersLocalizationLoaders[key]?.(); + +type Cache = Map; + const localesCache = new Map(); -const getLocale = async (owner: string): Promise => { - const key = getSetting(owner, 'lang'); - if (localesCache.has(key)) { - return localesCache.get(key); +const pickersLocalizationsCache = new Map< + string, + PickersLocalization | undefined +>(); + +const _load = async ( + kind: string, + cache: Cache, + load: (key: string) => Promise, + key: string, +): Promise => { + if (cache.has(key)) { + return cache.get(key); } - return loadLocale(key).then( - (loadedLocale) => { - localesCache.set(key, loadedLocale); - return loadedLocale; + return load(key).then( + (value) => { + cache.set(key, value); + return value; }, (error) => { const message = error instanceof Error ? error.message : 'unknown error'; - console.error(`failed to load locale ${key}: ${message}`); + console.error(`failed to load ${kind} ${key}: ${message}`); console.debug({error}); return undefined; }, ); }; -export const useLocale = () => { - const key = useLocaleKey(); - const [lastLoadedLocale, setLastLoadedLocale] = useState( +const _getLocale = async (key: string): Promise => { + return _load('locale', localesCache, loadLocale, key); +}; + +const getLocale = async (owner: string): Promise => { + const key = getSetting(owner, 'lang'); + return _getLocale(key); +}; + +const _getPickersLocalization = async ( + key: string, +): Promise => { + return _load( + 'pickers localization', + pickersLocalizationsCache, + loadPickersLocalization, + key, + ); +}; + +const _pickersLocalizationToLocaleText = ( + localization: PickersLocalization | undefined, +) => { + return localization?.components.MuiLocalizationProvider.defaultProps + .localeText; +}; + +export const getLocaleText = async ( + owner: string, +): Promise => { + const key = getSetting(owner, 'lang'); + const localization = await _getPickersLocalization(key); + return _pickersLocalizationToLocaleText(localization); +}; + +const useLoadedValue = ( + kind: string, + cache: Cache, + load: (key: string) => Promise, + key: string, +): T | undefined => { + const [lastLoadedValue, setLastLoadedValue] = useState( undefined, ); useEffect(() => { - if (localesCache.has(key)) { - setLastLoadedLocale(localesCache.get(key)); + if (cache.has(key)) { + setLastLoadedValue(cache.get(key)); return undefined; } let isCancelled = false; - loadLocale(key).then( - (loadedLocale) => { - localesCache.set(key, loadedLocale); + load(key).then( + (value) => { + cache.set(key, value); if (!isCancelled) { - setLastLoadedLocale(loadedLocale); + setLastLoadedValue(value); } }, (error) => { const message = error instanceof Error ? error.message : 'unknown error'; - console.error(`failed to load locale ${key}: ${message}`); + console.error(`failed to load ${kind} ${key}: ${message}`); console.debug({error}); }, ); return () => { isCancelled = true; }; - }, [key, setLastLoadedLocale]); + }, [key, setLastLoadedValue]); + + return cache.has(key) ? cache.get(key) : lastLoadedValue; +}; + +export const useLocale = () => { + const key = useLocaleKey(); + return useLoadedValue( + 'locale', + localesCache, + loadLocale, + key, + ); +}; + +const usePickersLocalization = (key: string) => { + return useLoadedValue( + 'pickers localization', + pickersLocalizationsCache, + loadPickersLocalization, + key, + ); +}; - return localesCache.has(key) ? localesCache.get(key) : lastLoadedLocale; +export const useLocaleText = () => { + const key = useLocaleKey(); + const localization = usePickersLocalization(key); + return _pickersLocalizationToLocaleText(localization); }; export type WeekStartsOn = WeekDay; @@ -162,16 +257,6 @@ export const useDefaultDateFormatOptions = () => { ); }; -export const useDateMask = () => { - const key = useLocaleKey(); - return dateMaskMap[key]; -}; - -export const useDateTimeMask = () => { - const key = useLocaleKey(); - return dateTimeMaskMap[key]; -}; - const stringifyOptions = (options) => { if (options === undefined) return undefined; diff --git a/imports/ui/App.tsx b/imports/ui/App.tsx index ecd7139e5..9517451e8 100644 --- a/imports/ui/App.tsx +++ b/imports/ui/App.tsx @@ -10,11 +10,7 @@ import {SnackbarProvider} from 'notistack'; import CssBaseline from '@mui/material/CssBaseline'; -import {LocalizationProvider} from '@mui/x-date-pickers/LocalizationProvider'; -import {AdapterDateFns} from '@mui/x-date-pickers/AdapterDateFns'; - -import {useLocale} from '../i18n/datetime'; - +import DateTimeLocalizationProvider from './i18n/DateTimeLocalizationProvider'; import CustomWholeWindowDropZone from './input/CustomWholeWindowDropZone'; import ModalProvider from './modal/ModelProvider'; import ErrorBoundary from './ErrorBoundary'; @@ -29,12 +25,11 @@ export const muiCache = createCache({ }); const App = () => { - const locale = useLocale(); const theme = useUserTheme(); return ( - + @@ -51,7 +46,7 @@ const App = () => { - + ); }; diff --git a/imports/ui/appointments/AppointmentDialog.tsx b/imports/ui/appointments/AppointmentDialog.tsx index 6f9c1111f..161be9882 100644 --- a/imports/ui/appointments/AppointmentDialog.tsx +++ b/imports/ui/appointments/AppointmentDialog.tsx @@ -31,8 +31,6 @@ import TextField from '../input/TextField'; import CancelButton from '../button/CancelButton'; -import {useDateMask} from '../../i18n/datetime'; - import {msToString} from '../../api/duration'; import {type AppointmentDocument} from '../../api/collection/appointments'; @@ -153,8 +151,6 @@ const AppointmentDialog = ({ ]); const patientIsReadOnly = Boolean(initialPatient); - const localizedDateMask = useDateMask(); - const datetime = unserializeDatetime(date, time); const appointmentIsInThePast = isBefore( unserializeDate(date), @@ -257,21 +253,17 @@ const AppointmentDialog = ({ ( - - )} + slotProps={{ + textField: { + InputLabelProps: {shrink: true}, + error: !validDate || displayAppointmentIsInThePast, + helperText: displayAppointmentIsInThePast + ? 'Date dans le passé!' + : undefined, + }, + }} onChange={(pickedDatetime) => { if (isValid(pickedDatetime)) { setDate(serializeDate(pickedDatetime!)); @@ -284,13 +276,12 @@ const AppointmentDialog = ({ ( - - )} + slotProps={{ + textField: { + InputLabelProps: {shrink: true}, + error: !validTime, + }, + }} label="Time" value={time === '' ? null : unserializeTime(time)} onChange={(pickedDatetime) => { diff --git a/imports/ui/birthdate/useBirthdatePickerProps.ts b/imports/ui/birthdate/useBirthdatePickerProps.ts index e275534e9..f564a167d 100644 --- a/imports/ui/birthdate/useBirthdatePickerProps.ts +++ b/imports/ui/birthdate/useBirthdatePickerProps.ts @@ -5,17 +5,14 @@ import endOfToday from 'date-fns/endOfToday'; import parseISO from 'date-fns/parseISO'; import subYears from 'date-fns/subYears'; -import {useDateMask} from '../../i18n/datetime'; - const useBirthdatePickerProps = () => { - const mask = useDateMask(); const maxDateString = format(endOfToday(), 'yyyy-MM-dd'); return useMemo(() => { const maxDate = parseISO(maxDateString); const minDate = subYears(maxDate, 200); - return {minDate, maxDate, mask}; - }, [maxDateString, mask]); + return {minDate, maxDate}; + }, [maxDateString]); }; export default useBirthdatePickerProps; diff --git a/imports/ui/books/BooksDownloadDialog.tsx b/imports/ui/books/BooksDownloadDialog.tsx index 960a71e66..80ca74024 100644 --- a/imports/ui/books/BooksDownloadDialog.tsx +++ b/imports/ui/books/BooksDownloadDialog.tsx @@ -124,7 +124,9 @@ const BooksDownloadDialog = ({ <> } + slotProps={{ + textField: {fullWidth: true}, + }} label="Begin" value={begin} onChange={(date) => { @@ -134,7 +136,9 @@ const BooksDownloadDialog = ({ } + slotProps={{ + textField: {fullWidth: true}, + }} label="End" value={end} onChange={(date) => { @@ -179,7 +183,9 @@ const BooksDownloadDialog = ({ ) : ( } + slotProps={{ + textField: {fullWidth: true}, + }} views={['year']} label="Year" value={begin} diff --git a/imports/ui/consultations/ConsultationEditorHeader.tsx b/imports/ui/consultations/ConsultationEditorHeader.tsx index 6cd94b341..1d1231c88 100644 --- a/imports/ui/consultations/ConsultationEditorHeader.tsx +++ b/imports/ui/consultations/ConsultationEditorHeader.tsx @@ -7,11 +7,8 @@ import {DateTimePicker} from '@mui/x-date-pickers'; import pngDataURL from '../../lib/png/dataURL'; -import {useDateTimeMask} from '../../i18n/datetime'; - import {LinkedSubheaderAvatar, Subheader} from '../Subheader'; -import TextField from '../input/TextField'; import CopiableTextField from '../input/CopiableTextField'; import usePatient from '../patients/usePatient'; @@ -33,8 +30,6 @@ const ConsultationEditorHeader = ({consultation, state, update}) => { const {loading, fields: patient} = usePatient(init, query, deps); - const localizedDateTimeMask = useDateTimeMask(); - const {datetime, doneDatetime} = state; const textPlaceHolder = loading ? '' : '?'; @@ -80,12 +75,13 @@ const ConsultationEditorHeader = ({consultation, state, update}) => { ( - - )} + slotProps={{ + textField: { + InputLabelProps: {shrink: true}, + }, + }} onChange={(value) => { update('datetime')({target: {value}}); }} @@ -94,12 +90,13 @@ const ConsultationEditorHeader = ({consultation, state, update}) => { ( - - )} + slotProps={{ + textField: { + InputLabelProps: {shrink: true}, + }, + }} onChange={(value) => { update('doneDatetime')({target: {value}}); }} diff --git a/imports/ui/i18n/DateTimeLocalizationProvider.tsx b/imports/ui/i18n/DateTimeLocalizationProvider.tsx new file mode 100644 index 000000000..f222bf4f7 --- /dev/null +++ b/imports/ui/i18n/DateTimeLocalizationProvider.tsx @@ -0,0 +1,22 @@ +import React from 'react'; + +import {LocalizationProvider} from '@mui/x-date-pickers/LocalizationProvider'; +import {AdapterDateFns} from '@mui/x-date-pickers/AdapterDateFns'; + +import {useLocale, useLocaleText} from '../../i18n/datetime'; + +const DateTimeLocalizationProvider = ({children}) => { + const locale = useLocale(); + const localeText = useLocaleText(); + return ( + + {children} + + ); +}; + +export default DateTimeLocalizationProvider; diff --git a/imports/ui/patients/NewPatientForm.tsx b/imports/ui/patients/NewPatientForm.tsx index 9191c58d6..0b87b7362 100644 --- a/imports/ui/patients/NewPatientForm.tsx +++ b/imports/ui/patients/NewPatientForm.tsx @@ -201,14 +201,13 @@ const NewPatientForm = () => { {...birthdatePickerProps} label="Birthdate" value={birthdate} - renderInput={(props) => ( - - )} + slotProps={{ + textField: { + fullWidth: true, + helperText: error, + InputLabelProps: {shrink: true}, + }, + }} onChange={(pickedDatetime) => { setBirthdate(pickedDatetime); }} diff --git a/imports/ui/patients/PatientDeathDateEditionDialog.tsx b/imports/ui/patients/PatientDeathDateEditionDialog.tsx index a417742e6..029ce1a7f 100644 --- a/imports/ui/patients/PatientDeathDateEditionDialog.tsx +++ b/imports/ui/patients/PatientDeathDateEditionDialog.tsx @@ -13,7 +13,6 @@ import DialogContent from '@mui/material/DialogContent'; import DialogContentText from '@mui/material/DialogContentText'; import DialogTitle from '@mui/material/DialogTitle'; -import TextField from '@mui/material/TextField'; import Grid from '@mui/material/Grid'; import LoadingButton from '@mui/lab/LoadingButton'; import SaveIcon from '@mui/icons-material/Save'; @@ -113,13 +112,12 @@ const PatientDeathDateEditionDialog = ({open, onClose, patient}: Props) => { {...birthdatePickerProps} disabled={!isDead || pending} label="Death date" - renderInput={(props) => ( - - )} + slotProps={{ + textField: { + margin: 'normal', + InputLabelProps: {shrink: true}, + }, + }} value={isDead ? deathdateLegal ?? null : null} onChange={(date) => { if (isValid(date)) { diff --git a/imports/ui/patients/PatientPersonalInformationStatic.tsx b/imports/ui/patients/PatientPersonalInformationStatic.tsx index 844f3a2f5..404c3c779 100644 --- a/imports/ui/patients/PatientPersonalInformationStatic.tsx +++ b/imports/ui/patients/PatientPersonalInformationStatic.tsx @@ -330,13 +330,12 @@ const PatientPersonalInformationStatic = ( {...birthdatePickerProps} label="Death date" value={deathdateLegal ?? null} - renderInput={(props) => ( - - )} + slotProps={{ + textField: { + margin: 'normal', + InputLabelProps: {shrink: true}, + }, + }} onChange={(date) => { if (isValid(date)) { dispatch({ @@ -415,13 +414,12 @@ const PatientPersonalInformationStatic = ( label="Birth date" value={_birthdate} disabled={!editing} - renderInput={(props) => ( - - )} + slotProps={{ + textField: { + margin: 'normal', + InputLabelProps: {shrink: true}, + }, + }} onChange={(date) => { if (isValid(date)) { dispatch({ diff --git a/package-lock.json b/package-lock.json index ec71e387e..619fd595e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -967,43 +967,6 @@ "@iterable-iterator/map": "^0.1.0" } }, - "@date-io/core": { - "version": "2.17.0", - "resolved": "https://registry.npmjs.org/@date-io/core/-/core-2.17.0.tgz", - "integrity": "sha512-+EQE8xZhRM/hsY0CDTVyayMDDY5ihc4MqXCrPxooKw19yAzUIC6uUqsZeaOFNL9YKTNxYKrJP5DFgE8o5xRCOw==" - }, - "@date-io/date-fns": { - "version": "2.17.0", - "resolved": "https://registry.npmjs.org/@date-io/date-fns/-/date-fns-2.17.0.tgz", - "integrity": "sha512-L0hWZ/mTpy3Gx/xXJ5tq5CzHo0L7ry6KEO9/w/JWiFWFLZgiNVo3ex92gOl3zmzjHqY/3Ev+5sehAr8UnGLEng==", - "requires": { - "@date-io/core": "^2.17.0" - } - }, - "@date-io/dayjs": { - "version": "2.17.0", - "resolved": "https://registry.npmjs.org/@date-io/dayjs/-/dayjs-2.17.0.tgz", - "integrity": "sha512-Iq1wjY5XzBh0lheFA0it6Dsyv94e8mTiNR8vuTai+KopxDkreL3YjwTmZHxkgB7/vd0RMIACStzVgWvPATnDCA==", - "requires": { - "@date-io/core": "^2.17.0" - } - }, - "@date-io/luxon": { - "version": "2.17.0", - "resolved": "https://registry.npmjs.org/@date-io/luxon/-/luxon-2.17.0.tgz", - "integrity": "sha512-l712Vdm/uTddD2XWt9TlQloZUiTiRQtY5TCOG45MQ/8u0tu8M17BD6QYHar/3OrnkGybALAMPzCy1r5D7+0HBg==", - "requires": { - "@date-io/core": "^2.17.0" - } - }, - "@date-io/moment": { - "version": "2.17.0", - "resolved": "https://registry.npmjs.org/@date-io/moment/-/moment-2.17.0.tgz", - "integrity": "sha512-e4nb4CDZU4k0WRVhz1Wvl7d+hFsedObSauDHKtZwU9kt7gdYEAzKgnrSCTHsEaXrDumdrkCYTeZ0Tmyk7uV4tw==", - "requires": { - "@date-io/core": "^2.17.0" - } - }, "@emnapi/runtime": { "version": "0.44.0", "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-0.44.0.tgz", @@ -1238,34 +1201,34 @@ } }, "@floating-ui/core": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.5.0.tgz", - "integrity": "sha512-kK1h4m36DQ0UHGj5Ah4db7R0rHemTqqO0QLvUqi1/mUUp3LuAWbWxdxSIf/XsnH9VS6rRVPLJCncjRzUvyCLXg==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.0.tgz", + "integrity": "sha512-PcF++MykgmTj3CIyOQbKA/hDzOAiqI3mhuoN44WRCopIs1sgoDoU4oty4Jtqaj/y3oDU6fnVSm4QG0a3t5i0+g==", "requires": { - "@floating-ui/utils": "^0.1.3" + "@floating-ui/utils": "^0.2.1" } }, "@floating-ui/dom": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.5.3.tgz", - "integrity": "sha512-ClAbQnEqJAKCJOEbbLo5IUlZHkNszqhuxS4fHAVxRPXPya6Ysf2G8KypnYcOTpx6I8xcgF9bbHb6g/2KpbV8qA==", + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.3.tgz", + "integrity": "sha512-RnDthu3mzPlQ31Ss/BTwQ1zjzIhr3lk1gZB1OC56h/1vEtaXkESrOqL5fQVMfXpwGtRwX+YsZBdyHtJMQnkArw==", "requires": { - "@floating-ui/core": "^1.4.2", - "@floating-ui/utils": "^0.1.3" + "@floating-ui/core": "^1.0.0", + "@floating-ui/utils": "^0.2.0" } }, "@floating-ui/react-dom": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.0.2.tgz", - "integrity": "sha512-5qhlDvjaLmAst/rKb3VdlCinwTF4EYMiVxuuc/HVUjs46W0zgtbMmAZ1UTsDrRTxRmUEzl92mOtWbeeXL26lSQ==", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.0.8.tgz", + "integrity": "sha512-HOdqOt3R3OGeTKidaLvJKcgg75S6tibQ3Tif4eyd91QnIJWr0NLvoXFpJA/j8HqkFSL68GDca9AuyWEHlhyClw==", "requires": { - "@floating-ui/dom": "^1.5.1" + "@floating-ui/dom": "^1.6.1" } }, "@floating-ui/utils": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.1.4.tgz", - "integrity": "sha512-qprfWkn82Iw821mcKofJ5Pk9wgioHicxcQMxx+5zt5GSKoqdWvgG5AxVmpmUUjzTLPVSH5auBrhI93Deayn/DA==" + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.1.tgz", + "integrity": "sha512-9TANp6GPoMtYzQdt54kfAyMmz1+osLlXdg2ENroU7zzrtflTLrrC/lgrIfaSe+Wu0b89GKccT7vxXA0MoAIO+Q==" }, "@fontsource/roboto": { "version": "5.0.8", @@ -1618,6 +1581,30 @@ "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, "emoji-regex": { "version": "9.2.2", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", @@ -1635,6 +1622,40 @@ "strip-ansi": "^7.0.1" } }, + "string-width-cjs": { + "version": "npm:string-width@4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + } + } + }, "strip-ansi": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", @@ -1643,6 +1664,68 @@ "requires": { "ansi-regex": "^6.0.1" } + }, + "strip-ansi-cjs": { + "version": "npm:strip-ansi@6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + } + } + }, + "wrap-ansi-cjs": { + "version": "npm:wrap-ansi@7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + } + } } } }, @@ -1877,66 +1960,108 @@ } }, "@mui/base": { - "version": "5.0.0-beta.16", - "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.16.tgz", - "integrity": "sha512-OYxhC81c9bO0wobGcM8rrY5bRwpCXAI21BL0P2wz/2vTv4ek7ALz9+U5M8wgdmtRNUhmCmAB4L2WRwFRf5Cd8Q==", - "requires": { - "@babel/runtime": "^7.22.15", - "@floating-ui/react-dom": "^2.0.2", - "@mui/types": "^7.2.4", - "@mui/utils": "^5.14.10", + "version": "5.0.0-beta.37", + "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.37.tgz", + "integrity": "sha512-/o3anbb+DeCng8jNsd3704XtmmLDZju1Fo8R2o7ugrVtPQ/QpcqddwKNzKPZwa0J5T8YNW3ZVuHyQgbTnQLisQ==", + "requires": { + "@babel/runtime": "^7.23.9", + "@floating-ui/react-dom": "^2.0.8", + "@mui/types": "^7.2.13", + "@mui/utils": "^5.15.11", "@popperjs/core": "^2.11.8", - "clsx": "^2.0.0", + "clsx": "^2.1.0", "prop-types": "^15.8.1" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.0.tgz", + "integrity": "sha512-Chk32uHMg6TnQdvw2e9IlqPpFX/6NLuK0Ys2PqLb7/gL5uFn9mXvK715FGLlOLQrcO4qIkNHkvPGktzzXexsFw==", + "requires": { + "regenerator-runtime": "^0.14.0" + } + } } }, "@mui/core-downloads-tracker": { - "version": "5.14.10", - "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.14.10.tgz", - "integrity": "sha512-kPHu/NhZq1k+vSZR5wq3AyUfD4bnfWAeuKpps0+8PS7ZHQ2Lyv1cXJh+PlFdCIOa0PK98rk3JPwMzS8BMhdHwQ==" + "version": "5.15.11", + "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.15.11.tgz", + "integrity": "sha512-JVrJ9Jo4gyU707ujnRzmE8ABBWpXd6FwL9GYULmwZRtfPg89ggXs/S3MStQkpJ1JRWfdLL6S5syXmgQGq5EDAw==" }, "@mui/icons-material": { - "version": "5.14.9", - "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-5.14.9.tgz", - "integrity": "sha512-xTRQbDsogsJo7tY5Og8R9zbuG2q+KIPVIM6JQoKxtJlz9DPOw1u0T2fGrvwD+XAOVifQf6epNMcGCDLfJAz4Nw==", + "version": "5.15.11", + "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-5.15.11.tgz", + "integrity": "sha512-R5ZoQqnKpd+5Ew7mBygTFLxgYsQHPhgR3TDXSgIHYIjGzYuyPLmGLSdcPUoMdi6kxiYqHlpPj4NJxlbaFD0UHA==", "requires": { - "@babel/runtime": "^7.22.15" + "@babel/runtime": "^7.23.9" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.0.tgz", + "integrity": "sha512-Chk32uHMg6TnQdvw2e9IlqPpFX/6NLuK0Ys2PqLb7/gL5uFn9mXvK715FGLlOLQrcO4qIkNHkvPGktzzXexsFw==", + "requires": { + "regenerator-runtime": "^0.14.0" + } + } } }, "@mui/lab": { - "version": "5.0.0-alpha.145", - "resolved": "https://registry.npmjs.org/@mui/lab/-/lab-5.0.0-alpha.145.tgz", - "integrity": "sha512-c8GEHGu5yUri5GIb7I7QDN+VTOHZvgXRIRXGF5ZiooeON8ioqTnJ2l9D93XZ+NAFTRZC/vuaKoU7UhqFBOpA5Q==", - "requires": { - "@babel/runtime": "^7.22.15", - "@mui/base": "5.0.0-beta.16", - "@mui/system": "^5.14.10", - "@mui/types": "^7.2.4", - "@mui/utils": "^5.14.10", - "@mui/x-tree-view": "6.0.0-alpha.1", - "clsx": "^2.0.0", + "version": "5.0.0-alpha.166", + "resolved": "https://registry.npmjs.org/@mui/lab/-/lab-5.0.0-alpha.166.tgz", + "integrity": "sha512-a+0yorrgxLIgfKhShVKQk0/5CnB4KBhMQ64SvEB+CsvKAKKJzjIU43m2nMqdBbWzfnEuj6wR9vQ9kambdn3ZKA==", + "requires": { + "@babel/runtime": "^7.23.9", + "@mui/base": "5.0.0-beta.37", + "@mui/system": "^5.15.11", + "@mui/types": "^7.2.13", + "@mui/utils": "^5.15.11", + "clsx": "^2.1.0", "prop-types": "^15.8.1" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.0.tgz", + "integrity": "sha512-Chk32uHMg6TnQdvw2e9IlqPpFX/6NLuK0Ys2PqLb7/gL5uFn9mXvK715FGLlOLQrcO4qIkNHkvPGktzzXexsFw==", + "requires": { + "regenerator-runtime": "^0.14.0" + } + } } }, "@mui/material": { - "version": "5.14.10", - "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.14.10.tgz", - "integrity": "sha512-ejFMppnO+lzBXpzju+N4SSz0Mhmi5sihXUGcr5FxpgB6bfUP0Lpe32O0Sw/3s8xlmLEvG1fqVT0rRyAVMlCA+A==", - "requires": { - "@babel/runtime": "^7.22.15", - "@mui/base": "5.0.0-beta.16", - "@mui/core-downloads-tracker": "^5.14.10", - "@mui/system": "^5.14.10", - "@mui/types": "^7.2.4", - "@mui/utils": "^5.14.10", - "@types/react-transition-group": "^4.4.6", - "clsx": "^2.0.0", - "csstype": "^3.1.2", + "version": "5.15.11", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.15.11.tgz", + "integrity": "sha512-FA3eEuEZaDaxgN3CgfXezMWbCZ4VCeU/sv0F0/PK5n42qIgsPVD6q+j71qS7/62sp6wRFMHtDMpXRlN+tT/7NA==", + "requires": { + "@babel/runtime": "^7.23.9", + "@mui/base": "5.0.0-beta.37", + "@mui/core-downloads-tracker": "^5.15.11", + "@mui/system": "^5.15.11", + "@mui/types": "^7.2.13", + "@mui/utils": "^5.15.11", + "@types/react-transition-group": "^4.4.10", + "clsx": "^2.1.0", + "csstype": "^3.1.3", "prop-types": "^15.8.1", "react-is": "^18.2.0", "react-transition-group": "^4.4.5" }, "dependencies": { + "@babel/runtime": { + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.0.tgz", + "integrity": "sha512-Chk32uHMg6TnQdvw2e9IlqPpFX/6NLuK0Ys2PqLb7/gL5uFn9mXvK715FGLlOLQrcO4qIkNHkvPGktzzXexsFw==", + "requires": { + "regenerator-runtime": "^0.14.0" + } + }, + "csstype": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" + }, "react-is": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", @@ -1945,57 +2070,110 @@ } }, "@mui/private-theming": { - "version": "5.14.10", - "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.14.10.tgz", - "integrity": "sha512-f67xOj3H06wWDT9xBg7hVL/HSKNF+HG1Kx0Pm23skkbEqD2Ef2Lif64e5nPdmWVv+7cISCYtSuE2aeuzrZe78w==", + "version": "5.15.11", + "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.15.11.tgz", + "integrity": "sha512-jY/696SnSxSzO1u86Thym7ky5T9CgfidU3NFJjguldqK4f3Z5S97amZ6nffg8gTD0HBjY9scB+4ekqDEUmxZOA==", "requires": { - "@babel/runtime": "^7.22.15", - "@mui/utils": "^5.14.10", + "@babel/runtime": "^7.23.9", + "@mui/utils": "^5.15.11", "prop-types": "^15.8.1" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.0.tgz", + "integrity": "sha512-Chk32uHMg6TnQdvw2e9IlqPpFX/6NLuK0Ys2PqLb7/gL5uFn9mXvK715FGLlOLQrcO4qIkNHkvPGktzzXexsFw==", + "requires": { + "regenerator-runtime": "^0.14.0" + } + } } }, "@mui/styled-engine": { - "version": "5.14.10", - "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.14.10.tgz", - "integrity": "sha512-EJckxmQHrsBvDbFu1trJkvjNw/1R7jfNarnqPSnL+jEQawCkQIqVELWLrlOa611TFtxSJGkdUfCFXeJC203HVg==", + "version": "5.15.11", + "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.15.11.tgz", + "integrity": "sha512-So21AhAngqo07ces4S/JpX5UaMU2RHXpEA6hNzI6IQjd/1usMPxpgK8wkGgTe3JKmC2KDmH8cvoycq5H3Ii7/w==", "requires": { - "@babel/runtime": "^7.22.15", + "@babel/runtime": "^7.23.9", "@emotion/cache": "^11.11.0", - "csstype": "^3.1.2", + "csstype": "^3.1.3", "prop-types": "^15.8.1" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.0.tgz", + "integrity": "sha512-Chk32uHMg6TnQdvw2e9IlqPpFX/6NLuK0Ys2PqLb7/gL5uFn9mXvK715FGLlOLQrcO4qIkNHkvPGktzzXexsFw==", + "requires": { + "regenerator-runtime": "^0.14.0" + } + }, + "csstype": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" + } } }, "@mui/system": { - "version": "5.14.10", - "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.14.10.tgz", - "integrity": "sha512-QQmtTG/R4gjmLiL5ECQ7kRxLKDm8aKKD7seGZfbINtRVJDyFhKChA1a+K2bfqIAaBo1EMDv+6FWNT1Q5cRKjFA==", - "requires": { - "@babel/runtime": "^7.22.15", - "@mui/private-theming": "^5.14.10", - "@mui/styled-engine": "^5.14.10", - "@mui/types": "^7.2.4", - "@mui/utils": "^5.14.10", - "clsx": "^2.0.0", - "csstype": "^3.1.2", + "version": "5.15.11", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.15.11.tgz", + "integrity": "sha512-9j35suLFq+MgJo5ktVSHPbkjDLRMBCV17NMBdEQurh6oWyGnLM4uhU4QGZZQ75o0vuhjJghOCA1jkO3+79wKsA==", + "requires": { + "@babel/runtime": "^7.23.9", + "@mui/private-theming": "^5.15.11", + "@mui/styled-engine": "^5.15.11", + "@mui/types": "^7.2.13", + "@mui/utils": "^5.15.11", + "clsx": "^2.1.0", + "csstype": "^3.1.3", "prop-types": "^15.8.1" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.0.tgz", + "integrity": "sha512-Chk32uHMg6TnQdvw2e9IlqPpFX/6NLuK0Ys2PqLb7/gL5uFn9mXvK715FGLlOLQrcO4qIkNHkvPGktzzXexsFw==", + "requires": { + "regenerator-runtime": "^0.14.0" + } + }, + "csstype": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" + } } }, "@mui/types": { - "version": "7.2.4", - "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.4.tgz", - "integrity": "sha512-LBcwa8rN84bKF+f5sDyku42w1NTxaPgPyYKODsh01U1fVstTClbUoSA96oyRBnSNyEiAVjKm6Gwx9vjR+xyqHA==" + "version": "7.2.13", + "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.13.tgz", + "integrity": "sha512-qP9OgacN62s+l8rdDhSFRe05HWtLLJ5TGclC9I1+tQngbssu0m2dmFZs+Px53AcOs9fD7TbYd4gc9AXzVqO/+g==" }, "@mui/utils": { - "version": "5.14.10", - "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.14.10.tgz", - "integrity": "sha512-Rn+vYQX7FxkcW0riDX/clNUwKuOJFH45HiULxwmpgnzQoQr3A0lb+QYwaZ+FAkZrR7qLoHKmLQlcItu6LT0y/Q==", + "version": "5.15.11", + "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.15.11.tgz", + "integrity": "sha512-D6bwqprUa9Stf8ft0dcMqWyWDKEo7D+6pB1k8WajbqlYIRA8J8Kw9Ra7PSZKKePGBGWO+/xxrX1U8HpG/aXQCw==", "requires": { - "@babel/runtime": "^7.22.15", - "@types/prop-types": "^15.7.5", + "@babel/runtime": "^7.23.9", + "@types/prop-types": "^15.7.11", "prop-types": "^15.8.1", "react-is": "^18.2.0" }, "dependencies": { + "@babel/runtime": { + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.0.tgz", + "integrity": "sha512-Chk32uHMg6TnQdvw2e9IlqPpFX/6NLuK0Ys2PqLb7/gL5uFn9mXvK715FGLlOLQrcO4qIkNHkvPGktzzXexsFw==", + "requires": { + "regenerator-runtime": "^0.14.0" + } + }, + "@types/prop-types": { + "version": "15.7.11", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.11.tgz", + "integrity": "sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==" + }, "react-is": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", @@ -2004,42 +2182,27 @@ } }, "@mui/x-date-pickers": { - "version": "5.0.20", - "resolved": "https://registry.npmjs.org/@mui/x-date-pickers/-/x-date-pickers-5.0.20.tgz", - "integrity": "sha512-ERukSeHIoNLbI1C2XRhF9wRhqfsr+Q4B1SAw2ZlU7CWgcG8UBOxgqRKDEOVAIoSWL+DWT6GRuQjOKvj6UXZceA==", - "requires": { - "@babel/runtime": "^7.18.9", - "@date-io/core": "^2.15.0", - "@date-io/date-fns": "^2.15.0", - "@date-io/dayjs": "^2.15.0", - "@date-io/luxon": "^2.15.0", - "@date-io/moment": "^2.15.0", - "@mui/utils": "^5.10.3", - "@types/react-transition-group": "^4.4.5", - "clsx": "^1.2.1", - "prop-types": "^15.7.2", - "react-transition-group": "^4.4.5", - "rifm": "^0.12.1" - }, - "dependencies": { - "clsx": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz", - "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==" - } - } - }, - "@mui/x-tree-view": { - "version": "6.0.0-alpha.1", - "resolved": "https://registry.npmjs.org/@mui/x-tree-view/-/x-tree-view-6.0.0-alpha.1.tgz", - "integrity": "sha512-JUG3HmBrmGEALbCFg1b+i7h726e1dWYZs4db3syO1j+Q++E3nbvE4Lehp5yGTFm+8esH0Tny50tuJaa4WX6VSA==", - "requires": { - "@babel/runtime": "^7.22.6", - "@mui/utils": "^5.14.3", - "@types/react-transition-group": "^4.4.6", + "version": "6.19.6", + "resolved": "https://registry.npmjs.org/@mui/x-date-pickers/-/x-date-pickers-6.19.6.tgz", + "integrity": "sha512-QW9AFcPi0vLpkUhmquhhyhLaBvB0AZJuu3NTrE173qNKx3Z3n51aCLY9bc7c6i4ltZMMsVRHlvzQjsve04TC8A==", + "requires": { + "@babel/runtime": "^7.23.2", + "@mui/base": "^5.0.0-beta.22", + "@mui/utils": "^5.14.16", + "@types/react-transition-group": "^4.4.8", "clsx": "^2.0.0", "prop-types": "^15.8.1", "react-transition-group": "^4.4.5" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.0.tgz", + "integrity": "sha512-Chk32uHMg6TnQdvw2e9IlqPpFX/6NLuK0Ys2PqLb7/gL5uFn9mXvK715FGLlOLQrcO4qIkNHkvPGktzzXexsFw==", + "requires": { + "regenerator-runtime": "^0.14.0" + } + } } }, "@nicolo-ribaudo/eslint-scope-5-internals": { @@ -3402,9 +3565,9 @@ "dev": true }, "@types/react": { - "version": "18.2.22", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.22.tgz", - "integrity": "sha512-60fLTOLqzarLED2O3UQImc/lsNRgG0jE/a1mPW9KjMemY0LMITWEsbS4VvZ4p6rorEHd5YKxxmMKSDK505GHpA==", + "version": "18.2.61", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.61.tgz", + "integrity": "sha512-NURTN0qNnJa7O/k4XUkEW2yfygA+NxS0V5h1+kp9jPwhzZy95q3ADoGMP0+JypMhrZBTTgjKAUlTctde1zzeQA==", "requires": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -3422,17 +3585,17 @@ } }, "@types/react-dom": { - "version": "18.2.7", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.7.tgz", - "integrity": "sha512-GRaAEriuT4zp9N4p1i8BDBYmEyfo+xQ3yHjJU4eiK5NDa1RmUZG+unZABUTK4/Ox/M+GaHwb6Ow8rUITrtjszA==", + "version": "18.2.19", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.19.tgz", + "integrity": "sha512-aZvQL6uUbIJpjZk4U8JZGbau9KDeAwMfmhyWorxgBkqDIEf6ROjRozcmPIicqsUwPUjbkDfHKgGee1Lq65APcA==", "requires": { "@types/react": "*" } }, "@types/react-transition-group": { - "version": "4.4.6", - "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.6.tgz", - "integrity": "sha512-VnCdSxfcm08KjsJVQcfBmhEQAPnLB8G08hAxn39azX1qYBQ/5RVQuoHuKIcfKOdncuaUvEpFKFzEvbtIMsfVew==", + "version": "4.4.10", + "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.10.tgz", + "integrity": "sha512-hT/+s0VQs2ojCX823m60m5f0sL5idt9SO6Tj6Dg+rdphGPIeJbJ6CxvBYkgkGKrYeDjvIpKTR38UzmtHJOGW3Q==", "requires": { "@types/react": "*" } @@ -3447,9 +3610,9 @@ } }, "@types/scheduler": { - "version": "0.16.3", - "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.3.tgz", - "integrity": "sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ==" + "version": "0.16.8", + "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.8.tgz", + "integrity": "sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==" }, "@types/send": { "version": "0.17.4", @@ -4734,9 +4897,9 @@ "dev": true }, "clsx": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.0.0.tgz", - "integrity": "sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.0.tgz", + "integrity": "sha512-m3iNNWpd9rl3jvvcBnu70ylMdrXt8Vlq4HYadnU5fwcOtvkSQWPmj7amUcDT2qYI7risszBjI5AUIUox9D16pg==" }, "color": { "version": "4.2.3", @@ -11955,11 +12118,6 @@ "integrity": "sha512-9aZLIrhRaD97sgVhtJOW6ckOEh6/GnvQtdVNfdZ6s67+3/XwLS9lBcQYzEEhYVeUowN7pRzMLsyGhK2i/xvWbw==", "optional": true }, - "rifm": { - "version": "0.12.1", - "resolved": "https://registry.npmjs.org/rifm/-/rifm-0.12.1.tgz", - "integrity": "sha512-OGA1Bitg/dSJtI/c4dh90svzaUPt228kzFsUkJbtA2c964IqEAwWXeL9ZJi86xWv3j5SMqRvGULl7bA6cK0Bvg==" - }, "rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -12545,17 +12703,6 @@ "strip-ansi": "^6.0.1" } }, - "string-width-cjs": { - "version": "npm:string-width@4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - }, "string.prototype.matchall": { "version": "4.0.10", "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.10.tgz", @@ -12622,15 +12769,6 @@ "ansi-regex": "^5.0.1" } }, - "strip-ansi-cjs": { - "version": "npm:strip-ansi@6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, "strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", @@ -13449,43 +13587,6 @@ } } }, - "wrap-ansi-cjs": { - "version": "npm:wrap-ansi@7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - } - } - }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", diff --git a/package.json b/package.json index d55e6f784..c47fcd184 100644 --- a/package.json +++ b/package.json @@ -53,10 +53,10 @@ "@iterable-iterator/sorted": "^0.0.2", "@iterable-iterator/window": "^0.0.3", "@iterable-iterator/zip": "^0.0.2", - "@mui/icons-material": "^5.14.9", - "@mui/lab": "^5.0.0-alpha.120", - "@mui/material": "^5.14.10", - "@mui/x-date-pickers": "^5.0.20", + "@mui/icons-material": "^5.15.11", + "@mui/lab": "^5.0.0-alpha.166", + "@mui/material": "^5.15.11", + "@mui/x-date-pickers": "^6.19.6", "@set-theory/cartesian-product": "^1.0.2", "@total-order/date": "^0.0.2", "@total-order/iter": "^0.0.2", @@ -135,9 +135,9 @@ "@types/meteor": "2.9.4", "@types/mocha": "8.2.3", "@types/node": "14.18.63", - "@types/react": "18.2.22", + "@types/react": "18.2.61", "@types/react-color": "3.0.11", - "@types/react-dom": "18.2.7", + "@types/react-dom": "18.2.19", "@types/sharp": "0.31.1", "babel-plugin-istanbul": "6.1.1", "babel-plugin-transform-remove-console": "6.9.4", diff --git a/test/app/client/patient/appointments.app-tests.ts b/test/app/client/patient/appointments.app-tests.ts index 0de9290b6..a3ca04d2e 100644 --- a/test/app/client/patient/appointments.app-tests.ts +++ b/test/app/client/patient/appointments.app-tests.ts @@ -26,7 +26,7 @@ const scheduleAppointmentForPatient = async ( id: patientId, }); - const {user, findByRole, queryByRole, findAllByRole} = app; + const {user, findByRole, findByLabelText, queryByRole, findAllByRole} = app; await user.click(await findByRole('button', {name: /^more actions/i})); await navigateTo( @@ -45,7 +45,12 @@ const scheduleAppointmentForPatient = async ( console.debug(`Set time to ${time}`); await fillIn(app, await findByRole('textbox', {name: 'Time'}), time); console.debug('Set duration to 30m'); - await user.click(await findByRole('button', {name: '15m'})); + // await user.click(await findByRole('button', {name: '15m'})); + // NOTE: using workaround found at + // SEE: https://github.com/testing-library/react-testing-library/issues/1248#issuecomment-1838053869 + await user.click( + await findByLabelText('15m', {selector: '[role="combobox"]'}), + ); await user.click(await findByRole('option', {name: '30m'}, {timeout: 5000})); console.debug('Click on Schedule'); await user.click(await findByRole('button', {name: 'Schedule'})); @@ -106,6 +111,7 @@ client(__filename, () => { user, userWithoutPointerEventsCheck, findByRole, + findByText, getByRole, queryByRole, } = app; @@ -125,10 +131,19 @@ client(__filename, () => { console.debug('Set cancellation reason'); console.debug('Open cancellation reason choice menu'); + // await user.click( + // await findByRole( + // 'combobox', + // {name: 'Please choose a reason for the cancellation (required)'}, + // {timeout: 5000}, + // ), + // ); + // NOTE: using workaround found at + // SEE: https://github.com/testing-library/react-testing-library/issues/1248#issuecomment-1838053869 await user.click( - await findByRole( - 'button', - {name: 'Please choose a reason for the cancellation (required)'}, + await findByText( + 'Please choose a reason for the cancellation (required)', + {selector: '[role="combobox"]'}, {timeout: 5000}, ), );