@evenicanpm/storefront-core 1.0.5 → 1.1.0

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 (307) hide show
  1. package/.storybook/main.ts +37 -0
  2. package/.storybook/preview.ts +14 -0
  3. package/README.md +17 -2
  4. package/__mocks__/next-font.js +4 -0
  5. package/package.json +19 -13
  6. package/src/api-manager/datasources/e4/graphqlRequestSdk.ts +265 -5
  7. package/src/api-manager/schemas/product.schema.ts +2 -2
  8. package/src/api-manager/services/cart/mutations/add-discount-code.ts +11 -0
  9. package/src/api-manager/services/cart/mutations/checkout.ts +1 -1
  10. package/src/api-manager/services/create-query.ts +11 -4
  11. package/src/api-manager/services/product/queries/get-product-availability.ts +1 -2
  12. package/src/api-manager/services/user/mutations/add-to-wishlist.ts +2 -2
  13. package/src/api-manager/services/user/mutations/copy-cart-to-wishlist.ts +2 -1
  14. package/src/api-manager/services/user/mutations/remove-from-wishlist.ts +4 -4
  15. package/src/api-manager/services/user/mutations/update-wishlist.ts +2 -1
  16. package/src/api-manager/services/user/queries/get-wishlist-details.ts +2 -2
  17. package/src/cms/blocks/components/product-carousel/index.tsx +6 -3
  18. package/src/cms/blocks/components/product-section-fullwidth/index.tsx +2 -2
  19. package/src/cms/blocks/components/shared/product-grid.tsx +5 -2
  20. package/src/cms/interfaces/navigation.ts +9 -9
  21. package/src/components/Blocks/Components/CategoryCarousel/index.tsx +3 -3
  22. package/src/components/Blocks/Components/HeroCarousel/index.tsx +2 -2
  23. package/src/components/Blocks/Components/ProductCarousel/index.tsx +5 -5
  24. package/src/components/Blocks/Components/ProductSectionFullWidth/index.tsx +6 -6
  25. package/src/components/Blocks/Components/Services/service-card.tsx +4 -1
  26. package/src/components/Blocks/Components/shared/featured-product-card.tsx +2 -2
  27. package/src/components/Blocks/Components/shared/product-category-item.tsx +3 -3
  28. package/src/components/Blocks/Components/shared/product-grid.tsx +2 -2
  29. package/src/components/Blocks/Components/shared/top-categories-card.tsx +1 -1
  30. package/src/components/Blocks/Components/shared/top-rating-product-card.tsx +6 -3
  31. package/src/components/Footer/sections/FooterAppStore.tsx +1 -1
  32. package/src/components/Footer/sections/FooterContact.tsx +1 -1
  33. package/src/components/Footer/sections/FooterLogo.tsx +2 -2
  34. package/src/components/Footer/sections/FooterSocialLinks.tsx +1 -1
  35. package/src/components/_components/MiniCartClient.tsx +2 -2
  36. package/src/components/_components/accordion/accordion-header.tsx +1 -1
  37. package/src/components/_components/carousel-cards/carousel-card-1/carousel-card-1.tsx +2 -2
  38. package/src/components/_components/carousel-cards/carousel-card-2/carousel-card-2.tsx +9 -4
  39. package/src/components/_components/carousel-cards/carousel-card-3/carousel-card-3.tsx +6 -3
  40. package/src/components/_components/carousel-cards/carousel-card-4/carousel-card-4.tsx +6 -1
  41. package/src/components/_components/categories/category-list/category-list.tsx +3 -3
  42. package/src/components/_components/categories/mega-menu/banner.tsx +7 -3
  43. package/src/components/_components/categories/mega-menu/column-list.tsx +3 -3
  44. package/src/components/_components/categories/mega-menu/mega-menu-1.tsx +2 -2
  45. package/src/components/_components/category-cards/category-card-1/category-card-1.tsx +2 -2
  46. package/src/components/_components/countdown/count-box.tsx +4 -1
  47. package/src/components/_components/countdown/count-down.tsx +1 -1
  48. package/src/components/_components/data-table/table-header.tsx +1 -1
  49. package/src/components/_components/footer/components/app-store.tsx +1 -1
  50. package/src/components/_components/footer/components/logo.tsx +2 -2
  51. package/src/components/_components/footer/components/social-links.tsx +1 -1
  52. package/src/components/_components/footer/footer-1.tsx +1 -1
  53. package/src/components/_components/footer/footer-2.tsx +2 -2
  54. package/src/components/_components/footer/footer-3.tsx +2 -2
  55. package/src/components/_components/footer/footer-4.tsx +3 -3
  56. package/src/components/_components/header/components/categories-menu.tsx +3 -3
  57. package/src/components/_components/header/components/mobile-header.tsx +9 -6
  58. package/src/components/_components/header/components/user.tsx +5 -5
  59. package/src/components/_components/header/header.tsx +2 -2
  60. package/src/components/_components/header/sticky-header.tsx +3 -3
  61. package/src/components/_components/mini-cart/components/cart-item.tsx +5 -2
  62. package/src/components/_components/mini-cart/components/empty-view.tsx +2 -2
  63. package/src/components/_components/mini-cart/components/top-header.tsx +5 -2
  64. package/src/components/_components/mini-cart/mini-cart.tsx +3 -3
  65. package/src/components/_components/mobile-navigation/mobile-navigation-bar.tsx +5 -5
  66. package/src/components/_components/nav-link/nav-link-2.tsx +1 -1
  67. package/src/components/_components/nav-link/nav-link-3.tsx +1 -1
  68. package/src/components/_components/navbar/categories.tsx +3 -3
  69. package/src/components/_components/navbar/category-based-menu/category-based-menu.tsx +1 -1
  70. package/src/components/_components/navbar/category-based-menu/components/child-categories.tsx +2 -2
  71. package/src/components/_components/navbar/mega-menu/category-list.tsx +1 -1
  72. package/src/components/_components/navbar/mega-menu/mega-menu.tsx +1 -1
  73. package/src/components/_components/navbar/mobile-menu/mobile-menu.tsx +2 -2
  74. package/src/components/_components/navbar/mobile-menu/render-levels.tsx +3 -3
  75. package/src/components/_components/navbar/nav-list/nav-item-child.tsx +3 -3
  76. package/src/components/_components/navbar/nav-list/nav-list.tsx +4 -4
  77. package/src/components/_components/newsletter/newsletter.tsx +5 -1
  78. package/src/components/_components/newsletter/social-icons.tsx +1 -1
  79. package/src/components/_components/page-sidenav/grocery-side-nav/components/link-item.tsx +2 -2
  80. package/src/components/_components/page-sidenav/grocery-side-nav/components/list-item.tsx +2 -2
  81. package/src/components/_components/page-sidenav/grocery-side-nav/components/nav-accordion.tsx +2 -2
  82. package/src/components/_components/page-sidenav/grocery-side-nav/grocery-side-nav.tsx +3 -3
  83. package/src/components/_components/page-sidenav/health-beauty-side-nav/components/list-item.tsx +2 -2
  84. package/src/components/_components/page-sidenav/health-beauty-side-nav/components/nav-accordion.tsx +2 -2
  85. package/src/components/_components/page-sidenav/health-beauty-side-nav/components/render-child.tsx +2 -2
  86. package/src/components/_components/page-sidenav/health-beauty-side-nav/health-beauty-side-nav.tsx +5 -5
  87. package/src/components/_components/page-sidenav/side-navbar/components/list-item.tsx +1 -1
  88. package/src/components/_components/page-sidenav/side-navbar/components/nav-accordion.tsx +3 -3
  89. package/src/components/_components/page-sidenav/side-navbar/components/render-child.tsx +1 -1
  90. package/src/components/_components/page-sidenav/side-navbar/side-nav-bar.tsx +4 -4
  91. package/src/components/_components/page-sidenav/side-navbar-2/components/sidebar-accordion.tsx +1 -1
  92. package/src/components/_components/page-sidenav/side-navbar-2/side-navbar-2.tsx +2 -2
  93. package/src/components/_components/product-cards/product-card-1/components/quantity-buttons.tsx +2 -2
  94. package/src/components/_components/product-cards/product-card-1/product-card.tsx +2 -2
  95. package/src/components/_components/product-cards/product-card-10/product-card.tsx +9 -5
  96. package/src/components/_components/product-cards/product-card-11/product-card.tsx +6 -3
  97. package/src/components/_components/product-cards/product-card-12/product-card.tsx +4 -4
  98. package/src/components/_components/product-cards/product-card-13/product-card.tsx +6 -3
  99. package/src/components/_components/product-cards/product-card-14/product-card.tsx +7 -4
  100. package/src/components/_components/product-cards/product-card-15/product-card.tsx +6 -3
  101. package/src/components/_components/product-cards/product-card-16/components/quantity-buttons.tsx +2 -2
  102. package/src/components/_components/product-cards/product-card-16/product-card.tsx +5 -2
  103. package/src/components/_components/product-cards/product-card-2/components/product-price.tsx +2 -2
  104. package/src/components/_components/product-cards/product-card-2/product-card.tsx +4 -4
  105. package/src/components/_components/product-cards/product-card-3/components/hover-actions.tsx +1 -1
  106. package/src/components/_components/product-cards/product-card-3/product-card.tsx +2 -2
  107. package/src/components/_components/product-cards/product-card-4/components/hover-actions.tsx +1 -1
  108. package/src/components/_components/product-cards/product-card-4/product-card.tsx +2 -2
  109. package/src/components/_components/product-cards/product-card-5/components/hover-actions.tsx +1 -1
  110. package/src/components/_components/product-cards/product-card-5/product-card.tsx +2 -2
  111. package/src/components/_components/product-cards/product-card-6/components/hover-actions.tsx +1 -1
  112. package/src/components/_components/product-cards/product-card-6/product-card.tsx +3 -3
  113. package/src/components/_components/product-cards/product-card-7/components/quantity-buttons.tsx +2 -2
  114. package/src/components/_components/product-cards/product-card-7/product-card.tsx +5 -2
  115. package/src/components/_components/product-cards/product-card-8/product-card.tsx +9 -5
  116. package/src/components/_components/product-cards/product-card-9/components/add-to-cart.tsx +5 -2
  117. package/src/components/_components/product-cards/product-card-9/product-card.tsx +1 -1
  118. package/src/components/_components/product-cards/product-price.tsx +2 -2
  119. package/src/components/_components/product-cards/product-rating.tsx +2 -2
  120. package/src/components/_components/product-cards/product-title.tsx +1 -1
  121. package/src/components/_components/product-cards/use-product.ts +1 -1
  122. package/src/components/_components/product-dimensions/product-dimensions.tsx +1 -1
  123. package/src/components/_components/product-quantity-buttons/product-quantity-buttons.tsx +2 -2
  124. package/src/components/_components/products-view/products-grid-view.tsx +2 -2
  125. package/src/components/_components/products-view/products-list-view.tsx +2 -2
  126. package/src/components/_components/search-box/components/category-dropdown.tsx +1 -1
  127. package/src/components/_components/search-box/components/search-result.tsx +1 -1
  128. package/src/components/_components/search-box/hooks/use-search.ts +1 -1
  129. package/src/components/_components/search-box/search-input-category.tsx +3 -3
  130. package/src/components/_components/service-cards/service-card-1/service-card-1.tsx +5 -2
  131. package/src/components/_components/service-cards/service-card-2/service-card-2.tsx +5 -2
  132. package/src/components/_components/service-cards/service-card-3/service-card-3.tsx +4 -1
  133. package/src/components/_components/settings/setting.tsx +3 -3
  134. package/src/components/_components/side-nav/side-nav.tsx +1 -1
  135. package/src/components/_components/stories/story-content/story-content.tsx +1 -1
  136. package/src/components/_components/stories/story-item/story-item.tsx +1 -1
  137. package/src/components/_components/topbar/top-bar.tsx +6 -3
  138. package/src/components/_components/wishlist-modal/wishlist-modal-item.tsx +1 -1
  139. package/src/components-v2/accordion/accordion-header.stories.tsx +28 -0
  140. package/src/components-v2/categories/category-list/category-list.tsx +2 -2
  141. package/src/components-v2/categories/category-list/styles.ts +3 -2
  142. package/src/components-v2/categories/mega-menu/column-list.tsx +1 -1
  143. package/src/components-v2/categories/mega-menu/mega-menu-1.tsx +6 -3
  144. package/src/components-v2/categories/mega-menu/mega-menu-2.tsx +2 -2
  145. package/src/components-v2/header/__tests__/user.test.tsx +12 -12
  146. package/src/components-v2/header/components/user.tsx +12 -11
  147. package/src/components-v2/mini-cart/mini-cart.tsx +9 -14
  148. package/src/components-v2/mobile-navigation/mobile-navigation-bar.tsx +1 -1
  149. package/src/components-v2/navbar/mobile-menu/mobile-menu.tsx +2 -2
  150. package/src/components-v2/product-cards/favorite-button.tsx +52 -0
  151. package/src/components-v2/product-cards/product-card/product-card.tsx +87 -47
  152. package/src/components-v2/product-cards/product-card-plp/product-card.tsx +140 -51
  153. package/src/components-v2/product-cards/product-card-plp/styles/index.ts +17 -0
  154. package/src/components-v2/product-cards/product-card-plp-list/product-card.tsx +76 -42
  155. package/src/components-v2/product-cards/product-card-search/product-card.tsx +50 -21
  156. package/src/components-v2/product-cards/product-card-search/styles/index.ts +0 -10
  157. package/src/components-v2/product-dialog/compound/product-dialog.tsx +39 -15
  158. package/src/components-v2/product-quantity-buttons/compound/quantity-buttons-root.tsx +22 -7
  159. package/src/components-v2/product-quantity-variants/index.tsx +1 -1
  160. package/src/components-v2/products-view/compound/context.ts +46 -1
  161. package/src/components-v2/products-view/compound/products-grid-view.tsx +23 -14
  162. package/src/components-v2/products-view/compound/products-list-view.tsx +12 -3
  163. package/src/components-v2/search-bar/compound/context.ts +24 -3
  164. package/src/components-v2/search-bar/compound/results-item-lg.tsx +14 -13
  165. package/src/components-v2/search-bar/compound/results-item-sm.tsx +5 -5
  166. package/src/components-v2/search-bar/compound/results-suspense.tsx +3 -3
  167. package/src/components-v2/search-bar/compound/results.tsx +4 -4
  168. package/src/components-v2/search-bar/compound/textfield-adornment-category.tsx +1 -1
  169. package/src/components-v2/search-bar/compound/textfield.tsx +3 -3
  170. package/src/components-v2/search-bar/hooks/use-click-outside.ts +1 -1
  171. package/src/components-v2/wishlist-dialogs/add-to-wishlist/add-to-wishlist-button.tsx +2 -6
  172. package/src/components-v2/wishlist-dialogs/add-to-wishlist/compound/add-to-wishlist-bottom-ui.tsx +6 -1
  173. package/src/components-v2/wishlist-dialogs/add-to-wishlist/compound/add-to-wishlist-dialog.tsx +22 -15
  174. package/src/components-v2/wishlist-dialogs/add-to-wishlist/compound/add-to-wishlist-list.tsx +8 -7
  175. package/src/components-v2/wishlist-dialogs/add-to-wishlist/compound/context.ts +8 -8
  176. package/src/components-v2/wishlist-dialogs/add-to-wishlist/compound/wishlist-dialog-item.tsx +29 -19
  177. package/src/components-v2/wishlist-dialogs/add-to-wishlist/hooks/use-add-to-wishlist.ts +27 -77
  178. package/src/components-v2/wishlist-dialogs/add-to-wishlist/index.tsx +1 -9
  179. package/src/components-v2/wishlist-dialogs/create-wishlist/compound/create-wishlist-bottom-ui.tsx +7 -2
  180. package/src/components-v2/wishlist-dialogs/create-wishlist/compound/create-wishlist-dialog.tsx +20 -12
  181. package/src/components-v2/wishlist-dialogs/create-wishlist/compound/create-wishlist-form.tsx +25 -5
  182. package/src/hooks/use-cart.ts +11 -14
  183. package/src/hooks/use-favorite.ts +17 -0
  184. package/src/hooks/use-variants.ts +4 -3
  185. package/src/pages/account/addresses/address-item.tsx +1 -1
  186. package/src/pages/account/dashboard-header.tsx +3 -3
  187. package/src/pages/account/navigation.tsx +5 -2
  188. package/src/pages/account/no-records.tsx +1 -1
  189. package/src/pages/account/orders/order-progress.tsx +5 -2
  190. package/src/pages/account/orders/order-row.tsx +4 -1
  191. package/src/pages/account/orders/order-summary.tsx +6 -2
  192. package/src/pages/account/orders/ordered-products.tsx +9 -2
  193. package/src/pages/account/profile/user-info.tsx +5 -2
  194. package/src/pages/account/wishlist/create-new-list.tsx +1 -1
  195. package/src/pages/account/wishlist/wishlist-item.tsx +2 -2
  196. package/src/pages/checkout/checkout-alt-form/address-card.tsx +5 -2
  197. package/src/pages/checkout/checkout-alt-form/checkout-step.tsx +3 -3
  198. package/src/pages/checkout/checkout-alt-form/customer-information.tsx +1 -1
  199. package/src/pages/checkout/checkout-alt-form/delivery-address.tsx +5 -1
  200. package/src/pages/checkout/checkout-alt-form/delivery-options.tsx +6 -2
  201. package/src/pages/checkout/checkout-alt-form/edit-address-form.tsx +1 -1
  202. package/src/pages/checkout/checkout-alt-form/heading.tsx +2 -2
  203. package/src/pages/checkout/checkout-alt-form/new-address-form.tsx +9 -4
  204. package/src/pages/checkout/checkout-alt-form/payment-details.tsx +6 -3
  205. package/src/pages/checkout/checkout-alt-summary/cart-item.tsx +5 -2
  206. package/src/pages/checkout/checkout-alt-summary/checkout-alt-summary.tsx +4 -2
  207. package/src/pages/checkout/checkout-alt-summary/list-item.tsx +2 -2
  208. package/src/pages/confirmation/address.tsx +4 -1
  209. package/src/pages/confirmation/confirmation-summary.tsx +6 -3
  210. package/src/pages/confirmation/ordered-products.tsx +9 -2
  211. package/src/pages/product-details/available-shops.tsx +5 -2
  212. package/src/pages/product-details/bopis/find-in-store-modal.tsx +1 -1
  213. package/src/pages/product-details/bopis/pickup-option-select.tsx +1 -1
  214. package/src/pages/product-details/frequently-bought.tsx +9 -2
  215. package/src/pages/product-details/frequently-product-card.tsx +8 -5
  216. package/src/pages/product-details/product-comment.tsx +7 -2
  217. package/src/pages/product-details/product-description.tsx +1 -1
  218. package/src/pages/product-details/product-filter-card.tsx +11 -3
  219. package/src/pages/product-details/product-intro/product-intro-images.tsx +4 -1
  220. package/src/pages/product-details/product-intro/product-intro.tsx +8 -5
  221. package/src/pages/product-details/product-review.tsx +5 -2
  222. package/src/pages/product-details/related-products.tsx +2 -2
  223. package/src/pages/product-list/facet-group.tsx +1 -1
  224. package/src/pages/product-list/list-filter.tsx +5 -2
  225. package/src/pages/product-list/pagination.tsx +1 -1
  226. package/src/pages/product-list/quick-view-dialog-content.tsx +2 -2
  227. package/src/pages/product-list/selected-facets.tsx +1 -1
  228. package/src/pages/quickorder/order-upload.tsx +1 -1
  229. package/src/pages/quickorder/quick-order-form.tsx +6 -3
  230. package/src/pages/quickorder/quick-order-row.tsx +1 -1
  231. package/src/pages-v2/account/account-navigation.tsx +1 -1
  232. package/src/pages-v2/account/orders/order-summary.tsx +5 -2
  233. package/src/pages-v2/account/profile/user-info.tsx +6 -3
  234. package/src/pages-v2/account/wishlist/wishlist-item.tsx +1 -1
  235. package/src/pages-v2/cart/__tests__/checkout-form.test.tsx +1 -1
  236. package/src/pages-v2/cart/estimate-shipping.tsx +3 -0
  237. package/src/pages-v2/checkout/checkout-alt-form/checkout-step.tsx +4 -4
  238. package/src/pages-v2/checkout/checkout-alt-form/steps/address/address-card.tsx +1 -1
  239. package/src/pages-v2/checkout/checkout-alt-form/steps/address/delivery-address.tsx +12 -5
  240. package/src/pages-v2/checkout/checkout-alt-form/steps/address/new-address-form.tsx +27 -5
  241. package/src/pages-v2/checkout/checkout-alt-form/steps/address/styles.ts +2 -1
  242. package/src/pages-v2/checkout/checkout-alt-form/steps/customer-info/customer-information.tsx +27 -7
  243. package/src/pages-v2/checkout/checkout-alt-form/steps/shipping/delivery-options.tsx +8 -1
  244. package/src/pages-v2/confirmation/address.tsx +5 -1
  245. package/src/pages-v2/product-details/available-shops.tsx +4 -1
  246. package/src/pages-v2/product-details/bopis/find-in-store-button.tsx +1 -1
  247. package/src/pages-v2/product-details/bopis/find-in-store-modal.tsx +3 -5
  248. package/src/pages-v2/product-details/product-intro/compound/context.ts +69 -12
  249. package/src/pages-v2/product-details/product-intro/compound/product-info.tsx +73 -27
  250. package/src/pages-v2/product-details/product-intro/compound/product-intro-images.tsx +19 -6
  251. package/src/pages-v2/product-details/product-intro/utils.ts +2 -2
  252. package/src/pages-v2/product-details/product-tabs.tsx +19 -4
  253. package/src/pages-v2/product-details/related-products.tsx +3 -3
  254. package/src/pages-v2/quickorder/context.ts +2 -2
  255. package/src/pages-v2/quickorder/order-upload.tsx +6 -2
  256. package/src/pages-v2/quickorder/provider.tsx +24 -9
  257. package/src/pages-v2/quickorder/quick-order-actions.tsx +2 -2
  258. package/src/pages-v2/quickorder/quick-order-header.tsx +6 -3
  259. package/src/pages-v2/quickorder/quick-order-row.tsx +1 -1
  260. package/src/pages-v2/quickorder/quick-order-table.tsx +10 -4
  261. package/src/pages-v2/quickorder/quick-order-upload.tsx +2 -2
  262. package/src/stories/Button.stories.ts +54 -0
  263. package/src/stories/Button.tsx +35 -0
  264. package/src/stories/Configure.mdx +364 -0
  265. package/src/stories/Header.stories.ts +34 -0
  266. package/src/stories/Header.tsx +54 -0
  267. package/src/stories/Page.stories.ts +33 -0
  268. package/src/stories/Page.tsx +73 -0
  269. package/src/stories/assets/accessibility.png +0 -0
  270. package/src/stories/assets/accessibility.svg +1 -0
  271. package/src/stories/assets/addon-library.png +0 -0
  272. package/src/stories/assets/assets.png +0 -0
  273. package/src/stories/assets/avif-test-image.avif +0 -0
  274. package/src/stories/assets/context.png +0 -0
  275. package/src/stories/assets/discord.svg +1 -0
  276. package/src/stories/assets/docs.png +0 -0
  277. package/src/stories/assets/figma-plugin.png +0 -0
  278. package/src/stories/assets/github.svg +1 -0
  279. package/src/stories/assets/share.png +0 -0
  280. package/src/stories/assets/styling.png +0 -0
  281. package/src/stories/assets/testing.png +0 -0
  282. package/src/stories/assets/theming.png +0 -0
  283. package/src/stories/assets/tutorials.svg +1 -0
  284. package/src/stories/assets/youtube.svg +1 -0
  285. package/src/stories/button.css +30 -0
  286. package/src/stories/header.css +32 -0
  287. package/src/stories/page.css +68 -0
  288. package/src/theme/build-mui-theme.ts +104 -0
  289. package/src/theme/components.ts +163 -0
  290. package/src/theme/emotion-cache.tsx +101 -0
  291. package/src/theme/theme-colors.ts +205 -0
  292. package/src/theme/theme-options-sample.ts +69 -0
  293. package/src/theme/theme-options.ts +172 -0
  294. package/src/theme/theme-provider.tsx +44 -0
  295. package/src/theme/typography.ts +22 -0
  296. package/src/theme/utils.ts +17 -0
  297. package/tsconfig.json +3 -1
  298. package/src/api-manager/lib/cart-cookie-handler.ts +0 -14
  299. package/src/components-v2/product-cards/product-card/components/hover-actions.tsx +0 -37
  300. package/src/components-v2/product-cards/product-card-plp/components/quantity-buttons.tsx +0 -54
  301. package/src/components-v2/product-cards/product-card-plp-list/components/add-to-cart.tsx +0 -63
  302. package/src/components-v2/product-cards/product-card-plp-list/components/favorite-button.tsx +0 -27
  303. package/src/components-v2/product-cards/use-product.ts +0 -35
  304. package/src/components-v2/products-view/products-grid-view.tsx +0 -65
  305. package/src/components-v2/products-view/products-list-view.tsx +0 -66
  306. package/src/components-v2/wishlist-dialogs/create-wishlist/compound/context.ts +0 -2
  307. /package/src/components-v2/product-cards/{product-card/components/quantity-buttons.tsx → quantity-buttons.tsx} +0 -0
