@beinformed/ui 1.20.1 → 1.20.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/CHANGELOG.md +21 -0
- package/esm/constants/Constants.js +0 -15
- package/esm/constants/Constants.js.map +1 -1
- package/esm/constants/Settings.js +6 -0
- package/esm/constants/Settings.js.map +1 -1
- package/esm/hooks/useAuthentication.js +41 -5
- package/esm/hooks/useAuthentication.js.map +1 -1
- package/esm/i18n/translations/beinformed_error_messages_en.nl.js +3 -2
- package/esm/i18n/translations/beinformed_error_messages_en.nl.js.map +1 -1
- package/esm/i18n/translations/beinformed_error_messages_nl.nl.js +4 -3
- package/esm/i18n/translations/beinformed_error_messages_nl.nl.js.map +1 -1
- package/esm/models/application/ApplicationModel.js +6 -1
- package/esm/models/application/ApplicationModel.js.map +1 -1
- package/esm/redux/_modularui/actions.js +1 -1
- package/esm/redux/_modularui/actions.js.map +1 -1
- package/esm/redux/actions/Authorization.js +5 -9
- package/esm/redux/actions/Authorization.js.map +1 -1
- package/esm/redux/actions/Error.js +3 -1
- package/esm/redux/actions/Error.js.map +1 -1
- package/esm/redux/actions/SignIn.js +7 -0
- package/esm/redux/actions/SignIn.js.map +1 -1
- package/esm/redux/types.js.map +1 -1
- package/lib/constants/Constants.js +2 -20
- package/lib/constants/Constants.js.flow +0 -15
- package/lib/constants/Constants.js.map +1 -1
- package/lib/constants/Settings.js +6 -0
- package/lib/constants/Settings.js.flow +9 -0
- package/lib/constants/Settings.js.map +1 -1
- package/lib/hooks/useAuthentication.js +49 -5
- package/lib/hooks/useAuthentication.js.flow +42 -3
- package/lib/hooks/useAuthentication.js.map +1 -1
- package/lib/i18n/translations/beinformed_error_messages_en.nl.js +3 -2
- package/lib/i18n/translations/beinformed_error_messages_en.nl.js.flow +3 -2
- package/lib/i18n/translations/beinformed_error_messages_en.nl.js.map +1 -1
- package/lib/i18n/translations/beinformed_error_messages_nl.nl.js +4 -3
- package/lib/i18n/translations/beinformed_error_messages_nl.nl.js.flow +4 -3
- package/lib/i18n/translations/beinformed_error_messages_nl.nl.js.map +1 -1
- package/lib/models/application/ApplicationModel.js +7 -1
- package/lib/models/application/ApplicationModel.js.flow +7 -1
- package/lib/models/application/ApplicationModel.js.map +1 -1
- package/lib/redux/_modularui/actions.js +1 -1
- package/lib/redux/_modularui/actions.js.flow +1 -4
- package/lib/redux/_modularui/actions.js.map +1 -1
- package/lib/redux/actions/Authorization.js +7 -12
- package/lib/redux/actions/Authorization.js.flow +4 -16
- package/lib/redux/actions/Authorization.js.map +1 -1
- package/lib/redux/actions/Error.js +4 -1
- package/lib/redux/actions/Error.js.flow +3 -1
- package/lib/redux/actions/Error.js.map +1 -1
- package/lib/redux/actions/SignIn.js +12 -2
- package/lib/redux/actions/SignIn.js.flow +11 -2
- package/lib/redux/actions/SignIn.js.map +1 -1
- package/lib/redux/actions/__tests__/Authorization.spec.js.flow +4 -18
- package/lib/redux/types.js.flow +2 -2
- package/lib/redux/types.js.map +1 -1
- package/package.json +18 -18
- package/src/constants/Constants.js +0 -15
- package/src/constants/Settings.js +9 -0
- package/src/hooks/useAuthentication.js +42 -3
- package/src/i18n/translations/beinformed_error_messages_en.nl.js +3 -2
- package/src/i18n/translations/beinformed_error_messages_nl.nl.js +4 -3
- package/src/models/application/ApplicationModel.js +7 -1
- package/src/redux/_modularui/actions.js +1 -4
- package/src/redux/actions/Authorization.js +4 -16
- package/src/redux/actions/Error.js +3 -1
- package/src/redux/actions/SignIn.js +11 -2
- package/src/redux/actions/__tests__/Authorization.spec.js +4 -18
- package/src/redux/types.js +2 -2
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { LOGIN_PATH, NOTIFICATION_TYPES } from "../../constants/Constants";
|
|
2
1
|
import ErrorResponse from "../../models/error/ErrorResponse";
|
|
3
2
|
import { replace } from "../_router/actions";
|
|
4
3
|
import { logoutSuccess } from "./SignOut";
|
|
5
|
-
import { showNotification } from "./Notification";
|
|
6
4
|
import Cache from "../../utils/browser/Cache";
|
|
7
5
|
import { removeModelByKey } from "../_modularui/actions";
|
|
8
6
|
import { getApplication } from "../_modularui/selectors";
|
|
9
7
|
import { reloadApplication } from "./Application";
|
|
10
8
|
import { getSetting } from "../../constants";
|
|
11
|
-
|
|
9
|
+
import { sendAuthenticationError } from "./SignIn";
|
|
12
10
|
/**
|
|
13
11
|
*/
|
|
12
|
+
|
|
14
13
|
export var handleUnauthorized = function handleUnauthorized(errorResponse) {
|
|
15
14
|
return function (dispatch, getState) {
|
|
16
15
|
var _errorResponse$respon;
|
|
@@ -29,22 +28,19 @@ export var handleUnauthorized = function handleUnauthorized(errorResponse) {
|
|
|
29
28
|
|
|
30
29
|
if (Cache.getItem("auth") || application !== null && application !== void 0 && application.isLoggedIn) {
|
|
31
30
|
dispatch(reloadApplication());
|
|
32
|
-
} // set logged
|
|
31
|
+
} // set logged out
|
|
33
32
|
|
|
34
33
|
|
|
35
34
|
dispatch(logoutSuccess());
|
|
36
35
|
Cache.removeItem("auth");
|
|
37
36
|
|
|
38
37
|
if (errorResponse.isInvalidUsername) {
|
|
39
|
-
|
|
40
|
-
dispatch(showNotification(NOTIFICATION_TYPES.WARNING, {
|
|
41
|
-
id: errorResponse.id,
|
|
42
|
-
defaultMessage: errorResponse.message
|
|
43
|
-
}, null, WARNING_TIMEOUT));
|
|
38
|
+
dispatch(sendAuthenticationError(errorResponse.message));
|
|
44
39
|
} // add current location as from location before redirect
|
|
45
40
|
|
|
46
41
|
|
|
47
42
|
var location = getState().router.location;
|
|
43
|
+
var LOGIN_PATH = getSetting("LOGIN_PATH", "/signin");
|
|
48
44
|
|
|
49
45
|
if ((location === null || location === void 0 ? void 0 : location.pathname) !== LOGIN_PATH) {
|
|
50
46
|
var _location$state;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Authorization.js","names":["
|
|
1
|
+
{"version":3,"file":"Authorization.js","names":["ErrorResponse","replace","logoutSuccess","Cache","removeModelByKey","getApplication","reloadApplication","getSetting","sendAuthenticationError","handleUnauthorized","errorResponse","dispatch","getState","connectKey","response","error","window","location","reload","application","getItem","isLoggedIn","removeItem","isInvalidUsername","message","router","LOGIN_PATH","pathname","locationFrom","state","from","modal","type"],"sources":["../../../src/redux/actions/Authorization.js"],"sourcesContent":["// @flow\nimport ErrorResponse from \"../../models/error/ErrorResponse\";\n\nimport { replace } from \"../_router/actions\";\nimport { logoutSuccess } from \"./SignOut\";\n\nimport Cache from \"../../utils/browser/Cache\";\n\nimport { removeModelByKey } from \"../_modularui/actions\";\nimport { getApplication } from \"../_modularui/selectors\";\nimport { reloadApplication } from \"./Application\";\n\nimport { getSetting } from \"../../constants\";\n\nimport type { ThunkAction } from \"../types\";\nimport { sendAuthenticationError } from \"./SignIn\";\n\n/**\n */\nexport const handleUnauthorized =\n (errorResponse: ErrorResponse): ThunkAction =>\n (dispatch, getState) => {\n if (errorResponse.connectKey) {\n dispatch(removeModelByKey(errorResponse.connectKey));\n }\n\n if (\n getSetting(\"PAGE_RELOAD_ON_UNAUTHORIZED_ERROR\", false) &&\n errorResponse.response?.error\n ) {\n window.location.reload();\n return;\n }\n\n // reload application when flag auth is set or isLogged\n const application = getApplication(getState());\n if (Cache.getItem(\"auth\") || application?.isLoggedIn) {\n dispatch(reloadApplication());\n }\n\n // set logged out\n dispatch(logoutSuccess());\n\n Cache.removeItem(\"auth\");\n\n if (errorResponse.isInvalidUsername) {\n dispatch(sendAuthenticationError(errorResponse.message));\n }\n\n // add current location as from location before redirect\n const location = getState().router.location;\n const LOGIN_PATH = getSetting(\"LOGIN_PATH\", \"/signin\");\n if (location?.pathname !== LOGIN_PATH) {\n const locationFrom = location?.state?.from;\n return dispatch(\n replace(LOGIN_PATH, {\n from: locationFrom ? locationFrom : getState().router.location,\n // cannot open login in a modal, because of previous locations that might be secure\n modal: false,\n })\n );\n }\n\n return { type: \"NO_ACTION\" };\n };\n"],"mappings":"AACA,OAAOA,aAAP,MAA0B,kCAA1B;AAEA,SAASC,OAAT,QA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AI,CAAAU,QAAQ,SAAR,IAAAA,QAAQ,WAAR,YAAAA,QAAQ,CAAEU,QAAV,MAAuBD,UAA3B,EAAuC;MAAA;;MACrC,IAAME,YAAY,GAAGX,QAAH,aAAGA,QAAH,0CAAGA,QAAQ,CAAEY,KAAb,oDAAG,gBAAiBC,IAAtC;MACA,OAAOnB,QAAQ,CACbV,OAAO,CAACyB,UAAD,EAAa;QAClBI,IAAI,EAAEF,YAAY,GAAGA,YAAH,GAAkBhB,QAAQ,GAAGa,MAAX,CAAkBR,QADpC;QAElB;QACAc,KAAK,EAAE;MAHW,CAAb,CADM,CAAf;IAOD;;IAED,OAAO;MAAEC,IAAI,EAAE;IAAR,CAAP;EACD,CA5CD;AAAA,CADK"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IS_SERVER } from "../../constants/Constants";
|
|
2
|
+
import { getSetting } from "../../constants/Settings";
|
|
2
3
|
import ErrorResponse from "../../models/error/ErrorResponse";
|
|
3
4
|
import { push } from "../_router/actions";
|
|
4
5
|
import { showXHRErrorNotification } from "./Notification";
|
|
@@ -31,6 +32,7 @@ var defaultErrorResponseHandler = function defaultErrorResponseHandler(error) {
|
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
if (error.isBlocked || error.isConcurrentUser) {
|
|
35
|
+
var LOGOUT_PATH = getSetting("LOGOUT_PATH", "/signout");
|
|
34
36
|
dispatch(push(LOGOUT_PATH));
|
|
35
37
|
}
|
|
36
38
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Error.js","names":["
|
|
1
|
+
{"version":3,"file":"Error.js","names":["IS_SERVER","getSetting","ErrorResponse","push","showXHRErrorNotification","resetProgress","changePassword","handleUnauthorized","saveError","error","type","payload","defaultErrorResponseHandler","dispatch","isResourceNotFoundAfterReload","isRemoteServiceException","isUnauthorized","isBlocked","isConcurrentUser","LOGOUT_PATH","isChangePassword","setTimeout","customErrorResponseHandler","errorResponse","defaultHandler","setCustomErrorResponseHandler","handler","handleError"],"sources":["../../../src/redux/actions/Error.js"],"sourcesContent":["// @flow\nimport { IS_SERVER } from \"../../constants/Constants\";\nimport { getSetting } from \"../../constants/Settings\";\n\nimport ErrorResponse from \"../../models/error/ErrorResponse\";\n\nimport { push } from \"../_router/actions\";\nimport { showXHRErrorNotification } from \"./Notification\";\nimport { resetProgress } from \"./ProgressIndicator\";\nimport { changePassword } from \"./SignIn\";\nimport { handleUnauthorized } from \"./Authorization\";\n\nimport type { FetchException } from \"../../exceptions\";\nimport type { Dispatch, SaveErrorAction, ThunkAction } from \"../types\";\n\ntype DefaultErrorResponseHandler = (error: ErrorResponse) => ThunkAction;\ntype CustomErrorResponseHandler = (\n errorResponse: ErrorResponse,\n defaultHandler: DefaultErrorResponseHandler\n) => ThunkAction;\n\n/**\n */\nconst saveError = (error): SaveErrorAction => ({\n type: \"SAVE_ERROR\",\n payload: error,\n});\n\n/**\n */\nconst defaultErrorResponseHandler: DefaultErrorResponseHandler =\n (error: ErrorResponse): ThunkAction =>\n (dispatch: Dispatch) => {\n if (error.isResourceNotFoundAfterReload || error.isRemoteServiceException) {\n return dispatch({ type: \"NO_ACTION\" });\n }\n\n if (error.isUnauthorized) {\n return dispatch(handleUnauthorized(error));\n }\n\n if (error.isBlocked || error.isConcurrentUser) {\n const LOGOUT_PATH = getSetting(\"LOGOUT_PATH\", \"/signout\");\n dispatch(push(LOGOUT_PATH));\n }\n\n if (error.isChangePassword) {\n return dispatch(changePassword());\n }\n\n if (IS_SERVER) {\n return dispatch(saveError(error));\n }\n\n setTimeout(() => {\n throw error;\n });\n\n return dispatch(showXHRErrorNotification(error));\n };\n\n/**\n * Standard Custom error response, acts as a proxy and can be overwritten by {@link setCustomErrorResponseHandler}\n */\nlet customErrorResponseHandler: CustomErrorResponseHandler =\n (errorResponse, defaultHandler) => (dispatch: Dispatch) =>\n dispatch(defaultHandler(errorResponse));\n\n/**\n * Set a custom error response handler,\n * can be used when custom functionality is needed on certain (error) response\n * of the modular ui, for example when custom logic is needed when a user is unauthorized<br>\n * It receives an {@link ErrorResponse} and the {@link defaultErrorResponseHandler}\n */\nexport const setCustomErrorResponseHandler = (\n handler: CustomErrorResponseHandler\n) => {\n customErrorResponseHandler = handler;\n};\n\n/**\n * Handle errors by sending an error notification message\n */\nexport const handleError =\n (error: Error | FetchException): ThunkAction =>\n (dispatch: Dispatch) => {\n dispatch(resetProgress());\n\n const errorResponse = new ErrorResponse(error);\n\n return dispatch(\n customErrorResponseHandler(errorResponse, defaultErrorResponseHandler)\n );\n };\n"],"mappings":"AACA,SAASA,SAAT,QAA0B,2BAA1B;AACA,SAASC,UAAT,QAA2B,0BAA3B;AAEA,OAAOC,aAAP,MAA0B,kCAA1B;AAEA,SAASC,IAAT,QAAqB,oBAArB;AACA,SAASC,wBAAT,QAAyC,gBAAzC;AACA,SAASC,aAAT,QAA8B,qBAA9B;AACA,SAASC,cAAT,QAA+B,UAA/B;AACA,SAASC,kBAAT,QAAmC,iBAAnC;;AAWA;AACA;AACA,IAAMC,SAAS,GAAG,SAAZA,SAAY,CAACC,KAAD;EAAA,OAA6B;IAC7CC,IAAI,EAAE,YADuC;IAE7CC,OAAO,EAAEF;EAFoC,CAA7B;AAAA,CAAlB;AAKA;AACA;;;AACA,IAAMG,2BAAwD,GAC5D,SADIA,2BACJ,CAACH,KAAD;EAAA,OACA,UAACI,QAAD,EAAwB;IACtB,IAAIJ,KAAK,CAACK,6BAAN,IAAuCL,KAAK,CAACM,wBAAjD,EAA2E;MACzE,OAAOF,QAAQ,CAAC;QAAEH,IAAI,EAAE;MAAR,CAAD,CAAf;IACD;;IAED,IAAID,KAAK,CAACO,cAAV,EAA0B;MACxB,OAAOH,QAAQ,CAACN,kBAAkB,CAACE,KAAD,CAAnB,CAAf;IACD;;IAED,IAAIA,KAAK,CAACQ,SAAN,IAAmBR,KAAK,CAACS,gBAA7B,EAA+C;MAC7C,IAAMC,WAAW,GAAGlB,UAAU,CAAC,aAAD,EAAgB,UAAhB,CAA9B;MACAY,QAAQ,CAACV,IAAI,CAACgB,WAAD,CAAL,CAAR;IACD;;IAED,IAAIV,KAAK,CAACW,gBAAV,EAA4B;MAC1B,OAAOP,QAAQ,CAACP,cAAc,EAAf,CAAf;IACD;;IAED,IAAIN,SAAJ,EAAe;MACb,OAAOa,QAAQ,CAACL,SAAS,CAACC,KAAD,CAAV,CAAf;IACD;;IAEDY,UAAU,CAAC,YAAM;MACf,MAAMZ,KAAN;IACD,CAFS,CAAV;IAIA,OAAOI,QAAQ,CAACT,wBAAwB,CAACK,KAAD,CAAzB,CAAf;EACD,CA5BD;AAAA,CADF;AA+BA;AACA;AACA;;;AACA,IAAIa,0BAAsD,GACxD,oCAACC,aAAD,EAAgBC,cAAhB;EAAA,OAAmC,UAACX,QAAD;IAAA,OACjCA,QAAQ,CAACW,cAAc,CAACD,aAAD,CAAf,CADyB;EAAA,CAAnC;AAAA,CADF;AAIA;AACA;AACA;AACA;AACA;AACA;;;AACA,OAAO,IAAME,6BAA6B,GAAG,SAAhCA,6BAAgC,CAC3CC,OAD2C,EAExC;EACHJ,0BAA0B,GAAGI,OAA7B;AACD,CAJM;AAMP;AACA;AACA;;AACA,OAAO,IAAMC,WAAW,GACtB,SADWA,WACX,CAAClB,KAAD;EAAA,OACA,UAACI,QAAD,EAAwB;IACtBA,QAAQ,CAACR,aAAa,EAAd,CAAR;IAEA,IAAMkB,aAAa,GAAG,IAAIrB,aAAJ,CAAkBO,KAAlB,CAAtB;IAEA,OAAOI,QAAQ,CACbS,0BAA0B,CAACC,aAAD,EAAgBX,2BAAhB,CADb,CAAf;EAGD,CATD;AAAA,CADK"}
|
|
@@ -10,6 +10,13 @@ import { CHANGEPASSWORD_PATH } from "../../constants/Constants";
|
|
|
10
10
|
* Send login failed action
|
|
11
11
|
*/
|
|
12
12
|
export var loginFailed = function loginFailed(errorMessage) {
|
|
13
|
+
return sendAuthenticationError(errorMessage);
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Send authentication error action
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
export var sendAuthenticationError = function sendAuthenticationError(errorMessage) {
|
|
13
20
|
return {
|
|
14
21
|
type: "AUTHENTICATION_ERROR",
|
|
15
22
|
payload: errorMessage
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignIn.js","names":["Cache","Authenticate","reloadApplication","startProgress","finishProgress","push","CHANGEPASSWORD_PATH","loginFailed","errorMessage","type","payload","resetAuthErrors","loginSuccess","changePassword","dispatch","getState","isModal","router","location","state","modal","locationFrom","from","login","username","password","then","addItem","catch","error","id","dispatchedReloadApplication","resolve"],"sources":["../../../src/redux/actions/SignIn.js"],"sourcesContent":["// @flow\nimport Cache from \"../../utils/browser/Cache\";\nimport Authenticate from \"../../modularui/Authenticate\";\n\nimport { reloadApplication } from \"./Application\";\n\nimport { startProgress, finishProgress } from \"./ProgressIndicator\";\nimport { push } from \"../_router/actions\";\nimport { CHANGEPASSWORD_PATH } from \"../../constants/Constants\";\n\nimport type {\n
|
|
1
|
+
{"version":3,"file":"SignIn.js","names":["Cache","Authenticate","reloadApplication","startProgress","finishProgress","push","CHANGEPASSWORD_PATH","loginFailed","errorMessage","sendAuthenticationError","type","payload","resetAuthErrors","loginSuccess","changePassword","dispatch","getState","isModal","router","location","state","modal","locationFrom","from","login","username","password","then","addItem","catch","error","id","dispatchedReloadApplication","resolve"],"sources":["../../../src/redux/actions/SignIn.js"],"sourcesContent":["// @flow\nimport Cache from \"../../utils/browser/Cache\";\nimport Authenticate from \"../../modularui/Authenticate\";\n\nimport { reloadApplication } from \"./Application\";\n\nimport { startProgress, finishProgress } from \"./ProgressIndicator\";\nimport { push } from \"../_router/actions\";\nimport { CHANGEPASSWORD_PATH } from \"../../constants/Constants\";\n\nimport type {\n SendAuthenticationErrorAction,\n ResetAuthErrorsAction,\n LoginSuccessAction,\n ThunkAction,\n} from \"../types\";\n\n/**\n * Send login failed action\n */\nexport const loginFailed = (\n errorMessage: string\n): SendAuthenticationErrorAction => sendAuthenticationError(errorMessage);\n\n/**\n * Send authentication error action\n */\nexport const sendAuthenticationError = (\n errorMessage: string\n): SendAuthenticationErrorAction => ({\n type: \"AUTHENTICATION_ERROR\",\n payload: errorMessage,\n});\n\n/**\n * Resets any authentication errors\n */\nexport const resetAuthErrors = (): ResetAuthErrorsAction => ({\n type: \"AUTHENTICATION_RESET_ERRORS\",\n});\n\n/**\n * Send login success action\n */\nexport const loginSuccess = (): LoginSuccessAction => ({\n type: \"AUTHENTICATION_SUCCESS\",\n});\n\n/**\n * Send change password action\n */\nexport const changePassword = (): ThunkAction => (dispatch, getState) => {\n dispatch({\n type: \"CHANGE_PASSWORD\",\n });\n\n const isModal = getState().router.location?.state?.modal;\n const locationFrom = getState().router.location?.state?.from;\n return dispatch(\n push(CHANGEPASSWORD_PATH, {\n from: locationFrom ? locationFrom : getState().router.location,\n modal: isModal,\n })\n );\n};\n\n/**\n */\nexport const login =\n (username: string, password: string): ThunkAction =>\n (dispatch) => {\n dispatch(startProgress());\n\n return new Authenticate()\n .login(username, password)\n .then(() => dispatch(reloadApplication()))\n .then(() => {\n Cache.addItem(\"auth\", true);\n dispatch(loginSuccess());\n\n return dispatch(finishProgress());\n })\n .catch((error) => {\n if (error.id === \"Error.ChangePasswordRequired\") {\n const dispatchedReloadApplication = dispatch(reloadApplication());\n\n return Promise.resolve(dispatchedReloadApplication).then(() => {\n Cache.addItem(\"auth\", true);\n return dispatch(changePassword());\n });\n }\n\n dispatch(loginFailed(error.id));\n return dispatch(finishProgress());\n });\n };\n"],"mappings":";AACA,OAAOA,KAAP,MAAkB,2BAAlB;AACA,OAAOC,YAAP,MAAyB,8BAAzB;AAEA,SAASC,iBAAT,QAAkC,eAAlC;AAEA,SAASC,aAAT,EAAwBC,cAAxB,QAA8C,qBAA9C;AACA,SAASC,IAAT,QAAqB,oBAArB;AACA,SAASC,mBAAT,QAAoC,2BAApC;;AASA;AACA;AACA;AACA,OAAO,IAAMC,WAAW,GA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CAAR;IAEA,OAAO,IAAIF,YAAJ,GACJuB,KADI,CACEC,QADF,EACYC,QADZ,EAEJC,IAFI,CAEC;MAAA,OAAMZ,QAAQ,CAACb,iBAAiB,EAAlB,CAAd;IAAA,CAFD,EAGJyB,IAHI,CAGC,YAAM;MACV3B,KAAK,CAAC4B,OAAN,CAAc,MAAd,EAAsB,IAAtB;MACAb,QAAQ,CAACF,YAAY,EAAb,CAAR;MAEA,OAAOE,QAAQ,CAACX,cAAc,EAAf,CAAf;IACD,CARI,EASJyB,KATI,CASE,UAACC,KAAD,EAAW;MAChB,IAAIA,KAAK,CAACC,EAAN,KAAa,8BAAjB,EAAiD;QAC/C,IAAMC,2BAA2B,GAAGjB,QAAQ,CAACb,iBAAiB,EAAlB,CAA5C;QAEA,OAAO,SAAQ+B,OAAR,CAAgBD,2BAAhB,EAA6CL,IAA7C,CAAkD,YAAM;UAC7D3B,KAAK,CAAC4B,OAAN,CAAc,MAAd,EAAsB,IAAtB;UACA,OAAOb,QAAQ,CAACD,cAAc,EAAf,CAAf;QACD,CAHM,CAAP;MAID;;MAEDC,QAAQ,CAACR,WAAW,CAACuB,KAAK,CAACC,EAAP,CAAZ,CAAR;MACA,OAAOhB,QAAQ,CAACX,cAAc,EAAf,CAAf;IACD,CArBI,CAAP;EAsBD,CA1BD;AAAA,CADK"}
|
package/esm/redux/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../src/redux/types.js"],"sourcesContent":["// @flow\nimport type { Store, DispatchAPI } from \"redux\";\n\nimport type ErrorResponse from \"../models/error/ErrorResponse\";\n\nimport type FormModel from \"../models/form/FormModel\";\nimport typeof {\n NOTIFICATION_TYPES,\n AUTOSAVE_STATUS,\n} from \"../constants/Constants\";\n\nimport type { MessageObject } from \"../i18n/types\";\nimport type {\n I18nState,\n UpdateLocaleAction,\n SetLocalesAction,\n} from \"./_i18n/types\";\nimport type {\n ModularUIState,\n ModularUIAction,\n UpdateStatusAction,\n SetModelAction,\n UpdateModelAction,\n RemoveModelByKeyAction,\n ResetModularUIAction,\n} from \"./_modularui/types\";\nimport type {\n RouterState,\n LocationChangeAction,\n PushAction,\n ReplaceAction,\n GoAction,\n GoBackAction,\n GoForwardAction,\n} from \"./_router/types\";\n\nexport type PreferenceValue =\n | null\n | string\n | boolean\n | { [key: string]: any }\n | Array<PreferenceValue>;\n\nexport type UpdateFormOptions = {\n autosubmit: boolean,\n autosave: boolean,\n forceUpdate?: boolean,\n /** Default true: Activate/deactivate the form object validate by an update */\n validate?: boolean,\n};\n\nexport type NoAction = {\n type: \"NO_ACTION\",\n};\n\nexport type SaveErrorAction = {\n type: \"SAVE_ERROR\",\n payload: ErrorResponse,\n};\n\nexport type ShowModalAction = {\n type: \"SHOW_MODAL\",\n payload: string,\n};\n\nexport type CloseModalAction = {\n type: \"CLOSE_MODAL\",\n payload: string,\n};\n\nexport type DismissNotificationAction = {\n type: \"DISMISS_NOTIFICATION\",\n};\nexport type ShowNotificationAction = {\n type: \"SHOW_NOTIFICATION\",\n payload: {\n type: $Keys<NOTIFICATION_TYPES>,\n message: MessageObject,\n error: ?ErrorResponse,\n },\n};\n\nexport type SetPreferenceAction = {\n type: \"SET_PREFERENCE\",\n payload: { [name: string]: PreferenceValue },\n};\nexport type SetPreferencesAction = {\n type: \"SET_PREFERENCES\",\n payload: { [name: string]: PreferenceValue },\n};\n\nexport type StartProgressAction = {\n type: \"START_PROGRESS\",\n};\nexport type FinishProgressAction = {\n type: \"FINISH_PROGRESS\",\n};\nexport type ResetProgressAction = {\n type: \"RESET_PROGRESS\",\n};\nexport type UpdateProgressAction = {\n type: \"UPDATE_PROGRESS\",\n payload: { percentComplete: number },\n};\n\nexport type
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../src/redux/types.js"],"sourcesContent":["// @flow\nimport type { Store, DispatchAPI } from \"redux\";\n\nimport type ErrorResponse from \"../models/error/ErrorResponse\";\n\nimport type FormModel from \"../models/form/FormModel\";\nimport typeof {\n NOTIFICATION_TYPES,\n AUTOSAVE_STATUS,\n} from \"../constants/Constants\";\n\nimport type { MessageObject } from \"../i18n/types\";\nimport type {\n I18nState,\n UpdateLocaleAction,\n SetLocalesAction,\n} from \"./_i18n/types\";\nimport type {\n ModularUIState,\n ModularUIAction,\n UpdateStatusAction,\n SetModelAction,\n UpdateModelAction,\n RemoveModelByKeyAction,\n ResetModularUIAction,\n} from \"./_modularui/types\";\nimport type {\n RouterState,\n LocationChangeAction,\n PushAction,\n ReplaceAction,\n GoAction,\n GoBackAction,\n GoForwardAction,\n} from \"./_router/types\";\n\nexport type PreferenceValue =\n | null\n | string\n | boolean\n | { [key: string]: any }\n | Array<PreferenceValue>;\n\nexport type UpdateFormOptions = {\n autosubmit: boolean,\n autosave: boolean,\n forceUpdate?: boolean,\n /** Default true: Activate/deactivate the form object validate by an update */\n validate?: boolean,\n};\n\nexport type NoAction = {\n type: \"NO_ACTION\",\n};\n\nexport type SaveErrorAction = {\n type: \"SAVE_ERROR\",\n payload: ErrorResponse,\n};\n\nexport type ShowModalAction = {\n type: \"SHOW_MODAL\",\n payload: string,\n};\n\nexport type CloseModalAction = {\n type: \"CLOSE_MODAL\",\n payload: string,\n};\n\nexport type DismissNotificationAction = {\n type: \"DISMISS_NOTIFICATION\",\n};\nexport type ShowNotificationAction = {\n type: \"SHOW_NOTIFICATION\",\n payload: {\n type: $Keys<NOTIFICATION_TYPES>,\n message: MessageObject,\n error: ?ErrorResponse,\n },\n};\n\nexport type SetPreferenceAction = {\n type: \"SET_PREFERENCE\",\n payload: { [name: string]: PreferenceValue },\n};\nexport type SetPreferencesAction = {\n type: \"SET_PREFERENCES\",\n payload: { [name: string]: PreferenceValue },\n};\n\nexport type StartProgressAction = {\n type: \"START_PROGRESS\",\n};\nexport type FinishProgressAction = {\n type: \"FINISH_PROGRESS\",\n};\nexport type ResetProgressAction = {\n type: \"RESET_PROGRESS\",\n};\nexport type UpdateProgressAction = {\n type: \"UPDATE_PROGRESS\",\n payload: { percentComplete: number },\n};\n\nexport type SendAuthenticationErrorAction = {\n type: \"AUTHENTICATION_ERROR\",\n payload: string,\n};\n\nexport type ResetAuthErrorsAction = {\n type: \"AUTHENTICATION_RESET_ERRORS\",\n};\n\nexport type LoginSuccessAction = {\n type: \"AUTHENTICATION_SUCCESS\",\n};\n\nexport type ChangePasswordAction = {\n type: \"CHANGE_PASSWORD\",\n};\n\nexport type LogoutSuccessAction = {\n type: \"AUTHENTICATION_LOGOUT\",\n};\n\nexport type UpdateAutosaveAction = {\n type: \"UPDATE_AUTOSAVE_STATUS\",\n payload: {\n status: $Keys<AUTOSAVE_STATUS>,\n model: FormModel,\n },\n};\n\nexport type ReduxAction =\n | UpdateStatusAction\n | SetModelAction\n | UpdateModelAction\n | RemoveModelByKeyAction\n | ResetModularUIAction\n | SaveErrorAction\n | UpdateLocaleAction\n | SetLocalesAction\n | ShowModalAction\n | CloseModalAction\n | DismissNotificationAction\n | ShowNotificationAction\n | SetPreferenceAction\n | SetPreferencesAction\n | StartProgressAction\n | FinishProgressAction\n | ResetProgressAction\n | UpdateProgressAction\n | ResetAuthErrorsAction\n | SendAuthenticationErrorAction\n | LoginSuccessAction\n | ChangePasswordAction\n | LogoutSuccessAction\n | UpdateAutosaveAction\n | LocationChangeAction\n | PushAction\n | ReplaceAction\n | GoAction\n | GoBackAction\n | GoForwardAction\n | ModularUIAction\n | NoAction;\n\n// Redux state\nexport type AuthState = {\n +mustChangePassword: boolean,\n +error: ?string,\n};\n\nexport type ErrorState = null | ErrorResponse;\n\nexport type ModalState = {\n +key: string,\n +visible: boolean,\n +size?: string,\n};\n\nexport type ModalsState = {\n +modals: Array<ModalState>,\n};\n\nexport type NotificationState = {\n +render: boolean,\n +messageType: string | null,\n +message: MessageObject | null,\n +error: ?ErrorResponse | null,\n};\n\nexport type PreferencesState = {\n +[name: string]: PreferenceValue,\n};\n\nexport type ProgressIndicatorState = {\n +count: number,\n +timestamp: number,\n +percentComplete: number,\n};\n\nexport type ReduxState = {\n +router: RouterState,\n +modularui: ModularUIState,\n +i18n: I18nState,\n +auth: AuthState,\n +error: ErrorState,\n +modals: ModalsState,\n +notification: NotificationState,\n +progressindicator: ProgressIndicatorState,\n +preferences: PreferencesState,\n ...\n};\n\nexport type GetState = () => ReduxState;\nexport type ThunkAction = (dispatch: Dispatch, getState: GetState) => any;\nexport type PromiseAction = Promise<PossibleAction>;\nexport type Dispatch = DispatchAPI<PossibleAction>;\nexport type ReduxStore = Store<ReduxState, ReduxAction, Dispatch>;\n\nexport type PossibleAction = ReduxAction | ThunkAction | PromiseAction;\n\nexport type CustomReducers = { [reducerKey: string]: any };\n"],"mappings":""}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.VALIDATE_DEBOUNCE_TIMEOUT = exports.USE_CACHE = exports.USERPROFILE_PATH = exports.UPLOAD_PATH = exports.TIMEVERSION_FILTER_NAME = exports.PARAMETER_SEPARATOR = exports.NOTIFICATION_TYPES = exports.MODULARUI_STATUS = exports.MODULARUI_CONTRIBUTIONS = exports.LOGOUT_PATH_SETTING = exports.
|
|
6
|
+
exports.VALIDATE_DEBOUNCE_TIMEOUT = exports.USE_CACHE = exports.USERPROFILE_PATH = exports.UPLOAD_PATH = exports.TIMEVERSION_FILTER_NAME = exports.PARAMETER_SEPARATOR = exports.NOTIFICATION_TYPES = exports.MODULARUI_STATUS = exports.MODULARUI_CONTRIBUTIONS = exports.LOGOUT_PATH_SETTING = exports.LOGIN_USERNAME_SETTING = exports.LOGIN_TYPE = exports.LOGIN_PATH_SETTING = exports.LOGIN_PASSWORD_SETTING = exports.KEYCODES = exports.IS_SYNC = exports.IS_SERVER = exports.ISO_TIME_FORMAT = exports.ISO_TIMESTAMP_FORMAT = exports.ISO_DATE_FORMAT = exports.ISO_DATETIME_FORMAT = exports.INPUT_DEBOUNCE_TIMEOUT = exports.HTTP_METHODS = exports.DEFAULT_WEEK_STARTS_ON = exports.DEFAULT_UI_PARAMETERS = exports.DEFAULT_FIRST_WEEK_CONTAINS_DATE = exports.CONTENT_PATH = exports.CHANGEPASSWORD_PATH = exports.CAPTCHA_PATH = exports.BASE = exports.AUTOSAVE_STATUS = exports.ATTRIBUTE_WIDTH = exports.APPLICATION_PATH = exports.ALL_CONTENT_IN_DATA_SETTING = void 0;
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Indicates if contributions should be cached
|
|
@@ -56,29 +56,11 @@ var UPLOAD_PATH = "".concat(BASE, "/uploadFile");
|
|
|
56
56
|
|
|
57
57
|
exports.UPLOAD_PATH = UPLOAD_PATH;
|
|
58
58
|
var CAPTCHA_PATH = "".concat(BASE, "/captchaServices");
|
|
59
|
-
/**
|
|
60
|
-
* Path to login page / component
|
|
61
|
-
*/
|
|
62
|
-
|
|
63
|
-
exports.CAPTCHA_PATH = CAPTCHA_PATH;
|
|
64
|
-
var LOGIN_PATH = "/signin";
|
|
65
|
-
/**
|
|
66
|
-
* Path to administrator login page / component
|
|
67
|
-
*/
|
|
68
|
-
|
|
69
|
-
exports.LOGIN_PATH = LOGIN_PATH;
|
|
70
|
-
var ADMINISTRATOR_LOGIN_PATH = "/administrator";
|
|
71
|
-
/**
|
|
72
|
-
* Path to logout page / component
|
|
73
|
-
*/
|
|
74
|
-
|
|
75
|
-
exports.ADMINISTRATOR_LOGIN_PATH = ADMINISTRATOR_LOGIN_PATH;
|
|
76
|
-
var LOGOUT_PATH = "/signout";
|
|
77
59
|
/**
|
|
78
60
|
* Path to change password page / component
|
|
79
61
|
*/
|
|
80
62
|
|
|
81
|
-
exports.
|
|
63
|
+
exports.CAPTCHA_PATH = CAPTCHA_PATH;
|
|
82
64
|
var CHANGEPASSWORD_PATH = "/change-password";
|
|
83
65
|
/**
|
|
84
66
|
* Path to user profile page / component
|
|
@@ -51,21 +51,6 @@ export const UPLOAD_PATH = `${BASE}/uploadFile`;
|
|
|
51
51
|
*/
|
|
52
52
|
export const CAPTCHA_PATH = `${BASE}/captchaServices`;
|
|
53
53
|
|
|
54
|
-
/**
|
|
55
|
-
* Path to login page / component
|
|
56
|
-
*/
|
|
57
|
-
export const LOGIN_PATH = "/signin";
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Path to administrator login page / component
|
|
61
|
-
*/
|
|
62
|
-
export const ADMINISTRATOR_LOGIN_PATH = "/administrator";
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Path to logout page / component
|
|
66
|
-
*/
|
|
67
|
-
export const LOGOUT_PATH = "/signout";
|
|
68
|
-
|
|
69
54
|
/**
|
|
70
55
|
* Path to change password page / component
|
|
71
56
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Constants.js","names":["USE_CACHE","serverBase","__CONTEXT_PATH__","BASE","window","contextPath","MODULARUI_CONTRIBUTIONS","APPLICATION_URI","APPLICATION_PATH","CONTENT_PATH","UPLOAD_PATH","CAPTCHA_PATH","
|
|
1
|
+
{"version":3,"file":"Constants.js","names":["USE_CACHE","serverBase","__CONTEXT_PATH__","BASE","window","contextPath","MODULARUI_CONTRIBUTIONS","APPLICATION_URI","APPLICATION_PATH","CONTENT_PATH","UPLOAD_PATH","CAPTCHA_PATH","CHANGEPASSWORD_PATH","USERPROFILE_PATH","PARAMETER_SEPARATOR","TIMEVERSION_FILTER_NAME","PARAMETER_OVERVIEW_VIEWTYPE","DEFAULT_UI_PARAMETERS","ISO_DATE_FORMAT","ISO_DATETIME_FORMAT","ISO_TIME_FORMAT","ISO_TIMESTAMP_FORMAT","DEFAULT_WEEK_STARTS_ON","DEFAULT_FIRST_WEEK_CONTAINS_DATE","KEYCODES","TAB","ENTER","ESCAPE","SPACE","PAGE_UP","PAGE_DOWN","ARROW_LEFT","ARROW_UP","ARROW_RIGHT","ARROW_DOWN","IS_SYNC","dataFetcher","IS_SERVER","NOTIFICATION_TYPES","SUCCESS","INFO","WARNING","ERROR","HTTP_METHODS","GET","POST","MODULARUI_STATUS","LOADING","FINISHED","AUTOSAVE_STATUS","START","INPUT_DEBOUNCE_TIMEOUT","VALIDATE_DEBOUNCE_TIMEOUT","ATTRIBUTE_WIDTH","EXTRA_SMALL","SMALL","MEDIUM","LARGE","EXTRA_LARGE","ALL_CONTENT_IN_DATA_SETTING","LOGIN_TYPE","LOGIN_PATH_SETTING","LOGIN_USERNAME_SETTING","LOGIN_PASSWORD_SETTING","LOGOUT_PATH_SETTING"],"sources":["../../src/constants/Constants.js"],"sourcesContent":["// @flow\n/**\n * Indicates if contributions should be cached\n */\nexport const USE_CACHE = true;\n\nconst serverBase =\n typeof __CONTEXT_PATH__ === \"undefined\" ? null : __CONTEXT_PATH__;\n\n/**\n * Base path\n * This uses contextPath set from property from server\n * When requesting a remote server with CORS enabled, add the origin, for example:\n * export const BEINFORMED_PATH = 'http://192.168.128.61:8080/BeInformed';\n */\nexport const BASE: string =\n serverBase ??\n (typeof window !== \"undefined\" && window.contextPath\n ? window.contextPath\n : \"/BeInformed\");\n\n/**\n * Path to the contributions api end point\n * /contributions uri part is added through the _links in the data service\n */\nexport const MODULARUI_CONTRIBUTIONS = \"/contributions\";\n\n/**\n * Application uri\n * @private\n */\nconst APPLICATION_URI = \"/\";\n\n/**\n * Base Path\n */\nexport const APPLICATION_PATH: string = BASE + APPLICATION_URI;\n\n/**\n * path to content service\n */\nexport const CONTENT_PATH = `${BASE}/content`;\n\n/**\n * Upload Path\n */\nexport const UPLOAD_PATH = `${BASE}/uploadFile`;\n\n/**\n * Captcha Path\n */\nexport const CAPTCHA_PATH = `${BASE}/captchaServices`;\n\n/**\n * Path to change password page / component\n */\nexport const CHANGEPASSWORD_PATH = \"/change-password\";\n\n/**\n * Path to user profile page / component\n */\nexport const USERPROFILE_PATH = \"/user\";\n\n/**\n * Separator for parameters of a list, makes it possible to render multiple lists on a page in a non-js environment\n */\nexport const PARAMETER_SEPARATOR = \"~\";\n\n/**\n * Timeversion filter name\n */\nexport const TIMEVERSION_FILTER_NAME = \"entryDate\";\n\nconst PARAMETER_OVERVIEW_VIEWTYPE = \"viewType\";\n/**\n * Parameter name for the viewtype toggle\n */\nexport const DEFAULT_UI_PARAMETERS: Array<string> = [\n PARAMETER_OVERVIEW_VIEWTYPE,\n];\n\n/**\n */\nexport const ISO_DATE_FORMAT = \"yyyy-MM-dd\";\n/**\n */\nexport const ISO_DATETIME_FORMAT = \"yyyy-MM-dd'T'HH:mm:ss\";\n/**\n */\nexport const ISO_TIME_FORMAT = \"HH:mm:ss\";\n/**\n */\nexport const ISO_TIMESTAMP_FORMAT = \"yyyy-MM-dd'T'HH:mm:ss.SSS\";\n/**\n * week starts on monday by default\n */\nexport const DEFAULT_WEEK_STARTS_ON = 1;\n\n/**\n * first week indicated by the 1st of january\n */\nexport const DEFAULT_FIRST_WEEK_CONTAINS_DATE = 1;\n\n/**\n * Key codes\n * @type {{SPACE: number, PAGE_DOWN: number, TAB: number, ARROW_RIGHT: number, ARROW_DOWN: number, ENTER: number, ARROW_UP: number, ARROW_LEFT: number, PAGE_UP: number, ESCAPE: number}}\n */\nexport const KEYCODES = {\n TAB: 9,\n ENTER: 13,\n ESCAPE: 27,\n SPACE: 32,\n PAGE_UP: 33,\n PAGE_DOWN: 34,\n ARROW_LEFT: 37,\n ARROW_UP: 38,\n ARROW_RIGHT: 39,\n ARROW_DOWN: 40,\n};\n\n/**\n * @type {boolean}\n */\nexport const IS_SYNC = typeof dataFetcher !== \"undefined\";\n/**\n * @type {boolean}\n */\nexport const IS_SERVER = IS_SYNC;\n\n/**\n * @type {{SUCCESS: string, ERROR: string, INFO: string, WARNING: string}}\n */\nexport const NOTIFICATION_TYPES = {\n SUCCESS: \"SUCCESS\",\n INFO: \"INFO\",\n WARNING: \"WARNING\",\n ERROR: \"ERROR\",\n};\n\n/**\n * SUPPORTED HTTP METHODS\n * @type {{POST: string, GET: string}}\n */\nexport const HTTP_METHODS = {\n GET: \"GET\",\n POST: \"POST\",\n};\n\n/**\n * POSSIBLE MODULARUI STATUSSES\n * @type {{LOADING: string, ERROR: string, FINISHED: string}}\n */\nexport const MODULARUI_STATUS = {\n LOADING: \"LOADING\",\n FINISHED: \"FINISHED\",\n ERROR: \"ERROR\",\n};\n\n/**\n * POSSIBLE AUTOSAVE STATUSSES\n * @type {{START: string, FINISHED: string}}\n */\nexport const AUTOSAVE_STATUS = {\n START: \"START\",\n FINISHED: \"FINISHED\",\n};\n\n/**\n * DEBOUNCE INPUT TIMEOUT\n */\nexport const INPUT_DEBOUNCE_TIMEOUT = 100;\n\n/**\n * DEBOUNCE VALIDATION TIMEOUT\n */\nexport const VALIDATE_DEBOUNCE_TIMEOUT = 500;\n\n/**\n * ATTRIBUTE WIDTH\n */\nexport const ATTRIBUTE_WIDTH = {\n EXTRA_SMALL: \"EXTRA_SMALL\",\n SMALL: \"SMALL\",\n MEDIUM: \"MEDIUM\",\n LARGE: \"LARGE\",\n EXTRA_LARGE: \"EXTRA_LARGE\",\n};\n\nexport const ALL_CONTENT_IN_DATA_SETTING = \"hasAllContentInData\";\n\nexport const LOGIN_TYPE = \"security.clients\";\nexport const LOGIN_PATH_SETTING = \"FormClient.login_url\";\nexport const LOGIN_USERNAME_SETTING = \"FormClient.username_field_name\";\nexport const LOGIN_PASSWORD_SETTING = \"FormClient.password_field_name\";\nexport const LOGOUT_PATH_SETTING = \"FormClient.logout_url\";\n"],"mappings":";;;;;;;AACA;AACA;AACA;AACO,IAAMA,SAAS,GAAG,IAAlB;;AAEP,IAAMC,UAAU,GACd,OAAOC,gBAAP,KAA4B,WAA5B,GAA0C,IAA1C,GAAiDA,gBADnD;AAGA;AACA;AACA;AACA;AACA;AACA;;AACO,IAAMC,IAAY,GACvBF,UADuB,aACvBA,UADuB,cACvBA,UADuB,GAEtB,OAAOG,MAAP,KAAkB,WAAlB,IAAiCA,MAAM,CAACC,WAAxC,GACGD,MAAM,CAACC,WADV,GAEG,aAJC;AAMP;AACA;AACA;AACA;;;AACO,IAAMC,uBAAuB,GAAG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,OAAO,GAAG,OAAOC,WAAP,KAAuB,WAAvC;AACP;AACA;AACA;;;AACO,IAAMC,SAAS,GAAGF,OAAlB;AAEP;AACA;AACA;;;AACO,IAAMG,kBAAkB,GAAG;EAChCC,OAAO,EAAE,SADuB;EAEhCC,IAAI,EAAE,MAF0B;EAGhCC,OAAO,EAAE,SAHuB;EAIhCC,KAAK,EAAE;AAJyB,CAA3B;AAOP;AACA;AACA;AACA;;;AACO,IAAMC,YAAY,GAAG;EAC1BC,GAAG,EAAE,KADqB;EAE1BC,IAAI,EAAE;AAFoB,CAArB;AAKP;AACA;AACA;AACA;;;AACO,IAAMC,gBAAgB,GAAG;EAC9BC,OAAO,EAAE,SADqB;EAE9BC,QAAQ,EAAE,UAFoB;EAG9BN,KAAK,EAAE;AAHuB,CAAzB;AAMP;AACA;AACA;AACA;;;AACO,IAAMO,eAAe,GAAG;EAC7BC,KAAK,EAAE,OADsB;EAE7BF,QAAQ,EAAE;AAFmB,CAAxB;AAKP;AACA;AACA;;;AACO,IAAMG,sBAAsB,GAAG,GAA/B;AAEP;AACA;AACA;;;AACO,IAAMC,yBAAyB,GAAG,GAAlC;AAEP;AACA;AACA;;;AACO,IAAMC,eAAe,GAAG;EAC7BC,WAAW,EAAE,aADgB;EAE7BC,KAAK,EAAE,OAFsB;EAG7BC,MAAM,EAAE,QAHqB;EAI7BC,KAAK,EAAE,OAJsB;EAK7BC,WAAW,EAAE;AALgB,CAAxB;;AAQA,IAAMC,2BAA2B,GAAG,qBAApC;;AAEA,IAAMC,UAAU,GAAG,kBAAnB;;AACA,IAAMC,kBAAkB,GAAG,sBAA3B;;AACA,IAAMC,sBAAsB,GAAG,gCAA/B;;AACA,IAAMC,sBAAsB,GAAG,gCAA/B;;AACA,IAAMC,mBAAmB,GAAG,uBAA5B"}
|
|
@@ -40,6 +40,12 @@ var defaultSettings = {
|
|
|
40
40
|
RENDER_GLOBAL_LOGOUT_PAGE: false,
|
|
41
41
|
// Renders the login variants as option on the global logout page
|
|
42
42
|
RENDER_MULTI_LOGIN_ON_GLOBAL_LOGOUT_PAGE: false,
|
|
43
|
+
// Path to login page / component
|
|
44
|
+
LOGIN_PATH: "/signin",
|
|
45
|
+
// Path to administrator login page / component
|
|
46
|
+
ADMINISTRATOR_LOGIN_PATH: "",
|
|
47
|
+
// Path to logout page / component
|
|
48
|
+
LOGOUT_PATH: "/signout",
|
|
43
49
|
// Render forms in a modal
|
|
44
50
|
RENDER_FORMS_IN_MODAL: true,
|
|
45
51
|
// Wait timeout before rendering submit wait icon
|
|
@@ -51,6 +51,15 @@ const defaultSettings = {
|
|
|
51
51
|
// Renders the login variants as option on the global logout page
|
|
52
52
|
RENDER_MULTI_LOGIN_ON_GLOBAL_LOGOUT_PAGE: false,
|
|
53
53
|
|
|
54
|
+
// Path to login page / component
|
|
55
|
+
LOGIN_PATH: "/signin",
|
|
56
|
+
|
|
57
|
+
// Path to administrator login page / component
|
|
58
|
+
ADMINISTRATOR_LOGIN_PATH: "",
|
|
59
|
+
|
|
60
|
+
// Path to logout page / component
|
|
61
|
+
LOGOUT_PATH: "/signout",
|
|
62
|
+
|
|
54
63
|
// Render forms in a modal
|
|
55
64
|
RENDER_FORMS_IN_MODAL: true,
|
|
56
65
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Settings.js","names":["defaultSettings","DEBUG_I18N_MESSAGE_NOT_FOUND","HIDE_NOTIFICATION_TIMEOUT","ALWAYS_COMMIT_FORM","RENDER_QUESTION_LABELS","RENDER_MANDATORY_ATTRIBUTE_INDICATION","RENDER_OPTIONAL_ATTRIBUTE_INDICATION","AVAILABLE_LIST_VIEWS","USE_CLIENTSIDE_VALIDATION","USE_INSTANT_SERVER_VALIDATION","ENABLED_LOCALES","RENDER_GLOBAL_LOGIN_PAGE","RENDER_GLOBAL_LOGOUT_PAGE","RENDER_MULTI_LOGIN_ON_GLOBAL_LOGOUT_PAGE","RENDER_FORMS_IN_MODAL","SHOW_SUBMIT_WAIT_TIMEOUT","SWIM_LANE_DIAGRAM_CONFIGURATION","BUSINESS_SCENARIO_CONCEPT_TYPE","BUSINESS_SCENARIO_STEP_CONCEPT_TYPE","BUSINESS_SCENARIO_PERSONA_CONCEPT_TYPE","DATE_INPUT_FORMAT","DATE_READONLY_FORMAT","CALENDAR_WEEK_STARTS_ON","CALENDAR_FIRST_WEEK_CONTAINS_DATE","UI_PARAMETERS","ALLOW_HIDE_WHEN_EMPTY_ON_TABS","PAGE_RELOAD_ON_UNAUTHORIZED_ERROR","XHR_TIMEOUT_MS","settings","setSettings","config","isPlainObject","getSetting","key","defaultValue","has","undefined","Error","setSetting","value","allSettings","hasAllContentInData","ALL_CONTENT_IN_DATA_SETTING","loginType","LOGIN_TYPE","loginPath","LOGIN_PATH_SETTING","loginUsernameField","LOGIN_USERNAME_SETTING","loginPasswordField","LOGIN_PASSWORD_SETTING","logoutPath","LOGOUT_PATH_SETTING"],"sources":["../../src/constants/Settings.js"],"sourcesContent":["// @flow\nimport { isPlainObject, has } from \"../utils/helpers/objects\";\nimport {\n ALL_CONTENT_IN_DATA_SETTING,\n LOGIN_TYPE,\n LOGIN_PATH_SETTING,\n LOGIN_USERNAME_SETTING,\n LOGIN_PASSWORD_SETTING,\n LOGOUT_PATH_SETTING,\n} from \"./Constants\";\n\ntype Setting = boolean | string | number | Array<string>;\n\nconst defaultSettings = {\n // Debug missing i18n messages in layout\n DEBUG_I18N_MESSAGE_NOT_FOUND: true,\n\n // Time to show the notification bar\n HIDE_NOTIFICATION_TIMEOUT: 5000,\n\n // Always commit form, does not show result pages for instruments\n ALWAYS_COMMIT_FORM: false,\n\n // Render instrument and event question labels on forms (might result in duplicate labels)\n RENDER_QUESTION_LABELS: true,\n\n // Render mandatory indications on attributes\n RENDER_MANDATORY_ATTRIBUTE_INDICATION: true,\n\n // Render optional indications on attributes\n RENDER_OPTIONAL_ATTRIBUTE_INDICATION: false,\n\n // Renders a toggle with supported list views, options are ListView and TableView\n AVAILABLE_LIST_VIEWS: [\"ListView\", \"TableView\"],\n\n // Toggle client side validation\n USE_CLIENTSIDE_VALIDATION: true,\n\n // Indicates if server validation should be used when a form field is changed\n USE_INSTANT_SERVER_VALIDATION: true,\n\n // Indicates which locales are enabled\n ENABLED_LOCALES: [\"en\", \"nl\"],\n\n // Renders the global log in page\n RENDER_GLOBAL_LOGIN_PAGE: false,\n\n // Renders the global log out page\n RENDER_GLOBAL_LOGOUT_PAGE: false,\n\n // Renders the login variants as option on the global logout page\n RENDER_MULTI_LOGIN_ON_GLOBAL_LOGOUT_PAGE: false,\n\n // Render forms in a modal\n RENDER_FORMS_IN_MODAL: true,\n\n // Wait timeout before rendering submit wait icon\n SHOW_SUBMIT_WAIT_TIMEOUT: 300,\n\n // Swim lane diagram configuration file\n SWIM_LANE_DIAGRAM_CONFIGURATION: \"/Library/Diagrams/Overviews.json\",\n\n // Business scenario concept types\n BUSINESS_SCENARIO_CONCEPT_TYPE: [\n \"/Library/KMTs/Business scenarios.bixml/BusinessScenario\",\n ],\n BUSINESS_SCENARIO_STEP_CONCEPT_TYPE: [\n \"/Library/KMTs/Business scenarios.bixml/ScenarioStep\",\n ],\n BUSINESS_SCENARIO_PERSONA_CONCEPT_TYPE: [\n \"/Library/KMTs/Business scenarios.bixml/Persona\",\n ],\n\n // Input format for dates. Without this setting having a value, the contributions format is used\n DATE_INPUT_FORMAT: \"\",\n\n // Readonly format for dates. Without this setting having a value, the contributions format is used\n DATE_READONLY_FORMAT: \"\",\n\n // indicates on what day the week starts (0 = Sunday)\n CALENDAR_WEEK_STARTS_ON: 1,\n\n // indicates which date indicates the first week of the year\n CALENDAR_FIRST_WEEK_CONTAINS_DATE: 1,\n\n // parameters that are added for the ui state, but should not be send to the modular ui\n UI_PARAMETERS: [],\n\n // disable hide-when-empty hint for layouts running on Be Informed versions older than 21.1\n ALLOW_HIDE_WHEN_EMPTY_ON_TABS: true,\n\n // reload the complete page on signout, usefull when third party authentication is in place\n PAGE_RELOAD_ON_UNAUTHORIZED_ERROR: false,\n\n XHR_TIMEOUT_MS: 300000,\n};\n\nlet settings = defaultSettings;\n\n/**\n */\nexport const setSettings = (config: Object) => {\n if (isPlainObject(config)) {\n settings = Object.assign(defaultSettings, config);\n }\n};\n\n/**\n */\nexport const getSetting = (key: string, defaultValue?: any): any => {\n if (!has(settings, key) && defaultValue === undefined) {\n throw new Error(\n `Setting with name ${key} not found and no defaultValue given`\n );\n }\n\n return settings[key] ?? defaultValue;\n};\n\n/**\n */\nexport const setSetting = (key: string, value: any) => {\n settings[key] = value;\n};\n\n/**\n */\nexport const allSettings = (): { [name: string]: Setting } => settings;\n\n/**\n */\nexport const hasAllContentInData = (): boolean =>\n getSetting(ALL_CONTENT_IN_DATA_SETTING, true);\n\n/**\n * Login type, only available when pac4j is configured\n */\nexport const loginType = (): string => getSetting(LOGIN_TYPE, \"JAAS\");\n\n/**\n */\nexport const loginPath = (): string =>\n getSetting(LOGIN_PATH_SETTING, \"/j_security_check\");\n/**\n */\nexport const loginUsernameField = (): string =>\n getSetting(LOGIN_USERNAME_SETTING, \"j_username\");\n/**\n */\nexport const loginPasswordField = (): string =>\n getSetting(LOGIN_PASSWORD_SETTING, \"j_password\");\n/**\n */\nexport const logoutPath = (): string =>\n getSetting(LOGOUT_PATH_SETTING, \"/Logoff\");\n"],"mappings":";;;;;;;;;;;AACA;;AACA;;AAWA,IAAMA,eAAe,GAAG;EACtB;EACAC,4BAA4B,EAAE,IAFR;EAItB;EACAC,yBAAyB,EAAE,IALL;EAOtB;EACAC,kBAAkB,EAAE,KARE;EAUtB;EACAC,sBAAsB,EAAE,IAXF;EAatB;EACAC,qCAAqC,EAAE,IAdjB;EAgBtB;EACAC,oCAAoC,EAAE,KAjBhB;EAmBtB;EACAC,oBAAoB,EAAE,CAAC,UAAD,EAAa,WAAb,CApBA;EAsBtB;EACAC,yBAAyB,EAAE,IAvBL;EAyBtB;EACAC,6BAA6B,EAAE,IA1BT;EA4BtB;EACAC,eAAe,EAAE,CAAC,IAAD,EAAO,IAAP,CA7BK;EA+BtB;EACAC,wBAAwB,EAAE,KAhCJ;EAkCtB;EACAC,yBAAyB,EAAE,KAnCL;EAqCtB;EACAC,wCAAwC,EAAE,KAtCpB;EAwCtB;EACAC,
|
|
1
|
+
{"version":3,"file":"Settings.js","names":["defaultSettings","DEBUG_I18N_MESSAGE_NOT_FOUND","HIDE_NOTIFICATION_TIMEOUT","ALWAYS_COMMIT_FORM","RENDER_QUESTION_LABELS","RENDER_MANDATORY_ATTRIBUTE_INDICATION","RENDER_OPTIONAL_ATTRIBUTE_INDICATION","AVAILABLE_LIST_VIEWS","USE_CLIENTSIDE_VALIDATION","USE_INSTANT_SERVER_VALIDATION","ENABLED_LOCALES","RENDER_GLOBAL_LOGIN_PAGE","RENDER_GLOBAL_LOGOUT_PAGE","RENDER_MULTI_LOGIN_ON_GLOBAL_LOGOUT_PAGE","LOGIN_PATH","ADMINISTRATOR_LOGIN_PATH","LOGOUT_PATH","RENDER_FORMS_IN_MODAL","SHOW_SUBMIT_WAIT_TIMEOUT","SWIM_LANE_DIAGRAM_CONFIGURATION","BUSINESS_SCENARIO_CONCEPT_TYPE","BUSINESS_SCENARIO_STEP_CONCEPT_TYPE","BUSINESS_SCENARIO_PERSONA_CONCEPT_TYPE","DATE_INPUT_FORMAT","DATE_READONLY_FORMAT","CALENDAR_WEEK_STARTS_ON","CALENDAR_FIRST_WEEK_CONTAINS_DATE","UI_PARAMETERS","ALLOW_HIDE_WHEN_EMPTY_ON_TABS","PAGE_RELOAD_ON_UNAUTHORIZED_ERROR","XHR_TIMEOUT_MS","settings","setSettings","config","isPlainObject","getSetting","key","defaultValue","has","undefined","Error","setSetting","value","allSettings","hasAllContentInData","ALL_CONTENT_IN_DATA_SETTING","loginType","LOGIN_TYPE","loginPath","LOGIN_PATH_SETTING","loginUsernameField","LOGIN_USERNAME_SETTING","loginPasswordField","LOGIN_PASSWORD_SETTING","logoutPath","LOGOUT_PATH_SETTING"],"sources":["../../src/constants/Settings.js"],"sourcesContent":["// @flow\nimport { isPlainObject, has } from \"../utils/helpers/objects\";\nimport {\n ALL_CONTENT_IN_DATA_SETTING,\n LOGIN_TYPE,\n LOGIN_PATH_SETTING,\n LOGIN_USERNAME_SETTING,\n LOGIN_PASSWORD_SETTING,\n LOGOUT_PATH_SETTING,\n} from \"./Constants\";\n\ntype Setting = boolean | string | number | Array<string>;\n\nconst defaultSettings = {\n // Debug missing i18n messages in layout\n DEBUG_I18N_MESSAGE_NOT_FOUND: true,\n\n // Time to show the notification bar\n HIDE_NOTIFICATION_TIMEOUT: 5000,\n\n // Always commit form, does not show result pages for instruments\n ALWAYS_COMMIT_FORM: false,\n\n // Render instrument and event question labels on forms (might result in duplicate labels)\n RENDER_QUESTION_LABELS: true,\n\n // Render mandatory indications on attributes\n RENDER_MANDATORY_ATTRIBUTE_INDICATION: true,\n\n // Render optional indications on attributes\n RENDER_OPTIONAL_ATTRIBUTE_INDICATION: false,\n\n // Renders a toggle with supported list views, options are ListView and TableView\n AVAILABLE_LIST_VIEWS: [\"ListView\", \"TableView\"],\n\n // Toggle client side validation\n USE_CLIENTSIDE_VALIDATION: true,\n\n // Indicates if server validation should be used when a form field is changed\n USE_INSTANT_SERVER_VALIDATION: true,\n\n // Indicates which locales are enabled\n ENABLED_LOCALES: [\"en\", \"nl\"],\n\n // Renders the global log in page\n RENDER_GLOBAL_LOGIN_PAGE: false,\n\n // Renders the global log out page\n RENDER_GLOBAL_LOGOUT_PAGE: false,\n\n // Renders the login variants as option on the global logout page\n RENDER_MULTI_LOGIN_ON_GLOBAL_LOGOUT_PAGE: false,\n\n // Path to login page / component\n LOGIN_PATH: \"/signin\",\n\n // Path to administrator login page / component\n ADMINISTRATOR_LOGIN_PATH: \"\",\n\n // Path to logout page / component\n LOGOUT_PATH: \"/signout\",\n\n // Render forms in a modal\n RENDER_FORMS_IN_MODAL: true,\n\n // Wait timeout before rendering submit wait icon\n SHOW_SUBMIT_WAIT_TIMEOUT: 300,\n\n // Swim lane diagram configuration file\n SWIM_LANE_DIAGRAM_CONFIGURATION: \"/Library/Diagrams/Overviews.json\",\n\n // Business scenario concept types\n BUSINESS_SCENARIO_CONCEPT_TYPE: [\n \"/Library/KMTs/Business scenarios.bixml/BusinessScenario\",\n ],\n BUSINESS_SCENARIO_STEP_CONCEPT_TYPE: [\n \"/Library/KMTs/Business scenarios.bixml/ScenarioStep\",\n ],\n BUSINESS_SCENARIO_PERSONA_CONCEPT_TYPE: [\n \"/Library/KMTs/Business scenarios.bixml/Persona\",\n ],\n\n // Input format for dates. Without this setting having a value, the contributions format is used\n DATE_INPUT_FORMAT: \"\",\n\n // Readonly format for dates. Without this setting having a value, the contributions format is used\n DATE_READONLY_FORMAT: \"\",\n\n // indicates on what day the week starts (0 = Sunday)\n CALENDAR_WEEK_STARTS_ON: 1,\n\n // indicates which date indicates the first week of the year\n CALENDAR_FIRST_WEEK_CONTAINS_DATE: 1,\n\n // parameters that are added for the ui state, but should not be send to the modular ui\n UI_PARAMETERS: [],\n\n // disable hide-when-empty hint for layouts running on Be Informed versions older than 21.1\n ALLOW_HIDE_WHEN_EMPTY_ON_TABS: true,\n\n // reload the complete page on signout, usefull when third party authentication is in place\n PAGE_RELOAD_ON_UNAUTHORIZED_ERROR: false,\n\n XHR_TIMEOUT_MS: 300000,\n};\n\nlet settings = defaultSettings;\n\n/**\n */\nexport const setSettings = (config: Object) => {\n if (isPlainObject(config)) {\n settings = Object.assign(defaultSettings, config);\n }\n};\n\n/**\n */\nexport const getSetting = (key: string, defaultValue?: any): any => {\n if (!has(settings, key) && defaultValue === undefined) {\n throw new Error(\n `Setting with name ${key} not found and no defaultValue given`\n );\n }\n\n return settings[key] ?? defaultValue;\n};\n\n/**\n */\nexport const setSetting = (key: string, value: any) => {\n settings[key] = value;\n};\n\n/**\n */\nexport const allSettings = (): { [name: string]: Setting } => settings;\n\n/**\n */\nexport const hasAllContentInData = (): boolean =>\n getSetting(ALL_CONTENT_IN_DATA_SETTING, true);\n\n/**\n * Login type, only available when pac4j is configured\n */\nexport const loginType = (): string => getSetting(LOGIN_TYPE, \"JAAS\");\n\n/**\n */\nexport const loginPath = (): string =>\n getSetting(LOGIN_PATH_SETTING, \"/j_security_check\");\n/**\n */\nexport const loginUsernameField = (): string =>\n getSetting(LOGIN_USERNAME_SETTING, \"j_username\");\n/**\n */\nexport const loginPasswordField = (): string =>\n getSetting(LOGIN_PASSWORD_SETTING, \"j_password\");\n/**\n */\nexport const logoutPath = (): string =>\n getSetting(LOGOUT_PATH_SETTING, \"/Logoff\");\n"],"mappings":";;;;;;;;;;;AACA;;AACA;;AAWA,IAAMA,eAAe,GAAG;EACtB;EACAC,4BAA4B,EAAE,IAFR;EAItB;EACAC,yBAAyB,EAAE,IALL;EAOtB;EACAC,kBAAkB,EAAE,KARE;EAUtB;EACAC,sBAAsB,EAAE,IAXF;EAatB;EACAC,qCAAqC,EAAE,IAdjB;EAgBtB;EACAC,oCAAoC,EAAE,KAjBhB;EAmBtB;EACAC,oBAAoB,EAAE,CAAC,UAAD,EAAa,WAAb,CApBA;EAsBtB;EACAC,yBAAyB,EAAE,IAvBL;EAyBtB;EACAC,6BAA6B,EAAE,IA1BT;EA4BtB;EACAC,eAAe,EAAE,CAAC,IAAD,EAAO,IAAP,CA7BK;EA+BtB;EACAC,wBAAwB,EAAE,KAhCJ;EAkCtB;EACAC,yBAAyB,EAAE,KAnCL;EAqCtB;EACAC,wCAAwC,EAAE,KAtCpB;EAwCtB;EACAC,UAAU,EAAE,SAzCU;EA2CtB;EACAC,wBAAwB,EAAE,EA5CJ;EA8CtB;EACAC,WAAW,EAAE,UA/CS;EAiDtB;EACAC,qBAAqB,EAAE,IAlDD;EAoDtB;EACAC,wBAAwB,EAAE,GArDJ;EAuDtB;EACAC,+BAA+B,EAAE,kCAxDX;EA0DtB;EACAC,8BAA8B,EAAE,CAC9B,yDAD8B,CA3DV;EA8DtBC,mCAAmC,EAAE,CACnC,qDADmC,CA9Df;EAiEtBC,sCAAsC,EAAE,CACtC,gDADsC,CAjElB;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GAAG,SAAZA,SAAY;EAAA,OAAcX,UAAU,CAACY,qBAAD,EAAa,MAAb,CAAxB;AAAA,CAAlB;AAEP;AACA;;;;;AACO,IAAMC,SAAS,GAAG,SAAZA,SAAY;EAAA,OACvBb,UAAU,CAACc,6BAAD,EAAqB,mBAArB,CADa;AAAA,CAAlB;AAEP;AACA;;;;;AACO,IAAMC,kBAAkB,GAAG,SAArBA,kBAAqB;EAAA,OAChCf,UAAU,CAACgB,iCAAD,EAAyB,YAAzB,CADsB;AAAA,CAA3B;AAEP;AACA;;;;;AACO,IAAMC,kBAAkB,GAAG,SAArBA,kBAAqB;EAAA,OAChCjB,UAAU,CAACkB,iCAAD,EAAyB,YAAzB,CADsB;AAAA,CAA3B;AAEP;AACA;;;;;AACO,IAAMC,UAAU,GAAG,SAAbA,UAAa;EAAA,OACxBnB,UAAU,CAACoB,8BAAD,EAAsB,SAAtB,CADc;AAAA,CAAnB"}
|
|
@@ -1,34 +1,64 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports.useLogout = exports.useLogin = void 0;
|
|
7
9
|
|
|
10
|
+
var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
|
|
11
|
+
|
|
8
12
|
var _reactRedux = require("react-redux");
|
|
9
13
|
|
|
10
14
|
var _selectors = require("../redux/_modularui/selectors");
|
|
11
15
|
|
|
12
16
|
var _actions = require("../redux/actions");
|
|
13
17
|
|
|
18
|
+
var _Cache = _interopRequireDefault(require("../utils/browser/Cache"));
|
|
19
|
+
|
|
20
|
+
var _constants = require("../constants");
|
|
21
|
+
|
|
22
|
+
var _exceptions = require("../exceptions");
|
|
23
|
+
|
|
14
24
|
/**
|
|
15
25
|
*/
|
|
16
26
|
var useLogin = function useLogin() {
|
|
17
|
-
var _application$isLogged;
|
|
27
|
+
var _application$isLogged, _application$authenti;
|
|
28
|
+
|
|
29
|
+
_Cache.default.setItem("isRedirectLogin", false);
|
|
18
30
|
|
|
19
31
|
var dispatch = (0, _reactRedux.useDispatch)();
|
|
20
32
|
var application = (0, _reactRedux.useSelector)(_selectors.getApplication);
|
|
21
33
|
var auth = (0, _reactRedux.useSelector)(function (state) {
|
|
22
34
|
return state.auth;
|
|
23
35
|
});
|
|
36
|
+
var isAuthenticated = (_application$isLogged = application === null || application === void 0 ? void 0 : application.isLoggedIn) !== null && _application$isLogged !== void 0 ? _application$isLogged : false;
|
|
24
37
|
return {
|
|
25
|
-
isAuthenticated:
|
|
38
|
+
isAuthenticated: isAuthenticated,
|
|
39
|
+
authenticationTypes: (_application$authenti = application === null || application === void 0 ? void 0 : application.authenticationTypes) !== null && _application$authenti !== void 0 ? _application$authenti : [],
|
|
26
40
|
errorMessage: auth.error,
|
|
27
41
|
resetErrors: function resetErrors() {
|
|
28
42
|
return dispatch((0, _actions.resetAuthErrors)());
|
|
29
43
|
},
|
|
30
44
|
login: function login(username, password) {
|
|
31
45
|
return dispatch((0, _actions.login)(username, password));
|
|
46
|
+
},
|
|
47
|
+
redirectLogin: function redirectLogin(authenticationType) {
|
|
48
|
+
if (_Cache.default.getItem("isRedirectLogin")) {
|
|
49
|
+
var _context;
|
|
50
|
+
|
|
51
|
+
// prevent endless loop in redirects when authentication type can't be redirected
|
|
52
|
+
throw new _exceptions.IllegalStateException((0, _concat.default)(_context = "Could not redirect to '".concat(authenticationType.authentication, "' using url: '")).call(_context, authenticationType.redirectUri, "'"));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (!isAuthenticated) {
|
|
56
|
+
var _context2;
|
|
57
|
+
|
|
58
|
+
_Cache.default.setItem("isRedirectLogin", true);
|
|
59
|
+
|
|
60
|
+
window.location.assign((0, _concat.default)(_context2 = "".concat(_constants.BASE)).call(_context2, authenticationType.redirectUri));
|
|
61
|
+
}
|
|
32
62
|
}
|
|
33
63
|
};
|
|
34
64
|
};
|
|
@@ -39,14 +69,28 @@ var useLogin = function useLogin() {
|
|
|
39
69
|
exports.useLogin = useLogin;
|
|
40
70
|
|
|
41
71
|
var useLogout = function useLogout() {
|
|
42
|
-
var _application$isLogged2;
|
|
72
|
+
var _application$isLogged2, _application$authenti2;
|
|
43
73
|
|
|
44
74
|
var dispatch = (0, _reactRedux.useDispatch)();
|
|
45
75
|
var application = (0, _reactRedux.useSelector)(_selectors.getApplication);
|
|
76
|
+
var LOGOUT_PATH = (0, _constants.getSetting)("LOGOUT_PATH", "/signout");
|
|
77
|
+
var isAuthenticated = (_application$isLogged2 = application === null || application === void 0 ? void 0 : application.isLoggedIn) !== null && _application$isLogged2 !== void 0 ? _application$isLogged2 : false;
|
|
46
78
|
return {
|
|
47
|
-
isAuthenticated:
|
|
79
|
+
isAuthenticated: isAuthenticated,
|
|
80
|
+
authenticationTypes: (_application$authenti2 = application === null || application === void 0 ? void 0 : application.authenticationTypes) !== null && _application$authenti2 !== void 0 ? _application$authenti2 : [],
|
|
48
81
|
logout: function logout() {
|
|
49
|
-
|
|
82
|
+
if (_Cache.default.getItem("isRedirectLogin")) {
|
|
83
|
+
var _context3, _context4, _context5, _context6;
|
|
84
|
+
|
|
85
|
+
var origin = window.location.origin;
|
|
86
|
+
var url = (0, _concat.default)(_context3 = (0, _concat.default)(_context4 = (0, _concat.default)(_context5 = (0, _concat.default)(_context6 = "".concat(origin)).call(_context6, _constants.BASE, "/logout?url=")).call(_context5, origin)).call(_context4, _constants.BASE)).call(_context3, LOGOUT_PATH);
|
|
87
|
+
|
|
88
|
+
_Cache.default.setItem("isRedirectLogin", false);
|
|
89
|
+
|
|
90
|
+
window.location.assign(url);
|
|
91
|
+
} else {
|
|
92
|
+
return dispatch((0, _actions.logout)());
|
|
93
|
+
}
|
|
50
94
|
}
|
|
51
95
|
};
|
|
52
96
|
};
|
|
@@ -4,32 +4,58 @@ import { useSelector, useDispatch } from "react-redux";
|
|
|
4
4
|
import { getApplication } from "../redux/_modularui/selectors";
|
|
5
5
|
import { login, logout, resetAuthErrors } from "../redux/actions";
|
|
6
6
|
|
|
7
|
+
import Cache from "../utils/browser/Cache";
|
|
8
|
+
import { BASE, getSetting } from "../constants";
|
|
9
|
+
|
|
7
10
|
import type { ResetAuthErrorsAction } from "../redux/types";
|
|
11
|
+
import type { AuthenticationType } from "../models/types";
|
|
12
|
+
import { IllegalStateException } from "../exceptions";
|
|
8
13
|
type LoginHook = {
|
|
9
14
|
isAuthenticated: boolean,
|
|
15
|
+
authenticationTypes: Array<AuthenticationType>,
|
|
10
16
|
errorMessage: ?string,
|
|
11
17
|
resetErrors: () => ResetAuthErrorsAction,
|
|
12
18
|
login: (username: string, password: string) => void,
|
|
19
|
+
redirectLogin: (authenticationType: AuthenticationType) => void,
|
|
13
20
|
};
|
|
14
21
|
type LogoutHook = {
|
|
15
22
|
isAuthenticated: boolean,
|
|
23
|
+
authenticationTypes: Array<AuthenticationType>,
|
|
16
24
|
logout: () => void,
|
|
17
25
|
};
|
|
18
26
|
|
|
19
27
|
/**
|
|
20
28
|
*/
|
|
21
29
|
export const useLogin = (): LoginHook => {
|
|
30
|
+
Cache.setItem("isRedirectLogin", false);
|
|
31
|
+
|
|
22
32
|
const dispatch = useDispatch();
|
|
23
33
|
|
|
24
34
|
const application = useSelector(getApplication);
|
|
25
35
|
const auth = useSelector((state) => state.auth);
|
|
26
36
|
|
|
37
|
+
const isAuthenticated = application?.isLoggedIn ?? false;
|
|
38
|
+
|
|
27
39
|
return {
|
|
28
|
-
isAuthenticated
|
|
40
|
+
isAuthenticated,
|
|
41
|
+
authenticationTypes: application?.authenticationTypes ?? [],
|
|
29
42
|
errorMessage: auth.error,
|
|
30
43
|
resetErrors: () => dispatch(resetAuthErrors()),
|
|
31
44
|
login: (username: string, password: string) =>
|
|
32
45
|
dispatch(login(username, password)),
|
|
46
|
+
redirectLogin: (authenticationType: AuthenticationType) => {
|
|
47
|
+
if (Cache.getItem("isRedirectLogin")) {
|
|
48
|
+
// prevent endless loop in redirects when authentication type can't be redirected
|
|
49
|
+
throw new IllegalStateException(
|
|
50
|
+
`Could not redirect to '${authenticationType.authentication}' using url: '${authenticationType.redirectUri}'`
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if (!isAuthenticated) {
|
|
55
|
+
Cache.setItem("isRedirectLogin", true);
|
|
56
|
+
window.location.assign(`${BASE}${authenticationType.redirectUri}`);
|
|
57
|
+
}
|
|
58
|
+
},
|
|
33
59
|
};
|
|
34
60
|
};
|
|
35
61
|
|
|
@@ -39,8 +65,21 @@ export const useLogout = (): LogoutHook => {
|
|
|
39
65
|
const dispatch = useDispatch();
|
|
40
66
|
const application = useSelector(getApplication);
|
|
41
67
|
|
|
68
|
+
const LOGOUT_PATH = getSetting("LOGOUT_PATH", "/signout");
|
|
69
|
+
|
|
70
|
+
const isAuthenticated = application?.isLoggedIn ?? false;
|
|
42
71
|
return {
|
|
43
|
-
isAuthenticated
|
|
44
|
-
|
|
72
|
+
isAuthenticated,
|
|
73
|
+
authenticationTypes: application?.authenticationTypes ?? [],
|
|
74
|
+
logout: () => {
|
|
75
|
+
if (Cache.getItem("isRedirectLogin")) {
|
|
76
|
+
const origin = window.location.origin;
|
|
77
|
+
const url = `${origin}${BASE}/logout?url=${origin}${BASE}${LOGOUT_PATH}`;
|
|
78
|
+
Cache.setItem("isRedirectLogin", false);
|
|
79
|
+
window.location.assign(url);
|
|
80
|
+
} else {
|
|
81
|
+
return dispatch(logout());
|
|
82
|
+
}
|
|
83
|
+
},
|
|
45
84
|
};
|
|
46
85
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAuthentication.js","names":["useLogin","dispatch","useDispatch","application","useSelector","getApplication","auth","state","isAuthenticated","isLoggedIn","errorMessage","error","resetErrors","resetAuthErrors","login","username","password","useLogout","logout"],"sources":["../../src/hooks/useAuthentication.js"],"sourcesContent":["// @flow\nimport { useSelector, useDispatch } from \"react-redux\";\n\nimport { getApplication } from \"../redux/_modularui/selectors\";\nimport { login, logout, resetAuthErrors } from \"../redux/actions\";\n\nimport type { ResetAuthErrorsAction } from \"../redux/types\";\ntype LoginHook = {\n isAuthenticated: boolean,\n errorMessage: ?string,\n resetErrors: () => ResetAuthErrorsAction,\n login: (username: string, password: string) => void,\n};\ntype LogoutHook = {\n isAuthenticated: boolean,\n logout: () => void,\n};\n\n/**\n */\nexport const useLogin = (): LoginHook => {\n const dispatch = useDispatch();\n\n const application = useSelector(getApplication);\n const auth = useSelector((state) => state.auth);\n\n return {\n isAuthenticated: application?.
|
|
1
|
+
{"version":3,"file":"useAuthentication.js","names":["useLogin","Cache","setItem","dispatch","useDispatch","application","useSelector","getApplication","auth","state","isAuthenticated","isLoggedIn","authenticationTypes","errorMessage","error","resetErrors","resetAuthErrors","login","username","password","redirectLogin","authenticationType","getItem","IllegalStateException","authentication","redirectUri","window","location","assign","BASE","useLogout","LOGOUT_PATH","getSetting","logout","origin","url"],"sources":["../../src/hooks/useAuthentication.js"],"sourcesContent":["// @flow\nimport { useSelector, useDispatch } from \"react-redux\";\n\nimport { getApplication } from \"../redux/_modularui/selectors\";\nimport { login, logout, resetAuthErrors } from \"../redux/actions\";\n\nimport Cache from \"../utils/browser/Cache\";\nimport { BASE, getSetting } from \"../constants\";\n\nimport type { ResetAuthErrorsAction } from \"../redux/types\";\nimport type { AuthenticationType } from \"../models/types\";\nimport { IllegalStateException } from \"../exceptions\";\ntype LoginHook = {\n isAuthenticated: boolean,\n authenticationTypes: Array<AuthenticationType>,\n errorMessage: ?string,\n resetErrors: () => ResetAuthErrorsAction,\n login: (username: string, password: string) => void,\n redirectLogin: (authenticationType: AuthenticationType) => void,\n};\ntype LogoutHook = {\n isAuthenticated: boolean,\n authenticationTypes: Array<AuthenticationType>,\n logout: () => void,\n};\n\n/**\n */\nexport const useLogin = (): LoginHook => {\n Cache.setItem(\"isRedirectLogin\", false);\n\n const dispatch = useDispatch();\n\n const application = useSelector(getApplication);\n const auth = useSelector((state) => state.auth);\n\n const isAuthenticated = application?.isLoggedIn ?? false;\n\n return {\n isAuthenticated,\n authenticationTypes: application?.authenticationTypes ?? [],\n errorMessage: auth.error,\n resetErrors: () => dispatch(resetAuthErrors()),\n login: (username: string, password: string) =>\n dispatch(login(username, password)),\n redirectLogin: (authenticationType: AuthenticationType) => {\n if (Cache.getItem(\"isRedirectLogin\")) {\n // prevent endless loop in redirects when authentication type can't be redirected\n throw new IllegalStateException(\n `Could not redirect to '${authenticationType.authentication}' using url: '${authenticationType.redirectUri}'`\n );\n }\n\n if (!isAuthenticated) {\n Cache.setItem(\"isRedirectLogin\", true);\n window.location.assign(`${BASE}${authenticationType.redirectUri}`);\n }\n },\n };\n};\n\n/**\n */\nexport const useLogout = (): LogoutHook => {\n const dispatch = useDispatch();\n const application = useSelector(getApplication);\n\n const LOGOUT_PATH = getSetting(\"LOGOUT_PATH\", \"/signout\");\n\n const isAuthenticated = application?.isLoggedIn ?? false;\n return {\n isAuthenticated,\n authenticationTypes: application?.authenticationTypes ?? [],\n logout: () => {\n if (Cache.getItem(\"isRedirectLogin\")) {\n const origin = window.location.origin;\n const url = `${origin}${BASE}/logout?url=${origin}${BASE}${LOGOUT_PATH}`;\n Cache.setItem(\"isRedirectLogin\", false);\n window.location.assign(url);\n } else {\n return dispatch(logout());\n }\n },\n };\n};\n"],"mappings":";;;;;;;;;;;AACA;;AAEA;;AACA;;AAEA;;AACA;;AAIA;;AAeA;AACA;AACO,IAAMA,QAAQ,GAAG,SAAXA,QAAW,GAAiB;EAAA;;EACvCC,cAAA,CAAMC,OAAN,CAAc,iBAAd,EAAiC,KAAjC;;EAEA,IAAMC,QAAQ,GAAG,IAAAC,uBAAA,GAAjB;EAEA,IAAMC,WAAW,GAAG,IAAAC,uBAAA,EAAYC,yBAAZ,CAApB;EACA,IAAMC,IAAI,GAAG,IAAAF,uBAAA,EAAY,UAACG,KAAD;IAAA,OA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AH,aAAGA,WAAH,uBAAGA,WAAW,CAAEM,UAAhB,2EAA8B,KAAnD;EACA,OAAO;IACLD,eAAe,EAAfA,eADK;IAELE,mBAAmB,4BAAEP,WAAF,aAAEA,WAAF,uBAAEA,WAAW,CAAEO,mBAAf,2EAAsC,EAFpD;IAGLqB,MAAM,EAAE,kBAAM;MACZ,IAAIhC,cAAA,CAAMqB,OAAN,CAAc,iBAAd,CAAJ,EAAsC;QAAA;;QACpC,IAAMY,MAAM,GAAGR,MAAM,CAACC,QAAP,CAAgBO,MAA/B;QACA,IAAMC,GAAG,iJAAMD,MAAN,mBAAeL,eAAf,mCAAkCK,MAAlC,mBAA2CL,eAA3C,mBAAkDE,WAAlD,CAAT;;QACA9B,cAAA,CAAMC,OAAN,CAAc,iBAAd,EAAiC,KAAjC;;QACAwB,MAAM,CAACC,QAAP,CAAgBC,MAAhB,CAAuBO,GAAvB;MACD,CALD,MAKO;QACL,OAAOhC,QAAQ,CAAC,IAAA8B,eAAA,GAAD,CAAf;MACD;IACF;EAZI,CAAP;AAcD,CArBM"}
|
|
@@ -36,6 +36,7 @@ var _default = {
|
|
|
36
36
|
"Constraint.File.InvalidFormat": "Must meet the requirements of the file name",
|
|
37
37
|
"Constraint.File.InvalidMimeType": "Allowed mime types are: ${mime-types}",
|
|
38
38
|
"Constraint.File.MaxFileSizeExceeded": "Maximum file upload size is ${max-filesize}",
|
|
39
|
+
"Constraint.File.OnlyAllowsOneFile": "Only one file is allowed",
|
|
39
40
|
"Constraint.IBAN.InvalidFormat": "Must be a valid IBAN number",
|
|
40
41
|
"Constraint.InvalidLengthBetween": "Length must be between ${min-length} and ${max-length} characters",
|
|
41
42
|
"Constraint.InvalidLengthExact": "Length must be precisely ${length} characters",
|
|
@@ -70,7 +71,7 @@ var _default = {
|
|
|
70
71
|
"Constraint.TimeStampRange.InvalidRange": "Start value must be before end value",
|
|
71
72
|
"Constraint.TimeStampRange.Mandatory": "Field is mandatory: must contain at least a start or end value",
|
|
72
73
|
"Constraint.XML.InvalidFormat": "Must be well-formed XML",
|
|
73
|
-
"Constraint.ZipCode.InvalidFormat": "Must be a valid Dutch ZIP code, e.g.
|
|
74
|
+
"Constraint.ZipCode.InvalidFormat": "Must be a valid Dutch ZIP code, e.g. 1234AB",
|
|
74
75
|
"Error.AcceptHeaderRequired": "The 'Accept' request-header field must be provided",
|
|
75
76
|
"Error.Authentication.BlockedUser": "You have been logged out, because your account has been blocked",
|
|
76
77
|
"Error.Authentication.ConcurrentUser": "You have been logged out, since your username has been used at a different location.",
|
|
@@ -81,7 +82,7 @@ var _default = {
|
|
|
81
82
|
"Error.ChangePasswordRequired": "User password is initial or expired, and must be changed ",
|
|
82
83
|
"Error.CodemapLookup.InvalidToken": "Token for codemap lookup is not valid",
|
|
83
84
|
"Error.DataStore.ConcurrentModification": "Another user has updated a record used in this task",
|
|
84
|
-
"Error.DataStore.RecordAlreadyExists": "
|
|
85
|
+
"Error.DataStore.RecordAlreadyExists": "",
|
|
85
86
|
"Error.DataStore.RowCannotBeLocked": "Another user has already locked a record used in this task",
|
|
86
87
|
"Error.Form.DataNotAvailableForId": "Service can not be completed, data not available for mandatory element ${elementid}",
|
|
87
88
|
"Error.Form.ObjectNotAllowed": "Object '${objectid}' is not allowed",
|