@soma-vertical-web/multi-lib 1.0.21 → 1.0.22

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 (45) hide show
  1. package/cms/ContentTypes/LPLojas/LPLojaClientWrapper.d.ts +1 -1
  2. package/cms/ContentTypes/LPLojas/LPLojasContent.d.ts +1 -1
  3. package/cms/ContentTypes/LPLojas/helpers.d.ts +1 -7
  4. package/cms/ContentTypes/PolicyPage/PolicyPageContent.d.ts +3 -0
  5. package/cms/index.d.ts +1 -1
  6. package/cms/server.d.ts +2 -1
  7. package/contexts/contexts/lplojas/Context.d.ts +1 -1
  8. package/contexts/index.d.ts +2 -2
  9. package/index-D61YFVi9.mjs +2261 -0
  10. package/index-DyKuIyRP.js +4 -0
  11. package/index.js +16 -16
  12. package/index.mjs +7158 -6900
  13. package/index2.js +2 -2
  14. package/index2.mjs +949 -999
  15. package/layout/index.d.ts +6 -4
  16. package/layout/template/LPLojas/Composite/Details/Details.d.ts +1 -1
  17. package/layout/template/LPLojas/Composite/Details/Item.d.ts +1 -1
  18. package/layout/template/LPLojas/Composite/Details/Vendor.d.ts +1 -1
  19. package/layout/template/LPLojas/Composite/DropDown/DropDown.d.ts +1 -1
  20. package/layout/template/LPLojas/Composite/Root.d.ts +1 -1
  21. package/layout/template/LPLojas/index.d.ts +3 -3
  22. package/layout/template/PDC/Composite/Products/Products.d.ts +1 -1
  23. package/layout/template/PDC/index.d.ts +1 -1
  24. package/layout/template/PDP/Composite/Info/MainContent/Similars/index.d.ts +1 -1
  25. package/layout/template/PDP/index.d.ts +2 -2
  26. package/layout/template/Politicas/Composite/Banner.d.ts +4 -0
  27. package/layout/template/Politicas/Composite/Container.d.ts +7 -0
  28. package/layout/template/Politicas/Composite/OneTrustPolicy.d.ts +14 -0
  29. package/layout/template/Politicas/Politicas.d.ts +10 -0
  30. package/package.json +1 -1
  31. package/server.d.ts +1 -3
  32. package/style.css +1 -1
  33. package/types/cms/ContentTypes/LPLojas/index.d.ts +22 -1
  34. package/types/cms/ContentTypes/PolicyPage/index.d.ts +17 -0
  35. package/types/cms/Sections/SectionZone/index.d.ts +1 -0
  36. package/types/contexts/contexts/plp.d.ts +1 -0
  37. package/types/contexts/hooks/index.d.ts +12 -0
  38. package/types/layout/team-components/ProductCard/index.d.ts +1 -0
  39. package/types/layout/team-components/ProductList/index.d.ts +2 -1
  40. package/types/layout/templates/LPLojas/Details/index.d.ts +18 -0
  41. package/types/layout/templates/LPLojas/DropDown/index.d.ts +10 -0
  42. package/types/layout/templates/LPLojas/index.d.ts +18 -0
  43. package/types/layout/templates/PDP/index.d.ts +1 -2
  44. package/types/layout/templates/PLP/index.d.ts +1 -0
  45. package/types/layout/templates/Politicas/index.d.ts +27 -0
@@ -1,12 +1,33 @@
1
+ import { ComponentType } from 'react';
1
2
  import { IContentTypeResponseBase } from '../../Factories';
3
+ import { GetContentTypeParams } from '../../../data/api/cms';
4
+ import { ICONSType } from '../../../constants';
5
+ import { StoreMetaData } from '../../../layout/templates/LPLojas';
2
6
 
3
7
  export interface Config {
4
8
  titlePage: string;
5
9
  altImageBackgroud: string;
6
- imageBackground: string;
10
+ imageBackgroundDesk: string;
11
+ imageBackgroundMob: string;
7
12
  }
8
13
  export interface ILPLojasContent extends IContentTypeResponseBase {
9
14
  config: {
10
15
  config: Config;
11
16
  };
12
17
  }
18
+ export interface LPLojasContentProps extends GetContentTypeParams {
19
+ entity: string;
20
+ ICONS: ICONSType;
21
+ LPLOJAS_TEMPLATE_RETURN_BUTTON: string;
22
+ showVendor: boolean;
23
+ LPStoresClientWrapper: ComponentType<any>;
24
+ }
25
+ export interface LPStoresClientWrapperProps {
26
+ stores: StoreMetaData[];
27
+ content: any;
28
+ data: any;
29
+ showVendor: boolean;
30
+ ICONS: ICONSType;
31
+ LPLOJAS_TEMPLATE_RETURN_BUTTON: string;
32
+ entity: string;
33
+ }
@@ -1,7 +1,10 @@
1
+ import { ComponentType } from 'react';
1
2
  import { IContentTypeResponseBase } from '../../Factories';
