simpo-component-library 1.5.0 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (186) hide show
  1. package/README.md +24 -24
  2. package/esm2022/lib/components/delete-hover-element/delete-hover-element.component.mjs +3 -3
  3. package/esm2022/lib/components/hover-elements/hover-elements.component.mjs +7 -5
  4. package/esm2022/lib/constants/business.constant.mjs +14 -0
  5. package/esm2022/lib/directive/background-directive.mjs +1 -1
  6. package/esm2022/lib/directive/blur-content.directive.mjs +1 -1
  7. package/esm2022/lib/directive/border-directive.mjs +23 -11
  8. package/esm2022/lib/directive/borderlessImage.directive.mjs +1 -1
  9. package/esm2022/lib/directive/button-directive.directive.mjs +1 -1
  10. package/esm2022/lib/directive/color.directive.mjs +1 -1
  11. package/esm2022/lib/directive/column-directive.directive.mjs +1 -1
  12. package/esm2022/lib/directive/container-alignment.directive.mjs +1 -1
  13. package/esm2022/lib/directive/container-fir.directive.mjs +1 -1
  14. package/esm2022/lib/directive/content-title-spacing.directive.mjs +1 -1
  15. package/esm2022/lib/directive/corner-directive.mjs +1 -1
  16. package/esm2022/lib/directive/hoverborder.directive.mjs +1 -1
  17. package/esm2022/lib/directive/image-container.directive.mjs +1 -1
  18. package/esm2022/lib/directive/image-directive.directive.mjs +1 -1
  19. package/esm2022/lib/directive/image-position.directive.mjs +1 -1
  20. package/esm2022/lib/directive/position-layout-directive.directive.mjs +1 -1
  21. package/esm2022/lib/directive/spacing-horizontal.directive.mjs +48 -0
  22. package/esm2022/lib/directive/sticky-directive.mjs +1 -1
  23. package/esm2022/lib/directive/text-background-directive.directive.mjs +1 -1
  24. package/esm2022/lib/directive/text-size.directive.mjs +1 -1
  25. package/esm2022/lib/directive/wrap-containers.directive.mjs +31 -0
  26. package/esm2022/lib/ecommerce/sections/address/address.component.mjs +134 -28
  27. package/esm2022/lib/ecommerce/sections/authenticate-user/authenticate-user.component.mjs +104 -39
  28. package/esm2022/lib/ecommerce/sections/cart/cart.component.mjs +296 -61
  29. package/esm2022/lib/ecommerce/sections/cart/cart.modal.mjs +1 -1
  30. package/esm2022/lib/ecommerce/sections/checkout/checkout.component.mjs +13 -3
  31. package/esm2022/lib/ecommerce/sections/checkout/checkout.modal.mjs +1 -1
  32. package/esm2022/lib/ecommerce/sections/featured-category/featured-category.component.mjs +13 -4
  33. package/esm2022/lib/ecommerce/sections/featured-category/featured-category.modal.mjs +1 -1
  34. package/esm2022/lib/ecommerce/sections/featured-products/featured-products.component.mjs +212 -42
  35. package/esm2022/lib/ecommerce/sections/featured-products/featured-products.modal.mjs +11 -2
  36. package/esm2022/lib/ecommerce/sections/item-varient/item-varient.component.mjs +11 -0
  37. package/esm2022/lib/ecommerce/sections/order-details/order-details.component.mjs +77 -10
  38. package/esm2022/lib/ecommerce/sections/pagnination/pagnination.component.mjs +13 -7
  39. package/esm2022/lib/ecommerce/sections/product-desc/product-desc.component.mjs +272 -39
  40. package/esm2022/lib/ecommerce/sections/product-desc/product-desc.modal.mjs +1 -1
  41. package/esm2022/lib/ecommerce/sections/product-list/product-list.component.mjs +252 -33
  42. package/esm2022/lib/ecommerce/sections/product-list/product-list.modal.mjs +1 -1
  43. package/esm2022/lib/ecommerce/sections/user-basic-info/user-basic-info.component.mjs +44 -17
  44. package/esm2022/lib/ecommerce/sections/user-profile/user-profile.component.mjs +300 -28
  45. package/esm2022/lib/ecommerce/sections/user-profile/user-profile.modal.mjs +1 -1
  46. package/esm2022/lib/ecommerce/sections/verify-payment/verify-payment.component.mjs +124 -0
  47. package/esm2022/lib/ecommerce/sections/verify-payment/verify-payment.model.mjs +2 -0
  48. package/esm2022/lib/ecommerce/sections/whislist/whislist.component.mjs +183 -17
  49. package/esm2022/lib/ecommerce/styles/BaseCollection.modal.mjs +1 -1
  50. package/esm2022/lib/ecommerce/styles/Collection.modal.mjs +1 -1
  51. package/esm2022/lib/ecommerce/styles/OrderedItems.modal.mjs +11 -3
  52. package/esm2022/lib/ecommerce/styles/cart.modal.mjs +2 -1
  53. package/esm2022/lib/ecommerce/styles/category.modal.mjs +1 -1
  54. package/esm2022/lib/ecommerce/styles/order.modal.mjs +1 -1
  55. package/esm2022/lib/ecommerce/styles/product.modal.mjs +10 -1
  56. package/esm2022/lib/ecommerce/styles/user.modal.mjs +1 -1
  57. package/esm2022/lib/elements/below-image-card/below-image-card.component.mjs +3 -3
  58. package/esm2022/lib/elements/button/button.component.mjs +3 -3
  59. package/esm2022/lib/elements/button/button.model.mjs +1 -1
  60. package/esm2022/lib/elements/covering-image-card/covering-image-card.component.mjs +3 -3
  61. package/esm2022/lib/elements/heading-element/heading-element.component.mjs +3 -3
  62. package/esm2022/lib/elements/index.mjs +1 -1
  63. package/esm2022/lib/elements/simpo-button/simpo-button.component.mjs +3 -3
  64. package/esm2022/lib/elements/text/text.component.mjs +3 -3
  65. package/esm2022/lib/elements/top-of-image-card/top-of-image-card.component.mjs +3 -3
  66. package/esm2022/lib/pipes/amount.pipe.mjs +35 -0
  67. package/esm2022/lib/pipes/gender.pipe.mjs +36 -0
  68. package/esm2022/lib/sections/BaseSection.mjs +1 -1
  69. package/esm2022/lib/sections/add-new-section/add-new-section.component.mjs +3 -3
  70. package/esm2022/lib/sections/banner-carousel/banner-carousel.component.mjs +3 -3
  71. package/esm2022/lib/sections/banner-carousel/banner-carousel.model.mjs +1 -1
  72. package/esm2022/lib/sections/banner-grid-section/banner-grid-section.component.mjs +9 -4
  73. package/esm2022/lib/sections/banner-grid-section/banner-grid-section.model.mjs +1 -1
  74. package/esm2022/lib/sections/banner-section/banner-section.component.mjs +3 -3
  75. package/esm2022/lib/sections/blog-list/blog-list.component.mjs +3 -3
  76. package/esm2022/lib/sections/blog-list/blog-list.model.mjs +1 -1
  77. package/esm2022/lib/sections/carousel-banner/carousel-banner.component.mjs +12 -12
  78. package/esm2022/lib/sections/carousel-banner/carousel-banner.model.mjs +1 -1
  79. package/esm2022/lib/sections/choose-us-section/choose-us-section.component.mjs +3 -3
  80. package/esm2022/lib/sections/choose-us-section/choose-us-section.model.mjs +1 -1
  81. package/esm2022/lib/sections/contact-us/contact-us.component.mjs +7 -5
  82. package/esm2022/lib/sections/faq-section/faq-section.component.mjs +3 -3
  83. package/esm2022/lib/sections/faq-section/faq-section.modal.mjs +1 -1
  84. package/esm2022/lib/sections/features-section/features-section.component.mjs +3 -3
  85. package/esm2022/lib/sections/features-section/features-section.model.mjs +1 -1
  86. package/esm2022/lib/sections/footer-section/footer-section.component.mjs +3 -3
  87. package/esm2022/lib/sections/header-text/header-text.component.mjs +3 -3
  88. package/esm2022/lib/sections/header-text/header-text.model.mjs +1 -1
  89. package/esm2022/lib/sections/image-carousel-section/image-carousel-section.component.mjs +3 -3
  90. package/esm2022/lib/sections/image-carousel-section/image-carousel.model.mjs +1 -1
  91. package/esm2022/lib/sections/image-grid-section/image-grid-section.component.mjs +3 -3
  92. package/esm2022/lib/sections/image-grid-section/image-grid-section.model.mjs +1 -1
  93. package/esm2022/lib/sections/image-section/image-section.component.mjs +3 -3
  94. package/esm2022/lib/sections/image-section/image-section.model.mjs +1 -1
  95. package/esm2022/lib/sections/location-section/location-section.component.mjs +3 -3
  96. package/esm2022/lib/sections/location-section/location-section.modal.mjs +1 -1
  97. package/esm2022/lib/sections/logo-showcase/logo-showcase.component.mjs +3 -3
  98. package/esm2022/lib/sections/logo-showcase/logo-showcase.modal.mjs +1 -1
  99. package/esm2022/lib/sections/navbar-section/navbar-section.component.mjs +42 -18
  100. package/esm2022/lib/sections/navbar-section/navbar-section.model.mjs +1 -1
  101. package/esm2022/lib/sections/pricing-section/pricing-section.component.mjs +3 -3
  102. package/esm2022/lib/sections/pricing-section/pricing-section.modal.mjs +1 -1
  103. package/esm2022/lib/sections/process-modern/process-modern.component.mjs +3 -3
  104. package/esm2022/lib/sections/process-modern/process-modern.model.mjs +1 -1
  105. package/esm2022/lib/sections/process-section/process-section.component.mjs +3 -3
  106. package/esm2022/lib/sections/process-section/process-section.modal.mjs +1 -1
  107. package/esm2022/lib/sections/recent-blog-post-section/recent-blog-post-section.component.mjs +3 -3
  108. package/esm2022/lib/sections/recent-blog-post-section/recent-blog-post-section.model.mjs +1 -1
  109. package/esm2022/lib/sections/service-section/service-section.component.mjs +3 -3
  110. package/esm2022/lib/sections/service-section/service-section.model.mjs +1 -1
  111. package/esm2022/lib/sections/skeleton-loader-section/skeleton-loader-section.component.mjs +3 -3
  112. package/esm2022/lib/sections/team-member-section/team-member-section.component.mjs +3 -3
  113. package/esm2022/lib/sections/team-member-section/team-member-section.model.mjs +1 -1
  114. package/esm2022/lib/sections/testimonial-fullwidth/testimonial-fullwidth.component.mjs +3 -3
  115. package/esm2022/lib/sections/testimonial-fullwidth/testimonial-fullwidth.model.mjs +1 -1
  116. package/esm2022/lib/sections/testimonial-section/testimonial-section.component.mjs +3 -3
  117. package/esm2022/lib/sections/testimonial-section/testimonial-section.model.mjs +1 -1
  118. package/esm2022/lib/sections/text-image-section/text-image-section.component.mjs +3 -3
  119. package/esm2022/lib/sections/text-section/text-section.component.mjs +2 -2
  120. package/esm2022/lib/sections/text-section/text-section.model.mjs +1 -1
  121. package/esm2022/lib/sections/video-section/video-section.component.mjs +11 -3
  122. package/esm2022/lib/sections/video-section/video-section.model.mjs +1 -1
  123. package/esm2022/lib/sections/view-blog/view-blog.component.mjs +3 -3
  124. package/esm2022/lib/services/cart.service.mjs +54 -120
  125. package/esm2022/lib/services/endUser.service.mjs +28 -0
  126. package/esm2022/lib/services/events.service.mjs +4 -1
  127. package/esm2022/lib/services/rest.service.mjs +58 -16
  128. package/esm2022/lib/services/storage.service.mjs +103 -35
  129. package/esm2022/lib/styles/index.mjs +8 -1
  130. package/esm2022/lib/styles/style.model.mjs +1 -1
  131. package/esm2022/lib/styles/types.mjs +1 -1
  132. package/esm2022/public-api.mjs +4 -1
  133. package/fesm2022/simpo-component-library.mjs +2535 -729
  134. package/fesm2022/simpo-component-library.mjs.map +1 -1
  135. package/lib/components/hover-elements/hover-elements.component.d.ts +2 -1
  136. package/lib/constants/business.constant.d.ts +11 -0
  137. package/lib/directive/spacing-horizontal.directive.d.ts +18 -0
  138. package/lib/directive/wrap-containers.directive.d.ts +14 -0
  139. package/lib/ecommerce/sections/address/address.component.d.ts +30 -9
  140. package/lib/ecommerce/sections/authenticate-user/authenticate-user.component.d.ts +31 -6
  141. package/lib/ecommerce/sections/cart/cart.component.d.ts +26 -11
  142. package/lib/ecommerce/sections/cart/cart.modal.d.ts +10 -1
  143. package/lib/ecommerce/sections/checkout/checkout.component.d.ts +2 -0
  144. package/lib/ecommerce/sections/featured-category/featured-category.component.d.ts +2 -0
  145. package/lib/ecommerce/sections/featured-products/featured-products.component.d.ts +27 -9
  146. package/lib/ecommerce/sections/featured-products/featured-products.modal.d.ts +5 -1
  147. package/lib/ecommerce/sections/item-varient/item-varient.component.d.ts +5 -0
  148. package/lib/ecommerce/sections/order-details/order-details.component.d.ts +16 -2
  149. package/lib/ecommerce/sections/pagnination/pagnination.component.d.ts +3 -2
  150. package/lib/ecommerce/sections/product-desc/product-desc.component.d.ts +33 -4
  151. package/lib/ecommerce/sections/product-desc/product-desc.modal.d.ts +4 -1
  152. package/lib/ecommerce/sections/product-list/product-list.component.d.ts +39 -3
  153. package/lib/ecommerce/sections/product-list/product-list.modal.d.ts +2 -0
  154. package/lib/ecommerce/sections/user-basic-info/user-basic-info.component.d.ts +11 -1
  155. package/lib/ecommerce/sections/user-profile/user-profile.component.d.ts +52 -13
  156. package/lib/ecommerce/sections/user-profile/user-profile.modal.d.ts +6 -8
  157. package/lib/ecommerce/sections/verify-payment/verify-payment.component.d.ts +34 -0
  158. package/lib/ecommerce/sections/verify-payment/verify-payment.model.d.ts +23 -0
  159. package/lib/ecommerce/sections/whislist/whislist.component.d.ts +22 -6
  160. package/lib/ecommerce/styles/OrderedItems.modal.d.ts +6 -2
  161. package/lib/ecommerce/styles/cart.modal.d.ts +1 -0
  162. package/lib/ecommerce/styles/product.modal.d.ts +4 -0
  163. package/lib/ecommerce/styles/user.modal.d.ts +3 -3
  164. package/lib/pipes/amount.pipe.d.ts +7 -0
  165. package/lib/pipes/gender.pipe.d.ts +8 -0
  166. package/lib/sections/banner-grid-section/banner-grid-section.component.d.ts +1 -0
  167. package/lib/sections/banner-grid-section/banner-grid-section.model.d.ts +1 -0
  168. package/lib/sections/carousel-banner/carousel-banner.component.d.ts +7 -5
  169. package/lib/sections/carousel-banner/carousel-banner.model.d.ts +41 -26
  170. package/lib/sections/navbar-section/navbar-section.component.d.ts +6 -1
  171. package/lib/sections/navbar-section/navbar-section.model.d.ts +1 -1
  172. package/lib/sections/video-section/video-section.component.d.ts +4 -2
  173. package/lib/services/cart.service.d.ts +13 -8
  174. package/lib/services/endUser.service.d.ts +13 -0
  175. package/lib/services/events.service.d.ts +5 -2
  176. package/lib/services/rest.service.d.ts +16 -2
  177. package/lib/services/storage.service.d.ts +11 -44
  178. package/lib/styles/index.d.ts +6 -0
  179. package/lib/styles/style.model.d.ts +4 -1
  180. package/lib/styles/types.d.ts +2 -0
  181. package/package.json +1 -1
  182. package/public-api.d.ts +3 -0
  183. package/esm2022/lib/ecommerce/json/user-cart.json +0 -40
  184. package/esm2022/lib/ecommerce/json/user-details.json +0 -15
  185. package/esm2022/lib/ecommerce/json/user-favourite.json +0 -32
  186. package/simpo-component-library-1.5.0.tgz +0 -0
