@soma-vertical-web/multi-lib 0.0.75 → 1.0.1

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 (117) hide show
  1. package/SearchPageScreening-BryoK-U4.js +4 -0
  2. package/SearchPageScreening-DER0_wzr.mjs +1812 -0
  3. package/cms/ContentTypes/Cart/index.d.ts +3 -0
  4. package/cms/ContentTypes/CommonPage/CommonPage.d.ts +1 -1
  5. package/cms/ContentTypes/FlagsAndTags/index.d.ts +3 -0
  6. package/cms/ContentTypes/Footer/Footer.d.ts +1 -1
  7. package/cms/ContentTypes/HelpButton/HelpButtonContent.d.ts +1 -1
  8. package/cms/ContentTypes/LPCadastro/LPCadastroContent.d.ts +1 -1
  9. package/cms/ContentTypes/PDP/PDPContent.d.ts +1 -1
  10. package/cms/ContentTypes/PLP/PLPContent.d.ts +1 -1
  11. package/cms/ContentTypes/{Redirects → PLP/Redirects}/Redirects.d.ts +1 -1
  12. package/cms/ContentTypes/Search/SearchContent.d.ts +1 -1
  13. package/cms/Sections/Banner/Composite/Content.d.ts +1 -1
  14. package/cms/Sections/SectionZone.d.ts +1 -1
  15. package/cms/Sections/TextAccordion/Component.d.ts +1 -1
  16. package/cms/Sections/TextContent/Component.d.ts +1 -1
  17. package/cms/Sections/TextContent/Composite/ContentWrapper.d.ts +1 -1
  18. package/cms/index.d.ts +4 -4
  19. package/cms/server.d.ts +8 -6
  20. package/contexts/contexts/Session.d.ts +1 -1
  21. package/contexts/contexts/cart/Context.d.ts +1 -1
  22. package/contexts/contexts/cms/FlagsAndTagsContext.d.ts +3 -5
  23. package/contexts/hooks/useOperations.d.ts +3 -2
  24. package/contexts/index.d.ts +5 -15
  25. package/data/api/checkout/region/index.d.ts +1 -1
  26. package/data/api/cms/index.d.ts +10 -11
  27. package/data/helpers/cart/index.d.ts +62 -13
  28. package/data/helpers/cms/index.d.ts +9 -10
  29. package/data/helpers/utils/cms.d.ts +4 -0
  30. package/index.js +17 -41
  31. package/index.mjs +10206 -11387
  32. package/index2.js +1 -1
  33. package/index2.mjs +786 -744
  34. package/layout/index.d.ts +12 -10
  35. package/layout/team-component/Footer/Footer.d.ts +1 -1
  36. package/layout/team-component/Header/Composite/HeaderMobileWrapper.d.ts +1 -2
  37. package/layout/team-component/Header/index.d.ts +1 -1
  38. package/layout/team-component/ProductCard/Composite/Selectors/SizeSelector.d.ts +1 -1
  39. package/layout/team-component/ProductCard/ProductCard.d.ts +1 -1
  40. package/layout/team-component/Timer/index.d.ts +1 -1
  41. package/layout/team-component/UserMenu/index.d.ts +1 -1
  42. package/layout/template/MiniCart/Composite/Card/Composite/Sku.d.ts +1 -1
  43. package/layout/template/MiniCart/Composite/Card/index.d.ts +1 -1
  44. package/layout/template/MiniCart/Composite/Modal/Body/Body.d.ts +7 -0
  45. package/layout/template/MiniCart/Composite/Modal/Body/CouponTag/CouponTag.d.ts +9 -0
  46. package/layout/template/MiniCart/Composite/Modal/Body/CouponTag/index.d.ts +1 -0
  47. package/layout/template/MiniCart/Composite/Modal/Body/Promotion/Promotion.d.ts +9 -0
  48. package/layout/template/MiniCart/Composite/Modal/Body/Promotion/helper.d.ts +5 -0
  49. package/layout/template/MiniCart/Composite/Modal/Body/Promotion/index.d.ts +1 -0
  50. package/layout/template/MiniCart/Composite/Modal/Body/index.d.ts +1 -0
  51. package/layout/template/MiniCart/Composite/Modal/Footer/Discount/Discount.d.ts +1 -1
  52. package/layout/template/MiniCart/Composite/Modal/Footer/Resume/Totals.d.ts +1 -5
  53. package/layout/template/MiniCart/Composite/Notifications/Notifications.d.ts +1 -1
  54. package/layout/template/MiniCart/MiniCart.d.ts +1 -1
  55. package/layout/template/MiniCart/index.d.ts +3 -5
  56. package/layout/template/PDC/Composite/Products/Products.d.ts +1 -1
  57. package/layout/template/PDC/index.d.ts +1 -1
  58. package/layout/template/PDP/Composite/Info/MainContent/Actions/index.d.ts +1 -1
  59. package/layout/template/PDP/Composite/Info/MainContent/BottomNavigation/index.d.ts +1 -1
  60. package/layout/template/PDP/Composite/Info/MainContent/Header/GoldenTag.d.ts +9 -0
  61. package/layout/template/PDP/index.d.ts +2 -1
  62. package/layout/template/QuickShop/Composite/Body.d.ts +1 -1
  63. package/layout/template/SearchModal/Composite/AutoComplete.d.ts +7 -0
  64. package/layout/template/SearchModal/Composite/Header.d.ts +3 -0
  65. package/layout/template/SearchModal/Composite/Recommendations.d.ts +3 -0
  66. package/layout/template/SearchModal/Composite/Trends.d.ts +4 -0
  67. package/layout/template/SearchModal/SearchModal.d.ts +7 -0
  68. package/layout/template/SearchModal/helpers.d.ts +3 -0
  69. package/layout/template/SearchModal/index.d.ts +1 -0
  70. package/package.json +1 -1
  71. package/style.css +1 -1
  72. package/types/cms/ContentTypes/Cart/index.d.ts +46 -0
  73. package/types/cms/ContentTypes/CommonPage/index.d.ts +5 -4
  74. package/types/cms/ContentTypes/FlagsAndTags/index.d.ts +18 -9
  75. package/types/cms/ContentTypes/Footer/index.d.ts +7 -5
  76. package/types/cms/ContentTypes/Header/index.d.ts +4 -4
  77. package/types/cms/ContentTypes/HelpButton/index.d.ts +5 -6
  78. package/types/cms/ContentTypes/PDP/index.d.ts +6 -6
  79. package/types/cms/ContentTypes/PLP/index.d.ts +7 -6
  80. package/types/cms/ContentTypes/Redirects/index.d.ts +2 -2
  81. package/types/cms/ContentTypes/Search/index.d.ts +7 -7
  82. package/types/cms/ContentTypes/Tipbar/index.d.ts +4 -3
  83. package/types/cms/Sections/Banner/index.d.ts +3 -5
  84. package/types/cms/Sections/BannerCarousel/index.d.ts +2 -3
  85. package/types/cms/Sections/BennefitsBar/index.d.ts +2 -6
  86. package/types/cms/Sections/Newsletter/index.d.ts +2 -7
  87. package/types/cms/Sections/ProductCarousel/index.d.ts +5 -29
  88. package/types/cms/Sections/SectionZone/index.d.ts +81 -0
  89. package/types/cms/Sections/TextContent/index.d.ts +5 -2
  90. package/types/constants.d.ts +36 -0
  91. package/types/contexts/contexts/pdp.d.ts +2 -1
  92. package/types/contexts/contexts/plp.d.ts +3 -1
  93. package/types/contexts/store/cart.d.ts +12 -0
  94. package/types/data/api/checkout/order-form/index.d.ts +19 -0
  95. package/types/data/api/cms/index.d.ts +5 -4
  96. package/types/data/api/index.d.ts +1 -1
  97. package/types/layout/team-components/BuyPackage/index.d.ts +2 -20
  98. package/types/layout/team-components/Footer/index.d.ts +2 -0
  99. package/types/layout/team-components/Header/index.d.ts +3 -2
  100. package/types/layout/team-components/ProductCard/Selectors/index.d.ts +2 -0
  101. package/types/layout/team-components/ProductCard/index.d.ts +2 -1
  102. package/types/layout/team-components/ProductList/index.d.ts +3 -1
  103. package/types/layout/team-components/Timer/index.d.ts +8 -1
  104. package/types/layout/team-components/UserMenu/index.d.ts +3 -1
  105. package/types/layout/templates/LPCadastro/index.d.ts +5 -4
  106. package/types/layout/templates/MiniCart/index.d.ts +7 -1
  107. package/types/layout/templates/PDP/index.d.ts +4 -2
  108. package/types/layout/templates/PLP/index.d.ts +2 -1
  109. package/types/layout/templates/QuickShop/index.d.ts +2 -1
  110. package/types/layout/templates/SearchModal/index.d.ts +42 -0
  111. package/data/api/cms/backup/index.d.ts +0 -11
  112. package/index-BBxYNFkz.mjs +0 -416
  113. package/index-BR_9YNfn.mjs +0 -421
  114. package/index-CwBIv223.js +0 -1
  115. package/index-DL877zTH.js +0 -1
  116. package/layout/template/MiniCart/Composite/Modal/Body.d.ts +0 -7
  117. package/types/cms/Sections/SectionZone/intex.d.ts +0 -64