@@ -0,0 +1,37 @@
1
+ import type { StorybookConfig } from "@storybook/react-webpack5";
2
+
3
+ import { resolve, join, dirname } from "path";
4
+
5
+ /**
6
+ * This function is used to resolve the absolute path of a package.
7
+ * It is needed in projects that use Yarn PnP or are set up within a monorepo.
8
+ */
9
+ function getAbsolutePath(value: string): any {
10
+ return dirname(require.resolve(join(value, "package.json")));
11
+ }
12
+ const config: StorybookConfig = {
13
+ stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
14
+ addons: [
15
+ getAbsolutePath("@storybook/addon-webpack5-compiler-swc"),
16
+ getAbsolutePath("@storybook/addon-docs"),
17
+ ],
18
+ framework: {
19
+ name: getAbsolutePath("@storybook/react-webpack5"),
20
+ options: {},
21
+ },
22
+ webpackFinal: (config) => {
23
+ // fallback to storefront node_modules
24
+ // TODO: make this configurable to inject the consuming app directory
25
+ config.resolve = config.resolve || {};
26
+ config.resolve.alias = {
27
+ ...config.resolve.alias,
28
+ "next/font/google": resolve(__dirname, "../__mocks__/next-font.js"),
29
+ };
30
+ config.resolve.modules = [
31
+ ...(config.resolve.modules || ["node_modules"]),
32
+ resolve(__dirname, "../../../../../storefront/", "node_modules"),
33
+ ];
34
+ return config;
35
+ },
36
+ };
37
+ export default config;
@@ -0,0 +1,14 @@
1
+ import type { Preview } from '@storybook/react-webpack5'
2
+
3
+ const preview: Preview = {
4
+ parameters: {
5
+ controls: {
6
+ matchers: {
7
+ color: /(background|color)$/i,
8
+ date: /Date$/i,
9
+ },
10
+ },
11
+ },
12
+ };
13
+
14
+ export default preview;
package/README.md CHANGED
@@ -23,11 +23,26 @@
23
23
  - during product dev this package is installed via local file url (symlink)
