@soma-vertical-web/multi-lib 0.0.23 → 0.0.25
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/CommonPage/CommonPage.d.ts +3 -0
- package/cms/ContentTypes/CommonPage/DataScreening.d.ts +6 -0
- package/cms/ContentTypes/CommonPage/index.d.ts +2 -0
- package/cms/ContentTypes/FlagsAndTags/index.d.ts +1 -0
- package/cms/ContentTypes/index.d.ts +6 -0
- package/cms/Factories/common.d.ts +7 -0
- package/cms/Factories/contentType.d.ts +9 -0
- package/cms/Factories/index.d.ts +2 -0
- package/cms/Factories/section.d.ts +7 -0
- package/cms/Sections/Banner/Component.d.ts +7 -0
- package/cms/Sections/Banner/Composite/Content.d.ts +4 -0
- package/cms/Sections/Banner/Composite/Slot.d.ts +0 -0
- package/cms/Sections/Banner/adapter.d.ts +32 -0
- package/cms/Sections/Banner/index.d.ts +8 -0
- package/cms/Sections/BennefitsBar/Component.d.ts +3 -0
- package/cms/Sections/BennefitsBar/index.d.ts +8 -0
- package/cms/Sections/TextContent/Component.d.ts +4 -0
- package/cms/Sections/TextContent/Composite/Content.d.ts +6 -0
- package/cms/Sections/TextContent/Composite/ContentWrapper.d.ts +3 -0
- package/cms/Sections/TextContent/adapter.d.ts +3 -0
- package/cms/Sections/TextContent/index.d.ts +5 -0
- package/cms/Sections/_common/Accordion.d.ts +2 -0
- package/cms/Sections/_common/BannerItem.d.ts +5 -0
- package/cms/Sections/_common/TextStructure.d.ts +17 -0
- package/cms/Sections/_common/interfaces.d.ts +8 -0
- package/cms/Sections/index.d.ts +10 -0
- package/cms/helpers/index.d.ts +4 -1
- package/cms/index.d.ts +13 -7
- package/cms/ui/ContentTypes/CommonPage/CommonPage.d.ts +3 -0
- package/cms/ui/ContentTypes/CommonPage/DataScreening.d.ts +6 -0
- package/cms/ui/ContentTypes/CommonPage/index.d.ts +2 -0
- package/cms/ui/ContentTypes/index.d.ts +1 -0
- package/cms/ui/Factories/section.d.ts +7 -0
- package/cms/ui/Sections/Banner/Component.d.ts +7 -0
- package/cms/ui/Sections/Banner/Composite/Content.d.ts +4 -0
- package/cms/ui/Sections/Banner/Composite/Slot.d.ts +0 -0
- package/cms/ui/Sections/Banner/adapter.d.ts +32 -0
- package/cms/ui/Sections/Banner/index.d.ts +8 -0
- package/cms/ui/Sections/TextContent/Component.d.ts +4 -0
- package/cms/ui/Sections/TextContent/Composite/Content.d.ts +3 -0
- package/cms/ui/Sections/TextContent/Composite/ContentWrapper.d.ts +3 -0
- package/cms/ui/Sections/TextContent/adapter.d.ts +3 -0
- package/cms/ui/Sections/TextContent/index.d.ts +8 -0
- package/cms/ui/Sections/_common/Accordion.d.ts +2 -0
- package/cms/ui/Sections/_common/BannerItem.d.ts +5 -0
- package/cms/ui/Sections/_common/TextStructure.d.ts +17 -0
- package/cms/ui/Sections/_common/interfaces.d.ts +8 -0
- package/cms/ui/Sections/index.d.ts +4 -0
- package/data/api/cms/index.d.ts +1 -1
- package/data/helpers/product/generalInfo.d.ts +1 -0
- package/index-BCZReEF1.js +4 -0
- package/index-BI5_UgNN.mjs +3210 -0
- package/index-BaPdEOcD.js +4 -0
- package/index-C7gBx1Sj.js +4 -0
- package/index-CAM8BZOC.mjs +3509 -0
- package/index-CG59Ho-O.mjs +3514 -0
- package/index-CWsS9JhJ.mjs +69 -0
- package/index-CqPFy76Q.mjs +3531 -0
- package/index-DVeRXseR.js +4 -0
- package/index-DXjpbLiy.js +4 -0
- package/index-DmJIk8vB.mjs +3210 -0
- package/index-KIgYoXyH.mjs +3526 -0
- package/index-NWyULgUV.js +4 -0
- package/index-T-_Ys9t7.mjs +3483 -0
- package/index-T1F-4OSy.js +4 -0
- package/index-dgE7GGD0.js +4 -0
- package/index-fnNrOQ41.js +1 -0
- package/index-tKMO8iJa.mjs +3215 -0
- package/index.d.ts +1 -1
- package/index.js +41 -4
- package/index.mjs +8776 -4553
- package/index2.js +1 -1
- package/index2.mjs +97 -34
- package/layout/index.d.ts +11 -10
- package/layout/team-component/Footer/Composite/Devices/Column.Mobile.d.ts +1 -1
- package/layout/team-component/Footer/Composite/Support/index.d.ts +3 -0
- package/layout/team-component/Footer/Composite/Support/item.d.ts +3 -0
- package/layout/team-component/Footer/Footer.d.ts +1 -1
- package/layout/team-component/Footer/index.d.ts +4 -1
- package/layout/team-component/TipBar/Composite/Fields/FieldsScreening.d.ts +1 -1
- package/layout/team-component/TipBar/Composite/Fields/TextContent.d.ts +1 -1
- package/layout/team-component/TipBar/Composite/Root.d.ts +3 -1
- package/layout/team-component/TipBar/index.d.ts +1 -1
- package/layout/utils/DraftJsLinkWrapper/index.d.ts +5 -0
- package/package.json +1 -1
- package/server.d.ts +4 -3
- package/style.css +1 -1
- package/types/cms/ContentTypes/CommonPage/index.d.ts +6 -2
- package/types/cms/ContentTypes/FlagsAndTags/index.d.ts +1 -1
- package/types/cms/ContentTypes/Footer/index.d.ts +31 -1
- package/types/cms/ContentTypes/Header/index.d.ts +1 -1
- package/types/cms/ContentTypes/LookbookPage/index.d.ts +1 -1
- package/types/cms/ContentTypes/Multimarcas/index.d.ts +1 -1
- package/types/cms/ContentTypes/NotFoundPage/index.d.ts +2 -3
- package/types/cms/Sections/Banner/index.d.ts +5 -1
- package/types/cms/Sections/BennefitsBar/index.d.ts +5 -0
- package/types/cms/Sections/TextContent/index.d.ts +9 -2
- package/types/cms/api/index.d.ts +0 -11
- package/types/constants.d.ts +8 -1
- package/types/contexts/contexts/cart/index.d.ts +1 -2
- package/types/contexts/store/cart.d.ts +3 -2
- package/types/data/api/cms/index.d.ts +11 -0
- package/types/data/api/search/product/index.d.ts +1 -1
- package/types/layout/team-components/Footer/index.d.ts +3 -0
- package/types/layout/team-components/Timer/index.d.ts +1 -1
- package/types/layout/team-components/TipBar/index.d.ts +6 -1
- package/types/layout/utils/index.d.ts +6 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { IContentTypeResponseBase } from '../../Factories';
|
|
3
3
|
import { IHeaderSubmenu } from '../../Sections/HeaderSubmenu';
|
|
4
|
-
import { GetContentTypeProps } from '../../api';
|
|
5
4
|
import { ICONSType } from '../../../constants';
|
|
5
|
+
import { GetContentTypeProps } from '../../../data/api/cms';
|
|
6
6
|
|
|
7
7
|
export interface HeaderCategories {
|
|
8
8
|
label: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GetContentTypeProps } from '
|
|
1
|
+
import { GetContentTypeProps } from '../../../data/api/cms';
|
|
2
2
|
import { IContentTypeResponseBase } from '../../Factories';
|
|
3
3
|
import { ImageGridSectionType } from '../../Sections/ImageGrid';
|
|
4
4
|
import { NewsLetterSectionType } from '../../Sections/Newsletter';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GetContentTypeProps } from '
|
|
1
|
+
import { GetContentTypeProps } from '../../../data/api/cms';
|
|
2
2
|
import { IContentTypeResponseBase } from '../../Factories';
|
|
3
3
|
|
|
4
4
|
export interface Config {
|
|
@@ -14,5 +14,4 @@ export interface INotFoundContent extends IContentTypeResponseBase {
|
|
|
14
14
|
config: Config;
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
|
-
export
|
|
18
|
-
}
|
|
17
|
+
export type NotFoundContentProps = Omit<GetContentTypeProps, 'contentType'>;
|
|
@@ -2,6 +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
6
|
|
|
6
7
|
export type Position = 'superior-esquerda' | 'superior-centro' | 'superior-direita' | 'centro' | 'centro-esquerda' | 'centro-direita' | 'inferior-esquerda' | 'inferior-centro' | 'inferior-direita';
|
|
7
8
|
export type ContentAlignment = 'centro' | 'esquerda' | 'direita';
|
|
@@ -16,6 +17,7 @@ export type BannerType = TextContentSectionType['data'] & {
|
|
|
16
17
|
video: string;
|
|
17
18
|
position: Position;
|
|
18
19
|
image: string;
|
|
20
|
+
imageHref: string;
|
|
19
21
|
imageOpacity: boolean;
|
|
20
22
|
altImage: string;
|
|
21
23
|
showTimer: boolean;
|
|
@@ -33,7 +35,8 @@ export interface BannerContentProps {
|
|
|
33
35
|
data: BannerSectionType['data'];
|
|
34
36
|
videoUrl: string | undefined;
|
|
35
37
|
priority?: boolean;
|
|
36
|
-
videoRef?: React.RefObject<HTMLVideoElement>;
|
|
38
|
+
videoRef?: React.RefObject<HTMLVideoElement | null>;
|
|
39
|
+
ICONS: ICONSType;
|
|
37
40
|
}
|
|
38
41
|
export interface IBannerSectionTypeComponent {
|
|
39
42
|
data: {
|
|
@@ -43,6 +46,7 @@ export interface IBannerSectionTypeComponent {
|
|
|
43
46
|
};
|
|
44
47
|
creative: string;
|
|
45
48
|
priority?: boolean;
|
|
49
|
+
ICONS: ICONSType;
|
|
46
50
|
}
|
|
47
51
|
export interface BannerSectionType extends ISectionResponseBase, IBannerSectionTypeComponent {
|
|
48
52
|
}
|
|
@@ -1,5 +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
4
|
|
|
4
5
|
export interface BennefitsBarSectionType extends ISectionResponseBase {
|
|
5
6
|
data: {
|
|
@@ -17,4 +18,8 @@ export interface BennefitsBarSectionType extends ISectionResponseBase {
|
|
|
17
18
|
subtitle: string;
|
|
18
19
|
}[];
|
|
19
20
|
};
|
|
21
|
+
CONSTANTS: {
|
|
22
|
+
BENNEFITS_BAR_TITLE: BENNEFITS_BAR_TITLEType;
|
|
23
|
+
ICONS: ICONSType;
|
|
24
|
+
};
|
|
20
25
|
}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { TMode, TSizesSmallExtended } from '@soma-vertical-web/foundations';
|
|
2
2
|
import { ISectionResponseBase } from '../../Factories';
|
|
3
|
+
import { HTMLAttributes } from 'react';
|
|
4
|
+
import { ICONSType } from '../../../constants';
|
|
3
5
|
|
|
4
6
|
export type ContentAlignment = 'centro' | 'esquerda' | 'direita';
|
|
7
|
+
type CommonProps = {
|
|
8
|
+
ICONS: ICONSType;
|
|
9
|
+
};
|
|
5
10
|
export interface ITextContentSectionTypeComponent {
|
|
6
11
|
data: {
|
|
7
12
|
borderTop: boolean;
|
|
@@ -17,9 +22,11 @@ export interface ITextContentSectionTypeComponent {
|
|
|
17
22
|
showTextStructureExpander: boolean;
|
|
18
23
|
};
|
|
19
24
|
}
|
|
20
|
-
export
|
|
21
|
-
|
|
25
|
+
export type TextContentSectionType = ISectionResponseBase & ITextContentSectionTypeComponent;
|
|
26
|
+
export type TextContentSectionProps = TextContentSectionType & HTMLAttributes<HTMLDivElement> & CommonProps;
|
|
22
27
|
export interface ContentProps {
|
|
23
28
|
expanded: boolean;
|
|
24
29
|
content: ITextContentSectionTypeComponent['data'];
|
|
25
30
|
}
|
|
31
|
+
export type TextContentProps = ITextContentSectionTypeComponent & HTMLAttributes<HTMLDivElement> & CommonProps;
|
|
32
|
+
export {};
|
package/types/cms/api/index.d.ts
CHANGED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ReadonlyRequestCookies } from 'next/dist/server/web/spec-extension/adapters/request-cookies';
|
|
2
|
-
|
|
3
|
-
export interface ReplaceTargetForPreviewProps extends GetContentTypeProps {
|
|
4
|
-
documents: Array<any>;
|
|
5
|
-
}
|
|
6
|
-
export interface GetContentTypeProps {
|
|
7
|
-
contentType: string;
|
|
8
|
-
NextCookies: () => ReadonlyRequestCookies;
|
|
9
|
-
CMS_PROJECT_NAME: string;
|
|
10
|
-
storeId: string;
|
|
11
|
-
}
|
package/types/constants.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { Size } from '@soma-vertical-web/core-components/src/lib/TextField/interfaces';
|
|
2
|
+
import { EditorState } from 'draft-js';
|
|
3
|
+
import { CSSProperties } from 'react';
|
|
2
4
|
|
|
3
5
|
import * as yup from 'yup';
|
|
4
6
|
export declare const PDPShelfType: readonly ["whosawalsosaw", "whosawalsobought", "whoboughtalsobought", "accessories", "similars", "showtogether", "suggestions"];
|
|
@@ -29,6 +31,7 @@ export declare const ObjectFitsDefault: readonly ["contain", "cover", "fill", "n
|
|
|
29
31
|
type InputSizes = Exclude<Size, 'textarea-size'>;
|
|
30
32
|
export type ADD_TO_CARTType = Record<string, Record<string, string>>;
|
|
31
33
|
export type ALIGNMENT_MENUType = 'flex-start' | 'center' | 'flex-end';
|
|
34
|
+
export type BENNEFITS_BAR_TITLEType = string;
|
|
32
35
|
export type BUY_BUTTON_LABELSType = Record<string, string>;
|
|
33
36
|
export type BUY_PACKAGEType = {
|
|
34
37
|
header: {
|
|
@@ -40,7 +43,10 @@ export type BUY_PACKAGEType = {
|
|
|
40
43
|
select_product: string;
|
|
41
44
|
};
|
|
42
45
|
};
|
|
46
|
+
export type COMMON_PAGE_COLUMN_GAPType = CSSProperties['gap'];
|
|
43
47
|
export type COMPONENT_LISTType = Record<string, string>;
|
|
48
|
+
export type CREATE_CONTENTType = (jsonData: string) => EditorState;
|
|
49
|
+
export type EXTENDED_BLOCK_RENDER_MAPType = Immutable.Map<any, any>;
|
|
44
50
|
export type ICONSType = Record<string, string>;
|
|
45
51
|
export type FREIGHT_CALCULATIONType = {
|
|
46
52
|
messages: {
|
|
@@ -59,7 +65,8 @@ export type MAIN_IMAGEType = string;
|
|
|
59
65
|
export type MENU_INFOType = Record<string, Record<string, string>>;
|
|
60
66
|
export type MENU_NAVIGATION_BAR_ALLOWEDType = boolean;
|
|
61
67
|
export type NAME_SPLIT_SYMBOLType = string;
|
|
62
|
-
export type
|
|
68
|
+
export type PAYMENT_FLAGS_DICTIONARYType = Record<string, string>;
|
|
69
|
+
export type PAYMENT_FLAGSType = any;
|
|
63
70
|
export type PDP_INFOType = Record<string, Record<string, string>>;
|
|
64
71
|
export type PLP_FILTERSType = {
|
|
65
72
|
key: string;
|
|
@@ -5,5 +5,4 @@ export interface UIContextProps {
|
|
|
5
5
|
recentlyAddedProducts: CartItemStore[];
|
|
6
6
|
setRecentlyAdded: Dispatch<SetStateAction<AddToCart[]>>;
|
|
7
7
|
}
|
|
8
|
-
export
|
|
9
|
-
}
|
|
8
|
+
export type UIProviderProps = HTMLAttributes<HTMLDivElement>;
|
|
@@ -51,7 +51,7 @@ export interface CartContextProps extends CartProviderProps {
|
|
|
51
51
|
removeToCart(productId: string, message?: string, callback?: Function): Promise<CodeResponseStatus>;
|
|
52
52
|
shipping(postalCode?: string): Promise<OptionalOrderForm['shippingData'] | boolean>;
|
|
53
53
|
shippingUpdateOption(options?: ShippingOption[], postalCode?: string, country?: string): void;
|
|
54
|
-
toggleGiftItemCart(
|
|
54
|
+
toggleGiftItemCart(uniqueId: string, idOffering: string, remove: boolean): Promise<boolean | CartItemStore[] | undefined>;
|
|
55
55
|
updateItemQuantity(productId: string, quantity: number): Promise<string | boolean>;
|
|
56
56
|
}
|
|
57
57
|
export interface OptionalOrderForm {
|
|
@@ -108,6 +108,7 @@ export type CartItemStore = {
|
|
|
108
108
|
availability: string;
|
|
109
109
|
bundleItems: Record<string, never>[];
|
|
110
110
|
id: string;
|
|
111
|
+
uniqueId: string;
|
|
111
112
|
referenceId: Array<{
|
|
112
113
|
Key: string;
|
|
113
114
|
Value: string;
|
|
@@ -167,7 +168,7 @@ export interface CartStore {
|
|
|
167
168
|
setIsOpen(value: boolean): void;
|
|
168
169
|
shipping(postalCode?: string, country?: string): Promise<OptionalOrderForm['shippingData'] | boolean>;
|
|
169
170
|
shippingUpdate(options?: ShippingOption[], postalCode?: string, country?: string): Promise<OptionalOrderForm['shippingData'] | boolean>;
|
|
170
|
-
toggleServiceToProduct(
|
|
171
|
+
toggleServiceToProduct(uniqueId: string, itemIndex: number, remove: boolean): Promise<OptionalOrderForm['items'] | boolean>;
|
|
171
172
|
updateItemQuantity(id: string, quantity: number, options?: CartItemOptionalProps): Promise<OptionalOrderForm['items'] | boolean>;
|
|
172
173
|
insertProfileEmail(email: string): Promise<OptionalOrderForm['clientProfileData'] | boolean>;
|
|
173
174
|
setRecentlyAddedProducts(item: AddToCart | AddToCart[]): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReadonlyRequestCookies } from 'next/dist/server/web/spec-extension/adapters/request-cookies';
|
|
2
|
+
|
|
3
|
+
export interface ReplaceTargetForPreviewProps extends GetContentTypeProps {
|
|
4
|
+
documents: Array<any>;
|
|
5
|
+
}
|
|
6
|
+
export interface GetContentTypeProps {
|
|
7
|
+
contentType: string;
|
|
8
|
+
NextCookies: () => ReadonlyRequestCookies;
|
|
9
|
+
CMS_PROJECT_NAME: string;
|
|
10
|
+
storeId: string;
|
|
11
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IAdornment } from '@soma-vertical-web/foundations';
|
|
2
2
|
import { IFooterContent, PaymentInfo, SocialMedia } from '../../../cms/ContentTypes/Footer';
|
|
3
3
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
4
|
+
import { ICONSType } from '../../../constants';
|
|
4
5
|
|
|
5
6
|
export interface IFooter {
|
|
6
7
|
data: IFooterContent;
|
|
@@ -12,6 +13,7 @@ export interface IFooter {
|
|
|
12
13
|
icon: string;
|
|
13
14
|
}>;
|
|
14
15
|
LEGAL_INFORMATION_TEXT: string;
|
|
16
|
+
ICONS: ICONSType;
|
|
15
17
|
}
|
|
16
18
|
export interface IFooterProps extends HTMLAttributes<HTMLDivElement> {
|
|
17
19
|
children: ReactNode;
|
|
@@ -33,6 +35,7 @@ export interface IFooterColumnProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
33
35
|
textAlignContent?: string;
|
|
34
36
|
textAlignItems?: string;
|
|
35
37
|
children?: ReactNode;
|
|
38
|
+
ICONS: ICONSType;
|
|
36
39
|
}
|
|
37
40
|
export interface IFooterItemProps extends HTMLAttributes<HTMLDivElement> {
|
|
38
41
|
type?: 'menu' | 'social-media' | 'payment';
|
|
@@ -15,6 +15,10 @@ export interface TipBarProps {
|
|
|
15
15
|
TIPBAR_CONFIGS: TIPBAR_CONFIGSType;
|
|
16
16
|
Z_INDEX_WAR: Z_INDEX_WARType;
|
|
17
17
|
};
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface RootProps {
|
|
21
|
+
className?: string;
|
|
18
22
|
}
|
|
19
23
|
export type CountDownProps = TimerProps & {
|
|
20
24
|
dateEnd: Date;
|
|
@@ -38,8 +42,9 @@ export interface ItemProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
38
42
|
export interface FieldsScreeningProps {
|
|
39
43
|
staticZone: any;
|
|
40
44
|
type: string;
|
|
41
|
-
|
|
45
|
+
className?: string;
|
|
42
46
|
description?: string;
|
|
47
|
+
title?: string;
|
|
43
48
|
}
|
|
44
49
|
export interface CouponProps extends ButtonProps {
|
|
45
50
|
coupon: string;
|
|
@@ -5,6 +5,7 @@ import { ICONSType, Z_INDEX_WARType } from '../../constants';
|
|
|
5
5
|
import { RootProps } from '../team-components/ProductCard';
|
|
6
6
|
import { ProductListCardProps } from '../team-components/ProductList';
|
|
7
7
|
import { ProductType_PDC } from '../../global/product';
|
|
8
|
+
import { ContentState } from 'draft-js';
|
|
8
9
|
|
|
9
10
|
export interface ObserverProps extends HTMLAttributes<HTMLDivElement> {
|
|
10
11
|
observerOptions?: {
|
|
@@ -39,3 +40,8 @@ export interface ShelfProps extends PropsWithChildren {
|
|
|
39
40
|
};
|
|
40
41
|
ICONS: ICONSType;
|
|
41
42
|
}
|
|
43
|
+
export interface DraftLinkWrapperProps {
|
|
44
|
+
children: ReactNode;
|
|
45
|
+
contentState: ContentState;
|
|
46
|
+
entityKey: string;
|
|
47
|
+
}
|