@beinformed/ui 1.54.3 → 1.55.1

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 (59) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/esm/hooks/useModelCatalog.js +1 -1
  3. package/esm/hooks/useModelCatalog.js.map +1 -1
  4. package/esm/models/concepts/ConceptDetailModel.js +7 -0
  5. package/esm/models/concepts/ConceptDetailModel.js.map +1 -1
  6. package/esm/models/concepts/ConceptIndexModel.js +7 -0
  7. package/esm/models/concepts/ConceptIndexModel.js.map +1 -1
  8. package/esm/models/concepts/ConceptTypeDetailModel.js +7 -0
  9. package/esm/models/concepts/ConceptTypeDetailModel.js.map +1 -1
  10. package/esm/models/index.js +1 -0
  11. package/esm/models/index.js.map +1 -1
  12. package/esm/models/modelcatalog/ModelCatalogModel.js +8 -1
  13. package/esm/models/modelcatalog/ModelCatalogModel.js.map +1 -1
  14. package/esm/models/modelcatalog/ModelCategoryCollection.js +16 -0
  15. package/esm/models/modelcatalog/ModelCategoryCollection.js.map +1 -0
  16. package/esm/models/modelcatalog/ModelCategoryModel.js +53 -0
  17. package/esm/models/modelcatalog/ModelCategoryModel.js.map +1 -0
  18. package/esm/redux/_modularui/ModularUIConnector.js +4 -4
  19. package/esm/redux/_modularui/ModularUIConnector.js.map +1 -1
  20. package/lib/hooks/useModelCatalog.js +1 -1
  21. package/lib/hooks/useModelCatalog.js.flow +8 -1
  22. package/lib/hooks/useModelCatalog.js.map +1 -1
  23. package/lib/models/concepts/ConceptDetailModel.js +7 -0
  24. package/lib/models/concepts/ConceptDetailModel.js.flow +7 -0
  25. package/lib/models/concepts/ConceptDetailModel.js.map +1 -1
  26. package/lib/models/concepts/ConceptIndexModel.js +7 -0
  27. package/lib/models/concepts/ConceptIndexModel.js.flow +7 -0
  28. package/lib/models/concepts/ConceptIndexModel.js.map +1 -1
  29. package/lib/models/concepts/ConceptTypeDetailModel.js +7 -0
  30. package/lib/models/concepts/ConceptTypeDetailModel.js.flow +7 -0
  31. package/lib/models/concepts/ConceptTypeDetailModel.js.map +1 -1
  32. package/lib/models/index.js +7 -0
  33. package/lib/models/index.js.flow +1 -0
  34. package/lib/models/index.js.map +1 -1
  35. package/lib/models/modelcatalog/ModelCatalogModel.js +8 -0
  36. package/lib/models/modelcatalog/ModelCatalogModel.js.flow +11 -1
  37. package/lib/models/modelcatalog/ModelCatalogModel.js.map +1 -1
  38. package/lib/models/modelcatalog/ModelCategoryCollection.js +24 -0
  39. package/lib/models/modelcatalog/ModelCategoryCollection.js.flow +22 -0
  40. package/lib/models/modelcatalog/ModelCategoryCollection.js.map +1 -0
  41. package/lib/models/modelcatalog/ModelCategoryModel.js +60 -0
  42. package/lib/models/modelcatalog/ModelCategoryModel.js.flow +63 -0
  43. package/lib/models/modelcatalog/ModelCategoryModel.js.map +1 -0
  44. package/lib/models/modelcatalog/__tests__/ModelCatalogModel.spec.js.flow +22 -0
  45. package/lib/redux/_modularui/ModularUIConnector.js +4 -4
  46. package/lib/redux/_modularui/ModularUIConnector.js.flow +4 -5
  47. package/lib/redux/_modularui/ModularUIConnector.js.map +1 -1
  48. package/package.json +1 -1
  49. package/src/hooks/useModelCatalog.js +8 -1
  50. package/src/models/concepts/ConceptDetailModel.js +7 -0
  51. package/src/models/concepts/ConceptIndexModel.js +7 -0
  52. package/src/models/concepts/ConceptTypeDetailModel.js +7 -0
  53. package/src/models/index.js +1 -0
  54. package/src/models/modelcatalog/ModelCatalogModel.js +11 -1
  55. package/src/models/modelcatalog/ModelCategoryCollection.js +22 -0
  56. package/src/models/modelcatalog/ModelCategoryModel.js +63 -0
  57. package/src/models/modelcatalog/__mock__/data.json +19 -1
  58. package/src/models/modelcatalog/__tests__/ModelCatalogModel.spec.js +22 -0
  59. package/src/redux/_modularui/ModularUIConnector.js +4 -5
package/CHANGELOG.md CHANGED
@@ -2,6 +2,22 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
4
4
 
5
+ ## [1.55.1](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/compare/v1.55.0...v1.55.1) (2024-09-26)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **modularui-connector:** modelentry might be undefined ([db90795](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/commit/db90795e4f6ce6572a54ddfc42bbdab9eb7d9937))
11
+
12
+ ## [1.55.0](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/compare/v1.54.3...v1.55.0) (2024-09-25)
13
+
14
+
15
+ ### Features
16
+
17
+ * **modelcatalog:** add model categories to the modelcatalog model ([8ef0880](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/commit/8ef088011a08e74ec712d6123ca7dad6400b8a05))
18
+ * **modelcatalog:** add modelcategory to the concept index, concept type and concept detail model ([6936026](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/commit/69360266cf3f8a4216962ebd523df08d8765ea02))
19
+ * **modelcatalog:** add modelcategory to the modelcatalog hooks ([c17110f](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/commit/c17110f2dac27b4504108fc12efd695741e3de2e))
20
+
5
21
  ## [1.54.3](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/compare/v1.54.2...v1.54.3) (2024-09-18)
6
22
 
7
23
 