24
24
  - this means this packages dependencies are NOT installed, everything should be a peerDep
25
25
  and then added to the storefront package.json as a dependency
26
- - there is a step in the `init.sh` script that will symlink the storefront node_modules to
27
- the top-level of client packages - this ensures that the same versions of packages are used
26
+ - **2025-09-16 (REVISED)**
27
+ - ~there is a step in the `init.sh` script that will symlink the storefront node_modules to
28
+ the top-level of client packages - this ensures that the same versions of packages are used~
29
+ - We are not symlinking the node_modules anymore because we need to install `storybook` within storefront-core
30
+ - the new solution is to use `preserveSymlinks` inside storefront webpack, vitest and tsconfigs for runtime module resolution
31
+ and use a catchall alias inside the `storefront-core/tsconfig` to point module imports to the storefront node_modules
28
32
  - this is required for packages such as `@tanstack/react-query` that require the same package
29
33
  location to be used across the entire codebase
30
34
 
35
+ ## StoryBook
36
+
37
+ ### 2025-09-16 Storybook Tsconfig
38
+
39
+ - storefront-core/tsconfig.json has catchall alias to storefront/node_modules to point TSC compiler to the storefronts node_modules (package identity mismatch solution)
40
+ - this catchall alias breaks vite for storybook
41
+ - if product developers want to run storybook locally they must delete the catchall `*` path alias from the tsconfig, do not commit these changes and revert when finished
42
+ using storybook
43
+ - this is because the storybook-manager (UI) uses esbuild under the hood and does not provide configuration for bypassing/changing tsconfig path
44
+ - there is configuration for vite, but this will not be respected by the manager in `npm run storybook` process, it uses it's own internal configuration
45
+
31
46
  ## Misc