@@ -1,8 +1,5 @@
1
1
  import { Injectable } from '@angular/core';
2
- import UserCart from "../ecommerce/json/user-cart.json";
3
- import UserFavourites from "../ecommerce/json/user-favourite.json";
4
2
  import { OrderedItems } from '../ecommerce/styles/OrderedItems.modal';
5
- import { forkJoin } from 'rxjs';
6
3
  import * as i0 from "@angular/core";
7
4
  import * as i1 from "./storage.service";
8
5
  import * as i2 from "./rest.service";
@@ -11,154 +8,91 @@ export class CartService {
11
8
  this.storageService = storageService;
12
9
  this.restService = restService;
13
10
  }
14
- addItemFromCartPage(product) {
11
+ addItemFromCartPage(product, userCart) {
15
12
  if (product.quantity) {
16
- let productIdx = -1;
17
- UserCart.orderedItems.forEach((item, idx) => {
18
- if (item.itemId == product.itemId)
19
- productIdx = idx;
20
- });
13
+ // let productIdx: number = -1;
14
+ // UserCart.orderedItems.forEach((item: OrderedItems, idx)=> {
15
+ // if (item.itemId == product.itemId)
16
+ // productIdx = idx;
17
+ // });
21
18
  this.storageService.addProductToCart(product);
22
- return this.restService.addItemToDB(UserCart);
19
+ return this.restService.addItemToDB(userCart);
23
20
  }
24
21
  else {
25
22
  // remove item from cart
26
23
  this.removeItemFromCart(product);
27
- return this.restService.addItemToDB(UserCart);
24
+ return this.restService.addItemToDB(userCart);
28
25
  }
29
26
  }
30
- addItemToCart(product, isFromCart = false) {
27
+ addItemFromWishlistPage(product, userWishlist) {
28
+ this.storageService.addProductToWishlist(product);
29
+ return this.restService.addItemToDB(userWishlist);
30
+ }
31
+ removeItemFromWishlistPage(product, userWishlist) {
32
+ this.storageService.removeProductFromWishlist(product.varientId);
33
+ return this.restService.addItemToDB(userWishlist);
34
+ }
35
+ addItemToCart(product, varientId) {
31
36
  if (product.quantity) {
32
- const orderedItem = !isFromCart ? this.objectMapper(product) : product;
33
- let productIdx = -1;
34
- UserCart.orderedItems.forEach((item, idx) => {
35
- if (item.itemId == product.itemId)
36
- productIdx = idx;
37
- });
38
- if (productIdx >= 0) {
39
- UserCart.orderedItems[productIdx].quantity = product.quantity;
40
- }
41
- else {
42
- UserCart.orderedItems.push(orderedItem);
43
- }
44
- console.log(UserCart);
45
- this.storageService.addProductToCart(orderedItem);
37
+ const orderedItem = this.objectMapper(product, varientId);
38
+ return this.storageService.addProductToCart(orderedItem);
46
39
  }
47
40
  else {
48
- // remove item from cart
49
- this.removeItemFromCart(product);
41
+ return this.removeItemFromCart(product);
50
42
  }
51
43
  }
52
- addItemToFavourite(product) {
53
- const orderedItem = this.objectMapper(product);
54
- let productIdx = -1;
55
- UserFavourites.orderedItems.forEach((item, idx) => {
56
- if (item.itemId == product.itemId)
57
- productIdx = idx;
58
- });
59
- if (productIdx >= 0) {
60
- UserFavourites.orderedItems[productIdx].quantity = product.quantity;
61
- }
62
- else {
63
- UserFavourites.orderedItems.push(orderedItem);
64
- }
44
+ addItemToFavourite(product, varientId) {
45
+ const orderedItem = this.objectMapper(product, varientId);
65
46
  this.storageService.addProductToWishlist(orderedItem);
66
47
  }
67
- removeItemFromFavourite(product) {
68
- const index = this.getItemIdxJSON(product.itemId, 'FAVOURITE');
69
- if (index >= 0) {
70
- const item = UserFavourites.orderedItems.splice(index, 1)[0];
71
- // UserFavourites.orderedItems.push(item as never);
72
- this.storageService.removeProductFromWishlist(product.itemId);
73
- }
48
+ addItemToFavFromCart(product) {
49
+ this.storageService.addProductToWishlist(product);
50
+ }
51
+ addOrderedItemToFavourite(orderedItem) {
52
+ this.storageService.addProductToWishlist(orderedItem);
53
+ }
54
+ removeItemFromFavourite(varientId) {
55
+ this.storageService.removeProductFromWishlist(varientId);
74
56
  }
75
57
  removeItemFromCart(product) {
76
- const index = this.getItemIdxJSON(product.itemId, 'CART');
77
- if (index >= 0) {
78
- const item = UserCart.orderedItems.splice(index, 1)[0];
79
- // UserCart.orderedItems.push(item as never);
80
- this.storageService.removeProductFromCart(product.itemId);
81
- }
58
+ this.storageService.removeProductFromCart(product.varientId);
59
+ }
60
+ getItemIdxJSON(id, type) {
61
+ return this.storageService.getProductFromCart(id);
82
62
  }
83
- // public convertFavToCart(product: OrderedItems) {
84
- // const index = this.getItemIdxJSON(product.getItemId, UserFavourites);
85
- // if (index >= 0) {
86
- // const item = UserFavourites.orderedItems.splice(index, 1)[0];
87
- // UserCart.orderedItems.push(item as never);
88
- // }
89
- // }
90
- // public convertCartToFav(product: OrderedItems) {
91
- // const index = this.getItemIdxJSON(product.getItemId, UserCart);
92
- // if (index >= 0) {
93
- // const item = UserCart.orderedItems.splice(index, 1)[0];
94
- // UserFavourites.orderedItems.push(item as never);
95
- // }
96
- // }
97
63
  storeItemToDB(product, type) {
98
64
  if (type == "CART") {
99
- const orderProduct = this.objectMapper(this.storageService.getProductFromCart(product.itemId));
65
+ const orderProduct = this.objectMapper(this.storageService.getProductFromCart(product.varientId));
100
66
  if (orderProduct) {
101
67
  this.storageService.addProductToCart(orderProduct);
102
- UserCart.orderedItems.push(orderProduct);
103
68
  }
104
69
  }
105
70
  else {
106
- const orderProduct = this.objectMapper(this.storageService.getProductFromWishlist(product.itemId));
71
+ const orderProduct = this.objectMapper(this.storageService.getProductFromWishlist(product.varientId));
107
72
  if (orderProduct) {
108
73
  this.storageService.addProductToWishlist(orderProduct);
109
- UserFavourites.orderedItems.push(orderProduct);
110
74
  }
111
75
  }
112
76
  }
113
- getItemIdxJSON(itemId, type) {
114
- const json = (type == "FAVOURITE") ? UserFavourites : UserCart;
115
- let productIndex = -1;
116
- json.orderedItems.forEach((p, idx) => {
117
- if (p.itemId == itemId)
118
- productIndex = idx;
119
- });
120
- return productIndex;
121
- }
122
- getItemByIdx(itemId, type) {
123
- const productIdx = this.getItemIdxJSON(itemId, type);
124
- console.log(type, productIdx);
125
- const json = (type == "FAVOURITE") ? UserFavourites : UserCart;
126
- if (productIdx >= 0)
127
- return json.orderedItems[productIdx];
128
- return null;
129
- }
130
- objectMapper(product) {
131
- return new OrderedItems(product);
77
+ objectMapper(product, variantId) {
78
+ return new OrderedItems(product, variantId);
79
+ }
80
+ storeCartDataToServer(cart) {
81
+ }
82
+ clearCartItems() {
83
+ this.storageService.clearUserCart();
132
84
  }
133
85
  storeDataToServer() {
134
- const userCart = UserCart;
135
- const userWishlist = UserFavourites;
136
- if (userCart.cartId?.length == 0)
137
- delete userCart.cartId;
138
- if (userWishlist.cartId?.length == 0)
139
- delete userWishlist.cartId;
140
- return forkJoin([
141
- this.restService.addItemToDB(UserCart),
142
- this.restService.addItemToDB(UserFavourites)
143
- ]);
144
- }
145
- storeDBToJSON() {
146
- // this.storageService.getUserCart().then((response)=> {
147
- //
148
- // })
149
- // const userId = UserDetails.user?.userId;
150
- // if (!userId)
151
- // return;
152
- // this.restService.getUserItems(userId, "CART").subscribe((response: any)=> {
153
- // UserCart.orderedItems = response.data.orderedItems;
154
- // UserCart.billdetails = response.data.billdetails;
155
- // UserCart.totalAmount = response.totalAmount;
156
- // })
157
- // this.restService.getUserItems(userId, "WISHLIST").subscribe((response: any)=> {
158
- // UserFavourites.orderedItems = response.data.orderedItems;
159
- // UserFavourites.billdetails = response.data.billdetails;
160
- // UserFavourites.totalAmount = response.totalAmount;
161
- // })
86
+ // const userCart = UserCart as never as Cart;
87
+ // const userWishlist = UserFavourites as never as Cart;
88
+ // if (userCart.cartId?.length == 0)
89
+ // delete userCart.cartId;
90
+ // if (userWishlist.cartId?.length == 0)
91
+ // delete userWishlist.cartId;
92
+ // return forkJoin([
93
+ // this.restService.addItemToDB(UserCart),
94
+ // this.restService.addItemToDB(UserFavourites)
95
+ // ]);
162
96
  }
163
97
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: CartService, deps: [{ token: i1.StorageServiceService }, { token: i2.RestService }], target: i0.ɵɵFactoryTarget.Injectable }); }
164
98
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: CartService, providedIn: 'root' }); }
@@ -169,4 +103,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImpor
169
103
  providedIn: 'root',
