@hmcts/ccd-case-ui-toolkit 6.16.1-st-cdam-docstore-3 → 6.16.2-a-ccpay-upgrade
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/bundles/hmcts-ccd-case-ui-toolkit.umd.js +209 -95
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.js.map +1 -1
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js +1 -1
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js.map +1 -1
- package/esm2015/lib/app.config.js +7 -1
- package/esm2015/lib/shared/components/case-editor/case-edit/case-edit.component.js +12 -14
- package/esm2015/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.js +2 -1
- package/esm2015/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.js +19 -17
- package/esm2015/lib/shared/components/palette/base-field/field-read-label.component.js +1 -1
- package/esm2015/lib/shared/components/palette/base-field/field-write.component.js +1 -1
- package/esm2015/lib/shared/components/palette/dynamic-radio-list/write-dynamic-radio-list-field.component.js +2 -3
- package/esm2015/lib/shared/directives/conditional-show/conditional-show-form.directive.js +2 -2
- package/esm2015/lib/shared/directives/conditional-show/services/condition-parser.service.js +4 -1
- package/esm2015/lib/shared/services/fields/fields.utils.js +22 -1
- package/esm2015/lib/shared/services/form/form-value.service.js +37 -43
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js +100 -76
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
- package/lib/app.config.d.ts +2 -2
- package/lib/app.config.d.ts.map +1 -1
- package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts.map +1 -1
- package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts.map +1 -1
- package/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.d.ts.map +1 -1
- package/lib/shared/components/palette/dynamic-radio-list/write-dynamic-radio-list-field.component.d.ts.map +1 -1
- package/lib/shared/directives/conditional-show/services/condition-parser.service.d.ts.map +1 -1
- package/lib/shared/services/fields/fields.utils.d.ts +16 -0
- package/lib/shared/services/fields/fields.utils.d.ts.map +1 -1
- package/lib/shared/services/form/form-value.service.d.ts +14 -13
- package/lib/shared/services/form/form-value.service.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -481,7 +481,7 @@
|
|
|
481
481
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
482
482
|
PERFORMANCE OF THIS SOFTWARE.
|
|
483
483
|
***************************************************************************** */
|
|
484
|
-
/* global Reflect, Promise */
|
|
484
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
485
485
|
var extendStatics = function (d, b) {
|
|
486
486
|
extendStatics = Object.setPrototypeOf ||
|
|
487
487
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -560,11 +560,11 @@
|
|
|
560
560
|
if (_ = accept(result.set))
|
|
561
561
|
descriptor.set = _;
|
|
562
562
|
if (_ = accept(result.init))
|
|
563
|
-
initializers.
|
|
563
|
+
initializers.unshift(_);
|
|
564
564
|
}
|
|
565
565
|
else if (_ = accept(result)) {
|
|
566
566
|
if (kind === "field")
|
|
567
|
-
initializers.
|
|
567
|
+
initializers.unshift(_);
|
|
568
568
|
else
|
|
569
569
|
descriptor[key] = _;
|
|
570
570
|
}
|
|
@@ -851,6 +851,85 @@
|
|
|
851
851
|
throw new TypeError("Cannot use 'in' operator on non-object");
|
|
852
852
|
return typeof state === "function" ? receiver === state : state.has(receiver);
|
|
853
853
|
}
|
|
854
|
+
function __addDisposableResource(env, value, async) {
|
|
855
|
+
if (value !== null && value !== void 0) {
|
|
856
|
+
if (typeof value !== "object")
|
|
857
|
+
throw new TypeError("Object expected.");
|
|
858
|
+
var dispose;
|
|
859
|
+
if (async) {
|
|
860
|
+
if (!Symbol.asyncDispose)
|
|
861
|
+
throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
862
|
+
dispose = value[Symbol.asyncDispose];
|
|
863
|
+
}
|
|
864
|
+
if (dispose === void 0) {
|
|
865
|
+
if (!Symbol.dispose)
|
|
866
|
+
throw new TypeError("Symbol.dispose is not defined.");
|
|
867
|
+
dispose = value[Symbol.dispose];
|
|
868
|
+
}
|
|
869
|
+
if (typeof dispose !== "function")
|
|
870
|
+
throw new TypeError("Object not disposable.");
|
|
871
|
+
env.stack.push({ value: value, dispose: dispose, async: async });
|
|
872
|
+
}
|
|
873
|
+
else if (async) {
|
|
874
|
+
env.stack.push({ async: true });
|
|
875
|
+
}
|
|
876
|
+
return value;
|
|
877
|
+
}
|
|
878
|
+
var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
879
|
+
var e = new Error(message);
|
|
880
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
881
|
+
};
|
|
882
|
+
function __disposeResources(env) {
|
|
883
|
+
function fail(e) {
|
|
884
|
+
env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
|
|
885
|
+
env.hasError = true;
|
|
886
|
+
}
|
|
887
|
+
function next() {
|
|
888
|
+
while (env.stack.length) {
|
|
889
|
+
var rec = env.stack.pop();
|
|
890
|
+
try {
|
|
891
|
+
var result = rec.dispose && rec.dispose.call(rec.value);
|
|
892
|
+
if (rec.async)
|
|
893
|
+
return Promise.resolve(result).then(next, function (e) { fail(e); return next(); });
|
|
894
|
+
}
|
|
895
|
+
catch (e) {
|
|
896
|
+
fail(e);
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
if (env.hasError)
|
|
900
|
+
throw env.error;
|
|
901
|
+
}
|
|
902
|
+
return next();
|
|
903
|
+
}
|
|
904
|
+
var tslib_es6 = {
|
|
905
|
+
__extends: __extends,
|
|
906
|
+
__assign: __assign,
|
|
907
|
+
__rest: __rest,
|
|
908
|
+
__decorate: __decorate,
|
|
909
|
+
__param: __param,
|
|
910
|
+
__metadata: __metadata,
|
|
911
|
+
__awaiter: __awaiter,
|
|
912
|
+
__generator: __generator,
|
|
913
|
+
__createBinding: __createBinding,
|
|
914
|
+
__exportStar: __exportStar,
|
|
915
|
+
__values: __values,
|
|
916
|
+
__read: __read,
|
|
917
|
+
__spread: __spread,
|
|
918
|
+
__spreadArrays: __spreadArrays,
|
|
919
|
+
__spreadArray: __spreadArray,
|
|
920
|
+
__await: __await,
|
|
921
|
+
__asyncGenerator: __asyncGenerator,
|
|
922
|
+
__asyncDelegator: __asyncDelegator,
|
|
923
|
+
__asyncValues: __asyncValues,
|
|
924
|
+
__makeTemplateObject: __makeTemplateObject,
|
|
925
|
+
__importStar: __importStar,
|
|
926
|
+
__importDefault: __importDefault,
|
|
927
|
+
__classPrivateFieldGet: __classPrivateFieldGet,
|
|
928
|
+
__classPrivateFieldSet: __classPrivateFieldSet,
|
|
929
|
+
__classPrivateFieldIn: __classPrivateFieldIn,
|
|
930
|
+
__addDisposableResource: __addDisposableResource,
|
|
931
|
+
__disposeResources: __disposeResources,
|
|
932
|
+
};
|
|
854
933
|
|
|
855
934
|
var _c0$X = function (a0) { return { "govuk-input--error": a0 }; };
|
|
856
935
|
function DateInputComponent_div_16_Template(rf, ctx) {
|
|
@@ -1834,6 +1913,12 @@
|
|
|
1834
1913
|
var AbstractAppConfig = /** @class */ (function () {
|
|
1835
1914
|
function AbstractAppConfig() {
|
|
1836
1915
|
}
|
|
1916
|
+
AbstractAppConfig.prototype.getDocumentManagementUrlV2 = function () {
|
|
1917
|
+
return undefined;
|
|
1918
|
+
};
|
|
1919
|
+
AbstractAppConfig.prototype.getDocumentSecureMode = function () {
|
|
1920
|
+
return undefined;
|
|
1921
|
+
};
|
|
1837
1922
|
/**
|
|
1838
1923
|
* Dummy version replacing deprecated `getRemotePrintServiceUrl()`, to be removed in next major release
|
|
1839
1924
|
* @deprecated
|
|
@@ -4118,18 +4203,39 @@
|
|
|
4118
4203
|
}
|
|
4119
4204
|
return this.isFlagsFieldType(caseField.field_type);
|
|
4120
4205
|
};
|
|
4206
|
+
/**
|
|
4207
|
+
* @deprecated Use {@link isCaseFieldOfType} instead, passing 'FlagLauncher' as the single type in the `types` array
|
|
4208
|
+
*/
|
|
4121
4209
|
FieldsUtils.isFlagLauncherCaseField = function (caseField) {
|
|
4122
4210
|
if (!caseField) {
|
|
4123
4211
|
return false;
|
|
4124
4212
|
}
|
|
4125
4213
|
return caseField.field_type.type === 'FlagLauncher';
|
|
4126
4214
|
};
|
|
4215
|
+
/**
|
|
4216
|
+
* @deprecated Use {@link isCaseFieldOfType} instead, passing 'ComponentLauncher' as the single type in the `types`
|
|
4217
|
+
* array
|
|
4218
|
+
*/
|
|
4127
4219
|
FieldsUtils.isComponentLauncherCaseField = function (caseField) {
|
|
4128
4220
|
if (!caseField) {
|
|
4129
4221
|
return false;
|
|
4130
4222
|
}
|
|
4131
4223
|
return caseField.field_type.type === 'ComponentLauncher';
|
|
4132
4224
|
};
|
|
4225
|
+
/**
|
|
4226
|
+
* Checks if a {@link CaseField} is of one of the given field types.
|
|
4227
|
+
*
|
|
4228
|
+
* @param caseField The `CaseField` to check
|
|
4229
|
+
* @param types An array of one or more field types
|
|
4230
|
+
* @returns `true` if the `CaseField` type is one of those in the array of types to check against; `false`
|
|
4231
|
+
* otherwise or if `caseField` or `types` are falsy
|
|
4232
|
+
*/
|
|
4233
|
+
FieldsUtils.isCaseFieldOfType = function (caseField, types) {
|
|
4234
|
+
if (!caseField || !types) {
|
|
4235
|
+
return false;
|
|
4236
|
+
}
|
|
4237
|
+
return types.some(function (type) { return type === caseField.field_type.type; });
|
|
4238
|
+
};
|
|
4133
4239
|
FieldsUtils.isLinkedCasesCaseField = function (caseField) {
|
|
4134
4240
|
return FieldsUtils.isComponentLauncherCaseField(caseField) &&
|
|
4135
4241
|
caseField.id === 'LinkedCasesComponentLauncher';
|
|
@@ -4645,6 +4751,9 @@
|
|
|
4645
4751
|
var _a = __read(path.split(/[_]+/g)), _ = _a[0], pathTail = _a.slice(1);
|
|
4646
4752
|
return this.findValueForComplexCondition(fields[head], tail[0], tail.slice(1), pathTail.join('_'));
|
|
4647
4753
|
}
|
|
4754
|
+
else if (!fields[head]) {
|
|
4755
|
+
return this.findValueForComplexCondition(fields, tail[0], tail.slice(1), path);
|
|
4756
|
+
}
|
|
4648
4757
|
else {
|
|
4649
4758
|
return this.findValueForComplexCondition(fields[head], tail[0], tail.slice(1), path);
|
|
4650
4759
|
}
|
|
@@ -5200,7 +5309,7 @@
|
|
|
5200
5309
|
if (cf.hidden === true && !control.disabled) {
|
|
5201
5310
|
control.disable({ emitEvent: false });
|
|
5202
5311
|
}
|
|
5203
|
-
else if (cf.hidden !== true
|
|
5312
|
+
else if (cf.hidden !== true) {
|
|
5204
5313
|
control.enable({ emitEvent: false });
|
|
5205
5314
|
}
|
|
5206
5315
|
}
|
|
@@ -6314,65 +6423,70 @@
|
|
|
6314
6423
|
}
|
|
6315
6424
|
};
|
|
6316
6425
|
/**
|
|
6317
|
-
* Remove the
|
|
6426
|
+
* Remove from the top level of the form data any case fields of a given type or types that are not intended to be
|
|
6427
|
+
* persisted. This function is intended to remove "special" case field types from the data, such as FlagLauncher or
|
|
6428
|
+
* ComponentLauncher fields.
|
|
6318
6429
|
*
|
|
6319
|
-
* @param data The object tree of form values on which to perform the removal
|
|
6430
|
+
* @param data The object tree of form values on which to perform the removal at the top level only
|
|
6320
6431
|
* @param caseFields The list of underlying {@link CaseField} domain model objects for each field
|
|
6432
|
+
* @param types An array of one or more field types
|
|
6321
6433
|
*/
|
|
6322
|
-
FormValueService.prototype.
|
|
6323
|
-
|
|
6324
|
-
|
|
6325
|
-
|
|
6326
|
-
|
|
6327
|
-
|
|
6434
|
+
FormValueService.prototype.removeCaseFieldsOfType = function (data, caseFields, types) {
|
|
6435
|
+
var e_12, _a;
|
|
6436
|
+
if (data && caseFields && caseFields.length > 0 && types.length > 0) {
|
|
6437
|
+
var caseFieldsToRemove = caseFields.filter(function (caseField) { return FieldsUtils.isCaseFieldOfType(caseField, types); });
|
|
6438
|
+
try {
|
|
6439
|
+
for (var caseFieldsToRemove_1 = __values(caseFieldsToRemove), caseFieldsToRemove_1_1 = caseFieldsToRemove_1.next(); !caseFieldsToRemove_1_1.done; caseFieldsToRemove_1_1 = caseFieldsToRemove_1.next()) {
|
|
6440
|
+
var caseField = caseFieldsToRemove_1_1.value;
|
|
6441
|
+
delete data[caseField.id];
|
|
6442
|
+
}
|
|
6443
|
+
}
|
|
6444
|
+
catch (e_12_1) { e_12 = { error: e_12_1 }; }
|
|
6445
|
+
finally {
|
|
6446
|
+
try {
|
|
6447
|
+
if (caseFieldsToRemove_1_1 && !caseFieldsToRemove_1_1.done && (_a = caseFieldsToRemove_1.return)) _a.call(caseFieldsToRemove_1);
|
|
6448
|
+
}
|
|
6449
|
+
finally { if (e_12) throw e_12.error; }
|
|
6328
6450
|
}
|
|
6329
6451
|
}
|
|
6330
6452
|
};
|
|
6331
6453
|
/**
|
|
6332
|
-
*
|
|
6454
|
+
* Re-populate the form data from the values held in the case fields. This is necessary in order to pick up, for
|
|
6455
|
+
* each `Flags` field, any flag details data not currently present.
|
|
6456
|
+
*
|
|
6457
|
+
* `Flags` fields may be contained in other `CaseField` instances, either as a sub-field of a Complex field, or
|
|
6458
|
+
* fields in a collection (or sub-fields of Complex fields in a collection). Therefore, it is necessary to
|
|
6459
|
+
* iterate through all `CaseField`s.
|
|
6333
6460
|
*
|
|
6334
6461
|
* @param data The object tree of form values on which to perform the data population
|
|
6335
6462
|
* @param caseFields The list of underlying {@link CaseField} domain model objects for each field
|
|
6336
6463
|
*/
|
|
6337
|
-
FormValueService.prototype.
|
|
6338
|
-
if (data && caseFields && caseFields.length > 0
|
|
6339
|
-
|
|
6340
|
-
//
|
|
6341
|
-
|
|
6342
|
-
caseFields.filter(function (caseField) { return !FieldsUtils.isFlagLauncherCaseField(caseField); })
|
|
6464
|
+
FormValueService.prototype.repopulateFormDataFromCaseFieldValues = function (data, caseFields) {
|
|
6465
|
+
if (data && caseFields && caseFields.length > 0 &&
|
|
6466
|
+
caseFields.findIndex(function (caseField) { return FieldsUtils.isCaseFieldOfType(caseField, ['FlagLauncher']); }) > -1) {
|
|
6467
|
+
// Ignore the FlagLauncher CaseField because it does not hold any values
|
|
6468
|
+
caseFields.filter(function (caseField) { return !FieldsUtils.isCaseFieldOfType(caseField, ['FlagLauncher']); })
|
|
6343
6469
|
.forEach(function (caseField) {
|
|
6344
|
-
// Ensure that the data object is populated for all
|
|
6345
|
-
//
|
|
6470
|
+
// Ensure that the data object is populated for all CaseField keys it contains, even if for a given
|
|
6471
|
+
// CaseField key, the data object has a falsy value (hence the use of hasOwnProperty() for the check below)
|
|
6472
|
+
// See https://tools.hmcts.net/jira/browse/EUI-7377
|
|
6346
6473
|
if (data.hasOwnProperty(caseField.id) && caseField.value) {
|
|
6347
|
-
// Create new object for the
|
|
6348
|
-
|
|
6349
|
-
|
|
6350
|
-
|
|
6351
|
-
Object.keys(data[caseField.id]).forEach(function (key) {
|
|
6352
|
-
if (caseField.value.hasOwnProperty(key)) {
|
|
6353
|
-
data[caseField.id][key] = caseField.value[key];
|
|
6354
|
-
}
|
|
6355
|
-
});
|
|
6474
|
+
// Create new object for the CaseField ID within the data object, if necessary (i.e. if the current value
|
|
6475
|
+
// is falsy)
|
|
6476
|
+
if (!data[caseField.id]) {
|
|
6477
|
+
data[caseField.id] = {};
|
|
6356
6478
|
}
|
|
6479
|
+
// Copy all values from the corresponding CaseField; this ensures all nested flag data (for example, a
|
|
6480
|
+
// Flags field within a Complex field or a collection of Complex fields) is copied across
|
|
6481
|
+
Object.keys(data[caseField.id]).forEach(function (key) {
|
|
6482
|
+
if (caseField.value.hasOwnProperty(key)) {
|
|
6483
|
+
data[caseField.id][key] = caseField.value[key];
|
|
6484
|
+
}
|
|
6485
|
+
});
|
|
6357
6486
|
}
|
|
6358
6487
|
});
|
|
6359
6488
|
}
|
|
6360
6489
|
};
|
|
6361
|
-
/**
|
|
6362
|
-
* Remove the ComponentLauncher case field, which is not intended to be persisted.
|
|
6363
|
-
*
|
|
6364
|
-
* @param data The object tree of form values on which to perform the removal
|
|
6365
|
-
* @param caseFields The list of underlying {@link CaseField} domain model objects for each field
|
|
6366
|
-
*/
|
|
6367
|
-
FormValueService.prototype.removeComponentLauncherField = function (data, caseFields) {
|
|
6368
|
-
if (data && caseFields && caseFields.length > 0) {
|
|
6369
|
-
var componentLauncherCaseField = caseFields.filter(function (caseField) { return FieldsUtils.isComponentLauncherCaseField(caseField); });
|
|
6370
|
-
if (componentLauncherCaseField.length > 0) {
|
|
6371
|
-
// There should be only one ComponentLauncher case field
|
|
6372
|
-
delete data[componentLauncherCaseField[0].id];
|
|
6373
|
-
}
|
|
6374
|
-
}
|
|
6375
|
-
};
|
|
6376
6490
|
/**
|
|
6377
6491
|
* Populate the linked cases from the data held in its corresponding CaseField.
|
|
6378
6492
|
*
|
|
@@ -6381,7 +6495,7 @@
|
|
|
6381
6495
|
*/
|
|
6382
6496
|
FormValueService.prototype.populateLinkedCasesDetailsFromCaseFields = function (data, caseFields) {
|
|
6383
6497
|
if (data && caseFields && caseFields.length > 0) {
|
|
6384
|
-
caseFields.filter(function (caseField) { return !FieldsUtils.
|
|
6498
|
+
caseFields.filter(function (caseField) { return !FieldsUtils.isCaseFieldOfType(caseField, ['ComponentLauncher']); })
|
|
6385
6499
|
.forEach(function (caseField) {
|
|
6386
6500
|
if (data.hasOwnProperty('caseLinks') && caseField.value) {
|
|
6387
6501
|
data[caseField.id] = caseField.value;
|
|
@@ -9605,7 +9719,9 @@
|
|
|
9605
9719
|
form: this.form,
|
|
9606
9720
|
});
|
|
9607
9721
|
/* istanbul ignore else */
|
|
9608
|
-
if (!nextPage &&
|
|
9722
|
+
if (!nextPage &&
|
|
9723
|
+
!(this.eventTrigger.show_summary || this.eventTrigger.show_summary === null) &&
|
|
9724
|
+
!this.eventTrigger.show_event_notes) {
|
|
9609
9725
|
this.submitForm({
|
|
9610
9726
|
eventTrigger: this.eventTrigger,
|
|
9611
9727
|
form: this.form,
|
|
@@ -9697,16 +9813,13 @@
|
|
|
9697
9813
|
// Remove collection fields that have "min" validation of greater than zero set on the FieldType but are empty;
|
|
9698
9814
|
// these will fail validation
|
|
9699
9815
|
this.formValueService.removeEmptyCollectionsWithMinValidation(caseEventData.data, eventTrigger.case_fields);
|
|
9700
|
-
//
|
|
9701
|
-
//
|
|
9702
|
-
|
|
9703
|
-
|
|
9704
|
-
|
|
9705
|
-
|
|
9706
|
-
|
|
9707
|
-
this.formValueService.populateLinkedCasesDetailsFromCaseFields(caseEventData.data, eventTrigger.case_fields);
|
|
9708
|
-
this.formValueService.removeComponentLauncherField(caseEventData.data, eventTrigger.case_fields);
|
|
9709
|
-
}
|
|
9816
|
+
// For Case Flag submissions (where a FlagLauncher field is present in the event trigger), the flag details data
|
|
9817
|
+
// needs populating for each Flags field, then the FlagLauncher field needs removing
|
|
9818
|
+
this.formValueService.repopulateFormDataFromCaseFieldValues(caseEventData.data, eventTrigger.case_fields);
|
|
9819
|
+
// Data population step required for Linked Cases
|
|
9820
|
+
this.formValueService.populateLinkedCasesDetailsFromCaseFields(caseEventData.data, eventTrigger.case_fields);
|
|
9821
|
+
// Remove "Launcher"-type fields (these have no values and are not intended to be persisted)
|
|
9822
|
+
this.formValueService.removeCaseFieldsOfType(caseEventData.data, eventTrigger.case_fields, ['FlagLauncher', 'ComponentLauncher']);
|
|
9710
9823
|
caseEventData.event_token = eventTrigger.event_token;
|
|
9711
9824
|
caseEventData.ignore_warning = this.ignoreWarning;
|
|
9712
9825
|
if (this.confirmation) {
|
|
@@ -9828,8 +9941,7 @@
|
|
|
9828
9941
|
_this.sessionStorageService.removeItem('eventUrl');
|
|
9829
9942
|
var confirmation = _this.buildConfirmation(response);
|
|
9830
9943
|
if (confirmation && (confirmation.getHeader() || confirmation.getBody())) {
|
|
9831
|
-
|
|
9832
|
-
_this.confirm(confirmation).finally();
|
|
9944
|
+
_this.confirm(confirmation);
|
|
9833
9945
|
}
|
|
9834
9946
|
else {
|
|
9835
9947
|
_this.emitSubmitted(response);
|
|
@@ -10897,6 +11009,7 @@
|
|
|
10897
11009
|
else {
|
|
10898
11010
|
this.caseEdit.cancelled.emit();
|
|
10899
11011
|
}
|
|
11012
|
+
this.caseEditDataService.clearFormValidationErrors();
|
|
10900
11013
|
};
|
|
10901
11014
|
CaseEditPageComponent.prototype.submitting = function () {
|
|
10902
11015
|
return this.caseEdit.isSubmitting;
|
|
@@ -15038,7 +15151,7 @@
|
|
|
15038
15151
|
var ctx_r4 = i0__namespace.ɵɵnextContext();
|
|
15039
15152
|
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$K, ctx_r4.dynamicRadioListControl.value === radioButton_r5.code));
|
|
15040
15153
|
i0__namespace.ɵɵadvance(1);
|
|
15041
|
-
i0__namespace.ɵɵproperty("id", ctx_r4.createElementId(radioButton_r5.code))("name", ctx_r4.
|
|
15154
|
+
i0__namespace.ɵɵproperty("id", ctx_r4.createElementId(radioButton_r5.code))("name", ctx_r4.id())("formControl", ctx_r4.dynamicRadioListControl)("value", radioButton_r5.code);
|
|
15042
15155
|
i0__namespace.ɵɵadvance(1);
|
|
15043
15156
|
i0__namespace.ɵɵproperty("for", ctx_r4.createElementId(radioButton_r5.code));
|
|
15044
15157
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -15053,7 +15166,6 @@
|
|
|
15053
15166
|
}
|
|
15054
15167
|
WriteDynamicRadioListFieldComponent.prototype.ngOnInit = function () {
|
|
15055
15168
|
/**
|
|
15056
|
-
*
|
|
15057
15169
|
* Reassigning list_items from formatted_list when list_items is empty
|
|
15058
15170
|
*/
|
|
15059
15171
|
if (!this.caseField.list_items && this.caseField.formatted_value && this.caseField.formatted_value.list_items) {
|
|
@@ -20593,7 +20705,7 @@
|
|
|
20593
20705
|
i0__namespace.ɵɵclassProp("grey-bar", ctx.canHaveGreyBar && !ctx.caseField.hiddenCannotChange);
|
|
20594
20706
|
i0__namespace.ɵɵproperty("hidden", ctx.caseField.hidden);
|
|
20595
20707
|
}
|
|
20596
|
-
}, styles: [".form [_nghost-%COMP%] .grey-bar>*>.form-group, .form [_nghost-%COMP%] .grey-bar>*>dl.case-field{margin-left:15px;padding-left:15px}.form [_nghost-%COMP%] .grey-bar>*>.form-group:not(.form-group-error), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field:not(.form-group-error){border-left:5px solid #b1b4b6}.form [_nghost-%COMP%] .grey-bar>*>.form-group input:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>.form-group select:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>.form-group textarea:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field input:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field select:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field textarea:not(.inline-block){display:block}"] });
|
|
20708
|
+
}, styles: [".form [_nghost-%COMP%] .grey-bar>*>*>.form-group, .form [_nghost-%COMP%] .grey-bar>*>.form-group, .form [_nghost-%COMP%] .grey-bar>*>dl.case-field{margin-left:15px;padding-left:15px}.form [_nghost-%COMP%] .grey-bar>*>*>.form-group:not(.form-group-error), .form [_nghost-%COMP%] .grey-bar>*>.form-group:not(.form-group-error), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field:not(.form-group-error){border-left:5px solid #b1b4b6}.form [_nghost-%COMP%] .grey-bar>*>*>.form-group input:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>*>.form-group select:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>*>.form-group textarea:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>.form-group input:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>.form-group select:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>.form-group textarea:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field input:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field select:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field textarea:not(.inline-block){display:block}"] });
|
|
20597
20709
|
(function () {
|
|
20598
20710
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(FieldWriteComponent, [{
|
|
20599
20711
|
type: i0.Component,
|
|
@@ -20693,7 +20805,7 @@
|
|
|
20693
20805
|
i0__namespace.ɵɵadvance(1);
|
|
20694
20806
|
i0__namespace.ɵɵproperty("ngIf", ctx.withLabel && !ctx.isLabel() && (!ctx.isComplex() || ctx.isCaseLink()))("ngIfElse", _r1);
|
|
20695
20807
|
}
|
|
20696
|
-
}, directives: [i1__namespace.NgIf, i1__namespace.NgTemplateOutlet], styles: [".case-field[_ngcontent-%COMP%]:after{content:\"\";display:block;clear:both}.case-field[_ngcontent-%COMP%]{box-sizing:border-box;margin-bottom:15px}@media (min-width:641px){.case-field[_ngcontent-%COMP%]{margin-bottom:30px}}.case-field[_ngcontent-%COMP%] .case-field__label[_ngcontent-%COMP%]{display:block;color:#0b0c0c;padding-bottom:2px;font-family:nta,Arial,sans-serif;font-weight:700;text-transform:none;font-size:16px;line-height:1.25}@media (min-width:641px){.case-field[_ngcontent-%COMP%] .case-field__label[_ngcontent-%COMP%]{font-size:19px;line-height:1.3157894737}}.case-field[_ngcontent-%COMP%] .case-field__value[_ngcontent-%COMP%]{font-family:nta,Arial,sans-serif;font-weight:400;text-transform:none;font-size:16px;line-height:1.25}@media (min-width:641px){.case-field[_ngcontent-%COMP%] .case-field__value[_ngcontent-%COMP%]{font-size:19px;line-height:1.3157894737}}.form [_nghost-%COMP%] .grey-bar>*>.form-group, .form [_nghost-%COMP%] .grey-bar>*>dl.case-field{margin-left:15px;padding-left:15px}.form [_nghost-%COMP%] .grey-bar>*>.form-group:not(.form-group-error), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field:not(.form-group-error){border-left:5px solid #b1b4b6}.form [_nghost-%COMP%] .grey-bar>*>.form-group input:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>.form-group select:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>.form-group textarea:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field input:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field select:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field textarea:not(.inline-block){display:block}"] });
|
|
20808
|
+
}, directives: [i1__namespace.NgIf, i1__namespace.NgTemplateOutlet], styles: [".case-field[_ngcontent-%COMP%]:after{content:\"\";display:block;clear:both}.case-field[_ngcontent-%COMP%]{box-sizing:border-box;margin-bottom:15px}@media (min-width:641px){.case-field[_ngcontent-%COMP%]{margin-bottom:30px}}.case-field[_ngcontent-%COMP%] .case-field__label[_ngcontent-%COMP%]{display:block;color:#0b0c0c;padding-bottom:2px;font-family:nta,Arial,sans-serif;font-weight:700;text-transform:none;font-size:16px;line-height:1.25}@media (min-width:641px){.case-field[_ngcontent-%COMP%] .case-field__label[_ngcontent-%COMP%]{font-size:19px;line-height:1.3157894737}}.case-field[_ngcontent-%COMP%] .case-field__value[_ngcontent-%COMP%]{font-family:nta,Arial,sans-serif;font-weight:400;text-transform:none;font-size:16px;line-height:1.25}@media (min-width:641px){.case-field[_ngcontent-%COMP%] .case-field__value[_ngcontent-%COMP%]{font-size:19px;line-height:1.3157894737}}.form [_nghost-%COMP%] .grey-bar>*>*>.form-group, .form [_nghost-%COMP%] .grey-bar>*>.form-group, .form [_nghost-%COMP%] .grey-bar>*>dl.case-field{margin-left:15px;padding-left:15px}.form [_nghost-%COMP%] .grey-bar>*>*>.form-group:not(.form-group-error), .form [_nghost-%COMP%] .grey-bar>*>.form-group:not(.form-group-error), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field:not(.form-group-error){border-left:5px solid #b1b4b6}.form [_nghost-%COMP%] .grey-bar>*>*>.form-group input:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>*>.form-group select:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>*>.form-group textarea:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>.form-group input:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>.form-group select:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>.form-group textarea:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field input:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field select:not(.inline-block), .form [_nghost-%COMP%] .grey-bar>*>dl.case-field textarea:not(.inline-block){display:block}"] });
|
|
20697
20809
|
var ɵFieldReadLabelComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(FieldReadLabelComponent);
|
|
20698
20810
|
(function () {
|
|
20699
20811
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(FieldReadLabelComponent, [{
|
|
@@ -26779,9 +26891,10 @@
|
|
|
26779
26891
|
this.contextFields = this.getCaseFields();
|
|
26780
26892
|
// Indicates if the submission is for a Case Flag, as opposed to a "regular" form submission, by the presence of
|
|
26781
26893
|
// a FlagLauncher field in the event trigger
|
|
26782
|
-
this.caseEdit.isCaseFlagSubmission =
|
|
26894
|
+
this.caseEdit.isCaseFlagSubmission =
|
|
26895
|
+
this.eventTrigger.case_fields.some(function (caseField) { return FieldsUtils.isCaseFieldOfType(caseField, ['FlagLauncher']); });
|
|
26783
26896
|
this.caseEdit.isLinkedCasesSubmission =
|
|
26784
|
-
this.eventTrigger.case_fields.some(function (caseField) { return FieldsUtils.
|
|
26897
|
+
this.eventTrigger.case_fields.some(function (caseField) { return FieldsUtils.isCaseFieldOfType(caseField, ['ComponentLauncher']); });
|
|
26785
26898
|
this.pageTitle = this.caseEdit.isCaseFlagSubmission ? 'Review flag details' : 'Check your answers';
|
|
26786
26899
|
};
|
|
26787
26900
|
CaseEditSubmitComponent.prototype.ngOnDestroy = function () {
|
|
@@ -26854,49 +26967,50 @@
|
|
|
26854
26967
|
CaseEditSubmitComponent.prototype.checkYourAnswerFieldsToDisplayExists = function () {
|
|
26855
26968
|
var e_1, _d, e_2, _e;
|
|
26856
26969
|
/* istanbul ignore else */
|
|
26857
|
-
if (
|
|
26858
|
-
|
|
26859
|
-
|
|
26860
|
-
|
|
26861
|
-
|
|
26862
|
-
|
|
26863
|
-
|
|
26864
|
-
|
|
26865
|
-
|
|
26866
|
-
|
|
26867
|
-
|
|
26868
|
-
|
|
26869
|
-
|
|
26870
|
-
|
|
26871
|
-
return true;
|
|
26970
|
+
if (this.eventTrigger.show_summary || this.eventTrigger.show_summary === null) {
|
|
26971
|
+
try {
|
|
26972
|
+
for (var _f = __values(this.wizard.pages), _g = _f.next(); !_g.done; _g = _f.next()) {
|
|
26973
|
+
var page = _g.value;
|
|
26974
|
+
/* istanbul ignore else */
|
|
26975
|
+
if (page.case_fields && this.isShown(page)) {
|
|
26976
|
+
try {
|
|
26977
|
+
for (var _h = (e_2 = void 0, __values(page.case_fields)), _j = _h.next(); !_j.done; _j = _h.next()) {
|
|
26978
|
+
var field = _j.value;
|
|
26979
|
+
/* istanbul ignore else */
|
|
26980
|
+
if (this.canShowFieldInCYA(field)) {
|
|
26981
|
+
// at least one field needs showing
|
|
26982
|
+
return true;
|
|
26983
|
+
}
|
|
26872
26984
|
}
|
|
26873
26985
|
}
|
|
26874
|
-
|
|
26875
|
-
|
|
26876
|
-
|
|
26877
|
-
|
|
26878
|
-
|
|
26986
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
26987
|
+
finally {
|
|
26988
|
+
try {
|
|
26989
|
+
if (_j && !_j.done && (_e = _h.return)) _e.call(_h);
|
|
26990
|
+
}
|
|
26991
|
+
finally { if (e_2) throw e_2.error; }
|
|
26879
26992
|
}
|
|
26880
|
-
finally { if (e_2) throw e_2.error; }
|
|
26881
26993
|
}
|
|
26882
26994
|
}
|
|
26883
26995
|
}
|
|
26884
|
-
|
|
26885
|
-
|
|
26886
|
-
|
|
26887
|
-
|
|
26888
|
-
|
|
26996
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
26997
|
+
finally {
|
|
26998
|
+
try {
|
|
26999
|
+
if (_g && !_g.done && (_d = _f.return)) _d.call(_f);
|
|
27000
|
+
}
|
|
27001
|
+
finally { if (e_1) throw e_1.error; }
|
|
26889
27002
|
}
|
|
26890
|
-
finally { if (e_1) throw e_1.error; }
|
|
26891
27003
|
}
|
|
26892
|
-
|
|
26893
|
-
|
|
27004
|
+
else {
|
|
27005
|
+
// found no fields to show in CYA summary page
|
|
27006
|
+
return false;
|
|
27007
|
+
}
|
|
26894
27008
|
};
|
|
26895
27009
|
CaseEditSubmitComponent.prototype.readOnlySummaryFieldsToDisplayExists = function () {
|
|
26896
27010
|
return this.eventTrigger.case_fields.some(function (field) { return field.show_summary_content_option >= 0; });
|
|
26897
27011
|
};
|
|
26898
27012
|
CaseEditSubmitComponent.prototype.showEventNotes = function () {
|
|
26899
|
-
return this.eventTrigger.show_event_notes
|
|
27013
|
+
return !!this.eventTrigger.show_event_notes;
|
|
26900
27014
|
};
|
|
26901
27015
|
CaseEditSubmitComponent.prototype.getLastPageShown = function () {
|
|
26902
27016
|
var _this = this;
|