@beinformed/ui 2.0.0-beta.1 → 2.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 (80) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/{Constants-Cw7d8vue.d.cts → Constants-CYAEbTZ4.d.cts} +13 -1
  3. package/dist/{Constants-Cw7d8vue.d.ts → Constants-CYAEbTZ4.d.ts} +13 -1
  4. package/dist/{FormModel-VQaB1SCS.d.ts → FormModel-Cmzm2g7k.d.ts} +1 -1
  5. package/dist/{FormModel-DnizzHJs.d.cts → FormModel-Qa655sE-.d.cts} +1 -1
  6. package/dist/chunk-24FITWGX.js +2 -0
  7. package/dist/{chunk-WVQSFYWD.js.map → chunk-24FITWGX.js.map} +1 -1
  8. package/dist/chunk-4BYHEGUN.js +2 -0
  9. package/dist/{chunk-6GV6KLAV.js.map → chunk-4BYHEGUN.js.map} +1 -1
  10. package/dist/chunk-GDEYM54A.js +2 -0
  11. package/dist/chunk-GDEYM54A.js.map +1 -0
  12. package/dist/{chunk-VIKUDFQV.js → chunk-GHQP5QNP.js} +2 -2
  13. package/dist/{chunk-UE323PGR.js → chunk-NOB2I3DW.js} +2 -2
  14. package/dist/{chunk-KCZQQTX6.js → chunk-QTZ77JJN.js} +2 -2
  15. package/dist/{chunk-LCMAAW7B.js → chunk-RI2O4J7J.js} +2 -2
  16. package/dist/chunk-SFI46XCV.js +2 -0
  17. package/dist/{chunk-OBB3YOFC.js.map → chunk-SFI46XCV.js.map} +1 -1
  18. package/dist/chunk-VLKSMXSB.js +2 -0
  19. package/dist/chunk-VLKSMXSB.js.map +1 -0
  20. package/dist/{chunk-333J3Q2L.js → chunk-WHWNPOV6.js} +2 -2
  21. package/dist/{chunk-ZDZHA43Q.js → chunk-XWOLLK42.js} +2 -2
  22. package/dist/{chunk-YOBCFXEM.js → chunk-Y3XZHSPE.js} +2 -2
  23. package/dist/constants/index.cjs +1 -1
  24. package/dist/constants/index.cjs.map +1 -1
  25. package/dist/constants/index.d.cts +6 -2
  26. package/dist/constants/index.d.ts +6 -2
  27. package/dist/constants/index.js +1 -1
  28. package/dist/exceptions/index.cjs +1 -1
  29. package/dist/exceptions/index.d.cts +3 -3
  30. package/dist/exceptions/index.d.ts +3 -3
  31. package/dist/exceptions/index.js +1 -1
  32. package/dist/{index-BFD-cKUB.d.cts → index-BxJE8Lob.d.ts} +1 -1
  33. package/dist/{index-CEg8Nt57.d.ts → index-RuAoNZgc.d.cts} +1 -1
  34. package/dist/index.cjs +6 -6
  35. package/dist/index.cjs.map +1 -1
  36. package/dist/index.d.cts +6 -6
  37. package/dist/index.d.ts +6 -6
  38. package/dist/index.js +1 -1
  39. package/dist/layouthints/index.cjs +7 -7
  40. package/dist/layouthints/index.cjs.map +1 -1
  41. package/dist/layouthints/index.d.cts +2 -2
  42. package/dist/layouthints/index.d.ts +2 -2
  43. package/dist/layouthints/index.js +1 -1
  44. package/dist/models/index.cjs +4 -4
  45. package/dist/models/index.cjs.map +1 -1
  46. package/dist/models/index.d.cts +5 -5
  47. package/dist/models/index.d.ts +5 -5
  48. package/dist/models/index.js +1 -1
  49. package/dist/modularui/index.cjs +6 -6
  50. package/dist/modularui/index.cjs.map +1 -1
  51. package/dist/modularui/index.d.cts +35 -8
  52. package/dist/modularui/index.d.ts +35 -8
  53. package/dist/modularui/index.js +1 -1
  54. package/dist/settings/index.cjs +1 -1
  55. package/dist/settings/index.cjs.map +1 -1
  56. package/dist/settings/index.d.cts +5 -1
  57. package/dist/settings/index.d.ts +5 -1
  58. package/dist/settings/index.js +1 -1
  59. package/dist/types/index.d.cts +2 -2
  60. package/dist/types/index.d.ts +2 -2
  61. package/dist/utils/index.cjs +8 -8
  62. package/dist/utils/index.cjs.map +1 -1
  63. package/dist/utils/index.d.cts +3 -3
  64. package/dist/utils/index.d.ts +3 -3
  65. package/dist/utils/index.js +1 -1
  66. package/package.json +4 -4
  67. package/dist/chunk-5BR5HMNQ.js +0 -2
  68. package/dist/chunk-5BR5HMNQ.js.map +0 -1
  69. package/dist/chunk-6GV6KLAV.js +0 -2
  70. package/dist/chunk-BTDN4ZDB.js +0 -2
  71. package/dist/chunk-BTDN4ZDB.js.map +0 -1
  72. package/dist/chunk-OBB3YOFC.js +0 -2
  73. package/dist/chunk-WVQSFYWD.js +0 -2
  74. /package/dist/{chunk-VIKUDFQV.js.map → chunk-GHQP5QNP.js.map} +0 -0
  75. /package/dist/{chunk-UE323PGR.js.map → chunk-NOB2I3DW.js.map} +0 -0
  76. /package/dist/{chunk-KCZQQTX6.js.map → chunk-QTZ77JJN.js.map} +0 -0
  77. /package/dist/{chunk-LCMAAW7B.js.map → chunk-RI2O4J7J.js.map} +0 -0
  78. /package/dist/{chunk-333J3Q2L.js.map → chunk-WHWNPOV6.js.map} +0 -0
  79. /package/dist/{chunk-ZDZHA43Q.js.map → chunk-XWOLLK42.js.map} +0 -0
  80. /package/dist/{chunk-YOBCFXEM.js.map → chunk-Y3XZHSPE.js.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @beinformed/ui
2
2
 
3
+ ## 2.0.0-beta.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 6270090: Update hooks and codemod
8
+
3
9
  ## 2.0.0-beta.1
4
10
 
5
11
  ### Patch Changes
@@ -58,5 +58,17 @@ declare const DEFAULT_AUTHENTICATION_TYPE: {
58
58
  authentication: string;
59
59
  isPrimary: boolean;
60
60
  };
61
+ declare const KEYCODES: {
62
+ TAB: number;
63
+ ENTER: number;
64
+ ESCAPE: number;
65
+ SPACE: number;
66
+ PAGE_UP: number;
67
+ PAGE_DOWN: number;
68
+ ARROW_LEFT: number;
69
+ ARROW_UP: number;
70
+ ARROW_RIGHT: number;
71
+ ARROW_DOWN: number;
72
+ };
61
73
 
62
- export { ATTRIBUTE_WIDTH as A, DATETIME_OFFSET_FORMAT as D, HTTP_METHODS as H, IS_GRAALJS as I, LOGIN_TYPE as L, PARAMETER_TYPES as P, TIMEVERSION_FILTER_NAME as T, IS_SERVER as a, PARAMETER_SEPARATOR as b, ISO_DATE_FORMAT as c, ISO_DATETIME_FORMAT as d, ISO_TIME_FORMAT as e, ISO_TIMESTAMP_FORMAT as f, DEFAULT_WEEK_STARTS_ON as g, DEFAULT_FIRST_WEEK_CONTAINS_DATE as h, INTERNAL_LOGIN_TYPE as i, LOGIN_PATH_SETTING as j, LOGIN_USERNAME_SETTING as k, LOGIN_PASSWORD_SETTING as l, LOGOUT_PATH_SETTING as m, DEFAULT_AUTHENTICATION_TYPE as n };
74
+ export { ATTRIBUTE_WIDTH as A, DATETIME_OFFSET_FORMAT as D, HTTP_METHODS as H, IS_GRAALJS as I, KEYCODES as K, LOGIN_TYPE as L, PARAMETER_TYPES as P, TIMEVERSION_FILTER_NAME as T, IS_SERVER as a, PARAMETER_SEPARATOR as b, ISO_DATE_FORMAT as c, ISO_DATETIME_FORMAT as d, ISO_TIME_FORMAT as e, ISO_TIMESTAMP_FORMAT as f, DEFAULT_WEEK_STARTS_ON as g, DEFAULT_FIRST_WEEK_CONTAINS_DATE as h, INTERNAL_LOGIN_TYPE as i, LOGIN_PATH_SETTING as j, LOGIN_USERNAME_SETTING as k, LOGIN_PASSWORD_SETTING as l, LOGOUT_PATH_SETTING as m, DEFAULT_AUTHENTICATION_TYPE as n };
@@ -58,5 +58,17 @@ declare const DEFAULT_AUTHENTICATION_TYPE: {
58
58
  authentication: string;
59
59
  isPrimary: boolean;
60
60
  };
61
+ declare const KEYCODES: {
62
+ TAB: number;
63
+ ENTER: number;
64
+ ESCAPE: number;
65
+ SPACE: number;
66
+ PAGE_UP: number;
67
+ PAGE_DOWN: number;
68
+ ARROW_LEFT: number;
69
+ ARROW_UP: number;
70
+ ARROW_RIGHT: number;
71
+ ARROW_DOWN: number;
72
+ };
61
73
 
62
- export { ATTRIBUTE_WIDTH as A, DATETIME_OFFSET_FORMAT as D, HTTP_METHODS as H, IS_GRAALJS as I, LOGIN_TYPE as L, PARAMETER_TYPES as P, TIMEVERSION_FILTER_NAME as T, IS_SERVER as a, PARAMETER_SEPARATOR as b, ISO_DATE_FORMAT as c, ISO_DATETIME_FORMAT as d, ISO_TIME_FORMAT as e, ISO_TIMESTAMP_FORMAT as f, DEFAULT_WEEK_STARTS_ON as g, DEFAULT_FIRST_WEEK_CONTAINS_DATE as h, INTERNAL_LOGIN_TYPE as i, LOGIN_PATH_SETTING as j, LOGIN_USERNAME_SETTING as k, LOGIN_PASSWORD_SETTING as l, LOGOUT_PATH_SETTING as m, DEFAULT_AUTHENTICATION_TYPE as n };
74
+ export { ATTRIBUTE_WIDTH as A, DATETIME_OFFSET_FORMAT as D, HTTP_METHODS as H, IS_GRAALJS as I, KEYCODES as K, LOGIN_TYPE as L, PARAMETER_TYPES as P, TIMEVERSION_FILTER_NAME as T, IS_SERVER as a, PARAMETER_SEPARATOR as b, ISO_DATE_FORMAT as c, ISO_DATETIME_FORMAT as d, ISO_TIME_FORMAT as e, ISO_TIMESTAMP_FORMAT as f, DEFAULT_WEEK_STARTS_ON as g, DEFAULT_FIRST_WEEK_CONTAINS_DATE as h, INTERNAL_LOGIN_TYPE as i, LOGIN_PATH_SETTING as j, LOGIN_USERNAME_SETTING as k, LOGIN_PASSWORD_SETTING as l, LOGOUT_PATH_SETTING as m, DEFAULT_AUTHENTICATION_TYPE as n };
@@ -1,4 +1,4 @@
1
- import { aw as ResourceModel, b9 as ContentTypeData, ba as ContentTypeContributions, b5 as ContentDetailData, b6 as ContentDetailContributions, cR as ModularUIResponse, cb as LinkModel, cO as ModelWithChildModels, by as ErrorResponse, aY as SectionModel, bE as FilterCollection, aX as ContentLinkModel, aZ as SubSectionModel, c8 as Href, c_ as HrefState, au as BaseModel, b$ as FormObjectData, c7 as FormObjectContributions, cP as ModelOptions, ac as AttributeModel, a6 as AttributeContributions, bd as ContentConfiguration, e as AttributeCollection, a9 as MaybeAttributeValue, h as BooleanAttributeModel, C as CaptchaAttributeModel, j as ChoiceAttributeModel, a0 as ChoiceAttributeContributions, o as CompositeAttributeModel, a2 as CompositeAttributeContributions, D as DatetimeAttributeModel, _ as DatetimeAttributeContributions, H as HelptextAttributeModel, L as LabelAttributeModel, G as MemoAttributeModel, N as NumberAttributeModel, Y as NumberAttributeContributions, P as PasswordAttributeModel, I as RangeAttributeModel, a3 as RangeAttributeContributions, S as StringAttributeModel, T as StringAttributeContributions, U as UploadAttributeModel, X as XMLAttributeModel, bw as ErrorCollection, c2 as ErrorObjectData, c3 as MissingObjectData, c5 as AnchorElementData, c0 as FormData, c6 as FormContributions, g as AttributeSetModel, cE as Parameter, cF as ParameterCollection, c1 as SuccessData } from './index-CEg8Nt57.js';
1
+ import { aw as ResourceModel, b9 as ContentTypeData, ba as ContentTypeContributions, b5 as ContentDetailData, b6 as ContentDetailContributions, cR as ModularUIResponse, cb as LinkModel, cO as ModelWithChildModels, by as ErrorResponse, aY as SectionModel, bE as FilterCollection, aX as ContentLinkModel, aZ as SubSectionModel, c8 as Href, c_ as HrefState, au as BaseModel, b$ as FormObjectData, c7 as FormObjectContributions, cP as ModelOptions, ac as AttributeModel, a6 as AttributeContributions, bd as ContentConfiguration, e as AttributeCollection, a9 as MaybeAttributeValue, h as BooleanAttributeModel, C as CaptchaAttributeModel, j as ChoiceAttributeModel, a0 as ChoiceAttributeContributions, o as CompositeAttributeModel, a2 as CompositeAttributeContributions, D as DatetimeAttributeModel, _ as DatetimeAttributeContributions, H as HelptextAttributeModel, L as LabelAttributeModel, G as MemoAttributeModel, N as NumberAttributeModel, Y as NumberAttributeContributions, P as PasswordAttributeModel, I as RangeAttributeModel, a3 as RangeAttributeContributions, S as StringAttributeModel, T as StringAttributeContributions, U as UploadAttributeModel, X as XMLAttributeModel, bw as ErrorCollection, c2 as ErrorObjectData, c3 as MissingObjectData, c5 as AnchorElementData, c0 as FormData, c6 as FormContributions, g as AttributeSetModel, cE as Parameter, cF as ParameterCollection, c1 as SuccessData } from './index-BxJE8Lob.js';
2
2
 
3
3
  declare class ContentTypeModel extends ResourceModel<ContentTypeData, ContentTypeContributions> {
4
4
  get type(): string;
@@ -1,4 +1,4 @@
1
- import { aw as ResourceModel, b9 as ContentTypeData, ba as ContentTypeContributions, b5 as ContentDetailData, b6 as ContentDetailContributions, cR as ModularUIResponse, cb as LinkModel, cO as ModelWithChildModels, by as ErrorResponse, aY as SectionModel, bE as FilterCollection, aX as ContentLinkModel, aZ as SubSectionModel, c8 as Href, c_ as HrefState, au as BaseModel, b$ as FormObjectData, c7 as FormObjectContributions, cP as ModelOptions, ac as AttributeModel, a6 as AttributeContributions, bd as ContentConfiguration, e as AttributeCollection, a9 as MaybeAttributeValue, h as BooleanAttributeModel, C as CaptchaAttributeModel, j as ChoiceAttributeModel, a0 as ChoiceAttributeContributions, o as CompositeAttributeModel, a2 as CompositeAttributeContributions, D as DatetimeAttributeModel, _ as DatetimeAttributeContributions, H as HelptextAttributeModel, L as LabelAttributeModel, G as MemoAttributeModel, N as NumberAttributeModel, Y as NumberAttributeContributions, P as PasswordAttributeModel, I as RangeAttributeModel, a3 as RangeAttributeContributions, S as StringAttributeModel, T as StringAttributeContributions, U as UploadAttributeModel, X as XMLAttributeModel, bw as ErrorCollection, c2 as ErrorObjectData, c3 as MissingObjectData, c5 as AnchorElementData, c0 as FormData, c6 as FormContributions, g as AttributeSetModel, cE as Parameter, cF as ParameterCollection, c1 as SuccessData } from './index-BFD-cKUB.cjs';
1
+ import { aw as ResourceModel, b9 as ContentTypeData, ba as ContentTypeContributions, b5 as ContentDetailData, b6 as ContentDetailContributions, cR as ModularUIResponse, cb as LinkModel, cO as ModelWithChildModels, by as ErrorResponse, aY as SectionModel, bE as FilterCollection, aX as ContentLinkModel, aZ as SubSectionModel, c8 as Href, c_ as HrefState, au as BaseModel, b$ as FormObjectData, c7 as FormObjectContributions, cP as ModelOptions, ac as AttributeModel, a6 as AttributeContributions, bd as ContentConfiguration, e as AttributeCollection, a9 as MaybeAttributeValue, h as BooleanAttributeModel, C as CaptchaAttributeModel, j as ChoiceAttributeModel, a0 as ChoiceAttributeContributions, o as CompositeAttributeModel, a2 as CompositeAttributeContributions, D as DatetimeAttributeModel, _ as DatetimeAttributeContributions, H as HelptextAttributeModel, L as LabelAttributeModel, G as MemoAttributeModel, N as NumberAttributeModel, Y as NumberAttributeContributions, P as PasswordAttributeModel, I as RangeAttributeModel, a3 as RangeAttributeContributions, S as StringAttributeModel, T as StringAttributeContributions, U as UploadAttributeModel, X as XMLAttributeModel, bw as ErrorCollection, c2 as ErrorObjectData, c3 as MissingObjectData, c5 as AnchorElementData, c0 as FormData, c6 as FormContributions, g as AttributeSetModel, cE as Parameter, cF as ParameterCollection, c1 as SuccessData } from './index-RuAoNZgc.cjs';
2
2
 
3
3
  declare class ContentTypeModel extends ResourceModel<ContentTypeData, ContentTypeContributions> {
4
4
  get type(): string;
@@ -0,0 +1,2 @@
1
+ var o="/content",t="/uploadFile",e="/captchaServices",A="/change-password",c="/user",r="/resource",s="/change-avatar";export{o as a,t as b,e as c,A as d,c as e,r as f,s as g};
2
+ //# sourceMappingURL=chunk-24FITWGX.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/constants/Paths.ts"],"sourcesContent":["/**\n * path to contentconfiguration service\n */\nexport const CONTENT_PATH = `/content`;\n\n/**\n * Upload Path\n */\nexport const UPLOAD_PATH = `/uploadFile`;\n\n/**\n * Captcha Path\n */\nexport const CAPTCHA_PATH = `/captchaServices`;\n\n/**\n * Path to change password page / component\n */\nexport const CHANGEPASSWORD_PATH = \"/change-password\";\n\n/**\n * Path to user profile page / component\n */\nexport const USERPROFILE_PATH = \"/user\";\n\n/**\n * Path to resources in the Be Informed repository\n */\nexport const RESOURCE_PATH = \"/resource\";\n"],"mappings":"AAGO,IAAMA,EAAe,WAKfC,EAAc,cAKdC,EAAe,mBAKfC,EAAsB,mBAKtBC,EAAmB,QAKnBC,EAAgB","names":["CONTENT_PATH","UPLOAD_PATH","CAPTCHA_PATH","CHANGEPASSWORD_PATH","USERPROFILE_PATH","RESOURCE_PATH"]}
1
+ {"version":3,"sources":["../src/constants/Paths.ts"],"sourcesContent":["/**\n * path to contentconfiguration service\n */\nexport const CONTENT_PATH = `/content`;\n\n/**\n * Upload Path\n */\nexport const UPLOAD_PATH = `/uploadFile`;\n\n/**\n * Captcha Path\n */\nexport const CAPTCHA_PATH = `/captchaServices`;\n\n/**\n * Path to change password page / component\n */\nexport const CHANGEPASSWORD_PATH = \"/change-password\";\n\n/**\n * Path to user profile page / component\n */\nexport const USERPROFILE_PATH = \"/user\";\n\n/**\n * Path to resources in the Be Informed repository\n */\nexport const RESOURCE_PATH = \"/resource\";\n\n/**\n * Path to change avatar page / component\n */\nexport const CHANGEAVATAR_PATH = \"/change-avatar\";\n"],"mappings":"AAGO,IAAMA,EAAe,WAKfC,EAAc,cAKdC,EAAe,mBAKfC,EAAsB,mBAKtBC,EAAmB,QAKnBC,EAAgB,YAKhBC,EAAoB","names":["CONTENT_PATH","UPLOAD_PATH","CAPTCHA_PATH","CHANGEPASSWORD_PATH","USERPROFILE_PATH","RESOURCE_PATH","CHANGEAVATAR_PATH"]}
@@ -0,0 +1,2 @@
1
+ var _=Object.create;var E=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var O=Object.getPrototypeOf,R=Object.prototype.hasOwnProperty;var C=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var M=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let A of s(t))!R.call(e,A)&&A!==o&&E(e,A,{get:()=>t[A],enumerable:!(n=S(t,A))||n.enumerable});return e};var T=(e,t,o)=>(o=e!=null?_(O(e)):{},M(t||!e||!e.__esModule?E(o,"default",{value:e,enumerable:!0}):o,e));var x=typeof Graal<"u",y=x,p=(o=>(o.GET="GET",o.POST="POST",o))(p||{}),m=(o=>(o.BODY="bodyParameter",o.QUERY="queryParameter",o))(m||{}),i="~",G="entryDate",I="yyyy-MM-dd",u="yyyy-MM-dd'T'HH:mm:ss",L="HH:mm:ss",P="yyyy-MM-dd'T'HH:mm:ss.SSS",l="xxx",d=1,D=1,c=(r=>(r.EXTRA_SMALL="EXTRA_SMALL",r.SMALL="SMALL",r.MEDIUM="MEDIUM",r.LARGE="LARGE",r.EXTRA_LARGE="EXTRA_LARGE",r))(c||{}),F=(A=>(A.JAAS="JAAS",A.PAC4J_FORM="PAC4J_FORM",A.PAC4J_BASIC="PAC4J_BASIC",A.PAC4J_INDIRECT="PAC4J_INDIRECT",A))(F||{}),J="security.clients",N="FormClient.login_url",U="FormClient.username_field_name",f="FormClient.password_field_name",W="FormClient.logout_url",X={name:"Form based authentication",authentication:"DefaultFormClient",isPrimary:!0},K={TAB:9,ENTER:13,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,ARROW_LEFT:37,ARROW_UP:38,ARROW_RIGHT:39,ARROW_DOWN:40};export{C as a,T as b,x as c,y as d,p as e,m as f,i as g,G as h,I as i,u as j,L as k,P as l,l as m,d as n,D as o,c as p,F as q,J as r,N as s,U as t,f as u,W as v,X as w,K as x};
2
+ //# sourceMappingURL=chunk-4BYHEGUN.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/constants/Constants.ts"],"sourcesContent":["export const IS_GRAALJS = typeof Graal !== \"undefined\";\nexport const IS_SERVER = IS_GRAALJS;\n\nexport enum HTTP_METHODS {\n GET = \"GET\",\n POST = \"POST\",\n}\n\nexport enum PARAMETER_TYPES {\n BODY = \"bodyParameter\",\n QUERY = \"queryParameter\",\n}\n\n/**\n * Separator for parameters of a list, makes it possible to render multiple lists on a page in a non-js environment\n */\nexport const PARAMETER_SEPARATOR = \"~\";\n\n/**\n * Timeversion filter name\n */\nexport const TIMEVERSION_FILTER_NAME = \"entryDate\";\n\nexport const ISO_DATE_FORMAT = \"yyyy-MM-dd\";\nexport const ISO_DATETIME_FORMAT = \"yyyy-MM-dd'T'HH:mm:ss\";\nexport const ISO_TIME_FORMAT = \"HH:mm:ss\";\nexport const ISO_TIMESTAMP_FORMAT = \"yyyy-MM-dd'T'HH:mm:ss.SSS\";\n\n/**\n * Offset format is appended to iso datetime and timestamp when isIncludeTimeOffsetInDateTimes = true\n */\nexport const DATETIME_OFFSET_FORMAT = \"xxx\";\n\n/**\n * week starts on monday by default\n */\nexport const DEFAULT_WEEK_STARTS_ON = 1;\n\n/**\n * first week indicated by the 1st of january\n */\nexport const DEFAULT_FIRST_WEEK_CONTAINS_DATE = 1;\n\n/**\n * ATTRIBUTE WIDTH\n */\nexport enum ATTRIBUTE_WIDTH {\n EXTRA_SMALL = \"EXTRA_SMALL\",\n SMALL = \"SMALL\",\n MEDIUM = \"MEDIUM\",\n LARGE = \"LARGE\",\n EXTRA_LARGE = \"EXTRA_LARGE\",\n}\n\nexport enum INTERNAL_LOGIN_TYPE {\n JAAS = \"JAAS\",\n PAC4J_FORM = \"PAC4J_FORM\",\n PAC4J_BASIC = \"PAC4J_BASIC\",\n PAC4J_INDIRECT = \"PAC4J_INDIRECT\",\n}\n\nexport const LOGIN_TYPE = \"security.clients\";\nexport const LOGIN_PATH_SETTING = \"FormClient.login_url\";\nexport const LOGIN_USERNAME_SETTING = \"FormClient.username_field_name\";\nexport const LOGIN_PASSWORD_SETTING = \"FormClient.password_field_name\";\nexport const LOGOUT_PATH_SETTING = \"FormClient.logout_url\";\n\nexport const DEFAULT_AUTHENTICATION_TYPE = {\n name: \"Form based authentication\",\n authentication: \"DefaultFormClient\",\n isPrimary: true,\n};\n"],"mappings":"ygBAAO,IAAMA,EAAa,OAAO,MAAU,IAC9BC,EAAYD,EAEbE,OACVA,EAAA,IAAM,MACNA,EAAA,KAAO,OAFGA,OAAA,IAKAC,OACVA,EAAA,KAAO,gBACPA,EAAA,MAAQ,iBAFEA,OAAA,IAQCC,EAAsB,IAKtBC,EAA0B,YAE1BC,EAAkB,aAClBC,EAAsB,wBACtBC,EAAkB,WAClBC,EAAuB,4BAKvBC,EAAyB,MAKzBC,EAAyB,EAKzBC,EAAmC,EAKpCC,OACVA,EAAA,YAAc,cACdA,EAAA,MAAQ,QACRA,EAAA,OAAS,SACTA,EAAA,MAAQ,QACRA,EAAA,YAAc,cALJA,OAAA,IAQAC,OACVA,EAAA,KAAO,OACPA,EAAA,WAAa,aACbA,EAAA,YAAc,cACdA,EAAA,eAAiB,iBAJPA,OAAA,IAOCC,EAAa,mBACbC,EAAqB,uBACrBC,EAAyB,iCACzBC,EAAyB,iCACzBC,EAAsB,wBAEtBC,EAA8B,CACzC,KAAM,4BACN,eAAgB,oBAChB,UAAW,EACb","names":["IS_GRAALJS","IS_SERVER","HTTP_METHODS","PARAMETER_TYPES","PARAMETER_SEPARATOR","TIMEVERSION_FILTER_NAME","ISO_DATE_FORMAT","ISO_DATETIME_FORMAT","ISO_TIME_FORMAT","ISO_TIMESTAMP_FORMAT","DATETIME_OFFSET_FORMAT","DEFAULT_WEEK_STARTS_ON","DEFAULT_FIRST_WEEK_CONTAINS_DATE","ATTRIBUTE_WIDTH","INTERNAL_LOGIN_TYPE","LOGIN_TYPE","LOGIN_PATH_SETTING","LOGIN_USERNAME_SETTING","LOGIN_PASSWORD_SETTING","LOGOUT_PATH_SETTING","DEFAULT_AUTHENTICATION_TYPE"]}
1
+ {"version":3,"sources":["../src/constants/Constants.ts"],"sourcesContent":["export const IS_GRAALJS = typeof Graal !== \"undefined\";\nexport const IS_SERVER = IS_GRAALJS;\n\nexport enum HTTP_METHODS {\n GET = \"GET\",\n POST = \"POST\",\n}\n\nexport enum PARAMETER_TYPES {\n BODY = \"bodyParameter\",\n QUERY = \"queryParameter\",\n}\n\n/**\n * Separator for parameters of a list, makes it possible to render multiple lists on a page in a non-js environment\n */\nexport const PARAMETER_SEPARATOR = \"~\";\n\n/**\n * Timeversion filter name\n */\nexport const TIMEVERSION_FILTER_NAME = \"entryDate\";\n\nexport const ISO_DATE_FORMAT = \"yyyy-MM-dd\";\nexport const ISO_DATETIME_FORMAT = \"yyyy-MM-dd'T'HH:mm:ss\";\nexport const ISO_TIME_FORMAT = \"HH:mm:ss\";\nexport const ISO_TIMESTAMP_FORMAT = \"yyyy-MM-dd'T'HH:mm:ss.SSS\";\n\n/**\n * Offset format is appended to iso datetime and timestamp when isIncludeTimeOffsetInDateTimes = true\n */\nexport const DATETIME_OFFSET_FORMAT = \"xxx\";\n\n/**\n * week starts on monday by default\n */\nexport const DEFAULT_WEEK_STARTS_ON = 1;\n\n/**\n * first week indicated by the 1st of january\n */\nexport const DEFAULT_FIRST_WEEK_CONTAINS_DATE = 1;\n\n/**\n * ATTRIBUTE WIDTH\n */\nexport enum ATTRIBUTE_WIDTH {\n EXTRA_SMALL = \"EXTRA_SMALL\",\n SMALL = \"SMALL\",\n MEDIUM = \"MEDIUM\",\n LARGE = \"LARGE\",\n EXTRA_LARGE = \"EXTRA_LARGE\",\n}\n\nexport enum INTERNAL_LOGIN_TYPE {\n JAAS = \"JAAS\",\n PAC4J_FORM = \"PAC4J_FORM\",\n PAC4J_BASIC = \"PAC4J_BASIC\",\n PAC4J_INDIRECT = \"PAC4J_INDIRECT\",\n}\n\nexport const LOGIN_TYPE = \"security.clients\";\nexport const LOGIN_PATH_SETTING = \"FormClient.login_url\";\nexport const LOGIN_USERNAME_SETTING = \"FormClient.username_field_name\";\nexport const LOGIN_PASSWORD_SETTING = \"FormClient.password_field_name\";\nexport const LOGOUT_PATH_SETTING = \"FormClient.logout_url\";\n\nexport const DEFAULT_AUTHENTICATION_TYPE = {\n name: \"Form based authentication\",\n authentication: \"DefaultFormClient\",\n isPrimary: true,\n};\n\nexport const KEYCODES = {\n TAB: 9,\n ENTER: 13,\n ESCAPE: 27,\n SPACE: 32,\n PAGE_UP: 33,\n PAGE_DOWN: 34,\n ARROW_LEFT: 37,\n ARROW_UP: 38,\n ARROW_RIGHT: 39,\n ARROW_DOWN: 40,\n};\n"],"mappings":"ygBAAO,IAAMA,EAAa,OAAO,MAAU,IAC9BC,EAAYD,EAEbE,OACVA,EAAA,IAAM,MACNA,EAAA,KAAO,OAFGA,OAAA,IAKAC,OACVA,EAAA,KAAO,gBACPA,EAAA,MAAQ,iBAFEA,OAAA,IAQCC,EAAsB,IAKtBC,EAA0B,YAE1BC,EAAkB,aAClBC,EAAsB,wBACtBC,EAAkB,WAClBC,EAAuB,4BAKvBC,EAAyB,MAKzBC,EAAyB,EAKzBC,EAAmC,EAKpCC,OACVA,EAAA,YAAc,cACdA,EAAA,MAAQ,QACRA,EAAA,OAAS,SACTA,EAAA,MAAQ,QACRA,EAAA,YAAc,cALJA,OAAA,IAQAC,OACVA,EAAA,KAAO,OACPA,EAAA,WAAa,aACbA,EAAA,YAAc,cACdA,EAAA,eAAiB,iBAJPA,OAAA,IAOCC,EAAa,mBACbC,EAAqB,uBACrBC,EAAyB,iCACzBC,EAAyB,iCACzBC,EAAsB,wBAEtBC,EAA8B,CACzC,KAAM,4BACN,eAAgB,oBAChB,UAAW,EACb,EAEaC,EAAW,CACtB,IAAK,EACL,MAAO,GACP,OAAQ,GACR,MAAO,GACP,QAAS,GACT,UAAW,GACX,WAAY,GACZ,SAAU,GACV,YAAa,GACb,WAAY,EACd","names":["IS_GRAALJS","IS_SERVER","HTTP_METHODS","PARAMETER_TYPES","PARAMETER_SEPARATOR","TIMEVERSION_FILTER_NAME","ISO_DATE_FORMAT","ISO_DATETIME_FORMAT","ISO_TIME_FORMAT","ISO_TIMESTAMP_FORMAT","DATETIME_OFFSET_FORMAT","DEFAULT_WEEK_STARTS_ON","DEFAULT_FIRST_WEEK_CONTAINS_DATE","ATTRIBUTE_WIDTH","INTERNAL_LOGIN_TYPE","LOGIN_TYPE","LOGIN_PATH_SETTING","LOGIN_USERNAME_SETTING","LOGIN_PASSWORD_SETTING","LOGOUT_PATH_SETTING","DEFAULT_AUTHENTICATION_TYPE","KEYCODES"]}
@@ -0,0 +1,2 @@
1
+ import{a as N}from"./chunk-Y3XZHSPE.js";import{b as m,c}from"./chunk-VLKSMXSB.js";import{f as D}from"./chunk-WHWNPOV6.js";import{Ea as z,Fa as V,Ga as G,Ia as W,Ka as Y,La as Q,Ua as K,Wa as X,Xa as C,Ya as Z,bb as _,db as u,e as I,eb as tt,j as v,k as J,o as q,pb as et,rb as ot,s as j,t as x,ub as it,vb as rt,wb as nt,x as B,xb as st,yb as at}from"./chunk-RI2O4J7J.js";import{l as $}from"./chunk-QTZ77JJN.js";import{a as F,b as p}from"./chunk-GHQP5QNP.js";import{a}from"./chunk-VGAPPKHA.js";import{A as U,B as w,h as f,o as T,p as S,q as O,r as k,s as L,v as h,x as l}from"./chunk-SFI46XCV.js";import{g as M}from"./chunk-NOB2I3DW.js";import{b as A,h as R,q as H}from"./chunk-4BYHEGUN.js";var lt=class{_isBasicAuthentication;_authenticationType;constructor(){this._isBasicAuthentication=!1,this._authenticationType=this.getAuthenticationType()}getAuthenticationType(){let t=T(),e=H[t];return!e||e==="JAAS"?"JAAS":e==="PAC4J_FORM"||t.includes("FormClient")?"PAC4J_FORM":e==="PAC4J_BASIC"||t.includes("IndirectBasicClient")?"PAC4J_BASIC":"PAC4J_INDIRECT"}get authenticationType(){return this._authenticationType}set authenticationType(t){this._authenticationType=t}get isBasicAuthentication(){return this._isBasicAuthentication||this.authenticationType==="PAC4J_BASIC"}set isBasicAuthentication(t){this._isBasicAuthentication=t}requestLogin(){return c({url:`${h()}/login`,method:"GET",headers:{Accept:"application/json","Content-Type":"application/x-www-form-urlencoded"}})}initLogin(t){return this.isBasicAuthentication||!t?Promise.resolve(!0):this.requestLogin().catch(e=>(e instanceof D&&(this.isBasicAuthentication=!0),Promise.resolve({})))}login(t,e){switch(this.authenticationType){case"PAC4J_FORM":return this.doFormLogin(t,e);case"PAC4J_BASIC":return this.doBasicAuthentication(t,e);case"PAC4J_INDIRECT":return Promise.resolve();default:return this.doJaasAuthentication(t,e)}}getFormLoginUrl(){switch(this.authenticationType){case"PAC4J_BASIC":return`${h()}${S("DirectBasicAuthClient")}`;case"PAC4J_FORM":return`${h()}${S("FormClient")}`;case"PAC4J_INDIRECT":return"";default:return`${h()}/j_security_check`}}getFormLoginData(t,e){let i=encodeURIComponent(t),r=encodeURIComponent(e);switch(this.authenticationType){case"PAC4J_BASIC":case"PAC4J_FORM":return`${O()}=${i}&${k()}=${r}`;case"JAAS":return`j_username=${i}&j_password=${r}`;default:return""}}doFormLogin(t,e){return c({url:this.getFormLoginUrl(),method:"POST",headers:{Accept:"application/json","Content-Type":"application/x-www-form-urlencoded"},data:this.getFormLoginData(t,e)})}doBasicAuthentication(t,e){return p.addItem("basic",btoa(`${t}:${e}`)),this.requestLogin()}doJaasAuthentication(t,e){return this.initLogin(!0).then(()=>this.isBasicAuthentication?(p.removeItem("basic-ok"),this.doBasicAuthentication(t,e).then(()=>{p.addItem("basic-ok",!0)})):this.doFormLogin(t,e))}getLogoutUrl(){let t=T();return!t||t==="JAAS"?`${h()}/Logoff`:`${h()}${L()}`}redirectToLogout(t){p.clear();let e=window.location.origin,i=t?.startsWith("http")?t:`${e}${h()}`;window.location.assign(this.getLogoutUrl()+"?url="+i)}logout(){return c({url:this.getLogoutUrl()}).then(t=>(p.clear(),t))}};var ht=class{_tokenId;_image;_origin="";_contextPath=l();CaptchaRequest(t){this._origin=t?.origin||"",this._contextPath=t?.contextPath||l()}captchaResponse(t){return this._tokenId="tokenId"in t?t.tokenId:this._tokenId,this._image="image"in t?t.image:this._image,{tokenId:this._tokenId,image:this._image,valid:"valid"in t?t.valid:!1,error:"error"in t?t.error:null}}init(){return m({url:w(this._contextPath,this._origin)}).then(t=>this.captchaResponse(t))}send(t){return m({url:w(this._contextPath,this._origin),method:"POST",data:{tokenId:this._tokenId??"",answer:t??""}}).then(e=>this.captchaResponse(e)).catch(e=>this.captchaResponse(e.response))}refresh(){return this.init()}};var g=class o extends Error{response;href;constructor(t,e,i){super(t),Object.setPrototypeOf(this,o.prototype),this.response=e,this.href=i,"captureStackTrace"in Error&&typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(t).stack}get resource(){return this.href}};var ct=A(F(),1);var E=[{name:"Application",isMatch:({resourcetype:o})=>o==="Application",Model:G},{name:"Tab",isMatch:({resourcetype:o})=>o.endsWith("Tab")||o.endsWith("KnowledgeBank"),Model:st},{name:"ListDetail",isMatch:({resourcetype:o})=>{let t=o.toLowerCase();return t.endsWith("listdetail")||t.endsWith("listpaneldetail")||t.endsWith("datastorepaneldetail")},Model:tt},{name:"List",isMatch:({resourcetype:o})=>o.endsWith("List")||o.endsWith("ListPanel")||o.endsWith("RelatedDataStorePanel")||o.endsWith("RelatedDatastorePanel")||["list-related-cases","RecordPanel","EventHistoryPanel","NotePanel","AppointmentPanel","DocumentPanel","AssignmentPanel"].includes(o),Model:et},{name:"GroupingPanel",isMatch:({resourcetype:o})=>["GroupingPanel","CaseTabGroupingPanel","TabGroupingPanel"].includes(o),Model:rt},{name:"CaseSearch",isMatch:({resourcetype:o})=>o==="CaseSearch",Model:nt},{name:"CaseView",isMatch:({resourcetype:o})=>o==="CaseView",Model:Q},{name:"Detail",isMatch:({resourcetype:o})=>o.endsWith("DetailPanel")||["Detail","CasePropertiesPanel","CasePropertiesPanelDetail"].includes(o),Model:W},{name:"TaskGroup",isMatch:({resourcetype:o})=>o==="TaskGroup",Model:Y},{name:"Form",isMatch:({resourcetype:o})=>o==="Form",Model:u},{name:"User",isMatch:({resourcetype:o})=>o==="userdata",Model:z},{name:"UserProfile",isMatch:({resourcetype:o})=>o==="userdata",Model:at},{name:"UserServices",isMatch:({resourcetype:o})=>o==="user_services",Model:V},{name:"ModelCatalog",isMatch:({resourcetype:o})=>o==="ModelCatalog",Model:it},{name:"ConceptIndex",isMatch:({resourcetype:o})=>o==="ConceptSearch"||o.toLowerCase()==="relatedconcepts",Model:K},{name:"ConceptDetail",isMatch:({resourcetype:o})=>o==="ConceptDetail",Model:j},{name:"ConceptTypeDetail",isMatch:({resourcetype:o})=>o==="ConceptTypeDetail",Model:J},{name:"ContentIndex",isMatch:({resourcetype:o})=>o==="ContentSearch",Model:X},{name:"ContentTOC",isMatch:({resourcetype:o})=>o==="ContentTOC",Model:Z},{name:"Content",isMatch:({resourcetype:o})=>o==="ContentDetail",Model:C},{name:"ContentType",isMatch:({resourcetype:o})=>o==="ContentTypeDetail",Model:q},{name:"LookupOptions",isMatch:({resourcetype:o})=>o==="lookupOptions",Model:ot}];var y=class{static resolve(t,e,i=!1){if(!t)throw new a("No data or contribution available, cannot resolve model");if(!(0,ct.has)(t.contributions,"resourcetype"))throw new a(`Contributions has wrong format, missing resourcetype property in contributions of ${t.requestHref?.toString()}`);if(e){let n=Array.isArray(e)?e:[e];return n.length===1||i?n[0]:E.find(s=>s.isMatch(t)&&n.includes(s.Model))?.Model}return E.find(n=>n.isMatch(t))?.Model}};var pt=A(F(),1);import ft from"deepmerge";import{klona as mt}from"klona/full";var dt=class o{_response=new I;_href;_options;_targetModel;_forceTargetModel=!1;_contributionsHref;_locale="en";_method="GET";_progressEvent;_origin="";_contextPath=l();_layoutHintProcessor;constructor(t,e={}){if(!t)throw new a("You must pass a href to the resource that is requested");this._href=typeof t=="string"?new $(t):t,this._options=e,this._layoutHintProcessor=new N(this._origin,this._contextPath,this.options),this._response=new I,this._response.requestHref=this.href,this.locale=this.getRequestLocale(e.locale),this._response.parameters=this.href.parameters.all,this.contextPath=e.contextPath||this.href.contextPath,this.origin=e.origin||this.href.origin,this._targetModel=e.targetModel,this.method=e.method||this.href.method}getRequestLocale(t){return t||typeof navigator<"u"&&navigator?.language&&navigator.language.split("-")[0]||"en"}get origin(){return this._origin}set origin(t){this._origin=t??"",this._response.origin=t??"",this._layoutHintProcessor.setOrigin(this._origin)}get contextPath(){return this._contextPath}set contextPath(t){let e=t??l();this._contextPath=e,this._response.contextPath=e,this._layoutHintProcessor.setContextPath(e)}get contributionsHref(){return this._contributionsHref}set contributionsHref(t){this._contributionsHref=t}set locale(t){this._locale=t,this._response.locale=t,this._layoutHintProcessor.setRequestOptions(this.options)}get locale(){return this._locale}get response(){return this._response}set href(t){this._href=t}get href(){return this._href}set method(t){this._method=t}get method(){return this._method}get options(){return{...this._options,locale:this.locale,method:this.method}}set options(t){this._options=t,this._layoutHintProcessor.setRequestOptions(t)}get requestOptions(){let{targetModel:t,forceTargetModel:e,updateHandler:i,childmodels:r,isValidationRequest:n,removeOnUnmount:d,...s}=this.options;return s}get withChildModels(){return!("childmodels"in this.options)||this.options.childmodels===!0}set targetModel(t){this._targetModel=t}get targetModel(){return this._targetModel}set forceTargetModel(t){this._forceTargetModel=t??!1}get forceTargetModel(){return this._forceTargetModel}resolveModel(){let t=y.resolve(this.response,this.targetModel,this.forceTargetModel);if(t)return t;let e=this.href.toString(),i=this.response?.resourcetype||"unknown";if(this.targetModel){let r=Array.isArray(this.targetModel)?this.targetModel.map(n=>n.type||n.name).join(", "):this.targetModel.type||this.targetModel.name;throw new M(`Cannot find a matching model for URL: '${e}', resourcetype: '${i}'. Available overrides: [${r}]`)}throw new M(`No JavaScript model is applicable for the request to ${e}. Response resourcetype: '${i}'.`)}createModel(){let t=this.resolveModel();return new t(this.response)}processContributionsService(t){if(!(0,pt.isPlainObject)(t))throw new a("Missing contributions data or contributions is not JSON");if(typeof t=="object"&&t!=null){let e=t,[i]=Object.keys(e),r=e[i];i==="error"&&this.handleContributionsError(r),typeof r=="object"&&r!=null&&(this.response.key in r||(this.response.key=i),this.response.contributions=r)}}handleContributionsError(t){let e=t.properties?.message??"Error in contribution";throw new g(e,t,this.contributionsHref)}handleDataError(t){if(typeof t=="object"&&t.properties){let e=t.properties?.message??"Error in data";throw new g(e,t,this.href.absolutepath.toString())}throw new a(JSON.stringify(t))}handleData(t,e){this.response.key=t,this.response.data=e;let i=e?._links;if(!i)throw new a(`No _links object found in the data of ${this.href.toString()}`);if(i?.contributions)this.contributionsHref=i.contributions.href;else if(Array.isArray(i)&&i[0].contributions)this.contributionsHref=i[0].contributions.href;else throw new a(`Contributions link not found for data with key ${t}`)}processDataService(t){if(typeof t!="object"||t===null)throw new a("Missing data or data is not JSON");let e=t,[i]=Object.keys(e),r=e[i];if(i==="error")this.handleDataError(r);else{let[n]=Object.keys(t);this.handleData(n,r)}}fetchContributionsService(){if(!this.contributionsHref)throw new M("Missing a contributions href");return c({url:`${this.origin}${this.contextPath}${this.contributionsHref}`,cache:!0,locale:this.options.locale})}fetchDataService(){return c({...this.requestOptions,url:`${this.origin}${this.contextPath}${this.href.path}`,params:this.href.getQuerystringForModularUI(),locale:this.options.locale,onProgress:this.onProgress})}set onProgress(t){this._progressEvent=t}get onProgress(){return this._progressEvent}getDynamicValidationData(t){let e=typeof this.options.data=="string"?JSON.parse(this.options.data):this.options.data;if(t instanceof u){let i=JSON.parse(t.validationData);return JSON.stringify(ft(e||{},i))}return JSON.stringify(e)??"{}"}async loadDynamicValidations(t){if(!this.options.isValidationRequest&&f("USE_INSTANT_SERVER_VALIDATION")&&t instanceof u&&t.currentFormObject?.hasDynamicValidations){let e=this.href.setParameter("commit","false"),i=await c({...this.requestOptions,url:`${this.origin}${this.contextPath}${this.href.path}`,params:e.getQuerystringForModularUI(),data:this.getDynamicValidationData(t)});if(i==null||typeof i!="object")return t;let r=i,[n]=Object.keys(r);return t.updateValidations(r[n])}return t}fetchFromCache(){return this.options={...this.options,cache:!0},this.fetch()}fetchChildModels(t){let i=t.getInitialChildModelLinks().map(r=>{let n=new o(r.href,{locale:this.locale});return r.targetModel&&(n.targetModel=r.targetModel),r.isCacheable?n.fetchFromCache():n.fetch()});return Promise.allSettled(i).then(r=>{let n=[],d=[];return r.forEach(s=>{if(s.status==="rejected"){let{reason:P}=s;P.name!=="Error.ChangePasswordRequired"&&console.debug("Unexpected error when retrieving child model:",P),d.push(new _(P,"",{origin:this.origin,contextPath:this.contextPath}))}else n.push(s.value)}),t instanceof v&&t.addChildModels(n,d),t})}async fetchContent(t){let e=await this.fetchFromCache();return t&&e instanceof C&&e.childSectionLinks.length>0?this.fetchContentChildSections(e):e}async fetchContentChildSections(t){let e=mt(t),i=await Promise.all(t.childSectionLinks.map(r=>{let n=r.selfhref.addParameter(R,t.entryDate);return new o(n,{locale:this.locale}).fetchContent(!0)}));return e.childSections=i.filter(r=>r instanceof B),e}async fetch(){let t=await this.fetchDataService();if(t==null)throw new Error(`No data received for ${this.href.toString()}`);this.processDataService(t);let e=await this.fetchContributionsService();if(e==null)throw new Error(`No contributions data received for ${this.contributionsHref}`);this.processContributionsService(e),await this._layoutHintProcessor.processAsyncLayoutHints(this.response);let i=this.createModel(),r=await this.loadDynamicValidations(i);return this.withChildModels?await this.fetchChildModels(r):r}post(t){return this.method="POST",this.options={...this.options,data:t},this.fetch()}postForm(t){return this.method="POST",this.options={...this.options,data:t.formdata},this.fetch().then(e=>e instanceof u?t.update(e):t)}fetchSync(){let t={headers:{"Accept-Language":this.locale}},e=dataFetcher.fetch(this.href.toString(),t);if(e==null)throw new Error(`No data received for ${this.href.toString()}`);if(this.processDataService(JSON.parse(e)),this.contributionsHref==null)throw new Error(`No constributions received for ${this.href.toString()}`);let i=dataFetcher.fetch(this.contributionsHref.toString(),t);if(i==null)throw new Error(`No constributions received for ${this.contributionsHref.toString()}`);this.processContributionsService(JSON.parse(i));let r=this.createModel(),d=r.getInitialChildModelLinks().map(s=>new o(s.href,{locale:this.locale}).fetchSync());return r instanceof v&&r.addChildModels(d,[]),r}};var ut=class{_uploadConstraints;_progressHandler;_origin="";_contextPath=l();constructor(t,e,i){this._uploadConstraints=t,this._progressHandler=e,this._origin=i?.origin||"",this._contextPath=i?.contextPath||l()}getFileExtension(t){return t.name.split(".").pop()?.toLowerCase()||""}isNotAllowedFileType(t){let e=this._uploadConstraints.fileTypes;if(e.length>0){let i=this.getFileExtension(t);return!e.some(r=>r.extensions.includes(i))}return!1}exceedsMaxFileSize(t){let e=this._uploadConstraints?.maxFileSize?.fileSize??-1;return e>-1&&t.size>e}uploadFile(t){let e=this._uploadConstraints?.maxFileSize?.fileSize??-1;return f("USE_CLIENTSIDE_VALIDATION")&&this.exceedsMaxFileSize(t)?(this._progressHandler&&this._progressHandler(t,{error:"errorExceedsMaxFileSize"}),Promise.reject(new x("Constraint.File.MaxFileSizeExceeded","Maximum file upload size is ${max-filesize}",{"max-filesize":e},!0))):f("USE_CLIENTSIDE_VALIDATION")&&this.isNotAllowedFileType(t)?(this._progressHandler&&this._progressHandler(t,{error:"errorExtensionNotAllowed"}),Promise.reject(new x("Constraint.File.InvalidExtension","Allowed extensions are: ${extensions}",{extension:this.getFileExtension(t),extensions:this._uploadConstraints.fileTypes.join(", ")},!0))):m({url:U(this._contextPath,this._origin),method:"POST",headers:{"Content-Type":t.type,"x-filename":encodeURIComponent(t.name),"x-filesize":t.size.toString()},onProgress:i=>{this._progressHandler&&i.lengthComputable&&this._progressHandler(t,{progress:Math.ceil(i.loaded/i.total*100)})},data:t}).then(i=>(this._progressHandler&&this._progressHandler(t,{progress:100,token:i.token}),i)).catch(i=>Promise.reject(new _(i)))}};export{lt as a,ht as b,g as c,y as d,dt as e,ut as f};
2
+ //# sourceMappingURL=chunk-GDEYM54A.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/modularui/Authenticate.ts","../src/modularui/CaptchaRequest.ts","../src/modularui/ModularUIError.ts","../src/modularui/ModelResolver.ts","../src/modularui/ModelRegistry.ts","../src/modularui/ModularUIRequest.ts","../src/modularui/UploadRequest.ts"],"sourcesContent":["import { HTTP_METHODS, INTERNAL_LOGIN_TYPE } from \"../constants/Constants\";\nimport { UnauthorizedException } from \"../exceptions/UnauthorizedException\";\nimport { getContextPath } from \"../settings/Paths\";\nimport {\n loginPasswordField,\n loginPath,\n loginType,\n loginUsernameField,\n logoutPath,\n} from \"../settings/Settings\";\nimport { universalFetch } from \"../utils/fetch/universalFetch\";\nimport { Cache } from \"../utils/storage/Cache\";\n\nexport class Authenticate {\n private _isBasicAuthentication: boolean;\n private _authenticationType: INTERNAL_LOGIN_TYPE;\n\n constructor() {\n this._isBasicAuthentication = false;\n this._authenticationType = this.getAuthenticationType();\n }\n\n getAuthenticationType() {\n const type = loginType();\n\n const enumType =\n INTERNAL_LOGIN_TYPE[type as keyof typeof INTERNAL_LOGIN_TYPE];\n\n if (!enumType || enumType === INTERNAL_LOGIN_TYPE.JAAS) {\n return INTERNAL_LOGIN_TYPE.JAAS;\n }\n\n if (\n enumType === INTERNAL_LOGIN_TYPE.PAC4J_FORM ||\n type.includes(\"FormClient\")\n ) {\n return INTERNAL_LOGIN_TYPE.PAC4J_FORM;\n } else if (\n enumType === INTERNAL_LOGIN_TYPE.PAC4J_BASIC ||\n type.includes(\"IndirectBasicClient\")\n ) {\n return INTERNAL_LOGIN_TYPE.PAC4J_BASIC;\n }\n\n return INTERNAL_LOGIN_TYPE.PAC4J_INDIRECT;\n }\n\n get authenticationType() {\n return this._authenticationType;\n }\n\n set authenticationType(authenticationType: INTERNAL_LOGIN_TYPE) {\n this._authenticationType = authenticationType;\n }\n\n get isBasicAuthentication() {\n return (\n this._isBasicAuthentication ||\n this.authenticationType === INTERNAL_LOGIN_TYPE.PAC4J_BASIC\n );\n }\n\n set isBasicAuthentication(isBasicAuthentication: boolean) {\n this._isBasicAuthentication = isBasicAuthentication;\n }\n\n requestLogin() {\n return universalFetch({\n url: `${getContextPath()}/login`,\n method: HTTP_METHODS.GET,\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/x-www-form-urlencoded\",\n },\n });\n }\n\n initLogin(initLogin: boolean) {\n if (this.isBasicAuthentication || !initLogin) {\n return Promise.resolve(true);\n }\n\n return this.requestLogin().catch((error) => {\n // when an unauthorizedexception is received on a request to the login service,\n // this indicates a basic authorization scenario\n // in case of form based authentication other exceptions are thrown\n if (error instanceof UnauthorizedException) {\n this.isBasicAuthentication = true;\n }\n\n return Promise.resolve({});\n });\n }\n\n login(username: string, password: string) {\n switch (this.authenticationType) {\n case INTERNAL_LOGIN_TYPE.PAC4J_FORM:\n return this.doFormLogin(username, password);\n case INTERNAL_LOGIN_TYPE.PAC4J_BASIC:\n return this.doBasicAuthentication(username, password);\n case INTERNAL_LOGIN_TYPE.PAC4J_INDIRECT:\n // pac4j should handle this\n return Promise.resolve();\n default:\n return this.doJaasAuthentication(username, password);\n }\n }\n\n getFormLoginUrl() {\n switch (this.authenticationType) {\n case INTERNAL_LOGIN_TYPE.PAC4J_BASIC:\n return `${getContextPath()}${loginPath(\"DirectBasicAuthClient\")}`;\n case INTERNAL_LOGIN_TYPE.PAC4J_FORM:\n return `${getContextPath()}${loginPath(\"FormClient\")}`;\n case INTERNAL_LOGIN_TYPE.PAC4J_INDIRECT:\n //pac4j should handle this\n return \"\";\n default:\n return `${getContextPath()}/j_security_check`;\n }\n }\n\n getFormLoginData(username: string, password: string) {\n const encodedUsername = encodeURIComponent(username);\n const encodedPassword = encodeURIComponent(password);\n\n switch (this.authenticationType) {\n case INTERNAL_LOGIN_TYPE.PAC4J_BASIC:\n case INTERNAL_LOGIN_TYPE.PAC4J_FORM:\n return `${loginUsernameField()}=${encodedUsername}&${loginPasswordField()}=${encodedPassword}`;\n case INTERNAL_LOGIN_TYPE.JAAS:\n return `j_username=${encodedUsername}&j_password=${encodedPassword}`;\n default:\n return \"\";\n }\n }\n\n doFormLogin(username: string, password: string) {\n return universalFetch({\n url: this.getFormLoginUrl(),\n method: HTTP_METHODS.POST,\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/x-www-form-urlencoded\",\n },\n data: this.getFormLoginData(username, password),\n });\n }\n\n doBasicAuthentication(username: string, password: string) {\n Cache.addItem(\"basic\", btoa(`${username}:${password}`));\n return this.requestLogin();\n }\n\n doJaasAuthentication(username: string, password: string) {\n return this.initLogin(true).then(() => {\n if (this.isBasicAuthentication) {\n Cache.removeItem(\"basic-ok\");\n return this.doBasicAuthentication(username, password).then(() => {\n Cache.addItem(\"basic-ok\", true);\n });\n }\n return this.doFormLogin(username, password);\n });\n }\n\n getLogoutUrl() {\n const type = loginType();\n\n if (!type || type === INTERNAL_LOGIN_TYPE.JAAS) {\n return `${getContextPath()}/Logoff`;\n }\n\n return `${getContextPath()}${logoutPath()}`;\n }\n\n /**\n * Browser redirect to the logout url. (no xmlhttp)\n */\n redirectToLogout(postRedirectUrl?: string) {\n Cache.clear();\n\n const origin = window.location.origin;\n const redirectUrl = postRedirectUrl?.startsWith(\"http\")\n ? postRedirectUrl\n : `${origin}${getContextPath()}`;\n\n window.location.assign(this.getLogoutUrl() + \"?url=\" + redirectUrl);\n }\n\n /**\n * Logout the user with xmlhttp\n */\n logout() {\n return universalFetch({\n url: this.getLogoutUrl(),\n }).then((response) => {\n // clear cache because of cached contributions\n Cache.clear();\n return response;\n });\n }\n}\n","import { HTTP_METHODS } from \"../constants/Constants\";\nimport { getCaptchaPath, getContextPathModularUI } from \"../settings/Paths\";\nimport { xhr } from \"../utils/fetch/xhr\";\n\ninterface CaptchaInitialResponse {\n tokenId: string;\n image: string;\n}\n\ninterface CaptchaValidResponse {\n valid: boolean;\n}\n\ninterface CaptchaInvalidResponse {\n tokenId: string;\n image: string;\n valid: boolean;\n error: { id: string };\n}\n\ntype PossibleCaptchaResponse =\n | CaptchaInitialResponse\n | CaptchaValidResponse\n | CaptchaInvalidResponse;\n\ninterface CaptchaRequestOptions {\n origin?: string;\n contextPath?: string;\n}\n\nexport class CaptchaRequest {\n private _tokenId: string | undefined;\n private _image: string | undefined;\n private _origin = \"\";\n private _contextPath: string = getContextPathModularUI();\n\n CaptchaRequest(options?: CaptchaRequestOptions) {\n this._origin = options?.origin || \"\";\n this._contextPath = options?.contextPath || getContextPathModularUI();\n }\n\n captchaResponse(response: PossibleCaptchaResponse) {\n this._tokenId = \"tokenId\" in response ? response.tokenId : this._tokenId;\n this._image = \"image\" in response ? response.image : this._image;\n\n return {\n tokenId: this._tokenId,\n image: this._image,\n valid: \"valid\" in response ? response.valid : false,\n error: \"error\" in response ? response.error : null,\n };\n }\n\n /**\n * Initiate the captcha request\n */\n init() {\n return xhr<CaptchaInitialResponse>({\n url: getCaptchaPath(this._contextPath, this._origin),\n }).then((response) => this.captchaResponse(response));\n }\n\n /**\n * Answer the captcha\n */\n send(answer?: string) {\n return xhr<CaptchaValidResponse | CaptchaInvalidResponse>({\n url: getCaptchaPath(this._contextPath, this._origin),\n method: HTTP_METHODS.POST,\n data: {\n tokenId: this._tokenId ?? \"\",\n answer: answer ?? \"\",\n },\n })\n .then((response) => this.captchaResponse(response))\n .catch((error) => this.captchaResponse(error.response));\n }\n\n /**\n * Reset the captcha and receive a new token and image\n */\n refresh() {\n return this.init();\n }\n}\n","import type { Href } from \"../models/href/Href\";\n\nexport class ModularUIError extends Error {\n response: object;\n href: Href | string | undefined;\n\n constructor(message: string, response: object, href?: string | Href) {\n super(message);\n\n Object.setPrototypeOf(this, ModularUIError.prototype);\n\n this.response = response;\n this.href = href;\n\n if (\n \"captureStackTrace\" in Error &&\n typeof Error.captureStackTrace === \"function\"\n ) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = new Error(message).stack;\n }\n }\n\n get resource() {\n return this.href;\n }\n}\n","import { has } from \"lodash\";\n\nimport { IllegalArgumentException } from \"../exceptions/IllegalArgumentException\";\n\nimport { MODEL_REGISTRY } from \"./ModelRegistry\";\n\nimport type { ModularUIResponse } from \"./ModularUIResponse\";\nimport type { TargetModel } from \"./types\";\n\n/**\n * Utility to determine which JavaScript Model class should be instantiated\n * based on a Modular UI response.\n */\nexport class ModelResolver {\n /**\n * Resolves a response to a specific Model constructor.\n * The resolution order is:\n * 1. If a single override is provided, it is returned immediately (forced).\n * 2. If multiple overrides are provided, it returns the first one that matches the response.\n * 3. If no overrides match or are provided, it searches the global `MODEL_REGISTRY`.\n *\n * @param response - The Modular UI response object containing data and contributions.\n * @param overrides - Optional class or array of classes to prefer over the global registry.\n * @param forceTargetModel - Force the first model from the overrides array to be returned.\n *\n * @throws {IllegalArgumentException} If the response is missing or the contributions\n * lack a `resourcetype` property.\n *\n * @returns The matching Model constructor, or `undefined` if no match is found.\n *\n * @example\n * const resolver = new ModelResolver();\n * const Model = resolver.resolve(response, [FormModel, TaskModel]);\n */\n static resolve(\n response: ModularUIResponse,\n overrides?: TargetModel | TargetModel[],\n forceTargetModel = false,\n ) {\n if (!response) {\n throw new IllegalArgumentException(\n `No data or contribution available, cannot resolve model`,\n );\n }\n\n if (!has(response.contributions, \"resourcetype\")) {\n throw new IllegalArgumentException(\n `Contributions has wrong format, missing resourcetype property in contributions of ${response.requestHref?.toString()}`,\n );\n }\n\n if (overrides) {\n const overrideList = Array.isArray(overrides) ? overrides : [overrides];\n\n if (overrideList.length === 1 || forceTargetModel) {\n return overrideList[0];\n }\n\n const overrideMatch = MODEL_REGISTRY.find(\n (config) =>\n config.isMatch(response) && overrideList.includes(config.Model),\n );\n\n return overrideMatch?.Model;\n }\n\n const match = MODEL_REGISTRY.find((config) => config.isMatch(response));\n\n return match?.Model;\n }\n}\n","import { ApplicationModel } from \"../models/application/ApplicationModel\";\nimport { CaseViewModel } from \"../models/caseview/CaseViewModel\";\nimport { ConceptDetailModel } from \"../models/concepts/ConceptDetailModel\";\nimport { ConceptIndexModel } from \"../models/concepts/ConceptIndexModel\";\nimport { ConceptTypeDetailModel } from \"../models/concepts/ConceptTypeDetailModel\";\nimport { ContentIndexModel } from \"../models/content/ContentIndexModel\";\nimport { ContentModel } from \"../models/content/ContentModel\";\nimport { ContentTOCModel } from \"../models/content/ContentTOCModel\";\nimport { ContentTypeModel } from \"../models/content/ContentTypeModel\";\nimport { DetailModel } from \"../models/detail/DetailModel\";\nimport { FormModel } from \"../models/form/FormModel\";\nimport { ListDetailModel } from \"../models/list/detail/ListDetailModel\";\nimport { ListModel } from \"../models/list/ListModel\";\nimport { LookupOptionsModel } from \"../models/lookup/LookupOptionsModel\";\nimport { ModelCatalogModel } from \"../models/modelcatalog/ModelCatalogModel\";\nimport { GroupingPanelModel } from \"../models/panels/GroupingPanelModel\";\nimport { CaseSearchModel } from \"../models/search/CaseSearchModel\";\nimport { TabModel } from \"../models/tab/TabModel\";\nimport { TaskGroupModel } from \"../models/taskgroup/TaskGroupModel\";\nimport { UserModel } from \"../models/user/UserModel\";\nimport { UserProfileModel } from \"../models/user/UserProfileModel\";\nimport { UserServicesModel } from \"../models/user/UserServicesModel\";\n\nimport type { ModelConfig } from \"./types\";\n\nexport const MODEL_REGISTRY: ModelConfig[] = [\n {\n name: \"Application\",\n isMatch: ({ resourcetype }) => resourcetype === \"Application\",\n Model: ApplicationModel,\n },\n {\n name: \"Tab\",\n isMatch: ({ resourcetype }) =>\n resourcetype.endsWith(\"Tab\") || resourcetype.endsWith(\"KnowledgeBank\"),\n Model: TabModel,\n },\n {\n name: \"ListDetail\",\n isMatch: ({ resourcetype }) => {\n const normalized = resourcetype.toLowerCase();\n return (\n normalized.endsWith(\"listdetail\") ||\n normalized.endsWith(\"listpaneldetail\") ||\n normalized.endsWith(\"datastorepaneldetail\")\n );\n },\n Model: ListDetailModel,\n },\n {\n name: \"List\",\n isMatch: ({ resourcetype }) =>\n resourcetype.endsWith(\"List\") ||\n resourcetype.endsWith(\"ListPanel\") ||\n resourcetype.endsWith(\"RelatedDataStorePanel\") ||\n resourcetype.endsWith(\"RelatedDatastorePanel\") ||\n [\n \"list-related-cases\",\n \"RecordPanel\",\n \"EventHistoryPanel\",\n \"NotePanel\",\n \"AppointmentPanel\",\n \"DocumentPanel\",\n \"AssignmentPanel\",\n ].includes(resourcetype),\n Model: ListModel,\n },\n {\n name: \"GroupingPanel\",\n isMatch: ({ resourcetype }) =>\n [\"GroupingPanel\", \"CaseTabGroupingPanel\", \"TabGroupingPanel\"].includes(\n resourcetype,\n ),\n Model: GroupingPanelModel,\n },\n {\n name: \"CaseSearch\",\n isMatch: ({ resourcetype }) => resourcetype === \"CaseSearch\",\n Model: CaseSearchModel,\n },\n {\n name: \"CaseView\",\n isMatch: ({ resourcetype }) => resourcetype === \"CaseView\",\n Model: CaseViewModel,\n },\n {\n name: \"Detail\",\n isMatch: ({ resourcetype }) =>\n resourcetype.endsWith(\"DetailPanel\") ||\n [\"Detail\", \"CasePropertiesPanel\", \"CasePropertiesPanelDetail\"].includes(\n resourcetype,\n ),\n Model: DetailModel,\n },\n {\n name: \"TaskGroup\",\n isMatch: ({ resourcetype }) => resourcetype === \"TaskGroup\",\n Model: TaskGroupModel,\n },\n {\n name: \"Form\",\n isMatch: ({ resourcetype }) => resourcetype === \"Form\",\n Model: FormModel,\n },\n {\n name: \"User\",\n isMatch: ({ resourcetype }) => resourcetype === \"userdata\",\n Model: UserModel,\n },\n {\n name: \"UserProfile\",\n isMatch: ({ resourcetype }) => resourcetype === \"userdata\",\n Model: UserProfileModel,\n },\n {\n name: \"UserServices\",\n isMatch: ({ resourcetype }) => resourcetype === \"user_services\",\n Model: UserServicesModel,\n },\n {\n name: \"ModelCatalog\",\n isMatch: ({ resourcetype }) => resourcetype === \"ModelCatalog\",\n Model: ModelCatalogModel,\n },\n {\n name: \"ConceptIndex\",\n isMatch: ({ resourcetype }) =>\n resourcetype === \"ConceptSearch\" ||\n resourcetype.toLowerCase() === \"relatedconcepts\",\n Model: ConceptIndexModel,\n },\n {\n name: \"ConceptDetail\",\n isMatch: ({ resourcetype }) => resourcetype === \"ConceptDetail\",\n Model: ConceptDetailModel,\n },\n {\n name: \"ConceptTypeDetail\",\n isMatch: ({ resourcetype }) => resourcetype === \"ConceptTypeDetail\",\n Model: ConceptTypeDetailModel,\n },\n {\n name: \"ContentIndex\",\n isMatch: ({ resourcetype }) => resourcetype === \"ContentSearch\",\n Model: ContentIndexModel,\n },\n {\n name: \"ContentTOC\",\n isMatch: ({ resourcetype }) => resourcetype === \"ContentTOC\",\n Model: ContentTOCModel,\n },\n {\n name: \"Content\",\n isMatch: ({ resourcetype }) => resourcetype === \"ContentDetail\",\n Model: ContentModel,\n },\n {\n name: \"ContentType\",\n isMatch: ({ resourcetype }) => resourcetype === \"ContentTypeDetail\",\n Model: ContentTypeModel,\n },\n {\n name: \"LookupOptions\",\n isMatch: ({ resourcetype }) => resourcetype === \"lookupOptions\",\n Model: LookupOptionsModel,\n },\n];\n","import deepmerge from \"deepmerge\";\nimport { klona } from \"klona/full\";\nimport { isPlainObject } from \"lodash\";\n\nimport { HTTP_METHODS, TIMEVERSION_FILTER_NAME } from \"../constants/Constants\";\nimport { IllegalArgumentException } from \"../exceptions/IllegalArgumentException\";\nimport { IllegalStateException } from \"../exceptions/IllegalStateException\";\nimport { LayoutHintProcessor } from \"../layouthints/LayoutHintProcessor\";\nimport { ResourceModel } from \"../models/base/ResourceModel\";\nimport { ContentModel } from \"../models/content/ContentModel\";\nimport { SectionModel } from \"../models/content/SectionModel\";\nimport { ErrorResponse } from \"../models/error/ErrorResponse\";\nimport { FormModel } from \"../models/form/FormModel\";\nimport { Href } from \"../models/href/Href\";\nimport { getContextPathModularUI } from \"../settings/Paths\";\nimport { getBooleanSetting } from \"../settings/Settings\";\nimport { universalFetch } from \"../utils/fetch/universalFetch\";\n\nimport { ModelResolver } from \"./ModelResolver\";\nimport { ModularUIError } from \"./ModularUIError\";\nimport { ModularUIResponse } from \"./ModularUIResponse\";\n\nimport type { FormData } from \"../models/form/types\";\nimport type {\n ModularUIModel,\n ModularUIModelWithChildModels,\n} from \"../models/types\";\nimport type { Contributions, Data, DefaultLinksData } from \"../types/types\";\nimport type {\n ModularUIRequestOptions,\n ProgressHandler,\n} from \"../utils/fetch/types\";\nimport type { ModularUISpecificErrorResponse, TargetModel } from \"./types\";\n\n/**\n * Helper for fetching data and contributions from the Be Informed modular ui\n * and merge it into a target or resolvable model.\n *\n * @example\n * const model = new ModularUIRequest(\"url-to-request\").fetch();\n * const post = new ModularUIRequest(\"url-to-request\", { method: \"POST\"}).fetch();\n */\nexport class ModularUIRequest {\n private _response: ModularUIResponse = new ModularUIResponse();\n\n private _href: Href;\n private _options: ModularUIRequestOptions;\n private _targetModel: TargetModel | TargetModel[] | undefined;\n private _forceTargetModel = false;\n private _contributionsHref: Href | string | undefined;\n private _locale = \"en\";\n private _method: HTTP_METHODS = HTTP_METHODS.GET;\n\n private _progressEvent: ProgressHandler | undefined;\n\n private _origin = \"\";\n private _contextPath: string = getContextPathModularUI();\n\n private _layoutHintProcessor: LayoutHintProcessor;\n\n constructor(href: Href | string, options: ModularUIRequestOptions = {}) {\n if (!href) {\n throw new IllegalArgumentException(\n \"You must pass a href to the resource that is requested\",\n );\n }\n\n this._href = typeof href === \"string\" ? new Href(href) : href;\n this._options = options;\n\n this._layoutHintProcessor = new LayoutHintProcessor(\n this._origin,\n this._contextPath,\n this.options,\n );\n\n this._response = new ModularUIResponse();\n this._response.requestHref = this.href;\n\n this.locale = this.getRequestLocale(options.locale);\n\n // copy request parameters to response, to be able to use them in the models\n // self links are missing the request parameters\n this._response.parameters = this.href.parameters.all;\n\n this.contextPath = options.contextPath || this.href.contextPath;\n this.origin = options.origin || this.href.origin;\n\n this._targetModel = options.targetModel;\n this.method = options.method || this.href.method;\n }\n\n /**\n * Retrieve the preferred language for this request, falls back to the browser language or english\n */\n getRequestLocale(optionLocale: string | undefined) {\n if (optionLocale) {\n return optionLocale;\n }\n\n if (typeof navigator !== \"undefined\" && navigator?.language) {\n return navigator.language.split(\"-\")[0] || \"en\";\n }\n\n return \"en\";\n }\n\n get origin() {\n return this._origin;\n }\n\n set origin(origin: string | undefined) {\n this._origin = origin ?? \"\";\n this._response.origin = origin ?? \"\";\n this._layoutHintProcessor.setOrigin(this._origin);\n }\n\n get contextPath() {\n return this._contextPath;\n }\n\n set contextPath(contextPath: string | undefined) {\n const path = contextPath ?? getContextPathModularUI();\n this._contextPath = path;\n this._response.contextPath = path;\n this._layoutHintProcessor.setContextPath(path);\n }\n\n get contributionsHref() {\n return this._contributionsHref;\n }\n\n set contributionsHref(contributionsHref: string | Href | undefined) {\n this._contributionsHref = contributionsHref;\n }\n\n set locale(locale: string) {\n this._locale = locale;\n this._response.locale = locale;\n this._layoutHintProcessor.setRequestOptions(this.options);\n }\n\n get locale() {\n return this._locale;\n }\n\n get response() {\n return this._response;\n }\n\n set href(href: Href) {\n this._href = href;\n }\n\n get href() {\n return this._href;\n }\n\n set method(method: HTTP_METHODS) {\n this._method = method;\n }\n\n get method() {\n return this._method;\n }\n\n get options() {\n return {\n ...this._options,\n locale: this.locale,\n method: this.method,\n };\n }\n\n set options(options: ModularUIRequestOptions) {\n this._options = options;\n this._layoutHintProcessor.setRequestOptions(options);\n }\n\n get requestOptions() {\n const {\n targetModel,\n forceTargetModel,\n updateHandler,\n childmodels,\n isValidationRequest,\n removeOnUnmount,\n ...requestOptions\n } = this.options;\n\n return requestOptions;\n }\n\n get withChildModels() {\n return (\n !(\"childmodels\" in this.options) || this.options.childmodels === true\n );\n }\n\n set targetModel(targetModel: TargetModel | TargetModel[] | undefined) {\n this._targetModel = targetModel;\n }\n\n get targetModel() {\n return this._targetModel;\n }\n\n set forceTargetModel(forceTargetModel: boolean) {\n this._forceTargetModel = forceTargetModel ?? false;\n }\n\n get forceTargetModel() {\n return this._forceTargetModel;\n }\n\n /**\n * Resolves the appropriate Model class for the current response.\n * Uses the ModelResolver to check against targetModel overrides or the global registry.\n */\n private resolveModel(): TargetModel {\n const Model = ModelResolver.resolve(\n this.response,\n this.targetModel,\n this.forceTargetModel,\n );\n\n if (Model) {\n return Model;\n }\n\n const url = this.href.toString();\n const resourceType = this.response?.resourcetype || \"unknown\";\n\n if (this.targetModel) {\n const availableTypes = Array.isArray(this.targetModel)\n ? this.targetModel\n .map((m) => (m as unknown as ResourceModel).type || m.name)\n .join(\", \")\n : (this.targetModel as unknown as ResourceModel).type ||\n this.targetModel.name;\n\n throw new IllegalStateException(\n `Cannot find a matching model for URL: '${url}', resourcetype: '${resourceType}'. Available overrides: [${availableTypes}]`,\n );\n }\n\n throw new IllegalStateException(\n `No JavaScript model is applicable for the request to ${url}. Response resourcetype: '${resourceType}'.`,\n );\n }\n\n private createModel() {\n const Model = this.resolveModel();\n return new Model(this.response);\n }\n\n private processContributionsService(contributions: unknown) {\n if (!isPlainObject(contributions)) {\n throw new IllegalArgumentException(\n \"Missing contributions data or contributions is not JSON\",\n );\n }\n\n if (typeof contributions === \"object\" && contributions != null) {\n const record = contributions as Record<string, Contributions>;\n const [key] = Object.keys(record);\n const contributionsBody = record[key];\n if (key === \"error\") {\n this.handleContributionsError(contributionsBody);\n }\n if (typeof contributionsBody === \"object\" && contributionsBody != null) {\n // The key of the data service is different from the contributions service for forms\n if (!(this.response.key in contributionsBody)) {\n this.response.key = key;\n }\n\n this.response.contributions = contributionsBody;\n }\n }\n }\n\n private handleContributionsError(error: ModularUISpecificErrorResponse) {\n const errorMessage = error.properties?.message ?? \"Error in contribution\";\n throw new ModularUIError(errorMessage, error, this.contributionsHref);\n }\n\n private handleDataError(error: ModularUISpecificErrorResponse | string) {\n if (typeof error === \"object\" && error.properties) {\n const errorMessage = error.properties?.message ?? \"Error in data\";\n throw new ModularUIError(\n errorMessage,\n error,\n this.href.absolutepath.toString(),\n );\n }\n\n throw new IllegalArgumentException(JSON.stringify(error));\n }\n\n private handleData(key: string, data: Data | undefined) {\n this.response.key = key;\n this.response.data = data;\n\n const links = data?._links as DefaultLinksData | undefined;\n\n if (!links) {\n throw new IllegalArgumentException(\n `No _links object found in the data of ${this.href.toString()}`,\n );\n }\n\n if (links?.contributions) {\n this.contributionsHref = links.contributions.href;\n } else if (Array.isArray(links) && links[0].contributions) {\n this.contributionsHref = links[0].contributions.href;\n } else {\n throw new IllegalArgumentException(\n `Contributions link not found for data with key ${key}`,\n );\n }\n }\n\n private processDataService(data: unknown) {\n if (typeof data !== \"object\" || data === null) {\n throw new IllegalArgumentException(\"Missing data or data is not JSON\");\n }\n\n const record = data as Record<string, Data>;\n const [key] = Object.keys(record);\n const dataBody = record[key];\n\n if (key === \"error\") {\n this.handleDataError(dataBody);\n } else {\n const [key] = Object.keys(data);\n this.handleData(key, dataBody);\n }\n }\n\n private fetchContributionsService() {\n if (!this.contributionsHref) {\n throw new IllegalStateException(\"Missing a contributions href\");\n }\n\n return universalFetch({\n url: `${this.origin}${this.contextPath}${this.contributionsHref}`,\n cache: true,\n locale: this.options.locale,\n });\n }\n\n private fetchDataService() {\n return universalFetch({\n ...this.requestOptions,\n url: `${this.origin}${this.contextPath}${this.href.path}`,\n params: this.href.getQuerystringForModularUI(),\n locale: this.options.locale,\n onProgress: this.onProgress,\n });\n }\n\n set onProgress(progressEvent: ProgressHandler | undefined) {\n this._progressEvent = progressEvent;\n }\n\n get onProgress() {\n return this._progressEvent;\n }\n\n /**\n * Combine previous send request data with new validation data to create a complete request object\n * The received model is new FormModel containing ONLY the current question, not the previously entered questions\n * to create a complete request we append the originally send form objects\n */\n private getDynamicValidationData(model: ModularUIModel) {\n const prevData =\n typeof this.options.data === \"string\"\n ? JSON.parse(this.options.data)\n : this.options.data;\n\n if (model instanceof FormModel) {\n const newData = JSON.parse(model.validationData);\n return JSON.stringify(deepmerge(prevData || {}, newData));\n }\n\n return JSON.stringify(prevData) ?? \"{}\";\n }\n\n /**\n * First load of dynamic values when a form is loaded\n */\n private async loadDynamicValidations(model: ModularUIModel) {\n if (\n !this.options.isValidationRequest &&\n getBooleanSetting(\"USE_INSTANT_SERVER_VALIDATION\") &&\n model instanceof FormModel &&\n model.currentFormObject?.hasDynamicValidations\n ) {\n const validationHref = this.href.setParameter(\"commit\", \"false\");\n const data = await universalFetch({\n ...this.requestOptions,\n url: `${this.origin}${this.contextPath}${this.href.path}`,\n params: validationHref.getQuerystringForModularUI(),\n data: this.getDynamicValidationData(model),\n });\n\n if (data == null || typeof data !== \"object\") {\n return model;\n }\n\n const formResponse = data as Record<string, FormData>;\n const [key] = Object.keys(formResponse);\n return model.updateValidations(formResponse[key]);\n }\n\n return model;\n }\n\n private fetchFromCache() {\n this.options = {\n ...this.options,\n cache: true,\n };\n\n return this.fetch();\n }\n\n private fetchChildModels(model: ModularUIModel) {\n const childModelLinks = (\n model as ModularUIModelWithChildModels\n ).getInitialChildModelLinks();\n\n const childModelRequests: Promise<ModularUIModel>[] = childModelLinks.map(\n (childModelLink) => {\n const request = new ModularUIRequest(childModelLink.href, {\n locale: this.locale,\n });\n\n if (childModelLink.targetModel) {\n request.targetModel = childModelLink.targetModel;\n }\n\n if (childModelLink.isCacheable) {\n return request.fetchFromCache();\n }\n\n return request.fetch();\n },\n );\n\n return Promise.allSettled(childModelRequests).then((childModels) => {\n const resolvedChildModels: ModularUIModelWithChildModels[] = [];\n const errorChildModels: ErrorResponse[] = [];\n\n childModels.forEach((childModel) => {\n if (childModel.status === \"rejected\") {\n const { reason } = childModel;\n if (reason.name !== \"Error.ChangePasswordRequired\") {\n console.debug(\n \"Unexpected error when retrieving child model:\",\n reason,\n );\n }\n errorChildModels.push(\n new ErrorResponse(reason, \"\", {\n origin: this.origin,\n contextPath: this.contextPath,\n }),\n );\n } else {\n resolvedChildModels.push(\n childModel.value as ModularUIModelWithChildModels,\n );\n }\n });\n\n if (model instanceof ResourceModel) {\n model.addChildModels(resolvedChildModels, errorChildModels);\n }\n\n return model;\n });\n }\n\n async fetchContent(withChildSections: boolean) {\n const model = await this.fetchFromCache();\n if (\n withChildSections &&\n model instanceof ContentModel &&\n model.childSectionLinks.length > 0\n ) {\n return this.fetchContentChildSections(model);\n }\n return model;\n }\n\n /**\n * Recursively return child sections defined on the content model\n */\n async fetchContentChildSections(\n contentModel: ContentModel,\n ): Promise<ContentModel> {\n const newContentModel = klona(contentModel);\n\n const sectionModels = await Promise.all(\n contentModel.childSectionLinks.map((childSectionLink) => {\n const contentHrefWithEntryDate = childSectionLink.selfhref.addParameter(\n TIMEVERSION_FILTER_NAME,\n contentModel.entryDate,\n );\n\n const request = new ModularUIRequest(contentHrefWithEntryDate, {\n locale: this.locale,\n });\n\n return request.fetchContent(true);\n }),\n );\n newContentModel.childSections = sectionModels.filter(\n (sectionModel) => sectionModel instanceof SectionModel,\n );\n return newContentModel;\n }\n\n async fetch() {\n const data = await this.fetchDataService();\n if (data == null) {\n throw new Error(`No data received for ${this.href.toString()}`);\n }\n\n this.processDataService(data);\n\n const contributions = await this.fetchContributionsService();\n if (contributions == null) {\n throw new Error(\n `No contributions data received for ${this.contributionsHref}`,\n );\n }\n\n this.processContributionsService(contributions);\n\n await this._layoutHintProcessor.processAsyncLayoutHints(this.response);\n\n const model = this.createModel();\n\n const validatedModel = await this.loadDynamicValidations(model);\n if (this.withChildModels) {\n return await this.fetchChildModels(validatedModel);\n }\n return validatedModel;\n }\n\n /**\n * Make a post request with optionally data to send\n * @param data\n */\n post(data: string) {\n this.method = HTTP_METHODS.POST;\n this.options = {\n ...this.options,\n data,\n };\n\n return this.fetch();\n }\n\n /**\n * Make a POST request using the form, an updated form is returned (merge of old and new form)\n * @param form\n * @returns {Promise<FormModel>}\n */\n postForm(form: FormModel) {\n this.method = HTTP_METHODS.POST;\n this.options = {\n ...this.options,\n data: form.formdata,\n };\n\n return this.fetch().then((response) => {\n if (response instanceof FormModel) {\n return form.update(response);\n }\n return form;\n });\n }\n\n /**\n * Simplified synchronous version of fetch (returns the model, not a Promise)\n * This can be used on the server to retrieve a model. It only loads the request url and it's child models\n */\n fetchSync() {\n const options = { headers: { \"Accept-Language\": this.locale } };\n\n const dataString = dataFetcher.fetch(this.href.toString(), options);\n if (dataString == null) {\n throw new Error(`No data received for ${this.href.toString()}`);\n }\n\n this.processDataService(JSON.parse(dataString));\n\n if (this.contributionsHref == null) {\n throw new Error(`No constributions received for ${this.href.toString()}`);\n }\n\n const contributionsString = dataFetcher.fetch(\n this.contributionsHref.toString(),\n options,\n );\n if (contributionsString == null) {\n throw new Error(\n `No constributions received for ${this.contributionsHref.toString()}`,\n );\n }\n this.processContributionsService(JSON.parse(contributionsString));\n\n const model: ResourceModel = this.createModel();\n\n const childModelLinks = model.getInitialChildModelLinks();\n\n const childModels = childModelLinks.map((childModelLink) => {\n return new ModularUIRequest(childModelLink.href, {\n locale: this.locale,\n }).fetchSync();\n });\n if (model instanceof ResourceModel) {\n model.addChildModels(childModels, []);\n }\n\n return model;\n }\n}\n","import { HTTP_METHODS } from \"../constants/Constants\";\nimport { ErrorModel } from \"../models/error/ErrorModel\";\nimport { ErrorResponse } from \"../models/error/ErrorResponse\";\nimport { getContextPathModularUI, getUploadPath } from \"../settings/Paths\";\nimport { getBooleanSetting } from \"../settings/Settings\";\nimport { xhr } from \"../utils/fetch/xhr\";\n\nimport type {\n FilesizeConstraintsType,\n FiletypeConstraintsType,\n} from \"../models/attributes/types\";\n\ntype ProgressHandler = (file: File, uploadInfo: object) => void;\n\ninterface UploadRequestOptions {\n origin?: string;\n contextPath?: string;\n}\n\ninterface UploadResponse {\n token: string;\n}\n\n/**\n * Upload a file to the upload file service of Be Informed\n */\nexport class UploadRequest {\n private _uploadConstraints: {\n fileTypes: FiletypeConstraintsType;\n maxFileSize: FilesizeConstraintsType;\n acceptedFiles: string[];\n };\n private _progressHandler: ProgressHandler | undefined;\n private _origin = \"\";\n private _contextPath: string = getContextPathModularUI();\n\n constructor(\n uploadConstraints: {\n fileTypes: FiletypeConstraintsType;\n maxFileSize: FilesizeConstraintsType;\n acceptedFiles: string[];\n },\n progressHandler: ProgressHandler | undefined,\n options?: UploadRequestOptions,\n ) {\n this._uploadConstraints = uploadConstraints;\n this._progressHandler = progressHandler;\n this._origin = options?.origin || \"\";\n this._contextPath = options?.contextPath || getContextPathModularUI();\n }\n\n getFileExtension(file: File) {\n return file.name.split(\".\").pop()?.toLowerCase() || \"\";\n }\n\n isNotAllowedFileType(file: File) {\n const allowedFileTypes = this._uploadConstraints.fileTypes;\n\n if (allowedFileTypes.length > 0) {\n const fileExtension = this.getFileExtension(file);\n\n return !allowedFileTypes.some((fileType) =>\n fileType.extensions.includes(fileExtension),\n );\n }\n\n return false;\n }\n\n exceedsMaxFileSize(file: File) {\n const maxFileSize = this._uploadConstraints?.maxFileSize?.fileSize ?? -1;\n return maxFileSize > -1 && file.size > maxFileSize;\n }\n\n uploadFile(file: File) {\n const maxFileSize = this._uploadConstraints?.maxFileSize?.fileSize ?? -1;\n\n if (\n getBooleanSetting(\"USE_CLIENTSIDE_VALIDATION\") &&\n this.exceedsMaxFileSize(file)\n ) {\n if (this._progressHandler) {\n this._progressHandler(file, { error: \"errorExceedsMaxFileSize\" });\n }\n\n return Promise.reject(\n new ErrorModel(\n \"Constraint.File.MaxFileSizeExceeded\",\n \"Maximum file upload size is ${max-filesize}\",\n {\n \"max-filesize\": maxFileSize,\n },\n true,\n ),\n );\n }\n\n if (\n getBooleanSetting(\"USE_CLIENTSIDE_VALIDATION\") &&\n this.isNotAllowedFileType(file)\n ) {\n if (this._progressHandler) {\n this._progressHandler(file, { error: \"errorExtensionNotAllowed\" });\n }\n\n return Promise.reject(\n new ErrorModel(\n \"Constraint.File.InvalidExtension\",\n \"Allowed extensions are: ${extensions}\",\n {\n extension: this.getFileExtension(file),\n extensions: this._uploadConstraints.fileTypes.join(\", \"),\n },\n true,\n ),\n );\n }\n\n return xhr<UploadResponse>({\n url: getUploadPath(this._contextPath, this._origin),\n method: HTTP_METHODS.POST,\n headers: {\n \"Content-Type\": file.type,\n \"x-filename\": encodeURIComponent(file.name),\n \"x-filesize\": file.size.toString(),\n },\n onProgress: (e: ProgressEvent) => {\n if (this._progressHandler && e.lengthComputable) {\n this._progressHandler(file, {\n progress: Math.ceil((e.loaded / e.total) * 100),\n });\n }\n },\n data: file,\n })\n .then((response) => {\n if (this._progressHandler) {\n this._progressHandler(file, { progress: 100, token: response.token });\n }\n return response;\n })\n .catch((e) => Promise.reject(new ErrorResponse(e)));\n }\n}\n"],"mappings":"mrBAaO,IAAMA,GAAN,KAAmB,CAChB,uBACA,oBAER,aAAc,CACZ,KAAK,uBAAyB,GAC9B,KAAK,oBAAsB,KAAK,sBAAsB,CACxD,CAEA,uBAAwB,CACtB,IAAMC,EAAOC,EAAU,EAEjBC,EACJC,EAAoBH,CAAwC,EAE9D,MAAI,CAACE,GAAYA,IAAa,cAK5BA,IAAa,cACbF,EAAK,SAAS,YAAY,eAI1BE,IAAa,eACbF,EAAK,SAAS,qBAAqB,gCAMvC,CAEA,IAAI,oBAAqB,CACvB,OAAO,KAAK,mBACd,CAEA,IAAI,mBAAmBI,EAAyC,CAC9D,KAAK,oBAAsBA,CAC7B,CAEA,IAAI,uBAAwB,CAC1B,OACE,KAAK,wBACL,KAAK,qBAAuB,aAEhC,CAEA,IAAI,sBAAsBC,EAAgC,CACxD,KAAK,uBAAyBA,CACh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EAAM,CAAE,MAAO,yBAA0B,CAAC,EAG3D,QAAQ,OACb,IAAIM,EACF,sCACA,8CACA,CACE,eAAgBF,CAClB,EACA,EACF,CACF,GAIAC,EAAkB,2BAA2B,GAC7C,KAAK,qBAAqBL,CAAI,GAE1B,KAAK,kBACP,KAAK,iBAAiBA,EAAM,CAAE,MAAO,0BAA2B,CAAC,EAG5D,QAAQ,OACb,IAAIM,EACF,mCACA,wCACA,CACE,UAAW,KAAK,iBAAiBN,CAAI,EACrC,WAAY,KAAK,mBAAmB,UAAU,KAAK,IAAI,CACzD,EACA,EACF,CACF,GAGKO,EAAoB,CACzB,IAAKC,EAAc,KAAK,aAAc,KAAK,OAAO,EAClD,cACA,QAAS,CACP,eAAgBR,EAAK,KACrB,aAAc,mBAAmBA,EAAK,IAAI,EAC1C,aAAcA,EAAK,KAAK,SAAS,CACnC,EACA,WAAaS,GAAqB,CAC5B,KAAK,kBAAoBA,EAAE,kBAC7B,KAAK,iBAAiBT,EAAM,CAC1B,SAAU,KAAK,KAAMS,EAAE,OAASA,EAAE,MAAS,GAAG,CAChD,CAAC,CAEL,EACA,KAAMT,CACR,CAAC,EACE,KAAMU,IACD,KAAK,kBACP,KAAK,iBAAiBV,EAAM,CAAE,SAAU,IAAK,MAAOU,EAAS,KAAM,CAAC,EAE/DA,EACR,EACA,MAAOD,GAAM,QAAQ,OAAO,IAAIE,EAAcF,CAAC,CAAC,CAAC,CACtD,CACF","names":["Authenticate","type","loginType","enumType","INTERNAL_LOGIN_TYPE","authenticationType","isBasicAuthentication","universalFetch","getContextPath","initLogin","error","UnauthorizedException","username","password","loginPath","encodedUsername","encodedPassword","loginUsernameField","loginPasswordField","cacheInstance","logoutPath","postRedirectUrl","origin","redirectUrl","response","CaptchaRequest","getContextPathModularUI","options","response","xhr","getCaptchaPath","answer","error","ModularUIError","_ModularUIError","message","response","href","import_lodash","MODEL_REGISTRY","resourcetype","ApplicationModel","TabModel","normalized","ListDetailModel","ListModel","GroupingPanelModel","CaseSearchModel","CaseViewModel","DetailModel","TaskGroupModel","FormModel","UserModel","UserProfileModel","UserServicesModel","ModelCatalogModel","ConceptIndexModel","ConceptDetailModel","ConceptTypeDetailModel","ContentIndexModel","ContentTOCModel","ContentModel","ContentTypeModel","LookupOptionsModel","ModelResolver","response","overrides","forceTargetModel","IllegalArgumentException","overrideList","MODEL_REGISTRY","config","import_lodash","deepmerge","klona","ModularUIRequest","_ModularUIRequest","ModularUIResponse","getContextPathModularUI","href","options","IllegalArgumentException","Href","LayoutHintProcessor","optionLocale","origin","contextPath","path","contributionsHref","locale","method","targetModel","forceTargetModel","updateHandler","childmodels","isValidationRequest","removeOnUnmount","requestOptions","Model","ModelResolver","url","resourceType","availableTypes","m","IllegalStateException","contributions","record","key","contributionsBody","error","errorMessage","ModularUIError","data","links","dataBody","universalFetch","progressEvent","model","prevData","FormModel","newData","deepmerge","getBooleanSetting","validationHref","formResponse","childModelRequests","childModelLink","request","childModels","resolvedChildModels","errorChildModels","childModel","reason","ErrorResponse","ResourceModel","withChildSections","ContentModel","contentModel","newContentModel","klona","sectionModels","childSectionLink","contentHrefWithEntryDate","TIMEVERSION_FILTER_NAME","sectionModel","SectionModel","validatedModel","form","response","dataString","contributionsString","UploadRequest","getContextPathModularUI","uploadConstraints","progressHandler","options","file","allowedFileTypes","fileExtension","fileType","maxFileSize","getBooleanSetting","ErrorModel","xhr","getUploadPath","e","response","ErrorResponse"]}