32
47
 
33
48
  - if at some point we want to start installing packages in this repo we will have to run an npm
@@ -0,0 +1,4 @@
1
+ export const Open_Sans = () => ({
2
+ className: "font-open-sans",
3
+ style: { fontFamily: "Open Sans, sans-serif" },
4
+ });
package/package.json CHANGED
@@ -1,10 +1,13 @@
1
1
  {
2
2
  "name": "@evenicanpm/storefront-core",
3
- "version": "1.0.5",
3
+ "version": "1.1.0",
4
4
  "description": "Core module for D365/e4 Headless Storefront",
5
+ "type": "module",
5
6
  "scripts": {
6
7
  "test": "echo \"Error: no test specified\" && exit 1",
7
- "docs": "typedoc"
8
+ "docs": "typedoc",
9
+ "storybook": "storybook dev -p 6006",
10
+ "build-storybook": "storybook build"
8
11
  },
9
12
  "exports": {
10
13
  ".": "./index.js",
@@ -13,26 +16,29 @@
13
16
  "author": "Evenica",
14
17
  "license": "ISC",
15
18
  "devDependencies": {
16
- "@strapi/blocks-react-renderer": "^1.0.1",
19
+ "@storybook/addon-docs": "^9.1.6",
20
+ "@storybook/addon-webpack5-compiler-swc": "^4.0.1",
21
+ "@storybook/react-webpack5": "^9.1.6",
17
22
  "@types/jsonwebtoken": "^9.0.9",
18
23
  "@types/lodash": "^4.17.17",
19
24
  "@types/node": "^22.15.20",
20
- "@types/object-mapper": "^6.2.2"
25
+ "@types/object-mapper": "^6.2.2",
26
+ "storybook": "^9.1.6"
21
27
  },
22
28
  "peerDependencies": {
23
- "@tanstack/react-query": "^5.76.1",
24
- "next": "^15.2.1",
25
- "next-auth": "^4.24.11",
26
- "object-mapper": "^6.2.0",
27
- "typescript": "^5.8.3",
28
- "typedoc": "^0.28.9",
29
29
  "@msdyn365-commerce/retail-proxy": "9.50",
30
+ "@tanstack/react-query": "^5.76.1",
30
31
  "graphql": "^16.11.0",
31
32
  "graphql-request": "^7.1.2",
32
33
  "jsonwebtoken": "^9.0.2",
33
34
  "lodash": "^4.17.21",
35
+ "next": "^15.2.1",
36
+ "next-auth": "^4.24.11",
34
37
  "object-mapper": "^6.2.0",
35
- "zod": "^3.25.25",
36
- "typedoc-plugin-merge-module": "^7.0.0"
37
- }
38
+ "typedoc": "^0.28.9",
39
+ "typedoc-plugin-merge-module": "^7.0.0",
40
+ "typescript": "^5.8.3",
41
+ "zod": "^3.25.25"
42
+ },
43
+ "gitHead": "0c9180f24435b0361dfc05ccba4a1f0e7ad19a7a"
38
44
  }
