cat-qw-lib 0.56.2 → 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.
@@ -170,6 +170,8 @@ 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';
173
175
  }
174
176
  const statusList = [
175
177
  { name: 'All' },
@@ -4048,11 +4050,13 @@ let WidgetStore = class WidgetStore extends BaseStore {
4048
4050
  onViewAllDetails$;
4049
4051
  onViewPropertyDetails$;
4050
4052
  onItemClick$;
4053
+ getWidgetData$;
4051
4054
  constructor() {
4052
4055
  super();
4053
4056
  this.onViewAllDetails$ = new BehaviorSubject(SHARED.EMPTY_STRING);
4054
4057
  this.onViewPropertyDetails$ = new BehaviorSubject(SHARED.EMPTY);
4055
4058
  this.onItemClick$ = new BehaviorSubject({});
4059
+ this.getWidgetData$ = new BehaviorSubject({});
4056
4060
  }
4057
4061
  setOnViewPropertyDetails(value) {
4058
4062
  this.onViewPropertyDetails$.next(value);
@@ -4066,6 +4070,9 @@ let WidgetStore = class WidgetStore extends BaseStore {
4066
4070
  setOnWidgetItemClick(value) {
4067
4071
  this.onItemClick$.next(value);
4068
4072
  }
4073
+ setWidgetData(value) {
4074
+ this.getWidgetData$.next(value);
4075
+ }
4069
4076
  setWidgetItem(widgetItem) {
4070
4077
  this.update({ widgetItem: widgetItem });
4071
4078
  }
@@ -4131,6 +4138,9 @@ class WidgetQuery extends BaseQuery {
4131
4138
  getWidgetItem() {
4132
4139
  return this.select(state => state['widgetItem']);
4133
4140
  }
4141
+ getWidgetData() {
4142
+ return this.widgetStore.getWidgetData$.asObservable();
4143
+ }
4134
4144
  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 });
4135
4145
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetQuery, providedIn: 'root' });
4136
4146
  }
@@ -4223,6 +4233,7 @@ class WidgetItemComponent {
4223
4233
  }
4224
4234
  handleWidgetItemClick(widgetItem) {
4225
4235
  const updatedItem = { ...widgetItem };
4236
+ const applicantId = this.widget.recordId;
4226
4237
  switch (updatedItem.route) {
4227
4238
  case SHARED.DIRECT_DEBIT:
4228
4239
  const directDebit = this.widget.dataItems.filter((val) => val.key === SHARED.DIRECT_DEBITID);
@@ -4237,10 +4248,16 @@ class WidgetItemComponent {
4237
4248
  updatedItem.value = product[0].value;
4238
4249
  break;
4239
4250
  case SHARED.COMMITMENTS:
4240
- const applicantId = this.widget.recordId;
4251
+ updatedItem.value = applicantId;
4252
+ break;
4253
+ case SHARED.EXPENDITURE:
4254
+ updatedItem.value = applicantId;
4255
+ break;
4256
+ case SHARED.INCOME:
4241
4257
  updatedItem.value = applicantId;
4242
4258
  break;
4243
4259
  }
4260
+ this.widgetStore.setWidgetData(this.widget);
4244
4261
  this.widgetStore.setOnWidgetItemClick(updatedItem);
4245
4262
  }
4246
4263
  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 });
@@ -4292,10 +4309,11 @@ class WidgetContainerComponent {
4292
4309
  queueId;
4293
4310
  recordId;
4294
4311
  onViewAllDetails = new EventEmitter();
4295
- onWidgetLoaded = new EventEmitter();
4296
4312
  onViewAllProperties = new EventEmitter();
4297
4313
  onWidgetItemClick = new EventEmitter();
4314
+ getWidgetData = new EventEmitter();
4298
4315
  onDirectDebitClick = new EventEmitter();
4316
+ onWidgetLoaded = new EventEmitter();
4299
4317
  isRouteChanged = SHARED.EMPTY;
4300
4318
  isSidebarVisible = SHARED.FALSE;
4301
4319
  offerWidgetData;
@@ -4316,6 +4334,7 @@ class WidgetContainerComponent {
4316
4334
  }
4317
4335
  this.getWidgetFromCacheList(this.queueId, this.recordId);
4318
4336
  this.getAllWidgetList(this.queueId, this.recordId);
4337
+ this.handleGetWidgetData();
4319
4338
  this.handleWidgetItemClick();
4320
4339
  }
4321
4340
  handleWidgetItemClick() {
@@ -4329,6 +4348,17 @@ class WidgetContainerComponent {
4329
4348
  console.error('Error in getOnWidgetItemClick subscription:', error);
4330
4349
  });
4331
4350
  }
4351
+ handleGetWidgetData() {
4352
+ this.widgetQuery.getWidgetData()
4353
+ .pipe(takeUntil(this.destroy$))
4354
+ .subscribe((res) => {
4355
+ if (res) {
4356
+ this.getWidgetData.emit(res);
4357
+ }
4358
+ }, (error) => {
4359
+ console.error('Error in getWidgetData subscription:', error);
4360
+ });
4361
+ }
4332
4362
  handleEventFromPropertyDetails() {
4333
4363
  this.widgetQuery.getViewPropertyDetails()
4334
4364
  .pipe(takeUntil(this.destroy$))
@@ -4355,8 +4385,8 @@ class WidgetContainerComponent {
4355
4385
  this.onWidgetLoaded.emit(this.widgets);
4356
4386
  this.cdr.detectChanges();
4357
4387
  }, (error) => {
4358
- console.error(ERROR.ERROR_FETCHING_WIDGET_DATA, error);
4359
4388
  this.onWidgetLoaded.emit(true);
4389
+ console.error(ERROR.ERROR_FETCHING_WIDGET_DATA, error);
4360
4390
  this.cdr.detectChanges();
4361
4391
  });
4362
4392
  }
@@ -4388,21 +4418,23 @@ class WidgetContainerComponent {
4388
4418
  this.destroy$.complete();
4389
4419
  }
4390
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 });
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"] }] });
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"] }] });
4392
4422
  }
4393
4423
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetContainerComponent, decorators: [{
4394
4424
  type: Component,
4395
4425
  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"] }]
4396
4426
  }], ctorParameters: () => [{ type: WidgetService }, { type: i3$4.ActivatedRoute }, { type: WidgetQuery }, { type: WidgetStore }, { type: i0.ChangeDetectorRef }], propDecorators: { onViewAllDetails: [{
4397
4427
  type: Output
4398
- }], onWidgetLoaded: [{
4399
- type: Output
4400
4428
  }], onViewAllProperties: [{
4401
4429
  type: Output
4402
4430
  }], onWidgetItemClick: [{
4403
4431
  type: Output
4432
+ }], getWidgetData: [{
4433
+ type: Output
4404
4434
  }], onDirectDebitClick: [{
4405
4435
  type: Output
4436
+ }], onWidgetLoaded: [{
4437
+ type: Output
4406
4438
  }], isRouteChanged: [{
4407
4439
  type: Input
4408
4440
  }], isSidebarVisible: [{