@ukhomeoffice/cop-react-form-renderer 6.15.7-alpha → 6.15.8-alpha

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 (15) hide show
  1. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-hidden-component-show-when-in-component-and-page.json +62 -0
  2. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/forms/form-hidden-page-same-component-reused.json +61 -0
  3. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/cop-airpax-change-what-happened-before.json +300 -0
  4. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-hidden-component-show-when-in-component-and-page.json +6 -0
  5. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/input/data-hidden-page-same-component-reused.json +6 -0
  6. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/cop-airpax-change-what-happened-after.json +280 -0
  7. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-hidden-component-show-when-in-component-and-page-removed.json +5 -0
  8. package/dist/components/FormRenderer/clear-uncompleted-routes/test-data/output/data-hidden-page-same-component-reused-removed.json +5 -0
  9. package/dist/components/FormRenderer/helpers/clearOutUncompletedRoutes.js +84 -189
  10. package/dist/components/FormRenderer/helpers/clearOutUncompletedRoutes.test.js +64 -27
  11. package/dist/components/FormRenderer/helpers/clearOutUncompletedRoutesUtils.js +290 -0
  12. package/dist/components/FormRenderer/helpers/clearOutUncompletedRoutesUtils.test.js +502 -0
  13. package/package.json +1 -1
  14. package/dist/components/FormRenderer/helpers/deleteNodeByPath.js +0 -29
  15. package/dist/components/FormRenderer/helpers/deleteNodeByPath.test.js +0 -56