170
104
  }]
171
105
  }], ctorParameters: () => [{ type: i1.StorageServiceService }, { type: i2.RestService }] });
172
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FydC5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvc2ltcG8tdWkvc3JjL2xpYi9zZXJ2aWNlcy9jYXJ0LnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFnQixVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDekQsT0FBTyxRQUFRLE1BQU0sa0NBQWtDLENBQUM7QUFD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G4gICAgLy8gXSk7XG4gIH1cbn0iXX0=
@@ -0,0 +1,28 @@
1
+ import { EventEmitter, Injectable } from "@angular/core";
2
+ import * as i0 from "@angular/core";
3
+ import * as i1 from "./storage.service";
4
+ export class EndUserService {
5
+ constructor(storageService) {
6
+ this.storageService = storageService;
7
+ this.paymentStatusEvent = new EventEmitter();
8
+ this.eventRef = null;
9
+ }
10
+ ngOnInit() {
11
+ this.eventRef = this.paymentStatusEvent.subscribe((response) => {
12
+ if (response)
13
+ this.storageService.clearUserCart();
14
+ });
15
+ }
16
+ ngOnDestroy() {
17
+ this.eventRef?.unsubscribe();
18
+ }
19
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: EndUserService, deps: [{ token: i1.StorageServiceService }], target: i0.ɵɵFactoryTarget.Injectable }); }
20
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: EndUserService, providedIn: 'root' }); }
21
+ }
22
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: EndUserService, decorators: [{
23
+ type: Injectable,
24
+ args: [{
25
+ providedIn: 'root',
26
+ }]
27
+ }], ctorParameters: () => [{ type: i1.StorageServiceService }] });
28
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW5kVXNlci5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvc2ltcG8tdWkvc3JjL2xpYi9zZXJ2aWNlcy9lbmRVc2VyLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFlBQVksRUFBRSxVQUFVLEVBQXFCLE1BQU0sZUFBZSxDQUFDOzs7QUFPNUUsTUFBTSxPQUFPLGNBQWM7SUFDdkIsWUFDcUIsY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2VTZXJ2aWNlOiBTdG9yYWdlU2VydmljZVNlcnZpY2VcbiAgICApIHsgfVxuXG4gICAgcHVibGljIHBheW1lbnRTdGF0dXNFdmVudCA9IG5ldyBFdmVudEVtaXR0ZXI8Ym9vbGVhbj4oKTtcbiAgICBwcml2YXRlIGV2ZW50UmVmOiBTdWJzY3JpcHRpb24gfCBudWxsID0gbnVsbDtcbiAgICBuZ09uSW5pdCgpOiB2b2lkIHtcbiAgICAgICAgdGhpcy5ldmVudFJlZiA9IHRoaXMucGF5bWVudFN0YXR1c0V2ZW50LnN1YnNjcmliZSgocmVzcG9uc2UpID0+IHtcbiAgICAgICAgICAgIGlmIChyZXNwb25zZSlcbiAgICAgICAgICAgICAgICB0aGlzLnN0b3JhZ2VTZXJ2aWNlLmNsZWFyVXNlckNhcnQoKTtcbiAgICAgICAgfSlcbiAgICB9XG4gICAgbmdPbkRlc3Ryb3koKTogdm9pZCB7XG4gICAgICAgIHRoaXMuZXZlbnRSZWY/LnVuc3Vic2NyaWJlKCk7XG4gICAgfVxufSAgIl19
@@ -43,7 +43,10 @@ export class EventsService {
43
43
  this.environmentType = new EventEmitter();
44
44
  this.showLoadingScreen = new EventEmitter();
45
45
  this.cashFreeEvent = new EventEmitter();
46
+ this.addressAddedIdx = new EventEmitter();
47
+ this.showBagIcon = new EventEmitter();
46
48
  }