@@ -1551,8 +1551,8 @@ export type DateRange = {
1551
1551
  };
1552
1552
 
1553
1553
  export type DateRangeInput = {
1554
- endDate: Scalars['DateTime']['input'];
1555
- startDate: Scalars['DateTime']['input'];
1554
+ endDate?: InputMaybe<Scalars['DateTime']['input']>;
1555
+ startDate?: InputMaybe<Scalars['DateTime']['input']>;
1556
1556
  };
1557
1557
 
1558
1558
  /**
@@ -4351,6 +4351,13 @@ export type Node = {
4351
4351
  modifiedBy?: Maybe<Contact>;
4352
4352
  };
4353
4353
 
4354
+ export type NonScheduledProcessConnection = {
4355
+ __typename?: 'NonScheduledProcessConnection';
4356
+ nodes?: Maybe<Array<Maybe<Process>>>;
4357
+ pageInfo: PageInfo;
4358
+ recordCount?: Maybe<Scalars['Int']['output']>;
4359
+ };
4360
+
4354
4361
  export type Notification = Node & {
4355
4362
  __typename?: 'Notification';
4356
4363
  body: Scalars['String']['output'];
@@ -4716,6 +4723,24 @@ export type PageInfo = {
4716
4723
  top?: Maybe<Scalars['Int']['output']>;
4717
4724
  };
4718
4725
 
4726
+ /** Extended PageInfo type that includes integrationTags, for ProcessConnection */
4727
+ export type PageInfoProcess = {
4728
+ __typename?: 'PageInfoProcess';
4729
+ currentPage: Scalars['Int']['output'];
4730
+ endCursor: Scalars['String']['output'];
4731
+ hasNextPage: Scalars['Boolean']['output'];
4732
+ hasPreviousPage: Scalars['Boolean']['output'];
4733
+ integrationTags?: Maybe<Array<Maybe<Scalars['String']['output']>>>;
4734
+ pages: Array<Page>;
4735
+ resultsReturned: Scalars['Int']['output'];
4736
+ search?: Maybe<Scalars['String']['output']>;
4737
+ skip?: Maybe<Scalars['Int']['output']>;
4738
+ sort?: Maybe<Scalars['String']['output']>;
4739
+ sortDesc?: Maybe<Scalars['Boolean']['output']>;
4740
+ startCursor: Scalars['String']['output'];
4741
+ top?: Maybe<Scalars['Int']['output']>;
4742
+ };
4743
+
4719
4744
  /** Extended PageInfo type that includes executionStatusIds and dateRange, for ProcessExecutionConnection */
