@beinformed/ui 1.39.0 → 1.41.0

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 (109) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/esm/constants/LayoutHintConfig.js +18 -0
  3. package/esm/constants/LayoutHintConfig.js.map +1 -1
  4. package/esm/constants/LayoutHints.js +6 -0
  5. package/esm/constants/LayoutHints.js.map +1 -1
  6. package/esm/models/attributes/input-constraints/FileSizeConstraint.js +0 -1
  7. package/esm/models/attributes/input-constraints/FileSizeConstraint.js.map +1 -1
  8. package/esm/models/content/ContentModel.js +1 -0
  9. package/esm/models/content/ContentModel.js.map +1 -1
  10. package/esm/models/content/SubSectionModel.js +5 -1
  11. package/esm/models/content/SubSectionModel.js.map +1 -1
  12. package/esm/models/detail/DetailModel.js +22 -3
  13. package/esm/models/detail/DetailModel.js.map +1 -1
  14. package/esm/models/href/Href.js +13 -0
  15. package/esm/models/href/Href.js.map +1 -1
  16. package/esm/react-client/contextPath.js +0 -2
  17. package/esm/react-client/contextPath.js.map +1 -1
  18. package/esm/react-client/rehydrate.js +0 -2
  19. package/esm/react-client/rehydrate.js.map +1 -1
  20. package/esm/react-server/contextPath.js +0 -1
  21. package/esm/react-server/contextPath.js.map +1 -1
  22. package/lib/constants/LayoutHintConfig.js +18 -0
  23. package/lib/constants/LayoutHintConfig.js.flow +56 -0
  24. package/lib/constants/LayoutHintConfig.js.map +1 -1
  25. package/lib/constants/LayoutHints.js +7 -1
  26. package/lib/constants/LayoutHints.js.flow +7 -0
  27. package/lib/constants/LayoutHints.js.map +1 -1
  28. package/lib/models/attributes/input-constraints/FileSizeConstraint.js +0 -1
  29. package/lib/models/attributes/input-constraints/FileSizeConstraint.js.map +1 -1
  30. package/lib/models/content/ContentModel.js +1 -0
  31. package/lib/models/content/ContentModel.js.flow +1 -0
  32. package/lib/models/content/ContentModel.js.map +1 -1
  33. package/lib/models/content/SubSectionModel.js +5 -1
  34. package/lib/models/content/SubSectionModel.js.flow +3 -2
  35. package/lib/models/content/SubSectionModel.js.map +1 -1
  36. package/lib/models/content/__tests__/ContentModel.spec.js.flow +3 -0
  37. package/lib/models/detail/DetailModel.js +21 -2
  38. package/lib/models/detail/DetailModel.js.flow +35 -5
  39. package/lib/models/detail/DetailModel.js.map +1 -1
  40. package/lib/models/href/Href.js +13 -0
  41. package/lib/models/href/Href.js.flow +13 -0
  42. package/lib/models/href/Href.js.map +1 -1
  43. package/lib/react-client/contextPath.js +0 -1
  44. package/lib/react-client/contextPath.js.map +1 -1
  45. package/lib/react-client/rehydrate.js +0 -2
  46. package/lib/react-client/rehydrate.js.map +1 -1
  47. package/package.json +17 -17
  48. package/src/constants/LayoutHintConfig.js +56 -0
  49. package/src/constants/LayoutHints.js +7 -0
  50. package/src/models/content/ContentModel.js +1 -0
  51. package/src/models/content/SubSectionModel.js +3 -2
  52. package/src/models/content/__tests__/ContentModel.spec.js +3 -0
  53. package/src/models/detail/DetailModel.js +35 -5
  54. package/src/models/href/Href.js +13 -0
  55. package/types/constants/LayoutHintConfig.d.ts +15 -0
  56. package/types/constants/LayoutHints.d.ts +4 -0
  57. package/types/models/actions/ActionModel.d.ts +3 -3
  58. package/types/models/application/ApplicationModel.d.ts +1 -1
  59. package/types/models/attributes/AttributeCollection.d.ts +1 -1
  60. package/types/models/attributes/AttributeModel.d.ts +14 -14
  61. package/types/models/attributes/AttributeSetModel.d.ts +9 -2
  62. package/types/models/attributes/BooleanAttributeModel.d.ts +1 -1
  63. package/types/models/attributes/ChoiceAttributeOptionCollection.d.ts +2 -2
  64. package/types/models/attributes/ChoiceAttributeOptionModel.d.ts +7 -7
  65. package/types/models/attributes/CompositeAttributeModel.d.ts +1 -1
  66. package/types/models/attributes/DatetimeAttributeModel.d.ts +1 -1
  67. package/types/models/attributes/PasswordAttributeModel.d.ts +3 -3
  68. package/types/models/attributes/StringAttributeModel.d.ts +1 -1
  69. package/types/models/attributes/UploadAttributeModel.d.ts +3 -3
  70. package/types/models/attributes/input-constraints/DateBoundaryConstraint.d.ts +1 -1
  71. package/types/models/attributes/input-constraints/DatetimeFormatConstraint.d.ts +1 -1
  72. package/types/models/attributes/input-constraints/RangeConstraint.d.ts +1 -1
  73. package/types/models/attributes/layouthint-rules/DependentAttribute.d.ts +4 -4
  74. package/types/models/base/BaseCollection.d.ts +1 -1
  75. package/types/models/base/BaseModel.d.ts +2 -2
  76. package/types/models/base/ResourceModel.d.ts +2 -2
  77. package/types/models/caseview/CaseViewModel.d.ts +1 -1
  78. package/types/models/concepts/BusinessScenarioModel.d.ts +1 -1
  79. package/types/models/concepts/ConceptDetailModel.d.ts +1 -1
  80. package/types/models/concepts/ConceptIndexModel.d.ts +1 -1
  81. package/types/models/concepts/ConceptLinkModel.d.ts +1 -1
  82. package/types/models/concepts/ConceptRelationModel.d.ts +1 -1
  83. package/types/models/content/ContentLinkModel.d.ts +3 -3
  84. package/types/models/content/ContentModel.d.ts +2 -2
  85. package/types/models/content/ContentTOCModel.d.ts +1 -1
  86. package/types/models/content/SectionModel.d.ts +1 -1
  87. package/types/models/detail/DetailModel.d.ts +3 -3
  88. package/types/models/error/ErrorResponse.d.ts +1 -1
  89. package/types/models/filters/BaseFilterModel.d.ts +2 -2
  90. package/types/models/filters/StringFilterModel.d.ts +2 -2
  91. package/types/models/form/FormModel.d.ts +14 -14
  92. package/types/models/form/FormObjectModel.d.ts +3 -3
  93. package/types/models/href/Href.d.ts +13 -6
  94. package/types/models/href/ListHref.d.ts +4 -4
  95. package/types/models/links/LinkCollection.d.ts +1 -1
  96. package/types/models/links/LinkModel.d.ts +4 -4
  97. package/types/models/list/ListDetailModel.d.ts +2 -2
  98. package/types/models/list/ListModel.d.ts +3 -3
  99. package/types/models/paging/PagesizeModel.d.ts +1 -1
  100. package/types/models/paging/PagingModel.d.ts +1 -1
  101. package/types/models/panels/GroupingPanelModel.d.ts +1 -1
  102. package/types/models/sorting/SortOptionModel.d.ts +2 -2
  103. package/types/models/tab/TabModel.d.ts +1 -1
  104. package/types/models/taskgroup/TaskGroupModel.d.ts +5 -0
  105. package/types/models/user/UserServicesModel.d.ts +1 -1
  106. package/types/modularui/Authenticate.d.ts +1 -1
  107. package/types/modularui/ModularUIRequest.d.ts +8 -8
  108. package/types/modularui/ModularUIResponse.d.ts +5 -5
  109. package/types/utils/datetime/DateTimeUtil.d.ts +0 -1
