cat-qw-lib 0.53.0 → 0.56.2
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 +23 -41
- package/fesm2022/cat-qw-lib.mjs.map +1 -1
- package/lib/shared/constant/SHARED.d.ts +0 -2
- package/lib/widget/components/widget-container/widget-container.component.d.ts +5 -3
- package/lib/widget/state/widget.query.d.ts +0 -1
- package/lib/widget/state/widget.store.d.ts +0 -2
- package/package.json +1 -1
package/fesm2022/cat-qw-lib.mjs
CHANGED
|
@@ -170,8 +170,6 @@ class SHARED {
|
|
|
170
170
|
static PRODUCT = 'product';
|
|
171
171
|
static COMMITMENTS = 'commitments';
|
|
172
172
|
static PRODUCT_ID = 'ProductId';
|
|
173
|
-
static EXPENDITURE = 'expenditure';
|
|
174
|
-
static INCOME = 'income';
|
|
175
173
|
}
|
|
176
174
|
const statusList = [
|
|
177
175
|
{ name: 'All' },
|
|
@@ -4050,13 +4048,11 @@ let WidgetStore = class WidgetStore extends BaseStore {
|
|
|
4050
4048
|
onViewAllDetails$;
|
|
4051
4049
|
onViewPropertyDetails$;
|
|
4052
4050
|
onItemClick$;
|
|
4053
|
-
getWidgetData$;
|
|
4054
4051
|
constructor() {
|
|
4055
4052
|
super();
|
|
4056
4053
|
this.onViewAllDetails$ = new BehaviorSubject(SHARED.EMPTY_STRING);
|
|
4057
4054
|
this.onViewPropertyDetails$ = new BehaviorSubject(SHARED.EMPTY);
|
|
4058
4055
|
this.onItemClick$ = new BehaviorSubject({});
|
|
4059
|
-
this.getWidgetData$ = new BehaviorSubject({});
|
|
4060
4056
|
}
|
|
4061
4057
|
setOnViewPropertyDetails(value) {
|
|
4062
4058
|
this.onViewPropertyDetails$.next(value);
|
|
@@ -4070,9 +4066,6 @@ let WidgetStore = class WidgetStore extends BaseStore {
|
|
|
4070
4066
|
setOnWidgetItemClick(value) {
|
|
4071
4067
|
this.onItemClick$.next(value);
|
|
4072
4068
|
}
|
|
4073
|
-
setWidgetData(value) {
|
|
4074
|
-
this.getWidgetData$.next(value);
|
|
4075
|
-
}
|
|
4076
4069
|
setWidgetItem(widgetItem) {
|
|
4077
4070
|
this.update({ widgetItem: widgetItem });
|
|
4078
4071
|
}
|
|
@@ -4138,9 +4131,6 @@ class WidgetQuery extends BaseQuery {
|
|
|
4138
4131
|
getWidgetItem() {
|
|
4139
4132
|
return this.select(state => state['widgetItem']);
|
|
4140
4133
|
}
|
|
4141
|
-
getWidgetData() {
|
|
4142
|
-
return this.widgetStore.getWidgetData$.asObservable();
|
|
4143
|
-
}
|
|
4144
4134
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetQuery, deps: [{ token: WidgetStore }, { token: WidgetStore }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4145
4135
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetQuery, providedIn: 'root' });
|
|
4146
4136
|
}
|
|
@@ -4233,7 +4223,6 @@ class WidgetItemComponent {
|
|
|
4233
4223
|
}
|
|
4234
4224
|
handleWidgetItemClick(widgetItem) {
|
|
4235
4225
|
const updatedItem = { ...widgetItem };
|
|
4236
|
-
const applicantId = this.widget.recordId;
|
|
4237
4226
|
switch (updatedItem.route) {
|
|
4238
4227
|
case SHARED.DIRECT_DEBIT:
|
|
4239
4228
|
const directDebit = this.widget.dataItems.filter((val) => val.key === SHARED.DIRECT_DEBITID);
|
|
@@ -4248,16 +4237,10 @@ class WidgetItemComponent {
|
|
|
4248
4237
|
updatedItem.value = product[0].value;
|
|
4249
4238
|
break;
|
|
4250
4239
|
case SHARED.COMMITMENTS:
|
|
4251
|
-
|
|
4252
|
-
break;
|
|
4253
|
-
case SHARED.EXPENDITURE:
|
|
4254
|
-
updatedItem.value = applicantId;
|
|
4255
|
-
break;
|
|
4256
|
-
case SHARED.INCOME:
|
|
4240
|
+
const applicantId = this.widget.recordId;
|
|
4257
4241
|
updatedItem.value = applicantId;
|
|
4258
4242
|
break;
|
|
4259
4243
|
}
|
|
4260
|
-
this.widgetStore.setWidgetData(this.widget);
|
|
4261
4244
|
this.widgetStore.setOnWidgetItemClick(updatedItem);
|
|
4262
4245
|
}
|
|
4263
4246
|
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 });
|
|
@@ -4306,11 +4289,14 @@ class WidgetContainerComponent {
|
|
|
4306
4289
|
widgets = [];
|
|
4307
4290
|
subscriptions = [];
|
|
4308
4291
|
isLoading = true;
|
|
4292
|
+
queueId;
|
|
4293
|
+
recordId;
|
|
4309
4294
|
onViewAllDetails = new EventEmitter();
|
|
4295
|
+
onWidgetLoaded = new EventEmitter();
|
|
4310
4296
|
onViewAllProperties = new EventEmitter();
|
|
4311
4297
|
onWidgetItemClick = new EventEmitter();
|
|
4312
|
-
getWidgetData = new EventEmitter();
|
|
4313
4298
|
onDirectDebitClick = new EventEmitter();
|
|
4299
|
+
isRouteChanged = SHARED.EMPTY;
|
|
4314
4300
|
isSidebarVisible = SHARED.FALSE;
|
|
4315
4301
|
offerWidgetData;
|
|
4316
4302
|
valuationWidgetData;
|
|
@@ -4318,19 +4304,18 @@ class WidgetContainerComponent {
|
|
|
4318
4304
|
ngOnInit() {
|
|
4319
4305
|
this.handleEventFromPropertyDetails();
|
|
4320
4306
|
this.handleOnViewAllDetails();
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
if (!queueId || !recordId) {
|
|
4307
|
+
this.queueId = localStorage.getItem(SHARED.selectedQueue);
|
|
4308
|
+
this.recordId = this.activatedRoute.snapshot.params[SHARED.ID];
|
|
4309
|
+
if (!this.queueId || !this.recordId) {
|
|
4324
4310
|
console.error(ERROR.ERROR_MISSING_PARAMETERS, {
|
|
4325
|
-
queueId: queueId || SHARED.MISSING_QUEUE_ID,
|
|
4326
|
-
recordId: recordId || SHARED.MISSING_RECORD_ID
|
|
4311
|
+
queueId: this.queueId || SHARED.MISSING_QUEUE_ID,
|
|
4312
|
+
recordId: this.recordId || SHARED.MISSING_RECORD_ID
|
|
4327
4313
|
});
|
|
4328
4314
|
this.isLoading = false;
|
|
4329
4315
|
return;
|
|
4330
4316
|
}
|
|
4331
|
-
this.getWidgetFromCacheList(queueId, recordId);
|
|
4332
|
-
this.getAllWidgetList(queueId, recordId);
|
|
4333
|
-
this.handleGetWidgetData();
|
|
4317
|
+
this.getWidgetFromCacheList(this.queueId, this.recordId);
|
|
4318
|
+
this.getAllWidgetList(this.queueId, this.recordId);
|
|
4334
4319
|
this.handleWidgetItemClick();
|
|
4335
4320
|
}
|
|
4336
4321
|
handleWidgetItemClick() {
|
|
@@ -4344,17 +4329,6 @@ class WidgetContainerComponent {
|
|
|
4344
4329
|
console.error('Error in getOnWidgetItemClick subscription:', error);
|
|
4345
4330
|
});
|
|
4346
4331
|
}
|
|
4347
|
-
handleGetWidgetData() {
|
|
4348
|
-
this.widgetQuery.getWidgetData()
|
|
4349
|
-
.pipe(takeUntil(this.destroy$))
|
|
4350
|
-
.subscribe((res) => {
|
|
4351
|
-
if (res) {
|
|
4352
|
-
this.getWidgetData.emit(res);
|
|
4353
|
-
}
|
|
4354
|
-
}, (error) => {
|
|
4355
|
-
console.error('Error in getWidgetData subscription:', error);
|
|
4356
|
-
});
|
|
4357
|
-
}
|
|
4358
4332
|
handleEventFromPropertyDetails() {
|
|
4359
4333
|
this.widgetQuery.getViewPropertyDetails()
|
|
4360
4334
|
.pipe(takeUntil(this.destroy$))
|
|
@@ -4378,9 +4352,11 @@ class WidgetContainerComponent {
|
|
|
4378
4352
|
.pipe(takeUntil(this.destroy$))
|
|
4379
4353
|
.subscribe((res) => {
|
|
4380
4354
|
this.widgets = res.sort((a, b) => a.order - b.order);
|
|
4355
|
+
this.onWidgetLoaded.emit(this.widgets);
|
|
4381
4356
|
this.cdr.detectChanges();
|
|
4382
4357
|
}, (error) => {
|
|
4383
4358
|
console.error(ERROR.ERROR_FETCHING_WIDGET_DATA, error);
|
|
4359
|
+
this.onWidgetLoaded.emit(true);
|
|
4384
4360
|
this.cdr.detectChanges();
|
|
4385
4361
|
});
|
|
4386
4362
|
}
|
|
@@ -4399,30 +4375,36 @@ class WidgetContainerComponent {
|
|
|
4399
4375
|
if (!this.isSidebarVisible) {
|
|
4400
4376
|
this.widgetStore.setOnViewPropertyDetails({ propertyId: null, isDailogShow: false });
|
|
4401
4377
|
}
|
|
4378
|
+
if (changes['isRouteChanged'] && this.queueId && this.recordId) {
|
|
4379
|
+
this.getAllWidgetList(this.queueId, this.recordId);
|
|
4380
|
+
}
|
|
4402
4381
|
}
|
|
4403
4382
|
ngOnDestroy() {
|
|
4404
4383
|
this.widgets = [];
|
|
4405
4384
|
this.widgetStore.resetOnViewAllDetails();
|
|
4385
|
+
this.onWidgetLoaded.emit(SHARED.EMPTY);
|
|
4406
4386
|
this.subscriptions.forEach(sub => sub.unsubscribe());
|
|
4407
4387
|
this.destroy$.next();
|
|
4408
4388
|
this.destroy$.complete();
|
|
4409
4389
|
}
|
|
4410
4390
|
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",
|
|
4391
|
+
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", onWidgetLoaded: "onWidgetLoaded", 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"] }] });
|
|
4412
4392
|
}
|
|
4413
4393
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetContainerComponent, decorators: [{
|
|
4414
4394
|
type: Component,
|
|
4415
4395
|
args: [{ selector: 'lib-widget-container', standalone: false, 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"] }]
|
|
4416
4396
|
}], ctorParameters: () => [{ type: WidgetService }, { type: i3$4.ActivatedRoute }, { type: WidgetQuery }, { type: WidgetStore }, { type: i0.ChangeDetectorRef }], propDecorators: { onViewAllDetails: [{
|
|
4417
4397
|
type: Output
|
|
4398
|
+
}], onWidgetLoaded: [{
|
|
4399
|
+
type: Output
|
|
4418
4400
|
}], onViewAllProperties: [{
|
|
4419
4401
|
type: Output
|
|
4420
4402
|
}], onWidgetItemClick: [{
|
|
4421
4403
|
type: Output
|
|
4422
|
-
}], getWidgetData: [{
|
|
4423
|
-
type: Output
|
|
4424
4404
|
}], onDirectDebitClick: [{
|
|
4425
4405
|
type: Output
|
|
4406
|
+
}], isRouteChanged: [{
|
|
4407
|
+
type: Input
|
|
4426
4408
|
}], isSidebarVisible: [{
|
|
4427
4409
|
type: Input
|
|
4428
4410
|
}], offerWidgetData: [{
|