49
+ ngOnInit() { }
47
50
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: EventsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
48
51
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: EventsService, providedIn: 'root' }); }
49
52
  }
@@ -53,4 +56,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImpor
53
56
  providedIn: 'root',
54
57
  }]
55
58
  }], ctorParameters: () => [] });
56
- //# sourceMappingURL=data:application/json;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0ZXI8dW5rbm93bj4oKTtcclxuICBvcGVuQmxvZ0xpc3RFdmVudCA9IG5ldyBFdmVudEVtaXR0ZXI8dW5rbm93bj4oKTtcclxuICB0b2dnbGVFZGl0b3JFdmVudCA9IG5ldyBFdmVudEVtaXR0ZXI8Ym9vbGVhbj4oKTtcclxuICBjbG9zZUVkaXRvckV2ZW50ID0gbmV3IEV2ZW50RW1pdHRlcjxmYWxzZT4oKTtcclxuXHJcbiAgc3RvcENhcm91c2VsRXZlbnQgPSBuZXcgRXZlbnRFbWl0dGVyPGFueT4oKTtcclxuICAvLyBFY29tbWVyY2UgZXZlbnQgZW1pdHRlclxyXG4gIHJlZGlyZWN0VG9QYWdlID0gbmV3IEV2ZW50RW1pdHRlcjx1bmtub3duPigpO1xyXG4gIGFkZFRvQ2FydCA9IG5ldyBFdmVudEVtaXR0ZXI8dW5rbm93bj4oKTtcclxuICBwbGFjZU9yZGVyID0gbmV3IEV2ZW50RW1pdHRlcjx1bmtub3duPigpO1xyXG4gIGZlYXR1cmVDb2xsZWN0aW9uTGlzdCA9IG5ldyBFdmVudEVtaXR0ZXI8dW5rbm93bj4oKTtcclxuICBlbnZpcm9ubWVudFR5cGUgPSBuZXcgRXZlbnRFbWl0dGVyPHN0cmluZz4oKTtcclxuXHJcbiAgc2hvd0xvYWRpbmdTY3JlZW4gPSBuZXcgRXZlbnRFbWl0dGVyPGJvb2xlYW4+KCk7XHJcblxyXG4gIGNhc2hGcmVlRXZlbnQgPSBuZXcgRXZlbnRFbWl0dGVyPHVua25vd24+KCk7XHJcbiAgYWRkcmVzc0FkZGVkSWR4ID0gbmV3IEV2ZW50RW1pdHRlcjxudW1iZXI+KCk7XHJcbiAgc2hvd0JhZ0ljb24gPSBuZXcgRXZlbnRFbWl0dGVyPGJvb2xlYW4+KCk7XHJcbn1cclxuIl19
@@ -24,26 +24,26 @@ export class RestService {
24
24
  this.environmentTypeSubscriber?.unsubscribe();
25
25
  }
