cat-qw-lib 2.1.16 → 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.
package/fesm2022/cat-qw-lib.mjs
CHANGED
|
@@ -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
|
};
|
|
@@ -4910,6 +4913,9 @@ class WidgetQuery extends BaseQuery {
|
|
|
4910
4913
|
getWidgetData() {
|
|
4911
4914
|
return this.widgetStore.getWidgetData$.asObservable();
|
|
4912
4915
|
}
|
|
4916
|
+
getWidgetList() {
|
|
4917
|
+
return this.select(state => state['widgetsList']);
|
|
4918
|
+
}
|
|
4913
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 });
|
|
4914
4920
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: WidgetQuery, providedIn: 'root' });
|
|
4915
4921
|
}
|
|
@@ -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);
|
|
@@ -5525,7 +5532,7 @@ class WidgetContainerComponent {
|
|
|
5525
5532
|
onUpdatedWidgetList = new EventEmitter();
|
|
5526
5533
|
destroy$ = new Subject();
|
|
5527
5534
|
ngOnInit() {
|
|
5528
|
-
this.widgetQuery.
|
|
5535
|
+
this.widgetQuery.getWidgetList()
|
|
5529
5536
|
.pipe(takeUntil(this.destroy$))
|
|
5530
5537
|
.subscribe((data) => {
|
|
5531
5538
|
if (data) {
|