@soma-vertical-web/multi-lib 0.0.38 → 0.0.40
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/cms/ContentTypes/Footer/Footer.d.ts +3 -0
- package/cms/ContentTypes/Header/index.d.ts +1 -1
- package/cms/ContentTypes/PLP/PLPContent.d.ts +3 -0
- package/cms/ContentTypes/PLP/PLPContentContext.d.ts +4 -0
- package/cms/ContentTypes/Tipbar/Tipbar.d.ts +3 -0
- package/cms/ContentTypes/Tipbar/TipbarScreening.d.ts +3 -0
- package/cms/Sections/ImageGrid/Component.d.ts +3 -0
- package/cms/Sections/TextContent/Component.d.ts +1 -2
- package/cms/index.d.ts +3 -1
- package/cms/server.d.ts +7 -4
- package/constants.d.ts +15 -0
- package/contexts/contexts/Session.d.ts +5 -0
- package/contexts/contexts/header/UserMenuContext.d.ts +6 -0
- package/contexts/contexts/plp/PLPContext.d.ts +6 -0
- package/contexts/contexts/plp/PLPInfiniteContext.tsx.d.ts +6 -0
- package/contexts/hooks/useOnClickOutside.d.ts +3 -0
- package/contexts/index.d.ts +12 -0
- package/contexts/store/plp.d.ts +3 -0
- package/data/api/checkout/order-form/items/index.d.ts +1 -1
- package/data/api/checkout/order-form/items/update/index.d.ts +1 -1
- package/data/api/checkout/order-form/shipping/update/index.d.ts +1 -1
- package/data/helpers/plp/index.d.ts +81 -0
- package/index.js +21 -21
- package/index.mjs +6133 -5210
- package/index2.js +1 -1
- package/index2.mjs +261 -243
- package/layout/index.d.ts +3 -3
- package/layout/team-component/Header/Composite/HeaderDesktopWrapper.d.ts +1 -1
- package/layout/team-component/Header/Composite/HeaderMobileWrapper.d.ts +1 -1
- package/layout/team-component/Header/index.d.ts +1 -1
- package/layout/team-component/Menu/Composite/Desktop/MenuRoot.d.ts +5 -2
- package/layout/team-component/Menu/Composite/Mobile/MenuRoot.d.ts +7 -4
- package/layout/team-component/Menu/MenuDesktop.d.ts +4 -1
- package/layout/team-component/Menu/MenuMobile.d.ts +4 -3
- package/layout/team-component/UserMenu/Composite/Content.d.ts +7 -0
- package/layout/team-component/UserMenu/Composite/Credits.d.ts +7 -0
- package/layout/team-component/UserMenu/Composite/Login.d.ts +10 -0
- package/layout/team-component/UserMenu/Composite/Menu.d.ts +7 -0
- package/layout/team-component/UserMenu/Composite/Modal.d.ts +7 -0
- package/layout/team-component/UserMenu/Composite/Root.d.ts +7 -0
- package/layout/team-component/UserMenu/Composite/Tooltip.d.ts +7 -0
- package/layout/team-component/UserMenu/UserMenu.d.ts +34 -0
- package/layout/team-component/UserMenu/helpers.d.ts +7 -0
- package/layout/team-component/UserMenu/index.d.ts +5 -0
- package/layout/utils/SessionEvent/index.d.ts +1 -0
- package/package.json +1 -1
- package/server.d.ts +2 -5
- package/style.css +1 -1
- package/types/cms/ContentTypes/Footer/index.d.ts +6 -2
- package/types/cms/ContentTypes/PLP/index.d.ts +45 -0
- package/types/cms/ContentTypes/Tipbar/index.d.ts +9 -0
- package/types/cms/Sections/ProductCarousel/index.d.ts +77 -0
- package/types/constants.d.ts +19 -1
- package/types/contexts/contexts/plp.d.ts +48 -1
- package/types/contexts/contexts/session.d.ts +84 -0
- package/types/layout/team-components/BuyPackage/index.d.ts +2 -2
- package/types/layout/team-components/Header/index.d.ts +4 -3
- package/types/layout/team-components/ProductCard/index.d.ts +5 -2
- package/types/layout/team-components/UserMenu/index.d.ts +52 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { FooterContentProps } from 'libs/multi-lib/src/types/cms/ContentTypes/Footer';
|
|
2
|
+
|
|
3
|
+
export declare const FooterContent: ({ PAYMENT_FLAGS_DICTIONARY, PAYMENT_FLAGS, LEGAL_INFORMATION_TEXT, SectionZone, ICONS, ...props }: FooterContentProps) => Promise<import("react/jsx-runtime").JSX.Element>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { HeaderContentProps } from '../../../types/cms/ContentTypes/Header';
|
|
2
2
|
|
|
3
|
-
export declare const HeaderContent: ({ children,
|
|
3
|
+
export declare const HeaderContent: ({ children, ClientHeaderProvider, ...props }: HeaderContentProps) => Promise<import("react/jsx-runtime").JSX.Element>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { PLPContentContextProps, PLPContentProviderProps } from '../../../types/cms/ContentTypes/PLP';
|
|
2
|
+
|
|
3
|
+
export declare const PLPContentProvider: ({ children, data, device, SectionZone, COMMON_PAGE_COLUMN_GAP_PDC, }: PLPContentProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const usePLPContent: () => PLPContentContextProps;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { TextContentSectionProps } from '../../../types/cms/Sections/TextContent';
|
|
2
2
|
|
|
3
|
-
export declare const TextContentSection: ({ data, ICONS }: TextContentSectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
export default TextContentSection;
|
|
3
|
+
export declare const TextContentSection: ({ data, ICONS, }: TextContentSectionProps) => import("react/jsx-runtime").JSX.Element;
|
package/cms/index.d.ts
CHANGED
|
@@ -9,9 +9,11 @@ export declare const clientCMS: {
|
|
|
9
9
|
} & import('react').HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
BennefitsBarSection: ({ data, CONSTANTS }: import('../types/cms/Sections/BennefitsBar').BennefitsBarSectionType) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
SingleBannerSection: (data: import('../types/cms/Sections/Banner').BannerSectionType) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
TextContentSection: ({ data, ICONS }: import('../types/cms/Sections/TextContent').TextContentSectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
TextContentSection: ({ data, ICONS, }: import('../types/cms/Sections/TextContent').TextContentSectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
BannerCarousel: ({ data, ICONS }: import('../types/cms/Sections/BannerCarousel').BannerCarouselProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
TextAccordionSection: ({ data, id: sectionId, ICONS, }: import('../types/cms/Sections/TextAccordion').TextAccordionSectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
TipbarScreening: ({ CONSTANTS, data }: import('../types/cms/ContentTypes/Tipbar').TipbarScreeningProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
ImageGrid: (data: import('../types/cms/Sections/ImageGrid').ImageGridSectionType) => import("react/jsx-runtime").JSX.Element;
|
|
15
17
|
};
|
|
16
18
|
helpers: typeof helpers;
|
|
17
19
|
};
|
package/cms/server.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export declare const serverCMS: {
|
|
2
|
+
Components: {
|
|
3
|
+
CommonPageContent: ({ slug, SectionZone, COMMON_PAGE_COLUMN_GAP, ...props }: import('../types/cms/ContentTypes/CommonPage').CommonPageContentProps) => Promise<import("react/jsx-runtime").JSX.Element>;
|
|
4
|
+
HeaderContent: ({ children, ClientHeaderProvider, ...props }: import('../types/cms/ContentTypes/Header').HeaderContentProps) => Promise<import("react/jsx-runtime").JSX.Element>;
|
|
5
|
+
TipbarContent: ({ ClientTipbarContent, ...props }: import('../types/cms/ContentTypes/Tipbar').TipbarContentProps) => Promise<import("react/jsx-runtime").JSX.Element>;
|
|
6
|
+
};
|
|
7
|
+
};
|
package/constants.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { ICONSType } from './types/constants';
|
|
2
|
+
import { LOGIN_MENU_OPTIONS_ARRAYProps } from './types/layout/team-components/UserMenu';
|
|
3
|
+
|
|
1
4
|
export declare const PLP_FILTERS_SORT: {
|
|
2
5
|
placeholder: string;
|
|
3
6
|
options: {
|
|
@@ -31,3 +34,15 @@ export declare const SEARCH_PAGE_DEFAULT_PAGINATION: {
|
|
|
31
34
|
total: number;
|
|
32
35
|
};
|
|
33
36
|
export declare const DEFAULT_IMAGE_ALT_TEXT = "Imagem do produto";
|
|
37
|
+
export declare const PLP_TOP_CONTENT_LENGTH = 1;
|
|
38
|
+
export declare const LOGOUT_TEXT = "Sair";
|
|
39
|
+
export declare const LOGOUT_ICON: (ICONS: ICONSType) => string;
|
|
40
|
+
export declare const LOGIN_MENU_OPTIONS_ARRAY: ({ ICONS, storeConfig }: LOGIN_MENU_OPTIONS_ARRAYProps) => {
|
|
41
|
+
icon: string;
|
|
42
|
+
label: string;
|
|
43
|
+
href: string;
|
|
44
|
+
needToBeAuth: boolean;
|
|
45
|
+
deviceShown: string;
|
|
46
|
+
}[];
|
|
47
|
+
export declare const LOGIN_MENU_TITLE: (signed: boolean, userName?: string) => string;
|
|
48
|
+
export declare const LOGIN_MENU_DESCRIPTION: (signed: boolean) => string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ISessionContext, SessionProviderProps } from '../../types/contexts/contexts/session';
|
|
2
|
+
|
|
3
|
+
declare const SessionProvider: ({ children, AUTH_TOKEN_COOKIE }: SessionProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare const useSession: () => ISessionContext;
|
|
5
|
+
export { SessionProvider, useSession };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { UserMenuContextProps, UserMenuProviderProps } from '../../../types/layout/team-components/UserMenu';
|
|
2
|
+
|
|
3
|
+
declare const UserMenuContext: import('react').Context<UserMenuContextProps>;
|
|
4
|
+
declare const UserMenuProvider: ({ children, delay, gap, isOpen, setIsOpen, target, ...props }: UserMenuProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare const useUserMenuContext: () => UserMenuContextProps;
|
|
6
|
+
export { UserMenuContext, UserMenuProvider, useUserMenuContext };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PLPContextProps, PLPProviderProps } from '../../../types/contexts/contexts/plp';
|
|
2
|
+
|
|
3
|
+
declare const PLPContext: import('react').Context<PLPContextProps>;
|
|
4
|
+
declare const PLPProvider: ({ children, slug, searchParams, collectionId, itemsPerPage }: PLPProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare const usePLPContext: () => PLPContextProps;
|
|
6
|
+
export { PLPContext, PLPProvider, usePLPContext };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PLPInfiniteContextProps, PLPInfiniteProviderProps } from '../../../types/contexts/contexts/plp';
|
|
2
|
+
|
|
3
|
+
declare const PLPInfiniteContext: import('react').Context<PLPInfiniteContextProps>;
|
|
4
|
+
declare const PLPInfiniteProvider: ({ banners, children, itemsPerPage, searchParams }: PLPInfiniteProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare const usePLPInfiniteContext: () => PLPInfiniteContextProps;
|
|
6
|
+
export { PLPInfiniteContext, PLPInfiniteProvider, usePLPInfiniteContext };
|
package/contexts/index.d.ts
CHANGED
|
@@ -70,6 +70,14 @@ export declare const contexts: {
|
|
|
70
70
|
provider: ({ children, gridScrollBack }: import('../types/contexts/contexts/pdp').PDPProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
71
71
|
hook: () => import('../types/contexts/contexts/pdp').PDPContextProps;
|
|
72
72
|
};
|
|
73
|
+
plp: {
|
|
74
|
+
provider: ({ children, slug, searchParams, collectionId, itemsPerPage }: import('../types/contexts/contexts/plp').PLPProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
75
|
+
hook: () => import('../types/contexts/contexts/plp').PLPContextProps;
|
|
76
|
+
};
|
|
77
|
+
plpInfinite: {
|
|
78
|
+
provider: ({ banners, children, itemsPerPage, searchParams }: import('../types/contexts/contexts/plp').PLPInfiniteProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
79
|
+
hook: () => import('../types/contexts/contexts/plp').PLPInfiniteContextProps;
|
|
80
|
+
};
|
|
73
81
|
pdpdata: {
|
|
74
82
|
hook: () => import('../types/contexts/contexts/pdp').PDPDataContextProps;
|
|
75
83
|
provider: ({ children, productData, isKit, PDP_INFO, NAME_SPLIT_SYMBOL }: import('../types/contexts/contexts/pdp').PDPDataProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -98,6 +106,10 @@ export declare const contexts: {
|
|
|
98
106
|
hook: () => import('../types/contexts/contexts/search').TopSearchesContextProps;
|
|
99
107
|
provider: ({ children }: import('react').PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
|
|
100
108
|
};
|
|
109
|
+
session: {
|
|
110
|
+
hook: () => import('../types/contexts/contexts/session').ISessionContext;
|
|
111
|
+
provider: ({ children, AUTH_TOKEN_COOKIE }: import('../types/contexts/contexts/session').SessionProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
112
|
+
};
|
|
101
113
|
ui: {
|
|
102
114
|
hook: () => import('../types/contexts/contexts/cart').UIContextProps;
|
|
103
115
|
provider: ({ children, ...props }: import('../types/contexts/contexts/cart').UIProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -10,12 +10,12 @@ declare const schemaShipping: yup.ObjectSchema<{
|
|
|
10
10
|
selectedAddresses: {
|
|
11
11
|
number?: string | null | undefined;
|
|
12
12
|
state?: string | null | undefined;
|
|
13
|
+
street?: string | null | undefined;
|
|
13
14
|
city?: string | null | undefined;
|
|
14
15
|
complement?: string | null | undefined;
|
|
15
16
|
neighborhood?: string | null | undefined;
|
|
16
17
|
receiverName?: string | null | undefined;
|
|
17
18
|
reference?: string | null | undefined;
|
|
18
|
-
street?: string | null | undefined;
|
|
19
19
|
country: string;
|
|
20
20
|
postalCode: string;
|
|
21
21
|
addressId: string;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { State } from '../../../types/data/api/search/index';
|
|
2
|
+
import { ProductSearchResultPage } from '../../../types/data/api/search/product';
|
|
3
|
+
import { ProductNode_PDC } from '../../../types/global/product';
|
|
4
|
+
import { PLPBanners, Page, PLPInfiniteContextProps } from '../../../types/contexts/contexts/plp';
|
|
5
|
+
|
|
6
|
+
export declare const deepEqual: (a: any, b: any) => boolean;
|
|
7
|
+
export declare const hasStateChangedExceptPage: (prev: State, next: State, excludeKey?: keyof State) => boolean;
|
|
8
|
+
export declare const fetchPage: (payload: State) => Promise<ProductSearchResultPage>;
|
|
9
|
+
export declare const createProduct: () => ProductNode_PDC;
|
|
10
|
+
export declare const getBanners: (banners: PLPBanners, page: number, columns: number, itemsPerPage?: number) => {
|
|
11
|
+
placedBanners: number[];
|
|
12
|
+
taken: Set<number>;
|
|
13
|
+
};
|
|
14
|
+
export declare const getPositions: (banners: PLPBanners, page: number, columns: number, itemsPerPage?: number) => {
|
|
15
|
+
banners: number[];
|
|
16
|
+
products: number[];
|
|
17
|
+
};
|
|
18
|
+
export declare const createPages: (page: number, data?: ProductSearchResultPage, itemsPerPage?: number) => {
|
|
19
|
+
loading: boolean;
|
|
20
|
+
page: number;
|
|
21
|
+
pagination: {
|
|
22
|
+
nextPage: boolean;
|
|
23
|
+
previousPage: boolean;
|
|
24
|
+
startCursor: string;
|
|
25
|
+
endCursor: string;
|
|
26
|
+
count: number;
|
|
27
|
+
total: number;
|
|
28
|
+
};
|
|
29
|
+
products: ProductNode_PDC[];
|
|
30
|
+
}[];
|
|
31
|
+
export declare const createPage: (pages: Page[], newPage: number) => Page[];
|
|
32
|
+
export declare const createPagination: () => {
|
|
33
|
+
nextPage: boolean;
|
|
34
|
+
previousPage: boolean;
|
|
35
|
+
startCursor: string;
|
|
36
|
+
endCursor: string;
|
|
37
|
+
count: number;
|
|
38
|
+
total: number;
|
|
39
|
+
};
|
|
40
|
+
export declare const getVisibleBanners: (pages: Page[], banners: PLPBanners, products: PLPInfiniteContextProps["products"], bannersPositions: PLPInfiniteContextProps["banners"], count: number) => ({
|
|
41
|
+
columns: number;
|
|
42
|
+
position_grid: number;
|
|
43
|
+
} & {
|
|
44
|
+
borderTop: boolean;
|
|
45
|
+
textStructure: string;
|
|
46
|
+
textStructureReduced: string;
|
|
47
|
+
enableIcon: boolean;
|
|
48
|
+
textStructureButtonIcon: string;
|
|
49
|
+
textStructureButtonLabel: string;
|
|
50
|
+
textStructureButtonSize: import('@soma-vertical-web/foundations').TSizesSmallExtended;
|
|
51
|
+
textStructureButtonHref: string;
|
|
52
|
+
textStructureMode: import('@soma-vertical-web/foundations').TMode;
|
|
53
|
+
textStructureAlignment: import('../../../types/cms/Sections/TextContent').ContentAlignment;
|
|
54
|
+
showTextStructureExpander: boolean;
|
|
55
|
+
} & {
|
|
56
|
+
promotion_id: string;
|
|
57
|
+
promotion_name: string;
|
|
58
|
+
creative_name: string;
|
|
59
|
+
creative_slot: string;
|
|
60
|
+
isHeroBanner: boolean;
|
|
61
|
+
backgroundColor: string;
|
|
62
|
+
contentOrder: string;
|
|
63
|
+
video: string;
|
|
64
|
+
position: import('../../../types/cms/Sections/Banner').Position;
|
|
65
|
+
image: string;
|
|
66
|
+
imageHref: string;
|
|
67
|
+
imageOpacity: boolean;
|
|
68
|
+
altImage: string;
|
|
69
|
+
showTimer: boolean;
|
|
70
|
+
timerEnd: string;
|
|
71
|
+
timerInit: string;
|
|
72
|
+
timerMode: import('@soma-vertical-web/foundations').TMode;
|
|
73
|
+
timerSize: string;
|
|
74
|
+
contentAlignment: import('../../../types/cms/Sections/Banner').ContentAlignment;
|
|
75
|
+
title: string;
|
|
76
|
+
href?: string;
|
|
77
|
+
index?: number;
|
|
78
|
+
headerVariant: import('@soma-vertical-web/core-components/src/lib/Header/interfaces').VariantsType;
|
|
79
|
+
})[];
|
|
80
|
+
export declare const getRandomVideoPerRow: (positions: number[], columns: number) => number[];
|
|
81
|
+
export declare const getProductsWithVideo: (products: ProductNode_PDC["node"][], positions: number[], columns: number) => number[];
|