cloudcommerce 0.26.6 → 0.27.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 (353) 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 +50 -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/package.json +6 -6
  8. package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeader.vue +4 -1
  9. package/ecomplus-stores/barra-doce/functions/with-apps/package.json +3 -3
  10. package/ecomplus-stores/barra-doce/package.json +2 -2
  11. package/ecomplus-stores/barra-doce/scripts/install.sh +12 -2
  12. package/ecomplus-stores/monocard/.firebaserc +1 -1
  13. package/ecomplus-stores/monocard/.github/build-and-deploy +1 -0
  14. package/ecomplus-stores/monocard/.github/workflows/build-and-deploy.yml +1 -0
  15. package/ecomplus-stores/monocard/README.md +11 -82
  16. package/ecomplus-stores/{iluminim → monocard}/SETUP.md +12 -0
  17. package/ecomplus-stores/{iluminim → monocard}/SETUP.pt-BR.md +12 -0
  18. package/ecomplus-stores/monocard/functions/config.json +1 -1
  19. package/ecomplus-stores/monocard/functions/{core → many}/package.json +4 -2
  20. package/ecomplus-stores/monocard/functions/ssr/.eslintrc.cjs +1 -1
  21. package/ecomplus-stores/monocard/functions/ssr/content/layout.json +25 -10
  22. package/ecomplus-stores/{iluminim → monocard}/functions/ssr/content/pages/home.json +12 -19
  23. package/ecomplus-stores/monocard/functions/ssr/content/pages/products.json +19 -0
  24. package/ecomplus-stores/monocard/functions/ssr/content/settings.json +22 -2
  25. package/ecomplus-stores/monocard/functions/ssr/package.json +8 -9
  26. package/ecomplus-stores/monocard/functions/ssr/src/assets/card.css +99 -0
  27. package/ecomplus-stores/{iluminim → monocard}/functions/ssr/src/assets/style.css +16 -7
  28. package/ecomplus-stores/monocard/functions/ssr/src/components/AccountMenu.vue +5 -14
  29. package/ecomplus-stores/{iluminim → monocard}/functions/ssr/src/components/Banner.vue +6 -4
  30. package/ecomplus-stores/monocard/functions/ssr/src/components/Breadcrumbs.astro +44 -0
  31. package/ecomplus-stores/{iluminim → monocard}/functions/ssr/src/components/CartSidebar.vue +1 -1
  32. package/ecomplus-stores/monocard/functions/ssr/src/components/DemoVideo.vue +8 -3
  33. package/ecomplus-stores/monocard/functions/ssr/src/components/DocDescription.astro +30 -0
  34. package/ecomplus-stores/monocard/functions/ssr/src/components/FeatureTabs.vue +2 -2
  35. package/ecomplus-stores/monocard/functions/ssr/src/components/LottiePhoneNFC.vue +12 -9
  36. package/ecomplus-stores/monocard/functions/ssr/src/components/MonocardCustomizer.vue +8 -105
  37. package/ecomplus-stores/monocard/functions/ssr/src/components/Prices.vue +10 -27
  38. package/ecomplus-stores/{iluminim → monocard}/functions/ssr/src/components/ProductCard.vue +1 -1
  39. package/ecomplus-stores/{iluminim → monocard}/functions/ssr/src/components/ShopFooter.vue +9 -35
  40. package/ecomplus-stores/monocard/functions/ssr/src/components/ShopHeader.vue +85 -32
  41. package/ecomplus-stores/monocard/functions/ssr/src/components/ShopHeaderMenu.vue +1 -1
  42. package/ecomplus-stores/monocard/functions/ssr/src/components/ShopSidenav.vue +3 -3
  43. package/ecomplus-stores/monocard/functions/ssr/src/components/ShopSidenavCategory.vue +2 -2
  44. package/ecomplus-stores/monocard/functions/ssr/src/env.d.ts +9 -1
  45. package/ecomplus-stores/monocard/functions/ssr/src/layouts/Base.astro +9 -44
  46. package/ecomplus-stores/{iluminim → monocard}/functions/ssr/src/layouts/PageFooter.astro +3 -19
  47. package/ecomplus-stores/{iluminim → monocard}/functions/ssr/src/layouts/PageHeader.astro +7 -14
  48. package/ecomplus-stores/monocard/functions/ssr/src/main/Fallback.astro +0 -5
  49. package/ecomplus-stores/monocard/functions/ssr/src/main/Home.astro +6 -12
  50. package/ecomplus-stores/monocard/functions/ssr/src/main/Sections.astro +38 -0
  51. package/ecomplus-stores/monocard/functions/ssr/src/main/Wildcard.astro +4 -18
  52. package/ecomplus-stores/monocard/functions/ssr/src/pages/[...slug].astro +15 -9
  53. package/ecomplus-stores/monocard/functions/ssr/src/pages/comprar/index.astro +19 -9
  54. package/ecomplus-stores/monocard/functions/ssr/src/pages/index.astro +16 -10
  55. package/ecomplus-stores/monocard/functions/ssr/src/scripts/InlineScripts.astro +6 -6
  56. package/ecomplus-stores/monocard/functions/ssr/tailwind.config.cjs +1 -11
  57. package/ecomplus-stores/monocard/functions/{events → with-apps}/package.json +4 -3
  58. package/ecomplus-stores/monocard/package.json +4 -1
  59. package/ecomplus-stores/monocard/scripts/install.sh +12 -2
  60. package/ecomplus-stores/tia-sonia/scripts/install.sh +12 -2
  61. package/package.json +7 -7
  62. package/packages/api/package.json +1 -1
  63. package/packages/apps/affilate-program/package.json +2 -2
  64. package/packages/apps/correios/package.json +3 -4
  65. package/packages/apps/custom-payment/package.json +1 -1
  66. package/packages/apps/custom-shipping/package.json +1 -1
  67. package/packages/apps/datafrete/package.json +3 -3
  68. package/packages/apps/discounts/package.json +1 -1
  69. package/packages/apps/emails/package.json +2 -2
  70. package/packages/apps/fb-conversions/package.json +3 -3
  71. package/packages/apps/flash-courier/package.json +2 -2
  72. package/packages/apps/frenet/package.json +3 -3
  73. package/packages/apps/galaxpay/package.json +3 -3
  74. package/packages/apps/google-analytics/package.json +3 -3
  75. package/packages/apps/jadlog/package.json +2 -2
  76. package/packages/apps/loyalty-points/package.json +1 -1
  77. package/packages/apps/melhor-envio/package.json +3 -3
  78. package/packages/apps/mercadopago/package.json +3 -3
  79. package/packages/apps/pagarme/package.json +4 -4
  80. package/packages/apps/paghiper/package.json +3 -3
  81. package/packages/apps/pix/package.json +3 -3
  82. package/packages/apps/tiny-erp/lib/integration/export-order-to-tiny.js +22 -0
  83. package/packages/apps/tiny-erp/lib/integration/export-order-to-tiny.js.map +1 -1
  84. package/packages/apps/tiny-erp/lib/integration/helpers/format-tiny-date.js +2 -2
  85. package/packages/apps/tiny-erp/lib/integration/helpers/format-tiny-date.js.map +1 -1
  86. package/packages/apps/tiny-erp/lib/integration/import-order-from-tiny.js +7 -1
  87. package/packages/apps/tiny-erp/lib/integration/import-order-from-tiny.js.map +1 -1
  88. package/packages/apps/tiny-erp/lib/integration/import-product-from-tiny.js +14 -5
  89. package/packages/apps/tiny-erp/lib/integration/import-product-from-tiny.js.map +1 -1
  90. package/packages/apps/tiny-erp/lib/integration/parsers/order-from-tiny.js +9 -1
  91. package/packages/apps/tiny-erp/lib/integration/parsers/order-from-tiny.js.map +1 -1
  92. package/packages/apps/tiny-erp/lib/integration/parsers/order-to-tiny.js +8 -6
  93. package/packages/apps/tiny-erp/lib/integration/parsers/order-to-tiny.js.map +1 -1
  94. package/packages/apps/tiny-erp/lib/integration/parsers/product-from-tiny.js +118 -38
  95. package/packages/apps/tiny-erp/lib/integration/parsers/product-from-tiny.js.map +1 -1
  96. package/packages/apps/tiny-erp/lib/integration/parsers/product-to-tiny.js +8 -0
  97. package/packages/apps/tiny-erp/lib/integration/parsers/product-to-tiny.js.map +1 -1
  98. package/packages/apps/tiny-erp/package.json +3 -3
  99. package/packages/apps/tiny-erp/src/integration/export-order-to-tiny.ts +24 -0
  100. package/packages/apps/tiny-erp/src/integration/helpers/format-tiny-date.ts +2 -2
  101. package/packages/apps/tiny-erp/src/integration/import-order-from-tiny.ts +8 -1
  102. package/packages/apps/tiny-erp/src/integration/import-product-from-tiny.ts +17 -5
  103. package/packages/apps/tiny-erp/src/integration/parsers/order-from-tiny.ts +13 -1
  104. package/packages/apps/tiny-erp/src/integration/parsers/order-to-tiny.ts +11 -6
  105. package/packages/apps/tiny-erp/src/integration/parsers/product-from-tiny.ts +144 -41
  106. package/packages/apps/tiny-erp/src/integration/parsers/product-to-tiny.ts +10 -0
  107. package/packages/apps/webhooks/package.json +3 -3
  108. package/packages/cli/package.json +2 -2
  109. package/packages/config/package.json +1 -1
  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 +3 -3
  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/lib/firebase/serve-storefront.js +23 -8
  121. package/packages/ssr/lib/firebase/serve-storefront.js.map +1 -1
  122. package/packages/ssr/package.json +3 -3
  123. package/packages/ssr/src/firebase/serve-storefront.ts +24 -8
  124. package/packages/storefront/.auto-imports.d.ts +65 -0
  125. package/packages/storefront/astro.config.mjs +24 -1
  126. package/packages/storefront/client.d.ts +1 -0
  127. package/packages/storefront/config/astro/context-directive.mjs +21 -0
  128. package/packages/storefront/config/astro/index.d.ts +8 -0
  129. package/packages/storefront/config/storefront.tailwind.cjs +0 -1
  130. package/packages/storefront/dist/client/_astro/{Carousel.9ad2e1dc.js → Carousel.4bf71bce.js} +1 -1
  131. package/packages/storefront/dist/client/_astro/{CartSidebar.a6c6a885.js → CartSidebar.05b12b39.js} +1 -1
  132. package/packages/storefront/dist/client/_astro/{HeroSlider.ee1e6200.js → HeroSlider.fe108a14.js} +1 -1
  133. package/packages/storefront/dist/client/_astro/{PitchBar.6111676e.js → PitchBar.2c821b77.js} +1 -1
  134. package/packages/storefront/dist/client/_astro/{Prices.04ff8fce.js → Prices.78eb0a61.js} +1 -1
  135. package/packages/storefront/dist/client/_astro/{ProductShelf.085721d6.js → ProductShelf.46d8a51c.js} +1 -1
  136. package/packages/storefront/dist/client/_astro/ShopHeader.3694a82b.js +4 -0
  137. package/packages/storefront/dist/client/_astro/_...slug_.a4a7a874.css +1 -0
  138. package/packages/storefront/dist/client/_astro/ecom-icon_CDmhA.png +0 -0
  139. package/packages/storefront/dist/client/_astro/ecom-icon_Z27EX9f.png +0 -0
  140. package/packages/storefront/dist/client/_astro/ecom-icon_Zo1CLq.png +0 -0
  141. package/packages/storefront/dist/client/_astro/{firebase-app.8c541cce.js → firebase-app.3f59f3c7.js} +3 -3
  142. package/packages/storefront/dist/client/_astro/headphone_1Ekzdh.avif +0 -0
  143. package/packages/storefront/dist/client/_astro/headphone_Z1GbHcH.webp +0 -0
  144. package/packages/storefront/dist/client/_astro/{hoisted.85fdcf03.js → hoisted.648beb9d.js} +1 -1
  145. package/packages/storefront/dist/client/_astro/index.fadf28bd.js +1 -0
  146. package/packages/storefront/dist/client/_astro/logo_144owC.webp +0 -0
  147. package/packages/storefront/dist/client/_astro/logo_1ug3XF.png +0 -0
  148. package/packages/storefront/dist/client/_astro/logo_Z1EIN1I.avif +0 -0
  149. package/packages/storefront/dist/client/_astro/{modules-info.e5d77bf3.js → modules-info.df822732.js} +1 -1
  150. package/packages/storefront/dist/client/_astro/passion_1LvKlp.webp +0 -0
  151. package/packages/storefront/dist/client/_astro/passion_2PSWs.avif +0 -0
  152. package/packages/storefront/dist/client/_astro/rect8589_1A8K2Q.webp +0 -0
  153. package/packages/storefront/dist/client/_astro/rect8589_1ND0he.png +0 -0
  154. package/packages/storefront/dist/client/_astro/rect8589_1mIaKd.png +0 -0
  155. package/packages/storefront/dist/client/_astro/rect8589_LhopI.avif +0 -0
  156. package/packages/storefront/dist/client/_astro/rect8589_Z1NFjiR.avif +0 -0
  157. package/packages/storefront/dist/client/_astro/rect8589_Z2a06Gx.png +0 -0
  158. package/packages/storefront/dist/client/_astro/rect8589_Z2nulUU.webp +0 -0
  159. package/packages/storefront/dist/client/_astro/rect8589_ZH7hsH.avif +0 -0
  160. package/packages/storefront/dist/client/_astro/rect8589_ZorpIx.webp +0 -0
  161. package/packages/storefront/dist/client/_astro/rect859_1CcLjM.avif +0 -0
  162. package/packages/storefront/dist/client/_astro/rect859_1IVKep.png +0 -0
  163. package/packages/storefront/dist/client/_astro/rect859_1zkdb4.webp +0 -0
  164. package/packages/storefront/dist/client/_astro/rect859_299fN7.avif +0 -0
  165. package/packages/storefront/dist/client/_astro/rect859_CnIof.png +0 -0
  166. package/packages/storefront/dist/client/_astro/rect859_Z1OtQaE.avif +0 -0
  167. package/packages/storefront/dist/client/_astro/rect859_flB3g.png +0 -0
  168. package/packages/storefront/dist/client/_astro/rect859_rsWaw.webp +0 -0
  169. package/packages/storefront/dist/client/_astro/rect859_sLbkT.webp +0 -0
  170. package/packages/storefront/dist/client/_astro/rect89_1yf5jS.avif +0 -0
  171. package/packages/storefront/dist/client/_astro/rect89_GQBli.webp +0 -0
  172. package/packages/storefront/dist/client/~fallback.html +67 -0
  173. package/packages/storefront/dist/client/~index.html +113 -0
  174. package/packages/storefront/dist/server/chunks/{CartSidebar.41b20543.mjs → CartSidebar.4179ad81.mjs} +4 -12
  175. package/packages/storefront/dist/server/chunks/{SearchModal.5f5e6a15.mjs → SearchModal.146ce2f7.mjs} +4 -11
  176. package/packages/storefront/dist/server/chunks/_...05c626ea.mjs +28 -0
  177. package/packages/storefront/dist/server/chunks/{account@_@astro.204fba92.mjs → account@_@astro.5eaddaf8.mjs} +2 -9
  178. package/packages/storefront/dist/server/chunks/{index@_@astro.19e0f502.mjs → index@_@astro.25a343cc.mjs} +3 -10
  179. package/packages/storefront/dist/server/chunks/{index@_@astro.b37a6ac9.mjs → index@_@astro.2d2f2e33.mjs} +3 -10
  180. package/packages/storefront/dist/server/chunks/pages/{_...slug_.astro.36e8882b.mjs → _...slug_.astro.0808946e.mjs} +1836 -450
  181. package/packages/storefront/dist/server/chunks/pages/index.astro.d4145872.mjs +186 -0
  182. package/packages/storefront/dist/server/chunks/pages/{~fallback.astro.ba4c2475.mjs → ~fallback.astro.84d4765b.mjs} +6 -23
  183. package/packages/storefront/dist/server/chunks/{~fallback@_@astro.6bb4c4b4.mjs → ~fallback@_@astro.86d710c3.mjs} +3 -10
  184. package/packages/storefront/dist/server/entry.mjs +7 -14
  185. package/packages/storefront/dist/server/images.dist.csv +30 -0
  186. package/packages/storefront/dist/server/images.src.csv +11 -0
  187. package/packages/storefront/dist/server/renderers.mjs +2 -9
  188. package/packages/storefront/dist/server/static-builds.csv +51 -0
  189. package/packages/storefront/package.json +6 -5
  190. package/packages/storefront/scripts/build-prod.sh +3 -2
  191. package/packages/storefront/server.d.ts +1 -0
  192. package/packages/storefront/src/lib/$storefront.d.ts +8 -8
  193. package/packages/storefront/src/lib/assets/base.css +13 -0
  194. package/packages/storefront/src/lib/assets/reset.css +11 -2
  195. package/packages/storefront/src/lib/components/Carousel.vue +93 -72
  196. package/packages/storefront/src/lib/components/CarouselControl.vue +13 -7
  197. package/packages/storefront/src/lib/components/ContentClearfix.vue +17 -0
  198. package/packages/storefront/src/lib/components/Drawer.vue +3 -3
  199. package/packages/storefront/src/lib/components/PaymentMethodFlag.vue +1 -1
  200. package/packages/storefront/src/lib/components/QuantitySelector.vue +4 -4
  201. package/packages/storefront/src/lib/components/QuantitySelectorControl.vue +2 -2
  202. package/packages/storefront/src/lib/components/ViewTransitions.astro +409 -0
  203. package/packages/storefront/src/lib/components/globals/AImg.vue +2 -1
  204. package/packages/storefront/src/lib/layouts/BaseBody.astro +1 -1
  205. package/packages/storefront/src/lib/layouts/BaseHead.astro +28 -5
  206. package/packages/storefront/src/lib/layouts/use-page-header.ts +2 -2
  207. package/packages/test-base/package.json +1 -1
  208. package/packages/types/package.json +1 -1
  209. package/pnpm-workspace.yaml +2 -0
  210. package/ecomplus-stores/iluminim/.devcontainer/devcontainer.json +0 -30
  211. package/ecomplus-stores/iluminim/.editorconfig +0 -13
  212. package/ecomplus-stores/iluminim/.eslintrc.cjs +0 -3
  213. package/ecomplus-stores/iluminim/.firebaserc +0 -5
  214. package/ecomplus-stores/iluminim/.github/renovate.json +0 -5
  215. package/ecomplus-stores/iluminim/.github/workflows/build-and-deploy.yml +0 -36
  216. package/ecomplus-stores/iluminim/.github/workflows/calibreapp-image-actions.yml +0 -23
  217. package/ecomplus-stores/iluminim/.gitpod.yml +0 -12
  218. package/ecomplus-stores/iluminim/.idx/dev.nix +0 -24
  219. package/ecomplus-stores/iluminim/.nvmrc +0 -1
  220. package/ecomplus-stores/iluminim/.vscode/extensions.json +0 -8
  221. package/ecomplus-stores/iluminim/.vscode/launch.json +0 -11
  222. package/ecomplus-stores/iluminim/.vscode/settings.json +0 -10
  223. package/ecomplus-stores/iluminim/README.md +0 -31
  224. package/ecomplus-stores/iluminim/functions/config.json +0 -3
  225. package/ecomplus-stores/iluminim/functions/example.env +0 -10
  226. package/ecomplus-stores/iluminim/functions/many/package.json +0 -22
  227. package/ecomplus-stores/iluminim/functions/ssr/.eslintrc.cjs +0 -6
  228. package/ecomplus-stores/iluminim/functions/ssr/astro.config.mjs +0 -4
  229. package/ecomplus-stores/iluminim/functions/ssr/content/layout.json +0 -57
  230. package/ecomplus-stores/iluminim/functions/ssr/content/settings.json +0 -65
  231. package/ecomplus-stores/iluminim/functions/ssr/index.js +0 -18
  232. package/ecomplus-stores/iluminim/functions/ssr/package.json +0 -31
  233. package/ecomplus-stores/iluminim/functions/ssr/public/admin/.gitkeep +0 -2
  234. package/ecomplus-stores/iluminim/functions/ssr/public/assets/cms-preview.css +0 -274
  235. package/ecomplus-stores/iluminim/functions/ssr/public/assets/cms.css +0 -114
  236. package/ecomplus-stores/iluminim/functions/ssr/public/assets/cvv.png +0 -0
  237. package/ecomplus-stores/iluminim/functions/ssr/public/assets/img-placeholder.png +0 -0
  238. package/ecomplus-stores/iluminim/functions/ssr/public/assets/payments.png +0 -0
  239. package/ecomplus-stores/iluminim/functions/ssr/public/assets/ssl-safe.png +0 -0
  240. package/ecomplus-stores/iluminim/functions/ssr/public/img/icon.png +0 -0
  241. package/ecomplus-stores/iluminim/functions/ssr/public/img/large-icon.png +0 -0
  242. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/banner-chamada-desktop-9x81zmd91q.webp +0 -0
  243. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/banner2.webp +0 -0
  244. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/chamada-mobile-q1c6om6jx4.webp +0 -0
  245. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/headphone.webp +0 -0
  246. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/logo.webp +0 -0
  247. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/og-image.png +0 -0
  248. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/passion.webp +0 -0
  249. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/rect8589.png +0 -0
  250. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/rect859.png +0 -0
  251. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/rect89.webp +0 -0
  252. package/ecomplus-stores/iluminim/functions/ssr/public/robots.txt +0 -6
  253. package/ecomplus-stores/iluminim/functions/ssr/scripts/build.sh +0 -14
  254. package/ecomplus-stores/iluminim/functions/ssr/src/components/AccountMenu.vue +0 -95
  255. package/ecomplus-stores/iluminim/functions/ssr/src/components/Countdown.vue +0 -79
  256. package/ecomplus-stores/iluminim/functions/ssr/src/components/HeroSlider.vue +0 -52
  257. package/ecomplus-stores/iluminim/functions/ssr/src/components/PitchBar.vue +0 -56
  258. package/ecomplus-stores/iluminim/functions/ssr/src/components/Prices.vue +0 -95
  259. package/ecomplus-stores/iluminim/functions/ssr/src/components/ProductsCountdown.vue +0 -20
  260. package/ecomplus-stores/iluminim/functions/ssr/src/components/SearchModal.vue +0 -6
  261. package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopHeader.vue +0 -158
  262. package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopHeaderMenu.vue +0 -58
  263. package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopHeaderSubmenu.vue +0 -88
  264. package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopSidenav.vue +0 -61
  265. package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopSidenavCategory.vue +0 -80
  266. package/ecomplus-stores/iluminim/functions/ssr/src/env.d.ts +0 -13
  267. package/ecomplus-stores/iluminim/functions/ssr/src/layouts/Base.astro +0 -16
  268. package/ecomplus-stores/iluminim/functions/ssr/src/main/Fallback.astro +0 -10
  269. package/ecomplus-stores/iluminim/functions/ssr/src/main/Home.astro +0 -49
  270. package/ecomplus-stores/iluminim/functions/ssr/src/main/Sections.astro +0 -42
  271. package/ecomplus-stores/iluminim/functions/ssr/src/main/Wildcard.astro +0 -18
  272. package/ecomplus-stores/iluminim/functions/ssr/src/pages/[...slug].astro +0 -40
  273. package/ecomplus-stores/iluminim/functions/ssr/src/pages/_vue.ts +0 -3
  274. package/ecomplus-stores/iluminim/functions/ssr/src/pages/app/account.astro +0 -0
  275. package/ecomplus-stores/iluminim/functions/ssr/src/pages/app/index.astro +0 -0
  276. package/ecomplus-stores/iluminim/functions/ssr/src/pages/index.astro +0 -37
  277. package/ecomplus-stores/iluminim/functions/ssr/src/scripts/InlineScripts.astro +0 -10
  278. package/ecomplus-stores/iluminim/functions/ssr/tailwind.config.cjs +0 -13
  279. package/ecomplus-stores/iluminim/functions/ssr/tsconfig.json +0 -12
  280. package/ecomplus-stores/iluminim/functions/ssr/uno.config.cjs +0 -5
  281. package/ecomplus-stores/iluminim/functions/with-apps/package.json +0 -22
  282. package/ecomplus-stores/iluminim/package.json +0 -31
  283. package/ecomplus-stores/iluminim/scripts/install.sh +0 -14
  284. package/ecomplus-stores/monocard/README.pt-BR.md +0 -102
  285. package/ecomplus-stores/monocard/functions/core/index.js +0 -9
  286. package/ecomplus-stores/monocard/functions/events/index.js +0 -9
  287. package/ecomplus-stores/monocard/functions/modules/index.js +0 -9
  288. package/ecomplus-stores/monocard/functions/modules/package.json +0 -21
  289. package/ecomplus-stores/monocard/functions/passport/index.js +0 -9
  290. package/ecomplus-stores/monocard/functions/passport/package.json +0 -21
  291. package/ecomplus-stores/monocard/functions/ssr/content/blog.json +0 -18
  292. package/ecomplus-stores/monocard/functions/ssr/content/brands.json +0 -24
  293. package/ecomplus-stores/monocard/functions/ssr/content/categories.json +0 -24
  294. package/ecomplus-stores/monocard/functions/ssr/content/collections.json +0 -24
  295. package/ecomplus-stores/monocard/functions/ssr/content/home.json +0 -45
  296. package/ecomplus-stores/monocard/functions/ssr/content/maintenance.json +0 -6
  297. package/ecomplus-stores/monocard/functions/ssr/content/pages/contato.json +0 -6
  298. package/ecomplus-stores/monocard/functions/ssr/content/pages/entrega.json +0 -6
  299. package/ecomplus-stores/monocard/functions/ssr/content/pages/faq.json +0 -6
  300. package/ecomplus-stores/monocard/functions/ssr/content/pages/pagamentos.json +0 -6
  301. package/ecomplus-stores/monocard/functions/ssr/content/pages/privacidade.json +0 -6
  302. package/ecomplus-stores/monocard/functions/ssr/content/pages/sobre-nos.json +0 -6
  303. package/ecomplus-stores/monocard/functions/ssr/content/pages/termos.json +0 -6
  304. package/ecomplus-stores/monocard/functions/ssr/content/pages/trocas.json +0 -6
  305. package/ecomplus-stores/monocard/functions/ssr/content/posts/esta-loja-e-um-pwa.json +0 -9
  306. package/ecomplus-stores/monocard/functions/ssr/content/products.json +0 -32
  307. package/ecomplus-stores/monocard/functions/ssr/content/search.json +0 -8
  308. package/ecomplus-stores/monocard/functions/ssr/content/widgets/analytics.json +0 -11
  309. package/ecomplus-stores/monocard/functions/ssr/content/widgets/compre-confie.json +0 -11
  310. package/ecomplus-stores/monocard/functions/ssr/content/widgets/ebit.json +0 -11
  311. package/ecomplus-stores/monocard/functions/ssr/content/widgets/fb-pixel.json +0 -12
  312. package/ecomplus-stores/monocard/functions/ssr/content/widgets/gmc-ratings.json +0 -12
  313. package/ecomplus-stores/monocard/functions/ssr/content/widgets/minicart.json +0 -6
  314. package/ecomplus-stores/monocard/functions/ssr/content/widgets/offers-notification.json +0 -11
  315. package/ecomplus-stores/monocard/functions/ssr/content/widgets/opinioes-verificadas.json +0 -18
  316. package/ecomplus-stores/monocard/functions/ssr/content/widgets/product-card.json +0 -10
  317. package/ecomplus-stores/monocard/functions/ssr/content/widgets/product.json +0 -13
  318. package/ecomplus-stores/monocard/functions/ssr/content/widgets/search-engine.json +0 -8
  319. package/ecomplus-stores/monocard/functions/ssr/content/widgets/search.json +0 -6
  320. package/ecomplus-stores/monocard/functions/ssr/content/widgets/tag-manager.json +0 -12
  321. package/ecomplus-stores/monocard/functions/ssr/content/widgets/tawkto.json +0 -12
  322. package/ecomplus-stores/monocard/functions/ssr/content/widgets/trustvox.json +0 -15
  323. package/ecomplus-stores/monocard/functions/ssr/content/widgets/user.json +0 -5
  324. package/ecomplus-stores/monocard/functions/ssr/public/admin/config.json +0 -1
  325. package/ecomplus-stores/monocard/functions/ssr/public/assets/cms-preview.css +0 -274
  326. package/ecomplus-stores/monocard/functions/ssr/public/assets/cms.css +0 -114
  327. package/ecomplus-stores/monocard/functions/ssr/public/assets/cvv.png +0 -0
  328. package/ecomplus-stores/monocard/functions/ssr/public/assets/fonts/FavoritPro-Regular.woff2 +0 -0
  329. package/ecomplus-stores/monocard/functions/ssr/public/assets/fonts/MyriadPro-Regular.woff2 +0 -0
  330. package/ecomplus-stores/monocard/functions/ssr/public/assets/ssl-safe.png +0 -0
  331. package/ecomplus-stores/monocard/functions/ssr/src/layouts/Pages.astro +0 -50
  332. package/ecomplus-stores/monocard/functions/ssr/src/pages/fallback.astro +0 -21
  333. package/packages/storefront/dist/client/_astro/ShopHeader.7e485e35.js +0 -4
  334. package/packages/storefront/dist/client/_astro/_...slug_.b693913e.css +0 -1
  335. package/packages/storefront/dist/client/_astro/index.ea57babe.js +0 -1
  336. package/packages/storefront/dist/server/chunks/_...4a2548d2.mjs +0 -35
  337. package/packages/storefront/dist/server/chunks/endpoint@_@js.11be892a.mjs +0 -35
  338. package/packages/storefront/dist/server/chunks/pages/endpoint.js.f7a896a1.mjs +0 -119
  339. package/packages/storefront/dist/server/chunks/pages/index.astro.3145bd93.mjs +0 -1649
  340. package/packages/storefront/src/lib/components/ContentClearfix.astro +0 -12
  341. /package/ecomplus-stores/{iluminim → monocard}/functions/many/index.js +0 -0
  342. /package/ecomplus-stores/{iluminim → monocard}/functions/ssr/content/blog/.gitkeep +0 -0
  343. /package/ecomplus-stores/{iluminim → monocard}/functions/ssr/content/extra-pages/contato.json +0 -0
  344. /package/ecomplus-stores/{iluminim → monocard}/functions/ssr/content/extra-pages/terms.json +0 -0
  345. /package/ecomplus-stores/{iluminim → monocard}/functions/ssr/content/extra-pages/trocas.json +0 -0
  346. /package/ecomplus-stores/{iluminim/functions/ssr/src/layouts/Checkout.astro → monocard/functions/ssr/public/admin/.gitkeep} +0 -0
  347. /package/ecomplus-stores/{iluminim → monocard}/functions/ssr/public/img/uploads/ecom-icon.png +0 -0
  348. /package/ecomplus-stores/{iluminim → monocard}/functions/ssr/src/components/BannersGrid.astro +0 -0
  349. /package/ecomplus-stores/{iluminim → monocard}/functions/ssr/src/components/CartItem.vue +0 -0
  350. /package/ecomplus-stores/monocard/functions/ssr/src/components/{FeatureTabs.astro → FeaturesSection.astro} +0 -0
  351. /package/ecomplus-stores/{iluminim → monocard}/functions/ssr/src/components/ProductShelf.vue +0 -0
  352. /package/ecomplus-stores/{iluminim → monocard}/functions/ssr/src/pages/~fallback.astro +0 -0
  353. /package/ecomplus-stores/{iluminim → monocard}/functions/with-apps/index.js +0 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-tiny-erp",
