@influenzanet/case-web-app-core 2.7.4-staging.3 → 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 +15 -12
- package/build/index.es.js.map +1 -1
- package/build/index.js +15 -12
- package/build/index.js.map +1 -1
- package/package.json +3 -3
package/build/index.es.js
CHANGED
|
@@ -16013,6 +16013,8 @@ class ModalManager {
|
|
|
16013
16013
|
|
|
16014
16014
|
}
|
|
16015
16015
|
|
|
16016
|
+
var ModalManager$1 = ModalManager;
|
|
16017
|
+
|
|
16016
16018
|
const resolveContainerRef = (ref, document) => {
|
|
16017
16019
|
if (!canUseDOM) return null;
|
|
16018
16020
|
if (ref == null) return (document || ownerDocument()).body;
|
|
@@ -16051,7 +16053,7 @@ function _objectWithoutPropertiesLoose$4(source, excluded) { if (source == null)
|
|
|
16051
16053
|
let manager;
|
|
16052
16054
|
|
|
16053
16055
|
function getManager(window) {
|
|
16054
|
-
if (!manager) manager = new ModalManager({
|
|
16056
|
+
if (!manager) manager = new ModalManager$1({
|
|
16055
16057
|
ownerDocument: window == null ? void 0 : window.document
|
|
16056
16058
|
});
|
|
16057
16059
|
return manager;
|
|
@@ -16284,7 +16286,7 @@ const Modal = /*#__PURE__*/forwardRef$2((_ref, ref) => {
|
|
|
16284
16286
|
});
|
|
16285
16287
|
Modal.displayName = 'Modal';
|
|
16286
16288
|
var BaseModal = Object.assign(Modal, {
|
|
16287
|
-
Manager: ModalManager
|
|
16289
|
+
Manager: ModalManager$1
|
|
16288
16290
|
});
|
|
16289
16291
|
|
|
16290
16292
|
/**
|
|
@@ -16335,7 +16337,7 @@ const Selector = {
|
|
|
16335
16337
|
STICKY_CONTENT: '.sticky-top',
|
|
16336
16338
|
NAVBAR_TOGGLER: '.navbar-toggler'
|
|
16337
16339
|
};
|
|
16338
|
-
class BootstrapModalManager extends ModalManager {
|
|
16340
|
+
class BootstrapModalManager extends ModalManager$1 {
|
|
16339
16341
|
adjustAndStore(prop, element, adjust) {
|
|
16340
16342
|
const actual = element.style[prop];
|
|
16341
16343
|
// TODO: DOMStringMap and CSSStyleDeclaration aren't strictly compatible
|
|
@@ -26360,17 +26362,18 @@ var SurveyPage = function (props) {
|
|
|
26360
26362
|
|
|
26361
26363
|
var Pages = function (props) {
|
|
26362
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);
|
|
26363
26367
|
if (!props.config) {
|
|
26364
|
-
|
|
26365
|
-
return jsx("div", __assign({ className: clsx(containerClassName, 'my-3') }, { children: jsx(LoadingPlaceholder, { color: 'secondary', minHeight: '60vh' }, void 0) }), void 0);
|
|
26368
|
+
return loadingDiv;
|
|
26366
26369
|
}
|
|
26367
26370
|
var notFoundRoute = props.defaultRoutes.notFound ? props.defaultRoutes.notFound : (isAuth ? props.defaultRoutes.auth : props.defaultRoutes.unauth);
|
|
26368
|
-
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) {
|
|
26369
|
-
|
|
26370
|
-
|
|
26371
|
-
|
|
26372
|
-
|
|
26373
|
-
|
|
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));
|
|
26374
26377
|
};
|
|
26375
26378
|
|
|
26376
26379
|
function _typeof$3(obj) {
|
|
@@ -30407,7 +30410,7 @@ var AppCore = function (props) {
|
|
|
30407
30410
|
console.log("Changing language to: ".concat(code));
|
|
30408
30411
|
i18n.changeLanguage(code);
|
|
30409
30412
|
};
|
|
30410
|
-
return (jsxs(q, { children: [jsx(LocalStorage, {}, void 0), jsxs(BrowserRouter, __assign({ basename: process.env.NODE_ENV === 'production' ? process.env.PUBLIC_URL : undefined }, { children: [jsx(ScrollToTop, {}, void 0), props.customHeader ? props.customHeader : null, !props.hideDefaultHeader ? jsx(HeaderRenderer, { config: props.headerConfig, onChangeLanguage: handleLanguageChange, onOpenExternalPage: handleOpenExternalPage }, void 0) : null, jsx(Navbar, { loading: props.navbarConfig === undefined, content: props.navbarConfig, onOpenExternalPage: handleOpenExternalPage }, void 0), jsx(
|
|
30413
|
+
return (jsxs(q, { children: [jsx(LocalStorage, {}, void 0), jsxs(BrowserRouter, __assign({ basename: process.env.NODE_ENV === 'production' ? process.env.PUBLIC_URL : undefined }, { children: [jsx(ScrollToTop, {}, void 0), props.customHeader ? props.customHeader : null, !props.hideDefaultHeader ? jsx(HeaderRenderer, { config: props.headerConfig, onChangeLanguage: handleLanguageChange, onOpenExternalPage: handleOpenExternalPage }, void 0) : null, jsx(Navbar, { loading: props.navbarConfig === undefined, content: props.navbarConfig, onOpenExternalPage: handleOpenExternalPage }, void 0), jsx(Pages, { config: props.pagesConfig, onOpenExternalPage: handleOpenExternalPage, extensions: props.extensions, customResponseComponents: props.customSurveyResponseComponents, dateLocales: props.dateLocales, defaultRoutes: defaultRoutes }, void 0), !props.hideDefaultFooter ? jsx(FooterRenderer, { footerConfig: props.footerConfig, onChangeLanguage: handleLanguageChange, onOpenExternalPage: handleOpenExternalPage }, void 0) : null, props.customFooter ? props.customFooter : null, jsx(GlobalDialogs, { defaultRoutes: defaultRoutes, onChangeLanguage: handleLanguageChange }, void 0)] }), void 0)] }, void 0));
|
|
30411
30414
|
};
|
|
30412
30415
|
|
|
30413
30416
|
var InternalNavigator = function (props) {
|