@beinformed/ui 1.18.6 → 1.18.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/esm/models/attributes/AttributeModel.js +5 -2
  3. package/esm/models/attributes/AttributeModel.js.map +1 -1
  4. package/esm/models/list/ListModel.js +3 -2
  5. package/esm/models/list/ListModel.js.map +1 -1
  6. package/esm/react-client/Init.js.map +1 -1
  7. package/esm/react-client/client.js +10 -16
  8. package/esm/react-client/client.js.map +1 -1
  9. package/esm/react-server/htmlpage.js +11 -18
  10. package/esm/react-server/htmlpage.js.map +1 -1
  11. package/esm/react-server/renderSSRMinimal.js +1 -2
  12. package/esm/react-server/renderSSRMinimal.js.map +1 -1
  13. package/esm/react-server/serverNoSSR.js +2 -3
  14. package/esm/react-server/serverNoSSR.js.map +1 -1
  15. package/esm/react-theme/ThemeProvider.js +2 -1
  16. package/esm/react-theme/ThemeProvider.js.map +1 -1
  17. package/esm/utils/browser/Cookies.js +5 -19
  18. package/esm/utils/browser/Cookies.js.map +1 -1
  19. package/lib/hooks/__tests__/UseModularUIModel.spec.js.flow +1 -1
  20. package/lib/hooks/__tests__/useAuthentication.spec.js.flow +1 -1
  21. package/lib/hooks/__tests__/useForm.spec.js.flow +1 -1
  22. package/lib/hooks/__tests__/useModal.spec.js.flow +1 -1
  23. package/lib/hooks/__tests__/useModelCatalog.spec.js.flow +1 -1
  24. package/lib/hooks/__tests__/useModels.spec.js.flow +1 -1
  25. package/lib/hooks/__tests__/useModularUIBasic.spec.js.flow +1 -18
  26. package/lib/hooks/__tests__/useNotification.spec.js.flow +1 -1
  27. package/lib/hooks/__tests__/usePreference.spec.js.flow +1 -1
  28. package/lib/hooks/__tests__/useProgressIndicator.spec.js.flow +1 -1
  29. package/lib/models/attributes/AttributeModel.js +3 -1
  30. package/lib/models/attributes/AttributeModel.js.flow +20 -16
  31. package/lib/models/attributes/AttributeModel.js.map +1 -1
  32. package/lib/models/list/ListModel.js +3 -2
  33. package/lib/models/list/ListModel.js.flow +14 -13
  34. package/lib/models/list/ListModel.js.map +1 -1
  35. package/lib/react-client/Init.js.flow +1 -1
  36. package/lib/react-client/Init.js.map +1 -1
  37. package/lib/react-client/client.js +10 -16
  38. package/lib/react-client/client.js.flow +12 -10
  39. package/lib/react-client/client.js.map +1 -1
  40. package/lib/react-server/htmlpage.js +10 -18
  41. package/lib/react-server/htmlpage.js.flow +9 -13
  42. package/lib/react-server/htmlpage.js.map +1 -1
  43. package/lib/react-server/renderSSRMinimal.js +1 -2
  44. package/lib/react-server/renderSSRMinimal.js.flow +2 -2
  45. package/lib/react-server/renderSSRMinimal.js.map +1 -1
  46. package/lib/react-server/serverNoSSR.js +2 -3
  47. package/lib/react-server/serverNoSSR.js.flow +4 -3
  48. package/lib/react-server/serverNoSSR.js.map +1 -1
  49. package/lib/react-theme/ThemeProvider.js +2 -1
  50. package/lib/react-theme/ThemeProvider.js.flow +2 -2
  51. package/lib/react-theme/ThemeProvider.js.map +1 -1
  52. package/lib/redux/_router/__tests__/hooks.spec.js.flow +1 -1
  53. package/lib/utils/browser/Cookies.js +5 -18
  54. package/lib/utils/browser/Cookies.js.flow +4 -14
  55. package/lib/utils/browser/Cookies.js.map +1 -1
  56. package/package.json +26 -26
  57. package/src/hooks/__tests__/UseModularUIModel.spec.js +1 -1
  58. package/src/hooks/__tests__/useAuthentication.spec.js +1 -1
  59. package/src/hooks/__tests__/useForm.spec.js +1 -1
  60. package/src/hooks/__tests__/useModal.spec.js +1 -1
  61. package/src/hooks/__tests__/useModelCatalog.spec.js +1 -1
  62. package/src/hooks/__tests__/useModels.spec.js +1 -1
  63. package/src/hooks/__tests__/useModularUIBasic.spec.js +1 -18
  64. package/src/hooks/__tests__/useNotification.spec.js +1 -1
  65. package/src/hooks/__tests__/usePreference.spec.js +1 -1
  66. package/src/hooks/__tests__/useProgressIndicator.spec.js +1 -1
  67. package/src/models/attributes/AttributeModel.js +20 -16
  68. package/src/models/list/ListModel.js +14 -13
  69. package/src/react-client/Init.js +1 -1
  70. package/src/react-client/client.js +12 -10
  71. package/src/react-server/htmlpage.js +9 -13
  72. package/src/react-server/renderSSRMinimal.js +2 -2
  73. package/src/react-server/serverNoSSR.js +4 -3
  74. package/src/react-theme/ThemeProvider.js +2 -2
  75. package/src/redux/_router/__tests__/hooks.spec.js +1 -1
  76. package/src/utils/browser/Cookies.js +4 -14
