cat-qw-lib 0.57.0 → 0.57.1
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
|
@@ -4306,11 +4306,15 @@ class WidgetContainerComponent {
|
|
|
4306
4306
|
widgets = [];
|
|
4307
4307
|
subscriptions = [];
|
|
4308
4308
|
isLoading = true;
|
|
4309
|
+
queueId;
|
|
4310
|
+
recordId;
|
|
4309
4311
|
onViewAllDetails = new EventEmitter();
|
|
4310
4312
|
onViewAllProperties = new EventEmitter();
|
|
4311
4313
|
onWidgetItemClick = new EventEmitter();
|
|
4312
4314
|
getWidgetData = new EventEmitter();
|
|
4313
4315
|
onDirectDebitClick = new EventEmitter();
|
|
4316
|
+
onWidgetLoaded = new EventEmitter();
|
|
4317
|
+
isRouteChanged = SHARED.EMPTY;
|
|
4314
4318
|
isSidebarVisible = SHARED.FALSE;
|
|
4315
4319
|
offerWidgetData;
|
|
4316
4320
|
valuationWidgetData;
|
|
@@ -4318,18 +4322,18 @@ class WidgetContainerComponent {
|
|
|
4318
4322
|
ngOnInit() {
|
|
4319
4323
|
this.handleEventFromPropertyDetails();
|
|
4320
4324
|
this.handleOnViewAllDetails();
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
if (!queueId || !recordId) {
|
|
4325
|
+
this.queueId = localStorage.getItem(SHARED.selectedQueue);
|
|
4326
|
+
this.recordId = this.activatedRoute.snapshot.params[SHARED.ID];
|
|
4327
|
+
if (!this.queueId || !this.recordId) {
|
|
4324
4328
|
console.error(ERROR.ERROR_MISSING_PARAMETERS, {
|
|
4325
|
-
queueId: queueId || SHARED.MISSING_QUEUE_ID,
|
|
4326
|
-
recordId: recordId || SHARED.MISSING_RECORD_ID
|
|
4329
|
+
queueId: this.queueId || SHARED.MISSING_QUEUE_ID,
|
|
4330
|
+
recordId: this.recordId || SHARED.MISSING_RECORD_ID
|
|
4327
4331
|
});
|
|
4328
4332
|
this.isLoading = false;
|
|
4329
4333
|
return;
|
|
4330
4334
|
}
|
|
4331
|
-
this.getWidgetFromCacheList(queueId, recordId);
|
|
4332
|
-
this.getAllWidgetList(queueId, recordId);
|
|
4335
|
+
this.getWidgetFromCacheList(this.queueId, this.recordId);
|
|
4336
|
+
this.getAllWidgetList(this.queueId, this.recordId);
|
|
4333
4337
|
this.handleGetWidgetData();
|
|
4334
4338
|
this.handleWidgetItemClick();
|
|
4335
4339
|
}
|
|
@@ -4378,8 +4382,10 @@ class WidgetContainerComponent {
|
|
|
4378
4382
|
.pipe(takeUntil(this.destroy$))
|
|
4379
4383
|
.subscribe((res) => {
|
|
4380
4384
|
this.widgets = res.sort((a, b) => a.order - b.order);
|
|
4385
|
+
this.onWidgetLoaded.emit(this.widgets);
|
|
4381
4386
|
this.cdr.detectChanges();
|
|
4382
4387
|
}, (error) => {
|
|
4388
|
+
this.onWidgetLoaded.emit(true);
|
|
4383
4389
|
console.error(ERROR.ERROR_FETCHING_WIDGET_DATA, error);
|
|
4384
4390
|
this.cdr.detectChanges();
|
|
4385
4391
|
});
|
|
@@ -4399,16 +4405,20 @@ class WidgetContainerComponent {
|
|
|
4399
4405
|
if (!this.isSidebarVisible) {
|
|
4400
4406
|
this.widgetStore.setOnViewPropertyDetails({ propertyId: null, isDailogShow: false });
|
|
4401
4407
|
}
|
|
4408
|
+
if (changes['isRouteChanged'] && this.queueId && this.recordId) {
|
|
4409
|
+
this.getAllWidgetList(this.queueId, this.recordId);
|
|
4410
|
+
}
|
|
4402
4411
|
}
|
|
4403
4412
|
ngOnDestroy() {
|
|
4404
4413
|
this.widgets = [];
|
|
4405
4414
|
this.widgetStore.resetOnViewAllDetails();
|
|
4415
|
+
this.onWidgetLoaded.emit(SHARED.EMPTY);
|
|
4406
4416
|
this.subscriptions.forEach(sub => sub.unsubscribe());
|
|
4407
4417
|
this.destroy$.next();
|
|
4408
4418
|
this.destroy$.complete();
|
|
4409
4419
|
}
|
|
4410
4420
|
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 });
|
|
4411
|
-
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", getWidgetData: "getWidgetData", 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"] }] });
|
|
4421
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: WidgetContainerComponent, isStandalone: false, selector: "lib-widget-container", inputs: { isRouteChanged: "isRouteChanged", isSidebarVisible: "isSidebarVisible", offerWidgetData: "offerWidgetData", valuationWidgetData: "valuationWidgetData", progressChartData: "progressChartData" }, outputs: { onViewAllDetails: "onViewAllDetails", onViewAllProperties: "onViewAllProperties", onWidgetItemClick: "onWidgetItemClick", getWidgetData: "getWidgetData", onDirectDebitClick: "onDirectDebitClick", onWidgetLoaded: "onWidgetLoaded" }, 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"] }] });
|
|
4412
4422
|
}
|
|
4413
4423
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetContainerComponent, decorators: [{
|
|
4414
4424
|
type: Component,
|
|
@@ -4423,6 +4433,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
|
4423
4433
|
type: Output
|
|
4424
4434
|
}], onDirectDebitClick: [{
|
|
4425
4435
|
type: Output
|
|
4436
|
+
}], onWidgetLoaded: [{
|
|
4437
|
+
type: Output
|
|
4438
|
+
}], isRouteChanged: [{
|
|
4439
|
+
type: Input
|
|
4426
4440
|
}], isSidebarVisible: [{
|
|
4427
4441
|
type: Input
|
|
4428
4442
|
}], offerWidgetData: [{
|