@@ -23,7 +23,7 @@ export const useModelCatalog = options => useModularUIBasic("modelcatalog", "/mo
23
23
  export const useConceptIndex = function (href) {
24
24
  let key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "conceptindex";
25
25
  let options = arguments.length > 2 ? arguments[2] : undefined;
26
- const url = filterParameters(href, ["entryDate", "index", "label", "type"]);
26
+ const url = filterParameters(href, ["entryDate", "index", "label", "modelcategory", "type"]);
27
27
  return useModularUIBasic(key, url, {
28
28
  expectedModels: ["ConceptIndex"],
29
29
  targetModel: ConceptIndexModel,
@@ -1 +1 @@
1
- {"version":3,"file":"useModelCatalog.js","names":["useLocation","createHref","filterParameters","ModelCatalogModel","ConceptIndexModel","ConceptDetailModel","default","BusinessScenarioModel","ContentIndexModel","ContentTOCModel","ContentModel","useModularUIBasic","ContentTypeModel","useModelCatalog","options","expectedModels","targetModel","useConceptIndex","href","key","arguments","length","undefined","url","useConceptDetail","concept","location","useContentIndex","useContentTOC","content","useContent","contentSection","useContentType","contentType","getSearchHref","uri","filters","filterString","_Object$keys","filterValue","value","Array","isArray","join","replace","push","useConceptSearch","useContentSearch"],"sources":["../../src/hooks/useModelCatalog.js"],"sourcesContent":["// @flow\nimport { useLocation } from \"./useRouter\";\n\nimport { createHref, filterParameters } from \"../utils/helpers/createHref\";\n\nimport ModelCatalogModel from \"../models/modelcatalog/ModelCatalogModel\";\nimport ConceptIndexModel from \"../models/concepts/ConceptIndexModel\";\nimport ConceptDetailModel from \"../models/concepts/ConceptDetailModel\";\nimport { default as BusinessScenarioModel } from \"../models/concepts/BusinessScenarioModel\";\nimport ContentIndexModel from \"../models/content/ContentIndexModel\";\nimport ContentTOCModel from \"../models/content/ContentTOCModel\";\nimport ContentModel from \"../models/content/ContentModel\";\n\nimport { useModularUIBasic } from \"./useModularUIBasic\";\nimport { ContentTypeModel } from \"../models\";\n\nimport type { UseModularUIBasicOptions } from \"./useModularUIBasic\";\nexport type SearchFilter = {\n index?: string,\n label?: string,\n type?: string | Array<string>,\n entryDate?: string,\n};\n\n/**\n */\nexport const useModelCatalog = (\n options?: UseModularUIBasicOptions<ModelCatalogModel>,\n): ?ModelCatalogModel =>\n useModularUIBasic(\"modelcatalog\", \"/modelcatalog\", {\n expectedModels: [\"ModelCatalog\"],\n targetModel: ModelCatalogModel,\n ...options,\n });\n\n/**\n */\nexport const useConceptIndex = (\n href: string,\n key?: string = \"conceptindex\",\n options?: UseModularUIBasicOptions<ConceptIndexModel>,\n): ?ConceptIndexModel => {\n const url = filterParameters(href, [\"entryDate\", \"index\", \"label\", \"type\"]);\n return useModularUIBasic(key, url, {\n expectedModels: [\"ConceptIndex\"],\n targetModel: ConceptIndexModel,\n ...options,\n });\n};\n\n/**\n */\nexport const useConceptDetail = (\n concept: string,\n key?: string = \"conceptdetail\",\n options?: UseModularUIBasicOptions<\n ConceptDetailModel | BusinessScenarioModel,\n >,\n): ?ConceptDetailModel | ?BusinessScenarioModel => {\n const location = useLocation();\n\n const href = createHref(\"concepts\", concept, location, [\"entryDate\"]);\n return useModularUIBasic(key, href, {\n expectedModels: [\"ConceptDetail\", \"BusinessScenario\"],\n ...options,\n });\n};\n\n/**\n */\nexport const useContentIndex = (\n href: string,\n key?: string = \"contentindex\",\n options?: UseModularUIBasicOptions<ContentIndexModel>,\n): ?ContentIndexModel => {\n const url = filterParameters(href, [\"index\", \"label\", \"type\"]);\n return useModularUIBasic(key, url, {\n expectedModels: [\"ContentIndex\"],\n targetModel: ContentIndexModel,\n ...options,\n });\n};\n\n/**\n */\nexport const useContentTOC = (\n content: string,\n key?: string = \"contenttoc\",\n options?: UseModularUIBasicOptions<ContentTOCModel>,\n): ?ContentTOCModel => {\n const location = useLocation();\n const href = createHref(\"content\", content, location, [\"entryDate\"]);\n return useModularUIBasic(key, href, {\n expectedModels: [\"ContentTOC\"],\n targetModel: ContentTOCModel,\n ...options,\n });\n};\n\n/**\n */\nexport const useContent = (\n contentSection: string,\n key?: string = \"content\",\n options?: UseModularUIBasicOptions<ContentModel>,\n): ?ContentModel => {\n const href = createHref(\"content\", contentSection, null, [\"entryDate\"]);\n return useModularUIBasic(key, href, {\n expectedModels: [\"Content\"],\n targetModel: ContentModel,\n ...options,\n });\n};\n\n/**\n */\nexport const useContentType = (\n contentType: string,\n key?: string = \"contenttypes\",\n options?: UseModularUIBasicOptions<ContentTypeModel>,\n): ?ContentTypeModel => {\n const href = createHref(\"contenttypes\", contentType, null, [\"entryDate\"]);\n return useModularUIBasic(key, href, {\n expectedModels: [\"ContentType\"],\n targetModel: ContentTypeModel,\n ...options,\n });\n};\n\n/**\n */\nconst getSearchHref = (uri: string, filters: SearchFilter): string => {\n const filterString = [];\n\n for (const key of Object.keys(filters)) {\n const filterValue = filters[key];\n if (filterValue) {\n let value: string = Array.isArray(filterValue)\n ? filterValue.join(\",\")\n : filterValue;\n if (key === \"type\") {\n value = value.replace(\"#\", \"%23\"); // handles un-encoded #\n }\n filterString.push(`${key}=${value}`);\n }\n }\n\n return filterString.length ? `${uri}?${filterString.join(\"&\")}` : uri;\n};\n\n/**\n */\nexport const useConceptSearch = (\n filters: SearchFilter,\n key?: string = \"conceptSearch\",\n options?: UseModularUIBasicOptions<ConceptIndexModel>,\n): ?ConceptIndexModel => {\n const href = getSearchHref(\"/concepts\", filters);\n return useConceptIndex(href, key, options);\n};\n\n/**\n */\nexport const useContentSearch = (\n filters: SearchFilter,\n key?: string = \"contentSearch\",\n options?: UseModularUIBasicOptions<ContentIndexModel>,\n): ?ContentIndexModel => {\n const href = getSearchHref(\"/content\", filters);\n return useContentIndex(href, key, options);\n};\n"],"mappings":";AACA,SAASA,WAAW,QAAQ,aAAa;AAEzC,SAASC,UAAU,EAAEC,gBAAgB,QAAQ,6BAA6B;AAE1E,OAAOC,iBAAiB,MAAM,0CAA0C;AACxE,OAAOC,iBAAiB,MAAM,sCAAsC;AACpE,OAAOC,kBAAkB,MAAM,uCAAuC;AACtE,SAASC,OAAO,IAAIC,qBAAqB,QAAQ,0CAA0C;AAC3F,OAAOC,iBAAiB,MAAM,qCAAqC;AACnE,OAAOC,eAAe,MAAM,mCAAmC;AAC/D,OAAOC,YAAY,MAAM,gCAAgC;AAEzD,SAASC,iBAAiB,QAAQ,qBAAqB;AACvD,SAASC,gBAAgB,QAAQ,WAAW;AAU5C;AACA;AACA,OAAO,MAAMC,eAAe,GAC1BC,OAAqD,IAErDH,iBAAiB,CAAC,cAAc,EAAE,eAAe,EAAE;EACjDI,cAAc,EAAE,CAAC,cAAc,CAAC;EAChCC,WAAW,EAAEb,iBAAiB;EAC9B,GAAGW;AACL,CAAC,CAAC;;AAEJ;AACA;AACA,OAAO,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AAC;IACtC;EACF;EAEA,OAAOH,YAAY,CAAChB,MAAM,GAAG,GAAGc,GAAG,IAAIE,YAAY,CAACM,IAAI,CAAC,GAAG,CAAC,EAAE,GAAGR,GAAG;AACvE,CAAC;;AAED;AACA;AACA,OAAO,MAAMW,gBAAgB,GAAG,SAAAA,CAC9BV,OAAqB,EAGE;EAAA,IAFvBjB,GAAY,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,eAAe;EAAA,IAC9BN,OAAqD,GAAAM,SAAA,CAAAC,MAAA,OAAAD,SAAA,MAAAE,SAAA;EAErD,MAAMJ,IAAI,GAAGgB,aAAa,CAAC,WAAW,EAAEE,OAAO,CAAC;EAChD,OAAOnB,eAAe,CAACC,IAAI,EAAEC,GAAG,EAAEL,OAAO,CAAC;AAC5C,CAAC;;AAED;AACA;AACA,OAAO,MAAMiC,gBAAgB,GAAG,SAAAA,CAC9BX,OAAqB,EAGE;EAAA,IAFvBjB,GAAY,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,eAAe;EAAA,IAC9BN,OAAqD,GAAAM,SAAA,CAAAC,MAAA,OAAAD,SAAA,MAAAE,SAAA;EAErD,MAAMJ,IAAI,GAAGgB,aAAa,CAAC,UAAU,EAAEE,OAAO,CAAC;EAC/C,OAAOT,eAAe,CAACT,IAAI,EAAEC,GAAG,EAAEL,OAAO,CAAC;AAC5C,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"useModelCatalog.js","names":["useLocation","createHref","filterParameters","ModelCatalogModel","ConceptIndexModel","ConceptDetailModel","default","BusinessScenarioModel","ContentIndexModel","ContentTOCModel","ContentModel","useModularUIBasic","ContentTypeModel","useModelCatalog","options","expectedModels","targetModel","useConceptIndex","href","key","arguments","length","undefined","url","useConceptDetail","concept","location","useContentIndex","useContentTOC","content","useContent","contentSection","useContentType","contentType","getSearchHref","uri","filters","filterString","_Object$keys","filterValue","value","Array","isArray","join","replace","push","useConceptSearch","useContentSearch"],"sources":["../../src/hooks/useModelCatalog.js"],"sourcesContent":["// @flow\nimport { useLocation } from \"./useRouter\";\n\nimport { createHref, filterParameters } from \"../utils/helpers/createHref\";\n\nimport ModelCatalogModel from \"../models/modelcatalog/ModelCatalogModel\";\nimport ConceptIndexModel from \"../models/concepts/ConceptIndexModel\";\nimport ConceptDetailModel from \"../models/concepts/ConceptDetailModel\";\nimport { default as BusinessScenarioModel } from \"../models/concepts/BusinessScenarioModel\";\nimport ContentIndexModel from \"../models/content/ContentIndexModel\";\nimport ContentTOCModel from \"../models/content/ContentTOCModel\";\nimport ContentModel from \"../models/content/ContentModel\";\n\nimport { useModularUIBasic } from \"./useModularUIBasic\";\nimport { ContentTypeModel } from \"../models\";\n\nimport type { UseModularUIBasicOptions } from \"./useModularUIBasic\";\nexport type SearchFilter = {\n index?: string,\n label?: string,\n type?: string | Array<string>,\n modelCategory?: string | Array<string>,\n entryDate?: string,\n};\n\n/**\n */\nexport const useModelCatalog = (\n options?: UseModularUIBasicOptions<ModelCatalogModel>,\n): ?ModelCatalogModel =>\n useModularUIBasic(\"modelcatalog\", \"/modelcatalog\", {\n expectedModels: [\"ModelCatalog\"],\n targetModel: ModelCatalogModel,\n ...options,\n });\n\n/**\n */\nexport const useConceptIndex = (\n href: string,\n key?: string = \"conceptindex\",\n options?: UseModularUIBasicOptions<ConceptIndexModel>,\n): ?ConceptIndexModel => {\n const url = filterParameters(href, [\n \"entryDate\",\n \"index\",\n \"label\",\n \"modelcategory\",\n \"type\",\n ]);\n return useModularUIBasic(key, url, {\n expectedModels: [\"ConceptIndex\"],\n targetModel: ConceptIndexModel,\n ...options,\n });\n};\n\n/**\n */\nexport const useConceptDetail = (\n concept: string,\n key?: string = \"conceptdetail\",\n options?: UseModularUIBasicOptions<\n ConceptDetailModel | BusinessScenarioModel,\n >,\n): ?ConceptDetailModel | ?BusinessScenarioModel => {\n const location = useLocation();\n\n const href = createHref(\"concepts\", concept, location, [\"entryDate\"]);\n return useModularUIBasic(key, href, {\n expectedModels: [\"ConceptDetail\", \"BusinessScenario\"],\n ...options,\n });\n};\n\n/**\n */\nexport const useContentIndex = (\n href: string,\n key?: string = \"contentindex\",\n options?: UseModularUIBasicOptions<ContentIndexModel>,\n): ?ContentIndexModel => {\n const url = filterParameters(href, [\"index\", \"label\", \"type\"]);\n return useModularUIBasic(key, url, {\n expectedModels: [\"ContentIndex\"],\n targetModel: ContentIndexModel,\n ...options,\n });\n};\n\n/**\n */\nexport const useContentTOC = (\n content: string,\n key?: string = \"contenttoc\",\n options?: UseModularUIBasicOptions<ContentTOCModel>,\n): ?ContentTOCModel => {\n const location = useLocation();\n const href = createHref(\"content\", content, location, [\"entryDate\"]);\n return useModularUIBasic(key, href, {\n expectedModels: [\"ContentTOC\"],\n targetModel: ContentTOCModel,\n ...options,\n });\n};\n\n/**\n */\nexport const useContent = (\n contentSection: string,\n key?: string = \"content\",\n options?: UseModularUIBasicOptions<ContentModel>,\n): ?ContentModel => {\n const href = createHref(\"content\", contentSection, null, [\"entryDate\"]);\n return useModularUIBasic(key, href, {\n expectedModels: [\"Content\"],\n targetModel: ContentModel,\n ...options,\n });\n};\n\n/**\n */\nexport const useContentType = (\n contentType: string,\n key?: string = \"contenttypes\",\n options?: UseModularUIBasicOptions<ContentTypeModel>,\n): ?ContentTypeModel => {\n const href = createHref(\"contenttypes\", contentType, null, [\"entryDate\"]);\n return useModularUIBasic(key, href, {\n expectedModels: [\"ContentType\"],\n targetModel: ContentTypeModel,\n ...options,\n });\n};\n\n/**\n */\nconst getSearchHref = (uri: string, filters: SearchFilter): string => {\n const filterString = [];\n\n for (const key of Object.keys(filters)) {\n const filterValue = filters[key];\n if (filterValue) {\n let value: string = Array.isArray(filterValue)\n ? filterValue.join(\",\")\n : filterValue;\n if (key === \"type\") {\n value = value.replace(\"#\", \"%23\"); // handles un-encoded #\n }\n filterString.push(`${key}=${value}`);\n }\n }\n\n return filterString.length ? `${uri}?${filterString.join(\"&\")}` : uri;\n};\n\n/**\n */\nexport const useConceptSearch = (\n filters: SearchFilter,\n key?: string = \"conceptSearch\",\n options?: UseModularUIBasicOptions<ConceptIndexModel>,\n): ?ConceptIndexModel => {\n const href = getSearchHref(\"/concepts\", filters);\n return useConceptIndex(href, key, options);\n};\n\n/**\n */\nexport const useContentSearch = (\n filters: SearchFilter,\n key?: string = \"contentSearch\",\n options?: UseModularUIBasicOptions<ContentIndexModel>,\n): ?ContentIndexModel => {\n const href = getSearchHref(\"/content\", filters);\n return useContentIndex(href, key, options);\n};\n"],"mappings":";AACA,SAASA,WAAW,QAAQ,aAAa;AAEzC,SAASC,UAAU,EAAEC,gBAAgB,QAAQ,6BAA6B;AAE1E,OAAOC,iBAAiB,MAAM,0CAA0C;AACxE,OAAOC,iBAAiB,MAAM,sCAAsC;AACpE,OAAOC,kBAAkB,MAAM,uCAAuC;AACtE,SAASC,OAAO,IAAIC,qBAAqB,QAAQ,0CAA0C;AAC3F,OAAOC,iBAAiB,MAAM,qCAAqC;AACnE,OAAOC,eAAe,MAAM,mCAAmC;AAC/D,OAAOC,YAAY,MAAM,gCAAgC;AAEzD,SAASC,iBAAiB,QAAQ,qBAAqB;AACvD,SAASC,gBAAgB,QAAQ,WAAW;AAW5C;AACA;AACA,OAAO,MAAMC,eAAe,GAC1BC,OAAqD,IAErDH,iBAAiB,CAAC,cAAc,EAAE,eAAe,EAAE;EACjDI,cAAc,EAAE,CAAC,cAAc,CAAC;EAChCC,WAAW,EAAEb,iBAAiB;EAC9B,GAAGW;AACL,CAAC,CAAC;;AAEJ;AACA;AACA,OAAO,MAAMG,eAAe,GAAG,SAAAA,CAC7BC,IAAY,EAGW;EAAA,IAFvBC,GAAY,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,cAAc;EAAA,IAC7BN,OAAqD,GAAAM,SAAA,CAAAC,MAAA,OAAAD,SAAA,MAAAE,SAAA;EAErD,MAA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jB,GAAY,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,eAAe;EAAA,IAC9BN,OAAqD,GAAAM,SAAA,CAAAC,MAAA,OAAAD,SAAA,MAAAE,SAAA;EAErD,MAAMJ,IAAI,GAAGgB,aAAa,CAAC,WAAW,EAAEE,OAAO,CAAC;EAChD,OAAOnB,eAAe,CAACC,IAAI,EAAEC,GAAG,EAAEL,OAAO,CAAC;AAC5C,CAAC;;AAED;AACA;AACA,OAAO,MAAMiC,gBAAgB,GAAG,SAAAA,CAC9BX,OAAqB,EAGE;EAAA,IAFvBjB,GAAY,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,eAAe;EAAA,IAC9BN,OAAqD,GAAAM,SAAA,CAAAC,MAAA,OAAAD,SAAA,MAAAE,SAAA;EAErD,MAAMJ,IAAI,GAAGgB,aAAa,CAAC,UAAU,EAAEE,OAAO,CAAC;EAC/C,OAAOT,eAAe,CAACT,IAAI,EAAEC,GAAG,EAAEL,OAAO,CAAC;AAC5C,CAAC","ignoreList":[]}
@@ -113,6 +113,13 @@ export default class ConceptDetailModel extends ResourceModel {
113
113
  return this.data.conceptLabel;
114
114
  }
115
115
 
116
+ /**
117
+ * Get model category of the concept
118
+ */
119
+ get modelCategory() {
120
+ return this.getData("modelCategory", "");
121
+ }
122
+
116
123
  /**
117
124
  * Get taxonomy type
118
125
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ConceptDetailModel.js","names":["ResourceModel","ConceptRelationCollection","SourceReferenceCollection","ConceptTypeDetailModel","TIMEVERSION_FILTER_NAME","ConceptDetailModel","constructor","modularuiResponse","_defineProperty","_relations","data","relations","entryDate","type","modelName","isApplicableModel","contributions","resourcetype","getInitialChildModelLinks","conceptTypeLink","links","getLinkByKey","relationsCollectionLinks","relationsCollection","isCacheable","setChildModels","models","errors","conceptTypeModel","_findInstanceProperty","call","model","conceptType","key","getData","selfhref","href","selflink","setParameter","removeParameter","diagramLinks","getLinksByGroup","_conceptType","label","conceptLabel","taxonomyType","formula","labels","_context","labelTypes","_mapInstanceProperty","labelType","_context2","setting","_id","getLabelElementByIds","ids","_context3","_filterInstanceProperty","_includesInstanceProperty","conceptProperties","_context4","propertyTypes","propertyType","_context5","properties","property","getConceptPropertiesByIds","_context6","textfragments","_context7","_context9","textFragments","textFragment","_context8","textFragmentConfig","textFragmentTypes","textFragmentType","notConfiguredTextFragments","some","textfragment","getTextFragmentByKeys","keys","_context10","getSourceReferenceCollection","availableLocales","arguments","length","undefined","_sourceReferences","getSourceReferencesForCurrentLanguage","LANGUAGE_POSTFIX_LENGTH","sourceReferences","_context11","_context14","availableLanguagesInSourceReferences","sourceReference","substring","currentLanguagePostfix","locale","_context12","_context13","_endsWithInstanceProperty","availableLanguages","split","value","isOfConceptType","conceptTypeId","hasMetamodelIdInConceptTypeHierarchy","metamodelId","hasMetamodelIdInHierarchy"],"sources":["../../../src/models/concepts/ConceptDetailModel.js"],"sourcesContent":["// @flow\nimport ResourceModel from \"../base/ResourceModel\";\nimport ConceptRelationCollection from \"./ConceptRelationCollection\";\nimport SourceReferenceCollection from \"./SourceReferenceCollection\";\nimport ConceptTypeDetailModel from \"./ConceptTypeDetailModel\";\n\nimport { TIMEVERSION_FILTER_NAME } from \"../../constants/Constants\";\n\nimport type {\n ModularUIModel,\n labelsJSON,\n textfragmentJSON,\n propertyJSON,\n} from \"../types\";\nimport type { ModularUIResponse } from \"../../modularui\";\nimport type Href from \"../href/Href\";\nimport type LinkModel from \"../links/LinkModel\";\nimport type LinkCollection from \"../links/LinkCollection\";\nimport type ErrorResponse from \"../error/ErrorResponse\";\n\n/**\n * Model for concept details, available through modelcatalog\n */\nexport default class ConceptDetailModel extends ResourceModel {\n _relations: ConceptRelationCollection;\n _conceptType: ?ConceptTypeDetailModel;\n _sourceReferences: SourceReferenceCollection;\n\n /**\n */\n constructor(modularuiResponse: ModularUIResponse) {\n super(modularuiResponse);\n\n this._relations = new ConceptRelationCollection(\n this.data.relations,\n this.entryDate,\n );\n }\n\n /**\n */\n get type(): string {\n return \"ConceptDetail\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"ConceptDetailModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"ConceptDetail\"\n );\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n const conceptTypeLink = this.links.getLinkByKey(\"concepttype\");\n const relationsCollectionLinks =\n this.relationsCollection.getInitialChildModelLinks();\n\n if (conceptTypeLink) {\n conceptTypeLink.isCacheable = true;\n return [conceptTypeLink, ...relationsCollectionLinks];\n }\n\n return relationsCollectionLinks;\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>, errors: Array<ErrorResponse>) {\n // $FlowExpectedError[incompatible-type]\n const conceptTypeModel: ?ConceptTypeDetailModel = models.find(\n (model) => model instanceof ConceptTypeDetailModel,\n );\n\n if (conceptTypeModel) {\n this.conceptType = conceptTypeModel;\n }\n\n this.relationsCollection.setChildModels(models, errors);\n }\n\n /**\n * Retrieve concept detail identifier as key for this model\n */\n get key(): string {\n return this.getData(\"_id\", \"concept\");\n }\n\n /**\n * Getting the self link of this Concept\n */\n get selfhref(): Href {\n const { href } = this.selflink;\n\n if (this.entryDate) {\n href.setParameter(TIMEVERSION_FILTER_NAME, this.entryDate);\n } else {\n href.removeParameter(TIMEVERSION_FILTER_NAME);\n }\n\n return href;\n }\n\n /**\n * Available diagrams for the concept, most of the time just one\n */\n get diagramLinks(): LinkCollection {\n return this.links.getLinksByGroup(\"diagram\");\n }\n\n /**\n * Get conceptType of concept\n */\n get conceptType(): ?ConceptTypeDetailModel {\n return this._conceptType;\n }\n\n /**\n */\n set conceptType(conceptType: ?ConceptTypeDetailModel) {\n this._conceptType = conceptType;\n }\n\n /**\n * Get concept label\n */\n get label(): string {\n return this.data.conceptLabel;\n }\n\n /**\n * Get taxonomy type\n */\n get taxonomyType(): string {\n return this.getData(\"taxonomyType\", \"default\");\n }\n\n /**\n * Get concept relations collection\n */\n get relationsCollection(): ConceptRelationCollection {\n return this._relations;\n }\n\n /**\n * Get concept formula\n */\n get formula(): string {\n return this.data.formula;\n }\n\n /**\n * Get additional labels of concept\n */\n get labels(): Array<labelsJSON> {\n return this.conceptType && this.conceptType.labelTypes\n ? this.conceptType.labelTypes.map((labelType) => {\n const setting = this.data.labels\n ? this.data.labels.find((label) => label.type === labelType._id)\n : {};\n\n return {\n ...labelType,\n ...setting,\n };\n })\n : [];\n }\n\n /**\n * Get label elements by id\n */\n getLabelElementByIds(ids: Array<string>): Array<labelsJSON> {\n return this.labels.filter((label: labelsJSON) => ids.includes(label._id));\n }\n\n /**\n * Get concept properties\n */\n get conceptProperties(): Array<propertyJSON> {\n return this.conceptType && this.conceptType.propertyTypes\n ? this.conceptType.propertyTypes.map((propertyType) => {\n const setting = this.data.properties\n ? this.data.properties.find(\n (property) => property.type === propertyType._id,\n )\n : {};\n\n return {\n ...propertyType,\n ...setting,\n };\n })\n : [];\n }\n\n /**\n * Get concept properties by id\n */\n getConceptPropertiesByIds(ids: Array<string>): Array<propertyJSON> {\n return this.conceptProperties.filter((property) =>\n ids.includes(property._id),\n );\n }\n\n /**\n * Get Text fragments\n */\n get textfragments(): Array<textfragmentJSON> {\n const textFragments = this.data.textFragments\n ? this.data.textFragments.map((textFragment) => {\n const textFragmentConfig =\n this.conceptType &&\n this.conceptType.textFragmentTypes.find(\n (textFragmentType) => textFragment.type === textFragmentType._id,\n );\n\n return {\n ...textFragmentConfig,\n ...textFragment,\n };\n })\n : [];\n\n const notConfiguredTextFragments =\n this.conceptType && this.conceptType.textFragmentTypes\n ? this.conceptType.textFragmentTypes.filter((textFragmentType) => {\n if (!this.data.textFragments) {\n return true;\n }\n\n return !this.data.textFragments.some(\n (textfragment) => textfragment.type === textFragmentType._id,\n );\n })\n : [];\n\n return [...textFragments, ...notConfiguredTextFragments];\n }\n\n /**\n * Get text fragments by id\n */\n getTextFragmentByKeys(keys: Array<string>): Array<textfragmentJSON> {\n return this.textfragments.filter((textfragment) =>\n keys.includes(textfragment.type),\n );\n }\n\n /**\n * Get source reference collection\n */\n getSourceReferenceCollection(\n availableLocales: Array<string> = [],\n ): SourceReferenceCollection {\n if (!this._sourceReferences) {\n this._sourceReferences = new SourceReferenceCollection(\n this.getSourceReferencesForCurrentLanguage(availableLocales),\n this.entryDate,\n );\n }\n\n return this._sourceReferences;\n }\n\n /*\n * Retrieve all sourceReferenceTypes that are valid for the current language\n * Used by sourceRef collection\n */\n /**\n */\n getSourceReferencesForCurrentLanguage(\n availableLocales: Array<string>,\n ): Array<Object> {\n const LANGUAGE_POSTFIX_LENGTH = 3;\n if (this.data.sourceReferences) {\n const availableLanguagesInSourceReferences =\n this.data.sourceReferences.map((sourceReference) =>\n sourceReference.type.substring(\n sourceReference.type.length - LANGUAGE_POSTFIX_LENGTH,\n ),\n );\n\n const currentLanguagePostfix = `_${this.locale}`;\n\n if (\n availableLanguagesInSourceReferences.includes(currentLanguagePostfix)\n ) {\n // return all sourceReferences that end with language that is selected\n return this.data.sourceReferences.filter((sourceReference) =>\n sourceReference.type.endsWith(currentLanguagePostfix),\n );\n }\n\n const availableLanguages = availableLocales.map(\n (locale) => `_${locale.split(\"-\")[0]}`,\n );\n\n // return all sourceReferences that do not end with language postfix\n return this.data.sourceReferences.filter(\n (sourceReference) =>\n !availableLanguages.includes(\n sourceReference.type.substring(\n sourceReference.type.length - LANGUAGE_POSTFIX_LENGTH,\n ),\n ),\n );\n }\n return [];\n }\n\n /**\n * Retrieve entrydate\n */\n get entryDate(): string | null {\n return this.data.filter?.[TIMEVERSION_FILTER_NAME]?.value ?? null;\n }\n\n /**\n * Indicates if the given concept type id or href exists in the hierarchy of concept types for this concept\n */\n isOfConceptType(conceptTypeId: string): boolean {\n return this.conceptType?.isOfConceptType(conceptTypeId) ?? false;\n }\n\n /**\n * Indicates if the given metamodel functional identifier exists in the hierarchy of concept types for this concept\n */\n hasMetamodelIdInConceptTypeHierarchy(metamodelId: string): boolean {\n return this.conceptType?.hasMetamodelIdInHierarchy(metamodelId) ?? false;\n }\n}\n"],"mappings":";;;;;;AACA,OAAOA,aAAa,MAAM,uBAAuB;AACjD,OAAOC,yBAAyB,MAAM,6BAA6B;AACnE,OAAOC,yBAAyB,MAAM,6BAA6B;AACnE,OAAOC,sBAAsB,MAAM,0BAA0B;AAE7D,SAASC,uBAAuB,QAAQ,2BAA2B;AAcnE;AACA;AACA;AACA,eAAe,MAAMC,kBAAkB,SAASL,aAAa,CAAC;EAK5D;AACF;EACEM,WAAWA,CAACC,iBAAoC,EAAE;IAChD,KAAK,CAACA,iBAAiB,CAAC;IAACC,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAEzB,IAAI,CAACC,UAAU,GAAG,IAAIR,yBAAyB,CAC7C,IAAI,CAACS,IAAI,CAACC,SAAS,EACnB,IAAI,CAACC,SACP,CAAC;EACH;;EAEA;AACF;EACE,IAAIC,IAAIA,CAAA,EAAW;IACjB,OAAO,eAAe;EACxB;;EAEA;AACF;EACE,WAAWC,SAASA,CAAA,EAAW;IAC7B,OAAO,oBAAoB;EAC7B;;EAEA;AACF;EACE,OAAOC,iBAAiBA,CAACL,IAAuB,EAAW;IACzD,OACEA,IAAI,CAACM,aAAa,CAACC,YAAY,IAC/BP,IAAI,CAACM,aAAa,CAACC,YAAY,KAAK,eAAe;EAEvD;;EAEA;AACF;EACEC,yBAAyBA,CAAA,EAAqB;IAC5C,MAAMC,eAAe,GAAG,IAAI,CAACC,KAAK,CAACC,YAAY,CAAC,aAAa,CAAC;IAC9D,MAAMC,wBAAwB,GAC5B,IAAI,CAACC,mBAAmB,CAACL,yBAAyB,CAAC,CAAC;IAEtD,IAAIC,eAAe,EAAE;MACnBA,eAAe,CAACK,WAAW,GAAG,IAAI;MAClC,OAAO,CAACL,eAAe,EAAE,GAAGG,wBAAwB,CAAC;IACvD;IAEA,OAAOA,w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AA,CAAA4C,kBAAkB,EAAAzE,IAAA,CAAlByE,kBAAkB,EACjBP,eAAe,CAACnF,IAAI,CAACoF,SAAS,CAC5BD,eAAe,CAACnF,IAAI,CAAC0E,MAAM,GAAGI,uBAChC,CACF,CACJ,CAAC;IACH;IACA,OAAO,EAAE;EACX;;EAEA;AACF;AACA;EACE,IAAI/E,SAASA,CAAA,EAAkB;IAC7B,OAAO8C,uBAAA,KAAI,CAAChD,IAAI,IAAUN,uBAAuB,CAAC,EAAEqG,KAAK,IAAI,IAAI;EACnE;;EAEA;AACF;AACA;EACEC,eAAeA,CAACC,aAAqB,EAAW;IAC9C,OAAO,IAAI,CAAC3E,WAAW,EAAE0E,eAAe,CAACC,aAAa,CAAC,IAAI,KAAK;EAClE;;EAEA;AACF;AACA;EACEC,oCAAoCA,CAACC,WAAmB,EAAW;IACjE,OAAO,IAAI,CAAC7E,WAAW,EAAE8E,yBAAyB,CAACD,WAAW,CAAC,IAAI,KAAK;EAC1E;AACF","ignoreList":[]}
1
+ {"version":3,"file":"ConceptDetailModel.js","names":["ResourceModel","ConceptRelationCollection","SourceReferenceCollection","ConceptTypeDetailModel","TIMEVERSION_FILTER_NAME","ConceptDetailModel","constructor","modularuiResponse","_defineProperty","_relations","data","relations","entryDate","type","modelName","isApplicableModel","contributions","resourcetype","getInitialChildModelLinks","conceptTypeLink","links","getLinkByKey","relationsCollectionLinks","relationsCollection","isCacheable","setChildModels","models","errors","conceptTypeModel","_findInstanceProperty","call","model","conceptType","key","getData","selfhref","href","selflink","setParameter","removeParameter","diagramLinks","getLinksByGroup","_conceptType","label","conceptLabel","modelCategory","taxonomyType","formula","labels","_context","labelTypes","_mapInstanceProperty","labelType","_context2","setting","_id","getLabelElementByIds","ids","_context3","_filterInstanceProperty","_includesInstanceProperty","conceptProperties","_context4","propertyTypes","propertyType","_context5","properties","property","getConceptPropertiesByIds","_context6","textfragments","_context7","_context9","textFragments","textFragment","_context8","textFragmentConfig","textFragmentTypes","textFragmentType","notConfiguredTextFragments","some","textfragment","getTextFragmentByKeys","keys","_context10","getSourceReferenceCollection","availableLocales","arguments","length","undefined","_sourceReferences","getSourceReferencesForCurrentLanguage","LANGUAGE_POSTFIX_LENGTH","sourceReferences","_context11","_context14","availableLanguagesInSourceReferences","sourceReference","substring","currentLanguagePostfix","locale","_context12","_context13","_endsWithInstanceProperty","availableLanguages","split","value","isOfConceptType","conceptTypeId","hasMetamodelIdInConceptTypeHierarchy","metamodelId","hasMetamodelIdInHierarchy"],"sources":["../../../src/models/concepts/ConceptDetailModel.js"],"sourcesContent":["// @flow\nimport ResourceModel from \"../base/ResourceModel\";\nimport ConceptRelationCollection from \"./ConceptRelationCollection\";\nimport SourceReferenceCollection from \"./SourceReferenceCollection\";\nimport ConceptTypeDetailModel from \"./ConceptTypeDetailModel\";\n\nimport { TIMEVERSION_FILTER_NAME } from \"../../constants/Constants\";\n\nimport type {\n ModularUIModel,\n labelsJSON,\n textfragmentJSON,\n propertyJSON,\n} from \"../types\";\nimport type { ModularUIResponse } from \"../../modularui\";\nimport type Href from \"../href/Href\";\nimport type LinkModel from \"../links/LinkModel\";\nimport type LinkCollection from \"../links/LinkCollection\";\nimport type ErrorResponse from \"../error/ErrorResponse\";\n\n/**\n * Model for concept details, available through modelcatalog\n */\nexport default class ConceptDetailModel extends ResourceModel {\n _relations: ConceptRelationCollection;\n _conceptType: ?ConceptTypeDetailModel;\n _sourceReferences: SourceReferenceCollection;\n\n /**\n */\n constructor(modularuiResponse: ModularUIResponse) {\n super(modularuiResponse);\n\n this._relations = new ConceptRelationCollection(\n this.data.relations,\n this.entryDate,\n );\n }\n\n /**\n */\n get type(): string {\n return \"ConceptDetail\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"ConceptDetailModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"ConceptDetail\"\n );\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n const conceptTypeLink = this.links.getLinkByKey(\"concepttype\");\n const relationsCollectionLinks =\n this.relationsCollection.getInitialChildModelLinks();\n\n if (conceptTypeLink) {\n conceptTypeLink.isCacheable = true;\n return [conceptTypeLink, ...relationsCollectionLinks];\n }\n\n return relationsCollectionLinks;\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>, errors: Array<ErrorResponse>) {\n // $FlowExpectedError[incompatible-type]\n const conceptTypeModel: ?ConceptTypeDetailModel = models.find(\n (model) => model instanceof ConceptTypeDetailModel,\n );\n\n if (conceptTypeModel) {\n this.conceptType = conceptTypeModel;\n }\n\n this.relationsCollection.setChildModels(models, errors);\n }\n\n /**\n * Retrieve concept detail identifier as key for this model\n */\n get key(): string {\n return this.getData(\"_id\", \"concept\");\n }\n\n /**\n * Getting the self link of this Concept\n */\n get selfhref(): Href {\n const { href } = this.selflink;\n\n if (this.entryDate) {\n href.setParameter(TIMEVERSION_FILTER_NAME, this.entryDate);\n } else {\n href.removeParameter(TIMEVERSION_FILTER_NAME);\n }\n\n return href;\n }\n\n /**\n * Available diagrams for the concept, most of the time just one\n */\n get diagramLinks(): LinkCollection {\n return this.links.getLinksByGroup(\"diagram\");\n }\n\n /**\n * Get conceptType of concept\n */\n get conceptType(): ?ConceptTypeDetailModel {\n return this._conceptType;\n }\n\n /**\n */\n set conceptType(conceptType: ?ConceptTypeDetailModel) {\n this._conceptType = conceptType;\n }\n\n /**\n * Get concept label\n */\n get label(): string {\n return this.data.conceptLabel;\n }\n\n /**\n * Get model category of the concept\n */\n get modelCategory(): string {\n return this.getData(\"modelCategory\", \"\");\n }\n\n /**\n * Get taxonomy type\n */\n get taxonomyType(): string {\n return this.getData(\"taxonomyType\", \"default\");\n }\n\n /**\n * Get concept relations collection\n */\n get relationsCollection(): ConceptRelationCollection {\n return this._relations;\n }\n\n /**\n * Get concept formula\n */\n get formula(): string {\n return this.data.formula;\n }\n\n /**\n * Get additional labels of concept\n */\n get labels(): Array<labelsJSON> {\n return this.conceptType && this.conceptType.labelTypes\n ? this.conceptType.labelTypes.map((labelType) => {\n const setting = this.data.labels\n ? this.data.labels.find((label) => label.type === labelType._id)\n : {};\n\n return {\n ...labelType,\n ...setting,\n };\n })\n : [];\n }\n\n /**\n * Get label elements by id\n */\n getLabelElementByIds(ids: Array<string>): Array<labelsJSON> {\n return this.labels.filter((label: labelsJSON) => ids.includes(label._id));\n }\n\n /**\n * Get concept properties\n */\n get conceptProperties(): Array<propertyJSON> {\n return this.conceptType && this.conceptType.propertyTypes\n ? this.conceptType.propertyTypes.map((propertyType) => {\n const setting = this.data.properties\n ? this.data.properties.find(\n (property) => property.type === propertyType._id,\n )\n : {};\n\n return {\n ...propertyType,\n ...setting,\n };\n })\n : [];\n }\n\n /**\n * Get concept properties by id\n */\n getConceptPropertiesByIds(ids: Array<string>): Array<propertyJSON> {\n return this.conceptProperties.filter((property) =>\n ids.includes(property._id),\n );\n }\n\n /**\n * Get Text fragments\n */\n get textfragments(): Array<textfragmentJSON> {\n const textFragments = this.data.textFragments\n ? this.data.textFragments.map((textFragment) => {\n const textFragmentConfig =\n this.conceptType &&\n this.conceptType.textFragmentTypes.find(\n (textFragmentType) => textFragment.type === textFragmentType._id,\n );\n\n return {\n ...textFragmentConfig,\n ...textFragment,\n };\n })\n : [];\n\n const notConfiguredTextFragments =\n this.conceptType && this.conceptType.textFragmentTypes\n ? this.conceptType.textFragmentTypes.filter((textFragmentType) => {\n if (!this.data.textFragments) {\n return true;\n }\n\n return !this.data.textFragments.some(\n (textfragment) => textfragment.type === textFragmentType._id,\n );\n })\n : [];\n\n return [...textFragments, ...notConfiguredTextFragments];\n }\n\n /**\n * Get text fragments by id\n */\n getTextFragmentByKeys(keys: Array<string>): Array<textfragmentJSON> {\n return this.textfragments.filter((textfragment) =>\n keys.includes(textfragment.type),\n );\n }\n\n /**\n * Get source reference collection\n */\n getSourceReferenceCollection(\n availableLocales: Array<string> = [],\n ): SourceReferenceCollection {\n if (!this._sourceReferences) {\n this._sourceReferences = new SourceReferenceCollection(\n this.getSourceReferencesForCurrentLanguage(availableLocales),\n this.entryDate,\n );\n }\n\n return this._sourceReferences;\n }\n\n /*\n * Retrieve all sourceReferenceTypes that are valid for the current language\n * Used by sourceRef collection\n */\n /**\n */\n getSourceReferencesForCurrentLanguage(\n availableLocales: Array<string>,\n ): Array<Object> {\n const LANGUAGE_POSTFIX_LENGTH = 3;\n if (this.data.sourceReferences) {\n const availableLanguagesInSourceReferences =\n this.data.sourceReferences.map((sourceReference) =>\n sourceReference.type.substring(\n sourceReference.type.length - LANGUAGE_POSTFIX_LENGTH,\n ),\n );\n\n const currentLanguagePostfix = `_${this.locale}`;\n\n if (\n availableLanguagesInSourceReferences.includes(currentLanguagePostfix)\n ) {\n // return all sourceReferences that end with language that is selected\n return this.data.sourceReferences.filter((sourceReference) =>\n sourceReference.type.endsWith(currentLanguagePostfix),\n );\n }\n\n const availableLanguages = availableLocales.map(\n (locale) => `_${locale.split(\"-\")[0]}`,\n );\n\n // return all sourceReferences that do not end with language postfix\n return this.data.sourceReferences.filter(\n (sourceReference) =>\n !availableLanguages.includes(\n sourceReference.type.substring(\n sourceReference.type.length - LANGUAGE_POSTFIX_LENGTH,\n ),\n ),\n );\n }\n return [];\n }\n\n /**\n * Retrieve entrydate\n */\n get entryDate(): string | null {\n return this.data.filter?.[TIMEVERSION_FILTER_NAME]?.value ?? null;\n }\n\n /**\n * Indicates if the given concept type id or href exists in the hierarchy of concept types for this concept\n */\n isOfConceptType(conceptTypeId: string): boolean {\n return this.conceptType?.isOfConceptType(conceptTypeId) ?? false;\n }\n\n /**\n * Indicates if the given metamodel functional identifier exists in the hierarchy of concept types for this concept\n */\n hasMetamodelIdInConceptTypeHierarchy(metamodelId: string): boolean {\n return this.conceptType?.hasMetamodelIdInHierarchy(metamodelId) ?? false;\n }\n}\n"],"mappings":";;;;;;AACA,OAAOA,aAAa,MAAM,uBAAuB;AACjD,OAAOC,yBAAyB,MAAM,6BAA6B;AACnE,OAAOC,yBAAy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ACpF,IAAI,CAAC2E,MAAM,GAAGI,uBAChC,CACF,CACJ,CAAC;IACH;IACA,OAAO,EAAE;EACX;;EAEA;AACF;AACA;EACE,IAAIhF,SAASA,CAAA,EAAkB;IAC7B,OAAO+C,uBAAA,KAAI,CAACjD,IAAI,IAAUN,uBAAuB,CAAC,EAAEsG,KAAK,IAAI,IAAI;EACnE;;EAEA;AACF;AACA;EACEC,eAAeA,CAACC,aAAqB,EAAW;IAC9C,OAAO,IAAI,CAAC5E,WAAW,EAAE2E,eAAe,CAACC,aAAa,CAAC,IAAI,KAAK;EAClE;;EAEA;AACF;AACA;EACEC,oCAAoCA,CAACC,WAAmB,EAAW;IACjE,OAAO,IAAI,CAAC9E,WAAW,EAAE+E,yBAAyB,CAACD,WAAW,CAAC,IAAI,KAAK;EAC1E;AACF","ignoreList":[]}
@@ -118,6 +118,13 @@ export default class ConceptIndexModel extends ResourceModel {
118
118
  return this.filterCollection.getFilterByAttributeKey("label");
119
119
  }
120
120
 
121
+ /**
122
+ * Get model category filter
123
+ */
124
+ get modelCategoryFilter() {
125
+ return this.filterCollection.getFilterByAttributeKey("modelCategory");
126
+ }
127
+
121
128
  /**
122
129
  * Get concept links found by index filter
123
130
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ConceptIndexModel.js","names":["ResourceModel","ResourceCollection","FilterCollection","ConceptLinkModel","TIMEVERSION_FILTER_NAME","ConceptIndexModel","constructor","modularuiResponse","_context","_defineProperty","_filterCollection","_filterInstanceProperty","data","filter","contributions","dynamicschema","_concepts","collection","_embedded","_mapInstanceProperty","results","call","concept","entryDate","type","resourcetype","modelName","isApplicableModel","resourceType","getInitialChildModelLinks","items","setChildModels","models","errors","selfhref","href","selflink","filterCollection","hasItems","forEach","params","param","value","setParameter","name","removeParameter","label","getContribution","indexfilter","getFilterByAttributeKey","timeversionFilter","attribute","searchtermfilter","itemCollection"],"sources":["../../../src/models/concepts/ConceptIndexModel.js"],"sourcesContent":["// @flow\nimport ResourceModel from \"../base/ResourceModel\";\nimport ResourceCollection from \"../base/ResourceCollection\";\nimport FilterCollection from \"../filters/FilterCollection\";\nimport ConceptLinkModel from \"./ConceptLinkModel\";\n\nimport { TIMEVERSION_FILTER_NAME } from \"../../constants/Constants\";\n\nimport type { ModularUIResponse } from \"../../modularui\";\nimport type { FilterType, ModularUIModel } from \"../types\";\nimport type LinkModel from \"../links/LinkModel\";\nimport type Href from \"../href/Href\";\nimport type ErrorResponse from \"../error/ErrorResponse\";\n\n/**\n * Get Index of concepts, to filter model catalog\n */\nexport default class ConceptIndexModel extends ResourceModel {\n _filterCollection: FilterCollection;\n _concepts: ResourceCollection<ConceptLinkModel>;\n\n /**\n */\n constructor(modularuiResponse: ModularUIResponse) {\n super(modularuiResponse);\n\n this._filterCollection = new FilterCollection(this.data.filter, {\n filter: this.contributions.filter,\n dynamicschema: this.data.dynamicschema,\n });\n\n this._concepts = new ResourceCollection();\n this._concepts.collection = this.data._embedded\n ? this.data._embedded.results.map(\n (concept) => new ConceptLinkModel(concept.concept, this.entryDate),\n )\n : [];\n }\n\n /**\n */\n get type(): string {\n if (this.resourcetype === \"RelatedConcepts\") {\n return \"RelatedConcepts\";\n }\n\n return \"ConceptIndex\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"ConceptIndexModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n const resourceType = data.contributions?.resourcetype;\n return (\n resourceType === \"ConceptSearch\" || resourceType === \"relatedConcepts\"\n );\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n return this.items.getInitialChildModelLinks();\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>, errors: Array<ErrorResponse>) {\n this.items.setChildModels(models, errors);\n }\n\n /**\n * Getting the self link of this list\n */\n get selfhref(): Href {\n const { href } = this.selflink;\n\n if (this.filterCollection.hasItems) {\n this.filterCollection.forEach((filter) => {\n filter.params.forEach((param) => {\n if (param.value) {\n href.setParameter(param.name, param.value);\n } else {\n href.removeParameter(param.name);\n }\n });\n });\n }\n\n return href;\n }\n\n /**\n */\n get label(): string {\n return this.getContribution(\"label\");\n }\n\n /**\n * Retrieve filters of conceptindex model\n */\n get filterCollection(): FilterCollection {\n return this._filterCollection;\n }\n\n /**\n * Get index filter\n */\n get indexfilter(): FilterType | null {\n return this.filterCollection.getFilterByAttributeKey(\"index\");\n }\n\n /**\n * Retrieve entrydate of content toc\n */\n get entryDate(): string | null {\n const timeversionFilter = this.filterCollection.getFilterByAttributeKey(\n TIMEVERSION_FILTER_NAME,\n );\n if (timeversionFilter && timeversionFilter.attribute) {\n return timeversionFilter.attribute.value;\n }\n\n return null;\n }\n\n /**\n * get searchterm filter\n */\n get searchtermfilter(): FilterType | null {\n return this.filterCollection.getFilterByAttributeKey(\"label\");\n }\n\n /**\n * Get concept links found by index filter\n */\n get items(): ResourceCollection<ConceptLinkModel> {\n return this._concepts;\n }\n\n /**\n * Replace the items collection\n */\n set items(itemCollection: ResourceCollection<ConceptLinkModel>) {\n this._concepts = itemCollection;\n }\n}\n"],"mappings":";;;AACA,OAAOA,aAAa,MAAM,uBAAuB;AACjD,OAAOC,kBAAkB,MAAM,4BAA4B;AAC3D,OAAOC,gBAAgB,MAAM,6BAA6B;AAC1D,OAAOC,gBAAgB,MAAM,oBAAoB;AAEjD,SAASC,uBAAuB,QAAQ,2BAA2B;AAQnE;AACA;AACA;AACA,eAAe,MAAMC,iBAAiB,SAASL,aAAa,CAAC;EAI3D;AACF;EACEM,WAAWA,CAACC,iBAAoC,EAAE;IAAA,IAAAC,QAAA;IAChD,KAAK,CAACD,iBAAiB,CAAC;IAACE,eAAA;IAAAA,eAAA;IAEzB,IAAI,CAACC,iBAAiB,GAAG,IAAIR,gBAAgB,CAAAS,uBAAA,CAAC,IAAI,CAACC,IAAI,GAAS;MAC9DC,MAAM,EAAAF,uBAAA,CAAE,IAAI,CAACG,aAAa,CAAO;MACjCC,aAAa,EAAE,IAAI,CAACH,IAAI,CAACG;IAC3B,CAAC,CAAC;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ceModel","ResourceCollection","FilterCollection","ConceptLinkModel","TIMEVERSION_FILTER_NAME","ConceptIndexModel","constructor","modularuiResponse","_context","_defineProperty","_filterCollection","_filterInstanceProperty","data","filter","contributions","dynamicschema","_concepts","collection","_embedded","_mapInstanceProperty","results","call","concept","entryDate","type","resourcetype","modelName","isApplicableModel","resourceType","getInitialChildModelLinks","items","setChildModels","models","errors","selfhref","href","selflink","filterCollection","hasItems","forEach","params","param","value","setParameter","name","removeParameter","label","getContribution","indexfilter","getFilterByAttributeKey","timeversionFilter","attribute","searchtermfilter","modelCategoryFilter","itemCollection"],"sources":["../../../src/models/concepts/ConceptIndexModel.js"],"sourcesContent":["// @flow\nimport ResourceModel from \"../base/ResourceModel\";\nimport ResourceCollection from \"../base/ResourceCollection\";\nimport FilterCollection from \"../filters/FilterCollection\";\nimport ConceptLinkModel from \"./ConceptLinkModel\";\n\nimport { TIMEVERSION_FILTER_NAME } from \"../../constants/Constants\";\n\nimport type { ModularUIResponse } from \"../../modularui\";\nimport type { FilterType, ModularUIModel } from \"../types\";\nimport type LinkModel from \"../links/LinkModel\";\nimport type Href from \"../href/Href\";\nimport type ErrorResponse from \"../error/ErrorResponse\";\n\n/**\n * Get Index of concepts, to filter model catalog\n */\nexport default class ConceptIndexModel extends ResourceModel {\n _filterCollection: FilterCollection;\n _concepts: ResourceCollection<ConceptLinkModel>;\n\n /**\n */\n constructor(modularuiResponse: ModularUIResponse) {\n super(modularuiResponse);\n\n this._filterCollection = new FilterCollection(this.data.filter, {\n filter: this.contributions.filter,\n dynamicschema: this.data.dynamicschema,\n });\n\n this._concepts = new ResourceCollection();\n this._concepts.collection = this.data._embedded\n ? this.data._embedded.results.map(\n (concept) => new ConceptLinkModel(concept.concept, this.entryDate),\n )\n : [];\n }\n\n /**\n */\n get type(): string {\n if (this.resourcetype === \"RelatedConcepts\") {\n return \"RelatedConcepts\";\n }\n\n return \"ConceptIndex\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"ConceptIndexModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n const resourceType = data.contributions?.resourcetype;\n return (\n resourceType === \"ConceptSearch\" || resourceType === \"relatedConcepts\"\n );\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n return this.items.getInitialChildModelLinks();\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>, errors: Array<ErrorResponse>) {\n this.items.setChildModels(models, errors);\n }\n\n /**\n * Getting the self link of this list\n */\n get selfhref(): Href {\n const { href } = this.selflink;\n\n if (this.filterCollection.hasItems) {\n this.filterCollection.forEach((filter) => {\n filter.params.forEach((param) => {\n if (param.value) {\n href.setParameter(param.name, param.value);\n } else {\n href.removeParameter(param.name);\n }\n });\n });\n }\n\n return href;\n }\n\n /**\n */\n get label(): string {\n return this.getContribution(\"label\");\n }\n\n /**\n * Retrieve filters of conceptindex model\n */\n get filterCollection(): FilterCollection {\n return this._filterCollection;\n }\n\n /**\n * Get index filter\n */\n get indexfilter(): FilterType | null {\n return this.filterCollection.getFilterByAttributeKey(\"index\");\n }\n\n /**\n * Retrieve entrydate of content toc\n */\n get entryDate(): string | null {\n const timeversionFilter = this.filterCollection.getFilterByAttributeKey(\n TIMEVERSION_FILTER_NAME,\n );\n if (timeversionFilter && timeversionFilter.attribute) {\n return timeversionFilter.attribute.value;\n }\n\n return null;\n }\n\n /**\n * get searchterm filter\n */\n get searchtermfilter(): FilterType | null {\n return this.filterCollection.getFilterByAttributeKey(\"label\");\n }\n\n /**\n * Get model category filter\n */\n get modelCategoryFilter(): FilterType | null {\n return this.filterCollection.getFilterByAttributeKey(\"modelCategory\");\n }\n\n /**\n * Get concept links found by index filter\n */\n get items(): ResourceCollection<ConceptLinkModel> {\n return this._concepts;\n }\n\n /**\n * Replace the items collection\n */\n set items(itemCollection: ResourceCollection<ConceptLinkModel>) {\n this._concepts = itemCollection;\n }\n}\n"],"mappings":";;;AACA,OAAOA,aAAa,MAAM,uBAAuB;AACjD,OAAOC,kBAAk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uBAAuB,CACrE7C,uBACF,CAAC;IACD,IAAI8C,iBAAiB,IAAIA,iBAAiB,CAACC,SAAS,EAAE;MACpD,OAAOD,iBAAiB,CAACC,SAAS,CAACT,KAAK;IAC1C;IAEA,OAAO,IAAI;EACb;;EAEA;AACF;AACA;EACE,IAAIU,gBAAgBA,CAAA,EAAsB;IACxC,OAAO,IAAI,CAACf,gBAAgB,CAACY,uBAAuB,CAAC,OAAO,CAAC;EAC/D;;EAEA;AACF;AACA;EACE,IAAII,mBAAmBA,CAAA,EAAsB;IAC3C,OAAO,IAAI,CAAChB,gBAAgB,CAACY,uBAAuB,CAAC,eAAe,CAAC;EACvE;;EAEA;AACF;AACA;EACE,IAAInB,KAAKA,CAAA,EAAyC;IAChD,OAAO,IAAI,CAACd,SAAS;EACvB;;EAEA;AACF;AACA;EACE,IAAIc,KAAKA,CAACwB,cAAoD,EAAE;IAC9D,IAAI,CAACtC,SAAS,GAAGsC,cAAc;EACjC;AACF","ignoreList":[]}
@@ -43,6 +43,13 @@ class ConceptTypeDetailModel extends ResourceModel {
43
43
  return this.getData("label", "");
44
44
  }
45
45
 
46
+ /**
47
+ * Get model category of the concept type
48
+ */
49
+ get modelCategory() {
50
+ return this.getData("modelCategory", "");
51
+ }
52
+
46
53
  /**
47
54
  */
48
55
  get isCoreTaxonomy() {
@@ -1 +1 @@
1
- {"version":3,"file":"ConceptTypeDetailModel.js","names":["ResourceModel","ConceptTypeDetailModel","name","getData","type","modelName","isApplicableModel","data","contributions","resourcetype","key","_id","label","isCoreTaxonomy","icon","textColor","backgroundColor","borderColor","labelTypes","propertyTypes","textFragmentTypes","sectionReferenceTypes","conceptTypeHierarchy","links","getLinksByGroup","isOfConceptType","conceptTypeId","hasLinkByKey","hasLinkByHref","selfhref","equals","hasMetamodelIdInHierarchy","metamodelId","all","some","link","_context","_startsWithInstanceProperty","call"],"sources":["../../../src/models/concepts/ConceptTypeDetailModel.js"],"sourcesContent":["// @flow\nimport ResourceModel from \"../base/ResourceModel\";\n\nimport type ModularUIResponse from \"../../modularui/ModularUIResponse\";\nimport type LinkCollection from \"../links/LinkCollection\";\n\n/**\n * Model for concept details, available through modelcatalog\n */\nclass ConceptTypeDetailModel extends ResourceModel {\n /**\n * The name of the concept type consists of the functional id of the kmt and the functional id of the concept type separated by a #.<br>\n * For example BEI_CaseManagement#Case\n */\n get name(): string {\n return this.getData(\"name\", \"\");\n }\n\n /**\n */\n get type(): string {\n return \"ConceptTypeDetail\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"ConceptTypeDetailModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"ConceptTypeDetail\"\n );\n }\n\n /**\n */\n get key(): string {\n return this.data._id;\n }\n\n /**\n * Get concept type label\n */\n get label(): string {\n return this.getData(\"label\", \"\");\n }\n\n /**\n */\n get isCoreTaxonomy(): boolean {\n return this.getData(\"coreTaxonomy\", \"false\") === \"true\";\n }\n\n /**\n * Get concept type icon\n */\n get icon(): string {\n return this.getData(\"icon\", \"\");\n }\n\n /**\n * Get concept type text color\n */\n get textColor(): string {\n return this.getData(\"textColor\", \"#000\");\n }\n\n /**\n * Get concept type background color\n */\n get backgroundColor(): string {\n return this.getData(\"backgroundColor\", \"#fff\");\n }\n\n /**\n * Get concept line color\n */\n get borderColor(): string {\n return this.getData(\"lineColor\", \"#000\");\n }\n\n /**\n * Get label types\n */\n get labelTypes(): ?Array<Object> {\n return this.data.labelTypes;\n }\n\n /**\n * Get propertyTypes\n */\n get propertyTypes(): Array<Object> {\n return this.getData(\"propertyTypes\", []);\n }\n\n /**\n * Get textFragmentTypes\n */\n get textFragmentTypes(): Array<Object> {\n return this.getData(\"textFragmentTypes\", []);\n }\n\n /**\n * Get sectionReferenceTypes\n */\n get sectionReferenceTypes(): Array<Object> {\n return this.getData(\"sectionReferenceTypes\", []);\n }\n\n /**\n */\n get conceptTypeHierarchy(): LinkCollection {\n return this.links.getLinksByGroup(\"conceptTypeHierarchy\");\n }\n\n /**\n */\n isOfConceptType(conceptTypeId: string): boolean {\n return (\n this.conceptTypeHierarchy?.hasLinkByKey(conceptTypeId) ||\n this.conceptTypeHierarchy?.hasLinkByHref(conceptTypeId) ||\n this.selfhref.equals(conceptTypeId)\n );\n }\n\n /**\n * Indicates if the given metamodel functional identifier exists in the hierarchy of concept types\n */\n hasMetamodelIdInHierarchy(metamodelId: string): boolean {\n return (\n this.conceptTypeHierarchy?.all.some((link) =>\n link.key.startsWith(metamodelId + \"#\"),\n ) || false\n );\n }\n}\n\nexport default ConceptTypeDetailModel;\n"],"mappings":";AACA,OAAOA,aAAa,MAAM,uBAAuB;AAKjD;AACA;AACA;AACA,MAAMC,sBAAsB,SAASD,aAAa,CAAC;EACjD;AACF;AACA;AACA;EACE,IAAIE,IAAIA,CAAA,EAAW;IACjB,OAAO,IAAI,CAACC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;EACjC;;EAEA;AACF;EACE,IAAIC,IAAIA,CAAA,EAAW;IACjB,OAAO,mBAAmB;EAC5B;;EAEA;AACF;EACE,WAAWC,SAASA,CAAA,EAAW;IAC7B,OAAO,wBAAwB;EACjC;;EAEA;AACF;EACE,OAAOC,iBAAiBA,CAACC,IAAuB,EAAW;IACzD,OACEA,IAAI,CAACC,aAAa,CAACC,YAAY,IAC/BF,IAAI,CAACC,aAAa,CAACC,YAAY,KAAK,mBAAmB;EAE3D;;EAEA;AACF;EACE,IAAIC,GAAGA,CAAA,EAAW;IAChB,OAAO,IAAI,CAACH,IAAI,CAACI,GAAG;EACtB;;EAEA;AACF;AACA;EACE,IAAIC,KAAKA,CAAA,EAAW;IAClB,OAAO,IAAI,CAACT,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;EAClC;;EAEA;AACF;EACE,IAAIU,cAAcA,CAAA,EAAY;IAC5B,OAAO,IAAI,CAACV,OAAO,CAAC,cAAc,EAAE,OAAO,CAAC,KAAK,MAAM;EACzD;;EAEA;AACF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,MAAM,CAACJ,aAAa,CAAC;EAEvC;;EAEA;AACF;AACA;EACEK,yBAAyBA,CAACC,WAAmB,EAAW;IACtD,OACE,IAAI,CAACV,oBAAoB,EAAEW,GAAG,CAACC,IAAI,CAAEC,IAAI;MAAA,IAAAC,QAAA;MAAA,OACvCC,2BAAA,CAAAD,QAAA,GAAAD,IAAI,CAACzB,GAAG,EAAA4B,IAAA,CAAAF,QAAA,EAAYJ,WAAW,GAAG,GAAG,CAAC;IAAA,CACxC,CAAC,IAAI,KAAK;EAEd;AACF;AAEA,eAAe/B,sBAAsB","ignoreList":[]}
1
+ {"version":3,"file":"ConceptTypeDetailModel.js","names":["ResourceModel","ConceptTypeDetailModel","name","getData","type","modelName","isApplicableModel","data","contributions","resourcetype","key","_id","label","modelCategory","isCoreTaxonomy","icon","textColor","backgroundColor","borderColor","labelTypes","propertyTypes","textFragmentTypes","sectionReferenceTypes","conceptTypeHierarchy","links","getLinksByGroup","isOfConceptType","conceptTypeId","hasLinkByKey","hasLinkByHref","selfhref","equals","hasMetamodelIdInHierarchy","metamodelId","all","some","link","_context","_startsWithInstanceProperty","call"],"sources":["../../../src/models/concepts/ConceptTypeDetailModel.js"],"sourcesContent":["// @flow\nimport ResourceModel from \"../base/ResourceModel\";\n\nimport type ModularUIResponse from \"../../modularui/ModularUIResponse\";\nimport type LinkCollection from \"../links/LinkCollection\";\n\n/**\n * Model for concept details, available through modelcatalog\n */\nclass ConceptTypeDetailModel extends ResourceModel {\n /**\n * The name of the concept type consists of the functional id of the kmt and the functional id of the concept type separated by a #.<br>\n * For example BEI_CaseManagement#Case\n */\n get name(): string {\n return this.getData(\"name\", \"\");\n }\n\n /**\n */\n get type(): string {\n return \"ConceptTypeDetail\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"ConceptTypeDetailModel\";\n }\n\n /**\n */\n static isApplicableModel(data: ModularUIResponse): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"ConceptTypeDetail\"\n );\n }\n\n /**\n */\n get key(): string {\n return this.data._id;\n }\n\n /**\n * Get concept type label\n */\n get label(): string {\n return this.getData(\"label\", \"\");\n }\n\n /**\n * Get model category of the concept type\n */\n get modelCategory(): string {\n return this.getData(\"modelCategory\", \"\");\n }\n\n /**\n */\n get isCoreTaxonomy(): boolean {\n return this.getData(\"coreTaxonomy\", \"false\") === \"true\";\n }\n\n /**\n * Get concept type icon\n */\n get icon(): string {\n return this.getData(\"icon\", \"\");\n }\n\n /**\n * Get concept type text color\n */\n get textColor(): string {\n return this.getData(\"textColor\", \"#000\");\n }\n\n /**\n * Get concept type background color\n */\n get backgroundColor(): string {\n return this.getData(\"backgroundColor\", \"#fff\");\n }\n\n /**\n * Get concept line color\n */\n get borderColor(): string {\n return this.getData(\"lineColor\", \"#000\");\n }\n\n /**\n * Get label types\n */\n get labelTypes(): ?Array<Object> {\n return this.data.labelTypes;\n }\n\n /**\n * Get propertyTypes\n */\n get propertyTypes(): Array<Object> {\n return this.getData(\"propertyTypes\", []);\n }\n\n /**\n * Get textFragmentTypes\n */\n get textFragmentTypes(): Array<Object> {\n return this.getData(\"textFragmentTypes\", []);\n }\n\n /**\n * Get sectionReferenceTypes\n */\n get sectionReferenceTypes(): Array<Object> {\n return this.getData(\"sectionReferenceTypes\", []);\n }\n\n /**\n */\n get conceptTypeHierarchy(): LinkCollection {\n return this.links.getLinksByGroup(\"conceptTypeHierarchy\");\n }\n\n /**\n */\n isOfConceptType(conceptTypeId: string): boolean {\n return (\n this.conceptTypeHierarchy?.hasLinkByKey(conceptTypeId) ||\n this.conceptTypeHierarchy?.hasLinkByHref(conceptTypeId) ||\n this.selfhref.equals(conceptTypeId)\n );\n }\n\n /**\n * Indicates if the given metamodel functional identifier exists in the hierarchy of concept types\n */\n hasMetamodelIdInHierarchy(metamodelId: string): boolean {\n return (\n this.conceptTypeHierarchy?.all.some((link) =>\n link.key.startsWith(metamodelId + \"#\"),\n ) || false\n );\n }\n}\n\nexport default ConceptTypeDetailModel;\n"],"mapp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J,WAAW,GAAG,GAAG,CAAC;IAAA,CACxC,CAAC,IAAI,KAAK;EAEd;AACF;AAEA,eAAehC,sBAAsB","ignoreList":[]}
@@ -77,6 +77,7 @@ import { default as ListModel } from "./list/ListModel";
77
77
  export { default as LookupOptionsModel } from "./lookup/LookupOptionsModel";
78
78
  export { default as LookupOptionCollection } from "./lookup/LookupOptionCollection";
79
79
  import { default as ModelCatalogModel } from "./modelcatalog/ModelCatalogModel";
80
+ export { default as ModelCategory } from "./modelcatalog/ModelCategoryModel";
80
81
  export { default as ProcessStatusSettingsModel } from "./process/ProcessStatusSettingsModel";
81
82
  export { default as PagesizeModel } from "./paging/PagesizeModel";
82
83
  export { default as PagingModel } from "./paging/PagingModel";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["default","resolveModel","BaseCollection","ActionCollection","ActionModel","ApplicationModel","AttributeCollection","AttributeSetModel","AttributeModel","BooleanAttributeModel","CaptchaAttributeModel","ChoiceAttributeModel","ChoiceAttributeOptionCollection","ChoiceAttributeOptionModel","CompositeAttributeModel","CompositeAttributeChildCollection","DatetimeAttributeModel","HelptextAttributeModel","LabelAttributeModel","MemoAttributeModel","MoneyAttributeModel","NumberAttributeModel","PasswordAttributeModel","StringAttributeModel","UploadAttributeModel","XMLAttributeModel","AttributeContent","LayoutHintRuleCollection","addLayoutHintRule","updateLayoutHintRules","BaseLayoutHintRule","DependentAttribute","RemainingTotalUploadSize","LayoutHintCollection","CaseViewModel","BusinessScenarioModel","ConceptDetailModel","ConceptIndexModel","ConceptLinkModel","ConceptRelationCollection","ConceptRelationModel","ConceptTypeDetailModel","SourceReferenceCollection","SourceReferenceModel","ConstraintCollection","ConstraintModel","ContentIndexModel","ContentLinkModel","ContentModel","ContentTOCModel","ContentTypeModel","SectionModel","SubSectionModel","ContentConfiguration","ContentConfigurationElements","ContentConfigurationEndResults","ContentConfigurationQuestions","ContentConfigurationResults","DetailModel","ErrorCollection","ErrorModel","ErrorResponse","AssignmentFilterModel","FilterModel","RangeFilterModel","ConceptIndexFilterModel","FilterCollection","FormModel","FormObjectModel","GroupingModel","GroupModel","Href","ListHref","LinkCollection","LinkModel","ListDetailModel","ListHeaderModel","ListItemCollection","ListItemModel","ListModel","LookupOptionsModel","LookupOptionCollection","ModelCatalogModel","ProcessStatusSettingsModel","PagesizeModel","PagingModel","Parameter","GroupingPanelModel","CaseSearchModel","SortingModel","SortOptionModel","TabModel","TaskGroupCollection","TaskGroupModel","UserModel","UserProfileModel","UserServicesModel"],"sources":["../../src/models/index.js"],"sourcesContent":["// @flow\nexport { default as resolveModel } from \"./resolveModel\";\n\nexport { default as BaseCollection } from \"./base/BaseCollection\";\n\nexport { default as ActionCollection } from \"./actions/ActionCollection\";\nexport { default as ActionModel } from \"./actions/ActionModel\";\n\nimport { default as ApplicationModel } from \"./application/ApplicationModel\";\n\nexport { default as AttributeCollection } from \"./attributes/AttributeCollection\";\nexport { default as AttributeSetModel } from \"./attributes/AttributeSetModel\";\n\nexport { default as AttributeModel } from \"./attributes/AttributeModel\";\nimport { default as BooleanAttributeModel } from \"./attributes/BooleanAttributeModel\";\nimport { default as CaptchaAttributeModel } from \"./attributes/CaptchaAttributeModel\";\nimport { default as ChoiceAttributeModel } from \"./attributes/ChoiceAttributeModel\";\nexport { default as ChoiceAttributeOptionCollection } from \"./attributes/ChoiceAttributeOptionCollection\";\nexport { default as ChoiceAttributeOptionModel } from \"./attributes/ChoiceAttributeOptionModel\";\nimport { default as CompositeAttributeModel } from \"./attributes/CompositeAttributeModel\";\nexport { default as CompositeAttributeChildCollection } from \"./attributes/CompositeAttributeChildCollection\";\nimport { default as DatetimeAttributeModel } from \"./attributes/DatetimeAttributeModel\";\nimport { default as HelptextAttributeModel } from \"./attributes/HelptextAttributeModel\";\nimport { default as LabelAttributeModel } from \"./attributes/LabelAttributeModel\";\nimport { default as MemoAttributeModel } from \"./attributes/MemoAttributeModel\";\nimport { default as MoneyAttributeModel } from \"./attributes/MoneyAttributeModel\";\nimport { default as NumberAttributeModel } from \"./attributes/NumberAttributeModel\";\nimport { default as PasswordAttributeModel } from \"./attributes/PasswordAttributeModel\";\nimport { default as StringAttributeModel } from \"./attributes/StringAttributeModel\";\nimport { default as UploadAttributeModel } from \"./attributes/UploadAttributeModel\";\nimport { default as XMLAttributeModel } from \"./attributes/XMLAttributeModel\";\n\nexport { default as AttributeContent } from \"./attributes/AttributeContent\";\n\nexport {\n default as LayoutHintRuleCollection,\n addLayoutHintRule,\n updateLayoutHintRules,\n} from \"./attributes/layouthint-rules/LayoutHintRuleCollection\";\nexport { default as BaseLayoutHintRule } from \"./attributes/layouthint-rules/BaseLayoutHintRule\";\nexport { default as DependentAttribute } from \"./attributes/layouthint-rules/DependentAttribute\";\nexport { default as RemainingTotalUploadSize } from \"./attributes/layouthint-rules/RemainingTotalUploadSize\";\n\nimport { default as LayoutHintCollection } from \"./layouthint/LayoutHintCollection\";\n\nimport { default as CaseViewModel } from \"./caseview/CaseViewModel\";\n\nimport { default as BusinessScenarioModel } from \"./concepts/BusinessScenarioModel\";\nimport { default as ConceptDetailModel } from \"./concepts/ConceptDetailModel\";\nimport { default as ConceptIndexModel } from \"./concepts/ConceptIndexModel\";\nexport { default as ConceptLinkModel } from \"./concepts/ConceptLinkModel\";\nexport { default as ConceptRelationCollection } from \"./concepts/ConceptRelationCollection\";\nexport { default as ConceptRelationModel } from \"./concepts/ConceptRelationModel\";\nimport { default as ConceptTypeDetailModel } from \"./concepts/ConceptTypeDetailModel\";\nexport { default as SourceReferenceCollection } from \"./concepts/SourceReferenceCollection\";\nexport { default as SourceReferenceModel } from \"./concepts/SourceReferenceModel\";\n\nexport { default as ConstraintCollection } from \"./attributes/input-constraints/ConstraintCollection\";\nexport { default as ConstraintModel } from \"./attributes/input-constraints/ConstraintModel\";\n\nimport { default as ContentIndexModel } from \"./content/ContentIndexModel\";\nexport { default as ContentLinkModel } from \"./content/ContentLinkModel\";\nimport { default as ContentModel } from \"./content/ContentModel\";\nimport { default as ContentTOCModel } from \"./content/ContentTOCModel\";\nimport { default as ContentTypeModel } from \"./content/ContentTypeModel\";\nexport { default as SectionModel } from \"./content/SectionModel\";\nexport { default as SubSectionModel } from \"./content/SubSectionModel\";\n\nexport { default as ContentConfiguration } from \"./contentconfiguration/ContentConfiguration\";\nexport { default as ContentConfigurationElements } from \"./contentconfiguration/ContentConfigurationElements\";\nexport { default as ContentConfigurationEndResults } from \"./contentconfiguration/ContentConfigurationEndResults\";\nexport { default as ContentConfigurationQuestions } from \"./contentconfiguration/ContentConfigurationQuestions\";\nexport { default as ContentConfigurationResults } from \"./contentconfiguration/ContentConfigurationResults\";\n\nimport { default as DetailModel } from \"./detail/DetailModel\";\n\nexport { default as ErrorCollection } from \"./error/ErrorCollection\";\nexport { default as ErrorModel } from \"./error/ErrorModel\";\nexport { default as ErrorResponse } from \"./error/ErrorResponse\";\n\nimport { default as AssignmentFilterModel } from \"./filters/AssignmentFilterModel\";\nimport { default as FilterModel } from \"./filters/FilterModel\";\nimport { default as RangeFilterModel } from \"./filters/RangeFilterModel\";\nimport { default as ConceptIndexFilterModel } from \"./filters/ConceptIndexFilterModel\";\nexport { default as FilterCollection } from \"./filters/FilterCollection\";\n\nimport { default as FormModel } from \"./form/FormModel\";\nexport { default as FormObjectModel } from \"./form/FormObjectModel\";\n\nexport { default as GroupingModel, GroupModel } from \"./grouping/GroupingModel\";\n\nexport { default as Href } from \"./href/Href\";\nexport { default as ListHref } from \"./href/ListHref\";\n\nexport { default as LinkCollection } from \"./links/LinkCollection\";\nexport { default as LinkModel } from \"./links/LinkModel\";\n\nimport { default as ListDetailModel } from \"./list/ListDetailModel\";\nexport { default as ListHeaderModel } from \"./list/ListHeaderModel\";\nexport { default as ListItemCollection } from \"./list/ListItemCollection\";\nexport { default as ListItemModel } from \"./list/ListItemModel\";\nimport { default as ListModel } from \"./list/ListModel\";\n\nexport { default as LookupOptionsModel } from \"./lookup/LookupOptionsModel\";\nexport { default as LookupOptionCollection } from \"./lookup/LookupOptionCollection\";\n\nimport { default as ModelCatalogModel } from \"./modelcatalog/ModelCatalogModel\";\n\nexport { default as ProcessStatusSettingsModel } from \"./process/ProcessStatusSettingsModel\";\n\nexport { default as PagesizeModel } from \"./paging/PagesizeModel\";\nexport { default as PagingModel } from \"./paging/PagingModel\";\n\nexport { default as Parameter } from \"./parameter/Parameter\";\n\nimport { default as GroupingPanelModel } from \"./panels/GroupingPanelModel\";\n\nimport { default as CaseSearchModel } from \"./search/CaseSearchModel\";\n\nexport { default as SortingModel } from \"./sorting/SortingModel\";\nexport { default as SortOptionModel } from \"./sorting/SortOptionModel\";\n\nimport { default as TabModel } from \"./tab/TabModel\";\n\nexport { default as TaskGroupCollection } from \"./taskgroup/TaskGroupCollection\";\nimport { default as TaskGroupModel } from \"./taskgroup/TaskGroupModel\";\n\nimport { default as UserModel } from \"./user/UserModel\";\nimport { default as UserProfileModel } from \"./user/UserProfileModel\";\nimport { default as UserServicesModel } from \"./user/UserServicesModel\";\n\nexport {\n ApplicationModel,\n CaseSearchModel,\n CaseViewModel,\n ListDetailModel,\n DetailModel,\n FormModel,\n GroupingPanelModel,\n ListModel,\n TabModel,\n TaskGroupModel,\n UserModel,\n UserProfileModel,\n UserServicesModel,\n ModelCatalogModel,\n ConceptIndexModel,\n ConceptDetailModel,\n BusinessScenarioModel,\n ConceptTypeDetailModel,\n ContentIndexModel,\n ContentTOCModel,\n ContentModel,\n ContentTypeModel,\n BooleanAttributeModel,\n CaptchaAttributeModel,\n ChoiceAttributeModel,\n DatetimeAttributeModel,\n HelptextAttributeModel,\n LabelAttributeModel,\n MemoAttributeModel,\n MoneyAttributeModel,\n NumberAttributeModel,\n PasswordAttributeModel,\n CompositeAttributeModel,\n StringAttributeModel,\n UploadAttributeModel,\n XMLAttributeModel,\n AssignmentFilterModel,\n FilterModel,\n RangeFilterModel,\n ConceptIndexFilterModel,\n LayoutHintCollection,\n};\n\nexport type * from \"./types\";\n"],"mappings":"AACA,SAASA,OAAO,IAAIC,YAAY,QAAQ,gBAAgB;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BAAgB,EAChBC,iBAAiB,EACjBd,iBAAiB,EACjB7C,iBAAiB,EACjBD,kBAAkB,EAClBD,qBAAqB,EACrBM,sBAAsB,EACtBK,iBAAiB,EACjBG,eAAe,EACfD,YAAY,EACZE,gBAAgB,EAChBzC,qBAAqB,EACrBC,qBAAqB,EACrBC,oBAAoB,EACpBK,sBAAsB,EACtBC,sBAAsB,EACtBC,mBAAmB,EACnBC,kBAAkB,EAClBC,mBAAmB,EACnBC,oBAAoB,EACpBC,sBAAsB,EACtBR,uBAAuB,EACvBS,oBAAoB,EACpBC,oBAAoB,EACpBC,iBAAiB,EACjBqC,qBAAqB,EACrBC,WAAW,EACXC,gBAAgB,EAChBC,uBAAuB,EACvBhC,oBAAoB","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["default","resolveModel","BaseCollection","ActionCollection","ActionModel","ApplicationModel","AttributeCollection","AttributeSetModel","AttributeModel","BooleanAttributeModel","CaptchaAttributeModel","ChoiceAttributeModel","ChoiceAttributeOptionCollection","ChoiceAttributeOptionModel","CompositeAttributeModel","CompositeAttributeChildCollection","DatetimeAttributeModel","HelptextAttributeModel","LabelAttributeModel","MemoAttributeModel","MoneyAttributeModel","NumberAttributeModel","PasswordAttributeModel","StringAttributeModel","UploadAttributeModel","XMLAttributeModel","AttributeContent","LayoutHintRuleCollection","addLayoutHintRule","updateLayoutHintRules","BaseLayoutHintRule","DependentAttribute","RemainingTotalUploadSize","LayoutHintCollection","CaseViewModel","BusinessScenarioModel","ConceptDetailModel","ConceptIndexModel","ConceptLinkModel","ConceptRelationCollection","ConceptRelationModel","ConceptTypeDetailModel","SourceReferenceCollection","SourceReferenceModel","ConstraintCollection","ConstraintModel","ContentIndexModel","ContentLinkModel","ContentModel","ContentTOCModel","ContentTypeModel","SectionModel","SubSectionModel","ContentConfiguration","ContentConfigurationElements","ContentConfigurationEndResults","ContentConfigurationQuestions","ContentConfigurationResults","DetailModel","ErrorCollection","ErrorModel","ErrorResponse","AssignmentFilterModel","FilterModel","RangeFilterModel","ConceptIndexFilterModel","FilterCollection","FormModel","FormObjectModel","GroupingModel","GroupModel","Href","ListHref","LinkCollection","LinkModel","ListDetailModel","ListHeaderModel","ListItemCollection","ListItemModel","ListModel","LookupOptionsModel","LookupOptionCollection","ModelCatalogModel","ModelCategory","ProcessStatusSettingsModel","PagesizeModel","PagingModel","Parameter","GroupingPanelModel","CaseSearchModel","SortingModel","SortOptionModel","TabModel","TaskGroupCollection","TaskGroupModel","UserModel","UserProfileModel","UserServicesModel"],"sources":["../../src/models/index.js"],"sourcesContent":["// @flow\nexport { default as resolveModel } from \"./resolveModel\";\n\nexport { default as BaseCollection } from \"./base/BaseCollection\";\n\nexport { default as ActionCollection } from \"./actions/ActionCollection\";\nexport { default as ActionModel } from \"./actions/ActionModel\";\n\nimport { default as ApplicationModel } from \"./application/ApplicationModel\";\n\nexport { default as AttributeCollection } from \"./attributes/AttributeCollection\";\nexport { default as AttributeSetModel } from \"./attributes/AttributeSetModel\";\n\nexport { default as AttributeModel } from \"./attributes/AttributeModel\";\nimport { default as BooleanAttributeModel } from \"./attributes/BooleanAttributeModel\";\nimport { default as CaptchaAttributeModel } from \"./attributes/CaptchaAttributeModel\";\nimport { default as ChoiceAttributeModel } from \"./attributes/ChoiceAttributeModel\";\nexport { default as ChoiceAttributeOptionCollection } from \"./attributes/ChoiceAttributeOptionCollection\";\nexport { default as ChoiceAttributeOptionModel } from \"./attributes/ChoiceAttributeOptionModel\";\nimport { default as CompositeAttributeModel } from \"./attributes/CompositeAttributeModel\";\nexport { default as CompositeAttributeChildCollection } from \"./attributes/CompositeAttributeChildCollection\";\nimport { default as DatetimeAttributeModel } from \"./attributes/DatetimeAttributeModel\";\nimport { default as HelptextAttributeModel } from \"./attributes/HelptextAttributeModel\";\nimport { default as LabelAttributeModel } from \"./attributes/LabelAttributeModel\";\nimport { default as MemoAttributeModel } from \"./attributes/MemoAttributeModel\";\nimport { default as MoneyAttributeModel } from \"./attributes/MoneyAttributeModel\";\nimport { default as NumberAttributeModel } from \"./attributes/NumberAttributeModel\";\nimport { default as PasswordAttributeModel } from \"./attributes/PasswordAttributeModel\";\nimport { default as StringAttributeModel } from \"./attributes/StringAttributeModel\";\nimport { default as UploadAttributeModel } from \"./attributes/UploadAttributeModel\";\nimport { default as XMLAttributeModel } from \"./attributes/XMLAttributeModel\";\n\nexport { default as AttributeContent } from \"./attributes/AttributeContent\";\n\nexport {\n default as LayoutHintRuleCollection,\n addLayoutHintRule,\n updateLayoutHintRules,\n} from \"./attributes/layouthint-rules/LayoutHintRuleCollection\";\nexport { default as BaseLayoutHintRule } from \"./attributes/layouthint-rules/BaseLayoutHintRule\";\nexport { default as DependentAttribute } from \"./attributes/layouthint-rules/DependentAttribute\";\nexport { default as RemainingTotalUploadSize } from \"./attributes/layouthint-rules/RemainingTotalUploadSize\";\n\nimport { default as LayoutHintCollection } from \"./layouthint/LayoutHintCollection\";\n\nimport { default as CaseViewModel } from \"./caseview/CaseViewModel\";\n\nimport { default as BusinessScenarioModel } from \"./concepts/BusinessScenarioModel\";\nimport { default as ConceptDetailModel } from \"./concepts/ConceptDetailModel\";\nimport { default as ConceptIndexModel } from \"./concepts/ConceptIndexModel\";\nexport { default as ConceptLinkModel } from \"./concepts/ConceptLinkModel\";\nexport { default as ConceptRelationCollection } from \"./concepts/ConceptRelationCollection\";\nexport { default as ConceptRelationModel } from \"./concepts/ConceptRelationModel\";\nimport { default as ConceptTypeDetailModel } from \"./concepts/ConceptTypeDetailModel\";\nexport { default as SourceReferenceCollection } from \"./concepts/SourceReferenceCollection\";\nexport { default as SourceReferenceModel } from \"./concepts/SourceReferenceModel\";\n\nexport { default as ConstraintCollection } from \"./attributes/input-constraints/ConstraintCollection\";\nexport { default as ConstraintModel } from \"./attributes/input-constraints/ConstraintModel\";\n\nimport { default as ContentIndexModel } from \"./content/ContentIndexModel\";\nexport { default as ContentLinkModel } from \"./content/ContentLinkModel\";\nimport { default as ContentModel } from \"./content/ContentModel\";\nimport { default as ContentTOCModel } from \"./content/ContentTOCModel\";\nimport { default as ContentTypeModel } from \"./content/ContentTypeModel\";\nexport { default as SectionModel } from \"./content/SectionModel\";\nexport { default as SubSectionModel } from \"./content/SubSectionModel\";\n\nexport { default as ContentConfiguration } from \"./contentconfiguration/ContentConfiguration\";\nexport { default as ContentConfigurationElements } from \"./contentconfiguration/ContentConfigurationElements\";\nexport { default as ContentConfigurationEndResults } from \"./contentconfiguration/ContentConfigurationEndResults\";\nexport { default as ContentConfigurationQuestions } from \"./contentconfiguration/ContentConfigurationQuestions\";\nexport { default as ContentConfigurationResults } from \"./contentconfiguration/ContentConfigurationResults\";\n\nimport { default as DetailModel } from \"./detail/DetailModel\";\n\nexport { default as ErrorCollection } from \"./error/ErrorCollection\";\nexport { default as ErrorModel } from \"./error/ErrorModel\";\nexport { default as ErrorResponse } from \"./error/ErrorResponse\";\n\nimport { default as AssignmentFilterModel } from \"./filters/AssignmentFilterModel\";\nimport { default as FilterModel } from \"./filters/FilterModel\";\nimport { default as RangeFilterModel } from \"./filters/RangeFilterModel\";\nimport { default as ConceptIndexFilterModel } from \"./filters/ConceptIndexFilterModel\";\nexport { default as FilterCollection } from \"./filters/FilterCollection\";\n\nimport { default as FormModel } from \"./form/FormModel\";\nexport { default as FormObjectModel } from \"./form/FormObjectModel\";\n\nexport { default as GroupingModel, GroupModel } from \"./grouping/GroupingModel\";\n\nexport { default as Href } from \"./href/Href\";\nexport { default as ListHref } from \"./href/ListHref\";\n\nexport { default as LinkCollection } from \"./links/LinkCollection\";\nexport { default as LinkModel } from \"./links/LinkModel\";\n\nimport { default as ListDetailModel } from \"./list/ListDetailModel\";\nexport { default as ListHeaderModel } from \"./list/ListHeaderModel\";\nexport { default as ListItemCollection } from \"./list/ListItemCollection\";\nexport { default as ListItemModel } from \"./list/ListItemModel\";\nimport { default as ListModel } from \"./list/ListModel\";\n\nexport { default as LookupOptionsModel } from \"./lookup/LookupOptionsModel\";\nexport { default as LookupOptionCollection } from \"./lookup/LookupOptionCollection\";\n\nimport { default as ModelCatalogModel } from \"./modelcatalog/ModelCatalogModel\";\nexport { default as ModelCategory } from \"./modelcatalog/ModelCategoryModel\";\n\nexport { default as ProcessStatusSettingsModel } from \"./process/ProcessStatusSettingsModel\";\n\nexport { default as PagesizeModel } from \"./paging/PagesizeModel\";\nexport { default as PagingModel } from \"./paging/PagingModel\";\n\nexport { default as Parameter } from \"./parameter/Parameter\";\n\nimport { default as GroupingPanelModel } from \"./panels/GroupingPanelModel\";\n\nimport { default as CaseSearchModel } from \"./search/CaseSearchModel\";\n\nexport { default as SortingModel } from \"./sorting/SortingModel\";\nexport { default as SortOptionModel } from \"./sorting/SortOptionModel\";\n\nimport { default as TabModel } from \"./tab/TabModel\";\n\nexport { default as TaskGroupCollection } from \"./taskgroup/TaskGroupCollection\";\nimport { default as TaskGroupModel } from \"./taskgroup/TaskGroupModel\";\n\nimport { default as UserModel } from \"./user/UserModel\";\nimport { default as UserProfileModel } from \"./user/UserProfileModel\";\nimport { default as UserServicesModel } from \"./user/UserServicesModel\";\n\nexport {\n ApplicationModel,\n CaseSearchModel,\n CaseViewModel,\n ListDetailModel,\n DetailModel,\n FormModel,\n GroupingPanelModel,\n ListModel,\n TabModel,\n TaskGroupModel,\n UserModel,\n UserProfileModel,\n UserServicesModel,\n ModelCatalogModel,\n ConceptIndexModel,\n ConceptDetailModel,\n BusinessScenarioModel,\n ConceptTypeDetailModel,\n ContentIndexModel,\n ContentTOCModel,\n ContentModel,\n ContentTypeModel,\n BooleanAttributeModel,\n CaptchaAttributeModel,\n ChoiceAttributeModel,\n DatetimeAttributeModel,\n HelptextAttributeModel,\n LabelAttributeModel,\n MemoAttributeModel,\n MoneyAttributeModel,\n NumberAttributeModel,\n PasswordAttributeModel,\n CompositeAttributeModel,\n StringAttributeModel,\n UploadAttributeModel,\n XMLAttributeModel,\n AssignmentFilterModel,\n FilterModel,\n RangeFilterModel,\n ConceptIndexFilterModel,\n LayoutHintCollection,\n};\n\nexport type * from \"./types\";\n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yC,eAAe,EACfjB,WAAW,EACXS,SAAS,EACTqB,kBAAkB,EAClBT,SAAS,EACTa,QAAQ,EACRE,cAAc,EACdC,SAAS,EACTC,gBAAgB,EAChBC,iBAAiB,EACjBf,iBAAiB,EACjB7C,iBAAiB,EACjBD,kBAAkB,EAClBD,qBAAqB,EACrBM,sBAAsB,EACtBK,iBAAiB,EACjBG,eAAe,EACfD,YAAY,EACZE,gBAAgB,EAChBzC,qBAAqB,EACrBC,qBAAqB,EACrBC,oBAAoB,EACpBK,sBAAsB,EACtBC,sBAAsB,EACtBC,mBAAmB,EACnBC,kBAAkB,EAClBC,mBAAmB,EACnBC,oBAAoB,EACpBC,sBAAsB,EACtBR,uBAAuB,EACvBS,oBAAoB,EACpBC,oBAAoB,EACpBC,iBAAiB,EACjBqC,qBAAqB,EACrBC,WAAW,EACXC,gBAAgB,EAChBC,uBAAuB,EACvBhC,oBAAoB","ignoreList":[]}
@@ -1,6 +1,6 @@
1
1
  import ResourceModel from "../base/ResourceModel";
2
+ import ModelCategoryCollection from "./ModelCategoryCollection";
2
3
  import { IllegalStateException } from "../../exceptions";
3
-
4
4
  /**
5
5
  * The Application model
6
6
  */
@@ -50,5 +50,12 @@ export default class ModelCatalogModel extends ResourceModel {
50
50
  }
51
51
  return link;
52
52
  }
53
+
54
+ /**
55
+ * Retrieve model categories as a collection
56
+ */
57
+ get modelcategories() {
58
+ return new ModelCategoryCollection(this.data.modelcategories);
59
+ }
53
60
  }
54
61
  //# sourceMappingURL=ModelCatalogModel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ModelCatalogModel.js","names":["ResourceModel","IllegalStateException","ModelCatalogModel","type","modelName","isApplicableModel","data","contributions","resourcetype","label","locale","conceptIndexLink","link","links","getLinkByKey","contentIndexLink"],"sources":["../../../src/models/modelcatalog/ModelCatalogModel.js"],"sourcesContent":["// @flow\nimport ResourceModel from \"../base/ResourceModel\";\n\nimport type LinkModel from \"../links/LinkModel\";\nimport { IllegalStateException } from \"../../exceptions\";\n\n/**\n * The Application model\n */\nexport default class ModelCatalogModel extends ResourceModel {\n /**\n */\n get type(): string {\n return \"ModelCatalog\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"ModelCatalogModel\";\n }\n\n /**\n */\n static isApplicableModel(data: Object): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"ModelCatalog\"\n );\n }\n\n /**\n */\n get label(): string {\n return this.locale === \"nl\" ? \"Model catalogus\" : \"Model catalog\";\n }\n\n /**\n * Retrieve link to Concept Index model\n */\n get conceptIndexLink(): LinkModel {\n const link = this.links.getLinkByKey(\"concepts\");\n if (!link) {\n throw new IllegalStateException(\n \"Missing concepts index link in model catalog\",\n );\n }\n return link;\n }\n\n /**\n * Retrieve link to Content Index model\n */\n get contentIndexLink(): LinkModel {\n const link = this.links.getLinkByKey(\"content\");\n if (!link) {\n throw new IllegalStateException(\n \"Missing content index link in model catalog\",\n );\n }\n return link;\n }\n}\n"],"mappings":"AACA,OAAOA,aAAa,MAAM,uBAAuB;AAGjD,SAASC,qBAAqB,QAAQ,kBAAkB;;AAExD;AACA;AACA;AACA,eAAe,MAAMC,iBAAiB,SAASF,aAAa,CAAC;EAC3D;AACF;EACE,IAAIG,IAAIA,CAAA,EAAW;IACjB,OAAO,cAAc;EACvB;;EAEA;AACF;EACE,WAAWC,SAASA,CAAA,EAAW;IAC7B,OAAO,mBAAmB;EAC5B;;EAEA;AACF;EACE,OAAOC,iBAAiBA,CAACC,IAAY,EAAW;IAC9C,OACEA,IAAI,CAACC,aAAa,CAACC,YAAY,IAC/BF,IAAI,CAACC,aAAa,CAACC,YAAY,KAAK,cAAc;EAEtD;;EAEA;AACF;EACE,IAAIC,KAAKA,CAAA,EAAW;IAClB,OAAO,IAAI,CAACC,MAAM,KAAK,IAAI,GAAG,iBAAiB,GAAG,eAAe;EACnE;;EAEA;AACF;AACA;EACE,IAAIC,gBAAgBA,CAAA,EAAc;IAChC,MAAMC,IAAI,GAAG,IAAI,CAACC,KAAK,CAACC,YAAY,CAAC,UAAU,CAAC;IAChD,IAAI,CAACF,IAAI,EAAE;MACT,MAAM,IAAIX,qBAAqB,CAC7B,8CACF,CAAC;IACH;IACA,OAAOW,IAAI;EACb;;EAEA;AACF;AACA;EACE,IAAIG,gBAAgBA,CAAA,EAAc;IAChC,MAAMH,IAAI,GAAG,IAAI,CAACC,KAAK,CAACC,YAAY,CAAC,SAAS,CAAC;IAC/C,IAAI,CAACF,IAAI,EAAE;MACT,MAAM,IAAIX,qBAAqB,CAC7B,6CACF,CAAC;IACH;IACA,OAAOW,IAAI;EACb;AACF","ignoreList":[]}
1
+ {"version":3,"file":"ModelCatalogModel.js","names":["ResourceModel","ModelCategoryCollection","IllegalStateException","ModelCatalogModel","type","modelName","isApplicableModel","data","contributions","resourcetype","label","locale","conceptIndexLink","link","links","getLinkByKey","contentIndexLink","modelcategories"],"sources":["../../../src/models/modelcatalog/ModelCatalogModel.js"],"sourcesContent":["// @flow\nimport ResourceModel from \"../base/ResourceModel\";\n\nimport ModelCategoryCollection from \"./ModelCategoryCollection\";\n\nimport { IllegalStateException } from \"../../exceptions\";\n\nimport type LinkModel from \"../links/LinkModel\";\n\n/**\n * The Application model\n */\nexport default class ModelCatalogModel extends ResourceModel {\n /**\n */\n get type(): string {\n return \"ModelCatalog\";\n }\n\n /**\n */\n static get modelName(): string {\n return \"ModelCatalogModel\";\n }\n\n /**\n */\n static isApplicableModel(data: Object): boolean {\n return (\n data.contributions.resourcetype &&\n data.contributions.resourcetype === \"ModelCatalog\"\n );\n }\n\n /**\n */\n get label(): string {\n return this.locale === \"nl\" ? \"Model catalogus\" : \"Model catalog\";\n }\n\n /**\n * Retrieve link to Concept Index model\n */\n get conceptIndexLink(): LinkModel {\n const link = this.links.getLinkByKey(\"concepts\");\n if (!link) {\n throw new IllegalStateException(\n \"Missing concepts index link in model catalog\",\n );\n }\n return link;\n }\n\n /**\n * Retrieve link to Content Index model\n */\n get contentIndexLink(): LinkModel {\n const link = this.links.getLinkByKey(\"content\");\n if (!link) {\n throw new IllegalStateException(\n \"Missing content index link in model catalog\",\n );\n }\n return link;\n }\n\n /**\n * Retrieve model categories as a collection\n */\n get modelcategories(): ModelCategoryCollection {\n return new ModelCategoryCollection(this.data.modelcategories);\n }\n}\n"],"mappings":"AACA,OAAOA,aAAa,MAAM,uBAAuB;AAEjD,OAAOC,uBAAuB,MAAM,2BAA2B;AAE/D,SAASC,qBAAqB,QAAQ,kBAAkB;AAIxD;AACA;AACA;AACA,eAAe,MAAMC,iBAAiB,SAASH,aAAa,CAAC;EAC3D;AACF;EACE,IAAII,IAAIA,CAAA,EAAW;IACjB,OAAO,cAAc;EACvB;;EAEA;AACF;EACE,WAAWC,SAASA,CAAA,EAAW;IAC7B,OAAO,mBAAmB;EAC5B;;EAEA;AACF;EACE,OAAOC,iBAAiBA,CAACC,IAAY,EAAW;IAC9C,OACEA,IAAI,CAACC,aAAa,CAACC,YAAY,IAC/BF,IAAI,CAACC,aAAa,CAACC,YAAY,KAAK,cAAc;EAEtD;;EAEA;AACF;EACE,IAAIC,KAAKA,CAAA,EAAW;IAClB,OAAO,IAAI,CAACC,MAAM,KAAK,IAAI,GAAG,iBAAiB,GAAG,eAAe;EACnE;;EAEA;AACF;AACA;EACE,IAAIC,gBAAgBA,CAAA,EAAc;IAChC,MAAMC,IAAI,GAAG,IAAI,CAACC,KAAK,CAACC,YAAY,CAAC,UAAU,CAAC;IAChD,IAAI,CAACF,IAAI,EAAE;MACT,MAAM,IAAIX,qBAAqB,CAC7B,8CACF,CAAC;IACH;IACA,OAAOW,IAAI;EACb;;EAEA;AACF;AACA;EACE,IAAIG,gBAAgBA,CAAA,EAAc;IAChC,MAAMH,IAAI,GAAG,IAAI,CAACC,KAAK,CAACC,YAAY,CAAC,SAAS,CAAC;IAC/C,IAAI,CAACF,IAAI,EAAE;MACT,MAAM,IAAIX,qBAAqB,CAC7B,6CACF,CAAC;IACH;IACA,OAAOW,IAAI;EACb;;EAEA;AACF;AACA;EACE,IAAII,eAAeA,CAAA,EAA4B;IAC7C,OAAO,IAAIhB,uBAAuB,CAAC,IAAI,CAACM,IAAI,CAACU,eAAe,CAAC;EAC/D;AACF","ignoreList":[]}
@@ -0,0 +1,16 @@
1
+ import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
2
+ import BaseCollection from "../base/BaseCollection";
3
+ import ModelCategoryModel from "./ModelCategoryModel";
4
+ /**
5
+ * Model category collection
6
+ */
7
+ export default class SourceReferenceCollection extends BaseCollection {
8
+ /**
9
+ */
10
+ constructor() {
11
+ let modelCategories = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
12
+ super();
13
+ this.collection = modelCategories ? _mapInstanceProperty(modelCategories).call(modelCategories, modelCategory => new ModelCategoryModel(modelCategory)) : [];
14
+ }
15
+ }
16
+ //# sourceMappingURL=ModelCategoryCollection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModelCategoryCollection.js","names":["BaseCollection","ModelCategoryModel","SourceReferenceCollection","constructor","modelCategories","arguments","length","undefined","collection","_mapInstanceProperty","call","modelCategory"],"sources":["../../../src/models/modelcatalog/ModelCategoryCollection.js"],"sourcesContent":["// @flow\nimport BaseCollection from \"../base/BaseCollection\";\nimport ModelCategoryModel from \"./ModelCategoryModel\";\n\nimport type { ModelCategory } from \"./ModelCategoryModel\";\n\n/**\n * Model category collection\n */\nexport default class SourceReferenceCollection extends BaseCollection<ModelCategoryModel> {\n /**\n */\n constructor(modelCategories: Array<ModelCategory> = []) {\n super();\n\n this.collection = modelCategories\n ? modelCategories.map(\n (modelCategory) => new ModelCategoryModel(modelCategory),\n )\n : [];\n }\n}\n"],"mappings":";AACA,OAAOA,cAAc,MAAM,wBAAwB;AACnD,OAAOC,kBAAkB,MAAM,sBAAsB;AAIrD;AACA;AACA;AACA,eAAe,MAAMC,yBAAyB,SAASF,cAAc,CAAqB;EACxF;AACF;EACEG,WAAWA,CAAA,EAA6C;IAAA,IAA5CC,eAAqC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;IACpD,KAAK,CAAC,CAAC;IAEP,IAAI,CAACG,UAAU,GAAGJ,eAAe,GAC7BK,oBAAA,CAAAL,eAAe,EAAAM,IAAA,CAAfN,eAAe,EACZO,aAAa,IAAK,IAAIV,kBAAkB,CAACU,aAAa,CACzD,CAAC,GACD,EAAE;EACR;AACF","ignoreList":[]}
@@ -0,0 +1,53 @@
1
+ import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
2
+ /**
3
+ */
4
+ class ModelCategoryModel {
5
+ constructor(modelCategory) {
6
+ _defineProperty(this, "_modelCategory", void 0);
7
+ this._modelCategory = modelCategory;
8
+ }
9
+
10
+ /**
11
+ * Id of the category
12
+ */
13
+ get key() {
14
+ return this._modelCategory._id;
15
+ }
16
+
17
+ /**
18
+ * Label of the category
19
+ */
20
+ get label() {
21
+ return this._modelCategory.label;
22
+ }
23
+
24
+ /**
25
+ * Description of the category
26
+ */
27
+ get description() {
28
+ return this._modelCategory.description;
29
+ }
30
+
31
+ /**
32
+ * Small icon of the category
33
+ */
34
+ get iconSmall() {
35
+ return this._modelCategory.iconSmall;
36
+ }
37
+
38
+ /**
39
+ * Medium icon of the category
40
+ */
41
+ get iconMedium() {
42
+ return this._modelCategory.iconMedium;
43
+ }
44
+
45
+ /**
46
+ * Large icon of the category
47
+ */
48
+ get iconLarge() {
49
+ return this._modelCategory.iconLarge;
50
+ }
51
+ }
52
+ export default ModelCategoryModel;
53
+ //# sourceMappingURL=ModelCategoryModel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModelCategoryModel.js","names":["ModelCategoryModel","constructor","modelCategory","_defineProperty","_modelCategory","key","_id","label","description","iconSmall","iconMedium","iconLarge"],"sources":["../../../src/models/modelcatalog/ModelCategoryModel.js"],"sourcesContent":["// @flow\nexport type ModelCategory = {\n _id: string,\n label: string,\n description: string,\n iconSmall: string,\n iconMedium: string,\n iconLarge: string,\n};\n\n/**\n */\nclass ModelCategoryModel {\n _modelCategory: ModelCategory;\n\n constructor(modelCategory: ModelCategory) {\n this._modelCategory = modelCategory;\n }\n\n /**\n * Id of the category\n */\n get key(): string {\n return this._modelCategory._id;\n }\n\n /**\n * Label of the category\n */\n get label(): string {\n return this._modelCategory.label;\n }\n\n /**\n * Description of the category\n */\n get description(): string {\n return this._modelCategory.description;\n }\n\n /**\n * Small icon of the category\n */\n get iconSmall(): string {\n return this._modelCategory.iconSmall;\n }\n\n /**\n * Medium icon of the category\n */\n get iconMedium(): string {\n return this._modelCategory.iconMedium;\n }\n\n /**\n * Large icon of the category\n */\n get iconLarge(): string {\n return this._modelCategory.iconLarge;\n }\n}\n\nexport default ModelCategoryModel;\n"],"mappings":";AAUA;AACA;AACA,MAAMA,kBAAkB,CAAC;EAGvBC,WAAWA,CAACC,aAA4B,EAAE;IAAAC,eAAA;IACxC,IAAI,CAACC,cAAc,GAAGF,aAAa;EACrC;;EAEA;AACF;AACA;EACE,IAAIG,GAAGA,CAAA,EAAW;IAChB,OAAO,IAAI,CAACD,cAAc,CAACE,GAAG;EAChC;;EAEA;AACF;AACA;EACE,IAAIC,KAAKA,CAAA,EAAW;IAClB,OAAO,IAAI,CAACH,cAAc,CAACG,KAAK;EAClC;;EAEA;AACF;AACA;EACE,IAAIC,WAAWA,CAAA,EAAW;IACxB,OAAO,IAAI,CAACJ,cAAc,CAACI,WAAW;EACxC;;EAEA;AACF;AACA;EACE,IAAIC,SAASA,CAAA,EAAW;IACtB,OAAO,IAAI,CAACL,cAAc,CAACK,SAAS;EACtC;;EAEA;AACF;AACA;EACE,IAAIC,UAAUA,CAAA,EAAW;IACvB,OAAO,IAAI,CAACN,cAAc,CAACM,UAAU;EACvC;;EAEA;AACF;AACA;EACE,IAAIC,SAASA,CAAA,EAAW;IACtB,OAAO,IAAI,CAACP,cAAc,CAACO,SAAS;EACtC;AACF;AAEA,eAAeX,kBAAkB","ignoreList":[]}
@@ -42,7 +42,7 @@ const modularUIConnector = function (name, resource) {
42
42
  return Component => {
43
43
  const WrappedComponent = props => {
44
44
  // explicit property for removeOnMount overwrite the setting
45
- const finalRemoveOnUnmount = props.removeOnUnmount === true ? true : removeOnUnmount;
45
+ const finalRemoveOnUnmount = props.removeOnUnmount ?? removeOnUnmount;
46
46
  const dispatch = useDispatch();
47
47
  const location = useLocation();
48
48
  const url = useUrl(resource, {
@@ -94,10 +94,10 @@ const modularUIConnector = function (name, resource) {
94
94
  const locale = useLocale();
95
95
  const newProps = {
96
96
  modelKey,
97
- [propName]: modelEntry ? modelEntry.model : null,
97
+ [propName]: modelEntry?.model ?? null,
98
98
  location,
99
- status: modelEntry ? modelEntry.status : null,
100
- lastModification: modelEntry ? modelEntry.lastModification : null,
99
+ status: modelEntry?.status ?? null,
100
+ lastModification: modelEntry?.lastModification ?? null,
101
101
  hasModel: Boolean(modelEntry),
102
102
  locale,
103
103
  fetchModularUI: handleFetch,