@vendure/admin-ui 1.9.0 → 1.9.1
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/bundles/vendure-admin-ui-catalog.umd.js +14 -14
- package/bundles/vendure-admin-ui-catalog.umd.js.map +1 -1
- package/bundles/vendure-admin-ui-core.umd.js +1 -1
- package/bundles/vendure-admin-ui-core.umd.js.map +1 -1
- package/bundles/vendure-admin-ui-login.umd.js +2 -2
- package/bundles/vendure-admin-ui-login.umd.js.map +1 -1
- package/catalog/vendure-admin-ui-catalog.metadata.json +1 -1
- package/core/common/version.d.ts +1 -1
- package/core/vendure-admin-ui-core.metadata.json +1 -1
- package/esm2015/catalog/components/product-detail/product-detail.component.js +11 -11
- package/esm2015/catalog/components/product-variants-list/product-variants-list.component.js +2 -2
- package/esm2015/core/common/version.js +2 -2
- package/esm2015/login/components/login/login.component.js +3 -3
- package/fesm2015/vendure-admin-ui-catalog.js +11 -11
- package/fesm2015/vendure-admin-ui-catalog.js.map +1 -1
- package/fesm2015/vendure-admin-ui-core.js +1 -1
- package/fesm2015/vendure-admin-ui-core.js.map +1 -1
- package/fesm2015/vendure-admin-ui-login.js +2 -2
- package/fesm2015/vendure-admin-ui-login.js.map +1 -1
- package/package.json +2 -2
|
@@ -1950,19 +1950,9 @@
|
|
|
1950
1950
|
var _this = this;
|
|
1951
1951
|
this.init();
|
|
1952
1952
|
this.product$ = this.entity$;
|
|
1953
|
-
|
|
1954
|
-
this.paginationConfig$ = rxjs.combineLatest(this.totalItems$, this.itemsPerPage$, this.currentPage$).pipe(operators.map(function (_c) {
|
|
1955
|
-
var _d = __read(_c, 3), totalItems = _d[0], itemsPerPage = _d[1], currentPage = _d[2];
|
|
1956
|
-
return ({
|
|
1957
|
-
totalItems: totalItems,
|
|
1958
|
-
itemsPerPage: itemsPerPage,
|
|
1959
|
-
currentPage: currentPage,
|
|
1960
|
-
});
|
|
1961
|
-
}));
|
|
1962
|
-
var variants$ = this.product$.pipe(operators.map(function (product) { return product.variantList.items; }));
|
|
1963
|
-
var filterTerm$ = this.filterInput.valueChanges.pipe(operators.startWith(''), operators.debounceTime(200), operators.shareReplay());
|
|
1953
|
+
var filterTerm$ = this.filterInput.valueChanges.pipe(operators.startWith(''), operators.debounceTime(200), operators.shareReplay(), operators.tap(function () { return _this.currentPage$.next(1); }));
|
|
1964
1954
|
var initialVariants$ = this.product$.pipe(operators.map(function (p) { return p.variantList.items; }));
|
|
1965
|
-
var
|
|
1955
|
+
var variantsList$ = rxjs.combineLatest(filterTerm$, this.currentPage$, this.itemsPerPage$).pipe(operators.skipUntil(initialVariants$), operators.skip(1), operators.debounceTime(100), operators.switchMap(function (_c) {
|
|
1966
1956
|
var _d = __read(_c, 3), term = _d[0], currentPage = _d[1], itemsPerPage = _d[2];
|
|
1967
1957
|
return _this.dataService.product
|
|
1968
1958
|
.getProductVariants(Object.assign(Object.assign({ skip: (currentPage - 1) * itemsPerPage, take: itemsPerPage }, (term
|
|
@@ -1970,9 +1960,10 @@
|
|
|
1970
1960
|
: {})), { filterOperator: i2.LogicalOperator.OR }), _this.id)
|
|
1971
1961
|
.mapStream(function (_c) {
|
|
1972
1962
|
var productVariants = _c.productVariants;
|
|
1973
|
-
return productVariants
|
|
1963
|
+
return productVariants;
|
|
1974
1964
|
});
|
|
1975
1965
|
}), operators.shareReplay({ bufferSize: 1, refCount: true }));
|
|
1966
|
+
var updatedVariants$ = variantsList$.pipe(operators.map(function (result) { return result.items; }));
|
|
1976
1967
|
this.variants$ = rxjs.merge(initialVariants$, updatedVariants$).pipe(operators.tap(function (variants) {
|
|
1977
1968
|
var e_1, _c;
|
|
1978
1969
|
try {
|
|
@@ -1989,6 +1980,15 @@
|
|
|
1989
1980
|
finally { if (e_1) throw e_1.error; }
|
|
1990
1981
|
}
|
|
1991
1982
|
}));
|
|
1983
|
+
this.totalItems$ = rxjs.merge(this.product$.pipe(operators.map(function (product) { return product.variantList.totalItems; })), variantsList$.pipe(operators.map(function (result) { return result.totalItems; })));
|
|
1984
|
+
this.paginationConfig$ = rxjs.combineLatest(this.totalItems$, this.itemsPerPage$, this.currentPage$).pipe(operators.map(function (_c) {
|
|
1985
|
+
var _d = __read(_c, 3), totalItems = _d[0], itemsPerPage = _d[1], currentPage = _d[2];
|
|
1986
|
+
return ({
|
|
1987
|
+
totalItems: totalItems,
|
|
1988
|
+
itemsPerPage: itemsPerPage,
|
|
1989
|
+
currentPage: currentPage,
|
|
1990
|
+
});
|
|
1991
|
+
}));
|
|
1992
1992
|
this.taxCategories$ = this.productDetailService.getTaxCategories().pipe(operators.takeUntil(this.destroy$));
|
|
1993
1993
|
this.activeTab$ = this.route.paramMap.pipe(operators.map(function (qpm) { return qpm.get('tab'); }));
|
|
1994
1994
|
rxjs.combineLatest(updatedVariants$, this.languageCode$)
|
|
@@ -5229,7 +5229,7 @@
|
|
|
5229
5229
|
};
|
|
5230
5230
|
ProductVariantsListComponent.prototype.onAssetChange = function (variantId, event) {
|
|
5231
5231
|
this.assetChange.emit(Object.assign({ variantId: variantId }, event));
|
|
5232
|
-
var index = this.
|
|
5232
|
+
var index = this.formArray.controls.findIndex(function (c) { return c.value.id === variantId; });
|
|
5233
5233
|
this.formArray.at(index).markAsDirty();
|
|
5234
5234
|
};
|
|
5235
5235
|
ProductVariantsListComponent.prototype.toggleSelectAll = function () {
|