@soma-vertical-web/multi-lib 0.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 (54) hide show
  1. package/README.md +88 -0
  2. package/index.esm.d.ts +2 -0
  3. package/index.esm.js +3 -0
  4. package/package.json +23 -0
  5. package/src/data/src/Events/EventContex.d.ts +6 -0
  6. package/src/data/src/Events/helpers.d.ts +42 -0
  7. package/src/data/src/Events/interfaces.d.ts +108 -0
  8. package/src/data/src/helpers/product/generalInfo.d.ts +11 -0
  9. package/src/data/src/helpers/product/imageResize.d.ts +8 -0
  10. package/src/data/src/helpers/product/interface.d.ts +179 -0
  11. package/src/data/src/helpers/product/price.d.ts +1 -0
  12. package/src/data/src/helpers/product/skuInfos.d.ts +5 -0
  13. package/src/data/src/helpers/product/thumb.d.ts +2 -0
  14. package/src/data/src/helpers/utils/cookies.d.ts +2 -0
  15. package/src/data/src/helpers/utils/debounce.d.ts +1 -0
  16. package/src/data/src/helpers/utils/generateSlug.d.ts +1 -0
  17. package/src/data/src/helpers/utils/throttle.d.ts +1 -0
  18. package/src/data/src/helpers/utils/timer.d.ts +2 -0
  19. package/src/index.d.ts +2 -0
  20. package/src/types/src/cms/ContentTypes/CommonPage/index.d.ts +17 -0
  21. package/src/types/src/cms/ContentTypes/FlagsAndTags/index.d.ts +36 -0
  22. package/src/types/src/cms/ContentTypes/Footer/index.d.ts +44 -0
  23. package/src/types/src/cms/ContentTypes/Header/index.d.ts +52 -0
  24. package/src/types/src/cms/ContentTypes/HelpButton/index.d.ts +29 -0
  25. package/src/types/src/cms/ContentTypes/LPLojas/index.d.ts +11 -0
  26. package/src/types/src/cms/ContentTypes/LookbookPage/index.d.ts +38 -0
  27. package/src/types/src/cms/ContentTypes/NotFoundPage/index.d.ts +14 -0
  28. package/src/types/src/cms/ContentTypes/PDP/index.d.ts +0 -0
  29. package/src/types/src/cms/ContentTypes/PLP/index.d.ts +0 -0
  30. package/src/types/src/cms/ContentTypes/PolicyPage/index.d.ts +37 -0
  31. package/src/types/src/cms/ContentTypes/PreHome/index.d.ts +20 -0
  32. package/src/types/src/cms/ContentTypes/Redirects/index.d.ts +20 -0
  33. package/src/types/src/cms/ContentTypes/Search/index.d.ts +0 -0
  34. package/src/types/src/cms/ContentTypes/Tipbar/index.d.ts +43 -0
  35. package/src/types/src/cms/ContentTypes/Wishlist/index.d.ts +0 -0
  36. package/src/types/src/cms/Factories/index.d.ts +69 -0
  37. package/src/types/src/cms/Sections/Banner/index.d.ts +48 -0
  38. package/src/types/src/cms/Sections/BannerCarousel/index.d.ts +20 -0
  39. package/src/types/src/cms/Sections/BennefitsBar/index.d.ts +19 -0
  40. package/src/types/src/cms/Sections/HeaderSubmenu/index.d.ts +34 -0
  41. package/src/types/src/cms/Sections/ImageGrid/index.d.ts +9 -0
  42. package/src/types/src/cms/Sections/ListProductsBanners/index.d.ts +12 -0
  43. package/src/types/src/cms/Sections/Newsletter/index.d.ts +19 -0
  44. package/src/types/src/cms/Sections/ProductCarousel/index.d.ts +0 -0
  45. package/src/types/src/cms/Sections/TextAccordion/index.d.ts +7 -0
  46. package/src/types/src/cms/Sections/TextContent/index.d.ts +24 -0
  47. package/src/types/src/cms/Sections/_common/index.d.ts +8 -0
  48. package/src/types/src/constants.d.ts +2 -0
  49. package/src/types/src/contexts/hooks/index.d.ts +6 -0
  50. package/src/types/src/contexts/store/pdp.d.ts +127 -0
  51. package/src/types/src/contexts/store/selectedSKU.d.ts +10 -0
  52. package/src/types/src/data/events/index.d.ts +111 -0
  53. package/src/types/src/global/product/index.d.ts +295 -0
  54. package/src/types/src/product/index.d.ts +295 -0