@@ -0,0 +1,46 @@
1
+ import { PropsWithChildren, ComponentType } from 'react';
2
+ import { GetContentTypeParams } from '../../../data/api/cms';
3
+ import { IContentTypeResponseBase } from '../../Factories';
4
+
5
+ interface IconsFlagType {
6
+ enableIcon: boolean;
7
+ icon: string;
8
+ iconColor: string;
9
+ }
10
+ interface CommonFlagType {
11
+ active: string;
12
+ value: string;
13
+ textColor: string;
14
+ tagColor: string;
15
+ }
16
+ export interface PromotionProps {
17
+ selectPromotion: string;
18
+ versionAPI: string;
19
+ idPromotion: string;
20
+ cupom: string;
21
+ title: string;
22
+ subtitle: string;
23
+ link: string;
24
+ linkLabel: string;
25
+ titleSuccess: string;
26
+ subtitleSuccess: string;
27
+ }
28
+ export interface FlagsCartProps {
29
+ flagHeader: CommonFlagType & IconsFlagType;
30
+ flagTotal: CommonFlagType;
31
+ flagCupom: CommonFlagType & {
32
+ valueCupom: string;
33
+ };
34
+ }
35
+ export interface ICartContent extends IContentTypeResponseBase {
36
+ flags: {
37
+ flagCart: FlagsCartProps;
38
+ };
39
+ promotion: {
40
+ promotionCart: PromotionProps;
41
+ };
42
+ }
43
+ export interface CartContentProps extends PropsWithChildren, GetContentTypeParams {
44
+ ClientCartProvider: ComponentType<any>;
45
+ }
46
+ export {};
@@ -1,5 +1,6 @@
1
+ import { ComponentType } from 'react';
1
2
  import { COMMON_PAGE_COLUMN_GAPType } from '../../../constants';
