cat-qw-lib 0.57.2 → 0.57.6
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 +50 -9
- package/fesm2022/cat-qw-lib.mjs.map +1 -1
- package/lib/widget/components/widget-menu-container/widget-menu-container.component.d.ts +7 -1
- package/lib/widget/state/widget.query.d.ts +1 -0
- package/lib/widget/state/widget.store.d.ts +2 -0
- package/package.json +1 -1
- package/src/assets/config/api.config.json +0 -22
package/fesm2022/cat-qw-lib.mjs
CHANGED
|
@@ -4081,12 +4081,14 @@ let WidgetStore = class WidgetStore extends BaseStore {
|
|
|
4081
4081
|
onViewPropertyDetails$;
|
|
4082
4082
|
onEventClickDetails$;
|
|
4083
4083
|
onItemClick$;
|
|
4084
|
+
getWidgetData$;
|
|
4084
4085
|
constructor() {
|
|
4085
4086
|
super();
|
|
4086
4087
|
this.onViewAllDetails$ = new BehaviorSubject(SHARED.EMPTY_STRING);
|
|
4087
4088
|
this.onViewPropertyDetails$ = new BehaviorSubject(SHARED.EMPTY);
|
|
4088
4089
|
this.onEventClickDetails$ = new BehaviorSubject(SHARED.EMPTY);
|
|
4089
4090
|
this.onItemClick$ = new BehaviorSubject({});
|
|
4091
|
+
this.getWidgetData$ = new BehaviorSubject({});
|
|
4090
4092
|
}
|
|
4091
4093
|
setEventClickDetails(value) {
|
|
4092
4094
|
this.onEventClickDetails$.next(value);
|
|
@@ -4109,6 +4111,9 @@ let WidgetStore = class WidgetStore extends BaseStore {
|
|
|
4109
4111
|
setIsMenu(isMenu) {
|
|
4110
4112
|
this.update({ isMenu: isMenu });
|
|
4111
4113
|
}
|
|
4114
|
+
setWidgetData(value) {
|
|
4115
|
+
this.getWidgetData$.next(value);
|
|
4116
|
+
}
|
|
4112
4117
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4113
4118
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetStore, providedIn: 'root' });
|
|
4114
4119
|
};
|
|
@@ -4181,6 +4186,9 @@ class WidgetQuery extends BaseQuery {
|
|
|
4181
4186
|
getIsMenu() {
|
|
4182
4187
|
return this.select(state => state['isMenu']);
|
|
4183
4188
|
}
|
|
4189
|
+
getWidgetData() {
|
|
4190
|
+
return this.widgetStore.getWidgetData$.asObservable();
|
|
4191
|
+
}
|
|
4184
4192
|
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 });
|
|
4185
4193
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetQuery, providedIn: 'root' });
|
|
4186
4194
|
}
|
|
@@ -4212,7 +4220,6 @@ class StyleBuilderService {
|
|
|
4212
4220
|
getItemStyle(style) {
|
|
4213
4221
|
if (!style)
|
|
4214
4222
|
return {};
|
|
4215
|
-
console.log(style);
|
|
4216
4223
|
return Object.entries(style).reduce((acc, [key, value]) => {
|
|
4217
4224
|
if (value)
|
|
4218
4225
|
acc[key.trim()] = value.toString().trim();
|
|
@@ -4363,6 +4370,7 @@ class WidgetItemComponent {
|
|
|
4363
4370
|
updatedItem.value = applicantId;
|
|
4364
4371
|
break;
|
|
4365
4372
|
}
|
|
4373
|
+
this.widgetStore.setWidgetData(this.widget);
|
|
4366
4374
|
this.widgetStore.setOnWidgetItemClick(updatedItem);
|
|
4367
4375
|
}
|
|
4368
4376
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetItemComponent, deps: [{ token: StyleBuilderService }, { token: WidgetStore }, { token: WidgetQuery }], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -4678,6 +4686,10 @@ class WidgetMenuItemComponent {
|
|
|
4678
4686
|
return this.styleBulderService.getStyle(style);
|
|
4679
4687
|
}
|
|
4680
4688
|
ngOnChanges(changes) {
|
|
4689
|
+
// if(this.widgetItem && this.widgetItem.style && this.widgetItem.style.styleExpression && this.widgetItem.style.styleExpression.co) {
|
|
4690
|
+
// this.widgetItem.style.styleExpression.color
|
|
4691
|
+
// exclamation
|
|
4692
|
+
// }
|
|
4681
4693
|
}
|
|
4682
4694
|
onHandleSidebar(propertyId) {
|
|
4683
4695
|
this.widgetStore.setOnViewPropertyDetails({ propertyId: propertyId, isDailogShow: true });
|
|
@@ -4760,10 +4772,15 @@ class WidgetMenuContainerComponent {
|
|
|
4760
4772
|
widgets = [];
|
|
4761
4773
|
subscriptions = [];
|
|
4762
4774
|
isLoading = true;
|
|
4775
|
+
queueId;
|
|
4776
|
+
recordId;
|
|
4763
4777
|
onViewAllDetails = new EventEmitter();
|
|
4764
4778
|
onViewAllProperties = new EventEmitter();
|
|
4765
4779
|
onWidgetItemClick = new EventEmitter();
|
|
4780
|
+
getWidgetData = new EventEmitter();
|
|
4766
4781
|
onDirectDebitClick = new EventEmitter();
|
|
4782
|
+
onWidgetLoaded = new EventEmitter();
|
|
4783
|
+
isRouteChanged = SHARED.EMPTY;
|
|
4767
4784
|
isSidebarVisible = SHARED.FALSE;
|
|
4768
4785
|
offerWidgetData;
|
|
4769
4786
|
valuationWidgetData;
|
|
@@ -4771,18 +4788,19 @@ class WidgetMenuContainerComponent {
|
|
|
4771
4788
|
ngOnInit() {
|
|
4772
4789
|
this.handleEventFromPropertyDetails();
|
|
4773
4790
|
this.handleOnViewAllDetails();
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
if (!queueId || !recordId) {
|
|
4791
|
+
this.queueId = localStorage.getItem(SHARED.selectedQueue);
|
|
4792
|
+
this.recordId = this.activatedRoute.snapshot.params[SHARED.ID];
|
|
4793
|
+
if (!this.queueId || !this.recordId) {
|
|
4777
4794
|
console.error(ERROR.ERROR_MISSING_PARAMETERS, {
|
|
4778
|
-
queueId: queueId || SHARED.MISSING_QUEUE_ID,
|
|
4779
|
-
recordId: recordId || SHARED.MISSING_RECORD_ID
|
|
4795
|
+
queueId: this.queueId || SHARED.MISSING_QUEUE_ID,
|
|
4796
|
+
recordId: this.recordId || SHARED.MISSING_RECORD_ID
|
|
4780
4797
|
});
|
|
4781
4798
|
this.isLoading = false;
|
|
4782
4799
|
return;
|
|
4783
4800
|
}
|
|
4784
|
-
this.getWidgetFromCacheList(queueId, recordId);
|
|
4785
|
-
this.getAllWidgetList(queueId, recordId);
|
|
4801
|
+
this.getWidgetFromCacheList(this.queueId, this.recordId);
|
|
4802
|
+
this.getAllWidgetList(this.queueId, this.recordId);
|
|
4803
|
+
this.handleGetWidgetData();
|
|
4786
4804
|
this.handleWidgetItemClick();
|
|
4787
4805
|
}
|
|
4788
4806
|
handleWidgetItemClick() {
|
|
@@ -4796,6 +4814,17 @@ class WidgetMenuContainerComponent {
|
|
|
4796
4814
|
console.error('Error in getOnWidgetItemClick subscription:', error);
|
|
4797
4815
|
});
|
|
4798
4816
|
}
|
|
4817
|
+
handleGetWidgetData() {
|
|
4818
|
+
this.widgetQuery.getWidgetData()
|
|
4819
|
+
.pipe(takeUntil(this.destroy$))
|
|
4820
|
+
.subscribe((res) => {
|
|
4821
|
+
if (res) {
|
|
4822
|
+
this.getWidgetData.emit(res);
|
|
4823
|
+
}
|
|
4824
|
+
}, (error) => {
|
|
4825
|
+
console.error('Error in getWidgetData subscription:', error);
|
|
4826
|
+
});
|
|
4827
|
+
}
|
|
4799
4828
|
handleEventFromPropertyDetails() {
|
|
4800
4829
|
this.widgetQuery.getViewPropertyDetails()
|
|
4801
4830
|
.pipe(takeUntil(this.destroy$))
|
|
@@ -4819,8 +4848,10 @@ class WidgetMenuContainerComponent {
|
|
|
4819
4848
|
.pipe(takeUntil(this.destroy$))
|
|
4820
4849
|
.subscribe((res) => {
|
|
4821
4850
|
this.widgets = res.sort((a, b) => a.order - b.order);
|
|
4851
|
+
this.onWidgetLoaded.emit(this.widgets);
|
|
4822
4852
|
this.cdr.detectChanges();
|
|
4823
4853
|
}, (error) => {
|
|
4854
|
+
this.onWidgetLoaded.emit(true);
|
|
4824
4855
|
console.error(ERROR.ERROR_FETCHING_WIDGET_DATA, error);
|
|
4825
4856
|
this.cdr.detectChanges();
|
|
4826
4857
|
});
|
|
@@ -4840,16 +4871,20 @@ class WidgetMenuContainerComponent {
|
|
|
4840
4871
|
if (!this.isSidebarVisible) {
|
|
4841
4872
|
this.widgetStore.setOnViewPropertyDetails({ propertyId: null, isDailogShow: false });
|
|
4842
4873
|
}
|
|
4874
|
+
if (changes['isRouteChanged'] && this.queueId && this.recordId) {
|
|
4875
|
+
this.getAllWidgetList(this.queueId, this.recordId);
|
|
4876
|
+
}
|
|
4843
4877
|
}
|
|
4844
4878
|
ngOnDestroy() {
|
|
4845
4879
|
this.widgets = [];
|
|
4846
4880
|
this.widgetStore.resetOnViewAllDetails();
|
|
4881
|
+
this.onWidgetLoaded.emit(SHARED.EMPTY);
|
|
4847
4882
|
this.subscriptions.forEach(sub => sub.unsubscribe());
|
|
4848
4883
|
this.destroy$.next();
|
|
4849
4884
|
this.destroy$.complete();
|
|
4850
4885
|
}
|
|
4851
4886
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetMenuContainerComponent, deps: [{ token: WidgetService }, { token: i3$4.ActivatedRoute }, { token: WidgetQuery }, { token: WidgetStore }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4852
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: WidgetMenuContainerComponent, isStandalone: false, selector: "lib-widget-menu-container", inputs: { isSidebarVisible: "isSidebarVisible", offerWidgetData: "offerWidgetData", valuationWidgetData: "valuationWidgetData", progressChartData: "progressChartData" }, outputs: { onViewAllDetails: "onViewAllDetails", 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-menu-header [widget]=\"widget\" [progressChartData]=\"progressChartData\"></lib-widget-menu-header>\r\n <div class=\"widget-content-wrapper mt-3 py-3\">\r\n <lib-widget-menu-body [widget]=\"widget\"></lib-widget-menu-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: WidgetFooterComponent, selector: "lib-widget-footer", inputs: ["widget"] }, { kind: "component", type: WidgetMenuHeaderComponent, selector: "lib-widget-menu-header", inputs: ["widget", "progressChartData"] }, { kind: "component", type: WidgetMenuBodyComponent, selector: "lib-widget-menu-body", inputs: ["widget"] }] });
|
|
4887
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: WidgetMenuContainerComponent, isStandalone: false, selector: "lib-widget-menu-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-menu-header [widget]=\"widget\" [progressChartData]=\"progressChartData\"></lib-widget-menu-header>\r\n <div class=\"widget-content-wrapper mt-3 py-3\">\r\n <lib-widget-menu-body [widget]=\"widget\"></lib-widget-menu-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: WidgetFooterComponent, selector: "lib-widget-footer", inputs: ["widget"] }, { kind: "component", type: WidgetMenuHeaderComponent, selector: "lib-widget-menu-header", inputs: ["widget", "progressChartData"] }, { kind: "component", type: WidgetMenuBodyComponent, selector: "lib-widget-menu-body", inputs: ["widget"] }] });
|
|
4853
4888
|
}
|
|
4854
4889
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: WidgetMenuContainerComponent, decorators: [{
|
|
4855
4890
|
type: Component,
|
|
@@ -4860,8 +4895,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
|
4860
4895
|
type: Output
|
|
4861
4896
|
}], onWidgetItemClick: [{
|
|
4862
4897
|
type: Output
|
|
4898
|
+
}], getWidgetData: [{
|
|
4899
|
+
type: Output
|
|
4863
4900
|
}], onDirectDebitClick: [{
|
|
4864
4901
|
type: Output
|
|
4902
|
+
}], onWidgetLoaded: [{
|
|
4903
|
+
type: Output
|
|
4904
|
+
}], isRouteChanged: [{
|
|
4905
|
+
type: Input
|
|
4865
4906
|
}], isSidebarVisible: [{
|
|
4866
4907
|
type: Input
|
|
4867
4908
|
}], offerWidgetData: [{
|