@@ -33,7 +33,6 @@ const rehydratedValue = (stateKey, stateValue) => {
33
33
  if (Array.isArray(stateValue)) {
34
34
  return _mapInstanceProperty(stateValue).call(stateValue, stateItem => rehydrate(stateItem)); // NOSONAR
35
35
  }
36
-
37
36
  if (isModularUIModelData(stateValue)) {
38
37
  return recreateModel(stateValue);
39
38
  }
@@ -50,7 +49,6 @@ const rehydratedValue = (stateKey, stateValue) => {
50
49
  if (stateValue !== null && typeof stateValue === "object") {
51
50
  return rehydrate(stateValue); // NOSONAR
52
51
  }
53
-
54
52
  return stateValue;
55
53
  };
56
54
 
@@ -1 +1 @@
1
- {"version":3,"file":"rehydrate.js","names":["has","Locales","resolveModel","ModularUIResponse","recreateModel","data","modelData","rehydrate","Model","_context","model","childModels","_mapInstanceProperty","call","childModel","addChildModels","isModularUIModelData","rehydratedValue","stateKey","stateValue","Array","isArray","stateItem","locales","locale","noFurtherRehydration","_includesInstanceProperty","state","mappedState","_Object$keys","forEach"],"sources":["../../src/react-client/rehydrate.js"],"sourcesContent":["// @flow\nimport { has } from \"../utils/helpers/objects\";\nimport Locales from \"../i18n/Locales\";\n\nimport resolveModel from \"../models/resolveModel\";\n\nimport ModularUIResponse from \"../modularui/ModularUIResponse\";\n\n/**\n * Recreate a model from dehydrated data obtained after a server render.\n */\nconst recreateModel = (data: Object) => {\n const modelData = ModularUIResponse.rehydrate(data);\n\n const Model = resolveModel(modelData);\n\n if (Model) {\n const model = new Model(modelData);\n model.rehydrate(data);\n\n const childModels = data.childModels.map((childModel) =>\n recreateModel(childModel),\n );\n\n model.addChildModels(childModels);\n\n return model;\n }\n\n return data;\n};\n\n/**\n */\nconst isModularUIModelData = (data: any) =>\n data != null &&\n typeof data === \"object\" &&\n has(data, \"data\") &&\n has(data, \"contributions\");\n\n/**\n */\nconst rehydratedValue = (stateKey: string, stateValue: any) => {\n if (Array.isArray(stateValue)) {\n return stateValue.map((stateItem) => rehydrate(stateItem)); // NOSONAR\n }\n\n if (isModularUIModelData(stateValue)) {\n return recreateModel(stateValue);\n }\n\n if (\n stateKey === \"i18n\" &&\n has(stateValue, \"locales\") &&\n has(stateValue, \"locale\")\n ) {\n return {\n locales: Locales.rehydrate(stateValue.locales),\n locale: stateValue?.locale,\n };\n }\n\n const noFurtherRehydration = [\"preferences\", \"router\", \"progressindicator\"];\n if (noFurtherRehydration.includes(stateKey)) {\n return stateValue;\n }\n\n if (stateValue !== null && typeof stateValue === \"object\") {\n return rehydrate(stateValue); // NOSONAR\n }\n\n return stateValue;\n};\n\n/**\n * Maps dehydrated state to models that can be used to rehydrated the application.\n */\nconst rehydrate = (state: Object): { ... } => {\n const mappedState: { [string]: any } = {};\n\n Object.keys(state).forEach((stateKey) => {\n const stateValue = state[stateKey];\n mappedState[stateKey] = rehydratedValue(stateKey, stateValue);\n });\n\n return mappedState;\n};\n\nexport default rehydrate;\n"],"mappings":";;;AACA,SAASA,GAAG,QAAQ,0BAA0B;AAC9C,OAAOC,OAAO,MAAM,iBAAiB;AAErC,OAAOC,YAAY,MAAM,wBAAwB;AAEjD,OAAOC,iBAAiB,MAAM,gCAAgC;;AAE9D;AACA;AACA;AACA,MAAMC,aAAa,GAAIC,IAAY,IAAK;EACtC,MAAMC,SAAS,GAAGH,iBAAiB,CAACI,SAAS,CAACF,IAAI,CAAC;EAEnD,MAAMG,KAAK,GAAGN,YAAY,CAACI,SAAS,CAAC;EAErC,IAAIE,KAAK,EAAE;IAAA,IAAAC,QAAA;IACT,MAAMC,KAAK,GAAG,IAAIF,KAAK,CAACF,SAAS,CAAC;IAClCI,KAAK,CAACH,SAAS,CAACF,IAAI,CAAC;IAEr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AAU;EACnB;EAEA,IAAIA,UAAU,KAAK,IAAI,IAAI,OAAOA,UAAU,KAAK,QAAQ,EAAE;IACzD,OAAOZ,SAAS,CAACY,UAAU,CAAC,CAAC,CAAC;EAChC;;EAEA,OAAOA,UAAU;AACnB,CAAC;;AAED;AACA;AACA;AACA,MAAMZ,SAAS,GAAIoB,KAAa,IAAc;EAC5C,MAAMC,WAA8B,GAAG,CAAC,CAAC;EAEzCC,YAAA,CAAYF,KAAK,CAAC,CAACG,OAAO,CAAEZ,QAAQ,IAAK;IACvC,MAAMC,UAAU,GAAGQ,KAAK,CAACT,QAAQ,CAAC;IAClCU,WAAW,CAACV,QAAQ,CAAC,GAAGD,eAAe,CAACC,QAAQ,EAAEC,UAAU,CAAC;EAC/D,CAAC,CAAC;EAEF,OAAOS,WAAW;AACpB,CAAC;AAED,eAAerB,SAAS"}
1
+ {"version":3,"file":"rehydrate.js","names":["has","Locales","resolveModel","ModularUIResponse","recreateModel","data","modelData","rehydrate","Model","_context","model","childModels","_mapInstanceProperty","call","childModel","addChildModels","isModularUIModelData","rehydratedValue","stateKey","stateValue","Array","isArray","stateItem","locales","locale","noFurtherRehydration","_includesInstanceProperty","state","mappedState","_Object$keys","forEach"],"sources":["../../src/react-client/rehydrate.js"],"sourcesContent":["// @flow\nimport { has } from \"../utils/helpers/objects\";\nimport Locales from \"../i18n/Locales\";\n\nimport resolveModel from \"../models/resolveModel\";\n\nimport ModularUIResponse from \"../modularui/ModularUIResponse\";\n\n/**\n * Recreate a model from dehydrated data obtained after a server render.\n */\nconst recreateModel = (data: Object) => {\n const modelData = ModularUIResponse.rehydrate(data);\n\n const Model = resolveModel(modelData);\n\n if (Model) {\n const model = new Model(modelData);\n model.rehydrate(data);\n\n const childModels = data.childModels.map((childModel) =>\n recreateModel(childModel),\n );\n\n model.addChildModels(childModels);\n\n return model;\n }\n\n return data;\n};\n\n/**\n */\nconst isModularUIModelData = (data: any) =>\n data != null &&\n typeof data === \"object\" &&\n has(data, \"data\") &&\n has(data, \"contributions\");\n\n/**\n */\nconst rehydratedValue = (stateKey: string, stateValue: any) => {\n if (Array.isArray(stateValue)) {\n return stateValue.map((stateItem) => rehydrate(stateItem)); // NOSONAR\n }\n\n if (isModularUIModelData(stateValue)) {\n return recreateModel(stateValue);\n }\n\n if (\n stateKey === \"i18n\" &&\n has(stateValue, \"locales\") &&\n has(stateValue, \"locale\")\n ) {\n return {\n locales: Locales.rehydrate(stateValue.locales),\n locale: stateValue?.locale,\n };\n }\n\n const noFurtherRehydration = [\"preferences\", \"router\", \"progressindicator\"];\n if (noFurtherRehydration.includes(stateKey)) {\n return stateValue;\n }\n\n if (stateValue !== null && typeof stateValue === \"object\") {\n return rehydrate(stateValue); // NOSONAR\n }\n\n return stateValue;\n};\n\n/**\n * Maps dehydrated state to models that can be used to rehydrated the application.\n */\nconst rehydrate = (state: Object): { ... } => {\n const mappedState: { [string]: any } = {};\n\n Object.keys(state).forEach((stateKey) => {\n const stateValue = state[stateKey];\n mappedState[stateKey] = rehydratedValue(stateKey, stateValue);\n });\n\n return mappedState;\n};\n\nexport default rehydrate;\n"],"mappings":";;;AACA,SAASA,GAAG,QAAQ,0BAA0B;AAC9C,OAAOC,OAAO,MAAM,iBAAiB;AAErC,OAAOC,YAAY,MAAM,wBAAwB;AAEjD,OAAOC,iBAAiB,MAAM,gCAAgC;;AAE9D;AACA;AACA;AACA,MAAMC,aAAa,GAAIC,IAAY,IAAK;EACtC,MAAMC,SAAS,GAAGH,iBAAiB,CAACI,SAAS,CAACF,IAAI,CAAC;EAEnD,MAAMG,KAAK,GAAGN,YAAY,CAACI,SAAS,CAAC;EAErC,IAAIE,KAAK,EAAE;IAAA,IAAAC,QAAA;IACT,MAAMC,KAAK,GAAG,IAAIF,KAAK,CAACF,SAAS,CAAC;IAClCI,KAAK,CAACH,SAAS,CAACF,IAAI,CAAC;IAErB,MAAMM,WAAW,GAAGC,oBAAA,CAAAH,QAAA,GAAAJ,IAAI,CAACM,WAAW,EAAAE,IA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IACzD,OAAOZ,SAAS,CAACY,UAAU,CAAC,CAAC,CAAC;EAChC;EAEA,OAAOA,UAAU;AACnB,CAAC;;AAED;AACA;AACA;AACA,MAAMZ,SAAS,GAAIoB,KAAa,IAAc;EAC5C,MAAMC,WAA8B,GAAG,CAAC,CAAC;EAEzCC,YAAA,CAAYF,KAAK,CAAC,CAACG,OAAO,CAAEZ,QAAQ,IAAK;IACvC,MAAMC,UAAU,GAAGQ,KAAK,CAACT,QAAQ,CAAC;IAClCU,WAAW,CAACV,QAAQ,CAAC,GAAGD,eAAe,CAACC,QAAQ,EAAEC,UAAU,CAAC;EAC/D,CAAC,CAAC;EAEF,OAAOS,WAAW;AACpB,CAAC;AAED,eAAerB,SAAS"}
@@ -2,6 +2,5 @@ import { getBasePath } from "../constants/Settings";
2
2
  (function x() {
3
3
  __webpack_public_path__ = `${getBasePath()}/`; // NOSONAR
4
4
  })();
5
-
6
5
  export {};
7
6
  //# sourceMappingURL=contextPath.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"contextPath.js","names":["getBasePath","x","__webpack_public_path__"],"sources":["../../src/react-server/contextPath.js"],"sourcesContent":["// @flow\nimport { getBasePath } from \"../constants/Settings\";\n\n(function x() {\n __webpack_public_path__ = `${getBasePath()}/`; // NOSONAR\n})();\n\nexport {};\n"],"mappings":"AACA,SAASA,WAAW,QAAQ,uBAAuB;AAEnD,CAAC,SAASC,CAACA,CAAA,EAAG;EACZC,uBAAuB,GAAI,GAAEF,WAAW,CAAC,CAAE,GAAE,CAAC,CAAC;AACjD,CAAC,EAAE,CAAC;;AAEJ"}
1
+ {"version":3,"file":"contextPath.js","names":["getBasePath","x","__webpack_public_path__"],"sources":["../../src/react-server/contextPath.js"],"sourcesContent":["// @flow\nimport { getBasePath } from \"../constants/Settings\";\n\n(function x() {\n __webpack_public_path__ = `${getBasePath()}/`; // NOSONAR\n})();\n\nexport {};\n"],"mappings":"AACA,SAASA,WAAW,QAAQ,uBAAuB;AAEnD,CAAC,SAASC,CAACA,CAAA,EAAG;EACZC,uBAAuB,GAAI,GAAEF,WAAW,CAAC,CAAE,GAAE,CAAC,CAAC;AACjD,CAAC,EAAE,CAAC;AAEJ"}
@@ -152,6 +152,24 @@ const LayoutHintConfiguration = exports.LayoutHintConfiguration = {
152
152
  },
153
153
  link: "",
154
154
  component: ["tab"]
155
+ },
156
+ AVATAR_FOR_TITLE: {
157
+ hint: "avatar-for-title",
158
+ description: {
159
+ NL: "Markeert een attribuut als een avatar voor het titelattribuut.",
160
+ EN: "Marks an attribute as an avatar for the title attribute."
161
+ },
162
+ link: "",
163
+ component: ["caseview_table", "codemap", "list/appointment_table", "list/assignment_table", "list/caseproperties_table", "list/document_table", "list/timelimit_table", "list/eventhistory_table", "list/note_table", "list/record_table", "list/case_table", "list/casesearch_table", "list/datastore_table", "list/datastoreview_table", "list/instrumentresult_table", "list/event_table", "list/user_table", "list/organization_table"]
164
+ },
165
+ AVATAR: {
166
+ hint: "avatar",
167
+ description: {
168
+ NL: "Geef het attribuut weer als de avatar van de gebruiker.",
169
+ EN: "Render the attribute as the user's avatar."
170
+ },
171
+ link: "",
172
+ component: ["caseview_table", "codemap", "list/appointment_table", "list/assignment_table", "list/caseproperties_table", "list/document_table", "list/timelimit_table", "list/eventhistory_table", "list/note_table", "list/record_table", "list/case_table", "list/casesearch_table", "list/datastore_table", "list/datastoreview_table", "list/instrumentresult_table", "list/event_table", "list/user_table", "list/organization_table"]
155
173
  }
156
174
  };
157
175
  //# sourceMappingURL=LayoutHintConfig.js.map
@@ -167,4 +167,60 @@ export const LayoutHintConfiguration = {
167
167
  link: "",
168
168
  component: ["tab"],
169
169
  },
170
+ AVATAR_FOR_TITLE: {
171
+ hint: "avatar-for-title",
172
+ description: {
173
+ NL: "Markeert een attribuut als een avatar voor het titelattribuut.",
174
+ EN: "Marks an attribute as an avatar for the title attribute.",
175
+ },
176
+ link: "",
177
+ component: [
178
+ "caseview_table",
179
+ "codemap",
180
+ "list/appointment_table",
181
+ "list/assignment_table",
182
+ "list/caseproperties_table",
183
+ "list/document_table",
184
+ "list/timelimit_table",
185
+ "list/eventhistory_table",
186
+ "list/note_table",
187
+ "list/record_table",
188
+ "list/case_table",
189
+ "list/casesearch_table",
190
+ "list/datastore_table",
191
+ "list/datastoreview_table",
192
+ "list/instrumentresult_table",
193
+ "list/event_table",
194
+ "list/user_table",
195
+ "list/organization_table",
196
+ ],
197
+ },
198
+ AVATAR: {
199
+ hint: "avatar",
200
+ description: {
201
+ NL: "Geef het attribuut weer als de avatar van de gebruiker.",
202
+ EN: "Render the attribute as the user's avatar.",
203
+ },
204
+ link: "",
205
+ component: [
206
+ "caseview_table",
207
+ "codemap",
208
+ "list/appointment_table",
209
+ "list/assignment_table",
210
+ "list/caseproperties_table",
211
+ "list/document_table",
212
+ "list/timelimit_table",
213
+ "list/eventhistory_table",
214
+ "list/note_table",
215
+ "list/record_table",
216
+ "list/case_table",
217
+ "list/casesearch_table",
218
+ "list/datastore_table",
219
+ "list/datastoreview_table",
220
+ "list/instrumentresult_table",
221
+ "list/event_table",
222
+ "list/user_table",
223
+ "list/organization_table",
224
+ ],
225
+ },
170
226
  };
