@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.
Files changed (69) hide show
  1. package/contexts/contexts/GlobalContext.d.ts +1 -1
  2. package/contexts/hooks/useOperations.d.ts +1 -0
  3. package/contexts/index.d.ts +1 -1
  4. package/data/helpers/cart/index.d.ts +10 -0
  5. package/index.js +20 -20
  6. package/index.mjs +4435 -4381
  7. package/package.json +1 -1
  8. package/types/constants.d.ts +1 -0
  9. package/types/contexts/contexts/global.d.ts +1 -0
  10. package/types/contexts/store/cart.d.ts +1 -0
  11. package/types/layout/team-components/Header/index.d.ts +2 -1
  12. package/cms/Sections/Banner/Composite/Slot.d.ts +0 -0
  13. package/cms/Sections/index.d.ts +0 -10
  14. package/cms/api/index.d.ts +0 -11
  15. package/cms/ui/ContentTypes/CommonPage/CommonPage.d.ts +0 -3
  16. package/cms/ui/ContentTypes/CommonPage/DataScreening.d.ts +0 -6
  17. package/cms/ui/ContentTypes/CommonPage/index.d.ts +0 -2
  18. package/cms/ui/ContentTypes/FlagsAndTags/index.d.ts +0 -1
  19. package/cms/ui/ContentTypes/index.d.ts +0 -6
  20. package/cms/ui/Factories/common.d.ts +0 -7
  21. package/cms/ui/Factories/contentType.d.ts +0 -9
  22. package/cms/ui/Factories/index.d.ts +0 -2
  23. package/cms/ui/Factories/section.d.ts +0 -7
  24. package/cms/ui/Sections/Banner/Component.d.ts +0 -7
  25. package/cms/ui/Sections/Banner/Composite/Content.d.ts +0 -4
  26. package/cms/ui/Sections/Banner/Composite/Slot.d.ts +0 -0
  27. package/cms/ui/Sections/Banner/adapter.d.ts +0 -32
  28. package/cms/ui/Sections/Banner/index.d.ts +0 -8
  29. package/cms/ui/Sections/TextContent/Component.d.ts +0 -4
  30. package/cms/ui/Sections/TextContent/Composite/Content.d.ts +0 -3
  31. package/cms/ui/Sections/TextContent/Composite/ContentWrapper.d.ts +0 -3
  32. package/cms/ui/Sections/TextContent/adapter.d.ts +0 -3
  33. package/cms/ui/Sections/TextContent/index.d.ts +0 -8
  34. package/cms/ui/Sections/_common/Accordion.d.ts +0 -2
  35. package/cms/ui/Sections/_common/BannerItem.d.ts +0 -5
  36. package/cms/ui/Sections/_common/TextStructure.d.ts +0 -17
  37. package/cms/ui/Sections/_common/interfaces.d.ts +0 -8
  38. package/cms/ui/Sections/index.d.ts +0 -4
  39. package/data/helpers/product/imageResize.d.ts +0 -8
  40. package/index-B8dtKJc0.mjs +0 -68
  41. package/index-BArDD1Jh.mjs +0 -68
  42. package/index-BCZReEF1.js +0 -4
  43. package/index-BI5_UgNN.mjs +0 -3210
  44. package/index-BK5yScKK.js +0 -1
  45. package/index-BaPdEOcD.js +0 -4
  46. package/index-BcniWgv2.mjs +0 -68
  47. package/index-C3_oOo51.js +0 -1
  48. package/index-C7gBx1Sj.js +0 -4
  49. package/index-CAM8BZOC.mjs +0 -3509
  50. package/index-CG59Ho-O.mjs +0 -3514
  51. package/index-CHaVlwnS.js +0 -1
  52. package/index-CWsS9JhJ.mjs +0 -69
  53. package/index-CqPFy76Q.mjs +0 -3531
  54. package/index-DVeRXseR.js +0 -4
  55. package/index-DXjpbLiy.js +0 -4
  56. package/index-DmJIk8vB.mjs +0 -3210
  57. package/index-Dq-m7diJ.mjs +0 -68
  58. package/index-KIgYoXyH.mjs +0 -3526
  59. package/index-NWyULgUV.js +0 -4
  60. package/index-T-_Ys9t7.mjs +0 -3483
  61. package/index-T1F-4OSy.js +0 -4
  62. package/index-dgE7GGD0.js +0 -4
  63. package/index-fnNrOQ41.js +0 -1
  64. package/index-lWJI65gt.js +0 -1
  65. package/index-tKMO8iJa.mjs +0 -3215
  66. package/layout/team-component/ProductCard/helpers.d.ts +0 -18
  67. package/server-DvV_v1l2.mjs +0 -69
  68. package/server-b0_Jc3E_.js +0 -1
  69. package/types/cms/api/index.d.ts +0 -0
@@ -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
- };