@hmcts/ccd-case-ui-toolkit 4.9.16-wcag20-exui → 4.10.0-rc.2
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/RELEASE-NOTES.md +1 -9
- package/dist/index.umd.js +37 -42
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/dist/index.umd.min.js.LICENSE.txt +1 -1
- package/dist/index.umd.min.js.map +1 -1
- package/dist/shared/components/case-editor/case-edit-form/case-edit-form.component.js +1 -1
- package/dist/shared/components/case-editor/case-edit-form/case-edit-form.component.js.map +1 -1
- package/dist/shared/components/case-editor/case-edit-form/case-edit-form.component.metadata.json +1 -1
- package/dist/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts +1 -1
- package/dist/shared/components/case-editor/case-edit-page/case-edit-page.component.js +11 -19
- package/dist/shared/components/case-editor/case-edit-page/case-edit-page.component.js.map +1 -1
- package/dist/shared/components/case-editor/case-edit-submit/case-edit-submit.component.js.map +1 -1
- package/dist/shared/components/case-editor/services/page-validation.service.d.ts +1 -1
- package/dist/shared/components/case-editor/services/page-validation.service.js +2 -5
- package/dist/shared/components/case-editor/services/page-validation.service.js.map +1 -1
- package/dist/shared/components/markdown/markdown.component.js +1 -1
- package/dist/shared/components/markdown/markdown.component.js.map +1 -1
- package/dist/shared/components/markdown/markdown.component.metadata.json +1 -1
- package/dist/shared/components/markdown/markdown.module.js +1 -3
- package/dist/shared/components/markdown/markdown.module.js.map +1 -1
- package/dist/shared/components/markdown/markdown.module.metadata.json +1 -1
- package/dist/shared/components/palette/complex/write-complex-field.component.js +1 -1
- package/dist/shared/components/palette/complex/write-complex-field.component.js.map +1 -1
- package/dist/shared/components/palette/complex/write-complex-field.component.metadata.json +1 -1
- package/dist/shared/components/palette/utils/is-compound.pipe.js +4 -1
- package/dist/shared/components/palette/utils/is-compound.pipe.js.map +1 -1
- package/dist/shared/pipes/case-reference/case-reference.pipe.js +1 -1
- package/dist/shared/pipes/case-reference/case-reference.pipe.js.map +1 -1
- package/dist/shared/services/fields/fields.utils.d.ts +1 -0
- package/dist/shared/services/fields/fields.utils.js +14 -9
- package/dist/shared/services/fields/fields.utils.js.map +1 -1
- package/package.json +1 -1
package/RELEASE-NOTES.md
CHANGED
|
@@ -3,15 +3,9 @@
|
|
|
3
3
|
### Version 4.12.0
|
|
4
4
|
Add refunds functionality
|
|
5
5
|
|
|
6
|
-
### Version 4.9.16-wcag20-exui"
|
|
7
|
-
**FPLA: Accessibility Issues Found in ExUI** FPLA: Accessibility Issues Found in ExUI
|
|
8
|
-
|
|
9
6
|
### Version 4.9.15-state-machine"
|
|
10
7
|
**Task event completion and state machine** Task event completion and state machine
|
|
11
8
|
|
|
12
|
-
### Version 4.3.9-markdown-case-ref-EUI-3650
|
|
13
|
-
**EUI-3650** Added formatting for case reference inside markdown
|
|
14
|
-
|
|
15
9
|
### Version 4.7.6-tab-not-defined-error"
|
|
16
10
|
**EUI-4562** Case details Active tasks tab on success not returning to active tasks page
|
|
17
11
|
|
|
@@ -22,9 +16,7 @@ Add refunds functionality
|
|
|
22
16
|
**EUI-4562** Case details Active tasks tab on success not returning to active tasks page
|
|
23
17
|
|
|
24
18
|
### Version 4.7.6-hearings-tab
|
|
25
|
-
**EUI-4441** Add hearings tab in case details
|
|
26
|
-
|
|
27
|
-
### Version 4.7.6-hearings-tab
|
|
19
|
+
**EUI-4441** Add hearings tab in case details
|
|
28
20
|
**EUI-4441** Add hearings tab in case details
|
|
29
21
|
**EUI-4627** Can't access /hearings tab from URL
|
|
30
22
|
|
package/dist/index.umd.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @hmcts/ccd-case-ui-toolkit - Case UI Toolkit
|
|
3
|
-
* @version v4.
|
|
3
|
+
* @version v4.10.0-rc.2
|
|
4
4
|
* @link undefined
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -19090,55 +19090,47 @@ var CaseEditPageComponent = /** @class */ (function () {
|
|
|
19090
19090
|
CaseEditPageComponent_1.setFocusToTop();
|
|
19091
19091
|
};
|
|
19092
19092
|
// Adding validation message to show it as Error Summary
|
|
19093
|
-
CaseEditPageComponent.prototype.generateErrorMessage = function (fields, container
|
|
19093
|
+
CaseEditPageComponent.prototype.generateErrorMessage = function (fields, container) {
|
|
19094
19094
|
var _this = this;
|
|
19095
19095
|
var group = container || this.editForm.controls['data'];
|
|
19096
19096
|
fields.filter(function (casefield) { return !_this.caseFieldService.isReadOnly(casefield); })
|
|
19097
|
-
.filter(function (casefield) { return !_this.pageValidationService.isHidden(casefield, _this.editForm
|
|
19097
|
+
.filter(function (casefield) { return !_this.pageValidationService.isHidden(casefield, _this.editForm); })
|
|
19098
19098
|
.forEach(function (casefield) {
|
|
19099
19099
|
var fieldElement = group.get(casefield.id);
|
|
19100
19100
|
if (fieldElement) {
|
|
19101
19101
|
var label = casefield.label || 'Field';
|
|
19102
|
-
var
|
|
19102
|
+
var id = casefield.id;
|
|
19103
19103
|
if (fieldElement['component'] && fieldElement['component'].parent) {
|
|
19104
|
-
|
|
19105
|
-
id_1 = "" + fieldElement['component'].idPrefix + id_1;
|
|
19106
|
-
}
|
|
19107
|
-
else {
|
|
19108
|
-
id_1 = "" + fieldElement['component'].idPrefix;
|
|
19109
|
-
}
|
|
19104
|
+
id = "" + fieldElement['component'].idPrefix + id;
|
|
19110
19105
|
}
|
|
19111
19106
|
if (fieldElement.hasError('required')) {
|
|
19112
|
-
_this.validationErrors.push({ id:
|
|
19107
|
+
_this.validationErrors.push({ id: id, message: label + " is required" });
|
|
19113
19108
|
fieldElement.markAsDirty();
|
|
19114
19109
|
}
|
|
19115
19110
|
else if (fieldElement.hasError('pattern')) {
|
|
19116
|
-
_this.validationErrors.push({ id:
|
|
19111
|
+
_this.validationErrors.push({ id: id, message: label + " is not valid" });
|
|
19117
19112
|
fieldElement.markAsDirty();
|
|
19118
19113
|
}
|
|
19119
19114
|
else if (fieldElement.hasError('minlength')) {
|
|
19120
|
-
_this.validationErrors.push({ id:
|
|
19115
|
+
_this.validationErrors.push({ id: id, message: label + " is below the minimum length" });
|
|
19121
19116
|
fieldElement.markAsDirty();
|
|
19122
19117
|
}
|
|
19123
19118
|
else if (fieldElement.hasError('maxlength')) {
|
|
19124
|
-
_this.validationErrors.push({ id:
|
|
19119
|
+
_this.validationErrors.push({ id: id, message: label + " exceeds the maximum length" });
|
|
19125
19120
|
fieldElement.markAsDirty();
|
|
19126
19121
|
}
|
|
19127
19122
|
else if (fieldElement.invalid) {
|
|
19128
19123
|
if (casefield.isComplex()) {
|
|
19129
|
-
_this.generateErrorMessage(casefield.field_type.complex_fields, fieldElement
|
|
19124
|
+
_this.generateErrorMessage(casefield.field_type.complex_fields, fieldElement);
|
|
19130
19125
|
}
|
|
19131
19126
|
else if (casefield.isCollection() && casefield.field_type.collection_field_type.type === 'Complex') {
|
|
19132
19127
|
var fieldArray = fieldElement;
|
|
19133
|
-
if (fieldArray['component'] && fieldArray['component']['collItems'] && fieldArray['component']['collItems'].length > 0) {
|
|
19134
|
-
id_1 = "" + fieldArray['component']['collItems'][0].prefix;
|
|
19135
|
-
}
|
|
19136
19128
|
fieldArray.controls.forEach(function (c) {
|
|
19137
|
-
_this.generateErrorMessage(casefield.field_type.collection_field_type.complex_fields, c.get('value')
|
|
19129
|
+
_this.generateErrorMessage(casefield.field_type.collection_field_type.complex_fields, c.get('value'));
|
|
19138
19130
|
});
|
|
19139
19131
|
}
|
|
19140
19132
|
else {
|
|
19141
|
-
_this.validationErrors.push({ id:
|
|
19133
|
+
_this.validationErrors.push({ id: id, message: "Select or fill the required " + casefield.label + " field" });
|
|
19142
19134
|
fieldElement.markAsDirty();
|
|
19143
19135
|
}
|
|
19144
19136
|
}
|
|
@@ -21651,13 +21643,10 @@ var PageValidationService = /** @class */ (function () {
|
|
|
21651
21643
|
}
|
|
21652
21644
|
return !(this.checkMandatoryField(caseField, theControl));
|
|
21653
21645
|
};
|
|
21654
|
-
PageValidationService.prototype.isHidden = function (caseField, editForm
|
|
21646
|
+
PageValidationService.prototype.isHidden = function (caseField, editForm) {
|
|
21655
21647
|
var formFields = editForm.getRawValue();
|
|
21656
21648
|
var condition = conditional_show_model_1.ShowCondition.getInstance(caseField.show_condition);
|
|
21657
|
-
|
|
21658
|
-
path = "" + path + caseField.id;
|
|
21659
|
-
}
|
|
21660
|
-
return !condition.match(formFields.data, path);
|
|
21649
|
+
return !condition.match(formFields.data);
|
|
21661
21650
|
};
|
|
21662
21651
|
PageValidationService.prototype.checkOptionalField = function (caseField, theControl) {
|
|
21663
21652
|
if (!theControl) {
|
|
@@ -26959,7 +26948,6 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
26959
26948
|
var core_1 = __webpack_require__(57208);
|
|
26960
26949
|
var markdown_component_1 = __webpack_require__(86843);
|
|
26961
26950
|
var ngx_md_1 = __webpack_require__(99978);
|
|
26962
|
-
var pipes_1 = __webpack_require__(32741);
|
|
26963
26951
|
exports.forRoot = ngx_md_1.NgxMdModule.forRoot();
|
|
26964
26952
|
var MarkdownModule = /** @class */ (function () {
|
|
26965
26953
|
function MarkdownModule() {
|
|
@@ -26967,8 +26955,7 @@ var MarkdownModule = /** @class */ (function () {
|
|
|
26967
26955
|
MarkdownModule = __decorate([
|
|
26968
26956
|
core_1.NgModule({
|
|
26969
26957
|
imports: [
|
|
26970
|
-
exports.forRoot
|
|
26971
|
-
pipes_1.PipesModule
|
|
26958
|
+
exports.forRoot
|
|
26972
26959
|
],
|
|
26973
26960
|
declarations: [
|
|
26974
26961
|
markdown_component_1.MarkdownComponent
|
|
@@ -34982,7 +34969,10 @@ var IsCompoundPipe = /** @class */ (function () {
|
|
|
34982
34969
|
return false;
|
|
34983
34970
|
}
|
|
34984
34971
|
if (IsCompoundPipe_1.COMPOUND_TYPES.indexOf(field.field_type.type) !== -1) {
|
|
34985
|
-
|
|
34972
|
+
if (IsCompoundPipe_1.EXCLUDE.indexOf(field.field_type.id) !== -1) {
|
|
34973
|
+
return false;
|
|
34974
|
+
}
|
|
34975
|
+
return true;
|
|
34986
34976
|
}
|
|
34987
34977
|
return false;
|
|
34988
34978
|
};
|
|
@@ -39988,7 +39978,7 @@ var CaseReferencePipe = /** @class */ (function () {
|
|
|
39988
39978
|
return draft_model_1.DRAFT_PREFIX;
|
|
39989
39979
|
}
|
|
39990
39980
|
else {
|
|
39991
|
-
return String(caseReference).replace(/(
|
|
39981
|
+
return String(caseReference).replace(/(\d{4})(\d{4})(\d{4})(\d{4})/, '$1-$2-$3-$4');
|
|
39992
39982
|
}
|
|
39993
39983
|
};
|
|
39994
39984
|
CaseReferencePipe = __decorate([
|
|
@@ -42265,11 +42255,11 @@ var FieldsUtils = /** @class */ (function () {
|
|
|
42265
42255
|
if (isDynamicField) {
|
|
42266
42256
|
var dynamicListValue = _this.getDynamicListValue(rootCaseField.value, field.id);
|
|
42267
42257
|
if (dynamicListValue) {
|
|
42268
|
-
var list_items = dynamicListValue.list_items;
|
|
42269
|
-
var complexValue = dynamicListValue.value;
|
|
42258
|
+
var list_items = dynamicListValue[0].list_items;
|
|
42259
|
+
var complexValue = dynamicListValue.map(function (data) { return data.value; });
|
|
42270
42260
|
var value = {
|
|
42271
42261
|
list_items: list_items,
|
|
42272
|
-
value: complexValue ? complexValue : undefined
|
|
42262
|
+
value: complexValue.length > 0 ? complexValue : undefined
|
|
42273
42263
|
};
|
|
42274
42264
|
field.value = __assign({}, value);
|
|
42275
42265
|
field.formatted_value = __assign({}, field.formatted_value, value);
|
|
@@ -42291,17 +42281,22 @@ var FieldsUtils = /** @class */ (function () {
|
|
|
42291
42281
|
}
|
|
42292
42282
|
};
|
|
42293
42283
|
FieldsUtils.getDynamicListValue = function (jsonBlock, key) {
|
|
42294
|
-
|
|
42295
|
-
|
|
42284
|
+
var data = jsonBlock ? this.getNestedFieldValues(jsonBlock, key, []) : [];
|
|
42285
|
+
return data.length > 0 ? data : null;
|
|
42286
|
+
};
|
|
42287
|
+
FieldsUtils.getNestedFieldValues = function (jsonData, key, output) {
|
|
42288
|
+
if (output === void 0) { output = []; }
|
|
42289
|
+
if (jsonData && jsonData[key]) {
|
|
42290
|
+
output.push(jsonData[key]);
|
|
42296
42291
|
}
|
|
42297
42292
|
else {
|
|
42298
|
-
for (var elementKey in
|
|
42299
|
-
if (typeof
|
|
42300
|
-
|
|
42293
|
+
for (var elementKey in jsonData) {
|
|
42294
|
+
if (typeof jsonData === 'object' && jsonData.hasOwnProperty(elementKey)) {
|
|
42295
|
+
this.getNestedFieldValues(jsonData[elementKey], key, output);
|
|
42301
42296
|
}
|
|
42302
42297
|
}
|
|
42303
42298
|
}
|
|
42304
|
-
return
|
|
42299
|
+
return output;
|
|
42305
42300
|
};
|
|
42306
42301
|
FieldsUtils.prototype.buildCanShowPredicate = function (eventTrigger, form) {
|
|
42307
42302
|
var currentState = this.getCurrentEventState(eventTrigger, form);
|
|
@@ -89137,7 +89132,7 @@ module.exports = "<!-- Current Page && Event trigger name -->\n<h1 class=\"headi
|
|
|
89137
89132
|
/***/ 3808:
|
|
89138
89133
|
/***/ ((module) => {
|
|
89139
89134
|
|
|
89140
|
-
module.exports = "<ng-container ccdConditionalShowForm [formGroup]=\"formGroup\" [caseFields]=\"fields\" [contextFields]=\"caseFields\"
|
|
89135
|
+
module.exports = "<ng-container ccdConditionalShowForm [formGroup]=\"formGroup\" [caseFields]=\"fields\" [contextFields]=\"caseFields\"\n *ngFor=\"let field of fields\">\n <div ccdLabelSubstitutor\n [caseField]=\"field\" [formGroup]=\"formGroup\" [contextFields]=\"caseFields\">\n <ng-container [ngSwitch]=\"field | ccdIsReadOnlyAndNotCollection \">\n <ccd-field-read *ngSwitchCase=\"true\" [caseField]=\"field\" [caseFields]=\"caseFields\" [withLabel]=\"true\"\n [formGroup]=\"formGroup\"></ccd-field-read>\n <ng-container *ngSwitchCase=\"false\">\n <ng-container *ngIf=\"!(field | ccdIsCompound); else CompoundRow\">\n <ccd-field-write [caseField]=\"field\"\n [caseFields]=\"caseFields\"\n [formGroup]=\"formGroup\"\n [idPrefix]=\"\"\n [hidden]=\"field.hidden\">\n </ccd-field-write>\n </ng-container>\n <ng-template #CompoundRow>\n <ccd-field-write [caseField]=\"field\"\n [caseFields]=\"caseFields\"\n [formGroup]=\"formGroup\"\n [idPrefix]=\"field.id + '_'\"\n [hidden]=\"field.hidden\"></ccd-field-write>\n </ng-template>\n </ng-container>\n </ng-container>\n </div>\n</ng-container>\n"
|
|
89141
89136
|
|
|
89142
89137
|
/***/ }),
|
|
89143
89138
|
|
|
@@ -89417,7 +89412,7 @@ module.exports = "<div class=\"spinner-container\">\n <div class=\"spinner-in
|
|
|
89417
89412
|
/***/ 6961:
|
|
89418
89413
|
/***/ ((module) => {
|
|
89419
89414
|
|
|
89420
|
-
module.exports = "<div><markdown class=\"markdown\" [innerHTML]=\"content
|
|
89415
|
+
module.exports = "<div><markdown class=\"markdown\" [innerHTML]=\"content\"></markdown></div>"
|
|
89421
89416
|
|
|
89422
89417
|
/***/ }),
|
|
89423
89418
|
|
|
@@ -89515,7 +89510,7 @@ module.exports = "<ng-container [ngSwitch]=\"context\">\n <ccd-read-complex-fie
|
|
|
89515
89510
|
/***/ 93616:
|
|
89516
89511
|
/***/ ((module) => {
|
|
89517
89512
|
|
|
89518
|
-
module.exports = "<div class=\"form-group\" [id]=\"id()\">\n\n <h2 *ngIf=\"renderLabel\" class=\"heading-h2\">{{caseField | ccdFieldLabel}}</h2>\n <
|
|
89513
|
+
module.exports = "<div class=\"form-group\" [id]=\"id()\">\n\n <h2 *ngIf=\"renderLabel\" class=\"heading-h2\">{{caseField | ccdFieldLabel}}</h2>\n <ng-container *ngFor=\"let field of complexFields\">\n <ng-container [ngSwitch]=\"field | ccdIsReadOnly\">\n <ccd-field-read *ngSwitchCase=\"true\"\n ccdLabelSubstitutor\n [caseField]=\"buildField(field)\"\n [caseFields]=\"caseFields\"\n [formGroup]=\"formGroup\"\n [withLabel]=\"true\">\n </ccd-field-read>\n <ccd-field-write *ngSwitchCase=\"false\"\n ccdLabelSubstitutor\n [caseField]=\"field\"\n [caseFields]=\"caseFields\"\n [formGroup]=\"formGroup\"\n [parent]=\"complexGroup\"\n [idPrefix]=\"buildIdPrefix(field)\"\n [hidden]=\"field.hidden\"\n [isExpanded]=\"isExpanded\"\n [isInSearchBlock]=\"isInSearchBlock\">\n </ccd-field-write>\n </ng-container>\n </ng-container>\n</div>\n"
|
|
89519
89514
|
|
|
89520
89515
|
/***/ }),
|
|
89521
89516
|
|