@hmcts/ccd-case-ui-toolkit 6.13.0-rc7 → 6.13.0-rc9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.js +100 -60
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.js.map +1 -1
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js +1 -1
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js.map +1 -1
- package/esm2015/lib/app.config.js +1 -1
- package/esm2015/lib/shared/components/palette/base-field/payment-field.component.js +4 -1
- package/esm2015/lib/shared/components/palette/case-flag/components/select-flag-type/select-flag-type.component.js +15 -28
- package/esm2015/lib/shared/components/palette/case-flag/write-case-flag-field.component.js +20 -28
- package/esm2015/lib/shared/components/palette/payment/case-payment-history-viewer-field.component.js +3 -3
- package/esm2015/lib/shared/components/palette/waystopay/waystopay-field.component.js +4 -4
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js +41 -59
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
- package/lib/app.config.d.ts +2 -0
- package/lib/app.config.d.ts.map +1 -1
- package/lib/shared/components/palette/base-field/payment-field.component.d.ts +1 -0
- package/lib/shared/components/palette/base-field/payment-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/case-flag/components/select-flag-type/select-flag-type.component.d.ts +1 -2
- package/lib/shared/components/palette/case-flag/components/select-flag-type/select-flag-type.component.d.ts.map +1 -1
- package/lib/shared/components/palette/case-flag/write-case-flag-field.component.d.ts +0 -1
- package/lib/shared/components/palette/case-flag/write-case-flag-field.component.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -534,6 +534,64 @@
|
|
|
534
534
|
function __param(paramIndex, decorator) {
|
|
535
535
|
return function (target, key) { decorator(target, key, paramIndex); };
|
|
536
536
|
}
|
|
537
|
+
function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
538
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function")
|
|
539
|
+
throw new TypeError("Function expected"); return f; }
|
|
540
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
541
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
542
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
543
|
+
var _, done = false;
|
|
544
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
545
|
+
var context = {};
|
|
546
|
+
for (var p in contextIn)
|
|
547
|
+
context[p] = p === "access" ? {} : contextIn[p];
|
|
548
|
+
for (var p in contextIn.access)
|
|
549
|
+
context.access[p] = contextIn.access[p];
|
|
550
|
+
context.addInitializer = function (f) { if (done)
|
|
551
|
+
throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
552
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
553
|
+
if (kind === "accessor") {
|
|
554
|
+
if (result === void 0)
|
|
555
|
+
continue;
|
|
556
|
+
if (result === null || typeof result !== "object")
|
|
557
|
+
throw new TypeError("Object expected");
|
|
558
|
+
if (_ = accept(result.get))
|
|
559
|
+
descriptor.get = _;
|
|
560
|
+
if (_ = accept(result.set))
|
|
561
|
+
descriptor.set = _;
|
|
562
|
+
if (_ = accept(result.init))
|
|
563
|
+
initializers.push(_);
|
|
564
|
+
}
|
|
565
|
+
else if (_ = accept(result)) {
|
|
566
|
+
if (kind === "field")
|
|
567
|
+
initializers.push(_);
|
|
568
|
+
else
|
|
569
|
+
descriptor[key] = _;
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
if (target)
|
|
573
|
+
Object.defineProperty(target, contextIn.name, descriptor);
|
|
574
|
+
done = true;
|
|
575
|
+
}
|
|
576
|
+
;
|
|
577
|
+
function __runInitializers(thisArg, initializers, value) {
|
|
578
|
+
var useValue = arguments.length > 2;
|
|
579
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
580
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
581
|
+
}
|
|
582
|
+
return useValue ? value : void 0;
|
|
583
|
+
}
|
|
584
|
+
;
|
|
585
|
+
function __propKey(x) {
|
|
586
|
+
return typeof x === "symbol" ? x : "".concat(x);
|
|
587
|
+
}
|
|
588
|
+
;
|
|
589
|
+
function __setFunctionName(f, name, prefix) {
|
|
590
|
+
if (typeof name === "symbol")
|
|
591
|
+
name = name.description ? "[".concat(name.description, "]") : "";
|
|
592
|
+
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
593
|
+
}
|
|
594
|
+
;
|
|
537
595
|
function __metadata(metadataKey, metadataValue) {
|
|
538
596
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
539
597
|
return Reflect.metadata(metadataKey, metadataValue);
|
|
@@ -733,7 +791,7 @@
|
|
|
733
791
|
function __asyncDelegator(o) {
|
|
734
792
|
var i, p;
|
|
735
793
|
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
736
|
-
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done:
|
|
794
|
+
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
|
|
737
795
|
}
|
|
738
796
|
function __asyncValues(o) {
|
|
739
797
|
if (!Symbol.asyncIterator)
|
|
@@ -12412,7 +12470,7 @@
|
|
|
12412
12470
|
if (rf & 2) {
|
|
12413
12471
|
var ctx_r8 = i0__namespace.ɵɵnextContext(2);
|
|
12414
12472
|
i0__namespace.ɵɵadvance(1);
|
|
12415
|
-
i0__namespace.ɵɵproperty("formGroup", ctx_r8.caseFlagParentFormGroup)("jurisdiction", ctx_r8.jurisdiction)("caseTypeId", ctx_r8.caseTypeId)
|
|
12473
|
+
i0__namespace.ɵɵproperty("formGroup", ctx_r8.caseFlagParentFormGroup)("jurisdiction", ctx_r8.jurisdiction)("caseTypeId", ctx_r8.caseTypeId);
|
|
12416
12474
|
}
|
|
12417
12475
|
}
|
|
12418
12476
|
function WriteCaseFlagFieldComponent_div_1_ng_container_6_Template(rf, ctx) {
|
|
@@ -12454,7 +12512,7 @@
|
|
|
12454
12512
|
i0__namespace.ɵɵtext(3);
|
|
12455
12513
|
i0__namespace.ɵɵelementEnd();
|
|
12456
12514
|
i0__namespace.ɵɵtemplate(4, WriteCaseFlagFieldComponent_div_1_ng_container_4_Template, 2, 2, "ng-container", 11);
|
|
12457
|
-
i0__namespace.ɵɵtemplate(5, WriteCaseFlagFieldComponent_div_1_ng_container_5_Template, 2,
|
|
12515
|
+
i0__namespace.ɵɵtemplate(5, WriteCaseFlagFieldComponent_div_1_ng_container_5_Template, 2, 3, "ng-container", 11);
|
|
12458
12516
|
i0__namespace.ɵɵtemplate(6, WriteCaseFlagFieldComponent_div_1_ng_container_6_Template, 2, 3, "ng-container", 11);
|
|
12459
12517
|
i0__namespace.ɵɵtemplate(7, WriteCaseFlagFieldComponent_div_1_ng_container_7_Template, 2, 2, "ng-container", 11);
|
|
12460
12518
|
i0__namespace.ɵɵelementEnd();
|
|
@@ -12577,30 +12635,22 @@
|
|
|
12577
12635
|
}
|
|
12578
12636
|
}
|
|
12579
12637
|
// Extract all flags-related data from the CaseEventTrigger object in the snapshot data
|
|
12580
|
-
if (this.route.snapshot.data.eventTrigger) {
|
|
12581
|
-
|
|
12582
|
-
|
|
12583
|
-
|
|
12584
|
-
|
|
12585
|
-
|
|
12586
|
-
|
|
12587
|
-
|
|
12588
|
-
|
|
12589
|
-
|
|
12590
|
-
|
|
12591
|
-
|
|
12592
|
-
|
|
12593
|
-
|
|
12594
|
-
|
|
12595
|
-
|
|
12596
|
-
this.fieldState = this.isDisplayContextParameterUpdate ? exports.CaseFlagFieldState.FLAG_MANAGE_CASE_FLAGS : exports.CaseFlagFieldState.FLAG_LOCATION;
|
|
12597
|
-
// Get case title, to be used by child components
|
|
12598
|
-
this.caseEditDataService.caseTitle$.subscribe({
|
|
12599
|
-
next: function (title) {
|
|
12600
|
-
_this.caseTitle = title.length > 0 ? title : _this.caseNameMissing;
|
|
12601
|
-
}
|
|
12602
|
-
});
|
|
12603
|
-
}
|
|
12638
|
+
if (this.route.snapshot.data.eventTrigger && this.route.snapshot.data.eventTrigger.case_fields) {
|
|
12639
|
+
this.flagsData = (this.route.snapshot.data.eventTrigger.case_fields)
|
|
12640
|
+
.reduce(function (flags, caseField) {
|
|
12641
|
+
return FieldsUtils.extractFlagsDataFromCaseField(flags, caseField, caseField.id, caseField);
|
|
12642
|
+
}, []);
|
|
12643
|
+
// Set boolean indicating the display_context_parameter is "update"
|
|
12644
|
+
this.isDisplayContextParameterUpdate =
|
|
12645
|
+
this.setDisplayContextParameterUpdate((this.route.snapshot.data.eventTrigger.case_fields));
|
|
12646
|
+
// Set starting field state
|
|
12647
|
+
this.fieldState = this.isDisplayContextParameterUpdate ? exports.CaseFlagFieldState.FLAG_MANAGE_CASE_FLAGS : exports.CaseFlagFieldState.FLAG_LOCATION;
|
|
12648
|
+
// Get case title, to be used by child components
|
|
12649
|
+
this.caseEditDataService.caseTitle$.subscribe({
|
|
12650
|
+
next: function (title) {
|
|
12651
|
+
_this.caseTitle = title.length > 0 ? title : _this.caseNameMissing;
|
|
12652
|
+
}
|
|
12653
|
+
});
|
|
12604
12654
|
}
|
|
12605
12655
|
};
|
|
12606
12656
|
WriteCaseFlagFieldComponent.prototype.setDisplayContextParameterUpdate = function (caseFields) {
|
|
@@ -12836,7 +12886,7 @@
|
|
|
12836
12886
|
return WriteCaseFlagFieldComponent;
|
|
12837
12887
|
}(AbstractFieldWriteComponent));
|
|
12838
12888
|
WriteCaseFlagFieldComponent.ɵfac = function WriteCaseFlagFieldComponent_Factory(t) { return new (t || WriteCaseFlagFieldComponent)(i0__namespace.ɵɵdirectiveInject(i1__namespace$1.ActivatedRoute), i0__namespace.ɵɵdirectiveInject(CaseEditDataService)); };
|
|
12839
|
-
WriteCaseFlagFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteCaseFlagFieldComponent, selectors: [["ccd-write-case-flag-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 3, vars: 3, consts: [["class", "govuk-error-summary", "aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 4, "ngIf"], ["class", "form-group", 3, "formGroup", 4, "ngIf"], ["aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 1, "govuk-error-summary"], ["id", "error-summary-title", 1, "govuk-error-summary__title"], ["class", "govuk-error-summary__body", 4, "ngFor", "ngForOf"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], [1, "validation-error", 3, "click"], [1, "form-group", 3, "formGroup"], [1, "govuk-form-group", 3, "ngSwitch"], ["id", "create-flag-caption", 1, "govuk-caption-l", 3, "ngClass"], [4, "ngSwitchCase"], [3, "formGroup", "flagsData", "caseFlagStateEmitter"], [3, "formGroup", "jurisdiction", "caseTypeId", "
|
|
12889
|
+
WriteCaseFlagFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteCaseFlagFieldComponent, selectors: [["ccd-write-case-flag-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 3, vars: 3, consts: [["class", "govuk-error-summary", "aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 4, "ngIf"], ["class", "form-group", 3, "formGroup", 4, "ngIf"], ["aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 1, "govuk-error-summary"], ["id", "error-summary-title", 1, "govuk-error-summary__title"], ["class", "govuk-error-summary__body", 4, "ngFor", "ngForOf"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], [1, "validation-error", 3, "click"], [1, "form-group", 3, "formGroup"], [1, "govuk-form-group", 3, "ngSwitch"], ["id", "create-flag-caption", 1, "govuk-caption-l", 3, "ngClass"], [4, "ngSwitchCase"], [3, "formGroup", "flagsData", "caseFlagStateEmitter"], [3, "formGroup", "jurisdiction", "caseTypeId", "caseFlagStateEmitter", "flagCommentsOptionalEmitter"], [3, "formGroup", "languages", "flagCode", "caseFlagStateEmitter"], [3, "formGroup", "optional", "caseFlagStateEmitter"], [3, "formGroup", "flagsData", "caseTitle", "caseFlagStateEmitter"], [3, "formGroup", "selectedFlag", "caseFlagStateEmitter"]], template: function WriteCaseFlagFieldComponent_Template(rf, ctx) {
|
|
12840
12890
|
if (rf & 1) {
|
|
12841
12891
|
i0__namespace.ɵɵtemplate(0, WriteCaseFlagFieldComponent_div_0_Template, 4, 1, "div", 0);
|
|
12842
12892
|
i0__namespace.ɵɵtemplate(1, WriteCaseFlagFieldComponent_div_1_Template, 8, 10, "div", 1);
|
|
@@ -16997,6 +17047,9 @@
|
|
|
16997
17047
|
PaymentField.prototype.getRefundsUrl = function () {
|
|
16998
17048
|
return this.appConfig.getRefundsUrl();
|
|
16999
17049
|
};
|
|
17050
|
+
PaymentField.prototype.getNotificationUrl = function () {
|
|
17051
|
+
return this.appConfig.getNotificationUrl();
|
|
17052
|
+
};
|
|
17000
17053
|
PaymentField.prototype.getUserRoles = function () {
|
|
17001
17054
|
var userDetails = JSON.parse(this.sessionStorage.getItem('userDetails') || null);
|
|
17002
17055
|
if (!userDetails || !userDetails.hasOwnProperty('roles')) {
|
|
@@ -17022,12 +17075,12 @@
|
|
|
17022
17075
|
return CasePaymentHistoryViewerFieldComponent;
|
|
17023
17076
|
}(PaymentField));
|
|
17024
17077
|
CasePaymentHistoryViewerFieldComponent.ɵfac = function CasePaymentHistoryViewerFieldComponent_Factory(t) { return new (t || CasePaymentHistoryViewerFieldComponent)(i0__namespace.ɵɵdirectiveInject(AbstractAppConfig), i0__namespace.ɵɵdirectiveInject(SessionStorageService)); };
|
|
17025
|
-
CasePaymentHistoryViewerFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CasePaymentHistoryViewerFieldComponent, selectors: [["ccd-case-payment-history-viewer-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 1, vars:
|
|
17078
|
+
CasePaymentHistoryViewerFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CasePaymentHistoryViewerFieldComponent, selectors: [["ccd-case-payment-history-viewer-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 1, vars: 16, consts: [[3, "API_ROOT", "CCD_CASE_NUMBER", "BULKSCAN_API_ROOT", "SELECTED_OPTION", "ISBSENABLE", "LOGGEDINUSEREMAIL", "LOGGEDINUSERROLES", "REFUNDS_API_ROOT", "NOTIFICATION_API_ROOT", "VIEW", "TAKEPAYMENT", "SERVICEREQUEST", "PAYMENT_GROUP_REF", "EXC_REFERENCE", "DCN_NUMBER", "ISPAYMENTSTATUSENABLED"]], template: function CasePaymentHistoryViewerFieldComponent_Template(rf, ctx) {
|
|
17026
17079
|
if (rf & 1) {
|
|
17027
17080
|
i0__namespace.ɵɵelement(0, "ccpay-payment-lib", 0);
|
|
17028
17081
|
}
|
|
17029
17082
|
if (rf & 2) {
|
|
17030
|
-
i0__namespace.ɵɵproperty("API_ROOT", ctx.getBaseURL())("CCD_CASE_NUMBER", ctx.caseReference)("BULKSCAN_API_ROOT", ctx.getPayBulkScanBaseURL())("SELECTED_OPTION", "CCDorException")("ISBSENABLE", "true")("LOGGEDINUSEREMAIL", ctx.getUserEmail())("LOGGEDINUSERROLES", ctx.getUserRoles())("REFUNDS_API_ROOT", ctx.getRefundsUrl())("VIEW", "case-transactions")("TAKEPAYMENT", false)("SERVICEREQUEST", false)("PAYMENT_GROUP_REF", null)("EXC_REFERENCE", ctx.caseReference)("DCN_NUMBER", null)("ISPAYMENTSTATUSENABLED", "Enable");
|
|
17083
|
+
i0__namespace.ɵɵproperty("API_ROOT", ctx.getBaseURL())("CCD_CASE_NUMBER", ctx.caseReference)("BULKSCAN_API_ROOT", ctx.getPayBulkScanBaseURL())("SELECTED_OPTION", "CCDorException")("ISBSENABLE", "true")("LOGGEDINUSEREMAIL", ctx.getUserEmail())("LOGGEDINUSERROLES", ctx.getUserRoles())("REFUNDS_API_ROOT", ctx.getRefundsUrl())("NOTIFICATION_API_ROOT", ctx.getNotificationUrl())("VIEW", "case-transactions")("TAKEPAYMENT", false)("SERVICEREQUEST", false)("PAYMENT_GROUP_REF", null)("EXC_REFERENCE", ctx.caseReference)("DCN_NUMBER", null)("ISPAYMENTSTATUSENABLED", "Enable");
|
|
17031
17084
|
}
|
|
17032
17085
|
}, directives: [i3__namespace.PaymentLibComponent], encapsulation: 2 });
|
|
17033
17086
|
(function () {
|
|
@@ -17435,7 +17488,7 @@
|
|
|
17435
17488
|
}
|
|
17436
17489
|
if (rf & 2) {
|
|
17437
17490
|
var ctx_r0 = i0__namespace.ɵɵnextContext();
|
|
17438
|
-
i0__namespace.ɵɵproperty("API_ROOT", ctx_r0.getBaseURL())("BULKSCAN_API_ROOT", ctx_r0.getPayBulkScanBaseURL())("REFUNDS_API_ROOT", ctx_r0.getRefundsUrl())("CCD_CASE_NUMBER", ctx_r0.caseReference)("VIEW", "case-transactions")("TAKEPAYMENT", false)("SERVICEREQUEST", true)("PAYMENT_GROUP_REF", null)("EXC_REFERENCE", ctx_r0.caseReference)("DCN_NUMBER", null)("SELECTED_OPTION", "CCDorException")("LOGGEDINUSERROLES", ctx_r0.getUserRoles())("CARDPAYMENTRETURNURL", ctx_r0.getCardPaymentReturnUrl())("ISPAYMENTSTATUSENABLED", "Enable");
|
|
17491
|
+
i0__namespace.ɵɵproperty("API_ROOT", ctx_r0.getBaseURL())("BULKSCAN_API_ROOT", ctx_r0.getPayBulkScanBaseURL())("REFUNDS_API_ROOT", ctx_r0.getRefundsUrl())("NOTIFICATION_API_ROOT", ctx_r0.getNotificationUrl())("CCD_CASE_NUMBER", ctx_r0.caseReference)("VIEW", "case-transactions")("TAKEPAYMENT", false)("SERVICEREQUEST", true)("PAYMENT_GROUP_REF", null)("EXC_REFERENCE", ctx_r0.caseReference)("DCN_NUMBER", null)("SELECTED_OPTION", "CCDorException")("LOGGEDINUSERROLES", ctx_r0.getUserRoles())("CARDPAYMENTRETURNURL", ctx_r0.getCardPaymentReturnUrl())("ISPAYMENTSTATUSENABLED", "Enable");
|
|
17439
17492
|
}
|
|
17440
17493
|
}
|
|
17441
17494
|
var WaysToPayFieldComponent = /** @class */ (function (_super) {
|
|
@@ -17449,9 +17502,9 @@
|
|
|
17449
17502
|
return WaysToPayFieldComponent;
|
|
17450
17503
|
}(PaymentField));
|
|
17451
17504
|
WaysToPayFieldComponent.ɵfac = function WaysToPayFieldComponent_Factory(t) { return new (t || WaysToPayFieldComponent)(i0__namespace.ɵɵdirectiveInject(AbstractAppConfig), i0__namespace.ɵɵdirectiveInject(SessionStorageService)); };
|
|
17452
|
-
WaysToPayFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WaysToPayFieldComponent, selectors: [["ccd-ways-to-pay-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [[3, "API_ROOT", "BULKSCAN_API_ROOT", "REFUNDS_API_ROOT", "CCD_CASE_NUMBER", "VIEW", "TAKEPAYMENT", "SERVICEREQUEST", "PAYMENT_GROUP_REF", "EXC_REFERENCE", "DCN_NUMBER", "SELECTED_OPTION", "LOGGEDINUSERROLES", "CARDPAYMENTRETURNURL", "ISPAYMENTSTATUSENABLED", 4, "ngIf"], [3, "API_ROOT", "BULKSCAN_API_ROOT", "REFUNDS_API_ROOT", "CCD_CASE_NUMBER", "VIEW", "TAKEPAYMENT", "SERVICEREQUEST", "PAYMENT_GROUP_REF", "EXC_REFERENCE", "DCN_NUMBER", "SELECTED_OPTION", "LOGGEDINUSERROLES", "CARDPAYMENTRETURNURL", "ISPAYMENTSTATUSENABLED"]], template: function WaysToPayFieldComponent_Template(rf, ctx) {
|
|
17505
|
+
WaysToPayFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WaysToPayFieldComponent, selectors: [["ccd-ways-to-pay-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [[3, "API_ROOT", "BULKSCAN_API_ROOT", "REFUNDS_API_ROOT", "NOTIFICATION_API_ROOT", "CCD_CASE_NUMBER", "VIEW", "TAKEPAYMENT", "SERVICEREQUEST", "PAYMENT_GROUP_REF", "EXC_REFERENCE", "DCN_NUMBER", "SELECTED_OPTION", "LOGGEDINUSERROLES", "CARDPAYMENTRETURNURL", "ISPAYMENTSTATUSENABLED", 4, "ngIf"], [3, "API_ROOT", "BULKSCAN_API_ROOT", "REFUNDS_API_ROOT", "NOTIFICATION_API_ROOT", "CCD_CASE_NUMBER", "VIEW", "TAKEPAYMENT", "SERVICEREQUEST", "PAYMENT_GROUP_REF", "EXC_REFERENCE", "DCN_NUMBER", "SELECTED_OPTION", "LOGGEDINUSERROLES", "CARDPAYMENTRETURNURL", "ISPAYMENTSTATUSENABLED"]], template: function WaysToPayFieldComponent_Template(rf, ctx) {
|
|
17453
17506
|
if (rf & 1) {
|
|
17454
|
-
i0__namespace.ɵɵtemplate(0, WaysToPayFieldComponent_ccpay_payment_lib_0_Template, 1,
|
|
17507
|
+
i0__namespace.ɵɵtemplate(0, WaysToPayFieldComponent_ccpay_payment_lib_0_Template, 1, 15, "ccpay-payment-lib", 0);
|
|
17455
17508
|
}
|
|
17456
17509
|
if (rf & 2) {
|
|
17457
17510
|
i0__namespace.ɵɵproperty("ngIf", ctx.getUserRoles().length > 0);
|
|
@@ -19224,30 +19277,19 @@
|
|
|
19224
19277
|
&& this.formGroup['caseField'].id === this.caseLevelCaseFlagsFieldId
|
|
19225
19278
|
? exports.RefdataCaseFlagType.CASE
|
|
19226
19279
|
: exports.RefdataCaseFlagType.PARTY;
|
|
19227
|
-
//
|
|
19228
|
-
|
|
19229
|
-
|
|
19230
|
-
|
|
19231
|
-
|
|
19232
|
-
|
|
19233
|
-
|
|
19234
|
-
|
|
19235
|
-
|
|
19236
|
-
|
|
19237
|
-
|
|
19238
|
-
|
|
19239
|
-
|
|
19240
|
-
// If an error occurs retrieving HMCTS service details by case type ID, try by service name instead
|
|
19241
|
-
operators.catchError(function (_) { return _this.caseFlagRefdataService.getHmctsServiceDetailsByServiceName(_this.jurisdiction); }),
|
|
19242
|
-
// Use switchMap to return an inner Observable of the flag types data, having received the service details
|
|
19243
|
-
// including service_code. This avoids having nested `subscribe`s, which is an anti-pattern!
|
|
19244
|
-
operators.switchMap(function (serviceDetails) { return _this.caseFlagRefdataService.getCaseFlagsRefdata(serviceDetails[0].service_code, flagType); }))
|
|
19245
|
-
.subscribe({
|
|
19246
|
-
// First (and only) object in the returned array should be the top-level "Party" flag type
|
|
19247
|
-
next: function (flagTypes) { return _this.flagTypes = flagTypes[0].childFlags; },
|
|
19248
|
-
error: function (error) { return _this.onRefdataError(error); }
|
|
19249
|
-
});
|
|
19250
|
-
}
|
|
19280
|
+
// HMCTS service code is required to retrieve the relevant list of flag types; attempt to obtain it by case type ID first
|
|
19281
|
+
this.flagRefdata$ = this.caseFlagRefdataService.getHmctsServiceDetailsByCaseType(this.caseTypeId)
|
|
19282
|
+
.pipe(
|
|
19283
|
+
// If an error occurs retrieving HMCTS service details by case type ID, try by service name instead
|
|
19284
|
+
operators.catchError(function (_) { return _this.caseFlagRefdataService.getHmctsServiceDetailsByServiceName(_this.jurisdiction); }),
|
|
19285
|
+
// Use switchMap to return an inner Observable of the flag types data, having received the service details
|
|
19286
|
+
// including service_code. This avoids having nested `subscribe`s, which is an anti-pattern!
|
|
19287
|
+
operators.switchMap(function (serviceDetails) { return _this.caseFlagRefdataService.getCaseFlagsRefdata(serviceDetails[0].service_code, flagType); }))
|
|
19288
|
+
.subscribe({
|
|
19289
|
+
// First (and only) object in the returned array should be the top-level "Party" flag type
|
|
19290
|
+
next: function (flagTypes) { return _this.flagTypes = flagTypes[0].childFlags; },
|
|
19291
|
+
error: function (error) { return _this.onRefdataError(error); }
|
|
19292
|
+
});
|
|
19251
19293
|
};
|
|
19252
19294
|
SelectFlagTypeComponent.prototype.ngOnDestroy = function () {
|
|
19253
19295
|
if (this.flagRefdata$) {
|
|
@@ -19319,7 +19361,7 @@
|
|
|
19319
19361
|
return SelectFlagTypeComponent;
|
|
19320
19362
|
}());
|
|
19321
19363
|
SelectFlagTypeComponent.ɵfac = function SelectFlagTypeComponent_Factory(t) { return new (t || SelectFlagTypeComponent)(i0__namespace.ɵɵdirectiveInject(CaseFlagRefdataService)); };
|
|
19322
|
-
SelectFlagTypeComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: SelectFlagTypeComponent, selectors: [["ccd-select-flag-type"]], inputs: { formGroup: "formGroup", jurisdiction: "jurisdiction", caseTypeId: "caseTypeId"
|
|
19364
|
+
SelectFlagTypeComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: SelectFlagTypeComponent, selectors: [["ccd-select-flag-type"]], inputs: { formGroup: "formGroup", jurisdiction: "jurisdiction", caseTypeId: "caseTypeId" }, outputs: { caseFlagStateEmitter: "caseFlagStateEmitter", flagCommentsOptionalEmitter: "flagCommentsOptionalEmitter" }, decls: 11, vars: 9, consts: [[1, "form-group", 3, "formGroup"], [1, "govuk-form-group", 3, "ngClass"], ["aria-describedby", "flag-type-heading", 1, "govuk-fieldset"], [1, "govuk-fieldset__legend", "govuk-fieldset__legend--l"], ["id", "flag-type-heading", 1, "govuk-fieldset__heading"], ["id", "flag-type-not-selected-error-message", "class", "govuk-error-message", 4, "ngIf"], ["data-module", "govuk-radios", "id", "conditional-radios-list", 1, "govuk-radios", "govuk-radios--conditional"], ["class", "govuk-radios__item", 4, "ngFor", "ngForOf"], ["class", "govuk-radios__conditional", "id", "conditional-flagType", 4, "ngIf"], ["class", "govuk-button-group", 4, "ngIf"], ["id", "flag-type-not-selected-error-message", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], [1, "govuk-radios__item"], ["type", "radio", 1, "govuk-radios__input", 3, "id", "name", "value", "formControlName", "change"], [1, "govuk-label", "govuk-radios__label", 3, "for"], ["id", "conditional-flagType", 1, "govuk-radios__conditional"], ["for", "other-flag-type-description", 1, "govuk-label"], ["id", "flag-type-error-message", "class", "govuk-error-message", 4, "ngIf"], ["id", "other-flag-type-description", "type", "text", 1, "govuk-input", "govuk-!-width-one-half", 3, "ngClass", "name", "formControlName"], ["id", "flag-type-error-message", 1, "govuk-error-message"], [1, "govuk-button-group"], ["type", "button", 1, "button", "button-primary", 3, "click"]], template: function SelectFlagTypeComponent_Template(rf, ctx) {
|
|
19323
19365
|
if (rf & 1) {
|
|
19324
19366
|
i0__namespace.ɵɵelementStart(0, "div", 0);
|
|
19325
19367
|
i0__namespace.ɵɵelementStart(1, "div", 1);
|
|
@@ -19369,8 +19411,6 @@
|
|
|
19369
19411
|
type: i0.Input
|
|
19370
19412
|
}], caseTypeId: [{
|
|
19371
19413
|
type: i0.Input
|
|
19372
|
-
}], hmctsServiceId: [{
|
|
19373
|
-
type: i0.Input
|
|
19374
19414
|
}], caseFlagStateEmitter: [{
|
|
19375
19415
|
type: i0.Output
|
|
19376
19416
|
}], flagCommentsOptionalEmitter: [{
|