@beinformed/ui 1.9.0-beta.9 → 1.9.3

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 (130) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/esm/hooks/useForm.js.map +1 -1
  3. package/esm/hooks/useNotification.js.map +1 -1
  4. package/esm/hooks/useRouter.js.map +1 -1
  5. package/esm/models/attributes/AttributeContent.js +49 -20
  6. package/esm/models/attributes/AttributeContent.js.map +1 -1
  7. package/esm/models/attributes/AttributeDataHelper.js +1 -1
  8. package/esm/models/attributes/AttributeDataHelper.js.map +1 -1
  9. package/esm/models/attributes/HelptextAttributeModel.js +3 -1
  10. package/esm/models/attributes/HelptextAttributeModel.js.map +1 -1
  11. package/esm/models/caseview/CaseViewModel.js +26 -12
  12. package/esm/models/caseview/CaseViewModel.js.map +1 -1
  13. package/esm/models/contentconfiguration/ContentConfigurationResults.js +2 -2
  14. package/esm/models/contentconfiguration/ContentConfigurationResults.js.map +1 -1
  15. package/esm/models/form/FormObjectModel.js +8 -2
  16. package/esm/models/form/FormObjectModel.js.map +1 -1
  17. package/esm/models/layouthint/LayoutHintCollection.js +3 -2
  18. package/esm/models/layouthint/LayoutHintCollection.js.map +1 -1
  19. package/esm/models/list/ListDetailModel.js +25 -0
  20. package/esm/models/list/ListDetailModel.js.map +1 -1
  21. package/esm/models/list/ListModel.js +22 -16
  22. package/esm/models/list/ListModel.js.map +1 -1
  23. package/esm/models/panels/GroupingPanelModel.js +19 -17
  24. package/esm/models/panels/GroupingPanelModel.js.map +1 -1
  25. package/esm/modularui/ModularUIRequest.js +2 -1
  26. package/esm/modularui/ModularUIRequest.js.map +1 -1
  27. package/esm/redux/actions/FormAutosave.js +2 -1
  28. package/esm/redux/actions/FormAutosave.js.map +1 -1
  29. package/esm/redux/actions/FormValidations.js +2 -1
  30. package/esm/redux/actions/FormValidations.js.map +1 -1
  31. package/lib/hooks/useForm.js.flow +10 -5
  32. package/lib/hooks/useForm.js.map +1 -1
  33. package/lib/hooks/useNotification.js.flow +5 -2
  34. package/lib/hooks/useNotification.js.map +1 -1
  35. package/lib/hooks/useRouter.js.flow +12 -5
  36. package/lib/hooks/useRouter.js.map +1 -1
  37. package/lib/models/attributes/AttributeContent.js +51 -20
  38. package/lib/models/attributes/AttributeContent.js.flow +38 -13
  39. package/lib/models/attributes/AttributeContent.js.map +1 -1
  40. package/lib/models/attributes/AttributeDataHelper.js +1 -1
  41. package/lib/models/attributes/AttributeDataHelper.js.flow +2 -1
  42. package/lib/models/attributes/AttributeDataHelper.js.map +1 -1
  43. package/lib/models/attributes/HelptextAttributeModel.js +3 -1
  44. package/lib/models/attributes/HelptextAttributeModel.js.flow +1 -1
  45. package/lib/models/attributes/HelptextAttributeModel.js.map +1 -1
  46. package/lib/models/attributes/__tests__/AttributeContent.spec.js.flow +4 -2
  47. package/lib/models/attributes/__tests__/AttributeDataHelper.spec.js.flow +9 -3
  48. package/lib/models/attributes/__tests__/HelptextAttributeModel.spec.js.flow +1 -1
  49. package/lib/models/caseview/CaseViewModel.js +27 -13
  50. package/lib/models/caseview/CaseViewModel.js.flow +17 -7
  51. package/lib/models/caseview/CaseViewModel.js.map +1 -1
  52. package/lib/models/caseview/__tests__/CaseViewModel.spec.js.flow +68 -184
  53. package/lib/models/concepts/__mock__/business_scenario.js.flow +14 -1
  54. package/lib/models/concepts/__mock__/conceptdetail.js.flow +15 -6
  55. package/lib/models/concepts/__tests__/BusinessScenarioModel.spec.js.flow +5 -6
  56. package/lib/models/concepts/__tests__/ConceptDetailModel.spec.js.flow +58 -3
  57. package/lib/models/contentconfiguration/ContentConfigurationResults.js +2 -2
  58. package/lib/models/contentconfiguration/ContentConfigurationResults.js.flow +2 -2
  59. package/lib/models/contentconfiguration/ContentConfigurationResults.js.map +1 -1
  60. package/lib/models/contentconfiguration/__tests__/ContentConfigurationResults.spec.js.flow +6 -6
  61. package/lib/models/form/FormObjectModel.js +8 -2
  62. package/lib/models/form/FormObjectModel.js.flow +5 -1
  63. package/lib/models/form/FormObjectModel.js.map +1 -1
  64. package/lib/models/form/__tests__/FormObjectModel.spec.js.flow +2 -2
  65. package/lib/models/layouthint/LayoutHintCollection.js +4 -2
  66. package/lib/models/layouthint/LayoutHintCollection.js.flow +8 -7
  67. package/lib/models/layouthint/LayoutHintCollection.js.map +1 -1
  68. package/lib/models/list/ListDetailModel.js +25 -0
  69. package/lib/models/list/ListDetailModel.js.flow +19 -0
  70. package/lib/models/list/ListDetailModel.js.map +1 -1
  71. package/lib/models/list/ListModel.js +23 -16
  72. package/lib/models/list/ListModel.js.flow +9 -5
  73. package/lib/models/list/ListModel.js.map +1 -1
  74. package/lib/models/list/__tests__/ListDetailModel.spec.js.flow +64 -0
  75. package/lib/models/list/__tests__/ListModel.spec.js.flow +64 -2
  76. package/lib/models/panels/GroupingPanelModel.js +21 -18
  77. package/lib/models/panels/GroupingPanelModel.js.flow +10 -9
  78. package/lib/models/panels/GroupingPanelModel.js.map +1 -1
  79. package/lib/models/panels/__tests__/GroupingPanelModel.spec.js.flow +90 -0
  80. package/lib/models/types.js.flow +24 -6
  81. package/lib/modularui/ModularUIRequest.js +2 -1
  82. package/lib/modularui/ModularUIRequest.js.flow +1 -0
  83. package/lib/modularui/ModularUIRequest.js.map +1 -1
  84. package/lib/redux/actions/FormAutosave.js +2 -1
  85. package/lib/redux/actions/FormAutosave.js.flow +1 -0
  86. package/lib/redux/actions/FormAutosave.js.map +1 -1
  87. package/lib/redux/actions/FormValidations.js +2 -1
  88. package/lib/redux/actions/FormValidations.js.flow +1 -0
  89. package/lib/redux/actions/FormValidations.js.map +1 -1
  90. package/package.json +15 -15
  91. package/src/hooks/useForm.js +10 -5
  92. package/src/hooks/useNotification.js +5 -2
  93. package/src/hooks/useRouter.js +12 -5
  94. package/src/models/attributes/AttributeContent.js +38 -13
  95. package/src/models/attributes/AttributeDataHelper.js +2 -1
  96. package/src/models/attributes/HelptextAttributeModel.js +1 -1
  97. package/src/models/attributes/__tests__/AttributeContent.spec.js +4 -2
  98. package/src/models/attributes/__tests__/AttributeDataHelper.spec.js +9 -3
  99. package/src/models/attributes/__tests__/HelptextAttributeModel.spec.js +1 -1
  100. package/src/models/caseview/CaseViewModel.js +17 -7
  101. package/src/models/caseview/__tests__/CaseViewModel.spec.js +68 -184
  102. package/src/models/caseview/__tests__/caseview.json +38 -0
  103. package/src/models/caseview/__tests__/caseviewContributions.json +147 -0
  104. package/src/models/concepts/__mock__/business_scenario.js +14 -1
  105. package/src/models/concepts/__mock__/business_scenario_step.json +64 -0
  106. package/src/models/concepts/__mock__/conceptdetail.js +15 -6
  107. package/src/models/concepts/__mock__/conceptdetail_data.json +117 -17
  108. package/src/models/concepts/__mock__/concepttype_Calculation.json +75 -0
  109. package/src/models/concepts/__tests__/BusinessScenarioModel.spec.js +5 -6
  110. package/src/models/concepts/__tests__/ConceptDetailModel.spec.js +58 -3
  111. package/src/models/contentconfiguration/ContentConfigurationResults.js +2 -2
  112. package/src/models/contentconfiguration/__tests__/ContentConfigurationResults.spec.js +6 -6
  113. package/src/models/form/FormObjectModel.js +5 -1
  114. package/src/models/form/__tests__/FormObjectModel.spec.js +2 -2
  115. package/src/models/form/__tests__/FormWithContentData.json +2 -1
  116. package/src/models/layouthint/LayoutHintCollection.js +8 -7
  117. package/src/models/list/ListDetailModel.js +19 -0
  118. package/src/models/list/ListModel.js +9 -5
  119. package/src/models/list/__tests__/ListDetailModel.spec.js +64 -0
  120. package/src/models/list/__tests__/ListModel.spec.js +64 -2
  121. package/src/models/list/__tests__/caselist-34.contributions.json +1 -1
  122. package/src/models/list/__tests__/listContributions.json +1 -1
  123. package/src/models/panels/GroupingPanelModel.js +10 -9
  124. package/src/models/panels/__tests__/GroupingPanelModel.spec.js +90 -0
  125. package/src/models/panels/__tests__/groupingPanel.json +30 -0
  126. package/src/models/panels/__tests__/groupingPanelContributions.json +46 -0
  127. package/src/models/types.js +24 -6
  128. package/src/modularui/ModularUIRequest.js +1 -0
  129. package/src/redux/actions/FormAutosave.js +1 -0
  130. package/src/redux/actions/FormValidations.js +1 -0
