@soma-vertical-web/multi-lib 0.0.25 → 0.0.26
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/contexts/contexts/GlobalContext.d.ts +1 -1
- package/contexts/hooks/useOperations.d.ts +1 -0
- package/contexts/index.d.ts +1 -1
- package/data/helpers/cart/index.d.ts +10 -0
- package/index.js +20 -20
- package/index.mjs +4435 -4381
- package/package.json +1 -1
- package/types/constants.d.ts +1 -0
- package/types/contexts/contexts/global.d.ts +1 -0
- package/types/contexts/store/cart.d.ts +1 -0
- package/types/layout/team-components/Header/index.d.ts +2 -1
- package/cms/Sections/Banner/Composite/Slot.d.ts +0 -0
- package/cms/Sections/index.d.ts +0 -10
- package/cms/api/index.d.ts +0 -11
- package/cms/ui/ContentTypes/CommonPage/CommonPage.d.ts +0 -3
- package/cms/ui/ContentTypes/CommonPage/DataScreening.d.ts +0 -6
- package/cms/ui/ContentTypes/CommonPage/index.d.ts +0 -2
- package/cms/ui/ContentTypes/FlagsAndTags/index.d.ts +0 -1
- package/cms/ui/ContentTypes/index.d.ts +0 -6
- package/cms/ui/Factories/common.d.ts +0 -7
- package/cms/ui/Factories/contentType.d.ts +0 -9
- package/cms/ui/Factories/index.d.ts +0 -2
- package/cms/ui/Factories/section.d.ts +0 -7
- package/cms/ui/Sections/Banner/Component.d.ts +0 -7
- package/cms/ui/Sections/Banner/Composite/Content.d.ts +0 -4
- package/cms/ui/Sections/Banner/Composite/Slot.d.ts +0 -0
- package/cms/ui/Sections/Banner/adapter.d.ts +0 -32
- package/cms/ui/Sections/Banner/index.d.ts +0 -8
- package/cms/ui/Sections/TextContent/Component.d.ts +0 -4
- package/cms/ui/Sections/TextContent/Composite/Content.d.ts +0 -3
- package/cms/ui/Sections/TextContent/Composite/ContentWrapper.d.ts +0 -3
- package/cms/ui/Sections/TextContent/adapter.d.ts +0 -3
- package/cms/ui/Sections/TextContent/index.d.ts +0 -8
- package/cms/ui/Sections/_common/Accordion.d.ts +0 -2
- package/cms/ui/Sections/_common/BannerItem.d.ts +0 -5
- package/cms/ui/Sections/_common/TextStructure.d.ts +0 -17
- package/cms/ui/Sections/_common/interfaces.d.ts +0 -8
- package/cms/ui/Sections/index.d.ts +0 -4
- package/data/helpers/product/imageResize.d.ts +0 -8
- package/index-B8dtKJc0.mjs +0 -68
- package/index-BArDD1Jh.mjs +0 -68
- package/index-BCZReEF1.js +0 -4
- package/index-BI5_UgNN.mjs +0 -3210
- package/index-BK5yScKK.js +0 -1
- package/index-BaPdEOcD.js +0 -4
- package/index-BcniWgv2.mjs +0 -68
- package/index-C3_oOo51.js +0 -1
- package/index-C7gBx1Sj.js +0 -4
- package/index-CAM8BZOC.mjs +0 -3509
- package/index-CG59Ho-O.mjs +0 -3514
- package/index-CHaVlwnS.js +0 -1
- package/index-CWsS9JhJ.mjs +0 -69
- package/index-CqPFy76Q.mjs +0 -3531
- package/index-DVeRXseR.js +0 -4
- package/index-DXjpbLiy.js +0 -4
- package/index-DmJIk8vB.mjs +0 -3210
- package/index-Dq-m7diJ.mjs +0 -68
- package/index-KIgYoXyH.mjs +0 -3526
- package/index-NWyULgUV.js +0 -4
- package/index-T-_Ys9t7.mjs +0 -3483
- package/index-T1F-4OSy.js +0 -4
- package/index-dgE7GGD0.js +0 -4
- package/index-fnNrOQ41.js +0 -1
- package/index-lWJI65gt.js +0 -1
- package/index-tKMO8iJa.mjs +0 -3215
- package/layout/team-component/ProductCard/helpers.d.ts +0 -18
- package/server-DvV_v1l2.mjs +0 -69
- package/server-b0_Jc3E_.js +0 -1
- package/types/cms/api/index.d.ts +0 -0
package/index-Dq-m7diJ.mjs
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
async function g({
|
|
2
|
-
contentType: s,
|
|
3
|
-
documents: a,
|
|
4
|
-
cookies: d,
|
|
5
|
-
CMS_PROJECT_NAME: c,
|
|
6
|
-
api: i
|
|
7
|
-
}) {
|
|
8
|
-
var o;
|
|
9
|
-
const t = JSON.parse(
|
|
10
|
-
((o = d().get("cms_preview_data")) == null ? void 0 : o.value) ?? "{}"
|
|
11
|
-
);
|
|
12
|
-
if (t && (t == null ? void 0 : t.contentType) === s) {
|
|
13
|
-
const l = t.documentId && t.documentId.length ? `/${t.documentId}` : "", u = t != null && t.versionId && (t != null && t.versionId.length) ? `?versionId=${t == null ? void 0 : t.versionId}` : "", r = await (await fetch(
|
|
14
|
-
`https://${i.storeId}.myvtex.com/_v/cms/api/${c}/${s}${l}${u}`,
|
|
15
|
-
{ cache: "no-store" }
|
|
16
|
-
)).json(), e = a.filter(
|
|
17
|
-
(n) => r.id !== n.documentId
|
|
18
|
-
);
|
|
19
|
-
return e.unshift(r), e;
|
|
20
|
-
}
|
|
21
|
-
return a;
|
|
22
|
-
}
|
|
23
|
-
async function m({
|
|
24
|
-
contentType: s,
|
|
25
|
-
cookies: a,
|
|
26
|
-
CMS_PROJECT_NAME: d,
|
|
27
|
-
api: c
|
|
28
|
-
}) {
|
|
29
|
-
var h, r;
|
|
30
|
-
const i = JSON.parse(
|
|
31
|
-
((h = a().get("cms_preview_data")) == null ? void 0 : h.value) ?? "{}"
|
|
32
|
-
);
|
|
33
|
-
let t = [], o = 1, l = 0, u = !0;
|
|
34
|
-
try {
|
|
35
|
-
do {
|
|
36
|
-
const n = await (await fetch(
|
|
37
|
-
`https://${c.storeId}.myvtex.com/_v/cms/api/${d}/${s}?page=${o}`
|
|
38
|
-
)).json();
|
|
39
|
-
o === 1 && (l = n.totalItems), (r = n == null ? void 0 : n.data) != null && r.length && t.push(...n.data), u = n.hasNextPage, o++;
|
|
40
|
-
} while (u && t.length < l);
|
|
41
|
-
if (i.previewMode && t.length) {
|
|
42
|
-
const e = await g({
|
|
43
|
-
contentType: s,
|
|
44
|
-
documents: t,
|
|
45
|
-
cookies: a,
|
|
46
|
-
CMS_PROJECT_NAME: d,
|
|
47
|
-
api: c
|
|
48
|
-
});
|
|
49
|
-
return {
|
|
50
|
-
status: e.length > 0 ? 200 : 404,
|
|
51
|
-
data: e ?? []
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
return {
|
|
55
|
-
status: t.length ? 200 : 404,
|
|
56
|
-
data: t
|
|
57
|
-
};
|
|
58
|
-
} catch (e) {
|
|
59
|
-
return { status: "error", data: [], error: e };
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
const p = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
63
|
-
__proto__: null,
|
|
64
|
-
getContentType: m
|
|
65
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
66
|
-
export {
|
|
67
|
-
p as c
|
|
68
|
-
};
|