@nova-ui/dashboards 19.0.2 → 19.0.4
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/nova-ui-dashboards.mjs +19 -9
- package/fesm2022/nova-ui-dashboards.mjs.map +1 -1
- package/lib/components/table-widget/addons/paginator-feature-addon.service.d.ts +1 -0
- package/lib/components/table-widget/addons/search-feature-addon.service.d.ts +1 -0
- package/package.json +3 -3
- package/sdk/atoms/src/lib/components/table-widget/addons/paginator-feature-addon.service.d.ts +1 -0
- package/sdk/atoms/src/lib/components/table-widget/addons/paginator-feature-addon.service.js +5 -2
- package/sdk/atoms/src/lib/components/table-widget/addons/paginator-feature-addon.service.js.map +1 -1
- package/sdk/atoms/src/lib/components/table-widget/addons/search-feature-addon.service.d.ts +1 -0
- package/sdk/atoms/src/lib/components/table-widget/addons/search-feature-addon.service.js +5 -2
- package/sdk/atoms/src/lib/components/table-widget/addons/search-feature-addon.service.js.map +1 -1
- package/sdk/atoms/src/lib/components/table-widget/table-widget.component.js +11 -5
- package/sdk/atoms/src/lib/components/table-widget/table-widget.component.js.map +1 -1
|
@@ -7022,8 +7022,10 @@ class PaginatorFeatureAddonService {
|
|
|
7022
7022
|
total: 0,
|
|
7023
7023
|
};
|
|
7024
7024
|
this.paginatorState = this.defaultPaginatorState;
|
|
7025
|
+
this.reinit$ = new Subject();
|
|
7025
7026
|
}
|
|
7026
7027
|
initPaginator(widget) {
|
|
7028
|
+
this.reinit$.next();
|
|
7027
7029
|
this.widget = widget;
|
|
7028
7030
|
this.setPaginatorState();
|
|
7029
7031
|
this.listenPaginatorChanges();
|
|
@@ -7067,7 +7069,7 @@ class PaginatorFeatureAddonService {
|
|
|
7067
7069
|
}
|
|
7068
7070
|
// page and total are dynamically set
|
|
7069
7071
|
this.widget.dataSource.outputsSubject
|
|
7070
|
-
.pipe(takeUntil(this.widget.onDestroy$))
|
|
7072
|
+
.pipe(takeUntil(merge(this.reinit$, this.widget.onDestroy$)))
|
|
7071
7073
|
.subscribe((data) => {
|
|
7072
7074
|
this.updatePaginatorState({
|
|
7073
7075
|
total: data.paginator?.total ?? 0,
|
|
@@ -7087,7 +7089,7 @@ class PaginatorFeatureAddonService {
|
|
|
7087
7089
|
listenPaginatorChanges() {
|
|
7088
7090
|
this.widget.eventBus
|
|
7089
7091
|
.getStream(SET_NEXT_PAGE)
|
|
7090
|
-
.pipe(takeUntil(this.widget.onDestroy$))
|
|
7092
|
+
.pipe(takeUntil(merge(this.reinit$, this.widget.onDestroy$)))
|
|
7091
7093
|
.subscribe(({ payload }) => {
|
|
7092
7094
|
if (!payload) {
|
|
7093
7095
|
return;
|
|
@@ -7127,8 +7129,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImpor
|
|
|
7127
7129
|
class SearchFeatureAddonService {
|
|
7128
7130
|
constructor() {
|
|
7129
7131
|
this.searchDebounceTime = 500;
|
|
7132
|
+
this.reinit$ = new Subject();
|
|
7130
7133
|
}
|
|
7131
7134
|
initWidget(widget) {
|
|
7135
|
+
this.reinit$.next();
|
|
7132
7136
|
this.widget = widget;
|
|
7133
7137
|
this.initSearch();
|
|
7134
7138
|
}
|
|
@@ -7137,7 +7141,7 @@ class SearchFeatureAddonService {
|
|
|
7137
7141
|
const dsFeaturesChange = this.widget.dataSource?.features?.featuresChanged;
|
|
7138
7142
|
if (dsFeaturesChange) {
|
|
7139
7143
|
dsFeaturesChange
|
|
7140
|
-
.pipe(takeUntil(this.widget.onDestroy$))
|
|
7144
|
+
.pipe(takeUntil(merge(this.reinit$, this.widget.onDestroy$)))
|
|
7141
7145
|
.subscribe(() => {
|
|
7142
7146
|
this.defineSearch();
|
|
7143
7147
|
});
|
|
@@ -7181,7 +7185,7 @@ class SearchFeatureAddonService {
|
|
|
7181
7185
|
}
|
|
7182
7186
|
watchSearchTerm() {
|
|
7183
7187
|
this.widget.searchTerm$
|
|
7184
|
-
.pipe(debounceTime(this.searchDebounceTime), takeUntil(this.widget.onDestroy$))
|
|
7188
|
+
.pipe(debounceTime(this.searchDebounceTime), takeUntil(merge(this.reinit$, this.widget.onDestroy$)))
|
|
7185
7189
|
.subscribe(() => {
|
|
7186
7190
|
this.widget.pizzagnaService.setProperty({
|
|
7187
7191
|
pizzagnaKey: PizzagnaLayer.Configuration,
|
|
@@ -7433,8 +7437,12 @@ class TableWidgetComponent {
|
|
|
7433
7437
|
// Since removing "hasVirtualScroll" from configuration would cause breaking changes, it is used as primary source of truth
|
|
7434
7438
|
const newHasVirtualScroll = get(changes, "configuration.currentValue.hasVirtualScroll", true);
|
|
7435
7439
|
const scrollType = get(changes, "configuration.currentValue.scrollType", ScrollType.virtual);
|
|
7436
|
-
|
|
7437
|
-
this.
|
|
7440
|
+
const newScrollType = newHasVirtualScroll ? ScrollType.virtual : scrollType;
|
|
7441
|
+
const scrollTypeActuallyChanged = newScrollType !== this.scrollType;
|
|
7442
|
+
this.scrollType = newScrollType;
|
|
7443
|
+
if (scrollTypeActuallyChanged) {
|
|
7444
|
+
this.initPrefetchAddon();
|
|
7445
|
+
}
|
|
7438
7446
|
if (this.scrollTypeChanged(changes.configuration)) {
|
|
7439
7447
|
this.dataSource.applyFilters();
|
|
7440
7448
|
}
|
|
@@ -7822,9 +7830,11 @@ class TableWidgetComponent {
|
|
|
7822
7830
|
}
|
|
7823
7831
|
}
|
|
7824
7832
|
resolveSearch(changes) {
|
|
7825
|
-
|
|
7826
|
-
?.searchConfiguration,
|
|
7827
|
-
|
|
7833
|
+
const prev = omit(changes.configuration.previousValue
|
|
7834
|
+
?.searchConfiguration, "searchTerm");
|
|
7835
|
+
const curr = omit(changes.configuration.currentValue
|
|
7836
|
+
?.searchConfiguration, "searchTerm");
|
|
7837
|
+
if (!isEqual(curr, prev)) {
|
|
7828
7838
|
this.searchAddon.initWidget(this);
|
|
7829
7839
|
}
|
|
7830
7840
|
}
|