@hmcts/ccd-case-ui-toolkit 7.4.28-hmcts-new-query-1 → 7.4.28-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 +2259 -2245
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/index.d.ts +29 -24
- package/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -14,9 +14,9 @@ import * as i1$2 from '@angular/router';
|
|
|
14
14
|
import { RouterModule, NavigationStart, NavigationEnd } from '@angular/router';
|
|
15
15
|
import * as i4 from '@angular/forms';
|
|
16
16
|
import { NG_VALUE_ACCESSOR, NG_VALIDATORS, FormArray, FormGroup, FormControl, Validators, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
17
|
-
import moment from 'moment';
|
|
18
17
|
import * as _ from 'underscore';
|
|
19
18
|
import 'reflect-metadata';
|
|
19
|
+
import moment from 'moment';
|
|
20
20
|
import { StateMachine } from '@edium/fsm';
|
|
21
21
|
import * as i1$3 from '@angular/material/dialog';
|
|
22
22
|
import { MatDialogConfig, MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
|
|
@@ -1959,2372 +1959,2470 @@ class SessionStorageGuard {
|
|
|
1959
1959
|
args: [SessionJsonErrorLogger]
|
|
1960
1960
|
}] }], null); })();
|
|
1961
1961
|
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1962
|
+
// tslint:disable:variable-name
|
|
1963
|
+
class AddressModel {
|
|
1964
|
+
AddressLine1 = '';
|
|
1965
|
+
AddressLine2 = '';
|
|
1966
|
+
AddressLine3 = '';
|
|
1967
|
+
PostTown = '';
|
|
1968
|
+
County = '';
|
|
1969
|
+
PostCode = '';
|
|
1970
|
+
Country = '';
|
|
1968
1971
|
}
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|| userDetails.roles.some((role) => role.toLowerCase().includes(JUDGE)));
|
|
1972
|
+
|
|
1973
|
+
class Alert {
|
|
1974
|
+
level;
|
|
1975
|
+
message;
|
|
1974
1976
|
}
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1977
|
+
|
|
1978
|
+
// tslint:disable:variable-name
|
|
1979
|
+
class CaseDetails {
|
|
1980
|
+
id;
|
|
1981
|
+
jurisdiction;
|
|
1982
|
+
case_type_id;
|
|
1983
|
+
state;
|
|
1984
|
+
created_date;
|
|
1985
|
+
last_modified;
|
|
1986
|
+
locked_by_user_id;
|
|
1987
|
+
security_level;
|
|
1988
|
+
case_data;
|
|
1989
|
+
}
|
|
1990
|
+
|
|
1991
|
+
// tslint:disable:variable-name
|
|
1992
|
+
class CaseEventData {
|
|
1993
|
+
event;
|
|
1994
|
+
data;
|
|
1995
|
+
event_data; // full event data
|
|
1996
|
+
event_token;
|
|
1997
|
+
ignore_warning;
|
|
1998
|
+
draft_id;
|
|
1999
|
+
case_reference;
|
|
2000
|
+
}
|
|
2001
|
+
|
|
2002
|
+
class WizardPageField {
|
|
2003
|
+
case_field_id;
|
|
2004
|
+
order;
|
|
2005
|
+
page_column_no;
|
|
2006
|
+
complex_field_overrides;
|
|
2007
|
+
}
|
|
2008
|
+
|
|
2009
|
+
class FixedListItem {
|
|
2010
|
+
code;
|
|
2011
|
+
label;
|
|
2012
|
+
order;
|
|
1979
2013
|
}
|
|
1980
2014
|
|
|
1981
2015
|
// @dynamic
|
|
1982
|
-
class
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
this.appConfig = appConfig;
|
|
1992
|
-
this.sessionStorageService = sessionStorageService;
|
|
1993
|
-
}
|
|
1994
|
-
get isEnabled() {
|
|
1995
|
-
return this.activityUrl() && this.userAuthorised;
|
|
1996
|
-
}
|
|
1997
|
-
static DUMMY_CASE_REFERENCE = '0';
|
|
1998
|
-
userAuthorised = undefined;
|
|
1999
|
-
static handleHttpError(response) {
|
|
2000
|
-
const error = HttpErrorService.convertToHttpError(response);
|
|
2001
|
-
if (response?.status !== error.status) {
|
|
2002
|
-
error.status = response.status;
|
|
2003
|
-
}
|
|
2004
|
-
return error;
|
|
2005
|
-
}
|
|
2006
|
-
getOptions() {
|
|
2007
|
-
const userDetails = safeJsonParse(this.sessionStorageService.getItem(USER_DETAILS));
|
|
2008
|
-
let headers = new HttpHeaders().set('Content-Type', 'application/json');
|
|
2009
|
-
if (userDetails?.token) {
|
|
2010
|
-
headers = headers.set('Authorization', userDetails.token);
|
|
2011
|
-
}
|
|
2012
|
-
return {
|
|
2013
|
-
headers,
|
|
2014
|
-
withCredentials: true,
|
|
2015
|
-
observe: 'body',
|
|
2016
|
-
};
|
|
2017
|
-
}
|
|
2018
|
-
getActivities(...caseId) {
|
|
2019
|
-
try {
|
|
2020
|
-
const options = this.getOptions();
|
|
2021
|
-
const url = `${this.activityUrl()}/cases/${caseId.join(',')}/activity`;
|
|
2022
|
-
return this.http
|
|
2023
|
-
.get(url, options, false, ActivityService.handleHttpError)
|
|
2024
|
-
.pipe(map(response => response));
|
|
2025
|
-
}
|
|
2026
|
-
catch (error) {
|
|
2027
|
-
this.logUserMayNotBeAuthenticated(error);
|
|
2028
|
-
}
|
|
2029
|
-
}
|
|
2030
|
-
postActivity(caseId, activity) {
|
|
2031
|
-
try {
|
|
2032
|
-
const options = this.getOptions();
|
|
2033
|
-
const url = `${this.activityUrl()}/cases/${caseId}/activity`;
|
|
2034
|
-
const body = { activity };
|
|
2035
|
-
return this.http
|
|
2036
|
-
.post(url, body, options, false)
|
|
2037
|
-
.pipe(map(response => response));
|
|
2038
|
-
}
|
|
2039
|
-
catch (error) {
|
|
2040
|
-
this.logUserMayNotBeAuthenticated(error);
|
|
2041
|
-
}
|
|
2042
|
-
}
|
|
2043
|
-
verifyUserIsAuthorized() {
|
|
2044
|
-
if (this.sessionStorageService.getItem(USER_DETAILS) && this.activityUrl() && this.userAuthorised === undefined) {
|
|
2045
|
-
this.getActivities(ActivityService.DUMMY_CASE_REFERENCE).subscribe(() => this.userAuthorised = true, error => {
|
|
2046
|
-
this.userAuthorised = [401, 403].indexOf(error.status) <= -1;
|
|
2047
|
-
});
|
|
2048
|
-
}
|
|
2049
|
-
}
|
|
2050
|
-
activityUrl() {
|
|
2051
|
-
return this.appConfig.getActivityUrl();
|
|
2052
|
-
}
|
|
2053
|
-
logUserMayNotBeAuthenticated(error) {
|
|
2054
|
-
this.logger.error('User may not be authenticated. Activity request was not sent.', { error });
|
|
2055
|
-
}
|
|
2056
|
-
static ɵfac = function ActivityService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ActivityService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig), i0.ɵɵinject(SessionStorageService)); };
|
|
2057
|
-
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ActivityService, factory: ActivityService.ɵfac });
|
|
2016
|
+
class FieldType {
|
|
2017
|
+
id;
|
|
2018
|
+
type;
|
|
2019
|
+
min;
|
|
2020
|
+
max;
|
|
2021
|
+
regular_expression;
|
|
2022
|
+
fixed_list_items;
|
|
2023
|
+
complex_fields;
|
|
2024
|
+
collection_field_type;
|
|
2058
2025
|
}
|
|
2059
|
-
(
|
|
2060
|
-
|
|
2061
|
-
|
|
2026
|
+
__decorate([
|
|
2027
|
+
Type(() => FixedListItem),
|
|
2028
|
+
__metadata("design:type", Array)
|
|
2029
|
+
], FieldType.prototype, "fixed_list_items", void 0);
|
|
2030
|
+
__decorate([
|
|
2031
|
+
Type(() => CaseField),
|
|
2032
|
+
__metadata("design:type", Array)
|
|
2033
|
+
], FieldType.prototype, "complex_fields", void 0);
|
|
2034
|
+
__decorate([
|
|
2035
|
+
Type(() => FieldType),
|
|
2036
|
+
__metadata("design:type", FieldType)
|
|
2037
|
+
], FieldType.prototype, "collection_field_type", void 0);
|
|
2062
2038
|
|
|
2063
2039
|
// @dynamic
|
|
2064
|
-
class
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2040
|
+
class CaseField {
|
|
2041
|
+
static logger = new StructuredLoggerService();
|
|
2042
|
+
id;
|
|
2043
|
+
hidden;
|
|
2044
|
+
hiddenCannotChange;
|
|
2045
|
+
label;
|
|
2046
|
+
originalLabel;
|
|
2047
|
+
noCacheLabel;
|
|
2048
|
+
order;
|
|
2049
|
+
parent;
|
|
2050
|
+
field_type;
|
|
2051
|
+
hint_text;
|
|
2052
|
+
security_label;
|
|
2053
|
+
display_context;
|
|
2054
|
+
display_context_parameter;
|
|
2055
|
+
month_format;
|
|
2056
|
+
show_condition;
|
|
2057
|
+
show_summary_change_option;
|
|
2058
|
+
show_summary_content_option;
|
|
2059
|
+
acls;
|
|
2060
|
+
metadata;
|
|
2061
|
+
formatted_value;
|
|
2062
|
+
retain_hidden_value;
|
|
2063
|
+
wizardProps;
|
|
2064
|
+
_value;
|
|
2065
|
+
_list_items = [];
|
|
2066
|
+
isTranslatedFlag = false;
|
|
2067
|
+
get value() {
|
|
2068
|
+
if (this.field_type && (this.field_type.type === 'DynamicList' || this.field_type.type === 'DynamicRadioList')) {
|
|
2069
|
+
return this._value && this._value.value ? this._value.value.code : this._value;
|
|
2092
2070
|
}
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
subject.subscribe(done);
|
|
2071
|
+
else if (this.field_type && this.field_type.type === 'DynamicMultiSelectList') {
|
|
2072
|
+
return this._value && this._value.value ? this._value.value : this._value;
|
|
2096
2073
|
}
|
|
2097
2074
|
else {
|
|
2098
|
-
|
|
2099
|
-
const wasEmpty = this.pendingRequests.size === 0;
|
|
2100
|
-
subject = new Subject();
|
|
2101
|
-
subject.subscribe(done);
|
|
2102
|
-
this.addPendingRequest(caseId, subject);
|
|
2103
|
-
if (wasEmpty) {
|
|
2104
|
-
this.ngZone.runOutsideAngular(() => {
|
|
2105
|
-
this.currentTimeoutHandle = setTimeout(() => this.ngZone.run(() => {
|
|
2106
|
-
this.flushRequests();
|
|
2107
|
-
}), this.batchCollectionDelayMs);
|
|
2108
|
-
});
|
|
2109
|
-
}
|
|
2110
|
-
}
|
|
2111
|
-
if (this.pendingRequests.size >= this.maxRequestsPerBatch) {
|
|
2112
|
-
this.flushRequests();
|
|
2075
|
+
return this._value;
|
|
2113
2076
|
}
|
|
2114
|
-
return subject;
|
|
2115
2077
|
}
|
|
2116
|
-
|
|
2117
|
-
if (this.
|
|
2118
|
-
|
|
2078
|
+
set value(value) {
|
|
2079
|
+
if (this.isDynamic()) {
|
|
2080
|
+
if (value && value instanceof Object && value.list_items) {
|
|
2081
|
+
this._list_items = value.list_items;
|
|
2082
|
+
}
|
|
2083
|
+
else if (!this._list_items || this._list_items.length === 0) {
|
|
2084
|
+
// Extract the list items from the current value if that's the only place they exist.
|
|
2085
|
+
this._list_items = this.list_items;
|
|
2086
|
+
if (!value || !value.value) {
|
|
2087
|
+
value = null;
|
|
2088
|
+
}
|
|
2089
|
+
}
|
|
2119
2090
|
}
|
|
2091
|
+
this._value = value;
|
|
2120
2092
|
}
|
|
2121
|
-
|
|
2122
|
-
if (this.
|
|
2123
|
-
|
|
2124
|
-
this.currentTimeoutHandle = undefined;
|
|
2093
|
+
get list_items() {
|
|
2094
|
+
if (this.isDynamic()) {
|
|
2095
|
+
return this._value && this._value.list_items ? this._value.list_items : this._list_items;
|
|
2125
2096
|
}
|
|
2126
|
-
|
|
2127
|
-
return;
|
|
2097
|
+
else {
|
|
2098
|
+
return this.field_type.fixed_list_items;
|
|
2128
2099
|
}
|
|
2129
|
-
const requests = new Map(this.pendingRequests);
|
|
2130
|
-
this.pendingRequests.clear();
|
|
2131
|
-
this.performBatchRequest(requests);
|
|
2132
2100
|
}
|
|
2133
|
-
|
|
2134
|
-
if (!this.
|
|
2135
|
-
|
|
2101
|
+
set list_items(items) {
|
|
2102
|
+
if ((items && !this._list_items) || (items?.length > this._list_items?.length)) {
|
|
2103
|
+
this._list_items = items;
|
|
2136
2104
|
}
|
|
2137
|
-
return this.polling(this.activityService.getActivities(...caseIds), this.pollConfig);
|
|
2138
|
-
}
|
|
2139
|
-
postViewActivity(caseId) {
|
|
2140
|
-
return this.postActivity(caseId, ActivityService.ACTIVITY_VIEW);
|
|
2141
|
-
}
|
|
2142
|
-
postEditActivity(caseId) {
|
|
2143
|
-
return this.postActivity(caseId, ActivityService.ACTIVITY_EDIT);
|
|
2144
|
-
}
|
|
2145
|
-
performBatchRequest(requests) {
|
|
2146
|
-
const caseIds = Array.from(requests.keys()).join();
|
|
2147
|
-
this.ngZone.runOutsideAngular(() => {
|
|
2148
|
-
// run polling outside angular zone so it does not trigger change detection
|
|
2149
|
-
this.pollActivitiesSubscription = this.pollActivities(caseIds).subscribe({
|
|
2150
|
-
// process activity inside zone so it triggers change detection for activity.component.ts
|
|
2151
|
-
next: (activities) => this.ngZone.run(() => {
|
|
2152
|
-
activities.forEach((activity) => {
|
|
2153
|
-
// Ignore activities returned for cases outside this local batch.
|
|
2154
|
-
requests.get(activity.caseId)?.next(activity);
|
|
2155
|
-
});
|
|
2156
|
-
}),
|
|
2157
|
-
error: (err) => this.ngZone.run(() => {
|
|
2158
|
-
this.logger.error('Error while polling activities.', { error: err });
|
|
2159
|
-
Array.from(requests.values()).forEach((subject) => subject.error(err));
|
|
2160
|
-
})
|
|
2161
|
-
});
|
|
2162
|
-
});
|
|
2163
2105
|
}
|
|
2164
|
-
|
|
2165
|
-
if (
|
|
2166
|
-
return
|
|
2106
|
+
get dateTimeEntryFormat() {
|
|
2107
|
+
if (this.isComplexDisplay()) {
|
|
2108
|
+
return null;
|
|
2167
2109
|
}
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
return this.polling(this.activityService.postActivity(caseId, activityType), pollingConfig);
|
|
2173
|
-
}
|
|
2174
|
-
addPendingRequest(caseId, subject) {
|
|
2175
|
-
this.pendingRequests.set(caseId, subject);
|
|
2176
|
-
// Components complete their returned Subject on destroy; remove it so a later same-case subscription gets a fresh Subject.
|
|
2177
|
-
subject.subscribe({
|
|
2178
|
-
complete: () => this.removePendingRequest(caseId, subject),
|
|
2179
|
-
error: () => this.removePendingRequest(caseId, subject)
|
|
2180
|
-
});
|
|
2110
|
+
if (this.display_context_parameter) {
|
|
2111
|
+
return this.extractBracketValue(this.display_context_parameter, '#DATETIMEENTRY');
|
|
2112
|
+
}
|
|
2113
|
+
return null;
|
|
2181
2114
|
}
|
|
2182
|
-
|
|
2183
|
-
if (this.
|
|
2184
|
-
return;
|
|
2115
|
+
get dateTimeDisplayFormat() {
|
|
2116
|
+
if (this.isComplexEntry()) {
|
|
2117
|
+
return null;
|
|
2185
2118
|
}
|
|
2186
|
-
this.
|
|
2187
|
-
|
|
2188
|
-
clearTimeout(this.currentTimeoutHandle);
|
|
2189
|
-
this.currentTimeoutHandle = undefined;
|
|
2119
|
+
if (this.display_context_parameter) {
|
|
2120
|
+
return this.extractBracketValue(this.display_context_parameter, '#DATETIMEDISPLAY');
|
|
2190
2121
|
}
|
|
2122
|
+
return null;
|
|
2191
2123
|
}
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
interval: options.interval,
|
|
2195
|
-
attempts: options.attempts ?? 9,
|
|
2196
|
-
exponentialUnit: options.exponentialUnit ?? 1000
|
|
2197
|
-
};
|
|
2198
|
-
return concat(request$, defer(() => timer(pollingOptions.interval).pipe(switchMap(() => request$))).pipe(repeat())).pipe(
|
|
2199
|
-
// Preserve consecutive-failure retry behaviour using the current RxJS retry config.
|
|
2200
|
-
retry({
|
|
2201
|
-
count: pollingOptions.attempts,
|
|
2202
|
-
delay: (_error, retryCount) => timer(this.getExponentialRetryDelay(retryCount, pollingOptions.exponentialUnit)),
|
|
2203
|
-
resetOnSuccess: true
|
|
2204
|
-
}));
|
|
2124
|
+
isComplexDisplay() {
|
|
2125
|
+
return (this.isComplex() || this.isCollection()) && this.isReadonly();
|
|
2205
2126
|
}
|
|
2206
|
-
|
|
2207
|
-
return
|
|
2127
|
+
isComplexEntry() {
|
|
2128
|
+
return (this.isComplex() || this.isCollection()) && (this.isOptional() || this.isMandatory());
|
|
2208
2129
|
}
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ActivityPollingService, [{
|
|
2213
|
-
type: Injectable
|
|
2214
|
-
}], () => [{ type: ActivityService }, { type: i0.NgZone }, { type: AbstractAppConfig }], null); })();
|
|
2215
|
-
|
|
2216
|
-
function ActivityComponent_div_0_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
2217
|
-
i0.ɵɵelementStart(0, "div");
|
|
2218
|
-
i0.ɵɵelement(1, "ccd-activity-icon", 5);
|
|
2219
|
-
i0.ɵɵpipe(2, "rpxTranslate");
|
|
2220
|
-
i0.ɵɵelementEnd();
|
|
2221
|
-
} if (rf & 2) {
|
|
2222
|
-
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
2223
|
-
i0.ɵɵclassProp("activityEditorsAndViewersIcons", ctx_r0.viewersPresent())("activityEditorsIcon", !ctx_r0.viewersPresent());
|
|
2224
|
-
i0.ɵɵadvance();
|
|
2225
|
-
i0.ɵɵproperty("description", i0.ɵɵpipeBind1(2, 5, ctx_r0.editorsText));
|
|
2226
|
-
} }
|
|
2227
|
-
function ActivityComponent_div_0_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
2228
|
-
i0.ɵɵelementStart(0, "div", 6);
|
|
2229
|
-
i0.ɵɵelement(1, "ccd-activity-icon", 7);
|
|
2230
|
-
i0.ɵɵpipe(2, "rpxTranslate");
|
|
2231
|
-
i0.ɵɵelementEnd();
|
|
2232
|
-
} if (rf & 2) {
|
|
2233
|
-
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
2234
|
-
i0.ɵɵadvance();
|
|
2235
|
-
i0.ɵɵproperty("description", i0.ɵɵpipeBind1(2, 1, ctx_r0.viewersText));
|
|
2236
|
-
} }
|
|
2237
|
-
function ActivityComponent_div_0_div_3_Template(rf, ctx) { if (rf & 1) {
|
|
2238
|
-
i0.ɵɵelementStart(0, "div");
|
|
2239
|
-
i0.ɵɵelement(1, "ccd-activity-banner", 8);
|
|
2240
|
-
i0.ɵɵpipe(2, "rpxTranslate");
|
|
2241
|
-
i0.ɵɵelementEnd();
|
|
2242
|
-
} if (rf & 2) {
|
|
2243
|
-
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
2244
|
-
i0.ɵɵadvance();
|
|
2245
|
-
i0.ɵɵproperty("description", i0.ɵɵpipeBind1(2, 1, ctx_r0.editorsText));
|
|
2246
|
-
} }
|
|
2247
|
-
function ActivityComponent_div_0_div_4_Template(rf, ctx) { if (rf & 1) {
|
|
2248
|
-
i0.ɵɵelementStart(0, "div");
|
|
2249
|
-
i0.ɵɵelement(1, "ccd-activity-banner", 9);
|
|
2250
|
-
i0.ɵɵpipe(2, "rpxTranslate");
|
|
2251
|
-
i0.ɵɵelementEnd();
|
|
2252
|
-
} if (rf & 2) {
|
|
2253
|
-
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
2254
|
-
i0.ɵɵadvance();
|
|
2255
|
-
i0.ɵɵproperty("description", i0.ɵɵpipeBind1(2, 1, ctx_r0.viewersText));
|
|
2256
|
-
} }
|
|
2257
|
-
function ActivityComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
2258
|
-
i0.ɵɵelementStart(0, "div", 1);
|
|
2259
|
-
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);
|
|
2260
|
-
i0.ɵɵelementEnd();
|
|
2261
|
-
} if (rf & 2) {
|
|
2262
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
2263
|
-
i0.ɵɵadvance();
|
|
2264
|
-
i0.ɵɵproperty("ngIf", ctx_r0.displayMode === ctx_r0.dspMode.ICON && ctx_r0.editorsPresent());
|
|
2265
|
-
i0.ɵɵadvance();
|
|
2266
|
-
i0.ɵɵproperty("ngIf", ctx_r0.displayMode === ctx_r0.dspMode.ICON && ctx_r0.viewersPresent());
|
|
2267
|
-
i0.ɵɵadvance();
|
|
2268
|
-
i0.ɵɵproperty("ngIf", ctx_r0.displayMode === ctx_r0.dspMode.BANNER && ctx_r0.editorsPresent());
|
|
2269
|
-
i0.ɵɵadvance();
|
|
2270
|
-
i0.ɵɵproperty("ngIf", ctx_r0.displayMode === ctx_r0.dspMode.BANNER && ctx_r0.viewersPresent());
|
|
2271
|
-
} }
|
|
2272
|
-
class ActivityComponent {
|
|
2273
|
-
activityPollingService;
|
|
2274
|
-
activity;
|
|
2275
|
-
dspMode = DisplayMode;
|
|
2276
|
-
viewersText;
|
|
2277
|
-
editorsText;
|
|
2278
|
-
subscription;
|
|
2279
|
-
caseId;
|
|
2280
|
-
displayMode;
|
|
2281
|
-
VIEWERS_PREFIX = '';
|
|
2282
|
-
VIEWERS_SUFFIX = 'viewing this case';
|
|
2283
|
-
EDITORS_PREFIX = 'This case is being updated by ';
|
|
2284
|
-
EDITORS_SUFFIX = '';
|
|
2285
|
-
constructor(activityPollingService) {
|
|
2286
|
-
this.activityPollingService = activityPollingService;
|
|
2130
|
+
isReadonly() {
|
|
2131
|
+
return !_.isEmpty(this.display_context)
|
|
2132
|
+
&& this.display_context.toUpperCase() === 'READONLY';
|
|
2287
2133
|
}
|
|
2288
|
-
|
|
2289
|
-
this.
|
|
2290
|
-
|
|
2291
|
-
this.activity.editors = [];
|
|
2292
|
-
this.activity.unknownEditors = 0;
|
|
2293
|
-
this.activity.viewers = [];
|
|
2294
|
-
this.activity.unknownViewers = 0;
|
|
2295
|
-
this.viewersText = '';
|
|
2296
|
-
this.editorsText = '';
|
|
2297
|
-
this.subscription = this.activityPollingService.subscribeToActivity(this.caseId, newActivity => this.onActivityChange(newActivity));
|
|
2134
|
+
isOptional() {
|
|
2135
|
+
return !_.isEmpty(this.display_context)
|
|
2136
|
+
&& this.display_context.toUpperCase() === 'OPTIONAL';
|
|
2298
2137
|
}
|
|
2299
|
-
|
|
2300
|
-
this.
|
|
2301
|
-
|
|
2302
|
-
this.editorsText = this.generateDescription(this.EDITORS_PREFIX, this.EDITORS_SUFFIX, this.activity.editors, this.activity.unknownEditors);
|
|
2138
|
+
isMandatory() {
|
|
2139
|
+
return !_.isEmpty(this.display_context)
|
|
2140
|
+
&& this.display_context.toUpperCase() === 'MANDATORY';
|
|
2303
2141
|
}
|
|
2304
|
-
|
|
2305
|
-
return this.
|
|
2142
|
+
isCollection() {
|
|
2143
|
+
return this.field_type && this.field_type.type === 'Collection';
|
|
2306
2144
|
}
|
|
2307
|
-
|
|
2308
|
-
return this.
|
|
2145
|
+
isComplex() {
|
|
2146
|
+
return this.field_type && this.field_type.type === 'Complex';
|
|
2309
2147
|
}
|
|
2310
|
-
|
|
2311
|
-
|
|
2148
|
+
isDynamic() {
|
|
2149
|
+
const dynamicFieldTypes = ['DynamicList', 'DynamicRadioList', 'DynamicMultiSelectList'];
|
|
2150
|
+
if (!this.field_type) {
|
|
2151
|
+
return false;
|
|
2152
|
+
}
|
|
2153
|
+
return dynamicFieldTypes.some(t => t === this.field_type.type);
|
|
2312
2154
|
}
|
|
2313
|
-
|
|
2314
|
-
return
|
|
2155
|
+
isCaseLink() {
|
|
2156
|
+
return this.isComplex()
|
|
2157
|
+
&& this.field_type.id === 'CaseLink'
|
|
2158
|
+
&& this.field_type.complex_fields.some(cf => cf.id === 'CaseReference');
|
|
2315
2159
|
}
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2160
|
+
extractBracketValue(fmt, paramName, leftBracket = '(', rightBracket = ')') {
|
|
2161
|
+
fmt = fmt.split(',')
|
|
2162
|
+
.find(a => a.trim().startsWith(paramName));
|
|
2163
|
+
if (fmt) {
|
|
2164
|
+
const s = fmt.indexOf(leftBracket) + 1;
|
|
2165
|
+
const e = fmt.indexOf(rightBracket, s);
|
|
2166
|
+
if (e > s && s >= 0) {
|
|
2167
|
+
return fmt.substr(s, (e - s));
|
|
2168
|
+
}
|
|
2319
2169
|
}
|
|
2320
|
-
|
|
2170
|
+
return null;
|
|
2321
2171
|
}
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
if (
|
|
2326
|
-
|
|
2327
|
-
|
|
2172
|
+
// Ascend the hierarchy to get the full path of the field
|
|
2173
|
+
getHierachicalId(curr) {
|
|
2174
|
+
const prefix = curr ? curr + "_" : "";
|
|
2175
|
+
if (prefix.length < 1024) {
|
|
2176
|
+
if (this.parent) {
|
|
2177
|
+
return this.parent.getHierachicalId(prefix + this.id);
|
|
2178
|
+
}
|
|
2179
|
+
else {
|
|
2180
|
+
return prefix + this.id;
|
|
2181
|
+
}
|
|
2328
2182
|
}
|
|
2329
2183
|
else {
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
if (suffix.length > 0) {
|
|
2333
|
-
if (namesArray.length + unknownCount > 1) {
|
|
2334
|
-
resultText += ` are ${suffix}`;
|
|
2335
|
-
}
|
|
2336
|
-
else {
|
|
2337
|
-
resultText += ` is ${suffix}`;
|
|
2338
|
-
}
|
|
2184
|
+
CaseField.logger.error('Path too long, possible circular reference in case field hierarchy.');
|
|
2185
|
+
return this.id;
|
|
2339
2186
|
}
|
|
2340
|
-
return resultText;
|
|
2341
2187
|
}
|
|
2342
|
-
|
|
2343
|
-
|
|
2188
|
+
set isTranslated(val) {
|
|
2189
|
+
this.isTranslatedFlag = val;
|
|
2190
|
+
}
|
|
2191
|
+
get isTranslated() {
|
|
2192
|
+
return this.isTranslatedFlag;
|
|
2344
2193
|
}
|
|
2345
|
-
static ɵfac = function ActivityComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ActivityComponent)(i0.ɵɵdirectiveInject(ActivityPollingService)); };
|
|
2346
|
-
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) {
|
|
2347
|
-
i0.ɵɵtemplate(0, ActivityComponent_div_0_Template, 5, 4, "div", 0);
|
|
2348
|
-
} if (rf & 2) {
|
|
2349
|
-
i0.ɵɵproperty("ngIf", ctx.isActivityEnabled());
|
|
2350
|
-
} }, 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}"] });
|
|
2351
|
-
}
|
|
2352
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ActivityComponent, [{
|
|
2353
|
-
type: Component,
|
|
2354
|
-
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"] }]
|
|
2355
|
-
}], () => [{ type: ActivityPollingService }], { caseId: [{
|
|
2356
|
-
type: Input
|
|
2357
|
-
}], displayMode: [{
|
|
2358
|
-
type: Input
|
|
2359
|
-
}] }); })();
|
|
2360
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ActivityComponent, { className: "ActivityComponent", filePath: "lib/shared/components/activity/activity.component.ts", lineNumber: 12 }); })();
|
|
2361
|
-
|
|
2362
|
-
class ActivityModule {
|
|
2363
|
-
static ɵfac = function ActivityModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ActivityModule)(); };
|
|
2364
|
-
static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: ActivityModule });
|
|
2365
|
-
static ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ providers: [
|
|
2366
|
-
ActivityService,
|
|
2367
|
-
ActivityPollingService,
|
|
2368
|
-
SessionStorageService,
|
|
2369
|
-
], imports: [CommonModule,
|
|
2370
|
-
RouterModule,
|
|
2371
|
-
RpxTranslationModule.forChild()] });
|
|
2372
2194
|
}
|
|
2373
|
-
(
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
(
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2195
|
+
__decorate([
|
|
2196
|
+
Exclude(),
|
|
2197
|
+
__metadata("design:type", CaseField)
|
|
2198
|
+
], CaseField.prototype, "parent", void 0);
|
|
2199
|
+
__decorate([
|
|
2200
|
+
Type(() => FieldType),
|
|
2201
|
+
__metadata("design:type", FieldType)
|
|
2202
|
+
], CaseField.prototype, "field_type", void 0);
|
|
2203
|
+
__decorate([
|
|
2204
|
+
Type(() => WizardPageField),
|
|
2205
|
+
__metadata("design:type", WizardPageField)
|
|
2206
|
+
], CaseField.prototype, "wizardProps", void 0);
|
|
2207
|
+
__decorate([
|
|
2208
|
+
Expose(),
|
|
2209
|
+
__metadata("design:type", Object),
|
|
2210
|
+
__metadata("design:paramtypes", [Object])
|
|
2211
|
+
], CaseField.prototype, "value", null);
|
|
2212
|
+
__decorate([
|
|
2213
|
+
Expose(),
|
|
2214
|
+
__metadata("design:type", Object),
|
|
2215
|
+
__metadata("design:paramtypes", [Object])
|
|
2216
|
+
], CaseField.prototype, "list_items", null);
|
|
2217
|
+
__decorate([
|
|
2218
|
+
Expose(),
|
|
2219
|
+
__metadata("design:type", String),
|
|
2220
|
+
__metadata("design:paramtypes", [])
|
|
2221
|
+
], CaseField.prototype, "dateTimeEntryFormat", null);
|
|
2222
|
+
__decorate([
|
|
2223
|
+
Expose(),
|
|
2224
|
+
__metadata("design:type", String),
|
|
2225
|
+
__metadata("design:paramtypes", [])
|
|
2226
|
+
], CaseField.prototype, "dateTimeDisplayFormat", null);
|
|
2227
|
+
__decorate([
|
|
2228
|
+
Expose(),
|
|
2229
|
+
__metadata("design:type", Function),
|
|
2230
|
+
__metadata("design:paramtypes", []),
|
|
2231
|
+
__metadata("design:returntype", void 0)
|
|
2232
|
+
], CaseField.prototype, "isComplexDisplay", null);
|
|
2233
|
+
__decorate([
|
|
2234
|
+
Expose(),
|
|
2235
|
+
__metadata("design:type", Function),
|
|
2236
|
+
__metadata("design:paramtypes", []),
|
|
2237
|
+
__metadata("design:returntype", void 0)
|
|
2238
|
+
], CaseField.prototype, "isComplexEntry", null);
|
|
2239
|
+
__decorate([
|
|
2240
|
+
Expose(),
|
|
2241
|
+
__metadata("design:type", Function),
|
|
2242
|
+
__metadata("design:paramtypes", []),
|
|
2243
|
+
__metadata("design:returntype", void 0)
|
|
2244
|
+
], CaseField.prototype, "isReadonly", null);
|
|
2245
|
+
__decorate([
|
|
2246
|
+
Expose(),
|
|
2247
|
+
__metadata("design:type", Function),
|
|
2248
|
+
__metadata("design:paramtypes", []),
|
|
2249
|
+
__metadata("design:returntype", void 0)
|
|
2250
|
+
], CaseField.prototype, "isOptional", null);
|
|
2251
|
+
__decorate([
|
|
2252
|
+
Expose(),
|
|
2253
|
+
__metadata("design:type", Function),
|
|
2254
|
+
__metadata("design:paramtypes", []),
|
|
2255
|
+
__metadata("design:returntype", void 0)
|
|
2256
|
+
], CaseField.prototype, "isMandatory", null);
|
|
2257
|
+
__decorate([
|
|
2258
|
+
Expose(),
|
|
2259
|
+
__metadata("design:type", Function),
|
|
2260
|
+
__metadata("design:paramtypes", []),
|
|
2261
|
+
__metadata("design:returntype", Boolean)
|
|
2262
|
+
], CaseField.prototype, "isCollection", null);
|
|
2263
|
+
__decorate([
|
|
2264
|
+
Expose(),
|
|
2265
|
+
__metadata("design:type", Function),
|
|
2266
|
+
__metadata("design:paramtypes", []),
|
|
2267
|
+
__metadata("design:returntype", Boolean)
|
|
2268
|
+
], CaseField.prototype, "isComplex", null);
|
|
2269
|
+
__decorate([
|
|
2270
|
+
Expose(),
|
|
2271
|
+
__metadata("design:type", Function),
|
|
2272
|
+
__metadata("design:paramtypes", []),
|
|
2273
|
+
__metadata("design:returntype", Boolean)
|
|
2274
|
+
], CaseField.prototype, "isDynamic", null);
|
|
2275
|
+
__decorate([
|
|
2276
|
+
Expose(),
|
|
2277
|
+
__metadata("design:type", Function),
|
|
2278
|
+
__metadata("design:paramtypes", []),
|
|
2279
|
+
__metadata("design:returntype", Boolean)
|
|
2280
|
+
], CaseField.prototype, "isCaseLink", null);
|
|
2281
|
+
__decorate([
|
|
2282
|
+
Expose(),
|
|
2283
|
+
__metadata("design:type", Function),
|
|
2284
|
+
__metadata("design:paramtypes", [String]),
|
|
2285
|
+
__metadata("design:returntype", String)
|
|
2286
|
+
], CaseField.prototype, "getHierachicalId", null);
|
|
2404
2287
|
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
errors;
|
|
2417
|
-
warnings;
|
|
2418
|
-
// TODO: Remove
|
|
2419
|
-
alerts;
|
|
2420
|
-
successObserver;
|
|
2421
|
-
errorObserver;
|
|
2422
|
-
warningObserver;
|
|
2423
|
-
// TODO: Remove
|
|
2424
|
-
alertObserver;
|
|
2425
|
-
preserveAlerts = false;
|
|
2426
|
-
constructor(router, rpxTranslationService) {
|
|
2427
|
-
this.router = router;
|
|
2428
|
-
this.rpxTranslationService = rpxTranslationService;
|
|
2429
|
-
this.successes = Observable
|
|
2430
|
-
.create(observer => this.successObserver = observer).pipe(publish(), refCount());
|
|
2431
|
-
this.successes.subscribe();
|
|
2432
|
-
this.errors = Observable
|
|
2433
|
-
.create(observer => this.errorObserver = observer).pipe(publish(), refCount());
|
|
2434
|
-
this.errors.subscribe();
|
|
2435
|
-
this.warnings = Observable
|
|
2436
|
-
.create(observer => this.warningObserver = observer).pipe(publish(), refCount());
|
|
2437
|
-
this.warnings.subscribe();
|
|
2438
|
-
// TODO: Remove
|
|
2439
|
-
this.alerts = Observable
|
|
2440
|
-
.create(observer => this.alertObserver = observer).pipe(publish(), refCount());
|
|
2441
|
-
this.alerts.subscribe();
|
|
2442
|
-
this.router
|
|
2443
|
-
.events
|
|
2444
|
-
.subscribe(event => {
|
|
2445
|
-
if (event instanceof NavigationStart) {
|
|
2446
|
-
// if there is no longer a preserve alerts setting for the page then clear all observers and preserved messages
|
|
2447
|
-
if (!this.preserveAlerts) {
|
|
2448
|
-
this.clear();
|
|
2449
|
-
}
|
|
2450
|
-
// if not, then set the preserving of alerts to false so rendering to a new page
|
|
2451
|
-
this.preserveAlerts = false;
|
|
2452
|
-
}
|
|
2453
|
-
});
|
|
2454
|
-
}
|
|
2455
|
-
clear() {
|
|
2456
|
-
this.successObserver.next(null);
|
|
2457
|
-
this.errorObserver.next(null);
|
|
2458
|
-
this.warningObserver.next(null);
|
|
2459
|
-
this.preservedError = '';
|
|
2460
|
-
this.preservedWarning = '';
|
|
2461
|
-
this.preservedSuccess = '';
|
|
2462
|
-
// EUI-3381.
|
|
2463
|
-
this.alertObserver.next(null);
|
|
2464
|
-
this.message = '';
|
|
2465
|
-
}
|
|
2466
|
-
error({ phrase, replacements }) {
|
|
2467
|
-
const message = this.getTranslationWithReplacements(phrase, replacements);
|
|
2468
|
-
this.preservedError = this.preserveMessages(message);
|
|
2469
|
-
const alert = { level: 'error', message };
|
|
2470
|
-
this.errorObserver.next(alert);
|
|
2471
|
-
// EUI-3381.
|
|
2472
|
-
this.push(alert);
|
|
2473
|
-
}
|
|
2474
|
-
warning({ phrase, replacements }) {
|
|
2475
|
-
const message = this.getTranslationWithReplacements(phrase, replacements);
|
|
2476
|
-
this.preservedWarning = this.preserveMessages(message);
|
|
2477
|
-
const alert = { level: 'warning', message };
|
|
2478
|
-
this.warningObserver.next(alert);
|
|
2479
|
-
// EUI-3381.
|
|
2480
|
-
this.push(alert);
|
|
2481
|
-
}
|
|
2482
|
-
success({ preserve, phrase, replacements }) {
|
|
2483
|
-
const message = this.getTranslationWithReplacements(phrase, replacements);
|
|
2484
|
-
this.preserveAlerts = preserve || this.preserveAlerts;
|
|
2485
|
-
const alert = { level: 'success', message };
|
|
2486
|
-
this.preservedSuccess = this.preserveMessages(message);
|
|
2487
|
-
this.successObserver.next(alert);
|
|
2488
|
-
// EUI-3381.
|
|
2489
|
-
this.push(alert);
|
|
2490
|
-
}
|
|
2491
|
-
getTranslationWithReplacements(phrase, replacements) {
|
|
2492
|
-
let message;
|
|
2493
|
-
if (replacements) {
|
|
2494
|
-
this.rpxTranslationService.getTranslationWithReplacements$(phrase, replacements).subscribe(translation => {
|
|
2495
|
-
message = translation;
|
|
2496
|
-
});
|
|
2497
|
-
}
|
|
2498
|
-
else {
|
|
2499
|
-
this.rpxTranslationService.getTranslation$(phrase).subscribe(translation => {
|
|
2500
|
-
message = translation;
|
|
2501
|
-
});
|
|
2502
|
-
}
|
|
2503
|
-
return message;
|
|
2504
|
-
}
|
|
2505
|
-
setPreserveAlerts(preserve, urlInfo) {
|
|
2506
|
-
// if there is no url setting then just preserve the messages
|
|
2507
|
-
if (!urlInfo) {
|
|
2508
|
-
this.preserveAlerts = preserve;
|
|
2509
|
-
}
|
|
2510
|
-
else {
|
|
2511
|
-
// check if the url includes the sting given
|
|
2512
|
-
this.preserveAlerts = this.currentUrlIncludesInfo(preserve, urlInfo);
|
|
2513
|
-
}
|
|
2514
|
-
}
|
|
2515
|
-
currentUrlIncludesInfo(preserve, urlInfo) {
|
|
2516
|
-
// loop through the list of strings and check the router includes all of them
|
|
2517
|
-
for (const urlSnip of urlInfo) {
|
|
2518
|
-
if (!this.router.url.includes(urlSnip)) {
|
|
2519
|
-
// return the opposite boolean value if the router does not include one of the strings
|
|
2520
|
-
return !preserve;
|
|
2521
|
-
}
|
|
2522
|
-
}
|
|
2523
|
-
// return the boolean value if all strings are in the url
|
|
2524
|
-
return preserve;
|
|
2525
|
-
}
|
|
2526
|
-
isPreserveAlerts() {
|
|
2527
|
-
return this.preserveAlerts;
|
|
2288
|
+
// @dynamic
|
|
2289
|
+
class WizardPage {
|
|
2290
|
+
id;
|
|
2291
|
+
label;
|
|
2292
|
+
order;
|
|
2293
|
+
wizard_page_fields;
|
|
2294
|
+
case_fields;
|
|
2295
|
+
show_condition;
|
|
2296
|
+
parsedShowCondition;
|
|
2297
|
+
getCol1Fields() {
|
|
2298
|
+
return this.case_fields?.filter(f => !f.wizardProps.page_column_no || f.wizardProps.page_column_no === 1);
|
|
2528
2299
|
}
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
if (this.isPreserveAlerts()) {
|
|
2532
|
-
return message;
|
|
2533
|
-
}
|
|
2534
|
-
else {
|
|
2535
|
-
return '';
|
|
2536
|
-
}
|
|
2300
|
+
getCol2Fields() {
|
|
2301
|
+
return this.case_fields?.filter(f => f.wizardProps.page_column_no === 2);
|
|
2537
2302
|
}
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
this.message = msgObject.message;
|
|
2541
|
-
this.level = msgObject.level;
|
|
2542
|
-
this.alertObserver.next({
|
|
2543
|
-
level: this.level,
|
|
2544
|
-
message: this.message
|
|
2545
|
-
});
|
|
2303
|
+
isMultiColumn() {
|
|
2304
|
+
return this.getCol2Fields()?.length > 0;
|
|
2546
2305
|
}
|
|
2547
|
-
static ɵfac = function AlertService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AlertService)(i0.ɵɵinject(i1$2.Router), i0.ɵɵinject(i1.RpxTranslationService)); };
|
|
2548
|
-
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: AlertService, factory: AlertService.ɵfac });
|
|
2549
2306
|
}
|
|
2550
|
-
(
|
|
2551
|
-
|
|
2552
|
-
|
|
2307
|
+
__decorate([
|
|
2308
|
+
Type(() => WizardPageField),
|
|
2309
|
+
__metadata("design:type", Array)
|
|
2310
|
+
], WizardPage.prototype, "wizard_page_fields", void 0);
|
|
2311
|
+
__decorate([
|
|
2312
|
+
Type(() => CaseField),
|
|
2313
|
+
__metadata("design:type", Array)
|
|
2314
|
+
], WizardPage.prototype, "case_fields", void 0);
|
|
2553
2315
|
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
class Draft {
|
|
2316
|
+
// @dynamic
|
|
2317
|
+
class CaseEventTrigger {
|
|
2557
2318
|
id;
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2319
|
+
name;
|
|
2320
|
+
description;
|
|
2321
|
+
case_id;
|
|
2322
|
+
case_fields;
|
|
2323
|
+
event_token;
|
|
2324
|
+
wizard_pages;
|
|
2325
|
+
show_summary;
|
|
2326
|
+
show_event_notes;
|
|
2327
|
+
end_button_label;
|
|
2328
|
+
can_save_draft;
|
|
2329
|
+
hasFields() {
|
|
2330
|
+
return this.case_fields && this.case_fields.length !== 0;
|
|
2564
2331
|
}
|
|
2565
|
-
|
|
2566
|
-
return
|
|
2332
|
+
hasPages() {
|
|
2333
|
+
return this.wizard_pages && this.wizard_pages.length !== 0;
|
|
2567
2334
|
}
|
|
2568
2335
|
}
|
|
2336
|
+
__decorate([
|
|
2337
|
+
Type(() => CaseField),
|
|
2338
|
+
__metadata("design:type", Array)
|
|
2339
|
+
], CaseEventTrigger.prototype, "case_fields", void 0);
|
|
2340
|
+
__decorate([
|
|
2341
|
+
Type(() => WizardPage),
|
|
2342
|
+
__metadata("design:type", Array)
|
|
2343
|
+
], CaseEventTrigger.prototype, "wizard_pages", void 0);
|
|
2569
2344
|
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
const saveDraftEndpoint = this.appConfig.getCreateOrUpdateDraftsUrl(ctid);
|
|
2585
|
-
const headers = new HttpHeaders()
|
|
2586
|
-
.set('experimental', 'true')
|
|
2587
|
-
.set('Accept', DraftService.V2_MEDIATYPE_DRAFT_CREATE)
|
|
2588
|
-
.set('Content-Type', 'application/json');
|
|
2589
|
-
return this.http
|
|
2590
|
-
.post(saveDraftEndpoint, eventData, { headers, observe: 'body' })
|
|
2591
|
-
.pipe(catchError((error) => {
|
|
2592
|
-
this.errorService.setError(error);
|
|
2593
|
-
return throwError(error);
|
|
2594
|
-
}));
|
|
2595
|
-
}
|
|
2596
|
-
updateDraft(ctid, draftId, eventData) {
|
|
2597
|
-
const saveDraftEndpoint = `${this.appConfig.getCreateOrUpdateDraftsUrl(ctid)}/${draftId}`;
|
|
2598
|
-
const headers = new HttpHeaders()
|
|
2599
|
-
.set('experimental', 'true')
|
|
2600
|
-
.set('Accept', DraftService.V2_MEDIATYPE_DRAFT_UPDATE)
|
|
2601
|
-
.set('Content-Type', 'application/json');
|
|
2602
|
-
return this.http
|
|
2603
|
-
.put(saveDraftEndpoint, eventData, { headers, observe: 'body' })
|
|
2604
|
-
.pipe(catchError((error) => {
|
|
2605
|
-
this.errorService.setError(error);
|
|
2606
|
-
return throwError(error);
|
|
2607
|
-
}));
|
|
2608
|
-
}
|
|
2609
|
-
getDraft(draftId) {
|
|
2610
|
-
const url = this.appConfig.getViewOrDeleteDraftsUrl(draftId.slice(DRAFT_PREFIX.length));
|
|
2611
|
-
const headers = new HttpHeaders()
|
|
2612
|
-
.set('experimental', 'true')
|
|
2613
|
-
.set('Accept', DraftService.V2_MEDIATYPE_DRAFT_READ)
|
|
2614
|
-
.set('Content-Type', 'application/json');
|
|
2615
|
-
return this.http
|
|
2616
|
-
.get(url, { headers, observe: 'body' })
|
|
2617
|
-
.pipe(catchError((error) => {
|
|
2618
|
-
this.errorService.setError(error);
|
|
2619
|
-
return throwError(error);
|
|
2620
|
-
}));
|
|
2621
|
-
}
|
|
2622
|
-
deleteDraft(draftId) {
|
|
2623
|
-
const url = this.appConfig.getViewOrDeleteDraftsUrl(draftId.slice(DRAFT_PREFIX.length));
|
|
2624
|
-
const headers = new HttpHeaders()
|
|
2625
|
-
.set('experimental', 'true')
|
|
2626
|
-
.set('Accept', DraftService.V2_MEDIATYPE_DRAFT_DELETE)
|
|
2627
|
-
.set('Content-Type', 'application/json');
|
|
2628
|
-
return this.http
|
|
2629
|
-
.delete(url, { headers, observe: 'body' }).pipe(catchError((error) => {
|
|
2630
|
-
this.errorService.setError(error);
|
|
2631
|
-
return throwError(error);
|
|
2632
|
-
}));
|
|
2633
|
-
}
|
|
2634
|
-
createOrUpdateDraft(caseTypeId, draftId, caseEventData) {
|
|
2635
|
-
if (!draftId) {
|
|
2636
|
-
return this.createDraft(caseTypeId, caseEventData);
|
|
2637
|
-
}
|
|
2638
|
-
else {
|
|
2639
|
-
return this.updateDraft(caseTypeId, Draft.stripDraftId(draftId), caseEventData);
|
|
2640
|
-
}
|
|
2641
|
-
}
|
|
2642
|
-
static ɵfac = function DraftService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || DraftService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig), i0.ɵɵinject(HttpErrorService)); };
|
|
2643
|
-
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: DraftService, factory: DraftService.ɵfac });
|
|
2345
|
+
// tslint:disable:variable-name
|
|
2346
|
+
class CaseViewEvent {
|
|
2347
|
+
id;
|
|
2348
|
+
timestamp;
|
|
2349
|
+
summary;
|
|
2350
|
+
comment;
|
|
2351
|
+
event_id;
|
|
2352
|
+
event_name;
|
|
2353
|
+
state_id;
|
|
2354
|
+
state_name;
|
|
2355
|
+
user_id;
|
|
2356
|
+
user_last_name;
|
|
2357
|
+
user_first_name;
|
|
2358
|
+
significant_item;
|
|
2644
2359
|
}
|
|
2645
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DraftService, [{
|
|
2646
|
-
type: Injectable
|
|
2647
|
-
}], () => [{ type: HttpService }, { type: AbstractAppConfig }, { type: HttpErrorService }], null); })();
|
|
2648
2360
|
|
|
2649
|
-
class
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
reset() {
|
|
2655
|
-
this.registeredDirectives = [];
|
|
2656
|
-
}
|
|
2657
|
-
static ɵfac = function ConditionalShowRegistrarService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ConditionalShowRegistrarService)(); };
|
|
2658
|
-
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ConditionalShowRegistrarService, factory: ConditionalShowRegistrarService.ɵfac });
|
|
2361
|
+
class CaseViewTrigger {
|
|
2362
|
+
id;
|
|
2363
|
+
name;
|
|
2364
|
+
description;
|
|
2365
|
+
order;
|
|
2659
2366
|
}
|
|
2660
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ConditionalShowRegistrarService, [{
|
|
2661
|
-
type: Injectable
|
|
2662
|
-
}], null, null); })();
|
|
2663
2367
|
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
}
|
|
2674
|
-
showGreyBar(field, el) {
|
|
2675
|
-
if (!field.isCollection()) {
|
|
2676
|
-
this.addGreyBar(el);
|
|
2677
|
-
}
|
|
2678
|
-
}
|
|
2679
|
-
removeGreyBar(el) {
|
|
2680
|
-
const divSelector = el.nativeElement.querySelector('div');
|
|
2681
|
-
if (divSelector) {
|
|
2682
|
-
this.renderer.removeClass(divSelector, 'show-condition-grey-bar');
|
|
2683
|
-
}
|
|
2684
|
-
}
|
|
2685
|
-
addToggledToShow(fieldId) {
|
|
2686
|
-
this.fieldsToggledToShow.push(fieldId);
|
|
2687
|
-
}
|
|
2688
|
-
removeToggledToShow(fieldId) {
|
|
2689
|
-
this.fieldsToggledToShow = this.fieldsToggledToShow.filter(id => id !== fieldId);
|
|
2690
|
-
}
|
|
2691
|
-
wasToggledToShow(fieldId) {
|
|
2692
|
-
return this.fieldsToggledToShow.find(id => id === fieldId) !== undefined;
|
|
2693
|
-
}
|
|
2694
|
-
reset() {
|
|
2695
|
-
this.fieldsToggledToShow = [];
|
|
2696
|
-
}
|
|
2697
|
-
addGreyBar(el) {
|
|
2698
|
-
const divSelector = el.nativeElement.querySelector('div');
|
|
2699
|
-
if (divSelector) {
|
|
2700
|
-
this.renderer.addClass(divSelector, 'show-condition-grey-bar');
|
|
2701
|
-
}
|
|
2702
|
-
}
|
|
2703
|
-
static ɵfac = function GreyBarService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || GreyBarService)(i0.ɵɵinject(i0.RendererFactory2)); };
|
|
2704
|
-
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: GreyBarService, factory: GreyBarService.ɵfac });
|
|
2368
|
+
class CaseEvent {
|
|
2369
|
+
id;
|
|
2370
|
+
name;
|
|
2371
|
+
post_state;
|
|
2372
|
+
pre_states;
|
|
2373
|
+
case_fields;
|
|
2374
|
+
description;
|
|
2375
|
+
order;
|
|
2376
|
+
acls;
|
|
2705
2377
|
}
|
|
2706
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(GreyBarService, [{
|
|
2707
|
-
type: Injectable
|
|
2708
|
-
}], () => [{ type: i0.RendererFactory2 }], null); })();
|
|
2709
|
-
|
|
2710
|
-
var AddCommentsErrorMessage;
|
|
2711
|
-
(function (AddCommentsErrorMessage) {
|
|
2712
|
-
AddCommentsErrorMessage["FLAG_COMMENTS_NOT_ENTERED"] = "Please enter comments for this flag";
|
|
2713
|
-
AddCommentsErrorMessage["FLAG_COMMENTS_NOT_ENTERED_EXTERNAL"] = "Please enter comments for this support request";
|
|
2714
|
-
AddCommentsErrorMessage["FLAG_COMMENTS_CHAR_LIMIT_EXCEEDED"] = "Comments for this flag must be 200 characters or fewer";
|
|
2715
|
-
})(AddCommentsErrorMessage || (AddCommentsErrorMessage = {}));
|
|
2716
2378
|
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
})(AddCommentsStep || (AddCommentsStep = {}));
|
|
2724
|
-
|
|
2725
|
-
var CaseFlagCheckYourAnswersPageStep;
|
|
2726
|
-
(function (CaseFlagCheckYourAnswersPageStep) {
|
|
2727
|
-
CaseFlagCheckYourAnswersPageStep["CASE_LEVEL_LOCATION"] = "Case level";
|
|
2728
|
-
CaseFlagCheckYourAnswersPageStep["ADD_FLAG_HEADER_TEXT"] = "Add flag to";
|
|
2729
|
-
CaseFlagCheckYourAnswersPageStep["ADD_FLAG_HEADER_TEXT_EXTERNAL"] = "Add support to";
|
|
2730
|
-
CaseFlagCheckYourAnswersPageStep["UPDATE_FLAG_HEADER_TEXT"] = "Update flag for";
|
|
2731
|
-
CaseFlagCheckYourAnswersPageStep["UPDATE_FLAG_HEADER_TEXT_EXTERNAL"] = "Update support for";
|
|
2732
|
-
CaseFlagCheckYourAnswersPageStep["FLAG_TYPE_HEADER_TEXT"] = "Flag type";
|
|
2733
|
-
CaseFlagCheckYourAnswersPageStep["FLAG_TYPE_HEADER_TEXT_EXTERNAL"] = "Support type";
|
|
2734
|
-
CaseFlagCheckYourAnswersPageStep["NONE"] = "";
|
|
2735
|
-
})(CaseFlagCheckYourAnswersPageStep || (CaseFlagCheckYourAnswersPageStep = {}));
|
|
2736
|
-
|
|
2737
|
-
/**
|
|
2738
|
-
* Create and update contexts for external users are, by definition, part of Case Flags 2.1 - thus there is no enum
|
|
2739
|
-
* value for these.
|
|
2740
|
-
*/
|
|
2741
|
-
var CaseFlagDisplayContextParameter;
|
|
2742
|
-
(function (CaseFlagDisplayContextParameter) {
|
|
2743
|
-
CaseFlagDisplayContextParameter["CREATE"] = "#ARGUMENT(CREATE)";
|
|
2744
|
-
CaseFlagDisplayContextParameter["CREATE_EXTERNAL"] = "#ARGUMENT(CREATE,EXTERNAL)";
|
|
2745
|
-
CaseFlagDisplayContextParameter["CREATE_2_POINT_1"] = "#ARGUMENT(CREATE,VERSION2.1)";
|
|
2746
|
-
CaseFlagDisplayContextParameter["READ_EXTERNAL"] = "#ARGUMENT(READ,EXTERNAL)";
|
|
2747
|
-
CaseFlagDisplayContextParameter["UPDATE"] = "#ARGUMENT(UPDATE)";
|
|
2748
|
-
CaseFlagDisplayContextParameter["UPDATE_EXTERNAL"] = "#ARGUMENT(UPDATE,EXTERNAL)";
|
|
2749
|
-
CaseFlagDisplayContextParameter["UPDATE_2_POINT_1"] = "#ARGUMENT(UPDATE,VERSION2.1)";
|
|
2750
|
-
})(CaseFlagDisplayContextParameter || (CaseFlagDisplayContextParameter = {}));
|
|
2751
|
-
|
|
2752
|
-
var CaseFlagFormFields;
|
|
2753
|
-
(function (CaseFlagFormFields) {
|
|
2754
|
-
CaseFlagFormFields["FLAG_TYPE"] = "flagType";
|
|
2755
|
-
CaseFlagFormFields["COMMENTS"] = "flagComment";
|
|
2756
|
-
CaseFlagFormFields["COMMENTS_WELSH"] = "flagComment_cy";
|
|
2757
|
-
CaseFlagFormFields["OTHER_FLAG_DESCRIPTION"] = "otherDescription";
|
|
2758
|
-
CaseFlagFormFields["OTHER_FLAG_DESCRIPTION_WELSH"] = "otherDescription_cy";
|
|
2759
|
-
CaseFlagFormFields["STATUS"] = "status";
|
|
2760
|
-
CaseFlagFormFields["STATUS_CHANGE_REASON"] = "flagStatusReasonChange";
|
|
2761
|
-
CaseFlagFormFields["IS_WELSH_TRANSLATION_NEEDED"] = "flagIsWelshTranslationNeeded";
|
|
2762
|
-
CaseFlagFormFields["IS_VISIBLE_INTERNALLY_ONLY"] = "flagIsVisibleInternallyOnly";
|
|
2763
|
-
})(CaseFlagFormFields || (CaseFlagFormFields = {}));
|
|
2764
|
-
|
|
2765
|
-
var CaseFlagStatus;
|
|
2766
|
-
(function (CaseFlagStatus) {
|
|
2767
|
-
CaseFlagStatus["REQUESTED"] = "Requested";
|
|
2768
|
-
CaseFlagStatus["ACTIVE"] = "Active";
|
|
2769
|
-
CaseFlagStatus["INACTIVE"] = "Inactive";
|
|
2770
|
-
CaseFlagStatus["NOT_APPROVED"] = "Not approved";
|
|
2771
|
-
})(CaseFlagStatus || (CaseFlagStatus = {}));
|
|
2772
|
-
|
|
2773
|
-
var CaseFlagSummaryListDisplayMode;
|
|
2774
|
-
(function (CaseFlagSummaryListDisplayMode) {
|
|
2775
|
-
CaseFlagSummaryListDisplayMode[CaseFlagSummaryListDisplayMode["CREATE"] = 0] = "CREATE";
|
|
2776
|
-
CaseFlagSummaryListDisplayMode[CaseFlagSummaryListDisplayMode["MANAGE"] = 1] = "MANAGE";
|
|
2777
|
-
})(CaseFlagSummaryListDisplayMode || (CaseFlagSummaryListDisplayMode = {}));
|
|
2778
|
-
|
|
2779
|
-
var CaseFlagWizardStepTitle;
|
|
2780
|
-
(function (CaseFlagWizardStepTitle) {
|
|
2781
|
-
CaseFlagWizardStepTitle["SELECT_FLAG_LOCATION"] = "Where should this flag be added?";
|
|
2782
|
-
CaseFlagWizardStepTitle["SELECT_FLAG_LOCATION_EXTERNAL"] = "Who is the support for?";
|
|
2783
|
-
CaseFlagWizardStepTitle["SELECT_CASE_FLAG"] = "Select flag type";
|
|
2784
|
-
CaseFlagWizardStepTitle["SELECT_CASE_FLAG_EXTERNAL"] = "Select support type";
|
|
2785
|
-
CaseFlagWizardStepTitle["OTHER_FLAG_TYPE_DESCRIPTION"] = "Enter a flag type";
|
|
2786
|
-
CaseFlagWizardStepTitle["OTHER_FLAG_TYPE_DESCRIPTION_EXTERNAL"] = "Enter a support type";
|
|
2787
|
-
CaseFlagWizardStepTitle["ADD_FLAG_COMMENTS"] = "Add comments for this flag";
|
|
2788
|
-
CaseFlagWizardStepTitle["ADD_FLAG_COMMENTS_EXTERNAL_MODE"] = "Tell us more about the request";
|
|
2789
|
-
CaseFlagWizardStepTitle["CONFIRM_FLAG_STATUS"] = "Confirm the status of the flag";
|
|
2790
|
-
CaseFlagWizardStepTitle["FLAG_STATUS"] = "Flag status";
|
|
2791
|
-
CaseFlagWizardStepTitle["MANAGE_CASE_FLAGS"] = "Manage case flags";
|
|
2792
|
-
CaseFlagWizardStepTitle["MANAGE_SUPPORT"] = "Which support is no longer needed?";
|
|
2793
|
-
CaseFlagWizardStepTitle["UPDATE_FLAG_TITLE"] = "Update flag";
|
|
2794
|
-
CaseFlagWizardStepTitle["UPDATE_FLAG_TITLE_EXTERNAL"] = "Tell us why the support is no longer needed";
|
|
2795
|
-
CaseFlagWizardStepTitle["UPDATE_FLAG_ADD_TRANSLATION"] = "Add translations to flag";
|
|
2796
|
-
CaseFlagWizardStepTitle["NONE"] = "";
|
|
2797
|
-
})(CaseFlagWizardStepTitle || (CaseFlagWizardStepTitle = {}));
|
|
2798
|
-
|
|
2799
|
-
var ConfirmStatusErrorMessage;
|
|
2800
|
-
(function (ConfirmStatusErrorMessage) {
|
|
2801
|
-
ConfirmStatusErrorMessage["STATUS_REASON_NOT_ENTERED"] = "Comments and/or the name of the person approving the decision should be entered";
|
|
2802
|
-
ConfirmStatusErrorMessage["STATUS_REASON_CHAR_LIMIT_EXCEEDED"] = "Comments must be 200 characters or fewer";
|
|
2803
|
-
})(ConfirmStatusErrorMessage || (ConfirmStatusErrorMessage = {}));
|
|
2804
|
-
|
|
2805
|
-
var ConfirmStatusStep;
|
|
2806
|
-
(function (ConfirmStatusStep) {
|
|
2807
|
-
ConfirmStatusStep["HINT_TEXT"] = "Describe reason for status; if choosing 'Not approved' provide name of person approving decision.";
|
|
2808
|
-
ConfirmStatusStep["CHARACTER_LIMIT_INFO"] = "You can enter up to 200 characters";
|
|
2809
|
-
})(ConfirmStatusStep || (ConfirmStatusStep = {}));
|
|
2379
|
+
class CaseState {
|
|
2380
|
+
id;
|
|
2381
|
+
name;
|
|
2382
|
+
description;
|
|
2383
|
+
order;
|
|
2384
|
+
}
|
|
2810
2385
|
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2386
|
+
// Light clone of CaseType to be used in Jurisdiction class
|
|
2387
|
+
// to avoid cyclic dependency
|
|
2388
|
+
class CaseTypeLite {
|
|
2389
|
+
id;
|
|
2390
|
+
name;
|
|
2391
|
+
events;
|
|
2392
|
+
states;
|
|
2393
|
+
description;
|
|
2394
|
+
}
|
|
2817
2395
|
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2396
|
+
// @dynamics
|
|
2397
|
+
class CaseType {
|
|
2398
|
+
id;
|
|
2399
|
+
name;
|
|
2400
|
+
events;
|
|
2401
|
+
states;
|
|
2402
|
+
case_fields;
|
|
2403
|
+
description;
|
|
2404
|
+
jurisdiction;
|
|
2405
|
+
printEnabled;
|
|
2406
|
+
}
|
|
2407
|
+
__decorate([
|
|
2408
|
+
Type(() => CaseField),
|
|
2409
|
+
__metadata("design:type", Array)
|
|
2410
|
+
], CaseType.prototype, "case_fields", void 0);
|
|
2825
2411
|
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
})(SelectFlagErrorMessage || (SelectFlagErrorMessage = {}));
|
|
2412
|
+
// tslint:disable:variable-name
|
|
2413
|
+
class EventCaseField {
|
|
2414
|
+
case_field_id;
|
|
2415
|
+
showCondition;
|
|
2416
|
+
}
|
|
2832
2417
|
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2418
|
+
class Banner {
|
|
2419
|
+
bannerDescription;
|
|
2420
|
+
bannerUrlText;
|
|
2421
|
+
bannerUrl;
|
|
2422
|
+
bannerViewed;
|
|
2423
|
+
bannerEnabled;
|
|
2424
|
+
}
|
|
2838
2425
|
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
}
|
|
2426
|
+
// @dynamic
|
|
2427
|
+
class CaseTab {
|
|
2428
|
+
id;
|
|
2429
|
+
label;
|
|
2430
|
+
order;
|
|
2431
|
+
fields;
|
|
2432
|
+
show_condition;
|
|
2433
|
+
defaultFocus;
|
|
2434
|
+
}
|
|
2435
|
+
__decorate([
|
|
2436
|
+
Type(() => CaseField),
|
|
2437
|
+
__metadata("design:type", Array)
|
|
2438
|
+
], CaseTab.prototype, "fields", void 0);
|
|
2848
2439
|
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2440
|
+
// @dynamic
|
|
2441
|
+
class CaseView {
|
|
2442
|
+
case_id;
|
|
2443
|
+
case_type;
|
|
2444
|
+
state;
|
|
2445
|
+
channels;
|
|
2446
|
+
tabs;
|
|
2447
|
+
triggers;
|
|
2448
|
+
events;
|
|
2449
|
+
metadataFields;
|
|
2450
|
+
basicFields;
|
|
2451
|
+
case_flag;
|
|
2452
|
+
}
|
|
2453
|
+
__decorate([
|
|
2454
|
+
Type(() => CaseTab),
|
|
2455
|
+
__metadata("design:type", Array)
|
|
2456
|
+
], CaseView.prototype, "tabs", void 0);
|
|
2457
|
+
__decorate([
|
|
2458
|
+
Type(() => CaseField),
|
|
2459
|
+
__metadata("design:type", Array)
|
|
2460
|
+
], CaseView.prototype, "metadataFields", void 0);
|
|
2854
2461
|
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
}
|
|
2462
|
+
class CasePrintDocument {
|
|
2463
|
+
name;
|
|
2464
|
+
type;
|
|
2465
|
+
url;
|
|
2466
|
+
}
|
|
2860
2467
|
|
|
2861
|
-
var
|
|
2862
|
-
(function (
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2468
|
+
var RoleCategory;
|
|
2469
|
+
(function (RoleCategory) {
|
|
2470
|
+
RoleCategory["JUDICIAL"] = "JUDICIAL";
|
|
2471
|
+
RoleCategory["LEGAL_OPERATIONS"] = "LEGAL_OPERATIONS";
|
|
2472
|
+
RoleCategory["ADMIN"] = "ADMIN";
|
|
2473
|
+
RoleCategory["CTSC"] = "CTSC";
|
|
2474
|
+
RoleCategory["PROFESSIONAL"] = "PROFESSIONAL";
|
|
2475
|
+
RoleCategory["CITIZEN"] = "CITIZEN";
|
|
2476
|
+
RoleCategory["ENFORCEMENT"] = "ENFORCEMENT";
|
|
2477
|
+
})(RoleCategory || (RoleCategory = {}));
|
|
2478
|
+
var AMRoleSuffix;
|
|
2479
|
+
(function (AMRoleSuffix) {
|
|
2480
|
+
AMRoleSuffix["JUDICIARY"] = "judiciary";
|
|
2481
|
+
AMRoleSuffix["ADMIN"] = "admin";
|
|
2482
|
+
AMRoleSuffix["PROFESSIONAL"] = "professional";
|
|
2483
|
+
AMRoleSuffix["LEGAL_OPERATIONS"] = "legal-ops";
|
|
2484
|
+
AMRoleSuffix["CITIZEN"] = "citizen";
|
|
2485
|
+
AMRoleSuffix["CTSC"] = "ctsc";
|
|
2486
|
+
AMRoleSuffix["ENFORCEMENT"] = "enforcement";
|
|
2487
|
+
})(AMRoleSuffix || (AMRoleSuffix = {}));
|
|
2488
|
+
var RoleKeyword;
|
|
2489
|
+
(function (RoleKeyword) {
|
|
2490
|
+
RoleKeyword["JUDGE"] = "judge";
|
|
2491
|
+
RoleKeyword["ADMIN"] = "admin";
|
|
2492
|
+
RoleKeyword["SOLICITOR"] = "solicitor";
|
|
2493
|
+
RoleKeyword["CITIZEN"] = "citizen";
|
|
2494
|
+
RoleKeyword["CTSC"] = "ctsc";
|
|
2495
|
+
RoleKeyword["CASEWORKER"] = "caseworker";
|
|
2496
|
+
RoleKeyword["ENFORCEMENT"] = "enforcement";
|
|
2497
|
+
})(RoleKeyword || (RoleKeyword = {}));
|
|
2870
2498
|
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2499
|
+
// tslint:disable:variable-name
|
|
2500
|
+
class HRef {
|
|
2501
|
+
href;
|
|
2502
|
+
}
|
|
2503
|
+
class DocumentLinks {
|
|
2504
|
+
self;
|
|
2505
|
+
binary;
|
|
2506
|
+
}
|
|
2507
|
+
class Document {
|
|
2508
|
+
_links;
|
|
2509
|
+
originalDocumentName;
|
|
2510
|
+
hashToken;
|
|
2511
|
+
}
|
|
2512
|
+
class Embedded {
|
|
2513
|
+
documents;
|
|
2514
|
+
}
|
|
2515
|
+
class DocumentData {
|
|
2516
|
+
_embedded;
|
|
2517
|
+
documents;
|
|
2518
|
+
}
|
|
2519
|
+
class FormDocument {
|
|
2520
|
+
document_url;
|
|
2521
|
+
document_binary_url;
|
|
2522
|
+
document_filename;
|
|
2523
|
+
document_hash;
|
|
2524
|
+
upload_timestamp;
|
|
2525
|
+
}
|
|
2882
2526
|
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
}
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
})(CaseFlagErrorMessage || (CaseFlagErrorMessage = {}));
|
|
2527
|
+
const DRAFT_PREFIX = 'DRAFT';
|
|
2528
|
+
const DRAFT_QUERY_PARAM = 'draft';
|
|
2529
|
+
class Draft {
|
|
2530
|
+
id;
|
|
2531
|
+
document;
|
|
2532
|
+
type;
|
|
2533
|
+
created;
|
|
2534
|
+
updated;
|
|
2535
|
+
static stripDraftId(draftId) {
|
|
2536
|
+
return draftId.slice(DRAFT_PREFIX.length);
|
|
2537
|
+
}
|
|
2538
|
+
static isDraft(id) {
|
|
2539
|
+
return String(id).startsWith(DRAFT_PREFIX);
|
|
2540
|
+
}
|
|
2541
|
+
}
|
|
2899
2542
|
|
|
2900
|
-
class
|
|
2901
|
-
|
|
2902
|
-
|
|
2543
|
+
class OrganisationConverter {
|
|
2544
|
+
static toSimpleAddress(organisationModel) {
|
|
2545
|
+
let simpleAddress = '';
|
|
2546
|
+
if (organisationModel.addressLine1) {
|
|
2547
|
+
simpleAddress += `${organisationModel.addressLine1}<br>`;
|
|
2548
|
+
}
|
|
2549
|
+
if (organisationModel.addressLine2) {
|
|
2550
|
+
simpleAddress += `${organisationModel.addressLine2}<br>`;
|
|
2551
|
+
}
|
|
2552
|
+
if (organisationModel.addressLine3) {
|
|
2553
|
+
simpleAddress += `${organisationModel.addressLine3}<br>`;
|
|
2554
|
+
}
|
|
2555
|
+
if (organisationModel.townCity) {
|
|
2556
|
+
simpleAddress += `${organisationModel.townCity}<br>`;
|
|
2557
|
+
}
|
|
2558
|
+
if (organisationModel.county) {
|
|
2559
|
+
simpleAddress += `${organisationModel.county}<br>`;
|
|
2560
|
+
}
|
|
2561
|
+
if (organisationModel.country) {
|
|
2562
|
+
simpleAddress += `${organisationModel.country}<br>`;
|
|
2563
|
+
}
|
|
2564
|
+
if (organisationModel.postCode) {
|
|
2565
|
+
simpleAddress += `${organisationModel.postCode}<br>`;
|
|
2566
|
+
}
|
|
2567
|
+
return simpleAddress;
|
|
2903
2568
|
}
|
|
2904
|
-
|
|
2905
|
-
|
|
2569
|
+
toSimpleOrganisationModel(organisationModel) {
|
|
2570
|
+
return {
|
|
2571
|
+
organisationIdentifier: organisationModel.organisationIdentifier,
|
|
2572
|
+
name: organisationModel.name,
|
|
2573
|
+
address: OrganisationConverter.toSimpleAddress(organisationModel)
|
|
2574
|
+
};
|
|
2575
|
+
}
|
|
2576
|
+
static ɵfac = function OrganisationConverter_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || OrganisationConverter)(); };
|
|
2577
|
+
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: OrganisationConverter, factory: OrganisationConverter.ɵfac });
|
|
2906
2578
|
}
|
|
2907
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(
|
|
2908
|
-
type:
|
|
2909
|
-
args: [{
|
|
2910
|
-
name: 'ccdDash',
|
|
2911
|
-
standalone: false
|
|
2912
|
-
}]
|
|
2579
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(OrganisationConverter, [{
|
|
2580
|
+
type: Injectable
|
|
2913
2581
|
}], null, null); })();
|
|
2914
2582
|
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
Java format
|
|
2921
|
-
G era text AD; Anno Domini; A
|
|
2922
|
-
u year year 2004; 04
|
|
2923
|
-
y year-of-era year 2004; 04
|
|
2924
|
-
D day-of-year number 189
|
|
2925
|
-
M/L month-of-year number/text 7; 07; Jul; July; J
|
|
2926
|
-
d day-of-month number 10
|
|
2583
|
+
class PaginationMetadata {
|
|
2584
|
+
totalResultsCount;
|
|
2585
|
+
totalPagesCount;
|
|
2586
|
+
}
|
|
2927
2587
|
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2588
|
+
class Field {
|
|
2589
|
+
id;
|
|
2590
|
+
field_type;
|
|
2591
|
+
elementPath;
|
|
2592
|
+
value;
|
|
2593
|
+
label;
|
|
2594
|
+
metadata;
|
|
2595
|
+
constructor(id, field_type, elementPath, value, label, metadata) {
|
|
2596
|
+
this.id = id;
|
|
2597
|
+
this.field_type = field_type;
|
|
2598
|
+
this.elementPath = elementPath;
|
|
2599
|
+
this.value = value;
|
|
2600
|
+
this.label = label;
|
|
2601
|
+
this.metadata = metadata;
|
|
2602
|
+
}
|
|
2603
|
+
}
|
|
2935
2604
|
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2605
|
+
class SearchResultViewColumn {
|
|
2606
|
+
case_field_id;
|
|
2607
|
+
case_field_type;
|
|
2608
|
+
display_context;
|
|
2609
|
+
display_context_parameter;
|
|
2610
|
+
label;
|
|
2611
|
+
order;
|
|
2612
|
+
}
|
|
2940
2613
|
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2614
|
+
// @dynamic
|
|
2615
|
+
class SearchResultViewItem {
|
|
2616
|
+
case_id;
|
|
2617
|
+
case_fields;
|
|
2618
|
+
hydrated_case_fields;
|
|
2619
|
+
columns;
|
|
2620
|
+
supplementary_data;
|
|
2621
|
+
display_context_parameter;
|
|
2622
|
+
}
|
|
2623
|
+
__decorate([
|
|
2624
|
+
Type(() => CaseField),
|
|
2625
|
+
__metadata("design:type", Array)
|
|
2626
|
+
], SearchResultViewItem.prototype, "hydrated_case_fields", void 0);
|
|
2948
2627
|
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2628
|
+
// @dynamic
|
|
2629
|
+
class SearchResultView {
|
|
2630
|
+
columns;
|
|
2631
|
+
results;
|
|
2632
|
+
result_error;
|
|
2633
|
+
hasDrafts() {
|
|
2634
|
+
return this.results[0]
|
|
2635
|
+
&& this.results[0].case_id
|
|
2636
|
+
&& Draft.isDraft(this.results[0].case_id);
|
|
2637
|
+
}
|
|
2638
|
+
}
|
|
2639
|
+
__decorate([
|
|
2640
|
+
Type(() => SearchResultViewColumn),
|
|
2641
|
+
__metadata("design:type", Array)
|
|
2642
|
+
], SearchResultView.prototype, "columns", void 0);
|
|
2643
|
+
__decorate([
|
|
2644
|
+
Type(() => SearchResultViewItem),
|
|
2645
|
+
__metadata("design:type", Array)
|
|
2646
|
+
], SearchResultView.prototype, "results", void 0);
|
|
2955
2647
|
|
|
2956
|
-
|
|
2648
|
+
class SortParameters {
|
|
2649
|
+
comparator;
|
|
2650
|
+
sortOrder;
|
|
2651
|
+
constructor(comparator, sortOrder) {
|
|
2652
|
+
this.comparator = comparator;
|
|
2653
|
+
this.sortOrder = sortOrder;
|
|
2654
|
+
}
|
|
2655
|
+
}
|
|
2957
2656
|
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
} reserved for future use
|
|
2657
|
+
var SortOrder$1;
|
|
2658
|
+
(function (SortOrder) {
|
|
2659
|
+
SortOrder[SortOrder["ASCENDING"] = 0] = "ASCENDING";
|
|
2660
|
+
SortOrder[SortOrder["DESCENDING"] = 1] = "DESCENDING";
|
|
2661
|
+
SortOrder[SortOrder["UNSORTED"] = 2] = "UNSORTED";
|
|
2662
|
+
})(SortOrder$1 || (SortOrder$1 = {}));
|
|
2965
2663
|
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
Day of month d Numeric: minimum digits 1
|
|
2988
|
-
dd Numeric: 2 digits + zero padded 01
|
|
2989
|
-
Week day E, EE & EEE Abbreviated Tue
|
|
2990
|
-
EEEE Wide Tuesday
|
|
2991
|
-
EEEEE Narrow T
|
|
2992
|
-
EEEEEE Short Tu
|
|
2993
|
-
Period a, aa & aaa Abbreviated am/pm or AM/PM
|
|
2994
|
-
aaaa Wide (fallback to a when missing) ante meridiem/post meridiem
|
|
2995
|
-
aaaaa Narrow a/p
|
|
2996
|
-
Period* B, BB & BBB Abbreviated mid.
|
|
2997
|
-
BBBB Wide am, pm, midnight, noon, morning, afternoon, evening, night
|
|
2998
|
-
BBBBB Narrow md
|
|
2999
|
-
Period standalone* b, bb & bbb Abbreviated mid.
|
|
3000
|
-
bbbb Wide am, pm, midnight, noon, morning, afternoon, evening, night
|
|
3001
|
-
bbbbb Narrow md
|
|
3002
|
-
Hour 1-12 h Numeric: minimum digits 1, 12
|
|
3003
|
-
hh Numeric: 2 digits + zero padded 01, 12
|
|
3004
|
-
Hour 0-23 H Numeric: minimum digits 0, 23
|
|
3005
|
-
HH Numeric: 2 digits + zero padded 00, 23
|
|
3006
|
-
Minute m Numeric: minimum digits 8, 59
|
|
3007
|
-
mm Numeric: 2 digits + zero padded 08, 59
|
|
3008
|
-
Second s Numeric: minimum digits 0... 59
|
|
3009
|
-
ss Numeric: 2 digits + zero padded 00... 59
|
|
3010
|
-
Fractional seconds S Numeric: 1 digit 0... 9
|
|
3011
|
-
SS Numeric: 2 digits + zero padded 00... 99
|
|
3012
|
-
SSS Numeric: 3 digits + zero padded (= milliseconds) 000... 999
|
|
3013
|
-
Zone z, zz & zzz Short specific non location format (fallback to O) GMT-8
|
|
3014
|
-
zzzz Long specific non location format (fallback to OOOO) GMT-08:00
|
|
3015
|
-
Z, ZZ & ZZZ ISO8601 basic format -0800
|
|
3016
|
-
ZZZZ Long localized GMT format GMT-8:00
|
|
3017
|
-
ZZZZZ ISO8601 extended format + Z indicator for offset 0 (= XXXXX) -08:00
|
|
3018
|
-
O, OO & OOO Short localized GMT format GMT-8
|
|
3019
|
-
OOOO Long localized GMT format GMT-08:00
|
|
2664
|
+
const STAFF_CACHE_ROLE_CATEGORIES = new Set([
|
|
2665
|
+
RoleCategory.ADMIN,
|
|
2666
|
+
RoleCategory.CTSC,
|
|
2667
|
+
RoleCategory.LEGAL_OPERATIONS
|
|
2668
|
+
]);
|
|
2669
|
+
const SUPPORTED_ROLE_CATEGORIES = new Set([
|
|
2670
|
+
...STAFF_CACHE_ROLE_CATEGORIES,
|
|
2671
|
+
RoleCategory.JUDICIAL,
|
|
2672
|
+
]);
|
|
2673
|
+
// Aliases allow the definition to use the shorter, hyphenated form within #ARGUMENT(...)
|
|
2674
|
+
const ROLE_CATEGORY_ALIASES = {
|
|
2675
|
+
LEGAL_OPS: RoleCategory.LEGAL_OPERATIONS
|
|
2676
|
+
};
|
|
2677
|
+
const ARGUMENT_REGEX = /#ARGUMENT\(([^)]*)\)/;
|
|
2678
|
+
const CATEGORY_PREFIX = 'CATEGORY-';
|
|
2679
|
+
const REGION_PREFIX = 'REGION-';
|
|
2680
|
+
/**
|
|
2681
|
+
* Parses the `display_context_parameter` of a StaffUser field to determine the filters to apply
|
|
2682
|
+
* when searching reference data.
|
|
2683
|
+
*
|
|
2684
|
+
* Expected format: `#ARGUMENT(CATEGORY-LEGAL-OPS,CATEGORY-ADMIN,REGION-1235)`
|
|
3020
2685
|
*/
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
2686
|
+
function parseStaffUserSearchConfiguration(displayContextParameter) {
|
|
2687
|
+
if (!displayContextParameter) {
|
|
2688
|
+
return invalidConfiguration();
|
|
2689
|
+
}
|
|
2690
|
+
const match = ARGUMENT_REGEX.exec(displayContextParameter);
|
|
2691
|
+
if (!match?.[1]) {
|
|
2692
|
+
return invalidConfiguration();
|
|
2693
|
+
}
|
|
2694
|
+
const tokens = match[1].split(',').map(token => token.trim());
|
|
2695
|
+
if (tokens.some(token => !token)) {
|
|
2696
|
+
return invalidConfiguration();
|
|
2697
|
+
}
|
|
2698
|
+
const roleCategories = [];
|
|
2699
|
+
for (const token of tokens) {
|
|
2700
|
+
if (token.startsWith(CATEGORY_PREFIX)) {
|
|
2701
|
+
const category = normaliseRoleCategory(token.substring(CATEGORY_PREFIX.length));
|
|
2702
|
+
if (!isStaffUserRoleCategory(category)) {
|
|
2703
|
+
return invalidConfiguration();
|
|
3029
2704
|
}
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
switch (c) {
|
|
3033
|
-
case '\'':
|
|
3034
|
-
if (prev === '\'') {
|
|
3035
|
-
// literal single quote - ignore
|
|
3036
|
-
inQuote = false;
|
|
3037
|
-
}
|
|
3038
|
-
else {
|
|
3039
|
-
inQuote = !inQuote;
|
|
3040
|
-
}
|
|
3041
|
-
break;
|
|
3042
|
-
// Due to formatting constraints on the webapp, all 'd' characters should be replaced with 'D' (for Moment library)
|
|
3043
|
-
// This is because we want the date, not the day (this format will need to be converted back)
|
|
3044
|
-
case 'd':
|
|
3045
|
-
maybePush(result, 'D', inQuote);
|
|
3046
|
-
break;
|
|
3047
|
-
// moment library defines year as capital y
|
|
3048
|
-
case 'y':
|
|
3049
|
-
maybePush(result, 'Y', inQuote);
|
|
3050
|
-
break;
|
|
3051
|
-
case 'e':
|
|
3052
|
-
case 'c':
|
|
3053
|
-
maybePush(result, 'E', inQuote); // no lower case E
|
|
3054
|
-
break;
|
|
3055
|
-
case 'F':
|
|
3056
|
-
maybePush(result, 'W', inQuote);
|
|
3057
|
-
break;
|
|
3058
|
-
case 'K':
|
|
3059
|
-
maybePush(result, 'H', inQuote);
|
|
3060
|
-
break;
|
|
3061
|
-
case 'k':
|
|
3062
|
-
maybePush(result, 'h', inQuote);
|
|
3063
|
-
break;
|
|
3064
|
-
// commented out A change to '***' due to use in moment library for AM/PM
|
|
3065
|
-
// added 'a' specification to stop discrepancy in am/AM pm/PM formatting
|
|
3066
|
-
case 'a':
|
|
3067
|
-
maybePush(result, 'A', inQuote);
|
|
3068
|
-
break;
|
|
3069
|
-
case 'n':
|
|
3070
|
-
case 'N':
|
|
3071
|
-
maybePush(result, `***${c}***`, inQuote); // No way to support A - millisec of day, n - nano of second, N - nano of Day
|
|
3072
|
-
break;
|
|
3073
|
-
case 'V':
|
|
3074
|
-
case 'O':
|
|
3075
|
-
maybePush(result, 'z', inQuote);
|
|
3076
|
-
break;
|
|
3077
|
-
case 'x':
|
|
3078
|
-
case 'X':
|
|
3079
|
-
maybePush(result, 'Z', inQuote);
|
|
3080
|
-
break;
|
|
3081
|
-
default:
|
|
3082
|
-
maybePush(result, c, inQuote);
|
|
2705
|
+
if (!roleCategories.includes(category)) {
|
|
2706
|
+
roleCategories.push(category);
|
|
3083
2707
|
}
|
|
3084
|
-
prev = c;
|
|
3085
2708
|
}
|
|
3086
|
-
|
|
2709
|
+
else if (token.startsWith(REGION_PREFIX)) {
|
|
2710
|
+
// Region filtering is not supported in this version; REGION- tokens are silently ignored
|
|
2711
|
+
}
|
|
2712
|
+
else {
|
|
2713
|
+
return invalidConfiguration();
|
|
2714
|
+
}
|
|
2715
|
+
}
|
|
2716
|
+
if (!roleCategories.length) {
|
|
2717
|
+
return invalidConfiguration();
|
|
2718
|
+
}
|
|
2719
|
+
return {
|
|
2720
|
+
valid: true,
|
|
2721
|
+
configuration: {
|
|
2722
|
+
roleCategories,
|
|
2723
|
+
staffRoleCategories: roleCategories.filter(isStaffCacheRoleCategory),
|
|
2724
|
+
includesJudicial: roleCategories.includes(RoleCategory.JUDICIAL)
|
|
2725
|
+
}
|
|
2726
|
+
};
|
|
2727
|
+
}
|
|
2728
|
+
function normaliseRoleCategory(category) {
|
|
2729
|
+
const normalised = category.replaceAll('-', '_');
|
|
2730
|
+
return ROLE_CATEGORY_ALIASES[normalised] || normalised;
|
|
2731
|
+
}
|
|
2732
|
+
function isStaffUserRoleCategory(category) {
|
|
2733
|
+
return SUPPORTED_ROLE_CATEGORIES.has(category);
|
|
2734
|
+
}
|
|
2735
|
+
function isStaffCacheRoleCategory(category) {
|
|
2736
|
+
return STAFF_CACHE_ROLE_CATEGORIES.has(category);
|
|
2737
|
+
}
|
|
2738
|
+
function invalidConfiguration() {
|
|
2739
|
+
return { valid: false, error: 'INVALID_ROLE_CATEGORIES' };
|
|
2740
|
+
}
|
|
2741
|
+
|
|
2742
|
+
class WorkbasketInputModel {
|
|
2743
|
+
label;
|
|
2744
|
+
order;
|
|
2745
|
+
field;
|
|
2746
|
+
metadata;
|
|
2747
|
+
display_context_parameter;
|
|
2748
|
+
}
|
|
2749
|
+
class WorkbasketInput {
|
|
2750
|
+
workbasketInputs;
|
|
2751
|
+
}
|
|
2752
|
+
|
|
2753
|
+
const USER_DETAILS = 'userDetails';
|
|
2754
|
+
const PUI_CASE_MANAGER = 'pui-case-manager';
|
|
2755
|
+
function getUserDetails(sessionStorageService) {
|
|
2756
|
+
const item = sessionStorageService?.getItem(USER_DETAILS);
|
|
2757
|
+
return safeJsonParse(item, null);
|
|
2758
|
+
}
|
|
2759
|
+
function isInternalUser(sessionStorageService) {
|
|
2760
|
+
const userDetails = getUserDetails(sessionStorageService);
|
|
2761
|
+
return !!userDetails?.roles &&
|
|
2762
|
+
!userDetails.roles.includes(PUI_CASE_MANAGER) &&
|
|
2763
|
+
!userDetails.roles.some(role => role.toLowerCase().includes(RoleKeyword.JUDGE));
|
|
2764
|
+
}
|
|
2765
|
+
function isJudiciaryUser(sessionStorageService) {
|
|
2766
|
+
const userDetails = getUserDetails(sessionStorageService);
|
|
2767
|
+
return !!userDetails?.roles
|
|
2768
|
+
&& (userDetails.roles.some((role) => role.toLowerCase().includes(RoleKeyword.JUDGE)));
|
|
2769
|
+
}
|
|
2770
|
+
function roleHasKeyword(keyword, roleWords) {
|
|
2771
|
+
return roleWords.includes(keyword);
|
|
2772
|
+
}
|
|
2773
|
+
function isWorkAllocationUser(sessionStorageService) {
|
|
2774
|
+
const userDetails = getUserDetails(sessionStorageService);
|
|
2775
|
+
return userDetails?.roles
|
|
2776
|
+
&& !userDetails.roles.includes(PUI_CASE_MANAGER)
|
|
2777
|
+
&&
|
|
2778
|
+
(userDetails.roles.includes('caseworker-ia-iacjudge')
|
|
2779
|
+
|| userDetails.roles.includes('caseworker-ia-caseofficer')
|
|
2780
|
+
|| userDetails.roles.includes('caseworker-ia-admofficer')
|
|
2781
|
+
|| userDetails.roles.includes('caseworker-civil')
|
|
2782
|
+
|| userDetails.roles.includes('caseworker-privatelaw'));
|
|
2783
|
+
}
|
|
2784
|
+
// fallback purely if roleCategories is not available in
|
|
2785
|
+
function getMappedRoleCategories(roles = []) {
|
|
2786
|
+
const roleKeywords = roles.join().split('-').join().split(',');
|
|
2787
|
+
const roleCategoryList = [];
|
|
2788
|
+
if (roleHasKeyword(RoleKeyword.JUDGE, roleKeywords)) {
|
|
2789
|
+
roleCategoryList.push(RoleCategory.JUDICIAL);
|
|
2790
|
+
}
|
|
2791
|
+
if (roleHasKeyword(RoleKeyword.SOLICITOR, roleKeywords)) {
|
|
2792
|
+
roleCategoryList.push(RoleCategory.PROFESSIONAL);
|
|
2793
|
+
}
|
|
2794
|
+
if (roleHasKeyword(RoleKeyword.CITIZEN, roleKeywords)) {
|
|
2795
|
+
roleCategoryList.push(RoleCategory.CITIZEN);
|
|
2796
|
+
}
|
|
2797
|
+
if (roleHasKeyword(RoleKeyword.ADMIN, roleKeywords)) {
|
|
2798
|
+
roleCategoryList.push(RoleCategory.ADMIN);
|
|
2799
|
+
}
|
|
2800
|
+
if (roleHasKeyword(RoleKeyword.CTSC, roleKeywords)) {
|
|
2801
|
+
roleCategoryList.push(RoleCategory.CTSC);
|
|
2802
|
+
}
|
|
2803
|
+
if (roleHasKeyword(RoleKeyword.CASEWORKER, roleKeywords)) {
|
|
2804
|
+
roleCategoryList.push(RoleCategory.LEGAL_OPERATIONS);
|
|
2805
|
+
}
|
|
2806
|
+
if (roleHasKeyword(RoleKeyword.ENFORCEMENT, roleKeywords)) {
|
|
2807
|
+
roleCategoryList.push(RoleCategory.ENFORCEMENT);
|
|
2808
|
+
}
|
|
2809
|
+
return roleCategoryList;
|
|
2810
|
+
}
|
|
2811
|
+
function getAMRoleName(accessType, aMRole) {
|
|
2812
|
+
let roleName = '';
|
|
2813
|
+
switch (aMRole) {
|
|
2814
|
+
case RoleCategory.JUDICIAL:
|
|
2815
|
+
roleName = `${accessType}-access-${AMRoleSuffix.JUDICIARY}`;
|
|
2816
|
+
break;
|
|
2817
|
+
case RoleCategory.PROFESSIONAL:
|
|
2818
|
+
roleName = `${accessType}-access-${AMRoleSuffix.PROFESSIONAL}`;
|
|
2819
|
+
break;
|
|
2820
|
+
case RoleCategory.CITIZEN:
|
|
2821
|
+
roleName = `${accessType}-access-${AMRoleSuffix.CITIZEN}`;
|
|
2822
|
+
break;
|
|
2823
|
+
case RoleCategory.ADMIN:
|
|
2824
|
+
roleName = `${accessType}-access-${AMRoleSuffix.ADMIN}`;
|
|
2825
|
+
break;
|
|
2826
|
+
case RoleCategory.CTSC:
|
|
2827
|
+
roleName = `${accessType}-access-${AMRoleSuffix.CTSC}`;
|
|
2828
|
+
break;
|
|
2829
|
+
case RoleCategory.ENFORCEMENT:
|
|
2830
|
+
roleName = `${accessType}-access-${AMRoleSuffix.ENFORCEMENT}`;
|
|
2831
|
+
break;
|
|
2832
|
+
default:
|
|
2833
|
+
roleName = `${accessType}-access-${AMRoleSuffix.LEGAL_OPERATIONS}`;
|
|
2834
|
+
break;
|
|
2835
|
+
}
|
|
2836
|
+
return roleName;
|
|
2837
|
+
}
|
|
2838
|
+
|
|
2839
|
+
// @dynamic
|
|
2840
|
+
class ActivityService {
|
|
2841
|
+
http;
|
|
2842
|
+
appConfig;
|
|
2843
|
+
sessionStorageService;
|
|
2844
|
+
static get ACTIVITY_VIEW() { return 'view'; }
|
|
2845
|
+
static get ACTIVITY_EDIT() { return 'edit'; }
|
|
2846
|
+
logger = new StructuredLoggerService();
|
|
2847
|
+
constructor(http, appConfig, sessionStorageService) {
|
|
2848
|
+
this.http = http;
|
|
2849
|
+
this.appConfig = appConfig;
|
|
2850
|
+
this.sessionStorageService = sessionStorageService;
|
|
2851
|
+
}
|
|
2852
|
+
get isEnabled() {
|
|
2853
|
+
return this.activityUrl() && this.userAuthorised;
|
|
2854
|
+
}
|
|
2855
|
+
static DUMMY_CASE_REFERENCE = '0';
|
|
2856
|
+
userAuthorised = undefined;
|
|
2857
|
+
static handleHttpError(response) {
|
|
2858
|
+
const error = HttpErrorService.convertToHttpError(response);
|
|
2859
|
+
if (response?.status !== error.status) {
|
|
2860
|
+
error.status = response.status;
|
|
2861
|
+
}
|
|
2862
|
+
return error;
|
|
3087
2863
|
}
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
2864
|
+
getOptions() {
|
|
2865
|
+
const userDetails = safeJsonParse(this.sessionStorageService.getItem(USER_DETAILS));
|
|
2866
|
+
let headers = new HttpHeaders().set('Content-Type', 'application/json');
|
|
2867
|
+
if (userDetails?.token) {
|
|
2868
|
+
headers = headers.set('Authorization', userDetails.token);
|
|
3093
2869
|
}
|
|
3094
|
-
|
|
3095
|
-
|
|
2870
|
+
return {
|
|
2871
|
+
headers,
|
|
2872
|
+
withCredentials: true,
|
|
2873
|
+
observe: 'body',
|
|
2874
|
+
};
|
|
2875
|
+
}
|
|
2876
|
+
getActivities(...caseId) {
|
|
2877
|
+
try {
|
|
2878
|
+
const options = this.getOptions();
|
|
2879
|
+
const url = `${this.activityUrl()}/cases/${caseId.join(',')}/activity`;
|
|
2880
|
+
return this.http
|
|
2881
|
+
.get(url, options, false, ActivityService.handleHttpError)
|
|
2882
|
+
.pipe(map(response => response));
|
|
2883
|
+
}
|
|
2884
|
+
catch (error) {
|
|
2885
|
+
this.logUserMayNotBeAuthenticated(error);
|
|
3096
2886
|
}
|
|
3097
|
-
return dateFormat;
|
|
3098
2887
|
}
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
2888
|
+
postActivity(caseId, activity) {
|
|
2889
|
+
try {
|
|
2890
|
+
const options = this.getOptions();
|
|
2891
|
+
const url = `${this.activityUrl()}/cases/${caseId}/activity`;
|
|
2892
|
+
const body = { activity };
|
|
2893
|
+
return this.http
|
|
2894
|
+
.post(url, body, options, false)
|
|
2895
|
+
.pipe(map(response => response));
|
|
3104
2896
|
}
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
dateFormat = dateFormat.replace('m', '');
|
|
2897
|
+
catch (error) {
|
|
2898
|
+
this.logUserMayNotBeAuthenticated(error);
|
|
3108
2899
|
}
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
2900
|
+
}
|
|
2901
|
+
verifyUserIsAuthorized() {
|
|
2902
|
+
if (this.sessionStorageService.getItem(USER_DETAILS) && this.activityUrl() && this.userAuthorised === undefined) {
|
|
2903
|
+
this.getActivities(ActivityService.DUMMY_CASE_REFERENCE).subscribe(() => this.userAuthorised = true, error => {
|
|
2904
|
+
this.userAuthorised = [401, 403].indexOf(error.status) <= -1;
|
|
2905
|
+
});
|
|
3113
2906
|
}
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
2907
|
+
}
|
|
2908
|
+
activityUrl() {
|
|
2909
|
+
return this.appConfig.getActivityUrl();
|
|
2910
|
+
}
|
|
2911
|
+
logUserMayNotBeAuthenticated(error) {
|
|
2912
|
+
this.logger.error('User may not be authenticated. Activity request was not sent.', { error });
|
|
2913
|
+
}
|
|
2914
|
+
static ɵfac = function ActivityService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ActivityService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig), i0.ɵɵinject(SessionStorageService)); };
|
|
2915
|
+
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ActivityService, factory: ActivityService.ɵfac });
|
|
2916
|
+
}
|
|
2917
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ActivityService, [{
|
|
2918
|
+
type: Injectable
|
|
2919
|
+
}], () => [{ type: HttpService }, { type: AbstractAppConfig }, { type: SessionStorageService }], null); })();
|
|
2920
|
+
|
|
2921
|
+
// @dynamic
|
|
2922
|
+
class ActivityPollingService {
|
|
2923
|
+
activityService;
|
|
2924
|
+
ngZone;
|
|
2925
|
+
config;
|
|
2926
|
+
logger = new StructuredLoggerService();
|
|
2927
|
+
pendingRequests = new Map();
|
|
2928
|
+
currentTimeoutHandle;
|
|
2929
|
+
pollActivitiesSubscription;
|
|
2930
|
+
pollConfig;
|
|
2931
|
+
batchCollectionDelayMs;
|
|
2932
|
+
maxRequestsPerBatch;
|
|
2933
|
+
constructor(activityService, ngZone, config) {
|
|
2934
|
+
this.activityService = activityService;
|
|
2935
|
+
this.ngZone = ngZone;
|
|
2936
|
+
this.config = config;
|
|
2937
|
+
this.pollConfig = {
|
|
2938
|
+
interval: config.getActivityNexPollRequestMs(),
|
|
2939
|
+
attempts: config.getActivityRetry()
|
|
2940
|
+
};
|
|
2941
|
+
this.batchCollectionDelayMs = config.getActivityBatchCollectionDelayMs();
|
|
2942
|
+
this.maxRequestsPerBatch = config.getActivityMaxRequestPerBatch();
|
|
2943
|
+
}
|
|
2944
|
+
get isEnabled() {
|
|
2945
|
+
return this.activityService.isEnabled;
|
|
2946
|
+
}
|
|
2947
|
+
subscribeToActivity(caseId, done) {
|
|
2948
|
+
if (!this.isEnabled) {
|
|
2949
|
+
return new Subject();
|
|
3117
2950
|
}
|
|
3118
|
-
|
|
2951
|
+
let subject = this.pendingRequests.get(caseId);
|
|
2952
|
+
if (subject) {
|
|
2953
|
+
subject.subscribe(done);
|
|
2954
|
+
}
|
|
2955
|
+
else {
|
|
2956
|
+
// Only the first pending request should start the batch collection timer.
|
|
2957
|
+
const wasEmpty = this.pendingRequests.size === 0;
|
|
2958
|
+
subject = new Subject();
|
|
2959
|
+
subject.subscribe(done);
|
|
2960
|
+
this.addPendingRequest(caseId, subject);
|
|
2961
|
+
if (wasEmpty) {
|
|
2962
|
+
this.ngZone.runOutsideAngular(() => {
|
|
2963
|
+
this.currentTimeoutHandle = setTimeout(() => this.ngZone.run(() => {
|
|
2964
|
+
this.flushRequests();
|
|
2965
|
+
}), this.batchCollectionDelayMs);
|
|
2966
|
+
});
|
|
2967
|
+
}
|
|
2968
|
+
}
|
|
2969
|
+
if (this.pendingRequests.size >= this.maxRequestsPerBatch) {
|
|
2970
|
+
this.flushRequests();
|
|
2971
|
+
}
|
|
2972
|
+
return subject;
|
|
3119
2973
|
}
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
2974
|
+
stopPolling() {
|
|
2975
|
+
if (this.pollActivitiesSubscription) {
|
|
2976
|
+
this.pollActivitiesSubscription.unsubscribe();
|
|
2977
|
+
}
|
|
3124
2978
|
}
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
2979
|
+
flushRequests() {
|
|
2980
|
+
if (this.currentTimeoutHandle) {
|
|
2981
|
+
clearTimeout(this.currentTimeoutHandle);
|
|
2982
|
+
this.currentTimeoutHandle = undefined;
|
|
2983
|
+
}
|
|
2984
|
+
if (!this.pendingRequests.size) {
|
|
2985
|
+
return;
|
|
2986
|
+
}
|
|
2987
|
+
const requests = new Map(this.pendingRequests);
|
|
2988
|
+
this.pendingRequests.clear();
|
|
2989
|
+
this.performBatchRequest(requests);
|
|
3128
2990
|
}
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
2991
|
+
pollActivities(...caseIds) {
|
|
2992
|
+
if (!this.isEnabled) {
|
|
2993
|
+
return EMPTY;
|
|
2994
|
+
}
|
|
2995
|
+
return this.polling(this.activityService.getActivities(...caseIds), this.pollConfig);
|
|
3132
2996
|
}
|
|
3133
|
-
|
|
3134
|
-
return this.
|
|
3135
|
-
value.toLowerCase().indexOf('d') === -1 &&
|
|
3136
|
-
value.indexOf('M') === -1 &&
|
|
3137
|
-
value.toLowerCase().indexOf('y') >= 0;
|
|
2997
|
+
postViewActivity(caseId) {
|
|
2998
|
+
return this.postActivity(caseId, ActivityService.ACTIVITY_VIEW);
|
|
3138
2999
|
}
|
|
3139
|
-
|
|
3140
|
-
return this.
|
|
3000
|
+
postEditActivity(caseId) {
|
|
3001
|
+
return this.postActivity(caseId, ActivityService.ACTIVITY_EDIT);
|
|
3141
3002
|
}
|
|
3142
|
-
|
|
3143
|
-
|
|
3003
|
+
performBatchRequest(requests) {
|
|
3004
|
+
const caseIds = Array.from(requests.keys()).join();
|
|
3005
|
+
this.ngZone.runOutsideAngular(() => {
|
|
3006
|
+
// run polling outside angular zone so it does not trigger change detection
|
|
3007
|
+
this.pollActivitiesSubscription = this.pollActivities(caseIds).subscribe({
|
|
3008
|
+
// process activity inside zone so it triggers change detection for activity.component.ts
|
|
3009
|
+
next: (activities) => this.ngZone.run(() => {
|
|
3010
|
+
activities.forEach((activity) => {
|
|
3011
|
+
// Ignore activities returned for cases outside this local batch.
|
|
3012
|
+
requests.get(activity.caseId)?.next(activity);
|
|
3013
|
+
});
|
|
3014
|
+
}),
|
|
3015
|
+
error: (err) => this.ngZone.run(() => {
|
|
3016
|
+
this.logger.error('Error while polling activities.', { error: err });
|
|
3017
|
+
Array.from(requests.values()).forEach((subject) => subject.error(err));
|
|
3018
|
+
})
|
|
3019
|
+
});
|
|
3020
|
+
});
|
|
3144
3021
|
}
|
|
3145
|
-
|
|
3146
|
-
|
|
3022
|
+
postActivity(caseId, activityType) {
|
|
3023
|
+
if (!this.isEnabled) {
|
|
3024
|
+
return EMPTY;
|
|
3025
|
+
}
|
|
3026
|
+
const pollingConfig = {
|
|
3027
|
+
...this.pollConfig,
|
|
3028
|
+
interval: 5000 // inline with CCD Backend
|
|
3029
|
+
};
|
|
3030
|
+
return this.polling(this.activityService.postActivity(caseId, activityType), pollingConfig);
|
|
3147
3031
|
}
|
|
3148
|
-
|
|
3149
|
-
|
|
3032
|
+
addPendingRequest(caseId, subject) {
|
|
3033
|
+
this.pendingRequests.set(caseId, subject);
|
|
3034
|
+
// Components complete their returned Subject on destroy; remove it so a later same-case subscription gets a fresh Subject.
|
|
3035
|
+
subject.subscribe({
|
|
3036
|
+
complete: () => this.removePendingRequest(caseId, subject),
|
|
3037
|
+
error: () => this.removePendingRequest(caseId, subject)
|
|
3038
|
+
});
|
|
3039
|
+
}
|
|
3040
|
+
removePendingRequest(caseId, subject) {
|
|
3041
|
+
if (this.pendingRequests.get(caseId) !== subject) {
|
|
3042
|
+
return;
|
|
3043
|
+
}
|
|
3044
|
+
this.pendingRequests.delete(caseId);
|
|
3045
|
+
if (!this.pendingRequests.size && this.currentTimeoutHandle) {
|
|
3046
|
+
clearTimeout(this.currentTimeoutHandle);
|
|
3047
|
+
this.currentTimeoutHandle = undefined;
|
|
3048
|
+
}
|
|
3049
|
+
}
|
|
3050
|
+
polling(request$, options) {
|
|
3051
|
+
const pollingOptions = {
|
|
3052
|
+
interval: options.interval,
|
|
3053
|
+
attempts: options.attempts ?? 9,
|
|
3054
|
+
exponentialUnit: options.exponentialUnit ?? 1000
|
|
3055
|
+
};
|
|
3056
|
+
return concat(request$, defer(() => timer(pollingOptions.interval).pipe(switchMap(() => request$))).pipe(repeat())).pipe(
|
|
3057
|
+
// Preserve consecutive-failure retry behaviour using the current RxJS retry config.
|
|
3058
|
+
retry({
|
|
3059
|
+
count: pollingOptions.attempts,
|
|
3060
|
+
delay: (_error, retryCount) => timer(this.getExponentialRetryDelay(retryCount, pollingOptions.exponentialUnit)),
|
|
3061
|
+
resetOnSuccess: true
|
|
3062
|
+
}));
|
|
3063
|
+
}
|
|
3064
|
+
getExponentialRetryDelay(consecutiveErrorsCount, exponentialUnit) {
|
|
3065
|
+
return Math.pow(2, consecutiveErrorsCount - 1) * exponentialUnit;
|
|
3066
|
+
}
|
|
3067
|
+
static ɵfac = function ActivityPollingService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ActivityPollingService)(i0.ɵɵinject(ActivityService), i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(AbstractAppConfig)); };
|
|
3068
|
+
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ActivityPollingService, factory: ActivityPollingService.ɵfac });
|
|
3150
3069
|
}
|
|
3151
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(
|
|
3070
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ActivityPollingService, [{
|
|
3152
3071
|
type: Injectable
|
|
3153
|
-
}],
|
|
3072
|
+
}], () => [{ type: ActivityService }, { type: i0.NgZone }, { type: AbstractAppConfig }], null); })();
|
|
3154
3073
|
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3074
|
+
function ActivityComponent_div_0_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
3075
|
+
i0.ɵɵelementStart(0, "div");
|
|
3076
|
+
i0.ɵɵelement(1, "ccd-activity-icon", 5);
|
|
3077
|
+
i0.ɵɵpipe(2, "rpxTranslate");
|
|
3078
|
+
i0.ɵɵelementEnd();
|
|
3079
|
+
} if (rf & 2) {
|
|
3080
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
3081
|
+
i0.ɵɵclassProp("activityEditorsAndViewersIcons", ctx_r0.viewersPresent())("activityEditorsIcon", !ctx_r0.viewersPresent());
|
|
3082
|
+
i0.ɵɵadvance();
|
|
3083
|
+
i0.ɵɵproperty("description", i0.ɵɵpipeBind1(2, 5, ctx_r0.editorsText));
|
|
3084
|
+
} }
|
|
3085
|
+
function ActivityComponent_div_0_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
3086
|
+
i0.ɵɵelementStart(0, "div", 6);
|
|
3087
|
+
i0.ɵɵelement(1, "ccd-activity-icon", 7);
|
|
3088
|
+
i0.ɵɵpipe(2, "rpxTranslate");
|
|
3089
|
+
i0.ɵɵelementEnd();
|
|
3090
|
+
} if (rf & 2) {
|
|
3091
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
3092
|
+
i0.ɵɵadvance();
|
|
3093
|
+
i0.ɵɵproperty("description", i0.ɵɵpipeBind1(2, 1, ctx_r0.viewersText));
|
|
3094
|
+
} }
|
|
3095
|
+
function ActivityComponent_div_0_div_3_Template(rf, ctx) { if (rf & 1) {
|
|
3096
|
+
i0.ɵɵelementStart(0, "div");
|
|
3097
|
+
i0.ɵɵelement(1, "ccd-activity-banner", 8);
|
|
3098
|
+
i0.ɵɵpipe(2, "rpxTranslate");
|
|
3099
|
+
i0.ɵɵelementEnd();
|
|
3100
|
+
} if (rf & 2) {
|
|
3101
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
3102
|
+
i0.ɵɵadvance();
|
|
3103
|
+
i0.ɵɵproperty("description", i0.ɵɵpipeBind1(2, 1, ctx_r0.editorsText));
|
|
3104
|
+
} }
|
|
3105
|
+
function ActivityComponent_div_0_div_4_Template(rf, ctx) { if (rf & 1) {
|
|
3106
|
+
i0.ɵɵelementStart(0, "div");
|
|
3107
|
+
i0.ɵɵelement(1, "ccd-activity-banner", 9);
|
|
3108
|
+
i0.ɵɵpipe(2, "rpxTranslate");
|
|
3109
|
+
i0.ɵɵelementEnd();
|
|
3110
|
+
} if (rf & 2) {
|
|
3111
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
3112
|
+
i0.ɵɵadvance();
|
|
3113
|
+
i0.ɵɵproperty("description", i0.ɵɵpipeBind1(2, 1, ctx_r0.viewersText));
|
|
3114
|
+
} }
|
|
3115
|
+
function ActivityComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
3116
|
+
i0.ɵɵelementStart(0, "div", 1);
|
|
3117
|
+
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);
|
|
3118
|
+
i0.ɵɵelementEnd();
|
|
3119
|
+
} if (rf & 2) {
|
|
3120
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
3121
|
+
i0.ɵɵadvance();
|
|
3122
|
+
i0.ɵɵproperty("ngIf", ctx_r0.displayMode === ctx_r0.dspMode.ICON && ctx_r0.editorsPresent());
|
|
3123
|
+
i0.ɵɵadvance();
|
|
3124
|
+
i0.ɵɵproperty("ngIf", ctx_r0.displayMode === ctx_r0.dspMode.ICON && ctx_r0.viewersPresent());
|
|
3125
|
+
i0.ɵɵadvance();
|
|
3126
|
+
i0.ɵɵproperty("ngIf", ctx_r0.displayMode === ctx_r0.dspMode.BANNER && ctx_r0.editorsPresent());
|
|
3127
|
+
i0.ɵɵadvance();
|
|
3128
|
+
i0.ɵɵproperty("ngIf", ctx_r0.displayMode === ctx_r0.dspMode.BANNER && ctx_r0.viewersPresent());
|
|
3129
|
+
} }
|
|
3130
|
+
class ActivityComponent {
|
|
3131
|
+
activityPollingService;
|
|
3132
|
+
activity;
|
|
3133
|
+
dspMode = DisplayMode;
|
|
3134
|
+
viewersText;
|
|
3135
|
+
editorsText;
|
|
3136
|
+
subscription;
|
|
3137
|
+
caseId;
|
|
3138
|
+
displayMode;
|
|
3139
|
+
VIEWERS_PREFIX = '';
|
|
3140
|
+
VIEWERS_SUFFIX = 'viewing this case';
|
|
3141
|
+
EDITORS_PREFIX = 'This case is being updated by ';
|
|
3142
|
+
EDITORS_SUFFIX = '';
|
|
3143
|
+
constructor(activityPollingService) {
|
|
3144
|
+
this.activityPollingService = activityPollingService;
|
|
3168
3145
|
}
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3146
|
+
ngOnInit() {
|
|
3147
|
+
this.activity = new Activity();
|
|
3148
|
+
this.activity.caseId = this.caseId;
|
|
3149
|
+
this.activity.editors = [];
|
|
3150
|
+
this.activity.unknownEditors = 0;
|
|
3151
|
+
this.activity.viewers = [];
|
|
3152
|
+
this.activity.unknownViewers = 0;
|
|
3153
|
+
this.viewersText = '';
|
|
3154
|
+
this.editorsText = '';
|
|
3155
|
+
this.subscription = this.activityPollingService.subscribeToActivity(this.caseId, newActivity => this.onActivityChange(newActivity));
|
|
3156
|
+
}
|
|
3157
|
+
onActivityChange(newActivity) {
|
|
3158
|
+
this.activity = newActivity;
|
|
3159
|
+
this.viewersText = this.generateDescription(this.VIEWERS_PREFIX, this.VIEWERS_SUFFIX, this.activity.viewers, this.activity.unknownViewers);
|
|
3160
|
+
this.editorsText = this.generateDescription(this.EDITORS_PREFIX, this.EDITORS_SUFFIX, this.activity.editors, this.activity.unknownEditors);
|
|
3161
|
+
}
|
|
3162
|
+
isActivityEnabled() {
|
|
3163
|
+
return this.activityPollingService.isEnabled;
|
|
3164
|
+
}
|
|
3165
|
+
isActiveCase() {
|
|
3166
|
+
return this.activity.editors.length || this.activity.viewers.length || this.activity.unknownEditors || this.activity.unknownViewers;
|
|
3167
|
+
}
|
|
3168
|
+
viewersPresent() {
|
|
3169
|
+
return (this.activity.viewers.length > 0 || this.activity.unknownViewers > 0);
|
|
3170
|
+
}
|
|
3171
|
+
editorsPresent() {
|
|
3172
|
+
return (this.activity.editors.length > 0 || this.activity.unknownEditors > 0);
|
|
3173
|
+
}
|
|
3174
|
+
ngOnDestroy() {
|
|
3175
|
+
if (this.subscription) {
|
|
3176
|
+
this.subscription.complete();
|
|
3177
|
+
}
|
|
3178
|
+
this.activityPollingService.stopPolling();
|
|
3179
|
+
}
|
|
3180
|
+
generateDescription(prefix, suffix, namesArray, unknownCount) {
|
|
3181
|
+
let resultText = prefix;
|
|
3182
|
+
resultText += namesArray.map(activityInfo => `${activityInfo.forename} ${activityInfo.surname}`).join(', ');
|
|
3183
|
+
if (unknownCount > 0) {
|
|
3184
|
+
resultText += (namesArray.length > 0 ? ` and ${unknownCount} other` : `${unknownCount} user`);
|
|
3185
|
+
resultText += (unknownCount > 1 ? 's' : '');
|
|
3186
|
+
}
|
|
3187
|
+
else {
|
|
3188
|
+
resultText = this.replaceLastCommaWithAnd(resultText);
|
|
3189
|
+
}
|
|
3190
|
+
if (suffix.length > 0) {
|
|
3191
|
+
if (namesArray.length + unknownCount > 1) {
|
|
3192
|
+
resultText += ` are ${suffix}`;
|
|
3206
3193
|
}
|
|
3207
3194
|
else {
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3195
|
+
resultText += ` is ${suffix}`;
|
|
3196
|
+
}
|
|
3197
|
+
}
|
|
3198
|
+
return resultText;
|
|
3199
|
+
}
|
|
3200
|
+
replaceLastCommaWithAnd(str) {
|
|
3201
|
+
return str.trim().replace(/,([^,]*)$/, ' and $1').split(' ').join(' ');
|
|
3202
|
+
}
|
|
3203
|
+
static ɵfac = function ActivityComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ActivityComponent)(i0.ɵɵdirectiveInject(ActivityPollingService)); };
|
|
3204
|
+
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) {
|
|
3205
|
+
i0.ɵɵtemplate(0, ActivityComponent_div_0_Template, 5, 4, "div", 0);
|
|
3206
|
+
} if (rf & 2) {
|
|
3207
|
+
i0.ɵɵproperty("ngIf", ctx.isActivityEnabled());
|
|
3208
|
+
} }, 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}"] });
|
|
3209
|
+
}
|
|
3210
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ActivityComponent, [{
|
|
3211
|
+
type: Component,
|
|
3212
|
+
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"] }]
|
|
3213
|
+
}], () => [{ type: ActivityPollingService }], { caseId: [{
|
|
3214
|
+
type: Input
|
|
3215
|
+
}], displayMode: [{
|
|
3216
|
+
type: Input
|
|
3217
|
+
}] }); })();
|
|
3218
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ActivityComponent, { className: "ActivityComponent", filePath: "lib/shared/components/activity/activity.component.ts", lineNumber: 12 }); })();
|
|
3219
|
+
|
|
3220
|
+
class ActivityModule {
|
|
3221
|
+
static ɵfac = function ActivityModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ActivityModule)(); };
|
|
3222
|
+
static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: ActivityModule });
|
|
3223
|
+
static ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ providers: [
|
|
3224
|
+
ActivityService,
|
|
3225
|
+
ActivityPollingService,
|
|
3226
|
+
SessionStorageService,
|
|
3227
|
+
], imports: [CommonModule,
|
|
3228
|
+
RouterModule,
|
|
3229
|
+
RpxTranslationModule.forChild()] });
|
|
3230
|
+
}
|
|
3231
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ActivityModule, [{
|
|
3232
|
+
type: NgModule,
|
|
3233
|
+
args: [{
|
|
3234
|
+
imports: [
|
|
3235
|
+
CommonModule,
|
|
3236
|
+
RouterModule,
|
|
3237
|
+
RpxTranslationModule.forChild()
|
|
3238
|
+
],
|
|
3239
|
+
declarations: [
|
|
3240
|
+
ActivityComponent,
|
|
3241
|
+
ActivityBannerComponent,
|
|
3242
|
+
ActivityIconComponent,
|
|
3243
|
+
],
|
|
3244
|
+
exports: [
|
|
3245
|
+
ActivityComponent,
|
|
3246
|
+
ActivityBannerComponent,
|
|
3247
|
+
ActivityIconComponent,
|
|
3248
|
+
],
|
|
3249
|
+
providers: [
|
|
3250
|
+
ActivityService,
|
|
3251
|
+
ActivityPollingService,
|
|
3252
|
+
SessionStorageService,
|
|
3253
|
+
]
|
|
3254
|
+
}]
|
|
3255
|
+
}], null, null); })();
|
|
3256
|
+
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(ActivityModule, { declarations: [ActivityComponent,
|
|
3257
|
+
ActivityBannerComponent,
|
|
3258
|
+
ActivityIconComponent], imports: [CommonModule,
|
|
3259
|
+
RouterModule, i1.RpxTranslationModule], exports: [ActivityComponent,
|
|
3260
|
+
ActivityBannerComponent,
|
|
3261
|
+
ActivityIconComponent] }); })();
|
|
3262
|
+
|
|
3263
|
+
class AlertService {
|
|
3264
|
+
router;
|
|
3265
|
+
rpxTranslationService;
|
|
3266
|
+
// the preserved messages
|
|
3267
|
+
preservedError = '';
|
|
3268
|
+
preservedWarning = '';
|
|
3269
|
+
preservedSuccess = '';
|
|
3270
|
+
// TODO: Remove
|
|
3271
|
+
message;
|
|
3272
|
+
level;
|
|
3273
|
+
successes;
|
|
3274
|
+
errors;
|
|
3275
|
+
warnings;
|
|
3276
|
+
// TODO: Remove
|
|
3277
|
+
alerts;
|
|
3278
|
+
successObserver;
|
|
3279
|
+
errorObserver;
|
|
3280
|
+
warningObserver;
|
|
3281
|
+
// TODO: Remove
|
|
3282
|
+
alertObserver;
|
|
3283
|
+
preserveAlerts = false;
|
|
3284
|
+
constructor(router, rpxTranslationService) {
|
|
3285
|
+
this.router = router;
|
|
3286
|
+
this.rpxTranslationService = rpxTranslationService;
|
|
3287
|
+
this.successes = Observable
|
|
3288
|
+
.create(observer => this.successObserver = observer).pipe(publish(), refCount());
|
|
3289
|
+
this.successes.subscribe();
|
|
3290
|
+
this.errors = Observable
|
|
3291
|
+
.create(observer => this.errorObserver = observer).pipe(publish(), refCount());
|
|
3292
|
+
this.errors.subscribe();
|
|
3293
|
+
this.warnings = Observable
|
|
3294
|
+
.create(observer => this.warningObserver = observer).pipe(publish(), refCount());
|
|
3295
|
+
this.warnings.subscribe();
|
|
3296
|
+
// TODO: Remove
|
|
3297
|
+
this.alerts = Observable
|
|
3298
|
+
.create(observer => this.alertObserver = observer).pipe(publish(), refCount());
|
|
3299
|
+
this.alerts.subscribe();
|
|
3300
|
+
this.router
|
|
3301
|
+
.events
|
|
3302
|
+
.subscribe(event => {
|
|
3303
|
+
if (event instanceof NavigationStart) {
|
|
3304
|
+
// if there is no longer a preserve alerts setting for the page then clear all observers and preserved messages
|
|
3305
|
+
if (!this.preserveAlerts) {
|
|
3306
|
+
this.clear();
|
|
3223
3307
|
}
|
|
3308
|
+
// if not, then set the preserving of alerts to false so rendering to a new page
|
|
3309
|
+
this.preserveAlerts = false;
|
|
3224
3310
|
}
|
|
3225
|
-
}
|
|
3226
|
-
return resultDate;
|
|
3311
|
+
});
|
|
3227
3312
|
}
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3313
|
+
clear() {
|
|
3314
|
+
this.successObserver.next(null);
|
|
3315
|
+
this.errorObserver.next(null);
|
|
3316
|
+
this.warningObserver.next(null);
|
|
3317
|
+
this.preservedError = '';
|
|
3318
|
+
this.preservedWarning = '';
|
|
3319
|
+
this.preservedSuccess = '';
|
|
3320
|
+
// EUI-3381.
|
|
3321
|
+
this.alertObserver.next(null);
|
|
3322
|
+
this.message = '';
|
|
3323
|
+
}
|
|
3324
|
+
error({ phrase, replacements }) {
|
|
3325
|
+
const message = this.getTranslationWithReplacements(phrase, replacements);
|
|
3326
|
+
this.preservedError = this.preserveMessages(message);
|
|
3327
|
+
const alert = { level: 'error', message };
|
|
3328
|
+
this.errorObserver.next(alert);
|
|
3329
|
+
// EUI-3381.
|
|
3330
|
+
this.push(alert);
|
|
3331
|
+
}
|
|
3332
|
+
warning({ phrase, replacements }) {
|
|
3333
|
+
const message = this.getTranslationWithReplacements(phrase, replacements);
|
|
3334
|
+
this.preservedWarning = this.preserveMessages(message);
|
|
3335
|
+
const alert = { level: 'warning', message };
|
|
3336
|
+
this.warningObserver.next(alert);
|
|
3337
|
+
// EUI-3381.
|
|
3338
|
+
this.push(alert);
|
|
3339
|
+
}
|
|
3340
|
+
success({ preserve, phrase, replacements }) {
|
|
3341
|
+
const message = this.getTranslationWithReplacements(phrase, replacements);
|
|
3342
|
+
this.preserveAlerts = preserve || this.preserveAlerts;
|
|
3343
|
+
const alert = { level: 'success', message };
|
|
3344
|
+
this.preservedSuccess = this.preserveMessages(message);
|
|
3345
|
+
this.successObserver.next(alert);
|
|
3346
|
+
// EUI-3381.
|
|
3347
|
+
this.push(alert);
|
|
3348
|
+
}
|
|
3349
|
+
getTranslationWithReplacements(phrase, replacements) {
|
|
3350
|
+
let message;
|
|
3351
|
+
if (replacements) {
|
|
3352
|
+
this.rpxTranslationService.getTranslationWithReplacements$(phrase, replacements).subscribe(translation => {
|
|
3353
|
+
message = translation;
|
|
3354
|
+
});
|
|
3231
3355
|
}
|
|
3232
3356
|
else {
|
|
3233
|
-
|
|
3357
|
+
this.rpxTranslationService.getTranslation$(phrase).subscribe(translation => {
|
|
3358
|
+
message = translation;
|
|
3359
|
+
});
|
|
3234
3360
|
}
|
|
3361
|
+
return message;
|
|
3235
3362
|
}
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
getDate(match) {
|
|
3241
|
-
const year = this.toInt(match[1]);
|
|
3242
|
-
const month = this.toInt(match[2]) - 1;
|
|
3243
|
-
const day = this.toInt(match[3]);
|
|
3244
|
-
let resultDate;
|
|
3245
|
-
if (match[4] && match[5] && match[6]) {
|
|
3246
|
-
const hour = this.toInt(match[4]);
|
|
3247
|
-
const minutes = this.toInt(match[5]);
|
|
3248
|
-
const seconds = this.toInt(match[6]);
|
|
3249
|
-
resultDate = new Date(year, month, day, hour, minutes, seconds, 0);
|
|
3363
|
+
setPreserveAlerts(preserve, urlInfo) {
|
|
3364
|
+
// if there is no url setting then just preserve the messages
|
|
3365
|
+
if (!urlInfo) {
|
|
3366
|
+
this.preserveAlerts = preserve;
|
|
3250
3367
|
}
|
|
3251
3368
|
else {
|
|
3252
|
-
|
|
3369
|
+
// check if the url includes the sting given
|
|
3370
|
+
this.preserveAlerts = this.currentUrlIncludesInfo(preserve, urlInfo);
|
|
3253
3371
|
}
|
|
3254
|
-
return resultDate;
|
|
3255
3372
|
}
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3373
|
+
currentUrlIncludesInfo(preserve, urlInfo) {
|
|
3374
|
+
// loop through the list of strings and check the router includes all of them
|
|
3375
|
+
for (const urlSnip of urlInfo) {
|
|
3376
|
+
if (!this.router.url.includes(urlSnip)) {
|
|
3377
|
+
// return the opposite boolean value if the router does not include one of the strings
|
|
3378
|
+
return !preserve;
|
|
3379
|
+
}
|
|
3263
3380
|
}
|
|
3264
|
-
return
|
|
3381
|
+
// return the boolean value if all strings are in the url
|
|
3382
|
+
return preserve;
|
|
3265
3383
|
}
|
|
3266
|
-
|
|
3267
|
-
return
|
|
3384
|
+
isPreserveAlerts() {
|
|
3385
|
+
return this.preserveAlerts;
|
|
3268
3386
|
}
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3387
|
+
preserveMessages(message) {
|
|
3388
|
+
// preserve the messages if set to preserve them
|
|
3389
|
+
if (this.isPreserveAlerts()) {
|
|
3390
|
+
return message;
|
|
3391
|
+
}
|
|
3392
|
+
else {
|
|
3393
|
+
return '';
|
|
3394
|
+
}
|
|
3272
3395
|
}
|
|
3273
|
-
|
|
3274
|
-
|
|
3396
|
+
// TODO: Remove
|
|
3397
|
+
push(msgObject) {
|
|
3398
|
+
this.message = msgObject.message;
|
|
3399
|
+
this.level = msgObject.level;
|
|
3400
|
+
this.alertObserver.next({
|
|
3401
|
+
level: this.level,
|
|
3402
|
+
message: this.message
|
|
3403
|
+
});
|
|
3404
|
+
}
|
|
3405
|
+
static ɵfac = function AlertService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AlertService)(i0.ɵɵinject(i1$2.Router), i0.ɵɵinject(i1.RpxTranslationService)); };
|
|
3406
|
+
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: AlertService, factory: AlertService.ɵfac });
|
|
3275
3407
|
}
|
|
3276
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(
|
|
3277
|
-
type:
|
|
3278
|
-
|
|
3279
|
-
name: 'ccdDate',
|
|
3280
|
-
standalone: false
|
|
3281
|
-
}]
|
|
3282
|
-
}], () => [{ type: FormatTranslatorService }], null); })();
|
|
3408
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AlertService, [{
|
|
3409
|
+
type: Injectable
|
|
3410
|
+
}], () => [{ type: i1$2.Router }, { type: i1.RpxTranslationService }], null); })();
|
|
3283
3411
|
|
|
3284
|
-
class
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3412
|
+
class DraftService {
|
|
3413
|
+
http;
|
|
3414
|
+
appConfig;
|
|
3415
|
+
errorService;
|
|
3416
|
+
static V2_MEDIATYPE_DRAFT_CREATE = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-draft-create.v2+json;charset=UTF-8';
|
|
3417
|
+
static V2_MEDIATYPE_DRAFT_UPDATE = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-draft-update.v2+json;charset=UTF-8';
|
|
3418
|
+
static V2_MEDIATYPE_DRAFT_READ = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-draft-read.v2+json;charset=UTF-8';
|
|
3419
|
+
static V2_MEDIATYPE_DRAFT_DELETE = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-draft-delete.v2+json;charset=UTF-8';
|
|
3420
|
+
constructor(http, appConfig, errorService) {
|
|
3421
|
+
this.http = http;
|
|
3422
|
+
this.appConfig = appConfig;
|
|
3423
|
+
this.errorService = errorService;
|
|
3288
3424
|
}
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3425
|
+
createDraft(ctid, eventData) {
|
|
3426
|
+
const saveDraftEndpoint = this.appConfig.getCreateOrUpdateDraftsUrl(ctid);
|
|
3427
|
+
const headers = new HttpHeaders()
|
|
3428
|
+
.set('experimental', 'true')
|
|
3429
|
+
.set('Accept', DraftService.V2_MEDIATYPE_DRAFT_CREATE)
|
|
3430
|
+
.set('Content-Type', 'application/json');
|
|
3431
|
+
return this.http
|
|
3432
|
+
.post(saveDraftEndpoint, eventData, { headers, observe: 'body' })
|
|
3433
|
+
.pipe(catchError((error) => {
|
|
3434
|
+
this.errorService.setError(error);
|
|
3435
|
+
return throwError(error);
|
|
3436
|
+
}));
|
|
3298
3437
|
}
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3438
|
+
updateDraft(ctid, draftId, eventData) {
|
|
3439
|
+
const saveDraftEndpoint = `${this.appConfig.getCreateOrUpdateDraftsUrl(ctid)}/${draftId}`;
|
|
3440
|
+
const headers = new HttpHeaders()
|
|
3441
|
+
.set('experimental', 'true')
|
|
3442
|
+
.set('Accept', DraftService.V2_MEDIATYPE_DRAFT_UPDATE)
|
|
3443
|
+
.set('Content-Type', 'application/json');
|
|
3444
|
+
return this.http
|
|
3445
|
+
.put(saveDraftEndpoint, eventData, { headers, observe: 'body' })
|
|
3446
|
+
.pipe(catchError((error) => {
|
|
3447
|
+
this.errorService.setError(error);
|
|
3448
|
+
return throwError(error);
|
|
3449
|
+
}));
|
|
3450
|
+
}
|
|
3451
|
+
getDraft(draftId) {
|
|
3452
|
+
const url = this.appConfig.getViewOrDeleteDraftsUrl(draftId.slice(DRAFT_PREFIX.length));
|
|
3453
|
+
const headers = new HttpHeaders()
|
|
3454
|
+
.set('experimental', 'true')
|
|
3455
|
+
.set('Accept', DraftService.V2_MEDIATYPE_DRAFT_READ)
|
|
3456
|
+
.set('Content-Type', 'application/json');
|
|
3457
|
+
return this.http
|
|
3458
|
+
.get(url, { headers, observe: 'body' })
|
|
3459
|
+
.pipe(catchError((error) => {
|
|
3460
|
+
this.errorService.setError(error);
|
|
3461
|
+
return throwError(error);
|
|
3462
|
+
}));
|
|
3463
|
+
}
|
|
3464
|
+
deleteDraft(draftId) {
|
|
3465
|
+
const url = this.appConfig.getViewOrDeleteDraftsUrl(draftId.slice(DRAFT_PREFIX.length));
|
|
3466
|
+
const headers = new HttpHeaders()
|
|
3467
|
+
.set('experimental', 'true')
|
|
3468
|
+
.set('Accept', DraftService.V2_MEDIATYPE_DRAFT_DELETE)
|
|
3469
|
+
.set('Content-Type', 'application/json');
|
|
3470
|
+
return this.http
|
|
3471
|
+
.delete(url, { headers, observe: 'body' }).pipe(catchError((error) => {
|
|
3472
|
+
this.errorService.setError(error);
|
|
3473
|
+
return throwError(error);
|
|
3474
|
+
}));
|
|
3475
|
+
}
|
|
3476
|
+
createOrUpdateDraft(caseTypeId, draftId, caseEventData) {
|
|
3477
|
+
if (!draftId) {
|
|
3478
|
+
return this.createDraft(caseTypeId, caseEventData);
|
|
3302
3479
|
}
|
|
3303
3480
|
else {
|
|
3304
|
-
return
|
|
3481
|
+
return this.updateDraft(caseTypeId, Draft.stripDraftId(draftId), caseEventData);
|
|
3305
3482
|
}
|
|
3306
3483
|
}
|
|
3307
|
-
|
|
3308
|
-
|
|
3484
|
+
static ɵfac = function DraftService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || DraftService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig), i0.ɵɵinject(HttpErrorService)); };
|
|
3485
|
+
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: DraftService, factory: DraftService.ɵfac });
|
|
3486
|
+
}
|
|
3487
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DraftService, [{
|
|
3488
|
+
type: Injectable
|
|
3489
|
+
}], () => [{ type: HttpService }, { type: AbstractAppConfig }, { type: HttpErrorService }], null); })();
|
|
3490
|
+
|
|
3491
|
+
class ConditionalShowRegistrarService {
|
|
3492
|
+
registeredDirectives = [];
|
|
3493
|
+
register(newDirective) {
|
|
3494
|
+
this.registeredDirectives.push(newDirective);
|
|
3309
3495
|
}
|
|
3310
|
-
|
|
3311
|
-
|
|
3496
|
+
reset() {
|
|
3497
|
+
this.registeredDirectives = [];
|
|
3498
|
+
}
|
|
3499
|
+
static ɵfac = function ConditionalShowRegistrarService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ConditionalShowRegistrarService)(); };
|
|
3500
|
+
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ConditionalShowRegistrarService, factory: ConditionalShowRegistrarService.ɵfac });
|
|
3312
3501
|
}
|
|
3313
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(
|
|
3314
|
-
type:
|
|
3315
|
-
|
|
3316
|
-
name: 'ccdFieldLabel',
|
|
3317
|
-
pure: false,
|
|
3318
|
-
standalone: false
|
|
3319
|
-
}]
|
|
3320
|
-
}], () => [{ type: i1.RpxTranslatePipe }], null); })();
|
|
3502
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ConditionalShowRegistrarService, [{
|
|
3503
|
+
type: Injectable
|
|
3504
|
+
}], null, null); })();
|
|
3321
3505
|
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3506
|
+
/** Keeps track of initially hidden fields that toggle to show on the page (parent page).
|
|
3507
|
+
* Used to decide whether to redisplay the grey bar when returning to the page during
|
|
3508
|
+
* navigation between pages.
|
|
3509
|
+
*/
|
|
3510
|
+
class GreyBarService {
|
|
3511
|
+
fieldsToggledToShow = [];
|
|
3512
|
+
renderer;
|
|
3513
|
+
constructor(rendererFactory) {
|
|
3514
|
+
this.renderer = rendererFactory.createRenderer(null, null);
|
|
3330
3515
|
}
|
|
3331
|
-
|
|
3332
|
-
if (!
|
|
3333
|
-
|
|
3334
|
-
}
|
|
3335
|
-
if (!args) {
|
|
3336
|
-
args = 'Field';
|
|
3337
|
-
}
|
|
3338
|
-
const keys = Object.keys(value);
|
|
3339
|
-
if (!keys.length) {
|
|
3340
|
-
return '';
|
|
3341
|
-
}
|
|
3342
|
-
let errorMessage;
|
|
3343
|
-
if (keys[0] === 'required') {
|
|
3344
|
-
errorMessage = '%FIELDLABEL% is required';
|
|
3345
|
-
}
|
|
3346
|
-
else if (keys[0] === 'pattern') {
|
|
3347
|
-
errorMessage = 'The data entered is not valid for %FIELDLABEL%';
|
|
3348
|
-
}
|
|
3349
|
-
else if (keys[0] === 'markDownPattern') {
|
|
3350
|
-
errorMessage = 'The data entered is not valid for %FIELDLABEL%. Link mark up characters are not allowed in this field';
|
|
3351
|
-
}
|
|
3352
|
-
else if (keys[0] === 'unsafeRichText') {
|
|
3353
|
-
errorMessage = 'The data entered is not valid for %FIELDLABEL%. Potentially unsafe HTML content is not allowed in this field';
|
|
3354
|
-
}
|
|
3355
|
-
else if (keys[0] === 'minlength') {
|
|
3356
|
-
errorMessage = '%FIELDLABEL% is below the minimum length';
|
|
3357
|
-
}
|
|
3358
|
-
else if (keys[0] === 'maxlength') {
|
|
3359
|
-
errorMessage = '%FIELDLABEL% exceeds the maximum length';
|
|
3360
|
-
}
|
|
3361
|
-
else if (value.hasOwnProperty('matDatetimePickerParse')) {
|
|
3362
|
-
errorMessage = 'The date entered is not valid. Please provide a valid date';
|
|
3516
|
+
showGreyBar(field, el) {
|
|
3517
|
+
if (!field.isCollection()) {
|
|
3518
|
+
this.addGreyBar(el);
|
|
3363
3519
|
}
|
|
3364
|
-
|
|
3365
|
-
|
|
3520
|
+
}
|
|
3521
|
+
removeGreyBar(el) {
|
|
3522
|
+
const divSelector = el.nativeElement.querySelector('div');
|
|
3523
|
+
if (divSelector) {
|
|
3524
|
+
this.renderer.removeClass(divSelector, 'show-condition-grey-bar');
|
|
3366
3525
|
}
|
|
3367
|
-
const o = this.rpxTranslationService.getTranslation$(args).pipe(switchMap(fieldLabel => this.rpxTranslationService.getTranslationWithReplacements$(errorMessage, { FIELDLABEL: fieldLabel })));
|
|
3368
|
-
return this.asyncPipe.transform(o);
|
|
3369
3526
|
}
|
|
3370
|
-
|
|
3371
|
-
this.
|
|
3527
|
+
addToggledToShow(fieldId) {
|
|
3528
|
+
this.fieldsToggledToShow.push(fieldId);
|
|
3372
3529
|
}
|
|
3373
|
-
|
|
3374
|
-
|
|
3530
|
+
removeToggledToShow(fieldId) {
|
|
3531
|
+
this.fieldsToggledToShow = this.fieldsToggledToShow.filter(id => id !== fieldId);
|
|
3532
|
+
}
|
|
3533
|
+
wasToggledToShow(fieldId) {
|
|
3534
|
+
return this.fieldsToggledToShow.find(id => id === fieldId) !== undefined;
|
|
3535
|
+
}
|
|
3536
|
+
reset() {
|
|
3537
|
+
this.fieldsToggledToShow = [];
|
|
3538
|
+
}
|
|
3539
|
+
addGreyBar(el) {
|
|
3540
|
+
const divSelector = el.nativeElement.querySelector('div');
|
|
3541
|
+
if (divSelector) {
|
|
3542
|
+
this.renderer.addClass(divSelector, 'show-condition-grey-bar');
|
|
3543
|
+
}
|
|
3544
|
+
}
|
|
3545
|
+
static ɵfac = function GreyBarService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || GreyBarService)(i0.ɵɵinject(i0.RendererFactory2)); };
|
|
3546
|
+
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: GreyBarService, factory: GreyBarService.ɵfac });
|
|
3375
3547
|
}
|
|
3376
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(
|
|
3377
|
-
type:
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3548
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(GreyBarService, [{
|
|
3549
|
+
type: Injectable
|
|
3550
|
+
}], () => [{ type: i0.RendererFactory2 }], null); })();
|
|
3551
|
+
|
|
3552
|
+
var AddCommentsErrorMessage;
|
|
3553
|
+
(function (AddCommentsErrorMessage) {
|
|
3554
|
+
AddCommentsErrorMessage["FLAG_COMMENTS_NOT_ENTERED"] = "Please enter comments for this flag";
|
|
3555
|
+
AddCommentsErrorMessage["FLAG_COMMENTS_NOT_ENTERED_EXTERNAL"] = "Please enter comments for this support request";
|
|
3556
|
+
AddCommentsErrorMessage["FLAG_COMMENTS_CHAR_LIMIT_EXCEEDED"] = "Comments for this flag must be 200 characters or fewer";
|
|
3557
|
+
})(AddCommentsErrorMessage || (AddCommentsErrorMessage = {}));
|
|
3558
|
+
|
|
3559
|
+
var AddCommentsStep;
|
|
3560
|
+
(function (AddCommentsStep) {
|
|
3561
|
+
AddCommentsStep["HINT_TEXT"] = "Explain why you are creating this flag. Do not include any sensitive information such as personal details.";
|
|
3562
|
+
AddCommentsStep["HINT_TEXT_EXTERNAL"] = "Explain why you are creating this support request. Do not include any sensitive information such as personal details.";
|
|
3563
|
+
AddCommentsStep["CHARACTER_LIMIT_INFO"] = "You can enter up to 200 characters";
|
|
3564
|
+
AddCommentsStep["WARNING_TEXT"] = "The details entered here MAY be visible to the party in the future.";
|
|
3565
|
+
})(AddCommentsStep || (AddCommentsStep = {}));
|
|
3566
|
+
|
|
3567
|
+
var CaseFlagCheckYourAnswersPageStep;
|
|
3568
|
+
(function (CaseFlagCheckYourAnswersPageStep) {
|
|
3569
|
+
CaseFlagCheckYourAnswersPageStep["CASE_LEVEL_LOCATION"] = "Case level";
|
|
3570
|
+
CaseFlagCheckYourAnswersPageStep["ADD_FLAG_HEADER_TEXT"] = "Add flag to";
|
|
3571
|
+
CaseFlagCheckYourAnswersPageStep["ADD_FLAG_HEADER_TEXT_EXTERNAL"] = "Add support to";
|
|
3572
|
+
CaseFlagCheckYourAnswersPageStep["UPDATE_FLAG_HEADER_TEXT"] = "Update flag for";
|
|
3573
|
+
CaseFlagCheckYourAnswersPageStep["UPDATE_FLAG_HEADER_TEXT_EXTERNAL"] = "Update support for";
|
|
3574
|
+
CaseFlagCheckYourAnswersPageStep["FLAG_TYPE_HEADER_TEXT"] = "Flag type";
|
|
3575
|
+
CaseFlagCheckYourAnswersPageStep["FLAG_TYPE_HEADER_TEXT_EXTERNAL"] = "Support type";
|
|
3576
|
+
CaseFlagCheckYourAnswersPageStep["NONE"] = "";
|
|
3577
|
+
})(CaseFlagCheckYourAnswersPageStep || (CaseFlagCheckYourAnswersPageStep = {}));
|
|
3578
|
+
|
|
3579
|
+
/**
|
|
3580
|
+
* Create and update contexts for external users are, by definition, part of Case Flags 2.1 - thus there is no enum
|
|
3581
|
+
* value for these.
|
|
3582
|
+
*/
|
|
3583
|
+
var CaseFlagDisplayContextParameter;
|
|
3584
|
+
(function (CaseFlagDisplayContextParameter) {
|
|
3585
|
+
CaseFlagDisplayContextParameter["CREATE"] = "#ARGUMENT(CREATE)";
|
|
3586
|
+
CaseFlagDisplayContextParameter["CREATE_EXTERNAL"] = "#ARGUMENT(CREATE,EXTERNAL)";
|
|
3587
|
+
CaseFlagDisplayContextParameter["CREATE_2_POINT_1"] = "#ARGUMENT(CREATE,VERSION2.1)";
|
|
3588
|
+
CaseFlagDisplayContextParameter["READ_EXTERNAL"] = "#ARGUMENT(READ,EXTERNAL)";
|
|
3589
|
+
CaseFlagDisplayContextParameter["UPDATE"] = "#ARGUMENT(UPDATE)";
|
|
3590
|
+
CaseFlagDisplayContextParameter["UPDATE_EXTERNAL"] = "#ARGUMENT(UPDATE,EXTERNAL)";
|
|
3591
|
+
CaseFlagDisplayContextParameter["UPDATE_2_POINT_1"] = "#ARGUMENT(UPDATE,VERSION2.1)";
|
|
3592
|
+
})(CaseFlagDisplayContextParameter || (CaseFlagDisplayContextParameter = {}));
|
|
3593
|
+
|
|
3594
|
+
var CaseFlagFormFields;
|
|
3595
|
+
(function (CaseFlagFormFields) {
|
|
3596
|
+
CaseFlagFormFields["FLAG_TYPE"] = "flagType";
|
|
3597
|
+
CaseFlagFormFields["COMMENTS"] = "flagComment";
|
|
3598
|
+
CaseFlagFormFields["COMMENTS_WELSH"] = "flagComment_cy";
|
|
3599
|
+
CaseFlagFormFields["OTHER_FLAG_DESCRIPTION"] = "otherDescription";
|
|
3600
|
+
CaseFlagFormFields["OTHER_FLAG_DESCRIPTION_WELSH"] = "otherDescription_cy";
|
|
3601
|
+
CaseFlagFormFields["STATUS"] = "status";
|
|
3602
|
+
CaseFlagFormFields["STATUS_CHANGE_REASON"] = "flagStatusReasonChange";
|
|
3603
|
+
CaseFlagFormFields["IS_WELSH_TRANSLATION_NEEDED"] = "flagIsWelshTranslationNeeded";
|
|
3604
|
+
CaseFlagFormFields["IS_VISIBLE_INTERNALLY_ONLY"] = "flagIsVisibleInternallyOnly";
|
|
3605
|
+
})(CaseFlagFormFields || (CaseFlagFormFields = {}));
|
|
3606
|
+
|
|
3607
|
+
var CaseFlagStatus;
|
|
3608
|
+
(function (CaseFlagStatus) {
|
|
3609
|
+
CaseFlagStatus["REQUESTED"] = "Requested";
|
|
3610
|
+
CaseFlagStatus["ACTIVE"] = "Active";
|
|
3611
|
+
CaseFlagStatus["INACTIVE"] = "Inactive";
|
|
3612
|
+
CaseFlagStatus["NOT_APPROVED"] = "Not approved";
|
|
3613
|
+
})(CaseFlagStatus || (CaseFlagStatus = {}));
|
|
3614
|
+
|
|
3615
|
+
var CaseFlagSummaryListDisplayMode;
|
|
3616
|
+
(function (CaseFlagSummaryListDisplayMode) {
|
|
3617
|
+
CaseFlagSummaryListDisplayMode[CaseFlagSummaryListDisplayMode["CREATE"] = 0] = "CREATE";
|
|
3618
|
+
CaseFlagSummaryListDisplayMode[CaseFlagSummaryListDisplayMode["MANAGE"] = 1] = "MANAGE";
|
|
3619
|
+
})(CaseFlagSummaryListDisplayMode || (CaseFlagSummaryListDisplayMode = {}));
|
|
3620
|
+
|
|
3621
|
+
var CaseFlagWizardStepTitle;
|
|
3622
|
+
(function (CaseFlagWizardStepTitle) {
|
|
3623
|
+
CaseFlagWizardStepTitle["SELECT_FLAG_LOCATION"] = "Where should this flag be added?";
|
|
3624
|
+
CaseFlagWizardStepTitle["SELECT_FLAG_LOCATION_EXTERNAL"] = "Who is the support for?";
|
|
3625
|
+
CaseFlagWizardStepTitle["SELECT_CASE_FLAG"] = "Select flag type";
|
|
3626
|
+
CaseFlagWizardStepTitle["SELECT_CASE_FLAG_EXTERNAL"] = "Select support type";
|
|
3627
|
+
CaseFlagWizardStepTitle["OTHER_FLAG_TYPE_DESCRIPTION"] = "Enter a flag type";
|
|
3628
|
+
CaseFlagWizardStepTitle["OTHER_FLAG_TYPE_DESCRIPTION_EXTERNAL"] = "Enter a support type";
|
|
3629
|
+
CaseFlagWizardStepTitle["ADD_FLAG_COMMENTS"] = "Add comments for this flag";
|
|
3630
|
+
CaseFlagWizardStepTitle["ADD_FLAG_COMMENTS_EXTERNAL_MODE"] = "Tell us more about the request";
|
|
3631
|
+
CaseFlagWizardStepTitle["CONFIRM_FLAG_STATUS"] = "Confirm the status of the flag";
|
|
3632
|
+
CaseFlagWizardStepTitle["FLAG_STATUS"] = "Flag status";
|
|
3633
|
+
CaseFlagWizardStepTitle["MANAGE_CASE_FLAGS"] = "Manage case flags";
|
|
3634
|
+
CaseFlagWizardStepTitle["MANAGE_SUPPORT"] = "Which support is no longer needed?";
|
|
3635
|
+
CaseFlagWizardStepTitle["UPDATE_FLAG_TITLE"] = "Update flag";
|
|
3636
|
+
CaseFlagWizardStepTitle["UPDATE_FLAG_TITLE_EXTERNAL"] = "Tell us why the support is no longer needed";
|
|
3637
|
+
CaseFlagWizardStepTitle["UPDATE_FLAG_ADD_TRANSLATION"] = "Add translations to flag";
|
|
3638
|
+
CaseFlagWizardStepTitle["NONE"] = "";
|
|
3639
|
+
})(CaseFlagWizardStepTitle || (CaseFlagWizardStepTitle = {}));
|
|
3640
|
+
|
|
3641
|
+
var ConfirmStatusErrorMessage;
|
|
3642
|
+
(function (ConfirmStatusErrorMessage) {
|
|
3643
|
+
ConfirmStatusErrorMessage["STATUS_REASON_NOT_ENTERED"] = "Comments and/or the name of the person approving the decision should be entered";
|
|
3644
|
+
ConfirmStatusErrorMessage["STATUS_REASON_CHAR_LIMIT_EXCEEDED"] = "Comments must be 200 characters or fewer";
|
|
3645
|
+
})(ConfirmStatusErrorMessage || (ConfirmStatusErrorMessage = {}));
|
|
3646
|
+
|
|
3647
|
+
var ConfirmStatusStep;
|
|
3648
|
+
(function (ConfirmStatusStep) {
|
|
3649
|
+
ConfirmStatusStep["HINT_TEXT"] = "Describe reason for status; if choosing 'Not approved' provide name of person approving decision.";
|
|
3650
|
+
ConfirmStatusStep["CHARACTER_LIMIT_INFO"] = "You can enter up to 200 characters";
|
|
3651
|
+
})(ConfirmStatusStep || (ConfirmStatusStep = {}));
|
|
3652
|
+
|
|
3653
|
+
var SearchLanguageInterpreterErrorMessage;
|
|
3654
|
+
(function (SearchLanguageInterpreterErrorMessage) {
|
|
3655
|
+
SearchLanguageInterpreterErrorMessage["LANGUAGE_NOT_ENTERED"] = "Enter the language that will need to be interpreted";
|
|
3656
|
+
SearchLanguageInterpreterErrorMessage["LANGUAGE_CHAR_LIMIT_EXCEEDED"] = "You can enter up to 80 characters for the required language";
|
|
3657
|
+
SearchLanguageInterpreterErrorMessage["LANGUAGE_ENTERED_IN_BOTH_FIELDS"] = "The language can only be entered in one of the fields";
|
|
3658
|
+
})(SearchLanguageInterpreterErrorMessage || (SearchLanguageInterpreterErrorMessage = {}));
|
|
3659
|
+
|
|
3660
|
+
var SearchLanguageInterpreterStep;
|
|
3661
|
+
(function (SearchLanguageInterpreterStep) {
|
|
3662
|
+
SearchLanguageInterpreterStep["HINT_TEXT"] = "Enter the language that will need to be interpreted. If this language is not listed, you can enter it manually.";
|
|
3663
|
+
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.";
|
|
3664
|
+
SearchLanguageInterpreterStep["CHECKBOX_LABEL"] = "Enter the language manually";
|
|
3665
|
+
SearchLanguageInterpreterStep["INPUT_LABEL"] = "Enter the language";
|
|
3666
|
+
})(SearchLanguageInterpreterStep || (SearchLanguageInterpreterStep = {}));
|
|
3667
|
+
|
|
3668
|
+
var SelectFlagErrorMessage;
|
|
3669
|
+
(function (SelectFlagErrorMessage) {
|
|
3670
|
+
SelectFlagErrorMessage["MANAGE_CASE_FLAGS_FLAG_NOT_SELECTED"] = "Please make a selection";
|
|
3671
|
+
SelectFlagErrorMessage["MANAGE_SUPPORT_FLAG_NOT_SELECTED"] = "Select which support is no longer needed";
|
|
3672
|
+
SelectFlagErrorMessage["NO_FLAGS"] = "This case has no flags";
|
|
3673
|
+
})(SelectFlagErrorMessage || (SelectFlagErrorMessage = {}));
|
|
3674
|
+
|
|
3675
|
+
var SelectFlagLocationErrorMessage;
|
|
3676
|
+
(function (SelectFlagLocationErrorMessage) {
|
|
3677
|
+
SelectFlagLocationErrorMessage["FLAG_LOCATION_NOT_SELECTED"] = "Please make a selection";
|
|
3678
|
+
SelectFlagLocationErrorMessage["FLAGS_NOT_CONFIGURED"] = "Flags have not been configured for this case type";
|
|
3679
|
+
})(SelectFlagLocationErrorMessage || (SelectFlagLocationErrorMessage = {}));
|
|
3680
|
+
|
|
3681
|
+
var SelectFlagTypeErrorMessage;
|
|
3682
|
+
(function (SelectFlagTypeErrorMessage) {
|
|
3683
|
+
SelectFlagTypeErrorMessage["FLAG_TYPE_NOT_SELECTED"] = "Please select a flag type";
|
|
3684
|
+
SelectFlagTypeErrorMessage["FLAG_TYPE_NOT_SELECTED_EXTERNAL"] = "Please select a support type";
|
|
3685
|
+
SelectFlagTypeErrorMessage["FLAG_TYPE_OPTION_NOT_SELECTED"] = "Select an option";
|
|
3686
|
+
SelectFlagTypeErrorMessage["FLAG_TYPE_NOT_ENTERED"] = "Please enter a flag type";
|
|
3687
|
+
SelectFlagTypeErrorMessage["FLAG_TYPE_NOT_ENTERED_EXTERNAL"] = "Please enter a support type";
|
|
3688
|
+
SelectFlagTypeErrorMessage["FLAG_TYPE_LIMIT_EXCEEDED"] = "You can enter up to 80 characters only";
|
|
3689
|
+
})(SelectFlagTypeErrorMessage || (SelectFlagTypeErrorMessage = {}));
|
|
3384
3690
|
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
'AddressUK',
|
|
3391
|
-
'AddressGlobalUK',
|
|
3392
|
-
'CasePaymentHistoryViewer',
|
|
3393
|
-
'CaseHistoryViewer',
|
|
3394
|
-
'Organisation',
|
|
3395
|
-
'WaysToPay',
|
|
3396
|
-
'ComponentLauncher',
|
|
3397
|
-
'FlagLauncher',
|
|
3398
|
-
'CaseFlag'
|
|
3399
|
-
];
|
|
3400
|
-
static EXCLUDE = [
|
|
3401
|
-
'CaseLink',
|
|
3402
|
-
'JudicialUser',
|
|
3403
|
-
'StaffUser'
|
|
3404
|
-
];
|
|
3405
|
-
transform(field) {
|
|
3406
|
-
if (!field || !field.field_type || !field.field_type.type) {
|
|
3407
|
-
return false;
|
|
3408
|
-
}
|
|
3409
|
-
if (IsCompoundPipe.COMPOUND_TYPES.indexOf(field.field_type.type) !== -1) {
|
|
3410
|
-
if (IsCompoundPipe.EXCLUDE.indexOf(field.field_type.id) !== -1) {
|
|
3411
|
-
return false;
|
|
3412
|
-
}
|
|
3413
|
-
return true;
|
|
3414
|
-
}
|
|
3415
|
-
return false;
|
|
3416
|
-
}
|
|
3417
|
-
static ɵfac = function IsCompoundPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || IsCompoundPipe)(); };
|
|
3418
|
-
static ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "ccdIsCompound", type: IsCompoundPipe, pure: true, standalone: false });
|
|
3419
|
-
}
|
|
3420
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(IsCompoundPipe, [{
|
|
3421
|
-
type: Pipe,
|
|
3422
|
-
args: [{
|
|
3423
|
-
name: 'ccdIsCompound',
|
|
3424
|
-
standalone: false
|
|
3425
|
-
}]
|
|
3426
|
-
}], null, null); })();
|
|
3691
|
+
var UpdateFlagAddTranslationErrorMessage;
|
|
3692
|
+
(function (UpdateFlagAddTranslationErrorMessage) {
|
|
3693
|
+
UpdateFlagAddTranslationErrorMessage["DESCRIPTION_CHAR_LIMIT_EXCEEDED"] = "Original description or translation must be 200 characters or fewer";
|
|
3694
|
+
UpdateFlagAddTranslationErrorMessage["COMMENTS_CHAR_LIMIT_EXCEEDED"] = "Original comments or translation must be 200 characters or fewer";
|
|
3695
|
+
})(UpdateFlagAddTranslationErrorMessage || (UpdateFlagAddTranslationErrorMessage = {}));
|
|
3427
3696
|
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
return field.display_context.toUpperCase() === 'OPTIONAL';
|
|
3434
|
-
}
|
|
3435
|
-
isReadOnly(field) {
|
|
3436
|
-
if (!field || !field.display_context) {
|
|
3437
|
-
return false;
|
|
3438
|
-
}
|
|
3439
|
-
return field.display_context.toUpperCase() === 'READONLY';
|
|
3440
|
-
}
|
|
3441
|
-
isMandatory(field) {
|
|
3442
|
-
if (!field || !field.display_context) {
|
|
3443
|
-
return false;
|
|
3444
|
-
}
|
|
3445
|
-
return field.display_context.toUpperCase() === 'MANDATORY';
|
|
3446
|
-
}
|
|
3447
|
-
isLabel(field) {
|
|
3448
|
-
if (!field || !field.field_type) {
|
|
3449
|
-
return false;
|
|
3450
|
-
}
|
|
3451
|
-
return field.field_type.type === 'Label';
|
|
3452
|
-
}
|
|
3453
|
-
static ɵfac = function CaseFieldService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaseFieldService)(); };
|
|
3454
|
-
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: CaseFieldService, factory: CaseFieldService.ɵfac });
|
|
3455
|
-
}
|
|
3456
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFieldService, [{
|
|
3457
|
-
type: Injectable
|
|
3458
|
-
}], null, null); })();
|
|
3697
|
+
var UpdateFlagAddTranslationStep;
|
|
3698
|
+
(function (UpdateFlagAddTranslationStep) {
|
|
3699
|
+
UpdateFlagAddTranslationStep["HINT_TEXT"] = "Write translation for flag description or comments in the boxes provided.";
|
|
3700
|
+
UpdateFlagAddTranslationStep["CHARACTER_LIMIT_INFO"] = "You can enter up to 200 characters";
|
|
3701
|
+
})(UpdateFlagAddTranslationStep || (UpdateFlagAddTranslationStep = {}));
|
|
3459
3702
|
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
static ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "ccdIsMandatory", type: IsMandatoryPipe, pure: true, standalone: false });
|
|
3470
|
-
}
|
|
3471
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(IsMandatoryPipe, [{
|
|
3472
|
-
type: Pipe,
|
|
3473
|
-
args: [{
|
|
3474
|
-
name: 'ccdIsMandatory',
|
|
3475
|
-
standalone: false
|
|
3476
|
-
}]
|
|
3477
|
-
}], () => [{ type: CaseFieldService }], null); })();
|
|
3703
|
+
var UpdateFlagErrorMessage;
|
|
3704
|
+
(function (UpdateFlagErrorMessage) {
|
|
3705
|
+
UpdateFlagErrorMessage["FLAG_COMMENTS_NOT_ENTERED"] = "Please enter comments for this flag";
|
|
3706
|
+
UpdateFlagErrorMessage["FLAG_COMMENTS_CHAR_LIMIT_EXCEEDED"] = "Comments for this flag must be 200 characters or fewer";
|
|
3707
|
+
UpdateFlagErrorMessage["STATUS_REASON_NOT_ENTERED"] = "Comments and/or the name of the person approving the decision should be entered";
|
|
3708
|
+
UpdateFlagErrorMessage["STATUS_REASON_NOT_ENTERED_EXTERNAL"] = "You must explain why the support is no longer needed";
|
|
3709
|
+
UpdateFlagErrorMessage["STATUS_REASON_CHAR_LIMIT_EXCEEDED"] = "Comments must be 200 characters or fewer";
|
|
3710
|
+
UpdateFlagErrorMessage["NONE"] = "";
|
|
3711
|
+
})(UpdateFlagErrorMessage || (UpdateFlagErrorMessage = {}));
|
|
3478
3712
|
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
}
|
|
3490
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(IsReadOnlyPipe, [{
|
|
3491
|
-
type: Pipe,
|
|
3492
|
-
args: [{
|
|
3493
|
-
name: 'ccdIsReadOnly',
|
|
3494
|
-
standalone: false
|
|
3495
|
-
}]
|
|
3496
|
-
}], () => [{ type: CaseFieldService }], null); })();
|
|
3713
|
+
var UpdateFlagStep;
|
|
3714
|
+
(function (UpdateFlagStep) {
|
|
3715
|
+
UpdateFlagStep["COMMENT_HINT_TEXT_INTERNAL"] = "Explain why you are updating this flag. Do not include any sensitive information such as personal details.";
|
|
3716
|
+
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.";
|
|
3717
|
+
UpdateFlagStep["COMMENT_HINT_TEXT_EXTERNAL"] = "Do not include any sensitive information such as personal details.";
|
|
3718
|
+
UpdateFlagStep["COMMENT_FIELD_LABEL_EXTERNAL"] = "Please provide your comments below";
|
|
3719
|
+
UpdateFlagStep["CHARACTER_LIMIT_INFO"] = "You can enter up to 200 characters";
|
|
3720
|
+
UpdateFlagStep["STATUS_HINT_TEXT"] = "Describe reason for status change.";
|
|
3721
|
+
UpdateFlagStep["STATUS_REASON_LABEL"] = "Reason for change";
|
|
3722
|
+
UpdateFlagStep["WARNING_TEXT"] = "The details entered here MAY be visible to the party in the future.";
|
|
3723
|
+
})(UpdateFlagStep || (UpdateFlagStep = {}));
|
|
3497
3724
|
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3725
|
+
var CaseFlagFieldState;
|
|
3726
|
+
(function (CaseFlagFieldState) {
|
|
3727
|
+
CaseFlagFieldState[CaseFlagFieldState["FLAG_LOCATION"] = 0] = "FLAG_LOCATION";
|
|
3728
|
+
CaseFlagFieldState[CaseFlagFieldState["FLAG_TYPE"] = 1] = "FLAG_TYPE";
|
|
3729
|
+
CaseFlagFieldState[CaseFlagFieldState["FLAG_LANGUAGE_INTERPRETER"] = 2] = "FLAG_LANGUAGE_INTERPRETER";
|
|
3730
|
+
CaseFlagFieldState[CaseFlagFieldState["FLAG_COMMENTS"] = 3] = "FLAG_COMMENTS";
|
|
3731
|
+
CaseFlagFieldState[CaseFlagFieldState["FLAG_STATUS"] = 4] = "FLAG_STATUS";
|
|
3732
|
+
CaseFlagFieldState[CaseFlagFieldState["FLAG_MANAGE_CASE_FLAGS"] = 5] = "FLAG_MANAGE_CASE_FLAGS";
|
|
3733
|
+
CaseFlagFieldState[CaseFlagFieldState["FLAG_UPDATE"] = 6] = "FLAG_UPDATE";
|
|
3734
|
+
CaseFlagFieldState[CaseFlagFieldState["FLAG_UPDATE_WELSH_TRANSLATION"] = 7] = "FLAG_UPDATE_WELSH_TRANSLATION";
|
|
3735
|
+
})(CaseFlagFieldState || (CaseFlagFieldState = {}));
|
|
3736
|
+
var CaseFlagErrorMessage;
|
|
3737
|
+
(function (CaseFlagErrorMessage) {
|
|
3738
|
+
CaseFlagErrorMessage["NO_EXTERNAL_FLAGS_COLLECTION"] = "External collection for storing this case flag has not been configured for this case type";
|
|
3739
|
+
CaseFlagErrorMessage["NO_INTERNAL_FLAGS_COLLECTION"] = "Internal collection for storing this case flag has not been configured for this case type";
|
|
3740
|
+
})(CaseFlagErrorMessage || (CaseFlagErrorMessage = {}));
|
|
3741
|
+
|
|
3742
|
+
class DashPipe {
|
|
3743
|
+
transform(value) {
|
|
3744
|
+
return value ? value : '-';
|
|
3515
3745
|
}
|
|
3516
|
-
static ɵfac = function
|
|
3517
|
-
static ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "
|
|
3746
|
+
static ɵfac = function DashPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || DashPipe)(); };
|
|
3747
|
+
static ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "ccdDash", type: DashPipe, pure: true, standalone: false });
|
|
3518
3748
|
}
|
|
3519
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(
|
|
3749
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DashPipe, [{
|
|
3520
3750
|
type: Pipe,
|
|
3521
3751
|
args: [{
|
|
3522
|
-
name: '
|
|
3752
|
+
name: 'ccdDash',
|
|
3523
3753
|
standalone: false
|
|
3524
3754
|
}]
|
|
3525
|
-
}], () => [{ type: CaseFieldService }], null); })();
|
|
3526
|
-
|
|
3527
|
-
class PaletteUtilsModule {
|
|
3528
|
-
static ɵfac = function PaletteUtilsModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PaletteUtilsModule)(); };
|
|
3529
|
-
static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: PaletteUtilsModule });
|
|
3530
|
-
static ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ providers: [
|
|
3531
|
-
IsCompoundPipe,
|
|
3532
|
-
RpxTranslatePipe
|
|
3533
|
-
], imports: [CommonModule,
|
|
3534
|
-
RpxTranslationModule.forChild()] });
|
|
3535
|
-
}
|
|
3536
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaletteUtilsModule, [{
|
|
3537
|
-
type: NgModule,
|
|
3538
|
-
args: [{
|
|
3539
|
-
imports: [
|
|
3540
|
-
CommonModule,
|
|
3541
|
-
RpxTranslationModule.forChild()
|
|
3542
|
-
],
|
|
3543
|
-
declarations: [
|
|
3544
|
-
DatePipe,
|
|
3545
|
-
FieldLabelPipe,
|
|
3546
|
-
FirstErrorPipe,
|
|
3547
|
-
IsCompoundPipe,
|
|
3548
|
-
IsMandatoryPipe,
|
|
3549
|
-
IsReadOnlyPipe,
|
|
3550
|
-
IsReadOnlyAndNotCollectionPipe,
|
|
3551
|
-
DashPipe
|
|
3552
|
-
],
|
|
3553
|
-
exports: [
|
|
3554
|
-
DatePipe,
|
|
3555
|
-
FieldLabelPipe,
|
|
3556
|
-
FirstErrorPipe,
|
|
3557
|
-
IsCompoundPipe,
|
|
3558
|
-
IsMandatoryPipe,
|
|
3559
|
-
IsReadOnlyPipe,
|
|
3560
|
-
IsReadOnlyAndNotCollectionPipe,
|
|
3561
|
-
DashPipe
|
|
3562
|
-
],
|
|
3563
|
-
providers: [
|
|
3564
|
-
IsCompoundPipe,
|
|
3565
|
-
RpxTranslatePipe
|
|
3566
|
-
]
|
|
3567
|
-
}]
|
|
3568
3755
|
}], null, null); })();
|
|
3569
|
-
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(PaletteUtilsModule, { declarations: [DatePipe,
|
|
3570
|
-
FieldLabelPipe,
|
|
3571
|
-
FirstErrorPipe,
|
|
3572
|
-
IsCompoundPipe,
|
|
3573
|
-
IsMandatoryPipe,
|
|
3574
|
-
IsReadOnlyPipe,
|
|
3575
|
-
IsReadOnlyAndNotCollectionPipe,
|
|
3576
|
-
DashPipe], imports: [CommonModule, i1.RpxTranslationModule], exports: [DatePipe,
|
|
3577
|
-
FieldLabelPipe,
|
|
3578
|
-
FirstErrorPipe,
|
|
3579
|
-
IsCompoundPipe,
|
|
3580
|
-
IsMandatoryPipe,
|
|
3581
|
-
IsReadOnlyPipe,
|
|
3582
|
-
IsReadOnlyAndNotCollectionPipe,
|
|
3583
|
-
DashPipe] }); })();
|
|
3584
3756
|
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
AddressLine3 = '';
|
|
3590
|
-
PostTown = '';
|
|
3591
|
-
County = '';
|
|
3592
|
-
PostCode = '';
|
|
3593
|
-
Country = '';
|
|
3594
|
-
}
|
|
3757
|
+
/*
|
|
3758
|
+
Translate a date time format string from the Java format provided by CCD to the format supported by Angular formatDate()
|
|
3759
|
+
Very simple translator that maps unsupported chars to the nearest equivalent.
|
|
3760
|
+
If there is no equivalent puts ***x*** into the output where x is the unsupported character
|
|
3595
3761
|
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3762
|
+
Java format
|
|
3763
|
+
G era text AD; Anno Domini; A
|
|
3764
|
+
u year year 2004; 04
|
|
3765
|
+
y year-of-era year 2004; 04
|
|
3766
|
+
D day-of-year number 189
|
|
3767
|
+
M/L month-of-year number/text 7; 07; Jul; July; J
|
|
3768
|
+
d day-of-month number 10
|
|
3600
3769
|
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
last_modified;
|
|
3609
|
-
locked_by_user_id;
|
|
3610
|
-
security_level;
|
|
3611
|
-
case_data;
|
|
3612
|
-
}
|
|
3770
|
+
Q/q quarter-of-year number/text 3; 03; Q3; 3rd quarter
|
|
3771
|
+
Y week-based-year year 1996; 96
|
|
3772
|
+
w week-of-week-based-year number 27
|
|
3773
|
+
W week-of-month number 4
|
|
3774
|
+
E day-of-week text Tue; Tuesday; T
|
|
3775
|
+
e/c localized day-of-week number/text 2; 02; Tue; Tuesday; T
|
|
3776
|
+
F week-of-month number 3
|
|
3613
3777
|
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
event_data; // full event data
|
|
3619
|
-
event_token;
|
|
3620
|
-
ignore_warning;
|
|
3621
|
-
draft_id;
|
|
3622
|
-
case_reference;
|
|
3623
|
-
}
|
|
3778
|
+
a am-pm-of-day text PM
|
|
3779
|
+
h clock-hour-of-am-pm (1-12) number 12
|
|
3780
|
+
K hour-of-am-pm (0-11) number 0
|
|
3781
|
+
k clock-hour-of-am-pm (1-24) number 0
|
|
3624
3782
|
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3783
|
+
H hour-of-day (0-23) number 0
|
|
3784
|
+
m minute-of-hour number 30
|
|
3785
|
+
s second-of-minute number 55
|
|
3786
|
+
S fraction-of-second fraction 978
|
|
3787
|
+
A milli-of-day number 1234
|
|
3788
|
+
n nano-of-second number 987654321
|
|
3789
|
+
N nano-of-day number 1234000000
|
|
3631
3790
|
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3791
|
+
V time-zone ID zone-id America/Los_Angeles; Z; -08:30
|
|
3792
|
+
z time-zone name zone-name Pacific Standard Time; PST
|
|
3793
|
+
O localized zone-offset offset-O GMT+8; GMT+08:00; UTC-08:00;
|
|
3794
|
+
X zone-offset 'Z' for zero offset-X Z; -08; -0830; -08:30; -083015; -08:30:15;
|
|
3795
|
+
x zone-offset offset-x +0000; -08; -0830; -08:30; -083015; -08:30:15;
|
|
3796
|
+
Z zone-offset offset-Z +0000; -0800; -08:00;
|
|
3637
3797
|
|
|
3638
|
-
|
|
3639
|
-
class FieldType {
|
|
3640
|
-
id;
|
|
3641
|
-
type;
|
|
3642
|
-
min;
|
|
3643
|
-
max;
|
|
3644
|
-
regular_expression;
|
|
3645
|
-
fixed_list_items;
|
|
3646
|
-
complex_fields;
|
|
3647
|
-
collection_field_type;
|
|
3648
|
-
}
|
|
3649
|
-
__decorate([
|
|
3650
|
-
Type(() => FixedListItem),
|
|
3651
|
-
__metadata("design:type", Array)
|
|
3652
|
-
], FieldType.prototype, "fixed_list_items", void 0);
|
|
3653
|
-
__decorate([
|
|
3654
|
-
Type(() => CaseField),
|
|
3655
|
-
__metadata("design:type", Array)
|
|
3656
|
-
], FieldType.prototype, "complex_fields", void 0);
|
|
3657
|
-
__decorate([
|
|
3658
|
-
Type(() => FieldType),
|
|
3659
|
-
__metadata("design:type", FieldType)
|
|
3660
|
-
], FieldType.prototype, "collection_field_type", void 0);
|
|
3798
|
+
p pad next pad modifier 1
|
|
3661
3799
|
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3800
|
+
' escape for text delimiter
|
|
3801
|
+
'' single quote literal '
|
|
3802
|
+
[ optional section start
|
|
3803
|
+
] optional section end
|
|
3804
|
+
# reserved for future use
|
|
3805
|
+
{ reserved for future use
|
|
3806
|
+
} reserved for future use
|
|
3807
|
+
|
|
3808
|
+
Angular dateFormat characters
|
|
3809
|
+
Era G, GG & GGG Abbreviated AD
|
|
3810
|
+
GGGG Wide Anno Domini
|
|
3811
|
+
GGGGG Narrow A
|
|
3812
|
+
Year y Numeric: minimum digits 2, 20, 201, 2017, 20173
|
|
3813
|
+
yy Numeric: 2 digits + zero padded 02, 20, 01, 17, 73
|
|
3814
|
+
yyy Numeric: 3 digits + zero padded 002, 020, 201, 2017, 20173
|
|
3815
|
+
yyyy Numeric: 4 digits or more + zero padded 0002, 0020, 0201, 2017, 20173
|
|
3816
|
+
Month M Numeric: 1 digit 9, 12
|
|
3817
|
+
MM Numeric: 2 digits + zero padded 09, 12
|
|
3818
|
+
MMM Abbreviated Sep
|
|
3819
|
+
MMMM Wide September
|
|
3820
|
+
MMMMM Narrow S
|
|
3821
|
+
Month standalone L Numeric: 1 digit 9, 12
|
|
3822
|
+
LL Numeric: 2 digits + zero padded 09, 12
|
|
3823
|
+
LLL Abbreviated Sep
|
|
3824
|
+
LLLL Wide September
|
|
3825
|
+
LLLLL Narrow S
|
|
3826
|
+
Week of year w Numeric: minimum digits 1... 53
|
|
3827
|
+
ww Numeric: 2 digits + zero padded 01... 53
|
|
3828
|
+
Week of month W Numeric: 1 digit 1... 5
|
|
3829
|
+
Day of month d Numeric: minimum digits 1
|
|
3830
|
+
dd Numeric: 2 digits + zero padded 01
|
|
3831
|
+
Week day E, EE & EEE Abbreviated Tue
|
|
3832
|
+
EEEE Wide Tuesday
|
|
3833
|
+
EEEEE Narrow T
|
|
3834
|
+
EEEEEE Short Tu
|
|
3835
|
+
Period a, aa & aaa Abbreviated am/pm or AM/PM
|
|
3836
|
+
aaaa Wide (fallback to a when missing) ante meridiem/post meridiem
|
|
3837
|
+
aaaaa Narrow a/p
|
|
3838
|
+
Period* B, BB & BBB Abbreviated mid.
|
|
3839
|
+
BBBB Wide am, pm, midnight, noon, morning, afternoon, evening, night
|
|
3840
|
+
BBBBB Narrow md
|
|
3841
|
+
Period standalone* b, bb & bbb Abbreviated mid.
|
|
3842
|
+
bbbb Wide am, pm, midnight, noon, morning, afternoon, evening, night
|
|
3843
|
+
bbbbb Narrow md
|
|
3844
|
+
Hour 1-12 h Numeric: minimum digits 1, 12
|
|
3845
|
+
hh Numeric: 2 digits + zero padded 01, 12
|
|
3846
|
+
Hour 0-23 H Numeric: minimum digits 0, 23
|
|
3847
|
+
HH Numeric: 2 digits + zero padded 00, 23
|
|
3848
|
+
Minute m Numeric: minimum digits 8, 59
|
|
3849
|
+
mm Numeric: 2 digits + zero padded 08, 59
|
|
3850
|
+
Second s Numeric: minimum digits 0... 59
|
|
3851
|
+
ss Numeric: 2 digits + zero padded 00... 59
|
|
3852
|
+
Fractional seconds S Numeric: 1 digit 0... 9
|
|
3853
|
+
SS Numeric: 2 digits + zero padded 00... 99
|
|
3854
|
+
SSS Numeric: 3 digits + zero padded (= milliseconds) 000... 999
|
|
3855
|
+
Zone z, zz & zzz Short specific non location format (fallback to O) GMT-8
|
|
3856
|
+
zzzz Long specific non location format (fallback to OOOO) GMT-08:00
|
|
3857
|
+
Z, ZZ & ZZZ ISO8601 basic format -0800
|
|
3858
|
+
ZZZZ Long localized GMT format GMT-8:00
|
|
3859
|
+
ZZZZZ ISO8601 extended format + Z indicator for offset 0 (= XXXXX) -08:00
|
|
3860
|
+
O, OO & OOO Short localized GMT format GMT-8
|
|
3861
|
+
OOOO Long localized GMT format GMT-08:00
|
|
3862
|
+
*/
|
|
3863
|
+
class FormatTranslatorService {
|
|
3864
|
+
translate(javaFormat) {
|
|
3865
|
+
const result = [];
|
|
3866
|
+
let prev = '\0';
|
|
3867
|
+
let inQuote = false;
|
|
3868
|
+
const maybePush = (target, obj, flag) => {
|
|
3869
|
+
if (!flag) {
|
|
3870
|
+
target.push(obj);
|
|
3705
3871
|
}
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3872
|
+
};
|
|
3873
|
+
for (const c of javaFormat) {
|
|
3874
|
+
switch (c) {
|
|
3875
|
+
case '\'':
|
|
3876
|
+
if (prev === '\'') {
|
|
3877
|
+
// literal single quote - ignore
|
|
3878
|
+
inQuote = false;
|
|
3879
|
+
}
|
|
3880
|
+
else {
|
|
3881
|
+
inQuote = !inQuote;
|
|
3882
|
+
}
|
|
3883
|
+
break;
|
|
3884
|
+
// Due to formatting constraints on the webapp, all 'd' characters should be replaced with 'D' (for Moment library)
|
|
3885
|
+
// This is because we want the date, not the day (this format will need to be converted back)
|
|
3886
|
+
case 'd':
|
|
3887
|
+
maybePush(result, 'D', inQuote);
|
|
3888
|
+
break;
|
|
3889
|
+
// moment library defines year as capital y
|
|
3890
|
+
case 'y':
|
|
3891
|
+
maybePush(result, 'Y', inQuote);
|
|
3892
|
+
break;
|
|
3893
|
+
case 'e':
|
|
3894
|
+
case 'c':
|
|
3895
|
+
maybePush(result, 'E', inQuote); // no lower case E
|
|
3896
|
+
break;
|
|
3897
|
+
case 'F':
|
|
3898
|
+
maybePush(result, 'W', inQuote);
|
|
3899
|
+
break;
|
|
3900
|
+
case 'K':
|
|
3901
|
+
maybePush(result, 'H', inQuote);
|
|
3902
|
+
break;
|
|
3903
|
+
case 'k':
|
|
3904
|
+
maybePush(result, 'h', inQuote);
|
|
3905
|
+
break;
|
|
3906
|
+
// commented out A change to '***' due to use in moment library for AM/PM
|
|
3907
|
+
// added 'a' specification to stop discrepancy in am/AM pm/PM formatting
|
|
3908
|
+
case 'a':
|
|
3909
|
+
maybePush(result, 'A', inQuote);
|
|
3910
|
+
break;
|
|
3911
|
+
case 'n':
|
|
3912
|
+
case 'N':
|
|
3913
|
+
maybePush(result, `***${c}***`, inQuote); // No way to support A - millisec of day, n - nano of second, N - nano of Day
|
|
3914
|
+
break;
|
|
3915
|
+
case 'V':
|
|
3916
|
+
case 'O':
|
|
3917
|
+
maybePush(result, 'z', inQuote);
|
|
3918
|
+
break;
|
|
3919
|
+
case 'x':
|
|
3920
|
+
case 'X':
|
|
3921
|
+
maybePush(result, 'Z', inQuote);
|
|
3922
|
+
break;
|
|
3923
|
+
default:
|
|
3924
|
+
maybePush(result, c, inQuote);
|
|
3712
3925
|
}
|
|
3926
|
+
prev = c;
|
|
3713
3927
|
}
|
|
3714
|
-
|
|
3928
|
+
return result.join('');
|
|
3715
3929
|
}
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
return this.field_type.fixed_list_items;
|
|
3930
|
+
showOnlyDates(dateFormat) {
|
|
3931
|
+
// replace 'd' character with 'D' for the moment library
|
|
3932
|
+
// This ensures only dates allowed
|
|
3933
|
+
while (dateFormat.includes('d')) {
|
|
3934
|
+
dateFormat = dateFormat.replace('d', 'D');
|
|
3722
3935
|
}
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
if ((items && !this._list_items) || (items?.length > this._list_items?.length)) {
|
|
3726
|
-
this._list_items = items;
|
|
3936
|
+
while (dateFormat.includes('y')) {
|
|
3937
|
+
dateFormat = dateFormat.replace('y', 'Y');
|
|
3727
3938
|
}
|
|
3939
|
+
return dateFormat;
|
|
3728
3940
|
}
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3941
|
+
removeTime(dateFormat) {
|
|
3942
|
+
// remove hours irrelevant of whether 12 or 24 hour clock
|
|
3943
|
+
while (dateFormat.includes('H') || dateFormat.includes('h')) {
|
|
3944
|
+
dateFormat = dateFormat.replace('H', '');
|
|
3945
|
+
dateFormat = dateFormat.replace('h', '');
|
|
3732
3946
|
}
|
|
3733
|
-
|
|
3734
|
-
|
|
3947
|
+
// remove minutes
|
|
3948
|
+
while (dateFormat.includes('m')) {
|
|
3949
|
+
dateFormat = dateFormat.replace('m', '');
|
|
3735
3950
|
}
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
return null;
|
|
3951
|
+
// remove seconds (s) and micro seconds (S)
|
|
3952
|
+
while (dateFormat.includes('S') || dateFormat.includes('s')) {
|
|
3953
|
+
dateFormat = dateFormat.replace('S', '');
|
|
3954
|
+
dateFormat = dateFormat.replace('s', '');
|
|
3741
3955
|
}
|
|
3742
|
-
|
|
3743
|
-
|
|
3956
|
+
// because there is time removal algorithm can make reasonable assumption to remove colons
|
|
3957
|
+
while (dateFormat.includes(':')) {
|
|
3958
|
+
dateFormat = dateFormat.replace(':', '');
|
|
3744
3959
|
}
|
|
3745
|
-
return
|
|
3746
|
-
}
|
|
3747
|
-
isComplexDisplay() {
|
|
3748
|
-
return (this.isComplex() || this.isCollection()) && this.isReadonly();
|
|
3960
|
+
return dateFormat.trim();
|
|
3749
3961
|
}
|
|
3750
|
-
|
|
3751
|
-
return
|
|
3962
|
+
hasDate(value) {
|
|
3963
|
+
return this.translate(value).length &&
|
|
3964
|
+
value.toLowerCase().indexOf('d') >= 0 &&
|
|
3965
|
+
value.indexOf('M') >= 0 && value.toLowerCase().indexOf('y') >= 0;
|
|
3752
3966
|
}
|
|
3753
|
-
|
|
3754
|
-
return
|
|
3755
|
-
|
|
3967
|
+
is24Hour(value) {
|
|
3968
|
+
return this.translate(value).length &&
|
|
3969
|
+
value.indexOf('H') >= 0;
|
|
3756
3970
|
}
|
|
3757
|
-
|
|
3758
|
-
return
|
|
3759
|
-
&&
|
|
3971
|
+
hasNoDay(value) {
|
|
3972
|
+
return this.translate(value).length && value.toLowerCase().indexOf('d') === -1 &&
|
|
3973
|
+
value.indexOf('M') >= 0 && value.toLowerCase().indexOf('y') >= 0;
|
|
3760
3974
|
}
|
|
3761
|
-
|
|
3762
|
-
return
|
|
3763
|
-
|
|
3975
|
+
hasNoDayAndMonth(value) {
|
|
3976
|
+
return this.translate(value).length &&
|
|
3977
|
+
value.toLowerCase().indexOf('d') === -1 &&
|
|
3978
|
+
value.indexOf('M') === -1 &&
|
|
3979
|
+
value.toLowerCase().indexOf('y') >= 0;
|
|
3764
3980
|
}
|
|
3765
|
-
|
|
3766
|
-
return this.
|
|
3981
|
+
hasHours(value) {
|
|
3982
|
+
return this.translate(value).length && value.toLowerCase().indexOf('h') >= 0 && value.indexOf('m') === -1;
|
|
3767
3983
|
}
|
|
3768
|
-
|
|
3769
|
-
return this.
|
|
3984
|
+
hasMinutes(value) {
|
|
3985
|
+
return this.translate(value).length && value.indexOf('m') >= 0 && value.toLowerCase().indexOf('h') >= 0;
|
|
3770
3986
|
}
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
if (!this.field_type) {
|
|
3774
|
-
return false;
|
|
3775
|
-
}
|
|
3776
|
-
return dynamicFieldTypes.some(t => t === this.field_type.type);
|
|
3987
|
+
hasSeconds(value) {
|
|
3988
|
+
return this.translate(value).length && value.toLowerCase().indexOf('s') >= 0;
|
|
3777
3989
|
}
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3990
|
+
static ɵfac = function FormatTranslatorService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || FormatTranslatorService)(); };
|
|
3991
|
+
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: FormatTranslatorService, factory: FormatTranslatorService.ɵfac });
|
|
3992
|
+
}
|
|
3993
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FormatTranslatorService, [{
|
|
3994
|
+
type: Injectable
|
|
3995
|
+
}], null, null); })();
|
|
3996
|
+
|
|
3997
|
+
class DatePipe {
|
|
3998
|
+
formatTrans;
|
|
3999
|
+
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)?$');
|
|
4000
|
+
// 1 2 3 4 5 6 7 8 9 10 11
|
|
4001
|
+
static MONTHS = [
|
|
4002
|
+
['Jan'], ['Feb'], ['Mar'], ['Apr'], ['May'], ['Jun'], ['Jul'], ['Aug'], ['Sep'], ['Oct'], ['Nov'], ['Dec'],
|
|
4003
|
+
];
|
|
4004
|
+
/**
|
|
4005
|
+
* constructor to allow format translator to be injected
|
|
4006
|
+
* @param formatTrans format translator
|
|
4007
|
+
*/
|
|
4008
|
+
constructor(formatTrans) {
|
|
4009
|
+
this.formatTrans = formatTrans;
|
|
3782
4010
|
}
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
if (
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
if (
|
|
3790
|
-
|
|
4011
|
+
transform(value, zone, format) {
|
|
4012
|
+
let resultDate = null;
|
|
4013
|
+
const ISO_FORMAT = 'YYYY-MM-DDTHH:mm:ss.SSSZ';
|
|
4014
|
+
if (value) {
|
|
4015
|
+
// included to avoid editing the hour twice on second pass through
|
|
4016
|
+
// this occurs on case details when datepipe is applied twice
|
|
4017
|
+
if (!value.includes('T')) {
|
|
4018
|
+
zone = 'utc';
|
|
3791
4019
|
}
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
4020
|
+
const match = value.match(DatePipe.DATE_FORMAT_REGEXP);
|
|
4021
|
+
// Make sure we actually have a match.
|
|
4022
|
+
if (match) {
|
|
4023
|
+
let offsetDate = null;
|
|
4024
|
+
const date = this.getDate(match);
|
|
4025
|
+
if (zone === 'local') {
|
|
4026
|
+
offsetDate = this.getOffsetDate(date);
|
|
4027
|
+
}
|
|
4028
|
+
else {
|
|
4029
|
+
offsetDate = this.getDate(match);
|
|
4030
|
+
}
|
|
4031
|
+
// 'short' format is meaningful to formatDate, but not the same meaning as in the unit tests
|
|
4032
|
+
if (this.formatTrans && format && format !== 'short') {
|
|
4033
|
+
// support for java style formatting strings for dates
|
|
4034
|
+
format = this.translateDateFormat(format);
|
|
4035
|
+
resultDate = moment(offsetDate).format(format);
|
|
4036
|
+
}
|
|
4037
|
+
else {
|
|
4038
|
+
// RDM-1149 changed the pipe logic so that it doesn't add an hour to 'Summer Time' dates on DateTime field type
|
|
4039
|
+
resultDate = `${offsetDate.getDate()} ${DatePipe.MONTHS[offsetDate.getMonth()]} ${offsetDate.getFullYear()}`;
|
|
4040
|
+
if (match[4] && match[5] && match[6] && format !== 'short') {
|
|
4041
|
+
resultDate += ', ';
|
|
4042
|
+
resultDate += `${this.getHour(offsetDate.getHours().toString())}:`;
|
|
4043
|
+
resultDate += `${this.pad(offsetDate.getMinutes())}:`;
|
|
4044
|
+
resultDate += `${this.pad(offsetDate.getSeconds())} `;
|
|
4045
|
+
resultDate += (this.toInt(offsetDate.getHours().toString()) >= 12) ? 'PM' : 'AM';
|
|
4046
|
+
}
|
|
4047
|
+
}
|
|
3801
4048
|
}
|
|
3802
4049
|
else {
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
__metadata("design:type", CaseField)
|
|
3821
|
-
], CaseField.prototype, "parent", void 0);
|
|
3822
|
-
__decorate([
|
|
3823
|
-
Type(() => FieldType),
|
|
3824
|
-
__metadata("design:type", FieldType)
|
|
3825
|
-
], CaseField.prototype, "field_type", void 0);
|
|
3826
|
-
__decorate([
|
|
3827
|
-
Type(() => WizardPageField),
|
|
3828
|
-
__metadata("design:type", WizardPageField)
|
|
3829
|
-
], CaseField.prototype, "wizardProps", void 0);
|
|
3830
|
-
__decorate([
|
|
3831
|
-
Expose(),
|
|
3832
|
-
__metadata("design:type", Object),
|
|
3833
|
-
__metadata("design:paramtypes", [Object])
|
|
3834
|
-
], CaseField.prototype, "value", null);
|
|
3835
|
-
__decorate([
|
|
3836
|
-
Expose(),
|
|
3837
|
-
__metadata("design:type", Object),
|
|
3838
|
-
__metadata("design:paramtypes", [Object])
|
|
3839
|
-
], CaseField.prototype, "list_items", null);
|
|
3840
|
-
__decorate([
|
|
3841
|
-
Expose(),
|
|
3842
|
-
__metadata("design:type", String),
|
|
3843
|
-
__metadata("design:paramtypes", [])
|
|
3844
|
-
], CaseField.prototype, "dateTimeEntryFormat", null);
|
|
3845
|
-
__decorate([
|
|
3846
|
-
Expose(),
|
|
3847
|
-
__metadata("design:type", String),
|
|
3848
|
-
__metadata("design:paramtypes", [])
|
|
3849
|
-
], CaseField.prototype, "dateTimeDisplayFormat", null);
|
|
3850
|
-
__decorate([
|
|
3851
|
-
Expose(),
|
|
3852
|
-
__metadata("design:type", Function),
|
|
3853
|
-
__metadata("design:paramtypes", []),
|
|
3854
|
-
__metadata("design:returntype", void 0)
|
|
3855
|
-
], CaseField.prototype, "isComplexDisplay", null);
|
|
3856
|
-
__decorate([
|
|
3857
|
-
Expose(),
|
|
3858
|
-
__metadata("design:type", Function),
|
|
3859
|
-
__metadata("design:paramtypes", []),
|
|
3860
|
-
__metadata("design:returntype", void 0)
|
|
3861
|
-
], CaseField.prototype, "isComplexEntry", null);
|
|
3862
|
-
__decorate([
|
|
3863
|
-
Expose(),
|
|
3864
|
-
__metadata("design:type", Function),
|
|
3865
|
-
__metadata("design:paramtypes", []),
|
|
3866
|
-
__metadata("design:returntype", void 0)
|
|
3867
|
-
], CaseField.prototype, "isReadonly", null);
|
|
3868
|
-
__decorate([
|
|
3869
|
-
Expose(),
|
|
3870
|
-
__metadata("design:type", Function),
|
|
3871
|
-
__metadata("design:paramtypes", []),
|
|
3872
|
-
__metadata("design:returntype", void 0)
|
|
3873
|
-
], CaseField.prototype, "isOptional", null);
|
|
3874
|
-
__decorate([
|
|
3875
|
-
Expose(),
|
|
3876
|
-
__metadata("design:type", Function),
|
|
3877
|
-
__metadata("design:paramtypes", []),
|
|
3878
|
-
__metadata("design:returntype", void 0)
|
|
3879
|
-
], CaseField.prototype, "isMandatory", null);
|
|
3880
|
-
__decorate([
|
|
3881
|
-
Expose(),
|
|
3882
|
-
__metadata("design:type", Function),
|
|
3883
|
-
__metadata("design:paramtypes", []),
|
|
3884
|
-
__metadata("design:returntype", Boolean)
|
|
3885
|
-
], CaseField.prototype, "isCollection", null);
|
|
3886
|
-
__decorate([
|
|
3887
|
-
Expose(),
|
|
3888
|
-
__metadata("design:type", Function),
|
|
3889
|
-
__metadata("design:paramtypes", []),
|
|
3890
|
-
__metadata("design:returntype", Boolean)
|
|
3891
|
-
], CaseField.prototype, "isComplex", null);
|
|
3892
|
-
__decorate([
|
|
3893
|
-
Expose(),
|
|
3894
|
-
__metadata("design:type", Function),
|
|
3895
|
-
__metadata("design:paramtypes", []),
|
|
3896
|
-
__metadata("design:returntype", Boolean)
|
|
3897
|
-
], CaseField.prototype, "isDynamic", null);
|
|
3898
|
-
__decorate([
|
|
3899
|
-
Expose(),
|
|
3900
|
-
__metadata("design:type", Function),
|
|
3901
|
-
__metadata("design:paramtypes", []),
|
|
3902
|
-
__metadata("design:returntype", Boolean)
|
|
3903
|
-
], CaseField.prototype, "isCaseLink", null);
|
|
3904
|
-
__decorate([
|
|
3905
|
-
Expose(),
|
|
3906
|
-
__metadata("design:type", Function),
|
|
3907
|
-
__metadata("design:paramtypes", [String]),
|
|
3908
|
-
__metadata("design:returntype", String)
|
|
3909
|
-
], CaseField.prototype, "getHierachicalId", null);
|
|
3910
|
-
|
|
3911
|
-
// @dynamic
|
|
3912
|
-
class WizardPage {
|
|
3913
|
-
id;
|
|
3914
|
-
label;
|
|
3915
|
-
order;
|
|
3916
|
-
wizard_page_fields;
|
|
3917
|
-
case_fields;
|
|
3918
|
-
show_condition;
|
|
3919
|
-
parsedShowCondition;
|
|
3920
|
-
getCol1Fields() {
|
|
3921
|
-
return this.case_fields?.filter(f => !f.wizardProps.page_column_no || f.wizardProps.page_column_no === 1);
|
|
3922
|
-
}
|
|
3923
|
-
getCol2Fields() {
|
|
3924
|
-
return this.case_fields?.filter(f => f.wizardProps.page_column_no === 2);
|
|
3925
|
-
}
|
|
3926
|
-
isMultiColumn() {
|
|
3927
|
-
return this.getCol2Fields()?.length > 0;
|
|
3928
|
-
}
|
|
3929
|
-
}
|
|
3930
|
-
__decorate([
|
|
3931
|
-
Type(() => WizardPageField),
|
|
3932
|
-
__metadata("design:type", Array)
|
|
3933
|
-
], WizardPage.prototype, "wizard_page_fields", void 0);
|
|
3934
|
-
__decorate([
|
|
3935
|
-
Type(() => CaseField),
|
|
3936
|
-
__metadata("design:type", Array)
|
|
3937
|
-
], WizardPage.prototype, "case_fields", void 0);
|
|
3938
|
-
|
|
3939
|
-
// @dynamic
|
|
3940
|
-
class CaseEventTrigger {
|
|
3941
|
-
id;
|
|
3942
|
-
name;
|
|
3943
|
-
description;
|
|
3944
|
-
case_id;
|
|
3945
|
-
case_fields;
|
|
3946
|
-
event_token;
|
|
3947
|
-
wizard_pages;
|
|
3948
|
-
show_summary;
|
|
3949
|
-
show_event_notes;
|
|
3950
|
-
end_button_label;
|
|
3951
|
-
can_save_draft;
|
|
3952
|
-
hasFields() {
|
|
3953
|
-
return this.case_fields && this.case_fields.length !== 0;
|
|
3954
|
-
}
|
|
3955
|
-
hasPages() {
|
|
3956
|
-
return this.wizard_pages && this.wizard_pages.length !== 0;
|
|
3957
|
-
}
|
|
3958
|
-
}
|
|
3959
|
-
__decorate([
|
|
3960
|
-
Type(() => CaseField),
|
|
3961
|
-
__metadata("design:type", Array)
|
|
3962
|
-
], CaseEventTrigger.prototype, "case_fields", void 0);
|
|
3963
|
-
__decorate([
|
|
3964
|
-
Type(() => WizardPage),
|
|
3965
|
-
__metadata("design:type", Array)
|
|
3966
|
-
], CaseEventTrigger.prototype, "wizard_pages", void 0);
|
|
3967
|
-
|
|
3968
|
-
// tslint:disable:variable-name
|
|
3969
|
-
class CaseViewEvent {
|
|
3970
|
-
id;
|
|
3971
|
-
timestamp;
|
|
3972
|
-
summary;
|
|
3973
|
-
comment;
|
|
3974
|
-
event_id;
|
|
3975
|
-
event_name;
|
|
3976
|
-
state_id;
|
|
3977
|
-
state_name;
|
|
3978
|
-
user_id;
|
|
3979
|
-
user_last_name;
|
|
3980
|
-
user_first_name;
|
|
3981
|
-
significant_item;
|
|
3982
|
-
}
|
|
3983
|
-
|
|
3984
|
-
class CaseViewTrigger {
|
|
3985
|
-
id;
|
|
3986
|
-
name;
|
|
3987
|
-
description;
|
|
3988
|
-
order;
|
|
3989
|
-
}
|
|
3990
|
-
|
|
3991
|
-
class CaseEvent {
|
|
3992
|
-
id;
|
|
3993
|
-
name;
|
|
3994
|
-
post_state;
|
|
3995
|
-
pre_states;
|
|
3996
|
-
case_fields;
|
|
3997
|
-
description;
|
|
3998
|
-
order;
|
|
3999
|
-
acls;
|
|
4000
|
-
}
|
|
4001
|
-
|
|
4002
|
-
class CaseState {
|
|
4003
|
-
id;
|
|
4004
|
-
name;
|
|
4005
|
-
description;
|
|
4006
|
-
order;
|
|
4007
|
-
}
|
|
4008
|
-
|
|
4009
|
-
// Light clone of CaseType to be used in Jurisdiction class
|
|
4010
|
-
// to avoid cyclic dependency
|
|
4011
|
-
class CaseTypeLite {
|
|
4012
|
-
id;
|
|
4013
|
-
name;
|
|
4014
|
-
events;
|
|
4015
|
-
states;
|
|
4016
|
-
description;
|
|
4017
|
-
}
|
|
4018
|
-
|
|
4019
|
-
// @dynamics
|
|
4020
|
-
class CaseType {
|
|
4021
|
-
id;
|
|
4022
|
-
name;
|
|
4023
|
-
events;
|
|
4024
|
-
states;
|
|
4025
|
-
case_fields;
|
|
4026
|
-
description;
|
|
4027
|
-
jurisdiction;
|
|
4028
|
-
printEnabled;
|
|
4029
|
-
}
|
|
4030
|
-
__decorate([
|
|
4031
|
-
Type(() => CaseField),
|
|
4032
|
-
__metadata("design:type", Array)
|
|
4033
|
-
], CaseType.prototype, "case_fields", void 0);
|
|
4034
|
-
|
|
4035
|
-
// tslint:disable:variable-name
|
|
4036
|
-
class EventCaseField {
|
|
4037
|
-
case_field_id;
|
|
4038
|
-
showCondition;
|
|
4039
|
-
}
|
|
4040
|
-
|
|
4041
|
-
class Banner {
|
|
4042
|
-
bannerDescription;
|
|
4043
|
-
bannerUrlText;
|
|
4044
|
-
bannerUrl;
|
|
4045
|
-
bannerViewed;
|
|
4046
|
-
bannerEnabled;
|
|
4047
|
-
}
|
|
4048
|
-
|
|
4049
|
-
// @dynamic
|
|
4050
|
-
class CaseTab {
|
|
4051
|
-
id;
|
|
4052
|
-
label;
|
|
4053
|
-
order;
|
|
4054
|
-
fields;
|
|
4055
|
-
show_condition;
|
|
4056
|
-
defaultFocus;
|
|
4057
|
-
}
|
|
4058
|
-
__decorate([
|
|
4059
|
-
Type(() => CaseField),
|
|
4060
|
-
__metadata("design:type", Array)
|
|
4061
|
-
], CaseTab.prototype, "fields", void 0);
|
|
4062
|
-
|
|
4063
|
-
// @dynamic
|
|
4064
|
-
class CaseView {
|
|
4065
|
-
case_id;
|
|
4066
|
-
case_type;
|
|
4067
|
-
state;
|
|
4068
|
-
channels;
|
|
4069
|
-
tabs;
|
|
4070
|
-
triggers;
|
|
4071
|
-
events;
|
|
4072
|
-
metadataFields;
|
|
4073
|
-
basicFields;
|
|
4074
|
-
case_flag;
|
|
4075
|
-
}
|
|
4076
|
-
__decorate([
|
|
4077
|
-
Type(() => CaseTab),
|
|
4078
|
-
__metadata("design:type", Array)
|
|
4079
|
-
], CaseView.prototype, "tabs", void 0);
|
|
4080
|
-
__decorate([
|
|
4081
|
-
Type(() => CaseField),
|
|
4082
|
-
__metadata("design:type", Array)
|
|
4083
|
-
], CaseView.prototype, "metadataFields", void 0);
|
|
4084
|
-
|
|
4085
|
-
class CasePrintDocument {
|
|
4086
|
-
name;
|
|
4087
|
-
type;
|
|
4088
|
-
url;
|
|
4089
|
-
}
|
|
4090
|
-
|
|
4091
|
-
// tslint:disable:variable-name
|
|
4092
|
-
class HRef {
|
|
4093
|
-
href;
|
|
4094
|
-
}
|
|
4095
|
-
class DocumentLinks {
|
|
4096
|
-
self;
|
|
4097
|
-
binary;
|
|
4098
|
-
}
|
|
4099
|
-
class Document {
|
|
4100
|
-
_links;
|
|
4101
|
-
originalDocumentName;
|
|
4102
|
-
hashToken;
|
|
4103
|
-
}
|
|
4104
|
-
class Embedded {
|
|
4105
|
-
documents;
|
|
4106
|
-
}
|
|
4107
|
-
class DocumentData {
|
|
4108
|
-
_embedded;
|
|
4109
|
-
documents;
|
|
4110
|
-
}
|
|
4111
|
-
class FormDocument {
|
|
4112
|
-
document_url;
|
|
4113
|
-
document_binary_url;
|
|
4114
|
-
document_filename;
|
|
4115
|
-
document_hash;
|
|
4116
|
-
upload_timestamp;
|
|
4117
|
-
}
|
|
4118
|
-
|
|
4119
|
-
class OrganisationConverter {
|
|
4120
|
-
static toSimpleAddress(organisationModel) {
|
|
4121
|
-
let simpleAddress = '';
|
|
4122
|
-
if (organisationModel.addressLine1) {
|
|
4123
|
-
simpleAddress += `${organisationModel.addressLine1}<br>`;
|
|
4050
|
+
// EUI-2667. See if what we've been given is actually a formatted date that
|
|
4051
|
+
// we could attempt to do something with.
|
|
4052
|
+
const parsedDate = Date.parse(value);
|
|
4053
|
+
// We successfully parsed it so let's use it.
|
|
4054
|
+
if (!isNaN(parsedDate)) {
|
|
4055
|
+
const d = new Date(parsedDate);
|
|
4056
|
+
// If what we received didn't include time, don't include it here either.
|
|
4057
|
+
if (value.indexOf(':') < 0) {
|
|
4058
|
+
const shortDate = d.toLocaleDateString('en-GB');
|
|
4059
|
+
const shortISO = shortDate.split('/').reverse().join('-');
|
|
4060
|
+
return this.transform(shortISO, zone, format);
|
|
4061
|
+
}
|
|
4062
|
+
// If it did include time, we want a full ISO string.
|
|
4063
|
+
const thisMoment = moment(d).format(ISO_FORMAT);
|
|
4064
|
+
return this.transform(thisMoment, zone, format);
|
|
4065
|
+
}
|
|
4066
|
+
}
|
|
4124
4067
|
}
|
|
4125
|
-
|
|
4126
|
-
|
|
4068
|
+
return resultDate;
|
|
4069
|
+
}
|
|
4070
|
+
translateDateFormat(format) {
|
|
4071
|
+
if (this.formatTrans) {
|
|
4072
|
+
return this.formatTrans.translate(format);
|
|
4127
4073
|
}
|
|
4128
|
-
|
|
4129
|
-
|
|
4074
|
+
else {
|
|
4075
|
+
return format;
|
|
4130
4076
|
}
|
|
4131
|
-
|
|
4132
|
-
|
|
4077
|
+
}
|
|
4078
|
+
getOffsetDate(date) {
|
|
4079
|
+
const localOffset = -date.getTimezoneOffset() / 60;
|
|
4080
|
+
return new Date(date.getTime() + localOffset * 3600 * 1000);
|
|
4081
|
+
}
|
|
4082
|
+
getDate(match) {
|
|
4083
|
+
const year = this.toInt(match[1]);
|
|
4084
|
+
const month = this.toInt(match[2]) - 1;
|
|
4085
|
+
const day = this.toInt(match[3]);
|
|
4086
|
+
let resultDate;
|
|
4087
|
+
if (match[4] && match[5] && match[6]) {
|
|
4088
|
+
const hour = this.toInt(match[4]);
|
|
4089
|
+
const minutes = this.toInt(match[5]);
|
|
4090
|
+
const seconds = this.toInt(match[6]);
|
|
4091
|
+
resultDate = new Date(year, month, day, hour, minutes, seconds, 0);
|
|
4133
4092
|
}
|
|
4134
|
-
|
|
4135
|
-
|
|
4093
|
+
else {
|
|
4094
|
+
resultDate = new Date(year, month, day);
|
|
4136
4095
|
}
|
|
4137
|
-
|
|
4138
|
-
|
|
4096
|
+
return resultDate;
|
|
4097
|
+
}
|
|
4098
|
+
getHour(hourStr) {
|
|
4099
|
+
let hourNum = this.toInt(hourStr);
|
|
4100
|
+
if (hourNum > 12) {
|
|
4101
|
+
hourNum = hourNum - 12;
|
|
4139
4102
|
}
|
|
4140
|
-
if (
|
|
4141
|
-
|
|
4103
|
+
else if (hourNum === 0) {
|
|
4104
|
+
hourNum = 12;
|
|
4142
4105
|
}
|
|
4143
|
-
return
|
|
4106
|
+
return hourNum;
|
|
4144
4107
|
}
|
|
4145
|
-
|
|
4146
|
-
return
|
|
4147
|
-
organisationIdentifier: organisationModel.organisationIdentifier,
|
|
4148
|
-
name: organisationModel.name,
|
|
4149
|
-
address: OrganisationConverter.toSimpleAddress(organisationModel)
|
|
4150
|
-
};
|
|
4108
|
+
toInt(str) {
|
|
4109
|
+
return parseInt(str, 10);
|
|
4151
4110
|
}
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
class PaginationMetadata {
|
|
4160
|
-
totalResultsCount;
|
|
4161
|
-
totalPagesCount;
|
|
4111
|
+
pad(num, padNum = 2) {
|
|
4112
|
+
const val = num !== undefined ? num.toString() : '';
|
|
4113
|
+
return val.length >= padNum ? val : new Array(padNum - val.length + 1).join('0') + val;
|
|
4114
|
+
}
|
|
4115
|
+
static ɵfac = function DatePipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || DatePipe)(i0.ɵɵdirectiveInject(FormatTranslatorService, 16)); };
|
|
4116
|
+
static ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "ccdDate", type: DatePipe, pure: true, standalone: false });
|
|
4162
4117
|
}
|
|
4118
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DatePipe, [{
|
|
4119
|
+
type: Pipe,
|
|
4120
|
+
args: [{
|
|
4121
|
+
name: 'ccdDate',
|
|
4122
|
+
standalone: false
|
|
4123
|
+
}]
|
|
4124
|
+
}], () => [{ type: FormatTranslatorService }], null); })();
|
|
4163
4125
|
|
|
4164
|
-
class
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
this.
|
|
4177
|
-
|
|
4126
|
+
class FieldLabelPipe {
|
|
4127
|
+
rpxTranslationPipe;
|
|
4128
|
+
constructor(rpxTranslationPipe) {
|
|
4129
|
+
this.rpxTranslationPipe = rpxTranslationPipe;
|
|
4130
|
+
}
|
|
4131
|
+
transform(field) {
|
|
4132
|
+
if (!field || !field.label) {
|
|
4133
|
+
return '';
|
|
4134
|
+
}
|
|
4135
|
+
else if (!field.display_context) {
|
|
4136
|
+
return this.getTranslatedLabel(field);
|
|
4137
|
+
}
|
|
4138
|
+
return this.getTranslatedLabel(field) + (field.display_context.toUpperCase() === 'OPTIONAL' ?
|
|
4139
|
+
' (' + this.rpxTranslationPipe.transform('Optional') + ')' : '');
|
|
4140
|
+
}
|
|
4141
|
+
getTranslatedLabel(field) {
|
|
4142
|
+
if (!field.isTranslated) {
|
|
4143
|
+
return this.rpxTranslationPipe.transform(field.label);
|
|
4144
|
+
}
|
|
4145
|
+
else {
|
|
4146
|
+
return field.label;
|
|
4147
|
+
}
|
|
4148
|
+
}
|
|
4149
|
+
getOriginalLabelForYesNoTranslation(field) {
|
|
4150
|
+
return field.originalLabel || field.label;
|
|
4178
4151
|
}
|
|
4152
|
+
static ɵfac = function FieldLabelPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || FieldLabelPipe)(i0.ɵɵdirectiveInject(i1.RpxTranslatePipe, 16)); };
|
|
4153
|
+
static ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "ccdFieldLabel", type: FieldLabelPipe, pure: false, standalone: false });
|
|
4179
4154
|
}
|
|
4155
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FieldLabelPipe, [{
|
|
4156
|
+
type: Pipe,
|
|
4157
|
+
args: [{
|
|
4158
|
+
name: 'ccdFieldLabel',
|
|
4159
|
+
pure: false,
|
|
4160
|
+
standalone: false
|
|
4161
|
+
}]
|
|
4162
|
+
}], () => [{ type: i1.RpxTranslatePipe }], null); })();
|
|
4180
4163
|
|
|
4181
|
-
class
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4164
|
+
class FirstErrorPipe {
|
|
4165
|
+
rpxTranslationService;
|
|
4166
|
+
injector;
|
|
4167
|
+
asyncPipe;
|
|
4168
|
+
constructor(rpxTranslationService, injector) {
|
|
4169
|
+
this.rpxTranslationService = rpxTranslationService;
|
|
4170
|
+
this.injector = injector;
|
|
4171
|
+
this.asyncPipe = new AsyncPipe(this.injector.get(ChangeDetectorRef));
|
|
4172
|
+
}
|
|
4173
|
+
transform(value, args) {
|
|
4174
|
+
if (!value) {
|
|
4175
|
+
return '';
|
|
4176
|
+
}
|
|
4177
|
+
if (!args) {
|
|
4178
|
+
args = 'Field';
|
|
4179
|
+
}
|
|
4180
|
+
const keys = Object.keys(value);
|
|
4181
|
+
if (!keys.length) {
|
|
4182
|
+
return '';
|
|
4183
|
+
}
|
|
4184
|
+
let errorMessage;
|
|
4185
|
+
if (keys[0] === 'required') {
|
|
4186
|
+
errorMessage = '%FIELDLABEL% is required';
|
|
4187
|
+
}
|
|
4188
|
+
else if (keys[0] === 'pattern') {
|
|
4189
|
+
errorMessage = 'The data entered is not valid for %FIELDLABEL%';
|
|
4190
|
+
}
|
|
4191
|
+
else if (keys[0] === 'markDownPattern') {
|
|
4192
|
+
errorMessage = 'The data entered is not valid for %FIELDLABEL%. Link mark up characters are not allowed in this field';
|
|
4193
|
+
}
|
|
4194
|
+
else if (keys[0] === 'unsafeRichText') {
|
|
4195
|
+
errorMessage = 'The data entered is not valid for %FIELDLABEL%. Potentially unsafe HTML content is not allowed in this field';
|
|
4196
|
+
}
|
|
4197
|
+
else if (keys[0] === 'minlength') {
|
|
4198
|
+
errorMessage = '%FIELDLABEL% is below the minimum length';
|
|
4199
|
+
}
|
|
4200
|
+
else if (keys[0] === 'maxlength') {
|
|
4201
|
+
errorMessage = '%FIELDLABEL% exceeds the maximum length';
|
|
4202
|
+
}
|
|
4203
|
+
else if (value.hasOwnProperty('matDatetimePickerParse')) {
|
|
4204
|
+
errorMessage = 'The date entered is not valid. Please provide a valid date';
|
|
4205
|
+
}
|
|
4206
|
+
else {
|
|
4207
|
+
errorMessage = value[keys[0]];
|
|
4208
|
+
}
|
|
4209
|
+
const o = this.rpxTranslationService.getTranslation$(args).pipe(switchMap(fieldLabel => this.rpxTranslationService.getTranslationWithReplacements$(errorMessage, { FIELDLABEL: fieldLabel })));
|
|
4210
|
+
return this.asyncPipe.transform(o);
|
|
4211
|
+
}
|
|
4212
|
+
ngOnDestroy() {
|
|
4213
|
+
this.asyncPipe.ngOnDestroy();
|
|
4214
|
+
}
|
|
4215
|
+
static ɵfac = function FirstErrorPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || FirstErrorPipe)(i0.ɵɵdirectiveInject(i1.RpxTranslationService, 16), i0.ɵɵdirectiveInject(i0.Injector, 16)); };
|
|
4216
|
+
static ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "ccdFirstError", type: FirstErrorPipe, pure: false, standalone: false });
|
|
4188
4217
|
}
|
|
4218
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FirstErrorPipe, [{
|
|
4219
|
+
type: Pipe,
|
|
4220
|
+
args: [{
|
|
4221
|
+
name: 'ccdFirstError',
|
|
4222
|
+
pure: false,
|
|
4223
|
+
standalone: false
|
|
4224
|
+
}]
|
|
4225
|
+
}], () => [{ type: i1.RpxTranslationService }, { type: i0.Injector }], null); })();
|
|
4189
4226
|
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4227
|
+
class IsCompoundPipe {
|
|
4228
|
+
static COMPOUND_TYPES = [
|
|
4229
|
+
'Complex',
|
|
4230
|
+
'Label',
|
|
4231
|
+
'AddressGlobal',
|
|
4232
|
+
'AddressUK',
|
|
4233
|
+
'AddressGlobalUK',
|
|
4234
|
+
'CasePaymentHistoryViewer',
|
|
4235
|
+
'CaseHistoryViewer',
|
|
4236
|
+
'Organisation',
|
|
4237
|
+
'WaysToPay',
|
|
4238
|
+
'ComponentLauncher',
|
|
4239
|
+
'FlagLauncher',
|
|
4240
|
+
'CaseFlag'
|
|
4241
|
+
];
|
|
4242
|
+
static EXCLUDE = [
|
|
4243
|
+
'CaseLink',
|
|
4244
|
+
'JudicialUser',
|
|
4245
|
+
'StaffUser'
|
|
4246
|
+
];
|
|
4247
|
+
transform(field) {
|
|
4248
|
+
if (!field || !field.field_type || !field.field_type.type) {
|
|
4249
|
+
return false;
|
|
4250
|
+
}
|
|
4251
|
+
if (IsCompoundPipe.COMPOUND_TYPES.indexOf(field.field_type.type) !== -1) {
|
|
4252
|
+
if (IsCompoundPipe.EXCLUDE.indexOf(field.field_type.id) !== -1) {
|
|
4253
|
+
return false;
|
|
4254
|
+
}
|
|
4255
|
+
return true;
|
|
4256
|
+
}
|
|
4257
|
+
return false;
|
|
4258
|
+
}
|
|
4259
|
+
static ɵfac = function IsCompoundPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || IsCompoundPipe)(); };
|
|
4260
|
+
static ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "ccdIsCompound", type: IsCompoundPipe, pure: true, standalone: false });
|
|
4198
4261
|
}
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4262
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(IsCompoundPipe, [{
|
|
4263
|
+
type: Pipe,
|
|
4264
|
+
args: [{
|
|
4265
|
+
name: 'ccdIsCompound',
|
|
4266
|
+
standalone: false
|
|
4267
|
+
}]
|
|
4268
|
+
}], null, null); })();
|
|
4203
4269
|
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4270
|
+
class CaseFieldService {
|
|
4271
|
+
isOptional(field) {
|
|
4272
|
+
if (!field || !field.display_context) {
|
|
4273
|
+
return false;
|
|
4274
|
+
}
|
|
4275
|
+
return field.display_context.toUpperCase() === 'OPTIONAL';
|
|
4276
|
+
}
|
|
4277
|
+
isReadOnly(field) {
|
|
4278
|
+
if (!field || !field.display_context) {
|
|
4279
|
+
return false;
|
|
4280
|
+
}
|
|
4281
|
+
return field.display_context.toUpperCase() === 'READONLY';
|
|
4282
|
+
}
|
|
4283
|
+
isMandatory(field) {
|
|
4284
|
+
if (!field || !field.display_context) {
|
|
4285
|
+
return false;
|
|
4286
|
+
}
|
|
4287
|
+
return field.display_context.toUpperCase() === 'MANDATORY';
|
|
4288
|
+
}
|
|
4289
|
+
isLabel(field) {
|
|
4290
|
+
if (!field || !field.field_type) {
|
|
4291
|
+
return false;
|
|
4292
|
+
}
|
|
4293
|
+
return field.field_type.type === 'Label';
|
|
4213
4294
|
}
|
|
4295
|
+
static ɵfac = function CaseFieldService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaseFieldService)(); };
|
|
4296
|
+
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: CaseFieldService, factory: CaseFieldService.ɵfac });
|
|
4214
4297
|
}
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
], SearchResultView.prototype, "columns", void 0);
|
|
4219
|
-
__decorate([
|
|
4220
|
-
Type(() => SearchResultViewItem),
|
|
4221
|
-
__metadata("design:type", Array)
|
|
4222
|
-
], SearchResultView.prototype, "results", void 0);
|
|
4298
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFieldService, [{
|
|
4299
|
+
type: Injectable
|
|
4300
|
+
}], null, null); })();
|
|
4223
4301
|
|
|
4224
|
-
class
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4302
|
+
class IsMandatoryPipe {
|
|
4303
|
+
caseFieldService;
|
|
4304
|
+
constructor(caseFieldService) {
|
|
4305
|
+
this.caseFieldService = caseFieldService;
|
|
4306
|
+
}
|
|
4307
|
+
transform(field) {
|
|
4308
|
+
return this.caseFieldService.isMandatory(field);
|
|
4230
4309
|
}
|
|
4310
|
+
static ɵfac = function IsMandatoryPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || IsMandatoryPipe)(i0.ɵɵdirectiveInject(CaseFieldService, 16)); };
|
|
4311
|
+
static ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "ccdIsMandatory", type: IsMandatoryPipe, pure: true, standalone: false });
|
|
4231
4312
|
}
|
|
4313
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(IsMandatoryPipe, [{
|
|
4314
|
+
type: Pipe,
|
|
4315
|
+
args: [{
|
|
4316
|
+
name: 'ccdIsMandatory',
|
|
4317
|
+
standalone: false
|
|
4318
|
+
}]
|
|
4319
|
+
}], () => [{ type: CaseFieldService }], null); })();
|
|
4232
4320
|
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
SortOrder[SortOrder["UNSORTED"] = 2] = "UNSORTED";
|
|
4238
|
-
})(SortOrder$1 || (SortOrder$1 = {}));
|
|
4239
|
-
|
|
4240
|
-
const STAFF_CACHE_ROLE_CATEGORIES = new Set([
|
|
4241
|
-
'ADMIN',
|
|
4242
|
-
'CTSC',
|
|
4243
|
-
'LEGAL_OPERATIONS'
|
|
4244
|
-
]);
|
|
4245
|
-
const SUPPORTED_ROLE_CATEGORIES = new Set([
|
|
4246
|
-
...STAFF_CACHE_ROLE_CATEGORIES,
|
|
4247
|
-
'JUDICIAL',
|
|
4248
|
-
]);
|
|
4249
|
-
// Aliases allow the definition to use the shorter, hyphenated form within #ARGUMENT(...)
|
|
4250
|
-
const ROLE_CATEGORY_ALIASES = {
|
|
4251
|
-
LEGAL_OPS: 'LEGAL_OPERATIONS'
|
|
4252
|
-
};
|
|
4253
|
-
const ARGUMENT_REGEX = /#ARGUMENT\(([^)]*)\)/;
|
|
4254
|
-
const CATEGORY_PREFIX = 'CATEGORY-';
|
|
4255
|
-
const REGION_PREFIX = 'REGION-';
|
|
4256
|
-
/**
|
|
4257
|
-
* Parses the `display_context_parameter` of a StaffUser field to determine the filters to apply
|
|
4258
|
-
* when searching reference data.
|
|
4259
|
-
*
|
|
4260
|
-
* Expected format: `#ARGUMENT(CATEGORY-LEGAL-OPS,CATEGORY-ADMIN,REGION-1235)`
|
|
4261
|
-
*/
|
|
4262
|
-
function parseStaffUserSearchConfiguration(displayContextParameter) {
|
|
4263
|
-
if (!displayContextParameter) {
|
|
4264
|
-
return invalidConfiguration();
|
|
4321
|
+
class IsReadOnlyPipe {
|
|
4322
|
+
caseFieldService;
|
|
4323
|
+
constructor(caseFieldService) {
|
|
4324
|
+
this.caseFieldService = caseFieldService;
|
|
4265
4325
|
}
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
return invalidConfiguration();
|
|
4326
|
+
transform(field) {
|
|
4327
|
+
return this.caseFieldService.isReadOnly(field);
|
|
4269
4328
|
}
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4329
|
+
static ɵfac = function IsReadOnlyPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || IsReadOnlyPipe)(i0.ɵɵdirectiveInject(CaseFieldService, 16)); };
|
|
4330
|
+
static ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "ccdIsReadOnly", type: IsReadOnlyPipe, pure: true, standalone: false });
|
|
4331
|
+
}
|
|
4332
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(IsReadOnlyPipe, [{
|
|
4333
|
+
type: Pipe,
|
|
4334
|
+
args: [{
|
|
4335
|
+
name: 'ccdIsReadOnly',
|
|
4336
|
+
standalone: false
|
|
4337
|
+
}]
|
|
4338
|
+
}], () => [{ type: CaseFieldService }], null); })();
|
|
4339
|
+
|
|
4340
|
+
class IsReadOnlyAndNotCollectionPipe {
|
|
4341
|
+
caseFieldService;
|
|
4342
|
+
constructor(caseFieldService) {
|
|
4343
|
+
this.caseFieldService = caseFieldService;
|
|
4273
4344
|
}
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
const category = normaliseRoleCategory(token.substring(CATEGORY_PREFIX.length));
|
|
4278
|
-
if (!isStaffUserRoleCategory(category)) {
|
|
4279
|
-
return invalidConfiguration();
|
|
4280
|
-
}
|
|
4281
|
-
if (!roleCategories.includes(category)) {
|
|
4282
|
-
roleCategories.push(category);
|
|
4283
|
-
}
|
|
4284
|
-
}
|
|
4285
|
-
else if (token.startsWith(REGION_PREFIX)) {
|
|
4286
|
-
// Region filtering is not supported in this version; REGION- tokens are silently ignored
|
|
4345
|
+
transform(field) {
|
|
4346
|
+
if (!field || !field.field_type || !field.field_type.type) {
|
|
4347
|
+
return false;
|
|
4287
4348
|
}
|
|
4288
|
-
|
|
4289
|
-
return
|
|
4349
|
+
if (this.isCollection(field)) {
|
|
4350
|
+
return false;
|
|
4290
4351
|
}
|
|
4352
|
+
return this.caseFieldService.isReadOnly(field);
|
|
4291
4353
|
}
|
|
4292
|
-
|
|
4293
|
-
|
|
4354
|
+
// CaseField @Expose() doesn't work with the pipe in here, so leaving the manual check
|
|
4355
|
+
isCollection(field) {
|
|
4356
|
+
return field.field_type && field.field_type.type === 'Collection';
|
|
4294
4357
|
}
|
|
4295
|
-
return
|
|
4296
|
-
|
|
4297
|
-
configuration: {
|
|
4298
|
-
roleCategories,
|
|
4299
|
-
staffRoleCategories: roleCategories.filter(isStaffCacheRoleCategory),
|
|
4300
|
-
includesJudicial: roleCategories.includes('JUDICIAL')
|
|
4301
|
-
}
|
|
4302
|
-
};
|
|
4303
|
-
}
|
|
4304
|
-
function normaliseRoleCategory(category) {
|
|
4305
|
-
const normalised = category.replaceAll('-', '_');
|
|
4306
|
-
return ROLE_CATEGORY_ALIASES[normalised] || normalised;
|
|
4307
|
-
}
|
|
4308
|
-
function isStaffUserRoleCategory(category) {
|
|
4309
|
-
return SUPPORTED_ROLE_CATEGORIES.has(category);
|
|
4310
|
-
}
|
|
4311
|
-
function isStaffCacheRoleCategory(category) {
|
|
4312
|
-
return STAFF_CACHE_ROLE_CATEGORIES.has(category);
|
|
4313
|
-
}
|
|
4314
|
-
function invalidConfiguration() {
|
|
4315
|
-
return { valid: false, error: 'INVALID_ROLE_CATEGORIES' };
|
|
4358
|
+
static ɵfac = function IsReadOnlyAndNotCollectionPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || IsReadOnlyAndNotCollectionPipe)(i0.ɵɵdirectiveInject(CaseFieldService, 16)); };
|
|
4359
|
+
static ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "ccdIsReadOnlyAndNotCollection", type: IsReadOnlyAndNotCollectionPipe, pure: true, standalone: false });
|
|
4316
4360
|
}
|
|
4361
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(IsReadOnlyAndNotCollectionPipe, [{
|
|
4362
|
+
type: Pipe,
|
|
4363
|
+
args: [{
|
|
4364
|
+
name: 'ccdIsReadOnlyAndNotCollection',
|
|
4365
|
+
standalone: false
|
|
4366
|
+
}]
|
|
4367
|
+
}], () => [{ type: CaseFieldService }], null); })();
|
|
4317
4368
|
|
|
4318
|
-
class
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
workbasketInputs;
|
|
4369
|
+
class PaletteUtilsModule {
|
|
4370
|
+
static ɵfac = function PaletteUtilsModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PaletteUtilsModule)(); };
|
|
4371
|
+
static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: PaletteUtilsModule });
|
|
4372
|
+
static ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ providers: [
|
|
4373
|
+
IsCompoundPipe,
|
|
4374
|
+
RpxTranslatePipe
|
|
4375
|
+
], imports: [CommonModule,
|
|
4376
|
+
RpxTranslationModule.forChild()] });
|
|
4327
4377
|
}
|
|
4378
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaletteUtilsModule, [{
|
|
4379
|
+
type: NgModule,
|
|
4380
|
+
args: [{
|
|
4381
|
+
imports: [
|
|
4382
|
+
CommonModule,
|
|
4383
|
+
RpxTranslationModule.forChild()
|
|
4384
|
+
],
|
|
4385
|
+
declarations: [
|
|
4386
|
+
DatePipe,
|
|
4387
|
+
FieldLabelPipe,
|
|
4388
|
+
FirstErrorPipe,
|
|
4389
|
+
IsCompoundPipe,
|
|
4390
|
+
IsMandatoryPipe,
|
|
4391
|
+
IsReadOnlyPipe,
|
|
4392
|
+
IsReadOnlyAndNotCollectionPipe,
|
|
4393
|
+
DashPipe
|
|
4394
|
+
],
|
|
4395
|
+
exports: [
|
|
4396
|
+
DatePipe,
|
|
4397
|
+
FieldLabelPipe,
|
|
4398
|
+
FirstErrorPipe,
|
|
4399
|
+
IsCompoundPipe,
|
|
4400
|
+
IsMandatoryPipe,
|
|
4401
|
+
IsReadOnlyPipe,
|
|
4402
|
+
IsReadOnlyAndNotCollectionPipe,
|
|
4403
|
+
DashPipe
|
|
4404
|
+
],
|
|
4405
|
+
providers: [
|
|
4406
|
+
IsCompoundPipe,
|
|
4407
|
+
RpxTranslatePipe
|
|
4408
|
+
]
|
|
4409
|
+
}]
|
|
4410
|
+
}], null, null); })();
|
|
4411
|
+
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(PaletteUtilsModule, { declarations: [DatePipe,
|
|
4412
|
+
FieldLabelPipe,
|
|
4413
|
+
FirstErrorPipe,
|
|
4414
|
+
IsCompoundPipe,
|
|
4415
|
+
IsMandatoryPipe,
|
|
4416
|
+
IsReadOnlyPipe,
|
|
4417
|
+
IsReadOnlyAndNotCollectionPipe,
|
|
4418
|
+
DashPipe], imports: [CommonModule, i1.RpxTranslationModule], exports: [DatePipe,
|
|
4419
|
+
FieldLabelPipe,
|
|
4420
|
+
FirstErrorPipe,
|
|
4421
|
+
IsCompoundPipe,
|
|
4422
|
+
IsMandatoryPipe,
|
|
4423
|
+
IsReadOnlyPipe,
|
|
4424
|
+
IsReadOnlyAndNotCollectionPipe,
|
|
4425
|
+
DashPipe] }); })();
|
|
4328
4426
|
|
|
4329
4427
|
// @dynamic
|
|
4330
4428
|
class FieldsUtils {
|
|
@@ -9727,76 +9825,6 @@ class BrowserService {
|
|
|
9727
9825
|
}], null, null); })();
|
|
9728
9826
|
|
|
9729
9827
|
class CaseAccessUtils {
|
|
9730
|
-
// User role mapping
|
|
9731
|
-
static JUDGE_ROLE = 'judge';
|
|
9732
|
-
static JUDGE_ROLE_CATEGORY = 'JUDICIAL';
|
|
9733
|
-
static JUDGE_ROLE_NAME = 'judiciary';
|
|
9734
|
-
static ADMIN_ROLE = 'admin';
|
|
9735
|
-
static ADMIN_ROLE_CATEGORY = 'ADMIN';
|
|
9736
|
-
static ADMIN_ROLE_NAME = 'admin';
|
|
9737
|
-
static PROFESSIONAL_ROLE = 'solicitor';
|
|
9738
|
-
static PROFESSIONAL_ROLE_CATEGORY = 'PROFESSIONAL';
|
|
9739
|
-
static PROFESSIONAL_ROLE_NAME = 'professional';
|
|
9740
|
-
static LEGAL_OPERATIONS_ROLE = 'caseworker';
|
|
9741
|
-
static LEGAL_OPERATIONS_ROLE_CATEGORY = 'LEGAL_OPERATIONS';
|
|
9742
|
-
static LEGAL_OPERATIONS_ROLE_NAME = 'legal-ops';
|
|
9743
|
-
static CITIZEN_ROLE = 'citizen';
|
|
9744
|
-
static CITIZEN_ROLE_CATEGORY = 'CITIZEN';
|
|
9745
|
-
static CITIZEN_ROLE_NAME = 'citizen';
|
|
9746
|
-
static CTSC_ROLE = 'ctsc';
|
|
9747
|
-
static CTSC_ROLE_CATEGORY = 'CTSC';
|
|
9748
|
-
static CTSC_ROLE_NAME = 'ctsc';
|
|
9749
|
-
// fallback purely if roleCategories is not available in
|
|
9750
|
-
getMappedRoleCategories(roles = []) {
|
|
9751
|
-
const roleKeywords = roles.join().split('-').join().split(',');
|
|
9752
|
-
const roleCategoryList = [];
|
|
9753
|
-
if (this.roleHasKeyword(CaseAccessUtils.JUDGE_ROLE, roleKeywords)) {
|
|
9754
|
-
roleCategoryList.push(CaseAccessUtils.JUDGE_ROLE_CATEGORY);
|
|
9755
|
-
}
|
|
9756
|
-
if (this.roleHasKeyword(CaseAccessUtils.PROFESSIONAL_ROLE, roleKeywords)) {
|
|
9757
|
-
roleCategoryList.push(CaseAccessUtils.PROFESSIONAL_ROLE_CATEGORY);
|
|
9758
|
-
}
|
|
9759
|
-
if (this.roleHasKeyword(CaseAccessUtils.CITIZEN_ROLE, roleKeywords)) {
|
|
9760
|
-
roleCategoryList.push(CaseAccessUtils.CITIZEN_ROLE_CATEGORY);
|
|
9761
|
-
}
|
|
9762
|
-
if (this.roleHasKeyword(CaseAccessUtils.ADMIN_ROLE, roleKeywords)) {
|
|
9763
|
-
roleCategoryList.push(CaseAccessUtils.ADMIN_ROLE_CATEGORY);
|
|
9764
|
-
}
|
|
9765
|
-
if (this.roleHasKeyword(CaseAccessUtils.CTSC_ROLE, roleKeywords)) {
|
|
9766
|
-
roleCategoryList.push(CaseAccessUtils.CTSC_ROLE_CATEGORY);
|
|
9767
|
-
}
|
|
9768
|
-
if (this.roleHasKeyword(CaseAccessUtils.LEGAL_OPERATIONS_ROLE, roleKeywords)) {
|
|
9769
|
-
roleCategoryList.push(CaseAccessUtils.LEGAL_OPERATIONS_ROLE_CATEGORY);
|
|
9770
|
-
}
|
|
9771
|
-
return roleCategoryList;
|
|
9772
|
-
}
|
|
9773
|
-
roleHasKeyword(keyword, roleWords) {
|
|
9774
|
-
return roleWords.includes(keyword);
|
|
9775
|
-
}
|
|
9776
|
-
getAMRoleName(accessType, aMRole) {
|
|
9777
|
-
let roleName = '';
|
|
9778
|
-
switch (aMRole) {
|
|
9779
|
-
case CaseAccessUtils.JUDGE_ROLE_CATEGORY:
|
|
9780
|
-
roleName = `${accessType}-access-${CaseAccessUtils.JUDGE_ROLE_NAME}`;
|
|
9781
|
-
break;
|
|
9782
|
-
case CaseAccessUtils.PROFESSIONAL_ROLE_CATEGORY:
|
|
9783
|
-
roleName = `${accessType}-access-${CaseAccessUtils.PROFESSIONAL_ROLE_NAME}`;
|
|
9784
|
-
break;
|
|
9785
|
-
case CaseAccessUtils.CITIZEN_ROLE_CATEGORY:
|
|
9786
|
-
roleName = `${accessType}-access-${CaseAccessUtils.CITIZEN_ROLE_NAME}`;
|
|
9787
|
-
break;
|
|
9788
|
-
case CaseAccessUtils.ADMIN_ROLE_CATEGORY:
|
|
9789
|
-
roleName = `${accessType}-access-${CaseAccessUtils.ADMIN_ROLE_NAME}`;
|
|
9790
|
-
break;
|
|
9791
|
-
case CaseAccessUtils.CTSC_ROLE_CATEGORY:
|
|
9792
|
-
roleName = `${accessType}-access-${CaseAccessUtils.CTSC_ROLE_NAME}`;
|
|
9793
|
-
break;
|
|
9794
|
-
default:
|
|
9795
|
-
roleName = `${accessType}-access-${CaseAccessUtils.LEGAL_OPERATIONS_ROLE_NAME}`;
|
|
9796
|
-
break;
|
|
9797
|
-
}
|
|
9798
|
-
return roleName;
|
|
9799
|
-
}
|
|
9800
9828
|
getAMPayload(assignerId, actorId, roleName, roleCategory, grantType, caseId, details, beginTime = null, endTime = null, isNew = false) {
|
|
9801
9829
|
const process = details.caseReference !== undefined ? 'challenged-access' : 'specific-access';
|
|
9802
9830
|
const payload = {
|
|
@@ -11690,9 +11718,9 @@ class CasesService {
|
|
|
11690
11718
|
}
|
|
11691
11719
|
// EXUI-4758 - getMappedRoleCategories no longer returns a single string, checks all roles to get the most likely roleCategory
|
|
11692
11720
|
// Unsure whether we should be using mapped role categories any more - should trust the roleCategories from userInfo if they exist
|
|
11693
|
-
const roleCategories = userInfo.roleCategories ||
|
|
11721
|
+
const roleCategories = userInfo.roleCategories || getMappedRoleCategories(userInfo.roles);
|
|
11694
11722
|
// If user has no role categories, default to LEGAL_OPERATIONS
|
|
11695
|
-
const roleName =
|
|
11723
|
+
const roleName = getAMRoleName('challenged', roleCategories?.length > 0 ? roleCategories[0] : RoleCategory.LEGAL_OPERATIONS);
|
|
11696
11724
|
const beginTime = new Date();
|
|
11697
11725
|
const endTime = new Date(new Date().setUTCHours(23, 59, 59, 999));
|
|
11698
11726
|
const id = userInfo.id ? userInfo.id : userInfo.uid;
|
|
@@ -11709,10 +11737,10 @@ class CasesService {
|
|
|
11709
11737
|
return throwError(() => new Error('User info not found in session storage'));
|
|
11710
11738
|
}
|
|
11711
11739
|
// EXUI-4758 - See above comment
|
|
11712
|
-
const roleCategories = userInfo.roleCategories ||
|
|
11740
|
+
const roleCategories = userInfo.roleCategories || getMappedRoleCategories(userInfo.roles);
|
|
11713
11741
|
// EXUI-4758 - Return first roleCategory as the roleCategory for now, unless not present, in which case default to LEGAL_OPERATIONS
|
|
11714
|
-
const roleCategory = roleCategories?.length > 0 ? roleCategories[0] :
|
|
11715
|
-
const roleName =
|
|
11742
|
+
const roleCategory = roleCategories?.length > 0 ? roleCategories[0] : RoleCategory.LEGAL_OPERATIONS;
|
|
11743
|
+
const roleName = getAMRoleName('specific', roleCategory);
|
|
11716
11744
|
const id = userInfo.id ? userInfo.id : userInfo.uid;
|
|
11717
11745
|
const payload = camUtils.getAMPayload(null, id, roleName, roleCategory, 'SPECIFIC', caseId, sar, null, null, true);
|
|
11718
11746
|
payload.roleRequest = {
|
|
@@ -23352,7 +23380,7 @@ class QueryManagementUtils {
|
|
|
23352
23380
|
messageType: QueryCreateContext.FOLLOWUP // Default to value new queries will be FOLLOWUP
|
|
23353
23381
|
};
|
|
23354
23382
|
// TODO HMCTS_QUERY_USER_TYPE: Enable when isHmctsStaff persistence is supported by the query data contract.
|
|
23355
|
-
this.setHmctsStaffStatus(message, isHmctsStaff);
|
|
23383
|
+
// this.setHmctsStaffStatus(message, isHmctsStaff);
|
|
23356
23384
|
return message;
|
|
23357
23385
|
}
|
|
23358
23386
|
static getRespondOrFollowupQueryData(formGroup, queryItem, currentUserDetails, messageTypeParam, isHmctsStaff) {
|
|
@@ -23382,7 +23410,7 @@ class QueryManagementUtils {
|
|
|
23382
23410
|
messageType
|
|
23383
23411
|
};
|
|
23384
23412
|
// TODO HMCTS_QUERY_USER_TYPE: Enable when isHmctsStaff persistence is supported by the query data contract.
|
|
23385
|
-
this.setHmctsStaffStatus(message, isHmctsStaff);
|
|
23413
|
+
// this.setHmctsStaffStatus(message, isHmctsStaff);
|
|
23386
23414
|
return message;
|
|
23387
23415
|
}
|
|
23388
23416
|
static isObject(elem) {
|
|
@@ -23398,12 +23426,6 @@ class QueryManagementUtils {
|
|
|
23398
23426
|
static normalizeHmctsStaffStatus(isHmctsStaff) {
|
|
23399
23427
|
return typeof isHmctsStaff === 'string' && isHmctsStaff.trim().toLowerCase() === 'yes' ? 'Yes' : 'No';
|
|
23400
23428
|
}
|
|
23401
|
-
// TODO HMCTS_QUERY_USER_TYPE: Enable when isHmctsStaff persistence is supported by the query data contract.
|
|
23402
|
-
static setHmctsStaffStatus(message, isHmctsStaff) {
|
|
23403
|
-
if (typeof isHmctsStaff === 'string' && isHmctsStaff) {
|
|
23404
|
-
message.isHmctsStaff = this.normalizeHmctsStaffStatus(isHmctsStaff);
|
|
23405
|
-
}
|
|
23406
|
-
}
|
|
23407
23429
|
static ɵfac = function QueryManagementUtils_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || QueryManagementUtils)(); };
|
|
23408
23430
|
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: QueryManagementUtils, factory: QueryManagementUtils.ɵfac });
|
|
23409
23431
|
}
|
|
@@ -40492,16 +40514,8 @@ class CaseResolver {
|
|
|
40492
40514
|
}
|
|
40493
40515
|
// as discussed for EUI-5456, need functionality to go to default page
|
|
40494
40516
|
goToDefaultPage() {
|
|
40495
|
-
|
|
40496
|
-
|
|
40497
|
-
&& !userDetails.roles.includes(PUI_CASE_MANAGER)
|
|
40498
|
-
&&
|
|
40499
|
-
(userDetails.roles.includes('caseworker-ia-iacjudge')
|
|
40500
|
-
|| userDetails.roles.includes('caseworker-ia-caseofficer')
|
|
40501
|
-
|| userDetails.roles.includes('caseworker-ia-admofficer')
|
|
40502
|
-
|| userDetails.roles.includes('caseworker-civil')
|
|
40503
|
-
|| userDetails.roles.includes('caseworker-privatelaw'))
|
|
40504
|
-
? this.router.navigate([CaseResolver.defaultWAPage]) : this.router.navigate([CaseResolver.defaultPage]);
|
|
40517
|
+
isWorkAllocationUser(this.sessionStorage) ?
|
|
40518
|
+
this.router.navigate([CaseResolver.defaultWAPage]) : this.router.navigate([CaseResolver.defaultPage]);
|
|
40505
40519
|
}
|
|
40506
40520
|
static ɵfac = function CaseResolver_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaseResolver)(i0.ɵɵinject(CaseNotifier), i0.ɵɵinject(DraftService), i0.ɵɵinject(NavigationNotifierService), i0.ɵɵinject(i1$2.Router), i0.ɵɵinject(SessionStorageService)); };
|
|
40507
40521
|
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: CaseResolver, factory: CaseResolver.ɵfac });
|
|
@@ -46647,5 +46661,5 @@ class TestRouteSnapshotBuilder {
|
|
|
46647
46661
|
* Generated bundle index. Do not edit.
|
|
46648
46662
|
*/
|
|
46649
46663
|
|
|
46650
|
-
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, 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, ProfileResolver, 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, ReadRichTextAreaFieldComponent, ReadStaffUserFieldComponent, 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, WriteRichTextAreaFieldComponent, WriteStaffUserFieldComponent, WriteTextAreaFieldComponent, WriteTextFieldComponent, WriteYesNoFieldComponent, YesNoService, aCaseField, caseMessagesMockData, createACL, createCaseEventTrigger, createCaseField, createComplexFieldOverride, createFieldType, createFixedListFieldType, createHiddenComplexFieldOverride, createMultiSelectListFieldType, createWizardPage, createWizardPageField, editorRouting, initDialog, newCaseField, parseStaffUserSearchConfiguration, safeJsonParse, textFieldType, viewerRouting };
|
|
46664
|
+
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, 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, 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, ProfileResolver, 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, ReadRichTextAreaFieldComponent, ReadStaffUserFieldComponent, 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, WriteRichTextAreaFieldComponent, WriteStaffUserFieldComponent, WriteTextAreaFieldComponent, WriteTextFieldComponent, WriteYesNoFieldComponent, YesNoService, aCaseField, caseMessagesMockData, createACL, createCaseEventTrigger, createCaseField, createComplexFieldOverride, createFieldType, createFixedListFieldType, createHiddenComplexFieldOverride, createMultiSelectListFieldType, createWizardPage, createWizardPageField, editorRouting, initDialog, newCaseField, parseStaffUserSearchConfiguration, safeJsonParse, textFieldType, viewerRouting };
|
|
46651
46665
|
//# sourceMappingURL=hmcts-ccd-case-ui-toolkit.mjs.map
|