package/README.md ADDED
@@ -0,0 +1,88 @@
1
+ # VerticalWeb
2
+
3
+ <a alt="Nx logo" href="https://nx.dev" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo.png" width="45"></a>
4
+
5
+ ✨ **This workspace has been generated by [Nx, a Smart, fast and extensible build system.](https://nx.dev)** ✨
6
+
7
+ ## Start the app
8
+
9
+ To start the development server run `nx serve base-components`. Open your browser and navigate to http://localhost:4200/. Happy coding!
10
+
11
+ ## Generate code
12
+
13
+ If you happen to use Nx plugins, you can leverage code generators that might come with it.
14
+
15
+ Run `nx list` to get a list of available plugins and whether they have generators. Then run `nx list <plugin-name>` to see what generators are available.
16
+
17
+ Learn more about [Nx generators on the docs](https://nx.dev/plugin-features/use-code-generators).
18
+
19
+ ## Running tasks
20
+
21
+ To execute tasks with Nx use the following syntax:
22
+
23
+ ```
24
+ nx <target> <project> <...options>
25
+ ```
26
+
27
+ You can also run multiple targets:
28
+
29
+ ```
30
+ nx run-many -t <target1> <target2>
31
+ ```
32
+
33
+ ..or add `-p` to filter specific projects
34
+
35
+ ```
36
+ nx run-many -t <target1> <target2> -p <proj1> <proj2>
37
+ ```
38
+
39
+ Targets can be defined in the `package.json` or `projects.json`. Learn more [in the docs](https://nx.dev/core-features/run-tasks).
40
+
41
+ ## Want better Editor Integration?
42
+
43
+ Have a look at the [Nx Console extensions](https://nx.dev/nx-console). It provides autocomplete support, a UI for exploring and running tasks & generators, and more! Available for VSCode, IntelliJ and comes with a LSP for Vim users.
44
+
45
+ ## Ready to deploy?
46
+
47
+ Just run `nx build demoapp` to build the application. The build artifacts will be stored in the `dist/` directory, ready to be deployed.
48
+
49
+ ## Set up CI!
50
+
51
+ Nx comes with local caching already built-in (check your `nx.json`). On CI you might want to go a step further.
52
+
53
+ - [Set up remote caching](https://nx.dev/core-features/share-your-cache)
54
+ - [Set up task distribution across multiple machines](https://nx.dev/nx-cloud/features/distribute-task-execution)
55
+ - [Learn more how to setup CI](https://nx.dev/recipes/ci)
56
+
57
+ ## Connect with us!
58
+
59
+ - [Join the community](https://nx.dev/community)
60
+ - [Subscribe to the Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
61
+ - [Follow us on Twitter](https://twitter.com/nxdevtools)
62
+
63
+ # Storybook
64
+
65
+ For now, each storybook component cathegory (eg. base-components, components) has its own publish command.
66
+
67
+ - Base components:
68
+
69
+ Before publishing, build the storybook, by now you will get an `ERROR` due to path error, dont worry, this doenst affect the build realy
70
+
71
+ ```typescript
72
+ yarn build-storybook
73
+
74
+ ```
75
+
76
+ publish the base components:
77
+
78
+ ```typescript
79
+ yarn publish-base-components-storybook
80
+
81
+ ```
82
+
83
+ your storybook will be available on
84
+ https://<branch>--65bd01ee0c53b94edbfcc1df.chromatic.com
85
+
86
+ eg: https://feat-fast-1358--65bd01ee0c53b94edbfcc1df.chromatic.com
87
+
88
+ Note: doenst matter if you named your banch with '/' chromatic automaticaly rename the pulish brach with '-'
package/index.esm.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from "./src/index";
2
+ export { default } from "./src/index";
package/index.esm.js ADDED
@@ -0,0 +1,3 @@
1
+ var index = {};
2
+
3
+ export { index as default };
package/package.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "@soma-vertical-web/multi-lib",
3
+ "version": "0.0.1",
4
+ "main": "./index.esm.js",
5
+ "module": "./index.esm.js",
6
+ "types": "./index.esm.d.ts",
7
+ "type": "module",
8
+ "jest": {
9
+ "transform": {
10
+ "^.+\\.(ts|tsx|js|jsx)$": "ts-jest"
11
+ }
12
+ },
13
+ "private": false,
14
+ "exports": {
15
+ ".": {
16
+ "import": "./index.esm.js",
17
+ "require": "./index.esm.js"
18
+ }
19
+ },
20
+ "publishConfig": {
21
+ "access": "public"
22
+ }
23
+ }
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import type { EventContextProps, EventProviderProps } from './interfaces';
3
+ declare const EventContext: import("react").Context<EventContextProps>;
4
+ declare const EventProvider: ({ children, evtFunctionsConfigs }: EventProviderProps) => import("react/jsx-runtime").JSX.Element;
5
+ declare const useEventContext: () => EventContextProps;
6
+ export { EventContext, EventProvider, useEventContext };
@@ -0,0 +1,42 @@
1
+ import type { EventsDataProps, PersistedDataType, ProductsPersisteDataType } from './interfaces';
2
+ export declare const pushDatalayer: ({ event, data, }: {
3
+ event?: string | undefined;
4
+ data?: any;
5
+ }) => void;
6
+ export declare const eventsFunctions: {
7
+ productEvents: (props: EventsDataProps, callBack?: ((itemData: any, customEcommerceData: any) => void) | undefined) => void;
8
+ productListEvent: (props: EventsDataProps) => void;
9
+ skuEvents: (props: EventsDataProps) => void;
10
+ filterEvent: (props: EventsDataProps) => void;
11
+ viewCartEvent: (props: EventsDataProps) => void;
12
+ readyEvents: (props: EventsDataProps) => void;
13
+ configs: {
14
+ PLP_FILTERS: {
15
+ key: string;
16
+ label: string;
17
+ eventLabel: string;
18
+ order: number;
19
+ }[];
20
+ currency: string;
21
+ categoryOff: string;
22
+ storeUrl: string;
23
+ };
24
+ };
25
+ /**
26
+ * TODO: utilizar tipagem SizeInfoType
27
+ */
28
+ export declare const getAvailablesSizes: (sizes: any[]) => any;
29
+ export declare const getCategories: (breadcrumbList: string[]) => {
30
+ item_category3?: string | undefined;
31
+ item_category2?: string | undefined;
32
+ item_category?: string | undefined;
33
+ };
34
+ export declare const getProductListInfoFromHead: () => string[];
35
+ export declare const getPersistedData: () => any;
36
+ export declare const findDataInPersistedData: (persistedData: ProductsPersisteDataType, sku: string) => PersistedDataType;
37
+ export declare const updatePersistedData: ({ persistedData, type, sku, newData, }: {
38
+ persistedData: ProductsPersisteDataType;
39
+ type: 'add' | 'remove';
40
+ sku: string;
41
+ newData?: PersistedDataType | undefined;
42
+ }) => void;
@@ -0,0 +1,108 @@
1
+ import { MutableRefObject, PropsWithChildren } from 'react';
2
+ import { eventsFunctions } from './helpers';
3
+ export interface ItemListType {
4
+ item_list_name?: string | null;
5
+ item_list_id?: string | null;
6
+ }
7
+ export interface CommonDataType {
8
+ productData: any;
9
+ sizes: any[];
10
+ priceInfo: any;
11
+ breadcrumbList: any[];
12
+ items: any[];
13
+ }
14
+ export interface ProductEventsType {
15
+ type: EventType;
16
+ commonData: CommonDataType;
17
+ customData: any;
18
+ }
19
+ export interface PromotionType {
20
+ creative_name?: string;
21
+ creative_slot?: string;
22
+ promotion_id?: string;
23
+ promotion_name?: string;
24
+ }
25
+ export type EventsDataProps = {
26
+ event?: string;
27
+ commonData?: any;
28
+ customData?: any;
29
+ supportData?: any;
30
+ promotionInfo?: PromotionType;
31
+ readyData?: any;
32
+ itemList?: ItemListType;
33
+ outsideEcommerceData?: any;
34
+ };
35
+ export interface ProductCommonDataType {
36
+ productData: any;
37
+ priceInfo?: any;
38
+ sizes?: any[];
39
+ breadcrumbList?: any[];
40
+ availableSizes?: string[];
41
+ }
42
+ export type EventType = 'select_item' | 'view_item' | 'view_item_list';
43
+ export type FunctionsKeyType = keyof typeof eventsFunctions;
44
+ export type SendDatalayerEventType = {
45
+ functionKey: FunctionsKeyType;
46
+ data: EventsDataProps;
47
+ callBack?: () => void;
48
+ timeout?: number;
49
+ };
50
+ /**
51
+ * TODO: viewBannerEvent prop banner should be a type of BannerType
52
+ */
53
+ export interface EventContextProps {
54
+ sendDataLayerEvent: (data: SendDatalayerEventType) => void;
55
+ triggerSelectItemEventRef: MutableRefObject<{
56
+ trigger: boolean;
57
+ index: number;
58
+ }>;
59
+ promotionEventRef: MutableRefObject<PromotionType>;
60
+ currentLocalRef: MutableRefObject<string | null>;
61
+ itemListRef: MutableRefObject<ItemListType | null>;
62
+ cartProductsFullDataRef: MutableRefObject<MinicartFullData>;
63
+ handleSelectContent: (data: HandleSelectContentType) => void;
64
+ handleSelectPromotionEvent: (data: HandleSelectPromotionEventType) => void;
65
+ }
66
+ declare const Pages: readonly ["home", "product", "catalog", "institutional", "landing_page"];
67
+ export interface CollectorProps {
68
+ page: (typeof Pages)[number] | string;
69
+ data?: unknown;
70
+ }
71
+ export interface StockType {
72
+ [key: string]: number;
73
+ }
74
+ export interface PersistedDataType {
75
+ promotionInfo?: PromotionType | null;
76
+ itemList?: ItemListType | null;
77
+ }
78
+ export interface ProductsPersisteDataType {
79
+ [key: string]: PersistedDataType;
80
+ }
81
+ export interface EventProviderProps extends PropsWithChildren {
82
+ evtFunctionsConfigs: {
83
+ PLP_FILTERS: {
84
+ key: string;
85
+ label: string;
86
+ eventLabel: string;
87
+ order: number;
88
+ }[];
89
+ currency: string;
90
+ categoryOff: string;
91
+ storeUrl: string;
92
+ };
93
+ }
94
+ export interface MinicartFullData {
95
+ /**
96
+ * TODO: add CartItemStore type
97
+ */
98
+ [key: string]: any;
99
+ }
100
+ export type HandleSelectContentType = {
101
+ content: string;
102
+ };
103
+ export type HandleSelectPromotionEventType = {
104
+ updatePromotionRef: boolean;
105
+ promotion: PromotionType;
106
+ index?: number;
107
+ };
108
+ export {};
@@ -0,0 +1,11 @@
1
+ export declare const splitNameAndSizeFromFullName: (fullName: string) => {
2
+ name: string;
3
+ size: string;
4
+ };
5
+ export declare const getColorAndSizeFromSkuName: (skuName?: string) => {
6
+ color?: undefined;
7
+ size?: undefined;
8
+ } | {
9
+ color: string;
10
+ size: string;
11
+ };
@@ -0,0 +1,8 @@
1
+ export declare const resizingImg: (url: string, imageResize: {
2
+ width: number;
3
+ height: number;
4
+ }) => string;
5
+ export declare const updatedResizedImg: (url: string, imageResize: {
6
+ width: number;
7
+ height: number;
8
+ }) => string;
@@ -0,0 +1,179 @@
1
+ export type SizeInfoType = {
2
+ name: string;
3
+ sku: string;
4
+ value: string;
5
+ available: boolean;
6
+ sellerId: string;
7
+ sellerName: string;
8
+ isSellerDefault?: boolean;
9
+ };
10
+ export type InstallmentType = {
11
+ Value: number;
12
+ InterestRate: number;
13
+ TotalValuePlusInterestRate: number;
14
+ NumberOfInstallments: number;
15
+ PaymentSystemName: string;
16
+ PaymentSystemGroupName: string;
17
+ Name: string;
18
+ };
19
+ export type DeliverySlaSampleType = {
20
+ DeliverySlaPerTypes: any[];
21
+ Region: any;
22
+ };
23
+ export type PaymentOptionInstallmentType = {
24
+ count: number;
25
+ hasInterestRate: boolean;
26
+ interestRate: number;
27
+ value: number;
28
+ total: number;
29
+ sellerMerchantInstallments: {
30
+ id: string;
31
+ count: number;
32
+ hasInterestRate: boolean;
33
+ interestRate: number;
34
+ value: number;
35
+ total: number;
36
+ }[];
37
+ };
38
+ export type PaymentOptionType = {
39
+ paymentSystem: string;
40
+ bin: any;
41
+ paymentName: string;
42
+ paymentGroupName: string;
43
+ value: number;
44
+ installments: PaymentOptionInstallmentType[];
45
+ };
46
+ export type PaymentSystemType = {
47
+ id: number;
48
+ name: string;
49
+ groupName: string;
50
+ validator: any;
51
+ stringId: string;
52
+ template: string;
53
+ requiresDocument: boolean;
54
+ isCustom: boolean;
55
+ description: any;
56
+ requiresAuthentication: boolean;
57
+ dueDate: string;
58
+ availablePayments: any;
59
+ };
60
+ export type PaymentOptionsType = {
61
+ installmentOptions: PaymentOptionType[];
62
+ paymentSystems: PaymentSystemType[];
63
+ payments: any[];
64
+ giftCards: any[];
65
+ giftCardMessages: any[];
66
+ availableAccounts: any[];
67
+ availableTokens: any[];
68
+ };
69
+ export type CommertialOfferType = {
70
+ DeliverySlaSamplesPerRegion: {
71
+ [key: string]: DeliverySlaSampleType;
72
+ };
73
+ Installments: InstallmentType[];
74
+ DiscountHighLight: any[];
75
+ GiftSkuIds: any[];
76
+ Teasers: any[];
77
+ PromotionTeasers: any[];
78
+ BuyTogether: any[];
79
+ ItemMetadataAttachment: any[];
80
+ Price: number;
81
+ ListPrice: number;
82
+ PriceWithoutDiscount: number;
83
+ FullSellingPrice: number;
84
+ RewardValue: number;
85
+ PriceValidUntil: string;
86
+ AvailableQuantity: number;
87
+ IsAvailable: boolean;
88
+ Tax: number;
89
+ DeliverySlaSamples: DeliverySlaSampleType[];
90
+ GetInfoErrorMessage: any;
91
+ CacheVersionUsedToCallCheckout: string;
92
+ PaymentOptions: PaymentOptionsType;
93
+ };
94
+ export type SellerType = {
95
+ sellerId: string;
96
+ sellerName: string;
97
+ addToCartLink: string;
98
+ sellerDefault: boolean;
99
+ commertialOffer: CommertialOfferType;
100
+ };
101
+ export type ImageType = {
102
+ imageId: string;
103
+ imageLabel: string;
104
+ imageTag: string;
105
+ imageUrl: string;
106
+ imageText: string;
107
+ imageLastModified: string;
108
+ };
109
+ export type ReferenceIdType = {
110
+ Key: string;
111
+ Value: string;
112
+ };
113
+ export type ItemType = {
114
+ itemId: string;
115
+ name: string;
116
+ nameComplete: string;
117
+ complementName: string;
118
+ ean: string;
119
+ referenceId: ReferenceIdType[];
120
+ measurementUnit: string;
121
+ unitMultiplier: number;
122
+ modalType: string | null;
123
+ isKit: boolean;
124
+ images: ImageType[];
125
+ Tamanho: string[];
126
+ variations: string[];
127
+ Videos: any[];
128
+ estimatedDateArrival: string | null;
129
+ sellers: SellerType[];
130
+ };
131
+ export type ProductType = {
132
+ productId: string;
133
+ productName: string;
134
+ brand: string;
135
+ brandId: number;
136
+ brandImageUrl: string | null;
137
+ linkText: string;
138
+ productReference: string;
139
+ productReferenceCode: string;
140
+ categoryId: string;
141
+ productTitle: string;
142
+ metaTagDescription: string;
143
+ releaseDate: string;
144
+ clusterHighlights: Record<string, string>;
145
+ productClusters: Record<string, string>;
146
+ searchableClusters: Record<string, string>;
147
+ categories: string[];
148
+ categoriesIds: string[];
149
+ link: string;
150
+ Informação: string[];
151
+ 'Tipo de Cor': string[];
152
+ Composição: string[];
153
+ 'Tipo de Produto': string[];
154
+ SALE: string[];
155
+ Coleção: string[];
156
+ 'Coleção Atual': string[];
157
+ 'ID Coleção': string[];
158
+ 'Tabela de Medidas': string[];
159
+ 'Cores Filtráveis': string[];
160
+ Especificação: string[];
161
+ allSpecifications: string[];
162
+ allSpecificationsGroups: string[];
163
+ description: string;
164
+ items: ItemType[];
165
+ skuSpecifications: {
166
+ field: {
167
+ id: number;
168
+ name: string;
169
+ isActive: boolean;
170
+ position: number;
171
+ type: string;
172
+ };
173
+ values: {
174
+ id: string;
175
+ name: string;
176
+ position: number;
177
+ }[];
178
+ }[];
179
+ };
@@ -0,0 +1 @@
1
+ export declare const formatPriceToCurrency: (value: number, hasDecimal?: boolean) => string;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * TODO: add PricesInfos and Sizes types
3
+ */
4
+ import type { ItemType } from './interface';
5
+ export declare const getSkuInfos: (items: ItemType[]) => any;
@@ -0,0 +1,2 @@
1
+ import { ImageType } from './interface';
2
+ export declare const getThumbImage: (images: ImageType[]) => ImageType | undefined;
@@ -0,0 +1,2 @@
1
+ export declare function getCookie(name: string): string | undefined;
2
+ export declare function setCookie(name: string, value?: string, options?: {}): void;
@@ -0,0 +1 @@
1
+ export declare function debounce(cb: Function, delay?: number): (...args: any[]) => void;
@@ -0,0 +1 @@
1
+ export declare const removeAccentsAndReplaceSpaces: (str: string) => string;
@@ -0,0 +1 @@
1
+ export declare function throttle(cb: Function, delay?: number): (...args: any[]) => void;
@@ -0,0 +1,2 @@
1
+ export declare const getMilliSeconds: (dateInit: Date, dateEnd: Date) => number;
2
+ export declare const getDaysHoursMinutesSeconds: (milliseconds: number, type?: string) => number;
package/src/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
@@ -0,0 +1,17 @@
1
+ import type { IContentTypeResponseBase } from '../../Factories';
2
+ export type DeviceType = 'mobile' | 'desktop';
3
+ export interface Config {
4
+ seo: {
5
+ slug: string;
6
+ title: string;
7
+ description: string;
8
+ };
9
+ responsive: {
10
+ deviceType: DeviceType;
11
+ gapCustom: boolean;
12
+ gapSections: string;
13
+ };
14
+ }
15
+ export interface ICommonPage extends IContentTypeResponseBase {
16
+ config: Config;
17
+ }
@@ -0,0 +1,36 @@
1
+ import type { IContentTypeResponseBase } from '../../Factories';
2
+ interface CommonFlagType {
3
+ value: string;
4
+ textColor: string;
5
+ tagColor: string;
6
+ enableIcon: boolean;
7
+ icon: string;
8
+ iconColor: string;
9
+ }
10
+ interface FlagTagWithCluster extends CommonFlagType {
11
+ key: string;
12
+ }
13
+ export interface TagCommercialConsumer {
14
+ value?: string;
15
+ icon?: string;
16
+ enableIcon?: boolean;
17
+ iconColor?: string;
18
+ textColor?: string;
19
+ tagColor?: string;
20
+ }
21
+ export interface IFlagsAndTagsContent extends IContentTypeResponseBase {
22
+ config: {
23
+ commercial: {
24
+ items: FlagTagWithCluster[];
25
+ };
26
+ institucional: {
27
+ items: FlagTagWithCluster[];
28
+ };
29
+ flagCart: {
30
+ flagHeader: CommonFlagType;
31
+ flagTotal: string;
32
+ };
33
+ flagPdp: CommonFlagType;
34
+ };
35
+ }
36
+ export {};
@@ -0,0 +1,44 @@
1
+ import { PAYMENT_FLAGS } from '../../../constants';
2
+ import type { IContentTypeResponseBase } from '../../Factories';
3
+ export type DeviceType = 'mobile' | 'desktop';
4
+ type PaymentFlags = (typeof PAYMENT_FLAGS)[number];
5
+ export interface FooterLink {
6
+ link: string;
7
+ text: string;
8
+ isExternal?: boolean;
9
+ }
10
+ export interface MediaIcon {
11
+ icon: string;
12
+ link: string;
13
+ }
14
+ export interface FooterColumn {
15
+ column: Array<{
16
+ name: string;
17
+ nameIcon: string;
18
+ items: Array<FooterLink>;
19
+ }>;
20
+ }
21
+ export interface PaymentInfo {
22
+ title?: string;
23
+ titleIcon?: string;
24
+ text?: string;
25
+ flagsTitle?: string;
26
+ acceptedFlags: PaymentFlags[];
27
+ }
28
+ export interface SocialMedia {
29
+ title?: string;
30
+ subTitle?: string;
31
+ medias: Array<MediaIcon>;
32
+ }
33
+ export interface IFooterContent extends IContentTypeResponseBase {
34
+ links: {
35
+ links: FooterColumn;
36
+ };
37
+ paymentInfo: {
38
+ paymentInfo: PaymentInfo;
39
+ };
40
+ socialMedia: {
41
+ socialMedia: SocialMedia;
42
+ };
43
+ }
44
+ export {};
@@ -0,0 +1,52 @@
1
+ import type { IContentTypeResponseBase } from '../../Factories';
2
+ import type { DataSubmenu, IHeaderSubmenu } from '../../Sections/HeaderSubmenu';
3
+ export interface HeaderCategories {
4
+ label: string;
5
+ link: string;
6
+ submenuId?: string;
7
+ iconStart?: string;
8
+ iconEnd?: string;
9
+ mobileBannerSrc?: string;
10
+ mobileBannerAlt?: string;
11
+ creative_name: string;
12
+ creative_slot: string;
13
+ promotion_id: string;
14
+ promotion_name: string;
15
+ textColor?: string;
16
+ }
17
+ export interface HeaderNavLinks {
18
+ iconStart?: string;
19
+ iconEnd?: string;
20
+ label: string;
21
+ link: string;
22
+ }
23
+ export interface HeaderDataVariantProps {
24
+ }
25
+ export interface HeaderDataProps {
26
+ titleIcon?: string;
27
+ title?: string;
28
+ subtitle?: string;
29
+ navigationLinks?: HeaderNavLinks[];
30
+ categories: HeaderCategories[];
31
+ subMenus: DataSubmenu[];
32
+ }
33
+ export interface IHeaderContent extends IContentTypeResponseBase {
34
+ sections: Array<IHeaderSubmenu>;
35
+ categories: {
36
+ categories: {
37
+ items: HeaderCategories[];
38
+ };
39
+ };
40
+ layerConfig: {
41
+ config: {
42
+ titleIcon?: string;
43
+ title?: string;
44
+ subtitle?: string;
45
+ };
46
+ };
47
+ navigationLinks: {
48
+ navigationLinks: {
49
+ items: HeaderNavLinks[];
50
+ };
51
+ };
52
+ }