2
3
  import { NewsLetterSectionType } from '../../Sections/Newsletter';
3
4
  import { TextAccordionSectionType } from '../../Sections/TextAccordion';
4
5
  import { TextContentSectionType } from '../../Sections/TextContent';
6
+ import { OneTrustConfig } from '../../../layout/templates/Politicas';
7
+ import { GetContentTypeParams } from '../../../data/api/cms';
5
8
 
6
9
  export interface ConfigTab {
7
10
  tabConfig: {
@@ -36,3 +39,17 @@ export interface IPolicyTab extends IContentTypeResponseBase {
36
39
  config: ConfigTab;
37
40
  sections: TabPolicySectionType[];
38
41
  }
42
+ export interface PolicyPageContentProps extends GetContentTypeParams {
43
+ slug: string;
44
+ SectionZone: ComponentType<any>;
45
+ Politicas: ComponentType<any>;
46
+ oneTrust: OneTrustConfig;
47
+ }
48
+ export interface PolicyPageClientProps {
49
+ slug: string;
50
+ pageData: IPolicyPage;
51
+ tabsData: IPolicyTab[];
52
+ SectionZone: ComponentType<any>;
53
+ oneTrust: OneTrustConfig;
54
+ newsletterContent: IPolicyPage['sections'] | null;
55
+ }
@@ -28,6 +28,7 @@ export type ProductCarouselConstants = {
28
28
  TEXTURE_IMAGE: TEXTURE_IMAGEType;
29
29
  Z_INDEX_WAR: Z_INDEX_WARType;
30
30
  StoreConfig_MainSellerId: StoreConfigType['mainSeller']['id'];
31
+ storeId: StoreConfigType['api']['storeId'];
31
32
  };
32
33
  searchModal?: boolean;
33
34
  };
@@ -95,5 +95,6 @@ export interface PLPConstantsProviderProps extends PropsWithChildren {
95
95
  Z_INDEX_WAR: Z_INDEX_WARType;
96
96
  StoreConfig_MainSellerId: StoreConfigType['mainSeller']['id'];
97
97
  searchParams: URLSearchParams;
98
+ storeId: StoreConfigType['api']['storeId'];
98
99
  }
99
100
  export type PLPConstantsContextProps = Omit<PLPConstantsProviderProps, 'children'>;
@@ -17,3 +17,15 @@ export type UseScrollRestorationInfiniteProps = {
17
17
  load: boolean;
18
18
  PLP_GRID_SCROLL_BACK: PLP_GRID_SCROLL_BACKType;
19
19
  };
20
+ export type SimilarItem = any;
21
+ export type SimilarCallback = (data: SimilarItem[]) => void;
22
+ export type SimilarsOptions = {
23
+ filterTexture?: string[];
24
+ storeId: string;
25
+ };
26
+ export type PendingRequest = {
27
+ productId: string;
28
+ callbacks: SimilarCallback[];
29
+ filterTexture?: string[];
30
+ storeId: string;
31
+ };
@@ -33,6 +33,7 @@ export interface RootProps extends HTMLAttributes<HTMLDivElement> {
33
33
  Z_INDEX_WAR: Z_INDEX_WARType;
34
34
  StoreConfig_MainSellerId: StoreConfigType['mainSeller']['id'];
35
35
  ICONS: ICONSType;
36
+ storeId: StoreConfigType['api']['storeId'];
36
37
  };
37
38
  }
38
39
  export type Sizes = (typeof SizesExtended)[number];
@@ -1,5 +1,5 @@
1
1
  import { HTMLAttributes, MutableRefObject } from 'react';
2
- import { PLP_INFINITE_SCROLLType, PLP_PRODUCT_SIMILAR_DELAYType, PLP_SIZE_ORDERType, PRODUCT_CARD_IMAGE_ASPECT_RATIOType, TEXTURE_IMAGEType } from '../../../constants';
2
+ import { PLP_INFINITE_SCROLLType, PLP_PRODUCT_SIMILAR_DELAYType, PLP_SIZE_ORDERType, PRODUCT_CARD_IMAGE_ASPECT_RATIOType, StoreConfigType, TEXTURE_IMAGEType } from '../../../constants';
3
3
  import { HasVariant, ProductType_PDC } from '../../../global/product';
4
4
  import { ProductCardProps, RootProps as ProductCard_RootProps } from '../ProductCard';
5
5
  import { TagCommercialConsumer } from '../../../cms/ContentTypes/FlagsAndTags';
