@beinformed/react 1.0.0-beta.0 → 1.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/{beforeRenderHooks-Gb0tcmCY.d.ts → beforeRenderHooks-B0CWdI7P.d.ts} +1 -1
  3. package/dist/{beforeRenderHooks-CNvsMmi8.d.cts → beforeRenderHooks-CKR6eECI.d.cts} +1 -1
  4. package/dist/chunk-4IDEBSD5.js +2 -0
  5. package/dist/chunk-4IDEBSD5.js.map +1 -0
  6. package/dist/chunk-6AKWSGWH.js +2 -0
  7. package/dist/chunk-6AKWSGWH.js.map +1 -0
  8. package/dist/chunk-6EK3TAMN.js +2 -0
  9. package/dist/chunk-6EK3TAMN.js.map +1 -0
  10. package/dist/{chunk-YJNJVQFW.js → chunk-7JMMW2FM.js} +2 -2
  11. package/dist/{chunk-YJNJVQFW.js.map → chunk-7JMMW2FM.js.map} +1 -1
  12. package/dist/{chunk-X2C7CKOK.js → chunk-A3D5R7MI.js} +2 -2
  13. package/dist/{chunk-X2C7CKOK.js.map → chunk-A3D5R7MI.js.map} +1 -1
  14. package/dist/{chunk-HDOILTJ2.js → chunk-BV77KA4Y.js} +2 -2
  15. package/dist/chunk-BV77KA4Y.js.map +1 -0
  16. package/dist/{chunk-K3DTH6XN.js → chunk-FBCZEJSD.js} +2 -2
  17. package/dist/chunk-FBCZEJSD.js.map +1 -0
  18. package/dist/{chunk-DI7VM62A.js → chunk-GD4NSZBN.js} +2 -2
  19. package/dist/chunk-GD4NSZBN.js.map +1 -0
  20. package/dist/chunk-HTR32BUX.js +2 -0
  21. package/dist/{chunk-6KRECIRI.js.map → chunk-HTR32BUX.js.map} +1 -1
  22. package/dist/chunk-ITSZQHGD.js +2 -0
  23. package/dist/chunk-ITSZQHGD.js.map +1 -0
  24. package/dist/chunk-JWOBKHOJ.js +2 -0
  25. package/dist/chunk-JWOBKHOJ.js.map +1 -0
  26. package/dist/chunk-KZB56W7Q.js +2 -0
  27. package/dist/chunk-KZB56W7Q.js.map +1 -0
  28. package/dist/chunk-KZLW2NHD.js +2 -0
  29. package/dist/chunk-KZLW2NHD.js.map +1 -0
  30. package/dist/{chunk-WBPDMDW4.js → chunk-L7DO7AZT.js} +2 -2
  31. package/dist/{chunk-WBPDMDW4.js.map → chunk-L7DO7AZT.js.map} +1 -1
  32. package/dist/{chunk-VG3QU524.js → chunk-OQK6SSUD.js} +3 -3
  33. package/dist/chunk-OQK6SSUD.js.map +1 -0
  34. package/dist/chunk-SPV6MD7J.js +2 -0
  35. package/dist/chunk-SPV6MD7J.js.map +1 -0
  36. package/dist/{chunk-Z2Y3OPVI.js → chunk-TAWZ2VIM.js} +2 -2
  37. package/dist/chunk-TAWZ2VIM.js.map +1 -0
  38. package/dist/{chunk-A4USB53Q.js → chunk-TDYPCNQI.js} +2 -2
  39. package/dist/{chunk-A4USB53Q.js.map → chunk-TDYPCNQI.js.map} +1 -1
  40. package/dist/chunk-VXOYOMNN.js +2 -0
  41. package/dist/chunk-VXOYOMNN.js.map +1 -0
  42. package/dist/chunk-WEJGEXAP.js +2 -0
  43. package/dist/chunk-WEJGEXAP.js.map +1 -0
  44. package/dist/client/index.cjs +5 -5
  45. package/dist/client/index.cjs.map +1 -1
  46. package/dist/client/index.d.cts +3 -3
  47. package/dist/client/index.d.ts +3 -3
  48. package/dist/client/index.js +1 -1
  49. package/dist/hooks/index.cjs +1 -1
  50. package/dist/hooks/index.cjs.map +1 -1
  51. package/dist/hooks/index.d.cts +193 -69
  52. package/dist/hooks/index.d.ts +193 -69
  53. package/dist/hooks/index.js +1 -1
  54. package/dist/i18n/index.cjs +1 -1
  55. package/dist/i18n/index.cjs.map +1 -1
  56. package/dist/i18n/index.d.cts +22 -4
  57. package/dist/i18n/index.d.ts +22 -4
  58. package/dist/i18n/index.js +1 -1
  59. package/dist/index.cjs +6 -6
  60. package/dist/index.cjs.map +1 -1
  61. package/dist/index.d.cts +9 -8
  62. package/dist/index.d.ts +9 -8
  63. package/dist/index.js +1 -1
  64. package/dist/index.js.map +1 -1
  65. package/dist/redux/index.cjs +1 -1
  66. package/dist/redux/index.cjs.map +1 -1
  67. package/dist/redux/index.d.cts +215 -28
  68. package/dist/redux/index.d.ts +215 -28
  69. package/dist/redux/index.js +1 -1
  70. package/dist/server/index.cjs +2 -2
  71. package/dist/server/index.cjs.map +1 -1
  72. package/dist/server/index.d.cts +3 -3
  73. package/dist/server/index.d.ts +3 -3
  74. package/dist/server/index.js +1 -1
  75. package/dist/{styled-components.d-CrkOxzv5.d.cts → styled-components.d-C19eFejP.d.cts} +7 -13
  76. package/dist/{styled-components.d-CrkOxzv5.d.ts → styled-components.d-C19eFejP.d.ts} +7 -13
  77. package/dist/theme/index.cjs +1 -1
  78. package/dist/theme/index.cjs.map +1 -1
  79. package/dist/theme/index.d.cts +1 -1
  80. package/dist/theme/index.d.ts +1 -1
  81. package/dist/theme/index.js +1 -1
  82. package/dist/{useForm-DW-a5mcV.d.ts → useForm-BWwXFuv5.d.cts} +3 -3
  83. package/dist/{useForm-CG_DMYfZ.d.cts → useForm-DqaU9T78.d.ts} +3 -3
  84. package/dist/utils/index.cjs +1 -1
  85. package/dist/utils/index.cjs.map +1 -1
  86. package/dist/utils/index.d.cts +6 -1
  87. package/dist/utils/index.d.ts +6 -1
  88. package/dist/utils/index.js +1 -1
  89. package/package.json +16 -16
  90. package/dist/chunk-3OP2KQ56.js +0 -2
  91. package/dist/chunk-3OP2KQ56.js.map +0 -1
  92. package/dist/chunk-4AC7YQ5Q.js +0 -2
  93. package/dist/chunk-4AC7YQ5Q.js.map +0 -1
  94. package/dist/chunk-6KRECIRI.js +0 -2
  95. package/dist/chunk-AMFWIR2R.js +0 -2
  96. package/dist/chunk-AMFWIR2R.js.map +0 -1
  97. package/dist/chunk-B7PQLTVC.js +0 -2
  98. package/dist/chunk-B7PQLTVC.js.map +0 -1
  99. package/dist/chunk-DI7VM62A.js.map +0 -1
  100. package/dist/chunk-HDOILTJ2.js.map +0 -1
  101. package/dist/chunk-JYAETKRB.js +0 -2
  102. package/dist/chunk-JYAETKRB.js.map +0 -1
  103. package/dist/chunk-K3DTH6XN.js.map +0 -1
  104. package/dist/chunk-RKGGCIUD.js +0 -2
  105. package/dist/chunk-RKGGCIUD.js.map +0 -1
  106. package/dist/chunk-UZIZDEU6.js +0 -2
  107. package/dist/chunk-UZIZDEU6.js.map +0 -1
  108. package/dist/chunk-VFLYA5WJ.js +0 -2
  109. package/dist/chunk-VFLYA5WJ.js.map +0 -1
  110. package/dist/chunk-VG3QU524.js.map +0 -1
  111. package/dist/chunk-X3N2NQVZ.js +0 -2
  112. package/dist/chunk-X3N2NQVZ.js.map +0 -1
  113. package/dist/chunk-Y7ESITVO.js +0 -2
  114. package/dist/chunk-Y7ESITVO.js.map +0 -1
  115. package/dist/chunk-YG7XDCNV.js +0 -2
  116. package/dist/chunk-YG7XDCNV.js.map +0 -1
  117. package/dist/chunk-Z2Y3OPVI.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayPush.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isFlattenable.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFlatten.js"],"sourcesContent":["/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","var Symbol = require('./_Symbol'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray');\n\n/** Built-in value references. */\nvar spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\nmodule.exports = isFlattenable;\n","var arrayPush = require('./_arrayPush'),\n isFlattenable = require('./_isFlattenable');\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\n\nmodule.exports = baseFlatten;\n"],"mappings":"+HAAA,IAAAA,EAAAC,EAAA,CAAAC,EAAAC,IAAA,cAQA,SAASC,EAAUC,EAAOC,EAAQ,CAKhC,QAJIC,EAAQ,GACRC,EAASF,EAAO,OAChBG,EAASJ,EAAM,OAEZ,EAAEE,EAAQC,GACfH,EAAMI,EAASF,CAAK,EAAID,EAAOC,CAAK,EAEtC,OAAOF,CACT,CAEAF,EAAO,QAAUC,ICnBjB,IAAAM,EAAAC,EAAA,CAAAC,EAAAC,IAAA,kBAAIC,EAAS,IACTC,EAAc,IACdC,EAAU,IAGVC,EAAmBH,EAASA,EAAO,mBAAqB,OAS5D,SAASI,EAAcC,EAAO,CAC5B,OAAOH,EAAQG,CAAK,GAAKJ,EAAYI,CAAK,GACxC,CAAC,EAAEF,GAAoBE,GAASA,EAAMF,CAAgB,EAC1D,CAEAJ,EAAO,QAAUK,ICnBjB,IAAAE,EAAAC,EAAA,CAAAC,EAAAC,IAAA,kBAAIC,EAAY,IACZC,EAAgB,IAapB,SAASC,EAAYC,EAAOC,EAAOC,EAAWC,EAAUC,EAAQ,CAC9D,IAAIC,EAAQ,GACRC,EAASN,EAAM,OAKnB,IAHAE,IAAcA,EAAYJ,GAC1BM,IAAWA,EAAS,CAAC,GAEd,EAAEC,EAAQC,GAAQ,CACvB,IAAIC,EAAQP,EAAMK,CAAK,EACnBJ,EAAQ,GAAKC,EAAUK,CAAK,EAC1BN,EAAQ,EAEVF,EAAYQ,EAAON,EAAQ,EAAGC,EAAWC,EAAUC,CAAM,EAEzDP,EAAUO,EAAQG,CAAK,EAEfJ,IACVC,EAAOA,EAAO,MAAM,EAAIG,EAE5B,CACA,OAAOH,CACT,CAEAR,EAAO,QAAUG","names":["require_arrayPush","__commonJSMin","exports","module","arrayPush","array","values","index","length","offset","require_isFlattenable","__commonJSMin","exports","module","Symbol","isArguments","isArray","spreadableSymbol","isFlattenable","value","require_baseFlatten","__commonJSMin","exports","module","arrayPush","isFlattenable","baseFlatten","array","depth","predicate","isStrict","result","index","length","value"]}
1
+ {"version":3,"sources":["../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_arrayPush.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_isFlattenable.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseFlatten.js"],"sourcesContent":["/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","var Symbol = require('./_Symbol'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray');\n\n/** Built-in value references. */\nvar spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\nmodule.exports = isFlattenable;\n","var arrayPush = require('./_arrayPush'),\n isFlattenable = require('./_isFlattenable');\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\n\nmodule.exports = baseFlatten;\n"],"mappings":"+HAAA,IAAAA,EAAAC,EAAA,CAAAC,EAAAC,IAAA,cAQA,SAASC,EAAUC,EAAOC,EAAQ,CAKhC,QAJIC,EAAQ,GACRC,EAASF,EAAO,OAChBG,EAASJ,EAAM,OAEZ,EAAEE,EAAQC,GACfH,EAAMI,EAASF,CAAK,EAAID,EAAOC,CAAK,EAEtC,OAAOF,CACT,CAEAF,EAAO,QAAUC,ICnBjB,IAAAM,EAAAC,EAAA,CAAAC,EAAAC,IAAA,kBAAIC,EAAS,IACTC,EAAc,IACdC,EAAU,IAGVC,EAAmBH,EAASA,EAAO,mBAAqB,OAS5D,SAASI,EAAcC,EAAO,CAC5B,OAAOH,EAAQG,CAAK,GAAKJ,EAAYI,CAAK,GACxC,CAAC,EAAEF,GAAoBE,GAASA,EAAMF,CAAgB,EAC1D,CAEAJ,EAAO,QAAUK,ICnBjB,IAAAE,EAAAC,EAAA,CAAAC,EAAAC,IAAA,kBAAIC,EAAY,IACZC,EAAgB,IAapB,SAASC,EAAYC,EAAOC,EAAOC,EAAWC,EAAUC,EAAQ,CAC9D,IAAIC,EAAQ,GACRC,EAASN,EAAM,OAKnB,IAHAE,IAAcA,EAAYJ,GAC1BM,IAAWA,EAAS,CAAC,GAEd,EAAEC,EAAQC,GAAQ,CACvB,IAAIC,EAAQP,EAAMK,CAAK,EACnBJ,EAAQ,GAAKC,EAAUK,CAAK,EAC1BN,EAAQ,EAEVF,EAAYQ,EAAON,EAAQ,EAAGC,EAAWC,EAAUC,CAAM,EAEzDP,EAAUO,EAAQG,CAAK,EAEfJ,IACVC,EAAOA,EAAO,MAAM,EAAIG,EAE5B,CACA,OAAOH,CACT,CAEAR,EAAO,QAAUG","names":["require_arrayPush","__commonJSMin","exports","module","arrayPush","array","values","index","length","offset","require_isFlattenable","__commonJSMin","exports","module","Symbol","isArguments","isArray","spreadableSymbol","isFlattenable","value","require_baseFlatten","__commonJSMin","exports","module","arrayPush","isFlattenable","baseFlatten","array","depth","predicate","isStrict","result","index","length","value"]}
@@ -0,0 +1,2 @@
1
+ import{c as k}from"./chunk-JWOBKHOJ.js";import{c as Oe,d as Se,j as Ue,k as Ce,l as Te,m as be,n as Re,o as He,p as ve,q as N}from"./chunk-TAWZ2VIM.js";import{$ as C,B as ce,C as ue,K as v,M as de,N as me,O as fe,P as Me,Q as ge,R as he,S as ye,T as xe,U as Ie,d as W,g as Bt,h as Ft,i as j,k as Y,l as X,m as Z,n as ee,p as te,q as oe,s as re,u as ne,v as se,w as ie,x as ae,y as le}from"./chunk-ITSZQHGD.js";import{j as pe}from"./chunk-KZB56W7Q.js";import{a as wt}from"./chunk-7JMMW2FM.js";import{a as qt}from"./chunk-TDYPCNQI.js";import{d as J,f as Dt}from"./chunk-L7DO7AZT.js";import{d as Et,e as At,f as Lt,h as M,i as u}from"./chunk-HTR32BUX.js";import{a as h,b as Pt}from"./chunk-FW4363Y4.js";var V=h((na,Ke)=>{"use strict";var er=At(),tr=(function(){try{var e=er(Object,"defineProperty");return e({},"",{}),e}catch{}})();Ke.exports=tr});var ze=h((sa,Qe)=>{"use strict";var Ge=V();function or(e,t,o){t=="__proto__"&&Ge?Ge(e,t,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[t]=o}Qe.exports=or});var We=h((ia,Ve)=>{"use strict";var rr=ze(),nr=Lt(),sr=Object.prototype,ir=sr.hasOwnProperty;function ar(e,t,o){var r=e[t];(!(ir.call(e,t)&&nr(r,o))||o===void 0&&!(t in e))&&rr(e,t,o)}Ve.exports=ar});var Ye=h((aa,je)=>{"use strict";var lr=We(),cr=J(),ur=Bt(),Je=Et(),pr=Dt();function dr(e,t,o,r){if(!Je(e))return e;t=cr(t,e);for(var n=-1,s=t.length,i=s-1,a=e;a!=null&&++n<s;){var l=pr(t[n]),d=o;if(l==="__proto__"||l==="constructor"||l==="prototype")return e;if(n!=i){var m=a[l];d=r?r(m,l,a):void 0,d===void 0&&(d=Je(m)?m:ur(t[n+1])?[]:{})}lr(a,l,d),a=a[l]}return e}je.exports=dr});var Ze=h((la,Xe)=>{"use strict";var mr=wt(),fr=Ye(),Mr=J();function gr(e,t,o){for(var r=-1,n=t.length,s={};++r<n;){var i=t[r],a=mr(e,i);o(a,i)&&fr(s,Mr(i,e),a)}return s}Xe.exports=gr});var tt=h((ca,et)=>{"use strict";function hr(e,t){return e!=null&&t in Object(e)}et.exports=hr});var rt=h((ua,ot)=>{"use strict";var yr=tt(),xr=Ft();function Ir(e,t){return e!=null&&xr(e,t,yr)}ot.exports=Ir});var st=h((pa,nt)=>{"use strict";var Or=Ze(),Sr=rt();function Ur(e,t){return Or(e,t,function(o,r){return Sr(e,r)})}nt.exports=Ur});var at=h((da,it)=>{"use strict";var Cr=qt();function Tr(e){var t=e==null?0:e.length;return t?Cr(e,1):[]}it.exports=Tr});var ct=h((ma,lt)=>{"use strict";function br(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)}lt.exports=br});var dt=h((fa,pt)=>{"use strict";var Rr=ct(),ut=Math.max;function Hr(e,t,o){return t=ut(t===void 0?e.length-1:t,0),function(){for(var r=arguments,n=-1,s=ut(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),Rr(e,this,a)}}pt.exports=Hr});var ft=h((Ma,mt)=>{"use strict";function vr(e){return function(){return e}}mt.exports=vr});var gt=h((ga,Mt)=>{"use strict";function kr(e){return e}Mt.exports=kr});var xt=h((ha,yt)=>{"use strict";var Pr=ft(),ht=V(),Er=gt(),Ar=ht?function(e,t){return ht(e,"toString",{configurable:!0,enumerable:!1,value:Pr(t),writable:!0})}:Er;yt.exports=Ar});var Ot=h((ya,It)=>{"use strict";var Lr=800,Br=16,Dr=Date.now;function Fr(e){var t=0,o=0;return function(){var r=Dr(),n=Br-(r-o);if(o=r,n>0){if(++t>=Lr)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}It.exports=Fr});var Ut=h((xa,St)=>{"use strict";var qr=xt(),wr=Ot(),Nr=wr(qr);St.exports=Nr});var Tt=h((Ia,Ct)=>{"use strict";var _r=at(),$r=dt(),Kr=Ut();function Gr(e){return Kr($r(e,void 0,_r),e+"")}Ct.exports=Gr});var Rt=h((Oa,bt)=>{"use strict";var Qr=st(),zr=Tt(),Vr=zr(function(e,t){return e==null?{}:Qr(e,t)});bt.exports=Vr});import{useEffect as Kt,useMemo as Gt,useState as ke}from"react";import{HTTP_METHODS as Qt}from"@beinformed/ui/constants";import{FormModel as zt,ListModel as Vt}from"@beinformed/ui/models";import{createSelector as Nt}from"reselect";import{ModularUIRequest as _t}from"@beinformed/ui/modularui";var $t=Nt([pe],e=>(t,o)=>{let r=new _t(t,o);return r.locale=e,r}),P=()=>u($t);var ln=e=>{let t=P(),[o,r]=ke(null),[n,s]=ke(0),i=Gt(()=>Wt(e),[e]),a=i.length;return Kt(()=>{let l=i.map(d=>{let m=d.selfhref.addParameter("commit","false");return t(m,{method:Qt.POST}).fetch().then(g=>(g instanceof zt&&(g.tokens=[]),{[d.name]:g}))});Promise.all(l).then(d=>{let m=Object.assign({},...d);r(m),s(d.length)})},[i,t]),n===a?o:null},Wt=e=>{if(!e.actionCollection)return[];let o=[...e.actionCollection.getActionsByType("create").filter(s=>!s.isDisabled)];e instanceof Vt&&e.listItemCollection.forEach(s=>{let i=s.actionCollection.getActionsByType("update").filter(a=>!a.isDisabled);o.push(...i)});let r=[],n=[];return o.forEach(s=>{n.includes(s.name)||(n.push(s.name),r.push(s))}),r};import{INTERNAL_LOGIN_TYPE as go}from"@beinformed/ui/constants";import{IllegalStateException as ho}from"@beinformed/ui/exceptions";import{Authenticate as yo}from"@beinformed/ui/modularui";import{getContextPath as xo,getContextPathServer as Io}from"@beinformed/ui/settings";import{Cache as T}from"@beinformed/ui/utils";import{ApplicationModel as co,CaseViewModel as uo,DetailModel as po,GroupingPanelModel as mo,TabModel as fo,UserProfileModel as Mo}from"@beinformed/ui/models";import{useMemo as L}from"react";import{HTTP_METHODS as Be}from"@beinformed/ui/constants";import{useMemo as Jt}from"react";var I=()=>u(e=>e.router.location),mn=()=>I()?.key??"",fn=()=>I()?.search,Mn=()=>I()?.pathname,Pe=()=>{let e=M();return Jt(()=>({push:(t,o)=>e(ne(t,o)),replace:(t,o)=>e(se(t,o)),go:t=>e(ie(t)),goBack:()=>e(ae()),goForward:()=>e(le())}),[e])};import{useEffect as Ae,useMemo as _,useRef as ro}from"react";import{useLocation as no}from"react-router";import{HTTP_METHODS as so}from"@beinformed/ui/constants";import{Href as $}from"@beinformed/ui/models";import{useEffect as jt,useRef as Yt}from"react";import{dequal as Xt}from"dequal/lite";import{IS_DEV as Zt}from"@beinformed/ui/utils";function eo(e){Zt&&(!e||e.length===0)&&console.warn("useDeepCompareEffect should not be used with no dependencies. Use React.useEffect instead.")}function to(e){let t=Yt(e);return Xt(e,t.current)||(t.current=e),t.current}function Ee(e,t){eo(t),jt(e,to(t))}import{useMemo as oo}from"react";var E=(e,t)=>{let o=k();return oo(()=>`${e}(${t.split("?")[0]})(${o})`,[e,t,o])};var A=(e,t,o={})=>{let r=M(),n=_(()=>new $(t),[t]),s=_(()=>n.toString(),[n]),i=n.querystring,a=ro(i),l=E(e,s),d=u(p=>p.modularui[l]),m=_(()=>{let p={method:so.GET,removeOnUnmount:!0,...o};return t instanceof $&&(p.origin=p.origin??t.origin,p.contextPath=p.contextPath??t.contextPath),p},[o,t]),x=no().state?.redirectLocation,S=a.current!==i,c=d==null||d.status==="ERROR"||S||(x instanceof $?x.equals(s):!1)||m.isReload===!0;return Ae(()=>{a.current=i},[i]),Ee(()=>{s!==""&&c&&r(C({key:l,href:s,options:m}))},[l,s,m,c]),Ae(()=>{if(m.removeOnUnmount)return()=>{r(v(l))}},[r,l,m.removeOnUnmount]),d};var io=(e,t)=>{let o={expectedModels:[],method:Be.GET,data:void 0,...e,isReload:t||e.isReload};return e.formdata!=null&&(o.method=Be.POST,o.data=e.formdata),o},ao=(e,t)=>{t.length>0&&e!==null&&typeof e=="object"&&"type"in e&&typeof e.type=="string"&&(t.includes(e.type)||console.warn(e,"is not of instance",t))},f=(e,t,o={})=>{let r=L(()=>t.toString(),[t]),n=o.key??e,s=lo(n,r),i=L(()=>io(o,s),[o,s]),a=A(n,t,i),l=L(()=>o.expectedModels??[],[o.expectedModels]);return L(()=>{if(a?.model)return ao(a.model,l),a.model},[l,a])},lo=(e,t)=>{let o=I(),r=E(e,t),n=u(s=>s.modularui[r]);if(n){let s=o?.state?.reload||0;if(s>0){let i=n?.status==="FINISHED",a=n?.lastModification??0;if(i&&a<s)return!0}}return!1};var K=e=>f("application","/",{expectedModels:["Application"],targetModel:co,...e}),Qn=(e,t)=>f("tab",e,{expectedModels:["Tab"],targetModel:fo,...t}),zn=(e,t)=>f("caseview",e,{expectedModels:["CaseView"],targetModel:uo,...t}),Vn=(e,t)=>f("groupingpanel",e,{expectedModels:["GroupingPanel"],targetModel:mo,...t}),Wn=(e,t)=>f("detailpanel",e,{expectedModels:["Detail"],targetModel:po,...t}),Jn=(e,t)=>f("userprofile",e,{expectedModels:["UserProfile"],targetModel:Mo,...t});var as=()=>{T.setItem("isRedirectLogin",!1);let e=M(),t=K(),o=u(s=>s.auth),r=t?.isLoggedIn??!1,n=T.getItem("primaryAuthenticationType");return{isAuthenticated:r,primaryAuthenticationType:n??t?.authenticationTypes[0],authenticationTypes:t?.authenticationTypes??[],errorMessage:o.error,resetErrors:()=>e(W()),login:(s,i)=>e(Oe({username:s,password:i})),redirectLogin:s=>{if(T.getItem("isRedirectLogin"))throw new ho(`Could not redirect to '${s.authentication}' using url: '${s.redirectUri??""}'`);r||(T.setItem("isRedirectLogin",!0),window.location.assign(`${Io()}${s.redirectUri??""}`))}}},ls=()=>{let e=M(),t=K(),o=xo(),r=new yo,n=T.getItem("primaryAuthenticationType");return{isAuthenticated:t?.isLoggedIn??!1,primaryAuthenticationType:n??t?.authenticationTypes[0],authenticationTypes:t?.authenticationTypes??[],logout:()=>{if(r.authenticationType===go.PAC4J_INDIRECT)r.redirectToLogout();else if(T.getItem("isRedirectLogin")){let a=window.location.origin,l=`${a}${o}/logout?url=${a}${o}`;T.setItem("isRedirectLogin",!1),window.location.assign(l)}else return e(Se())},logoutUrl:r.getLogoutUrl()}};import{useEffect as Oo,useState as So}from"react";import{ModularUIRequest as Uo}from"@beinformed/ui/modularui";import{useCallback as B}from"react";var D=()=>{let e=M(),t=B(()=>{e(Y())},[e]),o=B(()=>{e(X())},[e]),r=B(()=>{e(Z())},[e]),n=B(s=>{e(ee(s))},[e]);return{start:t,finish:o,reset:r,update:n}},ms=()=>u(e=>e.progressindicator);var xs=(e,t)=>{let[o,r]=So([]),n=k(),{start:s,finish:i}=D(),a=e.map(d=>d.link?.selfhref.href).filter((d,m,g)=>g.indexOf(d)===m).map(d=>d?.toString()),l=JSON.stringify(a);return Oo(()=>{let d=JSON.parse(l).map(m=>{let g=new Uo(m);return g.locale=n,g.fetchContent(t)});s(),Promise.all(d).then(m=>{r(m),i()})},[l,n,t,s,i]),o};import{produce as Co}from"immer";import{HTTP_METHODS as De}from"@beinformed/ui/constants";import{FormModel as F,Href as To}from"@beinformed/ui/models";import{getSetting as bo}from"@beinformed/ui/settings";var As=(e,t)=>{let o=new To(e);bo("ALWAYS_COMMIT_FORM")||o.addParameter("commit","false");let r=A("form",o,{method:De.POST,targetModel:F,removeOnUnmount:!0,data:t?JSON.stringify(t):void 0,origin:o.origin,contextPath:o.contextPath});if(r?.model instanceof F)return r.model},Ls=()=>{let e=M();return{previous:i=>e(Ce(i)),cancel:i=>e(Te(i)),submit:i=>e(C({key:i.connectKey||i.key,href:i.selfhref,options:{method:De.POST,data:i.formdata,updateHandler:a=>a instanceof F?Co(a,l=>{l.update(a)}):a,targetModel:F}})),remove:i=>e(v(i.connectKey||"")),showFormNotification:i=>e(re(i))}},Bs=(e,t)=>{let o=M();return(r,n,s)=>o(Ue({form:e,formObject:t,attribute:r,inputvalue:n,options:s}))},Ds=e=>{let t=M();return{save:()=>t(be(e)),cancel:o=>t(Re(e,o)),remove:o=>t(He(e,o))}};import{useCallback as U,useMemo as Ro}from"react";import{HTTP_METHODS as G}from"@beinformed/ui/constants";import{AssignmentFilterModel as Ho,CaseSearchModel as Fe,DetailModel as vo,FilterModel as ko,ListDetailModel as Po,ListModel as q}from"@beinformed/ui/models";var Qs=(e,t)=>f("list",e,{expectedModels:["List"],targetModel:q,...t}),zs=(e,t)=>f("list",e,{expectedModels:["List","Detail"],targetModel:[q,vo],...t}),Vs=(e,t)=>f("listdetail",e,{expectedModels:["ListDetail"],targetModel:Po,forceTargetModel:!0,...t}),Ws=({syncLocation:e=!0,historyAction:t="push"}={})=>{let{push:o,replace:r}=Pe(),n=M(),s=t==="push"?o:r,i=U((c,p=!1)=>{let y=c.selfhref;p&&(y.page=void 0),c.requestMethod===G.POST?(e&&s({pathname:y.path,search:y.getQuerystring(!0),state:{formdata:c.formdata}}),n(C({key:c.connectKey||c.key,href:y,options:{method:G.POST,data:c.formdata,targetModel:[q,Fe]}}))):(e&&s({pathname:y.path,search:y.getQuerystring(!0)}),n(C({key:c.connectKey||c.key,href:y,options:{method:G.GET,targetModel:[q,Fe]}})))},[n,s,e]),a=U((c,p)=>{c.filterCollection=p,i(c,!0)},[i]),l=U((c,p,y,O)=>{if(p instanceof Ho&&!O)throw new TypeError("AssignmentFilterModel needs the attribute argument to be able to update the filter");let H=null,w=O;if(O?H=c.filterCollection.getFilterByAttributeKey(O.key):p instanceof ko&&(H=c.filterCollection.getFilterByName(p.name),w=p.attribute),H&&w)H.update(w,y);else{let kt=O?`key: ${O.key}`:`name: ${p.name}`;console.error(`Can't find a filter to update by ${kt} on list: ${c.selfhref.toString()}`)}i(c,!0)},[i]),d=U(c=>{c.filterCollection.reset(),i(c,!0)},[i]),m=U((c,p)=>{p.name&&c.filterCollection.getFilterByName(p.name)?.reset(),i(c,!0)},[i]),g=U((c,p)=>{c.sorting.value=p,i(c,!0)},[i]),x=U((c,p)=>{c.paging.page=p,i(c)},[i]),S=U((c,p)=>{c.paging.pagesize.value=p,i(c,!0)},[i]);return Ro(()=>({update:i,updateFilters:a,updateFilter:l,updateSort:g,updatePage:x,updatePageSize:S,resetFilters:d,removeFilter:m}),[m,d,i,l,a,x,S,g])};import{useEffect as Eo,useState as qe}from"react";import{HTTP_METHODS as Ao}from"@beinformed/ui/constants";import{Href as Lo,LookupOptionsModel as Bo}from"@beinformed/ui/models";var ti=(e,t="",o=1,r=300)=>{let{start:n,finish:s}=D(),i=P(),[a,l]=qe(null),[d,m]=qe(!1),{href:g,filterName:x,method:S}=e;return(t.length<o||!x)&&a!==null&&l(null),Eo(()=>{if(t.length<o||!x)return;let c=setTimeout(async()=>{m(!0),n();let p=new Lo(g),y={method:S,data:void 0};S===Ao.POST?y.data={[x]:t}:p.addParameter(x,t),i(p,y).fetch().then(O=>{O instanceof Bo&&l(O)}).finally(()=>{s(),m(!1)})},r);return()=>{clearTimeout(c)}},[r,t,x,s,g,S,o,i,n]),{lookupOptions:a,lookupLoading:d}};import{useCallback as we}from"react";import{IllegalArgumentException as Do}from"@beinformed/ui/exceptions";var ai=e=>{if(!e)throw new Do("Missing modalId argument for useModal hook");let t=M(),o=u(s=>s.modals.modals.find(i=>i.key===e)),r=we(()=>{t(ce(e))},[t,e]),n=we(()=>{t(ue(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 Ne,ContentIndexModel as Fo,ContentTOCModel as qo,ContentTypeModel as wo,Href as No,ModelCatalogModel as _o}from"@beinformed/ui/models";import{createHref as R,filterParameters as Q}from"@beinformed/ui/utils";var gi=e=>f("modelcatalog","/modelcatalog",{expectedModels:["ModelCatalog"],targetModel:_o,...e}),$o=(e,t="conceptindex",o)=>{let{entryDate:r}=b(),n=Q(e,["index","label","modelcategory","type"]);return n.setParameter("entryDate",r),f(t,n,{expectedModels:["ConceptIndex"],targetModel:Ne,...o})},hi=(e,t="conceptdetail",o)=>{let{entryDate:r}=b(),n=I(),s=R("concepts",e,r,n,[]);return f(t,s,{expectedModels:["ConceptDetail","BusinessScenario"],...o})},Ko=(e,t="contentindex",o)=>{let r=Q(e,["index","label","type"]);return f(t,r,{expectedModels:["ContentIndex"],targetModel:Fo,...o})},yi=(e,t="contenttoc",o)=>{let{entryDate:r}=b(),n=I(),s=R("content",e,r,n,["complete"]);return f(t,s,{expectedModels:["ContentTOC"],targetModel:qo,...o})},xi=(e,t="content",o)=>{let{entryDate:r}=b(),n=I(),s=R("content",e,r,n,["complete"]);return f(t,s,{expectedModels:["Content","ContentTOC"],...o})},Ii=(e,t="content",o)=>{let{entryDate:r}=b(),n=I(),s=new No(e);s.removeParameter("complete"),s.addParameter("complete","true");let i=R("content",s,r,n,["complete"]);return f(t,i,{expectedModels:["Content","ContentTOC"],...o})},Oi=(e,t="contenttypes",o)=>{let r=R("contenttypes",e,void 0,void 0,[]);return f(t,r,{expectedModels:["ContentType"],targetModel:wo,...o})},Si=(e,t="relatedconcepts",o)=>{let{entryDate:r}=b(),n=Q(e,["modelcategory"]);return n.setParameter("entryDate",r),f(t,n,{expectedModels:["ConceptIndex"],targetModel:Ne,...o})},_e=(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},Ui=(e,t,o)=>{let r=_e("/concepts",e);return $o(r,t,o)},Ci=(e,t,o)=>{let r=_e("/content",e);return Ko(r,t,o)},b=()=>{let e=M();return{entryDate:u(ve),setEntryDate:o=>e(j(o))}};import{ApplicationModel as Go}from"@beinformed/ui/models";var ki=e=>u(t=>de(t,e)),Pi=e=>u(t=>me(t,e)),Ei=e=>u(t=>fe(t,e)),Ai=e=>u(t=>Me(t,e)),Li=e=>u(t=>ge(t,e)),Bi=e=>u(t=>he(t,e)),Di=()=>u(ye),Fi=()=>u(xe),qi=()=>{let e=u(Ie);return e instanceof Go?e:null};import{createSelector as Qo}from"reselect";var Gi=()=>{let e=M(),o=Qo([n=>n.modularui],n=>{let s=[],i=Object.keys(n);for(let a of i){let l=n[a];l?.status==="FINISHED"&&s.push(l.model)}return s}),r=u(o);return{reload:(n,s)=>{e(N(n,s))},reloadWithFilter:(n,s)=>{let i=r.filter(n);for(let a of i)a&&e(N(a,s))}}};var Ji=()=>{let e=M(),{render:t,messageType:o,message:r,error:n}=u(s=>s.notification);return{render:t,messageType:o,message:r,error:n,dismiss:()=>{e(oe())}}},ji=()=>{let e=M();return(t,o)=>e(te({type:"ERROR",message:t,error:o}))};import{useMemo as zo,useState as $e}from"react";import{useLocation as Vo,useRouteMatch as Wo}from"react-router";import{CaseSearchModel as Jo,DetailModel as jo,GroupingPanelModel as Yo,Href as z,ListModel as Xo}from"@beinformed/ui/models";var Zo=(e,t=!1)=>{let[o,r]=$e(null),[n,s]=$e(!1),i=Wo(),a=Vo(),l=zo(()=>{if(e==null&&o==null)return new z("");let g=e instanceof z?e:new z(e);return t&&i.isExact&&g.addParametersFromString(a.search),g},[e,o,t,i.isExact,a.search]),m=!l.equalsWithParameters(o)&&(i.isExact||n===i.isExact||!o?.startsWith(i.url));return m&&(r(l),s(i.isExact)),m?l:o||l},oa=(e,t)=>{let{fromRoute:o,...r}=t||{fromRoute:!1},n=Zo(e,o||!1);return f("panel",n,{expectedModels:["List","GroupingPanel","Detail","CaseSearch"],targetModel:[Xo,Yo,jo,Jo],...r})};var Ht=Pt(Rt(),1);import{useMemo as Wr}from"react";import{createSelector as Jr}from"reselect";var jr=e=>e.preferences,Yr=e=>{let t=Array.isArray(e)?e:[e];return Jr([jr],o=>(0,Ht.default)(o,t))},Ta=e=>{let t=Wr(()=>Yr(e),[e]);return u(t)};import{CaseSearchModel as vt}from"@beinformed/ui/models";var va=(e,t)=>f("quicksearch",e,{expectedModels:["CaseSearch"],targetModel:vt,...t}),ka=(e,t)=>f("search",e,{expectedModels:["CaseSearch"],targetModel:vt,...t});export{P as a,ln as b,I as c,mn as d,fn as e,Mn as f,Pe as g,Ee as h,E as i,A as j,f as k,lo as l,K as m,Qn as n,zn as o,Vn as p,Wn as q,Jn as r,as as s,ls as t,D as u,ms as v,xs as w,As as x,Ls as y,Bs as z,Ds as A,Qs as B,zs as C,Vs as D,Ws as E,ti as F,ai as G,gi as H,$o as I,hi as J,Ko as K,yi as L,xi as M,Ii as N,Oi as O,Si as P,Ui as Q,Ci as R,b as S,ki as T,Pi as U,Ei as V,Ai as W,Li as X,Bi as Y,Di as Z,Fi as _,qi as $,Gi as aa,Ji as ba,ji as ca,oa as da,Ta as ea,va as fa,ka as ga};
2
+ //# sourceMappingURL=chunk-VXOYOMNN.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_defineProperty.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseAssignValue.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_assignValue.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseSet.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_basePickBy.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseHasIn.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/hasIn.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_basePick.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/flatten.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_apply.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_overRest.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/constant.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/identity.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseSetToString.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_shortOut.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_setToString.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_flatRest.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/pick.js","../src/hooks/useAllFormsOnModel.ts","../src/hooks/useModularUIRequest.ts","../src/hooks/useAuthentication.ts","../src/hooks/useModularUIModel.ts","../src/hooks/useModularUIBasic.ts","../src/hooks/useRouter.ts","../src/hooks/useModularUI.ts","../src/hooks/useDeepCompareEffect.ts","../src/hooks/useModularUIKey.ts","../src/hooks/useContent.ts","../src/hooks/useProgressIndicator.ts","../src/hooks/useForm.ts","../src/hooks/useList.ts","../src/hooks/useLookup.ts","../src/hooks/useModal.ts","../src/hooks/useModelCatalog.ts","../src/hooks/useModelSelectors.ts","../src/hooks/useModels.ts","../src/hooks/useNotification.ts","../src/hooks/usePanel.ts","../src/hooks/usePreference.ts","../src/hooks/useSearch.ts"],"sourcesContent":["var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var assignValue = require('./_assignValue'),\n castPath = require('./_castPath'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\nfunction baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return object;\n }\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n}\n\nmodule.exports = baseSet;\n","var baseGet = require('./_baseGet'),\n baseSet = require('./_baseSet'),\n castPath = require('./_castPath');\n\n/**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\nfunction basePickBy(object, paths, predicate) {\n var index = -1,\n length = paths.length,\n result = {};\n\n while (++index < length) {\n var path = paths[index],\n value = baseGet(object, path);\n\n if (predicate(value, path)) {\n baseSet(result, castPath(path, object), value);\n }\n }\n return result;\n}\n\nmodule.exports = basePickBy;\n","/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\nmodule.exports = baseHasIn;\n","var baseHasIn = require('./_baseHasIn'),\n hasPath = require('./_hasPath');\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\nmodule.exports = hasIn;\n","var basePickBy = require('./_basePickBy'),\n hasIn = require('./hasIn');\n\n/**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @returns {Object} Returns the new object.\n */\nfunction basePick(object, paths) {\n return basePickBy(object, paths, function(value, path) {\n return hasIn(object, path);\n });\n}\n\nmodule.exports = basePick;\n","var baseFlatten = require('./_baseFlatten');\n\n/**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\nfunction flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n}\n\nmodule.exports = flatten;\n","/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nmodule.exports = apply;\n","var apply = require('./_apply');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nmodule.exports = overRest;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","var constant = require('./constant'),\n defineProperty = require('./_defineProperty'),\n identity = require('./identity');\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nmodule.exports = baseSetToString;\n","/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nmodule.exports = shortOut;\n","var baseSetToString = require('./_baseSetToString'),\n shortOut = require('./_shortOut');\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nmodule.exports = setToString;\n","var flatten = require('./flatten'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\nfunction flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n}\n\nmodule.exports = flatRest;\n","var basePick = require('./_basePick'),\n flatRest = require('./_flatRest');\n\n/**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\nvar pick = flatRest(function(object, paths) {\n return object == null ? {} : basePick(object, paths);\n});\n\nmodule.exports = pick;\n","import { useEffect, useMemo, useState } from \"react\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport { FormModel, ListModel } from \"@beinformed/ui/models\";\n\nimport { useModularUIRequest } from \"./useModularUIRequest\";\n\nimport type { ActionModel, DetailModel, TabModel } from \"@beinformed/ui/models\";\n\nexport const useRetrieveFormsOnModel = (\n model: ListModel | DetailModel | TabModel,\n) => {\n const modularui = useModularUIRequest();\n\n const [forms, setForms] = useState(null);\n const [responseCount, setResponseCount] = useState(0);\n\n const actions = useMemo(() => getActions(model), [model]);\n const requestCount = actions.length;\n\n useEffect(() => {\n const requests = actions.map((action) => {\n const href = action.selfhref.addParameter(\"commit\", \"false\");\n\n return modularui(href, { method: HTTP_METHODS.POST })\n .fetch()\n .then((form) => {\n if (form instanceof FormModel) {\n form.tokens = [];\n }\n return { [action.name]: form };\n });\n });\n\n Promise.all(requests).then((responses) => {\n // put response array in object\n const actionForms = Object.assign({}, ...responses);\n setForms(actionForms);\n setResponseCount(responses.length);\n });\n }, [actions, modularui]);\n\n if (responseCount === requestCount) {\n return forms;\n }\n\n return null;\n};\n\nconst getActions = (model: ListModel | DetailModel | TabModel) => {\n if (!model.actionCollection) {\n return [];\n }\n\n const createActions = model.actionCollection\n .getActionsByType(\"create\")\n .filter((action) => !action.isDisabled);\n\n const allActions = [...createActions];\n\n if (model instanceof ListModel) {\n model.listItemCollection.forEach((listItem) => {\n const updateActions = listItem.actionCollection\n .getActionsByType(\"update\")\n .filter((action) => !action.isDisabled);\n\n allActions.push(...updateActions);\n });\n }\n\n const actions: ActionModel[] = [];\n const unique: string[] = [];\n allActions.forEach((action) => {\n if (!unique.includes(action.name)) {\n unique.push(action.name);\n actions.push(action);\n }\n });\n\n return actions;\n};\n","import { createSelector } from \"reselect\";\n\nimport { ModularUIRequest } from \"@beinformed/ui/modularui\";\n\nimport { useBEISelector } from \"../redux/hooks\";\nimport { getLocale } from \"../redux/i18n/i18nSelectors\";\n\nimport type { Href } from \"@beinformed/ui/models\";\nimport type { ModularUIRequestOptions } from \"@beinformed/ui/utils\";\n\nconst getModularUIRequest = createSelector([getLocale], (localeCode) => {\n return (href: Href, options?: ModularUIRequestOptions) => {\n const request = new ModularUIRequest(href, options);\n request.locale = localeCode;\n return request;\n };\n});\n\n/**\n * Creates a ModularUIRequest with the locale as available in the redux store\n */\nexport const useModularUIRequest = (): ((\n href: Href,\n options?: ModularUIRequestOptions,\n) => ModularUIRequest) => useBEISelector(getModularUIRequest);\n","import { INTERNAL_LOGIN_TYPE } from \"@beinformed/ui/constants\";\nimport { IllegalStateException } from \"@beinformed/ui/exceptions\";\nimport { Authenticate } from \"@beinformed/ui/modularui\";\nimport { getContextPath, getContextPathServer } from \"@beinformed/ui/settings\";\nimport { Cache } from \"@beinformed/ui/utils\";\n\nimport { resetAuthErrors } from \"../redux/auth/authReducer\";\nimport { login } from \"../redux/auth/signinActions\";\nimport { logout } from \"../redux/auth/signoutActions\";\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\n\nimport { useApplication } from \"./useModularUIModel\";\n\nimport type { AuthenticationType } from \"@beinformed/ui/modularui\";\nimport type { RootState } from \"../redux/store\";\n\n/**\n * Provides access to authentication state and actions.\n * Includes functionality for standard username/password login and redirect-based login.\n * @returns An object containing authentication status, available authentication types, error messages, and login/logout functions.\n */\nexport const useLogin = () => {\n Cache.setItem(\"isRedirectLogin\", false);\n\n const dispatch = useBEIDispatch();\n\n const application = useApplication();\n const auth = useBEISelector((state: RootState) => state.auth);\n\n const isAuthenticated = application?.isLoggedIn ?? false;\n\n const primaryAuthenticationType = Cache.getItem(\"primaryAuthenticationType\");\n\n return {\n /**\n * Indicates whether the user is currently authenticated.\n */\n isAuthenticated,\n\n primaryAuthenticationType:\n primaryAuthenticationType ?? application?.authenticationTypes[0],\n\n /**\n * An array of available authentication types supported by the application.\n */\n authenticationTypes: application?.authenticationTypes ?? [],\n\n /**\n * The current authentication error message, if any.\n */\n errorMessage: auth.error,\n\n /**\n * Resets the authentication error message in the Redux store.\n */\n resetErrors: () => dispatch(resetAuthErrors()),\n\n /**\n * Attempts to log in the user with the provided username and password.\n * Dispatches the `login` action to the Redux store.\n * @param username The username for authentication.\n * @param password The password for authentication.\n */\n login: (username: string, password: string) =>\n dispatch(login({ username, password })),\n\n /**\n * Initiates a redirect-based login flow for a specific authentication type.\n * If a redirect login is already in progress, it throws an `IllegalStateException` to prevent infinite loops.\n * If the user is not currently authenticated, it sets a flag in the cache and redirects the browser to the authentication provider's redirect URI.\n * @param authenticationType The authentication type to initiate the redirect for.\n * @throws {IllegalStateException} If a redirect login is already in progress for a different authentication type.\n */\n redirectLogin: (authenticationType: AuthenticationType) => {\n if (Cache.getItem(\"isRedirectLogin\")) {\n // prevent endless loop in redirects when authentication type can't be redirected\n throw new IllegalStateException(\n `Could not redirect to '${\n authenticationType.authentication\n }' using url: '${authenticationType.redirectUri ?? \"\"}'`,\n );\n }\n\n if (!isAuthenticated) {\n Cache.setItem(\"isRedirectLogin\", true);\n window.location.assign(\n `${getContextPathServer()}${authenticationType.redirectUri ?? \"\"}`,\n );\n }\n },\n };\n};\n\n/**\n * Provides access to logout functionality.\n * Handles both standard logout and redirect-based logout scenarios.\n * @returns An object containing the authentication status, available authentication types, and the logout function.\n */\nexport const useLogout = () => {\n const dispatch = useBEIDispatch();\n const application = useApplication();\n\n const BASE_PATH = getContextPath();\n\n const authenticate = new Authenticate();\n\n const primaryAuthenticationType = Cache.getItem(\"primaryAuthenticationType\");\n\n const isAuthenticated = application?.isLoggedIn ?? false;\n return {\n /**\n * Indicates whether the user is currently authenticated.\n */\n isAuthenticated,\n\n primaryAuthenticationType:\n primaryAuthenticationType ?? application?.authenticationTypes[0],\n\n /**\n * An array of available authentication types supported by the application.\n */\n authenticationTypes: application?.authenticationTypes ?? [],\n\n /**\n * Initiates the logout process.\n * If a redirect login was in progress, it redirects the user to the server's logout endpoint with a return URL to the current origin.\n * Otherwise, it dispatches the `logout` action to the Redux store.\n */\n logout: () => {\n const type = authenticate.authenticationType;\n if (type === INTERNAL_LOGIN_TYPE.PAC4J_INDIRECT) {\n authenticate.redirectToLogout();\n } else if (Cache.getItem(\"isRedirectLogin\")) {\n const origin = window.location.origin;\n const url = `${origin}${BASE_PATH}/logout?url=${origin}${BASE_PATH}`;\n Cache.setItem(\"isRedirectLogin\", false);\n window.location.assign(url);\n } else {\n return dispatch(logout());\n }\n },\n\n logoutUrl: authenticate.getLogoutUrl(),\n };\n};\n","import {\n ApplicationModel,\n CaseViewModel,\n DetailModel,\n GroupingPanelModel,\n TabModel,\n UserProfileModel,\n} from \"@beinformed/ui/models\";\n\nimport { useModularUIBasic } from \"./useModularUIBasic\";\n\nimport type { Href } from \"@beinformed/ui/models\";\nimport type { HookOptions } from \"./useModularUIBasic\";\n\n/**\n * Load application\n */\nexport const useApplication = (options?: HookOptions) =>\n useModularUIBasic(\"application\", \"/\", {\n expectedModels: [\"Application\"],\n targetModel: ApplicationModel,\n ...options,\n });\n\n/**\n * Load a tab by href\n */\nexport const useTab = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"tab\", href, {\n expectedModels: [\"Tab\"],\n targetModel: TabModel,\n ...options,\n });\n\n/**\n * Load caseview by href\n */\nexport const useCaseView = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"caseview\", href, {\n expectedModels: [\"CaseView\"],\n targetModel: CaseViewModel,\n ...options,\n });\n\nexport const useGroupingPanel = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"groupingpanel\", href, {\n expectedModels: [\"GroupingPanel\"],\n targetModel: GroupingPanelModel,\n ...options,\n });\n\nexport const useDetailPanel = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"detailpanel\", href, {\n expectedModels: [\"Detail\"],\n targetModel: DetailModel,\n ...options,\n });\n\nexport const useUserProfile = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"userprofile\", href, {\n expectedModels: [\"UserProfile\"],\n targetModel: UserProfileModel,\n ...options,\n });\n","import { useMemo } from \"react\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\n\nimport { useLocation } from \"../hooks/useRouter\";\nimport { useBEISelector } from \"../redux/hooks\";\nimport { MODULARUI_STATUS } from \"../redux/modularui/constants\";\n\nimport { useModularUI } from \"./useModularUI\";\nimport { useModularUIKey } from \"./useModularUIKey\";\n\nimport type { Href } from \"@beinformed/ui/models\";\nimport type { ModularUIResponse } from \"@beinformed/ui/modularui\";\n\n/**\n * Configuration options for low-level modular UI requests.\n */\nexport interface HookOptions {\n key?: string;\n origin?: string;\n contextPath?: string;\n removeOnUnmount?: boolean;\n formdata?: string | undefined | null;\n}\n\n/**\n * Configuration options for the useModularUIBasic hook.\n * Allows for type enforcement, caching control, and reload behavior.\n */\nexport interface UseModularUIBasicOptions<T> {\n expectedModels?: string[];\n targetModel?: new (modularuiResponse: ModularUIResponse) => T;\n forceTargetModel?: boolean;\n origin?: string;\n contextPath?: string;\n cache?: boolean;\n key?: string;\n isReload?: boolean;\n removeOnUnmount?: boolean;\n formdata?: string | undefined | null; // If present, the hook switches from GET to POST\n}\n\n/**\n * Internal helper to transform high-level hook options into a configuration\n * object compatible with the core useModularUI fetcher.\n * Logic:\n * 1. Defaults to GET method.\n * 2. If 'formdata' is present, it switches to POST and assigns 'data'.\n * 3. Forces 'isReload' if the useReload check returns true.\n */\nconst createUseModularUIOptions = <T>(\n options: UseModularUIBasicOptions<T>,\n mustReload: boolean,\n) => {\n const baseOptions: Record<string, unknown> = {\n expectedModels: [],\n method: HTTP_METHODS.GET,\n data: undefined,\n ...options,\n isReload: mustReload || options.isReload,\n };\n\n if (options.formdata != null) {\n baseOptions.method = HTTP_METHODS.POST;\n baseOptions.data = options.formdata;\n }\n\n return baseOptions;\n};\n\n/**\n * Validates that the returned model type matches one of the expected model strings.\n * Logs a warning to the console if there is a mismatch (useful for debugging UI-backend contracts).\n */\nconst validateModel = (model: unknown, expectedModels: string[]) => {\n if (\n expectedModels.length > 0 &&\n model !== null &&\n typeof model === \"object\" &&\n \"type\" in model &&\n typeof model.type === \"string\"\n ) {\n const isCorrectModel = expectedModels.includes(model.type);\n if (!isCorrectModel) {\n console.warn(model, \"is not of instance\", expectedModels);\n }\n }\n};\n\n/**\n * A simplified abstraction over useModularUI that includes automatic\n * model validation and smart-reload logic based on router state.\n *\n * @param {string} defaultKey - The default identifier for the model.\n * @param {string | Href} href - The endpoint to fetch.\n * @param {UseModularUIBasicOptions} options - Extended configuration options.\n */\nexport const useModularUIBasic = <T>(\n defaultKey: string,\n href: string | Href,\n options: UseModularUIBasicOptions<T> = {},\n): T | undefined => {\n const memoizedHref = useMemo(() => href.toString(), [href]);\n\n // Use the key provided in options if available, otherwise fallback to the default\n const key = options.key ?? defaultKey;\n\n // Determine if we need to bypass cache based on navigation 'reload' signals\n const mustReload = useReload(key, memoizedHref);\n\n // Memoize options to prevent useModularUI from re-fetching on every parent render\n const modularUIOptions = useMemo(\n () => createUseModularUIOptions(options, mustReload),\n [options, mustReload],\n );\n\n const modularUI = useModularUI(key, href, modularUIOptions);\n\n const expectedModels = useMemo(\n () => options.expectedModels ?? [],\n [options.expectedModels],\n );\n\n // Extract and validate the model from the modularUI wrapper object\n return useMemo((): T | undefined => {\n if (modularUI?.model) {\n validateModel(modularUI.model, expectedModels);\n return modularUI.model as T;\n }\n return undefined;\n }, [expectedModels, modularUI]);\n};\n\n/**\n * Determines if a model should be reloaded based on the 'reload' timestamp\n * found in the React Router location state.\n * This is used for \"force refresh\" scenarios where a user navigates to a\n * page and expects fresh data (e.g., after a form submission elsewhere).\n * @param {string} modelKey - The model type key.\n * @param {string} url - The resource URL.\n * @returns {boolean} True if the store data is stale compared to the reload signal.\n */\nexport const useReload = (modelKey: string, url: string): boolean => {\n const location = useLocation();\n const key = useModularUIKey(modelKey, url);\n\n // Access the current entry in the Redux store\n const modelEntry = useBEISelector((state) => state.modularui[key]);\n\n if (modelEntry) {\n const reload = (location?.state?.reload || 0) as number;\n\n // If a reload timestamp exists in the router state\n if (reload > 0) {\n const isFullyLoaded = modelEntry?.status === MODULARUI_STATUS.FINISHED;\n const lastModification = modelEntry?.lastModification ?? 0;\n\n // Trigger reload only if the model is already finished loading\n // AND the data we have is older than the requested reload time.\n if (isFullyLoaded && lastModification < reload) {\n return true;\n }\n }\n }\n return false;\n};\n","import { useMemo } from \"react\";\n\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport {\n go,\n goBack,\n goForward,\n push,\n replace,\n} from \"../redux/router/routerActions\";\n\nimport type { RouterLocation } from \"../redux/router/routerReducer\";\nimport type { RootState } from \"../redux/store\";\n\n/**\n * Returns the full location object from the router state.\n */\nexport const useLocation = () =>\n useBEISelector((state: RootState) => state.router.location);\n\n/**\n * Returns the unique key of the current location.\n */\nexport const useLocationKey = () => useLocation()?.key ?? \"\";\n\n/**\n * Returns the current search (querystring) portion of the URL.\n */\nexport const useQuerystring = () => useLocation()?.search;\n\n/**\n * Returns the current URL pathname.\n */\nexport const usePathname = () => useLocation()?.pathname;\n\n/**\n * Provides navigation methods.\n */\nexport const useNavigation = () => {\n const dispatch = useBEIDispatch();\n\n return useMemo(\n () => ({\n push: (location: RouterLocation | string, state?: RootState) =>\n dispatch(push(location, state)),\n replace: (location: RouterLocation | string, state?: RootState) =>\n dispatch(replace(location, state)),\n go: (delta: number) => dispatch(go(delta)),\n goBack: () => dispatch(goBack()),\n goForward: () => dispatch(goForward()),\n }),\n [dispatch],\n );\n};\n","import { useEffect, useMemo, useRef } from \"react\";\n\nimport { useLocation } from \"react-router\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport { Href } from \"@beinformed/ui/models\";\n\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport { MODULARUI_STATUS } from \"../redux/modularui/constants\";\nimport { fetchModel } from \"../redux/modularui/fetchModel\";\nimport { removeModelByKey } from \"../redux/modularui/modelActions\";\n\nimport { useDeepCompareEffect } from \"./useDeepCompareEffect\";\nimport { useModularUIKey } from \"./useModularUIKey\";\n\nimport type { ModularUIRequestOptions } from \"@beinformed/ui/utils\";\nimport type { ModelEntry } from \"../redux/modularui/types\";\n\n/**\n * A custom hook to fetch and manage Be Informed modular UI resources.\n * It handles automatic data fetching based on URL/query changes, manages Redux state\n * synchronization, and provides cleanup logic when components unmount.\n *\n * @param {string} modelKey - A unique identifier for the type of model being fetched.\n * @param {string | Href} url - The endpoint URL or Href instance to fetch data from.\n * @param {RequestModularUIOptions} options - Configuration for the request (method, headers, etc.).\n * @returns {ModelEntry} The model data retrieved from the Redux store.\n */\nexport const useModularUI = (\n modelKey: string,\n url: string | Href,\n options: ModularUIRequestOptions = {},\n): ModelEntry | undefined => {\n const dispatch = useBEIDispatch();\n\n // Normalize the URL input into a Href instance to safely access query params and paths\n const hrefInstance = useMemo(() => new Href(url), [url]);\n const requestUrl = useMemo(() => hrefInstance.toString(), [hrefInstance]);\n const currentQueryString = hrefInstance.querystring;\n\n // Persistence ref to detect if query parameters have changed between renders\n const prevQueryRef = useRef(currentQueryString);\n\n // Generate a unique key for the Redux store based on the model type and the full URL\n const key = useModularUIKey(modelKey, requestUrl);\n\n // Select the specific piece of state corresponding to this modular UI component\n const model = useBEISelector((state) => state.modularui[key]);\n\n /**\n * Memoize request options to prevent unnecessary re-renders.\n * Merges default settings (GET method, auto-cleanup) with user-provided options.\n */\n const requestOptions = useMemo(() => {\n const merged = {\n method: HTTP_METHODS.GET,\n removeOnUnmount: true,\n ...options,\n };\n\n if (url instanceof Href) {\n merged.origin = merged.origin ?? url.origin;\n merged.contextPath = merged.contextPath ?? url.contextPath;\n }\n return merged;\n }, [options, url]);\n\n const location = useLocation<{ redirectLocation?: string | Href }>();\n const redirectLocation = location.state?.redirectLocation;\n\n // eslint-disable-next-line react-hooks/refs\n const isQueryChanged = prevQueryRef.current !== currentQueryString;\n\n /**\n * Determines if a network request should be initiated.\n * Logic includes:\n * - Model doesn't exist yet (Initial load)\n * - Previous request resulted in an error (Retry)\n * - The query parameters changed (Filtering/Paging)\n * - A redirect was triggered specifically for this URL\n * - Manual 'isReload' flag is passed in options\n */\n const shouldLoad =\n model == null ||\n model.status === MODULARUI_STATUS.ERROR ||\n isQueryChanged ||\n (redirectLocation instanceof Href\n ? redirectLocation.equals(requestUrl)\n : false) ||\n requestOptions.isReload === true;\n\n // Synchronize the ref after the render cycle determines if we should load\n useEffect(() => {\n prevQueryRef.current = currentQueryString;\n }, [currentQueryString]);\n\n // Execute the load action. Deep compare is used on options to prevent\n // infinite loops caused by passing inline object literals.\n useDeepCompareEffect(() => {\n if (requestUrl !== \"\" && shouldLoad) {\n dispatch(fetchModel({ key, href: requestUrl, options: requestOptions }));\n }\n }, [key, requestUrl, requestOptions, shouldLoad]);\n\n // Cleanup Effect:\n // If 'removeOnUnmount' is true, this removes the model data from the Redux store\n // when the component using this hook is destroyed.\n useEffect(() => {\n if (requestOptions.removeOnUnmount) {\n return () => {\n dispatch(removeModelByKey(key));\n };\n }\n }, [dispatch, key, requestOptions.removeOnUnmount]);\n\n return model;\n};\n","import { useEffect, useRef } from \"react\";\n\nimport { dequal as deepEqual } from \"dequal/lite\";\n\nimport { IS_DEV } from \"@beinformed/ui/utils\";\n\nimport type { DependencyList, EffectCallback } from \"react\";\n\n/**\n * Validates that dependencies are used correctly.\n * Deep compare should not be used with empty arrays or no dependencies.\n */\nfunction checkDeps(deps: DependencyList) {\n if (IS_DEV) {\n if (!deps || deps.length === 0) {\n console.warn(\n \"useDeepCompareEffect should not be used with no dependencies. Use React.useEffect instead.\",\n );\n }\n }\n}\n\n/**\n * Custom hook to generate a stable signal (number) that only changes when\n * the 'dependencies' array changes value via a deep comparison.\n *\n * * NOTE: This function intentionally reads `ref.current` during the render phase\n * to perform memoization. This is a well-known pattern for deep-compare hooks\n * but requires an ESLint bypass for the strict 'no-accessing-refs-during-render' rule.\n */\nfunction useDeepCompareMemoize(dependencies: DependencyList) {\n const ref = useRef<DependencyList>(dependencies);\n\n // Only update the ref if the deep equality check fails\n // eslint-disable-next-line react-hooks/refs\n if (!deepEqual(dependencies, ref.current)) {\n // eslint-disable-next-line react-hooks/refs\n ref.current = dependencies;\n }\n\n // eslint-disable-next-line react-hooks/refs\n return ref.current;\n}\n\n/**\n * A replacement for useEffect that compares dependencies deeply.\n */\nexport function useDeepCompareEffect(\n callback: EffectCallback,\n dependencies: DependencyList,\n) {\n checkDeps(dependencies);\n\n // We use the memoized ref as the dependency.\n // React's shallow check will only trigger when the ref object itself changes.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(callback, useDeepCompareMemoize(dependencies));\n}\n","import { useMemo } from \"react\";\n\nimport { useLocale } from \"./useI18n\";\n\n/**\n * Generates the key that is used in the modular ui reducer of redux\n */\nexport const useModularUIKey = (modelKey: string, url: string) => {\n const locale = useLocale();\n return useMemo(\n () => `${modelKey}(${url.split(\"?\")[0]})(${locale})`,\n [modelKey, url, locale],\n );\n};\n","import { useEffect, useState } from \"react\";\n\nimport { ModularUIRequest } from \"@beinformed/ui/modularui\";\n\nimport { useLocale } from \"../hooks/useI18n\";\nimport { useProgressIndicator } from \"../hooks/useProgressIndicator\";\n\nimport type {\n ContentModel,\n Href,\n SourceReferenceCollection,\n} from \"@beinformed/ui/models\";\n\n/**\n * Hook to retrieve multiple source references at once\n */\nexport const useContentFromSourceReferences = (\n sourceReferences: SourceReferenceCollection,\n renderChildSections: boolean,\n): ContentModel[] => {\n const [content, setContent] = useState<ContentModel[]>([]);\n const localeCode = useLocale();\n\n const { start, finish } = useProgressIndicator();\n\n const hrefs = sourceReferences\n .map((sourceReference) => sourceReference.link?.selfhref.href)\n .filter((href, index, self) => self.indexOf(href) === index)\n .map((href) => href?.toString());\n\n const allHrefs = JSON.stringify(hrefs);\n useEffect(() => {\n const requests = JSON.parse(allHrefs).map((href: Href) => {\n const modularuiRequest = new ModularUIRequest(href);\n modularuiRequest.locale = localeCode;\n return modularuiRequest.fetchContent(renderChildSections);\n });\n\n start();\n Promise.all(requests).then((responseContent) => {\n setContent(responseContent);\n finish();\n });\n\n // start and finish don't change\n }, [allHrefs, localeCode, renderChildSections, start, finish]);\n\n return content;\n};\n","// @flow\nimport { useCallback } from \"react\";\n\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport {\n finishProgress,\n resetProgress,\n startProgress,\n updateProgress,\n} from \"../redux/progressindicator/progressIndicatorActions\";\n\nexport const useProgressIndicator = () => {\n const dispatch = useBEIDispatch();\n\n const start = useCallback(() => {\n dispatch(startProgress());\n }, [dispatch]);\n const finish = useCallback(() => {\n dispatch(finishProgress());\n }, [dispatch]);\n const reset = useCallback(() => {\n dispatch(resetProgress());\n }, [dispatch]);\n const update = useCallback(\n (percentComplete: number) => {\n dispatch(updateProgress(percentComplete));\n },\n [dispatch],\n );\n\n return { start, finish, reset, update };\n};\n\n/**\n */\nexport const useProgressIndicatorState = () =>\n useBEISelector((state) => state.progressindicator);\n","import { produce } from \"immer\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport { FormModel, Href } from \"@beinformed/ui/models\";\nimport { getSetting } from \"@beinformed/ui/settings\";\n\nimport { updateFormAttribute } from \"../redux/form/attributeActions\";\nimport { cancelForm, previousObject } from \"../redux/form/formActions\";\nimport {\n addRepeatableAttributeSet,\n cancelRepeatableAttributeSet,\n removeRepeatableAttributeSet,\n} from \"../redux/form/formAttributesetRepeatable\";\nimport { useBEIDispatch } from \"../redux/hooks\";\nimport { fetchModel } from \"../redux/modularui/fetchModel\";\nimport { removeModelByKey } from \"../redux/modularui/modelActions\";\nimport { showFormNotification } from \"../redux/notifications/notificationActions\";\n\nimport { useModularUI } from \"./useModularUI\";\n\nimport type {\n AttributeModel,\n FormObjectModel,\n ModularUIModel,\n} from \"@beinformed/ui/models\";\n\nexport interface UpdateFormOptions {\n autosubmit: boolean;\n autosave: boolean;\n autoupdate: boolean;\n forceUpdate?: boolean;\n /** Default true: Activate/deactivate the form object validate by an update */\n validate?: boolean;\n}\n\n/**\n * Load a form by href\n */\nexport const useForm = (\n href: string | Href,\n data?: Record<string, unknown>,\n) => {\n const formHref = new Href(href);\n\n if (!getSetting(\"ALWAYS_COMMIT_FORM\")) {\n formHref.addParameter(\"commit\", \"false\");\n }\n\n const form = useModularUI(\"form\", formHref, {\n method: HTTP_METHODS.POST,\n targetModel: FormModel,\n removeOnUnmount: true,\n data: data ? JSON.stringify(data) : undefined,\n origin: formHref.origin,\n contextPath: formHref.contextPath,\n });\n\n if (form?.model instanceof FormModel) {\n return form.model;\n }\n\n return;\n};\n\n/**\n * Form navigation methods\n */\nexport const useFormNavigation = () => {\n const dispatch = useBEIDispatch();\n\n const previous = (form: FormModel) => dispatch(previousObject(form));\n\n const cancel = (form: FormModel) => dispatch(cancelForm(form));\n\n const submit = (form: FormModel) =>\n dispatch(\n fetchModel({\n key: form.connectKey || form.key,\n href: form.selfhref,\n options: {\n method: HTTP_METHODS.POST,\n data: form.formdata,\n updateHandler: (newModel: ModularUIModel): ModularUIModel => {\n if (newModel instanceof FormModel) {\n return produce(newModel, (draft) => {\n draft.update(newModel);\n });\n }\n return newModel;\n },\n targetModel: FormModel,\n },\n }),\n );\n\n const remove = (form: FormModel) =>\n dispatch(removeModelByKey(form.connectKey || \"\"));\n\n const showFormNotificationAction = (form: FormModel) =>\n dispatch(showFormNotification(form));\n\n return {\n previous,\n cancel,\n submit,\n remove,\n showFormNotification: showFormNotificationAction,\n };\n};\n\n/**\n * Hook that returns a function to update attributes of a form object.\n * <br >\n * The returned function accepts the following options:\n *\n * - autosubmit: Automatically submit the form after a change\n * - autosav: Automatically save the form (in the background) after a change\n * - autoupdate: Automatically update the current form object after a change\n * - forceUpdate: Force the update even if conditions are not met.\n * - validate: Activate/deactivate the form object validation by an update.\n */\nexport const useAttributeUpdate = (\n form: FormModel,\n formObject: FormObjectModel,\n) => {\n const dispatch = useBEIDispatch();\n\n return (\n attribute: AttributeModel,\n inputvalue: string,\n options?: UpdateFormOptions,\n ) =>\n dispatch(\n updateFormAttribute({ form, formObject, attribute, inputvalue, options }),\n );\n};\n\n/**\n * Repeatable attributeset actions\n */\nexport const useRepeatableAttributeSet = (form: FormModel) => {\n const dispatch = useBEIDispatch();\n\n return {\n save: () => dispatch(addRepeatableAttributeSet(form)),\n cancel: (object: FormObjectModel) =>\n dispatch(cancelRepeatableAttributeSet(form, object)),\n remove: (object: FormObjectModel) =>\n dispatch(removeRepeatableAttributeSet(form, object)),\n };\n};\n","import { useCallback, useMemo } from \"react\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport {\n AssignmentFilterModel,\n CaseSearchModel,\n DetailModel,\n FilterModel,\n ListDetailModel,\n ListModel,\n} from \"@beinformed/ui/models\";\n\nimport { useBEIDispatch } from \"../redux/hooks\";\nimport { fetchModel } from \"../redux/modularui/fetchModel\";\n\nimport { useModularUIBasic } from \"./useModularUIBasic\";\nimport { useNavigation } from \"./useRouter\";\n\nimport type {\n AttributeModel,\n FilterCollection,\n Href,\n IFilter,\n} from \"@beinformed/ui/models\";\nimport type { HookOptions } from \"./useModularUIBasic\";\n\ninterface ListNavigationOptions {\n syncLocation?: boolean;\n historyAction?: \"push\" | \"replace\";\n}\n\nexport const useList = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"list\", href, {\n expectedModels: [\"List\"],\n targetModel: ListModel,\n ...options,\n });\n\nexport const useListOrDetail = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic<ListModel | DetailModel>(\"list\", href, {\n expectedModels: [\"List\", \"Detail\"],\n // @ts-expect-error Need to improve typing for array\n targetModel: [ListModel, DetailModel],\n ...options,\n });\n\nexport const useListDetail = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"listdetail\", href, {\n expectedModels: [\"ListDetail\"],\n targetModel: ListDetailModel,\n forceTargetModel: true,\n ...options,\n });\n\nexport const useListNavigation = ({\n syncLocation = true,\n historyAction = \"push\",\n}: ListNavigationOptions = {}) => {\n const { push, replace } = useNavigation();\n const dispatch = useBEIDispatch();\n\n const navigate = historyAction === \"push\" ? push : replace;\n\n const update = useCallback(\n (list: ListModel, resetPage = false) => {\n const listHref = list.selfhref;\n if (resetPage) {\n listHref.page = undefined;\n }\n\n if (list.requestMethod === HTTP_METHODS.POST) {\n if (syncLocation) {\n navigate({\n pathname: listHref.path,\n search: listHref.getQuerystring(true),\n state: { formdata: list.formdata },\n });\n }\n\n dispatch(\n fetchModel({\n key: list.connectKey || list.key,\n href: listHref,\n options: {\n method: HTTP_METHODS.POST,\n data: list.formdata,\n targetModel: [ListModel, CaseSearchModel],\n },\n }),\n );\n } else {\n if (syncLocation) {\n navigate({\n pathname: listHref.path,\n search: listHref.getQuerystring(true),\n });\n }\n dispatch(\n fetchModel({\n key: list.connectKey || list.key,\n href: listHref,\n options: {\n method: HTTP_METHODS.GET,\n targetModel: [ListModel, CaseSearchModel],\n },\n }),\n );\n }\n },\n [dispatch, navigate, syncLocation],\n );\n\n const updateFilters = useCallback(\n (list: ListModel, filters: FilterCollection | IFilter[]) => {\n list.filterCollection = filters;\n update(list, true);\n },\n [update],\n );\n\n const updateFilter = useCallback(\n (\n list: ListModel,\n filter: IFilter,\n value: string,\n attribute?: AttributeModel,\n ) => {\n if (filter instanceof AssignmentFilterModel && !attribute) {\n throw new TypeError(\n \"AssignmentFilterModel needs the attribute argument to be able to update the filter\",\n );\n }\n\n let filterToUpdate = null;\n let targetAttr = attribute;\n\n if (attribute) {\n filterToUpdate = list.filterCollection.getFilterByAttributeKey(\n attribute.key,\n );\n } else if (filter instanceof FilterModel) {\n filterToUpdate = list.filterCollection.getFilterByName(filter.name);\n targetAttr = filter.attribute;\n }\n\n if (filterToUpdate && targetAttr) {\n filterToUpdate.update(targetAttr, value);\n } else {\n const searchKey = attribute\n ? `key: ${attribute.key}`\n : `name: ${filter.name}`;\n console.error(\n `Can't find a filter to update by ${searchKey} on list: ${list.selfhref.toString()}`,\n );\n }\n\n update(list, true);\n },\n [update],\n );\n\n const resetFilters = useCallback(\n (list: ListModel) => {\n list.filterCollection.reset();\n update(list, true);\n },\n [update],\n );\n\n const removeFilter = useCallback(\n (list: ListModel, filter: IFilter) => {\n if (filter.name) {\n list.filterCollection.getFilterByName(filter.name)?.reset();\n }\n update(list, true);\n },\n [update],\n );\n\n const updateSort = useCallback(\n (list: ListModel, sortOption: string) => {\n list.sorting.value = sortOption;\n update(list, true);\n },\n [update],\n );\n\n const updatePage = useCallback(\n (list: ListModel, page: number) => {\n list.paging.page = page;\n update(list);\n },\n [update],\n );\n\n const updatePageSize = useCallback(\n (list: ListModel, pagesize: number) => {\n list.paging.pagesize.value = pagesize;\n update(list, true);\n },\n [update],\n );\n\n return useMemo(\n () => ({\n update,\n updateFilters,\n updateFilter,\n updateSort,\n updatePage,\n updatePageSize,\n resetFilters,\n removeFilter,\n }),\n [\n removeFilter,\n resetFilters,\n update,\n updateFilter,\n updateFilters,\n updatePage,\n updatePageSize,\n updateSort,\n ],\n );\n};\n","import { useEffect, useState } from \"react\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport { Href, LookupOptionsModel } from \"@beinformed/ui/models\";\n\nimport { useModularUIRequest } from \"./useModularUIRequest\";\nimport { useProgressIndicator } from \"./useProgressIndicator\";\n\nimport type { LinkModel } from \"@beinformed/ui/models\";\nimport type { ModularUIRequestOptions } from \"@beinformed/ui/utils\";\n\ninterface UseLookupHook {\n lookupOptions: LookupOptionsModel | null;\n lookupLoading: boolean;\n}\n\n/**\n * Lookup options call\n */\nexport const useLookup = (\n lookupLink: LinkModel,\n filterInput = \"\",\n minLength = 1,\n debounceMs = 300,\n): UseLookupHook => {\n const { start, finish } = useProgressIndicator();\n const modularuiRequest = useModularUIRequest();\n\n const [lookupOptions, setLookupOptions] = useState<LookupOptionsModel | null>(\n null,\n );\n const [lookupLoading, setLookupLoading] = useState(false);\n\n const { href, filterName, method } = lookupLink;\n\n if (filterInput.length < minLength || !filterName) {\n if (lookupOptions !== null) {\n setLookupOptions(null);\n }\n }\n\n useEffect(() => {\n if (filterInput.length < minLength || !filterName) {\n return;\n }\n\n const timeoutId = setTimeout(async () => {\n setLookupLoading(true);\n start();\n\n const lookupHref = new Href(href);\n const requestOptions: ModularUIRequestOptions = {\n method,\n data: undefined,\n };\n if (method === HTTP_METHODS.POST) {\n requestOptions.data = { [filterName]: filterInput };\n } else {\n lookupHref.addParameter(filterName, filterInput);\n }\n\n modularuiRequest(lookupHref, requestOptions)\n .fetch()\n .then((lookupResponse) => {\n if (lookupResponse instanceof LookupOptionsModel) {\n setLookupOptions(lookupResponse);\n }\n })\n .finally(() => {\n finish();\n setLookupLoading(false);\n });\n }, debounceMs);\n\n return () => {\n clearTimeout(timeoutId);\n };\n }, [\n debounceMs,\n filterInput,\n filterName,\n finish,\n href,\n method,\n minLength,\n modularuiRequest,\n start,\n ]);\n\n return { lookupOptions, lookupLoading };\n};\n","import { useCallback } from \"react\";\n\nimport { IllegalArgumentException } from \"@beinformed/ui/exceptions\";\n\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport { closeModal, showModal } from \"../redux/modals/modalsReducer\";\n\nimport type { RootState } from \"../redux/store\";\n\ntype ModalHook = (modalId: string) => {\n key: string | null;\n size?: string | null;\n visible: boolean;\n show: () => void;\n close: () => void;\n};\n\n/**\n * Manage modals\n */\nexport const useModal: ModalHook = (modalId: string) => {\n if (!modalId) {\n throw new IllegalArgumentException(\n \"Missing modalId argument for useModal hook\",\n );\n }\n\n const dispatch = useBEIDispatch();\n const modal = useBEISelector((state: RootState) =>\n state.modals.modals.find((m) => m.key === modalId),\n );\n\n const show = useCallback(() => {\n dispatch(showModal(modalId));\n }, [dispatch, modalId]);\n\n const close = useCallback(() => {\n dispatch(closeModal(modalId));\n }, [dispatch, modalId]);\n\n return {\n key: modal ? modal.key : null,\n size: modal ? modal.size : null,\n visible: modal ? modal.visible : false,\n show,\n close,\n };\n};\n","import {\n ConceptIndexModel,\n ContentIndexModel,\n ContentTOCModel,\n ContentTypeModel,\n Href,\n ModelCatalogModel,\n} from \"@beinformed/ui/models\";\nimport { createHref, filterParameters } from \"@beinformed/ui/utils\";\n\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport { updateEntryDate } from \"../redux/modelcatalog/modelCatalogReducer\";\nimport { getEntryDate } from \"../redux/modelcatalog/modelCatalogSelectors\";\n\nimport { useModularUIBasic } from \"./useModularUIBasic\";\nimport { useLocation } from \"./useRouter\";\n\nimport type { ConceptDetailModel, ContentModel } from \"@beinformed/ui/models\";\nimport type { ISO_DATE } from \"@beinformed/ui/types\";\nimport type { UseModularUIBasicOptions } from \"./useModularUIBasic\";\n\nexport interface SearchFilter {\n index?: string;\n label?: string;\n type?: string | string[];\n modelCategory?: string | string[];\n entryDate?: string;\n}\n\nexport const useModelCatalog = (\n options?: UseModularUIBasicOptions<ModelCatalogModel>,\n) =>\n useModularUIBasic(\"modelcatalog\", \"/modelcatalog\", {\n expectedModels: [\"ModelCatalog\"],\n targetModel: ModelCatalogModel,\n ...options,\n });\n\nexport const useConceptIndex = (\n href: string | Href,\n key = \"conceptindex\",\n options?: UseModularUIBasicOptions<ConceptIndexModel>,\n) => {\n const { entryDate } = useEntryDate();\n const url = filterParameters(href, [\n \"index\",\n \"label\",\n \"modelcategory\",\n \"type\",\n ]);\n url.setParameter(\"entryDate\", entryDate);\n\n return useModularUIBasic(key, url, {\n expectedModels: [\"ConceptIndex\"],\n targetModel: ConceptIndexModel,\n ...options,\n });\n};\n\nexport const useConceptDetail = (\n concept: string | Href,\n key = \"conceptdetail\",\n options?: UseModularUIBasicOptions<ConceptDetailModel>,\n) => {\n const { entryDate } = useEntryDate();\n const location = useLocation();\n\n const href = createHref(\"concepts\", concept, entryDate, location, []);\n\n return useModularUIBasic(key, href, {\n expectedModels: [\"ConceptDetail\", \"BusinessScenario\"],\n ...options,\n });\n};\n\nexport const useContentIndex = (\n href: string | Href,\n key = \"contentindex\",\n options?: UseModularUIBasicOptions<ContentIndexModel>,\n) => {\n const url = filterParameters(href, [\"index\", \"label\", \"type\"]);\n return useModularUIBasic(key, url, {\n expectedModels: [\"ContentIndex\"],\n targetModel: ContentIndexModel,\n ...options,\n });\n};\n\nexport const useContentTOC = (\n content: string | Href,\n key = \"contenttoc\",\n options?: UseModularUIBasicOptions<ContentTOCModel>,\n) => {\n const { entryDate } = useEntryDate();\n const location = useLocation();\n\n const href = createHref(\"content\", content, entryDate, location, [\n \"complete\",\n ]);\n\n return useModularUIBasic(key, href, {\n expectedModels: [\"ContentTOC\"],\n targetModel: ContentTOCModel,\n ...options,\n });\n};\n\nexport const useContent = (\n content: string | Href,\n key = \"content\",\n options?: UseModularUIBasicOptions<ContentModel>,\n) => {\n const { entryDate } = useEntryDate();\n const location = useLocation();\n\n const href = createHref(\"content\", content, entryDate, location, [\n \"complete\",\n ]);\n\n return useModularUIBasic(key, href, {\n expectedModels: [\"Content\", \"ContentTOC\"],\n ...options,\n });\n};\n\nexport const useCompleteSource = (\n content: string | Href,\n key = \"content\",\n options?: UseModularUIBasicOptions<ContentModel | ContentTOCModel>,\n) => {\n const { entryDate } = useEntryDate();\n const location = useLocation();\n\n const contentHref = new Href(content);\n contentHref.removeParameter(\"complete\");\n contentHref.addParameter(\"complete\", \"true\");\n\n const href = createHref(\"content\", contentHref, entryDate, location, [\n \"complete\",\n ]);\n\n return useModularUIBasic(key, href, {\n expectedModels: [\"Content\", \"ContentTOC\"],\n ...options,\n });\n};\n\nexport const useContentType = (\n contentType: string | Href,\n key = \"contenttypes\",\n options?: UseModularUIBasicOptions<ContentTypeModel>,\n) => {\n const href = createHref(\n \"contenttypes\",\n contentType,\n undefined,\n undefined,\n [],\n );\n return useModularUIBasic(key, href, {\n expectedModels: [\"ContentType\"],\n targetModel: ContentTypeModel,\n ...options,\n });\n};\n\nexport const useRelatedConcepts = (\n href: string | Href,\n key = \"relatedconcepts\",\n options?: UseModularUIBasicOptions<ConceptIndexModel>,\n) => {\n const { entryDate } = useEntryDate();\n const url = filterParameters(href, [\"modelcategory\"]);\n url.setParameter(\"entryDate\", entryDate);\n\n return useModularUIBasic(key, url, {\n expectedModels: [\"ConceptIndex\"],\n targetModel: ConceptIndexModel,\n ...options,\n });\n};\n\nconst getSearchHref = (uri: string, filters: SearchFilter) => {\n const filterString = [];\n\n for (const key of Object.keys(filters)) {\n const filterValue = filters[key as keyof SearchFilter];\n if (filterValue) {\n let value: string = Array.isArray(filterValue)\n ? filterValue.join(\",\")\n : filterValue;\n if (key === \"type\") {\n value = value.replace(\"#\", \"%23\"); // handles un-encoded #\n }\n filterString.push(`${key}=${value}`);\n }\n }\n\n return filterString.length ? `${uri}?${filterString.join(\"&\")}` : uri;\n};\n\nexport const useConceptSearch = (\n filters: SearchFilter,\n key: string | \"conceptSearch\",\n options?: UseModularUIBasicOptions<ConceptIndexModel>,\n) => {\n const href = getSearchHref(\"/concepts\", filters);\n return useConceptIndex(href, key, options);\n};\n\nexport const useContentSearch = (\n filters: SearchFilter,\n key: string | \"contentSearch\",\n options?: UseModularUIBasicOptions<ContentIndexModel>,\n) => {\n const href = getSearchHref(\"/content\", filters);\n return useContentIndex(href, key, options);\n};\n\n/**\n * Retrieve and update the entrydate for the modelcatalog\n */\nexport const useEntryDate = () => {\n const dispatch = useBEIDispatch();\n const entryDate = useBEISelector(getEntryDate);\n\n return {\n entryDate,\n setEntryDate: (entryDate: ISO_DATE) => dispatch(updateEntryDate(entryDate)),\n };\n};\n","import { ApplicationModel } from \"@beinformed/ui/models\";\n\nimport { getApplication } from \"../redux/application/applicationSelectors\";\nimport { useBEISelector } from \"../redux/hooks\";\nimport {\n allKeysByHref,\n getActiveModelByInstance,\n getActiveModels,\n getAllFinishedModels,\n getAllModelsByInstance,\n getFirstModelByInstance,\n keyByHref,\n modelByHref,\n} from \"../redux/shared/selectors\";\n\nimport type { Href, ResourceModel } from \"@beinformed/ui/models\";\nimport type { RootState } from \"../redux/store\";\n\n/**\n * Returns all models in the store that are instances of the provided class\n * and match the current application locale.\n */\nexport const useAllModelsByInstance = <\n T extends new (...args: never[]) => ResourceModel,\n>(\n instance: T,\n) => {\n return useBEISelector((state: RootState) =>\n getAllModelsByInstance(state, instance),\n );\n};\n\n/**\n * Returns the first model found in the store that is an instance of the\n * provided class and matches the current locale.\n */\nexport const useFirstModelByInstance = <\n T extends new (...args: never[]) => ResourceModel,\n>(\n instance: T,\n) => {\n return useBEISelector((state: RootState) =>\n getFirstModelByInstance(state, instance),\n );\n};\n\n/**\n * Returns the model instance that is currently \"active\" based on the URL path.\n * It checks if the current router location starts with the model's selfhref path.\n */\nexport const useActiveModelByInstance = <\n T extends new (...args: never[]) => ResourceModel,\n>(\n instance: T,\n) => {\n return useBEISelector((state: RootState) =>\n getActiveModelByInstance(state, instance),\n );\n};\n\n/**\n * Retrieves a specific model from the store based on its unique Href.\n * @param {Href | string} href - The Href object or string path of the model.\n * @returns {ModularUIModel | null} The model matching the href or null.\n */\nexport const useModelByHref = (href: Href | string) => {\n return useBEISelector((state: RootState) => modelByHref(state, href));\n};\n\n/**\n * Returns the unique store key (identifier) for a model associated with a specific Href.\n * @param {Href | string} href - The Href object or string path.\n * @returns {string | null | void} The internal key of the model.\n */\nexport const useKeyByHref = (href: Href | string) => {\n return useBEISelector((state: RootState) => keyByHref(state, href));\n};\n\n/**\n * Returns all internal keys found in the store for a specific Href.\n * Useful if multiple versions/entries exist for the same path.\n * @param {Href | string} href - The Href object or string path.\n * @returns {Array<string>} An array of keys.\n */\nexport const useAllKeysByHref = (href: Href | string) => {\n return useBEISelector((state: RootState) => allKeysByHref(state, href));\n};\n\n/**\n * Returns a list of simplified model info (key, href, label, type) for all\n * models currently active in the navigation context (breadcrumbs).\n * @returns {Array<{key: string, href: Href, label: string, type: string}>}\n */\nexport const useActiveModels = () => {\n return useBEISelector(getActiveModels);\n};\n\n/**\n * Returns all models in the store that have a status of MODULARUI_STATUS.FINISHED.\n * @returns {Array<ModularUIModel>} An array of fully loaded models.\n */\nexport const useAllFinishedModels = () => {\n return useBEISelector(getAllFinishedModels);\n};\n\n/**\n * Returns the current active application, without retrying to request it.\n */\nexport const useCurrentApplication = () => {\n const application = useBEISelector(getApplication);\n if (application instanceof ApplicationModel) {\n return application;\n }\n return null;\n};\n","import { createSelector } from \"reselect\";\n\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport { MODULARUI_STATUS } from \"../redux/modularui/constants\";\nimport { reloadModel } from \"../redux/modularui/reloadModel\";\n\nimport type { ModularUIModel } from \"@beinformed/ui/models\";\nimport type { ModularUIRequestOptions } from \"@beinformed/ui/utils\";\nimport type { RootState } from \"../redux/store\";\n\ntype ReloadCallback = (model: ModularUIModel | undefined) => boolean;\n\ntype UseModels = () => {\n reload: (model: ModularUIModel, options?: Record<string, unknown>) => void;\n reloadWithFilter: (\n callbackFn: ReloadCallback,\n options?: Record<string, unknown>,\n ) => void;\n};\n\n/**\n * Hook that contains the reload property that can be used to reload a model\n */\nexport const useModels: UseModels = () => {\n const dispatch = useBEIDispatch();\n\n const selectModularUI = (state: RootState) => state.modularui;\n const selector = createSelector([selectModularUI], (modularui) => {\n const models = [];\n const keys = Object.keys(modularui);\n for (const key of keys) {\n const model = modularui[key];\n if (model?.status === MODULARUI_STATUS.FINISHED) {\n models.push(model.model);\n }\n }\n return models;\n });\n\n const modularuiModels = useBEISelector(selector);\n\n return {\n reload: (model: ModularUIModel, options?: ModularUIRequestOptions) => {\n dispatch(reloadModel(model, options));\n },\n reloadWithFilter: (\n callbackFn: ReloadCallback,\n options?: Record<string, unknown>,\n ) => {\n const modelsToReload = modularuiModels.filter(callbackFn);\n for (const modelToReload of modelsToReload) {\n if (modelToReload) {\n dispatch(reloadModel(modelToReload, options));\n }\n }\n },\n };\n};\n","import { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport {\n dismissNotification,\n NOTIFICATION_TYPES,\n showNotification,\n} from \"../redux/notifications/notificationReducer\";\n\nimport type { ErrorResponse } from \"@beinformed/ui/models\";\nimport type { MessageObject } from \"../i18n/types\";\nimport type { RootState } from \"../redux/store\";\n\nexport const useNotification = () => {\n const dispatch = useBEIDispatch();\n const { render, messageType, message, error } = useBEISelector(\n (state: RootState) => state.notification,\n );\n\n return {\n render,\n messageType,\n message,\n error,\n dismiss: () => {\n dispatch(dismissNotification());\n },\n };\n};\n\nexport const useErrorNotification = () => {\n const dispatch = useBEIDispatch();\n return (message: MessageObject, error?: ErrorResponse) => {\n return dispatch(\n showNotification({ type: NOTIFICATION_TYPES.ERROR, message, error }),\n );\n };\n};\n","import { useMemo, useState } from \"react\";\n\nimport { useLocation, useRouteMatch } from \"react-router\";\n\nimport {\n CaseSearchModel,\n DetailModel,\n GroupingPanelModel,\n Href,\n ListModel,\n} from \"@beinformed/ui/models\";\n\nimport { useModularUIBasic } from \"./useModularUIBasic\";\n\nimport type { HookOptions } from \"./useModularUIBasic\";\n\nconst useUrl = (href?: string | Href, fromRoute = false): Href => {\n const [previousUrl, setPreviousUrl] = useState<Href | null>(null);\n const [previousExact, setPreviousExact] = useState(false);\n\n const match = useRouteMatch();\n const location = useLocation();\n\n const url = useMemo(() => {\n if (href == null && previousUrl == null) {\n return new Href(\"\");\n }\n\n const currentUrl = href instanceof Href ? href : new Href(href);\n\n if (!fromRoute) {\n return currentUrl;\n }\n\n if (match.isExact) {\n currentUrl.addParametersFromString(location.search);\n }\n\n return currentUrl;\n }, [href, previousUrl, fromRoute, match.isExact, location.search]);\n\n // Check equality to prevent unnecessary state updates\n const isUrlChanged = !url.equalsWithParameters(previousUrl);\n\n const shouldUpdate =\n isUrlChanged &&\n (match.isExact ||\n previousExact === match.isExact ||\n !previousUrl?.startsWith(match.url));\n\n if (shouldUpdate) {\n setPreviousUrl(url);\n setPreviousExact(match.isExact);\n }\n\n return shouldUpdate ? url : previousUrl || url;\n};\n\nexport const usePanel = (\n href?: string | Href,\n options?: HookOptions & {\n fromRoute?: boolean;\n },\n):\n | ListModel\n | GroupingPanelModel\n | DetailModel\n | CaseSearchModel\n | undefined => {\n const { fromRoute, ...hookOptions } = options || { fromRoute: false };\n\n const url = useUrl(href, fromRoute || false);\n\n return useModularUIBasic(\"panel\", url, {\n expectedModels: [\"List\", \"GroupingPanel\", \"Detail\", \"CaseSearch\"],\n // @ts-expect-error Need to improve typing for array\n targetModel: [ListModel, GroupingPanelModel, DetailModel, CaseSearchModel],\n ...hookOptions,\n });\n};\n","import { useMemo } from \"react\";\n\nimport pick from \"lodash/pick\";\nimport { createSelector } from \"reselect\";\n\nimport { useBEISelector } from \"../redux/hooks\";\n\nimport type { RootState } from \"../redux/store\";\n\nconst getPreferences = (state: RootState) => state.preferences;\n\nconst makeSelectPreference = (preferenceNames: string | string[]) => {\n const names = Array.isArray(preferenceNames)\n ? preferenceNames\n : [preferenceNames];\n\n return createSelector([getPreferences], (preferences) =>\n pick(preferences, names),\n );\n};\n\nexport const usePreference = (preferenceNames: string | string[]) => {\n const selectPreference = useMemo(\n () => makeSelectPreference(preferenceNames),\n [preferenceNames],\n );\n\n return useBEISelector(selectPreference);\n};\n","import { CaseSearchModel } from \"@beinformed/ui/models\";\n\nimport { useModularUIBasic } from \"./useModularUIBasic\";\n\nimport type { Href } from \"@beinformed/ui/models\";\nimport type { HookOptions } from \"./useModularUIBasic\";\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"],"mappings":"4rBAAA,IAAAA,EAAAC,EAAA,CAAAC,GAAAC,KAAA,kBAAIC,GAAY,KAEZC,IAAkB,UAAW,CAC/B,GAAI,CACF,IAAIC,EAAOF,GAAU,OAAQ,gBAAgB,EAC7C,OAAAE,EAAK,CAAC,EAAG,GAAI,CAAC,CAAC,EACRA,CACT,MAAY,CAAC,CACf,GAAE,EAEFH,GAAO,QAAUE,KCVjB,IAAAE,GAAAC,EAAA,CAAAC,GAAAC,KAAA,kBAAIC,GAAiB,IAWrB,SAASC,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,GAAuC,CACnE,IAAMC,EAAQ,MAAM,QAAQD,CAAe,EACvCA,EACA,CAACA,CAAe,EAEpB,OAAOE,GAAe,CAACL,EAAc,EAAIM,MACvC,GAAAC,SAAKD,EAAaF,CAAK,CACzB,CACF,EAEaI,GAAiBL,GAAuC,CACnE,IAAMM,EAAmBC,GACvB,IAAMR,GAAqBC,CAAe,EAC1C,CAACA,CAAe,CAClB,EAEA,OAAOQ,EAAeF,CAAgB,CACxC,EC5BA,OAAS,mBAAAG,OAAuB,wBAOzB,IAAMC,GAAiB,CAACC,EAAqBC,IAClDC,EAAkB,cAAeF,EAAM,CACrC,eAAgB,CAAC,YAAY,EAC7B,YAAaG,GACb,GAAGF,CACL,CAAC,EAEUG,GAAY,CAACJ,EAAqBC,IAC7CC,EAAkB,SAAUF,EAAM,CAChC,eAAgB,CAAC,YAAY,EAC7B,YAAaG,GACb,GAAGF,CACL,CAAC","names":["require_defineProperty","__commonJSMin","exports","module","getNative","defineProperty","func","require_baseAssignValue","__commonJSMin","exports","module","defineProperty","baseAssignValue","object","key","value","require_assignValue","__commonJSMin","exports","module","baseAssignValue","eq","objectProto","hasOwnProperty","assignValue","object","key","value","objValue","require_baseSet","__commonJSMin","exports","module","assignValue","castPath","isIndex","isObject","toKey","baseSet","object","path","value","customizer","index","length","lastIndex","nested","key","newValue","objValue","require_basePickBy","__commonJSMin","exports","module","baseGet","baseSet","castPath","basePickBy","object","paths","predicate","index","length","result","path","value","require_baseHasIn","__commonJSMin","exports","module","baseHasIn","object","key","require_hasIn","__commonJSMin","exports","module","baseHasIn","hasPath","hasIn","object","path","require_basePick","__commonJSMin","exports","module","basePickBy","hasIn","basePick","object","paths","value","path","require_flatten","__commonJSMin","exports","module","baseFlatten","flatten","array","length","require_apply","__commonJSMin","exports","module","apply","func","thisArg","args","require_overRest","__commonJSMin","exports","module","apply","nativeMax","overRest","func","start","transform","args","index","length","array","otherArgs","require_constant","__commonJSMin","exports","module","constant","value","require_identity","__commonJSMin","exports","module","identity","value","require_baseSetToString","__commonJSMin","exports","module","constant","defineProperty","identity","baseSetToString","func","string","require_shortOut","__commonJSMin","exports","module","HOT_COUNT","HOT_SPAN","nativeNow","shortOut","func","count","lastCalled","stamp","remaining","require_setToString","__commonJSMin","exports","module","baseSetToString","shortOut","setToString","require_flatRest","__commonJSMin","exports","module","flatten","overRest","setToString","flatRest","func","require_pick","__commonJSMin","exports","module","basePick","flatRest","pick","object","paths","useEffect","useMemo","useState","HTTP_METHODS","FormModel","ListModel","createSelector","ModularUIRequest","getModularUIRequest","createSelector","getLocale","localeCode","href","options","request","ModularUIRequest","useModularUIRequest","useBEISelector","useRetrieveFormsOnModel","model","modularui","useModularUIRequest","forms","setForms","useState","responseCount","setResponseCount","actions","useMemo","getActions","requestCount","useEffect","requests","action","href","HTTP_METHODS","form","FormModel","responses","actionForms","allActions","ListModel","listItem","updateActions","unique","INTERNAL_LOGIN_TYPE","IllegalStateException","Authenticate","getContextPath","getContextPathServer","Cache","ApplicationModel","CaseViewModel","DetailModel","GroupingPanelModel","TabModel","UserProfileModel","useMemo","HTTP_METHODS","useMemo","useLocation","useBEISelector","state","useLocationKey","useQuerystring","usePathname","useNavigation","dispatch","useBEIDispatch","useMemo","location","push","replace","delta","go","goBack","goForward","useEffect","useMemo","useRef","useLocation","HTTP_METHODS","Href","useEffect","useRef","deepEqual","IS_DEV","checkDeps","deps","useDeepCompareMemoize","dependencies","ref","useDeepCompareEffect","callback","useMemo","useModularUIKey","modelKey","url","locale","useLocale","useMemo","useModularUI","modelKey","url","options","dispatch","useBEIDispatch","hrefInstance","useMemo","Href","requestUrl","currentQueryString","prevQueryRef","useRef","key","useModularUIKey","model","useBEISelector","state","requestOptions","merged","HTTP_METHODS","redirectLocation","useLocation","isQueryChanged","shouldLoad","useEffect","useDeepCompareEffect","fetchModel","removeModelByKey","createUseModularUIOptions","options","mustReload","baseOptions","HTTP_METHODS","validateModel","model","expectedModels","useModularUIBasic","defaultKey","href","memoizedHref","useMemo","key","useReload","modularUIOptions","modularUI","useModularUI","modelKey","url","location","useLocation","useModularUIKey","modelEntry","useBEISelector","state","reload","isFullyLoaded","lastModification","useApplication","options","useModularUIBasic","ApplicationModel","useTab","href","TabModel","useCaseView","CaseViewModel","useGroupingPanel","GroupingPanelModel","useDetailPanel","DetailModel","useUserProfile","UserProfileModel","useLogin","Cache","dispatch","useBEIDispatch","application","useApplication","auth","useBEISelector","state","isAuthenticated","primaryAuthenticationType","resetAuthErrors","username","password","login","authenticationType","IllegalStateException","getContextPathServer","useLogout","BASE_PATH","getContextPath","authenticate","Authenticate","INTERNAL_LOGIN_TYPE","origin","url","logout","useEffect","useState","ModularUIRequest","useCallback","useProgressIndicator","dispatch","useBEIDispatch","start","useCallback","startProgress","finish","finishProgress","reset","resetProgress","update","percentComplete","updateProgress","useProgressIndicatorState","useBEISelector","state","useContentFromSourceReferences","sourceReferences","renderChildSections","content","setContent","useState","localeCode","useLocale","start","finish","useProgressIndicator","hrefs","sourceReference","href","index","self","allHrefs","useEffect","requests","modularuiRequest","ModularUIRequest","responseContent","produce","HTTP_METHODS","FormModel","Href","getSetting","useForm","href","data","formHref","Href","getSetting","form","useModularUI","HTTP_METHODS","FormModel","useFormNavigation","dispatch","useBEIDispatch","previousObject","cancelForm","fetchModel","newModel","produce","draft","removeModelByKey","showFormNotification","useAttributeUpdate","formObject","attribute","inputvalue","options","updateFormAttribute","useRepeatableAttributeSet","addRepeatableAttributeSet","object","cancelRepeatableAttributeSet","removeRepeatableAttributeSet","useCallback","useMemo","HTTP_METHODS","AssignmentFilterModel","CaseSearchModel","DetailModel","FilterModel","ListDetailModel","ListModel","useList","href","options","useModularUIBasic","ListModel","useListOrDetail","DetailModel","useListDetail","ListDetailModel","useListNavigation","syncLocation","historyAction","push","replace","useNavigation","dispatch","useBEIDispatch","navigate","update","useCallback","list","resetPage","listHref","HTTP_METHODS","fetchModel","CaseSearchModel","updateFilters","filters","updateFilter","filter","value","attribute","AssignmentFilterModel","filterToUpdate","targetAttr","FilterModel","searchKey","resetFilters","removeFilter","updateSort","sortOption","updatePage","page","updatePageSize","pagesize","useMemo","useEffect","useState","HTTP_METHODS","Href","LookupOptionsModel","useLookup","lookupLink","filterInput","minLength","debounceMs","start","finish","useProgressIndicator","modularuiRequest","useModularUIRequest","lookupOptions","setLookupOptions","useState","lookupLoading","setLookupLoading","href","filterName","method","useEffect","timeoutId","lookupHref","Href","requestOptions","HTTP_METHODS","lookupResponse","LookupOptionsModel","useCallback","IllegalArgumentException","useModal","modalId","IllegalArgumentException","dispatch","useBEIDispatch","modal","useBEISelector","state","m","show","useCallback","showModal","close","closeModal","ConceptIndexModel","ContentIndexModel","ContentTOCModel","ContentTypeModel","Href","ModelCatalogModel","createHref","filterParameters","useModelCatalog","options","useModularUIBasic","ModelCatalogModel","useConceptIndex","href","key","entryDate","useEntryDate","url","filterParameters","ConceptIndexModel","useConceptDetail","concept","location","useLocation","createHref","useContentIndex","ContentIndexModel","useContentTOC","content","ContentTOCModel","useContent","useCompleteSource","contentHref","Href","useContentType","contentType","ContentTypeModel","useRelatedConcepts","getSearchHref","uri","filters","filterString","filterValue","value","useConceptSearch","useContentSearch","dispatch","useBEIDispatch","useBEISelector","getEntryDate","updateEntryDate","ApplicationModel","useAllModelsByInstance","instance","useBEISelector","state","getAllModelsByInstance","useFirstModelByInstance","getFirstModelByInstance","useActiveModelByInstance","getActiveModelByInstance","useModelByHref","href","modelByHref","useKeyByHref","keyByHref","useAllKeysByHref","allKeysByHref","useActiveModels","getActiveModels","useAllFinishedModels","getAllFinishedModels","useCurrentApplication","application","getApplication","ApplicationModel","createSelector","useModels","dispatch","useBEIDispatch","selector","createSelector","state","modularui","models","keys","key","model","modularuiModels","useBEISelector","options","reloadModel","callbackFn","modelsToReload","modelToReload","useNotification","dispatch","useBEIDispatch","render","messageType","message","error","useBEISelector","state","dismissNotification","useErrorNotification","showNotification","useMemo","useState","useLocation","useRouteMatch","CaseSearchModel","DetailModel","GroupingPanelModel","Href","ListModel","useUrl","href","fromRoute","previousUrl","setPreviousUrl","useState","previousExact","setPreviousExact","match","useRouteMatch","location","useLocation","url","useMemo","Href","currentUrl","shouldUpdate","usePanel","options","hookOptions","useModularUIBasic","ListModel","GroupingPanelModel","DetailModel","CaseSearchModel","import_pick","useMemo","createSelector","getPreferences","state","makeSelectPreference","preferenceNames","names","createSelector","preferences","pick","usePreference","selectPreference","useMemo","useBEISelector","CaseSearchModel","useQuicksearch","href","options","useModularUIBasic","CaseSearchModel","useSearch"]}
@@ -0,0 +1,2 @@
1
+ import{getStringSetting as n}from"@beinformed/ui/settings";import{getRepositoryResourceUrl as i}from"@beinformed/ui/utils";var s=()=>{let e=n("SWIM_LANE_DIAGRAM_CONFIGURATION","/Library/Diagrams/Overviews.json");return e.startsWith("/")||(e=`/${e}`),i(e)};var f=(e,o="Component",t)=>{let r=e.displayName||e.name||o;return t?`${r}[${t}]`:r},c=e=>o=>{e.forEach(t=>{typeof t=="function"?t(o):t!=null&&typeof t=="object"&&(t.current=o)})};export{s as a,f as b,c};
2
+ //# sourceMappingURL=chunk-WEJGEXAP.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/utils/swimlane_diagram.ts","../src/utils/utils.ts"],"sourcesContent":["import { getStringSetting } from \"@beinformed/ui/settings\";\nimport { getRepositoryResourceUrl } from \"@beinformed/ui/utils\";\n\n/**\n * Model overview swim lane configuration\n */\nexport const getSwimLaneDiagramConfiguration = () => {\n let configLocation = getStringSetting(\n \"SWIM_LANE_DIAGRAM_CONFIGURATION\",\n \"/Library/Diagrams/Overviews.json\",\n );\n if (!configLocation.startsWith(\"/\")) {\n configLocation = `/${configLocation}`;\n }\n return getRepositoryResourceUrl(configLocation);\n};\n","import type { ComponentType, Ref } from \"react\";\n\nexport const getDisplayName = (\n WrappedComponent: ComponentType<never>,\n defaultName = \"Component\",\n contextId?: string,\n) => {\n const componentName =\n WrappedComponent.displayName || WrappedComponent.name || defaultName;\n\n if (contextId) {\n return `${componentName}[${contextId}]`;\n }\n\n return componentName;\n};\n\nexport const mergeRefs =\n <T>(refs: Ref<T>[]): Ref<T> =>\n (value) => {\n refs.forEach((ref) => {\n if (typeof ref === \"function\") {\n ref(value);\n } else if (ref != null && typeof ref === \"object\") {\n (ref as { current: T | null }).current = value;\n }\n });\n };\n"],"mappings":"AAAA,OAAS,oBAAAA,MAAwB,0BACjC,OAAS,4BAAAC,MAAgC,uBAKlC,IAAMC,EAAkC,IAAM,CACnD,IAAIC,EAAiBH,EACnB,kCACA,kCACF,EACA,OAAKG,EAAe,WAAW,GAAG,IAChCA,EAAiB,IAAIA,CAAc,IAE9BF,EAAyBE,CAAc,CAChD,ECbO,IAAMC,EAAiB,CAC5BC,EACAC,EAAc,YACdC,IACG,CACH,IAAMC,EACJH,EAAiB,aAAeA,EAAiB,MAAQC,EAE3D,OAAIC,EACK,GAAGC,CAAa,IAAID,CAAS,IAG/BC,CACT,EAEaC,EACPC,GACHC,GAAU,CACTD,EAAK,QAASE,GAAQ,CAChB,OAAOA,GAAQ,WACjBA,EAAID,CAAK,EACAC,GAAO,MAAQ,OAAOA,GAAQ,WACtCA,EAA8B,QAAUD,EAE7C,CAAC,CACH","names":["getStringSetting","getRepositoryResourceUrl","getSwimLaneDiagramConfiguration","configLocation","getDisplayName","WrappedComponent","defaultName","contextId","componentName","mergeRefs","refs","value","ref"]}