ng-easycommerce 0.0.412 → 0.0.415
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/README.md +20 -2
- package/assets/ec-i18n/en.json +4 -2
- package/assets/ec-i18n/es.json +4 -2
- package/assets/recaptcha/recaptcha-site-keys.json +2 -2
- package/assets/recaptcha/recaptcha-sites-prod.json +36 -0
- package/assets/recaptcha/recaptcha-sites.json +18 -18
- package/bundles/ng-easycommerce.umd.js +97 -17
- package/bundles/ng-easycommerce.umd.js.map +1 -1
- package/bundles/ng-easycommerce.umd.min.js +1 -1
- package/bundles/ng-easycommerce.umd.min.js.map +1 -1
- package/esm2015/lib/ec-component/seller-dashboard-container-ec/seller-dashboard-container-ec.component.js +25 -9
- package/esm2015/lib/ec-component/share-block-ec/share-block-ec.component.js +17 -3
- package/esm2015/lib/ec-component/stores-ec/stores-ec.component.js +39 -1
- package/esm2015/lib/guards/able-buyer-guard.service.js +2 -2
- package/esm2015/lib/interfaces/store.js +1 -1
- package/esm2015/lib/services/captcha.service.js +12 -5
- package/esm2015/lib/services/cart.service.js +3 -3
- package/esm5/lib/ec-component/seller-dashboard-container-ec/seller-dashboard-container-ec.component.js +25 -9
- package/esm5/lib/ec-component/share-block-ec/share-block-ec.component.js +18 -3
- package/esm5/lib/ec-component/stores-ec/stores-ec.component.js +44 -1
- package/esm5/lib/guards/able-buyer-guard.service.js +2 -2
- package/esm5/lib/interfaces/store.js +1 -1
- package/esm5/lib/services/captcha.service.js +12 -5
- package/esm5/lib/services/cart.service.js +3 -3
- package/fesm2015/ng-easycommerce.js +91 -17
- package/fesm2015/ng-easycommerce.js.map +1 -1
- package/fesm5/ng-easycommerce.js +97 -17
- package/fesm5/ng-easycommerce.js.map +1 -1
- package/lib/ec-component/seller-dashboard-container-ec/seller-dashboard-container-ec.component.d.ts +7 -0
- package/lib/ec-component/share-block-ec/share-block-ec.component.d.ts +6 -1
- package/lib/ec-component/stores-ec/stores-ec.component.d.ts +26 -0
- package/lib/interfaces/store.d.ts +2 -0
- package/lib/services/captcha.service.d.ts +9 -1
- package/ng-easycommerce.metadata.json +1 -1
- package/package.json +1 -1
package/fesm5/ng-easycommerce.js
CHANGED
|
@@ -3973,11 +3973,11 @@ var CartService = /** @class */ (function () {
|
|
|
3973
3973
|
_this.requestInProcess.next(false);
|
|
3974
3974
|
};
|
|
3975
3975
|
this.updateCartItemQuantity = function (variant_id, quantity) {
|
|
3976
|
-
_this.items.find(function (item) { return item.variant_id == variant_id; }).quantity = quantity;
|
|
3976
|
+
var newQuantity = _this.items.find(function (item) { return item.variant_id == variant_id; }).quantity = quantity;
|
|
3977
3977
|
_this.cartItemsSubject.next(_this.items);
|
|
3978
3978
|
_this.requestInProcess.next(false);
|
|
3979
3979
|
_this.updateLocalCart();
|
|
3980
|
-
_this.toastrService.show('product-updated');
|
|
3980
|
+
_this.toastrService.show('product-updated', { quantity: newQuantity });
|
|
3981
3981
|
};
|
|
3982
3982
|
this.appendToCart = function (cart) {
|
|
3983
3983
|
_this.updateCartObj(cart);
|
|
@@ -5152,7 +5152,7 @@ var AbleBuyerGuardService = /** @class */ (function () {
|
|
|
5152
5152
|
this.router = router;
|
|
5153
5153
|
}
|
|
5154
5154
|
AbleBuyerGuardService$1.prototype.canActivate = function (routeSnapshot) {
|
|
5155
|
-
var redirectTo = routeSnapshot.data.
|
|
5155
|
+
var redirectTo = routeSnapshot.data.redirectSellerTo || '/';
|
|
5156
5156
|
if (!this.auth.isAbleToBuy())
|
|
5157
5157
|
this.router.navigateByUrl(redirectTo);
|
|
5158
5158
|
return this.auth.isAbleToBuy();
|
|
@@ -8912,9 +8912,15 @@ var StoresEcComponent = /** @class */ (function (_super) {
|
|
|
8912
8912
|
_this.sanitizer = sanitizer;
|
|
8913
8913
|
_this.filterStores = null;
|
|
8914
8914
|
_this.storesAll = null;
|
|
8915
|
+
_this.exclusiveStores = null;
|
|
8915
8916
|
_this.imageMap = true;
|
|
8916
8917
|
_this.stores = [];
|
|
8917
8918
|
_this.provinces = [];
|
|
8919
|
+
/**
|
|
8920
|
+
* @description Obtiene todas la provincias que figuren en el arreglo
|
|
8921
|
+
* @param stores Arreglo de tiendas
|
|
8922
|
+
* @returns {Array} Arreglo de provincias
|
|
8923
|
+
*/
|
|
8918
8924
|
_this.getProvices = function (stores) {
|
|
8919
8925
|
var provincesOpt = [];
|
|
8920
8926
|
stores.forEach(function (store) {
|
|
@@ -8924,6 +8930,42 @@ var StoresEcComponent = /** @class */ (function (_super) {
|
|
|
8924
8930
|
});
|
|
8925
8931
|
return provincesOpt;
|
|
8926
8932
|
};
|
|
8933
|
+
/**
|
|
8934
|
+
* @description Retorna un arreglo de objetos formado por las claves
|
|
8935
|
+
* "province"(contiene un objeto provincia) y
|
|
8936
|
+
* "stores" (contiene un arreglo de tiendas pertenecientes a la provincia)
|
|
8937
|
+
* @param stores Opcional, arreglo de tiendas a la que se le quiere aplicar la division por provincia
|
|
8938
|
+
* @returns {Array<{"province", "stores"}>}
|
|
8939
|
+
*/
|
|
8940
|
+
_this.getStoresByProvinces = function (stores) {
|
|
8941
|
+
if (stores === void 0) { stores = _this.stores; }
|
|
8942
|
+
var storesByProvinces = [];
|
|
8943
|
+
if (stores) {
|
|
8944
|
+
var provinces = _this.getProvices(stores);
|
|
8945
|
+
provinces.forEach(function (elem) {
|
|
8946
|
+
var _a;
|
|
8947
|
+
var aux = (_a = stores) === null || _a === void 0 ? void 0 : _a.filter(function (store) { return store.province.code == elem.code; });
|
|
8948
|
+
storesByProvinces.push({ province: elem, stores: aux });
|
|
8949
|
+
});
|
|
8950
|
+
}
|
|
8951
|
+
return storesByProvinces;
|
|
8952
|
+
};
|
|
8953
|
+
/**
|
|
8954
|
+
* @description Retorna las tiendas con/sin retiro en el local
|
|
8955
|
+
* @param stores Opcional, arreglo de tiendas
|
|
8956
|
+
* @param cond Opcional, Si es "true" obtiene las tiendas con retiro local caso contrario "false"
|
|
8957
|
+
* @returns {Array<Store>} Arreglo de Store
|
|
8958
|
+
*/
|
|
8959
|
+
_this.getPickupStores = function (stores, cond) {
|
|
8960
|
+
if (stores === void 0) { stores = _this.stores; }
|
|
8961
|
+
if (cond === void 0) { cond = true; }
|
|
8962
|
+
return stores && stores.filter(function (store) { return cond == store.pickupStore; });
|
|
8963
|
+
};
|
|
8964
|
+
/**
|
|
8965
|
+
* @description Metodo que devuelve las tiendas que NO son exclusivas.
|
|
8966
|
+
* @returns {Array<Store>} Arreglo de Store
|
|
8967
|
+
*/
|
|
8968
|
+
_this.getNonExclusiveStores = function () { return _this.stores.filter(function (store) { return !store.exclusive; }); };
|
|
8927
8969
|
_this.selectChange = function (select) {
|
|
8928
8970
|
_this.filterStores = select != '' && _this.storesAll.filter(function (store) { return store.province.code == select; }) || _this.storesAll;
|
|
8929
8971
|
return true;
|
|
@@ -8932,6 +8974,7 @@ var StoresEcComponent = /** @class */ (function (_super) {
|
|
|
8932
8974
|
_this.storesService.stores.pipe(filter(function (store) { return store && store.length > 0; })).subscribe(function (stores) {
|
|
8933
8975
|
_this.storesAll = stores;
|
|
8934
8976
|
_this.stores = stores;
|
|
8977
|
+
_this.exclusiveStores = stores.filter(function (store) { return store.exclusive; });
|
|
8935
8978
|
_this.selectChange('');
|
|
8936
8979
|
});
|
|
8937
8980
|
_this.ecOnConstruct();
|
|
@@ -9087,20 +9130,35 @@ var SellerDashboardContainerEcComponent = /** @class */ (function (_super) {
|
|
|
9087
9130
|
_this.fuse.setCollection(_this.filteredCustomers);
|
|
9088
9131
|
_this.sortCustomers(_this.sortValue);
|
|
9089
9132
|
};
|
|
9133
|
+
/**
|
|
9134
|
+
* @description Ordena la lista de clientes
|
|
9135
|
+
* @param value recibe una cadena que de estar formada de la forma "tipoOrdenacion_atributoPorOrdenar"
|
|
9136
|
+
* Ejemplo: "asc_firstName" o "desc_id" ...
|
|
9137
|
+
*/
|
|
9090
9138
|
_this.sortCustomers = function (value) {
|
|
9091
9139
|
_this.sortValue = value;
|
|
9092
|
-
var
|
|
9140
|
+
var values = value.split('_');
|
|
9141
|
+
var sortType = values[0];
|
|
9142
|
+
var attribute = values[1];
|
|
9143
|
+
var comparator = (sortType == 'asc')
|
|
9093
9144
|
? [-1, 1]
|
|
9094
9145
|
: [1, -1];
|
|
9146
|
+
var typeValue;
|
|
9147
|
+
if (_this.filteredCustomers.length > 0) {
|
|
9148
|
+
typeValue = typeof (_this.filteredCustomers[0][attribute]);
|
|
9149
|
+
}
|
|
9150
|
+
var sortFunction = typeValue == 'number' ? _this.sortNumber : _this.sortText;
|
|
9095
9151
|
_this.filteredCustomers =
|
|
9096
9152
|
_this.sortValue
|
|
9097
|
-
? _this.filteredCustomers.sort(function (aCustomer, otherCustomer) {
|
|
9098
|
-
return (aCustomer.firstName == otherCustomer.firstName)
|
|
9099
|
-
? aCustomer.lastName.toLowerCase() < otherCustomer.lastName.toLowerCase() ? comparator[0] : comparator[1]
|
|
9100
|
-
: aCustomer.firstName.toLowerCase() < otherCustomer.firstName.toLowerCase() ? comparator[0] : comparator[1];
|
|
9101
|
-
})
|
|
9153
|
+
? _this.filteredCustomers.sort(function (aCustomer, otherCustomer) { return sortFunction(aCustomer, otherCustomer, attribute, comparator); })
|
|
9102
9154
|
: _this.filteredCustomers;
|
|
9103
9155
|
};
|
|
9156
|
+
_this.sortNumber = function (aCustomer, otherCustomer, attribute, comparator) { return aCustomer[attribute] < otherCustomer[attribute] ? comparator[0] : comparator[1]; };
|
|
9157
|
+
_this.sortText = function (aCustomer, otherCustomer, attribute, comparator) {
|
|
9158
|
+
return (aCustomer[attribute] == otherCustomer[attribute])
|
|
9159
|
+
? aCustomer.lastName.toLowerCase() < otherCustomer.lastName.toLowerCase() ? comparator[0] : comparator[1]
|
|
9160
|
+
: String(aCustomer[attribute]).toLowerCase() < String(otherCustomer[attribute]).toLowerCase() ? comparator[0] : comparator[1];
|
|
9161
|
+
};
|
|
9104
9162
|
_this.changeCustomer = function (customer) {
|
|
9105
9163
|
_this.authService.setCustomer(customer);
|
|
9106
9164
|
customer
|
|
@@ -9128,6 +9186,7 @@ var SellerDashboardContainerEcComponent = /** @class */ (function (_super) {
|
|
|
9128
9186
|
_this.customers = user.customers;
|
|
9129
9187
|
_this.filteredCustomers = _this.customers;
|
|
9130
9188
|
_this.fuse.setCollection(_this.filteredCustomers);
|
|
9189
|
+
_this.sortCustomers('desc_ordersNotApproved');
|
|
9131
9190
|
});
|
|
9132
9191
|
};
|
|
9133
9192
|
SellerDashboardContainerEcComponent.ctorParameters = function () { return [
|
|
@@ -9142,8 +9201,8 @@ var SellerDashboardContainerEcComponent = /** @class */ (function (_super) {
|
|
|
9142
9201
|
SellerDashboardContainerEcComponent = __decorate$17([
|
|
9143
9202
|
Component({
|
|
9144
9203
|
selector: 'app-seller-dashboard-container',
|
|
9145
|
-
template: "<section *ngIf=\"user\" id=\"seller-dashboard\">\n <div class=\"section-content mt-5 mb-2 tablaVendedores\">\n <div class=\"container-xl\">\n <div class=\"row\">\n <main class=\"col-md-12\">\n\n <ul *ngIf=\"hasHeader()\" class=\"nav nav-tabs\">\n <li class=\"nav-item col-12 col-lg-2\">\n <a *ngIf=\"hasUIComponent('HEADER_TAB')\" class=\"nav-link active cursor-pointer px-4\"
|
|
9146
|
-
styles: ["#seller-dashboard{--seller-dashboard-primary-color:0,0,0}.btn-seller-primary{color:#fff!important;background-color:rgba(var(--seller-dashboard-primary-color),1)!important;border-color:rgba(var(--seller-dashboard-primary-color),1)!important}.btn-seller-primary:hover{background-color:rgba(var(--seller-dashboard-primary-color),.9)!important}.btn-seller-primary:active{background-color:rgba(var(--seller-dashboard-primary-color),.8)!important}.btnGestionar{padding:6px 12px!important;height:36px;display:flex;align-items:center;justify-content:center;margin-left:10px}.ordenarVendedores{width:150px!important;color:#8b8b8b!important;background-color:#fff;border:1px solid #b6b6b6!important;border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px}.buscadorVendedores{margin-bottom:4px!important}.buscadorVendedores input{border:1px solid #b6b6b6!important;width:200px}.buscadorVendedores .btnSearch{border:1px solid #b6b6b6!important;padding:.375rem .75rem;font-size:1rem}.buscadorVendedores .btnSearch:focus{background-color:#fff!important}.carritoProductoHeader{border:none!important}.carritoProductoHeader small{font-size:13px}.cadaVendedor{padding:5px 0;margin-bottom:0!important;border:none!important;border-bottom:1px solid #ccc!important;border-radius:0!important;-webkit-border-radius:0}.cadaVendedor .btnIngresar a{padding:10px!important;border-width:1px!important;border-style:solid!important;display:flex;align-items:center;width:
|
|
9204
|
+
template: "<section *ngIf=\"user\" id=\"seller-dashboard\">\n <div class=\"section-content mt-5 mb-2 tablaVendedores\">\n <div class=\"container-xl\">\n <div class=\"row\">\n <main class=\"col-md-12\">\n\n <ul *ngIf=\"hasHeader()\" class=\"nav nav-tabs\">\n <li class=\"nav-item col-12 col-lg-2\">\n <a *ngIf=\"hasUIComponent('HEADER_TAB')\" class=\"nav-link active cursor-pointer px-4\"\n aria-current=\"page\">\n {{ 'my-clients' | translate }}\n </a>\n </li>\n <div\n class=\"d-flex justify-content-end justify-content-lg-start justify-content-xl-end col-12 col-md-12 col-lg-6\">\n <a *ngIf=\"hasUIComponent('GENERATE_BUDGET_BTN') && authService.getCustomer()?.id; else withoutCustomer\"\n [routerLink]=\"'/collection'\" class=\"btn btn-seller-primary text-white btnGestionar d-flex align-items-center\"><i\n class=\"bi bi-file-earmark me-2 mr-2\"></i>{{ 'generate-budget' | translate }}</a>\n <ng-template #withoutCustomer>\n <a class=\"btn btn-seller-primary text-white btnGestionar d-flex align-items-center\" (click)=\"toastrService.show('must-select-customer')\">\n <i class=\"bi bi-file-earmark me-2 mr-2\"></i>{{ 'generate-budget' | translate }}</a>\n </ng-template>\n <a *ngIf=\"hasUIComponent('MANAGE_ORDERS_BTN')\"\n (click)=\"navigateExternal(constants.getUrlBase())\"\n class=\"btn btn-seller-primary text-white btnGestionar d-flex align-items-center me- me-lg-4 mr- mr-lg-4\"><i\n class=\"bi bi-archive-fill me-2 mr-2\"></i>{{ 'manage-orders' | translate }}</a>\n </div>\n <div class=\"d-flex ms-auto camposVendedores col-12 col-md-12 col-lg-4 justify-content-end\">\n <select *ngIf=\"hasUIComponent('SORT_SELECT')\" id=\"customerSort\" name=\"customerSort\"\n (change)=\"sortCustomers($event.target.value)\" class=\"mb-1 ordenarVendedores\">\n <option selected hidden disabled>{{ 'order-by' | translate }}</option>\n <option value='asc_firstName'>{{ 'client' | translate }} (A-Z)</option>\n <option value='desc_firstName'>{{ 'client' | translate }} (Z-A)</option>\n <option value='asc_id'>Menor a Mayor c\u00F3digo</option>\n <option value='desc_id'>Mayor a Menor c\u00F3digo</option>\n </select>\n <form *ngIf=\"hasUIComponent('SEARCH_FORM')\"\n class=\"col-lg-auto mb-lg-0 d-flex ms-3 ml-3 d-flex buscadorVendedores\">\n <input type=\"text\" name=\"searchInput\" class=\"form-control\"\n placeholder=\"{{ 'search' | translate }}\" [(ngModel)]=\"searchInput\"\n (keyup.enter)=\"updateCustomers()\">\n <button class=\"btn btn-primary ms-1 ml-1 bg-white border-dark btnSearch\"><i\n class=\"bi bi-search text-dark\" (click)=\"updateCustomers()\"></i></button>\n </form>\n </div>\n </ul>\n\n <ng-container *ngIf=\"user.customers?.length; else noCustomers\">\n\n <article class=\"card card-body mb-1 carritoProductoHeader m-0 py-0 mt-4\">\n <div class=\"row align-items-center font-bold border-bottom\">\n <div class=\"col-3 col-md-2 text-left\">\n <small>{{ 'code' | translate | uppercase }}</small>\n </div>\n <div class=\"col-5 col-md-3 mb-md-0\">\n <small>{{ 'client' | translate | uppercase }}</small>\n </div>\n <div class=\"col-4 col-md-3 text-left d-none d-md-block\">\n <small>{{ 'user' | translate | uppercase }}</small>\n </div>\n <div class=\"col-4 col-md-2 text-left\">\n <small>{{ 'new-orders' | translate | uppercase }}</small>\n </div>\n <div class=\"col-2 col-md-2 text-left d-none d-md-block\">\n <small></small>\n </div>\n\n </div>\n </article>\n\n <article *ngFor=\"let customer of filteredCustomers\" class=\"card card-body mb-3 cadaVendedor\">\n <div class=\"row d-flex align-items-center\">\n <div class=\"col-3 col-md-2 text-left ps-2 pl-2\">\n <div class=\"price h6 pb-0 mb-0 ps-3 pl-1\">{{ customer.id }}</div>\n </div>\n <div class=\"col-5 col-md-3 text-left\">\n <div class=\"price h6 fw-normal ps-2 pl-2 pb-0 mb-0\">\n {{ customer.firstName }} {{ customer.lastName }}\n <p class=\"d-block d-md-none fs-6 mt-1 mb-0 p-0 userMobile\">\n {{ customer.email }}\n </p>\n </div>\n </div>\n <div class=\"col-4 col-md-3 text-left d-none d-md-block\">\n <div class=\"price h6 fw-normal pb-0 mb-0 ps-2 pl-2\">\n {{ customer.email }}\n </div>\n </div>\n <div class=\"col-4 col-md-2 text-left ps-2 pl-2\">\n <div *ngIf=\"true\" class=\"contNumero\">\n {{ customer.ordersNotApproved }}\n </div>\n </div>\n <div class=\"col-12 col-md-2 btnIngresar\">\n\n <ng-container\n *ngIf=\"authService.getCustomer()?.id == customer.id; else noActiveCustomer\">\n <a (click)=\"changeCustomer(null)\"\n class=\"btn btn-seller-primary justify-content-center\">\n <i class=\"bi bi-box-arrow-left me-2 mr-2\"></i>\n <small class=\"me-2 mr-2 d-none d-md-block\">\n {{ 'exit' | translate | uppercase }}\n </small>\n </a>\n </ng-container>\n <ng-template #noActiveCustomer>\n <a (click)=\"changeCustomer(customer)\"\n class=\"btn btn-seller-primary justify-content-center\">\n <i class=\"bi bi-box-arrow-in-right me-2 mr-2\"></i>\n <small class=\"me-2 mr-2 d-none d-md-block\">\n {{ 'operate-as' | translate | uppercase }}\n </small>\n </a>\n </ng-template>\n\n </div>\n </div>\n </article>\n\n </ng-container>\n\n </main>\n </div>\n </div>\n </div>\n</section>\n\n<ng-template #noCustomers>\n <h4 class=\"text-center p-5\">{{ 'no-customers' | translate }}</h4>\n</ng-template>",
|
|
9205
|
+
styles: ["#seller-dashboard{--seller-dashboard-primary-color:0,0,0}.btn-seller-primary{color:#fff!important;background-color:rgba(var(--seller-dashboard-primary-color),1)!important;border-color:rgba(var(--seller-dashboard-primary-color),1)!important}.btn-seller-primary:hover{background-color:rgba(var(--seller-dashboard-primary-color),.9)!important}.btn-seller-primary:active{background-color:rgba(var(--seller-dashboard-primary-color),.8)!important}.btnGestionar{padding:6px 12px!important;height:36px;display:flex;align-items:center;justify-content:center;margin-left:10px}.ordenarVendedores{width:150px!important;color:#8b8b8b!important;background-color:#fff;border:1px solid #b6b6b6!important;border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px}.buscadorVendedores{margin-bottom:4px!important}.buscadorVendedores input{border:1px solid #b6b6b6!important;width:200px}.buscadorVendedores .btnSearch{border:1px solid #b6b6b6!important;padding:.375rem .75rem;font-size:1rem}.buscadorVendedores .btnSearch:focus{background-color:#fff!important}.carritoProductoHeader{border:none!important}.carritoProductoHeader small{font-size:13px}.cadaVendedor{padding:5px 0;margin-bottom:0!important;border:none!important;border-bottom:1px solid #ccc!important;border-radius:0!important;-webkit-border-radius:0}.cadaVendedor .btnIngresar a{padding:10px!important;border-width:1px!important;border-style:solid!important;display:flex;align-items:center;width:100%!important;margin-left:auto;color:#fff}.cadaVendedor .btnIngresar .contNumero{background-color:#eee;width:20px;height:20px;color:#000;font-size:13px;display:flex;align-items:center;justify-content:center;font-weight:600;border-radius:20px;-webkit-border-radius:20px;-moz-border-radius:20px;-ms-border-radius:20px;-o-border-radius:20px}.userMobile{font-size:14px!important;font-style:italic!important}.cadaVendedor .btnIngresar a:hover{background-color:rgba(var(--seller-dashboard-primary-color),.85)}.cadaVendedor .btnIngresar a:active{background-color:rgba(var(--seller-dashboard-primary-color),.8)}.cursor-pointer{cursor:pointer}.font-bold{font-weight:700}.border-bottom{border-bottom:1px solid #000!important}@media screen and (max-width:1200px){.btnGestionar{font-size:12px}}@media screen and (max-width:992px){.camposVendedores{justify-content:flex-end;margin-top:8px;margin-bottom:4px}}@media all and (max-width:768px){.ordenarVendedores{width:140px!important}.buscadorVendedores input{width:140px}.cadaVendedor .btnIngresar a{width:70px!important}}@media all and (max-width:576px){.tablaVendedores .nav-tabs .nav-link{font-size:13px;padding:6px!important}.btnGestionar{padding:6px 8px!important;font-size:13px;height:36px;display:flex;align-items:center;justify-content:center;margin-top:3px;margin-left:10px}.buscadorVendedores input,.ordenarVendedores{font-size:13px}}.fs-6{font-size:1rem!important}"]
|
|
9147
9206
|
}),
|
|
9148
9207
|
__param$9(3, Inject('env'))
|
|
9149
9208
|
], SellerDashboardContainerEcComponent);
|
|
@@ -11214,15 +11273,17 @@ var __decorate$1p = (this && this.__decorate) || function (decorators, target, k
|
|
|
11214
11273
|
};
|
|
11215
11274
|
var ShareBlockEcComponent = /** @class */ (function (_super) {
|
|
11216
11275
|
__extends$T(ShareBlockEcComponent, _super);
|
|
11217
|
-
function ShareBlockEcComponent(consts, renderer, meta, title) {
|
|
11276
|
+
function ShareBlockEcComponent(consts, paramsService, renderer, meta, title) {
|
|
11218
11277
|
var _this = _super.call(this) || this;
|
|
11219
11278
|
_this.consts = consts;
|
|
11279
|
+
_this.paramsService = paramsService;
|
|
11220
11280
|
_this.renderer = renderer;
|
|
11221
11281
|
_this.meta = meta;
|
|
11222
11282
|
_this.title = title;
|
|
11223
11283
|
_this.url = '';
|
|
11224
11284
|
_this.mediaimg = '';
|
|
11225
11285
|
_this.description = '';
|
|
11286
|
+
_this.params = {};
|
|
11226
11287
|
_this.toShareFacebook = function () {
|
|
11227
11288
|
//return `https://www.facebook.com/share.php?u=${encodeURIComponent(this.url)}`
|
|
11228
11289
|
return "https://www.facebook.com/share.php?u=" + _this.url;
|
|
@@ -11235,6 +11296,12 @@ var ShareBlockEcComponent = /** @class */ (function (_super) {
|
|
|
11235
11296
|
//return `https://pinterest.com/pin/create/button/?url=${encodeURIComponent(this.url)}&media=${encodeURIComponent(this.mediaimg)}&description=${encodeURIComponent(this.description)}`
|
|
11236
11297
|
return "https://pinterest.com/pin/create/button/?url=" + _this.url + "&media=" + (_this.consts.mediaUrl() + _this.mediaimg) + "&description=" + _this.description;
|
|
11237
11298
|
};
|
|
11299
|
+
_this.toShareWhatsapp = function (wsp) {
|
|
11300
|
+
return "https://wa.me/" + wsp.value + "?text=Me%20interesa%20este%20producto.%20" + _this.url;
|
|
11301
|
+
};
|
|
11302
|
+
_this.toShareEmail = function (mail) {
|
|
11303
|
+
return "mailto:" + mail.value + "?subject=Consulta%20sobre%20el%20producto:%20" + _this.description + "&body=Art\u00EDculo:%20" + _this.url;
|
|
11304
|
+
};
|
|
11238
11305
|
_this.createMetadata = function () {
|
|
11239
11306
|
// <meta name="description" content="Cojín JOY, en algodón rústico súper soft, tonos frescos y naturales, y con detalles de borlas para darle un toque divertido.">
|
|
11240
11307
|
// <meta property="og:site_name" content="MYC HOME LINENS">
|
|
@@ -11259,6 +11326,7 @@ var ShareBlockEcComponent = /** @class */ (function (_super) {
|
|
|
11259
11326
|
return _this;
|
|
11260
11327
|
}
|
|
11261
11328
|
ShareBlockEcComponent.prototype.ngOnInit = function () {
|
|
11329
|
+
var _this = this;
|
|
11262
11330
|
this.url = window.location.href;
|
|
11263
11331
|
this.mediaimg = this.product.picturesdefault && this.product.picturesdefault[0];
|
|
11264
11332
|
this.description = this.product.name;
|
|
@@ -11318,10 +11386,15 @@ var ShareBlockEcComponent = /** @class */ (function (_super) {
|
|
|
11318
11386
|
}
|
|
11319
11387
|
], true);
|
|
11320
11388
|
}
|
|
11389
|
+
this.paramsService.parameters.subscribe(function (res) {
|
|
11390
|
+
var _a;
|
|
11391
|
+
_this.params = res != null ? (_a = res) === null || _a === void 0 ? void 0 : _a.filter(function (elem) { return elem.code.includes('share'); }) : [];
|
|
11392
|
+
});
|
|
11321
11393
|
this.ecOnInit();
|
|
11322
11394
|
};
|
|
11323
11395
|
ShareBlockEcComponent.ctorParameters = function () { return [
|
|
11324
11396
|
{ type: Constants },
|
|
11397
|
+
{ type: ParametersService },
|
|
11325
11398
|
{ type: Renderer2 },
|
|
11326
11399
|
{ type: Meta },
|
|
11327
11400
|
{ type: Title }
|
|
@@ -11332,7 +11405,7 @@ var ShareBlockEcComponent = /** @class */ (function (_super) {
|
|
|
11332
11405
|
ShareBlockEcComponent = __decorate$1p([
|
|
11333
11406
|
Component({
|
|
11334
11407
|
selector: 'app-share-block-ec',
|
|
11335
|
-
template: "<div class=\"w-100 d-flex justify-content-around\">\n <a target=\"_blank\" [href]=\"toShareFacebook()\"\n class=\"social-sharing__link\" title=\"Compartir en Facebook\">\n <svg aria-hidden=\"true\" focusable=\"false\" role=\"presentation\" class=\"icon icon-facebook\" viewBox=\"0 0 32 32\">\n <path fill=\"#444\"\n d=\"M18.56 31.36V17.28h4.48l.64-5.12h-5.12v-3.2c0-1.28.64-2.56 2.56-2.56h2.56V1.28H19.2c-3.84 0-7.04 2.56-7.04 7.04v3.84H7.68v5.12h4.48v14.08h6.4z\">\n </path>\n </svg>\n <span class=\"social-sharing__title\" aria-hidden=\"true\">Compartir</span>\n </a>\n <a target=\"_blank\"
|
|
11408
|
+
template: "<div class=\"w-100 d-flex justify-content-around\">\n <ng-container *ngIf=\"params && params.length > 0; else default\">\n <a *ngIf=\"hasParams(params, 'facebook')\" target=\"_blank\" [href]=\"toShareFacebook()\"\n class=\"social-sharing__link\" title=\"Compartir en Facebook\">\n <svg aria-hidden=\"true\" focusable=\"false\" role=\"presentation\" class=\"icon icon-facebook\" viewBox=\"0 0 32 32\">\n <path fill=\"#444\"\n d=\"M18.56 31.36V17.28h4.48l.64-5.12h-5.12v-3.2c0-1.28.64-2.56 2.56-2.56h2.56V1.28H19.2c-3.84 0-7.04 2.56-7.04 7.04v3.84H7.68v5.12h4.48v14.08h6.4z\">\n </path>\n </svg>\n <span class=\"social-sharing__title\" aria-hidden=\"true\">Compartir</span>\n </a>\n <a *ngIf=\"hasParams(params, 'twitter')\" target=\"_blank\" \n [href]=\"toShareTwitter()\"\n class=\"social-sharing__link\" title=\"Tuitear en Twitter\">\n <svg aria-hidden=\"true\" focusable=\"false\" role=\"presentation\" class=\"icon icon-twitter\" viewBox=\"0 0 32 32\">\n <path fill=\"#444\"\n d=\"M31.281 6.733q-1.304 1.924-3.13 3.26 0 .13.033.408t.033.408q0 2.543-.75 5.086t-2.282 4.858-3.635 4.108-5.053 2.869-6.341 1.076q-5.282 0-9.65-2.836.913.065 1.5.065 4.401 0 7.857-2.673-2.054-.033-3.668-1.255t-2.266-3.146q.554.13 1.206.13.88 0 1.663-.261-2.184-.456-3.619-2.184t-1.435-3.977v-.065q1.239.652 2.836.717-1.271-.848-2.021-2.233t-.75-2.983q0-1.63.815-3.195 2.38 2.967 5.754 4.678t7.319 1.907q-.228-.815-.228-1.434 0-2.608 1.858-4.45t4.532-1.842q1.304 0 2.51.522t2.054 1.467q2.152-.424 4.01-1.532-.685 2.217-2.771 3.488 1.989-.261 3.619-.978z\">\n </path>\n </svg>\n <span class=\"social-sharing__title\" aria-hidden=\"true\">Tuitear</span>\n </a>\n <a *ngIf=\"hasParams(params, 'pinterest')\" target=\"_blank\"\n [href]=\"toSharePinterest()\"\n class=\"social-sharing__link\" title=\"Pinear en Pinterest\">\n <svg aria-hidden=\"true\" focusable=\"false\" role=\"presentation\" class=\"icon icon-pinterest\" viewBox=\"0 0 32 32\">\n <path fill=\"#444\"\n d=\"M27.52 9.6c-.64-5.76-6.4-8.32-12.8-7.68-4.48.64-9.6 4.48-9.6 10.24 0 3.2.64 5.76 3.84 6.4 1.28-2.56-.64-3.2-.64-4.48-1.28-7.04 8.32-12.16 13.44-7.04 3.2 3.84 1.28 14.08-4.48 13.44-5.12-1.28 2.56-9.6-1.92-11.52-3.2-1.28-5.12 4.48-3.84 7.04-1.28 4.48-3.2 8.96-1.92 15.36 2.56-1.92 3.84-5.76 4.48-9.6 1.28.64 1.92 1.92 3.84 1.92 6.4-.64 10.24-7.68 9.6-14.08z\">\n </path>\n </svg>\n <span class=\"social-sharing__title\" aria-hidden=\"true\">Hacer pin</span>\n </a>\n <a *ngIf=\"hasParams(params, 'whatsapp') as wsp\" target=\"_blank\" [href]=\"toShareWhatsapp(wsp)\" class=\"social-sharing__link\" title=\"Whatsapp\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" focusable=\"false\" role=\"presentation\" fill=\"currentColor\" class=\"bi bi-whatsapp\"\n viewBox=\"0 0 16 16\">\n <path\n d=\"M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z\" />\n </svg>\n <span class=\"social-sharing__title\" aria-hidden=\"true\">Whatsapp</span>\n </a>\n <a *ngIf=\"hasParams(params, 'email') as email\" target=\"_blank\" [href]=\"toShareEmail(email)\" class=\"social-sharing__link\"\n title=\"Email\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" focusable=\"false\" role=\"presentation\" fill=\"currentColor\" class=\"bi bi-envelope-fill\"\n viewBox=\"0 0 16 16\">\n <path\n d=\"M.05 3.555A2 2 0 0 1 2 2h12a2 2 0 0 1 1.95 1.555L8 8.414.05 3.555ZM0 4.697v7.104l5.803-3.558L0 4.697ZM6.761 8.83l-6.57 4.027A2 2 0 0 0 2 14h12a2 2 0 0 0 1.808-1.144l-6.57-4.027L8 9.586l-1.239-.757Zm3.436-.586L16 11.801V4.697l-5.803 3.546Z\" />\n </svg>\n <span class=\"social-sharing__title\" aria-hidden=\"true\">Email</span>\n </a>\n </ng-container>\n</div>\n\n<!-- VISTA DEFAULT CON LINKS QUE NO REQUIEREN PARAMETROS-->\n<ng-template #default>\n <a target=\"_blank\" [href]=\"toShareFacebook()\" class=\"social-sharing__link\" title=\"Compartir en Facebook\">\n <svg aria-hidden=\"true\" focusable=\"false\" role=\"presentation\" class=\"icon icon-facebook\" viewBox=\"0 0 32 32\">\n <path fill=\"#444\"\n d=\"M18.56 31.36V17.28h4.48l.64-5.12h-5.12v-3.2c0-1.28.64-2.56 2.56-2.56h2.56V1.28H19.2c-3.84 0-7.04 2.56-7.04 7.04v3.84H7.68v5.12h4.48v14.08h6.4z\">\n </path>\n </svg>\n <span class=\"social-sharing__title\" aria-hidden=\"true\">Compartir</span>\n </a>\n <a target=\"_blank\" [href]=\"toShareTwitter()\" class=\"social-sharing__link\" title=\"Tuitear en Twitter\">\n <svg aria-hidden=\"true\" focusable=\"false\" role=\"presentation\" class=\"icon icon-twitter\" viewBox=\"0 0 32 32\">\n <path fill=\"#444\"\n d=\"M31.281 6.733q-1.304 1.924-3.13 3.26 0 .13.033.408t.033.408q0 2.543-.75 5.086t-2.282 4.858-3.635 4.108-5.053 2.869-6.341 1.076q-5.282 0-9.65-2.836.913.065 1.5.065 4.401 0 7.857-2.673-2.054-.033-3.668-1.255t-2.266-3.146q.554.13 1.206.13.88 0 1.663-.261-2.184-.456-3.619-2.184t-1.435-3.977v-.065q1.239.652 2.836.717-1.271-.848-2.021-2.233t-.75-2.983q0-1.63.815-3.195 2.38 2.967 5.754 4.678t7.319 1.907q-.228-.815-.228-1.434 0-2.608 1.858-4.45t4.532-1.842q1.304 0 2.51.522t2.054 1.467q2.152-.424 4.01-1.532-.685 2.217-2.771 3.488 1.989-.261 3.619-.978z\">\n </path>\n </svg>\n <span class=\"social-sharing__title\" aria-hidden=\"true\">Tuitear</span>\n </a>\n <a target=\"_blank\" [href]=\"toSharePinterest()\" class=\"social-sharing__link\" title=\"Pinear en Pinterest\">\n <svg aria-hidden=\"true\" focusable=\"false\" role=\"presentation\" class=\"icon icon-pinterest\" viewBox=\"0 0 32 32\">\n <path fill=\"#444\"\n d=\"M27.52 9.6c-.64-5.76-6.4-8.32-12.8-7.68-4.48.64-9.6 4.48-9.6 10.24 0 3.2.64 5.76 3.84 6.4 1.28-2.56-.64-3.2-.64-4.48-1.28-7.04 8.32-12.16 13.44-7.04 3.2 3.84 1.28 14.08-4.48 13.44-5.12-1.28 2.56-9.6-1.92-11.52-3.2-1.28-5.12 4.48-3.84 7.04-1.28 4.48-3.2 8.96-1.92 15.36 2.56-1.92 3.84-5.76 4.48-9.6 1.28.64 1.92 1.92 3.84 1.92 6.4-.64 10.24-7.68 9.6-14.08z\">\n </path>\n </svg>\n <span class=\"social-sharing__title\" aria-hidden=\"true\">Hacer pin</span>\n </a>\n</ng-template>\n<!-- FIN -->",
|
|
11336
11409
|
styles: ["a{color:#000}"]
|
|
11337
11410
|
})
|
|
11338
11411
|
], ShareBlockEcComponent);
|
|
@@ -12969,13 +13042,21 @@ var CaptchaService = /** @class */ (function () {
|
|
|
12969
13042
|
this.http = http;
|
|
12970
13043
|
this.captchaSubject = new BehaviorSubject({ siteKey: '' });
|
|
12971
13044
|
this.captcha = this.captchaSubject.asObservable();
|
|
13045
|
+
this.testing = "easycommercetech";
|
|
13046
|
+
this.productionEnvironment = false;
|
|
12972
13047
|
this.recaptchaSiteKeysUrl = './assets/recaptcha/recaptcha-site-keys.json';
|
|
12973
13048
|
this.recaptchaSitesUrl = './assets/recaptcha/recaptcha-sites.json';
|
|
13049
|
+
this.recaptchaSitesUrlProd = './assets/recaptcha/recaptcha-sites-prod.json';
|
|
12974
13050
|
/**
|
|
12975
13051
|
*
|
|
12976
13052
|
* @returns {string} path que contiene la direccion del endpoint referido al captcha
|
|
12977
13053
|
*/
|
|
12978
13054
|
this.captchaApi = function () { return 'shop-api/channels'; };
|
|
13055
|
+
/**
|
|
13056
|
+
* @description Devuelve true si la url es de produccion, false en caso contrario.
|
|
13057
|
+
* @returns {Boolean}
|
|
13058
|
+
*/
|
|
13059
|
+
this.isProd = function () { return !_this.urlBaseFormat.includes(_this.testing); };
|
|
12979
13060
|
/**
|
|
12980
13061
|
* @description Carga las variables RECAPTCHA_SITES y RECAPTCHA_SITE_KEYS, con los valores
|
|
12981
13062
|
* de los Json estaticos, para posteriormente obtener la "siteKey"(clave del captcha) en caso
|
|
@@ -12994,12 +13075,10 @@ var CaptchaService = /** @class */ (function () {
|
|
|
12994
13075
|
return _this.http.get(_this.recaptchaSiteKeysUrl);
|
|
12995
13076
|
};
|
|
12996
13077
|
/**
|
|
12997
|
-
*
|
|
13078
|
+
* @description Se obtiene los datos segun el entorno en que se ejecute
|
|
12998
13079
|
* @returns {Observable<>} Datos obtenidos del archivo con las url de los sitios
|
|
12999
13080
|
*/
|
|
13000
|
-
this.getRecaptchaSites = function () {
|
|
13001
|
-
return _this.http.get(_this.recaptchaSitesUrl);
|
|
13002
|
-
};
|
|
13081
|
+
this.getRecaptchaSites = function () { return _this.productionEnvironment ? _this.http.get(_this.recaptchaSitesUrlProd) : _this.http.get(_this.recaptchaSitesUrl); };
|
|
13003
13082
|
/**
|
|
13004
13083
|
* @description Genera una peticion para recibir la clave del captcha. En caso de no tener exito,
|
|
13005
13084
|
* utiliza los archivos estaticos para retornar una clave por defecto. Rellena el Observable con
|
|
@@ -13028,6 +13107,7 @@ var CaptchaService = /** @class */ (function () {
|
|
|
13028
13107
|
* la clave por defecto que pertenece a esta direccion, inicializa la configuracion inicial.
|
|
13029
13108
|
*/
|
|
13030
13109
|
this.urlBaseFormat = this.formatUrl(location.href);
|
|
13110
|
+
this.productionEnvironment = this.isProd();
|
|
13031
13111
|
this.initializer();
|
|
13032
13112
|
}
|
|
13033
13113
|
CaptchaService$1.ctorParameters = function () { return [
|