@hmcts/ccd-case-ui-toolkit 7.4.20-alignment-issue → 7.4.20
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/README.md +354 -187
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs +16 -3
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,187 +1,354 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
yarn
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
yarn build
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
1
|
+
CCD CASE UI TOOLKIT
|
|
2
|
+
===================
|
|
3
|
+
|
|
4
|
+
Overview
|
|
5
|
+
--------
|
|
6
|
+
|
|
7
|
+
@hmcts/ccd-case-ui-toolkit is an Angular component library for CCD and XUI
|
|
8
|
+
case-management applications. It provides reusable case-form components,
|
|
9
|
+
directives, services, models, fixtures and supporting utilities.
|
|
10
|
+
|
|
11
|
+
The repository also contains:
|
|
12
|
+
|
|
13
|
+
- A library build using Angular and ng-packagr.
|
|
14
|
+
- A demo application and synthetic browser-test host.
|
|
15
|
+
- Karma/Jasmine unit tests.
|
|
16
|
+
- Playwright source-host tests.
|
|
17
|
+
- A packaged-consumer smoke test for the built package.
|
|
18
|
+
- Documentation generation with Compodoc.
|
|
19
|
+
- CI and publishing configuration.
|
|
20
|
+
|
|
21
|
+
The published package name is:
|
|
22
|
+
|
|
23
|
+
@hmcts/ccd-case-ui-toolkit
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
Prerequisites
|
|
27
|
+
-------------
|
|
28
|
+
|
|
29
|
+
- Node.js 24.18.0 or a later version accepted by package.json.
|
|
30
|
+
- Yarn 4.5.0, managed through the repository's Yarn configuration.
|
|
31
|
+
- A Git checkout with the repository files available.
|
|
32
|
+
- Chromium if you are running the Playwright browser tests.
|
|
33
|
+
|
|
34
|
+
Check the required Node.js version in .nvmrc and package.json before changing
|
|
35
|
+
your local runtime. On Windows, Git Bash or WSL is recommended for shell
|
|
36
|
+
commands that use Unix-style syntax.
|
|
37
|
+
|
|
38
|
+
Install dependencies from the repository root:
|
|
39
|
+
|
|
40
|
+
corepack enable
|
|
41
|
+
yarn install --immutable
|
|
42
|
+
|
|
43
|
+
The repository uses a node-modules linker. Do not commit node_modules, build
|
|
44
|
+
output, coverage or browser-test results.
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
Repository layout
|
|
48
|
+
-----------------
|
|
49
|
+
|
|
50
|
+
projects/ccd-case-ui-toolkit/
|
|
51
|
+
src/ Library source and public API
|
|
52
|
+
ng-package.json ng-packagr configuration
|
|
53
|
+
package.json Library metadata and peer dependencies
|
|
54
|
+
|
|
55
|
+
demo/ Example application and stubs
|
|
56
|
+
packaged-consumer/ Application that consumes the built package
|
|
57
|
+
playwright_tests/ Source-host browser tests and test host
|
|
58
|
+
scripts/ Build synchronisation and smoke checks
|
|
59
|
+
angular.json Angular workspace configuration
|
|
60
|
+
package.json Workspace scripts
|
|
61
|
+
dist/ Generated package output
|
|
62
|
+
docs/ Generated Compodoc output
|
|
63
|
+
|
|
64
|
+
The library entry point is projects/ccd-case-ui-toolkit/src/public-api.ts.
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
Build the library
|
|
68
|
+
-----------------
|
|
69
|
+
|
|
70
|
+
Build the package once:
|
|
71
|
+
|
|
72
|
+
yarn build
|
|
73
|
+
|
|
74
|
+
This runs the condition-parser generation step, builds the
|
|
75
|
+
ccd-case-ui-toolkit-lib Angular library and synchronises the package output
|
|
76
|
+
into dist/.
|
|
77
|
+
|
|
78
|
+
The explicit library build command is:
|
|
79
|
+
|
|
80
|
+
yarn build:library
|
|
81
|
+
|
|
82
|
+
Build the library continuously while editing source files:
|
|
83
|
+
|
|
84
|
+
yarn build:library:watch
|
|
85
|
+
|
|
86
|
+
The generated package is written to:
|
|
87
|
+
|
|
88
|
+
dist/ccd-case-ui-toolkit/
|
|
89
|
+
|
|
90
|
+
Generated parser files are created by the condition-parser task. Do not edit
|
|
91
|
+
the generated condition-parser.generated.ts file by hand; change the source
|
|
92
|
+
condition grammar and regenerate it instead.
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
Use the library in a consumer application
|
|
96
|
+
------------------------------------------
|
|
97
|
+
|
|
98
|
+
The preferred verification path is the repository's packaged-consumer gate:
|
|
99
|
+
|
|
100
|
+
yarn test:packaged-consumer
|
|
101
|
+
|
|
102
|
+
This checks the webapp material contract, builds the library and runs the
|
|
103
|
+
packaged-consumer smoke test against the generated package.
|
|
104
|
+
|
|
105
|
+
For stricter peer-dependency validation, run:
|
|
106
|
+
|
|
107
|
+
yarn test:packaged-consumer:strict
|
|
108
|
+
|
|
109
|
+
The packaged consumer is configured to run on port 4301:
|
|
110
|
+
|
|
111
|
+
cd packaged-consumer
|
|
112
|
+
yarn start
|
|
113
|
+
|
|
114
|
+
Use the packaged-consumer workflow to validate the installed package rather
|
|
115
|
+
than relying only on source imports. Source-host tests and installed-package
|
|
116
|
+
tests prove different compatibility boundaries.
|
|
117
|
+
|
|
118
|
+
Legacy linking
|
|
119
|
+
|
|
120
|
+
The older README described yarn link and manual copying of dist/. Linking can
|
|
121
|
+
be useful for local investigation, but it is more fragile with modern Yarn,
|
|
122
|
+
Angular and peer dependencies. Prefer the packaged-consumer smoke test or the
|
|
123
|
+
consumer application's normal package workflow. If linking is unavoidable,
|
|
124
|
+
build the library first and verify that the consumer resolves the intended
|
|
125
|
+
package version and peer dependencies.
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
Run the Playwright source host
|
|
129
|
+
------------------------------
|
|
130
|
+
|
|
131
|
+
Install the Chromium browser used by the suite:
|
|
132
|
+
|
|
133
|
+
yarn playwright install chromium --only-shell
|
|
134
|
+
|
|
135
|
+
Run Playwright support checks:
|
|
136
|
+
|
|
137
|
+
yarn lint:playwright
|
|
138
|
+
yarn test:playwright:typecheck
|
|
139
|
+
|
|
140
|
+
List available scenarios:
|
|
141
|
+
|
|
142
|
+
yarn test:playwright --list
|
|
143
|
+
|
|
144
|
+
Run the full source-host browser suite:
|
|
145
|
+
|
|
146
|
+
yarn test:playwright
|
|
147
|
+
|
|
148
|
+
Start the synthetic Angular host when inspecting it manually:
|
|
149
|
+
|
|
150
|
+
yarn serve:playwright
|
|
151
|
+
|
|
152
|
+
The host is served at:
|
|
153
|
+
|
|
154
|
+
http://127.0.0.1:4300
|
|
155
|
+
|
|
156
|
+
The Playwright runner starts the host as required by its configuration. Keep
|
|
157
|
+
ports 4300 and 4301 available when running browser or packaged-consumer tests.
|
|
158
|
+
|
|
159
|
+
Run a focused feature where appropriate:
|
|
160
|
+
|
|
161
|
+
yarn test:playwright payment-contract
|
|
162
|
+
yarn test:playwright advanced-fields
|
|
163
|
+
|
|
164
|
+
The source-host suite uses synthetic data, isolated browser contexts, an
|
|
165
|
+
en-GB locale and the Europe/London time zone. It validates named component
|
|
166
|
+
contracts; it does not prove that deployed services or every consuming
|
|
167
|
+
application are compatible.
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
Playwright evidence
|
|
171
|
+
-------------------
|
|
172
|
+
|
|
173
|
+
Generated browser evidence is written below playwright_tests/test-results/.
|
|
174
|
+
It can include:
|
|
175
|
+
|
|
176
|
+
- JUnit results.
|
|
177
|
+
- Perfetto timeline data.
|
|
178
|
+
- Failure screenshots and traces.
|
|
179
|
+
- Odhín HTML reports.
|
|
180
|
+
|
|
181
|
+
The main report locations are:
|
|
182
|
+
|
|
183
|
+
playwright_tests/test-results/junit.xml
|
|
184
|
+
playwright_tests/test-results/perfetto.json
|
|
185
|
+
playwright_tests/odhin-report/toolkit-playwright.html
|
|
186
|
+
|
|
187
|
+
The packaged-consumer gate writes its evidence below
|
|
188
|
+
packaged-consumer-results/.
|
|
189
|
+
|
|
190
|
+
These outputs may contain test data and should be treated as generated,
|
|
191
|
+
potentially sensitive artefacts. They are ignored by Git and should not be
|
|
192
|
+
committed.
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
Unit tests and coverage
|
|
196
|
+
-----------------------
|
|
197
|
+
|
|
198
|
+
Run the Angular unit tests with coverage:
|
|
199
|
+
|
|
200
|
+
yarn test
|
|
201
|
+
|
|
202
|
+
Run the unit tests in watch mode:
|
|
203
|
+
|
|
204
|
+
yarn test:watch
|
|
205
|
+
|
|
206
|
+
Coverage output is written under coverage/.
|
|
207
|
+
|
|
208
|
+
Create a coverage report when coverage data already exists:
|
|
209
|
+
|
|
210
|
+
yarn coverage
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
Linting, audits and documentation
|
|
214
|
+
---------------------------------
|
|
215
|
+
|
|
216
|
+
Run the library lint checks:
|
|
217
|
+
|
|
218
|
+
yarn lint
|
|
219
|
+
|
|
220
|
+
Run the Playwright-specific lint checks:
|
|
221
|
+
|
|
222
|
+
yarn lint:playwright
|
|
223
|
+
|
|
224
|
+
Run reporting and reporter checks:
|
|
225
|
+
|
|
226
|
+
yarn lint:playwright:reporting
|
|
227
|
+
|
|
228
|
+
Run the dependency audit against the repository's known-audit baseline:
|
|
229
|
+
|
|
230
|
+
yarn test:audit
|
|
231
|
+
|
|
232
|
+
Generate Compodoc documentation:
|
|
233
|
+
|
|
234
|
+
yarn docs
|
|
235
|
+
|
|
236
|
+
The generated documentation is written to docs/.
|
|
237
|
+
|
|
238
|
+
Run the main CI-style local checks:
|
|
239
|
+
|
|
240
|
+
yarn ci
|
|
241
|
+
|
|
242
|
+
The CI command runs lint, unit tests, the library build and documentation
|
|
243
|
+
generation. It may take longer than targeted checks.
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
Development workflow
|
|
247
|
+
--------------------
|
|
248
|
+
|
|
249
|
+
1. Create a focused branch.
|
|
250
|
+
2. Install dependencies with yarn install --immutable.
|
|
251
|
+
3. Make the source change under projects/ccd-case-ui-toolkit/src/.
|
|
252
|
+
4. Run yarn build:library:watch while developing a consumer integration.
|
|
253
|
+
5. Run targeted unit tests and Playwright scenarios.
|
|
254
|
+
6. Run yarn lint and yarn test.
|
|
255
|
+
7. Run yarn test:packaged-consumer for package-boundary changes.
|
|
256
|
+
8. Run yarn ci before a release or when broad changes affect the library.
|
|
257
|
+
9. Review generated output and confirm that no sensitive artefacts are staged.
|
|
258
|
+
|
|
259
|
+
When a public component, directive, service, model or pipe is added, update
|
|
260
|
+
the public API exports and add or update focused tests. Keep assertions close
|
|
261
|
+
to the component or service contract they verify.
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
Release and publishing notes
|
|
265
|
+
-----------------------------
|
|
266
|
+
|
|
267
|
+
The package is published as an npm package with public access configured in
|
|
268
|
+
package.json. Use the repository's approved release and CI process.
|
|
269
|
+
|
|
270
|
+
Before publishing:
|
|
271
|
+
|
|
272
|
+
- Confirm the package version and release notes.
|
|
273
|
+
- Run yarn ci.
|
|
274
|
+
- Run yarn test:packaged-consumer and, where required,
|
|
275
|
+
yarn test:packaged-consumer:strict.
|
|
276
|
+
- Confirm peer dependency ranges for supported Angular consumers.
|
|
277
|
+
- Review the generated dist/ package contents.
|
|
278
|
+
- Confirm that credentials, local configuration and test results are excluded.
|
|
279
|
+
|
|
280
|
+
Prerelease versions from a pull request should follow the repository's agreed
|
|
281
|
+
format, for example x.y.z-RDM-xxx-prerelease.
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
Troubleshooting
|
|
285
|
+
---------------
|
|
286
|
+
|
|
287
|
+
Dependencies do not install
|
|
288
|
+
|
|
289
|
+
- Check the Node.js version against .nvmrc and package.json.
|
|
290
|
+
- Run corepack enable.
|
|
291
|
+
- Use yarn install --immutable in a regular checkout.
|
|
292
|
+
- If a Git worktree prevents an install hook from running, use
|
|
293
|
+
yarn install --immutable --mode=skip-build as a temporary dependency-linking
|
|
294
|
+
workaround, then run the explicit lint, typecheck, browser and package
|
|
295
|
+
checks. This workaround does not prove that install hooks work normally.
|
|
296
|
+
|
|
297
|
+
The library build fails
|
|
298
|
+
|
|
299
|
+
- Run yarn generate:condition-parser.
|
|
300
|
+
- Check the generated parser file is not being edited manually.
|
|
301
|
+
- Remove generated temporary output with yarn clean:tmp and rebuild.
|
|
302
|
+
- Check Angular, TypeScript and peer dependency versions.
|
|
303
|
+
|
|
304
|
+
Consumer cannot resolve the package
|
|
305
|
+
|
|
306
|
+
- Rebuild the library with yarn build.
|
|
307
|
+
- Confirm that the consumer is resolving the intended dist/ or package
|
|
308
|
+
version.
|
|
309
|
+
- Check Angular and peer dependency compatibility.
|
|
310
|
+
- Prefer the packaged-consumer smoke test over manual copying of dist/.
|
|
311
|
+
|
|
312
|
+
Playwright cannot start
|
|
313
|
+
|
|
314
|
+
- Install Chromium with yarn playwright install chromium --only-shell.
|
|
315
|
+
- Check that ports 4300 and 4301 are free.
|
|
316
|
+
- Run yarn test:playwright:typecheck.
|
|
317
|
+
- Run the scenario with --list to confirm that it is selected.
|
|
318
|
+
- Retain the failing trace and screenshot before starting another run, because
|
|
319
|
+
subsequent commands may overwrite the test-results directory.
|
|
320
|
+
|
|
321
|
+
Reports are missing
|
|
322
|
+
|
|
323
|
+
- Check playwright_tests/test-results/ and playwright_tests/odhin-report/.
|
|
324
|
+
- Run the explicit reporter checks.
|
|
325
|
+
- If a run is interrupted before Odhín creates its report, use the repository
|
|
326
|
+
report helper and record that the report was generated as unavailable.
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
UK English and user-facing text
|
|
330
|
+
--------------------------------
|
|
331
|
+
|
|
332
|
+
Use UK English in documentation, test descriptions and user-facing examples.
|
|
333
|
+
Preferred spellings include:
|
|
334
|
+
|
|
335
|
+
organisation / organisations
|
|
336
|
+
authorise / authorisation
|
|
337
|
+
behaviour
|
|
338
|
+
centre
|
|
339
|
+
colour
|
|
340
|
+
customise / customisation
|
|
341
|
+
licence (noun) / license (verb)
|
|
342
|
+
analyse / analysed
|
|
343
|
+
catalogue
|
|
344
|
+
prioritise
|
|
345
|
+
|
|
346
|
+
Keep API names, package names, TypeScript identifiers, test tags and external
|
|
347
|
+
service names unchanged where their spelling is part of a technical contract.
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
Licence
|
|
351
|
+
-------
|
|
352
|
+
|
|
353
|
+
This project is licensed under the MIT Licence. See LICENSE.md for the full
|
|
354
|
+
licence text.
|
|
@@ -13367,7 +13367,7 @@ class CaseEditPageComponent {
|
|
|
13367
13367
|
} if (rf & 2) {
|
|
13368
13368
|
let _t;
|
|
13369
13369
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.caseEditFormComponents = _t);
|
|
13370
|
-
} }, standalone: false, decls: 12, vars: 11, consts: [["titleBlock", ""], ["idBlock", ""], [4, "ngIf"], [4, "ngIf", "ngIfThen", "ngIfElse"], ["class", "govuk-error-summary", "aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 4, "ngIf"], [3, "error"], [3, "callbackErrorsContext", "triggerTextContinue", "triggerTextIgnore", "callbackErrorsSubject"], [1, "width-50"], ["class", "form", 3, "formGroup", "submit", 4, "ngIf"], [3, "eventCompletionParams", "eventCanBeCompleted", 4, "ngIf"], ["class", "govuk-heading-l", 4, "ngIf"], [1, "govuk-heading-l"], [1, "govuk-caption-l"], [3, "content"], ["class", "heading-h2", 4, "ngIf"], [1, "heading-h2"], ["aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 1, "govuk-error-summary"], ["id", "error-summary-title", 1, "govuk-error-summary__title"], ["class", "govuk-error-summary__body", 4, "ngFor", "ngForOf"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], ["tabindex", "0", 1, "validation-error", 3, "click", "keyup.enter"], [1, "form", 3, "submit", "formGroup"], ["id", "fieldset-case-data"], ["id", "caseEditForm", 3, "fields", "formGroup", "caseFields", "pageChangeSubject", "valuesChanged", 4, "ngIf"], ["class", "grid-row", 4, "ngIf"], [1, "form-group", "form-group-related"
|
|
13370
|
+
} }, standalone: false, decls: 12, vars: 11, consts: [["titleBlock", ""], ["idBlock", ""], [4, "ngIf"], [4, "ngIf", "ngIfThen", "ngIfElse"], ["class", "govuk-error-summary", "aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 4, "ngIf"], [3, "error"], [3, "callbackErrorsContext", "triggerTextContinue", "triggerTextIgnore", "callbackErrorsSubject"], [1, "width-50"], ["class", "form", 3, "formGroup", "submit", 4, "ngIf"], [3, "eventCompletionParams", "eventCanBeCompleted", 4, "ngIf"], ["class", "govuk-heading-l", 4, "ngIf"], [1, "govuk-heading-l"], [1, "govuk-caption-l"], [3, "content"], ["class", "heading-h2", 4, "ngIf"], [1, "heading-h2"], ["aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 1, "govuk-error-summary"], ["id", "error-summary-title", 1, "govuk-error-summary__title"], ["class", "govuk-error-summary__body", 4, "ngFor", "ngForOf"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], ["tabindex", "0", 1, "validation-error", 3, "click", "keyup.enter"], [1, "form", 3, "submit", "formGroup"], ["id", "fieldset-case-data"], ["id", "caseEditForm", 3, "fields", "formGroup", "caseFields", "pageChangeSubject", "valuesChanged", 4, "ngIf"], ["class", "grid-row", 4, "ngIf"], [1, "form-group", "form-group-related"], ["class", "button button-secondary", "type", "button", 3, "disabled", "click", 4, "ngIf"], ["type", "submit", 1, "button", 3, "disabled"], [1, "cancel"], ["type", "button", 1, "govuk-js-link", 3, "click"], ["id", "caseEditForm", 3, "valuesChanged", "fields", "formGroup", "caseFields", "pageChangeSubject"], [1, "grid-row"], [1, "column-two-thirds", "rightBorderSeparator"], ["id", "caseEditForm1", 3, "fields", "formGroup", "caseFields"], [1, "column-one-third"], ["id", "caseEditForm2", 3, "fields", "formGroup", "caseFields"], ["type", "button", 1, "button", "button-secondary", 3, "click", "disabled"], [3, "eventCanBeCompleted", "eventCompletionParams"]], template: function CaseEditPageComponent_Template(rf, ctx) { if (rf & 1) {
|
|
13371
13371
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
13372
13372
|
i0.ɵɵtemplate(0, CaseEditPageComponent_ng_container_0_Template, 3, 2, "ng-container", 2)(1, CaseEditPageComponent_div_1_Template, 1, 0, "div", 3)(2, CaseEditPageComponent_ng_template_2_Template, 3, 7, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor)(4, CaseEditPageComponent_ng_template_4_Template, 1, 1, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor)(6, CaseEditPageComponent_div_6_Template, 5, 4, "div", 4);
|
|
13373
13373
|
i0.ɵɵelement(7, "ccd-case-edit-generic-errors", 5);
|
|
@@ -13398,7 +13398,7 @@ class CaseEditPageComponent {
|
|
|
13398
13398
|
}
|
|
13399
13399
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditPageComponent, [{
|
|
13400
13400
|
type: Component,
|
|
13401
|
-
args: [{ selector: 'ccd-case-edit-page', standalone: false, template: "<ng-container *ngIf=\"eventTrigger\">\n <h1 *ngIf=\"!currentPage?.label\" class=\"govuk-heading-l\">{{eventTrigger.name | rpxTranslate}}</h1>\n <ng-container *ngIf=\"currentPage?.label\">\n <span class=\"govuk-caption-l\">{{ eventTrigger.name | rpxTranslate}}</span>\n <h1 class=\"govuk-heading-l\">{{currentPage.label | rpxTranslate}}</h1>\n </ng-container>\n</ng-container>\n\n<!--Case ID or Title -->\n<div *ngIf=\"getCaseTitle(); then titleBlock; else idBlock\"></div>\n<ng-template #titleBlock>\n <ccd-markdown [content]=\"demoteCaseTitleHeadingLevel(getCaseTitle() | ccdCaseTitle: caseFields : editForm.controls['data'] | rpxTranslate)\"></ccd-markdown>\n</ng-template>\n<ng-template #idBlock>\n <h2 *ngIf=\"getCaseId()\" class=\"heading-h2\">#{{ getCaseId() | ccdCaseReference }}</h2>\n</ng-template>\n\n<!-- Error message summary -->\n<div *ngIf=\"validationErrors.length > 0\" class=\"govuk-error-summary\" aria-labelledby=\"error-summary-title\" role=\"alert\" tabindex=\"-1\" data-module=\"govuk-error-summary\">\n <h2 class=\"govuk-error-summary__title\" id=\"error-summary-title\">\n {{'There is a problem' | rpxTranslate}}\n </h2>\n <div *ngFor=\"let validationError of validationErrors\" class=\"govuk-error-summary__body\">\n <ul class=\"govuk-list govuk-error-summary__list\">\n <li>\n <a (click)=\"navigateToErrorElement(validationError.id)\" (keyup.enter)=\"navigateToErrorElement(validationError.id)\" tabindex=\"0\" class=\"validation-error\">\n {{ validationError.message | rpxTranslate: getRpxTranslatePipeArgs(validationError.label | rpxTranslate): null }}\n </a>\n </li>\n </ul>\n </div>\n</div>\n\n<ccd-case-edit-generic-errors [error]=\"caseEdit.error\"></ccd-case-edit-generic-errors>\n\n<ccd-callback-errors\n [triggerTextContinue]=\"triggerTextStart\"\n [triggerTextIgnore]=\"triggerTextIgnoreWarnings\"\n [callbackErrorsSubject]=\"caseEdit.callbackErrorsSubject\"\n (callbackErrorsContext)=\"callbackErrorsNotify($event)\">\n</ccd-callback-errors>\n<div class=\"width-50\">\n <form *ngIf=\"currentPage\" class=\"form\" [formGroup]=\"editForm\" (submit)=\"nextStep()\">\n <div id=\"fieldset-case-data\">\n <!-- single column -->\n <ccd-case-edit-form id='caseEditForm' *ngIf=\"!currentPage.isMultiColumn()\" [fields]=\"currentPage.getCol1Fields()\"\n [formGroup]=\"editForm.controls['data']\" [caseFields]=\"caseFields\"\n [pageChangeSubject]=\"pageChangeSubject\"\n (valuesChanged)=\"applyValuesChanged($event)\"></ccd-case-edit-form>\n <!-- two columns -->\n <div *ngIf=\"currentPage.isMultiColumn()\" class=\"grid-row\">\n <div class=\"column-two-thirds rightBorderSeparator\">\n <ccd-case-edit-form id='caseEditForm1' [fields]=\"currentPage.getCol1Fields()\"\n [formGroup]=\"editForm.controls['data']\" [caseFields]=\"caseFields\"></ccd-case-edit-form>\n </div>\n <div class=\"column-one-third\">\n <ccd-case-edit-form id='caseEditForm2' [fields]=\"currentPage.getCol2Fields()\"\n [formGroup]=\"editForm.controls['data']\" [caseFields]=\"caseFields\"></ccd-case-edit-form>\n </div>\n </div>\n </div>\n\n <div class=\"form-group form-group-related
|
|
13401
|
+
args: [{ selector: 'ccd-case-edit-page', standalone: false, template: "<ng-container *ngIf=\"eventTrigger\">\n <h1 *ngIf=\"!currentPage?.label\" class=\"govuk-heading-l\">{{eventTrigger.name | rpxTranslate}}</h1>\n <ng-container *ngIf=\"currentPage?.label\">\n <span class=\"govuk-caption-l\">{{ eventTrigger.name | rpxTranslate}}</span>\n <h1 class=\"govuk-heading-l\">{{currentPage.label | rpxTranslate}}</h1>\n </ng-container>\n</ng-container>\n\n<!--Case ID or Title -->\n<div *ngIf=\"getCaseTitle(); then titleBlock; else idBlock\"></div>\n<ng-template #titleBlock>\n <ccd-markdown [content]=\"demoteCaseTitleHeadingLevel(getCaseTitle() | ccdCaseTitle: caseFields : editForm.controls['data'] | rpxTranslate)\"></ccd-markdown>\n</ng-template>\n<ng-template #idBlock>\n <h2 *ngIf=\"getCaseId()\" class=\"heading-h2\">#{{ getCaseId() | ccdCaseReference }}</h2>\n</ng-template>\n\n<!-- Error message summary -->\n<div *ngIf=\"validationErrors.length > 0\" class=\"govuk-error-summary\" aria-labelledby=\"error-summary-title\" role=\"alert\" tabindex=\"-1\" data-module=\"govuk-error-summary\">\n <h2 class=\"govuk-error-summary__title\" id=\"error-summary-title\">\n {{'There is a problem' | rpxTranslate}}\n </h2>\n <div *ngFor=\"let validationError of validationErrors\" class=\"govuk-error-summary__body\">\n <ul class=\"govuk-list govuk-error-summary__list\">\n <li>\n <a (click)=\"navigateToErrorElement(validationError.id)\" (keyup.enter)=\"navigateToErrorElement(validationError.id)\" tabindex=\"0\" class=\"validation-error\">\n {{ validationError.message | rpxTranslate: getRpxTranslatePipeArgs(validationError.label | rpxTranslate): null }}\n </a>\n </li>\n </ul>\n </div>\n</div>\n\n<ccd-case-edit-generic-errors [error]=\"caseEdit.error\"></ccd-case-edit-generic-errors>\n\n<ccd-callback-errors\n [triggerTextContinue]=\"triggerTextStart\"\n [triggerTextIgnore]=\"triggerTextIgnoreWarnings\"\n [callbackErrorsSubject]=\"caseEdit.callbackErrorsSubject\"\n (callbackErrorsContext)=\"callbackErrorsNotify($event)\">\n</ccd-callback-errors>\n<div class=\"width-50\">\n <form *ngIf=\"currentPage\" class=\"form\" [formGroup]=\"editForm\" (submit)=\"nextStep()\">\n <div id=\"fieldset-case-data\">\n <!-- single column -->\n <ccd-case-edit-form id='caseEditForm' *ngIf=\"!currentPage.isMultiColumn()\" [fields]=\"currentPage.getCol1Fields()\"\n [formGroup]=\"editForm.controls['data']\" [caseFields]=\"caseFields\"\n [pageChangeSubject]=\"pageChangeSubject\"\n (valuesChanged)=\"applyValuesChanged($event)\"></ccd-case-edit-form>\n <!-- two columns -->\n <div *ngIf=\"currentPage.isMultiColumn()\" class=\"grid-row\">\n <div class=\"column-two-thirds rightBorderSeparator\">\n <ccd-case-edit-form id='caseEditForm1' [fields]=\"currentPage.getCol1Fields()\"\n [formGroup]=\"editForm.controls['data']\" [caseFields]=\"caseFields\"></ccd-case-edit-form>\n </div>\n <div class=\"column-one-third\">\n <ccd-case-edit-form id='caseEditForm2' [fields]=\"currentPage.getCol2Fields()\"\n [formGroup]=\"editForm.controls['data']\" [caseFields]=\"caseFields\"></ccd-case-edit-form>\n </div>\n </div>\n </div>\n\n <div class=\"form-group form-group-related\">\n <button class=\"button button-secondary\" type=\"button\" (click)=\"toPreviousPage()\" *ngIf=\"!isAtStart()\" [disabled]=\"isDisabled()\">\n {{'Previous' | rpxTranslate}}\n </button>\n <button class=\"button\" type=\"submit\" [disabled]=\"submitting()\">{{triggerText | rpxTranslate}}</button>\n </div>\n\n <p class=\"cancel\"><button type=\"button\" (click)=\"cancel()\" class=\"govuk-js-link\">{{getCancelText() | rpxTranslate}}</button></p>\n </form>\n</div>\n\n<ccd-case-event-completion *ngIf=\"caseEdit.isEventCompletionChecksRequired\"\n [eventCompletionParams]=\"caseEdit.eventCompletionParams\"\n (eventCanBeCompleted)=\"onEventCanBeCompleted($event)\">\n</ccd-case-event-completion>\n", styles: [".govuk-js-link{appearance:none;background:none;border:none;color:#005ea5;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0;text-decoration:underline}.govuk-js-link:hover{color:#2b8cc4;text-decoration-thickness:max(3px,.1875rem,.12em)}.govuk-js-link:focus{background-color:#ffbf47;color:#000;outline:3px solid transparent;text-decoration:none;box-shadow:0 -2px #ffbf47,0 4px #000}.govuk-js-link:visited{color:#4c2c92}.rightBorderSeparator{border-right-width:4px;border-right-color:#ffcc02;border-right-style:solid}.validation-error{cursor:pointer;text-decoration:underline;color:#d4351c}\n"] }]
|
|
13402
13402
|
}], () => [{ type: CaseEditComponent }, { type: i1$2.ActivatedRoute }, { type: FormValueService }, { type: FormErrorService }, { type: i0.ChangeDetectorRef }, { type: PageValidationService }, { type: i1$3.MatDialog }, { type: CaseFieldService }, { type: CaseEditDataService }, { type: LoadingService }, { type: ValidPageListCaseFieldsService }, { type: MultipageComponentStateService }, { type: AddressesService }, { type: LinkedCasesService }, { type: CaseFlagStateService }, { type: FocusService }], { caseEditFormComponents: [{
|
|
13403
13403
|
type: ViewChildren,
|
|
13404
13404
|
args: [CaseEditFormComponent]
|
|
@@ -14883,7 +14883,7 @@ class CaseFileViewFieldComponent {
|
|
|
14883
14883
|
}
|
|
14884
14884
|
setMediaViewerFile(document) {
|
|
14885
14885
|
const documentDetails = {
|
|
14886
|
-
document_binary_url: document
|
|
14886
|
+
document_binary_url: this.withLegacyDocumentAccessContext(this.documentManagementService.getDocumentBinaryUrl(document)),
|
|
14887
14887
|
document_filename: document.document_filename,
|
|
14888
14888
|
content_type: document.content_type
|
|
14889
14889
|
};
|
|
@@ -14898,6 +14898,19 @@ class CaseFileViewFieldComponent {
|
|
|
14898
14898
|
const mediaViewerInfo = this.documentManagementService.getMediaViewerInfo(documentDetails);
|
|
14899
14899
|
this.currentDocument = JSON.parse(mediaViewerInfo);
|
|
14900
14900
|
}
|
|
14901
|
+
withLegacyDocumentAccessContext(documentBinaryUrl) {
|
|
14902
|
+
if (!documentBinaryUrl || !this.caseId) {
|
|
14903
|
+
return documentBinaryUrl;
|
|
14904
|
+
}
|
|
14905
|
+
const [path, query = ''] = documentBinaryUrl.split('?');
|
|
14906
|
+
if (!/^\/documents\/[^/]+\/binary\/?$/.test(path)) {
|
|
14907
|
+
return documentBinaryUrl;
|
|
14908
|
+
}
|
|
14909
|
+
// XUI validates legacy document access against the case before proxying the binary request.
|
|
14910
|
+
const searchParams = new URLSearchParams(query);
|
|
14911
|
+
searchParams.set('caseId', this.caseId);
|
|
14912
|
+
return `${path}?${searchParams.toString()}`;
|
|
14913
|
+
}
|
|
14901
14914
|
moveDocument(data) {
|
|
14902
14915
|
const cid = this.route.snapshot.paramMap.get(CaseFileViewFieldComponent.PARAM_CASE_ID);
|
|
14903
14916
|
const loadingToken = this.loadingService.register();
|