@beinformed/ui 1.57.0-contextpath.0 → 1.57.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +63 -0
- package/esm/constants/Settings.js +10 -2
- package/esm/constants/Settings.js.map +1 -1
- package/esm/hooks/useModularUI.js +24 -18
- package/esm/hooks/useModularUI.js.map +1 -1
- package/esm/hooks/useModularUIBasic.js +52 -41
- package/esm/hooks/useModularUIBasic.js.map +1 -1
- package/esm/models/concepts/ConceptDetailModel.js +1 -8
- package/esm/models/concepts/ConceptDetailModel.js.map +1 -1
- package/esm/models/concepts/ConceptIndexModel.js +1 -1
- package/esm/models/concepts/ConceptIndexModel.js.map +1 -1
- package/esm/models/concepts/ConceptLinkModel.js +8 -9
- package/esm/models/concepts/ConceptLinkModel.js.map +1 -1
- package/esm/models/concepts/ConceptTypeDetailModel.js +3 -20
- package/esm/models/concepts/ConceptTypeDetailModel.js.map +1 -1
- package/esm/models/concepts/SourceReferenceCollection.js +3 -1
- package/esm/models/concepts/SourceReferenceCollection.js.map +1 -1
- package/esm/models/concepts/SourceReferenceModel.js +9 -3
- package/esm/models/concepts/SourceReferenceModel.js.map +1 -1
- package/esm/models/content/ContentLinkModel.js +10 -4
- package/esm/models/content/ContentLinkModel.js.map +1 -1
- package/esm/models/content/SectionModel.js +10 -6
- package/esm/models/content/SectionModel.js.map +1 -1
- package/esm/models/error/ErrorResponse.js +20 -5
- package/esm/models/error/ErrorResponse.js.map +1 -1
- package/esm/models/href/Href.js +21 -4
- package/esm/models/href/Href.js.map +1 -1
- package/esm/models/list/ListItemCollection.js +1 -1
- package/esm/models/list/ListItemCollection.js.map +1 -1
- package/esm/modularui/CaptchaRequest.js +12 -3
- package/esm/modularui/CaptchaRequest.js.map +1 -1
- package/esm/modularui/ModularUIRequest.js +1 -1
- package/esm/modularui/ModularUIRequest.js.map +1 -1
- package/esm/modularui/UploadRequest.js +7 -3
- package/esm/modularui/UploadRequest.js.map +1 -1
- package/esm/redux/_modularui/ModularUIActions.js +11 -9
- package/esm/redux/_modularui/ModularUIActions.js.map +1 -1
- package/esm/redux/_modularui/ModularUIMiddleware.js +4 -1
- package/esm/redux/_modularui/ModularUIMiddleware.js.map +1 -1
- package/esm/redux/_modularui/ModularUIReducer.js +2 -1
- package/esm/redux/_modularui/ModularUIReducer.js.map +1 -1
- package/esm/redux/_modularui/ModularUISelectors.js +7 -6
- package/esm/redux/_modularui/ModularUISelectors.js.map +1 -1
- package/esm/redux/_modularui/types.js.map +1 -1
- package/esm/redux/actions/Application.js +11 -6
- package/esm/redux/actions/Application.js.map +1 -1
- package/esm/redux/connectors/PanelRenderer.js +0 -2
- package/esm/redux/connectors/PanelRenderer.js.map +1 -1
- package/esm/utils/helpers/checkResource.js +0 -2
- package/esm/utils/helpers/checkResource.js.map +1 -1
- package/esm/utils/helpers/repositoryResource.js +6 -5
- package/esm/utils/helpers/repositoryResource.js.map +1 -1
- package/lib/constants/Settings.js +10 -2
- package/lib/constants/Settings.js.flow +8 -2
- package/lib/constants/Settings.js.map +1 -1
- package/lib/hooks/__tests__/UseModularUIModel.spec.js.flow +11 -4
- package/lib/hooks/__tests__/useAuthentication.spec.js.flow +2 -8
- package/lib/hooks/__tests__/useForm.spec.js.flow +14 -12
- package/lib/hooks/__tests__/useModelCatalog.spec.js.flow +10 -4
- package/lib/hooks/__tests__/useModels.spec.js.flow +3 -12
- package/lib/hooks/__tests__/useModularUIBasic.spec.js.flow +9 -8
- package/lib/hooks/useModularUI.js +23 -17
- package/lib/hooks/useModularUI.js.flow +31 -16
- package/lib/hooks/useModularUI.js.map +1 -1
- package/lib/hooks/useModularUIBasic.js +52 -41
- package/lib/hooks/useModularUIBasic.js.flow +66 -50
- package/lib/hooks/useModularUIBasic.js.map +1 -1
- package/lib/models/concepts/ConceptDetailModel.js +1 -8
- package/lib/models/concepts/ConceptDetailModel.js.flow +2 -7
- package/lib/models/concepts/ConceptDetailModel.js.map +1 -1
- package/lib/models/concepts/ConceptIndexModel.js +1 -1
- package/lib/models/concepts/ConceptIndexModel.js.flow +7 -1
- package/lib/models/concepts/ConceptIndexModel.js.map +1 -1
- package/lib/models/concepts/ConceptLinkModel.js +8 -9
- package/lib/models/concepts/ConceptLinkModel.js.flow +14 -9
- package/lib/models/concepts/ConceptLinkModel.js.map +1 -1
- package/lib/models/concepts/ConceptTypeDetailModel.js +3 -20
- package/lib/models/concepts/ConceptTypeDetailModel.js.flow +3 -25
- package/lib/models/concepts/ConceptTypeDetailModel.js.map +1 -1
- package/lib/models/concepts/SourceReferenceCollection.js +3 -1
- package/lib/models/concepts/SourceReferenceCollection.js.flow +8 -1
- package/lib/models/concepts/SourceReferenceCollection.js.map +1 -1
- package/lib/models/concepts/SourceReferenceModel.js +9 -3
- package/lib/models/concepts/SourceReferenceModel.js.flow +19 -3
- package/lib/models/concepts/SourceReferenceModel.js.map +1 -1
- package/lib/models/concepts/__mock__/conceptindex.js.flow +15 -0
- package/lib/models/concepts/__tests__/ConceptIndexModel.spec.js.flow +30 -2
- package/lib/models/concepts/__tests__/ConceptTypeDetailModel.spec.js.flow +1 -18
- package/lib/models/content/ContentLinkModel.js +9 -4
- package/lib/models/content/ContentLinkModel.js.flow +19 -4
- package/lib/models/content/ContentLinkModel.js.map +1 -1
- package/lib/models/content/SectionModel.js +10 -6
- package/lib/models/content/SectionModel.js.flow +31 -5
- package/lib/models/content/SectionModel.js.map +1 -1
- package/lib/models/error/ErrorResponse.js +20 -5
- package/lib/models/error/ErrorResponse.js.flow +34 -5
- package/lib/models/error/ErrorResponse.js.map +1 -1
- package/lib/models/href/Href.js +21 -4
- package/lib/models/href/Href.js.flow +21 -4
- package/lib/models/href/Href.js.map +1 -1
- package/lib/models/href/__tests__/Href.spec.js.flow +9 -3
- package/lib/models/list/ListItemCollection.js +1 -1
- package/lib/models/list/ListItemCollection.js.flow +2 -0
- package/lib/models/list/ListItemCollection.js.map +1 -1
- package/lib/modularui/CaptchaRequest.js +11 -2
- package/lib/modularui/CaptchaRequest.js.flow +17 -3
- package/lib/modularui/CaptchaRequest.js.map +1 -1
- package/lib/modularui/ModularUIRequest.js +1 -1
- package/lib/modularui/ModularUIRequest.js.flow +3 -1
- package/lib/modularui/ModularUIRequest.js.map +1 -1
- package/lib/modularui/UploadRequest.js +6 -2
- package/lib/modularui/UploadRequest.js.flow +12 -2
- package/lib/modularui/UploadRequest.js.map +1 -1
- package/lib/redux/_modularui/ModularUIActions.js +11 -9
- package/lib/redux/_modularui/ModularUIActions.js.flow +20 -10
- package/lib/redux/_modularui/ModularUIActions.js.map +1 -1
- package/lib/redux/_modularui/ModularUIMiddleware.js +3 -0
- package/lib/redux/_modularui/ModularUIMiddleware.js.flow +6 -3
- package/lib/redux/_modularui/ModularUIMiddleware.js.map +1 -1
- package/lib/redux/_modularui/ModularUIReducer.js +2 -1
- package/lib/redux/_modularui/ModularUIReducer.js.flow +1 -0
- package/lib/redux/_modularui/ModularUIReducer.js.map +1 -1
- package/lib/redux/_modularui/ModularUISelectors.js +5 -6
- package/lib/redux/_modularui/ModularUISelectors.js.flow +22 -10
- package/lib/redux/_modularui/ModularUISelectors.js.map +1 -1
- package/lib/redux/_modularui/__tests__/actions.spec.js.flow +1 -4
- package/lib/redux/_modularui/types.js.flow +1 -0
- package/lib/redux/_modularui/types.js.map +1 -1
- package/lib/redux/actions/Application.js +10 -5
- package/lib/redux/actions/Application.js.flow +16 -5
- package/lib/redux/actions/Application.js.map +1 -1
- package/lib/redux/actions/__tests__/Application.spec.js.flow +1 -8
- package/lib/redux/actions/__tests__/Authorization.spec.js.flow +0 -4
- package/lib/redux/connectors/PanelRenderer.js +0 -2
- package/lib/redux/connectors/PanelRenderer.js.flow +0 -1
- package/lib/redux/connectors/PanelRenderer.js.map +1 -1
- package/lib/utils/helpers/checkResource.js +0 -2
- package/lib/utils/helpers/checkResource.js.flow +0 -2
- package/lib/utils/helpers/checkResource.js.map +1 -1
- package/lib/utils/helpers/repositoryResource.js +6 -5
- package/lib/utils/helpers/repositoryResource.js.flow +8 -6
- package/lib/utils/helpers/repositoryResource.js.map +1 -1
- package/package.json +18 -18
- package/src/constants/Settings.js +8 -2
- package/src/hooks/__tests__/UseModularUIModel.spec.js +11 -4
- package/src/hooks/__tests__/useAuthentication.spec.js +2 -8
- package/src/hooks/__tests__/useForm.spec.js +14 -12
- package/src/hooks/__tests__/useModelCatalog.spec.js +10 -4
- package/src/hooks/__tests__/useModels.spec.js +3 -12
- package/src/hooks/__tests__/useModularUIBasic.spec.js +9 -8
- package/src/hooks/useModularUI.js +31 -16
- package/src/hooks/useModularUIBasic.js +66 -50
- package/src/models/concepts/ConceptDetailModel.js +2 -7
- package/src/models/concepts/ConceptIndexModel.js +7 -1
- package/src/models/concepts/ConceptLinkModel.js +14 -9
- package/src/models/concepts/ConceptTypeDetailModel.js +3 -25
- package/src/models/concepts/SourceReferenceCollection.js +8 -1
- package/src/models/concepts/SourceReferenceModel.js +19 -3
- package/src/models/concepts/__mock__/conceptindex.js +15 -0
- package/src/models/concepts/__mock__/conceptindex_contributions.json +86 -0
- package/src/models/concepts/__mock__/conceptindex_data.json +323 -0
- package/src/models/concepts/__mock__/concepttype_hierarchy.json +1 -11
- package/src/models/concepts/__tests__/ConceptIndexModel.spec.js +30 -2
- package/src/models/concepts/__tests__/ConceptTypeDetailModel.spec.js +1 -18
- package/src/models/content/ContentLinkModel.js +19 -4
- package/src/models/content/SectionModel.js +31 -5
- package/src/models/error/ErrorResponse.js +34 -5
- package/src/models/href/Href.js +21 -4
- package/src/models/href/__tests__/Href.spec.js +9 -3
- package/src/models/list/ListItemCollection.js +2 -0
- package/src/modularui/CaptchaRequest.js +17 -3
- package/src/modularui/ModularUIRequest.js +3 -1
- package/src/modularui/UploadRequest.js +12 -2
- package/src/redux/_modularui/ModularUIActions.js +20 -10
- package/src/redux/_modularui/ModularUIMiddleware.js +6 -3
- package/src/redux/_modularui/ModularUIReducer.js +1 -0
- package/src/redux/_modularui/ModularUISelectors.js +22 -10
- package/src/redux/_modularui/__tests__/actions.spec.js +1 -4
- package/src/redux/_modularui/types.js +1 -0
- package/src/redux/actions/Application.js +16 -5
- package/src/redux/actions/__tests__/Application.spec.js +1 -8
- package/src/redux/actions/__tests__/Authorization.spec.js +0 -4
- package/src/redux/connectors/PanelRenderer.js +0 -1
- package/src/utils/helpers/checkResource.js +0 -2
- package/src/utils/helpers/repositoryResource.js +8 -6
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
{
|
|
2
|
+
"concepts": {
|
|
3
|
+
"_links": {
|
|
4
|
+
"self": {
|
|
5
|
+
"href": "/concepts"
|
|
6
|
+
},
|
|
7
|
+
"api_doc": {
|
|
8
|
+
"href": "/api-docs/v3/concepts"
|
|
9
|
+
},
|
|
10
|
+
"contributions": {
|
|
11
|
+
"href": "/contributions/concepts"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"dynamicschema": {
|
|
15
|
+
"index": [
|
|
16
|
+
{
|
|
17
|
+
"code": "0",
|
|
18
|
+
"label": "0-9"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"code": "A",
|
|
22
|
+
"label": "A"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"code": "B",
|
|
26
|
+
"label": "B"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"code": "C",
|
|
30
|
+
"label": "C"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"code": "D",
|
|
34
|
+
"label": "D"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"code": "E",
|
|
38
|
+
"label": "E"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"code": "F",
|
|
42
|
+
"label": "F"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"code": "G",
|
|
46
|
+
"label": "G"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"code": "H",
|
|
50
|
+
"label": "H"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"code": "I",
|
|
54
|
+
"label": "I"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"code": "J",
|
|
58
|
+
"label": "J"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"code": "K",
|
|
62
|
+
"label": "K"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"code": "L",
|
|
66
|
+
"label": "L"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"code": "M",
|
|
70
|
+
"label": "M"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"code": "N",
|
|
74
|
+
"label": "N"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"code": "O",
|
|
78
|
+
"label": "O"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"code": "P",
|
|
82
|
+
"label": "P"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"code": "Q",
|
|
86
|
+
"label": "Q"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"code": "R",
|
|
90
|
+
"label": "R"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"code": "S",
|
|
94
|
+
"label": "S"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"code": "T",
|
|
98
|
+
"label": "T"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"code": "U",
|
|
102
|
+
"label": "U"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"code": "V",
|
|
106
|
+
"label": "V"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"code": "W",
|
|
110
|
+
"label": "W"
|
|
111
|
+
}
|
|
112
|
+
],
|
|
113
|
+
"type": null
|
|
114
|
+
},
|
|
115
|
+
"filter": {
|
|
116
|
+
"index": {
|
|
117
|
+
"param": "index",
|
|
118
|
+
"name": "index",
|
|
119
|
+
"options": [
|
|
120
|
+
{
|
|
121
|
+
"key": "0"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"key": "A"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"key": "B"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"key": "C"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"key": "D"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"key": "E"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"key": "F"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"key": "G"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"key": "H"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"key": "I"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"key": "J"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"key": "K"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"key": "L"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"key": "M"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"key": "N"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"key": "O"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"key": "P"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"key": "Q"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"key": "R"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"key": "S"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"key": "T"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"key": "U"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"key": "V"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"key": "W"
|
|
191
|
+
}
|
|
192
|
+
]
|
|
193
|
+
},
|
|
194
|
+
"label": {
|
|
195
|
+
"param": "label",
|
|
196
|
+
"name": "label"
|
|
197
|
+
},
|
|
198
|
+
"type": {
|
|
199
|
+
"param": "type",
|
|
200
|
+
"name": "type",
|
|
201
|
+
"_links": {
|
|
202
|
+
"lookupOptions": {
|
|
203
|
+
"href": "/lookupOptions?lookupToken=4bcc52d9-3f60-4f8a-b745-0814b7aca09f",
|
|
204
|
+
"filter": {
|
|
205
|
+
"name": "labelFilter"
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"entryDate": {
|
|
211
|
+
"param": "entryDate",
|
|
212
|
+
"name": "entryDate",
|
|
213
|
+
"value": "2024-10-21"
|
|
214
|
+
},
|
|
215
|
+
"modelCategory": {
|
|
216
|
+
"param": "modelCategory",
|
|
217
|
+
"name": "modelCategory"
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
"_embedded": {
|
|
221
|
+
"results": [
|
|
222
|
+
{
|
|
223
|
+
"concept": {
|
|
224
|
+
"_id": "CaptureComplianceArtifactsInCustomerCase",
|
|
225
|
+
"label": "Capture compliance artifacts in customer case",
|
|
226
|
+
"_links": {
|
|
227
|
+
"self": {
|
|
228
|
+
"href": "/concepts/bundle-com.beinformed.models.FSDemoBusinessDesign/High%20level%20requirements/Architectural%20significant%20requirements.beimodel.json/CaptureComplianceArtifactsInCustomerCase"
|
|
229
|
+
},
|
|
230
|
+
"concepttype": {
|
|
231
|
+
"href": "/concepttypes/bundle-com.beinformed.fs.demo.metamodels/High%20level%20requirements.bixml/ArchitecturalSignificantRequirement"
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"concept": {
|
|
238
|
+
"_id": "ConformApplicationPatterns",
|
|
239
|
+
"label": "Conform application patterns",
|
|
240
|
+
"_links": {
|
|
241
|
+
"self": {
|
|
242
|
+
"href": "/concepts/bundle-com.beinformed.models.FSDemoBusinessDesign/High%20level%20requirements/Architectural%20significant%20requirements.beimodel.json/ConformApplicationPatterns"
|
|
243
|
+
},
|
|
244
|
+
"concepttype": {
|
|
245
|
+
"href": "/concepttypes/bundle-com.beinformed.fs.demo.metamodels/High%20level%20requirements.bixml/ArchitecturalSignificantRequirement"
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"concept": {
|
|
252
|
+
"_id": "ConformDesignPatterns",
|
|
253
|
+
"label": "Conform design patterns",
|
|
254
|
+
"_links": {
|
|
255
|
+
"self": {
|
|
256
|
+
"href": "/concepts/bundle-com.beinformed.models.FSDemoBusinessDesign/High%20level%20requirements/Architectural%20significant%20requirements.beimodel.json/ConformDesignPatterns"
|
|
257
|
+
},
|
|
258
|
+
"concepttype": {
|
|
259
|
+
"href": "/concepttypes/bundle-com.beinformed.fs.demo.metamodels/High%20level%20requirements.bixml/ArchitecturalSignificantRequirement"
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"concept": {
|
|
266
|
+
"_id": "DesignShouldSupportTheCompleteProcess",
|
|
267
|
+
"label": "Design should support the complete process",
|
|
268
|
+
"_links": {
|
|
269
|
+
"self": {
|
|
270
|
+
"href": "/concepts/bundle-com.beinformed.models.FSDemoBusinessDesign/High%20level%20requirements/Architectural%20significant%20requirements.beimodel.json/DesignShouldSupportTheCompleteProcess"
|
|
271
|
+
},
|
|
272
|
+
"concepttype": {
|
|
273
|
+
"href": "/concepttypes/bundle-com.beinformed.fs.demo.metamodels/High%20level%20requirements.bixml/ArchitecturalSignificantRequirement"
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"concept": {
|
|
280
|
+
"_id": "MaintainACustomerProfile",
|
|
281
|
+
"label": "Maintain a customer profile",
|
|
282
|
+
"_links": {
|
|
283
|
+
"self": {
|
|
284
|
+
"href": "/concepts/bundle-com.beinformed.models.FSDemoBusinessDesign/High%20level%20requirements/Architectural%20significant%20requirements.beimodel.json/MaintainACustomerProfile"
|
|
285
|
+
},
|
|
286
|
+
"concepttype": {
|
|
287
|
+
"href": "/concepttypes/bundle-com.beinformed.fs.demo.metamodels/High%20level%20requirements.bixml/ArchitecturalSignificantRequirement"
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"concept": {
|
|
294
|
+
"_id": "RepositoryReflectsOwnershipResponsiblityAndLifecycleParameters",
|
|
295
|
+
"label": "Repository reflects ownership, responsiblity and lifecycle parameters",
|
|
296
|
+
"_links": {
|
|
297
|
+
"self": {
|
|
298
|
+
"href": "/concepts/bundle-com.beinformed.models.FSDemoBusinessDesign/High%20level%20requirements/Architectural%20significant%20requirements.beimodel.json/RepositoryReflectsOwnershipResponsiblityAndLifecycleParameters"
|
|
299
|
+
},
|
|
300
|
+
"concepttype": {
|
|
301
|
+
"href": "/concepttypes/bundle-com.beinformed.fs.demo.metamodels/High%20level%20requirements.bixml/ArchitecturalSignificantRequirement"
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"concept": {
|
|
308
|
+
"_id": "SeparateFrontAndBackOfficeProcesses",
|
|
309
|
+
"label": "Separate front and back office processes",
|
|
310
|
+
"_links": {
|
|
311
|
+
"self": {
|
|
312
|
+
"href": "/concepts/bundle-com.beinformed.models.FSDemoBusinessDesign/High%20level%20requirements/Architectural%20significant%20requirements.beimodel.json/SeparateFrontAndBackOfficeProcesses"
|
|
313
|
+
},
|
|
314
|
+
"concepttype": {
|
|
315
|
+
"href": "/concepttypes/bundle-com.beinformed.fs.demo.metamodels/High%20level%20requirements.bixml/ArchitecturalSignificantRequirement"
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
]
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
@@ -9,17 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
"contributions": {
|
|
11
11
|
"href": "/contributions/concepttypes/(knowledge-model-type-identifier)/(concept-type-identifier)"
|
|
12
|
-
}
|
|
13
|
-
"conceptTypeHierarchy": [
|
|
14
|
-
{
|
|
15
|
-
"href": "/concepttypes/bundle-com.beinformed.fs.demo.metamodels/Advice%20and%20request%20business%20scenarios.bixml/ScenarioStep_Advice",
|
|
16
|
-
"name": "Adviceandrequestbusinessscenarios#ScenarioStep_Advice"
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"href": "/concepttypes/bundle-com.beinformed.fs.demo.metamodels/Business%20scenarios.bixml/ScenarioStep",
|
|
20
|
-
"name": "BusinessScenarios#ScenarioStep"
|
|
21
|
-
}
|
|
22
|
-
]
|
|
12
|
+
}
|
|
23
13
|
},
|
|
24
14
|
"_id": "ScenarioStep_Advice",
|
|
25
15
|
"label": "Advice scenario step",
|
|
@@ -1,10 +1,38 @@
|
|
|
1
1
|
import ConceptIndexModel from "../ConceptIndexModel";
|
|
2
2
|
|
|
3
|
+
import { conceptIndex } from "../__mock__/conceptindex";
|
|
4
|
+
|
|
3
5
|
describe("conceptIndexModel", () => {
|
|
4
6
|
it("should be able to create an empty ConceptIndexModel object", () => {
|
|
5
|
-
const
|
|
7
|
+
const emptyConceptIndex = new ConceptIndexModel();
|
|
8
|
+
|
|
9
|
+
expect(emptyConceptIndex).toBeInstanceOf(ConceptIndexModel);
|
|
10
|
+
expect(emptyConceptIndex.type).toBe("ConceptIndex");
|
|
11
|
+
});
|
|
6
12
|
|
|
13
|
+
it("should be able to create a ConceptIndexModel from concept search resposne", () => {
|
|
7
14
|
expect(conceptIndex).toBeInstanceOf(ConceptIndexModel);
|
|
8
|
-
|
|
15
|
+
|
|
16
|
+
expect(conceptIndex.label).toBe("Concept search");
|
|
17
|
+
expect(conceptIndex.selfhref.toString()).toBe(
|
|
18
|
+
"/concepts?entryDate=2024-10-21",
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
expect(conceptIndex.indexfilter.label).toBe("Index");
|
|
22
|
+
expect(conceptIndex.searchtermfilter.label).toBe("Label");
|
|
23
|
+
expect(conceptIndex.modelCategoryFilter.label).toBe("Model category");
|
|
24
|
+
|
|
25
|
+
expect(conceptIndex.items.size).toBe(7);
|
|
26
|
+
|
|
27
|
+
const firstItem = conceptIndex.items.first;
|
|
28
|
+
expect(firstItem.label).toBe(
|
|
29
|
+
"Capture compliance artifacts in customer case",
|
|
30
|
+
);
|
|
31
|
+
expect(firstItem.selfhref.toString()).toBe(
|
|
32
|
+
"/concepts/bundle-com.beinformed.models.FSDemoBusinessDesign/High%20level%20requirements/Architectural%20significant%20requirements.beimodel.json/CaptureComplianceArtifactsInCustomerCase?entryDate=2024-10-21",
|
|
33
|
+
);
|
|
34
|
+
expect(firstItem.conceptTypeLink.href.toString()).toBe(
|
|
35
|
+
"/concepttypes/bundle-com.beinformed.fs.demo.metamodels/High%20level%20requirements.bixml/ArchitecturalSignificantRequirement",
|
|
36
|
+
);
|
|
9
37
|
});
|
|
10
38
|
});
|
|
@@ -19,30 +19,13 @@ describe("conceptTypeDetailModel", () => {
|
|
|
19
19
|
expect(conceptTypeDetail.backgroundColor).toBe("#FFFF3C");
|
|
20
20
|
expect(conceptTypeDetail.borderColor).toBe("#000000");
|
|
21
21
|
|
|
22
|
-
expect(conceptTypeDetail.conceptTypeHierarchy.length).toBe(2);
|
|
23
22
|
expect(
|
|
24
23
|
conceptTypeDetail.isOfConceptType(
|
|
25
|
-
"
|
|
24
|
+
"/concepttypes/bundle-com.beinformed.fs.demo.metamodels/Advice%20and%20request%20business%20scenarios.bixml/ScenarioStep_Advice",
|
|
26
25
|
),
|
|
27
26
|
).toBe(true);
|
|
28
|
-
expect(
|
|
29
|
-
conceptTypeDetail.isOfConceptType("BusinessScenarios#ScenarioStep"),
|
|
30
|
-
).toBe(true);
|
|
31
27
|
expect(conceptTypeDetail.isOfConceptType("BEI_CaseManagement#Case")).toBe(
|
|
32
28
|
false,
|
|
33
29
|
);
|
|
34
|
-
|
|
35
|
-
expect(
|
|
36
|
-
conceptTypeDetail.isOfConceptType(
|
|
37
|
-
"/concepttypes/bundle-com.beinformed.fs.demo.metamodels/Business%20scenarios.bixml/ScenarioStep",
|
|
38
|
-
),
|
|
39
|
-
).toBe(true);
|
|
40
|
-
|
|
41
|
-
expect(
|
|
42
|
-
conceptTypeDetail.hasMetamodelIdInHierarchy("BusinessScenarios"),
|
|
43
|
-
).toBe(true);
|
|
44
|
-
expect(
|
|
45
|
-
conceptTypeDetail.hasMetamodelIdInHierarchy("BEI_CaseManagement"),
|
|
46
|
-
).toBe(false);
|
|
47
30
|
});
|
|
48
31
|
});
|
|
@@ -8,6 +8,7 @@ import { TIMEVERSION_FILTER_NAME } from "../../constants/Constants";
|
|
|
8
8
|
import LinkCollection from "../links/LinkCollection";
|
|
9
9
|
|
|
10
10
|
import type { ModularUIModel, IModelWithChildModels } from "../types";
|
|
11
|
+
import { getBasePath } from "../../constants";
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* Link to a concept
|
|
@@ -20,13 +21,22 @@ export default class ContentLinkModel
|
|
|
20
21
|
_entryDate: ?ISO_DATE;
|
|
21
22
|
_contentType: ContentTypeModel | null = null;
|
|
22
23
|
_items: Array<ContentLinkModel>;
|
|
24
|
+
_origin: string = "";
|
|
25
|
+
_contextPath: string = getBasePath();
|
|
23
26
|
|
|
24
27
|
/**
|
|
25
28
|
*/
|
|
26
|
-
constructor(
|
|
29
|
+
constructor(
|
|
30
|
+
data: Object,
|
|
31
|
+
entryDate: ?ISO_DATE = null,
|
|
32
|
+
origin?: string,
|
|
33
|
+
contextPath?: string,
|
|
34
|
+
) {
|
|
27
35
|
super(data, {});
|
|
28
36
|
|
|
29
37
|
this._entryDate = entryDate;
|
|
38
|
+
this._origin = origin || "";
|
|
39
|
+
this._contextPath = contextPath || getBasePath();
|
|
30
40
|
}
|
|
31
41
|
|
|
32
42
|
/**
|
|
@@ -102,9 +112,12 @@ export default class ContentLinkModel
|
|
|
102
112
|
/**
|
|
103
113
|
*/
|
|
104
114
|
createEncodedHref(): Href {
|
|
105
|
-
// TODO SBO: origin and context
|
|
106
115
|
const startURI = "/content/";
|
|
107
|
-
const selfHref = new Href(
|
|
116
|
+
const selfHref = new Href(
|
|
117
|
+
this.data._links.self.href,
|
|
118
|
+
this._origin,
|
|
119
|
+
this._contextPath,
|
|
120
|
+
);
|
|
108
121
|
const href = selfHref.path;
|
|
109
122
|
|
|
110
123
|
const section = this.data.section;
|
|
@@ -140,11 +153,13 @@ export default class ContentLinkModel
|
|
|
140
153
|
*/
|
|
141
154
|
get links(): LinkCollection {
|
|
142
155
|
if (!this._links) {
|
|
143
|
-
// TODO SBO: origin and context
|
|
144
156
|
this._links = new LinkCollection(
|
|
145
157
|
Array.isArray(this.data._links)
|
|
146
158
|
? this.data._links[0]
|
|
147
159
|
: this.data._links,
|
|
160
|
+
null,
|
|
161
|
+
this._origin,
|
|
162
|
+
this._contextPath,
|
|
148
163
|
);
|
|
149
164
|
}
|
|
150
165
|
|
|
@@ -8,6 +8,7 @@ import LinkModel from "../links/LinkModel";
|
|
|
8
8
|
|
|
9
9
|
import type Href from "../href/Href";
|
|
10
10
|
import { retrieveText } from "../../utils";
|
|
11
|
+
import { getBasePath } from "../../constants";
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
*/
|
|
@@ -15,11 +16,20 @@ class SectionModel extends BaseModel {
|
|
|
15
16
|
_entryDate: ISO_DATE | null;
|
|
16
17
|
_selflink: ?LinkModel;
|
|
17
18
|
_childSections: Array<SectionModel>;
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
_origin: string = "";
|
|
20
|
+
_contextPath: string = getBasePath();
|
|
21
|
+
|
|
22
|
+
constructor(
|
|
23
|
+
data: Object,
|
|
24
|
+
entryDate: ISO_DATE | null,
|
|
25
|
+
origin?: string,
|
|
26
|
+
contextPath?: string,
|
|
27
|
+
) {
|
|
20
28
|
super(data, {});
|
|
21
29
|
|
|
22
30
|
this._entryDate = entryDate;
|
|
31
|
+
this._origin = origin || "";
|
|
32
|
+
this._contextPath = contextPath || getBasePath();
|
|
23
33
|
}
|
|
24
34
|
|
|
25
35
|
/**
|
|
@@ -32,8 +42,12 @@ class SectionModel extends BaseModel {
|
|
|
32
42
|
*/
|
|
33
43
|
get selflink(): LinkModel {
|
|
34
44
|
if (!this._selflink) {
|
|
35
|
-
|
|
36
|
-
|
|
45
|
+
this._selflink = new LinkModel(
|
|
46
|
+
this.data._links?.self,
|
|
47
|
+
null,
|
|
48
|
+
this._origin,
|
|
49
|
+
this._contextPath,
|
|
50
|
+
);
|
|
37
51
|
}
|
|
38
52
|
return this._selflink;
|
|
39
53
|
}
|
|
@@ -111,6 +125,8 @@ class SectionModel extends BaseModel {
|
|
|
111
125
|
_links: childSection._links,
|
|
112
126
|
},
|
|
113
127
|
this.entryDate,
|
|
128
|
+
this._origin,
|
|
129
|
+
this._contextPath,
|
|
114
130
|
),
|
|
115
131
|
)
|
|
116
132
|
: [];
|
|
@@ -128,6 +144,8 @@ class SectionModel extends BaseModel {
|
|
|
128
144
|
_links: this.data._links,
|
|
129
145
|
},
|
|
130
146
|
this.entryDate,
|
|
147
|
+
this._origin,
|
|
148
|
+
this._contextPath,
|
|
131
149
|
);
|
|
132
150
|
}
|
|
133
151
|
|
|
@@ -138,7 +156,15 @@ class SectionModel extends BaseModel {
|
|
|
138
156
|
if (!this._childSections && this.data.childSections) {
|
|
139
157
|
this._childSections = this.data.childSections
|
|
140
158
|
.filter((childSection) => "body" in childSection)
|
|
141
|
-
.map(
|
|
159
|
+
.map(
|
|
160
|
+
(childSection) =>
|
|
161
|
+
new SectionModel(
|
|
162
|
+
childSection,
|
|
163
|
+
this.entryDate,
|
|
164
|
+
this._origin,
|
|
165
|
+
this._contextPath,
|
|
166
|
+
),
|
|
167
|
+
);
|
|
142
168
|
}
|
|
143
169
|
return this._childSections || [];
|
|
144
170
|
}
|
|
@@ -3,6 +3,7 @@ import Href from "../href/Href";
|
|
|
3
3
|
|
|
4
4
|
import type { MessageParameters } from "../../i18n/types";
|
|
5
5
|
import LayoutHintCollection from "../layouthint/LayoutHintCollection";
|
|
6
|
+
import { getBasePath } from "../../constants";
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
*/
|
|
@@ -33,12 +34,23 @@ export default class ErrorResponse {
|
|
|
33
34
|
_error: Object;
|
|
34
35
|
_connectKey: ?string;
|
|
35
36
|
|
|
37
|
+
_origin: string = "";
|
|
38
|
+
_contextPath: string = getBasePath();
|
|
39
|
+
|
|
36
40
|
/**
|
|
37
41
|
* Construct ErrorResponse
|
|
38
42
|
*/
|
|
39
|
-
constructor(
|
|
43
|
+
constructor(
|
|
44
|
+
data: Object,
|
|
45
|
+
connectKey?: string,
|
|
46
|
+
origin?: string,
|
|
47
|
+
contextPath?: string,
|
|
48
|
+
) {
|
|
40
49
|
this._error = data;
|
|
41
50
|
this._connectKey = connectKey;
|
|
51
|
+
|
|
52
|
+
this._origin = origin || "";
|
|
53
|
+
this._contextPath = contextPath || getBasePath();
|
|
42
54
|
}
|
|
43
55
|
|
|
44
56
|
/**
|
|
@@ -53,6 +65,18 @@ export default class ErrorResponse {
|
|
|
53
65
|
return this._connectKey;
|
|
54
66
|
}
|
|
55
67
|
|
|
68
|
+
/**
|
|
69
|
+
*/
|
|
70
|
+
get origin(): string {
|
|
71
|
+
return this._origin;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
*/
|
|
76
|
+
get contextPath(): string {
|
|
77
|
+
return this._contextPath;
|
|
78
|
+
}
|
|
79
|
+
|
|
56
80
|
/**
|
|
57
81
|
* Return error information
|
|
58
82
|
*/
|
|
@@ -161,9 +185,13 @@ export default class ErrorResponse {
|
|
|
161
185
|
* Return response error redirect href
|
|
162
186
|
*/
|
|
163
187
|
get redirectHref(): Href {
|
|
164
|
-
// TODO SBO: origin and context
|
|
165
188
|
if (this.response.redirect?.href) {
|
|
166
|
-
return new Href(
|
|
189
|
+
return new Href(
|
|
190
|
+
this.response.redirect?.href,
|
|
191
|
+
"",
|
|
192
|
+
this.origin,
|
|
193
|
+
this.contextPath,
|
|
194
|
+
);
|
|
167
195
|
}
|
|
168
196
|
return new Href();
|
|
169
197
|
}
|
|
@@ -291,8 +319,9 @@ export default class ErrorResponse {
|
|
|
291
319
|
* Get response url
|
|
292
320
|
*/
|
|
293
321
|
get changePasswordHref(): ?Href {
|
|
294
|
-
|
|
295
|
-
|
|
322
|
+
return this.properties.redirect
|
|
323
|
+
? new Href(this.properties.redirect, "", this.origin, this.contextPath)
|
|
324
|
+
: null;
|
|
296
325
|
}
|
|
297
326
|
|
|
298
327
|
/**
|
package/src/models/href/Href.js
CHANGED
|
@@ -105,10 +105,24 @@ class Href {
|
|
|
105
105
|
this.hash = href._hash;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
if (href.state) {
|
|
109
|
-
this.
|
|
108
|
+
if (typeof href.state === "object") {
|
|
109
|
+
this.setStateFromLocationOrObject(href.state);
|
|
110
110
|
} else if (typeof href._state === "object") {
|
|
111
|
-
this.
|
|
111
|
+
this.setStateFromLocationOrObject(href._state);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
*/
|
|
117
|
+
setStateFromLocationOrObject(state?: any) {
|
|
118
|
+
if (state != null) {
|
|
119
|
+
this.state = state;
|
|
120
|
+
if (typeof state.contextPath === "string") {
|
|
121
|
+
this.contextPath = state.contextPath;
|
|
122
|
+
}
|
|
123
|
+
if (typeof state.origin === "string") {
|
|
124
|
+
this.origin = state.origin;
|
|
125
|
+
}
|
|
112
126
|
}
|
|
113
127
|
}
|
|
114
128
|
|
|
@@ -531,7 +545,10 @@ class Href {
|
|
|
531
545
|
pathname: this.path,
|
|
532
546
|
search: this.querystring.length > 0 ? `?${this.querystring}` : "",
|
|
533
547
|
hash: this.hash.length > 0 ? `#${this.hash}` : "",
|
|
534
|
-
state:
|
|
548
|
+
state: {
|
|
549
|
+
contextPath: this.contextPath,
|
|
550
|
+
...this.state,
|
|
551
|
+
},
|
|
535
552
|
};
|
|
536
553
|
}
|
|
537
554
|
}
|