@beinformed/ui 2.0.0-beta.0 → 2.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/{Constants-BIbEko1E.d.cts → Constants-CYAEbTZ4.d.cts} +19 -2
- package/dist/{Constants-BIbEko1E.d.ts → Constants-CYAEbTZ4.d.ts} +19 -2
- package/dist/{FormModel-40md7nLX.d.ts → FormModel-Cmzm2g7k.d.ts} +8 -14
- package/dist/{FormModel-CemlQ_MU.d.cts → FormModel-Qa655sE-.d.cts} +8 -14
- 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-4BYHEGUN.js.map +1 -0
- package/dist/chunk-GDEYM54A.js +2 -0
- package/dist/chunk-GDEYM54A.js.map +1 -0
- package/dist/chunk-GHQP5QNP.js +33 -0
- package/dist/chunk-GHQP5QNP.js.map +1 -0
- package/dist/chunk-NOB2I3DW.js +2 -0
- package/dist/{chunk-LHZG2ET5.js.map → chunk-NOB2I3DW.js.map} +1 -1
- package/dist/chunk-QIGFPQFN.js +1 -0
- package/dist/chunk-QTZ77JJN.js +2 -0
- package/dist/chunk-QTZ77JJN.js.map +1 -0
- package/dist/chunk-RI2O4J7J.js +2 -0
- package/dist/chunk-RI2O4J7J.js.map +1 -0
- package/dist/chunk-SFI46XCV.js +2 -0
- package/dist/{chunk-LYBG43T6.js.map → chunk-SFI46XCV.js.map} +1 -1
- package/dist/chunk-VLKSMXSB.js +2 -0
- package/dist/chunk-VLKSMXSB.js.map +1 -0
- package/dist/chunk-WHWNPOV6.js +2 -0
- package/dist/chunk-WHWNPOV6.js.map +1 -0
- package/dist/chunk-XWOLLK42.js +2 -0
- package/dist/chunk-XWOLLK42.js.map +1 -0
- package/dist/{chunk-MQBYZKME.js → chunk-Y3XZHSPE.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.cjs.map +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-CgXDAyxM.d.ts → index-BxJE8Lob.d.ts} +202 -115
- package/dist/{index-Ku2WDvSe.d.cts → index-RuAoNZgc.d.cts} +202 -115
- package/dist/index.cjs +8 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +1 -1
- package/dist/layouthints/index.cjs +8 -8
- package/dist/layouthints/index.cjs.map +1 -1
- package/dist/layouthints/index.d.cts +2 -2
- package/dist/layouthints/index.d.ts +2 -2
- package/dist/layouthints/index.js +1 -1
- package/dist/models/index.cjs +10 -10
- package/dist/models/index.cjs.map +1 -1
- package/dist/models/index.d.cts +53 -76
- package/dist/models/index.d.ts +53 -76
- package/dist/models/index.js +1 -1
- package/dist/modularui/index.cjs +10 -10
- package/dist/modularui/index.cjs.map +1 -1
- package/dist/modularui/index.d.cts +77 -11
- package/dist/modularui/index.d.ts +77 -11
- 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 +6 -4
- package/dist/settings/index.d.ts +6 -4
- 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 +13 -13
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.cts +7 -5
- package/dist/utils/index.d.ts +7 -5
- package/dist/utils/index.js +1 -1
- package/package.json +8 -8
- package/dist/chunk-52QS5IDA.js +0 -1
- package/dist/chunk-77CGPEAQ.js +0 -2
- package/dist/chunk-77CGPEAQ.js.map +0 -1
- package/dist/chunk-BE2T4IDL.js +0 -2
- package/dist/chunk-BE2T4IDL.js.map +0 -1
- package/dist/chunk-BODVDNNA.js +0 -2
- package/dist/chunk-BODVDNNA.js.map +0 -1
- package/dist/chunk-CKI2GSM7.js +0 -2
- package/dist/chunk-CKI2GSM7.js.map +0 -1
- package/dist/chunk-EP2OYSVS.js +0 -2
- package/dist/chunk-EP2OYSVS.js.map +0 -1
- package/dist/chunk-FGEQKEJQ.js +0 -2
- package/dist/chunk-FGEQKEJQ.js.map +0 -1
- package/dist/chunk-LHZG2ET5.js +0 -2
- package/dist/chunk-LYBG43T6.js +0 -2
- package/dist/chunk-SGXACUOV.js +0 -2
- package/dist/chunk-SGXACUOV.js.map +0 -1
- package/dist/chunk-WVQSFYWD.js +0 -2
- package/dist/chunk-YUOGIFZH.js +0 -33
- package/dist/chunk-YUOGIFZH.js.map +0 -1
- /package/dist/{chunk-52QS5IDA.js.map → chunk-QIGFPQFN.js.map} +0 -0
- /package/dist/{chunk-MQBYZKME.js.map → chunk-Y3XZHSPE.js.map} +0 -0
|
@@ -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.21/node_modules/lodash/_overArg.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getPrototype.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isPlainObject.js","../src/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, only available when pac4j is configured\n *\n * Preview does not support pac4j, thus is probably not configured when started, which results in login type JAAS\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\";\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,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AiB,yBAA0BD,EAAe,CAAC,EAKhDG,GAAuB,IAClCF,EAAiB,sBAAuBD,EAAe,CAAC,EAK7CI,GAAiB,CAC5BC,EAAsBH,EAAwB,EAC9CI,EAAS,KACE,GAAGA,CAAM,GAAGD,CAAW,GAAGE,CAAY,GAKtCC,GAAgB,CAC3BH,EAAsBH,EAAwB,EAC9CI,EAAS,KACE,GAAGA,CAAM,GAAGD,CAAW,GAAGI,CAAW,GAKrCC,GAAiB,CAC5BL,EAAsBH,EAAwB,EAC9CI,EAAS,KACE,GAAGA,CAAM,GAAGD,CAAW,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,E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,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"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as h,b as x,c as u,d as O,e as g,f as y}from"./chunk-WHWNPOV6.js";import{a as T,b as o}from"./chunk-GHQP5QNP.js";import{a}from"./chunk-VGAPPKHA.js";import{e as w,g as H,k as c,v}from"./chunk-SFI46XCV.js";import{b as R,c as E}from"./chunk-4BYHEGUN.js";var C=e=>{let t=e.url.includes("http")?e.url:e.url.replace(v(),""),s=e.params?e.params.replace("includeContext=true",""):"",n=s===""?t:`${t}?${s}`,r=dataFetcher.fetch(n,e);try{let i=JSON.parse(r);return i.error?Promise.reject(new h(i,void 0,e)):Promise.resolve(i)}catch(i){return Promise.reject(i)}};var p=R(T(),1);var L=0,q=200,S=400,P=401,b=300,F=404,m="application/json",l=class{_options;_attempts=0;_xmlhttp=new XMLHttpRequest;constructor(t){this._options=t}get xmlhttp(){return this._xmlhttp}set xmlhttp(t){this._xmlhttp=t}get options(){return this._options}set options(t){this._options=t}get attempts(){return this._attempts}set attempts(t){this._attempts=t}get url(){let{url:t}=this.options;if(this.params!==""){if(t.includes("?")){let s=t.split("?");return`${s[0]}?${s[1]}&${this.params}`}return`${t}?${this.params}`}return t}get params(){return this.options.params||""}get data(){return this.options.data||null}get method(){return this.options.method||"GET"}get timeout(){return this.options.timeout||H("XHR_TIMEOUT_MS",3e5)}get responseType(){return this.options.responseType||"json"}get events(){return this.options.events||{}}getBaseLocale(){return typeof navigator<"u"&&navigator.language&&navigator.language.split("-")[0]||"en"}get headers(){let t={Accept:m,"Content-Type":m,"X-Requested-With":"XMLHttpRequest","Accept-Language":this.getBaseLocale()};return this.options.headers?{...t,...this.options.headers}:t}timeoutHandler(t){return t(new g(this.url,this.method))}errorHandler(t,s){let{status:n}=this.xmlhttp,{isReload:r}=this.options;return t(n===L?new u(this.url,this.method):n===F?new O(this.url,this.method,r):n===P?new y(this.url,this.method,s):new h(s,this.xmlhttp,this.options))}getResponse(){let{responseType:t,response:s}=this.xmlhttp;if((t===""||t==="text")&&this.getResponseHeader("Content-Type")===m){if((0,p.isPlainObject)(s))return s;try{return JSON.parse(s)}catch(n){throw new x(n)}}return s}responseHandler(t,s){let{status:n}=this.xmlhttp;try{let r=this.getResponse();return n>=q&&n<b||n===S&&(0,p.has)(r,"formresponse")?t(r):this.errorHandler(s,r)}catch(r){return s(r)}}setEventListeners(t,s){let n=this.options.onProgress;n&&["load","loadend","loadstart","progress"].forEach(r=>{this.xmlhttp.addEventListener(r,i=>n(i))}),["abort","error"].forEach(r=>{this.xmlhttp.addEventListener(r,()=>this.errorHandler(s))}),this.xmlhttp.addEventListener("timeout",()=>this.timeoutHandler(s)),this.xmlhttp.addEventListener("load",()=>this.responseHandler(t,s)),Object.keys(this.events).forEach(r=>{this.xmlhttp.addEventListener(r,this.events[r])})}openConnection(){this.xmlhttp.open(this.method,this.url,!0)}setBasicAuthentication(){if(o.hasItem("basic")){let t=o.getItem("basic");typeof t=="string"&&this.xmlhttp.setRequestHeader("Authorization",`Basic ${t}`)}}getResponseHeader(t){return this.xmlhttp.getResponseHeader(t)}setCustomHeaders(){let t=this.headers;Object.keys(t).forEach(s=>{this.xmlhttp.setRequestHeader(s,t[s])})}setOtherOptions(){(this.options.withCredentials||w("XHR_ALWAYS_WITH_CREDENTIALS",o.hasItem("basic")))&&(this.xmlhttp.withCredentials=!0),this.xmlhttp.responseType=this.responseType,this.xmlhttp.timeout=this.timeout}sendData(){if(this.data==null)this.xmlhttp.send();else{let t=typeof this.data=="object"?JSON.stringify(this.data):this.data;this.xmlhttp.send(t)}}handleXMLHttpRequest(){return new Promise((t,s)=>{this.setEventListeners(t,s),this.openConnection(),this.setBasicAuthentication(),this.setCustomHeaders(),this.setOtherOptions(),this.sendData()})}async fetch(){try{return await this.handleXMLHttpRequest()}catch(t){if(t instanceof u&&this.attempts<2)return this.attempts+=1,this.fetch();throw t}}},M=e=>{if(e==null)throw new a("Missing request options, expecting an object as argument for xhr");if(!(0,p.isPlainObject)(e))throw new a(`Expecting an object as argument for xhr, but received: ${e.toString()}`);if(!(0,p.has)(e,"url"))throw new a(`No url property found in arguments of xhr, received: ${JSON.stringify(e)}`);return!0},_=e=>(M(e),new l(e).fetch());var I=R(T(),1);var d="is-fetching",N=e=>{let t=3e3,s=100;return new Promise((n,r)=>{let i=()=>{if(o.getItem(e)!==d){let f=o.getItem(e);f!=null?n(f):r(new Error("Empty cached item"))}else t<=0?r(new Error("Empty cached item")):(t=t-s,setTimeout(i,s))};setTimeout(i,s)})},D=e=>{if(c()&&e.cache){let t=o.createResourceKey(e);if(o.hasItem(t)){let s=o.getItem(t);if(s!=null){if(s===d)return N(t);if((0,I.isPlainObject)(s))return Promise.resolve(s)}}o.addItem(t,d)}return _(e).then(t=>{if(c()&&e.cache&&(typeof t=="string"||typeof t=="object")){let s=o.createResourceKey(e);o.addItem(s,t)}return t})},nt=e=>(e.locale&&(e.headers={...e.headers,"Accept-Language":e.locale}),e.includeContext&&(e.url=`${e.url}?includeContext=true`),E?C(e):D(e));export{C as a,_ as b,nt as c};
|
|
2
|
+
//# sourceMappingURL=chunk-VLKSMXSB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/fetch/graalFetch.ts","../src/utils/fetch/xhr.ts","../src/utils/fetch/universalFetch.ts"],"sourcesContent":["import { FetchException } from \"../../exceptions/FetchException\";\nimport { getContextPath } from \"../../settings/Paths\";\n\nimport type { RequestOptions } from \"./types\";\n\n/**\n * Fetch data from server (expects graaljs).\n */\nexport const graalFetch = (args: RequestOptions): Promise<unknown> => {\n // remove contextPath of url, when the request is internal the context path is not needed\n const urlNoBase = args.url.includes(\"http\")\n ? args.url\n : args.url.replace(getContextPath(), \"\");\n const params = args.params\n ? args.params.replace(\"includeContext=true\", \"\")\n : \"\";\n const url = params === \"\" ? urlNoBase : `${urlNoBase}?${params}`;\n\n const data = dataFetcher.fetch(url, args);\n\n try {\n const jsonData = JSON.parse(data);\n\n if (jsonData.error) {\n return Promise.reject(new FetchException(jsonData, undefined, args));\n }\n\n return Promise.resolve(jsonData);\n } catch (error) {\n return Promise.reject(error);\n }\n};\n","import { has, isPlainObject } from \"lodash\";\n\nimport { HTTP_METHODS } from \"../../constants/Constants\";\nimport { FetchException } from \"../../exceptions/FetchException\";\nimport { IllegalArgumentException } from \"../../exceptions/IllegalArgumentException\";\nimport { JsonParseException } from \"../../exceptions/JsonParseException\";\nimport { NetworkException } from \"../../exceptions/NetworkException\";\nimport { NotFoundException } from \"../../exceptions/NotFoundException\";\nimport { TimeoutException } from \"../../exceptions/TimeoutException\";\nimport { UnauthorizedException } from \"../../exceptions/UnauthorizedException\";\nimport { getNumberSetting, getSetting } from \"../../settings/Settings\";\nimport { Cache } from \"../storage/Cache\";\n\nimport type { ModularUIErrorJSON } from \"../../exceptions/types\";\nimport type { RequestOptions } from \"./types\";\n\ntype RejectFunction = (reason?: unknown) => void;\ntype ResolveFunction<R = unknown> = (value: R | PromiseLike<R>) => void;\n\nconst NETWORK_ERROR_CODE = 0;\nconst SUCCESS_CODE = 200;\nconst CLIENT_ERROR_CODE = 400;\nconst UNAUTHORIZED_CODE = 401;\nconst REDIRECTION_CODE = 300;\nconst NOT_FOUND_CODE = 404;\n\nconst JSON_TYPE = \"application/json\";\n\nclass XHR<R = unknown> {\n private _options: RequestOptions;\n private _attempts = 0;\n\n private _xmlhttp: XMLHttpRequest = new XMLHttpRequest();\n\n constructor(options: RequestOptions) {\n this._options = options;\n }\n\n get xmlhttp() {\n return this._xmlhttp;\n }\n\n set xmlhttp(xmlhttp: XMLHttpRequest) {\n this._xmlhttp = xmlhttp;\n }\n\n get options() {\n return this._options;\n }\n\n set options(options: RequestOptions) {\n this._options = options;\n }\n\n get attempts() {\n return this._attempts;\n }\n\n set attempts(attempts: number) {\n this._attempts = attempts;\n }\n\n /**\n * Create and fix url when params or both querystring and params exist.\n */\n get url() {\n const { url } = this.options;\n if (this.params !== \"\") {\n if (url.includes(\"?\")) {\n const aUrl = url.split(\"?\");\n\n return `${aUrl[0]}?${aUrl[1]}&${this.params}`;\n }\n\n return `${url}?${this.params}`;\n }\n\n return url;\n }\n\n get params() {\n return this.options.params || \"\";\n }\n\n get data() {\n return this.options.data || null;\n }\n\n get method(): HTTP_METHODS {\n return this.options.method || HTTP_METHODS.GET;\n }\n\n get timeout() {\n return this.options.timeout || getNumberSetting(\"XHR_TIMEOUT_MS\", 300000);\n }\n\n get responseType(): XMLHttpRequestResponseType {\n return this.options.responseType || \"json\";\n }\n\n private get events(): Record<string, () => undefined> {\n return this.options.events || {};\n }\n\n private getBaseLocale() {\n if (typeof navigator !== \"undefined\" && navigator.language) {\n return navigator.language.split(\"-\")[0] || \"en\";\n }\n\n return \"en\";\n }\n\n get headers(): Record<string, string> {\n const baseHeaders = {\n Accept: JSON_TYPE,\n \"Content-Type\": JSON_TYPE,\n\n // needed for csrf, see: https://plaza.beinformed.com/amdoc/csrf-protection-in-modular-ui-services-40054554.html\n \"X-Requested-With\": \"XMLHttpRequest\",\n\n \"Accept-Language\": this.getBaseLocale(),\n };\n\n if (this.options.headers) {\n return {\n ...baseHeaders,\n ...this.options.headers,\n };\n }\n\n return baseHeaders;\n }\n\n timeoutHandler(reject: RejectFunction) {\n return reject(new TimeoutException(this.url, this.method));\n }\n\n errorHandler(reject: RejectFunction, responseJSON?: ModularUIErrorJSON) {\n const { status } = this.xmlhttp;\n const { isReload } = this.options;\n\n if (status === NETWORK_ERROR_CODE) {\n return reject(new NetworkException(this.url, this.method));\n }\n\n if (status === NOT_FOUND_CODE) {\n return reject(new NotFoundException(this.url, this.method, isReload));\n }\n\n if (status === UNAUTHORIZED_CODE) {\n return reject(\n new UnauthorizedException(this.url, this.method, responseJSON),\n );\n }\n\n return reject(new FetchException(responseJSON, this.xmlhttp, this.options));\n }\n\n getResponse(): R {\n const { responseType, response } = this.xmlhttp;\n\n if (\n (responseType === \"\" || responseType === \"text\") &&\n this.getResponseHeader(\"Content-Type\") === JSON_TYPE\n ) {\n if (isPlainObject(response)) {\n return response;\n }\n\n try {\n return JSON.parse(response);\n } catch (error) {\n throw new JsonParseException(error as SyntaxError);\n }\n }\n\n return response;\n }\n\n responseHandler(resolve: ResolveFunction<R>, reject: RejectFunction) {\n const { status } = this.xmlhttp;\n\n try {\n const response = this.getResponse();\n\n if (\n (status >= SUCCESS_CODE && status < REDIRECTION_CODE) ||\n (status === CLIENT_ERROR_CODE && has(response, \"formresponse\"))\n ) {\n return resolve(response);\n }\n\n return this.errorHandler(reject, response as ModularUIErrorJSON);\n } catch (error) {\n return reject(error);\n }\n }\n\n setEventListeners(resolve: ResolveFunction<R>, reject: RejectFunction) {\n const progressEvent = this.options.onProgress;\n if (progressEvent) {\n [\"load\", \"loadend\", \"loadstart\", \"progress\"].forEach((eventType) => {\n this.xmlhttp.addEventListener(eventType, (event) =>\n progressEvent(event as ProgressEvent<XMLHttpRequest>),\n );\n });\n }\n\n [\"abort\", \"error\"].forEach((eventType) => {\n this.xmlhttp.addEventListener(eventType, () => this.errorHandler(reject));\n });\n\n this.xmlhttp.addEventListener(\"timeout\", () => this.timeoutHandler(reject));\n\n this.xmlhttp.addEventListener(\"load\", () =>\n this.responseHandler(resolve, reject),\n );\n\n // Set custom events\n Object.keys(this.events).forEach((eventName) => {\n this.xmlhttp.addEventListener(eventName, this.events[eventName]);\n });\n }\n\n openConnection() {\n this.xmlhttp.open(this.method, this.url, true);\n }\n\n setBasicAuthentication() {\n if (Cache.hasItem(\"basic\")) {\n const basicToken = Cache.getItem(\"basic\");\n if (typeof basicToken === \"string\") {\n this.xmlhttp.setRequestHeader(\"Authorization\", `Basic ${basicToken}`);\n }\n }\n }\n\n getResponseHeader(headerName: string) {\n return this.xmlhttp.getResponseHeader(headerName);\n }\n\n setCustomHeaders() {\n const allHeaders = this.headers;\n\n Object.keys(allHeaders).forEach((headerName) => {\n this.xmlhttp.setRequestHeader(headerName, allHeaders[headerName]);\n });\n }\n\n setOtherOptions() {\n if (\n this.options.withCredentials ||\n getSetting(\"XHR_ALWAYS_WITH_CREDENTIALS\", Cache.hasItem(\"basic\"))\n ) {\n this.xmlhttp.withCredentials = true;\n }\n this.xmlhttp.responseType = this.responseType;\n this.xmlhttp.timeout = this.timeout;\n }\n\n sendData() {\n if (this.data == null) {\n this.xmlhttp.send();\n } else {\n const stringData =\n typeof this.data === \"object\" ? JSON.stringify(this.data) : this.data;\n this.xmlhttp.send(stringData);\n }\n }\n\n handleXMLHttpRequest(): Promise<R> {\n return new Promise((resolve, reject) => {\n this.setEventListeners(resolve, reject);\n\n this.openConnection();\n\n this.setBasicAuthentication();\n\n this.setCustomHeaders();\n\n this.setOtherOptions();\n\n this.sendData();\n });\n }\n\n async fetch(): Promise<R> {\n try {\n return await this.handleXMLHttpRequest();\n } catch (err) {\n if (err instanceof NetworkException && this.attempts < 2) {\n this.attempts += 1;\n return this.fetch();\n }\n\n throw err;\n }\n }\n}\n\nconst validateInputArguments = (args: RequestOptions) => {\n if (args == null) {\n throw new IllegalArgumentException(\n \"Missing request options, expecting an object as argument for xhr\",\n );\n }\n\n if (!isPlainObject(args)) {\n throw new IllegalArgumentException(\n `Expecting an object as argument for xhr, but received: ${args.toString()}`,\n );\n }\n\n if (!has(args, \"url\")) {\n throw new IllegalArgumentException(\n `No url property found in arguments of xhr, received: ${JSON.stringify(\n args,\n )}`,\n );\n }\n\n return true;\n};\n\nexport const xhr = <R = unknown>(args: RequestOptions): Promise<R> => {\n validateInputArguments(args);\n\n return new XHR<R>(args).fetch();\n};\n","import { isPlainObject } from \"lodash\";\n\nimport { IS_GRAALJS } from \"../../constants/Constants\";\nimport { cacheContributions } from \"../../settings/Settings\";\nimport { Cache } from \"../storage/Cache\";\n\nimport { graalFetch } from \"./graalFetch\";\nimport { xhr } from \"./xhr\";\n\nimport type { RequestOptions } from \"./types\";\n\ntype CachedResponse = unknown;\n\nconst IS_FETCHING = \"is-fetching\";\n\n/**\n * Checks each x ms if a cache item is set after fetching the item.\n */\nconst waitForCachedItem = (cacheKey: string) => {\n let TIMEOUT = 3000;\n const CHECK_TIMEOUT = 100;\n\n return new Promise<CachedResponse>((resolve, reject) => {\n const check = () => {\n if (Cache.getItem(cacheKey) !== IS_FETCHING) {\n const cachedItem = Cache.getItem(cacheKey);\n if (cachedItem != null) {\n resolve(cachedItem);\n } else {\n reject(new Error(\"Empty cached item\"));\n }\n } else if (TIMEOUT <= 0) {\n reject(new Error(\"Empty cached item\"));\n } else {\n TIMEOUT = TIMEOUT - CHECK_TIMEOUT;\n setTimeout(check, CHECK_TIMEOUT);\n }\n };\n\n setTimeout(check, CHECK_TIMEOUT);\n });\n};\n\nconst browserFetch = (args: RequestOptions) => {\n if (cacheContributions() && args.cache) {\n const cacheKey = Cache.createResourceKey(args);\n\n if (Cache.hasItem(cacheKey)) {\n const cacheItem = Cache.getItem(cacheKey);\n\n if (cacheItem != null) {\n if (cacheItem === IS_FETCHING) {\n return waitForCachedItem(cacheKey);\n } else if (isPlainObject(cacheItem)) {\n return Promise.resolve(cacheItem);\n }\n }\n }\n\n Cache.addItem(cacheKey, IS_FETCHING);\n }\n\n return xhr(args).then((response) => {\n if (cacheContributions() && args.cache) {\n if (typeof response === \"string\" || typeof response === \"object\") {\n const cacheKey = Cache.createResourceKey(args);\n Cache.addItem(cacheKey, response);\n }\n }\n\n return response;\n });\n};\n\n/**\n * Request data from server, uses server datafetcher or xhr in browser.\n */\nexport const universalFetch = (args: RequestOptions) => {\n // Set locale as Accept-Language header\n if (args.locale) {\n args.headers = {\n ...args.headers,\n \"Accept-Language\": args.locale,\n };\n }\n\n if (args.includeContext) {\n args.url = `${args.url}?includeContext=true`;\n }\n\n // server side no access to the browser cache apis, no cache available\n if (IS_GRAALJS) {\n return graalFetch(args);\n }\n\n return browserFetch(args);\n};\n"],"mappings":"oQAQO,IAAMA,EAAcC,GAA2C,CAEpE,IAAMC,EAAYD,EAAK,IAAI,SAAS,MAAM,EACtCA,EAAK,IACLA,EAAK,IAAI,QAAQE,EAAe,EAAG,EAAE,EACnCC,EAASH,EAAK,OAChBA,EAAK,OAAO,QAAQ,sBAAuB,EAAE,EAC7C,GACEI,EAAMD,IAAW,GAAKF,EAAY,GAAGA,CAAS,IAAIE,CAAM,GAExDE,EAAO,YAAY,MAAMD,EAAKJ,CAAI,EAExC,GAAI,CACF,IAAMM,EAAW,KAAK,MAAMD,CAAI,EAEhC,OAAIC,EAAS,MACJ,QAAQ,OAAO,IAAIC,EAAeD,EAAU,OAAWN,CAAI,CAAC,EAG9D,QAAQ,QAAQM,CAAQ,CACjC,OAASE,EAAO,CACd,OAAO,QAAQ,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params","url","data","jsonData","FetchException","error","import_lodash","NETWORK_ERROR_CODE","SUCCESS_CODE","CLIENT_ERROR_CODE","UNAUTHORIZED_CODE","REDIRECTION_CODE","NOT_FOUND_CODE","JSON_TYPE","XHR","options","xmlhttp","attempts","url","aUrl","getNumberSetting","baseHeaders","reject","TimeoutException","responseJSON","status","isReload","NetworkException","NotFoundException","UnauthorizedException","FetchException","responseType","response","error","JsonParseException","resolve","progressEvent","eventType","event","eventName","cacheInstance","basicToken","headerName","allHeaders","getSetting","stringData","err","validateInputArguments","args","IllegalArgumentException","xhr","import_lodash","IS_FETCHING","waitForCachedItem","cacheKey","TIMEOUT","CHECK_TIMEOUT","resolve","reject","check","cacheInstance","cachedItem","browserFetch","args","cacheContributions","cacheItem","xhr","response","universalFetch","IS_GRAALJS","graalFetch"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/exceptions/FetchException.ts","../src/exceptions/JsonParseException.ts","../src/exceptions/NetworkException.ts","../src/exceptions/NotFoundException.ts","../src/exceptions/TimeoutException.ts","../src/exceptions/UnauthorizedException.ts"],"sourcesContent":["import has from \"lodash/has\";\n\nimport { HTTP_METHODS } from \"../constants/Constants\";\n\nimport type { MessageParameters } from \"../types/types\";\nimport type { RequestOptions } from \"../utils/fetch/types\";\nimport type { ModularUIErrorJSON } from \"./types\";\n\nconst CLIENT_ERROR_CODE = 400;\n\nexport class FetchException extends Error {\n id: string;\n request: XMLHttpRequest | undefined;\n requestOptions: RequestOptions | undefined;\n status: number;\n response: ModularUIErrorJSON | undefined;\n properties: MessageParameters;\n parameters: MessageParameters | undefined;\n\n constructor(\n errorResponse: ModularUIErrorJSON | undefined,\n failedRequest?: XMLHttpRequest,\n requestOptions?: RequestOptions,\n ) {\n const errorInfo = getErrorInfo(errorResponse, requestOptions);\n super(errorInfo.id);\n\n Object.setPrototypeOf(this, FetchException.prototype);\n\n this.name = errorInfo.id;\n this.id = errorInfo.id;\n this.request = failedRequest;\n this.requestOptions = requestOptions;\n\n this.status =\n failedRequest && failedRequest.status\n ? failedRequest.status\n : CLIENT_ERROR_CODE;\n\n this.response = errorResponse;\n this.properties = errorInfo.properties ?? {};\n this.parameters = errorInfo.param;\n\n if (\n \"captureStackTrace\" in Error &&\n typeof Error.captureStackTrace === \"function\"\n ) {\n Error.captureStackTrace(this, this.constructor);\n }\n }\n}\n\nconst getErrorInfo = (\n errorResponse: ModularUIErrorJSON | undefined,\n requestOptions: RequestOptions | undefined,\n) => {\n const defaultErrorInfo = {\n id: \"Error.CannotRequestResource\",\n defaultMessage: `Cannot request resource ${\n requestOptions?.url ?? \"\"\n } with method ${requestOptions?.method ?? HTTP_METHODS.GET}`,\n properties: {},\n param: undefined,\n };\n\n if (!errorResponse) {\n return defaultErrorInfo;\n }\n\n if (has(errorResponse, \"error\")) {\n return {\n ...defaultErrorInfo,\n ...errorResponse.error,\n };\n }\n\n const [key] = Object.keys(errorResponse);\n if (has(errorResponse[key], \"errors\")) {\n return {\n ...defaultErrorInfo,\n ...errorResponse[key].errors,\n };\n }\n\n return defaultErrorInfo;\n};\n","export class JsonParseException extends Error {\n constructor(error: SyntaxError | string) {\n super(error instanceof SyntaxError ? error.message : error);\n\n this.name = \"JsonParseException\";\n }\n}\n","export class NetworkException extends Error {\n id: string;\n status: number;\n\n constructor(url: string, method: string) {\n super(\n `An unexpected network error occurred, cannot request resource ${url} with method ${method}`,\n );\n\n this.name = \"NetworkException\";\n this.id = \"NetworkException\";\n this.status = 0;\n }\n}\n","export class NotFoundException extends Error {\n id: string;\n status: number;\n isReload: boolean;\n\n constructor(url: string, method: string, isReload = false) {\n super(`Resource ${url} with method ${method} not found`);\n\n this.name = \"NotFoundException\";\n this.id = \"NotFoundException\";\n this.status = 404;\n this.isReload = isReload;\n }\n}\n","export class TimeoutException extends Error {\n constructor(url: string, method: string) {\n super(`Timeout occurred in connection to ${url} with method ${method}.`);\n\n this.name = \"TimeoutException\";\n }\n}\n","import type { ModularUIErrorJSON } from \"./types\";\n\nexport class UnauthorizedException extends Error {\n id: string;\n status: number;\n response: ModularUIErrorJSON | undefined;\n\n constructor(\n url: string,\n method: string,\n errorResponse: ModularUIErrorJSON | undefined,\n ) {\n super(`Cannot request resource ${url} with method ${method}`);\n\n this.name = \"UnauthorizedException\";\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AMC,EAAN,cAA+B,KAAM,CAC1C,GACA,OAEA,YAAYC,EAAaC,EAAgB,CACvC,MACE,iEAAiED,CAAG,gBAAgBC,CAAM,EAC5F,EAEA,KAAK,KAAO,mBACZ,KAAK,GAAK,mBACV,KAAK,OAAS,CAChB,CACF,ECbO,IAAMC,EAAN,cAAgC,KAAM,CAC3C,GACA,OACA,SAEA,YAAYC,EAAaC,EAAgBC,EAAW,GAAO,CACzD,MAAM,YAAYF,CAAG,gBAAgBC,CAAM,YAAY,EAEvD,KAAK,KAAO,oBACZ,KAAK,GAAK,oBACV,KAAK,OAAS,IACd,KAAK,SAAWC,CAClB,CACF,ECbO,IAAMC,EAAN,cAA+B,KAAM,CAC1C,YAAYC,EAAaC,EAAgB,CACvC,MAAM,qCAAqCD,CAAG,gBAAgBC,CAAM,GAAG,EAEvE,KAAK,KAAO,kBACd,CACF,ECJO,IAAMC,EAAN,cAAoC,KAAM,CAC/C,GACA,OACA,SAEA,YACEC,EACAC,EACAC,EACA,CACA,MAAM,2BAA2BF,CAAG,gBAAgBC,CAAM,EAAE,EAE5D,KAAK,KAAO,wBACZ,KAAK,GAAK,wBACV,KAAK,OAAS,IACd,KAAK,SAAWC,CAClB,CACF","names":["import_has","CLIENT_ERROR_CODE","FetchException","_FetchException","errorResponse","failedRequest","requestOptions","errorInfo","getErrorInfo","defaultErrorInfo","has","key","JsonParseException","error","NetworkException","url","method","NotFoundException","url","method","isReload","TimeoutException","url","method","UnauthorizedException","url","method","errorResponse"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/helpers/checkResource.ts","../src/utils/helpers/createHref.ts","../src/utils/helpers/createUUID.ts","../src/utils/helpers/env.ts","../src/utils/helpers/repositoryResource.ts","../src/utils/helpers/sanitizeHtml.ts"],"sourcesContent":["import { Href } from \"../../models/href/Href\";\n\n/**\n * Checks if a given url to a modular ui resource exists using a HEAD request to the resource (synchronous)\n * When the resource returns a 404, the resource does not exists and the method returns false\n */\nexport const resourceExists = (url: string | Href) => {\n const fullUrl = new Href(url).absolutehref;\n\n const xhr = new XMLHttpRequest();\n xhr.open(\"HEAD\", fullUrl, false);\n xhr.setRequestHeader(\"Accept\", \"application/json\");\n xhr.setRequestHeader(\"Content-Type\", \"application/json\");\n xhr.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\n\n xhr.send();\n\n return xhr.status !== 404;\n};\n\n/**\n * Indicates if a request to the given url resuls in a redirect to /secureRedirect\n */\nexport const resourceRedirectsToSecureLogin = (url: string | Href) => {\n const fullUrl = new Href(url).absolutehref;\n\n const xhr = new XMLHttpRequest();\n xhr.open(\"HEAD\", fullUrl, false);\n xhr.setRequestHeader(\"Accept\", \"application/json\");\n xhr.setRequestHeader(\"Content-Type\", \"application/json\");\n xhr.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\n xhr.send();\n\n const responseURL = xhr.responseURL ?? \"\";\n\n return xhr.status === 400 && responseURL.endsWith(\"/secureLogin\");\n};\n","import { Href } from \"../../models/href/Href\";\n\nimport type { HistoryLocation, ISO_DATE } from \"../../types/types\";\n\nexport const parseUrl = (\n href: string | Href,\n): {\n path: string;\n querystring: undefined | string;\n hash: undefined | string;\n} => {\n if (href instanceof Href) {\n return {\n path: href.path,\n querystring: href.querystring,\n hash: href.hash,\n };\n }\n\n let path = href;\n let hash;\n let querystring;\n if (href.includes(\"#\")) {\n const hashSplit = href.split(\"#\");\n path = hashSplit[0];\n hash = hashSplit[1];\n }\n if (href.includes(\"?\")) {\n const qsSplit = path.split(\"?\");\n path = qsSplit[0];\n querystring = qsSplit[1];\n }\n return {\n path,\n querystring,\n hash,\n };\n};\n\nexport const filterParameters = (\n href: string | Href,\n allowedParameters?: string[],\n) => {\n if (!Array.isArray(allowedParameters)) {\n return new Href(href);\n }\n\n const url = parseUrl(href);\n let filteredUrl = url.path;\n if (url.querystring) {\n const searchParams = new URLSearchParams(url.querystring);\n const params = Array.from(searchParams.keys());\n for (const param of params) {\n if (!allowedParameters.includes(param)) {\n searchParams.delete(param);\n }\n }\n filteredUrl = filteredUrl + \"?\" + searchParams.toString();\n }\n if (url.hash) {\n filteredUrl = filteredUrl + \"#\" + url.hash;\n }\n\n if (href instanceof Href) {\n return new Href(filteredUrl, href.resourcetype, {\n origin: href.origin,\n contextPath: href.contextPath,\n });\n }\n\n return new Href(filteredUrl);\n};\n\nexport const createHref = (\n context: string,\n dynamicPart: string | Href,\n entryDate?: ISO_DATE,\n location?: HistoryLocation,\n allowedParameters?: string[],\n): Href => {\n let href = dynamicPart.toString();\n\n if (!href.startsWith(`/${context}/`)) {\n href = `/${context}/${href}`;\n }\n\n href = href.replace(/\\/\\//g, \"/\");\n\n if (location?.search && !href.includes(\"?\")) {\n const search = location.search.startsWith(\"?\")\n ? location.search.substring(1)\n : location.search;\n href = `${href}?${search}`;\n }\n\n const finalHref =\n dynamicPart instanceof Href\n ? filterParameters(\n new Href(href, dynamicPart.resourcetype, {\n origin: dynamicPart.origin,\n contextPath: dynamicPart.contextPath,\n }),\n allowedParameters,\n )\n : filterParameters(href, allowedParameters);\n\n if (entryDate) {\n finalHref.setParameter(\"entryDate\", entryDate);\n } else {\n finalHref.removeParameter(\"entryDate\");\n }\n\n return finalHref;\n};\n","export const createUUID = () => {\n let d = new Date().getTime();\n return \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g, (c) => {\n const r = ((d + Math.random() * 16) % 16) | 0;\n d = Math.floor(d / 16);\n return (c === \"x\" ? r : (r & 0x3) | 0x8).toString(16);\n });\n};\n","declare const process: { env: Record<string, string | undefined> } | undefined;\n\nexport const IS_DEV = (() => {\n // Safe check for Node/Webpack\n if (process?.env?.NODE_ENV) {\n return process.env.NODE_ENV !== \"production\";\n }\n\n // Safe check for Vite\n // We check 'typeof window' or 'typeof import.meta' to ensure we are in a module context\n // eslint-disable-next-line\n if (import.meta !== undefined && (import.meta as any).env) {\n // eslint-disable-next-line\n return !!(import.meta as any).env.DEV;\n }\n\n return false;\n})();\n","import { RESOURCE_PATH } from \"../../constants/Paths\";\nimport { getContextPathServer } from \"../../settings/Paths\";\n\n/**\n * Creates an url to a resource in the Be Informed repository\n * Only possible when serving using the UI Servlet of Be Informed\n */\nexport const getRepositoryResourceUrl = (\n resourceUrl: string,\n contextPath: string = getContextPathServer(),\n origin = \"\",\n): string => {\n if (resourceUrl.startsWith(origin + contextPath)) {\n return resourceUrl;\n }\n\n if (resourceUrl.startsWith(RESOURCE_PATH)) {\n return `${origin}${contextPath}${resourceUrl}`;\n }\n\n return `${origin}${contextPath}${RESOURCE_PATH}${resourceUrl}`;\n};\n","import { encode } from \"html-entities\";\n\nimport { IllegalArgumentException } from \"../../exceptions/IllegalArgumentException\";\n\ninterface removeUnwantedHtmlOptions {\n allowedTags?: string[];\n}\n\n/**\n * Translates html entities to their correct decimal equivalent\n * When path is only one deep better use optional chaining\n */\nconst properEntityEncoding = (html: string) => {\n return encode(html, { mode: \"nonAsciiPrintableOnly\", level: \"xml\" });\n};\n\n/**\n * removes unwanted html, this might result in incorrect html, as it removes all html that we don't except,\n * like <b style=\"font-weight: 400\">bold</b> will result in bold</b>\n */\nexport const removeUnwantedHtml = (\n html: string,\n options: removeUnwantedHtmlOptions = {\n allowedTags: [\"p\", \"br\", \"b\", \"i\", \"u\", \"strike\"],\n },\n): string => {\n if (typeof html !== \"string\") {\n throw new IllegalArgumentException(\"sanitizeHTML method expects a string\");\n }\n\n const correctEntityHtml = properEntityEncoding(html);\n\n // remove attributes from html elements\n const htmlWithoutAttributes = correctEntityHtml.replace(\n /<(\\w+)(.|[\\r\\n])*?>/gi,\n \"<$1>\",\n );\n\n const htmlWithCorrectBR = htmlWithoutAttributes.replace(\n /<br\\s*>/gi,\n \"<br />\",\n );\n\n // remove not allowed tags\n const allowedTags = Array.isArray(options.allowedTags)\n ? options.allowedTags.join(\"|\")\n : \"\";\n const pattern = `<(?!\\\\/?(${allowedTags})(>|\\\\s\\\\/))[^<]+?>`;\n const regex = new RegExp(pattern, \"gi\");\n\n return htmlWithCorrectBR.replace(regex, \"\");\n};\n"],"mappings":"gKAMO,IAAMA,EAAkBC,GAAuB,CACpD,IAAMC,EAAU,IAAIC,EAAKF,CAAG,EAAE,aAExBG,EAAM,IAAI,eAChB,OAAAA,EAAI,KAAK,OAAQF,EAAS,EAAK,EAC/BE,EAAI,iBAAiB,SAAU,kBAAkB,EACjDA,EAAI,iBAAiB,eAAgB,kBAAkB,EACvDA,EAAI,iBAAiB,mBAAoB,gBAAgB,EAEzDA,EAAI,KAAK,EAEFA,EAAI,SAAW,GACxB,EAKaC,EAAkCJ,GAAuB,CACpE,IAAMC,EAAU,IAAIC,EAAKF,CAAG,EAAE,aAExBG,EAAM,IAAI,eAChBA,EAAI,KAAK,OAAQF,EAAS,EAAK,EAC/BE,EAAI,iBAAiB,SAAU,kBAAkB,EACjDA,EAAI,iBAAiB,eAAgB,kBAAkB,EACvDA,EAAI,iBAAiB,mBAAoB,gBAAgB,EACzDA,E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,CAAW,GCpB9D,OAAS,UAAAK,MAAc,gBAYvB,IAAMC,EAAwBC,GACrBC,EAAOD,EAAM,CAAE,KAAM,wBAAyB,MAAO,KAAM,CAAC,EAOxDE,EAAqB,CAChCF,EACAG,EAAqC,CACnC,YAAa,CAAC,IAAK,KAAM,IAAK,IAAK,IAAK,QAAQ,CAClD,IACW,CACX,GAAI,OAAOH,GAAS,SAClB,MAAM,IAAII,EAAyB,sCAAsC,EAW3E,IAAMC,EARoBN,EAAqBC,CAAI,EAGH,QAC9C,wBACA,MACF,EAEgD,QAC9C,YACA,QACF,EAMMM,EAAU,YAHI,MAAM,QAAQH,EAAQ,WAAW,EACjDA,EAAQ,YAAY,KAAK,GAAG,EAC5B,EACmC,sBACjCI,EAAQ,IAAI,OAAOD,EAAS,IAAI,EAEtC,OAAOD,EAAkB,QAAQE,EAAO,EAAE,CAC5C","names":["resourceExists","url","fullUrl","Href","xhr","resourceRedirectsToSecureLogin","responseURL","parseUrl","href","Href","path","hash","querystring","hashSplit","qsSplit","filterParameters","allowedParameters","url","filteredUrl","searchParams","params","param","createHref","context","dynamicPart","entryDate","location","search","finalHref","createUUID","d","c","r","IS_DEV","getRepositoryResourceUrl","resourceUrl","contextPath","getContextPathServer","origin","RESOURCE_PATH","encode","properEntityEncoding","html","encode","removeUnwantedHtml","options","IllegalArgumentException","htmlWithCorrectBR","pattern","regex"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as d}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{c as d}from"./chunk-VLKSMXSB.js";import{p as l}from"./chunk-CPYNQW3X.js";import{a as f}from"./chunk-GHQP5QNP.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-Y3XZHSPE.js.map
|
package/dist/constants/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";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\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}\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,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,EAAA,iBAAAC,EAAA,wBAAAC,EAAA,wBAAAC,EAAA,oBAAAC,EAAA,yBAAAC,EAAA,oBAAAC,EAAA,eAAAC,EAAA,cAAAC,EAAA,aAAAC,EAAA,2BAAAC,EAAA,uBAAAC,EAAA,eAAAC,EAAA,2BAAAC,EAAA,wBAAAC,EAAA,wBAAAC,EAAA,oBAAAC,EAAA,kBAAAC,EAAA,4BAAAC,EAAA,gBAAAC,EAAA,qBAAAC,IAAA,eAAAC,EAAA/B,GCAO,IAAMgC,EAAa,OAAO,MAAU,IAC9BC,EAAYD,EAEbE,OACVA,EAAA,IAAM,MACNA,EAAA,KAAO,OAFGA,OAAA,IAKAC,OACVA,EAAA,KAAO,gBACPA,EAAA,MAAQ,iBAFEA,OAAA,IAQCC,EAAsB,IAKtBC,EAA0B,YAE1BC,EAAkB,aAClBC,EAAsB,wBACtBC,EAAkB,WAClBC,EAAuB,4BAKvBC,EAAyB,MAKzBC,EAAyB,EAKzBC,EAAmC,EAKpCC,OACVA,EAAA,YAAc,cACdA,EAAA,MAAQ,QACRA,EAAA,OAAS,SACTA,EAAA,MAAQ,QACRA,EAAA,YAAc,cALJA,OAAA,IAQAC,OACVA,EAAA,KAAO,OACPA,EAAA,WAAa,aACbA,EAAA,YAAc,cACdA,EAAA,eAAiB,iBAJPA,OAAA,IAOCC,EAAa,mBACbC,EAAqB,uBACrBC,EAAyB,iCACzBC,EAAyB,iCACzBC,EAAsB,wBAEtBC,EAA8B,CACzC,KAAM,4BACN,eAAgB,oBAChB,UAAW,EACb,EAEaC,EAAW,CACtB,IAAK,EACL,MAAO,GACP,OAAQ,GACR,MAAO,GACP,QAAS,GACT,UAAW,GACX,WAAY,GACZ,SAAU,GACV,YAAa,GACb,WAAY,EACd,ECjFO,IAAMC,EAAe,WAKfC,EAAc,cAKdC,EAAe,mBAKfC,EAAsB,mBAKtBC,EAAmB,QAKnBC,EAAgB,YAKhBC,EAAoB","names":["constants_exports","__export","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","__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,
|
|
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,
|
|
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 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})},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?Be(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((En,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((qn,K)=>{"use strict";var ht=typeof global=="object"&&global&&global.Object===Object&&global;K.exports=ht});var g=o((bn,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 y=o((On,Z)=>{"use strict";var xt=g(),mt=xt.Symbol;Z.exports=mt});var B=o((Tn,W)=>{"use strict";var Y=y(),Q=Object.prototype,gt=Q.hasOwnProperty,yt=Q.toString,f=Y?Y.toStringTag:void 0;function _t(r){var e=gt.call(r,f),t=r[f];try{r[f]=void 0;var s=!0}catch{}var n=yt.call(r);return s&&(e?r[f]=t:delete r[f]),n}W.exports=_t});var er=o((An,rr)=>{"use strict";var vt=Object.prototype,Et=vt.toString;function St(r){return Et.call(r)}rr.exports=St});var _=o((Cn,sr)=>{"use strict";var tr=y(),qt=B(),bt=er(),Ot="[object Null]",Tt="[object Undefined]",or=tr?tr.toStringTag:void 0;function At(r){return r==null?r===void 0?Tt:Ot:or&&or in Object(r)?qt(r):bt(r)}sr.exports=At});var v=o((Mn,nr)=>{"use strict";function Ct(r){return r!=null&&typeof r=="object"}nr.exports=Ct});var E=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 Nt=h(),jt=E(),Ft=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Rt=/^\w*$/;function Gt(r,e){if(Nt(r))return!1;var t=typeof r;return t=="number"||t=="symbol"||t=="boolean"||r==null||jt(r)?!0:Rt.test(r)||!Ft.test(r)||e!=null&&r in Object(e)}ir.exports=Gt});var q=o((wn,pr)=>{"use strict";function Lt(r){var e=typeof r;return r!=null&&(e=="object"||e=="function")}pr.exports=Lt});var hr=o((Nn,cr)=>{"use strict";var Dt=_(),$t=q(),zt="[object AsyncFunction]",Ht="[object Function]",Jt="[object GeneratorFunction]",Ut="[object Proxy]";function Xt(r){if(!$t(r))return!1;var e=Dt(r);return e==Ht||e==Jt||e==zt||e==Ut}cr.exports=Xt});var lr=o((jn,fr)=>{"use strict";var Kt=g(),kt=Kt["__core-js_shared__"];fr.exports=kt});var mr=o((Fn,xr)=>{"use strict";var b=lr(),dr=function(){var r=/[^.]+$/.exec(b&&b.keys&&b.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function Vt(r){return!!dr&&dr in r}xr.exports=Vt});var yr=o((Rn,gr)=>{"use strict";var Zt=Function.prototype,Yt=Zt.toString;function Qt(r){if(r!=null){try{return Yt.call(r)}catch{}try{return r+""}catch{}}return""}gr.exports=Qt});var vr=o((Gn,_r)=>{"use strict";var Wt=hr(),Bt=mr(),ro=q(),eo=yr(),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=Wt(r)?uo:oo;return e.test(eo(r))}_r.exports=po});var Sr=o((Ln,Er)=>{"use strict";function co(r,e){return r?.[e]}Er.exports=co});var O=o((Dn,qr)=>{"use strict";var ho=vr(),fo=Sr();function lo(r,e){var t=fo(r,e);return ho(t)?t:void 0}qr.exports=lo});var l=o(($n,br)=>{"use strict";var xo=O(),mo=xo(Object,"create");br.exports=mo});var Ar=o((zn,Tr)=>{"use strict";var Or=l();function go(){this.__data__=Or?Or(null):{},this.size=0}Tr.exports=go});var Mr=o((Hn,Cr)=>{"use strict";function yo(r){var e=this.has(r)&&delete this.__data__[r];return this.size-=e?1:0,e}Cr.exports=yo});var Pr=o((Jn,Ir)=>{"use strict";var _o=l(),vo="__lodash_hash_undefined__",Eo=Object.prototype,So=Eo.hasOwnProperty;function qo(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=qo});var Nr=o((Un,wr)=>{"use strict";var bo=l(),Oo=Object.prototype,To=Oo.hasOwnProperty;function Ao(r){var e=this.__data__;return bo?e[r]!==void 0:To.call(e,r)}wr.exports=Ao});var Fr=o((Xn,jr)=>{"use strict";var Co=l(),Mo="__lodash_hash_undefined__";function Io(r,e){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=Co&&e===void 0?Mo:e,this}jr.exports=Io});var Gr=o((Kn,Rr)=>{"use strict";var Po=Ar(),wo=Mr(),No=Pr(),jo=Nr(),Fo=Fr();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=No;u.prototype.has=jo;u.prototype.set=Fo;Rr.exports=u});var Dr=o((kn,Lr)=>{"use strict";function Ro(){this.__data__=[],this.size=0}Lr.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 Lo=zr();function Do(r,e){for(var t=r.length;t--;)if(Lo(r[t][0],e))return t;return-1}Hr.exports=Do});var Ur=o((Yn,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((Qn,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((Wn,kr)=>{"use strict";var Ko=d();function ko(r){return Ko(this.__data__,r)>-1}kr.exports=ko});var Yr=o((Bn,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 Wr=o((ra,Qr)=>{"use strict";var Yo=Dr(),Qo=Ur(),Wo=Kr(),Bo=Vr(),rs=Yr();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=Yo;p.prototype.delete=Qo;p.prototype.get=Wo;p.prototype.has=Bo;p.prototype.set=rs;Qr.exports=p});var re=o((ea,Br)=>{"use strict";var es=O(),ts=g(),os=es(ts,"Map");Br.exports=os});var oe=o((ta,te)=>{"use strict";var ee=Gr(),ss=Wr(),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 gs(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=gs});var me=o((pa,xe)=>{"use strict";var ys=oe(),_s=ue(),vs=ce(),Es=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=ys;c.prototype.delete=_s;c.prototype.get=vs;c.prototype.has=Es;c.prototype.set=Ss;xe.exports=c});var _e=o((ca,ye)=>{"use strict";var ge=me(),qs="Expected a function";function T(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(T.Cache||ge),t}T.Cache=ge;ye.exports=T});var Ee=o((ha,ve)=>{"use strict";var bs=_e(),Os=500;function Ts(r){var e=bs(r,function(s){return t.size===Os&&t.clear(),s}),t=e.cache;return e}ve.exports=Ts});var qe=o((fa,Se)=>{"use strict";var As=Ee(),Cs=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ms=/\\(\\)?/g,Is=As(function(r){var e=[];return r.charCodeAt(0)===46&&e.push(""),r.replace(Cs,function(t,s,n,a){e.push(n?a.replace(Ms,"$1"):s||t)}),e});Se.exports=Is});var Oe=o((la,be)=>{"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}be.exports=Ps});var Pe=o((da,Ie)=>{"use strict";var Te=y(),ws=Oe(),Ns=h(),js=E(),Fs=1/0,Ae=Te?Te.prototype:void 0,Ce=Ae?Ae.toString:void 0;function Me(r){if(typeof r=="string")return r;if(Ns(r))return ws(r,Me)+"";if(js(r))return Ce?Ce.call(r):"";var e=r+"";return e=="0"&&1/r==-Fs?"-0":e}Ie.exports=Me});var Ne=o((xa,we)=>{"use strict";var Rs=Pe();function Gs(r){return r==null?"":Rs(r)}we.exports=Gs});var Fe=o((ma,je)=>{"use strict";var Ls=h(),Ds=ur(),$s=qe(),zs=Ne();function Hs(r,e){return Ls(r)?r:Ds(r,e)?[r]:$s(zs(r))}je.exports=Hs});var Ge=o((ga,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((ya,$e)=>{"use strict";var Le=Ge(),ks=v(),De=Object.prototype,Vs=De.hasOwnProperty,Zs=De.propertyIsEnumerable,Ys=Le(function(){return arguments}())?Le:function(r){return ks(r)&&Vs.call(r,"callee")&&!Zs.call(r,"callee")};$e.exports=Ys});var Je=o((_a,He)=>{"use strict";var Qs=9007199254740991,Ws=/^(?:0|[1-9]\d*)$/;function Bs(r,e){var t=typeof r;return e=e??Qs,!!e&&(t=="number"||t!="symbol"&&Ws.test(r))&&r>-1&&r%1==0&&r<e}He.exports=Bs});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((Ea,Ke)=>{"use strict";var tn=E(),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=Fe(),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 Qe=o((qa,Ye)=>{"use strict";var ln=U(),dn=Ze();function xn(r,e){return r!=null&&dn(r,e,ln)}Ye.exports=xn});var yn={};st(yn,{ConfigurationException:()=>S,FetchException:()=>C,IllegalArgumentException:()=>M,IllegalReturnException:()=>I,IllegalStateException:()=>P,JsonParseException:()=>w,MissingPropertyException:()=>N,NetworkException:()=>j,NotAllowedUriException:()=>F,NotFoundException:()=>R,ServerRequestException:()=>G,ThemePropertyException:()=>L,TimeoutException:()=>D,UnauthorizedException:()=>$,UnsupportedOperationException:()=>z});module.exports=at(yn);var S=class extends Error{constructor(e){super(e),this.name="ConfigurationException"}};var A=nt(Qe(),1);var mn=400,C=class r extends Error{id;request;requestOptions;status;response;properties;parameters;constructor(e,t,s){let n=gn(e,s);super(n.id),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,Error.captureStackTrace&&Error.captureStackTrace(this,r)}},gn=(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,A.default)(r,"error"))return{...t,...r.error};let[s]=Object.keys(r);return(0,A.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 We=require("immer"),P=class extends Error{[We.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 N=class extends Error{constructor(e){super(e),this.name="MissingPropertyException"}};var j=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 F=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 L=class extends Error{constructor(e){super(e),this.name="ThemePropertyException"}};var D=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
|