@hmcts/ccd-case-ui-toolkit 6.16.1 → 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 +199 -91
- 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/shared/components/case-editor/case-edit/case-edit.component.js +12 -14
- package/esm2015/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.js +19 -17
- package/esm2015/lib/shared/components/palette/complex/read-complex-field-table.component.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 +90 -72
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js.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-submit/case-edit-submit.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) {
|
|
@@ -4124,18 +4203,39 @@
|
|
|
4124
4203
|
}
|
|
4125
4204
|
return this.isFlagsFieldType(caseField.field_type);
|
|
4126
4205
|
};
|
|
4206
|
+
/**
|
|
4207
|
+
* @deprecated Use {@link isCaseFieldOfType} instead, passing 'FlagLauncher' as the single type in the `types` array
|
|
4208
|
+
*/
|
|
4127
4209
|
FieldsUtils.isFlagLauncherCaseField = function (caseField) {
|
|
4128
4210
|
if (!caseField) {
|
|
4129
4211
|
return false;
|
|
4130
4212
|
}
|
|
4131
4213
|
return caseField.field_type.type === 'FlagLauncher';
|
|
4132
4214
|
};
|
|
4215
|
+
/**
|
|
4216
|
+
* @deprecated Use {@link isCaseFieldOfType} instead, passing 'ComponentLauncher' as the single type in the `types`
|
|
4217
|
+
* array
|
|
4218
|
+
*/
|
|
4133
4219
|
FieldsUtils.isComponentLauncherCaseField = function (caseField) {
|
|
4134
4220
|
if (!caseField) {
|
|
4135
4221
|
return false;
|
|
4136
4222
|
}
|
|
4137
4223
|
return caseField.field_type.type === 'ComponentLauncher';
|
|
4138
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
|
+
};
|
|
4139
4239
|
FieldsUtils.isLinkedCasesCaseField = function (caseField) {
|
|
4140
4240
|
return FieldsUtils.isComponentLauncherCaseField(caseField) &&
|
|
4141
4241
|
caseField.id === 'LinkedCasesComponentLauncher';
|
|
@@ -4651,6 +4751,9 @@
|
|
|
4651
4751
|
var _a = __read(path.split(/[_]+/g)), _ = _a[0], pathTail = _a.slice(1);
|
|
4652
4752
|
return this.findValueForComplexCondition(fields[head], tail[0], tail.slice(1), pathTail.join('_'));
|
|
4653
4753
|
}
|
|
4754
|
+
else if (!fields[head]) {
|
|
4755
|
+
return this.findValueForComplexCondition(fields, tail[0], tail.slice(1), path);
|
|
4756
|
+
}
|
|
4654
4757
|
else {
|
|
4655
4758
|
return this.findValueForComplexCondition(fields[head], tail[0], tail.slice(1), path);
|
|
4656
4759
|
}
|
|
@@ -6320,65 +6423,70 @@
|
|
|
6320
6423
|
}
|
|
6321
6424
|
};
|
|
6322
6425
|
/**
|
|
6323
|
-
* 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.
|
|
6324
6429
|
*
|
|
6325
|
-
* @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
|
|
6326
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
|
|
6327
6433
|
*/
|
|
6328
|
-
FormValueService.prototype.
|
|
6329
|
-
|
|
6330
|
-
|
|
6331
|
-
|
|
6332
|
-
|
|
6333
|
-
|
|
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; }
|
|
6334
6450
|
}
|
|
6335
6451
|
}
|
|
6336
6452
|
};
|
|
6337
6453
|
/**
|
|
6338
|
-
*
|
|
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.
|
|
6339
6460
|
*
|
|
6340
6461
|
* @param data The object tree of form values on which to perform the data population
|
|
6341
6462
|
* @param caseFields The list of underlying {@link CaseField} domain model objects for each field
|
|
6342
6463
|
*/
|
|
6343
|
-
FormValueService.prototype.
|
|
6344
|
-
if (data && caseFields && caseFields.length > 0
|
|
6345
|
-
|
|
6346
|
-
//
|
|
6347
|
-
|
|
6348
|
-
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']); })
|
|
6349
6469
|
.forEach(function (caseField) {
|
|
6350
|
-
// Ensure that the data object is populated for all
|
|
6351
|
-
//
|
|
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
|
|
6352
6473
|
if (data.hasOwnProperty(caseField.id) && caseField.value) {
|
|
6353
|
-
// Create new object for the
|
|
6354
|
-
|
|
6355
|
-
|
|
6356
|
-
|
|
6357
|
-
Object.keys(data[caseField.id]).forEach(function (key) {
|
|
6358
|
-
if (caseField.value.hasOwnProperty(key)) {
|
|
6359
|
-
data[caseField.id][key] = caseField.value[key];
|
|
6360
|
-
}
|
|
6361
|
-
});
|
|
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] = {};
|
|
6362
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
|
+
});
|
|
6363
6486
|
}
|
|
6364
6487
|
});
|
|
6365
6488
|
}
|
|
6366
6489
|
};
|
|
6367
|
-
/**
|
|
6368
|
-
* Remove the ComponentLauncher case field, which is not intended to be persisted.
|
|
6369
|
-
*
|
|
6370
|
-
* @param data The object tree of form values on which to perform the removal
|
|
6371
|
-
* @param caseFields The list of underlying {@link CaseField} domain model objects for each field
|
|
6372
|
-
*/
|
|
6373
|
-
FormValueService.prototype.removeComponentLauncherField = function (data, caseFields) {
|
|
6374
|
-
if (data && caseFields && caseFields.length > 0) {
|
|
6375
|
-
var componentLauncherCaseField = caseFields.filter(function (caseField) { return FieldsUtils.isComponentLauncherCaseField(caseField); });
|
|
6376
|
-
if (componentLauncherCaseField.length > 0) {
|
|
6377
|
-
// There should be only one ComponentLauncher case field
|
|
6378
|
-
delete data[componentLauncherCaseField[0].id];
|
|
6379
|
-
}
|
|
6380
|
-
}
|
|
6381
|
-
};
|
|
6382
6490
|
/**
|
|
6383
6491
|
* Populate the linked cases from the data held in its corresponding CaseField.
|
|
6384
6492
|
*
|
|
@@ -6387,7 +6495,7 @@
|
|
|
6387
6495
|
*/
|
|
6388
6496
|
FormValueService.prototype.populateLinkedCasesDetailsFromCaseFields = function (data, caseFields) {
|
|
6389
6497
|
if (data && caseFields && caseFields.length > 0) {
|
|
6390
|
-
caseFields.filter(function (caseField) { return !FieldsUtils.
|
|
6498
|
+
caseFields.filter(function (caseField) { return !FieldsUtils.isCaseFieldOfType(caseField, ['ComponentLauncher']); })
|
|
6391
6499
|
.forEach(function (caseField) {
|
|
6392
6500
|
if (data.hasOwnProperty('caseLinks') && caseField.value) {
|
|
6393
6501
|
data[caseField.id] = caseField.value;
|
|
@@ -9611,7 +9719,9 @@
|
|
|
9611
9719
|
form: this.form,
|
|
9612
9720
|
});
|
|
9613
9721
|
/* istanbul ignore else */
|
|
9614
|
-
if (!nextPage &&
|
|
9722
|
+
if (!nextPage &&
|
|
9723
|
+
!(this.eventTrigger.show_summary || this.eventTrigger.show_summary === null) &&
|
|
9724
|
+
!this.eventTrigger.show_event_notes) {
|
|
9615
9725
|
this.submitForm({
|
|
9616
9726
|
eventTrigger: this.eventTrigger,
|
|
9617
9727
|
form: this.form,
|
|
@@ -9703,16 +9813,13 @@
|
|
|
9703
9813
|
// Remove collection fields that have "min" validation of greater than zero set on the FieldType but are empty;
|
|
9704
9814
|
// these will fail validation
|
|
9705
9815
|
this.formValueService.removeEmptyCollectionsWithMinValidation(caseEventData.data, eventTrigger.case_fields);
|
|
9706
|
-
//
|
|
9707
|
-
//
|
|
9708
|
-
|
|
9709
|
-
|
|
9710
|
-
|
|
9711
|
-
|
|
9712
|
-
|
|
9713
|
-
this.formValueService.populateLinkedCasesDetailsFromCaseFields(caseEventData.data, eventTrigger.case_fields);
|
|
9714
|
-
this.formValueService.removeComponentLauncherField(caseEventData.data, eventTrigger.case_fields);
|
|
9715
|
-
}
|
|
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']);
|
|
9716
9823
|
caseEventData.event_token = eventTrigger.event_token;
|
|
9717
9824
|
caseEventData.ignore_warning = this.ignoreWarning;
|
|
9718
9825
|
if (this.confirmation) {
|
|
@@ -9834,8 +9941,7 @@
|
|
|
9834
9941
|
_this.sessionStorageService.removeItem('eventUrl');
|
|
9835
9942
|
var confirmation = _this.buildConfirmation(response);
|
|
9836
9943
|
if (confirmation && (confirmation.getHeader() || confirmation.getBody())) {
|
|
9837
|
-
|
|
9838
|
-
_this.confirm(confirmation).finally();
|
|
9944
|
+
_this.confirm(confirmation);
|
|
9839
9945
|
}
|
|
9840
9946
|
else {
|
|
9841
9947
|
_this.emitSubmitted(response);
|
|
@@ -23449,7 +23555,7 @@
|
|
|
23449
23555
|
i0__namespace.ɵɵadvance(4);
|
|
23450
23556
|
i0__namespace.ɵɵtextInterpolate(ctx.caseField.label);
|
|
23451
23557
|
i0__namespace.ɵɵadvance(4);
|
|
23452
|
-
i0__namespace.ɵɵproperty("ngForOf", i0__namespace.ɵɵpipeBind4(9, 2, ctx.caseField, false, undefined,
|
|
23558
|
+
i0__namespace.ɵɵproperty("ngForOf", i0__namespace.ɵɵpipeBind4(9, 2, ctx.caseField, false, undefined, true));
|
|
23453
23559
|
}
|
|
23454
23560
|
}, styles: [".complex-panel[_ngcontent-%COMP%]{margin:13px 0;border:1px solid #bfc1c3}.complex-panel[_ngcontent-%COMP%] .complex-panel-title[_ngcontent-%COMP%]{background-color:#dee0e2;border-bottom:1px solid #bfc1c3;display:block;color:#0b0c0c;padding:5px 5px 2px;font-family:nta,Arial,sans-serif;font-weight:700;text-transform:none;font-size:16px;line-height:1.25}@media (min-width:641px){.complex-panel[_ngcontent-%COMP%] .complex-panel-title[_ngcontent-%COMP%]{font-size:19px;line-height:1.3157894737}}.complex-panel[_ngcontent-%COMP%] .complex-panel-table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{vertical-align:top}.complex-panel[_ngcontent-%COMP%] .complex-panel-table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]:last-child > td[_ngcontent-%COMP%], .complex-panel[_ngcontent-%COMP%] .complex-panel-table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]:last-child > th[_ngcontent-%COMP%]{border-bottom:none}.complex-panel[_ngcontent-%COMP%] .complex-panel-simple-field[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding-left:5px;width:295px}.complex-panel[_ngcontent-%COMP%] .complex-panel-compound-field[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:5px}"] });
|
|
23455
23561
|
var ɵReadComplexFieldTableComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(ReadComplexFieldTableComponent);
|
|
@@ -26785,9 +26891,10 @@
|
|
|
26785
26891
|
this.contextFields = this.getCaseFields();
|
|
26786
26892
|
// Indicates if the submission is for a Case Flag, as opposed to a "regular" form submission, by the presence of
|
|
26787
26893
|
// a FlagLauncher field in the event trigger
|
|
26788
|
-
this.caseEdit.isCaseFlagSubmission =
|
|
26894
|
+
this.caseEdit.isCaseFlagSubmission =
|
|
26895
|
+
this.eventTrigger.case_fields.some(function (caseField) { return FieldsUtils.isCaseFieldOfType(caseField, ['FlagLauncher']); });
|
|
26789
26896
|
this.caseEdit.isLinkedCasesSubmission =
|
|
26790
|
-
this.eventTrigger.case_fields.some(function (caseField) { return FieldsUtils.
|
|
26897
|
+
this.eventTrigger.case_fields.some(function (caseField) { return FieldsUtils.isCaseFieldOfType(caseField, ['ComponentLauncher']); });
|
|
26791
26898
|
this.pageTitle = this.caseEdit.isCaseFlagSubmission ? 'Review flag details' : 'Check your answers';
|
|
26792
26899
|
};
|
|
26793
26900
|
CaseEditSubmitComponent.prototype.ngOnDestroy = function () {
|
|
@@ -26860,49 +26967,50 @@
|
|
|
26860
26967
|
CaseEditSubmitComponent.prototype.checkYourAnswerFieldsToDisplayExists = function () {
|
|
26861
26968
|
var e_1, _d, e_2, _e;
|
|
26862
26969
|
/* istanbul ignore else */
|
|
26863
|
-
if (
|
|
26864
|
-
|
|
26865
|
-
|
|
26866
|
-
|
|
26867
|
-
|
|
26868
|
-
|
|
26869
|
-
|
|
26870
|
-
|
|
26871
|
-
|
|
26872
|
-
|
|
26873
|
-
|
|
26874
|
-
|
|
26875
|
-
|
|
26876
|
-
|
|
26877
|
-
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
|
+
}
|
|
26878
26984
|
}
|
|
26879
26985
|
}
|
|
26880
|
-
|
|
26881
|
-
|
|
26882
|
-
|
|
26883
|
-
|
|
26884
|
-
|
|
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; }
|
|
26885
26992
|
}
|
|
26886
|
-
finally { if (e_2) throw e_2.error; }
|
|
26887
26993
|
}
|
|
26888
26994
|
}
|
|
26889
26995
|
}
|
|
26890
|
-
|
|
26891
|
-
|
|
26892
|
-
|
|
26893
|
-
|
|
26894
|
-
|
|
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; }
|
|
26895
27002
|
}
|
|
26896
|
-
finally { if (e_1) throw e_1.error; }
|
|
26897
27003
|
}
|
|
26898
|
-
|
|
26899
|
-
|
|
27004
|
+
else {
|
|
27005
|
+
// found no fields to show in CYA summary page
|
|
27006
|
+
return false;
|
|
27007
|
+
}
|
|
26900
27008
|
};
|
|
26901
27009
|
CaseEditSubmitComponent.prototype.readOnlySummaryFieldsToDisplayExists = function () {
|
|
26902
27010
|
return this.eventTrigger.case_fields.some(function (field) { return field.show_summary_content_option >= 0; });
|
|
26903
27011
|
};
|
|
26904
27012
|
CaseEditSubmitComponent.prototype.showEventNotes = function () {
|
|
26905
|
-
return this.eventTrigger.show_event_notes
|
|
27013
|
+
return !!this.eventTrigger.show_event_notes;
|
|
26906
27014
|
};
|
|
26907
27015
|
CaseEditSubmitComponent.prototype.getLastPageShown = function () {
|
|
26908
27016
|
var _this = this;
|