@beinformed/ui 1.49.3 → 1.49.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
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.49.4](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/compare/v1.49.3...v1.49.4) (2024-07-02)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **modelcatalog:** make key of hook settable for multiple requests ([2595154](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/commit/25951542d34bbc16481c8487f13a5ea9224df8aa))
11
+
5
12
  ## [1.49.3](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/compare/v1.49.2...v1.49.3) (2024-06-26)
6
13
 
7
14
 
@@ -19,9 +19,10 @@ export const useModelCatalog = () => useModularUIBasic("modelcatalog", "/modelca
19
19
 
20
20
  /**
21
21
  */
22
- export const useConceptIndex = href => {
22
+ export const useConceptIndex = function (href) {
23
+ let key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "conceptindex";
23
24
  const url = filterParameters(href, ["entryDate", "index", "label", "type"]);
24
- return useModularUIBasic("conceptindex", url, {
25
+ return useModularUIBasic(key, url, {
25
26
  expectedModels: ["ConceptIndex"],
26
27
  targetModel: ConceptIndexModel
27
28
  });
@@ -29,19 +30,21 @@ export const useConceptIndex = href => {
29
30
 
30
31
  /**
31
32
  */
32
- export const useConceptDetail = concept => {
33
+ export const useConceptDetail = function (concept) {
34
+ let key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "conceptdetail";
33
35
  const location = useLocation();
34
36
  const href = createHref("concepts", concept, location, ["entryDate"]);
35
- return useModularUIBasic("conceptdetail", href, {
37
+ return useModularUIBasic(key, href, {
36
38
  expectedModels: ["ConceptDetail", "BusinessScenario"]
37
39
  });
38
40
  };
39
41
 
40
42
  /**
41
43
  */
42
- export const useContentIndex = href => {
44
+ export const useContentIndex = function (href) {
45
+ let key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "contentindex";
43
46
  const url = filterParameters(href, ["index", "label", "type"]);
44
- return useModularUIBasic("contentindex", url, {
47
+ return useModularUIBasic(key, url, {
45
48
  expectedModels: ["ContentIndex"],
46
49
  targetModel: ContentIndexModel
47
50
  });
@@ -49,10 +52,11 @@ export const useContentIndex = href => {
49
52
 
50
53
  /**
51
54
  */
52
- export const useContentTOC = content => {
55
+ export const useContentTOC = function (content) {
56
+ let key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "contenttoc";
53
57
  const location = useLocation();
54
58
  const href = createHref("content", content, location, ["entryDate"]);
55
- return useModularUIBasic("contenttoc", href, {
59
+ return useModularUIBasic(key, href, {
56
60
  expectedModels: ["ContentTOC"],
57
61
  targetModel: ContentTOCModel
58
62
  });
@@ -60,9 +64,10 @@ export const useContentTOC = content => {
60
64
 
61
65
  /**
62
66
  */
63
- export const useContent = contentSection => {
67
+ export const useContent = function (contentSection) {
68
+ let key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "content";
64
69
  const href = createHref("content", contentSection, null, ["entryDate"]);
65
- return useModularUIBasic("content", href, {
70
+ return useModularUIBasic(key, href, {
66
71
  expectedModels: ["Content"],
67
72
  targetModel: ContentModel
68
73
  });
@@ -70,9 +75,10 @@ export const useContent = contentSection => {
70
75
 
71
76
  /**
72
77
  */
73
- export const useContentType = contentType => {
78
+ export const useContentType = function (contentType) {
79
+ let key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "contenttypes";
74
80
  const href = createHref("contenttypes", contentType, null, ["entryDate"]);
75
- return useModularUIBasic("contenttypes", href, {
81
+ return useModularUIBasic(key, href, {
76
82
  expectedModels: ["ContentType"],
77
83
  targetModel: ContentTypeModel
78
84
  });
@@ -1 +1 @@
1
- {"version":3,"file":"useModelCatalog.js","names":["useLocation","createHref","filterParameters","ModelCatalogModel","ConceptIndexModel","ConceptDetailModel","default","BusinessScenarioModel","ContentIndexModel","ContentTOCModel","ContentModel","useModularUIBasic","ContentTypeModel","useModelCatalog","expectedModels","targetModel","useConceptIndex","href","url","useConceptDetail","concept","location","useContentIndex","useContentTOC","content","useContent","contentSection","useContentType","contentType"],"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\n/**\n */\nexport const useModelCatalog = (): ?ModelCatalogModel =>\n useModularUIBasic(\"modelcatalog\", \"/modelcatalog\", {\n expectedModels: [\"ModelCatalog\"],\n targetModel: ModelCatalogModel,\n });\n\n/**\n */\nexport const useConceptIndex = (href: string): ?ConceptIndexModel => {\n const url = filterParameters(href, [\"entryDate\", \"index\", \"label\", \"type\"]);\n return useModularUIBasic(\"conceptindex\", url, {\n expectedModels: [\"ConceptIndex\"],\n targetModel: ConceptIndexModel,\n });\n};\n\n/**\n */\nexport const useConceptDetail = (\n concept: string,\n): ?ConceptDetailModel | ?BusinessScenarioModel => {\n const location = useLocation();\n\n const href = createHref(\"concepts\", concept, location, [\"entryDate\"]);\n return useModularUIBasic(\"conceptdetail\", href, {\n expectedModels: [\"ConceptDetail\", \"BusinessScenario\"],\n });\n};\n\n/**\n */\nexport const useContentIndex = (href: string): ?ContentIndexModel => {\n const url = filterParameters(href, [\"index\", \"label\", \"type\"]);\n return useModularUIBasic(\"contentindex\", url, {\n expectedModels: [\"ContentIndex\"],\n targetModel: ContentIndexModel,\n });\n};\n\n/**\n */\nexport const useContentTOC = (content: string): ?ContentTOCModel => {\n const location = useLocation();\n const href = createHref(\"content\", content, location, [\"entryDate\"]);\n return useModularUIBasic(\"contenttoc\", href, {\n expectedModels: [\"ContentTOC\"],\n targetModel: ContentTOCModel,\n });\n};\n\n/**\n */\nexport const useContent = (contentSection: string): ?ContentModel => {\n const href = createHref(\"content\", contentSection, null, [\"entryDate\"]);\n return useModularUIBasic(\"content\", href, {\n expectedModels: [\"Content\"],\n targetModel: ContentModel,\n });\n};\n\n/**\n */\nexport const useContentType = (contentType: string): ?ContentTypeModel => {\n const href = createHref(\"contenttypes\", contentType, null, [\"entryDate\"]);\n return useModularUIBasic(\"contenttypes\", href, {\n expectedModels: [\"ContentType\"],\n targetModel: ContentTypeModel,\n });\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;;AAE5C;AACA;AACA,OAAO,MAAMC,eAAe,GAAGA,CAAA,KAC7BF,iBAAiB,CAAC,cAAc,EAAE,eAAe,EAAE;EACjDG,cAAc,EAAE,CAAC,cAAc,CAAC;EAChCC,WAAW,EAAEZ;AACf,CAAC,CAAC;;AAEJ;AACA;AACA,OAAO,MAAMa,eAAe,GAAIC,IA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EACf,CAAC,CAAC;AACJ,CAAC;;AAED;AACA;AACA,OAAO,MAAMgB,UAAU,GAAIC,cAAsB,IAAoB;EACnE,MAAMT,IAAI,GAAGhB,UAAU,CAAC,SAAS,EAAEyB,cAAc,EAAE,IAAI,EAAE,CAAC,WAAW,CAAC,CAAC;EACvE,OAAOf,iBAAiB,CAAC,SAAS,EAAEM,IAAI,EAAE;IACxCH,cAAc,EAAE,CAAC,SAAS,CAAC;IAC3BC,WAAW,EAAEL;EACf,CAAC,CAAC;AACJ,CAAC;;AAED;AACA;AACA,OAAO,MAAMiB,cAAc,GAAIC,WAAmB,IAAwB;EACxE,MAAMX,IAAI,GAAGhB,UAAU,CAAC,cAAc,EAAE2B,WAAW,EAAE,IAAI,EAAE,CAAC,WAAW,CAAC,CAAC;EACzE,OAAOjB,iBAAiB,CAAC,cAAc,EAAEM,IAAI,EAAE;IAC7CH,cAAc,EAAE,CAAC,aAAa,CAAC;IAC/BC,WAAW,EAAEH;EACf,CAAC,CAAC;AACJ,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"useModelCatalog.js","names":["useLocation","createHref","filterParameters","ModelCatalogModel","ConceptIndexModel","ConceptDetailModel","default","BusinessScenarioModel","ContentIndexModel","ContentTOCModel","ContentModel","useModularUIBasic","ContentTypeModel","useModelCatalog","expectedModels","targetModel","useConceptIndex","href","key","arguments","length","undefined","url","useConceptDetail","concept","location","useContentIndex","useContentTOC","content","useContent","contentSection","useContentType","contentType"],"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\n/**\n */\nexport const useModelCatalog = (): ?ModelCatalogModel =>\n useModularUIBasic(\"modelcatalog\", \"/modelcatalog\", {\n expectedModels: [\"ModelCatalog\"],\n targetModel: ModelCatalogModel,\n });\n\n/**\n */\nexport const useConceptIndex = (\n href: string,\n key?: string = \"conceptindex\",\n): ?ConceptIndexModel => {\n const url = filterParameters(href, [\"entryDate\", \"index\", \"label\", \"type\"]);\n return useModularUIBasic(key, url, {\n expectedModels: [\"ConceptIndex\"],\n targetModel: ConceptIndexModel,\n });\n};\n\n/**\n */\nexport const useConceptDetail = (\n concept: string,\n key?: string = \"conceptdetail\",\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 });\n};\n\n/**\n */\nexport const useContentIndex = (\n href: string,\n key?: string = \"contentindex\",\n): ?ContentIndexModel => {\n const url = filterParameters(href, [\"index\", \"label\", \"type\"]);\n return useModularUIBasic(key, url, {\n expectedModels: [\"ContentIndex\"],\n targetModel: ContentIndexModel,\n });\n};\n\n/**\n */\nexport const useContentTOC = (\n content: string,\n key?: string = \"contenttoc\",\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 });\n};\n\n/**\n */\nexport const useContent = (\n contentSection: string,\n key?: string = \"content\",\n): ?ContentModel => {\n const href = createHref(\"content\", contentSection, null, [\"entryDate\"]);\n return useModularUIBasic(key, href, {\n expectedModels: [\"Content\"],\n targetModel: ContentModel,\n });\n};\n\n/**\n */\nexport const useContentType = (\n contentType: string,\n key?: string = \"contenttypes\",\n): ?ContentTypeModel => {\n const href = createHref(\"contenttypes\", contentType, null, [\"entryDate\"]);\n return useModularUIBasic(key, href, {\n expectedModels: [\"ContentType\"],\n targetModel: ContentTypeModel,\n });\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;;AAE5C;AACA;AACA,OAAO,MAAMC,eAAe,GAAGA,CAAA,KAC7BF,iBAAiB,CAAC,cAAc,EAAE,eAAe,EAAE;EACjDG,cAAc,EAAE,CAAC,cAAc,CAAC;EAChCC,WAAW,EAAEZ;AACf,CAAC,CAAC;;AAEJ;AACA;AACA,OAAO,MAAMa,eAAe,GAAG,SAAAA,CAC7BC,IAAY,EAEW;EAAA,IADvBC,GAAY,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,cAAc;EAE7B,MAAMG,GAAG,GAAGpB,gBAAgB,CAACe,IAAI,EAAE,CAAC,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;EAC3E,OAAON,iBAAiB,CAACO,GAAG,EAAEI,GAAG,EAAE;IACjCR,cAAc,EAAE,CAAC,cAAc,CAAC;IAChCC,WAAW,EAAEX;EACf,CAAC,CAAC;AACJ,CAAC;;AAED;AACA;AACA,OAAO,MAAMmB,gBAAgB,GAAG,SAAAA,CAC9BC,OAAe,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f,CAAC,CAAC;AACJ,CAAC;;AAED;AACA;AACA,OAAO,MAAMoB,UAAU,GAAG,SAAAA,CACxBC,cAAsB,EAEJ;EAAA,IADlBZ,GAAY,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,SAAS;EAExB,MAAMF,IAAI,GAAGhB,UAAU,CAAC,SAAS,EAAE6B,cAAc,EAAE,IAAI,EAAE,CAAC,WAAW,CAAC,CAAC;EACvE,OAAOnB,iBAAiB,CAACO,GAAG,EAAED,IAAI,EAAE;IAClCH,cAAc,EAAE,CAAC,SAAS,CAAC;IAC3BC,WAAW,EAAEL;EACf,CAAC,CAAC;AACJ,CAAC;;AAED;AACA;AACA,OAAO,MAAMqB,cAAc,GAAG,SAAAA,CAC5BC,WAAmB,EAEG;EAAA,IADtBd,GAAY,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,cAAc;EAE7B,MAAMF,IAAI,GAAGhB,UAAU,CAAC,cAAc,EAAE+B,WAAW,EAAE,IAAI,EAAE,CAAC,WAAW,CAAC,CAAC;EACzE,OAAOrB,iBAAiB,CAACO,GAAG,EAAED,IAAI,EAAE;IAClCH,cAAc,EAAE,CAAC,aAAa,CAAC;IAC/BC,WAAW,EAAEH;EACf,CAAC,CAAC;AACJ,CAAC","ignoreList":[]}
@@ -26,9 +26,10 @@ const useModelCatalog = () => (0, _useModularUIBasic.useModularUIBasic)("modelca
26
26
  /**
27
27
  */
28
28
  exports.useModelCatalog = useModelCatalog;
29
- const useConceptIndex = href => {
29
+ const useConceptIndex = function (href) {
30
+ let key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "conceptindex";
30
31
  const url = (0, _createHref.filterParameters)(href, ["entryDate", "index", "label", "type"]);
31
- return (0, _useModularUIBasic.useModularUIBasic)("conceptindex", url, {
32
+ return (0, _useModularUIBasic.useModularUIBasic)(key, url, {
32
33
  expectedModels: ["ConceptIndex"],
33
34
  targetModel: _ConceptIndexModel.default
34
35
  });
@@ -37,10 +38,11 @@ const useConceptIndex = href => {
37
38
  /**
38
39
  */
39
40
  exports.useConceptIndex = useConceptIndex;
40
- const useConceptDetail = concept => {
41
+ const useConceptDetail = function (concept) {
42
+ let key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "conceptdetail";
41
43
  const location = (0, _useRouter.useLocation)();
42
44
  const href = (0, _createHref.createHref)("concepts", concept, location, ["entryDate"]);
43
- return (0, _useModularUIBasic.useModularUIBasic)("conceptdetail", href, {
45
+ return (0, _useModularUIBasic.useModularUIBasic)(key, href, {
44
46
  expectedModels: ["ConceptDetail", "BusinessScenario"]
45
47
  });
46
48
  };
@@ -48,9 +50,10 @@ const useConceptDetail = concept => {
48
50
  /**
49
51
  */
50
52
  exports.useConceptDetail = useConceptDetail;
51
- const useContentIndex = href => {
53
+ const useContentIndex = function (href) {
54
+ let key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "contentindex";
52
55
  const url = (0, _createHref.filterParameters)(href, ["index", "label", "type"]);
53
- return (0, _useModularUIBasic.useModularUIBasic)("contentindex", url, {
56
+ return (0, _useModularUIBasic.useModularUIBasic)(key, url, {
54
57
  expectedModels: ["ContentIndex"],
55
58
  targetModel: _ContentIndexModel.default
56
59
  });
@@ -59,10 +62,11 @@ const useContentIndex = href => {
59
62
  /**
60
63
  */
61
64
  exports.useContentIndex = useContentIndex;
62
- const useContentTOC = content => {
65
+ const useContentTOC = function (content) {
66
+ let key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "contenttoc";
63
67
  const location = (0, _useRouter.useLocation)();
64
68
  const href = (0, _createHref.createHref)("content", content, location, ["entryDate"]);
65
- return (0, _useModularUIBasic.useModularUIBasic)("contenttoc", href, {
69
+ return (0, _useModularUIBasic.useModularUIBasic)(key, href, {
66
70
  expectedModels: ["ContentTOC"],
67
71
  targetModel: _ContentTOCModel.default
68
72
  });
@@ -71,9 +75,10 @@ const useContentTOC = content => {
71
75
  /**
72
76
  */
73
77
  exports.useContentTOC = useContentTOC;
74
- const useContent = contentSection => {
78
+ const useContent = function (contentSection) {
79
+ let key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "content";
75
80
  const href = (0, _createHref.createHref)("content", contentSection, null, ["entryDate"]);
76
- return (0, _useModularUIBasic.useModularUIBasic)("content", href, {
81
+ return (0, _useModularUIBasic.useModularUIBasic)(key, href, {
77
82
  expectedModels: ["Content"],
78
83
  targetModel: _ContentModel.default
79
84
  });
@@ -82,9 +87,10 @@ const useContent = contentSection => {
82
87
  /**
83
88
  */
84
89
  exports.useContent = useContent;
85
- const useContentType = contentType => {
90
+ const useContentType = function (contentType) {
91
+ let key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "contenttypes";
86
92
  const href = (0, _createHref.createHref)("contenttypes", contentType, null, ["entryDate"]);
87
- return (0, _useModularUIBasic.useModularUIBasic)("contenttypes", href, {
93
+ return (0, _useModularUIBasic.useModularUIBasic)(key, href, {
88
94
  expectedModels: ["ContentType"],
89
95
  targetModel: _models.ContentTypeModel
90
96
  });
@@ -24,9 +24,12 @@ export const useModelCatalog = (): ?ModelCatalogModel =>
24
24
 
25
25
  /**
26
26
  */
27
- export const useConceptIndex = (href: string): ?ConceptIndexModel => {
27
+ export const useConceptIndex = (
28
+ href: string,
29
+ key?: string = "conceptindex",
30
+ ): ?ConceptIndexModel => {
28
31
  const url = filterParameters(href, ["entryDate", "index", "label", "type"]);
29
- return useModularUIBasic("conceptindex", url, {
32
+ return useModularUIBasic(key, url, {
30
33
  expectedModels: ["ConceptIndex"],
31
34
  targetModel: ConceptIndexModel,
32
35
  });
@@ -36,20 +39,24 @@ export const useConceptIndex = (href: string): ?ConceptIndexModel => {
36
39
  */
37
40
  export const useConceptDetail = (
38
41
  concept: string,
42
+ key?: string = "conceptdetail",
39
43
  ): ?ConceptDetailModel | ?BusinessScenarioModel => {
40
44
  const location = useLocation();
41
45
 
42
46
  const href = createHref("concepts", concept, location, ["entryDate"]);
43
- return useModularUIBasic("conceptdetail", href, {
47
+ return useModularUIBasic(key, href, {
44
48
  expectedModels: ["ConceptDetail", "BusinessScenario"],
45
49
  });
46
50
  };
47
51
 
48
52
  /**
49
53
  */
50
- export const useContentIndex = (href: string): ?ContentIndexModel => {
54
+ export const useContentIndex = (
55
+ href: string,
56
+ key?: string = "contentindex",
57
+ ): ?ContentIndexModel => {
51
58
  const url = filterParameters(href, ["index", "label", "type"]);
52
- return useModularUIBasic("contentindex", url, {
59
+ return useModularUIBasic(key, url, {
53
60
  expectedModels: ["ContentIndex"],
54
61
  targetModel: ContentIndexModel,
55
62
  });
@@ -57,10 +64,13 @@ export const useContentIndex = (href: string): ?ContentIndexModel => {
57
64
 
58
65
  /**
59
66
  */
60
- export const useContentTOC = (content: string): ?ContentTOCModel => {
67
+ export const useContentTOC = (
68
+ content: string,
69
+ key?: string = "contenttoc",
70
+ ): ?ContentTOCModel => {
61
71
  const location = useLocation();
62
72
  const href = createHref("content", content, location, ["entryDate"]);
63
- return useModularUIBasic("contenttoc", href, {
73
+ return useModularUIBasic(key, href, {
64
74
  expectedModels: ["ContentTOC"],
65
75
  targetModel: ContentTOCModel,
66
76
  });
@@ -68,9 +78,12 @@ export const useContentTOC = (content: string): ?ContentTOCModel => {
68
78
 
69
79
  /**
70
80
  */
71
- export const useContent = (contentSection: string): ?ContentModel => {
81
+ export const useContent = (
82
+ contentSection: string,
83
+ key?: string = "content",
84
+ ): ?ContentModel => {
72
85
  const href = createHref("content", contentSection, null, ["entryDate"]);
73
- return useModularUIBasic("content", href, {
86
+ return useModularUIBasic(key, href, {
74
87
  expectedModels: ["Content"],
75
88
  targetModel: ContentModel,
76
89
  });
@@ -78,9 +91,12 @@ export const useContent = (contentSection: string): ?ContentModel => {
78
91
 
79
92
  /**
80
93
  */
81
- export const useContentType = (contentType: string): ?ContentTypeModel => {
94
+ export const useContentType = (
95
+ contentType: string,
96
+ key?: string = "contenttypes",
97
+ ): ?ContentTypeModel => {
82
98
  const href = createHref("contenttypes", contentType, null, ["entryDate"]);
83
- return useModularUIBasic("contenttypes", href, {
99
+ return useModularUIBasic(key, href, {
84
100
  expectedModels: ["ContentType"],
85
101
  targetModel: ContentTypeModel,
86
102
  });
@@ -1 +1 @@
1
- {"version":3,"file":"useModelCatalog.js","names":["_useRouter","require","_createHref","_ModelCatalogModel","_interopRequireDefault","_ConceptIndexModel","_ConceptDetailModel","_BusinessScenarioModel","_ContentIndexModel","_ContentTOCModel","_ContentModel","_useModularUIBasic","_models","useModelCatalog","useModularUIBasic","expectedModels","targetModel","ModelCatalogModel","exports","useConceptIndex","href","url","filterParameters","ConceptIndexModel","useConceptDetail","concept","location","useLocation","createHref","useContentIndex","ContentIndexModel","useContentTOC","content","ContentTOCModel","useContent","contentSection","ContentModel","useContentType","contentType","ContentTypeModel"],"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\n/**\n */\nexport const useModelCatalog = (): ?ModelCatalogModel =>\n useModularUIBasic(\"modelcatalog\", \"/modelcatalog\", {\n expectedModels: [\"ModelCatalog\"],\n targetModel: ModelCatalogModel,\n });\n\n/**\n */\nexport const useConceptIndex = (href: string): ?ConceptIndexModel => {\n const url = filterParameters(href, [\"entryDate\", \"index\", \"label\", \"type\"]);\n return useModularUIBasic(\"conceptindex\", url, {\n expectedModels: [\"ConceptIndex\"],\n targetModel: ConceptIndexModel,\n });\n};\n\n/**\n */\nexport const useConceptDetail = (\n concept: string,\n): ?ConceptDetailModel | ?BusinessScenarioModel => {\n const location = useLocation();\n\n const href = createHref(\"concepts\", concept, location, [\"entryDate\"]);\n return useModularUIBasic(\"conceptdetail\", href, {\n expectedModels: [\"ConceptDetail\", \"BusinessScenario\"],\n });\n};\n\n/**\n */\nexport const useContentIndex = (href: string): ?ContentIndexModel => {\n const url = filterParameters(href, [\"index\", \"label\", \"type\"]);\n return useModularUIBasic(\"contentindex\", url, {\n expectedModels: [\"ContentIndex\"],\n targetModel: ContentIndexModel,\n });\n};\n\n/**\n */\nexport const useContentTOC = (content: string): ?ContentTOCModel => {\n const location = useLocation();\n const href = createHref(\"content\", content, location, [\"entryDate\"]);\n return useModularUIBasic(\"contenttoc\", href, {\n expectedModels: [\"ContentTOC\"],\n targetModel: ContentTOCModel,\n });\n};\n\n/**\n */\nexport const useContent = (contentSection: string): ?ContentModel => {\n const href = createHref(\"content\", contentSection, null, [\"entryDate\"]);\n return useModularUIBasic(\"content\", href, {\n expectedModels: [\"Content\"],\n targetModel: ContentModel,\n });\n};\n\n/**\n */\nexport const useContentType = (contentType: string): ?ContentTypeModel => {\n const href = createHref(\"contenttypes\", contentType, null, [\"entryDate\"]);\n return useModularUIBasic(\"contenttypes\", href, {\n expectedModels: [\"ContentType\"],\n targetModel: ContentTypeModel,\n });\n};\n"],"mappings":";;;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,kBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,kBAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,mBAAA,GAAAF,sBAAA,CAAAH,OAAA;AACA,IAAAM,sBAAA,GAAAH,sBAAA,CAAAH,OAAA;AACA,IAAAO,kBAAA,GAAAJ,sBAAA,CAAAH,OAAA;AACA,IAAAQ,gBA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C/BC,WAAW,EAAEuB;EACf,CAAC,CAAC;AACJ,CAAC;AAACrB,OAAA,CAAAmB,cAAA,GAAAA,cAAA","ignoreList":[]}
1
+ {"version":3,"file":"useModelCatalog.js","names":["_useRouter","require","_createHref","_ModelCatalogModel","_interopRequireDefault","_ConceptIndexModel","_ConceptDetailModel","_BusinessScenarioModel","_ContentIndexModel","_ContentTOCModel","_ContentModel","_useModularUIBasic","_models","useModelCatalog","useModularUIBasic","expectedModels","targetModel","ModelCatalogModel","exports","useConceptIndex","href","key","arguments","length","undefined","url","filterParameters","ConceptIndexModel","useConceptDetail","concept","location","useLocation","createHref","useContentIndex","ContentIndexModel","useContentTOC","content","ContentTOCModel","useContent","contentSection","ContentModel","useContentType","contentType","ContentTypeModel"],"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\n/**\n */\nexport const useModelCatalog = (): ?ModelCatalogModel =>\n useModularUIBasic(\"modelcatalog\", \"/modelcatalog\", {\n expectedModels: [\"ModelCatalog\"],\n targetModel: ModelCatalogModel,\n });\n\n/**\n */\nexport const useConceptIndex = (\n href: string,\n key?: string = \"conceptindex\",\n): ?ConceptIndexModel => {\n const url = filterParameters(href, [\"entryDate\", \"index\", \"label\", \"type\"]);\n return useModularUIBasic(key, url, {\n expectedModels: [\"ConceptIndex\"],\n targetModel: ConceptIndexModel,\n });\n};\n\n/**\n */\nexport const useConceptDetail = (\n concept: string,\n key?: string = \"conceptdetail\",\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 });\n};\n\n/**\n */\nexport const useContentIndex = (\n href: string,\n key?: string = \"contentindex\",\n): ?ContentIndexModel => {\n const url = filterParameters(href, [\"index\", \"label\", \"type\"]);\n return useModularUIBasic(key, url, {\n expectedModels: [\"ContentIndex\"],\n targetModel: ContentIndexModel,\n });\n};\n\n/**\n */\nexport const useContentTOC = (\n content: string,\n key?: string = \"contenttoc\",\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 });\n};\n\n/**\n */\nexport const useContent = (\n contentSection: string,\n key?: string = \"content\",\n): ?ContentModel => {\n const href = createHref(\"content\", contentSection, null, [\"entryDate\"]);\n return useModularUIBasic(key, href, {\n expectedModels: [\"Content\"],\n targetModel: ContentModel,\n });\n};\n\n/**\n */\nexport const useContentType = (\n contentType: string,\n key?: string = \"contenttypes\",\n): ?ContentTypeModel => {\n const href = createHref(\"contenttypes\", contentType, null, [\"entryDate\"]);\n return useModularUIBasic(key, href, {\n expectedModels: [\"ContentType\"],\n targetModel: ContentTypeModel,\n });\n};\n"],"mappings":";;;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,kBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,kBAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,mBAAA,GAAAF,sBAAA,CAAAH,OAAA;AACA,IAAAM,sBAAA,GAAAH,sBAAA,CAAAH,OAAA;AACA,IAAAO,kBAAA,GAAA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,QAAAE,SAAA,GAAAF,SAAA,MAAG,SAAS;EAExB,MAAMF,IAAI,GAAG,IAAAY,sBAAU,EAAC,SAAS,EAAEO,cAAc,EAAE,IAAI,EAAE,CAAC,WAAW,CAAC,CAAC;EACvE,OAAO,IAAAzB,oCAAiB,EAACO,GAAG,EAAED,IAAI,EAAE;IAClCL,cAAc,EAAE,CAAC,SAAS,CAAC;IAC3BC,WAAW,EAAEwB;EACf,CAAC,CAAC;AACJ,CAAC;;AAED;AACA;AADAtB,OAAA,CAAAoB,UAAA,GAAAA,UAAA;AAEO,MAAMG,cAAc,GAAG,SAAAA,CAC5BC,WAAmB,EAEG;EAAA,IADtBrB,GAAY,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,cAAc;EAE7B,MAAMF,IAAI,GAAG,IAAAY,sBAAU,EAAC,cAAc,EAAEU,WAAW,EAAE,IAAI,EAAE,CAAC,WAAW,CAAC,CAAC;EACzE,OAAO,IAAA5B,oCAAiB,EAACO,GAAG,EAAED,IAAI,EAAE;IAClCL,cAAc,EAAE,CAAC,aAAa,CAAC;IAC/BC,WAAW,EAAE2B;EACf,CAAC,CAAC;AACJ,CAAC;AAACzB,OAAA,CAAAuB,cAAA,GAAAA,cAAA","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beinformed/ui",
3
- "version": "1.49.3",
3
+ "version": "1.49.4",
4
4
  "description": "Toolbox for be informed javascript layouts",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "bugs": "http://support.beinformed.com",
@@ -24,9 +24,12 @@ export const useModelCatalog = (): ?ModelCatalogModel =>
24
24
 
25
25
  /**
26
26
  */
27
- export const useConceptIndex = (href: string): ?ConceptIndexModel => {
27
+ export const useConceptIndex = (
28
+ href: string,
29
+ key?: string = "conceptindex",
30
+ ): ?ConceptIndexModel => {
28
31
  const url = filterParameters(href, ["entryDate", "index", "label", "type"]);
29
- return useModularUIBasic("conceptindex", url, {
32
+ return useModularUIBasic(key, url, {
30
33
  expectedModels: ["ConceptIndex"],
31
34
  targetModel: ConceptIndexModel,
32
35
  });
@@ -36,20 +39,24 @@ export const useConceptIndex = (href: string): ?ConceptIndexModel => {
36
39
  */
37
40
  export const useConceptDetail = (
38
41
  concept: string,
42
+ key?: string = "conceptdetail",
39
43
  ): ?ConceptDetailModel | ?BusinessScenarioModel => {
40
44
  const location = useLocation();
41
45
 
42
46
  const href = createHref("concepts", concept, location, ["entryDate"]);
43
- return useModularUIBasic("conceptdetail", href, {
47
+ return useModularUIBasic(key, href, {
44
48
  expectedModels: ["ConceptDetail", "BusinessScenario"],
45
49
  });
46
50
  };
47
51
 
48
52
  /**
49
53
  */
50
- export const useContentIndex = (href: string): ?ContentIndexModel => {
54
+ export const useContentIndex = (
55
+ href: string,
56
+ key?: string = "contentindex",
57
+ ): ?ContentIndexModel => {
51
58
  const url = filterParameters(href, ["index", "label", "type"]);
52
- return useModularUIBasic("contentindex", url, {
59
+ return useModularUIBasic(key, url, {
53
60
  expectedModels: ["ContentIndex"],
54
61
  targetModel: ContentIndexModel,
55
62
  });
@@ -57,10 +64,13 @@ export const useContentIndex = (href: string): ?ContentIndexModel => {
57
64
 
58
65
  /**
59
66
  */
60
- export const useContentTOC = (content: string): ?ContentTOCModel => {
67
+ export const useContentTOC = (
68
+ content: string,
69
+ key?: string = "contenttoc",
70
+ ): ?ContentTOCModel => {
61
71
  const location = useLocation();
62
72
  const href = createHref("content", content, location, ["entryDate"]);
63
- return useModularUIBasic("contenttoc", href, {
73
+ return useModularUIBasic(key, href, {
64
74
  expectedModels: ["ContentTOC"],
65
75
  targetModel: ContentTOCModel,
66
76
  });
@@ -68,9 +78,12 @@ export const useContentTOC = (content: string): ?ContentTOCModel => {
68
78
 
69
79
  /**
70
80
  */
71
- export const useContent = (contentSection: string): ?ContentModel => {
81
+ export const useContent = (
82
+ contentSection: string,
83
+ key?: string = "content",
84
+ ): ?ContentModel => {
72
85
  const href = createHref("content", contentSection, null, ["entryDate"]);
73
- return useModularUIBasic("content", href, {
86
+ return useModularUIBasic(key, href, {
74
87
  expectedModels: ["Content"],
75
88
  targetModel: ContentModel,
76
89
  });
@@ -78,9 +91,12 @@ export const useContent = (contentSection: string): ?ContentModel => {
78
91
 
79
92
  /**
80
93
  */
81
- export const useContentType = (contentType: string): ?ContentTypeModel => {
94
+ export const useContentType = (
95
+ contentType: string,
96
+ key?: string = "contenttypes",
97
+ ): ?ContentTypeModel => {
82
98
  const href = createHref("contenttypes", contentType, null, ["entryDate"]);
83
- return useModularUIBasic("contenttypes", href, {
99
+ return useModularUIBasic(key, href, {
84
100
  expectedModels: ["ContentType"],
85
101
  targetModel: ContentTypeModel,
86
102
  });