@beinformed/react 1.0.0-beta.1 → 1.0.0-beta.2
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 +8 -0
- package/dist/chunk-4IDEBSD5.js +2 -0
- package/dist/chunk-4IDEBSD5.js.map +1 -0
- package/dist/chunk-6AKWSGWH.js +2 -0
- package/dist/chunk-6AKWSGWH.js.map +1 -0
- package/dist/{chunk-LYHN5GC6.js → chunk-6EK3TAMN.js} +2 -2
- package/dist/{chunk-3UHZ6GBP.js → chunk-BV77KA4Y.js} +2 -2
- package/dist/{chunk-GHKA2XFO.js → chunk-ITSZQHGD.js} +2 -2
- package/dist/chunk-ITSZQHGD.js.map +1 -0
- package/dist/chunk-JWOBKHOJ.js +2 -0
- package/dist/chunk-JWOBKHOJ.js.map +1 -0
- package/dist/{chunk-X6L6BWD4.js → chunk-KZB56W7Q.js} +2 -2
- package/dist/chunk-KZB56W7Q.js.map +1 -0
- package/dist/{chunk-LJM2ADG6.js → chunk-KZLW2NHD.js} +2 -2
- package/dist/{chunk-7LGDJBGK.js → chunk-OQK6SSUD.js} +2 -2
- package/dist/{chunk-ALGSLJJI.js → chunk-SPV6MD7J.js} +2 -2
- package/dist/{chunk-ZNJONDQ6.js → chunk-TAWZ2VIM.js} +2 -2
- package/dist/chunk-VXOYOMNN.js +2 -0
- package/dist/chunk-VXOYOMNN.js.map +1 -0
- package/dist/chunk-WEJGEXAP.js +2 -0
- package/dist/chunk-WEJGEXAP.js.map +1 -0
- package/dist/client/index.cjs +1 -1
- package/dist/client/index.cjs.map +1 -1
- package/dist/client/index.js +1 -1
- package/dist/hooks/index.cjs +1 -1
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.cts +79 -8
- package/dist/hooks/index.d.ts +79 -8
- package/dist/hooks/index.js +1 -1
- package/dist/i18n/index.cjs +1 -1
- package/dist/i18n/index.cjs.map +1 -1
- package/dist/i18n/index.d.cts +20 -2
- package/dist/i18n/index.d.ts +20 -2
- package/dist/i18n/index.js +1 -1
- package/dist/index.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/redux/index.cjs +1 -1
- package/dist/redux/index.cjs.map +1 -1
- package/dist/redux/index.d.cts +3 -3
- package/dist/redux/index.d.ts +3 -3
- package/dist/redux/index.js +1 -1
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.js +1 -1
- package/dist/theme/index.cjs +1 -1
- package/dist/theme/index.cjs.map +1 -1
- package/dist/theme/index.js +1 -1
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.cts +6 -1
- package/dist/utils/index.d.ts +6 -1
- package/dist/utils/index.js +1 -1
- package/package.json +7 -7
- package/dist/chunk-5MOCT43G.js +0 -2
- package/dist/chunk-5MOCT43G.js.map +0 -1
- package/dist/chunk-AMFWIR2R.js +0 -2
- package/dist/chunk-AMFWIR2R.js.map +0 -1
- package/dist/chunk-GHKA2XFO.js.map +0 -1
- package/dist/chunk-JYAETKRB.js +0 -2
- package/dist/chunk-JYAETKRB.js.map +0 -1
- package/dist/chunk-LUXTQYD2.js +0 -2
- package/dist/chunk-LUXTQYD2.js.map +0 -1
- package/dist/chunk-TRPPQFNA.js +0 -2
- package/dist/chunk-TRPPQFNA.js.map +0 -1
- package/dist/chunk-TYEAR2B7.js +0 -2
- package/dist/chunk-TYEAR2B7.js.map +0 -1
- package/dist/chunk-X6L6BWD4.js.map +0 -1
- /package/dist/{chunk-LYHN5GC6.js.map → chunk-6EK3TAMN.js.map} +0 -0
- /package/dist/{chunk-3UHZ6GBP.js.map → chunk-BV77KA4Y.js.map} +0 -0
- /package/dist/{chunk-LJM2ADG6.js.map → chunk-KZLW2NHD.js.map} +0 -0
- /package/dist/{chunk-7LGDJBGK.js.map → chunk-OQK6SSUD.js.map} +0 -0
- /package/dist/{chunk-ALGSLJJI.js.map → chunk-SPV6MD7J.js.map} +0 -0
- /package/dist/{chunk-ZNJONDQ6.js.map → chunk-TAWZ2VIM.js.map} +0 -0
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { ComponentType, Ref } from 'react';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Model overview swim lane configuration
|
|
5
|
+
*/
|
|
6
|
+
declare const getSwimLaneDiagramConfiguration: () => string;
|
|
7
|
+
|
|
3
8
|
declare const getDisplayName: (WrappedComponent: ComponentType<never>, defaultName?: string, contextId?: string) => string;
|
|
4
9
|
declare const mergeRefs: <T>(refs: Ref<T>[]) => Ref<T>;
|
|
5
10
|
|
|
6
|
-
export { getDisplayName, mergeRefs };
|
|
11
|
+
export { getDisplayName, getSwimLaneDiagramConfiguration, mergeRefs };
|
package/dist/utils/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../chunk-
|
|
1
|
+
import{a,b,c}from"../chunk-WEJGEXAP.js";import"../chunk-FW4363Y4.js";export{b as getDisplayName,a as getSwimLaneDiagramConfiguration,c as mergeRefs};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@beinformed/react",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.2",
|
|
4
4
|
"description": "Be Informed UI React",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"deepmerge": "^4.3.1",
|
|
29
29
|
"dequal": "^2.0.3",
|
|
30
30
|
"format-message": "^6.2.4",
|
|
31
|
-
"immer": "^11.1.
|
|
31
|
+
"immer": "^11.1.4",
|
|
32
32
|
"js-cookie": "^3.0.5",
|
|
33
33
|
"reselect": "^5.1.1",
|
|
34
|
-
"@beinformed/ui": "2.0.0-beta.
|
|
34
|
+
"@beinformed/ui": "2.0.0-beta.2"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@dr.pogodin/react-helmet": "^3.0.6",
|
|
@@ -41,20 +41,20 @@
|
|
|
41
41
|
"@types/big.js": "^6.2.2",
|
|
42
42
|
"@types/history": "^4.0.0",
|
|
43
43
|
"@types/js-cookie": "^3.0.6",
|
|
44
|
-
"@types/react": "^19.2.
|
|
44
|
+
"@types/react": "^19.2.14",
|
|
45
45
|
"@types/react-dom": "^19.2.3",
|
|
46
46
|
"@types/react-router": "^5.1.20",
|
|
47
47
|
"@types/setimmediate": "^1.0.4",
|
|
48
48
|
"history": "^4.0.0",
|
|
49
|
-
"msw": "^2.12.
|
|
49
|
+
"msw": "^2.12.10",
|
|
50
50
|
"polished": "^4.3.1",
|
|
51
51
|
"react": "^19.2.4",
|
|
52
52
|
"react-dom": "^19.2.4",
|
|
53
53
|
"react-redux": "^9.2.0",
|
|
54
54
|
"react-router": "^5.0.0",
|
|
55
55
|
"redux": "^5.0.1",
|
|
56
|
-
"styled-components": "^6.3.
|
|
57
|
-
"@beinformed/typescript-config": "0.0.0"
|
|
56
|
+
"styled-components": "^6.3.11",
|
|
57
|
+
"@beinformed/typescript-config": "0.0.1-beta.0"
|
|
58
58
|
},
|
|
59
59
|
"exports": {
|
|
60
60
|
"./client": {
|
package/dist/chunk-5MOCT43G.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as r,b as a}from"./chunk-JYAETKRB.js";import{g as l,i as s}from"./chunk-HTR32BUX.js";import{b as p}from"./chunk-FW4363Y4.js";var i=p(l(),1);import{createSelector as n}from"reselect";var g=n([a,r],(e,t)=>(0,i.default)((o,m,c)=>e.getLocale(t).getMessage(o,m,c),(...o)=>JSON.stringify(o))),M=(e,t,o)=>s(g)(e,t,o),x=()=>s(g),S=()=>s(r),d=n(e=>e.i18n.locales,e=>e.map(t=>t.code)),y=()=>s(d);export{M as a,x as b,S as c,y as d};
|
|
2
|
-
//# sourceMappingURL=chunk-5MOCT43G.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/hooks/useI18n.ts"],"sourcesContent":["import memoize from \"lodash/memoize\";\nimport { createSelector } from \"reselect\";\n\nimport { useBEISelector } from \"../redux/hooks\";\nimport { getLocale, getLocales } from \"../redux/i18n/i18nSelectors\";\n\nimport type { MessageParameters } from \"@beinformed/ui/types\";\nimport type { RootState } from \"../redux/store\";\n\nconst getMessage = createSelector(\n [getLocales, getLocale],\n (locales, localeCode) =>\n memoize(\n (\n id: string,\n defaultMessage?: string,\n placeholders?: MessageParameters | undefined,\n ) =>\n locales\n .getLocale(localeCode)\n .getMessage(id, defaultMessage, placeholders),\n (...args) => JSON.stringify(args),\n ),\n);\n\nexport const useMessage = (\n id: string,\n defaultMessage?: string,\n placeholders?: MessageParameters | undefined,\n) => useBEISelector(getMessage)(id, defaultMessage, placeholders);\n\nexport const useTranslate = () => useBEISelector(getMessage);\n\nexport const useLocale = (): string => useBEISelector(getLocale);\n\nconst getLocaleCodes = createSelector(\n (state: RootState) => state.i18n.locales,\n (locales) => locales.map((locale: { code: string }) => locale.code),\n);\n\n/**\n * Retrieve all available locale codes\n */\nexport const useLocaleCodes = (): string[] => useBEISelector(getLocaleCodes);\n"],"mappings":"sIAAA,IAAAA,EAAoB,SACpB,OAAS,kBAAAC,MAAsB,WAQ/B,IAAMC,EAAaC,EACjB,CAACC,EAAYC,CAAS,EACtB,CAACC,EAASC,OACR,EAAAC,SACE,CACEC,EACAC,EACAC,IAEAL,EACG,UAAUC,CAAU,EACpB,WAAWE,EAAIC,EAAgBC,CAAY,EAChD,IAAIC,IAAS,KAAK,UAAUA,CAAI,CAClC,CACJ,EAEaC,EAAa,CACxBJ,EACAC,EACAC,IACGG,EAAeZ,CAAU,EAAEO,EAAIC,EAAgBC,CAAY,EAEnDI,EAAe,IAAMD,EAAeZ,CAAU,EAE9Cc,EAAY,IAAcF,EAAeT,CAAS,EAEzDY,EAAiBd,EACpBe,GAAqBA,EAAM,KAAK,QAChCZ,GAAYA,EAAQ,IAAKa,GAA6BA,EAAO,IAAI,CACpE,EAKaC,EAAiB,IAAgBN,EAAeG,CAAc","names":["import_memoize","createSelector","getMessage","createSelector","getLocales","getLocale","locales","localeCode","memoize","id","defaultMessage","placeholders","args","useMessage","useBEISelector","useTranslate","useLocale","getLocaleCodes","state","locale","useLocaleCodes"]}
|
package/dist/chunk-AMFWIR2R.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/utils/utils.ts"],"sourcesContent":["import type { ComponentType, Ref } from \"react\";\n\nexport const getDisplayName = (\n WrappedComponent: ComponentType<never>,\n defaultName = \"Component\",\n contextId?: string,\n) => {\n const componentName =\n WrappedComponent.displayName || WrappedComponent.name || defaultName;\n\n if (contextId) {\n return `${componentName}[${contextId}]`;\n }\n\n return componentName;\n};\n\nexport const mergeRefs =\n <T>(refs: Ref<T>[]): Ref<T> =>\n (value) => {\n refs.forEach((ref) => {\n if (typeof ref === \"function\") {\n ref(value);\n } else if (ref != null && typeof ref === \"object\") {\n (ref as { current: T | null }).current = value;\n }\n });\n };\n"],"mappings":"AAEO,IAAMA,EAAiB,CAC5BC,EACAC,EAAc,YACdC,IACG,CACH,IAAMC,EACJH,EAAiB,aAAeA,EAAiB,MAAQC,EAE3D,OAAIC,EACK,GAAGC,CAAa,IAAID,CAAS,IAG/BC,CACT,EAEaC,EACPC,GACHC,GAAU,CACTD,EAAK,QAASE,GAAQ,CAChB,OAAOA,GAAQ,WACjBA,EAAID,CAAK,EACAC,GAAO,MAAQ,OAAOA,GAAQ,WACtCA,EAA8B,QAAUD,EAE7C,CAAC,CACH","names":["getDisplayName","WrappedComponent","defaultName","contextId","componentName","mergeRefs","refs","value","ref"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_isIndex.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isLength.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_hasPath.js","../src/redux/auth/authReducer.ts","../src/redux/modelcatalog/modelCatalogReducer.ts","../src/redux/notifications/notificationReducer.ts","../src/redux/notifications/notificationActions.ts","../src/redux/progressindicator/progressIndicatorActions.ts","../src/redux/router/routerActions.ts","../src/redux/error/errorReducer.ts","../src/redux/modals/modalsReducer.ts","../src/redux/modularui/constants.ts","../src/redux/modularui/modelActions.ts","../src/redux/shared/selectors.ts","../src/redux/application/applicationSelectors.ts","../src/redux/application/applicationActions.ts","../src/redux/modularui/fetchModel.ts","../src/redux/error/errorActions.ts","../src/redux/auth/unauthorizedActions.ts","../src/redux/shared/actions.ts","../src/redux/modularui/utils.ts"],"sourcesContent":["/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var castPath = require('./_castPath'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isIndex = require('./_isIndex'),\n isLength = require('./isLength'),\n toKey = require('./_toKey');\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n}\n\nmodule.exports = hasPath;\n","import { createAction, createReducer } from \"@reduxjs/toolkit\";\n\nexport interface AuthState {\n authenticated: boolean;\n mustChangePassword: boolean;\n error: string | null;\n}\n\nconst initalState: AuthState = {\n authenticated: false,\n mustChangePassword: false,\n error: null,\n};\n\nexport const loginSuccess = createAction(\"AUTHENTICATION_SUCCESS\");\n\nexport const logoutSuccess = createAction(\"AUTHENTICATION_LOGOUT\");\n\nexport const sendAuthenticationError = createAction(\n \"AUTHENTICATION_ERROR\",\n (errorMessage: string) => {\n return {\n payload: errorMessage,\n };\n },\n);\n\nexport const resetAuthErrors = createAction(\"AUTHENTICATION_RESET_ERRORS\");\n\nexport const saveChangePassword = createAction(\"CHANGE_PASSWORD\");\n\nexport const authReducer = createReducer(initalState, (builder) => {\n builder\n .addCase(loginSuccess, (state) => {\n state.authenticated = true;\n state.error = null;\n state.mustChangePassword = false;\n })\n .addCase(sendAuthenticationError, (state, action) => {\n state.authenticated = false;\n state.error = action.payload;\n state.mustChangePassword = false;\n })\n .addCase(resetAuthErrors, (state) => {\n state.error = null;\n })\n .addCase(logoutSuccess, (state) => {\n state.authenticated = false;\n state.error = null;\n state.mustChangePassword = false;\n })\n .addCase(saveChangePassword, (state) => {\n state.authenticated = true;\n state.error = null;\n state.mustChangePassword = true;\n });\n});\n","import { createAction, createReducer } from \"@reduxjs/toolkit\";\n\nimport { Cache } from \"@beinformed/ui/utils\";\n\nexport interface ModelCatalogState {\n entryDate: string | undefined;\n}\n\nexport const updateEntryDate = createAction(\n \"UPDATE_ENTRYDATE\",\n (entryDate: string) => {\n return {\n payload: entryDate,\n };\n },\n);\n\nconst initialState: ModelCatalogState = {\n entryDate: new Date().toISOString().split(\"T\")[0],\n};\n\n/**\n * Keep track of the entry date for the modelcatalog\n */\nexport const modelCatalogReducer = createReducer<ModelCatalogState>(\n initialState,\n (builder) => {\n builder.addCase(updateEntryDate, (state, action) => {\n Cache.addItem(\"ModelCatalogEntryDate\", action.payload);\n\n state.entryDate = action.payload;\n });\n },\n);\n","import {\n createAction,\n createAsyncThunk,\n createReducer,\n} from \"@reduxjs/toolkit\";\n\nimport type { ErrorResponse } from \"@beinformed/ui/models\";\nimport type { MessageObject } from \"../../i18n/types\";\n\nexport interface NotificationState {\n render: boolean;\n messageType: string | undefined;\n message: MessageObject | undefined;\n error: ErrorResponse | undefined;\n}\n\nexport interface ShowNotificationArguments {\n type: NOTIFICATION_TYPES | undefined;\n message: MessageObject | undefined;\n error?: ErrorResponse | undefined;\n timeout?: number;\n}\n\nexport enum NOTIFICATION_TYPES {\n SUCCESS = \"SUCCESS\",\n INFO = \"INFO\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\",\n}\n\nconst saveNotification = createAction(\n \"SHOW_NOTIFICATION\",\n (\n type: NOTIFICATION_TYPES | undefined,\n message: MessageObject | undefined,\n error?: ErrorResponse | undefined,\n ) => {\n return {\n payload: {\n type,\n message,\n error,\n },\n };\n },\n);\n\nexport const showNotification = createAsyncThunk(\n \"notifications/show\",\n (\n { type, message, error, timeout }: ShowNotificationArguments,\n { dispatch },\n ) => {\n if (timeout) {\n setTimeout(() => {\n dispatch(dismissNotification());\n }, timeout);\n }\n\n dispatch(saveNotification(type, message, error));\n },\n);\n\nexport const dismissNotification = createAction(\"DISMISS_NOTIFICATION\");\n\nconst initialState: NotificationState = {\n render: false,\n messageType: undefined,\n message: undefined,\n error: undefined,\n};\n\nexport const notificationReducer = createReducer<NotificationState>(\n initialState,\n (builder) => {\n builder\n .addCase(saveNotification, (state, action) => {\n return {\n ...state,\n render: true,\n messageType: action.payload.type,\n message: action.payload.message,\n error: action.payload.error,\n };\n })\n .addCase(dismissNotification, (state) => {\n return {\n ...state,\n render: false,\n messageType: undefined,\n message: undefined,\n error: undefined,\n };\n });\n },\n);\n","import { createAsyncThunk } from \"@reduxjs/toolkit\";\n\nimport { getNumberSetting } from \"@beinformed/ui/settings\";\n\nimport {\n finishProgress,\n startProgress,\n} from \"../progressindicator/progressIndicatorActions\";\n\nimport {\n dismissNotification,\n NOTIFICATION_TYPES,\n showNotification,\n} from \"./notificationReducer\";\n\nimport type { ErrorResponse, FormModel } from \"@beinformed/ui/models\";\n\nconst getNotificationMessageId = (form: FormModel) => {\n if (form.actiontype === \"create\") {\n return \"Notification.Msg.Create\";\n }\n\n if (form.actiontype === \"update\") {\n return \"Notification.Msg.Update\";\n }\n\n if (form.actiontype === \"delete\") {\n return \"Notification.Msg.Delete\";\n }\n\n return \"Notification.Msg.Generic\";\n};\n\n/**\n * Show form notification\n */\nexport const showFormNotification = createAsyncThunk(\n \"notification/show_form\",\n async (form: FormModel, { dispatch }) => {\n dispatch(startProgress());\n\n dispatch(\n showNotification({\n type: NOTIFICATION_TYPES.SUCCESS,\n message: {\n id: getNotificationMessageId(form),\n },\n }),\n );\n\n setTimeout(() => {\n dispatch(dismissNotification());\n }, getNumberSetting(\"HIDE_NOTIFICATION_TIMEOUT\"));\n\n return dispatch(finishProgress());\n },\n);\n\n/**\n * Show error notification\n */\nexport const showXHRErrorNotification = (error: ErrorResponse) => {\n return showNotification({\n type: NOTIFICATION_TYPES.ERROR,\n message: {\n id: error.id,\n defaultMessage: error.message,\n parameters: error.properties,\n },\n error,\n });\n};\n","import { createAction } from \"@reduxjs/toolkit\";\n\nexport const startProgress = createAction(\"START_PROGRESS\");\nexport const finishProgress = createAction(\"FINISH_PROGRESS\");\nexport const resetProgress = createAction(\"RESET_PROGRESS\");\nexport const updateProgress = createAction(\n \"UPDATE_PROGRESS\",\n (percentComplete: number) => ({\n payload: {\n percentComplete,\n },\n }),\n);\n","import { createAction } from \"@reduxjs/toolkit\";\n\nimport type { LocationState } from \"history\";\nimport type { RouterLocation } from \"./routerReducer\";\n\nexport const push = createAction(\n \"ROUTER/PUSH\",\n (location: RouterLocation | string, state?: LocationState) => {\n return {\n payload: { location, state },\n };\n },\n);\n\nexport const replace = createAction(\n \"ROUTER/REPLACE\",\n (location: RouterLocation | string, state?: LocationState) => {\n return {\n payload: { location, state },\n };\n },\n);\n\nexport const go = createAction(\"ROUTER/GO\", (delta: number) => {\n return {\n payload: { delta },\n };\n});\n\nexport const goBack = createAction(\"ROUTER/GOBACK\");\n\nexport const goForward = createAction(\"ROUTER/GOFORWARD\");\n","import { createAction, createReducer } from \"@reduxjs/toolkit\";\n\nimport type { ErrorResponse } from \"@beinformed/ui/models\";\n\nexport type ErrorState = null | ErrorResponse;\n\nexport const saveError = createAction(\"SAVE_ERROR\", (error: ErrorResponse) => {\n return {\n payload: error,\n };\n});\n\nconst initialState = null;\n\nexport const errorReducer = createReducer<ErrorState>(\n initialState,\n (builder) => {\n builder.addCase(saveError, (_state, action) => {\n return action.payload;\n });\n },\n);\n","import { createAction, createReducer } from \"@reduxjs/toolkit\";\n\nexport interface ModalState {\n key: string;\n visible: boolean;\n size?: string;\n}\n\nexport interface ModalsState {\n modals: ModalState[];\n}\n\nexport const showModal = createAction(\"SHOW_MODAL\", (key: string) => {\n return {\n payload: key,\n };\n});\n\nexport const closeModal = createAction(\"CLOSE_MODAL\", (key: string) => {\n return {\n payload: key,\n };\n});\n\nconst initialState: ModalsState = {\n modals: [],\n};\n\nexport const modalsReducer = createReducer(initialState, (builder) => {\n builder\n .addCase(showModal, (state, action) => {\n const key = action.payload;\n\n // Hide all modals\n state.modals.forEach((modal) => {\n modal.visible = false;\n });\n\n // Find existing modal\n const existing = state.modals.find((modal) => modal.key === key);\n\n if (existing) {\n existing.visible = true;\n } else {\n state.modals.push({ key, visible: true });\n }\n })\n .addCase(closeModal, (state, action) => {\n const key = action.payload;\n\n // Remove the modal\n state.modals = state.modals.filter((modal) => modal.key !== key);\n\n // Show the last modal (if any)\n const last = state.modals[state.modals.length - 1];\n if (last) {\n last.visible = true;\n }\n });\n});\n","export enum MODULARUI_STATUS {\n IDLE = \"IDLE\",\n LOADING = \"LOADING\",\n FINISHED = \"FINISHED\",\n ERROR = \"ERROR\",\n}\n","import { createAction } from \"@reduxjs/toolkit\";\n\nimport type { ErrorResponse, ModularUIModel } from \"@beinformed/ui/models\";\n\nexport const updateErrorStatus = createAction(\n \"MODULARUI/ERROR_STATUS\",\n (key: string, error: ErrorResponse) => {\n return {\n payload: {\n key,\n error,\n },\n };\n },\n);\n\nexport const setModel = createAction(\n \"MODULARUI/SET\",\n (key: string, model: ModularUIModel) => {\n model.connectKey = key;\n return {\n payload: {\n key,\n model,\n },\n };\n },\n);\n\nexport const initModels = createAction(\n \"MODULARUI/INIT\",\n (models: { key: string; model: ModularUIModel }[]) => {\n return {\n payload: models,\n };\n },\n);\n\nexport const updateModel = createAction(\n \"MODULARUI/UPDATE\",\n (model: ModularUIModel) => {\n return {\n payload: model,\n };\n },\n);\n\nexport const updateForm = createAction(\n \"MODULARUI/UPDATE_FORM\",\n (model: ModularUIModel) => {\n return {\n payload: model,\n };\n },\n);\n\nexport const removeModelByKey = createAction(\n \"MODULARUI/REMOVE_KEY\",\n (key: string) => {\n return {\n payload: key,\n };\n },\n);\n\n/**\n * Removes all models except the application model from the modular ui reducer\n */\nexport const resetModularUI = createAction(\"MODULARUI/RESET\");\n","import { createSelector } from \"reselect\";\n\nimport { ContentModel, ContentTOCModel, Href } from \"@beinformed/ui/models\";\n\nimport { MODULARUI_STATUS } from \"../modularui/constants\";\n\nimport type {\n ContentLinkModel,\n ModularUIModel,\n ResourceModel,\n} from \"@beinformed/ui/models\";\nimport type { RootState } from \"../store\";\n\n/**\n * Helper to get the current pathname from the router state.\n * @private\n */\nconst getLocation = (state: RootState) => state?.router?.location?.pathname;\n\n/**\n * Retrieves all models from the state that are instances of the specified class\n * and match the current application locale.\n * @template T - A class constructor extending ResourceModel.\n * @param {RootState} state - The Redux root state.\n * @param {T} instance - The model class to filter by (e.g., TaskModel).\n * @returns {InstanceType<T>[]} An array of model instances.\n */\nexport const getAllModelsByInstance = <\n T extends new (...args: never[]) => ResourceModel,\n>(\n state: RootState,\n instance: T,\n): InstanceType<T>[] => {\n const locale = state?.i18n?.locale || \"en\";\n const modularui = state?.modularui;\n\n if (modularui) {\n return Object.keys(modularui)\n .filter((key) => {\n const modelEntry = modularui[key];\n if (!modelEntry?.model) {\n return false;\n }\n return (\n modelEntry.model instanceof instance &&\n modelEntry.model.locale === locale\n );\n })\n .map((key) => modularui[key].model as InstanceType<T>);\n }\n\n return [];\n};\n\n/**\n * Finds the first occurrence of a model in the state that is an instance of the\n * provided class and matches the current locale.\n * @template T - A class constructor extending ResourceModel.\n * @param {RootState} state - The Redux root state.\n * @param {T} instance - The model class to look for.\n * @returns {InstanceType<T> | undefined} The first matching model instance or undefined.\n */\nexport const getFirstModelByInstance = <\n T extends new (...args: never[]) => ResourceModel,\n>(\n state: RootState,\n instance: T,\n): InstanceType<T> | undefined => {\n const modularui = state?.modularui;\n if (modularui) {\n const locale = state.i18n.locale || \"en\";\n\n const key = Object.keys(modularui).find((key) => {\n const modelEntry = modularui[key];\n if (!modelEntry?.model) {\n return false;\n }\n return (\n modelEntry.model instanceof instance &&\n modelEntry.model.locale === locale\n );\n });\n\n if (key) {\n const modelEntry = modularui[key];\n if (modelEntry?.model instanceof instance) {\n return modelEntry.model as InstanceType<T>;\n }\n }\n }\n\n return undefined;\n};\n\n/**\n * Finds the model that is currently \"active\" based on the current URL path.\n * Matches by instance type, locale, and verifies if the current location starts\n * with the model's selfhref path.\n * @template T - A class constructor extending ResourceModel.\n * @param {RootState} state - The Redux root state.\n * @param {T} instance - The model class to filter by.\n * @returns {InstanceType<T> | undefined} The active model instance or undefined.\n */\nexport const getActiveModelByInstance = <\n T extends new (...args: never[]) => ResourceModel,\n>(\n state: RootState,\n instance: T,\n) => {\n const location = getLocation(state);\n\n const locale = state?.i18n?.locale || \"en\";\n const modularui = state?.modularui;\n\n if (modularui) {\n const key = Object.keys(modularui).find((key) => {\n const modelEntry = modularui[key];\n if (!modelEntry?.model) {\n return false;\n }\n return (\n modelEntry.model instanceof instance &&\n modelEntry.model.locale === locale &&\n location?.startsWith(modelEntry.model.selfhref?.path || \"\")\n );\n });\n\n if (key) {\n const modelEntry = modularui[key];\n if (modelEntry?.model instanceof instance) {\n return modelEntry.model as InstanceType<T>;\n }\n }\n }\n\n return undefined;\n};\n\n/**\n * Retrieves a specific model from the store by comparing its selfhref.\n * @param {RootState} state - The Redux root state.\n * @param {Href | string} href - The href to search for.\n * @returns {ModularUIModel | undefined} The matching model or undefined.\n */\nexport const modelByHref = (state: RootState, href: Href | string) => {\n if (state?.modularui) {\n const findHref = href instanceof Href ? href : new Href(href);\n\n const modelConfigKey = Object.keys(state.modularui).find((key) => {\n const model = state.modularui[key];\n\n return model.model?.selfhref?.equals(findHref);\n });\n\n if (modelConfigKey) {\n return state.modularui[modelConfigKey].model;\n }\n }\n\n return undefined;\n};\n\n/**\n * Return the unique state key of a model found by its selfhref.\n * @param {RootState} state - The Redux root state.\n * @param {Href | string} href - The href to search for.\n * @returns {string | undefined} The internal state key or undefined.\n */\nexport const keyByHref = (state: RootState, href: Href | string) => {\n if (state?.modularui) {\n const findHref = href instanceof Href ? href : new Href(href);\n\n return Object.keys(state.modularui).find((key) => {\n const { model } = state.modularui[key];\n return model?.selfhref?.equals(findHref);\n });\n }\n\n return undefined;\n};\n\n/**\n * Returns all keys for models that match a specific href.\n * @param {RootState} state - The Redux root state.\n * @param {Href | string} href - The href to filter keys by.\n * @returns {string[]} An array of state keys.\n */\nexport const allKeysByHref = (state: RootState, href: Href | string) => {\n if (state?.modularui) {\n const findHref = href instanceof Href ? href : new Href(href);\n\n return Object.keys(state.modularui).filter((key) => {\n const modelEntry = state.modularui[key];\n if (modelEntry) {\n return modelEntry.model?.selfhref?.equals(findHref);\n }\n });\n }\n\n return [];\n};\n\n/**\n * Memoized selector that maps the flat modularui state into a simplified array of\n * model metadata, including content links for specific content models.\n * @returns {Array<Object>} List of model metadata objects.\n */\nconst getModels = createSelector(\n [(state: RootState) => state.modularui],\n (modularui) => {\n const models: {\n selfContentLink: ContentLinkModel | null;\n key: string;\n selfhref: Href | undefined;\n label: string;\n type: string;\n }[] = [];\n\n if (!modularui) return models;\n\n Object.keys(modularui).forEach((modelKey: string) => {\n const modelEntry = modularui[modelKey];\n\n if (modelEntry && \"model\" in modelEntry) {\n const { key, selfhref, label, type } =\n modelEntry.model as ModularUIModel;\n\n const modelInfo = {\n key,\n selfhref,\n label,\n type,\n selfContentLink: null,\n };\n\n if (\n modelEntry.model instanceof ContentModel ||\n modelEntry.model instanceof ContentTOCModel\n ) {\n models.push({\n ...modelInfo,\n selfContentLink: modelEntry.model.selfContentLink,\n });\n } else {\n models.push(modelInfo);\n }\n }\n });\n\n return models;\n },\n);\n\n/**\n * Memoized selector that returns a \"context\" of active models based on the current path segments.\n * Useful for breadcrumbs or determining nested model hierarchy.\n * @returns {Array<Object>} Array of active models found in the current URL path.\n */\nexport const getActiveModels = createSelector(\n [getLocation, getModels],\n (location, models) => {\n if (!location || !models.length) return [];\n\n const modelMap = new Map(\n models.filter((m) => m.selfhref).map((m) => [m.selfhref?.toString(), m]),\n );\n\n const contextModels: {\n key: string;\n href: Href | undefined;\n label: string;\n type: string;\n }[] = [];\n const locationParts = location.split(\"/\");\n let currentPath = \"\";\n\n locationParts.forEach((part) => {\n currentPath = currentPath === \"/\" ? `/${part}` : `${currentPath}/${part}`;\n\n const comparePath = decodeURIComponent(currentPath).replace(\n \"/modelcatalog/\",\n \"/\",\n );\n\n const foundEntry = modelMap.get(comparePath);\n\n if (foundEntry) {\n const { key, label, type, selfhref, selfContentLink } = foundEntry;\n\n const href =\n currentPath.startsWith(\"/modelcatalog/\") && selfContentLink\n ? new Href(`/modelcatalog${selfContentLink.encodedHref.toString()}`)\n : selfhref;\n\n contextModels.push({ key, href, label, type });\n }\n });\n\n return contextModels;\n },\n);\n\n/**\n * Retrieves all models from the state that have a status of 'FINISHED'.\n * @returns {ModularUIModel[]} Array of finished model instances.\n */\nexport const getAllFinishedModels = createSelector(\n (state: RootState) => state.modularui,\n (modularui) => {\n if (modularui) {\n return Object.keys(modularui)\n .filter(\n (key) =>\n modularui[key] &&\n modularui[key].status === MODULARUI_STATUS.FINISHED,\n )\n .map((key) => modularui[key].model);\n }\n return [];\n },\n);\n","import { ApplicationModel } from \"@beinformed/ui/models\";\n\nimport type { RootState } from \"../store\";\n\n/**\n * Get the application model, which is the model with selfhref '/'\n */\nexport const getApplication = (state: RootState) => {\n const locale = state.i18n.locale || \"en\";\n const modularui = state.modularui;\n\n if (modularui) {\n const key = Object.keys(modularui).find((key) => {\n const modelEntry = modularui[key];\n if (!modelEntry?.model) {\n return false;\n }\n return (\n modelEntry.model instanceof ApplicationModel &&\n modelEntry.model.locale === locale\n );\n });\n\n if (key) {\n return modularui[key] as unknown as ApplicationModel;\n }\n }\n\n return undefined;\n};\n","import { createAsyncThunk } from \"@reduxjs/toolkit\";\n\nimport { ApplicationModel, Href } from \"@beinformed/ui/models\";\n\nimport { getLocale } from \"../i18n/i18nSelectors\";\nimport { fetchModel } from \"../modularui/fetchModel\";\nimport { removeModelByKey } from \"../modularui/modelActions\";\nimport { allKeysByHref } from \"../shared/selectors\";\n\nimport { getApplication } from \"./applicationSelectors\";\n\nimport type { BEIDispatch, RootState } from \"../store\";\n\nexport const reloadApplication = createAsyncThunk<\n void,\n void,\n { dispatch: BEIDispatch; state: RootState; extra: unknown }\n>(\"application/reload\", async (_, { dispatch, getState }) => {\n const state = getState();\n\n const applicationHref = new Href(\"/\", \"Application\");\n\n const application = getApplication(state);\n if (application) {\n if (application.contextPath) {\n applicationHref.contextPath = application.contextPath;\n }\n if (application.origin) {\n applicationHref.origin = application.origin;\n }\n }\n\n const allKeys = allKeysByHref(state, applicationHref);\n for (const key of allKeys) {\n dispatch(removeModelByKey(key));\n }\n\n const locale = getLocale(state);\n const modelKey = `application(/)(${locale}`;\n\n await dispatch(\n fetchModel({\n key: modelKey,\n href: applicationHref,\n options: {\n targetModel: ApplicationModel,\n },\n }),\n );\n});\n","import { createAsyncThunk } from \"@reduxjs/toolkit\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport { ErrorResponse, Href } from \"@beinformed/ui/models\";\nimport { ModularUIRequest } from \"@beinformed/ui/modularui\";\n\nimport { handleError } from \"../error/errorActions\";\n\nimport { MODULARUI_STATUS } from \"./constants\";\nimport { removeModelByKey, updateErrorStatus } from \"./modelActions\";\nimport { getRequestLocale } from \"./utils\";\n\nimport type { BEIDispatch, RootState } from \"../store\";\nimport type { FetchModelPayload, FetchModelResult } from \"./types\";\n\nconst executeRequest = async (\n { key, href, options }: FetchModelPayload,\n {\n dispatch,\n getState,\n rejectWithValue,\n }: {\n dispatch: BEIDispatch;\n getState: () => RootState;\n rejectWithValue: (value: ErrorResponse) => unknown;\n },\n): Promise<FetchModelResult> => {\n try {\n const locale = getRequestLocale(options?.locale, getState().i18n.locale);\n\n const requestHref =\n href instanceof Href\n ? href\n : new Href(href, \"\", {\n origin: options?.origin,\n contextPath: options?.contextPath,\n });\n\n const modularuiRequest = new ModularUIRequest(requestHref, {\n method: options?.method || HTTP_METHODS.GET,\n params: options?.params || \"\",\n data: options?.data || null,\n locale: locale,\n childmodels: options?.childmodels ?? true,\n isReload: options?.isReload,\n cache: options?.cache,\n headers: options?.headers,\n events: options?.events,\n onProgress: options?.onProgress,\n origin: options?.origin,\n contextPath: options?.contextPath,\n targetModel: options?.targetModel,\n forceTargetModel: options?.forceTargetModel ?? false,\n timeout: options?.timeout,\n });\n\n const model = await modularuiRequest.fetch();\n\n if (model) {\n model.connectKey = key;\n }\n\n // Return data for the fulfilled action\n return {\n key,\n model,\n updateHandler: options?.updateHandler,\n };\n } catch (error: unknown) {\n const errorResponse = new ErrorResponse(error as Error, key, {\n origin: options?.origin,\n contextPath: options?.contextPath,\n });\n\n // Specific error handling for removing model on certain errors\n if (\n errorResponse.isChangePassword ||\n errorResponse.isResourceNotFoundAfterReload\n ) {\n dispatch(removeModelByKey(key));\n } else {\n dispatch(updateErrorStatus(key, errorResponse));\n }\n\n // Dispatch the global error handler\n dispatch(handleError(error));\n\n throw rejectWithValue(errorResponse);\n }\n};\n\nexport const fetchModel = createAsyncThunk<\n FetchModelResult, // Return type of the fulfilled action payload\n FetchModelPayload, // First argument to the thunk\n {\n dispatch: BEIDispatch;\n state: RootState;\n rejectValue: ErrorResponse; // Type of the error payload in case of rejection\n }\n>(\"modularui/fetchModel\", executeRequest, {\n condition: ({ key }, { getState }) => {\n if (getState().modularui[key]?.status === MODULARUI_STATUS.LOADING) {\n return false;\n }\n },\n});\n","import { IS_SERVER } from \"@beinformed/ui/constants\";\nimport { ErrorResponse } from \"@beinformed/ui/models\";\nimport { logoutPath } from \"@beinformed/ui/settings\";\n\nimport { saveChangePassword } from \"../auth/authReducer\";\nimport { handleUnauthorized } from \"../auth/unauthorizedActions\";\nimport { showXHRErrorNotification } from \"../notifications/notificationActions\";\nimport { push } from \"../router/routerActions\";\nimport { noAction } from \"../shared/actions\";\n\nimport { saveError } from \"./errorReducer\";\n\nimport type { BEIDispatch } from \"../store\";\n\ntype DefaultHandler = typeof defaultErrorResponseHandler;\n\n// Default handler\nconst defaultErrorResponseHandler =\n (error: ErrorResponse) => (dispatch: BEIDispatch) => {\n if (error.isResourceNotFoundAfterReload || error.isRemoteServiceException) {\n return dispatch(noAction());\n }\n\n if (error.isUnauthorized) {\n return dispatch(handleUnauthorized(error));\n }\n\n if (error.isBlocked || error.isConcurrentUser || error.isInvalidUsername) {\n dispatch(push(logoutPath()));\n return;\n }\n\n if (error.isChangePassword) {\n return dispatch(saveChangePassword());\n }\n\n if (IS_SERVER) {\n return dispatch(saveError(error));\n }\n\n // This setTimeout might hide errors from Sentry/monitoring tools\n setTimeout(() => {\n throw error.error || error;\n });\n\n return dispatch(showXHRErrorNotification(error));\n };\n\ntype CustomErrorResponseHandler = (\n error: ErrorResponse,\n defaultHandler: DefaultHandler,\n) => (dispatch: BEIDispatch) => void;\n\nlet customErrorResponseHandler: CustomErrorResponseHandler =\n (error, defaultHandler) => (dispatch) =>\n dispatch(defaultHandler(error));\n\nexport const setCustomErrorResponseHandler = (\n handler: CustomErrorResponseHandler,\n) => {\n customErrorResponseHandler = handler;\n};\n\nexport const handleError = (error: unknown) => {\n // Ensure the error is an ErrorResponse if possible, otherwise create one.\n const errorResponse =\n error instanceof ErrorResponse ? error : new ErrorResponse(error as Error);\n\n // Dispatch the default handler or custom handler\n return customErrorResponseHandler(errorResponse, defaultErrorResponseHandler);\n};\n","import { createAsyncThunk } from \"@reduxjs/toolkit\";\n\nimport { getBooleanSetting, getStringSetting } from \"@beinformed/ui/settings\";\nimport { Cache } from \"@beinformed/ui/utils\";\n\nimport { reloadApplication } from \"../application/applicationActions\";\nimport { getApplication } from \"../application/applicationSelectors\";\nimport { removeModelByKey } from \"../modularui/modelActions\";\nimport { replace } from \"../router/routerActions\";\n\nimport { logoutSuccess, sendAuthenticationError } from \"./authReducer\";\n\nimport type { ErrorResponse } from \"@beinformed/ui/models\";\nimport type { BEIDispatch, RootState } from \"../store\";\n\nexport const handleUnauthorized = createAsyncThunk<\n void,\n ErrorResponse,\n { state: RootState; dispatch: BEIDispatch }\n>(\"auth/unauthorized\", (errorResponse, { dispatch, getState }) => {\n if (errorResponse.connectKey) {\n dispatch(removeModelByKey(errorResponse.connectKey));\n }\n\n if (\n getBooleanSetting(\"PAGE_RELOAD_ON_UNAUTHORIZED_ERROR\", false) &&\n errorResponse.response\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 = getStringSetting(\"LOGIN_PATH\", \"/signin\");\n if (location?.pathname !== LOGIN_PATH) {\n const locationFrom = location?.state?.from;\n 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","import { createAction } from \"@reduxjs/toolkit\";\n\nexport const noAction = createAction(\"NO_ACTION\");\n","/**\n * Retrieve the preferred language for this request, falls back to the browser language or english\n */\nexport const getRequestLocale = (\n optionLocale: string | undefined,\n currentStateLocale: string,\n) => {\n if (optionLocale) {\n return optionLocale;\n }\n\n if (typeof navigator !== \"undefined\" && navigator?.language) {\n return navigator.language.split(\"-\")[0] || currentStateLocale;\n }\n\n return currentStateLocale;\n};\n"],"mappings":"iJAAA,IAAAA,EAAAC,EAAA,CAAAC,GAAAC,IAAA,cACA,IAAIC,GAAmB,iBAGnBC,GAAW,mBAUf,SAASC,GAAQC,EAAOC,EAAQ,CAC9B,IAAIC,EAAO,OAAOF,EAClB,OAAAC,EAASA,GAAiBJ,GAEnB,CAAC,CAACI,IACNC,GAAQ,UACNA,GAAQ,UAAY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SAAAC,CAAS,IAAM,CAC3D,IAAMC,EAAQD,EAAS,EAEjBE,EAAkB,IAAIC,GAAK,IAAK,aAAa,EAE7CC,EAAcC,EAAeJ,CAAK,EACpCG,IACEA,EAAY,cACdF,EAAgB,YAAcE,EAAY,aAExCA,EAAY,SACdF,EAAgB,OAASE,EAAY,SAIzC,IAAME,EAAUC,EAAcN,EAAOC,CAAe,EACpD,QAAWM,KAAOF,EAChBP,EAASU,EAAiBD,CAAG,CAAC,EAIhC,IAAME,EAAW,kBADFC,EAAUV,CAAK,CACW,GAEzC,MAAMF,EACJa,EAAW,CACT,IAAKF,EACL,KAAMR,EACN,QAAS,CACP,YAAaW,EACf,CACF,CAAC,CACH,CACF,CAAC","names":["require_isIndex","__commonJSMin","exports","module","MAX_SAFE_INTEGER","reIsUint","isIndex","value","length","type","require_isLength","__commonJSMin","exports","module","MAX_SAFE_INTEGER","isLength","value","require_hasPath","__commonJSMin","exports","module","castPath","isArguments","isArray","isIndex","isLength","toKey","hasPath","object","path","hasFunc","index","length","result","key","createAction","createReducer","initalState","loginSuccess","logoutSuccess","sendAuthenticationError","errorMessage","resetAuthErrors","saveChangePassword","authReducer","builder","state","action","createAction","createReducer","Cache","updateEntryDate","entryDate","initialState","modelCatalogReducer","builder","state","action","createAction","createAsyncThunk","createReducer","NOTIFICATION_TYPES","saveNotification","type","message","error","showNotification","timeout","dispatch","dismissNotification","initialState","notificationReducer","builder","state","action","createAsyncThunk","getNumberSetting","createAction","startProgress","finishProgress","resetProgress","updateProgress","percentComplete","getNotificationMessageId","form","showFormNotification","createAsyncThunk","dispatch","startProgress","showNotification","dismissNotification","getNumberSetting","finishProgress","showXHRErrorNotification","error","createAction","push","location","state","replace","go","delta","goBack","goForward","createAction","createReducer","saveError","error","initialState","errorReducer","builder","_state","action","createAction","createReducer","showModal","key","closeModal","initialState","modalsReducer","builder","state","action","modal","existing","last","MODULARUI_STATUS","createAction","updateErrorStatus","key","error","setModel","model","initModels","models","updateModel","updateForm","removeModelByKey","resetModularUI","createSelector","ContentModel","ContentTOCModel","Href","getLocation","state","getAllModelsByInstance","instance","locale","modularui","key","modelEntry","getFirstModelByInstance","getActiveModelByInstance","location","modelByHref","href","findHref","Href","modelConfigKey","keyByHref","model","allKeysByHref","getModels","createSelector","models","modelKey","selfhref","label","type","modelInfo","ContentModel","ContentTOCModel","getActiveModels","modelMap","m","contextModels","locationParts","currentPath","part","comparePath","foundEntry","selfContentLink","getAllFinishedModels","ApplicationModel","getApplication","state","locale","modularui","key","modelEntry","createAsyncThunk","ApplicationModel","Href","createAsyncThunk","HTTP_METHODS","ErrorResponse","Href","ModularUIRequest","IS_SERVER","ErrorResponse","logoutPath","createAsyncThunk","getBooleanSetting","getStringSetting","Cache","handleUnauthorized","createAsyncThunk","errorResponse","dispatch","getState","removeModelByKey","getBooleanSetting","application","getApplication","Cache","reloadApplication","logoutSuccess","sendAuthenticationError","location","LOGIN_PATH","getStringSetting","locationFrom","replace","createAction","noAction","defaultErrorResponseHandler","error","dispatch","noAction","handleUnauthorized","push","logoutPath","saveChangePassword","IS_SERVER","saveError","showXHRErrorNotification","customErrorResponseHandler","defaultHandler","setCustomErrorResponseHandler","handler","handleError","errorResponse","ErrorResponse","getRequestLocale","optionLocale","currentStateLocale","executeRequest","key","href","options","dispatch","getState","rejectWithValue","locale","getRequestLocale","requestHref","Href","model","ModularUIRequest","HTTP_METHODS","error","errorResponse","ErrorResponse","removeModelByKey","updateErrorStatus","handleError","fetchModel","createAsyncThunk","reloadApplication","createAsyncThunk","_","dispatch","getState","state","applicationHref","Href","application","getApplication","allKeys","allKeysByHref","key","removeModelByKey","modelKey","getLocale","fetchModel","ApplicationModel"]}
|
package/dist/chunk-JYAETKRB.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/redux/i18n/i18nSelectors.ts"],"sourcesContent":["import type { Locales } from \"../../i18n/Locales\";\nimport type { RootState } from \"../store\";\n\n/**\n * Retrieve the locale from state\n */\nexport const getLocale = (state: RootState) => {\n return state.i18n?.locale ?? \"en\";\n};\n\n/**\n * Retrieve all available locales in the store\n */\nexport const getLocales = (state: RootState): Locales => state.i18n.locales;\n"],"mappings":"AAMO,IAAMA,EAAaC,GACjBA,EAAM,MAAM,QAAU,KAMlBC,EAAcD,GAA8BA,EAAM,KAAK","names":["getLocale","state","getLocales"]}
|
package/dist/chunk-LUXTQYD2.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c as P}from"./chunk-5MOCT43G.js";import{c as ue,d as pe,j as de,k as me,l as fe,m as ge,n as Me,o as he,p as ye,q}from"./chunk-ZNJONDQ6.js";import{$ as U,B as ae,C as ce,K as H,d as Q,g as St,h as Tt,i as W,k as J,l as j,m as Y,n as X,p as Z,q as ee,s as te,u as oe,v as re,w as ne,x as se,y as ie}from"./chunk-GHKA2XFO.js";import{a as le}from"./chunk-JYAETKRB.js";import{a as vt}from"./chunk-7JMMW2FM.js";import{a as Rt}from"./chunk-TDYPCNQI.js";import{d as V,f as bt}from"./chunk-L7DO7AZT.js";import{d as Ut,e as Ot,f as Ct,h as m,i as g}from"./chunk-HTR32BUX.js";import{a as M,b as It}from"./chunk-FW4363Y4.js";var z=M((Ui,Ae)=>{"use strict";var qo=Ot(),wo=(function(){try{var e=qo(Object,"defineProperty");return e({},"",{}),e}catch{}})();Ae.exports=wo});var Fe=M((Oi,ke)=>{"use strict";var Le=z();function No(e,t,o){t=="__proto__"&&Le?Le(e,t,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[t]=o}ke.exports=No});var qe=M((Ci,Be)=>{"use strict";var _o=Fe(),$o=Ct(),Ko=Object.prototype,Go=Ko.hasOwnProperty;function zo(e,t,o){var r=e[t];(!(Go.call(e,t)&&$o(r,o))||o===void 0&&!(t in e))&&_o(e,t,o)}Be.exports=zo});var _e=M((Si,Ne)=>{"use strict";var Qo=qe(),Vo=V(),Wo=St(),we=Ut(),Jo=bt();function jo(e,t,o,r){if(!we(e))return e;t=Vo(t,e);for(var n=-1,s=t.length,i=s-1,a=e;a!=null&&++n<s;){var c=Jo(t[n]),u=o;if(c==="__proto__"||c==="constructor"||c==="prototype")return e;if(n!=i){var d=a[c];u=r?r(d,c,a):void 0,u===void 0&&(u=we(d)?d:Wo(t[n+1])?[]:{})}Qo(a,c,u),a=a[c]}return e}Ne.exports=jo});var Ke=M((bi,$e)=>{"use strict";var Yo=vt(),Xo=_e(),Zo=V();function er(e,t,o){for(var r=-1,n=t.length,s={};++r<n;){var i=t[r],a=Yo(e,i);o(a,i)&&Xo(s,Zo(i,e),a)}return s}$e.exports=er});var ze=M((Ti,Ge)=>{"use strict";function tr(e,t){return e!=null&&t in Object(e)}Ge.exports=tr});var Ve=M((Ri,Qe)=>{"use strict";var or=ze(),rr=Tt();function nr(e,t){return e!=null&&rr(e,t,or)}Qe.exports=nr});var Je=M((vi,We)=>{"use strict";var sr=Ke(),ir=Ve();function ar(e,t){return sr(e,t,function(o,r){return ir(e,r)})}We.exports=ar});var Ye=M((Hi,je)=>{"use strict";var cr=Rt();function lr(e){var t=e==null?0:e.length;return t?cr(e,1):[]}je.exports=lr});var Ze=M((Pi,Xe)=>{"use strict";function ur(e,t,o){switch(o.length){case 0:return e.call(t);case 1:return e.call(t,o[0]);case 2:return e.call(t,o[0],o[1]);case 3:return e.call(t,o[0],o[1],o[2])}return e.apply(t,o)}Xe.exports=ur});var ot=M((Ei,tt)=>{"use strict";var pr=Ze(),et=Math.max;function dr(e,t,o){return t=et(t===void 0?e.length-1:t,0),function(){for(var r=arguments,n=-1,s=et(r.length-t,0),i=Array(s);++n<s;)i[n]=r[t+n];n=-1;for(var a=Array(t+1);++n<t;)a[n]=r[n];return a[t]=o(i),pr(e,this,a)}}tt.exports=dr});var nt=M((Di,rt)=>{"use strict";function mr(e){return function(){return e}}rt.exports=mr});var it=M((Ai,st)=>{"use strict";function fr(e){return e}st.exports=fr});var lt=M((Li,ct)=>{"use strict";var gr=nt(),at=z(),Mr=it(),hr=at?function(e,t){return at(e,"toString",{configurable:!0,enumerable:!1,value:gr(t),writable:!0})}:Mr;ct.exports=hr});var pt=M((ki,ut)=>{"use strict";var yr=800,xr=16,Ir=Date.now;function Ur(e){var t=0,o=0;return function(){var r=Ir(),n=xr-(r-o);if(o=r,n>0){if(++t>=yr)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}ut.exports=Ur});var mt=M((Fi,dt)=>{"use strict";var Or=lt(),Cr=pt(),Sr=Cr(Or);dt.exports=Sr});var gt=M((Bi,ft)=>{"use strict";var br=Ye(),Tr=ot(),Rr=mt();function vr(e){return Rr(Tr(e,void 0,br),e+"")}ft.exports=vr});var ht=M((qi,Mt)=>{"use strict";var Hr=Je(),Pr=gt(),Er=Pr(function(e,t){return e==null?{}:Hr(e,t)});Mt.exports=Er});import{useEffect as Dt,useMemo as At,useState as Ie}from"react";import{HTTP_METHODS as Lt}from"@beinformed/ui/constants";import{FormModel as kt,ListModel as Ft}from"@beinformed/ui/models";import{createSelector as Ht}from"reselect";import{ModularUIRequest as Pt}from"@beinformed/ui/modularui";var Et=Ht([le],e=>(t,o)=>{let r=new Pt(t,o);return r.locale=e,r}),xe=()=>g(Et);var zr=e=>{let t=xe(),[o,r]=Ie(null),[n,s]=Ie(0),i=At(()=>Bt(e),[e]),a=i.length;return Dt(()=>{let c=i.map(u=>{let d=u.selfhref.addParameter("commit","false");return t(d,{method:Lt.POST}).fetch().then(h=>(h instanceof kt&&(h.tokens=[]),{[u.name]:h}))});Promise.all(c).then(u=>{let d=Object.assign({},...u);r(d),s(u.length)})},[i,t]),n===a?o:null},Bt=e=>{if(!e.actionCollection)return[];let o=[...e.actionCollection.getActionsByType("create").filter(s=>!s.isDisabled)];e instanceof Ft&&e.listItemCollection.forEach(s=>{let i=s.actionCollection.getActionsByType("update").filter(a=>!a.isDisabled);o.push(...i)});let r=[],n=[];return o.forEach(s=>{n.includes(s.name)||(n.push(s.name),r.push(s))}),r};import{INTERNAL_LOGIN_TYPE as no}from"@beinformed/ui/constants";import{IllegalStateException as so}from"@beinformed/ui/exceptions";import{Authenticate as io}from"@beinformed/ui/modularui";import{getContextPath as ao,getContextPathServer as co}from"@beinformed/ui/settings";import{Cache as O}from"@beinformed/ui/utils";import{ApplicationModel as Xt,CaseViewModel as Zt,DetailModel as eo,GroupingPanelModel as to,TabModel as oo,UserProfileModel as ro}from"@beinformed/ui/models";import{useMemo as A}from"react";import{HTTP_METHODS as be}from"@beinformed/ui/constants";import{useMemo as qt}from"react";var y=()=>g(e=>e.router.location),jr=()=>y()?.key??"",Yr=()=>y()?.search,Xr=()=>y()?.pathname,Ue=()=>{let e=m();return qt(()=>({push:(t,o)=>e(oe(t,o)),replace:(t,o)=>e(re(t,o)),go:t=>e(ne(t)),goBack:()=>e(se()),goForward:()=>e(ie())}),[e])};import{useEffect as Ce,useMemo as w,useRef as Qt}from"react";import{useLocation as Vt}from"react-router";import{HTTP_METHODS as Wt}from"@beinformed/ui/constants";import{Href as N}from"@beinformed/ui/models";import{useEffect as wt,useRef as Nt}from"react";import{dequal as _t}from"dequal/lite";import{IS_DEV as $t}from"@beinformed/ui/utils";function Kt(e){$t&&(!e||e.length===0)&&console.warn("useDeepCompareEffect should not be used with no dependencies. Use React.useEffect instead.")}function Gt(e){let t=Nt(e);return _t(e,t.current)||(t.current=e),t.current}function Oe(e,t){Kt(t),wt(e,Gt(t))}import{useMemo as zt}from"react";var E=(e,t)=>{let o=P();return zt(()=>`${e}(${t.split("?")[0]})(${o})`,[e,t,o])};var D=(e,t,o={})=>{let r=m(),n=w(()=>new N(t),[t]),s=w(()=>n.toString(),[n]),i=n.querystring,a=Qt(i),c=E(e,s),u=g(p=>p.modularui[c]),d=w(()=>{let p={method:Wt.GET,removeOnUnmount:!0,...o};return t instanceof N&&(p.origin=p.origin??t.origin,p.contextPath=p.contextPath??t.contextPath),p},[o,t]),b=Vt().state?.redirectLocation,R=a.current!==i,l=u==null||u.status==="ERROR"||R||(b instanceof N?b.equals(s):!1)||d.isReload===!0;return Ce(()=>{a.current=i},[i]),Oe(()=>{s!==""&&l&&r(U({key:c,href:s,options:d}))},[c,s,d,l]),Ce(()=>{if(d.removeOnUnmount)return()=>{r(H(c))}},[r,c,d.removeOnUnmount]),u};var Jt=(e,t)=>{let o={expectedModels:[],method:be.GET,data:void 0,...e,isReload:t||e.isReload};return e.formdata!=null&&(o.method=be.POST,o.data=e.formdata),o},jt=(e,t)=>{t.length>0&&e!==null&&typeof e=="object"&&"type"in e&&typeof e.type=="string"&&(t.includes(e.type)||console.warn(e,"is not of instance",t))},f=(e,t,o={})=>{let r=A(()=>t.toString(),[t]),n=o.key??e,s=Yt(n,r),i=A(()=>Jt(o,s),[o,s]),a=D(n,t,i),c=A(()=>o.expectedModels??[],[o.expectedModels]);return A(()=>{if(a?.model)return jt(a.model,c),a.model},[c,a])},Yt=(e,t)=>{let o=y(),r=E(e,t),n=g(s=>s.modularui[r]);if(n){let s=o?.state?.reload||0;if(s>0){let i=n?.status==="FINISHED",a=n?.lastModification??0;if(i&&a<s)return!0}}return!1};var _=e=>f("application","/",{expectedModels:["Application"],targetModel:Xt,...e}),Hn=(e,t)=>f("tab",e,{expectedModels:["Tab"],targetModel:oo,...t}),Pn=(e,t)=>f("caseview",e,{expectedModels:["CaseView"],targetModel:Zt,...t}),En=(e,t)=>f("groupingpanel",e,{expectedModels:["GroupingPanel"],targetModel:to,...t}),Dn=(e,t)=>f("detailpanel",e,{expectedModels:["Detail"],targetModel:eo,...t}),An=(e,t)=>f("userprofile",e,{expectedModels:["UserProfile"],targetModel:ro,...t});var zn=()=>{O.setItem("isRedirectLogin",!1);let e=m(),t=_(),o=g(s=>s.auth),r=t?.isLoggedIn??!1,n=O.getItem("primaryAuthenticationType");return{isAuthenticated:r,primaryAuthenticationType:n??t?.authenticationTypes[0],authenticationTypes:t?.authenticationTypes??[],errorMessage:o.error,resetErrors:()=>e(Q()),login:(s,i)=>e(ue({username:s,password:i})),redirectLogin:s=>{if(O.getItem("isRedirectLogin"))throw new so(`Could not redirect to '${s.authentication}' using url: '${s.redirectUri??""}'`);r||(O.setItem("isRedirectLogin",!0),window.location.assign(`${co()}${s.redirectUri??""}`))}}},Qn=()=>{let e=m(),t=_(),o=ao(),r=new io,n=O.getItem("primaryAuthenticationType");return{isAuthenticated:t?.isLoggedIn??!1,primaryAuthenticationType:n??t?.authenticationTypes[0],authenticationTypes:t?.authenticationTypes??[],logout:()=>{if(r.authenticationType===no.PAC4J_INDIRECT)r.redirectToLogout();else if(O.getItem("isRedirectLogin")){let a=window.location.origin,c=`${a}${o}/logout?url=${a}${o}`;O.setItem("isRedirectLogin",!1),window.location.assign(c)}else return e(pe())},logoutUrl:r.getLogoutUrl()}};import{useEffect as lo,useState as uo}from"react";import{ModularUIRequest as po}from"@beinformed/ui/modularui";import{useCallback as L}from"react";var Te=()=>{let e=m(),t=L(()=>{e(J())},[e]),o=L(()=>{e(j())},[e]),r=L(()=>{e(Y())},[e]),n=L(s=>{e(X(s))},[e]);return{start:t,finish:o,reset:r,update:n}},Yn=()=>g(e=>e.progressindicator);var rs=(e,t)=>{let[o,r]=uo([]),n=P(),{start:s,finish:i}=Te(),a=e.map(u=>u.link?.selfhref.href).filter((u,d,h)=>h.indexOf(u)===d).map(u=>u?.toString()),c=JSON.stringify(a);return lo(()=>{let u=JSON.parse(c).map(d=>{let h=new po(d);return h.locale=n,h.fetchContent(t)});s(),Promise.all(u).then(d=>{r(d),i()})},[c,n,t,s,i]),o};import{produce as mo}from"immer";import{HTTP_METHODS as Re}from"@beinformed/ui/constants";import{FormModel as k,Href as fo}from"@beinformed/ui/models";import{getSetting as go}from"@beinformed/ui/settings";var hs=(e,t)=>{let o=new fo(e);go("ALWAYS_COMMIT_FORM")||o.addParameter("commit","false");let r=D("form",o,{method:Re.POST,targetModel:k,removeOnUnmount:!0,data:t?JSON.stringify(t):void 0,origin:o.origin,contextPath:o.contextPath});if(r?.model instanceof k)return r.model},ys=()=>{let e=m();return{previous:i=>e(me(i)),cancel:i=>e(fe(i)),submit:i=>e(U({key:i.connectKey||i.key,href:i.selfhref,options:{method:Re.POST,data:i.formdata,updateHandler:a=>a instanceof k?mo(a,c=>{c.update(a)}):a,targetModel:k}})),remove:i=>e(H(i.connectKey||"")),showFormNotification:i=>e(te(i))}},xs=(e,t)=>{let o=m();return(r,n,s)=>o(de({form:e,formObject:t,attribute:r,inputvalue:n,options:s}))},Is=e=>{let t=m();return{save:()=>t(ge(e)),cancel:o=>t(Me(e,o)),remove:o=>t(he(e,o))}};import{useCallback as I,useMemo as Mo}from"react";import{HTTP_METHODS as $}from"@beinformed/ui/constants";import{AssignmentFilterModel as ho,CaseSearchModel as ve,DetailModel as yo,FilterModel as xo,ListDetailModel as Io,ListModel as F}from"@beinformed/ui/models";var Hs=(e,t)=>f("list",e,{expectedModels:["List"],targetModel:F,...t}),Ps=(e,t)=>f("list",e,{expectedModels:["List","Detail"],targetModel:[F,yo],...t}),Es=(e,t)=>f("listdetail",e,{expectedModels:["ListDetail"],targetModel:Io,forceTargetModel:!0,...t}),Ds=({syncLocation:e=!0,historyAction:t="push"}={})=>{let{push:o,replace:r}=Ue(),n=m(),s=t==="push"?o:r,i=I((l,p=!1)=>{let x=l.selfhref;p&&(x.page=void 0),l.requestMethod===$.POST?(e&&s({pathname:x.path,search:x.getQuerystring(!0),state:{formdata:l.formdata}}),n(U({key:l.connectKey||l.key,href:x,options:{method:$.POST,data:l.formdata,targetModel:[F,ve]}}))):(e&&s({pathname:x.path,search:x.getQuerystring(!0)}),n(U({key:l.connectKey||l.key,href:x,options:{method:$.GET,targetModel:[F,ve]}})))},[n,s,e]),a=I((l,p)=>{l.filterCollection=p,i(l,!0)},[i]),c=I((l,p,x,C)=>{if(p instanceof ho&&!C)throw new TypeError("AssignmentFilterModel needs the attribute argument to be able to update the filter");let v=null,B=C;if(C?v=l.filterCollection.getFilterByAttributeKey(C.key):p instanceof xo&&(v=l.filterCollection.getFilterByName(p.name),B=p.attribute),v&&B)v.update(B,x);else{let xt=C?`key: ${C.key}`:`name: ${p.name}`;console.error(`Can't find a filter to update by ${xt} on list: ${l.selfhref.toString()}`)}i(l,!0)},[i]),u=I(l=>{l.filterCollection.reset(),i(l,!0)},[i]),d=I((l,p)=>{p.name&&l.filterCollection.getFilterByName(p.name)?.reset(),i(l,!0)},[i]),h=I((l,p)=>{l.sorting.value=p,i(l,!0)},[i]),b=I((l,p)=>{l.paging.page=p,i(l)},[i]),R=I((l,p)=>{l.paging.pagesize.value=p,i(l,!0)},[i]);return Mo(()=>({update:i,updateFilters:a,updateFilter:c,updateSort:h,updatePage:b,updatePageSize:R,resetFilters:u,removeFilter:d}),[d,u,i,c,a,b,R,h])};import{useCallback as He}from"react";import{IllegalArgumentException as Uo}from"@beinformed/ui/exceptions";var qs=e=>{if(!e)throw new Uo("Missing modalId argument for useModal hook");let t=m(),o=g(s=>s.modals.modals.find(i=>i.key===e)),r=He(()=>{t(ae(e))},[t,e]),n=He(()=>{t(ce(e))},[t,e]);return{key:o?o.key:null,size:o?o.size:null,visible:o?o.visible:!1,show:r,close:n}};import{ConceptIndexModel as Pe,ContentIndexModel as Oo,ContentTOCModel as Co,ContentTypeModel as So,Href as bo,ModelCatalogModel as To}from"@beinformed/ui/models";import{createHref as T,filterParameters as K}from"@beinformed/ui/utils";var Vs=e=>f("modelcatalog","/modelcatalog",{expectedModels:["ModelCatalog"],targetModel:To,...e}),Ro=(e,t="conceptindex",o)=>{let{entryDate:r}=S(),n=K(e,["index","label","modelcategory","type"]);return n.setParameter("entryDate",r),f(t,n,{expectedModels:["ConceptIndex"],targetModel:Pe,...o})},Ws=(e,t="conceptdetail",o)=>{let{entryDate:r}=S(),n=y(),s=T("concepts",e,r,n,[]);return f(t,s,{expectedModels:["ConceptDetail","BusinessScenario"],...o})},vo=(e,t="contentindex",o)=>{let r=K(e,["index","label","type"]);return f(t,r,{expectedModels:["ContentIndex"],targetModel:Oo,...o})},Js=(e,t="contenttoc",o)=>{let{entryDate:r}=S(),n=y(),s=T("content",e,r,n,["complete"]);return f(t,s,{expectedModels:["ContentTOC"],targetModel:Co,...o})},js=(e,t="content",o)=>{let{entryDate:r}=S(),n=y(),s=T("content",e,r,n,["complete"]);return f(t,s,{expectedModels:["Content","ContentTOC"],...o})},Ys=(e,t="content",o)=>{let{entryDate:r}=S(),n=y(),s=new bo(e);s.removeParameter("complete"),s.addParameter("complete","true");let i=T("content",s,r,n,["complete"]);return f(t,i,{expectedModels:["Content","ContentTOC"],...o})},Xs=(e,t="contenttypes",o)=>{let r=T("contenttypes",e,void 0,void 0,[]);return f(t,r,{expectedModels:["ContentType"],targetModel:So,...o})},Zs=(e,t="relatedconcepts",o)=>{let{entryDate:r}=S(),n=K(e,["modelcategory"]);return n.setParameter("entryDate",r),f(t,n,{expectedModels:["ConceptIndex"],targetModel:Pe,...o})},Ee=(e,t)=>{let o=[];for(let r of Object.keys(t)){let n=t[r];if(n){let s=Array.isArray(n)?n.join(","):n;r==="type"&&(s=s.replace("#","%23")),o.push(`${r}=${s}`)}}return o.length?`${e}?${o.join("&")}`:e},ei=(e,t,o)=>{let r=Ee("/concepts",e);return Ro(r,t,o)},ti=(e,t,o)=>{let r=Ee("/content",e);return vo(r,t,o)},S=()=>{let e=m();return{entryDate:g(ye),setEntryDate:o=>e(W(o))}};import{createSelector as Ho}from"reselect";var ai=()=>{let e=m(),o=Ho([n=>n.modularui],n=>{let s=[],i=Object.keys(n);for(let a of i){let c=n[a];c?.status==="FINISHED"&&s.push(c.model)}return s}),r=g(o);return{reload:(n,s)=>{e(q(n,s))},reloadWithFilter:(n,s)=>{let i=r.filter(n);for(let a of i)a&&e(q(a,s))}}};var di=()=>{let e=m(),{render:t,messageType:o,message:r,error:n}=g(s=>s.notification);return{render:t,messageType:o,message:r,error:n,dismiss:()=>e(ee())}},mi=()=>{let e=m();return(t,o)=>e(Z({type:"ERROR",message:t,error:o}))};import{useMemo as Po,useState as De}from"react";import{useLocation as Eo,useRouteMatch as Do}from"react-router";import{CaseSearchModel as Ao,DetailModel as Lo,GroupingPanelModel as ko,Href as G,ListModel as Fo}from"@beinformed/ui/models";var Bo=(e,t=!1)=>{let[o,r]=De(null),[n,s]=De(!1),i=Do(),a=Eo(),c=Po(()=>{if(e==null&&o==null)return new G("");let h=e instanceof G?e:new G(e);return t&&i.isExact&&h.addParametersFromString(a.search),h},[e,o,t,i.isExact,a.search]),d=!c.equalsWithParameters(o)&&(i.isExact||n===i.isExact||!o?.startsWith(i.url));return d&&(r(c),s(i.isExact)),d?c:o||c},xi=(e,t)=>{let{fromRoute:o,...r}=t||{fromRoute:!1},n=Bo(e,o||!1);return f("panel",n,{expectedModels:["List","GroupingPanel","Detail","CaseSearch"],targetModel:[Fo,ko,Lo,Ao],...r})};var yt=It(ht(),1);import{useMemo as Dr}from"react";import{createSelector as Ar}from"reselect";var Lr=e=>e.preferences,kr=e=>{let t=Array.isArray(e)?e:[e];return Ar([Lr],o=>(0,yt.default)(o,t))},$i=e=>{let t=Dr(()=>kr(e),[e]);return g(t)};export{xe as a,zr as b,y as c,jr as d,Yr as e,Xr as f,Ue as g,Oe as h,E as i,D as j,f as k,Yt as l,_ as m,Hn as n,Pn as o,En as p,Dn as q,An as r,zn as s,Qn as t,Te as u,Yn as v,rs as w,hs as x,ys as y,xs as z,Is as A,Hs as B,Ps as C,Es as D,Ds as E,qs as F,Vs as G,Ro as H,Ws as I,vo as J,Js as K,js as L,Ys as M,Xs as N,Zs as O,ei as P,ti as Q,S as R,ai as S,di as T,mi as U,xi as V,$i as W};
|
|
2
|
-
//# sourceMappingURL=chunk-LUXTQYD2.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_defineProperty.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseAssignValue.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_assignValue.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseSet.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_basePickBy.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseHasIn.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/hasIn.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_basePick.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/flatten.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_apply.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_overRest.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/constant.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/identity.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseSetToString.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_shortOut.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_setToString.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_flatRest.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/pick.js","../src/hooks/useAllFormsOnModel.ts","../src/hooks/useModularUIRequest.ts","../src/hooks/useAuthentication.ts","../src/hooks/useModularUIModel.ts","../src/hooks/useModularUIBasic.ts","../src/hooks/useRouter.ts","../src/hooks/useModularUI.ts","../src/hooks/useDeepCompareEffect.ts","../src/hooks/useModularUIKey.ts","../src/hooks/useContent.ts","../src/hooks/useProgressIndicator.ts","../src/hooks/useForm.ts","../src/hooks/useList.ts","../src/hooks/useModal.ts","../src/hooks/useModelCatalog.ts","../src/hooks/useModels.ts","../src/hooks/useNotification.ts","../src/hooks/usePanel.ts","../src/hooks/usePreference.ts"],"sourcesContent":["var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var assignValue = require('./_assignValue'),\n castPath = require('./_castPath'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\nfunction baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return object;\n }\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n}\n\nmodule.exports = baseSet;\n","var baseGet = require('./_baseGet'),\n baseSet = require('./_baseSet'),\n castPath = require('./_castPath');\n\n/**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\nfunction basePickBy(object, paths, predicate) {\n var index = -1,\n length = paths.length,\n result = {};\n\n while (++index < length) {\n var path = paths[index],\n value = baseGet(object, path);\n\n if (predicate(value, path)) {\n baseSet(result, castPath(path, object), value);\n }\n }\n return result;\n}\n\nmodule.exports = basePickBy;\n","/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\nmodule.exports = baseHasIn;\n","var baseHasIn = require('./_baseHasIn'),\n hasPath = require('./_hasPath');\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\nmodule.exports = hasIn;\n","var basePickBy = require('./_basePickBy'),\n hasIn = require('./hasIn');\n\n/**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @returns {Object} Returns the new object.\n */\nfunction basePick(object, paths) {\n return basePickBy(object, paths, function(value, path) {\n return hasIn(object, path);\n });\n}\n\nmodule.exports = basePick;\n","var baseFlatten = require('./_baseFlatten');\n\n/**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\nfunction flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n}\n\nmodule.exports = flatten;\n","/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nmodule.exports = apply;\n","var apply = require('./_apply');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nmodule.exports = overRest;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","var constant = require('./constant'),\n defineProperty = require('./_defineProperty'),\n identity = require('./identity');\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nmodule.exports = baseSetToString;\n","/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nmodule.exports = shortOut;\n","var baseSetToString = require('./_baseSetToString'),\n shortOut = require('./_shortOut');\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nmodule.exports = setToString;\n","var flatten = require('./flatten'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\nfunction flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n}\n\nmodule.exports = flatRest;\n","var basePick = require('./_basePick'),\n flatRest = require('./_flatRest');\n\n/**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\nvar pick = flatRest(function(object, paths) {\n return object == null ? {} : basePick(object, paths);\n});\n\nmodule.exports = pick;\n","import { useEffect, useMemo, useState } from \"react\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport { FormModel, ListModel } from \"@beinformed/ui/models\";\n\nimport { useModularUIRequest } from \"./useModularUIRequest\";\n\nimport type { ActionModel, DetailModel, TabModel } from \"@beinformed/ui/models\";\n\nexport const useRetrieveFormsOnModel = (\n model: ListModel | DetailModel | TabModel,\n) => {\n const modularui = useModularUIRequest();\n\n const [forms, setForms] = useState(null);\n const [responseCount, setResponseCount] = useState(0);\n\n const actions = useMemo(() => getActions(model), [model]);\n const requestCount = actions.length;\n\n useEffect(() => {\n const requests = actions.map((action) => {\n const href = action.selfhref.addParameter(\"commit\", \"false\");\n\n return modularui(href, { method: HTTP_METHODS.POST })\n .fetch()\n .then((form) => {\n if (form instanceof FormModel) {\n form.tokens = [];\n }\n return { [action.name]: form };\n });\n });\n\n Promise.all(requests).then((responses) => {\n // put response array in object\n const actionForms = Object.assign({}, ...responses);\n setForms(actionForms);\n setResponseCount(responses.length);\n });\n }, [actions, modularui]);\n\n if (responseCount === requestCount) {\n return forms;\n }\n\n return null;\n};\n\nconst getActions = (model: ListModel | DetailModel | TabModel) => {\n if (!model.actionCollection) {\n return [];\n }\n\n const createActions = model.actionCollection\n .getActionsByType(\"create\")\n .filter((action) => !action.isDisabled);\n\n const allActions = [...createActions];\n\n if (model instanceof ListModel) {\n model.listItemCollection.forEach((listItem) => {\n const updateActions = listItem.actionCollection\n .getActionsByType(\"update\")\n .filter((action) => !action.isDisabled);\n\n allActions.push(...updateActions);\n });\n }\n\n const actions: ActionModel[] = [];\n const unique: string[] = [];\n allActions.forEach((action) => {\n if (!unique.includes(action.name)) {\n unique.push(action.name);\n actions.push(action);\n }\n });\n\n return actions;\n};\n","import { createSelector } from \"reselect\";\n\nimport { ModularUIRequest } from \"@beinformed/ui/modularui\";\n\nimport { useBEISelector } from \"../redux/hooks\";\nimport { getLocale } from \"../redux/i18n/i18nSelectors\";\n\nimport type { Href } from \"@beinformed/ui/models\";\nimport type { ModularUIRequestOptions } from \"@beinformed/ui/utils\";\n\nconst getModularUIRequest = createSelector([getLocale], (localeCode) => {\n return (href: Href, options?: ModularUIRequestOptions) => {\n const request = new ModularUIRequest(href, options);\n request.locale = localeCode;\n return request;\n };\n});\n\n/**\n * Creates a ModularUIRequest with the locale as available in the redux store\n */\nexport const useModularUIRequest = (): ((\n href: Href,\n options?: ModularUIRequestOptions,\n) => ModularUIRequest) => useBEISelector(getModularUIRequest);\n","import { INTERNAL_LOGIN_TYPE } from \"@beinformed/ui/constants\";\nimport { IllegalStateException } from \"@beinformed/ui/exceptions\";\nimport { Authenticate } from \"@beinformed/ui/modularui\";\nimport { getContextPath, getContextPathServer } from \"@beinformed/ui/settings\";\nimport { Cache } from \"@beinformed/ui/utils\";\n\nimport { resetAuthErrors } from \"../redux/auth/authReducer\";\nimport { login } from \"../redux/auth/signinActions\";\nimport { logout } from \"../redux/auth/signoutActions\";\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\n\nimport { useApplication } from \"./useModularUIModel\";\n\nimport type { AuthenticationType } from \"@beinformed/ui/modularui\";\nimport type { RootState } from \"../redux/store\";\n\n/**\n * Provides access to authentication state and actions.\n * Includes functionality for standard username/password login and redirect-based login.\n * @returns An object containing authentication status, available authentication types, error messages, and login/logout functions.\n */\nexport const useLogin = () => {\n Cache.setItem(\"isRedirectLogin\", false);\n\n const dispatch = useBEIDispatch();\n\n const application = useApplication();\n const auth = useBEISelector((state: RootState) => state.auth);\n\n const isAuthenticated = application?.isLoggedIn ?? false;\n\n const primaryAuthenticationType = Cache.getItem(\"primaryAuthenticationType\");\n\n return {\n /**\n * Indicates whether the user is currently authenticated.\n */\n isAuthenticated,\n\n primaryAuthenticationType:\n primaryAuthenticationType ?? application?.authenticationTypes[0],\n\n /**\n * An array of available authentication types supported by the application.\n */\n authenticationTypes: application?.authenticationTypes ?? [],\n\n /**\n * The current authentication error message, if any.\n */\n errorMessage: auth.error,\n\n /**\n * Resets the authentication error message in the Redux store.\n */\n resetErrors: () => dispatch(resetAuthErrors()),\n\n /**\n * Attempts to log in the user with the provided username and password.\n * Dispatches the `login` action to the Redux store.\n * @param username The username for authentication.\n * @param password The password for authentication.\n */\n login: (username: string, password: string) =>\n dispatch(login({ username, password })),\n\n /**\n * Initiates a redirect-based login flow for a specific authentication type.\n * If a redirect login is already in progress, it throws an `IllegalStateException` to prevent infinite loops.\n * If the user is not currently authenticated, it sets a flag in the cache and redirects the browser to the authentication provider's redirect URI.\n * @param authenticationType The authentication type to initiate the redirect for.\n * @throws {IllegalStateException} If a redirect login is already in progress for a different authentication type.\n */\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 '${\n authenticationType.authentication\n }' using url: '${authenticationType.redirectUri ?? \"\"}'`,\n );\n }\n\n if (!isAuthenticated) {\n Cache.setItem(\"isRedirectLogin\", true);\n window.location.assign(\n `${getContextPathServer()}${authenticationType.redirectUri ?? \"\"}`,\n );\n }\n },\n };\n};\n\n/**\n * Provides access to logout functionality.\n * Handles both standard logout and redirect-based logout scenarios.\n * @returns An object containing the authentication status, available authentication types, and the logout function.\n */\nexport const useLogout = () => {\n const dispatch = useBEIDispatch();\n const application = useApplication();\n\n const BASE_PATH = getContextPath();\n\n const authenticate = new Authenticate();\n\n const primaryAuthenticationType = Cache.getItem(\"primaryAuthenticationType\");\n\n const isAuthenticated = application?.isLoggedIn ?? false;\n return {\n /**\n * Indicates whether the user is currently authenticated.\n */\n isAuthenticated,\n\n primaryAuthenticationType:\n primaryAuthenticationType ?? application?.authenticationTypes[0],\n\n /**\n * An array of available authentication types supported by the application.\n */\n authenticationTypes: application?.authenticationTypes ?? [],\n\n /**\n * Initiates the logout process.\n * If a redirect login was in progress, it redirects the user to the server's logout endpoint with a return URL to the current origin.\n * Otherwise, it dispatches the `logout` action to the Redux store.\n */\n logout: () => {\n const type = authenticate.authenticationType;\n if (type === INTERNAL_LOGIN_TYPE.PAC4J_INDIRECT) {\n authenticate.redirectToLogout();\n } else if (Cache.getItem(\"isRedirectLogin\")) {\n const origin = window.location.origin;\n const url = `${origin}${BASE_PATH}/logout?url=${origin}${BASE_PATH}`;\n Cache.setItem(\"isRedirectLogin\", false);\n window.location.assign(url);\n } else {\n return dispatch(logout());\n }\n },\n\n logoutUrl: authenticate.getLogoutUrl(),\n };\n};\n","import {\n ApplicationModel,\n CaseViewModel,\n DetailModel,\n GroupingPanelModel,\n TabModel,\n UserProfileModel,\n} from \"@beinformed/ui/models\";\n\nimport { useModularUIBasic } from \"./useModularUIBasic\";\n\nimport type { Href } from \"@beinformed/ui/models\";\nimport type { HookOptions } from \"./useModularUIBasic\";\n\n/**\n * Load application\n */\nexport const useApplication = (options?: HookOptions) =>\n useModularUIBasic(\"application\", \"/\", {\n expectedModels: [\"Application\"],\n targetModel: ApplicationModel,\n ...options,\n });\n\n/**\n * Load a tab by href\n */\nexport const useTab = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"tab\", href, {\n expectedModels: [\"Tab\"],\n targetModel: TabModel,\n ...options,\n });\n\n/**\n * Load caseview by href\n */\nexport const useCaseView = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"caseview\", href, {\n expectedModels: [\"CaseView\"],\n targetModel: CaseViewModel,\n ...options,\n });\n\nexport const useGroupingPanel = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"groupingpanel\", href, {\n expectedModels: [\"GroupingPanel\"],\n targetModel: GroupingPanelModel,\n ...options,\n });\n\nexport const useDetailPanel = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"detailpanel\", href, {\n expectedModels: [\"Detail\"],\n targetModel: DetailModel,\n ...options,\n });\n\nexport const useUserProfile = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"userprofile\", href, {\n expectedModels: [\"UserProfile\"],\n targetModel: UserProfileModel,\n ...options,\n });\n","import { useMemo } from \"react\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\n\nimport { useLocation } from \"../hooks/useRouter\";\nimport { useBEISelector } from \"../redux/hooks\";\nimport { MODULARUI_STATUS } from \"../redux/modularui/constants\";\n\nimport { useModularUI } from \"./useModularUI\";\nimport { useModularUIKey } from \"./useModularUIKey\";\n\nimport type { Href } from \"@beinformed/ui/models\";\nimport type { ModularUIResponse } from \"@beinformed/ui/modularui\";\n\n/**\n * Configuration options for low-level modular UI requests.\n */\nexport interface HookOptions {\n key?: string;\n origin?: string;\n contextPath?: string;\n removeOnUnmount?: boolean;\n formdata?: string | undefined | null;\n}\n\n/**\n * Configuration options for the useModularUIBasic hook.\n * Allows for type enforcement, caching control, and reload behavior.\n */\nexport interface UseModularUIBasicOptions<T> {\n expectedModels?: string[];\n targetModel?: new (modularuiResponse: ModularUIResponse) => T;\n forceTargetModel?: boolean;\n origin?: string;\n contextPath?: string;\n cache?: boolean;\n key?: string;\n isReload?: boolean;\n removeOnUnmount?: boolean;\n formdata?: string | undefined | null; // If present, the hook switches from GET to POST\n}\n\n/**\n * Internal helper to transform high-level hook options into a configuration\n * object compatible with the core useModularUI fetcher.\n * Logic:\n * 1. Defaults to GET method.\n * 2. If 'formdata' is present, it switches to POST and assigns 'data'.\n * 3. Forces 'isReload' if the useReload check returns true.\n */\nconst createUseModularUIOptions = <T>(\n options: UseModularUIBasicOptions<T>,\n mustReload: boolean,\n) => {\n const baseOptions: Record<string, unknown> = {\n expectedModels: [],\n method: HTTP_METHODS.GET,\n data: undefined,\n ...options,\n isReload: mustReload || options.isReload,\n };\n\n if (options.formdata != null) {\n baseOptions.method = HTTP_METHODS.POST;\n baseOptions.data = options.formdata;\n }\n\n return baseOptions;\n};\n\n/**\n * Validates that the returned model type matches one of the expected model strings.\n * Logs a warning to the console if there is a mismatch (useful for debugging UI-backend contracts).\n */\nconst validateModel = (model: unknown, expectedModels: string[]) => {\n if (\n expectedModels.length > 0 &&\n model !== null &&\n typeof model === \"object\" &&\n \"type\" in model &&\n typeof model.type === \"string\"\n ) {\n const isCorrectModel = expectedModels.includes(model.type);\n if (!isCorrectModel) {\n console.warn(model, \"is not of instance\", expectedModels);\n }\n }\n};\n\n/**\n * A simplified abstraction over useModularUI that includes automatic\n * model validation and smart-reload logic based on router state.\n *\n * @param {string} defaultKey - The default identifier for the model.\n * @param {string | Href} href - The endpoint to fetch.\n * @param {UseModularUIBasicOptions} options - Extended configuration options.\n */\nexport const useModularUIBasic = <T>(\n defaultKey: string,\n href: string | Href,\n options: UseModularUIBasicOptions<T> = {},\n): T | undefined => {\n const memoizedHref = useMemo(() => href.toString(), [href]);\n\n // Use the key provided in options if available, otherwise fallback to the default\n const key = options.key ?? defaultKey;\n\n // Determine if we need to bypass cache based on navigation 'reload' signals\n const mustReload = useReload(key, memoizedHref);\n\n // Memoize options to prevent useModularUI from re-fetching on every parent render\n const modularUIOptions = useMemo(\n () => createUseModularUIOptions(options, mustReload),\n [options, mustReload],\n );\n\n const modularUI = useModularUI(key, href, modularUIOptions);\n\n const expectedModels = useMemo(\n () => options.expectedModels ?? [],\n [options.expectedModels],\n );\n\n // Extract and validate the model from the modularUI wrapper object\n return useMemo((): T | undefined => {\n if (modularUI?.model) {\n validateModel(modularUI.model, expectedModels);\n return modularUI.model as T;\n }\n return undefined;\n }, [expectedModels, modularUI]);\n};\n\n/**\n * Determines if a model should be reloaded based on the 'reload' timestamp\n * found in the React Router location state.\n * This is used for \"force refresh\" scenarios where a user navigates to a\n * page and expects fresh data (e.g., after a form submission elsewhere).\n * @param {string} modelKey - The model type key.\n * @param {string} url - The resource URL.\n * @returns {boolean} True if the store data is stale compared to the reload signal.\n */\nexport const useReload = (modelKey: string, url: string): boolean => {\n const location = useLocation();\n const key = useModularUIKey(modelKey, url);\n\n // Access the current entry in the Redux store\n const modelEntry = useBEISelector((state) => state.modularui[key]);\n\n if (modelEntry) {\n const reload = (location?.state?.reload || 0) as number;\n\n // If a reload timestamp exists in the router state\n if (reload > 0) {\n const isFullyLoaded = modelEntry?.status === MODULARUI_STATUS.FINISHED;\n const lastModification = modelEntry?.lastModification ?? 0;\n\n // Trigger reload only if the model is already finished loading\n // AND the data we have is older than the requested reload time.\n if (isFullyLoaded && lastModification < reload) {\n return true;\n }\n }\n }\n return false;\n};\n","import { useMemo } from \"react\";\n\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport {\n go,\n goBack,\n goForward,\n push,\n replace,\n} from \"../redux/router/routerActions\";\n\nimport type { RouterLocation } from \"../redux/router/routerReducer\";\nimport type { RootState } from \"../redux/store\";\n\n/**\n * Returns the full location object from the router state.\n */\nexport const useLocation = () =>\n useBEISelector((state: RootState) => state.router.location);\n\n/**\n * Returns the unique key of the current location.\n */\nexport const useLocationKey = () => useLocation()?.key ?? \"\";\n\n/**\n * Returns the current search (querystring) portion of the URL.\n */\nexport const useQuerystring = () => useLocation()?.search;\n\n/**\n * Returns the current URL pathname.\n */\nexport const usePathname = () => useLocation()?.pathname;\n\n/**\n * Provides navigation methods.\n */\nexport const useNavigation = () => {\n const dispatch = useBEIDispatch();\n\n return useMemo(\n () => ({\n push: (location: RouterLocation | string, state?: RootState) =>\n dispatch(push(location, state)),\n replace: (location: RouterLocation | string, state?: RootState) =>\n dispatch(replace(location, state)),\n go: (delta: number) => dispatch(go(delta)),\n goBack: () => dispatch(goBack()),\n goForward: () => dispatch(goForward()),\n }),\n [dispatch],\n );\n};\n","import { useEffect, useMemo, useRef } from \"react\";\n\nimport { useLocation } from \"react-router\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport { Href } from \"@beinformed/ui/models\";\n\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport { MODULARUI_STATUS } from \"../redux/modularui/constants\";\nimport { fetchModel } from \"../redux/modularui/fetchModel\";\nimport { removeModelByKey } from \"../redux/modularui/modelActions\";\n\nimport { useDeepCompareEffect } from \"./useDeepCompareEffect\";\nimport { useModularUIKey } from \"./useModularUIKey\";\n\nimport type { ModularUIRequestOptions } from \"@beinformed/ui/utils\";\nimport type { ModelEntry } from \"../redux/modularui/types\";\n\n/**\n * A custom hook to fetch and manage Be Informed modular UI resources.\n * It handles automatic data fetching based on URL/query changes, manages Redux state\n * synchronization, and provides cleanup logic when components unmount.\n *\n * @param {string} modelKey - A unique identifier for the type of model being fetched.\n * @param {string | Href} url - The endpoint URL or Href instance to fetch data from.\n * @param {RequestModularUIOptions} options - Configuration for the request (method, headers, etc.).\n * @returns {ModelEntry} The model data retrieved from the Redux store.\n */\nexport const useModularUI = (\n modelKey: string,\n url: string | Href,\n options: ModularUIRequestOptions = {},\n): ModelEntry | undefined => {\n const dispatch = useBEIDispatch();\n\n // Normalize the URL input into a Href instance to safely access query params and paths\n const hrefInstance = useMemo(() => new Href(url), [url]);\n const requestUrl = useMemo(() => hrefInstance.toString(), [hrefInstance]);\n const currentQueryString = hrefInstance.querystring;\n\n // Persistence ref to detect if query parameters have changed between renders\n const prevQueryRef = useRef(currentQueryString);\n\n // Generate a unique key for the Redux store based on the model type and the full URL\n const key = useModularUIKey(modelKey, requestUrl);\n\n // Select the specific piece of state corresponding to this modular UI component\n const model = useBEISelector((state) => state.modularui[key]);\n\n /**\n * Memoize request options to prevent unnecessary re-renders.\n * Merges default settings (GET method, auto-cleanup) with user-provided options.\n */\n const requestOptions = useMemo(() => {\n const merged = {\n method: HTTP_METHODS.GET,\n removeOnUnmount: true,\n ...options,\n };\n\n if (url instanceof Href) {\n merged.origin = merged.origin ?? url.origin;\n merged.contextPath = merged.contextPath ?? url.contextPath;\n }\n return merged;\n }, [options, url]);\n\n const location = useLocation<{ redirectLocation?: string | Href }>();\n const redirectLocation = location.state?.redirectLocation;\n\n // eslint-disable-next-line react-hooks/refs\n const isQueryChanged = prevQueryRef.current !== currentQueryString;\n\n /**\n * Determines if a network request should be initiated.\n * Logic includes:\n * - Model doesn't exist yet (Initial load)\n * - Previous request resulted in an error (Retry)\n * - The query parameters changed (Filtering/Paging)\n * - A redirect was triggered specifically for this URL\n * - Manual 'isReload' flag is passed in options\n */\n const shouldLoad =\n model == null ||\n model.status === MODULARUI_STATUS.ERROR ||\n isQueryChanged ||\n (redirectLocation instanceof Href\n ? redirectLocation.equals(requestUrl)\n : false) ||\n requestOptions.isReload === true;\n\n // Synchronize the ref after the render cycle determines if we should load\n useEffect(() => {\n prevQueryRef.current = currentQueryString;\n }, [currentQueryString]);\n\n // Execute the load action. Deep compare is used on options to prevent\n // infinite loops caused by passing inline object literals.\n useDeepCompareEffect(() => {\n if (requestUrl !== \"\" && shouldLoad) {\n dispatch(fetchModel({ key, href: requestUrl, options: requestOptions }));\n }\n }, [key, requestUrl, requestOptions, shouldLoad]);\n\n // Cleanup Effect:\n // If 'removeOnUnmount' is true, this removes the model data from the Redux store\n // when the component using this hook is destroyed.\n useEffect(() => {\n if (requestOptions.removeOnUnmount) {\n return () => {\n dispatch(removeModelByKey(key));\n };\n }\n }, [dispatch, key, requestOptions.removeOnUnmount]);\n\n return model;\n};\n","import { useEffect, useRef } from \"react\";\n\nimport { dequal as deepEqual } from \"dequal/lite\";\n\nimport { IS_DEV } from \"@beinformed/ui/utils\";\n\nimport type { DependencyList, EffectCallback } from \"react\";\n\n/**\n * Validates that dependencies are used correctly.\n * Deep compare should not be used with empty arrays or no dependencies.\n */\nfunction checkDeps(deps: DependencyList) {\n if (IS_DEV) {\n if (!deps || deps.length === 0) {\n console.warn(\n \"useDeepCompareEffect should not be used with no dependencies. Use React.useEffect instead.\",\n );\n }\n }\n}\n\n/**\n * Custom hook to generate a stable signal (number) that only changes when\n * the 'dependencies' array changes value via a deep comparison.\n *\n * * NOTE: This function intentionally reads `ref.current` during the render phase\n * to perform memoization. This is a well-known pattern for deep-compare hooks\n * but requires an ESLint bypass for the strict 'no-accessing-refs-during-render' rule.\n */\nfunction useDeepCompareMemoize(dependencies: DependencyList) {\n const ref = useRef<DependencyList>(dependencies);\n\n // Only update the ref if the deep equality check fails\n // eslint-disable-next-line react-hooks/refs\n if (!deepEqual(dependencies, ref.current)) {\n // eslint-disable-next-line react-hooks/refs\n ref.current = dependencies;\n }\n\n // eslint-disable-next-line react-hooks/refs\n return ref.current;\n}\n\n/**\n * A replacement for useEffect that compares dependencies deeply.\n */\nexport function useDeepCompareEffect(\n callback: EffectCallback,\n dependencies: DependencyList,\n) {\n checkDeps(dependencies);\n\n // We use the memoized ref as the dependency.\n // React's shallow check will only trigger when the ref object itself changes.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(callback, useDeepCompareMemoize(dependencies));\n}\n","import { useMemo } from \"react\";\n\nimport { useLocale } from \"./useI18n\";\n\n/**\n * Generates the key that is used in the modular ui reducer of redux\n */\nexport const useModularUIKey = (modelKey: string, url: string) => {\n const locale = useLocale();\n return useMemo(\n () => `${modelKey}(${url.split(\"?\")[0]})(${locale})`,\n [modelKey, url, locale],\n );\n};\n","import { useEffect, useState } from \"react\";\n\nimport { ModularUIRequest } from \"@beinformed/ui/modularui\";\n\nimport { useLocale } from \"../hooks/useI18n\";\nimport { useProgressIndicator } from \"../hooks/useProgressIndicator\";\n\nimport type {\n ContentModel,\n Href,\n SourceReferenceCollection,\n} from \"@beinformed/ui/models\";\n\n/**\n * Hook to retrieve multiple source references at once\n */\nexport const useContentFromSourceReferences = (\n sourceReferences: SourceReferenceCollection,\n renderChildSections: boolean,\n): ContentModel[] => {\n const [content, setContent] = useState<ContentModel[]>([]);\n const localeCode = useLocale();\n\n const { start, finish } = useProgressIndicator();\n\n const hrefs = sourceReferences\n .map((sourceReference) => sourceReference.link?.selfhref.href)\n .filter((href, index, self) => self.indexOf(href) === index)\n .map((href) => href?.toString());\n\n const allHrefs = JSON.stringify(hrefs);\n useEffect(() => {\n const requests = JSON.parse(allHrefs).map((href: Href) => {\n const modularuiRequest = new ModularUIRequest(href);\n modularuiRequest.locale = localeCode;\n return modularuiRequest.fetchContent(renderChildSections);\n });\n\n start();\n Promise.all(requests).then((responseContent) => {\n setContent(responseContent);\n finish();\n });\n\n // start and finish don't change\n }, [allHrefs, localeCode, renderChildSections, start, finish]);\n\n return content;\n};\n","// @flow\nimport { useCallback } from \"react\";\n\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport {\n finishProgress,\n resetProgress,\n startProgress,\n updateProgress,\n} from \"../redux/progressindicator/progressIndicatorActions\";\n\nexport const useProgressIndicator = () => {\n const dispatch = useBEIDispatch();\n\n const start = useCallback(() => {\n dispatch(startProgress());\n }, [dispatch]);\n const finish = useCallback(() => {\n dispatch(finishProgress());\n }, [dispatch]);\n const reset = useCallback(() => {\n dispatch(resetProgress());\n }, [dispatch]);\n const update = useCallback(\n (percentComplete: number) => {\n dispatch(updateProgress(percentComplete));\n },\n [dispatch],\n );\n\n return { start, finish, reset, update };\n};\n\n/**\n */\nexport const useProgressIndicatorState = () =>\n useBEISelector((state) => state.progressindicator);\n","import { produce } from \"immer\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport { FormModel, Href } from \"@beinformed/ui/models\";\nimport { getSetting } from \"@beinformed/ui/settings\";\n\nimport { updateFormAttribute } from \"../redux/form/attributeActions\";\nimport { cancelForm, previousObject } from \"../redux/form/formActions\";\nimport {\n addRepeatableAttributeSet,\n cancelRepeatableAttributeSet,\n removeRepeatableAttributeSet,\n} from \"../redux/form/formAttributesetRepeatable\";\nimport { useBEIDispatch } from \"../redux/hooks\";\nimport { fetchModel } from \"../redux/modularui/fetchModel\";\nimport { removeModelByKey } from \"../redux/modularui/modelActions\";\nimport { showFormNotification } from \"../redux/notifications/notificationActions\";\n\nimport { useModularUI } from \"./useModularUI\";\n\nimport type {\n AttributeModel,\n FormObjectModel,\n ModularUIModel,\n} from \"@beinformed/ui/models\";\n\nexport interface UpdateFormOptions {\n autosubmit: boolean;\n autosave: boolean;\n autoupdate: boolean;\n forceUpdate?: boolean;\n /** Default true: Activate/deactivate the form object validate by an update */\n validate?: boolean;\n}\n\n/**\n * Load a form by href\n */\nexport const useForm = (\n href: string | Href,\n data?: Record<string, unknown>,\n) => {\n const formHref = new Href(href);\n\n if (!getSetting(\"ALWAYS_COMMIT_FORM\")) {\n formHref.addParameter(\"commit\", \"false\");\n }\n\n const form = useModularUI(\"form\", formHref, {\n method: HTTP_METHODS.POST,\n targetModel: FormModel,\n removeOnUnmount: true,\n data: data ? JSON.stringify(data) : undefined,\n origin: formHref.origin,\n contextPath: formHref.contextPath,\n });\n\n if (form?.model instanceof FormModel) {\n return form.model;\n }\n\n return;\n};\n\n/**\n * Form navigation methods\n */\nexport const useFormNavigation = () => {\n const dispatch = useBEIDispatch();\n\n const previous = (form: FormModel) => dispatch(previousObject(form));\n\n const cancel = (form: FormModel) => dispatch(cancelForm(form));\n\n const submit = (form: FormModel) =>\n dispatch(\n fetchModel({\n key: form.connectKey || form.key,\n href: form.selfhref,\n options: {\n method: HTTP_METHODS.POST,\n data: form.formdata,\n updateHandler: (newModel: ModularUIModel): ModularUIModel => {\n if (newModel instanceof FormModel) {\n return produce(newModel, (draft) => {\n draft.update(newModel);\n });\n }\n return newModel;\n },\n targetModel: FormModel,\n },\n }),\n );\n\n const remove = (form: FormModel) =>\n dispatch(removeModelByKey(form.connectKey || \"\"));\n\n const showFormNotificationAction = (form: FormModel) =>\n dispatch(showFormNotification(form));\n\n return {\n previous,\n cancel,\n submit,\n remove,\n showFormNotification: showFormNotificationAction,\n };\n};\n\n/**\n * Hook that returns a function to update attributes of a form object.\n * <br >\n * The returned function accepts the following options:\n *\n * - autosubmit: Automatically submit the form after a change\n * - autosav: Automatically save the form (in the background) after a change\n * - autoupdate: Automatically update the current form object after a change\n * - forceUpdate: Force the update even if conditions are not met.\n * - validate: Activate/deactivate the form object validation by an update.\n */\nexport const useAttributeUpdate = (\n form: FormModel,\n formObject: FormObjectModel,\n) => {\n const dispatch = useBEIDispatch();\n\n return (\n attribute: AttributeModel,\n inputvalue: string,\n options?: UpdateFormOptions,\n ) =>\n dispatch(\n updateFormAttribute({ form, formObject, attribute, inputvalue, options }),\n );\n};\n\n/**\n * Repeatable attributeset actions\n */\nexport const useRepeatableAttributeSet = (form: FormModel) => {\n const dispatch = useBEIDispatch();\n\n return {\n save: () => dispatch(addRepeatableAttributeSet(form)),\n cancel: (object: FormObjectModel) =>\n dispatch(cancelRepeatableAttributeSet(form, object)),\n remove: (object: FormObjectModel) =>\n dispatch(removeRepeatableAttributeSet(form, object)),\n };\n};\n","import { useCallback, useMemo } from \"react\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport {\n AssignmentFilterModel,\n CaseSearchModel,\n DetailModel,\n FilterModel,\n ListDetailModel,\n ListModel,\n} from \"@beinformed/ui/models\";\n\nimport { useBEIDispatch } from \"../redux/hooks\";\nimport { fetchModel } from \"../redux/modularui/fetchModel\";\n\nimport { useModularUIBasic } from \"./useModularUIBasic\";\nimport { useNavigation } from \"./useRouter\";\n\nimport type {\n AttributeModel,\n FilterCollection,\n Href,\n IFilter,\n} from \"@beinformed/ui/models\";\nimport type { HookOptions } from \"./useModularUIBasic\";\n\ninterface ListNavigationOptions {\n syncLocation?: boolean;\n historyAction?: \"push\" | \"replace\";\n}\n\nexport const useList = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"list\", href, {\n expectedModels: [\"List\"],\n targetModel: ListModel,\n ...options,\n });\n\nexport const useListOrDetail = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic<ListModel | DetailModel>(\"list\", href, {\n expectedModels: [\"List\", \"Detail\"],\n // @ts-expect-error Need to improve typing for array\n targetModel: [ListModel, DetailModel],\n ...options,\n });\n\nexport const useListDetail = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"listdetail\", href, {\n expectedModels: [\"ListDetail\"],\n targetModel: ListDetailModel,\n forceTargetModel: true,\n ...options,\n });\n\nexport const useListNavigation = ({\n syncLocation = true,\n historyAction = \"push\",\n}: ListNavigationOptions = {}) => {\n const { push, replace } = useNavigation();\n const dispatch = useBEIDispatch();\n\n const navigate = historyAction === \"push\" ? push : replace;\n\n const update = useCallback(\n (list: ListModel, resetPage = false) => {\n const listHref = list.selfhref;\n if (resetPage) {\n listHref.page = undefined;\n }\n\n if (list.requestMethod === HTTP_METHODS.POST) {\n if (syncLocation) {\n navigate({\n pathname: listHref.path,\n search: listHref.getQuerystring(true),\n state: { formdata: list.formdata },\n });\n }\n\n dispatch(\n fetchModel({\n key: list.connectKey || list.key,\n href: listHref,\n options: {\n method: HTTP_METHODS.POST,\n data: list.formdata,\n targetModel: [ListModel, CaseSearchModel],\n },\n }),\n );\n } else {\n if (syncLocation) {\n navigate({\n pathname: listHref.path,\n search: listHref.getQuerystring(true),\n });\n }\n dispatch(\n fetchModel({\n key: list.connectKey || list.key,\n href: listHref,\n options: {\n method: HTTP_METHODS.GET,\n targetModel: [ListModel, CaseSearchModel],\n },\n }),\n );\n }\n },\n [dispatch, navigate, syncLocation],\n );\n\n const updateFilters = useCallback(\n (list: ListModel, filters: FilterCollection | IFilter[]) => {\n list.filterCollection = filters;\n update(list, true);\n },\n [update],\n );\n\n const updateFilter = useCallback(\n (\n list: ListModel,\n filter: IFilter,\n value: string,\n attribute?: AttributeModel,\n ) => {\n if (filter instanceof AssignmentFilterModel && !attribute) {\n throw new TypeError(\n \"AssignmentFilterModel needs the attribute argument to be able to update the filter\",\n );\n }\n\n let filterToUpdate = null;\n let targetAttr = attribute;\n\n if (attribute) {\n filterToUpdate = list.filterCollection.getFilterByAttributeKey(\n attribute.key,\n );\n } else if (filter instanceof FilterModel) {\n filterToUpdate = list.filterCollection.getFilterByName(filter.name);\n targetAttr = filter.attribute;\n }\n\n if (filterToUpdate && targetAttr) {\n filterToUpdate.update(targetAttr, value);\n } else {\n const searchKey = attribute\n ? `key: ${attribute.key}`\n : `name: ${filter.name}`;\n console.error(\n `Can't find a filter to update by ${searchKey} on list: ${list.selfhref.toString()}`,\n );\n }\n\n update(list, true);\n },\n [update],\n );\n\n const resetFilters = useCallback(\n (list: ListModel) => {\n list.filterCollection.reset();\n update(list, true);\n },\n [update],\n );\n\n const removeFilter = useCallback(\n (list: ListModel, filter: IFilter) => {\n if (filter.name) {\n list.filterCollection.getFilterByName(filter.name)?.reset();\n }\n update(list, true);\n },\n [update],\n );\n\n const updateSort = useCallback(\n (list: ListModel, sortOption: string) => {\n list.sorting.value = sortOption;\n update(list, true);\n },\n [update],\n );\n\n const updatePage = useCallback(\n (list: ListModel, page: number) => {\n list.paging.page = page;\n update(list);\n },\n [update],\n );\n\n const updatePageSize = useCallback(\n (list: ListModel, pagesize: number) => {\n list.paging.pagesize.value = pagesize;\n update(list, true);\n },\n [update],\n );\n\n return useMemo(\n () => ({\n update,\n updateFilters,\n updateFilter,\n updateSort,\n updatePage,\n updatePageSize,\n resetFilters,\n removeFilter,\n }),\n [\n removeFilter,\n resetFilters,\n update,\n updateFilter,\n updateFilters,\n updatePage,\n updatePageSize,\n updateSort,\n ],\n );\n};\n","import { useCallback } from \"react\";\n\nimport { IllegalArgumentException } from \"@beinformed/ui/exceptions\";\n\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport { closeModal, showModal } from \"../redux/modals/modalsReducer\";\n\nimport type { RootState } from \"../redux/store\";\n\ntype ModalHook = (modalId: string) => {\n key: string | null;\n size?: string | null;\n visible: boolean;\n show: () => void;\n close: () => void;\n};\n\n/**\n * Manage modals\n */\nexport const useModal: ModalHook = (modalId: string) => {\n if (!modalId) {\n throw new IllegalArgumentException(\n \"Missing modalId argument for useModal hook\",\n );\n }\n\n const dispatch = useBEIDispatch();\n const modal = useBEISelector((state: RootState) =>\n state.modals.modals.find((m) => m.key === modalId),\n );\n\n const show = useCallback(() => {\n dispatch(showModal(modalId));\n }, [dispatch, modalId]);\n\n const close = useCallback(() => {\n dispatch(closeModal(modalId));\n }, [dispatch, modalId]);\n\n return {\n key: modal ? modal.key : null,\n size: modal ? modal.size : null,\n visible: modal ? modal.visible : false,\n show,\n close,\n };\n};\n","import {\n ConceptIndexModel,\n ContentIndexModel,\n ContentTOCModel,\n ContentTypeModel,\n Href,\n ModelCatalogModel,\n} from \"@beinformed/ui/models\";\nimport { createHref, filterParameters } from \"@beinformed/ui/utils\";\n\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport { updateEntryDate } from \"../redux/modelcatalog/modelCatalogReducer\";\nimport { getEntryDate } from \"../redux/modelcatalog/modelCatalogSelectors\";\n\nimport { useModularUIBasic } from \"./useModularUIBasic\";\nimport { useLocation } from \"./useRouter\";\n\nimport type { ConceptDetailModel, ContentModel } from \"@beinformed/ui/models\";\nimport type { ISO_DATE } from \"@beinformed/ui/types\";\nimport type { UseModularUIBasicOptions } from \"./useModularUIBasic\";\n\nexport interface SearchFilter {\n index?: string;\n label?: string;\n type?: string | string[];\n modelCategory?: string | string[];\n entryDate?: string;\n}\n\nexport const useModelCatalog = (\n options?: UseModularUIBasicOptions<ModelCatalogModel>,\n) =>\n useModularUIBasic(\"modelcatalog\", \"/modelcatalog\", {\n expectedModels: [\"ModelCatalog\"],\n targetModel: ModelCatalogModel,\n ...options,\n });\n\nexport const useConceptIndex = (\n href: string | Href,\n key = \"conceptindex\",\n options?: UseModularUIBasicOptions<ConceptIndexModel>,\n) => {\n const { entryDate } = useEntryDate();\n const url = filterParameters(href, [\n \"index\",\n \"label\",\n \"modelcategory\",\n \"type\",\n ]);\n url.setParameter(\"entryDate\", entryDate);\n\n return useModularUIBasic(key, url, {\n expectedModels: [\"ConceptIndex\"],\n targetModel: ConceptIndexModel,\n ...options,\n });\n};\n\nexport const useConceptDetail = (\n concept: string | Href,\n key = \"conceptdetail\",\n options?: UseModularUIBasicOptions<ConceptDetailModel>,\n) => {\n const { entryDate } = useEntryDate();\n const location = useLocation();\n\n const href = createHref(\"concepts\", concept, entryDate, location, []);\n\n return useModularUIBasic(key, href, {\n expectedModels: [\"ConceptDetail\", \"BusinessScenario\"],\n ...options,\n });\n};\n\nexport const useContentIndex = (\n href: string | Href,\n key = \"contentindex\",\n options?: UseModularUIBasicOptions<ContentIndexModel>,\n) => {\n const url = filterParameters(href, [\"index\", \"label\", \"type\"]);\n return useModularUIBasic(key, url, {\n expectedModels: [\"ContentIndex\"],\n targetModel: ContentIndexModel,\n ...options,\n });\n};\n\nexport const useContentTOC = (\n content: string | Href,\n key = \"contenttoc\",\n options?: UseModularUIBasicOptions<ContentTOCModel>,\n) => {\n const { entryDate } = useEntryDate();\n const location = useLocation();\n\n const href = createHref(\"content\", content, entryDate, location, [\n \"complete\",\n ]);\n\n return useModularUIBasic(key, href, {\n expectedModels: [\"ContentTOC\"],\n targetModel: ContentTOCModel,\n ...options,\n });\n};\n\nexport const useContent = (\n content: string | Href,\n key = \"content\",\n options?: UseModularUIBasicOptions<ContentModel>,\n) => {\n const { entryDate } = useEntryDate();\n const location = useLocation();\n\n const href = createHref(\"content\", content, entryDate, location, [\n \"complete\",\n ]);\n\n return useModularUIBasic(key, href, {\n expectedModels: [\"Content\", \"ContentTOC\"],\n ...options,\n });\n};\n\nexport const useCompleteSource = (\n content: string | Href,\n key = \"content\",\n options?: UseModularUIBasicOptions<ContentModel | ContentTOCModel>,\n) => {\n const { entryDate } = useEntryDate();\n const location = useLocation();\n\n const contentHref = new Href(content);\n contentHref.removeParameter(\"complete\");\n contentHref.addParameter(\"complete\", \"true\");\n\n const href = createHref(\"content\", contentHref, entryDate, location, [\n \"complete\",\n ]);\n\n return useModularUIBasic(key, href, {\n expectedModels: [\"Content\", \"ContentTOC\"],\n ...options,\n });\n};\n\nexport const useContentType = (\n contentType: string | Href,\n key = \"contenttypes\",\n options?: UseModularUIBasicOptions<ContentTypeModel>,\n) => {\n const href = createHref(\n \"contenttypes\",\n contentType,\n undefined,\n undefined,\n [],\n );\n return useModularUIBasic(key, href, {\n expectedModels: [\"ContentType\"],\n targetModel: ContentTypeModel,\n ...options,\n });\n};\n\nexport const useRelatedConcepts = (\n href: string | Href,\n key = \"relatedconcepts\",\n options?: UseModularUIBasicOptions<ConceptIndexModel>,\n) => {\n const { entryDate } = useEntryDate();\n const url = filterParameters(href, [\"modelcategory\"]);\n url.setParameter(\"entryDate\", entryDate);\n\n return useModularUIBasic(key, url, {\n expectedModels: [\"ConceptIndex\"],\n targetModel: ConceptIndexModel,\n ...options,\n });\n};\n\nconst getSearchHref = (uri: string, filters: SearchFilter) => {\n const filterString = [];\n\n for (const key of Object.keys(filters)) {\n const filterValue = filters[key as keyof SearchFilter];\n if (filterValue) {\n let value: string = Array.isArray(filterValue)\n ? filterValue.join(\",\")\n : filterValue;\n if (key === \"type\") {\n value = value.replace(\"#\", \"%23\"); // handles un-encoded #\n }\n filterString.push(`${key}=${value}`);\n }\n }\n\n return filterString.length ? `${uri}?${filterString.join(\"&\")}` : uri;\n};\n\nexport const useConceptSearch = (\n filters: SearchFilter,\n key: string | \"conceptSearch\",\n options?: UseModularUIBasicOptions<ConceptIndexModel>,\n) => {\n const href = getSearchHref(\"/concepts\", filters);\n return useConceptIndex(href, key, options);\n};\n\nexport const useContentSearch = (\n filters: SearchFilter,\n key: string | \"contentSearch\",\n options?: UseModularUIBasicOptions<ContentIndexModel>,\n) => {\n const href = getSearchHref(\"/content\", filters);\n return useContentIndex(href, key, options);\n};\n\n/**\n * Retrieve and update the entrydate for the modelcatalog\n */\nexport const useEntryDate = () => {\n const dispatch = useBEIDispatch();\n const entryDate = useBEISelector(getEntryDate);\n\n return {\n entryDate,\n setEntryDate: (entryDate: ISO_DATE) => dispatch(updateEntryDate(entryDate)),\n };\n};\n","import { createSelector } from \"reselect\";\n\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport { MODULARUI_STATUS } from \"../redux/modularui/constants\";\nimport { reloadModel } from \"../redux/modularui/reloadModel\";\n\nimport type { ModularUIModel } from \"@beinformed/ui/models\";\nimport type { ModularUIRequestOptions } from \"@beinformed/ui/utils\";\nimport type { RootState } from \"../redux/store\";\n\ntype ReloadCallback = (model: ModularUIModel | undefined) => boolean;\n\ntype UseModels = () => {\n reload: (model: ModularUIModel, options?: Record<string, unknown>) => void;\n reloadWithFilter: (\n callbackFn: ReloadCallback,\n options?: Record<string, unknown>,\n ) => void;\n};\n\n/**\n * Hook that contains the reload property that can be used to reload a model\n */\nexport const useModels: UseModels = () => {\n const dispatch = useBEIDispatch();\n\n const selectModularUI = (state: RootState) => state.modularui;\n const selector = createSelector([selectModularUI], (modularui) => {\n const models = [];\n const keys = Object.keys(modularui);\n for (const key of keys) {\n const model = modularui[key];\n if (model?.status === MODULARUI_STATUS.FINISHED) {\n models.push(model.model);\n }\n }\n return models;\n });\n\n const modularuiModels = useBEISelector(selector);\n\n return {\n reload: (model: ModularUIModel, options?: ModularUIRequestOptions) => {\n dispatch(reloadModel(model, options));\n },\n reloadWithFilter: (\n callbackFn: ReloadCallback,\n options?: Record<string, unknown>,\n ) => {\n const modelsToReload = modularuiModels.filter(callbackFn);\n for (const modelToReload of modelsToReload) {\n if (modelToReload) {\n dispatch(reloadModel(modelToReload, options));\n }\n }\n },\n };\n};\n","import { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport {\n dismissNotification,\n NOTIFICATION_TYPES,\n showNotification,\n} from \"../redux/notifications/notificationReducer\";\n\nimport type { ErrorResponse } from \"@beinformed/ui/models\";\nimport type { MessageObject } from \"../i18n/types\";\nimport type { RootState } from \"../redux/store\";\n\nexport const useNotification = () => {\n const dispatch = useBEIDispatch();\n const { render, messageType, message, error } = useBEISelector(\n (state: RootState) => state.notification,\n );\n\n return {\n render,\n messageType,\n message,\n error,\n dismiss: () => dispatch(dismissNotification()),\n };\n};\n\nexport const useErrorNotification = () => {\n const dispatch = useBEIDispatch();\n return (message: MessageObject, error?: ErrorResponse) => {\n return dispatch(\n showNotification({ type: NOTIFICATION_TYPES.ERROR, message, error }),\n );\n };\n};\n","import { useMemo, useState } from \"react\";\n\nimport { useLocation, useRouteMatch } from \"react-router\";\n\nimport {\n CaseSearchModel,\n DetailModel,\n GroupingPanelModel,\n Href,\n ListModel,\n} from \"@beinformed/ui/models\";\n\nimport { useModularUIBasic } from \"./useModularUIBasic\";\n\nimport type { HookOptions } from \"./useModularUIBasic\";\n\nconst useUrl = (href?: string | Href, fromRoute = false): Href => {\n const [previousUrl, setPreviousUrl] = useState<Href | null>(null);\n const [previousExact, setPreviousExact] = useState(false);\n\n const match = useRouteMatch();\n const location = useLocation();\n\n const url = useMemo(() => {\n if (href == null && previousUrl == null) {\n return new Href(\"\");\n }\n\n const currentUrl = href instanceof Href ? href : new Href(href);\n\n if (!fromRoute) {\n return currentUrl;\n }\n\n if (match.isExact) {\n currentUrl.addParametersFromString(location.search);\n }\n\n return currentUrl;\n }, [href, previousUrl, fromRoute, match.isExact, location.search]);\n\n // Check equality to prevent unnecessary state updates\n const isUrlChanged = !url.equalsWithParameters(previousUrl);\n\n const shouldUpdate =\n isUrlChanged &&\n (match.isExact ||\n previousExact === match.isExact ||\n !previousUrl?.startsWith(match.url));\n\n if (shouldUpdate) {\n setPreviousUrl(url);\n setPreviousExact(match.isExact);\n }\n\n return shouldUpdate ? url : previousUrl || url;\n};\n\nexport const usePanel = (\n href?: string | Href,\n options?: HookOptions & {\n fromRoute?: boolean;\n },\n):\n | ListModel\n | GroupingPanelModel\n | DetailModel\n | CaseSearchModel\n | undefined => {\n const { fromRoute, ...hookOptions } = options || { fromRoute: false };\n\n const url = useUrl(href, fromRoute || false);\n\n return useModularUIBasic(\"panel\", url, {\n expectedModels: [\"List\", \"GroupingPanel\", \"Detail\", \"CaseSearch\"],\n // @ts-expect-error Need to improve typing for array\n targetModel: [ListModel, GroupingPanelModel, DetailModel, CaseSearchModel],\n ...hookOptions,\n });\n};\n","import { useMemo } from \"react\";\n\nimport pick from \"lodash/pick\";\nimport { createSelector } from \"reselect\";\n\nimport { useBEISelector } from \"../redux/hooks\";\n\nimport type { RootState } from \"../redux/store\";\n\nconst getPreferences = (state: RootState) => state.preferences;\n\nconst makeSelectPreference = (preferenceNames: string | string[]) => {\n const names = Array.isArray(preferenceNames)\n ? preferenceNames\n : [preferenceNames];\n\n return createSelector([getPreferences], (preferences) =>\n pick(preferences, names),\n );\n};\n\nexport const usePreference = (preferenceNames: string | string[]) => {\n const selectPreference = useMemo(\n () => makeSelectPreference(preferenceNames),\n [preferenceNames],\n );\n\n return useBEISelector(selectPreference);\n};\n"],"mappings":"6mBAAA,IAAAA,EAAAC,EAAA,CAAAC,GAAAC,KAAA,kBAAIC,GAAY,KAEZC,IAAkB,UAAW,CAC/B,GAAI,CACF,IAAIC,EAAOF,GAAU,OAAQ,gBAAgB,EAC7C,OAAAE,EAAK,CAAC,EAAG,GAAI,CAAC,CAAC,EACRA,CACT,MAAY,CAAC,CACf,GAAE,EAEFH,GAAO,QAAUE,KCVjB,IAAAE,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G7CK,CACT,EAAG,CAACd,EAAME,EAAaD,EAAWM,EAAM,QAASE,EAAS,MAAM,CAAC,EAK3DM,EAFe,CAACJ,EAAI,qBAAqBT,CAAW,IAIvDK,EAAM,SACLF,IAAkBE,EAAM,SACxB,CAACL,GAAa,WAAWK,EAAM,GAAG,GAEtC,OAAIQ,IACFZ,EAAeQ,CAAG,EAClBL,EAAiBC,EAAM,OAAO,GAGzBQ,EAAeJ,EAAMT,GAAeS,CAC7C,EAEaK,GAAW,CACtBhB,EACAiB,IAQe,CACf,GAAM,CAAE,UAAAhB,EAAW,GAAGiB,CAAY,EAAID,GAAW,CAAE,UAAW,EAAM,EAE9DN,EAAMZ,GAAOC,EAAMC,GAAa,EAAK,EAE3C,OAAOkB,EAAkB,QAASR,EAAK,CACrC,eAAgB,CAAC,OAAQ,gBAAiB,SAAU,YAAY,EAEhE,YAAa,CAACS,GAAWC,GAAoBC,GAAaC,EAAe,EACzE,GAAGL,CACL,CAAC,CACH,EC7EA,IAAAM,GAAiB,WAFjB,OAAS,WAAAC,OAAe,QAGxB,OAAS,kBAAAC,OAAsB,WAM/B,IAAMC,GAAkBC,GAAqBA,EAAM,YAE7CC,GAAwBC,GAAuC,CACnE,IAAMC,EAAQ,MAAM,QAAQD,CAAe,EACvCA,EACA,CAACA,CAAe,EAEpB,OAAOE,GAAe,CAACL,EAAc,EAAIM,MACvC,GAAAC,SAAKD,EAAaF,CAAK,CACzB,CACF,EAEaI,GAAiBL,GAAuC,CACnE,IAAMM,EAAmBC,GACvB,IAAMR,GAAqBC,CAAe,EAC1C,CAACA,CAAe,CAClB,EAEA,OAAOQ,EAAeF,CAAgB,CACxC","names":["require_defineProperty","__commonJSMin","exports","module","getNative","defineProperty","func","require_baseAssignValue","__commonJSMin","exports","module","defineProperty","baseAssignValue","object","key","value","require_assignValue","__commonJSMin","exports","module","baseAssignValue","eq","objectProto","hasOwnProperty","assignValue","object","key","value","objValue","require_baseSet","__commonJSMin","exports","module","assignValue","castPath","isIndex","isObject","toKey","baseSet","object","path","value","customizer","index","length","lastIndex","nested","key","newValue","objValue","require_basePickBy","__commonJSMin","exports","module","baseGet","baseSet","castPath","basePickBy","object","paths","predicate","index","length","result","path","value","require_baseHasIn","__commonJSMin","exports","module","baseHasIn","object","key","require_hasIn","__commonJSMin","exports","module","baseHasIn","hasPath","hasIn","object","path","require_basePick","__commonJSMin","exports","module","basePickBy","hasIn","basePick","object","paths","value","path","require_flatten","__commonJSMin","exports","module","baseFlatten","flatten","array","length","require_apply","__commonJSMin","exports","module","apply","func","thisArg","args","require_overRest","__commonJSMin","exports","module","apply","nativeMax","overRest","func","start","transform","args","index","length","array","otherArgs","require_constant","__commonJSMin","exports","module","constant","value","require_identity","__commonJSMin","exports","module","identity","value","require_baseSetToString","__commonJSMin","exports","module","constant","defineProperty","identity","baseSetToString","func","string","require_shortOut","__commonJSMin","exports","module","HOT_COUNT","HOT_SPAN","nativeNow","shortOut","func","count","lastCalled","stamp","remaining","require_setToString","__commonJSMin","exports","module","baseSetToString","shortOut","setToString","require_flatRest","__commonJSMin","exports","module","flatten","overRest","setToString","flatRest","func","require_pick","__commonJSMin","exports","module","basePick","flatRest","pick","object","paths","useEffect","useMemo","useState","HTTP_METHODS","FormModel","ListModel","createSelector","ModularUIRequest","getModularUIRequest","createSelector","getLocale","localeCode","href","options","request","ModularUIRequest","useModularUIRequest","useBEISelector","useRetrieveFormsOnModel","model","modularui","useModularUIRequest","forms","setForms","useState","responseCount","setResponseCount","actions","useMemo","getActions","requestCount","useEffect","requests","action","href","HTTP_METHODS","form","FormModel","responses","actionForms","allActions","ListModel","listItem","updateActions","unique","INTERNAL_LOGIN_TYPE","IllegalStateException","Authenticate","getContextPath","getContextPathServer","Cache","ApplicationModel","CaseViewModel","DetailModel","GroupingPanelModel","TabModel","UserProfileModel","useMemo","HTTP_METHODS","useMemo","useLocation","useBEISelector","state","useLocationKey","useQuerystring","usePathname","useNavigation","dispatch","useBEIDispatch","useMemo","location","push","replace","delta","go","goBack","goForward","useEffect","useMemo","useRef","useLocation","HTTP_METHODS","Href","useEffect","useRef","deepEqual","IS_DEV","checkDeps","deps","useDeepCompareMemoize","dependencies","ref","useDeepCompareEffect","callback","useMemo","useModularUIKey","modelKey","url","locale","useLocale","useMemo","useModularUI","modelKey","url","options","dispatch","useBEIDispatch","hrefInstance","useMemo","Href","requestUrl","currentQueryString","prevQueryRef","useRef","key","useModularUIKey","model","useBEISelector","state","requestOptions","merged","HTTP_METHODS","redirectLocation","useLocation","isQueryChanged","shouldLoad","useEffect","useDeepCompareEffect","fetchModel","removeModelByKey","createUseModularUIOptions","options","mustReload","baseOptions","HTTP_METHODS","validateModel","model","expectedModels","useModularUIBasic","defaultKey","href","memoizedHref","useMemo","key","useReload","modularUIOptions","modularUI","useModularUI","modelKey","url","location","useLocation","useModularUIKey","modelEntry","useBEISelector","state","reload","isFullyLoaded","lastModification","useApplication","options","useModularUIBasic","ApplicationModel","useTab","href","TabModel","useCaseView","CaseViewModel","useGroupingPanel","GroupingPanelModel","useDetailPanel","DetailModel","useUserProfile","UserProfileModel","useLogin","Cache","dispatch","useBEIDispatch","application","useApplication","auth","useBEISelector","state","isAuthenticated","primaryAuthenticationType","resetAuthErrors","username","password","login","authenticationType","IllegalStateException","getContextPathServer","useLogout","BASE_PATH","getContextPath","authenticate","Authenticate","INTERNAL_LOGIN_TYPE","origin","url","logout","useEffect","useState","ModularUIRequest","useCallback","useProgressIndicator","dispatch","useBEIDispatch","start","useCallback","startProgress","finish","finishProgress","reset","resetProgress","update","percentComplete","updateProgress","useProgressIndicatorState","useBEISelector","state","useContentFromSourceReferences","sourceReferences","renderChildSections","content","setContent","useState","localeCode","useLocale","start","finish","useProgressIndicator","hrefs","sourceReference","href","index","self","allHrefs","useEffect","requests","modularuiRequest","ModularUIRequest","responseContent","produce","HTTP_METHODS","FormModel","Href","getSetting","useForm","href","data","formHref","Href","getSetting","form","useModularUI","HTTP_METHODS","FormModel","useFormNavigation","dispatch","useBEIDispatch","previousObject","cancelForm","fetchModel","newModel","produce","draft","removeModelByKey","showFormNotification","useAttributeUpdate","formObject","attribute","inputvalue","options","updateFormAttribute","useRepeatableAttributeSet","addRepeatableAttributeSet","object","cancelRepeatableAttributeSet","removeRepeatableAttributeSet","useCallback","useMemo","HTTP_METHODS","AssignmentFilterModel","CaseSearchModel","DetailModel","FilterModel","ListDetailModel","ListModel","useList","href","options","useModularUIBasic","ListModel","useListOrDetail","DetailModel","useListDetail","ListDetailModel","useListNavigation","syncLocation","historyAction","push","replace","useNavigation","dispatch","useBEIDispatch","navigate","update","useCallback","list","resetPage","listHref","HTTP_METHODS","fetchModel","CaseSearchModel","updateFilters","filters","updateFilter","filter","value","attribute","AssignmentFilterModel","filterToUpdate","targetAttr","FilterModel","searchKey","resetFilters","removeFilter","updateSort","sortOption","updatePage","page","updatePageSize","pagesize","useMemo","useCallback","IllegalArgumentException","useModal","modalId","IllegalArgumentException","dispatch","useBEIDispatch","modal","useBEISelector","state","m","show","useCallback","showModal","close","closeModal","ConceptIndexModel","ContentIndexModel","ContentTOCModel","ContentTypeModel","Href","ModelCatalogModel","createHref","filterParameters","useModelCatalog","options","useModularUIBasic","ModelCatalogModel","useConceptIndex","href","key","entryDate","useEntryDate","url","filterParameters","ConceptIndexModel","useConceptDetail","concept","location","useLocation","createHref","useContentIndex","ContentIndexModel","useContentTOC","content","ContentTOCModel","useContent","useCompleteSource","contentHref","Href","useContentType","contentType","ContentTypeModel","useRelatedConcepts","getSearchHref","uri","filters","filterString","filterValue","value","useConceptSearch","useContentSearch","dispatch","useBEIDispatch","useBEISelector","getEntryDate","updateEntryDate","createSelector","useModels","dispatch","useBEIDispatch","selector","createSelector","state","modularui","models","keys","key","model","modularuiModels","useBEISelector","options","reloadModel","callbackFn","modelsToReload","modelToReload","useNotification","dispatch","useBEIDispatch","render","messageType","message","error","useBEISelector","state","dismissNotification","useErrorNotification","showNotification","useMemo","useState","useLocation","useRouteMatch","CaseSearchModel","DetailModel","GroupingPanelModel","Href","ListModel","useUrl","href","fromRoute","previousUrl","setPreviousUrl","useState","previousExact","setPreviousExact","match","useRouteMatch","location","useLocation","url","useMemo","Href","currentUrl","shouldUpdate","usePanel","options","hookOptions","useModularUIBasic","ListModel","GroupingPanelModel","DetailModel","CaseSearchModel","import_pick","useMemo","createSelector","getPreferences","state","makeSelectPreference","preferenceNames","names","createSelector","preferences","pick","usePreference","selectPreference","useMemo","useBEISelector"]}
|
package/dist/chunk-TRPPQFNA.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-5MOCT43G.js";import{hideVisually as i}from"polished";import{jsx as s}from"react/jsx-runtime";var d=({className:e,id:t,defaultMessage:o,children:n,data:p,screenreaderOnly:l=!1,allowHTML:f=!1})=>{let r=a(t,o||n,p);if(l){let m={...i()};return s("span",{className:e,style:m,children:r})}return f?s("span",{className:e,dangerouslySetInnerHTML:{__html:r}}):s("span",{className:e,children:r})};d.displayName="BI.Message";
|
|
2
|
-
//# sourceMappingURL=chunk-TRPPQFNA.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/i18n/react/Message.tsx"],"sourcesContent":["import { hideVisually } from \"polished\";\n\nimport { useMessage } from \"../../hooks/useI18n\";\n\nimport type { MessageParameters } from \"@beinformed/ui/types\";\n\ninterface Props {\n className?: string;\n id: string;\n defaultMessage?: string | null;\n children?: string;\n data?: MessageParameters | undefined;\n screenreaderOnly?: boolean;\n allowHTML?: boolean;\n}\n\n/**\n * Message React component\n */\nconst Message = ({\n className,\n id,\n defaultMessage,\n children,\n data,\n screenreaderOnly = false,\n allowHTML = false,\n}: Props) => {\n const translatedMessage = useMessage(id, defaultMessage || children, data);\n\n if (screenreaderOnly) {\n const styles = {\n ...hideVisually(),\n };\n\n return (\n <span className={className} style={styles}>\n {translatedMessage}\n </span>\n );\n }\n\n if (allowHTML) {\n return (\n <span\n className={className}\n dangerouslySetInnerHTML={{\n __html: translatedMessage,\n }}\n />\n );\n }\n\n return <span className={className}>{translatedMessage}</span>;\n};\n\nMessage.displayName = \"BI.Message\";\n\nexport default Message;\n"],"mappings":"mCAAA,OAAS,gBAAAA,MAAoB,WAoCvB,cAAAC,MAAA,oBAjBN,IAAMC,EAAU,CAAC,CACf,UAAAC,EACA,GAAAC,EACA,eAAAC,EACA,SAAAC,EACA,KAAAC,EACA,iBAAAC,EAAmB,GACnB,UAAAC,EAAY,EACd,IAAa,CACX,IAAMC,EAAoBC,EAAWP,EAAIC,GAAkBC,EAAUC,CAAI,EAEzE,GAAIC,EAAkB,CACpB,IAAMI,EAAS,CACb,GAAGC,EAAa,CAClB,EAEA,OACEZ,EAAC,QAAK,UAAWE,EAAW,MAAOS,EAChC,SAAAF,EACH,CAEJ,CAEA,OAAID,EAEAR,EAAC,QACC,UAAWE,EACX,wBAAyB,CACvB,OAAQO,CACV,EACF,EAIGT,EAAC,QAAK,UAAWE,EAAY,SAAAO,EAAkB,CACxD,EAEAR,EAAQ,YAAc","names":["hideVisually","jsx","Message","className","id","defaultMessage","children","data","screenreaderOnly","allowHTML","translatedMessage","useMessage","styles","hideVisually"]}
|
package/dist/chunk-TYEAR2B7.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{f as r}from"./chunk-FBCZEJSD.js";var c=i=>{let o=null,e=preferencesProvider.getLayoutConfigFileLocation();if(typeof e=="string"){let t=e.startsWith("/")?`/resource${e}`:`/resource/${e}`;if(o=dataFetcher.fetch(t),o)i.dispatch(r(o));else throw new Error(`Could not read theme configuration file from: ${t}`)}};export{c as a};
|
|
2
|
-
//# sourceMappingURL=chunk-TYEAR2B7.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/theme/serverTheme.ts"],"sourcesContent":["import { setThemePreference } from \"../redux/preferences/preferencesActions\";\n\nimport type { BEIStore } from \"../redux/store\";\n\nexport const setConfigurationTheme = (store: BEIStore) => {\n let configTheme = null;\n\n const configFileLocation = preferencesProvider.getLayoutConfigFileLocation();\n if (typeof configFileLocation === \"string\") {\n const configFilePath = configFileLocation.startsWith(\"/\")\n ? `/resource${configFileLocation}`\n : `/resource/${configFileLocation}`;\n\n configTheme = dataFetcher.fetch(configFilePath);\n\n if (configTheme) {\n store.dispatch(setThemePreference(configTheme));\n } else {\n throw new Error(\n `Could not read theme configuration file from: ${configFilePath}`,\n );\n }\n }\n};\n"],"mappings":"wCAIO,IAAMA,EAAyBC,GAAoB,CACxD,IAAIC,EAAc,KAEZC,EAAqB,oBAAoB,4BAA4B,EAC3E,GAAI,OAAOA,GAAuB,SAAU,CAC1C,IAAMC,EAAiBD,EAAmB,WAAW,GAAG,EACpD,YAAYA,CAAkB,GAC9B,aAAaA,CAAkB,GAInC,GAFAD,EAAc,YAAY,MAAME,CAAc,EAE1CF,EACFD,EAAM,SAASI,EAAmBH,CAAW,CAAC,MAE9C,OAAM,IAAI,MACR,iDAAiDE,CAAc,EACjE,CAEJ,CACF","names":["setConfigurationTheme","store","configTheme","configFileLocation","configFilePath","setThemePreference"]}
|