3
3
  "type": "module",
4
- "version": "0.26.6",
4
+ "version": "0.27.0",
5
5
  "description": "E-Com Plus Cloud Commerce app for Tiny ERP",
6
6
  "main": "lib/tiny-erp.js",
7
7
  "repository": {
@@ -22,8 +22,8 @@
22
22
  "@cloudcommerce/api": "workspace:*",
23
23
  "@cloudcommerce/firebase": "workspace:*",
24
24
  "@ecomplus/utils": "1.5.0-rc.5",
25
- "axios": "^1.5.0",
26
- "firebase-admin": "^11.10.1",
25
+ "axios": "^1.5.1",
26
+ "firebase-admin": "^11.11.0",
27
27
  "firebase-functions": "^4.4.1",
28
28
  "form-data": "4.0.0"
29
29
  },
@@ -66,12 +66,36 @@ export default async (apiDoc, queueEntry, appData, canCreateNew) => {
66
66
  logger.info(`${orderId} skipped with status "${tinyStatus}"`);
67
67
  return null;
68
68
  }
69
+
70
+ if (appData.ready_for_shipping_only) {
71
+ switch (tinyStatus) {
72
+ case 'aberto':
73
+ case 'cancelado':
74
+ case 'aprovado':
75
+ case 'preparando_envio':
76
+ case 'faturado':
77
+ if (!order.fulfillment_status || order.fulfillment_status.current !== 'ready_for_shipping') {
78
+ logger.info(`${orderId} skipped with status "${tinyStatus}"`);
79
+ return null;
80
+ }
81
+ break;
82
+ default:
83
+ break;
84
+ }
85
+ }
86
+
69
87
  const tinyOrder = parseOrder(order, appData);