@@ -1 +1 @@
1
- {"version":3,"file":"LayoutHintConfig.js","names":["LayoutHintConfiguration","exports","MANDATORY","hint","description","NL","EN","link","component","DEPENDENT_ATTRIBUTE_CONTROL","DEPENDENT_ATTRIBUTE_ACTION","SHOW_ONE_RESULT_AS_DETAIL","HIDE_WHEN_EMPTY","INITIAL_FILTER","CONFIRM_PASSWORD","TITLE","INITIAL_TOTAL_FILESIZE","MAX_TOTAL_FILESIZE","CREATE_ACTION","UPDATE_ACTION","DELETE_ACTION","SORT_OPTIONS","CASEVIEW_LINK","DISABLED","HIDE_IN_USER_INTERFACE"],"sources":["../../src/constants/LayoutHintConfig.js"],"sourcesContent":["// @flow\nexport const LayoutHintConfiguration = {\n MANDATORY: {\n hint: \"mandatory\",\n description: {\n NL: \"Geeft aan of een attribuut verplicht is. Dient samen met de dependency hint gebruikt te worden.\",\n EN: \"Indicates a mandatory attribute.\\nShould be used together with the dependency hint.\",\n },\n link: \"\",\n component: [\"attribute\"],\n },\n DEPENDENT_ATTRIBUTE_CONTROL: {\n hint: \"dependent-control:${unique-control-id}\",\n description: {\n NL: \"Geeft aan dat dit het attribuut is waar attributen van afhankelijk zijn. Het unique-control-id is een uniek id dat kan worden gebruikt in the hint voor de show|hide actie op het afhankelijke attribuut.\",\n EN: \"Marks the choice attribute where other attributes depend on. The unique control id is a unique id that can be used in the hint for the show|hide action on the dependent attribute.\",\n },\n link: \"\",\n component: [\"attribute/boolean\", \"attribute/choice\"],\n },\n DEPENDENT_ATTRIBUTE_ACTION: {\n hint: \"dependent-attribute:(show|hide) when dependent-control:${unique-control-id} (equals|includes|notEquals|notIncludes) [${codemaps}]\",\n description: {\n NL: \"Toon of verberg een attribute dat afhankelijk is van de geselecteerde opties van een keuze attribute\",\n EN: \"To show or hide an attribute dependent on options of the choice control codemap that are selected or not selected.\",\n },\n link: \"\",\n component: [\"attribute\"],\n },\n SHOW_ONE_RESULT_AS_DETAIL: {\n hint: \"show-one-result-as-detail\",\n description: {\n NL: \"Een lijst met maar één item mag direct als detail getoond worden.\",\n EN: \"A list with only one detail must be shown as a detail.\",\n },\n link: \"\",\n component: [\"list\"],\n },\n HIDE_WHEN_EMPTY: {\n hint: \"hide-when-empty\",\n description: {\n NL: \"Een lijst zonder lijst-items en lijst-taken dient niet getoond worden.\",\n EN: \"A list without list-items and list-tasks should not be shown.\",\n },\n link: \"\",\n component: [\"list\"],\n },\n INITIAL_FILTER: {\n hint: \"initial-filter:${filter-name}=${initial-value}\",\n description: {\n NL: \"Laad de lijst met een standaardwaarde voor een filter, er is geen controle op het bestaan van het filter. Als het filter niet is geconfigureerd, treedt er een fout op. Houd er rekening mee dat filters hoofdlettergevoelig zijn.\",\n EN: \"Load the list with a default value for a filter, there is no check for the existence of the filter. If the filter is not configured, an error occurs. Keep in mind that filters are case sensitive.\",\n },\n link: \"\",\n component: [\"list\"],\n },\n CONFIRM_PASSWORD: {\n hint: \"confirm-password\",\n description: {\n NL: \"Wachtwoord attribuut moet bevestigd worden dmv een tweede wachtwoord attribuut.\",\n EN: \"Password attribute must be confirmed using a second password attribute.\",\n },\n link: \"\",\n component: [\"attribute/password\"],\n },\n TITLE: {\n hint: \"title\",\n description: {\n NL: \"Markeert een attribuut als een titel attribuut\",\n EN: \"Marks an attribute as a title attribute\",\n },\n link: \"\",\n component: [\n \"caseview_table\",\n \"codemap\",\n \"list/appointment_table\",\n \"list/assignment_table\",\n \"list/caseproperties_table\",\n \"list/document_table\",\n \"list/timelimit_table\",\n \"list/eventhistory_table\",\n \"list/note_table\",\n \"list/record_table\",\n \"list/case_table\",\n \"list/casesearch_table\",\n \"list/datastore_table\",\n \"list/datastoreview_table\",\n \"list/instrumentresult_table\",\n \"list/event_table\",\n \"list/user_table\",\n \"list/organization_table\",\n ],\n },\n INITIAL_TOTAL_FILESIZE: {\n hint: \"initial-total-file-size\",\n description: {\n NL: \"Wordt gebruikt in samenwerking met een upload attribuut, deze hint moet worden gezet op een readonly attribuut dat de reeds gebruikte file grootte bevat.\",\n EN: \"Used in conjunction with an upload attribute, this hint is set on a read only attribute containing the file size currently used.\",\n },\n link: \"\",\n component: [\"attribute/number\"],\n },\n MAX_TOTAL_FILESIZE: {\n hint: \"max-total-file-size\",\n description: {\n NL: \"Wordt gebruikt in samenwerking met een upload attribuut, deze hint moet worden gezet op een readonly attribuut dat de maximaal toegestane file grootte bevat.\",\n EN: \"Used in conjunction with an upload attribute, this hint is set on a read only attribute containing the maximum allowed total file size.\",\n },\n link: \"\",\n component: [\"attribute/number\"],\n },\n CREATE_ACTION: {\n hint: \"create\",\n description: {\n NL: \"Markeer taak als creëer taak.\",\n EN: \"Mark task as create task\",\n },\n component: [\"form\"],\n },\n UPDATE_ACTION: {\n hint: \"update\",\n description: {\n NL: \"Markeer taak als bewerk taak.\",\n EN: \"Mark task as update task\",\n },\n component: [\"form\"],\n },\n DELETE_ACTION: {\n hint: \"delete\",\n description: {\n NL: \"Markeer taak als verwijder taak.\",\n EN: \"Mark task as delete task\",\n },\n component: [\"form\"],\n },\n SORT_OPTIONS: {\n hint: \"sort-options\",\n description: {\n NL: \"Sorteer opties alfabetisch\",\n EN: \"Sort options alphabetically\",\n },\n component: [\"attribute/choice\"],\n },\n CASEVIEW_LINK: {\n hint: \"case-view-link\",\n description: {\n NL: \"Markeer een case id reference attribute als de referentie naar de case view. Vervangt de self link van een lijst item\",\n EN: \"Mark a case id reference attribute as the reference to the case view. Replaces the self link of a list item\",\n },\n component: [\"attribute/reference\", \"list/datastore_table\"],\n },\n DISABLED: {\n hint: \"disabled\",\n description: {\n NL: \"Geeft aan of een attribuut uitgeschakeld is.\",\n EN: \"Indicates a disabled attribute.\",\n },\n link: \"\",\n component: [\"attribute\"],\n },\n HIDE_IN_USER_INTERFACE: {\n hint: \"hide-in-user-interface\",\n description: {\n NL: \"Verberg een tab in de user interface.\",\n EN: \"Hide a tab in the user interface.\",\n },\n link: \"\",\n component: [\"tab\"],\n },\n};\n"],"mappings":";;;;;;AACO,MAAMA,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAG;EACrCE,SAAS,EAAE;IACTC,IAAI,EAAE,WAAW;IACjBC,WAAW,EAAE;MACXC,EAAE,EAAE,iGAAiG;MACrGC,EAAE,EAAE;IACN,CAAC;IACDC,IAAI,EAAE,EAAE;IACRC,SAAS,EAAE,CAAC,WAAW;EACzB,CAAC;EACDC,2BAA2B,EAAE;IAC3BN,IAAI,EAAE,wCAAwC;IAC9CC,WAAW,EAAE;MACXC,EAAE,EAAE,2MAA2M;MAC/MC,EAAE,EAAE;IACN,CAAC;IACDC,IAAI,EAAE,EAAE;IACRC,SAAS,EAAE,CAAC,mBAAmB,EAAE,kBAAkB;EACrD,CAAC;EACDE,0BAA0B,EAAE;IAC1BP,IAAI,EAAE,mIAAmI;IACzIC,WAAW,EAAE;MACXC,EAAE,EAAE,sGAAsG;MAC1GC,EAAE,E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AE,sBAAsB;EAC3D,CAAC;EACDe,QAAQ,EAAE;IACRpB,IAAI,EAAE,UAAU;IAChBC,WAAW,EAAE;MACXC,EAAE,EAAE,8CAA8C;MAClDC,EAAE,EAAE;IACN,CAAC;IACDC,IAAI,EAAE,EAAE;IACRC,SAAS,EAAE,CAAC,WAAW;EACzB,CAAC;EACDgB,sBAAsB,EAAE;IACtBrB,IAAI,EAAE,wBAAwB;IAC9BC,WAAW,EAAE;MACXC,EAAE,EAAE,uCAAuC;MAC3CC,EAAE,EAAE;IACN,CAAC;IACDC,IAAI,EAAE,EAAE;IACRC,SAAS,EAAE,CAAC,KAAK;EACnB;AACF,CAAC"}
1
+ {"version":3,"file":"LayoutHintConfig.js","names":["LayoutHintConfiguration","exports","MANDATORY","hint","description","NL","EN","link","component","DEPENDENT_ATTRIBUTE_CONTROL","DEPENDENT_ATTRIBUTE_ACTION","SHOW_ONE_RESULT_AS_DETAIL","HIDE_WHEN_EMPTY","INITIAL_FILTER","CONFIRM_PASSWORD","TITLE","INITIAL_TOTAL_FILESIZE","MAX_TOTAL_FILESIZE","CREATE_ACTION","UPDATE_ACTION","DELETE_ACTION","SORT_OPTIONS","CASEVIEW_LINK","DISABLED","HIDE_IN_USER_INTERFACE","AVATAR_FOR_TITLE","AVATAR"],"sources":["../../src/constants/LayoutHintConfig.js"],"sourcesContent":["// @flow\nexport const LayoutHintConfiguration = {\n MANDATORY: {\n hint: \"mandatory\",\n description: {\n NL: \"Geeft aan of een attribuut verplicht is. Dient samen met de dependency hint gebruikt te worden.\",\n EN: \"Indicates a mandatory attribute.\\nShould be used together with the dependency hint.\",\n },\n link: \"\",\n component: [\"attribute\"],\n },\n DEPENDENT_ATTRIBUTE_CONTROL: {\n hint: \"dependent-control:${unique-control-id}\",\n description: {\n NL: \"Geeft aan dat dit het attribuut is waar attributen van afhankelijk zijn. Het unique-control-id is een uniek id dat kan worden gebruikt in the hint voor de show|hide actie op het afhankelijke attribuut.\",\n EN: \"Marks the choice attribute where other attributes depend on. The unique control id is a unique id that can be used in the hint for the show|hide action on the dependent attribute.\",\n },\n link: \"\",\n component: [\"attribute/boolean\", \"attribute/choice\"],\n },\n DEPENDENT_ATTRIBUTE_ACTION: {\n hint: \"dependent-attribute:(show|hide) when dependent-control:${unique-control-id} (equals|includes|notEquals|notIncludes) [${codemaps}]\",\n description: {\n NL: \"Toon of verberg een attribute dat afhankelijk is van de geselecteerde opties van een keuze attribute\",\n EN: \"To show or hide an attribute dependent on options of the choice control codemap that are selected or not selected.\",\n },\n link: \"\",\n component: [\"attribute\"],\n },\n SHOW_ONE_RESULT_AS_DETAIL: {\n hint: \"show-one-result-as-detail\",\n description: {\n NL: \"Een lijst met maar één item mag direct als detail getoond worden.\",\n EN: \"A list with only one detail must be shown as a detail.\",\n },\n link: \"\",\n component: [\"list\"],\n },\n HIDE_WHEN_EMPTY: {\n hint: \"hide-when-empty\",\n description: {\n NL: \"Een lijst zonder lijst-items en lijst-taken dient niet getoond worden.\",\n EN: \"A list without list-items and list-tasks should not be shown.\",\n },\n link: \"\",\n component: [\"list\"],\n },\n INITIAL_FILTER: {\n hint: \"initial-filter:${filter-name}=${initial-value}\",\n description: {\n NL: \"Laad de lijst met een standaardwaarde voor een filter, er is geen controle op het bestaan van het filter. Als het filter niet is geconfigureerd, treedt er een fout op. Houd er rekening mee dat filters hoofdlettergevoelig zijn.\",\n EN: \"Load the list with a default value for a filter, there is no check for the existence of the filter. If the filter is not configured, an error occurs. Keep in mind that filters are case sensitive.\",\n },\n link: \"\",\n component: [\"list\"],\n },\n CONFIRM_PASSWORD: {\n hint: \"confirm-password\",\n description: {\n NL: \"Wachtwoord attribuut moet bevestigd worden dmv een tweede wachtwoord attribuut.\",\n EN: \"Password attribute must be confirmed using a second password attribute.\",\n },\n link: \"\",\n component: [\"attribute/password\"],\n },\n TITLE: {\n hint: \"title\",\n description: {\n NL: \"Markeert een attribuut als een titel attribuut\",\n EN: \"Marks an attribute as a title attribute\",\n },\n link: \"\",\n component: [\n \"caseview_table\",\n \"codemap\",\n \"list/appointment_table\",\n \"list/assignment_table\",\n \"list/caseproperties_table\",\n \"list/document_table\",\n \"list/timelimit_table\",\n \"list/eventhistory_table\",\n \"list/note_table\",\n \"list/record_table\",\n \"list/case_table\",\n \"list/casesearch_table\",\n \"list/datastore_table\",\n \"list/datastoreview_table\",\n \"list/instrumentresult_table\",\n \"list/event_table\",\n \"list/user_table\",\n \"list/organization_table\",\n ],\n },\n INITIAL_TOTAL_FILESIZE: {\n hint: \"initial-total-file-size\",\n description: {\n NL: \"Wordt gebruikt in samenwerking met een upload attribuut, deze hint moet worden gezet op een readonly attribuut dat de reeds gebruikte file grootte bevat.\",\n EN: \"Used in conjunction with an upload attribute, this hint is set on a read only attribute containing the file size currently used.\",\n },\n link: \"\",\n component: [\"attribute/number\"],\n },\n MAX_TOTAL_FILESIZE: {\n hint: \"max-total-file-size\",\n description: {\n NL: \"Wordt gebruikt in samenwerking met een upload attribuut, deze hint moet worden gezet op een readonly attribuut dat de maximaal toegestane file grootte bevat.\",\n EN: \"Used in conjunction with an upload attribute, this hint is set on a read only attribute containing the maximum allowed total file size.\",\n },\n link: \"\",\n component: [\"attribute/number\"],\n },\n CREATE_ACTION: {\n hint: \"create\",\n description: {\n NL: \"Markeer taak als creëer taak.\",\n EN: \"Mark task as create task\",\n },\n component: [\"form\"],\n },\n UPDATE_ACTION: {\n hint: \"update\",\n description: {\n NL: \"Markeer taak als bewerk taak.\",\n EN: \"Mark task as update task\",\n },\n component: [\"form\"],\n },\n DELETE_ACTION: {\n hint: \"delete\",\n description: {\n NL: \"Markeer taak als verwijder taak.\",\n EN: \"Mark task as delete task\",\n },\n component: [\"form\"],\n },\n SORT_OPTIONS: {\n hint: \"sort-options\",\n description: {\n NL: \"Sorteer opties alfabetisch\",\n EN: \"Sort options alphabetically\",\n },\n component: [\"attribute/choice\"],\n },\n CASEVIEW_LINK: {\n hint: \"case-view-link\",\n description: {\n NL: \"Markeer een case id reference attribute als de referentie naar de case view. Vervangt de self link van een lijst item\",\n EN: \"Mark a case id reference attribute as the reference to the case view. Replaces the self link of a list item\",\n },\n component: [\"attribute/reference\", \"list/datastore_table\"],\n },\n DISABLED: {\n hint: \"disabled\",\n description: {\n NL: \"Geeft aan of een attribuut uitgeschakeld is.\",\n EN: \"Indicates a disabled attribute.\",\n },\n link: \"\",\n component: [\"attribute\"],\n },\n HIDE_IN_USER_INTERFACE: {\n hint: \"hide-in-user-interface\",\n description: {\n NL: \"Verberg een tab in de user interface.\",\n EN: \"Hide a tab in the user interface.\",\n },\n link: \"\",\n component: [\"tab\"],\n },\n AVATAR_FOR_TITLE: {\n hint: \"avatar-for-title\",\n description: {\n NL: \"Markeert een attribuut als een avatar voor het titelattribuut.\",\n EN: \"Marks an attribute as an avatar for the title attribute.\",\n },\n link: \"\",\n component: [\n \"caseview_table\",\n \"codemap\",\n \"list/appointment_table\",\n \"list/assignment_table\",\n \"list/caseproperties_table\",\n \"list/document_table\",\n \"list/timelimit_table\",\n \"list/eventhistory_table\",\n \"list/note_table\",\n \"list/record_table\",\n \"list/case_table\",\n \"list/casesearch_table\",\n \"list/datastore_table\",\n \"list/datastoreview_table\",\n \"list/instrumentresult_table\",\n \"list/event_table\",\n \"list/user_table\",\n \"list/organization_table\",\n ],\n },\n AVATAR: {\n hint: \"avatar\",\n description: {\n NL: \"Geef het attribuut weer als de avatar van de gebruiker.\",\n EN: \"Render the attribute as the user's avatar.\",\n },\n link: \"\",\n component: [\n \"caseview_table\",\n \"codemap\",\n \"list/appointment_table\",\n \"list/assignment_table\",\n \"list/caseproperties_table\",\n \"list/document_table\",\n \"list/timelimit_table\",\n \"list/eventhistory_table\",\n \"list/note_table\",\n \"list/record_table\",\n \"list/case_table\",\n \"list/casesearch_table\",\n \"list/datastore_table\",\n \"list/datastoreview_table\",\n \"list/instrumentresult_table\",\n \"list/event_table\",\n \"list/user_table\",\n \"list/organization_table\",\n ],\n },\n};\n"],"mappings":";;;;;;AACO,MAAMA,uBAAuB,GAA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AAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,uBAAuB,EACvB,sBAAsB,EACtB,0BAA0B,EAC1B,6BAA6B,EAC7B,kBAAkB,EAClB,iBAAiB,EACjB,yBAAyB;EAE7B,CAAC;EACDkB,MAAM,EAAE;IACNvB,IAAI,EAAE,QAAQ;IACdC,WAAW,EAAE;MACXC,EAAE,EAAE,yDAAyD;MAC7DC,EAAE,EAAE;IACN,CAAC;IACDC,IAAI,EAAE,EAAE;IACRC,SAAS,EAAE,CACT,gBAAgB,EAChB,SAAS,EACT,wBAAwB,EACxB,uBAAuB,EACvB,2BAA2B,EAC3B,qBAAqB,EACrB,sBAAsB,EACtB,yBAAyB,EACzB,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,uBAAuB,EACvB,sBAAsB,EACtB,0BAA0B,EAC1B,6BAA6B,EAC7B,kBAAkB,EAClB,iBAAiB,EACjB,yBAAyB;EAE7B;AACF,CAAC"}
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.getLayoutHintConfiguration = exports.default = exports.UPDATE_ACTION = exports.TITLE = exports.SORT_OPTIONS = exports.SHOW_ONE_RESULT_AS_DETAIL = exports.RENDER_SECTION_LABEL = exports.MAX_TOTAL_FILESIZE = exports.MANDATORY = exports.INITIAL_TOTAL_FILESIZE = exports.INITIAL_FILTER = exports.HIDE_WHEN_EMPTY = exports.HIDE_IN_USER_INTERFACE = exports.DISABLED = exports.DEPENDENT_ATTRIBUTE_CONTROL = exports.DEPENDENT_ATTRIBUTE = exports.DELETE_ACTION = exports.CREATE_ACTION = exports.CONFIRM_PASSWORD = exports.CASEVIEW_LINK = void 0;
6
+ exports.getLayoutHintConfiguration = exports.default = exports.UPDATE_ACTION = exports.TITLE = exports.SORT_OPTIONS = exports.SHOW_ONE_RESULT_AS_DETAIL = exports.RENDER_SECTION_LABEL = exports.MAX_TOTAL_FILESIZE = exports.MANDATORY = exports.INITIAL_TOTAL_FILESIZE = exports.INITIAL_FILTER = exports.HIDE_WHEN_EMPTY = exports.HIDE_IN_USER_INTERFACE = exports.DISABLED = exports.DEPENDENT_ATTRIBUTE_CONTROL = exports.DEPENDENT_ATTRIBUTE = exports.DELETE_ACTION = exports.CREATE_ACTION = exports.CONFIRM_PASSWORD = exports.CASEVIEW_LINK = exports.AVATAR_FOR_TITLE = exports.AVATAR = void 0;
7
7
  var _LayoutHintConfig = require("./LayoutHintConfig");
