@beinformed/react 1.0.0-beta.0 → 1.0.0-beta.1
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 +9 -0
- package/dist/{beforeRenderHooks-Gb0tcmCY.d.ts → beforeRenderHooks-B0CWdI7P.d.ts} +1 -1
- package/dist/{beforeRenderHooks-CNvsMmi8.d.cts → beforeRenderHooks-CKR6eECI.d.cts} +1 -1
- package/dist/{chunk-HDOILTJ2.js → chunk-3UHZ6GBP.js} +2 -2
- package/dist/chunk-3UHZ6GBP.js.map +1 -0
- package/dist/{chunk-RKGGCIUD.js → chunk-5MOCT43G.js} +2 -2
- package/dist/{chunk-YJNJVQFW.js → chunk-7JMMW2FM.js} +2 -2
- package/dist/{chunk-YJNJVQFW.js.map → chunk-7JMMW2FM.js.map} +1 -1
- package/dist/{chunk-VG3QU524.js → chunk-7LGDJBGK.js} +3 -3
- package/dist/chunk-7LGDJBGK.js.map +1 -0
- package/dist/{chunk-X2C7CKOK.js → chunk-A3D5R7MI.js} +2 -2
- package/dist/{chunk-X2C7CKOK.js.map → chunk-A3D5R7MI.js.map} +1 -1
- package/dist/chunk-ALGSLJJI.js +2 -0
- package/dist/chunk-ALGSLJJI.js.map +1 -0
- package/dist/{chunk-K3DTH6XN.js → chunk-FBCZEJSD.js} +2 -2
- package/dist/chunk-FBCZEJSD.js.map +1 -0
- package/dist/{chunk-DI7VM62A.js → chunk-GD4NSZBN.js} +2 -2
- package/dist/chunk-GD4NSZBN.js.map +1 -0
- package/dist/chunk-GHKA2XFO.js +2 -0
- package/dist/chunk-GHKA2XFO.js.map +1 -0
- package/dist/chunk-HTR32BUX.js +2 -0
- package/dist/{chunk-6KRECIRI.js.map → chunk-HTR32BUX.js.map} +1 -1
- package/dist/{chunk-WBPDMDW4.js → chunk-L7DO7AZT.js} +2 -2
- package/dist/{chunk-WBPDMDW4.js.map → chunk-L7DO7AZT.js.map} +1 -1
- package/dist/chunk-LJM2ADG6.js +2 -0
- package/dist/chunk-LJM2ADG6.js.map +1 -0
- package/dist/chunk-LUXTQYD2.js +2 -0
- package/dist/chunk-LUXTQYD2.js.map +1 -0
- package/dist/chunk-LYHN5GC6.js +2 -0
- package/dist/chunk-LYHN5GC6.js.map +1 -0
- package/dist/{chunk-A4USB53Q.js → chunk-TDYPCNQI.js} +2 -2
- package/dist/{chunk-A4USB53Q.js.map → chunk-TDYPCNQI.js.map} +1 -1
- package/dist/{chunk-X3N2NQVZ.js → chunk-TRPPQFNA.js} +2 -2
- package/dist/{chunk-4AC7YQ5Q.js → chunk-TYEAR2B7.js} +2 -2
- package/dist/chunk-X6L6BWD4.js +2 -0
- package/dist/chunk-X6L6BWD4.js.map +1 -0
- package/dist/{chunk-Z2Y3OPVI.js → chunk-ZNJONDQ6.js} +2 -2
- package/dist/chunk-ZNJONDQ6.js.map +1 -0
- package/dist/client/index.cjs +5 -5
- package/dist/client/index.cjs.map +1 -1
- package/dist/client/index.d.cts +3 -3
- package/dist/client/index.d.ts +3 -3
- 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 +117 -64
- package/dist/hooks/index.d.ts +117 -64
- 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 +2 -2
- package/dist/i18n/index.d.ts +2 -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 +6 -5
- package/dist/index.d.ts +6 -5
- 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 +215 -28
- package/dist/redux/index.d.ts +215 -28
- package/dist/redux/index.js +1 -1
- package/dist/server/index.cjs +2 -2
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.cts +3 -3
- package/dist/server/index.d.ts +3 -3
- package/dist/server/index.js +1 -1
- package/dist/{styled-components.d-CrkOxzv5.d.cts → styled-components.d-C19eFejP.d.cts} +7 -13
- package/dist/{styled-components.d-CrkOxzv5.d.ts → styled-components.d-C19eFejP.d.ts} +7 -13
- package/dist/theme/index.cjs +1 -1
- package/dist/theme/index.cjs.map +1 -1
- package/dist/theme/index.d.cts +1 -1
- package/dist/theme/index.d.ts +1 -1
- package/dist/theme/index.js +1 -1
- package/dist/{useForm-DW-a5mcV.d.ts → useForm-BWwXFuv5.d.cts} +3 -3
- package/dist/{useForm-CG_DMYfZ.d.cts → useForm-DqaU9T78.d.ts} +3 -3
- package/package.json +15 -15
- package/dist/chunk-3OP2KQ56.js +0 -2
- package/dist/chunk-3OP2KQ56.js.map +0 -1
- package/dist/chunk-6KRECIRI.js +0 -2
- package/dist/chunk-B7PQLTVC.js +0 -2
- package/dist/chunk-B7PQLTVC.js.map +0 -1
- package/dist/chunk-DI7VM62A.js.map +0 -1
- package/dist/chunk-HDOILTJ2.js.map +0 -1
- package/dist/chunk-K3DTH6XN.js.map +0 -1
- package/dist/chunk-UZIZDEU6.js +0 -2
- package/dist/chunk-UZIZDEU6.js.map +0 -1
- package/dist/chunk-VFLYA5WJ.js +0 -2
- package/dist/chunk-VFLYA5WJ.js.map +0 -1
- package/dist/chunk-VG3QU524.js.map +0 -1
- package/dist/chunk-Y7ESITVO.js +0 -2
- package/dist/chunk-Y7ESITVO.js.map +0 -1
- package/dist/chunk-YG7XDCNV.js +0 -2
- package/dist/chunk-YG7XDCNV.js.map +0 -1
- package/dist/chunk-Z2Y3OPVI.js.map +0 -1
- /package/dist/{chunk-RKGGCIUD.js.map → chunk-5MOCT43G.js.map} +0 -0
- /package/dist/{chunk-X3N2NQVZ.js.map → chunk-TRPPQFNA.js.map} +0 -0
- /package/dist/{chunk-4AC7YQ5Q.js.map → chunk-TYEAR2B7.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _beinformed_ui_models from '@beinformed/ui/models';
|
|
2
|
-
import { Href,
|
|
2
|
+
import { Href, FormModel, ModularUIModel, FormObjectModel, AttributeModel } from '@beinformed/ui/models';
|
|
3
3
|
import * as _reduxjs_toolkit from '@reduxjs/toolkit';
|
|
4
|
-
import { C as FetchModelResult, F as FetchModelPayload } from './styled-components.d-
|
|
4
|
+
import { C as FetchModelResult, F as FetchModelPayload } from './styled-components.d-C19eFejP.js';
|
|
5
5
|
|
|
6
6
|
interface UpdateFormOptions {
|
|
7
7
|
autosubmit: boolean;
|
|
@@ -14,7 +14,7 @@ interface UpdateFormOptions {
|
|
|
14
14
|
/**
|
|
15
15
|
* Load a form by href
|
|
16
16
|
*/
|
|
17
|
-
declare const useForm: (href: string | Href, data?: Record<string, unknown>) =>
|
|
17
|
+
declare const useForm: (href: string | Href, data?: Record<string, unknown>) => FormModel | undefined;
|
|
18
18
|
/**
|
|
19
19
|
* Form navigation methods
|
|
20
20
|
*/
|
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.1",
|
|
4
4
|
"description": "Be Informed UI React",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -28,32 +28,32 @@
|
|
|
28
28
|
"deepmerge": "^4.3.1",
|
|
29
29
|
"dequal": "^2.0.3",
|
|
30
30
|
"format-message": "^6.2.4",
|
|
31
|
-
"immer": "^
|
|
31
|
+
"immer": "^11.1.3",
|
|
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.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@dr.pogodin/react-helmet": "^3.0.
|
|
38
|
-
"@reduxjs/toolkit": "^2.
|
|
39
|
-
"@testing-library/dom": "^10.4.
|
|
40
|
-
"@testing-library/react": "^16.3.
|
|
37
|
+
"@dr.pogodin/react-helmet": "^3.0.6",
|
|
38
|
+
"@reduxjs/toolkit": "^2.11.2",
|
|
39
|
+
"@testing-library/dom": "^10.4.1",
|
|
40
|
+
"@testing-library/react": "^16.3.2",
|
|
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.
|
|
45
|
-
"@types/react-dom": "^19.
|
|
44
|
+
"@types/react": "^19.2.13",
|
|
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.
|
|
49
|
+
"msw": "^2.12.8",
|
|
50
50
|
"polished": "^4.3.1",
|
|
51
|
-
"react": "^19.
|
|
52
|
-
"react-dom": "^19.
|
|
51
|
+
"react": "^19.2.4",
|
|
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.
|
|
56
|
+
"styled-components": "^6.3.8",
|
|
57
57
|
"@beinformed/typescript-config": "0.0.0"
|
|
58
58
|
},
|
|
59
59
|
"exports": {
|
|
@@ -114,11 +114,11 @@
|
|
|
114
114
|
"build": "tsup",
|
|
115
115
|
"clean:build": "rimraf ./dist",
|
|
116
116
|
"lint": "eslint .",
|
|
117
|
-
"lint:ci": "eslint . --
|
|
117
|
+
"lint:ci": "eslint . --format junit -o ./reports/eslint-report-react.xml",
|
|
118
118
|
"lint:fix": "pnpm lint --fix",
|
|
119
119
|
"prettier": "prettier --write .",
|
|
120
120
|
"test": "vitest run",
|
|
121
|
-
"test:ci": "vitest run --reporter=junit --outputFile
|
|
121
|
+
"test:ci": "vitest run --reporter=junit --outputFile=./reports/vitest-report-react.xml",
|
|
122
122
|
"typecheck": "tsc --noEmit",
|
|
123
123
|
"createIndex": "node ./createIndex.mjs ./src"
|
|
124
124
|
}
|
package/dist/chunk-3OP2KQ56.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{A as w,D as H,F as D,G as x,H as E,I as P,J as k,K as B,L as b,V as n,f as l,h as J,j as p,k as c,l as m,m as u,n as f,r as y,u as S,v as I,w as h,x as M,y as g}from"./chunk-Y7ESITVO.js";import{i as C}from"./chunk-YG7XDCNV.js";import{d as R}from"./chunk-K3DTH6XN.js";import{a as s}from"./chunk-FW4363Y4.js";var G=s((rt,W)=>{"use strict";var ye=Object.prototype,Re=ye.hasOwnProperty;function Se(e,t){return e!=null&&Re.call(e,t)}W.exports=Se});var ge=s((at,_)=>{"use strict";var Ie=G(),he=J();function Me(e,t){return e!=null&&he(e,t,Ie)}_.exports=Me});var we=(e=[],t)=>{if(e.length>0)for(let o of e)o(t)};import{getContextPathServer as z}from"@beinformed/ui/settings";import{createBrowserHistory as $}from"history";var i=null,v=null;function U(){if(typeof window>"u")throw new Error("getBrowserHistory can only be used in a browser environment.");let e=z();return(!i||e!==v)&&(i=$({basename:e}),v=e),i}import{createAction as Q,createReducer as V}from"@reduxjs/toolkit";var X={location:void 0,action:void 0},Y=Q("ROUTER/LOCATION_CHANGE",(e,t)=>({payload:{location:e,action:t}})),F=V(X,e=>{e.addCase(Y,(t,o)=>{t.location=o.payload.location,t.action=o.payload.action})});import{ApplicationModel as Z}from"@beinformed/ui/models";import{createReducer as ee}from"@reduxjs/toolkit";var te={},oe=(e,t)=>{let{key:o,error:r}=t.payload;e[o]?(e[o].status="ERROR",e[o].lastModification=Date.now()):e[o]={model:void 0,status:"ERROR",lastModification:Date.now()},e[o].error=r},re=(e,t)=>{let{key:o,model:r}=t.payload;e[o]={model:r||void 0,lastModification:Date.now(),status:r?"FINISHED":"IDLE"}},ae=(e,t)=>{let{payload:o}=t;for(let{key:r,model:a}of o)e[r]={status:"FINISHED",lastModification:Date.now(),model:a}},O=(e,t)=>{let o=t.payload,r=Object.keys(e).find(a=>e[a]?.model?.connectKey===o.connectKey);r&&e[r]?(e[r].model=o,e[r].lastModification=Date.now(),e[r].status="FINISHED",e[r].error=void 0):console.debug(`ModularUIReducer: Cannot update model with key ${o.connectKey} - model not found in state.`)},ne=(e,t)=>{delete e[t.payload]},de=e=>{for(let t in e)e[t]?.model instanceof Z||delete e[t]},ie=(e,t)=>{let{key:o}=t.meta.arg;e[o]?(e[o].status="LOADING",e[o].lastModification=Date.now(),e[o].error=void 0):e[o]={model:void 0,status:"LOADING",lastModification:Date.now(),error:void 0}},se=(e,t)=>{let{key:o,model:r,updateHandler:a}=t.payload,d=r;a&&(d=a(r)),e[o]={model:d,lastModification:Date.now(),status:"FINISHED",error:void 0}},le=(e,t)=>{let{key:o}=t.meta.arg,r=t.payload;e[o]?(e[o].status="ERROR",e[o].lastModification=Date.now(),e[o].error=r):e[o]={model:void 0,status:"ERROR",lastModification:Date.now(),error:r}},T=ee(te,e=>{e.addCase(D,oe).addCase(x,re).addCase(E,ae).addCase(P,O).addCase(k,O).addCase(B,ne).addCase(b,de).addCase(n.pending,ie).addCase(n.fulfilled,se).addCase(n.rejected,le)});import{createReducer as pe}from"@reduxjs/toolkit";var ce={count:0,timestamp:0,percentComplete:0},A=e=>({...e,count:e.count+1}),L=e=>{let t=e.count-1===0;return{...e,count:e.count<=0?0:e.count-1,timestamp:t?Date.now():e.timestamp,percentComplete:t?0:e.percentComplete}},me=e=>({...e,count:0,timestamp:Date.now(),percentComplete:0}),j=pe(ce,e=>{e.addCase(c,A).addCase(m,L).addCase(u,t=>({...t,count:0})).addCase(f,(t,o)=>({...t,percentComplete:o.payload?.percentComplete})).addCase(n.pending,A).addCase(n.fulfilled,L).addCase(n.rejected,me)});var N=e=>t=>o=>r=>{if(S.match(r)){let{location:a,state:d}=r.payload;e.push(a,d)}else if(I.match(r)){let{location:a,state:d}=r.payload;e.replace(a,d)}else if(h.match(r)){let{delta:a}=r.payload;e.go(a)}else M.match(r)?e.goBack():g.match(r)&&e.goForward();return o(r)};import{combineReducers as K,configureStore as ue}from"@reduxjs/toolkit";var q={router:F,preferences:R,modularui:T,i18n:C,auth:l,error:w,modals:H,modelcatalog:p,notification:y,progressindicator:j},fe=K(q),tt=(e,t,o=U())=>{let r=t?K({...q,...t}):fe;return ue({reducer:r,middleware:a=>a({serializableCheck:!1}).concat(N(o)),preloadedState:e})};export{we as a,ge as b,U as c,Y as d,F as e,T as f,j as g,N as h,tt as i};
|
|
2
|
-
//# sourceMappingURL=chunk-3OP2KQ56.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseHas.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/has.js","../src/redux/beforeRenderHooks.ts","../src/redux/router/browserHistory.ts","../src/redux/router/routerReducer.ts","../src/redux/modularui/modularuiReducer.ts","../src/redux/progressindicator/progressIndicatorReducer.ts","../src/redux/router/routerMiddleware.ts","../src/redux/store.ts"],"sourcesContent":["/** 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 * The base implementation of `_.has` 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 baseHas(object, key) {\n return object != null && hasOwnProperty.call(object, key);\n}\n\nmodule.exports = baseHas;\n","var baseHas = require('./_baseHas'),\n hasPath = require('./_hasPath');\n\n/**\n * Checks if `path` is a direct property of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\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 = { 'a': { 'b': 2 } };\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.has(object, 'a');\n * // => true\n *\n * _.has(object, 'a.b');\n * // => true\n *\n * _.has(object, ['a', 'b']);\n * // => true\n *\n * _.has(other, 'a');\n * // => false\n */\nfunction has(object, path) {\n return object != null && hasPath(object, path, baseHas);\n}\n\nmodule.exports = has;\n","import type { HttpServletRequestJava } from \"../server/types\";\nimport type { BEIStore } from \"./store\";\n\nexport interface BeforeRenderHookProps {\n store: BEIStore;\n request?: HttpServletRequestJava;\n}\nexport type BeforeRenderHook = (props: BeforeRenderHookProps) => void;\n\n/**\n * Process handlers that need to be run before the react application starts,\n * for example to start a third party service<br>\n * An object with the store is available to make it possible to read state available in the redux store,\n * for example server preferences, and the request is available to retrieve request information\n *\n */\nexport const handleBeforeRenderHooks = (\n beforeRenderHooks: BeforeRenderHook[] = [],\n props: BeforeRenderHookProps,\n) => {\n if (beforeRenderHooks.length > 0) {\n for (const beforeRenderHook of beforeRenderHooks) {\n beforeRenderHook(props);\n }\n }\n};\n","// Assuming this utility is available\nimport { getContextPathServer } from \"@beinformed/ui/settings\";\nimport { createBrowserHistory } from \"history\";\n\nimport type { History as RouterHistory } from \"history\";\n\nlet browserHistoryInstance: RouterHistory | null = null; // Private variable to hold the instance\nlet historyContextPath: string | null = null;\n/**\n * Returns a singleton instance of the browser history.\n * Creates the instance on the first call.\n * This pattern is suitable for client-side applications.\n */\nexport function getBrowserHistory(): RouterHistory {\n if (typeof window === \"undefined\") {\n throw new Error(\n \"getBrowserHistory can only be used in a browser environment.\",\n );\n }\n\n const contextPathServer = getContextPathServer();\n if (!browserHistoryInstance || contextPathServer !== historyContextPath) {\n browserHistoryInstance = createBrowserHistory({\n basename: contextPathServer,\n });\n historyContextPath = contextPathServer;\n }\n return browserHistoryInstance;\n}\n","import { createAction, createReducer } from \"@reduxjs/toolkit\";\n\nimport type { Action, Location } from \"history\";\n\nexport type RouterLocation = Location<{ from?: string; modal?: boolean }>;\n\nexport interface RouterState {\n location: RouterLocation | undefined;\n action: Action | undefined;\n}\n\nconst initialState = { location: undefined, action: undefined };\n\nexport const locationChange = createAction(\n \"ROUTER/LOCATION_CHANGE\",\n (location: RouterLocation, action: Action) => {\n return {\n payload: {\n location,\n action,\n },\n };\n },\n);\n\nexport const routerReducer = createReducer<RouterState>(\n initialState,\n (builder) => {\n builder.addCase(locationChange, (state, action) => {\n state.location = action.payload.location;\n state.action = action.payload.action;\n });\n },\n);\n","import { ApplicationModel } from \"@beinformed/ui/models\";\nimport { createReducer } from \"@reduxjs/toolkit\";\n\nimport { MODULARUI_STATUS } from \"./constants\";\nimport { fetchModel } from \"./fetchModel\";\nimport {\n initModels,\n removeModelByKey,\n resetModularUI,\n setModel,\n updateErrorStatus,\n updateForm,\n updateModel,\n} from \"./modelActions\";\n\nimport type { WritableDraft } from \"immer\";\nimport type { ModelEntry } from \"./types\";\n\nexport type ModularUIState = Record<string, ModelEntry>;\n\ntype IntermediateState = WritableDraft<ModularUIState>;\n\nconst initialState: ModularUIState = {};\n\nconst handleUpdateErrorStatus = (\n state: IntermediateState,\n action: ReturnType<typeof updateErrorStatus>,\n) => {\n const { key, error } = action.payload;\n\n if (!state[key]) {\n state[key] = {\n model: undefined,\n status: MODULARUI_STATUS.ERROR,\n lastModification: Date.now(),\n };\n } else {\n state[key].status = MODULARUI_STATUS.ERROR;\n state[key].lastModification = Date.now();\n }\n // @ts-expect-error deep problem\n state[key].error = error;\n};\n\nconst handleSetModel = (\n state: IntermediateState,\n action: ReturnType<typeof setModel>,\n) => {\n const { key, model } = action.payload;\n // If model is null/undefined, this sets up an empty entry,\n // otherwise, it sets the model and marks as finished.\n state[key] = {\n model: model || undefined,\n lastModification: Date.now(),\n status: model ? MODULARUI_STATUS.FINISHED : MODULARUI_STATUS.IDLE,\n };\n};\n\nconst handleInitModel = (\n state: IntermediateState,\n action: ReturnType<typeof initModels>,\n) => {\n const { payload } = action;\n for (const { key, model } of payload) {\n state[key] = {\n status: MODULARUI_STATUS.FINISHED,\n lastModification: Date.now(),\n model,\n };\n }\n};\n\nconst handleUpdateModel = (\n state: IntermediateState,\n action: ReturnType<typeof updateModel | typeof updateForm>,\n) => {\n const model = action.payload;\n const modelKey = Object.keys(state).find(\n (key) => state[key]?.model?.connectKey === model.connectKey,\n );\n\n if (modelKey && state[modelKey]) {\n state[modelKey].model = model;\n state[modelKey].lastModification = Date.now();\n state[modelKey].status = MODULARUI_STATUS.FINISHED;\n state[modelKey].error = undefined; // Clear error on successful update\n } else {\n console.debug(\n `ModularUIReducer: Cannot update model with key ${model.connectKey} - model not found in state.`,\n );\n }\n};\n\nconst handleRemoveModelByKey = (\n state: IntermediateState,\n action: ReturnType<typeof removeModelByKey>,\n) => {\n delete state[action.payload];\n};\n\nconst handleResetModularUI = (state: IntermediateState) => {\n for (const key in state) {\n if (!(state[key]?.model instanceof ApplicationModel)) {\n delete state[key];\n }\n }\n};\n\nconst handleFetchModelPending = (\n state: IntermediateState,\n action: ReturnType<typeof fetchModel.pending>,\n) => {\n const { key } = action.meta.arg; // Access original thunk arguments\n if (!state[key]) {\n state[key] = {\n model: undefined,\n status: MODULARUI_STATUS.LOADING,\n lastModification: Date.now(),\n error: undefined, // Clear error when starting new load\n };\n } else {\n state[key].status = MODULARUI_STATUS.LOADING;\n state[key].lastModification = Date.now();\n state[key].error = undefined; // Clear error when starting new load\n }\n};\n\nconst handleFetchModelFulfilled = (\n state: IntermediateState,\n action: ReturnType<typeof fetchModel.fulfilled>,\n) => {\n const { key, model, updateHandler } = action.payload;\n let finalModel = model;\n\n if (updateHandler) {\n // Apply update handler if provided\n finalModel = updateHandler(model);\n }\n\n state[key] = {\n model: finalModel,\n lastModification: Date.now(),\n status: MODULARUI_STATUS.FINISHED,\n error: undefined, // Clear error on success\n };\n};\n\nconst handleFetchModelRejected = (\n state: IntermediateState,\n action: ReturnType<typeof fetchModel.rejected>,\n) => {\n const { key } = action.meta.arg;\n const error = action.payload;\n\n if (!state[key]) {\n state[key] = {\n model: undefined,\n status: MODULARUI_STATUS.ERROR,\n lastModification: Date.now(),\n error: error,\n };\n } else {\n state[key].status = MODULARUI_STATUS.ERROR;\n state[key].lastModification = Date.now();\n state[key].error = error;\n }\n};\n\nexport const modularUIReducer = createReducer<ModularUIState>(\n initialState,\n (builder) => {\n builder\n .addCase(updateErrorStatus, handleUpdateErrorStatus)\n .addCase(setModel, handleSetModel)\n .addCase(initModels, handleInitModel)\n .addCase(updateModel, handleUpdateModel)\n .addCase(updateForm, handleUpdateModel)\n .addCase(removeModelByKey, handleRemoveModelByKey)\n .addCase(resetModularUI, handleResetModularUI)\n .addCase(fetchModel.pending, handleFetchModelPending)\n .addCase(fetchModel.fulfilled, handleFetchModelFulfilled)\n .addCase(fetchModel.rejected, handleFetchModelRejected);\n },\n);\n","import { createReducer } from \"@reduxjs/toolkit\";\n\nimport { fetchModel } from \"../modularui/fetchModel\";\nimport {\n finishProgress,\n resetProgress,\n startProgress,\n updateProgress,\n} from \"./progressIndicatorActions\";\n\nimport type { WritableDraft } from \"immer\";\n\nexport interface ProgressIndicatorState {\n count: number;\n timestamp: number;\n percentComplete: number;\n}\n\ntype IntermediateState = WritableDraft<ProgressIndicatorState>;\n\nconst initialState = {\n count: 0,\n timestamp: 0,\n percentComplete: 0,\n};\n\nconst handleStartProgress = (state: IntermediateState) => {\n return {\n ...state,\n count: state.count + 1,\n };\n};\n\nconst handleEndProgress = (state: IntermediateState) => {\n const isFinalFinish = state.count - 1 === 0;\n return {\n ...state,\n count: state.count <= 0 ? 0 : state.count - 1,\n timestamp: isFinalFinish ? Date.now() : state.timestamp,\n percentComplete: isFinalFinish ? 0 : state.percentComplete,\n };\n};\n\nconst handleRejectedProgress = (state: IntermediateState) => {\n return {\n ...state,\n count: 0,\n timestamp: Date.now(),\n percentComplete: 0,\n };\n};\n\nexport const progressIndicatorReducer = createReducer<ProgressIndicatorState>(\n initialState,\n (builder) => {\n builder\n .addCase(startProgress, handleStartProgress)\n .addCase(finishProgress, handleEndProgress)\n .addCase(resetProgress, (state) => {\n return {\n ...state,\n count: 0,\n };\n })\n .addCase(updateProgress, (state, action) => {\n return {\n ...state,\n percentComplete: action.payload?.percentComplete,\n };\n })\n .addCase(fetchModel.pending, handleStartProgress)\n .addCase(fetchModel.fulfilled, handleEndProgress)\n .addCase(fetchModel.rejected, handleRejectedProgress);\n },\n);\n","// routerMiddleware.ts (updated based on your routerActions.ts)\n\nimport { go, goBack, goForward, push, replace } from \"./routerActions\"; // Correct path to routerActions.ts\n\nimport type { Middleware } from \"@reduxjs/toolkit\";\nimport type { History } from \"history\";\nimport type { RootState } from \"../store\";\n\nexport const routerMiddleware = (\n history: History,\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n): Middleware<{}, RootState> => {\n return (_storeApi) => (next) => (action: unknown) => {\n if (push.match(action)) {\n const { location, state } = action.payload; // TypeScript now knows 'action' is PushAction\n history.push(location, state);\n } else if (replace.match(action)) {\n const { location, state } = action.payload;\n history.replace(location, state);\n } else if (go.match(action)) {\n const { delta } = action.payload;\n history.go(delta);\n } else if (goBack.match(action)) {\n history.goBack();\n } else if (goForward.match(action)) {\n history.goForward();\n }\n\n return next(action);\n };\n};\n","import { combineReducers, configureStore } from \"@reduxjs/toolkit\";\n\nimport { authReducer } from \"./auth/authReducer\";\nimport { errorReducer } from \"./error/errorReducer\";\nimport { i18nReducer } from \"./i18n/i18nReducer\";\nimport { modalsReducer } from \"./modals/modalsReducer\";\nimport { modelCatalogReducer } from \"./modelcatalog/modelCatalogReducer\";\nimport { modularUIReducer } from \"./modularui/modularuiReducer\";\nimport { notificationReducer } from \"./notifications/notificationReducer\";\nimport { preferencesReducer } from \"./preferences/preferencesReducer\";\nimport { progressIndicatorReducer } from \"./progressindicator/progressIndicatorReducer\";\nimport { getBrowserHistory } from \"./router/browserHistory\";\nimport { routerMiddleware } from \"./router/routerMiddleware\";\nimport { routerReducer } from \"./router/routerReducer\";\n\nimport type { Reducer } from \"@reduxjs/toolkit\";\n\nconst reducers = {\n router: routerReducer,\n preferences: preferencesReducer,\n modularui: modularUIReducer,\n i18n: i18nReducer,\n auth: authReducer,\n error: errorReducer,\n modals: modalsReducer,\n modelcatalog: modelCatalogReducer,\n notification: notificationReducer,\n progressindicator: progressIndicatorReducer,\n};\nconst rootReducers = combineReducers(reducers);\n\nexport const setupStore = (\n preloadedState?: Partial<RootState>,\n customReducers?: Record<string, Reducer> | null,\n history = getBrowserHistory(),\n) => {\n const reducer = customReducers\n ? combineReducers({ ...reducers, ...customReducers })\n : rootReducers;\n\n return configureStore({\n reducer,\n middleware: (getDefaultMiddleware) =>\n getDefaultMiddleware({\n serializableCheck: false,\n }).concat(routerMiddleware(history)),\n preloadedState,\n });\n};\n\nexport type BEIStore = ReturnType<typeof setupStore>;\nexport type RootState = ReturnType<typeof rootReducers>;\nexport type BEIDispatch = BEIStore[\"dispatch\"];\n"],"mappings":"0TAAA,IAAAA,EAAAC,EAAA,CAAAC,GAAAC,IAAA,cACA,IAAIC,GAAc,OAAO,UAGrBC,GAAiBD,GAAY,eAUjC,SAASE,GAAQC,EAAQC,EAAK,CAC5B,OAAOD,GAAU,MAAQF,GAAe,KAAKE,EAAQC,CAAG,CAC1D,CAEAL,EAAO,QAAUG,KClBjB,IAAAG,GAAAC,EAAA,CAAAC,GAAAC,IAAA,kBAAIC,GAAU,IACVC,GAAU,IA6Bd,SAASC,GAAIC,EAAQC,EAAM,CACzB,OAAOD,GAAU,MAAQF,GAAQE,EAAQC,EAAMJ,EAAO,CACxD,CAEAD,EAAO,QAAUG,KClBV,IAAMG,GAA0B,CACrCC,EAAwC,CAAC,EACzCC,IACG,CACH,GAAID,EAAkB,OAAS,EAC7B,QAAWE,KAAoBF,EAC7BE,EAAiBD,CAAK,CAG5B,ECxBA,OAAS,wBAAAE,MAA4B,0BACrC,OAAS,wBAAAC,MAA4B,UAIrC,IAAIC,EAA+C,KAC/CC,EAAoC,KAMjC,SAASC,GAAmC,CACjD,GAAI,OAAO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Ae,CACpB,QAAAD,EACA,WAAaE,GACXA,EAAqB,CACnB,kBAAmB,EACrB,CAAC,EAAE,OAAOC,EAAiBL,CAAO,CAAC,EACrC,eAAAF,CACF,CAAC,CACH","names":["require_baseHas","__commonJSMin","exports","module","objectProto","hasOwnProperty","baseHas","object","key","require_has","__commonJSMin","exports","module","baseHas","hasPath","has","object","path","handleBeforeRenderHooks","beforeRenderHooks","props","beforeRenderHook","getContextPathServer","createBrowserHistory","browserHistoryInstance","historyContextPath","getBrowserHistory","contextPathServer","createAction","createReducer","initialState","locationChange","location","action","routerReducer","builder","state","ApplicationModel","createReducer","initialState","handleUpdateErrorStatus","state","action","key","error","handleSetModel","model","handleInitModel","payload","handleUpdateModel","modelKey","handleRemoveModelByKey","handleResetModularUI","ApplicationModel","handleFetchModelPending","handleFetchModelFulfilled","updateHandler","finalModel","handleFetchModelRejected","modularUIReducer","createReducer","builder","updateErrorStatus","setModel","initModels","updateModel","updateForm","removeModelByKey","resetModularUI","fetchModel","createReducer","initialState","handleStartProgress","state","handleEndProgress","isFinalFinish","handleRejectedProgress","progressIndicatorReducer","createReducer","builder","startProgress","finishProgress","resetProgress","updateProgress","action","fetchModel","routerMiddleware","history","_storeApi","next","action","push","location","state","replace","go","delta","goBack","goForward","combineReducers","configureStore","reducers","routerReducer","preferencesReducer","modularUIReducer","i18nReducer","authReducer","errorReducer","modalsReducer","modelCatalogReducer","notificationReducer","progressIndicatorReducer","rootReducers","combineReducers","setupStore","preloadedState","customReducers","history","getBrowserHistory","reducer","configureStore","getDefaultMiddleware","routerMiddleware"]}
|
package/dist/chunk-6KRECIRI.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-FW4363Y4.js";var C=a((ra,b)=>{"use strict";var Xe=typeof global=="object"&&global&&global.Object===Object&&global;b.exports=Xe});var v=a((aa,S)=>{"use strict";var Qe=C(),We=typeof self=="object"&&self&&self.Object===Object&&self,Ye=Qe||We||Function("return this")();S.exports=Ye});var d=a((oa,O)=>{"use strict";var Ze=v(),ke=Ze.Symbol;O.exports=ke});var w=a((ia,T)=>{"use strict";var j=d(),m=Object.prototype,et=m.hasOwnProperty,tt=m.toString,p=j?j.toStringTag:void 0;function rt(e){var t=et.call(e,p),r=e[p];try{e[p]=void 0;var o=!0}catch{}var u=tt.call(e);return o&&(t?e[p]=r:delete e[p]),u}T.exports=rt});var I=a((na,D)=>{"use strict";var at=Object.prototype,ot=at.toString;function it(e){return ot.call(e)}D.exports=it});var H=a((sa,z)=>{"use strict";var P=d(),nt=w(),st=I(),ut="[object Null]",ct="[object Undefined]",E=P?P.toStringTag:void 0;function pt(e){return e==null?e===void 0?ct:ut:E&&E in Object(e)?nt(e):st(e)}z.exports=pt});var _=a((ua,M)=>{"use strict";function ht(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}M.exports=ht});var F=a((ca,N)=>{"use strict";var lt=H(),ft=_(),vt="[object AsyncFunction]",dt="[object Function]",_t="[object GeneratorFunction]",gt="[object Proxy]";function xt(e){if(!ft(e))return!1;var t=lt(e);return t==dt||t==_t||t==vt||t==gt}N.exports=xt});var R=a((pa,G)=>{"use strict";var yt=v(),qt=yt["__core-js_shared__"];G.exports=qt});var A=a((ha,$)=>{"use strict";var g=R(),B=function(){var e=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function bt(e){return!!B&&B in e}$.exports=bt});var K=a((la,U)=>{"use strict";var Ct=Function.prototype,St=Ct.toString;function Ot(e){if(e!=null){try{return St.call(e)}catch{}try{return e+""}catch{}}return""}U.exports=Ot});var L=a((fa,J)=>{"use strict";var jt=F(),mt=A(),Tt=_(),wt=K(),Dt=/[\\^$.*+?()[\]{}|]/g,It=/^\[object .+?Constructor\]$/,Pt=Function.prototype,Et=Object.prototype,zt=Pt.toString,Ht=Et.hasOwnProperty,Mt=RegExp("^"+zt.call(Ht).replace(Dt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Nt(e){if(!Tt(e)||mt(e))return!1;var t=jt(e)?Mt:It;return t.test(wt(e))}J.exports=Nt});var X=a((va,V)=>{"use strict";function Ft(e,t){return e?.[t]}V.exports=Ft});var x=a((da,Q)=>{"use strict";var Gt=L(),Rt=X();function Bt(e,t){var r=Rt(e,t);return Gt(r)?r:void 0}Q.exports=Bt});var h=a((_a,W)=>{"use strict";var $t=x(),At=$t(Object,"create");W.exports=At});var k=a((ga,Z)=>{"use strict";var Y=h();function Ut(){this.__data__=Y?Y(null):{},this.size=0}Z.exports=Ut});var te=a((xa,ee)=>{"use strict";function Kt(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}ee.exports=Kt});var ae=a((ya,re)=>{"use strict";var Jt=h(),Lt="__lodash_hash_undefined__",Vt=Object.prototype,Xt=Vt.hasOwnProperty;function Qt(e){var t=this.__data__;if(Jt){var r=t[e];return r===Lt?void 0:r}return Xt.call(t,e)?t[e]:void 0}re.exports=Qt});var ie=a((qa,oe)=>{"use strict";var Wt=h(),Yt=Object.prototype,Zt=Yt.hasOwnProperty;function kt(e){var t=this.__data__;return Wt?t[e]!==void 0:Zt.call(t,e)}oe.exports=kt});var se=a((ba,ne)=>{"use strict";var er=h(),tr="__lodash_hash_undefined__";function rr(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=er&&t===void 0?tr:t,this}ne.exports=rr});var ce=a((Ca,ue)=>{"use strict";var ar=k(),or=te(),ir=ae(),nr=ie(),sr=se();function i(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var o=e[t];this.set(o[0],o[1])}}i.prototype.clear=ar;i.prototype.delete=or;i.prototype.get=ir;i.prototype.has=nr;i.prototype.set=sr;ue.exports=i});var he=a((Sa,pe)=>{"use strict";function ur(){this.__data__=[],this.size=0}pe.exports=ur});var fe=a((Oa,le)=>{"use strict";function cr(e,t){return e===t||e!==e&&t!==t}le.exports=cr});var l=a((ja,ve)=>{"use strict";var pr=fe();function hr(e,t){for(var r=e.length;r--;)if(pr(e[r][0],t))return r;return-1}ve.exports=hr});var _e=a((ma,de)=>{"use strict";var lr=l(),fr=Array.prototype,vr=fr.splice;function dr(e){var t=this.__data__,r=lr(t,e);if(r<0)return!1;var o=t.length-1;return r==o?t.pop():vr.call(t,r,1),--this.size,!0}de.exports=dr});var xe=a((Ta,ge)=>{"use strict";var _r=l();function gr(e){var t=this.__data__,r=_r(t,e);return r<0?void 0:t[r][1]}ge.exports=gr});var qe=a((wa,ye)=>{"use strict";var xr=l();function yr(e){return xr(this.__data__,e)>-1}ye.exports=yr});var Ce=a((Da,be)=>{"use strict";var qr=l();function br(e,t){var r=this.__data__,o=qr(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}be.exports=br});var Oe=a((Ia,Se)=>{"use strict";var Cr=he(),Sr=_e(),Or=xe(),jr=qe(),mr=Ce();function n(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var o=e[t];this.set(o[0],o[1])}}n.prototype.clear=Cr;n.prototype.delete=Sr;n.prototype.get=Or;n.prototype.has=jr;n.prototype.set=mr;Se.exports=n});var me=a((Pa,je)=>{"use strict";var Tr=x(),wr=v(),Dr=Tr(wr,"Map");je.exports=Dr});var De=a((Ea,we)=>{"use strict";var Te=ce(),Ir=Oe(),Pr=me();function Er(){this.size=0,this.__data__={hash:new Te,map:new(Pr||Ir),string:new Te}}we.exports=Er});var Pe=a((za,Ie)=>{"use strict";function zr(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}Ie.exports=zr});var f=a((Ha,Ee)=>{"use strict";var Hr=Pe();function Mr(e,t){var r=e.__data__;return Hr(t)?r[typeof t=="string"?"string":"hash"]:r.map}Ee.exports=Mr});var He=a((Ma,ze)=>{"use strict";var Nr=f();function Fr(e){var t=Nr(this,e).delete(e);return this.size-=t?1:0,t}ze.exports=Fr});var Ne=a((Na,Me)=>{"use strict";var Gr=f();function Rr(e){return Gr(this,e).get(e)}Me.exports=Rr});var Ge=a((Fa,Fe)=>{"use strict";var Br=f();function $r(e){return Br(this,e).has(e)}Fe.exports=$r});var Be=a((Ga,Re)=>{"use strict";var Ar=f();function Ur(e,t){var r=Ar(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this}Re.exports=Ur});var Ae=a((Ra,$e)=>{"use strict";var Kr=De(),Jr=He(),Lr=Ne(),Vr=Ge(),Xr=Be();function s(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var o=e[t];this.set(o[0],o[1])}}s.prototype.clear=Kr;s.prototype.delete=Jr;s.prototype.get=Lr;s.prototype.has=Vr;s.prototype.set=Xr;$e.exports=s});var Wr=a((Ba,Ke)=>{"use strict";var Ue=Ae(),Qr="Expected a function";function y(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Qr);var r=function(){var o=arguments,u=t?t.apply(this,o):o[0],c=r.cache;if(c.has(u))return c.get(u);var q=e.apply(this,o);return r.cache=c.set(u,q)||c,q};return r.cache=new(y.Cache||Ue),r}y.Cache=Ue;Ke.exports=y});import{useDispatch as Je,useSelector as Le,useStore as Ve}from"react-redux";var Zr=Je.withTypes(),kr=Le.withTypes(),ea=Ve.withTypes();export{v as a,d as b,H as c,_ as d,x as e,fe as f,Wr as g,Zr as h,kr as i,ea as j};
|
|
2
|
-
//# sourceMappingURL=chunk-6KRECIRI.js.map
|
package/dist/chunk-B7PQLTVC.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b as P}from"./chunk-MT7D3AJU.js";import{b as u}from"./chunk-VFLYA5WJ.js";import{a as h,c as l,d as S,i as _}from"./chunk-3OP2KQ56.js";import{a as s,i as d,t as y,v as w}from"./chunk-Y7ESITVO.js";import{a as T,b}from"./chunk-DI7VM62A.js";import{g as E,h as g,i as R}from"./chunk-K3DTH6XN.js";import{getContextPathModularUI as k,getStringSetting as B,setSetting as F,setSettings as H}from"@beinformed/ui/settings";import{Cache as a,xhr as D}from"@beinformed/ui/utils";import{createRoot as A,hydrateRoot as L}from"react-dom/client";import{HelmetProvider as x}from"@dr.pogodin/react-helmet";import{Provider as C}from"react-redux";import{Router as I}from"react-router";import{jsx as p}from"react/jsx-runtime";var f=({store:o,routerHistory:e,theme:t,children:r,ErrorFallbackComponent:i})=>p(C,{store:o,children:p(b,{theme:t,children:p(x,{children:p(P,{FallbackComponent:i,children:p(I,{history:e,children:r})})})})});f.displayName="BEI.Init";import{jsx as q}from"react/jsx-runtime";var M=o=>{window.onunhandledrejection=e=>e.reason?setImmediate(()=>{let t=e.reason.message.toString()||String(e.reason);throw o.dispatch(y(t)),e.reason}):e},N=(o,e)=>{let t=o.preferences.theme;T(t,e)},v=o=>{let t=new URLSearchParams(window.location.search).get("redirectURI");t&&D({url:`${k()}${t}`}).catch(r=>{if(r.id==="UnauthorizedException"||r.id==="Error.NotAuthorized"||r.id==="Error.Authentication.Required"||r.id==="Error.Authentication.InvalidCredentials"){let i=B("LOGIN_PATH","/signin");o.dispatch(w(i,{from:{pathname:t},modal:!1}))}})},U=o=>{if(typeof window<"u"){let e=new URLSearchParams(window.location?.search).get("entryDate");if(e)o.dispatch(d(e));else if(a.hasItem("ModelCatalogEntryDate")){let t=a.getItem("ModelCatalogEntryDate");o.dispatch(d(t))}}},W=(o,e,t,r)=>{let i=window.contextPath;if(typeof i<"u")F("CONTEXT_PATH",i);else throw new Error("Missing contextPath on window object");r&&H(r),a.clear("^res:");let n=_(u(),o);return N(n.getState(),t),v(n),U(n),E(n.getState()),R(n.getState()),g(n.getState()),a.loadOtherBrowserTabs(()=>{a.getItem("auth")&&n.dispatch(s())}),a.getItem("auth")&&n.dispatch(s()),l().listen((m,c)=>{n.dispatch(S(m,c))}),M(n),document.body&&(document.body.className="js"),e&&h(e,{store:n}),{store:n}},j=(o,e,t,r,i)=>{window.addEventListener("DOMContentLoaded",()=>{let n=document.querySelector("#application");if(!n)throw new Error("No DOM element with id application found to attach client to");t(n,q(f,{store:o,routerHistory:l(),theme:r,ErrorFallbackComponent:i,children:e()}))})},O=(o,e)=>{o.querySelector(".application")?L(o,e):A(o).render(e)},le=({customReducers:o,theme:e,settings:t,render:r,beforeRenderHooks:i,ErrorFallbackComponent:n,mount:m})=>{let{store:c}=W(o,i,t);j(c,r,m??O,e,n)};(function(){let e=document.querySelector('script[type="application/json"][data-app-state="app-json"]');if(!e)throw new Error("Error finding script with attribute app-json to retrieve context path in html");let t=e.getAttribute("data-app-contextpath");if(t&&(window.contextPath=t),typeof __webpack_public_path__<"u"){let i=e.getAttribute("data-app-filepath");i&&i!=="{FILEPATH}"?__webpack_public_path__=`${i}/`:t&&(__webpack_public_path__=`${t}/`)}let r=e.getAttribute("data-app-nonce");r&&(__webpack_nonce__=r)})();export{f as a,M as b,U as c,W as d,j as e,le as f};
|
|
2
|
-
//# sourceMappingURL=chunk-B7PQLTVC.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/client/client.tsx","../src/client/Init.tsx","../src/client/contextPath.ts"],"sourcesContent":["import {\n getContextPathModularUI,\n getStringSetting,\n setSetting,\n setSettings,\n} from \"@beinformed/ui/settings\";\nimport { Cache, xhr } from \"@beinformed/ui/utils\";\nimport { createRoot, hydrateRoot } from \"react-dom/client\";\n\nimport { loginSuccess } from \"../redux/auth/authReducer\";\nimport { handleBeforeRenderHooks } from \"../redux/beforeRenderHooks\";\nimport { getDataFromServer } from \"../redux/dataFromServer\";\nimport { updateEntryDate } from \"../redux/modelcatalog/modelCatalogReducer\";\nimport { showXHRErrorNotification } from \"../redux/notifications/notificationActions\";\nimport {\n setAllContentInDataSetting,\n setDateTimeSettings,\n setLoginPreferences,\n} from \"../redux/preferences/preferencesActions\";\nimport { getBrowserHistory } from \"../redux/router/browserHistory\";\nimport { replace } from \"../redux/router/routerActions\";\nimport { locationChange } from \"../redux/router/routerReducer\";\nimport { setupStore } from \"../redux/store\";\nimport { createTheme } from \"../theme/createTheme\";\nimport { Init } from \"./Init\";\n\nimport type { Setting } from \"@beinformed/ui/settings\";\nimport type { Reducer } from \"@reduxjs/toolkit\";\nimport type { ComponentType, ElementType, ReactElement } from \"react\";\nimport type { ErrorBoundaryFallbackProps } from \"../components/ErrorBoundaryFallback\";\nimport type { BeforeRenderHook } from \"../redux/beforeRenderHooks\";\nimport type { RouterLocation } from \"../redux/router/routerReducer\";\nimport type { BEIStore, RootState } from \"../redux/store\";\nimport type { Theme } from \"../theme/types\";\nimport type { WindowWithContext } from \"./types\";\n\ntype RenderFunction = () => ReactElement<ElementType>;\ntype MountFunction = (\n applicationNode: Element,\n element: ReactElement<ElementType>,\n) => void;\n\ninterface Props {\n customReducers?: Record<string, Reducer>;\n theme?: Theme | Theme[];\n settings?: Record<string, Setting>;\n render: RenderFunction;\n mount: MountFunction;\n beforeRenderHooks?: BeforeRenderHook[];\n ErrorFallbackComponent?: ComponentType<ErrorBoundaryFallbackProps>;\n}\n\nexport const setUnhandledRejectionEvent = (store: BEIStore) => {\n window.onunhandledrejection = (event: PromiseRejectionEvent) => {\n if (event.reason) {\n return setImmediate(() => {\n const errorMessage =\n event.reason.message.toString() || String(event.reason);\n\n store.dispatch(showXHRErrorNotification(errorMessage));\n throw event.reason;\n });\n }\n\n return event;\n };\n};\n\nconst initThemeSettings = (state: RootState, theme?: Theme | Theme[]) => {\n const storedTheme = state.preferences.theme;\n createTheme(storedTheme, theme); // on theme creation, the settings are set\n};\n\n/**\n * The redirectURI querystring parameter is available when the server is redirecting an unauthorized deep link\n * @param store\n */\nconst handleRedirectURI = (store: BEIStore) => {\n const urlParams = new URLSearchParams(window.location.search);\n const redirectURI = urlParams.get(\"redirectURI\");\n if (redirectURI) {\n xhr({ url: `${getContextPathModularUI()}${redirectURI}` }).catch((e) => {\n if (\n e.id === \"UnauthorizedException\" ||\n e.id === \"Error.NotAuthorized\" ||\n e.id === \"Error.Authentication.Required\" ||\n e.id === \"Error.Authentication.InvalidCredentials\"\n ) {\n const LOGIN_PATH = getStringSetting(\"LOGIN_PATH\", \"/signin\");\n store.dispatch(\n replace(LOGIN_PATH, {\n from: { pathname: redirectURI },\n modal: false,\n }),\n );\n }\n });\n }\n};\n\nexport const setModelCatalogEntryDate = (store: BEIStore) => {\n if (typeof window !== \"undefined\") {\n const entryDateFromUrl = new URLSearchParams(window.location?.search).get(\n \"entryDate\",\n );\n if (entryDateFromUrl) {\n store.dispatch(updateEntryDate(entryDateFromUrl));\n } else if (Cache.hasItem(\"ModelCatalogEntryDate\")) {\n const entryDate = Cache.getItem(\"ModelCatalogEntryDate\") as string;\n store.dispatch(updateEntryDate(entryDate));\n }\n }\n};\n\nexport const setupClient = (\n customReducers?: Record<string, Reducer>,\n beforeRenderHooks?: BeforeRenderHook[],\n theme?: Theme | Theme[],\n settings?: Record<string, Setting>,\n) => {\n const contextPath = (window as WindowWithContext).contextPath;\n\n if (typeof contextPath !== \"undefined\") {\n setSetting(\"CONTEXT_PATH\", contextPath);\n } else {\n throw new Error(\"Missing contextPath on window object\");\n }\n\n if (settings) {\n setSettings(settings);\n }\n\n // remove all resources from cache\n Cache.clear(\"^res:\");\n\n const reduxStore = setupStore(getDataFromServer(), customReducers);\n\n initThemeSettings(reduxStore.getState(), theme);\n\n handleRedirectURI(reduxStore);\n setModelCatalogEntryDate(reduxStore);\n\n setAllContentInDataSetting(reduxStore.getState());\n setLoginPreferences(reduxStore.getState());\n setDateTimeSettings(reduxStore.getState());\n\n // load existing cache from other browser tabs\n Cache.loadOtherBrowserTabs(() => {\n if (Cache.getItem(\"auth\")) {\n reduxStore.dispatch(loginSuccess());\n }\n });\n\n if (Cache.getItem(\"auth\")) {\n reduxStore.dispatch(loginSuccess());\n }\n\n // listen to history change and update the redux router store\n getBrowserHistory().listen((location, action) => {\n reduxStore.dispatch(locationChange(location as RouterLocation, action));\n });\n\n setUnhandledRejectionEvent(reduxStore);\n\n if (document.body) {\n document.body.className = \"js\";\n }\n\n if (beforeRenderHooks) {\n handleBeforeRenderHooks(beforeRenderHooks, { store: reduxStore });\n }\n\n return { store: reduxStore };\n};\n\nexport const addContentLoadedEvent = (\n store: BEIStore,\n render: RenderFunction,\n mount: MountFunction,\n theme?: Theme | Theme[],\n ErrorFallbackComponent?: ComponentType<ErrorBoundaryFallbackProps>,\n) => {\n window.addEventListener(\"DOMContentLoaded\", () => {\n const applicationNode = document.querySelector(\"#application\");\n if (!applicationNode) {\n throw new Error(\n \"No DOM element with id application found to attach client to\",\n );\n }\n\n mount(\n applicationNode,\n <Init\n store={store}\n routerHistory={getBrowserHistory()}\n theme={theme}\n ErrorFallbackComponent={ErrorFallbackComponent}\n >\n {render()}\n </Init>,\n );\n });\n};\n\nconst mountClient = (\n applicationNode: Element,\n element: ReactElement<ElementType>,\n) => {\n const isSSR = applicationNode.querySelector(\".application\");\n if (isSSR) {\n hydrateRoot(applicationNode, element);\n } else {\n const root = createRoot(applicationNode);\n root.render(element);\n }\n};\n\n/**\n * Mount the webapplication to the DOM, setup redux store and caches, add unhandledRejectionEvent, used client side when JavaScript is enabled.\n */\nexport const client = ({\n customReducers,\n theme,\n settings,\n render,\n beforeRenderHooks,\n ErrorFallbackComponent,\n mount,\n}: Props) => {\n const { store } = setupClient(customReducers, beforeRenderHooks, settings);\n\n addContentLoadedEvent(\n store,\n render,\n mount ?? mountClient,\n theme,\n ErrorFallbackComponent,\n );\n};\n","import { HelmetProvider } from \"@dr.pogodin/react-helmet\";\nimport { Provider } from \"react-redux\";\nimport { Router } from \"react-router\";\n\nimport { ErrorBoundary } from \"../components/ErrorBoundary\";\nimport { ThemeProvider } from \"../theme/ThemeProvider\";\n\nimport type { History as RouterHistory } from \"history\";\nimport type { ComponentType, ReactNode } from \"react\";\nimport type { ErrorBoundaryFallbackProps } from \"../components/ErrorBoundaryFallback\";\nimport type { BEIStore } from \"../redux/store\";\nimport type { Theme } from \"../theme/types\";\n\ninterface Props {\n store: BEIStore;\n routerHistory: RouterHistory;\n theme?: Theme | Theme[];\n children: ReactNode;\n ErrorFallbackComponent?: ComponentType<ErrorBoundaryFallbackProps>;\n}\n\nexport const Init = ({\n store,\n routerHistory,\n theme,\n children,\n ErrorFallbackComponent,\n}: Props): ReactNode => (\n <Provider store={store}>\n <ThemeProvider theme={theme}>\n <HelmetProvider>\n <ErrorBoundary FallbackComponent={ErrorFallbackComponent}>\n <Router history={routerHistory}>{children}</Router>\n </ErrorBoundary>\n </HelmetProvider>\n </ThemeProvider>\n </Provider>\n);\n\nInit.displayName = \"BEI.Init\";\n","import type { WindowWithContext } from \"./types\";\n\ndeclare let __webpack_public_path__: string;\ndeclare let __webpack_nonce__: string;\n\n(function x() {\n const dataElement = document.querySelector(\n 'script[type=\"application/json\"][data-app-state=\"app-json\"]',\n );\n if (!dataElement) {\n throw new Error(\n \"Error finding script with attribute app-json to retrieve context path in html\",\n );\n }\n\n const contextPath = dataElement.getAttribute(\"data-app-contextpath\");\n if (contextPath) {\n (window as WindowWithContext).contextPath = contextPath;\n }\n\n if (typeof __webpack_public_path__ !== \"undefined\") {\n const filePath = dataElement.getAttribute(\"data-app-filepath\");\n if (filePath && filePath !== \"{FILEPATH}\") {\n __webpack_public_path__ = `${filePath}/`; // NOSONAR\n } else if (contextPath) {\n __webpack_public_path__ = `${contextPath}/`; // NOSONAR\n }\n }\n\n const nonce = dataElement.getAttribute(\"data-app-nonce\");\n if (nonce) {\n __webpack_nonce__ = nonce; // NOSONAR\n }\n})();\n\nexport {};\n"],"mappings":"0SAAA,OACE,2BAAAA,EACA,oBAAAC,EACA,cAAAC,EACA,eAAAC,MACK,0BACP,OAAS,SAAAC,EAAO,OAAAC,MAAW,uBAC3B,OAAS,cAAAC,EAAY,eAAAC,MAAmB,mBCPxC,OAAS,kBAAAC,MAAsB,2BAC/B,OAAS,YAAAC,MAAgB,cACzB,OAAS,UAAAC,MAAc,eA8Bb,cAAAC,MAAA,oBAXH,IAAMC,EAAO,CAAC,CACnB,MAAAC,EACA,cAAAC,EACA,MAAAC,EACA,SAAAC,EACA,uBAAAC,CACF,IACEN,EAACO,EAAA,C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O9B,EACP,uBAAwBsC,EAEvB,SAAAF,EAAO,EACV,CACF,CACF,CAAC,CACH,EAEMK,EAAc,CAClBF,EACAG,IACG,CACWH,EAAgB,cAAc,cAAc,EAExDI,EAAYJ,EAAiBG,CAAO,EAEvBE,EAAWL,CAAe,EAClC,OAAOG,CAAO,CAEvB,EAKaG,GAAS,CAAC,CACrB,eAAA5B,EACA,MAAAjB,EACA,SAAAmB,EACA,OAAAiB,EACA,kBAAAlB,EACA,uBAAAoB,EACA,MAAAD,CACF,IAAa,CACX,GAAM,CAAE,MAAA3C,CAAM,EAAIsB,EAAYC,EAAgBC,EAAmBC,CAAQ,EAEzEgB,EACEzC,EACA0C,EACAC,GAASI,EACTzC,EACAsC,CACF,CACF,GEzOC,UAAa,CACZ,IAAMQ,EAAc,SAAS,cAC3B,4DACF,EACA,GAAI,CAACA,EACH,MAAM,IAAI,MACR,+EACF,EAGF,IAAMC,EAAcD,EAAY,aAAa,sBAAsB,EAKnE,GAJIC,IACD,OAA6B,YAAcA,GAG1C,OAAO,wBAA4B,IAAa,CAClD,IAAMC,EAAWF,EAAY,aAAa,mBAAmB,EACzDE,GAAYA,IAAa,aAC3B,wBAA0B,GAAGA,CAAQ,IAC5BD,IACT,wBAA0B,GAAGA,CAAW,IAE5C,CAEA,IAAME,EAAQH,EAAY,aAAa,gBAAgB,EACnDG,IACF,kBAAoBA,EAExB,GAAG","names":["getContextPathModularUI","getStringSetting","setSetting","setSettings","Cache","xhr","createRoot","hydrateRoot","HelmetProvider","Provider","Router","jsx","Init","store","routerHistory","theme","children","ErrorFallbackComponent","Provider","ThemeProvider","HelmetProvider","ErrorBoundary","Router","jsx","setUnhandledRejectionEvent","store","event","errorMessage","showXHRErrorNotification","initThemeSettings","state","theme","storedTheme","createTheme","handleRedirectURI","redirectURI","xhr","getContextPathModularUI","e","LOGIN_PATH","getStringSetting","replace","setModelCatalogEntryDate","entryDateFromUrl","updateEntryDate","Cache","entryDate","setupClient","customReducers","beforeRenderHooks","settings","contextPath","setSetting","setSettings","reduxStore","setupStore","getDataFromServer","setAllContentInDataSetting","setLoginPreferences","setDateTimeSettings","loginSuccess","getBrowserHistory","location","action","locationChange","handleBeforeRenderHooks","addContentLoadedEvent","render","mount","ErrorFallbackComponent","applicationNode","Init","mountClient","element","hydrateRoot","createRoot","client","dataElement","contextPath","filePath","nonce"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/flattenDeep.js","../src/theme/createTheme.ts","../src/theme/ThemeProvider.tsx"],"sourcesContent":["var baseFlatten = require('./_baseFlatten');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Recursively flattens `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flattenDeep([1, [2, [3, [4]], 5]]);\n * // => [1, 2, 3, 4, 5]\n */\nfunction flattenDeep(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, INFINITY) : [];\n}\n\nmodule.exports = flattenDeep;\n","import { setSettings } from \"@beinformed/ui/settings\";\nimport flattenDeep from \"lodash/flattenDeep\";\nimport isPlainObject from \"lodash/isPlainObject\";\n\nimport type { DefaultTheme } from \"styled-components\";\n\nconst replacePlaceholders = (inputTheme: DefaultTheme): DefaultTheme => {\n const possibleKeys = Object.keys(inputTheme)\n .map((key) => `\\\\b${key}\\\\b`)\n .join(\"|\");\n\n const re = new RegExp(`\\\\$(${possibleKeys})`, \"g\");\n Object.entries(inputTheme).forEach(([key, value]) => {\n if (key !== \"settings\" && typeof value === \"string\") {\n inputTheme[key] = value.replace(re, (match, capture) => {\n const replacement = inputTheme[capture];\n return typeof replacement === \"string\" ? replacement : match;\n });\n }\n });\n\n return inputTheme;\n};\n\nconst generateTheme = (\n storedTheme: DefaultTheme | null | undefined,\n ...themeElements: (DefaultTheme | ((theme: DefaultTheme) => DefaultTheme))[]\n): DefaultTheme => {\n const storedSettings = storedTheme?.settings ?? {};\n\n let generatedTheme: DefaultTheme = { settings: {} };\n\n for (const element of themeElements) {\n if (typeof element === \"function\") {\n generatedTheme = element(replacePlaceholders(generatedTheme));\n } else if (isPlainObject(element)) {\n const generatedSettings = generatedTheme.settings ?? {};\n\n // Type assertion is less critical here if DefaultTheme is well-defined\n generatedTheme = {\n ...generatedTheme,\n ...(element as DefaultTheme),\n ...(storedTheme as DefaultTheme),\n };\n\n if (\"settings\" in element && typeof element.settings === \"object\") {\n generatedTheme.settings = {\n ...generatedSettings,\n ...(element.settings as Record<string, string>), // Adjusted to Record<string, string> based on your DefaultTheme\n ...storedSettings,\n };\n }\n }\n }\n\n return replacePlaceholders(generatedTheme);\n};\n\n/**\n * Create a theme from multiple theme configuration objects.\n * Properties are overwritten by iterating the configuration objects from left to right.\n *\n * The first argument represents a stored theme part, this is optional. The stored theme part will overwrite every part in the collection of theme parts.\n * Thus a stored configuration is leading as it can be configured by a modeller through the repository.\n *\n * Placeholders can be used, they are replaced before calling a function theme part or at the end of the theme creation.\n *\n * Both objects and function can be used, where a function receives the previous objects as input arguments.\n * For example using the method createTheme(ThemeObject, ThemeObject2, ThemeFunction, ThemeFunction2), will be handled as:\n *\n * ThemeFunction2(ThemeFunction1({ ...ThemeObject, ...ThemeObject2 }))\n *\n * @example\n * Example where the primary color of the default theme is overwritten with a primary color of the custom theme,\n * but the button bg still uses the yiq function of the default theme:\n *\n * const DefaultTheme = {\n * PRIMARY_COLOR: \"#0000ff\",\n * SECONDARY_COLOR: \"#00ff00\",\n * BUTTON_COLOR: \"$PRIMARY_COLOR\"\n * }\n *\n * const createDefaultTheme = (input) => ({\n * ...input,\n * BUTTON_BG: getContrastYIQ(input.BUTTON_COLOR)\n * })\n *\n * const CustomTheme = {\n * PRIMARY_COLOR: \"#ff0000\"\n * }\n *\n * createTheme(null, DefaultTheme, CustomTheme, createDefaultTheme);\n *\n * // Result:\n * {\n * PRIMARY_COLOR: \"#ff0000\",\n * BUTTON_COLOR: \"#ff0000\",\n * BUTTON_BG: \"#fff\",\n * SECONDARY_COLOR: \"#00ff00\",\n * }\n */\nexport const createTheme = (\n storedTheme: DefaultTheme | null | undefined,\n ...themeConfigs: (\n | DefaultTheme\n | (DefaultTheme | ((theme: DefaultTheme) => DefaultTheme))[]\n | ((theme: DefaultTheme) => DefaultTheme)\n | undefined\n )[]\n): DefaultTheme => {\n const flattenConfig = flattenDeep<\n | DefaultTheme\n | DefaultTheme[]\n | ((theme: DefaultTheme) => DefaultTheme)\n | undefined\n >(themeConfigs).filter((el) => el != null);\n\n const customTheme = generateTheme(storedTheme, ...flattenConfig);\n\n if (customTheme?.settings) {\n setSettings(customTheme.settings);\n }\n\n return customTheme;\n};\n","import { ThemeProvider as SCThemeProvider } from \"styled-components\";\n\nimport { useBEISelector } from \"../redux/hooks\";\nimport { createTheme } from \"./createTheme\";\n\nimport type { ReactNode } from \"react\";\nimport type { RootState } from \"../redux/store\";\nimport type { Theme } from \"./types\";\n\nexport interface Props {\n theme?: Theme | Theme[];\n children: ReactNode;\n}\n\nexport const ThemeProvider = ({ theme, children }: Props): ReactNode => {\n const storedTheme = useBEISelector<RootState, Theme | undefined>(\n (state) => state.preferences.theme,\n );\n const finalTheme = createTheme(storedTheme, theme);\n\n return <SCThemeProvider theme={finalTheme}>{children}</SCThemeProvider>;\n};\nThemeProvider.displayName = \"BI.ThemeProvider\";\n"],"mappings":"kKAAA,IAAAA,EAAAC,EAAA,CAAAC,EAAAC,IAAA,kBAAIC,EAAc,IAGdC,EAAW,IAgBf,SAASC,EAAYC,EAAO,CAC1B,IAAIC,EAASD,GAAS,KAAO,EAAIA,EAAM,OACvC,OAAOC,EAASJ,EAAYG,EAAOF,CAAQ,EAAI,CAAC,CAClD,CAEAF,EAAO,QAAUG,ICvBjB,IAAAG,EAAwB,SACxBC,EAA0B,SAF1B,OAAS,eAAAC,MAAmB,0BAM5B,IAAMC,EAAuBC,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,SAAAC,CAAS,IAAwB,CACtE,IAAMC,EAAcC,EACjBC,GAAUA,EAAM,YAAY,KAC/B,EACMC,EAAaC,EAAYJ,EAAaF,CAAK,EAEjD,OAAOF,EAACS,EAAA,CAAgB,MAAOF,EAAa,SAAAJ,EAAS,CACvD,EACAF,EAAc,YAAc","names":["require_flattenDeep","__commonJSMin","exports","module","baseFlatten","INFINITY","flattenDeep","array","length","import_flattenDeep","import_isPlainObject","setSettings","replacePlaceholders","inputTheme","possibleKeys","key","re","value","match","capture","replacement","generateTheme","storedTheme","themeElements","storedSettings","generatedTheme","element","isPlainObject","generatedSettings","createTheme","themeConfigs","flattenConfig","flattenDeep","el","customTheme","SCThemeProvider","jsx","ThemeProvider","theme","children","storedTheme","useBEISelector","state","finalTheme","createTheme","SCThemeProvider"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/server/requestInformation.ts","../src/i18n/serverI18n.ts"],"sourcesContent":["import type { Locales } from \"../i18n/Locales\";\nimport type { RouterLocation } from \"../redux/router/routerReducer\";\nimport type { HttpServletRequestJava } from \"./types\";\n\nconst encodeQueryString = (queryString: string) => {\n if (!queryString) return \"\";\n\n const params: string[] = [];\n queryString.split(\"&\").forEach((part) => {\n const [key, value] = part.split(\"=\");\n if (key && value) {\n params.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`);\n } else if (key) {\n params.push(encodeURIComponent(key));\n }\n });\n return params.join(\"&\");\n};\n\nexport const getFullRequestUrl = (request: HttpServletRequestJava): string => {\n let pathInfo = request.getPathInfo() || \"/\";\n const queryString = request.getQueryString();\n\n pathInfo = pathInfo\n .split(\"/\")\n .map((segment) => encodeURIComponent(segment))\n .join(\"/\");\n\n if (queryString) {\n return `${pathInfo}?${encodeQueryString(queryString)}`;\n }\n\n return pathInfo;\n};\n\nexport const getFullRequestLocation = (\n request: HttpServletRequestJava,\n): RouterLocation => {\n return {\n pathname: request.getPathInfo() || \"/\",\n search: request.getQueryString() || \"\",\n state: {},\n hash: \"\",\n };\n};\n\nexport const getCookieFromRequest = (\n request: HttpServletRequestJava,\n cookieName: string,\n): null | string => {\n return request.getCookieByName(cookieName);\n};\n\nexport const getPreferredLocale = (\n request: HttpServletRequestJava,\n locales: Locales,\n): void | string => {\n const languageFromCookie = getCookieFromRequest(request, \"locale\");\n const acceptLanguageHeader =\n languageFromCookie || request.getHeader(\"Accept-Language\");\n\n // when no accept language header or cookie present, get first locale code\n if (acceptLanguageHeader === null) {\n return locales.availableLocaleCodes[0];\n }\n\n return locales.getPreferredLocale(acceptLanguageHeader);\n};\n","import { IllegalArgumentException } from \"@beinformed/ui/exceptions\";\nimport { getEnabledLocales } from \"@beinformed/ui/settings\";\nimport deepmerge from \"deepmerge\";\n\nimport { setLocales } from \"../redux/i18n/i18nReducer\";\nimport { getPreferredLocale } from \"../server/requestInformation\";\nimport { availableLocales, Locales } from \"./Locales\";\n\nimport type { BEIStore } from \"../redux/store\";\nimport type { HttpServletRequestJava } from \"../server/types\";\nimport type { LocaleConfiguration } from \"./types\";\n\nexport const setI18n = (\n store: BEIStore,\n locales: LocaleConfiguration[] = [],\n request: HttpServletRequestJava,\n) => {\n if (!Array.isArray(locales)) {\n throw new IllegalArgumentException(\"locales must be an array of objects\");\n }\n if (!request) {\n throw new IllegalArgumentException(\"missing request argument\");\n }\n\n const mergedLocales = availableLocales.map((locale) => {\n const code = locale.code;\n const customLocale = locales.find((custLocale) => custLocale.code === code);\n\n if (customLocale) {\n return deepmerge(locale, customLocale);\n }\n\n return locale;\n });\n\n locales.forEach((customLocale) => {\n if (!mergedLocales.some((locale) => locale.code === customLocale.code)) {\n mergedLocales.push(customLocale);\n }\n });\n\n const enabledLocales = mergedLocales.filter((locale: LocaleConfiguration) =>\n getEnabledLocales().includes(locale.code),\n );\n\n const localesInstance = new Locales(enabledLocales);\n const preferredLocale = getPreferredLocale(request, localesInstance);\n store.dispatch(setLocales(localesInstance, preferredLocale ?? \"en\"));\n};\n"],"mappings":"sDAIA,IA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,MAAM,IAAIC,EAAyB,0BAA0B,EAG/D,IAAMC,EAAgBC,EAAiB,IAAKC,GAAW,CACrD,IAAMC,EAAOD,EAAO,KACdE,EAAeP,EAAQ,KAAMQ,GAAeA,EAAW,OAASF,CAAI,EAE1E,OAAIC,EACKE,EAAUJ,EAAQE,CAAY,EAGhCF,CACT,CAAC,EAEDL,EAAQ,QAASO,GAAiB,CAC3BJ,EAAc,KAAME,GAAWA,EAAO,OAASE,EAAa,IAAI,GACnEJ,EAAc,KAAKI,CAAY,CAEnC,CAAC,EAED,IAAMG,EAAiBP,EAAc,OAAQE,GAC3CM,EAAkB,EAAE,SAASN,EAAO,IAAI,CAC1C,EAEMO,EAAkB,IAAIC,EAAQH,CAAc,EAC5CI,EAAkBC,EAAmBd,EAASW,CAAe,EACnEb,EAAM,SAASiB,EAAWJ,EAAiBE,GAAmB,IAAI,CAAC,CACrE","names":["encodeQueryString","queryString","params","part","key","value","getFullRequestUrl","request","pathInfo","segment","getFullRequestLocation","getCookieFromRequest","cookieName","getPreferredLocale","locales","acceptLanguageHeader","IllegalArgumentException","getEnabledLocales","deepmerge","setI18n","store","locales","request","IllegalArgumentException","mergedLocales","availableLocales","locale","code","customLocale","custLocale","deepmerge","enabledLocales","getEnabledLocales","localesInstance","Locales","preferredLocale","getPreferredLocale","setLocales"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_overArg.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getPrototype.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isPlainObject.js","../src/redux/preferences/preferencesReducer.ts","../src/redux/preferences/preferencesActions.ts"],"sourcesContent":["/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var baseGetTag = require('./_baseGetTag'),\n getPrototype = require('./_getPrototype'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nmodule.exports = isPlainObject;\n","import { createAction, createReducer } from \"@reduxjs/toolkit\";\n\nimport type { Theme } from \"../../theme/types\";\nimport type { PreferenceValue } from \"./types\";\n\nexport type PreferencesState = Record<string, PreferenceValue> & {\n theme?: Theme;\n};\n\nexport const setPreference = createAction(\n \"SET_PREFERENCE\",\n (propertyName: string, propertyValue: PreferenceValue) => {\n return {\n payload: {\n key: propertyName,\n value: propertyValue,\n },\n };\n },\n);\n\nexport const setPreferences = createAction(\n \"SET_PREFERENCES\",\n (preferences: Record<string, PreferenceValue>) => {\n return {\n payload: {\n ...preferences,\n },\n };\n },\n);\n\nconst initialState = {};\n\nexport const preferencesReducer = createReducer<PreferencesState>(\n initialState,\n (builder) => {\n builder\n .addCase(setPreference, (state, action) => {\n const { key, value } = action.payload;\n state[key] = value;\n })\n .addCase(setPreferences, (state, action) => {\n for (const key of Object.keys(action.payload)) {\n state[key] = action.payload[key];\n }\n });\n },\n);\n","import {\n LOGIN_PASSWORD_SETTING,\n LOGIN_PATH_SETTING,\n LOGIN_TYPE,\n LOGIN_USERNAME_SETTING,\n LOGOUT_PATH_SETTING,\n} from \"@beinformed/ui/constants\";\nimport { JsonParseException } from \"@beinformed/ui/exceptions\";\nimport {\n ALL_CONTENT_IN_DATA_SETTING,\n INCLUDE_TIME_OFFSET,\n setSetting,\n setSettings,\n} from \"@beinformed/ui/settings\";\nimport isPlainObject from \"lodash/isPlainObject\";\n\nimport { setPreference, setPreferences } from \"./preferencesReducer\";\n\nimport type { RootState } from \"../store\";\nimport type { PreferenceValue } from \"./types\";\n\nconst getServerPreferenceValue = (\n preferenceName: string,\n defaultValue: PreferenceValue,\n type?: string,\n) => {\n let value;\n if (typeof preferencesProvider !== \"undefined\") {\n value = preferencesProvider.getPreferenceByName(preferenceName);\n }\n\n if (!value) {\n value = defaultValue;\n }\n\n if (typeof value === \"string\" && type !== \"string\" && value.includes(\",\")) {\n value = value.split(\",\").map((val) => val.trim());\n }\n\n return value as PreferenceValue;\n};\n\nexport const setServerPreference = (\n propertyName: string,\n defaultValue: PreferenceValue,\n type?: string,\n) => {\n const value = getServerPreferenceValue(propertyName, defaultValue, type);\n return setPreference(propertyName, value);\n};\n\nexport const setThemePreference = (configTheme: string) => {\n let themeData;\n\n try {\n themeData = configTheme ? JSON.parse(configTheme) : null;\n } catch (error) {\n throw new JsonParseException(`Theme file contains invalid JSON: ${error}`);\n }\n\n if (themeData && isPlainObject(themeData)) {\n setSettings(themeData.settings);\n }\n\n return setPreference(\"theme\", themeData);\n};\n\n/**\n * Make modular-ui-content-in-data preference available client side\n */\nexport const setAllContentInDataSetting = (state?: RootState) => {\n let allContentInDataSetting = false;\n\n if (\n typeof preferencesProvider !== \"undefined\" &&\n typeof preferencesProvider.getModularUIContentInData !== \"undefined\"\n ) {\n allContentInDataSetting = preferencesProvider.getModularUIContentInData();\n } else if (typeof state !== \"undefined\") {\n allContentInDataSetting = state.preferences[\n ALL_CONTENT_IN_DATA_SETTING\n ] as boolean;\n }\n\n setSetting(ALL_CONTENT_IN_DATA_SETTING, !!allContentInDataSetting);\n return setPreference(ALL_CONTENT_IN_DATA_SETTING, allContentInDataSetting);\n};\n\n/**\n * Retrieve settings for date time conversion\n */\nexport const setDateTimeSettings = (state?: RootState) => {\n let isIncludeTimeOffsetInDateTimes = false;\n if (\n typeof preferencesProvider !== \"undefined\" &&\n typeof preferencesProvider.isIncludeTimeOffsetInDateTimes !== \"undefined\"\n ) {\n isIncludeTimeOffsetInDateTimes =\n preferencesProvider.isIncludeTimeOffsetInDateTimes();\n } else if (typeof state !== \"undefined\") {\n isIncludeTimeOffsetInDateTimes = state.preferences[\n INCLUDE_TIME_OFFSET\n ] as boolean;\n }\n\n setSetting(INCLUDE_TIME_OFFSET, !!isIncludeTimeOffsetInDateTimes);\n return setPreference(INCLUDE_TIME_OFFSET, isIncludeTimeOffsetInDateTimes);\n};\n\n/**\n * Retrieves login settings from runtime preferences and sets them as setting in the preference reducer\n */\nexport const setLoginPreferences = (state?: RootState) => {\n const loginSettings = {\n [LOGIN_TYPE]: getServerPreferenceValue(\n LOGIN_TYPE,\n state?.preferences[LOGIN_TYPE] || \"\",\n ) as string,\n [LOGIN_PATH_SETTING]: getServerPreferenceValue(\n LOGIN_PATH_SETTING,\n state?.preferences[LOGIN_PATH_SETTING] ||\n `/callback?client_name=FormClient`,\n ) as string,\n [LOGIN_USERNAME_SETTING]: getServerPreferenceValue(\n LOGIN_USERNAME_SETTING,\n state?.preferences[LOGIN_USERNAME_SETTING] || \"j_username\",\n ) as string,\n [LOGIN_PASSWORD_SETTING]: getServerPreferenceValue(\n LOGIN_PASSWORD_SETTING,\n state?.preferences[LOGIN_PASSWORD_SETTING] || \"j_password\",\n ) as string,\n [LOGOUT_PATH_SETTING]: getServerPreferenceValue(\n LOGOUT_PATH_SETTING,\n state?.preferences[LOGOUT_PATH_SETTING] || `/logout`,\n ) as string,\n };\n\n setSettings(loginSettings);\n return setPreferences(loginSettings);\n};\n"],"mappings":"+HAAA,IAAAA,EAAAC,EAAA,CAAAC,EAAAC,IAAA,cAQA,SAASC,EAAQC,EAAMC,EAAW,CAChC,OAAO,SAASC,EAAK,CACnB,OAAOF,EAAKC,EAAUC,CAAG,CAAC,CAC5B,CACF,CAEAJ,EAAO,QAAUC,ICdjB,IAAAI,EAAAC,EAAA,CAAAC,EAAAC,IAAA,kBAAIC,EAAU,IAGVC,EAAeD,EAAQ,OAAO,eAAgB,MAAM,EAExDD,EAAO,QAAUE,ICLjB,IAAAC,EAAAC,EAAA,CAAAC,EAAAC,IAAA,kBAAIC,EAAa,IACbC,EAAe,IACfC,EAAe,IAGfC,EAAY,kBAGZC,EAAY,SAAS,UACrBC,EAAc,OAAO,UAGrBC,EAAeF,EAAU,SAGzBG,EAAiBF,EAAY,eAG7BG,EAAmBF,EAAa,KAAK,MAAM,EA8B/C,SAASG,EAAcC,EAAO,CAC5B,GAAI,CAACR,EAAaQ,CAAK,GAAKV,EAAWU,CAAK,GAAKP,EAC/C,MAAO,GAET,IAAIQ,EAAQV,EAAaS,CAAK,EAC9B,GAAIC,IAAU,KACZ,MAAO,GAET,IAAIC,EAAOL,EAAe,KAAKI,EAAO,aAAa,GAAKA,EAAM,YAC9D,OAAO,OAAOC,GAAQ,YAAcA,aAAgBA,GAClDN,EAAa,KAAKM,CAAI,GAAKJ,CAC/B,CAEAT,EAAO,QAAUU,I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in","exports","module","overArg","func","transform","arg","require_getPrototype","__commonJSMin","exports","module","overArg","getPrototype","require_isPlainObject","__commonJSMin","exports","module","baseGetTag","getPrototype","isObjectLike","objectTag","funcProto","objectProto","funcToString","hasOwnProperty","objectCtorString","isPlainObject","value","proto","Ctor","createAction","createReducer","setPreference","propertyName","propertyValue","setPreferences","preferences","initialState","preferencesReducer","builder","state","action","key","value","import_isPlainObject","LOGIN_PASSWORD_SETTING","LOGIN_PATH_SETTING","LOGIN_TYPE","LOGIN_USERNAME_SETTING","LOGOUT_PATH_SETTING","JsonParseException","ALL_CONTENT_IN_DATA_SETTING","INCLUDE_TIME_OFFSET","setSetting","setSettings","getServerPreferenceValue","preferenceName","defaultValue","type","value","val","setServerPreference","propertyName","setPreference","setThemePreference","configTheme","themeData","error","JsonParseException","isPlainObject","setSettings","setAllContentInDataSetting","state","allContentInDataSetting","ALL_CONTENT_IN_DATA_SETTING","setSetting","setDateTimeSettings","isIncludeTimeOffsetInDateTimes","INCLUDE_TIME_OFFSET","setLoginPreferences","loginSettings","LOGIN_TYPE","LOGIN_PATH_SETTING","LOGIN_USERNAME_SETTING","LOGIN_PASSWORD_SETTING","LOGOUT_PATH_SETTING","setPreferences"]}
|
package/dist/chunk-UZIZDEU6.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c as b}from"./chunk-RKGGCIUD.js";import{c as ee,d as te,j as oe,k as re,l as ne,m as se,n as ie,o as ae,p as ce,q as T}from"./chunk-Z2Y3OPVI.js";import{B as Q,C as X,K as I,O as R,V as O,d as L,g as ft,h as Mt,i as F,k as w,l as _,m as N,n as $,p as j,q as G,s as K,u as z,v as V,w as W,x as J,y as Y}from"./chunk-Y7ESITVO.js";import{a as Z}from"./chunk-JYAETKRB.js";import{a as ht}from"./chunk-YJNJVQFW.js";import{a as xt}from"./chunk-A4USB53Q.js";import{d as B,f as gt}from"./chunk-WBPDMDW4.js";import{d as dt,e as pt,f as mt,h as u,i as d}from"./chunk-6KRECIRI.js";import{a as f,b as ut}from"./chunk-FW4363Y4.js";var E=f((Os,Se)=>{"use strict";var so=pt(),io=function(){try{var e=so(Object,"defineProperty");return e({},"",{}),e}catch{}}();Se.exports=io});var Re=f((bs,Ue)=>{"use strict";var Ce=E();function ao(e,t,o){t=="__proto__"&&Ce?Ce(e,t,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[t]=o}Ue.exports=ao});var ve=f((Ss,Te)=>{"use strict";var co=Re(),lo=mt(),uo=Object.prototype,po=uo.hasOwnProperty;function mo(e,t,o){var r=e[t];(!(po.call(e,t)&&lo(r,o))||o===void 0&&!(t in e))&&co(e,t,o)}Te.exports=mo});var De=f((Cs,Pe)=>{"use strict";var fo=ve(),go=B(),Mo=ft(),He=dt(),xo=gt();function ho(e,t,o,r){if(!He(e))return e;t=go(t,e);for(var n=-1,s=t.length,i=s-1,a=e;a!=null&&++n<s;){var c=xo(t[n]),p=o;if(c==="__proto__"||c==="constructor"||c==="prototype")return e;if(n!=i){var m=a[c];p=r?r(m,c,a):void 0,p===void 0&&(p=He(m)?m:Mo(t[n+1])?[]:{})}fo(a,c,p),a=a[c]}return e}Pe.exports=ho});var Ee=f((Us,qe)=>{"use strict";var yo=ht(),Io=De(),Oo=B();function bo(e,t,o){for(var r=-1,n=t.length,s={};++r<n;){var i=t[r],a=yo(e,i);o(a,i)&&Io(s,Oo(i,e),a)}return s}qe.exports=bo});var ke=f((Rs,Ae)=>{"use strict";function So(e,t){return e!=null&&t in Object(e)}Ae.exports=So});var Be=f((Ts,Le)=>{"use strict";var Co=ke(),Uo=Mt();function Ro(e,t){return e!=null&&Uo(e,t,Co)}Le.exports=Ro});var we=f((vs,Fe)=>{"use strict";var To=Ee(),vo=Be();function Ho(e,t){return To(e,t,function(o,r){return vo(e,r)})}Fe.exports=Ho});var Ne=f((Hs,_e)=>{"use strict";var Po=xt();function Do(e){var t=e==null?0:e.length;return t?Po(e,1):[]}_e.exports=Do});var je=f((Ps,$e)=>{"use strict";function qo(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)}$e.exports=qo});var ze=f((Ds,Ke)=>{"use strict";var Eo=je(),Ge=Math.max;function Ao(e,t,o){return t=Ge(t===void 0?e.length-1:t,0),function(){for(var r=arguments,n=-1,s=Ge(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),Eo(e,this,a)}}Ke.exports=Ao});var We=f((qs,Ve)=>{"use strict";function ko(e){return function(){return e}}Ve.exports=ko});var Ye=f((Es,Je)=>{"use strict";function Lo(e){return e}Je.exports=Lo});var Ze=f((As,Xe)=>{"use strict";var Bo=We(),Qe=E(),Fo=Ye(),wo=Qe?function(e,t){return Qe(e,"toString",{configurable:!0,enumerable:!1,value:Bo(t),writable:!0})}:Fo;Xe.exports=wo});var tt=f((ks,et)=>{"use strict";var _o=800,No=16,$o=Date.now;function jo(e){var t=0,o=0;return function(){var r=$o(),n=No-(r-o);if(o=r,n>0){if(++t>=_o)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}et.exports=jo});var rt=f((Ls,ot)=>{"use strict";var Go=Ze(),Ko=tt(),zo=Ko(Go);ot.exports=zo});var st=f((Bs,nt)=>{"use strict";var Vo=Ne(),Wo=ze(),Jo=rt();function Yo(e){return Jo(Wo(e,void 0,Vo),e+"")}nt.exports=Yo});var at=f((Fs,it)=>{"use strict";var Qo=we(),Xo=st(),Zo=Xo(function(e,t){return e==null?{}:Qo(e,t)});it.exports=Zo});import{useEffect as bt,useState as v}from"react";import{HTTP_METHODS as St}from"@beinformed/ui/constants";import{FormModel as Ct,ListModel as Ut}from"@beinformed/ui/models";import{ModularUIRequest as yt}from"@beinformed/ui/modularui";import{createSelector as It}from"reselect";var Ot=It([Z],e=>(t,o)=>{let r=new yt(t,o);return r.locale=e,r}),le=()=>d(Ot);var mr=e=>{let t=le(),[o,r]=v(null),[n,s]=v(0),[i,a]=v(0);return bt(()=>{let c=Rt(e).map(p=>{let m=p.selfhref.addParameter("commit","false");return t(m,{method:St.POST}).fetch().then(g=>(g instanceof Ct&&(g.tokens=[]),{[p.name]:g}))});s(c.length),Promise.all(c).then(p=>{let m=Object.assign({},...p);r(m),a(p.length)})},[e,t]),i===n?o:null},Rt=e=>{if(!e.actionCollection)return[];let o=[...e.actionCollection.getActionsByType("create").filter(s=>!s.isDisabled)];e instanceof Ut&&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{DEFAULT_AUTHENTICATION_TYPE as ue}from"@beinformed/ui/constants";import{IllegalStateException as Tt}from"@beinformed/ui/exceptions";import{getContextPathServer as de,logoutPath as vt}from"@beinformed/ui/settings";import{Cache as h}from"@beinformed/ui/utils";var Cr=()=>{h.setItem("isRedirectLogin",!1);let e=u(),t=d(R),o=d(n=>n.auth),r=t?.isLoggedIn??!1;return{isAuthenticated:r,authenticationTypes:t?.authenticationTypes??[ue],errorMessage:o.error,resetErrors:()=>e(L()),login:(n,s)=>e(ee({username:n,password:s})),redirectLogin:n=>{if(h.getItem("isRedirectLogin"))throw new Tt(`Could not redirect to '${n.authentication}' using url: '${n.redirectUri??""}'`);r||(h.setItem("isRedirectLogin",!0),window.location.assign(`${de()}${n.redirectUri??""}`))}}},Ur=()=>{let e=u(),t=d(R),o=vt(),r=de();return{isAuthenticated:t?.isLoggedIn??!1,authenticationTypes:t?.authenticationTypes??[ue],logout:()=>{if(h.getItem("isRedirectLogin")){let s=window.location.origin,i=`${s}${r}/logout?url=${s}${r}${o}`;h.setItem("isRedirectLogin",!1),window.location.assign(i)}else return e(te())}}};import{useEffect as Ht,useState as Pt}from"react";import{ModularUIRequest as Dt}from"@beinformed/ui/modularui";var pe=()=>{let e=u();return{...d(o=>o.progressindicator),start:()=>e(w()),finish:()=>e(_()),reset:()=>e(N()),update:o=>e($(o))}};var Ar=(e,t)=>{let[o,r]=Pt([]),n=b(),{start:s,finish:i}=pe(),a=e.map(p=>p.link?.selfhref.href).filter((p,m,g)=>g.indexOf(p)===m).map(p=>p?.toString()),c=JSON.stringify(a);return Ht(()=>{let p=JSON.parse(c).map(m=>{let g=new Dt(m);return g.locale=n,g.fetchContent(t)});s(),Promise.all(p).then(m=>{r(m),i()})},[c,n,t]),o};import{useEffect as qt,useRef as me}from"react";import{dequal as Et}from"dequal/lite";var At=e=>{let t=me(null),o=me(0);return Et(e,t.current)||(t.current=e,o.current+=1),[o.current]};function fe(e,t){return qt(e,At(t))}import{HTTP_METHODS as Me}from"@beinformed/ui/constants";import{FormModel as D,Href as wt}from"@beinformed/ui/models";import{getSetting as _t}from"@beinformed/ui/settings";import{produce as Nt}from"immer";import{useEffect as kt,useMemo as P,useRef as H}from"react";import{HTTP_METHODS as Lt}from"@beinformed/ui/constants";import{Href as ge}from"@beinformed/ui/models";import{useLocation as Bt}from"react-router";var Ft=(e,t)=>{let o=b();return P(()=>`${e}(${t.split("?")[0]})(${o})`,[e,t,o])},S=(e,t,o={method:Lt.GET,removeOnUnmount:!1})=>{let r=u(),n=P(()=>t?.toString()||"",[t]),s=Ft(e,n),i=P(()=>U=>U.modularui[s],[s]),a=d(i);t instanceof ge&&(o.origin=o.origin??t.origin,o.contextPath=o.contextPath??t.contextPath);let c=Bt(),p=c!==null&&typeof c=="object"&&c.state!==null&&typeof c.state=="object"&&"redirectLocation"in c.state?c.state.redirectLocation:void 0,m=a==null||(p instanceof ge?p?.equals(n):!1),g=H(o),A=H(n),k=H(m);return fe(()=>{let U=A.current===n&&g.current.isReload&&!o.isReload,lt=m&&!k.current;n!==""&&(lt||!U)&&r(O({key:s,href:n,options:o})),g.current=o,A.current=n,k.current=m},[s,n,o,m]),kt(()=>{if(o.removeOnUnmount)return()=>{r(I(s))}},[r,s,o.removeOnUnmount]),a};var cn=(e,t)=>{let o=new wt(e);_t("ALWAYS_COMMIT_FORM")||o.addParameter("commit","false");let r=S("form",o,{method:Me.POST,targetModel:D,removeOnUnmount:!0,data:t?JSON.stringify(t):void 0,origin:o.origin,contextPath:o.contextPath});if(r?.model)return r.model},ln=()=>{let e=u();return{previous:i=>e(re(i)),cancel:i=>e(ne(i)),submit:i=>e(O({key:i.connectKey||i.key,href:i.selfhref,options:{method:Me.POST,data:i.formdata,updateHandler:a=>a instanceof D?Nt(a,c=>{c.update(a)}):a,targetModel:D}})),remove:i=>e(I(i.connectKey||"")),showFormNotification:i=>e(K(i))}},un=(e,t)=>{let o=u();return(r,n,s)=>o(oe({form:e,formObject:t,attribute:r,inputvalue:n,options:s}))},dn=e=>{let t=u();return{save:()=>t(se(e)),cancel:o=>t(ie(e,o)),remove:o=>t(ae(e,o))}};import{useCallback as xe}from"react";import{IllegalArgumentException as $t}from"@beinformed/ui/exceptions";var xn=e=>{if(!e)throw new $t("Missing modalId argument for useModal hook");let t=u(),o=d(s=>s.modals.modals.find(i=>i.key===e)),r=xe(()=>{t(Q(e))},[t,e]),n=xe(()=>{t(X(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 he,ContentIndexModel as Kt,ContentTOCModel as zt,ContentTypeModel as Vt,Href as Wt,ModelCatalogModel as Jt}from"@beinformed/ui/models";import{createHref as y,filterParameters as q}from"@beinformed/ui/utils";import{useMemo as C}from"react";var M=()=>d(e=>e.router.location),On=()=>M()?.key??"",bn=()=>M()?.search,Sn=()=>M()?.pathname,Cn=()=>{let e=u();return{push:(t,o)=>e(z(t,o)),replace:(t,o)=>e(V(t,o)),go:t=>e(W(t)),goBack:()=>e(J()),goForward:()=>e(Y())}};var jt=(e,t,o)=>{let r={targetModel:void 0,forceTargetModel:void 0,isReload:!1,origin:void 0,contextPath:void 0,cache:!1};return e.targetModel&&(r.targetModel=e.targetModel,r.forceTargetModel=e.forceTargetModel),e.cache&&(r.cache=e.cache),o!==null&&typeof o=="object"&&"state"in o&&o.state!==null&&typeof o.state=="object"&&"reload"in o.state&&"pathname"in o&&typeof o.pathname=="string"&&o.pathname.startsWith(t)&&(r.isReload=!0),r.origin=e.origin??r.origin,r.contextPath=e.contextPath??r.contextPath,r},Gt=(e,t)=>{t.length>0&&(t.some(r=>{if(e!==null&&typeof e=="object"&&"type"in e)return e.type===r})||console.warn(e,"is not of instance",t))},l=(e,t,o={expectedModels:[],targetModel:void 0,forceTargetModel:!1,origin:void 0,contextPath:void 0})=>{let r=M(),n=C(()=>t.toString(),[t]),s=C(()=>jt(o,n,r),[o,n,r]),i=S(e,t,s),a=C(()=>o.expectedModels??[],[o.expectedModels]);return C(()=>{if(i?.model)return Gt(i.model,a),i.model},[a,i])};var Bn=e=>l("modelcatalog","/modelcatalog",{expectedModels:["ModelCatalog"],targetModel:Jt,...e}),Yt=(e,t="conceptindex",o)=>{let{entryDate:r}=x(),n=q(e,["index","label","modelcategory","type"]);return n.setParameter("entryDate",r),l(t,n,{expectedModels:["ConceptIndex"],targetModel:he,...o})},Fn=(e,t="conceptdetail",o)=>{let{entryDate:r}=x(),n=M(),s=y("concepts",e,r,n,[]);return l(t,s,{expectedModels:["ConceptDetail","BusinessScenario"],...o})},Qt=(e,t="contentindex",o)=>{let r=q(e,["index","label","type"]);return l(t,r,{expectedModels:["ContentIndex"],targetModel:Kt,...o})},wn=(e,t="contenttoc",o)=>{let{entryDate:r}=x(),n=M(),s=y("content",e,r,n,["complete"]);return l(t,s,{expectedModels:["ContentTOC"],targetModel:zt,...o})},_n=(e,t="content",o)=>{let{entryDate:r}=x(),n=M(),s=y("content",e,r,n,["complete"]);return l(t,s,{expectedModels:["Content","ContentTOC"],...o})},Nn=(e,t="content",o)=>{let{entryDate:r}=x(),n=M(),s=new Wt(e);s.removeParameter("complete"),s.addParameter("complete","true");let i=y("content",s,r,n,["complete"]);return l(t,i,{expectedModels:["Content","ContentTOC"],...o})},$n=(e,t="contenttypes",o)=>{let r=y("contenttypes",e,void 0,void 0,[]);return l(t,r,{expectedModels:["ContentType"],targetModel:Vt,...o})},jn=(e,t="relatedconcepts",o)=>{let{entryDate:r}=x(),n=q(e,["modelcategory"]);return n.setParameter("entryDate",r),l(t,n,{expectedModels:["ConceptIndex"],targetModel:he,...o})},ye=(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},Gn=(e,t,o)=>{let r=ye("/concepts",e);return Yt(r,t,o)},Kn=(e,t,o)=>{let r=ye("/content",e);return Qt(r,t,o)},x=()=>{let e=u();return{entryDate:d(ce),setEntryDate:o=>e(F(o))}};import{createSelector as Xt}from"reselect";var Xn=()=>{let e=u(),o=Xt([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=d(o);return{reload:(n,s)=>{e(T(n,s))},reloadWithFilter:(n,s)=>{let i=r.filter(n);for(let a of i)a&&e(T(a,s))}}};import{ApplicationModel as Zt,CaseSearchModel as Ie,CaseViewModel as eo,DetailModel as Oe,GroupingPanelModel as to,ListDetailModel as oo,ListModel as be,TabModel as ro,UserProfileModel as no}from"@beinformed/ui/models";var os=e=>l("application","/",{expectedModels:["Application"],targetModel:Zt,...e}),rs=(e,t)=>l("tab",e,{expectedModels:["Tab"],targetModel:ro,...t}),ns=(e,t)=>l("caseview",e,{expectedModels:["CaseView"],targetModel:eo,...t}),ss=(e,t)=>l("panel",e,{expectedModels:["List","GroupingPanel","Detail"],...t}),is=(e,t)=>l("list",e,{expectedModels:["List"],targetModel:be,...t}),as=(e,t)=>l("list",e,{expectedModels:["List","Detail"],targetModel:[be,Oe],...t}),cs=(e,t)=>l("listdetail",e,{expectedModels:["ListDetail"],targetModel:oo,forceTargetModel:!0,...t}),ls=(e,t)=>l("groupingpanel",e,{expectedModels:["GroupingPanel"],targetModel:to,...t}),us=(e,t)=>l("detailpanel",e,{expectedModels:["Detail"],targetModel:Oe,...t}),ds=(e,t)=>l("quicksearch",e,{expectedModels:["CaseSearch"],targetModel:Ie,...t}),ps=(e,t)=>l("search",e,{expectedModels:["CaseSearch"],targetModel:Ie,...t}),ms=(e,t)=>l("userprofile",e,{expectedModels:["UserProfile"],targetModel:no,...t});var hs=()=>{let e=u(),{render:t,messageType:o,message:r,error:n}=d(s=>s.notification);return{render:t,messageType:o,message:r,error:n,dismiss:()=>e(G())}},ys=()=>{let e=u();return(t,o)=>e(j({type:"ERROR",message:t,error:o}))};var ct=ut(at(),1);import{useMemo as er}from"react";import{createSelector as tr}from"reselect";var or=e=>e.preferences,rr=e=>{let t=Array.isArray(e)?e:[e];return tr([or],o=>(0,ct.default)(o,t))},$s=e=>{let t=er(()=>rr(e),[Array.isArray(e)?e.join(","):e]);return d(t)};export{le as a,mr as b,Cr as c,Ur as d,pe as e,Ar as f,fe as g,S as h,cn as i,ln as j,un as k,dn as l,xn as m,M as n,On as o,bn as p,Sn as q,Cn as r,l as s,Bn as t,Yt as u,Fn as v,Qt as w,wn as x,_n as y,Nn as z,$n as A,jn as B,Gn as C,Kn as D,x as E,Xn as F,os as G,rs as H,ns as I,ss as J,is as K,as as L,cs as M,ls as N,us as O,ds as P,ps as Q,ms as R,hs as S,ys as T,$s as U};
|
|
2
|
-
//# sourceMappingURL=chunk-UZIZDEU6.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_defineProperty.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseAssignValue.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_assignValue.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseSet.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_basePickBy.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseHasIn.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/hasIn.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_basePick.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/flatten.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_apply.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_overRest.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/constant.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/identity.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseSetToString.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_shortOut.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_setToString.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_flatRest.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/pick.js","../src/hooks/useAllFormsOnModel.ts","../src/hooks/useModularUIRequest.ts","../src/hooks/useAuthentication.ts","../src/hooks/useContent.ts","../src/hooks/useProgressIndicator.ts","../src/hooks/useDeepCompareEffect.ts","../src/hooks/useForm.ts","../src/hooks/useModularUI.ts","../src/hooks/useModal.ts","../src/hooks/useModelCatalog.ts","../src/hooks/useModularUIBasic.ts","../src/hooks/useRouter.ts","../src/hooks/useModels.ts","../src/hooks/useModularUIModel.ts","../src/hooks/useNotification.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, 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 [requestCount, setRequestCount] = useState(0);\n const [responseCount, setResponseCount] = useState(0);\n\n useEffect(() => {\n const requests = getActions(model).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 setRequestCount(requests.length);\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 }, [model, 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 { ModularUIRequest } from \"@beinformed/ui/modularui\";\nimport { createSelector } from \"reselect\";\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 { DEFAULT_AUTHENTICATION_TYPE } from \"@beinformed/ui/constants\";\nimport { IllegalStateException } from \"@beinformed/ui/exceptions\";\nimport { getContextPathServer, logoutPath } from \"@beinformed/ui/settings\";\nimport { Cache } from \"@beinformed/ui/utils\";\n\nimport { getApplication } from \"../redux/application/applicationSelectors\";\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 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 = useBEISelector(getApplication);\n const auth = useBEISelector((state: RootState) => state.auth);\n\n const isAuthenticated = application?.isLoggedIn ?? false;\n\n return {\n /**\n * Indicates whether the user is currently authenticated.\n */\n isAuthenticated,\n\n /**\n * An array of available authentication types supported by the application.\n * Defaults to an array containing the `DEFAULT_AUTHENTICATION_TYPE` if no types are available in the application state.\n */\n authenticationTypes: application?.authenticationTypes ?? [\n DEFAULT_AUTHENTICATION_TYPE,\n ],\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 = useBEISelector(getApplication);\n\n const LOGOUT_PATH = logoutPath();\n const BASE_PATH = getContextPathServer();\n\n const isAuthenticated = application?.isLoggedIn ?? false;\n return {\n /**\n * Indicates whether the user is currently authenticated.\n */\n isAuthenticated,\n\n /**\n * An array of available authentication types supported by the application.\n * Defaults to an array containing the `DEFAULT_AUTHENTICATION_TYPE` if no types are available in the application state.\n */\n authenticationTypes: application?.authenticationTypes ?? [\n DEFAULT_AUTHENTICATION_TYPE,\n ],\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 if (Cache.getItem(\"isRedirectLogin\")) {\n const origin = window.location.origin;\n const url = `${origin}${BASE_PATH}/logout?url=${origin}${BASE_PATH}${LOGOUT_PATH}`;\n Cache.setItem(\"isRedirectLogin\", false);\n window.location.assign(url);\n } else {\n return dispatch(logout());\n }\n },\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]);\n\n return content;\n};\n","import { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport {\n finishProgress,\n resetProgress,\n startProgress,\n updateProgress,\n} from \"../redux/progressindicator/progressIndicatorActions\";\n\nimport type { RootState } from \"../redux/store\";\n\nexport const useProgressIndicator = () => {\n const dispatch = useBEIDispatch();\n const progress = useBEISelector(\n (state: RootState) => state.progressindicator,\n );\n\n return {\n ...progress,\n start: () => dispatch(startProgress()),\n finish: () => dispatch(finishProgress()),\n reset: () => dispatch(resetProgress()),\n update: (percentComplete: number) =>\n dispatch(updateProgress(percentComplete)),\n };\n};\n","import { useEffect, useRef } from \"react\";\n\nimport { dequal as deepEqual } from \"dequal/lite\";\n\ntype Callback = () => void | (() => void);\ntype DependencyList = unknown[];\n\n/**\n * As copied from https://github.com/kentcdodds/use-deep-compare-effect/\n * Need to copy this, because the dependency on dequal breaks in ie11\n */\nconst useDeepCompareMemoize = (value: DependencyList) => {\n const ref = useRef<DependencyList | null>(null);\n const signalRef = useRef<number>(0);\n\n if (!deepEqual(value, ref.current)) {\n ref.current = value;\n signalRef.current += 1;\n }\n\n return [signalRef.current];\n};\n\nexport function useDeepCompareEffect(\n callback: Callback,\n dependencies: DependencyList,\n): void {\n return useEffect(callback, useDeepCompareMemoize(dependencies));\n}\n","import { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport { FormModel, Href } from \"@beinformed/ui/models\";\nimport { getSetting } from \"@beinformed/ui/settings\";\nimport { produce } from \"immer\";\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\";\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) {\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 { useEffect, useMemo, useRef } from \"react\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport { Href } from \"@beinformed/ui/models\";\nimport { useLocation } from \"react-router\";\n\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport { fetchModel } from \"../redux/modularui/fetchModel\";\nimport { removeModelByKey } from \"../redux/modularui/modelActions\";\nimport { useDeepCompareEffect } from \"./useDeepCompareEffect\";\nimport { useLocale } from \"./useI18n\";\n\nimport type { ModularUIRequestOptions } from \"@beinformed/ui/utils\";\nimport type { RootState } from \"../redux/store\";\n\nconst useKeyForHook = (modelKey: string, url: string) => {\n const locale = useLocale();\n return useMemo(\n () => `${modelKey}(${url.split(\"?\")[0]})(${locale})`,\n [modelKey, url, locale],\n );\n};\n\n/**\n * Use redux action and selector to retrieve the correct modular ui service model\n */\nexport const useModularUI = (\n modelKey: string,\n url: string | Href,\n options: ModularUIRequestOptions = {\n method: HTTP_METHODS.GET,\n removeOnUnmount: false,\n },\n) => {\n const dispatch = useBEIDispatch();\n const href = useMemo(() => url?.toString() || \"\", [url]);\n const key = useKeyForHook(modelKey, href);\n\n const modelSelector = useMemo(\n () => (state: RootState) => state.modularui[key],\n [key],\n );\n const model = useBEISelector(modelSelector);\n\n if (url instanceof Href) {\n options.origin = options.origin ?? url.origin;\n options.contextPath = options.contextPath ?? url.contextPath;\n }\n\n const location = useLocation();\n const redirectLocation =\n location !== null &&\n typeof location === \"object\" &&\n location.state !== null &&\n typeof location.state === \"object\" &&\n \"redirectLocation\" in location.state\n ? location.state.redirectLocation\n : undefined;\n const forceLoad =\n model == null ||\n (redirectLocation instanceof Href ? redirectLocation?.equals(href) : false);\n\n const prevOptions = useRef(options);\n const prevHref = useRef(href);\n const prevForceLoad = useRef(forceLoad);\n\n useDeepCompareEffect(() => {\n // prevent reloads when previous option had the isReload, but the new options not\n const isOldReload =\n prevHref.current === href &&\n prevOptions.current.isReload &&\n !options.isReload;\n\n const doForceLoad = forceLoad && !prevForceLoad.current;\n\n if (href !== \"\" && (doForceLoad || !isOldReload)) {\n dispatch(fetchModel({ key, href, options }));\n }\n\n prevOptions.current = options;\n prevHref.current = href;\n prevForceLoad.current = forceLoad;\n }, [key, href, options, forceLoad]);\n\n useEffect(() => {\n if (options.removeOnUnmount) {\n return () => {\n dispatch(removeModelByKey(key));\n };\n }\n return;\n }, [dispatch, key, options.removeOnUnmount]);\n\n return model;\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\";\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 { useMemo } from \"react\";\n\nimport { useModularUI } from \"./useModularUI\";\nimport { useLocation } from \"./useRouter\";\n\nimport type { Href } from \"@beinformed/ui/models\";\nimport type { ModularUIResponse } from \"@beinformed/ui/modularui\";\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}\n\n// Helper to create useModularUI options\nconst createUseModularUIOptions = <T>(\n options: UseModularUIBasicOptions<T>,\n href: string,\n location: unknown,\n): Record<string, unknown> => {\n const baseOptions: Record<string, unknown> = {\n targetModel: undefined,\n forceTargetModel: undefined,\n isReload: false,\n origin: undefined,\n contextPath: undefined,\n cache: false,\n };\n\n // Handle targetModel and forceTargetModel\n\n if (options.targetModel) {\n baseOptions.targetModel = options.targetModel;\n baseOptions.forceTargetModel = options.forceTargetModel;\n }\n\n // Handle cache option\n if (options.cache) {\n baseOptions.cache = options.cache;\n }\n\n // Check for reload if location matches href\n if (\n location !== null &&\n typeof location === \"object\" &&\n \"state\" in location &&\n location.state !== null &&\n typeof location.state === \"object\" &&\n \"reload\" in location.state &&\n \"pathname\" in location &&\n typeof location.pathname === \"string\" &&\n location.pathname.startsWith(href)\n ) {\n baseOptions.isReload = true;\n }\n\n // Handle origin and contextPath options\n baseOptions.origin = options.origin ?? baseOptions.origin;\n baseOptions.contextPath = options.contextPath ?? baseOptions.contextPath;\n\n return baseOptions;\n};\n\n// Helper to validate the model against expectedModels\nconst validateModel = (model: unknown, expectedModels: string[]) => {\n if (expectedModels.length > 0) {\n const isCorrectModel = expectedModels.some((expectedModel) => {\n if (model !== null && typeof model === \"object\" && \"type\" in model) {\n return model.type === expectedModel;\n }\n return;\n });\n if (!isCorrectModel) {\n console.warn(model, \"is not of instance\", expectedModels);\n }\n }\n};\n\n/**\n * useModularUIBasic Hook\n */\nexport const useModularUIBasic = <T>(\n key: string,\n href: string | Href,\n options: UseModularUIBasicOptions<T> = {\n expectedModels: [],\n targetModel: undefined,\n forceTargetModel: false,\n origin: undefined,\n contextPath: undefined,\n },\n): T | undefined => {\n const location = useLocation();\n const memoizedHref = useMemo(() => href.toString(), [href]);\n const useModularUIOptions = useMemo(\n () => createUseModularUIOptions(options, memoizedHref, location),\n [options, memoizedHref, location],\n );\n\n const modularUI = useModularUI(key, href, useModularUIOptions);\n const expectedModels = useMemo(\n () => options.expectedModels ?? [],\n [options.expectedModels],\n );\n\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","import { 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\nexport const useLocation = () =>\n useBEISelector((state: RootState) => state.router.location);\n\nexport const useLocationKey = () => useLocation()?.key ?? \"\";\n\nexport const useQuerystring = () => useLocation()?.search;\n\nexport const usePathname = () => useLocation()?.pathname;\n\nexport const useNavigation = () => {\n const dispatch = useBEIDispatch();\n\n return {\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};\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 {\n ApplicationModel,\n CaseSearchModel,\n CaseViewModel,\n DetailModel,\n GroupingPanelModel,\n ListDetailModel,\n ListModel,\n TabModel,\n UserProfileModel,\n} from \"@beinformed/ui/models\";\n\nimport { useModularUIBasic } from \"./useModularUIBasic\";\n\nimport type { Href } from \"@beinformed/ui/models\";\n\ninterface HookOptions {\n origin?: string;\n contextPath?: string;\n}\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 usePanel = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic<ListModel | GroupingPanelModel | DetailModel>(\n \"panel\",\n href,\n {\n expectedModels: [\"List\", \"GroupingPanel\", \"Detail\"],\n ...options,\n },\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 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 useQuicksearch = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"quicksearch\", href, {\n expectedModels: [\"CaseSearch\"],\n targetModel: CaseSearchModel,\n ...options,\n });\n\nexport const useSearch = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"search\", href, {\n expectedModels: [\"CaseSearch\"],\n targetModel: CaseSearchModel,\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 { 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 } 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 [\n Array.isArray(preferenceNames)\n ? preferenceNames.join(\",\")\n : preferenceNames,\n ],\n );\n\n return useBEISelector(selectPreference);\n};\n"],"mappings":"+mBAAA,IAAAA,EAAAC,EAAA,CAAAC,GAAAC,KAAA,kBAAIC,GAAY,KAEZC,GAAkB,UAAW,CAC/B,GAAI,CACF,IAAIC,EAAO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AMC,EAAWC,EAAe,EAC1B,CAAE,OAAAC,EAAQ,YAAAC,EAAa,QAAAC,EAAS,MAAAC,CAAM,EAAIC,EAC7CC,GAAqBA,EAAM,YAC9B,EAEA,MAAO,CACL,OAAAL,EACA,YAAAC,EACA,QAAAC,EACA,MAAAC,EACA,QAAS,IAAML,EAASQ,EAAoB,CAAC,CAC/C,CACF,EAEaC,GAAuB,IAAM,CACxC,IAAMT,EAAWC,EAAe,EAChC,MAAO,CAACG,EAAwBC,IACvBL,EACLU,EAAiB,CAAE,aAAgC,QAAAN,EAAS,MAAAC,CAAM,CAAC,CACrE,CAEJ,EC/BA,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,CACE,MAAM,QAAQA,CAAe,EACzBA,EAAgB,KAAK,GAAG,EACxBA,CACN,CACF,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","useState","HTTP_METHODS","FormModel","ListModel","ModularUIRequest","createSelector","getModularUIRequest","createSelector","getLocale","localeCode","href","options","request","ModularUIRequest","useModularUIRequest","useBEISelector","useRetrieveFormsOnModel","model","modularui","useModularUIRequest","forms","setForms","useState","requestCount","setRequestCount","responseCount","setResponseCount","useEffect","requests","getActions","action","href","HTTP_METHODS","form","FormModel","responses","actionForms","allActions","ListModel","listItem","updateActions","actions","unique","DEFAULT_AUTHENTICATION_TYPE","IllegalStateException","getContextPathServer","logoutPath","Cache","useLogin","Cache","dispatch","useBEIDispatch","application","useBEISelector","getApplication","auth","state","isAuthenticated","DEFAULT_AUTHENTICATION_TYPE","resetAuthErrors","username","password","login","authenticationType","IllegalStateException","getContextPathServer","useLogout","LOGOUT_PATH","logoutPath","BASE_PATH","origin","url","logout","useEffect","useState","ModularUIRequest","useProgressIndicator","dispatch","useBEIDispatch","useBEISelector","state","startProgress","finishProgress","resetProgress","percentComplete","updateProgress","useContentFromSourceReferences","sourceReferences","renderChildSections","content","setContent","useState","localeCode","useLocale","start","finish","useProgressIndicator","hrefs","sourceReference","href","index","self","allHrefs","useEffect","requests","modularuiRequest","ModularUIRequest","responseContent","useEffect","useRef","deepEqual","useDeepCompareMemoize","value","ref","signalRef","useDeepCompareEffect","callback","dependencies","HTTP_METHODS","FormModel","Href","getSetting","produce","useEffect","useMemo","useRef","HTTP_METHODS","Href","useLocation","useKeyForHook","modelKey","url","locale","useLocale","useMemo","useModularUI","options","HTTP_METHODS","dispatch","useBEIDispatch","href","key","modelSelector","state","model","useBEISelector","Href","location","useLocation","redirectLocation","forceLoad","prevOptions","useRef","prevHref","prevForceLoad","useDeepCompareEffect","isOldReload","doForceLoad","fetchModel","useEffect","removeModelByKey","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","IllegalArgumentException","useModal","modalId","IllegalArgumentException","dispatch","useBEIDispatch","modal","useBEISelector","state","m","show","useCallback","showModal","close","closeModal","ConceptIndexModel","ContentIndexModel","ContentTOCModel","ContentTypeModel","Href","ModelCatalogModel","createHref","filterParameters","useMemo","useLocation","useBEISelector","state","useLocationKey","useQuerystring","usePathname","useNavigation","dispatch","useBEIDispatch","location","push","replace","delta","go","goBack","goForward","createUseModularUIOptions","options","href","location","baseOptions","validateModel","model","expectedModels","expectedModel","useModularUIBasic","key","useLocation","memoizedHref","useMemo","useModularUIOptions","modularUI","useModularUI","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","ApplicationModel","CaseSearchModel","CaseViewModel","DetailModel","GroupingPanelModel","ListDetailModel","ListModel","TabModel","UserProfileModel","useApplication","options","useModularUIBasic","ApplicationModel","useTab","href","TabModel","useCaseView","CaseViewModel","usePanel","useList","ListModel","useListOrDetail","DetailModel","useListDetail","ListDetailModel","useGroupingPanel","GroupingPanelModel","useDetailPanel","useQuicksearch","CaseSearchModel","useSearch","useUserProfile","UserProfileModel","useNotification","dispatch","useBEIDispatch","render","messageType","message","error","useBEISelector","state","dismissNotification","useErrorNotification","showNotification","import_pick","useMemo","createSelector","getPreferences","state","makeSelectPreference","preferenceNames","names","createSelector","preferences","pick","usePreference","selectPreference","useMemo","useBEISelector"]}
|
package/dist/chunk-VFLYA5WJ.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b as p}from"./chunk-3OP2KQ56.js";import{e as s}from"./chunk-YG7XDCNV.js";import{b as a}from"./chunk-FW4363Y4.js";var e=a(p(),1);import{resolveModel as f}from"@beinformed/ui/models";import{ModularUIResponse as h}from"@beinformed/ui/modularui";var l=r=>{let o=h.rehydrate(r),n=f(o);if(n){let t=new n(o);if(r.childModels){let d=r.childModels.map(c=>l(c)).filter(c=>c!=null);t.addChildModels(d)}return t}},m=r=>r!=null&&typeof r=="object"&&(0,e.default)(r,"data")&&(0,e.default)(r,"contributions")&&(0,e.default)(r,"key")&&typeof r.key=="string"&&(0,e.default)(r,"locale")&&typeof r.locale=="string",u=(r,o)=>Array.isArray(o)?o.map(t=>i(t)):m(o)?l(o):r==="i18n"&&(0,e.default)(o,"locales")&&(0,e.default)(o,"locale")?{locales:s.rehydrate(o.locales),locale:o?.locale}:["preferences","router","progressindicator","modelcatalog"].includes(r)?o:o!==null&&typeof o=="object"?i(o):o,i=r=>{let o={};return Object.keys(r).forEach(n=>{let t=r[n];o[n]=u(n,t)}),o};import{JsonParseException as y}from"@beinformed/ui/exceptions";var b=()=>{let r=document.querySelector('script[type="application/json"][data-app-state="app-json"]');if(r){if(r?.textContent?.trim()==="")return{}}else throw new Error("Error loading state, json not found");let o=r.textContent||"";try{let n=JSON.parse(o);return i(n)}catch{throw new y(`Error parsing content ${o}`)}};export{i as a,b};
|
|
2
|
-
//# sourceMappingURL=chunk-VFLYA5WJ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/client/rehydrate.ts","../src/redux/dataFromServer.ts"],"sourcesContent":["import { resolveModel } from \"@beinformed/ui/models\";\nimport { ModularUIResponse } from \"@beinformed/ui/modularui\";\nimport has from \"lodash/has\";\n\nimport { Locales } from \"../i18n/Locales\";\n\nimport type { Contributions, Data } from \"@beinformed/ui/types\";\n\ninterface RehydrateData {\n key: string;\n locale: string;\n data: Data;\n contributions: Contributions;\n origin?: string;\n contextPath?: string;\n childModels?: RehydrateData[];\n}\n\n/**\n * Recreate a model from dehydrated data obtained after a server render.\n */\nconst recreateModel = (data: RehydrateData) => {\n const modelData = ModularUIResponse.rehydrate(data);\n\n const Model = resolveModel(modelData);\n\n if (Model) {\n const model = new Model(modelData);\n\n //Todo\n // model.rehydrate(data);\n\n if (data.childModels) {\n const childModels = data.childModels\n .map((childModel: RehydrateData) => recreateModel(childModel))\n .filter((d) => d != null);\n\n model.addChildModels(childModels);\n }\n\n return model;\n }\n\n return undefined;\n};\n\nconst isModularUIModelData = (data: unknown) =>\n data != null &&\n typeof data === \"object\" &&\n has(data, \"data\") &&\n has(data, \"contributions\") &&\n has(data, \"key\") &&\n typeof data.key === \"string\" &&\n has(data, \"locale\") &&\n typeof data.locale === \"string\";\n\nconst rehydratedValue = (stateKey: string, stateValue: unknown) => {\n if (Array.isArray(stateValue)) {\n return stateValue.map((stateItem) => rehydrate(stateItem));\n }\n\n if (isModularUIModelData(stateValue)) {\n return recreateModel(stateValue as RehydrateData);\n }\n\n if (\n stateKey === \"i18n\" &&\n has(stateValue, \"locales\") &&\n has(stateValue, \"locale\")\n ) {\n return {\n locales: Locales.rehydrate(stateValue.locales),\n locale: stateValue?.locale,\n };\n }\n\n const noFurtherRehydration = [\n \"preferences\",\n \"router\",\n \"progressindicator\",\n \"modelcatalog\",\n ];\n if (noFurtherRehydration.includes(stateKey)) {\n return stateValue;\n }\n\n if (stateValue !== null && typeof stateValue === \"object\") {\n return rehydrate(stateValue as Record<string, unknown>);\n }\n\n return stateValue;\n};\n\n/**\n * Maps dehydrated state to models that can be used to rehydrated the application.\n */\nexport const rehydrate = (state: Record<string, unknown>) => {\n const mappedState: Record<string, unknown> = {};\n\n Object.keys(state).forEach((stateKey) => {\n const stateValue = state[stateKey];\n mappedState[stateKey] = rehydratedValue(stateKey, stateValue);\n });\n\n return mappedState;\n};\n","import { JsonParseException } from \"@beinformed/ui/exceptions\";\n\nimport { rehydrate } from \"../client/rehydrate\";\n\nexport const getDataFromServer = () => {\n const dataElement = document.querySelector(\n 'script[type=\"application/json\"][data-app-state=\"app-json\"]',\n );\n\n if (!dataElement) {\n throw new Error(\"Error loading state, json not found\");\n } else if (dataElement?.textContent?.trim() === \"\") {\n return {};\n }\n\n const data = dataElement.textContent || \"\";\n try {\n const json = JSON.parse(data);\n return rehydrate(json);\n } catch (_error) {\n throw new JsonParseException(`Error parsing content ${data}`);\n }\n};\n"],"mappings":"wHAEA,IAAAA,EAAgB,SAFhB,OAAS,gBAAAC,MAAoB,wBAC7B,OAAS,qBAAAC,MAAyB,2BAoBlC,IAAMC,EAAiBC,GAAwB,CAC7C,IAAMC,EAAYC,EAAkB,UAAUF,CAAI,EAE5CG,EAAQC,EAAaH,CAAS,EAEpC,GAAIE,EAAO,CACT,IAAME,EAAQ,IAAIF,EAAMF,CAAS,EAKjC,GAAID,EAAK,YAAa,CACpB,IAAMM,EAAcN,E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C,GAAI,CACF,IAAME,EAAO,KAAK,MAAMD,CAAI,EAC5B,OAAOE,EAAUD,CAAI,CACvB,MAAiB,CACf,MAAM,IAAIE,EAAmB,yBAAyBH,CAAI,EAAE,CAC9D,CACF","names":["import_has","resolveModel","ModularUIResponse","recreateModel","data","modelData","ModularUIResponse","Model","resolveModel","model","childModels","childModel","d","isModularUIModelData","has","rehydratedValue","stateKey","stateValue","stateItem","rehydrate","Locales","state","mappedState","JsonParseException","getDataFromServer","dataElement","data","json","rehydrate","JsonParseException"]}
|