cat-qw-lib 2.1.15 → 2.1.17

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.
@@ -2784,7 +2784,7 @@ class TableSecondaryComponent {
2784
2784
  return '#f59e0b';
2785
2785
  }
2786
2786
  else {
2787
- return 'black';
2787
+ return '#E5E7EB';
2788
2788
  }
2789
2789
  }
2790
2790
  getProgressBackground(percent) {
@@ -4867,6 +4867,9 @@ let WidgetStore = class WidgetStore extends BaseStore {
4867
4867
  setWidgetData(value) {
4868
4868
  this.getWidgetData$.next(value);
4869
4869
  }
4870
+ setWidgetsList(widgetsList) {
4871
+ this.update({ widgetsList: widgetsList });
4872
+ }
4870
4873
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: WidgetStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4871
4874
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: WidgetStore, providedIn: 'root' });
4872
4875
  };
@@ -4878,38 +4881,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
4878
4881
  args: [{ providedIn: 'root' }]
4879
4882
  }], ctorParameters: () => [] });
4880
4883
 
4881
- /**
4882
- * Service for managing widget configurations.
4883
- */
4884
- class WidgetService extends BaseService {
4885
- widgetStore;
4886
- configService;
4887
- constructor(http, widgetStore, configService, listService) {
4888
- super(http, widgetStore, configService, listService);
4889
- this.widgetStore = widgetStore;
4890
- this.configService = configService;
4891
- this._pathName = DATASOURCES.WIDGET;
4892
- }
4893
- getAllWidgets(recordId, widgetName) {
4894
- const url = `${this.apiUrl}${ROUTES.APPLICATION_WIDGET}${SHARED.QUESTION_MARK}${SHARED.RECORDID}${SHARED.EQUALS}${recordId}${SHARED.AMPERSAND}${SHARED.WIDGET_NAME}${SHARED.EQUALS}${widgetName}`;
4895
- return this.http.get(url).pipe(tap$1((entities) => this.widgetStore.set(entities)));
4896
- }
4897
- getEvaluateFromCache(recordId, widgetName) {
4898
- const url = `${this.apiUrl}${ROUTES.APPLICATION_WIDGET_CACHE}${SHARED.QUESTION_MARK}${SHARED.RECORDID}${SHARED.EQUALS}${recordId}${SHARED.AMPERSAND}${SHARED.WIDGET_NAME}${SHARED.EQUALS}${widgetName}`;
4899
- return this.http.get(url).pipe(tap$1((entities) => this.widgetStore.set(entities)));
4900
- }
4901
- getEvaluateByWidgetName(recordId, widgetName) {
4902
- const url = `${this.apiUrl}${ROUTES.EVALUATE_BY_WIDGETNAME}${SHARED.QUESTION_MARK}${SHARED.RECORDID}${SHARED.EQUALS}${recordId}${SHARED.AMPERSAND}${SHARED.WIDGET_NAME}${SHARED.EQUALS}${widgetName}`;
4903
- return this.http.get(url).pipe(tap$1((entities) => this.widgetStore.set(entities)));
4904
- }
4905
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: WidgetService, deps: [{ token: i1$1.HttpClient }, { token: WidgetStore }, { token: AppConfigService }, { token: ListService }], target: i0.ɵɵFactoryTarget.Injectable });
4906
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: WidgetService, providedIn: 'root' });
4907
- }
4908
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: WidgetService, decorators: [{
4909
- type: Injectable,
4910
- args: [{ providedIn: 'root' }]
4911
- }], ctorParameters: () => [{ type: i1$1.HttpClient }, { type: WidgetStore }, { type: AppConfigService }, { type: ListService }] });
4912
-
4913
4884
  /**
4914
4885
  * Widget Admin Query
4915
4886
  */
@@ -4942,6 +4913,9 @@ class WidgetQuery extends BaseQuery {
4942
4913
  getWidgetData() {
4943
4914
  return this.widgetStore.getWidgetData$.asObservable();
4944
4915
  }
4916
+ getWidgetList() {
4917
+ return this.select(state => state['widgetsList']);
4918
+ }
4945
4919
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: WidgetQuery, deps: [{ token: WidgetStore }, { token: WidgetStore }], target: i0.ɵɵFactoryTarget.Injectable });
4946
4920
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: WidgetQuery, providedIn: 'root' });
4947
4921
  }