70
88
  logger.info(`${orderId} ${JSON.stringify(tinyOrder)}`);
71
89
  return postTiny('/pedido.incluir.php', {
72
90
  pedido: {
73
91
  pedido: tinyOrder,
74
92
  },
93
+ }).then((response) => {
94
+ const tinyErpOnNewOrder = global.$tinyErpOnNewOrder;
95
+ if (tinyErpOnNewOrder && typeof tinyErpOnNewOrder === 'function') {
96
+ return tinyErpOnNewOrder({ response, order, postTiny });
97
+ }
98
+ return response;
75
99
  });
76
100
  }
77
101
 
@@ -1,5 +1,5 @@
1
- export default (d: Date) => {
2
- /* eslint-disable prefer-template */
1
+ export default (date: Date) => {
2
+ const d = new Date(date.getTime() - (3 * 60 * 60 * 1000));
3
3
  return d.getDate().toString().padStart(2, '0') + '/'
4
4
  + (d.getMonth() + 1).toString().padStart(2, '0') + '/'
5
5
  + d.getFullYear();
@@ -91,9 +91,16 @@ export default async (apiDoc, queueEntry) => {
91
91
  ? { numeroEcommerce: tinyOrderNumber.substring(5) }
92
92
  : { numero: tinyOrderNumber };
93
93
  return postTiny('/pedidos.pesquisa.php', filter).then(({ pedidos }) => {
94
+ let prop = 'numero';
95
+ let tinyOrderNumberSearch = tinyOrderNumber;
96
+ if (filter && filter.numeroEcommerce) {
97
+ prop = 'numero_ecommerce';
98
+ tinyOrderNumberSearch = tinyOrderNumber.substring(5);
99
+ }
94
100
  const tinyOrder = pedidos.find(({ pedido }) => {
95
- return Number(tinyOrderNumber) === Number(pedido.numero);
101
+ return Number(tinyOrderNumberSearch) === Number(pedido[prop]);
96
102
  });
103
+
97
104
  if (tinyOrder) {
98
105
  return getTinyOrder(tinyOrder.pedido.id);
99
106
  }
@@ -60,11 +60,19 @@ export default async (apiDoc, queueEntry, appData, canCreateNew, isHiddenQueue)
60
60
  }
61
61
  return null;
62
62
  }
63
+
64
+ if (!product && tinyProduct && tipo === 'produto') {
65
+ return parseProduct(tinyProduct, tipo, true)
66
+ .then((bodyProduct) => {
67
+ return api.post('products', bodyProduct);
68
+ });
69
+ }
70
+
63
71
  if (!tinyProduct) {
64
72
  return null;
65
73
  }
66
74
 
67
- return postTiny('/produto.obter.php', { id: tinyProduct.id })
75
+ return postTiny('/produto.obter.php', { id: (tinyProduct.id || produtoSaldo.id) })
68
76
  .then(({ produto }) => {
69
77
  let method;
70
78
  let endpoint;
@@ -72,14 +80,14 @@ export default async (apiDoc, queueEntry, appData, canCreateNew, isHiddenQueue)
72
80
  if (productId) {
73
81
  method = 'PATCH';
74
82
  endpoint = `products/${productId}`;
75
- } else if (tipo === 'produto' || !tipo) {
83
+ } else if (tipo === 'produto' || appData.import_all_products) {
76
84
  method = 'POST';
77
85
  endpoint = 'products';
78
86
  } else {
79
87
  return null;
80
88
  }
81
89
  // @ts-ignore
82
- return parseProduct(produto, method === 'POST').then((parsedProduct: Products) => {
90
+ return parseProduct(produto, tipo, method === 'POST').then((parsedProduct: Products) => {
83
91
  if (!Number.isNaN(quantity)) {
84
92
  parsedProduct.quantity = quantity >= 0 ? quantity : 0;
85
93
  }
@@ -137,9 +145,13 @@ export default async (apiDoc, queueEntry, appData, canCreateNew, isHiddenQueue)
137
145
  variationId,
138
146
  }));
139
147
  const { tinyStockUpdate } = queueEntry;
140
- if (tinyStockUpdate && isHiddenQueue && queueProductId) {
141
- return handleTinyStock(tinyStockUpdate as any);
148
+ if (tinyStockUpdate && isHiddenQueue && (queueProductId || (product && product._id))) {
149
+ return handleTinyStock(tinyStockUpdate as any, tinyStockUpdate.produto);
150
+ }
151
+ if (tinyStockUpdate.tipo === 'produto' && !queueProductId) {
152
+ return handleTinyStock({ produto: {}, tipo: 'produto' }, tinyStockUpdate.produto);
142
153
  }
154
+
143
155
  return postTiny('/produtos.pesquisa.php', { pesquisa: queueSku })
144
156
  .then(({ produtos }) => {
145
157
  if (Array.isArray(produtos)) {
@@ -32,11 +32,23 @@ export default (tinyOrder, shippingLines) => new Promise((resolve, reject) => {
32
32
  postTiny('/nota.fiscal.obter.php', { id: tinyOrder.id_nota_fiscal })
33
33
  .then((tinyInvoice) => {
34
34
  const number = String(tinyInvoice.nota_fiscal.numero);
35
- if (number && !shippingLine.invoices.find((invoice) => invoice.number === number)) {
35
+ const indexFromInvoice = shippingLine.invoices
36
+ .findIndex((invoice) => invoice.number === number);
37
+
38
+ if (number && !(indexFromInvoice > -1)) {
36
39
  shippingLine.invoices.push({
37
40
  number,
38
41
  serial_number: String(tinyInvoice.nota_fiscal.serie),
42
+ access_key: String(tinyInvoice.nota_fiscal.chave_acesso),
39
43
  });
44
+ } else if (number && (indexFromInvoice > -1)) {
45
+ Object.assign(
46
+ shippingLine.invoices[indexFromInvoice],
47
+ {
48
+ access_key: String(tinyInvoice.nota_fiscal.chave_acesso),
49
+ serial_number: String(tinyInvoice.nota_fiscal.serie),
50
+ },
51
+ );
40
52
  }
41
53
  partialOrder.shipping_lines = shippingLines;
42
54
  resolve(partialOrder);
@@ -51,7 +51,10 @@ export default (order: Orders, appData) => {
51
51
  if (buyer.doc_number && buyer.doc_number.length <= 18) {
52
52
  tinyCustomer.cpf_cnpj = buyer.doc_number;
53
53
  }
54
- if (buyer.inscription_number && buyer.inscription_number.length <= 18) {
54
+ if (
55
+ buyer.inscription_number && buyer.inscription_number.length <= 18
56
+ && buyer.inscription_type !== 'Municipal'
57
+ ) {
55
58
  tinyCustomer.ie = buyer.inscription_number;
56
59
  }
57
60
  if (buyer.main_email && buyer.main_email.length <= 50) {
@@ -72,7 +75,7 @@ export default (order: Orders, appData) => {
72
75
  };
73
76
  }
74
77
 
75
- if (shippingAddress && billingAddress) {
78
+ if (shippingAddress) {
76
79
  tinyOrder.endereco_entrega = {};
77
80
  parseAddress(shippingAddress, tinyOrder.endereco_entrega);
78
81
  if (shippingAddress.name) {
@@ -83,7 +86,7 @@ export default (order: Orders, appData) => {
83
86
  if (order.items) {
84
87
  order.items.forEach((item) => {
85
88
  if (item.quantity) {
86
- const itemRef = (item.sku || item._id || Math.random().toString()).substring(0, 30);
89
+ const itemRef = (item.sku || item._id || Math.random().toString()).substring(0, 60);
87
90
  tinyOrder.itens.push({
88
91
  item: {
89
92
  codigo: itemRef,
@@ -124,6 +127,11 @@ export default (order: Orders, appData) => {
124
127
  }
125
128
  }
126
129
 
130
+ const tinyErpOrderParser = global.$tinyErpOrderParser;
131
+ if (tinyErpOrderParser && typeof tinyErpOrderParser === 'function') {
132
+ tinyErpOrderParser({ tinyOrder, order });
133
+ }
134
+
127
135
  if (order.shipping_method_label) {
128
136
  tinyOrder.forma_frete = order.shipping_method_label;
129
137
  }
@@ -163,9 +171,6 @@ export default (order: Orders, appData) => {
163
171
  if (amount.tax) {
164
172
  tinyOrder.valor_frete += amount.tax;
165
173
  }
166
- if (amount.extra) {
167
- tinyOrder.valor_frete += amount.extra;
168
- }
169
174
  }
170
175
  if (amount.discount) {
171
176
  tinyOrder.valor_desconto = amount.discount;
@@ -1,4 +1,4 @@
1
- import type { Products } from '@cloudcommerce/types';
1
+ import type { Products, ProductSet } from '@cloudcommerce/types';
2
2
  import logger from 'firebase-functions/logger';
3
3
  import axios from 'axios';
4
4
  import FormData from 'form-data';
@@ -12,7 +12,11 @@ const removeAccents = (str: string) => str.replace(/áàãâÁÀÃÂ/g, 'a')
12
12
  .replace(/úÚ/g, 'u')
13
13
  .replace(/çÇ/g, 'c');
14
14
 
15
- const tryImageUpload = (originImgUrl: string, product: Products) => new Promise((resolve) => {
15
+ const tryImageUpload = (
16
+ originImgUrl: string,
17
+ product: Products,
18
+ index?: number,
19
+ ) => new Promise((resolve) => {
16
20
  const {
17
21
  storeId,
18
22
  apiAuth: {
@@ -72,26 +76,55 @@ const tryImageUpload = (originImgUrl: string, product: Products) => new Promise(
72
76
  });
73
77
  }).then((picture) => {
74
78
  if (product && product.pictures) {
75
- // @ts-ignore
76
- product.pictures.push(picture);
79
+ if (index === 0 || index) {
80
+ // @ts-ignore
81
+ product.pictures[index] = picture;
82
+ } else {
83
+ // @ts-ignore
84
+ product.pictures.push(picture);
85
+ }
77
86
  }
78
87
  return picture;
79
88
  });
80
89
 
81
- export default (tinyProduct, isNew = true) => new Promise((resolve) => {
90
+ export default (
91
+ tinyProduct,
92
+ tipo?:string,
93
+ isNew = true,
94
+ ): Promise<ProductSet> => new Promise((resolve) => {
82
95
  const sku = tinyProduct.codigo || String(tinyProduct.id);
83
96
  const name = (tinyProduct.nome || sku).trim();
84
- const product: Omit<Products, '_id' | 'store_id' | 'created_at' | 'updated_at'> = {
97
+ const isProduct = tipo === 'produto';
98
+ const getCorrectPrice = (price) => {
99
+ return Number(price) > 0 ? Number(price) : null;
100
+ };
101
+ const product: ProductSet = {
85
102
  available: tinyProduct.situacao === 'A',
86
103
  sku,
87
104
  name,
88
- cost_price: tinyProduct.preco_custo,
89
- price: tinyProduct.preco_promocional || tinyProduct.preco,
90
- base_price: tinyProduct.preco,
91
- body_html: tinyProduct.descricao_complementar,
105
+ cost_price: !isProduct ? Number(tinyProduct.preco_custo) : Number(tinyProduct.precoCusto),
106
+ price: !isProduct ? Number(tinyProduct.preco_promocional || tinyProduct.preco)
107
+ : Number(getCorrectPrice(tinyProduct.precoPromocional) || tinyProduct.preco),
108
+ base_price: Number(tinyProduct.preco),
109
+ body_html: tinyProduct.descricao_complementar || tinyProduct.descricaoComplementar,
92
110
  };
93
111
 
94
112
  if (isNew) {
113
+ if (tinyProduct.seo) {
114
+ if (tinyProduct.seo.slug && tinyProduct.seo.slug.length) {
115
+ product.slug = tinyProduct.seo.slug;
116
+ }
117
+ if (tinyProduct.seo.title && tinyProduct.seo.title.length) {
118
+ product.meta_title = tinyProduct.seo.title.slice(0, 254);
119
+ }
120
+ if (tinyProduct.seo.description && tinyProduct.seo.description.length) {
121
+ product.meta_description = tinyProduct.seo.description.slice(0, 999);
122
+ }
123
+ if (tinyProduct.seo.keywords && tinyProduct.seo.keywords.length) {
124
+ product.keywords = tinyProduct.seo.keywords.split(',');
125
+ }
126
+ }
127
+
95
128
  product.slug = removeAccents(name.toLowerCase())
96
129
  .replace(/\s+/g, '-')
97
130
  .replace(/[^a-z0-9-_./]/g, '');
@@ -102,8 +135,9 @@ export default (tinyProduct, isNew = true) => new Promise((resolve) => {
102
135
  if (tinyProduct.garantia) {
103
136
  product.warranty = tinyProduct.garantia;
104
137
  }
105
- if (tinyProduct.unidade_por_caixa) {
106
- product.min_quantity = Number(tinyProduct.unidade_por_caixa);
138
+ if (tinyProduct.unidade_por_caixa || tinyProduct.unidadePorCaixa) {
139
+ product.min_quantity = !isProduct ? Number(tinyProduct.unidade_por_caixa)
140
+ : Number(tinyProduct.unidadePorCaixa);
107
141
  }
108
142
  if (tinyProduct.ncm) {
109
143
  product.mpn = [tinyProduct.ncm];
@@ -113,12 +147,14 @@ export default (tinyProduct, isNew = true) => new Promise((resolve) => {
113
147
  };
114
148
  if (validateGtin(tinyProduct.gtin)) {
115
149
  product.gtin = [tinyProduct.gtin];
116
- if (validateGtin(tinyProduct.gtin_embalagem)) {
117
- product.gtin.push(tinyProduct.gtin_embalagem);
150
+ if (validateGtin(tinyProduct.gtin_embalagem || tinyProduct.gtinEmbalagem)) {
151
+ product.gtin.push(tinyProduct.gtin_embalagem || tinyProduct.gtinEmbalagem);
118
152
  }
119
153
  }
120
154
 
121
- const weight = tinyProduct.peso_bruto || tinyProduct.peso_liquido;
155
+ const weight = !isProduct ? (tinyProduct.peso_bruto || tinyProduct.peso_liquido)
156
+ : (tinyProduct.pesoBruto || tinyProduct.pesoLiquido);
157
+
122
158
  if (weight > 0) {
123
159
  product.weight = {
124
160
  unit: 'kg',
@@ -145,38 +181,84 @@ export default (tinyProduct, isNew = true) => new Promise((resolve) => {
145
181
  if (isNew) {
146
182
  if (Array.isArray(tinyProduct.variacoes) && tinyProduct.variacoes.length) {
147
183
  product.variations = [];
148
- tinyProduct.variacoes.forEach(({ variacao }) => {
149
- const { codigo, preco, grade } = variacao;
184
+ tinyProduct.variacoes.forEach(({ variacaoObj }) => {
185
+ const variacao = !isProduct ? variacaoObj.variacao : variacaoObj;
186
+ const {
187
+ codigo,
188
+ preco,
189
+ grade,
190
+ estoqueAtual,
191
+ anexos,
192
+ } = variacao;
193
+ const gridIdFormat = (text) => {
194
+ return removeAccents(text.toLowerCase())
195
+ .replace(/\s+/g, '_')
196
+ .replace(/[^a-z0-9_]/g, '')
197
+ .substring(0, 30)
198
+ .padStart(2, 'i');
199
+ };
200
+
201
+ const specifications = {};
202
+ const specTexts: string[] = [];
203
+
150
204
  if (grade && typeof grade === 'object') {
151
- const specifications = {};
152
- const specTexts: string[] = [];
153
- Object.keys(grade).forEach((tipo) => {
154
- if (grade[tipo]) {
155
- const gridId = removeAccents(tipo.toLowerCase())
156
- .replace(/\s+/g, '_')
157
- .replace(/[^a-z0-9_]/g, '')
158
- .substring(0, 30)
159
- .padStart(2, 'i');
160
- const spec: Record<string, string> = {
161
- text: grade[tipo],
205
+ Object.keys(grade).forEach((tipoGrade) => {
206
+ if (grade[tipoGrade]) {
207
+ const gridId = gridIdFormat(tipoGrade);
208
+ const spec = {
209
+ text: grade[tipoGrade],
162
210
  };
163
211
  specTexts.push(spec.text);
164
212
  if (gridId !== 'colors') {
165
- spec.value = removeAccents(spec.text.toLowerCase()).substring(0, 100);
213
+ Object.assign(
214
+ spec,
215
+ {
216
+ value: removeAccents(spec.text.toLowerCase()).substring(0, 100),
217
+ },
218
+ );
166
219
  }
167
220
  specifications[gridId] = [spec];
168
221
  }
169
222
  });
223
+ } else if (Array.isArray(grade)) {
224
+ grade.forEach((gd) => {
225
+ const gridId = gridIdFormat(gd.chave);
226
+ const spec = {
227
+ text: gd.valor,
228
+ };
229
+ specTexts.push(spec.text);
230
+ if (gridId !== 'colors') {
231
+ Object.assign(
232
+ spec,
233
+ {
234
+ value: removeAccents(spec.text.toLowerCase()).substring(0, 100),
235
+ },
236
+ );
237
+ }
238
+ specifications[gridId] = [spec];
239
+ });
240
+ }
241
+ let pictureId;
242
+ if (Array.isArray(anexos) && anexos.length
243
+ && Array.isArray(tinyProduct.anexos) && tinyProduct.anexos.length) {
244
+ pictureId = tinyProduct.anexos.length;
245
+ anexos.forEach((anexo) => {
246
+ tinyProduct.anexos.push(anexo);
247
+ });
248
+ } else if (Array.isArray(tinyProduct.anexos) && tinyProduct.anexos.length) {
249
+ pictureId = 0;
250
+ }
170
251
 
171
- if (specTexts.length) {
172
- product.variations?.push({
173
- _id: ecomUtils.randomObjectId(),
174
- name: `${name} / ${specTexts.join(' / ')}`.substring(0, 100),
175
- sku: codigo,
176
- specifications,
177
- price: parseFloat(preco || 0),
178
- });
179
- }
252
+ if (specTexts.length) {
253
+ product.variations?.push({
254
+ _id: ecomUtils.randomObjectId(),
255
+ name: `${name} / ${specTexts.join(' / ')}`.substring(0, 100),
256
+ sku: codigo,
257
+ specifications,
258
+ price: parseFloat(preco || 0),
259
+ quantity: estoqueAtual || 0,
260
+ picture_id: pictureId,
261
+ });
180
262
  }
181
263
  });
182
264
  }
@@ -201,12 +283,33 @@ export default (tinyProduct, isNew = true) => new Promise((resolve) => {
201
283
  product.pictures = [];
202
284
  }
203
285
  const promises: Promise<any>[] = [];
204
- tinyProduct.anexos.forEach(({ anexo }) => {
205
- if (typeof anexo === 'string' && anexo.startsWith('http')) {
286
+ tinyProduct.anexos.forEach((anexo) => {
287
+ let url;
288
+ if (anexo && anexo.anexo) {
289
+ url = anexo.anexo;
290
+ } else if (anexo.url) {
291
+ url = anexo.url;
292
+ }
293
+
294
+ if (typeof url === 'string' && url.startsWith('http')) {
206
295
  promises.push(tryImageUpload(anexo, product as Products));
207
296
  }
208
297
  });
209
- Promise.all(promises).then(() => resolve(product));
298
+ Promise.all(promises).then((images) => {
299
+ if (Array.isArray(product.variations) && product.variations.length) {
300
+ product.variations.forEach((variation) => {
301
+ if (variation.picture_id) {
302
+ const variationImage = images[variation.picture_id];
303
+ if (variationImage._id) {
304
+ variation.picture_id = variationImage._id;
305
+ } else {
306
+ delete variation.picture_id;
307
+ }
308
+ }
309
+ });
310
+ }
311
+ return resolve(product);
312
+ });
210
313
  return;
211
314
  }
212
315
  }
@@ -1,7 +1,9 @@
1
1
  import type { Products } from '@cloudcommerce/types';
2
+ import config from '@cloudcommerce/firebase/lib/config';
2
3
  import ecomUtils from '@ecomplus/utils';
3
4
 
4
5
  export default async (product: Products, originalTinyProduct, appData) => {
6
+ const { metafields } = config.get();
5
7
  const hasVariations = product.variations && product.variations.length;
6
8
  let unidade: string = originalTinyProduct?.unidade;
7
9
  if (!unidade) {
@@ -60,10 +62,18 @@ export default async (product: Products, originalTinyProduct, appData) => {
60
62
 
61
63
  if (product.weight && product.weight.value) {
62
64
  tinyProduct.peso_bruto = product.weight.value;
65
+ tinyProduct.peso_liquido = product.weight.value;
66
+
67
+ if (metafields.tinyErpProductWeigthUnit) {
68
+ product.weight.unit = metafields.tinyErpProductWeigthUnit;
69
+ }
70
+
63
71
  if (product.weight.unit === 'mg') {
64
72
  tinyProduct.peso_bruto /= 1000000;
73
+ tinyProduct.peso_liquido /= 1000000;
65
74
  } else if (product.weight.unit === 'g') {
66
75
  tinyProduct.peso_bruto /= 1000;
76
+ tinyProduct.peso_liquido /= 1000;
67
77
  }
68
78
  }
69
79
  const { dimensions } = product;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-webhooks",
3
3
  "type": "module",
4
- "version": "0.26.6",
4
+ "version": "0.27.0",
5
5
  "description": "E-Com Plus Cloud Commerce app for general order webhooks",
6
6
  "main": "lib/index.js",
7
7
  "repository": {
@@ -21,8 +21,8 @@
21
21
  "dependencies": {
22
22
  "@cloudcommerce/api": "workspace:*",
23
23
  "@cloudcommerce/firebase": "workspace:*",
24
- "axios": "^1.5.0",
25
- "firebase-admin": "^11.10.1",
24
+ "axios": "^1.5.1",
25
+ "firebase-admin": "^11.11.0",
26
26
  "firebase-functions": "^4.4.1"
27
27
  },
28
28
  "devDependencies": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/cli",
3
3
  "type": "module",
4
- "version": "0.26.6",
4
+ "version": "0.27.0",
5
5
  "description": "E-Com Plus Cloud Commerce CLI tools",
6
6
  "bin": {
7
7
  "cloudcommerce": "./bin/run.mjs"
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@cloudcommerce/api": "workspace:*",
30
- "libsodium-wrappers": "^0.7.11",
30
+ "libsodium-wrappers": "^0.7.13",
31
31
  "md5": "^2.3.0",
32
32
  "zx": "^7.2.3"
33
33
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/config",
3
3
  "type": "module",
4
- "version": "0.26.6",
4
+ "version": "0.27.0",
5
5
  "description": "E-Com Plus Cloud Commerce base config",
6
6
  "main": "lib/config.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/emails",
3
3
  "type": "module",
4
- "version": "0.26.6",
4
+ "version": "0.27.0",
5
5
  "description": "E-Com Plus Cloud Commerce email sender",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",
@@ -23,13 +23,13 @@
23
23
  },
24
24
  "dependencies": {
25
25
  "@cloudcommerce/firebase": "workspace:*",
26
- "axios": "^1.5.0",
26
+ "axios": "^1.5.1",
27
27
  "ejs": "^3.1.9",
28
28
  "nodemailer": "^6.9.5"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@cloudcommerce/types": "workspace:*",
32
- "@types/ejs": "^3.1.2",
33
- "@types/nodemailer": "^6.4.10"
32
+ "@types/ejs": "^3.1.3",
33
+ "@types/nodemailer": "^6.4.11"
34
34
  }
35
35
  }
@@ -45,9 +45,12 @@ module.exports = {
45
45
  'astro/middleware',
46
46
  'astro:content',
47
47
  'unocss/astro',
48
+ 'unplugin-auto-import/astro',
48
49
  '@@.*',
49
50
  'content/.*',
50
51
  '~/.*',
52
+ 'photoswipe/lightbox',
53
+ 'photoswipe/style.css',
51
54
  ],
52
55
  },
53
56
  ],
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/eslint",
3
3
  "type": "module",
4
- "version": "0.26.6",
4
+ "version": "0.27.0",
5
5
  "description": "E-Com Plus Cloud Commerce ESLint config",
6
6
  "main": "lib/index.js",
7
7
  "repository": {
@@ -19,11 +19,12 @@
19
19
  "build": "echo '@ecomplus/eslint'"
20
20
  },
21
21
  "dependencies": {
22
- "@typescript-eslint/eslint-plugin": "^6.6.0",
23
- "@typescript-eslint/parser": "^6.6.0",
24
- "eslint": "^8.49.0",
22
+ "@typescript-eslint/eslint-plugin": "^6.7.3",
23
+ "@typescript-eslint/parser": "^6.7.3",
24
+ "eslint": "^8.50.0",
25
25
  "eslint-config-airbnb-base": "^15.0.0",
26
26
  "eslint-plugin-import": "^2.28.1",
27
+ "eslint-plugin-tailwindcss": "3.13.0",
27
28
  "eslint-plugin-vue": "^9.17.0"
28
29
  }
29
30
  }
@@ -1,7 +1,11 @@
1
1
  module.exports = {
2
- extends: './base.eslintrc.cjs',
2
+ extends: [
3
+ './base.eslintrc.cjs',
4
+ 'plugin:tailwindcss/recommended',
5
+ ],
3
6
  rules: {
4
7
  'no-console': 'off',
8
+ 'max-len': 'warn',
5
9
  'semi': 'warn',
6
10
  'arrow-parens': 'warn',
7
11
  'object-curly-newline': 'warn',
@@ -23,7 +27,10 @@ module.exports = {
23
27
  'Prices',
24
28
  'Banner',
25
29
  'Countdown',
30
+ 'Collapse',
31
+ 'Accordion',
26
32
  ],
27
33
  }],
34
+ 'tailwindcss/no-custom-classname': 'off',
28
35
  },
29
36
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/events",
3
3
  "type": "module",
4
- "version": "0.26.6",
4
+ "version": "0.27.0",
5
5
  "description": "E-Com Plus Cloud Commerce app events",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
@@ -41,7 +41,7 @@
41
41
  "@cloudcommerce/app-tiny-erp": "workspace:*",
42
42
  "@cloudcommerce/app-webhooks": "workspace:*",
43
43
  "@cloudcommerce/firebase": "workspace:*",
44
- "firebase-admin": "^11.10.1",
44
+ "firebase-admin": "^11.11.0",
45
45
  "firebase-functions": "^4.4.1",
46
46
  "source-map-support": "^0.5.21"
47
47
  },