monkey-front-core 0.0.466 → 0.0.468
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/esm2020/lib/core/services/commons/monkeyecx-commons-resolve.service.mjs +13 -8
- package/esm2020/lib/core/services/store/monkeyecx-store.actions.mjs +1 -1
- package/esm2020/lib/core/services/store/monkeyecx-store.selector.mjs +10 -3
- package/fesm2015/monkey-front-core.mjs +19 -7
- package/fesm2015/monkey-front-core.mjs.map +1 -1
- package/fesm2020/monkey-front-core.mjs +19 -7
- package/fesm2020/monkey-front-core.mjs.map +1 -1
- package/lib/core/services/commons/monkeyecx-commons-resolve.service.d.ts +13 -6
- package/lib/core/services/store/monkeyecx-store.actions.d.ts +3 -3
- package/lib/core/services/store/monkeyecx-store.selector.d.ts +5 -2
- package/monkey-front-core-0.0.468.tgz +0 -0
- package/package.json +1 -1
- package/monkey-front-core-0.0.466.tgz +0 -0
|
@@ -3166,8 +3166,13 @@ class MonkeyEcxCommonsResolveService extends MonkeyEcxCommonsService {
|
|
|
3166
3166
|
return;
|
|
3167
3167
|
const url = MonkeyEcxUtils.replaceVariables(route, { companyId });
|
|
3168
3168
|
store.dispatch(action.load({ url, identifier }));
|
|
3169
|
-
this.__data$ = store.select(selector.selectByIdentifier({ identifier }));
|
|
3170
3169
|
this.__control$ = store.select(selector.selectControl());
|
|
3170
|
+
if (selector?.selectByIdentifier) {
|
|
3171
|
+
this.__data$ = store.select(selector.selectByIdentifier({ identifier }));
|
|
3172
|
+
}
|
|
3173
|
+
if (selector?.selectOneByIdentifier) {
|
|
3174
|
+
this.__data$ = store.select(selector.selectOneByIdentifier({ identifier }));
|
|
3175
|
+
}
|
|
3171
3176
|
if (selector?.selectLinks) {
|
|
3172
3177
|
this.__pagination$ = store.select(selector.selectLinks({ identifier }));
|
|
3173
3178
|
}
|
|
@@ -3186,8 +3191,8 @@ class MonkeyEcxCommonsResolveService extends MonkeyEcxCommonsService {
|
|
|
3186
3191
|
store.dispatch(action.loadPagination({
|
|
3187
3192
|
identifier: `${companyId || governmentId}-${companyType}`,
|
|
3188
3193
|
pagination: {
|
|
3189
|
-
action: 'next'
|
|
3190
|
-
}
|
|
3194
|
+
action: 'next'
|
|
3195
|
+
}
|
|
3191
3196
|
}));
|
|
3192
3197
|
}
|
|
3193
3198
|
catch (e) {
|
|
@@ -3247,8 +3252,8 @@ class MonkeyEcxCommonsResolveService extends MonkeyEcxCommonsService {
|
|
|
3247
3252
|
const { router, currentRoute } = this;
|
|
3248
3253
|
router.navigate([route || `${currentRoute}/details`], {
|
|
3249
3254
|
state: {
|
|
3250
|
-
detailsData
|
|
3251
|
-
}
|
|
3255
|
+
detailsData
|
|
3256
|
+
}
|
|
3252
3257
|
});
|
|
3253
3258
|
}
|
|
3254
3259
|
catch (e) {
|
|
@@ -5567,10 +5572,16 @@ class MonkeyEcxCommonsSelectors {
|
|
|
5567
5572
|
const selectAll = createSelector(selectState, reducer.selectAll);
|
|
5568
5573
|
const selectByIdentifier = (props) => {
|
|
5569
5574
|
return createSelector(selectAll, (entities) => {
|
|
5570
|
-
|
|
5575
|
+
return entities.filter((_) => {
|
|
5571
5576
|
return _.identifier === props.identifier;
|
|
5572
5577
|
});
|
|
5573
|
-
|
|
5578
|
+
});
|
|
5579
|
+
};
|
|
5580
|
+
const selectOneByIdentifier = (props) => {
|
|
5581
|
+
return createSelector(selectAll, (entities) => {
|
|
5582
|
+
return (entities.find((_) => {
|
|
5583
|
+
return _.identifier === props.identifier;
|
|
5584
|
+
}) || null);
|
|
5574
5585
|
});
|
|
5575
5586
|
};
|
|
5576
5587
|
const selectControl = () => {
|
|
@@ -5617,6 +5628,7 @@ class MonkeyEcxCommonsSelectors {
|
|
|
5617
5628
|
selectControl,
|
|
5618
5629
|
selectLinks,
|
|
5619
5630
|
selectByIdentifier,
|
|
5631
|
+
selectOneByIdentifier,
|
|
5620
5632
|
selectPage,
|
|
5621
5633
|
linksHasDifference
|
|
5622
5634
|
};
|