8
8
  /**
9
9
  * Retrieve layout hint by id from the layout hint configuration
@@ -124,6 +124,12 @@ const HIDE_IN_USER_INTERFACE = exports.HIDE_IN_USER_INTERFACE = getHint("HIDE_IN
124
124
  /**
125
125
  */
126
126
  const getLayoutHintConfiguration = () => _LayoutHintConfig.LayoutHintConfiguration;
127
+
128
+ /**
129
+ * Layout-hint: Marks an attribute as an avatar for the title attribute.
130
+ */
127
131
  exports.getLayoutHintConfiguration = getLayoutHintConfiguration;
132
+ const AVATAR_FOR_TITLE = exports.AVATAR_FOR_TITLE = getHint("AVATAR_FOR_TITLE");
133
+ const AVATAR = exports.AVATAR = getHint("AVATAR");
128
134
  var _default = exports.default = getHint;
129
135
  //# sourceMappingURL=LayoutHints.js.map
@@ -124,4 +124,11 @@ export const HIDE_IN_USER_INTERFACE: string = getHint("HIDE_IN_USER_INTERFACE");
124
124
  */
125
125
  export const getLayoutHintConfiguration = (): Object => LayoutHintConfiguration;
126
126
 
127
+ /**
128
+ * Layout-hint: Marks an attribute as an avatar for the title attribute.
129
+ */
130
+ export const AVATAR_FOR_TITLE: string = getHint("AVATAR_FOR_TITLE");
131
+
132
+ export const AVATAR: string = getHint("AVATAR");
133
+
127
134
  export default getHint;