26
26
  getFeaturedProduct(collectionId) {
27
- let subIndustryId = localStorage.getItem("subindustryId");
27
+ let subIndustryId = localStorage.getItem("subIndustryId");
28
28
  if (!subIndustryId)
29
- subIndustryId = "1eecee8d-efba-62f8-b7b5-b9742fceb17f";
30
- return this.http.get(this.BASE_URL + `ecommerce/product/collection/id?collectionId=${collectionId || ''}&subIndustryId=${subIndustryId || ''}`).pipe(map((response) => response.data?.map((product) => new Product(product))));
29
+ subIndustryId = "";
30
+ // collectionId = "1ef5b924-66ad-68f5-b931-2bd654300b1f"
31
+ return this.http.get(this.BASE_URL + `ecommerce/product/collection/id?collectionId=${collectionId || ''}&subIndustryId=${subIndustryId || ''}&isEndUser=true`).pipe(map((response) => response.data?.map((product) => new Product(product))));
31
32
  }
32
33
  getProductDetails(productId = null) {
33
34
  const payload = {
34
35
  pageNo: 0,
35
36
  pageSize: 1,
36
- itemId: productId
37
+ itemId: productId,
38
+ subIndustryId: localStorage.getItem("subIndustryId"),
39
+ request: "USER"
37
40
  };
38
41
  return this.http.put(this.BASE_URL + `ecommerce/product/item/search`, payload).pipe(map((response) => response.data.data.map((product) => new Product(product))));
39
42
  }
