@infrab4a/connect-angular 5.8.3 → 5.8.5
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/services/home-shop.service.mjs +12 -1
- package/fesm2015/infrab4a-connect-angular.mjs +11 -0
- package/fesm2015/infrab4a-connect-angular.mjs.map +1 -1
- package/fesm2020/infrab4a-connect-angular.mjs +11 -0
- package/fesm2020/infrab4a-connect-angular.mjs.map +1 -1
- package/package.json +2 -2
- package/services/home-shop.service.d.ts +9 -1
|
@@ -3111,6 +3111,17 @@ class HomeShopService {
|
|
|
3111
3111
|
getMinValueForFreeShipping() {
|
|
3112
3112
|
return this.getHomeConfiguration().pipe(map((home) => home.minValueForFreeShipping));
|
|
3113
3113
|
}
|
|
3114
|
+
/**
|
|
3115
|
+
* Retorna os thresholds de frete grátis estruturados configurados no documento
|
|
3116
|
+
* Home (`shippingThresholds`). Quando o documento ainda não possui essa
|
|
3117
|
+
* estrutura, retorna um default conservador equivalente à regra legada
|
|
3118
|
+
* (edition: 50, avulsoSp: 99, avulsoOutro: null) para que consumidores não
|
|
3119
|
+
* quebrem durante a migração.
|
|
3120
|
+
*/
|
|
3121
|
+
getShippingThresholds() {
|
|
3122
|
+
const conservativeDefault = { edition: 50, avulsoSp: 99, avulsoOutro: null };
|
|
3123
|
+
return this.getHomeConfiguration().pipe(map((home) => home.shippingThresholds ?? conservativeDefault));
|
|
3124
|
+
}
|
|
3114
3125
|
getDiscoverProducts(_gender) {
|
|
3115
3126
|
return this.getHomeConfiguration().pipe(concatMap((home) => from(this.repositoriesFacade.categoryRepository.getCategoriesForHome({
|
|
3116
3127
|
categoryIds: home.discoverCategories,
|