@@ -1 +1 @@
1
- {"version":3,"file":"LayoutHints.js","names":["_LayoutHintConfig","require","getHint","hint","LayoutHintConfiguration","MANDATORY","exports","DISABLED","DEPENDENT_ATTRIBUTE_CONTROL","DEPENDENT_ATTRIBUTE","CONFIRM_PASSWORD","SORT_OPTIONS","TITLE","DELETE_ACTION","UPDATE_ACTION","CREATE_ACTION","INITIAL_TOTAL_FILESIZE","MAX_TOTAL_FILESIZE","SHOW_ONE_RESULT_AS_DETAIL","HIDE_WHEN_EMPTY","INITIAL_FILTER","CASEVIEW_LINK","RENDER_SECTION_LABEL","HIDE_IN_USER_INTERFACE","getLayoutHintConfiguration","_default","default"],"sources":["../../src/constants/LayoutHints.js"],"sourcesContent":["// @flow\nimport { LayoutHintConfiguration } from \"./LayoutHintConfig\";\n\n/**\n * Retrieve layout hint by id from the layout hint configuration\n */\nconst getHint = (hint: string): string => {\n if (LayoutHintConfiguration[hint]) {\n return LayoutHintConfiguration[hint].hint;\n }\n\n return \"\";\n};\n\n/**\n * Layout-hint: Indicates a mandatory attribute. Should be used together with the dependency hint.\n */\nexport const MANDATORY: string = getHint(\"MANDATORY\");\n\n/**\n * Layout-hint: Indicates a disabled attribute.\n * @constant\n */\nexport const DISABLED: string = getHint(\"DISABLED\");\n\n/*\n * --------------------------------\n * SELECT DEPENDENT ATTRIBUTES\n * --------------------------------\n */\n/**\n * Layout-hint: Marks the choice attribute where other attributes depend on. The unique control id is a unique id that can be used in the hint for the show|hide action on the dependent attribute.\n */\nexport const DEPENDENT_ATTRIBUTE_CONTROL = \"dependent-control\";\n/**\n */\nexport const DEPENDENT_ATTRIBUTE = \"dependent-attribute:\";\n\n/*\n * --------------------------------\n * ATTRIBUTES\n * --------------------------------\n */\n/**\n * Layout-hint: Password attribute must be confirmed using a second password attribute.\n */\nexport const CONFIRM_PASSWORD: string = getHint(\"CONFIRM_PASSWORD\");\n/**\n * Layout-hint: Sort options alphabetically\n */\nexport const SORT_OPTIONS: string = getHint(\"SORT_OPTIONS\");\n/**\n * Layout-hint: Marks an attribute as a title attribute\n */\nexport const TITLE: string = getHint(\"TITLE\");\n\n/*\n * --------------------------------\n * FORM\n * --------------------------------\n */\n/**\n * Layout-hint: Mark task as delete task\n */\nexport const DELETE_ACTION: string = getHint(\"DELETE_ACTION\");\n/**\n * Layout-hint: Mark task as update task\n */\nexport const UPDATE_ACTION: string = getHint(\"UPDATE_ACTION\");\n/**\n * Layout-hint: Mark task as create task\n */\nexport const CREATE_ACTION: string = getHint(\"CREATE_ACTION\");\n\n/*\n * --------------------------------\n * UPLOAD TOTAL FILE SIZE\n * --------------------------------\n */\n/**\n * Layout-hint: Used in conjunction with an upload attribute, this hint is set on a read only attribute containing the file size currently used.\n */\nexport const INITIAL_TOTAL_FILESIZE: string = getHint(\"INITIAL_TOTAL_FILESIZE\");\n/**\n * Layout-hint: Used in conjunction with an upload attribute, this hint is set on a read only attribute containing the maximum allowed total file size.\n */\nexport const MAX_TOTAL_FILESIZE: string = getHint(\"MAX_TOTAL_FILESIZE\");\n\n/*\n * --------------------------------\n * LISTS\n * --------------------------------\n */\n/**\n * Layout-hint: A list with only one detail must be shown as a detail\n */\nexport const SHOW_ONE_RESULT_AS_DETAIL: string = getHint(\n \"SHOW_ONE_RESULT_AS_DETAIL\",\n);\n/**\n * Layout-hint: A list without list-items and list-tasks should not be shown.\n */\nexport const HIDE_WHEN_EMPTY: string = getHint(\"HIDE_WHEN_EMPTY\");\n/**\n * Layout-hint: Sets a default value on a filter\n */\nexport const INITIAL_FILTER: string = \"initial-filter:\";\n/**\n * Layout-hint: Mark a case id reference attribute as the reference to the case view. Replaces the self link of a list item\n */\nexport const CASEVIEW_LINK: string = getHint(\"CASEVIEW_LINK\");\n\n/**\n * Layout-hint: Set on configuration of instruments to show content in a popover on a label\n */\nexport const RENDER_SECTION_LABEL = \"render-section-label\";\n\n/**\n * Layout-hint: Hide a link to a component\n */\nexport const HIDE_IN_USER_INTERFACE: string = getHint(\"HIDE_IN_USER_INTERFACE\");\n\n/**\n */\nexport const getLayoutHintConfiguration = (): Object => LayoutHintConfiguration;\n\nexport default getHint;\n"],"mappings":";;;;;;AACA,IAAAA,iBAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA,MAAMC,OAAO,GAAIC,IAAY,IAAa;EACxC,IAAIC,yC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AC/E;AACA;AACA;AACO,MAAMe,kBAA0B,GAAAX,OAAA,CAAAW,kBAAA,GAAGf,OAAO,CAAC,oBAAoB,CAAC;;AAEvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMgB,yBAAiC,GAAAZ,OAAA,CAAAY,yBAAA,GAAGhB,OAAO,CACtD,2BACF,CAAC;AACD;AACA;AACA;AACO,MAAMiB,eAAuB,GAAAb,OAAA,CAAAa,eAAA,GAAGjB,OAAO,CAAC,iBAAiB,CAAC;AACjE;AACA;AACA;AACO,MAAMkB,cAAsB,GAAAd,OAAA,CAAAc,cAAA,GAAG,iBAAiB;AACvD;AACA;AACA;AACO,MAAMC,aAAqB,GAAAf,OAAA,CAAAe,aAAA,GAAGnB,OAAO,CAAC,eAAe,CAAC;;AAE7D;AACA;AACA;AACO,MAAMoB,oBAAoB,GAAAhB,OAAA,CAAAgB,oBAAA,GAAG,sBAAsB;;AAE1D;AACA;AACA;AACO,MAAMC,sBAA8B,GAAAjB,OAAA,CAAAiB,sBAAA,GAAGrB,OAAO,CAAC,wBAAwB,CAAC;;AAE/E;AACA;AACO,MAAMsB,0BAA0B,GAAGA,CAAA,KAAcpB,yCAAuB;AAACE,OAAA,CAAAkB,0BAAA,GAAAA,0BAAA;AAAA,IAAAC,QAAA,GAAAnB,OAAA,CAAAoB,OAAA,GAEjExB,OAAO"}
1
+ {"version":3,"file":"LayoutHints.js","names":["_LayoutHintConfig","require","getHint","hint","LayoutHintConfiguration","MANDATORY","exports","DISABLED","DEPENDENT_ATTRIBUTE_CONTROL","DEPENDENT_ATTRIBUTE","CONFIRM_PASSWORD","SORT_OPTIONS","TITLE","DELETE_ACTION","UPDATE_ACTION","CREATE_ACTION","INITIAL_TOTAL_FILESIZE","MAX_TOTAL_FILESIZE","SHOW_ONE_RESULT_AS_DETAIL","HIDE_WHEN_EMPTY","INITIAL_FILTER","CASEVIEW_LINK","RENDER_SECTION_LABEL","HIDE_IN_USER_INTERFACE","getLayoutHintConfiguration","AVATAR_FOR_TITLE","AVATAR","_default","default"],"sources":["../../src/constants/LayoutHints.js"],"sourcesContent":["// @flow\nimport { LayoutHintConfiguration } from \"./LayoutHintConfig\";\n\n/**\n * Retrieve layout hint by id from the layout hint configuration\n */\nconst getHint = (hint: string): string => {\n if (LayoutHintConfiguration[hint]) {\n return LayoutHintConfiguration[hint].hint;\n }\n\n return \"\";\n};\n\n/**\n * Layout-hint: Indicates a mandatory attribute. Should be used together with the dependency hint.\n */\nexport const MANDATORY: string = getHint(\"MANDATORY\");\n\n/**\n * Layout-hint: Indicates a disabled attribute.\n * @constant\n */\nexport const DISABLED: string = getHint(\"DISABLED\");\n\n/*\n * --------------------------------\n * SELECT DEPENDENT ATTRIBUTES\n * --------------------------------\n */\n/**\n * Layout-hint: Marks the choice attribute where other attributes depend on. The unique control id is a unique id that can be used in the hint for the show|hide action on the dependent attribute.\n */\nexport const DEPENDENT_ATTRIBUTE_CONTROL = \"dependent-control\";\n/**\n */\nexport const DEPENDENT_ATTRIBUTE = \"dependent-attribute:\";\n\n/*\n * --------------------------------\n * ATTRIBUTES\n * --------------------------------\n */\n/**\n * Layout-hint: Password attribute must be confirmed using a second password attribute.\n */\nexport const CONFIRM_PASSWORD: string = getHint(\"CONFIRM_PASSWORD\");\n/**\n * Layout-hint: Sort options alphabetically\n */\nexport const SORT_OPTIONS: string = getHint(\"SORT_OPTIONS\");\n/**\n * Layout-hint: Marks an attribute as a title attribute\n */\nexport const TITLE: string = getHint(\"TITLE\");\n\n/*\n * --------------------------------\n * FORM\n * --------------------------------\n */\n/**\n * Layout-hint: Mark task as delete task\n */\nexport const DELETE_ACTION: string = getHint(\"DELETE_ACTION\");\n/**\n * Layout-hint: Mark task as update task\n */\nexport const UPDATE_ACTION: string = getHint(\"UPDATE_ACTION\");\n/**\n * Layout-hint: Mark task as create task\n */\nexport const CREATE_ACTION: string = getHint(\"CREATE_ACTION\");\n\n/*\n * --------------------------------\n * UPLOAD TOTAL FILE SIZE\n * --------------------------------\n */\n/**\n * Layout-hint: Used in conjunction with an upload attribute, this hint is set on a read only attribute containing the file size currently used.\n */\nexport const INITIAL_TOTAL_FILESIZE: string = getHint(\"INITIAL_TOTAL_FILESIZE\");\n/**\n * Layout-hint: Used in conjunction with an upload attribute, this hint is set on a read only attribute containing the maximum allowed total file size.\n */\nexport const MAX_TOTAL_FILESIZE: string = getHint(\"MAX_TOTAL_FILESIZE\");\n\n/*\n * --------------------------------\n * LISTS\n * --------------------------------\n */\n/**\n * Layout-hint: A list with only one detail must be shown as a detail\n */\nexport const SHOW_ONE_RESULT_AS_DETAIL: string = getHint(\n \"SHOW_ONE_RESULT_AS_DETAIL\",\n);\n/**\n * Layout-hint: A list without list-items and list-tasks should not be shown.\n */\nexport const HIDE_WHEN_EMPTY: string = getHint(\"HIDE_WHEN_EMPTY\");\n/**\n * Layout-hint: Sets a default value on a filter\n */\nexport const INITIAL_FILTER: string = \"initial-filter:\";\n/**\n * Layout-hint: Mark a case id reference attribute as the reference to the case view. Replaces the self link of a list item\n */\nexport const CASEVIEW_LINK: string = getHint(\"CASEVIEW_LINK\");\n\n/**\n * Layout-hint: Set on configuration of instruments to show content in a popover on a label\n */\nexport const RENDER_SECTION_LABEL = \"render-section-label\";\n\n/**\n * Layout-hint: Hide a link to a component\n */\nexport const HIDE_IN_USER_INTERFACE: string = getHint(\"HIDE_IN_USER_INTERFACE\");\n\n/**\n */\nexport const getLayoutHintConfiguration = (): Object => LayoutHintConfiguration;\n\n/**\n * Layout-hint: Marks an attribute as an avatar for the title attribute.\n */\nexport const AVATAR_FOR_TITLE: string = getHint(\"AVATAR_FOR_TITLE\");\n\nexport const AVATAR: string = getHint(\"AVATAR\");\n\nexport default getHint;\n"],"mappings":";;;;;;AACA,IAAAA,iBAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA,MAAMC,OAAO,GAAIC,IAAY,IAAa;EACxC,IAAIC,yCAAuB,CAACD,IAAI,CAAC,EAAE;IACjC,OAAOC,yCAAuB,CAACD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kBAAA,GAAGf,OAAO,CAAC,oBAAoB,CAAC;;AAEvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMgB,yBAAiC,GAAAZ,OAAA,CAAAY,yBAAA,GAAGhB,OAAO,CACtD,2BACF,CAAC;AACD;AACA;AACA;AACO,MAAMiB,eAAuB,GAAAb,OAAA,CAAAa,eAAA,GAAGjB,OAAO,CAAC,iBAAiB,CAAC;AACjE;AACA;AACA;AACO,MAAMkB,cAAsB,GAAAd,OAAA,CAAAc,cAAA,GAAG,iBAAiB;AACvD;AACA;AACA;AACO,MAAMC,aAAqB,GAAAf,OAAA,CAAAe,aAAA,GAAGnB,OAAO,CAAC,eAAe,CAAC;;AAE7D;AACA;AACA;AACO,MAAMoB,oBAAoB,GAAAhB,OAAA,CAAAgB,oBAAA,GAAG,sBAAsB;;AAE1D;AACA;AACA;AACO,MAAMC,sBAA8B,GAAAjB,OAAA,CAAAiB,sBAAA,GAAGrB,OAAO,CAAC,wBAAwB,CAAC;;AAE/E;AACA;AACO,MAAMsB,0BAA0B,GAAGA,CAAA,KAAcpB,yCAAuB;;AAE/E;AACA;AACA;AAFAE,OAAA,CAAAkB,0BAAA,GAAAA,0BAAA;AAGO,MAAMC,gBAAwB,GAAAnB,OAAA,CAAAmB,gBAAA,GAAGvB,OAAO,CAAC,kBAAkB,CAAC;AAE5D,MAAMwB,MAAc,GAAApB,OAAA,CAAAoB,MAAA,GAAGxB,OAAO,CAAC,QAAQ,CAAC;AAAC,IAAAyB,QAAA,GAAArB,OAAA,CAAAsB,OAAA,GAEjC1B,OAAO"}
@@ -51,7 +51,6 @@ class FileSizeConstraint {
51
51
  } else if (this.id === MAX_FILE_SIZE_ID) {
52
52
  return "Maximale bestandsgroote is ${max-filesize}"; // NOSONAR
53
53
  }
54
-
55
54
  return "";
56
55
  }
57
56
 
@@ -1 +1 @@
1
- {"version":3,"file":"FileSizeConstraint.js","names":["_fileSize","_interopRequireDefault","require","MAX_TOTAL_FILE_SIZE_ID","MAX_FILE_SIZE_ID","FileSizeConstraint","constructor","filesizeConstraint","_defineProperty2","default","_filesizeConstraint","id","isMaxTotal","fileSize","undefined","hasValidation","defaultMessage","filesize","human","maxTotalFileSize","parameters","validate","isMandatoryConstraint","_default","exports"],"sources":["../../../../src/models/attributes/input-constraints/FileSizeConstraint.js"],"sourcesContent":["// @flow\nimport filesize from \"file-size\";\n\nimport type { IConstraintModel, FilesizeConstraintsType } from \"../../types\";\n\nconst MAX_TOTAL_FILE_SIZE_ID = \"Constraint.File.MaxTotalFileSize\";\nconst MAX_FILE_SIZE_ID = \"Constraint.File.MaxFileSize\";\n\n/**\n */\nclass FileSizeConstraint implements IConstraintModel {\n _filesizeConstraint: FilesizeConstraintsType;\n\n /**\n */\n constructor(filesizeConstraint: FilesizeConstraintsType) {\n this._filesizeConstraint = filesizeConstraint;\n }\n\n /**\n */\n get id(): string {\n if (this.filesizeConstraint.isMaxTotal) {\n return MAX_TOTAL_FILE_SIZE_ID;\n } else if (this.filesizeConstraint.fileSize !== undefined) {\n return MAX_FILE_SIZE_ID;\n }\n\n return \"\";\n }\n\n /**\n */\n get filesizeConstraint(): FilesizeConstraintsType {\n return this._filesizeConstraint;\n }\n\n /**\n */\n hasValidation(): boolean {\n return false;\n }\n\n /**\n */\n get defaultMessage(): string {\n if (this.id === MAX_TOTAL_FILE_SIZE_ID) {\n return \"{filesize-left} van {max-total-filesize} over van totaal toegestaan upload bestandsgrootte\"; // NOSONAR\n } else if (this.id === MAX_FILE_SIZE_ID) {\n return \"Maximale bestandsgroote is ${max-filesize}\"; // NOSONAR\n }\n\n return \"\";\n }\n\n /**\n */\n get filesize(): any {\n return filesize(this.filesizeConstraint.fileSize).human(\"jedec\");\n }\n\n /**\n */\n get maxTotalFileSize(): any {\n return filesize(this.filesizeConstraint.maxTotalFileSize).human(\"jedec\");\n }\n\n /**\n */\n get parameters():\n | { ... }\n | { \"filesize-left\": any, \"max-total-filesize\": any }\n | { \"max-filesize\": any } {\n if (this.id === MAX_TOTAL_FILE_SIZE_ID) {\n return {\n \"filesize-left\": this.filesize,\n \"max-total-filesize\": this.maxTotalFileSize,\n };\n } else if (this.id === MAX_FILE_SIZE_ID) {\n return {\n \"max-filesize\": this.filesize,\n };\n }\n\n return {};\n }\n\n /**\n */\n validate(): boolean {\n return true;\n }\n\n /**\n */\n get isMandatoryConstraint(): boolean {\n return false;\n }\n}\n\nexport default FileSizeConstraint;\n"],"mappings":";;;;;;;;AACA,IAAAA,SAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA,MAAMC,sBAAsB,GAAG,kCAAkC;AACjE,MAAMC,gBAAgB,GAAG,6BAA6B;;AAEtD;AACA;AACA,MAAMC,kBAAkB,CAA6B;EAGnD;AACF;EACEC,WAAWA,CAACC,kBAA2C,EAAE;IAAA,IAAAC,gBAAA,CAAAC,OAAA;IACvD,IAAI,CAACC,mBAAmB,GAAGH,kBAAkB;EAC/C;;EAEA;AACF;EACE,IAAII,EAAEA,CAAA,EAAW;IACf,IAAI,IAAI,CAACJ,kBAAkB,CAACK,UAAU,EAAE;MACtC,OAAOT,sBAAsB;IAC/B,CAAC,MAAM,IAAI,IAAI,CAACI,kBAAkB,CAACM,QAAQ,KAAKC,SAAS,EAAE;MACzD,OAAOV,gBAAgB;IACzB;IAEA,OAAO,EAAE;EACX;;EAEA;AACF;EACE,IAAIG,kBAAkBA,CAAA,EAA4B;IAChD,OAAO,IAAI,CAACG,mBAAmB;EACjC;;EAEA;AACF;EACEK,aAAaA,CAAA,EAAY;IACvB,OAAO,KAAK;EACd;;EAEA;AACF;EACE,IAAIC,cAAcA,CAAA,EAAW;IAC3B,IAAI,IAAI,CAACL,EAAE,KAAKR,sBAAsB,EAAE;MACtC,OAAO,4FAA4F,CAAC,CAAC;IACvG,CAAC,MAAM,IAAI,IAAI,CAACQ,EAAE,KAAKP,gBAAgB,EAAE;MACvC,OAAO,4CAA4C,CAAC,CAAC;IACvD;;IAEA,OAAO,EAAE;EACX;;EAEA;AACF;EACE,IAAIa,QAAQA,CAAA,EAAQ;IAClB,OAAO,IAAAA,iBAAQ,EAAC,IAAI,CAACV,kBAAkB,CAACM,QAAQ,CAAC,CAACK,KAAK,CAAC,OAAO,CAAC;EAClE;;EAEA;AACF;EACE,IAAIC,gBAAgBA,CAAA,EAAQ;IAC1B,OAAO,IAAAF,iBAAQ,EAAC,IAAI,CAACV,kBAAkB,CAACY,gBAAgB,CAAC,CAACD,KAAK,CAAC,OAAO,CAAC;EAC1E;;EAEA;AACF;EACE,IAAIE,UAAUA,CAAA,EAGc;IAC1B,IAAI,IAAI,CAACT,EAAE,KAAKR,sBAAsB,EAAE;MACtC,OAAO;QACL,eAAe,EAAE,IAAI,CAACc,QAAQ;QAC9B,oBAAoB,EAAE,IAAI,CAACE;MAC7B,CAAC;IACH,CAAC,MAAM,IAAI,IAAI,CAACR,EAAE,KAAKP,gBAAgB,EAAE;MACvC,OAAO;QACL,cAAc,EAAE,IAAI,CAACa;MACvB,CAAC;IACH;IAEA,OAAO,CAAC,CAAC;EACX;;EAEA;AACF;EACEI,QAAQA,CAAA,EAAY;IAClB,OAAO,IAAI;EACb;;EAEA;AACF;EACE,IAAIC,qBAAqBA,CAAA,EAAY;IACnC,OAAO,KAAK;EACd;AACF;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAf,OAAA,GAEcJ,kBAAkB"}
1
+ {"version":3,"file":"FileSizeConstraint.js","names":["_fileSize","_interopRequireDefault","require","MAX_TOTAL_FILE_SIZE_ID","MAX_FILE_SIZE_ID","FileSizeConstraint","constructor","filesizeConstraint","_defineProperty2","default","_filesizeConstraint","id","isMaxTotal","fileSize","undefined","hasValidation","defaultMessage","filesize","human","maxTotalFileSize","parameters","validate","isMandatoryConstraint","_default","exports"],"sources":["../../../../src/models/attributes/input-constraints/FileSizeConstraint.js"],"sourcesContent":["// @flow\nimport filesize from \"file-size\";\n\nimport type { IConstraintModel, FilesizeConstraintsType } from \"../../types\";\n\nconst MAX_TOTAL_FILE_SIZE_ID = \"Constraint.File.MaxTotalFileSize\";\nconst MAX_FILE_SIZE_ID = \"Constraint.File.MaxFileSize\";\n\n/**\n */\nclass FileSizeConstraint implements IConstraintModel {\n _filesizeConstraint: FilesizeConstraintsType;\n\n /**\n */\n constructor(filesizeConstraint: FilesizeConstraintsType) {\n this._filesizeConstraint = filesizeConstraint;\n }\n\n /**\n */\n get id(): string {\n if (this.filesizeConstraint.isMaxTotal) {\n return MAX_TOTAL_FILE_SIZE_ID;\n } else if (this.filesizeConstraint.fileSize !== undefined) {\n return MAX_FILE_SIZE_ID;\n }\n\n return \"\";\n }\n\n /**\n */\n get filesizeConstraint(): FilesizeConstraintsType {\n return this._filesizeConstraint;\n }\n\n /**\n */\n hasValidation(): boolean {\n return false;\n }\n\n /**\n */\n get defaultMessage(): string {\n if (this.id === MAX_TOTAL_FILE_SIZE_ID) {\n return \"{filesize-left} van {max-total-filesize} over van totaal toegestaan upload bestandsgrootte\"; // NOSONAR\n } else if (this.id === MAX_FILE_SIZE_ID) {\n return \"Maximale bestandsgroote is ${max-filesize}\"; // NOSONAR\n }\n\n return \"\";\n }\n\n /**\n */\n get filesize(): any {\n return filesize(this.filesizeConstraint.fileSize).human(\"jedec\");\n }\n\n /**\n */\n get maxTotalFileSize(): any {\n return filesize(this.filesizeConstraint.maxTotalFileSize).human(\"jedec\");\n }\n\n /**\n */\n get parameters():\n | { ... }\n | { \"filesize-left\": any, \"max-total-filesize\": any }\n | { \"max-filesize\": any } {\n if (this.id === MAX_TOTAL_FILE_SIZE_ID) {\n return {\n \"filesize-left\": this.filesize,\n \"max-total-filesize\": this.maxTotalFileSize,\n };\n } else if (this.id === MAX_FILE_SIZE_ID) {\n return {\n \"max-filesize\": this.filesize,\n };\n }\n\n return {};\n }\n\n /**\n */\n validate(): boolean {\n return true;\n }\n\n /**\n */\n get isMandatoryConstraint(): boolean {\n return false;\n }\n}\n\nexport default FileSizeConstraint;\n"],"mappings":";;;;;;;;AACA,IAAAA,SAAA,GAAAC,sBAA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IAAIE,UAAUA,CAAA,EAGc;IAC1B,IAAI,IAAI,CAACT,EAAE,KAAKR,sBAAsB,EAAE;MACtC,OAAO;QACL,eAAe,EAAE,IAAI,CAACc,QAAQ;QAC9B,oBAAoB,EAAE,IAAI,CAACE;MAC7B,CAAC;IACH,CAAC,MAAM,IAAI,IAAI,CAACR,EAAE,KAAKP,gBAAgB,EAAE;MACvC,OAAO;QACL,cAAc,EAAE,IAAI,CAACa;MACvB,CAAC;IACH;IAEA,OAAO,CAAC,CAAC;EACX;;EAEA;AACF;EACEI,QAAQA,CAAA,EAAY;IAClB,OAAO,IAAI;EACb;;EAEA;AACF;EACE,IAAIC,qBAAqBA,CAAA,EAAY;IACnC,OAAO,KAAK;EACd;AACF;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAf,OAAA,GAEcJ,kBAAkB"}
@@ -191,6 +191,7 @@ class ContentModel extends _ResourceModel.default {
191
191
  href
192
192
  } = relatedConceptsLink;
