cat-qw-lib 0.47.7 → 0.47.10
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/cat-qw-lib.mjs
CHANGED
|
@@ -165,10 +165,6 @@ class SHARED {
|
|
|
165
165
|
static PAGINATOR = "paginator";
|
|
166
166
|
static BROWSER_WARNING = 'You have unsaved changes. Do you really want to leave?';
|
|
167
167
|
static DIRECT_DEBITID = 'Direct DebitId';
|
|
168
|
-
static DIRECT_DEBIT = 'directdebit';
|
|
169
|
-
static SOLICITOR = 'solicitor';
|
|
170
|
-
static PRODUCT = 'product';
|
|
171
|
-
static PRODUCT_ID = 'ProductId';
|
|
172
168
|
}
|
|
173
169
|
const statusList = [
|
|
174
170
|
{ name: 'All' },
|
|
@@ -4213,34 +4209,29 @@ class WidgetItemComponent {
|
|
|
4213
4209
|
getStyle(style) {
|
|
4214
4210
|
return this.styleBulderService.getStyle(style);
|
|
4215
4211
|
}
|
|
4216
|
-
onHandleSidebar(
|
|
4217
|
-
this.widgetStore.setOnViewPropertyDetails(
|
|
4212
|
+
onHandleSidebar() {
|
|
4213
|
+
this.widgetStore.setOnViewPropertyDetails(true);
|
|
4218
4214
|
}
|
|
4219
4215
|
ngOnDestroy() {
|
|
4220
|
-
this.widgetStore.setOnViewPropertyDetails(
|
|
4221
|
-
}
|
|
4222
|
-
handleWidgetItemClick(
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
case SHARED.PRODUCT:
|
|
4233
|
-
const product = this.widget.dataItems.filter((val) => val.key === SHARED.PRODUCT_ID);
|
|
4234
|
-
widgetItem.value = product[0].value;
|
|
4235
|
-
}
|
|
4236
|
-
this.widgetStore.setOnWidgetItemClick(widgetItem);
|
|
4216
|
+
this.widgetStore.setOnViewPropertyDetails(false);
|
|
4217
|
+
}
|
|
4218
|
+
handleWidgetItemClick() {
|
|
4219
|
+
this.widgetStore.setOnWidgetItemClick({ item: this.widgetItem, recordId: this.widget.recordId });
|
|
4220
|
+
}
|
|
4221
|
+
handleDirectDebitClick() {
|
|
4222
|
+
const directDebit = this.widget.dataItems.filter((val) => val.key === SHARED.DIRECT_DEBITID);
|
|
4223
|
+
this.widgetStore.setWidgetItem(directDebit);
|
|
4224
|
+
}
|
|
4225
|
+
handleSolicitorClick() {
|
|
4226
|
+
const solicitor = this.widget.dataItems.filter((val) => val.key === SHARED.SOLICITORID);
|
|
4227
|
+
this.widgetStore.setWidgetItem(solicitor);
|
|
4237
4228
|
}
|
|
4238
4229
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetItemComponent, deps: [{ token: StyleBuilderService }, { token: WidgetStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
4239
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
4230
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: WidgetItemComponent, isStandalone: false, selector: "lib-widget-item", inputs: { widgetItem: "widgetItem", widget: "widget", application: "application" }, ngImport: i0, template: "<div class=\"widget-container\">\r\n <div *ngIf=\"widgetItem?.key !== 'Direct Debit' && widgetItem?.key !== 'Solicitor'\" class=\"flex justify-content-between\"\r\n [ngClass]=\"!(widgetItem.key === 'Address' && widget.predefinedName === 'PropertyWidget') ? 'align-items-center' : ''\">\r\n <p class=\"mb-0 text-color-secondary mr-3 key-field-wrapper w-50\">{{ widgetItem?.key }}</p>\r\n\r\n <div class=\"mb-0 text-color font-semibold text-value-wrapper w-50 flex align-items-center justify-content-end\">\r\n <i *ngIf=\"widgetItem?.style?.includes('color: red;')\" class=\"pi pi-exclamation-triangle text-red-500 mr-1\"\r\n style=\"font-size: 1.3rem\"></i>\r\n <p *ngIf=\"!(widgetItem.key === 'Address' && widget.predefinedName === 'PropertyWidget')\" class=\"key-field-wrapper\"\r\n [ngStyle]=\"getStyle(widgetItem?.style)\">\r\n <ng-container *ngIf=\"widgetItem?.isLink; else plainText\">\r\n <a (click)=\"handleWidgetItemClick()\" [ngStyle]=\"{ color: 'var(--primary-500) !important', textDecoration: 'underline' }\">\r\n {{ (widgetItem.value && widgetItem.value !== 'null') ? widgetItem.value : '' }}\r\n </a>\r\n </ng-container>\r\n <ng-template #plainText>\r\n {{ (widgetItem?.value && widgetItem?.value !== 'null') ? widgetItem?.value : '' }}\r\n </ng-template>\r\n </p>\r\n <i *ngIf=\"widgetItem.key === 'Address' && widget.predefinedName === 'PropertyWidget'\"\r\n class=\"pi pi-map-marker map-icon map-icon-wrapper\"></i>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"widgetItem?.key === 'Direct Debit' || widgetItem?.key === 'Solicitor' \" class=\"flex align-items-center justify-content-between\">\r\n <p class=\"mb-0 text-color-secondary mr-3 key-field-wrapper w-50\">{{ widgetItem?.key }}</p>\r\n <div class=\"mb-0 text-color font-semibold text-value-wrapper w-50 flex align-items-center justify-content-end\">\r\n <p class=\"key-field-wrapper cursor-pointer\"\r\n [ngStyle]=\"getStyle(widgetItem?.style)\">\r\n <ng-container>\r\n @if(widgetItem?.key === 'Direct Debit'){\r\n <a (click)=\"handleDirectDebitClick()\">\r\n {{ (widgetItem.value && widgetItem.value !== 'null') ? widgetItem.value : '' }}\r\n </a>\r\n }@if(widgetItem?.key === 'Solicitor'){\r\n <a (click)=\"handleSolicitorClick()\">\r\n {{ (widgetItem.value && widgetItem.value !== 'null') ? widgetItem.value : '' }}\r\n </a>\r\n }\r\n </ng-container>\r\n </p>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"widgetItem.key === 'Address' && widget.predefinedName === 'PropertyWidget'\"\r\n class=\"address-title-wrapper cursor-pointer\" [ngStyle]=\"getStyle(widgetItem?.style)\" (click)=\"onHandleSidebar()\">\r\n {{ widgetItem?.value }}\r\n </div>\r\n</div>", styles: [".text-value-wrapper{-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal;max-width:100%}.key-field-wrapper{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.w-50{width:50%!important}.map-icon-wrapper{font-size:16px;padding:13px;border-radius:30px;border:1px solid rgba(76,98,146,.1);background:#4c62920a}.address-title-wrapper{width:80%;word-break:break-word;margin-top:-12px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
4240
4231
|
}
|
|
4241
4232
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetItemComponent, decorators: [{
|
|
4242
4233
|
type: Component,
|
|
4243
|
-
args: [{ selector: 'lib-widget-item', standalone: false, template: "<div class=\"widget-container\">\r\n <div class=\"flex justify-content-between\"\r\n [ngClass]=\"!(widgetItem.key === 'Address' && widget.predefinedName === 'PropertyWidget') ? 'align-items-center' : ''\">\r\n <p class=\"mb-0 text-color-secondary mr-3 key-field-wrapper w-50\">{{ widgetItem?.key }}</p>\r\n\r\n <div class=\"mb-0 text-color font-semibold text-value-wrapper w-50 flex align-items-center justify-content-end\">\r\n <i *ngIf=\"widgetItem?.style?.includes('color: red;')\" class=\"pi pi-exclamation-triangle text-red-500 mr-1\"\r\n style=\"font-size: 1.3rem\"></i>\r\n <p *ngIf=\"!(widgetItem.key === 'Address' && widget.predefinedName === 'PropertyWidget')\" class=\"key-field-wrapper\"\r\n [ngStyle]=\"getStyle(widgetItem?.style)\">\r\n <ng-container *ngIf=\"widgetItem?.isLink; else plainText\">\r\n <a
|
|
4234
|
+
args: [{ selector: 'lib-widget-item', standalone: false, template: "<div class=\"widget-container\">\r\n <div *ngIf=\"widgetItem?.key !== 'Direct Debit' && widgetItem?.key !== 'Solicitor'\" class=\"flex justify-content-between\"\r\n [ngClass]=\"!(widgetItem.key === 'Address' && widget.predefinedName === 'PropertyWidget') ? 'align-items-center' : ''\">\r\n <p class=\"mb-0 text-color-secondary mr-3 key-field-wrapper w-50\">{{ widgetItem?.key }}</p>\r\n\r\n <div class=\"mb-0 text-color font-semibold text-value-wrapper w-50 flex align-items-center justify-content-end\">\r\n <i *ngIf=\"widgetItem?.style?.includes('color: red;')\" class=\"pi pi-exclamation-triangle text-red-500 mr-1\"\r\n style=\"font-size: 1.3rem\"></i>\r\n <p *ngIf=\"!(widgetItem.key === 'Address' && widget.predefinedName === 'PropertyWidget')\" class=\"key-field-wrapper\"\r\n [ngStyle]=\"getStyle(widgetItem?.style)\">\r\n <ng-container *ngIf=\"widgetItem?.isLink; else plainText\">\r\n <a (click)=\"handleWidgetItemClick()\" [ngStyle]=\"{ color: 'var(--primary-500) !important', textDecoration: 'underline' }\">\r\n {{ (widgetItem.value && widgetItem.value !== 'null') ? widgetItem.value : '' }}\r\n </a>\r\n </ng-container>\r\n <ng-template #plainText>\r\n {{ (widgetItem?.value && widgetItem?.value !== 'null') ? widgetItem?.value : '' }}\r\n </ng-template>\r\n </p>\r\n <i *ngIf=\"widgetItem.key === 'Address' && widget.predefinedName === 'PropertyWidget'\"\r\n class=\"pi pi-map-marker map-icon map-icon-wrapper\"></i>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"widgetItem?.key === 'Direct Debit' || widgetItem?.key === 'Solicitor' \" class=\"flex align-items-center justify-content-between\">\r\n <p class=\"mb-0 text-color-secondary mr-3 key-field-wrapper w-50\">{{ widgetItem?.key }}</p>\r\n <div class=\"mb-0 text-color font-semibold text-value-wrapper w-50 flex align-items-center justify-content-end\">\r\n <p class=\"key-field-wrapper cursor-pointer\"\r\n [ngStyle]=\"getStyle(widgetItem?.style)\">\r\n <ng-container>\r\n @if(widgetItem?.key === 'Direct Debit'){\r\n <a (click)=\"handleDirectDebitClick()\">\r\n {{ (widgetItem.value && widgetItem.value !== 'null') ? widgetItem.value : '' }}\r\n </a>\r\n }@if(widgetItem?.key === 'Solicitor'){\r\n <a (click)=\"handleSolicitorClick()\">\r\n {{ (widgetItem.value && widgetItem.value !== 'null') ? widgetItem.value : '' }}\r\n </a>\r\n }\r\n </ng-container>\r\n </p>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"widgetItem.key === 'Address' && widget.predefinedName === 'PropertyWidget'\"\r\n class=\"address-title-wrapper cursor-pointer\" [ngStyle]=\"getStyle(widgetItem?.style)\" (click)=\"onHandleSidebar()\">\r\n {{ widgetItem?.value }}\r\n </div>\r\n</div>", styles: [".text-value-wrapper{-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal;max-width:100%}.key-field-wrapper{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.w-50{width:50%!important}.map-icon-wrapper{font-size:16px;padding:13px;border-radius:30px;border:1px solid rgba(76,98,146,.1);background:#4c62920a}.address-title-wrapper{width:80%;word-break:break-word;margin-top:-12px}\n"] }]
|
|
4244
4235
|
}], ctorParameters: () => [{ type: StyleBuilderService }, { type: WidgetStore }], propDecorators: { widgetItem: [{
|
|
4245
4236
|
type: Input
|
|
4246
4237
|
}], widget: [{
|
|
@@ -4304,18 +4295,21 @@ class WidgetContainerComponent {
|
|
|
4304
4295
|
}
|
|
4305
4296
|
this.getWidgetFromCacheList(queueId, recordId);
|
|
4306
4297
|
this.getAllWidgetList(queueId, recordId);
|
|
4307
|
-
this.
|
|
4298
|
+
this.subscriptions.push(this.widgetQuery.getWidgetItem()
|
|
4299
|
+
.subscribe((res) => {
|
|
4300
|
+
if (res) {
|
|
4301
|
+
this.onDirectDebitClick.emit(res);
|
|
4302
|
+
}
|
|
4303
|
+
}));
|
|
4308
4304
|
}
|
|
4309
4305
|
handleWidgetItemClick() {
|
|
4310
|
-
this.widgetQuery.getOnWidgetItemClick()
|
|
4311
|
-
.pipe(takeUntil(this.destroy$))
|
|
4312
|
-
.subscribe((res) => {
|
|
4306
|
+
this.subscriptions.push(this.widgetQuery.getOnWidgetItemClick().subscribe((res) => {
|
|
4313
4307
|
if (res) {
|
|
4314
4308
|
this.onWidgetItemClick.emit(res);
|
|
4315
4309
|
}
|
|
4316
4310
|
}, (error) => {
|
|
4317
4311
|
console.error('Error in getOnWidgetItemClick subscription:', error);
|
|
4318
|
-
});
|
|
4312
|
+
}));
|
|
4319
4313
|
}
|
|
4320
4314
|
handleEventFromPropertyDetails() {
|
|
4321
4315
|
this.widgetQuery.getViewPropertyDetails()
|
|
@@ -4359,7 +4353,7 @@ class WidgetContainerComponent {
|
|
|
4359
4353
|
}
|
|
4360
4354
|
ngOnChanges(changes) {
|
|
4361
4355
|
if (!this.isSidebarVisible) {
|
|
4362
|
-
this.widgetStore.setOnViewPropertyDetails(
|
|
4356
|
+
this.widgetStore.setOnViewPropertyDetails(false);
|
|
4363
4357
|
}
|
|
4364
4358
|
}
|
|
4365
4359
|
ngOnDestroy() {
|
|
@@ -4368,6 +4362,7 @@ class WidgetContainerComponent {
|
|
|
4368
4362
|
this.subscriptions.forEach(sub => sub.unsubscribe());
|
|
4369
4363
|
this.destroy$.next();
|
|
4370
4364
|
this.destroy$.complete();
|
|
4365
|
+
this.widgetStore.setOnWidgetItemClick(null);
|
|
4371
4366
|
}
|
|
4372
4367
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetContainerComponent, deps: [{ token: WidgetService }, { token: i3$4.ActivatedRoute }, { token: WidgetQuery }, { token: WidgetStore }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4373
4368
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: WidgetContainerComponent, isStandalone: false, selector: "lib-widget-container", inputs: { isSidebarVisible: "isSidebarVisible", offerWidgetData: "offerWidgetData", valuationWidgetData: "valuationWidgetData", progressChartData: "progressChartData" }, outputs: { onViewAllDetails: "onViewAllDetails", onViewAllProperties: "onViewAllProperties", onWidgetItemClick: "onWidgetItemClick", onDirectDebitClick: "onDirectDebitClick" }, usesOnChanges: true, ngImport: i0, template: "<p-card class=\"widget-block-wrapper block\">\r\n <div class=\"widget-section-wrapper custom-scroll pt-2\">\r\n <!-- Loading state -->\r\n <ng-container *ngIf=\"isLoading; else widgetContent\">\r\n <p class=\"text-color ml-3 font-semibold\">Widget configuration loading...</p>\r\n </ng-container>\r\n\r\n <!-- Content after API call -->\r\n <ng-template #widgetContent>\r\n <ng-container *ngIf=\"(widgets && widgets.length > 0) || (valuationWidgetData || offerWidgetData); else noWidgets\">\r\n <ng-container *ngFor=\"let widget of widgets; let i = index\">\r\n <div class=\"widget-container-wrapper pl-1\" [ngClass]=\"i !== 0 ? 'mt-4' : ''\">\r\n <lib-widget-header [widget]=\"widget\" [progressChartData]=\"progressChartData\"></lib-widget-header>\r\n <div class=\"widget-content-wrapper mt-3 py-3\">\r\n <lib-widget-body [widget]=\"widget\"></lib-widget-body>\r\n <lib-widget-footer [widget]=\"widget\"></lib-widget-footer>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"offerWidgetData\">\r\n <lib-custom-widget [widgetData]=\"offerWidgetData\"></lib-custom-widget>\r\n </ng-container>\r\n <ng-container *ngIf=\"valuationWidgetData\">\r\n <lib-custom-widget [widgetData]=\"valuationWidgetData\"></lib-custom-widget>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <!-- No widget configured state -->\r\n <ng-template #noWidgets>\r\n <p class=\"text-color ml-3 font-semibold\">No Widgets Configured</p>\r\n </ng-template>\r\n </ng-template>\r\n </div>\r\n</p-card>", styles: ["::ng-deep .badge-wrapper .p-button{padding:4px 8px}::ng-deep .refresh-btn-wrapper .p-button{padding:0}::ng-deep .valuation-timeline-wrapper .p-timeline-event-opposite{display:none}::ng-deep .rating-badge-wrapper .p-button{display:flex;align-items:center}::ng-deep .widget-block-wrapper{height:100%}::ng-deep .widget-block-wrapper .p-card{height:100%;box-shadow:none}::ng-deep .widget-block-wrapper .p-card-body{padding:0;height:100%}::ng-deep .widget-block-wrapper .p-card-content{padding-bottom:0;height:100%}.application-title-wrapper{font-size:18px;font-weight:400}.application-section-wrapper{background-color:#4c629208;border:1px solid rgba(76,98,146,.1);border-radius:10px}.widget-section-wrapper{height:100%}.custom-scroll{overflow-y:hidden;scrollbar-gutter:stable}.custom-scroll:hover{overflow-y:auto}.widget-content-wrapper{border-top:1px solid rgba(68,72,109,.1)}:host ::-webkit-scrollbar{width:6px}:host ::-webkit-scrollbar-track{background:transparent}:host ::-webkit-scrollbar-thumb{background:#d1d5db94;border-radius:20px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.Card, selector: "p-card", inputs: ["header", "subheader", "style", "styleClass"] }, { kind: "component", type: CustomWidgetComponent, selector: "lib-custom-widget", inputs: ["widgetData"] }, { kind: "component", type: WidgetHeaderComponent, selector: "lib-widget-header", inputs: ["widget", "progressChartData"] }, { kind: "component", type: WidgetFooterComponent, selector: "lib-widget-footer", inputs: ["widget"] }, { kind: "component", type: WidgetBodyComponent, selector: "lib-widget-body", inputs: ["widget"] }] });
|