cloudcommerce 0.26.7 → 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 (193) 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 +31 -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/with-apps/package.json +3 -3
  9. package/ecomplus-stores/barra-doce/package.json +2 -2
  10. package/ecomplus-stores/monocard/functions/many/package.json +3 -3
  11. package/ecomplus-stores/monocard/functions/ssr/package.json +6 -6
  12. package/ecomplus-stores/monocard/functions/with-apps/package.json +3 -3
  13. package/ecomplus-stores/monocard/package.json +2 -2
  14. package/package.json +6 -6
  15. package/packages/api/package.json +1 -1
  16. package/packages/apps/affilate-program/package.json +2 -2
  17. package/packages/apps/correios/package.json +3 -4
  18. package/packages/apps/custom-payment/package.json +1 -1
  19. package/packages/apps/custom-shipping/package.json +1 -1
  20. package/packages/apps/datafrete/package.json +3 -3
  21. package/packages/apps/discounts/package.json +1 -1
  22. package/packages/apps/emails/package.json +2 -2
  23. package/packages/apps/fb-conversions/package.json +3 -3
  24. package/packages/apps/flash-courier/package.json +2 -2
  25. package/packages/apps/frenet/package.json +3 -3
  26. package/packages/apps/galaxpay/package.json +3 -3
  27. package/packages/apps/google-analytics/package.json +3 -3
  28. package/packages/apps/jadlog/package.json +2 -2
  29. package/packages/apps/loyalty-points/package.json +1 -1
  30. package/packages/apps/melhor-envio/package.json +3 -3
  31. package/packages/apps/mercadopago/package.json +3 -3
  32. package/packages/apps/pagarme/package.json +3 -3
  33. package/packages/apps/paghiper/package.json +3 -3
  34. package/packages/apps/pix/package.json +3 -3
  35. package/packages/apps/tiny-erp/lib/integration/export-order-to-tiny.js +22 -0
  36. package/packages/apps/tiny-erp/lib/integration/export-order-to-tiny.js.map +1 -1
  37. package/packages/apps/tiny-erp/lib/integration/helpers/format-tiny-date.js +2 -2
  38. package/packages/apps/tiny-erp/lib/integration/helpers/format-tiny-date.js.map +1 -1
  39. package/packages/apps/tiny-erp/lib/integration/import-order-from-tiny.js +7 -1
  40. package/packages/apps/tiny-erp/lib/integration/import-order-from-tiny.js.map +1 -1
  41. package/packages/apps/tiny-erp/lib/integration/import-product-from-tiny.js +14 -5
  42. package/packages/apps/tiny-erp/lib/integration/import-product-from-tiny.js.map +1 -1
  43. package/packages/apps/tiny-erp/lib/integration/parsers/order-from-tiny.js +9 -1
  44. package/packages/apps/tiny-erp/lib/integration/parsers/order-from-tiny.js.map +1 -1
  45. package/packages/apps/tiny-erp/lib/integration/parsers/order-to-tiny.js +8 -6
  46. package/packages/apps/tiny-erp/lib/integration/parsers/order-to-tiny.js.map +1 -1
  47. package/packages/apps/tiny-erp/lib/integration/parsers/product-from-tiny.js +118 -38
  48. package/packages/apps/tiny-erp/lib/integration/parsers/product-from-tiny.js.map +1 -1
  49. package/packages/apps/tiny-erp/lib/integration/parsers/product-to-tiny.js +8 -0
  50. package/packages/apps/tiny-erp/lib/integration/parsers/product-to-tiny.js.map +1 -1
  51. package/packages/apps/tiny-erp/package.json +3 -3
  52. package/packages/apps/tiny-erp/src/integration/export-order-to-tiny.ts +24 -0
  53. package/packages/apps/tiny-erp/src/integration/helpers/format-tiny-date.ts +2 -2
  54. package/packages/apps/tiny-erp/src/integration/import-order-from-tiny.ts +8 -1
  55. package/packages/apps/tiny-erp/src/integration/import-product-from-tiny.ts +17 -5
  56. package/packages/apps/tiny-erp/src/integration/parsers/order-from-tiny.ts +13 -1
  57. package/packages/apps/tiny-erp/src/integration/parsers/order-to-tiny.ts +11 -6
  58. package/packages/apps/tiny-erp/src/integration/parsers/product-from-tiny.ts +144 -41
  59. package/packages/apps/tiny-erp/src/integration/parsers/product-to-tiny.ts +10 -0
  60. package/packages/apps/webhooks/package.json +3 -3
  61. package/packages/cli/package.json +1 -1
  62. package/packages/config/package.json +1 -1
  63. package/packages/emails/package.json +4 -4
  64. package/packages/eslint/base.eslintrc.cjs +3 -0
  65. package/packages/eslint/package.json +5 -4
  66. package/packages/eslint/storefront.eslintrc.cjs +8 -1
  67. package/packages/events/package.json +2 -2
  68. package/packages/feeds/package.json +1 -1
  69. package/packages/firebase/package.json +2 -2
  70. package/packages/i18n/package.json +1 -1
  71. package/packages/modules/package.json +3 -3
  72. package/packages/passport/package.json +2 -2
  73. package/packages/ssr/package.json +3 -3
  74. package/packages/storefront/.auto-imports.d.ts +65 -0
  75. package/packages/storefront/astro.config.mjs +24 -1
  76. package/packages/storefront/client.d.ts +1 -0
  77. package/packages/storefront/config/astro/context-directive.mjs +21 -0
  78. package/packages/storefront/config/astro/index.d.ts +8 -0
  79. package/packages/storefront/config/storefront.tailwind.cjs +0 -1
  80. package/packages/storefront/package.json +4 -3
  81. package/packages/storefront/server.d.ts +1 -1
  82. package/packages/storefront/src/lib/$storefront.d.ts +8 -8
  83. package/packages/storefront/src/lib/assets/base.css +5 -0
  84. package/packages/storefront/src/lib/components/Carousel.vue +93 -72
  85. package/packages/storefront/src/lib/components/CarouselControl.vue +13 -7
  86. package/packages/storefront/src/lib/components/ContentClearfix.vue +17 -0
  87. package/packages/storefront/src/lib/components/Drawer.vue +2 -2
  88. package/packages/storefront/src/lib/components/PaymentMethodFlag.vue +1 -1
  89. package/packages/storefront/src/lib/components/QuantitySelector.vue +4 -4
  90. package/packages/storefront/src/lib/components/QuantitySelectorControl.vue +2 -2
  91. package/packages/storefront/src/lib/components/ViewTransitions.astro +409 -0
  92. package/packages/storefront/src/lib/components/globals/AImg.vue +2 -1
  93. package/packages/storefront/src/lib/layouts/BaseBody.astro +0 -2
  94. package/packages/storefront/src/lib/layouts/BaseHead.astro +25 -7
  95. package/packages/test-base/package.json +1 -1
  96. package/packages/types/package.json +1 -1
  97. package/ecomplus-stores/iluminim/.devcontainer/devcontainer.json +0 -30
  98. package/ecomplus-stores/iluminim/.editorconfig +0 -13
  99. package/ecomplus-stores/iluminim/.eslintrc.cjs +0 -3
  100. package/ecomplus-stores/iluminim/.firebaserc +0 -5
  101. package/ecomplus-stores/iluminim/.github/renovate.json +0 -5
  102. package/ecomplus-stores/iluminim/.github/workflows/build-and-deploy.yml +0 -36
  103. package/ecomplus-stores/iluminim/.github/workflows/calibreapp-image-actions.yml +0 -23
  104. package/ecomplus-stores/iluminim/.gitpod.yml +0 -12
  105. package/ecomplus-stores/iluminim/.idx/dev.nix +0 -24
  106. package/ecomplus-stores/iluminim/.nvmrc +0 -1
  107. package/ecomplus-stores/iluminim/.vscode/extensions.json +0 -8
  108. package/ecomplus-stores/iluminim/.vscode/launch.json +0 -11
  109. package/ecomplus-stores/iluminim/.vscode/settings.json +0 -10
  110. package/ecomplus-stores/iluminim/README.md +0 -31
  111. package/ecomplus-stores/iluminim/SETUP.md +0 -117
  112. package/ecomplus-stores/iluminim/SETUP.pt-BR.md +0 -117
  113. package/ecomplus-stores/iluminim/functions/config.json +0 -3
  114. package/ecomplus-stores/iluminim/functions/example.env +0 -10
  115. package/ecomplus-stores/iluminim/functions/many/index.js +0 -14
  116. package/ecomplus-stores/iluminim/functions/many/package.json +0 -22
  117. package/ecomplus-stores/iluminim/functions/ssr/.eslintrc.cjs +0 -6
  118. package/ecomplus-stores/iluminim/functions/ssr/astro.config.mjs +0 -4
  119. package/ecomplus-stores/iluminim/functions/ssr/content/blog/.gitkeep +0 -0
  120. package/ecomplus-stores/iluminim/functions/ssr/content/extra-pages/contato.json +0 -11
  121. package/ecomplus-stores/iluminim/functions/ssr/content/extra-pages/terms.json +0 -11
  122. package/ecomplus-stores/iluminim/functions/ssr/content/extra-pages/trocas.json +0 -11
  123. package/ecomplus-stores/iluminim/functions/ssr/content/layout.json +0 -57
  124. package/ecomplus-stores/iluminim/functions/ssr/content/pages/home.json +0 -70
  125. package/ecomplus-stores/iluminim/functions/ssr/content/settings.json +0 -65
  126. package/ecomplus-stores/iluminim/functions/ssr/index.js +0 -18
  127. package/ecomplus-stores/iluminim/functions/ssr/package.json +0 -31
  128. package/ecomplus-stores/iluminim/functions/ssr/public/admin/.gitkeep +0 -2
  129. package/ecomplus-stores/iluminim/functions/ssr/public/assets/cms-preview.css +0 -274
  130. package/ecomplus-stores/iluminim/functions/ssr/public/assets/cms.css +0 -114
  131. package/ecomplus-stores/iluminim/functions/ssr/public/assets/cvv.png +0 -0
  132. package/ecomplus-stores/iluminim/functions/ssr/public/assets/img-placeholder.png +0 -0
  133. package/ecomplus-stores/iluminim/functions/ssr/public/assets/payments.png +0 -0
  134. package/ecomplus-stores/iluminim/functions/ssr/public/assets/ssl-safe.png +0 -0
  135. package/ecomplus-stores/iluminim/functions/ssr/public/img/icon.png +0 -0
  136. package/ecomplus-stores/iluminim/functions/ssr/public/img/large-icon.png +0 -0
  137. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/banner-chamada-desktop-9x81zmd91q.webp +0 -0
  138. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/banner2.webp +0 -0
  139. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/chamada-mobile-q1c6om6jx4.webp +0 -0
  140. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/ecom-icon.png +0 -0
  141. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/headphone.webp +0 -0
  142. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/logo.webp +0 -0
  143. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/og-image.png +0 -0
  144. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/passion.webp +0 -0
  145. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/rect8589.png +0 -0
  146. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/rect859.png +0 -0
  147. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/rect89.webp +0 -0
  148. package/ecomplus-stores/iluminim/functions/ssr/public/robots.txt +0 -6
  149. package/ecomplus-stores/iluminim/functions/ssr/scripts/build.sh +0 -14
  150. package/ecomplus-stores/iluminim/functions/ssr/src/assets/style.css +0 -65
  151. package/ecomplus-stores/iluminim/functions/ssr/src/components/AccountMenu.vue +0 -95
  152. package/ecomplus-stores/iluminim/functions/ssr/src/components/Banner.vue +0 -57
  153. package/ecomplus-stores/iluminim/functions/ssr/src/components/BannersGrid.astro +0 -25
  154. package/ecomplus-stores/iluminim/functions/ssr/src/components/CartItem.vue +0 -64
  155. package/ecomplus-stores/iluminim/functions/ssr/src/components/CartSidebar.vue +0 -66
  156. package/ecomplus-stores/iluminim/functions/ssr/src/components/Countdown.vue +0 -79
  157. package/ecomplus-stores/iluminim/functions/ssr/src/components/HeroSlider.vue +0 -52
  158. package/ecomplus-stores/iluminim/functions/ssr/src/components/PitchBar.vue +0 -56
  159. package/ecomplus-stores/iluminim/functions/ssr/src/components/Prices.vue +0 -95
  160. package/ecomplus-stores/iluminim/functions/ssr/src/components/ProductCard.vue +0 -117
  161. package/ecomplus-stores/iluminim/functions/ssr/src/components/ProductShelf.vue +0 -57
  162. package/ecomplus-stores/iluminim/functions/ssr/src/components/ProductsCountdown.vue +0 -20
  163. package/ecomplus-stores/iluminim/functions/ssr/src/components/SearchModal.vue +0 -6
  164. package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopFooter.vue +0 -149
  165. package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopHeader.vue +0 -158
  166. package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopHeaderMenu.vue +0 -58
  167. package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopHeaderSubmenu.vue +0 -88
  168. package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopSidenav.vue +0 -61
  169. package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopSidenavCategory.vue +0 -80
  170. package/ecomplus-stores/iluminim/functions/ssr/src/env.d.ts +0 -13
  171. package/ecomplus-stores/iluminim/functions/ssr/src/layouts/Base.astro +0 -16
  172. package/ecomplus-stores/iluminim/functions/ssr/src/layouts/Checkout.astro +0 -0
  173. package/ecomplus-stores/iluminim/functions/ssr/src/layouts/PageFooter.astro +0 -68
  174. package/ecomplus-stores/iluminim/functions/ssr/src/layouts/PageHeader.astro +0 -42
  175. package/ecomplus-stores/iluminim/functions/ssr/src/main/Fallback.astro +0 -10
  176. package/ecomplus-stores/iluminim/functions/ssr/src/main/Home.astro +0 -49
  177. package/ecomplus-stores/iluminim/functions/ssr/src/main/Sections.astro +0 -42
  178. package/ecomplus-stores/iluminim/functions/ssr/src/main/Wildcard.astro +0 -18
  179. package/ecomplus-stores/iluminim/functions/ssr/src/pages/[...slug].astro +0 -40
  180. package/ecomplus-stores/iluminim/functions/ssr/src/pages/_vue.ts +0 -3
  181. package/ecomplus-stores/iluminim/functions/ssr/src/pages/app/account.astro +0 -0
  182. package/ecomplus-stores/iluminim/functions/ssr/src/pages/app/index.astro +0 -0
  183. package/ecomplus-stores/iluminim/functions/ssr/src/pages/index.astro +0 -37
  184. package/ecomplus-stores/iluminim/functions/ssr/src/pages/~fallback.astro +0 -25
  185. package/ecomplus-stores/iluminim/functions/ssr/src/scripts/InlineScripts.astro +0 -10
  186. package/ecomplus-stores/iluminim/functions/ssr/tailwind.config.cjs +0 -13
  187. package/ecomplus-stores/iluminim/functions/ssr/tsconfig.json +0 -12
  188. package/ecomplus-stores/iluminim/functions/ssr/uno.config.cjs +0 -5
  189. package/ecomplus-stores/iluminim/functions/with-apps/index.js +0 -12
  190. package/ecomplus-stores/iluminim/functions/with-apps/package.json +0 -22
  191. package/ecomplus-stores/iluminim/package.json +0 -31
  192. package/ecomplus-stores/iluminim/scripts/install.sh +0 -24
  193. package/packages/storefront/src/lib/components/ContentClearfix.astro +0 -15