@@ -49,5 +49,6 @@ export interface CardProps {
49
49
  PLP_PRODUCT_SIMILAR_DELAY: PLP_PRODUCT_SIMILAR_DELAYType;
50
50
  PLP_SIZE_ORDER: PLP_SIZE_ORDERType;
51
51
  TEXTURE_IMAGE?: TEXTURE_IMAGEType;
52
+ storeId: StoreConfigType['api']['storeId'];
52
53
  };
53
54
  }
@@ -0,0 +1,18 @@
1
+ import { IFlexProps } from '@soma-vertical-web/foundations';
2
+ import { ICONSType } from '../../../../constants';
3
+ import { StoreMetaData } from '..';
4
+
5
+ export interface ItemProps extends IFlexProps {
6
+ title?: string;
7
+ text?: string;
8
+ type?: 'default' | 'title';
9
+ }
10
+ export interface DetailsProps {
11
+ store: StoreMetaData;
12
+ showVendor?: boolean;
13
+ ICONS: ICONSType;
14
+ }
15
+ export interface VendorProps {
16
+ vendor: string;
17
+ ICONS: ICONSType;
18
+ }
@@ -0,0 +1,10 @@
1
+ import { DefaultDropDownProps } from '@soma-vertical-web/core-components/src/lib/DropDown/interfaces';
2
+ import { ICONSType } from '../../../../../types/constants';
3
+
4
+ export interface DropDownProps extends DefaultDropDownProps {
5
+ selectText: string;
6
+ arrowDownIcon?: React.ReactNode;
7
+ arrowUpIcon?: React.ReactNode;
8
+ list?: string[];
9
+ ICONS: ICONSType;
10
+ }
@@ -0,0 +1,18 @@
1
+ import { HTMLAttributes, PropsWithChildren } from 'react';
2
+
3
+ export declare const metaFields: readonly ["id", "endereco", "cidade", "complement", "district", "nome", "number", "telefone", "horario", "state", "celular", "vendedoras"];
4
+ export type MetaFields = (typeof metaFields)[number];
5
+ export type StoreMetaData = {
6
+ [key in MetaFields]?: string | number | null;
7
+ };
8
+ export interface RootProps extends HTMLAttributes<HTMLDivElement> {
9
+ data: StoreMetaData[];
10
+ }
11
+ export type LPStoreProviderProps = RootProps & PropsWithChildren;
12
+ export interface LPStoreContextProps extends RootProps {
13
+ handleSelectCity(city: string): void;
14
+ handleSelectStore(store: string): void;
15
+ clearSelectedStore(): void;
16
+ selectedCity: StoreMetaData[] | undefined;
17
+ selectedStore: string | undefined;
18
+ }
@@ -114,9 +114,8 @@ export type ProductMeasurementsProps = {
114
114
  Z_INDEX_WAR: Z_INDEX_WARType;
115
115
  };
116
116
  export interface PDPSimilarsType extends PropsWithChildren {
117
- apiUrl: string;
117
+ storeId: string;
118
118
  productId: string;
119
- ClientItems: React.ComponentType<ItemsProps>;
120
119
  PDP_INFO: PDP_INFOType;
121
120
  TEXTURE_IMAGE: TEXTURE_IMAGEType;
122
121
  TOGGLE_STYLE_MODIFIER: TOGGLE_STYLE_MODIFIERType;
@@ -113,6 +113,7 @@ export interface ProductsProps {
113
113
  StoreConfig_MainSellerId: StoreConfigType['mainSeller']['id'];
114
114
  TEXTURE_IMAGE: TEXTURE_IMAGEType;
115
115
  Z_INDEX_WAR: Z_INDEX_WARType;
116
+ storeId: StoreConfigType['api']['storeId'];
116
117
  }
117
118
  export interface PLPRootProps extends PLPConstantsContextProps {
118
119
  className?: string;
@@ -0,0 +1,27 @@
1
+ export interface ContainerProps extends React.HTMLAttributes<HTMLDivElement> {
2
+ children: React.ReactNode;
3
+ }
4
+ export interface BannerProps extends React.HTMLAttributes<HTMLDivElement> {
5
+ title: string;
6
+ srcImages: {
7
+ desktop: string;
8
+ mobile: string;
9
+ };
10
+ children?: React.ReactNode;
11
+ }
12
+ interface Image {
13
+ image: string;
14
+ }
15
+ export interface BannerData {
16
+ desktop: Image;
17
+ mobile: Image;
18
+ }
19
+ export interface OneTrustConfig {
20
+ policyScript: string;
21
+ policyId: string;
22
+ siteId: string;
23
+ }
24
+ export interface OneTrustProps {
25
+ oneTrust: OneTrustConfig;
26
+ }
27
+ export {};