@soma-vertical-web/multi-lib 0.0.71 → 0.0.73
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/Sections/PopupModal/Component.d.ts +4 -0
- package/cms/Sections/PopupModal/Composite/FormSection.d.ts +4 -0
- package/cms/Sections/PopupModal/Composite/Success.d.ts +4 -0
- package/cms/index.d.ts +1 -0
- package/constants.d.ts +4 -1
- package/data/api/DitoIngest/sendDitoEvent.d.ts +3 -0
- package/data/api/search/autoCompleteSuggestions/index.d.ts +1 -1
- package/data/helpers/utils/stringToSHA1.d.ts +1 -0
- package/index.js +18 -18
- package/index.mjs +5373 -5202
- package/index2.mjs +5 -1
- package/layout/team-component/Form/FormContext.d.ts +1 -1
- package/layout/template/LPCadastro/index.d.ts +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/types/cms/Sections/PopupModal/index.d.ts +26 -0
- package/types/data/api/dito-ingest/index.d.ts +65 -0
- package/types/layout/team-components/Form/index.d.ts +7 -2
- package/types/layout/templates/LPCadastro/index.d.ts +1 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ICONSType } from '../../../constants';
|
|
2
|
+
import { IFormProps } from '../../../layout/team-components/Form';
|
|
3
|
+
|
|
4
|
+
export interface PopupContent extends IFormProps {
|
|
5
|
+
active: boolean;
|
|
6
|
+
title: string;
|
|
7
|
+
description: string;
|
|
8
|
+
imageUrl: string;
|
|
9
|
+
acceptTerms: boolean;
|
|
10
|
+
successTitle: string;
|
|
11
|
+
successDescription: string;
|
|
12
|
+
actionName: string;
|
|
13
|
+
originName: string;
|
|
14
|
+
closeColor: string;
|
|
15
|
+
}
|
|
16
|
+
export interface PopupModalSectionProps {
|
|
17
|
+
data: PopupContent;
|
|
18
|
+
CONSTANTS: {
|
|
19
|
+
ICONS: ICONSType;
|
|
20
|
+
POPUP_SUBMITTED_STORAGE: string;
|
|
21
|
+
POPUP_TRACK_STORAGE: string;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export interface FormSectionProps extends PopupContent {
|
|
25
|
+
ICONS: ICONSType;
|
|
26
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
type DitoEventType = 'IDENTIFY' | 'TRACK';
|
|
2
|
+
interface DitoAddress {
|
|
3
|
+
city?: string;
|
|
4
|
+
state?: string;
|
|
5
|
+
country?: string;
|
|
6
|
+
postal_code?: string;
|
|
7
|
+
street?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface DitoIdentifyBody {
|
|
10
|
+
user_id: string;
|
|
11
|
+
timestamp: string;
|
|
12
|
+
type: DitoEventType;
|
|
13
|
+
userToken?: string;
|
|
14
|
+
traits: {
|
|
15
|
+
id?: string;
|
|
16
|
+
birthday?: string;
|
|
17
|
+
created_at?: string;
|
|
18
|
+
gender?: string;
|
|
19
|
+
email?: string;
|
|
20
|
+
name?: string;
|
|
21
|
+
phone?: string;
|
|
22
|
+
timezone?: string;
|
|
23
|
+
address?: DitoAddress;
|
|
24
|
+
custom_data?: {
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export interface DitoTrackBody {
|
|
30
|
+
user_id: string;
|
|
31
|
+
action: string;
|
|
32
|
+
timestamp: string;
|
|
33
|
+
type: DitoEventType;
|
|
34
|
+
context?: {
|
|
35
|
+
os?: {
|
|
36
|
+
name?: string;
|
|
37
|
+
version?: string;
|
|
38
|
+
};
|
|
39
|
+
utm?: {
|
|
40
|
+
campaign?: string;
|
|
41
|
+
medium?: string;
|
|
42
|
+
source?: string;
|
|
43
|
+
};
|
|
44
|
+
browser?: {
|
|
45
|
+
name?: string;
|
|
46
|
+
version?: string;
|
|
47
|
+
};
|
|
48
|
+
platform?: {
|
|
49
|
+
name?: string;
|
|
50
|
+
type?: string;
|
|
51
|
+
};
|
|
52
|
+
referrer?: string;
|
|
53
|
+
user_agent?: string;
|
|
54
|
+
};
|
|
55
|
+
properties: {
|
|
56
|
+
custom_data?: {
|
|
57
|
+
[key: string]: any;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
export type DitoAuthResponse = {
|
|
62
|
+
token: string;
|
|
63
|
+
refresh_token: string;
|
|
64
|
+
};
|
|
65
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { default as React, FormEvent, HTMLAttributes } from 'react';
|
|
1
|
+
import { default as React, FormEvent, HTMLAttributes, PropsWithChildren } from 'react';
|
|
2
2
|
import { FormStatus } from '../Newsletter';
|
|
3
3
|
import { ICONSType } from '../../../constants';
|
|
4
4
|
|
|
@@ -13,10 +13,13 @@ export interface IFormGroup {
|
|
|
13
13
|
groupLabel: string;
|
|
14
14
|
fields: Fields[];
|
|
15
15
|
}
|
|
16
|
-
export interface IFormProps extends HTMLAttributes<HTMLDivElement>, FormConstantsProps {
|
|
16
|
+
export interface IFormProps extends HTMLAttributes<HTMLDivElement>, FormConstantsProps, PropsWithChildren {
|
|
17
17
|
masterDataEntity: string | undefined;
|
|
18
18
|
groups: IFormGroup[];
|
|
19
19
|
postFn: (args: any) => Promise<any>;
|
|
20
|
+
actionName?: string;
|
|
21
|
+
originName?: string;
|
|
22
|
+
POPUP_SUBMITTED_STORAGE: string;
|
|
20
23
|
}
|
|
21
24
|
export interface IFormData {
|
|
22
25
|
[key: string]: string;
|
|
@@ -28,6 +31,8 @@ export interface IFormContext {
|
|
|
28
31
|
formData: IFormData;
|
|
29
32
|
status: FormStatus;
|
|
30
33
|
fieldMessage?: string;
|
|
34
|
+
success: boolean;
|
|
35
|
+
setSuccess: React.Dispatch<React.SetStateAction<boolean>>;
|
|
31
36
|
}
|
|
32
37
|
export interface FormConstantsProps extends HTMLAttributes<HTMLDivElement> {
|
|
33
38
|
FORM_CONFIGS: {
|
|
@@ -24,6 +24,7 @@ export interface LPCadastroProps {
|
|
|
24
24
|
returnButton: string;
|
|
25
25
|
};
|
|
26
26
|
ICONS: ICONSType;
|
|
27
|
+
POPUP_SUBMITTED_STORAGE: string;
|
|
27
28
|
}
|
|
28
29
|
export interface LPCadastroContentTypeProps extends Omit<GetContentTypeProps, 'contentType'> {
|
|
29
30
|
SectionZone: React.ComponentType<any>;
|