@hmcts/ccd-case-ui-toolkit 7.3.89-exui-5101-rc-2 → 7.3.89-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 +1625 -2106
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/index.d.ts +29 -61
- package/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -12,11 +12,11 @@ import { BehaviorSubject, throwError, Subject, EMPTY, concat, defer, timer, Obse
|
|
|
12
12
|
import { distinctUntilChanged, catchError, map, switchMap, repeat, retry, publish, refCount, debounceTime, delay, finalize, timeout, mergeMap, retryWhen, tap, delayWhen, publishReplay, take, first, takeUntil, filter } from 'rxjs/operators';
|
|
13
13
|
import * as i1$2 from '@angular/common/http';
|
|
14
14
|
import { HttpErrorResponse, HttpHeaders, HttpParams, HttpStatusCode } from '@angular/common/http';
|
|
15
|
-
import { Type, Exclude, Expose, plainToClassFromExist, plainToClass } from 'class-transformer';
|
|
16
|
-
import moment from 'moment';
|
|
17
15
|
import { __decorate, __metadata } from 'tslib';
|
|
16
|
+
import { Type, Exclude, Expose, plainToClassFromExist, plainToClass } from 'class-transformer';
|
|
18
17
|
import * as _ from 'underscore';
|
|
19
18
|
import 'reflect-metadata';
|
|
19
|
+
import moment from 'moment';
|
|
20
20
|
import { StateMachine } from '@edium/fsm';
|
|
21
21
|
import * as i1$3 from '@angular/material/legacy-dialog';
|
|
22
22
|
import { MAT_LEGACY_DIALOG_DATA, MatLegacyDialogModule } from '@angular/material/legacy-dialog';
|
|
@@ -1860,380 +1860,1205 @@ class SessionStorageGuard {
|
|
|
1860
1860
|
args: [SessionJsonErrorLogger]
|
|
1861
1861
|
}] }], null); })();
|
|
1862
1862
|
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1863
|
+
// tslint:disable:variable-name
|
|
1864
|
+
class AddressModel {
|
|
1865
|
+
AddressLine1 = '';
|
|
1866
|
+
AddressLine2 = '';
|
|
1867
|
+
AddressLine3 = '';
|
|
1868
|
+
PostTown = '';
|
|
1869
|
+
County = '';
|
|
1870
|
+
PostCode = '';
|
|
1871
|
+
Country = '';
|
|
1869
1872
|
}
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|| userDetails.roles.some((role) => role.toLowerCase().includes(JUDGE)));
|
|
1873
|
+
|
|
1874
|
+
class Alert {
|
|
1875
|
+
level;
|
|
1876
|
+
message;
|
|
1875
1877
|
}
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1878
|
+
|
|
1879
|
+
// tslint:disable:variable-name
|
|
1880
|
+
class CaseDetails {
|
|
1881
|
+
id;
|
|
1882
|
+
jurisdiction;
|
|
1883
|
+
case_type_id;
|
|
1884
|
+
state;
|
|
1885
|
+
created_date;
|
|
1886
|
+
last_modified;
|
|
1887
|
+
locked_by_user_id;
|
|
1888
|
+
security_level;
|
|
1889
|
+
case_data;
|
|
1890
|
+
}
|
|
1891
|
+
|
|
1892
|
+
// tslint:disable:variable-name
|
|
1893
|
+
class CaseEventData {
|
|
1894
|
+
event;
|
|
1895
|
+
data;
|
|
1896
|
+
event_data; // full event data
|
|
1897
|
+
event_token;
|
|
1898
|
+
ignore_warning;
|
|
1899
|
+
draft_id;
|
|
1900
|
+
case_reference;
|
|
1901
|
+
}
|
|
1902
|
+
|
|
1903
|
+
class WizardPageField {
|
|
1904
|
+
case_field_id;
|
|
1905
|
+
order;
|
|
1906
|
+
page_column_no;
|
|
1907
|
+
complex_field_overrides;
|
|
1908
|
+
}
|
|
1909
|
+
|
|
1910
|
+
class FixedListItem {
|
|
1911
|
+
code;
|
|
1912
|
+
label;
|
|
1913
|
+
order;
|
|
1880
1914
|
}
|
|
1881
1915
|
|
|
1882
1916
|
// @dynamic
|
|
1883
|
-
class
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
this.appConfig = appConfig;
|
|
1893
|
-
this.sessionStorageService = sessionStorageService;
|
|
1894
|
-
}
|
|
1895
|
-
get isEnabled() {
|
|
1896
|
-
return this.activityUrl() && this.userAuthorised;
|
|
1897
|
-
}
|
|
1898
|
-
static DUMMY_CASE_REFERENCE = '0';
|
|
1899
|
-
userAuthorised = undefined;
|
|
1900
|
-
static handleHttpError(response) {
|
|
1901
|
-
const error = HttpErrorService.convertToHttpError(response);
|
|
1902
|
-
if (response?.status !== error.status) {
|
|
1903
|
-
error.status = response.status;
|
|
1904
|
-
}
|
|
1905
|
-
return error;
|
|
1906
|
-
}
|
|
1907
|
-
getOptions() {
|
|
1908
|
-
const userDetails = safeJsonParse(this.sessionStorageService.getItem(USER_DETAILS));
|
|
1909
|
-
let headers = new HttpHeaders().set('Content-Type', 'application/json');
|
|
1910
|
-
if (userDetails?.token) {
|
|
1911
|
-
headers = headers.set('Authorization', userDetails.token);
|
|
1912
|
-
}
|
|
1913
|
-
return {
|
|
1914
|
-
headers,
|
|
1915
|
-
withCredentials: true,
|
|
1916
|
-
observe: 'body',
|
|
1917
|
-
};
|
|
1918
|
-
}
|
|
1919
|
-
getActivities(...caseId) {
|
|
1920
|
-
try {
|
|
1921
|
-
const options = this.getOptions();
|
|
1922
|
-
const url = `${this.activityUrl()}/cases/${caseId.join(',')}/activity`;
|
|
1923
|
-
return this.http
|
|
1924
|
-
.get(url, options, false, ActivityService.handleHttpError)
|
|
1925
|
-
.pipe(map(response => response));
|
|
1926
|
-
}
|
|
1927
|
-
catch (error) {
|
|
1928
|
-
this.logUserMayNotBeAuthenticated(error);
|
|
1929
|
-
}
|
|
1930
|
-
}
|
|
1931
|
-
postActivity(caseId, activity) {
|
|
1932
|
-
try {
|
|
1933
|
-
const options = this.getOptions();
|
|
1934
|
-
const url = `${this.activityUrl()}/cases/${caseId}/activity`;
|
|
1935
|
-
const body = { activity };
|
|
1936
|
-
return this.http
|
|
1937
|
-
.post(url, body, options, false)
|
|
1938
|
-
.pipe(map(response => response));
|
|
1939
|
-
}
|
|
1940
|
-
catch (error) {
|
|
1941
|
-
this.logUserMayNotBeAuthenticated(error);
|
|
1942
|
-
}
|
|
1943
|
-
}
|
|
1944
|
-
verifyUserIsAuthorized() {
|
|
1945
|
-
if (this.sessionStorageService.getItem(USER_DETAILS) && this.activityUrl() && this.userAuthorised === undefined) {
|
|
1946
|
-
this.getActivities(ActivityService.DUMMY_CASE_REFERENCE).subscribe(() => this.userAuthorised = true, error => {
|
|
1947
|
-
this.userAuthorised = [401, 403].indexOf(error.status) <= -1;
|
|
1948
|
-
});
|
|
1949
|
-
}
|
|
1950
|
-
}
|
|
1951
|
-
activityUrl() {
|
|
1952
|
-
return this.appConfig.getActivityUrl();
|
|
1953
|
-
}
|
|
1954
|
-
logUserMayNotBeAuthenticated(error) {
|
|
1955
|
-
this.logger.error('User may not be authenticated. Activity request was not sent.', { error });
|
|
1956
|
-
}
|
|
1957
|
-
static ɵfac = function ActivityService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ActivityService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig), i0.ɵɵinject(SessionStorageService)); };
|
|
1958
|
-
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ActivityService, factory: ActivityService.ɵfac });
|
|
1917
|
+
class FieldType {
|
|
1918
|
+
id;
|
|
1919
|
+
type;
|
|
1920
|
+
min;
|
|
1921
|
+
max;
|
|
1922
|
+
regular_expression;
|
|
1923
|
+
fixed_list_items;
|
|
1924
|
+
complex_fields;
|
|
1925
|
+
collection_field_type;
|
|
1959
1926
|
}
|
|
1960
|
-
(
|
|
1961
|
-
|
|
1962
|
-
|
|
1927
|
+
__decorate([
|
|
1928
|
+
Type(() => FixedListItem),
|
|
1929
|
+
__metadata("design:type", Array)
|
|
1930
|
+
], FieldType.prototype, "fixed_list_items", void 0);
|
|
1931
|
+
__decorate([
|
|
1932
|
+
Type(() => CaseField),
|
|
1933
|
+
__metadata("design:type", Array)
|
|
1934
|
+
], FieldType.prototype, "complex_fields", void 0);
|
|
1935
|
+
__decorate([
|
|
1936
|
+
Type(() => FieldType),
|
|
1937
|
+
__metadata("design:type", FieldType)
|
|
1938
|
+
], FieldType.prototype, "collection_field_type", void 0);
|
|
1963
1939
|
|
|
1964
1940
|
// @dynamic
|
|
1965
|
-
class
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1941
|
+
class CaseField {
|
|
1942
|
+
static logger = new StructuredLoggerService();
|
|
1943
|
+
id;
|
|
1944
|
+
hidden;
|
|
1945
|
+
hiddenCannotChange;
|
|
1946
|
+
label;
|
|
1947
|
+
originalLabel;
|
|
1948
|
+
noCacheLabel;
|
|
1949
|
+
order;
|
|
1950
|
+
parent;
|
|
1951
|
+
field_type;
|
|
1952
|
+
hint_text;
|
|
1953
|
+
security_label;
|
|
1954
|
+
display_context;
|
|
1955
|
+
display_context_parameter;
|
|
1956
|
+
month_format;
|
|
1957
|
+
show_condition;
|
|
1958
|
+
show_summary_change_option;
|
|
1959
|
+
show_summary_content_option;
|
|
1960
|
+
acls;
|
|
1961
|
+
metadata;
|
|
1962
|
+
formatted_value;
|
|
1963
|
+
retain_hidden_value;
|
|
1964
|
+
wizardProps;
|
|
1965
|
+
_value;
|
|
1966
|
+
_list_items = [];
|
|
1967
|
+
isTranslatedFlag = false;
|
|
1968
|
+
get value() {
|
|
1969
|
+
if (this.field_type && (this.field_type.type === 'DynamicList' || this.field_type.type === 'DynamicRadioList')) {
|
|
1970
|
+
return this._value && this._value.value ? this._value.value.code : this._value;
|
|
1993
1971
|
}
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
subject.subscribe(done);
|
|
1972
|
+
else if (this.field_type && this.field_type.type === 'DynamicMultiSelectList') {
|
|
1973
|
+
return this._value && this._value.value ? this._value.value : this._value;
|
|
1997
1974
|
}
|
|
1998
1975
|
else {
|
|
1999
|
-
|
|
2000
|
-
const wasEmpty = this.pendingRequests.size === 0;
|
|
2001
|
-
subject = new Subject();
|
|
2002
|
-
subject.subscribe(done);
|
|
2003
|
-
this.addPendingRequest(caseId, subject);
|
|
2004
|
-
if (wasEmpty) {
|
|
2005
|
-
this.ngZone.runOutsideAngular(() => {
|
|
2006
|
-
this.currentTimeoutHandle = setTimeout(() => this.ngZone.run(() => {
|
|
2007
|
-
this.flushRequests();
|
|
2008
|
-
}), this.batchCollectionDelayMs);
|
|
2009
|
-
});
|
|
2010
|
-
}
|
|
2011
|
-
}
|
|
2012
|
-
if (this.pendingRequests.size >= this.maxRequestsPerBatch) {
|
|
2013
|
-
this.flushRequests();
|
|
1976
|
+
return this._value;
|
|
2014
1977
|
}
|
|
2015
|
-
return subject;
|
|
2016
1978
|
}
|
|
2017
|
-
|
|
2018
|
-
if (this.
|
|
2019
|
-
|
|
1979
|
+
set value(value) {
|
|
1980
|
+
if (this.isDynamic()) {
|
|
1981
|
+
if (value && value instanceof Object && value.list_items) {
|
|
1982
|
+
this._list_items = value.list_items;
|
|
1983
|
+
}
|
|
1984
|
+
else if (!this._list_items || this._list_items.length === 0) {
|
|
1985
|
+
// Extract the list items from the current value if that's the only place they exist.
|
|
1986
|
+
this._list_items = this.list_items;
|
|
1987
|
+
if (!value || !value.value) {
|
|
1988
|
+
value = null;
|
|
1989
|
+
}
|
|
1990
|
+
}
|
|
2020
1991
|
}
|
|
1992
|
+
this._value = value;
|
|
2021
1993
|
}
|
|
2022
|
-
|
|
2023
|
-
if (this.
|
|
2024
|
-
|
|
2025
|
-
this.currentTimeoutHandle = undefined;
|
|
1994
|
+
get list_items() {
|
|
1995
|
+
if (this.isDynamic()) {
|
|
1996
|
+
return this._value && this._value.list_items ? this._value.list_items : this._list_items;
|
|
2026
1997
|
}
|
|
2027
|
-
|
|
2028
|
-
return;
|
|
1998
|
+
else {
|
|
1999
|
+
return this.field_type.fixed_list_items;
|
|
2029
2000
|
}
|
|
2030
|
-
const requests = new Map(this.pendingRequests);
|
|
2031
|
-
this.pendingRequests.clear();
|
|
2032
|
-
this.performBatchRequest(requests);
|
|
2033
2001
|
}
|
|
2034
|
-
|
|
2035
|
-
if (!this.
|
|
2036
|
-
|
|
2002
|
+
set list_items(items) {
|
|
2003
|
+
if ((items && !this._list_items) || (items?.length > this._list_items?.length)) {
|
|
2004
|
+
this._list_items = items;
|
|
2037
2005
|
}
|
|
2038
|
-
return this.polling(this.activityService.getActivities(...caseIds), this.pollConfig);
|
|
2039
|
-
}
|
|
2040
|
-
postViewActivity(caseId) {
|
|
2041
|
-
return this.postActivity(caseId, ActivityService.ACTIVITY_VIEW);
|
|
2042
|
-
}
|
|
2043
|
-
postEditActivity(caseId) {
|
|
2044
|
-
return this.postActivity(caseId, ActivityService.ACTIVITY_EDIT);
|
|
2045
|
-
}
|
|
2046
|
-
performBatchRequest(requests) {
|
|
2047
|
-
const caseIds = Array.from(requests.keys()).join();
|
|
2048
|
-
this.ngZone.runOutsideAngular(() => {
|
|
2049
|
-
// run polling outside angular zone so it does not trigger change detection
|
|
2050
|
-
this.pollActivitiesSubscription = this.pollActivities(caseIds).subscribe({
|
|
2051
|
-
// process activity inside zone so it triggers change detection for activity.component.ts
|
|
2052
|
-
next: (activities) => this.ngZone.run(() => {
|
|
2053
|
-
activities.forEach((activity) => {
|
|
2054
|
-
// Ignore activities returned for cases outside this local batch.
|
|
2055
|
-
requests.get(activity.caseId)?.next(activity);
|
|
2056
|
-
});
|
|
2057
|
-
}),
|
|
2058
|
-
error: (err) => this.ngZone.run(() => {
|
|
2059
|
-
this.logger.error('Error while polling activities.', { error: err });
|
|
2060
|
-
Array.from(requests.values()).forEach((subject) => subject.error(err));
|
|
2061
|
-
})
|
|
2062
|
-
});
|
|
2063
|
-
});
|
|
2064
2006
|
}
|
|
2065
|
-
|
|
2066
|
-
if (
|
|
2067
|
-
return
|
|
2007
|
+
get dateTimeEntryFormat() {
|
|
2008
|
+
if (this.isComplexDisplay()) {
|
|
2009
|
+
return null;
|
|
2068
2010
|
}
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
return this.polling(this.activityService.postActivity(caseId, activityType), pollingConfig);
|
|
2074
|
-
}
|
|
2075
|
-
addPendingRequest(caseId, subject) {
|
|
2076
|
-
this.pendingRequests.set(caseId, subject);
|
|
2077
|
-
// Components complete their returned Subject on destroy; remove it so a later same-case subscription gets a fresh Subject.
|
|
2078
|
-
subject.subscribe({
|
|
2079
|
-
complete: () => this.removePendingRequest(caseId, subject),
|
|
2080
|
-
error: () => this.removePendingRequest(caseId, subject)
|
|
2081
|
-
});
|
|
2011
|
+
if (this.display_context_parameter) {
|
|
2012
|
+
return this.extractBracketValue(this.display_context_parameter, '#DATETIMEENTRY');
|
|
2013
|
+
}
|
|
2014
|
+
return null;
|
|
2082
2015
|
}
|
|
2083
|
-
|
|
2084
|
-
if (this.
|
|
2085
|
-
return;
|
|
2016
|
+
get dateTimeDisplayFormat() {
|
|
2017
|
+
if (this.isComplexEntry()) {
|
|
2018
|
+
return null;
|
|
2086
2019
|
}
|
|
2087
|
-
this.
|
|
2088
|
-
|
|
2089
|
-
clearTimeout(this.currentTimeoutHandle);
|
|
2090
|
-
this.currentTimeoutHandle = undefined;
|
|
2020
|
+
if (this.display_context_parameter) {
|
|
2021
|
+
return this.extractBracketValue(this.display_context_parameter, '#DATETIMEDISPLAY');
|
|
2091
2022
|
}
|
|
2023
|
+
return null;
|
|
2092
2024
|
}
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
interval: options.interval,
|
|
2096
|
-
attempts: options.attempts ?? 9,
|
|
2097
|
-
exponentialUnit: options.exponentialUnit ?? 1000
|
|
2098
|
-
};
|
|
2099
|
-
return concat(request$, defer(() => timer(pollingOptions.interval).pipe(switchMap(() => request$))).pipe(repeat())).pipe(
|
|
2100
|
-
// Preserve consecutive-failure retry behaviour using the current RxJS retry config.
|
|
2101
|
-
retry({
|
|
2102
|
-
count: pollingOptions.attempts,
|
|
2103
|
-
delay: (_error, retryCount) => timer(this.getExponentialRetryDelay(retryCount, pollingOptions.exponentialUnit)),
|
|
2104
|
-
resetOnSuccess: true
|
|
2105
|
-
}));
|
|
2025
|
+
isComplexDisplay() {
|
|
2026
|
+
return (this.isComplex() || this.isCollection()) && this.isReadonly();
|
|
2106
2027
|
}
|
|
2107
|
-
|
|
2108
|
-
return
|
|
2028
|
+
isComplexEntry() {
|
|
2029
|
+
return (this.isComplex() || this.isCollection()) && (this.isOptional() || this.isMandatory());
|
|
2109
2030
|
}
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ActivityPollingService, [{
|
|
2114
|
-
type: Injectable
|
|
2115
|
-
}], () => [{ type: ActivityService }, { type: i0.NgZone }, { type: AbstractAppConfig }], null); })();
|
|
2116
|
-
|
|
2117
|
-
function ActivityComponent_div_0_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
2118
|
-
i0.ɵɵelementStart(0, "div");
|
|
2119
|
-
i0.ɵɵelement(1, "ccd-activity-icon", 5);
|
|
2120
|
-
i0.ɵɵpipe(2, "rpxTranslate");
|
|
2121
|
-
i0.ɵɵelementEnd();
|
|
2122
|
-
} if (rf & 2) {
|
|
2123
|
-
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
2124
|
-
i0.ɵɵclassProp("activityEditorsAndViewersIcons", ctx_r0.viewersPresent())("activityEditorsIcon", !ctx_r0.viewersPresent());
|
|
2125
|
-
i0.ɵɵadvance();
|
|
2126
|
-
i0.ɵɵproperty("description", i0.ɵɵpipeBind1(2, 5, ctx_r0.editorsText));
|
|
2127
|
-
} }
|
|
2128
|
-
function ActivityComponent_div_0_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
2129
|
-
i0.ɵɵelementStart(0, "div", 6);
|
|
2130
|
-
i0.ɵɵelement(1, "ccd-activity-icon", 7);
|
|
2131
|
-
i0.ɵɵpipe(2, "rpxTranslate");
|
|
2132
|
-
i0.ɵɵelementEnd();
|
|
2133
|
-
} if (rf & 2) {
|
|
2134
|
-
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
2135
|
-
i0.ɵɵadvance();
|
|
2136
|
-
i0.ɵɵproperty("description", i0.ɵɵpipeBind1(2, 1, ctx_r0.viewersText));
|
|
2137
|
-
} }
|
|
2138
|
-
function ActivityComponent_div_0_div_3_Template(rf, ctx) { if (rf & 1) {
|
|
2139
|
-
i0.ɵɵelementStart(0, "div");
|
|
2140
|
-
i0.ɵɵelement(1, "ccd-activity-banner", 8);
|
|
2141
|
-
i0.ɵɵpipe(2, "rpxTranslate");
|
|
2142
|
-
i0.ɵɵelementEnd();
|
|
2143
|
-
} if (rf & 2) {
|
|
2144
|
-
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
2145
|
-
i0.ɵɵadvance();
|
|
2146
|
-
i0.ɵɵproperty("description", i0.ɵɵpipeBind1(2, 1, ctx_r0.editorsText));
|
|
2147
|
-
} }
|
|
2148
|
-
function ActivityComponent_div_0_div_4_Template(rf, ctx) { if (rf & 1) {
|
|
2149
|
-
i0.ɵɵelementStart(0, "div");
|
|
2150
|
-
i0.ɵɵelement(1, "ccd-activity-banner", 9);
|
|
2151
|
-
i0.ɵɵpipe(2, "rpxTranslate");
|
|
2152
|
-
i0.ɵɵelementEnd();
|
|
2153
|
-
} if (rf & 2) {
|
|
2154
|
-
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
2155
|
-
i0.ɵɵadvance();
|
|
2156
|
-
i0.ɵɵproperty("description", i0.ɵɵpipeBind1(2, 1, ctx_r0.viewersText));
|
|
2157
|
-
} }
|
|
2158
|
-
function ActivityComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
2159
|
-
i0.ɵɵelementStart(0, "div", 1);
|
|
2160
|
-
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);
|
|
2161
|
-
i0.ɵɵelementEnd();
|
|
2162
|
-
} if (rf & 2) {
|
|
2163
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
2164
|
-
i0.ɵɵadvance();
|
|
2165
|
-
i0.ɵɵproperty("ngIf", ctx_r0.displayMode === ctx_r0.dspMode.ICON && ctx_r0.editorsPresent());
|
|
2166
|
-
i0.ɵɵadvance();
|
|
2167
|
-
i0.ɵɵproperty("ngIf", ctx_r0.displayMode === ctx_r0.dspMode.ICON && ctx_r0.viewersPresent());
|
|
2168
|
-
i0.ɵɵadvance();
|
|
2169
|
-
i0.ɵɵproperty("ngIf", ctx_r0.displayMode === ctx_r0.dspMode.BANNER && ctx_r0.editorsPresent());
|
|
2170
|
-
i0.ɵɵadvance();
|
|
2171
|
-
i0.ɵɵproperty("ngIf", ctx_r0.displayMode === ctx_r0.dspMode.BANNER && ctx_r0.viewersPresent());
|
|
2172
|
-
} }
|
|
2173
|
-
class ActivityComponent {
|
|
2174
|
-
activityPollingService;
|
|
2175
|
-
activity;
|
|
2176
|
-
dspMode = DisplayMode;
|
|
2177
|
-
viewersText;
|
|
2178
|
-
editorsText;
|
|
2179
|
-
subscription;
|
|
2180
|
-
caseId;
|
|
2181
|
-
displayMode;
|
|
2182
|
-
VIEWERS_PREFIX = '';
|
|
2183
|
-
VIEWERS_SUFFIX = 'viewing this case';
|
|
2184
|
-
EDITORS_PREFIX = 'This case is being updated by ';
|
|
2185
|
-
EDITORS_SUFFIX = '';
|
|
2186
|
-
constructor(activityPollingService) {
|
|
2187
|
-
this.activityPollingService = activityPollingService;
|
|
2031
|
+
isReadonly() {
|
|
2032
|
+
return !_.isEmpty(this.display_context)
|
|
2033
|
+
&& this.display_context.toUpperCase() === 'READONLY';
|
|
2188
2034
|
}
|
|
2189
|
-
|
|
2190
|
-
this.
|
|
2191
|
-
|
|
2192
|
-
this.activity.editors = [];
|
|
2193
|
-
this.activity.unknownEditors = 0;
|
|
2194
|
-
this.activity.viewers = [];
|
|
2195
|
-
this.activity.unknownViewers = 0;
|
|
2196
|
-
this.viewersText = '';
|
|
2197
|
-
this.editorsText = '';
|
|
2198
|
-
this.subscription = this.activityPollingService.subscribeToActivity(this.caseId, newActivity => this.onActivityChange(newActivity));
|
|
2035
|
+
isOptional() {
|
|
2036
|
+
return !_.isEmpty(this.display_context)
|
|
2037
|
+
&& this.display_context.toUpperCase() === 'OPTIONAL';
|
|
2199
2038
|
}
|
|
2200
|
-
|
|
2201
|
-
this.
|
|
2202
|
-
|
|
2203
|
-
this.editorsText = this.generateDescription(this.EDITORS_PREFIX, this.EDITORS_SUFFIX, this.activity.editors, this.activity.unknownEditors);
|
|
2039
|
+
isMandatory() {
|
|
2040
|
+
return !_.isEmpty(this.display_context)
|
|
2041
|
+
&& this.display_context.toUpperCase() === 'MANDATORY';
|
|
2204
2042
|
}
|
|
2205
|
-
|
|
2206
|
-
return this.
|
|
2043
|
+
isCollection() {
|
|
2044
|
+
return this.field_type && this.field_type.type === 'Collection';
|
|
2207
2045
|
}
|
|
2208
|
-
|
|
2209
|
-
return this.
|
|
2046
|
+
isComplex() {
|
|
2047
|
+
return this.field_type && this.field_type.type === 'Complex';
|
|
2210
2048
|
}
|
|
2211
|
-
|
|
2212
|
-
|
|
2049
|
+
isDynamic() {
|
|
2050
|
+
const dynamicFieldTypes = ['DynamicList', 'DynamicRadioList', 'DynamicMultiSelectList'];
|
|
2051
|
+
if (!this.field_type) {
|
|
2052
|
+
return false;
|
|
2053
|
+
}
|
|
2054
|
+
return dynamicFieldTypes.some(t => t === this.field_type.type);
|
|
2213
2055
|
}
|
|
2214
|
-
|
|
2215
|
-
return
|
|
2056
|
+
isCaseLink() {
|
|
2057
|
+
return this.isComplex()
|
|
2058
|
+
&& this.field_type.id === 'CaseLink'
|
|
2059
|
+
&& this.field_type.complex_fields.some(cf => cf.id === 'CaseReference');
|
|
2216
2060
|
}
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2061
|
+
extractBracketValue(fmt, paramName, leftBracket = '(', rightBracket = ')') {
|
|
2062
|
+
fmt = fmt.split(',')
|
|
2063
|
+
.find(a => a.trim().startsWith(paramName));
|
|
2064
|
+
if (fmt) {
|
|
2065
|
+
const s = fmt.indexOf(leftBracket) + 1;
|
|
2066
|
+
const e = fmt.indexOf(rightBracket, s);
|
|
2067
|
+
if (e > s && s >= 0) {
|
|
2068
|
+
return fmt.substr(s, (e - s));
|
|
2069
|
+
}
|
|
2220
2070
|
}
|
|
2221
|
-
|
|
2071
|
+
return null;
|
|
2222
2072
|
}
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
if (
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2073
|
+
// Ascend the hierarchy to get the full path of the field
|
|
2074
|
+
getHierachicalId(curr) {
|
|
2075
|
+
const prefix = curr ? curr + "_" : "";
|
|
2076
|
+
if (prefix.length < 1024) {
|
|
2077
|
+
if (this.parent) {
|
|
2078
|
+
return this.parent.getHierachicalId(prefix + this.id);
|
|
2079
|
+
}
|
|
2080
|
+
else {
|
|
2081
|
+
return prefix + this.id;
|
|
2082
|
+
}
|
|
2083
|
+
}
|
|
2084
|
+
else {
|
|
2085
|
+
CaseField.logger.error('Path too long, possible circular reference in case field hierarchy.');
|
|
2086
|
+
return this.id;
|
|
2087
|
+
}
|
|
2088
|
+
}
|
|
2089
|
+
set isTranslated(val) {
|
|
2090
|
+
this.isTranslatedFlag = val;
|
|
2091
|
+
}
|
|
2092
|
+
get isTranslated() {
|
|
2093
|
+
return this.isTranslatedFlag;
|
|
2094
|
+
}
|
|
2095
|
+
}
|
|
2096
|
+
__decorate([
|
|
2097
|
+
Exclude(),
|
|
2098
|
+
__metadata("design:type", CaseField)
|
|
2099
|
+
], CaseField.prototype, "parent", void 0);
|
|
2100
|
+
__decorate([
|
|
2101
|
+
Type(() => FieldType),
|
|
2102
|
+
__metadata("design:type", FieldType)
|
|
2103
|
+
], CaseField.prototype, "field_type", void 0);
|
|
2104
|
+
__decorate([
|
|
2105
|
+
Type(() => WizardPageField),
|
|
2106
|
+
__metadata("design:type", WizardPageField)
|
|
2107
|
+
], CaseField.prototype, "wizardProps", void 0);
|
|
2108
|
+
__decorate([
|
|
2109
|
+
Expose(),
|
|
2110
|
+
__metadata("design:type", Object),
|
|
2111
|
+
__metadata("design:paramtypes", [Object])
|
|
2112
|
+
], CaseField.prototype, "value", null);
|
|
2113
|
+
__decorate([
|
|
2114
|
+
Expose(),
|
|
2115
|
+
__metadata("design:type", Object),
|
|
2116
|
+
__metadata("design:paramtypes", [Object])
|
|
2117
|
+
], CaseField.prototype, "list_items", null);
|
|
2118
|
+
__decorate([
|
|
2119
|
+
Expose(),
|
|
2120
|
+
__metadata("design:type", String),
|
|
2121
|
+
__metadata("design:paramtypes", [])
|
|
2122
|
+
], CaseField.prototype, "dateTimeEntryFormat", null);
|
|
2123
|
+
__decorate([
|
|
2124
|
+
Expose(),
|
|
2125
|
+
__metadata("design:type", String),
|
|
2126
|
+
__metadata("design:paramtypes", [])
|
|
2127
|
+
], CaseField.prototype, "dateTimeDisplayFormat", null);
|
|
2128
|
+
__decorate([
|
|
2129
|
+
Expose(),
|
|
2130
|
+
__metadata("design:type", Function),
|
|
2131
|
+
__metadata("design:paramtypes", []),
|
|
2132
|
+
__metadata("design:returntype", void 0)
|
|
2133
|
+
], CaseField.prototype, "isComplexDisplay", null);
|
|
2134
|
+
__decorate([
|
|
2135
|
+
Expose(),
|
|
2136
|
+
__metadata("design:type", Function),
|
|
2137
|
+
__metadata("design:paramtypes", []),
|
|
2138
|
+
__metadata("design:returntype", void 0)
|
|
2139
|
+
], CaseField.prototype, "isComplexEntry", null);
|
|
2140
|
+
__decorate([
|
|
2141
|
+
Expose(),
|
|
2142
|
+
__metadata("design:type", Function),
|
|
2143
|
+
__metadata("design:paramtypes", []),
|
|
2144
|
+
__metadata("design:returntype", void 0)
|
|
2145
|
+
], CaseField.prototype, "isReadonly", null);
|
|
2146
|
+
__decorate([
|
|
2147
|
+
Expose(),
|
|
2148
|
+
__metadata("design:type", Function),
|
|
2149
|
+
__metadata("design:paramtypes", []),
|
|
2150
|
+
__metadata("design:returntype", void 0)
|
|
2151
|
+
], CaseField.prototype, "isOptional", null);
|
|
2152
|
+
__decorate([
|
|
2153
|
+
Expose(),
|
|
2154
|
+
__metadata("design:type", Function),
|
|
2155
|
+
__metadata("design:paramtypes", []),
|
|
2156
|
+
__metadata("design:returntype", void 0)
|
|
2157
|
+
], CaseField.prototype, "isMandatory", null);
|
|
2158
|
+
__decorate([
|
|
2159
|
+
Expose(),
|
|
2160
|
+
__metadata("design:type", Function),
|
|
2161
|
+
__metadata("design:paramtypes", []),
|
|
2162
|
+
__metadata("design:returntype", Boolean)
|
|
2163
|
+
], CaseField.prototype, "isCollection", null);
|
|
2164
|
+
__decorate([
|
|
2165
|
+
Expose(),
|
|
2166
|
+
__metadata("design:type", Function),
|
|
2167
|
+
__metadata("design:paramtypes", []),
|
|
2168
|
+
__metadata("design:returntype", Boolean)
|
|
2169
|
+
], CaseField.prototype, "isComplex", null);
|
|
2170
|
+
__decorate([
|
|
2171
|
+
Expose(),
|
|
2172
|
+
__metadata("design:type", Function),
|
|
2173
|
+
__metadata("design:paramtypes", []),
|
|
2174
|
+
__metadata("design:returntype", Boolean)
|
|
2175
|
+
], CaseField.prototype, "isDynamic", null);
|
|
2176
|
+
__decorate([
|
|
2177
|
+
Expose(),
|
|
2178
|
+
__metadata("design:type", Function),
|
|
2179
|
+
__metadata("design:paramtypes", []),
|
|
2180
|
+
__metadata("design:returntype", Boolean)
|
|
2181
|
+
], CaseField.prototype, "isCaseLink", null);
|
|
2182
|
+
__decorate([
|
|
2183
|
+
Expose(),
|
|
2184
|
+
__metadata("design:type", Function),
|
|
2185
|
+
__metadata("design:paramtypes", [String]),
|
|
2186
|
+
__metadata("design:returntype", String)
|
|
2187
|
+
], CaseField.prototype, "getHierachicalId", null);
|
|
2188
|
+
|
|
2189
|
+
// @dynamic
|
|
2190
|
+
class WizardPage {
|
|
2191
|
+
id;
|
|
2192
|
+
label;
|
|
2193
|
+
order;
|
|
2194
|
+
wizard_page_fields;
|
|
2195
|
+
case_fields;
|
|
2196
|
+
show_condition;
|
|
2197
|
+
parsedShowCondition;
|
|
2198
|
+
getCol1Fields() {
|
|
2199
|
+
return this.case_fields?.filter(f => !f.wizardProps.page_column_no || f.wizardProps.page_column_no === 1);
|
|
2200
|
+
}
|
|
2201
|
+
getCol2Fields() {
|
|
2202
|
+
return this.case_fields?.filter(f => f.wizardProps.page_column_no === 2);
|
|
2203
|
+
}
|
|
2204
|
+
isMultiColumn() {
|
|
2205
|
+
return this.getCol2Fields()?.length > 0;
|
|
2206
|
+
}
|
|
2207
|
+
}
|
|
2208
|
+
__decorate([
|
|
2209
|
+
Type(() => WizardPageField),
|
|
2210
|
+
__metadata("design:type", Array)
|
|
2211
|
+
], WizardPage.prototype, "wizard_page_fields", void 0);
|
|
2212
|
+
__decorate([
|
|
2213
|
+
Type(() => CaseField),
|
|
2214
|
+
__metadata("design:type", Array)
|
|
2215
|
+
], WizardPage.prototype, "case_fields", void 0);
|
|
2216
|
+
|
|
2217
|
+
// @dynamic
|
|
2218
|
+
class CaseEventTrigger {
|
|
2219
|
+
id;
|
|
2220
|
+
name;
|
|
2221
|
+
description;
|
|
2222
|
+
case_id;
|
|
2223
|
+
case_fields;
|
|
2224
|
+
event_token;
|
|
2225
|
+
wizard_pages;
|
|
2226
|
+
show_summary;
|
|
2227
|
+
show_event_notes;
|
|
2228
|
+
end_button_label;
|
|
2229
|
+
can_save_draft;
|
|
2230
|
+
hasFields() {
|
|
2231
|
+
return this.case_fields && this.case_fields.length !== 0;
|
|
2232
|
+
}
|
|
2233
|
+
hasPages() {
|
|
2234
|
+
return this.wizard_pages && this.wizard_pages.length !== 0;
|
|
2235
|
+
}
|
|
2236
|
+
}
|
|
2237
|
+
__decorate([
|
|
2238
|
+
Type(() => CaseField),
|
|
2239
|
+
__metadata("design:type", Array)
|
|
2240
|
+
], CaseEventTrigger.prototype, "case_fields", void 0);
|
|
2241
|
+
__decorate([
|
|
2242
|
+
Type(() => WizardPage),
|
|
2243
|
+
__metadata("design:type", Array)
|
|
2244
|
+
], CaseEventTrigger.prototype, "wizard_pages", void 0);
|
|
2245
|
+
|
|
2246
|
+
// tslint:disable:variable-name
|
|
2247
|
+
class CaseViewEvent {
|
|
2248
|
+
id;
|
|
2249
|
+
timestamp;
|
|
2250
|
+
summary;
|
|
2251
|
+
comment;
|
|
2252
|
+
event_id;
|
|
2253
|
+
event_name;
|
|
2254
|
+
state_id;
|
|
2255
|
+
state_name;
|
|
2256
|
+
user_id;
|
|
2257
|
+
user_last_name;
|
|
2258
|
+
user_first_name;
|
|
2259
|
+
significant_item;
|
|
2260
|
+
}
|
|
2261
|
+
|
|
2262
|
+
class CaseViewTrigger {
|
|
2263
|
+
id;
|
|
2264
|
+
name;
|
|
2265
|
+
description;
|
|
2266
|
+
order;
|
|
2267
|
+
}
|
|
2268
|
+
|
|
2269
|
+
class CaseEvent {
|
|
2270
|
+
id;
|
|
2271
|
+
name;
|
|
2272
|
+
post_state;
|
|
2273
|
+
pre_states;
|
|
2274
|
+
case_fields;
|
|
2275
|
+
description;
|
|
2276
|
+
order;
|
|
2277
|
+
acls;
|
|
2278
|
+
}
|
|
2279
|
+
|
|
2280
|
+
class CaseState {
|
|
2281
|
+
id;
|
|
2282
|
+
name;
|
|
2283
|
+
description;
|
|
2284
|
+
order;
|
|
2285
|
+
}
|
|
2286
|
+
|
|
2287
|
+
// Light clone of CaseType to be used in Jurisdiction class
|
|
2288
|
+
// to avoid cyclic dependency
|
|
2289
|
+
class CaseTypeLite {
|
|
2290
|
+
id;
|
|
2291
|
+
name;
|
|
2292
|
+
events;
|
|
2293
|
+
states;
|
|
2294
|
+
description;
|
|
2295
|
+
}
|
|
2296
|
+
|
|
2297
|
+
// @dynamics
|
|
2298
|
+
class CaseType {
|
|
2299
|
+
id;
|
|
2300
|
+
name;
|
|
2301
|
+
events;
|
|
2302
|
+
states;
|
|
2303
|
+
case_fields;
|
|
2304
|
+
description;
|
|
2305
|
+
jurisdiction;
|
|
2306
|
+
printEnabled;
|
|
2307
|
+
}
|
|
2308
|
+
__decorate([
|
|
2309
|
+
Type(() => CaseField),
|
|
2310
|
+
__metadata("design:type", Array)
|
|
2311
|
+
], CaseType.prototype, "case_fields", void 0);
|
|
2312
|
+
|
|
2313
|
+
// tslint:disable:variable-name
|
|
2314
|
+
class EventCaseField {
|
|
2315
|
+
case_field_id;
|
|
2316
|
+
showCondition;
|
|
2317
|
+
}
|
|
2318
|
+
|
|
2319
|
+
class Jurisdiction {
|
|
2320
|
+
id;
|
|
2321
|
+
name;
|
|
2322
|
+
description;
|
|
2323
|
+
caseTypes;
|
|
2324
|
+
currentCaseType;
|
|
2325
|
+
}
|
|
2326
|
+
|
|
2327
|
+
class Banner {
|
|
2328
|
+
bannerDescription;
|
|
2329
|
+
bannerUrlText;
|
|
2330
|
+
bannerUrl;
|
|
2331
|
+
bannerViewed;
|
|
2332
|
+
bannerEnabled;
|
|
2333
|
+
}
|
|
2334
|
+
|
|
2335
|
+
// @dynamic
|
|
2336
|
+
class CaseTab {
|
|
2337
|
+
id;
|
|
2338
|
+
label;
|
|
2339
|
+
order;
|
|
2340
|
+
fields;
|
|
2341
|
+
show_condition;
|
|
2342
|
+
}
|
|
2343
|
+
__decorate([
|
|
2344
|
+
Type(() => CaseField),
|
|
2345
|
+
__metadata("design:type", Array)
|
|
2346
|
+
], CaseTab.prototype, "fields", void 0);
|
|
2347
|
+
|
|
2348
|
+
// @dynamic
|
|
2349
|
+
class CaseView {
|
|
2350
|
+
case_id;
|
|
2351
|
+
case_type;
|
|
2352
|
+
state;
|
|
2353
|
+
channels;
|
|
2354
|
+
tabs;
|
|
2355
|
+
triggers;
|
|
2356
|
+
events;
|
|
2357
|
+
metadataFields;
|
|
2358
|
+
basicFields;
|
|
2359
|
+
case_flag;
|
|
2360
|
+
}
|
|
2361
|
+
__decorate([
|
|
2362
|
+
Type(() => CaseTab),
|
|
2363
|
+
__metadata("design:type", Array)
|
|
2364
|
+
], CaseView.prototype, "tabs", void 0);
|
|
2365
|
+
__decorate([
|
|
2366
|
+
Type(() => CaseField),
|
|
2367
|
+
__metadata("design:type", Array)
|
|
2368
|
+
], CaseView.prototype, "metadataFields", void 0);
|
|
2369
|
+
|
|
2370
|
+
class CasePrintDocument {
|
|
2371
|
+
name;
|
|
2372
|
+
type;
|
|
2373
|
+
url;
|
|
2374
|
+
}
|
|
2375
|
+
|
|
2376
|
+
var RoleCategory;
|
|
2377
|
+
(function (RoleCategory) {
|
|
2378
|
+
RoleCategory["JUDICIAL"] = "JUDICIAL";
|
|
2379
|
+
RoleCategory["LEGAL_OPERATIONS"] = "LEGAL_OPERATIONS";
|
|
2380
|
+
RoleCategory["ADMIN"] = "ADMIN";
|
|
2381
|
+
RoleCategory["CTSC"] = "CTSC";
|
|
2382
|
+
RoleCategory["PROFESSIONAL"] = "PROFESSIONAL";
|
|
2383
|
+
RoleCategory["CITIZEN"] = "CITIZEN";
|
|
2384
|
+
RoleCategory["ENFORCEMENT"] = "ENFORCEMENT";
|
|
2385
|
+
})(RoleCategory || (RoleCategory = {}));
|
|
2386
|
+
var AMRoleSuffix;
|
|
2387
|
+
(function (AMRoleSuffix) {
|
|
2388
|
+
AMRoleSuffix["JUDICIARY"] = "judiciary";
|
|
2389
|
+
AMRoleSuffix["ADMIN"] = "admin";
|
|
2390
|
+
AMRoleSuffix["PROFESSIONAL"] = "professional";
|
|
2391
|
+
AMRoleSuffix["LEGAL_OPERATIONS"] = "legal-ops";
|
|
2392
|
+
AMRoleSuffix["CITIZEN"] = "citizen";
|
|
2393
|
+
AMRoleSuffix["CTSC"] = "ctsc";
|
|
2394
|
+
AMRoleSuffix["ENFORCEMENT"] = "enforcement";
|
|
2395
|
+
})(AMRoleSuffix || (AMRoleSuffix = {}));
|
|
2396
|
+
var RoleKeyword;
|
|
2397
|
+
(function (RoleKeyword) {
|
|
2398
|
+
RoleKeyword["JUDGE"] = "judge";
|
|
2399
|
+
RoleKeyword["ADMIN"] = "admin";
|
|
2400
|
+
RoleKeyword["SOLICITOR"] = "solicitor";
|
|
2401
|
+
RoleKeyword["CITIZEN"] = "citizen";
|
|
2402
|
+
RoleKeyword["CTSC"] = "ctsc";
|
|
2403
|
+
RoleKeyword["CASEWORKER"] = "caseworker";
|
|
2404
|
+
RoleKeyword["ENFORCEMENT"] = "enforcement";
|
|
2405
|
+
})(RoleKeyword || (RoleKeyword = {}));
|
|
2406
|
+
|
|
2407
|
+
// tslint:disable:variable-name
|
|
2408
|
+
class HRef {
|
|
2409
|
+
href;
|
|
2410
|
+
}
|
|
2411
|
+
class DocumentLinks {
|
|
2412
|
+
self;
|
|
2413
|
+
binary;
|
|
2414
|
+
}
|
|
2415
|
+
class Document {
|
|
2416
|
+
_links;
|
|
2417
|
+
originalDocumentName;
|
|
2418
|
+
hashToken;
|
|
2419
|
+
}
|
|
2420
|
+
class Embedded {
|
|
2421
|
+
documents;
|
|
2422
|
+
}
|
|
2423
|
+
class DocumentData {
|
|
2424
|
+
_embedded;
|
|
2425
|
+
documents;
|
|
2426
|
+
}
|
|
2427
|
+
class FormDocument {
|
|
2428
|
+
document_url;
|
|
2429
|
+
document_binary_url;
|
|
2430
|
+
document_filename;
|
|
2431
|
+
document_hash;
|
|
2432
|
+
upload_timestamp;
|
|
2433
|
+
}
|
|
2434
|
+
|
|
2435
|
+
const DRAFT_PREFIX = 'DRAFT';
|
|
2436
|
+
const DRAFT_QUERY_PARAM = 'draft';
|
|
2437
|
+
class Draft {
|
|
2438
|
+
id;
|
|
2439
|
+
document;
|
|
2440
|
+
type;
|
|
2441
|
+
created;
|
|
2442
|
+
updated;
|
|
2443
|
+
static stripDraftId(draftId) {
|
|
2444
|
+
return draftId.slice(DRAFT_PREFIX.length);
|
|
2445
|
+
}
|
|
2446
|
+
static isDraft(id) {
|
|
2447
|
+
return String(id).startsWith(DRAFT_PREFIX);
|
|
2448
|
+
}
|
|
2449
|
+
}
|
|
2450
|
+
|
|
2451
|
+
class OrganisationConverter {
|
|
2452
|
+
static toSimpleAddress(organisationModel) {
|
|
2453
|
+
let simpleAddress = '';
|
|
2454
|
+
if (organisationModel.addressLine1) {
|
|
2455
|
+
simpleAddress += `${organisationModel.addressLine1}<br>`;
|
|
2456
|
+
}
|
|
2457
|
+
if (organisationModel.addressLine2) {
|
|
2458
|
+
simpleAddress += `${organisationModel.addressLine2}<br>`;
|
|
2459
|
+
}
|
|
2460
|
+
if (organisationModel.addressLine3) {
|
|
2461
|
+
simpleAddress += `${organisationModel.addressLine3}<br>`;
|
|
2462
|
+
}
|
|
2463
|
+
if (organisationModel.townCity) {
|
|
2464
|
+
simpleAddress += `${organisationModel.townCity}<br>`;
|
|
2465
|
+
}
|
|
2466
|
+
if (organisationModel.county) {
|
|
2467
|
+
simpleAddress += `${organisationModel.county}<br>`;
|
|
2468
|
+
}
|
|
2469
|
+
if (organisationModel.country) {
|
|
2470
|
+
simpleAddress += `${organisationModel.country}<br>`;
|
|
2471
|
+
}
|
|
2472
|
+
if (organisationModel.postCode) {
|
|
2473
|
+
simpleAddress += `${organisationModel.postCode}<br>`;
|
|
2474
|
+
}
|
|
2475
|
+
return simpleAddress;
|
|
2476
|
+
}
|
|
2477
|
+
toSimpleOrganisationModel(organisationModel) {
|
|
2478
|
+
return {
|
|
2479
|
+
organisationIdentifier: organisationModel.organisationIdentifier,
|
|
2480
|
+
name: organisationModel.name,
|
|
2481
|
+
address: OrganisationConverter.toSimpleAddress(organisationModel)
|
|
2482
|
+
};
|
|
2483
|
+
}
|
|
2484
|
+
static ɵfac = function OrganisationConverter_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || OrganisationConverter)(); };
|
|
2485
|
+
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: OrganisationConverter, factory: OrganisationConverter.ɵfac });
|
|
2486
|
+
}
|
|
2487
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(OrganisationConverter, [{
|
|
2488
|
+
type: Injectable
|
|
2489
|
+
}], null, null); })();
|
|
2490
|
+
|
|
2491
|
+
class PaginationMetadata {
|
|
2492
|
+
totalResultsCount;
|
|
2493
|
+
totalPagesCount;
|
|
2494
|
+
}
|
|
2495
|
+
|
|
2496
|
+
function hasRoles(profile) {
|
|
2497
|
+
if (profile.user && profile.user.idam && Array.isArray(profile.user.idam.roles)) {
|
|
2498
|
+
return profile.user.idam.roles.length > 0;
|
|
2499
|
+
}
|
|
2500
|
+
return false;
|
|
2501
|
+
}
|
|
2502
|
+
// @dynamic
|
|
2503
|
+
class Profile {
|
|
2504
|
+
user;
|
|
2505
|
+
channels;
|
|
2506
|
+
jurisdictions;
|
|
2507
|
+
default;
|
|
2508
|
+
isSolicitor() {
|
|
2509
|
+
if (hasRoles(this)) {
|
|
2510
|
+
return this.user.idam.roles.find(r => r.endsWith('-solicitor')) !== undefined;
|
|
2511
|
+
}
|
|
2512
|
+
return false;
|
|
2513
|
+
}
|
|
2514
|
+
isCourtAdmin() {
|
|
2515
|
+
if (hasRoles(this)) {
|
|
2516
|
+
return this.user.idam.roles.find(r => r.endsWith('-courtadmin')) !== undefined;
|
|
2517
|
+
}
|
|
2518
|
+
return false;
|
|
2519
|
+
}
|
|
2520
|
+
}
|
|
2521
|
+
__decorate([
|
|
2522
|
+
Type(() => Jurisdiction),
|
|
2523
|
+
__metadata("design:type", Array)
|
|
2524
|
+
], Profile.prototype, "jurisdictions", void 0);
|
|
2525
|
+
|
|
2526
|
+
class Field {
|
|
2527
|
+
id;
|
|
2528
|
+
field_type;
|
|
2529
|
+
elementPath;
|
|
2530
|
+
value;
|
|
2531
|
+
label;
|
|
2532
|
+
metadata;
|
|
2533
|
+
constructor(id, field_type, elementPath, value, label, metadata) {
|
|
2534
|
+
this.id = id;
|
|
2535
|
+
this.field_type = field_type;
|
|
2536
|
+
this.elementPath = elementPath;
|
|
2537
|
+
this.value = value;
|
|
2538
|
+
this.label = label;
|
|
2539
|
+
this.metadata = metadata;
|
|
2540
|
+
}
|
|
2541
|
+
}
|
|
2542
|
+
|
|
2543
|
+
class SearchResultViewColumn {
|
|
2544
|
+
case_field_id;
|
|
2545
|
+
case_field_type;
|
|
2546
|
+
display_context;
|
|
2547
|
+
display_context_parameter;
|
|
2548
|
+
label;
|
|
2549
|
+
order;
|
|
2550
|
+
}
|
|
2551
|
+
|
|
2552
|
+
// @dynamic
|
|
2553
|
+
class SearchResultViewItem {
|
|
2554
|
+
case_id;
|
|
2555
|
+
case_fields;
|
|
2556
|
+
hydrated_case_fields;
|
|
2557
|
+
columns;
|
|
2558
|
+
supplementary_data;
|
|
2559
|
+
display_context_parameter;
|
|
2560
|
+
}
|
|
2561
|
+
__decorate([
|
|
2562
|
+
Type(() => CaseField),
|
|
2563
|
+
__metadata("design:type", Array)
|
|
2564
|
+
], SearchResultViewItem.prototype, "hydrated_case_fields", void 0);
|
|
2565
|
+
|
|
2566
|
+
// @dynamic
|
|
2567
|
+
class SearchResultView {
|
|
2568
|
+
columns;
|
|
2569
|
+
results;
|
|
2570
|
+
result_error;
|
|
2571
|
+
hasDrafts() {
|
|
2572
|
+
return this.results[0]
|
|
2573
|
+
&& this.results[0].case_id
|
|
2574
|
+
&& Draft.isDraft(this.results[0].case_id);
|
|
2575
|
+
}
|
|
2576
|
+
}
|
|
2577
|
+
__decorate([
|
|
2578
|
+
Type(() => SearchResultViewColumn),
|
|
2579
|
+
__metadata("design:type", Array)
|
|
2580
|
+
], SearchResultView.prototype, "columns", void 0);
|
|
2581
|
+
__decorate([
|
|
2582
|
+
Type(() => SearchResultViewItem),
|
|
2583
|
+
__metadata("design:type", Array)
|
|
2584
|
+
], SearchResultView.prototype, "results", void 0);
|
|
2585
|
+
|
|
2586
|
+
class SortParameters {
|
|
2587
|
+
comparator;
|
|
2588
|
+
sortOrder;
|
|
2589
|
+
constructor(comparator, sortOrder) {
|
|
2590
|
+
this.comparator = comparator;
|
|
2591
|
+
this.sortOrder = sortOrder;
|
|
2592
|
+
}
|
|
2593
|
+
}
|
|
2594
|
+
|
|
2595
|
+
var SortOrder$1;
|
|
2596
|
+
(function (SortOrder) {
|
|
2597
|
+
SortOrder[SortOrder["ASCENDING"] = 0] = "ASCENDING";
|
|
2598
|
+
SortOrder[SortOrder["DESCENDING"] = 1] = "DESCENDING";
|
|
2599
|
+
SortOrder[SortOrder["UNSORTED"] = 2] = "UNSORTED";
|
|
2600
|
+
})(SortOrder$1 || (SortOrder$1 = {}));
|
|
2601
|
+
|
|
2602
|
+
class WorkbasketInputModel {
|
|
2603
|
+
label;
|
|
2604
|
+
order;
|
|
2605
|
+
field;
|
|
2606
|
+
metadata;
|
|
2607
|
+
display_context_parameter;
|
|
2608
|
+
}
|
|
2609
|
+
class WorkbasketInput {
|
|
2610
|
+
workbasketInputs;
|
|
2611
|
+
}
|
|
2612
|
+
|
|
2613
|
+
const USER_DETAILS = 'userDetails';
|
|
2614
|
+
const PUI_CASE_MANAGER = 'pui-case-manager';
|
|
2615
|
+
function getUserDetails(sessionStorageService) {
|
|
2616
|
+
const item = sessionStorageService?.getItem(USER_DETAILS);
|
|
2617
|
+
return safeJsonParse(item, null);
|
|
2618
|
+
}
|
|
2619
|
+
function isInternalUser(sessionStorageService) {
|
|
2620
|
+
const userDetails = getUserDetails(sessionStorageService);
|
|
2621
|
+
if (!userDetails?.roles) {
|
|
2622
|
+
return false;
|
|
2623
|
+
}
|
|
2624
|
+
else if (userDetails?.roleCategories?.includes(RoleCategory.ENFORCEMENT)) {
|
|
2625
|
+
return true;
|
|
2626
|
+
}
|
|
2627
|
+
else {
|
|
2628
|
+
return !(userDetails.roles.includes(PUI_CASE_MANAGER) ||
|
|
2629
|
+
userDetails.roles.some((role) => role.toLowerCase().includes(RoleKeyword.JUDGE)));
|
|
2630
|
+
}
|
|
2631
|
+
}
|
|
2632
|
+
function isJudiciaryUser(sessionStorageService) {
|
|
2633
|
+
const userDetails = getUserDetails(sessionStorageService);
|
|
2634
|
+
return !!userDetails?.roles
|
|
2635
|
+
&& (userDetails.roles.some((role) => role.toLowerCase().includes(RoleKeyword.JUDGE)));
|
|
2636
|
+
}
|
|
2637
|
+
function roleHasKeyword(keyword, roleWords) {
|
|
2638
|
+
return roleWords.includes(keyword);
|
|
2639
|
+
}
|
|
2640
|
+
function isWorkAllocationUser(sessionStorageService) {
|
|
2641
|
+
const userDetails = getUserDetails(sessionStorageService);
|
|
2642
|
+
return userDetails?.roles
|
|
2643
|
+
&& !userDetails.roles.includes(PUI_CASE_MANAGER)
|
|
2644
|
+
&&
|
|
2645
|
+
(userDetails.roles.includes('caseworker-ia-iacjudge')
|
|
2646
|
+
|| userDetails.roles.includes('caseworker-ia-caseofficer')
|
|
2647
|
+
|| userDetails.roles.includes('caseworker-ia-admofficer')
|
|
2648
|
+
|| userDetails.roles.includes('caseworker-civil')
|
|
2649
|
+
|| userDetails.roles.includes('caseworker-privatelaw')
|
|
2650
|
+
|| userDetails?.roleCategories?.includes(RoleCategory.ENFORCEMENT));
|
|
2651
|
+
}
|
|
2652
|
+
// fallback purely if roleCategories is not available in
|
|
2653
|
+
function getMappedRoleCategories(roles = []) {
|
|
2654
|
+
const roleKeywords = roles.join().split('-').join().split(',');
|
|
2655
|
+
const roleCategoryList = [];
|
|
2656
|
+
if (roleHasKeyword(RoleKeyword.JUDGE, roleKeywords)) {
|
|
2657
|
+
roleCategoryList.push(RoleCategory.JUDICIAL);
|
|
2658
|
+
}
|
|
2659
|
+
if (roleHasKeyword(RoleKeyword.SOLICITOR, roleKeywords)) {
|
|
2660
|
+
roleCategoryList.push(RoleCategory.PROFESSIONAL);
|
|
2661
|
+
}
|
|
2662
|
+
if (roleHasKeyword(RoleKeyword.CITIZEN, roleKeywords)) {
|
|
2663
|
+
roleCategoryList.push(RoleCategory.CITIZEN);
|
|
2664
|
+
}
|
|
2665
|
+
if (roleHasKeyword(RoleKeyword.ADMIN, roleKeywords)) {
|
|
2666
|
+
roleCategoryList.push(RoleCategory.ADMIN);
|
|
2667
|
+
}
|
|
2668
|
+
if (roleHasKeyword(RoleKeyword.CTSC, roleKeywords)) {
|
|
2669
|
+
roleCategoryList.push(RoleCategory.CTSC);
|
|
2670
|
+
}
|
|
2671
|
+
if (roleHasKeyword(RoleKeyword.CASEWORKER, roleKeywords)) {
|
|
2672
|
+
roleCategoryList.push(RoleCategory.LEGAL_OPERATIONS);
|
|
2673
|
+
}
|
|
2674
|
+
if (roleHasKeyword(RoleKeyword.ENFORCEMENT, roleKeywords)) {
|
|
2675
|
+
roleCategoryList.push(RoleCategory.ENFORCEMENT);
|
|
2676
|
+
}
|
|
2677
|
+
return roleCategoryList;
|
|
2678
|
+
}
|
|
2679
|
+
function getAMRoleName(accessType, aMRole) {
|
|
2680
|
+
let roleName = '';
|
|
2681
|
+
switch (aMRole) {
|
|
2682
|
+
case RoleCategory.JUDICIAL:
|
|
2683
|
+
roleName = `${accessType}-access-${AMRoleSuffix.JUDICIARY}`;
|
|
2684
|
+
break;
|
|
2685
|
+
case RoleCategory.PROFESSIONAL:
|
|
2686
|
+
roleName = `${accessType}-access-${AMRoleSuffix.PROFESSIONAL}`;
|
|
2687
|
+
break;
|
|
2688
|
+
case RoleCategory.CITIZEN:
|
|
2689
|
+
roleName = `${accessType}-access-${AMRoleSuffix.CITIZEN}`;
|
|
2690
|
+
break;
|
|
2691
|
+
case RoleCategory.ADMIN:
|
|
2692
|
+
roleName = `${accessType}-access-${AMRoleSuffix.ADMIN}`;
|
|
2693
|
+
break;
|
|
2694
|
+
case RoleCategory.CTSC:
|
|
2695
|
+
roleName = `${accessType}-access-${AMRoleSuffix.CTSC}`;
|
|
2696
|
+
break;
|
|
2697
|
+
case RoleCategory.ENFORCEMENT:
|
|
2698
|
+
roleName = `${accessType}-access-${AMRoleSuffix.ENFORCEMENT}`;
|
|
2699
|
+
break;
|
|
2700
|
+
default:
|
|
2701
|
+
roleName = `${accessType}-access-${AMRoleSuffix.LEGAL_OPERATIONS}`;
|
|
2702
|
+
break;
|
|
2703
|
+
}
|
|
2704
|
+
return roleName;
|
|
2705
|
+
}
|
|
2706
|
+
|
|
2707
|
+
// @dynamic
|
|
2708
|
+
class ActivityService {
|
|
2709
|
+
http;
|
|
2710
|
+
appConfig;
|
|
2711
|
+
sessionStorageService;
|
|
2712
|
+
static get ACTIVITY_VIEW() { return 'view'; }
|
|
2713
|
+
static get ACTIVITY_EDIT() { return 'edit'; }
|
|
2714
|
+
logger = new StructuredLoggerService();
|
|
2715
|
+
constructor(http, appConfig, sessionStorageService) {
|
|
2716
|
+
this.http = http;
|
|
2717
|
+
this.appConfig = appConfig;
|
|
2718
|
+
this.sessionStorageService = sessionStorageService;
|
|
2719
|
+
}
|
|
2720
|
+
get isEnabled() {
|
|
2721
|
+
return this.activityUrl() && this.userAuthorised;
|
|
2722
|
+
}
|
|
2723
|
+
static DUMMY_CASE_REFERENCE = '0';
|
|
2724
|
+
userAuthorised = undefined;
|
|
2725
|
+
static handleHttpError(response) {
|
|
2726
|
+
const error = HttpErrorService.convertToHttpError(response);
|
|
2727
|
+
if (response?.status !== error.status) {
|
|
2728
|
+
error.status = response.status;
|
|
2729
|
+
}
|
|
2730
|
+
return error;
|
|
2731
|
+
}
|
|
2732
|
+
getOptions() {
|
|
2733
|
+
const userDetails = safeJsonParse(this.sessionStorageService.getItem(USER_DETAILS));
|
|
2734
|
+
let headers = new HttpHeaders().set('Content-Type', 'application/json');
|
|
2735
|
+
if (userDetails?.token) {
|
|
2736
|
+
headers = headers.set('Authorization', userDetails.token);
|
|
2737
|
+
}
|
|
2738
|
+
return {
|
|
2739
|
+
headers,
|
|
2740
|
+
withCredentials: true,
|
|
2741
|
+
observe: 'body',
|
|
2742
|
+
};
|
|
2743
|
+
}
|
|
2744
|
+
getActivities(...caseId) {
|
|
2745
|
+
try {
|
|
2746
|
+
const options = this.getOptions();
|
|
2747
|
+
const url = `${this.activityUrl()}/cases/${caseId.join(',')}/activity`;
|
|
2748
|
+
return this.http
|
|
2749
|
+
.get(url, options, false, ActivityService.handleHttpError)
|
|
2750
|
+
.pipe(map(response => response));
|
|
2751
|
+
}
|
|
2752
|
+
catch (error) {
|
|
2753
|
+
this.logUserMayNotBeAuthenticated(error);
|
|
2754
|
+
}
|
|
2755
|
+
}
|
|
2756
|
+
postActivity(caseId, activity) {
|
|
2757
|
+
try {
|
|
2758
|
+
const options = this.getOptions();
|
|
2759
|
+
const url = `${this.activityUrl()}/cases/${caseId}/activity`;
|
|
2760
|
+
const body = { activity };
|
|
2761
|
+
return this.http
|
|
2762
|
+
.post(url, body, options, false)
|
|
2763
|
+
.pipe(map(response => response));
|
|
2764
|
+
}
|
|
2765
|
+
catch (error) {
|
|
2766
|
+
this.logUserMayNotBeAuthenticated(error);
|
|
2767
|
+
}
|
|
2768
|
+
}
|
|
2769
|
+
verifyUserIsAuthorized() {
|
|
2770
|
+
if (this.sessionStorageService.getItem(USER_DETAILS) && this.activityUrl() && this.userAuthorised === undefined) {
|
|
2771
|
+
this.getActivities(ActivityService.DUMMY_CASE_REFERENCE).subscribe(() => this.userAuthorised = true, error => {
|
|
2772
|
+
this.userAuthorised = [401, 403].indexOf(error.status) <= -1;
|
|
2773
|
+
});
|
|
2774
|
+
}
|
|
2775
|
+
}
|
|
2776
|
+
activityUrl() {
|
|
2777
|
+
return this.appConfig.getActivityUrl();
|
|
2778
|
+
}
|
|
2779
|
+
logUserMayNotBeAuthenticated(error) {
|
|
2780
|
+
this.logger.error('User may not be authenticated. Activity request was not sent.', { error });
|
|
2781
|
+
}
|
|
2782
|
+
static ɵfac = function ActivityService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ActivityService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig), i0.ɵɵinject(SessionStorageService)); };
|
|
2783
|
+
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ActivityService, factory: ActivityService.ɵfac });
|
|
2784
|
+
}
|
|
2785
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ActivityService, [{
|
|
2786
|
+
type: Injectable
|
|
2787
|
+
}], () => [{ type: HttpService }, { type: AbstractAppConfig }, { type: SessionStorageService }], null); })();
|
|
2788
|
+
|
|
2789
|
+
// @dynamic
|
|
2790
|
+
class ActivityPollingService {
|
|
2791
|
+
activityService;
|
|
2792
|
+
ngZone;
|
|
2793
|
+
config;
|
|
2794
|
+
logger = new StructuredLoggerService();
|
|
2795
|
+
pendingRequests = new Map();
|
|
2796
|
+
currentTimeoutHandle;
|
|
2797
|
+
pollActivitiesSubscription;
|
|
2798
|
+
pollConfig;
|
|
2799
|
+
batchCollectionDelayMs;
|
|
2800
|
+
maxRequestsPerBatch;
|
|
2801
|
+
constructor(activityService, ngZone, config) {
|
|
2802
|
+
this.activityService = activityService;
|
|
2803
|
+
this.ngZone = ngZone;
|
|
2804
|
+
this.config = config;
|
|
2805
|
+
this.pollConfig = {
|
|
2806
|
+
interval: config.getActivityNexPollRequestMs(),
|
|
2807
|
+
attempts: config.getActivityRetry()
|
|
2808
|
+
};
|
|
2809
|
+
this.batchCollectionDelayMs = config.getActivityBatchCollectionDelayMs();
|
|
2810
|
+
this.maxRequestsPerBatch = config.getActivityMaxRequestPerBatch();
|
|
2811
|
+
}
|
|
2812
|
+
get isEnabled() {
|
|
2813
|
+
return this.activityService.isEnabled;
|
|
2814
|
+
}
|
|
2815
|
+
subscribeToActivity(caseId, done) {
|
|
2816
|
+
if (!this.isEnabled) {
|
|
2817
|
+
return new Subject();
|
|
2818
|
+
}
|
|
2819
|
+
let subject = this.pendingRequests.get(caseId);
|
|
2820
|
+
if (subject) {
|
|
2821
|
+
subject.subscribe(done);
|
|
2822
|
+
}
|
|
2823
|
+
else {
|
|
2824
|
+
// Only the first pending request should start the batch collection timer.
|
|
2825
|
+
const wasEmpty = this.pendingRequests.size === 0;
|
|
2826
|
+
subject = new Subject();
|
|
2827
|
+
subject.subscribe(done);
|
|
2828
|
+
this.addPendingRequest(caseId, subject);
|
|
2829
|
+
if (wasEmpty) {
|
|
2830
|
+
this.ngZone.runOutsideAngular(() => {
|
|
2831
|
+
this.currentTimeoutHandle = setTimeout(() => this.ngZone.run(() => {
|
|
2832
|
+
this.flushRequests();
|
|
2833
|
+
}), this.batchCollectionDelayMs);
|
|
2834
|
+
});
|
|
2835
|
+
}
|
|
2836
|
+
}
|
|
2837
|
+
if (this.pendingRequests.size >= this.maxRequestsPerBatch) {
|
|
2838
|
+
this.flushRequests();
|
|
2839
|
+
}
|
|
2840
|
+
return subject;
|
|
2841
|
+
}
|
|
2842
|
+
stopPolling() {
|
|
2843
|
+
if (this.pollActivitiesSubscription) {
|
|
2844
|
+
this.pollActivitiesSubscription.unsubscribe();
|
|
2845
|
+
}
|
|
2846
|
+
}
|
|
2847
|
+
flushRequests() {
|
|
2848
|
+
if (this.currentTimeoutHandle) {
|
|
2849
|
+
clearTimeout(this.currentTimeoutHandle);
|
|
2850
|
+
this.currentTimeoutHandle = undefined;
|
|
2851
|
+
}
|
|
2852
|
+
if (!this.pendingRequests.size) {
|
|
2853
|
+
return;
|
|
2854
|
+
}
|
|
2855
|
+
const requests = new Map(this.pendingRequests);
|
|
2856
|
+
this.pendingRequests.clear();
|
|
2857
|
+
this.performBatchRequest(requests);
|
|
2858
|
+
}
|
|
2859
|
+
pollActivities(...caseIds) {
|
|
2860
|
+
if (!this.isEnabled) {
|
|
2861
|
+
return EMPTY;
|
|
2862
|
+
}
|
|
2863
|
+
return this.polling(this.activityService.getActivities(...caseIds), this.pollConfig);
|
|
2864
|
+
}
|
|
2865
|
+
postViewActivity(caseId) {
|
|
2866
|
+
return this.postActivity(caseId, ActivityService.ACTIVITY_VIEW);
|
|
2867
|
+
}
|
|
2868
|
+
postEditActivity(caseId) {
|
|
2869
|
+
return this.postActivity(caseId, ActivityService.ACTIVITY_EDIT);
|
|
2870
|
+
}
|
|
2871
|
+
performBatchRequest(requests) {
|
|
2872
|
+
const caseIds = Array.from(requests.keys()).join();
|
|
2873
|
+
this.ngZone.runOutsideAngular(() => {
|
|
2874
|
+
// run polling outside angular zone so it does not trigger change detection
|
|
2875
|
+
this.pollActivitiesSubscription = this.pollActivities(caseIds).subscribe({
|
|
2876
|
+
// process activity inside zone so it triggers change detection for activity.component.ts
|
|
2877
|
+
next: (activities) => this.ngZone.run(() => {
|
|
2878
|
+
activities.forEach((activity) => {
|
|
2879
|
+
// Ignore activities returned for cases outside this local batch.
|
|
2880
|
+
requests.get(activity.caseId)?.next(activity);
|
|
2881
|
+
});
|
|
2882
|
+
}),
|
|
2883
|
+
error: (err) => this.ngZone.run(() => {
|
|
2884
|
+
this.logger.error('Error while polling activities.', { error: err });
|
|
2885
|
+
Array.from(requests.values()).forEach((subject) => subject.error(err));
|
|
2886
|
+
})
|
|
2887
|
+
});
|
|
2888
|
+
});
|
|
2889
|
+
}
|
|
2890
|
+
postActivity(caseId, activityType) {
|
|
2891
|
+
if (!this.isEnabled) {
|
|
2892
|
+
return EMPTY;
|
|
2893
|
+
}
|
|
2894
|
+
const pollingConfig = {
|
|
2895
|
+
...this.pollConfig,
|
|
2896
|
+
interval: 5000 // inline with CCD Backend
|
|
2897
|
+
};
|
|
2898
|
+
return this.polling(this.activityService.postActivity(caseId, activityType), pollingConfig);
|
|
2899
|
+
}
|
|
2900
|
+
addPendingRequest(caseId, subject) {
|
|
2901
|
+
this.pendingRequests.set(caseId, subject);
|
|
2902
|
+
// Components complete their returned Subject on destroy; remove it so a later same-case subscription gets a fresh Subject.
|
|
2903
|
+
subject.subscribe({
|
|
2904
|
+
complete: () => this.removePendingRequest(caseId, subject),
|
|
2905
|
+
error: () => this.removePendingRequest(caseId, subject)
|
|
2906
|
+
});
|
|
2907
|
+
}
|
|
2908
|
+
removePendingRequest(caseId, subject) {
|
|
2909
|
+
if (this.pendingRequests.get(caseId) !== subject) {
|
|
2910
|
+
return;
|
|
2911
|
+
}
|
|
2912
|
+
this.pendingRequests.delete(caseId);
|
|
2913
|
+
if (!this.pendingRequests.size && this.currentTimeoutHandle) {
|
|
2914
|
+
clearTimeout(this.currentTimeoutHandle);
|
|
2915
|
+
this.currentTimeoutHandle = undefined;
|
|
2916
|
+
}
|
|
2917
|
+
}
|
|
2918
|
+
polling(request$, options) {
|
|
2919
|
+
const pollingOptions = {
|
|
2920
|
+
interval: options.interval,
|
|
2921
|
+
attempts: options.attempts ?? 9,
|
|
2922
|
+
exponentialUnit: options.exponentialUnit ?? 1000
|
|
2923
|
+
};
|
|
2924
|
+
return concat(request$, defer(() => timer(pollingOptions.interval).pipe(switchMap(() => request$))).pipe(repeat())).pipe(
|
|
2925
|
+
// Preserve consecutive-failure retry behaviour using the current RxJS retry config.
|
|
2926
|
+
retry({
|
|
2927
|
+
count: pollingOptions.attempts,
|
|
2928
|
+
delay: (_error, retryCount) => timer(this.getExponentialRetryDelay(retryCount, pollingOptions.exponentialUnit)),
|
|
2929
|
+
resetOnSuccess: true
|
|
2930
|
+
}));
|
|
2931
|
+
}
|
|
2932
|
+
getExponentialRetryDelay(consecutiveErrorsCount, exponentialUnit) {
|
|
2933
|
+
return Math.pow(2, consecutiveErrorsCount - 1) * exponentialUnit;
|
|
2934
|
+
}
|
|
2935
|
+
static ɵfac = function ActivityPollingService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ActivityPollingService)(i0.ɵɵinject(ActivityService), i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(AbstractAppConfig)); };
|
|
2936
|
+
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ActivityPollingService, factory: ActivityPollingService.ɵfac });
|
|
2937
|
+
}
|
|
2938
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ActivityPollingService, [{
|
|
2939
|
+
type: Injectable
|
|
2940
|
+
}], () => [{ type: ActivityService }, { type: i0.NgZone }, { type: AbstractAppConfig }], null); })();
|
|
2941
|
+
|
|
2942
|
+
function ActivityComponent_div_0_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
2943
|
+
i0.ɵɵelementStart(0, "div");
|
|
2944
|
+
i0.ɵɵelement(1, "ccd-activity-icon", 5);
|
|
2945
|
+
i0.ɵɵpipe(2, "rpxTranslate");
|
|
2946
|
+
i0.ɵɵelementEnd();
|
|
2947
|
+
} if (rf & 2) {
|
|
2948
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
2949
|
+
i0.ɵɵclassProp("activityEditorsAndViewersIcons", ctx_r0.viewersPresent())("activityEditorsIcon", !ctx_r0.viewersPresent());
|
|
2950
|
+
i0.ɵɵadvance();
|
|
2951
|
+
i0.ɵɵproperty("description", i0.ɵɵpipeBind1(2, 5, ctx_r0.editorsText));
|
|
2952
|
+
} }
|
|
2953
|
+
function ActivityComponent_div_0_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
2954
|
+
i0.ɵɵelementStart(0, "div", 6);
|
|
2955
|
+
i0.ɵɵelement(1, "ccd-activity-icon", 7);
|
|
2956
|
+
i0.ɵɵpipe(2, "rpxTranslate");
|
|
2957
|
+
i0.ɵɵelementEnd();
|
|
2958
|
+
} if (rf & 2) {
|
|
2959
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
2960
|
+
i0.ɵɵadvance();
|
|
2961
|
+
i0.ɵɵproperty("description", i0.ɵɵpipeBind1(2, 1, ctx_r0.viewersText));
|
|
2962
|
+
} }
|
|
2963
|
+
function ActivityComponent_div_0_div_3_Template(rf, ctx) { if (rf & 1) {
|
|
2964
|
+
i0.ɵɵelementStart(0, "div");
|
|
2965
|
+
i0.ɵɵelement(1, "ccd-activity-banner", 8);
|
|
2966
|
+
i0.ɵɵpipe(2, "rpxTranslate");
|
|
2967
|
+
i0.ɵɵelementEnd();
|
|
2968
|
+
} if (rf & 2) {
|
|
2969
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
2970
|
+
i0.ɵɵadvance();
|
|
2971
|
+
i0.ɵɵproperty("description", i0.ɵɵpipeBind1(2, 1, ctx_r0.editorsText));
|
|
2972
|
+
} }
|
|
2973
|
+
function ActivityComponent_div_0_div_4_Template(rf, ctx) { if (rf & 1) {
|
|
2974
|
+
i0.ɵɵelementStart(0, "div");
|
|
2975
|
+
i0.ɵɵelement(1, "ccd-activity-banner", 9);
|
|
2976
|
+
i0.ɵɵpipe(2, "rpxTranslate");
|
|
2977
|
+
i0.ɵɵelementEnd();
|
|
2978
|
+
} if (rf & 2) {
|
|
2979
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
2980
|
+
i0.ɵɵadvance();
|
|
2981
|
+
i0.ɵɵproperty("description", i0.ɵɵpipeBind1(2, 1, ctx_r0.viewersText));
|
|
2982
|
+
} }
|
|
2983
|
+
function ActivityComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
2984
|
+
i0.ɵɵelementStart(0, "div", 1);
|
|
2985
|
+
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);
|
|
2986
|
+
i0.ɵɵelementEnd();
|
|
2987
|
+
} if (rf & 2) {
|
|
2988
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
2989
|
+
i0.ɵɵadvance();
|
|
2990
|
+
i0.ɵɵproperty("ngIf", ctx_r0.displayMode === ctx_r0.dspMode.ICON && ctx_r0.editorsPresent());
|
|
2991
|
+
i0.ɵɵadvance();
|
|
2992
|
+
i0.ɵɵproperty("ngIf", ctx_r0.displayMode === ctx_r0.dspMode.ICON && ctx_r0.viewersPresent());
|
|
2993
|
+
i0.ɵɵadvance();
|
|
2994
|
+
i0.ɵɵproperty("ngIf", ctx_r0.displayMode === ctx_r0.dspMode.BANNER && ctx_r0.editorsPresent());
|
|
2995
|
+
i0.ɵɵadvance();
|
|
2996
|
+
i0.ɵɵproperty("ngIf", ctx_r0.displayMode === ctx_r0.dspMode.BANNER && ctx_r0.viewersPresent());
|
|
2997
|
+
} }
|
|
2998
|
+
class ActivityComponent {
|
|
2999
|
+
activityPollingService;
|
|
3000
|
+
activity;
|
|
3001
|
+
dspMode = DisplayMode;
|
|
3002
|
+
viewersText;
|
|
3003
|
+
editorsText;
|
|
3004
|
+
subscription;
|
|
3005
|
+
caseId;
|
|
3006
|
+
displayMode;
|
|
3007
|
+
VIEWERS_PREFIX = '';
|
|
3008
|
+
VIEWERS_SUFFIX = 'viewing this case';
|
|
3009
|
+
EDITORS_PREFIX = 'This case is being updated by ';
|
|
3010
|
+
EDITORS_SUFFIX = '';
|
|
3011
|
+
constructor(activityPollingService) {
|
|
3012
|
+
this.activityPollingService = activityPollingService;
|
|
3013
|
+
}
|
|
3014
|
+
ngOnInit() {
|
|
3015
|
+
this.activity = new Activity();
|
|
3016
|
+
this.activity.caseId = this.caseId;
|
|
3017
|
+
this.activity.editors = [];
|
|
3018
|
+
this.activity.unknownEditors = 0;
|
|
3019
|
+
this.activity.viewers = [];
|
|
3020
|
+
this.activity.unknownViewers = 0;
|
|
3021
|
+
this.viewersText = '';
|
|
3022
|
+
this.editorsText = '';
|
|
3023
|
+
this.subscription = this.activityPollingService.subscribeToActivity(this.caseId, newActivity => this.onActivityChange(newActivity));
|
|
3024
|
+
}
|
|
3025
|
+
onActivityChange(newActivity) {
|
|
3026
|
+
this.activity = newActivity;
|
|
3027
|
+
this.viewersText = this.generateDescription(this.VIEWERS_PREFIX, this.VIEWERS_SUFFIX, this.activity.viewers, this.activity.unknownViewers);
|
|
3028
|
+
this.editorsText = this.generateDescription(this.EDITORS_PREFIX, this.EDITORS_SUFFIX, this.activity.editors, this.activity.unknownEditors);
|
|
3029
|
+
}
|
|
3030
|
+
isActivityEnabled() {
|
|
3031
|
+
return this.activityPollingService.isEnabled;
|
|
3032
|
+
}
|
|
3033
|
+
isActiveCase() {
|
|
3034
|
+
return this.activity.editors.length || this.activity.viewers.length || this.activity.unknownEditors || this.activity.unknownViewers;
|
|
3035
|
+
}
|
|
3036
|
+
viewersPresent() {
|
|
3037
|
+
return (this.activity.viewers.length > 0 || this.activity.unknownViewers > 0);
|
|
3038
|
+
}
|
|
3039
|
+
editorsPresent() {
|
|
3040
|
+
return (this.activity.editors.length > 0 || this.activity.unknownEditors > 0);
|
|
3041
|
+
}
|
|
3042
|
+
ngOnDestroy() {
|
|
3043
|
+
if (this.subscription) {
|
|
3044
|
+
this.subscription.complete();
|
|
3045
|
+
}
|
|
3046
|
+
this.activityPollingService.stopPolling();
|
|
3047
|
+
}
|
|
3048
|
+
generateDescription(prefix, suffix, namesArray, unknownCount) {
|
|
3049
|
+
let resultText = prefix;
|
|
3050
|
+
resultText += namesArray.map(activityInfo => `${activityInfo.forename} ${activityInfo.surname}`).join(', ');
|
|
3051
|
+
if (unknownCount > 0) {
|
|
3052
|
+
resultText += (namesArray.length > 0 ? ` and ${unknownCount} other` : `${unknownCount} user`);
|
|
3053
|
+
resultText += (unknownCount > 1 ? 's' : '');
|
|
3054
|
+
}
|
|
3055
|
+
else {
|
|
3056
|
+
resultText = this.replaceLastCommaWithAnd(resultText);
|
|
3057
|
+
}
|
|
3058
|
+
if (suffix.length > 0) {
|
|
3059
|
+
if (namesArray.length + unknownCount > 1) {
|
|
3060
|
+
resultText += ` are ${suffix}`;
|
|
3061
|
+
}
|
|
2237
3062
|
else {
|
|
2238
3063
|
resultText += ` is ${suffix}`;
|
|
2239
3064
|
}
|
|
@@ -2452,22 +3277,6 @@ class AlertService {
|
|
|
2452
3277
|
type: Injectable
|
|
2453
3278
|
}], () => [{ type: i1$1.Router }, { type: i1.RpxTranslationService }], null); })();
|
|
2454
3279
|
|
|
2455
|
-
const DRAFT_PREFIX = 'DRAFT';
|
|
2456
|
-
const DRAFT_QUERY_PARAM = 'draft';
|
|
2457
|
-
class Draft {
|
|
2458
|
-
id;
|
|
2459
|
-
document;
|
|
2460
|
-
type;
|
|
2461
|
-
created;
|
|
2462
|
-
updated;
|
|
2463
|
-
static stripDraftId(draftId) {
|
|
2464
|
-
return draftId.slice(DRAFT_PREFIX.length);
|
|
2465
|
-
}
|
|
2466
|
-
static isDraft(id) {
|
|
2467
|
-
return String(id).startsWith(DRAFT_PREFIX);
|
|
2468
|
-
}
|
|
2469
|
-
}
|
|
2470
|
-
|
|
2471
3280
|
class DraftService {
|
|
2472
3281
|
http;
|
|
2473
3282
|
appConfig;
|
|
@@ -3137,1052 +3946,349 @@ class DatePipe {
|
|
|
3137
3946
|
const localOffset = -date.getTimezoneOffset() / 60;
|
|
3138
3947
|
return new Date(date.getTime() + localOffset * 3600 * 1000);
|
|
3139
3948
|
}
|
|
3140
|
-
getDate(match) {
|
|
3141
|
-
const year = this.toInt(match[1]);
|
|
3142
|
-
const month = this.toInt(match[2]) - 1;
|
|
3143
|
-
const day = this.toInt(match[3]);
|
|
3144
|
-
let resultDate;
|
|
3145
|
-
if (match[4] && match[5] && match[6]) {
|
|
3146
|
-
const hour = this.toInt(match[4]);
|
|
3147
|
-
const minutes = this.toInt(match[5]);
|
|
3148
|
-
const seconds = this.toInt(match[6]);
|
|
3149
|
-
resultDate = new Date(year, month, day, hour, minutes, seconds, 0);
|
|
3150
|
-
}
|
|
3151
|
-
else {
|
|
3152
|
-
resultDate = new Date(year, month, day);
|
|
3153
|
-
}
|
|
3154
|
-
return resultDate;
|
|
3155
|
-
}
|
|
3156
|
-
getHour(hourStr) {
|
|
3157
|
-
let hourNum = this.toInt(hourStr);
|
|
3158
|
-
if (hourNum > 12) {
|
|
3159
|
-
hourNum = hourNum - 12;
|
|
3160
|
-
}
|
|
3161
|
-
else if (hourNum === 0) {
|
|
3162
|
-
hourNum = 12;
|
|
3163
|
-
}
|
|
3164
|
-
return hourNum;
|
|
3165
|
-
}
|
|
3166
|
-
toInt(str) {
|
|
3167
|
-
return parseInt(str, 10);
|
|
3168
|
-
}
|
|
3169
|
-
pad(num, padNum = 2) {
|
|
3170
|
-
const val = num !== undefined ? num.toString() : '';
|
|
3171
|
-
return val.length >= padNum ? val : new Array(padNum - val.length + 1).join('0') + val;
|
|
3172
|
-
}
|
|
3173
|
-
static ɵfac = function DatePipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || DatePipe)(i0.ɵɵdirectiveInject(FormatTranslatorService, 16)); };
|
|
3174
|
-
static ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "ccdDate", type: DatePipe, pure: true, standalone: false });
|
|
3175
|
-
}
|
|
3176
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DatePipe, [{
|
|
3177
|
-
type: Pipe,
|
|
3178
|
-
args: [{
|
|
3179
|
-
name: 'ccdDate',
|
|
3180
|
-
standalone: false
|
|
3181
|
-
}]
|
|
3182
|
-
}], () => [{ type: FormatTranslatorService }], null); })();
|
|
3183
|
-
|
|
3184
|
-
class FieldLabelPipe {
|
|
3185
|
-
rpxTranslationPipe;
|
|
3186
|
-
constructor(rpxTranslationPipe) {
|
|
3187
|
-
this.rpxTranslationPipe = rpxTranslationPipe;
|
|
3188
|
-
}
|
|
3189
|
-
transform(field) {
|
|
3190
|
-
if (!field || !field.label) {
|
|
3191
|
-
return '';
|
|
3192
|
-
}
|
|
3193
|
-
else if (!field.display_context) {
|
|
3194
|
-
return this.getTranslatedLabel(field);
|
|
3195
|
-
}
|
|
3196
|
-
return this.getTranslatedLabel(field) + (field.display_context.toUpperCase() === 'OPTIONAL' ?
|
|
3197
|
-
' (' + this.rpxTranslationPipe.transform('Optional') + ')' : '');
|
|
3198
|
-
}
|
|
3199
|
-
getTranslatedLabel(field) {
|
|
3200
|
-
if (!field.isTranslated) {
|
|
3201
|
-
return this.rpxTranslationPipe.transform(field.label);
|
|
3202
|
-
}
|
|
3203
|
-
else {
|
|
3204
|
-
return field.label;
|
|
3205
|
-
}
|
|
3206
|
-
}
|
|
3207
|
-
getOriginalLabelForYesNoTranslation(field) {
|
|
3208
|
-
return field.originalLabel || field.label;
|
|
3209
|
-
}
|
|
3210
|
-
static ɵfac = function FieldLabelPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || FieldLabelPipe)(i0.ɵɵdirectiveInject(i1.RpxTranslatePipe, 16)); };
|
|
3211
|
-
static ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "ccdFieldLabel", type: FieldLabelPipe, pure: false, standalone: false });
|
|
3212
|
-
}
|
|
3213
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FieldLabelPipe, [{
|
|
3214
|
-
type: Pipe,
|
|
3215
|
-
args: [{
|
|
3216
|
-
name: 'ccdFieldLabel',
|
|
3217
|
-
pure: false,
|
|
3218
|
-
standalone: false
|
|
3219
|
-
}]
|
|
3220
|
-
}], () => [{ type: i1.RpxTranslatePipe }], null); })();
|
|
3221
|
-
|
|
3222
|
-
class FirstErrorPipe {
|
|
3223
|
-
rpxTranslationService;
|
|
3224
|
-
injector;
|
|
3225
|
-
asyncPipe;
|
|
3226
|
-
constructor(rpxTranslationService, injector) {
|
|
3227
|
-
this.rpxTranslationService = rpxTranslationService;
|
|
3228
|
-
this.injector = injector;
|
|
3229
|
-
this.asyncPipe = new AsyncPipe(this.injector.get(ChangeDetectorRef));
|
|
3230
|
-
}
|
|
3231
|
-
transform(value, args) {
|
|
3232
|
-
if (!value) {
|
|
3233
|
-
return '';
|
|
3234
|
-
}
|
|
3235
|
-
if (!args) {
|
|
3236
|
-
args = 'Field';
|
|
3237
|
-
}
|
|
3238
|
-
const keys = Object.keys(value);
|
|
3239
|
-
if (!keys.length) {
|
|
3240
|
-
return '';
|
|
3241
|
-
}
|
|
3242
|
-
let errorMessage;
|
|
3243
|
-
if (keys[0] === 'required') {
|
|
3244
|
-
errorMessage = '%FIELDLABEL% is required';
|
|
3245
|
-
}
|
|
3246
|
-
else if (keys[0] === 'pattern') {
|
|
3247
|
-
errorMessage = 'The data entered is not valid for %FIELDLABEL%';
|
|
3248
|
-
}
|
|
3249
|
-
else if (keys[0] === 'markDownPattern') {
|
|
3250
|
-
errorMessage = 'The data entered is not valid for %FIELDLABEL%. Link mark up characters are not allowed in this field';
|
|
3251
|
-
}
|
|
3252
|
-
else if (keys[0] === 'unsafeRichText') {
|
|
3253
|
-
errorMessage = 'The data entered is not valid for %FIELDLABEL%. Potentially unsafe HTML content is not allowed in this field';
|
|
3254
|
-
}
|
|
3255
|
-
else if (keys[0] === 'minlength') {
|
|
3256
|
-
errorMessage = '%FIELDLABEL% is below the minimum length';
|
|
3257
|
-
}
|
|
3258
|
-
else if (keys[0] === 'maxlength') {
|
|
3259
|
-
errorMessage = '%FIELDLABEL% exceeds the maximum length';
|
|
3260
|
-
}
|
|
3261
|
-
else if (value.hasOwnProperty('matDatetimePickerParse')) {
|
|
3262
|
-
errorMessage = 'The date entered is not valid. Please provide a valid date';
|
|
3263
|
-
}
|
|
3264
|
-
else {
|
|
3265
|
-
errorMessage = value[keys[0]];
|
|
3266
|
-
}
|
|
3267
|
-
const o = this.rpxTranslationService.getTranslation$(args).pipe(switchMap(fieldLabel => this.rpxTranslationService.getTranslationWithReplacements$(errorMessage, { FIELDLABEL: fieldLabel })));
|
|
3268
|
-
return this.asyncPipe.transform(o);
|
|
3269
|
-
}
|
|
3270
|
-
ngOnDestroy() {
|
|
3271
|
-
this.asyncPipe.ngOnDestroy();
|
|
3272
|
-
}
|
|
3273
|
-
static ɵfac = function FirstErrorPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || FirstErrorPipe)(i0.ɵɵdirectiveInject(i1.RpxTranslationService, 16), i0.ɵɵdirectiveInject(i0.Injector, 16)); };
|
|
3274
|
-
static ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "ccdFirstError", type: FirstErrorPipe, pure: false, standalone: false });
|
|
3275
|
-
}
|
|
3276
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FirstErrorPipe, [{
|
|
3277
|
-
type: Pipe,
|
|
3278
|
-
args: [{
|
|
3279
|
-
name: 'ccdFirstError',
|
|
3280
|
-
pure: false,
|
|
3281
|
-
standalone: false
|
|
3282
|
-
}]
|
|
3283
|
-
}], () => [{ type: i1.RpxTranslationService }, { type: i0.Injector }], null); })();
|
|
3284
|
-
|
|
3285
|
-
class IsCompoundPipe {
|
|
3286
|
-
static COMPOUND_TYPES = [
|
|
3287
|
-
'Complex',
|
|
3288
|
-
'Label',
|
|
3289
|
-
'AddressGlobal',
|
|
3290
|
-
'AddressUK',
|
|
3291
|
-
'AddressGlobalUK',
|
|
3292
|
-
'CasePaymentHistoryViewer',
|
|
3293
|
-
'CaseHistoryViewer',
|
|
3294
|
-
'Organisation',
|
|
3295
|
-
'WaysToPay',
|
|
3296
|
-
'ComponentLauncher',
|
|
3297
|
-
'FlagLauncher',
|
|
3298
|
-
'CaseFlag'
|
|
3299
|
-
];
|
|
3300
|
-
static EXCLUDE = [
|
|
3301
|
-
'CaseLink',
|
|
3302
|
-
'JudicialUser'
|
|
3303
|
-
];
|
|
3304
|
-
transform(field) {
|
|
3305
|
-
if (!field || !field.field_type || !field.field_type.type) {
|
|
3306
|
-
return false;
|
|
3307
|
-
}
|
|
3308
|
-
if (IsCompoundPipe.COMPOUND_TYPES.indexOf(field.field_type.type) !== -1) {
|
|
3309
|
-
if (IsCompoundPipe.EXCLUDE.indexOf(field.field_type.id) !== -1) {
|
|
3310
|
-
return false;
|
|
3311
|
-
}
|
|
3312
|
-
return true;
|
|
3313
|
-
}
|
|
3314
|
-
return false;
|
|
3315
|
-
}
|
|
3316
|
-
static ɵfac = function IsCompoundPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || IsCompoundPipe)(); };
|
|
3317
|
-
static ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "ccdIsCompound", type: IsCompoundPipe, pure: true, standalone: false });
|
|
3318
|
-
}
|
|
3319
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(IsCompoundPipe, [{
|
|
3320
|
-
type: Pipe,
|
|
3321
|
-
args: [{
|
|
3322
|
-
name: 'ccdIsCompound',
|
|
3323
|
-
standalone: false
|
|
3324
|
-
}]
|
|
3325
|
-
}], null, null); })();
|
|
3326
|
-
|
|
3327
|
-
class CaseFieldService {
|
|
3328
|
-
isOptional(field) {
|
|
3329
|
-
if (!field || !field.display_context) {
|
|
3330
|
-
return false;
|
|
3331
|
-
}
|
|
3332
|
-
return field.display_context.toUpperCase() === 'OPTIONAL';
|
|
3333
|
-
}
|
|
3334
|
-
isReadOnly(field) {
|
|
3335
|
-
if (!field || !field.display_context) {
|
|
3336
|
-
return false;
|
|
3337
|
-
}
|
|
3338
|
-
return field.display_context.toUpperCase() === 'READONLY';
|
|
3339
|
-
}
|
|
3340
|
-
isMandatory(field) {
|
|
3341
|
-
if (!field || !field.display_context) {
|
|
3342
|
-
return false;
|
|
3343
|
-
}
|
|
3344
|
-
return field.display_context.toUpperCase() === 'MANDATORY';
|
|
3345
|
-
}
|
|
3346
|
-
isLabel(field) {
|
|
3347
|
-
if (!field || !field.field_type) {
|
|
3348
|
-
return false;
|
|
3349
|
-
}
|
|
3350
|
-
return field.field_type.type === 'Label';
|
|
3351
|
-
}
|
|
3352
|
-
static ɵfac = function CaseFieldService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaseFieldService)(); };
|
|
3353
|
-
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: CaseFieldService, factory: CaseFieldService.ɵfac });
|
|
3354
|
-
}
|
|
3355
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFieldService, [{
|
|
3356
|
-
type: Injectable
|
|
3357
|
-
}], null, null); })();
|
|
3358
|
-
|
|
3359
|
-
class IsMandatoryPipe {
|
|
3360
|
-
caseFieldService;
|
|
3361
|
-
constructor(caseFieldService) {
|
|
3362
|
-
this.caseFieldService = caseFieldService;
|
|
3363
|
-
}
|
|
3364
|
-
transform(field) {
|
|
3365
|
-
return this.caseFieldService.isMandatory(field);
|
|
3366
|
-
}
|
|
3367
|
-
static ɵfac = function IsMandatoryPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || IsMandatoryPipe)(i0.ɵɵdirectiveInject(CaseFieldService, 16)); };
|
|
3368
|
-
static ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "ccdIsMandatory", type: IsMandatoryPipe, pure: true, standalone: false });
|
|
3369
|
-
}
|
|
3370
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(IsMandatoryPipe, [{
|
|
3371
|
-
type: Pipe,
|
|
3372
|
-
args: [{
|
|
3373
|
-
name: 'ccdIsMandatory',
|
|
3374
|
-
standalone: false
|
|
3375
|
-
}]
|
|
3376
|
-
}], () => [{ type: CaseFieldService }], null); })();
|
|
3377
|
-
|
|
3378
|
-
class IsReadOnlyPipe {
|
|
3379
|
-
caseFieldService;
|
|
3380
|
-
constructor(caseFieldService) {
|
|
3381
|
-
this.caseFieldService = caseFieldService;
|
|
3382
|
-
}
|
|
3383
|
-
transform(field) {
|
|
3384
|
-
return this.caseFieldService.isReadOnly(field);
|
|
3385
|
-
}
|
|
3386
|
-
static ɵfac = function IsReadOnlyPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || IsReadOnlyPipe)(i0.ɵɵdirectiveInject(CaseFieldService, 16)); };
|
|
3387
|
-
static ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "ccdIsReadOnly", type: IsReadOnlyPipe, pure: true, standalone: false });
|
|
3388
|
-
}
|
|
3389
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(IsReadOnlyPipe, [{
|
|
3390
|
-
type: Pipe,
|
|
3391
|
-
args: [{
|
|
3392
|
-
name: 'ccdIsReadOnly',
|
|
3393
|
-
standalone: false
|
|
3394
|
-
}]
|
|
3395
|
-
}], () => [{ type: CaseFieldService }], null); })();
|
|
3396
|
-
|
|
3397
|
-
class IsReadOnlyAndNotCollectionPipe {
|
|
3398
|
-
caseFieldService;
|
|
3399
|
-
constructor(caseFieldService) {
|
|
3400
|
-
this.caseFieldService = caseFieldService;
|
|
3401
|
-
}
|
|
3402
|
-
transform(field) {
|
|
3403
|
-
if (!field || !field.field_type || !field.field_type.type) {
|
|
3404
|
-
return false;
|
|
3405
|
-
}
|
|
3406
|
-
if (this.isCollection(field)) {
|
|
3407
|
-
return false;
|
|
3408
|
-
}
|
|
3409
|
-
return this.caseFieldService.isReadOnly(field);
|
|
3410
|
-
}
|
|
3411
|
-
// CaseField @Expose() doesn't work with the pipe in here, so leaving the manual check
|
|
3412
|
-
isCollection(field) {
|
|
3413
|
-
return field.field_type && field.field_type.type === 'Collection';
|
|
3414
|
-
}
|
|
3415
|
-
static ɵfac = function IsReadOnlyAndNotCollectionPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || IsReadOnlyAndNotCollectionPipe)(i0.ɵɵdirectiveInject(CaseFieldService, 16)); };
|
|
3416
|
-
static ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "ccdIsReadOnlyAndNotCollection", type: IsReadOnlyAndNotCollectionPipe, pure: true, standalone: false });
|
|
3417
|
-
}
|
|
3418
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(IsReadOnlyAndNotCollectionPipe, [{
|
|
3419
|
-
type: Pipe,
|
|
3420
|
-
args: [{
|
|
3421
|
-
name: 'ccdIsReadOnlyAndNotCollection',
|
|
3422
|
-
standalone: false
|
|
3423
|
-
}]
|
|
3424
|
-
}], () => [{ type: CaseFieldService }], null); })();
|
|
3425
|
-
|
|
3426
|
-
class PaletteUtilsModule {
|
|
3427
|
-
static ɵfac = function PaletteUtilsModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PaletteUtilsModule)(); };
|
|
3428
|
-
static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: PaletteUtilsModule });
|
|
3429
|
-
static ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ providers: [
|
|
3430
|
-
IsCompoundPipe,
|
|
3431
|
-
RpxTranslatePipe
|
|
3432
|
-
], imports: [CommonModule,
|
|
3433
|
-
RpxTranslationModule.forChild()] });
|
|
3434
|
-
}
|
|
3435
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaletteUtilsModule, [{
|
|
3436
|
-
type: NgModule,
|
|
3437
|
-
args: [{
|
|
3438
|
-
imports: [
|
|
3439
|
-
CommonModule,
|
|
3440
|
-
RpxTranslationModule.forChild()
|
|
3441
|
-
],
|
|
3442
|
-
declarations: [
|
|
3443
|
-
DatePipe,
|
|
3444
|
-
FieldLabelPipe,
|
|
3445
|
-
FirstErrorPipe,
|
|
3446
|
-
IsCompoundPipe,
|
|
3447
|
-
IsMandatoryPipe,
|
|
3448
|
-
IsReadOnlyPipe,
|
|
3449
|
-
IsReadOnlyAndNotCollectionPipe,
|
|
3450
|
-
DashPipe
|
|
3451
|
-
],
|
|
3452
|
-
exports: [
|
|
3453
|
-
DatePipe,
|
|
3454
|
-
FieldLabelPipe,
|
|
3455
|
-
FirstErrorPipe,
|
|
3456
|
-
IsCompoundPipe,
|
|
3457
|
-
IsMandatoryPipe,
|
|
3458
|
-
IsReadOnlyPipe,
|
|
3459
|
-
IsReadOnlyAndNotCollectionPipe,
|
|
3460
|
-
DashPipe
|
|
3461
|
-
],
|
|
3462
|
-
providers: [
|
|
3463
|
-
IsCompoundPipe,
|
|
3464
|
-
RpxTranslatePipe
|
|
3465
|
-
]
|
|
3466
|
-
}]
|
|
3467
|
-
}], null, null); })();
|
|
3468
|
-
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(PaletteUtilsModule, { declarations: [DatePipe,
|
|
3469
|
-
FieldLabelPipe,
|
|
3470
|
-
FirstErrorPipe,
|
|
3471
|
-
IsCompoundPipe,
|
|
3472
|
-
IsMandatoryPipe,
|
|
3473
|
-
IsReadOnlyPipe,
|
|
3474
|
-
IsReadOnlyAndNotCollectionPipe,
|
|
3475
|
-
DashPipe], imports: [CommonModule, i1.RpxTranslationModule], exports: [DatePipe,
|
|
3476
|
-
FieldLabelPipe,
|
|
3477
|
-
FirstErrorPipe,
|
|
3478
|
-
IsCompoundPipe,
|
|
3479
|
-
IsMandatoryPipe,
|
|
3480
|
-
IsReadOnlyPipe,
|
|
3481
|
-
IsReadOnlyAndNotCollectionPipe,
|
|
3482
|
-
DashPipe] }); })();
|
|
3483
|
-
|
|
3484
|
-
// tslint:disable:variable-name
|
|
3485
|
-
class AddressModel {
|
|
3486
|
-
AddressLine1 = '';
|
|
3487
|
-
AddressLine2 = '';
|
|
3488
|
-
AddressLine3 = '';
|
|
3489
|
-
PostTown = '';
|
|
3490
|
-
County = '';
|
|
3491
|
-
PostCode = '';
|
|
3492
|
-
Country = '';
|
|
3493
|
-
}
|
|
3494
|
-
|
|
3495
|
-
class Alert {
|
|
3496
|
-
level;
|
|
3497
|
-
message;
|
|
3498
|
-
}
|
|
3499
|
-
|
|
3500
|
-
// tslint:disable:variable-name
|
|
3501
|
-
class CaseDetails {
|
|
3502
|
-
id;
|
|
3503
|
-
jurisdiction;
|
|
3504
|
-
case_type_id;
|
|
3505
|
-
state;
|
|
3506
|
-
created_date;
|
|
3507
|
-
last_modified;
|
|
3508
|
-
locked_by_user_id;
|
|
3509
|
-
security_level;
|
|
3510
|
-
case_data;
|
|
3511
|
-
}
|
|
3512
|
-
|
|
3513
|
-
// tslint:disable:variable-name
|
|
3514
|
-
class CaseEventData {
|
|
3515
|
-
event;
|
|
3516
|
-
data;
|
|
3517
|
-
event_data; // full event data
|
|
3518
|
-
event_token;
|
|
3519
|
-
ignore_warning;
|
|
3520
|
-
draft_id;
|
|
3521
|
-
case_reference;
|
|
3522
|
-
}
|
|
3523
|
-
|
|
3524
|
-
class WizardPageField {
|
|
3525
|
-
case_field_id;
|
|
3526
|
-
order;
|
|
3527
|
-
page_column_no;
|
|
3528
|
-
complex_field_overrides;
|
|
3529
|
-
}
|
|
3530
|
-
|
|
3531
|
-
class FixedListItem {
|
|
3532
|
-
code;
|
|
3533
|
-
label;
|
|
3534
|
-
order;
|
|
3535
|
-
}
|
|
3536
|
-
|
|
3537
|
-
// @dynamic
|
|
3538
|
-
class FieldType {
|
|
3539
|
-
id;
|
|
3540
|
-
type;
|
|
3541
|
-
min;
|
|
3542
|
-
max;
|
|
3543
|
-
regular_expression;
|
|
3544
|
-
fixed_list_items;
|
|
3545
|
-
complex_fields;
|
|
3546
|
-
collection_field_type;
|
|
3547
|
-
}
|
|
3548
|
-
__decorate([
|
|
3549
|
-
Type(() => FixedListItem),
|
|
3550
|
-
__metadata("design:type", Array)
|
|
3551
|
-
], FieldType.prototype, "fixed_list_items", void 0);
|
|
3552
|
-
__decorate([
|
|
3553
|
-
Type(() => CaseField),
|
|
3554
|
-
__metadata("design:type", Array)
|
|
3555
|
-
], FieldType.prototype, "complex_fields", void 0);
|
|
3556
|
-
__decorate([
|
|
3557
|
-
Type(() => FieldType),
|
|
3558
|
-
__metadata("design:type", FieldType)
|
|
3559
|
-
], FieldType.prototype, "collection_field_type", void 0);
|
|
3560
|
-
|
|
3561
|
-
// @dynamic
|
|
3562
|
-
class CaseField {
|
|
3563
|
-
static logger = new StructuredLoggerService();
|
|
3564
|
-
id;
|
|
3565
|
-
hidden;
|
|
3566
|
-
hiddenCannotChange;
|
|
3567
|
-
label;
|
|
3568
|
-
originalLabel;
|
|
3569
|
-
noCacheLabel;
|
|
3570
|
-
order;
|
|
3571
|
-
parent;
|
|
3572
|
-
field_type;
|
|
3573
|
-
hint_text;
|
|
3574
|
-
security_label;
|
|
3575
|
-
display_context;
|
|
3576
|
-
display_context_parameter;
|
|
3577
|
-
month_format;
|
|
3578
|
-
show_condition;
|
|
3579
|
-
show_summary_change_option;
|
|
3580
|
-
show_summary_content_option;
|
|
3581
|
-
acls;
|
|
3582
|
-
metadata;
|
|
3583
|
-
formatted_value;
|
|
3584
|
-
retain_hidden_value;
|
|
3585
|
-
wizardProps;
|
|
3586
|
-
_value;
|
|
3587
|
-
_list_items = [];
|
|
3588
|
-
isTranslatedFlag = false;
|
|
3589
|
-
get value() {
|
|
3590
|
-
if (this.field_type && (this.field_type.type === 'DynamicList' || this.field_type.type === 'DynamicRadioList')) {
|
|
3591
|
-
return this._value && this._value.value ? this._value.value.code : this._value;
|
|
3592
|
-
}
|
|
3593
|
-
else if (this.field_type && this.field_type.type === 'DynamicMultiSelectList') {
|
|
3594
|
-
return this._value && this._value.value ? this._value.value : this._value;
|
|
3595
|
-
}
|
|
3596
|
-
else {
|
|
3597
|
-
return this._value;
|
|
3598
|
-
}
|
|
3599
|
-
}
|
|
3600
|
-
set value(value) {
|
|
3601
|
-
if (this.isDynamic()) {
|
|
3602
|
-
if (value && value instanceof Object && value.list_items) {
|
|
3603
|
-
this._list_items = value.list_items;
|
|
3604
|
-
}
|
|
3605
|
-
else if (!this._list_items || this._list_items.length === 0) {
|
|
3606
|
-
// Extract the list items from the current value if that's the only place they exist.
|
|
3607
|
-
this._list_items = this.list_items;
|
|
3608
|
-
if (!value || !value.value) {
|
|
3609
|
-
value = null;
|
|
3610
|
-
}
|
|
3611
|
-
}
|
|
3612
|
-
}
|
|
3613
|
-
this._value = value;
|
|
3614
|
-
}
|
|
3615
|
-
get list_items() {
|
|
3616
|
-
if (this.isDynamic()) {
|
|
3617
|
-
return this._value && this._value.list_items ? this._value.list_items : this._list_items;
|
|
3618
|
-
}
|
|
3619
|
-
else {
|
|
3620
|
-
return this.field_type.fixed_list_items;
|
|
3621
|
-
}
|
|
3622
|
-
}
|
|
3623
|
-
set list_items(items) {
|
|
3624
|
-
if ((items && !this._list_items) || (items?.length > this._list_items?.length)) {
|
|
3625
|
-
this._list_items = items;
|
|
3626
|
-
}
|
|
3627
|
-
}
|
|
3628
|
-
get dateTimeEntryFormat() {
|
|
3629
|
-
if (this.isComplexDisplay()) {
|
|
3630
|
-
return null;
|
|
3949
|
+
getDate(match) {
|
|
3950
|
+
const year = this.toInt(match[1]);
|
|
3951
|
+
const month = this.toInt(match[2]) - 1;
|
|
3952
|
+
const day = this.toInt(match[3]);
|
|
3953
|
+
let resultDate;
|
|
3954
|
+
if (match[4] && match[5] && match[6]) {
|
|
3955
|
+
const hour = this.toInt(match[4]);
|
|
3956
|
+
const minutes = this.toInt(match[5]);
|
|
3957
|
+
const seconds = this.toInt(match[6]);
|
|
3958
|
+
resultDate = new Date(year, month, day, hour, minutes, seconds, 0);
|
|
3631
3959
|
}
|
|
3632
|
-
|
|
3633
|
-
|
|
3960
|
+
else {
|
|
3961
|
+
resultDate = new Date(year, month, day);
|
|
3634
3962
|
}
|
|
3635
|
-
return
|
|
3963
|
+
return resultDate;
|
|
3636
3964
|
}
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3965
|
+
getHour(hourStr) {
|
|
3966
|
+
let hourNum = this.toInt(hourStr);
|
|
3967
|
+
if (hourNum > 12) {
|
|
3968
|
+
hourNum = hourNum - 12;
|
|
3640
3969
|
}
|
|
3641
|
-
if (
|
|
3642
|
-
|
|
3970
|
+
else if (hourNum === 0) {
|
|
3971
|
+
hourNum = 12;
|
|
3643
3972
|
}
|
|
3644
|
-
return
|
|
3645
|
-
}
|
|
3646
|
-
isComplexDisplay() {
|
|
3647
|
-
return (this.isComplex() || this.isCollection()) && this.isReadonly();
|
|
3648
|
-
}
|
|
3649
|
-
isComplexEntry() {
|
|
3650
|
-
return (this.isComplex() || this.isCollection()) && (this.isOptional() || this.isMandatory());
|
|
3651
|
-
}
|
|
3652
|
-
isReadonly() {
|
|
3653
|
-
return !_.isEmpty(this.display_context)
|
|
3654
|
-
&& this.display_context.toUpperCase() === 'READONLY';
|
|
3655
|
-
}
|
|
3656
|
-
isOptional() {
|
|
3657
|
-
return !_.isEmpty(this.display_context)
|
|
3658
|
-
&& this.display_context.toUpperCase() === 'OPTIONAL';
|
|
3973
|
+
return hourNum;
|
|
3659
3974
|
}
|
|
3660
|
-
|
|
3661
|
-
return
|
|
3662
|
-
&& this.display_context.toUpperCase() === 'MANDATORY';
|
|
3975
|
+
toInt(str) {
|
|
3976
|
+
return parseInt(str, 10);
|
|
3663
3977
|
}
|
|
3664
|
-
|
|
3665
|
-
|
|
3978
|
+
pad(num, padNum = 2) {
|
|
3979
|
+
const val = num !== undefined ? num.toString() : '';
|
|
3980
|
+
return val.length >= padNum ? val : new Array(padNum - val.length + 1).join('0') + val;
|
|
3666
3981
|
}
|
|
3667
|
-
|
|
3668
|
-
|
|
3982
|
+
static ɵfac = function DatePipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || DatePipe)(i0.ɵɵdirectiveInject(FormatTranslatorService, 16)); };
|
|
3983
|
+
static ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "ccdDate", type: DatePipe, pure: true, standalone: false });
|
|
3984
|
+
}
|
|
3985
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DatePipe, [{
|
|
3986
|
+
type: Pipe,
|
|
3987
|
+
args: [{
|
|
3988
|
+
name: 'ccdDate',
|
|
3989
|
+
standalone: false
|
|
3990
|
+
}]
|
|
3991
|
+
}], () => [{ type: FormatTranslatorService }], null); })();
|
|
3992
|
+
|
|
3993
|
+
class FieldLabelPipe {
|
|
3994
|
+
rpxTranslationPipe;
|
|
3995
|
+
constructor(rpxTranslationPipe) {
|
|
3996
|
+
this.rpxTranslationPipe = rpxTranslationPipe;
|
|
3669
3997
|
}
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
return false;
|
|
3998
|
+
transform(field) {
|
|
3999
|
+
if (!field || !field.label) {
|
|
4000
|
+
return '';
|
|
3674
4001
|
}
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
isCaseLink() {
|
|
3678
|
-
return this.isComplex()
|
|
3679
|
-
&& this.field_type.id === 'CaseLink'
|
|
3680
|
-
&& this.field_type.complex_fields.some(cf => cf.id === 'CaseReference');
|
|
3681
|
-
}
|
|
3682
|
-
extractBracketValue(fmt, paramName, leftBracket = '(', rightBracket = ')') {
|
|
3683
|
-
fmt = fmt.split(',')
|
|
3684
|
-
.find(a => a.trim().startsWith(paramName));
|
|
3685
|
-
if (fmt) {
|
|
3686
|
-
const s = fmt.indexOf(leftBracket) + 1;
|
|
3687
|
-
const e = fmt.indexOf(rightBracket, s);
|
|
3688
|
-
if (e > s && s >= 0) {
|
|
3689
|
-
return fmt.substr(s, (e - s));
|
|
3690
|
-
}
|
|
4002
|
+
else if (!field.display_context) {
|
|
4003
|
+
return this.getTranslatedLabel(field);
|
|
3691
4004
|
}
|
|
3692
|
-
return
|
|
4005
|
+
return this.getTranslatedLabel(field) + (field.display_context.toUpperCase() === 'OPTIONAL' ?
|
|
4006
|
+
' (' + this.rpxTranslationPipe.transform('Optional') + ')' : '');
|
|
3693
4007
|
}
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
if (prefix.length < 1024) {
|
|
3698
|
-
if (this.parent) {
|
|
3699
|
-
return this.parent.getHierachicalId(prefix + this.id);
|
|
3700
|
-
}
|
|
3701
|
-
else {
|
|
3702
|
-
return prefix + this.id;
|
|
3703
|
-
}
|
|
4008
|
+
getTranslatedLabel(field) {
|
|
4009
|
+
if (!field.isTranslated) {
|
|
4010
|
+
return this.rpxTranslationPipe.transform(field.label);
|
|
3704
4011
|
}
|
|
3705
4012
|
else {
|
|
3706
|
-
|
|
3707
|
-
return this.id;
|
|
4013
|
+
return field.label;
|
|
3708
4014
|
}
|
|
3709
4015
|
}
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
}
|
|
3713
|
-
get isTranslated() {
|
|
3714
|
-
return this.isTranslatedFlag;
|
|
3715
|
-
}
|
|
3716
|
-
}
|
|
3717
|
-
__decorate([
|
|
3718
|
-
Exclude(),
|
|
3719
|
-
__metadata("design:type", CaseField)
|
|
3720
|
-
], CaseField.prototype, "parent", void 0);
|
|
3721
|
-
__decorate([
|
|
3722
|
-
Type(() => FieldType),
|
|
3723
|
-
__metadata("design:type", FieldType)
|
|
3724
|
-
], CaseField.prototype, "field_type", void 0);
|
|
3725
|
-
__decorate([
|
|
3726
|
-
Type(() => WizardPageField),
|
|
3727
|
-
__metadata("design:type", WizardPageField)
|
|
3728
|
-
], CaseField.prototype, "wizardProps", void 0);
|
|
3729
|
-
__decorate([
|
|
3730
|
-
Expose(),
|
|
3731
|
-
__metadata("design:type", Object),
|
|
3732
|
-
__metadata("design:paramtypes", [Object])
|
|
3733
|
-
], CaseField.prototype, "value", null);
|
|
3734
|
-
__decorate([
|
|
3735
|
-
Expose(),
|
|
3736
|
-
__metadata("design:type", Object),
|
|
3737
|
-
__metadata("design:paramtypes", [Object])
|
|
3738
|
-
], CaseField.prototype, "list_items", null);
|
|
3739
|
-
__decorate([
|
|
3740
|
-
Expose(),
|
|
3741
|
-
__metadata("design:type", String),
|
|
3742
|
-
__metadata("design:paramtypes", [])
|
|
3743
|
-
], CaseField.prototype, "dateTimeEntryFormat", null);
|
|
3744
|
-
__decorate([
|
|
3745
|
-
Expose(),
|
|
3746
|
-
__metadata("design:type", String),
|
|
3747
|
-
__metadata("design:paramtypes", [])
|
|
3748
|
-
], CaseField.prototype, "dateTimeDisplayFormat", null);
|
|
3749
|
-
__decorate([
|
|
3750
|
-
Expose(),
|
|
3751
|
-
__metadata("design:type", Function),
|
|
3752
|
-
__metadata("design:paramtypes", []),
|
|
3753
|
-
__metadata("design:returntype", void 0)
|
|
3754
|
-
], CaseField.prototype, "isComplexDisplay", null);
|
|
3755
|
-
__decorate([
|
|
3756
|
-
Expose(),
|
|
3757
|
-
__metadata("design:type", Function),
|
|
3758
|
-
__metadata("design:paramtypes", []),
|
|
3759
|
-
__metadata("design:returntype", void 0)
|
|
3760
|
-
], CaseField.prototype, "isComplexEntry", null);
|
|
3761
|
-
__decorate([
|
|
3762
|
-
Expose(),
|
|
3763
|
-
__metadata("design:type", Function),
|
|
3764
|
-
__metadata("design:paramtypes", []),
|
|
3765
|
-
__metadata("design:returntype", void 0)
|
|
3766
|
-
], CaseField.prototype, "isReadonly", null);
|
|
3767
|
-
__decorate([
|
|
3768
|
-
Expose(),
|
|
3769
|
-
__metadata("design:type", Function),
|
|
3770
|
-
__metadata("design:paramtypes", []),
|
|
3771
|
-
__metadata("design:returntype", void 0)
|
|
3772
|
-
], CaseField.prototype, "isOptional", null);
|
|
3773
|
-
__decorate([
|
|
3774
|
-
Expose(),
|
|
3775
|
-
__metadata("design:type", Function),
|
|
3776
|
-
__metadata("design:paramtypes", []),
|
|
3777
|
-
__metadata("design:returntype", void 0)
|
|
3778
|
-
], CaseField.prototype, "isMandatory", null);
|
|
3779
|
-
__decorate([
|
|
3780
|
-
Expose(),
|
|
3781
|
-
__metadata("design:type", Function),
|
|
3782
|
-
__metadata("design:paramtypes", []),
|
|
3783
|
-
__metadata("design:returntype", Boolean)
|
|
3784
|
-
], CaseField.prototype, "isCollection", null);
|
|
3785
|
-
__decorate([
|
|
3786
|
-
Expose(),
|
|
3787
|
-
__metadata("design:type", Function),
|
|
3788
|
-
__metadata("design:paramtypes", []),
|
|
3789
|
-
__metadata("design:returntype", Boolean)
|
|
3790
|
-
], CaseField.prototype, "isComplex", null);
|
|
3791
|
-
__decorate([
|
|
3792
|
-
Expose(),
|
|
3793
|
-
__metadata("design:type", Function),
|
|
3794
|
-
__metadata("design:paramtypes", []),
|
|
3795
|
-
__metadata("design:returntype", Boolean)
|
|
3796
|
-
], CaseField.prototype, "isDynamic", null);
|
|
3797
|
-
__decorate([
|
|
3798
|
-
Expose(),
|
|
3799
|
-
__metadata("design:type", Function),
|
|
3800
|
-
__metadata("design:paramtypes", []),
|
|
3801
|
-
__metadata("design:returntype", Boolean)
|
|
3802
|
-
], CaseField.prototype, "isCaseLink", null);
|
|
3803
|
-
__decorate([
|
|
3804
|
-
Expose(),
|
|
3805
|
-
__metadata("design:type", Function),
|
|
3806
|
-
__metadata("design:paramtypes", [String]),
|
|
3807
|
-
__metadata("design:returntype", String)
|
|
3808
|
-
], CaseField.prototype, "getHierachicalId", null);
|
|
3809
|
-
|
|
3810
|
-
// @dynamic
|
|
3811
|
-
class WizardPage {
|
|
3812
|
-
id;
|
|
3813
|
-
label;
|
|
3814
|
-
order;
|
|
3815
|
-
wizard_page_fields;
|
|
3816
|
-
case_fields;
|
|
3817
|
-
show_condition;
|
|
3818
|
-
parsedShowCondition;
|
|
3819
|
-
getCol1Fields() {
|
|
3820
|
-
return this.case_fields?.filter(f => !f.wizardProps.page_column_no || f.wizardProps.page_column_no === 1);
|
|
3821
|
-
}
|
|
3822
|
-
getCol2Fields() {
|
|
3823
|
-
return this.case_fields?.filter(f => f.wizardProps.page_column_no === 2);
|
|
3824
|
-
}
|
|
3825
|
-
isMultiColumn() {
|
|
3826
|
-
return this.getCol2Fields()?.length > 0;
|
|
4016
|
+
getOriginalLabelForYesNoTranslation(field) {
|
|
4017
|
+
return field.originalLabel || field.label;
|
|
3827
4018
|
}
|
|
4019
|
+
static ɵfac = function FieldLabelPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || FieldLabelPipe)(i0.ɵɵdirectiveInject(i1.RpxTranslatePipe, 16)); };
|
|
4020
|
+
static ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "ccdFieldLabel", type: FieldLabelPipe, pure: false, standalone: false });
|
|
3828
4021
|
}
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
],
|
|
4022
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FieldLabelPipe, [{
|
|
4023
|
+
type: Pipe,
|
|
4024
|
+
args: [{
|
|
4025
|
+
name: 'ccdFieldLabel',
|
|
4026
|
+
pure: false,
|
|
4027
|
+
standalone: false
|
|
4028
|
+
}]
|
|
4029
|
+
}], () => [{ type: i1.RpxTranslatePipe }], null); })();
|
|
3837
4030
|
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
wizard_pages;
|
|
3847
|
-
show_summary;
|
|
3848
|
-
show_event_notes;
|
|
3849
|
-
end_button_label;
|
|
3850
|
-
can_save_draft;
|
|
3851
|
-
hasFields() {
|
|
3852
|
-
return this.case_fields && this.case_fields.length !== 0;
|
|
3853
|
-
}
|
|
3854
|
-
hasPages() {
|
|
3855
|
-
return this.wizard_pages && this.wizard_pages.length !== 0;
|
|
4031
|
+
class FirstErrorPipe {
|
|
4032
|
+
rpxTranslationService;
|
|
4033
|
+
injector;
|
|
4034
|
+
asyncPipe;
|
|
4035
|
+
constructor(rpxTranslationService, injector) {
|
|
4036
|
+
this.rpxTranslationService = rpxTranslationService;
|
|
4037
|
+
this.injector = injector;
|
|
4038
|
+
this.asyncPipe = new AsyncPipe(this.injector.get(ChangeDetectorRef));
|
|
3856
4039
|
}
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
__metadata("design:type", Array)
|
|
3861
|
-
], CaseEventTrigger.prototype, "case_fields", void 0);
|
|
3862
|
-
__decorate([
|
|
3863
|
-
Type(() => WizardPage),
|
|
3864
|
-
__metadata("design:type", Array)
|
|
3865
|
-
], CaseEventTrigger.prototype, "wizard_pages", void 0);
|
|
3866
|
-
|
|
3867
|
-
// tslint:disable:variable-name
|
|
3868
|
-
class CaseViewEvent {
|
|
3869
|
-
id;
|
|
3870
|
-
timestamp;
|
|
3871
|
-
summary;
|
|
3872
|
-
comment;
|
|
3873
|
-
event_id;
|
|
3874
|
-
event_name;
|
|
3875
|
-
state_id;
|
|
3876
|
-
state_name;
|
|
3877
|
-
user_id;
|
|
3878
|
-
user_last_name;
|
|
3879
|
-
user_first_name;
|
|
3880
|
-
significant_item;
|
|
3881
|
-
}
|
|
3882
|
-
|
|
3883
|
-
class CaseViewTrigger {
|
|
3884
|
-
id;
|
|
3885
|
-
name;
|
|
3886
|
-
description;
|
|
3887
|
-
order;
|
|
3888
|
-
}
|
|
3889
|
-
|
|
3890
|
-
class CaseEvent {
|
|
3891
|
-
id;
|
|
3892
|
-
name;
|
|
3893
|
-
post_state;
|
|
3894
|
-
pre_states;
|
|
3895
|
-
case_fields;
|
|
3896
|
-
description;
|
|
3897
|
-
order;
|
|
3898
|
-
acls;
|
|
3899
|
-
}
|
|
3900
|
-
|
|
3901
|
-
class CaseState {
|
|
3902
|
-
id;
|
|
3903
|
-
name;
|
|
3904
|
-
description;
|
|
3905
|
-
order;
|
|
3906
|
-
}
|
|
3907
|
-
|
|
3908
|
-
// Light clone of CaseType to be used in Jurisdiction class
|
|
3909
|
-
// to avoid cyclic dependency
|
|
3910
|
-
class CaseTypeLite {
|
|
3911
|
-
id;
|
|
3912
|
-
name;
|
|
3913
|
-
events;
|
|
3914
|
-
states;
|
|
3915
|
-
description;
|
|
3916
|
-
}
|
|
3917
|
-
|
|
3918
|
-
// @dynamics
|
|
3919
|
-
class CaseType {
|
|
3920
|
-
id;
|
|
3921
|
-
name;
|
|
3922
|
-
events;
|
|
3923
|
-
states;
|
|
3924
|
-
case_fields;
|
|
3925
|
-
description;
|
|
3926
|
-
jurisdiction;
|
|
3927
|
-
printEnabled;
|
|
3928
|
-
}
|
|
3929
|
-
__decorate([
|
|
3930
|
-
Type(() => CaseField),
|
|
3931
|
-
__metadata("design:type", Array)
|
|
3932
|
-
], CaseType.prototype, "case_fields", void 0);
|
|
3933
|
-
|
|
3934
|
-
// tslint:disable:variable-name
|
|
3935
|
-
class EventCaseField {
|
|
3936
|
-
case_field_id;
|
|
3937
|
-
showCondition;
|
|
3938
|
-
}
|
|
3939
|
-
|
|
3940
|
-
class Jurisdiction {
|
|
3941
|
-
id;
|
|
3942
|
-
name;
|
|
3943
|
-
description;
|
|
3944
|
-
caseTypes;
|
|
3945
|
-
currentCaseType;
|
|
3946
|
-
}
|
|
3947
|
-
|
|
3948
|
-
class Banner {
|
|
3949
|
-
bannerDescription;
|
|
3950
|
-
bannerUrlText;
|
|
3951
|
-
bannerUrl;
|
|
3952
|
-
bannerViewed;
|
|
3953
|
-
bannerEnabled;
|
|
3954
|
-
}
|
|
3955
|
-
|
|
3956
|
-
// @dynamic
|
|
3957
|
-
class CaseTab {
|
|
3958
|
-
id;
|
|
3959
|
-
label;
|
|
3960
|
-
order;
|
|
3961
|
-
fields;
|
|
3962
|
-
show_condition;
|
|
3963
|
-
}
|
|
3964
|
-
__decorate([
|
|
3965
|
-
Type(() => CaseField),
|
|
3966
|
-
__metadata("design:type", Array)
|
|
3967
|
-
], CaseTab.prototype, "fields", void 0);
|
|
3968
|
-
|
|
3969
|
-
// @dynamic
|
|
3970
|
-
class CaseView {
|
|
3971
|
-
case_id;
|
|
3972
|
-
case_type;
|
|
3973
|
-
state;
|
|
3974
|
-
channels;
|
|
3975
|
-
tabs;
|
|
3976
|
-
triggers;
|
|
3977
|
-
events;
|
|
3978
|
-
metadataFields;
|
|
3979
|
-
basicFields;
|
|
3980
|
-
case_flag;
|
|
3981
|
-
}
|
|
3982
|
-
__decorate([
|
|
3983
|
-
Type(() => CaseTab),
|
|
3984
|
-
__metadata("design:type", Array)
|
|
3985
|
-
], CaseView.prototype, "tabs", void 0);
|
|
3986
|
-
__decorate([
|
|
3987
|
-
Type(() => CaseField),
|
|
3988
|
-
__metadata("design:type", Array)
|
|
3989
|
-
], CaseView.prototype, "metadataFields", void 0);
|
|
3990
|
-
|
|
3991
|
-
class CasePrintDocument {
|
|
3992
|
-
name;
|
|
3993
|
-
type;
|
|
3994
|
-
url;
|
|
3995
|
-
}
|
|
3996
|
-
|
|
3997
|
-
// tslint:disable:variable-name
|
|
3998
|
-
class HRef {
|
|
3999
|
-
href;
|
|
4000
|
-
}
|
|
4001
|
-
class DocumentLinks {
|
|
4002
|
-
self;
|
|
4003
|
-
binary;
|
|
4004
|
-
}
|
|
4005
|
-
class Document {
|
|
4006
|
-
_links;
|
|
4007
|
-
originalDocumentName;
|
|
4008
|
-
hashToken;
|
|
4009
|
-
}
|
|
4010
|
-
class Embedded {
|
|
4011
|
-
documents;
|
|
4012
|
-
}
|
|
4013
|
-
class DocumentData {
|
|
4014
|
-
_embedded;
|
|
4015
|
-
documents;
|
|
4016
|
-
}
|
|
4017
|
-
class FormDocument {
|
|
4018
|
-
document_url;
|
|
4019
|
-
document_binary_url;
|
|
4020
|
-
document_filename;
|
|
4021
|
-
document_hash;
|
|
4022
|
-
upload_timestamp;
|
|
4023
|
-
}
|
|
4024
|
-
|
|
4025
|
-
class OrganisationConverter {
|
|
4026
|
-
static toSimpleAddress(organisationModel) {
|
|
4027
|
-
let simpleAddress = '';
|
|
4028
|
-
if (organisationModel.addressLine1) {
|
|
4029
|
-
simpleAddress += `${organisationModel.addressLine1}<br>`;
|
|
4040
|
+
transform(value, args) {
|
|
4041
|
+
if (!value) {
|
|
4042
|
+
return '';
|
|
4030
4043
|
}
|
|
4031
|
-
if (
|
|
4032
|
-
|
|
4044
|
+
if (!args) {
|
|
4045
|
+
args = 'Field';
|
|
4033
4046
|
}
|
|
4034
|
-
|
|
4035
|
-
|
|
4047
|
+
const keys = Object.keys(value);
|
|
4048
|
+
if (!keys.length) {
|
|
4049
|
+
return '';
|
|
4036
4050
|
}
|
|
4037
|
-
|
|
4038
|
-
|
|
4051
|
+
let errorMessage;
|
|
4052
|
+
if (keys[0] === 'required') {
|
|
4053
|
+
errorMessage = '%FIELDLABEL% is required';
|
|
4039
4054
|
}
|
|
4040
|
-
if (
|
|
4041
|
-
|
|
4055
|
+
else if (keys[0] === 'pattern') {
|
|
4056
|
+
errorMessage = 'The data entered is not valid for %FIELDLABEL%';
|
|
4042
4057
|
}
|
|
4043
|
-
if (
|
|
4044
|
-
|
|
4058
|
+
else if (keys[0] === 'markDownPattern') {
|
|
4059
|
+
errorMessage = 'The data entered is not valid for %FIELDLABEL%. Link mark up characters are not allowed in this field';
|
|
4060
|
+
}
|
|
4061
|
+
else if (keys[0] === 'unsafeRichText') {
|
|
4062
|
+
errorMessage = 'The data entered is not valid for %FIELDLABEL%. Potentially unsafe HTML content is not allowed in this field';
|
|
4063
|
+
}
|
|
4064
|
+
else if (keys[0] === 'minlength') {
|
|
4065
|
+
errorMessage = '%FIELDLABEL% is below the minimum length';
|
|
4066
|
+
}
|
|
4067
|
+
else if (keys[0] === 'maxlength') {
|
|
4068
|
+
errorMessage = '%FIELDLABEL% exceeds the maximum length';
|
|
4069
|
+
}
|
|
4070
|
+
else if (value.hasOwnProperty('matDatetimePickerParse')) {
|
|
4071
|
+
errorMessage = 'The date entered is not valid. Please provide a valid date';
|
|
4072
|
+
}
|
|
4073
|
+
else {
|
|
4074
|
+
errorMessage = value[keys[0]];
|
|
4075
|
+
}
|
|
4076
|
+
const o = this.rpxTranslationService.getTranslation$(args).pipe(switchMap(fieldLabel => this.rpxTranslationService.getTranslationWithReplacements$(errorMessage, { FIELDLABEL: fieldLabel })));
|
|
4077
|
+
return this.asyncPipe.transform(o);
|
|
4078
|
+
}
|
|
4079
|
+
ngOnDestroy() {
|
|
4080
|
+
this.asyncPipe.ngOnDestroy();
|
|
4081
|
+
}
|
|
4082
|
+
static ɵfac = function FirstErrorPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || FirstErrorPipe)(i0.ɵɵdirectiveInject(i1.RpxTranslationService, 16), i0.ɵɵdirectiveInject(i0.Injector, 16)); };
|
|
4083
|
+
static ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "ccdFirstError", type: FirstErrorPipe, pure: false, standalone: false });
|
|
4084
|
+
}
|
|
4085
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FirstErrorPipe, [{
|
|
4086
|
+
type: Pipe,
|
|
4087
|
+
args: [{
|
|
4088
|
+
name: 'ccdFirstError',
|
|
4089
|
+
pure: false,
|
|
4090
|
+
standalone: false
|
|
4091
|
+
}]
|
|
4092
|
+
}], () => [{ type: i1.RpxTranslationService }, { type: i0.Injector }], null); })();
|
|
4093
|
+
|
|
4094
|
+
class IsCompoundPipe {
|
|
4095
|
+
static COMPOUND_TYPES = [
|
|
4096
|
+
'Complex',
|
|
4097
|
+
'Label',
|
|
4098
|
+
'AddressGlobal',
|
|
4099
|
+
'AddressUK',
|
|
4100
|
+
'AddressGlobalUK',
|
|
4101
|
+
'CasePaymentHistoryViewer',
|
|
4102
|
+
'CaseHistoryViewer',
|
|
4103
|
+
'Organisation',
|
|
4104
|
+
'WaysToPay',
|
|
4105
|
+
'ComponentLauncher',
|
|
4106
|
+
'FlagLauncher',
|
|
4107
|
+
'CaseFlag'
|
|
4108
|
+
];
|
|
4109
|
+
static EXCLUDE = [
|
|
4110
|
+
'CaseLink',
|
|
4111
|
+
'JudicialUser'
|
|
4112
|
+
];
|
|
4113
|
+
transform(field) {
|
|
4114
|
+
if (!field || !field.field_type || !field.field_type.type) {
|
|
4115
|
+
return false;
|
|
4045
4116
|
}
|
|
4046
|
-
if (
|
|
4047
|
-
|
|
4117
|
+
if (IsCompoundPipe.COMPOUND_TYPES.indexOf(field.field_type.type) !== -1) {
|
|
4118
|
+
if (IsCompoundPipe.EXCLUDE.indexOf(field.field_type.id) !== -1) {
|
|
4119
|
+
return false;
|
|
4120
|
+
}
|
|
4121
|
+
return true;
|
|
4048
4122
|
}
|
|
4049
|
-
return
|
|
4050
|
-
}
|
|
4051
|
-
toSimpleOrganisationModel(organisationModel) {
|
|
4052
|
-
return {
|
|
4053
|
-
organisationIdentifier: organisationModel.organisationIdentifier,
|
|
4054
|
-
name: organisationModel.name,
|
|
4055
|
-
address: OrganisationConverter.toSimpleAddress(organisationModel)
|
|
4056
|
-
};
|
|
4123
|
+
return false;
|
|
4057
4124
|
}
|
|
4058
|
-
static ɵfac = function
|
|
4059
|
-
static
|
|
4125
|
+
static ɵfac = function IsCompoundPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || IsCompoundPipe)(); };
|
|
4126
|
+
static ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "ccdIsCompound", type: IsCompoundPipe, pure: true, standalone: false });
|
|
4060
4127
|
}
|
|
4061
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(
|
|
4062
|
-
type:
|
|
4128
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(IsCompoundPipe, [{
|
|
4129
|
+
type: Pipe,
|
|
4130
|
+
args: [{
|
|
4131
|
+
name: 'ccdIsCompound',
|
|
4132
|
+
standalone: false
|
|
4133
|
+
}]
|
|
4063
4134
|
}], null, null); })();
|
|
4064
4135
|
|
|
4065
|
-
class
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
if (profile.user && profile.user.idam && Array.isArray(profile.user.idam.roles)) {
|
|
4072
|
-
return profile.user.idam.roles.length > 0;
|
|
4136
|
+
class CaseFieldService {
|
|
4137
|
+
isOptional(field) {
|
|
4138
|
+
if (!field || !field.display_context) {
|
|
4139
|
+
return false;
|
|
4140
|
+
}
|
|
4141
|
+
return field.display_context.toUpperCase() === 'OPTIONAL';
|
|
4073
4142
|
}
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
class Profile {
|
|
4078
|
-
user;
|
|
4079
|
-
channels;
|
|
4080
|
-
jurisdictions;
|
|
4081
|
-
default;
|
|
4082
|
-
isSolicitor() {
|
|
4083
|
-
if (hasRoles(this)) {
|
|
4084
|
-
return this.user.idam.roles.find(r => r.endsWith('-solicitor')) !== undefined;
|
|
4143
|
+
isReadOnly(field) {
|
|
4144
|
+
if (!field || !field.display_context) {
|
|
4145
|
+
return false;
|
|
4085
4146
|
}
|
|
4086
|
-
return
|
|
4147
|
+
return field.display_context.toUpperCase() === 'READONLY';
|
|
4087
4148
|
}
|
|
4088
|
-
|
|
4089
|
-
if (
|
|
4090
|
-
return
|
|
4149
|
+
isMandatory(field) {
|
|
4150
|
+
if (!field || !field.display_context) {
|
|
4151
|
+
return false;
|
|
4091
4152
|
}
|
|
4092
|
-
return
|
|
4153
|
+
return field.display_context.toUpperCase() === 'MANDATORY';
|
|
4093
4154
|
}
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
class Field {
|
|
4101
|
-
id;
|
|
4102
|
-
field_type;
|
|
4103
|
-
elementPath;
|
|
4104
|
-
value;
|
|
4105
|
-
label;
|
|
4106
|
-
metadata;
|
|
4107
|
-
constructor(id, field_type, elementPath, value, label, metadata) {
|
|
4108
|
-
this.id = id;
|
|
4109
|
-
this.field_type = field_type;
|
|
4110
|
-
this.elementPath = elementPath;
|
|
4111
|
-
this.value = value;
|
|
4112
|
-
this.label = label;
|
|
4113
|
-
this.metadata = metadata;
|
|
4155
|
+
isLabel(field) {
|
|
4156
|
+
if (!field || !field.field_type) {
|
|
4157
|
+
return false;
|
|
4158
|
+
}
|
|
4159
|
+
return field.field_type.type === 'Label';
|
|
4114
4160
|
}
|
|
4161
|
+
static ɵfac = function CaseFieldService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaseFieldService)(); };
|
|
4162
|
+
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: CaseFieldService, factory: CaseFieldService.ɵfac });
|
|
4115
4163
|
}
|
|
4164
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFieldService, [{
|
|
4165
|
+
type: Injectable
|
|
4166
|
+
}], null, null); })();
|
|
4116
4167
|
|
|
4117
|
-
class
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
}
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
class SearchResultViewItem {
|
|
4128
|
-
case_id;
|
|
4129
|
-
case_fields;
|
|
4130
|
-
hydrated_case_fields;
|
|
4131
|
-
columns;
|
|
4132
|
-
supplementary_data;
|
|
4133
|
-
display_context_parameter;
|
|
4168
|
+
class IsMandatoryPipe {
|
|
4169
|
+
caseFieldService;
|
|
4170
|
+
constructor(caseFieldService) {
|
|
4171
|
+
this.caseFieldService = caseFieldService;
|
|
4172
|
+
}
|
|
4173
|
+
transform(field) {
|
|
4174
|
+
return this.caseFieldService.isMandatory(field);
|
|
4175
|
+
}
|
|
4176
|
+
static ɵfac = function IsMandatoryPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || IsMandatoryPipe)(i0.ɵɵdirectiveInject(CaseFieldService, 16)); };
|
|
4177
|
+
static ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "ccdIsMandatory", type: IsMandatoryPipe, pure: true, standalone: false });
|
|
4134
4178
|
}
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4179
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(IsMandatoryPipe, [{
|
|
4180
|
+
type: Pipe,
|
|
4181
|
+
args: [{
|
|
4182
|
+
name: 'ccdIsMandatory',
|
|
4183
|
+
standalone: false
|
|
4184
|
+
}]
|
|
4185
|
+
}], () => [{ type: CaseFieldService }], null); })();
|
|
4139
4186
|
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
return this.
|
|
4147
|
-
&& this.results[0].case_id
|
|
4148
|
-
&& Draft.isDraft(this.results[0].case_id);
|
|
4187
|
+
class IsReadOnlyPipe {
|
|
4188
|
+
caseFieldService;
|
|
4189
|
+
constructor(caseFieldService) {
|
|
4190
|
+
this.caseFieldService = caseFieldService;
|
|
4191
|
+
}
|
|
4192
|
+
transform(field) {
|
|
4193
|
+
return this.caseFieldService.isReadOnly(field);
|
|
4149
4194
|
}
|
|
4195
|
+
static ɵfac = function IsReadOnlyPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || IsReadOnlyPipe)(i0.ɵɵdirectiveInject(CaseFieldService, 16)); };
|
|
4196
|
+
static ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "ccdIsReadOnly", type: IsReadOnlyPipe, pure: true, standalone: false });
|
|
4150
4197
|
}
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
], SearchResultView.prototype, "results", void 0);
|
|
4198
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(IsReadOnlyPipe, [{
|
|
4199
|
+
type: Pipe,
|
|
4200
|
+
args: [{
|
|
4201
|
+
name: 'ccdIsReadOnly',
|
|
4202
|
+
standalone: false
|
|
4203
|
+
}]
|
|
4204
|
+
}], () => [{ type: CaseFieldService }], null); })();
|
|
4159
4205
|
|
|
4160
|
-
class
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4206
|
+
class IsReadOnlyAndNotCollectionPipe {
|
|
4207
|
+
caseFieldService;
|
|
4208
|
+
constructor(caseFieldService) {
|
|
4209
|
+
this.caseFieldService = caseFieldService;
|
|
4210
|
+
}
|
|
4211
|
+
transform(field) {
|
|
4212
|
+
if (!field || !field.field_type || !field.field_type.type) {
|
|
4213
|
+
return false;
|
|
4214
|
+
}
|
|
4215
|
+
if (this.isCollection(field)) {
|
|
4216
|
+
return false;
|
|
4217
|
+
}
|
|
4218
|
+
return this.caseFieldService.isReadOnly(field);
|
|
4166
4219
|
}
|
|
4220
|
+
// CaseField @Expose() doesn't work with the pipe in here, so leaving the manual check
|
|
4221
|
+
isCollection(field) {
|
|
4222
|
+
return field.field_type && field.field_type.type === 'Collection';
|
|
4223
|
+
}
|
|
4224
|
+
static ɵfac = function IsReadOnlyAndNotCollectionPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || IsReadOnlyAndNotCollectionPipe)(i0.ɵɵdirectiveInject(CaseFieldService, 16)); };
|
|
4225
|
+
static ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "ccdIsReadOnlyAndNotCollection", type: IsReadOnlyAndNotCollectionPipe, pure: true, standalone: false });
|
|
4167
4226
|
}
|
|
4227
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(IsReadOnlyAndNotCollectionPipe, [{
|
|
4228
|
+
type: Pipe,
|
|
4229
|
+
args: [{
|
|
4230
|
+
name: 'ccdIsReadOnlyAndNotCollection',
|
|
4231
|
+
standalone: false
|
|
4232
|
+
}]
|
|
4233
|
+
}], () => [{ type: CaseFieldService }], null); })();
|
|
4168
4234
|
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
label;
|
|
4178
|
-
order;
|
|
4179
|
-
field;
|
|
4180
|
-
metadata;
|
|
4181
|
-
display_context_parameter;
|
|
4182
|
-
}
|
|
4183
|
-
class WorkbasketInput {
|
|
4184
|
-
workbasketInputs;
|
|
4235
|
+
class PaletteUtilsModule {
|
|
4236
|
+
static ɵfac = function PaletteUtilsModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PaletteUtilsModule)(); };
|
|
4237
|
+
static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: PaletteUtilsModule });
|
|
4238
|
+
static ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ providers: [
|
|
4239
|
+
IsCompoundPipe,
|
|
4240
|
+
RpxTranslatePipe
|
|
4241
|
+
], imports: [CommonModule,
|
|
4242
|
+
RpxTranslationModule.forChild()] });
|
|
4185
4243
|
}
|
|
4244
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaletteUtilsModule, [{
|
|
4245
|
+
type: NgModule,
|
|
4246
|
+
args: [{
|
|
4247
|
+
imports: [
|
|
4248
|
+
CommonModule,
|
|
4249
|
+
RpxTranslationModule.forChild()
|
|
4250
|
+
],
|
|
4251
|
+
declarations: [
|
|
4252
|
+
DatePipe,
|
|
4253
|
+
FieldLabelPipe,
|
|
4254
|
+
FirstErrorPipe,
|
|
4255
|
+
IsCompoundPipe,
|
|
4256
|
+
IsMandatoryPipe,
|
|
4257
|
+
IsReadOnlyPipe,
|
|
4258
|
+
IsReadOnlyAndNotCollectionPipe,
|
|
4259
|
+
DashPipe
|
|
4260
|
+
],
|
|
4261
|
+
exports: [
|
|
4262
|
+
DatePipe,
|
|
4263
|
+
FieldLabelPipe,
|
|
4264
|
+
FirstErrorPipe,
|
|
4265
|
+
IsCompoundPipe,
|
|
4266
|
+
IsMandatoryPipe,
|
|
4267
|
+
IsReadOnlyPipe,
|
|
4268
|
+
IsReadOnlyAndNotCollectionPipe,
|
|
4269
|
+
DashPipe
|
|
4270
|
+
],
|
|
4271
|
+
providers: [
|
|
4272
|
+
IsCompoundPipe,
|
|
4273
|
+
RpxTranslatePipe
|
|
4274
|
+
]
|
|
4275
|
+
}]
|
|
4276
|
+
}], null, null); })();
|
|
4277
|
+
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(PaletteUtilsModule, { declarations: [DatePipe,
|
|
4278
|
+
FieldLabelPipe,
|
|
4279
|
+
FirstErrorPipe,
|
|
4280
|
+
IsCompoundPipe,
|
|
4281
|
+
IsMandatoryPipe,
|
|
4282
|
+
IsReadOnlyPipe,
|
|
4283
|
+
IsReadOnlyAndNotCollectionPipe,
|
|
4284
|
+
DashPipe], imports: [CommonModule, i1.RpxTranslationModule], exports: [DatePipe,
|
|
4285
|
+
FieldLabelPipe,
|
|
4286
|
+
FirstErrorPipe,
|
|
4287
|
+
IsCompoundPipe,
|
|
4288
|
+
IsMandatoryPipe,
|
|
4289
|
+
IsReadOnlyPipe,
|
|
4290
|
+
IsReadOnlyAndNotCollectionPipe,
|
|
4291
|
+
DashPipe] }); })();
|
|
4186
4292
|
|
|
4187
4293
|
// @dynamic
|
|
4188
4294
|
class FieldsUtils {
|
|
@@ -9554,76 +9660,6 @@ class BrowserService {
|
|
|
9554
9660
|
}], null, null); })();
|
|
9555
9661
|
|
|
9556
9662
|
class CaseAccessUtils {
|
|
9557
|
-
// User role mapping
|
|
9558
|
-
static JUDGE_ROLE = 'judge';
|
|
9559
|
-
static JUDGE_ROLE_CATEGORY = 'JUDICIAL';
|
|
9560
|
-
static JUDGE_ROLE_NAME = 'judiciary';
|
|
9561
|
-
static ADMIN_ROLE = 'admin';
|
|
9562
|
-
static ADMIN_ROLE_CATEGORY = 'ADMIN';
|
|
9563
|
-
static ADMIN_ROLE_NAME = 'admin';
|
|
9564
|
-
static PROFESSIONAL_ROLE = 'solicitor';
|
|
9565
|
-
static PROFESSIONAL_ROLE_CATEGORY = 'PROFESSIONAL';
|
|
9566
|
-
static PROFESSIONAL_ROLE_NAME = 'professional';
|
|
9567
|
-
static LEGAL_OPERATIONS_ROLE = 'caseworker';
|
|
9568
|
-
static LEGAL_OPERATIONS_ROLE_CATEGORY = 'LEGAL_OPERATIONS';
|
|
9569
|
-
static LEGAL_OPERATIONS_ROLE_NAME = 'legal-ops';
|
|
9570
|
-
static CITIZEN_ROLE = 'citizen';
|
|
9571
|
-
static CITIZEN_ROLE_CATEGORY = 'CITIZEN';
|
|
9572
|
-
static CITIZEN_ROLE_NAME = 'citizen';
|
|
9573
|
-
static CTSC_ROLE = 'ctsc';
|
|
9574
|
-
static CTSC_ROLE_CATEGORY = 'CTSC';
|
|
9575
|
-
static CTSC_ROLE_NAME = 'ctsc';
|
|
9576
|
-
// fallback purely if roleCategories is not available in
|
|
9577
|
-
getMappedRoleCategories(roles = []) {
|
|
9578
|
-
const roleKeywords = roles.join().split('-').join().split(',');
|
|
9579
|
-
const roleCategoryList = [];
|
|
9580
|
-
if (this.roleHasKeyword(CaseAccessUtils.JUDGE_ROLE, roleKeywords)) {
|
|
9581
|
-
roleCategoryList.push(CaseAccessUtils.JUDGE_ROLE_CATEGORY);
|
|
9582
|
-
}
|
|
9583
|
-
if (this.roleHasKeyword(CaseAccessUtils.PROFESSIONAL_ROLE, roleKeywords)) {
|
|
9584
|
-
roleCategoryList.push(CaseAccessUtils.PROFESSIONAL_ROLE_CATEGORY);
|
|
9585
|
-
}
|
|
9586
|
-
if (this.roleHasKeyword(CaseAccessUtils.CITIZEN_ROLE, roleKeywords)) {
|
|
9587
|
-
roleCategoryList.push(CaseAccessUtils.CITIZEN_ROLE_CATEGORY);
|
|
9588
|
-
}
|
|
9589
|
-
if (this.roleHasKeyword(CaseAccessUtils.ADMIN_ROLE, roleKeywords)) {
|
|
9590
|
-
roleCategoryList.push(CaseAccessUtils.ADMIN_ROLE_CATEGORY);
|
|
9591
|
-
}
|
|
9592
|
-
if (this.roleHasKeyword(CaseAccessUtils.CTSC_ROLE, roleKeywords)) {
|
|
9593
|
-
roleCategoryList.push(CaseAccessUtils.CTSC_ROLE_CATEGORY);
|
|
9594
|
-
}
|
|
9595
|
-
if (this.roleHasKeyword(CaseAccessUtils.LEGAL_OPERATIONS_ROLE, roleKeywords)) {
|
|
9596
|
-
roleCategoryList.push(CaseAccessUtils.LEGAL_OPERATIONS_ROLE_CATEGORY);
|
|
9597
|
-
}
|
|
9598
|
-
return roleCategoryList;
|
|
9599
|
-
}
|
|
9600
|
-
roleHasKeyword(keyword, roleWords) {
|
|
9601
|
-
return roleWords.includes(keyword);
|
|
9602
|
-
}
|
|
9603
|
-
getAMRoleName(accessType, aMRole) {
|
|
9604
|
-
let roleName = '';
|
|
9605
|
-
switch (aMRole) {
|
|
9606
|
-
case CaseAccessUtils.JUDGE_ROLE_CATEGORY:
|
|
9607
|
-
roleName = `${accessType}-access-${CaseAccessUtils.JUDGE_ROLE_NAME}`;
|
|
9608
|
-
break;
|
|
9609
|
-
case CaseAccessUtils.PROFESSIONAL_ROLE_CATEGORY:
|
|
9610
|
-
roleName = `${accessType}-access-${CaseAccessUtils.PROFESSIONAL_ROLE_NAME}`;
|
|
9611
|
-
break;
|
|
9612
|
-
case CaseAccessUtils.CITIZEN_ROLE_CATEGORY:
|
|
9613
|
-
roleName = `${accessType}-access-${CaseAccessUtils.CITIZEN_ROLE_NAME}`;
|
|
9614
|
-
break;
|
|
9615
|
-
case CaseAccessUtils.ADMIN_ROLE_CATEGORY:
|
|
9616
|
-
roleName = `${accessType}-access-${CaseAccessUtils.ADMIN_ROLE_NAME}`;
|
|
9617
|
-
break;
|
|
9618
|
-
case CaseAccessUtils.CTSC_ROLE_CATEGORY:
|
|
9619
|
-
roleName = `${accessType}-access-${CaseAccessUtils.CTSC_ROLE_NAME}`;
|
|
9620
|
-
break;
|
|
9621
|
-
default:
|
|
9622
|
-
roleName = `${accessType}-access-${CaseAccessUtils.LEGAL_OPERATIONS_ROLE_NAME}`;
|
|
9623
|
-
break;
|
|
9624
|
-
}
|
|
9625
|
-
return roleName;
|
|
9626
|
-
}
|
|
9627
9663
|
getAMPayload(assignerId, actorId, roleName, roleCategory, grantType, caseId, details, beginTime = null, endTime = null, isNew = false) {
|
|
9628
9664
|
const process = details.caseReference !== undefined ? 'challenged-access' : 'specific-access';
|
|
9629
9665
|
const payload = {
|
|
@@ -11492,9 +11528,9 @@ class CasesService {
|
|
|
11492
11528
|
}
|
|
11493
11529
|
// EXUI-4758 - getMappedRoleCategories no longer returns a single string, checks all roles to get the most likely roleCategory
|
|
11494
11530
|
// Unsure whether we should be using mapped role categories any more - should trust the roleCategories from userInfo if they exist
|
|
11495
|
-
const roleCategories = userInfo.roleCategories ||
|
|
11531
|
+
const roleCategories = userInfo.roleCategories || getMappedRoleCategories(userInfo.roles);
|
|
11496
11532
|
// If user has no role categories, default to LEGAL_OPERATIONS
|
|
11497
|
-
const roleName =
|
|
11533
|
+
const roleName = getAMRoleName('challenged', roleCategories?.length > 0 ? roleCategories[0] : RoleCategory.LEGAL_OPERATIONS);
|
|
11498
11534
|
const beginTime = new Date();
|
|
11499
11535
|
const endTime = new Date(new Date().setUTCHours(23, 59, 59, 999));
|
|
11500
11536
|
const id = userInfo.id ? userInfo.id : userInfo.uid;
|
|
@@ -11511,10 +11547,10 @@ class CasesService {
|
|
|
11511
11547
|
return throwError(() => new Error('User info not found in session storage'));
|
|
11512
11548
|
}
|
|
11513
11549
|
// EXUI-4758 - See above comment
|
|
11514
|
-
const roleCategories = userInfo.roleCategories ||
|
|
11550
|
+
const roleCategories = userInfo.roleCategories || getMappedRoleCategories(userInfo.roles);
|
|
11515
11551
|
// EXUI-4758 - Return first roleCategory as the roleCategory for now, unless not present, in which case default to LEGAL_OPERATIONS
|
|
11516
|
-
const roleCategory = roleCategories?.length > 0 ? roleCategories[0] :
|
|
11517
|
-
const roleName =
|
|
11552
|
+
const roleCategory = roleCategories?.length > 0 ? roleCategories[0] : RoleCategory.LEGAL_OPERATIONS;
|
|
11553
|
+
const roleName = getAMRoleName('specific', roleCategory);
|
|
11518
11554
|
const id = userInfo.id ? userInfo.id : userInfo.uid;
|
|
11519
11555
|
const payload = camUtils.getAMPayload(null, id, roleName, roleCategory, 'SPECIFIC', caseId, sar, null, null, true);
|
|
11520
11556
|
payload.roleRequest = {
|
|
@@ -25910,9 +25946,6 @@ function sanitiseRichTextDocument(documentElement) {
|
|
|
25910
25946
|
const listStart = tagName === 'ol' && /^\d{1,6}$/.test(element.getAttribute('start') || '')
|
|
25911
25947
|
? element.getAttribute('start')
|
|
25912
25948
|
: null;
|
|
25913
|
-
const listType = tagName === 'ol' && /^[ai]$/.test(element.getAttribute('type') || '')
|
|
25914
|
-
? element.getAttribute('type')
|
|
25915
|
-
: null;
|
|
25916
25949
|
while (element.attributes.length > 0) {
|
|
25917
25950
|
element.removeAttribute(element.attributes[0].name);
|
|
25918
25951
|
}
|
|
@@ -25925,9 +25958,6 @@ function sanitiseRichTextDocument(documentElement) {
|
|
|
25925
25958
|
if (listStart) {
|
|
25926
25959
|
element.setAttribute('start', listStart);
|
|
25927
25960
|
}
|
|
25928
|
-
if (listType) {
|
|
25929
|
-
element.setAttribute('type', listType);
|
|
25930
|
-
}
|
|
25931
25961
|
});
|
|
25932
25962
|
return documentElement.body.innerHTML;
|
|
25933
25963
|
}
|
|
@@ -25958,11 +25988,11 @@ class ReadRichTextAreaFieldComponent extends AbstractFieldReadComponent {
|
|
|
25958
25988
|
i0.ɵɵelement(0, "div", 0);
|
|
25959
25989
|
} if (rf & 2) {
|
|
25960
25990
|
i0.ɵɵproperty("innerHTML", ctx.sanitisedValue(), i0.ɵɵsanitizeHtml);
|
|
25961
|
-
} }, styles: ["@charset \"UTF-8\";.ccd-rich-text-area-read{overflow-wrap:anywhere;white-space:pre-wrap;word-break:normal}.ccd-rich-text-area-read strong,.ccd-rich-text-area-read strong *,.ccd-rich-text-area-read b,.ccd-rich-text-area-read b *{font-weight:700}.ccd-rich-text-area-read strong u,.ccd-rich-text-area-read u strong,.ccd-rich-text-area-read b u,.ccd-rich-text-area-read u b{font-weight:700!important;text-decoration:underline}.ccd-rich-text-area-read p,.ccd-rich-text-area-read ul,.ccd-rich-text-area-read ol{margin-top:0;overflow-wrap:anywhere;word-break:normal}.ccd-rich-text-area-read p:empty:before{content:\"\\a0\"}.ccd-rich-text-area-read ul{list-style:disc outside;padding-left:25px}.ccd-rich-text-area-read ol{list-style:decimal outside;padding-left:25px}.ccd-rich-text-area-read
|
|
25991
|
+
} }, styles: ["@charset \"UTF-8\";.ccd-rich-text-area-read{overflow-wrap:anywhere;white-space:pre-wrap;word-break:normal}.ccd-rich-text-area-read strong,.ccd-rich-text-area-read strong *,.ccd-rich-text-area-read b,.ccd-rich-text-area-read b *{font-weight:700}.ccd-rich-text-area-read strong u,.ccd-rich-text-area-read u strong,.ccd-rich-text-area-read b u,.ccd-rich-text-area-read u b{font-weight:700!important;text-decoration:underline}.ccd-rich-text-area-read p,.ccd-rich-text-area-read ul,.ccd-rich-text-area-read ol{margin-top:0;overflow-wrap:anywhere;word-break:normal}.ccd-rich-text-area-read p:empty:before{content:\"\\a0\"}.ccd-rich-text-area-read ul{list-style:disc outside;padding-left:25px}.ccd-rich-text-area-read ol{list-style:decimal outside;padding-left:25px}.ccd-rich-text-area-read li{display:list-item;margin-bottom:5px}.ccd-rich-text-area-read li>p{margin:0}.ccd-rich-text-area-read .ccd-rich-text-indent-1{margin-left:40px}.ccd-rich-text-area-read .ccd-rich-text-indent-2{margin-left:80px}.ccd-rich-text-area-read .ccd-rich-text-indent-3{margin-left:120px}.ccd-rich-text-area-read .ccd-rich-text-indent-4{margin-left:160px}.ccd-rich-text-area-read .ccd-rich-text-indent-5{margin-left:200px}.ccd-rich-text-area-read .ccd-rich-text-indent-6{margin-left:240px}\n"], encapsulation: 2 });
|
|
25962
25992
|
}
|
|
25963
25993
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadRichTextAreaFieldComponent, [{
|
|
25964
25994
|
type: Component,
|
|
25965
|
-
args: [{ selector: 'ccd-read-rich-text-area-field', template: `<div class="ccd-rich-text-area-read" [innerHTML]="sanitisedValue()"></div>`, encapsulation: ViewEncapsulation.None, standalone: false, styles: ["@charset \"UTF-8\";.ccd-rich-text-area-read{overflow-wrap:anywhere;white-space:pre-wrap;word-break:normal}.ccd-rich-text-area-read strong,.ccd-rich-text-area-read strong *,.ccd-rich-text-area-read b,.ccd-rich-text-area-read b *{font-weight:700}.ccd-rich-text-area-read strong u,.ccd-rich-text-area-read u strong,.ccd-rich-text-area-read b u,.ccd-rich-text-area-read u b{font-weight:700!important;text-decoration:underline}.ccd-rich-text-area-read p,.ccd-rich-text-area-read ul,.ccd-rich-text-area-read ol{margin-top:0;overflow-wrap:anywhere;word-break:normal}.ccd-rich-text-area-read p:empty:before{content:\"\\a0\"}.ccd-rich-text-area-read ul{list-style:disc outside;padding-left:25px}.ccd-rich-text-area-read ol{list-style:decimal outside;padding-left:25px}.ccd-rich-text-area-read
|
|
25995
|
+
args: [{ selector: 'ccd-read-rich-text-area-field', template: `<div class="ccd-rich-text-area-read" [innerHTML]="sanitisedValue()"></div>`, encapsulation: ViewEncapsulation.None, standalone: false, styles: ["@charset \"UTF-8\";.ccd-rich-text-area-read{overflow-wrap:anywhere;white-space:pre-wrap;word-break:normal}.ccd-rich-text-area-read strong,.ccd-rich-text-area-read strong *,.ccd-rich-text-area-read b,.ccd-rich-text-area-read b *{font-weight:700}.ccd-rich-text-area-read strong u,.ccd-rich-text-area-read u strong,.ccd-rich-text-area-read b u,.ccd-rich-text-area-read u b{font-weight:700!important;text-decoration:underline}.ccd-rich-text-area-read p,.ccd-rich-text-area-read ul,.ccd-rich-text-area-read ol{margin-top:0;overflow-wrap:anywhere;word-break:normal}.ccd-rich-text-area-read p:empty:before{content:\"\\a0\"}.ccd-rich-text-area-read ul{list-style:disc outside;padding-left:25px}.ccd-rich-text-area-read ol{list-style:decimal outside;padding-left:25px}.ccd-rich-text-area-read li{display:list-item;margin-bottom:5px}.ccd-rich-text-area-read li>p{margin:0}.ccd-rich-text-area-read .ccd-rich-text-indent-1{margin-left:40px}.ccd-rich-text-area-read .ccd-rich-text-indent-2{margin-left:80px}.ccd-rich-text-area-read .ccd-rich-text-indent-3{margin-left:120px}.ccd-rich-text-area-read .ccd-rich-text-indent-4{margin-left:160px}.ccd-rich-text-area-read .ccd-rich-text-indent-5{margin-left:200px}.ccd-rich-text-area-read .ccd-rich-text-indent-6{margin-left:240px}\n"] }]
|
|
25966
25996
|
}], () => [{ type: i1$5.DomSanitizer }], null); })();
|
|
25967
25997
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadRichTextAreaFieldComponent, { className: "ReadRichTextAreaFieldComponent", filePath: "lib/shared/components/palette/rich-text-area/read-rich-text-area-field.component.ts", lineNumber: 13 }); })();
|
|
25968
25998
|
|
|
@@ -25971,7 +26001,7 @@ const _c1$e = a0 => ({ "form-group-error": a0 });
|
|
|
25971
26001
|
const _c2$3 = a0 => ({ "ccd-rich-text-area__editor--error": a0 });
|
|
25972
26002
|
const _c3 = a0 => ({ "ccd-rich-text-area__toolbar-button--active": a0 });
|
|
25973
26003
|
function WriteRichTextAreaFieldComponent_span_2_Template(rf, ctx) { if (rf & 1) {
|
|
25974
|
-
i0.ɵɵelementStart(0, "span",
|
|
26004
|
+
i0.ɵɵelementStart(0, "span", 37);
|
|
25975
26005
|
i0.ɵɵtext(1);
|
|
25976
26006
|
i0.ɵɵpipe(2, "ccdFieldLabel");
|
|
25977
26007
|
i0.ɵɵelementEnd();
|
|
@@ -25981,7 +26011,7 @@ function WriteRichTextAreaFieldComponent_span_2_Template(rf, ctx) { if (rf & 1)
|
|
|
25981
26011
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r1.caseField));
|
|
25982
26012
|
} }
|
|
25983
26013
|
function WriteRichTextAreaFieldComponent_span_3_Template(rf, ctx) { if (rf & 1) {
|
|
25984
|
-
i0.ɵɵelementStart(0, "span",
|
|
26014
|
+
i0.ɵɵelementStart(0, "span", 38);
|
|
25985
26015
|
i0.ɵɵtext(1);
|
|
25986
26016
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
25987
26017
|
i0.ɵɵelementEnd();
|
|
@@ -25992,7 +26022,7 @@ function WriteRichTextAreaFieldComponent_span_3_Template(rf, ctx) { if (rf & 1)
|
|
|
25992
26022
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 2, ctx_r1.caseField.hint_text));
|
|
25993
26023
|
} }
|
|
25994
26024
|
function WriteRichTextAreaFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
25995
|
-
i0.ɵɵelementStart(0, "span",
|
|
26025
|
+
i0.ɵɵelementStart(0, "span", 39);
|
|
25996
26026
|
i0.ɵɵtext(1);
|
|
25997
26027
|
i0.ɵɵpipe(2, "ccdFirstError");
|
|
25998
26028
|
i0.ɵɵelementEnd();
|
|
@@ -26002,24 +26032,6 @@ function WriteRichTextAreaFieldComponent_span_4_Template(rf, ctx) { if (rf & 1)
|
|
|
26002
26032
|
i0.ɵɵadvance();
|
|
26003
26033
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(2, 2, ctx_r1.richTextAreaControl.errors, ctx_r1.caseField.label), " ");
|
|
26004
26034
|
} }
|
|
26005
|
-
function orderedListStyleForType(type) {
|
|
26006
|
-
if (type === 'a') {
|
|
26007
|
-
return 'lower-alpha';
|
|
26008
|
-
}
|
|
26009
|
-
if (type === 'i') {
|
|
26010
|
-
return 'lower-roman';
|
|
26011
|
-
}
|
|
26012
|
-
return null;
|
|
26013
|
-
}
|
|
26014
|
-
function orderedListTypeForStyle(style) {
|
|
26015
|
-
if (style === 'lower-alpha') {
|
|
26016
|
-
return 'a';
|
|
26017
|
-
}
|
|
26018
|
-
if (style === 'lower-roman') {
|
|
26019
|
-
return 'i';
|
|
26020
|
-
}
|
|
26021
|
-
return null;
|
|
26022
|
-
}
|
|
26023
26035
|
const WORD_COLUMN_SPACING = 12;
|
|
26024
26036
|
const MAX_INDENT = 6;
|
|
26025
26037
|
const CSS_LENGTH_UNITS = ['rem', 'px', 'pt', 'in', 'cm', 'mm', 'em'];
|
|
@@ -26033,8 +26045,7 @@ const richTextNodes = {
|
|
|
26033
26045
|
...nodes.ordered_list,
|
|
26034
26046
|
attrs: {
|
|
26035
26047
|
order: { default: 1 },
|
|
26036
|
-
indent: { default: null }
|
|
26037
|
-
listStyle: { default: null }
|
|
26048
|
+
indent: { default: null }
|
|
26038
26049
|
},
|
|
26039
26050
|
parseDOM: [{
|
|
26040
26051
|
tag: 'ol',
|
|
@@ -26042,35 +26053,28 @@ const richTextNodes = {
|
|
|
26042
26053
|
const list = element;
|
|
26043
26054
|
return {
|
|
26044
26055
|
order: list.hasAttribute('start') ? Number(list.getAttribute('start')) : 1,
|
|
26045
|
-
indent: Number(list.
|
|
26046
|
-
listStyle: orderedListStyleForType(list.getAttribute('type'))
|
|
26056
|
+
indent: Number(list.getAttribute('data-indent')) || null
|
|
26047
26057
|
};
|
|
26048
26058
|
}
|
|
26049
26059
|
}],
|
|
26050
26060
|
toDOM: (node) => ['ol', {
|
|
26051
26061
|
start: node.attrs.order === 1 ? null : node.attrs.order,
|
|
26052
|
-
'data-indent': node.attrs.indent
|
|
26053
|
-
type: orderedListTypeForStyle(node.attrs.listStyle)
|
|
26062
|
+
'data-indent': node.attrs.indent
|
|
26054
26063
|
}, 0]
|
|
26055
26064
|
},
|
|
26056
26065
|
bullet_list: {
|
|
26057
26066
|
...nodes.bullet_list,
|
|
26058
26067
|
attrs: {
|
|
26059
|
-
indent: { default: null }
|
|
26060
|
-
continuationOrder: { default: null }
|
|
26068
|
+
indent: { default: null }
|
|
26061
26069
|
},
|
|
26062
26070
|
parseDOM: [{
|
|
26063
26071
|
tag: 'ul',
|
|
26064
26072
|
getAttrs: (element) => {
|
|
26065
26073
|
const list = element;
|
|
26066
|
-
return {
|
|
26067
|
-
indent: Number(list.dataset.indent) || null
|
|
26068
|
-
};
|
|
26074
|
+
return { indent: Number(list.getAttribute('data-indent')) || null };
|
|
26069
26075
|
}
|
|
26070
26076
|
}],
|
|
26071
|
-
toDOM: (node) => ['ul', {
|
|
26072
|
-
'data-indent': node.attrs.indent
|
|
26073
|
-
}, 0]
|
|
26077
|
+
toDOM: (node) => ['ul', { 'data-indent': node.attrs.indent }, 0]
|
|
26074
26078
|
}
|
|
26075
26079
|
};
|
|
26076
26080
|
const richTextSchema = new Schema({ nodes: richTextNodes, marks: marks });
|
|
@@ -26096,10 +26100,7 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
|
|
|
26096
26100
|
plugins: [
|
|
26097
26101
|
new Plugin({
|
|
26098
26102
|
props: {
|
|
26099
|
-
handlePaste: (_view, event) => this.handleEditorPaste(event)
|
|
26100
|
-
handleDOMEvents: {
|
|
26101
|
-
keydown: (_view, event) => this.handleEditorKeyDown(event)
|
|
26102
|
-
}
|
|
26103
|
+
handlePaste: (_view, event) => this.handleEditorPaste(event)
|
|
26103
26104
|
}
|
|
26104
26105
|
})
|
|
26105
26106
|
],
|
|
@@ -26146,9 +26147,6 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
|
|
|
26146
26147
|
errorId() {
|
|
26147
26148
|
return `${this.id()}_error`;
|
|
26148
26149
|
}
|
|
26149
|
-
listStyleId() {
|
|
26150
|
-
return `${this.id()}_list_style`;
|
|
26151
|
-
}
|
|
26152
26150
|
toolbarLabel() {
|
|
26153
26151
|
return `${this.caseField.label || this.caseField.id} formatting options`;
|
|
26154
26152
|
}
|
|
@@ -26162,13 +26160,6 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
|
|
|
26162
26160
|
onToolbarButtonMouseDown(event) {
|
|
26163
26161
|
event.preventDefault();
|
|
26164
26162
|
}
|
|
26165
|
-
handleEditorKeyDown(event) {
|
|
26166
|
-
if (event.key !== 'Tab' || !this.isNodeActive('list_item')) {
|
|
26167
|
-
return false;
|
|
26168
|
-
}
|
|
26169
|
-
this.executeToolbarCommand(event, event.shiftKey ? 'outdent' : 'indent');
|
|
26170
|
-
return true;
|
|
26171
|
-
}
|
|
26172
26163
|
executeToolbarCommand(event, command) {
|
|
26173
26164
|
event.preventDefault();
|
|
26174
26165
|
event.stopPropagation();
|
|
@@ -26198,11 +26189,11 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
|
|
|
26198
26189
|
this.changeIndent(false);
|
|
26199
26190
|
break;
|
|
26200
26191
|
case 'ordered_list':
|
|
26201
|
-
this.
|
|
26192
|
+
this.editor.commands.toggleOrderedList().exec();
|
|
26202
26193
|
this.paragraphCommandApplied = false;
|
|
26203
26194
|
break;
|
|
26204
26195
|
case 'bullet_list':
|
|
26205
|
-
this.toggleBulletList();
|
|
26196
|
+
this.editor.commands.toggleBulletList().exec();
|
|
26206
26197
|
this.paragraphCommandApplied = false;
|
|
26207
26198
|
break;
|
|
26208
26199
|
default:
|
|
@@ -26216,249 +26207,6 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
|
|
|
26216
26207
|
isToolbarCommandActive(command) {
|
|
26217
26208
|
return !!this.activeToolbarCommands[command];
|
|
26218
26209
|
}
|
|
26219
|
-
currentListStyle() {
|
|
26220
|
-
const activeList = this.activeListNode();
|
|
26221
|
-
if (activeList?.type.name === 'ordered_list') {
|
|
26222
|
-
const orderedListStyle = activeList.attrs.listStyle || 'decimal';
|
|
26223
|
-
if (orderedListStyle === 'lower-alpha') {
|
|
26224
|
-
return 'ordered_alpha';
|
|
26225
|
-
}
|
|
26226
|
-
if (orderedListStyle === 'lower-roman') {
|
|
26227
|
-
return 'ordered_roman';
|
|
26228
|
-
}
|
|
26229
|
-
return 'ordered_list';
|
|
26230
|
-
}
|
|
26231
|
-
if (activeList?.type.name === 'bullet_list') {
|
|
26232
|
-
return 'bullet_list';
|
|
26233
|
-
}
|
|
26234
|
-
return '';
|
|
26235
|
-
}
|
|
26236
|
-
currentListSelectValue() {
|
|
26237
|
-
const currentListStyle = this.currentListStyle();
|
|
26238
|
-
return currentListStyle === 'bullet_list' ? '' : currentListStyle;
|
|
26239
|
-
}
|
|
26240
|
-
onListStyleChange(event) {
|
|
26241
|
-
const listStyle = event.target.value;
|
|
26242
|
-
this.applyListStyleSelection(listStyle);
|
|
26243
|
-
this.richTextAreaControl.markAsDirty();
|
|
26244
|
-
this.editor.view.focus();
|
|
26245
|
-
this.updateToolbarState();
|
|
26246
|
-
this.syncAccessibilityLater();
|
|
26247
|
-
}
|
|
26248
|
-
applyListStyleSelection(listStyle) {
|
|
26249
|
-
const currentListStyle = this.currentListStyle();
|
|
26250
|
-
if (listStyle === currentListStyle) {
|
|
26251
|
-
if (listStyle === 'ordered_list') {
|
|
26252
|
-
this.changeActiveListType('ordered_list', 'decimal');
|
|
26253
|
-
}
|
|
26254
|
-
return;
|
|
26255
|
-
}
|
|
26256
|
-
const currentListType = this.listType(currentListStyle);
|
|
26257
|
-
const nextListType = this.listType(listStyle);
|
|
26258
|
-
if (currentListType && nextListType && currentListType !== nextListType) {
|
|
26259
|
-
this.changeActiveListType(nextListType, this.orderedListStyle(listStyle));
|
|
26260
|
-
}
|
|
26261
|
-
else if (nextListType === 'ordered_list') {
|
|
26262
|
-
if (currentListType !== 'ordered_list') {
|
|
26263
|
-
this.editor.commands.toggleOrderedList().exec();
|
|
26264
|
-
}
|
|
26265
|
-
this.applyOrderedListStyle(this.orderedListStyle(listStyle));
|
|
26266
|
-
}
|
|
26267
|
-
else if (listStyle === 'bullet_list') {
|
|
26268
|
-
if (currentListType !== 'bullet_list') {
|
|
26269
|
-
this.editor.commands.toggleBulletList().exec();
|
|
26270
|
-
}
|
|
26271
|
-
}
|
|
26272
|
-
else {
|
|
26273
|
-
this.applyParagraph();
|
|
26274
|
-
this.paragraphCommandApplied = true;
|
|
26275
|
-
}
|
|
26276
|
-
}
|
|
26277
|
-
changeActiveListType(listType, orderedListStyle) {
|
|
26278
|
-
const { state, dispatch } = this.editor.view;
|
|
26279
|
-
const { $from } = state.selection;
|
|
26280
|
-
const targetType = state.schema.nodes[listType];
|
|
26281
|
-
for (let depth = $from.depth; depth > 0; depth--) {
|
|
26282
|
-
const node = $from.node(depth);
|
|
26283
|
-
if (node.type.name !== 'ordered_list' && node.type.name !== 'bullet_list') {
|
|
26284
|
-
continue;
|
|
26285
|
-
}
|
|
26286
|
-
const transaction = state.tr;
|
|
26287
|
-
let nextOrder = 1;
|
|
26288
|
-
this.contiguousListPositions(depth, listType).forEach(({ position, list }) => {
|
|
26289
|
-
const indent = Number(list.attrs.indent) || null;
|
|
26290
|
-
const attrs = listType === 'ordered_list'
|
|
26291
|
-
? {
|
|
26292
|
-
order: nextOrder,
|
|
26293
|
-
indent,
|
|
26294
|
-
listStyle: orderedListStyle === 'decimal' ? null : orderedListStyle
|
|
26295
|
-
}
|
|
26296
|
-
: {
|
|
26297
|
-
indent,
|
|
26298
|
-
continuationOrder: Number(list.attrs.order) || null
|
|
26299
|
-
};
|
|
26300
|
-
transaction.setNodeMarkup(position, targetType, attrs);
|
|
26301
|
-
nextOrder += list.childCount;
|
|
26302
|
-
});
|
|
26303
|
-
dispatch(transaction);
|
|
26304
|
-
return;
|
|
26305
|
-
}
|
|
26306
|
-
}
|
|
26307
|
-
contiguousListPositions(depth, targetListType) {
|
|
26308
|
-
const { $from } = this.editor.view.state.selection;
|
|
26309
|
-
const parentDepth = depth - 1;
|
|
26310
|
-
const parent = $from.node(parentDepth);
|
|
26311
|
-
const activeList = $from.node(depth);
|
|
26312
|
-
const activeIndex = $from.index(parentDepth);
|
|
26313
|
-
const includedIndexes = new Set([activeIndex]);
|
|
26314
|
-
this.collectContiguousListIndexes(parent, activeList, activeIndex, -1, targetListType, includedIndexes);
|
|
26315
|
-
this.collectContiguousListIndexes(parent, activeList, activeIndex, 1, targetListType, includedIndexes);
|
|
26316
|
-
const positions = [];
|
|
26317
|
-
parent.forEach((child, childOffset, index) => {
|
|
26318
|
-
if (includedIndexes.has(index) && this.isList(child)) {
|
|
26319
|
-
positions.push({ position: $from.start(parentDepth) + childOffset, list: child });
|
|
26320
|
-
}
|
|
26321
|
-
});
|
|
26322
|
-
return positions;
|
|
26323
|
-
}
|
|
26324
|
-
collectContiguousListIndexes(parent, activeList, activeIndex, direction, targetListType, includedIndexes) {
|
|
26325
|
-
let adjacentList = activeList;
|
|
26326
|
-
let crossedContent = false;
|
|
26327
|
-
let crossedSectionHeading = false;
|
|
26328
|
-
for (let index = activeIndex + direction; index >= 0 && index < parent.childCount; index += direction) {
|
|
26329
|
-
const child = parent.child(index);
|
|
26330
|
-
if (this.isEmptyParagraph(child)) {
|
|
26331
|
-
continue;
|
|
26332
|
-
}
|
|
26333
|
-
const matchesActiveList = this.hasMatchingListType(child, activeList);
|
|
26334
|
-
const isMixedListToRepair = crossedSectionHeading && this.isList(child) &&
|
|
26335
|
-
child.type.name !== activeList.type.name && targetListType === activeList.type.name;
|
|
26336
|
-
if (matchesActiveList || isMixedListToRepair) {
|
|
26337
|
-
const isHeadingSeparatedBulletList = activeList.type.name === 'bullet_list';
|
|
26338
|
-
if (matchesActiveList && crossedContent && !isHeadingSeparatedBulletList &&
|
|
26339
|
-
!this.isSequentialList(child, adjacentList, direction)) {
|
|
26340
|
-
return;
|
|
26341
|
-
}
|
|
26342
|
-
includedIndexes.add(index);
|
|
26343
|
-
adjacentList = child;
|
|
26344
|
-
crossedContent = false;
|
|
26345
|
-
crossedSectionHeading = false;
|
|
26346
|
-
continue;
|
|
26347
|
-
}
|
|
26348
|
-
if (this.isList(child)) {
|
|
26349
|
-
return;
|
|
26350
|
-
}
|
|
26351
|
-
if (activeList.type.name === 'bullet_list') {
|
|
26352
|
-
if (!this.isListSectionHeading(child)) {
|
|
26353
|
-
return;
|
|
26354
|
-
}
|
|
26355
|
-
}
|
|
26356
|
-
else if (!this.hasListContinuation(activeList)) {
|
|
26357
|
-
return;
|
|
26358
|
-
}
|
|
26359
|
-
crossedContent = true;
|
|
26360
|
-
crossedSectionHeading = crossedSectionHeading || this.isListSectionHeading(child);
|
|
26361
|
-
}
|
|
26362
|
-
}
|
|
26363
|
-
isSequentialList(candidateList, adjacentList, direction) {
|
|
26364
|
-
const candidateOrder = this.listContinuationOrder(candidateList);
|
|
26365
|
-
const adjacentOrder = this.listContinuationOrder(adjacentList);
|
|
26366
|
-
if (!candidateOrder || !adjacentOrder) {
|
|
26367
|
-
return false;
|
|
26368
|
-
}
|
|
26369
|
-
return direction === 1
|
|
26370
|
-
? candidateOrder === adjacentOrder + adjacentList.childCount
|
|
26371
|
-
: candidateOrder + candidateList.childCount === adjacentOrder;
|
|
26372
|
-
}
|
|
26373
|
-
hasListContinuation(list) {
|
|
26374
|
-
return list.type.name === 'ordered_list' || Boolean(list.attrs.continuationOrder);
|
|
26375
|
-
}
|
|
26376
|
-
listContinuationOrder(list) {
|
|
26377
|
-
return Number(list.type.name === 'ordered_list' ? list.attrs.order : list.attrs.continuationOrder) || null;
|
|
26378
|
-
}
|
|
26379
|
-
isList(node) {
|
|
26380
|
-
return node.type.name === 'ordered_list' || node.type.name === 'bullet_list';
|
|
26381
|
-
}
|
|
26382
|
-
hasMatchingListType(node, activeList) {
|
|
26383
|
-
if (node.type !== activeList.type) {
|
|
26384
|
-
return false;
|
|
26385
|
-
}
|
|
26386
|
-
return node.type.name !== 'ordered_list' ||
|
|
26387
|
-
(node.attrs.listStyle || 'decimal') === (activeList.attrs.listStyle || 'decimal');
|
|
26388
|
-
}
|
|
26389
|
-
isEmptyParagraph(node) {
|
|
26390
|
-
return node.type.name === 'paragraph' && !node.textContent.trim();
|
|
26391
|
-
}
|
|
26392
|
-
isListSectionHeading(node) {
|
|
26393
|
-
if (!node.textContent.trim()) {
|
|
26394
|
-
return false;
|
|
26395
|
-
}
|
|
26396
|
-
if (node.type.name === 'heading') {
|
|
26397
|
-
return true;
|
|
26398
|
-
}
|
|
26399
|
-
if (node.type.name !== 'paragraph') {
|
|
26400
|
-
return false;
|
|
26401
|
-
}
|
|
26402
|
-
let hasText = false;
|
|
26403
|
-
let allTextIsBold = true;
|
|
26404
|
-
node.descendants((child) => {
|
|
26405
|
-
if (child.isText && child.textContent.trim()) {
|
|
26406
|
-
hasText = true;
|
|
26407
|
-
allTextIsBold = allTextIsBold && child.marks.some((mark) => mark.type.name === 'strong');
|
|
26408
|
-
}
|
|
26409
|
-
});
|
|
26410
|
-
return hasText && allTextIsBold;
|
|
26411
|
-
}
|
|
26412
|
-
toggleBulletList() {
|
|
26413
|
-
const currentListStyle = this.currentListStyle();
|
|
26414
|
-
const currentListType = this.listType(currentListStyle);
|
|
26415
|
-
if (currentListType === 'ordered_list') {
|
|
26416
|
-
this.changeActiveListType('bullet_list', 'decimal');
|
|
26417
|
-
}
|
|
26418
|
-
else {
|
|
26419
|
-
this.editor.commands.toggleBulletList().exec();
|
|
26420
|
-
}
|
|
26421
|
-
}
|
|
26422
|
-
listType(listStyle) {
|
|
26423
|
-
if (listStyle === 'bullet_list') {
|
|
26424
|
-
return 'bullet_list';
|
|
26425
|
-
}
|
|
26426
|
-
return listStyle ? 'ordered_list' : '';
|
|
26427
|
-
}
|
|
26428
|
-
orderedListStyle(listStyle) {
|
|
26429
|
-
if (listStyle === 'ordered_alpha') {
|
|
26430
|
-
return 'lower-alpha';
|
|
26431
|
-
}
|
|
26432
|
-
if (listStyle === 'ordered_roman') {
|
|
26433
|
-
return 'lower-roman';
|
|
26434
|
-
}
|
|
26435
|
-
return 'decimal';
|
|
26436
|
-
}
|
|
26437
|
-
activeListNode() {
|
|
26438
|
-
const { $from } = this.editor.view.state.selection;
|
|
26439
|
-
for (let depth = $from.depth; depth > 0; depth--) {
|
|
26440
|
-
const node = $from.node(depth);
|
|
26441
|
-
if (this.isList(node)) {
|
|
26442
|
-
return node;
|
|
26443
|
-
}
|
|
26444
|
-
}
|
|
26445
|
-
return null;
|
|
26446
|
-
}
|
|
26447
|
-
applyOrderedListStyle(listStyle) {
|
|
26448
|
-
const { state, dispatch } = this.editor.view;
|
|
26449
|
-
const { $from } = state.selection;
|
|
26450
|
-
for (let depth = $from.depth; depth > 0; depth--) {
|
|
26451
|
-
const node = $from.node(depth);
|
|
26452
|
-
if (node.type.name !== 'ordered_list') {
|
|
26453
|
-
continue;
|
|
26454
|
-
}
|
|
26455
|
-
dispatch(state.tr.setNodeMarkup($from.before(depth), node.type, {
|
|
26456
|
-
...node.attrs,
|
|
26457
|
-
listStyle: listStyle === 'decimal' ? null : listStyle
|
|
26458
|
-
}));
|
|
26459
|
-
return;
|
|
26460
|
-
}
|
|
26461
|
-
}
|
|
26462
26210
|
onPaste(event) {
|
|
26463
26211
|
if (event.defaultPrevented) {
|
|
26464
26212
|
return;
|
|
@@ -26513,13 +26261,11 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
|
|
|
26513
26261
|
normalisePastedHtml(html) {
|
|
26514
26262
|
const documentElement = new DOMParser().parseFromString(html, 'text/html');
|
|
26515
26263
|
removeUnsafeRichTextElements(documentElement);
|
|
26516
|
-
this.normaliseWordStylesheetFormatting(documentElement);
|
|
26517
26264
|
this.removeWordNoise(documentElement);
|
|
26518
26265
|
this.normaliseWordSpacing(documentElement);
|
|
26519
26266
|
this.normaliseWordTables(documentElement);
|
|
26520
26267
|
this.normaliseWordSemanticBlocks(documentElement);
|
|
26521
26268
|
this.convertWordLists(documentElement);
|
|
26522
|
-
this.normaliseNestedListStructure(documentElement);
|
|
26523
26269
|
this.normaliseSupportedInlineFormatting(documentElement);
|
|
26524
26270
|
this.normaliseBlockFormatting(documentElement);
|
|
26525
26271
|
this.normalisePastedListSpacing(documentElement);
|
|
@@ -26534,7 +26280,6 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
|
|
|
26534
26280
|
}
|
|
26535
26281
|
const documentElement = new DOMParser().parseFromString(value, 'text/html');
|
|
26536
26282
|
removeUnsafeRichTextElements(documentElement);
|
|
26537
|
-
this.normaliseWordStylesheetFormatting(documentElement);
|
|
26538
26283
|
this.normaliseWordSpacing(documentElement);
|
|
26539
26284
|
this.normaliseWordTables(documentElement);
|
|
26540
26285
|
this.normaliseWordSemanticBlocks(documentElement);
|
|
@@ -26601,25 +26346,15 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
|
|
|
26601
26346
|
Italic: 'Control+I',
|
|
26602
26347
|
Underline: 'Control+U'
|
|
26603
26348
|
};
|
|
26604
|
-
const
|
|
26605
|
-
Bold: 'bold',
|
|
26606
|
-
Italic: 'italic',
|
|
26607
|
-
Underline: 'underline',
|
|
26608
|
-
Paragraph: 'paragraph',
|
|
26609
|
-
'Bullet List': 'bullet_list',
|
|
26610
|
-
'Numbered List': 'ordered_list'
|
|
26611
|
-
};
|
|
26349
|
+
const toggleLabels = new Set(['Bold', 'Italic', 'Underline', 'Paragraph', 'Ordered List', 'Bullet List']);
|
|
26612
26350
|
const buttons = this.editorHost.nativeElement.querySelectorAll('button');
|
|
26613
26351
|
buttons.forEach((button) => {
|
|
26614
26352
|
const label = button.getAttribute('aria-label') || button.title;
|
|
26615
26353
|
if (shortcutLabels[label]) {
|
|
26616
26354
|
button.setAttribute('aria-keyshortcuts', shortcutLabels[label]);
|
|
26617
26355
|
}
|
|
26618
|
-
if (
|
|
26619
|
-
|
|
26620
|
-
? this.currentListStyle() === 'ordered_list'
|
|
26621
|
-
: this.isToolbarCommandActive(toggleCommands[label]);
|
|
26622
|
-
button.setAttribute('aria-pressed', `${isActive}`);
|
|
26356
|
+
if (toggleLabels.has(label)) {
|
|
26357
|
+
button.setAttribute('aria-pressed', `${button.classList.contains('ccd-rich-text-area__toolbar-button--active')}`);
|
|
26623
26358
|
}
|
|
26624
26359
|
});
|
|
26625
26360
|
}
|
|
@@ -26672,58 +26407,6 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
|
|
|
26672
26407
|
const officeParagraphs = Array.prototype.slice.call(documentElement.getElementsByTagName('o:p'));
|
|
26673
26408
|
officeParagraphs.forEach((element) => element.remove());
|
|
26674
26409
|
}
|
|
26675
|
-
normaliseWordStylesheetFormatting(documentElement) {
|
|
26676
|
-
const styleElements = Array.prototype.slice.call(documentElement.querySelectorAll('style'));
|
|
26677
|
-
styleElements.forEach((styleElement) => {
|
|
26678
|
-
const stylesheet = (styleElement.textContent || '').replace(/<!--|-->/g, '');
|
|
26679
|
-
const rules = this.stylesheetRules(stylesheet);
|
|
26680
|
-
rules.forEach(([selectors, declarations]) => {
|
|
26681
|
-
const hasBoldStyle = this.hasBoldStyle(declarations);
|
|
26682
|
-
const headingLevel = this.wordOutlineLevel(declarations);
|
|
26683
|
-
if (!hasBoldStyle && !headingLevel) {
|
|
26684
|
-
return;
|
|
26685
|
-
}
|
|
26686
|
-
selectors.split(',').forEach((selector) => {
|
|
26687
|
-
const normalisedSelector = selector.trim();
|
|
26688
|
-
if (!normalisedSelector || normalisedSelector.startsWith('@')) {
|
|
26689
|
-
return;
|
|
26690
|
-
}
|
|
26691
|
-
try {
|
|
26692
|
-
const matchingElements = documentElement.body.querySelectorAll(normalisedSelector);
|
|
26693
|
-
matchingElements.forEach((element) => {
|
|
26694
|
-
if (headingLevel) {
|
|
26695
|
-
element.dataset.wordHeadingLevel = headingLevel.toString();
|
|
26696
|
-
}
|
|
26697
|
-
if (hasBoldStyle) {
|
|
26698
|
-
this.wrapBoldInlineContents(documentElement, element);
|
|
26699
|
-
}
|
|
26700
|
-
});
|
|
26701
|
-
}
|
|
26702
|
-
catch {
|
|
26703
|
-
// Ignore Microsoft Office selectors that are not valid browser CSS selectors.
|
|
26704
|
-
}
|
|
26705
|
-
});
|
|
26706
|
-
});
|
|
26707
|
-
});
|
|
26708
|
-
}
|
|
26709
|
-
stylesheetRules(stylesheet) {
|
|
26710
|
-
const rules = [];
|
|
26711
|
-
let searchFrom = 0;
|
|
26712
|
-
let openingBrace = stylesheet.indexOf('{', searchFrom);
|
|
26713
|
-
while (openingBrace !== -1) {
|
|
26714
|
-
const closingBrace = stylesheet.indexOf('}', openingBrace + 1);
|
|
26715
|
-
if (closingBrace === -1) {
|
|
26716
|
-
break;
|
|
26717
|
-
}
|
|
26718
|
-
rules.push([
|
|
26719
|
-
stylesheet.slice(searchFrom, openingBrace),
|
|
26720
|
-
stylesheet.slice(openingBrace + 1, closingBrace)
|
|
26721
|
-
]);
|
|
26722
|
-
searchFrom = closingBrace + 1;
|
|
26723
|
-
openingBrace = stylesheet.indexOf('{', searchFrom);
|
|
26724
|
-
}
|
|
26725
|
-
return rules;
|
|
26726
|
-
}
|
|
26727
26410
|
normaliseWordSpacing(documentElement) {
|
|
26728
26411
|
const spacerElements = Array.prototype.slice.call(documentElement.body.querySelectorAll('[style*="mso-spacerun"]'));
|
|
26729
26412
|
spacerElements.forEach((spacerElement) => {
|
|
@@ -26785,29 +26468,18 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
|
|
|
26785
26468
|
});
|
|
26786
26469
|
}
|
|
26787
26470
|
normaliseWordSemanticBlocks(documentElement) {
|
|
26788
|
-
const
|
|
26789
|
-
|
|
26790
|
-
const
|
|
26791
|
-
const existingHeadingLevel = /^h([1-6])$/i.exec(block.tagName)?.[1];
|
|
26792
|
-
if (existingHeadingLevel) {
|
|
26793
|
-
if (namedHeadingLevel) {
|
|
26794
|
-
this.wrapBoldInlineContents(documentElement, block);
|
|
26795
|
-
}
|
|
26796
|
-
return;
|
|
26797
|
-
}
|
|
26798
|
-
const headingLevel = this.wordHeadingLevel(block);
|
|
26471
|
+
const paragraphs = Array.prototype.slice.call(documentElement.body.querySelectorAll('p'));
|
|
26472
|
+
paragraphs.forEach((paragraph) => {
|
|
26473
|
+
const headingLevel = this.wordHeadingLevel(paragraph);
|
|
26799
26474
|
if (headingLevel) {
|
|
26800
|
-
|
|
26801
|
-
if (namedHeadingLevel) {
|
|
26802
|
-
this.wrapBoldInlineContents(documentElement, heading);
|
|
26803
|
-
}
|
|
26475
|
+
this.replaceElementTag(documentElement, paragraph, `h${headingLevel}`);
|
|
26804
26476
|
}
|
|
26805
26477
|
});
|
|
26806
26478
|
}
|
|
26807
26479
|
wordHeadingLevel(element) {
|
|
26808
|
-
const
|
|
26809
|
-
if (
|
|
26810
|
-
return
|
|
26480
|
+
const headingClass = /MsoHeading([1-6])/i.exec(element.className || '');
|
|
26481
|
+
if (headingClass) {
|
|
26482
|
+
return Number(headingClass[1]);
|
|
26811
26483
|
}
|
|
26812
26484
|
if (/MsoTitle/i.test(element.className || '')) {
|
|
26813
26485
|
return 1;
|
|
@@ -26819,31 +26491,6 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
|
|
|
26819
26491
|
}, 0);
|
|
26820
26492
|
return largestFontSize >= 24 ? 1 : null;
|
|
26821
26493
|
}
|
|
26822
|
-
namedWordHeadingLevel(element) {
|
|
26823
|
-
const styledElements = [element].concat(Array.prototype.slice.call(element.querySelectorAll('*')));
|
|
26824
|
-
for (const styledElement of styledElements) {
|
|
26825
|
-
const storedHeadingLevel = Number(styledElement.dataset.wordHeadingLevel);
|
|
26826
|
-
if (storedHeadingLevel >= 1 && storedHeadingLevel <= 6) {
|
|
26827
|
-
return storedHeadingLevel;
|
|
26828
|
-
}
|
|
26829
|
-
const className = styledElement.className || '';
|
|
26830
|
-
const style = styledElement.getAttribute('style') || '';
|
|
26831
|
-
const headingDescription = `${className} ${style}`;
|
|
26832
|
-
const namedHeadingLevel = /(?:Mso)?Heading\s*([1-6])(?:Char)?/i.exec(headingDescription);
|
|
26833
|
-
if (namedHeadingLevel) {
|
|
26834
|
-
return Number(namedHeadingLevel[1]);
|
|
26835
|
-
}
|
|
26836
|
-
const outlineLevel = this.wordOutlineLevel(style);
|
|
26837
|
-
if (outlineLevel) {
|
|
26838
|
-
return outlineLevel;
|
|
26839
|
-
}
|
|
26840
|
-
}
|
|
26841
|
-
return null;
|
|
26842
|
-
}
|
|
26843
|
-
wordOutlineLevel(style) {
|
|
26844
|
-
const outlineLevel = /mso-outline-level\s*:\s*([1-6])/i.exec(style || '');
|
|
26845
|
-
return outlineLevel ? Number(outlineLevel[1]) : null;
|
|
26846
|
-
}
|
|
26847
26494
|
replaceElementTag(documentElement, element, tagName) {
|
|
26848
26495
|
const replacement = documentElement.createElement(tagName);
|
|
26849
26496
|
Array.prototype.slice.call(element.attributes).forEach((attribute) => {
|
|
@@ -26896,9 +26543,6 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
|
|
|
26896
26543
|
const listStart = element.tagName.toLowerCase() === 'ol'
|
|
26897
26544
|
? this.normaliseListStart(element.getAttribute('start'))
|
|
26898
26545
|
: null;
|
|
26899
|
-
const listType = element.tagName.toLowerCase() === 'ol' && /^[ai]$/.test(element.getAttribute('type') || '')
|
|
26900
|
-
? element.getAttribute('type')
|
|
26901
|
-
: null;
|
|
26902
26546
|
while (element.attributes.length > 0) {
|
|
26903
26547
|
element.removeAttribute(element.attributes[0].name);
|
|
26904
26548
|
}
|
|
@@ -26911,9 +26555,6 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
|
|
|
26911
26555
|
if (listStart) {
|
|
26912
26556
|
element.setAttribute('start', listStart);
|
|
26913
26557
|
}
|
|
26914
|
-
if (listType) {
|
|
26915
|
-
element.setAttribute('type', listType);
|
|
26916
|
-
}
|
|
26917
26558
|
});
|
|
26918
26559
|
}
|
|
26919
26560
|
normaliseListStart(value) {
|
|
@@ -27014,7 +26655,7 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
|
|
|
27014
26655
|
hasBoldStyle(style) {
|
|
27015
26656
|
const fontWeightMatch = /(?:mso-bidi-)?font-weight\s*:\s*([^;]+)/i.exec(style);
|
|
27016
26657
|
if (!fontWeightMatch) {
|
|
27017
|
-
return
|
|
26658
|
+
return false;
|
|
27018
26659
|
}
|
|
27019
26660
|
const fontWeight = fontWeightMatch[1].trim().toLowerCase();
|
|
27020
26661
|
return fontWeight === 'bold' || fontWeight === 'bolder' || Number(fontWeight) >= 600;
|
|
@@ -27281,96 +26922,61 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
|
|
|
27281
26922
|
convertWordLists(documentElement) {
|
|
27282
26923
|
const childNodes = Array.prototype.slice.call(documentElement.body.querySelectorAll('p'));
|
|
27283
26924
|
const wordListIndents = this.wordListIndents(childNodes);
|
|
27284
|
-
const
|
|
27285
|
-
const
|
|
27286
|
-
|
|
27287
|
-
|
|
27288
|
-
resetListLevels: new Map(),
|
|
27289
|
-
previousListId: null
|
|
27290
|
-
};
|
|
26925
|
+
const listStack = [];
|
|
26926
|
+
const listParents = [];
|
|
26927
|
+
const resetListLevels = new Map();
|
|
26928
|
+
let previousListId = null;
|
|
27291
26929
|
childNodes.forEach((node) => {
|
|
27292
|
-
this.
|
|
27293
|
-
|
|
27294
|
-
|
|
27295
|
-
|
|
27296
|
-
|
|
27297
|
-
|
|
27298
|
-
|
|
27299
|
-
|
|
27300
|
-
|
|
27301
|
-
|
|
27302
|
-
|
|
27303
|
-
|
|
27304
|
-
|
|
27305
|
-
|
|
27306
|
-
|
|
27307
|
-
|
|
27308
|
-
|
|
27309
|
-
|
|
27310
|
-
|
|
27311
|
-
|
|
27312
|
-
|
|
27313
|
-
|
|
27314
|
-
|
|
27315
|
-
|
|
27316
|
-
|
|
27317
|
-
|
|
27318
|
-
|
|
27319
|
-
|
|
27320
|
-
|
|
27321
|
-
|
|
27322
|
-
|
|
27323
|
-
|
|
27324
|
-
|
|
27325
|
-
|
|
27326
|
-
|
|
27327
|
-
|
|
27328
|
-
|
|
27329
|
-
|
|
27330
|
-
|
|
27331
|
-
|
|
27332
|
-
|
|
27333
|
-
|
|
27334
|
-
|
|
27335
|
-
|
|
27336
|
-
const stackIndex = level - 1;
|
|
27337
|
-
const parentListItem = stackIndex > 0 ? state.listStack[stackIndex - 1]?.lastElementChild : null;
|
|
27338
|
-
const listParent = parentListItem || paragraph.parentNode;
|
|
27339
|
-
let currentList = state.listStack[stackIndex];
|
|
27340
|
-
if (currentList?.tagName.toLowerCase() !== listType || currentList?.getAttribute('type') !== orderedListType ||
|
|
27341
|
-
state.listParents[stackIndex] !== listParent) {
|
|
27342
|
-
currentList = this.createWordList(documentElement, paragraph, listType, orderedListType, parentListItem);
|
|
27343
|
-
state.listStack[stackIndex] = currentList;
|
|
27344
|
-
state.listParents[stackIndex] = listParent;
|
|
27345
|
-
}
|
|
27346
|
-
state.listStack.length = level;
|
|
27347
|
-
state.listParents.length = level;
|
|
27348
|
-
return currentList;
|
|
27349
|
-
}
|
|
27350
|
-
createWordList(documentElement, paragraph, listType, orderedListType, parentListItem) {
|
|
27351
|
-
const list = documentElement.createElement(listType);
|
|
27352
|
-
const listStart = this.wordListStart(paragraph);
|
|
27353
|
-
if (listType === 'ol' && listStart > 1) {
|
|
27354
|
-
list.setAttribute('start', listStart.toString());
|
|
27355
|
-
}
|
|
27356
|
-
if (orderedListType) {
|
|
27357
|
-
list.setAttribute('type', orderedListType);
|
|
27358
|
-
}
|
|
27359
|
-
if (parentListItem) {
|
|
27360
|
-
parentListItem.appendChild(list);
|
|
27361
|
-
}
|
|
27362
|
-
else {
|
|
27363
|
-
paragraph.parentNode.insertBefore(list, paragraph);
|
|
27364
|
-
}
|
|
27365
|
-
return list;
|
|
27366
|
-
}
|
|
27367
|
-
normaliseNestedListStructure(documentElement) {
|
|
27368
|
-
const orphanedNestedLists = Array.prototype.slice.call(documentElement.body.querySelectorAll('ol > ol, ol > ul, ul > ol, ul > ul'));
|
|
27369
|
-
orphanedNestedLists.forEach((nestedList) => {
|
|
27370
|
-
const previousListItem = nestedList.previousElementSibling;
|
|
27371
|
-
if (previousListItem?.tagName.toLowerCase() === 'li') {
|
|
27372
|
-
previousListItem.appendChild(nestedList);
|
|
26930
|
+
if (!this.isWordListParagraph(node)) {
|
|
26931
|
+
listStack.length = 0;
|
|
26932
|
+
listParents.length = 0;
|
|
26933
|
+
resetListLevels.clear();
|
|
26934
|
+
previousListId = null;
|
|
26935
|
+
return;
|
|
26936
|
+
}
|
|
26937
|
+
const paragraph = node;
|
|
26938
|
+
const listType = this.wordListType(paragraph);
|
|
26939
|
+
const listId = this.wordListId(paragraph);
|
|
26940
|
+
const declaredLevel = this.wordListDeclaredLevel(paragraph);
|
|
26941
|
+
let requestedLevel = this.wordListLevel(paragraph, wordListIndents);
|
|
26942
|
+
const rememberedResetLevel = declaredLevel === 1 ? resetListLevels.get(listId) : null;
|
|
26943
|
+
if (rememberedResetLevel) {
|
|
26944
|
+
requestedLevel = Math.max(requestedLevel, rememberedResetLevel);
|
|
26945
|
+
}
|
|
26946
|
+
else if (declaredLevel === 1 && listId !== previousListId && listStack.length > 1 && requestedLevel === listStack.length) {
|
|
26947
|
+
requestedLevel++;
|
|
26948
|
+
resetListLevels.set(listId, requestedLevel);
|
|
26949
|
+
}
|
|
26950
|
+
else if (declaredLevel === 1 && listId) {
|
|
26951
|
+
resetListLevels.set(listId, requestedLevel);
|
|
26952
|
+
}
|
|
26953
|
+
const level = Math.min(requestedLevel, listStack.length + 1);
|
|
26954
|
+
const stackIndex = level - 1;
|
|
26955
|
+
const parentListItem = stackIndex > 0 ? listStack[stackIndex - 1]?.lastElementChild : null;
|
|
26956
|
+
const listParent = parentListItem || paragraph.parentNode;
|
|
26957
|
+
const listItem = documentElement.createElement('li');
|
|
26958
|
+
this.copyListItemContents(documentElement, paragraph, listItem);
|
|
26959
|
+
let currentList = listStack[stackIndex];
|
|
26960
|
+
if (currentList?.tagName.toLowerCase() !== listType || listParents[stackIndex] !== listParent) {
|
|
26961
|
+
currentList = documentElement.createElement(listType);
|
|
26962
|
+
const listStart = this.wordListStart(paragraph);
|
|
26963
|
+
if (listType === 'ol' && listStart > 1) {
|
|
26964
|
+
currentList.setAttribute('start', listStart.toString());
|
|
26965
|
+
}
|
|
26966
|
+
if (parentListItem) {
|
|
26967
|
+
parentListItem.appendChild(currentList);
|
|
26968
|
+
}
|
|
26969
|
+
else {
|
|
26970
|
+
paragraph.parentNode.insertBefore(currentList, paragraph);
|
|
26971
|
+
}
|
|
26972
|
+
listStack[stackIndex] = currentList;
|
|
26973
|
+
listParents[stackIndex] = listParent;
|
|
27373
26974
|
}
|
|
26975
|
+
listStack.length = level;
|
|
26976
|
+
listParents.length = level;
|
|
26977
|
+
currentList.appendChild(listItem);
|
|
26978
|
+
paragraph.remove();
|
|
26979
|
+
previousListId = listId;
|
|
27374
26980
|
});
|
|
27375
26981
|
}
|
|
27376
26982
|
isWordListParagraph(node) {
|
|
@@ -27380,39 +26986,8 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
|
|
|
27380
26986
|
return /MsoListParagraph/i.test(node.className) || /mso-list/i.test(node.getAttribute('style') || '');
|
|
27381
26987
|
}
|
|
27382
26988
|
wordListType(paragraph) {
|
|
27383
|
-
|
|
27384
|
-
|
|
27385
|
-
wordOrderedListTypes(nodes) {
|
|
27386
|
-
const markersByLevel = new Map();
|
|
27387
|
-
nodes.filter((node) => this.isWordListParagraph(node)).forEach((node) => {
|
|
27388
|
-
const marker = this.wordListMarker(node);
|
|
27389
|
-
if (!/^\(?(?:\d+|[a-z]+)[.)]/i.test(marker)) {
|
|
27390
|
-
return;
|
|
27391
|
-
}
|
|
27392
|
-
const key = this.wordListLevelKey(node);
|
|
27393
|
-
markersByLevel.set(key, [...(markersByLevel.get(key) || []), marker]);
|
|
27394
|
-
});
|
|
27395
|
-
const listTypes = new Map();
|
|
27396
|
-
markersByLevel.forEach((markers, key) => {
|
|
27397
|
-
const markerPattern = /^\(?([a-z]+|\d+)[.)]/i;
|
|
27398
|
-
const markerTokens = markers.map((marker) => markerPattern.exec(marker)?.[1]?.toLowerCase());
|
|
27399
|
-
if (markers.some((marker) => /^\([ivxlcdm]+\)/i.test(marker)) ||
|
|
27400
|
-
markerTokens.some((token) => token?.length > 1 && /^[ivxlcdm]+$/.test(token))) {
|
|
27401
|
-
listTypes.set(key, 'i');
|
|
27402
|
-
}
|
|
27403
|
-
else if (markerTokens.every((token) => /^[a-z]$/.test(token || ''))) {
|
|
27404
|
-
listTypes.set(key, 'a');
|
|
27405
|
-
}
|
|
27406
|
-
});
|
|
27407
|
-
return listTypes;
|
|
27408
|
-
}
|
|
27409
|
-
wordListLevelKey(paragraph) {
|
|
27410
|
-
return `${this.wordListId(paragraph) || ''}:${this.wordListDeclaredLevel(paragraph)}`;
|
|
27411
|
-
}
|
|
27412
|
-
wordListMarker(paragraph) {
|
|
27413
|
-
const markerElement = Array.prototype.slice.call(paragraph.querySelectorAll('[style]'))
|
|
27414
|
-
.find((element) => /mso-list:\s*Ignore/i.test(element.getAttribute('style') || ''));
|
|
27415
|
-
return (markerElement ? markerElement.textContent : paragraph.textContent).trim();
|
|
26989
|
+
const marker = paragraph.textContent.trim();
|
|
26990
|
+
return /^(\d+|[a-z]|[ivxlcdm]+)[.)]/i.test(marker) ? 'ol' : 'ul';
|
|
27416
26991
|
}
|
|
27417
26992
|
wordListLevel(paragraph, wordListIndents) {
|
|
27418
26993
|
const declaredLevel = this.wordListDeclaredLevel(paragraph);
|
|
@@ -27431,7 +27006,8 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
|
|
|
27431
27006
|
wordListIndents(nodes) {
|
|
27432
27007
|
const indents = nodes
|
|
27433
27008
|
.filter((node) => this.isWordListParagraph(node))
|
|
27434
|
-
.map((node) => this.wordListIndent(node))
|
|
27009
|
+
.map((node) => this.wordListIndent(node))
|
|
27010
|
+
.filter((indent) => indent > 0);
|
|
27435
27011
|
return Array.from(new Set(indents)).sort((left, right) => left - right);
|
|
27436
27012
|
}
|
|
27437
27013
|
wordListIndent(paragraph) {
|
|
@@ -27440,7 +27016,10 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
|
|
|
27440
27016
|
return Math.round(indent);
|
|
27441
27017
|
}
|
|
27442
27018
|
wordListStart(paragraph) {
|
|
27443
|
-
const
|
|
27019
|
+
const markerElement = Array.prototype.slice.call(paragraph.querySelectorAll('[style]'))
|
|
27020
|
+
.find((element) => /mso-list:\s*Ignore/i.test(element.getAttribute('style') || ''));
|
|
27021
|
+
const marker = (markerElement ? markerElement.textContent : paragraph.textContent).trim();
|
|
27022
|
+
const match = marker.match(/^(\d+)[.)]/);
|
|
27444
27023
|
return match ? Number(match[1]) : 1;
|
|
27445
27024
|
}
|
|
27446
27025
|
copyListItemContents(documentElement, paragraph, listItem) {
|
|
@@ -27489,14 +27068,13 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
|
|
|
27489
27068
|
if (!this.editor?.view) {
|
|
27490
27069
|
return;
|
|
27491
27070
|
}
|
|
27492
|
-
const activeListType = this.activeListNode()?.type.name;
|
|
27493
27071
|
this.activeToolbarCommands = {
|
|
27494
27072
|
bold: this.isMarkActive('strong'),
|
|
27495
27073
|
italic: this.isMarkActive('em'),
|
|
27496
27074
|
underline: this.isMarkActive('u'),
|
|
27497
27075
|
paragraph: this.paragraphCommandApplied && this.isPlainParagraphActive(),
|
|
27498
|
-
ordered_list:
|
|
27499
|
-
bullet_list:
|
|
27076
|
+
ordered_list: this.isNodeActive('ordered_list'),
|
|
27077
|
+
bullet_list: this.isNodeActive('bullet_list')
|
|
27500
27078
|
};
|
|
27501
27079
|
}
|
|
27502
27080
|
updateToolbarStateLater() {
|
|
@@ -27535,7 +27113,6 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
|
|
|
27535
27113
|
}
|
|
27536
27114
|
const listCommand = increase ? sinkListItem(listItemType) : liftListItem(listItemType);
|
|
27537
27115
|
if (listCommand(state, dispatch)) {
|
|
27538
|
-
this.applyOrderedListStyleForCurrentDepth();
|
|
27539
27116
|
return;
|
|
27540
27117
|
}
|
|
27541
27118
|
if (increase && this.changeListIndent(true, state, dispatch)) {
|
|
@@ -27549,35 +27126,6 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
|
|
|
27549
27126
|
this.editor.commands.outdent().exec();
|
|
27550
27127
|
}
|
|
27551
27128
|
}
|
|
27552
|
-
applyOrderedListStyleForCurrentDepth() {
|
|
27553
|
-
const { state, dispatch } = this.editor.view;
|
|
27554
|
-
const { $from } = state.selection;
|
|
27555
|
-
const orderedListDepths = [];
|
|
27556
|
-
let activeOrderedListDepth = null;
|
|
27557
|
-
for (let depth = 1; depth <= $from.depth; depth++) {
|
|
27558
|
-
if ($from.node(depth).type.name === 'ordered_list') {
|
|
27559
|
-
orderedListDepths.push(depth);
|
|
27560
|
-
activeOrderedListDepth = depth;
|
|
27561
|
-
}
|
|
27562
|
-
}
|
|
27563
|
-
if (activeOrderedListDepth === null || orderedListDepths.length < 2) {
|
|
27564
|
-
return;
|
|
27565
|
-
}
|
|
27566
|
-
const activeList = $from.node(activeOrderedListDepth);
|
|
27567
|
-
const parentListDepth = orderedListDepths[orderedListDepths.length - 2];
|
|
27568
|
-
const parentListStyle = $from.node(parentListDepth).attrs.listStyle || 'decimal';
|
|
27569
|
-
const listStyle = this.nextNestedOrderedListStyle(parentListStyle);
|
|
27570
|
-
dispatch(state.tr.setNodeMarkup($from.before(activeOrderedListDepth), activeList.type, {
|
|
27571
|
-
...activeList.attrs,
|
|
27572
|
-
listStyle: listStyle === 'decimal' ? null : listStyle
|
|
27573
|
-
}));
|
|
27574
|
-
}
|
|
27575
|
-
nextNestedOrderedListStyle(parentListStyle) {
|
|
27576
|
-
if (parentListStyle === 'decimal') {
|
|
27577
|
-
return 'lower-alpha';
|
|
27578
|
-
}
|
|
27579
|
-
return 'lower-roman';
|
|
27580
|
-
}
|
|
27581
27129
|
changeListIndent(increase, state, dispatch) {
|
|
27582
27130
|
const { $from } = state.selection;
|
|
27583
27131
|
for (let depth = $from.depth; depth > 0; depth--) {
|
|
@@ -27679,7 +27227,7 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
|
|
|
27679
27227
|
} if (rf & 2) {
|
|
27680
27228
|
let _t;
|
|
27681
27229
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.editorHost = _t.first);
|
|
27682
|
-
} }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls:
|
|
27230
|
+
} }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 63, vars: 37, consts: [["editorHost", ""], [1, "form-group", "ccd-rich-text-area", 3, "ngClass"], [3, "id"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 3, "id", 4, "ngIf"], ["class", "error-message", 3, "id", 4, "ngIf"], [1, "ccd-rich-text-area__editor", 3, "click", "keydown", "keyup", "paste", "ngClass"], ["role", "toolbar", 1, "ccd-rich-text-area__toolbar"], ["type", "button", "aria-label", "Undo", "title", "Undo", "aria-keyshortcuts", "Control+Z", 1, "ccd-rich-text-area__toolbar-button", 3, "mousedown", "click"], ["aria-hidden", "true", 1, "ccd-rich-text-area__toolbar-icon", "ccd-rich-text-area__toolbar-icon--undo"], ["type", "button", "aria-label", "Redo", "title", "Redo", "aria-keyshortcuts", "Control+Y", 1, "ccd-rich-text-area__toolbar-button", 3, "mousedown", "click"], ["aria-hidden", "true", 1, "ccd-rich-text-area__toolbar-icon", "ccd-rich-text-area__toolbar-icon--redo"], ["aria-hidden", "true", 1, "ccd-rich-text-area__toolbar-separator"], ["type", "button", "aria-label", "Bold", "title", "Bold", "aria-keyshortcuts", "Control+B", 1, "ccd-rich-text-area__toolbar-button", "ccd-rich-text-area__toolbar-button--bold", 3, "mousedown", "click", "ngClass"], ["aria-hidden", "true", 1, "ccd-rich-text-area__toolbar-icon", "ccd-rich-text-area__toolbar-icon--bold"], ["type", "button", "aria-label", "Italic", "title", "Italic", "aria-keyshortcuts", "Control+I", 1, "ccd-rich-text-area__toolbar-button", "ccd-rich-text-area__toolbar-button--italic", 3, "mousedown", "click", "ngClass"], ["aria-hidden", "true", 1, "ccd-rich-text-area__toolbar-icon", "ccd-rich-text-area__toolbar-icon--italic"], ["type", "button", "aria-label", "Underline", "title", "Underline", "aria-keyshortcuts", "Control+U", 1, "ccd-rich-text-area__toolbar-button", "ccd-rich-text-area__toolbar-button--underline", 3, "mousedown", "click", "ngClass"], ["aria-hidden", "true", 1, "ccd-rich-text-area__toolbar-icon", "ccd-rich-text-area__toolbar-icon--underline"], ["type", "button", "aria-label", "Paragraph", "title", "Paragraph", 1, "ccd-rich-text-area__toolbar-button", "ccd-rich-text-area__toolbar-button--paragraph", 3, "mousedown", "click", "ngClass"], ["aria-hidden", "true", 1, "ccd-rich-text-area__toolbar-icon", "ccd-rich-text-area__toolbar-icon--paragraph"], ["type", "button", "aria-label", "Ordered List", "title", "Ordered List", 1, "ccd-rich-text-area__toolbar-button", 3, "mousedown", "click", "ngClass"], ["aria-hidden", "true", 1, "ccd-rich-text-area__list-icon", "ccd-rich-text-area__list-icon--ordered"], [1, "ccd-rich-text-area__list-marker"], [1, "ccd-rich-text-area__list-line"], ["type", "button", "aria-label", "Bullet List", "title", "Bullet List", 1, "ccd-rich-text-area__toolbar-button", 3, "mousedown", "click", "ngClass"], ["aria-hidden", "true", 1, "ccd-rich-text-area__list-icon", "ccd-rich-text-area__list-icon--bullet"], ["type", "button", "aria-label", "Decrease Indent", "title", "Decrease Indent", 1, "ccd-rich-text-area__toolbar-button", 3, "mousedown", "click"], ["aria-hidden", "true", 1, "ccd-rich-text-area__indent-icon", "ccd-rich-text-area__indent-icon--outdent"], [1, "ccd-rich-text-area__indent-line", "ccd-rich-text-area__indent-line--top"], [1, "ccd-rich-text-area__indent-line", "ccd-rich-text-area__indent-line--middle"], [1, "ccd-rich-text-area__indent-line", "ccd-rich-text-area__indent-line--bottom"], [1, "ccd-rich-text-area__indent-arrow"], ["type", "button", "aria-label", "Increase Indent", "title", "Increase Indent", 1, "ccd-rich-text-area__toolbar-button", 3, "mousedown", "click"], ["aria-hidden", "true", 1, "ccd-rich-text-area__indent-icon", "ccd-rich-text-area__indent-icon--indent"], [1, "NgxEditor__Wrapper"], ["outputFormat", "html", 3, "focusIn", "focusOut", "editor", "formControl"], [1, "form-label"], [1, "form-hint", 3, "id"], [1, "error-message", 3, "id"]], template: function WriteRichTextAreaFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
27683
27231
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
27684
27232
|
i0.ɵɵelementStart(0, "div", 1)(1, "div", 2);
|
|
27685
27233
|
i0.ɵɵtemplate(2, WriteRichTextAreaFieldComponent_span_2_Template, 3, 3, "span", 3);
|
|
@@ -27689,97 +27237,80 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
|
|
|
27689
27237
|
i0.ɵɵlistener("click", function WriteRichTextAreaFieldComponent_Template_div_click_5_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.syncAccessibilityLater()); })("keydown", function WriteRichTextAreaFieldComponent_Template_div_keydown_5_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onEditorKeyDown($event)); })("keyup", function WriteRichTextAreaFieldComponent_Template_div_keyup_5_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.syncAccessibilityLater()); })("paste", function WriteRichTextAreaFieldComponent_Template_div_paste_5_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onPaste($event)); });
|
|
27690
27238
|
i0.ɵɵelementStart(7, "div", 7)(8, "button", 8);
|
|
27691
27239
|
i0.ɵɵlistener("mousedown", function WriteRichTextAreaFieldComponent_Template_button_mousedown_8_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onToolbarButtonMouseDown($event)); })("click", function WriteRichTextAreaFieldComponent_Template_button_click_8_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.executeToolbarCommand($event, "undo")); });
|
|
27692
|
-
i0.ɵɵ
|
|
27693
|
-
i0.ɵɵ
|
|
27694
|
-
i0.ɵɵelement(10, "path", 10);
|
|
27240
|
+
i0.ɵɵelementStart(9, "span", 9);
|
|
27241
|
+
i0.ɵɵtext(10, "\u21B6");
|
|
27695
27242
|
i0.ɵɵelementEnd()();
|
|
27696
|
-
i0.ɵɵ
|
|
27697
|
-
i0.ɵɵelementStart(11, "button", 11);
|
|
27243
|
+
i0.ɵɵelementStart(11, "button", 10);
|
|
27698
27244
|
i0.ɵɵlistener("mousedown", function WriteRichTextAreaFieldComponent_Template_button_mousedown_11_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onToolbarButtonMouseDown($event)); })("click", function WriteRichTextAreaFieldComponent_Template_button_click_11_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.executeToolbarCommand($event, "redo")); });
|
|
27699
|
-
i0.ɵɵ
|
|
27700
|
-
i0.ɵɵ
|
|
27701
|
-
i0.ɵɵelement(13, "path", 12);
|
|
27245
|
+
i0.ɵɵelementStart(12, "span", 11);
|
|
27246
|
+
i0.ɵɵtext(13, "\u21B7");
|
|
27702
27247
|
i0.ɵɵelementEnd()();
|
|
27703
|
-
i0.ɵɵ
|
|
27704
|
-
i0.ɵɵ
|
|
27705
|
-
i0.ɵɵelementStart(15, "button", 14);
|
|
27248
|
+
i0.ɵɵelement(14, "span", 12);
|
|
27249
|
+
i0.ɵɵelementStart(15, "button", 13);
|
|
27706
27250
|
i0.ɵɵlistener("mousedown", function WriteRichTextAreaFieldComponent_Template_button_mousedown_15_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onToolbarButtonMouseDown($event)); })("click", function WriteRichTextAreaFieldComponent_Template_button_click_15_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.executeToolbarCommand($event, "bold")); });
|
|
27707
|
-
i0.ɵɵ
|
|
27708
|
-
i0.ɵɵ
|
|
27709
|
-
i0.ɵɵelement(17, "path", 15);
|
|
27251
|
+
i0.ɵɵelementStart(16, "span", 14);
|
|
27252
|
+
i0.ɵɵtext(17, "B");
|
|
27710
27253
|
i0.ɵɵelementEnd()();
|
|
27711
|
-
i0.ɵɵ
|
|
27712
|
-
i0.ɵɵelementStart(18, "button", 16);
|
|
27254
|
+
i0.ɵɵelementStart(18, "button", 15);
|
|
27713
27255
|
i0.ɵɵlistener("mousedown", function WriteRichTextAreaFieldComponent_Template_button_mousedown_18_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onToolbarButtonMouseDown($event)); })("click", function WriteRichTextAreaFieldComponent_Template_button_click_18_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.executeToolbarCommand($event, "italic")); });
|
|
27714
|
-
i0.ɵɵ
|
|
27715
|
-
i0.ɵɵ
|
|
27716
|
-
i0.ɵɵelement(20, "path", 17);
|
|
27256
|
+
i0.ɵɵelementStart(19, "span", 16);
|
|
27257
|
+
i0.ɵɵtext(20, "I");
|
|
27717
27258
|
i0.ɵɵelementEnd()();
|
|
27718
|
-
i0.ɵɵ
|
|
27719
|
-
i0.ɵɵelementStart(21, "button", 18);
|
|
27259
|
+
i0.ɵɵelementStart(21, "button", 17);
|
|
27720
27260
|
i0.ɵɵlistener("mousedown", function WriteRichTextAreaFieldComponent_Template_button_mousedown_21_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onToolbarButtonMouseDown($event)); })("click", function WriteRichTextAreaFieldComponent_Template_button_click_21_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.executeToolbarCommand($event, "underline")); });
|
|
27721
|
-
i0.ɵɵ
|
|
27722
|
-
i0.ɵɵ
|
|
27723
|
-
i0.ɵɵelement(23, "path", 19);
|
|
27261
|
+
i0.ɵɵelementStart(22, "span", 18);
|
|
27262
|
+
i0.ɵɵtext(23, "U");
|
|
27724
27263
|
i0.ɵɵelementEnd()();
|
|
27725
|
-
i0.ɵɵ
|
|
27726
|
-
i0.ɵɵelementStart(24, "button", 20);
|
|
27264
|
+
i0.ɵɵelementStart(24, "button", 19);
|
|
27727
27265
|
i0.ɵɵlistener("mousedown", function WriteRichTextAreaFieldComponent_Template_button_mousedown_24_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onToolbarButtonMouseDown($event)); })("click", function WriteRichTextAreaFieldComponent_Template_button_click_24_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.executeToolbarCommand($event, "paragraph")); });
|
|
27728
|
-
i0.ɵɵelementStart(25, "span",
|
|
27266
|
+
i0.ɵɵelementStart(25, "span", 20);
|
|
27729
27267
|
i0.ɵɵtext(26, "P");
|
|
27730
27268
|
i0.ɵɵelementEnd()();
|
|
27731
|
-
i0.ɵɵ
|
|
27732
|
-
i0.ɵɵ
|
|
27733
|
-
i0.ɵɵ
|
|
27734
|
-
i0.ɵɵ
|
|
27735
|
-
i0.ɵɵ
|
|
27736
|
-
i0.ɵɵelement(
|
|
27737
|
-
i0.ɵɵ
|
|
27738
|
-
i0.ɵɵ
|
|
27739
|
-
i0.ɵɵelementStart(31, "button", 24);
|
|
27740
|
-
i0.ɵɵlistener("mousedown", function WriteRichTextAreaFieldComponent_Template_button_mousedown_31_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onToolbarButtonMouseDown($event)); })("click", function WriteRichTextAreaFieldComponent_Template_button_click_31_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.executeToolbarCommand($event, "ordered_list")); });
|
|
27741
|
-
i0.ɵɵnamespaceSVG();
|
|
27742
|
-
i0.ɵɵelementStart(32, "svg", 9);
|
|
27743
|
-
i0.ɵɵelement(33, "path", 25);
|
|
27744
|
-
i0.ɵɵelementEnd()();
|
|
27745
|
-
i0.ɵɵnamespaceHTML();
|
|
27746
|
-
i0.ɵɵelementStart(34, "div", 26)(35, "label", 27);
|
|
27747
|
-
i0.ɵɵtext(36, "List style");
|
|
27269
|
+
i0.ɵɵelementStart(27, "button", 21);
|
|
27270
|
+
i0.ɵɵlistener("mousedown", function WriteRichTextAreaFieldComponent_Template_button_mousedown_27_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onToolbarButtonMouseDown($event)); })("click", function WriteRichTextAreaFieldComponent_Template_button_click_27_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.executeToolbarCommand($event, "ordered_list")); });
|
|
27271
|
+
i0.ɵɵelementStart(28, "span", 22)(29, "span", 23);
|
|
27272
|
+
i0.ɵɵtext(30, "1");
|
|
27273
|
+
i0.ɵɵelementEnd();
|
|
27274
|
+
i0.ɵɵelement(31, "span", 24);
|
|
27275
|
+
i0.ɵɵelementStart(32, "span", 23);
|
|
27276
|
+
i0.ɵɵtext(33, "2");
|
|
27748
27277
|
i0.ɵɵelementEnd();
|
|
27749
|
-
i0.ɵɵ
|
|
27750
|
-
i0.ɵɵ
|
|
27751
|
-
i0.ɵɵ
|
|
27752
|
-
i0.ɵɵtext(39, "No list");
|
|
27278
|
+
i0.ɵɵelement(34, "span", 24);
|
|
27279
|
+
i0.ɵɵelementStart(35, "span", 23);
|
|
27280
|
+
i0.ɵɵtext(36, "3");
|
|
27753
27281
|
i0.ɵɵelementEnd();
|
|
27754
|
-
i0.ɵɵ
|
|
27755
|
-
i0.ɵɵ
|
|
27282
|
+
i0.ɵɵelement(37, "span", 24);
|
|
27283
|
+
i0.ɵɵelementEnd()();
|
|
27284
|
+
i0.ɵɵelementStart(38, "button", 25);
|
|
27285
|
+
i0.ɵɵlistener("mousedown", function WriteRichTextAreaFieldComponent_Template_button_mousedown_38_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onToolbarButtonMouseDown($event)); })("click", function WriteRichTextAreaFieldComponent_Template_button_click_38_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.executeToolbarCommand($event, "bullet_list")); });
|
|
27286
|
+
i0.ɵɵelementStart(39, "span", 26)(40, "span", 23);
|
|
27287
|
+
i0.ɵɵtext(41, "\u2022");
|
|
27756
27288
|
i0.ɵɵelementEnd();
|
|
27757
|
-
i0.ɵɵ
|
|
27758
|
-
i0.ɵɵ
|
|
27289
|
+
i0.ɵɵelement(42, "span", 24);
|
|
27290
|
+
i0.ɵɵelementStart(43, "span", 23);
|
|
27291
|
+
i0.ɵɵtext(44, "\u2022");
|
|
27759
27292
|
i0.ɵɵelementEnd();
|
|
27760
|
-
i0.ɵɵ
|
|
27761
|
-
i0.ɵɵ
|
|
27762
|
-
i0.ɵɵ
|
|
27763
|
-
i0.ɵɵ
|
|
27764
|
-
i0.ɵɵ
|
|
27765
|
-
i0.ɵɵ
|
|
27766
|
-
i0.ɵɵ
|
|
27767
|
-
i0.ɵɵ
|
|
27768
|
-
i0.ɵɵ
|
|
27293
|
+
i0.ɵɵelement(45, "span", 24);
|
|
27294
|
+
i0.ɵɵelementStart(46, "span", 23);
|
|
27295
|
+
i0.ɵɵtext(47, "\u2022");
|
|
27296
|
+
i0.ɵɵelementEnd();
|
|
27297
|
+
i0.ɵɵelement(48, "span", 24);
|
|
27298
|
+
i0.ɵɵelementEnd()();
|
|
27299
|
+
i0.ɵɵelementStart(49, "button", 27);
|
|
27300
|
+
i0.ɵɵlistener("mousedown", function WriteRichTextAreaFieldComponent_Template_button_mousedown_49_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onToolbarButtonMouseDown($event)); })("click", function WriteRichTextAreaFieldComponent_Template_button_click_49_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.executeToolbarCommand($event, "outdent")); });
|
|
27301
|
+
i0.ɵɵelementStart(50, "span", 28);
|
|
27302
|
+
i0.ɵɵelement(51, "span", 29)(52, "span", 30)(53, "span", 31)(54, "span", 32);
|
|
27769
27303
|
i0.ɵɵelementEnd()();
|
|
27770
|
-
i0.ɵɵ
|
|
27771
|
-
i0.ɵɵ
|
|
27772
|
-
i0.ɵɵ
|
|
27773
|
-
i0.ɵɵ
|
|
27774
|
-
i0.ɵɵelementStart(51, "svg", 9);
|
|
27775
|
-
i0.ɵɵelement(52, "path", 36);
|
|
27304
|
+
i0.ɵɵelementStart(55, "button", 33);
|
|
27305
|
+
i0.ɵɵlistener("mousedown", function WriteRichTextAreaFieldComponent_Template_button_mousedown_55_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onToolbarButtonMouseDown($event)); })("click", function WriteRichTextAreaFieldComponent_Template_button_click_55_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.executeToolbarCommand($event, "indent")); });
|
|
27306
|
+
i0.ɵɵelementStart(56, "span", 34);
|
|
27307
|
+
i0.ɵɵelement(57, "span", 29)(58, "span", 30)(59, "span", 31)(60, "span", 32);
|
|
27776
27308
|
i0.ɵɵelementEnd()()();
|
|
27777
|
-
i0.ɵɵ
|
|
27778
|
-
i0.ɵɵ
|
|
27779
|
-
i0.ɵɵlistener("focusIn", function WriteRichTextAreaFieldComponent_Template_ngx_editor_focusIn_54_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.syncAccessibilityLater()); })("focusOut", function WriteRichTextAreaFieldComponent_Template_ngx_editor_focusOut_54_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onEditorFocusOut()); });
|
|
27309
|
+
i0.ɵɵelementStart(61, "div", 35)(62, "ngx-editor", 36);
|
|
27310
|
+
i0.ɵɵlistener("focusIn", function WriteRichTextAreaFieldComponent_Template_ngx_editor_focusIn_62_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.syncAccessibilityLater()); })("focusOut", function WriteRichTextAreaFieldComponent_Template_ngx_editor_focusOut_62_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onEditorFocusOut()); });
|
|
27780
27311
|
i0.ɵɵelementEnd()()()();
|
|
27781
27312
|
} if (rf & 2) {
|
|
27782
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(
|
|
27313
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(21, _c1$e, !ctx.richTextAreaControl.valid && ctx.richTextAreaControl.dirty));
|
|
27783
27314
|
i0.ɵɵadvance();
|
|
27784
27315
|
i0.ɵɵproperty("id", ctx.labelId());
|
|
27785
27316
|
i0.ɵɵadvance();
|
|
@@ -27789,43 +27320,39 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
|
|
|
27789
27320
|
i0.ɵɵadvance();
|
|
27790
27321
|
i0.ɵɵproperty("ngIf", ctx.isInvalid());
|
|
27791
27322
|
i0.ɵɵadvance();
|
|
27792
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(
|
|
27323
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(23, _c2$3, ctx.isInvalid()));
|
|
27793
27324
|
i0.ɵɵadvance(2);
|
|
27794
27325
|
i0.ɵɵattribute("aria-label", ctx.toolbarLabel());
|
|
27795
27326
|
i0.ɵɵadvance(8);
|
|
27796
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(
|
|
27327
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(25, _c3, ctx.isToolbarCommandActive("bold")));
|
|
27797
27328
|
i0.ɵɵattribute("aria-pressed", ctx.isToolbarCommandActive("bold"));
|
|
27798
27329
|
i0.ɵɵadvance(3);
|
|
27799
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(
|
|
27330
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(27, _c3, ctx.isToolbarCommandActive("italic")));
|
|
27800
27331
|
i0.ɵɵattribute("aria-pressed", ctx.isToolbarCommandActive("italic"));
|
|
27801
27332
|
i0.ɵɵadvance(3);
|
|
27802
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(
|
|
27333
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(29, _c3, ctx.isToolbarCommandActive("underline")));
|
|
27803
27334
|
i0.ɵɵattribute("aria-pressed", ctx.isToolbarCommandActive("underline"));
|
|
27804
27335
|
i0.ɵɵadvance(3);
|
|
27805
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(
|
|
27336
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(31, _c3, ctx.isToolbarCommandActive("paragraph")));
|
|
27806
27337
|
i0.ɵɵattribute("aria-pressed", ctx.isToolbarCommandActive("paragraph"));
|
|
27807
|
-
i0.ɵɵadvance(4);
|
|
27808
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(36, _c3, ctx.isToolbarCommandActive("bullet_list")));
|
|
27809
|
-
i0.ɵɵattribute("aria-pressed", ctx.isToolbarCommandActive("bullet_list"));
|
|
27810
27338
|
i0.ɵɵadvance(3);
|
|
27811
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(
|
|
27812
|
-
i0.ɵɵattribute("aria-pressed", ctx.
|
|
27813
|
-
i0.ɵɵadvance(
|
|
27814
|
-
i0.ɵɵproperty("
|
|
27815
|
-
i0.ɵɵ
|
|
27816
|
-
i0.ɵɵ
|
|
27817
|
-
i0.ɵɵadvance(17);
|
|
27339
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(33, _c3, ctx.isToolbarCommandActive("ordered_list")));
|
|
27340
|
+
i0.ɵɵattribute("aria-pressed", ctx.isToolbarCommandActive("ordered_list"));
|
|
27341
|
+
i0.ɵɵadvance(11);
|
|
27342
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(35, _c3, ctx.isToolbarCommandActive("bullet_list")));
|
|
27343
|
+
i0.ɵɵattribute("aria-pressed", ctx.isToolbarCommandActive("bullet_list"));
|
|
27344
|
+
i0.ɵɵadvance(24);
|
|
27818
27345
|
i0.ɵɵproperty("editor", ctx.editor)("formControl", ctx.richTextAreaControl);
|
|
27819
|
-
} }, dependencies: [i5.NgClass, i5.NgIf, i4.
|
|
27346
|
+
} }, dependencies: [i5.NgClass, i5.NgIf, i4.NgControlStatus, i4.FormControlDirective, i3$1.NgxEditorComponent, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], styles: [".ccd-rich-text-area{margin-bottom:30px}.ccd-rich-text-area__editor{max-width:100%}.ccd-rich-text-area__toolbar{align-items:center;display:flex;flex-wrap:wrap;gap:0 4px;margin-bottom:6px}.ccd-rich-text-area .NgxEditor__Wrapper{border:1px solid #000;border-radius:0;max-width:100%;width:100%}.ccd-rich-text-area .NgxEditor__Wrapper:focus-within{outline:3px solid #ffdd00;outline-offset:0}.ccd-rich-text-area__toolbar-button{background:#fff;align-items:center;border:1px solid #0b0c0c;border-radius:0;color:#0b0c0c;display:inline-flex;font-family:inherit;font-size:18px;font-weight:700;height:36px;justify-content:center;min-width:36px;padding:4px;width:36px}.ccd-rich-text-area__toolbar-button:hover{background:#f3f2f1}.ccd-rich-text-area__toolbar-button:focus{background:#fd0;box-shadow:0 0 0 2px #0b0c0c;outline:3px solid #ffdd00;outline-offset:0}.ccd-rich-text-area__toolbar-button--active{background:#1d70b8;color:#fff}.ccd-rich-text-area__toolbar-button--italic{font-style:italic}.ccd-rich-text-area__toolbar-button--underline{text-decoration:underline}.ccd-rich-text-area__toolbar-separator{border-left:1px solid #b1b4b6;height:36px;margin:0 8px 0 6px}.ccd-rich-text-area__toolbar-icon{display:inline-flex;line-height:1}.ccd-rich-text-area__toolbar-icon--undo,.ccd-rich-text-area__toolbar-icon--redo{font-size:23px;font-weight:400;transform:translateY(-1px)}.ccd-rich-text-area__toolbar-icon--bold{font-size:18px}.ccd-rich-text-area__toolbar-icon--italic{color:inherit;font-size:18px;font-style:italic}.ccd-rich-text-area__toolbar-icon--underline{font-size:18px;text-decoration:underline;text-underline-offset:3px}.ccd-rich-text-area__toolbar-icon--paragraph{font-size:18px}.ccd-rich-text-area__list-icon{column-gap:2px;display:grid;grid-template-columns:8px 13px;grid-template-rows:repeat(3,5px);height:17px;width:23px}.ccd-rich-text-area__list-marker{align-self:center;font-size:9px;font-weight:700;line-height:1;text-align:right}.ccd-rich-text-area__list-icon--ordered .ccd-rich-text-area__list-marker:after{content:\".\"}.ccd-rich-text-area__list-icon--bullet .ccd-rich-text-area__list-marker{font-size:14px;line-height:.5}.ccd-rich-text-area__list-line{align-self:center;border-top:2px solid currentColor;display:block;width:12px}.ccd-rich-text-area__indent-icon{display:block;height:18px;position:relative;width:23px}.ccd-rich-text-area__indent-line{background:currentColor;display:block;height:2px;position:absolute;right:0}.ccd-rich-text-area__indent-line--top{top:3px;width:18px}.ccd-rich-text-area__indent-line--middle{top:8px;width:13px}.ccd-rich-text-area__indent-line--bottom{top:13px;width:18px}.ccd-rich-text-area__indent-arrow{background:currentColor;display:block;height:2px;left:1px;position:absolute;top:8px;width:9px}.ccd-rich-text-area__indent-arrow:before,.ccd-rich-text-area__indent-arrow:after{background:currentColor;content:\"\";display:block;height:2px;position:absolute;top:0;width:6px}.ccd-rich-text-area__indent-icon--outdent .ccd-rich-text-area__indent-arrow:before{left:-1px;transform:rotate(45deg);transform-origin:left center}.ccd-rich-text-area__indent-icon--outdent .ccd-rich-text-area__indent-arrow:after{left:-1px;transform:rotate(-45deg);transform-origin:left center}.ccd-rich-text-area__indent-icon--indent .ccd-rich-text-area__indent-arrow:before{right:-1px;transform:rotate(45deg);transform-origin:right center}.ccd-rich-text-area__indent-icon--indent .ccd-rich-text-area__indent-arrow:after{right:-1px;transform:rotate(-45deg);transform-origin:right center}.ccd-rich-text-area .NgxEditor__Wrapper .NgxEditor{border:0;border-radius:0;height:255px;min-height:255px;overflow:hidden;width:100%}.ccd-rich-text-area__editor--error .NgxEditor__Wrapper{border-color:#d4351c}.ccd-rich-text-area .NgxEditor__Content{box-sizing:border-box;height:255px;min-height:255px;overflow-x:hidden;overflow-y:auto;padding:12px 14px}.ccd-rich-text-area .ProseMirror{min-height:231px;outline:0;overflow-wrap:anywhere;white-space:pre-wrap;word-break:normal}.ccd-rich-text-area .ProseMirror [data-indent=\"1\"]{margin-left:40px}.ccd-rich-text-area .ProseMirror [data-indent=\"2\"]{margin-left:80px}.ccd-rich-text-area .ProseMirror [data-indent=\"3\"]{margin-left:120px}.ccd-rich-text-area .ProseMirror [data-indent=\"4\"]{margin-left:160px}.ccd-rich-text-area .ProseMirror [data-indent=\"5\"]{margin-left:200px}.ccd-rich-text-area .ProseMirror [data-indent=\"6\"]{margin-left:240px}.ccd-rich-text-area .ProseMirror strong,.ccd-rich-text-area .ProseMirror strong *,.ccd-rich-text-area .ProseMirror b,.ccd-rich-text-area .ProseMirror b *{font-weight:700}.ccd-rich-text-area .ProseMirror strong u,.ccd-rich-text-area .ProseMirror u strong,.ccd-rich-text-area .ProseMirror b u,.ccd-rich-text-area .ProseMirror u b{font-weight:700!important;text-decoration:underline}.ccd-rich-text-area .ProseMirror:focus{box-shadow:none;outline:0}.ccd-rich-text-area .ProseMirror p,.ccd-rich-text-area .ProseMirror ul,.ccd-rich-text-area .ProseMirror ol{margin-top:0;overflow-wrap:anywhere;word-break:normal}.ccd-rich-text-area .ProseMirror ul{list-style:disc outside;padding-left:25px}.ccd-rich-text-area .ProseMirror ol{list-style:decimal outside;padding-left:25px}.ccd-rich-text-area .ProseMirror li{display:list-item;margin-bottom:5px}.ccd-rich-text-area .ProseMirror li>p{margin:0}\n"], encapsulation: 2 });
|
|
27820
27347
|
}
|
|
27821
27348
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteRichTextAreaFieldComponent, [{
|
|
27822
27349
|
type: Component,
|
|
27823
|
-
args: [{ selector: 'ccd-write-rich-text-area-field', encapsulation: ViewEncapsulation.None, standalone: false, template: "<div class=\"form-group ccd-rich-text-area\" [ngClass]=\"{'form-group-error': !richTextAreaControl.valid && richTextAreaControl.dirty}\">\n <div [id]=\"labelId()\">\n <span class=\"form-label\" *ngIf=\"caseField.label\">{{caseField | ccdFieldLabel}}</span>\n </div>\n <span [id]=\"hintId()\" class=\"form-hint\" *ngIf=\"caseField.hint_text\">{{caseField.hint_text | rpxTranslate}}</span>\n <span [id]=\"errorId()\" class=\"error-message\" *ngIf=\"isInvalid()\">\n {{richTextAreaControl.errors | ccdFirstError:caseField.label}}\n </span>\n\n <div\n #editorHost\n class=\"ccd-rich-text-area__editor\"\n [ngClass]=\"{'ccd-rich-text-area__editor--error': isInvalid()}\"\n (click)=\"syncAccessibilityLater()\"\n (keydown)=\"onEditorKeyDown($event)\"\n (keyup)=\"syncAccessibilityLater()\"\n (paste)=\"onPaste($event)\">\n <div\n class=\"ccd-rich-text-area__toolbar\"\n role=\"toolbar\"\n [attr.aria-label]=\"toolbarLabel()\">\n <button\n type=\"button\"\n class=\"ccd-rich-text-area__toolbar-button\"\n aria-label=\"Undo\"\n title=\"Undo\"\n aria-keyshortcuts=\"Control+Z\"\n (mousedown)=\"onToolbarButtonMouseDown($event)\"\n (click)=\"executeToolbarCommand($event, 'undo')\">\n <svg class=\"ccd-rich-text-area__toolbar-icon\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z\"></path>\n </svg>\n </button>\n <button\n type=\"button\"\n class=\"ccd-rich-text-area__toolbar-button\"\n aria-label=\"Redo\"\n title=\"Redo\"\n aria-keyshortcuts=\"Control+Y\"\n (mousedown)=\"onToolbarButtonMouseDown($event)\"\n (click)=\"executeToolbarCommand($event, 'redo')\">\n <svg class=\"ccd-rich-text-area__toolbar-icon\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z\"></path>\n </svg>\n </button>\n <span class=\"ccd-rich-text-area__toolbar-separator\" aria-hidden=\"true\"></span>\n <button\n type=\"button\"\n class=\"ccd-rich-text-area__toolbar-button ccd-rich-text-area__toolbar-button--bold\"\n [ngClass]=\"{'ccd-rich-text-area__toolbar-button--active': isToolbarCommandActive('bold')}\"\n [attr.aria-pressed]=\"isToolbarCommandActive('bold')\"\n aria-label=\"Bold\"\n title=\"Bold\"\n aria-keyshortcuts=\"Control+B\"\n (mousedown)=\"onToolbarButtonMouseDown($event)\"\n (click)=\"executeToolbarCommand($event, 'bold')\">\n <svg class=\"ccd-rich-text-area__toolbar-icon\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42zM10 6.5h3c.83 0 1.5.67 1.5 1.5S13.83 9.5 13 9.5h-3v-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5z\"></path>\n </svg>\n </button>\n <button\n type=\"button\"\n class=\"ccd-rich-text-area__toolbar-button ccd-rich-text-area__toolbar-button--italic\"\n [ngClass]=\"{'ccd-rich-text-area__toolbar-button--active': isToolbarCommandActive('italic')}\"\n [attr.aria-pressed]=\"isToolbarCommandActive('italic')\"\n aria-label=\"Italic\"\n title=\"Italic\"\n aria-keyshortcuts=\"Control+I\"\n (mousedown)=\"onToolbarButtonMouseDown($event)\"\n (click)=\"executeToolbarCommand($event, 'italic')\">\n <svg class=\"ccd-rich-text-area__toolbar-icon\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z\"></path>\n </svg>\n </button>\n <button\n type=\"button\"\n class=\"ccd-rich-text-area__toolbar-button ccd-rich-text-area__toolbar-button--underline\"\n [ngClass]=\"{'ccd-rich-text-area__toolbar-button--active': isToolbarCommandActive('underline')}\"\n [attr.aria-pressed]=\"isToolbarCommandActive('underline')\"\n aria-label=\"Underline\"\n title=\"Underline\"\n aria-keyshortcuts=\"Control+U\"\n (mousedown)=\"onToolbarButtonMouseDown($event)\"\n (click)=\"executeToolbarCommand($event, 'underline')\">\n <svg class=\"ccd-rich-text-area__toolbar-icon\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6zm-7 2v2h14v-2H5z\"></path>\n </svg>\n </button>\n <button\n type=\"button\"\n class=\"ccd-rich-text-area__toolbar-button ccd-rich-text-area__toolbar-button--paragraph\"\n [ngClass]=\"{'ccd-rich-text-area__toolbar-button--active': isToolbarCommandActive('paragraph')}\"\n [attr.aria-pressed]=\"isToolbarCommandActive('paragraph')\"\n aria-label=\"Paragraph\"\n title=\"Paragraph\"\n (mousedown)=\"onToolbarButtonMouseDown($event)\"\n (click)=\"executeToolbarCommand($event, 'paragraph')\">\n <span class=\"ccd-rich-text-area__toolbar-icon ccd-rich-text-area__toolbar-icon--paragraph\" aria-hidden=\"true\">P</span>\n </button>\n <span class=\"ccd-rich-text-area__toolbar-separator\" aria-hidden=\"true\"></span>\n <button\n type=\"button\"\n class=\"ccd-rich-text-area__toolbar-button\"\n [ngClass]=\"{'ccd-rich-text-area__toolbar-button--active': isToolbarCommandActive('bullet_list')}\"\n [attr.aria-pressed]=\"isToolbarCommandActive('bullet_list')\"\n aria-label=\"Bullet List\"\n title=\"Bullet List\"\n (mousedown)=\"onToolbarButtonMouseDown($event)\"\n (click)=\"executeToolbarCommand($event, 'bullet_list')\">\n <svg class=\"ccd-rich-text-area__toolbar-icon\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-6C3.17 4.5 2.5 5.17 2.5 6S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5zm0 12c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zM7 13h14v-2H7v2zm0 6h14v-2H7v2zM7 5v2h14V5H7z\"></path>\n </svg>\n </button>\n <button\n type=\"button\"\n class=\"ccd-rich-text-area__toolbar-button\"\n [ngClass]=\"{'ccd-rich-text-area__toolbar-button--active': currentListStyle() === 'ordered_list'}\"\n [attr.aria-pressed]=\"currentListStyle() === 'ordered_list'\"\n aria-label=\"Numbered List\"\n title=\"Numbered List\"\n (mousedown)=\"onToolbarButtonMouseDown($event)\"\n (click)=\"executeToolbarCommand($event, 'ordered_list')\">\n <svg class=\"ccd-rich-text-area__toolbar-icon\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M2 17h2v.5H3v1h1v.5H2v1h3v-4H2v1zm1-9h1V4H2v1h1v3zm-1 3h1.8L2 13.1V14h3v-1H3.2L5 10.9V10H2v1zm5-6v2h14V5H7zm0 14h14v-2H7v2zm0-6h14v-2H7v2z\"></path>\n </svg>\n </button>\n <div class=\"ccd-rich-text-area__list-style\">\n <label class=\"ccd-rich-text-area__list-style-label\" [for]=\"listStyleId()\">List style</label>\n <select\n class=\"ccd-rich-text-area__list-style-select\"\n [id]=\"listStyleId()\"\n [value]=\"currentListSelectValue()\"\n (change)=\"onListStyleChange($event)\">\n <option value=\"\">No list</option>\n <option value=\"ordered_list\">Numbers (1, 2, 3)</option>\n <option value=\"ordered_alpha\">Letters (a, b, c)</option>\n <option value=\"ordered_roman\">Roman numerals (i), (ii), (iii)</option>\n </select>\n </div>\n <span class=\"ccd-rich-text-area__toolbar-separator\" aria-hidden=\"true\"></span>\n <button\n type=\"button\"\n class=\"ccd-rich-text-area__toolbar-button\"\n aria-label=\"Decrease Indent\"\n title=\"Decrease Indent\"\n (mousedown)=\"onToolbarButtonMouseDown($event)\"\n (click)=\"executeToolbarCommand($event, 'outdent')\">\n <svg class=\"ccd-rich-text-area__toolbar-icon\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M11 17h10v-2H11v2zm-8-5 4 4V8l-4 4zm0 9h18v-2H3v2zM3 3v2h18V3H3zm8 6h10V7H11v2zm0 4h10v-2H11v2z\"></path>\n </svg>\n </button>\n <button\n type=\"button\"\n class=\"ccd-rich-text-area__toolbar-button\"\n aria-label=\"Increase Indent\"\n title=\"Increase Indent\"\n (mousedown)=\"onToolbarButtonMouseDown($event)\"\n (click)=\"executeToolbarCommand($event, 'indent')\">\n <svg class=\"ccd-rich-text-area__toolbar-icon\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M3 21h18v-2H3v2zM3 8v8l4-4-4-4zm8 9h10v-2H11v2zM3 3v2h18V3H3zm8 6h10V7H11v2zm0 4h10v-2H11v2z\"></path>\n </svg>\n </button>\n </div>\n\n <div class=\"NgxEditor__Wrapper\">\n <ngx-editor\n [editor]=\"editor\"\n [formControl]=\"richTextAreaControl\"\n outputFormat=\"html\"\n (focusIn)=\"syncAccessibilityLater()\"\n (focusOut)=\"onEditorFocusOut()\">\n </ngx-editor>\n </div>\n </div>\n</div>\n", styles: [".ccd-rich-text-area{margin-bottom:30px}.ccd-rich-text-area__editor{max-width:100%}.ccd-rich-text-area__toolbar{align-items:center;background:#fff;border:1px solid #d8dde0;border-radius:6px;display:flex;flex-wrap:wrap;gap:2px;margin-bottom:10px;padding:6px 8px;width:fit-content}.ccd-rich-text-area .NgxEditor__Wrapper{border:1px solid #000;border-radius:0;max-width:100%;width:100%}.ccd-rich-text-area .NgxEditor__Wrapper:focus-within{outline:3px solid #ffdd00;outline-offset:0}.ccd-rich-text-area__toolbar-button{background:#fff;align-items:center;border:0;border-radius:2px;color:#0b0c0c;display:inline-flex;font-family:inherit;font-size:18px;font-weight:700;height:28px;justify-content:center;min-width:28px;padding:4px;width:28px}.ccd-rich-text-area__toolbar-button:hover{background:#f3f2f1}.ccd-rich-text-area__toolbar-button:focus{background:#fd0;box-shadow:0 0 0 2px #0b0c0c;outline:2px solid #ffdd00;outline-offset:0}.ccd-rich-text-area__toolbar-button--active{background:#1d70b8;color:#fff}.ccd-rich-text-area__toolbar-button--italic{font-style:italic}.ccd-rich-text-area__toolbar-button--underline{text-decoration:underline}.ccd-rich-text-area__toolbar-separator{border-left:1px solid #b1b4b6;height:24px;margin:0 5px 0 3px}.ccd-rich-text-area__list-style{align-items:center;display:inline-flex;gap:8px;margin:0 4px}.ccd-rich-text-area__list-style-label{font-weight:700;white-space:nowrap}.ccd-rich-text-area__list-style-select{background-color:#fff;border:1px solid #0b0c0c;border-radius:0;color:#0b0c0c;font-family:inherit;font-size:16px;height:32px;min-width:190px;padding:2px 28px 2px 8px}.ccd-rich-text-area__list-style-select:focus{box-shadow:0 0 0 2px #0b0c0c;outline:3px solid #ffdd00;outline-offset:0}.ccd-rich-text-area__toolbar-icon{display:block;fill:currentColor;height:20px;width:20px}.ccd-rich-text-area__toolbar-icon--paragraph{display:inline-flex;font-size:18px;line-height:1;width:auto}.ccd-rich-text-area .NgxEditor__Wrapper .NgxEditor{border:0;border-radius:0;height:255px;min-height:255px;overflow:hidden;width:100%}.ccd-rich-text-area__editor--error .NgxEditor__Wrapper{border-color:#d4351c}.ccd-rich-text-area .NgxEditor__Content{box-sizing:border-box;height:255px;min-height:255px;overflow-x:hidden;overflow-y:auto;padding:12px 14px}.ccd-rich-text-area .ProseMirror{min-height:231px;outline:0;overflow-wrap:anywhere;white-space:pre-wrap;word-break:normal}.ccd-rich-text-area .ProseMirror [data-indent=\"1\"]{margin-left:40px}.ccd-rich-text-area .ProseMirror [data-indent=\"2\"]{margin-left:80px}.ccd-rich-text-area .ProseMirror [data-indent=\"3\"]{margin-left:120px}.ccd-rich-text-area .ProseMirror [data-indent=\"4\"]{margin-left:160px}.ccd-rich-text-area .ProseMirror [data-indent=\"5\"]{margin-left:200px}.ccd-rich-text-area .ProseMirror [data-indent=\"6\"]{margin-left:240px}.ccd-rich-text-area .ProseMirror strong,.ccd-rich-text-area .ProseMirror strong *,.ccd-rich-text-area .ProseMirror b,.ccd-rich-text-area .ProseMirror b *{font-weight:700}.ccd-rich-text-area .ProseMirror strong u,.ccd-rich-text-area .ProseMirror u strong,.ccd-rich-text-area .ProseMirror b u,.ccd-rich-text-area .ProseMirror u b{font-weight:700!important;text-decoration:underline}.ccd-rich-text-area .ProseMirror:focus{box-shadow:none;outline:0}.ccd-rich-text-area .ProseMirror p,.ccd-rich-text-area .ProseMirror ul,.ccd-rich-text-area .ProseMirror ol{margin-top:0;overflow-wrap:anywhere;word-break:normal}.ccd-rich-text-area .ProseMirror ul{list-style:disc outside;padding-left:25px}.ccd-rich-text-area .ProseMirror ol{list-style:decimal outside;padding-left:25px}.ccd-rich-text-area .ProseMirror ol[type=a]{list-style-type:lower-alpha}.ccd-rich-text-area .ProseMirror ol[type=i]{list-style-type:lower-roman}.ccd-rich-text-area .ProseMirror ol[type=i]>li::marker{content:\"(\" counter(list-item,lower-roman) \") \"}.ccd-rich-text-area .ProseMirror li{display:list-item;margin-bottom:5px}.ccd-rich-text-area .ProseMirror li>p{margin:0}\n"] }]
|
|
27350
|
+
args: [{ selector: 'ccd-write-rich-text-area-field', encapsulation: ViewEncapsulation.None, standalone: false, template: "<div class=\"form-group ccd-rich-text-area\" [ngClass]=\"{'form-group-error': !richTextAreaControl.valid && richTextAreaControl.dirty}\">\n <div [id]=\"labelId()\">\n <span class=\"form-label\" *ngIf=\"caseField.label\">{{caseField | ccdFieldLabel}}</span>\n </div>\n <span [id]=\"hintId()\" class=\"form-hint\" *ngIf=\"caseField.hint_text\">{{caseField.hint_text | rpxTranslate}}</span>\n <span [id]=\"errorId()\" class=\"error-message\" *ngIf=\"isInvalid()\">\n {{richTextAreaControl.errors | ccdFirstError:caseField.label}}\n </span>\n\n <div\n #editorHost\n class=\"ccd-rich-text-area__editor\"\n [ngClass]=\"{'ccd-rich-text-area__editor--error': isInvalid()}\"\n (click)=\"syncAccessibilityLater()\"\n (keydown)=\"onEditorKeyDown($event)\"\n (keyup)=\"syncAccessibilityLater()\"\n (paste)=\"onPaste($event)\">\n <div\n class=\"ccd-rich-text-area__toolbar\"\n role=\"toolbar\"\n [attr.aria-label]=\"toolbarLabel()\">\n <button\n type=\"button\"\n class=\"ccd-rich-text-area__toolbar-button\"\n aria-label=\"Undo\"\n title=\"Undo\"\n aria-keyshortcuts=\"Control+Z\"\n (mousedown)=\"onToolbarButtonMouseDown($event)\"\n (click)=\"executeToolbarCommand($event, 'undo')\">\n <span class=\"ccd-rich-text-area__toolbar-icon ccd-rich-text-area__toolbar-icon--undo\" aria-hidden=\"true\">↶</span>\n </button>\n <button\n type=\"button\"\n class=\"ccd-rich-text-area__toolbar-button\"\n aria-label=\"Redo\"\n title=\"Redo\"\n aria-keyshortcuts=\"Control+Y\"\n (mousedown)=\"onToolbarButtonMouseDown($event)\"\n (click)=\"executeToolbarCommand($event, 'redo')\">\n <span class=\"ccd-rich-text-area__toolbar-icon ccd-rich-text-area__toolbar-icon--redo\" aria-hidden=\"true\">↷</span>\n </button>\n <span class=\"ccd-rich-text-area__toolbar-separator\" aria-hidden=\"true\"></span>\n <button\n type=\"button\"\n class=\"ccd-rich-text-area__toolbar-button ccd-rich-text-area__toolbar-button--bold\"\n [ngClass]=\"{'ccd-rich-text-area__toolbar-button--active': isToolbarCommandActive('bold')}\"\n [attr.aria-pressed]=\"isToolbarCommandActive('bold')\"\n aria-label=\"Bold\"\n title=\"Bold\"\n aria-keyshortcuts=\"Control+B\"\n (mousedown)=\"onToolbarButtonMouseDown($event)\"\n (click)=\"executeToolbarCommand($event, 'bold')\">\n <span class=\"ccd-rich-text-area__toolbar-icon ccd-rich-text-area__toolbar-icon--bold\" aria-hidden=\"true\">B</span>\n </button>\n <button\n type=\"button\"\n class=\"ccd-rich-text-area__toolbar-button ccd-rich-text-area__toolbar-button--italic\"\n [ngClass]=\"{'ccd-rich-text-area__toolbar-button--active': isToolbarCommandActive('italic')}\"\n [attr.aria-pressed]=\"isToolbarCommandActive('italic')\"\n aria-label=\"Italic\"\n title=\"Italic\"\n aria-keyshortcuts=\"Control+I\"\n (mousedown)=\"onToolbarButtonMouseDown($event)\"\n (click)=\"executeToolbarCommand($event, 'italic')\">\n <span class=\"ccd-rich-text-area__toolbar-icon ccd-rich-text-area__toolbar-icon--italic\" aria-hidden=\"true\">I</span>\n </button>\n <button\n type=\"button\"\n class=\"ccd-rich-text-area__toolbar-button ccd-rich-text-area__toolbar-button--underline\"\n [ngClass]=\"{'ccd-rich-text-area__toolbar-button--active': isToolbarCommandActive('underline')}\"\n [attr.aria-pressed]=\"isToolbarCommandActive('underline')\"\n aria-label=\"Underline\"\n title=\"Underline\"\n aria-keyshortcuts=\"Control+U\"\n (mousedown)=\"onToolbarButtonMouseDown($event)\"\n (click)=\"executeToolbarCommand($event, 'underline')\">\n <span class=\"ccd-rich-text-area__toolbar-icon ccd-rich-text-area__toolbar-icon--underline\" aria-hidden=\"true\">U</span>\n </button>\n <button\n type=\"button\"\n class=\"ccd-rich-text-area__toolbar-button ccd-rich-text-area__toolbar-button--paragraph\"\n [ngClass]=\"{'ccd-rich-text-area__toolbar-button--active': isToolbarCommandActive('paragraph')}\"\n [attr.aria-pressed]=\"isToolbarCommandActive('paragraph')\"\n aria-label=\"Paragraph\"\n title=\"Paragraph\"\n (mousedown)=\"onToolbarButtonMouseDown($event)\"\n (click)=\"executeToolbarCommand($event, 'paragraph')\">\n <span class=\"ccd-rich-text-area__toolbar-icon ccd-rich-text-area__toolbar-icon--paragraph\" aria-hidden=\"true\">P</span>\n </button>\n <button\n type=\"button\"\n class=\"ccd-rich-text-area__toolbar-button\"\n [ngClass]=\"{'ccd-rich-text-area__toolbar-button--active': isToolbarCommandActive('ordered_list')}\"\n [attr.aria-pressed]=\"isToolbarCommandActive('ordered_list')\"\n aria-label=\"Ordered List\"\n title=\"Ordered List\"\n (mousedown)=\"onToolbarButtonMouseDown($event)\"\n (click)=\"executeToolbarCommand($event, 'ordered_list')\">\n <span class=\"ccd-rich-text-area__list-icon ccd-rich-text-area__list-icon--ordered\" aria-hidden=\"true\">\n <span class=\"ccd-rich-text-area__list-marker\">1</span>\n <span class=\"ccd-rich-text-area__list-line\"></span>\n <span class=\"ccd-rich-text-area__list-marker\">2</span>\n <span class=\"ccd-rich-text-area__list-line\"></span>\n <span class=\"ccd-rich-text-area__list-marker\">3</span>\n <span class=\"ccd-rich-text-area__list-line\"></span>\n </span>\n </button>\n <button\n type=\"button\"\n class=\"ccd-rich-text-area__toolbar-button\"\n [ngClass]=\"{'ccd-rich-text-area__toolbar-button--active': isToolbarCommandActive('bullet_list')}\"\n [attr.aria-pressed]=\"isToolbarCommandActive('bullet_list')\"\n aria-label=\"Bullet List\"\n title=\"Bullet List\"\n (mousedown)=\"onToolbarButtonMouseDown($event)\"\n (click)=\"executeToolbarCommand($event, 'bullet_list')\">\n <span class=\"ccd-rich-text-area__list-icon ccd-rich-text-area__list-icon--bullet\" aria-hidden=\"true\">\n <span class=\"ccd-rich-text-area__list-marker\">•</span>\n <span class=\"ccd-rich-text-area__list-line\"></span>\n <span class=\"ccd-rich-text-area__list-marker\">•</span>\n <span class=\"ccd-rich-text-area__list-line\"></span>\n <span class=\"ccd-rich-text-area__list-marker\">•</span>\n <span class=\"ccd-rich-text-area__list-line\"></span>\n </span>\n </button>\n <button\n type=\"button\"\n class=\"ccd-rich-text-area__toolbar-button\"\n aria-label=\"Decrease Indent\"\n title=\"Decrease Indent\"\n (mousedown)=\"onToolbarButtonMouseDown($event)\"\n (click)=\"executeToolbarCommand($event, 'outdent')\">\n <span class=\"ccd-rich-text-area__indent-icon ccd-rich-text-area__indent-icon--outdent\" aria-hidden=\"true\">\n <span class=\"ccd-rich-text-area__indent-line ccd-rich-text-area__indent-line--top\"></span>\n <span class=\"ccd-rich-text-area__indent-line ccd-rich-text-area__indent-line--middle\"></span>\n <span class=\"ccd-rich-text-area__indent-line ccd-rich-text-area__indent-line--bottom\"></span>\n <span class=\"ccd-rich-text-area__indent-arrow\"></span>\n </span>\n </button>\n <button\n type=\"button\"\n class=\"ccd-rich-text-area__toolbar-button\"\n aria-label=\"Increase Indent\"\n title=\"Increase Indent\"\n (mousedown)=\"onToolbarButtonMouseDown($event)\"\n (click)=\"executeToolbarCommand($event, 'indent')\">\n <span class=\"ccd-rich-text-area__indent-icon ccd-rich-text-area__indent-icon--indent\" aria-hidden=\"true\">\n <span class=\"ccd-rich-text-area__indent-line ccd-rich-text-area__indent-line--top\"></span>\n <span class=\"ccd-rich-text-area__indent-line ccd-rich-text-area__indent-line--middle\"></span>\n <span class=\"ccd-rich-text-area__indent-line ccd-rich-text-area__indent-line--bottom\"></span>\n <span class=\"ccd-rich-text-area__indent-arrow\"></span>\n </span>\n </button>\n </div>\n\n <div class=\"NgxEditor__Wrapper\">\n <ngx-editor\n [editor]=\"editor\"\n [formControl]=\"richTextAreaControl\"\n outputFormat=\"html\"\n (focusIn)=\"syncAccessibilityLater()\"\n (focusOut)=\"onEditorFocusOut()\">\n </ngx-editor>\n </div>\n </div>\n</div>\n", styles: [".ccd-rich-text-area{margin-bottom:30px}.ccd-rich-text-area__editor{max-width:100%}.ccd-rich-text-area__toolbar{align-items:center;display:flex;flex-wrap:wrap;gap:0 4px;margin-bottom:6px}.ccd-rich-text-area .NgxEditor__Wrapper{border:1px solid #000;border-radius:0;max-width:100%;width:100%}.ccd-rich-text-area .NgxEditor__Wrapper:focus-within{outline:3px solid #ffdd00;outline-offset:0}.ccd-rich-text-area__toolbar-button{background:#fff;align-items:center;border:1px solid #0b0c0c;border-radius:0;color:#0b0c0c;display:inline-flex;font-family:inherit;font-size:18px;font-weight:700;height:36px;justify-content:center;min-width:36px;padding:4px;width:36px}.ccd-rich-text-area__toolbar-button:hover{background:#f3f2f1}.ccd-rich-text-area__toolbar-button:focus{background:#fd0;box-shadow:0 0 0 2px #0b0c0c;outline:3px solid #ffdd00;outline-offset:0}.ccd-rich-text-area__toolbar-button--active{background:#1d70b8;color:#fff}.ccd-rich-text-area__toolbar-button--italic{font-style:italic}.ccd-rich-text-area__toolbar-button--underline{text-decoration:underline}.ccd-rich-text-area__toolbar-separator{border-left:1px solid #b1b4b6;height:36px;margin:0 8px 0 6px}.ccd-rich-text-area__toolbar-icon{display:inline-flex;line-height:1}.ccd-rich-text-area__toolbar-icon--undo,.ccd-rich-text-area__toolbar-icon--redo{font-size:23px;font-weight:400;transform:translateY(-1px)}.ccd-rich-text-area__toolbar-icon--bold{font-size:18px}.ccd-rich-text-area__toolbar-icon--italic{color:inherit;font-size:18px;font-style:italic}.ccd-rich-text-area__toolbar-icon--underline{font-size:18px;text-decoration:underline;text-underline-offset:3px}.ccd-rich-text-area__toolbar-icon--paragraph{font-size:18px}.ccd-rich-text-area__list-icon{column-gap:2px;display:grid;grid-template-columns:8px 13px;grid-template-rows:repeat(3,5px);height:17px;width:23px}.ccd-rich-text-area__list-marker{align-self:center;font-size:9px;font-weight:700;line-height:1;text-align:right}.ccd-rich-text-area__list-icon--ordered .ccd-rich-text-area__list-marker:after{content:\".\"}.ccd-rich-text-area__list-icon--bullet .ccd-rich-text-area__list-marker{font-size:14px;line-height:.5}.ccd-rich-text-area__list-line{align-self:center;border-top:2px solid currentColor;display:block;width:12px}.ccd-rich-text-area__indent-icon{display:block;height:18px;position:relative;width:23px}.ccd-rich-text-area__indent-line{background:currentColor;display:block;height:2px;position:absolute;right:0}.ccd-rich-text-area__indent-line--top{top:3px;width:18px}.ccd-rich-text-area__indent-line--middle{top:8px;width:13px}.ccd-rich-text-area__indent-line--bottom{top:13px;width:18px}.ccd-rich-text-area__indent-arrow{background:currentColor;display:block;height:2px;left:1px;position:absolute;top:8px;width:9px}.ccd-rich-text-area__indent-arrow:before,.ccd-rich-text-area__indent-arrow:after{background:currentColor;content:\"\";display:block;height:2px;position:absolute;top:0;width:6px}.ccd-rich-text-area__indent-icon--outdent .ccd-rich-text-area__indent-arrow:before{left:-1px;transform:rotate(45deg);transform-origin:left center}.ccd-rich-text-area__indent-icon--outdent .ccd-rich-text-area__indent-arrow:after{left:-1px;transform:rotate(-45deg);transform-origin:left center}.ccd-rich-text-area__indent-icon--indent .ccd-rich-text-area__indent-arrow:before{right:-1px;transform:rotate(45deg);transform-origin:right center}.ccd-rich-text-area__indent-icon--indent .ccd-rich-text-area__indent-arrow:after{right:-1px;transform:rotate(-45deg);transform-origin:right center}.ccd-rich-text-area .NgxEditor__Wrapper .NgxEditor{border:0;border-radius:0;height:255px;min-height:255px;overflow:hidden;width:100%}.ccd-rich-text-area__editor--error .NgxEditor__Wrapper{border-color:#d4351c}.ccd-rich-text-area .NgxEditor__Content{box-sizing:border-box;height:255px;min-height:255px;overflow-x:hidden;overflow-y:auto;padding:12px 14px}.ccd-rich-text-area .ProseMirror{min-height:231px;outline:0;overflow-wrap:anywhere;white-space:pre-wrap;word-break:normal}.ccd-rich-text-area .ProseMirror [data-indent=\"1\"]{margin-left:40px}.ccd-rich-text-area .ProseMirror [data-indent=\"2\"]{margin-left:80px}.ccd-rich-text-area .ProseMirror [data-indent=\"3\"]{margin-left:120px}.ccd-rich-text-area .ProseMirror [data-indent=\"4\"]{margin-left:160px}.ccd-rich-text-area .ProseMirror [data-indent=\"5\"]{margin-left:200px}.ccd-rich-text-area .ProseMirror [data-indent=\"6\"]{margin-left:240px}.ccd-rich-text-area .ProseMirror strong,.ccd-rich-text-area .ProseMirror strong *,.ccd-rich-text-area .ProseMirror b,.ccd-rich-text-area .ProseMirror b *{font-weight:700}.ccd-rich-text-area .ProseMirror strong u,.ccd-rich-text-area .ProseMirror u strong,.ccd-rich-text-area .ProseMirror b u,.ccd-rich-text-area .ProseMirror u b{font-weight:700!important;text-decoration:underline}.ccd-rich-text-area .ProseMirror:focus{box-shadow:none;outline:0}.ccd-rich-text-area .ProseMirror p,.ccd-rich-text-area .ProseMirror ul,.ccd-rich-text-area .ProseMirror ol{margin-top:0;overflow-wrap:anywhere;word-break:normal}.ccd-rich-text-area .ProseMirror ul{list-style:disc outside;padding-left:25px}.ccd-rich-text-area .ProseMirror ol{list-style:decimal outside;padding-left:25px}.ccd-rich-text-area .ProseMirror li{display:list-item;margin-bottom:5px}.ccd-rich-text-area .ProseMirror li>p{margin:0}\n"] }]
|
|
27824
27351
|
}], null, { editorHost: [{
|
|
27825
27352
|
type: ViewChild,
|
|
27826
27353
|
args: ['editorHost']
|
|
27827
27354
|
}] }); })();
|
|
27828
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(WriteRichTextAreaFieldComponent, { className: "WriteRichTextAreaFieldComponent", filePath: "lib/shared/components/palette/rich-text-area/write-rich-text-area-field.component.ts", lineNumber:
|
|
27355
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(WriteRichTextAreaFieldComponent, { className: "WriteRichTextAreaFieldComponent", filePath: "lib/shared/components/palette/rich-text-area/write-rich-text-area-field.component.ts", lineNumber: 75 }); })();
|
|
27829
27356
|
|
|
27830
27357
|
class ReadTextFieldComponent extends AbstractFieldReadComponent {
|
|
27831
27358
|
static ɵfac = /*@__PURE__*/ (() => { let ɵReadTextFieldComponent_BaseFactory; return function ReadTextFieldComponent_Factory(__ngFactoryType__) { return (ɵReadTextFieldComponent_BaseFactory || (ɵReadTextFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ReadTextFieldComponent)))(__ngFactoryType__ || ReadTextFieldComponent); }; })();
|
|
@@ -38910,16 +38437,8 @@ class CaseResolver {
|
|
|
38910
38437
|
}
|
|
38911
38438
|
// as discussed for EUI-5456, need functionality to go to default page
|
|
38912
38439
|
goToDefaultPage() {
|
|
38913
|
-
|
|
38914
|
-
|
|
38915
|
-
&& !userDetails.roles.includes(PUI_CASE_MANAGER)
|
|
38916
|
-
&&
|
|
38917
|
-
(userDetails.roles.includes('caseworker-ia-iacjudge')
|
|
38918
|
-
|| userDetails.roles.includes('caseworker-ia-caseofficer')
|
|
38919
|
-
|| userDetails.roles.includes('caseworker-ia-admofficer')
|
|
38920
|
-
|| userDetails.roles.includes('caseworker-civil')
|
|
38921
|
-
|| userDetails.roles.includes('caseworker-privatelaw'))
|
|
38922
|
-
? this.router.navigate([CaseResolver.defaultWAPage]) : this.router.navigate([CaseResolver.defaultPage]);
|
|
38440
|
+
isWorkAllocationUser(this.sessionStorage) ?
|
|
38441
|
+
this.router.navigate([CaseResolver.defaultWAPage]) : this.router.navigate([CaseResolver.defaultPage]);
|
|
38923
38442
|
}
|
|
38924
38443
|
static ɵfac = function CaseResolver_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaseResolver)(i0.ɵɵinject(CaseNotifier), i0.ɵɵinject(DraftService), i0.ɵɵinject(NavigationNotifierService), i0.ɵɵinject(i1$1.Router), i0.ɵɵinject(SessionStorageService)); };
|
|
38925
38444
|
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: CaseResolver, factory: CaseResolver.ɵfac });
|
|
@@ -44992,5 +44511,5 @@ class TestRouteSnapshotBuilder {
|
|
|
44992
44511
|
* Generated bundle index. Do not edit.
|
|
44993
44512
|
*/
|
|
44994
44513
|
|
|
44995
|
-
export { AbstractAppConfig, AbstractFieldReadComponent, AbstractFieldWriteComponent, AbstractFieldWriteJourneyComponent, AbstractJourneyComponent, Activity, ActivityBannerComponent, ActivityComponent, ActivityIconComponent, ActivityInfo, ActivityModule, ActivityPollingService, ActivityService, AddCommentsComponent, AddCommentsErrorMessage, AddCommentsStep, AddressModel, AddressOption, AddressesService, Alert, AlertComponent, AlertIconClassPipe, AlertMessageType, AlertModule, AlertService, AuthService, Banner, BannersService, BeforeYouStartComponent, BodyComponent, BrowserService, CCDCaseLinkType, COMPONENT_PORTAL_INJECTION_TOKEN, CallbackErrorsComponent, CallbackErrorsContext, CaseAccessUtils, CaseBasicAccessViewComponent, CaseChallengedAccessRequestComponent, CaseChallengedAccessSuccessComponent, CaseCreateComponent, CaseDetails, CaseEditComponent, CaseEditConfirmComponent, CaseEditDataModule, CaseEditDataService, CaseEditFormComponent, CaseEditPageComponent, CaseEditSubmitComponent, CaseEditWizardGuard, CaseEditorConfig, CaseEditorModule, CaseEvent, CaseEventCompletionComponent, CaseEventCompletionTaskCancelledComponent, CaseEventCompletionTaskReassignedComponent, CaseEventData, CaseEventTrigger, CaseEventTriggerComponent, CaseField, CaseFieldService, CaseFileViewFieldComponent, CaseFileViewFolderComponent, CaseFileViewFolderDocumentActionsComponent, CaseFileViewFolderSelectorComponent, CaseFileViewFolderSortComponent, CaseFileViewFolderToggleComponent, CaseFileViewOverlayMenuComponent, CaseFileViewService, CaseFlagCheckYourAnswersPageStep, CaseFlagDisplayContextParameter, CaseFlagErrorMessage, CaseFlagFieldState, CaseFlagFormFields, CaseFlagRefdataService, CaseFlagStatus, CaseFlagSummaryListComponent, CaseFlagSummaryListDisplayMode, CaseFlagTableComponent, CaseFlagWizardStepTitle, CaseFullAccessViewComponent, CaseHeaderComponent, CaseHeaderModule, CaseHistoryViewerFieldComponent, CaseLink, CaseLinkResponse, CaseListComponent, CaseListFiltersComponent, CaseListFiltersModule, CaseListModule, CaseNotifier, CasePaymentHistoryViewerFieldComponent, CasePrintDocument, CasePrinterComponent, CaseProgressComponent, CaseReferencePipe, CaseResolver, CaseSpecificAccessRequestComponent, CaseSpecificAccessSuccessComponent, CaseState, CaseTab, CaseTimelineComponent, CaseTimelineDisplayMode, CaseTimelineModule, CaseType, CaseTypeLite, CaseView, CaseViewComponent, CaseViewEvent, CaseViewTrigger, CaseViewerComponent, CaseViewerModule, CasesService, CaseworkerService, CcdCYAPageLabelFilterPipe, CcdCaseTitlePipe, CcdCollectionTableCaseFieldsFilterPipe, CcdPageFieldsPipe, CcdTabFieldsPipe, CheckYourAnswersComponent, CloseQueryComponent, ConditionalShowFormDirective, ConditionalShowModule, ConditionalShowRegistrarService, ConfirmFlagStatusComponent, ConfirmStatusErrorMessage, ConfirmStatusStep, Confirmation, ConvertHrefToRouterService, CreateCaseFiltersComponent, CreateCaseFiltersModule, CreateCaseFiltersSelection, DRAFT_PREFIX, DRAFT_QUERY_PARAM, DashPipe, DateInputComponent, DatePipe, DateTimeFormatUtils, DatetimePickerComponent, DefinitionsModule, DefinitionsService, DeleteOrCancelDialogComponent, DialogsModule, DisplayMode, Document, DocumentData, DocumentDialogComponent, DocumentLinks, DocumentManagementService, DocumentUrlPipe, Draft, DraftService, DynamicListPipe, DynamicRadioListPipe, ESQueryType, Embedded, EnumDisplayDescriptionPipe, ErrorMessageComponent, ErrorNotifierService, EventCaseField, EventCompletionReturnStates, EventCompletionStateMachineService, EventCompletionStates, EventLogComponent, EventLogDetailsComponent, EventLogTableComponent, EventMessageModule, EventStartComponent, EventStartModule, EventStartStateMachineService, EventStatusService, EventTriggerResolver, EventTriggerService, Fee, FeeValue, Field, FieldLabelPipe, FieldReadComponent, FieldReadLabelComponent, FieldType, FieldTypeSanitiser, FieldWriteComponent, FieldsFilterPipe, FieldsPurger, FieldsUtils, FirstErrorPipe, FixedListItem, FixedListPipe, FixedRadioListPipe, FlagFieldDisplayPipe, FocusElementDirective, FocusElementModule, FocusService, FooterComponent, FormDocument, FormErrorService, FormValidatorsService, FormValueService, FormatTranslatorService, GreyBarService, HRef, HeaderBarComponent, HeadersModule, HttpError, HttpErrorService, HttpService, IsCompoundPipe, IsMandatoryPipe, IsReadOnlyAndNotCollectionPipe, IsReadOnlyPipe, JudicialworkerService, Jurisdiction, JurisdictionService, LabelFieldComponent, LabelSubstitutorDirective, LabelSubstitutorModule, LanguageInterpreterDisplayPipe, LinkCaseReason, LinkCasesComponent, LinkCasesFromReasonValuePipe, LinkCasesReasonValuePipe, LinkDetails, LinkFromReason, LinkReason, LinkedCasesErrorMessages, LinkedCasesEventTriggers, LinkedCasesFromTableComponent, LinkedCasesPages, LinkedCasesResponse, LinkedCasesToTableComponent, LoadingModule, LoadingService, LoadingSpinnerComponent, LoadingSpinnerModule, MEDIA_VIEWER_LOCALSTORAGE_KEY, MULTIPLE_TASKS_FOUND, ManageCaseFlagsComponent, ManageCaseFlagsLabelDisplayPipe, MarkdownComponent, MarkdownComponentModule, MoneyGbpInputComponent, MultipageComponentStateService, MultipleTasksExistComponent, NavigationComponent, NavigationItemComponent, NavigationNotifierService, NavigationOrigin, NoLinkedCasesComponent, NoTasksAvailableComponent, NotificationBannerComponent, NotificationBannerHeaderClass, NotificationBannerType, OrderService, OrderSummary, OrganisationConverter, OrganisationService, PageValidationService, PaginationComponent, PaginationMetadata, PaginationModule, PaletteContext, PaletteModule, PaletteService, PaletteUtilsModule, Patterns, PaymentField, PhaseComponent, PipesModule, PlaceholderService, PrintUrlPipe, Profile, ProfileNotifier, ProfileService, QualifyingQuestionDetailComponent, QualifyingQuestionOptionsComponent, QualifyingQuestionService, QualifyingQuestionsErrorMessage, QueryAttachmentsReadComponent, QueryCaseDetailsHeaderComponent, QueryCheckYourAnswersComponent, QueryConfirmationComponent, QueryCreateContext, QueryDetailsComponent, QueryEventCompletionComponent, QueryItemResponseStatus, QueryListComponent, QueryListData, QueryListItem, QueryManagementService, QueryWriteAddDocumentsComponent, QueryWriteDateInputComponent, QueryWriteRaiseQueryComponent, QueryWriteRespondToQueryComponent, RaiseQueryErrorMessage, ReadCaseFlagFieldComponent, ReadCaseLinkFieldComponent, ReadCollectionFieldComponent, ReadComplexFieldCollectionTableComponent, ReadComplexFieldComponent, ReadComplexFieldRawComponent, ReadComplexFieldTableComponent, ReadCookieService, ReadDateFieldComponent, ReadDocumentFieldComponent, ReadDynamicListFieldComponent, ReadDynamicMultiSelectListFieldComponent, ReadDynamicRadioListFieldComponent, ReadEmailFieldComponent, ReadFieldsFilterPipe, ReadFixedListFieldComponent, ReadFixedRadioListFieldComponent, ReadJudicialUserFieldComponent, ReadLinkedCasesFieldComponent, ReadMoneyGbpFieldComponent, ReadMultiSelectListFieldComponent, ReadNumberFieldComponent, ReadOrderSummaryFieldComponent, ReadOrderSummaryRowComponent, ReadOrganisationFieldComponent, ReadOrganisationFieldRawComponent, ReadOrganisationFieldTableComponent, ReadPhoneUKFieldComponent, ReadQueryManagementFieldComponent, ReadRichTextAreaFieldComponent, 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, WriteTextAreaFieldComponent, WriteTextFieldComponent, WriteYesNoFieldComponent, YesNoService, aCaseField, caseMessagesMockData, createACL, createCaseEventTrigger, createCaseField, createComplexFieldOverride, createFieldType, createFixedListFieldType, createHiddenComplexFieldOverride, createMultiSelectListFieldType, createWizardPage, createWizardPageField, editorRouting, initDialog, newCaseField, safeJsonParse, textFieldType, viewerRouting };
|
|
44514
|
+
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, MEDIA_VIEWER_LOCALSTORAGE_KEY, MULTIPLE_TASKS_FOUND, ManageCaseFlagsComponent, ManageCaseFlagsLabelDisplayPipe, MarkdownComponent, MarkdownComponentModule, MoneyGbpInputComponent, MultipageComponentStateService, MultipleTasksExistComponent, NavigationComponent, NavigationItemComponent, NavigationNotifierService, NavigationOrigin, NoLinkedCasesComponent, NoTasksAvailableComponent, NotificationBannerComponent, NotificationBannerHeaderClass, NotificationBannerType, OrderService, OrderSummary, OrganisationConverter, OrganisationService, PageValidationService, PaginationComponent, PaginationMetadata, PaginationModule, PaletteContext, PaletteModule, PaletteService, PaletteUtilsModule, Patterns, PaymentField, PhaseComponent, PipesModule, PlaceholderService, PrintUrlPipe, Profile, ProfileNotifier, ProfileService, QualifyingQuestionDetailComponent, QualifyingQuestionOptionsComponent, QualifyingQuestionService, QualifyingQuestionsErrorMessage, QueryAttachmentsReadComponent, QueryCaseDetailsHeaderComponent, QueryCheckYourAnswersComponent, QueryConfirmationComponent, QueryCreateContext, QueryDetailsComponent, QueryEventCompletionComponent, QueryItemResponseStatus, QueryListComponent, QueryListData, QueryListItem, QueryManagementService, QueryWriteAddDocumentsComponent, QueryWriteDateInputComponent, QueryWriteRaiseQueryComponent, QueryWriteRespondToQueryComponent, RaiseQueryErrorMessage, ReadCaseFlagFieldComponent, ReadCaseLinkFieldComponent, ReadCollectionFieldComponent, ReadComplexFieldCollectionTableComponent, ReadComplexFieldComponent, ReadComplexFieldRawComponent, ReadComplexFieldTableComponent, ReadCookieService, ReadDateFieldComponent, ReadDocumentFieldComponent, ReadDynamicListFieldComponent, ReadDynamicMultiSelectListFieldComponent, ReadDynamicRadioListFieldComponent, ReadEmailFieldComponent, ReadFieldsFilterPipe, ReadFixedListFieldComponent, ReadFixedRadioListFieldComponent, ReadJudicialUserFieldComponent, ReadLinkedCasesFieldComponent, ReadMoneyGbpFieldComponent, ReadMultiSelectListFieldComponent, ReadNumberFieldComponent, ReadOrderSummaryFieldComponent, ReadOrderSummaryRowComponent, ReadOrganisationFieldComponent, ReadOrganisationFieldRawComponent, ReadOrganisationFieldTableComponent, ReadPhoneUKFieldComponent, ReadQueryManagementFieldComponent, ReadRichTextAreaFieldComponent, 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, WriteTextAreaFieldComponent, WriteTextFieldComponent, WriteYesNoFieldComponent, YesNoService, aCaseField, caseMessagesMockData, createACL, createCaseEventTrigger, createCaseField, createComplexFieldOverride, createFieldType, createFixedListFieldType, createHiddenComplexFieldOverride, createMultiSelectListFieldType, createWizardPage, createWizardPageField, editorRouting, initDialog, newCaseField, safeJsonParse, textFieldType, viewerRouting };
|
|
44996
44515
|
//# sourceMappingURL=hmcts-ccd-case-ui-toolkit.mjs.map
|