@@ -76,11 +76,19 @@ export default class CaseViewModel extends DetailModel {
76
76
  }
77
77
 
78
78
  /**
79
+ * Retrieve the case label, this can be configured with a case property with the layout hint 'title'
79
80
  */
80
81
  get label(): string {
81
82
  return this.casename ? this.casename.value : "";
82
83
  }
83
84
 
85
+ /**
86
+ * Retrieve the label that was configured on the caseview
87
+ */
88
+ get viewLabel(): string {
89
+ return this.getContribution("label", "");
90
+ }
91
+
84
92
  /**
85
93
  * Check if an introtext exists for this caseview
86
94
  */
@@ -92,14 +100,16 @@ export default class CaseViewModel extends DetailModel {
92
100
  * Getting the introduction text configured on the case view
93
101
  */
94
102
  get introtext(): string {
95
- if (this.contributions.texts) {
96
- const text = this.contributions.texts.find(
97
- (item) => item.type === "master"
98
- );
103
+ if (this.data._text) {
104
+ return this.data._text.message ?? this.data._text;
105
+ }
99
106
 
100
- if (text) {
101
- return text.text;
102
- }
107
+ if (this.contributions.text) {
108
+ return this.contributions.text.message ?? this.contributions.text;
109
+ }
110
+
111
+ if (Array.isArray(this.contributions.texts)) {
112
+ return this.contributions.texts[0].text;
103
113
  }
104
114
 
105
115
  return "";
@@ -1,6 +1,9 @@
1
1
  import CaseViewModel from "../CaseViewModel";
2
2
  import DetailModel from "../../detail/DetailModel";
3
3
 
4
+ import caseviewJson from "./caseview.json";
5
+ import caseviewContributionsJson from "./caseviewContributions.json";
6
+
4
7
  describe("caseViewModel", () => {
5
8
  it("should be able to create an empty casedetail", () => {
6
9
  const caseview = new CaseViewModel({});
@@ -10,200 +13,81 @@ describe("caseViewModel", () => {
10
13
 
11
14
  it("should be able to create a casedetail from a typical modular UI json structure", () => {
12
15
  const caseDetail = new CaseViewModel({
16
+ key: "Book",
17
+ data: caseviewJson,
18
+ contributions: caseviewContributionsJson,
19
+ });
20
+
21
+ expect(caseDetail).toBeInstanceOf(CaseViewModel);
22
+ expect(caseDetail).toBeInstanceOf(DetailModel);
23
+
24
+ expect(caseDetail.key).toBe("Book");
25
+ expect(caseDetail.id).toBe(24);
26
+
27
+ expect(caseDetail.casename.value).toBe("The safety of objects");
28
+ });
29
+
30
+ it("should be able to handle different kind of introtext", () => {
31
+ const caseviewOldStructure = new CaseViewModel({
32
+ key: "Book",
33
+ data: caseviewJson,
34
+ contributions: caseviewContributionsJson,
35
+ });
36
+
37
+ expect(caseviewOldStructure.introtext).toBe("<p>This is introtext</p>");
38
+
39
+ const caseviewFromDataPlain = new CaseViewModel({
13
40
  key: "Book",
14
41
  data: {
15
- _links: {
16
- self: {
17
- href: "/books/book/24",
18
- },
19
- api_doc: {
20
- href: "/api-docs/books/book/24",
21
- },
22
- contributions: {
23
- href: "/contributions/books/book/24",
24
- },
25
- Creator: {
26
- href: "/books/book/24/creator",
27
- },
28
- Editions: {
29
- href: "/books/book/24/editions",
30
- },
31
- Activities: {
32
- href: "/books/book/24/activities",
33
- },
34
- taskgroup: [
35
- {
36
- href: "/books/book/24/Tasks",
37
- name: "Tasks",
38
- },
39
- ],
42
+ _text: "<p>This is introtext</p>",
43
+ ...caseviewJson,
44
+ },
45
+ contributions: caseviewContributionsJson,
46
+ });
47
+
48
+ expect(caseviewFromDataPlain.introtext).toBe("<p>This is introtext</p>");
49
+
50
+ const caseviewFromDataApplicationMessage = new CaseViewModel({
51
+ key: "Book",
52
+ data: {
53
+ ...caseviewJson,
54
+ _text: {
55
+ message: "<p>This is introtext</p>",
40
56
  },
41
- _id: 24,
42
- CaseName: "The safety of objects",
43
- CaseType: "Book",
44
- Owner: "Arnold",
45
- Format: "Paperback",
46
- ISBN10: "1847087302",
47
- ISBN13: "9781847087300",
48
- Language: "EN",
49
- NumberOfPages: 176,
50
- State: "Registered",
51
57
  },
58
+ contributions: caseviewContributionsJson,
59
+ });
60
+
61
+ expect(caseviewFromDataApplicationMessage.introtext).toBe(
62
+ "<p>This is introtext</p>"
63
+ );
64
+
65
+ const caseviewFromNewContributionsRawTextMessage = new CaseViewModel({
66
+ key: "Book",
67
+ data: caseviewJson,
52
68
  contributions: {
53
- label: "Book",
54
- resourcetype: "CaseView",
55
- texts: [
56
- {
57
- type: "master",
58
- text: "<p>This view contains all the data about this book. It contains a list of the creators and editions. A person can be an author(1) or an illustrator(2)<br /><br />This is a list of books that is ordered by the role (author (1), co-author, illustrator(2)) of the person that contributed to the book.<br /><br />1) An author is broadly defined as &quot;the person who originated or gave existence to anything&quot; and whose authorship determines responsibility for what was created. Narrowly defined, an author is the originator of any written work and can also be described as a writer.<br /><br />2) An illustrator is an artist who specializes in enhancing writing or elucidating concepts by providing a visual representation that corresponds to the content of the associated text or idea. The illustration may be intended to clarify complicated concepts or objects that are difficult to describe textually, which is the reason illustrations are often found in children&#39;s books.<br /></p>",
59
- },
60
- ],
61
- _links: {
62
- panel: [
63
- {
64
- name: "Creator",
65
- label: "Creator",
66
- resourcetype: "CaseRelationListPanel",
67
- },
68
- {
69
- name: "Editions",
70
- label: "Editions",
71
- resourcetype: "RecordListPanel",
72
- },
73
- {
74
- name: "Activities",
75
- label: "Activities",
76
- resourcetype: "GroupingPanel",
77
- },
78
- ],
79
- taskgroup: [
80
- {
81
- name: "Tasks",
82
- label: "Tasks",
83
- resourcetype: "TaskGroup",
84
- },
85
- ],
86
- },
87
- metadata: {
88
- _id: {
89
- label: "Id",
90
- type: "integer",
91
- },
69
+ ...caseviewContributionsJson,
70
+ text: {
71
+ message: "<p>This is introtext</p>",
92
72
  },
93
- attributes: [
94
- {
95
- CaseName: {
96
- label: "Case name",
97
- type: "string",
98
- layouthint: ["title"],
99
- },
100
- },
101
- {
102
- CaseType: {
103
- label: "Case type",
104
- type: "string",
105
- layouthint: ["type"],
106
- },
107
- },
108
- {
109
- Owner: {
110
- label: "Case owner",
111
- type: "string",
112
- layouthint: ["owner"],
113
- },
114
- },
115
- {
116
- State: {
117
- label: "State",
118
- type: "string",
119
- layouthint: ["state"],
120
- options: [
121
- {
122
- code: "Registered",
123
- label: "Registered",
124
- },
125
- ],
126
- },
127
- },
128
- {
129
- Format: {
130
- label: "Format",
131
- type: "string",
132
- multiplechoice: false,
133
- layouthint: ["combobox"],
134
- options: [
135
- {
136
- code: "Hardcover",
137
- label: "Hardcover",
138
- },
139
- {
140
- code: "Paperback",
141
- label: "Paperback",
142
- },
143
- {
144
- code: "Ebook",
145
- label: "Ebook",
146
- },
147
- {
148
- code: "Audio",
149
- label: "Audio book",
150
- },
151
- ],
152
- },
153
- },
154
- {
155
- ISBN10: {
156
- label: "ISBN10",
157
- type: "string",
158
- displaysize: 50,
159
- },
160
- },
161
- {
162
- ISBN13: {
163
- label: "ISBN13",
164
- type: "string",
165
- displaysize: 50,
166
- },
167
- },
168
- {
169
- Language: {
170
- label: "Language",
171
- type: "string",
172
- multiplechoice: false,
173
- layouthint: ["radiobutton"],
174
- options: [
175
- {
176
- code: "EN",
177
- label: "English",
178
- },
179
- {
180
- code: "DU",
181
- label: "Dutch",
182
- },
183
- ],
184
- },
185
- },
186
- {
187
- NumberOfPages: {
188
- label: "Number of pages",
189
- type: "number",
190
- format: "0",
191
- groupingSeparator: ".",
192
- decimalSeparator: ",",
193
- minimum: 1,
194
- maximum: 1000,
195
- },
196
- },
197
- ],
198
73
  },
199
74
  });
200
75
 
201
- expect(caseDetail).toBeInstanceOf(CaseViewModel);
202
- expect(caseDetail).toBeInstanceOf(DetailModel);
76
+ expect(caseviewFromNewContributionsRawTextMessage.introtext).toBe(
77
+ "<p>This is introtext</p>"
78
+ );
203
79
 
204
- expect(caseDetail.key).toBe("Book");
205
- expect(caseDetail.id).toBe(24);
80
+ const caseviewFromNewContributionsSimpleMessage = new CaseViewModel({
81
+ key: "Book",
82
+ data: caseviewJson,
83
+ contributions: {
84
+ ...caseviewContributionsJson,
85
+ text: "<p>This is introtext</p>",
86
+ },
87
+ });
206
88
 
207
- expect(caseDetail.casename.value).toBe("The safety of objects");
89
+ expect(caseviewFromNewContributionsSimpleMessage.introtext).toBe(
90
+ "<p>This is introtext</p>"
91
+ );
208
92
  });
209
93
  });
@@ -0,0 +1,38 @@
1
+ {
2
+ "_links": {
3
+ "self": {
4
+ "href": "/books/book/24"
5
+ },
6
+ "api_doc": {
7
+ "href": "/api-docs/books/book/24"
8
+ },
9
+ "contributions": {
10
+ "href": "/contributions/books/book/24"
11
+ },
12
+ "Creator": {
13
+ "href": "/books/book/24/creator"
14
+ },
15
+ "Editions": {
16
+ "href": "/books/book/24/editions"
17
+ },
18
+ "Activities": {
19
+ "href": "/books/book/24/activities"
20
+ },
21
+ "taskgroup": [
22
+ {
23
+ "href": "/books/book/24/Tasks",
24
+ "name": "Tasks"
25
+ }
26
+ ]
27
+ },
28
+ "_id": 24,
29
+ "CaseName": "The safety of objects",
30
+ "CaseType": "Book",
31
+ "Owner": "Arnold",
32
+ "Format": "Paperback",
33
+ "ISBN10": "1847087302",
34
+ "ISBN13": "9781847087300",
35
+ "Language": "EN",
36
+ "NumberOfPages": 176,
37
+ "State": "Registered"
38
+ }
@@ -0,0 +1,147 @@
1
+ {
2
+ "label": "Book",
3
+ "resourcetype": "CaseView",
4
+ "texts": [
5
+ {
6
+ "type": "master",
7
+ "text": "<p>This is introtext</p>"
8
+ }
9
+ ],
10
+ "_links": {
11
+ "panel": [
12
+ {
13
+ "name": "Creator",
14
+ "label": "Creator",
15
+ "resourcetype": "CaseRelationListPanel"
16
+ },
17
+ {
18
+ "name": "Editions",
19
+ "label": "Editions",
20
+ "resourcetype": "RecordListPanel"
21
+ },
22
+ {
23
+ "name": "Activities",
24
+ "label": "Activities",
25
+ "resourcetype": "GroupingPanel"
26
+ }
27
+ ],
28
+ "taskgroup": [
29
+ {
30
+ "name": "Tasks",
31
+ "label": "Tasks",
32
+ "resourcetype": "TaskGroup"
33
+ }
34
+ ]
35
+ },
36
+ "metadata": {
37
+ "_id": {
38
+ "label": "Id",
39
+ "type": "integer"
40
+ }
41
+ },
42
+ "attributes": [
43
+ {
44
+ "CaseName": {
45
+ "label": "Case name",
46
+ "type": "string",
47
+ "layouthint": ["title"]
48
+ }
49
+ },
50
+ {
51
+ "CaseType": {
52
+ "label": "Case type",
53
+ "type": "string",
54
+ "layouthint": ["type"]
55
+ }
56
+ },
57
+ {
58
+ "Owner": {
59
+ "label": "Case owner",
60
+ "type": "string",
61
+ "layouthint": ["owner"]
62
+ }
63
+ },
64
+ {
65
+ "State": {
66
+ "label": "State",
67
+ "type": "string",
68
+ "layouthint": ["state"],
69
+ "options": [
70
+ {
71
+ "code": "Registered",
72
+ "label": "Registered"
73
+ }
74
+ ]
75
+ }
76
+ },
77
+ {
78
+ "Format": {
79
+ "label": "Format",
80
+ "type": "string",
81
+ "multiplechoice": false,
82
+ "layouthint": ["combobox"],
83
+ "options": [
84
+ {
85
+ "code": "Hardcover",
86
+ "label": "Hardcover"
87
+ },
88
+ {
89
+ "code": "Paperback",
90
+ "label": "Paperback"
91
+ },
92
+ {
93
+ "code": "Ebook",
94
+ "label": "Ebook"
95
+ },
96
+ {
97
+ "code": "Audio",
98
+ "label": "Audio book"
99
+ }
100
+ ]
101
+ }
102
+ },
103
+ {
104
+ "ISBN10": {
105
+ "label": "ISBN10",
106
+ "type": "string",
107
+ "displaysize": 50
108
+ }
109
+ },
110
+ {
111
+ "ISBN13": {
112
+ "label": "ISBN13",
113
+ "type": "string",
114
+ "displaysize": 50
115
+ }
116
+ },
117
+ {
118
+ "Language": {
119
+ "label": "Language",
120
+ "type": "string",
121
+ "multiplechoice": false,
122
+ "layouthint": ["radiobutton"],
123
+ "options": [
124
+ {
125
+ "code": "EN",
126
+ "label": "English"
127
+ },
128
+ {
129
+ "code": "DU",
130
+ "label": "Dutch"
131
+ }
132
+ ]
133
+ }
134
+ },
135
+ {
136
+ "NumberOfPages": {
137
+ "label": "Number of pages",
138
+ "type": "number",
139
+ "format": "0",
140
+ "groupingSeparator": ".",
141
+ "decimalSeparator": ",",
142
+ "minimum": 1,
143
+ "maximum": 1000
144
+ }
145
+ }
146
+ ]
147
+ }
@@ -1,13 +1,26 @@
1
1
  import BusinessScenarioModel from "../BusinessScenarioModel";
2
2
  import ModularUIResponse from "../../../modularui/ModularUIResponse";
3
+ import ConceptDetailModel from "../ConceptDetailModel";
3
4
 
4
5
  import data from "./business_scenario_data.json";
5
6
  import contributions from "./conceptdetail_contributions.json";
6
7
 
8
+ import stepData from "./business_scenario_step.json";
9
+ import conceptType from "./concepttype";
10
+
7
11
  const response = ModularUIResponse.create({
8
12
  key: "business_scenario",
9
13
  data,
10
14
  contributions,
11
15
  });
16
+ const scenario = new BusinessScenarioModel(response);
17
+
18
+ const stepResponse = ModularUIResponse.create({
19
+ key: "business_scenario_step",
20
+ data: stepData,
21
+ contributions,
22
+ });
23
+ const step = new ConceptDetailModel(stepResponse);
24
+ step.conceptType = conceptType;
12
25
 
13
- export default new BusinessScenarioModel(response);
26
+ export { scenario, step };
@@ -0,0 +1,64 @@
1
+ {
2
+ "concept": {
3
+ "_id": "StaandehoudingScSt",
4
+ "_links": {
5
+ "self": {
6
+ "href": "/concepts/Incident/Business design/Business scenario/Scenario incident.bixml/StaandehoudingScSt"
7
+ },
8
+ "api_doc": {
9
+ "href": "/api-docs/v3/concepts/(knowledge-model-identifier)/(concept-identifier)"
10
+ },
11
+ "contributions": {
12
+ "href": "/contributions/concepts/(knowledge-model-identifier)/(concept-identifier)"
13
+ },
14
+ "concepttype": {
15
+ "href": "/concepttypes/Library/KMTs/Business scenarios.bixml/ScenarioStep"
16
+ }
17
+ },
18
+ "filter": {
19
+ "entryDate": {
20
+ "param": "entryDate",
21
+ "name": "entryDate",
22
+ "value": "2020-11-20"
23
+ }
24
+ },
25
+ "conceptLabel": "Staandehouding",
26
+ "taxonomyType": "default",
27
+ "relations": [
28
+ {
29
+ "relationLabel": "performed by",
30
+ "relationType": "performedBy",
31
+ "relationDirection": "outgoing",
32
+ "concept": {
33
+ "_links": {
34
+ "self": {
35
+ "href": "/concepts/Incident/Business design/Business scenario/Scenario incident.bixml/Agent"
36
+ },
37
+ "concepttype": {
38
+ "href": "/concepttypes/Library/KMTs/Business scenarios.bixml/Persona"
39
+ }
40
+ },
41
+ "conceptLabel": "Agent",
42
+ "_id": "Agent"
43
+ }
44
+ },
45
+ {
46
+ "relationLabel": "consists of",
47
+ "relationType": "consistsOf",
48
+ "relationDirection": "incoming",
49
+ "concept": {
50
+ "_links": {
51
+ "self": {
52
+ "href": "/concepts/Incident/Business design/Business scenario/Scenario incident.bixml/ScenarioIncident"
53
+ },
54
+ "concepttype": {
55
+ "href": "/concepttypes/Library/KMTs/Business scenarios.bixml/BusinessScenario"
56
+ }
57
+ },
58
+ "conceptLabel": "Scenario incident",
59
+ "_id": "ScenarioIncident"
60
+ }
61
+ }
62
+ ]
63
+ }
64
+ }
@@ -1,18 +1,27 @@
1
1
  import ConceptDetailModel from "../ConceptDetailModel";
2
+ import ConceptTypeDetailModel from "../ConceptTypeDetailModel";
2
3
  import ModularUIResponse from "../../../modularui/ModularUIResponse";
3
4
 
4
5
  import data from "./conceptdetail_data.json";
5
6
  import contributions from "./conceptdetail_contributions.json";
7
+ import conceptTypeData from "./concepttype_Calculation.json";
8
+ import conceptTypeContributions from "./concepttype_contributions.json";
6
9
 
7
- import conceptType from "./concepttype";
8
-
9
- const response = ModularUIResponse.create({
10
- key: "conceptdetail",
10
+ const conceptResponse = ModularUIResponse.create({
11
+ key: "concept",
11
12
  data,
12
13
  contributions,
13
14
  });
14
15
 
15
- const conceptDetail = new ConceptDetailModel(response);
16
+ const conceptTypeResponse = ModularUIResponse.create({
17
+ key: "concepttype",
18
+ data: conceptTypeData,
19
+ contributions: conceptTypeContributions,
20
+ });
21
+
22
+ const conceptType = new ConceptTypeDetailModel(conceptTypeResponse);
23
+
24
+ const conceptDetail = new ConceptDetailModel(conceptResponse);
16
25
  conceptDetail.conceptType = conceptType;
17
26
 
18
- export default conceptDetail;
27
+ export { conceptDetail };