193
193
  href.addParameter("entryDate", this.entryDate);
194
+ href.setReferenceHash(this.referenceHash);
194
195
  return href;
195
196
  }
196
197
  return null;
@@ -206,6 +206,7 @@ export default class ContentModel extends ResourceModel {
206
206
  if (relatedConceptsLink) {
207
207
  const { href } = relatedConceptsLink;
208
208
  href.addParameter("entryDate", this.entryDate);
209
+ href.setReferenceHash(this.referenceHash);
209
210
  return href;
210
211
  }
211
212
 
@@ -1 +1 @@
1
- {"version":3,"file":"ContentModel.js","names":["_ModularUIResponse","_interopRequireDefault","require","_ResourceModel","_FilterCollection","_ContentLinkModel","_SubSectionModel","_ContentTypeModel","_Constants","_SectionModel","ContentModel","ResourceModel","constructor","response","_defineProperty2","default","_section","SectionModel","data","entryDate","type","modelName","isApplicableModel","contributions","resourcetype","getInitialChildModelLinks","contentTypeLink","links","getLinkByKey","setChildModels","models","contentType","_find","call","model","section","id","_id","filterCollection","_filterCollection","_filter","FilterCollection","filter","entryDateFilter","getFilterByAttributeKey","TIMEVERSION_FILTER_NAME","attribute","value","_contentType","ContentTypeModel","label","number","body","childSectionLinks","selfContentLink","childSections","sections","subSections","relatedConceptsHrefs","hrefs","relatedConceptsHref","push","forEach","subSection","relatedConceptsLink","href","addParameter","referenceHash","exports"],"sources":["../../../src/models/content/ContentModel.js"],"sourcesContent":["// @flow\nimport ModularUIResponse from \"../../modularui/ModularUIResponse\";\n\nimport ResourceModel from \"../base/ResourceModel\";\nimport FilterCollection from \"../filters/FilterCollection\";\nimport ContentLinkModel from \"./ContentLinkModel\";\nimport SubSectionModel from \"./SubSectionModel\";\n\nimport ContentTypeModel from \"./ContentTypeModel\";\n\nimport { TIMEVERSION_FILTER_NAME } from \"../../constants/Constants\";\n\nimport type { ModularUIModel } from \"../types\";\nimport type LinkModel from \"../links/LinkModel\";\nimport type Href from \"../href/Href\";\nimport SectionModel from \"./SectionModel\";\n\n/**\n * Content detail model\n */\nexport default class ContentModel extends ResourceModel {\n _section: SectionModel;\n _contentType: ContentTypeModel | null = null;\n _filterCollection: FilterCollection;\n\n constructor(response: ModularUIResponse) {\n super(response);\n\n this._section = new SectionModel(this.data, this.entryDate);\n }\n\n /**\n */\n get type(): string {\n return \"Content\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"ContentModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"ContentDetail\"\n );\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n const contentTypeLink = this.links.getLinkByKey(\"contenttype\");\n\n if (contentTypeLink) {\n return [contentTypeLink];\n }\n\n return [];\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n this.contentType = models.find((model) => model.type === \"ContentType\");\n }\n\n /**\n */\n get section(): SectionModel {\n return this._section;\n }\n\n /**\n */\n get id(): string {\n return this.data._id;\n }\n\n /**\n * Retrieve available filters on concept toc\n */\n get filterCollection(): FilterCollection {\n if (!this._filterCollection && this.data.filter?.entryDate) {\n this._filterCollection = new FilterCollection(\n {\n entryDate: this.data.filter.entryDate,\n },\n {\n filter: this.contributions.filter,\n },\n );\n }\n\n return this._filterCollection;\n }\n\n /**\n * Retrieve entrydate of content toc\n */\n get entryDate(): ISO_DATE | null {\n const entryDateFilter = this.filterCollection?.getFilterByAttributeKey(\n TIMEVERSION_FILTER_NAME,\n );\n if (entryDateFilter && entryDateFilter.attribute) {\n return entryDateFilter.attribute.value;\n }\n\n return null;\n }\n\n /**\n * Get conceptType of concept\n */\n get contentType(): ContentTypeModel | null {\n return this._contentType;\n }\n\n /**\n * Set concept type\n */\n set contentType(contentType: ?ModularUIModel) {\n this._contentType =\n contentType instanceof ContentTypeModel ? contentType : null;\n }\n\n /**\n * Get content label\n */\n get label(): string {\n return this.section.label;\n }\n\n /**\n * Retrieve number of section\n */\n get number(): string | null {\n return this.section.number;\n }\n\n /**\n * Get content body\n */\n get body(): ?string {\n return this.section.body;\n }\n\n /**\n * Retrieve child section links\n */\n get childSectionLinks(): Array<ContentLinkModel> {\n return this.section.childSectionLinks;\n }\n\n /**\n */\n get selfContentLink(): ContentLinkModel {\n return this.section.selfContentLink;\n }\n\n /**\n * Get tree of child sections\n */\n get childSections(): Array<SectionModel> {\n return this.section.childSections;\n }\n\n /**\n * set resolved child sections\n */\n set childSections(sections: Array<SectionModel>) {\n this.section.childSections = sections || [];\n }\n\n /**\n * Get sub sections\n */\n get subSections(): Array<SubSectionModel> {\n return this.section.subSections;\n }\n\n /**\n */\n get relatedConceptsHrefs(): Array<Href> {\n const hrefs = [];\n if (this.relatedConceptsHref) {\n hrefs.push(this.relatedConceptsHref);\n }\n\n this.subSections.forEach((subSection) => {\n hrefs.push(...subSection.relatedConceptsHrefs);\n });\n\n return hrefs;\n }\n\n /**\n * Get related concepts link\n */\n get relatedConceptsHref(): Href | null {\n const relatedConceptsLink = this.links.getLinkByKey(\"relatedConcepts\");\n\n if (relatedConceptsLink) {\n const { href } = relatedConceptsLink;\n href.addParameter(\"entryDate\", this.entryDate);\n return href;\n }\n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AAU,CAACL,oBAAoB,CAAC;IAChD,CAAC,CAAC;IAEF,OAAOC,KAAK;EACd;;EAEA;AACF;AACA;EACE,IAAIC,mBAAmBA,CAAA,EAAgB;IACrC,MAAMI,mBAAmB,GAAG,IAAI,CAACrC,KAAK,CAACC,YAAY,CAAC,iBAAiB,CAAC;IAEtE,IAAIoC,mBAAmB,EAAE;MACvB,MAAM;QAAEC;MAAK,CAAC,GAAGD,mBAAmB;MACpCC,IAAI,CAACC,YAAY,CAAC,WAAW,EAAE,IAAI,CAAC/C,SAAS,CAAC;MAC9C,OAAO8C,IAAI;IACb;IAEA,OAAO,IAAI;EACb;;EAEA;AACF;EACE,IAAIE,aAAaA,CAAA,EAAW;IAC1B,OAAO,IAAI,CAAChC,OAAO,CAACgC,aAAa;EACnC;AACF;AAACC,OAAA,CAAArD,OAAA,GAAAL,YAAA"}
1
+ {"version":3,"file":"ContentModel.js","names":["_ModularUIResponse","_interopRequireDefault","require","_ResourceModel","_FilterCollection","_ContentLinkModel","_SubSectionModel","_ContentTypeModel","_Constants","_SectionModel","ContentModel","ResourceModel","constructor","response","_defineProperty2","default","_section","SectionModel","data","entryDate","type","modelName","isApplicableModel","contributions","resourcetype","getInitialChildModelLinks","contentTypeLink","links","getLinkByKey","setChildModels","models","contentType","_find","call","model","section","id","_id","filterCollection","_filterCollection","_filter","FilterCollection","filter","entryDateFilter","getFilterByAttributeKey","TIMEVERSION_FILTER_NAME","attribute","value","_contentType","ContentTypeModel","label","number","body","childSectionLinks","selfContentLink","childSections","sections","subSections","relatedConceptsHrefs","hrefs","relatedConceptsHref","push","forEach","subSection","relatedConceptsLink","href","addParameter","setReferenceHash","referenceHash","exports"],"sources":["../../../src/models/content/ContentModel.js"],"sourcesContent":["// @flow\nimport ModularUIResponse from \"../../modularui/ModularUIResponse\";\n\nimport ResourceModel from \"../base/ResourceModel\";\nimport FilterCollection from \"../filters/FilterCollection\";\nimport ContentLinkModel from \"./ContentLinkModel\";\nimport SubSectionModel from \"./SubSectionModel\";\n\nimport ContentTypeModel from \"./ContentTypeModel\";\n\nimport { TIMEVERSION_FILTER_NAME } from \"../../constants/Constants\";\n\nimport type { ModularUIModel } from \"../types\";\nimport type LinkModel from \"../links/LinkModel\";\nimport type Href from \"../href/Href\";\nimport SectionModel from \"./SectionModel\";\n\n/**\n * Content detail model\n */\nexport default class ContentModel extends ResourceModel {\n _section: SectionModel;\n _contentType: ContentTypeModel | null = null;\n _filterCollection: FilterCollection;\n\n constructor(response: ModularUIResponse) {\n super(response);\n\n this._section = new SectionModel(this.data, this.entryDate);\n }\n\n /**\n */\n get type(): string {\n return \"Content\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"ContentModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"ContentDetail\"\n );\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n const contentTypeLink = this.links.getLinkByKey(\"contenttype\");\n\n if (contentTypeLink) {\n return [contentTypeLink];\n }\n\n return [];\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n this.contentType = models.find((model) => model.type === \"ContentType\");\n }\n\n /**\n */\n get section(): SectionModel {\n return this._section;\n }\n\n /**\n */\n get id(): string {\n return this.data._id;\n }\n\n /**\n * Retrieve available filters on concept toc\n */\n get filterCollection(): FilterCollection {\n if (!this._filterCollection && this.data.filter?.entryDate) {\n this._filterCollection = new FilterCollection(\n {\n entryDate: this.data.filter.entryDate,\n },\n {\n filter: this.contributions.filter,\n },\n );\n }\n\n return this._filterCollection;\n }\n\n /**\n * Retrieve entrydate of content toc\n */\n get entryDate(): ISO_DATE | null {\n const entryDateFilter = this.filterCollection?.getFilterByAttributeKey(\n TIMEVERSION_FILTER_NAME,\n );\n if (entryDateFilter && entryDateFilter.attribute) {\n return entryDateFilter.attribute.value;\n }\n\n return null;\n }\n\n /**\n * Get conceptType of concept\n */\n get contentType(): ContentTypeModel | null {\n return this._contentType;\n }\n\n /**\n * Set concept type\n */\n set contentType(contentType: ?ModularUIModel) {\n this._contentType =\n contentType instanceof ContentTypeModel ? contentType : null;\n }\n\n /**\n * Get content label\n */\n get label(): string {\n return this.section.label;\n }\n\n /**\n * Retrieve number of section\n */\n get number(): string | null {\n return this.section.number;\n }\n\n /**\n * Get content body\n */\n get body(): ?string {\n return this.section.body;\n }\n\n /**\n * Retrieve child section links\n */\n get childSectionLinks(): Array<ContentLinkModel> {\n return this.section.childSectionLinks;\n }\n\n /**\n */\n get selfContentLink(): ContentLinkModel {\n return this.section.selfContentLink;\n }\n\n /**\n * Get tree of child sections\n */\n get childSections(): Array<SectionModel> {\n return this.section.childSections;\n }\n\n /**\n * set resolved child sections\n */\n set childSections(sections: Array<SectionModel>) {\n this.section.childSections = sections || [];\n }\n\n /**\n * Get sub sections\n */\n get subSections(): Array<SubSectionModel> {\n return this.section.subSections;\n }\n\n /**\n */\n get relatedConceptsHrefs(): Array<Href> {\n const hrefs = [];\n if (this.relatedConceptsHref) {\n hrefs.push(this.relatedConceptsHref);\n }\n\n this.subSections.forEach((subSection) => {\n hrefs.push(...subSection.relatedConceptsHrefs);\n });\n\n return hrefs;\n }\n\n /**\n * Get related concepts link\n */\n get relatedConceptsHref(): Href | null {\n const relatedConceptsLink = this.links.getLinkByKey(\"relatedConcepts\");\n\n if (relatedConceptsLink) {\n const { href } = relatedConceptsLink;\n href.addParameter(\"entryDate\", this.entryDate);\n href.setReferenceHash(this.referenceHash);\n return href;\n }\n\n return null;\n }\n\n /**\n */\n get referenceHash(): number {\n return this.section.referenceHash;\n }\n}\n"],"mappings":";;;;;;;;;;AACA,IAAAA,kBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,cAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,iBAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,iBAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,gBAAA,GAAAL,sBA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,CAAC,WAAW,EAAE,IAAI,CAAC/C,SAAS,CAAC;MAC9C8C,IAAI,CAACE,gBAAgB,CAAC,IAAI,CAACC,aAAa,CAAC;MACzC,OAAOH,IAAI;IACb;IAEA,OAAO,IAAI;EACb;;EAEA;AACF;EACE,IAAIG,aAAaA,CAAA,EAAW;IAC1B,OAAO,IAAI,CAACjC,OAAO,CAACiC,aAAa;EACnC;AACF;AAACC,OAAA,CAAAtD,OAAA,GAAAL,YAAA"}
@@ -116,7 +116,11 @@ class SubSectionModel extends _BaseModel.default {
116
116
  get relatedConceptsHref() {
117
117
  const relatedConceptsLink = this.links.getLinkByKey("relatedConcepts");
118
118
  if (relatedConceptsLink) {
119
- return relatedConceptsLink.href;
119
+ const {
120
+ href
121
+ } = relatedConceptsLink;
122
+ href.setReferenceHash(this.referenceHash);
123
+ return href;
120
124
  }
121
125
  return null;
122
126
  }
@@ -121,7 +121,9 @@ export default class SubSectionModel extends BaseModel {
121
121
  const relatedConceptsLink = this.links.getLinkByKey("relatedConcepts");
122
122
 
123
123
  if (relatedConceptsLink) {
124
- return relatedConceptsLink.href;
124
+ const { href } = relatedConceptsLink;
125
+ href.setReferenceHash(this.referenceHash);
126
+ return href;
125
127
  }
126
128
 
127
129
  return null;
@@ -131,7 +133,6 @@ export default class SubSectionModel extends BaseModel {
131
133
  */
132
134
  get referenceHash(): number {
133
135
  const selfhref = this.selfhref || new Href();
134
-
135
136
  return createHashFromHref(selfhref);
136
137
  }
137
138
 
@@ -1 +1 @@
1
- {"version":3,"file":"SubSectionModel.js","names":["_createHash","require","_BaseModel","_interopRequireDefault","_LinkCollection","_Href","_LinkModel","_utils","SubSectionModel","BaseModel","constructor","data","_defineProperty2","default","referred","id","_id","key","body","getData","retrieveText","number","label","subSections","_context","_map","call","subSection","links","_links","LinkCollection","contributions","selflink","getLinkByKey","selfhref","href","relatedConceptsHrefs","hrefs","relatedConceptsHref","push","forEach","relatedConceptsLink","referenceHash","Href","createHashFromHref","getReferredSections","sections","referredChilds","exports"],"sources":["../../../src/models/content/SubSectionModel.js"],"sourcesContent":["// @flow\nimport { createHashFromHref } from \"../../utils/helpers/createHash\";\n\nimport BaseModel from \"../base/BaseModel\";\nimport LinkCollection from \"../links/LinkCollection\";\nimport Href from \"../href/Href\";\nimport LinkModel from \"../links/LinkModel\";\nimport { retrieveText } from \"../../utils\";\n\n/**\n * Link to a concept\n */\nexport default class SubSectionModel extends BaseModel {\n _links: LinkCollection;\n\n /**\n */\n constructor(data: Object) {\n super(data, {});\n }\n\n /**\n */\n get referred(): boolean {\n return this.data.referred;\n }\n\n /**\n */\n get id(): string {\n return this.data.id || this.data._id;\n }\n\n /**\n * Retrieve key of subsection\n */\n get key(): ?string {\n return this.id;\n }\n\n /**\n * Retrieve html body\n */\n get body(): string {\n const body = this.getData(\"body\", \"\");\n return retrieveText(body);\n }\n\n /**\n * Retrieve number of section\n */\n get number(): string | null {\n return this.data.number ?? null;\n }\n\n /**\n * Retrieve label of section\n */\n get label(): ?string {\n return this.data.label;\n }\n\n /**\n * Get sub sections\n */\n get subSections(): Array<SubSectionModel> {\n return this.data.subSections\n ? this.data.subSections.map(\n (subSection) => new SubSectionModel(subSection),\n )\n : [];\n }\n\n /**\n * Retrieve links of section\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 * Get self link of model\n */\n get selflink(): LinkModel | null {\n return this.links.getLinkByKey(\"self\");\n }\n\n /**\n * Return default self link of resource\n */\n get selfhref(): Href | null {\n return this.selflink ? this.selflink.href : null;\n }\n\n /**\n */\n get relatedConceptsHrefs(): Array<Href> {\n const hrefs = [];\n if (this.relatedConceptsHref) {\n hrefs.push(this.relatedConceptsHref);\n }\n\n this.subSections.forEach((subSection) => {\n hrefs.push(...subSection.relatedConceptsHrefs);\n });\n\n return hrefs;\n }\n\n /**\n * Get related concepts link\n */\n get relatedConceptsHref(): Href | null {\n const relatedConceptsLink = this.links.getLinkByKey(\"relatedConcepts\");\n\n if (relatedConceptsLink) {\n return relatedConceptsLink.href;\n }\n\n return null;\n }\n\n /**\n */\n get referenceHash(): number {\n const selfhref = this.selfhref || new Href();\n\n return createHashFromHref(selfhref);\n }\n\n /**\n */\n getReferredSections(): Array<SubSectionModel> {\n const sections = [];\n\n for (const subSection of this.subSections) {\n if (subSection.referred) {\n sections.push(subSection);\n }\n\n const referredChilds = subSection.getReferredSections();\n sections.push(...referredChilds);\n }\n\n return sections;\n }\n}\n"],"mappings":";;;;;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,eAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,KAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,UAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AAEA;AACA;AACA;AACe,MAAMO,eAAe,SAASC,kBAAS,CAAC;EAGrD;AACF;EACEC,WAAWA,CAACC,IAAY,EAAE;IACxB,KAAK,CAACA,IAAI,EAAE,CAAC,CAAC,CAAC;IAAC,IAAAC,gBAAA,CAAAC,OAAA;EAClB;;EAEA;AACF;EACE,IAAIC,QAAQA,CAAA,EAAY;IACtB,OAAO,IAAI,CAACH,IAAI,CAACG,QAAQ;EAC3B;;EAEA;AACF;EACE,IAAIC,EAAEA,CAAA,EAAW;IACf,OAAO,IAAI,CAACJ,IAAI,CAACI,EAAE,IAAI,IAAI,CAACJ,IAAI,CAACK,GAAG;EACtC;;EAEA;AACF;AACA;EACE,IAAIC,GAAGA,CAAA,EAAY;IACjB,OAAO,IAAI,CAACF,EAAE;EAChB;;EAEA;AACF;AACA;EACE,IAAIG,IAAIA,CAAA,EAAW;IACjB,MAAMA,IAAI,GAAG,IAAI,CAACC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;IACrC,OAAO,IAAAC,mBAAY,EAACF,IAAI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ACiB,OAAO,CAAEb,UAAU,IAAK;MACvCU,KAAK,CAACE,IAAI,CAAC,GAAGZ,UAAU,CAACS,oBAAoB,CAAC;IAChD,CAAC,CAAC;IAEF,OAAOC,KAAK;EACd;;EAEA;AACF;AACA;EACE,IAAIC,mBAAmBA,CAAA,EAAgB;IACrC,MAAMG,mBAAmB,GAAG,IAAI,CAACb,KAAK,CAACK,YAAY,CAAC,iBAAiB,CAAC;IAEtE,IAAIQ,mBAAmB,EAAE;MACvB,OAAOA,mBAAmB,CAACN,IAAI;IACjC;IAEA,OAAO,IAAI;EACb;;EAEA;AACF;EACE,IAAIO,aAAaA,CAAA,EAAW;IAC1B,MAAMR,QAAQ,GAAG,IAAI,CAACA,QAAQ,IAAI,IAAIS,aAAI,CAAC,CAAC;IAE5C,OAAO,IAAAC,8BAAkB,EAACV,QAAQ,CAAC;EACrC;;EAEA;AACF;EACEW,mBAAmBA,CAAA,EAA2B;IAC5C,MAAMC,QAAQ,GAAG,EAAE;IAEnB,KAAK,MAAMnB,UAAU,IAAI,IAAI,CAACJ,WAAW,EAAE;MACzC,IAAII,UAAU,CAACb,QAAQ,EAAE;QACvBgC,QAAQ,CAACP,IAAI,CAACZ,UAAU,CAAC;MAC3B;MAEA,MAAMoB,cAAc,GAAGpB,UAAU,CAACkB,mBAAmB,CAAC,CAAC;MACvDC,QAAQ,CAACP,IAAI,CAAC,GAAGQ,cAAc,CAAC;IAClC;IAEA,OAAOD,QAAQ;EACjB;AACF;AAACE,OAAA,CAAAnC,OAAA,GAAAL,eAAA"}
1
+ {"version":3,"file":"SubSectionModel.js","names":["_createHash","require","_BaseModel","_interopRequireDefault","_LinkCollection","_Href","_LinkModel","_utils","SubSectionModel","BaseModel","constructor","data","_defineProperty2","default","referred","id","_id","key","body","getData","retrieveText","number","label","subSections","_context","_map","call","subSection","links","_links","LinkCollection","contributions","selflink","getLinkByKey","selfhref","href","relatedConceptsHrefs","hrefs","relatedConceptsHref","push","forEach","relatedConceptsLink","setReferenceHash","referenceHash","Href","createHashFromHref","getReferredSections","sections","referredChilds","exports"],"sources":["../../../src/models/content/SubSectionModel.js"],"sourcesContent":["// @flow\nimport { createHashFromHref } from \"../../utils/helpers/createHash\";\n\nimport BaseModel from \"../base/BaseModel\";\nimport LinkCollection from \"../links/LinkCollection\";\nimport Href from \"../href/Href\";\nimport LinkModel from \"../links/LinkModel\";\nimport { retrieveText } from \"../../utils\";\n\n/**\n * Link to a concept\n */\nexport default class SubSectionModel extends BaseModel {\n _links: LinkCollection;\n\n /**\n */\n constructor(data: Object) {\n super(data, {});\n }\n\n /**\n */\n get referred(): boolean {\n return this.data.referred;\n }\n\n /**\n */\n get id(): string {\n return this.data.id || this.data._id;\n }\n\n /**\n * Retrieve key of subsection\n */\n get key(): ?string {\n return this.id;\n }\n\n /**\n * Retrieve html body\n */\n get body(): string {\n const body = this.getData(\"body\", \"\");\n return retrieveText(body);\n }\n\n /**\n * Retrieve number of section\n */\n get number(): string | null {\n return this.data.number ?? null;\n }\n\n /**\n * Retrieve label of section\n */\n get label(): ?string {\n return this.data.label;\n }\n\n /**\n * Get sub sections\n */\n get subSections(): Array<SubSectionModel> {\n return this.data.subSections\n ? this.data.subSections.map(\n (subSection) => new SubSectionModel(subSection),\n )\n : [];\n }\n\n /**\n * Retrieve links of section\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 * Get self link of model\n */\n get selflink(): LinkModel | null {\n return this.links.getLinkByKey(\"self\");\n }\n\n /**\n * Return default self link of resource\n */\n get selfhref(): Href | null {\n return this.selflink ? this.selflink.href : null;\n }\n\n /**\n */\n get relatedConceptsHrefs(): Array<Href> {\n const hrefs = [];\n if (this.relatedConceptsHref) {\n hrefs.push(this.relatedConceptsHref);\n }\n\n this.subSections.forEach((subSection) => {\n hrefs.push(...subSection.relatedConceptsHrefs);\n });\n\n return hrefs;\n }\n\n /**\n * Get related concepts link\n */\n get relatedConceptsHref(): Href | null {\n const relatedConceptsLink = this.links.getLinkByKey(\"relatedConcepts\");\n\n if (relatedConceptsLink) {\n const { href } = relatedConceptsLink;\n href.setReferenceHash(this.referenceHash);\n return href;\n }\n\n return null;\n }\n\n /**\n */\n get referenceHash(): number {\n const selfhref = this.selfhref || new Href();\n return createHashFromHref(selfhref);\n }\n\n /**\n */\n getReferredSections(): Array<SubSectionModel> {\n const sections = [];\n\n for (const subSection of this.subSections) {\n if (subSection.referred) {\n sections.push(subSection);\n }\n\n const referredChilds = subSection.getReferredSections();\n sections.push(...referredChilds);\n }\n\n return sections;\n }\n}\n"],"mappings":";;;;;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,eAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,KAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,UAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AAEA;AACA;AACA;AACe,MAAMO,eAAe,SAASC,kBAAS,CAAC;EAGrD;AACF;EACEC,WAAWA,CAACC,IAAY,EAAE;IACxB,KAAK,CAACA,IAAI,EAAE,CAAC,CAAC,CAAC;IAAC,IAAAC,gBAAA,CAAAC,OAAA;EAClB;;EAEA;AACF;EACE,IAAIC,QAAQA,CAAA,EAAY;IACtB,OAAO,IAAI,CAACH,IAAI,CAACG,QAAQ;EAC3B;;EAEA;AACF;EACE,IAAIC,EAAEA,CAAA,EAAW;IACf,OAAO,IAAI,CAACJ,IAAI,CAACI,EAAE,IAAI,IAAI,CAACJ,IAAI,CAACK,GAAG;EACtC;;EAEA;AACF;AACA;EACE,IAAIC,GAAGA,CAAA,EAAY;IACjB,OAAO,IAAI,CAACF,EAAE;EAChB;;EAEA;AACF;AACA;EACE,IAAIG,IAAIA,CAAA,EAAW;IACjB,MAAMA,IAAI,GAAG,IAAI,CAACC,OAAO,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I,CAAC,IAAI,CAACD,mBAAmB,CAAC;IACtC;IAEA,IAAI,CAACf,WAAW,CAACiB,OAAO,CAAEb,UAAU,IAAK;MACvCU,KAAK,CAACE,IAAI,CAAC,GAAGZ,UAAU,CAACS,oBAAoB,CAAC;IAChD,CAAC,CAAC;IAEF,OAAOC,KAAK;EACd;;EAEA;AACF;AACA;EACE,IAAIC,mBAAmBA,CAAA,EAAgB;IACrC,MAAMG,mBAAmB,GAAG,IAAI,CAACb,KAAK,CAACK,YAAY,CAAC,iBAAiB,CAAC;IAEtE,IAAIQ,mBAAmB,EAAE;MACvB,MAAM;QAAEN;MAAK,CAAC,GAAGM,mBAAmB;MACpCN,IAAI,CAACO,gBAAgB,CAAC,IAAI,CAACC,aAAa,CAAC;MACzC,OAAOR,IAAI;IACb;IAEA,OAAO,IAAI;EACb;;EAEA;AACF;EACE,IAAIQ,aAAaA,CAAA,EAAW;IAC1B,MAAMT,QAAQ,GAAG,IAAI,CAACA,QAAQ,IAAI,IAAIU,aAAI,CAAC,CAAC;IAC5C,OAAO,IAAAC,8BAAkB,EAACX,QAAQ,CAAC;EACrC;;EAEA;AACF;EACEY,mBAAmBA,CAAA,EAA2B;IAC5C,MAAMC,QAAQ,GAAG,EAAE;IAEnB,KAAK,MAAMpB,UAAU,IAAI,IAAI,CAACJ,WAAW,EAAE;MACzC,IAAII,UAAU,CAACb,QAAQ,EAAE;QACvBiC,QAAQ,CAACR,IAAI,CAACZ,UAAU,CAAC;MAC3B;MAEA,MAAMqB,cAAc,GAAGrB,UAAU,CAACmB,mBAAmB,CAAC,CAAC;MACvDC,QAAQ,CAACR,IAAI,CAAC,GAAGS,cAAc,CAAC;IAClC;IAEA,OAAOD,QAAQ;EACjB;AACF;AAACE,OAAA,CAAApC,OAAA,GAAAL,eAAA"}
@@ -176,6 +176,9 @@ describe("contentmodel", () => {
176
176
  expect(firstSubSection.relatedConceptsHref.href.toString()).toBe(
177
177
  "/content/Incident/Business design/Content/Blaastest subsections.formalsource/Pass/relatedConcepts",
178
178
  );
179
+ expect(firstSubSection.relatedConceptsHref.getReferenceHash()).toBe(
180
+ 145842294,
181
+ );
179
182
  expect(firstSubSection.referenceHash).toBe(145842294);
180
183
  });
181
184
  });
@@ -10,6 +10,7 @@ var _includes = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-s
10
10
  var _filter = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/filter"));
11
11
  var _keys = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/keys"));
12
12
  var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
13
+ var _find = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/find"));
13
14
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
14
15
  var _objects = require("../../utils/helpers/objects");
15
16
  var _ActionCollection = _interopRequireDefault(require("../actions/ActionCollection"));
@@ -108,7 +109,12 @@ class DetailModel extends _ResourceModel.default {
108
109
  */
109
110
  get attributes() {
110
111
  var _context3;
111
- return (0, _filter.default)(_context3 = this.attributeCollection.all).call(_context3, attribute => !attribute.layouthint.has(_LayoutHints.TITLE) && !attribute.isHidden);
112
+ return (0, _filter.default)(_context3 = this.attributeCollection.all).call(_context3, attribute => {
113
+ const hasTitle = attribute.layouthint.hasExact(_LayoutHints.TITLE);
114
+ const hasAvatar = attribute.layouthint.hasExact(_LayoutHints.AVATAR);
115
+ const hasAvatarForTitle = attribute.layouthint.hasExact(_LayoutHints.AVATAR_FOR_TITLE);
116
+ return !attribute.isHidden && (!hasTitle || hasTitle && hasAvatar) && (!hasAvatarForTitle || hasAvatarForTitle && !hasAvatar);
117
+ });
112
118
  }
113
119
 
114
120
  /**
@@ -167,11 +173,24 @@ class DetailModel extends _ResourceModel.default {
167
173
  return this.contributions.resourcetype === "CaseView";
168
174
  }
169
175
 
176
+ /**
177
+ * Getting the attribute that has as layout hint 'avatar-for-title'
178
+ */
179
+ get avatarForTitleAttribute() {
180
+ var _context5;
181
+ const avatarAttributes = (0, _filter.default)(_context5 = this._attributeCollection.all).call(_context5, attribute => attribute.layouthint.hasExact(_LayoutHints.AVATAR));
182
+ const avatarForTitleAttribute = (0, _find.default)(avatarAttributes).call(avatarAttributes, attribute => attribute.layouthint.hasExact(_LayoutHints.AVATAR_FOR_TITLE));
183
+ return avatarForTitleAttribute || null;
184
+ }
185
+
170
186
  /**
171
187
  * Getting the attribute that has as layout hint 'title'
172
188
  */
173
189
  get titleAttribute() {
174
- return this._attributeCollection.getAttributeByLayoutHint(_LayoutHints.TITLE);
190
+ var _context6;
191
+ const nonAvatarAttributes = (0, _filter.default)(_context6 = this._attributeCollection.all).call(_context6, attribute => !attribute.layouthint.hasExact(_LayoutHints.AVATAR));
192
+ const titleAttribute = (0, _find.default)(nonAvatarAttributes).call(nonAvatarAttributes, attribute => attribute.layouthint.has(_LayoutHints.TITLE));
193
+ return titleAttribute || null;
175
194
  }
176
195
 
177
196
  /**
@@ -5,7 +5,7 @@ import ActionCollection from "../actions/ActionCollection";
5
5
  import AttributeCollection from "../attributes/AttributeCollection";
6
6
  import ResourceModel from "../base/ResourceModel";
7
7
 
8
- import { TITLE } from "../../constants/LayoutHints";
8
+ import { AVATAR, AVATAR_FOR_TITLE, TITLE } from "../../constants/LayoutHints";
9
9
 
10
10
  import type { ModularUIResponse } from "../../modularui";
11
11
  import type { ModularUIModel, AttributeType } from "../types";
@@ -115,9 +115,16 @@ export default class DetailModel extends ResourceModel {
115
115
  * Retrieve list of visible attributes
116
116
  */
117
117
  get attributes(): Array<AttributeType> {
118
- return this.attributeCollection.all.filter(
119
- (attribute) => !attribute.layouthint.has(TITLE) && !attribute.isHidden,
120
- );
118
+ return this.attributeCollection.all.filter((attribute) => {
119
+ const hasTitle = attribute.layouthint.hasExact(TITLE);
120
+ const hasAvatar = attribute.layouthint.hasExact(AVATAR);
121
+ const hasAvatarForTitle = attribute.layouthint.hasExact(AVATAR_FOR_TITLE);
122
+ return (
123
+ !attribute.isHidden &&
124
+ (!hasTitle || (hasTitle && hasAvatar)) &&
125
+ (!hasAvatarForTitle || (hasAvatarForTitle && !hasAvatar))
126
+ );
127
+ });
121
128
  }
122
129
 
123
130
  /**
@@ -185,11 +192,34 @@ export default class DetailModel extends ResourceModel {
185
192
  return this.contributions.resourcetype === "CaseView";
186
193
  }
187
194
 
195
+ /**
196
+ * Getting the attribute that has as layout hint 'avatar-for-title'
197
+ */
198
+ get avatarForTitleAttribute(): ?AttributeType {
199
+ const avatarAttributes = this._attributeCollection.all.filter((attribute) =>
200
+ attribute.layouthint.hasExact(AVATAR),
201
+ );
202
+
203
+ const avatarForTitleAttribute = avatarAttributes.find((attribute) =>
204
+ attribute.layouthint.hasExact(AVATAR_FOR_TITLE),
205
+ );
206
+
207
+ return avatarForTitleAttribute || null;
208
+ }
209
+
188
210
  /**
189
211
  * Getting the attribute that has as layout hint 'title'
190
212
  */
191
213
  get titleAttribute(): ?AttributeType {
192
- return this._attributeCollection.getAttributeByLayoutHint(TITLE);
214
+ const nonAvatarAttributes = this._attributeCollection.all.filter(
215
+ (attribute) => !attribute.layouthint.hasExact(AVATAR),
216
+ );
217
+
218
+ const titleAttribute = nonAvatarAttributes.find((attribute) =>
219
+ attribute.layouthint.has(TITLE),
220
+ );
221
+
222
+ return titleAttribute || null;
193
223
  }
194
224
 
195
225
  /**