40
43
  getAllCategories() {
41
- const payload = {
42
- pageNo: 0,
43
- pageSize: 10,
44
- businessId: localStorage.getItem("bId") ?? localStorage.getItem("businessId")
45
- };
46
- return this.http.put(this.BASE_URL + 'ecommerce/inventory/get/category', payload).pipe(map((response) => response.data.data?.map((category) => new Category(category))));
44
+ const businessId = localStorage.getItem("bId") ?? localStorage.getItem("businessId") ?? "";
45
+ const subIndustryId = localStorage.getItem("subIndustryId") ?? "";
46
+ return this.http.get(this.BASE_URL + `ecommerce/inventory/featured?businessId=${'1ef5b91d-b93b-6083-856d-cf26973b5761'}&subId=${'1eecee93-a389-61f9-b7b5-45f683df8191'}`).pipe(map((response) => response.data?.map((category) => new Category(category))));
47
47
  }
48
48
  getAllCollections() {
49
49
  const payload = {
@@ -56,6 +56,7 @@ export class RestService {
56
56
  getFilteredProduct(collectionIds, categoryIds, searchText, minPrice, maxPrice, sortBy, pageNo, size) {
57
57
  const payload = {
58
58
  "businessId": localStorage.getItem("bId") ?? localStorage.getItem("businessId"),
59
+ "subIndustryId": localStorage.getItem("subIndustryId"),
59
60
  "collectionId": collectionIds,
60
61
  "categoryId": categoryIds,
61
62
  "searchText": searchText,
@@ -63,18 +64,47 @@ export class RestService {
63
64
  "maxPrice": maxPrice ?? 0,
64
65
  "sortBy": sortBy,
65
66
  "pageNo": pageNo,
66
- "pageSize": size
67
+ "pageSize": size,
68
+ request: "USER"
67
69
  };
68
- return this.http.put(this.BASE_URL + `ecommerce/product/item/search`, payload);
70
+ return this.http.put(this.BASE_URL + `ecommerce/product/item/search`, payload).pipe(map((response) => {
71
+ return {
72
+ count: response.data.count,
73
+ data: response.data.data?.map((product) => new Product(product))
74
+ };
75
+ }));
69
76
  }
70
77
  getProductByCategoryId(categoryId) {
71
78
  const payload = {
72
- "businessId": localStorage.getItem("bId") ?? localStorage.getItem("businessId"),
79
+ "businessId": "1ef5b91d-b93b-6083-856d-cf26973b5761",
73
80
  "categoryId": [categoryId],
81
+ "subIndustryId": "1eecee93-a389-61f9-b7b5-45f683df8191",
82
+ "pageNo": 0,
83
+ "pageSize": 10,
84
+ request: "USER"
85
+ };
86
+ return this.http.put(this.BASE_URL + `ecommerce/product/item/search`, payload).pipe(map((response) => {
87
+ return {
88
+ count: response.count,
89
+ data: response.data.data?.map((product) => new Product(product))
90
+ };
91
+ }));
92
+ }
93
+ getProductByCollectionId(collectionId) {
94
+ const payload = {
95
+ "businessId": localStorage.getItem("bId") ?? localStorage.getItem("businessId"),
96
+ "collectionId": [collectionId],
97
+ "subIndustryId": localStorage.getItem("subIndustryId"),
74
98
  "pageNo": 0,
75
- "pageSize": 10
99
+ "pageSize": 10,
100
+ request: "USER"
76
101
  };
77
- return this.http.put(this.BASE_URL + `ecommerce/product/item/search`, payload);
102
+ return this.http.put(this.BASE_URL + `ecommerce/product/item/search`, payload).pipe(map((response) => {
103
+ return {
104
+ count: response.count,
105
+ data: response.data.data?.map((product) => new Product(product))
106
+ };
107
+ }));
78
108
  }
79
109
  generateOTP(mobile, countryCode) {
80
110
  const businessId = localStorage.getItem("bId") ?? localStorage.getItem("businessId") ?? "1ef4fe51-6dfc-6199-b966-0f9244067fd0";
@@ -106,8 +136,20 @@ export class RestService {
106
136
  updateProfile(payload) {
107
137
  return this.http.put(this.BASE_URL + `ecommerce/user/update/user`, payload);
108
138
  }
139
+ getUserOrders(payload) {
140
+ return this.http.put(this.BASE_URL + `ecommerce/order/user/order`, payload);
141
+ }
109
142
  toggleItemCartToFav() {
110
143
  }
144
+ moveWishlistToCart() {
145
+ return this.http.get(this.BASE_URL + `ecommerce/update/cart`);
146
+ }
147
+ getUserWishlist(userId) {
148
+ return this.http.get(this.BASE_URL + `ecommerce/order/cart?userId=${userId}&cartType=WISHLIST`);
149
+ }
150
+ moveItemToCart(userId, payload) {
151
+ return this.http.put(this.BASE_URL + `ecommerce/order/update/cart?userId=${userId}`, payload);
152
+ }
111
153
  // Payment
112
154
  createPaymentToken(payload) {
113
155
  return this.http.post(this.BASE_URL + `ecommerce/payment/order`, payload);
@@ -127,4 +169,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImpor
127
169
  providedIn: 'root',
128
170
  }]
129
171
  }], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2.EventsService }] });
