@beinformed/ui 2.0.0-beta.1 → 2.0.0-beta.3
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/{Constants-Cw7d8vue.d.cts → Constants-CYAEbTZ4.d.cts} +13 -1
- package/dist/{Constants-Cw7d8vue.d.ts → Constants-CYAEbTZ4.d.ts} +13 -1
- package/dist/{FormModel-VQaB1SCS.d.ts → FormModel-D-1KaExN.d.ts} +1 -1
- package/dist/{FormModel-DnizzHJs.d.cts → FormModel-DZLGZU6B.d.cts} +1 -1
- package/dist/chunk-24FITWGX.js +2 -0
- package/dist/{chunk-WVQSFYWD.js.map → chunk-24FITWGX.js.map} +1 -1
- package/dist/chunk-4BYHEGUN.js +2 -0
- package/dist/{chunk-6GV6KLAV.js.map → chunk-4BYHEGUN.js.map} +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-LCMAAW7B.js → chunk-FKIQBPXP.js} +2 -2
- package/dist/chunk-FKIQBPXP.js.map +1 -0
- package/dist/chunk-J2QT7BB2.js +2 -0
- package/dist/chunk-J2QT7BB2.js.map +1 -0
- package/dist/{chunk-UE323PGR.js → chunk-NOB2I3DW.js} +2 -2
- package/dist/{chunk-KCZQQTX6.js → chunk-QTZ77JJN.js} +2 -2
- package/dist/{chunk-VIKUDFQV.js → chunk-S3X2VJQL.js} +2 -2
- package/dist/{chunk-VIKUDFQV.js.map → chunk-S3X2VJQL.js.map} +1 -1
- package/dist/chunk-SBDXU5FX.js +2 -0
- package/dist/chunk-SBDXU5FX.js.map +1 -0
- package/dist/chunk-SFI46XCV.js +2 -0
- package/dist/{chunk-OBB3YOFC.js.map → chunk-SFI46XCV.js.map} +1 -1
- package/dist/{chunk-YOBCFXEM.js → chunk-TDCALIXY.js} +2 -2
- package/dist/{chunk-333J3Q2L.js → chunk-WHWNPOV6.js} +2 -2
- package/dist/{chunk-ZDZHA43Q.js → chunk-XWOLLK42.js} +2 -2
- package/dist/constants/index.cjs +1 -1
- package/dist/constants/index.cjs.map +1 -1
- package/dist/constants/index.d.cts +6 -2
- package/dist/constants/index.d.ts +6 -2
- package/dist/constants/index.js +1 -1
- package/dist/exceptions/index.cjs +1 -1
- package/dist/exceptions/index.d.cts +3 -3
- package/dist/exceptions/index.d.ts +3 -3
- package/dist/exceptions/index.js +1 -1
- package/dist/{index-CEg8Nt57.d.ts → index-CvHISgQi.d.cts} +2 -2
- package/dist/{index-BFD-cKUB.d.cts → index-SO4eiir8.d.ts} +2 -2
- package/dist/index.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +1 -1
- package/dist/layouthints/index.cjs +7 -7
- package/dist/layouthints/index.cjs.map +1 -1
- package/dist/layouthints/index.d.cts +2 -3
- package/dist/layouthints/index.d.ts +2 -3
- 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 +5 -5
- package/dist/models/index.d.ts +5 -5
- package/dist/models/index.js +1 -1
- package/dist/modularui/index.cjs +6 -6
- package/dist/modularui/index.cjs.map +1 -1
- package/dist/modularui/index.d.cts +35 -8
- package/dist/modularui/index.d.ts +35 -8
- package/dist/modularui/index.js +1 -1
- package/dist/settings/index.cjs +1 -1
- package/dist/settings/index.cjs.map +1 -1
- package/dist/settings/index.d.cts +5 -1
- package/dist/settings/index.d.ts +5 -1
- package/dist/settings/index.js +1 -1
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/utils/index.cjs +8 -8
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.cts +4 -6
- package/dist/utils/index.d.ts +4 -6
- package/dist/utils/index.js +1 -1
- package/package.json +4 -4
- package/dist/chunk-5BR5HMNQ.js +0 -2
- package/dist/chunk-5BR5HMNQ.js.map +0 -1
- package/dist/chunk-6GV6KLAV.js +0 -2
- package/dist/chunk-BTDN4ZDB.js +0 -2
- package/dist/chunk-BTDN4ZDB.js.map +0 -1
- package/dist/chunk-LCMAAW7B.js.map +0 -1
- package/dist/chunk-OBB3YOFC.js +0 -2
- package/dist/chunk-WVQSFYWD.js +0 -2
- /package/dist/{chunk-UE323PGR.js.map → chunk-NOB2I3DW.js.map} +0 -0
- /package/dist/{chunk-KCZQQTX6.js.map → chunk-QTZ77JJN.js.map} +0 -0
- /package/dist/{chunk-YOBCFXEM.js.map → chunk-TDCALIXY.js.map} +0 -0
- /package/dist/{chunk-333J3Q2L.js.map → chunk-WHWNPOV6.js.map} +0 -0
- /package/dist/{chunk-ZDZHA43Q.js.map → chunk-XWOLLK42.js.map} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
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,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-FKIQBPXP.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 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-SBDXU5FX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/modularui/Authenticate.ts","../src/modularui/CaptchaRequest.ts","../src/modularui/ModularUIError.ts","../src/modularui/ModelResolver.ts","../src/modularui/ModelRegistry.ts","../src/modularui/ModularUIRequest.ts","../src/modularui/UploadRequest.ts"],"sourcesContent":["import { HTTP_METHODS, INTERNAL_LOGIN_TYPE } from \"../constants/Constants\";\nimport { UnauthorizedException } from \"../exceptions/UnauthorizedException\";\nimport { getContextPath } from \"../settings/Paths\";\nimport {\n loginPasswordField,\n loginPath,\n loginType,\n loginUsernameField,\n logoutPath,\n} from \"../settings/Settings\";\nimport { universalFetch } from \"../utils/fetch/universalFetch\";\nimport { Cache } from \"../utils/storage/Cache\";\n\nexport class Authenticate {\n private _isBasicAuthentication: boolean;\n private _authenticationType: INTERNAL_LOGIN_TYPE;\n\n constructor() {\n this._isBasicAuthentication = false;\n this._authenticationType = this.getAuthenticationType();\n }\n\n getAuthenticationType() {\n const type = loginType();\n\n const enumType =\n INTERNAL_LOGIN_TYPE[type as keyof typeof INTERNAL_LOGIN_TYPE];\n\n if (!enumType || enumType === INTERNAL_LOGIN_TYPE.JAAS) {\n return INTERNAL_LOGIN_TYPE.JAAS;\n }\n\n if (\n enumType === INTERNAL_LOGIN_TYPE.PAC4J_FORM ||\n type.includes(\"FormClient\")\n ) {\n return INTERNAL_LOGIN_TYPE.PAC4J_FORM;\n } else if (\n enumType === INTERNAL_LOGIN_TYPE.PAC4J_BASIC ||\n type.includes(\"IndirectBasicClient\")\n ) {\n return INTERNAL_LOGIN_TYPE.PAC4J_BASIC;\n }\n\n return INTERNAL_LOGIN_TYPE.PAC4J_INDIRECT;\n }\n\n get authenticationType() {\n return this._authenticationType;\n }\n\n set authenticationType(authenticationType: INTERNAL_LOGIN_TYPE) {\n this._authenticationType = authenticationType;\n }\n\n get isBasicAuthentication() {\n return (\n this._isBasicAuthentication ||\n this.authenticationType === INTERNAL_LOGIN_TYPE.PAC4J_BASIC\n );\n }\n\n set isBasicAuthentication(isBasicAuthentication: boolean) {\n this._isBasicAuthentication = isBasicAuthentication;\n }\n\n requestLogin() {\n return universalFetch({\n url: `${getContextPath()}/login`,\n method: HTTP_METHODS.GET,\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/x-www-form-urlencoded\",\n },\n });\n }\n\n initLogin(initLogin: boolean) {\n if (this.isBasicAuthentication || !initLogin) {\n return Promise.resolve(true);\n }\n\n return this.requestLogin().catch((error) => {\n // when an unauthorizedexception is received on a request to the login service,\n // this indicates a basic authorization scenario\n // in case of form based authentication other exceptions are thrown\n if (error instanceof UnauthorizedException) {\n this.isBasicAuthentication = true;\n }\n\n return Promise.resolve({});\n });\n }\n\n login(username: string, password: string) {\n switch (this.authenticationType) {\n case INTERNAL_LOGIN_TYPE.PAC4J_FORM:\n return this.doFormLogin(username, password);\n case INTERNAL_LOGIN_TYPE.PAC4J_BASIC:\n return this.doBasicAuthentication(username, password);\n case INTERNAL_LOGIN_TYPE.PAC4J_INDIRECT:\n // pac4j should handle this\n return Promise.resolve();\n default:\n return this.doJaasAuthentication(username, password);\n }\n }\n\n getFormLoginUrl() {\n switch (this.authenticationType) {\n case INTERNAL_LOGIN_TYPE.PAC4J_BASIC:\n return `${getContextPath()}${loginPath(\"DirectBasicAuthClient\")}`;\n case INTERNAL_LOGIN_TYPE.PAC4J_FORM:\n return `${getContextPath()}${loginPath(\"FormClient\")}`;\n case INTERNAL_LOGIN_TYPE.PAC4J_INDIRECT:\n //pac4j should handle this\n return \"\";\n default:\n return `${getContextPath()}/j_security_check`;\n }\n }\n\n getFormLoginData(username: string, password: string) {\n const encodedUsername = encodeURIComponent(username);\n const encodedPassword = encodeURIComponent(password);\n\n switch (this.authenticationType) {\n case INTERNAL_LOGIN_TYPE.PAC4J_BASIC:\n case INTERNAL_LOGIN_TYPE.PAC4J_FORM:\n return `${loginUsernameField()}=${encodedUsername}&${loginPasswordField()}=${encodedPassword}`;\n case INTERNAL_LOGIN_TYPE.JAAS:\n return `j_username=${encodedUsername}&j_password=${encodedPassword}`;\n default:\n return \"\";\n }\n }\n\n doFormLogin(username: string, password: string) {\n return universalFetch({\n url: this.getFormLoginUrl(),\n method: HTTP_METHODS.POST,\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/x-www-form-urlencoded\",\n },\n data: this.getFormLoginData(username, password),\n });\n }\n\n doBasicAuthentication(username: string, password: string) {\n Cache.addItem(\"basic\", btoa(`${username}:${password}`));\n return this.requestLogin();\n }\n\n doJaasAuthentication(username: string, password: string) {\n return this.initLogin(true).then(() => {\n if (this.isBasicAuthentication) {\n Cache.removeItem(\"basic-ok\");\n return this.doBasicAuthentication(username, password).then(() => {\n Cache.addItem(\"basic-ok\", true);\n });\n }\n return this.doFormLogin(username, password);\n });\n }\n\n getLogoutUrl() {\n const type = loginType();\n\n if (!type || type === INTERNAL_LOGIN_TYPE.JAAS) {\n return `${getContextPath()}/Logoff`;\n }\n\n return `${getContextPath()}${logoutPath()}`;\n }\n\n /**\n * Browser redirect to the logout url. (no xmlhttp)\n */\n redirectToLogout(postRedirectUrl?: string) {\n Cache.clear();\n\n const origin = window.location.origin;\n const redirectUrl = postRedirectUrl?.startsWith(\"http\")\n ? postRedirectUrl\n : `${origin}${getContextPath()}`;\n\n window.location.assign(this.getLogoutUrl() + \"?url=\" + redirectUrl);\n }\n\n /**\n * Logout the user with xmlhttp\n */\n logout() {\n return universalFetch({\n url: this.getLogoutUrl(),\n }).then((response) => {\n // clear cache because of cached contributions\n Cache.clear();\n return response;\n });\n }\n}\n","import { HTTP_METHODS } from \"../constants/Constants\";\nimport { getCaptchaPath, getContextPathModularUI } from \"../settings/Paths\";\nimport { xhr } from \"../utils/fetch/xhr\";\n\ninterface CaptchaInitialResponse {\n tokenId: string;\n image: string;\n}\n\ninterface CaptchaValidResponse {\n valid: boolean;\n}\n\ninterface CaptchaInvalidResponse {\n tokenId: string;\n image: string;\n valid: boolean;\n error: { id: string };\n}\n\ntype PossibleCaptchaResponse =\n | CaptchaInitialResponse\n | CaptchaValidResponse\n | CaptchaInvalidResponse;\n\ninterface CaptchaRequestOptions {\n origin?: string;\n contextPath?: string;\n}\n\nexport class CaptchaRequest {\n private _tokenId: string | undefined;\n private _image: string | undefined;\n private _origin = \"\";\n private _contextPath: string = getContextPathModularUI();\n\n CaptchaRequest(options?: CaptchaRequestOptions) {\n this._origin = options?.origin || \"\";\n this._contextPath = options?.contextPath || getContextPathModularUI();\n }\n\n captchaResponse(response: PossibleCaptchaResponse) {\n this._tokenId = \"tokenId\" in response ? response.tokenId : this._tokenId;\n this._image = \"image\" in response ? response.image : this._image;\n\n return {\n tokenId: this._tokenId,\n image: this._image,\n valid: \"valid\" in response ? response.valid : false,\n error: \"error\" in response ? response.error : null,\n };\n }\n\n /**\n * Initiate the captcha request\n */\n init() {\n return xhr<CaptchaInitialResponse>({\n url: getCaptchaPath(this._contextPath, this._origin),\n }).then((response) => this.captchaResponse(response));\n }\n\n /**\n * Answer the captcha\n */\n send(answer?: string) {\n return xhr<CaptchaValidResponse | CaptchaInvalidResponse>({\n url: getCaptchaPath(this._contextPath, this._origin),\n method: HTTP_METHODS.POST,\n data: {\n tokenId: this._tokenId ?? \"\",\n answer: answer ?? \"\",\n },\n })\n .then((response) => this.captchaResponse(response))\n .catch((error) => this.captchaResponse(error.response));\n }\n\n /**\n * Reset the captcha and receive a new token and image\n */\n refresh() {\n return this.init();\n }\n}\n","import type { Href } from \"../models/href/Href\";\n\nexport class ModularUIError extends Error {\n response: object;\n href: Href | string | undefined;\n\n constructor(message: string, response: object, href?: string | Href) {\n super(message);\n\n Object.setPrototypeOf(this, ModularUIError.prototype);\n\n this.response = response;\n this.href = href;\n\n if (\n \"captureStackTrace\" in Error &&\n typeof Error.captureStackTrace === \"function\"\n ) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = new Error(message).stack;\n }\n }\n\n get resource() {\n return this.href;\n }\n}\n","import { has } from \"lodash\";\n\nimport { IllegalArgumentException } from \"../exceptions/IllegalArgumentException\";\n\nimport { MODEL_REGISTRY } from \"./ModelRegistry\";\n\nimport type { ModularUIResponse } from \"./ModularUIResponse\";\nimport type { TargetModel } from \"./types\";\n\n/**\n * Utility to determine which JavaScript Model class should be instantiated\n * based on a Modular UI response.\n */\nexport class ModelResolver {\n /**\n * Resolves a response to a specific Model constructor.\n * The resolution order is:\n * 1. If a single override is provided, it is returned immediately (forced).\n * 2. If multiple overrides are provided, it returns the first one that matches the response.\n * 3. If no overrides match or are provided, it searches the global `MODEL_REGISTRY`.\n *\n * @param response - The Modular UI response object containing data and contributions.\n * @param overrides - Optional class or array of classes to prefer over the global registry.\n * @param forceTargetModel - Force the first model from the overrides array to be returned.\n *\n * @throws {IllegalArgumentException} If the response is missing or the contributions\n * lack a `resourcetype` property.\n *\n * @returns The matching Model constructor, or `undefined` if no match is found.\n *\n * @example\n * const resolver = new ModelResolver();\n * const Model = resolver.resolve(response, [FormModel, TaskModel]);\n */\n static resolve(\n response: ModularUIResponse,\n overrides?: TargetModel | TargetModel[],\n forceTargetModel = false,\n ) {\n if (!response) {\n throw new IllegalArgumentException(\n `No data or contribution available, cannot resolve model`,\n );\n }\n\n if (!has(response.contributions, \"resourcetype\")) {\n throw new IllegalArgumentException(\n `Contributions has wrong format, missing resourcetype property in contributions of ${response.requestHref?.toString()}`,\n );\n }\n\n if (overrides) {\n const overrideList = Array.isArray(overrides) ? overrides : [overrides];\n\n if (overrideList.length === 1 || forceTargetModel) {\n return overrideList[0];\n }\n\n const overrideMatch = MODEL_REGISTRY.find(\n (config) =>\n config.isMatch(response) && overrideList.includes(config.Model),\n );\n\n return overrideMatch?.Model;\n }\n\n const match = MODEL_REGISTRY.find((config) => config.isMatch(response));\n\n return match?.Model;\n }\n}\n","import { ApplicationModel } from \"../models/application/ApplicationModel\";\nimport { CaseViewModel } from \"../models/caseview/CaseViewModel\";\nimport { ConceptDetailModel } from \"../models/concepts/ConceptDetailModel\";\nimport { ConceptIndexModel } from \"../models/concepts/ConceptIndexModel\";\nimport { ConceptTypeDetailModel } from \"../models/concepts/ConceptTypeDetailModel\";\nimport { ContentIndexModel } from \"../models/content/ContentIndexModel\";\nimport { ContentModel } from \"../models/content/ContentModel\";\nimport { ContentTOCModel } from \"../models/content/ContentTOCModel\";\nimport { ContentTypeModel } from \"../models/content/ContentTypeModel\";\nimport { DetailModel } from \"../models/detail/DetailModel\";\nimport { FormModel } from \"../models/form/FormModel\";\nimport { ListDetailModel } from \"../models/list/detail/ListDetailModel\";\nimport { ListModel } from \"../models/list/ListModel\";\nimport { LookupOptionsModel } from \"../models/lookup/LookupOptionsModel\";\nimport { ModelCatalogModel } from \"../models/modelcatalog/ModelCatalogModel\";\nimport { GroupingPanelModel } from \"../models/panels/GroupingPanelModel\";\nimport { CaseSearchModel } from \"../models/search/CaseSearchModel\";\nimport { TabModel } from \"../models/tab/TabModel\";\nimport { TaskGroupModel } from \"../models/taskgroup/TaskGroupModel\";\nimport { UserModel } from \"../models/user/UserModel\";\nimport { UserProfileModel } from \"../models/user/UserProfileModel\";\nimport { UserServicesModel } from \"../models/user/UserServicesModel\";\n\nimport type { ModelConfig } from \"./types\";\n\nexport const MODEL_REGISTRY: ModelConfig[] = [\n {\n name: \"Application\",\n isMatch: ({ resourcetype }) => resourcetype === \"Application\",\n Model: ApplicationModel,\n },\n {\n name: \"Tab\",\n isMatch: ({ resourcetype }) =>\n resourcetype.endsWith(\"Tab\") || resourcetype.endsWith(\"KnowledgeBank\"),\n Model: TabModel,\n },\n {\n name: \"ListDetail\",\n isMatch: ({ resourcetype }) => {\n const normalized = resourcetype.toLowerCase();\n return (\n normalized.endsWith(\"listdetail\") ||\n normalized.endsWith(\"listpaneldetail\") ||\n normalized.endsWith(\"datastorepaneldetail\")\n );\n },\n Model: ListDetailModel,\n },\n {\n name: \"List\",\n isMatch: ({ resourcetype }) =>\n resourcetype.endsWith(\"List\") ||\n resourcetype.endsWith(\"ListPanel\") ||\n resourcetype.endsWith(\"RelatedDataStorePanel\") ||\n resourcetype.endsWith(\"RelatedDatastorePanel\") ||\n [\n \"list-related-cases\",\n \"RecordPanel\",\n \"EventHistoryPanel\",\n \"NotePanel\",\n \"AppointmentPanel\",\n \"DocumentPanel\",\n \"AssignmentPanel\",\n ].includes(resourcetype),\n Model: ListModel,\n },\n {\n name: \"GroupingPanel\",\n isMatch: ({ resourcetype }) =>\n [\"GroupingPanel\", \"CaseTabGroupingPanel\", \"TabGroupingPanel\"].includes(\n resourcetype,\n ),\n Model: GroupingPanelModel,\n },\n {\n name: \"CaseSearch\",\n isMatch: ({ resourcetype }) => resourcetype === \"CaseSearch\",\n Model: CaseSearchModel,\n },\n {\n name: \"CaseView\",\n isMatch: ({ resourcetype }) => resourcetype === \"CaseView\",\n Model: CaseViewModel,\n },\n {\n name: \"Detail\",\n isMatch: ({ resourcetype }) =>\n resourcetype.endsWith(\"DetailPanel\") ||\n [\"Detail\", \"CasePropertiesPanel\", \"CasePropertiesPanelDetail\"].includes(\n resourcetype,\n ),\n Model: DetailModel,\n },\n {\n name: \"TaskGroup\",\n isMatch: ({ resourcetype }) => resourcetype === \"TaskGroup\",\n Model: TaskGroupModel,\n },\n {\n name: \"Form\",\n isMatch: ({ resourcetype }) => resourcetype === \"Form\",\n Model: FormModel,\n },\n {\n name: \"User\",\n isMatch: ({ resourcetype }) => resourcetype === \"userdata\",\n Model: UserModel,\n },\n {\n name: \"UserProfile\",\n isMatch: ({ resourcetype }) => resourcetype === \"userdata\",\n Model: UserProfileModel,\n },\n {\n name: \"UserServices\",\n isMatch: ({ resourcetype }) => resourcetype === \"user_services\",\n Model: UserServicesModel,\n },\n {\n name: \"ModelCatalog\",\n isMatch: ({ resourcetype }) => resourcetype === \"ModelCatalog\",\n Model: ModelCatalogModel,\n },\n {\n name: \"ConceptIndex\",\n isMatch: ({ resourcetype }) =>\n resourcetype === \"ConceptSearch\" ||\n resourcetype.toLowerCase() === \"relatedconcepts\",\n Model: ConceptIndexModel,\n },\n {\n name: \"ConceptDetail\",\n isMatch: ({ resourcetype }) => resourcetype === \"ConceptDetail\",\n Model: ConceptDetailModel,\n },\n {\n name: \"ConceptTypeDetail\",\n isMatch: ({ resourcetype }) => resourcetype === \"ConceptTypeDetail\",\n Model: ConceptTypeDetailModel,\n },\n {\n name: \"ContentIndex\",\n isMatch: ({ resourcetype }) => resourcetype === \"ContentSearch\",\n Model: ContentIndexModel,\n },\n {\n name: \"ContentTOC\",\n isMatch: ({ resourcetype }) => resourcetype === \"ContentTOC\",\n Model: ContentTOCModel,\n },\n {\n name: \"Content\",\n isMatch: ({ resourcetype }) => resourcetype === \"ContentDetail\",\n Model: ContentModel,\n },\n {\n name: \"ContentType\",\n isMatch: ({ resourcetype }) => resourcetype === \"ContentTypeDetail\",\n Model: ContentTypeModel,\n },\n {\n name: \"LookupOptions\",\n isMatch: ({ resourcetype }) => resourcetype === \"lookupOptions\",\n Model: LookupOptionsModel,\n },\n];\n","import deepmerge from \"deepmerge\";\nimport { klona } from \"klona/full\";\nimport { isPlainObject } from \"lodash\";\n\nimport { HTTP_METHODS, TIMEVERSION_FILTER_NAME } from \"../constants/Constants\";\nimport { IllegalArgumentException } from \"../exceptions/IllegalArgumentException\";\nimport { IllegalStateException } from \"../exceptions/IllegalStateException\";\nimport { LayoutHintProcessor } from \"../layouthints/LayoutHintProcessor\";\nimport { ResourceModel } from \"../models/base/ResourceModel\";\nimport { ContentModel } from \"../models/content/ContentModel\";\nimport { SectionModel } from \"../models/content/SectionModel\";\nimport { ErrorResponse } from \"../models/error/ErrorResponse\";\nimport { FormModel } from \"../models/form/FormModel\";\nimport { Href } from \"../models/href/Href\";\nimport { getContextPathModularUI } from \"../settings/Paths\";\nimport { getBooleanSetting } from \"../settings/Settings\";\nimport { universalFetch } from \"../utils/fetch/universalFetch\";\n\nimport { ModelResolver } from \"./ModelResolver\";\nimport { ModularUIError } from \"./ModularUIError\";\nimport { ModularUIResponse } from \"./ModularUIResponse\";\n\nimport type { FormData } from \"../models/form/types\";\nimport type {\n ModularUIModel,\n ModularUIModelWithChildModels,\n} from \"../models/types\";\nimport type { Contributions, Data, DefaultLinksData } from \"../types/types\";\nimport type {\n ModularUIRequestOptions,\n ProgressHandler,\n} from \"../utils/fetch/types\";\nimport type { ModularUISpecificErrorResponse, TargetModel } from \"./types\";\n\n/**\n * Helper for fetching data and contributions from the Be Informed modular ui\n * and merge it into a target or resolvable model.\n *\n * @example\n * const model = new ModularUIRequest(\"url-to-request\").fetch();\n * const post = new ModularUIRequest(\"url-to-request\", { method: \"POST\"}).fetch();\n */\nexport class ModularUIRequest {\n private _response: ModularUIResponse = new ModularUIResponse();\n\n private _href: Href;\n private _options: ModularUIRequestOptions;\n private _targetModel: TargetModel | TargetModel[] | undefined;\n private _forceTargetModel = false;\n private _contributionsHref: Href | string | undefined;\n private _locale = \"en\";\n private _method: HTTP_METHODS = HTTP_METHODS.GET;\n\n private _progressEvent: ProgressHandler | undefined;\n\n private _origin = \"\";\n private _contextPath: string = getContextPathModularUI();\n\n private _layoutHintProcessor: LayoutHintProcessor;\n\n constructor(href: Href | string, options: ModularUIRequestOptions = {}) {\n if (!href) {\n throw new IllegalArgumentException(\n \"You must pass a href to the resource that is requested\",\n );\n }\n\n this._href = typeof href === \"string\" ? new Href(href) : href;\n this._options = options;\n\n this._layoutHintProcessor = new LayoutHintProcessor(\n this._origin,\n this._contextPath,\n this.options,\n );\n\n this._response = new ModularUIResponse();\n this._response.requestHref = this.href;\n\n this.locale = this.getRequestLocale(options.locale);\n\n // copy request parameters to response, to be able to use them in the models\n // self links are missing the request parameters\n this._response.parameters = this.href.parameters.all;\n\n this.contextPath = options.contextPath || this.href.contextPath;\n this.origin = options.origin || this.href.origin;\n\n this._targetModel = options.targetModel;\n this.method = options.method || this.href.method;\n }\n\n /**\n * Retrieve the preferred language for this request, falls back to the browser language or english\n */\n getRequestLocale(optionLocale: string | undefined) {\n if (optionLocale) {\n return optionLocale;\n }\n\n if (typeof navigator !== \"undefined\" && navigator?.language) {\n return navigator.language.split(\"-\")[0] || \"en\";\n }\n\n return \"en\";\n }\n\n get origin() {\n return this._origin;\n }\n\n set origin(origin: string | undefined) {\n this._origin = origin ?? \"\";\n this._response.origin = origin ?? \"\";\n this._layoutHintProcessor.setOrigin(this._origin);\n }\n\n get contextPath() {\n return this._contextPath;\n }\n\n set contextPath(contextPath: string | undefined) {\n const path = contextPath ?? getContextPathModularUI();\n this._contextPath = path;\n this._response.contextPath = path;\n this._layoutHintProcessor.setContextPath(path);\n }\n\n get contributionsHref() {\n return this._contributionsHref;\n }\n\n set contributionsHref(contributionsHref: string | Href | undefined) {\n this._contributionsHref = contributionsHref;\n }\n\n set locale(locale: string) {\n this._locale = locale;\n this._response.locale = locale;\n this._layoutHintProcessor.setRequestOptions(this.options);\n }\n\n get locale() {\n return this._locale;\n }\n\n get response() {\n return this._response;\n }\n\n set href(href: Href) {\n this._href = href;\n }\n\n get href() {\n return this._href;\n }\n\n set method(method: HTTP_METHODS) {\n this._method = method;\n }\n\n get method() {\n return this._method;\n }\n\n get options() {\n return {\n ...this._options,\n locale: this.locale,\n method: this.method,\n };\n }\n\n set options(options: ModularUIRequestOptions) {\n this._options = options;\n this._layoutHintProcessor.setRequestOptions(options);\n }\n\n get requestOptions() {\n const {\n targetModel,\n forceTargetModel,\n updateHandler,\n childmodels,\n isValidationRequest,\n removeOnUnmount,\n ...requestOptions\n } = this.options;\n\n return requestOptions;\n }\n\n get withChildModels() {\n return (\n !(\"childmodels\" in this.options) || this.options.childmodels === true\n );\n }\n\n set targetModel(targetModel: TargetModel | TargetModel[] | undefined) {\n this._targetModel = targetModel;\n }\n\n get targetModel() {\n return this._targetModel;\n }\n\n set forceTargetModel(forceTargetModel: boolean) {\n this._forceTargetModel = forceTargetModel ?? false;\n }\n\n get forceTargetModel() {\n return this._forceTargetModel;\n }\n\n /**\n * Resolves the appropriate Model class for the current response.\n * Uses the ModelResolver to check against targetModel overrides or the global registry.\n */\n private resolveModel(): TargetModel {\n const Model = ModelResolver.resolve(\n this.response,\n this.targetModel,\n this.forceTargetModel,\n );\n\n if (Model) {\n return Model;\n }\n\n const url = this.href.toString();\n const resourceType = this.response?.resourcetype || \"unknown\";\n\n if (this.targetModel) {\n const availableTypes = Array.isArray(this.targetModel)\n ? this.targetModel\n .map((m) => (m as unknown as ResourceModel).type || m.name)\n .join(\", \")\n : (this.targetModel as unknown as ResourceModel).type ||\n this.targetModel.name;\n\n throw new IllegalStateException(\n `Cannot find a matching model for URL: '${url}', resourcetype: '${resourceType}'. Available overrides: [${availableTypes}]`,\n );\n }\n\n throw new IllegalStateException(\n `No JavaScript model is applicable for the request to ${url}. Response resourcetype: '${resourceType}'.`,\n );\n }\n\n private createModel() {\n const Model = this.resolveModel();\n return new Model(this.response);\n }\n\n private processContributionsService(contributions: unknown) {\n if (!isPlainObject(contributions)) {\n throw new IllegalArgumentException(\n \"Missing contributions data or contributions is not JSON\",\n );\n }\n\n if (typeof contributions === \"object\" && contributions != null) {\n const record = contributions as Record<string, Contributions>;\n const [key] = Object.keys(record);\n const contributionsBody = record[key];\n if (key === \"error\") {\n this.handleContributionsError(contributionsBody);\n }\n if (typeof contributionsBody === \"object\" && contributionsBody != null) {\n // The key of the data service is different from the contributions service for forms\n if (!(this.response.key in contributionsBody)) {\n this.response.key = key;\n }\n\n this.response.contributions = contributionsBody;\n }\n }\n }\n\n private handleContributionsError(error: ModularUISpecificErrorResponse) {\n const errorMessage = error.properties?.message ?? \"Error in contribution\";\n throw new ModularUIError(errorMessage, error, this.contributionsHref);\n }\n\n private handleDataError(error: ModularUISpecificErrorResponse | string) {\n if (typeof error === \"object\" && error.properties) {\n const errorMessage = error.properties?.message ?? \"Error in data\";\n throw new ModularUIError(\n errorMessage,\n error,\n this.href.absolutepath.toString(),\n );\n }\n\n throw new IllegalArgumentException(JSON.stringify(error));\n }\n\n private handleData(key: string, data: Data | undefined) {\n this.response.key = key;\n this.response.data = data;\n\n const links = data?._links as DefaultLinksData | undefined;\n\n if (!links) {\n throw new IllegalArgumentException(\n `No _links object found in the data of ${this.href.toString()}`,\n );\n }\n\n if (links?.contributions) {\n this.contributionsHref = links.contributions.href;\n } else if (Array.isArray(links) && links[0].contributions) {\n this.contributionsHref = links[0].contributions.href;\n } else {\n throw new IllegalArgumentException(\n `Contributions link not found for data with key ${key}`,\n );\n }\n }\n\n private processDataService(data: unknown) {\n if (typeof data !== \"object\" || data === null) {\n throw new IllegalArgumentException(\"Missing data or data is not JSON\");\n }\n\n const record = data as Record<string, Data>;\n const [key] = Object.keys(record);\n const dataBody = record[key];\n\n if (key === \"error\") {\n this.handleDataError(dataBody);\n } else {\n const [key] = Object.keys(data);\n this.handleData(key, dataBody);\n }\n }\n\n private fetchContributionsService() {\n if (!this.contributionsHref) {\n throw new IllegalStateException(\"Missing a contributions href\");\n }\n\n return universalFetch({\n url: `${this.origin}${this.contextPath}${this.contributionsHref}`,\n cache: true,\n locale: this.options.locale,\n });\n }\n\n private fetchDataService() {\n return universalFetch({\n ...this.requestOptions,\n url: `${this.origin}${this.contextPath}${this.href.path}`,\n params: this.href.getQuerystringForModularUI(),\n locale: this.options.locale,\n onProgress: this.onProgress,\n });\n }\n\n set onProgress(progressEvent: ProgressHandler | undefined) {\n this._progressEvent = progressEvent;\n }\n\n get onProgress() {\n return this._progressEvent;\n }\n\n /**\n * Combine previous send request data with new validation data to create a complete request object\n * The received model is new FormModel containing ONLY the current question, not the previously entered questions\n * to create a complete request we append the originally send form objects\n */\n private getDynamicValidationData(model: ModularUIModel) {\n const prevData =\n typeof this.options.data === \"string\"\n ? JSON.parse(this.options.data)\n : this.options.data;\n\n if (model instanceof FormModel) {\n const newData = JSON.parse(model.validationData);\n return JSON.stringify(deepmerge(prevData || {}, newData));\n }\n\n return JSON.stringify(prevData) ?? \"{}\";\n }\n\n /**\n * First load of dynamic values when a form is loaded\n */\n private async loadDynamicValidations(model: ModularUIModel) {\n if (\n !this.options.isValidationRequest &&\n getBooleanSetting(\"USE_INSTANT_SERVER_VALIDATION\") &&\n model instanceof FormModel &&\n model.currentFormObject?.hasDynamicValidations\n ) {\n const validationHref = this.href.setParameter(\"commit\", \"false\");\n const data = await universalFetch({\n ...this.requestOptions,\n url: `${this.origin}${this.contextPath}${this.href.path}`,\n params: validationHref.getQuerystringForModularUI(),\n data: this.getDynamicValidationData(model),\n });\n\n if (data == null || typeof data !== \"object\") {\n return model;\n }\n\n const formResponse = data as Record<string, FormData>;\n const [key] = Object.keys(formResponse);\n return model.updateValidations(formResponse[key]);\n }\n\n return model;\n }\n\n private fetchFromCache() {\n this.options = {\n ...this.options,\n cache: true,\n };\n\n return this.fetch();\n }\n\n private fetchChildModels(model: ModularUIModel) {\n const childModelLinks = (\n model as ModularUIModelWithChildModels\n ).getInitialChildModelLinks();\n\n const childModelRequests: Promise<ModularUIModel>[] = childModelLinks.map(\n (childModelLink) => {\n const request = new ModularUIRequest(childModelLink.href, {\n locale: this.locale,\n });\n\n if (childModelLink.targetModel) {\n request.targetModel = childModelLink.targetModel;\n }\n\n if (childModelLink.isCacheable) {\n return request.fetchFromCache();\n }\n\n return request.fetch();\n },\n );\n\n return Promise.allSettled(childModelRequests).then((childModels) => {\n const resolvedChildModels: ModularUIModelWithChildModels[] = [];\n const errorChildModels: ErrorResponse[] = [];\n\n childModels.forEach((childModel) => {\n if (childModel.status === \"rejected\") {\n const { reason } = childModel;\n if (reason.name !== \"Error.ChangePasswordRequired\") {\n console.debug(\n \"Unexpected error when retrieving child model:\",\n reason,\n );\n }\n errorChildModels.push(\n new ErrorResponse(reason, \"\", {\n origin: this.origin,\n contextPath: this.contextPath,\n }),\n );\n } else {\n resolvedChildModels.push(\n childModel.value as ModularUIModelWithChildModels,\n );\n }\n });\n\n if (model instanceof ResourceModel) {\n model.addChildModels(resolvedChildModels, errorChildModels);\n }\n\n return model;\n });\n }\n\n async fetchContent(withChildSections: boolean) {\n const model = await this.fetchFromCache();\n if (\n withChildSections &&\n model instanceof ContentModel &&\n model.childSectionLinks.length > 0\n ) {\n return this.fetchContentChildSections(model);\n }\n return model;\n }\n\n /**\n * Recursively return child sections defined on the content model\n */\n async fetchContentChildSections(\n contentModel: ContentModel,\n ): Promise<ContentModel> {\n const newContentModel = klona(contentModel);\n\n const sectionModels = await Promise.all(\n contentModel.childSectionLinks.map((childSectionLink) => {\n const contentHrefWithEntryDate = childSectionLink.selfhref.addParameter(\n TIMEVERSION_FILTER_NAME,\n contentModel.entryDate,\n );\n\n const request = new ModularUIRequest(contentHrefWithEntryDate, {\n locale: this.locale,\n });\n\n return request.fetchContent(true);\n }),\n );\n newContentModel.childSections = sectionModels.filter(\n (sectionModel) => sectionModel instanceof SectionModel,\n );\n return newContentModel;\n }\n\n async fetch() {\n const data = await this.fetchDataService();\n if (data == null) {\n throw new Error(`No data received for ${this.href.toString()}`);\n }\n\n this.processDataService(data);\n\n const contributions = await this.fetchContributionsService();\n if (contributions == null) {\n throw new Error(\n `No contributions data received for ${this.contributionsHref}`,\n );\n }\n\n this.processContributionsService(contributions);\n\n await this._layoutHintProcessor.processAsyncLayoutHints(this.response);\n\n const model = this.createModel();\n\n const validatedModel = await this.loadDynamicValidations(model);\n if (this.withChildModels) {\n return await this.fetchChildModels(validatedModel);\n }\n return validatedModel;\n }\n\n /**\n * Make a post request with optionally data to send\n * @param data\n */\n post(data: string) {\n this.method = HTTP_METHODS.POST;\n this.options = {\n ...this.options,\n data,\n };\n\n return this.fetch();\n }\n\n /**\n * Make a POST request using the form, an updated form is returned (merge of old and new form)\n * @param form\n * @returns {Promise<FormModel>}\n */\n postForm(form: FormModel) {\n this.method = HTTP_METHODS.POST;\n this.options = {\n ...this.options,\n data: form.formdata,\n };\n\n return this.fetch().then((response) => {\n if (response instanceof FormModel) {\n return form.update(response);\n }\n return form;\n });\n }\n\n /**\n * Simplified synchronous version of fetch (returns the model, not a Promise)\n * This can be used on the server to retrieve a model. It only loads the request url and it's child models\n */\n fetchSync() {\n const options = { headers: { \"Accept-Language\": this.locale } };\n\n const dataString = dataFetcher.fetch(this.href.toString(), options);\n if (dataString == null) {\n throw new Error(`No data received for ${this.href.toString()}`);\n }\n\n this.processDataService(JSON.parse(dataString));\n\n if (this.contributionsHref == null) {\n throw new Error(`No constributions received for ${this.href.toString()}`);\n }\n\n const contributionsString = dataFetcher.fetch(\n this.contributionsHref.toString(),\n options,\n );\n if (contributionsString == null) {\n throw new Error(\n `No constributions received for ${this.contributionsHref.toString()}`,\n );\n }\n this.processContributionsService(JSON.parse(contributionsString));\n\n const model: ResourceModel = this.createModel();\n\n const childModelLinks = model.getInitialChildModelLinks();\n\n const childModels = childModelLinks.map((childModelLink) => {\n return new ModularUIRequest(childModelLink.href, {\n locale: this.locale,\n }).fetchSync();\n });\n if (model instanceof ResourceModel) {\n model.addChildModels(childModels, []);\n }\n\n return model;\n }\n}\n","import { HTTP_METHODS } from \"../constants/Constants\";\nimport { ErrorModel } from \"../models/error/ErrorModel\";\nimport { ErrorResponse } from \"../models/error/ErrorResponse\";\nimport { getContextPathModularUI, getUploadPath } from \"../settings/Paths\";\nimport { getBooleanSetting } from \"../settings/Settings\";\nimport { xhr } from \"../utils/fetch/xhr\";\n\nimport type {\n FilesizeConstraintsType,\n FiletypeConstraintsType,\n} from \"../models/attributes/types\";\n\ntype ProgressHandler = (file: File, uploadInfo: object) => void;\n\ninterface UploadRequestOptions {\n origin?: string;\n contextPath?: string;\n}\n\ninterface UploadResponse {\n token: string;\n}\n\n/**\n * Upload a file to the upload file service of Be Informed\n */\nexport class UploadRequest {\n private _uploadConstraints: {\n fileTypes: FiletypeConstraintsType;\n maxFileSize: FilesizeConstraintsType;\n acceptedFiles: string[];\n };\n private _progressHandler: ProgressHandler | undefined;\n private _origin = \"\";\n private _contextPath: string = getContextPathModularUI();\n\n constructor(\n uploadConstraints: {\n fileTypes: FiletypeConstraintsType;\n maxFileSize: FilesizeConstraintsType;\n acceptedFiles: string[];\n },\n progressHandler: ProgressHandler | undefined,\n options?: UploadRequestOptions,\n ) {\n this._uploadConstraints = uploadConstraints;\n this._progressHandler = progressHandler;\n this._origin = options?.origin || \"\";\n this._contextPath = options?.contextPath || getContextPathModularUI();\n }\n\n getFileExtension(file: File) {\n return file.name.split(\".\").pop()?.toLowerCase() || \"\";\n }\n\n isNotAllowedFileType(file: File) {\n const allowedFileTypes = this._uploadConstraints.fileTypes;\n\n if (allowedFileTypes.length > 0) {\n const fileExtension = this.getFileExtension(file);\n\n return !allowedFileTypes.some((fileType) =>\n fileType.extensions.includes(fileExtension),\n );\n }\n\n return false;\n }\n\n exceedsMaxFileSize(file: File) {\n const maxFileSize = this._uploadConstraints?.maxFileSize?.fileSize ?? -1;\n return maxFileSize > -1 && file.size > maxFileSize;\n }\n\n uploadFile(file: File) {\n const maxFileSize = this._uploadConstraints?.maxFileSize?.fileSize ?? -1;\n\n if (\n getBooleanSetting(\"USE_CLIENTSIDE_VALIDATION\") &&\n this.exceedsMaxFileSize(file)\n ) {\n if (this._progressHandler) {\n this._progressHandler(file, { error: \"errorExceedsMaxFileSize\" });\n }\n\n return Promise.reject(\n new ErrorModel(\n \"Constraint.File.MaxFileSizeExceeded\",\n \"Maximum file upload size is ${max-filesize}\",\n {\n \"max-filesize\": maxFileSize,\n },\n true,\n ),\n );\n }\n\n if (\n getBooleanSetting(\"USE_CLIENTSIDE_VALIDATION\") &&\n this.isNotAllowedFileType(file)\n ) {\n if (this._progressHandler) {\n this._progressHandler(file, { error: \"errorExtensionNotAllowed\" });\n }\n\n return Promise.reject(\n new ErrorModel(\n \"Constraint.File.InvalidExtension\",\n \"Allowed extensions are: ${extensions}\",\n {\n extension: this.getFileExtension(file),\n extensions: this._uploadConstraints.fileTypes.join(\", \"),\n },\n true,\n ),\n );\n }\n\n return xhr<UploadResponse>({\n url: getUploadPath(this._contextPath, this._origin),\n method: HTTP_METHODS.POST,\n headers: {\n \"Content-Type\": file.type,\n \"x-filename\": encodeURIComponent(file.name),\n \"x-filesize\": file.size.toString(),\n },\n onProgress: (e: ProgressEvent) => {\n if (this._progressHandler && e.lengthComputable) {\n this._progressHandler(file, {\n progress: Math.ceil((e.loaded / e.total) * 100),\n });\n }\n },\n data: file,\n })\n .then((response) => {\n if (this._progressHandler) {\n this._progressHandler(file, { progress: 100, token: response.token });\n }\n return response;\n })\n .catch((e) => Promise.reject(new ErrorResponse(e)));\n }\n}\n"],"mappings":"mrBAaO,IAAMA,GAAN,KAAmB,CAChB,uBACA,oBAER,aAAc,CACZ,KAAK,uBAAyB,GAC9B,KAAK,oBAAsB,KAAK,sBAAsB,CACxD,CAEA,uBAAwB,CACtB,IAAMC,EAAOC,EAAU,EAEjBC,EACJC,EAAoBH,CAAwC,EAE9D,MAAI,CAACE,GAAYA,IAAa,cAK5BA,IAAa,cACbF,EAAK,SAAS,YAAY,eAI1BE,IAAa,eACbF,EAAK,SAAS,qBAAqB,gCAMvC,CAEA,IAAI,oBAAqB,CACvB,OAAO,KAAK,mBACd,CAEA,IAAI,mBAAmBI,EAAyC,CAC9D,KAAK,oBAAsBA,CAC7B,CAEA,IAAI,uBAAwB,CAC1B,OACE,KAAK,wBACL,KAAK,qBAAuB,aAEhC,CAEA,IAAI,sBAAsBC,EAAgC,CACxD,KAAK,uBAAyBA,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,qBAEE,OAAO,QAAQ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,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"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as u,b as E,c as A}from"./chunk-24FITWGX.js";import{c as R,d as H,f as $,g as i}from"./chunk-NOB2I3DW.js";import{a,b as c,r as T,s as p,t as _,u as S,v as l}from"./chunk-4BYHEGUN.js";var f=a((z,O)=>{"use strict";function w(t,e){return function(o){return t(e(o))}}O.exports=w});var I=a((Q,P)=>{"use strict";var D=f(),j=D(Object.getPrototypeOf,Object);P.exports=j});var b=a((Z,x)=>{"use strict";var v=R(),G=I(),U=H(),y="[object Object]",M=Function.prototype,F=Object.prototype,N=M.toString,W=F.hasOwnProperty,B=N.call(Object);function V(t){if(!U(t)||v(t)!=y)return!1;var e=G(t);if(e===null)return!0;var o=W.call(e,"constructor")&&e.constructor;return typeof o=="function"&&o instanceof o&&N.call(o)==B}x.exports=V});var C=c($(),1),m=c(b(),1);var Y="hasAllContentInData",q="isIncludeTimeOffsetInDateTimes",X={UI_PARAMETERS:[],USE_CLIENTSIDE_VALIDATION:!0,USE_INSTANT_SERVER_VALIDATION:!0,CALENDAR_WEEK_STARTS_ON:1,ALWAYS_COMMIT_FORM:!1,ALLOW_HIDE_WHEN_EMPTY_ON_TABS:!0,HIDE_WHEN_EMPTY_IGNORE_TASKS:!1,SHOW_AVATARS:!0,COMPLETE_SOURCE:!1},r=X,ot=t=>{(0,m.default)(t)&&(r=Object.assign(r,t))},s=(t,e)=>{if(!(0,C.default)(r,t)&&e===void 0)throw new Error(`Setting with name ${t} not found and no defaultValue given`);return r[t]??e},n=(t,e)=>{let o=s(t,e);if(typeof o=="string")return o;throw new i(`Expected the value of ${t} to be a string, but was ${typeof o}`)},nt=(t,e)=>{let o=s(t,e);if(typeof o=="number")return o;throw new i(`Expected the value of ${t} to be a number, but was ${typeof o}`)},L=(t,e)=>{let o=s(t,e);if(typeof o=="boolean")return o;throw new i(`Expected the value of ${t} to be a boolean, but was ${typeof o}`)},h=(t,e)=>{r[t]=e},rt=()=>r,st=()=>L("CACHE_CONTRIBUTIONS",!0),it=()=>L(Y,!0),at=()=>s(q,!1),gt=()=>{let t=s("ENABLED_LOCALES",["en"]);return Array.isArray(t)?t:["en"]},ct=()=>n(T,"PAC4J_FORM"),K=(t="FormClient")=>n(p,`/callback?client_name=${t}`),Tt=()=>n(_,"j_username"),pt=()=>n(S,"j_password"),J=()=>n(l,"/logout"),_t=K(),St=J();var d=()=>n("CONTEXT_PATH","/BeInformed"),At=t=>h("CONTEXT_PATH",t),g=()=>n("CONTEXT_PATH_MODULARUI",d()),Ot=()=>n("CONTEXT_PATH_SERVER",d()),ft=(t=g(),e="")=>`${e}${t}${u}`,Pt=(t=g(),e="")=>`${e}${t}${E}`,It=(t=g(),e="")=>`${e}${t}${A}`;export{b as a,Y as b,q as c,ot as d,s as e,n as f,nt as g,L as h,h as i,rt as j,st as k,it as l,at as m,gt as n,ct as o,K as p,Tt as q,pt as r,J as s,_t as t,St as u,d as v,At as w,g as x,Ot as y,ft as z,Pt as A,It as B};
|
|
2
|
+
//# sourceMappingURL=chunk-SFI46XCV.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_overArg.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_getPrototype.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isPlainObject.js","../src/settings/Settings.ts","../src/settings/Paths.ts"],"sourcesContent":["/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var baseGetTag = require('./_baseGetTag'),\n getPrototype = require('./_getPrototype'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nmodule.exports = isPlainObject;\n","import has from \"lodash/has\";\nimport isPlainObject from \"lodash/isPlainObject\";\n\nimport {\n INTERNAL_LOGIN_TYPE,\n LOGIN_PASSWORD_SETTING,\n LOGIN_PATH_SETTING,\n LOGIN_TYPE,\n LOGIN_USERNAME_SETTING,\n LOGOUT_PATH_SETTING,\n} from \"../constants/Constants\";\nimport { IllegalStateException } from \"../exceptions/IllegalStateException\";\n\nimport type { Setting } from \"./types\";\n\nexport const ALL_CONTENT_IN_DATA_SETTING = \"hasAllContentInData\";\nexport const INCLUDE_TIME_OFFSET = \"isIncludeTimeOffsetInDateTimes\";\n\nconst defaultSettings: Record<string, Setting> = {\n // parameters that are added for the ui state, but should not be send to the modular ui\n UI_PARAMETERS: [],\n\n // Toggle client side validation\n USE_CLIENTSIDE_VALIDATION: true,\n\n // Indicates if server validation should be used when a form field is changed\n USE_INSTANT_SERVER_VALIDATION: true,\n\n // indicates on what day the week starts (0 = Sunday)\n CALENDAR_WEEK_STARTS_ON: 1,\n\n // Always commit form, does not show result pages for instruments\n ALWAYS_COMMIT_FORM: false,\n\n // disable hide-when-empty hint for layouts running on Be Informed versions older than 21.1\n ALLOW_HIDE_WHEN_EMPTY_ON_TABS: true,\n\n HIDE_WHEN_EMPTY_IGNORE_TASKS: false,\n\n SHOW_AVATARS: true,\n\n COMPLETE_SOURCE: false,\n};\n\nlet settings = defaultSettings;\n\nexport const setSettings = (config: Record<string, Setting>) => {\n if (isPlainObject(config)) {\n settings = Object.assign(settings, config);\n }\n};\n\nexport const getSetting = (key: string, defaultValue?: Setting): Setting => {\n if (!has(settings, key) && defaultValue === undefined) {\n throw new Error(\n `Setting with name ${key} not found and no defaultValue given`,\n );\n }\n\n return settings[key] ?? defaultValue;\n};\n\nexport const getStringSetting = (\n key: string,\n defaultValue?: string,\n): string => {\n const stringSetting = getSetting(key, defaultValue);\n if (typeof stringSetting === \"string\") {\n return stringSetting;\n }\n throw new IllegalStateException(\n `Expected the value of ${key} to be a string, but was ${typeof stringSetting}`,\n );\n};\n\nexport const getNumberSetting = (\n key: string,\n defaultValue?: number,\n): number => {\n const numberSetting = getSetting(key, defaultValue);\n if (typeof numberSetting === \"number\") {\n return numberSetting;\n }\n throw new IllegalStateException(\n `Expected the value of ${key} to be a number, but was ${typeof numberSetting}`,\n );\n};\n\nexport const getBooleanSetting = (\n key: string,\n defaultValue?: boolean,\n): boolean => {\n const booleanSetting = getSetting(key, defaultValue);\n if (typeof booleanSetting === \"boolean\") {\n return booleanSetting;\n }\n throw new IllegalStateException(\n `Expected the value of ${key} to be a boolean, but was ${typeof booleanSetting}`,\n );\n};\n\nexport const setSetting = (key: string, value: Setting) => {\n settings[key] = value;\n};\n\nexport const allSettings = (): Record<string, Setting> => settings;\n\n/**\n * Indicates if contributions must be cached\n */\nexport const cacheContributions = () =>\n getBooleanSetting(\"CACHE_CONTRIBUTIONS\", true);\n\n/**\n * Indicates if content is provided through the data service\n */\nexport const hasAllContentInData = (): boolean =>\n getBooleanSetting(ALL_CONTENT_IN_DATA_SETTING, true);\n\nexport const isIncludeTimeOffsetInDateTimes = (): boolean =>\n getSetting(INCLUDE_TIME_OFFSET, false) as boolean;\n\nexport const getEnabledLocales = () => {\n const setting = getSetting(\"ENABLED_LOCALES\", [\"en\"]);\n if (Array.isArray(setting)) {\n return setting;\n }\n return [\"en\"];\n};\n\n/**\n * Login type\n */\nexport const loginType = () =>\n getStringSetting(LOGIN_TYPE, INTERNAL_LOGIN_TYPE.PAC4J_FORM);\n\nexport const loginPath = (clientName = \"FormClient\") =>\n getStringSetting(LOGIN_PATH_SETTING, `/callback?client_name=${clientName}`);\nexport const loginUsernameField = () =>\n getStringSetting(LOGIN_USERNAME_SETTING, \"j_username\");\nexport const loginPasswordField = () =>\n getStringSetting(LOGIN_PASSWORD_SETTING, \"j_password\");\nexport const logoutPath = () =>\n getStringSetting(LOGOUT_PATH_SETTING, \"/logout\");\n\nexport const LOGIN_PATH: string = loginPath();\nexport const LOGOUT_PATH: string = logoutPath();\n","import { CAPTCHA_PATH, CONTENT_PATH, UPLOAD_PATH } from \"../constants/Paths\";\n\nimport { getStringSetting } from \"./Settings\";\n\nexport const getContextPath = () =>\n getStringSetting(\"CONTEXT_PATH\", \"/BeInformed\");\n\n/**\n * Base path for modular ui requests\n */\nexport const getContextPathModularUI = () =>\n getStringSetting(\"CONTEXT_PATH_MODULARUI\", getContextPath());\n\n/**\n * Base path for server resources (cookies, js scripts, etc)\n */\nexport const getContextPathServer = () =>\n getStringSetting(\"CONTEXT_PATH_SERVER\", getContextPath());\n\n/**\n * Path to contentconfiguration service\n */\nexport const getContentPath = (\n contextPath: string = getContextPathModularUI(),\n origin = \"\",\n): string => `${origin}${contextPath}${CONTENT_PATH}`;\n\n/**\n * Path to upload service\n */\nexport const getUploadPath = (\n contextPath: string = getContextPathModularUI(),\n origin = \"\",\n): string => `${origin}${contextPath}${UPLOAD_PATH}`;\n\n/**\n * Path to captcha service\n */\nexport const getCaptchaPath = (\n contextPath: string = getContextPathModularUI(),\n origin = \"\",\n): string => `${origin}${contextPath}${CAPTCHA_PATH}`;\n"],"mappings":"gMAAA,IAAAA,EAAAC,EAAA,CAAAC,EAAAC,IAAA,cAQA,SAASC,EAAQC,EAAMC,EAAW,CAChC,OAAO,SAASC,EAAK,CACnB,OAAOF,EAAKC,EAAUC,CAAG,CAAC,CAC5B,CACF,CAEAJ,EAAO,QAAUC,ICdjB,IAAAI,EAAAC,EAAA,CAAAC,EAAAC,IAAA,kBAAIC,EAAU,IAGVC,EAAeD,EAAQ,OAAO,eAAgB,MAAM,EAExDD,EAAO,QAAUE,ICLjB,IAAAC,EAAAC,EAAA,CAAAC,EAAAC,IAAA,kBAAIC,EAAa,IACbC,EAAe,IACfC,EAAe,IAGfC,EAAY,kBAGZC,EAAY,SAAS,UACrBC,EAAc,OAAO,UAGrBC,EAAeF,EAAU,SAGzBG,EAAiBF,EAAY,eAG7BG,EAAmBF,EAAa,KAAK,MAAM,EA8B/C,SAASG,EAAcC,EAAO,CAC5B,GAAI,CAACR,EAAaQ,CAAK,GAA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,GAAGM,CAAY","names":["require_overArg","__commonJSMin","exports","module","overArg","func","transform","arg","require_getPrototype","__commonJSMin","exports","module","overArg","getPrototype","require_isPlainObject","__commonJSMin","exports","module","baseGetTag","getPrototype","isObjectLike","objectTag","funcProto","objectProto","funcToString","hasOwnProperty","objectCtorString","isPlainObject","value","proto","Ctor","import_has","import_isPlainObject","ALL_CONTENT_IN_DATA_SETTING","INCLUDE_TIME_OFFSET","defaultSettings","settings","setSettings","config","isPlainObject","getSetting","key","defaultValue","has","getStringSetting","stringSetting","IllegalStateException","getNumberSetting","numberSetting","getBooleanSetting","booleanSetting","setSetting","value","allSettings","cacheContributions","hasAllContentInData","isIncludeTimeOffsetInDateTimes","getEnabledLocales","setting","loginType","LOGIN_TYPE","loginPath","clientName","LOGIN_PATH_SETTING","loginUsernameField","LOGIN_USERNAME_SETTING","loginPasswordField","LOGIN_PASSWORD_SETTING","logoutPath","LOGOUT_PATH_SETTING","LOGIN_PATH","LOGOUT_PATH","getContextPath","getStringSetting","getContextPathModularUI","getContextPathServer","getContentPath","contextPath","origin","CONTENT_PATH","getUploadPath","UPLOAD_PATH","getCaptchaPath","CAPTCHA_PATH"]}
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_overArg.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_getPrototype.js","../../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isPlainObject.js","../src/settings/Settings.ts","../src/settings/Paths.ts"],"sourcesContent":["/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var baseGetTag = require('./_baseGetTag'),\n getPrototype = require('./_getPrototype'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nmodule.exports = isPlainObject;\n","import has from \"lodash/has\";\nimport isPlainObject from \"lodash/isPlainObject\";\n\nimport {\n INTERNAL_LOGIN_TYPE,\n LOGIN_PASSWORD_SETTING,\n LOGIN_PATH_SETTING,\n LOGIN_TYPE,\n LOGIN_USERNAME_SETTING,\n LOGOUT_PATH_SETTING,\n} from \"../constants/Constants\";\nimport { IllegalStateException } from \"../exceptions/IllegalStateException\";\n\nimport type { Setting } from \"./types\";\n\nexport const ALL_CONTENT_IN_DATA_SETTING = \"hasAllContentInData\";\nexport const INCLUDE_TIME_OFFSET = \"isIncludeTimeOffsetInDateTimes\";\n\nconst defaultSettings: Record<string, Setting> = {\n // parameters that are added for the ui state, but should not be send to the modular ui\n UI_PARAMETERS: [],\n\n // Toggle client side validation\n USE_CLIENTSIDE_VALIDATION: true,\n\n // Indicates if server validation should be used when a form field is changed\n USE_INSTANT_SERVER_VALIDATION: true,\n\n // indicates on what day the week starts (0 = Sunday)\n CALENDAR_WEEK_STARTS_ON: 1,\n\n // Always commit form, does not show result pages for instruments\n ALWAYS_COMMIT_FORM: false,\n\n // disable hide-when-empty hint for layouts running on Be Informed versions older than 21.1\n ALLOW_HIDE_WHEN_EMPTY_ON_TABS: true,\n\n HIDE_WHEN_EMPTY_IGNORE_TASKS: false,\n\n SHOW_AVATARS: true,\n\n COMPLETE_SOURCE: false,\n};\n\nlet settings = defaultSettings;\n\nexport const setSettings = (config: Record<string, Setting>) => {\n if (isPlainObject(config)) {\n settings = Object.assign(settings, config);\n }\n};\n\nexport const getSetting = (key: string, defaultValue?: Setting): Setting => {\n if (!has(settings, key) && defaultValue === undefined) {\n throw new Error(\n `Setting with name ${key} not found and no defaultValue given`,\n );\n }\n\n return settings[key] ?? defaultValue;\n};\n\nexport const getStringSetting = (\n key: string,\n defaultValue?: string,\n): string => {\n const stringSetting = getSetting(key, defaultValue);\n if (typeof stringSetting === \"string\") {\n return stringSetting;\n }\n throw new IllegalStateException(\n `Expected the value of ${key} to be a string, but was ${typeof stringSetting}`,\n );\n};\n\nexport const getNumberSetting = (\n key: string,\n defaultValue?: number,\n): number => {\n const numberSetting = getSetting(key, defaultValue);\n if (typeof numberSetting === \"number\") {\n return numberSetting;\n }\n throw new IllegalStateException(\n `Expected the value of ${key} to be a number, but was ${typeof numberSetting}`,\n );\n};\n\nexport const getBooleanSetting = (\n key: string,\n defaultValue?: boolean,\n): boolean => {\n const booleanSetting = getSetting(key, defaultValue);\n if (typeof booleanSetting === \"boolean\") {\n return booleanSetting;\n }\n throw new IllegalStateException(\n `Expected the value of ${key} to be a boolean, but was ${typeof booleanSetting}`,\n );\n};\n\nexport const setSetting = (key: string, value: Setting) => {\n settings[key] = value;\n};\n\nexport const allSettings = (): Record<string, Setting> => settings;\n\n/**\n * Indicates if contributions must be cached\n */\nexport const cacheContributions = () =>\n getBooleanSetting(\"CACHE_CONTRIBUTIONS\", true);\n\n/**\n * Indicates if content is provided through the data service\n */\nexport const hasAllContentInData = (): boolean =>\n getBooleanSetting(ALL_CONTENT_IN_DATA_SETTING, true);\n\nexport const isIncludeTimeOffsetInDateTimes = (): boolean =>\n getSetting(INCLUDE_TIME_OFFSET, false) as boolean;\n\nexport const getEnabledLocales = () => {\n const setting = getSetting(\"ENABLED_LOCALES\", [\"en\"]);\n if (Array.isArray(setting)) {\n return setting;\n }\n return [\"en\"];\n};\n\n/**\n * Login type\n */\nexport const loginType = () =>\n getStringSetting(LOGIN_TYPE, INTERNAL_LOGIN_TYPE.PAC4J_FORM);\n\nexport const loginPath = (clientName = \"FormClient\") =>\n getStringSetting(LOGIN_PATH_SETTING, `/callback?client_name=${clientName}`);\nexport const loginUsernameField = () =>\n getStringSetting(LOGIN_USERNAME_SETTING, \"j_username\");\nexport const loginPasswordField = () =>\n getStringSetting(LOGIN_PASSWORD_SETTING, \"j_password\");\nexport const logoutPath = () =>\n getStringSetting(LOGOUT_PATH_SETTING, \"/logout\");\n\nexport const LOGIN_PATH: string = loginPath();\nexport const LOGOUT_PATH: string = logoutPath();\n","import { CAPTCHA_PATH, CONTENT_PATH, UPLOAD_PATH } from \"../constants/Paths\";\n\nimport { getStringSetting, setSetting } from \"./Settings\";\n\nexport const getContextPath = () =>\n getStringSetting(\"CONTEXT_PATH\", \"/BeInformed\");\n\n/**\n * Set the context path for requests to be informed\n */\nexport const setContextPath = (contextPath: string) =>\n setSetting(\"CONTEXT_PATH\", contextPath);\n\n/**\n * Base path for modular ui requests\n */\nexport const getContextPathModularUI = () =>\n getStringSetting(\"CONTEXT_PATH_MODULARUI\", getContextPath());\n\n/**\n * Base path for server resources (cookies, js scripts, etc)\n */\nexport const getContextPathServer = () =>\n getStringSetting(\"CONTEXT_PATH_SERVER\", getContextPath());\n\n/**\n * Path to contentconfiguration service\n */\nexport const getContentPath = (\n contextPath: string = getContextPathModularUI(),\n origin = \"\",\n): string => `${origin}${contextPath}${CONTENT_PATH}`;\n\n/**\n * Path to upload service\n */\nexport const getUploadPath = (\n contextPath: string = getContextPathModularUI(),\n origin = \"\",\n): string => `${origin}${contextPath}${UPLOAD_PATH}`;\n\n/**\n * Path to captcha service\n */\nexport const getCaptchaPath = (\n contextPath: string = getContextPathModularUI(),\n origin = \"\",\n): string => `${origin}${contextPath}${CAPTCHA_PATH}`;\n"],"mappings":"gMAAA,IAAAA,EAAAC,EAAA,CAAAC,EAAAC,IAAA,cAQA,SAASC,EAAQC,EAAMC,EAAW,CAChC,OAAO,SAASC,EAAK,CACnB,OAAOF,EAAKC,EAAUC,CAAG,CAAC,CAC5B,CACF,CAEAJ,EAAO,QAAUC,ICdjB,IAAAI,EAAAC,EAAA,CAAAC,EAAAC,IAAA,kBAAIC,EAAU,IAGVC,EAAeD,EAAQ,OAAO,eAAgB,MAAM,EAExDD,EAAO,QAAUE,ICLjB,IAAAC,EAAAC,EAAA,CAAAC,EAAAC,IAAA,kBAAIC,EAAa,IACbC,EAAe,IACfC,EAAe,IAGfC,EAAY,kBAGZC,EAAY,SAAS,UACrBC,EAAc,OAAO,UAGrBC,EAAeF,EAAU,SAGzBG,EAAiBF,EAAY,eAG7BG,EAAmBF,EAAa,KAAK,MAAM,EA8B/C,SAASG,EAAcC,EAAO,CAC5B,GAAI,CAACR,EAAaQ,CAAK,GAAKV,EAAWU,CAAK,GAAKP,EAC/C,MAAO,GAET,IAAIQ,EAAQV,EAAaS,CAAK,EAC9B,GAAIC,IAAU,KACZ,MAAO,GAET,IAAIC,EAAOL,EAAe,KAAKI,EAAO,aAAa,GAAKA,EAAM,YAC9D,OAAO,OAAOC,GAAQ,YAAcA,aAAgBA,GAClDN,EAAa,KAAKM,CAAI,G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B,GAAqB,IAChCL,EAAkB,sBAAuB,EAAI,EAKlCM,GAAsB,IACjCN,EAAkBhB,EAA6B,EAAI,EAExCuB,GAAiC,IAC5ChB,EAAWN,EAAqB,EAAK,EAE1BuB,GAAoB,IAAM,CACrC,IAAMC,EAAUlB,EAAW,kBAAmB,CAAC,IAAI,CAAC,EACpD,OAAI,MAAM,QAAQkB,CAAO,EAChBA,EAEF,CAAC,IAAI,CACd,EAKaC,GAAY,IACvBf,EAAiBgB,cAA0C,EAEhDC,EAAY,CAACC,EAAa,eACrClB,EAAiBmB,EAAoB,yBAAyBD,CAAU,EAAE,EAC/DE,GAAqB,IAChCpB,EAAiBqB,EAAwB,YAAY,EAC1CC,GAAqB,IAChCtB,EAAiBuB,EAAwB,YAAY,EAC1CC,EAAa,IACxBxB,EAAiByB,EAAqB,SAAS,EAEpCC,GAAqBT,EAAU,EAC/BU,GAAsBH,EAAW,EC9IvC,IAAMI,EAAiB,IAC5BC,EAAiB,eAAgB,aAAa,EAKnCC,GAAkBC,GAC7BC,EAAW,eAAgBD,CAAW,EAK3BE,EAA0B,IACrCJ,EAAiB,yBAA0BD,EAAe,CAAC,EAKhDM,GAAuB,IAClCL,EAAiB,sBAAuBD,EAAe,CAAC,EAK7CO,GAAiB,CAC5BJ,EAAsBE,EAAwB,EAC9CG,EAAS,KACE,GAAGA,CAAM,GAAGL,CAAW,GAAGM,CAAY,GAKtCC,GAAgB,CAC3BP,EAAsBE,EAAwB,EAC9CG,EAAS,KACE,GAAGA,CAAM,GAAGL,CAAW,GAAGQ,CAAW,GAKrCC,GAAiB,CAC5BT,EAAsBE,EAAwB,EAC9CG,EAAS,KACE,GAAGA,CAAM,GAAGL,CAAW,GAAGU,CAAY","names":["require_overArg","__commonJSMin","exports","module","overArg","func","transform","arg","require_getPrototype","__commonJSMin","exports","module","overArg","getPrototype","require_isPlainObject","__commonJSMin","exports","module","baseGetTag","getPrototype","isObjectLike","objectTag","funcProto","objectProto","funcToString","hasOwnProperty","objectCtorString","isPlainObject","value","proto","Ctor","import_has","import_isPlainObject","ALL_CONTENT_IN_DATA_SETTING","INCLUDE_TIME_OFFSET","defaultSettings","settings","setSettings","config","isPlainObject","getSetting","key","defaultValue","has","getStringSetting","stringSetting","IllegalStateException","getNumberSetting","numberSetting","getBooleanSetting","booleanSetting","setSetting","value","allSettings","cacheContributions","hasAllContentInData","isIncludeTimeOffsetInDateTimes","getEnabledLocales","setting","loginType","LOGIN_TYPE","loginPath","clientName","LOGIN_PATH_SETTING","loginUsernameField","LOGIN_USERNAME_SETTING","loginPasswordField","LOGIN_PASSWORD_SETTING","logoutPath","LOGOUT_PATH_SETTING","LOGIN_PATH","LOGOUT_PATH","getContextPath","getStringSetting","setContextPath","contextPath","setSetting","getContextPathModularUI","getContextPathServer","getContentPath","origin","CONTENT_PATH","getUploadPath","UPLOAD_PATH","getCaptchaPath","CAPTCHA_PATH"]}
|
|
@@ -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
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{f as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{f as m}from"./chunk-NOB2I3DW.js";import{b as h}from"./chunk-4BYHEGUN.js";var n=h(m(),1);var f=400,i=class e extends Error{id;request;requestOptions;status;response;properties;parameters;constructor(t,r,s){let o=E(t,s);super(o.id),Object.setPrototypeOf(this,e.prototype),this.name=o.id,this.id=o.id,this.request=r,this.requestOptions=s,this.status=r&&r.status?r.status:f,this.response=t,this.properties=o.properties??{},this.parameters=o.param,"captureStackTrace"in Error&&typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,this.constructor)}},E=(e,t)=>{let r={id:"Error.CannotRequestResource",defaultMessage:`Cannot request resource ${t?.url??""} with method ${t?.method??"GET"}`,properties:{},param:void 0};if(!e)return r;if((0,n.default)(e,"error"))return{...r,...e.error};let[s]=Object.keys(e);return(0,n.default)(e[s],"errors")?{...r,...e[s].errors}:r};var u=class extends Error{constructor(t){super(t instanceof SyntaxError?t.message:t),this.name="JsonParseException"}};var a=class extends Error{id;status;constructor(t,r){super(`An unexpected network error occurred, cannot request resource ${t} with method ${r}`),this.name="NetworkException",this.id="NetworkException",this.status=0}};var d=class extends Error{id;status;isReload;constructor(t,r,s=!1){super(`Resource ${t} with method ${r} not found`),this.name="NotFoundException",this.id="NotFoundException",this.status=404,this.isReload=s}};var c=class extends Error{constructor(t,r){super(`Timeout occurred in connection to ${t} with method ${r}.`),this.name="TimeoutException"}};var p=class extends Error{id;status;response;constructor(t,r,s){super(`Cannot request resource ${t} with method ${r}`),this.name="UnauthorizedException",this.id="UnauthorizedException",this.status=401,this.response=s}};export{i as a,u as b,a as c,d,c as e,p as f};
|
|
2
|
+
//# sourceMappingURL=chunk-WHWNPOV6.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{l as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{l as i}from"./chunk-QTZ77JJN.js";import{a as x}from"./chunk-VGAPPKHA.js";import{y as f}from"./chunk-SFI46XCV.js";import{f as c}from"./chunk-24FITWGX.js";var E=t=>{let r=new i(t).absolutehref,e=new XMLHttpRequest;return e.open("HEAD",r,!1),e.setRequestHeader("Accept","application/json"),e.setRequestHeader("Content-Type","application/json"),e.setRequestHeader("X-Requested-With","XMLHttpRequest"),e.send(),e.status!==404},A=t=>{let r=new i(t).absolutehref,e=new XMLHttpRequest;e.open("HEAD",r,!1),e.setRequestHeader("Accept","application/json"),e.setRequestHeader("Content-Type","application/json"),e.setRequestHeader("X-Requested-With","XMLHttpRequest"),e.send();let s=e.responseURL??"";return e.status===400&&s.endsWith("/secureLogin")};var l=t=>{if(t instanceof i)return{path:t.path,querystring:t.querystring,hash:t.hash};let r=t,e,s;if(t.includes("#")){let n=t.split("#");r=n[0],e=n[1]}if(t.includes("?")){let n=r.split("?");r=n[0],s=n[1]}return{path:r,querystring:s,hash:e}},u=(t,r)=>{if(!Array.isArray(r))return new i(t);let e=l(t),s=e.path;if(e.querystring){let n=new URLSearchParams(e.querystring),o=Array.from(n.keys());for(let p of o)r.includes(p)||n.delete(p);s=s+"?"+n.toString()}return e.hash&&(s=s+"#"+e.hash),t instanceof i?new i(s,t.resourcetype,{origin:t.origin,contextPath:t.contextPath}):new i(s)},L=(t,r,e,s,n)=>{let o=r.toString();if(o.startsWith(`/${t}/`)||(o=`/${t}/${o}`),o=o.replace(/\/\//g,"/"),s?.search&&!o.includes("?")){let a=s.search.startsWith("?")?s.search.substring(1):s.search;o=`${o}?${a}`}let p=r instanceof i?u(new i(o,r.resourcetype,{origin:r.origin,contextPath:r.contextPath}),n):u(o,n);return e?p.setParameter("entryDate",e):p.removeParameter("entryDate"),p};var v=()=>{let t=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,r=>{let e=(t+Math.random()*16)%16|0;return t=Math.floor(t/16),(r==="x"?e:e&3|8).toString(16)})};var b=process?.env?.NODE_ENV?process.env.NODE_ENV!=="production":import.meta!==void 0&&import.meta.env?!!import.meta.env.DEV:!1;var M=(t,r=f(),e="")=>t.startsWith(e+r)?t:t.startsWith(c)?`${e}${r}${t}`:`${e}${r}${c}${t}`;import{encode as m}from"html-entities";var g=t=>m(t,{mode:"nonAsciiPrintableOnly",level:"xml"}),C=(t,r={allowedTags:["p","br","b","i","u","strike"]})=>{if(typeof t!="string")throw new x("sanitizeHTML method expects a string");let n=g(t).replace(/<(\w+)(.|[\r\n])*?>/gi,"<$1>").replace(/<br\s*>/gi,"<br />"),p=`<(?!\\/?(${Array.isArray(r.allowedTags)?r.allowedTags.join("|"):""})(>|\\s\\/))[^<]+?>`,a=new RegExp(p,"gi");return n.replace(a,"")};export{E as a,A as b,l as c,u as d,L as e,v as f,b as g,M as h,C as i};
|
|
2
|
+
//# sourceMappingURL=chunk-XWOLLK42.js.map
|
package/dist/constants/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var n=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var
|
|
1
|
+
"use strict";var n=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var O=Object.prototype.hasOwnProperty;var T=(A,e)=>{for(var t in e)n(A,t,{get:e[t],enumerable:!0})},a=(A,e,t,E)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of R(e))!O.call(A,o)&&o!==t&&n(A,o,{get:()=>e[o],enumerable:!(E=x(e,o))||E.enumerable});return A};var C=A=>a(n({},"__esModule",{value:!0}),A);var b={};T(b,{ATTRIBUTE_WIDTH:()=>c,CAPTCHA_PATH:()=>W,CHANGEAVATAR_PATH:()=>V,CHANGEPASSWORD_PATH:()=>g,CONTENT_PATH:()=>f,DATETIME_OFFSET_FORMAT:()=>G,DEFAULT_AUTHENTICATION_TYPE:()=>J,DEFAULT_FIRST_WEEK_CONTAINS_DATE:()=>L,DEFAULT_WEEK_STARTS_ON:()=>I,HTTP_METHODS:()=>s,INTERNAL_LOGIN_TYPE:()=>p,ISO_DATETIME_FORMAT:()=>i,ISO_DATE_FORMAT:()=>F,ISO_TIMESTAMP_FORMAT:()=>y,ISO_TIME_FORMAT:()=>u,IS_GRAALJS:()=>_,IS_SERVER:()=>M,KEYCODES:()=>U,LOGIN_PASSWORD_SETTING:()=>N,LOGIN_PATH_SETTING:()=>d,LOGIN_TYPE:()=>l,LOGIN_USERNAME_SETTING:()=>D,LOGOUT_PATH_SETTING:()=>H,PARAMETER_SEPARATOR:()=>P,PARAMETER_TYPES:()=>S,RESOURCE_PATH:()=>K,TIMEVERSION_FILTER_NAME:()=>m,UPLOAD_PATH:()=>h,USERPROFILE_PATH:()=>X});module.exports=C(b);var _=typeof Graal<"u",M=_,s=(t=>(t.GET="GET",t.POST="POST",t))(s||{}),S=(t=>(t.BODY="bodyParameter",t.QUERY="queryParameter",t))(S||{}),P="~",m="entryDate",F="yyyy-MM-dd",i="yyyy-MM-dd'T'HH:mm:ss",u="HH:mm:ss",y="yyyy-MM-dd'T'HH:mm:ss.SSS",G="xxx",I=1,L=1,c=(r=>(r.EXTRA_SMALL="EXTRA_SMALL",r.SMALL="SMALL",r.MEDIUM="MEDIUM",r.LARGE="LARGE",r.EXTRA_LARGE="EXTRA_LARGE",r))(c||{}),p=(o=>(o.JAAS="JAAS",o.PAC4J_FORM="PAC4J_FORM",o.PAC4J_BASIC="PAC4J_BASIC",o.PAC4J_INDIRECT="PAC4J_INDIRECT",o))(p||{}),l="security.clients",d="FormClient.login_url",D="FormClient.username_field_name",N="FormClient.password_field_name",H="FormClient.logout_url",J={name:"Form based authentication",authentication:"DefaultFormClient",isPrimary:!0},U={TAB:9,ENTER:13,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,ARROW_LEFT:37,ARROW_UP:38,ARROW_RIGHT:39,ARROW_DOWN:40};var f="/content",h="/uploadFile",W="/captchaServices",g="/change-password",X="/user",K="/resource",V="/change-avatar";0&&(module.exports={ATTRIBUTE_WIDTH,CAPTCHA_PATH,CHANGEAVATAR_PATH,CHANGEPASSWORD_PATH,CONTENT_PATH,DATETIME_OFFSET_FORMAT,DEFAULT_AUTHENTICATION_TYPE,DEFAULT_FIRST_WEEK_CONTAINS_DATE,DEFAULT_WEEK_STARTS_ON,HTTP_METHODS,INTERNAL_LOGIN_TYPE,ISO_DATETIME_FORMAT,ISO_DATE_FORMAT,ISO_TIMESTAMP_FORMAT,ISO_TIME_FORMAT,IS_GRAALJS,IS_SERVER,KEYCODES,LOGIN_PASSWORD_SETTING,LOGIN_PATH_SETTING,LOGIN_TYPE,LOGIN_USERNAME_SETTING,LOGOUT_PATH_SETTING,PARAMETER_SEPARATOR,PARAMETER_TYPES,RESOURCE_PATH,TIMEVERSION_FILTER_NAME,UPLOAD_PATH,USERPROFILE_PATH});
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/constants/index.ts","../../src/constants/Constants.ts","../../src/constants/Paths.ts"],"sourcesContent":["// Generated by createIndex.js - Do not edit manually!\n// This file is automatically updated when the script runs.\n\nexport * from \"./Constants\";\nexport * from \"./Paths\";\n","export const IS_GRAALJS = typeof Graal !== \"undefined\";\nexport const IS_SERVER = IS_GRAALJS;\n\nexport enum HTTP_METHODS {\n GET = \"GET\",\n POST = \"POST\",\n}\n\nexport enum PARAMETER_TYPES {\n BODY = \"bodyParameter\",\n QUERY = \"queryParameter\",\n}\n\n/**\n * Separator for parameters of a list, makes it possible to render multiple lists on a page in a non-js environment\n */\nexport const PARAMETER_SEPARATOR = \"~\";\n\n/**\n * Timeversion filter name\n */\nexport const TIMEVERSION_FILTER_NAME = \"entryDate\";\n\nexport const ISO_DATE_FORMAT = \"yyyy-MM-dd\";\nexport const ISO_DATETIME_FORMAT = \"yyyy-MM-dd'T'HH:mm:ss\";\nexport const ISO_TIME_FORMAT = \"HH:mm:ss\";\nexport const ISO_TIMESTAMP_FORMAT = \"yyyy-MM-dd'T'HH:mm:ss.SSS\";\n\n/**\n * Offset format is appended to iso datetime and timestamp when isIncludeTimeOffsetInDateTimes = true\n */\nexport const DATETIME_OFFSET_FORMAT = \"xxx\";\n\n/**\n * week starts on monday by default\n */\nexport const DEFAULT_WEEK_STARTS_ON = 1;\n\n/**\n * first week indicated by the 1st of january\n */\nexport const DEFAULT_FIRST_WEEK_CONTAINS_DATE = 1;\n\n/**\n * ATTRIBUTE WIDTH\n */\nexport enum ATTRIBUTE_WIDTH {\n EXTRA_SMALL = \"EXTRA_SMALL\",\n SMALL = \"SMALL\",\n MEDIUM = \"MEDIUM\",\n LARGE = \"LARGE\",\n EXTRA_LARGE = \"EXTRA_LARGE\",\n}\n\nexport enum INTERNAL_LOGIN_TYPE {\n JAAS = \"JAAS\",\n PAC4J_FORM = \"PAC4J_FORM\",\n PAC4J_BASIC = \"PAC4J_BASIC\",\n PAC4J_INDIRECT = \"PAC4J_INDIRECT\",\n}\n\nexport const LOGIN_TYPE = \"security.clients\";\nexport const LOGIN_PATH_SETTING = \"FormClient.login_url\";\nexport const LOGIN_USERNAME_SETTING = \"FormClient.username_field_name\";\nexport const LOGIN_PASSWORD_SETTING = \"FormClient.password_field_name\";\nexport const LOGOUT_PATH_SETTING = \"FormClient.logout_url\";\n\nexport const DEFAULT_AUTHENTICATION_TYPE = {\n name: \"Form based authentication\",\n authentication: \"DefaultFormClient\",\n isPrimary: true,\n};\n","/**\n * path to contentconfiguration service\n */\nexport const CONTENT_PATH = `/content`;\n\n/**\n * Upload Path\n */\nexport const UPLOAD_PATH = `/uploadFile`;\n\n/**\n * Captcha Path\n */\nexport const CAPTCHA_PATH = `/captchaServices`;\n\n/**\n * Path to change password page / component\n */\nexport const CHANGEPASSWORD_PATH = \"/change-password\";\n\n/**\n * Path to user profile page / component\n */\nexport const USERPROFILE_PATH = \"/user\";\n\n/**\n * Path to resources in the Be Informed repository\n */\nexport const RESOURCE_PATH = \"/resource\";\n"],"mappings":"yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,qBAAAE,EAAA,iBAAAC,EAAA,wBAAAC,EAAA,iBAAAC,EAAA,2BAAAC,EAAA,gCAAAC,EAAA,qCAAAC,EAAA,2BAAAC,EAAA,iBAAAC,EAAA,wBAAAC,EAAA,wBAAAC,EAAA,oBAAAC,EAAA,yBAAAC,EAAA,oBAAAC,EAAA,eAAAC,EAAA,cAAAC,EAAA,2BAAAC,EAAA,uBAAAC,EAAA,eAAAC,EAAA,2BAAAC,EAAA,wBAAAC,EAAA,wBAAAC,EAAA,oBAAAC,EAAA,kBAAAC,EAAA,4BAAAC,EAAA,gBAAAC,EAAA,qBAAAC,IAAA,eAAAC,
|
|
1
|
+
{"version":3,"sources":["../../src/constants/index.ts","../../src/constants/Constants.ts","../../src/constants/Paths.ts"],"sourcesContent":["// Generated by createIndex.js - Do not edit manually!\n// This file is automatically updated when the script runs.\n\nexport * from \"./Constants\";\nexport * from \"./Paths\";\n","export const IS_GRAALJS = typeof Graal !== \"undefined\";\nexport const IS_SERVER = IS_GRAALJS;\n\nexport enum HTTP_METHODS {\n GET = \"GET\",\n POST = \"POST\",\n}\n\nexport enum PARAMETER_TYPES {\n BODY = \"bodyParameter\",\n QUERY = \"queryParameter\",\n}\n\n/**\n * Separator for parameters of a list, makes it possible to render multiple lists on a page in a non-js environment\n */\nexport const PARAMETER_SEPARATOR = \"~\";\n\n/**\n * Timeversion filter name\n */\nexport const TIMEVERSION_FILTER_NAME = \"entryDate\";\n\nexport const ISO_DATE_FORMAT = \"yyyy-MM-dd\";\nexport const ISO_DATETIME_FORMAT = \"yyyy-MM-dd'T'HH:mm:ss\";\nexport const ISO_TIME_FORMAT = \"HH:mm:ss\";\nexport const ISO_TIMESTAMP_FORMAT = \"yyyy-MM-dd'T'HH:mm:ss.SSS\";\n\n/**\n * Offset format is appended to iso datetime and timestamp when isIncludeTimeOffsetInDateTimes = true\n */\nexport const DATETIME_OFFSET_FORMAT = \"xxx\";\n\n/**\n * week starts on monday by default\n */\nexport const DEFAULT_WEEK_STARTS_ON = 1;\n\n/**\n * first week indicated by the 1st of january\n */\nexport const DEFAULT_FIRST_WEEK_CONTAINS_DATE = 1;\n\n/**\n * ATTRIBUTE WIDTH\n */\nexport enum ATTRIBUTE_WIDTH {\n EXTRA_SMALL = \"EXTRA_SMALL\",\n SMALL = \"SMALL\",\n MEDIUM = \"MEDIUM\",\n LARGE = \"LARGE\",\n EXTRA_LARGE = \"EXTRA_LARGE\",\n}\n\nexport enum INTERNAL_LOGIN_TYPE {\n JAAS = \"JAAS\",\n PAC4J_FORM = \"PAC4J_FORM\",\n PAC4J_BASIC = \"PAC4J_BASIC\",\n PAC4J_INDIRECT = \"PAC4J_INDIRECT\",\n}\n\nexport const LOGIN_TYPE = \"security.clients\";\nexport const LOGIN_PATH_SETTING = \"FormClient.login_url\";\nexport const LOGIN_USERNAME_SETTING = \"FormClient.username_field_name\";\nexport const LOGIN_PASSWORD_SETTING = \"FormClient.password_field_name\";\nexport const LOGOUT_PATH_SETTING = \"FormClient.logout_url\";\n\nexport const DEFAULT_AUTHENTICATION_TYPE = {\n name: \"Form based authentication\",\n authentication: \"DefaultFormClient\",\n isPrimary: true,\n};\n\nexport const KEYCODES = {\n TAB: 9,\n ENTER: 13,\n ESCAPE: 27,\n SPACE: 32,\n PAGE_UP: 33,\n PAGE_DOWN: 34,\n ARROW_LEFT: 37,\n ARROW_UP: 38,\n ARROW_RIGHT: 39,\n ARROW_DOWN: 40,\n};\n","/**\n * path to contentconfiguration service\n */\nexport const CONTENT_PATH = `/content`;\n\n/**\n * Upload Path\n */\nexport const UPLOAD_PATH = `/uploadFile`;\n\n/**\n * Captcha Path\n */\nexport const CAPTCHA_PATH = `/captchaServices`;\n\n/**\n * Path to change password page / component\n */\nexport const CHANGEPASSWORD_PATH = \"/change-password\";\n\n/**\n * Path to user profile page / component\n */\nexport const USERPROFILE_PATH = \"/user\";\n\n/**\n * Path to resources in the Be Informed repository\n */\nexport const RESOURCE_PATH = \"/resource\";\n\n/**\n * Path to change avatar page / component\n */\nexport const CHANGEAVATAR_PATH = \"/change-avatar\";\n"],"mappings":"yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,qBAAAE,EAAA,iBAAAC,EAAA,sBAAAC,EAAA,wBAAAC,EAAA,iBAAAC,EAAA,2BAAAC,EAAA,gCAAAC,EAAA,qCAAAC,EAAA,2BAAAC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CHA_PATH","CHANGEAVATAR_PATH","CHANGEPASSWORD_PATH","CONTENT_PATH","DATETIME_OFFSET_FORMAT","DEFAULT_AUTHENTICATION_TYPE","DEFAULT_FIRST_WEEK_CONTAINS_DATE","DEFAULT_WEEK_STARTS_ON","HTTP_METHODS","INTERNAL_LOGIN_TYPE","ISO_DATETIME_FORMAT","ISO_DATE_FORMAT","ISO_TIMESTAMP_FORMAT","ISO_TIME_FORMAT","IS_GRAALJS","IS_SERVER","KEYCODES","LOGIN_PASSWORD_SETTING","LOGIN_PATH_SETTING","LOGIN_TYPE","LOGIN_USERNAME_SETTING","LOGOUT_PATH_SETTING","PARAMETER_SEPARATOR","PARAMETER_TYPES","RESOURCE_PATH","TIMEVERSION_FILTER_NAME","UPLOAD_PATH","USERPROFILE_PATH","__toCommonJS","IS_GRAALJS","IS_SERVER","HTTP_METHODS","PARAMETER_TYPES","PARAMETER_SEPARATOR","TIMEVERSION_FILTER_NAME","ISO_DATE_FORMAT","ISO_DATETIME_FORMAT","ISO_TIME_FORMAT","ISO_TIMESTAMP_FORMAT","DATETIME_OFFSET_FORMAT","DEFAULT_WEEK_STARTS_ON","DEFAULT_FIRST_WEEK_CONTAINS_DATE","ATTRIBUTE_WIDTH","INTERNAL_LOGIN_TYPE","LOGIN_TYPE","LOGIN_PATH_SETTING","LOGIN_USERNAME_SETTING","LOGIN_PASSWORD_SETTING","LOGOUT_PATH_SETTING","DEFAULT_AUTHENTICATION_TYPE","KEYCODES","CONTENT_PATH","UPLOAD_PATH","CAPTCHA_PATH","CHANGEPASSWORD_PATH","USERPROFILE_PATH","RESOURCE_PATH","CHANGEAVATAR_PATH"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as ATTRIBUTE_WIDTH, D as DATETIME_OFFSET_FORMAT, n as DEFAULT_AUTHENTICATION_TYPE, h as DEFAULT_FIRST_WEEK_CONTAINS_DATE, g as DEFAULT_WEEK_STARTS_ON, H as HTTP_METHODS, i as INTERNAL_LOGIN_TYPE, d as ISO_DATETIME_FORMAT, c as ISO_DATE_FORMAT, f as ISO_TIMESTAMP_FORMAT, e as ISO_TIME_FORMAT, I as IS_GRAALJS, a as IS_SERVER, l as LOGIN_PASSWORD_SETTING, j as LOGIN_PATH_SETTING, L as LOGIN_TYPE, k as LOGIN_USERNAME_SETTING, m as LOGOUT_PATH_SETTING, b as PARAMETER_SEPARATOR, P as PARAMETER_TYPES, T as TIMEVERSION_FILTER_NAME } from '../Constants-
|
|
1
|
+
export { A as ATTRIBUTE_WIDTH, D as DATETIME_OFFSET_FORMAT, n as DEFAULT_AUTHENTICATION_TYPE, h as DEFAULT_FIRST_WEEK_CONTAINS_DATE, g as DEFAULT_WEEK_STARTS_ON, H as HTTP_METHODS, i as INTERNAL_LOGIN_TYPE, d as ISO_DATETIME_FORMAT, c as ISO_DATE_FORMAT, f as ISO_TIMESTAMP_FORMAT, e as ISO_TIME_FORMAT, I as IS_GRAALJS, a as IS_SERVER, K as KEYCODES, l as LOGIN_PASSWORD_SETTING, j as LOGIN_PATH_SETTING, L as LOGIN_TYPE, k as LOGIN_USERNAME_SETTING, m as LOGOUT_PATH_SETTING, b as PARAMETER_SEPARATOR, P as PARAMETER_TYPES, T as TIMEVERSION_FILTER_NAME } from '../Constants-CYAEbTZ4.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* path to contentconfiguration service
|
|
@@ -24,5 +24,9 @@ declare const USERPROFILE_PATH = "/user";
|
|
|
24
24
|
* Path to resources in the Be Informed repository
|
|
25
25
|
*/
|
|
26
26
|
declare const RESOURCE_PATH = "/resource";
|
|
27
|
+
/**
|
|
28
|
+
* Path to change avatar page / component
|
|
29
|
+
*/
|
|
30
|
+
declare const CHANGEAVATAR_PATH = "/change-avatar";
|
|
27
31
|
|
|
28
|
-
export { CAPTCHA_PATH, CHANGEPASSWORD_PATH, CONTENT_PATH, RESOURCE_PATH, UPLOAD_PATH, USERPROFILE_PATH };
|
|
32
|
+
export { CAPTCHA_PATH, CHANGEAVATAR_PATH, CHANGEPASSWORD_PATH, CONTENT_PATH, RESOURCE_PATH, UPLOAD_PATH, USERPROFILE_PATH };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as ATTRIBUTE_WIDTH, D as DATETIME_OFFSET_FORMAT, n as DEFAULT_AUTHENTICATION_TYPE, h as DEFAULT_FIRST_WEEK_CONTAINS_DATE, g as DEFAULT_WEEK_STARTS_ON, H as HTTP_METHODS, i as INTERNAL_LOGIN_TYPE, d as ISO_DATETIME_FORMAT, c as ISO_DATE_FORMAT, f as ISO_TIMESTAMP_FORMAT, e as ISO_TIME_FORMAT, I as IS_GRAALJS, a as IS_SERVER, l as LOGIN_PASSWORD_SETTING, j as LOGIN_PATH_SETTING, L as LOGIN_TYPE, k as LOGIN_USERNAME_SETTING, m as LOGOUT_PATH_SETTING, b as PARAMETER_SEPARATOR, P as PARAMETER_TYPES, T as TIMEVERSION_FILTER_NAME } from '../Constants-
|
|
1
|
+
export { A as ATTRIBUTE_WIDTH, D as DATETIME_OFFSET_FORMAT, n as DEFAULT_AUTHENTICATION_TYPE, h as DEFAULT_FIRST_WEEK_CONTAINS_DATE, g as DEFAULT_WEEK_STARTS_ON, H as HTTP_METHODS, i as INTERNAL_LOGIN_TYPE, d as ISO_DATETIME_FORMAT, c as ISO_DATE_FORMAT, f as ISO_TIMESTAMP_FORMAT, e as ISO_TIME_FORMAT, I as IS_GRAALJS, a as IS_SERVER, K as KEYCODES, l as LOGIN_PASSWORD_SETTING, j as LOGIN_PATH_SETTING, L as LOGIN_TYPE, k as LOGIN_USERNAME_SETTING, m as LOGOUT_PATH_SETTING, b as PARAMETER_SEPARATOR, P as PARAMETER_TYPES, T as TIMEVERSION_FILTER_NAME } from '../Constants-CYAEbTZ4.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* path to contentconfiguration service
|
|
@@ -24,5 +24,9 @@ declare const USERPROFILE_PATH = "/user";
|
|
|
24
24
|
* Path to resources in the Be Informed repository
|
|
25
25
|
*/
|
|
26
26
|
declare const RESOURCE_PATH = "/resource";
|
|
27
|
+
/**
|
|
28
|
+
* Path to change avatar page / component
|
|
29
|
+
*/
|
|
30
|
+
declare const CHANGEAVATAR_PATH = "/change-avatar";
|
|
27
31
|
|
|
28
|
-
export { CAPTCHA_PATH, CHANGEPASSWORD_PATH, CONTENT_PATH, RESOURCE_PATH, UPLOAD_PATH, USERPROFILE_PATH };
|
|
32
|
+
export { CAPTCHA_PATH, CHANGEAVATAR_PATH, CHANGEPASSWORD_PATH, CONTENT_PATH, RESOURCE_PATH, UPLOAD_PATH, USERPROFILE_PATH };
|
package/dist/constants/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../chunk-ELPRKFLG.js";import{a as
|
|
1
|
+
import"../chunk-ELPRKFLG.js";import{a as w,b as x,c as y,d as z,e as A,f as B,g as C}from"../chunk-24FITWGX.js";import{c as a,d as b,e as c,f as d,g as e,h as f,i as g,j as h,k as i,l as j,m as k,n as l,o as m,p as n,q as o,r as p,s as q,t as r,u as s,v as t,w as u,x as v}from"../chunk-4BYHEGUN.js";export{n as ATTRIBUTE_WIDTH,y as CAPTCHA_PATH,C as CHANGEAVATAR_PATH,z as CHANGEPASSWORD_PATH,w as CONTENT_PATH,k as DATETIME_OFFSET_FORMAT,u as DEFAULT_AUTHENTICATION_TYPE,m as DEFAULT_FIRST_WEEK_CONTAINS_DATE,l as DEFAULT_WEEK_STARTS_ON,c as HTTP_METHODS,o as INTERNAL_LOGIN_TYPE,h as ISO_DATETIME_FORMAT,g as ISO_DATE_FORMAT,j as ISO_TIMESTAMP_FORMAT,i as ISO_TIME_FORMAT,a as IS_GRAALJS,b as IS_SERVER,v as KEYCODES,s as LOGIN_PASSWORD_SETTING,q as LOGIN_PATH_SETTING,p as LOGIN_TYPE,r as LOGIN_USERNAME_SETTING,t as LOGOUT_PATH_SETTING,e as PARAMETER_SEPARATOR,d as PARAMETER_TYPES,B as RESOURCE_PATH,f as TIMEVERSION_FILTER_NAME,x as UPLOAD_PATH,A as USERPROFILE_PATH};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var We=Object.create;var m=Object.defineProperty;var rt=Object.getOwnPropertyDescriptor;var et=Object.getOwnPropertyNames;var tt=Object.getPrototypeOf,ot=Object.prototype.hasOwnProperty;var o=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),st=(r,e)=>{for(var t in e)m(r,t,{get:e[t],enumerable:!0})},H=(r,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of et(e))!ot.call(r,n)&&n!==t&&m(r,n,{get:()=>e[n],enumerable:!(s=rt(e,n))||s.enumerable});return r};var nt=(r,e,t)=>(t=r!=null?We(tt(r)):{},H(e||!r||!r.__esModule?m(t,"default",{value:r,enumerable:!0}):t,r)),at=r=>H(m({},"__esModule",{value:!0}),r);var U=o((qn,J)=>{"use strict";var it=Object.prototype,ut=it.hasOwnProperty;function pt(r,e){return r!=null&&ut.call(r,e)}J.exports=pt});var h=o((Sn,X)=>{"use strict";var ct=Array.isArray;X.exports=ct});var k=o((bn,K)=>{"use strict";var ht=typeof global=="object"&&global&&global.Object===Object&&global;K.exports=ht});var y=o((En,V)=>{"use strict";var ft=k(),lt=typeof self=="object"&&self&&self.Object===Object&&self,dt=ft||lt||Function("return this")();V.exports=dt});var g=o((On,Z)=>{"use strict";var xt=y(),mt=xt.Symbol;Z.exports=mt});var W=o((Cn,B)=>{"use strict";var Q=g(),Y=Object.prototype,yt=Y.hasOwnProperty,gt=Y.toString,f=Q?Q.toStringTag:void 0;function _t(r){var e=yt.call(r,f),t=r[f];try{r[f]=void 0;var s=!0}catch{}var n=gt.call(r);return s&&(e?r[f]=t:delete r[f]),n}B.exports=_t});var er=o((Tn,rr)=>{"use strict";var vt=Object.prototype,qt=vt.toString;function St(r){return qt.call(r)}rr.exports=St});var _=o((An,sr)=>{"use strict";var tr=g(),bt=W(),Et=er(),Ot="[object Null]",Ct="[object Undefined]",or=tr?tr.toStringTag:void 0;function Tt(r){return r==null?r===void 0?Ct:Ot:or&&or in Object(r)?bt(r):Et(r)}sr.exports=Tt});var v=o((Mn,nr)=>{"use strict";function At(r){return r!=null&&typeof r=="object"}nr.exports=At});var q=o((In,ar)=>{"use strict";var Mt=_(),It=v(),Pt="[object Symbol]";function wt(r){return typeof r=="symbol"||It(r)&&Mt(r)==Pt}ar.exports=wt});var ur=o((Pn,ir)=>{"use strict";var jt=h(),Ft=q(),Nt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Rt=/^\w*$/;function Gt(r,e){if(jt(r))return!1;var t=typeof r;return t=="number"||t=="symbol"||t=="boolean"||r==null||Ft(r)?!0:Rt.test(r)||!Nt.test(r)||e!=null&&r in Object(e)}ir.exports=Gt});var b=o((wn,pr)=>{"use strict";function Dt(r){var e=typeof r;return r!=null&&(e=="object"||e=="function")}pr.exports=Dt});var hr=o((jn,cr)=>{"use strict";var Lt=_(),$t=b(),zt="[object AsyncFunction]",Ht="[object Function]",Jt="[object GeneratorFunction]",Ut="[object Proxy]";function Xt(r){if(!$t(r))return!1;var e=Lt(r);return e==Ht||e==Jt||e==zt||e==Ut}cr.exports=Xt});var lr=o((Fn,fr)=>{"use strict";var Kt=y(),kt=Kt["__core-js_shared__"];fr.exports=kt});var mr=o((Nn,xr)=>{"use strict";var E=lr(),dr=(function(){var r=/[^.]+$/.exec(E&&E.keys&&E.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function Vt(r){return!!dr&&dr in r}xr.exports=Vt});var gr=o((Rn,yr)=>{"use strict";var Zt=Function.prototype,Qt=Zt.toString;function Yt(r){if(r!=null){try{return Qt.call(r)}catch{}try{return r+""}catch{}}return""}yr.exports=Yt});var vr=o((Gn,_r)=>{"use strict";var Bt=hr(),Wt=mr(),ro=b(),eo=gr(),to=/[\\^$.*+?()[\]{}|]/g,oo=/^\[object .+?Constructor\]$/,so=Function.prototype,no=Object.prototype,ao=so.toString,io=no.hasOwnProperty,uo=RegExp("^"+ao.call(io).replace(to,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function po(r){if(!ro(r)||Wt(r))return!1;var e=Bt(r)?uo:oo;return e.test(eo(r))}_r.exports=po});var Sr=o((Dn,qr)=>{"use strict";function co(r,e){return r?.[e]}qr.exports=co});var O=o((Ln,br)=>{"use strict";var ho=vr(),fo=Sr();function lo(r,e){var t=fo(r,e);return ho(t)?t:void 0}br.exports=lo});var l=o(($n,Er)=>{"use strict";var xo=O(),mo=xo(Object,"create");Er.exports=mo});var Tr=o((zn,Cr)=>{"use strict";var Or=l();function yo(){this.__data__=Or?Or(null):{},this.size=0}Cr.exports=yo});var Mr=o((Hn,Ar)=>{"use strict";function go(r){var e=this.has(r)&&delete this.__data__[r];return this.size-=e?1:0,e}Ar.exports=go});var Pr=o((Jn,Ir)=>{"use strict";var _o=l(),vo="__lodash_hash_undefined__",qo=Object.prototype,So=qo.hasOwnProperty;function bo(r){var e=this.__data__;if(_o){var t=e[r];return t===vo?void 0:t}return So.call(e,r)?e[r]:void 0}Ir.exports=bo});var jr=o((Un,wr)=>{"use strict";var Eo=l(),Oo=Object.prototype,Co=Oo.hasOwnProperty;function To(r){var e=this.__data__;return Eo?e[r]!==void 0:Co.call(e,r)}wr.exports=To});var Nr=o((Xn,Fr)=>{"use strict";var Ao=l(),Mo="__lodash_hash_undefined__";function Io(r,e){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=Ao&&e===void 0?Mo:e,this}Fr.exports=Io});var Gr=o((Kn,Rr)=>{"use strict";var Po=Tr(),wo=Mr(),jo=Pr(),Fo=jr(),No=Nr();function u(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var s=r[e];this.set(s[0],s[1])}}u.prototype.clear=Po;u.prototype.delete=wo;u.prototype.get=jo;u.prototype.has=Fo;u.prototype.set=No;Rr.exports=u});var Lr=o((kn,Dr)=>{"use strict";function Ro(){this.__data__=[],this.size=0}Dr.exports=Ro});var zr=o((Vn,$r)=>{"use strict";function Go(r,e){return r===e||r!==r&&e!==e}$r.exports=Go});var d=o((Zn,Hr)=>{"use strict";var Do=zr();function Lo(r,e){for(var t=r.length;t--;)if(Do(r[t][0],e))return t;return-1}Hr.exports=Lo});var Ur=o((Qn,Jr)=>{"use strict";var $o=d(),zo=Array.prototype,Ho=zo.splice;function Jo(r){var e=this.__data__,t=$o(e,r);if(t<0)return!1;var s=e.length-1;return t==s?e.pop():Ho.call(e,t,1),--this.size,!0}Jr.exports=Jo});var Kr=o((Yn,Xr)=>{"use strict";var Uo=d();function Xo(r){var e=this.__data__,t=Uo(e,r);return t<0?void 0:e[t][1]}Xr.exports=Xo});var Vr=o((Bn,kr)=>{"use strict";var Ko=d();function ko(r){return Ko(this.__data__,r)>-1}kr.exports=ko});var Qr=o((Wn,Zr)=>{"use strict";var Vo=d();function Zo(r,e){var t=this.__data__,s=Vo(t,r);return s<0?(++this.size,t.push([r,e])):t[s][1]=e,this}Zr.exports=Zo});var Br=o((ra,Yr)=>{"use strict";var Qo=Lr(),Yo=Ur(),Bo=Kr(),Wo=Vr(),rs=Qr();function p(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var s=r[e];this.set(s[0],s[1])}}p.prototype.clear=Qo;p.prototype.delete=Yo;p.prototype.get=Bo;p.prototype.has=Wo;p.prototype.set=rs;Yr.exports=p});var re=o((ea,Wr)=>{"use strict";var es=O(),ts=y(),os=es(ts,"Map");Wr.exports=os});var oe=o((ta,te)=>{"use strict";var ee=Gr(),ss=Br(),ns=re();function as(){this.size=0,this.__data__={hash:new ee,map:new(ns||ss),string:new ee}}te.exports=as});var ne=o((oa,se)=>{"use strict";function is(r){var e=typeof r;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?r!=="__proto__":r===null}se.exports=is});var x=o((sa,ae)=>{"use strict";var us=ne();function ps(r,e){var t=r.__data__;return us(e)?t[typeof e=="string"?"string":"hash"]:t.map}ae.exports=ps});var ue=o((na,ie)=>{"use strict";var cs=x();function hs(r){var e=cs(this,r).delete(r);return this.size-=e?1:0,e}ie.exports=hs});var ce=o((aa,pe)=>{"use strict";var fs=x();function ls(r){return fs(this,r).get(r)}pe.exports=ls});var fe=o((ia,he)=>{"use strict";var ds=x();function xs(r){return ds(this,r).has(r)}he.exports=xs});var de=o((ua,le)=>{"use strict";var ms=x();function ys(r,e){var t=ms(this,r),s=t.size;return t.set(r,e),this.size+=t.size==s?0:1,this}le.exports=ys});var me=o((pa,xe)=>{"use strict";var gs=oe(),_s=ue(),vs=ce(),qs=fe(),Ss=de();function c(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var s=r[e];this.set(s[0],s[1])}}c.prototype.clear=gs;c.prototype.delete=_s;c.prototype.get=vs;c.prototype.has=qs;c.prototype.set=Ss;xe.exports=c});var _e=o((ca,ge)=>{"use strict";var ye=me(),bs="Expected a function";function C(r,e){if(typeof r!="function"||e!=null&&typeof e!="function")throw new TypeError(bs);var t=function(){var s=arguments,n=e?e.apply(this,s):s[0],a=t.cache;if(a.has(n))return a.get(n);var i=r.apply(this,s);return t.cache=a.set(n,i)||a,i};return t.cache=new(C.Cache||ye),t}C.Cache=ye;ge.exports=C});var qe=o((ha,ve)=>{"use strict";var Es=_e(),Os=500;function Cs(r){var e=Es(r,function(s){return t.size===Os&&t.clear(),s}),t=e.cache;return e}ve.exports=Cs});var be=o((fa,Se)=>{"use strict";var Ts=qe(),As=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ms=/\\(\\)?/g,Is=Ts(function(r){var e=[];return r.charCodeAt(0)===46&&e.push(""),r.replace(As,function(t,s,n,a){e.push(n?a.replace(Ms,"$1"):s||t)}),e});Se.exports=Is});var Oe=o((la,Ee)=>{"use strict";function Ps(r,e){for(var t=-1,s=r==null?0:r.length,n=Array(s);++t<s;)n[t]=e(r[t],t,r);return n}Ee.exports=Ps});var Pe=o((da,Ie)=>{"use strict";var Ce=g(),ws=Oe(),js=h(),Fs=q(),Ns=1/0,Te=Ce?Ce.prototype:void 0,Ae=Te?Te.toString:void 0;function Me(r){if(typeof r=="string")return r;if(js(r))return ws(r,Me)+"";if(Fs(r))return Ae?Ae.call(r):"";var e=r+"";return e=="0"&&1/r==-Ns?"-0":e}Ie.exports=Me});var je=o((xa,we)=>{"use strict";var Rs=Pe();function Gs(r){return r==null?"":Rs(r)}we.exports=Gs});var Ne=o((ma,Fe)=>{"use strict";var Ds=h(),Ls=ur(),$s=be(),zs=je();function Hs(r,e){return Ds(r)?r:Ls(r,e)?[r]:$s(zs(r))}Fe.exports=Hs});var Ge=o((ya,Re)=>{"use strict";var Js=_(),Us=v(),Xs="[object Arguments]";function Ks(r){return Us(r)&&Js(r)==Xs}Re.exports=Ks});var ze=o((ga,$e)=>{"use strict";var De=Ge(),ks=v(),Le=Object.prototype,Vs=Le.hasOwnProperty,Zs=Le.propertyIsEnumerable,Qs=De((function(){return arguments})())?De:function(r){return ks(r)&&Vs.call(r,"callee")&&!Zs.call(r,"callee")};$e.exports=Qs});var Je=o((_a,He)=>{"use strict";var Ys=9007199254740991,Bs=/^(?:0|[1-9]\d*)$/;function Ws(r,e){var t=typeof r;return e=e??Ys,!!e&&(t=="number"||t!="symbol"&&Bs.test(r))&&r>-1&&r%1==0&&r<e}He.exports=Ws});var Xe=o((va,Ue)=>{"use strict";var rn=9007199254740991;function en(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=rn}Ue.exports=en});var ke=o((qa,Ke)=>{"use strict";var tn=q(),on=1/0;function sn(r){if(typeof r=="string"||tn(r))return r;var e=r+"";return e=="0"&&1/r==-on?"-0":e}Ke.exports=sn});var Ze=o((Sa,Ve)=>{"use strict";var nn=Ne(),an=ze(),un=h(),pn=Je(),cn=Xe(),hn=ke();function fn(r,e,t){e=nn(e,r);for(var s=-1,n=e.length,a=!1;++s<n;){var i=hn(e[s]);if(!(a=r!=null&&t(r,i)))break;r=r[i]}return a||++s!=n?a:(n=r==null?0:r.length,!!n&&cn(n)&&pn(i,n)&&(un(r)||an(r)))}Ve.exports=fn});var Ye=o((ba,Qe)=>{"use strict";var ln=U(),dn=Ze();function xn(r,e){return r!=null&&dn(r,e,ln)}Qe.exports=xn});var gn={};st(gn,{ConfigurationException:()=>S,FetchException:()=>A,IllegalArgumentException:()=>M,IllegalReturnException:()=>I,IllegalStateException:()=>P,JsonParseException:()=>w,MissingPropertyException:()=>j,NetworkException:()=>F,NotAllowedUriException:()=>N,NotFoundException:()=>R,ServerRequestException:()=>G,ThemePropertyException:()=>D,TimeoutException:()=>L,UnauthorizedException:()=>$,UnsupportedOperationException:()=>z});module.exports=at(gn);var S=class extends Error{constructor(e){super(e),this.name="ConfigurationException"}};var T=nt(Ye(),1);var mn=400,A=class r extends Error{id;request;requestOptions;status;response;properties;parameters;constructor(e,t,s){let n=yn(e,s);super(n.id),Object.setPrototypeOf(this,r.prototype),this.name=n.id,this.id=n.id,this.request=t,this.requestOptions=s,this.status=t&&t.status?t.status:mn,this.response=e,this.properties=n.properties??{},this.parameters=n.param,"captureStackTrace"in Error&&typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,this.constructor)}},yn=(r,e)=>{let t={id:"Error.CannotRequestResource",defaultMessage:`Cannot request resource ${e?.url??""} with method ${e?.method??"GET"}`,properties:{},param:void 0};if(!r)return t;if((0,T.default)(r,"error"))return{...t,...r.error};let[s]=Object.keys(r);return(0,T.default)(r[s],"errors")?{...t,...r[s].errors}:t};var M=class extends Error{constructor(e){super(e),this.name="IllegalArgumentException"}};var I=class extends Error{constructor(e){super(e),this.name="IllegalReturnException"}};var Be=require("immer"),P=class extends Error{[Be.immerable]=!0;constructor(e){super(e),this.name="IllegalStateException"}};var w=class extends Error{constructor(e){super(e instanceof SyntaxError?e.message:e),this.name="JsonParseException"}};var j=class extends Error{constructor(e){super(e),this.name="MissingPropertyException"}};var F=class extends Error{id;status;constructor(e,t){super(`An unexpected network error occurred, cannot request resource ${e} with method ${t}`),this.name="NetworkException",this.id="NetworkException",this.status=0}};var N=class extends Error{constructor(e){super(e),this.name="NotAllowedUriException"}};var R=class extends Error{id;status;isReload;constructor(e,t,s=!1){super(`Resource ${e} with method ${t} not found`),this.name="NotFoundException",this.id="NotFoundException",this.status=404,this.isReload=s}};var G=class extends Error{constructor(e){super(e),this.name="ServerRequestException"}};var D=class extends Error{constructor(e){super(e),this.name="ThemePropertyException"}};var L=class extends Error{constructor(e,t){super(`Timeout occurred in connection to ${e} with method ${t}.`),this.name="TimeoutException"}};var $=class extends Error{id;status;response;constructor(e,t,s){super(`Cannot request resource ${e} with method ${t}`),this.name="UnauthorizedException",this.id="UnauthorizedException",this.status=401,this.response=s}};var z=class extends Error{constructor(e){super(e),this.name="UnsupportedOperationException"}};0&&(module.exports={ConfigurationException,FetchException,IllegalArgumentException,IllegalReturnException,IllegalStateException,JsonParseException,MissingPropertyException,NetworkException,NotAllowedUriException,NotFoundException,ServerRequestException,ThemePropertyException,TimeoutException,UnauthorizedException,UnsupportedOperationException});
|
|
1
|
+
"use strict";var Be=Object.create;var m=Object.defineProperty;var rt=Object.getOwnPropertyDescriptor;var et=Object.getOwnPropertyNames;var tt=Object.getPrototypeOf,ot=Object.prototype.hasOwnProperty;var o=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),st=(r,e)=>{for(var t in e)m(r,t,{get:e[t],enumerable:!0})},z=(r,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of et(e))!ot.call(r,n)&&n!==t&&m(r,n,{get:()=>e[n],enumerable:!(s=rt(e,n))||s.enumerable});return r};var nt=(r,e,t)=>(t=r!=null?Be(tt(r)):{},z(e||!r||!r.__esModule?m(t,"default",{value:r,enumerable:!0}):t,r)),at=r=>z(m({},"__esModule",{value:!0}),r);var J=o((Sn,U)=>{"use strict";var it=Object.prototype,ut=it.hasOwnProperty;function pt(r,e){return r!=null&&ut.call(r,e)}U.exports=pt});var h=o((vn,K)=>{"use strict";var ct=Array.isArray;K.exports=ct});var k=o((qn,X)=>{"use strict";var ht=typeof global=="object"&&global&&global.Object===Object&&global;X.exports=ht});var y=o((On,V)=>{"use strict";var ft=k(),lt=typeof self=="object"&&self&&self.Object===Object&&self,dt=ft||lt||Function("return this")();V.exports=dt});var g=o((bn,W)=>{"use strict";var xt=y(),mt=xt.Symbol;W.exports=mt});var B=o((An,Y)=>{"use strict";var Z=g(),Q=Object.prototype,yt=Q.hasOwnProperty,gt=Q.toString,f=Z?Z.toStringTag:void 0;function _t(r){var e=yt.call(r,f),t=r[f];try{r[f]=void 0;var s=!0}catch{}var n=gt.call(r);return s&&(e?r[f]=t:delete r[f]),n}Y.exports=_t});var er=o((Cn,rr)=>{"use strict";var Et=Object.prototype,St=Et.toString;function vt(r){return St.call(r)}rr.exports=vt});var _=o((Tn,sr)=>{"use strict";var tr=g(),qt=B(),Ot=er(),bt="[object Null]",At="[object Undefined]",or=tr?tr.toStringTag:void 0;function Ct(r){return r==null?r===void 0?At:bt:or&&or in Object(r)?qt(r):Ot(r)}sr.exports=Ct});var E=o((In,nr)=>{"use strict";function Tt(r){return r!=null&&typeof r=="object"}nr.exports=Tt});var S=o((Mn,ar)=>{"use strict";var It=_(),Mt=E(),Pt="[object Symbol]";function Rt(r){return typeof r=="symbol"||Mt(r)&&It(r)==Pt}ar.exports=Rt});var ur=o((Pn,ir)=>{"use strict";var Nt=h(),wt=S(),jt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ft=/^\w*$/;function Gt(r,e){if(Nt(r))return!1;var t=typeof r;return t=="number"||t=="symbol"||t=="boolean"||r==null||wt(r)?!0:Ft.test(r)||!jt.test(r)||e!=null&&r in Object(e)}ir.exports=Gt});var q=o((Rn,pr)=>{"use strict";function Dt(r){var e=typeof r;return r!=null&&(e=="object"||e=="function")}pr.exports=Dt});var hr=o((Nn,cr)=>{"use strict";var Lt=_(),Ht=q(),$t="[object AsyncFunction]",zt="[object Function]",Ut="[object GeneratorFunction]",Jt="[object Proxy]";function Kt(r){if(!Ht(r))return!1;var e=Lt(r);return e==zt||e==Ut||e==$t||e==Jt}cr.exports=Kt});var lr=o((wn,fr)=>{"use strict";var Xt=y(),kt=Xt["__core-js_shared__"];fr.exports=kt});var mr=o((jn,xr)=>{"use strict";var O=lr(),dr=(function(){var r=/[^.]+$/.exec(O&&O.keys&&O.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function Vt(r){return!!dr&&dr in r}xr.exports=Vt});var gr=o((Fn,yr)=>{"use strict";var Wt=Function.prototype,Zt=Wt.toString;function Qt(r){if(r!=null){try{return Zt.call(r)}catch{}try{return r+""}catch{}}return""}yr.exports=Qt});var Er=o((Gn,_r)=>{"use strict";var Yt=hr(),Bt=mr(),ro=q(),eo=gr(),to=/[\\^$.*+?()[\]{}|]/g,oo=/^\[object .+?Constructor\]$/,so=Function.prototype,no=Object.prototype,ao=so.toString,io=no.hasOwnProperty,uo=RegExp("^"+ao.call(io).replace(to,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function po(r){if(!ro(r)||Bt(r))return!1;var e=Yt(r)?uo:oo;return e.test(eo(r))}_r.exports=po});var vr=o((Dn,Sr)=>{"use strict";function co(r,e){return r?.[e]}Sr.exports=co});var b=o((Ln,qr)=>{"use strict";var ho=Er(),fo=vr();function lo(r,e){var t=fo(r,e);return ho(t)?t:void 0}qr.exports=lo});var l=o((Hn,Or)=>{"use strict";var xo=b(),mo=xo(Object,"create");Or.exports=mo});var Cr=o(($n,Ar)=>{"use strict";var br=l();function yo(){this.__data__=br?br(null):{},this.size=0}Ar.exports=yo});var Ir=o((zn,Tr)=>{"use strict";function go(r){var e=this.has(r)&&delete this.__data__[r];return this.size-=e?1:0,e}Tr.exports=go});var Pr=o((Un,Mr)=>{"use strict";var _o=l(),Eo="__lodash_hash_undefined__",So=Object.prototype,vo=So.hasOwnProperty;function qo(r){var e=this.__data__;if(_o){var t=e[r];return t===Eo?void 0:t}return vo.call(e,r)?e[r]:void 0}Mr.exports=qo});var Nr=o((Jn,Rr)=>{"use strict";var Oo=l(),bo=Object.prototype,Ao=bo.hasOwnProperty;function Co(r){var e=this.__data__;return Oo?e[r]!==void 0:Ao.call(e,r)}Rr.exports=Co});var jr=o((Kn,wr)=>{"use strict";var To=l(),Io="__lodash_hash_undefined__";function Mo(r,e){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=To&&e===void 0?Io:e,this}wr.exports=Mo});var Gr=o((Xn,Fr)=>{"use strict";var Po=Cr(),Ro=Ir(),No=Pr(),wo=Nr(),jo=jr();function u(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var s=r[e];this.set(s[0],s[1])}}u.prototype.clear=Po;u.prototype.delete=Ro;u.prototype.get=No;u.prototype.has=wo;u.prototype.set=jo;Fr.exports=u});var Lr=o((kn,Dr)=>{"use strict";function Fo(){this.__data__=[],this.size=0}Dr.exports=Fo});var $r=o((Vn,Hr)=>{"use strict";function Go(r,e){return r===e||r!==r&&e!==e}Hr.exports=Go});var d=o((Wn,zr)=>{"use strict";var Do=$r();function Lo(r,e){for(var t=r.length;t--;)if(Do(r[t][0],e))return t;return-1}zr.exports=Lo});var Jr=o((Zn,Ur)=>{"use strict";var Ho=d(),$o=Array.prototype,zo=$o.splice;function Uo(r){var e=this.__data__,t=Ho(e,r);if(t<0)return!1;var s=e.length-1;return t==s?e.pop():zo.call(e,t,1),--this.size,!0}Ur.exports=Uo});var Xr=o((Qn,Kr)=>{"use strict";var Jo=d();function Ko(r){var e=this.__data__,t=Jo(e,r);return t<0?void 0:e[t][1]}Kr.exports=Ko});var Vr=o((Yn,kr)=>{"use strict";var Xo=d();function ko(r){return Xo(this.__data__,r)>-1}kr.exports=ko});var Zr=o((Bn,Wr)=>{"use strict";var Vo=d();function Wo(r,e){var t=this.__data__,s=Vo(t,r);return s<0?(++this.size,t.push([r,e])):t[s][1]=e,this}Wr.exports=Wo});var Yr=o((ra,Qr)=>{"use strict";var Zo=Lr(),Qo=Jr(),Yo=Xr(),Bo=Vr(),rs=Zr();function p(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var s=r[e];this.set(s[0],s[1])}}p.prototype.clear=Zo;p.prototype.delete=Qo;p.prototype.get=Yo;p.prototype.has=Bo;p.prototype.set=rs;Qr.exports=p});var re=o((ea,Br)=>{"use strict";var es=b(),ts=y(),os=es(ts,"Map");Br.exports=os});var oe=o((ta,te)=>{"use strict";var ee=Gr(),ss=Yr(),ns=re();function as(){this.size=0,this.__data__={hash:new ee,map:new(ns||ss),string:new ee}}te.exports=as});var ne=o((oa,se)=>{"use strict";function is(r){var e=typeof r;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?r!=="__proto__":r===null}se.exports=is});var x=o((sa,ae)=>{"use strict";var us=ne();function ps(r,e){var t=r.__data__;return us(e)?t[typeof e=="string"?"string":"hash"]:t.map}ae.exports=ps});var ue=o((na,ie)=>{"use strict";var cs=x();function hs(r){var e=cs(this,r).delete(r);return this.size-=e?1:0,e}ie.exports=hs});var ce=o((aa,pe)=>{"use strict";var fs=x();function ls(r){return fs(this,r).get(r)}pe.exports=ls});var fe=o((ia,he)=>{"use strict";var ds=x();function xs(r){return ds(this,r).has(r)}he.exports=xs});var de=o((ua,le)=>{"use strict";var ms=x();function ys(r,e){var t=ms(this,r),s=t.size;return t.set(r,e),this.size+=t.size==s?0:1,this}le.exports=ys});var me=o((pa,xe)=>{"use strict";var gs=oe(),_s=ue(),Es=ce(),Ss=fe(),vs=de();function c(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var s=r[e];this.set(s[0],s[1])}}c.prototype.clear=gs;c.prototype.delete=_s;c.prototype.get=Es;c.prototype.has=Ss;c.prototype.set=vs;xe.exports=c});var _e=o((ca,ge)=>{"use strict";var ye=me(),qs="Expected a function";function A(r,e){if(typeof r!="function"||e!=null&&typeof e!="function")throw new TypeError(qs);var t=function(){var s=arguments,n=e?e.apply(this,s):s[0],a=t.cache;if(a.has(n))return a.get(n);var i=r.apply(this,s);return t.cache=a.set(n,i)||a,i};return t.cache=new(A.Cache||ye),t}A.Cache=ye;ge.exports=A});var Se=o((ha,Ee)=>{"use strict";var Os=_e(),bs=500;function As(r){var e=Os(r,function(s){return t.size===bs&&t.clear(),s}),t=e.cache;return e}Ee.exports=As});var qe=o((fa,ve)=>{"use strict";var Cs=Se(),Ts=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Is=/\\(\\)?/g,Ms=Cs(function(r){var e=[];return r.charCodeAt(0)===46&&e.push(""),r.replace(Ts,function(t,s,n,a){e.push(n?a.replace(Is,"$1"):s||t)}),e});ve.exports=Ms});var be=o((la,Oe)=>{"use strict";function Ps(r,e){for(var t=-1,s=r==null?0:r.length,n=Array(s);++t<s;)n[t]=e(r[t],t,r);return n}Oe.exports=Ps});var Pe=o((da,Me)=>{"use strict";var Ae=g(),Rs=be(),Ns=h(),ws=S(),js=1/0,Ce=Ae?Ae.prototype:void 0,Te=Ce?Ce.toString:void 0;function Ie(r){if(typeof r=="string")return r;if(Ns(r))return Rs(r,Ie)+"";if(ws(r))return Te?Te.call(r):"";var e=r+"";return e=="0"&&1/r==-js?"-0":e}Me.exports=Ie});var Ne=o((xa,Re)=>{"use strict";var Fs=Pe();function Gs(r){return r==null?"":Fs(r)}Re.exports=Gs});var je=o((ma,we)=>{"use strict";var Ds=h(),Ls=ur(),Hs=qe(),$s=Ne();function zs(r,e){return Ds(r)?r:Ls(r,e)?[r]:Hs($s(r))}we.exports=zs});var Ge=o((ya,Fe)=>{"use strict";var Us=_(),Js=E(),Ks="[object Arguments]";function Xs(r){return Js(r)&&Us(r)==Ks}Fe.exports=Xs});var $e=o((ga,He)=>{"use strict";var De=Ge(),ks=E(),Le=Object.prototype,Vs=Le.hasOwnProperty,Ws=Le.propertyIsEnumerable,Zs=De((function(){return arguments})())?De:function(r){return ks(r)&&Vs.call(r,"callee")&&!Ws.call(r,"callee")};He.exports=Zs});var Ue=o((_a,ze)=>{"use strict";var Qs=9007199254740991,Ys=/^(?:0|[1-9]\d*)$/;function Bs(r,e){var t=typeof r;return e=e??Qs,!!e&&(t=="number"||t!="symbol"&&Ys.test(r))&&r>-1&&r%1==0&&r<e}ze.exports=Bs});var Ke=o((Ea,Je)=>{"use strict";var rn=9007199254740991;function en(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=rn}Je.exports=en});var ke=o((Sa,Xe)=>{"use strict";var tn=S(),on=1/0;function sn(r){if(typeof r=="string"||tn(r))return r;var e=r+"";return e=="0"&&1/r==-on?"-0":e}Xe.exports=sn});var We=o((va,Ve)=>{"use strict";var nn=je(),an=$e(),un=h(),pn=Ue(),cn=Ke(),hn=ke();function fn(r,e,t){e=nn(e,r);for(var s=-1,n=e.length,a=!1;++s<n;){var i=hn(e[s]);if(!(a=r!=null&&t(r,i)))break;r=r[i]}return a||++s!=n?a:(n=r==null?0:r.length,!!n&&cn(n)&&pn(i,n)&&(un(r)||an(r)))}Ve.exports=fn});var Qe=o((qa,Ze)=>{"use strict";var ln=J(),dn=We();function xn(r,e){return r!=null&&dn(r,e,ln)}Ze.exports=xn});var gn={};st(gn,{ConfigurationException:()=>v,FetchException:()=>T,IllegalArgumentException:()=>I,IllegalReturnException:()=>M,IllegalStateException:()=>P,JsonParseException:()=>R,MissingPropertyException:()=>N,NetworkException:()=>w,NotAllowedUriException:()=>j,NotFoundException:()=>F,ServerRequestException:()=>G,ThemePropertyException:()=>D,TimeoutException:()=>L,UnauthorizedException:()=>H,UnsupportedOperationException:()=>$});module.exports=at(gn);var v=class extends Error{constructor(e){super(e),this.name="ConfigurationException"}};var C=nt(Qe(),1);var mn=400,T=class r extends Error{id;request;requestOptions;status;response;properties;parameters;constructor(e,t,s){let n=yn(e,s);super(n.id),Object.setPrototypeOf(this,r.prototype),this.name=n.id,this.id=n.id,this.request=t,this.requestOptions=s,this.status=t&&t.status?t.status:mn,this.response=e,this.properties=n.properties??{},this.parameters=n.param,"captureStackTrace"in Error&&typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,this.constructor)}},yn=(r,e)=>{let t={id:"Error.CannotRequestResource",defaultMessage:`Cannot request resource ${e?.url??""} with method ${e?.method??"GET"}`,properties:{},param:void 0};if(!r)return t;if((0,C.default)(r,"error"))return{...t,...r.error};let[s]=Object.keys(r);return(0,C.default)(r[s],"errors")?{...t,...r[s].errors}:t};var I=class extends Error{constructor(e){super(e),this.name="IllegalArgumentException"}};var M=class extends Error{constructor(e){super(e),this.name="IllegalReturnException"}};var Ye=require("immer"),P=class extends Error{[Ye.immerable]=!0;constructor(e){super(e),this.name="IllegalStateException"}};var R=class extends Error{constructor(e){super(e instanceof SyntaxError?e.message:e),this.name="JsonParseException"}};var N=class extends Error{constructor(e){super(e),this.name="MissingPropertyException"}};var w=class extends Error{id;status;constructor(e,t){super(`An unexpected network error occurred, cannot request resource ${e} with method ${t}`),this.name="NetworkException",this.id="NetworkException",this.status=0}};var j=class extends Error{constructor(e){super(e),this.name="NotAllowedUriException"}};var F=class extends Error{id;status;isReload;constructor(e,t,s=!1){super(`Resource ${e} with method ${t} not found`),this.name="NotFoundException",this.id="NotFoundException",this.status=404,this.isReload=s}};var G=class extends Error{constructor(e){super(e),this.name="ServerRequestException"}};var D=class extends Error{constructor(e){super(e),this.name="ThemePropertyException"}};var L=class extends Error{constructor(e,t){super(`Timeout occurred in connection to ${e} with method ${t}.`),this.name="TimeoutException"}};var H=class extends Error{id;status;response;constructor(e,t,s){super(`Cannot request resource ${e} with method ${t}`),this.name="UnauthorizedException",this.id="UnauthorizedException",this.status=401,this.response=s}};var $=class extends Error{constructor(e){super(e),this.name="UnsupportedOperationException"}};0&&(module.exports={ConfigurationException,FetchException,IllegalArgumentException,IllegalReturnException,IllegalStateException,JsonParseException,MissingPropertyException,NetworkException,NotAllowedUriException,NotFoundException,ServerRequestException,ThemePropertyException,TimeoutException,UnauthorizedException,UnsupportedOperationException});
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { M as ModularUIErrorJSON } from '../index-
|
|
2
|
-
export { F as FetchException } from '../index-
|
|
1
|
+
import { M as ModularUIErrorJSON } from '../index-CvHISgQi.cjs';
|
|
2
|
+
export { F as FetchException } from '../index-CvHISgQi.cjs';
|
|
3
3
|
import { immerable } from 'immer';
|
|
4
|
-
import '../Constants-
|
|
4
|
+
import '../Constants-CYAEbTZ4.cjs';
|
|
5
5
|
import '@date-fns/tz/date';
|
|
6
6
|
import 'date-fns';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { M as ModularUIErrorJSON } from '../index-
|
|
2
|
-
export { F as FetchException } from '../index-
|
|
1
|
+
import { M as ModularUIErrorJSON } from '../index-SO4eiir8.js';
|
|
2
|
+
export { F as FetchException } from '../index-SO4eiir8.js';
|
|
3
3
|
import { immerable } from 'immer';
|
|
4
|
-
import '../Constants-
|
|
4
|
+
import '../Constants-CYAEbTZ4.js';
|
|
5
5
|
import '@date-fns/tz/date';
|
|
6
6
|
import 'date-fns';
|
|
7
7
|
|
package/dist/exceptions/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as g,b as k,c as l,d as o}from"../chunk-L7K7QDC2.js";import{a as b,b as f,c as h,d as j,e as m,f as n}from"../chunk-
|
|
1
|
+
import{a as g,b as k,c as l,d as o}from"../chunk-L7K7QDC2.js";import{a as b,b as f,c as h,d as j,e as m,f as n}from"../chunk-WHWNPOV6.js";import{a,b as d,c as i}from"../chunk-73XVCQCW.js";import{a as c}from"../chunk-VGAPPKHA.js";import{g as e}from"../chunk-NOB2I3DW.js";import"../chunk-4BYHEGUN.js";export{a as ConfigurationException,b as FetchException,c as IllegalArgumentException,d as IllegalReturnException,e as IllegalStateException,f as JsonParseException,g as MissingPropertyException,h as NetworkException,i as NotAllowedUriException,j as NotFoundException,k as ServerRequestException,l as ThemePropertyException,m as TimeoutException,n as UnauthorizedException,o as UnsupportedOperationException};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as PARAMETER_TYPES, H as HTTP_METHODS, A as ATTRIBUTE_WIDTH } from './Constants-
|
|
1
|
+
import { P as PARAMETER_TYPES, H as HTTP_METHODS, A as ATTRIBUTE_WIDTH } from './Constants-CYAEbTZ4.cjs';
|
|
2
2
|
import { immerable } from 'immer';
|
|
3
3
|
import * as _date_fns_tz_date from '@date-fns/tz/date';
|
|
4
4
|
import * as date_fns from 'date-fns';
|
|
@@ -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
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as PARAMETER_TYPES, H as HTTP_METHODS, A as ATTRIBUTE_WIDTH } from './Constants-
|
|
1
|
+
import { P as PARAMETER_TYPES, H as HTTP_METHODS, A as ATTRIBUTE_WIDTH } from './Constants-CYAEbTZ4.js';
|
|
2
2
|
import { immerable } from 'immer';
|
|
3
3
|
import * as _date_fns_tz_date from '@date-fns/tz/date';
|
|
4
4
|
import * as date_fns from 'date-fns';
|
|
@@ -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
|
}
|