@@ -14,8 +14,7 @@ var serverNoSSR = function serverNoSSR(_ref) {
14
14
  customReducers = _ref.customReducers,
15
15
  _ref$serverPreference = _ref.serverPreferences,
16
16
  serverPreferences = _ref$serverPreference === void 0 ? [] : _ref$serverPreference,
17
- _ref$theme = _ref.theme,
18
- theme = _ref$theme === void 0 ? null : _ref$theme,
17
+ theme = _ref.theme,
19
18
  render = _ref.render,
20
19
  template = _ref.template,
21
20
  beforeRenderHooks = _ref.beforeRenderHooks;
@@ -30,7 +29,7 @@ var serverNoSSR = function serverNoSSR(_ref) {
30
29
  if (theme) {
31
30
  var _store$getState, _store$getState$prefe;
32
31
 
33
- var storedTheme = (_store$getState = store.getState()) === null || _store$getState === void 0 ? void 0 : (_store$getState$prefe = _store$getState.preferences) === null || _store$getState$prefe === void 0 ? void 0 : _store$getState$prefe.theme; // $FlowFixMe[incompatible-call]
32
+ var storedTheme = (_store$getState = store.getState()) === null || _store$getState === void 0 ? void 0 : (_store$getState$prefe = _store$getState.preferences) === null || _store$getState$prefe === void 0 ? void 0 : _store$getState$prefe.theme; //$FlowFixMe[incompatible-call]
34
33
 
35
34
  createTheme(storedTheme, theme);
36
35
  }
@@ -1 +1 @@
1
- {"version":3,"file":"serverNoSSR.js","names":["createUUID","getFullRequestHref","createReduxStore","setI18n","setServerPreferences","setConfigurationTheme","handleErrors","handleBeforeRenderHooks","renderSSRMinimal","createTheme","serverNoSSR","request","locales","customReducers","serverPreferences","theme","render","template","beforeRenderHooks","UUID","__webpack_nonce__","requestHref","store","storedTheme","getState","preferences"],"sources":["../../src/react-server/serverNoSSR.js"],"sourcesContent":["// @flow\nimport \"./contextPath\";\n\nimport createUUID from \"../utils/helpers/createUUID\";\nimport { getFullRequestHref } from \"./requestInformation\";\n\nimport {\n createReduxStore,\n setI18n,\n setServerPreferences,\n setConfigurationTheme,\n handleErrors,\n} from \"./serverUtil\";\n\nimport { handleBeforeRenderHooks } from \"../redux/store/beforeRenderHooks\";\n\nimport renderSSRMinimal from \"./renderSSRMinimal\";\n\nimport createTheme from \"../react-theme/createTheme\";\n\nimport type { TemplateProps } from \"./htmlpage\";\nimport type { BeforeRenderHook } from \"../redux/store/beforeRenderHooks\";\nimport type { PreferenceValue } from \"./serverUtil\";\nimport type { LocaleConfiguration } from \"../i18n/types\";\ntype serverProps = {\n request: HttpServletRequestJava,\n locales?: Array<LocaleConfiguration>,\n customReducers?: Object,\n theme?: Object,\n serverPreferences?: Array<string | PreferenceValue>,\n render: Function,\n template?: (TemplateProps) => string,\n beforeRenderHooks?: Array<BeforeRenderHook>,\n};\n\n/**\n */\nconst serverNoSSR = ({\n request,\n locales,\n customReducers,\n serverPreferences = [],\n theme = null,\n render,\n template,\n beforeRenderHooks,\n}: serverProps): string => {\n const UUID = createUUID();\n __webpack_nonce__ = UUID; // NOSONAR\n\n const requestHref = getFullRequestHref(request);\n const store = createReduxStore(requestHref, customReducers);\n\n setServerPreferences(store, serverPreferences);\n setConfigurationTheme(store);\n\n if (theme) {\n const storedTheme = store.getState()?.preferences?.theme;\n // $FlowFixMe[incompatible-call]\n createTheme(storedTheme, theme);\n }\n\n setI18n(store, locales, request);\n\n handleErrors(store);\n\n handleBeforeRenderHooks(beforeRenderHooks, { store, request });\n\n return renderSSRMinimal({ store, theme, UUID, render, template });\n};\n\nexport default serverNoSSR;\n"],"mappings":"AACA,OAAO,eAAP;AAEA,OAAOA,UAAP,MAAuB,6BAAvB;AACA,SAASC,kBAAT,QAAmC,sBAAnC;AAEA,SACEC,gBADF,EAEEC,OAFF,EAGEC,oBA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AAgB,CAAC;IAAEc,KAAK,EAALA,KAAF;IAASP,KAAK,EAALA,KAAT;IAAgBI,IAAI,EAAJA,IAAhB;IAAsBH,MAAM,EAANA,MAAtB;IAA8BC,QAAQ,EAARA;EAA9B,CAAD,CAAvB;AACD,CAhCD;;AAkCA,eAAeP,WAAf"}
1
+ {"version":3,"file":"serverNoSSR.js","names":["createUUID","getFullRequestHref","createReduxStore","setI18n","setServerPreferences","setConfigurationTheme","handleErrors","handleBeforeRenderHooks","renderSSRMinimal","createTheme","serverNoSSR","request","locales","customReducers","serverPreferences","theme","render","template","beforeRenderHooks","UUID","__webpack_nonce__","requestHref","store","storedTheme","getState","preferences"],"sources":["../../src/react-server/serverNoSSR.js"],"sourcesContent":["// @flow\nimport \"./contextPath\";\n\nimport createUUID from \"../utils/helpers/createUUID\";\nimport { getFullRequestHref } from \"./requestInformation\";\n\nimport {\n createReduxStore,\n setI18n,\n setServerPreferences,\n setConfigurationTheme,\n handleErrors,\n} from \"./serverUtil\";\n\nimport { handleBeforeRenderHooks } from \"../redux/store/beforeRenderHooks\";\n\nimport renderSSRMinimal from \"./renderSSRMinimal\";\n\nimport createTheme from \"../react-theme/createTheme\";\n\nimport type { TemplateProps } from \"./htmlpage\";\nimport type { BeforeRenderHook } from \"../redux/store/beforeRenderHooks\";\nimport type { PreferenceValue } from \"./serverUtil\";\nimport type { LocaleConfiguration } from \"../i18n/types\";\nimport type { Theme } from \"../react-theme/types\";\ntype serverProps = {\n request: HttpServletRequestJava,\n locales?: Array<LocaleConfiguration>,\n customReducers?: Object,\n theme?: Theme | Array<Theme>,\n serverPreferences?: Array<string | PreferenceValue>,\n render: Function,\n template?: (TemplateProps) => string,\n beforeRenderHooks?: Array<BeforeRenderHook>,\n};\n\n/**\n */\nconst serverNoSSR = ({\n request,\n locales,\n customReducers,\n serverPreferences = [],\n theme,\n render,\n template,\n beforeRenderHooks,\n}: serverProps): string => {\n const UUID = createUUID();\n __webpack_nonce__ = UUID; // NOSONAR\n\n const requestHref = getFullRequestHref(request);\n const store = createReduxStore(requestHref, customReducers);\n\n setServerPreferences(store, serverPreferences);\n setConfigurationTheme(store);\n\n if (theme) {\n const storedTheme = store.getState()?.preferences?.theme;\n //$FlowFixMe[incompatible-call]\n createTheme(storedTheme, theme);\n }\n\n setI18n(store, locales, request);\n\n handleErrors(store);\n\n handleBeforeRenderHooks(beforeRenderHooks, { store, request });\n\n return renderSSRMinimal({ store, theme, UUID, render, template });\n};\n\nexport default serverNoSSR;\n"],"mappings":"AACA,OAAO,eAAP;AAEA,OAAOA,UAAP,MAAuB,6BAAvB;AACA,SAASC,kBAAT,QAAmC,sBAAnC;AAEA,SACEC,gBADF,EAEEC,OAFF,EAGEC,oBAHF,EAIEC,qBAJF,EAKEC,YALF,QAMO,cANP;AAQA,SAASC,uBAAT,QAAwC,kCAAxC;AAEA,OAAOC,gBAAP,MAA6B,oBAA7B;AAEA,OAAOC,WAAP,MAAwB,4BAAxB;;AAkBA;AACA;AACA,IAAMC,WAAW,GAAG,SAAdA,WAAc,OASO;EAAA,IARzBC,OAQyB,QARzBA,OAQyB;EAAA,IAPzBC,OAOyB,QAPzBA,OAOyB;EAAA,IANzBC,cAMyB,QANzBA,cAMyB;EAAA,iCALzBC,iBAKyB;EAAA,IALzBA,iBAKyB,sCALL,EAKK;EAAA,IAJzBC,KAIyB,QAJzBA,KAIyB;EAAA,IAHzBC,MAGyB,QAHzBA,MAGyB;EAAA,IAFzBC,QAEyB,QAFzBA,QAEyB;EAAA,IADzBC,iBACyB,QADzBA,iBACyB;EACzB,IAAMC,IAAI,GAAGnB,UAAU,EAAvB;EACAoB,iBAAiB,GAAGD,IAApB,CAFyB,CAEC;;EAE1B,IAAME,WAAW,GAAGpB,kBAAkB,CAACU,OAAD,CAAtC;EACA,IAAMW,KAAK,GAAGpB,gBAAgB,CAACmB,WAAD,EAAcR,cAAd,CAA9B;EAEAT,oBAAoB,CAACkB,KAAD,EAAQR,iBAAR,CAApB;EACAT,qBAAqB,CAACiB,KAAD,CAArB;;EAEA,IAAIP,KAAJ,EAAW;IAAA;;IACT,IAAMQ,WAAW,sBAAGD,KAAK,CAACE,QAAN,EAAH,6EAAG,gBAAkBC,WAArB,0DAAG,sBAA+BV,KAAnD,CADS,CAET;;IACAN,WAAW,CAACc,WAAD,EAAcR,KAAd,CAAX;EACD;;EAEDZ,OAAO,CAACmB,KAAD,EAAQV,OAAR,EAAiBD,OAAjB,CAAP;EAEAL,YAAY,CAACgB,KAAD,CAAZ;EAEAf,uBAAuB,CAACW,iBAAD,EAAoB;IAAEI,KAAK,EAALA,KAAF;IAASX,OAAO,EAAPA;EAAT,CAApB,CAAvB;EAEA,OAAOH,gBAAgB,CAAC;IAAEc,KAAK,EAALA,KAAF;IAASP,KAAK,EAALA,KAAT;IAAgBI,IAAI,EAAJA,IAAhB;IAAsBH,MAAM,EAANA,MAAtB;IAA8BC,QAAQ,EAARA;EAA9B,CAAD,CAAvB;AACD,CAhCD;;AAkCA,eAAeP,WAAf"}
@@ -6,7 +6,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
6
6
  /**
7
7
  */
8
8
  var ThemeProvider = function ThemeProvider(_ref) {
9
- var theme = _ref.theme,
9
+ var _ref$theme = _ref.theme,
10
+ theme = _ref$theme === void 0 ? {} : _ref$theme,
10
11
  children = _ref.children;
11
12
  var storedTheme = useSelector(function (_ref2) {
12
13
  var preferences = _ref2.preferences;
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeProvider.js","names":["useSelector","ThemeProvider","SCThemeProvider","createTheme","theme","children","storedTheme","preferences","finalTheme","displayName"],"sources":["../../src/react-theme/ThemeProvider.js"],"sourcesContent":["// @flow\nimport { useSelector } from \"react-redux\";\nimport { ThemeProvider as SCThemeProvider } from \"styled-components\";\n\nimport createTheme from \"./createTheme\";\n\nimport type { Node } from \"react\";\nimport type { Theme } from \"./types\";\n\nexport type Props = {\n +theme: Theme | Array<Theme>,\n +children: Node,\n};\n\n/**\n */\nconst ThemeProvider = ({ theme, children }: Props): Node => {\n const storedTheme = useSelector(({ preferences }) => preferences.theme);\n const finalTheme = createTheme(storedTheme, theme);\n\n return <SCThemeProvider theme={finalTheme}>{children}</SCThemeProvider>;\n};\nThemeProvider.displayName = \"BI.ThemeProvider\";\n\nexport default ThemeProvider;\n"],"mappings":"AACA,SAASA,WAAT,QAA4B,aAA5B;AACA,SAASC,aAAa,IAAIC,eAA1B,QAAiD,mBAAjD;AAEA,OAAOC,WAAP,MAAwB,eAAxB;;;AAUA;AACA;AACA,IAAMF,aAAa,GAAG,SAAhBA,aAAgB,OAAsC;EAAA,IAAnCG,KAAmC,QAAnCA,KAAmC;EAAA,IAA5BC,QAA4B,QAA5BA,QAA4B;EAC1D,IAAMC,WAAW,GAAGN,WAAW,CAAC;IAAA,IAAGO,WAAH,SAAGA,WAAH;IAAA,OAAqBA,WAAW,CAACH,KAAjC;EAAA,CAAD,CAA/B;EACA,IAAMI,UAAU,GAAGL,WAAW,CAACG,WAAD,EAAcF,KAAd,CAA9B;EAEA,oBAAO,KAAC,eAAD;IAAiB,KAAK,EAAEI,UAAxB;IAAA,UAAqCH;EAArC,EAAP;AACD,CALD;;AAMAJ,aAAa,CAACQ,WAAd,GAA4B,kBAA5B;AAEA,eAAeR,aAAf"}
1
+ {"version":3,"file":"ThemeProvider.js","names":["useSelector","ThemeProvider","SCThemeProvider","createTheme","theme","children","storedTheme","preferences","finalTheme","displayName"],"sources":["../../src/react-theme/ThemeProvider.js"],"sourcesContent":["// @flow\nimport { useSelector } from \"react-redux\";\nimport { ThemeProvider as SCThemeProvider } from \"styled-components\";\n\nimport createTheme from \"./createTheme\";\n\nimport type { Node } from \"react\";\nimport type { Theme } from \"./types\";\n\nexport type Props = {\n +theme?: Theme | Array<Theme>,\n +children: Node,\n};\n\n/**\n */\nconst ThemeProvider = ({ theme = {}, children }: Props): Node => {\n const storedTheme = useSelector(({ preferences }) => preferences.theme);\n const finalTheme = createTheme(storedTheme, theme);\n\n return <SCThemeProvider theme={finalTheme}>{children}</SCThemeProvider>;\n};\nThemeProvider.displayName = \"BI.ThemeProvider\";\n\nexport default ThemeProvider;\n"],"mappings":"AACA,SAASA,WAAT,QAA4B,aAA5B;AACA,SAASC,aAAa,IAAIC,eAA1B,QAAiD,mBAAjD;AAEA,OAAOC,WAAP,MAAwB,eAAxB;;;AAUA;AACA;AACA,IAAMF,aAAa,GAAG,SAAhBA,aAAgB,OAA2C;EAAA,sBAAxCG,KAAwC;EAAA,IAAxCA,KAAwC,2BAAhC,EAAgC;EAAA,IAA5BC,QAA4B,QAA5BA,QAA4B;EAC/D,IAAMC,WAAW,GAAGN,WAAW,CAAC;IAAA,IAAGO,WAAH,SAAGA,WAAH;IAAA,OAAqBA,WAAW,CAACH,KAAjC;EAAA,CAAD,CAA/B;EACA,IAAMI,UAAU,GAAGL,WAAW,CAACG,WAAD,EAAcF,KAAd,CAA9B;EAEA,oBAAO,KAAC,eAAD;IAAiB,KAAK,EAAEI,UAAxB;IAAA,UAAqCH;EAArC,EAAP;AACD,CALD;;AAMAJ,aAAa,CAACQ,WAAd,GAA4B,kBAA5B;AAEA,eAAeR,aAAf"}
@@ -10,29 +10,15 @@ var getCookie = function getCookie(name) {
10
10
  */
11
11
 
12
12
 
13
- var setCookie = function setCookie(name, value) {
14
- var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
15
- days = _ref.days,
16
- _ref$sameSite = _ref.sameSite,
17
- sameSite = _ref$sameSite === void 0 ? "Strict" : _ref$sameSite,
18
- secure = _ref.secure;
13
+ var setCookie = function setCookie(name, value, options) {
14
+ var _options$sameSite;
19
15
 
20
16
  var attributes = {
21
17
  path: BASE
22
18
  };
23
-
24
- if (days) {
25
- attributes.expires = days;
26
- }
27
-
28
- if (sameSite) {
29
- attributes.sameSite = sameSite;
30
- }
31
-
32
- if (secure) {
33
- attributes.secure = secure;
34
- }
35
-
19
+ attributes.expires = options === null || options === void 0 ? void 0 : options.days;
20
+ attributes.sameSite = (_options$sameSite = options === null || options === void 0 ? void 0 : options.sameSite) !== null && _options$sameSite !== void 0 ? _options$sameSite : "Strict";
21
+ attributes.secure = options === null || options === void 0 ? void 0 : options.secure;
36
22
  Cookies.set(name, value, attributes);
37
23
  };
38
24
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Cookies.js","names":["Cookies","BASE","getCookie","name","get","setCookie","value","days","sameSite","secure","attributes","path","expires","set","clearCookie","remove"],"sources":["../../../src/utils/browser/Cookies.js"],"sourcesContent":["// @flow\nimport Cookies from \"js-cookie\";\n\nimport { BASE } from \"../../constants/Constants\";\n\ntype CookieOptions = {\n days?: number,\n sameSite?: \"None\" | \"Lax\" | \"Strict\",\n secure?: boolean,\n};\n\ntype CookieAttributes = {\n path: string,\n expires?: number,\n sameSite?: string,\n secure?: boolean,\n};\n\n/**\n */\nconst getCookie = (name: string): null | string => {\n return Cookies.get(name);\n};\n\n/**\n */\nconst setCookie = (\n name: string,\n value: any,\n { days, sameSite = \"Strict\", secure }: CookieOptions = {}\n) => {\n const attributes: CookieAttributes = { path: BASE };\n if (days) {\n attributes.expires = days;\n }\n if (sameSite) {\n attributes.sameSite = sameSite;\n }\n if (secure) {\n attributes.secure = secure;\n }\n\n Cookies.set(name, value, attributes);\n};\n\n/**\n */\nconst clearCookie = (name: string) => {\n Cookies.remove(name, { path: BASE });\n};\n\nexport { getCookie, setCookie, clearCookie };\n"],"mappings":"AACA,OAAOA,OAAP,MAAoB,WAApB;AAEA,SAASC,IAAT,QAAqB,2BAArB;;AAeA;AACA;AACA,IAAMC,SAAS,GAAG,SAAZA,SAAY,CAACC,IAAD,EAAiC;EACjD,OAAOH,OAAO,CAACI,GAAR,CAAYD,IAAZ,CAAP;AACD,CAFD;AAIA;AACA;;;AACA,IAAME,SAAS,GAAG,SAAZA,SAAY,CAChBF,IADgB,EAEhBG,KAFgB,EAIb;EAAA,+EADoD,EACpD;EAAA,IADDC,IACC,QADDA,IACC;EAAA,yBADKC,QACL;EAAA,IADKA,QACL,8BADgB,QAChB;EAAA,IAD0BC,MAC1B,QAD0BA,MAC1B;;EACH,IAAMC,UAA4B,GAAG;IAAEC,IAAI,EAAEV;EAAR,CAArC;;EACA,IAAIM,IAAJ,EAAU;IACRG,UAAU,CAACE,OAAX,GAAqBL,IAArB;EACD;;EACD,IAAIC,QAAJ,EAAc;IACZE,UAAU,CAACF,QAAX,GAAsBA,QAAtB;EACD;;EACD,IAAIC,MAAJ,EAAY;IACVC,UAAU,CAACD,MAAX,GAAoBA,MAApB;EACD;;EAEDT,OAAO,CAACa,GAAR,CAAYV,IAAZ,EAAkBG,KAAlB,EAAyBI,UAAzB;AACD,CAjBD;AAmBA;AACA;;;AACA,IAAMI,WAAW,GAAG,SAAdA,WAAc,CAACX,IAAD,EAAkB;EACpCH,OAAO,CAACe,MAAR,CAAeZ,IAAf,EAAqB;IAAEQ,IAAI,EAAEV;EAAR,CAArB;AACD,CAFD;;AAIA,SAASC,SAAT,EAAoBG,SAApB,EAA+BS,WAA/B"}
1
+ {"version":3,"file":"Cookies.js","names":["Cookies","BASE","getCookie","name","get","setCookie","value","options","attributes","path","expires","days","sameSite","secure","set","clearCookie","remove"],"sources":["../../../src/utils/browser/Cookies.js"],"sourcesContent":["// @flow\nimport Cookies from \"js-cookie\";\n\nimport { BASE } from \"../../constants/Constants\";\n\ntype CookieOptions = {\n days?: number,\n sameSite?: \"None\" | \"Lax\" | \"Strict\",\n secure?: boolean,\n};\n\ntype CookieAttributes = {\n path: string,\n expires?: number,\n sameSite?: string,\n secure?: boolean,\n};\n\n/**\n */\nconst getCookie = (name: string): null | string => {\n return Cookies.get(name);\n};\n\n/**\n */\nconst setCookie = (name: string, value: any, options?: CookieOptions) => {\n const attributes: CookieAttributes = { path: BASE };\n attributes.expires = options?.days;\n attributes.sameSite = options?.sameSite ?? \"Strict\";\n attributes.secure = options?.secure;\n\n Cookies.set(name, value, attributes);\n};\n\n/**\n */\nconst clearCookie = (name: string) => {\n Cookies.remove(name, { path: BASE });\n};\n\nexport { getCookie, setCookie, clearCookie };\n"],"mappings":"AACA,OAAOA,OAAP,MAAoB,WAApB;AAEA,SAASC,IAAT,QAAqB,2BAArB;;AAeA;AACA;AACA,IAAMC,SAAS,GAAG,SAAZA,SAAY,CAACC,IAAD,EAAiC;EACjD,OAAOH,OAAO,CAACI,GAAR,CAAYD,IAAZ,CAAP;AACD,CAFD;AAIA;AACA;;;AACA,IAAME,SAAS,GAAG,SAAZA,SAAY,CAACF,IAAD,EAAeG,KAAf,EAA2BC,OAA3B,EAAuD;EAAA;;EACvE,IAAMC,UAA4B,GAAG;IAAEC,IAAI,EAAER;EAAR,CAArC;EACAO,UAAU,CAACE,OAAX,GAAqBH,OAArB,aAAqBA,OAArB,uBAAqBA,OAAO,CAAEI,IAA9B;EACAH,UAAU,CAACI,QAAX,wBAAsBL,OAAtB,aAAsBA,OAAtB,uBAAsBA,OAAO,CAAEK,QAA/B,iEAA2C,QAA3C;EACAJ,UAAU,CAACK,MAAX,GAAoBN,OAApB,aAAoBA,OAApB,uBAAoBA,OAAO,CAAEM,MAA7B;EAEAb,OAAO,CAACc,GAAR,CAAYX,IAAZ,EAAkBG,KAAlB,EAAyBE,UAAzB;AACD,CAPD;AASA;AACA;;;AACA,IAAMO,WAAW,GAAG,SAAdA,WAAc,CAACZ,IAAD,EAAkB;EACpCH,OAAO,CAACgB,MAAR,CAAeb,IAAf,EAAqB;IAAEM,IAAI,EAAER;EAAR,CAArB;AACD,CAFD;;AAIA,SAASC,SAAT,EAAoBG,SAApB,EAA+BU,WAA/B"}
@@ -1,7 +1,7 @@
1
1
  import configureMockStore from "redux-mock-store";
2
2
  import thunk from "redux-thunk";
3
3
  import { Provider } from "react-redux";
4
- import { renderHook } from "@testing-library/react-hooks";
4
+ import { renderHook } from "@testing-library/react";
5
5
  import xhrMock from "xhr-mock";
6
6
 
7
7
  import {
@@ -1,7 +1,7 @@
1
1
  import configureMockStore from "redux-mock-store";
2
2
  import thunk from "redux-thunk";
3
3
  import { Provider } from "react-redux";
4
- import { renderHook } from "@testing-library/react-hooks";
4
+ import { renderHook } from "@testing-library/react";
5
5
  import xhrMock from "xhr-mock";
6
6
 
7
7
  import { useLogin, useLogout } from "../useAuthentication";
@@ -1,7 +1,7 @@
1
1
  import configureMockStore from "redux-mock-store";
2
2
  import thunk from "redux-thunk";
3
3
  import { Provider } from "react-redux";
4
- import { renderHook } from "@testing-library/react-hooks";
4
+ import { renderHook } from "@testing-library/react";
5
5
  import xhrMock from "xhr-mock";
6
6
 
7
7
  import {
@@ -1,6 +1,6 @@
1
1
  import configureMockStore from "redux-mock-store";
2
2
  import { Provider } from "react-redux";
3
- import { renderHook } from "@testing-library/react-hooks";
3
+ import { renderHook } from "@testing-library/react";
4
4
 
5
5
  import { useModal } from "../useModal";
6
6
  import { IllegalArgumentException } from "../../exceptions";
@@ -1,7 +1,7 @@
1
1
  import configureMockStore from "redux-mock-store";
2
2
  import thunk from "redux-thunk";
3
3
  import { Provider } from "react-redux";
4
- import { renderHook } from "@testing-library/react-hooks";
4
+ import { renderHook } from "@testing-library/react";
5
5
  import xhrMock from "xhr-mock";
6
6
 
7
7
  import {
@@ -1,5 +1,5 @@
1
1
  import { useModels } from "../useModels";
2
- import { renderHook } from "@testing-library/react-hooks";
2
+ import { renderHook } from "@testing-library/react";
3
3
  import { Provider } from "react-redux";
4
4
  import configureMockStore from "redux-mock-store";
5
5
 
@@ -1,12 +1,11 @@
1
1
  import configureMockStore from "redux-mock-store";
2
2
  import thunk from "redux-thunk";
3
3
  import { Provider } from "react-redux";
4
- import { renderHook } from "@testing-library/react-hooks";
4
+ import { renderHook } from "@testing-library/react";
5
5
  import xhrMock from "xhr-mock";
6
6
 
7
7
  import { useModularUIBasic } from "../useModularUIBasic";
8
8
  import { ApplicationModel, Href } from "../../models";
9
- import { IllegalArgumentException } from "../../exceptions";
10
9
 
11
10
  const middlewares = [thunk];
12
11
  const mockStore = configureMockStore(middlewares);
@@ -74,22 +73,6 @@ describe("modularui hooks", () => {
74
73
  ]);
75
74
  });
76
75
 
77
- it("missing href", () => {
78
- const store = mockStore({
79
- modularui: {},
80
- router: { location: { pathname: "/", state: { reload: true } } },
81
- i18n: { locale: "en" },
82
- });
83
- /**
84
- */
85
- const wrapper = ({ children }) => (
86
- <Provider store={store}>{children}</Provider>
87
- );
88
-
89
- const { result } = renderHook(() => useModularUIBasic(), { wrapper });
90
- expect(result.error).toBeInstanceOf(IllegalArgumentException);
91
- });
92
-
93
76
  it("useModularUIBasic with reload", () => {
94
77
  expect.assertions(2);
95
78
 
@@ -1,6 +1,6 @@
1
1
  import configureMockStore from "redux-mock-store";
2
2
  import { Provider } from "react-redux";
3
- import { renderHook } from "@testing-library/react-hooks";
3
+ import { renderHook } from "@testing-library/react";
4
4
  import { useNotification } from "../useNotification";
5
5
 
6
6
  const mockStore = configureMockStore();
@@ -1,6 +1,6 @@
1
1
  import configureMockStore from "redux-mock-store";
2
2
  import { Provider } from "react-redux";
3
- import { renderHook } from "@testing-library/react-hooks";
3
+ import { renderHook } from "@testing-library/react";
4
4
  import { usePreference } from "../usePreference";
5
5
 
6
6
  const mockStore = configureMockStore();
@@ -1,6 +1,6 @@
1
1
  import configureMockStore from "redux-mock-store";
2
2
  import { Provider } from "react-redux";
3
- import { renderHook } from "@testing-library/react-hooks";
3
+ import { renderHook } from "@testing-library/react";
4
4
  import { useProgressIndicator } from "../useProgressIndicator";
5
5
 
6
6
  const mockStore = configureMockStore();
@@ -887,7 +887,9 @@ var AttributeModel = /*#__PURE__*/function (_BaseModel) {
887
887
 
888
888
  this._serverConstraints = new _ConstraintCollection.default();
889
889
  this.resetErrors();
890
- errors.forEach(function (error) {
890
+ (0, _filter.default)(errors).call(errors, function (error) {
891
+ return error.id !== "Constraint.Mandatory" || !_this3.hasValue();
892
+ }).forEach(function (error) {
891
893
  if (_this3.hasValue()) {
892
894
  _this3._errorCollection.addServerError(error.id, error.message, _this3.formatParameters(error.properties));
893
895
  } else {
@@ -12,7 +12,7 @@ import MandatoryConstraint from "./input-constraints/MandatoryConstraint";
12
12
 
13
13
  import ConceptDetailModel from "../concepts/ConceptDetailModel";
14
14
 
15
- import { MANDATORY, DISABLED } from "../../constants/LayoutHints";
15
+ import { DISABLED, MANDATORY } from "../../constants/LayoutHints";
16
16
  import {
17
17
  ATTRIBUTE_WIDTH,
18
18
  TIMEVERSION_FILTER_NAME,
@@ -804,21 +804,25 @@ export default class AttributeModel
804
804
  this._serverConstraints = new ConstraintCollection();
805
805
  this.resetErrors();
806
806
 
807
- errors.forEach((error) => {
808
- if (this.hasValue()) {
809
- this._errorCollection.addServerError(
810
- error.id,
811
- error.message,
812
- this.formatParameters(error.properties)
813
- );
814
- } else {
815
- this.addServerConstraint(
816
- error.id,
817
- error.message,
818
- this.formatParameters(error.properties)
819
- );
820
- }
821
- });
807
+ errors
808
+ .filter(
809
+ (error) => error.id !== "Constraint.Mandatory" || !this.hasValue()
810
+ )
811
+ .forEach((error) => {
812
+ if (this.hasValue()) {
813
+ this._errorCollection.addServerError(
814
+ error.id,
815
+ error.message,
816
+ this.formatParameters(error.properties)
817
+ );
818
+ } else {
819
+ this.addServerConstraint(
820
+ error.id,
821
+ error.message,
822
+ this.formatParameters(error.properties)
823
+ );
824
+ }
825
+ });
822
826
  }
823
827
 
824
828
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"AttributeModel.js","names":["AttributeModel","attribute","attributeContributions","ConstraintCollection","getSetting","hasContentFromData","content","label","_label","contributions","_initvalue","data","value","_inputvalue","getInitialInputValue","_value","_disabled","layouthint","has","DISABLED","_errorCollection","ErrorCollection","message","addServerError","id","parameters","_referenceDate","getData","DateUtil","now","_isResult","_mandatory","MANDATORY","mandatory","_links","LinkCollection","hasContentConfiguration","conceptLink","models","conceptHref","href","concept","model","selfhref","equalsWithParameters","key","_parentKey","parentKey","type","_hasContentConfiguration","contentConfiguration","hasQuestionConfig","questions","hasConfig","hasEndResultConfig","isConfiguredEndResultAttribute","hasIntermediateResultConfig","isConfiguredIntermediateResultAttribute","configuredLabelProperties","labelConfig","length","types","configuredLabels","getLabelElementByIds","configuredLabel","configuredLabelProperty","some","_id","firstConfiguredLabel","alignmentHints","getByLayoutHint","alignment","substring","defaultAlignment","downloadLink","links","getLinksByGroup","first","getLinkByKey","addParameter","TIMEVERSION_FILTER_NAME","referenceDate","isCacheable","_concept","ConceptDetailModel","date","inputvalue","toString","getInputValue","validate","hasValue","inError","name","getFormData","getValue","updateLastModification","_validatedValue","_readonly","readonly","static","isResult","disabled","getContribution","format","validateValue","constraints","add","_serverConstraints","MandatoryConstraint","minLength","maxLength","StringLengthConstraint","addConstraints","enabled","_useClientsideValidation","useClientsideValidation","isOptionalAndEmpty","_isValid","constraintCollection","undefined","IllegalArgumentException","collection","invalidConstraints","isChangedSince","error","properties","removeServerError","errorCollection","serverErrors","hasItems","defaultMessage","addConstraint","params","forEach","paramKey","paramValue","formatValue","errors","resetErrors","formatParameters","addServerConstraint","_lastModification","Date","timestamp","UnsupportedOperationException","oldAttribute","isValid","update","changedAttribute","_isEditable","isEditable","_isHidden","isHidden","otherAttribute","ATTRIBUTE_WIDTH","MEDIUM","_layoutHintRules","rules","attributes","layoutHintRules","process","hasAllContentInData","AttributeContent","isPlainObject","BaseModel"],"sources":["../../../src/models/attributes/AttributeModel.js"],"sourcesContent":["// @flow\nimport { DateUtil } from \"../../utils/datetime/DateTimeUtil\";\nimport { isPlainObject } from \"../../utils/helpers/objects\";\n\nimport BaseModel from \"../base/BaseModel\";\nimport ConstraintCollection from \"./input-constraints/ConstraintCollection\";\nimport ErrorCollection from \"../error/ErrorCollection\";\nimport LinkCollection from \"../links/LinkCollection\";\n\nimport StringLengthConstraint from \"./input-constraints/StringLengthConstraint\";\nimport MandatoryConstraint from \"./input-constraints/MandatoryConstraint\";\n\nimport ConceptDetailModel from \"../concepts/ConceptDetailModel\";\n\nimport { MANDATORY, DISABLED } from \"../../constants/LayoutHints\";\nimport {\n ATTRIBUTE_WIDTH,\n TIMEVERSION_FILTER_NAME,\n} from \"../../constants/Constants\";\n\nimport { getSetting, hasAllContentInData } from \"../../constants/Settings\";\n\nimport {\n IllegalArgumentException,\n UnsupportedOperationException,\n} from \"../../exceptions\";\n\nimport type { MessageParameters } from \"../../i18n/types\";\nimport type {\n AttributeType,\n FormErrorAnchor,\n IModelWithChildModels,\n ModularUIModel,\n} from \"../types\";\nimport type LinkModel from \"../links/LinkModel\";\nimport type ContentConfiguration from \"../contentconfiguration/ContentConfiguration\";\nimport type ContentConfigurationElements from \"../contentconfiguration/ContentConfigurationElements\";\nimport type LayoutHintRuleCollection from \"./layouthint-rules/LayoutHintRuleCollection\";\nimport type AttributeCollection from \"./AttributeCollection\";\nimport AttributeContent from \"./AttributeContent\";\n\n/**\n * Attribute model, base model for all kind of attributes\n */\nexport default class AttributeModel\n extends BaseModel\n implements IModelWithChildModels\n{\n _label: string;\n _lastModification: number = 0;\n\n _initvalue: any;\n _inputvalue: string;\n _value: any;\n\n _errorCollection: ErrorCollection;\n _serverConstraints: ConstraintCollection = new ConstraintCollection();\n _useClientsideValidation: boolean = getSetting(\"USE_CLIENTSIDE_VALIDATION\");\n _isValid: boolean = true;\n _validatedValue: string | null;\n _isEditable: boolean = false;\n _concept: ConceptDetailModel | null = null;\n _referenceDate: ISO_DATE;\n _isResult: boolean;\n _isHidden: boolean = false;\n _readonly: boolean;\n _disabled: boolean = false;\n _mandatory: boolean;\n _links: LinkCollection;\n _parentKey: ?string;\n _hasContentConfiguration: boolean;\n _layoutHintRules: LayoutHintRuleCollection;\n\n /**\n */\n constructor(attribute: Object, attributeContributions: Object) {\n super(attribute, attributeContributions);\n\n if (this.hasContentFromData && this.content.label) {\n this._label = this.content.label;\n } else {\n this._label = this.contributions.label;\n }\n\n this._initvalue = this.data.value;\n this._inputvalue = this.getInitialInputValue(this.data.value);\n this._value = this.data.value;\n this._disabled = this.layouthint.has(DISABLED);\n\n this._errorCollection = new ErrorCollection(\"attribute\");\n if (attribute && attribute.message) {\n this._errorCollection.addServerError(\n attribute.message.id,\n attribute.message.message,\n attribute.message.parameters\n );\n }\n\n this._referenceDate = this.getData(\"referenceDate\", DateUtil.now());\n\n this._isResult = this.getData(\"isResult\", false);\n\n this._mandatory =\n this.layouthint.has(MANDATORY) || this.contributions.mandatory;\n\n this._links = new LinkCollection(\n this.data._links,\n this.contributions._links\n );\n }\n\n /**\n */\n static isApplicableModel(contributions: Object): boolean {\n if (!isPlainObject(contributions)) {\n throw new IllegalArgumentException(\n \"Given argument for isApplicableModel is not a contributions object\"\n );\n }\n\n return false;\n }\n\n /**\n * Retrieve initial input value\n */\n getInitialInputValue(value: any): any {\n return value;\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n if (\n !this.hasContentFromData &&\n this.hasContentConfiguration &&\n this.conceptLink\n ) {\n return [this.conceptLink];\n }\n return [];\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n const conceptHref = this.conceptLink?.href;\n if (conceptHref) {\n this.concept = models.find((model) =>\n model.selfhref.equalsWithParameters(conceptHref)\n );\n }\n }\n\n /**\n * Getting the attribute key\n */\n get key(): string {\n return this.data.key;\n }\n\n /**\n */\n get parentKey(): string {\n return this._parentKey || \"\";\n }\n\n /**\n */\n set parentKey(parentKey: string) {\n this._parentKey = parentKey;\n }\n\n /**\n * Getting the attribute name\n */\n get name(): string {\n return this.key;\n }\n\n /**\n * Getting the type of the attribute\n */\n get type(): string {\n return this.contributions.type;\n }\n\n /**\n * Getting the label of the attribute\n */\n get label(): string {\n return this._label || \"\";\n }\n\n /**\n * Set the label of this attribute\n */\n set label(label: string) {\n this._label = label;\n }\n\n /**\n */\n set hasContentConfiguration(hasContentConfiguration: boolean) {\n this._hasContentConfiguration = hasContentConfiguration;\n }\n\n /**\n */\n get hasContentConfiguration(): boolean {\n return this._hasContentConfiguration || false;\n }\n\n /**\n */\n indicateContentConfiguration(contentConfiguration: ContentConfiguration) {\n if (contentConfiguration) {\n const hasQuestionConfig = contentConfiguration.questions?.hasConfig();\n\n const hasEndResultConfig =\n contentConfiguration.isConfiguredEndResultAttribute(this.key);\n const hasIntermediateResultConfig =\n contentConfiguration.isConfiguredIntermediateResultAttribute(this.key);\n\n this.hasContentConfiguration =\n hasQuestionConfig || hasEndResultConfig || hasIntermediateResultConfig;\n }\n }\n\n /**\n * Retrieve the first permitted label to render when a concept and contentConfiguration is available\n * Be aware that permission could be in place for labels from a concept.\n */\n getContentConfiguredLabel(\n contentConfiguration: ?ContentConfigurationElements\n ): string {\n if (this.hasContentFromData) {\n return this.content.label ?? this.label;\n }\n\n const configuredLabelProperties =\n contentConfiguration && contentConfiguration.labelConfig.length > 0\n ? contentConfiguration.labelConfig[0].types\n : [];\n\n if (this.concept && configuredLabelProperties.length > 0) {\n const configuredLabels = this.concept\n .getLabelElementByIds(configuredLabelProperties)\n .filter(\n (configuredLabel) =>\n configuredLabel.value && configuredLabel.value !== \"\"\n );\n\n if (configuredLabels.length > 0) {\n const [firstConfiguredLabel] = configuredLabelProperties\n .filter((configuredLabelProperty) =>\n configuredLabels.some(\n (configuredLabel) =>\n configuredLabel._id === configuredLabelProperty\n )\n )\n .map((configuredLabelProperty) =>\n configuredLabels.find(\n (configuredLabel) =>\n configuredLabel._id === configuredLabelProperty\n )\n );\n\n if (firstConfiguredLabel) {\n return firstConfiguredLabel.value;\n }\n }\n }\n\n return this.label;\n }\n\n /**\n */\n get defaultAlignment(): \"left\" | \"center\" | \"right\" {\n return \"left\";\n }\n\n /**\n * Handles layout hint align-left, align-center and align-right\n */\n get alignment(): \"left\" | \"center\" | \"right\" {\n const alignmentHints = this.layouthint.getByLayoutHint(\"align-\");\n\n // return alignment based on layouthint or the default alignment for the attribute\n const alignment = alignmentHints\n ? alignmentHints.substring(\"align-\".length)\n : this.defaultAlignment;\n\n if (\n alignment === \"left\" ||\n alignment === \"center\" ||\n alignment === \"right\"\n ) {\n return alignment;\n }\n\n return this.defaultAlignment;\n }\n\n /**\n * Retrieve links of attribute\n */\n get links(): LinkCollection {\n if (!this._links) {\n this._links = new LinkCollection(\n this.data._links,\n this.contributions._links\n );\n }\n\n return this._links;\n }\n\n /**\n * Retrieve link of attribute when available\n */\n get downloadLink(): ?LinkModel {\n const downloadLink = this.links.getLinksByGroup(\"download\").first;\n\n if (downloadLink && downloadLink.key === this.key) {\n return downloadLink;\n }\n\n return null;\n }\n\n /**\n * Retrieve concept link of attribute when available\n */\n get conceptLink(): ?LinkModel {\n const conceptLink = this.links.getLinkByKey(\"concept\");\n\n if (conceptLink !== null) {\n conceptLink.href = conceptLink.href.addParameter(\n TIMEVERSION_FILTER_NAME,\n this.referenceDate\n );\n\n conceptLink.isCacheable = true;\n }\n\n return conceptLink;\n }\n\n /**\n * Get concept information\n */\n get concept(): ConceptDetailModel | null {\n return this._concept ?? null;\n }\n\n /**\n * Set the concept\n */\n set concept(concept: ?ModularUIModel) {\n this._concept = concept instanceof ConceptDetailModel ? concept : null;\n }\n\n /**\n * Retrieve reference date of attribute which can be used as entryDate for content\n * to get information in correct time version\n */\n get referenceDate(): ISO_DATE {\n return this._referenceDate;\n }\n\n /**\n * Set reference date for concepts and content\n */\n set referenceDate(date: ISO_DATE) {\n this._referenceDate = date;\n }\n\n /**\n * Initial value received from the modular ui service\n */\n get initvalue(): any {\n return this._initvalue;\n }\n\n /**\n * Retrieve input value\n */\n getInputValue(): string {\n const inputvalue = this._inputvalue;\n\n return inputvalue ? inputvalue.toString() : \"\";\n }\n\n /**\n * Returns the value as entered by the user. This can differ from the internal iso value that is stored\n */\n get inputvalue(): string {\n return this.getInputValue();\n }\n\n /**\n * Value that is used when retrieving an error collection of this attribute\n * Mostly this is the input value, but sometimes a different value is needed,\n * for example iban and postcode need to validate length without spaces\n */\n get validateValue(): string {\n return this.inputvalue;\n }\n\n /**\n * Sets the input value to the value entered by the user\n */\n set inputvalue(value: string) {\n this._inputvalue = value;\n this.value = value;\n\n this.validate(value);\n }\n\n /**\n */\n hasValue(): boolean {\n return this._value != null && this._value !== \"\";\n }\n\n /**\n * Getting the value of the attribute\n */\n getValue(): any {\n return this.hasValue() ? this._value : null;\n }\n\n /**\n * Getting data ready to be send to the modular ui\n * Returns null when the attribute should not be send to the server\n */\n getFormData(): { [string]: any } | null {\n if (this.inError()) {\n return null;\n }\n\n return {\n [this.name]: this.value,\n };\n }\n\n /**\n */\n get formdata(): { [string]: any } | null {\n return this.getFormData();\n }\n\n /**\n */\n getEmptyFormData(): { [string]: null } {\n return { [this.name]: null };\n }\n\n /**\n * Getting the value of the attribute\n */\n get value(): any {\n return this.getValue();\n }\n\n /**\n * Setting a value in the element\n */\n set value(value: ?string) {\n this.updateLastModification();\n\n this._value = value;\n }\n\n /**\n */\n formatValue(value: string): string {\n return value;\n }\n\n /**\n * Getting the readonly value, iso value converted for human reading\n */\n get readonlyvalue(): string {\n return this.value ? this.value.toString() : \"\";\n }\n\n /**\n * Getting mandatory status of attribute\n */\n get mandatory(): boolean {\n return this._mandatory || false;\n }\n\n /**\n */\n get configuredMandatory(): ?boolean {\n return this.layouthint.has(MANDATORY) || this.contributions.mandatory;\n }\n\n /**\n * Set mandatory status of attribute\n */\n set mandatory(mandatory: boolean) {\n if (mandatory !== this._mandatory) {\n this._validatedValue = null;\n }\n this._mandatory = mandatory;\n }\n\n /**\n */\n get readonly(): boolean {\n return (\n this._readonly ||\n this.contributions.readonly === true ||\n this.data.static === true ||\n this.isResult === true\n );\n }\n\n /**\n */\n set readonly(readonly: boolean) {\n this._readonly = readonly;\n }\n\n /**\n */\n get disabled(): boolean {\n return this._disabled;\n }\n\n /**\n */\n set disabled(disabled: boolean) {\n this._disabled = disabled;\n }\n\n /**\n */\n get isResult(): boolean {\n return this._isResult;\n }\n\n /**\n */\n set isResult(isResult: boolean) {\n this._isResult = isResult;\n }\n\n /**\n * Getting the display and input format of a attribute\n */\n get format(): string | null {\n return this.getContribution(\"format\");\n }\n\n /**\n */\n get formatLabel(): string {\n return this.format || \"\";\n }\n\n /**\n * Get minimum string length\n */\n get minLength(): number | null {\n return this.getContribution(\"minLength\");\n }\n\n /**\n * Get maximum string length\n */\n get maxLength(): number | null {\n return this.getContribution(\"maxLength\");\n }\n\n /**\n */\n get operator(): string {\n return \"\";\n }\n\n /**\n * Get assistant message\n */\n get assistantMessage(): string | null {\n return this.getContribution(\"assistant\");\n }\n\n /**\n * Get valid status\n */\n get isValid(): boolean {\n return this.validate(this.validateValue);\n }\n\n /**\n * Retrieve applicable constraint for this attribute\n */\n get constraintCollection(): ConstraintCollection {\n const constraints = new ConstraintCollection();\n\n constraints.add(this._serverConstraints);\n\n // Mandatory constraint\n if (this.mandatory) {\n constraints.add(new MandatoryConstraint());\n }\n\n if (this.minLength || this.maxLength) {\n constraints.add(\n new StringLengthConstraint(this.minLength, this.maxLength)\n );\n }\n\n constraints.add(this.addConstraints());\n\n return constraints;\n }\n\n /**\n * Template method for class extending this model to add extra constraints\n * @abstract\n */\n addConstraints(): ConstraintCollection {\n return new ConstraintCollection();\n }\n\n /**\n * Used to programmatically overwrite the setting USE_CLIENTSIDE_VALIDATION\n */\n setUseClientsideValidation(enabled: boolean) {\n this._useClientsideValidation = enabled;\n }\n\n /**\n * Indicates if client side validation is enabled\n * @returns {boolean}\n */\n useClientsideValidation(): boolean {\n return this._useClientsideValidation ?? true;\n }\n\n /**\n * Validate input on client side constraint\n */\n validate(value: string): boolean {\n // when client side validation is disabled, this attribute is always valid\n if (!this.useClientsideValidation()) {\n return true;\n }\n\n if (this.isOptionalAndEmpty(value)) {\n this._isValid = true;\n } else if (this._validatedValue !== value) {\n this._isValid = this.constraintCollection.validate(value);\n }\n this._validatedValue = value;\n\n return this._isValid;\n }\n\n /**\n * Indicates if attribute is optional and empty\n */\n isOptionalAndEmpty(value: string): boolean {\n if (value === undefined) {\n throw new IllegalArgumentException(\n \"isOptionalAndEmpty method needs value argument\"\n );\n }\n\n return !this.mandatory && value === \"\";\n }\n\n /**\n * Retrieve error messages of this attribute\n */\n get errorCollection(): ErrorCollection {\n const collection = new ErrorCollection(\"attribute\", this._errorCollection);\n\n collection.addConstraints(\n this.constraintCollection.invalidConstraints(this.validateValue)\n );\n\n return collection;\n }\n\n /**\n * Check if attribute is in error\n */\n inError(): boolean {\n return !this._isValid && this.isChangedSince(0);\n }\n\n /**\n * Reset static error messages on attribute\n */\n resetErrors() {\n this._errorCollection = new ErrorCollection(\"attribute\");\n }\n\n /**\n * Registers an error that was received from a server response\n */\n addServerError(error: FormErrorAnchor) {\n this._errorCollection.addServerError(\n error.id,\n error.message,\n error.properties\n );\n }\n\n /**\n */\n removeServerError(id: string) {\n this._errorCollection.removeServerError(id);\n }\n\n /**\n */\n hasServerErrors(): boolean {\n return this.errorCollection.serverErrors.length > 0;\n }\n\n /**\n */\n hasErrors(): boolean {\n return this.errorCollection.hasItems;\n }\n\n /**\n * Registers a missing error that was received from the server\n */\n addMissingError() {\n this._errorCollection.addServerError(\"Constraint.Missing\");\n }\n\n /**\n */\n removeMissingError() {\n this.removeServerError(\"Constraint.Missing\");\n }\n\n /**\n */\n addServerConstraint(\n id: string,\n defaultMessage?: string,\n parameters?: MessageParameters\n ) {\n this._serverConstraints.addConstraint(\n id,\n null,\n defaultMessage,\n parameters,\n this.useClientsideValidation()\n );\n }\n\n /**\n */\n formatParameters(parameters: Object): { [string]: string | number } {\n if (parameters == null) {\n return {};\n }\n\n const params = {};\n\n Object.keys(parameters).forEach((paramKey: string) => {\n const paramValue = parameters[paramKey];\n if (paramKey.endsWith(\"-number\") || paramKey.endsWith(\"-date\")) {\n params[paramKey] = this.formatValue(paramValue);\n } else {\n params[paramKey] = paramValue;\n }\n });\n\n return params;\n }\n\n /**\n */\n get hasDynamicValidationData(): boolean {\n return true;\n }\n\n /**\n */\n updateValidations(errors: Array<Object>) {\n if (\n errors.some((error) => error.id === \"Constraint.Mandatory\") ||\n this.layouthint.has(MANDATORY)\n ) {\n this.mandatory = true;\n } else if (!this.hasValue()) {\n this.mandatory = false;\n }\n\n this._serverConstraints = new ConstraintCollection();\n this.resetErrors();\n\n errors.forEach((error) => {\n if (this.hasValue()) {\n this._errorCollection.addServerError(\n error.id,\n error.message,\n this.formatParameters(error.properties)\n );\n } else {\n this.addServerConstraint(\n error.id,\n error.message,\n this.formatParameters(error.properties)\n );\n }\n });\n }\n\n /**\n * Set last modification to current timestamp\n */\n updateLastModification() {\n this._lastModification = Date.now();\n }\n\n /**\n * Inidicates if attribute is changed since a given timestamp (Date.now)\n */\n isChangedSince(timestamp: number): boolean {\n return this._lastModification > timestamp;\n }\n\n /**\n * Abstract reset method which should be implemented on each attribute that has this attribute as a base class.\n *\n * @abstract\n */\n reset() {\n throw new UnsupportedOperationException(\n `Reset method not implemented for ${this.type}`\n );\n }\n\n /**\n * Merge old attribute with the attribute from the server.\n * Readonly attributes always need to show the value from the server\n */\n mergeAttribute(oldAttribute: AttributeType) {\n this.concept = oldAttribute.concept;\n\n if (\n !oldAttribute.readonly &&\n oldAttribute.isValid &&\n oldAttribute.inputvalue !== null\n ) {\n this.update(oldAttribute.inputvalue);\n }\n }\n\n /**\n * Abstract update method which should be implemented on each attribute that has this attribute as a base class.\n * @abstract\n */\n // eslint-disable-next-line no-unused-vars\n update(value: string, changedAttribute?: AttributeType): AttributeType {\n throw new UnsupportedOperationException(\n `Update method not implemented for ${this.type}`\n );\n }\n\n /**\n * Indicate if attribute is editable\n */\n set isEditable(isEditable: boolean) {\n this._isEditable = isEditable;\n }\n\n /**\n * Retrieve if attribute is editable\n */\n get isEditable(): boolean {\n return this._isEditable;\n }\n\n /**\n * Indicates if the attribute is visible\n */\n get isVisible(): boolean {\n return !this._isHidden;\n }\n\n /**\n */\n get isHidden(): boolean {\n return this._isHidden;\n }\n\n /**\n */\n set isHidden(isHidden: boolean) {\n this._isHidden = isHidden;\n }\n\n /**\n * Explicitly toggle visibility of this attribute\n */\n show() {\n this.isHidden = false;\n }\n\n /**\n */\n hide() {\n this.isHidden = true;\n }\n\n /**\n */\n equals(otherAttribute: AttributeType): boolean {\n return (\n this.key === otherAttribute.key &&\n this.parentKey === otherAttribute.parentKey\n );\n }\n\n /**\n * Readonly attribute width indicates the proposed width of this attribute\n */\n get readonlyWidth(): $Keys<typeof ATTRIBUTE_WIDTH> {\n return ATTRIBUTE_WIDTH.MEDIUM;\n }\n\n /**\n */\n get layoutHintRules(): LayoutHintRuleCollection {\n return this._layoutHintRules;\n }\n\n /**\n */\n set layoutHintRules(rules: LayoutHintRuleCollection) {\n this._layoutHintRules = rules;\n }\n\n /**\n */\n processLayoutHintRules(attributes: AttributeCollection) {\n if (this._layoutHintRules) {\n this.layoutHintRules.process(this, attributes);\n }\n }\n\n /**\n * Indicates if content comes from the data service\n */\n get hasContentFromData(): boolean {\n return hasAllContentInData();\n }\n\n /**\n */\n get content(): AttributeContent {\n return new AttributeContent(this.data.content);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AAEA;;AAEA;;AACA;;AAKA;;AAEA;;AAiBA;;;;;;AAEA;AACA;AACA;IACqBA,c;;;;;EA6BnB;AACF;EACE,wBAAYC,SAAZ,EAA+BC,sBAA/B,EAA+D;IAAA;;IAAA;IAC7D,0BAAMD,SAAN,EAAiBC,sBAAjB;IAD6D;IAAA,gGA1BnC,CA0BmC;IAAA;IAAA;IAAA;IAAA;IAAA,iGAnBpB,IAAIC,6BAAJ,EAmBoB;IAAA,uGAlB3B,IAAAC,oBAAA,EAAW,2BAAX,CAkB2B;IAAA,uFAjB3C,IAiB2C;IAAA;IAAA,0FAfxC,KAewC;IAAA,uFAdzB,IAcyB;IAAA;IAAA;IAAA,wFAX1C,KAW0C;IAAA;IAAA,wFAT1C,KAS0C;IAAA;IAAA;IAAA;IAAA;IAAA;;IAG7D,IAAI,MAAKC,kBAAL,IAA2B,MAAKC,OAAL,CAAaC,KAA5C,EAAmD;MACjD,MAAKC,MAAL,GAAc,MAAKF,OAAL,CAAaC,KAA3B;IACD,CAFD,MAEO;MACL,MAAKC,MAAL,GAAc,MAAKC,aAAL,CAAmBF,KAAjC;IACD;;IAED,MAA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;AACA;;;;SACE,eAAmD;MACjD,OAAO2G,0BAAA,CAAgBC,MAAvB;IACD;IAED;AACF;;;;SACE,eAAgD;MAC9C,OAAO,KAAKC,gBAAZ;IACD;IAED;AACF;;SACE,aAAoBC,KAApB,EAAqD;MACnD,KAAKD,gBAAL,GAAwBC,KAAxB;IACD;IAED;AACF;;;;WACE,gCAAuBC,UAAvB,EAAwD;MACtD,IAAI,KAAKF,gBAAT,EAA2B;QACzB,KAAKG,eAAL,CAAqBC,OAArB,CAA6B,IAA7B,EAAmCF,UAAnC;MACD;IACF;IAED;AACF;AACA;;;;SACE,eAAkC;MAChC,OAAO,IAAAG,6BAAA,GAAP;IACD;IAED;AACF;;;;SACE,eAAgC;MAC9B,OAAO,IAAIC,yBAAJ,CAAqB,KAAKvJ,IAAL,CAAUL,OAA/B,CAAP;IACD;;;WAv1BD,2BAAyBG,aAAzB,EAAyD;MACvD,IAAI,CAAC,IAAA0J,sBAAA,EAAc1J,aAAd,CAAL,EAAmC;QACjC,MAAM,IAAI+G,oCAAJ,CACJ,oEADI,CAAN;MAGD;;MAED,OAAO,KAAP;IACD;;;EA5EO4C,mB"}
1
+ {"version":3,"file":"AttributeModel.js","names":["AttributeModel","attribute","attributeContributions","ConstraintCollection","getSetting","hasContentFromData","content","label","_label","contributions","_initvalue","data","value","_inputvalue","getInitialInputValue","_value","_disabled","layouthint","has","DISABLED","_errorCollection","ErrorCollection","message","addServerError","id","parameters","_referenceDate","getData","DateUtil","now","_isResult","_mandatory","MANDATORY","mandatory","_links","LinkCollection","hasContentConfiguration","conceptLink","models","conceptHref","href","concept","model","selfhref","equalsWithParameters","key","_parentKey","parentKey","type","_hasContentConfiguration","contentConfiguration","hasQuestionConfig","questions","hasConfig","hasEndResultConfig","isConfiguredEndResultAttribute","hasIntermediateResultConfig","isConfiguredIntermediateResultAttribute","configuredLabelProperties","labelConfig","length","types","configuredLabels","getLabelElementByIds","configuredLabel","configuredLabelProperty","some","_id","firstConfiguredLabel","alignmentHints","getByLayoutHint","alignment","substring","defaultAlignment","downloadLink","links","getLinksByGroup","first","getLinkByKey","addParameter","TIMEVERSION_FILTER_NAME","referenceDate","isCacheable","_concept","ConceptDetailModel","date","inputvalue","toString","getInputValue","validate","hasValue","inError","name","getFormData","getValue","updateLastModification","_validatedValue","_readonly","readonly","static","isResult","disabled","getContribution","format","validateValue","constraints","add","_serverConstraints","MandatoryConstraint","minLength","maxLength","StringLengthConstraint","addConstraints","enabled","_useClientsideValidation","useClientsideValidation","isOptionalAndEmpty","_isValid","constraintCollection","undefined","IllegalArgumentException","collection","invalidConstraints","isChangedSince","error","properties","removeServerError","errorCollection","serverErrors","hasItems","defaultMessage","addConstraint","params","forEach","paramKey","paramValue","formatValue","errors","resetErrors","formatParameters","addServerConstraint","_lastModification","Date","timestamp","UnsupportedOperationException","oldAttribute","isValid","update","changedAttribute","_isEditable","isEditable","_isHidden","isHidden","otherAttribute","ATTRIBUTE_WIDTH","MEDIUM","_layoutHintRules","rules","attributes","layoutHintRules","process","hasAllContentInData","AttributeContent","isPlainObject","BaseModel"],"sources":["../../../src/models/attributes/AttributeModel.js"],"sourcesContent":["// @flow\nimport { DateUtil } from \"../../utils/datetime/DateTimeUtil\";\nimport { isPlainObject } from \"../../utils/helpers/objects\";\n\nimport BaseModel from \"../base/BaseModel\";\nimport ConstraintCollection from \"./input-constraints/ConstraintCollection\";\nimport ErrorCollection from \"../error/ErrorCollection\";\nimport LinkCollection from \"../links/LinkCollection\";\n\nimport StringLengthConstraint from \"./input-constraints/StringLengthConstraint\";\nimport MandatoryConstraint from \"./input-constraints/MandatoryConstraint\";\n\nimport ConceptDetailModel from \"../concepts/ConceptDetailModel\";\n\nimport { DISABLED, MANDATORY } from \"../../constants/LayoutHints\";\nimport {\n ATTRIBUTE_WIDTH,\n TIMEVERSION_FILTER_NAME,\n} from \"../../constants/Constants\";\n\nimport { getSetting, hasAllContentInData } from \"../../constants/Settings\";\n\nimport {\n IllegalArgumentException,\n UnsupportedOperationException,\n} from \"../../exceptions\";\n\nimport type { MessageParameters } from \"../../i18n/types\";\nimport type {\n AttributeType,\n FormErrorAnchor,\n IModelWithChildModels,\n ModularUIModel,\n} from \"../types\";\nimport type LinkModel from \"../links/LinkModel\";\nimport type ContentConfiguration from \"../contentconfiguration/ContentConfiguration\";\nimport type ContentConfigurationElements from \"../contentconfiguration/ContentConfigurationElements\";\nimport type LayoutHintRuleCollection from \"./layouthint-rules/LayoutHintRuleCollection\";\nimport type AttributeCollection from \"./AttributeCollection\";\nimport AttributeContent from \"./AttributeContent\";\n\n/**\n * Attribute model, base model for all kind of attributes\n */\nexport default class AttributeModel\n extends BaseModel\n implements IModelWithChildModels\n{\n _label: string;\n _lastModification: number = 0;\n\n _initvalue: any;\n _inputvalue: string;\n _value: any;\n\n _errorCollection: ErrorCollection;\n _serverConstraints: ConstraintCollection = new ConstraintCollection();\n _useClientsideValidation: boolean = getSetting(\"USE_CLIENTSIDE_VALIDATION\");\n _isValid: boolean = true;\n _validatedValue: string | null;\n _isEditable: boolean = false;\n _concept: ConceptDetailModel | null = null;\n _referenceDate: ISO_DATE;\n _isResult: boolean;\n _isHidden: boolean = false;\n _readonly: boolean;\n _disabled: boolean = false;\n _mandatory: boolean;\n _links: LinkCollection;\n _parentKey: ?string;\n _hasContentConfiguration: boolean;\n _layoutHintRules: LayoutHintRuleCollection;\n\n /**\n */\n constructor(attribute: Object, attributeContributions: Object) {\n super(attribute, attributeContributions);\n\n if (this.hasContentFromData && this.content.label) {\n this._label = this.content.label;\n } else {\n this._label = this.contributions.label;\n }\n\n this._initvalue = this.data.value;\n this._inputvalue = this.getInitialInputValue(this.data.value);\n this._value = this.data.value;\n this._disabled = this.layouthint.has(DISABLED);\n\n this._errorCollection = new ErrorCollection(\"attribute\");\n if (attribute && attribute.message) {\n this._errorCollection.addServerError(\n attribute.message.id,\n attribute.message.message,\n attribute.message.parameters\n );\n }\n\n this._referenceDate = this.getData(\"referenceDate\", DateUtil.now());\n\n this._isResult = this.getData(\"isResult\", false);\n\n this._mandatory =\n this.layouthint.has(MANDATORY) || this.contributions.mandatory;\n\n this._links = new LinkCollection(\n this.data._links,\n this.contributions._links\n );\n }\n\n /**\n */\n static isApplicableModel(contributions: Object): boolean {\n if (!isPlainObject(contributions)) {\n throw new IllegalArgumentException(\n \"Given argument for isApplicableModel is not a contributions object\"\n );\n }\n\n return false;\n }\n\n /**\n * Retrieve initial input value\n */\n getInitialInputValue(value: any): any {\n return value;\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n if (\n !this.hasContentFromData &&\n this.hasContentConfiguration &&\n this.conceptLink\n ) {\n return [this.conceptLink];\n }\n return [];\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n const conceptHref = this.conceptLink?.href;\n if (conceptHref) {\n this.concept = models.find((model) =>\n model.selfhref.equalsWithParameters(conceptHref)\n );\n }\n }\n\n /**\n * Getting the attribute key\n */\n get key(): string {\n return this.data.key;\n }\n\n /**\n */\n get parentKey(): string {\n return this._parentKey || \"\";\n }\n\n /**\n */\n set parentKey(parentKey: string) {\n this._parentKey = parentKey;\n }\n\n /**\n * Getting the attribute name\n */\n get name(): string {\n return this.key;\n }\n\n /**\n * Getting the type of the attribute\n */\n get type(): string {\n return this.contributions.type;\n }\n\n /**\n * Getting the label of the attribute\n */\n get label(): string {\n return this._label || \"\";\n }\n\n /**\n * Set the label of this attribute\n */\n set label(label: string) {\n this._label = label;\n }\n\n /**\n */\n set hasContentConfiguration(hasContentConfiguration: boolean) {\n this._hasContentConfiguration = hasContentConfiguration;\n }\n\n /**\n */\n get hasContentConfiguration(): boolean {\n return this._hasContentConfiguration || false;\n }\n\n /**\n */\n indicateContentConfiguration(contentConfiguration: ContentConfiguration) {\n if (contentConfiguration) {\n const hasQuestionConfig = contentConfiguration.questions?.hasConfig();\n\n const hasEndResultConfig =\n contentConfiguration.isConfiguredEndResultAttribute(this.key);\n const hasIntermediateResultConfig =\n contentConfiguration.isConfiguredIntermediateResultAttribute(this.key);\n\n this.hasContentConfiguration =\n hasQuestionConfig || hasEndResultConfig || hasIntermediateResultConfig;\n }\n }\n\n /**\n * Retrieve the first permitted label to render when a concept and contentConfiguration is available\n * Be aware that permission could be in place for labels from a concept.\n */\n getContentConfiguredLabel(\n contentConfiguration: ?ContentConfigurationElements\n ): string {\n if (this.hasContentFromData) {\n return this.content.label ?? this.label;\n }\n\n const configuredLabelProperties =\n contentConfiguration && contentConfiguration.labelConfig.length > 0\n ? contentConfiguration.labelConfig[0].types\n : [];\n\n if (this.concept && configuredLabelProperties.length > 0) {\n const configuredLabels = this.concept\n .getLabelElementByIds(configuredLabelProperties)\n .filter(\n (configuredLabel) =>\n configuredLabel.value && configuredLabel.value !== \"\"\n );\n\n if (configuredLabels.length > 0) {\n const [firstConfiguredLabel] = configuredLabelProperties\n .filter((configuredLabelProperty) =>\n configuredLabels.some(\n (configuredLabel) =>\n configuredLabel._id === configuredLabelProperty\n )\n )\n .map((configuredLabelProperty) =>\n configuredLabels.find(\n (configuredLabel) =>\n configuredLabel._id === configuredLabelProperty\n )\n );\n\n if (firstConfiguredLabel) {\n return firstConfiguredLabel.value;\n }\n }\n }\n\n return this.label;\n }\n\n /**\n */\n get defaultAlignment(): \"left\" | \"center\" | \"right\" {\n return \"left\";\n }\n\n /**\n * Handles layout hint align-left, align-center and align-right\n */\n get alignment(): \"left\" | \"center\" | \"right\" {\n const alignmentHints = this.layouthint.getByLayoutHint(\"align-\");\n\n // return alignment based on layouthint or the default alignment for the attribute\n const alignment = alignmentHints\n ? alignmentHints.substring(\"align-\".length)\n : this.defaultAlignment;\n\n if (\n alignment === \"left\" ||\n alignment === \"center\" ||\n alignment === \"right\"\n ) {\n return alignment;\n }\n\n return this.defaultAlignment;\n }\n\n /**\n * Retrieve links of attribute\n */\n get links(): LinkCollection {\n if (!this._links) {\n this._links = new LinkCollection(\n this.data._links,\n this.contributions._links\n );\n }\n\n return this._links;\n }\n\n /**\n * Retrieve link of attribute when available\n */\n get downloadLink(): ?LinkModel {\n const downloadLink = this.links.getLinksByGroup(\"download\").first;\n\n if (downloadLink && downloadLink.key === this.key) {\n return downloadLink;\n }\n\n return null;\n }\n\n /**\n * Retrieve concept link of attribute when available\n */\n get conceptLink(): ?LinkModel {\n const conceptLink = this.links.getLinkByKey(\"concept\");\n\n if (conceptLink !== null) {\n conceptLink.href = conceptLink.href.addParameter(\n TIMEVERSION_FILTER_NAME,\n this.referenceDate\n );\n\n conceptLink.isCacheable = true;\n }\n\n return conceptLink;\n }\n\n /**\n * Get concept information\n */\n get concept(): ConceptDetailModel | null {\n return this._concept ?? null;\n }\n\n /**\n * Set the concept\n */\n set concept(concept: ?ModularUIModel) {\n this._concept = concept instanceof ConceptDetailModel ? concept : null;\n }\n\n /**\n * Retrieve reference date of attribute which can be used as entryDate for content\n * to get information in correct time version\n */\n get referenceDate(): ISO_DATE {\n return this._referenceDate;\n }\n\n /**\n * Set reference date for concepts and content\n */\n set referenceDate(date: ISO_DATE) {\n this._referenceDate = date;\n }\n\n /**\n * Initial value received from the modular ui service\n */\n get initvalue(): any {\n return this._initvalue;\n }\n\n /**\n * Retrieve input value\n */\n getInputValue(): string {\n const inputvalue = this._inputvalue;\n\n return inputvalue ? inputvalue.toString() : \"\";\n }\n\n /**\n * Returns the value as entered by the user. This can differ from the internal iso value that is stored\n */\n get inputvalue(): string {\n return this.getInputValue();\n }\n\n /**\n * Value that is used when retrieving an error collection of this attribute\n * Mostly this is the input value, but sometimes a different value is needed,\n * for example iban and postcode need to validate length without spaces\n */\n get validateValue(): string {\n return this.inputvalue;\n }\n\n /**\n * Sets the input value to the value entered by the user\n */\n set inputvalue(value: string) {\n this._inputvalue = value;\n this.value = value;\n\n this.validate(value);\n }\n\n /**\n */\n hasValue(): boolean {\n return this._value != null && this._value !== \"\";\n }\n\n /**\n * Getting the value of the attribute\n */\n getValue(): any {\n return this.hasValue() ? this._value : null;\n }\n\n /**\n * Getting data ready to be send to the modular ui\n * Returns null when the attribute should not be send to the server\n */\n getFormData(): { [string]: any } | null {\n if (this.inError()) {\n return null;\n }\n\n return {\n [this.name]: this.value,\n };\n }\n\n /**\n */\n get formdata(): { [string]: any } | null {\n return this.getFormData();\n }\n\n /**\n */\n getEmptyFormData(): { [string]: null } {\n return { [this.name]: null };\n }\n\n /**\n * Getting the value of the attribute\n */\n get value(): any {\n return this.getValue();\n }\n\n /**\n * Setting a value in the element\n */\n set value(value: ?string) {\n this.updateLastModification();\n\n this._value = value;\n }\n\n /**\n */\n formatValue(value: string): string {\n return value;\n }\n\n /**\n * Getting the readonly value, iso value converted for human reading\n */\n get readonlyvalue(): string {\n return this.value ? this.value.toString() : \"\";\n }\n\n /**\n * Getting mandatory status of attribute\n */\n get mandatory(): boolean {\n return this._mandatory || false;\n }\n\n /**\n */\n get configuredMandatory(): ?boolean {\n return this.layouthint.has(MANDATORY) || this.contributions.mandatory;\n }\n\n /**\n * Set mandatory status of attribute\n */\n set mandatory(mandatory: boolean) {\n if (mandatory !== this._mandatory) {\n this._validatedValue = null;\n }\n this._mandatory = mandatory;\n }\n\n /**\n */\n get readonly(): boolean {\n return (\n this._readonly ||\n this.contributions.readonly === true ||\n this.data.static === true ||\n this.isResult === true\n );\n }\n\n /**\n */\n set readonly(readonly: boolean) {\n this._readonly = readonly;\n }\n\n /**\n */\n get disabled(): boolean {\n return this._disabled;\n }\n\n /**\n */\n set disabled(disabled: boolean) {\n this._disabled = disabled;\n }\n\n /**\n */\n get isResult(): boolean {\n return this._isResult;\n }\n\n /**\n */\n set isResult(isResult: boolean) {\n this._isResult = isResult;\n }\n\n /**\n * Getting the display and input format of a attribute\n */\n get format(): string | null {\n return this.getContribution(\"format\");\n }\n\n /**\n */\n get formatLabel(): string {\n return this.format || \"\";\n }\n\n /**\n * Get minimum string length\n */\n get minLength(): number | null {\n return this.getContribution(\"minLength\");\n }\n\n /**\n * Get maximum string length\n */\n get maxLength(): number | null {\n return this.getContribution(\"maxLength\");\n }\n\n /**\n */\n get operator(): string {\n return \"\";\n }\n\n /**\n * Get assistant message\n */\n get assistantMessage(): string | null {\n return this.getContribution(\"assistant\");\n }\n\n /**\n * Get valid status\n */\n get isValid(): boolean {\n return this.validate(this.validateValue);\n }\n\n /**\n * Retrieve applicable constraint for this attribute\n */\n get constraintCollection(): ConstraintCollection {\n const constraints = new ConstraintCollection();\n\n constraints.add(this._serverConstraints);\n\n // Mandatory constraint\n if (this.mandatory) {\n constraints.add(new MandatoryConstraint());\n }\n\n if (this.minLength || this.maxLength) {\n constraints.add(\n new StringLengthConstraint(this.minLength, this.maxLength)\n );\n }\n\n constraints.add(this.addConstraints());\n\n return constraints;\n }\n\n /**\n * Template method for class extending this model to add extra constraints\n * @abstract\n */\n addConstraints(): ConstraintCollection {\n return new ConstraintCollection();\n }\n\n /**\n * Used to programmatically overwrite the setting USE_CLIENTSIDE_VALIDATION\n */\n setUseClientsideValidation(enabled: boolean) {\n this._useClientsideValidation = enabled;\n }\n\n /**\n * Indicates if client side validation is enabled\n * @returns {boolean}\n */\n useClientsideValidation(): boolean {\n return this._useClientsideValidation ?? true;\n }\n\n /**\n * Validate input on client side constraint\n */\n validate(value: string): boolean {\n // when client side validation is disabled, this attribute is always valid\n if (!this.useClientsideValidation()) {\n return true;\n }\n\n if (this.isOptionalAndEmpty(value)) {\n this._isValid = true;\n } else if (this._validatedValue !== value) {\n this._isValid = this.constraintCollection.validate(value);\n }\n this._validatedValue = value;\n\n return this._isValid;\n }\n\n /**\n * Indicates if attribute is optional and empty\n */\n isOptionalAndEmpty(value: string): boolean {\n if (value === undefined) {\n throw new IllegalArgumentException(\n \"isOptionalAndEmpty method needs value argument\"\n );\n }\n\n return !this.mandatory && value === \"\";\n }\n\n /**\n * Retrieve error messages of this attribute\n */\n get errorCollection(): ErrorCollection {\n const collection = new ErrorCollection(\"attribute\", this._errorCollection);\n\n collection.addConstraints(\n this.constraintCollection.invalidConstraints(this.validateValue)\n );\n\n return collection;\n }\n\n /**\n * Check if attribute is in error\n */\n inError(): boolean {\n return !this._isValid && this.isChangedSince(0);\n }\n\n /**\n * Reset static error messages on attribute\n */\n resetErrors() {\n this._errorCollection = new ErrorCollection(\"attribute\");\n }\n\n /**\n * Registers an error that was received from a server response\n */\n addServerError(error: FormErrorAnchor) {\n this._errorCollection.addServerError(\n error.id,\n error.message,\n error.properties\n );\n }\n\n /**\n */\n removeServerError(id: string) {\n this._errorCollection.removeServerError(id);\n }\n\n /**\n */\n hasServerErrors(): boolean {\n return this.errorCollection.serverErrors.length > 0;\n }\n\n /**\n */\n hasErrors(): boolean {\n return this.errorCollection.hasItems;\n }\n\n /**\n * Registers a missing error that was received from the server\n */\n addMissingError() {\n this._errorCollection.addServerError(\"Constraint.Missing\");\n }\n\n /**\n */\n removeMissingError() {\n this.removeServerError(\"Constraint.Missing\");\n }\n\n /**\n */\n addServerConstraint(\n id: string,\n defaultMessage?: string,\n parameters?: MessageParameters\n ) {\n this._serverConstraints.addConstraint(\n id,\n null,\n defaultMessage,\n parameters,\n this.useClientsideValidation()\n );\n }\n\n /**\n */\n formatParameters(parameters: Object): { [string]: string | number } {\n if (parameters == null) {\n return {};\n }\n\n const params = {};\n\n Object.keys(parameters).forEach((paramKey: string) => {\n const paramValue = parameters[paramKey];\n if (paramKey.endsWith(\"-number\") || paramKey.endsWith(\"-date\")) {\n params[paramKey] = this.formatValue(paramValue);\n } else {\n params[paramKey] = paramValue;\n }\n });\n\n return params;\n }\n\n /**\n */\n get hasDynamicValidationData(): boolean {\n return true;\n }\n\n /**\n */\n updateValidations(errors: Array<Object>) {\n if (\n errors.some((error) => error.id === \"Constraint.Mandatory\") ||\n this.layouthint.has(MANDATORY)\n ) {\n this.mandatory = true;\n } else if (!this.hasValue()) {\n this.mandatory = false;\n }\n\n this._serverConstraints = new ConstraintCollection();\n this.resetErrors();\n\n errors\n .filter(\n (error) => error.id !== \"Constraint.Mandatory\" || !this.hasValue()\n )\n .forEach((error) => {\n if (this.hasValue()) {\n this._errorCollection.addServerError(\n error.id,\n error.message,\n this.formatParameters(error.properties)\n );\n } else {\n this.addServerConstraint(\n error.id,\n error.message,\n this.formatParameters(error.properties)\n );\n }\n });\n }\n\n /**\n * Set last modification to current timestamp\n */\n updateLastModification() {\n this._lastModification = Date.now();\n }\n\n /**\n * Inidicates if attribute is changed since a given timestamp (Date.now)\n */\n isChangedSince(timestamp: number): boolean {\n return this._lastModification > timestamp;\n }\n\n /**\n * Abstract reset method which should be implemented on each attribute that has this attribute as a base class.\n *\n * @abstract\n */\n reset() {\n throw new UnsupportedOperationException(\n `Reset method not implemented for ${this.type}`\n );\n }\n\n /**\n * Merge old attribute with the attribute from the server.\n * Readonly attributes always need to show the value from the server\n */\n mergeAttribute(oldAttribute: AttributeType) {\n this.concept = oldAttribute.concept;\n\n if (\n !oldAttribute.readonly &&\n oldAttribute.isValid &&\n oldAttribute.inputvalue !== null\n ) {\n this.update(oldAttribute.inputvalue);\n }\n }\n\n /**\n * Abstract update method which should be implemented on each attribute that has this attribute as a base class.\n * @abstract\n */\n // eslint-disable-next-line no-unused-vars\n update(value: string, changedAttribute?: AttributeType): AttributeType {\n throw new UnsupportedOperationException(\n `Update method not implemented for ${this.type}`\n );\n }\n\n /**\n * Indicate if attribute is editable\n */\n set isEditable(isEditable: boolean) {\n this._isEditable = isEditable;\n }\n\n /**\n * Retrieve if attribute is editable\n */\n get isEditable(): boolean {\n return this._isEditable;\n }\n\n /**\n * Indicates if the attribute is visible\n */\n get isVisible(): boolean {\n return !this._isHidden;\n }\n\n /**\n */\n get isHidden(): boolean {\n return this._isHidden;\n }\n\n /**\n */\n set isHidden(isHidden: boolean) {\n this._isHidden = isHidden;\n }\n\n /**\n * Explicitly toggle visibility of this attribute\n */\n show() {\n this.isHidden = false;\n }\n\n /**\n */\n hide() {\n this.isHidden = true;\n }\n\n /**\n */\n equals(otherAttribute: AttributeType): boolean {\n return (\n this.key === otherAttribute.key &&\n this.parentKey === otherAttribute.parentKey\n );\n }\n\n /**\n * Readonly attribute width indicates the proposed width of this attribute\n */\n get readonlyWidth(): $Keys<typeof ATTRIBUTE_WIDTH> {\n return ATTRIBUTE_WIDTH.MEDIUM;\n }\n\n /**\n */\n get layoutHintRules(): LayoutHintRuleCollection {\n return this._layoutHintRules;\n }\n\n /**\n */\n set layoutHintRules(rules: LayoutHintRuleCollection) {\n this._layoutHintRules = rules;\n }\n\n /**\n */\n processLayoutHintRules(attributes: AttributeCollection) {\n if (this._layoutHintRules) {\n this.layoutHintRules.process(this, attributes);\n }\n }\n\n /**\n * Indicates if content comes from the data service\n */\n get hasContentFromData(): boolean {\n return hasAllContentInData();\n }\n\n /**\n */\n get content(): AttributeContent {\n return new AttributeContent(this.data.content);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AAEA;;AAEA;;AACA;;AAKA;;AAEA;;AAiBA;;;;;;AAEA;AACA;AACA;IACqBA,c;;;;;EA6BnB;AACF;EACE,wBAAYC,SAAZ,EAA+BC,sBAA/B,EAA+D;IAAA;;IAAA;IAC7D,0BAAMD,SAAN,EAAiBC,sBAAjB;IAD6D;IAAA,gGA1BnC,CA0BmC;IAAA;IAAA;IAAA;IAAA;IAAA,iGAnBpB,IAAIC,6BAAJ,EAmBoB;IAAA,uGAlB3B,IAAAC,oBAAA,EAAW,2BAAX,CAkB2B;IAAA,uFAjB3C,IAiB2C;IAAA;IAAA,0FAfxC,KAewC;IAAA,uFAdzB,IAcyB;IAAA;IAAA;IAAA,wFAX1C,KAW0C;IAAA;IAAA,wFAT1C,KAS0C;IAAA;IAAA;IAAA;IAAA;IAAA;;IAG7D,IAAI,MAAKC,kBAAL,IAA2B,MAAKC,OAAL,CAAaC,KAA5C,EAAmD;MACjD,MAAKC,MAAL,GAAc,MAAKF,OAAL,CAAaC,KAA3B;IACD,CAFD,MAEO;MACL,MAAKC,MAAL,GAAc,MAAKC,aAAL,CAAmBF,KAAjC;IACD;;IAED,MAAKG,UAAL,GAAkB,M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,cAAP,EAA+C;MAC7C,OACE,KAAK5G,GAAL,KAAa4G,cAAc,CAAC5G,GAA5B,IACA,KAAKE,SAAL,KAAmB0G,cAAc,CAAC1G,SAFpC;IAID;IAED;AACF;AACA;;;;SACE,eAAmD;MACjD,OAAO2G,0BAAA,CAAgBC,MAAvB;IACD;IAED;AACF;;;;SACE,eAAgD;MAC9C,OAAO,KAAKC,gBAAZ;IACD;IAED;AACF;;SACE,aAAoBC,KAApB,EAAqD;MACnD,KAAKD,gBAAL,GAAwBC,KAAxB;IACD;IAED;AACF;;;;WACE,gCAAuBC,UAAvB,EAAwD;MACtD,IAAI,KAAKF,gBAAT,EAA2B;QACzB,KAAKG,eAAL,CAAqBC,OAArB,CAA6B,IAA7B,EAAmCF,UAAnC;MACD;IACF;IAED;AACF;AACA;;;;SACE,eAAkC;MAChC,OAAO,IAAAG,6BAAA,GAAP;IACD;IAED;AACF;;;;SACE,eAAgC;MAC9B,OAAO,IAAIC,yBAAJ,CAAqB,KAAKvJ,IAAL,CAAUL,OAA/B,CAAP;IACD;;;WA31BD,2BAAyBG,aAAzB,EAAyD;MACvD,IAAI,CAAC,IAAA0J,sBAAA,EAAc1J,aAAd,CAAL,EAAmC;QACjC,MAAM,IAAI+G,oCAAJ,CACJ,oEADI,CAAN;MAGD;;MAED,OAAO,KAAP;IACD;;;EA5EO4C,mB"}
@@ -526,9 +526,10 @@ var ListModel = /*#__PURE__*/function (_ResourceModel) {
526
526
  }], [{
527
527
  key: "isApplicableModel",
528
528
  value: function isApplicableModel(data) {
529
- var _context6, _context7, _context8, _context9;
529
+ var _data$contributions$r, _data$contributions, _context6;
530
530
 
531
- return data.contributions.resourcetype && ((0, _endsWith.default)(_context6 = data.contributions.resourcetype).call(_context6, "List") || (0, _endsWith.default)(_context7 = data.contributions.resourcetype).call(_context7, "ListPanel") || (0, _endsWith.default)(_context8 = data.contributions.resourcetype).call(_context8, "RelatedDataStorePanel") || (0, _includes.default)(_context9 = ["list-related-cases", "RecordPanel", "EventHistoryPanel", "NotePanel", "AppointmentPanel", "DocumentPanel", "AssignmentPanel"]).call(_context9, data.contributions.resourcetype));
531
+ var resourceType = (_data$contributions$r = (_data$contributions = data.contributions) === null || _data$contributions === void 0 ? void 0 : _data$contributions.resourcetype) !== null && _data$contributions$r !== void 0 ? _data$contributions$r : "";
532
+ return (0, _endsWith.default)(resourceType).call(resourceType, "List") || (0, _endsWith.default)(resourceType).call(resourceType, "ListPanel") || (0, _endsWith.default)(resourceType).call(resourceType, "RelatedDataStorePanel") || (0, _endsWith.default)(resourceType).call(resourceType, "RelatedDatastorePanel") || (0, _includes.default)(_context6 = ["list-related-cases", "RecordPanel", "EventHistoryPanel", "NotePanel", "AppointmentPanel", "DocumentPanel", "AssignmentPanel"]).call(_context6, resourceType);
532
533
  }
533
534
  }]);
534
535
  return ListModel;
@@ -44,20 +44,21 @@ export default class ListModel extends ResourceModel {
44
44
  /**
45
45
  */
46
46
  static isApplicableModel(data: ModularUIResponse): boolean {
47
+ const resourceType = data.contributions?.resourcetype ?? "";
47
48
  return (
48
- data.contributions.resourcetype &&
49
- (data.contributions.resourcetype.endsWith("List") ||
50
- data.contributions.resourcetype.endsWith("ListPanel") ||
51
- data.contributions.resourcetype.endsWith("RelatedDataStorePanel") ||
52
- [
53
- "list-related-cases",
54
- "RecordPanel",
55
- "EventHistoryPanel",
56
- "NotePanel",
57
- "AppointmentPanel",
58
- "DocumentPanel",
59
- "AssignmentPanel",
60
- ].includes(data.contributions.resourcetype))
49
+ resourceType.endsWith("List") ||
50
+ resourceType.endsWith("ListPanel") ||
51
+ resourceType.endsWith("RelatedDataStorePanel") ||
52
+ resourceType.endsWith("RelatedDatastorePanel") ||
53
+ [
54
+ "list-related-cases",
55
+ "RecordPanel",
56
+ "EventHistoryPanel",
57
+ "NotePanel",
58
+ "AppointmentPanel",
59
+ "DocumentPanel",
60
+ "AssignmentPanel",
61
+ ].includes(resourceType)
61
62
  );
62
63
  }
63
64