@hmcts/ccd-case-ui-toolkit 7.3.68-pofcc-split1 → 7.3.68-pofcc-156
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/fesm2022/hmcts-ccd-case-ui-toolkit.mjs +2229 -2221
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/index.d.ts +31 -39
- package/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -12,11 +12,11 @@ import { BehaviorSubject, throwError, Subject, EMPTY, concat, defer, timer, Obse
|
|
|
12
12
|
import { distinctUntilChanged, catchError, map, switchMap, repeat, retry, publish, refCount, debounceTime, delay, finalize, timeout, mergeMap, retryWhen, tap, delayWhen, publishReplay, take, first, takeUntil, filter } from 'rxjs/operators';
|
|
13
13
|
import * as i1$2 from '@angular/common/http';
|
|
14
14
|
import { HttpErrorResponse, HttpHeaders, HttpParams } from '@angular/common/http';
|
|
15
|
-
import { Type, Exclude, Expose, plainToClassFromExist, plainToClass } from 'class-transformer';
|
|
16
|
-
import moment from 'moment';
|
|
17
15
|
import { __decorate, __metadata } from 'tslib';
|
|
16
|
+
import { Type, Exclude, Expose, plainToClassFromExist, plainToClass } from 'class-transformer';
|
|
18
17
|
import * as _ from 'underscore';
|
|
19
18
|
import 'reflect-metadata';
|
|
19
|
+
import moment from 'moment';
|
|
20
20
|
import { generate } from 'pegjs';
|
|
21
21
|
import { StateMachine } from '@edium/fsm';
|
|
22
22
|
import * as i1$3 from '@angular/material/legacy-dialog';
|
|
@@ -1847,2326 +1847,2428 @@ class SessionStorageGuard {
|
|
|
1847
1847
|
args: [SessionJsonErrorLogger]
|
|
1848
1848
|
}] }], null); })();
|
|
1849
1849
|
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1850
|
+
// tslint:disable:variable-name
|
|
1851
|
+
class AddressModel {
|
|
1852
|
+
AddressLine1 = '';
|
|
1853
|
+
AddressLine2 = '';
|
|
1854
|
+
AddressLine3 = '';
|
|
1855
|
+
PostTown = '';
|
|
1856
|
+
County = '';
|
|
1857
|
+
PostCode = '';
|
|
1858
|
+
Country = '';
|
|
1856
1859
|
}
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|| userDetails.roles.some((role) => role.toLowerCase().includes(JUDGE)));
|
|
1860
|
+
|
|
1861
|
+
class Alert {
|
|
1862
|
+
level;
|
|
1863
|
+
message;
|
|
1862
1864
|
}
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1865
|
+
|
|
1866
|
+
// tslint:disable:variable-name
|
|
1867
|
+
class CaseDetails {
|
|
1868
|
+
id;
|
|
1869
|
+
jurisdiction;
|
|
1870
|
+
case_type_id;
|
|
1871
|
+
state;
|
|
1872
|
+
created_date;
|
|
1873
|
+
last_modified;
|
|
1874
|
+
locked_by_user_id;
|
|
1875
|
+
security_level;
|
|
1876
|
+
case_data;
|
|
1877
|
+
}
|
|
1878
|
+
|
|
1879
|
+
// tslint:disable:variable-name
|
|
1880
|
+
class CaseEventData {
|
|
1881
|
+
event;
|
|
1882
|
+
data;
|
|
1883
|
+
event_data; // full event data
|
|
1884
|
+
event_token;
|
|
1885
|
+
ignore_warning;
|
|
1886
|
+
draft_id;
|
|
1887
|
+
case_reference;
|
|
1888
|
+
}
|
|
1889
|
+
|
|
1890
|
+
class WizardPageField {
|
|
1891
|
+
case_field_id;
|
|
1892
|
+
order;
|
|
1893
|
+
page_column_no;
|
|
1894
|
+
complex_field_overrides;
|
|
1895
|
+
}
|
|
1896
|
+
|
|
1897
|
+
class FixedListItem {
|
|
1898
|
+
code;
|
|
1899
|
+
label;
|
|
1900
|
+
order;
|
|
1867
1901
|
}
|
|
1868
1902
|
|
|
1869
1903
|
// @dynamic
|
|
1870
|
-
class
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
this.appConfig = appConfig;
|
|
1880
|
-
this.sessionStorageService = sessionStorageService;
|
|
1881
|
-
}
|
|
1882
|
-
get isEnabled() {
|
|
1883
|
-
return this.activityUrl() && this.userAuthorised;
|
|
1884
|
-
}
|
|
1885
|
-
static DUMMY_CASE_REFERENCE = '0';
|
|
1886
|
-
userAuthorised = undefined;
|
|
1887
|
-
static handleHttpError(response) {
|
|
1888
|
-
const error = HttpErrorService.convertToHttpError(response);
|
|
1889
|
-
if (response?.status !== error.status) {
|
|
1890
|
-
error.status = response.status;
|
|
1891
|
-
}
|
|
1892
|
-
return error;
|
|
1893
|
-
}
|
|
1894
|
-
getOptions() {
|
|
1895
|
-
const userDetails = safeJsonParse(this.sessionStorageService.getItem(USER_DETAILS));
|
|
1896
|
-
let headers = new HttpHeaders().set('Content-Type', 'application/json');
|
|
1897
|
-
if (userDetails?.token) {
|
|
1898
|
-
headers = headers.set('Authorization', userDetails.token);
|
|
1899
|
-
}
|
|
1900
|
-
return {
|
|
1901
|
-
headers,
|
|
1902
|
-
withCredentials: true,
|
|
1903
|
-
observe: 'body',
|
|
1904
|
-
};
|
|
1905
|
-
}
|
|
1906
|
-
getActivities(...caseId) {
|
|
1907
|
-
try {
|
|
1908
|
-
const options = this.getOptions();
|
|
1909
|
-
const url = `${this.activityUrl()}/cases/${caseId.join(',')}/activity`;
|
|
1910
|
-
return this.http
|
|
1911
|
-
.get(url, options, false, ActivityService.handleHttpError)
|
|
1912
|
-
.pipe(map(response => response));
|
|
1913
|
-
}
|
|
1914
|
-
catch (error) {
|
|
1915
|
-
this.logUserMayNotBeAuthenticated(error);
|
|
1916
|
-
}
|
|
1917
|
-
}
|
|
1918
|
-
postActivity(caseId, activity) {
|
|
1919
|
-
try {
|
|
1920
|
-
const options = this.getOptions();
|
|
1921
|
-
const url = `${this.activityUrl()}/cases/${caseId}/activity`;
|
|
1922
|
-
const body = { activity };
|
|
1923
|
-
return this.http
|
|
1924
|
-
.post(url, body, options, false)
|
|
1925
|
-
.pipe(map(response => response));
|
|
1926
|
-
}
|
|
1927
|
-
catch (error) {
|
|
1928
|
-
this.logUserMayNotBeAuthenticated(error);
|
|
1929
|
-
}
|
|
1930
|
-
}
|
|
1931
|
-
verifyUserIsAuthorized() {
|
|
1932
|
-
if (this.sessionStorageService.getItem(USER_DETAILS) && this.activityUrl() && this.userAuthorised === undefined) {
|
|
1933
|
-
this.getActivities(ActivityService.DUMMY_CASE_REFERENCE).subscribe(() => this.userAuthorised = true, error => {
|
|
1934
|
-
this.userAuthorised = [401, 403].indexOf(error.status) <= -1;
|
|
1935
|
-
});
|
|
1936
|
-
}
|
|
1937
|
-
}
|
|
1938
|
-
activityUrl() {
|
|
1939
|
-
return this.appConfig.getActivityUrl();
|
|
1940
|
-
}
|
|
1941
|
-
logUserMayNotBeAuthenticated(error) {
|
|
1942
|
-
this.logger.error('User may not be authenticated. Activity request was not sent.', { error });
|
|
1943
|
-
}
|
|
1944
|
-
static ɵfac = function ActivityService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ActivityService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig), i0.ɵɵinject(SessionStorageService)); };
|
|
1945
|
-
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ActivityService, factory: ActivityService.ɵfac });
|
|
1904
|
+
class FieldType {
|
|
1905
|
+
id;
|
|
1906
|
+
type;
|
|
1907
|
+
min;
|
|
1908
|
+
max;
|
|
1909
|
+
regular_expression;
|
|
1910
|
+
fixed_list_items;
|
|
1911
|
+
complex_fields;
|
|
1912
|
+
collection_field_type;
|
|
1946
1913
|
}
|
|
1947
|
-
(
|
|
1948
|
-
|
|
1949
|
-
|
|
1914
|
+
__decorate([
|
|
1915
|
+
Type(() => FixedListItem),
|
|
1916
|
+
__metadata("design:type", Array)
|
|
1917
|
+
], FieldType.prototype, "fixed_list_items", void 0);
|
|
1918
|
+
__decorate([
|
|
1919
|
+
Type(() => CaseField),
|
|
1920
|
+
__metadata("design:type", Array)
|
|
1921
|
+
], FieldType.prototype, "complex_fields", void 0);
|
|
1922
|
+
__decorate([
|
|
1923
|
+
Type(() => FieldType),
|
|
1924
|
+
__metadata("design:type", FieldType)
|
|
1925
|
+
], FieldType.prototype, "collection_field_type", void 0);
|
|
1950
1926
|
|
|
1951
1927
|
// @dynamic
|
|
1952
|
-
class
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1928
|
+
class CaseField {
|
|
1929
|
+
static logger = new StructuredLoggerService();
|
|
1930
|
+
id;
|
|
1931
|
+
hidden;
|
|
1932
|
+
hiddenCannotChange;
|
|
1933
|
+
label;
|
|
1934
|
+
originalLabel;
|
|
1935
|
+
noCacheLabel;
|
|
1936
|
+
order;
|
|
1937
|
+
parent;
|
|
1938
|
+
field_type;
|
|
1939
|
+
hint_text;
|
|
1940
|
+
security_label;
|
|
1941
|
+
display_context;
|
|
1942
|
+
display_context_parameter;
|
|
1943
|
+
month_format;
|
|
1944
|
+
show_condition;
|
|
1945
|
+
show_summary_change_option;
|
|
1946
|
+
show_summary_content_option;
|
|
1947
|
+
acls;
|
|
1948
|
+
metadata;
|
|
1949
|
+
formatted_value;
|
|
1950
|
+
retain_hidden_value;
|
|
1951
|
+
wizardProps;
|
|
1952
|
+
_value;
|
|
1953
|
+
_list_items = [];
|
|
1954
|
+
isTranslatedFlag = false;
|
|
1955
|
+
get value() {
|
|
1956
|
+
if (this.field_type && (this.field_type.type === 'DynamicList' || this.field_type.type === 'DynamicRadioList')) {
|
|
1957
|
+
return this._value && this._value.value ? this._value.value.code : this._value;
|
|
1980
1958
|
}
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
subject.subscribe(done);
|
|
1959
|
+
else if (this.field_type && this.field_type.type === 'DynamicMultiSelectList') {
|
|
1960
|
+
return this._value && this._value.value ? this._value.value : this._value;
|
|
1984
1961
|
}
|
|
1985
1962
|
else {
|
|
1986
|
-
|
|
1987
|
-
const wasEmpty = this.pendingRequests.size === 0;
|
|
1988
|
-
subject = new Subject();
|
|
1989
|
-
subject.subscribe(done);
|
|
1990
|
-
this.addPendingRequest(caseId, subject);
|
|
1991
|
-
if (wasEmpty) {
|
|
1992
|
-
this.ngZone.runOutsideAngular(() => {
|
|
1993
|
-
this.currentTimeoutHandle = setTimeout(() => this.ngZone.run(() => {
|
|
1994
|
-
this.flushRequests();
|
|
1995
|
-
}), this.batchCollectionDelayMs);
|
|
1996
|
-
});
|
|
1997
|
-
}
|
|
1998
|
-
}
|
|
1999
|
-
if (this.pendingRequests.size >= this.maxRequestsPerBatch) {
|
|
2000
|
-
this.flushRequests();
|
|
1963
|
+
return this._value;
|
|
2001
1964
|
}
|
|
2002
|
-
return subject;
|
|
2003
1965
|
}
|
|
2004
|
-
|
|
2005
|
-
if (this.
|
|
2006
|
-
|
|
1966
|
+
set value(value) {
|
|
1967
|
+
if (this.isDynamic()) {
|
|
1968
|
+
if (value && value instanceof Object && value.list_items) {
|
|
1969
|
+
this._list_items = value.list_items;
|
|
1970
|
+
}
|
|
1971
|
+
else if (!this._list_items || this._list_items.length === 0) {
|
|
1972
|
+
// Extract the list items from the current value if that's the only place they exist.
|
|
1973
|
+
this._list_items = this.list_items;
|
|
1974
|
+
if (!value || !value.value) {
|
|
1975
|
+
value = null;
|
|
1976
|
+
}
|
|
1977
|
+
}
|
|
2007
1978
|
}
|
|
1979
|
+
this._value = value;
|
|
2008
1980
|
}
|
|
2009
|
-
|
|
2010
|
-
if (this.
|
|
2011
|
-
|
|
2012
|
-
this.currentTimeoutHandle = undefined;
|
|
1981
|
+
get list_items() {
|
|
1982
|
+
if (this.isDynamic()) {
|
|
1983
|
+
return this._value && this._value.list_items ? this._value.list_items : this._list_items;
|
|
2013
1984
|
}
|
|
2014
|
-
|
|
2015
|
-
return;
|
|
1985
|
+
else {
|
|
1986
|
+
return this.field_type.fixed_list_items;
|
|
2016
1987
|
}
|
|
2017
|
-
const requests = new Map(this.pendingRequests);
|
|
2018
|
-
this.pendingRequests.clear();
|
|
2019
|
-
this.performBatchRequest(requests);
|
|
2020
1988
|
}
|
|
2021
|
-
|
|
2022
|
-
if (!this.
|
|
2023
|
-
|
|
1989
|
+
set list_items(items) {
|
|
1990
|
+
if ((items && !this._list_items) || (items?.length > this._list_items?.length)) {
|
|
1991
|
+
this._list_items = items;
|
|
2024
1992
|
}
|
|
2025
|
-
return this.polling(this.activityService.getActivities(...caseIds), this.pollConfig);
|
|
2026
|
-
}
|
|
2027
|
-
postViewActivity(caseId) {
|
|
2028
|
-
return this.postActivity(caseId, ActivityService.ACTIVITY_VIEW);
|
|
2029
|
-
}
|
|
2030
|
-
postEditActivity(caseId) {
|
|
2031
|
-
return this.postActivity(caseId, ActivityService.ACTIVITY_EDIT);
|
|
2032
|
-
}
|
|
2033
|
-
performBatchRequest(requests) {
|
|
2034
|
-
const caseIds = Array.from(requests.keys()).join();
|
|
2035
|
-
this.ngZone.runOutsideAngular(() => {
|
|
2036
|
-
// run polling outside angular zone so it does not trigger change detection
|
|
2037
|
-
this.pollActivitiesSubscription = this.pollActivities(caseIds).subscribe({
|
|
2038
|
-
// process activity inside zone so it triggers change detection for activity.component.ts
|
|
2039
|
-
next: (activities) => this.ngZone.run(() => {
|
|
2040
|
-
activities.forEach((activity) => {
|
|
2041
|
-
// Ignore activities returned for cases outside this local batch.
|
|
2042
|
-
requests.get(activity.caseId)?.next(activity);
|
|
2043
|
-
});
|
|
2044
|
-
}),
|
|
2045
|
-
error: (err) => this.ngZone.run(() => {
|
|
2046
|
-
this.logger.error('Error while polling activities.', { error: err });
|
|
2047
|
-
Array.from(requests.values()).forEach((subject) => subject.error(err));
|
|
2048
|
-
})
|
|
2049
|
-
});
|
|
2050
|
-
});
|
|
2051
1993
|
}
|
|
2052
|
-
|
|
2053
|
-
if (
|
|
2054
|
-
return
|
|
1994
|
+
get dateTimeEntryFormat() {
|
|
1995
|
+
if (this.isComplexDisplay()) {
|
|
1996
|
+
return null;
|
|
2055
1997
|
}
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
return this.polling(this.activityService.postActivity(caseId, activityType), pollingConfig);
|
|
2061
|
-
}
|
|
2062
|
-
addPendingRequest(caseId, subject) {
|
|
2063
|
-
this.pendingRequests.set(caseId, subject);
|
|
2064
|
-
// Components complete their returned Subject on destroy; remove it so a later same-case subscription gets a fresh Subject.
|
|
2065
|
-
subject.subscribe({
|
|
2066
|
-
complete: () => this.removePendingRequest(caseId, subject),
|
|
2067
|
-
error: () => this.removePendingRequest(caseId, subject)
|
|
2068
|
-
});
|
|
1998
|
+
if (this.display_context_parameter) {
|
|
1999
|
+
return this.extractBracketValue(this.display_context_parameter, '#DATETIMEENTRY');
|
|
2000
|
+
}
|
|
2001
|
+
return null;
|
|
2069
2002
|
}
|
|
2070
|
-
|
|
2071
|
-
if (this.
|
|
2072
|
-
return;
|
|
2003
|
+
get dateTimeDisplayFormat() {
|
|
2004
|
+
if (this.isComplexEntry()) {
|
|
2005
|
+
return null;
|
|
2073
2006
|
}
|
|
2074
|
-
this.
|
|
2075
|
-
|
|
2076
|
-
clearTimeout(this.currentTimeoutHandle);
|
|
2077
|
-
this.currentTimeoutHandle = undefined;
|
|
2007
|
+
if (this.display_context_parameter) {
|
|
2008
|
+
return this.extractBracketValue(this.display_context_parameter, '#DATETIMEDISPLAY');
|
|
2078
2009
|
}
|
|
2010
|
+
return null;
|
|
2079
2011
|
}
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
interval: options.interval,
|
|
2083
|
-
attempts: options.attempts ?? 9,
|
|
2084
|
-
exponentialUnit: options.exponentialUnit ?? 1000
|
|
2085
|
-
};
|
|
2086
|
-
return concat(request$, defer(() => timer(pollingOptions.interval).pipe(switchMap(() => request$))).pipe(repeat())).pipe(
|
|
2087
|
-
// Preserve consecutive-failure retry behaviour using the current RxJS retry config.
|
|
2088
|
-
retry({
|
|
2089
|
-
count: pollingOptions.attempts,
|
|
2090
|
-
delay: (_error, retryCount) => timer(this.getExponentialRetryDelay(retryCount, pollingOptions.exponentialUnit)),
|
|
2091
|
-
resetOnSuccess: true
|
|
2092
|
-
}));
|
|
2012
|
+
isComplexDisplay() {
|
|
2013
|
+
return (this.isComplex() || this.isCollection()) && this.isReadonly();
|
|
2093
2014
|
}
|
|
2094
|
-
|
|
2095
|
-
return
|
|
2015
|
+
isComplexEntry() {
|
|
2016
|
+
return (this.isComplex() || this.isCollection()) && (this.isOptional() || this.isMandatory());
|
|
2096
2017
|
}
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ActivityPollingService, [{
|
|
2101
|
-
type: Injectable
|
|
2102
|
-
}], () => [{ type: ActivityService }, { type: i0.NgZone }, { type: AbstractAppConfig }], null); })();
|
|
2103
|
-
|
|
2104
|
-
function ActivityComponent_div_0_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
2105
|
-
i0.ɵɵelementStart(0, "div");
|
|
2106
|
-
i0.ɵɵelement(1, "ccd-activity-icon", 5);
|
|
2107
|
-
i0.ɵɵpipe(2, "rpxTranslate");
|
|
2108
|
-
i0.ɵɵelementEnd();
|
|
2109
|
-
} if (rf & 2) {
|
|
2110
|
-
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
2111
|
-
i0.ɵɵclassProp("activityEditorsAndViewersIcons", ctx_r0.viewersPresent())("activityEditorsIcon", !ctx_r0.viewersPresent());
|
|
2112
|
-
i0.ɵɵadvance();
|
|
2113
|
-
i0.ɵɵproperty("description", i0.ɵɵpipeBind1(2, 5, ctx_r0.editorsText));
|
|
2114
|
-
} }
|
|
2115
|
-
function ActivityComponent_div_0_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
2116
|
-
i0.ɵɵelementStart(0, "div", 6);
|
|
2117
|
-
i0.ɵɵelement(1, "ccd-activity-icon", 7);
|
|
2118
|
-
i0.ɵɵpipe(2, "rpxTranslate");
|
|
2119
|
-
i0.ɵɵelementEnd();
|
|
2120
|
-
} if (rf & 2) {
|
|
2121
|
-
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
2122
|
-
i0.ɵɵadvance();
|
|
2123
|
-
i0.ɵɵproperty("description", i0.ɵɵpipeBind1(2, 1, ctx_r0.viewersText));
|
|
2124
|
-
} }
|
|
2125
|
-
function ActivityComponent_div_0_div_3_Template(rf, ctx) { if (rf & 1) {
|
|
2126
|
-
i0.ɵɵelementStart(0, "div");
|
|
2127
|
-
i0.ɵɵelement(1, "ccd-activity-banner", 8);
|
|
2128
|
-
i0.ɵɵpipe(2, "rpxTranslate");
|
|
2129
|
-
i0.ɵɵelementEnd();
|
|
2130
|
-
} if (rf & 2) {
|
|
2131
|
-
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
2132
|
-
i0.ɵɵadvance();
|
|
2133
|
-
i0.ɵɵproperty("description", i0.ɵɵpipeBind1(2, 1, ctx_r0.editorsText));
|
|
2134
|
-
} }
|
|
2135
|
-
function ActivityComponent_div_0_div_4_Template(rf, ctx) { if (rf & 1) {
|
|
2136
|
-
i0.ɵɵelementStart(0, "div");
|
|
2137
|
-
i0.ɵɵelement(1, "ccd-activity-banner", 9);
|
|
2138
|
-
i0.ɵɵpipe(2, "rpxTranslate");
|
|
2139
|
-
i0.ɵɵelementEnd();
|
|
2140
|
-
} if (rf & 2) {
|
|
2141
|
-
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
2142
|
-
i0.ɵɵadvance();
|
|
2143
|
-
i0.ɵɵproperty("description", i0.ɵɵpipeBind1(2, 1, ctx_r0.viewersText));
|
|
2144
|
-
} }
|
|
2145
|
-
function ActivityComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
2146
|
-
i0.ɵɵelementStart(0, "div", 1);
|
|
2147
|
-
i0.ɵɵtemplate(1, ActivityComponent_div_0_div_1_Template, 3, 7, "div", 2)(2, ActivityComponent_div_0_div_2_Template, 3, 3, "div", 3)(3, ActivityComponent_div_0_div_3_Template, 3, 3, "div", 4)(4, ActivityComponent_div_0_div_4_Template, 3, 3, "div", 4);
|
|
2148
|
-
i0.ɵɵelementEnd();
|
|
2149
|
-
} if (rf & 2) {
|
|
2150
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
2151
|
-
i0.ɵɵadvance();
|
|
2152
|
-
i0.ɵɵproperty("ngIf", ctx_r0.displayMode === ctx_r0.dspMode.ICON && ctx_r0.editorsPresent());
|
|
2153
|
-
i0.ɵɵadvance();
|
|
2154
|
-
i0.ɵɵproperty("ngIf", ctx_r0.displayMode === ctx_r0.dspMode.ICON && ctx_r0.viewersPresent());
|
|
2155
|
-
i0.ɵɵadvance();
|
|
2156
|
-
i0.ɵɵproperty("ngIf", ctx_r0.displayMode === ctx_r0.dspMode.BANNER && ctx_r0.editorsPresent());
|
|
2157
|
-
i0.ɵɵadvance();
|
|
2158
|
-
i0.ɵɵproperty("ngIf", ctx_r0.displayMode === ctx_r0.dspMode.BANNER && ctx_r0.viewersPresent());
|
|
2159
|
-
} }
|
|
2160
|
-
class ActivityComponent {
|
|
2161
|
-
activityPollingService;
|
|
2162
|
-
activity;
|
|
2163
|
-
dspMode = DisplayMode;
|
|
2164
|
-
viewersText;
|
|
2165
|
-
editorsText;
|
|
2166
|
-
subscription;
|
|
2167
|
-
caseId;
|
|
2168
|
-
displayMode;
|
|
2169
|
-
VIEWERS_PREFIX = '';
|
|
2170
|
-
VIEWERS_SUFFIX = 'viewing this case';
|
|
2171
|
-
EDITORS_PREFIX = 'This case is being updated by ';
|
|
2172
|
-
EDITORS_SUFFIX = '';
|
|
2173
|
-
constructor(activityPollingService) {
|
|
2174
|
-
this.activityPollingService = activityPollingService;
|
|
2018
|
+
isReadonly() {
|
|
2019
|
+
return !_.isEmpty(this.display_context)
|
|
2020
|
+
&& this.display_context.toUpperCase() === 'READONLY';
|
|
2175
2021
|
}
|
|
2176
|
-
|
|
2177
|
-
this.
|
|
2178
|
-
|
|
2179
|
-
this.activity.editors = [];
|
|
2180
|
-
this.activity.unknownEditors = 0;
|
|
2181
|
-
this.activity.viewers = [];
|
|
2182
|
-
this.activity.unknownViewers = 0;
|
|
2183
|
-
this.viewersText = '';
|
|
2184
|
-
this.editorsText = '';
|
|
2185
|
-
this.subscription = this.activityPollingService.subscribeToActivity(this.caseId, newActivity => this.onActivityChange(newActivity));
|
|
2022
|
+
isOptional() {
|
|
2023
|
+
return !_.isEmpty(this.display_context)
|
|
2024
|
+
&& this.display_context.toUpperCase() === 'OPTIONAL';
|
|
2186
2025
|
}
|
|
2187
|
-
|
|
2188
|
-
this.
|
|
2189
|
-
|
|
2190
|
-
this.editorsText = this.generateDescription(this.EDITORS_PREFIX, this.EDITORS_SUFFIX, this.activity.editors, this.activity.unknownEditors);
|
|
2026
|
+
isMandatory() {
|
|
2027
|
+
return !_.isEmpty(this.display_context)
|
|
2028
|
+
&& this.display_context.toUpperCase() === 'MANDATORY';
|
|
2191
2029
|
}
|
|
2192
|
-
|
|
2193
|
-
return this.
|
|
2030
|
+
isCollection() {
|
|
2031
|
+
return this.field_type && this.field_type.type === 'Collection';
|
|
2194
2032
|
}
|
|
2195
|
-
|
|
2196
|
-
return this.
|
|
2033
|
+
isComplex() {
|
|
2034
|
+
return this.field_type && this.field_type.type === 'Complex';
|
|
2197
2035
|
}
|
|
2198
|
-
|
|
2199
|
-
|
|
2036
|
+
isDynamic() {
|
|
2037
|
+
const dynamicFieldTypes = ['DynamicList', 'DynamicRadioList', 'DynamicMultiSelectList'];
|
|
2038
|
+
if (!this.field_type) {
|
|
2039
|
+
return false;
|
|
2040
|
+
}
|
|
2041
|
+
return dynamicFieldTypes.some(t => t === this.field_type.type);
|
|
2200
2042
|
}
|
|
2201
|
-
|
|
2202
|
-
return
|
|
2043
|
+
isCaseLink() {
|
|
2044
|
+
return this.isComplex()
|
|
2045
|
+
&& this.field_type.id === 'CaseLink'
|
|
2046
|
+
&& this.field_type.complex_fields.some(cf => cf.id === 'CaseReference');
|
|
2203
2047
|
}
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2048
|
+
extractBracketValue(fmt, paramName, leftBracket = '(', rightBracket = ')') {
|
|
2049
|
+
fmt = fmt.split(',')
|
|
2050
|
+
.find(a => a.trim().startsWith(paramName));
|
|
2051
|
+
if (fmt) {
|
|
2052
|
+
const s = fmt.indexOf(leftBracket) + 1;
|
|
2053
|
+
const e = fmt.indexOf(rightBracket, s);
|
|
2054
|
+
if (e > s && s >= 0) {
|
|
2055
|
+
return fmt.substr(s, (e - s));
|
|
2056
|
+
}
|
|
2207
2057
|
}
|
|
2208
|
-
|
|
2058
|
+
return null;
|
|
2209
2059
|
}
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
if (
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
}
|
|
2217
|
-
else {
|
|
2218
|
-
resultText = this.replaceLastCommaWithAnd(resultText);
|
|
2219
|
-
}
|
|
2220
|
-
if (suffix.length > 0) {
|
|
2221
|
-
if (namesArray.length + unknownCount > 1) {
|
|
2222
|
-
resultText += ` are ${suffix}`;
|
|
2223
|
-
}
|
|
2224
|
-
else {
|
|
2225
|
-
resultText += ` is ${suffix}`;
|
|
2060
|
+
// Ascend the hierarchy to get the full path of the field
|
|
2061
|
+
getHierachicalId(curr) {
|
|
2062
|
+
const prefix = curr ? curr + "_" : "";
|
|
2063
|
+
if (prefix.length < 1024) {
|
|
2064
|
+
if (this.parent) {
|
|
2065
|
+
return this.parent.getHierachicalId(prefix + this.id);
|
|
2226
2066
|
}
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
}
|
|
2230
|
-
replaceLastCommaWithAnd(str) {
|
|
2231
|
-
return str.trim().replace(/,([^,]*)$/, ' and $1').split(' ').join(' ');
|
|
2232
|
-
}
|
|
2233
|
-
static ɵfac = function ActivityComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ActivityComponent)(i0.ɵɵdirectiveInject(ActivityPollingService)); };
|
|
2234
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ActivityComponent, selectors: [["ccd-activity"]], inputs: { caseId: "caseId", displayMode: "displayMode" }, standalone: false, decls: 1, vars: 1, consts: [["class", "activityComponent", 4, "ngIf"], [1, "activityComponent"], [3, "activityEditorsAndViewersIcons", "activityEditorsIcon", 4, "ngIf"], ["class", "activityViewersIcon", 4, "ngIf"], [4, "ngIf"], ["imageLink", "assets/img/editor.png", 3, "description"], [1, "activityViewersIcon"], ["imageLink", "assets/img/viewer.png", 3, "description"], ["imageLink", "assets/img/editorBanner.png", "bannerType", "editor", 3, "description"], ["imageLink", "assets/img/viewerBanner.png", "bannerType", "viewer", 3, "description"]], template: function ActivityComponent_Template(rf, ctx) { if (rf & 1) {
|
|
2235
|
-
i0.ɵɵtemplate(0, ActivityComponent_div_0_Template, 5, 4, "div", 0);
|
|
2236
|
-
} if (rf & 2) {
|
|
2237
|
-
i0.ɵɵproperty("ngIf", ctx.isActivityEnabled());
|
|
2238
|
-
} }, dependencies: [i5.NgIf, ActivityBannerComponent, ActivityIconComponent, i1.RpxTranslatePipe], styles: [".activityEditorsIcon[_ngcontent-%COMP%]{margin-left:14px}.activityEditorsAndViewersIcons[_ngcontent-%COMP%], .activityViewersIcon[_ngcontent-%COMP%]{float:left;margin-left:14px}"] });
|
|
2239
|
-
}
|
|
2240
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ActivityComponent, [{
|
|
2241
|
-
type: Component,
|
|
2242
|
-
args: [{ selector: 'ccd-activity', standalone: false, template: "<div class=\"activityComponent\" *ngIf=\"isActivityEnabled()\">\n <div *ngIf=\"displayMode === dspMode.ICON && editorsPresent()\" [class.activityEditorsAndViewersIcons]=\"viewersPresent()\" [class.activityEditorsIcon]=\"!viewersPresent()\">\n <ccd-activity-icon imageLink=\"assets/img/editor.png\" [description]=\"editorsText | rpxTranslate\"></ccd-activity-icon>\n </div>\n <div *ngIf=\"displayMode === dspMode.ICON && viewersPresent()\" class=\"activityViewersIcon\">\n <ccd-activity-icon imageLink=\"assets/img/viewer.png\" [description]=\"viewersText | rpxTranslate\"></ccd-activity-icon>\n </div>\n <div *ngIf=\"displayMode === dspMode.BANNER && editorsPresent()\">\n <ccd-activity-banner imageLink=\"assets/img/editorBanner.png\" [description]=\"editorsText | rpxTranslate\" bannerType=\"editor\">\n </ccd-activity-banner>\n </div>\n <div *ngIf=\"displayMode === dspMode.BANNER && viewersPresent()\">\n <ccd-activity-banner imageLink=\"assets/img/viewerBanner.png\" [description]=\"viewersText | rpxTranslate\" bannerType=\"viewer\">\n </ccd-activity-banner>\n </div>\n</div>\n", styles: [".activityEditorsIcon{margin-left:14px}.activityEditorsAndViewersIcons,.activityViewersIcon{float:left;margin-left:14px}\n"] }]
|
|
2243
|
-
}], () => [{ type: ActivityPollingService }], { caseId: [{
|
|
2244
|
-
type: Input
|
|
2245
|
-
}], displayMode: [{
|
|
2246
|
-
type: Input
|
|
2247
|
-
}] }); })();
|
|
2248
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ActivityComponent, { className: "ActivityComponent", filePath: "lib/shared/components/activity/activity.component.ts", lineNumber: 12 }); })();
|
|
2249
|
-
|
|
2250
|
-
class ActivityModule {
|
|
2251
|
-
static ɵfac = function ActivityModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ActivityModule)(); };
|
|
2252
|
-
static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: ActivityModule });
|
|
2253
|
-
static ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ providers: [
|
|
2254
|
-
ActivityService,
|
|
2255
|
-
ActivityPollingService,
|
|
2256
|
-
SessionStorageService,
|
|
2257
|
-
], imports: [CommonModule,
|
|
2258
|
-
RouterModule,
|
|
2259
|
-
RpxTranslationModule.forChild()] });
|
|
2260
|
-
}
|
|
2261
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ActivityModule, [{
|
|
2262
|
-
type: NgModule,
|
|
2263
|
-
args: [{
|
|
2264
|
-
imports: [
|
|
2265
|
-
CommonModule,
|
|
2266
|
-
RouterModule,
|
|
2267
|
-
RpxTranslationModule.forChild()
|
|
2268
|
-
],
|
|
2269
|
-
declarations: [
|
|
2270
|
-
ActivityComponent,
|
|
2271
|
-
ActivityBannerComponent,
|
|
2272
|
-
ActivityIconComponent,
|
|
2273
|
-
],
|
|
2274
|
-
exports: [
|
|
2275
|
-
ActivityComponent,
|
|
2276
|
-
ActivityBannerComponent,
|
|
2277
|
-
ActivityIconComponent,
|
|
2278
|
-
],
|
|
2279
|
-
providers: [
|
|
2280
|
-
ActivityService,
|
|
2281
|
-
ActivityPollingService,
|
|
2282
|
-
SessionStorageService,
|
|
2283
|
-
]
|
|
2284
|
-
}]
|
|
2285
|
-
}], null, null); })();
|
|
2286
|
-
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(ActivityModule, { declarations: [ActivityComponent,
|
|
2287
|
-
ActivityBannerComponent,
|
|
2288
|
-
ActivityIconComponent], imports: [CommonModule,
|
|
2289
|
-
RouterModule, i1.RpxTranslationModule], exports: [ActivityComponent,
|
|
2290
|
-
ActivityBannerComponent,
|
|
2291
|
-
ActivityIconComponent] }); })();
|
|
2292
|
-
|
|
2293
|
-
class AlertService {
|
|
2294
|
-
router;
|
|
2295
|
-
rpxTranslationService;
|
|
2296
|
-
// the preserved messages
|
|
2297
|
-
preservedError = '';
|
|
2298
|
-
preservedWarning = '';
|
|
2299
|
-
preservedSuccess = '';
|
|
2300
|
-
// TODO: Remove
|
|
2301
|
-
message;
|
|
2302
|
-
level;
|
|
2303
|
-
successes;
|
|
2304
|
-
errors;
|
|
2305
|
-
warnings;
|
|
2306
|
-
// TODO: Remove
|
|
2307
|
-
alerts;
|
|
2308
|
-
successObserver;
|
|
2309
|
-
errorObserver;
|
|
2310
|
-
warningObserver;
|
|
2311
|
-
// TODO: Remove
|
|
2312
|
-
alertObserver;
|
|
2313
|
-
preserveAlerts = false;
|
|
2314
|
-
constructor(router, rpxTranslationService) {
|
|
2315
|
-
this.router = router;
|
|
2316
|
-
this.rpxTranslationService = rpxTranslationService;
|
|
2317
|
-
this.successes = Observable
|
|
2318
|
-
.create(observer => this.successObserver = observer).pipe(publish(), refCount());
|
|
2319
|
-
this.successes.subscribe();
|
|
2320
|
-
this.errors = Observable
|
|
2321
|
-
.create(observer => this.errorObserver = observer).pipe(publish(), refCount());
|
|
2322
|
-
this.errors.subscribe();
|
|
2323
|
-
this.warnings = Observable
|
|
2324
|
-
.create(observer => this.warningObserver = observer).pipe(publish(), refCount());
|
|
2325
|
-
this.warnings.subscribe();
|
|
2326
|
-
// TODO: Remove
|
|
2327
|
-
this.alerts = Observable
|
|
2328
|
-
.create(observer => this.alertObserver = observer).pipe(publish(), refCount());
|
|
2329
|
-
this.alerts.subscribe();
|
|
2330
|
-
this.router
|
|
2331
|
-
.events
|
|
2332
|
-
.subscribe(event => {
|
|
2333
|
-
if (event instanceof NavigationStart) {
|
|
2334
|
-
// if there is no longer a preserve alerts setting for the page then clear all observers and preserved messages
|
|
2335
|
-
if (!this.preserveAlerts) {
|
|
2336
|
-
this.clear();
|
|
2337
|
-
}
|
|
2338
|
-
// if not, then set the preserving of alerts to false so rendering to a new page
|
|
2339
|
-
this.preserveAlerts = false;
|
|
2067
|
+
else {
|
|
2068
|
+
return prefix + this.id;
|
|
2340
2069
|
}
|
|
2341
|
-
});
|
|
2342
|
-
}
|
|
2343
|
-
clear() {
|
|
2344
|
-
this.successObserver.next(null);
|
|
2345
|
-
this.errorObserver.next(null);
|
|
2346
|
-
this.warningObserver.next(null);
|
|
2347
|
-
this.preservedError = '';
|
|
2348
|
-
this.preservedWarning = '';
|
|
2349
|
-
this.preservedSuccess = '';
|
|
2350
|
-
// EUI-3381.
|
|
2351
|
-
this.alertObserver.next(null);
|
|
2352
|
-
this.message = '';
|
|
2353
|
-
}
|
|
2354
|
-
error({ phrase, replacements }) {
|
|
2355
|
-
const message = this.getTranslationWithReplacements(phrase, replacements);
|
|
2356
|
-
this.preservedError = this.preserveMessages(message);
|
|
2357
|
-
const alert = { level: 'error', message };
|
|
2358
|
-
this.errorObserver.next(alert);
|
|
2359
|
-
// EUI-3381.
|
|
2360
|
-
this.push(alert);
|
|
2361
|
-
}
|
|
2362
|
-
warning({ phrase, replacements }) {
|
|
2363
|
-
const message = this.getTranslationWithReplacements(phrase, replacements);
|
|
2364
|
-
this.preservedWarning = this.preserveMessages(message);
|
|
2365
|
-
const alert = { level: 'warning', message };
|
|
2366
|
-
this.warningObserver.next(alert);
|
|
2367
|
-
// EUI-3381.
|
|
2368
|
-
this.push(alert);
|
|
2369
|
-
}
|
|
2370
|
-
success({ preserve, phrase, replacements }) {
|
|
2371
|
-
const message = this.getTranslationWithReplacements(phrase, replacements);
|
|
2372
|
-
this.preserveAlerts = preserve || this.preserveAlerts;
|
|
2373
|
-
const alert = { level: 'success', message };
|
|
2374
|
-
this.preservedSuccess = this.preserveMessages(message);
|
|
2375
|
-
this.successObserver.next(alert);
|
|
2376
|
-
// EUI-3381.
|
|
2377
|
-
this.push(alert);
|
|
2378
|
-
}
|
|
2379
|
-
getTranslationWithReplacements(phrase, replacements) {
|
|
2380
|
-
let message;
|
|
2381
|
-
if (replacements) {
|
|
2382
|
-
this.rpxTranslationService.getTranslationWithReplacements$(phrase, replacements).subscribe(translation => {
|
|
2383
|
-
message = translation;
|
|
2384
|
-
});
|
|
2385
2070
|
}
|
|
2386
2071
|
else {
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
});
|
|
2072
|
+
CaseField.logger.error('Path too long, possible circular reference in case field hierarchy.');
|
|
2073
|
+
return this.id;
|
|
2390
2074
|
}
|
|
2391
|
-
return message;
|
|
2392
2075
|
}
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
if (!urlInfo) {
|
|
2396
|
-
this.preserveAlerts = preserve;
|
|
2397
|
-
}
|
|
2398
|
-
else {
|
|
2399
|
-
// check if the url includes the sting given
|
|
2400
|
-
this.preserveAlerts = this.currentUrlIncludesInfo(preserve, urlInfo);
|
|
2401
|
-
}
|
|
2076
|
+
set isTranslated(val) {
|
|
2077
|
+
this.isTranslatedFlag = val;
|
|
2402
2078
|
}
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
for (const urlSnip of urlInfo) {
|
|
2406
|
-
if (!this.router.url.includes(urlSnip)) {
|
|
2407
|
-
// return the opposite boolean value if the router does not include one of the strings
|
|
2408
|
-
return !preserve;
|
|
2409
|
-
}
|
|
2410
|
-
}
|
|
2411
|
-
// return the boolean value if all strings are in the url
|
|
2412
|
-
return preserve;
|
|
2079
|
+
get isTranslated() {
|
|
2080
|
+
return this.isTranslatedFlag;
|
|
2413
2081
|
}
|
|
2414
|
-
|
|
2415
|
-
|
|
2082
|
+
}
|
|
2083
|
+
__decorate([
|
|
2084
|
+
Exclude(),
|
|
2085
|
+
__metadata("design:type", CaseField)
|
|
2086
|
+
], CaseField.prototype, "parent", void 0);
|
|
2087
|
+
__decorate([
|
|
2088
|
+
Type(() => FieldType),
|
|
2089
|
+
__metadata("design:type", FieldType)
|
|
2090
|
+
], CaseField.prototype, "field_type", void 0);
|
|
2091
|
+
__decorate([
|
|
2092
|
+
Type(() => WizardPageField),
|
|
2093
|
+
__metadata("design:type", WizardPageField)
|
|
2094
|
+
], CaseField.prototype, "wizardProps", void 0);
|
|
2095
|
+
__decorate([
|
|
2096
|
+
Expose(),
|
|
2097
|
+
__metadata("design:type", Object),
|
|
2098
|
+
__metadata("design:paramtypes", [Object])
|
|
2099
|
+
], CaseField.prototype, "value", null);
|
|
2100
|
+
__decorate([
|
|
2101
|
+
Expose(),
|
|
2102
|
+
__metadata("design:type", Object),
|
|
2103
|
+
__metadata("design:paramtypes", [Object])
|
|
2104
|
+
], CaseField.prototype, "list_items", null);
|
|
2105
|
+
__decorate([
|
|
2106
|
+
Expose(),
|
|
2107
|
+
__metadata("design:type", String),
|
|
2108
|
+
__metadata("design:paramtypes", [])
|
|
2109
|
+
], CaseField.prototype, "dateTimeEntryFormat", null);
|
|
2110
|
+
__decorate([
|
|
2111
|
+
Expose(),
|
|
2112
|
+
__metadata("design:type", String),
|
|
2113
|
+
__metadata("design:paramtypes", [])
|
|
2114
|
+
], CaseField.prototype, "dateTimeDisplayFormat", null);
|
|
2115
|
+
__decorate([
|
|
2116
|
+
Expose(),
|
|
2117
|
+
__metadata("design:type", Function),
|
|
2118
|
+
__metadata("design:paramtypes", []),
|
|
2119
|
+
__metadata("design:returntype", void 0)
|
|
2120
|
+
], CaseField.prototype, "isComplexDisplay", null);
|
|
2121
|
+
__decorate([
|
|
2122
|
+
Expose(),
|
|
2123
|
+
__metadata("design:type", Function),
|
|
2124
|
+
__metadata("design:paramtypes", []),
|
|
2125
|
+
__metadata("design:returntype", void 0)
|
|
2126
|
+
], CaseField.prototype, "isComplexEntry", null);
|
|
2127
|
+
__decorate([
|
|
2128
|
+
Expose(),
|
|
2129
|
+
__metadata("design:type", Function),
|
|
2130
|
+
__metadata("design:paramtypes", []),
|
|
2131
|
+
__metadata("design:returntype", void 0)
|
|
2132
|
+
], CaseField.prototype, "isReadonly", null);
|
|
2133
|
+
__decorate([
|
|
2134
|
+
Expose(),
|
|
2135
|
+
__metadata("design:type", Function),
|
|
2136
|
+
__metadata("design:paramtypes", []),
|
|
2137
|
+
__metadata("design:returntype", void 0)
|
|
2138
|
+
], CaseField.prototype, "isOptional", null);
|
|
2139
|
+
__decorate([
|
|
2140
|
+
Expose(),
|
|
2141
|
+
__metadata("design:type", Function),
|
|
2142
|
+
__metadata("design:paramtypes", []),
|
|
2143
|
+
__metadata("design:returntype", void 0)
|
|
2144
|
+
], CaseField.prototype, "isMandatory", null);
|
|
2145
|
+
__decorate([
|
|
2146
|
+
Expose(),
|
|
2147
|
+
__metadata("design:type", Function),
|
|
2148
|
+
__metadata("design:paramtypes", []),
|
|
2149
|
+
__metadata("design:returntype", Boolean)
|
|
2150
|
+
], CaseField.prototype, "isCollection", null);
|
|
2151
|
+
__decorate([
|
|
2152
|
+
Expose(),
|
|
2153
|
+
__metadata("design:type", Function),
|
|
2154
|
+
__metadata("design:paramtypes", []),
|
|
2155
|
+
__metadata("design:returntype", Boolean)
|
|
2156
|
+
], CaseField.prototype, "isComplex", null);
|
|
2157
|
+
__decorate([
|
|
2158
|
+
Expose(),
|
|
2159
|
+
__metadata("design:type", Function),
|
|
2160
|
+
__metadata("design:paramtypes", []),
|
|
2161
|
+
__metadata("design:returntype", Boolean)
|
|
2162
|
+
], CaseField.prototype, "isDynamic", null);
|
|
2163
|
+
__decorate([
|
|
2164
|
+
Expose(),
|
|
2165
|
+
__metadata("design:type", Function),
|
|
2166
|
+
__metadata("design:paramtypes", []),
|
|
2167
|
+
__metadata("design:returntype", Boolean)
|
|
2168
|
+
], CaseField.prototype, "isCaseLink", null);
|
|
2169
|
+
__decorate([
|
|
2170
|
+
Expose(),
|
|
2171
|
+
__metadata("design:type", Function),
|
|
2172
|
+
__metadata("design:paramtypes", [String]),
|
|
2173
|
+
__metadata("design:returntype", String)
|
|
2174
|
+
], CaseField.prototype, "getHierachicalId", null);
|
|
2175
|
+
|
|
2176
|
+
// @dynamic
|
|
2177
|
+
class WizardPage {
|
|
2178
|
+
id;
|
|
2179
|
+
label;
|
|
2180
|
+
order;
|
|
2181
|
+
wizard_page_fields;
|
|
2182
|
+
case_fields;
|
|
2183
|
+
show_condition;
|
|
2184
|
+
parsedShowCondition;
|
|
2185
|
+
getCol1Fields() {
|
|
2186
|
+
return this.case_fields?.filter(f => !f.wizardProps.page_column_no || f.wizardProps.page_column_no === 1);
|
|
2416
2187
|
}
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
if (this.isPreserveAlerts()) {
|
|
2420
|
-
return message;
|
|
2421
|
-
}
|
|
2422
|
-
else {
|
|
2423
|
-
return '';
|
|
2424
|
-
}
|
|
2188
|
+
getCol2Fields() {
|
|
2189
|
+
return this.case_fields?.filter(f => f.wizardProps.page_column_no === 2);
|
|
2425
2190
|
}
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
this.message = msgObject.message;
|
|
2429
|
-
this.level = msgObject.level;
|
|
2430
|
-
this.alertObserver.next({
|
|
2431
|
-
level: this.level,
|
|
2432
|
-
message: this.message
|
|
2433
|
-
});
|
|
2191
|
+
isMultiColumn() {
|
|
2192
|
+
return this.getCol2Fields()?.length > 0;
|
|
2434
2193
|
}
|
|
2435
|
-
static ɵfac = function AlertService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AlertService)(i0.ɵɵinject(i1$1.Router), i0.ɵɵinject(i1.RpxTranslationService)); };
|
|
2436
|
-
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: AlertService, factory: AlertService.ɵfac });
|
|
2437
2194
|
}
|
|
2438
|
-
(
|
|
2439
|
-
|
|
2440
|
-
|
|
2195
|
+
__decorate([
|
|
2196
|
+
Type(() => WizardPageField),
|
|
2197
|
+
__metadata("design:type", Array)
|
|
2198
|
+
], WizardPage.prototype, "wizard_page_fields", void 0);
|
|
2199
|
+
__decorate([
|
|
2200
|
+
Type(() => CaseField),
|
|
2201
|
+
__metadata("design:type", Array)
|
|
2202
|
+
], WizardPage.prototype, "case_fields", void 0);
|
|
2441
2203
|
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
class Draft {
|
|
2204
|
+
// @dynamic
|
|
2205
|
+
class CaseEventTrigger {
|
|
2445
2206
|
id;
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2207
|
+
name;
|
|
2208
|
+
description;
|
|
2209
|
+
case_id;
|
|
2210
|
+
case_fields;
|
|
2211
|
+
event_token;
|
|
2212
|
+
wizard_pages;
|
|
2213
|
+
show_summary;
|
|
2214
|
+
show_event_notes;
|
|
2215
|
+
end_button_label;
|
|
2216
|
+
can_save_draft;
|
|
2217
|
+
hasFields() {
|
|
2218
|
+
return this.case_fields && this.case_fields.length !== 0;
|
|
2452
2219
|
}
|
|
2453
|
-
|
|
2454
|
-
return
|
|
2220
|
+
hasPages() {
|
|
2221
|
+
return this.wizard_pages && this.wizard_pages.length !== 0;
|
|
2455
2222
|
}
|
|
2456
2223
|
}
|
|
2224
|
+
__decorate([
|
|
2225
|
+
Type(() => CaseField),
|
|
2226
|
+
__metadata("design:type", Array)
|
|
2227
|
+
], CaseEventTrigger.prototype, "case_fields", void 0);
|
|
2228
|
+
__decorate([
|
|
2229
|
+
Type(() => WizardPage),
|
|
2230
|
+
__metadata("design:type", Array)
|
|
2231
|
+
], CaseEventTrigger.prototype, "wizard_pages", void 0);
|
|
2457
2232
|
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
const saveDraftEndpoint = this.appConfig.getCreateOrUpdateDraftsUrl(ctid);
|
|
2473
|
-
const headers = new HttpHeaders()
|
|
2474
|
-
.set('experimental', 'true')
|
|
2475
|
-
.set('Accept', DraftService.V2_MEDIATYPE_DRAFT_CREATE)
|
|
2476
|
-
.set('Content-Type', 'application/json');
|
|
2477
|
-
return this.http
|
|
2478
|
-
.post(saveDraftEndpoint, eventData, { headers, observe: 'body' })
|
|
2479
|
-
.pipe(catchError((error) => {
|
|
2480
|
-
this.errorService.setError(error);
|
|
2481
|
-
return throwError(error);
|
|
2482
|
-
}));
|
|
2483
|
-
}
|
|
2484
|
-
updateDraft(ctid, draftId, eventData) {
|
|
2485
|
-
const saveDraftEndpoint = `${this.appConfig.getCreateOrUpdateDraftsUrl(ctid)}/${draftId}`;
|
|
2486
|
-
const headers = new HttpHeaders()
|
|
2487
|
-
.set('experimental', 'true')
|
|
2488
|
-
.set('Accept', DraftService.V2_MEDIATYPE_DRAFT_UPDATE)
|
|
2489
|
-
.set('Content-Type', 'application/json');
|
|
2490
|
-
return this.http
|
|
2491
|
-
.put(saveDraftEndpoint, eventData, { headers, observe: 'body' })
|
|
2492
|
-
.pipe(catchError((error) => {
|
|
2493
|
-
this.errorService.setError(error);
|
|
2494
|
-
return throwError(error);
|
|
2495
|
-
}));
|
|
2496
|
-
}
|
|
2497
|
-
getDraft(draftId) {
|
|
2498
|
-
const url = this.appConfig.getViewOrDeleteDraftsUrl(draftId.slice(DRAFT_PREFIX.length));
|
|
2499
|
-
const headers = new HttpHeaders()
|
|
2500
|
-
.set('experimental', 'true')
|
|
2501
|
-
.set('Accept', DraftService.V2_MEDIATYPE_DRAFT_READ)
|
|
2502
|
-
.set('Content-Type', 'application/json');
|
|
2503
|
-
return this.http
|
|
2504
|
-
.get(url, { headers, observe: 'body' })
|
|
2505
|
-
.pipe(catchError((error) => {
|
|
2506
|
-
this.errorService.setError(error);
|
|
2507
|
-
return throwError(error);
|
|
2508
|
-
}));
|
|
2509
|
-
}
|
|
2510
|
-
deleteDraft(draftId) {
|
|
2511
|
-
const url = this.appConfig.getViewOrDeleteDraftsUrl(draftId.slice(DRAFT_PREFIX.length));
|
|
2512
|
-
const headers = new HttpHeaders()
|
|
2513
|
-
.set('experimental', 'true')
|
|
2514
|
-
.set('Accept', DraftService.V2_MEDIATYPE_DRAFT_DELETE)
|
|
2515
|
-
.set('Content-Type', 'application/json');
|
|
2516
|
-
return this.http
|
|
2517
|
-
.delete(url, { headers, observe: 'body' }).pipe(catchError((error) => {
|
|
2518
|
-
this.errorService.setError(error);
|
|
2519
|
-
return throwError(error);
|
|
2520
|
-
}));
|
|
2521
|
-
}
|
|
2522
|
-
createOrUpdateDraft(caseTypeId, draftId, caseEventData) {
|
|
2523
|
-
if (!draftId) {
|
|
2524
|
-
return this.createDraft(caseTypeId, caseEventData);
|
|
2525
|
-
}
|
|
2526
|
-
else {
|
|
2527
|
-
return this.updateDraft(caseTypeId, Draft.stripDraftId(draftId), caseEventData);
|
|
2528
|
-
}
|
|
2529
|
-
}
|
|
2530
|
-
static ɵfac = function DraftService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || DraftService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig), i0.ɵɵinject(HttpErrorService)); };
|
|
2531
|
-
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: DraftService, factory: DraftService.ɵfac });
|
|
2233
|
+
// tslint:disable:variable-name
|
|
2234
|
+
class CaseViewEvent {
|
|
2235
|
+
id;
|
|
2236
|
+
timestamp;
|
|
2237
|
+
summary;
|
|
2238
|
+
comment;
|
|
2239
|
+
event_id;
|
|
2240
|
+
event_name;
|
|
2241
|
+
state_id;
|
|
2242
|
+
state_name;
|
|
2243
|
+
user_id;
|
|
2244
|
+
user_last_name;
|
|
2245
|
+
user_first_name;
|
|
2246
|
+
significant_item;
|
|
2532
2247
|
}
|
|
2533
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DraftService, [{
|
|
2534
|
-
type: Injectable
|
|
2535
|
-
}], () => [{ type: HttpService }, { type: AbstractAppConfig }, { type: HttpErrorService }], null); })();
|
|
2536
2248
|
|
|
2537
|
-
class
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
reset() {
|
|
2543
|
-
this.registeredDirectives = [];
|
|
2544
|
-
}
|
|
2545
|
-
static ɵfac = function ConditionalShowRegistrarService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ConditionalShowRegistrarService)(); };
|
|
2546
|
-
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ConditionalShowRegistrarService, factory: ConditionalShowRegistrarService.ɵfac });
|
|
2249
|
+
class CaseViewTrigger {
|
|
2250
|
+
id;
|
|
2251
|
+
name;
|
|
2252
|
+
description;
|
|
2253
|
+
order;
|
|
2547
2254
|
}
|
|
2548
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ConditionalShowRegistrarService, [{
|
|
2549
|
-
type: Injectable
|
|
2550
|
-
}], null, null); })();
|
|
2551
2255
|
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
}
|
|
2562
|
-
showGreyBar(field, el) {
|
|
2563
|
-
if (!field.isCollection()) {
|
|
2564
|
-
this.addGreyBar(el);
|
|
2565
|
-
}
|
|
2566
|
-
}
|
|
2567
|
-
removeGreyBar(el) {
|
|
2568
|
-
const divSelector = el.nativeElement.querySelector('div');
|
|
2569
|
-
if (divSelector) {
|
|
2570
|
-
this.renderer.removeClass(divSelector, 'show-condition-grey-bar');
|
|
2571
|
-
}
|
|
2572
|
-
}
|
|
2573
|
-
addToggledToShow(fieldId) {
|
|
2574
|
-
this.fieldsToggledToShow.push(fieldId);
|
|
2575
|
-
}
|
|
2576
|
-
removeToggledToShow(fieldId) {
|
|
2577
|
-
this.fieldsToggledToShow = this.fieldsToggledToShow.filter(id => id !== fieldId);
|
|
2578
|
-
}
|
|
2579
|
-
wasToggledToShow(fieldId) {
|
|
2580
|
-
return this.fieldsToggledToShow.find(id => id === fieldId) !== undefined;
|
|
2581
|
-
}
|
|
2582
|
-
reset() {
|
|
2583
|
-
this.fieldsToggledToShow = [];
|
|
2584
|
-
}
|
|
2585
|
-
addGreyBar(el) {
|
|
2586
|
-
const divSelector = el.nativeElement.querySelector('div');
|
|
2587
|
-
if (divSelector) {
|
|
2588
|
-
this.renderer.addClass(divSelector, 'show-condition-grey-bar');
|
|
2589
|
-
}
|
|
2590
|
-
}
|
|
2591
|
-
static ɵfac = function GreyBarService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || GreyBarService)(i0.ɵɵinject(i0.RendererFactory2)); };
|
|
2592
|
-
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: GreyBarService, factory: GreyBarService.ɵfac });
|
|
2256
|
+
class CaseEvent {
|
|
2257
|
+
id;
|
|
2258
|
+
name;
|
|
2259
|
+
post_state;
|
|
2260
|
+
pre_states;
|
|
2261
|
+
case_fields;
|
|
2262
|
+
description;
|
|
2263
|
+
order;
|
|
2264
|
+
acls;
|
|
2593
2265
|
}
|
|
2594
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(GreyBarService, [{
|
|
2595
|
-
type: Injectable
|
|
2596
|
-
}], () => [{ type: i0.RendererFactory2 }], null); })();
|
|
2597
|
-
|
|
2598
|
-
var AddCommentsErrorMessage;
|
|
2599
|
-
(function (AddCommentsErrorMessage) {
|
|
2600
|
-
AddCommentsErrorMessage["FLAG_COMMENTS_NOT_ENTERED"] = "Please enter comments for this flag";
|
|
2601
|
-
AddCommentsErrorMessage["FLAG_COMMENTS_NOT_ENTERED_EXTERNAL"] = "Please enter comments for this support request";
|
|
2602
|
-
AddCommentsErrorMessage["FLAG_COMMENTS_CHAR_LIMIT_EXCEEDED"] = "Comments for this flag must be 200 characters or fewer";
|
|
2603
|
-
})(AddCommentsErrorMessage || (AddCommentsErrorMessage = {}));
|
|
2604
|
-
|
|
2605
|
-
var AddCommentsStep;
|
|
2606
|
-
(function (AddCommentsStep) {
|
|
2607
|
-
AddCommentsStep["HINT_TEXT"] = "Explain why you are creating this flag. Do not include any sensitive information such as personal details.";
|
|
2608
|
-
AddCommentsStep["HINT_TEXT_EXTERNAL"] = "Explain why you are creating this support request. Do not include any sensitive information such as personal details.";
|
|
2609
|
-
AddCommentsStep["CHARACTER_LIMIT_INFO"] = "You can enter up to 200 characters";
|
|
2610
|
-
AddCommentsStep["WARNING_TEXT"] = "The details entered here MAY be visible to the party in the future.";
|
|
2611
|
-
})(AddCommentsStep || (AddCommentsStep = {}));
|
|
2612
2266
|
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
CaseFlagCheckYourAnswersPageStep["UPDATE_FLAG_HEADER_TEXT_EXTERNAL"] = "Update support for";
|
|
2620
|
-
CaseFlagCheckYourAnswersPageStep["FLAG_TYPE_HEADER_TEXT"] = "Flag type";
|
|
2621
|
-
CaseFlagCheckYourAnswersPageStep["FLAG_TYPE_HEADER_TEXT_EXTERNAL"] = "Support type";
|
|
2622
|
-
CaseFlagCheckYourAnswersPageStep["NONE"] = "";
|
|
2623
|
-
})(CaseFlagCheckYourAnswersPageStep || (CaseFlagCheckYourAnswersPageStep = {}));
|
|
2267
|
+
class CaseState {
|
|
2268
|
+
id;
|
|
2269
|
+
name;
|
|
2270
|
+
description;
|
|
2271
|
+
order;
|
|
2272
|
+
}
|
|
2624
2273
|
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
CaseFlagDisplayContextParameter["READ_EXTERNAL"] = "#ARGUMENT(READ,EXTERNAL)";
|
|
2635
|
-
CaseFlagDisplayContextParameter["UPDATE"] = "#ARGUMENT(UPDATE)";
|
|
2636
|
-
CaseFlagDisplayContextParameter["UPDATE_EXTERNAL"] = "#ARGUMENT(UPDATE,EXTERNAL)";
|
|
2637
|
-
CaseFlagDisplayContextParameter["UPDATE_2_POINT_1"] = "#ARGUMENT(UPDATE,VERSION2.1)";
|
|
2638
|
-
})(CaseFlagDisplayContextParameter || (CaseFlagDisplayContextParameter = {}));
|
|
2274
|
+
// Light clone of CaseType to be used in Jurisdiction class
|
|
2275
|
+
// to avoid cyclic dependency
|
|
2276
|
+
class CaseTypeLite {
|
|
2277
|
+
id;
|
|
2278
|
+
name;
|
|
2279
|
+
events;
|
|
2280
|
+
states;
|
|
2281
|
+
description;
|
|
2282
|
+
}
|
|
2639
2283
|
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2284
|
+
// @dynamics
|
|
2285
|
+
class CaseType {
|
|
2286
|
+
id;
|
|
2287
|
+
name;
|
|
2288
|
+
events;
|
|
2289
|
+
states;
|
|
2290
|
+
case_fields;
|
|
2291
|
+
description;
|
|
2292
|
+
jurisdiction;
|
|
2293
|
+
printEnabled;
|
|
2294
|
+
}
|
|
2295
|
+
__decorate([
|
|
2296
|
+
Type(() => CaseField),
|
|
2297
|
+
__metadata("design:type", Array)
|
|
2298
|
+
], CaseType.prototype, "case_fields", void 0);
|
|
2652
2299
|
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
CaseFlagStatus["NOT_APPROVED"] = "Not approved";
|
|
2659
|
-
})(CaseFlagStatus || (CaseFlagStatus = {}));
|
|
2300
|
+
// tslint:disable:variable-name
|
|
2301
|
+
class EventCaseField {
|
|
2302
|
+
case_field_id;
|
|
2303
|
+
showCondition;
|
|
2304
|
+
}
|
|
2660
2305
|
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2306
|
+
class Jurisdiction {
|
|
2307
|
+
id;
|
|
2308
|
+
name;
|
|
2309
|
+
description;
|
|
2310
|
+
caseTypes;
|
|
2311
|
+
currentCaseType;
|
|
2312
|
+
}
|
|
2666
2313
|
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
CaseFlagWizardStepTitle["OTHER_FLAG_TYPE_DESCRIPTION_EXTERNAL"] = "Enter a support type";
|
|
2675
|
-
CaseFlagWizardStepTitle["ADD_FLAG_COMMENTS"] = "Add comments for this flag";
|
|
2676
|
-
CaseFlagWizardStepTitle["ADD_FLAG_COMMENTS_EXTERNAL_MODE"] = "Tell us more about the request";
|
|
2677
|
-
CaseFlagWizardStepTitle["CONFIRM_FLAG_STATUS"] = "Confirm the status of the flag";
|
|
2678
|
-
CaseFlagWizardStepTitle["FLAG_STATUS"] = "Flag status";
|
|
2679
|
-
CaseFlagWizardStepTitle["MANAGE_CASE_FLAGS"] = "Manage case flags";
|
|
2680
|
-
CaseFlagWizardStepTitle["MANAGE_SUPPORT"] = "Which support is no longer needed?";
|
|
2681
|
-
CaseFlagWizardStepTitle["UPDATE_FLAG_TITLE"] = "Update flag";
|
|
2682
|
-
CaseFlagWizardStepTitle["UPDATE_FLAG_TITLE_EXTERNAL"] = "Tell us why the support is no longer needed";
|
|
2683
|
-
CaseFlagWizardStepTitle["UPDATE_FLAG_ADD_TRANSLATION"] = "Add translations to flag";
|
|
2684
|
-
CaseFlagWizardStepTitle["NONE"] = "";
|
|
2685
|
-
})(CaseFlagWizardStepTitle || (CaseFlagWizardStepTitle = {}));
|
|
2314
|
+
class Banner {
|
|
2315
|
+
bannerDescription;
|
|
2316
|
+
bannerUrlText;
|
|
2317
|
+
bannerUrl;
|
|
2318
|
+
bannerViewed;
|
|
2319
|
+
bannerEnabled;
|
|
2320
|
+
}
|
|
2686
2321
|
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2322
|
+
// @dynamic
|
|
2323
|
+
class CaseTab {
|
|
2324
|
+
id;
|
|
2325
|
+
label;
|
|
2326
|
+
order;
|
|
2327
|
+
fields;
|
|
2328
|
+
show_condition;
|
|
2329
|
+
}
|
|
2330
|
+
__decorate([
|
|
2331
|
+
Type(() => CaseField),
|
|
2332
|
+
__metadata("design:type", Array)
|
|
2333
|
+
], CaseTab.prototype, "fields", void 0);
|
|
2692
2334
|
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2335
|
+
// @dynamic
|
|
2336
|
+
class CaseView {
|
|
2337
|
+
case_id;
|
|
2338
|
+
case_type;
|
|
2339
|
+
state;
|
|
2340
|
+
channels;
|
|
2341
|
+
tabs;
|
|
2342
|
+
triggers;
|
|
2343
|
+
events;
|
|
2344
|
+
metadataFields;
|
|
2345
|
+
basicFields;
|
|
2346
|
+
case_flag;
|
|
2347
|
+
}
|
|
2348
|
+
__decorate([
|
|
2349
|
+
Type(() => CaseTab),
|
|
2350
|
+
__metadata("design:type", Array)
|
|
2351
|
+
], CaseView.prototype, "tabs", void 0);
|
|
2352
|
+
__decorate([
|
|
2353
|
+
Type(() => CaseField),
|
|
2354
|
+
__metadata("design:type", Array)
|
|
2355
|
+
], CaseView.prototype, "metadataFields", void 0);
|
|
2698
2356
|
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
})(SearchLanguageInterpreterErrorMessage || (SearchLanguageInterpreterErrorMessage = {}));
|
|
2357
|
+
class CasePrintDocument {
|
|
2358
|
+
name;
|
|
2359
|
+
type;
|
|
2360
|
+
url;
|
|
2361
|
+
}
|
|
2705
2362
|
|
|
2706
|
-
var
|
|
2707
|
-
(function (
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2363
|
+
var RoleCategory;
|
|
2364
|
+
(function (RoleCategory) {
|
|
2365
|
+
RoleCategory["JUDICIAL"] = "JUDICIAL";
|
|
2366
|
+
RoleCategory["LEGAL_OPERATIONS"] = "LEGAL_OPERATIONS";
|
|
2367
|
+
RoleCategory["ADMIN"] = "ADMIN";
|
|
2368
|
+
RoleCategory["CTSC"] = "CTSC";
|
|
2369
|
+
RoleCategory["PROFESSIONAL"] = "PROFESSIONAL";
|
|
2370
|
+
RoleCategory["CITIZEN"] = "CITIZEN";
|
|
2371
|
+
RoleCategory["ENFORCEMENT"] = "ENFORCEMENT";
|
|
2372
|
+
})(RoleCategory || (RoleCategory = {}));
|
|
2373
|
+
var AMRoleSuffix;
|
|
2374
|
+
(function (AMRoleSuffix) {
|
|
2375
|
+
AMRoleSuffix["JUDICIARY"] = "judiciary";
|
|
2376
|
+
AMRoleSuffix["ADMIN"] = "admin";
|
|
2377
|
+
AMRoleSuffix["PROFESSIONAL"] = "professional";
|
|
2378
|
+
AMRoleSuffix["LEGAL_OPERATIONS"] = "legal-ops";
|
|
2379
|
+
AMRoleSuffix["CITIZEN"] = "citizen";
|
|
2380
|
+
AMRoleSuffix["CTSC"] = "ctsc";
|
|
2381
|
+
AMRoleSuffix["ENFORCEMENT"] = "enforcement";
|
|
2382
|
+
})(AMRoleSuffix || (AMRoleSuffix = {}));
|
|
2383
|
+
var RoleKeyword;
|
|
2384
|
+
(function (RoleKeyword) {
|
|
2385
|
+
RoleKeyword["JUDGE"] = "judge";
|
|
2386
|
+
RoleKeyword["ADMIN"] = "admin";
|
|
2387
|
+
RoleKeyword["SOLICITOR"] = "solicitor";
|
|
2388
|
+
RoleKeyword["CITIZEN"] = "citizen";
|
|
2389
|
+
RoleKeyword["CTSC"] = "ctsc";
|
|
2390
|
+
RoleKeyword["ENFORCEMENT"] = "enforcement";
|
|
2391
|
+
})(RoleKeyword || (RoleKeyword = {}));
|
|
2713
2392
|
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2393
|
+
// tslint:disable:variable-name
|
|
2394
|
+
class HRef {
|
|
2395
|
+
href;
|
|
2396
|
+
}
|
|
2397
|
+
class DocumentLinks {
|
|
2398
|
+
self;
|
|
2399
|
+
binary;
|
|
2400
|
+
}
|
|
2401
|
+
class Document {
|
|
2402
|
+
_links;
|
|
2403
|
+
originalDocumentName;
|
|
2404
|
+
hashToken;
|
|
2405
|
+
}
|
|
2406
|
+
class Embedded {
|
|
2407
|
+
documents;
|
|
2408
|
+
}
|
|
2409
|
+
class DocumentData {
|
|
2410
|
+
_embedded;
|
|
2411
|
+
documents;
|
|
2412
|
+
}
|
|
2413
|
+
class FormDocument {
|
|
2414
|
+
document_url;
|
|
2415
|
+
document_binary_url;
|
|
2416
|
+
document_filename;
|
|
2417
|
+
document_hash;
|
|
2418
|
+
upload_timestamp;
|
|
2419
|
+
}
|
|
2720
2420
|
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2421
|
+
const DRAFT_PREFIX = 'DRAFT';
|
|
2422
|
+
const DRAFT_QUERY_PARAM = 'draft';
|
|
2423
|
+
class Draft {
|
|
2424
|
+
id;
|
|
2425
|
+
document;
|
|
2426
|
+
type;
|
|
2427
|
+
created;
|
|
2428
|
+
updated;
|
|
2429
|
+
static stripDraftId(draftId) {
|
|
2430
|
+
return draftId.slice(DRAFT_PREFIX.length);
|
|
2431
|
+
}
|
|
2432
|
+
static isDraft(id) {
|
|
2433
|
+
return String(id).startsWith(DRAFT_PREFIX);
|
|
2434
|
+
}
|
|
2435
|
+
}
|
|
2726
2436
|
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
}
|
|
2437
|
+
class OrganisationConverter {
|
|
2438
|
+
static toSimpleAddress(organisationModel) {
|
|
2439
|
+
let simpleAddress = '';
|
|
2440
|
+
if (organisationModel.addressLine1) {
|
|
2441
|
+
simpleAddress += `${organisationModel.addressLine1}<br>`;
|
|
2442
|
+
}
|
|
2443
|
+
if (organisationModel.addressLine2) {
|
|
2444
|
+
simpleAddress += `${organisationModel.addressLine2}<br>`;
|
|
2445
|
+
}
|
|
2446
|
+
if (organisationModel.addressLine3) {
|
|
2447
|
+
simpleAddress += `${organisationModel.addressLine3}<br>`;
|
|
2448
|
+
}
|
|
2449
|
+
if (organisationModel.townCity) {
|
|
2450
|
+
simpleAddress += `${organisationModel.townCity}<br>`;
|
|
2451
|
+
}
|
|
2452
|
+
if (organisationModel.county) {
|
|
2453
|
+
simpleAddress += `${organisationModel.county}<br>`;
|
|
2454
|
+
}
|
|
2455
|
+
if (organisationModel.country) {
|
|
2456
|
+
simpleAddress += `${organisationModel.country}<br>`;
|
|
2457
|
+
}
|
|
2458
|
+
if (organisationModel.postCode) {
|
|
2459
|
+
simpleAddress += `${organisationModel.postCode}<br>`;
|
|
2460
|
+
}
|
|
2461
|
+
return simpleAddress;
|
|
2462
|
+
}
|
|
2463
|
+
toSimpleOrganisationModel(organisationModel) {
|
|
2464
|
+
return {
|
|
2465
|
+
organisationIdentifier: organisationModel.organisationIdentifier,
|
|
2466
|
+
name: organisationModel.name,
|
|
2467
|
+
address: OrganisationConverter.toSimpleAddress(organisationModel)
|
|
2468
|
+
};
|
|
2469
|
+
}
|
|
2470
|
+
static ɵfac = function OrganisationConverter_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || OrganisationConverter)(); };
|
|
2471
|
+
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: OrganisationConverter, factory: OrganisationConverter.ɵfac });
|
|
2472
|
+
}
|
|
2473
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(OrganisationConverter, [{
|
|
2474
|
+
type: Injectable
|
|
2475
|
+
}], null, null); })();
|
|
2736
2476
|
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
})(UpdateFlagAddTranslationErrorMessage || (UpdateFlagAddTranslationErrorMessage = {}));
|
|
2477
|
+
class PaginationMetadata {
|
|
2478
|
+
totalResultsCount;
|
|
2479
|
+
totalPagesCount;
|
|
2480
|
+
}
|
|
2742
2481
|
|
|
2743
|
-
|
|
2744
|
-
(
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2482
|
+
function hasRoles(profile) {
|
|
2483
|
+
if (profile.user && profile.user.idam && Array.isArray(profile.user.idam.roles)) {
|
|
2484
|
+
return profile.user.idam.roles.length > 0;
|
|
2485
|
+
}
|
|
2486
|
+
return false;
|
|
2487
|
+
}
|
|
2488
|
+
// @dynamic
|
|
2489
|
+
class Profile {
|
|
2490
|
+
user;
|
|
2491
|
+
channels;
|
|
2492
|
+
jurisdictions;
|
|
2493
|
+
default;
|
|
2494
|
+
isSolicitor() {
|
|
2495
|
+
if (hasRoles(this)) {
|
|
2496
|
+
return this.user.idam.roles.find(r => r.endsWith('-solicitor')) !== undefined;
|
|
2497
|
+
}
|
|
2498
|
+
return false;
|
|
2499
|
+
}
|
|
2500
|
+
isCourtAdmin() {
|
|
2501
|
+
if (hasRoles(this)) {
|
|
2502
|
+
return this.user.idam.roles.find(r => r.endsWith('-courtadmin')) !== undefined;
|
|
2503
|
+
}
|
|
2504
|
+
return false;
|
|
2505
|
+
}
|
|
2506
|
+
}
|
|
2507
|
+
__decorate([
|
|
2508
|
+
Type(() => Jurisdiction),
|
|
2509
|
+
__metadata("design:type", Array)
|
|
2510
|
+
], Profile.prototype, "jurisdictions", void 0);
|
|
2748
2511
|
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2512
|
+
class Field {
|
|
2513
|
+
id;
|
|
2514
|
+
field_type;
|
|
2515
|
+
elementPath;
|
|
2516
|
+
value;
|
|
2517
|
+
label;
|
|
2518
|
+
metadata;
|
|
2519
|
+
constructor(id, field_type, elementPath, value, label, metadata) {
|
|
2520
|
+
this.id = id;
|
|
2521
|
+
this.field_type = field_type;
|
|
2522
|
+
this.elementPath = elementPath;
|
|
2523
|
+
this.value = value;
|
|
2524
|
+
this.label = label;
|
|
2525
|
+
this.metadata = metadata;
|
|
2526
|
+
}
|
|
2527
|
+
}
|
|
2758
2528
|
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
UpdateFlagStep["WARNING_TEXT"] = "The details entered here MAY be visible to the party in the future.";
|
|
2768
|
-
})(UpdateFlagStep || (UpdateFlagStep = {}));
|
|
2529
|
+
class SearchResultViewColumn {
|
|
2530
|
+
case_field_id;
|
|
2531
|
+
case_field_type;
|
|
2532
|
+
display_context;
|
|
2533
|
+
display_context_parameter;
|
|
2534
|
+
label;
|
|
2535
|
+
order;
|
|
2536
|
+
}
|
|
2769
2537
|
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
CaseFlagErrorMessage["NO_EXTERNAL_FLAGS_COLLECTION"] = "External collection for storing this case flag has not been configured for this case type";
|
|
2784
|
-
CaseFlagErrorMessage["NO_INTERNAL_FLAGS_COLLECTION"] = "Internal collection for storing this case flag has not been configured for this case type";
|
|
2785
|
-
})(CaseFlagErrorMessage || (CaseFlagErrorMessage = {}));
|
|
2538
|
+
// @dynamic
|
|
2539
|
+
class SearchResultViewItem {
|
|
2540
|
+
case_id;
|
|
2541
|
+
case_fields;
|
|
2542
|
+
hydrated_case_fields;
|
|
2543
|
+
columns;
|
|
2544
|
+
supplementary_data;
|
|
2545
|
+
display_context_parameter;
|
|
2546
|
+
}
|
|
2547
|
+
__decorate([
|
|
2548
|
+
Type(() => CaseField),
|
|
2549
|
+
__metadata("design:type", Array)
|
|
2550
|
+
], SearchResultViewItem.prototype, "hydrated_case_fields", void 0);
|
|
2786
2551
|
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2552
|
+
// @dynamic
|
|
2553
|
+
class SearchResultView {
|
|
2554
|
+
columns;
|
|
2555
|
+
results;
|
|
2556
|
+
result_error;
|
|
2557
|
+
hasDrafts() {
|
|
2558
|
+
return this.results[0]
|
|
2559
|
+
&& this.results[0].case_id
|
|
2560
|
+
&& Draft.isDraft(this.results[0].case_id);
|
|
2790
2561
|
}
|
|
2791
|
-
static ɵfac = function DashPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || DashPipe)(); };
|
|
2792
|
-
static ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "ccdDash", type: DashPipe, pure: true, standalone: false });
|
|
2793
2562
|
}
|
|
2794
|
-
(
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
/*
|
|
2803
|
-
Translate a date time format string from the Java format provided by CCD to the format supported by Angular formatDate()
|
|
2804
|
-
Very simple translator that maps unsupported chars to the nearest equivalent.
|
|
2805
|
-
If there is no equivalent puts ***x*** into the output where x is the unsupported character
|
|
2563
|
+
__decorate([
|
|
2564
|
+
Type(() => SearchResultViewColumn),
|
|
2565
|
+
__metadata("design:type", Array)
|
|
2566
|
+
], SearchResultView.prototype, "columns", void 0);
|
|
2567
|
+
__decorate([
|
|
2568
|
+
Type(() => SearchResultViewItem),
|
|
2569
|
+
__metadata("design:type", Array)
|
|
2570
|
+
], SearchResultView.prototype, "results", void 0);
|
|
2806
2571
|
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2572
|
+
class SortParameters {
|
|
2573
|
+
comparator;
|
|
2574
|
+
sortOrder;
|
|
2575
|
+
constructor(comparator, sortOrder) {
|
|
2576
|
+
this.comparator = comparator;
|
|
2577
|
+
this.sortOrder = sortOrder;
|
|
2578
|
+
}
|
|
2579
|
+
}
|
|
2814
2580
|
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
F week-of-month number 3
|
|
2581
|
+
var SortOrder$1;
|
|
2582
|
+
(function (SortOrder) {
|
|
2583
|
+
SortOrder[SortOrder["ASCENDING"] = 0] = "ASCENDING";
|
|
2584
|
+
SortOrder[SortOrder["DESCENDING"] = 1] = "DESCENDING";
|
|
2585
|
+
SortOrder[SortOrder["UNSORTED"] = 2] = "UNSORTED";
|
|
2586
|
+
})(SortOrder$1 || (SortOrder$1 = {}));
|
|
2822
2587
|
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2588
|
+
class WorkbasketInputModel {
|
|
2589
|
+
label;
|
|
2590
|
+
order;
|
|
2591
|
+
field;
|
|
2592
|
+
metadata;
|
|
2593
|
+
display_context_parameter;
|
|
2594
|
+
}
|
|
2595
|
+
class WorkbasketInput {
|
|
2596
|
+
workbasketInputs;
|
|
2597
|
+
}
|
|
2827
2598
|
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2599
|
+
const USER_DETAILS = 'userDetails';
|
|
2600
|
+
const PUI_CASE_MANAGER = 'pui-case-manager';
|
|
2601
|
+
function getUserDetails(sessionStorageService) {
|
|
2602
|
+
const item = sessionStorageService?.getItem(USER_DETAILS);
|
|
2603
|
+
return safeJsonParse(item, null);
|
|
2604
|
+
}
|
|
2605
|
+
function isInternalUser(sessionStorageService) {
|
|
2606
|
+
const userDetails = getUserDetails(sessionStorageService);
|
|
2607
|
+
if (!userDetails?.roles) {
|
|
2608
|
+
return false;
|
|
2609
|
+
}
|
|
2610
|
+
else if (userDetails?.roleCategories?.includes(RoleCategory.ENFORCEMENT)) {
|
|
2611
|
+
return true;
|
|
2612
|
+
}
|
|
2613
|
+
else {
|
|
2614
|
+
return !(userDetails.roles.includes(PUI_CASE_MANAGER) ||
|
|
2615
|
+
userDetails.roles.some((role) => role.toLowerCase().includes(RoleKeyword.JUDGE)));
|
|
2616
|
+
}
|
|
2617
|
+
}
|
|
2618
|
+
function isJudiciaryUser(sessionStorageService) {
|
|
2619
|
+
const userDetails = getUserDetails(sessionStorageService);
|
|
2620
|
+
return userDetails && userDetails?.roles
|
|
2621
|
+
&& (userDetails.roles.some((role) => role.toLowerCase().includes(RoleKeyword.JUDGE)));
|
|
2622
|
+
}
|
|
2623
|
+
function isWorkAllocationUser(sessionStorageService) {
|
|
2624
|
+
const userDetails = getUserDetails(sessionStorageService);
|
|
2625
|
+
return userDetails?.roles
|
|
2626
|
+
&& !userDetails.roles.includes(PUI_CASE_MANAGER)
|
|
2627
|
+
&&
|
|
2628
|
+
(userDetails.roles.includes('caseworker-ia-iacjudge')
|
|
2629
|
+
|| userDetails.roles.includes('caseworker-ia-caseofficer')
|
|
2630
|
+
|| userDetails.roles.includes('caseworker-ia-admofficer')
|
|
2631
|
+
|| userDetails.roles.includes('caseworker-civil')
|
|
2632
|
+
|| userDetails.roles.includes('caseworker-privatelaw')
|
|
2633
|
+
|| userDetails?.roleCategories?.includes(RoleCategory.ENFORCEMENT));
|
|
2634
|
+
}
|
|
2635
|
+
function roleOrCategoryExists(roleKeyword, roleCategory, roleKeywords, roleCategories) {
|
|
2636
|
+
return roleCategories.includes(roleCategory) || roleKeywords.includes(roleKeyword);
|
|
2637
|
+
}
|
|
2638
|
+
function getMappedRoleCategory(roles = [], roleCategories = []) {
|
|
2639
|
+
const roleKeywords = roles.join().split('-').join().split(',');
|
|
2640
|
+
if (roleOrCategoryExists(RoleKeyword.JUDGE, RoleCategory.JUDICIAL, roleKeywords, roleCategories)) {
|
|
2641
|
+
return RoleCategory.JUDICIAL;
|
|
2642
|
+
}
|
|
2643
|
+
else if (roleOrCategoryExists(RoleKeyword.SOLICITOR, RoleCategory.PROFESSIONAL, roleKeywords, roleCategories)) {
|
|
2644
|
+
return RoleCategory.PROFESSIONAL;
|
|
2645
|
+
}
|
|
2646
|
+
else if (roleOrCategoryExists(RoleKeyword.CITIZEN, RoleCategory.CITIZEN, roleKeywords, roleCategories)) {
|
|
2647
|
+
return RoleCategory.CITIZEN;
|
|
2648
|
+
}
|
|
2649
|
+
else if (roleOrCategoryExists(RoleKeyword.ADMIN, RoleCategory.ADMIN, roleKeywords, roleCategories)) {
|
|
2650
|
+
return RoleCategory.ADMIN;
|
|
2651
|
+
}
|
|
2652
|
+
else if (roleOrCategoryExists(RoleKeyword.CTSC, RoleCategory.CTSC, roleKeywords, roleCategories)) {
|
|
2653
|
+
return RoleCategory.CTSC;
|
|
2654
|
+
}
|
|
2655
|
+
else if (roleOrCategoryExists(RoleKeyword.ENFORCEMENT, RoleCategory.ENFORCEMENT, roleKeywords, roleCategories)) {
|
|
2656
|
+
return RoleCategory.ENFORCEMENT;
|
|
2657
|
+
}
|
|
2658
|
+
else {
|
|
2659
|
+
return RoleCategory.LEGAL_OPERATIONS;
|
|
2660
|
+
}
|
|
2661
|
+
}
|
|
2662
|
+
function getAMRoleName(accessType, aMRole) {
|
|
2663
|
+
let roleName = '';
|
|
2664
|
+
switch (aMRole) {
|
|
2665
|
+
case RoleCategory.JUDICIAL:
|
|
2666
|
+
roleName = `${accessType}-access-${AMRoleSuffix.JUDICIARY}`;
|
|
2667
|
+
break;
|
|
2668
|
+
case RoleCategory.PROFESSIONAL:
|
|
2669
|
+
roleName = `${accessType}-access-${AMRoleSuffix.PROFESSIONAL}`;
|
|
2670
|
+
break;
|
|
2671
|
+
case RoleCategory.CITIZEN:
|
|
2672
|
+
roleName = `${accessType}-access-${AMRoleSuffix.CITIZEN}`;
|
|
2673
|
+
break;
|
|
2674
|
+
case RoleCategory.ADMIN:
|
|
2675
|
+
roleName = `${accessType}-access-${AMRoleSuffix.ADMIN}`;
|
|
2676
|
+
break;
|
|
2677
|
+
case RoleCategory.CTSC:
|
|
2678
|
+
roleName = `${accessType}-access-${AMRoleSuffix.CTSC}`;
|
|
2679
|
+
break;
|
|
2680
|
+
case RoleCategory.ENFORCEMENT:
|
|
2681
|
+
roleName = `${accessType}-access-${AMRoleSuffix.ENFORCEMENT}`;
|
|
2682
|
+
break;
|
|
2683
|
+
default:
|
|
2684
|
+
roleName = `${accessType}-access-${AMRoleSuffix.LEGAL_OPERATIONS}`;
|
|
2685
|
+
break;
|
|
2686
|
+
}
|
|
2687
|
+
return roleName;
|
|
2688
|
+
}
|
|
2852
2689
|
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
MMMMM Narrow S
|
|
2866
|
-
Month standalone L Numeric: 1 digit 9, 12
|
|
2867
|
-
LL Numeric: 2 digits + zero padded 09, 12
|
|
2868
|
-
LLL Abbreviated Sep
|
|
2869
|
-
LLLL Wide September
|
|
2870
|
-
LLLLL Narrow S
|
|
2871
|
-
Week of year w Numeric: minimum digits 1... 53
|
|
2872
|
-
ww Numeric: 2 digits + zero padded 01... 53
|
|
2873
|
-
Week of month W Numeric: 1 digit 1... 5
|
|
2874
|
-
Day of month d Numeric: minimum digits 1
|
|
2875
|
-
dd Numeric: 2 digits + zero padded 01
|
|
2876
|
-
Week day E, EE & EEE Abbreviated Tue
|
|
2877
|
-
EEEE Wide Tuesday
|
|
2878
|
-
EEEEE Narrow T
|
|
2879
|
-
EEEEEE Short Tu
|
|
2880
|
-
Period a, aa & aaa Abbreviated am/pm or AM/PM
|
|
2881
|
-
aaaa Wide (fallback to a when missing) ante meridiem/post meridiem
|
|
2882
|
-
aaaaa Narrow a/p
|
|
2883
|
-
Period* B, BB & BBB Abbreviated mid.
|
|
2884
|
-
BBBB Wide am, pm, midnight, noon, morning, afternoon, evening, night
|
|
2885
|
-
BBBBB Narrow md
|
|
2886
|
-
Period standalone* b, bb & bbb Abbreviated mid.
|
|
2887
|
-
bbbb Wide am, pm, midnight, noon, morning, afternoon, evening, night
|
|
2888
|
-
bbbbb Narrow md
|
|
2889
|
-
Hour 1-12 h Numeric: minimum digits 1, 12
|
|
2890
|
-
hh Numeric: 2 digits + zero padded 01, 12
|
|
2891
|
-
Hour 0-23 H Numeric: minimum digits 0, 23
|
|
2892
|
-
HH Numeric: 2 digits + zero padded 00, 23
|
|
2893
|
-
Minute m Numeric: minimum digits 8, 59
|
|
2894
|
-
mm Numeric: 2 digits + zero padded 08, 59
|
|
2895
|
-
Second s Numeric: minimum digits 0... 59
|
|
2896
|
-
ss Numeric: 2 digits + zero padded 00... 59
|
|
2897
|
-
Fractional seconds S Numeric: 1 digit 0... 9
|
|
2898
|
-
SS Numeric: 2 digits + zero padded 00... 99
|
|
2899
|
-
SSS Numeric: 3 digits + zero padded (= milliseconds) 000... 999
|
|
2900
|
-
Zone z, zz & zzz Short specific non location format (fallback to O) GMT-8
|
|
2901
|
-
zzzz Long specific non location format (fallback to OOOO) GMT-08:00
|
|
2902
|
-
Z, ZZ & ZZZ ISO8601 basic format -0800
|
|
2903
|
-
ZZZZ Long localized GMT format GMT-8:00
|
|
2904
|
-
ZZZZZ ISO8601 extended format + Z indicator for offset 0 (= XXXXX) -08:00
|
|
2905
|
-
O, OO & OOO Short localized GMT format GMT-8
|
|
2906
|
-
OOOO Long localized GMT format GMT-08:00
|
|
2907
|
-
*/
|
|
2908
|
-
class FormatTranslatorService {
|
|
2909
|
-
translate(javaFormat) {
|
|
2910
|
-
const result = [];
|
|
2911
|
-
let prev = '\0';
|
|
2912
|
-
let inQuote = false;
|
|
2913
|
-
const maybePush = (target, obj, flag) => {
|
|
2914
|
-
if (!flag) {
|
|
2915
|
-
target.push(obj);
|
|
2916
|
-
}
|
|
2917
|
-
};
|
|
2918
|
-
for (const c of javaFormat) {
|
|
2919
|
-
switch (c) {
|
|
2920
|
-
case '\'':
|
|
2921
|
-
if (prev === '\'') {
|
|
2922
|
-
// literal single quote - ignore
|
|
2923
|
-
inQuote = false;
|
|
2924
|
-
}
|
|
2925
|
-
else {
|
|
2926
|
-
inQuote = !inQuote;
|
|
2927
|
-
}
|
|
2928
|
-
break;
|
|
2929
|
-
// Due to formatting constraints on the webapp, all 'd' characters should be replaced with 'D' (for Moment library)
|
|
2930
|
-
// This is because we want the date, not the day (this format will need to be converted back)
|
|
2931
|
-
case 'd':
|
|
2932
|
-
maybePush(result, 'D', inQuote);
|
|
2933
|
-
break;
|
|
2934
|
-
// moment library defines year as capital y
|
|
2935
|
-
case 'y':
|
|
2936
|
-
maybePush(result, 'Y', inQuote);
|
|
2937
|
-
break;
|
|
2938
|
-
case 'e':
|
|
2939
|
-
case 'c':
|
|
2940
|
-
maybePush(result, 'E', inQuote); // no lower case E
|
|
2941
|
-
break;
|
|
2942
|
-
case 'F':
|
|
2943
|
-
maybePush(result, 'W', inQuote);
|
|
2944
|
-
break;
|
|
2945
|
-
case 'K':
|
|
2946
|
-
maybePush(result, 'H', inQuote);
|
|
2947
|
-
break;
|
|
2948
|
-
case 'k':
|
|
2949
|
-
maybePush(result, 'h', inQuote);
|
|
2950
|
-
break;
|
|
2951
|
-
// commented out A change to '***' due to use in moment library for AM/PM
|
|
2952
|
-
// added 'a' specification to stop discrepancy in am/AM pm/PM formatting
|
|
2953
|
-
case 'a':
|
|
2954
|
-
maybePush(result, 'A', inQuote);
|
|
2955
|
-
break;
|
|
2956
|
-
case 'n':
|
|
2957
|
-
case 'N':
|
|
2958
|
-
maybePush(result, `***${c}***`, inQuote); // No way to support A - millisec of day, n - nano of second, N - nano of Day
|
|
2959
|
-
break;
|
|
2960
|
-
case 'V':
|
|
2961
|
-
case 'O':
|
|
2962
|
-
maybePush(result, 'z', inQuote);
|
|
2963
|
-
break;
|
|
2964
|
-
case 'x':
|
|
2965
|
-
case 'X':
|
|
2966
|
-
maybePush(result, 'Z', inQuote);
|
|
2967
|
-
break;
|
|
2968
|
-
default:
|
|
2969
|
-
maybePush(result, c, inQuote);
|
|
2970
|
-
}
|
|
2971
|
-
prev = c;
|
|
2972
|
-
}
|
|
2973
|
-
return result.join('');
|
|
2690
|
+
// @dynamic
|
|
2691
|
+
class ActivityService {
|
|
2692
|
+
http;
|
|
2693
|
+
appConfig;
|
|
2694
|
+
sessionStorageService;
|
|
2695
|
+
static get ACTIVITY_VIEW() { return 'view'; }
|
|
2696
|
+
static get ACTIVITY_EDIT() { return 'edit'; }
|
|
2697
|
+
logger = new StructuredLoggerService();
|
|
2698
|
+
constructor(http, appConfig, sessionStorageService) {
|
|
2699
|
+
this.http = http;
|
|
2700
|
+
this.appConfig = appConfig;
|
|
2701
|
+
this.sessionStorageService = sessionStorageService;
|
|
2974
2702
|
}
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2703
|
+
get isEnabled() {
|
|
2704
|
+
return this.activityUrl() && this.userAuthorised;
|
|
2705
|
+
}
|
|
2706
|
+
static DUMMY_CASE_REFERENCE = '0';
|
|
2707
|
+
userAuthorised = undefined;
|
|
2708
|
+
static handleHttpError(response) {
|
|
2709
|
+
const error = HttpErrorService.convertToHttpError(response);
|
|
2710
|
+
if (response?.status !== error.status) {
|
|
2711
|
+
error.status = response.status;
|
|
2980
2712
|
}
|
|
2981
|
-
|
|
2982
|
-
|
|
2713
|
+
return error;
|
|
2714
|
+
}
|
|
2715
|
+
getOptions() {
|
|
2716
|
+
const userDetails = safeJsonParse(this.sessionStorageService.getItem(USER_DETAILS));
|
|
2717
|
+
let headers = new HttpHeaders().set('Content-Type', 'application/json');
|
|
2718
|
+
if (userDetails?.token) {
|
|
2719
|
+
headers = headers.set('Authorization', userDetails.token);
|
|
2983
2720
|
}
|
|
2984
|
-
return
|
|
2721
|
+
return {
|
|
2722
|
+
headers,
|
|
2723
|
+
withCredentials: true,
|
|
2724
|
+
observe: 'body',
|
|
2725
|
+
};
|
|
2985
2726
|
}
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2727
|
+
getActivities(...caseId) {
|
|
2728
|
+
try {
|
|
2729
|
+
const options = this.getOptions();
|
|
2730
|
+
const url = `${this.activityUrl()}/cases/${caseId.join(',')}/activity`;
|
|
2731
|
+
return this.http
|
|
2732
|
+
.get(url, options, false, ActivityService.handleHttpError)
|
|
2733
|
+
.pipe(map(response => response));
|
|
2991
2734
|
}
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
dateFormat = dateFormat.replace('m', '');
|
|
2735
|
+
catch (error) {
|
|
2736
|
+
this.logUserMayNotBeAuthenticated(error);
|
|
2995
2737
|
}
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
2738
|
+
}
|
|
2739
|
+
postActivity(caseId, activity) {
|
|
2740
|
+
try {
|
|
2741
|
+
const options = this.getOptions();
|
|
2742
|
+
const url = `${this.activityUrl()}/cases/${caseId}/activity`;
|
|
2743
|
+
const body = { activity };
|
|
2744
|
+
return this.http
|
|
2745
|
+
.post(url, body, options, false)
|
|
2746
|
+
.pipe(map(response => response));
|
|
3000
2747
|
}
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
dateFormat = dateFormat.replace(':', '');
|
|
2748
|
+
catch (error) {
|
|
2749
|
+
this.logUserMayNotBeAuthenticated(error);
|
|
3004
2750
|
}
|
|
3005
|
-
return dateFormat.trim();
|
|
3006
|
-
}
|
|
3007
|
-
hasDate(value) {
|
|
3008
|
-
return this.translate(value).length &&
|
|
3009
|
-
value.toLowerCase().indexOf('d') >= 0 &&
|
|
3010
|
-
value.indexOf('M') >= 0 && value.toLowerCase().indexOf('y') >= 0;
|
|
3011
|
-
}
|
|
3012
|
-
is24Hour(value) {
|
|
3013
|
-
return this.translate(value).length &&
|
|
3014
|
-
value.indexOf('H') >= 0;
|
|
3015
|
-
}
|
|
3016
|
-
hasNoDay(value) {
|
|
3017
|
-
return this.translate(value).length && value.toLowerCase().indexOf('d') === -1 &&
|
|
3018
|
-
value.indexOf('M') >= 0 && value.toLowerCase().indexOf('y') >= 0;
|
|
3019
|
-
}
|
|
3020
|
-
hasNoDayAndMonth(value) {
|
|
3021
|
-
return this.translate(value).length &&
|
|
3022
|
-
value.toLowerCase().indexOf('d') === -1 &&
|
|
3023
|
-
value.indexOf('M') === -1 &&
|
|
3024
|
-
value.toLowerCase().indexOf('y') >= 0;
|
|
3025
2751
|
}
|
|
3026
|
-
|
|
3027
|
-
|
|
2752
|
+
verifyUserIsAuthorized() {
|
|
2753
|
+
if (this.sessionStorageService.getItem(USER_DETAILS) && this.activityUrl() && this.userAuthorised === undefined) {
|
|
2754
|
+
this.getActivities(ActivityService.DUMMY_CASE_REFERENCE).subscribe(() => this.userAuthorised = true, error => {
|
|
2755
|
+
this.userAuthorised = [401, 403].indexOf(error.status) <= -1;
|
|
2756
|
+
});
|
|
2757
|
+
}
|
|
3028
2758
|
}
|
|
3029
|
-
|
|
3030
|
-
return this.
|
|
2759
|
+
activityUrl() {
|
|
2760
|
+
return this.appConfig.getActivityUrl();
|
|
3031
2761
|
}
|
|
3032
|
-
|
|
3033
|
-
|
|
2762
|
+
logUserMayNotBeAuthenticated(error) {
|
|
2763
|
+
this.logger.error('User may not be authenticated. Activity request was not sent.', { error });
|
|
3034
2764
|
}
|
|
3035
|
-
static ɵfac = function
|
|
3036
|
-
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token:
|
|
2765
|
+
static ɵfac = function ActivityService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ActivityService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig), i0.ɵɵinject(SessionStorageService)); };
|
|
2766
|
+
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ActivityService, factory: ActivityService.ɵfac });
|
|
3037
2767
|
}
|
|
3038
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(
|
|
2768
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ActivityService, [{
|
|
3039
2769
|
type: Injectable
|
|
3040
|
-
}],
|
|
2770
|
+
}], () => [{ type: HttpService }, { type: AbstractAppConfig }, { type: SessionStorageService }], null); })();
|
|
3041
2771
|
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
2772
|
+
// @dynamic
|
|
2773
|
+
class ActivityPollingService {
|
|
2774
|
+
activityService;
|
|
2775
|
+
ngZone;
|
|
2776
|
+
config;
|
|
2777
|
+
logger = new StructuredLoggerService();
|
|
2778
|
+
pendingRequests = new Map();
|
|
2779
|
+
currentTimeoutHandle;
|
|
2780
|
+
pollActivitiesSubscription;
|
|
2781
|
+
pollConfig;
|
|
2782
|
+
batchCollectionDelayMs;
|
|
2783
|
+
maxRequestsPerBatch;
|
|
2784
|
+
constructor(activityService, ngZone, config) {
|
|
2785
|
+
this.activityService = activityService;
|
|
2786
|
+
this.ngZone = ngZone;
|
|
2787
|
+
this.config = config;
|
|
2788
|
+
this.pollConfig = {
|
|
2789
|
+
interval: config.getActivityNexPollRequestMs(),
|
|
2790
|
+
attempts: config.getActivityRetry()
|
|
2791
|
+
};
|
|
2792
|
+
this.batchCollectionDelayMs = config.getActivityBatchCollectionDelayMs();
|
|
2793
|
+
this.maxRequestsPerBatch = config.getActivityMaxRequestPerBatch();
|
|
3055
2794
|
}
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
const ISO_FORMAT = 'YYYY-MM-DDTHH:mm:ss.SSSZ';
|
|
3059
|
-
if (value) {
|
|
3060
|
-
// included to avoid editing the hour twice on second pass through
|
|
3061
|
-
// this occurs on case details when datepipe is applied twice
|
|
3062
|
-
if (!value.includes('T')) {
|
|
3063
|
-
zone = 'utc';
|
|
3064
|
-
}
|
|
3065
|
-
const match = value.match(DatePipe.DATE_FORMAT_REGEXP);
|
|
3066
|
-
// Make sure we actually have a match.
|
|
3067
|
-
if (match) {
|
|
3068
|
-
let offsetDate = null;
|
|
3069
|
-
const date = this.getDate(match);
|
|
3070
|
-
if (zone === 'local') {
|
|
3071
|
-
offsetDate = this.getOffsetDate(date);
|
|
3072
|
-
}
|
|
3073
|
-
else {
|
|
3074
|
-
offsetDate = this.getDate(match);
|
|
3075
|
-
}
|
|
3076
|
-
// 'short' format is meaningful to formatDate, but not the same meaning as in the unit tests
|
|
3077
|
-
if (this.formatTrans && format && format !== 'short') {
|
|
3078
|
-
// support for java style formatting strings for dates
|
|
3079
|
-
format = this.translateDateFormat(format);
|
|
3080
|
-
resultDate = moment(offsetDate).format(format);
|
|
3081
|
-
}
|
|
3082
|
-
else {
|
|
3083
|
-
// RDM-1149 changed the pipe logic so that it doesn't add an hour to 'Summer Time' dates on DateTime field type
|
|
3084
|
-
resultDate = `${offsetDate.getDate()} ${DatePipe.MONTHS[offsetDate.getMonth()]} ${offsetDate.getFullYear()}`;
|
|
3085
|
-
if (match[4] && match[5] && match[6] && format !== 'short') {
|
|
3086
|
-
resultDate += ', ';
|
|
3087
|
-
resultDate += `${this.getHour(offsetDate.getHours().toString())}:`;
|
|
3088
|
-
resultDate += `${this.pad(offsetDate.getMinutes())}:`;
|
|
3089
|
-
resultDate += `${this.pad(offsetDate.getSeconds())} `;
|
|
3090
|
-
resultDate += (this.toInt(offsetDate.getHours().toString()) >= 12) ? 'PM' : 'AM';
|
|
3091
|
-
}
|
|
3092
|
-
}
|
|
3093
|
-
}
|
|
3094
|
-
else {
|
|
3095
|
-
// EUI-2667. See if what we've been given is actually a formatted date that
|
|
3096
|
-
// we could attempt to do something with.
|
|
3097
|
-
const parsedDate = Date.parse(value);
|
|
3098
|
-
// We successfully parsed it so let's use it.
|
|
3099
|
-
if (!isNaN(parsedDate)) {
|
|
3100
|
-
const d = new Date(parsedDate);
|
|
3101
|
-
// If what we received didn't include time, don't include it here either.
|
|
3102
|
-
if (value.indexOf(':') < 0) {
|
|
3103
|
-
const shortDate = d.toLocaleDateString('en-GB');
|
|
3104
|
-
const shortISO = shortDate.split('/').reverse().join('-');
|
|
3105
|
-
return this.transform(shortISO, zone, format);
|
|
3106
|
-
}
|
|
3107
|
-
// If it did include time, we want a full ISO string.
|
|
3108
|
-
const thisMoment = moment(d).format(ISO_FORMAT);
|
|
3109
|
-
return this.transform(thisMoment, zone, format);
|
|
3110
|
-
}
|
|
3111
|
-
}
|
|
3112
|
-
}
|
|
3113
|
-
return resultDate;
|
|
2795
|
+
get isEnabled() {
|
|
2796
|
+
return this.activityService.isEnabled;
|
|
3114
2797
|
}
|
|
3115
|
-
|
|
3116
|
-
if (this.
|
|
3117
|
-
return
|
|
2798
|
+
subscribeToActivity(caseId, done) {
|
|
2799
|
+
if (!this.isEnabled) {
|
|
2800
|
+
return new Subject();
|
|
2801
|
+
}
|
|
2802
|
+
let subject = this.pendingRequests.get(caseId);
|
|
2803
|
+
if (subject) {
|
|
2804
|
+
subject.subscribe(done);
|
|
3118
2805
|
}
|
|
3119
2806
|
else {
|
|
3120
|
-
|
|
2807
|
+
// Only the first pending request should start the batch collection timer.
|
|
2808
|
+
const wasEmpty = this.pendingRequests.size === 0;
|
|
2809
|
+
subject = new Subject();
|
|
2810
|
+
subject.subscribe(done);
|
|
2811
|
+
this.addPendingRequest(caseId, subject);
|
|
2812
|
+
if (wasEmpty) {
|
|
2813
|
+
this.ngZone.runOutsideAngular(() => {
|
|
2814
|
+
this.currentTimeoutHandle = setTimeout(() => this.ngZone.run(() => {
|
|
2815
|
+
this.flushRequests();
|
|
2816
|
+
}), this.batchCollectionDelayMs);
|
|
2817
|
+
});
|
|
2818
|
+
}
|
|
3121
2819
|
}
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
const localOffset = -date.getTimezoneOffset() / 60;
|
|
3125
|
-
return new Date(date.getTime() + localOffset * 3600 * 1000);
|
|
3126
|
-
}
|
|
3127
|
-
getDate(match) {
|
|
3128
|
-
const year = this.toInt(match[1]);
|
|
3129
|
-
const month = this.toInt(match[2]) - 1;
|
|
3130
|
-
const day = this.toInt(match[3]);
|
|
3131
|
-
let resultDate;
|
|
3132
|
-
if (match[4] && match[5] && match[6]) {
|
|
3133
|
-
const hour = this.toInt(match[4]);
|
|
3134
|
-
const minutes = this.toInt(match[5]);
|
|
3135
|
-
const seconds = this.toInt(match[6]);
|
|
3136
|
-
resultDate = new Date(year, month, day, hour, minutes, seconds, 0);
|
|
2820
|
+
if (this.pendingRequests.size >= this.maxRequestsPerBatch) {
|
|
2821
|
+
this.flushRequests();
|
|
3137
2822
|
}
|
|
3138
|
-
|
|
3139
|
-
|
|
2823
|
+
return subject;
|
|
2824
|
+
}
|
|
2825
|
+
stopPolling() {
|
|
2826
|
+
if (this.pollActivitiesSubscription) {
|
|
2827
|
+
this.pollActivitiesSubscription.unsubscribe();
|
|
3140
2828
|
}
|
|
3141
|
-
return resultDate;
|
|
3142
2829
|
}
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
2830
|
+
flushRequests() {
|
|
2831
|
+
if (this.currentTimeoutHandle) {
|
|
2832
|
+
clearTimeout(this.currentTimeoutHandle);
|
|
2833
|
+
this.currentTimeoutHandle = undefined;
|
|
3147
2834
|
}
|
|
3148
|
-
|
|
3149
|
-
|
|
2835
|
+
if (!this.pendingRequests.size) {
|
|
2836
|
+
return;
|
|
3150
2837
|
}
|
|
3151
|
-
|
|
2838
|
+
const requests = new Map(this.pendingRequests);
|
|
2839
|
+
this.pendingRequests.clear();
|
|
2840
|
+
this.performBatchRequest(requests);
|
|
3152
2841
|
}
|
|
3153
|
-
|
|
3154
|
-
|
|
2842
|
+
pollActivities(...caseIds) {
|
|
2843
|
+
if (!this.isEnabled) {
|
|
2844
|
+
return EMPTY;
|
|
2845
|
+
}
|
|
2846
|
+
return this.polling(this.activityService.getActivities(...caseIds), this.pollConfig);
|
|
3155
2847
|
}
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
return val.length >= padNum ? val : new Array(padNum - val.length + 1).join('0') + val;
|
|
2848
|
+
postViewActivity(caseId) {
|
|
2849
|
+
return this.postActivity(caseId, ActivityService.ACTIVITY_VIEW);
|
|
3159
2850
|
}
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
}
|
|
3163
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DatePipe, [{
|
|
3164
|
-
type: Pipe,
|
|
3165
|
-
args: [{
|
|
3166
|
-
name: 'ccdDate',
|
|
3167
|
-
standalone: false
|
|
3168
|
-
}]
|
|
3169
|
-
}], () => [{ type: FormatTranslatorService }], null); })();
|
|
3170
|
-
|
|
3171
|
-
class FieldLabelPipe {
|
|
3172
|
-
rpxTranslationPipe;
|
|
3173
|
-
constructor(rpxTranslationPipe) {
|
|
3174
|
-
this.rpxTranslationPipe = rpxTranslationPipe;
|
|
2851
|
+
postEditActivity(caseId) {
|
|
2852
|
+
return this.postActivity(caseId, ActivityService.ACTIVITY_EDIT);
|
|
3175
2853
|
}
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
2854
|
+
performBatchRequest(requests) {
|
|
2855
|
+
const caseIds = Array.from(requests.keys()).join();
|
|
2856
|
+
this.ngZone.runOutsideAngular(() => {
|
|
2857
|
+
// run polling outside angular zone so it does not trigger change detection
|
|
2858
|
+
this.pollActivitiesSubscription = this.pollActivities(caseIds).subscribe({
|
|
2859
|
+
// process activity inside zone so it triggers change detection for activity.component.ts
|
|
2860
|
+
next: (activities) => this.ngZone.run(() => {
|
|
2861
|
+
activities.forEach((activity) => {
|
|
2862
|
+
// Ignore activities returned for cases outside this local batch.
|
|
2863
|
+
requests.get(activity.caseId)?.next(activity);
|
|
2864
|
+
});
|
|
2865
|
+
}),
|
|
2866
|
+
error: (err) => this.ngZone.run(() => {
|
|
2867
|
+
this.logger.error('Error while polling activities.', { error: err });
|
|
2868
|
+
Array.from(requests.values()).forEach((subject) => subject.error(err));
|
|
2869
|
+
})
|
|
2870
|
+
});
|
|
2871
|
+
});
|
|
3185
2872
|
}
|
|
3186
|
-
|
|
3187
|
-
if (!
|
|
3188
|
-
return
|
|
3189
|
-
}
|
|
3190
|
-
else {
|
|
3191
|
-
return field.label;
|
|
2873
|
+
postActivity(caseId, activityType) {
|
|
2874
|
+
if (!this.isEnabled) {
|
|
2875
|
+
return EMPTY;
|
|
3192
2876
|
}
|
|
2877
|
+
const pollingConfig = {
|
|
2878
|
+
...this.pollConfig,
|
|
2879
|
+
interval: 5000 // inline with CCD Backend
|
|
2880
|
+
};
|
|
2881
|
+
return this.polling(this.activityService.postActivity(caseId, activityType), pollingConfig);
|
|
3193
2882
|
}
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
type: Pipe,
|
|
3202
|
-
args: [{
|
|
3203
|
-
name: 'ccdFieldLabel',
|
|
3204
|
-
pure: false,
|
|
3205
|
-
standalone: false
|
|
3206
|
-
}]
|
|
3207
|
-
}], () => [{ type: i1.RpxTranslatePipe }], null); })();
|
|
3208
|
-
|
|
3209
|
-
class FirstErrorPipe {
|
|
3210
|
-
rpxTranslationService;
|
|
3211
|
-
injector;
|
|
3212
|
-
asyncPipe;
|
|
3213
|
-
constructor(rpxTranslationService, injector) {
|
|
3214
|
-
this.rpxTranslationService = rpxTranslationService;
|
|
3215
|
-
this.injector = injector;
|
|
3216
|
-
this.asyncPipe = new AsyncPipe(this.injector.get(ChangeDetectorRef));
|
|
2883
|
+
addPendingRequest(caseId, subject) {
|
|
2884
|
+
this.pendingRequests.set(caseId, subject);
|
|
2885
|
+
// Components complete their returned Subject on destroy; remove it so a later same-case subscription gets a fresh Subject.
|
|
2886
|
+
subject.subscribe({
|
|
2887
|
+
complete: () => this.removePendingRequest(caseId, subject),
|
|
2888
|
+
error: () => this.removePendingRequest(caseId, subject)
|
|
2889
|
+
});
|
|
3217
2890
|
}
|
|
3218
|
-
|
|
3219
|
-
if (
|
|
3220
|
-
return
|
|
3221
|
-
}
|
|
3222
|
-
if (!args) {
|
|
3223
|
-
args = 'Field';
|
|
3224
|
-
}
|
|
3225
|
-
const keys = Object.keys(value);
|
|
3226
|
-
if (!keys.length) {
|
|
3227
|
-
return '';
|
|
3228
|
-
}
|
|
3229
|
-
let errorMessage;
|
|
3230
|
-
if (keys[0] === 'required') {
|
|
3231
|
-
errorMessage = '%FIELDLABEL% is required';
|
|
3232
|
-
}
|
|
3233
|
-
else if (keys[0] === 'pattern') {
|
|
3234
|
-
errorMessage = 'The data entered is not valid for %FIELDLABEL%';
|
|
3235
|
-
}
|
|
3236
|
-
else if (keys[0] === 'markDownPattern') {
|
|
3237
|
-
errorMessage = 'The data entered is not valid for %FIELDLABEL%. Link mark up characters are not allowed in this field';
|
|
3238
|
-
}
|
|
3239
|
-
else if (keys[0] === 'minlength') {
|
|
3240
|
-
errorMessage = '%FIELDLABEL% is below the minimum length';
|
|
3241
|
-
}
|
|
3242
|
-
else if (keys[0] === 'maxlength') {
|
|
3243
|
-
errorMessage = '%FIELDLABEL% exceeds the maximum length';
|
|
3244
|
-
}
|
|
3245
|
-
else if (value.hasOwnProperty('matDatetimePickerParse')) {
|
|
3246
|
-
errorMessage = 'The date entered is not valid. Please provide a valid date';
|
|
2891
|
+
removePendingRequest(caseId, subject) {
|
|
2892
|
+
if (this.pendingRequests.get(caseId) !== subject) {
|
|
2893
|
+
return;
|
|
3247
2894
|
}
|
|
3248
|
-
|
|
3249
|
-
|
|
2895
|
+
this.pendingRequests.delete(caseId);
|
|
2896
|
+
if (!this.pendingRequests.size && this.currentTimeoutHandle) {
|
|
2897
|
+
clearTimeout(this.currentTimeoutHandle);
|
|
2898
|
+
this.currentTimeoutHandle = undefined;
|
|
3250
2899
|
}
|
|
3251
|
-
const o = this.rpxTranslationService.getTranslation$(args).pipe(switchMap(fieldLabel => this.rpxTranslationService.getTranslationWithReplacements$(errorMessage, { FIELDLABEL: fieldLabel })));
|
|
3252
|
-
return this.asyncPipe.transform(o);
|
|
3253
2900
|
}
|
|
3254
|
-
|
|
3255
|
-
|
|
2901
|
+
polling(request$, options) {
|
|
2902
|
+
const pollingOptions = {
|
|
2903
|
+
interval: options.interval,
|
|
2904
|
+
attempts: options.attempts ?? 9,
|
|
2905
|
+
exponentialUnit: options.exponentialUnit ?? 1000
|
|
2906
|
+
};
|
|
2907
|
+
return concat(request$, defer(() => timer(pollingOptions.interval).pipe(switchMap(() => request$))).pipe(repeat())).pipe(
|
|
2908
|
+
// Preserve consecutive-failure retry behaviour using the current RxJS retry config.
|
|
2909
|
+
retry({
|
|
2910
|
+
count: pollingOptions.attempts,
|
|
2911
|
+
delay: (_error, retryCount) => timer(this.getExponentialRetryDelay(retryCount, pollingOptions.exponentialUnit)),
|
|
2912
|
+
resetOnSuccess: true
|
|
2913
|
+
}));
|
|
3256
2914
|
}
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
}
|
|
3260
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FirstErrorPipe, [{
|
|
3261
|
-
type: Pipe,
|
|
3262
|
-
args: [{
|
|
3263
|
-
name: 'ccdFirstError',
|
|
3264
|
-
pure: false,
|
|
3265
|
-
standalone: false
|
|
3266
|
-
}]
|
|
3267
|
-
}], () => [{ type: i1.RpxTranslationService }, { type: i0.Injector }], null); })();
|
|
3268
|
-
|
|
3269
|
-
class IsCompoundPipe {
|
|
3270
|
-
static COMPOUND_TYPES = [
|
|
3271
|
-
'Complex',
|
|
3272
|
-
'Label',
|
|
3273
|
-
'AddressGlobal',
|
|
3274
|
-
'AddressUK',
|
|
3275
|
-
'AddressGlobalUK',
|
|
3276
|
-
'CasePaymentHistoryViewer',
|
|
3277
|
-
'CaseHistoryViewer',
|
|
3278
|
-
'Organisation',
|
|
3279
|
-
'WaysToPay',
|
|
3280
|
-
'ComponentLauncher',
|
|
3281
|
-
'FlagLauncher',
|
|
3282
|
-
'CaseFlag'
|
|
3283
|
-
];
|
|
3284
|
-
static EXCLUDE = [
|
|
3285
|
-
'CaseLink',
|
|
3286
|
-
'JudicialUser'
|
|
3287
|
-
];
|
|
3288
|
-
transform(field) {
|
|
3289
|
-
if (!field || !field.field_type || !field.field_type.type) {
|
|
3290
|
-
return false;
|
|
3291
|
-
}
|
|
3292
|
-
if (IsCompoundPipe.COMPOUND_TYPES.indexOf(field.field_type.type) !== -1) {
|
|
3293
|
-
if (IsCompoundPipe.EXCLUDE.indexOf(field.field_type.id) !== -1) {
|
|
3294
|
-
return false;
|
|
3295
|
-
}
|
|
3296
|
-
return true;
|
|
3297
|
-
}
|
|
3298
|
-
return false;
|
|
2915
|
+
getExponentialRetryDelay(consecutiveErrorsCount, exponentialUnit) {
|
|
2916
|
+
return Math.pow(2, consecutiveErrorsCount - 1) * exponentialUnit;
|
|
3299
2917
|
}
|
|
3300
|
-
static ɵfac = function
|
|
3301
|
-
static
|
|
2918
|
+
static ɵfac = function ActivityPollingService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ActivityPollingService)(i0.ɵɵinject(ActivityService), i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(AbstractAppConfig)); };
|
|
2919
|
+
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ActivityPollingService, factory: ActivityPollingService.ɵfac });
|
|
3302
2920
|
}
|
|
3303
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(
|
|
3304
|
-
type:
|
|
3305
|
-
|
|
3306
|
-
name: 'ccdIsCompound',
|
|
3307
|
-
standalone: false
|
|
3308
|
-
}]
|
|
3309
|
-
}], null, null); })();
|
|
2921
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ActivityPollingService, [{
|
|
2922
|
+
type: Injectable
|
|
2923
|
+
}], () => [{ type: ActivityService }, { type: i0.NgZone }, { type: AbstractAppConfig }], null); })();
|
|
3310
2924
|
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
2925
|
+
function ActivityComponent_div_0_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
2926
|
+
i0.ɵɵelementStart(0, "div");
|
|
2927
|
+
i0.ɵɵelement(1, "ccd-activity-icon", 5);
|
|
2928
|
+
i0.ɵɵpipe(2, "rpxTranslate");
|
|
2929
|
+
i0.ɵɵelementEnd();
|
|
2930
|
+
} if (rf & 2) {
|
|
2931
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
2932
|
+
i0.ɵɵclassProp("activityEditorsAndViewersIcons", ctx_r0.viewersPresent())("activityEditorsIcon", !ctx_r0.viewersPresent());
|
|
2933
|
+
i0.ɵɵadvance();
|
|
2934
|
+
i0.ɵɵproperty("description", i0.ɵɵpipeBind1(2, 5, ctx_r0.editorsText));
|
|
2935
|
+
} }
|
|
2936
|
+
function ActivityComponent_div_0_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
2937
|
+
i0.ɵɵelementStart(0, "div", 6);
|
|
2938
|
+
i0.ɵɵelement(1, "ccd-activity-icon", 7);
|
|
2939
|
+
i0.ɵɵpipe(2, "rpxTranslate");
|
|
2940
|
+
i0.ɵɵelementEnd();
|
|
2941
|
+
} if (rf & 2) {
|
|
2942
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
2943
|
+
i0.ɵɵadvance();
|
|
2944
|
+
i0.ɵɵproperty("description", i0.ɵɵpipeBind1(2, 1, ctx_r0.viewersText));
|
|
2945
|
+
} }
|
|
2946
|
+
function ActivityComponent_div_0_div_3_Template(rf, ctx) { if (rf & 1) {
|
|
2947
|
+
i0.ɵɵelementStart(0, "div");
|
|
2948
|
+
i0.ɵɵelement(1, "ccd-activity-banner", 8);
|
|
2949
|
+
i0.ɵɵpipe(2, "rpxTranslate");
|
|
2950
|
+
i0.ɵɵelementEnd();
|
|
2951
|
+
} if (rf & 2) {
|
|
2952
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
2953
|
+
i0.ɵɵadvance();
|
|
2954
|
+
i0.ɵɵproperty("description", i0.ɵɵpipeBind1(2, 1, ctx_r0.editorsText));
|
|
2955
|
+
} }
|
|
2956
|
+
function ActivityComponent_div_0_div_4_Template(rf, ctx) { if (rf & 1) {
|
|
2957
|
+
i0.ɵɵelementStart(0, "div");
|
|
2958
|
+
i0.ɵɵelement(1, "ccd-activity-banner", 9);
|
|
2959
|
+
i0.ɵɵpipe(2, "rpxTranslate");
|
|
2960
|
+
i0.ɵɵelementEnd();
|
|
2961
|
+
} if (rf & 2) {
|
|
2962
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
2963
|
+
i0.ɵɵadvance();
|
|
2964
|
+
i0.ɵɵproperty("description", i0.ɵɵpipeBind1(2, 1, ctx_r0.viewersText));
|
|
2965
|
+
} }
|
|
2966
|
+
function ActivityComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
2967
|
+
i0.ɵɵelementStart(0, "div", 1);
|
|
2968
|
+
i0.ɵɵtemplate(1, ActivityComponent_div_0_div_1_Template, 3, 7, "div", 2)(2, ActivityComponent_div_0_div_2_Template, 3, 3, "div", 3)(3, ActivityComponent_div_0_div_3_Template, 3, 3, "div", 4)(4, ActivityComponent_div_0_div_4_Template, 3, 3, "div", 4);
|
|
2969
|
+
i0.ɵɵelementEnd();
|
|
2970
|
+
} if (rf & 2) {
|
|
2971
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
2972
|
+
i0.ɵɵadvance();
|
|
2973
|
+
i0.ɵɵproperty("ngIf", ctx_r0.displayMode === ctx_r0.dspMode.ICON && ctx_r0.editorsPresent());
|
|
2974
|
+
i0.ɵɵadvance();
|
|
2975
|
+
i0.ɵɵproperty("ngIf", ctx_r0.displayMode === ctx_r0.dspMode.ICON && ctx_r0.viewersPresent());
|
|
2976
|
+
i0.ɵɵadvance();
|
|
2977
|
+
i0.ɵɵproperty("ngIf", ctx_r0.displayMode === ctx_r0.dspMode.BANNER && ctx_r0.editorsPresent());
|
|
2978
|
+
i0.ɵɵadvance();
|
|
2979
|
+
i0.ɵɵproperty("ngIf", ctx_r0.displayMode === ctx_r0.dspMode.BANNER && ctx_r0.viewersPresent());
|
|
2980
|
+
} }
|
|
2981
|
+
class ActivityComponent {
|
|
2982
|
+
activityPollingService;
|
|
2983
|
+
activity;
|
|
2984
|
+
dspMode = DisplayMode;
|
|
2985
|
+
viewersText;
|
|
2986
|
+
editorsText;
|
|
2987
|
+
subscription;
|
|
2988
|
+
caseId;
|
|
2989
|
+
displayMode;
|
|
2990
|
+
VIEWERS_PREFIX = '';
|
|
2991
|
+
VIEWERS_SUFFIX = 'viewing this case';
|
|
2992
|
+
EDITORS_PREFIX = 'This case is being updated by ';
|
|
2993
|
+
EDITORS_SUFFIX = '';
|
|
2994
|
+
constructor(activityPollingService) {
|
|
2995
|
+
this.activityPollingService = activityPollingService;
|
|
3323
2996
|
}
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
2997
|
+
ngOnInit() {
|
|
2998
|
+
this.activity = new Activity();
|
|
2999
|
+
this.activity.caseId = this.caseId;
|
|
3000
|
+
this.activity.editors = [];
|
|
3001
|
+
this.activity.unknownEditors = 0;
|
|
3002
|
+
this.activity.viewers = [];
|
|
3003
|
+
this.activity.unknownViewers = 0;
|
|
3004
|
+
this.viewersText = '';
|
|
3005
|
+
this.editorsText = '';
|
|
3006
|
+
this.subscription = this.activityPollingService.subscribeToActivity(this.caseId, newActivity => this.onActivityChange(newActivity));
|
|
3329
3007
|
}
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
return field.field_type.type === 'Label';
|
|
3008
|
+
onActivityChange(newActivity) {
|
|
3009
|
+
this.activity = newActivity;
|
|
3010
|
+
this.viewersText = this.generateDescription(this.VIEWERS_PREFIX, this.VIEWERS_SUFFIX, this.activity.viewers, this.activity.unknownViewers);
|
|
3011
|
+
this.editorsText = this.generateDescription(this.EDITORS_PREFIX, this.EDITORS_SUFFIX, this.activity.editors, this.activity.unknownEditors);
|
|
3335
3012
|
}
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
}
|
|
3339
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFieldService, [{
|
|
3340
|
-
type: Injectable
|
|
3341
|
-
}], null, null); })();
|
|
3342
|
-
|
|
3343
|
-
class IsMandatoryPipe {
|
|
3344
|
-
caseFieldService;
|
|
3345
|
-
constructor(caseFieldService) {
|
|
3346
|
-
this.caseFieldService = caseFieldService;
|
|
3013
|
+
isActivityEnabled() {
|
|
3014
|
+
return this.activityPollingService.isEnabled;
|
|
3347
3015
|
}
|
|
3348
|
-
|
|
3349
|
-
return this.
|
|
3016
|
+
isActiveCase() {
|
|
3017
|
+
return this.activity.editors.length || this.activity.viewers.length || this.activity.unknownEditors || this.activity.unknownViewers;
|
|
3350
3018
|
}
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
}
|
|
3354
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(IsMandatoryPipe, [{
|
|
3355
|
-
type: Pipe,
|
|
3356
|
-
args: [{
|
|
3357
|
-
name: 'ccdIsMandatory',
|
|
3358
|
-
standalone: false
|
|
3359
|
-
}]
|
|
3360
|
-
}], () => [{ type: CaseFieldService }], null); })();
|
|
3361
|
-
|
|
3362
|
-
class IsReadOnlyPipe {
|
|
3363
|
-
caseFieldService;
|
|
3364
|
-
constructor(caseFieldService) {
|
|
3365
|
-
this.caseFieldService = caseFieldService;
|
|
3019
|
+
viewersPresent() {
|
|
3020
|
+
return (this.activity.viewers.length > 0 || this.activity.unknownViewers > 0);
|
|
3366
3021
|
}
|
|
3367
|
-
|
|
3368
|
-
return this.
|
|
3022
|
+
editorsPresent() {
|
|
3023
|
+
return (this.activity.editors.length > 0 || this.activity.unknownEditors > 0);
|
|
3369
3024
|
}
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
args: [{
|
|
3376
|
-
name: 'ccdIsReadOnly',
|
|
3377
|
-
standalone: false
|
|
3378
|
-
}]
|
|
3379
|
-
}], () => [{ type: CaseFieldService }], null); })();
|
|
3380
|
-
|
|
3381
|
-
class IsReadOnlyAndNotCollectionPipe {
|
|
3382
|
-
caseFieldService;
|
|
3383
|
-
constructor(caseFieldService) {
|
|
3384
|
-
this.caseFieldService = caseFieldService;
|
|
3025
|
+
ngOnDestroy() {
|
|
3026
|
+
if (this.subscription) {
|
|
3027
|
+
this.subscription.complete();
|
|
3028
|
+
}
|
|
3029
|
+
this.activityPollingService.stopPolling();
|
|
3385
3030
|
}
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3031
|
+
generateDescription(prefix, suffix, namesArray, unknownCount) {
|
|
3032
|
+
let resultText = prefix;
|
|
3033
|
+
resultText += namesArray.map(activityInfo => `${activityInfo.forename} ${activityInfo.surname}`).join(', ');
|
|
3034
|
+
if (unknownCount > 0) {
|
|
3035
|
+
resultText += (namesArray.length > 0 ? ` and ${unknownCount} other` : `${unknownCount} user`);
|
|
3036
|
+
resultText += (unknownCount > 1 ? 's' : '');
|
|
3389
3037
|
}
|
|
3390
|
-
|
|
3391
|
-
|
|
3038
|
+
else {
|
|
3039
|
+
resultText = this.replaceLastCommaWithAnd(resultText);
|
|
3392
3040
|
}
|
|
3393
|
-
|
|
3041
|
+
if (suffix.length > 0) {
|
|
3042
|
+
if (namesArray.length + unknownCount > 1) {
|
|
3043
|
+
resultText += ` are ${suffix}`;
|
|
3044
|
+
}
|
|
3045
|
+
else {
|
|
3046
|
+
resultText += ` is ${suffix}`;
|
|
3047
|
+
}
|
|
3048
|
+
}
|
|
3049
|
+
return resultText;
|
|
3394
3050
|
}
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
return field.field_type && field.field_type.type === 'Collection';
|
|
3051
|
+
replaceLastCommaWithAnd(str) {
|
|
3052
|
+
return str.trim().replace(/,([^,]*)$/, ' and $1').split(' ').join(' ');
|
|
3398
3053
|
}
|
|
3399
|
-
static ɵfac = function
|
|
3400
|
-
static
|
|
3054
|
+
static ɵfac = function ActivityComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ActivityComponent)(i0.ɵɵdirectiveInject(ActivityPollingService)); };
|
|
3055
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ActivityComponent, selectors: [["ccd-activity"]], inputs: { caseId: "caseId", displayMode: "displayMode" }, standalone: false, decls: 1, vars: 1, consts: [["class", "activityComponent", 4, "ngIf"], [1, "activityComponent"], [3, "activityEditorsAndViewersIcons", "activityEditorsIcon", 4, "ngIf"], ["class", "activityViewersIcon", 4, "ngIf"], [4, "ngIf"], ["imageLink", "assets/img/editor.png", 3, "description"], [1, "activityViewersIcon"], ["imageLink", "assets/img/viewer.png", 3, "description"], ["imageLink", "assets/img/editorBanner.png", "bannerType", "editor", 3, "description"], ["imageLink", "assets/img/viewerBanner.png", "bannerType", "viewer", 3, "description"]], template: function ActivityComponent_Template(rf, ctx) { if (rf & 1) {
|
|
3056
|
+
i0.ɵɵtemplate(0, ActivityComponent_div_0_Template, 5, 4, "div", 0);
|
|
3057
|
+
} if (rf & 2) {
|
|
3058
|
+
i0.ɵɵproperty("ngIf", ctx.isActivityEnabled());
|
|
3059
|
+
} }, dependencies: [i5.NgIf, ActivityBannerComponent, ActivityIconComponent, i1.RpxTranslatePipe], styles: [".activityEditorsIcon[_ngcontent-%COMP%]{margin-left:14px}.activityEditorsAndViewersIcons[_ngcontent-%COMP%], .activityViewersIcon[_ngcontent-%COMP%]{float:left;margin-left:14px}"] });
|
|
3401
3060
|
}
|
|
3402
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(
|
|
3403
|
-
type:
|
|
3404
|
-
args: [{
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3061
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ActivityComponent, [{
|
|
3062
|
+
type: Component,
|
|
3063
|
+
args: [{ selector: 'ccd-activity', standalone: false, template: "<div class=\"activityComponent\" *ngIf=\"isActivityEnabled()\">\n <div *ngIf=\"displayMode === dspMode.ICON && editorsPresent()\" [class.activityEditorsAndViewersIcons]=\"viewersPresent()\" [class.activityEditorsIcon]=\"!viewersPresent()\">\n <ccd-activity-icon imageLink=\"assets/img/editor.png\" [description]=\"editorsText | rpxTranslate\"></ccd-activity-icon>\n </div>\n <div *ngIf=\"displayMode === dspMode.ICON && viewersPresent()\" class=\"activityViewersIcon\">\n <ccd-activity-icon imageLink=\"assets/img/viewer.png\" [description]=\"viewersText | rpxTranslate\"></ccd-activity-icon>\n </div>\n <div *ngIf=\"displayMode === dspMode.BANNER && editorsPresent()\">\n <ccd-activity-banner imageLink=\"assets/img/editorBanner.png\" [description]=\"editorsText | rpxTranslate\" bannerType=\"editor\">\n </ccd-activity-banner>\n </div>\n <div *ngIf=\"displayMode === dspMode.BANNER && viewersPresent()\">\n <ccd-activity-banner imageLink=\"assets/img/viewerBanner.png\" [description]=\"viewersText | rpxTranslate\" bannerType=\"viewer\">\n </ccd-activity-banner>\n </div>\n</div>\n", styles: [".activityEditorsIcon{margin-left:14px}.activityEditorsAndViewersIcons,.activityViewersIcon{float:left;margin-left:14px}\n"] }]
|
|
3064
|
+
}], () => [{ type: ActivityPollingService }], { caseId: [{
|
|
3065
|
+
type: Input
|
|
3066
|
+
}], displayMode: [{
|
|
3067
|
+
type: Input
|
|
3068
|
+
}] }); })();
|
|
3069
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ActivityComponent, { className: "ActivityComponent", filePath: "lib/shared/components/activity/activity.component.ts", lineNumber: 12 }); })();
|
|
3409
3070
|
|
|
3410
|
-
class
|
|
3411
|
-
static ɵfac = function
|
|
3412
|
-
static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type:
|
|
3071
|
+
class ActivityModule {
|
|
3072
|
+
static ɵfac = function ActivityModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ActivityModule)(); };
|
|
3073
|
+
static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: ActivityModule });
|
|
3413
3074
|
static ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ providers: [
|
|
3414
|
-
|
|
3415
|
-
|
|
3075
|
+
ActivityService,
|
|
3076
|
+
ActivityPollingService,
|
|
3077
|
+
SessionStorageService,
|
|
3416
3078
|
], imports: [CommonModule,
|
|
3079
|
+
RouterModule,
|
|
3417
3080
|
RpxTranslationModule.forChild()] });
|
|
3418
3081
|
}
|
|
3419
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(
|
|
3082
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ActivityModule, [{
|
|
3420
3083
|
type: NgModule,
|
|
3421
3084
|
args: [{
|
|
3422
3085
|
imports: [
|
|
3423
3086
|
CommonModule,
|
|
3087
|
+
RouterModule,
|
|
3424
3088
|
RpxTranslationModule.forChild()
|
|
3425
3089
|
],
|
|
3426
3090
|
declarations: [
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
IsCompoundPipe,
|
|
3431
|
-
IsMandatoryPipe,
|
|
3432
|
-
IsReadOnlyPipe,
|
|
3433
|
-
IsReadOnlyAndNotCollectionPipe,
|
|
3434
|
-
DashPipe
|
|
3091
|
+
ActivityComponent,
|
|
3092
|
+
ActivityBannerComponent,
|
|
3093
|
+
ActivityIconComponent,
|
|
3435
3094
|
],
|
|
3436
3095
|
exports: [
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
IsCompoundPipe,
|
|
3441
|
-
IsMandatoryPipe,
|
|
3442
|
-
IsReadOnlyPipe,
|
|
3443
|
-
IsReadOnlyAndNotCollectionPipe,
|
|
3444
|
-
DashPipe
|
|
3096
|
+
ActivityComponent,
|
|
3097
|
+
ActivityBannerComponent,
|
|
3098
|
+
ActivityIconComponent,
|
|
3445
3099
|
],
|
|
3446
3100
|
providers: [
|
|
3447
|
-
|
|
3448
|
-
|
|
3101
|
+
ActivityService,
|
|
3102
|
+
ActivityPollingService,
|
|
3103
|
+
SessionStorageService,
|
|
3449
3104
|
]
|
|
3450
3105
|
}]
|
|
3451
3106
|
}], null, null); })();
|
|
3452
|
-
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
IsReadOnlyAndNotCollectionPipe,
|
|
3459
|
-
DashPipe], imports: [CommonModule, i1.RpxTranslationModule], exports: [DatePipe,
|
|
3460
|
-
FieldLabelPipe,
|
|
3461
|
-
FirstErrorPipe,
|
|
3462
|
-
IsCompoundPipe,
|
|
3463
|
-
IsMandatoryPipe,
|
|
3464
|
-
IsReadOnlyPipe,
|
|
3465
|
-
IsReadOnlyAndNotCollectionPipe,
|
|
3466
|
-
DashPipe] }); })();
|
|
3467
|
-
|
|
3468
|
-
// tslint:disable:variable-name
|
|
3469
|
-
class AddressModel {
|
|
3470
|
-
AddressLine1 = '';
|
|
3471
|
-
AddressLine2 = '';
|
|
3472
|
-
AddressLine3 = '';
|
|
3473
|
-
PostTown = '';
|
|
3474
|
-
County = '';
|
|
3475
|
-
PostCode = '';
|
|
3476
|
-
Country = '';
|
|
3477
|
-
}
|
|
3107
|
+
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(ActivityModule, { declarations: [ActivityComponent,
|
|
3108
|
+
ActivityBannerComponent,
|
|
3109
|
+
ActivityIconComponent], imports: [CommonModule,
|
|
3110
|
+
RouterModule, i1.RpxTranslationModule], exports: [ActivityComponent,
|
|
3111
|
+
ActivityBannerComponent,
|
|
3112
|
+
ActivityIconComponent] }); })();
|
|
3478
3113
|
|
|
3479
|
-
class
|
|
3480
|
-
|
|
3114
|
+
class AlertService {
|
|
3115
|
+
router;
|
|
3116
|
+
rpxTranslationService;
|
|
3117
|
+
// the preserved messages
|
|
3118
|
+
preservedError = '';
|
|
3119
|
+
preservedWarning = '';
|
|
3120
|
+
preservedSuccess = '';
|
|
3121
|
+
// TODO: Remove
|
|
3481
3122
|
message;
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
acls;
|
|
3566
|
-
metadata;
|
|
3567
|
-
formatted_value;
|
|
3568
|
-
retain_hidden_value;
|
|
3569
|
-
wizardProps;
|
|
3570
|
-
_value;
|
|
3571
|
-
_list_items = [];
|
|
3572
|
-
isTranslatedFlag = false;
|
|
3573
|
-
get value() {
|
|
3574
|
-
if (this.field_type && (this.field_type.type === 'DynamicList' || this.field_type.type === 'DynamicRadioList')) {
|
|
3575
|
-
return this._value && this._value.value ? this._value.value.code : this._value;
|
|
3123
|
+
level;
|
|
3124
|
+
successes;
|
|
3125
|
+
errors;
|
|
3126
|
+
warnings;
|
|
3127
|
+
// TODO: Remove
|
|
3128
|
+
alerts;
|
|
3129
|
+
successObserver;
|
|
3130
|
+
errorObserver;
|
|
3131
|
+
warningObserver;
|
|
3132
|
+
// TODO: Remove
|
|
3133
|
+
alertObserver;
|
|
3134
|
+
preserveAlerts = false;
|
|
3135
|
+
constructor(router, rpxTranslationService) {
|
|
3136
|
+
this.router = router;
|
|
3137
|
+
this.rpxTranslationService = rpxTranslationService;
|
|
3138
|
+
this.successes = Observable
|
|
3139
|
+
.create(observer => this.successObserver = observer).pipe(publish(), refCount());
|
|
3140
|
+
this.successes.subscribe();
|
|
3141
|
+
this.errors = Observable
|
|
3142
|
+
.create(observer => this.errorObserver = observer).pipe(publish(), refCount());
|
|
3143
|
+
this.errors.subscribe();
|
|
3144
|
+
this.warnings = Observable
|
|
3145
|
+
.create(observer => this.warningObserver = observer).pipe(publish(), refCount());
|
|
3146
|
+
this.warnings.subscribe();
|
|
3147
|
+
// TODO: Remove
|
|
3148
|
+
this.alerts = Observable
|
|
3149
|
+
.create(observer => this.alertObserver = observer).pipe(publish(), refCount());
|
|
3150
|
+
this.alerts.subscribe();
|
|
3151
|
+
this.router
|
|
3152
|
+
.events
|
|
3153
|
+
.subscribe(event => {
|
|
3154
|
+
if (event instanceof NavigationStart) {
|
|
3155
|
+
// if there is no longer a preserve alerts setting for the page then clear all observers and preserved messages
|
|
3156
|
+
if (!this.preserveAlerts) {
|
|
3157
|
+
this.clear();
|
|
3158
|
+
}
|
|
3159
|
+
// if not, then set the preserving of alerts to false so rendering to a new page
|
|
3160
|
+
this.preserveAlerts = false;
|
|
3161
|
+
}
|
|
3162
|
+
});
|
|
3163
|
+
}
|
|
3164
|
+
clear() {
|
|
3165
|
+
this.successObserver.next(null);
|
|
3166
|
+
this.errorObserver.next(null);
|
|
3167
|
+
this.warningObserver.next(null);
|
|
3168
|
+
this.preservedError = '';
|
|
3169
|
+
this.preservedWarning = '';
|
|
3170
|
+
this.preservedSuccess = '';
|
|
3171
|
+
// EUI-3381.
|
|
3172
|
+
this.alertObserver.next(null);
|
|
3173
|
+
this.message = '';
|
|
3174
|
+
}
|
|
3175
|
+
error({ phrase, replacements }) {
|
|
3176
|
+
const message = this.getTranslationWithReplacements(phrase, replacements);
|
|
3177
|
+
this.preservedError = this.preserveMessages(message);
|
|
3178
|
+
const alert = { level: 'error', message };
|
|
3179
|
+
this.errorObserver.next(alert);
|
|
3180
|
+
// EUI-3381.
|
|
3181
|
+
this.push(alert);
|
|
3182
|
+
}
|
|
3183
|
+
warning({ phrase, replacements }) {
|
|
3184
|
+
const message = this.getTranslationWithReplacements(phrase, replacements);
|
|
3185
|
+
this.preservedWarning = this.preserveMessages(message);
|
|
3186
|
+
const alert = { level: 'warning', message };
|
|
3187
|
+
this.warningObserver.next(alert);
|
|
3188
|
+
// EUI-3381.
|
|
3189
|
+
this.push(alert);
|
|
3190
|
+
}
|
|
3191
|
+
success({ preserve, phrase, replacements }) {
|
|
3192
|
+
const message = this.getTranslationWithReplacements(phrase, replacements);
|
|
3193
|
+
this.preserveAlerts = preserve || this.preserveAlerts;
|
|
3194
|
+
const alert = { level: 'success', message };
|
|
3195
|
+
this.preservedSuccess = this.preserveMessages(message);
|
|
3196
|
+
this.successObserver.next(alert);
|
|
3197
|
+
// EUI-3381.
|
|
3198
|
+
this.push(alert);
|
|
3199
|
+
}
|
|
3200
|
+
getTranslationWithReplacements(phrase, replacements) {
|
|
3201
|
+
let message;
|
|
3202
|
+
if (replacements) {
|
|
3203
|
+
this.rpxTranslationService.getTranslationWithReplacements$(phrase, replacements).subscribe(translation => {
|
|
3204
|
+
message = translation;
|
|
3205
|
+
});
|
|
3576
3206
|
}
|
|
3577
|
-
else
|
|
3578
|
-
|
|
3207
|
+
else {
|
|
3208
|
+
this.rpxTranslationService.getTranslation$(phrase).subscribe(translation => {
|
|
3209
|
+
message = translation;
|
|
3210
|
+
});
|
|
3211
|
+
}
|
|
3212
|
+
return message;
|
|
3213
|
+
}
|
|
3214
|
+
setPreserveAlerts(preserve, urlInfo) {
|
|
3215
|
+
// if there is no url setting then just preserve the messages
|
|
3216
|
+
if (!urlInfo) {
|
|
3217
|
+
this.preserveAlerts = preserve;
|
|
3579
3218
|
}
|
|
3580
3219
|
else {
|
|
3581
|
-
|
|
3220
|
+
// check if the url includes the sting given
|
|
3221
|
+
this.preserveAlerts = this.currentUrlIncludesInfo(preserve, urlInfo);
|
|
3582
3222
|
}
|
|
3583
3223
|
}
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3224
|
+
currentUrlIncludesInfo(preserve, urlInfo) {
|
|
3225
|
+
// loop through the list of strings and check the router includes all of them
|
|
3226
|
+
for (const urlSnip of urlInfo) {
|
|
3227
|
+
if (!this.router.url.includes(urlSnip)) {
|
|
3228
|
+
// return the opposite boolean value if the router does not include one of the strings
|
|
3229
|
+
return !preserve;
|
|
3588
3230
|
}
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3231
|
+
}
|
|
3232
|
+
// return the boolean value if all strings are in the url
|
|
3233
|
+
return preserve;
|
|
3234
|
+
}
|
|
3235
|
+
isPreserveAlerts() {
|
|
3236
|
+
return this.preserveAlerts;
|
|
3237
|
+
}
|
|
3238
|
+
preserveMessages(message) {
|
|
3239
|
+
// preserve the messages if set to preserve them
|
|
3240
|
+
if (this.isPreserveAlerts()) {
|
|
3241
|
+
return message;
|
|
3242
|
+
}
|
|
3243
|
+
else {
|
|
3244
|
+
return '';
|
|
3245
|
+
}
|
|
3246
|
+
}
|
|
3247
|
+
// TODO: Remove
|
|
3248
|
+
push(msgObject) {
|
|
3249
|
+
this.message = msgObject.message;
|
|
3250
|
+
this.level = msgObject.level;
|
|
3251
|
+
this.alertObserver.next({
|
|
3252
|
+
level: this.level,
|
|
3253
|
+
message: this.message
|
|
3254
|
+
});
|
|
3255
|
+
}
|
|
3256
|
+
static ɵfac = function AlertService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AlertService)(i0.ɵɵinject(i1$1.Router), i0.ɵɵinject(i1.RpxTranslationService)); };
|
|
3257
|
+
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: AlertService, factory: AlertService.ɵfac });
|
|
3258
|
+
}
|
|
3259
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AlertService, [{
|
|
3260
|
+
type: Injectable
|
|
3261
|
+
}], () => [{ type: i1$1.Router }, { type: i1.RpxTranslationService }], null); })();
|
|
3262
|
+
|
|
3263
|
+
class DraftService {
|
|
3264
|
+
http;
|
|
3265
|
+
appConfig;
|
|
3266
|
+
errorService;
|
|
3267
|
+
static V2_MEDIATYPE_DRAFT_CREATE = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-draft-create.v2+json;charset=UTF-8';
|
|
3268
|
+
static V2_MEDIATYPE_DRAFT_UPDATE = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-draft-update.v2+json;charset=UTF-8';
|
|
3269
|
+
static V2_MEDIATYPE_DRAFT_READ = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-draft-read.v2+json;charset=UTF-8';
|
|
3270
|
+
static V2_MEDIATYPE_DRAFT_DELETE = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-draft-delete.v2+json;charset=UTF-8';
|
|
3271
|
+
constructor(http, appConfig, errorService) {
|
|
3272
|
+
this.http = http;
|
|
3273
|
+
this.appConfig = appConfig;
|
|
3274
|
+
this.errorService = errorService;
|
|
3275
|
+
}
|
|
3276
|
+
createDraft(ctid, eventData) {
|
|
3277
|
+
const saveDraftEndpoint = this.appConfig.getCreateOrUpdateDraftsUrl(ctid);
|
|
3278
|
+
const headers = new HttpHeaders()
|
|
3279
|
+
.set('experimental', 'true')
|
|
3280
|
+
.set('Accept', DraftService.V2_MEDIATYPE_DRAFT_CREATE)
|
|
3281
|
+
.set('Content-Type', 'application/json');
|
|
3282
|
+
return this.http
|
|
3283
|
+
.post(saveDraftEndpoint, eventData, { headers, observe: 'body' })
|
|
3284
|
+
.pipe(catchError((error) => {
|
|
3285
|
+
this.errorService.setError(error);
|
|
3286
|
+
return throwError(error);
|
|
3287
|
+
}));
|
|
3288
|
+
}
|
|
3289
|
+
updateDraft(ctid, draftId, eventData) {
|
|
3290
|
+
const saveDraftEndpoint = `${this.appConfig.getCreateOrUpdateDraftsUrl(ctid)}/${draftId}`;
|
|
3291
|
+
const headers = new HttpHeaders()
|
|
3292
|
+
.set('experimental', 'true')
|
|
3293
|
+
.set('Accept', DraftService.V2_MEDIATYPE_DRAFT_UPDATE)
|
|
3294
|
+
.set('Content-Type', 'application/json');
|
|
3295
|
+
return this.http
|
|
3296
|
+
.put(saveDraftEndpoint, eventData, { headers, observe: 'body' })
|
|
3297
|
+
.pipe(catchError((error) => {
|
|
3298
|
+
this.errorService.setError(error);
|
|
3299
|
+
return throwError(error);
|
|
3300
|
+
}));
|
|
3301
|
+
}
|
|
3302
|
+
getDraft(draftId) {
|
|
3303
|
+
const url = this.appConfig.getViewOrDeleteDraftsUrl(draftId.slice(DRAFT_PREFIX.length));
|
|
3304
|
+
const headers = new HttpHeaders()
|
|
3305
|
+
.set('experimental', 'true')
|
|
3306
|
+
.set('Accept', DraftService.V2_MEDIATYPE_DRAFT_READ)
|
|
3307
|
+
.set('Content-Type', 'application/json');
|
|
3308
|
+
return this.http
|
|
3309
|
+
.get(url, { headers, observe: 'body' })
|
|
3310
|
+
.pipe(catchError((error) => {
|
|
3311
|
+
this.errorService.setError(error);
|
|
3312
|
+
return throwError(error);
|
|
3313
|
+
}));
|
|
3314
|
+
}
|
|
3315
|
+
deleteDraft(draftId) {
|
|
3316
|
+
const url = this.appConfig.getViewOrDeleteDraftsUrl(draftId.slice(DRAFT_PREFIX.length));
|
|
3317
|
+
const headers = new HttpHeaders()
|
|
3318
|
+
.set('experimental', 'true')
|
|
3319
|
+
.set('Accept', DraftService.V2_MEDIATYPE_DRAFT_DELETE)
|
|
3320
|
+
.set('Content-Type', 'application/json');
|
|
3321
|
+
return this.http
|
|
3322
|
+
.delete(url, { headers, observe: 'body' }).pipe(catchError((error) => {
|
|
3323
|
+
this.errorService.setError(error);
|
|
3324
|
+
return throwError(error);
|
|
3325
|
+
}));
|
|
3326
|
+
}
|
|
3327
|
+
createOrUpdateDraft(caseTypeId, draftId, caseEventData) {
|
|
3328
|
+
if (!draftId) {
|
|
3329
|
+
return this.createDraft(caseTypeId, caseEventData);
|
|
3330
|
+
}
|
|
3331
|
+
else {
|
|
3332
|
+
return this.updateDraft(caseTypeId, Draft.stripDraftId(draftId), caseEventData);
|
|
3333
|
+
}
|
|
3334
|
+
}
|
|
3335
|
+
static ɵfac = function DraftService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || DraftService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig), i0.ɵɵinject(HttpErrorService)); };
|
|
3336
|
+
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: DraftService, factory: DraftService.ɵfac });
|
|
3337
|
+
}
|
|
3338
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DraftService, [{
|
|
3339
|
+
type: Injectable
|
|
3340
|
+
}], () => [{ type: HttpService }, { type: AbstractAppConfig }, { type: HttpErrorService }], null); })();
|
|
3341
|
+
|
|
3342
|
+
class ConditionalShowRegistrarService {
|
|
3343
|
+
registeredDirectives = [];
|
|
3344
|
+
register(newDirective) {
|
|
3345
|
+
this.registeredDirectives.push(newDirective);
|
|
3346
|
+
}
|
|
3347
|
+
reset() {
|
|
3348
|
+
this.registeredDirectives = [];
|
|
3349
|
+
}
|
|
3350
|
+
static ɵfac = function ConditionalShowRegistrarService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ConditionalShowRegistrarService)(); };
|
|
3351
|
+
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ConditionalShowRegistrarService, factory: ConditionalShowRegistrarService.ɵfac });
|
|
3352
|
+
}
|
|
3353
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ConditionalShowRegistrarService, [{
|
|
3354
|
+
type: Injectable
|
|
3355
|
+
}], null, null); })();
|
|
3356
|
+
|
|
3357
|
+
/** Keeps track of initially hidden fields that toggle to show on the page (parent page).
|
|
3358
|
+
* Used to decide whether to redisplay the grey bar when returning to the page during
|
|
3359
|
+
* navigation between pages.
|
|
3360
|
+
*/
|
|
3361
|
+
class GreyBarService {
|
|
3362
|
+
fieldsToggledToShow = [];
|
|
3363
|
+
renderer;
|
|
3364
|
+
constructor(rendererFactory) {
|
|
3365
|
+
this.renderer = rendererFactory.createRenderer(null, null);
|
|
3366
|
+
}
|
|
3367
|
+
showGreyBar(field, el) {
|
|
3368
|
+
if (!field.isCollection()) {
|
|
3369
|
+
this.addGreyBar(el);
|
|
3370
|
+
}
|
|
3371
|
+
}
|
|
3372
|
+
removeGreyBar(el) {
|
|
3373
|
+
const divSelector = el.nativeElement.querySelector('div');
|
|
3374
|
+
if (divSelector) {
|
|
3375
|
+
this.renderer.removeClass(divSelector, 'show-condition-grey-bar');
|
|
3376
|
+
}
|
|
3377
|
+
}
|
|
3378
|
+
addToggledToShow(fieldId) {
|
|
3379
|
+
this.fieldsToggledToShow.push(fieldId);
|
|
3380
|
+
}
|
|
3381
|
+
removeToggledToShow(fieldId) {
|
|
3382
|
+
this.fieldsToggledToShow = this.fieldsToggledToShow.filter(id => id !== fieldId);
|
|
3383
|
+
}
|
|
3384
|
+
wasToggledToShow(fieldId) {
|
|
3385
|
+
return this.fieldsToggledToShow.find(id => id === fieldId) !== undefined;
|
|
3386
|
+
}
|
|
3387
|
+
reset() {
|
|
3388
|
+
this.fieldsToggledToShow = [];
|
|
3389
|
+
}
|
|
3390
|
+
addGreyBar(el) {
|
|
3391
|
+
const divSelector = el.nativeElement.querySelector('div');
|
|
3392
|
+
if (divSelector) {
|
|
3393
|
+
this.renderer.addClass(divSelector, 'show-condition-grey-bar');
|
|
3394
|
+
}
|
|
3395
|
+
}
|
|
3396
|
+
static ɵfac = function GreyBarService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || GreyBarService)(i0.ɵɵinject(i0.RendererFactory2)); };
|
|
3397
|
+
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: GreyBarService, factory: GreyBarService.ɵfac });
|
|
3398
|
+
}
|
|
3399
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(GreyBarService, [{
|
|
3400
|
+
type: Injectable
|
|
3401
|
+
}], () => [{ type: i0.RendererFactory2 }], null); })();
|
|
3402
|
+
|
|
3403
|
+
var AddCommentsErrorMessage;
|
|
3404
|
+
(function (AddCommentsErrorMessage) {
|
|
3405
|
+
AddCommentsErrorMessage["FLAG_COMMENTS_NOT_ENTERED"] = "Please enter comments for this flag";
|
|
3406
|
+
AddCommentsErrorMessage["FLAG_COMMENTS_NOT_ENTERED_EXTERNAL"] = "Please enter comments for this support request";
|
|
3407
|
+
AddCommentsErrorMessage["FLAG_COMMENTS_CHAR_LIMIT_EXCEEDED"] = "Comments for this flag must be 200 characters or fewer";
|
|
3408
|
+
})(AddCommentsErrorMessage || (AddCommentsErrorMessage = {}));
|
|
3409
|
+
|
|
3410
|
+
var AddCommentsStep;
|
|
3411
|
+
(function (AddCommentsStep) {
|
|
3412
|
+
AddCommentsStep["HINT_TEXT"] = "Explain why you are creating this flag. Do not include any sensitive information such as personal details.";
|
|
3413
|
+
AddCommentsStep["HINT_TEXT_EXTERNAL"] = "Explain why you are creating this support request. Do not include any sensitive information such as personal details.";
|
|
3414
|
+
AddCommentsStep["CHARACTER_LIMIT_INFO"] = "You can enter up to 200 characters";
|
|
3415
|
+
AddCommentsStep["WARNING_TEXT"] = "The details entered here MAY be visible to the party in the future.";
|
|
3416
|
+
})(AddCommentsStep || (AddCommentsStep = {}));
|
|
3417
|
+
|
|
3418
|
+
var CaseFlagCheckYourAnswersPageStep;
|
|
3419
|
+
(function (CaseFlagCheckYourAnswersPageStep) {
|
|
3420
|
+
CaseFlagCheckYourAnswersPageStep["CASE_LEVEL_LOCATION"] = "Case level";
|
|
3421
|
+
CaseFlagCheckYourAnswersPageStep["ADD_FLAG_HEADER_TEXT"] = "Add flag to";
|
|
3422
|
+
CaseFlagCheckYourAnswersPageStep["ADD_FLAG_HEADER_TEXT_EXTERNAL"] = "Add support to";
|
|
3423
|
+
CaseFlagCheckYourAnswersPageStep["UPDATE_FLAG_HEADER_TEXT"] = "Update flag for";
|
|
3424
|
+
CaseFlagCheckYourAnswersPageStep["UPDATE_FLAG_HEADER_TEXT_EXTERNAL"] = "Update support for";
|
|
3425
|
+
CaseFlagCheckYourAnswersPageStep["FLAG_TYPE_HEADER_TEXT"] = "Flag type";
|
|
3426
|
+
CaseFlagCheckYourAnswersPageStep["FLAG_TYPE_HEADER_TEXT_EXTERNAL"] = "Support type";
|
|
3427
|
+
CaseFlagCheckYourAnswersPageStep["NONE"] = "";
|
|
3428
|
+
})(CaseFlagCheckYourAnswersPageStep || (CaseFlagCheckYourAnswersPageStep = {}));
|
|
3429
|
+
|
|
3430
|
+
/**
|
|
3431
|
+
* Create and update contexts for external users are, by definition, part of Case Flags 2.1 - thus there is no enum
|
|
3432
|
+
* value for these.
|
|
3433
|
+
*/
|
|
3434
|
+
var CaseFlagDisplayContextParameter;
|
|
3435
|
+
(function (CaseFlagDisplayContextParameter) {
|
|
3436
|
+
CaseFlagDisplayContextParameter["CREATE"] = "#ARGUMENT(CREATE)";
|
|
3437
|
+
CaseFlagDisplayContextParameter["CREATE_EXTERNAL"] = "#ARGUMENT(CREATE,EXTERNAL)";
|
|
3438
|
+
CaseFlagDisplayContextParameter["CREATE_2_POINT_1"] = "#ARGUMENT(CREATE,VERSION2.1)";
|
|
3439
|
+
CaseFlagDisplayContextParameter["READ_EXTERNAL"] = "#ARGUMENT(READ,EXTERNAL)";
|
|
3440
|
+
CaseFlagDisplayContextParameter["UPDATE"] = "#ARGUMENT(UPDATE)";
|
|
3441
|
+
CaseFlagDisplayContextParameter["UPDATE_EXTERNAL"] = "#ARGUMENT(UPDATE,EXTERNAL)";
|
|
3442
|
+
CaseFlagDisplayContextParameter["UPDATE_2_POINT_1"] = "#ARGUMENT(UPDATE,VERSION2.1)";
|
|
3443
|
+
})(CaseFlagDisplayContextParameter || (CaseFlagDisplayContextParameter = {}));
|
|
3444
|
+
|
|
3445
|
+
var CaseFlagFormFields;
|
|
3446
|
+
(function (CaseFlagFormFields) {
|
|
3447
|
+
CaseFlagFormFields["FLAG_TYPE"] = "flagType";
|
|
3448
|
+
CaseFlagFormFields["COMMENTS"] = "flagComment";
|
|
3449
|
+
CaseFlagFormFields["COMMENTS_WELSH"] = "flagComment_cy";
|
|
3450
|
+
CaseFlagFormFields["OTHER_FLAG_DESCRIPTION"] = "otherDescription";
|
|
3451
|
+
CaseFlagFormFields["OTHER_FLAG_DESCRIPTION_WELSH"] = "otherDescription_cy";
|
|
3452
|
+
CaseFlagFormFields["STATUS"] = "status";
|
|
3453
|
+
CaseFlagFormFields["STATUS_CHANGE_REASON"] = "flagStatusReasonChange";
|
|
3454
|
+
CaseFlagFormFields["IS_WELSH_TRANSLATION_NEEDED"] = "flagIsWelshTranslationNeeded";
|
|
3455
|
+
CaseFlagFormFields["IS_VISIBLE_INTERNALLY_ONLY"] = "flagIsVisibleInternallyOnly";
|
|
3456
|
+
})(CaseFlagFormFields || (CaseFlagFormFields = {}));
|
|
3457
|
+
|
|
3458
|
+
var CaseFlagStatus;
|
|
3459
|
+
(function (CaseFlagStatus) {
|
|
3460
|
+
CaseFlagStatus["REQUESTED"] = "Requested";
|
|
3461
|
+
CaseFlagStatus["ACTIVE"] = "Active";
|
|
3462
|
+
CaseFlagStatus["INACTIVE"] = "Inactive";
|
|
3463
|
+
CaseFlagStatus["NOT_APPROVED"] = "Not approved";
|
|
3464
|
+
})(CaseFlagStatus || (CaseFlagStatus = {}));
|
|
3465
|
+
|
|
3466
|
+
var CaseFlagSummaryListDisplayMode;
|
|
3467
|
+
(function (CaseFlagSummaryListDisplayMode) {
|
|
3468
|
+
CaseFlagSummaryListDisplayMode[CaseFlagSummaryListDisplayMode["CREATE"] = 0] = "CREATE";
|
|
3469
|
+
CaseFlagSummaryListDisplayMode[CaseFlagSummaryListDisplayMode["MANAGE"] = 1] = "MANAGE";
|
|
3470
|
+
})(CaseFlagSummaryListDisplayMode || (CaseFlagSummaryListDisplayMode = {}));
|
|
3471
|
+
|
|
3472
|
+
var CaseFlagWizardStepTitle;
|
|
3473
|
+
(function (CaseFlagWizardStepTitle) {
|
|
3474
|
+
CaseFlagWizardStepTitle["SELECT_FLAG_LOCATION"] = "Where should this flag be added?";
|
|
3475
|
+
CaseFlagWizardStepTitle["SELECT_FLAG_LOCATION_EXTERNAL"] = "Who is the support for?";
|
|
3476
|
+
CaseFlagWizardStepTitle["SELECT_CASE_FLAG"] = "Select flag type";
|
|
3477
|
+
CaseFlagWizardStepTitle["SELECT_CASE_FLAG_EXTERNAL"] = "Select support type";
|
|
3478
|
+
CaseFlagWizardStepTitle["OTHER_FLAG_TYPE_DESCRIPTION"] = "Enter a flag type";
|
|
3479
|
+
CaseFlagWizardStepTitle["OTHER_FLAG_TYPE_DESCRIPTION_EXTERNAL"] = "Enter a support type";
|
|
3480
|
+
CaseFlagWizardStepTitle["ADD_FLAG_COMMENTS"] = "Add comments for this flag";
|
|
3481
|
+
CaseFlagWizardStepTitle["ADD_FLAG_COMMENTS_EXTERNAL_MODE"] = "Tell us more about the request";
|
|
3482
|
+
CaseFlagWizardStepTitle["CONFIRM_FLAG_STATUS"] = "Confirm the status of the flag";
|
|
3483
|
+
CaseFlagWizardStepTitle["FLAG_STATUS"] = "Flag status";
|
|
3484
|
+
CaseFlagWizardStepTitle["MANAGE_CASE_FLAGS"] = "Manage case flags";
|
|
3485
|
+
CaseFlagWizardStepTitle["MANAGE_SUPPORT"] = "Which support is no longer needed?";
|
|
3486
|
+
CaseFlagWizardStepTitle["UPDATE_FLAG_TITLE"] = "Update flag";
|
|
3487
|
+
CaseFlagWizardStepTitle["UPDATE_FLAG_TITLE_EXTERNAL"] = "Tell us why the support is no longer needed";
|
|
3488
|
+
CaseFlagWizardStepTitle["UPDATE_FLAG_ADD_TRANSLATION"] = "Add translations to flag";
|
|
3489
|
+
CaseFlagWizardStepTitle["NONE"] = "";
|
|
3490
|
+
})(CaseFlagWizardStepTitle || (CaseFlagWizardStepTitle = {}));
|
|
3491
|
+
|
|
3492
|
+
var ConfirmStatusErrorMessage;
|
|
3493
|
+
(function (ConfirmStatusErrorMessage) {
|
|
3494
|
+
ConfirmStatusErrorMessage["STATUS_REASON_NOT_ENTERED"] = "Comments and/or the name of the person approving the decision should be entered";
|
|
3495
|
+
ConfirmStatusErrorMessage["STATUS_REASON_CHAR_LIMIT_EXCEEDED"] = "Comments must be 200 characters or fewer";
|
|
3496
|
+
})(ConfirmStatusErrorMessage || (ConfirmStatusErrorMessage = {}));
|
|
3497
|
+
|
|
3498
|
+
var ConfirmStatusStep;
|
|
3499
|
+
(function (ConfirmStatusStep) {
|
|
3500
|
+
ConfirmStatusStep["HINT_TEXT"] = "Describe reason for status; if choosing 'Not approved' provide name of person approving decision.";
|
|
3501
|
+
ConfirmStatusStep["CHARACTER_LIMIT_INFO"] = "You can enter up to 200 characters";
|
|
3502
|
+
})(ConfirmStatusStep || (ConfirmStatusStep = {}));
|
|
3503
|
+
|
|
3504
|
+
var SearchLanguageInterpreterErrorMessage;
|
|
3505
|
+
(function (SearchLanguageInterpreterErrorMessage) {
|
|
3506
|
+
SearchLanguageInterpreterErrorMessage["LANGUAGE_NOT_ENTERED"] = "Enter the language that will need to be interpreted";
|
|
3507
|
+
SearchLanguageInterpreterErrorMessage["LANGUAGE_CHAR_LIMIT_EXCEEDED"] = "You can enter up to 80 characters for the required language";
|
|
3508
|
+
SearchLanguageInterpreterErrorMessage["LANGUAGE_ENTERED_IN_BOTH_FIELDS"] = "The language can only be entered in one of the fields";
|
|
3509
|
+
})(SearchLanguageInterpreterErrorMessage || (SearchLanguageInterpreterErrorMessage = {}));
|
|
3510
|
+
|
|
3511
|
+
var SearchLanguageInterpreterStep;
|
|
3512
|
+
(function (SearchLanguageInterpreterStep) {
|
|
3513
|
+
SearchLanguageInterpreterStep["HINT_TEXT"] = "Enter the language that will need to be interpreted. If this language is not listed, you can enter it manually.";
|
|
3514
|
+
SearchLanguageInterpreterStep["SIGN_HINT_TEXT"] = "Enter the sign language that will need to be interpreted. If this language is not listed, you can enter it manually.";
|
|
3515
|
+
SearchLanguageInterpreterStep["CHECKBOX_LABEL"] = "Enter the language manually";
|
|
3516
|
+
SearchLanguageInterpreterStep["INPUT_LABEL"] = "Enter the language";
|
|
3517
|
+
})(SearchLanguageInterpreterStep || (SearchLanguageInterpreterStep = {}));
|
|
3518
|
+
|
|
3519
|
+
var SelectFlagErrorMessage;
|
|
3520
|
+
(function (SelectFlagErrorMessage) {
|
|
3521
|
+
SelectFlagErrorMessage["MANAGE_CASE_FLAGS_FLAG_NOT_SELECTED"] = "Please make a selection";
|
|
3522
|
+
SelectFlagErrorMessage["MANAGE_SUPPORT_FLAG_NOT_SELECTED"] = "Select which support is no longer needed";
|
|
3523
|
+
SelectFlagErrorMessage["NO_FLAGS"] = "This case has no flags";
|
|
3524
|
+
})(SelectFlagErrorMessage || (SelectFlagErrorMessage = {}));
|
|
3525
|
+
|
|
3526
|
+
var SelectFlagLocationErrorMessage;
|
|
3527
|
+
(function (SelectFlagLocationErrorMessage) {
|
|
3528
|
+
SelectFlagLocationErrorMessage["FLAG_LOCATION_NOT_SELECTED"] = "Please make a selection";
|
|
3529
|
+
SelectFlagLocationErrorMessage["FLAGS_NOT_CONFIGURED"] = "Flags have not been configured for this case type";
|
|
3530
|
+
})(SelectFlagLocationErrorMessage || (SelectFlagLocationErrorMessage = {}));
|
|
3531
|
+
|
|
3532
|
+
var SelectFlagTypeErrorMessage;
|
|
3533
|
+
(function (SelectFlagTypeErrorMessage) {
|
|
3534
|
+
SelectFlagTypeErrorMessage["FLAG_TYPE_NOT_SELECTED"] = "Please select a flag type";
|
|
3535
|
+
SelectFlagTypeErrorMessage["FLAG_TYPE_NOT_SELECTED_EXTERNAL"] = "Please select a support type";
|
|
3536
|
+
SelectFlagTypeErrorMessage["FLAG_TYPE_OPTION_NOT_SELECTED"] = "Select an option";
|
|
3537
|
+
SelectFlagTypeErrorMessage["FLAG_TYPE_NOT_ENTERED"] = "Please enter a flag type";
|
|
3538
|
+
SelectFlagTypeErrorMessage["FLAG_TYPE_NOT_ENTERED_EXTERNAL"] = "Please enter a support type";
|
|
3539
|
+
SelectFlagTypeErrorMessage["FLAG_TYPE_LIMIT_EXCEEDED"] = "You can enter up to 80 characters only";
|
|
3540
|
+
})(SelectFlagTypeErrorMessage || (SelectFlagTypeErrorMessage = {}));
|
|
3541
|
+
|
|
3542
|
+
var UpdateFlagAddTranslationErrorMessage;
|
|
3543
|
+
(function (UpdateFlagAddTranslationErrorMessage) {
|
|
3544
|
+
UpdateFlagAddTranslationErrorMessage["DESCRIPTION_CHAR_LIMIT_EXCEEDED"] = "Original description or translation must be 200 characters or fewer";
|
|
3545
|
+
UpdateFlagAddTranslationErrorMessage["COMMENTS_CHAR_LIMIT_EXCEEDED"] = "Original comments or translation must be 200 characters or fewer";
|
|
3546
|
+
})(UpdateFlagAddTranslationErrorMessage || (UpdateFlagAddTranslationErrorMessage = {}));
|
|
3547
|
+
|
|
3548
|
+
var UpdateFlagAddTranslationStep;
|
|
3549
|
+
(function (UpdateFlagAddTranslationStep) {
|
|
3550
|
+
UpdateFlagAddTranslationStep["HINT_TEXT"] = "Write translation for flag description or comments in the boxes provided.";
|
|
3551
|
+
UpdateFlagAddTranslationStep["CHARACTER_LIMIT_INFO"] = "You can enter up to 200 characters";
|
|
3552
|
+
})(UpdateFlagAddTranslationStep || (UpdateFlagAddTranslationStep = {}));
|
|
3553
|
+
|
|
3554
|
+
var UpdateFlagErrorMessage;
|
|
3555
|
+
(function (UpdateFlagErrorMessage) {
|
|
3556
|
+
UpdateFlagErrorMessage["FLAG_COMMENTS_NOT_ENTERED"] = "Please enter comments for this flag";
|
|
3557
|
+
UpdateFlagErrorMessage["FLAG_COMMENTS_CHAR_LIMIT_EXCEEDED"] = "Comments for this flag must be 200 characters or fewer";
|
|
3558
|
+
UpdateFlagErrorMessage["STATUS_REASON_NOT_ENTERED"] = "Comments and/or the name of the person approving the decision should be entered";
|
|
3559
|
+
UpdateFlagErrorMessage["STATUS_REASON_NOT_ENTERED_EXTERNAL"] = "You must explain why the support is no longer needed";
|
|
3560
|
+
UpdateFlagErrorMessage["STATUS_REASON_CHAR_LIMIT_EXCEEDED"] = "Comments must be 200 characters or fewer";
|
|
3561
|
+
UpdateFlagErrorMessage["NONE"] = "";
|
|
3562
|
+
})(UpdateFlagErrorMessage || (UpdateFlagErrorMessage = {}));
|
|
3563
|
+
|
|
3564
|
+
var UpdateFlagStep;
|
|
3565
|
+
(function (UpdateFlagStep) {
|
|
3566
|
+
UpdateFlagStep["COMMENT_HINT_TEXT_INTERNAL"] = "Explain why you are updating this flag. Do not include any sensitive information such as personal details.";
|
|
3567
|
+
UpdateFlagStep["COMMENT_HINT_TEXT_INTERNAL_2_POINT_1"] = "Update the comments describing the user's support needs or flag description. Do not include any sensitive information such as personal details.";
|
|
3568
|
+
UpdateFlagStep["COMMENT_HINT_TEXT_EXTERNAL"] = "Do not include any sensitive information such as personal details.";
|
|
3569
|
+
UpdateFlagStep["COMMENT_FIELD_LABEL_EXTERNAL"] = "Please provide your comments below";
|
|
3570
|
+
UpdateFlagStep["CHARACTER_LIMIT_INFO"] = "You can enter up to 200 characters";
|
|
3571
|
+
UpdateFlagStep["STATUS_HINT_TEXT"] = "Describe reason for status change.";
|
|
3572
|
+
UpdateFlagStep["WARNING_TEXT"] = "The details entered here MAY be visible to the party in the future.";
|
|
3573
|
+
})(UpdateFlagStep || (UpdateFlagStep = {}));
|
|
3574
|
+
|
|
3575
|
+
var CaseFlagFieldState;
|
|
3576
|
+
(function (CaseFlagFieldState) {
|
|
3577
|
+
CaseFlagFieldState[CaseFlagFieldState["FLAG_LOCATION"] = 0] = "FLAG_LOCATION";
|
|
3578
|
+
CaseFlagFieldState[CaseFlagFieldState["FLAG_TYPE"] = 1] = "FLAG_TYPE";
|
|
3579
|
+
CaseFlagFieldState[CaseFlagFieldState["FLAG_LANGUAGE_INTERPRETER"] = 2] = "FLAG_LANGUAGE_INTERPRETER";
|
|
3580
|
+
CaseFlagFieldState[CaseFlagFieldState["FLAG_COMMENTS"] = 3] = "FLAG_COMMENTS";
|
|
3581
|
+
CaseFlagFieldState[CaseFlagFieldState["FLAG_STATUS"] = 4] = "FLAG_STATUS";
|
|
3582
|
+
CaseFlagFieldState[CaseFlagFieldState["FLAG_MANAGE_CASE_FLAGS"] = 5] = "FLAG_MANAGE_CASE_FLAGS";
|
|
3583
|
+
CaseFlagFieldState[CaseFlagFieldState["FLAG_UPDATE"] = 6] = "FLAG_UPDATE";
|
|
3584
|
+
CaseFlagFieldState[CaseFlagFieldState["FLAG_UPDATE_WELSH_TRANSLATION"] = 7] = "FLAG_UPDATE_WELSH_TRANSLATION";
|
|
3585
|
+
})(CaseFlagFieldState || (CaseFlagFieldState = {}));
|
|
3586
|
+
var CaseFlagErrorMessage;
|
|
3587
|
+
(function (CaseFlagErrorMessage) {
|
|
3588
|
+
CaseFlagErrorMessage["NO_EXTERNAL_FLAGS_COLLECTION"] = "External collection for storing this case flag has not been configured for this case type";
|
|
3589
|
+
CaseFlagErrorMessage["NO_INTERNAL_FLAGS_COLLECTION"] = "Internal collection for storing this case flag has not been configured for this case type";
|
|
3590
|
+
})(CaseFlagErrorMessage || (CaseFlagErrorMessage = {}));
|
|
3591
|
+
|
|
3592
|
+
class DashPipe {
|
|
3593
|
+
transform(value) {
|
|
3594
|
+
return value ? value : '-';
|
|
3595
|
+
}
|
|
3596
|
+
static ɵfac = function DashPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || DashPipe)(); };
|
|
3597
|
+
static ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "ccdDash", type: DashPipe, pure: true, standalone: false });
|
|
3598
|
+
}
|
|
3599
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DashPipe, [{
|
|
3600
|
+
type: Pipe,
|
|
3601
|
+
args: [{
|
|
3602
|
+
name: 'ccdDash',
|
|
3603
|
+
standalone: false
|
|
3604
|
+
}]
|
|
3605
|
+
}], null, null); })();
|
|
3606
|
+
|
|
3607
|
+
/*
|
|
3608
|
+
Translate a date time format string from the Java format provided by CCD to the format supported by Angular formatDate()
|
|
3609
|
+
Very simple translator that maps unsupported chars to the nearest equivalent.
|
|
3610
|
+
If there is no equivalent puts ***x*** into the output where x is the unsupported character
|
|
3611
|
+
|
|
3612
|
+
Java format
|
|
3613
|
+
G era text AD; Anno Domini; A
|
|
3614
|
+
u year year 2004; 04
|
|
3615
|
+
y year-of-era year 2004; 04
|
|
3616
|
+
D day-of-year number 189
|
|
3617
|
+
M/L month-of-year number/text 7; 07; Jul; July; J
|
|
3618
|
+
d day-of-month number 10
|
|
3619
|
+
|
|
3620
|
+
Q/q quarter-of-year number/text 3; 03; Q3; 3rd quarter
|
|
3621
|
+
Y week-based-year year 1996; 96
|
|
3622
|
+
w week-of-week-based-year number 27
|
|
3623
|
+
W week-of-month number 4
|
|
3624
|
+
E day-of-week text Tue; Tuesday; T
|
|
3625
|
+
e/c localized day-of-week number/text 2; 02; Tue; Tuesday; T
|
|
3626
|
+
F week-of-month number 3
|
|
3627
|
+
|
|
3628
|
+
a am-pm-of-day text PM
|
|
3629
|
+
h clock-hour-of-am-pm (1-12) number 12
|
|
3630
|
+
K hour-of-am-pm (0-11) number 0
|
|
3631
|
+
k clock-hour-of-am-pm (1-24) number 0
|
|
3632
|
+
|
|
3633
|
+
H hour-of-day (0-23) number 0
|
|
3634
|
+
m minute-of-hour number 30
|
|
3635
|
+
s second-of-minute number 55
|
|
3636
|
+
S fraction-of-second fraction 978
|
|
3637
|
+
A milli-of-day number 1234
|
|
3638
|
+
n nano-of-second number 987654321
|
|
3639
|
+
N nano-of-day number 1234000000
|
|
3640
|
+
|
|
3641
|
+
V time-zone ID zone-id America/Los_Angeles; Z; -08:30
|
|
3642
|
+
z time-zone name zone-name Pacific Standard Time; PST
|
|
3643
|
+
O localized zone-offset offset-O GMT+8; GMT+08:00; UTC-08:00;
|
|
3644
|
+
X zone-offset 'Z' for zero offset-X Z; -08; -0830; -08:30; -083015; -08:30:15;
|
|
3645
|
+
x zone-offset offset-x +0000; -08; -0830; -08:30; -083015; -08:30:15;
|
|
3646
|
+
Z zone-offset offset-Z +0000; -0800; -08:00;
|
|
3647
|
+
|
|
3648
|
+
p pad next pad modifier 1
|
|
3649
|
+
|
|
3650
|
+
' escape for text delimiter
|
|
3651
|
+
'' single quote literal '
|
|
3652
|
+
[ optional section start
|
|
3653
|
+
] optional section end
|
|
3654
|
+
# reserved for future use
|
|
3655
|
+
{ reserved for future use
|
|
3656
|
+
} reserved for future use
|
|
3657
|
+
|
|
3658
|
+
Angular dateFormat characters
|
|
3659
|
+
Era G, GG & GGG Abbreviated AD
|
|
3660
|
+
GGGG Wide Anno Domini
|
|
3661
|
+
GGGGG Narrow A
|
|
3662
|
+
Year y Numeric: minimum digits 2, 20, 201, 2017, 20173
|
|
3663
|
+
yy Numeric: 2 digits + zero padded 02, 20, 01, 17, 73
|
|
3664
|
+
yyy Numeric: 3 digits + zero padded 002, 020, 201, 2017, 20173
|
|
3665
|
+
yyyy Numeric: 4 digits or more + zero padded 0002, 0020, 0201, 2017, 20173
|
|
3666
|
+
Month M Numeric: 1 digit 9, 12
|
|
3667
|
+
MM Numeric: 2 digits + zero padded 09, 12
|
|
3668
|
+
MMM Abbreviated Sep
|
|
3669
|
+
MMMM Wide September
|
|
3670
|
+
MMMMM Narrow S
|
|
3671
|
+
Month standalone L Numeric: 1 digit 9, 12
|
|
3672
|
+
LL Numeric: 2 digits + zero padded 09, 12
|
|
3673
|
+
LLL Abbreviated Sep
|
|
3674
|
+
LLLL Wide September
|
|
3675
|
+
LLLLL Narrow S
|
|
3676
|
+
Week of year w Numeric: minimum digits 1... 53
|
|
3677
|
+
ww Numeric: 2 digits + zero padded 01... 53
|
|
3678
|
+
Week of month W Numeric: 1 digit 1... 5
|
|
3679
|
+
Day of month d Numeric: minimum digits 1
|
|
3680
|
+
dd Numeric: 2 digits + zero padded 01
|
|
3681
|
+
Week day E, EE & EEE Abbreviated Tue
|
|
3682
|
+
EEEE Wide Tuesday
|
|
3683
|
+
EEEEE Narrow T
|
|
3684
|
+
EEEEEE Short Tu
|
|
3685
|
+
Period a, aa & aaa Abbreviated am/pm or AM/PM
|
|
3686
|
+
aaaa Wide (fallback to a when missing) ante meridiem/post meridiem
|
|
3687
|
+
aaaaa Narrow a/p
|
|
3688
|
+
Period* B, BB & BBB Abbreviated mid.
|
|
3689
|
+
BBBB Wide am, pm, midnight, noon, morning, afternoon, evening, night
|
|
3690
|
+
BBBBB Narrow md
|
|
3691
|
+
Period standalone* b, bb & bbb Abbreviated mid.
|
|
3692
|
+
bbbb Wide am, pm, midnight, noon, morning, afternoon, evening, night
|
|
3693
|
+
bbbbb Narrow md
|
|
3694
|
+
Hour 1-12 h Numeric: minimum digits 1, 12
|
|
3695
|
+
hh Numeric: 2 digits + zero padded 01, 12
|
|
3696
|
+
Hour 0-23 H Numeric: minimum digits 0, 23
|
|
3697
|
+
HH Numeric: 2 digits + zero padded 00, 23
|
|
3698
|
+
Minute m Numeric: minimum digits 8, 59
|
|
3699
|
+
mm Numeric: 2 digits + zero padded 08, 59
|
|
3700
|
+
Second s Numeric: minimum digits 0... 59
|
|
3701
|
+
ss Numeric: 2 digits + zero padded 00... 59
|
|
3702
|
+
Fractional seconds S Numeric: 1 digit 0... 9
|
|
3703
|
+
SS Numeric: 2 digits + zero padded 00... 99
|
|
3704
|
+
SSS Numeric: 3 digits + zero padded (= milliseconds) 000... 999
|
|
3705
|
+
Zone z, zz & zzz Short specific non location format (fallback to O) GMT-8
|
|
3706
|
+
zzzz Long specific non location format (fallback to OOOO) GMT-08:00
|
|
3707
|
+
Z, ZZ & ZZZ ISO8601 basic format -0800
|
|
3708
|
+
ZZZZ Long localized GMT format GMT-8:00
|
|
3709
|
+
ZZZZZ ISO8601 extended format + Z indicator for offset 0 (= XXXXX) -08:00
|
|
3710
|
+
O, OO & OOO Short localized GMT format GMT-8
|
|
3711
|
+
OOOO Long localized GMT format GMT-08:00
|
|
3712
|
+
*/
|
|
3713
|
+
class FormatTranslatorService {
|
|
3714
|
+
translate(javaFormat) {
|
|
3715
|
+
const result = [];
|
|
3716
|
+
let prev = '\0';
|
|
3717
|
+
let inQuote = false;
|
|
3718
|
+
const maybePush = (target, obj, flag) => {
|
|
3719
|
+
if (!flag) {
|
|
3720
|
+
target.push(obj);
|
|
3721
|
+
}
|
|
3722
|
+
};
|
|
3723
|
+
for (const c of javaFormat) {
|
|
3724
|
+
switch (c) {
|
|
3725
|
+
case '\'':
|
|
3726
|
+
if (prev === '\'') {
|
|
3727
|
+
// literal single quote - ignore
|
|
3728
|
+
inQuote = false;
|
|
3729
|
+
}
|
|
3730
|
+
else {
|
|
3731
|
+
inQuote = !inQuote;
|
|
3732
|
+
}
|
|
3733
|
+
break;
|
|
3734
|
+
// Due to formatting constraints on the webapp, all 'd' characters should be replaced with 'D' (for Moment library)
|
|
3735
|
+
// This is because we want the date, not the day (this format will need to be converted back)
|
|
3736
|
+
case 'd':
|
|
3737
|
+
maybePush(result, 'D', inQuote);
|
|
3738
|
+
break;
|
|
3739
|
+
// moment library defines year as capital y
|
|
3740
|
+
case 'y':
|
|
3741
|
+
maybePush(result, 'Y', inQuote);
|
|
3742
|
+
break;
|
|
3743
|
+
case 'e':
|
|
3744
|
+
case 'c':
|
|
3745
|
+
maybePush(result, 'E', inQuote); // no lower case E
|
|
3746
|
+
break;
|
|
3747
|
+
case 'F':
|
|
3748
|
+
maybePush(result, 'W', inQuote);
|
|
3749
|
+
break;
|
|
3750
|
+
case 'K':
|
|
3751
|
+
maybePush(result, 'H', inQuote);
|
|
3752
|
+
break;
|
|
3753
|
+
case 'k':
|
|
3754
|
+
maybePush(result, 'h', inQuote);
|
|
3755
|
+
break;
|
|
3756
|
+
// commented out A change to '***' due to use in moment library for AM/PM
|
|
3757
|
+
// added 'a' specification to stop discrepancy in am/AM pm/PM formatting
|
|
3758
|
+
case 'a':
|
|
3759
|
+
maybePush(result, 'A', inQuote);
|
|
3760
|
+
break;
|
|
3761
|
+
case 'n':
|
|
3762
|
+
case 'N':
|
|
3763
|
+
maybePush(result, `***${c}***`, inQuote); // No way to support A - millisec of day, n - nano of second, N - nano of Day
|
|
3764
|
+
break;
|
|
3765
|
+
case 'V':
|
|
3766
|
+
case 'O':
|
|
3767
|
+
maybePush(result, 'z', inQuote);
|
|
3768
|
+
break;
|
|
3769
|
+
case 'x':
|
|
3770
|
+
case 'X':
|
|
3771
|
+
maybePush(result, 'Z', inQuote);
|
|
3772
|
+
break;
|
|
3773
|
+
default:
|
|
3774
|
+
maybePush(result, c, inQuote);
|
|
3595
3775
|
}
|
|
3776
|
+
prev = c;
|
|
3596
3777
|
}
|
|
3597
|
-
|
|
3778
|
+
return result.join('');
|
|
3598
3779
|
}
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
return this.field_type.fixed_list_items;
|
|
3780
|
+
showOnlyDates(dateFormat) {
|
|
3781
|
+
// replace 'd' character with 'D' for the moment library
|
|
3782
|
+
// This ensures only dates allowed
|
|
3783
|
+
while (dateFormat.includes('d')) {
|
|
3784
|
+
dateFormat = dateFormat.replace('d', 'D');
|
|
3605
3785
|
}
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
if ((items && !this._list_items) || (items?.length > this._list_items?.length)) {
|
|
3609
|
-
this._list_items = items;
|
|
3786
|
+
while (dateFormat.includes('y')) {
|
|
3787
|
+
dateFormat = dateFormat.replace('y', 'Y');
|
|
3610
3788
|
}
|
|
3789
|
+
return dateFormat;
|
|
3611
3790
|
}
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3791
|
+
removeTime(dateFormat) {
|
|
3792
|
+
// remove hours irrelevant of whether 12 or 24 hour clock
|
|
3793
|
+
while (dateFormat.includes('H') || dateFormat.includes('h')) {
|
|
3794
|
+
dateFormat = dateFormat.replace('H', '');
|
|
3795
|
+
dateFormat = dateFormat.replace('h', '');
|
|
3615
3796
|
}
|
|
3616
|
-
|
|
3617
|
-
|
|
3797
|
+
// remove minutes
|
|
3798
|
+
while (dateFormat.includes('m')) {
|
|
3799
|
+
dateFormat = dateFormat.replace('m', '');
|
|
3618
3800
|
}
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
return null;
|
|
3801
|
+
// remove seconds (s) and micro seconds (S)
|
|
3802
|
+
while (dateFormat.includes('S') || dateFormat.includes('s')) {
|
|
3803
|
+
dateFormat = dateFormat.replace('S', '');
|
|
3804
|
+
dateFormat = dateFormat.replace('s', '');
|
|
3624
3805
|
}
|
|
3625
|
-
|
|
3626
|
-
|
|
3806
|
+
// because there is time removal algorithm can make reasonable assumption to remove colons
|
|
3807
|
+
while (dateFormat.includes(':')) {
|
|
3808
|
+
dateFormat = dateFormat.replace(':', '');
|
|
3627
3809
|
}
|
|
3628
|
-
return
|
|
3629
|
-
}
|
|
3630
|
-
isComplexDisplay() {
|
|
3631
|
-
return (this.isComplex() || this.isCollection()) && this.isReadonly();
|
|
3810
|
+
return dateFormat.trim();
|
|
3632
3811
|
}
|
|
3633
|
-
|
|
3634
|
-
return
|
|
3812
|
+
hasDate(value) {
|
|
3813
|
+
return this.translate(value).length &&
|
|
3814
|
+
value.toLowerCase().indexOf('d') >= 0 &&
|
|
3815
|
+
value.indexOf('M') >= 0 && value.toLowerCase().indexOf('y') >= 0;
|
|
3635
3816
|
}
|
|
3636
|
-
|
|
3637
|
-
return
|
|
3638
|
-
|
|
3817
|
+
is24Hour(value) {
|
|
3818
|
+
return this.translate(value).length &&
|
|
3819
|
+
value.indexOf('H') >= 0;
|
|
3639
3820
|
}
|
|
3640
|
-
|
|
3641
|
-
return
|
|
3642
|
-
&&
|
|
3821
|
+
hasNoDay(value) {
|
|
3822
|
+
return this.translate(value).length && value.toLowerCase().indexOf('d') === -1 &&
|
|
3823
|
+
value.indexOf('M') >= 0 && value.toLowerCase().indexOf('y') >= 0;
|
|
3643
3824
|
}
|
|
3644
|
-
|
|
3645
|
-
return
|
|
3646
|
-
|
|
3825
|
+
hasNoDayAndMonth(value) {
|
|
3826
|
+
return this.translate(value).length &&
|
|
3827
|
+
value.toLowerCase().indexOf('d') === -1 &&
|
|
3828
|
+
value.indexOf('M') === -1 &&
|
|
3829
|
+
value.toLowerCase().indexOf('y') >= 0;
|
|
3647
3830
|
}
|
|
3648
|
-
|
|
3649
|
-
return this.
|
|
3831
|
+
hasHours(value) {
|
|
3832
|
+
return this.translate(value).length && value.toLowerCase().indexOf('h') >= 0 && value.indexOf('m') === -1;
|
|
3650
3833
|
}
|
|
3651
|
-
|
|
3652
|
-
return this.
|
|
3834
|
+
hasMinutes(value) {
|
|
3835
|
+
return this.translate(value).length && value.indexOf('m') >= 0 && value.toLowerCase().indexOf('h') >= 0;
|
|
3653
3836
|
}
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
if (!this.field_type) {
|
|
3657
|
-
return false;
|
|
3658
|
-
}
|
|
3659
|
-
return dynamicFieldTypes.some(t => t === this.field_type.type);
|
|
3837
|
+
hasSeconds(value) {
|
|
3838
|
+
return this.translate(value).length && value.toLowerCase().indexOf('s') >= 0;
|
|
3660
3839
|
}
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3840
|
+
static ɵfac = function FormatTranslatorService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || FormatTranslatorService)(); };
|
|
3841
|
+
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: FormatTranslatorService, factory: FormatTranslatorService.ɵfac });
|
|
3842
|
+
}
|
|
3843
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FormatTranslatorService, [{
|
|
3844
|
+
type: Injectable
|
|
3845
|
+
}], null, null); })();
|
|
3846
|
+
|
|
3847
|
+
class DatePipe {
|
|
3848
|
+
formatTrans;
|
|
3849
|
+
static DATE_FORMAT_REGEXP = new RegExp('^(\\d{4})-?(\\d\\d)-?(\\d\\d)(?:T(\\d\\d)(?::?(\\d\\d)(?::?(\\d\\d)(?:\\.(\\d+))?)?)?(Z|([+-])(\\d\\d):?(\\d\\d))?|Z)?$');
|
|
3850
|
+
// 1 2 3 4 5 6 7 8 9 10 11
|
|
3851
|
+
static MONTHS = [
|
|
3852
|
+
['Jan'], ['Feb'], ['Mar'], ['Apr'], ['May'], ['Jun'], ['Jul'], ['Aug'], ['Sep'], ['Oct'], ['Nov'], ['Dec'],
|
|
3853
|
+
];
|
|
3854
|
+
/**
|
|
3855
|
+
* constructor to allow format translator to be injected
|
|
3856
|
+
* @param formatTrans format translator
|
|
3857
|
+
*/
|
|
3858
|
+
constructor(formatTrans) {
|
|
3859
|
+
this.formatTrans = formatTrans;
|
|
3665
3860
|
}
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
if (
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
if (
|
|
3673
|
-
|
|
3861
|
+
transform(value, zone, format) {
|
|
3862
|
+
let resultDate = null;
|
|
3863
|
+
const ISO_FORMAT = 'YYYY-MM-DDTHH:mm:ss.SSSZ';
|
|
3864
|
+
if (value) {
|
|
3865
|
+
// included to avoid editing the hour twice on second pass through
|
|
3866
|
+
// this occurs on case details when datepipe is applied twice
|
|
3867
|
+
if (!value.includes('T')) {
|
|
3868
|
+
zone = 'utc';
|
|
3674
3869
|
}
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3870
|
+
const match = value.match(DatePipe.DATE_FORMAT_REGEXP);
|
|
3871
|
+
// Make sure we actually have a match.
|
|
3872
|
+
if (match) {
|
|
3873
|
+
let offsetDate = null;
|
|
3874
|
+
const date = this.getDate(match);
|
|
3875
|
+
if (zone === 'local') {
|
|
3876
|
+
offsetDate = this.getOffsetDate(date);
|
|
3877
|
+
}
|
|
3878
|
+
else {
|
|
3879
|
+
offsetDate = this.getDate(match);
|
|
3880
|
+
}
|
|
3881
|
+
// 'short' format is meaningful to formatDate, but not the same meaning as in the unit tests
|
|
3882
|
+
if (this.formatTrans && format && format !== 'short') {
|
|
3883
|
+
// support for java style formatting strings for dates
|
|
3884
|
+
format = this.translateDateFormat(format);
|
|
3885
|
+
resultDate = moment(offsetDate).format(format);
|
|
3886
|
+
}
|
|
3887
|
+
else {
|
|
3888
|
+
// RDM-1149 changed the pipe logic so that it doesn't add an hour to 'Summer Time' dates on DateTime field type
|
|
3889
|
+
resultDate = `${offsetDate.getDate()} ${DatePipe.MONTHS[offsetDate.getMonth()]} ${offsetDate.getFullYear()}`;
|
|
3890
|
+
if (match[4] && match[5] && match[6] && format !== 'short') {
|
|
3891
|
+
resultDate += ', ';
|
|
3892
|
+
resultDate += `${this.getHour(offsetDate.getHours().toString())}:`;
|
|
3893
|
+
resultDate += `${this.pad(offsetDate.getMinutes())}:`;
|
|
3894
|
+
resultDate += `${this.pad(offsetDate.getSeconds())} `;
|
|
3895
|
+
resultDate += (this.toInt(offsetDate.getHours().toString()) >= 12) ? 'PM' : 'AM';
|
|
3896
|
+
}
|
|
3897
|
+
}
|
|
3684
3898
|
}
|
|
3685
3899
|
else {
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
__metadata("design:type", Function),
|
|
3754
|
-
__metadata("design:paramtypes", []),
|
|
3755
|
-
__metadata("design:returntype", void 0)
|
|
3756
|
-
], CaseField.prototype, "isOptional", null);
|
|
3757
|
-
__decorate([
|
|
3758
|
-
Expose(),
|
|
3759
|
-
__metadata("design:type", Function),
|
|
3760
|
-
__metadata("design:paramtypes", []),
|
|
3761
|
-
__metadata("design:returntype", void 0)
|
|
3762
|
-
], CaseField.prototype, "isMandatory", null);
|
|
3763
|
-
__decorate([
|
|
3764
|
-
Expose(),
|
|
3765
|
-
__metadata("design:type", Function),
|
|
3766
|
-
__metadata("design:paramtypes", []),
|
|
3767
|
-
__metadata("design:returntype", Boolean)
|
|
3768
|
-
], CaseField.prototype, "isCollection", null);
|
|
3769
|
-
__decorate([
|
|
3770
|
-
Expose(),
|
|
3771
|
-
__metadata("design:type", Function),
|
|
3772
|
-
__metadata("design:paramtypes", []),
|
|
3773
|
-
__metadata("design:returntype", Boolean)
|
|
3774
|
-
], CaseField.prototype, "isComplex", null);
|
|
3775
|
-
__decorate([
|
|
3776
|
-
Expose(),
|
|
3777
|
-
__metadata("design:type", Function),
|
|
3778
|
-
__metadata("design:paramtypes", []),
|
|
3779
|
-
__metadata("design:returntype", Boolean)
|
|
3780
|
-
], CaseField.prototype, "isDynamic", null);
|
|
3781
|
-
__decorate([
|
|
3782
|
-
Expose(),
|
|
3783
|
-
__metadata("design:type", Function),
|
|
3784
|
-
__metadata("design:paramtypes", []),
|
|
3785
|
-
__metadata("design:returntype", Boolean)
|
|
3786
|
-
], CaseField.prototype, "isCaseLink", null);
|
|
3787
|
-
__decorate([
|
|
3788
|
-
Expose(),
|
|
3789
|
-
__metadata("design:type", Function),
|
|
3790
|
-
__metadata("design:paramtypes", [String]),
|
|
3791
|
-
__metadata("design:returntype", String)
|
|
3792
|
-
], CaseField.prototype, "getHierachicalId", null);
|
|
3793
|
-
|
|
3794
|
-
// @dynamic
|
|
3795
|
-
class WizardPage {
|
|
3796
|
-
id;
|
|
3797
|
-
label;
|
|
3798
|
-
order;
|
|
3799
|
-
wizard_page_fields;
|
|
3800
|
-
case_fields;
|
|
3801
|
-
show_condition;
|
|
3802
|
-
parsedShowCondition;
|
|
3803
|
-
getCol1Fields() {
|
|
3804
|
-
return this.case_fields?.filter(f => !f.wizardProps.page_column_no || f.wizardProps.page_column_no === 1);
|
|
3805
|
-
}
|
|
3806
|
-
getCol2Fields() {
|
|
3807
|
-
return this.case_fields?.filter(f => f.wizardProps.page_column_no === 2);
|
|
3808
|
-
}
|
|
3809
|
-
isMultiColumn() {
|
|
3810
|
-
return this.getCol2Fields()?.length > 0;
|
|
3811
|
-
}
|
|
3812
|
-
}
|
|
3813
|
-
__decorate([
|
|
3814
|
-
Type(() => WizardPageField),
|
|
3815
|
-
__metadata("design:type", Array)
|
|
3816
|
-
], WizardPage.prototype, "wizard_page_fields", void 0);
|
|
3817
|
-
__decorate([
|
|
3818
|
-
Type(() => CaseField),
|
|
3819
|
-
__metadata("design:type", Array)
|
|
3820
|
-
], WizardPage.prototype, "case_fields", void 0);
|
|
3821
|
-
|
|
3822
|
-
// @dynamic
|
|
3823
|
-
class CaseEventTrigger {
|
|
3824
|
-
id;
|
|
3825
|
-
name;
|
|
3826
|
-
description;
|
|
3827
|
-
case_id;
|
|
3828
|
-
case_fields;
|
|
3829
|
-
event_token;
|
|
3830
|
-
wizard_pages;
|
|
3831
|
-
show_summary;
|
|
3832
|
-
show_event_notes;
|
|
3833
|
-
end_button_label;
|
|
3834
|
-
can_save_draft;
|
|
3835
|
-
hasFields() {
|
|
3836
|
-
return this.case_fields && this.case_fields.length !== 0;
|
|
3837
|
-
}
|
|
3838
|
-
hasPages() {
|
|
3839
|
-
return this.wizard_pages && this.wizard_pages.length !== 0;
|
|
3840
|
-
}
|
|
3841
|
-
}
|
|
3842
|
-
__decorate([
|
|
3843
|
-
Type(() => CaseField),
|
|
3844
|
-
__metadata("design:type", Array)
|
|
3845
|
-
], CaseEventTrigger.prototype, "case_fields", void 0);
|
|
3846
|
-
__decorate([
|
|
3847
|
-
Type(() => WizardPage),
|
|
3848
|
-
__metadata("design:type", Array)
|
|
3849
|
-
], CaseEventTrigger.prototype, "wizard_pages", void 0);
|
|
3850
|
-
|
|
3851
|
-
// tslint:disable:variable-name
|
|
3852
|
-
class CaseViewEvent {
|
|
3853
|
-
id;
|
|
3854
|
-
timestamp;
|
|
3855
|
-
summary;
|
|
3856
|
-
comment;
|
|
3857
|
-
event_id;
|
|
3858
|
-
event_name;
|
|
3859
|
-
state_id;
|
|
3860
|
-
state_name;
|
|
3861
|
-
user_id;
|
|
3862
|
-
user_last_name;
|
|
3863
|
-
user_first_name;
|
|
3864
|
-
significant_item;
|
|
3865
|
-
}
|
|
3866
|
-
|
|
3867
|
-
class CaseViewTrigger {
|
|
3868
|
-
id;
|
|
3869
|
-
name;
|
|
3870
|
-
description;
|
|
3871
|
-
order;
|
|
3872
|
-
}
|
|
3873
|
-
|
|
3874
|
-
class CaseEvent {
|
|
3875
|
-
id;
|
|
3876
|
-
name;
|
|
3877
|
-
post_state;
|
|
3878
|
-
pre_states;
|
|
3879
|
-
case_fields;
|
|
3880
|
-
description;
|
|
3881
|
-
order;
|
|
3882
|
-
acls;
|
|
3883
|
-
}
|
|
3884
|
-
|
|
3885
|
-
class CaseState {
|
|
3886
|
-
id;
|
|
3887
|
-
name;
|
|
3888
|
-
description;
|
|
3889
|
-
order;
|
|
3890
|
-
}
|
|
3891
|
-
|
|
3892
|
-
// Light clone of CaseType to be used in Jurisdiction class
|
|
3893
|
-
// to avoid cyclic dependency
|
|
3894
|
-
class CaseTypeLite {
|
|
3895
|
-
id;
|
|
3896
|
-
name;
|
|
3897
|
-
events;
|
|
3898
|
-
states;
|
|
3899
|
-
description;
|
|
3900
|
-
}
|
|
3901
|
-
|
|
3902
|
-
// @dynamics
|
|
3903
|
-
class CaseType {
|
|
3904
|
-
id;
|
|
3905
|
-
name;
|
|
3906
|
-
events;
|
|
3907
|
-
states;
|
|
3908
|
-
case_fields;
|
|
3909
|
-
description;
|
|
3910
|
-
jurisdiction;
|
|
3911
|
-
printEnabled;
|
|
3912
|
-
}
|
|
3913
|
-
__decorate([
|
|
3914
|
-
Type(() => CaseField),
|
|
3915
|
-
__metadata("design:type", Array)
|
|
3916
|
-
], CaseType.prototype, "case_fields", void 0);
|
|
3917
|
-
|
|
3918
|
-
// tslint:disable:variable-name
|
|
3919
|
-
class EventCaseField {
|
|
3920
|
-
case_field_id;
|
|
3921
|
-
showCondition;
|
|
3922
|
-
}
|
|
3923
|
-
|
|
3924
|
-
class Jurisdiction {
|
|
3925
|
-
id;
|
|
3926
|
-
name;
|
|
3927
|
-
description;
|
|
3928
|
-
caseTypes;
|
|
3929
|
-
currentCaseType;
|
|
3930
|
-
}
|
|
3931
|
-
|
|
3932
|
-
class Banner {
|
|
3933
|
-
bannerDescription;
|
|
3934
|
-
bannerUrlText;
|
|
3935
|
-
bannerUrl;
|
|
3936
|
-
bannerViewed;
|
|
3937
|
-
bannerEnabled;
|
|
3938
|
-
}
|
|
3939
|
-
|
|
3940
|
-
// @dynamic
|
|
3941
|
-
class CaseTab {
|
|
3942
|
-
id;
|
|
3943
|
-
label;
|
|
3944
|
-
order;
|
|
3945
|
-
fields;
|
|
3946
|
-
show_condition;
|
|
3947
|
-
}
|
|
3948
|
-
__decorate([
|
|
3949
|
-
Type(() => CaseField),
|
|
3950
|
-
__metadata("design:type", Array)
|
|
3951
|
-
], CaseTab.prototype, "fields", void 0);
|
|
3952
|
-
|
|
3953
|
-
// @dynamic
|
|
3954
|
-
class CaseView {
|
|
3955
|
-
case_id;
|
|
3956
|
-
case_type;
|
|
3957
|
-
state;
|
|
3958
|
-
channels;
|
|
3959
|
-
tabs;
|
|
3960
|
-
triggers;
|
|
3961
|
-
events;
|
|
3962
|
-
metadataFields;
|
|
3963
|
-
basicFields;
|
|
3964
|
-
case_flag;
|
|
3965
|
-
}
|
|
3966
|
-
__decorate([
|
|
3967
|
-
Type(() => CaseTab),
|
|
3968
|
-
__metadata("design:type", Array)
|
|
3969
|
-
], CaseView.prototype, "tabs", void 0);
|
|
3970
|
-
__decorate([
|
|
3971
|
-
Type(() => CaseField),
|
|
3972
|
-
__metadata("design:type", Array)
|
|
3973
|
-
], CaseView.prototype, "metadataFields", void 0);
|
|
3974
|
-
|
|
3975
|
-
class CasePrintDocument {
|
|
3976
|
-
name;
|
|
3977
|
-
type;
|
|
3978
|
-
url;
|
|
3900
|
+
// EUI-2667. See if what we've been given is actually a formatted date that
|
|
3901
|
+
// we could attempt to do something with.
|
|
3902
|
+
const parsedDate = Date.parse(value);
|
|
3903
|
+
// We successfully parsed it so let's use it.
|
|
3904
|
+
if (!isNaN(parsedDate)) {
|
|
3905
|
+
const d = new Date(parsedDate);
|
|
3906
|
+
// If what we received didn't include time, don't include it here either.
|
|
3907
|
+
if (value.indexOf(':') < 0) {
|
|
3908
|
+
const shortDate = d.toLocaleDateString('en-GB');
|
|
3909
|
+
const shortISO = shortDate.split('/').reverse().join('-');
|
|
3910
|
+
return this.transform(shortISO, zone, format);
|
|
3911
|
+
}
|
|
3912
|
+
// If it did include time, we want a full ISO string.
|
|
3913
|
+
const thisMoment = moment(d).format(ISO_FORMAT);
|
|
3914
|
+
return this.transform(thisMoment, zone, format);
|
|
3915
|
+
}
|
|
3916
|
+
}
|
|
3917
|
+
}
|
|
3918
|
+
return resultDate;
|
|
3919
|
+
}
|
|
3920
|
+
translateDateFormat(format) {
|
|
3921
|
+
if (this.formatTrans) {
|
|
3922
|
+
return this.formatTrans.translate(format);
|
|
3923
|
+
}
|
|
3924
|
+
else {
|
|
3925
|
+
return format;
|
|
3926
|
+
}
|
|
3927
|
+
}
|
|
3928
|
+
getOffsetDate(date) {
|
|
3929
|
+
const localOffset = -date.getTimezoneOffset() / 60;
|
|
3930
|
+
return new Date(date.getTime() + localOffset * 3600 * 1000);
|
|
3931
|
+
}
|
|
3932
|
+
getDate(match) {
|
|
3933
|
+
const year = this.toInt(match[1]);
|
|
3934
|
+
const month = this.toInt(match[2]) - 1;
|
|
3935
|
+
const day = this.toInt(match[3]);
|
|
3936
|
+
let resultDate;
|
|
3937
|
+
if (match[4] && match[5] && match[6]) {
|
|
3938
|
+
const hour = this.toInt(match[4]);
|
|
3939
|
+
const minutes = this.toInt(match[5]);
|
|
3940
|
+
const seconds = this.toInt(match[6]);
|
|
3941
|
+
resultDate = new Date(year, month, day, hour, minutes, seconds, 0);
|
|
3942
|
+
}
|
|
3943
|
+
else {
|
|
3944
|
+
resultDate = new Date(year, month, day);
|
|
3945
|
+
}
|
|
3946
|
+
return resultDate;
|
|
3947
|
+
}
|
|
3948
|
+
getHour(hourStr) {
|
|
3949
|
+
let hourNum = this.toInt(hourStr);
|
|
3950
|
+
if (hourNum > 12) {
|
|
3951
|
+
hourNum = hourNum - 12;
|
|
3952
|
+
}
|
|
3953
|
+
else if (hourNum === 0) {
|
|
3954
|
+
hourNum = 12;
|
|
3955
|
+
}
|
|
3956
|
+
return hourNum;
|
|
3957
|
+
}
|
|
3958
|
+
toInt(str) {
|
|
3959
|
+
return parseInt(str, 10);
|
|
3960
|
+
}
|
|
3961
|
+
pad(num, padNum = 2) {
|
|
3962
|
+
const val = num !== undefined ? num.toString() : '';
|
|
3963
|
+
return val.length >= padNum ? val : new Array(padNum - val.length + 1).join('0') + val;
|
|
3964
|
+
}
|
|
3965
|
+
static ɵfac = function DatePipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || DatePipe)(i0.ɵɵdirectiveInject(FormatTranslatorService, 16)); };
|
|
3966
|
+
static ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "ccdDate", type: DatePipe, pure: true, standalone: false });
|
|
3979
3967
|
}
|
|
3968
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DatePipe, [{
|
|
3969
|
+
type: Pipe,
|
|
3970
|
+
args: [{
|
|
3971
|
+
name: 'ccdDate',
|
|
3972
|
+
standalone: false
|
|
3973
|
+
}]
|
|
3974
|
+
}], () => [{ type: FormatTranslatorService }], null); })();
|
|
3980
3975
|
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
3976
|
+
class FieldLabelPipe {
|
|
3977
|
+
rpxTranslationPipe;
|
|
3978
|
+
constructor(rpxTranslationPipe) {
|
|
3979
|
+
this.rpxTranslationPipe = rpxTranslationPipe;
|
|
3980
|
+
}
|
|
3981
|
+
transform(field) {
|
|
3982
|
+
if (!field || !field.label) {
|
|
3983
|
+
return '';
|
|
3984
|
+
}
|
|
3985
|
+
else if (!field.display_context) {
|
|
3986
|
+
return this.getTranslatedLabel(field);
|
|
3987
|
+
}
|
|
3988
|
+
return this.getTranslatedLabel(field) + (field.display_context.toUpperCase() === 'OPTIONAL' ?
|
|
3989
|
+
' (' + this.rpxTranslationPipe.transform('Optional') + ')' : '');
|
|
3990
|
+
}
|
|
3991
|
+
getTranslatedLabel(field) {
|
|
3992
|
+
if (!field.isTranslated) {
|
|
3993
|
+
return this.rpxTranslationPipe.transform(field.label);
|
|
3994
|
+
}
|
|
3995
|
+
else {
|
|
3996
|
+
return field.label;
|
|
3997
|
+
}
|
|
3998
|
+
}
|
|
3999
|
+
getOriginalLabelForYesNoTranslation(field) {
|
|
4000
|
+
return field.originalLabel || field.label;
|
|
4001
|
+
}
|
|
4002
|
+
static ɵfac = function FieldLabelPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || FieldLabelPipe)(i0.ɵɵdirectiveInject(i1.RpxTranslatePipe, 16)); };
|
|
4003
|
+
static ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "ccdFieldLabel", type: FieldLabelPipe, pure: false, standalone: false });
|
|
4007
4004
|
}
|
|
4005
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FieldLabelPipe, [{
|
|
4006
|
+
type: Pipe,
|
|
4007
|
+
args: [{
|
|
4008
|
+
name: 'ccdFieldLabel',
|
|
4009
|
+
pure: false,
|
|
4010
|
+
standalone: false
|
|
4011
|
+
}]
|
|
4012
|
+
}], () => [{ type: i1.RpxTranslatePipe }], null); })();
|
|
4008
4013
|
|
|
4009
|
-
class
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
+
class FirstErrorPipe {
|
|
4015
|
+
rpxTranslationService;
|
|
4016
|
+
injector;
|
|
4017
|
+
asyncPipe;
|
|
4018
|
+
constructor(rpxTranslationService, injector) {
|
|
4019
|
+
this.rpxTranslationService = rpxTranslationService;
|
|
4020
|
+
this.injector = injector;
|
|
4021
|
+
this.asyncPipe = new AsyncPipe(this.injector.get(ChangeDetectorRef));
|
|
4022
|
+
}
|
|
4023
|
+
transform(value, args) {
|
|
4024
|
+
if (!value) {
|
|
4025
|
+
return '';
|
|
4014
4026
|
}
|
|
4015
|
-
if (
|
|
4016
|
-
|
|
4027
|
+
if (!args) {
|
|
4028
|
+
args = 'Field';
|
|
4017
4029
|
}
|
|
4018
|
-
|
|
4019
|
-
|
|
4030
|
+
const keys = Object.keys(value);
|
|
4031
|
+
if (!keys.length) {
|
|
4032
|
+
return '';
|
|
4020
4033
|
}
|
|
4021
|
-
|
|
4022
|
-
|
|
4034
|
+
let errorMessage;
|
|
4035
|
+
if (keys[0] === 'required') {
|
|
4036
|
+
errorMessage = '%FIELDLABEL% is required';
|
|
4023
4037
|
}
|
|
4024
|
-
if (
|
|
4025
|
-
|
|
4038
|
+
else if (keys[0] === 'pattern') {
|
|
4039
|
+
errorMessage = 'The data entered is not valid for %FIELDLABEL%';
|
|
4026
4040
|
}
|
|
4027
|
-
if (
|
|
4028
|
-
|
|
4041
|
+
else if (keys[0] === 'markDownPattern') {
|
|
4042
|
+
errorMessage = 'The data entered is not valid for %FIELDLABEL%. Link mark up characters are not allowed in this field';
|
|
4029
4043
|
}
|
|
4030
|
-
if (
|
|
4031
|
-
|
|
4044
|
+
else if (keys[0] === 'minlength') {
|
|
4045
|
+
errorMessage = '%FIELDLABEL% is below the minimum length';
|
|
4032
4046
|
}
|
|
4033
|
-
|
|
4047
|
+
else if (keys[0] === 'maxlength') {
|
|
4048
|
+
errorMessage = '%FIELDLABEL% exceeds the maximum length';
|
|
4049
|
+
}
|
|
4050
|
+
else if (value.hasOwnProperty('matDatetimePickerParse')) {
|
|
4051
|
+
errorMessage = 'The date entered is not valid. Please provide a valid date';
|
|
4052
|
+
}
|
|
4053
|
+
else {
|
|
4054
|
+
errorMessage = value[keys[0]];
|
|
4055
|
+
}
|
|
4056
|
+
const o = this.rpxTranslationService.getTranslation$(args).pipe(switchMap(fieldLabel => this.rpxTranslationService.getTranslationWithReplacements$(errorMessage, { FIELDLABEL: fieldLabel })));
|
|
4057
|
+
return this.asyncPipe.transform(o);
|
|
4034
4058
|
}
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
organisationIdentifier: organisationModel.organisationIdentifier,
|
|
4038
|
-
name: organisationModel.name,
|
|
4039
|
-
address: OrganisationConverter.toSimpleAddress(organisationModel)
|
|
4040
|
-
};
|
|
4059
|
+
ngOnDestroy() {
|
|
4060
|
+
this.asyncPipe.ngOnDestroy();
|
|
4041
4061
|
}
|
|
4042
|
-
static ɵfac = function
|
|
4043
|
-
static
|
|
4062
|
+
static ɵfac = function FirstErrorPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || FirstErrorPipe)(i0.ɵɵdirectiveInject(i1.RpxTranslationService, 16), i0.ɵɵdirectiveInject(i0.Injector, 16)); };
|
|
4063
|
+
static ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "ccdFirstError", type: FirstErrorPipe, pure: false, standalone: false });
|
|
4044
4064
|
}
|
|
4045
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(
|
|
4046
|
-
type:
|
|
4047
|
-
|
|
4065
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FirstErrorPipe, [{
|
|
4066
|
+
type: Pipe,
|
|
4067
|
+
args: [{
|
|
4068
|
+
name: 'ccdFirstError',
|
|
4069
|
+
pure: false,
|
|
4070
|
+
standalone: false
|
|
4071
|
+
}]
|
|
4072
|
+
}], () => [{ type: i1.RpxTranslationService }, { type: i0.Injector }], null); })();
|
|
4048
4073
|
|
|
4049
|
-
class
|
|
4050
|
-
|
|
4051
|
-
|
|
4074
|
+
class IsCompoundPipe {
|
|
4075
|
+
static COMPOUND_TYPES = [
|
|
4076
|
+
'Complex',
|
|
4077
|
+
'Label',
|
|
4078
|
+
'AddressGlobal',
|
|
4079
|
+
'AddressUK',
|
|
4080
|
+
'AddressGlobalUK',
|
|
4081
|
+
'CasePaymentHistoryViewer',
|
|
4082
|
+
'CaseHistoryViewer',
|
|
4083
|
+
'Organisation',
|
|
4084
|
+
'WaysToPay',
|
|
4085
|
+
'ComponentLauncher',
|
|
4086
|
+
'FlagLauncher',
|
|
4087
|
+
'CaseFlag'
|
|
4088
|
+
];
|
|
4089
|
+
static EXCLUDE = [
|
|
4090
|
+
'CaseLink',
|
|
4091
|
+
'JudicialUser'
|
|
4092
|
+
];
|
|
4093
|
+
transform(field) {
|
|
4094
|
+
if (!field || !field.field_type || !field.field_type.type) {
|
|
4095
|
+
return false;
|
|
4096
|
+
}
|
|
4097
|
+
if (IsCompoundPipe.COMPOUND_TYPES.indexOf(field.field_type.type) !== -1) {
|
|
4098
|
+
if (IsCompoundPipe.EXCLUDE.indexOf(field.field_type.id) !== -1) {
|
|
4099
|
+
return false;
|
|
4100
|
+
}
|
|
4101
|
+
return true;
|
|
4102
|
+
}
|
|
4103
|
+
return false;
|
|
4104
|
+
}
|
|
4105
|
+
static ɵfac = function IsCompoundPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || IsCompoundPipe)(); };
|
|
4106
|
+
static ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "ccdIsCompound", type: IsCompoundPipe, pure: true, standalone: false });
|
|
4052
4107
|
}
|
|
4108
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(IsCompoundPipe, [{
|
|
4109
|
+
type: Pipe,
|
|
4110
|
+
args: [{
|
|
4111
|
+
name: 'ccdIsCompound',
|
|
4112
|
+
standalone: false
|
|
4113
|
+
}]
|
|
4114
|
+
}], null, null); })();
|
|
4053
4115
|
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4116
|
+
class CaseFieldService {
|
|
4117
|
+
isOptional(field) {
|
|
4118
|
+
if (!field || !field.display_context) {
|
|
4119
|
+
return false;
|
|
4120
|
+
}
|
|
4121
|
+
return field.display_context.toUpperCase() === 'OPTIONAL';
|
|
4057
4122
|
}
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
class Profile {
|
|
4062
|
-
user;
|
|
4063
|
-
channels;
|
|
4064
|
-
jurisdictions;
|
|
4065
|
-
default;
|
|
4066
|
-
isSolicitor() {
|
|
4067
|
-
if (hasRoles(this)) {
|
|
4068
|
-
return this.user.idam.roles.find(r => r.endsWith('-solicitor')) !== undefined;
|
|
4123
|
+
isReadOnly(field) {
|
|
4124
|
+
if (!field || !field.display_context) {
|
|
4125
|
+
return false;
|
|
4069
4126
|
}
|
|
4070
|
-
return
|
|
4127
|
+
return field.display_context.toUpperCase() === 'READONLY';
|
|
4071
4128
|
}
|
|
4072
|
-
|
|
4073
|
-
if (
|
|
4074
|
-
return
|
|
4129
|
+
isMandatory(field) {
|
|
4130
|
+
if (!field || !field.display_context) {
|
|
4131
|
+
return false;
|
|
4075
4132
|
}
|
|
4076
|
-
return
|
|
4133
|
+
return field.display_context.toUpperCase() === 'MANDATORY';
|
|
4077
4134
|
}
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
class Field {
|
|
4085
|
-
id;
|
|
4086
|
-
field_type;
|
|
4087
|
-
elementPath;
|
|
4088
|
-
value;
|
|
4089
|
-
label;
|
|
4090
|
-
metadata;
|
|
4091
|
-
constructor(id, field_type, elementPath, value, label, metadata) {
|
|
4092
|
-
this.id = id;
|
|
4093
|
-
this.field_type = field_type;
|
|
4094
|
-
this.elementPath = elementPath;
|
|
4095
|
-
this.value = value;
|
|
4096
|
-
this.label = label;
|
|
4097
|
-
this.metadata = metadata;
|
|
4135
|
+
isLabel(field) {
|
|
4136
|
+
if (!field || !field.field_type) {
|
|
4137
|
+
return false;
|
|
4138
|
+
}
|
|
4139
|
+
return field.field_type.type === 'Label';
|
|
4098
4140
|
}
|
|
4141
|
+
static ɵfac = function CaseFieldService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaseFieldService)(); };
|
|
4142
|
+
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: CaseFieldService, factory: CaseFieldService.ɵfac });
|
|
4099
4143
|
}
|
|
4144
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFieldService, [{
|
|
4145
|
+
type: Injectable
|
|
4146
|
+
}], null, null); })();
|
|
4100
4147
|
|
|
4101
|
-
class
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
}
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
class SearchResultViewItem {
|
|
4112
|
-
case_id;
|
|
4113
|
-
case_fields;
|
|
4114
|
-
hydrated_case_fields;
|
|
4115
|
-
columns;
|
|
4116
|
-
supplementary_data;
|
|
4117
|
-
display_context_parameter;
|
|
4148
|
+
class IsMandatoryPipe {
|
|
4149
|
+
caseFieldService;
|
|
4150
|
+
constructor(caseFieldService) {
|
|
4151
|
+
this.caseFieldService = caseFieldService;
|
|
4152
|
+
}
|
|
4153
|
+
transform(field) {
|
|
4154
|
+
return this.caseFieldService.isMandatory(field);
|
|
4155
|
+
}
|
|
4156
|
+
static ɵfac = function IsMandatoryPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || IsMandatoryPipe)(i0.ɵɵdirectiveInject(CaseFieldService, 16)); };
|
|
4157
|
+
static ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "ccdIsMandatory", type: IsMandatoryPipe, pure: true, standalone: false });
|
|
4118
4158
|
}
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4159
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(IsMandatoryPipe, [{
|
|
4160
|
+
type: Pipe,
|
|
4161
|
+
args: [{
|
|
4162
|
+
name: 'ccdIsMandatory',
|
|
4163
|
+
standalone: false
|
|
4164
|
+
}]
|
|
4165
|
+
}], () => [{ type: CaseFieldService }], null); })();
|
|
4123
4166
|
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
return this.
|
|
4131
|
-
&& this.results[0].case_id
|
|
4132
|
-
&& Draft.isDraft(this.results[0].case_id);
|
|
4167
|
+
class IsReadOnlyPipe {
|
|
4168
|
+
caseFieldService;
|
|
4169
|
+
constructor(caseFieldService) {
|
|
4170
|
+
this.caseFieldService = caseFieldService;
|
|
4171
|
+
}
|
|
4172
|
+
transform(field) {
|
|
4173
|
+
return this.caseFieldService.isReadOnly(field);
|
|
4133
4174
|
}
|
|
4175
|
+
static ɵfac = function IsReadOnlyPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || IsReadOnlyPipe)(i0.ɵɵdirectiveInject(CaseFieldService, 16)); };
|
|
4176
|
+
static ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "ccdIsReadOnly", type: IsReadOnlyPipe, pure: true, standalone: false });
|
|
4134
4177
|
}
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
], SearchResultView.prototype, "results", void 0);
|
|
4178
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(IsReadOnlyPipe, [{
|
|
4179
|
+
type: Pipe,
|
|
4180
|
+
args: [{
|
|
4181
|
+
name: 'ccdIsReadOnly',
|
|
4182
|
+
standalone: false
|
|
4183
|
+
}]
|
|
4184
|
+
}], () => [{ type: CaseFieldService }], null); })();
|
|
4143
4185
|
|
|
4144
|
-
class
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4186
|
+
class IsReadOnlyAndNotCollectionPipe {
|
|
4187
|
+
caseFieldService;
|
|
4188
|
+
constructor(caseFieldService) {
|
|
4189
|
+
this.caseFieldService = caseFieldService;
|
|
4190
|
+
}
|
|
4191
|
+
transform(field) {
|
|
4192
|
+
if (!field || !field.field_type || !field.field_type.type) {
|
|
4193
|
+
return false;
|
|
4194
|
+
}
|
|
4195
|
+
if (this.isCollection(field)) {
|
|
4196
|
+
return false;
|
|
4197
|
+
}
|
|
4198
|
+
return this.caseFieldService.isReadOnly(field);
|
|
4199
|
+
}
|
|
4200
|
+
// CaseField @Expose() doesn't work with the pipe in here, so leaving the manual check
|
|
4201
|
+
isCollection(field) {
|
|
4202
|
+
return field.field_type && field.field_type.type === 'Collection';
|
|
4150
4203
|
}
|
|
4204
|
+
static ɵfac = function IsReadOnlyAndNotCollectionPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || IsReadOnlyAndNotCollectionPipe)(i0.ɵɵdirectiveInject(CaseFieldService, 16)); };
|
|
4205
|
+
static ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "ccdIsReadOnlyAndNotCollection", type: IsReadOnlyAndNotCollectionPipe, pure: true, standalone: false });
|
|
4151
4206
|
}
|
|
4207
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(IsReadOnlyAndNotCollectionPipe, [{
|
|
4208
|
+
type: Pipe,
|
|
4209
|
+
args: [{
|
|
4210
|
+
name: 'ccdIsReadOnlyAndNotCollection',
|
|
4211
|
+
standalone: false
|
|
4212
|
+
}]
|
|
4213
|
+
}], () => [{ type: CaseFieldService }], null); })();
|
|
4152
4214
|
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
label;
|
|
4162
|
-
order;
|
|
4163
|
-
field;
|
|
4164
|
-
metadata;
|
|
4165
|
-
display_context_parameter;
|
|
4166
|
-
}
|
|
4167
|
-
class WorkbasketInput {
|
|
4168
|
-
workbasketInputs;
|
|
4215
|
+
class PaletteUtilsModule {
|
|
4216
|
+
static ɵfac = function PaletteUtilsModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PaletteUtilsModule)(); };
|
|
4217
|
+
static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: PaletteUtilsModule });
|
|
4218
|
+
static ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ providers: [
|
|
4219
|
+
IsCompoundPipe,
|
|
4220
|
+
RpxTranslatePipe
|
|
4221
|
+
], imports: [CommonModule,
|
|
4222
|
+
RpxTranslationModule.forChild()] });
|
|
4169
4223
|
}
|
|
4224
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaletteUtilsModule, [{
|
|
4225
|
+
type: NgModule,
|
|
4226
|
+
args: [{
|
|
4227
|
+
imports: [
|
|
4228
|
+
CommonModule,
|
|
4229
|
+
RpxTranslationModule.forChild()
|
|
4230
|
+
],
|
|
4231
|
+
declarations: [
|
|
4232
|
+
DatePipe,
|
|
4233
|
+
FieldLabelPipe,
|
|
4234
|
+
FirstErrorPipe,
|
|
4235
|
+
IsCompoundPipe,
|
|
4236
|
+
IsMandatoryPipe,
|
|
4237
|
+
IsReadOnlyPipe,
|
|
4238
|
+
IsReadOnlyAndNotCollectionPipe,
|
|
4239
|
+
DashPipe
|
|
4240
|
+
],
|
|
4241
|
+
exports: [
|
|
4242
|
+
DatePipe,
|
|
4243
|
+
FieldLabelPipe,
|
|
4244
|
+
FirstErrorPipe,
|
|
4245
|
+
IsCompoundPipe,
|
|
4246
|
+
IsMandatoryPipe,
|
|
4247
|
+
IsReadOnlyPipe,
|
|
4248
|
+
IsReadOnlyAndNotCollectionPipe,
|
|
4249
|
+
DashPipe
|
|
4250
|
+
],
|
|
4251
|
+
providers: [
|
|
4252
|
+
IsCompoundPipe,
|
|
4253
|
+
RpxTranslatePipe
|
|
4254
|
+
]
|
|
4255
|
+
}]
|
|
4256
|
+
}], null, null); })();
|
|
4257
|
+
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(PaletteUtilsModule, { declarations: [DatePipe,
|
|
4258
|
+
FieldLabelPipe,
|
|
4259
|
+
FirstErrorPipe,
|
|
4260
|
+
IsCompoundPipe,
|
|
4261
|
+
IsMandatoryPipe,
|
|
4262
|
+
IsReadOnlyPipe,
|
|
4263
|
+
IsReadOnlyAndNotCollectionPipe,
|
|
4264
|
+
DashPipe], imports: [CommonModule, i1.RpxTranslationModule], exports: [DatePipe,
|
|
4265
|
+
FieldLabelPipe,
|
|
4266
|
+
FirstErrorPipe,
|
|
4267
|
+
IsCompoundPipe,
|
|
4268
|
+
IsMandatoryPipe,
|
|
4269
|
+
IsReadOnlyPipe,
|
|
4270
|
+
IsReadOnlyAndNotCollectionPipe,
|
|
4271
|
+
DashPipe] }); })();
|
|
4170
4272
|
|
|
4171
4273
|
// @dynamic
|
|
4172
4274
|
class FieldsUtils {
|
|
@@ -8401,26 +8503,6 @@ class WindowService {
|
|
|
8401
8503
|
type: Injectable
|
|
8402
8504
|
}], null, null); })();
|
|
8403
8505
|
|
|
8404
|
-
class FocusService {
|
|
8405
|
-
/** unique ID of DOM element this service will focus on */
|
|
8406
|
-
elementIdToFocus = 'focusService-elementIdToFocus';
|
|
8407
|
-
/**
|
|
8408
|
-
* Focus on a specific element with the elementIdToFocus.
|
|
8409
|
-
* If there is no element in the DOM, no action is taken.
|
|
8410
|
-
*/
|
|
8411
|
-
focus() {
|
|
8412
|
-
const elementToFocus = document.getElementById(this.elementIdToFocus);
|
|
8413
|
-
if (elementToFocus) {
|
|
8414
|
-
elementToFocus.focus();
|
|
8415
|
-
}
|
|
8416
|
-
}
|
|
8417
|
-
static ɵfac = function FocusService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || FocusService)(); };
|
|
8418
|
-
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: FocusService, factory: FocusService.ɵfac });
|
|
8419
|
-
}
|
|
8420
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FocusService, [{
|
|
8421
|
-
type: Injectable
|
|
8422
|
-
}], null, null); })();
|
|
8423
|
-
|
|
8424
8506
|
class WorkbasketInputFilterService {
|
|
8425
8507
|
httpService;
|
|
8426
8508
|
appConfig;
|
|
@@ -8652,75 +8734,6 @@ class BrowserService {
|
|
|
8652
8734
|
}], null, null); })();
|
|
8653
8735
|
|
|
8654
8736
|
class CaseAccessUtils {
|
|
8655
|
-
// User role mapping
|
|
8656
|
-
static JUDGE_ROLE = 'judge';
|
|
8657
|
-
static JUDGE_ROLE_CATEGORY = 'JUDICIAL';
|
|
8658
|
-
static JUDGE_ROLE_NAME = 'judiciary';
|
|
8659
|
-
static ADMIN_ROLE = 'admin';
|
|
8660
|
-
static ADMIN_ROLE_CATEGORY = 'ADMIN';
|
|
8661
|
-
static ADMIN_ROLE_NAME = 'admin';
|
|
8662
|
-
static PROFESSIONAL_ROLE = 'solicitor';
|
|
8663
|
-
static PROFESSIONAL_ROLE_CATEGORY = 'PROFESSIONAL';
|
|
8664
|
-
static PROFESSIONAL_ROLE_NAME = 'professional';
|
|
8665
|
-
static LEGAL_OPERATIONS_ROLE = 'caseworker';
|
|
8666
|
-
static LEGAL_OPERATIONS_ROLE_CATEGORY = 'LEGAL_OPERATIONS';
|
|
8667
|
-
static LEGAL_OPERATIONS_ROLE_NAME = 'legal-ops';
|
|
8668
|
-
static CITIZEN_ROLE = 'citizen';
|
|
8669
|
-
static CITIZEN_ROLE_CATEGORY = 'CITIZEN';
|
|
8670
|
-
static CITIZEN_ROLE_NAME = 'citizen';
|
|
8671
|
-
static CTSC_ROLE = 'ctsc';
|
|
8672
|
-
static CTSC_ROLE_CATEGORY = 'CTSC';
|
|
8673
|
-
static CTSC_ROLE_NAME = 'ctsc';
|
|
8674
|
-
getMappedRoleCategory(roles = [], roleCategories = []) {
|
|
8675
|
-
const roleKeywords = roles.join().split('-').join().split(',');
|
|
8676
|
-
if (this.roleOrCategoryExists(CaseAccessUtils.JUDGE_ROLE, CaseAccessUtils.JUDGE_ROLE_CATEGORY, roleKeywords, roleCategories)) {
|
|
8677
|
-
return CaseAccessUtils.JUDGE_ROLE_CATEGORY;
|
|
8678
|
-
}
|
|
8679
|
-
else if (this.roleOrCategoryExists(CaseAccessUtils.PROFESSIONAL_ROLE, CaseAccessUtils.PROFESSIONAL_ROLE_CATEGORY, roleKeywords, roleCategories)) {
|
|
8680
|
-
return CaseAccessUtils.PROFESSIONAL_ROLE_CATEGORY;
|
|
8681
|
-
}
|
|
8682
|
-
else if (this.roleOrCategoryExists(CaseAccessUtils.CITIZEN_ROLE, CaseAccessUtils.CITIZEN_ROLE_CATEGORY, roleKeywords, roleCategories)) {
|
|
8683
|
-
return CaseAccessUtils.CITIZEN_ROLE_CATEGORY;
|
|
8684
|
-
}
|
|
8685
|
-
else if (this.roleOrCategoryExists(CaseAccessUtils.ADMIN_ROLE, CaseAccessUtils.ADMIN_ROLE_CATEGORY, roleKeywords, roleCategories)) {
|
|
8686
|
-
return CaseAccessUtils.ADMIN_ROLE_CATEGORY;
|
|
8687
|
-
}
|
|
8688
|
-
else if (this.roleOrCategoryExists(CaseAccessUtils.CTSC_ROLE, CaseAccessUtils.CTSC_ROLE_CATEGORY, roleKeywords, roleCategories)) {
|
|
8689
|
-
return CaseAccessUtils.CTSC_ROLE_CATEGORY;
|
|
8690
|
-
}
|
|
8691
|
-
else {
|
|
8692
|
-
return CaseAccessUtils.LEGAL_OPERATIONS_ROLE_CATEGORY;
|
|
8693
|
-
}
|
|
8694
|
-
}
|
|
8695
|
-
roleOrCategoryExists(roleKeyword, roleCategory, roleKeywords, roleCategories) {
|
|
8696
|
-
const categoryExists = roleCategories.indexOf(roleCategory) > -1;
|
|
8697
|
-
const keywordExists = roleKeywords.indexOf(roleKeyword) > -1;
|
|
8698
|
-
return categoryExists ? categoryExists : keywordExists;
|
|
8699
|
-
}
|
|
8700
|
-
getAMRoleName(accessType, aMRole) {
|
|
8701
|
-
let roleName = '';
|
|
8702
|
-
switch (aMRole) {
|
|
8703
|
-
case CaseAccessUtils.JUDGE_ROLE_CATEGORY:
|
|
8704
|
-
roleName = `${accessType}-access-${CaseAccessUtils.JUDGE_ROLE_NAME}`;
|
|
8705
|
-
break;
|
|
8706
|
-
case CaseAccessUtils.PROFESSIONAL_ROLE_CATEGORY:
|
|
8707
|
-
roleName = `${accessType}-access-${CaseAccessUtils.PROFESSIONAL_ROLE_NAME}`;
|
|
8708
|
-
break;
|
|
8709
|
-
case CaseAccessUtils.CITIZEN_ROLE_CATEGORY:
|
|
8710
|
-
roleName = `${accessType}-access-${CaseAccessUtils.CITIZEN_ROLE_NAME}`;
|
|
8711
|
-
break;
|
|
8712
|
-
case CaseAccessUtils.ADMIN_ROLE_CATEGORY:
|
|
8713
|
-
roleName = `${accessType}-access-${CaseAccessUtils.ADMIN_ROLE_NAME}`;
|
|
8714
|
-
break;
|
|
8715
|
-
case CaseAccessUtils.CTSC_ROLE_CATEGORY:
|
|
8716
|
-
roleName = `${accessType}-access-${CaseAccessUtils.CTSC_ROLE_NAME}`;
|
|
8717
|
-
break;
|
|
8718
|
-
default:
|
|
8719
|
-
roleName = `${accessType}-access-${CaseAccessUtils.LEGAL_OPERATIONS_ROLE_NAME}`;
|
|
8720
|
-
break;
|
|
8721
|
-
}
|
|
8722
|
-
return roleName;
|
|
8723
|
-
}
|
|
8724
8737
|
getAMPayload(assignerId, actorId, roleName, roleCategory, grantType, caseId, details, beginTime = null, endTime = null, isNew = false) {
|
|
8725
8738
|
const process = details.caseReference !== undefined ? 'challenged-access' : 'specific-access';
|
|
8726
8739
|
const payload = {
|
|
@@ -10183,7 +10196,7 @@ class CaseEditComponent {
|
|
|
10183
10196
|
return of(true);
|
|
10184
10197
|
}
|
|
10185
10198
|
finishEventCompletionLogic(eventResponse) {
|
|
10186
|
-
this.caseNotifier.
|
|
10199
|
+
this.caseNotifier.cachedCaseView = null;
|
|
10187
10200
|
this.sessionStorageService.removeItem('eventUrl');
|
|
10188
10201
|
const confirmation = this.buildConfirmation(eventResponse);
|
|
10189
10202
|
if (confirmation && (confirmation.getHeader() || confirmation.getBody())) {
|
|
@@ -10586,8 +10599,8 @@ class CasesService {
|
|
|
10586
10599
|
if (userInfoStr) {
|
|
10587
10600
|
userInfo = JSON.parse(userInfoStr);
|
|
10588
10601
|
}
|
|
10589
|
-
const roleCategory = userInfo.roleCategory ||
|
|
10590
|
-
const roleName =
|
|
10602
|
+
const roleCategory = userInfo.roleCategory || getMappedRoleCategory(userInfo.roles, userInfo.roleCategories);
|
|
10603
|
+
const roleName = getAMRoleName('challenged', roleCategory);
|
|
10591
10604
|
const beginTime = new Date();
|
|
10592
10605
|
const endTime = new Date(new Date().setUTCHours(23, 59, 59, 999));
|
|
10593
10606
|
const id = userInfo.id ? userInfo.id : userInfo.uid;
|
|
@@ -10603,8 +10616,8 @@ class CasesService {
|
|
|
10603
10616
|
if (userInfoStr) {
|
|
10604
10617
|
userInfo = JSON.parse(userInfoStr);
|
|
10605
10618
|
}
|
|
10606
|
-
const roleCategory = userInfo.roleCategory ||
|
|
10607
|
-
const roleName =
|
|
10619
|
+
const roleCategory = userInfo.roleCategory || getMappedRoleCategory(userInfo.roles, userInfo.roleCategories);
|
|
10620
|
+
const roleName = getAMRoleName('specific', roleCategory);
|
|
10608
10621
|
const id = userInfo.id ? userInfo.id : userInfo.uid;
|
|
10609
10622
|
const payload = camUtils.getAMPayload(null, id, roleName, roleCategory, 'SPECIFIC', caseId, sar, null, null, true);
|
|
10610
10623
|
payload.roleRequest = {
|
|
@@ -11514,7 +11527,6 @@ class CaseEditPageComponent {
|
|
|
11514
11527
|
addressService;
|
|
11515
11528
|
linkedCasesService;
|
|
11516
11529
|
caseFlagStateService;
|
|
11517
|
-
focusService;
|
|
11518
11530
|
static RESUMED_FORM_DISCARD = 'RESUMED_FORM_DISCARD';
|
|
11519
11531
|
static NEW_FORM_DISCARD = 'NEW_FORM_DISCARD';
|
|
11520
11532
|
static NEW_FORM_SAVE = 'NEW_FORM_CHANGED_SAVE';
|
|
@@ -11550,7 +11562,13 @@ class CaseEditPageComponent {
|
|
|
11550
11562
|
static scrollToTop() {
|
|
11551
11563
|
window.scrollTo(0, 0);
|
|
11552
11564
|
}
|
|
11553
|
-
|
|
11565
|
+
static setFocusToTop() {
|
|
11566
|
+
const topContainer = document.getElementById('top');
|
|
11567
|
+
if (topContainer) {
|
|
11568
|
+
topContainer.focus();
|
|
11569
|
+
}
|
|
11570
|
+
}
|
|
11571
|
+
constructor(caseEdit, route, formValueService, formErrorService, cdRef, pageValidationService, dialog, caseFieldService, caseEditDataService, loadingService, validPageListCaseFieldsService, multipageComponentStateService, addressService, linkedCasesService, caseFlagStateService) {
|
|
11554
11572
|
this.caseEdit = caseEdit;
|
|
11555
11573
|
this.route = route;
|
|
11556
11574
|
this.formValueService = formValueService;
|
|
@@ -11566,7 +11584,6 @@ class CaseEditPageComponent {
|
|
|
11566
11584
|
this.addressService = addressService;
|
|
11567
11585
|
this.linkedCasesService = linkedCasesService;
|
|
11568
11586
|
this.caseFlagStateService = caseFlagStateService;
|
|
11569
|
-
this.focusService = focusService;
|
|
11570
11587
|
this.multipageComponentStateService.setInstigator(this);
|
|
11571
11588
|
}
|
|
11572
11589
|
onFinalNext() {
|
|
@@ -11631,7 +11648,7 @@ class CaseEditPageComponent {
|
|
|
11631
11648
|
}
|
|
11632
11649
|
this.triggerText = this.getTriggerText();
|
|
11633
11650
|
});
|
|
11634
|
-
|
|
11651
|
+
CaseEditPageComponent.setFocusToTop();
|
|
11635
11652
|
this.caseEditFormSub = this.caseEditDataService.caseEditForm$.subscribe({
|
|
11636
11653
|
next: editForm => this.editForm = editForm
|
|
11637
11654
|
});
|
|
@@ -11692,7 +11709,7 @@ class CaseEditPageComponent {
|
|
|
11692
11709
|
if (this.getPageNumber() !== undefined) {
|
|
11693
11710
|
this.previousStep();
|
|
11694
11711
|
}
|
|
11695
|
-
|
|
11712
|
+
CaseEditPageComponent.setFocusToTop();
|
|
11696
11713
|
}
|
|
11697
11714
|
// Adding validation message to show it as Error Summary
|
|
11698
11715
|
generateErrorMessage(fields, container, path, sourceFromComplexField) {
|
|
@@ -11901,7 +11918,7 @@ class CaseEditPageComponent {
|
|
|
11901
11918
|
// purposes)
|
|
11902
11919
|
this.removeAllJudicialUserFormControls(this.currentPage, this.editForm);
|
|
11903
11920
|
}
|
|
11904
|
-
|
|
11921
|
+
CaseEditPageComponent.setFocusToTop();
|
|
11905
11922
|
}
|
|
11906
11923
|
updateFormData(jsonData) {
|
|
11907
11924
|
for (const caseFieldId of Object.keys(jsonData.data)) {
|
|
@@ -12020,8 +12037,6 @@ class CaseEditPageComponent {
|
|
|
12020
12037
|
else {
|
|
12021
12038
|
this.caseEdit.cancelled.emit();
|
|
12022
12039
|
}
|
|
12023
|
-
// clear CaseView cache to allow any incidental changes to get picked up once the edit has cancelled
|
|
12024
|
-
this.caseEdit.caseNotifier.removeCachedCase();
|
|
12025
12040
|
this.clearValidationErrors();
|
|
12026
12041
|
this.multipageComponentStateService.reset();
|
|
12027
12042
|
}
|
|
@@ -12195,7 +12210,7 @@ class CaseEditPageComponent {
|
|
|
12195
12210
|
}
|
|
12196
12211
|
});
|
|
12197
12212
|
}
|
|
12198
|
-
static ɵfac = function CaseEditPageComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaseEditPageComponent)(i0.ɵɵdirectiveInject(CaseEditComponent), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(FormValueService), i0.ɵɵdirectiveInject(FormErrorService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(PageValidationService), i0.ɵɵdirectiveInject(i1$3.MatLegacyDialog), i0.ɵɵdirectiveInject(CaseFieldService), i0.ɵɵdirectiveInject(CaseEditDataService), i0.ɵɵdirectiveInject(LoadingService), i0.ɵɵdirectiveInject(ValidPageListCaseFieldsService), i0.ɵɵdirectiveInject(MultipageComponentStateService), i0.ɵɵdirectiveInject(AddressesService), i0.ɵɵdirectiveInject(LinkedCasesService), i0.ɵɵdirectiveInject(CaseFlagStateService)
|
|
12213
|
+
static ɵfac = function CaseEditPageComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaseEditPageComponent)(i0.ɵɵdirectiveInject(CaseEditComponent), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(FormValueService), i0.ɵɵdirectiveInject(FormErrorService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(PageValidationService), i0.ɵɵdirectiveInject(i1$3.MatLegacyDialog), i0.ɵɵdirectiveInject(CaseFieldService), i0.ɵɵdirectiveInject(CaseEditDataService), i0.ɵɵdirectiveInject(LoadingService), i0.ɵɵdirectiveInject(ValidPageListCaseFieldsService), i0.ɵɵdirectiveInject(MultipageComponentStateService), i0.ɵɵdirectiveInject(AddressesService), i0.ɵɵdirectiveInject(LinkedCasesService), i0.ɵɵdirectiveInject(CaseFlagStateService)); };
|
|
12199
12214
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEditPageComponent, selectors: [["ccd-case-edit-page"]], standalone: false, decls: 12, vars: 11, consts: [["titleBlock", ""], ["idBlock", ""], [4, "ngIf"], [4, "ngIf", "ngIfThen", "ngIfElse"], ["class", "govuk-error-summary", "aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 4, "ngIf"], [3, "error"], [3, "callbackErrorsContext", "triggerTextContinue", "triggerTextIgnore", "callbackErrorsSubject"], [1, "width-50"], ["class", "form", 3, "formGroup", "submit", 4, "ngIf"], [3, "eventCompletionParams", "eventCanBeCompleted", 4, "ngIf"], ["class", "govuk-heading-l", 4, "ngIf"], [1, "govuk-heading-l"], [1, "govuk-caption-l"], [3, "content"], ["class", "heading-h2", 4, "ngIf"], [1, "heading-h2"], ["aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 1, "govuk-error-summary"], ["id", "error-summary-title", 1, "govuk-error-summary__title"], ["class", "govuk-error-summary__body", 4, "ngFor", "ngForOf"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], ["tabindex", "0", 1, "validation-error", 3, "click", "keyup.enter"], [1, "form", 3, "submit", "formGroup"], ["id", "fieldset-case-data"], [2, "display", "none"], ["id", "caseEditForm", 3, "fields", "formGroup", "caseFields", "pageChangeSubject", "valuesChanged", 4, "ngIf"], ["class", "grid-row", 4, "ngIf"], [1, "form-group", "form-group-related"], ["class", "button button-secondary", "type", "button", 3, "disabled", "click", 4, "ngIf"], ["type", "submit", 1, "button", 3, "disabled"], [1, "cancel"], ["type", "button", 1, "govuk-js-link", 3, "click"], ["id", "caseEditForm", 3, "valuesChanged", "fields", "formGroup", "caseFields", "pageChangeSubject"], [1, "grid-row"], [1, "column-two-thirds", "rightBorderSeparator"], ["id", "caseEditForm1", 3, "fields", "formGroup", "caseFields"], [1, "column-one-third"], ["id", "caseEditForm2", 3, "fields", "formGroup", "caseFields"], ["type", "button", 1, "button", "button-secondary", 3, "click", "disabled"], [3, "eventCanBeCompleted", "eventCompletionParams"]], template: function CaseEditPageComponent_Template(rf, ctx) { if (rf & 1) {
|
|
12200
12215
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
12201
12216
|
i0.ɵɵtemplate(0, CaseEditPageComponent_ng_container_0_Template, 3, 2, "ng-container", 2)(1, CaseEditPageComponent_div_1_Template, 1, 0, "div", 3)(2, CaseEditPageComponent_ng_template_2_Template, 3, 7, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor)(4, CaseEditPageComponent_ng_template_4_Template, 1, 1, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor)(6, CaseEditPageComponent_div_6_Template, 5, 4, "div", 4);
|
|
@@ -12228,8 +12243,8 @@ class CaseEditPageComponent {
|
|
|
12228
12243
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditPageComponent, [{
|
|
12229
12244
|
type: Component,
|
|
12230
12245
|
args: [{ selector: 'ccd-case-edit-page', standalone: false, template: "<ng-container *ngIf=\"currentPage\">\n <h1 *ngIf=\"!currentPage.label\" class=\"govuk-heading-l\">{{eventTrigger.name | rpxTranslate}}</h1>\n <ng-container *ngIf=\"currentPage.label\">\n <span class=\"govuk-caption-l\">{{ eventTrigger.name | rpxTranslate}}</span>\n <h1 class=\"govuk-heading-l\">{{currentPage.label | rpxTranslate}}</h1>\n </ng-container>\n</ng-container>\n\n<!--Case ID or Title -->\n<div *ngIf=\"getCaseTitle(); then titleBlock; else idBlock\"></div>\n<ng-template #titleBlock>\n <ccd-markdown [content]=\"getCaseTitle() | ccdCaseTitle: caseFields : editForm.controls['data'] | rpxTranslate\"></ccd-markdown>\n</ng-template>\n<ng-template #idBlock>\n <h2 *ngIf=\"getCaseId()\" class=\"heading-h2\">#{{ getCaseId() | ccdCaseReference }}</h2>\n</ng-template>\n\n<!-- Error message summary -->\n<div *ngIf=\"validationErrors.length > 0\" class=\"govuk-error-summary\" aria-labelledby=\"error-summary-title\" role=\"alert\" tabindex=\"-1\" data-module=\"govuk-error-summary\">\n <h2 class=\"govuk-error-summary__title\" id=\"error-summary-title\">\n {{'There is a problem' | rpxTranslate}}\n </h2>\n <div *ngFor=\"let validationError of validationErrors\" class=\"govuk-error-summary__body\">\n <ul class=\"govuk-list govuk-error-summary__list\">\n <li>\n <a (click)=\"navigateToErrorElement(validationError.id)\" (keyup.enter)=\"navigateToErrorElement(validationError.id)\" tabindex=\"0\" class=\"validation-error\">\n {{ validationError.message | rpxTranslate: getRpxTranslatePipeArgs(validationError.label | rpxTranslate): null }}\n </a>\n </li>\n </ul>\n </div>\n</div>\n\n<ccd-case-edit-generic-errors [error]=\"caseEdit.error\"></ccd-case-edit-generic-errors>\n\n<ccd-callback-errors\n [triggerTextContinue]=\"triggerTextStart\"\n [triggerTextIgnore]=\"triggerTextIgnoreWarnings\"\n [callbackErrorsSubject]=\"caseEdit.callbackErrorsSubject\"\n (callbackErrorsContext)=\"callbackErrorsNotify($event)\">\n</ccd-callback-errors>\n<div class=\"width-50\">\n <form *ngIf=\"currentPage\" class=\"form\" [formGroup]=\"editForm\" (submit)=\"nextStep()\">\n <fieldset id=\"fieldset-case-data\">\n <legend style=\"display: none;\"></legend>\n <!-- single column -->\n <ccd-case-edit-form id='caseEditForm' *ngIf=\"!currentPage.isMultiColumn()\" [fields]=\"currentPage.getCol1Fields()\"\n [formGroup]=\"editForm.controls['data']\" [caseFields]=\"caseFields\"\n [pageChangeSubject]=\"pageChangeSubject\"\n (valuesChanged)=\"applyValuesChanged($event)\"></ccd-case-edit-form>\n <!-- two columns -->\n <div *ngIf=\"currentPage.isMultiColumn()\" class=\"grid-row\">\n <div class=\"column-two-thirds rightBorderSeparator\">\n <ccd-case-edit-form id='caseEditForm1' [fields]=\"currentPage.getCol1Fields()\"\n [formGroup]=\"editForm.controls['data']\" [caseFields]=\"caseFields\"></ccd-case-edit-form>\n </div>\n <div class=\"column-one-third\">\n <ccd-case-edit-form id='caseEditForm2' [fields]=\"currentPage.getCol2Fields()\"\n [formGroup]=\"editForm.controls['data']\" [caseFields]=\"caseFields\"></ccd-case-edit-form>\n </div>\n </div>\n </fieldset>\n\n <div class=\"form-group form-group-related\">\n <button class=\"button button-secondary\" type=\"button\" (click)=\"toPreviousPage()\" *ngIf=\"!isAtStart()\" [disabled]=\"isDisabled()\">\n {{'Previous' | rpxTranslate}}\n </button>\n <button class=\"button\" type=\"submit\" [disabled]=\"submitting()\">{{triggerText | rpxTranslate}}</button>\n </div>\n\n <p class=\"cancel\"><button type=\"button\" (click)=\"cancel()\" class=\"govuk-js-link\">{{getCancelText() | rpxTranslate}}</button></p>\n </form>\n</div>\n\n<ccd-case-event-completion *ngIf=\"caseEdit.isEventCompletionChecksRequired\"\n [eventCompletionParams]=\"caseEdit.eventCompletionParams\"\n (eventCanBeCompleted)=\"onEventCanBeCompleted($event)\">\n</ccd-case-event-completion>\n", styles: [".rightBorderSeparator{border-right-width:4px;border-right-color:#ffcc02;border-right-style:solid}.validation-error{cursor:pointer;text-decoration:underline;color:#d4351c}\n"] }]
|
|
12231
|
-
}], () => [{ type: CaseEditComponent }, { type: i1$1.ActivatedRoute }, { type: FormValueService }, { type: FormErrorService }, { type: i0.ChangeDetectorRef }, { type: PageValidationService }, { type: i1$3.MatLegacyDialog }, { type: CaseFieldService }, { type: CaseEditDataService }, { type: LoadingService }, { type: ValidPageListCaseFieldsService }, { type: MultipageComponentStateService }, { type: AddressesService }, { type: LinkedCasesService }, { type: CaseFlagStateService }
|
|
12232
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEditPageComponent, { className: "CaseEditPageComponent", filePath: "lib/shared/components/case-editor/case-edit-page/case-edit-page.component.ts", lineNumber:
|
|
12246
|
+
}], () => [{ type: CaseEditComponent }, { type: i1$1.ActivatedRoute }, { type: FormValueService }, { type: FormErrorService }, { type: i0.ChangeDetectorRef }, { type: PageValidationService }, { type: i1$3.MatLegacyDialog }, { type: CaseFieldService }, { type: CaseEditDataService }, { type: LoadingService }, { type: ValidPageListCaseFieldsService }, { type: MultipageComponentStateService }, { type: AddressesService }, { type: LinkedCasesService }, { type: CaseFlagStateService }], null); })();
|
|
12247
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEditPageComponent, { className: "CaseEditPageComponent", filePath: "lib/shared/components/case-editor/case-edit-page/case-edit-page.component.ts", lineNumber: 35 }); })();
|
|
12233
12248
|
|
|
12234
12249
|
class CallbackErrorsContext {
|
|
12235
12250
|
triggerText;
|
|
@@ -33564,8 +33579,7 @@ class CaseEditorModule {
|
|
|
33564
33579
|
EventCompletionStateMachineService,
|
|
33565
33580
|
CaseFlagStateService,
|
|
33566
33581
|
ValidPageListCaseFieldsService,
|
|
33567
|
-
MultipageComponentStateService
|
|
33568
|
-
FocusService
|
|
33582
|
+
MultipageComponentStateService
|
|
33569
33583
|
], imports: [CommonModule,
|
|
33570
33584
|
RouterModule,
|
|
33571
33585
|
FormsModule,
|
|
@@ -33648,8 +33662,7 @@ class CaseEditorModule {
|
|
|
33648
33662
|
EventCompletionStateMachineService,
|
|
33649
33663
|
CaseFlagStateService,
|
|
33650
33664
|
ValidPageListCaseFieldsService,
|
|
33651
|
-
MultipageComponentStateService
|
|
33652
|
-
FocusService
|
|
33665
|
+
MultipageComponentStateService
|
|
33653
33666
|
]
|
|
33654
33667
|
}]
|
|
33655
33668
|
}], null, null); })();
|
|
@@ -35772,16 +35785,8 @@ class CaseResolver {
|
|
|
35772
35785
|
}
|
|
35773
35786
|
// as discussed for EUI-5456, need functionality to go to default page
|
|
35774
35787
|
goToDefaultPage() {
|
|
35775
|
-
|
|
35776
|
-
|
|
35777
|
-
&& !userDetails.roles.includes(PUI_CASE_MANAGER)
|
|
35778
|
-
&&
|
|
35779
|
-
(userDetails.roles.includes('caseworker-ia-iacjudge')
|
|
35780
|
-
|| userDetails.roles.includes('caseworker-ia-caseofficer')
|
|
35781
|
-
|| userDetails.roles.includes('caseworker-ia-admofficer')
|
|
35782
|
-
|| userDetails.roles.includes('caseworker-civil')
|
|
35783
|
-
|| userDetails.roles.includes('caseworker-privatelaw'))
|
|
35784
|
-
? this.router.navigate([CaseResolver.defaultWAPage]) : this.router.navigate([CaseResolver.defaultPage]);
|
|
35788
|
+
isWorkAllocationUser(this.sessionStorage) ?
|
|
35789
|
+
this.router.navigate([CaseResolver.defaultWAPage]) : this.router.navigate([CaseResolver.defaultPage]);
|
|
35785
35790
|
}
|
|
35786
35791
|
static ɵfac = function CaseResolver_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaseResolver)(i0.ɵɵinject(CaseNotifier), i0.ɵɵinject(DraftService), i0.ɵɵinject(NavigationNotifierService), i0.ɵɵinject(i1$1.Router), i0.ɵɵinject(SessionStorageService)); };
|
|
35787
35792
|
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: CaseResolver, factory: CaseResolver.ɵfac });
|
|
@@ -40032,6 +40037,9 @@ class CreateCaseFiltersComponent {
|
|
|
40032
40037
|
this.jurisdictions = jurisdictions;
|
|
40033
40038
|
this.selectJurisdiction(this.jurisdictions, this.filterJurisdictionControl);
|
|
40034
40039
|
});
|
|
40040
|
+
if (document.getElementById('cc-jurisdiction')) {
|
|
40041
|
+
document.getElementById('cc-jurisdiction').focus();
|
|
40042
|
+
}
|
|
40035
40043
|
}
|
|
40036
40044
|
onJurisdictionIdChange() {
|
|
40037
40045
|
this.resetCaseType();
|
|
@@ -41857,5 +41865,5 @@ class TestRouteSnapshotBuilder {
|
|
|
41857
41865
|
* Generated bundle index. Do not edit.
|
|
41858
41866
|
*/
|
|
41859
41867
|
|
|
41860
|
-
export { AbstractAppConfig, AbstractFieldReadComponent, AbstractFieldWriteComponent, AbstractFieldWriteJourneyComponent, AbstractJourneyComponent, Activity, ActivityBannerComponent, ActivityComponent, ActivityIconComponent, ActivityInfo, ActivityModule, ActivityPollingService, ActivityService, AddCommentsComponent, AddCommentsErrorMessage, AddCommentsStep, AddressModel, AddressOption, AddressesService, Alert, AlertComponent, AlertIconClassPipe, AlertMessageType, AlertModule, AlertService, AuthService, Banner, BannersService, BeforeYouStartComponent, BodyComponent, BrowserService, CCDCaseLinkType, COMPONENT_PORTAL_INJECTION_TOKEN, CallbackErrorsComponent, CallbackErrorsContext, CaseAccessUtils, CaseBasicAccessViewComponent, CaseChallengedAccessRequestComponent, CaseChallengedAccessSuccessComponent, CaseCreateComponent, CaseDetails, CaseEditComponent, CaseEditConfirmComponent, CaseEditDataModule, CaseEditDataService, CaseEditFormComponent, CaseEditPageComponent, CaseEditSubmitComponent, CaseEditWizardGuard, CaseEditorConfig, CaseEditorModule, CaseEvent, CaseEventCompletionComponent, CaseEventCompletionTaskCancelledComponent, CaseEventCompletionTaskReassignedComponent, CaseEventData, CaseEventTrigger, CaseEventTriggerComponent, CaseField, CaseFieldService, CaseFileViewFieldComponent, CaseFileViewFolderComponent, CaseFileViewFolderDocumentActionsComponent, CaseFileViewFolderSelectorComponent, CaseFileViewFolderSortComponent, CaseFileViewFolderToggleComponent, CaseFileViewOverlayMenuComponent, CaseFileViewService, CaseFlagCheckYourAnswersPageStep, CaseFlagDisplayContextParameter, CaseFlagErrorMessage, CaseFlagFieldState, CaseFlagFormFields, CaseFlagRefdataService, CaseFlagStatus, CaseFlagSummaryListComponent, CaseFlagSummaryListDisplayMode, CaseFlagTableComponent, CaseFlagWizardStepTitle, CaseFullAccessViewComponent, CaseHeaderComponent, CaseHeaderModule, CaseHistoryViewerFieldComponent, CaseLink, CaseLinkResponse, CaseListComponent, CaseListFiltersComponent, CaseListFiltersModule, CaseListModule, CaseNotifier, CasePaymentHistoryViewerFieldComponent, CasePrintDocument, CasePrinterComponent, CaseProgressComponent, CaseReferencePipe, CaseResolver, CaseSpecificAccessRequestComponent, CaseSpecificAccessSuccessComponent, CaseState, CaseTab, CaseTimelineComponent, CaseTimelineDisplayMode, CaseTimelineModule, CaseType, CaseTypeLite, CaseView, CaseViewComponent, CaseViewEvent, CaseViewTrigger, CaseViewerComponent, CaseViewerModule, CasesService, CaseworkerService, CcdCYAPageLabelFilterPipe, CcdCaseTitlePipe, CcdCollectionTableCaseFieldsFilterPipe, CcdPageFieldsPipe, CcdTabFieldsPipe, CheckYourAnswersComponent, CloseQueryComponent, ConditionalShowFormDirective, ConditionalShowModule, ConditionalShowRegistrarService, ConfirmFlagStatusComponent, ConfirmStatusErrorMessage, ConfirmStatusStep, Confirmation, ConvertHrefToRouterService, CreateCaseFiltersComponent, CreateCaseFiltersModule, CreateCaseFiltersSelection, DRAFT_PREFIX, DRAFT_QUERY_PARAM, DashPipe, DateInputComponent, DatePipe, DateTimeFormatUtils, DatetimePickerComponent, DefinitionsModule, DefinitionsService, DeleteOrCancelDialogComponent, DialogsModule, DisplayMode, Document, DocumentData, DocumentDialogComponent, DocumentLinks, DocumentManagementService, DocumentUrlPipe, Draft, DraftService, DynamicListPipe, DynamicRadioListPipe, ESQueryType, Embedded, EnumDisplayDescriptionPipe, ErrorMessageComponent, ErrorNotifierService, EventCaseField, EventCompletionReturnStates, EventCompletionStateMachineService, EventCompletionStates, EventLogComponent, EventLogDetailsComponent, EventLogTableComponent, EventMessageModule, EventStartComponent, EventStartModule, EventStartStateMachineService, EventStatusService, EventTriggerResolver, EventTriggerService, Fee, FeeValue, Field, FieldLabelPipe, FieldReadComponent, FieldReadLabelComponent, FieldType, FieldTypeSanitiser, FieldWriteComponent, FieldsFilterPipe, FieldsPurger, FieldsUtils, FirstErrorPipe, FixedListItem, FixedListPipe, FixedRadioListPipe, FlagFieldDisplayPipe, FocusElementDirective, FocusElementModule, FocusService, FooterComponent, FormDocument, FormErrorService, FormValidatorsService, FormValueService, FormatTranslatorService, GreyBarService, HRef, HeaderBarComponent, HeadersModule, HttpError, HttpErrorService, HttpService, IsCompoundPipe, IsMandatoryPipe, IsReadOnlyAndNotCollectionPipe, IsReadOnlyPipe, JudicialworkerService, Jurisdiction, JurisdictionService, LabelFieldComponent, LabelSubstitutorDirective, LabelSubstitutorModule, LanguageInterpreterDisplayPipe, LinkCaseReason, LinkCasesComponent, LinkCasesFromReasonValuePipe, LinkCasesReasonValuePipe, LinkDetails, LinkFromReason, LinkReason, LinkedCasesErrorMessages, LinkedCasesEventTriggers, LinkedCasesFromTableComponent, LinkedCasesPages, LinkedCasesResponse, LinkedCasesToTableComponent, LoadingModule, LoadingService, LoadingSpinnerComponent, LoadingSpinnerModule, MEDIA_VIEWER_LOCALSTORAGE_KEY, MULTIPLE_TASKS_FOUND, ManageCaseFlagsComponent, ManageCaseFlagsLabelDisplayPipe, MarkdownComponent, MarkdownComponentModule, MoneyGbpInputComponent, MultipageComponentStateService, MultipleTasksExistComponent, NavigationComponent, NavigationItemComponent, NavigationNotifierService, NavigationOrigin, NoLinkedCasesComponent, NoTasksAvailableComponent, NotificationBannerComponent, NotificationBannerHeaderClass, NotificationBannerType, OrderService, OrderSummary, OrganisationConverter, OrganisationService, PageValidationService, PaginationComponent, PaginationMetadata, PaginationModule, PaletteContext, PaletteModule, PaletteService, PaletteUtilsModule, Patterns, PaymentField, PhaseComponent, PipesModule, PlaceholderService, PrintUrlPipe, Profile, ProfileNotifier, ProfileService, QualifyingQuestionDetailComponent, QualifyingQuestionOptionsComponent, QualifyingQuestionService, QualifyingQuestionsErrorMessage, QueryAttachmentsReadComponent, QueryCaseDetailsHeaderComponent, QueryCheckYourAnswersComponent, QueryConfirmationComponent, QueryCreateContext, QueryDetailsComponent, QueryEventCompletionComponent, QueryItemResponseStatus, QueryListComponent, QueryListData, QueryListItem, QueryManagementService, QueryWriteAddDocumentsComponent, QueryWriteDateInputComponent, QueryWriteRaiseQueryComponent, QueryWriteRespondToQueryComponent, RaiseQueryErrorMessage, ReadCaseFlagFieldComponent, ReadCaseLinkFieldComponent, ReadCollectionFieldComponent, ReadComplexFieldCollectionTableComponent, ReadComplexFieldComponent, ReadComplexFieldRawComponent, ReadComplexFieldTableComponent, ReadCookieService, ReadDateFieldComponent, ReadDocumentFieldComponent, ReadDynamicListFieldComponent, ReadDynamicMultiSelectListFieldComponent, ReadDynamicRadioListFieldComponent, ReadEmailFieldComponent, ReadFieldsFilterPipe, ReadFixedListFieldComponent, ReadFixedRadioListFieldComponent, ReadJudicialUserFieldComponent, ReadLinkedCasesFieldComponent, ReadMoneyGbpFieldComponent, ReadMultiSelectListFieldComponent, ReadNumberFieldComponent, ReadOrderSummaryFieldComponent, ReadOrderSummaryRowComponent, ReadOrganisationFieldComponent, ReadOrganisationFieldRawComponent, ReadOrganisationFieldTableComponent, ReadPhoneUKFieldComponent, ReadQueryManagementFieldComponent, ReadTextAreaFieldComponent, ReadTextFieldComponent, ReadYesNoFieldComponent, RefdataCaseFlagType, RemoveDialogComponent, RequestOptionsBuilder, RespondToQueryErrorMessages, RetryUtil, RouterHelperService, RouterLinkComponent, SaveOrDiscardDialogComponent, SearchFiltersComponent, SearchFiltersModule, SearchFiltersWrapperComponent, SearchInput, SearchLanguageInterpreterComponent, SearchLanguageInterpreterErrorMessage, SearchLanguageInterpreterStep, SearchResultComponent, SearchResultModule, SearchResultView, SearchResultViewColumn, SearchResultViewItem, SearchResultViewItemComparatorFactory, SearchService, SelectFlagErrorMessage, SelectFlagLocationComponent, SelectFlagLocationErrorMessage, SelectFlagTypeComponent, SelectFlagTypeErrorMessage, SessionErrorPageComponent, SessionErrorRoute, SessionJsonErrorLogger, SessionStorageGuard, SessionStorageService, ShowCondition, SortOrder$1 as SortOrder, SortParameters, SortSearchResultPipe, StructuredLoggerService, TabComponent, TableColumnConfig, TableConfig, TabsComponent, TabsModule, TaskAssignedComponent, TaskCancelledComponent, TaskConflictComponent, TaskUnassignedComponent, Terms, TestRouteSnapshotBuilder, TranslatedMarkdownDirective, TranslatedMarkdownModule, UnLinkCasesComponent, UnsupportedFieldComponent, UpdateFlagAddTranslationErrorMessage, UpdateFlagAddTranslationFormComponent, UpdateFlagAddTranslationStep, UpdateFlagComponent, UpdateFlagErrorMessage, UpdateFlagStep, UpdateFlagTitleDisplayPipe, WaysToPayFieldComponent, WindowService, Wizard, WizardFactoryService, WizardPage, WizardPageField, WorkAllocationService, WorkbasketFiltersComponent, WorkbasketFiltersModule, WorkbasketInput, WorkbasketInputFilterService, WorkbasketInputModel, WriteAddressFieldComponent, WriteCaseFlagFieldComponent, WriteCaseLinkFieldComponent, WriteCollectionFieldComponent, WriteComplexFieldComponent, WriteDateContainerFieldComponent, WriteDateFieldComponent, WriteDocumentFieldComponent, WriteDynamicListFieldComponent, WriteDynamicMultiSelectListFieldComponent, WriteDynamicRadioListFieldComponent, WriteEmailFieldComponent, WriteFixedListFieldComponent, WriteFixedRadioListFieldComponent, WriteJudicialUserFieldComponent, WriteLinkedCasesFieldComponent, WriteMoneyGbpFieldComponent, WriteMultiSelectListFieldComponent, WriteNumberFieldComponent, WriteOrderSummaryFieldComponent, WriteOrganisationComplexFieldComponent, WriteOrganisationFieldComponent, WritePhoneUKFieldComponent, WriteTextAreaFieldComponent, WriteTextFieldComponent, WriteYesNoFieldComponent, YesNoService, aCaseField, caseMessagesMockData, createACL, createCaseEventTrigger, createCaseField, createComplexFieldOverride, createFieldType, createFixedListFieldType, createHiddenComplexFieldOverride, createMultiSelectListFieldType, createWizardPage, createWizardPageField, editorRouting, initDialog, newCaseField, safeJsonParse, textFieldType, viewerRouting };
|
|
41868
|
+
export { AMRoleSuffix, AbstractAppConfig, AbstractFieldReadComponent, AbstractFieldWriteComponent, AbstractFieldWriteJourneyComponent, AbstractJourneyComponent, Activity, ActivityBannerComponent, ActivityComponent, ActivityIconComponent, ActivityInfo, ActivityModule, ActivityPollingService, ActivityService, AddCommentsComponent, AddCommentsErrorMessage, AddCommentsStep, AddressModel, AddressOption, AddressesService, Alert, AlertComponent, AlertIconClassPipe, AlertMessageType, AlertModule, AlertService, AuthService, Banner, BannersService, BeforeYouStartComponent, BodyComponent, BrowserService, CCDCaseLinkType, COMPONENT_PORTAL_INJECTION_TOKEN, CallbackErrorsComponent, CallbackErrorsContext, CaseAccessUtils, CaseBasicAccessViewComponent, CaseChallengedAccessRequestComponent, CaseChallengedAccessSuccessComponent, CaseCreateComponent, CaseDetails, CaseEditComponent, CaseEditConfirmComponent, CaseEditDataModule, CaseEditDataService, CaseEditFormComponent, CaseEditPageComponent, CaseEditSubmitComponent, CaseEditWizardGuard, CaseEditorConfig, CaseEditorModule, CaseEvent, CaseEventCompletionComponent, CaseEventCompletionTaskCancelledComponent, CaseEventCompletionTaskReassignedComponent, CaseEventData, CaseEventTrigger, CaseEventTriggerComponent, CaseField, CaseFieldService, CaseFileViewFieldComponent, CaseFileViewFolderComponent, CaseFileViewFolderDocumentActionsComponent, CaseFileViewFolderSelectorComponent, CaseFileViewFolderSortComponent, CaseFileViewFolderToggleComponent, CaseFileViewOverlayMenuComponent, CaseFileViewService, CaseFlagCheckYourAnswersPageStep, CaseFlagDisplayContextParameter, CaseFlagErrorMessage, CaseFlagFieldState, CaseFlagFormFields, CaseFlagRefdataService, CaseFlagStatus, CaseFlagSummaryListComponent, CaseFlagSummaryListDisplayMode, CaseFlagTableComponent, CaseFlagWizardStepTitle, CaseFullAccessViewComponent, CaseHeaderComponent, CaseHeaderModule, CaseHistoryViewerFieldComponent, CaseLink, CaseLinkResponse, CaseListComponent, CaseListFiltersComponent, CaseListFiltersModule, CaseListModule, CaseNotifier, CasePaymentHistoryViewerFieldComponent, CasePrintDocument, CasePrinterComponent, CaseProgressComponent, CaseReferencePipe, CaseResolver, CaseSpecificAccessRequestComponent, CaseSpecificAccessSuccessComponent, CaseState, CaseTab, CaseTimelineComponent, CaseTimelineDisplayMode, CaseTimelineModule, CaseType, CaseTypeLite, CaseView, CaseViewComponent, CaseViewEvent, CaseViewTrigger, CaseViewerComponent, CaseViewerModule, CasesService, CaseworkerService, CcdCYAPageLabelFilterPipe, CcdCaseTitlePipe, CcdCollectionTableCaseFieldsFilterPipe, CcdPageFieldsPipe, CcdTabFieldsPipe, CheckYourAnswersComponent, CloseQueryComponent, ConditionalShowFormDirective, ConditionalShowModule, ConditionalShowRegistrarService, ConfirmFlagStatusComponent, ConfirmStatusErrorMessage, ConfirmStatusStep, Confirmation, ConvertHrefToRouterService, CreateCaseFiltersComponent, CreateCaseFiltersModule, CreateCaseFiltersSelection, DRAFT_PREFIX, DRAFT_QUERY_PARAM, DashPipe, DateInputComponent, DatePipe, DateTimeFormatUtils, DatetimePickerComponent, DefinitionsModule, DefinitionsService, DeleteOrCancelDialogComponent, DialogsModule, DisplayMode, Document, DocumentData, DocumentDialogComponent, DocumentLinks, DocumentManagementService, DocumentUrlPipe, Draft, DraftService, DynamicListPipe, DynamicRadioListPipe, ESQueryType, Embedded, EnumDisplayDescriptionPipe, ErrorMessageComponent, ErrorNotifierService, EventCaseField, EventCompletionReturnStates, EventCompletionStateMachineService, EventCompletionStates, EventLogComponent, EventLogDetailsComponent, EventLogTableComponent, EventMessageModule, EventStartComponent, EventStartModule, EventStartStateMachineService, EventStatusService, EventTriggerResolver, EventTriggerService, Fee, FeeValue, Field, FieldLabelPipe, FieldReadComponent, FieldReadLabelComponent, FieldType, FieldTypeSanitiser, FieldWriteComponent, FieldsFilterPipe, FieldsPurger, FieldsUtils, FirstErrorPipe, FixedListItem, FixedListPipe, FixedRadioListPipe, FlagFieldDisplayPipe, FocusElementDirective, FocusElementModule, FooterComponent, FormDocument, FormErrorService, FormValidatorsService, FormValueService, FormatTranslatorService, GreyBarService, HRef, HeaderBarComponent, HeadersModule, HttpError, HttpErrorService, HttpService, IsCompoundPipe, IsMandatoryPipe, IsReadOnlyAndNotCollectionPipe, IsReadOnlyPipe, JudicialworkerService, Jurisdiction, JurisdictionService, LabelFieldComponent, LabelSubstitutorDirective, LabelSubstitutorModule, LanguageInterpreterDisplayPipe, LinkCaseReason, LinkCasesComponent, LinkCasesFromReasonValuePipe, LinkCasesReasonValuePipe, LinkDetails, LinkFromReason, LinkReason, LinkedCasesErrorMessages, LinkedCasesEventTriggers, LinkedCasesFromTableComponent, LinkedCasesPages, LinkedCasesResponse, LinkedCasesToTableComponent, LoadingModule, LoadingService, LoadingSpinnerComponent, LoadingSpinnerModule, MEDIA_VIEWER_LOCALSTORAGE_KEY, MULTIPLE_TASKS_FOUND, ManageCaseFlagsComponent, ManageCaseFlagsLabelDisplayPipe, MarkdownComponent, MarkdownComponentModule, MoneyGbpInputComponent, MultipageComponentStateService, MultipleTasksExistComponent, NavigationComponent, NavigationItemComponent, NavigationNotifierService, NavigationOrigin, NoLinkedCasesComponent, NoTasksAvailableComponent, NotificationBannerComponent, NotificationBannerHeaderClass, NotificationBannerType, OrderService, OrderSummary, OrganisationConverter, OrganisationService, PageValidationService, PaginationComponent, PaginationMetadata, PaginationModule, PaletteContext, PaletteModule, PaletteService, PaletteUtilsModule, Patterns, PaymentField, PhaseComponent, PipesModule, PlaceholderService, PrintUrlPipe, Profile, ProfileNotifier, ProfileService, QualifyingQuestionDetailComponent, QualifyingQuestionOptionsComponent, QualifyingQuestionService, QualifyingQuestionsErrorMessage, QueryAttachmentsReadComponent, QueryCaseDetailsHeaderComponent, QueryCheckYourAnswersComponent, QueryConfirmationComponent, QueryCreateContext, QueryDetailsComponent, QueryEventCompletionComponent, QueryItemResponseStatus, QueryListComponent, QueryListData, QueryListItem, QueryManagementService, QueryWriteAddDocumentsComponent, QueryWriteDateInputComponent, QueryWriteRaiseQueryComponent, QueryWriteRespondToQueryComponent, RaiseQueryErrorMessage, ReadCaseFlagFieldComponent, ReadCaseLinkFieldComponent, ReadCollectionFieldComponent, ReadComplexFieldCollectionTableComponent, ReadComplexFieldComponent, ReadComplexFieldRawComponent, ReadComplexFieldTableComponent, ReadCookieService, ReadDateFieldComponent, ReadDocumentFieldComponent, ReadDynamicListFieldComponent, ReadDynamicMultiSelectListFieldComponent, ReadDynamicRadioListFieldComponent, ReadEmailFieldComponent, ReadFieldsFilterPipe, ReadFixedListFieldComponent, ReadFixedRadioListFieldComponent, ReadJudicialUserFieldComponent, ReadLinkedCasesFieldComponent, ReadMoneyGbpFieldComponent, ReadMultiSelectListFieldComponent, ReadNumberFieldComponent, ReadOrderSummaryFieldComponent, ReadOrderSummaryRowComponent, ReadOrganisationFieldComponent, ReadOrganisationFieldRawComponent, ReadOrganisationFieldTableComponent, ReadPhoneUKFieldComponent, ReadQueryManagementFieldComponent, ReadTextAreaFieldComponent, ReadTextFieldComponent, ReadYesNoFieldComponent, RefdataCaseFlagType, RemoveDialogComponent, RequestOptionsBuilder, RespondToQueryErrorMessages, RetryUtil, RoleCategory, RoleKeyword, RouterHelperService, RouterLinkComponent, SaveOrDiscardDialogComponent, SearchFiltersComponent, SearchFiltersModule, SearchFiltersWrapperComponent, SearchInput, SearchLanguageInterpreterComponent, SearchLanguageInterpreterErrorMessage, SearchLanguageInterpreterStep, SearchResultComponent, SearchResultModule, SearchResultView, SearchResultViewColumn, SearchResultViewItem, SearchResultViewItemComparatorFactory, SearchService, SelectFlagErrorMessage, SelectFlagLocationComponent, SelectFlagLocationErrorMessage, SelectFlagTypeComponent, SelectFlagTypeErrorMessage, SessionErrorPageComponent, SessionErrorRoute, SessionJsonErrorLogger, SessionStorageGuard, SessionStorageService, ShowCondition, SortOrder$1 as SortOrder, SortParameters, SortSearchResultPipe, StructuredLoggerService, TabComponent, TableColumnConfig, TableConfig, TabsComponent, TabsModule, TaskAssignedComponent, TaskCancelledComponent, TaskConflictComponent, TaskUnassignedComponent, Terms, TestRouteSnapshotBuilder, TranslatedMarkdownDirective, TranslatedMarkdownModule, UnLinkCasesComponent, UnsupportedFieldComponent, UpdateFlagAddTranslationErrorMessage, UpdateFlagAddTranslationFormComponent, UpdateFlagAddTranslationStep, UpdateFlagComponent, UpdateFlagErrorMessage, UpdateFlagStep, UpdateFlagTitleDisplayPipe, WaysToPayFieldComponent, WindowService, Wizard, WizardFactoryService, WizardPage, WizardPageField, WorkAllocationService, WorkbasketFiltersComponent, WorkbasketFiltersModule, WorkbasketInput, WorkbasketInputFilterService, WorkbasketInputModel, WriteAddressFieldComponent, WriteCaseFlagFieldComponent, WriteCaseLinkFieldComponent, WriteCollectionFieldComponent, WriteComplexFieldComponent, WriteDateContainerFieldComponent, WriteDateFieldComponent, WriteDocumentFieldComponent, WriteDynamicListFieldComponent, WriteDynamicMultiSelectListFieldComponent, WriteDynamicRadioListFieldComponent, WriteEmailFieldComponent, WriteFixedListFieldComponent, WriteFixedRadioListFieldComponent, WriteJudicialUserFieldComponent, WriteLinkedCasesFieldComponent, WriteMoneyGbpFieldComponent, WriteMultiSelectListFieldComponent, WriteNumberFieldComponent, WriteOrderSummaryFieldComponent, WriteOrganisationComplexFieldComponent, WriteOrganisationFieldComponent, WritePhoneUKFieldComponent, WriteTextAreaFieldComponent, WriteTextFieldComponent, WriteYesNoFieldComponent, YesNoService, aCaseField, caseMessagesMockData, createACL, createCaseEventTrigger, createCaseField, createComplexFieldOverride, createFieldType, createFixedListFieldType, createHiddenComplexFieldOverride, createMultiSelectListFieldType, createWizardPage, createWizardPageField, editorRouting, initDialog, newCaseField, safeJsonParse, textFieldType, viewerRouting };
|
|
41861
41869
|
//# sourceMappingURL=hmcts-ccd-case-ui-toolkit.mjs.map
|