@soma-vertical-web/multi-lib 0.0.9 → 0.0.11
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/contexts/contexts/events/EventContext.d.ts +6 -0
- package/contexts/index.d.ts +5 -0
- package/contexts/store/pdp.d.ts +24 -6
- package/data/helpers/events/index.d.ts +29 -0
- package/data/helpers/product/index.d.ts +7 -0
- package/data/helpers/product/price.d.ts +3 -0
- package/data/helpers/utils/index.d.ts +5 -0
- package/data/index.d.ts +6 -67
- package/index.js +9 -9
- package/index.mjs +1559 -1478
- package/layout/index.d.ts +2 -0
- package/layout/team-component/BackToTop/BackToTop.d.ts +4 -0
- package/layout/team-component/BackToTop/index.d.ts +1 -0
- package/layout/team-component/FreightCalculation/helpers.d.ts +1 -2
- package/layout/utils/EventCollector/index.d.ts +5 -0
- package/package.json +1 -1
- package/style.css +1 -1
- package/types/contexts/store/pdp.d.ts +16 -10
- package/types/data/events/index.d.ts +2 -12
- package/types/data/helpers/index.d.ts +5 -0
- package/types/layout/team-components/FreightCalculation/index.d.ts +0 -5
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { EventContextProps, EventProviderProps } from '../../../types/data/events';
|
|
2
|
+
|
|
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 };
|
package/contexts/index.d.ts
CHANGED
|
@@ -41,6 +41,11 @@ export declare const contexts: {
|
|
|
41
41
|
hook: () => import('../types/contexts/contexts/global').GlobalContextProps;
|
|
42
42
|
mediator: typeof Mediator;
|
|
43
43
|
};
|
|
44
|
+
events: {
|
|
45
|
+
context: import('react').Context<import('../types/data/events').EventContextProps>;
|
|
46
|
+
provider: ({ children, evtFunctionsConfigs }: import('../types/data/events').EventProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
hook: () => import('../types/data/events').EventContextProps;
|
|
48
|
+
};
|
|
44
49
|
};
|
|
45
50
|
hooks: {
|
|
46
51
|
useBackPDC: ({ gridScrollBack }: import('../types/contexts/hooks').UseBackPDCProps) => void;
|
package/contexts/store/pdp.d.ts
CHANGED
|
@@ -1,10 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { SelectedSkuInfoType } from '../../types/contexts/store/pdp';
|
|
2
|
+
|
|
3
|
+
export declare const resetAllPDPStores: () => void;
|
|
4
|
+
export declare const useGetPDPSelectedSkuInfo: () => SelectedSkuInfoType;
|
|
5
|
+
export declare const useActionsPDPSelectedSkuInfo: () => {
|
|
6
|
+
reset: () => void;
|
|
7
|
+
setValue: (value: SelectedSkuInfoType) => void;
|
|
8
|
+
};
|
|
3
9
|
export declare const useGetPDPOpenLetMeKnow: () => boolean;
|
|
4
|
-
export declare const
|
|
10
|
+
export declare const useActionsPDPOpenLetMeKnow: () => {
|
|
11
|
+
reset: () => void;
|
|
12
|
+
setValue: (value: boolean) => void;
|
|
13
|
+
};
|
|
5
14
|
export declare const useGetPDPShowNotify: () => boolean;
|
|
6
|
-
export declare const
|
|
15
|
+
export declare const useActionsPDPShowNotify: () => {
|
|
16
|
+
reset: () => void;
|
|
17
|
+
setValue: (value: boolean) => void;
|
|
18
|
+
};
|
|
7
19
|
export declare const useGetPDPShowBottomNavigation: () => boolean;
|
|
8
|
-
export declare const
|
|
20
|
+
export declare const useActionsPDPShowBottomNavigation: () => {
|
|
21
|
+
reset: () => void;
|
|
22
|
+
setValue: (value: boolean) => void;
|
|
23
|
+
};
|
|
9
24
|
export declare const useGetPDPOpenMeasurements: () => boolean;
|
|
10
|
-
export declare const
|
|
25
|
+
export declare const useActionsPDPOpenMeasurements: () => {
|
|
26
|
+
reset: () => void;
|
|
27
|
+
setValue: (value: boolean) => void;
|
|
28
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { EventsFunctionType, ProductsPersisteDataType, PersistedDataType } from '../../../types/data/events';
|
|
2
|
+
import { SizeInfoType } from '../../../types/global/product';
|
|
3
|
+
|
|
4
|
+
export declare const pushDatalayer: ({ event, data }: {
|
|
5
|
+
event?: string;
|
|
6
|
+
data?: any;
|
|
7
|
+
}) => void;
|
|
8
|
+
export declare const eventsFunctions: EventsFunctionType;
|
|
9
|
+
export declare const getAvailablesSizes: (sizes: SizeInfoType[]) => string;
|
|
10
|
+
export declare const getCategories: (breadcrumbList: string[]) => {
|
|
11
|
+
item_category3?: string | undefined;
|
|
12
|
+
item_category2?: string | undefined;
|
|
13
|
+
item_category?: string | undefined;
|
|
14
|
+
};
|
|
15
|
+
export declare const getProductListInfoFromHead: () => string[];
|
|
16
|
+
export declare const getPersistedData: () => any;
|
|
17
|
+
export declare const findDataInPersistedData: (persistedData: ProductsPersisteDataType, sku: string) => PersistedDataType;
|
|
18
|
+
export declare const updatePersistedData: ({ persistedData, type, sku, newData, }: {
|
|
19
|
+
persistedData: ProductsPersisteDataType;
|
|
20
|
+
type: "add" | "remove";
|
|
21
|
+
sku: string;
|
|
22
|
+
newData?: PersistedDataType;
|
|
23
|
+
}) => void;
|
|
24
|
+
export declare const getPageCategoryAndDepartmentFromSlug: () => {
|
|
25
|
+
page_category: string;
|
|
26
|
+
page_departament: string;
|
|
27
|
+
id: string;
|
|
28
|
+
name: string;
|
|
29
|
+
};
|
|
@@ -1 +1,4 @@
|
|
|
1
|
+
import { ParsePriceProps } from '../../../types/data/helpers/index';
|
|
2
|
+
|
|
1
3
|
export declare const formatPriceToCurrency: (value: number, hasDecimal?: boolean) => string;
|
|
4
|
+
export declare const freightParsePrice: ({ valueInCents, hasFree, freeTaxMessage }: ParsePriceProps) => string;
|
package/data/index.d.ts
CHANGED
|
@@ -1,74 +1,13 @@
|
|
|
1
1
|
import { freightSimulation } from './api/checkout/simulation';
|
|
2
|
-
import { getCookie, setCookie } from './helpers/utils/cookies';
|
|
3
|
-
import { debounce } from './helpers/utils/debounce';
|
|
4
|
-
import { throttle } from './helpers/utils/throttle';
|
|
5
2
|
|
|
3
|
+
import * as events from "./helpers/events";
|
|
4
|
+
import * as product from "./helpers/product";
|
|
5
|
+
import * as utils from "./helpers/utils";
|
|
6
6
|
export declare const data: {
|
|
7
|
-
EventContext: import('react').Context<import('../types/data/events').EventContextProps>;
|
|
8
|
-
EventProvider: ({ children, evtFunctionsConfigs }: import('../types/data/events').EventProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
EventCollector: ({ page, data }: import('react').PropsWithChildren & import('../types/data/events').CollectorProps) => null;
|
|
10
|
-
useEventContext: () => import('../types/data/events').EventContextProps;
|
|
11
7
|
helpers: {
|
|
12
|
-
events:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
data?: any;
|
|
16
|
-
}) => void;
|
|
17
|
-
getAvailablesSizes: (sizes: import('../types/global/product').SizeInfoType[]) => string;
|
|
18
|
-
getCategories: (breadcrumbList: string[]) => {
|
|
19
|
-
item_category3?: string | undefined;
|
|
20
|
-
item_category2?: string | undefined;
|
|
21
|
-
item_category?: string | undefined;
|
|
22
|
-
};
|
|
23
|
-
getProductListInfoFromHead: () => string[];
|
|
24
|
-
getPersistedData: () => any;
|
|
25
|
-
findDataInPersistedData: (persistedData: import('../types/data/events').ProductsPersisteDataType, sku: string) => import('../types/data/events').PersistedDataType;
|
|
26
|
-
updatePersistedData: ({ persistedData, type, sku, newData, }: {
|
|
27
|
-
persistedData: import('../types/data/events').ProductsPersisteDataType;
|
|
28
|
-
type: "add" | "remove";
|
|
29
|
-
sku: string;
|
|
30
|
-
newData?: import('../types/data/events').PersistedDataType;
|
|
31
|
-
}) => void;
|
|
32
|
-
};
|
|
33
|
-
product: {
|
|
34
|
-
splitNameAndSizeFromFullName: (fullName: string) => {
|
|
35
|
-
name: string;
|
|
36
|
-
size: string;
|
|
37
|
-
};
|
|
38
|
-
getColorAndSizeFromSkuName: (skuName?: string) => {
|
|
39
|
-
color?: undefined;
|
|
40
|
-
size?: undefined;
|
|
41
|
-
} | {
|
|
42
|
-
color: string;
|
|
43
|
-
size: string;
|
|
44
|
-
};
|
|
45
|
-
resizingImg: (url: string, imageResize: {
|
|
46
|
-
width: number;
|
|
47
|
-
height: number;
|
|
48
|
-
}) => string;
|
|
49
|
-
updatedResizedImg: (url: string, imageResize: {
|
|
50
|
-
width: number;
|
|
51
|
-
height: number;
|
|
52
|
-
}) => string;
|
|
53
|
-
formatPriceToCurrency: (value: number, hasDecimal?: boolean) => string;
|
|
54
|
-
getSkuInfos: (items: import('../types/global/product').ItemType_PDP[]) => {
|
|
55
|
-
sizes: import('../types/contexts/contexts/pdp').Sizes;
|
|
56
|
-
allSizesAvailable: boolean;
|
|
57
|
-
price: number;
|
|
58
|
-
listPrice: number;
|
|
59
|
-
installments: import('../types/contexts/contexts/pdp').Installments;
|
|
60
|
-
};
|
|
61
|
-
getThumbImage: (images: import('../types/global/product').ImageType[]) => import('../types/global/product').ImageType | undefined;
|
|
62
|
-
};
|
|
63
|
-
utils: {
|
|
64
|
-
getCookie: typeof getCookie;
|
|
65
|
-
setCookie: typeof setCookie;
|
|
66
|
-
debounce: typeof debounce;
|
|
67
|
-
removeAccentsAndReplaceSpaces: (str: string) => string;
|
|
68
|
-
throttle: typeof throttle;
|
|
69
|
-
getMilliSeconds: (dateInit: Date, dateEnd: Date) => number;
|
|
70
|
-
getDaysHoursMinutesSeconds: (milliseconds: number, type?: string) => number;
|
|
71
|
-
};
|
|
8
|
+
events: typeof events;
|
|
9
|
+
product: typeof product;
|
|
10
|
+
utils: typeof utils;
|
|
72
11
|
};
|
|
73
12
|
api: {
|
|
74
13
|
checkout: {
|