@beinformed/ui 1.27.2 → 1.27.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 +14 -0
- package/esm/constants/Constants.js +5 -0
- package/esm/constants/Constants.js.map +1 -1
- package/esm/constants/Settings.js +6 -4
- package/esm/constants/Settings.js.map +1 -1
- package/esm/models/application/ApplicationModel.js +6 -3
- package/esm/models/application/ApplicationModel.js.map +1 -1
- package/esm/modularui/Authenticate.js +25 -13
- package/esm/modularui/Authenticate.js.map +1 -1
- package/esm/react/ErrorBoundaryFallback.js +3 -0
- package/esm/react/ErrorBoundaryFallback.js.map +1 -1
- package/esm/react-server/serverNoSSR.js +5 -2
- package/esm/react-server/serverNoSSR.js.map +1 -1
- package/esm/react-server/serverUtil.js +1 -0
- package/esm/react-server/serverUtil.js.map +1 -1
- package/lib/constants/Constants.js +7 -1
- package/lib/constants/Constants.js.flow +5 -0
- package/lib/constants/Constants.js.map +1 -1
- package/lib/constants/Settings.js +5 -3
- package/lib/constants/Settings.js.flow +7 -3
- package/lib/constants/Settings.js.map +1 -1
- package/lib/models/application/ApplicationModel.js +6 -3
- package/lib/models/application/ApplicationModel.js.flow +10 -5
- package/lib/models/application/ApplicationModel.js.map +1 -1
- package/lib/modularui/Authenticate.js +24 -12
- package/lib/modularui/Authenticate.js.flow +30 -13
- package/lib/modularui/Authenticate.js.map +1 -1
- package/lib/react/ErrorBoundaryFallback.js +3 -0
- package/lib/react/ErrorBoundaryFallback.js.flow +2 -0
- package/lib/react/ErrorBoundaryFallback.js.map +1 -1
- package/lib/react-server/serverNoSSR.js +5 -2
- package/lib/react-server/serverNoSSR.js.flow +5 -1
- package/lib/react-server/serverNoSSR.js.map +1 -1
- package/lib/react-server/serverUtil.js +1 -0
- package/lib/react-server/serverUtil.js.flow +2 -0
- package/lib/react-server/serverUtil.js.map +1 -1
- package/package.json +3 -3
- package/src/constants/Constants.js +5 -0
- package/src/constants/Settings.js +7 -3
- package/src/models/application/ApplicationModel.js +10 -5
- package/src/modularui/Authenticate.js +30 -13
- package/src/react/ErrorBoundaryFallback.js +2 -0
- package/src/react-server/serverNoSSR.js +5 -1
- package/src/react-server/serverUtil.js +2 -0
- package/types/constants/Constants.d.ts +5 -0
- package/types/modularui/Authenticate.d.ts +8 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Constants.js","names":["CONTENT_PATH","UPLOAD_PATH","CAPTCHA_PATH","CHANGEPASSWORD_PATH","USERPROFILE_PATH","RESOURCE_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","DEFAULT_AUTHENTICATION_TYPE","name","authentication","isPrimary"],"sources":["../../src/constants/Constants.js"],"sourcesContent":["// @flow\n/**\n * path to content service\n */\nexport const CONTENT_PATH = `/content`;\n\n/**\n * Upload Path\n */\nexport const UPLOAD_PATH = `/uploadFile`;\n\n/**\n * Captcha Path\n */\nexport const CAPTCHA_PATH = `/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 * Path to resources in the Be Informed repository\n */\nexport const RESOURCE_PATH = \"/resource\";\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\nexport const DEFAULT_AUTHENTICATION_TYPE = {\n name: \"Form based authentication\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2B;EACjCC,cAAc,EAAE,mBAAmB;EACnCC,SAAS,EAAE;AACb,CAAC;AAAC"}
|
|
1
|
+
{"version":3,"file":"Constants.js","names":["CONTENT_PATH","UPLOAD_PATH","CAPTCHA_PATH","CHANGEPASSWORD_PATH","USERPROFILE_PATH","RESOURCE_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","INTERNAL_LOGIN_TYPE","JAAS","PAC4J_FORM","PAC4J_BASIC","LOGIN_TYPE","LOGIN_PATH_SETTING","LOGIN_USERNAME_SETTING","LOGIN_PASSWORD_SETTING","LOGOUT_PATH_SETTING","DEFAULT_AUTHENTICATION_TYPE","name","authentication","isPrimary"],"sources":["../../src/constants/Constants.js"],"sourcesContent":["// @flow\n/**\n * path to content service\n */\nexport const CONTENT_PATH = `/content`;\n\n/**\n * Upload Path\n */\nexport const UPLOAD_PATH = `/uploadFile`;\n\n/**\n * Captcha Path\n */\nexport const CAPTCHA_PATH = `/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 * Path to resources in the Be Informed repository\n */\nexport const RESOURCE_PATH = \"/resource\";\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 INTERNAL_LOGIN_TYPE = {\n JAAS: \"JAAS\",\n PAC4J_FORM: \"PAC4J_FORM\",\n PAC4J_BASIC: \"PAC4J_BASIC\",\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\nexport const DEFAULT_AUTHENTICATION_TYPE = {\n name: \"Form based authentication\",\n authentication: \"DefaultFormClient\",\n isPrimary: true,\n};\n"],"mappings":";;;;;;AACA;AACA;AACA;AACO,MAAMA,YAAY,GAAI,UAAS;;AAEtC;AACA;AACA;AAFA;AAGO,MAAMC,WAAW,GAAI,aAAY;;AAExC;AACA;AACA;AAFA;AAGO,MAAMC,YAAY,GAAI,kBAAiB;;AAE9C;AACA;AACA;AAFA;AAGO,MAAMC,mBAAmB,GAAG,kBAAkB;;AAErD;AACA;AACA;AAFA;AAGO,MAAMC,gBAAgB,GAAG,OAAO;;AAEvC;AACA;AACA;AAFA;AAGO,MAAMC,aAAa,GAAG,WAAW;;AAExC;AACA;AACA;AAFA;AAGO,MAAMC,mBAAmB,GAAG,GAAG;;AAEtC;AACA;AACA;AAFA;AAGO,MAAMC,uBAAuB,GAAG,WAAW;AAAC;AAEnD,MAAMC,2BAA2B,GAAG,UAAU;AAC9C;AACA;AACA;AACO,MAAMC,qBAAoC,GAAG,CAClDD,2BAA2B,CAC5B;;AAED;AACA;AADA;AAEO,MAAME,eAAe,GAAG,YAAY;AAC3C;AACA;AADA;AAEO,MAAMC,mBAAmB,GAAG,uBAAuB;AAC1D;AACA;AADA;AAEO,MAAMC,eAAe,GAAG,UAAU;AACzC;AACA;AADA;AAEO,MAAMC,oBAAoB,GAAG,2BAA2B;AAC/D;AACA;AACA;AAFA;AAGO,MAAMC,sBAAsB,GAAG,CAAC;;AAEvC;AACA;AACA;AAFA;AAGO,MAAMC,gCAAgC,GAAG,CAAC;;AAEjD;AACA;AACA;AACA;AAHA;AAIO,MAAMC,QAAQ,GAAG;EACtBC,GAAG,EAAE,CAAC;EACNC,KAAK,EAAE,EAAE;EACTC,MAAM,EAAE,EAAE;EACVC,KAAK,EAAE,EAAE;EACTC,OAAO,EAAE,EAAE;EACXC,SAAS,EAAE,EAAE;EACbC,UAAU,EAAE,EAAE;EACdC,QAAQ,EAAE,EAAE;EACZC,WAAW,EAAE,EAAE;EACfC,UAAU,EAAE;AACd,CAAC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BAAsB,GAAG,gCAAgC;AAAC;AAChE,MAAMC,mBAAmB,GAAG,uBAAuB;AAAC;AAEpD,MAAMC,2BAA2B,GAAG;EACzCC,IAAI,EAAE,2BAA2B;EACjCC,cAAc,EAAE,mBAAmB;EACnCC,SAAS,EAAE;AACb,CAAC;AAAC"}
|
|
@@ -141,14 +141,16 @@ const hasAllContentInData = () => getSetting(_Constants.ALL_CONTENT_IN_DATA_SETT
|
|
|
141
141
|
|
|
142
142
|
/**
|
|
143
143
|
* Login type, only available when pac4j is configured
|
|
144
|
+
*
|
|
145
|
+
* Preview does not support pac4j, thus is probably not configured when started, which results in login type JAAS
|
|
144
146
|
*/
|
|
145
147
|
exports.hasAllContentInData = hasAllContentInData;
|
|
146
|
-
const loginType = () => getSetting(_Constants.LOGIN_TYPE,
|
|
148
|
+
const loginType = () => getSetting(_Constants.LOGIN_TYPE, _Constants.INTERNAL_LOGIN_TYPE.JAAS);
|
|
147
149
|
|
|
148
150
|
/**
|
|
149
151
|
*/
|
|
150
152
|
exports.loginType = loginType;
|
|
151
|
-
const loginPath = () => getSetting(_Constants.LOGIN_PATH_SETTING, "/
|
|
153
|
+
const loginPath = () => getSetting(_Constants.LOGIN_PATH_SETTING, "/callback?client_name=FormClient");
|
|
152
154
|
/**
|
|
153
155
|
*/
|
|
154
156
|
exports.loginPath = loginPath;
|
|
@@ -160,7 +162,7 @@ const loginPasswordField = () => getSetting(_Constants.LOGIN_PASSWORD_SETTING, "
|
|
|
160
162
|
/**
|
|
161
163
|
*/
|
|
162
164
|
exports.loginPasswordField = loginPasswordField;
|
|
163
|
-
const logoutPath = () => getSetting(_Constants.LOGOUT_PATH_SETTING, "/
|
|
165
|
+
const logoutPath = () => getSetting(_Constants.LOGOUT_PATH_SETTING, "/logout");
|
|
164
166
|
exports.logoutPath = logoutPath;
|
|
165
167
|
const LOGIN_PATH = loginPath();
|
|
166
168
|
exports.LOGIN_PATH = LOGIN_PATH;
|
|
@@ -3,6 +3,7 @@ import { isPlainObject, has } from "../utils/helpers/objects";
|
|
|
3
3
|
import { getRepositoryResourceUrl } from "../utils/helpers/repositoryResource";
|
|
4
4
|
import {
|
|
5
5
|
ALL_CONTENT_IN_DATA_SETTING,
|
|
6
|
+
INTERNAL_LOGIN_TYPE,
|
|
6
7
|
LOGIN_TYPE,
|
|
7
8
|
LOGIN_PATH_SETTING,
|
|
8
9
|
LOGIN_USERNAME_SETTING,
|
|
@@ -186,13 +187,16 @@ export const hasAllContentInData = (): boolean =>
|
|
|
186
187
|
|
|
187
188
|
/**
|
|
188
189
|
* Login type, only available when pac4j is configured
|
|
190
|
+
*
|
|
191
|
+
* Preview does not support pac4j, thus is probably not configured when started, which results in login type JAAS
|
|
189
192
|
*/
|
|
190
|
-
export const loginType = (): string =>
|
|
193
|
+
export const loginType = (): string =>
|
|
194
|
+
getSetting(LOGIN_TYPE, INTERNAL_LOGIN_TYPE.JAAS);
|
|
191
195
|
|
|
192
196
|
/**
|
|
193
197
|
*/
|
|
194
198
|
export const loginPath = (): string =>
|
|
195
|
-
getSetting(LOGIN_PATH_SETTING, "/
|
|
199
|
+
getSetting(LOGIN_PATH_SETTING, "/callback?client_name=FormClient");
|
|
196
200
|
/**
|
|
197
201
|
*/
|
|
198
202
|
export const loginUsernameField = (): string =>
|
|
@@ -204,7 +208,7 @@ export const loginPasswordField = (): string =>
|
|
|
204
208
|
/**
|
|
205
209
|
*/
|
|
206
210
|
export const logoutPath = (): string =>
|
|
207
|
-
getSetting(LOGOUT_PATH_SETTING, "/
|
|
211
|
+
getSetting(LOGOUT_PATH_SETTING, "/logout");
|
|
208
212
|
|
|
209
213
|
export const LOGIN_PATH: string = loginPath();
|
|
210
214
|
export const LOGOUT_PATH: string = logoutPath();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Settings.js","names":["serverBase","__CONTEXT_PATH__","defaultSettings","CONTEXT_PATH","window","contextPath","CACHE_CONTRIBUTIONS","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","HIDE_WHEN_EMPTY_IGNORE_TASKS","settings","setSettings","config","isPlainObject","getSetting","key","defaultValue","has","undefined","Error","setSetting","value","allSettings","cacheContributions","getBasePath","getUploadPath","UPLOAD_PATH","getCaptchaPath","CAPTCHA_PATH","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","getSwimLaneDiagramConfiguration","configLocation","getRepositoryResourceUrl","BASE"],"sources":["../../src/constants/Settings.js"],"sourcesContent":["// @flow\nimport { isPlainObject, has } from \"../utils/helpers/objects\";\nimport { getRepositoryResourceUrl } from \"../utils/helpers/repositoryResource\";\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 UPLOAD_PATH,\n CAPTCHA_PATH,\n} from \"./Constants\";\n\ntype Setting = boolean | string | number | Array<string>;\n\nconst serverBase =\n typeof __CONTEXT_PATH__ === \"undefined\" ? null : __CONTEXT_PATH__;\n\nconst defaultSettings: { [name: string]: Setting } = {\n // This uses contextPath set from property from server\n CONTEXT_PATH:\n serverBase ??\n (typeof window !== \"undefined\" && window.contextPath\n ? window.contextPath\n : \"/BeInformed\"),\n\n // Indicates if contributions should be cached\n CACHE_CONTRIBUTIONS: true,\n\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 HIDE_WHEN_EMPTY_IGNORE_TASKS: false,\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 * Indicates if contributions must be cached\n */\nexport const cacheContributions = (): boolean =>\n getSetting(\"CACHE_CONTRIBUTIONS\", true);\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 getBasePath = (): string =>\n getSetting(\"CONTEXT_PATH\", \"/BeInformed\");\n\n/**\n * Path to upload service\n */\nexport const getUploadPath = (): string => `${getBasePath()}${UPLOAD_PATH}`;\n\n/**\n * Path to captcha service\n */\nexport const getCaptchaPath = (): string => `${getBasePath()}${CAPTCHA_PATH}`;\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\nexport const LOGIN_PATH: string = loginPath();\nexport const LOGOUT_PATH: string = logoutPath();\n\n/**\n * Model overview swim lane configuration\n */\nexport const getSwimLaneDiagramConfiguration: Object = () => {\n let configLocation = getSetting(\n \"SWIM_LANE_DIAGRAM_CONFIGURATION\",\n \"/Library/Diagrams/Overviews.json\"\n );\n if (!configLocation.startsWith(\"/\")) {\n configLocation = `/${configLocation}`;\n }\n return getRepositoryResourceUrl(configLocation);\n};\n\n/**\n * Backwards compatible export of BASE constant\n */\nexport const BASE: string = getBasePath();\n"],"mappings":";;;;;;;;;AACA;AACA;AACA;AAaA,MAAMA,UAAU,GACd,OAAOC,gBAAgB,KAAK,WAAW,GAAG,IAAI,GAAGA,gBAAgB;AAEnE,MAAMC,eAA4C,GAAG;EACnD;EACAC,YAAY,EACVH,UAAU,KACT,OAAOI,MAAM,KAAK,WAAW,IAAIA,MAAM,CAACC,WAAW,GAChDD,MAAM,CAACC,WAAW,GAClB,aAAa,CAAC;EAEpB;EACAC,mBAAmB,EAAE,IAAI;EAEzB;EACAC,4BAA4B,EAAE,IAAI;EAElC;EACAC,yBAAyB,EAAE,IAAI;EAE/B;EACAC,kBAAkB,EAAE,KAAK;EAEzB;EACAC,sBAAsB,EAAE,IAAI;EAE5B;EACAC,qCAAqC,EAAE,IAAI;EAE3C;EACAC,oCAAoC,EAAE,KAAK;EAE3C;EACAC,oBAAoB,EAAE,CAAC,UAAU,EAAE,WAAW,CAAC;EAE/C;EACAC,yBAAyB,EAAE,IAAI;EAE/B;EACAC,6BAA6B,EAAE,IAAI;EAEnC;EACAC,eAAe,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;EAE7B;EACAC,wBAAwB,EAAE,KAAK;EAE/B;EACAC,yBAAyB,EAAE,KAAK;EAEhC;EACAC,wCAAwC,EAAE,KAAK;EAE/C;EACAC,UAAU,EAAE,SAAS;EAErB;EACAC,wBAAwB,EAAE,EAAE;EAE5B;EACAC,WAAW,EAAE,UAAU;EAEvB;EACAC,qBAAqB,EAAE,IAAI;EAE3B;EACAC,wBAAwB,EAAE,GAAG;EAE7B;EACAC,+BAA+B,EAAE,kCAAkC;EAEnE;EACAC,8BAA8B,EAAE,CAC9B,yDAAyD,CAC1D;EACDC,mCAAmC,EAAE,CACnC,qDAAqD,CACtD;EACDC,sCAAsC,EAAE,CACtC,gDAAgD,CACjD;EAED;EACAC,iBAAiB,EAAE,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,EAAG,GAAEE,sBAAY,EAAC;;AAE3E;AACA;AACA;AAFA;AAGO,MAAMC,cAAc,GAAG,MAAe,GAAEH,WAAW,EAAG,GAAEI,uBAAa,EAAC;;AAE7E;AACA;AADA;AAEO,MAAMC,mBAAmB,GAAG,MACjCf,UAAU,CAACgB,sCAA2B,EAAE,IAAI,CAAC;;AAE/C;AACA;AACA;AAFA;AAGO,MAAMC,SAAS,GAAG,MAAcjB,UAAU,CAACkB,qBAAU,EAAE,MAAM,CAAC;;AAErE;AACA;AADA;AAEO,MAAMC,SAAS,GAAG,MACvBnB,UAAU,CAACoB,6BAAkB,EAAE,mBAAmB,CAAC;AACrD;AACA;AADA;AAEO,MAAMC,kBAAkB,GAAG,MAChCrB,UAAU,CAACsB,iCAAsB,EAAE,YAAY,CAAC;AAClD;AACA;AADA;AAEO,MAAMC,kBAAkB,GAAG,MAChCvB,UAAU,CAACwB,iCAAsB,EAAE,YAAY,CAAC;AAClD;AACA;AADA;AAEO,MAAMC,UAAU,GAAG,MACxBzB,UAAU,CAAC0B,8BAAmB,EAAE,SAAS,CAAC;AAAC;AAEtC,MAAMhD,UAAkB,GAAGyC,SAAS,EAAE;AAAC;AACvC,MAAMvC,WAAmB,GAAG6C,UAAU,EAAE;;AAE/C;AACA;AACA;AAFA;AAGO,MAAME,+BAAuC,GAAG,MAAM;EAC3D,IAAIC,cAAc,GAAG5B,UAAU,CAC7B,iCAAiC,EACjC,kCAAkC,CACnC;EACD,IAAI,CAAC,yBAAA4B,cAAc,OAAdA,cAAc,EAAY,GAAG,CAAC,EAAE;IACnCA,cAAc,GAAI,IAAGA,cAAe,EAAC;EACvC;EACA,OAAO,IAAAC,4CAAwB,EAACD,cAAc,CAAC;AACjD,CAAC;;AAED;AACA;AACA;AAFA;AAGO,MAAME,IAAY,GAAGpB,WAAW,EAAE;AAAC"}
|
|
1
|
+
{"version":3,"file":"Settings.js","names":["serverBase","__CONTEXT_PATH__","defaultSettings","CONTEXT_PATH","window","contextPath","CACHE_CONTRIBUTIONS","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","HIDE_WHEN_EMPTY_IGNORE_TASKS","settings","setSettings","config","isPlainObject","getSetting","key","defaultValue","has","undefined","Error","setSetting","value","allSettings","cacheContributions","getBasePath","getUploadPath","UPLOAD_PATH","getCaptchaPath","CAPTCHA_PATH","hasAllContentInData","ALL_CONTENT_IN_DATA_SETTING","loginType","LOGIN_TYPE","INTERNAL_LOGIN_TYPE","JAAS","loginPath","LOGIN_PATH_SETTING","loginUsernameField","LOGIN_USERNAME_SETTING","loginPasswordField","LOGIN_PASSWORD_SETTING","logoutPath","LOGOUT_PATH_SETTING","getSwimLaneDiagramConfiguration","configLocation","getRepositoryResourceUrl","BASE"],"sources":["../../src/constants/Settings.js"],"sourcesContent":["// @flow\nimport { isPlainObject, has } from \"../utils/helpers/objects\";\nimport { getRepositoryResourceUrl } from \"../utils/helpers/repositoryResource\";\nimport {\n ALL_CONTENT_IN_DATA_SETTING,\n INTERNAL_LOGIN_TYPE,\n LOGIN_TYPE,\n LOGIN_PATH_SETTING,\n LOGIN_USERNAME_SETTING,\n LOGIN_PASSWORD_SETTING,\n LOGOUT_PATH_SETTING,\n UPLOAD_PATH,\n CAPTCHA_PATH,\n} from \"./Constants\";\n\ntype Setting = boolean | string | number | Array<string>;\n\nconst serverBase =\n typeof __CONTEXT_PATH__ === \"undefined\" ? null : __CONTEXT_PATH__;\n\nconst defaultSettings: { [name: string]: Setting } = {\n // This uses contextPath set from property from server\n CONTEXT_PATH:\n serverBase ??\n (typeof window !== \"undefined\" && window.contextPath\n ? window.contextPath\n : \"/BeInformed\"),\n\n // Indicates if contributions should be cached\n CACHE_CONTRIBUTIONS: true,\n\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 HIDE_WHEN_EMPTY_IGNORE_TASKS: false,\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 * Indicates if contributions must be cached\n */\nexport const cacheContributions = (): boolean =>\n getSetting(\"CACHE_CONTRIBUTIONS\", true);\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 getBasePath = (): string =>\n getSetting(\"CONTEXT_PATH\", \"/BeInformed\");\n\n/**\n * Path to upload service\n */\nexport const getUploadPath = (): string => `${getBasePath()}${UPLOAD_PATH}`;\n\n/**\n * Path to captcha service\n */\nexport const getCaptchaPath = (): string => `${getBasePath()}${CAPTCHA_PATH}`;\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 *\n * Preview does not support pac4j, thus is probably not configured when started, which results in login type JAAS\n */\nexport const loginType = (): string =>\n getSetting(LOGIN_TYPE, INTERNAL_LOGIN_TYPE.JAAS);\n\n/**\n */\nexport const loginPath = (): string =>\n getSetting(LOGIN_PATH_SETTING, \"/callback?client_name=FormClient\");\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, \"/logout\");\n\nexport const LOGIN_PATH: string = loginPath();\nexport const LOGOUT_PATH: string = logoutPath();\n\n/**\n * Model overview swim lane configuration\n */\nexport const getSwimLaneDiagramConfiguration: Object = () => {\n let configLocation = getSetting(\n \"SWIM_LANE_DIAGRAM_CONFIGURATION\",\n \"/Library/Diagrams/Overviews.json\"\n );\n if (!configLocation.startsWith(\"/\")) {\n configLocation = `/${configLocation}`;\n }\n return getRepositoryResourceUrl(configLocation);\n};\n\n/**\n * Backwards compatible export of BASE constant\n */\nexport const BASE: string = getBasePath();\n"],"mappings":";;;;;;;;;AACA;AACA;AACA;AAcA,MAAMA,UAAU,GACd,OAAOC,gBAAgB,KAAK,WAAW,GAAG,IAAI,GAAGA,gBAAgB;AAEnE,MAAMC,eAA4C,GAAG;EACnD;EACAC,YAAY,EACVH,UAAU,KACT,OAAOI,MAAM,KAAK,WAAW,IAAIA,MAAM,CAACC,WAAW,GAChDD,MAAM,CAACC,WAAW,GAClB,aAAa,CAAC;EAEpB;EACAC,mBAAmB,EAAE,IAAI;EAEzB;EACAC,4BAA4B,EAAE,IAAI;EAElC;EACAC,yBAAyB,EAAE,IAAI;EAE/B;EACAC,kBAAkB,EAAE,KAAK;EAEzB;EACAC,sBAAsB,EAAE,IAAI;EAE5B;EACAC,qCAAqC,EAAE,IAAI;EAE3C;EACAC,oCAAoC,EAAE,KAAK;EAE3C;EACAC,oBAAoB,EAAE,CAAC,UAAU,EAAE,WAAW,CAAC;EAE/C;EACAC,yBAAyB,EAAE,IAAI;EAE/B;EACAC,6BAA6B,EAAE,IAAI;EAEnC;EACAC,eAAe,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;EAE7B;EACAC,wBAAwB,EAAE,KAAK;EAE/B;EACAC,yBAAyB,EAAE,KAAK;EAEhC;EACAC,wCAAwC,EAAE,KAAK;EAE/C;EACAC,UAAU,EAAE,SAAS;EAErB;EACAC,wBAAwB,EAAE,EAAE;EAE5B;EACAC,WAAW,EAAE,UAAU;EAEvB;EACAC,qBAAqB,EAAE,IAAI;EAE3B;EACAC,wBAAwB,EAAE,GAAG;EAE7B;EACAC,+BA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AAAC,4CAAwB,EAACD,cAAc,CAAC;AACjD,CAAC;;AAED;AACA;AACA;AAFA;AAGO,MAAME,IAAY,GAAGtB,WAAW,EAAE;AAAC"}
|
|
@@ -70,10 +70,13 @@ class ApplicationModel extends _ResourceModel.default {
|
|
|
70
70
|
*/
|
|
71
71
|
get authenticationTypes() {
|
|
72
72
|
const authenticationTypes = this.getContribution("security", [_constants.DEFAULT_AUTHENTICATION_TYPE]);
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
if (authenticationTypes) {
|
|
74
|
+
//put primary first
|
|
75
|
+
return authenticationTypes?.sort((a, b) => a.isPrimary === b.isPrimary ? 0 : a.isPrimary ? -1 : 1);
|
|
76
|
+
}
|
|
77
|
+
return [_constants.DEFAULT_AUTHENTICATION_TYPE];
|
|
76
78
|
}
|
|
79
|
+
|
|
77
80
|
/**
|
|
78
81
|
* Getting the tab links
|
|
79
82
|
*/
|
|
@@ -80,12 +80,17 @@ export default class ApplicationModel extends ResourceModel {
|
|
|
80
80
|
DEFAULT_AUTHENTICATION_TYPE,
|
|
81
81
|
]);
|
|
82
82
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
(
|
|
86
|
-
a
|
|
87
|
-
|
|
83
|
+
if (authenticationTypes) {
|
|
84
|
+
//put primary first
|
|
85
|
+
return authenticationTypes?.sort(
|
|
86
|
+
(a: AuthenticationType, b: AuthenticationType) =>
|
|
87
|
+
a.isPrimary === b.isPrimary ? 0 : a.isPrimary ? -1 : 1
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
return [DEFAULT_AUTHENTICATION_TYPE];
|
|
88
92
|
}
|
|
93
|
+
|
|
89
94
|
/**
|
|
90
95
|
* Getting the tab links
|
|
91
96
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationModel.js","names":["ApplicationModel","ResourceModel","type","modelName","isApplicableModel","data","contributions","resourcetype","getInitialChildModelLinks","userService","links","getLinkByKey","href","path","NotAllowedUriException","setChildModels","models","userServiceModel","model","userServices","label","getContribution","authenticationTypes","DEFAULT_AUTHENTICATION_TYPE","sort","a","b","isPrimary","tabs","getLinksByGroup","modelcatalog","LinkModel","create","_userServices","UserServicesModel","isLoggedIn","userHref","userLink"],"sources":["../../../src/models/application/ApplicationModel.js"],"sourcesContent":["// @flow\nimport ResourceModel from \"../base/ResourceModel\";\nimport LinkModel from \"../links/LinkModel\";\nimport UserServicesModel from \"../user/UserServicesModel\";\n\nimport { NotAllowedUriException } from \"../../exceptions\";\n\nimport { DEFAULT_AUTHENTICATION_TYPE } from \"../../constants\";\n\nimport type { ModularUIModel, AuthenticationType } from \"../types\";\nimport type { ModularUIResponse } from \"../../modularui\";\nimport type LinkCollection from \"../links/LinkCollection\";\nimport type Href from \"../href/Href\";\n\n/**\n * The Application model\n */\nexport default class ApplicationModel extends ResourceModel {\n _userServices: ?UserServicesModel;\n\n /**\n * Retrieve type of model\n */\n get type(): string {\n return \"Application\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"ApplicationModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"Application\"\n );\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n const userService = this.links.getLinkByKey(\"UserServices\");\n if (userService && userService.href.path === \"/login\") {\n throw new NotAllowedUriException(\n \"The user service (Login panel) should not have the uri '/login', use a different URI because this uri matches the login service.\"\n );\n }\n\n return userService ? [userService] : [];\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n const userServiceModel = models.find(\n (model) => model.type === \"UserServices\"\n );\n\n if (userServiceModel) {\n this.userServices = userServiceModel;\n }\n }\n\n /**\n * Getting the label of the application\n */\n get label(): string {\n return this.getContribution(\"label\", \"\");\n }\n\n /**\n * Getting the authentication types of the application\n */\n get authenticationTypes(): Array<AuthenticationType> {\n const authenticationTypes = this.getContribution(\"security\", [\n DEFAULT_AUTHENTICATION_TYPE,\n ]);\n\n //put primary first\n
|
|
1
|
+
{"version":3,"file":"ApplicationModel.js","names":["ApplicationModel","ResourceModel","type","modelName","isApplicableModel","data","contributions","resourcetype","getInitialChildModelLinks","userService","links","getLinkByKey","href","path","NotAllowedUriException","setChildModels","models","userServiceModel","model","userServices","label","getContribution","authenticationTypes","DEFAULT_AUTHENTICATION_TYPE","sort","a","b","isPrimary","tabs","getLinksByGroup","modelcatalog","LinkModel","create","_userServices","UserServicesModel","isLoggedIn","userHref","userLink"],"sources":["../../../src/models/application/ApplicationModel.js"],"sourcesContent":["// @flow\nimport ResourceModel from \"../base/ResourceModel\";\nimport LinkModel from \"../links/LinkModel\";\nimport UserServicesModel from \"../user/UserServicesModel\";\n\nimport { NotAllowedUriException } from \"../../exceptions\";\n\nimport { DEFAULT_AUTHENTICATION_TYPE } from \"../../constants\";\n\nimport type { ModularUIModel, AuthenticationType } from \"../types\";\nimport type { ModularUIResponse } from \"../../modularui\";\nimport type LinkCollection from \"../links/LinkCollection\";\nimport type Href from \"../href/Href\";\n\n/**\n * The Application model\n */\nexport default class ApplicationModel extends ResourceModel {\n _userServices: ?UserServicesModel;\n\n /**\n * Retrieve type of model\n */\n get type(): string {\n return \"Application\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"ApplicationModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"Application\"\n );\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n const userService = this.links.getLinkByKey(\"UserServices\");\n if (userService && userService.href.path === \"/login\") {\n throw new NotAllowedUriException(\n \"The user service (Login panel) should not have the uri '/login', use a different URI because this uri matches the login service.\"\n );\n }\n\n return userService ? [userService] : [];\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n const userServiceModel = models.find(\n (model) => model.type === \"UserServices\"\n );\n\n if (userServiceModel) {\n this.userServices = userServiceModel;\n }\n }\n\n /**\n * Getting the label of the application\n */\n get label(): string {\n return this.getContribution(\"label\", \"\");\n }\n\n /**\n * Getting the authentication types of the application\n */\n get authenticationTypes(): Array<AuthenticationType> {\n const authenticationTypes = this.getContribution(\"security\", [\n DEFAULT_AUTHENTICATION_TYPE,\n ]);\n\n if (authenticationTypes) {\n //put primary first\n return authenticationTypes?.sort(\n (a: AuthenticationType, b: AuthenticationType) =>\n a.isPrimary === b.isPrimary ? 0 : a.isPrimary ? -1 : 1\n );\n }\n\n return [DEFAULT_AUTHENTICATION_TYPE];\n }\n\n /**\n * Getting the tab links\n */\n get tabs(): LinkCollection {\n return this.links.getLinksByGroup(\"tab\");\n }\n\n /**\n * Get modelcatalog link\n */\n get modelcatalog(): LinkModel {\n return LinkModel.create(\"modelcatalog\", \"/modelcatalog\", \"Model catalog\");\n }\n\n /**\n * Set the userservices for this application\n */\n set userServices(model: ?ModularUIModel) {\n this._userServices = model instanceof UserServicesModel ? model : null;\n }\n\n /**\n * returns the userservices configured for this application\n */\n get userServices(): ?UserServicesModel {\n return this._userServices ? this._userServices : null;\n }\n\n /**\n * Indicates if the user is logged in\n */\n get isLoggedIn(): boolean {\n return this.userServices?.isLoggedIn ?? false;\n }\n\n /**\n * Retrieve link to the user information,\n * only available when the user services are available\n */\n get userHref(): Href | null {\n if (this.userServices != null && this.userServices.userLink != null) {\n return this.userServices.userLink.href;\n }\n\n return null;\n }\n}\n"],"mappings":";;;;;;;;;AACA;AACA;AACA;AAEA;AAEA;AAOA;AACA;AACA;AACe,MAAMA,gBAAgB,SAASC,sBAAa,CAAC;EAAA;IAAA;IAAA;EAAA;EAG1D;AACF;AACA;EACE,IAAIC,IAAI,GAAW;IACjB,OAAO,aAAa;EACtB;;EAEA;AACF;EACE,WAAWC,SAAS,GAAW;IAC7B,OAAO,kBAAkB;EAC3B;;EAEA;AACF;EACE,OAAOC,iBAAiB,CAACC,IAAuB,EAAW;IACzD,OACEA,IAAI,CAACC,aAAa,CAACC,YAAY,IAC/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;EACE,IAAIC,YAAY,GAAc;IAC5B,OAAOC,kBAAS,CAACC,MAAM,CAAC,cAAc,EAAE,eAAe,EAAE,eAAe,CAAC;EAC3E;;EAEA;AACF;AACA;EACE,IAAIb,YAAY,CAACD,KAAsB,EAAE;IACvC,IAAI,CAACe,aAAa,GAAGf,KAAK,YAAYgB,0BAAiB,GAAGhB,KAAK,GAAG,IAAI;EACxE;;EAEA;AACF;AACA;EACE,IAAIC,YAAY,GAAuB;IACrC,OAAO,IAAI,CAACc,aAAa,GAAG,IAAI,CAACA,aAAa,GAAG,IAAI;EACvD;;EAEA;AACF;AACA;EACE,IAAIE,UAAU,GAAY;IACxB,OAAO,IAAI,CAAChB,YAAY,EAAEgB,UAAU,IAAI,KAAK;EAC/C;;EAEA;AACF;AACA;AACA;EACE,IAAIC,QAAQ,GAAgB;IAC1B,IAAI,IAAI,CAACjB,YAAY,IAAI,IAAI,IAAI,IAAI,CAACA,YAAY,CAACkB,QAAQ,IAAI,IAAI,EAAE;MACnE,OAAO,IAAI,CAAClB,YAAY,CAACkB,QAAQ,CAACzB,IAAI;IACxC;IAEA,OAAO,IAAI;EACb;AACF;AAAC"}
|
|
@@ -27,13 +27,13 @@ class Authenticate {
|
|
|
27
27
|
*/
|
|
28
28
|
get authenticationType() {
|
|
29
29
|
const type = (0, _constants.loginType)();
|
|
30
|
-
if (!type || type ===
|
|
31
|
-
return
|
|
30
|
+
if (!type || type === _constants.INTERNAL_LOGIN_TYPE.JAAS) {
|
|
31
|
+
return _constants.INTERNAL_LOGIN_TYPE.JAAS;
|
|
32
32
|
}
|
|
33
33
|
if ((0, _includes.default)(type).call(type, "FormClient")) {
|
|
34
|
-
return
|
|
34
|
+
return _constants.INTERNAL_LOGIN_TYPE.PAC4J_FORM;
|
|
35
35
|
} else if ((0, _includes.default)(type).call(type, "BasicClient")) {
|
|
36
|
-
return
|
|
36
|
+
return _constants.INTERNAL_LOGIN_TYPE.PAC4J_BASIC;
|
|
37
37
|
}
|
|
38
38
|
throw new Error(`Unsupported login type found: ${type}`);
|
|
39
39
|
}
|
|
@@ -41,7 +41,7 @@ class Authenticate {
|
|
|
41
41
|
/**
|
|
42
42
|
*/
|
|
43
43
|
get isBasicAuthentication() {
|
|
44
|
-
return this._isBasic || this.authenticationType ===
|
|
44
|
+
return this._isBasic || this.authenticationType === _constants.INTERNAL_LOGIN_TYPE.PAC4J_BASIC;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
/**
|
|
@@ -84,9 +84,9 @@ class Authenticate {
|
|
|
84
84
|
*/
|
|
85
85
|
login(username, password) {
|
|
86
86
|
switch (this.authenticationType) {
|
|
87
|
-
case
|
|
87
|
+
case _constants.INTERNAL_LOGIN_TYPE.PAC4J_FORM:
|
|
88
88
|
return this.doFormLogin(username, password);
|
|
89
|
-
case
|
|
89
|
+
case _constants.INTERNAL_LOGIN_TYPE.PAC4J_BASIC:
|
|
90
90
|
return this.doBasicAuthentication(username, password);
|
|
91
91
|
default:
|
|
92
92
|
return this.doJaasAuthentication(username, password);
|
|
@@ -97,8 +97,8 @@ class Authenticate {
|
|
|
97
97
|
*/
|
|
98
98
|
getFormLoginUrl() {
|
|
99
99
|
switch (this.authenticationType) {
|
|
100
|
-
case
|
|
101
|
-
case
|
|
100
|
+
case _constants.INTERNAL_LOGIN_TYPE.PAC4J_BASIC:
|
|
101
|
+
case _constants.INTERNAL_LOGIN_TYPE.PAC4J_FORM:
|
|
102
102
|
return `${(0, _constants.getBasePath)()}${(0, _constants.loginPath)()}`;
|
|
103
103
|
default:
|
|
104
104
|
return `${(0, _constants.getBasePath)()}/j_security_check`;
|
|
@@ -111,8 +111,8 @@ class Authenticate {
|
|
|
111
111
|
const encodedUsername = encodeURIComponent(username);
|
|
112
112
|
const encodedPassword = encodeURIComponent(password);
|
|
113
113
|
switch (this.authenticationType) {
|
|
114
|
-
case
|
|
115
|
-
case
|
|
114
|
+
case _constants.INTERNAL_LOGIN_TYPE.PAC4J_BASIC:
|
|
115
|
+
case _constants.INTERNAL_LOGIN_TYPE.PAC4J_FORM:
|
|
116
116
|
return `${(0, _constants.loginUsernameField)()}=${encodedUsername}&${(0, _constants.loginPasswordField)()}=${encodedPassword}`;
|
|
117
117
|
default:
|
|
118
118
|
return `j_username=${encodedUsername}&j_password=${encodedPassword}`;
|
|
@@ -151,11 +151,23 @@ class Authenticate {
|
|
|
151
151
|
});
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
+
/**
|
|
155
|
+
*/
|
|
156
|
+
getLogoutUrl() {
|
|
157
|
+
switch (this.authenticationType) {
|
|
158
|
+
case _constants.INTERNAL_LOGIN_TYPE.PAC4J_BASIC:
|
|
159
|
+
case _constants.INTERNAL_LOGIN_TYPE.PAC4J_FORM:
|
|
160
|
+
return `${(0, _constants.getBasePath)()}${(0, _constants.logoutPath)()}`;
|
|
161
|
+
default:
|
|
162
|
+
return `${(0, _constants.getBasePath)()}/Logoff`;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
154
166
|
/**
|
|
155
167
|
*/
|
|
156
168
|
logout() {
|
|
157
169
|
return (0, _universalFetch.default)({
|
|
158
|
-
url:
|
|
170
|
+
url: this.getLogoutUrl()
|
|
159
171
|
}).then(response => {
|
|
160
172
|
// clear cache because of cached contributions
|
|
161
173
|
_Cache.default.clear();
|
|
@@ -6,6 +6,7 @@ import Cache from "../utils/browser/Cache";
|
|
|
6
6
|
|
|
7
7
|
import { UnauthorizedException } from "../exceptions";
|
|
8
8
|
import {
|
|
9
|
+
INTERNAL_LOGIN_TYPE,
|
|
9
10
|
loginType,
|
|
10
11
|
loginPath,
|
|
11
12
|
loginPasswordField,
|
|
@@ -27,16 +28,17 @@ class Authenticate {
|
|
|
27
28
|
|
|
28
29
|
/**
|
|
29
30
|
*/
|
|
30
|
-
get authenticationType():
|
|
31
|
+
get authenticationType(): $Keys<typeof INTERNAL_LOGIN_TYPE> {
|
|
31
32
|
const type = loginType();
|
|
32
33
|
|
|
33
|
-
if (!type || type ===
|
|
34
|
-
return
|
|
34
|
+
if (!type || type === INTERNAL_LOGIN_TYPE.JAAS) {
|
|
35
|
+
return INTERNAL_LOGIN_TYPE.JAAS;
|
|
35
36
|
}
|
|
37
|
+
|
|
36
38
|
if (type.includes("FormClient")) {
|
|
37
|
-
return
|
|
39
|
+
return INTERNAL_LOGIN_TYPE.PAC4J_FORM;
|
|
38
40
|
} else if (type.includes("BasicClient")) {
|
|
39
|
-
return
|
|
41
|
+
return INTERNAL_LOGIN_TYPE.PAC4J_BASIC;
|
|
40
42
|
}
|
|
41
43
|
|
|
42
44
|
throw new Error(`Unsupported login type found: ${type}`);
|
|
@@ -45,7 +47,10 @@ class Authenticate {
|
|
|
45
47
|
/**
|
|
46
48
|
*/
|
|
47
49
|
get isBasicAuthentication(): boolean {
|
|
48
|
-
return
|
|
50
|
+
return (
|
|
51
|
+
this._isBasic ||
|
|
52
|
+
this.authenticationType === INTERNAL_LOGIN_TYPE.PAC4J_BASIC
|
|
53
|
+
);
|
|
49
54
|
}
|
|
50
55
|
|
|
51
56
|
/**
|
|
@@ -90,9 +95,9 @@ class Authenticate {
|
|
|
90
95
|
*/
|
|
91
96
|
login(username: string, password: string): Promise<any> {
|
|
92
97
|
switch (this.authenticationType) {
|
|
93
|
-
case
|
|
98
|
+
case INTERNAL_LOGIN_TYPE.PAC4J_FORM:
|
|
94
99
|
return this.doFormLogin(username, password);
|
|
95
|
-
case
|
|
100
|
+
case INTERNAL_LOGIN_TYPE.PAC4J_BASIC:
|
|
96
101
|
return this.doBasicAuthentication(username, password);
|
|
97
102
|
default:
|
|
98
103
|
return this.doJaasAuthentication(username, password);
|
|
@@ -103,8 +108,8 @@ class Authenticate {
|
|
|
103
108
|
*/
|
|
104
109
|
getFormLoginUrl(): string {
|
|
105
110
|
switch (this.authenticationType) {
|
|
106
|
-
case
|
|
107
|
-
case
|
|
111
|
+
case INTERNAL_LOGIN_TYPE.PAC4J_BASIC:
|
|
112
|
+
case INTERNAL_LOGIN_TYPE.PAC4J_FORM:
|
|
108
113
|
return `${getBasePath()}${loginPath()}`;
|
|
109
114
|
default:
|
|
110
115
|
return `${getBasePath()}/j_security_check`;
|
|
@@ -118,8 +123,8 @@ class Authenticate {
|
|
|
118
123
|
const encodedPassword = encodeURIComponent(password);
|
|
119
124
|
|
|
120
125
|
switch (this.authenticationType) {
|
|
121
|
-
case
|
|
122
|
-
case
|
|
126
|
+
case INTERNAL_LOGIN_TYPE.PAC4J_BASIC:
|
|
127
|
+
case INTERNAL_LOGIN_TYPE.PAC4J_FORM:
|
|
123
128
|
return `${loginUsernameField()}=${encodedUsername}&${loginPasswordField()}=${encodedPassword}`;
|
|
124
129
|
default:
|
|
125
130
|
return `j_username=${encodedUsername}&j_password=${encodedPassword}`;
|
|
@@ -158,11 +163,23 @@ class Authenticate {
|
|
|
158
163
|
});
|
|
159
164
|
}
|
|
160
165
|
|
|
166
|
+
/**
|
|
167
|
+
*/
|
|
168
|
+
getLogoutUrl(): string {
|
|
169
|
+
switch (this.authenticationType) {
|
|
170
|
+
case INTERNAL_LOGIN_TYPE.PAC4J_BASIC:
|
|
171
|
+
case INTERNAL_LOGIN_TYPE.PAC4J_FORM:
|
|
172
|
+
return `${getBasePath()}${logoutPath()}`;
|
|
173
|
+
default:
|
|
174
|
+
return `${getBasePath()}/Logoff`;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
161
178
|
/**
|
|
162
179
|
*/
|
|
163
180
|
logout(): Promise<any> {
|
|
164
181
|
return universalFetch({
|
|
165
|
-
url:
|
|
182
|
+
url: this.getLogoutUrl(),
|
|
166
183
|
}).then((response) => {
|
|
167
184
|
// clear cache because of cached contributions
|
|
168
185
|
Cache.clear();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Authenticate.js","names":["Authenticate","constructor","_isBasic","authenticationType","type","loginType","Error","isBasicAuthentication","requestLogin","universalFetch","url","getBasePath","method","HTTP_METHODS","GET","headers","Accept","initLogin","resolve","catch","error","UnauthorizedException","login","username","password","doFormLogin","doBasicAuthentication","doJaasAuthentication","getFormLoginUrl","loginPath","getFormLoginData","encodedUsername","encodeURIComponent","encodedPassword","loginUsernameField","loginPasswordField","POST","data","Cache","addItem","btoa","then","
|
|
1
|
+
{"version":3,"file":"Authenticate.js","names":["Authenticate","constructor","_isBasic","authenticationType","type","loginType","INTERNAL_LOGIN_TYPE","JAAS","PAC4J_FORM","PAC4J_BASIC","Error","isBasicAuthentication","requestLogin","universalFetch","url","getBasePath","method","HTTP_METHODS","GET","headers","Accept","initLogin","resolve","catch","error","UnauthorizedException","login","username","password","doFormLogin","doBasicAuthentication","doJaasAuthentication","getFormLoginUrl","loginPath","getFormLoginData","encodedUsername","encodeURIComponent","encodedPassword","loginUsernameField","loginPasswordField","POST","data","Cache","addItem","btoa","then","getLogoutUrl","logoutPath","logout","response","clear"],"sources":["../../src/modularui/Authenticate.js"],"sourcesContent":["// @flow\nimport { HTTP_METHODS } from \"../constants/Constants\";\n\nimport universalFetch from \"../utils/fetch/universalFetch\";\nimport Cache from \"../utils/browser/Cache\";\n\nimport { UnauthorizedException } from \"../exceptions\";\nimport {\n INTERNAL_LOGIN_TYPE,\n loginType,\n loginPath,\n loginPasswordField,\n loginUsernameField,\n logoutPath,\n getBasePath,\n} from \"../constants\";\n\n/**\n */\nclass Authenticate {\n _isBasic: boolean;\n\n /**\n */\n constructor() {\n this._isBasic = false;\n }\n\n /**\n */\n get authenticationType(): $Keys<typeof INTERNAL_LOGIN_TYPE> {\n const type = loginType();\n\n if (!type || type === INTERNAL_LOGIN_TYPE.JAAS) {\n return INTERNAL_LOGIN_TYPE.JAAS;\n }\n\n if (type.includes(\"FormClient\")) {\n return INTERNAL_LOGIN_TYPE.PAC4J_FORM;\n } else if (type.includes(\"BasicClient\")) {\n return INTERNAL_LOGIN_TYPE.PAC4J_BASIC;\n }\n\n throw new Error(`Unsupported login type found: ${type}`);\n }\n\n /**\n */\n get isBasicAuthentication(): boolean {\n return (\n this._isBasic ||\n this.authenticationType === INTERNAL_LOGIN_TYPE.PAC4J_BASIC\n );\n }\n\n /**\n */\n set isBasicAuthentication(isBasicAuthentication: boolean) {\n this._isBasic = isBasicAuthentication;\n }\n\n /**\n */\n requestLogin(): Promise<any> {\n return universalFetch({\n url: `${getBasePath()}/login`,\n method: HTTP_METHODS.GET,\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/x-www-form-urlencoded\",\n },\n });\n }\n\n /**\n */\n initLogin(initLogin: boolean): Promise<any> {\n if (this.isBasicAuthentication || !initLogin) {\n return Promise.resolve(true);\n }\n\n return this.requestLogin().catch((error) => {\n // when an unauthorizedexception is received on a request to the login service,\n // this indicates a basic authorization scenario\n // in case of form based authentication other exceptions are thrown\n if (error instanceof UnauthorizedException) {\n this.isBasicAuthentication = true;\n }\n\n return Promise.resolve({});\n });\n }\n\n /**\n */\n login(username: string, password: string): Promise<any> {\n switch (this.authenticationType) {\n case INTERNAL_LOGIN_TYPE.PAC4J_FORM:\n return this.doFormLogin(username, password);\n case INTERNAL_LOGIN_TYPE.PAC4J_BASIC:\n return this.doBasicAuthentication(username, password);\n default:\n return this.doJaasAuthentication(username, password);\n }\n }\n\n /**\n */\n getFormLoginUrl(): string {\n switch (this.authenticationType) {\n case INTERNAL_LOGIN_TYPE.PAC4J_BASIC:\n case INTERNAL_LOGIN_TYPE.PAC4J_FORM:\n return `${getBasePath()}${loginPath()}`;\n default:\n return `${getBasePath()}/j_security_check`;\n }\n }\n\n /**\n */\n getFormLoginData(username: string, password: string): string {\n const encodedUsername = encodeURIComponent(username);\n const encodedPassword = encodeURIComponent(password);\n\n switch (this.authenticationType) {\n case INTERNAL_LOGIN_TYPE.PAC4J_BASIC:\n case INTERNAL_LOGIN_TYPE.PAC4J_FORM:\n return `${loginUsernameField()}=${encodedUsername}&${loginPasswordField()}=${encodedPassword}`;\n default:\n return `j_username=${encodedUsername}&j_password=${encodedPassword}`;\n }\n }\n\n /**\n */\n doFormLogin(username: string, password: string): Promise<any> {\n return universalFetch({\n url: this.getFormLoginUrl(),\n method: HTTP_METHODS.POST,\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/x-www-form-urlencoded\",\n },\n data: this.getFormLoginData(username, password),\n });\n }\n\n /**\n */\n doBasicAuthentication(username: string, password: string): Promise<any> {\n Cache.addItem(\"basic\", btoa(`${username}:${password}`));\n return this.requestLogin();\n }\n\n /**\n */\n doJaasAuthentication(username: string, password: string): Promise<any> {\n return this.initLogin(true).then(() => {\n if (this.isBasicAuthentication) {\n return this.doBasicAuthentication(username, password);\n }\n return this.doFormLogin(username, password);\n });\n }\n\n /**\n */\n getLogoutUrl(): string {\n switch (this.authenticationType) {\n case INTERNAL_LOGIN_TYPE.PAC4J_BASIC:\n case INTERNAL_LOGIN_TYPE.PAC4J_FORM:\n return `${getBasePath()}${logoutPath()}`;\n default:\n return `${getBasePath()}/Logoff`;\n }\n }\n\n /**\n */\n logout(): Promise<any> {\n return universalFetch({\n url: this.getLogoutUrl(),\n }).then((response) => {\n // clear cache because of cached contributions\n Cache.clear();\n return response;\n });\n }\n}\n\nexport default Authenticate;\n"],"mappings":";;;;;;;;;;AACA;AAEA;AACA;AAEA;AACA;AAUA;AACA;AACA,MAAMA,YAAY,CAAC;EAGjB;AACF;EACEC,WAAW,GAAG;IAAA;IACZ,IAAI,CAACC,QAAQ,GAAG,KAAK;EACvB;;EAEA;AACF;EACE,IAAIC,kBAAkB,GAAsC;IAC1D,MAAMC,IAAI,GAAG,IAAAC,oBAAS,GAAE;IAExB,IAAI,CAACD,IAAI,IAAIA,IAAI,KAAKE,8BAAmB,CAACC,IAAI,EAAE;MAC9C,OAAOD,8BAAmB,CAACC,IAAI;IACjC;IAEA,IAAI,uBAAAH,IAAI,OAAJA,IAAI,EAAU,YAAY,CAAC,EAAE;MAC/B,OAAOE,8BAAmB,CAACE,UAAU;IACvC,CAAC,MAAM,IAAI,uBAAAJ,IAAI,OAAJA,IAAI,EAAU,aAAa,CAAC,EAAE;MACvC,OAAOE,8BAA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AEC,QAAgB,EAAgB;IACtEc,cAAK,CAACC,OAAO,CAAC,OAAO,EAAEC,IAAI,CAAE,GAAEjB,QAAS,IAAGC,QAAS,EAAC,CAAC,CAAC;IACvD,OAAO,IAAI,CAAChB,YAAY,EAAE;EAC5B;;EAEA;AACF;EACEmB,oBAAoB,CAACJ,QAAgB,EAAEC,QAAgB,EAAgB;IACrE,OAAO,IAAI,CAACP,SAAS,CAAC,IAAI,CAAC,CAACwB,IAAI,CAAC,MAAM;MACrC,IAAI,IAAI,CAAClC,qBAAqB,EAAE;QAC9B,OAAO,IAAI,CAACmB,qBAAqB,CAACH,QAAQ,EAAEC,QAAQ,CAAC;MACvD;MACA,OAAO,IAAI,CAACC,WAAW,CAACF,QAAQ,EAAEC,QAAQ,CAAC;IAC7C,CAAC,CAAC;EACJ;;EAEA;AACF;EACEkB,YAAY,GAAW;IACrB,QAAQ,IAAI,CAAC3C,kBAAkB;MAC7B,KAAKG,8BAAmB,CAACG,WAAW;MACpC,KAAKH,8BAAmB,CAACE,UAAU;QACjC,OAAQ,GAAE,IAAAO,sBAAW,GAAG,GAAE,IAAAgC,qBAAU,GAAG,EAAC;MAC1C;QACE,OAAQ,GAAE,IAAAhC,sBAAW,GAAG,SAAQ;IAAC;EAEvC;;EAEA;AACF;EACEiC,MAAM,GAAiB;IACrB,OAAO,IAAAnC,uBAAc,EAAC;MACpBC,GAAG,EAAE,IAAI,CAACgC,YAAY;IACxB,CAAC,CAAC,CAACD,IAAI,CAAEI,QAAQ,IAAK;MACpB;MACAP,cAAK,CAACQ,KAAK,EAAE;MACb,OAAOD,QAAQ;IACjB,CAAC,CAAC;EACJ;AACF;AAAC,eAEcjD,YAAY;AAAA"}
|
|
@@ -8,9 +8,12 @@ exports.default = void 0;
|
|
|
8
8
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
9
|
var _spacers = require("../react-theme/utils/spacers");
|
|
10
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
// $FlowFixMe
|
|
11
12
|
const StyledBoundary = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
12
13
|
componentId: "sc-xsbtpo-0"
|
|
13
14
|
})(["padding:", ";margin-bottom:", ";background-color:#e9ecef;border-radius:0.3em;"], (0, _spacers.spacers)(2, 1), (0, _spacers.spacer)(2));
|
|
15
|
+
|
|
16
|
+
// $FlowFixMe
|
|
14
17
|
const StyledStack = /*#__PURE__*/_styledComponents.default.pre.withConfig({
|
|
15
18
|
componentId: "sc-xsbtpo-1"
|
|
16
19
|
})(["display:block;font-size:87.5%;color:#212529;font-style:italic;"]);
|
|
@@ -12,6 +12,7 @@ export type Props = {
|
|
|
12
12
|
+error: Error,
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
+
// $FlowFixMe
|
|
15
16
|
const StyledBoundary: StyledComponent<{}, Theme, *> = styled.div`
|
|
16
17
|
padding: ${spacers(2, 1)};
|
|
17
18
|
margin-bottom: ${spacer(2)};
|
|
@@ -19,6 +20,7 @@ const StyledBoundary: StyledComponent<{}, Theme, *> = styled.div`
|
|
|
19
20
|
border-radius: 0.3em;
|
|
20
21
|
`;
|
|
21
22
|
|
|
23
|
+
// $FlowFixMe
|
|
22
24
|
const StyledStack = styled.pre`
|
|
23
25
|
display: block;
|
|
24
26
|
font-size: 87.5%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorBoundaryFallback.js","names":["StyledBoundary","styled","div","spacers","spacer","StyledStack","pre","ErrorBoundaryFallback","className","componentStack","error","toString","displayName"],"sources":["../../src/react/ErrorBoundaryFallback.js"],"sourcesContent":["// @flow\nimport styled from \"styled-components\";\nimport { spacers, spacer } from \"../react-theme/utils/spacers\";\n\nimport type { StyledComponent } from \"styled-components\";\nimport type { Theme } from \"../react-theme/types\";\nimport type { Node } from \"react\";\n\nexport type Props = {\n +className?: string,\n +componentStack: string,\n +error: Error,\n};\n\nconst StyledBoundary: StyledComponent<{}, Theme, *> = styled.div`\n padding: ${spacers(2, 1)};\n margin-bottom: ${spacer(2)};\n background-color: #e9ecef;\n border-radius: 0.3em;\n`;\n\nconst StyledStack = styled.pre`\n display: block;\n font-size: 87.5%;\n color: #212529;\n font-style: italic;\n`;\n\n/**\n */\nconst ErrorBoundaryFallback = ({\n className,\n componentStack,\n error,\n}: Props): Node => (\n <StyledBoundary className={className}>\n <h2>{error.toString()}</h2>\n <StyledStack className=\"debug\">{componentStack}</StyledStack>\n </StyledBoundary>\n);\n\nErrorBoundaryFallback.displayName = \"BI.ErrorBoundaryFallback\";\n\nexport default ErrorBoundaryFallback;\n"],"mappings":";;;;;;;AACA;AACA;AAA+D;AAY/D,MAAMA,cAA6C,gBAAGC,yBAAM,CAACC,GAAG;EAAA;AAAA,sFACnD,IAAAC,gBAAO,EAAC,CAAC,EAAE,CAAC,CAAC,EACP,IAAAC,eAAM,EAAC,CAAC,CAAC,CAG3B;
|
|
1
|
+
{"version":3,"file":"ErrorBoundaryFallback.js","names":["StyledBoundary","styled","div","spacers","spacer","StyledStack","pre","ErrorBoundaryFallback","className","componentStack","error","toString","displayName"],"sources":["../../src/react/ErrorBoundaryFallback.js"],"sourcesContent":["// @flow\nimport styled from \"styled-components\";\nimport { spacers, spacer } from \"../react-theme/utils/spacers\";\n\nimport type { StyledComponent } from \"styled-components\";\nimport type { Theme } from \"../react-theme/types\";\nimport type { Node } from \"react\";\n\nexport type Props = {\n +className?: string,\n +componentStack: string,\n +error: Error,\n};\n\n// $FlowFixMe\nconst StyledBoundary: StyledComponent<{}, Theme, *> = styled.div`\n padding: ${spacers(2, 1)};\n margin-bottom: ${spacer(2)};\n background-color: #e9ecef;\n border-radius: 0.3em;\n`;\n\n// $FlowFixMe\nconst StyledStack = styled.pre`\n display: block;\n font-size: 87.5%;\n color: #212529;\n font-style: italic;\n`;\n\n/**\n */\nconst ErrorBoundaryFallback = ({\n className,\n componentStack,\n error,\n}: Props): Node => (\n <StyledBoundary className={className}>\n <h2>{error.toString()}</h2>\n <StyledStack className=\"debug\">{componentStack}</StyledStack>\n </StyledBoundary>\n);\n\nErrorBoundaryFallback.displayName = \"BI.ErrorBoundaryFallback\";\n\nexport default ErrorBoundaryFallback;\n"],"mappings":";;;;;;;AACA;AACA;AAA+D;AAY/D;AACA,MAAMA,cAA6C,gBAAGC,yBAAM,CAACC,GAAG;EAAA;AAAA,sFACnD,IAAAC,gBAAO,EAAC,CAAC,EAAE,CAAC,CAAC,EACP,IAAAC,eAAM,EAAC,CAAC,CAAC,CAG3B;;AAED;AACA,MAAMC,WAAW,gBAAGJ,yBAAM,CAACK,GAAG;EAAA;AAAA,sEAK7B;;AAED;AACA;AACA,MAAMC,qBAAqB,GAAG;EAAA,IAAC;IAC7BC,SAAS;IACTC,cAAc;IACdC;EACK,CAAC;EAAA,oBACN,sBAAC,cAAc;IAAC,SAAS,EAAEF,SAAU;IAAA,wBACnC;MAAA,UAAKE,KAAK,CAACC,QAAQ;IAAE,EAAM,eAC3B,qBAAC,WAAW;MAAC,SAAS,EAAC,OAAO;MAAA,UAAEF;IAAc,EAAe;EAAA,EAC9C;AAAA,CAClB;AAEDF,qBAAqB,CAACK,WAAW,GAAG,0BAA0B;AAAC,eAEhDL,qBAAqB;AAAA"}
|
|
@@ -23,7 +23,8 @@ const serverNoSSR = _ref => {
|
|
|
23
23
|
theme,
|
|
24
24
|
render,
|
|
25
25
|
template,
|
|
26
|
-
beforeRenderHooks
|
|
26
|
+
beforeRenderHooks,
|
|
27
|
+
preloadApplication = true
|
|
27
28
|
} = _ref;
|
|
28
29
|
const UUID = (0, _createUUID.default)();
|
|
29
30
|
__webpack_nonce__ = UUID; // NOSONAR
|
|
@@ -38,7 +39,9 @@ const serverNoSSR = _ref => {
|
|
|
38
39
|
(0, _createTheme.default)(storedTheme, theme);
|
|
39
40
|
}
|
|
40
41
|
(0, _serverUtil.setI18n)(store, locales, request);
|
|
41
|
-
|
|
42
|
+
if (preloadApplication) {
|
|
43
|
+
(0, _serverUtil.setApplication)(store);
|
|
44
|
+
}
|
|
42
45
|
(0, _serverUtil.handleErrors)(store);
|
|
43
46
|
(0, _beforeRenderHooks.handleBeforeRenderHooks)(beforeRenderHooks, {
|
|
44
47
|
store,
|
|
@@ -34,6 +34,7 @@ type serverProps = {
|
|
|
34
34
|
render: Function,
|
|
35
35
|
template?: (TemplateProps) => string,
|
|
36
36
|
beforeRenderHooks?: Array<BeforeRenderHook>,
|
|
37
|
+
preloadApplication?: boolean,
|
|
37
38
|
};
|
|
38
39
|
|
|
39
40
|
/**
|
|
@@ -47,6 +48,7 @@ const serverNoSSR = ({
|
|
|
47
48
|
render,
|
|
48
49
|
template,
|
|
49
50
|
beforeRenderHooks,
|
|
51
|
+
preloadApplication = true,
|
|
50
52
|
}: serverProps): string => {
|
|
51
53
|
const UUID = createUUID();
|
|
52
54
|
__webpack_nonce__ = UUID; // NOSONAR
|
|
@@ -66,7 +68,9 @@ const serverNoSSR = ({
|
|
|
66
68
|
|
|
67
69
|
setI18n(store, locales, request);
|
|
68
70
|
|
|
69
|
-
|
|
71
|
+
if (preloadApplication) {
|
|
72
|
+
setApplication(store);
|
|
73
|
+
}
|
|
70
74
|
|
|
71
75
|
handleErrors(store);
|
|
72
76
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serverNoSSR.js","names":["serverNoSSR","request","locales","customReducers","serverPreferences","theme","render","template","beforeRenderHooks","UUID","createUUID","__webpack_nonce__","requestHref","getFullRequestHref","store","createReduxStore","setServerPreferences","setConfigurationTheme","storedTheme","getState","preferences","createTheme","setI18n","setApplication","handleErrors","handleBeforeRenderHooks","renderSSRMinimal"],"sources":["../../src/react-server/serverNoSSR.js"],"sourcesContent":["// @flow\nimport \"./contextPath\";\n\nimport createUUID from \"../utils/helpers/createUUID\";\nimport { getFullRequestHref } from \"./requestInformation\";\n\nimport {\n createReduxStore,\n setI18n,\n setApplication,\n setServerPreferences,\n setConfigurationTheme,\n handleErrors,\n} from \"./serverUtil\";\n\nimport { handleBeforeRenderHooks } from \"../redux/store/beforeRenderHooks\";\n\nimport renderSSRMinimal from \"./renderSSRMinimal\";\n\nimport createTheme from \"../react-theme/createTheme\";\n\nimport type { TemplateProps } from \"./htmlpage\";\nimport type { BeforeRenderHook } from \"../redux/store/beforeRenderHooks\";\nimport type { PreferenceValue } from \"./serverUtil\";\nimport type { LocaleConfiguration } from \"../i18n/types\";\nimport type { Theme } from \"../react-theme/types\";\n\ntype serverProps = {\n request: HttpServletRequestJava,\n locales?: Array<LocaleConfiguration>,\n customReducers?: Object,\n theme?: Theme | Array<Theme>,\n serverPreferences?: Array<string | PreferenceValue>,\n render: Function,\n template?: (TemplateProps) => string,\n beforeRenderHooks?: Array<BeforeRenderHook>,\n};\n\n/**\n */\nconst serverNoSSR = ({\n request,\n locales,\n customReducers,\n serverPreferences = [],\n theme,\n render,\n template,\n beforeRenderHooks,\n}: serverProps): string => {\n const UUID = createUUID();\n __webpack_nonce__ = UUID; // NOSONAR\n\n const requestHref = getFullRequestHref(request);\n\n const store = createReduxStore(requestHref, customReducers);\n\n setServerPreferences(store, serverPreferences);\n setConfigurationTheme(store);\n\n if (theme) {\n const storedTheme = store.getState()?.preferences?.theme;\n //$FlowFixMe[incompatible-call]\n createTheme(storedTheme, theme);\n }\n\n setI18n(store, locales, request);\n\n setApplication(store);\n\n handleErrors(store);\n\n handleBeforeRenderHooks(beforeRenderHooks, { store, request });\n\n return renderSSRMinimal({ store, theme, UUID, render, template });\n};\n\nexport default serverNoSSR;\n"],"mappings":";;;;;;;AACA;AAEA;AACA;AAEA;AASA;AAEA;AAEA;
|
|
1
|
+
{"version":3,"file":"serverNoSSR.js","names":["serverNoSSR","request","locales","customReducers","serverPreferences","theme","render","template","beforeRenderHooks","preloadApplication","UUID","createUUID","__webpack_nonce__","requestHref","getFullRequestHref","store","createReduxStore","setServerPreferences","setConfigurationTheme","storedTheme","getState","preferences","createTheme","setI18n","setApplication","handleErrors","handleBeforeRenderHooks","renderSSRMinimal"],"sources":["../../src/react-server/serverNoSSR.js"],"sourcesContent":["// @flow\nimport \"./contextPath\";\n\nimport createUUID from \"../utils/helpers/createUUID\";\nimport { getFullRequestHref } from \"./requestInformation\";\n\nimport {\n createReduxStore,\n setI18n,\n setApplication,\n setServerPreferences,\n setConfigurationTheme,\n handleErrors,\n} from \"./serverUtil\";\n\nimport { handleBeforeRenderHooks } from \"../redux/store/beforeRenderHooks\";\n\nimport renderSSRMinimal from \"./renderSSRMinimal\";\n\nimport createTheme from \"../react-theme/createTheme\";\n\nimport type { TemplateProps } from \"./htmlpage\";\nimport type { BeforeRenderHook } from \"../redux/store/beforeRenderHooks\";\nimport type { PreferenceValue } from \"./serverUtil\";\nimport type { LocaleConfiguration } from \"../i18n/types\";\nimport type { Theme } from \"../react-theme/types\";\n\ntype serverProps = {\n request: HttpServletRequestJava,\n locales?: Array<LocaleConfiguration>,\n customReducers?: Object,\n theme?: Theme | Array<Theme>,\n serverPreferences?: Array<string | PreferenceValue>,\n render: Function,\n template?: (TemplateProps) => string,\n beforeRenderHooks?: Array<BeforeRenderHook>,\n preloadApplication?: boolean,\n};\n\n/**\n */\nconst serverNoSSR = ({\n request,\n locales,\n customReducers,\n serverPreferences = [],\n theme,\n render,\n template,\n beforeRenderHooks,\n preloadApplication = true,\n}: serverProps): string => {\n const UUID = createUUID();\n __webpack_nonce__ = UUID; // NOSONAR\n\n const requestHref = getFullRequestHref(request);\n\n const store = createReduxStore(requestHref, customReducers);\n\n setServerPreferences(store, serverPreferences);\n setConfigurationTheme(store);\n\n if (theme) {\n const storedTheme = store.getState()?.preferences?.theme;\n //$FlowFixMe[incompatible-call]\n createTheme(storedTheme, theme);\n }\n\n setI18n(store, locales, request);\n\n if (preloadApplication) {\n setApplication(store);\n }\n\n handleErrors(store);\n\n handleBeforeRenderHooks(beforeRenderHooks, { store, request });\n\n return renderSSRMinimal({ store, theme, UUID, render, template });\n};\n\nexport default serverNoSSR;\n"],"mappings":";;;;;;;AACA;AAEA;AACA;AAEA;AASA;AAEA;AAEA;AAoBA;AACA;AACA,MAAMA,WAAW,GAAG,QAUO;EAAA,IAVN;IACnBC,OAAO;IACPC,OAAO;IACPC,cAAc;IACdC,iBAAiB,GAAG,EAAE;IACtBC,KAAK;IACLC,MAAM;IACNC,QAAQ;IACRC,iBAAiB;IACjBC,kBAAkB,GAAG;EACV,CAAC;EACZ,MAAMC,IAAI,GAAG,IAAAC,mBAAU,GAAE;EACzBC,iBAAiB,GAAGF,IAAI,CAAC,CAAC;;EAE1B,MAAMG,WAAW,GAAG,IAAAC,sCAAkB,EAACb,OAAO,CAAC;EAE/C,MAAMc,KAAK,GAAG,IAAAC,4BAAgB,EAACH,WAAW,EAAEV,cAAc,CAAC;EAE3D,IAAAc,gCAAoB,EAACF,KAAK,EAAEX,iBAAiB,CAAC;EAC9C,IAAAc,iCAAqB,EAACH,KAAK,CAAC;EAE5B,IAAIV,KAAK,EAAE;IACT,MAAMc,WAAW,GAAGJ,KAAK,CAACK,QAAQ,EAAE,EAAEC,WAAW,EAAEhB,KAAK;IACxD;IACA,IAAAiB,oBAAW,EAACH,WAAW,EAAEd,KAAK,CAAC;EACjC;EAEA,IAAAkB,mBAAO,EAACR,KAAK,EAAEb,OAAO,EAAED,OAAO,CAAC;EAEhC,IAAIQ,kBAAkB,EAAE;IACtB,IAAAe,0BAAc,EAACT,KAAK,CAAC;EACvB;EAEA,IAAAU,wBAAY,EAACV,KAAK,CAAC;EAEnB,IAAAW,0CAAuB,EAAClB,iBAAiB,EAAE;IAAEO,KAAK;IAAEd;EAAQ,CAAC,CAAC;EAE9D,OAAO,IAAA0B,yBAAgB,EAAC;IAAEZ,KAAK;IAAEV,KAAK;IAAEK,IAAI;IAAEJ,MAAM;IAAEC;EAAS,CAAC,CAAC;AACnE,CAAC;AAAC,eAEaP,WAAW;AAAA"}
|
|
@@ -141,6 +141,7 @@ const setApplication = store => {
|
|
|
141
141
|
const application = new _ModularUIRequest.default("/", {
|
|
142
142
|
locale: locale
|
|
143
143
|
}).fetchSync();
|
|
144
|
+
application.connectKey = `application(/)(${locale})`;
|
|
144
145
|
store.dispatch((0, _redux.initModels)([{
|
|
145
146
|
key: `application(/)(${locale})`,
|
|
146
147
|
model: application
|