@@ -0,0 +1,280 @@
1
+ {
2
+ "id": "9a2aae86-e3c7-11ef-b502-56ecdccac0eb",
3
+ "businessKey": "DEV-20250205-1041",
4
+ "modeOfTransport": {
5
+ "id": 2,
6
+ "mode": "Scheduled Air Passenger",
7
+ "modecode": "airpass",
8
+ "crossingtype": [
9
+ "air"
10
+ ],
11
+ "value": "Scheduled Air Passenger",
12
+ "label": "Scheduled Air Passenger"
13
+ },
14
+ "port": {
15
+ "id": 3415,
16
+ "name": "Luton",
17
+ "sea": false,
18
+ "air": true,
19
+ "land": false,
20
+ "rail": false,
21
+ "countryid": 234,
22
+ "iata": "LTN",
23
+ "value": "3415",
24
+ "label": "Luton",
25
+ "hint": ""
26
+ },
27
+ "formStatus": {
28
+ "tasks": {
29
+ "undefined": {},
30
+ "event-summary-airpassenger": {
31
+ "complete": true,
32
+ "currentPage": "event-summary-check-answers"
33
+ },
34
+ "item-seals-abandoned": {
35
+ "complete": true,
36
+ "currentPage": "what-happens-next"
37
+ },
38
+ "journey-details-airpax": {
39
+ "complete": true,
40
+ "currentPage": "journey-check-answers"
41
+ },
42
+ "submit-airpax": {
43
+ "complete": false,
44
+ "currentPage": "submit-form"
45
+ }
46
+ },
47
+ "taskPage": "submit-form"
48
+ },
49
+ "whatHappened": "items",
50
+ "formInstanceId": "e1795627-b40e-4ac6-bfb2-5bf3f10ff126",
51
+ "links": [
52
+ {
53
+ "method": "GET",
54
+ "href": "https://green.dev.cop.homeoffice.gov.uk/camunda/engine-rest/process-instance/9a2aae86-e3c7-11ef-b502-56ecdccac0eb",
55
+ "rel": "self"
56
+ }
57
+ ],
58
+ "definitionId": "cop-addABorderEvent:3:08744e1c-8ba1-11ef-87e2-66391f301ad1",
59
+ "caseInstanceId": null,
60
+ "ended": false,
61
+ "suspended": false,
62
+ "tenantId": null,
63
+ "eventDateTime": {
64
+ "eventDate": "05-02-2025",
65
+ "eventTime": "12:12"
66
+ },
67
+ "terminal": {
68
+ "id": 8,
69
+ "name": "Eastern Docks",
70
+ "validfrom": "2019-01-01T00:01:00.000Z",
71
+ "validto": null,
72
+ "updatedby": null,
73
+ "value": "8",
74
+ "label": "Eastern Docks",
75
+ "hint": ""
76
+ },
77
+ "subLocation": {
78
+ "id": 19,
79
+ "sublocation": "Arrival Lounge",
80
+ "description": null,
81
+ "validfrom": "2021-05-07T00:00:03.000Z",
82
+ "validto": null,
83
+ "updatedby": "BethStephenson",
84
+ "uoflocation": false,
85
+ "value": "19",
86
+ "label": "Arrival Lounge",
87
+ "hint": ""
88
+ },
89
+ "operationOrExercise": "no",
90
+ "centaurReference": "E1234567",
91
+ "leadOfficerEmail": {
92
+ "email": "philip.harvey@digital.homeoffice.gov.uk",
93
+ "label": "philip.harvey@digital.homeoffice.gov.uk",
94
+ "value": "philip.harvey@digital.homeoffice.gov.uk",
95
+ "defaultteamid": "cf576f61-26cd-4862-92e1-2d5cfc050c2d"
96
+ },
97
+ "itemsActiveId": "5034aaef-010b-4cca-9b83-15a679da0049",
98
+ "items": [
99
+ {
100
+ "id": "5034aaef-010b-4cca-9b83-15a679da0049",
101
+ "sealNumber": "E1235612",
102
+ "itemCategory": {
103
+ "id": 6,
104
+ "category": "Alcohol",
105
+ "description": "Beers, Wines, Spirits etc.",
106
+ "validfrom": "2023-01-10T00:00:01.000Z",
107
+ "validto": null,
108
+ "updatedby": "Mohammed Abdul Odud",
109
+ "synonyms": [
110
+ "'Beer'",
111
+ "'Wines'",
112
+ "'Spirits'"
113
+ ],
114
+ "value": "6",
115
+ "label": "Alcohol",
116
+ "hint": ""
117
+ },
118
+ "itemSubCategory": {
119
+ "id": 1795,
120
+ "name": "Alcohol distiller",
121
+ "description": null,
122
+ "itemcategoriesid": 6,
123
+ "cites": false,
124
+ "poao": false,
125
+ "cbrn": false,
126
+ "document": false,
127
+ "tobacco": false,
128
+ "alcohol": true,
129
+ "weapons": false,
130
+ "firearms": false,
131
+ "ipr": true,
132
+ "strategic": false,
133
+ "avtc": false,
134
+ "oils": false,
135
+ "commodity": false,
136
+ "good": true,
137
+ "plant": false,
138
+ "animal": false,
139
+ "drugs": false,
140
+ "financial": false,
141
+ "indecent": false,
142
+ "vehicle": false,
143
+ "medical": false,
144
+ "unitid": 5,
145
+ "seizureqty": null,
146
+ "ienqty": null,
147
+ "validfrom": "2023-01-10T00:00:01.000Z",
148
+ "validto": null,
149
+ "updatedby": "Mohammed Abdul Odud",
150
+ "uof": false,
151
+ "epmscode": 1037,
152
+ "epmscategory": "ALP",
153
+ "unitarray": [
154
+ 5
155
+ ],
156
+ "categoryarray": [
157
+ 6,
158
+ 9,
159
+ 14
160
+ ],
161
+ "lethalfirearm": null,
162
+ "nonlethalfirearm": null,
163
+ "value": "1795",
164
+ "label": "Alcohol distiller",
165
+ "hint": ""
166
+ },
167
+ "seizedOrDetained": "seized",
168
+ "legalReasonForSeizing": {
169
+ "id": 1,
170
+ "epmsvalue": 2,
171
+ "reason": "CEMA",
172
+ "description": "Customs and excise management act 1979",
173
+ "validfrom": "2022-09-21T00:00:01.000Z",
174
+ "validto": null,
175
+ "updatedby": "Mohammed Abdul Odud",
176
+ "value": "1",
177
+ "label": "Customs and excise management act 1979",
178
+ "hint": ""
179
+ },
180
+ "detectionTechnologies": [
181
+ {
182
+ "id": "54600601-4f78-450d-bdee-2290b7aa4d09",
183
+ "detectionTechnology": {
184
+ "id": 5,
185
+ "name": "Automatic Number Plate Recognition",
186
+ "value": "5",
187
+ "label": "Automatic Number Plate Recognition",
188
+ "hint": ""
189
+ }
190
+ }
191
+ ],
192
+ "searchTechniques": [
193
+ {
194
+ "id": "54600601-4f78-450d-bdee-2290b7aa4d09",
195
+ "searchTechnique": {
196
+ "id": 27,
197
+ "type": "Baggage",
198
+ "value": "27",
199
+ "label": "Baggage",
200
+ "hint": ""
201
+ }
202
+ }
203
+ ],
204
+ "concealmentMethods": [
205
+ {
206
+ "id": "2e98b018-99ff-440d-88fa-ee630dbc7a19",
207
+ "concealmentMethod": {
208
+ "id": 24,
209
+ "method": "Air filter",
210
+ "value": "24",
211
+ "label": "Air filter",
212
+ "hint": ""
213
+ }
214
+ }
215
+ ],
216
+ "specialStorageConditions": {
217
+ "epmsvalue": 10,
218
+ "description": "Machinery",
219
+ "id": 10,
220
+ "value": "10",
221
+ "label": "Machinery",
222
+ "hint": ""
223
+ },
224
+ "brandText": "asd",
225
+ "make": "asd",
226
+ "unitOfMeasure": {
227
+ "id": 13,
228
+ "unit": "Number of items",
229
+ "validfrom": "2023-02-21T00:00:01.000Z",
230
+ "validto": null,
231
+ "updatedby": "Mohammed Abdul Odud",
232
+ "code": 5,
233
+ "epmsid": 9,
234
+ "decimal": false,
235
+ "shortname": null,
236
+ "value": "13",
237
+ "label": "Number of items"
238
+ },
239
+ "quantity": "122",
240
+ "itemDescription": "qwse qwe qwe qwe qwe qwe ",
241
+ "willTheItemBeStored": "no",
242
+ "whatIsTheInitialMovement?": {
243
+ "id": 2,
244
+ "epmscode": 4,
245
+ "description": "Retained by case officer",
246
+ "inuse": true,
247
+ "validfrom": "2022-08-18T00:00:01.000Z",
248
+ "validto": null,
249
+ "updatedby": "Mohammed Abdul Odud",
250
+ "value": "2",
251
+ "label": "Retained by case officer",
252
+ "hint": ""
253
+ },
254
+ "shouldThisItemBeDestroyed": "no",
255
+ "giveAReason": "sd asd asd asd ",
256
+ "specialHandlingInstructions": "no",
257
+ "hasAnotherAgencyAdoptedTheItem": "no",
258
+ "constructedOrAdapted": "no",
259
+ "doYouHavePhotosOfTheItemToAdd": "no"
260
+ }
261
+ ],
262
+ "lockup": {
263
+ "value": "LTN",
264
+ "label": "Luton Airport Lockup",
265
+ "hidden": true
266
+ },
267
+ "meta": {},
268
+ "epmsSubmitted": true,
269
+ "doYouHaveTheirFlightNumber": "no",
270
+ "form": {
271
+ "formVersionId": "b1009648bfc7df2e5dcc565e953f8c48037d2648-20",
272
+ "title": "Add a border event",
273
+ "name": "cop-addABorderEvent",
274
+ "submissionDate": "2025-02-05T13:53:07.633Z",
275
+ "submittedBy": "philip.harvey@digital.homeoffice.gov.uk",
276
+ "submittingUsersName": "Phil",
277
+ "submissionTeam": "cf576f61-26cd-4862-92e1-2d5cfc050c2d",
278
+ "formInstanceId": "e1795627-b40e-4ac6-bfb2-5bf3f10ff126"
279
+ }
280
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "type": "Example form",
3
+ "alpha": "alpha-value",
4
+ "charlie": "charlie-value"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "alpha": "alpha-value",
3
+ "externalCondition1": "externalCondition1-value",
4
+ "externalCondition2": "externalCondition2-value"
5
+ }