@beinformed/ui 2.0.0-beta.2 → 2.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/{FormModel-Cmzm2g7k.d.ts → FormModel-6QhB7ctI.d.ts} +1 -1
- package/dist/{FormModel-Qa655sE-.d.cts → FormModel-Cfg7h0er.d.cts} +1 -1
- package/dist/{chunk-CPYNQW3X.js → chunk-DUTPBVXD.js} +1 -1
- package/dist/{chunk-CPYNQW3X.js.map → chunk-DUTPBVXD.js.map} +1 -1
- package/dist/{chunk-RI2O4J7J.js → chunk-I2APZXO7.js} +2 -2
- package/dist/chunk-I2APZXO7.js.map +1 -0
- package/dist/{chunk-VLKSMXSB.js → chunk-J2QT7BB2.js} +2 -2
- package/dist/{chunk-GHQP5QNP.js → chunk-S3X2VJQL.js} +1 -1
- package/dist/{chunk-GHQP5QNP.js.map → chunk-S3X2VJQL.js.map} +1 -1
- package/dist/{chunk-Y3XZHSPE.js → chunk-TDCALIXY.js} +2 -2
- package/dist/chunk-YYBJKNUB.js +1 -0
- package/dist/{chunk-GDEYM54A.js → chunk-Z33QXJGH.js} +2 -2
- package/dist/{chunk-GDEYM54A.js.map → chunk-Z33QXJGH.js.map} +1 -1
- package/dist/exceptions/index.d.cts +2 -2
- package/dist/exceptions/index.d.ts +2 -2
- package/dist/{index-RuAoNZgc.d.cts → index-DP8fYb9i.d.cts} +2 -2
- package/dist/{index-BxJE8Lob.d.ts → index-Dz6sC5Ns.d.ts} +2 -2
- package/dist/index.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/layouthints/index.cjs.map +1 -1
- package/dist/layouthints/index.d.cts +1 -2
- package/dist/layouthints/index.d.ts +1 -2
- package/dist/layouthints/index.js +1 -1
- package/dist/models/index.cjs +4 -4
- package/dist/models/index.cjs.map +1 -1
- package/dist/models/index.d.cts +4 -4
- package/dist/models/index.d.ts +4 -4
- package/dist/models/index.js +1 -1
- package/dist/modularui/index.cjs +4 -4
- package/dist/modularui/index.cjs.map +1 -1
- package/dist/modularui/index.d.cts +12 -10
- package/dist/modularui/index.d.ts +12 -10
- package/dist/modularui/index.js +1 -1
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.cts +3 -5
- package/dist/utils/index.d.ts +3 -5
- package/dist/utils/index.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-QIGFPQFN.js +0 -1
- package/dist/chunk-RI2O4J7J.js.map +0 -1
- /package/dist/{chunk-VLKSMXSB.js.map → chunk-J2QT7BB2.js.map} +0 -0
- /package/dist/{chunk-Y3XZHSPE.js.map → chunk-TDCALIXY.js.map} +0 -0
- /package/dist/{chunk-QIGFPQFN.js.map → chunk-YYBJKNUB.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as d}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{c as d}from"./chunk-J2QT7BB2.js";import{p as l}from"./chunk-DUTPBVXD.js";import{a as f}from"./chunk-S3X2VJQL.js";import{h as p}from"./chunk-SFI46XCV.js";import{b as L}from"./chunk-4BYHEGUN.js";var u=L(f(),1);var k=class{_origin;_contextPath;_requestOptions;constructor(t,n,i){this._origin=t,this._contextPath=n,this._requestOptions=i}setOrigin(t){this._origin=t}setContextPath(t){this._contextPath=t}setRequestOptions(t){this._requestOptions=t}async processAsyncLayoutHints(t){p("ALLOW_HIDE_WHEN_EMPTY_ON_TABS")&&(await this.processApplicationLinks(t),await this.processTabLinks(t)),await this.processPanelLinks(t)}async processApplicationLinks(t){let n=t.contributions?._links,i=t.data?._links;if(typeof n=="object"&&typeof i=="object"&&n!=null&&i!=null&&"tab"in n&&"tab"in i){let s=n,a=i;await Promise.all(s.tab.map(async e=>{if("components"in e){let r=a.tab.find(o=>o.name===e.name);if(typeof r?.components=="object"){let o=await this.processLinks(r.components,e.components);Array.isArray(o)&&this.replaceApplicationLinks(t,e.name,o)}}}))}}replaceApplicationLinks(t,n,i){let s=t.data?._links;s&&Array.isArray(s.tab)&&(s.tab=s.tab.map(a=>a.name===n?{...a,components:i}:a))}async processTabLinks(t){let n=t.contributions?._links;if(!n)return;let i=n;if("component"in i){let s=t.data?._links;if(Array.isArray(s?.component)){let a=await this.processLinks(s.component,i.component);Array.isArray(a)&&(s.component=a)}}}async processPanelLinks(t){let n=t.contributions?._links;if(!(!t.data||!n)&&typeof n.panel<"u"){let i=t.data._links,s=await this.processLinks(i,n.panel);t.data&&(t.data._links=s)}}dataLinksPerName(t){let n={};if(Array.isArray(t)){for(let i of t)i.name&&(n[i.name]=i);return n}return t||n}async processLinks(t,n){let i=this.dataLinksPerName(t),s=n.filter(o=>o.layouthint?.includes(l)),a=[];for(let o of s){let c=i?.[o.name];c?.href&&a.push(this.isHiddenList(o.name,c.href))}let e=await Promise.all(a);if(Array.isArray(t))return t.filter(o=>!e.includes(o.name));let r={};for(let o in i)if(o in i&&!e.includes(o)){let c=i[o];c&&(r[o]=c)}return r}async isHiddenList(t,n){let i=p("HIDE_WHEN_EMPTY_IGNORE_TASKS",!1);try{let s=await d({...this._requestOptions,url:`${this._origin}${this._contextPath}${n}`});if((0,u.isPlainObject)(s)){let a=s,[e]=Object.keys(a),{_embedded:r,actions:o}=a[e],c=r===null||Array.isArray(r)&&r.length===0,m=o==null||i;if(c&&m)return t}return""}catch{return""}}};export{k as a};
|
|
2
|
+
//# sourceMappingURL=chunk-TDCALIXY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-YYBJKNUB.js.map
|
|
@@ -1,2 +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-
|
|
1
|
+
import{a as N}from"./chunk-TDCALIXY.js";import{b as m,c}from"./chunk-J2QT7BB2.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,Va as K,Xa as X,Ya as C,Za as Z,cb as _,e as I,eb as u,fb as tt,j as v,k as J,o as q,qb as et,s as j,sb as ot,t as x,vb as it,wb as rt,x as B,xb as nt,yb as st,zb as at}from"./chunk-I2APZXO7.js";import{l as $}from"./chunk-QTZ77JJN.js";import{a as F,b as p}from"./chunk-S3X2VJQL.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 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 ct=A(F(),1);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 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 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,E as c,y as d,g as e,dt as f,ut as g};
|
|
2
|
+
//# sourceMappingURL=chunk-Z33QXJGH.js.map
|
|
@@ -1 +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,CAChC,CAEA,cAAe,CACb,OAAOC,EAAe,CACpB,IAAK,GAAGC,EAAe,CAAC,SACxB,aACA,QAAS,CACP,OAAQ,mBACR,eAAgB,mCAClB,CACF,CAAC,CACH,CAEA,UAAUC,EAAoB,CAC5B,OAAI,KAAK,uBAAyB,CAACA,EAC1B,QAAQ,QAAQ,EAAI,EAGtB,KAAK,aAAa,EAAE,MAAOC,IAI5BA,aAAiBC,IACnB,KAAK,sBAAwB,IAGxB,QAAQ,QAAQ,CAAC,CAAC,EAC1B,CACH,CAEA,MAAMC,EAAkBC,EAAkB,CACxC,OAAQ,KAAK,mBAAoB,CAC/B,iBACE,OAAO,KAAK,YAAYD,EAAUC,CAAQ,EAC5C,kBACE,OAAO,KAAK,sBAAsBD,EAAUC,CAAQ,EACtD,qBA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K,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"]}
|
|
1
|
+
{"version":3,"sources":["../src/modularui/Authenticate.ts","../src/modularui/CaptchaRequest.ts","../src/modularui/ModelRegistry.ts","../src/modularui/ModelResolver.ts","../src/modularui/ModularUIError.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 { 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 { 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 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 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,CAChC,CAEA,cAAe,CACb,OAAOC,EAAe,CACpB,IAAK,GAAGC,EAAe,CAAC,SACxB,aACA,QAAS,CACP,OAAQ,mBACR,eAAgB,mCAClB,CACF,CAAC,CACH,CAEA,UAAUC,EAAoB,CAC5B,OAAI,K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1B,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","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","import_lodash","ModelResolver","response","overrides","forceTargetModel","IllegalArgumentException","overrideList","MODEL_REGISTRY","config","ModularUIError","_ModularUIError","message","response","href","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"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as ModularUIErrorJSON } from '../index-
|
|
2
|
-
export { F as FetchException } from '../index-
|
|
1
|
+
import { M as ModularUIErrorJSON } from '../index-DP8fYb9i.cjs';
|
|
2
|
+
export { F as FetchException } from '../index-DP8fYb9i.cjs';
|
|
3
3
|
import { immerable } from 'immer';
|
|
4
4
|
import '../Constants-CYAEbTZ4.cjs';
|
|
5
5
|
import '@date-fns/tz/date';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as ModularUIErrorJSON } from '../index-
|
|
2
|
-
export { F as FetchException } from '../index-
|
|
1
|
+
import { M as ModularUIErrorJSON } from '../index-Dz6sC5Ns.js';
|
|
2
|
+
export { F as FetchException } from '../index-Dz6sC5Ns.js';
|
|
3
3
|
import { immerable } from 'immer';
|
|
4
4
|
import '../Constants-CYAEbTZ4.js';
|
|
5
5
|
import '@date-fns/tz/date';
|
|
@@ -3398,7 +3398,7 @@ declare class AttributeSetModel extends BaseModel<Data, AttributeSetContribution
|
|
|
3398
3398
|
set attributeCollection(collection: AttributeCollection);
|
|
3399
3399
|
private createChildAttributeSetModel;
|
|
3400
3400
|
/**
|
|
3401
|
-
* Retrieve child
|
|
3401
|
+
* Retrieve child AttributeSetModels
|
|
3402
3402
|
*/
|
|
3403
3403
|
getChildAttributeSets(): AttributeSetModel[];
|
|
3404
3404
|
}
|
|
@@ -5326,4 +5326,4 @@ declare class FetchException extends Error {
|
|
|
5326
5326
|
constructor(errorResponse: ModularUIErrorJSON | undefined, failedRequest?: XMLHttpRequest, requestOptions?: RequestOptions);
|
|
5327
5327
|
}
|
|
5328
5328
|
|
|
5329
|
-
export { type BooleanAttributeContributions as $, ActionCollection as A, BaseAttributeModel as B, CaptchaAttributeModel as C, DatetimeAttributeModel as D, LayoutHintRuleCollection as E, FetchException as F, MemoAttributeModel as G, HelptextAttributeModel as H, RangeAttributeModel as I, type AttributeData as J, type BaseAttributeContributions as K, LabelAttributeModel as L, type ModularUIErrorJSON as M, NumberAttributeModel as N, OPTION_MODE as O, PasswordAttributeModel as P, type BaseStringAttributeContributions as Q, type RegexObject as R, StringAttributeModel as S, type StringAttributeContributions as T, UploadAttributeModel as U, type MemoAttributeContributions as V, type PasswordAttributeContributions as W, XMLAttributeModel as X, type NumberAttributeContributions as Y, type MoneyAttributeContributions as Z, type DatetimeAttributeContributions as _, ActionModel as a, type ContentLinkData as a$, type ChoiceAttributeContributions as a0, type ChoiceAttributeOptionContributions as a1, type CompositeAttributeContributions as a2, type RangeAttributeContributions as a3, type CaptchaAttributeContributions as a4, type BinaryAttributeContributions as a5, type AttributeContributions as a6, type AttributeCollectionContributions as a7, type AttributeValue as a8, type MaybeAttributeValue as a9, ConceptRelationModel as aA, ConceptTypeDetailModel as aB, SourceReferenceCollection as aC, SourceReferenceModel as aD, type LabelType as aE, type PropertyType as aF, type Links as aG, type TextFragmentType as aH, type SectionReferenceType as aI, type SourceReferenceData as aJ, type PropertyData as aK, type LabelData as aL, type TextFragmentData as aM, type RelationDirection as aN, type RelationTypeType as aO, type ConceptLinkData as aP, type SectionFragment as aQ, type RelationData as aR, type TaxonomyType as aS, type ConceptDetailData as aT, type ConceptTypeDetailData as aU, type ConceptIndexData as aV, type ConceptIndexContributions as aW, ContentLinkModel as aX, SectionModel as aY, SubSectionModel as aZ, type ContentIndexData as a_, type AttributeModularUIData as aa, type AttributeRequestData as ab, type AttributeModel as ac, type ContentData as ad, type AttributePropertyElement as ae, type AttributeTextFragmentElement as af, type AttributeContentElement as ag, type DynamicSchema as ah, type NamedDynamicSchema as ai, type AnonymousDynamicSchema as aj, type CompositeDynamicSchema as ak, type ConstraintModel as al, type LayoutHintRule as am, type FileEntryType as an, type FilesType as ao, type FiletypeConstraintsType as ap, type FilesizeConstraintsType as aq, type AttributeSetContributions as ar, type ChildrenKey as as, BaseCollection as at, BaseModel as au, ResourceCollection as av, ResourceModel as aw, ConceptDetailModel as ax, ConceptLinkModel as ay, ConceptRelationCollection as az, type ActionFieldData as b, type
|
|
5329
|
+
export { type BooleanAttributeContributions as $, ActionCollection as A, BaseAttributeModel as B, CaptchaAttributeModel as C, DatetimeAttributeModel as D, LayoutHintRuleCollection as E, FetchException as F, MemoAttributeModel as G, HelptextAttributeModel as H, RangeAttributeModel as I, type AttributeData as J, type BaseAttributeContributions as K, LabelAttributeModel as L, type ModularUIErrorJSON as M, NumberAttributeModel as N, OPTION_MODE as O, PasswordAttributeModel as P, type BaseStringAttributeContributions as Q, type RegexObject as R, StringAttributeModel as S, type StringAttributeContributions as T, UploadAttributeModel as U, type MemoAttributeContributions as V, type PasswordAttributeContributions as W, XMLAttributeModel as X, type NumberAttributeContributions as Y, type MoneyAttributeContributions as Z, type DatetimeAttributeContributions as _, ActionModel as a, type ContentLinkData as a$, type ChoiceAttributeContributions as a0, type ChoiceAttributeOptionContributions as a1, type CompositeAttributeContributions as a2, type RangeAttributeContributions as a3, type CaptchaAttributeContributions as a4, type BinaryAttributeContributions as a5, type AttributeContributions as a6, type AttributeCollectionContributions as a7, type AttributeValue as a8, type MaybeAttributeValue as a9, ConceptRelationModel as aA, ConceptTypeDetailModel as aB, SourceReferenceCollection as aC, SourceReferenceModel as aD, type LabelType as aE, type PropertyType as aF, type Links as aG, type TextFragmentType as aH, type SectionReferenceType as aI, type SourceReferenceData as aJ, type PropertyData as aK, type LabelData as aL, type TextFragmentData as aM, type RelationDirection as aN, type RelationTypeType as aO, type ConceptLinkData as aP, type SectionFragment as aQ, type RelationData as aR, type TaxonomyType as aS, type ConceptDetailData as aT, type ConceptTypeDetailData as aU, type ConceptIndexData as aV, type ConceptIndexContributions as aW, ContentLinkModel as aX, SectionModel as aY, SubSectionModel as aZ, type ContentIndexData as a_, type AttributeModularUIData as aa, type AttributeRequestData as ab, type AttributeModel as ac, type ContentData as ad, type AttributePropertyElement as ae, type AttributeTextFragmentElement as af, type AttributeContentElement as ag, type DynamicSchema as ah, type NamedDynamicSchema as ai, type AnonymousDynamicSchema as aj, type CompositeDynamicSchema as ak, type ConstraintModel as al, type LayoutHintRule as am, type FileEntryType as an, type FilesType as ao, type FiletypeConstraintsType as ap, type FilesizeConstraintsType as aq, type AttributeSetContributions as ar, type ChildrenKey as as, BaseCollection as at, BaseModel as au, ResourceCollection as av, ResourceModel as aw, ConceptDetailModel as ax, ConceptLinkModel as ay, ConceptRelationCollection as az, type ActionFieldData as b, type StringFilterContributions as b$, type ContentIndexContributions as b0, type ContentTOCData as b1, type ContentDataItem as b2, type ContentDataSection as b3, type ContentContributions as b4, type ContentDetailData as b5, type ContentDetailContributions as b6, type SectionData as b7, type SubSectionData as b8, type ContentTypeData as b9, type RedirectTextObject as bA, type RedirectObject as bB, type ModularUIErrorResponse as bC, AssignmentFilterModel as bD, BaseFilterModel as bE, FilterCollection as bF, FilterModel as bG, RangeFilterModel as bH, type IFilter as bI, type ContributionsForFilterCollection as bJ, type FilterData as bK, type FilterContribution as bL, type FilterCollectionData as bM, type FilterCollectionContributions as bN, type ChoiceFilterData as bO, type ChoiceFilterContribution as bP, type DateFilterData as bQ, type DateFilterContribution as bR, type AssignmentFilterData as bS, type AssignmentFilterContribution as bT, type DateRangeFilterData as bU, type DateRangeFilterContribution as bV, type NumberFilterData as bW, type NumberFilterContributions as bX, type NumberRangeFilterData as bY, type NumberRangeFilterContribution as bZ, type StringFilterData as b_, type ContentTypeContributions as ba, type RelatedConceptsData as bb, type RelatedConceptContributions as bc, ContentConfiguration as bd, ContentConfigurationElements as be, ContentConfigurationEndResults as bf, ContentConfigurationQuestions as bg, ContentConfigurationResults as bh, type TextFragmentElement as bi, type ContentElement as bj, type PropertyElement as bk, type ConfigurationElements as bl, type QuestionConfiguration as bm, type ResultsConfiguration as bn, type ContentConfigurationContributions as bo, type EndResultsConfiguration as bp, DetailModel as bq, type BaseDetailData as br, type DetailData as bs, type BaseDetailContributions as bt, type DetailPanelContributions as bu, ErrorCollectionType as bv, ErrorCollection as bw, ErrorModel as bx, ErrorResponse as by, type TitleObject as bz, type ActionData as c, type HrefState as c$, type FormObjectData as c0, type FormData as c1, type SuccessData as c2, type ErrorObjectData as c3, type MissingObjectData as c4, type ResultsData as c5, type AnchorElementData as c6, type FormContributions as c7, type FormObjectContributions as c8, Href as c9, type GroupingContributions as cA, type ListItemData as cB, type ListDetailData as cC, type ListDetailContributions as cD, type ListDetailAttributeData as cE, Parameter as cF, ParameterCollection as cG, ProcessStatusSettingsModel as cH, type ProcessStatusSettingsData as cI, type ProcessStatusSettingsContributions as cJ, type UserServicesData as cK, type UserServicesContributions as cL, type UserData as cM, type UserContributions as cN, type ModularUIModel as cO, type ModelWithChildModels as cP, type ModelOptions as cQ, type ModularUIModelWithChildModels as cR, ModularUIResponse as cS, type TargetModel as cT, type ModularUISpecificErrorResponse as cU, type AuthenticationType as cV, type ModelConfig as cW, type ISO_DATE as cX, type Data as cY, type Contributions as cZ, type ResourceData as c_, LayoutHintCollection as ca, LinkCollection as cb, LinkModel as cc, type LinkData as cd, type LinkContributions as ce, type NormalizedLinkData as cf, type NormalizedLinkContributions as cg, ListDetailModel as ch, GroupModel as ci, GroupingModel as cj, ListHeaderModel as ck, ListHref as cl, ListItemCollection as cm, ListItemModel as cn, ListModel as co, PagesizeModel as cp, PagingModel as cq, SortingModel as cr, SORT_ORDER as cs, SortOptionModel as ct, type ListData as cu, type ListContributions as cv, type PagingData as cw, type PagingContributions as cx, type GroupData as cy, type GroupingData as cz, type ActionContributions as d, type HistoryLocation as d0, type DefaultLinksData as d1, type TextWithPlaceholders as d2, type MessageParameters as d3, type ErrorMessage as d4, DateUtil as d5, DateTimeUtil as d6, TimeUtil as d7, TimestampUtil as d8, type OffsetInfo as d9, BaseDateTimeUtil as da, type RequestURLOptions as db, type ProgressHandler as dc, type RequestBaseOptions as dd, type RequestOptions as de, type UpdateHandler as df, type ModularUIRequestOptions as dg, AttributeCollection as e, AttributeContent as f, AttributeSetModel as g, BooleanAttributeModel as h, CHOICETYPE as i, ChoiceAttributeModel as j, ChoiceAttributeOptionCollection as k, type ChoiceAttributeOptionModelOptions as l, ChoiceAttributeOptionModel as m, CompositeAttributeChildCollection as n, CompositeAttributeModel as o, ATTRIBUTE_TYPE as p, FILTER_TYPE as q, ConstraintCollection as r, DateTimeDateFormatConstraint as s, DatetimeFormatConstraint as t, DateTimeTimeFormatConstraint as u, RegexConstraint as v, BaseLayoutHintRule as w, addLayoutHintRule as x, type LayoutHintRulesUpdater as y, updateLayoutHintRules as z };
|
|
@@ -3398,7 +3398,7 @@ declare class AttributeSetModel extends BaseModel<Data, AttributeSetContribution
|
|
|
3398
3398
|
set attributeCollection(collection: AttributeCollection);
|
|
3399
3399
|
private createChildAttributeSetModel;
|
|
3400
3400
|
/**
|
|
3401
|
-
* Retrieve child
|
|
3401
|
+
* Retrieve child AttributeSetModels
|
|
3402
3402
|
*/
|
|
3403
3403
|
getChildAttributeSets(): AttributeSetModel[];
|
|
3404
3404
|
}
|
|
@@ -5326,4 +5326,4 @@ declare class FetchException extends Error {
|
|
|
5326
5326
|
constructor(errorResponse: ModularUIErrorJSON | undefined, failedRequest?: XMLHttpRequest, requestOptions?: RequestOptions);
|
|
5327
5327
|
}
|
|
5328
5328
|
|
|
5329
|
-
export { type BooleanAttributeContributions as $, ActionCollection as A, BaseAttributeModel as B, CaptchaAttributeModel as C, DatetimeAttributeModel as D, LayoutHintRuleCollection as E, FetchException as F, MemoAttributeModel as G, HelptextAttributeModel as H, RangeAttributeModel as I, type AttributeData as J, type BaseAttributeContributions as K, LabelAttributeModel as L, type ModularUIErrorJSON as M, NumberAttributeModel as N, OPTION_MODE as O, PasswordAttributeModel as P, type BaseStringAttributeContributions as Q, type RegexObject as R, StringAttributeModel as S, type StringAttributeContributions as T, UploadAttributeModel as U, type MemoAttributeContributions as V, type PasswordAttributeContributions as W, XMLAttributeModel as X, type NumberAttributeContributions as Y, type MoneyAttributeContributions as Z, type DatetimeAttributeContributions as _, ActionModel as a, type ContentLinkData as a$, type ChoiceAttributeContributions as a0, type ChoiceAttributeOptionContributions as a1, type CompositeAttributeContributions as a2, type RangeAttributeContributions as a3, type CaptchaAttributeContributions as a4, type BinaryAttributeContributions as a5, type AttributeContributions as a6, type AttributeCollectionContributions as a7, type AttributeValue as a8, type MaybeAttributeValue as a9, ConceptRelationModel as aA, ConceptTypeDetailModel as aB, SourceReferenceCollection as aC, SourceReferenceModel as aD, type LabelType as aE, type PropertyType as aF, type Links as aG, type TextFragmentType as aH, type SectionReferenceType as aI, type SourceReferenceData as aJ, type PropertyData as aK, type LabelData as aL, type TextFragmentData as aM, type RelationDirection as aN, type RelationTypeType as aO, type ConceptLinkData as aP, type SectionFragment as aQ, type RelationData as aR, type TaxonomyType as aS, type ConceptDetailData as aT, type ConceptTypeDetailData as aU, type ConceptIndexData as aV, type ConceptIndexContributions as aW, ContentLinkModel as aX, SectionModel as aY, SubSectionModel as aZ, type ContentIndexData as a_, type AttributeModularUIData as aa, type AttributeRequestData as ab, type AttributeModel as ac, type ContentData as ad, type AttributePropertyElement as ae, type AttributeTextFragmentElement as af, type AttributeContentElement as ag, type DynamicSchema as ah, type NamedDynamicSchema as ai, type AnonymousDynamicSchema as aj, type CompositeDynamicSchema as ak, type ConstraintModel as al, type LayoutHintRule as am, type FileEntryType as an, type FilesType as ao, type FiletypeConstraintsType as ap, type FilesizeConstraintsType as aq, type AttributeSetContributions as ar, type ChildrenKey as as, BaseCollection as at, BaseModel as au, ResourceCollection as av, ResourceModel as aw, ConceptDetailModel as ax, ConceptLinkModel as ay, ConceptRelationCollection as az, type ActionFieldData as b, type
|
|
5329
|
+
export { type BooleanAttributeContributions as $, ActionCollection as A, BaseAttributeModel as B, CaptchaAttributeModel as C, DatetimeAttributeModel as D, LayoutHintRuleCollection as E, FetchException as F, MemoAttributeModel as G, HelptextAttributeModel as H, RangeAttributeModel as I, type AttributeData as J, type BaseAttributeContributions as K, LabelAttributeModel as L, type ModularUIErrorJSON as M, NumberAttributeModel as N, OPTION_MODE as O, PasswordAttributeModel as P, type BaseStringAttributeContributions as Q, type RegexObject as R, StringAttributeModel as S, type StringAttributeContributions as T, UploadAttributeModel as U, type MemoAttributeContributions as V, type PasswordAttributeContributions as W, XMLAttributeModel as X, type NumberAttributeContributions as Y, type MoneyAttributeContributions as Z, type DatetimeAttributeContributions as _, ActionModel as a, type ContentLinkData as a$, type ChoiceAttributeContributions as a0, type ChoiceAttributeOptionContributions as a1, type CompositeAttributeContributions as a2, type RangeAttributeContributions as a3, type CaptchaAttributeContributions as a4, type BinaryAttributeContributions as a5, type AttributeContributions as a6, type AttributeCollectionContributions as a7, type AttributeValue as a8, type MaybeAttributeValue as a9, ConceptRelationModel as aA, ConceptTypeDetailModel as aB, SourceReferenceCollection as aC, SourceReferenceModel as aD, type LabelType as aE, type PropertyType as aF, type Links as aG, type TextFragmentType as aH, type SectionReferenceType as aI, type SourceReferenceData as aJ, type PropertyData as aK, type LabelData as aL, type TextFragmentData as aM, type RelationDirection as aN, type RelationTypeType as aO, type ConceptLinkData as aP, type SectionFragment as aQ, type RelationData as aR, type TaxonomyType as aS, type ConceptDetailData as aT, type ConceptTypeDetailData as aU, type ConceptIndexData as aV, type ConceptIndexContributions as aW, ContentLinkModel as aX, SectionModel as aY, SubSectionModel as aZ, type ContentIndexData as a_, type AttributeModularUIData as aa, type AttributeRequestData as ab, type AttributeModel as ac, type ContentData as ad, type AttributePropertyElement as ae, type AttributeTextFragmentElement as af, type AttributeContentElement as ag, type DynamicSchema as ah, type NamedDynamicSchema as ai, type AnonymousDynamicSchema as aj, type CompositeDynamicSchema as ak, type ConstraintModel as al, type LayoutHintRule as am, type FileEntryType as an, type FilesType as ao, type FiletypeConstraintsType as ap, type FilesizeConstraintsType as aq, type AttributeSetContributions as ar, type ChildrenKey as as, BaseCollection as at, BaseModel as au, ResourceCollection as av, ResourceModel as aw, ConceptDetailModel as ax, ConceptLinkModel as ay, ConceptRelationCollection as az, type ActionFieldData as b, type StringFilterContributions as b$, type ContentIndexContributions as b0, type ContentTOCData as b1, type ContentDataItem as b2, type ContentDataSection as b3, type ContentContributions as b4, type ContentDetailData as b5, type ContentDetailContributions as b6, type SectionData as b7, type SubSectionData as b8, type ContentTypeData as b9, type RedirectTextObject as bA, type RedirectObject as bB, type ModularUIErrorResponse as bC, AssignmentFilterModel as bD, BaseFilterModel as bE, FilterCollection as bF, FilterModel as bG, RangeFilterModel as bH, type IFilter as bI, type ContributionsForFilterCollection as bJ, type FilterData as bK, type FilterContribution as bL, type FilterCollectionData as bM, type FilterCollectionContributions as bN, type ChoiceFilterData as bO, type ChoiceFilterContribution as bP, type DateFilterData as bQ, type DateFilterContribution as bR, type AssignmentFilterData as bS, type AssignmentFilterContribution as bT, type DateRangeFilterData as bU, type DateRangeFilterContribution as bV, type NumberFilterData as bW, type NumberFilterContributions as bX, type NumberRangeFilterData as bY, type NumberRangeFilterContribution as bZ, type StringFilterData as b_, type ContentTypeContributions as ba, type RelatedConceptsData as bb, type RelatedConceptContributions as bc, ContentConfiguration as bd, ContentConfigurationElements as be, ContentConfigurationEndResults as bf, ContentConfigurationQuestions as bg, ContentConfigurationResults as bh, type TextFragmentElement as bi, type ContentElement as bj, type PropertyElement as bk, type ConfigurationElements as bl, type QuestionConfiguration as bm, type ResultsConfiguration as bn, type ContentConfigurationContributions as bo, type EndResultsConfiguration as bp, DetailModel as bq, type BaseDetailData as br, type DetailData as bs, type BaseDetailContributions as bt, type DetailPanelContributions as bu, ErrorCollectionType as bv, ErrorCollection as bw, ErrorModel as bx, ErrorResponse as by, type TitleObject as bz, type ActionData as c, type HrefState as c$, type FormObjectData as c0, type FormData as c1, type SuccessData as c2, type ErrorObjectData as c3, type MissingObjectData as c4, type ResultsData as c5, type AnchorElementData as c6, type FormContributions as c7, type FormObjectContributions as c8, Href as c9, type GroupingContributions as cA, type ListItemData as cB, type ListDetailData as cC, type ListDetailContributions as cD, type ListDetailAttributeData as cE, Parameter as cF, ParameterCollection as cG, ProcessStatusSettingsModel as cH, type ProcessStatusSettingsData as cI, type ProcessStatusSettingsContributions as cJ, type UserServicesData as cK, type UserServicesContributions as cL, type UserData as cM, type UserContributions as cN, type ModularUIModel as cO, type ModelWithChildModels as cP, type ModelOptions as cQ, type ModularUIModelWithChildModels as cR, ModularUIResponse as cS, type TargetModel as cT, type ModularUISpecificErrorResponse as cU, type AuthenticationType as cV, type ModelConfig as cW, type ISO_DATE as cX, type Data as cY, type Contributions as cZ, type ResourceData as c_, LayoutHintCollection as ca, LinkCollection as cb, LinkModel as cc, type LinkData as cd, type LinkContributions as ce, type NormalizedLinkData as cf, type NormalizedLinkContributions as cg, ListDetailModel as ch, GroupModel as ci, GroupingModel as cj, ListHeaderModel as ck, ListHref as cl, ListItemCollection as cm, ListItemModel as cn, ListModel as co, PagesizeModel as cp, PagingModel as cq, SortingModel as cr, SORT_ORDER as cs, SortOptionModel as ct, type ListData as cu, type ListContributions as cv, type PagingData as cw, type PagingContributions as cx, type GroupData as cy, type GroupingData as cz, type ActionContributions as d, type HistoryLocation as d0, type DefaultLinksData as d1, type TextWithPlaceholders as d2, type MessageParameters as d3, type ErrorMessage as d4, DateUtil as d5, DateTimeUtil as d6, TimeUtil as d7, TimestampUtil as d8, type OffsetInfo as d9, BaseDateTimeUtil as da, type RequestURLOptions as db, type ProgressHandler as dc, type RequestBaseOptions as dd, type RequestOptions as de, type UpdateHandler as df, type ModularUIRequestOptions as dg, AttributeCollection as e, AttributeContent as f, AttributeSetModel as g, BooleanAttributeModel as h, CHOICETYPE as i, ChoiceAttributeModel as j, ChoiceAttributeOptionCollection as k, type ChoiceAttributeOptionModelOptions as l, ChoiceAttributeOptionModel as m, CompositeAttributeChildCollection as n, CompositeAttributeModel as o, ATTRIBUTE_TYPE as p, FILTER_TYPE as q, ConstraintCollection as r, DateTimeDateFormatConstraint as s, DatetimeFormatConstraint as t, DateTimeTimeFormatConstraint as u, RegexConstraint as v, BaseLayoutHintRule as w, addLayoutHintRule as x, type LayoutHintRulesUpdater as y, updateLayoutHintRules as z };
|