cat-qw-lib 0.41.29 → 0.41.33
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
|
@@ -1542,7 +1542,7 @@ class ROUTES {
|
|
|
1542
1542
|
static VALIDATEAPI = 'ApiConfigurations/validateApi';
|
|
1543
1543
|
static APPLICATION = "application/";
|
|
1544
1544
|
static APIPROPERTIES = "ApiConfigurations/get-parent";
|
|
1545
|
-
static APPLICATION_WIDGET = "Widgets/
|
|
1545
|
+
static APPLICATION_WIDGET = "Widgets/evaluateFromCache";
|
|
1546
1546
|
static DOCUMENTALERT = "alerts/documentId";
|
|
1547
1547
|
static VALIDATE_ACTIONS = 'ActionConfigurations/validateApi';
|
|
1548
1548
|
}
|
|
@@ -3439,7 +3439,15 @@ class DdAdminItemFormComponent {
|
|
|
3439
3439
|
this.baseStore = baseStore;
|
|
3440
3440
|
this.attributeRecord = new DdAttributeSidebarViewModel();
|
|
3441
3441
|
}
|
|
3442
|
+
ngOnInit() {
|
|
3443
|
+
this.loadPropertyOption();
|
|
3444
|
+
}
|
|
3442
3445
|
ngOnChanges(changes) {
|
|
3446
|
+
if (changes[SHARED.ISITEMEXPRESSION]) {
|
|
3447
|
+
this.attributeRecord.mappingInfo = (this.isItemExpression ? this.ddItemRecord.itemExpression : this.ddItemRecord.styleExpression) ?? SHARED.EMPTY;
|
|
3448
|
+
}
|
|
3449
|
+
}
|
|
3450
|
+
loadPropertyOption() {
|
|
3443
3451
|
this.subscriptions.add(this.dictionaryQuery.selectPropertyData().subscribe((res) => {
|
|
3444
3452
|
if (res) {
|
|
3445
3453
|
if (res?.properties?.length) {
|
|
@@ -3456,9 +3464,6 @@ class DdAdminItemFormComponent {
|
|
|
3456
3464
|
}
|
|
3457
3465
|
}
|
|
3458
3466
|
}));
|
|
3459
|
-
if (changes[SHARED.ISITEMEXPRESSION]) {
|
|
3460
|
-
this.attributeRecord.mappingInfo = (this.isItemExpression ? this.ddItemRecord.itemExpression : this.ddItemRecord.styleExpression) ?? SHARED.EMPTY;
|
|
3461
|
-
}
|
|
3462
3467
|
}
|
|
3463
3468
|
handleSaveBtnClick(event) {
|
|
3464
3469
|
if (this.isItemExpression) {
|
|
@@ -3533,9 +3538,11 @@ class DdAdminFormComponent extends BaseFormComponent {
|
|
|
3533
3538
|
this.baseStore.setIsApiValidated(null);
|
|
3534
3539
|
this.init();
|
|
3535
3540
|
this.sidebarVisibility = new Array(this.record.dictionaryItems.length).fill(false);
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3541
|
+
setTimeout(() => {
|
|
3542
|
+
if (this.record.queueID) {
|
|
3543
|
+
this.handleGetProperties(this.record.queueID);
|
|
3544
|
+
}
|
|
3545
|
+
}, 2000);
|
|
3539
3546
|
}
|
|
3540
3547
|
handleDictionaryItemAddBtnClick() {
|
|
3541
3548
|
if (!(this.record.name && this.record.queueID))
|
|
@@ -3564,6 +3571,7 @@ class DdAdminFormComponent extends BaseFormComponent {
|
|
|
3564
3571
|
this.isItemExpression = SHARED.FALSE;
|
|
3565
3572
|
}
|
|
3566
3573
|
handleGetProperties(event) {
|
|
3574
|
+
console.log(event);
|
|
3567
3575
|
this.service.getAllApiProperties(DATASOURCES.QUEUESAPICONFIG, event).subscribe();
|
|
3568
3576
|
}
|
|
3569
3577
|
onSidebarClose(isVisible) {
|
|
@@ -4116,6 +4124,7 @@ class WidgetContainerComponent {
|
|
|
4116
4124
|
destroy$ = new Subject();
|
|
4117
4125
|
widgets = [];
|
|
4118
4126
|
subscription = new Subscription();
|
|
4127
|
+
isLoading = true;
|
|
4119
4128
|
onViewAllDetails = new EventEmitter();
|
|
4120
4129
|
onViewAllProperties = new EventEmitter();
|
|
4121
4130
|
showEditionalFeild = SHARED.FALSE;
|
|
@@ -4147,13 +4156,16 @@ class WidgetContainerComponent {
|
|
|
4147
4156
|
queueId: queueId || SHARED.MISSING_QUEUE_ID,
|
|
4148
4157
|
recordId: recordId || SHARED.MISSING_RECORD_ID
|
|
4149
4158
|
});
|
|
4159
|
+
this.isLoading = false;
|
|
4150
4160
|
return;
|
|
4151
4161
|
}
|
|
4152
4162
|
let url = `${ROUTES.APPLICATION_WIDGET}${SHARED.QUESTION_MARK}${SHARED.QUEUEID}${SHARED.EQUALS}${queueId}${SHARED.AMPERSAND}${SHARED.RECORDID}${SHARED.EQUALS}${recordId}`;
|
|
4153
4163
|
this.subscription.add(this.widgetService.getAllWidgets(url).subscribe((res) => {
|
|
4154
4164
|
this.widgets = res.sort((a, b) => a.order - b.order);
|
|
4165
|
+
this.isLoading = false;
|
|
4155
4166
|
}, (error) => {
|
|
4156
4167
|
console.error(ERROR.ERROR_FETCHING_WIDGET_DATA, error);
|
|
4168
|
+
this.isLoading = false;
|
|
4157
4169
|
}));
|
|
4158
4170
|
}
|
|
4159
4171
|
ngOnChanges(changes) {
|
|
@@ -4169,11 +4181,11 @@ class WidgetContainerComponent {
|
|
|
4169
4181
|
this.destroy$.complete();
|
|
4170
4182
|
}
|
|
4171
4183
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: WidgetContainerComponent, deps: [{ token: WidgetService }, { token: i3$4.ActivatedRoute }, { token: WidgetQuery }, { token: WidgetStore }], target: i0.ɵɵFactoryTarget.Component });
|
|
4172
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
4184
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.0", type: WidgetContainerComponent, isStandalone: false, selector: "lib-widget-container", inputs: { showEditionalFeild: "showEditionalFeild", isSidebarVisible: "isSidebarVisible", offerWidgetData: "offerWidgetData", valuationWidgetData: "valuationWidgetData" }, outputs: { onViewAllDetails: "onViewAllDetails", onViewAllProperties: "onViewAllProperties" }, 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\" [ngClass]=\"i !== 0 ? 'mt-4' : ''\">\r\n <lib-widget-header [widget]=\"widget\" [showEditionalFeild]=\"showEditionalFeild\"></lib-widget-header>\r\n <div class=\"widget-content-wrapper mt-3 p-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%}::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:20px;font-weight:400}.application-section-wrapper{background-color:#4c629208;border:1px solid rgba(76,98,146,.1);border-radius:10px}.widget-section-wrapper{height:calc(100% - 20px)}.custom-scroll{overflow-y:hidden}.custom-scroll:hover{overflow-y:auto;padding-right:7px}.widget-content-wrapper{border-radius:10px;border:1px solid rgba(76,98,146,.1);background:linear-gradient(0deg,#4c629208 0% 100%),#fff}:host ::-webkit-scrollbar{width:6px}:host ::-webkit-scrollbar-track{background:transparent}:host ::-webkit-scrollbar-thumb{background-color:#868181;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", "showEditionalFeild"] }, { kind: "component", type: WidgetFooterComponent, selector: "lib-widget-footer", inputs: ["widget"] }, { kind: "component", type: WidgetBodyComponent, selector: "lib-widget-body", inputs: ["widget"] }] });
|
|
4173
4185
|
}
|
|
4174
4186
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: WidgetContainerComponent, decorators: [{
|
|
4175
4187
|
type: Component,
|
|
4176
|
-
args: [{ selector: 'lib-widget-container', standalone: false, template: "<p-card class=\"widget-block-wrapper block\">\r\n
|
|
4188
|
+
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\" [ngClass]=\"i !== 0 ? 'mt-4' : ''\">\r\n <lib-widget-header [widget]=\"widget\" [showEditionalFeild]=\"showEditionalFeild\"></lib-widget-header>\r\n <div class=\"widget-content-wrapper mt-3 p-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%}::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:20px;font-weight:400}.application-section-wrapper{background-color:#4c629208;border:1px solid rgba(76,98,146,.1);border-radius:10px}.widget-section-wrapper{height:calc(100% - 20px)}.custom-scroll{overflow-y:hidden}.custom-scroll:hover{overflow-y:auto;padding-right:7px}.widget-content-wrapper{border-radius:10px;border:1px solid rgba(76,98,146,.1);background:linear-gradient(0deg,#4c629208 0% 100%),#fff}:host ::-webkit-scrollbar{width:6px}:host ::-webkit-scrollbar-track{background:transparent}:host ::-webkit-scrollbar-thumb{background-color:#868181;border-radius:20px}\n"] }]
|
|
4177
4189
|
}], ctorParameters: () => [{ type: WidgetService }, { type: i3$4.ActivatedRoute }, { type: WidgetQuery }, { type: WidgetStore }], propDecorators: { onViewAllDetails: [{
|
|
4178
4190
|
type: Output
|
|
4179
4191
|
}], onViewAllProperties: [{
|