@@ -1,61 +0,0 @@
1
- <template>
2
- <aside class="flex flex-col h-full">
3
- <nav class="py-4 grow">
4
- <ul class="relative h-full">
5
- <ShopSidenavCategory
6
- v-for="(categoryTree, i) in categoryTrees"
7
- :key="i"
8
- :category-tree="categoryTree"
9
- />
10
- </ul>
11
- </nav>
12
- <footer class="text-base">
13
- <div class="flex items-center px-2 py-4 bg-base-100">
14
- <AccountLink class="p-2 grow flex items-center gap-3">
15
- <i class="i-user-circle text-4xl text-base-500 m-0"></i>
16
- <span class="leading-tight">
17
- {{ `${$t.i19hello} ${customerName || $t.i19visitor}` }}
18
- <small class="block lowercase font-semibold text-primary">
19
- {{ $t.i19myOrders }}, {{ $t.i19myAccount }}
20
- </small>
21
- </span>
22
- </AccountLink>
23
- <button
24
- v-if="isLogged"
25
- @click="logout"
26
- class="p-2 text-right text-base-800"
27
- >
28
- <span class="text-base-600">{{ $t.i19logout }}</span>
29
- <i class="i-arrow-right-on-rectangle text-lg ml-1"></i>
30
- </button>
31
- </div>
32
- <ul class="flex gap-3 p-4 bg-base-200 text-xl text-base-700">
33
- <li v-for="(href, network) in socialNetworks" :key="network">
34
- <SocialNetworkLink :network="network" class="p-1 active:text-primary" />
35
- </li>
36
- </ul>
37
- </footer>
38
- </aside>
39
- </template>
40
-
41
- <script setup lang="ts">
42
- import type { CategoryTree } from '@@sf/composables/use-shop-header';
43
- import { onMounted } from 'vue';
44
- import { socialNetworks } from '@@sf/sf-lib';
45
- import {
46
- customerName,
47
- initializeFirebaseAuth,
48
- isLogged,
49
- logout,
50
- } from '@@sf/state/customer-session';
51
- import AccountLink from '@@sf/components/AccountLink.vue';
52
- import SocialNetworkLink from '@@sf/components/SocialNetworkLink.vue';
53
- import ShopSidenavCategory from '~/components/ShopSidenavCategory.vue';
54
-
55
- export interface Props {
56
- categoryTrees: CategoryTree[];
57
- }
58
-
59
- defineProps<Props>();
60
- onMounted(() => initializeFirebaseAuth());
61
- </script>
@@ -1,80 +0,0 @@
1
- <template>
2
- <li class="text-lg text-base-800">
3
- <details
4
- v-if="categoryTree.subcategories.length"
5
- class="bg-white overflow-y-auto overflow-x-hidden z-10
6
- open:absolute open:top-0 open:left-0 open:w-full open:h-full"
7
- @toggle="isOpen = !isOpen"
8
- >
9
- <summary
10
- class="cursor-pointer list-none px-6 py-3 active:bg-base-100 transition-colors"
11
- :class="isOpen ? 'bg-base-100' : null"
12
- >
13
- <i :class="!isOpen
14
- ? 'i-arrow-right float-right mb-0 mt-1 text-xl text-base-500'
15
- : 'i-arrow-left text-lg'"></i>
16
- <AImg
17
- v-if="!isOpen && categoryTree.icon"
18
- :picture="categoryTree.icon"
19
- :alt="categoryTree.name"
20
- class="w-auto h-5 inline mr-3"
21
- />
22
- <h3 class="inline" :class="isOpen ? 'ml-4 text-base' : null">
23
- {{ categoryTree.name }}
24
- </h3>
25
- </summary>
26
- <ul
27
- class="mt-2 transition-opacity"
28
- :class="isFaded ? 'opacity-20' : 'opacity-100'"
29
- tabindex="-1"
30
- >
31
- <ShopSidenavCategory
32
- v-for="(subcategoryTree, i) in categoryTree.subcategories"
33
- :key="i"
34
- :category-tree="subcategoryTree"
35
- />
36
- <li>
37
- <a
38
- :href="`/${categoryTree.slug}`"
39
- class="block px-6 py-3 text-base underline active:bg-base-200"
40
- >
41
- {{ $t.i19seeAll$1Category.replace('$1', categoryTree.name) }}
42
- </a>
43
- </li>
44
- </ul>
45
- </details>
46
- <a
47
- v-else
48
- :href="`/${categoryTree.slug}`"
49
- class="block px-6 py-3 active:bg-base-200"
50
- >
51
- <AImg
52
- v-if="!isOpen && categoryTree.icon"
53
- :picture="categoryTree.icon"
54
- :alt="categoryTree.name"
55
- class="w-auto h-5 inline mr-3"
56
- />
57
- <h3 class="inline">{{ categoryTree.name }}</h3>
58
- </a>
59
- </li>
60
- </template>
61
-
62
- <script setup lang="ts">
63
- import type { CategoryTree, SubcategoryTree } from '@@sf/composables/use-shop-header';
64
- import { ref, watch } from 'vue';
65
-
66
- export interface Props {
67
- categoryTree: CategoryTree | SubcategoryTree;
68
- }
69
-
70
- defineProps<Props>();
71
- const isOpen = ref(false);
72
- const isFaded = ref(true);
73
- watch(isOpen, (_isOpen) => {
74
- if (_isOpen) {
75
- setTimeout(() => { isFaded.value = false; }, 25);
76
- } else {
77
- isFaded.value = true;
78
- }
79
- });
80
- </script>
@@ -1,13 +0,0 @@
1
- /// <reference types="@astrojs/image/client" />
2
- /// <reference types="vite-plugin-pwa/client" />
3
- /// <reference types="vue/ref-macros" />
4
- /// <reference types="@cloudcommerce/storefront/client" />
5
- /// <reference types="@cloudcommerce/storefront/server" />
6
-
7
- /* eslint-disable import/newline-after-import */
8
-
9
- declare module '*.vue' {
10
- import { type DefineComponent } from 'vue';
11
- const component: DefineComponent<{}, {}, any>;
12
- export default component;
13
- }
@@ -1,16 +0,0 @@
1
- ---
2
- import SfBase from '@@sf/layouts/Base.astro';
3
- import InlineScripts from '~/scripts/InlineScripts.astro';
4
- import '~/assets/style.css';
5
- import 'uno.css';
6
- // Supports weights 100-900
7
- import '@fontsource-variable/heebo/index.css';
8
- ---
9
-
10
- <SfBase>
11
- <Fragment slot="base-head">
12
- <slot name="base-head" />
13
- </Fragment>
14
- <InlineScripts slot="before-head-end" />
15
- <slot />
16
- </SfBase>
@@ -1,68 +0,0 @@
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>
@@ -1,42 +0,0 @@
1
- ---
2
- import usePageHeader from '@@sf/layouts/use-page-header';
3
- import useSharedData from '@@sf/composables/use-shared-data';
4
- import Picture from '@@sf/components/Picture.astro';
5
- import PitchBar from '~/components/PitchBar.vue';
6
- import ShopHeader from '~/components/ShopHeader.vue';
7
-
8
- const { routeContext } = Astro.locals;
9
- const { settings, isHomepage } = routeContext;
10
- const LogoHeading = isHomepage ? 'h1' : 'h2';
11
- const {
12
- pitchBar,
13
- shopHeader: { categories, ...shopHeader },
14
- } = await usePageHeader({ routeContext });
15
- const { inlineClientJS } = await useSharedData({
16
- field: 'categories',
17
- value: categories?.map(({ _id, ...c }) => c),
18
- });
19
- ---
20
-
21
- <slot name="pitch-bar">
22
- {pitchBar.slides.length > 1 && <PitchBar {...pitchBar} client:idle />}
23
- {pitchBar.slides.length === 1 && <PitchBar {...pitchBar} />}
24
- </slot>
25
- <script is:inline set:html={inlineClientJS} />
26
- <ShopHeader {...shopHeader} client:load>
27
- <Fragment slot="logo">
28
- <a href="/">
29
- <LogoHeading>
30
- <Picture
31
- slot="logo-picture"
32
- src={settings.logo}
33
- alt={settings.name}
34
- widths={[300]}
35
- fetchpriority="high"
36
- loading="eager"
37
- class="hover:drop-shadow-sm max-w-[150px] mx-auto"
38
- />
39
- </LogoHeading>
40
- </a>
41
- </Fragment>
42
- </ShopHeader>
@@ -1,10 +0,0 @@
1
- ---
2
- ---
3
-
4
- <main>
5
- <h1>Error :/</h1>
6
- <p class="instructions">
7
- Check out the <code>src/pages</code> directory to get started.<br/>
8
- <strong>Code Challenge:</strong> Tweak the "Welcome to Astro" message above.
9
- </p>
10
- </main>
@@ -1,49 +0,0 @@
1
- ---
2
- import api from '@cloudcommerce/api';
3
- import { usePageHero } from '@@sf/layouts/use-page-main';
4
- import BannerPictures from '@@sf/components/BannerPictures.astro';
5
- import HeroSlider from '~/components/HeroSlider.vue';
6
- import Sections from '~/main/Sections.astro';
7
- import Countdown from '~/components/Countdown.vue';
8
-
9
- const { routeContext } = Astro.locals;
10
- const { heroSlider } = await usePageHero({ routeContext });
11
- const heroSlides = heroSlider.slides;
12
- const {
13
- data: {
14
- result: products,
15
- },
16
- } = await api.get('products', {
17
- limit: 500,
18
- fields: ['sku', 'name', 'pictures'] as const,
19
- });
20
- ---
21
-
22
- <main>
23
- {heroSlider.slides.length &&
24
- <HeroSlider {...heroSlider} client:load>
25
- {heroSlides[0] && <BannerPictures slot="picture-0" {...heroSlides[0]} index={0} />}
26
- {heroSlides[1] && <BannerPictures slot="picture-1" {...heroSlides[1]} index={1} />}
27
- {heroSlides[2] && <BannerPictures slot="picture-2" {...heroSlides[2]} index={2} />}
28
- {heroSlides[3] && <BannerPictures slot="picture-3" {...heroSlides[3]} index={3} />}
29
- {heroSlides[4] && <BannerPictures slot="picture-4" {...heroSlides[4]} index={4} />}
30
- {heroSlides[5] && <BannerPictures slot="picture-5" {...heroSlides[5]} index={5} />}
31
- {heroSlides[6] && <BannerPictures slot="picture-6" {...heroSlides[6]} index={6} />}
32
- {heroSlides[7] && <BannerPictures slot="picture-7" {...heroSlides[7]} index={7} />}
33
- {heroSlides[8] && <BannerPictures slot="picture-8" {...heroSlides[8]} index={8} />}
34
- {heroSlides[9] && <BannerPictures slot="picture-9" {...heroSlides[9]} index={9} />}
35
- <!-- https://github.com/withastro/astro/issues/5066#issuecomment-1277998365 -->
36
- </HeroSlider>
37
- }
38
- <Sections />
39
- <div class="container mx-auto py-4">
40
- <Countdown client:visible />
41
- </div>
42
- <article class="container">
43
- {products.map((product) => (
44
- <span>{product.sku}</span>
45
- <span> {product.name}</span>
46
- <br>
47
- ))}
48
- </article>
49
- </main>
@@ -1,42 +0,0 @@
1
- ---
2
- import api from '@cloudcommerce/api';
3
- import { usePageSections } from '@@sf/layouts/use-page-main';
4
- import BannersGrid from '~/components/BannersGrid.astro';
5
- import ProductShelf from '~/components/ProductShelf.vue';
6
- import ProductsCountdown, { type Props as ProductsCountdownProps }
7
- from '~/components/ProductsCountdown.vue';
8
-
9
- const { routeContext } = Astro.locals;
10
- const { sections } = await usePageSections({
11
- routeContext,
12
- handleCustomSection: async (type, content) => {
13
- if (type === 'c:products-countdown') {
14
- const {
15
- data: {
16
- result: products,
17
- },
18
- } = await api.get('search/v1', {
19
- params: { sku: content.skus },
20
- });
21
- const props: ProductsCountdownProps = { products };
22
- return { props };
23
- }
24
- return { props: content };
25
- },
26
- });
27
- ---
28
-
29
- <article class="my-9 md:my-12">
30
- {sections.map(({ type, props }) => {
31
- switch (type) {
32
- case 'product-shelf':
33
- return <ProductShelf {...props} client:visible />
34
- case 'banners-grid':
35
- return <BannersGrid {...props} />
36
- case 'c:products-countdown':
37
- return <ProductsCountdown {...props} />
38
- default:
39
- return <div data-section={type}></div>
40
- }
41
- })}
42
- </article>
@@ -1,18 +0,0 @@
1
- ---
2
- const { fetchingApiContext, apiContext } = Astro.locals.routeContext;
3
-
4
- await fetchingApiContext;
5
- const apiDoc = apiContext.doc;
6
- ---
7
-
8
- <main>
9
- {apiDoc &&
10
- <h1>Hello <span class="text-gradient">{apiDoc.name}</span></h1>
11
- <hr>
12
- <div class="mt-3">
13
- <mark>{apiDoc._id}</mark> from <i>{apiContext.resource}</i>
14
- <p>{Math.random()}</p>
15
- <em>Lorem ipsum dolor sit amet</em>
16
- </div>
17
- }
18
- </main>
@@ -1,40 +0,0 @@
1
- ---
2
- import api from '@cloudcommerce/api';
3
- import loadRouteContext, { RouteContext } from '@@sf/ssr-context';
4
- import BaseHead from '@@sf/layouts/BaseHead.astro';
5
- import Base from '~/layouts/Base.astro';
6
- import PageHeader from '~/layouts/PageHeader.astro';
7
- import WildcardMain from '~/main/Wildcard.astro';
8
-
9
- if (String(Astro.params.slug).endsWith('.css.map')) {
10
- return new Response(null, { status: 404 });
11
- }
12
-
13
- let routeContext: RouteContext | undefined;
14
- let loadError: any;
15
- try {
16
- routeContext = await loadRouteContext(Astro);
17
- } catch (err: any) {
18
- if (err.astroResponse) {
19
- return err.astroResponse;
20
- }
21
- loadError = err;
22
- }
23
-
24
- export async function getStaticPaths() {
25
- return (await api.get('products?sort=-sales&limit=4&fields=slug'))
26
- .data.result.map(({ slug }) => ({ params: { slug } }));
27
- }
28
- ---
29
-
30
- <!DOCTYPE html>
31
- <html lang={routeContext?.lang.replace('_', '-')}>
32
- {routeContext &&
33
- <Base>
34
- <BaseHead slot="base-head" />
35
- <PageHeader />
36
- <WildcardMain />
37
- </Base>
38
- }
39
- {loadError && <Fragment set:html={loadError.responseHTML} />}
40
- </html>
@@ -1,3 +0,0 @@
1
- import createApp from '@@sf/pages/_vue';
2
-
3
- export default createApp;
@@ -1,37 +0,0 @@
1
- ---
2
- import loadRouteContext, { RouteContext } from '@@sf/ssr-context';
3
- import BaseHead from '@@sf/layouts/BaseHead.astro';
4
- import Base from '~/layouts/Base.astro';
5
- import PageHeader from '~/layouts/PageHeader.astro';
6
- import PageFooter from '~/layouts/PageFooter.astro';
7
- import HomeMain from '~/main/Home.astro';
8
-
9
- let routeContext: RouteContext | undefined;
10
- let loadError: any;
11
- try {
12
- routeContext = await loadRouteContext(Astro);
13
- /* Faster SSR without store categories (default) prefetch:
14
- routeContext = await loadRouteContext(Astro, {
15
- apiPrefetchEndpoints: [],
16
- });
17
- */
18
- } catch (err: any) {
19
- if (err.astroResponse) {
20
- return err.astroResponse;
21
- }
22
- loadError = err;
23
- }
24
- ---
25
-
26
- <!DOCTYPE html>
27
- <html lang={routeContext?.lang.replace('_', '-')}>
28
- {routeContext &&
29
- <Base>
30
- <BaseHead slot="base-head" />
31
- <PageHeader />
32
- <HomeMain />
33
- <PageFooter />
34
- </Base>
35
- }
36
- {loadError && <Fragment set:html={loadError.responseHTML} />}
37
- </html>
@@ -1,25 +0,0 @@
1
- ---
2
- import loadRouteContext, { RouteContext } from '@@sf/ssr-context';
3
- import BaseHead from '@@sf/layouts/BaseHead.astro';
4
- import Base from '~/layouts/Base.astro';
5
- import PageHeader from '~/layouts/PageHeader.astro';
6
- import FallbackMain from '~/main/Fallback.astro';
7
-
8
- let routeContext: RouteContext;
9
- try {
10
- routeContext = await loadRouteContext(Astro);
11
- } catch (err: any) {
12
- return err.astroResponse;
13
- }
14
-
15
- // export const prerender = true;
16
- ---
17
-
18
- <!DOCTYPE html>
19
- <html lang={routeContext?.lang.replace('_', '-')}>
20
- <Base>
21
- <BaseHead slot="base-head" />
22
- <PageHeader />
23
- <FallbackMain />
24
- </Base>
25
- </html>
@@ -1,10 +0,0 @@
1
- <script is:inline>
2
- window.$firebaseConfig = {
3
- apiKey: "AIzaSyDY08utue456KIi4tjXomMxX5PC3y1u6cE",
4
- authDomain: "ecom2iluminim.firebaseapp.com",
5
- projectId: "ecom2iluminim",
6
- storageBucket: "ecom2iluminim.appspot.com",
7
- messagingSenderId: "725654553320",
8
- appId: "1:725654553320:web:2f0607a479b52ddb783f5d"
9
- };
10
- </script>
@@ -1,13 +0,0 @@
1
- process.env.STOREFRONT_BASE_DIR = __dirname;
2
-
3
- // eslint-disable-next-line import/no-extraneous-dependencies
4
- const { genTailwindConfig } = require('@cloudcommerce/storefront/config/storefront.tailwind.cjs');
5
-
6
- const themeOptions = {
7
- // generalIconSets: ['tabler'],
8
- };
9
-
10
- module.exports = {
11
- ...genTailwindConfig(themeOptions),
12
- themeOptions,
13
- };
@@ -1,12 +0,0 @@
1
- {
2
- "extends": "@cloudcommerce/storefront/tsconfig.json",
3
- "compilerOptions": {
4
- "baseUrl": ".",
5
- "paths": {
6
- "@@i18n": ["./node_modules/@cloudcommerce/i18n/src/pt_br.ts"],
7
- "@@sf/*": ["./node_modules/@cloudcommerce/storefront/src/lib/*"],
8
- "~/*": ["./src/*"],
9
- "content/*": ["./content/*"],
10
- }
11
- }
12
- }
@@ -1,5 +0,0 @@
1
- // eslint-disable-next-line import/no-extraneous-dependencies
2
- const { genUnoCSSConfig } = require('@cloudcommerce/storefront/config/storefront.unocss.cjs');
3
- const tailwindConfig = require('./tailwind.config.cjs');
4
-
5
- export default genUnoCSSConfig(tailwindConfig);
@@ -1,12 +0,0 @@
1
- import '@cloudcommerce/firebase/lib/init';
2
- import config from '@cloudcommerce/firebase/config';
3
- import mergeConfig from './config.json' assert { type: 'json' };
4
-
5
- config.set({
6
- ...mergeConfig,
7
- hello: 'from store',
8
- });
9
-
10
- export * from '@cloudcommerce/modules/firebase';
11
-
12
- export * from '@cloudcommerce/events/firebase';
@@ -1,22 +0,0 @@
1
- {
2
- "name": "iluminim-with-apps",
3
- "private": true,
4
- "type": "module",
5
- "scripts": {
6
- "build": "echo '>> Run build from repository root'",
7
- "serve": "firebase emulators:start --only functions",
8
- "shell": "firebase functions:shell",
9
- "start": "npm run shell",
10
- "deploy": "firebase deploy --only functions",
11
- "logs": "firebase functions:log"
12
- },
13
- "engines": {
14
- "node": "18"
15
- },
16
- "main": "index.js",
17
- "dependencies": {
18
- "@cloudcommerce/events": "^0.26.3",
19
- "@cloudcommerce/firebase": "^0.26.3",
20
- "@cloudcommerce/modules": "^0.26.3"
21
- }
22
- }
@@ -1,31 +0,0 @@
1
- {
2
- "name": "@ecomplus-stores/iluminim",
3
- "private": true,
4
- "type": "module",
5
- "description": "E-Com Plus Cloud Commerce starter store",
6
- "scripts": {
7
- "dev": "cloudcommerce",
8
- "logs": "cloudcommerce logs",
9
- "serve": "cloudcommerce serve",
10
- "shell": "cloudcommerce shell",
11
- "start": "cloudcommerce start",
12
- "build": "cloudcommerce build",
13
- "predeploy": "cloudcommerce predeploy",
14
- "deploy": "cloudcommerce deploy",
15
- "login": "cloudcommerce login",
16
- "setup": "bash scripts/install.sh && cloudcommerce setup",
17
- "setup:quiet": "cloudcommerce setup --no-deploy --no-commit"
18
- },
19
- "main": "functions/index.js",
20
- "author": "E-Com Club Softwares para E-commerce <ti@e-com.club>",
21
- "license": "Apache 2.0 with Commons Clause",
22
- "bugs": {
23
- "url": "https://github.com/ecomplus/cloud-commerce/issues"
24
- },
25
- "dependencies": {
26
- "@cloudcommerce/cli": "^0.26.3"
27
- },
28
- "devDependencies": {
29
- "@cloudcommerce/eslint": "^0.26.3"
30
- }
31
- }
@@ -1,24 +0,0 @@
1
- #!/bin/bash
2
-
3
- if [ ! -d "./node_modules" ]; then
4
- echo '>> Install root dev dependencies:'
5
- if [ -f "./package-lock.json" ]; then
6
- npm ci
7
- else
8
- npm i
9
- fi
10
- fi
11
- echo '>> Install each function dependencies:'
12
- cd functions
13
- for d in */ ; do
14
- cd $d
15
- if [ ! -d "./node_modules" ]; then
16
- if [ -f "./package-lock.json" ]; then
17
- npm ci
18
- else
19
- npm i
20
- fi
21
- fi
22
- cd ..
23
- done
24
- cd ..