cat-qw-lib 2.1.58 → 2.1.60
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
|
@@ -68,7 +68,7 @@ import { QuillModule, QuillConfigModule } from 'ngx-quill';
|
|
|
68
68
|
import * as i5$3 from 'primeng/tabview';
|
|
69
69
|
import { TabViewModule } from 'primeng/tabview';
|
|
70
70
|
import hljs from 'highlight.js';
|
|
71
|
-
import * as
|
|
71
|
+
import * as i3$6 from 'primeng/skeleton';
|
|
72
72
|
import { SkeletonModule } from 'primeng/skeleton';
|
|
73
73
|
import * as i2$3 from 'primeng/chart';
|
|
74
74
|
import { ChartModule } from 'primeng/chart';
|
|
@@ -5146,6 +5146,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
|
|
|
5146
5146
|
args: [{ providedIn: 'root' }]
|
|
5147
5147
|
}], ctorParameters: () => [{ type: WidgetStore }, { type: WidgetStore }] });
|
|
5148
5148
|
|
|
5149
|
+
/**
|
|
5150
|
+
* Service for managing widget configurations.
|
|
5151
|
+
*/
|
|
5152
|
+
class WidgetService extends BaseService {
|
|
5153
|
+
widgetStore;
|
|
5154
|
+
configService;
|
|
5155
|
+
constructor(http, widgetStore, configService, listService) {
|
|
5156
|
+
super(http, widgetStore, configService, listService);
|
|
5157
|
+
this.widgetStore = widgetStore;
|
|
5158
|
+
this.configService = configService;
|
|
5159
|
+
this._pathName = DATASOURCES.WIDGET;
|
|
5160
|
+
}
|
|
5161
|
+
getAllWidgets(recordId, widgetName) {
|
|
5162
|
+
const url = `${this.apiUrl}${ROUTES.APPLICATION_WIDGET}${SHARED.QUESTION_MARK}${SHARED.RECORDID}${SHARED.EQUALS}${recordId}${SHARED.AMPERSAND}${SHARED.WIDGET_NAME}${SHARED.EQUALS}${widgetName}`;
|
|
5163
|
+
return this.http.get(url).pipe(tap$1((entities) => {
|
|
5164
|
+
this.widgetStore.set(entities);
|
|
5165
|
+
this.widgetStore.setWidgetsList(entities);
|
|
5166
|
+
}));
|
|
5167
|
+
}
|
|
5168
|
+
getEvaluateFromCache(recordId, widgetName) {
|
|
5169
|
+
const url = `${this.apiUrl}${ROUTES.APPLICATION_WIDGET_CACHE}${SHARED.QUESTION_MARK}${SHARED.RECORDID}${SHARED.EQUALS}${recordId}${SHARED.AMPERSAND}${SHARED.WIDGET_NAME}${SHARED.EQUALS}${widgetName}`;
|
|
5170
|
+
return this.http.get(url).pipe(tap$1((entities) => {
|
|
5171
|
+
this.widgetStore.set(entities);
|
|
5172
|
+
this.widgetStore.setWidgetsList(entities);
|
|
5173
|
+
}));
|
|
5174
|
+
}
|
|
5175
|
+
getEvaluateByWidgetName(recordId, widgetName) {
|
|
5176
|
+
const url = `${this.apiUrl}${ROUTES.EVALUATE_BY_WIDGETNAME}${SHARED.QUESTION_MARK}${SHARED.RECORDID}${SHARED.EQUALS}${recordId}${SHARED.AMPERSAND}${SHARED.WIDGET_NAME}${SHARED.EQUALS}${widgetName}`;
|
|
5177
|
+
return this.http.get(url).pipe(tap$1((entities) => {
|
|
5178
|
+
this.widgetStore.set(entities);
|
|
5179
|
+
this.widgetStore.setWidgetsList(entities);
|
|
5180
|
+
}));
|
|
5181
|
+
}
|
|
5182
|
+
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 });
|
|
5183
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: WidgetService, providedIn: 'root' });
|
|
5184
|
+
}
|
|
5185
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: WidgetService, decorators: [{
|
|
5186
|
+
type: Injectable,
|
|
5187
|
+
args: [{ providedIn: 'root' }]
|
|
5188
|
+
}], ctorParameters: () => [{ type: i1$1.HttpClient }, { type: WidgetStore }, { type: AppConfigService }, { type: ListService }] });
|
|
5189
|
+
|
|
5149
5190
|
class StyleBuilderService {
|
|
5150
5191
|
constructor() { }
|
|
5151
5192
|
getStyle(style) {
|
|
@@ -5204,47 +5245,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
|
|
|
5204
5245
|
}]
|
|
5205
5246
|
}], ctorParameters: () => [] });
|
|
5206
5247
|
|
|
5207
|
-
/**
|
|
5208
|
-
* Service for managing widget configurations.
|
|
5209
|
-
*/
|
|
5210
|
-
class WidgetService extends BaseService {
|
|
5211
|
-
widgetStore;
|
|
5212
|
-
configService;
|
|
5213
|
-
constructor(http, widgetStore, configService, listService) {
|
|
5214
|
-
super(http, widgetStore, configService, listService);
|
|
5215
|
-
this.widgetStore = widgetStore;
|
|
5216
|
-
this.configService = configService;
|
|
5217
|
-
this._pathName = DATASOURCES.WIDGET;
|
|
5218
|
-
}
|
|
5219
|
-
getAllWidgets(recordId, widgetName) {
|
|
5220
|
-
const url = `${this.apiUrl}${ROUTES.APPLICATION_WIDGET}${SHARED.QUESTION_MARK}${SHARED.RECORDID}${SHARED.EQUALS}${recordId}${SHARED.AMPERSAND}${SHARED.WIDGET_NAME}${SHARED.EQUALS}${widgetName}`;
|
|
5221
|
-
return this.http.get(url).pipe(tap$1((entities) => {
|
|
5222
|
-
this.widgetStore.set(entities);
|
|
5223
|
-
this.widgetStore.setWidgetsList(entities);
|
|
5224
|
-
}));
|
|
5225
|
-
}
|
|
5226
|
-
getEvaluateFromCache(recordId, widgetName) {
|
|
5227
|
-
const url = `${this.apiUrl}${ROUTES.APPLICATION_WIDGET_CACHE}${SHARED.QUESTION_MARK}${SHARED.RECORDID}${SHARED.EQUALS}${recordId}${SHARED.AMPERSAND}${SHARED.WIDGET_NAME}${SHARED.EQUALS}${widgetName}`;
|
|
5228
|
-
return this.http.get(url).pipe(tap$1((entities) => {
|
|
5229
|
-
this.widgetStore.set(entities);
|
|
5230
|
-
this.widgetStore.setWidgetsList(entities);
|
|
5231
|
-
}));
|
|
5232
|
-
}
|
|
5233
|
-
getEvaluateByWidgetName(recordId, widgetName) {
|
|
5234
|
-
const url = `${this.apiUrl}${ROUTES.EVALUATE_BY_WIDGETNAME}${SHARED.QUESTION_MARK}${SHARED.RECORDID}${SHARED.EQUALS}${recordId}${SHARED.AMPERSAND}${SHARED.WIDGET_NAME}${SHARED.EQUALS}${widgetName}`;
|
|
5235
|
-
return this.http.get(url).pipe(tap$1((entities) => {
|
|
5236
|
-
this.widgetStore.set(entities);
|
|
5237
|
-
this.widgetStore.setWidgetsList(entities);
|
|
5238
|
-
}));
|
|
5239
|
-
}
|
|
5240
|
-
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 });
|
|
5241
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: WidgetService, providedIn: 'root' });
|
|
5242
|
-
}
|
|
5243
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: WidgetService, decorators: [{
|
|
5244
|
-
type: Injectable,
|
|
5245
|
-
args: [{ providedIn: 'root' }]
|
|
5246
|
-
}], ctorParameters: () => [{ type: i1$1.HttpClient }, { type: WidgetStore }, { type: AppConfigService }, { type: ListService }] });
|
|
5247
|
-
|
|
5248
5248
|
class WidgetHeaderComponent {
|
|
5249
5249
|
styleBulderService;
|
|
5250
5250
|
widget;
|
|
@@ -5703,52 +5703,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
|
|
|
5703
5703
|
|
|
5704
5704
|
/**
|
|
5705
5705
|
* WidgetRowTileComponent is a component that displays a row of widgets in a tile format.
|
|
5706
|
-
* It
|
|
5706
|
+
* It receives the widgets data from its parent container component.
|
|
5707
5707
|
*/
|
|
5708
5708
|
class WidgetRowTileComponent {
|
|
5709
|
-
widgetService;
|
|
5710
|
-
widgetStore;
|
|
5711
5709
|
destroy$ = new Subject();
|
|
5712
|
-
widgets;
|
|
5710
|
+
widgets = [];
|
|
5713
5711
|
isLoading = true;
|
|
5714
5712
|
recordId;
|
|
5715
5713
|
widgetName;
|
|
5716
5714
|
onWidgetUpdate;
|
|
5717
|
-
constructor(
|
|
5718
|
-
this.widgetService = widgetService;
|
|
5719
|
-
this.widgetStore = widgetStore;
|
|
5720
|
-
}
|
|
5715
|
+
constructor() { }
|
|
5721
5716
|
ngOnInit() {
|
|
5722
|
-
|
|
5717
|
+
// No need to fetch data - it's passed as input
|
|
5723
5718
|
}
|
|
5724
5719
|
ngOnChanges(changes) {
|
|
5725
|
-
|
|
5726
|
-
|
|
5727
|
-
this.
|
|
5720
|
+
// Handle changes to input properties if needed
|
|
5721
|
+
if (changes['widgets']) {
|
|
5722
|
+
console.log('Widgets data updated:', this.widgets);
|
|
5723
|
+
}
|
|
5724
|
+
if (changes['isLoading']) {
|
|
5725
|
+
console.log('Loading state changed:', this.isLoading);
|
|
5728
5726
|
}
|
|
5729
|
-
}
|
|
5730
|
-
getWidgetItemList() {
|
|
5731
|
-
this.widgetService.getEvaluateByWidgetName(this.recordId, this.widgetName)
|
|
5732
|
-
.pipe(takeUntil(this.destroy$))
|
|
5733
|
-
.subscribe((res) => {
|
|
5734
|
-
this.widgets = res;
|
|
5735
|
-
this.widgetStore.setWidgetsList(this.widgets);
|
|
5736
|
-
this.isLoading = false;
|
|
5737
|
-
}, (error) => {
|
|
5738
|
-
this.isLoading = false;
|
|
5739
|
-
});
|
|
5740
5727
|
}
|
|
5741
5728
|
ngOnDestroy() {
|
|
5742
5729
|
this.destroy$.next();
|
|
5743
5730
|
this.destroy$.complete();
|
|
5744
5731
|
}
|
|
5745
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: WidgetRowTileComponent, deps: [
|
|
5746
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: WidgetRowTileComponent, isStandalone: false, selector: "lib-widget-row-tile", inputs: { recordId: "recordId", widgetName: "widgetName", onWidgetUpdate: "onWidgetUpdate" }, usesOnChanges: true, ngImport: i0, template: "<p-card class=\"widget-block-wrapper block\">\r\n <div class=\"widget-section-wrapper\">\r\n <!-- Loading state -->\r\n <ng-container *ngIf=\"isLoading; else widgetContent\">\r\n <div *ngFor=\"let n of [1,2,3]\" style=\"padding: 6px;\">\r\n <p-skeleton width=\"100%\" height=\"45px\" styleClass=\"mb-3\"></p-skeleton>\r\n </div>\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); else noWidgets\">\r\n <ng-container *ngFor=\"let widget of widgets; let i = index\">\r\n <lib-widget-main [widget]=\"widget\" [index]=\"i\"></lib-widget-main>\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%;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;background-color:#fff}:host ::-webkit-scrollbar{width:7px}:host ::-webkit-scrollbar-track{background:transparent}:host ::-webkit-scrollbar-thumb{background:#d1d5db94;border-radius:20px}\n", ""], dependencies: [{ 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:
|
|
5732
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: WidgetRowTileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5733
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: WidgetRowTileComponent, isStandalone: false, selector: "lib-widget-row-tile", inputs: { widgets: "widgets", isLoading: "isLoading", recordId: "recordId", widgetName: "widgetName", onWidgetUpdate: "onWidgetUpdate" }, usesOnChanges: true, ngImport: i0, template: "<p-card class=\"widget-block-wrapper block\">\r\n <div class=\"widget-section-wrapper\">\r\n <!-- Loading state -->\r\n <ng-container *ngIf=\"isLoading; else widgetContent\">\r\n <div *ngFor=\"let n of [1,2,3]\" style=\"padding: 6px;\">\r\n <p-skeleton width=\"100%\" height=\"45px\" styleClass=\"mb-3\"></p-skeleton>\r\n </div>\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); else noWidgets\">\r\n <ng-container *ngFor=\"let widget of widgets; let i = index\">\r\n <lib-widget-main [widget]=\"widget\" [index]=\"i\"></lib-widget-main>\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%;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;background-color:#fff}:host ::-webkit-scrollbar{width:7px}:host ::-webkit-scrollbar-track{background:transparent}:host ::-webkit-scrollbar-thumb{background:#d1d5db94;border-radius:20px}\n", ""], dependencies: [{ 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: i3$6.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "style", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "component", type: WidgetMainComponent, selector: "lib-widget-main", inputs: ["widget", "index"] }] });
|
|
5747
5734
|
}
|
|
5748
5735
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: WidgetRowTileComponent, decorators: [{
|
|
5749
5736
|
type: Component,
|
|
5750
5737
|
args: [{ selector: 'lib-widget-row-tile', standalone: false, template: "<p-card class=\"widget-block-wrapper block\">\r\n <div class=\"widget-section-wrapper\">\r\n <!-- Loading state -->\r\n <ng-container *ngIf=\"isLoading; else widgetContent\">\r\n <div *ngFor=\"let n of [1,2,3]\" style=\"padding: 6px;\">\r\n <p-skeleton width=\"100%\" height=\"45px\" styleClass=\"mb-3\"></p-skeleton>\r\n </div>\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); else noWidgets\">\r\n <ng-container *ngFor=\"let widget of widgets; let i = index\">\r\n <lib-widget-main [widget]=\"widget\" [index]=\"i\"></lib-widget-main>\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%;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;background-color:#fff}:host ::-webkit-scrollbar{width:7px}:host ::-webkit-scrollbar-track{background:transparent}:host ::-webkit-scrollbar-thumb{background:#d1d5db94;border-radius:20px}\n"] }]
|
|
5751
|
-
}], ctorParameters: () => [
|
|
5738
|
+
}], ctorParameters: () => [], propDecorators: { widgets: [{
|
|
5739
|
+
type: Input
|
|
5740
|
+
}], isLoading: [{
|
|
5741
|
+
type: Input
|
|
5742
|
+
}], recordId: [{
|
|
5752
5743
|
type: Input
|
|
5753
5744
|
}], widgetName: [{
|
|
5754
5745
|
type: Input
|
|
@@ -5762,11 +5753,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
|
|
|
5762
5753
|
class WidgetContainerComponent {
|
|
5763
5754
|
widgetStore;
|
|
5764
5755
|
widgetQuery;
|
|
5756
|
+
widgetService;
|
|
5765
5757
|
styleBulderService;
|
|
5766
5758
|
cdr;
|
|
5767
|
-
constructor(widgetStore, widgetQuery, styleBulderService, cdr) {
|
|
5759
|
+
constructor(widgetStore, widgetQuery, widgetService, styleBulderService, cdr) {
|
|
5768
5760
|
this.widgetStore = widgetStore;
|
|
5769
5761
|
this.widgetQuery = widgetQuery;
|
|
5762
|
+
this.widgetService = widgetService;
|
|
5770
5763
|
this.styleBulderService = styleBulderService;
|
|
5771
5764
|
this.cdr = cdr;
|
|
5772
5765
|
}
|
|
@@ -5776,25 +5769,56 @@ class WidgetContainerComponent {
|
|
|
5776
5769
|
widgetName;
|
|
5777
5770
|
recordId;
|
|
5778
5771
|
onWidgetUpdate;
|
|
5772
|
+
// Widget data and loading state
|
|
5773
|
+
widgets = [];
|
|
5774
|
+
isLoading = true;
|
|
5775
|
+
// Style properties
|
|
5779
5776
|
widgetCardStyle = {};
|
|
5780
5777
|
widgetCardStyleExpression = {};
|
|
5781
5778
|
widgetCombinedStyle = {};
|
|
5779
|
+
// Output events
|
|
5782
5780
|
onViewAllDetails = new EventEmitter();
|
|
5783
5781
|
onWidgetEventClick = new EventEmitter();
|
|
5784
5782
|
onWidgetItemClick = new EventEmitter();
|
|
5785
5783
|
onUpdatedWidgetList = new EventEmitter();
|
|
5786
5784
|
destroy$ = new Subject();
|
|
5787
5785
|
ngOnInit() {
|
|
5788
|
-
this.
|
|
5786
|
+
this.getWidgetItemList();
|
|
5787
|
+
}
|
|
5788
|
+
ngOnChanges(changes) {
|
|
5789
|
+
if (changes[SHARED.IS_MENU]) {
|
|
5790
|
+
this.isMenu = changes[SHARED.IS_MENU].currentValue;
|
|
5791
|
+
this.widgetStore.setIsMenu(this.isMenu);
|
|
5792
|
+
}
|
|
5793
|
+
if (changes[SHARED.ON_WIDGET_UPDATE]) {
|
|
5794
|
+
this.isLoading = true;
|
|
5795
|
+
this.getWidgetItemList();
|
|
5796
|
+
}
|
|
5797
|
+
}
|
|
5798
|
+
getWidgetItemList() {
|
|
5799
|
+
this.widgetService.getEvaluateByWidgetName(this.recordId, this.widgetName)
|
|
5789
5800
|
.pipe(takeUntil(this.destroy$))
|
|
5790
|
-
.subscribe((
|
|
5791
|
-
|
|
5792
|
-
|
|
5793
|
-
|
|
5794
|
-
|
|
5795
|
-
|
|
5801
|
+
.subscribe((res) => {
|
|
5802
|
+
this.widgets = res;
|
|
5803
|
+
this.widgetStore.setWidgetsList(this.widgets);
|
|
5804
|
+
this.isLoading = false;
|
|
5805
|
+
// Update styles after data is loaded
|
|
5806
|
+
this.updateWidgetStylesFromData();
|
|
5807
|
+
this.onUpdatedWidgetList.emit(this.widgets);
|
|
5808
|
+
}, (error) => {
|
|
5809
|
+
this.isLoading = false;
|
|
5810
|
+
console.error('Error fetching widget data:', error);
|
|
5796
5811
|
});
|
|
5797
5812
|
}
|
|
5813
|
+
updateWidgetStylesFromData() {
|
|
5814
|
+
if (this.widgets && this.widgets.length > 0) {
|
|
5815
|
+
// Find the widget that matches our widgetName
|
|
5816
|
+
const matchingWidget = this.widgets.find((widget) => widget.widgetName === this.widgetName);
|
|
5817
|
+
if (matchingWidget && matchingWidget.style) {
|
|
5818
|
+
this.updateWidgetStyles(matchingWidget);
|
|
5819
|
+
}
|
|
5820
|
+
}
|
|
5821
|
+
}
|
|
5798
5822
|
updateWidgetStyles(widget) {
|
|
5799
5823
|
console.log(widget, 'widget');
|
|
5800
5824
|
if (widget.style) {
|
|
@@ -5808,12 +5832,6 @@ class WidgetContainerComponent {
|
|
|
5808
5832
|
console.log(this.widgetCombinedStyle, 'test778');
|
|
5809
5833
|
}
|
|
5810
5834
|
}
|
|
5811
|
-
ngOnChanges(changes) {
|
|
5812
|
-
if (changes[SHARED.IS_MENU]) {
|
|
5813
|
-
this.isMenu = changes[SHARED.IS_MENU].currentValue;
|
|
5814
|
-
this.widgetStore.setIsMenu(this.isMenu);
|
|
5815
|
-
}
|
|
5816
|
-
}
|
|
5817
5835
|
handleViewAllDetails(event) {
|
|
5818
5836
|
this.onViewAllDetails.emit(event);
|
|
5819
5837
|
}
|
|
@@ -5827,13 +5845,13 @@ class WidgetContainerComponent {
|
|
|
5827
5845
|
this.destroy$.next();
|
|
5828
5846
|
this.destroy$.complete();
|
|
5829
5847
|
}
|
|
5830
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: WidgetContainerComponent, deps: [{ token: WidgetStore }, { token: WidgetQuery }, { token: StyleBuilderService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
5831
|
-
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 [ngStyle]=\"widgetCombinedStyle\" class=\"widget-menu-container\">\r\n
|
|
5848
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: WidgetContainerComponent, deps: [{ token: WidgetStore }, { token: WidgetQuery }, { token: WidgetService }, { token: StyleBuilderService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
5849
|
+
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 [ngStyle]=\"widgetCombinedStyle\" class=\"widget-menu-container\">\r\n <lib-widget-row-tile\r\n [widgets]=\"widgets\"\r\n [isLoading]=\"isLoading\"\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;background-color:#fff}:host ::-webkit-scrollbar{width:7px}:host ::-webkit-scrollbar-track{background:transparent}:host ::-webkit-scrollbar-thumb{background:#d1d5db94;border-radius:20px}\n"], dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { 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: ["widgets", "isLoading", "recordId", "widgetName", "onWidgetUpdate"] }] });
|
|
5832
5850
|
}
|
|
5833
5851
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: WidgetContainerComponent, decorators: [{
|
|
5834
5852
|
type: Component,
|
|
5835
|
-
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 [ngStyle]=\"widgetCombinedStyle\" class=\"widget-menu-container\">\r\n
|
|
5836
|
-
}], ctorParameters: () => [{ type: WidgetStore }, { type: WidgetQuery }, { type: StyleBuilderService }, { type: i0.ChangeDetectorRef }], propDecorators: { isMenu: [{
|
|
5853
|
+
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 [ngStyle]=\"widgetCombinedStyle\" class=\"widget-menu-container\">\r\n <lib-widget-row-tile\r\n [widgets]=\"widgets\"\r\n [isLoading]=\"isLoading\"\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;background-color:#fff}:host ::-webkit-scrollbar{width:7px}:host ::-webkit-scrollbar-track{background:transparent}:host ::-webkit-scrollbar-thumb{background:#d1d5db94;border-radius:20px}\n"] }]
|
|
5854
|
+
}], ctorParameters: () => [{ type: WidgetStore }, { type: WidgetQuery }, { type: WidgetService }, { type: StyleBuilderService }, { type: i0.ChangeDetectorRef }], propDecorators: { isMenu: [{
|
|
5837
5855
|
type: Input
|
|
5838
5856
|
}], offerWidgetData: [{
|
|
5839
5857
|
type: Input
|