@@ -4950,6 +4924,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
4950
4924
  args: [{ providedIn: 'root' }]
4951
4925
  }], ctorParameters: () => [{ type: WidgetStore }, { type: WidgetStore }] });
4952
4926
 
4927
+ /**
4928
+ * Service for managing widget configurations.
4929
+ */
4930
+ class WidgetService extends BaseService {
4931
+ widgetStore;
4932
+ configService;
4933
+ constructor(http, widgetStore, configService, listService) {
4934
+ super(http, widgetStore, configService, listService);
4935
+ this.widgetStore = widgetStore;
4936
+ this.configService = configService;
4937
+ this._pathName = DATASOURCES.WIDGET;
4938
+ }
4939
+ getAllWidgets(recordId, widgetName) {
4940
+ const url = `${this.apiUrl}${ROUTES.APPLICATION_WIDGET}${SHARED.QUESTION_MARK}${SHARED.RECORDID}${SHARED.EQUALS}${recordId}${SHARED.AMPERSAND}${SHARED.WIDGET_NAME}${SHARED.EQUALS}${widgetName}`;
4941
+ return this.http.get(url).pipe(tap$1((entities) => this.widgetStore.set(entities)));
4942
+ }
4943
+ getEvaluateFromCache(recordId, widgetName) {
4944
+ const url = `${this.apiUrl}${ROUTES.APPLICATION_WIDGET_CACHE}${SHARED.QUESTION_MARK}${SHARED.RECORDID}${SHARED.EQUALS}${recordId}${SHARED.AMPERSAND}${SHARED.WIDGET_NAME}${SHARED.EQUALS}${widgetName}`;
4945
+ return this.http.get(url).pipe(tap$1((entities) => this.widgetStore.set(entities)));
4946
+ }
4947
+ getEvaluateByWidgetName(recordId, widgetName) {
4948
+ const url = `${this.apiUrl}${ROUTES.EVALUATE_BY_WIDGETNAME}${SHARED.QUESTION_MARK}${SHARED.RECORDID}${SHARED.EQUALS}${recordId}${SHARED.AMPERSAND}${SHARED.WIDGET_NAME}${SHARED.EQUALS}${widgetName}`;
4949
+ return this.http.get(url).pipe(tap$1((entities) => this.widgetStore.set(entities)));
4950
+ }
4951
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: WidgetService, deps: [{ token: i1$1.HttpClient }, { token: WidgetStore }, { token: AppConfigService }, { token: ListService }], target: i0.ɵɵFactoryTarget.Injectable });
4952
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: WidgetService, providedIn: 'root' });
4953
+ }
4954
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: WidgetService, decorators: [{
4955
+ type: Injectable,
4956
+ args: [{ providedIn: 'root' }]
4957
+ }], ctorParameters: () => [{ type: i1$1.HttpClient }, { type: WidgetStore }, { type: AppConfigService }, { type: ListService }] });
4958
+
4953
4959
  class StyleBuilderService {
4954
4960
  constructor() { }
4955
4961
  getStyle(style) {
@@ -5403,6 +5409,7 @@ class WidgetMenuComponent {
5403
5409
  .pipe(takeUntil(this.destroy$))
5404
5410
  .subscribe((res) => {
5405
5411
  this.widgets = res.sort((a, b) => a.order - b.order);
5412
+ this.widgetStore.setWidgetsList(this.widgets);
5406
5413
  this.cdr.detectChanges();
5407
5414
  }, (error) => {
5408
5415
  console.error(ERROR.ERROR_FETCHING_WIDGET_DATA, error);
@@ -5508,8 +5515,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
5508
5515
  */
5509
5516
  class WidgetContainerComponent {
5510
5517
  widgetStore;
5511
- constructor(widgetStore) {
5518
+ widgetQuery;
5519
+ constructor(widgetStore, widgetQuery) {
5512
5520
  this.widgetStore = widgetStore;
5521
+ this.widgetQuery = widgetQuery;
5513
5522
  }
5514
5523
  isMenu = false;
5515
5524
  offerWidgetData;
@@ -5520,6 +5529,17 @@ class WidgetContainerComponent {
5520
5529
  onViewAllDetails = new EventEmitter();
5521
5530
  onWidgetEventClick = new EventEmitter();
5522
5531
  onWidgetItemClick = new EventEmitter();
5532
+ onUpdatedWidgetList = new EventEmitter();
5533
+ destroy$ = new Subject();
5534
+ ngOnInit() {
5535
+ this.widgetQuery.getWidgetList()
5536
+ .pipe(takeUntil(this.destroy$))
5537
+ .subscribe((data) => {
5538
+ if (data) {
5539
+ this.onUpdatedWidgetList.emit(data);
5540
+ }
5541
+ });
5542
+ }
5523
5543
  ngOnChanges(changes) {
5524
5544
  if (changes[SHARED.IS_MENU]) {
5525
5545
  this.isMenu = changes[SHARED.IS_MENU].currentValue;
@@ -5535,13 +5555,17 @@ class WidgetContainerComponent {
5535
5555
  handleWidgetItemClick(event) {
5536
5556
  this.onWidgetItemClick.emit(event);
5537
5557
  }
5538
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: WidgetContainerComponent, deps: [{ token: WidgetStore }], target: i0.ɵɵFactoryTarget.Component });
5539
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.5", type: WidgetContainerComponent, isStandalone: false, selector: "lib-widget-container", inputs: { isMenu: "isMenu", offerWidgetData: "offerWidgetData", valuationWidgetData: "valuationWidgetData", widgetName: "widgetName", recordId: "recordId", onWidgetUpdate: "onWidgetUpdate" }, outputs: { onViewAllDetails: "onViewAllDetails", onWidgetEventClick: "onWidgetEventClick", onWidgetItemClick: "onWidgetItemClick" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"widget-container-wrapper\">\r\n @if(isMenu) {\r\n <div class=\"bg-white widget-menu-container\">\r\n <lib-widget-menu \r\n [offerWidgetData]=\"offerWidgetData\"\r\n [valuationWidgetData]=\"valuationWidgetData\"\r\n (onViewAllDetails)=\"handleViewAllDetails($event)\"\r\n (onWidgetEventClick)=\"handleWidgetEventClick($event)\"\r\n (onWidgetItemClick)=\"handleWidgetItemClick($event)\"\r\n ></lib-widget-menu>\r\n </div>\r\n } @else {\r\n <div class=\"bg-white widget-menu-container\">\r\n <lib-widget-row-tile\r\n [recordId]=\"recordId\"\r\n [widgetName]=\"widgetName\"\r\n [onWidgetUpdate]=\"onWidgetUpdate\"\r\n ></lib-widget-row-tile>\r\n </div>\r\n }\r\n</div>", 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%;background-color:var(--surface-0)!important;border-radius:10px;box-shadow:none}::ng-deep .widget-block-wrapper .p-card-body{padding:0;height:100%}::ng-deep .widget-block-wrapper .p-card-content{padding: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-menu-container{border-radius:10px}:host ::-webkit-scrollbar{width:6px}:host ::-webkit-scrollbar-track{background:transparent}:host ::-webkit-scrollbar-thumb{background:#d1d5db94;border-radius:20px}\n"], dependencies: [{ kind: "component", type: WidgetMenuComponent, selector: "lib-widget-menu", inputs: ["isSidebarVisible", "offerWidgetData", "valuationWidgetData"], outputs: ["onViewAllDetails", "onWidgetEventClick", "onWidgetItemClick"] }, { kind: "component", type: WidgetRowTileComponent, selector: "lib-widget-row-tile", inputs: ["recordId", "widgetName", "onWidgetUpdate"] }] });
5558
+ ngOnDestroy() {
5559
+ this.destroy$.next();
5560
+ this.destroy$.complete();
5561
+ }
5562
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: WidgetContainerComponent, deps: [{ token: WidgetStore }, { token: WidgetQuery }], target: i0.ɵɵFactoryTarget.Component });
5563
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.5", type: WidgetContainerComponent, isStandalone: false, selector: "lib-widget-container", inputs: { isMenu: "isMenu", offerWidgetData: "offerWidgetData", valuationWidgetData: "valuationWidgetData", widgetName: "widgetName", recordId: "recordId", onWidgetUpdate: "onWidgetUpdate" }, outputs: { onViewAllDetails: "onViewAllDetails", onWidgetEventClick: "onWidgetEventClick", onWidgetItemClick: "onWidgetItemClick", onUpdatedWidgetList: "onUpdatedWidgetList" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"widget-container-wrapper\">\r\n @if(isMenu) {\r\n <div class=\"bg-white widget-menu-container\">\r\n <lib-widget-menu \r\n [offerWidgetData]=\"offerWidgetData\"\r\n [valuationWidgetData]=\"valuationWidgetData\"\r\n (onViewAllDetails)=\"handleViewAllDetails($event)\"\r\n (onWidgetEventClick)=\"handleWidgetEventClick($event)\"\r\n (onWidgetItemClick)=\"handleWidgetItemClick($event)\"\r\n ></lib-widget-menu>\r\n </div>\r\n } @else {\r\n <div class=\"bg-white widget-menu-container\">\r\n <lib-widget-row-tile\r\n [recordId]=\"recordId\"\r\n [widgetName]=\"widgetName\"\r\n [onWidgetUpdate]=\"onWidgetUpdate\"\r\n ></lib-widget-row-tile>\r\n </div>\r\n }\r\n</div>", 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%;background-color:var(--surface-0)!important;border-radius:10px;box-shadow:none}::ng-deep .widget-block-wrapper .p-card-body{padding:0;height:100%}::ng-deep .widget-block-wrapper .p-card-content{padding: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-menu-container{border-radius:10px}:host ::-webkit-scrollbar{width:6px}:host ::-webkit-scrollbar-track{background:transparent}:host ::-webkit-scrollbar-thumb{background:#d1d5db94;border-radius:20px}\n"], dependencies: [{ kind: "component", type: WidgetMenuComponent, selector: "lib-widget-menu", inputs: ["isSidebarVisible", "offerWidgetData", "valuationWidgetData"], outputs: ["onViewAllDetails", "onWidgetEventClick", "onWidgetItemClick"] }, { kind: "component", type: WidgetRowTileComponent, selector: "lib-widget-row-tile", inputs: ["recordId", "widgetName", "onWidgetUpdate"] }] });
5540
5564
  }
5541
5565
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: WidgetContainerComponent, decorators: [{
5542
5566
  type: Component,
5543
5567
  args: [{ selector: 'lib-widget-container', standalone: false, template: "<div class=\"widget-container-wrapper\">\r\n @if(isMenu) {\r\n <div class=\"bg-white widget-menu-container\">\r\n <lib-widget-menu \r\n [offerWidgetData]=\"offerWidgetData\"\r\n [valuationWidgetData]=\"valuationWidgetData\"\r\n (onViewAllDetails)=\"handleViewAllDetails($event)\"\r\n (onWidgetEventClick)=\"handleWidgetEventClick($event)\"\r\n (onWidgetItemClick)=\"handleWidgetItemClick($event)\"\r\n ></lib-widget-menu>\r\n </div>\r\n } @else {\r\n <div class=\"bg-white widget-menu-container\">\r\n <lib-widget-row-tile\r\n [recordId]=\"recordId\"\r\n [widgetName]=\"widgetName\"\r\n [onWidgetUpdate]=\"onWidgetUpdate\"\r\n ></lib-widget-row-tile>\r\n </div>\r\n }\r\n</div>", 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%;background-color:var(--surface-0)!important;border-radius:10px;box-shadow:none}::ng-deep .widget-block-wrapper .p-card-body{padding:0;height:100%}::ng-deep .widget-block-wrapper .p-card-content{padding: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-menu-container{border-radius:10px}:host ::-webkit-scrollbar{width:6px}:host ::-webkit-scrollbar-track{background:transparent}:host ::-webkit-scrollbar-thumb{background:#d1d5db94;border-radius:20px}\n"] }]
5544
- }], ctorParameters: () => [{ type: WidgetStore }], propDecorators: { isMenu: [{
5568
+ }], ctorParameters: () => [{ type: WidgetStore }, { type: WidgetQuery }], propDecorators: { isMenu: [{
5545
5569
  type: Input
5546
5570
  }], offerWidgetData: [{
5547
5571
  type: Input
@@ -5559,6 +5583,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
5559
5583
  type: Output
5560
5584
  }], onWidgetItemClick: [{
5561
5585
  type: Output
5586
+ }], onUpdatedWidgetList: [{
5587
+ type: Output
5562
5588
  }] } });
5563
5589
 
5564
5590
  class WidgetMenuHeaderComponent {