@influenzanet/case-web-app-core 2.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/CHANGELOG.md +276 -0
  2. package/LICENSE +202 -0
  3. package/build/AppCore.d.ts +31 -0
  4. package/build/api/authAPI.d.ts +7 -0
  5. package/build/api/instances/authenticatedApi.d.ts +5 -0
  6. package/build/api/instances/defaultApi.d.ts +2 -0
  7. package/build/api/studyAPI.d.ts +29 -0
  8. package/build/api/types/authAPI.d.ts +37 -0
  9. package/build/api/types/general.d.ts +5 -0
  10. package/build/api/types/studyAPI.d.ts +91 -0
  11. package/build/api/types/user.d.ts +46 -0
  12. package/build/api/userAPI.d.ts +20 -0
  13. package/build/api/utils.d.ts +1 -0
  14. package/build/components/dialogs/GlobalDialogs/AlertDialog.d.ts +5 -0
  15. package/build/components/dialogs/GlobalDialogs/ChangeEmail.d.ts +5 -0
  16. package/build/components/dialogs/GlobalDialogs/ChangeLanguage.d.ts +6 -0
  17. package/build/components/dialogs/GlobalDialogs/ChangeNotifications.d.ts +5 -0
  18. package/build/components/dialogs/GlobalDialogs/ChangePassword.d.ts +5 -0
  19. package/build/components/dialogs/GlobalDialogs/DeleteAccount.d.ts +5 -0
  20. package/build/components/dialogs/GlobalDialogs/EditProfile.d.ts +9 -0
  21. package/build/components/dialogs/GlobalDialogs/Login.d.ts +11 -0
  22. package/build/components/dialogs/GlobalDialogs/ManageProfiles.d.ts +5 -0
  23. package/build/components/dialogs/GlobalDialogs/PasswordForgotten.d.ts +3 -0
  24. package/build/components/dialogs/GlobalDialogs/Signup.d.ts +3 -0
  25. package/build/components/dialogs/GlobalDialogs/SignupSuccess.d.ts +3 -0
  26. package/build/components/dialogs/GlobalDialogs.d.ts +8 -0
  27. package/build/components/layout/FooterRenderer.d.ts +9 -0
  28. package/build/components/layout/HeaderRenderer.d.ts +9 -0
  29. package/build/components/misc/InternalNavigator.d.ts +9 -0
  30. package/build/components/misc/LocalStorage.d.ts +3 -0
  31. package/build/components/misc/PreventAccidentalNavigationPrompt.d.ts +7 -0
  32. package/build/components/misc/ScrollToTop.d.ts +1 -0
  33. package/build/components/navbar/Navbar.d.ts +9 -0
  34. package/build/components/navbar/NavbarComponents/Drawer.d.ts +13 -0
  35. package/build/components/navbar/NavbarComponents/DrawerDropdownItem.d.ts +10 -0
  36. package/build/components/navbar/NavbarComponents/NavbarDropdownItem.d.ts +10 -0
  37. package/build/components/navbar/NavbarComponents/NavbarItem.d.ts +10 -0
  38. package/build/components/navbar/NavbarComponents/NormalNavbar.d.ts +28 -0
  39. package/build/components/navbar/NavbarComponents/SurveyModeNavbar.d.ts +14 -0
  40. package/build/components/pages/Pages.d.ts +19 -0
  41. package/build/components/pages/components/ContentRenderer.d.ts +21 -0
  42. package/build/components/pages/components/LinkResolver/LinkResolver.d.ts +14 -0
  43. package/build/components/pages/components/LinkResolver/Resolvers/ContactVerification.d.ts +7 -0
  44. package/build/components/pages/components/LinkResolver/Resolvers/Invitation.d.ts +7 -0
  45. package/build/components/pages/components/LinkResolver/Resolvers/PasswordReset.d.ts +7 -0
  46. package/build/components/pages/components/LinkResolver/Resolvers/StudyLogin.d.ts +7 -0
  47. package/build/components/pages/components/RouteToLayout.d.ts +17 -0
  48. package/build/components/pages/components/SurveyPage/Dialogs/LoginRequiredDialog.d.ts +14 -0
  49. package/build/components/pages/components/SurveyPage/Dialogs/ProfileSelectionDialog.d.ts +17 -0
  50. package/build/components/pages/components/SurveyPage/Dialogs/SubmitSuccessWithLoginOptionsDialog.d.ts +16 -0
  51. package/build/components/pages/components/SurveyPage/Dialogs/SuccessDialog.d.ts +12 -0
  52. package/build/components/pages/components/SurveyPage/PageComponents/ErrorWithRetry.d.ts +10 -0
  53. package/build/components/pages/components/SurveyPage/SurveyPage.d.ts +16 -0
  54. package/build/components/settings/AccountSettings.d.ts +7 -0
  55. package/build/components/settings/CommunicationSettings.d.ts +7 -0
  56. package/build/components/settings/DeleteAccount.d.ts +6 -0
  57. package/build/components/settings/SystemInfo.d.ts +7 -0
  58. package/build/components/study/ReportList.d.ts +19 -0
  59. package/build/components/study/SurveyList.d.ts +10 -0
  60. package/build/constants/index.d.ts +1 -0
  61. package/build/hooks/useAuthTokenCheck.d.ts +1 -0
  62. package/build/hooks/useIsAuthenticated.d.ts +1 -0
  63. package/build/hooks/useLogout.d.ts +1 -0
  64. package/build/hooks/useSetAuthState.d.ts +3 -0
  65. package/build/hooks/useTranslatedMarkdown.d.ts +5 -0
  66. package/build/hooks/useUrlQuery.d.ts +1 -0
  67. package/build/i18n.d.ts +12 -0
  68. package/build/index.d.ts +79 -0
  69. package/build/index.es.js +30438 -0
  70. package/build/index.es.js.map +1 -0
  71. package/build/index.js +30475 -0
  72. package/build/index.js.map +1 -0
  73. package/build/localStyles.d.ts +8 -0
  74. package/build/store/ReducersManager.d.ts +66 -0
  75. package/build/store/appSlice.d.ts +35 -0
  76. package/build/store/configSlice.d.ts +11 -0
  77. package/build/store/dialogSlice.d.ts +43 -0
  78. package/build/store/localStorage.d.ts +4 -0
  79. package/build/store/rootReducer.d.ts +13 -0
  80. package/build/store/signupActions.d.ts +3 -0
  81. package/build/store/store.d.ts +9 -0
  82. package/build/store/userSlice.d.ts +17 -0
  83. package/build/types/appConfig.d.ts +13 -0
  84. package/build/types/extensionComponents.d.ts +14 -0
  85. package/build/types/footerConfig.d.ts +14 -0
  86. package/build/types/headerConfig.d.ts +23 -0
  87. package/build/types/navbarConfig.d.ts +17 -0
  88. package/build/types/pagesConfig.d.ts +226 -0
  89. package/build/types/routing.d.ts +8 -0
  90. package/build/utils/LocalStorageManager.d.ts +53 -0
  91. package/build/utils/blurEmail.d.ts +1 -0
  92. package/build/utils/parseBooleanFlag.d.ts +1 -0
  93. package/build/utils/parseGRPCTimestamp.d.ts +1 -0
  94. package/build/utils/passwordRules.d.ts +1 -0
  95. package/package.json +96 -0
  96. package/readme.md +22 -0
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface SystemInfoProps {
3
+ itemKey: string;
4
+ showBrowserInfo: boolean;
5
+ }
6
+ declare const SystemInfo: React.FC<SystemInfoProps>;
7
+ export default SystemInfo;
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ interface ReportListProps {
3
+ pageKey: string;
4
+ itemKey: string;
5
+ studyKeys?: string[];
6
+ reportKey?: string;
7
+ ignoreReports?: string[];
8
+ className?: string;
9
+ dateLocales?: Array<{
10
+ code: string;
11
+ locale: any;
12
+ format: string;
13
+ }>;
14
+ cardBgOverride?: string;
15
+ hideStudyKey?: boolean;
16
+ maxReportAgeInSeconds?: number;
17
+ }
18
+ declare const ReportList: React.FC<ReportListProps>;
19
+ export default ReportList;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { DefaultRoutes } from '../../types/routing';
3
+ interface SurveyListProps {
4
+ pageKey: string;
5
+ itemKey: string;
6
+ className?: string;
7
+ defaultRoutes: DefaultRoutes;
8
+ }
9
+ declare const SurveyList: React.FC<SurveyListProps>;
10
+ export default SurveyList;
@@ -0,0 +1 @@
1
+ export declare const minuteToMillisecondFactor = 60000;
@@ -0,0 +1 @@
1
+ export declare const useAuthTokenCheck: () => boolean;
@@ -0,0 +1 @@
1
+ export declare const useIsAuthenticated: () => boolean;
@@ -0,0 +1 @@
1
+ export declare const useLogout: () => (withoutRedirect?: boolean | undefined) => void;
@@ -0,0 +1,3 @@
1
+ import { TokenResponse } from "../api/types/authAPI";
2
+ import { User } from "../api/types/user";
3
+ export declare const useSetAuthState: () => (token: TokenResponse, user: User) => void;
@@ -0,0 +1,5 @@
1
+ export declare const getTranslatedMarkdownPath: (markdownName: string, language: string) => string;
2
+ export declare const useTranslatedMarkdown: (markdownPath: string) => {
3
+ content: string | undefined;
4
+ loading: boolean;
5
+ };
@@ -0,0 +1 @@
1
+ export declare const useUrlQuery: () => URLSearchParams;
@@ -0,0 +1,12 @@
1
+ export declare const InterpolationKeys: {
2
+ Date: string;
3
+ };
4
+ /**
5
+ * Initialize i18n - use this method at the start of the application, so that the translation files can be loaded
6
+ * @param lng language code of the default language
7
+ * @param fallbackLng language code for the fallback language (if a translation is not available)
8
+ * @param localeUrl root url of the folder that contains the locale definitions (e.g.: https://example.com/static/locales)
9
+ */
10
+ export declare const initI18n: (lng: string, fallbackLng: string, localeUrl: string) => Promise<void>;
11
+ export declare const loadLastSelectedLanguage: (defaultLang: string) => string;
12
+ export declare const saveLanguageSelection: (lang: string) => void;
@@ -0,0 +1,79 @@
1
+ import AppCore from './AppCore';
2
+ import { initI18n } from './i18n';
3
+ import store, { localStorageManager, reducersManager } from './store/store';
4
+ import * as studyAPI from './api/studyAPI';
5
+ import * as userAPI from './api/userAPI';
6
+ import { useAuthTokenCheck } from "./hooks/useAuthTokenCheck";
7
+ import PreventAccidentalNavigationPrompt from './components/misc/PreventAccidentalNavigationPrompt';
8
+ import InternalNavigator from './components/misc/InternalNavigator';
9
+ declare const coreReduxActions: {
10
+ appActions: import("@reduxjs/toolkit").CaseReducerActions<{
11
+ reset: (state: import("immer/dist/internal").WritableDraft<import("./store/appSlice").AppState>) => import("immer/dist/internal").WritableDraft<import("./store/appSlice").AppState>;
12
+ setPersistState: (state: import("immer/dist/internal").WritableDraft<import("./store/appSlice").AppState>, action: {
13
+ payload: boolean;
14
+ type: string;
15
+ }) => void;
16
+ setAppAuth: (state: import("immer/dist/internal").WritableDraft<import("./store/appSlice").AppState>, action: {
17
+ payload: import("./store/appSlice").AuthInfo;
18
+ type: string;
19
+ }) => void;
20
+ openSurveyMode: (state: import("immer/dist/internal").WritableDraft<import("./store/appSlice").AppState>, action: {
21
+ payload: import("./api/types/user").Profile | undefined;
22
+ type: string;
23
+ }) => void;
24
+ closeSurveyMode: (state: import("immer/dist/internal").WritableDraft<import("./store/appSlice").AppState>) => void;
25
+ updateLastAction: (state: import("immer/dist/internal").WritableDraft<import("./store/appSlice").AppState>, action: {
26
+ payload: {
27
+ actionName: string;
28
+ info?: any;
29
+ };
30
+ type: string;
31
+ }) => void;
32
+ }>;
33
+ dialogActions: import("@reduxjs/toolkit").CaseReducerActions<{
34
+ reset(state: import("immer/dist/internal").WritableDraft<import("./store/dialogSlice").DialogState>): import("immer/dist/internal").WritableDraft<import("./store/dialogSlice").DialogState>;
35
+ closeDialog(state: import("immer/dist/internal").WritableDraft<import("./store/dialogSlice").DialogState>): void;
36
+ openDialogWithoutPayload(state: import("immer/dist/internal").WritableDraft<import("./store/dialogSlice").DialogState>, action: {
37
+ payload: {
38
+ type: string;
39
+ origin?: "surveyFlow" | undefined;
40
+ };
41
+ type: string;
42
+ }): void;
43
+ openLoginDialog(state: import("immer/dist/internal").WritableDraft<import("./store/dialogSlice").DialogState>, action: {
44
+ payload: import("./store/dialogSlice").LoginDialog;
45
+ type: string;
46
+ }): void;
47
+ openAlertDialog(state: import("immer/dist/internal").WritableDraft<import("./store/dialogSlice").DialogState>, action: {
48
+ payload: import("./store/dialogSlice").AlertDialog;
49
+ type: string;
50
+ }): void;
51
+ }>;
52
+ userActions: import("@reduxjs/toolkit").CaseReducerActions<{
53
+ reset: (state: import("immer/dist/internal").WritableDraft<import("./store/userSlice").UserState>) => import("immer/dist/internal").WritableDraft<import("./store/userSlice").UserState>;
54
+ initializeLanguage: (state: import("immer/dist/internal").WritableDraft<import("./store/userSlice").UserState>, action: {
55
+ payload: string;
56
+ type: string;
57
+ }) => import("immer/dist/internal").WritableDraft<import("./store/userSlice").UserState>;
58
+ setFromTokenResponse: (state: import("immer/dist/internal").WritableDraft<import("./store/userSlice").UserState>, action: {
59
+ payload: import("./api/types/authAPI").TokenResponse;
60
+ type: string;
61
+ }) => void;
62
+ setUser: (state: import("immer/dist/internal").WritableDraft<import("./store/userSlice").UserState>, action: {
63
+ payload: import("./api/types/user").User;
64
+ type: string;
65
+ }) => void;
66
+ setUserID: (state: import("immer/dist/internal").WritableDraft<import("./store/userSlice").UserState>, action: {
67
+ payload: string;
68
+ type: string;
69
+ }) => void;
70
+ setPreferredLanguage: (state: import("immer/dist/internal").WritableDraft<import("./store/userSlice").UserState>, action: {
71
+ payload: string;
72
+ type: string;
73
+ }) => void;
74
+ }>;
75
+ signupActions: {
76
+ contactVerified: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
77
+ };
78
+ };
79
+ export { AppCore, initI18n, store, reducersManager, localStorageManager, studyAPI, userAPI, coreReduxActions, useAuthTokenCheck, PreventAccidentalNavigationPrompt, InternalNavigator };