cloudcommerce 0.25.0 → 0.26.1

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 (207) hide show
  1. package/.github/workflows/test-e2e.yml +2 -2
  2. package/CHANGELOG.md +32 -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 +6 -6
  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/pages/index.astro +2 -0
  18. package/ecomplus-stores/barra-doce/functions/with-apps/package.json +3 -3
  19. package/ecomplus-stores/barra-doce/package.json +2 -2
  20. package/ecomplus-stores/iluminim/.idx/dev.nix +24 -0
  21. package/ecomplus-stores/iluminim/functions/many/package.json +3 -3
  22. package/ecomplus-stores/iluminim/functions/ssr/content/extra-pages/contato.json +11 -0
  23. package/ecomplus-stores/iluminim/functions/ssr/content/extra-pages/terms.json +11 -0
  24. package/ecomplus-stores/iluminim/functions/ssr/content/extra-pages/trocas.json +11 -0
  25. package/ecomplus-stores/iluminim/functions/ssr/content/layout.json +30 -0
  26. package/ecomplus-stores/iluminim/functions/ssr/package.json +6 -6
  27. package/ecomplus-stores/iluminim/functions/ssr/src/assets/style.css +2 -2
  28. package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopFooter.vue +149 -0
  29. package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopHeader.vue +2 -2
  30. package/ecomplus-stores/iluminim/functions/ssr/src/layouts/PageFooter.astro +68 -0
  31. package/ecomplus-stores/iluminim/functions/ssr/src/layouts/PageHeader.astro +1 -1
  32. package/ecomplus-stores/iluminim/functions/ssr/src/pages/index.astro +2 -0
  33. package/ecomplus-stores/iluminim/functions/with-apps/package.json +3 -3
  34. package/ecomplus-stores/iluminim/package.json +2 -2
  35. package/ecomplus-stores/monocard/.idx/dev.nix +24 -0
  36. package/ecomplus-stores/tia-sonia/.idx/dev.nix +24 -0
  37. package/package.json +6 -6
  38. package/packages/api/package.json +1 -1
  39. package/packages/apps/affilate-program/package.json +1 -1
  40. package/packages/apps/correios/package.json +5 -3
  41. package/packages/apps/correios/tests/calculate-shipping.test.mjs +45 -0
  42. package/packages/apps/custom-payment/package.json +1 -1
  43. package/packages/apps/custom-shipping/package.json +4 -2
  44. package/packages/apps/custom-shipping/tests/calculate-shipping.test.mjs +37 -0
  45. package/packages/apps/datafrete/package.json +2 -2
  46. package/packages/apps/discounts/package.json +1 -1
  47. package/packages/apps/emails/package.json +1 -1
  48. package/packages/apps/fb-conversions/package.json +1 -1
  49. package/packages/apps/flash-courier/package.json +2 -2
  50. package/packages/apps/frenet/package.json +2 -2
  51. package/packages/apps/galaxpay/package.json +2 -2
  52. package/packages/apps/google-analytics/package.json +2 -2
  53. package/packages/apps/jadlog/package.json +2 -2
  54. package/packages/apps/loyalty-points/package.json +4 -2
  55. package/packages/apps/loyalty-points/tests/1-list-payments.test.mjs +37 -0
  56. package/packages/apps/loyalty-points/tests/2-create-transaction.test.mjs +41 -0
  57. package/packages/apps/melhor-envio/package.json +2 -2
  58. package/packages/apps/mercadopago/package.json +5 -3
  59. package/packages/apps/mercadopago/tests/1-list-payments.test.mjs +37 -0
  60. package/packages/apps/mercadopago/tests/2-create-transaction.test.mjs +42 -0
  61. package/packages/apps/pagarme/package.json +2 -2
  62. package/packages/apps/paghiper/package.json +2 -2
  63. package/packages/apps/pix/package.json +2 -2
  64. package/packages/apps/tiny-erp/package.json +2 -2
  65. package/packages/apps/webhooks/package.json +2 -2
  66. package/packages/cli/package.json +1 -1
  67. package/packages/config/package.json +1 -1
  68. package/packages/emails/package.json +2 -2
  69. package/packages/eslint/package.json +4 -4
  70. package/packages/events/package.json +1 -1
  71. package/packages/feeds/package.json +1 -1
  72. package/packages/firebase/package.json +2 -2
  73. package/packages/i18n/lib/en_us/i19allProducts.txt +1 -0
  74. package/packages/i18n/lib/en_us/i19institutional.txt +1 -0
  75. package/packages/i18n/lib/en_us.d.ts +2 -0
  76. package/packages/i18n/lib/en_us.js +2 -0
  77. package/packages/i18n/lib/en_us.js.map +1 -1
  78. package/packages/i18n/lib/pt_br/i19allProducts.txt +1 -0
  79. package/packages/i18n/lib/pt_br/i19institutional.txt +1 -0
  80. package/packages/i18n/lib/pt_br.d.ts +2 -0
  81. package/packages/i18n/lib/pt_br.js +2 -0
  82. package/packages/i18n/lib/pt_br.js.map +1 -1
  83. package/packages/i18n/package.json +1 -1
  84. package/packages/i18n/src/en_us.ts +2 -0
  85. package/packages/i18n/src/pt_br.ts +2 -0
  86. package/packages/modules/package.json +4 -3
  87. package/packages/modules/tests/modules.test.mjs +7 -8
  88. package/packages/passport/package.json +1 -1
  89. package/packages/ssr/lib/firebase/serve-storefront.js +21 -14
  90. package/packages/ssr/lib/firebase/serve-storefront.js.map +1 -1
  91. package/packages/ssr/package.json +6 -5
  92. package/packages/ssr/src/firebase/serve-storefront.ts +20 -14
  93. package/packages/storefront/config/storefront.cms.js +3 -1
  94. package/packages/storefront/dist/client/_astro/{Carousel.63d511ab.js → Carousel.926668f2.js} +1 -1
  95. package/packages/storefront/dist/client/_astro/CartSidebar.eadba34f.js +1 -0
  96. package/packages/storefront/dist/client/_astro/HeroSlider.1f0524aa.js +1 -0
  97. package/packages/storefront/dist/client/_astro/PitchBar.7407eeaf.js +1 -0
  98. package/packages/storefront/dist/client/_astro/Prices.562a32ab.js +1 -0
  99. package/packages/storefront/dist/client/_astro/ProductShelf.763cd2ca.js +1 -0
  100. package/packages/storefront/dist/client/_astro/SearchModal.cffd4c2d.js +1 -0
  101. package/packages/storefront/dist/client/_astro/ShopHeader.126900a6.js +4 -0
  102. package/packages/storefront/dist/client/_astro/_...slug_.36cd433d.css +1 -0
  103. package/packages/storefront/dist/client/_astro/_plugin-vue_export-helper.ee681fa8.js +1 -0
  104. package/packages/storefront/dist/client/_astro/api.a2eda23e.js +1 -0
  105. package/packages/storefront/dist/client/_astro/client.e6d9439a.js +1 -0
  106. package/packages/storefront/dist/client/_astro/{firebase-app.1df8af9a.js → firebase-app.93857bfb.js} +121 -91
  107. package/packages/storefront/dist/client/_astro/format-money.923559cc.js +1 -0
  108. package/packages/storefront/dist/client/_astro/img.ec6ba316.js +1 -0
  109. package/packages/storefront/dist/client/_astro/index.709ac149.js +1 -0
  110. package/packages/storefront/dist/client/_astro/modules-info.48980668.js +1 -0
  111. package/packages/storefront/dist/client/manifest.webmanifest +1 -1
  112. package/packages/storefront/dist/client/sw.js +1 -1
  113. package/packages/storefront/dist/server/chunks/CartSidebar.2b555408.mjs +393 -0
  114. package/packages/storefront/dist/server/chunks/SearchModal.f418e188.mjs +44 -0
  115. package/packages/storefront/dist/server/chunks/_...d32bcc0c.mjs +35 -0
  116. package/packages/storefront/dist/server/chunks/{account@_@astro.a02ffb0b.mjs → account@_@astro.0106855f.mjs} +12 -4
  117. package/packages/storefront/dist/server/chunks/{astro.a7611b51.mjs → astro.bb5b7191.mjs} +141 -91
  118. package/packages/storefront/dist/server/chunks/{_...5323ec5a.mjs → endpoint@_@js.35807882.mjs} +12 -4
  119. package/packages/storefront/dist/server/chunks/{index@_@astro.d898498a.mjs → index@_@astro.477f5af1.mjs} +12 -4
  120. package/packages/storefront/dist/server/chunks/{index@_@astro.42c693b9.mjs → index@_@astro.e5a61d6e.mjs} +12 -4
  121. package/packages/storefront/dist/server/chunks/pages/{_...slug_.astro.0f33557e.mjs → _...slug_.astro.fd8a229f.mjs} +673 -937
  122. package/packages/storefront/dist/server/chunks/pages/{account.astro.9325adb2.mjs → account.astro.3b21bff8.mjs} +1 -1
  123. package/packages/storefront/dist/server/chunks/pages/endpoint.js.247079ba.mjs +119 -0
  124. package/packages/storefront/dist/server/chunks/pages/{index.astro.0f31fa39.mjs → index.astro.dab642f5.mjs} +605 -58
  125. package/packages/storefront/dist/server/chunks/pages/{~fallback.astro.bd93f01e.mjs → ~fallback.astro.7630c0d6.mjs} +25 -7
  126. package/packages/storefront/dist/server/chunks/{~fallback@_@astro.d17419ae.mjs → ~fallback@_@astro.65227dd7.mjs} +12 -4
  127. package/packages/storefront/dist/server/entry.mjs +28 -11
  128. package/packages/storefront/dist/server/manifest.webmanifest +1 -1
  129. package/packages/storefront/dist/server/renderers.mjs +80 -25
  130. package/packages/storefront/package.json +7 -6
  131. package/packages/storefront/src/lib/components/SharedData.astro +1 -1
  132. package/packages/storefront/src/lib/composables/use-shared-data.ts +18 -3
  133. package/packages/storefront/src/lib/content.d.ts +36 -2
  134. package/packages/storefront/src/lib/layouts/Base.astro +3 -2
  135. package/packages/storefront/src/lib/layouts/use-page-main.ts +2 -2
  136. package/packages/test-base/CHANGELOG.md +1 -0
  137. package/packages/test-base/README.md +7 -0
  138. package/packages/test-base/lib/endpoints.js +23 -0
  139. package/packages/test-base/lib/endpoints.js.map +1 -0
  140. package/packages/test-base/lib/index.js +4 -0
  141. package/packages/test-base/lib/index.js.map +1 -0
  142. package/packages/test-base/lib/playloads.js +14 -0
  143. package/packages/test-base/lib/playloads.js.map +1 -0
  144. package/packages/test-base/package.json +28 -0
  145. package/packages/test-base/payloads/calculate-shipping.json +37 -0
  146. package/packages/test-base/payloads/create-transaction.json +116 -0
  147. package/packages/test-base/payloads/list-payments.json +125 -0
  148. package/packages/test-base/src/endpoints.ts +37 -0
  149. package/packages/test-base/src/index.ts +3 -0
  150. package/packages/test-base/src/playloads.ts +24 -0
  151. package/packages/test-base/tsconfig.json +3 -0
  152. package/packages/types/package.json +1 -1
  153. package/ecomplus-stores/barra-doce/functions/ssr/content/extra-pages/.gitkeep +0 -0
  154. package/ecomplus-stores/iluminim/functions/ssr/content/extra-pages/.gitkeep +0 -0
  155. package/packages/storefront/dist/client/_astro/HeroSlider.8d2ea532.js +0 -1
  156. package/packages/storefront/dist/client/_astro/PitchBar.c2a2ad79.js +0 -1
  157. package/packages/storefront/dist/client/_astro/Prices.8572765c.js +0 -1
  158. package/packages/storefront/dist/client/_astro/ProductShelf.4a105932.js +0 -1
  159. package/packages/storefront/dist/client/_astro/ShopHeader.2400b065.js +0 -4
  160. package/packages/storefront/dist/client/_astro/_...slug_.a786e016.css +0 -1
  161. package/packages/storefront/dist/client/_astro/_plugin-vue_export-helper.48e557ba.js +0 -1
  162. package/packages/storefront/dist/client/_astro/client.9dbf6b61.js +0 -1
  163. package/packages/storefront/dist/client/_astro/ecom-icon_CDmhA.png +0 -0
  164. package/packages/storefront/dist/client/_astro/ecom-icon_Z27EX9f.png +0 -0
  165. package/packages/storefront/dist/client/_astro/ecom-icon_Zo1CLq.png +0 -0
  166. package/packages/storefront/dist/client/_astro/headphone_22qtrt.avif +0 -0
  167. package/packages/storefront/dist/client/_astro/headphone_247ud8.avif +0 -0
  168. package/packages/storefront/dist/client/_astro/headphone_Z1hoMcQ.webp +0 -0
  169. package/packages/storefront/dist/client/_astro/headphone_Z1j5MXv.webp +0 -0
  170. package/packages/storefront/dist/client/_astro/img.7def76a1.js +0 -1
  171. package/packages/storefront/dist/client/_astro/index.c0c35ead.js +0 -1
  172. package/packages/storefront/dist/client/_astro/logo_144owC.webp +0 -0
  173. package/packages/storefront/dist/client/_astro/logo_1ug3XF.png +0 -0
  174. package/packages/storefront/dist/client/_astro/logo_Z1EIN1I.avif +0 -0
  175. package/packages/storefront/dist/client/_astro/passion_29BEzB.webp +0 -0
  176. package/packages/storefront/dist/client/_astro/passion_2sykkb.avif +0 -0
  177. package/packages/storefront/dist/client/_astro/passion_HYj6i.webp +0 -0
  178. package/packages/storefront/dist/client/_astro/passion_Z18ANwS.avif +0 -0
  179. package/packages/storefront/dist/client/_astro/passion_ZK2FPz.webp +0 -0
  180. package/packages/storefront/dist/client/_astro/passion_pVNbE.avif +0 -0
  181. package/packages/storefront/dist/client/_astro/rect8589_1EUYOa.webp +0 -0
  182. package/packages/storefront/dist/client/_astro/rect8589_1Sqf3x.png +0 -0
  183. package/packages/storefront/dist/client/_astro/rect8589_1VeSii.avif +0 -0
  184. package/packages/storefront/dist/client/_astro/rect8589_2wFECM.png +0 -0
  185. package/packages/storefront/dist/client/_astro/rect8589_7mg8W.png +0 -0
  186. package/packages/storefront/dist/client/_astro/rect8589_Kv492.webp +0 -0
  187. package/packages/storefront/dist/client/_astro/rect8589_Z1DNkkN.webp +0 -0
  188. package/packages/storefront/dist/client/_astro/rect8589_Z1IS4wy.avif +0 -0
  189. package/packages/storefront/dist/client/_astro/rect8589_Zt4vbx.avif +0 -0
  190. package/packages/storefront/dist/client/_astro/rect859_1Bqr36.webp +0 -0
  191. package/packages/storefront/dist/client/_astro/rect859_1pj5UP.png +0 -0
  192. package/packages/storefront/dist/client/_astro/rect859_2dVuzq.avif +0 -0
  193. package/packages/storefront/dist/client/_astro/rect859_HaXay.png +0 -0
  194. package/packages/storefront/dist/client/_astro/rect859_Z100iy0.png +0 -0
  195. package/packages/storefront/dist/client/_astro/rect859_Z2i1RBz.avif +0 -0
  196. package/packages/storefront/dist/client/_astro/rect859_ZMRWqJ.webp +0 -0
  197. package/packages/storefront/dist/client/_astro/rect859_mPQHw.avif +0 -0
  198. package/packages/storefront/dist/client/_astro/rect859_xyq7d.webp +0 -0
  199. package/packages/storefront/dist/client/_astro/rect89_1DkX0O.webp +0 -0
  200. package/packages/storefront/dist/client/_astro/rect89_2uIqYp.avif +0 -0
  201. package/packages/storefront/dist/client/_astro/rect89_Z1rGPGT.webp +0 -0
  202. package/packages/storefront/dist/client/_astro/rect89_ZAjmIj.avif +0 -0
  203. package/packages/storefront/dist/client/~fallback.html +0 -98
  204. package/packages/storefront/dist/client/~index.html +0 -134
  205. package/packages/storefront/dist/server/images.dist.csv +0 -38
  206. package/packages/storefront/dist/server/images.src.csv +0 -11
  207. 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,38 @@
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.1](https://github.com/ecomplus/cloud-commerce/compare/v0.26.0...v0.26.1) (2023-08-28)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **ssr:** Add `astro-capo` to SSR dependencies ([dbd2f06](https://github.com/ecomplus/cloud-commerce/commit/dbd2f06a79b5eac8cf68f93c7459689fe8cdcb58))
11
+
12
+ ## [0.26.0](https://github.com/ecomplus/cloud-commerce/compare/v0.25.0...v0.26.0) (2023-08-28)
13
+
14
+
15
+ ### ⚠ BREAKING CHANGES
16
+
17
+ * **storefront:** `useSharedData` composable now returns a promise
18
+
19
+ ### Features
20
+
21
+ * **i18n:** Add `i19allProducts` and `i19institutional` ([131a7e3](https://github.com/ecomplus/cloud-commerce/commit/131a7e3cc2d1dfdf995ae4c1eb92dd0cbbec3e12))
22
+ * **ssr:** New optional `SSR_SET_LINK_HEADER` env (true by default) ([e8481a7](https://github.com/ecomplus/cloud-commerce/commit/e8481a7bd78e6caebd6e37776e6a030425cff11f))
23
+ * **storefront:** Mannualy set `´PageContent` to more flexible interface ([820d716](https://github.com/ecomplus/cloud-commerce/commit/820d7160e84d71391998139c28ec606957160f91))
24
+ * **storefront:** Update VueUse to v10.4.0, UnoCSS and Firebase non-major ([88b0bcc](https://github.com/ecomplus/cloud-commerce/commit/88b0bcc944f71fc7fe85d8da837b63c6e1bb110d))
25
+ * **storefront:** Use event emitter on `useSharedData` to support optional awaited value ([851ed67](https://github.com/ecomplus/cloud-commerce/commit/851ed67037ebc1552540bf8e4f7d1797c0807c14))
26
+
27
+
28
+ ### Bug Fixes
29
+
30
+ * **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))
31
+ * **i18n:** Fix `i19allProducts` ([3a09c25](https://github.com/ecomplus/cloud-commerce/commit/3a09c2553d819a3b4dadbfe3f3355c7defa6453d))
32
+ * **storefront:** Edit `LayoutContent` typedef for extendable footer and header content ([2edc576](https://github.com/ecomplus/cloud-commerce/commit/2edc5769865b212efeeace9546d7cf33783ee2d9))
33
+ * **storefront:** Extending `PageContent` typedef for extra pages and blog posts ([16a4b3e](https://github.com/ecomplus/cloud-commerce/commit/16a4b3e6d6bd1530bba6c19581a5b1a982b8132c))
34
+ * **storefront:** Fix CMS `getContent` to escape folder hidden files and clear not .json ext ([e0b5563](https://github.com/ecomplus/cloud-commerce/commit/e0b55635abeb9c1d083006937f9b4fe3803e3b0b))
35
+ * **storefront:** Update Astro to v2.10.14 ([4d00a98](https://github.com/ecomplus/cloud-commerce/commit/4d00a984d56d1cc15b42d04d2d1520690b5e2bbb))
36
+
5
37
  ## [0.25.0](https://github.com/ecomplus/cloud-commerce/compare/v0.24.1...v0.25.0) (2023-08-23)
6
38
 
7
39
 
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.1",
19
- "@cloudcommerce/firebase": "^0.24.1",
20
- "@cloudcommerce/passport": "^0.24.1"
18
+ "@cloudcommerce/feeds": "^0.26.0",
19
+ "@cloudcommerce/firebase": "^0.26.0",
20
+ "@cloudcommerce/passport": "^0.26.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",
@@ -17,14 +17,14 @@
17
17
  },
18
18
  "main": "index.js",
19
19
  "dependencies": {
20
- "@cloudcommerce/api": "^0.24.1",
21
- "@cloudcommerce/firebase": "^0.24.1",
22
- "@cloudcommerce/ssr": "^0.24.1"
20
+ "@cloudcommerce/api": "^0.26.0",
21
+ "@cloudcommerce/firebase": "^0.26.0",
22
+ "@cloudcommerce/ssr": "^0.26.0"
23
23
  },
24
24
  "devDependencies": {
25
- "@cloudcommerce/i18n": "^0.24.1",
26
- "@cloudcommerce/storefront": "^0.24.1",
27
- "@cloudcommerce/types": "^0.24.1",
25
+ "@cloudcommerce/i18n": "^0.26.0",
26
+ "@cloudcommerce/storefront": "^0.26.0",
27
+ "@cloudcommerce/types": "^0.26.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
  });
@@ -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.1",
19
- "@cloudcommerce/firebase": "^0.24.1",
20
- "@cloudcommerce/modules": "^0.24.1"
18
+ "@cloudcommerce/events": "^0.26.0",
19
+ "@cloudcommerce/firebase": "^0.26.0",
20
+ "@cloudcommerce/modules": "^0.26.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.1"
26
+ "@cloudcommerce/cli": "^0.26.0"
27
27
  },
28
28
  "devDependencies": {
29
- "@cloudcommerce/eslint": "^0.24.1"
29
+ "@cloudcommerce/eslint": "^0.26.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.1",
19
- "@cloudcommerce/firebase": "^0.24.1",
20
- "@cloudcommerce/passport": "^0.24.1"
18
+ "@cloudcommerce/feeds": "^0.26.0",
19
+ "@cloudcommerce/firebase": "^0.26.0",
20
+ "@cloudcommerce/passport": "^0.26.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
+ }
@@ -23,5 +23,35 @@
23
23
  "alphabetical_sort_submenu": false
24
24
  },
25
25
  "footer": {
26
+ "categories_list": {
27
+ "enabled": true,
28
+ "title": "",
29
+ "categories": []
30
+ },
31
+ "pages_list": {
32
+ "enabled": true,
33
+ "title": "",
34
+ "links": []
35
+ },
36
+ "stamps": [
37
+ {
38
+ "img": "",
39
+ "alt": "Troca garantida",
40
+ "icon": "exchange",
41
+ "href": "/p/trocas"
42
+ },
43
+ {
44
+ "img": "",
45
+ "alt": "Google Navegação Segura",
46
+ "icon": "check",
47
+ "href": "https://transparencyreport.google.com/safe-browsing/search?url={domain}"
48
+ },
49
+ {
50
+ "img": "",
51
+ "alt": "Conexão SSL",
52
+ "icon": "lock",
53
+ "href": ""
54
+ }
55
+ ]
26
56
  }
27
57
  }
@@ -17,14 +17,14 @@
17
17
  },
18
18
  "main": "index.js",
19
19
  "dependencies": {
20
- "@cloudcommerce/api": "^0.24.1",
21
- "@cloudcommerce/firebase": "^0.24.1",
22
- "@cloudcommerce/ssr": "^0.24.1"
20
+ "@cloudcommerce/api": "^0.26.0",
21
+ "@cloudcommerce/firebase": "^0.26.0",
22
+ "@cloudcommerce/ssr": "^0.26.0"
23
23
  },
24
24
  "devDependencies": {
25
- "@cloudcommerce/i18n": "^0.24.1",
26
- "@cloudcommerce/storefront": "^0.24.1",
27
- "@cloudcommerce/types": "^0.24.1",
25
+ "@cloudcommerce/i18n": "^0.26.0",
26
+ "@cloudcommerce/storefront": "^0.26.0",
27
+ "@cloudcommerce/types": "^0.26.0",
28
28
  "@fontsource-variable/heebo": "^5.0.5",
29
29
  "@iconify-json/carbon": "^1.1.18"
30
30
  }