@hmcts/ccd-case-ui-toolkit 6.14.4-eui-4157 → 6.14.4-eui-4157-b
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 +160 -210
- 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 +1 -1
- package/esm2015/lib/components/form/date-input/date-input.component.js +8 -8
- package/esm2015/lib/components/header/header-bar/header-bar.component.js +2 -3
- package/esm2015/lib/shared/commons/case-edit-data/case-edit-data.module.js +1 -1
- package/esm2015/lib/shared/commons/case-edit-data/case-edit-validation.model.js +1 -1
- package/esm2015/lib/shared/components/activity/activity.component.js +5 -5
- package/esm2015/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.js +2 -2
- package/esm2015/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.js +2 -2
- package/esm2015/lib/shared/components/case-editor/case-editor.module.js +1 -1
- package/esm2015/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.js +3 -3
- package/esm2015/lib/shared/components/case-editor/services/cases.service.js +8 -16
- package/esm2015/lib/shared/components/case-editor/services/page-validation.service.js +2 -2
- package/esm2015/lib/shared/components/case-editor/services/wizard-page-field-to-case-field.mapper.js +2 -2
- package/esm2015/lib/shared/components/case-editor/services/work-allocation.service.js +1 -1
- package/esm2015/lib/shared/components/case-viewer/case-challenged-access-request/case-challenged-access-request.component.js +5 -5
- package/esm2015/lib/shared/components/case-viewer/case-event-trigger/case-event-trigger.component.js +1 -1
- package/esm2015/lib/shared/components/case-viewer/case-specific-access-request/case-specific-access-request.component.js +4 -4
- package/esm2015/lib/shared/components/case-viewer/case-viewer.component.js +5 -5
- package/esm2015/lib/shared/components/case-viewer/printer/pipes/print-url.pipe.js +3 -3
- package/esm2015/lib/shared/components/case-viewer/services/case.resolver.js +2 -2
- package/esm2015/lib/shared/components/event-start/event-guard/event-start.guard.js +2 -2
- package/esm2015/lib/shared/components/palette/address/address-option.model.js +4 -7
- package/esm2015/lib/shared/components/palette/address/write-address-field.component.js +4 -4
- package/esm2015/lib/shared/components/palette/case-flag/components/case-flag-table/case-flag-table.component.js +1 -1
- package/esm2015/lib/shared/components/palette/case-flag/components/select-flag-location/select-flag-location.component.js +2 -2
- package/esm2015/lib/shared/components/palette/case-flag/enums/index.js +1 -1
- package/esm2015/lib/shared/components/palette/collection/collection-create-checker.service.js +5 -5
- package/esm2015/lib/shared/components/palette/collection/write-collection-field.component.js +5 -5
- package/esm2015/lib/shared/components/palette/complex/read-complex-field-collection-table.component.js +3 -3
- package/esm2015/lib/shared/components/palette/linked-cases/components/link-cases/link-cases.component.js +1 -1
- package/esm2015/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-from-table.component.js +2 -2
- package/esm2015/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-to-table.component.js +1 -1
- package/esm2015/lib/shared/components/palette/linked-cases/domain/linked-cases.model.js +1 -1
- package/esm2015/lib/shared/components/palette/linked-cases/read-linked-cases-field.component.js +2 -2
- package/esm2015/lib/shared/components/palette/linked-cases/services/linked-cases.service.js +2 -3
- package/esm2015/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.js +3 -4
- package/esm2015/lib/shared/components/palette/order-summary/fee.model.js +1 -1
- package/esm2015/lib/shared/components/palette/order-summary/order-summary.model.js +1 -1
- package/esm2015/lib/shared/components/palette/text-area/write-text-area-field.component.js +2 -2
- package/esm2015/lib/shared/components/palette/utils/date.pipe.js +4 -4
- package/esm2015/lib/shared/components/search-filters/search-filters.component.js +2 -2
- package/esm2015/lib/shared/components/workbasket-filters/workbasket-filters.component.js +3 -3
- package/esm2015/lib/shared/directives/conditional-show/domain/conditional-show.model.js +3 -3
- package/esm2015/lib/shared/directives/conditional-show/services/condition-parser.service.js +3 -7
- package/esm2015/lib/shared/domain/case-view/case-view.model.js +1 -1
- package/esm2015/lib/shared/domain/case-view/role-assignment-response.model.js +1 -1
- package/esm2015/lib/shared/domain/case-view/role-request.model.js +1 -1
- package/esm2015/lib/shared/domain/organisation/organisation-converter.js +8 -8
- package/esm2015/lib/shared/domain/user/user-info.model.js +1 -1
- package/esm2015/lib/shared/fixture/case-field-builder.js +13 -13
- package/esm2015/lib/shared/fixture/shared.test.fixture.js +27 -27
- package/esm2015/lib/shared/pipes/complex/{cdd-page-fields.pipe.js → ccd-page-fields.pipe.js} +3 -3
- package/esm2015/lib/shared/pipes/complex/index.js +2 -2
- package/esm2015/lib/shared/services/activity/activity.polling.service.js +2 -2
- package/esm2015/lib/shared/services/activity/activity.service.js +9 -18
- package/esm2015/lib/shared/services/addresses/address-parser.js +5 -5
- package/esm2015/lib/shared/services/case-fields/format-translator.service.js +2 -2
- package/esm2015/lib/shared/services/case-flag/case-flag-refdata.service.js +2 -2
- package/esm2015/lib/shared/services/common-data-service/common-data-service.js +2 -2
- package/esm2015/lib/shared/services/definitions/definitions.service.js +3 -8
- package/esm2015/lib/shared/services/fields/fields.purger.js +15 -15
- package/esm2015/lib/shared/services/fields/fields.utils.js +4 -4
- package/esm2015/lib/shared/services/form/form-value.service.js +1 -2
- package/esm2015/lib/shared/services/loading/loading.service.js +2 -7
- package/esm2015/lib/shared/services/search/search.service.js +5 -10
- package/esm2015/lib/shared/services/search-result/sorting/search-result-view-item-comparator-factory.js +5 -5
- package/esm2015/lib/shared/services/window/window.service.js +1 -1
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js +156 -198
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
- package/lib/app.config.d.ts.map +1 -1
- package/lib/components/header/header-bar/header-bar.component.d.ts.map +1 -1
- package/lib/shared/commons/case-edit-data/case-edit-data.module.d.ts.map +1 -1
- package/lib/shared/commons/case-edit-data/case-edit-validation.model.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-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.d.ts +2 -2
- package/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.d.ts.map +1 -1
- package/lib/shared/components/case-editor/services/cases.service.d.ts.map +1 -1
- package/lib/shared/components/case-editor/services/wizard-page-field-to-case-field.mapper.d.ts.map +1 -1
- package/lib/shared/components/case-editor/services/work-allocation.service.d.ts.map +1 -1
- package/lib/shared/components/case-viewer/case-challenged-access-request/case-challenged-access-request.component.d.ts.map +1 -1
- package/lib/shared/components/case-viewer/case-viewer.component.d.ts.map +1 -1
- package/lib/shared/components/case-viewer/printer/pipes/print-url.pipe.d.ts.map +1 -1
- package/lib/shared/components/case-viewer/services/case.resolver.d.ts.map +1 -1
- package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts +1 -1
- package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts.map +1 -1
- package/lib/shared/components/palette/address/address-option.model.d.ts.map +1 -1
- package/lib/shared/components/palette/address/write-address-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/case-flag/components/select-flag-location/select-flag-location.component.d.ts.map +1 -1
- package/lib/shared/components/palette/case-flag/enums/index.d.ts.map +1 -1
- package/lib/shared/components/palette/collection/collection-create-checker.service.d.ts.map +1 -1
- package/lib/shared/components/palette/complex/read-complex-field-collection-table.component.d.ts +1 -1
- package/lib/shared/components/palette/complex/read-complex-field-collection-table.component.d.ts.map +1 -1
- package/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-from-table.component.d.ts +4 -4
- package/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-from-table.component.d.ts.map +1 -1
- package/lib/shared/components/palette/linked-cases/domain/linked-cases.model.d.ts.map +1 -1
- package/lib/shared/components/palette/linked-cases/read-linked-cases-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/linked-cases/services/linked-cases.service.d.ts.map +1 -1
- package/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/order-summary/fee.model.d.ts.map +1 -1
- package/lib/shared/components/palette/order-summary/order-summary.model.d.ts.map +1 -1
- package/lib/shared/components/palette/text-area/write-text-area-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/utils/date.pipe.d.ts.map +1 -1
- package/lib/shared/components/workbasket-filters/workbasket-filters.component.d.ts.map +1 -1
- package/lib/shared/directives/conditional-show/domain/conditional-show.model.d.ts.map +1 -1
- package/lib/shared/directives/conditional-show/services/condition-parser.service.d.ts.map +1 -1
- package/lib/shared/domain/case-view/case-view.model.d.ts.map +1 -1
- package/lib/shared/domain/case-view/role-assignment-response.model.d.ts +1 -2
- package/lib/shared/domain/case-view/role-assignment-response.model.d.ts.map +1 -1
- package/lib/shared/domain/case-view/role-request.model.d.ts.map +1 -1
- package/lib/shared/domain/organisation/organisation-converter.d.ts.map +1 -1
- package/lib/shared/domain/user/user-info.model.d.ts.map +1 -1
- package/lib/shared/fixture/case-field-builder.d.ts +6 -6
- package/lib/shared/fixture/case-field-builder.d.ts.map +1 -1
- package/lib/shared/fixture/shared.test.fixture.d.ts +6 -6
- package/lib/shared/fixture/shared.test.fixture.d.ts.map +1 -1
- package/lib/shared/pipes/complex/{cdd-page-fields.pipe.d.ts → ccd-page-fields.pipe.d.ts} +1 -1
- package/lib/shared/pipes/complex/ccd-page-fields.pipe.d.ts.map +1 -0
- package/lib/shared/pipes/complex/index.d.ts +1 -1
- package/lib/shared/pipes/pipes.module.d.ts +1 -1
- package/lib/shared/services/activity/activity.polling.service.d.ts.map +1 -1
- package/lib/shared/services/activity/activity.service.d.ts.map +1 -1
- package/lib/shared/services/addresses/address-parser.d.ts.map +1 -1
- package/lib/shared/services/common-data-service/common-data-service.d.ts.map +1 -1
- package/lib/shared/services/definitions/definitions.service.d.ts.map +1 -1
- package/lib/shared/services/fields/fields.purger.d.ts.map +1 -1
- package/lib/shared/services/fields/fields.utils.d.ts +0 -1
- package/lib/shared/services/fields/fields.utils.d.ts.map +1 -1
- package/lib/shared/services/loading/loading.service.d.ts +1 -4
- package/lib/shared/services/loading/loading.service.d.ts.map +1 -1
- package/lib/shared/services/search/search.service.d.ts +0 -2
- package/lib/shared/services/search/search.service.d.ts.map +1 -1
- package/lib/shared/services/search-result/sorting/search-result-view-item-comparator-factory.d.ts.map +1 -1
- package/lib/shared/services/window/window.service.d.ts.map +1 -1
- package/package.json +1 -1
- package/lib/shared/pipes/complex/cdd-page-fields.pipe.d.ts.map +0 -1
|
@@ -1036,22 +1036,22 @@
|
|
|
1036
1036
|
}
|
|
1037
1037
|
};
|
|
1038
1038
|
DateInputComponent.prototype.dayId = function () {
|
|
1039
|
-
return this.id +
|
|
1039
|
+
return this.id + "-day";
|
|
1040
1040
|
};
|
|
1041
1041
|
DateInputComponent.prototype.monthId = function () {
|
|
1042
|
-
return this.id +
|
|
1042
|
+
return this.id + "-month";
|
|
1043
1043
|
};
|
|
1044
1044
|
DateInputComponent.prototype.yearId = function () {
|
|
1045
|
-
return this.id +
|
|
1045
|
+
return this.id + "-year";
|
|
1046
1046
|
};
|
|
1047
1047
|
DateInputComponent.prototype.hourId = function () {
|
|
1048
|
-
return this.id +
|
|
1048
|
+
return this.id + "-hour";
|
|
1049
1049
|
};
|
|
1050
1050
|
DateInputComponent.prototype.minuteId = function () {
|
|
1051
|
-
return this.id +
|
|
1051
|
+
return this.id + "-minute";
|
|
1052
1052
|
};
|
|
1053
1053
|
DateInputComponent.prototype.secondId = function () {
|
|
1054
|
-
return this.id +
|
|
1054
|
+
return this.id + "-second";
|
|
1055
1055
|
};
|
|
1056
1056
|
DateInputComponent.prototype.viewValue = function () {
|
|
1057
1057
|
if (this.day || this.month || this.year || this.hour || this.minute || this.second) {
|
|
@@ -1066,7 +1066,7 @@
|
|
|
1066
1066
|
this.minute ? this.pad(this.minute) : '',
|
|
1067
1067
|
this.second ? this.pad(this.second) : ''
|
|
1068
1068
|
].join(':');
|
|
1069
|
-
return date +
|
|
1069
|
+
return date + "T" + time + ".000";
|
|
1070
1070
|
}
|
|
1071
1071
|
else {
|
|
1072
1072
|
return date;
|
|
@@ -2131,7 +2131,7 @@
|
|
|
2131
2131
|
});
|
|
2132
2132
|
ActivityService.handleHttpError = function (response) {
|
|
2133
2133
|
var error = HttpErrorService.convertToHttpError(response);
|
|
2134
|
-
if (response
|
|
2134
|
+
if ((response === null || response === void 0 ? void 0 : response.status) !== error.status) {
|
|
2135
2135
|
error.status = response.status;
|
|
2136
2136
|
}
|
|
2137
2137
|
return error;
|
|
@@ -2139,12 +2139,11 @@
|
|
|
2139
2139
|
ActivityService.prototype.getOptions = function () {
|
|
2140
2140
|
var userDetails = JSON.parse(this.sessionStorageService.getItem('userDetails'));
|
|
2141
2141
|
var headers = new i1$2.HttpHeaders().set('Content-Type', 'application/json').set('Authorization', userDetails.token);
|
|
2142
|
-
|
|
2142
|
+
return {
|
|
2143
2143
|
headers: headers,
|
|
2144
2144
|
withCredentials: true,
|
|
2145
2145
|
observe: 'body',
|
|
2146
2146
|
};
|
|
2147
|
-
return options;
|
|
2148
2147
|
};
|
|
2149
2148
|
ActivityService.prototype.getActivities = function () {
|
|
2150
2149
|
var caseId = [];
|
|
@@ -2153,41 +2152,33 @@
|
|
|
2153
2152
|
}
|
|
2154
2153
|
try {
|
|
2155
2154
|
var options = this.getOptions();
|
|
2156
|
-
var url = this.activityUrl() +
|
|
2155
|
+
var url = this.activityUrl() + "/cases/" + caseId.join(',') + "/activity";
|
|
2157
2156
|
return this.http
|
|
2158
2157
|
.get(url, options, false, ActivityService.handleHttpError)
|
|
2159
2158
|
.pipe(operators.map(function (response) { return response; }));
|
|
2160
2159
|
}
|
|
2161
2160
|
catch (error) {
|
|
2162
|
-
console.log(
|
|
2161
|
+
console.log("user may not be authenticated." + error);
|
|
2163
2162
|
}
|
|
2164
2163
|
};
|
|
2165
2164
|
ActivityService.prototype.postActivity = function (caseId, activity) {
|
|
2166
2165
|
try {
|
|
2167
2166
|
var options = this.getOptions();
|
|
2168
|
-
var url = this.activityUrl() +
|
|
2167
|
+
var url = this.activityUrl() + "/cases/" + caseId + "/activity";
|
|
2169
2168
|
var body = { activity: activity };
|
|
2170
2169
|
return this.http
|
|
2171
2170
|
.post(url, body, options, false)
|
|
2172
2171
|
.pipe(operators.map(function (response) { return response; }));
|
|
2173
2172
|
}
|
|
2174
2173
|
catch (error) {
|
|
2175
|
-
console.log(
|
|
2174
|
+
console.log("user may not be authenticated." + error);
|
|
2176
2175
|
}
|
|
2177
2176
|
};
|
|
2178
2177
|
ActivityService.prototype.verifyUserIsAuthorized = function () {
|
|
2179
2178
|
var _this = this;
|
|
2180
|
-
if (this.sessionStorageService.getItem('userDetails') === undefined) {
|
|
2181
|
-
return;
|
|
2182
|
-
}
|
|
2183
|
-
if (this.activityUrl() && this.userAuthorised === undefined) {
|
|
2179
|
+
if (this.sessionStorageService.getItem('userDetails') && this.activityUrl() && this.userAuthorised === undefined) {
|
|
2184
2180
|
this.getActivities(ActivityService.DUMMY_CASE_REFERENCE).subscribe(function () { return _this.userAuthorised = true; }, function (error) {
|
|
2185
|
-
|
|
2186
|
-
_this.userAuthorised = false;
|
|
2187
|
-
}
|
|
2188
|
-
else {
|
|
2189
|
-
_this.userAuthorised = true;
|
|
2190
|
-
}
|
|
2181
|
+
_this.userAuthorised = [401, 403].indexOf(error.status) <= -1;
|
|
2191
2182
|
});
|
|
2192
2183
|
}
|
|
2193
2184
|
};
|
|
@@ -2300,7 +2291,7 @@
|
|
|
2300
2291
|
requests.get(activity.caseId).next(activity);
|
|
2301
2292
|
});
|
|
2302
2293
|
}, function (err) {
|
|
2303
|
-
console.log(
|
|
2294
|
+
console.log("error: " + err);
|
|
2304
2295
|
Array.from(requests.values()).forEach(function (subject) { return subject.error(err); });
|
|
2305
2296
|
}); });
|
|
2306
2297
|
});
|
|
@@ -2440,9 +2431,9 @@
|
|
|
2440
2431
|
};
|
|
2441
2432
|
ActivityComponent.prototype.generateDescription = function (prefix, suffix, namesArray, unknownCount) {
|
|
2442
2433
|
var resultText = prefix;
|
|
2443
|
-
resultText += namesArray.map(function (activityInfo) { return activityInfo.forename +
|
|
2434
|
+
resultText += namesArray.map(function (activityInfo) { return activityInfo.forename + " " + activityInfo.surname; }).join(', ');
|
|
2444
2435
|
if (unknownCount > 0) {
|
|
2445
|
-
resultText += (namesArray.length > 0 ?
|
|
2436
|
+
resultText += (namesArray.length > 0 ? " and " + unknownCount + " other" : unknownCount + " user");
|
|
2446
2437
|
resultText += (unknownCount > 1 ? 's' : '');
|
|
2447
2438
|
}
|
|
2448
2439
|
else {
|
|
@@ -2450,10 +2441,10 @@
|
|
|
2450
2441
|
}
|
|
2451
2442
|
if (suffix.length > 0) {
|
|
2452
2443
|
if (namesArray.length + unknownCount > 1) {
|
|
2453
|
-
resultText +=
|
|
2444
|
+
resultText += " are " + suffix;
|
|
2454
2445
|
}
|
|
2455
2446
|
else {
|
|
2456
|
-
resultText +=
|
|
2447
|
+
resultText += " is " + suffix;
|
|
2457
2448
|
}
|
|
2458
2449
|
}
|
|
2459
2450
|
return resultText;
|
|
@@ -2792,7 +2783,7 @@
|
|
|
2792
2783
|
break;
|
|
2793
2784
|
case 'n':
|
|
2794
2785
|
case 'N':
|
|
2795
|
-
maybePush(result,
|
|
2786
|
+
maybePush(result, "***" + c + "***", inQuote); // No way to support A - millisec of day, n - nano of second, N - nano of Day
|
|
2796
2787
|
break;
|
|
2797
2788
|
case 'V':
|
|
2798
2789
|
case 'O':
|
|
@@ -2926,9 +2917,9 @@
|
|
|
2926
2917
|
resultDate = offsetDate.getDate() + " " + DatePipe.MONTHS[offsetDate.getMonth()] + " " + offsetDate.getFullYear();
|
|
2927
2918
|
if (match[4] && match[5] && match[6] && format !== 'short') {
|
|
2928
2919
|
resultDate += ', ';
|
|
2929
|
-
resultDate += this.getHour(offsetDate.getHours().toString()) +
|
|
2930
|
-
resultDate += this.pad(offsetDate.getMinutes()) +
|
|
2931
|
-
resultDate += this.pad(offsetDate.getSeconds()) +
|
|
2920
|
+
resultDate += this.getHour(offsetDate.getHours().toString()) + ":";
|
|
2921
|
+
resultDate += this.pad(offsetDate.getMinutes()) + ":";
|
|
2922
|
+
resultDate += this.pad(offsetDate.getSeconds()) + " ";
|
|
2932
2923
|
resultDate += (this.toInt(offsetDate.getHours().toString()) >= 12) ? 'PM' : 'AM';
|
|
2933
2924
|
}
|
|
2934
2925
|
}
|
|
@@ -3744,25 +3735,25 @@
|
|
|
3744
3735
|
OrganisationConverter.toSimpleAddress = function (organisationModel) {
|
|
3745
3736
|
var simpleAddress = '';
|
|
3746
3737
|
if (organisationModel.addressLine1) {
|
|
3747
|
-
simpleAddress += organisationModel.addressLine1 +
|
|
3738
|
+
simpleAddress += organisationModel.addressLine1 + "<br>";
|
|
3748
3739
|
}
|
|
3749
3740
|
if (organisationModel.addressLine2) {
|
|
3750
|
-
simpleAddress += organisationModel.addressLine2 +
|
|
3741
|
+
simpleAddress += organisationModel.addressLine2 + "<br>";
|
|
3751
3742
|
}
|
|
3752
3743
|
if (organisationModel.addressLine3) {
|
|
3753
|
-
simpleAddress += organisationModel.addressLine3 +
|
|
3744
|
+
simpleAddress += organisationModel.addressLine3 + "<br>";
|
|
3754
3745
|
}
|
|
3755
3746
|
if (organisationModel.townCity) {
|
|
3756
|
-
simpleAddress += organisationModel.townCity +
|
|
3747
|
+
simpleAddress += organisationModel.townCity + "<br>";
|
|
3757
3748
|
}
|
|
3758
3749
|
if (organisationModel.county) {
|
|
3759
|
-
simpleAddress += organisationModel.county +
|
|
3750
|
+
simpleAddress += organisationModel.county + "<br>";
|
|
3760
3751
|
}
|
|
3761
3752
|
if (organisationModel.country) {
|
|
3762
|
-
simpleAddress += organisationModel.country +
|
|
3753
|
+
simpleAddress += organisationModel.country + "<br>";
|
|
3763
3754
|
}
|
|
3764
3755
|
if (organisationModel.postCode) {
|
|
3765
|
-
simpleAddress += organisationModel.postCode +
|
|
3756
|
+
simpleAddress += organisationModel.postCode + "<br>";
|
|
3766
3757
|
}
|
|
3767
3758
|
return simpleAddress;
|
|
3768
3759
|
};
|
|
@@ -3941,9 +3932,9 @@
|
|
|
3941
3932
|
});
|
|
3942
3933
|
return valueMap;
|
|
3943
3934
|
};
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
}
|
|
3935
|
+
// public static getType(elem: any): string {
|
|
3936
|
+
// return Object.prototype.toString.call(elem).slice(8, -1);
|
|
3937
|
+
// }
|
|
3947
3938
|
FieldsUtils.isObject = function (elem) {
|
|
3948
3939
|
return typeof elem === 'object' && elem !== null;
|
|
3949
3940
|
};
|
|
@@ -4501,7 +4492,6 @@
|
|
|
4501
4492
|
if (!condition) {
|
|
4502
4493
|
return null;
|
|
4503
4494
|
}
|
|
4504
|
-
;
|
|
4505
4495
|
condition = condition.replace(/CONTAINS/g, ' CONTAINS');
|
|
4506
4496
|
return peg.parse(condition.trim(), {});
|
|
4507
4497
|
};
|
|
@@ -4515,14 +4505,12 @@
|
|
|
4515
4505
|
if (!conditions || conditions.length === 0) {
|
|
4516
4506
|
return true;
|
|
4517
4507
|
}
|
|
4518
|
-
;
|
|
4519
4508
|
var validJoinComparators = ['AND', 'OR'];
|
|
4520
|
-
|
|
4509
|
+
return conditions.reduce(function (accumulator, condition, index) {
|
|
4521
4510
|
var isJoinComparator = function (comparator) { return (typeof comparator === 'string' && validJoinComparators.indexOf(comparator) !== -1); };
|
|
4522
4511
|
if (isJoinComparator(condition)) {
|
|
4523
4512
|
return accumulator;
|
|
4524
4513
|
}
|
|
4525
|
-
;
|
|
4526
4514
|
var currentConditionResult = true;
|
|
4527
4515
|
if (Array.isArray(condition)) {
|
|
4528
4516
|
currentConditionResult = _this.evaluate(fields, condition);
|
|
@@ -4539,7 +4527,6 @@
|
|
|
4539
4527
|
}
|
|
4540
4528
|
return currentConditionResult;
|
|
4541
4529
|
}, true);
|
|
4542
|
-
return result;
|
|
4543
4530
|
};
|
|
4544
4531
|
ConditionParser.evaluateJoin = function (leftResult, comparator, rightResult) {
|
|
4545
4532
|
switch (comparator) {
|
|
@@ -4746,8 +4733,8 @@
|
|
|
4746
4733
|
if (originalCondition.indexOf(condition.fieldReference) > -1) {
|
|
4747
4734
|
if (this.processedList && this.processedList.indexOf(condition.fieldReference) === -1) {
|
|
4748
4735
|
this.processedList.push(condition.fieldReference);
|
|
4749
|
-
var regularExp = new RegExp(
|
|
4750
|
-
return originalCondition.replace(regularExp, pathPrefix +
|
|
4736
|
+
var regularExp = new RegExp("(\\b)" + condition.fieldReference + "(?=[^\"]*(?:\"[^\"]*\"[^\"]*)*$)(\\b)", 'g');
|
|
4737
|
+
return originalCondition.replace(regularExp, pathPrefix + "." + condition.fieldReference);
|
|
4751
4738
|
}
|
|
4752
4739
|
else {
|
|
4753
4740
|
return originalCondition;
|
|
@@ -5316,14 +5303,14 @@
|
|
|
5316
5303
|
var formFields = form.getRawValue();
|
|
5317
5304
|
var currentPage = wizard.getPage(currentPageId, this.fieldsUtils.buildCanShowPredicate(eventTrigger, form));
|
|
5318
5305
|
currentPage.wizard_page_fields.forEach(function (wpf) {
|
|
5319
|
-
var
|
|
5320
|
-
if (_this.hasShowConditionField(
|
|
5321
|
-
var condition = new ShowCondition(
|
|
5322
|
-
if (_this.isHidden(condition, formFields.data) && !(_this.isReadonly(
|
|
5323
|
-
_this.resetField(form,
|
|
5306
|
+
var caseField = _this.findCaseFieldByWizardPageFieldId(currentPage, wpf);
|
|
5307
|
+
if (_this.hasShowConditionField(caseField, formFields)) {
|
|
5308
|
+
var condition = new ShowCondition(caseField.show_condition);
|
|
5309
|
+
if (_this.isHidden(condition, formFields.data) && !(_this.isReadonly(caseField))) {
|
|
5310
|
+
_this.resetField(form, caseField);
|
|
5324
5311
|
}
|
|
5325
5312
|
}
|
|
5326
|
-
_this.retainHiddenValueByFieldType(
|
|
5313
|
+
_this.retainHiddenValueByFieldType(caseField, form);
|
|
5327
5314
|
});
|
|
5328
5315
|
};
|
|
5329
5316
|
FieldsPurger.prototype.retainHiddenValueByFieldType = function (field, form) {
|
|
@@ -5354,13 +5341,13 @@
|
|
|
5354
5341
|
FieldsPurger.prototype.hasShowConditionPage = function (wizardPage, formFields) {
|
|
5355
5342
|
return wizardPage.show_condition && formFields[this.getShowConditionKey(wizardPage.show_condition)];
|
|
5356
5343
|
};
|
|
5357
|
-
FieldsPurger.prototype.hasShowConditionField = function (
|
|
5358
|
-
return
|
|
5344
|
+
FieldsPurger.prototype.hasShowConditionField = function (caseField, formFields) {
|
|
5345
|
+
return caseField.show_condition && formFields.data[this.getShowConditionKey(caseField.show_condition)];
|
|
5359
5346
|
};
|
|
5360
|
-
FieldsPurger.prototype.getShowConditionKey = function (
|
|
5347
|
+
FieldsPurger.prototype.getShowConditionKey = function (showCondition) {
|
|
5361
5348
|
// Need to allow for negated conditions, i.e. !=, as well as regular ones (=)
|
|
5362
5349
|
// Also need to allow for conditions specified using the "CONTAINS" keyword
|
|
5363
|
-
return
|
|
5350
|
+
return showCondition.split(/!=|=|CONTAINS/)[0];
|
|
5364
5351
|
};
|
|
5365
5352
|
FieldsPurger.prototype.resetField = function (form, field) {
|
|
5366
5353
|
var e_1, _a;
|
|
@@ -5456,8 +5443,8 @@
|
|
|
5456
5443
|
FieldsPurger.prototype.resetPage = function (form, wizardPage) {
|
|
5457
5444
|
var _this = this;
|
|
5458
5445
|
wizardPage.wizard_page_fields.forEach(function (wpf) {
|
|
5459
|
-
var
|
|
5460
|
-
_this.resetField(form,
|
|
5446
|
+
var caseField = _this.findCaseFieldByWizardPageFieldId(wizardPage, wpf);
|
|
5447
|
+
_this.resetField(form, caseField);
|
|
5461
5448
|
});
|
|
5462
5449
|
};
|
|
5463
5450
|
FieldsPurger.prototype.getType = function (elem) {
|
|
@@ -5467,8 +5454,8 @@
|
|
|
5467
5454
|
return this.getType(elem) === 'Object';
|
|
5468
5455
|
};
|
|
5469
5456
|
// TODO: call isReadOnly on CaseFields once we make it available
|
|
5470
|
-
FieldsPurger.prototype.isReadonly = function (
|
|
5471
|
-
return
|
|
5457
|
+
FieldsPurger.prototype.isReadonly = function (caseField) {
|
|
5458
|
+
return caseField.display_context.toUpperCase() === 'READONLY';
|
|
5472
5459
|
};
|
|
5473
5460
|
/**
|
|
5474
5461
|
* Deletes a field value by setting the value of the corresponding {@link FormControl} to null (or an empty array
|
|
@@ -6363,7 +6350,6 @@
|
|
|
6363
6350
|
});
|
|
6364
6351
|
}
|
|
6365
6352
|
}
|
|
6366
|
-
;
|
|
6367
6353
|
});
|
|
6368
6354
|
}
|
|
6369
6355
|
};
|
|
@@ -6802,7 +6788,7 @@
|
|
|
6802
6788
|
return addressModel;
|
|
6803
6789
|
};
|
|
6804
6790
|
AddressParser.prototype.parseAddressLine1 = function (classification, address) {
|
|
6805
|
-
var addressLine
|
|
6791
|
+
var addressLine;
|
|
6806
6792
|
if (classification === AddressType.RD06) {
|
|
6807
6793
|
addressLine =
|
|
6808
6794
|
address.SUB_BUILDING_NAME + " " + address.ORGANISATION_NAME + " " + address.DEPARTMENT_NAME + " " + address.PO_BOX_NUMBER;
|
|
@@ -6815,7 +6801,7 @@
|
|
|
6815
6801
|
return this.removeNonAddressValues(addressLine);
|
|
6816
6802
|
};
|
|
6817
6803
|
AddressParser.prototype.parseAddressLine2 = function (classification, address) {
|
|
6818
|
-
var addressLine
|
|
6804
|
+
var addressLine;
|
|
6819
6805
|
if (classification === AddressType.RD06) {
|
|
6820
6806
|
addressLine = address.BUILDING_NAME + " ";
|
|
6821
6807
|
}
|
|
@@ -6826,7 +6812,7 @@
|
|
|
6826
6812
|
return this.removeNonAddressValues(addressLine);
|
|
6827
6813
|
};
|
|
6828
6814
|
AddressParser.prototype.parseAddressLine3 = function (classification, address) {
|
|
6829
|
-
var addressLine
|
|
6815
|
+
var addressLine;
|
|
6830
6816
|
if (classification === AddressType.RD06) {
|
|
6831
6817
|
addressLine =
|
|
6832
6818
|
address.BUILDING_NUMBER + " " + address.THOROUGHFARE_NAME;
|
|
@@ -6854,7 +6840,7 @@
|
|
|
6854
6840
|
return value.replace(new RegExp('^,', 'gi'), '');
|
|
6855
6841
|
};
|
|
6856
6842
|
AddressParser.prototype.prefixWithCommaIfPresent = function (value) {
|
|
6857
|
-
return value ?
|
|
6843
|
+
return value ? ", " + value : value;
|
|
6858
6844
|
};
|
|
6859
6845
|
return AddressParser;
|
|
6860
6846
|
}());
|
|
@@ -7104,7 +7090,7 @@
|
|
|
7104
7090
|
if (flagType) {
|
|
7105
7091
|
url += "?flag-type=" + flagType;
|
|
7106
7092
|
}
|
|
7107
|
-
if (welshRequired
|
|
7093
|
+
if (typeof welshRequired === 'boolean') {
|
|
7108
7094
|
// Check if flag-type has been added to the query string; if so, append welsh-required with '&'
|
|
7109
7095
|
url.indexOf('?') > -1 ? url += '&' : url += '?';
|
|
7110
7096
|
welshRequired ? url += 'welsh-required=Y' : url += 'welsh-required=N';
|
|
@@ -7710,18 +7696,6 @@
|
|
|
7710
7696
|
}], null, null);
|
|
7711
7697
|
})();
|
|
7712
7698
|
|
|
7713
|
-
var HasLoadingState = /** @class */ (function () {
|
|
7714
|
-
function HasLoadingState() {
|
|
7715
|
-
}
|
|
7716
|
-
Object.defineProperty(HasLoadingState.prototype, "isLoading", {
|
|
7717
|
-
get: function () {
|
|
7718
|
-
return;
|
|
7719
|
-
},
|
|
7720
|
-
enumerable: false,
|
|
7721
|
-
configurable: true
|
|
7722
|
-
});
|
|
7723
|
-
return HasLoadingState;
|
|
7724
|
-
}());
|
|
7725
7699
|
var LoadingService = /** @class */ (function () {
|
|
7726
7700
|
function LoadingService() {
|
|
7727
7701
|
this.registered = new Map();
|
|
@@ -7746,7 +7720,7 @@
|
|
|
7746
7720
|
};
|
|
7747
7721
|
LoadingService.prototype.generateToken = function () {
|
|
7748
7722
|
var timestamp = window.performance.now();
|
|
7749
|
-
return
|
|
7723
|
+
return "toolkit-loading-" + timestamp; // format: [source-library]-[unique incrementing number]
|
|
7750
7724
|
};
|
|
7751
7725
|
return LoadingService;
|
|
7752
7726
|
}());
|
|
@@ -7767,10 +7741,7 @@
|
|
|
7767
7741
|
}
|
|
7768
7742
|
SearchService.prototype.search = function (jurisdictionId, caseTypeId, metaCriteria, caseCriteria, view) {
|
|
7769
7743
|
var _this = this;
|
|
7770
|
-
var url = this.appConfig.getApiUrl() + "/caseworkers/:uid"
|
|
7771
|
-
+ ("/jurisdictions/" + jurisdictionId)
|
|
7772
|
-
+ ("/case-types/" + caseTypeId)
|
|
7773
|
-
+ "/cases";
|
|
7744
|
+
var url = this.appConfig.getApiUrl() + "/caseworkers/:uid/jurisdictions/" + jurisdictionId + "/case-types/" + caseTypeId + "/cases";
|
|
7774
7745
|
var options = this.requestOptionsBuilder.buildOptions(metaCriteria, caseCriteria, view);
|
|
7775
7746
|
var loadingToken = this.loadingService.register();
|
|
7776
7747
|
return this.httpService
|
|
@@ -7779,15 +7750,14 @@
|
|
|
7779
7750
|
};
|
|
7780
7751
|
SearchService.prototype.searchCasesByIds = function (caseTypeId, filter, view, sort) {
|
|
7781
7752
|
var _this = this;
|
|
7782
|
-
var url = this.appConfig.getCaseDataUrl() +
|
|
7783
|
-
("/internal/searchCases?ctid=" + caseTypeId + "&use_case=" + view);
|
|
7753
|
+
var url = this.appConfig.getCaseDataUrl() + "/internal/searchCases?ctid=" + caseTypeId + "&use_case=" + view;
|
|
7784
7754
|
var body = Object.assign(Object.assign({ sort: sort }, filter), { size: this.appConfig.getPaginationPageSize() });
|
|
7785
7755
|
var loadingToken = this.loadingService.register();
|
|
7786
7756
|
return this.httpService.post(url, body).pipe(operators.map(function (response) { return response; }), operators.finalize(function () { return _this.loadingService.unregister(loadingToken); }));
|
|
7787
7757
|
};
|
|
7788
7758
|
SearchService.prototype.searchCases = function (caseTypeId, metaCriteria, caseCriteria, view, sort) {
|
|
7789
7759
|
var _this = this;
|
|
7790
|
-
var url = this.appConfig.getCaseDataUrl() +
|
|
7760
|
+
var url = this.appConfig.getCaseDataUrl() + "/internal/searchCases?ctid=" + caseTypeId + "&use_case=" + view;
|
|
7791
7761
|
var options = this.requestOptionsBuilder.buildOptions(metaCriteria, caseCriteria, view);
|
|
7792
7762
|
var body = {
|
|
7793
7763
|
sort: sort,
|
|
@@ -7832,9 +7802,8 @@
|
|
|
7832
7802
|
return SearchService;
|
|
7833
7803
|
}());
|
|
7834
7804
|
SearchService.V2_MEDIATYPE_SEARCH_INPUTS = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-search-input-details.v2+json;charset=UTF-8';
|
|
7835
|
-
|
|
7805
|
+
// public static readonly VIEW_SEARCH = 'SEARCH';
|
|
7836
7806
|
SearchService.VIEW_WORKBASKET = 'WORKBASKET';
|
|
7837
|
-
SearchService.FIELD_PREFIX = 'case.';
|
|
7838
7807
|
SearchService.ɵfac = function SearchService_Factory(t) { return new (t || SearchService)(i0__namespace.ɵɵinject(AbstractAppConfig), i0__namespace.ɵɵinject(HttpService), i0__namespace.ɵɵinject(RequestOptionsBuilder), i0__namespace.ɵɵinject(LoadingService)); };
|
|
7839
7808
|
SearchService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: SearchService, factory: SearchService.ɵfac });
|
|
7840
7809
|
(function () {
|
|
@@ -7964,17 +7933,12 @@
|
|
|
7964
7933
|
this.appConfig = appConfig;
|
|
7965
7934
|
}
|
|
7966
7935
|
DefinitionsService.prototype.getCaseTypes = function (jurisdictionId, access) {
|
|
7967
|
-
var url = this.appConfig.getApiUrl()
|
|
7968
|
-
+ "/caseworkers/:uid"
|
|
7969
|
-
+ ("/jurisdictions/" + jurisdictionId)
|
|
7970
|
-
+ ("/case-types?access=" + access);
|
|
7936
|
+
var url = this.appConfig.getApiUrl() + "/caseworkers/:uid/jurisdictions/" + jurisdictionId + "/case-types?access=" + access;
|
|
7971
7937
|
return this.http
|
|
7972
7938
|
.get(url).pipe(operators.map(function (response) { return response; }));
|
|
7973
7939
|
};
|
|
7974
7940
|
DefinitionsService.prototype.getJurisdictions = function (access) {
|
|
7975
|
-
var url = this.appConfig.getApiUrl()
|
|
7976
|
-
+ "/caseworkers/:uid"
|
|
7977
|
-
+ ("/jurisdictions?access=" + access);
|
|
7941
|
+
var url = this.appConfig.getApiUrl() + "/caseworkers/:uid/jurisdictions?access=" + access;
|
|
7978
7942
|
return this.http
|
|
7979
7943
|
.get(url)
|
|
7980
7944
|
.pipe(operators.map(function (response) { return response; }));
|
|
@@ -8056,8 +8020,8 @@
|
|
|
8056
8020
|
compare: function (a, b) {
|
|
8057
8021
|
var fieldA = a.case_fields[fieldId];
|
|
8058
8022
|
var fieldB = b.case_fields[fieldId];
|
|
8059
|
-
fieldA = util.isUndefined(fieldA) || fieldA
|
|
8060
|
-
fieldB = util.isUndefined(fieldB) || fieldB
|
|
8023
|
+
fieldA = util.isUndefined(fieldA) || fieldA === null ? '' : fieldA.toLowerCase();
|
|
8024
|
+
fieldB = util.isUndefined(fieldB) || fieldB === null ? '' : fieldB.toLowerCase();
|
|
8061
8025
|
return fieldA === fieldB ? 0 : fieldA > fieldB ? 1 : -1;
|
|
8062
8026
|
}
|
|
8063
8027
|
};
|
|
@@ -8067,8 +8031,8 @@
|
|
|
8067
8031
|
compare: function (a, b) {
|
|
8068
8032
|
var fieldA = a.case_fields[fieldId];
|
|
8069
8033
|
var fieldB = b.case_fields[fieldId];
|
|
8070
|
-
fieldA = util.isUndefined(fieldA) || fieldA
|
|
8071
|
-
fieldB = util.isUndefined(fieldB) || fieldB
|
|
8034
|
+
fieldA = util.isUndefined(fieldA) || fieldA === null ? '' : fieldA.join().toLowerCase();
|
|
8035
|
+
fieldB = util.isUndefined(fieldB) || fieldB === null ? '' : fieldB.join().toLowerCase();
|
|
8072
8036
|
return fieldA === fieldB ? 0 : fieldA > fieldB ? 1 : -1;
|
|
8073
8037
|
}
|
|
8074
8038
|
};
|
|
@@ -8364,7 +8328,7 @@
|
|
|
8364
8328
|
});
|
|
8365
8329
|
};
|
|
8366
8330
|
WizardPageFieldToCaseFieldMapper.prototype.preparePathPrefix = function (pathPrefix, caseField) {
|
|
8367
|
-
return pathPrefix.length === 0 ? caseField : pathPrefix +
|
|
8331
|
+
return pathPrefix.length === 0 ? caseField : pathPrefix + "." + caseField;
|
|
8368
8332
|
};
|
|
8369
8333
|
WizardPageFieldToCaseFieldMapper.prototype.getCaseFieldLeaf = function (caseFieldId, caseFields) {
|
|
8370
8334
|
var _a = __read(caseFieldId), head = _a[0], tail = _a.slice(1);
|
|
@@ -8446,11 +8410,7 @@
|
|
|
8446
8410
|
};
|
|
8447
8411
|
CasesService.prototype.getCaseView = function (jurisdictionId, caseTypeId, caseId) {
|
|
8448
8412
|
var _this = this;
|
|
8449
|
-
var url = this.appConfig.getApiUrl()
|
|
8450
|
-
+ "/caseworkers/:uid"
|
|
8451
|
-
+ ("/jurisdictions/" + jurisdictionId)
|
|
8452
|
-
+ ("/case-types/" + caseTypeId)
|
|
8453
|
-
+ ("/cases/" + caseId);
|
|
8413
|
+
var url = this.appConfig.getApiUrl() + "/caseworkers/:uid/jurisdictions/" + jurisdictionId + "/case-types/" + caseTypeId + "/cases/" + caseId;
|
|
8454
8414
|
var loadingToken = this.loadingService.register();
|
|
8455
8415
|
return this.http
|
|
8456
8416
|
.get(url)
|
|
@@ -8502,7 +8462,7 @@
|
|
|
8502
8462
|
CasesService.prototype.createEvent = function (caseDetails, eventData) {
|
|
8503
8463
|
var _this = this;
|
|
8504
8464
|
var caseId = caseDetails.case_id;
|
|
8505
|
-
var url = this.appConfig.getCaseDataUrl() +
|
|
8465
|
+
var url = this.appConfig.getCaseDataUrl() + "/cases/" + caseId + "/events";
|
|
8506
8466
|
var headers = new i1$2.HttpHeaders()
|
|
8507
8467
|
.set('experimental', 'true')
|
|
8508
8468
|
.set('Accept', CasesService.V2_MEDIATYPE_CREATE_EVENT)
|
|
@@ -8516,9 +8476,8 @@
|
|
|
8516
8476
|
};
|
|
8517
8477
|
CasesService.prototype.validateCase = function (ctid, eventData, pageId) {
|
|
8518
8478
|
var _this = this;
|
|
8519
|
-
var pageIdString = pageId ?
|
|
8520
|
-
var url = this.appConfig.getCaseDataUrl()
|
|
8521
|
-
+ ("/case-types/" + ctid + "/validate" + pageIdString);
|
|
8479
|
+
var pageIdString = pageId ? "?pageId=" + pageId : '';
|
|
8480
|
+
var url = this.appConfig.getCaseDataUrl() + "/case-types/" + ctid + "/validate" + pageIdString;
|
|
8522
8481
|
var headers = new i1$2.HttpHeaders()
|
|
8523
8482
|
.set('experimental', 'true')
|
|
8524
8483
|
.set('Accept', CasesService.V2_MEDIATYPE_CASE_DATA_VALIDATE)
|
|
@@ -8536,8 +8495,7 @@
|
|
|
8536
8495
|
if (eventData.ignore_warning) {
|
|
8537
8496
|
ignoreWarning = 'true';
|
|
8538
8497
|
}
|
|
8539
|
-
var url = this.appConfig.getCaseDataUrl()
|
|
8540
|
-
+ ("/case-types/" + ctid + "/cases?ignore-warning=" + ignoreWarning);
|
|
8498
|
+
var url = this.appConfig.getCaseDataUrl() + "/case-types/" + ctid + "/cases?ignore-warning=" + ignoreWarning;
|
|
8541
8499
|
var headers = new i1$2.HttpHeaders()
|
|
8542
8500
|
.set('experimental', 'true')
|
|
8543
8501
|
.set('Accept', CasesService.V2_MEDIATYPE_CREATE_CASE)
|
|
@@ -8551,9 +8509,7 @@
|
|
|
8551
8509
|
};
|
|
8552
8510
|
CasesService.prototype.getPrintDocuments = function (caseId) {
|
|
8553
8511
|
var _this = this;
|
|
8554
|
-
var url = this.appConfig.getCaseDataUrl()
|
|
8555
|
-
+ ("/cases/" + caseId)
|
|
8556
|
-
+ "/documents";
|
|
8512
|
+
var url = this.appConfig.getCaseDataUrl() + "/cases/" + caseId + "/documents";
|
|
8557
8513
|
var headers = new i1$2.HttpHeaders()
|
|
8558
8514
|
.set('experimental', 'true')
|
|
8559
8515
|
.set('Accept', CasesService.V2_MEDIATYPE_CASE_DOCUMENTS)
|
|
@@ -9289,7 +9245,7 @@
|
|
|
9289
9245
|
PageValidationService.prototype.isHidden = function (caseField, editForm, path) {
|
|
9290
9246
|
var formFields = editForm.getRawValue();
|
|
9291
9247
|
var condition = ShowCondition.getInstance(caseField.show_condition);
|
|
9292
|
-
if (path && path.indexOf(
|
|
9248
|
+
if (path && path.indexOf("_" + caseField.id + "_") === -1) {
|
|
9293
9249
|
path = "" + path + caseField.id;
|
|
9294
9250
|
}
|
|
9295
9251
|
return !condition.match(formFields.data, path);
|
|
@@ -10468,7 +10424,7 @@
|
|
|
10468
10424
|
var label = casefield.label || 'Field';
|
|
10469
10425
|
var id_1 = casefield.id;
|
|
10470
10426
|
if (fieldElement['component'] && fieldElement['component'].parent) {
|
|
10471
|
-
if (fieldElement['component'].idPrefix.indexOf(
|
|
10427
|
+
if (fieldElement['component'].idPrefix.indexOf("_" + id_1 + "_") === -1) {
|
|
10472
10428
|
id_1 = "" + fieldElement['component'].idPrefix + id_1;
|
|
10473
10429
|
}
|
|
10474
10430
|
else {
|
|
@@ -11006,7 +10962,7 @@
|
|
|
11006
10962
|
|
|
11007
10963
|
var AddressOption = /** @class */ (function () {
|
|
11008
10964
|
function AddressOption(addressModel, description) {
|
|
11009
|
-
if (description
|
|
10965
|
+
if (description === null) {
|
|
11010
10966
|
this.value = addressModel;
|
|
11011
10967
|
this.description = this.getDescription();
|
|
11012
10968
|
}
|
|
@@ -11015,13 +10971,10 @@
|
|
|
11015
10971
|
}
|
|
11016
10972
|
}
|
|
11017
10973
|
AddressOption.prototype.getDescription = function () {
|
|
11018
|
-
return this.removeInitialCommaIfPresent((this.value.AddressLine1 === undefined ? '' : this.value.AddressLine1)
|
|
11019
|
-
+ this.prefixWithCommaIfPresent(this.value.AddressLine2)
|
|
11020
|
-
+ this.prefixWithCommaIfPresent(this.value.AddressLine3)
|
|
11021
|
-
+ ', ' + this.value.PostTown);
|
|
10974
|
+
return this.removeInitialCommaIfPresent("" + (this.value.AddressLine1 === undefined ? '' : this.value.AddressLine1) + this.prefixWithCommaIfPresent(this.value.AddressLine2) + this.prefixWithCommaIfPresent(this.value.AddressLine3) + ", " + this.value.PostTown);
|
|
11022
10975
|
};
|
|
11023
10976
|
AddressOption.prototype.prefixWithCommaIfPresent = function (value) {
|
|
11024
|
-
return value ?
|
|
10977
|
+
return value ? ", " + value : value;
|
|
11025
10978
|
};
|
|
11026
10979
|
AddressOption.prototype.removeInitialCommaIfPresent = function (value) {
|
|
11027
10980
|
return value.replace(new RegExp('^,', 'gi'), '');
|
|
@@ -11165,7 +11118,7 @@
|
|
|
11165
11118
|
this.missingPostcode = false;
|
|
11166
11119
|
var postcode_1 = this.postcode.value;
|
|
11167
11120
|
this.caseField.value = null;
|
|
11168
|
-
this.addressOptions =
|
|
11121
|
+
this.addressOptions = [];
|
|
11169
11122
|
this.addressesService.getAddressesForPostcode(postcode_1.replace(' ', '').toUpperCase()).subscribe(function (result) {
|
|
11170
11123
|
result.forEach(function (address) {
|
|
11171
11124
|
_this.addressOptions.push(new AddressOption(address, null));
|
|
@@ -11208,7 +11161,7 @@
|
|
|
11208
11161
|
var hasAddress = false;
|
|
11209
11162
|
if (address) {
|
|
11210
11163
|
Object.keys(address).forEach(function (key) {
|
|
11211
|
-
if (address[key]
|
|
11164
|
+
if (address[key] !== null) {
|
|
11212
11165
|
hasAddress = true;
|
|
11213
11166
|
}
|
|
11214
11167
|
});
|
|
@@ -11231,7 +11184,7 @@
|
|
|
11231
11184
|
};
|
|
11232
11185
|
WriteAddressFieldComponent.prototype.defaultLabel = function (numberOfAddresses) {
|
|
11233
11186
|
return numberOfAddresses === 0 ? 'No address found'
|
|
11234
|
-
: numberOfAddresses + (numberOfAddresses === 1 ? ' address ' : ' addresses ') +
|
|
11187
|
+
: "" + numberOfAddresses + (numberOfAddresses === 1 ? ' address ' : ' addresses ') + "found";
|
|
11235
11188
|
};
|
|
11236
11189
|
WriteAddressFieldComponent.prototype.setFormValue = function () {
|
|
11237
11190
|
if (this.writeComplexFieldComponent.complexGroup) {
|
|
@@ -12976,16 +12929,16 @@
|
|
|
12976
12929
|
&& this.collItems[i].caseField.id === counter.toString()) {
|
|
12977
12930
|
this.collItems[i].caseField.id = i.toString();
|
|
12978
12931
|
}
|
|
12979
|
-
var idPrefix1 = this.collItems[i].prefix ? this.collItems[i].prefix.replace(
|
|
12980
|
-
var idPrefix1Current = idPrefix1.replace(
|
|
12932
|
+
var idPrefix1 = this.collItems[i].prefix ? this.collItems[i].prefix.replace("_" + counter.toString(), "_" + i.toString()) : '';
|
|
12933
|
+
var idPrefix1Current = idPrefix1.replace("_" + i.toString(), "_" + counter.toString());
|
|
12981
12934
|
if (this.collItems[i].prefix && this.collItems[i].prefix === idPrefix1Current) {
|
|
12982
12935
|
this.collItems[i].prefix = idPrefix1;
|
|
12983
12936
|
}
|
|
12984
12937
|
var idPrefixAvailable = this.collItems[i].container && this.collItems[i].container['component']
|
|
12985
12938
|
&& this.collItems[i].container['component'].idPrefix ? true : false;
|
|
12986
12939
|
var idPrefix2 = idPrefixAvailable ?
|
|
12987
|
-
this.collItems[i].container['component'].idPrefix.replace(
|
|
12988
|
-
var idPrefix2current = idPrefix2.replace(
|
|
12940
|
+
this.collItems[i].container['component'].idPrefix.replace("_" + counter.toString(), "_" + i.toString()) : '';
|
|
12941
|
+
var idPrefix2current = idPrefix2.replace("_" + i.toString(), "_" + counter.toString());
|
|
12989
12942
|
if (idPrefixAvailable && this.collItems[i].container['component'].idPrefix === idPrefix2current) {
|
|
12990
12943
|
this.collItems[i].container['component'].idPrefix = idPrefix2;
|
|
12991
12944
|
}
|
|
@@ -15396,7 +15349,7 @@
|
|
|
15396
15349
|
casesResponse.push(_this.mapResponse(result));
|
|
15397
15350
|
});
|
|
15398
15351
|
});
|
|
15399
|
-
|
|
15352
|
+
_this.linkedCases = casesResponse.map(function (item) {
|
|
15400
15353
|
return {
|
|
15401
15354
|
caseReference: item.caseReference,
|
|
15402
15355
|
caseName: item.caseName,
|
|
@@ -15410,7 +15363,6 @@
|
|
|
15410
15363
|
}),
|
|
15411
15364
|
};
|
|
15412
15365
|
});
|
|
15413
|
-
_this.linkedCases = caseLinks;
|
|
15414
15366
|
_this.serverLinkedApiError = null;
|
|
15415
15367
|
}, function (err) {
|
|
15416
15368
|
_this.serverLinkedApiError = {
|
|
@@ -17490,7 +17442,7 @@
|
|
|
17490
17442
|
this.caseField = (_a = tab === null || tab === void 0 ? void 0 : tab.fields) === null || _a === void 0 ? void 0 : _a.find(function (field) { return field.id === 'caseLinks'; });
|
|
17491
17443
|
}
|
|
17492
17444
|
this.isServerJurisdictionError = this.linkedCasesService.serverJurisdictionError || false;
|
|
17493
|
-
var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() +
|
|
17445
|
+
var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + "/lov/categories/CaseLinkingReasonCode";
|
|
17494
17446
|
this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
|
|
17495
17447
|
next: function (reasons) {
|
|
17496
17448
|
_this.reasonListLoaded = true;
|
|
@@ -17752,7 +17704,7 @@
|
|
|
17752
17704
|
};
|
|
17753
17705
|
WriteLinkedCasesFieldComponent.prototype.getLinkedCaseReasons = function () {
|
|
17754
17706
|
var _this = this;
|
|
17755
|
-
var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() +
|
|
17707
|
+
var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + "/lov/categories/CaseLinkingReasonCode";
|
|
17756
17708
|
this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
|
|
17757
17709
|
next: function (reasons) {
|
|
17758
17710
|
// Sort in ascending order
|
|
@@ -17811,11 +17763,10 @@
|
|
|
17811
17763
|
var _this = this;
|
|
17812
17764
|
this.casesService.getCaseViewV2(this.linkedCasesService.caseId).subscribe(function (caseView) {
|
|
17813
17765
|
var caseViewFiltered = caseView.tabs.filter(function (tab) {
|
|
17814
|
-
|
|
17766
|
+
return tab.fields.some(function (_b) {
|
|
17815
17767
|
var field_type = _b.field_type;
|
|
17816
17768
|
return field_type && field_type.collection_field_type && field_type.collection_field_type.id === 'CaseLink';
|
|
17817
17769
|
});
|
|
17818
|
-
return linkField;
|
|
17819
17770
|
});
|
|
17820
17771
|
if (caseViewFiltered) {
|
|
17821
17772
|
var caseLinkFieldValue = caseViewFiltered.map(function (filtered) { var _a; return ((_a = filtered.fields) === null || _a === void 0 ? void 0 : _a.length) > 0 && filtered.fields.filter(function (field) { return field.id === 'caseLinks'; })[0].value; });
|
|
@@ -19602,7 +19553,7 @@
|
|
|
19602
19553
|
WriteTextAreaFieldComponent.prototype.autoGrow = function (event) {
|
|
19603
19554
|
if (this.browserService.isIEOrEdge()) {
|
|
19604
19555
|
event.target.style.height = 'auto';
|
|
19605
|
-
event.target.style.height = event.target.scrollHeight +
|
|
19556
|
+
event.target.style.height = event.target.scrollHeight + "px";
|
|
19606
19557
|
event.target.scrollTop = event.target.scrollHeight;
|
|
19607
19558
|
}
|
|
19608
19559
|
};
|
|
@@ -22177,7 +22128,7 @@
|
|
|
22177
22128
|
// is expected not to have a party name)
|
|
22178
22129
|
if (this.flagsData) {
|
|
22179
22130
|
this.filteredFlagsData =
|
|
22180
|
-
this.flagsData.filter(function (f) { return f.flags.partyName
|
|
22131
|
+
this.flagsData.filter(function (f) { return f.flags.partyName !== null || f.pathToFlagsFormGroup === _this.caseLevelCaseFlagsFieldId; });
|
|
22181
22132
|
}
|
|
22182
22133
|
// Add a FormControl for the selected flag location if there is at least one flags instance remaining after filtering
|
|
22183
22134
|
if (this.filteredFlagsData && this.filteredFlagsData.length > 0) {
|
|
@@ -23474,13 +23425,13 @@
|
|
|
23474
23425
|
field.value = { CaseReference: value };
|
|
23475
23426
|
return field;
|
|
23476
23427
|
};
|
|
23477
|
-
ReadComplexFieldCollectionTableComponent.prototype.toCaseField = function (id, label,
|
|
23428
|
+
ReadComplexFieldCollectionTableComponent.prototype.toCaseField = function (id, label, fieldType, value) {
|
|
23478
23429
|
return classTransformer.plainToClassFromExist(new CaseField(), {
|
|
23479
23430
|
id: id,
|
|
23480
23431
|
label: label,
|
|
23481
23432
|
display_context: 'READONLY',
|
|
23482
23433
|
value: value,
|
|
23483
|
-
field_type:
|
|
23434
|
+
field_type: fieldType
|
|
23484
23435
|
});
|
|
23485
23436
|
};
|
|
23486
23437
|
ReadComplexFieldCollectionTableComponent.prototype.sortRowsByColumns = function (column) {
|
|
@@ -25316,7 +25267,7 @@
|
|
|
25316
25267
|
function CcdPageFieldsPipe() {
|
|
25317
25268
|
}
|
|
25318
25269
|
CcdPageFieldsPipe.prototype.transform = function (page, dataFormGroup) {
|
|
25319
|
-
var
|
|
25270
|
+
var complexFields = Object.keys(dataFormGroup.controls['data'].controls).map(function (key) {
|
|
25320
25271
|
var control = dataFormGroup.controls['data'].get(key);
|
|
25321
25272
|
return control['caseField'];
|
|
25322
25273
|
}).filter(function (field) {
|
|
@@ -25336,7 +25287,7 @@
|
|
|
25336
25287
|
field_type: {
|
|
25337
25288
|
id: page.id,
|
|
25338
25289
|
type: 'Complex',
|
|
25339
|
-
complex_fields:
|
|
25290
|
+
complex_fields: complexFields
|
|
25340
25291
|
}
|
|
25341
25292
|
});
|
|
25342
25293
|
};
|
|
@@ -25515,11 +25466,11 @@
|
|
|
25515
25466
|
}
|
|
25516
25467
|
return childrenCaseFields;
|
|
25517
25468
|
};
|
|
25518
|
-
CollectionCreateCheckerService.prototype.isComplex = function (
|
|
25519
|
-
return
|
|
25469
|
+
CollectionCreateCheckerService.prototype.isComplex = function (caseField) {
|
|
25470
|
+
return caseField.field_type.type === 'Complex';
|
|
25520
25471
|
};
|
|
25521
|
-
CollectionCreateCheckerService.prototype.isCollection = function (
|
|
25522
|
-
return
|
|
25472
|
+
CollectionCreateCheckerService.prototype.isCollection = function (caseField) {
|
|
25473
|
+
return caseField.field_type.type === 'Collection';
|
|
25523
25474
|
};
|
|
25524
25475
|
CollectionCreateCheckerService.prototype.hasCreateAccess = function (caseField, role) {
|
|
25525
25476
|
return !!caseField.acls.find(function (acl) { return acl.role === role && acl.create === true; });
|
|
@@ -26720,7 +26671,7 @@
|
|
|
26720
26671
|
if (caseField.field_type.type === 'Complex') {
|
|
26721
26672
|
// Note: Deliberate use of equality (==) and non-equality (!=) operators for null checks throughout, to
|
|
26722
26673
|
// handle both null and undefined values
|
|
26723
|
-
if (caseField.value
|
|
26674
|
+
if (caseField.value !== null) {
|
|
26724
26675
|
// Call this function recursively to replace the Complex field's sub-fields as necessary, passing the
|
|
26725
26676
|
// CaseField itself (the sub-fields do not contain any values, so these need to be obtained from the
|
|
26726
26677
|
// parent)
|
|
@@ -28749,7 +28700,7 @@
|
|
|
28749
28700
|
var formValue = _this.windowService.getLocalStorage(FORM_GROUP_VAL_LOC_STORAGE);
|
|
28750
28701
|
workbasketInputs.forEach(function (item) {
|
|
28751
28702
|
if (item.field.elementPath) {
|
|
28752
|
-
item.field.id = item.field.id +
|
|
28703
|
+
item.field.id = item.field.id + "." + item.field.elementPath;
|
|
28753
28704
|
}
|
|
28754
28705
|
item.field.label = item.label;
|
|
28755
28706
|
if (formValue) {
|
|
@@ -28801,7 +28752,7 @@
|
|
|
28801
28752
|
var value = formGroupLS[key];
|
|
28802
28753
|
// Clear the filter form group control values if it has a value in local storage
|
|
28803
28754
|
// The regionList form group control value should be ignored as it always contain the latest value
|
|
28804
|
-
if (key !== REGION_LIST_AND_FRC_FILTER && value
|
|
28755
|
+
if (key !== REGION_LIST_AND_FRC_FILTER && value !== null) {
|
|
28805
28756
|
this.formGroup.get(key).setValue(null);
|
|
28806
28757
|
}
|
|
28807
28758
|
}
|
|
@@ -31182,7 +31133,7 @@
|
|
|
31182
31133
|
* or the empty string
|
|
31183
31134
|
*/
|
|
31184
31135
|
PrintUrlPipe.prototype.transform = function (remoteUrl) {
|
|
31185
|
-
if (remoteUrl
|
|
31136
|
+
if ((remoteUrl === null || remoteUrl === void 0 ? void 0 : remoteUrl.length) > 0) {
|
|
31186
31137
|
var printServiceUrlPathname = void 0;
|
|
31187
31138
|
/**
|
|
31188
31139
|
* Check navigator.userAgent to see if the browser is IE or not. Check for either the browser name, "MSIE", or
|
|
@@ -31198,7 +31149,7 @@
|
|
|
31198
31149
|
printServiceUrlPathname = urlParser.pathname;
|
|
31199
31150
|
if (printServiceUrlPathname[0] !== '/') {
|
|
31200
31151
|
// Fix for IE11; it returns the pathname without leading slash
|
|
31201
|
-
printServiceUrlPathname =
|
|
31152
|
+
printServiceUrlPathname = "/" + printServiceUrlPathname;
|
|
31202
31153
|
}
|
|
31203
31154
|
}
|
|
31204
31155
|
else {
|
|
@@ -31401,10 +31352,10 @@
|
|
|
31401
31352
|
};
|
|
31402
31353
|
CaseViewerComponent.prototype.setUserAccessType = function (caseDetails) {
|
|
31403
31354
|
if (caseDetails && Array.isArray(caseDetails.metadataFields)) {
|
|
31404
|
-
var
|
|
31405
|
-
var
|
|
31406
|
-
this.accessGranted =
|
|
31407
|
-
this.userAccessType =
|
|
31355
|
+
var accessProcess = caseDetails.metadataFields.find(function (metadataField) { return metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_PROCEES_ID; });
|
|
31356
|
+
var accessGranted = caseDetails.metadataFields.find(function (metadataField) { return metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_GRANTED_ID; });
|
|
31357
|
+
this.accessGranted = accessGranted ? accessGranted.value !== CaseViewerComponent.BASIC_USER_ACCESS_TYPES : false;
|
|
31358
|
+
this.userAccessType = accessProcess ? accessProcess.value : null;
|
|
31408
31359
|
}
|
|
31409
31360
|
};
|
|
31410
31361
|
CaseViewerComponent.prototype.isDataLoaded = function () {
|
|
@@ -32700,11 +32651,11 @@
|
|
|
32700
32651
|
};
|
|
32701
32652
|
this.$roleAssignmentResponseSubscription = this.casesService.createChallengedAccessRequest(caseId_1, challengedAccessRequest)
|
|
32702
32653
|
.pipe(operators.switchMap(function () { return _this.caseNotifier.fetchAndRefresh(caseId_1); }))
|
|
32703
|
-
.subscribe(function (
|
|
32654
|
+
.subscribe(function () {
|
|
32704
32655
|
// Would have been nice to pass the caseId within state.data, but this isn't part of NavigationExtras until
|
|
32705
32656
|
// Angular 7.2!
|
|
32706
32657
|
_this.router.navigate(['success'], { relativeTo: _this.route });
|
|
32707
|
-
}, function (
|
|
32658
|
+
}, function () {
|
|
32708
32659
|
// Navigate to error page
|
|
32709
32660
|
});
|
|
32710
32661
|
}
|
|
@@ -32718,7 +32669,7 @@
|
|
|
32718
32669
|
}
|
|
32719
32670
|
};
|
|
32720
32671
|
CaseChallengedAccessRequestComponent.prototype.inputEmpty = function (input) {
|
|
32721
|
-
return input.value
|
|
32672
|
+
return input.value === null || input.value.trim().length === 0;
|
|
32722
32673
|
};
|
|
32723
32674
|
return CaseChallengedAccessRequestComponent;
|
|
32724
32675
|
}());
|
|
@@ -33342,11 +33293,11 @@
|
|
|
33342
33293
|
};
|
|
33343
33294
|
this.$roleAssignmentResponseSubscription = this.casesService.createSpecificAccessRequest(caseId_1, specificAccessRequest)
|
|
33344
33295
|
.pipe(operators.switchMap(function () { return _this.caseNotifier.fetchAndRefresh(caseId_1); }))
|
|
33345
|
-
.subscribe(function (
|
|
33296
|
+
.subscribe(function () {
|
|
33346
33297
|
// Would have been nice to pass the caseId within state.data, but this isn't part of NavigationExtras until
|
|
33347
33298
|
// Angular 7.2
|
|
33348
33299
|
_this.router.navigate(['success'], { relativeTo: _this.route });
|
|
33349
|
-
}, function (
|
|
33300
|
+
}, function () {
|
|
33350
33301
|
// Navigate to error page
|
|
33351
33302
|
});
|
|
33352
33303
|
}
|
|
@@ -33361,7 +33312,7 @@
|
|
|
33361
33312
|
}
|
|
33362
33313
|
};
|
|
33363
33314
|
CaseSpecificAccessRequestComponent.prototype.inputEmpty = function (input) {
|
|
33364
|
-
return input.value
|
|
33315
|
+
return input.value === null || input.value.trim().length === 0;
|
|
33365
33316
|
};
|
|
33366
33317
|
return CaseSpecificAccessRequestComponent;
|
|
33367
33318
|
}());
|
|
@@ -34262,7 +34213,7 @@
|
|
|
34262
34213
|
}
|
|
34263
34214
|
searchInputs.forEach(function (item) {
|
|
34264
34215
|
if (item.field.elementPath) {
|
|
34265
|
-
item.field.id = item.field.id +
|
|
34216
|
+
item.field.id = item.field.id + "." + item.field.elementPath;
|
|
34266
34217
|
}
|
|
34267
34218
|
item.field.label = item.label;
|
|
34268
34219
|
if (formValueObject) {
|
|
@@ -35529,24 +35480,24 @@
|
|
|
35529
35480
|
this.caseField.id = id;
|
|
35530
35481
|
return this;
|
|
35531
35482
|
};
|
|
35532
|
-
CaseFieldBuilder.prototype.withFieldType = function (
|
|
35533
|
-
this.caseField.field_type =
|
|
35483
|
+
CaseFieldBuilder.prototype.withFieldType = function (fieldType) {
|
|
35484
|
+
this.caseField.field_type = fieldType;
|
|
35534
35485
|
return this;
|
|
35535
35486
|
};
|
|
35536
|
-
CaseFieldBuilder.prototype.withDisplayContext = function (
|
|
35537
|
-
this.caseField.display_context =
|
|
35487
|
+
CaseFieldBuilder.prototype.withDisplayContext = function (displayContext) {
|
|
35488
|
+
this.caseField.display_context = displayContext;
|
|
35538
35489
|
return this;
|
|
35539
35490
|
};
|
|
35540
|
-
CaseFieldBuilder.prototype.withDisplayContextParameter = function (
|
|
35541
|
-
this.caseField.display_context_parameter =
|
|
35491
|
+
CaseFieldBuilder.prototype.withDisplayContextParameter = function (displayContextParameter) {
|
|
35492
|
+
this.caseField.display_context_parameter = displayContextParameter;
|
|
35542
35493
|
return this;
|
|
35543
35494
|
};
|
|
35544
35495
|
CaseFieldBuilder.prototype.withHidden = function (hidden) {
|
|
35545
35496
|
this.caseField.hidden = hidden;
|
|
35546
35497
|
return this;
|
|
35547
35498
|
};
|
|
35548
|
-
CaseFieldBuilder.prototype.withHintText = function (
|
|
35549
|
-
this.caseField.hint_text =
|
|
35499
|
+
CaseFieldBuilder.prototype.withHintText = function (hintText) {
|
|
35500
|
+
this.caseField.hint_text = hintText;
|
|
35550
35501
|
return this;
|
|
35551
35502
|
};
|
|
35552
35503
|
CaseFieldBuilder.prototype.withLabel = function (label) {
|
|
@@ -35557,12 +35508,12 @@
|
|
|
35557
35508
|
this.caseField.order = order;
|
|
35558
35509
|
return this;
|
|
35559
35510
|
};
|
|
35560
|
-
CaseFieldBuilder.prototype.withSecurityLabel = function (
|
|
35561
|
-
this.caseField.security_label =
|
|
35511
|
+
CaseFieldBuilder.prototype.withSecurityLabel = function (securityLabel) {
|
|
35512
|
+
this.caseField.security_label = securityLabel;
|
|
35562
35513
|
return this;
|
|
35563
35514
|
};
|
|
35564
|
-
CaseFieldBuilder.prototype.withShowCondition = function (
|
|
35565
|
-
this.caseField.show_condition =
|
|
35515
|
+
CaseFieldBuilder.prototype.withShowCondition = function (showCondition) {
|
|
35516
|
+
this.caseField.show_condition = showCondition;
|
|
35566
35517
|
return this;
|
|
35567
35518
|
};
|
|
35568
35519
|
CaseFieldBuilder.prototype.withShowSummaryContentOption = function (option) {
|
|
@@ -35590,21 +35541,21 @@
|
|
|
35590
35541
|
complex_fields: []
|
|
35591
35542
|
};
|
|
35592
35543
|
};
|
|
35593
|
-
var createCaseEventTrigger = function (id, name,
|
|
35594
|
-
if (
|
|
35595
|
-
if (
|
|
35544
|
+
var createCaseEventTrigger = function (id, name, caseId, showSummary, caseFields, wizardPages, canSaveDraft) {
|
|
35545
|
+
if (wizardPages === void 0) { wizardPages = []; }
|
|
35546
|
+
if (canSaveDraft === void 0) { canSaveDraft = false; }
|
|
35596
35547
|
var eventTrigger = new CaseEventTrigger();
|
|
35597
35548
|
eventTrigger.id = id;
|
|
35598
35549
|
eventTrigger.name = name;
|
|
35599
|
-
eventTrigger.case_id =
|
|
35600
|
-
eventTrigger.show_summary =
|
|
35601
|
-
eventTrigger.wizard_pages =
|
|
35550
|
+
eventTrigger.case_id = caseId;
|
|
35551
|
+
eventTrigger.show_summary = showSummary;
|
|
35552
|
+
eventTrigger.wizard_pages = wizardPages;
|
|
35602
35553
|
eventTrigger.event_token = 'test-token';
|
|
35603
|
-
eventTrigger.case_fields =
|
|
35604
|
-
eventTrigger.can_save_draft =
|
|
35554
|
+
eventTrigger.case_fields = caseFields;
|
|
35555
|
+
eventTrigger.can_save_draft = canSaveDraft;
|
|
35605
35556
|
return eventTrigger;
|
|
35606
35557
|
};
|
|
35607
|
-
var aCaseField = function (id, label, type,
|
|
35558
|
+
var aCaseField = function (id, label, type, displayContext, showSummaryContentOption, typeComplexFields, retainHiddenValue, hidden) {
|
|
35608
35559
|
if (typeComplexFields === void 0) { typeComplexFields = []; }
|
|
35609
35560
|
return ({
|
|
35610
35561
|
id: id || 'personFirstName',
|
|
@@ -35613,10 +35564,10 @@
|
|
|
35613
35564
|
type: type || 'Text',
|
|
35614
35565
|
complex_fields: typeComplexFields || []
|
|
35615
35566
|
},
|
|
35616
|
-
display_context:
|
|
35567
|
+
display_context: displayContext || 'OPTIONAL',
|
|
35617
35568
|
label: label || 'First name',
|
|
35618
|
-
show_summary_content_option:
|
|
35619
|
-
retain_hidden_value:
|
|
35569
|
+
show_summary_content_option: showSummaryContentOption,
|
|
35570
|
+
retain_hidden_value: retainHiddenValue || false,
|
|
35620
35571
|
hidden: hidden || false
|
|
35621
35572
|
});
|
|
35622
35573
|
};
|
|
@@ -35658,48 +35609,48 @@
|
|
|
35658
35609
|
complexFieldOverride.display_context = 'HIDDEN';
|
|
35659
35610
|
return complexFieldOverride;
|
|
35660
35611
|
};
|
|
35661
|
-
var createCaseField = function (id, label, hint, fieldType,
|
|
35612
|
+
var createCaseField = function (id, label, hint, fieldType, displayContext, order, showCondition, acls, hidden) {
|
|
35662
35613
|
if (order === void 0) { order = undefined; }
|
|
35663
|
-
if (
|
|
35664
|
-
if (
|
|
35614
|
+
if (showCondition === void 0) { showCondition = undefined; }
|
|
35615
|
+
if (acls === void 0) { acls = undefined; }
|
|
35665
35616
|
return CaseFieldBuilder.create()
|
|
35666
35617
|
.withId(id || 'personFirstName')
|
|
35667
35618
|
.withFieldType(fieldType || textFieldType())
|
|
35668
|
-
.withDisplayContext(
|
|
35619
|
+
.withDisplayContext(displayContext || 'OPTIONAL')
|
|
35669
35620
|
.withLabel(label || 'First name')
|
|
35670
35621
|
.withHintText(hint || 'First name hint text')
|
|
35671
35622
|
.withShowSummaryContentOption(0)
|
|
35672
35623
|
.withOrder(order)
|
|
35673
|
-
.withShowCondition(
|
|
35674
|
-
.withACLs(
|
|
35624
|
+
.withShowCondition(showCondition || undefined)
|
|
35625
|
+
.withACLs(acls)
|
|
35675
35626
|
.withHidden(hidden || false)
|
|
35676
35627
|
.build();
|
|
35677
35628
|
};
|
|
35678
|
-
var newCaseField = function (id, label, hint, fieldType,
|
|
35629
|
+
var newCaseField = function (id, label, hint, fieldType, displayContext, order) {
|
|
35679
35630
|
if (order === void 0) { order = undefined; }
|
|
35680
35631
|
return CaseFieldBuilder.create()
|
|
35681
35632
|
.withId(id || 'personFirstName')
|
|
35682
35633
|
.withFieldType(fieldType || textFieldType())
|
|
35683
|
-
.withDisplayContext(
|
|
35634
|
+
.withDisplayContext(displayContext || 'OPTIONAL')
|
|
35684
35635
|
.withHintText(hint || 'First name hint text')
|
|
35685
35636
|
.withLabel(label || 'First name')
|
|
35686
35637
|
.withOrder(order)
|
|
35687
35638
|
.withShowSummaryContentOption(0);
|
|
35688
35639
|
};
|
|
35689
|
-
var createFieldType = function (typeId, type,
|
|
35690
|
-
if (
|
|
35691
|
-
if (
|
|
35640
|
+
var createFieldType = function (typeId, type, complexFields, collectionFieldType) {
|
|
35641
|
+
if (complexFields === void 0) { complexFields = []; }
|
|
35642
|
+
if (collectionFieldType === void 0) { collectionFieldType = undefined; }
|
|
35692
35643
|
return {
|
|
35693
35644
|
id: typeId || 'Text',
|
|
35694
35645
|
type: type || 'Text',
|
|
35695
|
-
complex_fields:
|
|
35696
|
-
collection_field_type:
|
|
35646
|
+
complex_fields: complexFields || [],
|
|
35647
|
+
collection_field_type: collectionFieldType || undefined
|
|
35697
35648
|
};
|
|
35698
35649
|
};
|
|
35699
35650
|
var createFixedListFieldType = function (typeId, fixedListItems) {
|
|
35700
35651
|
if (fixedListItems === void 0) { fixedListItems = []; }
|
|
35701
35652
|
return {
|
|
35702
|
-
id:
|
|
35653
|
+
id: "FixedList-" + typeId,
|
|
35703
35654
|
type: 'FixedList',
|
|
35704
35655
|
fixed_list_items: fixedListItems || []
|
|
35705
35656
|
};
|
|
@@ -35707,18 +35658,18 @@
|
|
|
35707
35658
|
var createMultiSelectListFieldType = function (typeId, fixedListItems) {
|
|
35708
35659
|
if (fixedListItems === void 0) { fixedListItems = []; }
|
|
35709
35660
|
return {
|
|
35710
|
-
id:
|
|
35661
|
+
id: "MultiSelectList-" + typeId,
|
|
35711
35662
|
type: 'MultiSelectList',
|
|
35712
35663
|
fixed_list_items: fixedListItems || []
|
|
35713
35664
|
};
|
|
35714
35665
|
};
|
|
35715
|
-
var createACL = function (role,
|
|
35666
|
+
var createACL = function (role, aclCreate, aclRead, aclUpdate, aclDelete) {
|
|
35716
35667
|
return ({
|
|
35717
35668
|
role: role || 'roleX',
|
|
35718
|
-
create:
|
|
35719
|
-
read:
|
|
35720
|
-
update:
|
|
35721
|
-
delete:
|
|
35669
|
+
create: aclCreate,
|
|
35670
|
+
read: aclRead,
|
|
35671
|
+
update: aclUpdate,
|
|
35672
|
+
delete: aclDelete
|
|
35722
35673
|
});
|
|
35723
35674
|
};
|
|
35724
35675
|
|
|
@@ -35937,7 +35888,6 @@
|
|
|
35937
35888
|
exports.FormatTranslatorService = FormatTranslatorService;
|
|
35938
35889
|
exports.GreyBarService = GreyBarService;
|
|
35939
35890
|
exports.HRef = HRef;
|
|
35940
|
-
exports.HasLoadingState = HasLoadingState;
|
|
35941
35891
|
exports.HeaderBarComponent = HeaderBarComponent;
|
|
35942
35892
|
exports.HeadersModule = HeadersModule;
|
|
35943
35893
|
exports.HttpError = HttpError;
|