2
- import { GetContentTypeProps } from '../../../data/api/cms';
3
+ import { GetContentTypeParams } from '../../../data/api/cms';
3
4
  import { IContentTypeResponseBase } from '../../Factories';
4
5
 
5
6
  export type DeviceType = 'mobile' | 'desktop';
@@ -18,9 +19,9 @@ export interface Config {
18
19
  export interface ICommonPage extends IContentTypeResponseBase {
19
20
  config: Config;
20
21
  }
21
- export interface CommonPageContentProps extends Omit<GetContentTypeProps, 'contentType'> {
22
+ export interface CommonPageContentProps extends GetContentTypeParams {
22
23
  slug: string;
23
- SectionZone: React.ComponentType<any>;
24
+ SectionZone: ComponentType<any>;
24
25
  COMMON_PAGE_COLUMN_GAP: COMMON_PAGE_COLUMN_GAPType;
25
26
  identifyWhoIsFirst?: boolean;
26
27
  }
@@ -28,6 +29,6 @@ export interface DataScreeningProps {
28
29
  slug: string;
29
30
  data: ICommonPage[];
30
31
  COMMON_PAGE_COLUMN_GAP: COMMON_PAGE_COLUMN_GAPType;
31
- SectionZone: React.ComponentType<any>;
32
+ SectionZone: ComponentType<any>;
32
33
  identifyWhoIsFirst?: boolean;
33
34
  }
@@ -1,6 +1,6 @@
1
- import { PropsWithChildren } from 'react';
1
+ import { ComponentType, PropsWithChildren } from 'react';
2
2
  import { IContentTypeResponseBase } from '../../Factories';
3
- import { GetContentTypeProps } from '../../../data/api/cms';
3
+ import { GetContentTypeParams } from '../../../data/api/cms';
4
4
 
5
5
  export interface CommonFlagType {
6
6
  value: string;
@@ -21,12 +21,23 @@ export interface TagCommercialConsumer {
21
21
  textColor?: string;
22
22
  tagColor?: string;
23
23
  }
24
- export interface FlagDiscount {
24
+ export interface TagDiscountPercentage {
25
25
  enableTag: boolean;
26
26
  tagColor?: string;
27
27
  tagText?: string;
28
28
  tagTextColor?: string;
29
29
  }
30
+ export interface FlagGoldenPdp {
31
+ enableTag?: boolean;
32
+ key?: string;
33
+ value?: string;
34
+ countDownEndDate?: string;
35
+ timerMode?: string;
36
+ backgroundSelect?: string;
37
+ tagImage?: string;
38
+ backgroundColor?: string;
39
+ textColor?: string;
40
+ }
30
41
  export interface IFlagsAndTagsContent extends IContentTypeResponseBase {
31
42
  config: {
32
43
  commercial: {
@@ -35,13 +46,11 @@ export interface IFlagsAndTagsContent extends IContentTypeResponseBase {
35
46
  institucional: {
36
47
  items: FlagTagWithCluster[];
37
48
  };
38
- flagDiscount: FlagDiscount;
39
- flagCart: {
40
- flagHeader: CommonFlagType;
41
- flagTotal: string;
42
- };
49
+ flagDiscount: TagDiscountPercentage;
43
50
  flagPdp: CommonFlagType;
51
+ flagGoldenPdp: FlagGoldenPdp;
44
52
  };
45
53
  }
46
- export interface FlagsAndTagsProps extends Omit<GetContentTypeProps, 'contentType'>, PropsWithChildren {
54
+ export interface FlagsAndTagsContentProps extends PropsWithChildren, GetContentTypeParams {
55
+ ClientFlagsAndTagsProvider: ComponentType<any>;
47
56
  }
@@ -1,7 +1,8 @@
1
1
  import { IContentTypeResponseBase } from '../../Factories';
2
2
  import { ICONSType, LEGAL_INFORMATION_TEXTType, PAYMENT_FLAGS_DICTIONARYType, PAYMENT_FLAGSType } from '../../../constants';
3
- import { GetContentTypeProps } from '../../../data/api/cms';
3
+ import { GetContentTypeParams } from '../../../data/api/cms';
4
4
  import { IFooter } from '../../../layout/team-components/Footer';
5
+ import { ComponentType } from 'react';
5
6
 
6
7
  export type DeviceType = 'mobile' | 'desktop';
7
8
  export interface FooterLink {
@@ -72,12 +73,13 @@ export interface IFooterContent extends IContentTypeResponseBase {
72
73
  supportInfo: SupportInfo;
73
74
  };
74
75
  }
75
- export interface FooterContentProps extends Omit<GetContentTypeProps, 'contentType'> {
76
+ export interface FooterContentProps extends GetContentTypeParams {
77
+ className?: string;
76
78
  PAYMENT_FLAGS_DICTIONARY: PAYMENT_FLAGS_DICTIONARYType;
77
79
  PAYMENT_FLAGS: PAYMENT_FLAGSType;
78
- SectionZone: React.ComponentType<any>;
79
- Footer: React.ComponentType<IFooter>;
80
- FooterSupport: React.ComponentType<FooterProps>;
80
+ SectionZone: ComponentType<any>;
81
+ Footer: ComponentType<IFooter>;
82
+ FooterSupport: ComponentType<FooterProps>;
81
83
  ICONS: ICONSType;
82
84
  LEGAL_INFORMATION_TEXT: LEGAL_INFORMATION_TEXTType;
83
85
  }
@@ -1,8 +1,8 @@
1
- import { PropsWithChildren } from 'react';
1
+ import { ComponentType, PropsWithChildren } from 'react';
2
2
  import { IContentTypeResponseBase } from '../../Factories';
3
3
  import { DataSubmenu, IHeaderSubmenu } from '../../Sections/HeaderSubmenu';
4
4
  import { ICONSType } from '../../../constants';
5
- import { GetContentTypeProps } from '../../../data/api/cms';
5
+ import { GetContentTypeParams, GetContentTypeProps } from '../../../data/api/cms';
6
6
 
7
7
  export interface HeaderCategories {
8
8
  label: string;
@@ -57,6 +57,6 @@ export interface HeaderConfigsTypeProps extends PropsWithChildren, GetContentTyp
57
57
  export interface GenerateHeaderContentTypeProps {
58
58
  ICONS: ICONSType;
59
59
  }
60
- export interface HeaderContentProps extends PropsWithChildren, Omit<GetContentTypeProps, 'contentType'> {
61
- ClientHeaderProvider: React.ComponentType<any>;
60
+ export interface HeaderContentProps extends PropsWithChildren, GetContentTypeParams {
61
+ ClientHeaderProvider: ComponentType<any>;
62
62
  }
@@ -1,8 +1,8 @@
1
1
  import { TMode, TSizesSmallExtended } from '@soma-vertical-web/foundations';
2
+ import { ComponentType, HTMLAttributes } from 'react';
2
3
  import { IContentTypeResponseBase } from '../../Factories';
3
4
  import { ICONSType } from '../../../constants';
4
- import { GetContentTypeProps } from '../../../data/api/cms';
5
- import { HTMLAttributes } from 'react';
5
+ import { GetContentTypeParams } from '../../../data/api/cms';
6
6
 
7
7
  export declare const HELPBUTTON_CONTENT_TYPE: readonly ["button", "dropdown"];
8
8
  export type HelpButtonContentType = (typeof HELPBUTTON_CONTENT_TYPE)[number];
@@ -27,8 +27,7 @@ export interface IHelpButtonContent {
27
27
  items: ConfigHelpButton;
28
28
  };
29
29
  }
30
- export interface IHelpButtonContentResponse extends IContentTypeResponseBase {
31
- }
30
+ export type IHelpButtonContentResponse = IContentTypeResponseBase;
32
31
  export interface GenerateHelpButtonContentType {
33
32
  ICONS: ICONSType;
34
33
  }
@@ -40,10 +39,10 @@ export interface FormatHelpButtonProps {
40
39
  id: string;
41
40
  })[];
42
41
  }
43
- export interface HelpButtonContentProps extends Omit<GetContentTypeProps, 'contentType'>, HTMLAttributes<HTMLDivElement> {
42
+ export interface HelpButtonContentProps extends GetContentTypeParams, HTMLAttributes<HTMLDivElement> {
44
43
  iconLabel?: string | undefined;
45
44
  buttonLabel?: string | undefined;
46
45
  data?: FormatHelpButtonProps;
47
46
  ICONS: ICONSType;
48
- HelpButton: React.ComponentType<any>;
47
+ HelpButton: ComponentType<any>;
49
48
  }
@@ -1,21 +1,21 @@
1
- import { PropsWithChildren } from 'react';
1
+ import { ComponentType, PropsWithChildren } from 'react';
2
2
  import { IContentTypeResponseBase } from '../../Factories';
3
3
  import { BennefitsBarSectionType } from '../../Sections/BennefitsBar';
4
- import { GetContentTypeProps } from '../../../data/api/cms';
4
+ import { GetContentTypeParams } from '../../../data/api/cms';
5
5
  import { COMMON_PAGE_COLUMN_GAPType } from '../../../constants';
6
6
 
7
7
  export interface PDPContentType extends IContentTypeResponseBase {
8
8
  sections: BennefitsBarSectionType[] | any[];
9
9
  }
10
- export interface PDPContentProps extends PropsWithChildren, Omit<GetContentTypeProps, 'contentType'> {
10
+ export interface PDPContentProps extends PropsWithChildren, GetContentTypeParams {
11
11
  productId?: string;
12
12
  COMMON_PAGE_COLUMN_GAP: COMMON_PAGE_COLUMN_GAPType;
13
- SectionZone: React.ComponentType<any>;
14
- PDPContentProvider: React.ComponentType<PDPContentProviderProps>;
13
+ SectionZone: ComponentType<any>;
14
+ PDPContentProvider: ComponentType<PDPContentProviderProps>;
15
15
  }
16
16
  export interface PDPContentProviderProps extends PropsWithChildren {
17
17
  data: PDPContentType;
18
18
  productId?: string;
19
19
  COMMON_PAGE_COLUMN_GAP: COMMON_PAGE_COLUMN_GAPType;
20
- SectionZone: React.ComponentType<any>;
20
+ SectionZone: ComponentType<any>;
21
21
  }
@@ -1,4 +1,4 @@
1
- import { PropsWithChildren } from 'react';
1
+ import { ComponentType, PropsWithChildren } from 'react';
2
2
  import { IContentTypeResponseBase } from '../../Factories';
3
3
  import { BannerSectionType, BannerType } from '../../Sections/Banner';
4
4
  import { ListProductBannersSectionType } from '../../Sections/ListProductsBanners';
@@ -6,7 +6,7 @@ import { NewsLetterSectionType } from '../../Sections/Newsletter';
6
6
  import { ProductCarouselSectionType } from '../../Sections/ProductCarousel';
7
7
  import { TextContentSectionType } from '../../Sections/TextContent';
8
8
  import { DeviceType } from '../CommonPage';
9
- import { GetContentTypeProps } from '../../../data/api/cms';
9
+ import { GetContentTypeParams } from '../../../data/api/cms';
10
10
  import { COMMON_PAGE_COLUMN_GAP_PDCType } from '../../../constants';
11
11
 
12
12
  export interface Config {
@@ -24,11 +24,12 @@ export interface PLPContentType extends IContentTypeResponseBase {
24
24
  config: Config;
25
25
  sections: SectionType[];
26
26
  }
27
- export interface PLPContentProps extends PropsWithChildren, Omit<GetContentTypeProps, 'contentType'> {
27
+ export interface PLPContentProps extends PropsWithChildren, GetContentTypeParams {
28
+ className?: string | string[];
28
29
  slug: string;
29
- SectionZone: React.ComponentType<any>;
30
+ SectionZone: ComponentType<any>;
30
31
  COMMON_PAGE_COLUMN_GAP_PDC: COMMON_PAGE_COLUMN_GAP_PDCType;
31
- PLPContentProvider: React.ComponentType<PLPContentProviderProps>;
32
+ PLPContentProvider: ComponentType<PLPContentProviderProps>;
32
33
  }
33
34
  export type PLPContentBanners = ({
34
35
  columns: number;
@@ -41,6 +42,6 @@ export interface PLPContentContextProps {
41
42
  export interface PLPContentProviderProps extends PropsWithChildren {
42
43
  data?: PLPContentType;
43
44
  device: DeviceType;
44
- SectionZone: React.ComponentType<any>;
45
+ SectionZone: ComponentType<any>;
45
46
  COMMON_PAGE_COLUMN_GAP_PDC: COMMON_PAGE_COLUMN_GAP_PDCType;
46
47
  }
@@ -1,4 +1,4 @@
1
- import { GetContentTypeProps } from '../../../data/api/cms';
1
+ import { GetContentTypeParams } from '../../../data/api/cms';
2
2
  import { IContentTypeResponseBase } from '../../Factories';
3
3
 
4
4
  export interface IRedirects extends IContentTypeResponseBase {
@@ -20,6 +20,6 @@ export interface IRedirects extends IContentTypeResponseBase {
20
20
  };
21
21
  };
22
22
  }
23
- export interface Redirects extends Omit<GetContentTypeProps, 'contentType'> {
23
+ export interface Redirects extends GetContentTypeParams {
24
24
  slug: string;
25
25
  }
@@ -1,5 +1,5 @@
1
- import { PropsWithChildren } from 'react';
2
- import { GetContentTypeProps } from '../../../data/api/cms';
1
+ import { ComponentType, PropsWithChildren } from 'react';
2
+ import { GetContentTypeParams } from '../../../data/api/cms';
3
3
  import { IContentTypeResponseBase } from '../../Factories';
4
4
  import { BannerSectionType } from '../../Sections/Banner';
5
5
  import { NewsLetterSectionType } from '../../Sections/Newsletter';
@@ -19,13 +19,13 @@ export interface SearchContentType extends IContentTypeResponseBase {
19
19
  }
20
20
  export interface SearchPageScrenningProps extends PropsWithChildren {
21
21
  data: SearchContentType[];
22
- SectionZone: React.ComponentType<any>;
22
+ SectionZone: ComponentType<any>;
23
23
  className?: string;
24
24
  }
25
- export interface SearchContentProps extends Omit<GetContentTypeProps, 'contentType'> {
26
- SectionZone: React.ComponentType<any>;
25
+ export interface SearchContentProps extends GetContentTypeParams {
26
+ SectionZone: ComponentType<any>;
27
27
  }
28
- export interface SearchPageContentProps extends PropsWithChildren, Omit<GetContentTypeProps, 'contentType'> {
29
- SectionZone: React.ComponentType<any>;
28
+ export interface SearchPageContentProps extends PropsWithChildren, GetContentTypeParams {
29
+ SectionZone: ComponentType<any>;
30
30
  className?: string;
31
31
  }
@@ -1,5 +1,6 @@
1
+ import { ComponentType } from 'react';
1
2
  import { IContentTypeResponseBase } from '../../Factories';
2
- import { GetContentTypeProps } from '../../../data/api/cms';
3
+ import { GetContentTypeParams } from '../../../data/api/cms';
3
4
  import { TipBarProps } from '../../../layout/team-components/TipBar';
4
5
 
5
6
  export type DeviceType = 'mobile' | 'desktop';
@@ -44,8 +45,8 @@ export interface ITipbarContent extends IContentTypeResponseBase {
44
45
  };
45
46
  };
46
47
  }
47
- export interface TipbarContentProps extends Omit<GetContentTypeProps, 'contentType'> {
48
- ClientTipbarContent: React.ComponentType<any>;
48
+ export interface TipbarContentProps extends GetContentTypeParams {
49
+ ClientTipbarContent: ComponentType<any>;
49
50
  }
50
51
  export interface TipbarScreeningProps {
51
52
  data: ITipbarContent[];
@@ -2,7 +2,7 @@ import { VariantsType } from '@soma-vertical-web/core-components/src/lib/Header/
2
2
  import { TMode } from '@soma-vertical-web/foundations';
3
3
  import { ISectionResponseBase } from '../../Factories';
4
4
  import { TextContentSectionType } from '../TextContent';
5
- import { ICONSType } from '../../../constants';
5
+ import { BannerConstants } from '../SectionZone';
6
6
 
7
7
  export type Position = 'superior-esquerda' | 'superior-centro' | 'superior-direita' | 'centro' | 'centro-esquerda' | 'centro-direita' | 'inferior-esquerda' | 'inferior-centro' | 'inferior-direita';
8
8
  export type ContentAlignment = 'centro' | 'esquerda' | 'direita';
@@ -31,14 +31,13 @@ export type BannerType = TextContentSectionType['data'] & {
31
31
  index?: number;
32
32
  headerVariant: VariantsType;
33
33
  };
34
- export interface BannerContentProps {
34
+ export interface BannerContentProps extends BannerConstants {
35
35
  data: BannerSectionType['data'];
36
36
  videoUrl: string | undefined;
37
37
  priority?: boolean;
38
38
  videoRef?: React.RefObject<HTMLVideoElement | null>;
39
- ICONS: ICONSType;
40
39
  }
41
- export interface IBannerSectionTypeComponent {
40
+ export interface IBannerSectionTypeComponent extends BannerConstants {
42
41
  data: {
43
42
  banner: BannerType;
44
43
  index?: number;
@@ -46,7 +45,6 @@ export interface IBannerSectionTypeComponent {
46
45
  };
47
46
  creative: string;
48
47
  priority?: boolean;
49
- ICONS: ICONSType;
50
48
  }
51
49
  export interface BannerSectionType extends ISectionResponseBase, IBannerSectionTypeComponent {
52
50
  }
@@ -1,6 +1,7 @@
1
1
  import { ICONSType } from '../../../constants';
2
2
  import { BannerType } from '../Banner';
3
3
  import { ISectionResponseBase } from '../../Factories';
4
+ import { BannerCarouselConstants } from '../SectionZone';
4
5
 
5
6
  export type TControllerPosition = 'superior-direita' | 'inferior-direita' | 'dentro-inferior-centro' | 'dentro-inferior-esquerda';
6
7
  export interface BannerCarouselSectionType extends ISectionResponseBase {
@@ -20,9 +21,7 @@ export interface BannerCarouselSectionType extends ISectionResponseBase {
20
21
  first?: boolean;
21
22
  };
22
23
  }
23
- export interface BannerCarouselProps extends BannerCarouselSectionType {
24
- ICONS: ICONSType;
25
- }
24
+ export type BannerCarouselProps = BannerCarouselSectionType & BannerCarouselConstants;
26
25
  export interface BannerCarouselControllersType {
27
26
  prevOnClick: () => void;
28
27
  nextOnClick: () => void;
@@ -1,6 +1,6 @@
1
1
  import { TSizesReduced } from '@soma-vertical-web/foundations';
2
2
  import { ISectionResponseBase } from '../../Factories';
3
- import { BENNEFITS_BAR_TITLEType, ICONSType } from '../../../constants';
3
+ import { BennefitsBarConstants } from '../SectionZone';
4
4
 
5
5
  export interface BennefitsBarSectionType extends ISectionResponseBase {
6
6
  data: {
@@ -19,9 +19,5 @@ export interface BennefitsBarSectionType extends ISectionResponseBase {
19
19
  }[];
20
20
  };
21
21
  }
22
- export interface BennefitsBarProps extends BennefitsBarSectionType {
23
- CONSTANTS: {
24
- BENNEFITS_BAR_TITLE: BENNEFITS_BAR_TITLEType;
25
- ICONS: ICONSType;
26
- };
22
+ export interface BennefitsBarProps extends BennefitsBarSectionType, BennefitsBarConstants {
27
23
  }
@@ -1,7 +1,7 @@
1
- import { ICONSType, MASTER_DATA_ENTITY, NEWSLETTER_CONFIGS } from '../../../constants';
2
1
  import { ISectionResponseBase } from '../../Factories';
2
+ import { NewsletterConstants } from '../SectionZone';
3
3
 
4
- export interface NewsLetterSectionType extends ISectionResponseBase {
4
+ export interface NewsLetterSectionType extends ISectionResponseBase, NewsletterConstants {
5
5
  data: {
6
6
  title: string;
7
7
  description: string;
@@ -23,9 +23,4 @@ export interface NewsLetterSectionType extends ISectionResponseBase {
23
23
  }[];
24
24
  componentIndex?: number;
25
25
  };
26
- CONSTANTS: {
27
- MASTER_DATA_ENTITY: MASTER_DATA_ENTITY;
28
- NEWSLETTER_CONFIGS: NEWSLETTER_CONFIGS;
29
- ICONS: ICONSType;
30
- };
31
26
  }
@@ -1,8 +1,8 @@
1
1
  import { PDPShelfType } from '../../../../constants';
2
- import { BUY_BUTTON_LABELSType, BUY_PACKAGEType, FREIGHT_CALCULATIONType, ICONSType, MAIN_IMAGEType, PLP_GRID_SCROLL_BACKType, PLP_INFINITE_SCROLLType, PLP_PRODUCT_SIMILAR_DELAYType, PLP_SHOW_VIDEO_ON_PRODUCT_CARDType, PLP_SORT_DEFAULTType, PRODUCT_CARD_IMAGE_ASPECT_RATIOType, PRODUCT_CARD_TEXTSType, PRODUCT_CARD_TOP_WISHLIST_TOGGLEType, PRODUCT_IMAGE_DIMENSIONSType, SECOND_IMAGEType, StoreConfigType, TEXTURE_IMAGEType, Z_INDEX_WARType } from '../../../constants';
3
2
  import { BuyPackageProductCardProps, CarouselController, CarouselPagination } from '../../../layout/team-components/BuyPackage';
4
3
  import { ProductNode } from '../../../layout/team-components/ProductCard';
5
4
  import { ISectionResponseBase } from '../../Factories';
5
+ import { ProductCarouselConstants } from '../SectionZone';
6
6
 
7
7
  export type StructureType = 'shelf_recommendation' | 'buy_package';
8
8
  export type TPDPShelfType = (typeof PDPShelfType)[number];
@@ -26,33 +26,11 @@ export interface ICollectionSearch {
26
26
  }[];
27
27
  sort?: string;
28
28
  }
29
- export interface ConstantsType {
30
- CONSTANTS: {
31
- BUY_BUTTON_LABELS: BUY_BUTTON_LABELSType;
32
- BUY_PACKAGE: BUY_PACKAGEType;
33
- FREIGHT_CALCULATION: FREIGHT_CALCULATIONType;
34
- ICONS: ICONSType;
35
- ITEMS_DEFAULT_SORT: PLP_SORT_DEFAULTType;
36
- MAIN_IMAGE: MAIN_IMAGEType;
37
- PLP_GRID_SCROLL_BACK: PLP_GRID_SCROLL_BACKType;
38
- PLP_INFINITE_SCROLL: PLP_INFINITE_SCROLLType;
39
- PLP_PRODUCT_SIMILAR_DELAY: PLP_PRODUCT_SIMILAR_DELAYType;
40
- PLP_SHOW_VIDEO_ON_PRODUCT_CARD: PLP_SHOW_VIDEO_ON_PRODUCT_CARDType;
41
- PRODUCT_CARD_IMAGE_ASPECT_RATIO: PRODUCT_CARD_IMAGE_ASPECT_RATIOType;
42
- PRODUCT_CARD_TEXTS: PRODUCT_CARD_TEXTSType;
43
- PRODUCT_CARD_TOP_WISHLIST_TOGGLE: PRODUCT_CARD_TOP_WISHLIST_TOGGLEType;
44
- PRODUCT_IMAGE_DIMENSIONS: PRODUCT_IMAGE_DIMENSIONSType;
45
- SECOND_IMAGE: SECOND_IMAGEType;
46
- TEXTURE_IMAGE: TEXTURE_IMAGEType;
47
- Z_INDEX_WAR: Z_INDEX_WARType;
48
- StoreConfig_MainSellerId: StoreConfigType['mainSeller']['id'];
49
- };
50
- }
51
- export interface IRecomendationShelf extends ConstantsType {
29
+ export interface IRecomendationShelf extends ProductCarouselConstants {
52
30
  recommendationSearch?: IRecomendationSearch;
53
31
  title?: string;
54
32
  }
55
- export interface ICommonShelf extends ConstantsType {
33
+ export interface ICommonShelf extends ProductCarouselConstants {
56
34
  collectionSearch?: ICollectionSearch;
57
35
  title?: string;
58
36
  }
@@ -72,8 +50,7 @@ export interface ProductCarouselSectionType extends ISectionResponseBase {
72
50
  }[];
73
51
  };
74
52
  }
75
- export interface ProductCarouselProps extends ProductCarouselSectionType {
76
- CONSTANTS: ConstantsType['CONSTANTS'];
53
+ export interface ProductCarouselProps extends ProductCarouselSectionType, ProductCarouselConstants {
77
54
  }
78
55
  export interface PDPProductCarouselSectionType extends ISectionResponseBase {
79
56
  data: {
@@ -88,8 +65,7 @@ export interface PDPProductCarouselSectionType extends ISectionResponseBase {
88
65
  }[];
89
66
  };
90
67
  }
91
- export interface PDPProductCarouselProps extends ISectionResponseBase, PDPProductCarouselSectionType {
92
- CONSTANTS: ConstantsType['CONSTANTS'];
68
+ export interface PDPProductCarouselProps extends PDPProductCarouselSectionType, ProductCarouselConstants {
93
69
  }
94
70
  export interface ProductShelfProps {
95
71
  products: ProductNode[];
@@ -0,0 +1,81 @@
1
+ import { ACTIVE_BENNEFITS_BAR_TITLEType, BENNEFITS_BAR_TITLEType, BUY_BUTTON_LABELSType, BUY_PACKAGEType, FREIGHT_CALCULATIONType, ICONSType, MAIN_IMAGEType, MASTER_DATA_ENTITY, NEWSLETTER_CONFIGS, PLP_GRID_SCROLL_BACKType, PLP_INFINITE_SCROLLType, PLP_PRODUCT_SIMILAR_DELAYType, PLP_SHOW_VIDEO_ON_PRODUCT_CARDType, PLP_SIZE_ORDERType, PLP_SORT_DEFAULTType, PRODUCT_CARD_IMAGE_ASPECT_RATIOType, PRODUCT_CARD_TEXTSType, PRODUCT_CARD_TOP_WISHLIST_TOGGLEType, PRODUCT_IMAGE_DIMENSIONSType, SECOND_IMAGEType, StoreConfigType, TEXTCONTENT_EXPANDEDType, TEXTURE_IMAGEType, TIME_ZONEType, Z_INDEX_WARType } from '../../../constants';
2
+ import { ISectionResponseBase } from '../../Factories';
3
+
4
+ export type BannerConstants = {
5
+ ICONS: ICONSType;
6
+ TEXTCONTENT_EXPANDED?: TEXTCONTENT_EXPANDEDType;
7
+ TIME_ZONE: TIME_ZONEType;
8
+ };
9
+ export type ProductCarouselConstants = {
10
+ CONSTANTS: {
11
+ BUY_BUTTON_LABELS: BUY_BUTTON_LABELSType;
12
+ BUY_PACKAGE: BUY_PACKAGEType;
13
+ FREIGHT_CALCULATION: FREIGHT_CALCULATIONType;
14
+ ICONS: ICONSType;
15
+ ITEMS_DEFAULT_SORT: PLP_SORT_DEFAULTType;
16
+ MAIN_IMAGE: MAIN_IMAGEType;
17
+ PLP_GRID_SCROLL_BACK: PLP_GRID_SCROLL_BACKType;
18
+ PLP_INFINITE_SCROLL: PLP_INFINITE_SCROLLType;
19
+ PLP_PRODUCT_SIMILAR_DELAY: PLP_PRODUCT_SIMILAR_DELAYType;
20
+ PLP_SHOW_VIDEO_ON_PRODUCT_CARD: PLP_SHOW_VIDEO_ON_PRODUCT_CARDType;
21
+ PLP_SIZE_ORDER: PLP_SIZE_ORDERType;
22
+ PRODUCT_CARD_IMAGE_ASPECT_RATIO: PRODUCT_CARD_IMAGE_ASPECT_RATIOType;
23
+ PRODUCT_CARD_TEXTS: PRODUCT_CARD_TEXTSType;
24
+ PRODUCT_CARD_TOP_WISHLIST_TOGGLE: PRODUCT_CARD_TOP_WISHLIST_TOGGLEType;
25
+ PRODUCT_IMAGE_DIMENSIONS: PRODUCT_IMAGE_DIMENSIONSType;
26
+ SECOND_IMAGE: SECOND_IMAGEType;
27
+ TEXTURE_IMAGE: TEXTURE_IMAGEType;
28
+ Z_INDEX_WAR: Z_INDEX_WARType;
29
+ StoreConfig_MainSellerId: StoreConfigType['mainSeller']['id'];
30
+ };
31
+ };
32
+ export type PDPProductCarouselConstants = ProductCarouselConstants;
33
+ export type BennefitsBarConstants = {
34
+ CONSTANTS: {
35
+ BENNEFITS_BAR_TITLE: BENNEFITS_BAR_TITLEType;
36
+ ICONS: ICONSType;
37
+ ACTIVE_BENNEFITS_BAR_TITLE: ACTIVE_BENNEFITS_BAR_TITLEType;
38
+ };
39
+ };
40
+ export type NewsletterConstants = {
41
+ CONSTANTS: {
42
+ MASTER_DATA_ENTITY: MASTER_DATA_ENTITY;
43
+ NEWSLETTER_CONFIGS: NEWSLETTER_CONFIGS;
44
+ ICONS: ICONSType;
45
+ };
46
+ };
47
+ export type TextContentConstants = {
48
+ ICONS: ICONSType;
49
+ TEXTCONTENT_EXPANDED?: TEXTCONTENT_EXPANDEDType;
50
+ };
51
+ export type TextAccordionConstants = {
52
+ ICONS: ICONSType;
53
+ TEXTCONTENT_EXPANDED?: TEXTCONTENT_EXPANDEDType;
54
+ };
55
+ export type BannerCarouselConstants = {
56
+ ICONS: ICONSType;
57
+ TEXTCONTENT_EXPANDED?: TEXTCONTENT_EXPANDEDType;
58
+ TIME_ZONE: TIME_ZONEType;
59
+ };
60
+ export type SectionsConfigs = {
61
+ Banner: BannerConstants;
62
+ 'Product Carousel': ProductCarouselConstants;
63
+ 'PDP Product Carousel': PDPProductCarouselConstants;
64
+ 'Bennefits Bar': BennefitsBarConstants;
65
+ newsletter: NewsletterConstants;
66
+ TextContent: TextContentConstants & {
67
+ className?: string;
68
+ };
69
+ TextAccordion: TextAccordionConstants & {
70
+ className?: string;
71
+ };
72
+ 'Banner Carousel': BannerCarouselConstants;
73
+ };
74
+ export type SectionName = keyof SectionsConfigs;
75
+ export interface SectionZoneProps {
76
+ data: Array<ISectionResponseBase & {
77
+ data?: any;
78
+ }>;
79
+ identifyWhoIsFirst?: boolean;
80
+ componentConfigs?: SectionsConfigs;
81
+ }
@@ -1,11 +1,12 @@
1
1
  import { TMode, TSizesSmallExtended } from '@soma-vertical-web/foundations';
2
2
  import { ISectionResponseBase } from '../../Factories';
3
3
  import { HTMLAttributes } from 'react';
4
- import { ICONSType } from '../../../constants';
4
+ import { ICONSType, TEXTCONTENT_EXPANDEDType } from '../../../constants';
5
5
 
6
6
  export type ContentAlignment = 'centro' | 'esquerda' | 'direita';
7
7
  type CommonProps = {
8
8
  ICONS: ICONSType;
9
+ TEXTCONTENT_EXPANDED?: TEXTCONTENT_EXPANDEDType;
9
10
  };
10
11
  export interface ITextContentSectionTypeComponent {
11
12
  data: {
@@ -28,5 +29,7 @@ export interface ContentProps {
28
29
  expanded: boolean;
29
30
  content: ITextContentSectionTypeComponent['data'];
30
31
  }
31
- export type TextContentProps = ITextContentSectionTypeComponent & HTMLAttributes<HTMLDivElement> & CommonProps;
32
+ export type TextContentProps = ITextContentSectionTypeComponent & HTMLAttributes<HTMLDivElement> & CommonProps & {
33
+ TEXTCONTENT_EXPANDED?: TEXTCONTENT_EXPANDEDType;
34
+ };
32
35
  export {};