@influenzanet/case-web-app-core 2.7.4-staging.2 → 2.7.4-staging.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.es.js +10 -9
- package/build/index.es.js.map +1 -1
- package/build/index.js +9 -8
- package/build/index.js.map +1 -1
- package/package.json +3 -3
package/build/index.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
|
-
import React__default$1, { Component, useEffect, useCallback, useRef, useState, useContext as useContext$1, useMemo, useLayoutEffect, useReducer, createContext, forwardRef as forwardRef$2, useImperativeHandle, createElement } from 'react';
|
|
3
|
+
import React__default$1, { Component, useEffect, useCallback, useRef, useState, useContext as useContext$1, useMemo, useLayoutEffect, useReducer, createContext, forwardRef as forwardRef$2, useImperativeHandle, createElement, Suspense } from 'react';
|
|
4
4
|
import { LoadingPlaceholder, SimpleHeader, Footer, Avatar, containerClassName, ChevronUp, ChevronDown, Dialog, defaultDialogPaddingXClass, Checkbox, AlertBox, TextField, DialogBtn, useFetchTextFile, TextLink, ConsentDialog, ConfirmDialog, SelectField, MarkdownRenderer, AvatarSelector, EditBtn, SurveyList as SurveyList$1, getExternalOrLocalContentURL, ReportList as ReportList$1, TitleBar, ComposedLineAndScatterChartLoader, MapWithTimeSliderLoader, LinkList, handleOpenExternalPage, LogoCredits, SimpleCard, AccordionList, LoginCard, VideoPlayer, ImageContainer, ActionCard, ImageCard, TeaserImage, MarkdownLoader, getLocalizedString, SurveyView } from 'case-web-ui';
|
|
5
5
|
import { useTranslation, Trans, initReactI18next } from 'react-i18next';
|
|
6
6
|
import { useSelector, useDispatch } from 'react-redux';
|
|
@@ -26362,17 +26362,18 @@ var SurveyPage = function (props) {
|
|
|
26362
26362
|
|
|
26363
26363
|
var Pages = function (props) {
|
|
26364
26364
|
var isAuth = useIsAuthenticated();
|
|
26365
|
+
// Loading page:
|
|
26366
|
+
var loadingDiv = jsx("div", __assign({ className: clsx(containerClassName, 'my-3') }, { children: jsx(LoadingPlaceholder, { className: 'loading-page', color: 'secondary', minHeight: '60vh' }, void 0) }), void 0);
|
|
26365
26367
|
if (!props.config) {
|
|
26366
|
-
|
|
26367
|
-
return jsx("div", __assign({ className: clsx(containerClassName, 'my-3') }, { children: jsx(LoadingPlaceholder, { color: 'secondary', minHeight: '60vh' }, void 0) }), void 0);
|
|
26368
|
+
return loadingDiv;
|
|
26368
26369
|
}
|
|
26369
26370
|
var notFoundRoute = props.defaultRoutes.notFound ? props.defaultRoutes.notFound : (isAuth ? props.defaultRoutes.auth : props.defaultRoutes.unauth);
|
|
26370
|
-
return (jsx("div", { children: jsxs(Switch, { children: [jsx(Redirect, { from: "/", exact: true, to: isAuth ? props.defaultRoutes.auth : props.defaultRoutes.unauth }, void 0), props.config.pages.map(function (pageConfig) {
|
|
26371
|
-
|
|
26372
|
-
|
|
26373
|
-
|
|
26374
|
-
|
|
26375
|
-
|
|
26371
|
+
return (jsx(Suspense, __assign({ fallback: loadingDiv }, { children: jsx("div", { children: jsxs(Switch, { children: [jsx(Redirect, { from: "/", exact: true, to: isAuth ? props.defaultRoutes.auth : props.defaultRoutes.unauth }, void 0), props.config.pages.map(function (pageConfig) {
|
|
26372
|
+
return jsx(RouteToLayout, { path: pageConfig.path, pageConfig: pageConfig, defaultRoutes: props.defaultRoutes, extensions: props.extensions, dateLocales: props.dateLocales }, pageConfig.path);
|
|
26373
|
+
}), jsx(Route, { path: props.defaultRoutes.surveyPage + '/:studyKey', render: function () { return jsx(SurveyPage, { customResponseComponents: props.customResponseComponents, dateLocales: props.dateLocales, urls: {
|
|
26374
|
+
finishedFlowWithLogin: props.defaultRoutes.auth,
|
|
26375
|
+
finishedFlowWithoutLogin: props.defaultRoutes.unauth
|
|
26376
|
+
} }, void 0); } }, void 0), jsx(Route, { path: linkResolverRootUrl, render: function () { return jsx(LinkResolver, { defaultRoutes: props.defaultRoutes }, void 0); } }, void 0), jsx(Redirect, { to: notFoundRoute }, void 0)] }, void 0) }, void 0) }), void 0));
|
|
26376
26377
|
};
|
|
26377
26378
|
|
|
26378
26379
|
function _typeof$3(obj) {
|