cloudcommerce 0.24.1 → 0.26.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 (217) hide show
  1. package/.github/workflows/test-e2e.yml +2 -2
  2. package/CHANGELOG.md +43 -0
  3. package/action.yml +2 -2
  4. package/ecomplus-stores/barra-doce/.idx/dev.nix +24 -0
  5. package/ecomplus-stores/barra-doce/functions/many/package.json +3 -3
  6. package/ecomplus-stores/barra-doce/functions/ssr/content/extra-pages/contato.json +11 -0
  7. package/ecomplus-stores/barra-doce/functions/ssr/content/extra-pages/terms.json +11 -0
  8. package/ecomplus-stores/barra-doce/functions/ssr/content/extra-pages/trocas.json +11 -0
  9. package/ecomplus-stores/barra-doce/functions/ssr/content/layout.json +30 -0
  10. package/ecomplus-stores/barra-doce/functions/ssr/content/settings.json +3 -3
  11. package/ecomplus-stores/barra-doce/functions/ssr/package.json +7 -7
  12. package/ecomplus-stores/barra-doce/functions/ssr/src/assets/style.css +2 -2
  13. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopFooter.vue +149 -0
  14. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeader.vue +2 -2
  15. package/ecomplus-stores/barra-doce/functions/ssr/src/layouts/PageFooter.astro +68 -0
  16. package/ecomplus-stores/barra-doce/functions/ssr/src/layouts/PageHeader.astro +1 -1
  17. package/ecomplus-stores/barra-doce/functions/ssr/src/main/Home.astro +6 -6
  18. package/ecomplus-stores/barra-doce/functions/ssr/src/pages/index.astro +2 -0
  19. package/ecomplus-stores/barra-doce/functions/with-apps/package.json +3 -3
  20. package/ecomplus-stores/barra-doce/package.json +2 -2
  21. package/ecomplus-stores/iluminim/.idx/dev.nix +24 -0
  22. package/ecomplus-stores/iluminim/functions/many/package.json +3 -3
  23. package/ecomplus-stores/iluminim/functions/ssr/content/extra-pages/contato.json +11 -0
  24. package/ecomplus-stores/iluminim/functions/ssr/content/extra-pages/terms.json +11 -0
  25. package/ecomplus-stores/iluminim/functions/ssr/content/extra-pages/trocas.json +11 -0
  26. package/ecomplus-stores/iluminim/functions/ssr/content/layout.json +30 -0
  27. package/ecomplus-stores/iluminim/functions/ssr/package.json +7 -7
  28. package/ecomplus-stores/iluminim/functions/ssr/src/assets/style.css +2 -2
  29. package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopFooter.vue +149 -0
  30. package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopHeader.vue +2 -2
  31. package/ecomplus-stores/iluminim/functions/ssr/src/layouts/PageFooter.astro +68 -0
  32. package/ecomplus-stores/iluminim/functions/ssr/src/layouts/PageHeader.astro +1 -1
  33. package/ecomplus-stores/iluminim/functions/ssr/src/pages/index.astro +2 -0
  34. package/ecomplus-stores/iluminim/functions/with-apps/package.json +3 -3
  35. package/ecomplus-stores/iluminim/package.json +2 -2
  36. package/ecomplus-stores/monocard/.idx/dev.nix +24 -0
  37. package/ecomplus-stores/monocard/functions/ssr/package.json +1 -1
  38. package/ecomplus-stores/tia-sonia/.idx/dev.nix +24 -0
  39. package/package.json +6 -6
  40. package/packages/api/package.json +1 -1
  41. package/packages/apps/affilate-program/package.json +1 -1
  42. package/packages/apps/correios/package.json +5 -3
  43. package/packages/apps/correios/tests/calculate-shipping.test.mjs +45 -0
  44. package/packages/apps/custom-payment/package.json +1 -1
  45. package/packages/apps/custom-shipping/package.json +4 -2
  46. package/packages/apps/custom-shipping/tests/calculate-shipping.test.mjs +37 -0
  47. package/packages/apps/datafrete/package.json +2 -2
  48. package/packages/apps/discounts/package.json +1 -1
  49. package/packages/apps/emails/package.json +1 -1
  50. package/packages/apps/fb-conversions/package.json +2 -2
  51. package/packages/apps/flash-courier/package.json +2 -2
  52. package/packages/apps/frenet/package.json +2 -2
  53. package/packages/apps/galaxpay/package.json +2 -2
  54. package/packages/apps/google-analytics/package.json +2 -2
  55. package/packages/apps/jadlog/package.json +2 -2
  56. package/packages/apps/loyalty-points/package.json +4 -2
  57. package/packages/apps/loyalty-points/tests/1-list-payments.test.mjs +37 -0
  58. package/packages/apps/loyalty-points/tests/2-create-transaction.test.mjs +41 -0
  59. package/packages/apps/melhor-envio/package.json +2 -2
  60. package/packages/apps/mercadopago/package.json +5 -3
  61. package/packages/apps/mercadopago/tests/1-list-payments.test.mjs +37 -0
  62. package/packages/apps/mercadopago/tests/2-create-transaction.test.mjs +42 -0
  63. package/packages/apps/pagarme/package.json +2 -2
  64. package/packages/apps/paghiper/package.json +2 -2
  65. package/packages/apps/pix/package.json +2 -2
  66. package/packages/apps/tiny-erp/package.json +2 -2
  67. package/packages/apps/webhooks/package.json +2 -2
  68. package/packages/cli/lib/cli.js +5 -1
  69. package/packages/cli/package.json +1 -1
  70. package/packages/cli/src/cli.ts +5 -1
  71. package/packages/config/package.json +1 -1
  72. package/packages/emails/package.json +2 -2
  73. package/packages/eslint/package.json +5 -5
  74. package/packages/events/package.json +1 -1
  75. package/packages/feeds/package.json +1 -1
  76. package/packages/firebase/package.json +2 -2
  77. package/packages/i18n/lib/en_us/i19allProducts.txt +1 -0
  78. package/packages/i18n/lib/en_us/i19institutional.txt +1 -0
  79. package/packages/i18n/lib/en_us.d.ts +2 -0
  80. package/packages/i18n/lib/en_us.js +2 -0
  81. package/packages/i18n/lib/en_us.js.map +1 -1
  82. package/packages/i18n/lib/pt_br/i19allProducts.txt +1 -0
  83. package/packages/i18n/lib/pt_br/i19institutional.txt +1 -0
  84. package/packages/i18n/lib/pt_br.d.ts +2 -0
  85. package/packages/i18n/lib/pt_br.js +2 -0
  86. package/packages/i18n/lib/pt_br.js.map +1 -1
  87. package/packages/i18n/package.json +1 -1
  88. package/packages/i18n/src/en_us.ts +2 -0
  89. package/packages/i18n/src/pt_br.ts +2 -0
  90. package/packages/modules/package.json +4 -3
  91. package/packages/modules/tests/modules.test.mjs +7 -8
  92. package/packages/passport/package.json +1 -1
  93. package/packages/ssr/lib/firebase/serve-storefront.js +44 -33
  94. package/packages/ssr/lib/firebase/serve-storefront.js.map +1 -1
  95. package/packages/ssr/package.json +6 -6
  96. package/packages/ssr/src/firebase/serve-storefront.ts +45 -34
  97. package/packages/storefront/config/storefront.cms.js +3 -1
  98. package/packages/storefront/config/storefront.config.mjs +8 -2
  99. package/packages/storefront/dist/client/_astro/{Carousel.63d511ab.js → Carousel.926668f2.js} +1 -1
  100. package/packages/storefront/dist/client/_astro/CartSidebar.eadba34f.js +1 -0
  101. package/packages/storefront/dist/client/_astro/HeroSlider.1f0524aa.js +1 -0
  102. package/packages/storefront/dist/client/_astro/PitchBar.7407eeaf.js +1 -0
  103. package/packages/storefront/dist/client/_astro/Prices.562a32ab.js +1 -0
  104. package/packages/storefront/dist/client/_astro/ProductShelf.763cd2ca.js +1 -0
  105. package/packages/storefront/dist/client/_astro/SearchModal.cffd4c2d.js +1 -0
  106. package/packages/storefront/dist/client/_astro/ShopHeader.126900a6.js +4 -0
  107. package/packages/storefront/dist/client/_astro/_...slug_.36cd433d.css +1 -0
  108. package/packages/storefront/dist/client/_astro/_plugin-vue_export-helper.ee681fa8.js +1 -0
  109. package/packages/storefront/dist/client/_astro/api.a2eda23e.js +1 -0
  110. package/packages/storefront/dist/client/_astro/client.e6d9439a.js +1 -0
  111. package/packages/storefront/dist/client/_astro/{firebase-app.1df8af9a.js → firebase-app.93857bfb.js} +121 -91
  112. package/packages/storefront/dist/client/_astro/format-money.923559cc.js +1 -0
  113. package/packages/storefront/dist/client/_astro/img.ec6ba316.js +1 -0
  114. package/packages/storefront/dist/client/_astro/index.709ac149.js +1 -0
  115. package/packages/storefront/dist/client/_astro/modules-info.48980668.js +1 -0
  116. package/packages/storefront/dist/client/manifest.webmanifest +1 -1
  117. package/packages/storefront/dist/client/sw.js +1 -1
  118. package/packages/storefront/dist/server/chunks/CartSidebar.2b555408.mjs +393 -0
  119. package/packages/storefront/dist/server/chunks/SearchModal.f418e188.mjs +44 -0
  120. package/packages/storefront/dist/server/chunks/_...d32bcc0c.mjs +35 -0
  121. package/packages/storefront/dist/server/chunks/{account@_@astro.a02ffb0b.mjs → account@_@astro.0106855f.mjs} +12 -4
  122. package/packages/storefront/dist/server/chunks/{astro.a7611b51.mjs → astro.bb5b7191.mjs} +141 -91
  123. package/packages/storefront/dist/server/chunks/{_...5323ec5a.mjs → endpoint@_@js.35807882.mjs} +12 -4
  124. package/packages/storefront/dist/server/chunks/{index@_@astro.d898498a.mjs → index@_@astro.477f5af1.mjs} +12 -4
  125. package/packages/storefront/dist/server/chunks/{index@_@astro.42c693b9.mjs → index@_@astro.e5a61d6e.mjs} +12 -4
  126. package/packages/storefront/dist/server/chunks/pages/{_...slug_.astro.0f33557e.mjs → _...slug_.astro.fd8a229f.mjs} +673 -937
  127. package/packages/storefront/dist/server/chunks/pages/{account.astro.9325adb2.mjs → account.astro.3b21bff8.mjs} +1 -1
  128. package/packages/storefront/dist/server/chunks/pages/endpoint.js.247079ba.mjs +119 -0
  129. package/packages/storefront/dist/server/chunks/pages/{index.astro.0f31fa39.mjs → index.astro.dab642f5.mjs} +605 -58
  130. package/packages/storefront/dist/server/chunks/pages/{~fallback.astro.bd93f01e.mjs → ~fallback.astro.7630c0d6.mjs} +25 -7
  131. package/packages/storefront/dist/server/chunks/{~fallback@_@astro.d17419ae.mjs → ~fallback@_@astro.65227dd7.mjs} +12 -4
  132. package/packages/storefront/dist/server/entry.mjs +28 -11
  133. package/packages/storefront/dist/server/manifest.webmanifest +1 -1
  134. package/packages/storefront/dist/server/renderers.mjs +80 -25
  135. package/packages/storefront/package.json +9 -8
  136. package/packages/storefront/src/helpers/server-data.ts +14 -17
  137. package/packages/storefront/src/images/use-ssr-picture.ts +18 -3
  138. package/packages/storefront/src/lib/components/BannerPictures.astro +4 -4
  139. package/packages/storefront/src/lib/components/PaymentMethodFlag.vue +2 -2
  140. package/packages/storefront/src/lib/components/SharedData.astro +1 -1
  141. package/packages/storefront/src/lib/composables/use-shared-data.ts +18 -3
  142. package/packages/storefront/src/lib/content.d.ts +36 -2
  143. package/packages/storefront/src/lib/layouts/Base.astro +3 -2
  144. package/packages/storefront/src/lib/layouts/use-page-main.ts +2 -2
  145. package/packages/storefront/src/lib/ssr-context.ts +1 -1
  146. package/packages/test-base/CHANGELOG.md +1 -0
  147. package/packages/test-base/README.md +7 -0
  148. package/packages/test-base/lib/endpoints.js +23 -0
  149. package/packages/test-base/lib/endpoints.js.map +1 -0
  150. package/packages/test-base/lib/index.js +4 -0
  151. package/packages/test-base/lib/index.js.map +1 -0
  152. package/packages/test-base/lib/playloads.js +14 -0
  153. package/packages/test-base/lib/playloads.js.map +1 -0
  154. package/packages/test-base/package.json +28 -0
  155. package/packages/test-base/payloads/calculate-shipping.json +37 -0
  156. package/packages/test-base/payloads/create-transaction.json +116 -0
  157. package/packages/test-base/payloads/list-payments.json +125 -0
  158. package/packages/test-base/src/endpoints.ts +37 -0
  159. package/packages/test-base/src/index.ts +3 -0
  160. package/packages/test-base/src/playloads.ts +24 -0
  161. package/packages/test-base/tsconfig.json +3 -0
  162. package/packages/types/package.json +1 -1
  163. package/ecomplus-stores/barra-doce/functions/ssr/content/extra-pages/.gitkeep +0 -0
  164. package/ecomplus-stores/iluminim/functions/ssr/content/extra-pages/.gitkeep +0 -0
  165. package/packages/storefront/dist/client/_astro/HeroSlider.8d2ea532.js +0 -1
  166. package/packages/storefront/dist/client/_astro/PitchBar.c2a2ad79.js +0 -1
  167. package/packages/storefront/dist/client/_astro/Prices.8572765c.js +0 -1
  168. package/packages/storefront/dist/client/_astro/ProductShelf.4a105932.js +0 -1
  169. package/packages/storefront/dist/client/_astro/ShopHeader.2400b065.js +0 -4
  170. package/packages/storefront/dist/client/_astro/_...slug_.a786e016.css +0 -1
  171. package/packages/storefront/dist/client/_astro/_plugin-vue_export-helper.48e557ba.js +0 -1
  172. package/packages/storefront/dist/client/_astro/client.9dbf6b61.js +0 -1
  173. package/packages/storefront/dist/client/_astro/ecom-icon_CDmhA.png +0 -0
  174. package/packages/storefront/dist/client/_astro/ecom-icon_Z27EX9f.png +0 -0
  175. package/packages/storefront/dist/client/_astro/ecom-icon_Zo1CLq.png +0 -0
  176. package/packages/storefront/dist/client/_astro/headphone_22qtrt.avif +0 -0
  177. package/packages/storefront/dist/client/_astro/headphone_247ud8.avif +0 -0
  178. package/packages/storefront/dist/client/_astro/headphone_Z1hoMcQ.webp +0 -0
  179. package/packages/storefront/dist/client/_astro/headphone_Z1j5MXv.webp +0 -0
  180. package/packages/storefront/dist/client/_astro/img.7def76a1.js +0 -1
  181. package/packages/storefront/dist/client/_astro/index.c0c35ead.js +0 -1
  182. package/packages/storefront/dist/client/_astro/logo_144owC.webp +0 -0
  183. package/packages/storefront/dist/client/_astro/logo_1ug3XF.png +0 -0
  184. package/packages/storefront/dist/client/_astro/logo_Z1EIN1I.avif +0 -0
  185. package/packages/storefront/dist/client/_astro/passion_29BEzB.webp +0 -0
  186. package/packages/storefront/dist/client/_astro/passion_2sykkb.avif +0 -0
  187. package/packages/storefront/dist/client/_astro/passion_HYj6i.webp +0 -0
  188. package/packages/storefront/dist/client/_astro/passion_Z18ANwS.avif +0 -0
  189. package/packages/storefront/dist/client/_astro/passion_ZK2FPz.webp +0 -0
  190. package/packages/storefront/dist/client/_astro/passion_pVNbE.avif +0 -0
  191. package/packages/storefront/dist/client/_astro/rect8589_1EUYOa.webp +0 -0
  192. package/packages/storefront/dist/client/_astro/rect8589_1Sqf3x.png +0 -0
  193. package/packages/storefront/dist/client/_astro/rect8589_1VeSii.avif +0 -0
  194. package/packages/storefront/dist/client/_astro/rect8589_2wFECM.png +0 -0
  195. package/packages/storefront/dist/client/_astro/rect8589_7mg8W.png +0 -0
  196. package/packages/storefront/dist/client/_astro/rect8589_Kv492.webp +0 -0
  197. package/packages/storefront/dist/client/_astro/rect8589_Z1DNkkN.webp +0 -0
  198. package/packages/storefront/dist/client/_astro/rect8589_Z1IS4wy.avif +0 -0
  199. package/packages/storefront/dist/client/_astro/rect8589_Zt4vbx.avif +0 -0
  200. package/packages/storefront/dist/client/_astro/rect859_1Bqr36.webp +0 -0
  201. package/packages/storefront/dist/client/_astro/rect859_1pj5UP.png +0 -0
  202. package/packages/storefront/dist/client/_astro/rect859_2dVuzq.avif +0 -0
  203. package/packages/storefront/dist/client/_astro/rect859_HaXay.png +0 -0
  204. package/packages/storefront/dist/client/_astro/rect859_Z100iy0.png +0 -0
  205. package/packages/storefront/dist/client/_astro/rect859_Z2i1RBz.avif +0 -0
  206. package/packages/storefront/dist/client/_astro/rect859_ZMRWqJ.webp +0 -0
  207. package/packages/storefront/dist/client/_astro/rect859_mPQHw.avif +0 -0
  208. package/packages/storefront/dist/client/_astro/rect859_xyq7d.webp +0 -0
  209. package/packages/storefront/dist/client/_astro/rect89_1DkX0O.webp +0 -0
  210. package/packages/storefront/dist/client/_astro/rect89_2uIqYp.avif +0 -0
  211. package/packages/storefront/dist/client/_astro/rect89_Z1rGPGT.webp +0 -0
  212. package/packages/storefront/dist/client/_astro/rect89_ZAjmIj.avif +0 -0
  213. package/packages/storefront/dist/client/~fallback.html +0 -98
  214. package/packages/storefront/dist/client/~index.html +0 -134
  215. package/packages/storefront/dist/server/images.dist.csv +0 -38
  216. package/packages/storefront/dist/server/images.src.csv +0 -11
  217. package/packages/storefront/dist/server/stylesheets.csv +0 -1
