cloudcommerce 0.37.1 → 0.38.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.
- package/.github/workflows/test-apps.yml +2 -2
- package/.vscode/settings.json +1 -1
- package/CHANGELOG.md +36 -0
- package/action.yml +2 -2
- package/ecomplus-stores/barra-doce/functions/many/package.json +3 -3
- package/ecomplus-stores/barra-doce/functions/ssr/package.json +6 -6
- package/ecomplus-stores/barra-doce/functions/with-apps/package.json +3 -3
- package/ecomplus-stores/barra-doce/package.json +2 -2
- package/package.json +7 -7
- package/packages/api/lib/api.d.ts +2 -2
- package/packages/api/package.json +1 -1
- package/packages/api/types.d.ts +4 -1
- package/packages/apps/affilate-program/package.json +1 -1
- package/packages/apps/correios/package.json +1 -1
- package/packages/apps/custom-payment/package.json +1 -1
- package/packages/apps/custom-shipping/package.json +1 -1
- package/packages/apps/datafrete/package.json +1 -1
- package/packages/apps/discounts/package.json +1 -1
- package/packages/apps/emails/package.json +1 -1
- package/packages/apps/fb-conversions/package.json +1 -1
- package/packages/apps/flash-courier/package.json +1 -1
- package/packages/apps/frenet/package.json +1 -1
- package/packages/apps/galaxpay/package.json +1 -1
- package/packages/apps/google-analytics/package.json +1 -1
- package/packages/apps/jadlog/package.json +1 -1
- package/packages/apps/loyalty-points/package.json +1 -1
- package/packages/apps/mandae/package.json +1 -1
- package/packages/apps/melhor-envio/package.json +1 -1
- package/packages/apps/mercadopago/package.json +1 -1
- package/packages/apps/pagarme/package.json +1 -1
- package/packages/apps/pagarme-v5/package.json +1 -1
- package/packages/apps/paghiper/package.json +1 -1
- package/packages/apps/pix/package.json +1 -1
- package/packages/apps/tiny-erp/package.json +1 -1
- package/packages/apps/webhooks/package.json +1 -1
- package/packages/cli/config/firestore.rules +4 -1
- package/packages/cli/lib/cli.js +30 -9
- package/packages/cli/package.json +2 -1
- package/packages/cli/src/cli.ts +37 -9
- package/packages/config/package.json +1 -1
- package/packages/emails/package.json +1 -1
- package/packages/eslint/package.json +3 -3
- package/packages/events/package.json +1 -1
- package/packages/feeds/package.json +1 -1
- package/packages/firebase/package.json +1 -1
- package/packages/i18n/package.json +1 -1
- package/packages/modules/package.json +1 -1
- package/packages/passport/package.json +1 -1
- package/packages/ssr/package.json +5 -5
- package/packages/storefront/.auto-imports.d.ts +1 -0
- package/packages/storefront/client.d.ts +1 -0
- package/packages/storefront/config/storefront.tailwind.cjs +21 -20
- package/packages/storefront/config/storefront.unocss.cjs +11 -0
- package/packages/storefront/dist/client/_astro/{AccountPage.700be123.js → AccountPage.j0C5JBLY.js} +1 -1
- package/packages/storefront/dist/client/_astro/{CartSidebar.430b55df.js → CartSidebar.1kUFk9Xn.js} +1 -1
- package/packages/storefront/dist/client/_astro/HeroSlider.tR1dVXyu.js +1 -0
- package/packages/storefront/dist/client/_astro/{PitchBar.06e0f831.js → PitchBar.FelC04wE.js} +1 -1
- package/packages/storefront/dist/client/_astro/{Prices.0e829c31.js → Prices.PuQc6C7F.js} +1 -1
- package/packages/storefront/dist/client/_astro/ProductCard.ephJafAE.js +1 -0
- package/packages/storefront/dist/client/_astro/ProductDetails.B6Ih5MGf.js +7 -0
- package/packages/storefront/dist/client/_astro/ProductShelf.GESxuPZ_.js +1 -0
- package/packages/storefront/dist/client/_astro/{QuantitySelector.ebf60845.js → QuantitySelector.YNmWjN8y.js} +1 -1
- package/packages/storefront/dist/client/_astro/SearchContainer.BzixfU3R.js +1 -0
- package/packages/storefront/dist/client/_astro/SearchModal.F7vbwxIv.js +1 -0
- package/packages/storefront/dist/client/_astro/ShopHeader.5vR1LgSW.js +10 -0
- package/packages/storefront/dist/client/_astro/_plugin-vue_export-helper.sk5AFsEV.js +1 -0
- package/packages/storefront/dist/client/_astro/_slug_.r8QHNfdw.css +1 -0
- package/packages/storefront/dist/client/_astro/client.RF8UxjZd.js +1 -0
- package/packages/storefront/dist/client/_astro/customer-session._VkzXnXT.js +7 -0
- package/packages/storefront/dist/client/_astro/ecom-utils.gJYgRPRz.js +1 -0
- package/packages/storefront/dist/client/_astro/{firebase-app.992a296f.js → firebase-app.cPMfoOsn.js} +1 -1
- package/packages/storefront/dist/client/_astro/{format-money.9cf6b04d.js → format-money.FMQXgKHB.js} +1 -1
- package/packages/storefront/dist/client/_astro/{hoisted.c90fc6ab.js → hoisted.B6fKrLPR.js} +1 -1
- package/packages/storefront/dist/client/_astro/{hoisted.54eaab04.js → hoisted._FbzheVm.js} +1 -1
- package/packages/storefront/dist/client/_astro/{i18n.29216eeb.js → i18n.m7SpISxy.js} +1 -1
- package/packages/storefront/dist/client/_astro/{img.4f23a3dd.js → img.zh-Drf-O.js} +1 -1
- package/packages/storefront/dist/client/_astro/{index-61e5ac61.bdc8d0cd.js → index-dd468b12.D5s8VdAL.js} +92 -107
- package/packages/storefront/dist/client/_astro/{index.570b84fe.js → index.5PN-EYMS.js} +1 -1
- package/packages/storefront/dist/client/_astro/index.XrHFaN2F.js +1 -0
- package/packages/storefront/dist/client/_astro/{modules-info.55780599.js → modules-info.sD0tdb2b.js} +1 -1
- package/packages/storefront/dist/client/_astro/name.HU5l7TJo.js +1 -0
- package/packages/storefront/dist/client/_astro/{photoswipe-lightbox.esm.c157838f.js → photoswipe-lightbox.esm.dZBqKD9u.js} +1 -1
- package/packages/storefront/dist/client/_astro/{photoswipe.01431ec7.js → photoswipe.0V7m2jWu.js} +1 -2
- package/packages/storefront/dist/client/_astro/{photoswipe.esm.92c2d901.js → photoswipe.esm.Ylh9TGkz.js} +1 -1
- package/packages/storefront/dist/client/_astro/sf-utils.5t7r9A2G.js +1 -0
- package/packages/storefront/dist/client/_astro/{shopping-cart.d9f601dd.js → shopping-cart.A-1jhlKi.js} +1 -1
- package/packages/storefront/dist/client/_astro/use-analytics.1EVxbrS7.js +1 -0
- package/packages/storefront/dist/client/_astro/{use-product-card.437911bb.js → use-product-card.erbOV6Fv.js} +1 -1
- package/packages/storefront/dist/client/robots.txt +1 -0
- package/packages/storefront/dist/server/chunks/{CartSidebar_eab28771.mjs → CartSidebar_hAgJQJgm.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/SearchModal_eWb5SdQM.mjs +351 -0
- package/packages/storefront/dist/server/chunks/{_.._5a781fb3.mjs → _.._S7DDBn_b.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/{account_519edb70.mjs → account_3ySmGzMc.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/astro/{assets-service_a9d9ab5f.mjs → assets-service_QlOZG8ov.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/{astro_d98f7186.mjs → astro_zcC1GStV.mjs} +17 -34
- package/packages/storefront/dist/server/chunks/{index_5e3ed8a0.mjs → index_nIwq11oA.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/{index_10e14f85.mjs → index_uAR5ZV4d.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/{node_1119b0d1.mjs → node_2VvC7trl.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/pages/{__93ade2dd.mjs → __MSibDuuV.mjs} +652 -255
- package/packages/storefront/dist/server/chunks/pages/{account_e5d410a7.mjs → account_iG-YqJ5q.mjs} +3 -2
- package/packages/storefront/dist/server/chunks/pages/{index_7e25afc1.mjs → index_BtDyKPh_.mjs} +3 -2
- package/packages/storefront/dist/server/chunks/pages/{node_bd378ac0.mjs → node_bKqL47eZ.mjs} +2 -2
- package/packages/storefront/dist/server/chunks/pages/{~fallback_73578d2f.mjs → ~fallback_73R5VA6j.mjs} +3 -2
- package/packages/storefront/dist/server/chunks/{photoswipe_9528923e.mjs → photoswipe_IcWDJiwc.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/{~fallback_41122b9b.mjs → ~fallback_7q1dqY4e.mjs} +1 -1
- package/packages/storefront/dist/server/entry.mjs +970 -93
- package/packages/storefront/dist/server/manifest_dSwvaOdW.mjs +195 -0
- package/packages/storefront/dist/server/renderers.mjs +2 -2
- package/packages/storefront/package.json +12 -12
- package/packages/storefront/src/helpers/sf-utils.ts +29 -1
- package/packages/storefront/src/lib/composables/use-search-container.ts +48 -0
- package/packages/storefront/src/lib/composables/use-search-modal.ts +1 -1
- package/packages/storefront/src/lib/composables/use-shop-header.ts +14 -5
- package/packages/storefront/src/lib/composables/use-sticky-header.ts +2 -0
- package/packages/storefront/src/lib/layouts/BaseHead.astro +8 -1
- package/packages/storefront/src/lib/layouts/use-page-main.ts +15 -0
- package/packages/storefront/src/lib/scripts/firestore.ts +27 -0
- package/packages/storefront/src/lib/ssr-context.ts +14 -0
- package/packages/storefront/src/lib/state/search-engine.ts +62 -25
- package/packages/storefront/src/lib/state/use-analytics.ts +9 -10
- package/packages/test-base/package.json +1 -1
- package/packages/types/package.json +1 -1
- package/packages/storefront/dist/client/_astro/HeroSlider.bd684ed8.js +0 -1
- package/packages/storefront/dist/client/_astro/ProductDetails.06da998d.js +0 -1
- package/packages/storefront/dist/client/_astro/ProductShelf.3f4f38b5.js +0 -1
- package/packages/storefront/dist/client/_astro/ProductShelf.bf82838b.js +0 -1
- package/packages/storefront/dist/client/_astro/SearchModal.b6aa5ef7.js +0 -1
- package/packages/storefront/dist/client/_astro/ShopHeader.2d6e361a.js +0 -4
- package/packages/storefront/dist/client/_astro/_plugin-vue_export-helper.f75743ee.js +0 -1
- package/packages/storefront/dist/client/_astro/_slug_.e7cac999.css +0 -1
- package/packages/storefront/dist/client/_astro/client.41b42098.js +0 -1
- package/packages/storefront/dist/client/_astro/customer-session.5ab9ab1a.js +0 -1
- package/packages/storefront/dist/client/_astro/ecom-utils.5cbfb95e.js +0 -1
- package/packages/storefront/dist/client/_astro/index.8ac1db99.js +0 -1
- package/packages/storefront/dist/client/_astro/name.01410784.js +0 -1
- package/packages/storefront/dist/client/_astro/sf-utils.b04e1813.js +0 -1
- package/packages/storefront/dist/client/_astro/use-analytics.cc95e346.js +0 -1
- package/packages/storefront/dist/server/chunks/SearchModal_f66549d4.mjs +0 -147
- package/packages/storefront/dist/server/manifest_221d806b.mjs +0 -1069
- /package/packages/storefront/dist/client/_astro/{afetch.f4507208.js → afetch.5c8VmT0-.js} +0 -0
- /package/packages/storefront/dist/client/_astro/{img-sizes.41e0efe4.js → img-sizes.gxAI9JNh.js} +0 -0
- /package/packages/storefront/dist/client/_astro/{price.04ceb6c4.js → price.Easct8WC.js} +0 -0
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
import { ref, watch, toRef, defineComponent, resolveComponent, mergeProps, withCtx, createTextVNode, toDisplayString, openBlock, createBlock, Fragment, renderList, createVNode, createCommentVNode, useSSRContext } from 'vue';
|
|
2
|
+
import Wade from 'wade';
|
|
3
|
+
import { h as clearAccents, S as SearchEngine, s as searchHistory, _ as _export_sfc, j as getSearchUrl, P as ProductShelf } from './pages/__MSibDuuV.mjs';
|
|
4
|
+
import { ssrRenderAttrs, ssrRenderComponent, ssrRenderClass, ssrRenderList, ssrInterpolate, ssrRenderAttr } from 'vue/server-renderer';
|
|
5
|
+
|
|
6
|
+
const storefrontData = globalThis.$storefront.data;
|
|
7
|
+
const wadeDocs = [];
|
|
8
|
+
["categories", "brands", "collections"].forEach((resource) => {
|
|
9
|
+
const docsList = storefrontData[resource];
|
|
10
|
+
if (docsList) {
|
|
11
|
+
for (let i = 0; i < docsList.length; i++) {
|
|
12
|
+
const doc = docsList[i];
|
|
13
|
+
if (doc.name && doc.slug) {
|
|
14
|
+
wadeDocs.push({
|
|
15
|
+
text: clearAccents(`${doc.name} ${doc.short_description}`),
|
|
16
|
+
type: resource,
|
|
17
|
+
data: doc
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
let wadeSearch;
|
|
24
|
+
if (wadeDocs.length) {
|
|
25
|
+
if (globalThis.$storefront.settings.lang === "pt_br") {
|
|
26
|
+
Wade.config.stopWords = ["e", "a", "o", "de", "para", "com", "tem"];
|
|
27
|
+
}
|
|
28
|
+
wadeSearch = Wade(wadeDocs.map(({ text }) => text));
|
|
29
|
+
}
|
|
30
|
+
const useSearchModal = (props) => {
|
|
31
|
+
const searchEngine = new SearchEngine({
|
|
32
|
+
debounce: props.fetchDebounce || 300
|
|
33
|
+
});
|
|
34
|
+
searchEngine.pageSize.value = props.productsLimit || 12;
|
|
35
|
+
searchEngine.isWithCount.value = true;
|
|
36
|
+
searchEngine.isWithBuckets.value = false;
|
|
37
|
+
const productCount = ref(0);
|
|
38
|
+
const linkHits = ref([]);
|
|
39
|
+
watch(toRef(props, "term"), async (term) => {
|
|
40
|
+
searchEngine.fetch(term);
|
|
41
|
+
if (wadeSearch) {
|
|
42
|
+
const wadeResults = wadeSearch(clearAccents(term));
|
|
43
|
+
linkHits.value = wadeResults.map(({ index }) => {
|
|
44
|
+
const { name, slug } = wadeDocs[index].data;
|
|
45
|
+
return { title: name, href: `/${slug}` };
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}, {
|
|
49
|
+
immediate: true
|
|
50
|
+
});
|
|
51
|
+
watch(searchEngine.meta, () => {
|
|
52
|
+
productCount.value = searchEngine.meta.count || 0;
|
|
53
|
+
});
|
|
54
|
+
const filteredHistory = ref([]);
|
|
55
|
+
watch(searchHistory, () => {
|
|
56
|
+
filteredHistory.value = searchHistory.filter((term) => term !== props.term);
|
|
57
|
+
}, {
|
|
58
|
+
immediate: true
|
|
59
|
+
});
|
|
60
|
+
return {
|
|
61
|
+
searchHistory: filteredHistory,
|
|
62
|
+
searchEngine,
|
|
63
|
+
isFetching: searchEngine.isFetching,
|
|
64
|
+
products: searchEngine.products,
|
|
65
|
+
productCount,
|
|
66
|
+
linkHits
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
71
|
+
__name: "SearchModal",
|
|
72
|
+
props: {
|
|
73
|
+
term: {},
|
|
74
|
+
fetchDebounce: {},
|
|
75
|
+
productsLimit: {}
|
|
76
|
+
},
|
|
77
|
+
setup(__props, { expose: __expose }) {
|
|
78
|
+
__expose();
|
|
79
|
+
const props = __props;
|
|
80
|
+
const {
|
|
81
|
+
searchHistory,
|
|
82
|
+
isFetching,
|
|
83
|
+
products,
|
|
84
|
+
productCount,
|
|
85
|
+
linkHits
|
|
86
|
+
} = useSearchModal(props);
|
|
87
|
+
const __returned__ = { props, searchHistory, isFetching, products, productCount, linkHits, get getSearchUrl() {
|
|
88
|
+
return getSearchUrl;
|
|
89
|
+
}, ProductShelf };
|
|
90
|
+
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
91
|
+
return __returned__;
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
function _sfc_ssrRender(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
95
|
+
const _component_Fade = resolveComponent("Fade");
|
|
96
|
+
const _component_Carousel = resolveComponent("Carousel");
|
|
97
|
+
const _component_ALink = resolveComponent("ALink");
|
|
98
|
+
const _component_Skeleton = resolveComponent("Skeleton");
|
|
99
|
+
_push(`<article${ssrRenderAttrs(mergeProps({ class: "relative" }, _attrs))}>`);
|
|
100
|
+
_push(ssrRenderComponent(_component_Fade, { slide: "down" }, {
|
|
101
|
+
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
102
|
+
if (_push2) {
|
|
103
|
+
if ($setup.linkHits.length) {
|
|
104
|
+
_push2(`<section class="${ssrRenderClass([!$setup.isFetching && $setup.products.length ? "lg:rounded-t" : "lg:rounded", "bg-white p-4"])}"${_scopeId}><nav${_scopeId}>`);
|
|
105
|
+
_push2(ssrRenderComponent(_component_Carousel, {
|
|
106
|
+
"wrapper-key": $props.term,
|
|
107
|
+
class: "px-6 [&>ul]:gap-3"
|
|
108
|
+
}, {
|
|
109
|
+
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
110
|
+
if (_push3) {
|
|
111
|
+
_push3(`<!--[-->`);
|
|
112
|
+
ssrRenderList($setup.linkHits, ({ title, href }, i) => {
|
|
113
|
+
_push3(`<li class="shrink-0"${_scopeId2}>`);
|
|
114
|
+
_push3(ssrRenderComponent(_component_ALink, {
|
|
115
|
+
href,
|
|
116
|
+
class: "ui-link"
|
|
117
|
+
}, {
|
|
118
|
+
default: withCtx((_3, _push4, _parent4, _scopeId3) => {
|
|
119
|
+
if (_push4) {
|
|
120
|
+
_push4(`${ssrInterpolate(title)}`);
|
|
121
|
+
} else {
|
|
122
|
+
return [
|
|
123
|
+
createTextVNode(toDisplayString(title), 1)
|
|
124
|
+
];
|
|
125
|
+
}
|
|
126
|
+
}),
|
|
127
|
+
_: 2
|
|
128
|
+
}, _parent3, _scopeId2));
|
|
129
|
+
_push3(`</li>`);
|
|
130
|
+
});
|
|
131
|
+
_push3(`<!--]-->`);
|
|
132
|
+
} else {
|
|
133
|
+
return [
|
|
134
|
+
(openBlock(true), createBlock(Fragment, null, renderList($setup.linkHits, ({ title, href }, i) => {
|
|
135
|
+
return openBlock(), createBlock("li", {
|
|
136
|
+
key: i,
|
|
137
|
+
class: "shrink-0"
|
|
138
|
+
}, [
|
|
139
|
+
createVNode(_component_ALink, {
|
|
140
|
+
href,
|
|
141
|
+
class: "ui-link"
|
|
142
|
+
}, {
|
|
143
|
+
default: withCtx(() => [
|
|
144
|
+
createTextVNode(toDisplayString(title), 1)
|
|
145
|
+
]),
|
|
146
|
+
_: 2
|
|
147
|
+
}, 1032, ["href"])
|
|
148
|
+
]);
|
|
149
|
+
}), 128))
|
|
150
|
+
];
|
|
151
|
+
}
|
|
152
|
+
}),
|
|
153
|
+
_: 1
|
|
154
|
+
}, _parent2, _scopeId));
|
|
155
|
+
_push2(`</nav></section>`);
|
|
156
|
+
} else {
|
|
157
|
+
_push2(`<!---->`);
|
|
158
|
+
}
|
|
159
|
+
} else {
|
|
160
|
+
return [
|
|
161
|
+
$setup.linkHits.length ? (openBlock(), createBlock("section", {
|
|
162
|
+
key: 0,
|
|
163
|
+
class: ["bg-white p-4", !$setup.isFetching && $setup.products.length ? "lg:rounded-t" : "lg:rounded"]
|
|
164
|
+
}, [
|
|
165
|
+
createVNode("nav", null, [
|
|
166
|
+
createVNode(_component_Carousel, {
|
|
167
|
+
"wrapper-key": $props.term,
|
|
168
|
+
class: "px-6 [&>ul]:gap-3"
|
|
169
|
+
}, {
|
|
170
|
+
default: withCtx(() => [
|
|
171
|
+
(openBlock(true), createBlock(Fragment, null, renderList($setup.linkHits, ({ title, href }, i) => {
|
|
172
|
+
return openBlock(), createBlock("li", {
|
|
173
|
+
key: i,
|
|
174
|
+
class: "shrink-0"
|
|
175
|
+
}, [
|
|
176
|
+
createVNode(_component_ALink, {
|
|
177
|
+
href,
|
|
178
|
+
class: "ui-link"
|
|
179
|
+
}, {
|
|
180
|
+
default: withCtx(() => [
|
|
181
|
+
createTextVNode(toDisplayString(title), 1)
|
|
182
|
+
]),
|
|
183
|
+
_: 2
|
|
184
|
+
}, 1032, ["href"])
|
|
185
|
+
]);
|
|
186
|
+
}), 128))
|
|
187
|
+
]),
|
|
188
|
+
_: 1
|
|
189
|
+
}, 8, ["wrapper-key"])
|
|
190
|
+
])
|
|
191
|
+
], 2)) : createCommentVNode("", true)
|
|
192
|
+
];
|
|
193
|
+
}
|
|
194
|
+
}),
|
|
195
|
+
_: 1
|
|
196
|
+
}, _parent));
|
|
197
|
+
if ($setup.isFetching) {
|
|
198
|
+
_push(ssrRenderComponent(_component_Skeleton, { class: "absolute top-0 w-full px-5 pt-20" }, null, _parent));
|
|
199
|
+
} else {
|
|
200
|
+
_push(`<!---->`);
|
|
201
|
+
}
|
|
202
|
+
_push(ssrRenderComponent(_component_Fade, { "is-leave-to": false }, {
|
|
203
|
+
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
204
|
+
if (_push2) {
|
|
205
|
+
if (!$setup.isFetching && $setup.products.length) {
|
|
206
|
+
_push2(ssrRenderComponent($setup["ProductShelf"], {
|
|
207
|
+
products: $setup.products,
|
|
208
|
+
class: ["m-0 max-w-none bg-white px-4 lg:[&_[data-carousel-control=next]]:!-right-10 lg:[&_[data-carousel-control=previous]]:!-left-10", $setup.linkHits.length ? "lg:rounded-b" : "lg:rounded"]
|
|
209
|
+
}, null, _parent2, _scopeId));
|
|
210
|
+
} else {
|
|
211
|
+
_push2(`<!---->`);
|
|
212
|
+
}
|
|
213
|
+
} else {
|
|
214
|
+
return [
|
|
215
|
+
!$setup.isFetching && $setup.products.length ? (openBlock(), createBlock($setup["ProductShelf"], {
|
|
216
|
+
key: 0,
|
|
217
|
+
products: $setup.products,
|
|
218
|
+
class: ["m-0 max-w-none bg-white px-4 lg:[&_[data-carousel-control=next]]:!-right-10 lg:[&_[data-carousel-control=previous]]:!-left-10", $setup.linkHits.length ? "lg:rounded-b" : "lg:rounded"]
|
|
219
|
+
}, null, 8, ["products", "class"])) : createCommentVNode("", true)
|
|
220
|
+
];
|
|
221
|
+
}
|
|
222
|
+
}),
|
|
223
|
+
_: 1
|
|
224
|
+
}, _parent));
|
|
225
|
+
_push(ssrRenderComponent(_component_Fade, { "is-leave-to": false }, {
|
|
226
|
+
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
227
|
+
if (_push2) {
|
|
228
|
+
if (!$setup.isFetching && ($setup.searchHistory.length || $setup.productCount > $setup.products.length)) {
|
|
229
|
+
_push2(`<section class="bg-base-100/80 grid grid-cols-1 items-center gap-4 p-4 backdrop-blur-md md:grid-cols-2 lg:mt-5 lg:grid-cols-3 lg:rounded"${_scopeId}><div class="flex items-center justify-end gap-4 md:order-2"${_scopeId}>`);
|
|
230
|
+
if ($setup.productCount > 1) {
|
|
231
|
+
_push2(`<p class="text-base-900 text-sm lowercase"${_scopeId}><strong${_scopeId}>${ssrInterpolate($setup.productCount)}</strong> ${ssrInterpolate("Itens encontrados")}</p>`);
|
|
232
|
+
} else {
|
|
233
|
+
_push2(`<!---->`);
|
|
234
|
+
}
|
|
235
|
+
if ($setup.productCount > $setup.products.length) {
|
|
236
|
+
_push2(`<a${ssrRenderAttr("href", $setup.getSearchUrl($props.term))} class="ui-btn ui-btn-primary w-auto text-center"${_scopeId}>${ssrInterpolate("Ver todos")}</a>`);
|
|
237
|
+
} else {
|
|
238
|
+
_push2(`<!---->`);
|
|
239
|
+
}
|
|
240
|
+
_push2(`</div><div class="lg:col-span-2"${_scopeId}><nav${_scopeId}>`);
|
|
241
|
+
_push2(ssrRenderComponent(_component_Carousel, {
|
|
242
|
+
"wrapper-key": $props.term,
|
|
243
|
+
class: "px-6 [&>ul]:gap-2.5"
|
|
244
|
+
}, {
|
|
245
|
+
previous: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
246
|
+
if (_push3) {
|
|
247
|
+
_push3(`<i class="i-clock m-0"${ssrRenderAttr("aria-label", "Buscar novamente")}${_scopeId2}></i>`);
|
|
248
|
+
} else {
|
|
249
|
+
return [
|
|
250
|
+
createVNode("i", {
|
|
251
|
+
class: "i-clock m-0",
|
|
252
|
+
"aria-label": "Buscar novamente"
|
|
253
|
+
})
|
|
254
|
+
];
|
|
255
|
+
}
|
|
256
|
+
}),
|
|
257
|
+
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
258
|
+
if (_push3) {
|
|
259
|
+
_push3(`<!--[-->`);
|
|
260
|
+
ssrRenderList($setup.searchHistory, (term, i) => {
|
|
261
|
+
_push3(`<li class="shrink-0"${_scopeId2}><a${ssrRenderAttr("href", $setup.getSearchUrl(term))} class="ui-link text-base-700 text-sm font-normal"${_scopeId2}>${ssrInterpolate(term)}</a></li>`);
|
|
262
|
+
});
|
|
263
|
+
_push3(`<!--]-->`);
|
|
264
|
+
} else {
|
|
265
|
+
return [
|
|
266
|
+
(openBlock(true), createBlock(Fragment, null, renderList($setup.searchHistory, (term, i) => {
|
|
267
|
+
return openBlock(), createBlock("li", {
|
|
268
|
+
key: i,
|
|
269
|
+
class: "shrink-0"
|
|
270
|
+
}, [
|
|
271
|
+
createVNode("a", {
|
|
272
|
+
href: $setup.getSearchUrl(term),
|
|
273
|
+
class: "ui-link text-base-700 text-sm font-normal"
|
|
274
|
+
}, toDisplayString(term), 9, ["href"])
|
|
275
|
+
]);
|
|
276
|
+
}), 128))
|
|
277
|
+
];
|
|
278
|
+
}
|
|
279
|
+
}),
|
|
280
|
+
_: 1
|
|
281
|
+
}, _parent2, _scopeId));
|
|
282
|
+
_push2(`</nav></div></section>`);
|
|
283
|
+
} else {
|
|
284
|
+
_push2(`<!---->`);
|
|
285
|
+
}
|
|
286
|
+
} else {
|
|
287
|
+
return [
|
|
288
|
+
!$setup.isFetching && ($setup.searchHistory.length || $setup.productCount > $setup.products.length) ? (openBlock(), createBlock("section", {
|
|
289
|
+
key: 0,
|
|
290
|
+
class: "bg-base-100/80 grid grid-cols-1 items-center gap-4 p-4 backdrop-blur-md md:grid-cols-2 lg:mt-5 lg:grid-cols-3 lg:rounded"
|
|
291
|
+
}, [
|
|
292
|
+
createVNode("div", { class: "flex items-center justify-end gap-4 md:order-2" }, [
|
|
293
|
+
$setup.productCount > 1 ? (openBlock(), createBlock("p", {
|
|
294
|
+
key: 0,
|
|
295
|
+
class: "text-base-900 text-sm lowercase"
|
|
296
|
+
}, [
|
|
297
|
+
createVNode("strong", null, toDisplayString($setup.productCount), 1),
|
|
298
|
+
createTextVNode(" " + toDisplayString("Itens encontrados"))
|
|
299
|
+
])) : createCommentVNode("", true),
|
|
300
|
+
$setup.productCount > $setup.products.length ? (openBlock(), createBlock("a", {
|
|
301
|
+
key: 1,
|
|
302
|
+
href: $setup.getSearchUrl($props.term),
|
|
303
|
+
class: "ui-btn ui-btn-primary w-auto text-center"
|
|
304
|
+
}, toDisplayString("Ver todos"), 8, ["href"])) : createCommentVNode("", true)
|
|
305
|
+
]),
|
|
306
|
+
createVNode("div", { class: "lg:col-span-2" }, [
|
|
307
|
+
createVNode("nav", null, [
|
|
308
|
+
createVNode(_component_Carousel, {
|
|
309
|
+
"wrapper-key": $props.term,
|
|
310
|
+
class: "px-6 [&>ul]:gap-2.5"
|
|
311
|
+
}, {
|
|
312
|
+
previous: withCtx(() => [
|
|
313
|
+
createVNode("i", {
|
|
314
|
+
class: "i-clock m-0",
|
|
315
|
+
"aria-label": "Buscar novamente"
|
|
316
|
+
})
|
|
317
|
+
]),
|
|
318
|
+
default: withCtx(() => [
|
|
319
|
+
(openBlock(true), createBlock(Fragment, null, renderList($setup.searchHistory, (term, i) => {
|
|
320
|
+
return openBlock(), createBlock("li", {
|
|
321
|
+
key: i,
|
|
322
|
+
class: "shrink-0"
|
|
323
|
+
}, [
|
|
324
|
+
createVNode("a", {
|
|
325
|
+
href: $setup.getSearchUrl(term),
|
|
326
|
+
class: "ui-link text-base-700 text-sm font-normal"
|
|
327
|
+
}, toDisplayString(term), 9, ["href"])
|
|
328
|
+
]);
|
|
329
|
+
}), 128))
|
|
330
|
+
]),
|
|
331
|
+
_: 1
|
|
332
|
+
}, 8, ["wrapper-key"])
|
|
333
|
+
])
|
|
334
|
+
])
|
|
335
|
+
])) : createCommentVNode("", true)
|
|
336
|
+
];
|
|
337
|
+
}
|
|
338
|
+
}),
|
|
339
|
+
_: 1
|
|
340
|
+
}, _parent));
|
|
341
|
+
_push(`</article>`);
|
|
342
|
+
}
|
|
343
|
+
const _sfc_setup = _sfc_main.setup;
|
|
344
|
+
_sfc_main.setup = (props, ctx) => {
|
|
345
|
+
const ssrContext = useSSRContext();
|
|
346
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/SearchModal.vue");
|
|
347
|
+
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
|
348
|
+
};
|
|
349
|
+
const SearchModal = /* @__PURE__ */ _export_sfc(_sfc_main, [["ssrRender", _sfc_ssrRender]]);
|
|
350
|
+
|
|
351
|
+
export { SearchModal as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isRemotePath, joinPaths } from '@astrojs/internal-helpers/path';
|
|
2
|
-
import { A as AstroError$1, E as ExpectedImage, L as LocalImageUsedWrongly, M as MissingImageDimension, U as UnsupportedImageFormat, I as IncompatibleDescriptorOptions, a as UnsupportedImageConversion, b as ExpectedImageOptions, c as InvalidImageService$1, d as MissingSharp } from '../
|
|
2
|
+
import { A as AstroError$1, E as ExpectedImage, L as LocalImageUsedWrongly, M as MissingImageDimension, U as UnsupportedImageFormat, I as IncompatibleDescriptorOptions, a as UnsupportedImageConversion, b as ExpectedImageOptions, c as InvalidImageService$1, d as MissingSharp } from '../astro_zcC1GStV.mjs';
|
|
3
3
|
|
|
4
4
|
const InvalidImageService = {
|
|
5
5
|
name: "InvalidImageService",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { bold } from 'kleur/colors';
|
|
1
2
|
import { clsx } from 'clsx';
|
|
2
3
|
import { escape } from 'html-escaper';
|
|
3
4
|
|
|
@@ -64,12 +65,6 @@ const InvalidGetStaticPathsReturn = {
|
|
|
64
65
|
message: (returnType) => `Invalid type returned by \`getStaticPaths\`. Expected an \`array\`, got \`${returnType}\``,
|
|
65
66
|
hint: "See https://docs.astro.build/en/reference/api-reference/#getstaticpaths for more information on getStaticPaths."
|
|
66
67
|
};
|
|
67
|
-
const GetStaticPathsRemovedRSSHelper = {
|
|
68
|
-
name: "GetStaticPathsRemovedRSSHelper",
|
|
69
|
-
title: "getStaticPaths RSS helper is not available anymore.",
|
|
70
|
-
message: "The RSS helper has been removed from `getStaticPaths`. Try the new @astrojs/rss package instead.",
|
|
71
|
-
hint: "See https://docs.astro.build/en/guides/rss/ for more information."
|
|
72
|
-
};
|
|
73
68
|
const GetStaticPathsExpectedParams = {
|
|
74
69
|
name: "GetStaticPathsExpectedParams",
|
|
75
70
|
title: "Missing params property on `getStaticPaths` route.",
|
|
@@ -116,9 +111,9 @@ const PageNumberParamNotFound = {
|
|
|
116
111
|
};
|
|
117
112
|
const ImageMissingAlt = {
|
|
118
113
|
name: "ImageMissingAlt",
|
|
119
|
-
title: "
|
|
120
|
-
message: "
|
|
121
|
-
hint:
|
|
114
|
+
title: 'Image missing required "alt" property.',
|
|
115
|
+
message: 'Image missing "alt" property. "alt" text is required to describe important images on the page.',
|
|
116
|
+
hint: 'Use an empty string ("") for decorative images.'
|
|
122
117
|
};
|
|
123
118
|
const InvalidImageService = {
|
|
124
119
|
name: "InvalidImageService",
|
|
@@ -329,7 +324,7 @@ function createComponent(arg1, moduleId, propagation) {
|
|
|
329
324
|
}
|
|
330
325
|
}
|
|
331
326
|
|
|
332
|
-
const ASTRO_VERSION = "
|
|
327
|
+
const ASTRO_VERSION = "4.0.4";
|
|
333
328
|
|
|
334
329
|
function createAstroGlobFn() {
|
|
335
330
|
const globHandler = (importMetaGlobResult) => {
|
|
@@ -358,38 +353,26 @@ function createAstro(site) {
|
|
|
358
353
|
};
|
|
359
354
|
}
|
|
360
355
|
|
|
361
|
-
function getHandlerFromModule(mod, method
|
|
362
|
-
const lowerCaseMethod = method.toLowerCase();
|
|
363
|
-
if (mod[lowerCaseMethod]) {
|
|
364
|
-
logger.warn(
|
|
365
|
-
"astro",
|
|
366
|
-
`Lower case endpoint names are deprecated and will not be supported in Astro 4.0. Rename the endpoint ${lowerCaseMethod} to ${method}.`
|
|
367
|
-
);
|
|
368
|
-
}
|
|
356
|
+
function getHandlerFromModule(mod, method) {
|
|
369
357
|
if (mod[method]) {
|
|
370
358
|
return mod[method];
|
|
371
359
|
}
|
|
372
|
-
if (mod[lowerCaseMethod]) {
|
|
373
|
-
return mod[lowerCaseMethod];
|
|
374
|
-
}
|
|
375
|
-
if (method === "delete" && mod["del"]) {
|
|
376
|
-
return mod["del"];
|
|
377
|
-
}
|
|
378
|
-
if (mod["all"]) {
|
|
379
|
-
return mod["all"];
|
|
380
|
-
}
|
|
381
360
|
if (mod["ALL"]) {
|
|
382
361
|
return mod["ALL"];
|
|
383
362
|
}
|
|
384
363
|
return void 0;
|
|
385
364
|
}
|
|
386
365
|
async function renderEndpoint(mod, context, ssr, logger) {
|
|
387
|
-
const { request } = context;
|
|
366
|
+
const { request, url } = context;
|
|
388
367
|
const chosenMethod = request.method?.toUpperCase();
|
|
389
|
-
const handler = getHandlerFromModule(mod, chosenMethod
|
|
390
|
-
if (!ssr && ssr === false && chosenMethod && chosenMethod !== "GET"
|
|
391
|
-
|
|
392
|
-
|
|
368
|
+
const handler = getHandlerFromModule(mod, chosenMethod);
|
|
369
|
+
if (!ssr && ssr === false && chosenMethod && chosenMethod !== "GET") {
|
|
370
|
+
logger.warn(
|
|
371
|
+
null,
|
|
372
|
+
`${url.pathname} ${bold(
|
|
373
|
+
chosenMethod
|
|
374
|
+
)} requests are not available for a static site. Update your config to \`output: 'server'\` or \`output: 'hybrid'\` to enable.`
|
|
375
|
+
);
|
|
393
376
|
}
|
|
394
377
|
if (!handler || typeof handler !== "function") {
|
|
395
378
|
let response = new Response(null, {
|
|
@@ -1991,7 +1974,7 @@ async function renderPage(result, componentFactory, props, children, streaming,
|
|
|
1991
1974
|
componentFactory.name,
|
|
1992
1975
|
componentFactory,
|
|
1993
1976
|
pageProps,
|
|
1994
|
-
|
|
1977
|
+
{},
|
|
1995
1978
|
true,
|
|
1996
1979
|
route
|
|
1997
1980
|
);
|
|
@@ -2056,4 +2039,4 @@ function spreadAttributes(values = {}, _name, { class: scopedClassName } = {}) {
|
|
|
2056
2039
|
return markHTMLString(output);
|
|
2057
2040
|
}
|
|
2058
2041
|
|
|
2059
|
-
export { AstroError as A,
|
|
2042
|
+
export { AstroError as A, renderEndpoint as B, ClientAddressNotAvailable as C, ReservedSlotName as D, ExpectedImage as E, Fragment as F, GetStaticPathsRequired as G, renderJSX as H, IncompatibleDescriptorOptions as I, chunkToString as J, CantRenderPage as K, LocalImageUsedWrongly as L, MissingImageDimension as M, NoMatchingStaticPathFound as N, renderPage as O, PageNumberParamNotFound as P, ResponseSentError as R, StaticClientAddressNotAvailable as S, UnsupportedImageFormat as U, UnsupportedImageConversion as a, ExpectedImageOptions as b, InvalidImageService as c, MissingSharp as d, createAstro as e, createComponent as f, ImageMissingAlt as g, addAttribute as h, renderComponent as i, createTransitionScope as j, renderSlotToString as k, renderAllHeadContent as l, maybeRenderHead as m, renderSlot as n, MiddlewareNoDataOrNextCalled as o, MiddlewareNotAResponse as p, InvalidGetStaticPathsReturn as q, renderTemplate as r, spreadAttributes as s, InvalidGetStaticPathsEntry as t, unescapeHTML as u, GetStaticPathsExpectedParams as v, GetStaticPathsInvalidRouteParam as w, PrerenderDynamicEndpointPathCollide as x, LocalsNotAnObject as y, ASTRO_VERSION as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { renderers } from '../renderers.mjs';
|
|
2
2
|
export { onRequest } from '../_empty-middleware.mjs';
|
|
3
3
|
|
|
4
|
-
const page = () => import('./pages/
|
|
4
|
+
const page = () => import('./pages/index_BtDyKPh_.mjs').then(n => n.i);
|
|
5
5
|
|
|
6
6
|
export { page };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { renderers } from '../renderers.mjs';
|
|
2
2
|
export { onRequest } from '../_empty-middleware.mjs';
|
|
3
3
|
|
|
4
|
-
const page = () => import('./pages/
|
|
4
|
+
const page = () => import('./pages/index_BtDyKPh_.mjs').then(n => n.a);
|
|
5
5
|
|
|
6
6
|
export { page };
|