cloudcommerce 0.26.7 → 0.28.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 (248) hide show
  1. package/.github/workflows/test-apps.yml +2 -2
  2. package/.gitmodules +0 -3
  3. package/.vscode/settings.json +3 -1
  4. package/CHANGELOG.md +51 -0
  5. package/action.yml +2 -2
  6. package/ecomplus-stores/barra-doce/functions/many/package.json +3 -3
  7. package/ecomplus-stores/barra-doce/functions/ssr/content/layout.json +13 -13
  8. package/ecomplus-stores/barra-doce/functions/ssr/content/pages/home.json +10 -10
  9. package/ecomplus-stores/barra-doce/functions/ssr/content/pages/products.json +17 -0
  10. package/ecomplus-stores/barra-doce/functions/ssr/content/settings.json +8 -8
  11. package/ecomplus-stores/barra-doce/functions/ssr/package.json +6 -6
  12. package/ecomplus-stores/barra-doce/functions/ssr/src/components/AccountMenu.vue +11 -11
  13. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopFooter.vue +24 -24
  14. package/ecomplus-stores/barra-doce/functions/ssr/src/layouts/PageFooter.astro +4 -4
  15. package/ecomplus-stores/barra-doce/functions/with-apps/package.json +3 -3
  16. package/ecomplus-stores/barra-doce/package.json +2 -2
  17. package/ecomplus-stores/monocard/functions/many/package.json +3 -3
  18. package/ecomplus-stores/monocard/functions/ssr/content/layout.json +11 -11
  19. package/ecomplus-stores/monocard/functions/ssr/content/pages/home.json +16 -16
  20. package/ecomplus-stores/monocard/functions/ssr/content/pages/products.json +2 -4
  21. package/ecomplus-stores/monocard/functions/ssr/content/settings.json +11 -11
  22. package/ecomplus-stores/monocard/functions/ssr/package.json +6 -6
  23. package/ecomplus-stores/monocard/functions/ssr/src/components/AccountMenu.vue +1 -1
  24. package/ecomplus-stores/monocard/functions/ssr/src/components/DocDescription.vue +33 -0
  25. package/ecomplus-stores/monocard/functions/ssr/src/components/FeatureTabs.vue +3 -3
  26. package/ecomplus-stores/monocard/functions/ssr/src/components/ShopFooter.vue +3 -3
  27. package/ecomplus-stores/monocard/functions/ssr/src/components/ShopHeader.vue +5 -13
  28. package/ecomplus-stores/monocard/functions/ssr/src/layouts/PageFooter.astro +2 -2
  29. package/ecomplus-stores/monocard/functions/ssr/src/main/Home.astro +1 -1
  30. package/ecomplus-stores/monocard/functions/ssr/src/main/Sections.astro +1 -1
  31. package/ecomplus-stores/monocard/functions/with-apps/package.json +3 -3
  32. package/ecomplus-stores/monocard/package.json +2 -2
  33. package/package.json +6 -6
  34. package/packages/api/package.json +1 -1
  35. package/packages/apps/affilate-program/package.json +2 -2
  36. package/packages/apps/correios/package.json +3 -4
  37. package/packages/apps/custom-payment/package.json +1 -1
  38. package/packages/apps/custom-shipping/package.json +1 -1
  39. package/packages/apps/datafrete/package.json +3 -3
  40. package/packages/apps/discounts/package.json +1 -1
  41. package/packages/apps/emails/lib/functios-lib/utils.js +1 -1
  42. package/packages/apps/emails/lib/functios-lib/utils.js.map +1 -1
  43. package/packages/apps/emails/package.json +2 -2
  44. package/packages/apps/emails/src/functios-lib/utils.ts +1 -1
  45. package/packages/apps/fb-conversions/package.json +3 -3
  46. package/packages/apps/flash-courier/package.json +2 -2
  47. package/packages/apps/frenet/package.json +3 -3
  48. package/packages/apps/galaxpay/package.json +3 -3
  49. package/packages/apps/google-analytics/package.json +3 -3
  50. package/packages/apps/jadlog/package.json +2 -2
  51. package/packages/apps/loyalty-points/lib/functions-lib/cron-add-points.d.ts +2 -0
  52. package/packages/apps/loyalty-points/lib/functions-lib/cron-add-points.js +98 -0
  53. package/packages/apps/loyalty-points/lib/functions-lib/cron-add-points.js.map +1 -0
  54. package/packages/apps/loyalty-points/lib/functions-lib/handle-loyalty-points-event.js +59 -23
  55. package/packages/apps/loyalty-points/lib/functions-lib/handle-loyalty-points-event.js.map +1 -1
  56. package/packages/apps/loyalty-points/lib/loyalty-create-transaction.js +9 -4
  57. package/packages/apps/loyalty-points/lib/loyalty-create-transaction.js.map +1 -1
  58. package/packages/apps/loyalty-points/lib/loyalty-list-payments.js +7 -2
  59. package/packages/apps/loyalty-points/lib/loyalty-list-payments.js.map +1 -1
  60. package/packages/apps/loyalty-points/lib/loyalty-points-events.d.ts +3 -1
  61. package/packages/apps/loyalty-points/lib/loyalty-points-events.js +9 -0
  62. package/packages/apps/loyalty-points/lib/loyalty-points-events.js.map +1 -1
  63. package/packages/apps/loyalty-points/package.json +3 -2
  64. package/packages/apps/loyalty-points/src/functions-lib/cron-add-points.ts +104 -0
  65. package/packages/apps/loyalty-points/src/functions-lib/handle-loyalty-points-event.ts +67 -25
  66. package/packages/apps/loyalty-points/src/loyalty-create-transaction.ts +11 -4
  67. package/packages/apps/loyalty-points/src/loyalty-list-payments.ts +9 -2
  68. package/packages/apps/loyalty-points/src/loyalty-points-events.ts +12 -1
  69. package/packages/apps/melhor-envio/package.json +3 -3
  70. package/packages/apps/mercadopago/assets/onload-expression.js +5 -1
  71. package/packages/apps/mercadopago/assets/onload-expression.min.js +1 -1
  72. package/packages/apps/mercadopago/lib/mp-create-transaction.js +16 -6
  73. package/packages/apps/mercadopago/lib/mp-create-transaction.js.map +1 -1
  74. package/packages/apps/mercadopago/package.json +3 -3
  75. package/packages/apps/mercadopago/src/mp-create-transaction.ts +19 -7
  76. package/packages/apps/pagarme/package.json +3 -3
  77. package/packages/apps/paghiper/package.json +3 -3
  78. package/packages/apps/pix/package.json +3 -3
  79. package/packages/apps/tiny-erp/lib/integration/export-order-to-tiny.js +22 -0
  80. package/packages/apps/tiny-erp/lib/integration/export-order-to-tiny.js.map +1 -1
  81. package/packages/apps/tiny-erp/lib/integration/helpers/format-tiny-date.js +2 -2
  82. package/packages/apps/tiny-erp/lib/integration/helpers/format-tiny-date.js.map +1 -1
  83. package/packages/apps/tiny-erp/lib/integration/import-order-from-tiny.js +7 -1
  84. package/packages/apps/tiny-erp/lib/integration/import-order-from-tiny.js.map +1 -1
  85. package/packages/apps/tiny-erp/lib/integration/import-product-from-tiny.js +14 -5
  86. package/packages/apps/tiny-erp/lib/integration/import-product-from-tiny.js.map +1 -1
  87. package/packages/apps/tiny-erp/lib/integration/parsers/order-from-tiny.js +9 -1
  88. package/packages/apps/tiny-erp/lib/integration/parsers/order-from-tiny.js.map +1 -1
  89. package/packages/apps/tiny-erp/lib/integration/parsers/order-to-tiny.js +8 -6
  90. package/packages/apps/tiny-erp/lib/integration/parsers/order-to-tiny.js.map +1 -1
  91. package/packages/apps/tiny-erp/lib/integration/parsers/product-from-tiny.js +118 -38
  92. package/packages/apps/tiny-erp/lib/integration/parsers/product-from-tiny.js.map +1 -1
  93. package/packages/apps/tiny-erp/lib/integration/parsers/product-to-tiny.js +8 -0
  94. package/packages/apps/tiny-erp/lib/integration/parsers/product-to-tiny.js.map +1 -1
  95. package/packages/apps/tiny-erp/package.json +3 -3
  96. package/packages/apps/tiny-erp/src/integration/export-order-to-tiny.ts +24 -0
  97. package/packages/apps/tiny-erp/src/integration/helpers/format-tiny-date.ts +2 -2
  98. package/packages/apps/tiny-erp/src/integration/import-order-from-tiny.ts +8 -1
  99. package/packages/apps/tiny-erp/src/integration/import-product-from-tiny.ts +17 -5
  100. package/packages/apps/tiny-erp/src/integration/parsers/order-from-tiny.ts +13 -1
  101. package/packages/apps/tiny-erp/src/integration/parsers/order-to-tiny.ts +11 -6
  102. package/packages/apps/tiny-erp/src/integration/parsers/product-from-tiny.ts +144 -41
  103. package/packages/apps/tiny-erp/src/integration/parsers/product-to-tiny.ts +10 -0
  104. package/packages/apps/webhooks/package.json +3 -3
  105. package/packages/cli/package.json +1 -1
  106. package/packages/config/lib/config.js +2 -2
  107. package/packages/config/lib/config.js.map +1 -1
  108. package/packages/config/package.json +1 -1
  109. package/packages/config/src/config.ts +2 -2
  110. package/packages/emails/package.json +4 -4
  111. package/packages/eslint/base.eslintrc.cjs +3 -0
  112. package/packages/eslint/package.json +5 -4
  113. package/packages/eslint/storefront.eslintrc.cjs +8 -1
  114. package/packages/events/package.json +2 -2
  115. package/packages/feeds/package.json +1 -1
  116. package/packages/firebase/package.json +2 -2
  117. package/packages/i18n/package.json +1 -1
  118. package/packages/modules/package.json +3 -3
  119. package/packages/passport/package.json +2 -2
  120. package/packages/ssr/package.json +3 -3
  121. package/packages/storefront/.auto-imports.d.ts +65 -0
  122. package/packages/storefront/astro.config.mjs +24 -1
  123. package/packages/storefront/client.d.ts +1 -0
  124. package/packages/storefront/config/astro/context-directive.mjs +21 -0
  125. package/packages/storefront/config/astro/index.d.ts +8 -0
  126. package/packages/storefront/config/storefront.cms.js +2 -2
  127. package/packages/storefront/config/storefront.tailwind.cjs +0 -1
  128. package/packages/storefront/package.json +4 -3
  129. package/packages/storefront/server.d.ts +1 -1
  130. package/packages/storefront/src/lib/$storefront.d.ts +8 -8
  131. package/packages/storefront/src/lib/assets/base.css +5 -0
  132. package/packages/storefront/src/lib/components/Carousel.vue +93 -72
  133. package/packages/storefront/src/lib/components/CarouselControl.vue +13 -7
  134. package/packages/storefront/src/lib/components/ContentClearfix.vue +17 -0
  135. package/packages/storefront/src/lib/components/Drawer.vue +2 -2
  136. package/packages/storefront/src/lib/components/PaymentMethodFlag.vue +2 -2
  137. package/packages/storefront/src/lib/components/QuantitySelector.vue +4 -4
  138. package/packages/storefront/src/lib/components/QuantitySelectorControl.vue +2 -2
  139. package/packages/storefront/src/lib/components/ViewTransitions.astro +409 -0
  140. package/packages/storefront/src/lib/components/globals/AImg.vue +2 -1
  141. package/packages/storefront/src/lib/composables/use-pitch-bar.ts +2 -2
  142. package/packages/storefront/src/lib/content.d.ts +5 -5
  143. package/packages/storefront/src/lib/layouts/Base.astro +4 -4
  144. package/packages/storefront/src/lib/layouts/BaseBody.astro +0 -2
  145. package/packages/storefront/src/lib/layouts/BaseHead.astro +32 -14
  146. package/packages/storefront/src/lib/layouts/use-page-header.ts +9 -4
  147. package/packages/storefront/src/lib/layouts/use-page-main.ts +13 -33
  148. package/packages/test-base/package.json +1 -1
  149. package/packages/types/index.ts +14 -14
  150. package/packages/types/package.json +1 -1
  151. package/ecomplus-stores/iluminim/.devcontainer/devcontainer.json +0 -30
  152. package/ecomplus-stores/iluminim/.editorconfig +0 -13
  153. package/ecomplus-stores/iluminim/.eslintrc.cjs +0 -3
  154. package/ecomplus-stores/iluminim/.firebaserc +0 -5
  155. package/ecomplus-stores/iluminim/.github/renovate.json +0 -5
  156. package/ecomplus-stores/iluminim/.github/workflows/build-and-deploy.yml +0 -36
  157. package/ecomplus-stores/iluminim/.github/workflows/calibreapp-image-actions.yml +0 -23
  158. package/ecomplus-stores/iluminim/.gitpod.yml +0 -12
  159. package/ecomplus-stores/iluminim/.idx/dev.nix +0 -24
  160. package/ecomplus-stores/iluminim/.nvmrc +0 -1
  161. package/ecomplus-stores/iluminim/.vscode/extensions.json +0 -8
  162. package/ecomplus-stores/iluminim/.vscode/launch.json +0 -11
  163. package/ecomplus-stores/iluminim/.vscode/settings.json +0 -10
  164. package/ecomplus-stores/iluminim/README.md +0 -31
  165. package/ecomplus-stores/iluminim/SETUP.md +0 -117
  166. package/ecomplus-stores/iluminim/SETUP.pt-BR.md +0 -117
  167. package/ecomplus-stores/iluminim/functions/config.json +0 -3
  168. package/ecomplus-stores/iluminim/functions/example.env +0 -10
  169. package/ecomplus-stores/iluminim/functions/many/index.js +0 -14
  170. package/ecomplus-stores/iluminim/functions/many/package.json +0 -22
  171. package/ecomplus-stores/iluminim/functions/ssr/.eslintrc.cjs +0 -6
  172. package/ecomplus-stores/iluminim/functions/ssr/astro.config.mjs +0 -4
  173. package/ecomplus-stores/iluminim/functions/ssr/content/blog/.gitkeep +0 -0
  174. package/ecomplus-stores/iluminim/functions/ssr/content/extra-pages/contato.json +0 -11
  175. package/ecomplus-stores/iluminim/functions/ssr/content/extra-pages/terms.json +0 -11
  176. package/ecomplus-stores/iluminim/functions/ssr/content/extra-pages/trocas.json +0 -11
  177. package/ecomplus-stores/iluminim/functions/ssr/content/layout.json +0 -57
  178. package/ecomplus-stores/iluminim/functions/ssr/content/pages/home.json +0 -70
  179. package/ecomplus-stores/iluminim/functions/ssr/content/settings.json +0 -65
  180. package/ecomplus-stores/iluminim/functions/ssr/index.js +0 -18
  181. package/ecomplus-stores/iluminim/functions/ssr/package.json +0 -31
  182. package/ecomplus-stores/iluminim/functions/ssr/public/admin/.gitkeep +0 -2
  183. package/ecomplus-stores/iluminim/functions/ssr/public/assets/cms-preview.css +0 -274
  184. package/ecomplus-stores/iluminim/functions/ssr/public/assets/cms.css +0 -114
  185. package/ecomplus-stores/iluminim/functions/ssr/public/assets/cvv.png +0 -0
  186. package/ecomplus-stores/iluminim/functions/ssr/public/assets/img-placeholder.png +0 -0
  187. package/ecomplus-stores/iluminim/functions/ssr/public/assets/payments.png +0 -0
  188. package/ecomplus-stores/iluminim/functions/ssr/public/assets/ssl-safe.png +0 -0
  189. package/ecomplus-stores/iluminim/functions/ssr/public/img/icon.png +0 -0
  190. package/ecomplus-stores/iluminim/functions/ssr/public/img/large-icon.png +0 -0
  191. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/banner-chamada-desktop-9x81zmd91q.webp +0 -0
  192. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/banner2.webp +0 -0
  193. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/chamada-mobile-q1c6om6jx4.webp +0 -0
  194. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/ecom-icon.png +0 -0
  195. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/headphone.webp +0 -0
  196. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/logo.webp +0 -0
  197. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/og-image.png +0 -0
  198. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/passion.webp +0 -0
  199. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/rect8589.png +0 -0
  200. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/rect859.png +0 -0
  201. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/rect89.webp +0 -0
  202. package/ecomplus-stores/iluminim/functions/ssr/public/robots.txt +0 -6
  203. package/ecomplus-stores/iluminim/functions/ssr/scripts/build.sh +0 -14
  204. package/ecomplus-stores/iluminim/functions/ssr/src/assets/style.css +0 -65
  205. package/ecomplus-stores/iluminim/functions/ssr/src/components/AccountMenu.vue +0 -95
  206. package/ecomplus-stores/iluminim/functions/ssr/src/components/Banner.vue +0 -57
  207. package/ecomplus-stores/iluminim/functions/ssr/src/components/BannersGrid.astro +0 -25
  208. package/ecomplus-stores/iluminim/functions/ssr/src/components/CartItem.vue +0 -64
  209. package/ecomplus-stores/iluminim/functions/ssr/src/components/CartSidebar.vue +0 -66
  210. package/ecomplus-stores/iluminim/functions/ssr/src/components/Countdown.vue +0 -79
  211. package/ecomplus-stores/iluminim/functions/ssr/src/components/HeroSlider.vue +0 -52
  212. package/ecomplus-stores/iluminim/functions/ssr/src/components/PitchBar.vue +0 -56
  213. package/ecomplus-stores/iluminim/functions/ssr/src/components/Prices.vue +0 -95
  214. package/ecomplus-stores/iluminim/functions/ssr/src/components/ProductCard.vue +0 -117
  215. package/ecomplus-stores/iluminim/functions/ssr/src/components/ProductShelf.vue +0 -57
  216. package/ecomplus-stores/iluminim/functions/ssr/src/components/ProductsCountdown.vue +0 -20
  217. package/ecomplus-stores/iluminim/functions/ssr/src/components/SearchModal.vue +0 -6
  218. package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopFooter.vue +0 -149
  219. package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopHeader.vue +0 -158
  220. package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopHeaderMenu.vue +0 -58
  221. package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopHeaderSubmenu.vue +0 -88
  222. package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopSidenav.vue +0 -61
  223. package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopSidenavCategory.vue +0 -80
  224. package/ecomplus-stores/iluminim/functions/ssr/src/env.d.ts +0 -13
  225. package/ecomplus-stores/iluminim/functions/ssr/src/layouts/Base.astro +0 -16
  226. package/ecomplus-stores/iluminim/functions/ssr/src/layouts/Checkout.astro +0 -0
  227. package/ecomplus-stores/iluminim/functions/ssr/src/layouts/PageFooter.astro +0 -68
  228. package/ecomplus-stores/iluminim/functions/ssr/src/layouts/PageHeader.astro +0 -42
  229. package/ecomplus-stores/iluminim/functions/ssr/src/main/Fallback.astro +0 -10
  230. package/ecomplus-stores/iluminim/functions/ssr/src/main/Home.astro +0 -49
  231. package/ecomplus-stores/iluminim/functions/ssr/src/main/Sections.astro +0 -42
  232. package/ecomplus-stores/iluminim/functions/ssr/src/main/Wildcard.astro +0 -18
  233. package/ecomplus-stores/iluminim/functions/ssr/src/pages/[...slug].astro +0 -40
  234. package/ecomplus-stores/iluminim/functions/ssr/src/pages/_vue.ts +0 -3
  235. package/ecomplus-stores/iluminim/functions/ssr/src/pages/app/account.astro +0 -0
  236. package/ecomplus-stores/iluminim/functions/ssr/src/pages/app/index.astro +0 -0
  237. package/ecomplus-stores/iluminim/functions/ssr/src/pages/index.astro +0 -37
  238. package/ecomplus-stores/iluminim/functions/ssr/src/pages/~fallback.astro +0 -25
  239. package/ecomplus-stores/iluminim/functions/ssr/src/scripts/InlineScripts.astro +0 -10
  240. package/ecomplus-stores/iluminim/functions/ssr/tailwind.config.cjs +0 -13
  241. package/ecomplus-stores/iluminim/functions/ssr/tsconfig.json +0 -12
  242. package/ecomplus-stores/iluminim/functions/ssr/uno.config.cjs +0 -5
  243. package/ecomplus-stores/iluminim/functions/with-apps/index.js +0 -12
  244. package/ecomplus-stores/iluminim/functions/with-apps/package.json +0 -22
  245. package/ecomplus-stores/iluminim/package.json +0 -31
  246. package/ecomplus-stores/iluminim/scripts/install.sh +0 -24
  247. package/ecomplus-stores/monocard/functions/ssr/src/components/DocDescription.astro +0 -30
  248. package/packages/storefront/src/lib/components/ContentClearfix.astro +0 -15