130
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzdC5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvc2ltcG8tdWkvc3JjL2xpYi9zZXJ2aWNlcy9yZXN0LnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxFQUFFLFVBQVUsRUFBYSxNQUFNLGVBQWUsQ0FBQztBQUN0RCxPQUFPLEVBQUUsR0FBRyxFQUF3QyxN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jFmOS1iN2I1LTQ1ZjY4M2RmODE5MVwiLFxuICAgICAgICAgICAgXCJwYWdlTm9cIjogMCxcbiAgICAgICAgICAgIFwicGFnZVNpemVcIjogMTAsXG4gICAgICAgICAgICByZXF1ZXN0OiBcIlVTRVJcIlxuICAgICAgICB9XG4gICAgICAgIHJldHVybiB0aGlzLmh0dHAucHV0KHRoaXMuQkFTRV9VUkwgKyBgZWNvbW1lcmNlL3Byb2R1Y3QvaXRlbS9zZWFyY2hgLCBwYXlsb2FkKS5waXBlKG1hcCgocmVzcG9uc2U6IGFueSk9PiB7XG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIGNvdW50OiByZXNwb25zZS5jb3VudCxcbiAgICAgICAgICAgICAgICBkYXRhOiByZXNwb25zZS5kYXRhLmRhdGE/Lm1hcCgocHJvZHVjdDogYW55KT0+IG5ldyBQcm9kdWN0KHByb2R1Y3QpKVxuICAgICAgICAgICAgfVxuICAgICAgICB9KSk7XG4gICAgfVxuICAgIGdldFByb2R1Y3RCeUNvbGxlY3Rpb25JZChjb2xsZWN0aW9uSWQ6IHN0cmluZykge1xuICAgICAgICBjb25zdCBwYXlsb2FkOiBhbnkgPSB7XG4gICAgICAgICAgICBcImJ1c2luZXNzSWRcIjogbG9jYWxTdG9yYWdlLmdldEl0ZW0oXCJiSWRcIikgPz8gbG9jYWxTdG9yYWdlLmdldEl0ZW0oXCJidXNpbmVzc0lkXCIpLFxuICAgICAgICAgICAgXCJjb2xsZWN0aW9uSWRcIjogW2NvbGxlY3Rpb25JZF0sXG4gICAgICAgICAgICBcInN1YkluZHVzdHJ5SWRcIjogbG9jYWxTdG9yYWdlLmdldEl0ZW0oXCJzdWJJbmR1c3RyeUlkXCIpLFxuICAgICAgICAgICAgXCJwYWdlTm9cIjogMCxcbiAgICAgICAgICAgIFwicGFnZVNpemVcIjogMTAsXG4gICAgICAgICAgICByZXF1ZXN0OiBcIlVTRVJcIlxuICAgICAgICB9XG4gICAgICAgIHJld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