@@ -106,11 +106,11 @@ jobs:
106
106
  ${{ steps.npm-paths.outputs.LIB_PATH }}
107
107
  ${{ steps.npm-paths.outputs.BIN_PATH }}
108
108
  ~/.npm-global/bin
109
- key: ${{ runner.os }}-npm-globals-firebase-tools-12.3.1
109
+ key: ${{ runner.os }}-npm-globals-firebase-tools-12.5.2
110
110
 
111
111
  - if: steps.npm-g-cache.outputs.cache-hit != 'true'
112
112
  shell: bash
113
- run: npm install -g firebase-tools@12.3.1
113
+ run: npm install -g firebase-tools@12.5.2
114
114
 
115
115
  - name: Initialize Firebase emulators
116
116
  shell: bash
package/CHANGELOG.md CHANGED
@@ -2,6 +2,49 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [0.26.0](https://github.com/ecomplus/cloud-commerce/compare/v0.25.0...v0.26.0) (2023-08-28)
6
+
7
+
8
+ ### ⚠ BREAKING CHANGES
9
+
10
+ * **storefront:** `useSharedData` composable now returns a promise
11
+
12
+ ### Features
13
+
14
+ * **i18n:** Add `i19allProducts` and `i19institutional` ([131a7e3](https://github.com/ecomplus/cloud-commerce/commit/131a7e3cc2d1dfdf995ae4c1eb92dd0cbbec3e12))
15
+ * **ssr:** New optional `SSR_SET_LINK_HEADER` env (true by default) ([e8481a7](https://github.com/ecomplus/cloud-commerce/commit/e8481a7bd78e6caebd6e37776e6a030425cff11f))
16
+ * **storefront:** Mannualy set `´PageContent` to more flexible interface ([820d716](https://github.com/ecomplus/cloud-commerce/commit/820d7160e84d71391998139c28ec606957160f91))
17
+ * **storefront:** Update VueUse to v10.4.0, UnoCSS and Firebase non-major ([88b0bcc](https://github.com/ecomplus/cloud-commerce/commit/88b0bcc944f71fc7fe85d8da837b63c6e1bb110d))
18
+ * **storefront:** Use event emitter on `useSharedData` to support optional awaited value ([851ed67](https://github.com/ecomplus/cloud-commerce/commit/851ed67037ebc1552540bf8e4f7d1797c0807c14))
19
+
20
+
21
+ ### Bug Fixes
22
+
23
+ * **deps:** Update non-major dependencies ([#221](https://github.com/ecomplus/cloud-commerce/issues/221)) [skip ci] ([0191eff](https://github.com/ecomplus/cloud-commerce/commit/0191eff3ac0f5fb9cb1cdb91479c28d0dc0f3036))
24
+ * **i18n:** Fix `i19allProducts` ([3a09c25](https://github.com/ecomplus/cloud-commerce/commit/3a09c2553d819a3b4dadbfe3f3355c7defa6453d))
25
+ * **storefront:** Edit `LayoutContent` typedef for extendable footer and header content ([2edc576](https://github.com/ecomplus/cloud-commerce/commit/2edc5769865b212efeeace9546d7cf33783ee2d9))
26
+ * **storefront:** Extending `PageContent` typedef for extra pages and blog posts ([16a4b3e](https://github.com/ecomplus/cloud-commerce/commit/16a4b3e6d6bd1530bba6c19581a5b1a982b8132c))
27
+ * **storefront:** Fix CMS `getContent` to escape folder hidden files and clear not .json ext ([e0b5563](https://github.com/ecomplus/cloud-commerce/commit/e0b55635abeb9c1d083006937f9b4fe3803e3b0b))
28
+ * **storefront:** Update Astro to v2.10.14 ([4d00a98](https://github.com/ecomplus/cloud-commerce/commit/4d00a984d56d1cc15b42d04d2d1520690b5e2bbb))
29
+
30
+ ## [0.25.0](https://github.com/ecomplus/cloud-commerce/compare/v0.24.1...v0.25.0) (2023-08-23)
31
+
32
+
33
+ ### ⚠ BREAKING CHANGES
34
+
35
+ * **cli:** Host is now exposed by default on dev (default) CLI command, SSR function dev script should not contain --host and --port options
36
+ * **storefront:** Stop exporing non-reactive globals `settings` and `apiContext` from `@@sf/sf-lib`
37
+
38
+ ### Bug Fixes
39
+
40
+ * **cli:** Update `cloudcommerce [dev]` command to bypass --host and --port args ([e55e438](https://github.com/ecomplus/cloud-commerce/commit/e55e4383a8de2a9ff1d65b0af766c3e8980b1121))
41
+ * **deps:** Update non-major dependencies ([#216](https://github.com/ecomplus/cloud-commerce/issues/216)) ([377e4b0](https://github.com/ecomplus/cloud-commerce/commit/377e4b0533cb41d839afff1cfc4f8c44caeffa0f))
42
+ * **firebase:** Update dependency @google-cloud/pubsub to v4 ([#217](https://github.com/ecomplus/cloud-commerce/issues/217)) ([d5e98b8](https://github.com/ecomplus/cloud-commerce/commit/d5e98b84937a5be3062972e49480fc98bc9ffe70))
43
+ * **ssr:** Redirect not found .css files to unique CSS filepath ([d2dcaf9](https://github.com/ecomplus/cloud-commerce/commit/d2dcaf99551e2581027f07c62a1beddec46ec896))
44
+ * **storefront:** Prevent undefined `import.meta.env` error on config ([83c26f6](https://github.com/ecomplus/cloud-commerce/commit/83c26f660c307e366c139c489e75f8bc2450dc1b))
45
+ * **storefront:** Set `socialNetworks` after route load on SSR ([9d2be60](https://github.com/ecomplus/cloud-commerce/commit/9d2be602937f4d61ca0c96cdc6170a717ff5b3f0))
46
+ * **storefront:** Update Astro to v2.10.12 ([#215](https://github.com/ecomplus/cloud-commerce/issues/215)) ([4ae833f](https://github.com/ecomplus/cloud-commerce/commit/4ae833f25438626e268019e7ea9032a14aa1abf8))
47
+
5
48
  ### [0.24.1](https://github.com/ecomplus/cloud-commerce/compare/v0.24.0...v0.24.1) (2023-08-19)
6
49
 
7
50
 
package/action.yml CHANGED
@@ -133,11 +133,11 @@ runs:
133
133
  ${{ steps.npm-paths.outputs.LIB_PATH }}
134
134
  ${{ steps.npm-paths.outputs.BIN_PATH }}
135
135
  ~/.npm-global/bin
136
- key: ${{ runner.os }}-npm-g-firebase-tools-12.3.1
136
+ key: ${{ runner.os }}-npm-g-firebase-tools-12.5.2
137
137
 
138
138
  - if: ${{ github.event_name == 'push' && steps.npm-g-cache.outputs.cache-hit != 'true' }}
139
139
  shell: bash
140
- run: npm i --location=global firebase-tools@12.3.1
140
+ run: npm i --location=global firebase-tools@12.5.2
141
141
 
142
142
  - if: steps.npm-cache-many.outputs.cache-hit != 'true'
143
143
  name: Install codebase "many" dependencies
@@ -0,0 +1,24 @@
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
+ }
@@ -15,8 +15,8 @@
15
15
  },
16
16
  "main": "index.js",
17
17
  "dependencies": {
18
- "@cloudcommerce/feeds": "^0.24.0",
19
- "@cloudcommerce/firebase": "^0.24.0",
20
- "@cloudcommerce/passport": "^0.24.0"
18
+ "@cloudcommerce/feeds": "^0.25.0",
19
+ "@cloudcommerce/firebase": "^0.25.0",
20
+ "@cloudcommerce/passport": "^0.25.0"
21
21
  }
22
22
  }
@@ -0,0 +1,11 @@
1
+ {
2
+ "title": "Contato",
3
+ "date": "",
4
+ "meta_title": "",
5
+ "meta_description": "",
6
+ "hero": {
7
+ "slides": []
8
+ },
9
+ "body": "",
10
+ "sections": []
11
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "title": "Termos de serviço",
3
+ "date": "",
4
+ "meta_title": "",
5
+ "meta_description": "",
6
+ "hero": {
7
+ "slides": []
8
+ },
9
+ "body": "",
10
+ "sections": []
11
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "title": "Trocas e devoluções",
3
+ "date": "",
4
+ "meta_title": "",
5
+ "meta_description": "",
6
+ "hero": {
7
+ "slides": []
8
+ },
9
+ "body": "",
10
+ "sections": []
11
+ }
@@ -27,5 +27,35 @@
27
27
  "alphabetical_sort_submenu": false
28
28
  },
29
29
  "footer": {
30
+ "categories_list": {
31
+ "enabled": true,
32
+ "title": "",
33
+ "categories": []
34
+ },
35
+ "pages_list": {
36
+ "enabled": true,
37
+ "title": "",
38
+ "links": []
39
+ },
40
+ "stamps": [
41
+ {
42
+ "img": "",
43
+ "alt": "Troca garantida",
44
+ "icon": "exchange",
45
+ "href": "/p/trocas"
46
+ },
47
+ {
48
+ "img": "",
49
+ "alt": "Google Navegação Segura",
50
+ "icon": "check",
51
+ "href": "https://transparencyreport.google.com/safe-browsing/search?url={domain}"
52
+ },
53
+ {
54
+ "img": "",
55
+ "alt": "Conexão SSL",
56
+ "icon": "lock",
57
+ "href": ""
58
+ }
59
+ ]
30
60
  }
31
61
  }
@@ -1,7 +1,7 @@
1
1
  {
2
- "domain": "ecom2-demo.web.app",
3
- "name": "E-Com Plus demoStore",
4
- "description": "My PWA Shop",
2
+ "domain": "barradoce-cf.ecomplus.app",
3
+ "name": "BarraDoce",
4
+ "description": "Loja de utensílios de confeitaria e acessórios de festa. Tudo o que precisa para fazer bolos, chocolates, biscoitos e muito mais.",
5
5
  "logo": "/img/uploads/logo-barradoce.webp",
6
6
  "icon": "/img/uploads/ecom-icon.png",
7
7
  "primary_color": "#f06606",
@@ -3,7 +3,7 @@
3
3
  "private": true,
4
4
  "type": "module",
5
5
  "scripts": {
6
- "dev": "astro dev --host",
6
+ "dev": "astro dev",
7
7
  "build": "bash scripts/build.sh",
8
8
  "build:static": "BUILD_OUTPUT=static astro build",
9
9
  "serve": "firebase emulators:start --only functions",
@@ -17,14 +17,14 @@
17
17
  },
18
18
  "main": "index.js",
19
19
  "dependencies": {
20
- "@cloudcommerce/api": "^0.24.0",
21
- "@cloudcommerce/firebase": "^0.24.0",
22
- "@cloudcommerce/ssr": "^0.24.0"
20
+ "@cloudcommerce/api": "^0.25.0",
21
+ "@cloudcommerce/firebase": "^0.25.0",
22
+ "@cloudcommerce/ssr": "^0.25.0"
23
23
  },
24
24
  "devDependencies": {
25
- "@cloudcommerce/i18n": "^0.24.0",
26
- "@cloudcommerce/storefront": "^0.24.0",
27
- "@cloudcommerce/types": "^0.24.0",
25
+ "@cloudcommerce/i18n": "^0.25.0",
26
+ "@cloudcommerce/storefront": "^0.25.0",
27
+ "@cloudcommerce/types": "^0.25.0",
28
28
  "@fontsource/croissant-one": "^5.0.5",
29
29
  "@iconify-json/mingcute": "^1.1.7"
30
30
  }
@@ -20,7 +20,7 @@ a, button, button > * {
20
20
 
21
21
  [class*=ui-btn] {
22
22
  @apply not-prose inline-block text-base font-medium px-4 py-2 rounded
23
- border-2 border-transparent active:ring-2;
23
+ border-2 border-transparent focus:ring-1 active:ring-2;
24
24
  }
25
25
  .ui-btn-sm {
26
26
  @apply text-sm px-3 py-1.5 border-1;
@@ -61,5 +61,5 @@ a, button, button > * {
61
61
  }
62
62
 
63
63
  .ui-section {
64
- @apply container mx-auto px-4 sm:px-0 my-6 md:my-8;
64
+ @apply container 2xl:max-w-7xl mx-auto px-4 sm:px-2 my-6 md:my-8;
65
65
  }
@@ -0,0 +1,149 @@
1
+ <template>
2
+ <footer class="w-screen bg-base-50 border-t border-base-100 py-2">
3
+ <div class="ui-section">
4
+ <div class="pb-7 border-b border-base-200
5
+ flex justify-between flex-wrap lg:flex-nowrap sm:gap-x-10 gap-y-5">
6
+ <div class="shrink">
7
+ <slot name="logo" />
8
+ <div v-if="$settings.description" class="prose">
9
+ <p>{{ $settings.description }}</p>
10
+ </div>
11
+ <div class="flex gap-2 text-base-500">
12
+ <span v-for="(href, network) in socialNetworks" :key="network">
13
+ <SocialNetworkLink :network="network" class="p-1 hover:text-primary">
14
+ <template v-if="network === 'whatsapp'" #append>
15
+ <span class="ml-1 text-sm text-base-600">
16
+ {{ $settings.whatsapp }}
17
+ </span>
18
+ </template>
19
+ </SocialNetworkLink>
20
+ </span>
21
+ </div>
22
+ <div v-if="$settings.address || $settings.phone" class="mt-3 text-base-700">
23
+ <address v-if="$settings.address" class="inline-block mr-4">
24
+ {{ $settings.address }}
25
+ </address>
26
+ <ALink
27
+ v-if="$settings.phone"
28
+ :href="`tel:${$settings.phone.replace(/\D/g, '')}`"
29
+ class="hover:text-primary"
30
+ >
31
+ <i class="i-phone mr-0.5"></i>
32
+ {{ $settings.phone }}
33
+ </ALink>
34
+ </div>
35
+ </div>
36
+ <div v-if="categories?.length" class="basis-1/2 sm:basis-auto">
37
+ <div class="text-lg font-medium mb-2.5">
38
+ {{ categoriesColTitle || $t.i19categories }}
39
+ </div>
40
+ <ul
41
+ class="text-sm"
42
+ :class="categories.length > 4
43
+ ? 'grid md:grid-cols-2 gap-x-5 gap-y-1.5' : 'space-y-1.5'"
44
+ >
45
+ <li v-for="({ name, slug }, i) in categories" :key="`c-${i}`">
46
+ <ALink :href="`/${slug}`" class="ui-link text-base-600">
47
+ {{ name }}
48
+ </ALink>
49
+ </li>
50
+ <li>
51
+ <ALink href="/s" class="ui-link text-base-900">
52
+ {{ $t.i19allProducts }}
53
+ </ALink>
54
+ </li>
55
+ </ul>
56
+ </div>
57
+ <div v-if="pageLinks?.length" class="basis-1/2 sm:basis-auto">
58
+ <div class="text-lg font-medium mb-2.5">
59
+ {{ pagesColTitle || $t.i19institutional }}
60
+ </div>
61
+ <ul
62
+ class="text-sm"
63
+ :class="pageLinks.length > 5
64
+ ? 'grid md:grid-cols-2 gap-x-5 gap-y-1.5' : 'space-y-1.5'"
65
+ >
66
+ <li v-for="({ title, href }, i) in pageLinks" :key="`p-${i}`">
67
+ <ALink :href="href" class="ui-link text-base-600">
68
+ {{ title }}
69
+ </ALink>
70
+ </li>
71
+ </ul>
72
+ </div>
73
+ </div>
74
+ </div>
75
+ <div class="ui-section">
76
+ <div class="flex flex-wrap lg:flex-nowrap justify-between items-start gap-5">
77
+ <ul class="flex gap-y-3 gap-x-6 lg:gap-x-8 items-center
78
+ md:flex-wrap mx-auto md:mx-0 overflow-x-auto md:overflow-hidden">
79
+ <li v-for="(stamp, i) in stamps" :key="i">
80
+ <ALink :href="stamp.href?.replace('{domain}', $settings.domain || '')">
81
+ <slot :name="`picture-${i}`" />
82
+ <span v-if="!stamp.img" class="flex items-center">
83
+ <span
84
+ v-if="stamp.icon"
85
+ class="text-4xl mr-2
86
+ [&>*]:bg-gradient-to-br [&>*]:from-secondary-300 [&>*]:to-secondary-600"
87
+ >
88
+ <i v-if="stamp.icon === 'lock'" class="i-lock-closed"></i>
89
+ <i v-else-if="stamp.icon === 'check'" class="i-check-badge"></i>
90
+ <i v-else class="i-arrow-path-rounded-square"></i>
91
+ </span>
92
+ <span class="text-sm font-medium text-base-600 max-w-[140px]">
93
+ {{ stamp.alt }}
94
+ <i
95
+ v-if="stamp.href && stamp.href.charAt(0) !== '/'"
96
+ class="bg-base-400 ml-0.5 i-arrow-top-right-on-square"
97
+ ></i>
98
+ </span>
99
+ </span>
100
+ </ALink>
101
+ </li>
102
+ </ul>
103
+ <div class="flex flex-wrap md:flex-nowrap justify-end items-center
104
+ gap-4 text-2xl mx-auto md:mx-0 overflow-x-auto md:overflow-hidden">
105
+ <PaymentMethodFlag
106
+ v-for="paymentMethod in $settings.payment_methods"
107
+ :key="paymentMethod"
108
+ :flag="paymentMethod"
109
+ />
110
+ </div>
111
+ </div>
112
+ <div class="mt-7 text-xs text-center md:text-left
113
+ md:flex justify-between gap-4">
114
+ <div class="mb-3 md:mb-0">
115
+ @ {{ new Date().getFullYear() }} {{ $settings.corporate_name }}
116
+ {{ $settings.address ? `/ ${$settings.address}` : '' }}
117
+ / {{ $settings.doc_number }}
118
+ </div>
119
+ <ALink href="https://www.ecomplus.io/" class="italic text-[#37003c]">
120
+ powered by <b>E-Com Plus</b>
121
+ </ALink>
122
+ </div>
123
+ </div>
124
+ </footer>
125
+ </template>
126
+
127
+ <script setup lang="ts">
128
+ import type { Categories } from '@cloudcommerce/api/types';
129
+ import type { LayoutContent } from '@@sf/content';
130
+ import { socialNetworks } from '@@sf/sf-lib';
131
+ import SocialNetworkLink from '@@sf/components/SocialNetworkLink.vue';
132
+ import PaymentMethodFlag from '@@sf/components/PaymentMethodFlag.vue';
133
+
134
+ export interface Props {
135
+ stamps?: LayoutContent['footer']['stamps'];
136
+ categories?: Array<Partial<Categories> & {
137
+ name: string;
138
+ slug: string;
139
+ }>;
140
+ categoriesColTitle?: string;
141
+ pageLinks?: Array<{
142
+ title: string;
143
+ href: string;
144
+ }>;
145
+ pagesColTitle?: string;
146
+ }
147
+
148
+ defineProps<Props>();
149
+ </script>
@@ -7,8 +7,8 @@
7
7
  isSticky ? 'backdrop-blur-md shadow py-2 md:py-3' : 'py-3 sm:py-4 md:py-5',
8
8
  ]"
9
9
  >
10
- <div class="container 2xl:max-w-7xl
11
- mx-auto px-1 lg:pr-3 lg:pl-5 xl:pr-7 xl:pl-9 2xl:pr-0 2xl:pl-2">
10
+ <div class="w-screen lg:w-[calc(100vw-1rem)] xl:max-w-[82rem] 2xl:max-w-[85rem]
11
+ mx-auto px-1 sm:pl-2 sm:pr-2.5 lg:px-1">
12
12
  <div class="flex justify-between items-center">
13
13
  <div
14
14
  class="basis-1/4 lg:basis-auto lg:me-5"
@@ -0,0 +1,68 @@
1
+ ---
2
+ import { filterMainCategories } from '@@sf/composables/use-shop-header';
3
+ import useSharedData from '@@sf/composables/use-shared-data';
4
+ import Picture from '@@sf/components/Picture.astro';
5
+ import {
6
+ type Props as ShopFooterProps,
7
+ default as ShopFooter,
8
+ } from '~/components/ShopFooter.vue';
9
+
10
+ const { routeContext } = Astro.locals;
11
+ const { settings, getContent, isHomepage } = routeContext;
12
+ const LogoHeading = isHomepage ? 'h2' : 'h3';
13
+ const layoutContent = await getContent('layout');
14
+ const {
15
+ footer: {
16
+ stamps,
17
+ categories_list: categoriesList,
18
+ pages_list: pagesList,
19
+ },
20
+ } = layoutContent;
21
+ let mainCategories: ShopFooterProps['categories'];
22
+ let pageLinks: ShopFooterProps['pageLinks'];
23
+ if (categoriesList?.enabled) {
24
+ if (categoriesList.categories?.length) {
25
+ mainCategories = categoriesList.categories;
26
+ } else {
27
+ // Will wait and reuse categories loaded from <PageHeader>
28
+ const { value: categories } = await useSharedData({ field: 'categories' });
29
+ mainCategories = filterMainCategories(categories);
30
+ }
31
+ }
32
+ if (pagesList?.enabled) {
33
+ if (pagesList.links?.length) {
34
+ pageLinks = pagesList.links;
35
+ } else {
36
+ pageLinks = [];
37
+ const pageSlugs = await getContent('extra-pages/');
38
+ for (let i = 0; i < pageSlugs.length; i++) {
39
+ const { title } = await getContent(`extra-pages/${pageSlugs[i]}`);
40
+ if (title) {
41
+ pageLinks.push({ title, href: `/p/${pageSlugs[i]}` });
42
+ }
43
+ }
44
+ }
45
+ }
46
+ ---
47
+
48
+ <ShopFooter
49
+ {stamps}
50
+ categories={mainCategories}
51
+ categoriesColTitle={categoriesList?.title}
52
+ {pageLinks}
53
+ pagesColTitle={pagesList?.title}
54
+ >
55
+ <Fragment slot="logo">
56
+ <a href="/">
57
+ <LogoHeading>
58
+ <Picture
59
+ src={settings.logo}
60
+ alt={settings.name}
61
+ widths={[300]}
62
+ loading="lazy"
63
+ class="max-w-[150px]"
64
+ />
65
+ </LogoHeading>
66
+ </a>
67
+ </Fragment>
68
+ </ShopFooter>
@@ -12,7 +12,7 @@ const {
12
12
  pitchBar,
13
13
  shopHeader: { categories, ...shopHeader },
14
14
  } = await usePageHeader({ routeContext });
15
- const { inlineClientJS } = useSharedData({
15
+ const { inlineClientJS } = await useSharedData({
16
16
  field: 'categories',
17
17
  value: categories?.map(({ _id, ...c }) => c),
18
18
  });
@@ -14,22 +14,22 @@ const heroSlides = heroSlider.slides;
14
14
  <HeroSlider {...heroSlider} client:load>
15
15
  {heroSlides[0] && <BannerPictures
16
16
  slot="picture-0" {...heroSlides[0]} index={0}
17
- widths={[856, 1024, 1536]} class="max-w-[360px] sm:max-w-screen-lg" />}
17
+ widths={[640, 856, 1024, 1536]} class="max-w-screen-sm sm:max-w-screen-lg" />}
18
18
  {heroSlides[1] && <BannerPictures
19
19
  slot="picture-1" {...heroSlides[1]} index={1}
20
- widths={[856, 1024, 1536]} class="max-w-[360px] sm:max-w-screen-lg" />}
20
+ widths={[856, 1024, 1536]} class="max-w-screen-sm sm:max-w-screen-lg" />}
21
21
  {heroSlides[2] && <BannerPictures
22
22
  slot="picture-2" {...heroSlides[2]} index={2}
23
- widths={[856, 1024, 1536]} class="max-w-[360px] sm:max-w-screen-lg" />}
23
+ widths={[856, 1024, 1536]} class="max-w-screen-sm sm:max-w-screen-lg" />}
24
24
  {heroSlides[3] && <BannerPictures
25
25
  slot="picture-3" {...heroSlides[3]} index={3}
26
- widths={[856, 1024, 1536]} class="max-w-[360px] sm:max-w-screen-lg" />}
26
+ widths={[856, 1024, 1536]} class="max-w-screen-sm sm:max-w-screen-lg" />}
27
27
  {heroSlides[4] && <BannerPictures
28
28
  slot="picture-4" {...heroSlides[4]} index={4}
29
- widths={[856, 1024, 1536]} class="max-w-[360px] sm:max-w-screen-lg" />}
29
+ widths={[856, 1024, 1536]} class="max-w-screen-sm sm:max-w-screen-lg" />}
30
30
  {heroSlides[5] && <BannerPictures
31
31
  slot="picture-5" {...heroSlides[5]} index={5}
32
- widths={[856, 1024, 1536]} class="max-w-[360px] sm:max-w-screen-lg" />}
32
+ widths={[856, 1024, 1536]} class="max-w-screen-sm sm:max-w-screen-lg" />}
33
33
  <!-- https://github.com/withastro/astro/issues/5066#issuecomment-1277998365 -->
34
34
  </HeroSlider>
35
35
  }
@@ -3,6 +3,7 @@ import loadRouteContext, { RouteContext } from '@@sf/ssr-context';
3
3
  import BaseHead from '@@sf/layouts/BaseHead.astro';
4
4
  import Base from '~/layouts/Base.astro';
5
5
  import PageHeader from '~/layouts/PageHeader.astro';
6
+ import PageFooter from '~/layouts/PageFooter.astro';
6
7
  import HomeMain from '~/main/Home.astro';
7
8
 
8
9
  let routeContext: RouteContext | undefined;
@@ -29,6 +30,7 @@ try {
29
30
  <BaseHead slot="base-head" />
30
31
  <PageHeader />
31
32
  <HomeMain />
33
+ <PageFooter />
32
34
  </Base>
33
35
  }
34
36
  {loadError && <Fragment set:html={loadError.responseHTML} />}
@@ -15,8 +15,8 @@
15
15
  },
16
16
  "main": "index.js",
17
17
  "dependencies": {
18
- "@cloudcommerce/events": "^0.24.0",
19
- "@cloudcommerce/firebase": "^0.24.0",
20
- "@cloudcommerce/modules": "^0.24.0"
18
+ "@cloudcommerce/events": "^0.25.0",
19
+ "@cloudcommerce/firebase": "^0.25.0",
20
+ "@cloudcommerce/modules": "^0.25.0"
21
21
  }
22
22
  }
@@ -23,9 +23,9 @@
23
23
  "url": "https://github.com/ecomplus/cloud-commerce/issues"
24
24
  },
25
25
  "dependencies": {
26
- "@cloudcommerce/cli": "^0.24.0"
26
+ "@cloudcommerce/cli": "^0.25.0"
27
27
  },
28
28
  "devDependencies": {
29
- "@cloudcommerce/eslint": "^0.24.0"
29
+ "@cloudcommerce/eslint": "^0.25.0"
30
30
  }
31
31
  }
@@ -0,0 +1,24 @@
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
+ }
@@ -15,8 +15,8 @@
15
15
  },
16
16
  "main": "index.js",
17
17
  "dependencies": {
18
- "@cloudcommerce/feeds": "^0.24.0",
19
- "@cloudcommerce/firebase": "^0.24.0",
20
- "@cloudcommerce/passport": "^0.24.0"
18
+ "@cloudcommerce/feeds": "^0.25.0",
19
+ "@cloudcommerce/firebase": "^0.25.0",
20
+ "@cloudcommerce/passport": "^0.25.0"
21
21
  }
22
22
  }
@@ -0,0 +1,11 @@
1
+ {
2
+ "title": "Contato",
3
+ "date": "",
4
+ "meta_title": "",
5
+ "meta_description": "",
6
+ "hero": {
7
+ "slides": []
8
+ },
9
+ "body": "",
10
+ "sections": []
11
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "title": "Termos de serviço",
3
+ "date": "",
4
+ "meta_title": "",
5
+ "meta_description": "",
6
+ "hero": {
7
+ "slides": []
8
+ },
9
+ "body": "",
10
+ "sections": []
11
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "title": "Trocas e devoluções",
3
+ "date": "",
4
+ "meta_title": "",
5
+ "meta_description": "",
6
+ "hero": {
7
+ "slides": []
8
+ },
9
+ "body": "",
10
+ "sections": []
11
+ }