@@ -3,7 +3,6 @@ import type { PageContent } from '@@sf/content';
3
3
  import type { RouteContext } from '@@sf/ssr-context';
4
4
  import type { Props as UseBannerProps } from '@@sf/composables/use-banner';
5
5
  import type { Props as UseProductShelfProps } from '@@sf/composables/use-product-shelf';
6
- import type { Props as UseBreadcrumbsProps } from '@@sf/composables/use-breadcrumbs';
7
6
  import { useProductShelf } from '@@sf/composables/use-product-shelf';
8
7
 
9
8
  export interface Props {
@@ -17,23 +16,13 @@ const now = Date.now();
17
16
  const parseBanners = (banners: PageContentHero['slides']) => {
18
17
  const validBanners: UseBannerProps[] = [];
19
18
  banners.forEach(({
20
- img,
21
- start,
22
- end,
23
- mobile_img: mobileImg,
24
- button_link: buttonLink,
25
- button_text: buttonText,
26
- ...rest
19
+ startsAt,
20
+ endsAt,
21
+ ...bannerProps
27
22
  }) => {
28
- if (start && new Date(start).getTime() < now) return;
29
- if (end && new Date(end).getTime() > now) return;
30
- validBanners.push({
31
- ...rest,
32
- img,
33
- mobileImg,
34
- buttonLink,
35
- buttonText,
36
- });
23
+ if (startsAt && new Date(startsAt).getTime() < now) return;
24
+ if (endsAt && new Date(endsAt).getTime() > now) return;
25
+ validBanners.push(bannerProps);
37
26
  });
38
27
  return validBanners;
39
28
  };
@@ -61,8 +50,8 @@ export const usePageSections = async <T extends CustomSection = CustomSection>
61
50
  T
62
51
  | { type: 'product-shelf', props: UseProductShelfProps }
63
52
  | { type: 'banners-grid', props: { banners: UseBannerProps[] } }
64
- | { type: 'breadcrumbs', props: UseBreadcrumbsProps }
65
- | { type: 'product-details', props: {} }
53
+ | { type: 'product-details', props: { hasDescription?: boolean } }
54
+ | { type: 'breadcrumbs', props: {} }
66
55
  | { type: 'related-products', props: {} }
67
56
  | { type: 'doc-description', props: {} }
68
57
  | { type: 'product-specifications', props: {} }
@@ -71,9 +60,9 @@ export const usePageSections = async <T extends CustomSection = CustomSection>
71
60
  await Promise.all(sectionsContent.map(async ({ type, ...sectionContent }, index) => {
72
61
  if (type === 'product-shelf') {
73
62
  const {
74
- collection_id: collectionIdAndInfo,
75
- headless: isHeadless,
76
- shuffle: isShuffle,
63
+ collectionIdAndInfo,
64
+ isHeadless,
65
+ isShuffle,
77
66
  ...rest
78
67
  } = sectionContent;
79
68
  let { sort, title } = sectionContent;
@@ -127,16 +116,7 @@ export const usePageSections = async <T extends CustomSection = CustomSection>
127
116
  await fetching;
128
117
  sections[index] = {
129
118
  type,
130
- props: {
131
- ...rest,
132
- collectionId,
133
- searchQuery,
134
- sort,
135
- title: isHeadless ? null : title,
136
- titleLink,
137
- isShuffle,
138
- products,
139
- },
119
+ props: { ...props, products },
140
120
  };
141
121
  return;
142
122
  }
@@ -159,7 +139,7 @@ export const usePageSections = async <T extends CustomSection = CustomSection>
159
139
  // Bypassed sections
160
140
  sections[index] = {
161
141
  type,
162
- props: {},
142
+ props: sectionContent,
163
143
  };
164
144
  return;
165
145
  default:
@@ -2,7 +2,7 @@
2
2
  "name": "@cloudcommerce/test-base",
3
3
  "private": true,
4
4
  "type": "module",
5
- "version": "0.26.7",
5
+ "version": "0.28.0",
6
6
  "description": "E-Com Plus Cloud Commerce basic setup for testing",
7
7
  "main": "lib/index.js",
8
8
  "repository": {
@@ -97,18 +97,18 @@ type SettingsContent = {
97
97
  description: string,
98
98
  logo: string,
99
99
  icon: string,
100
- primary_color: string,
101
- secondary_color?: string,
102
- bg_color?: string,
100
+ primaryColor: string,
101
+ secondaryColor?: string,
102
+ bgColor?: string,
103
103
  email: string,
104
104
  phone: string,
105
105
  address: string,
106
- corporate_name: string,
107
- doc_number: string,
106
+ corporateName: string,
107
+ docNumber: string,
108
108
  lang: string,
109
109
  currency: string,
110
- currency_symbol: string,
111
- country_code: string,
110
+ currencySymbol: string,
111
+ countryCode: string,
112
112
  whatsapp?: string,
113
113
  instagram?: string,
114
114
  facebook?: string,
@@ -117,11 +117,11 @@ type SettingsContent = {
117
117
  tiktok?: string,
118
118
  pinterest?: string,
119
119
  threads?: string,
120
- service_links?: Array<{
120
+ serviceLinks?: Array<{
121
121
  title: string,
122
122
  href: string,
123
123
  }>,
124
- payment_methods?: PaymentMethodFlag[],
124
+ paymentMethods?: PaymentMethodFlag[],
125
125
  modules?: {
126
126
  list_payments?: {
127
127
  installments_option?: Partial<ListPaymentsResponse['installments_option']>,
@@ -139,11 +139,11 @@ type SettingsContent = {
139
139
  available_extra_discount?: Partial<ApplyDiscountResponse['available_extra_discount']>,
140
140
  },
141
141
  },
142
- cart_url?: string,
143
- checkout_url?: string,
144
- account_url?: string,
145
- orders_url?: string,
146
- favorites_url?: string,
142
+ cartUrl?: string,
143
+ checkoutUrl?: string,
144
+ accountUrl?: string,
145
+ ordersUrl?: string,
146
+ favoritesUrl?: string,
147
147
  metafields?: Record<string, any>,
148
148
  };
149
149
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/types",
3
3
  "type": "module",
4
- "version": "0.26.7",
4
+ "version": "0.28.0",
5
5
  "description": "E-Com Plus Cloud Commerce reusable type definitions",
6
6
  "main": "index.ts",
7
7
  "repository": {
@@ -1,30 +0,0 @@
1
- {
2
- "postCreateCommand": "npm i && npm i --prefix=functions/ssr",
3
- "waitFor": "postCreateCommand",
4
- "portsAttributes": {
5
- "3000": {
6
- "label": "Application",
7
- "onAutoForward": "openPreview"
8
- }
9
- },
10
- "forwardPorts": [
11
- 3000
12
- ],
13
- "postAttachCommand": {
14
- "Server": "npm run dev"
15
- },
16
- "customizations": {
17
- "codespaces": {
18
- "openFiles": [
19
- "functions/ssr/src/main/Home.astro"
20
- ]
21
- },
22
- "vscode": {
23
- "extensions": [
24
- "astro-build.astro-vscode",
25
- "vue.volar",
26
- "bradlc.vscode-tailwindcss"
27
- ]
28
- }
29
- }
30
- }
@@ -1,13 +0,0 @@
1
- # editorconfig.org
2
- root = true
3
-
4
- [*]
5
- indent_style = space
6
- indent_size = 2
7
- end_of_line = lf
8
- charset = utf-8
9
- trim_trailing_whitespace = true
10
- insert_final_newline = true
11
-
12
- [*.md]
13
- trim_trailing_whitespace = false
@@ -1,3 +0,0 @@
1
- module.exports = {
2
- extends: './node_modules/@cloudcommerce/eslint/base.eslintrc.cjs',
3
- };
@@ -1,5 +0,0 @@
1
- {
2
- "projects": {
3
- "default": "ecom2iluminim"
4
- }
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "extends": [
3
- "github>ecomplus/cloud-commerce:store.renovate"
4
- ]
5
- }
@@ -1,36 +0,0 @@
1
- name: Build and deploy
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
- paths:
8
- - 'functions/**'
9
- - 'package-lock.json'
10
- - '.firebaserc'
11
- - '.ecomplus/**'
12
- - '.github/build-and-deploy'
13
- - '.github/workflows/build-and-deploy.yml'
14
- pull_request:
15
- paths:
16
- - 'functions/ssr/**'
17
- - '.firebaserc'
18
- - 'package-lock.json'
19
-
20
- jobs:
21
- build-and-deploy:
22
- name: Cloud Commerce build and deploy
23
- runs-on: ubuntu-latest
24
- if: |
25
- !contains(github.event.head_commit.message, '[skip ci]')
26
- steps:
27
- - uses: actions/checkout@v3
28
- with:
29
- fetch-depth: 0
30
- - uses: ecomplus/cloud-commerce@main
31
- with:
32
- github-token: ${{ secrets.GITHUB_TOKEN }}
33
- firebase-service-account: ${{ secrets.FIREBASE_SERVICE_ACCOUNT }}
34
- ecom-authentication-id: ${{ secrets.ECOM_AUTHENTICATION_ID }}
35
- ecom-api-key: ${{ secrets.ECOM_API_KEY }}
36
- ecom-store-id: ${{ secrets.ECOM_STORE_ID }}
@@ -1,23 +0,0 @@
1
- name: Compress images
2
-
3
- on:
4
- pull_request:
5
- paths:
6
- - '**.jpg'
7
- - '**.jpeg'
8
- - '**.png'
9
- - '**.webp'
10
- - 'package-lock.json'
11
-
12
- jobs:
13
- build:
14
- # Only run on Pull Requests within the same repository, and not from forks.
15
- if: github.event.pull_request.head.repo.full_name == github.repository
16
- name: calibreapp/image-actions
17
- runs-on: ubuntu-latest
18
- steps:
19
- - uses: actions/checkout@v3
20
- - name: Compress images
21
- uses: calibreapp/image-actions@main
22
- with:
23
- githubToken: ${{ secrets.GITHUB_TOKEN }}
@@ -1,12 +0,0 @@
1
- tasks:
2
- - init: npm i && npm i --prefix=functions/ssr
3
- command: npm run dev
4
- vscode:
5
- extensions:
6
- - astro-build.astro-vscode
7
- - vue.volar
8
- - bradlc.vscode-tailwindcss
9
- ports:
10
- - port: 3000
11
- onOpen: open-preview
12
- visibility: public
@@ -1,24 +0,0 @@
1
- {pkgs}: {
2
- channel = "stable-23.05"; # "stable-23.05" or "unstable"
3
- packages = [
4
- pkgs.nodejs_18
5
- pkgs.nodePackages.firebase-tools
6
- ];
7
- idx.extensions = [
8
- "vue.volar"
9
- # Other recommended extensions crashing launch
10
- # "dbaeumer.vscode-eslint",
11
- # "astro-build.astro-vscode",
12
- # "bradlc.vscode-tailwindcss",
13
- ];
14
- idx.previews = {
15
- enable = true;
16
- previews = [
17
- {
18
- command = ["npm" "run" "dev" "--" "--port" "$PORT" "--host"];
19
- manager = "web";
20
- id = "web";
21
- }
22
- ];
23
- };
24
- }
@@ -1 +0,0 @@
1
- 18
@@ -1,8 +0,0 @@
1
- {
2
- "recommendations": [
3
- "dbaeumer.vscode-eslint",
4
- "astro-build.astro-vscode",
5
- "vue.volar",
6
- "bradlc.vscode-tailwindcss"
7
- ]
8
- }
@@ -1,11 +0,0 @@
1
- {
2
- "version": "0.2.0",
3
- "configurations": [
4
- {
5
- "command": "./node_modules/.bin/cloudcommerce dev",
6
- "name": "Dev server",
7
- "request": "launch",
8
- "type": "node-terminal"
9
- }
10
- ]
11
- }
@@ -1,10 +0,0 @@
1
- {
2
- "editor.quickSuggestions": {
3
- "strings": true
4
- },
5
- "files.associations": {
6
- "*.css": "tailwindcss"
7
- },
8
- "css.lint.unknownAtRules": "ignore",
9
- "git.autofetch": true
10
- }
@@ -1,31 +0,0 @@
1
- # Store
2
-
3
- [Cloud Commerce](https://github.com/ecomplus/cloud-commerce): the new Store template
4
-
5
- ## Getting started
6
-
7
- [:us: First deployment and setup](./SETUP.md)
8
-
9
- [:brazil: Primeiro deploy e configuração](./SETUP.pt-BR.md)
10
-
11
- ## Local development
12
-
13
- ```bash
14
- npm i
15
- ```
16
-
17
- > **Note**
18
- > Check VS Code (highly) recommend extensions in _store/.vscode/extensions.json_
19
-
20
- ### Storefront
21
-
22
- ```bash
23
- npm run dev
24
- ```
25
-
26
- It starts serving the site at http://localhost:3000/.
27
-
28
- Edit your store source in _functions/ssr_:
29
- - _src_: pages, components, styles and scripts sources;
30
- - _content_: JSON and Markdown content (editable with git-based CMS);
31
- - _public_: images and not-parsed static assets;
@@ -1,117 +0,0 @@
1
- # Store
2
-
3
- [Cloud Commerce](https://github.com/ecomplus/cloud-commerce): the new Store template
4
-
5
- [:brazil: Tradução em português](./SETUP.pt-BR.md)
6
-
7
- ## Getting started
8
-
9
- 1. Start creating new project on [Firebase console](https://console.firebase.google.com/):
10
- - Set a nice project name (ID) and remember it;
11
- - Disable (recommended) Google Analytics for Firebase, will not be used by default;
12
-
13
- 2. Go to _Creation > Firestore Database_ page (on sidebar) and _Create database_:
14
- - Just bypass with default production mode and rules;
15
- - Select region `us-east4` (recommended, or multi-region `nam5 (us-central)`);
16
-
17
- 3. Go to _Creation > Authentication_ and click _Get started_:
18
- - Click _Native providers > Email/password_ and enable _Email link (login without password)_;
19
- - Optionally, add other provides by _Smartphone_ (SMS, generates additional costs) and/or social media;
20
-
21
- 4. Go to :gear: _> Project configurations_ e edit:
22
- - _Default location for GCP resources_: Same Firestore region (`us-east4`);
23
- - _Public settings > Publicly displayed name_: Your store name;
24
- - _Public settings > Support email_ (optional);
25
- - Under _Your apps_ create a new Web app:
26
- + Re-enter the store name and enable Firebase Hosting for the new app;
27
- + Copy only the value of the `firebaseConfig` object and replace at `functions/ssr/src/scripts/InlineScripts.astro`;
28
- + Just click to continue in the next steps until confirmation and return to the console;
29
-
30
- 5. Firebase free plan doesn't support sending external HTTP requests, so you'll need to upgrade to _Blaze_ (on demand) plan;
31
-
32
- 6. [Use this template](https://github.com/ecomplus/store/generate) to generate a new repository for your store;
33
-
34
- Proceed with:
35
- - [Better way using command line](#first-deploy-on-cli)
36
- - [Only in browser](#browser-only-setup) (may be easier but less safe, not recommended)
37
-
38
- #### First deploy on CLI
39
-
40
- 7. Setup and first deploy from your terminal with [Firebase CLI](https://firebase.google.com/docs/cli):
41
- ```bash
42
- # Install `firebase-tools` and login
43
- npm install -g firebase-tools && firebase login
44
- ```
45
- ```bash
46
- # Clone your new store repository
47
- git clone git@github.com:{gh-user}/{new-store}.git
48
- cd {new-store}
49
- npm i
50
- ```
51
-
52
- <details open>
53
- <summary>With <a href="https://cloud.google.com/sdk/docs/install">gcloud CLI</a> (optional) installed</summary>
54
-
55
- ```bash
56
- # Run project configuration and deploy on GitHub Actions
57
- FIREBASE_PROJECT_ID={project-id} npm run setup
58
- ```
59
-
60
- > **Note**
61
- > Account key created automatically with only required permissions using gcloud CLI (skip steps 6 and 7).
62
-
63
- </details>
64
-
65
- <details>
66
- <summary>Without gcloud CLI</summary>
67
-
68
- ```bash
69
- # Run project configuration and first deploy
70
- FIREBASE_PROJECT_ID={project-id} npm run setup -- --no-gcloud
71
- npm run deploy
72
- ```
73
-
74
- 7. [Create a service account](https://console.cloud.google.com/iam-admin/serviceaccounts) for your Firebase project directly on Google Cloud Platform:
75
- - Name it _Cloud Commerce GH Actions (YOUR REPOSITORY)_;
76
- - Describe it _A service account with permission to deploy Cloud Commerce from the GitHub repository to Firebase_;
77
- - Continue and select the following roles to the service account:
78
- 1. _Firebase Admin_
79
- 2. _API Keys Viewer_
80
- 3. _Cloud Run Viewer_
81
- 4. _Cloud Functions Admin_
82
- 5. _Artifact Registry Admin_
83
- 6. _App Engine Creator_
84
- 7. _App Engine Admin_
85
- 8. _Cloud Scheduler Admin_
86
- 8. _Service Account User_
87
-
88
- 8. Back in the service accounts list, click the 3 dots (actions) and select _Manage keys_, generate and download a JSON key for the created account;
89
-
90
- </details>
91
-
92
- 9. Set the following secrets to your GitHub repository (_Settings > Secrets > Actions_):
93
- - `FIREBASE_SERVICE_ACCOUNT`: Paste the generated Google Cloud key JSON
94
- - `ECOM_AUTHENTICATION_ID`: Get from CLI setup output
95
- - `ECOM_API_KEY`: Get from CLI setup output
96
-
97
- :checkered_flag: :checkered_flag: :checkered_flag: **All done, congrats!**
98
-
99
- ---
100
-
101
- #### Browser-only setup
102
-
103
- > **Warning**
104
- > This configuration option is less secure, we recommend [first deploy on CLI](#first-deploy-on-cli) instead.
105
-
106
- 7. [Create a service account](https://console.cloud.google.com/iam-admin/serviceaccounts) for your Firebase project directly on Google Cloud Platform:
107
- - Name it _Cloud Commerce GH Actions (YOUR REPOSITORY)_;
108
- - Describe it _A service account with ALL permissions to deploy Cloud Commerce from the GitHub to Firebase_;
109
- - Continue and select the role _Quick access > Basic > Proprietary_;
110
-
111
- 8. Back in the service accounts list, click the 3 dots (actions) and select _Manage keys_, generate and download a JSON key for the created account;
112
-
113
- 9. Set the following secrets to your GitHub repository (_Settings > Secrets > Actions_):
114
- - `FIREBASE_SERVICE_ACCOUNT`: Paste the generated Google Cloud key JSON
115
- - `ECOM_STORE_ID`: Copy your _Store ID_ on the [E-Com Plus admin](https://ecomplus.app/)
116
- - `ECOM_AUTHENTICATION_ID`: Copy your _Authentication ID_ on the [E-Com Plus admin](https://ecomplus.app/)
117
- - `ECOM_API_KEY`: Copy your _API Key_ on the [E-Com Plus admin](https://ecomplus.app/)
@@ -1,117 +0,0 @@
1
- # Store
2
-
3
- [Cloud Commerce](https://github.com/ecomplus/cloud-commerce): template para nova loja
4
-
5
- [:us: English version](./SETUP.md)
6
-
7
- ## Começando
8
-
9
- 1. Comece criando um novo projeto no [Firebase console](https://console.firebase.google.com/):
10
- - Insira um bom nome (ID) para o projeto e lembre-se dele;
11
- - Desative (recomendado) Google Analytics for Firebase, não será utilizado por padrão;
12
-
13
- 2. Com o projeto criado, vá para _Criação > Firestore Database_ (menu lateral) e clique em _Criar banco de dados_:
14
- - Pule com o modo e as regras de produção padrão;
15
- - Selecione a região `us-east4` ([recomendado](https://github.com/ecomplus/cloud-commerce/issues/164));
16
-
17
- 3. Vá para _Criação > Authentication_ e clique em _Vamos começar_:
18
- - Clique em _Provedores nativos > E-mail/senha_ e ative _Link do e-mail (login sem senha)_;
19
- - Opcionalmente, adicione outros fornecedores por _Smartphone_ (SMS, gera custos adicionais) e/ou redes sociais;
20
-
21
- 4. Vá para :gear: _> Configurações do projeto_ e edite:
22
- - _Local padrão dos recursos do GCP_: mesma região do Firestore (`us-east4`);
23
- - _Configurações públicas > Nome exibido ao público_: O nome da sua loja;
24
- - _Configurações públicas > E-mail para suporte_ (opcional);
25
- - Em _Seus aplicativos_ crie um app Web:
26
- + Insira novamente o nome da loja e ativa Firebase Hosting para o novo app;
27
- + Copie apenas o valor do objeto `firebaseConfig` e substitua em `functions/ssr/src/scripts/InlineScripts.astro`;
28
- + Apenas clique em prosseguir nos próximos passos até confirmar e voltar para o console;
29
-
30
- 5. O plano gratuito do Firebase não é compatível com o envio de solicitações HTTP externas, portanto você precisará fazer upgrade para o plano _Blaze_ (sob demanda) no canto inferior esquerdo do console do Firebase;
31
-
32
- 6. [Use esse template](https://github.com/ecomplus/store/generate) para gerar um novo repositório para sua loja;
33
-
34
- Prossiga com:
35
- - [Melhor maneira usando a linha de comando](#primeiro-deploy-em-cli)
36
- - [Apenas no navegador](#setup-somente-do-navegador) (pode ser mais fácil mas menos seguro, não recomendado)
37
-
38
- #### Primeiro deploy em CLI
39
-
40
- 7. Setup e primeiro deploy pelo terminal com [Firebase CLI](https://firebase.google.com/docs/cli):
41
- ```bash
42
- # Install `firebase-tools` and login
43
- npm install -g firebase-tools && firebase login
44
- ```
45
- ```bash
46
- # Clone your new store repository
47
- git clone git@github.com:{gh-user}/{new-store}.git
48
- cd {new-store}
49
- npm i
50
- ```
51
-
52
- <details open>
53
- <summary>Com <a href="https://cloud.google.com/sdk/docs/install">gcloud CLI</a> (opcional) instalado</summary>
54
-
55
- ```bash
56
- # Run project configuration and deploy on GitHub Actions
57
- FIREBASE_PROJECT_ID={project-id} npm run setup
58
- ```
59
-
60
- > **Note**
61
- > Chave de conta criada automaticamente apenas com as permissões necessárias usando gcloud CLI (pule as etapas 6 e 7).
62
-
63
- </details>
64
-
65
- <details>
66
- <summary>Sem gcloud CLI</summary>
67
-
68
- ```bash
69
- # Run project configuration and first deploy
70
- FIREBASE_PROJECT_ID={project-id} npm run setup -- --no-gcloud
71
- npm run deploy
72
- ```
73
-
74
- 7. [Crie uma conta de serviço](https://console.cloud.google.com/iam-admin/serviceaccounts) para seu projeto do Firebase diretamente no Google Cloud Platform:
75
- - Nomeie _Cloud Commerce GH Actions (YOUR REPOSITORY)_;
76
- - Descreva como _A service account with permission to deploy Cloud Commerce from the GitHub repository to Firebase_;
77
- - Continue e selecione as seguintes permissões:
78
- 1. _Administrador do Firebase_
79
- 2. _Leitor de chaves de API_
80
- 3. _Leitor do Cloud Run_
81
- 4. _Administrador do Cloud Functions_
82
- 5. _Administrador do Artifact Registry_
83
- 6. _Criador do App Engine_
84
- 7. _Administrador do App Engine_
85
- 8. _Administrador do Cloud Scheduler_
86
- 9. _Usuário da conta de serviço_
87
-
88
- 8. De volta na lista de contas de serviço, clique nos 3 pontos (ações) and selecione _Gerenciar chaves_, crie e faça o download de uma nova chave JSON para a conta recém criada;
89
-
90
- </details>
91
-
92
- 9. Configure os seguintes secrets no seu repositório do GitHub (_Settings > Secrets > Actions_):
93
- - `FIREBASE_SERVICE_ACCOUNT`: Cole o JSON da chave do Google Cloud gerada
94
- - `ECOM_AUTHENTICATION_ID`: Pegue no output do setup no CLI
95
- - `ECOM_API_KEY`: Pegue no output do setup no CLI
96
-
97
- :checkered_flag: :checkered_flag: :checkered_flag: **Tudo pronto, boa!**
98
-
99
- ---
100
-
101
- #### Setup somente do navegador
102
-
103
- > **Warning**
104
- > Essa opção de configuração é menos segura, recomendamos o [primeiro deploy em CLI](#primeiro-deploy-em-cli).
105
-
106
- 7. [Crie uma conta de serviço](https://console.cloud.google.com/iam-admin/serviceaccounts) para seu projeto do Firebase diretamente no Google Cloud Platform:
107
- - Nomeie _Cloud Commerce GH Actions (YOUR REPOSITORY)_;
108
- - Descreva como _A service account with ALL permissions to deploy Cloud Commerce from the GitHub to Firebase_;
109
- - Continue e selecione a permissão _Acesso rápido > Básico > Proprietário_;
110
-
111
- 8. Back in the service accounts list, click the 3 dots (actions) and select _Manage keys_, generate and download a JSON key for the created account;
112
-
113
- 9. Configure os seguintes secrets no seu repositório do GitHub (_Settings > Secrets > Actions_):
114
- - `FIREBASE_SERVICE_ACCOUNT`: Cole o JSON da chave do Google Cloud gerada
115
- - `ECOM_STORE_ID`: Copie seu _Store ID_ no [admin da E-Com Plus](https://ecomplus.app/)
116
- - `ECOM_AUTHENTICATION_ID`: Copie seu _Authentication ID_ no [admin da E-Com Plus](https://ecomplus.app/)
117
- - `ECOM_API_KEY`: Copie seu _API Key_ no [admin da E-Com Plus](https://ecomplus.app/)
@@ -1,3 +0,0 @@
1
- {
2
- "storeId": 51412
3
- }
@@ -1,10 +0,0 @@
1
- # Get the store credentials with `npm run setup` from project root
2
- ECOM_AUTHENTICATION_ID=
3
- ECOM_API_KEY=
4
-
5
- # Optional if `storeId` is defined in config.json
6
- # Automatically set on CLI setup
7
- ECOM_STORE_ID=
8
-
9
- # https://github.com/settings/tokens
10
- GITHUB_TOKEN=
@@ -1,14 +0,0 @@
1
- import '@cloudcommerce/firebase/lib/init';
2
- import config from '@cloudcommerce/firebase/config';
3
- import mergeConfig from './config.json' assert { type: 'json' };
4
-
5
- config.set({
6
- ...mergeConfig,
7
- hello: 'from store',
8
- });
9
-
10
- export * from '@cloudcommerce/firebase';
11
-
12
- export * from '@cloudcommerce/passport/firebase';
13
-
14
- export * from '@cloudcommerce/feeds/firebase';