@ngrx-traits/common 12.1.0 → 12.1.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/ngrx-traits-common.umd.js +5 -5
- package/bundles/ngrx-traits-common.umd.js.map +1 -1
- package/entities-pagination/entities-pagination.trait.d.ts +1 -1
- package/esm2015/entities-pagination/entities-pagination.trait.js +2 -2
- package/esm2015/entities-pagination/entities-pagination.trait.js.map +1 -1
- package/esm2015/sort-entities/sort-entities.model.js.map +1 -1
- package/esm2015/sort-entities/sort-entities.trait.js +3 -3
- package/esm2015/sort-entities/sort-entities.trait.js.map +1 -1
- package/fesm2015/ngrx-traits-common.js +5 -5
- package/fesm2015/ngrx-traits-common.js.map +1 -1
- package/package.json +2 -2
- package/sort-entities/sort-entities.model.d.ts +1 -1
- package/sort-entities/sort-entities.trait.d.ts +2 -2
|
@@ -888,7 +888,7 @@
|
|
|
888
888
|
* the last cached page.
|
|
889
889
|
* @param config
|
|
890
890
|
* @param config.cacheType - Default to 'partial', change the cache mode
|
|
891
|
-
* @param config.pageSize - Default to
|
|
891
|
+
* @param config.pageSize - Default to 10, number of entities on each page
|
|
892
892
|
* @param config.currentPage - Default to 0, starting page
|
|
893
893
|
* @param config.pagesToCache - Default to 3, used in partial and grow cache mode, is the number of
|
|
894
894
|
* extra pages kept in cache to avoid calling the backend on each page
|
|
@@ -929,7 +929,7 @@
|
|
|
929
929
|
* traits.selectors.selectTodosPageInfo()
|
|
930
930
|
*/
|
|
931
931
|
function addEntitiesPaginationTrait(_a) {
|
|
932
|
-
var _b = _a === void 0 ? {} : _a, _c = _b.cacheType, cacheType = _c === void 0 ? 'partial' : _c, _d = _b.pageSize, pageSize = _d === void 0 ?
|
|
932
|
+
var _b = _a === void 0 ? {} : _a, _c = _b.cacheType, cacheType = _c === void 0 ? 'partial' : _c, _d = _b.pageSize, pageSize = _d === void 0 ? 10 : _d, _e = _b.currentPage, currentPage = _e === void 0 ? 0 : _e, _f = _b.pagesToCache, pagesToCache = _f === void 0 ? 3 : _f;
|
|
933
933
|
return core.createTraitFactory({
|
|
934
934
|
key: entitiesPaginationTraitKey,
|
|
935
935
|
depends: [loadEntitiesTraitKey],
|
|
@@ -1721,8 +1721,8 @@
|
|
|
1721
1721
|
/**
|
|
1722
1722
|
* Generates ngrx code to sort locally or remotely a list of entities
|
|
1723
1723
|
* @param config
|
|
1724
|
-
* @param config.defaultSort - Required, Default entity prop for the sort
|
|
1725
|
-
* @param config.remote -
|
|
1724
|
+
* @param config.defaultSort - Required field, Default entity prop for the sort
|
|
1725
|
+
* @param config.remote - Required field, default to false, when true disables local
|
|
1726
1726
|
* sorting and every sort action call will now trigger a loadEntities action and the backend
|
|
1727
1727
|
* should sort the data, use selectSort in the effect that call backend to get the requested sort,
|
|
1728
1728
|
* when false all sorting is done in memory when the sort action is fired
|
|
@@ -1750,7 +1750,7 @@
|
|
|
1750
1750
|
* traits.selectors.selectTodosSort()
|
|
1751
1751
|
*/
|
|
1752
1752
|
function addSortEntitiesTrait(_a) {
|
|
1753
|
-
var
|
|
1753
|
+
var remote = _a.remote, defaultSort = _a.defaultSort;
|
|
1754
1754
|
return core.createTraitFactory({
|
|
1755
1755
|
key: sortTraitKey,
|
|
1756
1756
|
depends: [loadEntitiesTraitKey],
|