simpo-component-library 3.6.746 → 3.6.747

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.
Files changed (28) hide show
  1. package/esm2022/lib/ecommerce/sections/cart/cart.component.mjs +5 -3
  2. package/esm2022/lib/ecommerce/sections/featured-products/featured-products.component.mjs +16 -2
  3. package/esm2022/lib/ecommerce/sections/product-list/product-list.component.mjs +16 -2
  4. package/fesm2022/simpo-component-library.mjs +34 -4
  5. package/fesm2022/simpo-component-library.mjs.map +1 -1
  6. package/lib/components/input-fields/input-fields.component.d.ts +1 -1
  7. package/lib/directive/background-directive.d.ts +1 -1
  8. package/lib/directive/button-directive.directive.d.ts +1 -1
  9. package/lib/directive/color.directive.d.ts +1 -1
  10. package/lib/ecommerce/sections/featured-category/featured-category.component.d.ts +1 -1
  11. package/lib/ecommerce/sections/featured-category/featured-collection.component.d.ts +1 -1
  12. package/lib/ecommerce/sections/featured-products/featured-products.component.d.ts +1 -0
  13. package/lib/ecommerce/sections/new-collection/new-collection.component.d.ts +2 -2
  14. package/lib/ecommerce/sections/product-desc/product-desc.component.d.ts +2 -2
  15. package/lib/ecommerce/sections/product-list/product-list.component.d.ts +2 -1
  16. package/lib/ecommerce/sections/schemes/schemes.component.d.ts +1 -1
  17. package/lib/ecommerce/sections/store-list/store-list.component.d.ts +1 -1
  18. package/lib/ecommerce/sections/store-page/store-page.component.d.ts +1 -1
  19. package/lib/sections/banner-grid-section/banner-grid-section.component.d.ts +1 -1
  20. package/lib/sections/contact-us/contact-us.component.d.ts +1 -1
  21. package/lib/sections/header-section/header-section.component.d.ts +1 -1
  22. package/lib/sections/image-grid-hotspot/image-grid-hotspot.component.d.ts +1 -1
  23. package/lib/sections/image-grid-section/image-grid-section.component.d.ts +1 -1
  24. package/lib/sections/moving-text/moving-text.component.d.ts +1 -1
  25. package/lib/sections/pricing-section/pricing-section.component.d.ts +2 -2
  26. package/package.json +1 -1
  27. package/simpo-component-library-3.6.747.tgz +0 -0
  28. package/simpo-component-library-3.6.746.tgz +0 -0
@@ -9322,7 +9322,8 @@ class CartComponent extends BaseSection {
9322
9322
  icon: "success",
9323
9323
  title: "Hurray",
9324
9324
  text: "Order placed successfully",
9325
- confirmButtonText: "See Details"
9325
+ confirmButtonText: "See Details",
9326
+ allowOutsideClick: false
9326
9327
  }).then((response) => {
9327
9328
  if (response.isConfirmed) {
9328
9329
  this.router.navigate(['/profile']);
@@ -9735,7 +9736,8 @@ class CartComponent extends BaseSection {
9735
9736
  icon: "success",
9736
9737
  title: "Hurray",
9737
9738
  text: "Order placed successfully",
9738
- confirmButtonText: "See Details"
9739
+ confirmButtonText: "See Details",
9740
+ allowOutsideClick: false
9739
9741
  }).then((response) => {
9740
9742
  if (response.isConfirmed) {
9741
9743
  this.router.navigate(['/profile']);
@@ -18102,9 +18104,23 @@ class FeaturedProductsComponent extends BaseSection {
18102
18104
  this.changeDetailProduct.emit(product);
18103
18105
  }
18104
18106
  else {
18105
- this.router.navigate(['details', product.slugifiedName], {});
18107
+ const slug = product.slugifiedName || this.toSlug(product.name);
18108
+ if (!slug)
18109
+ return;
18110
+ this.router.navigate(['details', slug], {});
18106
18111
  }
18107
18112
  }
18113
+ toSlug(input) {
18114
+ if (!input)
18115
+ return null;
18116
+ const noWhitespace = input.replace(/\s+/g, '-');
18117
+ const normalized = noWhitespace.normalize('NFD');
18118
+ const slug = normalized.replace(/[^\w-]/g, '');
18119
+ return slug
18120
+ .toLowerCase()
18121
+ .replace(/-+/g, '-')
18122
+ .replace(/^-|-$/g, '');
18123
+ }
18108
18124
  isItemOutOfStock(product) {
18109
18125
  return product.itemInventory?.openingStock == 0;
18110
18126
  }
@@ -20276,7 +20292,21 @@ class ProductListComponent extends BaseSection {
20276
20292
  return this.screenWidth > 475 ? (this.screenWidth < 1025 ? '25%' : 'calc(' + ((100 / (this.styles?.elementInRow || 4))) + '%)') : (this.styles?.mobileColumn === 1 ? '98%' : '48%');
20277
20293
  }
20278
20294
  proceedToProductDesc(product) {
20279
- this.router.navigate(['details', product.slugifiedName]);
20295
+ const slug = product.slugifiedName || this.toSlug(product.name);
20296
+ if (!slug)
20297
+ return;
20298
+ this.router.navigate(['details', slug]);
20299
+ }
20300
+ toSlug(input) {
20301
+ if (!input)
20302
+ return null;
20303
+ const noWhitespace = input.replace(/\s+/g, '-');
20304
+ const normalized = noWhitespace.normalize('NFD');
20305
+ const slug = normalized.replace(/[^\w-]/g, '');
20306
+ return slug
20307
+ .toLowerCase()
20308
+ .replace(/-+/g, '-')
20309
+ .replace(/^-|-$/g, '');
20280
20310
  }
20281
20311
  toggleMetalSize(size) {
20282
20312
  size.status = !size.status;