4720
4745
  export type PageInfoProcessExecution = {
4721
4746
  __typename?: 'PageInfoProcessExecution';
@@ -4735,6 +4760,23 @@ export type PageInfoProcessExecution = {
4735
4760
  top?: Maybe<Scalars['Int']['output']>;
4736
4761
  };
4737
4762
 
4763
+ export type PageInfoScheduledProcess = {
4764
+ __typename?: 'PageInfoScheduledProcess';
4765
+ currentPage: Scalars['Int']['output'];
4766
+ daysOfTheWeek?: Maybe<Array<Maybe<Scalars['String']['output']>>>;
4767
+ endCursor: Scalars['String']['output'];
4768
+ hasNextPage: Scalars['Boolean']['output'];
4769
+ hasPreviousPage: Scalars['Boolean']['output'];
4770
+ pages: Array<Page>;
4771
+ resultsReturned: Scalars['Int']['output'];
4772
+ search?: Maybe<Scalars['String']['output']>;
4773
+ skip?: Maybe<Scalars['Int']['output']>;
4774
+ sort?: Maybe<Scalars['String']['output']>;
4775
+ sortDesc?: Maybe<Scalars['Boolean']['output']>;
4776
+ startCursor: Scalars['String']['output'];
4777
+ top?: Maybe<Scalars['Int']['output']>;
4778
+ };
4779
+
4738
4780
  export type PaginationSettings = {
4739
4781
  __typename?: 'PaginationSettings';
4740
4782
  resultsPerPage?: Maybe<Scalars['String']['output']>;
@@ -4997,6 +5039,7 @@ export type Process = {
4997
5039
  created: Scalars['DateTime']['output'];
4998
5040
  extendedFields?: Maybe<Scalars['JSON']['output']>;
4999
5041
  id: Scalars['ID']['output'];
5042
+ isTriggered?: Maybe<Scalars['Int']['output']>;
5000
5043
  maxConcurrentExecutions?: Maybe<Scalars['Int']['output']>;
5001
5044
  maxRetryAttempts: Scalars['Int']['output'];
5002
5045
  modified: Scalars['DateTime']['output'];
@@ -5004,6 +5047,9 @@ export type Process = {
5004
5047
  nextExecutionDate?: Maybe<Scalars['DateTime']['output']>;
5005
5048
  orchestratorInstanceId?: Maybe<Scalars['ID']['output']>;
5006
5049
  previousExecutionDate?: Maybe<Scalars['DateTime']['output']>;
5050
+ processIcon?: Maybe<Scalars['String']['output']>;
5051
+ processScheduleGroup?: Maybe<ProcessScheduleGroup>;
5052
+ sort?: Maybe<Scalars['Int']['output']>;
5007
5053
  timeout?: Maybe<Scalars['Int']['output']>;
5008
5054
  };
5009
5055
 
@@ -5011,7 +5057,7 @@ export type ProcessConnection = {
5011
5057
  __typename?: 'ProcessConnection';
5012
5058
  edges: Array<ProcessEdge>;
5013
5059
  nodes?: Maybe<Array<Maybe<Process>>>;
5014
- pageInfo: PageInfo;
5060
+ pageInfo: PageInfoProcess;
5015
5061
  recordCount?: Maybe<Scalars['Int']['output']>;
5016
5062
  };
5017
5063
 
@@ -5021,10 +5067,14 @@ export type ProcessCreate = {
5021
5067
  code?: InputMaybe<Scalars['String']['input']>;
5022
5068
  /** New entry uses this ID. If omitted, generates a random ID. Make sure the ID is not in use already! */
5023
5069
  id?: InputMaybe<Scalars['ID']['input']>;
5070
+ isTriggered?: InputMaybe<Scalars['Int']['input']>;
5024
5071
  maxConcurrentExecutions?: InputMaybe<Scalars['Int']['input']>;
5025
5072
  maxRetryAttempts?: InputMaybe<Scalars['Int']['input']>;
5026
5073
  name?: InputMaybe<Scalars['String']['input']>;
5027
5074
  orchestratorInstanceId?: InputMaybe<Scalars['ID']['input']>;
5075
+ processIcon?: InputMaybe<Scalars['String']['input']>;
5076
+ processScheduleGroupId?: InputMaybe<Scalars['ID']['input']>;
5077
+ sort?: InputMaybe<Scalars['Int']['input']>;
5028
5078
  };
5029
5079
 
5030
5080
  export type ProcessEdge = {
@@ -5139,6 +5189,16 @@ export type ProcessImport = {
5139
5189
  StartDate?: InputMaybe<Scalars['DateTime']['input']>;
5140
5190
  };
5141
5191
 
5192
+ export type ProcessInput = {
5193
+ after?: InputMaybe<Scalars['String']['input']>;
5194
+ integrationTags?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;
5195
+ search?: InputMaybe<Scalars['String']['input']>;
5196
+ skip?: InputMaybe<Scalars['Int']['input']>;
5197
+ sort?: InputMaybe<Scalars['String']['input']>;
5198
+ sortDesc?: InputMaybe<Scalars['Boolean']['input']>;
5199
+ top?: InputMaybe<Scalars['Int']['input']>;
5200
+ };
5201
+
5142
5202
  export type ProcessSchedule = {
5143
5203
  __typename?: 'ProcessSchedule';
5144
5204
  code?: Maybe<Scalars['String']['output']>;
@@ -5163,7 +5223,8 @@ export type ProcessSchedule = {
5163
5223
  nextExecutionDate?: Maybe<Scalars['DateTime']['output']>;
5164
5224
  onceDateTime?: Maybe<Scalars['DateTime']['output']>;
5165
5225
  previousExecutionDate?: Maybe<Scalars['DateTime']['output']>;
5166
- process: Process;
5226
+ process?: Maybe<Process>;
5227
+ processScheduleGroup?: Maybe<ProcessScheduleGroup>;
5167
5228
  startDate?: Maybe<Scalars['DateTime']['output']>;
5168
5229
  };
5169
5230
 
@@ -5185,15 +5246,54 @@ export type ProcessScheduleCreate = {
5185
5246
  intervalUnitId?: InputMaybe<Scalars['ID']['input']>;
5186
5247
  name?: InputMaybe<Scalars['String']['input']>;
5187
5248
  processId: Scalars['ID']['input'];
5249
+ processScheduleGroupId?: InputMaybe<Scalars['ID']['input']>;
5250
+ sort?: InputMaybe<Scalars['Int']['input']>;
5188
5251
  startDate?: InputMaybe<Scalars['DateTime']['input']>;
5189
5252
  };
5190
5253
 
5254
+ export type ProcessScheduleDetails = {
5255
+ __typename?: 'ProcessScheduleDetails';
5256
+ id: Scalars['ID']['output'];
5257
+ processes?: Maybe<Array<Maybe<Process>>>;
5258
+ };
5259
+
5191
5260
  export type ProcessScheduleEdge = {
5192
5261
  __typename?: 'ProcessScheduleEdge';
5193
5262
  cursor?: Maybe<Scalars['String']['output']>;
5194
5263
  node: ProcessSchedule;
5195
5264
  };
5196
5265
 
5266
+ export type ProcessScheduleGroup = {
5267
+ __typename?: 'ProcessScheduleGroup';
5268
+ code?: Maybe<Scalars['String']['output']>;
5269
+ created: Scalars['DateTime']['output'];
5270
+ id: Scalars['ID']['output'];
5271
+ modified: Scalars['DateTime']['output'];
5272
+ name?: Maybe<Scalars['String']['output']>;
5273
+ };
5274
+
5275
+ export type ProcessScheduleGroupDetails = {
5276
+ __typename?: 'ProcessScheduleGroupDetails';
5277
+ code?: Maybe<Scalars['String']['output']>;
5278
+ created: Scalars['DateTime']['output'];
5279
+ id: Scalars['ID']['output'];
5280
+ interval?: Maybe<Scalars['Int']['output']>;
5281
+ intervalTypeId?: Maybe<Scalars['ID']['output']>;
5282
+ intervalUnitId?: Maybe<Scalars['ID']['output']>;
5283
+ isDisabled?: Maybe<Scalars['Int']['output']>;
5284
+ isFriday?: Maybe<Scalars['Int']['output']>;
5285
+ isMonday?: Maybe<Scalars['Int']['output']>;
5286
+ isSaturday?: Maybe<Scalars['Int']['output']>;
5287
+ isSunday?: Maybe<Scalars['Int']['output']>;
5288
+ isThursday?: Maybe<Scalars['Int']['output']>;
5289
+ isTuesday?: Maybe<Scalars['Int']['output']>;
5290
+ isWednesday?: Maybe<Scalars['Int']['output']>;
5291
+ modified: Scalars['DateTime']['output'];
5292
+ name?: Maybe<Scalars['String']['output']>;
5293
+ processSchedule?: Maybe<ProcessScheduleDetails>;
5294
+ startDate?: Maybe<Scalars['DateTime']['output']>;
5295
+ };
5296
+
5197
5297
  export type ProcessScheduleUpdate = {
5198
5298
  code?: InputMaybe<Scalars['String']['input']>;
5199
5299
  description?: InputMaybe<Scalars['String']['input']>;
@@ -5215,6 +5315,8 @@ export type ProcessScheduleUpdate = {
5215
5315
  nextExecutionDate?: InputMaybe<Scalars['DateTime']['input']>;
5216
5316
  onceDateTime?: InputMaybe<Scalars['DateTime']['input']>;
5217
5317
  previousExecutionDate?: InputMaybe<Scalars['DateTime']['input']>;
5318
+ processScheduleGroupId?: InputMaybe<Scalars['ID']['input']>;
5319
+ sort?: InputMaybe<Scalars['Int']['input']>;
5218
5320
  startDate?: InputMaybe<Scalars['DateTime']['input']>;
5219
5321
  };
5220
5322
 
@@ -5414,18 +5516,94 @@ export type ProcessTaskUpdate = {
5414
5516
  sort?: InputMaybe<Scalars['Int']['input']>;
5415
5517
  };
5416
5518
 
5519
+ export type ProcessTemplate = {
5520
+ __typename?: 'ProcessTemplate';
5521
+ created: Scalars['DateTime']['output'];
5522
+ id: Scalars['ID']['output'];
5523
+ isActive?: Maybe<Scalars['Boolean']['output']>;
5524
+ modified: Scalars['DateTime']['output'];
5525
+ name?: Maybe<Scalars['String']['output']>;
5526
+ pages?: Maybe<Array<Maybe<ProcessTemplatePage>>>;
5527
+ };
5528
+
5529
+ export type ProcessTemplateConnection = {
5530
+ __typename?: 'ProcessTemplateConnection';
5531
+ nodes?: Maybe<Array<Maybe<ProcessTemplate>>>;
5532
+ pageInfo: PageInfo;
5533
+ recordCount?: Maybe<Scalars['Int']['output']>;
5534
+ };
5535
+
5536
+ export type ProcessTemplateFilter = {
5537
+ processTemplateGroupId?: InputMaybe<Scalars['ID']['input']>;
5538
+ processTemplateId?: InputMaybe<Scalars['ID']['input']>;
5539
+ };
5540
+
5541
+ export type ProcessTemplateGroup = {
5542
+ __typename?: 'ProcessTemplateGroup';
5543
+ id: Scalars['ID']['output'];
5544
+ name?: Maybe<Scalars['String']['output']>;
5545
+ };
5546
+
5547
+ export type ProcessTemplateGroupConnection = {
5548
+ __typename?: 'ProcessTemplateGroupConnection';
5549
+ nodes?: Maybe<Array<Maybe<ProcessTemplateGroup>>>;
5550
+ pageInfo: PageInfo;
5551
+ recordCount?: Maybe<Scalars['Int']['output']>;
5552
+ };
5553
+
5554
+ export type ProcessTemplateInput = {
5555
+ __typename?: 'ProcessTemplateInput';
5556
+ created: Scalars['DateTime']['output'];
5557
+ fieldName?: Maybe<Scalars['String']['output']>;
5558
+ helpText?: Maybe<Scalars['String']['output']>;
5559
+ id: Scalars['ID']['output'];
5560
+ inputType?: Maybe<Scalars['String']['output']>;
5561
+ isRequired?: Maybe<Scalars['Boolean']['output']>;
5562
+ label?: Maybe<Scalars['String']['output']>;
5563
+ modified: Scalars['DateTime']['output'];
5564
+ placeholder?: Maybe<Scalars['String']['output']>;
5565
+ queryName?: Maybe<Scalars['String']['output']>;
5566
+ schemas?: Maybe<Array<Maybe<ProcessTemplateInputSchema>>>;
5567
+ sort?: Maybe<Scalars['Int']['output']>;
5568
+ validationRegex?: Maybe<Scalars['String']['output']>;
5569
+ };
5570
+
5571
+ export type ProcessTemplateInputSchema = {
5572
+ __typename?: 'ProcessTemplateInputSchema';
5573
+ defaultValue?: Maybe<Scalars['String']['output']>;
5574
+ fieldKey?: Maybe<Scalars['String']['output']>;
5575
+ id: Scalars['ID']['output'];
5576
+ inputType?: Maybe<Scalars['String']['output']>;
5577
+ isRequired?: Maybe<Scalars['Boolean']['output']>;
5578
+ label?: Maybe<Scalars['String']['output']>;
5579
+ sort?: Maybe<Scalars['Int']['output']>;
5580
+ };
5581
+
5582
+ export type ProcessTemplatePage = {
5583
+ __typename?: 'ProcessTemplatePage';
5584
+ description?: Maybe<Scalars['String']['output']>;
5585
+ id: Scalars['ID']['output'];
5586
+ inputs?: Maybe<Array<Maybe<ProcessTemplateInput>>>;
5587
+ sort?: Maybe<Scalars['Int']['output']>;
5588
+ title?: Maybe<Scalars['String']['output']>;
5589
+ };
5590
+
5417
5591
  export type ProcessUpdate = {
5418
5592
  allowParallelProcessExecution?: InputMaybe<Scalars['Int']['input']>;
5419
5593
  allowParallelTaskExecution?: InputMaybe<Scalars['Int']['input']>;
5420
5594
  code?: InputMaybe<Scalars['String']['input']>;
5421
5595
  extendedFields?: InputMaybe<Scalars['JSON']['input']>;
5422
5596
  id: Scalars['ID']['input'];
5597
+ isTriggered?: InputMaybe<Scalars['Int']['input']>;
5423
5598
  maxConcurrentExecutions?: InputMaybe<Scalars['Int']['input']>;
5424
5599
  maxRetryAttempts?: InputMaybe<Scalars['Int']['input']>;
5425
5600
  name?: InputMaybe<Scalars['String']['input']>;
5426
5601
  nextExecutionDate?: InputMaybe<Scalars['DateTime']['input']>;
5427
5602
  orchestratorInstanceId?: InputMaybe<Scalars['ID']['input']>;
5428
5603
  previousExecutionDate?: InputMaybe<Scalars['DateTime']['input']>;
5604
+ processIcon?: InputMaybe<Scalars['String']['input']>;
5605
+ processScheduleGroupId?: InputMaybe<Scalars['ID']['input']>;
5606
+ sort?: InputMaybe<Scalars['Int']['input']>;
5429
5607
  timeout?: InputMaybe<Scalars['Int']['input']>;
5430
5608
  };
5431
5609
 
@@ -5834,6 +6012,7 @@ export type Query = {
5834
6012
  linkedAccounts?: Maybe<AccountConnection>;
5835
6013
  mapping: Array<MappingField>;
5836
6014
  me?: Maybe<Me>;
6015
+ nonScheduledProcesses?: Maybe<NonScheduledProcessConnection>;
5837
6016
  notificationById?: Maybe<NotificationIntegrate>;
5838
6017
  notificationGroupById?: Maybe<NotificationGroup>;
5839
6018
  notificationGroupTree?: Maybe<NotificationGroupTree>;
@@ -5880,6 +6059,8 @@ export type Query = {
5880
6059
  processExecutions?: Maybe<ProcessExecutionConnection>;
5881
6060
  processExecutionsByProcess?: Maybe<ProcessExecutionConnection>;
5882
6061
  processScheduleById?: Maybe<ProcessSchedule>;
6062
+ processScheduleGroupById?: Maybe<ProcessScheduleGroup>;
6063
+ processScheduleGroupDetails?: Maybe<ProcessScheduleGroupDetails>;
5883
6064
  processSchedules?: Maybe<ProcessScheduleConnection>;
5884
6065
  processSchedulesByProcess?: Maybe<ProcessScheduleConnection>;
5885
6066
  processTaskById?: Maybe<ProcessTask>;
@@ -5893,6 +6074,9 @@ export type Query = {
5893
6074
  processTaskTypes?: Maybe<ProcessTaskTypeConnection>;
5894
6075
  processTasks?: Maybe<ProcessTaskConnection>;
5895
6076
  processTasksByProcess?: Maybe<ProcessTaskConnection>;
6077
+ processTemplate?: Maybe<Array<Maybe<ProcessTemplate>>>;
6078
+ processTemplateGroups?: Maybe<ProcessTemplateGroupConnection>;
6079
+ processTemplates?: Maybe<ProcessTemplateConnection>;
5896
6080
  processes?: Maybe<ProcessConnection>;
5897
6081
  product?: Maybe<Product>;
5898
6082
  productEntities?: Maybe<ProductEntityConnection>;
@@ -5909,6 +6093,7 @@ export type Query = {
5909
6093
  role?: Maybe<Role>;
5910
6094
  roleByName?: Maybe<Role>;
5911
6095
  roles: Array<Maybe<Role>>;
6096
+ scheduledProcesses?: Maybe<ScheduledProcessConnection>;
5912
6097
  searchArticles?: Maybe<Scalars['String']['output']>;
5913
6098
  searchMedia?: Maybe<MediaConnection>;
5914
6099
  searchWords: Array<SearchWord>;
@@ -6485,6 +6670,11 @@ export type QueryMappingArgs = {
6485
6670
  };
6486
6671
 
6487
6672
 
6673
+ export type QueryNonScheduledProcessesArgs = {
6674
+ input?: InputMaybe<FilterQueryInput>;
6675
+ };
6676
+
6677
+
6488
6678
  export type QueryNotificationByIdArgs = {
6489
6679
  id: Scalars['ID']['input'];
6490
6680
  };
@@ -6651,6 +6841,16 @@ export type QueryProcessScheduleByIdArgs = {
6651
6841
  };
6652
6842
 
6653
6843
 
6844
+ export type QueryProcessScheduleGroupByIdArgs = {
6845
+ id: Scalars['ID']['input'];
6846
+ };
6847
+
6848
+
6849
+ export type QueryProcessScheduleGroupDetailsArgs = {
6850
+ id: Scalars['ID']['input'];
6851
+ };
6852
+
6853
+
6654
6854
  export type QueryProcessSchedulesArgs = {
6655
6855
  input?: InputMaybe<FilterQueryInput>;
6656
6856
  };
@@ -6715,11 +6915,26 @@ export type QueryProcessTasksByProcessArgs = {
6715
6915
  };
6716
6916
 
6717
6917
 
6718
- export type QueryProcessesArgs = {
6918
+ export type QueryProcessTemplateArgs = {
6919
+ input?: InputMaybe<ProcessTemplateFilter>;
6920
+ };
6921
+
6922
+
6923
+ export type QueryProcessTemplateGroupsArgs = {
6719
6924
  input?: InputMaybe<FilterQueryInput>;
6720
6925
  };
6721
6926
 
6722
6927
 
6928
+ export type QueryProcessTemplatesArgs = {
6929
+ input?: InputMaybe<FilterQueryInput>;
6930
+ };
6931
+
6932
+
6933
+ export type QueryProcessesArgs = {
6934
+ input?: InputMaybe<ProcessInput>;
6935
+ };
6936
+
6937
+
6723
6938
  export type QueryProductArgs = {
6724
6939
  id: Scalars['String']['input'];
6725
6940
  productLookupType?: ProductLookupType;
@@ -6806,6 +7021,11 @@ export type QueryRolesArgs = {
6806
7021
  };
6807
7022
 
6808
7023
 
7024
+ export type QueryScheduledProcessesArgs = {
7025
+ input?: InputMaybe<ScheduledProcessInput>;
7026
+ };
7027
+
7028
+
6809
7029
  export type QuerySearchMediaArgs = {
6810
7030
  input?: InputMaybe<MediaQueryInput>;
6811
7031
  };
@@ -7144,6 +7364,46 @@ export type SavedCartsListConnection = {
7144
7364
  recordCount?: Maybe<Scalars['Int']['output']>;
7145
7365
  };
7146
7366
 
7367
+ export type ScheduledProcess = {
7368
+ __typename?: 'ScheduledProcess';
7369
+ code?: Maybe<Scalars['String']['output']>;
7370
+ created: Scalars['DateTime']['output'];
7371
+ id: Scalars['ID']['output'];
7372
+ interval?: Maybe<Scalars['Int']['output']>;
7373
+ intervalTypeId?: Maybe<Scalars['ID']['output']>;
7374
+ intervalUnitId?: Maybe<Scalars['ID']['output']>;
7375
+ isDisabled?: Maybe<Scalars['Int']['output']>;
7376
+ isFriday?: Maybe<Scalars['Int']['output']>;
7377
+ isMonday?: Maybe<Scalars['Int']['output']>;
7378
+ isSaturday?: Maybe<Scalars['Int']['output']>;
7379
+ isSunday?: Maybe<Scalars['Int']['output']>;
7380
+ isThursday?: Maybe<Scalars['Int']['output']>;
7381
+ isTuesday?: Maybe<Scalars['Int']['output']>;
7382
+ isWednesday?: Maybe<Scalars['Int']['output']>;
7383
+ modified: Scalars['DateTime']['output'];
7384
+ name?: Maybe<Scalars['String']['output']>;
7385
+ processScheduleGroup?: Maybe<ProcessScheduleGroup>;
7386
+ scheduledIntegrations?: Maybe<Scalars['Int']['output']>;
7387
+ startDate?: Maybe<Scalars['DateTime']['output']>;
7388
+ };
7389
+
7390
+ export type ScheduledProcessConnection = {
7391
+ __typename?: 'ScheduledProcessConnection';
7392
+ nodes?: Maybe<Array<Maybe<ScheduledProcess>>>;
7393
+ pageInfo?: Maybe<PageInfoScheduledProcess>;
7394
+ recordCount?: Maybe<Scalars['Int']['output']>;
7395
+ };
7396
+
7397
+ export type ScheduledProcessInput = {
7398
+ after?: InputMaybe<Scalars['String']['input']>;
7399
+ daysOfTheWeek?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;
7400
+ search?: InputMaybe<Scalars['String']['input']>;
7401
+ skip?: InputMaybe<Scalars['Int']['input']>;
7402
+ sort?: InputMaybe<Scalars['String']['input']>;
7403
+ sortDesc?: InputMaybe<Scalars['Boolean']['input']>;
7404
+ top?: InputMaybe<Scalars['Int']['input']>;
7405
+ };
7406
+
7147
7407
  /**
7148
7408
  * Used as a routing or pre-defined access point for the alias.
7149
7409
  * Documents are stored in random indexes and accessed via commonly
@@ -109,7 +109,7 @@ const searchByCriteriaResponse = z.object({
109
109
  count: z.number(),
110
110
  });
111
111
 
112
- const InventorySearchCriteriaInput = z.object({
112
+ const inventorySearchCriteriaInput = z.object({
113
113
  searchCriteria: z.object({
114
114
  defaultWarehouseOnly: z.boolean(),
115
115
  productIds: z.number().array(),
@@ -140,7 +140,7 @@ export type GetDimensionsInput = z.infer<typeof getDimensionsInput>;
140
140
  export type SearchByCriteriaInput = z.infer<typeof searchByCriteriaInput>;
141
141
  export type SearchByCriteriaResponse = z.infer<typeof searchByCriteriaResponse>;
142
142
  export type InventorySearchCriteriaInput = z.infer<
143
- typeof InventorySearchCriteriaInput
143
+ typeof inventorySearchCriteriaInput
144
144
  >;
145
145
  export type ProductPrice = z.infer<typeof productPriceSchema>;
146
146
  export type ProductPriceInput = z.infer<typeof productPriceInput>;
@@ -6,15 +6,26 @@ import { useQueryClient } from "@tanstack/react-query";
6
6
  import getCart from "@/api-manager/services/cart/queries/get-cart";
7
7
  import { createApiPath } from "@/api-manager/services/create-query";
8
8
  import { useCreateMutation } from "@/api-manager/services/create-mutation";
9
+ import { useNotification } from "@evenicanpm/storefront-core/src/providers/notifications/use-notification";
10
+ import { useTranslations } from "next-intl";
9
11
 
10
12
  const apiPath = createApiPath("cart", "addDiscountCode");
11
13
 
12
14
  const useAddDiscountCode = () => {
13
15
  const queryClient = useQueryClient();
16
+ const { setNotification } = useNotification();
17
+ const t = useTranslations("Cart.Messages");
14
18
  return useCreateMutation<ManageDiscountCodeInput, Cart>(apiPath, {
15
19
  onSuccess: async (result) => {
16
20
  await getCart.setQueryData(queryClient, result);
17
21
  },
22
+ onError: () => {
23
+ setNotification({
24
+ message: t("couponError"),
25
+ severity: "error",
26
+ type: "cart",
27
+ });
28
+ },
18
29
  });
19
30
  };
20
31
 
@@ -1,7 +1,7 @@
1
1
  import { Cart, CheckoutInput } from "@/api-manager/schemas/cart.schema";
2
2
  import { createApiPath } from "@/api-manager/services/create-query";
3
3
  import { useCreateMutation } from "@/api-manager/services/create-mutation";
4
- import { deleteCartCookie } from "@/api-manager/lib/cart-cookie-handler";
4
+ import { deleteCartCookie } from "@/lib/cart-cookie-handler";
5
5
  import { useQueryClient } from "@tanstack/react-query";
6
6
 
7
7
  const apiPath = createApiPath("cart", "checkout");