@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
package/CHANGELOG.md ADDED
@@ -0,0 +1,276 @@
1
+ # Changelog
2
+
3
+ ## 2.7.2 - 2023-04-17
4
+
5
+ ### Changed
6
+
7
+ - Add `no-store` to i18n http backend cache control header to avoid caching of translations.
8
+ - Updated dependencies and peer dependencies versions.
9
+
10
+ ## 2.7.1 - 2023-03-28
11
+
12
+ ### Changed
13
+
14
+ - Extension components should also receive the date locales through props
15
+ - Added the `GenericPageItemProps` interface that can be used for extension component props to extend it with their custom props.
16
+
17
+ ## 2.7.0 - 2023-01-24
18
+
19
+ ### Changed
20
+
21
+ - [PR8](https://github.com/coneno/case-web-app-core/pull/8):
22
+ - add the possibility to customise redirect URL after login from an email link.
23
+ - update dependencies
24
+
25
+ ## 2.6.0 - 2022-11-23
26
+
27
+ ### Changed
28
+
29
+ - [PR7](https://github.com/coneno/case-web-app-core/pull/7): adding more configuration options regarding 2FA and dialog size.
30
+
31
+ ## 2.5.0 - 2022-10-21
32
+
33
+ ### BREAKING CHANGE
34
+
35
+ - Updated survey-engine and case-web-ui to be able to use the new survey data model.
36
+
37
+ ### Changed
38
+
39
+ - Updated dependencies.
40
+
41
+ ## 2.4.2 - 2022-09-14
42
+
43
+ ### Changed
44
+
45
+ - Survey page won't open "immediate" survey if has validUntil that is not in the future.
46
+
47
+ ## 2.4.1 - 2022-09-09
48
+
49
+ ### Changed
50
+
51
+ - After upgrade to bootstrap 5.2.1 nav-link component and dropdown-items were styled differently than before. This update fixes the behaviour change to reproduce the previous one.
52
+
53
+ ## 2.4.0 - 2022-09-08
54
+
55
+ ### BREAKING CHANGES
56
+
57
+ - Added new survey component with chainable surveys, and support for temporary participants
58
+ - New translations required: see an example in exampleContent/static-content/locales/nl-be/surveyPage.json
59
+
60
+ ### Added
61
+
62
+ - Can define a "notFound" route to override what should happen when the requested URL is not available. This changes the current behaviour to always forward to `.auth` or `.unauth` default route. If no `.notFound` route is provided, it falls back to the current behavior.
63
+
64
+ ### Changed
65
+
66
+ - iFrame component accepts the optional "log" attribute [boolean], instead of having it default `true`
67
+ - Updated external dependencies to patch versions
68
+ - Fixes provided through PR #4 and #6
69
+
70
+ ## 2.3.4 - 2022-07-22
71
+
72
+ ### Changed
73
+
74
+ - Updated dependencies
75
+ - Add copyright prop support for teaser image
76
+ - Can hide content of action card
77
+
78
+ ## 2.3.3 - 2022-07-14
79
+
80
+ ### Changed
81
+
82
+ - add userAPI to exported modules
83
+
84
+ ## 2.3.2 - 2022-07-07
85
+
86
+ ### Changed
87
+
88
+ - defaultRoute's attributes optional
89
+
90
+ ## 2.3.1 - 2022-07-07
91
+
92
+ ### Changed
93
+
94
+ - Added logic to handle default routes for router page components and sub-pages.
95
+
96
+ ## 2.3.0 - 2022-07-07
97
+
98
+ ### Changed
99
+
100
+ - Add new pageConfig attribute to be able to configure helmet overrides for a page either from local translation file, or from global translation json.
101
+
102
+ ## 2.2.0 - 2022-06-22
103
+
104
+ ### Added
105
+
106
+ - New page content type for resizable iframes. This relies on the libarary: <https://github.com/davidjbradshaw/iframe-resizer-react>. For more details of how to properly connect cross-domain iframes, check out the examples there.
107
+
108
+ ### Changed
109
+
110
+ - Updated external libraries
111
+
112
+ ## 2.1.0 - 2022-05-11
113
+
114
+ ### Added
115
+
116
+ - New page component "helmet" that utilises a react helmet component to override the current page's title and meta description.
117
+
118
+ ### Changed
119
+
120
+ - Updated external libraries.
121
+
122
+ ## 2.0.1 - 2022-03-15
123
+
124
+ - Improve navbar styles for accessibility
125
+
126
+ ## 2.0.0 - 2022-03-10
127
+
128
+ ### BREAKING CHANGES
129
+
130
+ - List of supported date locales from date-fns needs to be now explicitly passed down as an attribute for AppCore. (`dateLocales?: Array<{ code: string, locale: any, format: string }>;`). For an example, see `ParticipantApp.stories.tsx`. The passed down locales, will be registered for react-datepicker in the DateInput response component, when it's first initialized.
131
+ - For page rows, `className` property is split up into `containerClassName` and `rowClassNameOverride` to be able to customize both the containers class and override the default "row" className of the div.
132
+ - Updated to `survey-engine` v1 track that causes changes of the import path for these libs. Update for survey-engine lib is necessary.
133
+ - Signup success dialog: the dialog supports now checking verification status (reloading the user) for the case the verification was successful on an other tab or device. This requires additional translations for the `signupSuccessDialog` in the `dialogs.json` translation file.
134
+ Following attributes are new: (with example)
135
+ - `"msgForVerifiedAccount": "If you have just verified your account, you can use the button below to reload this page."`
136
+ - `"reloadUser": "Check verification"`
137
+ - `"errors.verifyEmailFirst": "You need to verify your email address first by clicking the link in the registration email. If you cannot find the email, use the button to send a new email."`
138
+ - Newer version of `react-i18n` handling plurals differently than before. Instead of `_plural` suffix, use `_other`.
139
+
140
+ ### Added
141
+
142
+ - Support for globally defined translations. Page item keys can incllude the namespace `global:itemKey`, so that the translation is not searched on the current page's json file, but in the `global.json`.
143
+ - New page item type `actionCard` that utilises the ActionCard component from case-web-ui.
144
+ - Added license file.
145
+ - `AppCore` now accepts a list of custom survey response compoents to extend what response items a survey can use. Define the list through the prop `customSurveyResponseComponents`.
146
+ - New API methods to work with temporary participants.
147
+ - New exported component to prevent that can be used to prevent accidental navigation: `PreventAccidentalNavigationPrompt`.
148
+ - New study api call for downloading user reports
149
+ - New study api call for uploading participant files
150
+ - Add new exported component `InternalNavigator`, to use internal react-router instance to navigate in custom components.
151
+
152
+ ### Changed
153
+
154
+ - External extension components receive a method `onNavigate: (url: string) => void`, to handle internal page navigation.
155
+ - Accordion list page item accepts className attribute to add a css class to container item.
156
+ - Replaced `node-sass` with `sass` to allow using newer nodeJS versions.
157
+ - Storybook is using webpack 5 now.
158
+ - Exporting studyAPI and reudx actions so these can be used from extension components.
159
+ - Survey component is using isLoggedIn attribute on survey context.
160
+ - Email validation rule during signup has been replaced to allow characters that are supported by the standard (.e.g, 'x').
161
+ - Include the possibility to customize footer column's className.
162
+ - Dialog config includes optional info about origin, to signalize where the dialog was opened from.
163
+ - Can open manage profiles dialog if not verified yet. (Needed to finish initial survey flow.)
164
+
165
+ ### Fixes
166
+
167
+ - Sub-routes can also access extensions.
168
+ - Login and signup dialogs have improved behaviour regarding if the navigate away after successful action.
169
+ - Survey mode header handles undefined profile better.
170
+
171
+ ## 1.4.1 - 2022-01-20
172
+
173
+ ### Added
174
+
175
+ - Can trigger dialog opening with url query param ?action=openSignupDialog
176
+
177
+ ## 1.4.0 - 2021-11-19
178
+
179
+ ### BREAKING CHANGES
180
+
181
+ - `@material-ui/core` is no longer a dependency of this library.
182
+ - Navbar:
183
+ - translation files for the navbar (`locales/<languageCode>/navbar.json`) should include `toggleBtn` and `toggleBtnAriaLabel` to localise the text behind the navigation toggle on small screens.
184
+
185
+ ### Added
186
+
187
+ - The app core component can receive a list of custom react components to extend the content renderer with custom components. Simply pass down an array of `{ name: <nameOfTheComponent>, component: <react functional component>}` items. In the page configuration, you can refer to the component with the `name`. The custom component is able to call the `props.renderGenericItemFunc(item)` method which allows you the nesting of generic and custom components.
188
+ - Navbar now supports dropdown menu item to implement nested navigation / menus with more content.
189
+ - Page can contain `subPages` that are renderes as direct child routes. Rows (if any) are rendered on top first.
190
+ - New item types for page content:
191
+ - Subrouter component implemented: type `router`.
192
+ - To wrap items with an html div: type `container`.
193
+
194
+ ### Changed
195
+
196
+ - Changed implementation of the Navbar and the Drawer for small screens.
197
+ - Verification Code input form will ignore '-' charaters (does not matter for validation or matching if you use hyphens or not). This way, we can send better formatted emails, using a hyphen in the email body to make code more readable.
198
+ - Can override navbar's right side action items.
199
+ - Updated project dependencies.
200
+
201
+ ## 1.3.0 - 2021-10-20
202
+
203
+ ### Added
204
+
205
+ - Email address at signup will be validation with stronger rules to prevent entering invalid email address. To set language specific error message, you can use the translation object's value of `signup.errors.emailRules`.
206
+
207
+ ## [1.2.0] - 2021-10-19
208
+
209
+ ### Added
210
+
211
+ - New component for placeholder item
212
+
213
+ ### Changed
214
+
215
+ - Updated dependencies
216
+
217
+ ## [1.1.0] - 2021-07-08
218
+
219
+ ### Added
220
+
221
+ - send selected language code with survey response object in the context
222
+
223
+ ### Changed
224
+
225
+ - [BREAKING-CHANGE]: updated dependencies - react markdown renderer needs new format. See documentation here:
226
+ <https://github.com/coneno/case-web-ui/blob/master/CHANGELOG.md#breaking-changes>
227
+
228
+ ## [1.0.19]
229
+
230
+ ### Changed
231
+
232
+ - Support `VideoPlayer`'s track propetry to define subtitles
233
+ - Updating dependencies. Using stable bootstrap version.
234
+
235
+ ## [1.0.18]
236
+
237
+ ### Changed
238
+
239
+ - `AccountSettings` component: attribute renamed (and connected) for hiding the profile settings button. Attribute name is called now: `hideProfileSettings`. It is an optional attribute accepting boolean values.
240
+ - Updating dependecies.
241
+
242
+ ### [1.0.17]
243
+
244
+ ## Added
245
+
246
+ - New environment variable `REACT_APP_DISABLE_SIGNUP`. If defined as "true", nav-link from the navbar and from the login dialog is removed. If not defined or has any other value, it won't have any effect.
247
+
248
+ ### Changed
249
+
250
+ - *BREAKING*: at signup request sent to the backend, it will send the instanceID as http header. This requires a participant-api (api-gateway) with v0.13.0 or later. This header field was included for providing the instanceID for reCaptcha validation.
251
+ - Updating project dependencies (case-web-ui), with minor improvements.
252
+
253
+ ## [1.0.16]
254
+
255
+ ### Changed
256
+
257
+ - Parse survey's validFrom and validUntil properties correctly. (gRPC sends them as strings, needs conversion)
258
+
259
+ - Updated case-web-ui dependency to deal with missing options in the single or multiple choice survey components more gracefully.
260
+
261
+ ## [1.0.15]
262
+
263
+ ### Changed
264
+
265
+ - Updated project dependecies
266
+
267
+ ## [1.0.14]
268
+
269
+ ### Added
270
+
271
+ - Store language selection into localStorage. When opening an other tab, reloading or revisiting the page, this selection will be picked up and used. If the item is not available in the local storage, the default language defined by the environment variable will be used.
272
+
273
+ ### Changed
274
+
275
+ - Updated dependencies - case-web-ui's new version with support for multiple choice subtitles and markdown survey component
276
+ - NavLink items remove `type="button"` that causes wrong styling in Safari.
package/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,31 @@
1
+ import React from 'react';
2
+ import { FooterConfig } from './types/footerConfig';
3
+ import { AppConfig } from './types/appConfig';
4
+ import { HeaderConfig } from './types/headerConfig';
5
+ import { NavbarConfig } from './types/navbarConfig';
6
+ import { PagesConfig } from './types/pagesConfig';
7
+ import { CustomSurveyResponseComponent } from 'case-web-ui/build/components/survey/SurveySingleItemView/ResponseComponent/ResponseComponent';
8
+ export interface Extension {
9
+ name: string;
10
+ component: React.FunctionComponent<any>;
11
+ }
12
+ interface AppCoreProps {
13
+ appConfig?: AppConfig;
14
+ headerConfig?: HeaderConfig;
15
+ navbarConfig?: NavbarConfig;
16
+ footerConfig?: FooterConfig;
17
+ pagesConfig?: PagesConfig;
18
+ hideDefaultHeader?: boolean;
19
+ hideDefaultFooter?: boolean;
20
+ customHeader?: React.ReactNode;
21
+ customFooter?: React.ReactNode;
22
+ extensions?: Extension[];
23
+ customSurveyResponseComponents?: CustomSurveyResponseComponent[];
24
+ dateLocales?: Array<{
25
+ code: string;
26
+ locale: any;
27
+ format: string;
28
+ }>;
29
+ }
30
+ declare const AppCore: React.FC<AppCoreProps>;
31
+ export default AppCore;
@@ -0,0 +1,7 @@
1
+ import { SignupMsg, LoginMsg, TokenResponse, LoginResponse, AutoTokenValidationResponse } from './types/authAPI';
2
+ export declare const signupWithEmailRequest: (creds: SignupMsg, recaptchaToken?: string | undefined) => Promise<import("axios").AxiosResponse<TokenResponse, any>>;
3
+ export declare const loginWithEmailRequest: (creds: LoginMsg) => Promise<import("axios").AxiosResponse<LoginResponse, any>>;
4
+ export declare const resend2FAVerificationCodeRequest: (creds: LoginMsg) => Promise<import("axios").AxiosResponse<any, any>>;
5
+ export declare const autoValidateTemporaryTokenReq: (token: string, accessToken: string) => Promise<import("axios").AxiosResponse<AutoTokenValidationResponse, any>>;
6
+ export declare const renewTokenURL = "/v1/auth/renew-token";
7
+ export declare const renewTokenReq: (refreshToken: string) => Promise<import("axios").AxiosResponse<TokenResponse, any>>;
@@ -0,0 +1,5 @@
1
+ declare const authApiInstance: import("axios").AxiosInstance;
2
+ export declare const renewToken: () => Promise<string>;
3
+ export declare const setDefaultAccessTokenHeader: (token: string) => void;
4
+ export declare const resetApiAuth: () => void;
5
+ export default authApiInstance;
@@ -0,0 +1,2 @@
1
+ declare const apiInstance: import("axios").AxiosInstance;
2
+ export default apiInstance;
@@ -0,0 +1,29 @@
1
+ import { SurveyReferenceReq, SurveyAndContextMsg, SurveyResponseReq, AssignedSurveys, Studies, SurveyInfos, StudiesForUser, ConvertTempParticipantReq, ReportHistory } from './types/studyAPI';
2
+ export declare const getStudiesForUserReq: () => Promise<import("axios").AxiosResponse<StudiesForUser, any>>;
3
+ export declare const getAllAvailableStudiesReq: () => Promise<import("axios").AxiosResponse<Studies, any>>;
4
+ export declare const getSurveyInfosForStudyReq: (studyKey: string) => Promise<import("axios").AxiosResponse<SurveyInfos, any>>;
5
+ export declare const getReportsForUser: (onlyForStudies?: string[] | undefined, onlyForProfiles?: string[] | undefined, reportKey?: string | undefined, from?: number | undefined, until?: number | undefined, ignoreReports?: string[] | undefined) => Promise<import("axios").AxiosResponse<ReportHistory, any>>;
6
+ export declare const enterStudyReq: (studyKey: string, profileId: string) => Promise<import("axios").AxiosResponse<AssignedSurveys, any>>;
7
+ export declare const leaveStudyRequest: (studyKey: string, profileId: string) => Promise<import("axios").AxiosResponse<AssignedSurveys, any>>;
8
+ export declare const getAllAssignedSurveysReq: () => Promise<import("axios").AxiosResponse<AssignedSurveys, any>>;
9
+ export declare const getAssignedSurveyRequest: (payload: SurveyReferenceReq) => Promise<import("axios").AxiosResponse<SurveyAndContextMsg, any>>;
10
+ export declare const submitSurveyResponseRequest: (payload: SurveyResponseReq) => Promise<import("axios").AxiosResponse<any, any>>;
11
+ export declare const uploadParticipantFileRequest: (studyKey: string, payload: File) => Promise<import("axios").AxiosResponse<any, any>>;
12
+ export declare const deleteParticipantFilesRequest: (studyKey: string, fileIds: string[]) => Promise<import("axios").AxiosResponse<any, any>>;
13
+ export declare const registerTempParticipantReq: (params: {
14
+ instance: string;
15
+ study: string;
16
+ }) => Promise<import("axios").AxiosResponse<any, any>>;
17
+ export declare const getSurveysForTempParticipantReq: (params: {
18
+ instance: string;
19
+ study: string;
20
+ pid: string;
21
+ }) => Promise<import("axios").AxiosResponse<any, any>>;
22
+ export declare const getSurveyWithoutLoginReq: (params: {
23
+ instance: string;
24
+ study: string;
25
+ survey: string;
26
+ pid?: string;
27
+ }) => Promise<import("axios").AxiosResponse<any, any>>;
28
+ export declare const submitSurveyResponseForTempParticipantRequest: (payload: SurveyResponseReq) => Promise<import("axios").AxiosResponse<any, any>>;
29
+ export declare const assumeTempParticipantReq: (payload: ConvertTempParticipantReq) => Promise<import("axios").AxiosResponse<any, any>>;
@@ -0,0 +1,37 @@
1
+ import { Profile, User } from "./user";
2
+ export interface SignupMsg {
3
+ email: string;
4
+ password: string;
5
+ instanceId: string;
6
+ infoCheck: string;
7
+ preferredLanguage: string;
8
+ wantsNewsletter: boolean;
9
+ use2fa: boolean;
10
+ }
11
+ export interface LoginMsg {
12
+ email: string;
13
+ password: string;
14
+ instanceId: string;
15
+ verificationCode?: string;
16
+ }
17
+ export interface LoginResponse {
18
+ token: TokenResponse;
19
+ user: User;
20
+ secondFactorNeeded: boolean;
21
+ }
22
+ export interface TokenResponse {
23
+ accessToken: string;
24
+ refreshToken: string;
25
+ expiresIn: number;
26
+ profiles: Profile[];
27
+ selectedProfileId: string;
28
+ preferredLanguage: string;
29
+ }
30
+ export interface AutoTokenValidationResponse {
31
+ accountId: string;
32
+ verificationCode: string;
33
+ isSameUser: boolean;
34
+ }
35
+ export interface PasswordResetInfos {
36
+ accountId: string;
37
+ }
@@ -0,0 +1,5 @@
1
+ export interface ServiceStatus {
2
+ status?: string;
3
+ msg?: string;
4
+ apiVersion?: string;
5
+ }