@domun/component-library 1.0.0
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/lib/assets/fonts/icomoon.eot +0 -0
- package/lib/assets/fonts/icomoon.svg +221 -0
- package/lib/assets/fonts/icomoon.ttf +0 -0
- package/lib/assets/fonts/icomoon.woff +0 -0
- package/lib/assets/img/icons/AndroidIcon.d.ts +3 -0
- package/lib/assets/img/icons/AppleIcon.d.ts +3 -0
- package/lib/assets/img/icons/Close.d.ts +3 -0
- package/lib/assets/img/icons/index.d.ts +2 -0
- package/lib/common/consts/events.d.ts +16 -0
- package/lib/common/index.d.ts +3 -0
- package/lib/common/localStorage.d.ts +1 -0
- package/lib/common/utils.d.ts +3 -0
- package/lib/components/DownloadAppButton/DownloadAppButton.d.ts +3 -0
- package/lib/components/DownloadAppButton/DownloadAppButton.stories.d.ts +9 -0
- package/lib/components/DropDown/DropDown.d.ts +4 -0
- package/lib/components/DropDown/index.d.ts +1 -0
- package/lib/components/DropDown/types.d.ts +15 -0
- package/lib/components/ErrorMessage/ErrorMessage.d.ts +6 -0
- package/lib/components/ErrorMessage/index.d.ts +1 -0
- package/lib/components/HelpLink/HelpLink.d.ts +5 -0
- package/lib/components/Inputs/Input.d.ts +4 -0
- package/lib/components/Inputs/InputCountry.d.ts +4 -0
- package/lib/components/Inputs/InputDocument.d.ts +7 -0
- package/lib/components/Inputs/InputEconomicSector.d.ts +4 -0
- package/lib/components/Inputs/InputEmail.d.ts +4 -0
- package/lib/components/Inputs/InputPassword.d.ts +4 -0
- package/lib/components/Inputs/InputPhone.d.ts +4 -0
- package/lib/components/Inputs/index.d.ts +7 -0
- package/lib/components/Inputs/types.d.ts +38 -0
- package/lib/components/Login/Login.d.ts +4 -0
- package/lib/components/Login/Login.stories.d.ts +9 -0
- package/lib/components/Login/components/CustomerProfile/CustomerProfile.d.ts +8 -0
- package/lib/components/Login/components/CustomerProfile/CustomerProfile.stories.d.ts +27 -0
- package/lib/components/Login/components/GetCode/GetCode.d.ts +11 -0
- package/lib/components/Login/components/GetCode/GetCode.stories.d.ts +24 -0
- package/lib/components/Login/components/GetCode/types.d.ts +9 -0
- package/lib/components/Login/components/GetCodeByEmail/GetCodeByEmail.d.ts +9 -0
- package/lib/components/Login/components/GetCodeByEmail/GetCodeByEmail.stories.d.ts +20 -0
- package/lib/components/Login/components/GetCodeByEmail/types.d.ts +9 -0
- package/lib/components/Login/components/LoginContainer/LoginContainer.d.ts +6 -0
- package/lib/components/Login/components/RegisterInApp/RegisterInApp.d.ts +3 -0
- package/lib/components/Login/components/RegisterInApp/RegisterInApp.stories.d.ts +19 -0
- package/lib/components/Login/components/RegisterMessage/RegisterMessage.d.ts +3 -0
- package/lib/components/Login/components/SmsValidation/SmsValidation.d.ts +10 -0
- package/lib/components/Login/components/SmsValidation/SmsValidation.stories.d.ts +21 -0
- package/lib/components/Login/components/UpdateUserData/UpdateUserData.d.ts +9 -0
- package/lib/components/Login/components/UpdateUserData/UpdateUserData.stories.d.ts +19 -0
- package/lib/components/Login/components/ValidateCode/ValidateCode.d.ts +12 -0
- package/lib/components/Login/fetcher.d.ts +1 -0
- package/lib/components/Login/icons/CheckCircle.d.ts +3 -0
- package/lib/components/Login/icons/Profile.d.ts +3 -0
- package/lib/components/Login/icons/SignOut.d.ts +3 -0
- package/lib/components/Login/index.d.ts +16 -0
- package/lib/components/Login/services.d.ts +42 -0
- package/lib/components/Login/types.d.ts +41 -0
- package/lib/components/Modal/Modal.d.ts +3 -0
- package/lib/components/Modal/Modal.stories.d.ts +13 -0
- package/lib/components/Modal/index.d.ts +1 -0
- package/lib/components/Modal/types.d.ts +36 -0
- package/lib/components/Pagination/Pagination.stories.d.ts +16 -0
- package/lib/components/Pagination/index.d.ts +1 -0
- package/lib/components/Pagination/pagination.d.ts +4 -0
- package/lib/components/Pagination/paginationProps.d.ts +10 -0
- package/lib/components/Pagination/usePagination.d.ts +2 -0
- package/lib/components/ProgressBar/ProgressBar.d.ts +5 -0
- package/lib/components/SelectLoginMethod/SelectLoginMethod.d.ts +11 -0
- package/lib/components/SelectLoginMethod/index.d.ts +1 -0
- package/lib/components/Slider/Slider.d.ts +4 -0
- package/lib/components/Slider/Slider.stories.d.ts +16 -0
- package/lib/components/Slider/Slider.type.d.ts +16 -0
- package/lib/components/Slider/index.d.ts +1 -0
- package/lib/components/index.d.ts +10 -0
- package/lib/constants/constants.d.ts +30 -0
- package/lib/constants/index.d.ts +1 -0
- package/lib/icons/ArrowDown.d.ts +3 -0
- package/lib/icons/ArrowTop.d.ts +3 -0
- package/lib/icons/Chat.d.ts +3 -0
- package/lib/icons/Information.d.ts +3 -0
- package/lib/icons/LightSupport.d.ts +3 -0
- package/lib/icons/Password.d.ts +3 -0
- package/lib/icons/Rocket.d.ts +3 -0
- package/lib/icons/WhatsAppFill.d.ts +3 -0
- package/lib/icons/index.d.ts +6 -0
- package/lib/index.css +24 -0
- package/lib/index.d.ts +7 -0
- package/lib/index.esm.css +24 -0
- package/lib/index.esm.js +1 -0
- package/lib/index.js +1 -0
- package/lib/providers/auth.provider.d.ts +13 -0
- package/lib/providers/copies.provider.d.ts +7 -0
- package/lib/providers/fallback.copies.d.ts +1 -0
- package/lib/providers/index.d.ts +1 -0
- package/lib/styles/icomoon-font.dev.css +12 -0
- package/lib/styles/icomoon-font.prod.css +12 -0
- package/lib/styles/icons.css +636 -0
- package/lib/ui/index.d.ts +13 -0
- package/lib/ui/ui-autocomplete/index.d.ts +2 -0
- package/lib/ui/ui-autocomplete/types.d.ts +11 -0
- package/lib/ui/ui-autocomplete/ui-autocomplete.d.ts +5 -0
- package/lib/ui/ui-autocomplete/ui-autocomplete.stories.d.ts +5 -0
- package/lib/ui/ui-button/index.d.ts +2 -0
- package/lib/ui/ui-button/types.d.ts +24 -0
- package/lib/ui/ui-button/ui-button.d.ts +4 -0
- package/lib/ui/ui-checkbox/index.d.ts +2 -0
- package/lib/ui/ui-checkbox/types.d.ts +6 -0
- package/lib/ui/ui-checkbox/ui-checkbox.d.ts +4 -0
- package/lib/ui/ui-checkbox/ui-checkbox.stories.d.ts +5 -0
- package/lib/ui/ui-dropdown/index.d.ts +2 -0
- package/lib/ui/ui-dropdown/types.d.ts +20 -0
- package/lib/ui/ui-dropdown/ui-dropdown.d.ts +4 -0
- package/lib/ui/ui-dropdown/ui-dropdown.stories.d.ts +5 -0
- package/lib/ui/ui-full-screen-loader/index.d.ts +2 -0
- package/lib/ui/ui-full-screen-loader/types.d.ts +3 -0
- package/lib/ui/ui-full-screen-loader/ui-full-screen-loader.d.ts +4 -0
- package/lib/ui/ui-full-screen-loader/ui-full-screen-loader.stories.d.ts +5 -0
- package/lib/ui/ui-icons/index.d.ts +2 -0
- package/lib/ui/ui-icons/ui-icons-dev.d.ts +4 -0
- package/lib/ui/ui-icons/ui-icons-prod.d.ts +4 -0
- package/lib/ui/ui-input/index.d.ts +2 -0
- package/lib/ui/ui-input/types.d.ts +25 -0
- package/lib/ui/ui-input/ui-input.d.ts +4 -0
- package/lib/ui/ui-landing-footer/index.d.ts +2 -0
- package/lib/ui/ui-landing-footer/types.d.ts +3 -0
- package/lib/ui/ui-landing-footer/ui-landing-footer.d.ts +4 -0
- package/lib/ui/ui-landing-footer/ui-landing-footer.stories.d.ts +5 -0
- package/lib/ui/ui-landing-header/index.d.ts +2 -0
- package/lib/ui/ui-landing-header/types.d.ts +22 -0
- package/lib/ui/ui-landing-header/ui-landing-header.d.ts +4 -0
- package/lib/ui/ui-landing-header/ui-landing-header.stories.d.ts +7 -0
- package/lib/ui/ui-loader/index.d.ts +2 -0
- package/lib/ui/ui-loader/types.d.ts +4 -0
- package/lib/ui/ui-loader/ui-loader.d.ts +4 -0
- package/lib/ui/ui-phone/index.d.ts +2 -0
- package/lib/ui/ui-phone/types.d.ts +24 -0
- package/lib/ui/ui-phone/ui-phone.d.ts +4 -0
- package/lib/ui/ui-phone/ui-phone.stories.d.ts +5 -0
- package/lib/ui/ui-radio/index.d.ts +2 -0
- package/lib/ui/ui-radio/types.d.ts +6 -0
- package/lib/ui/ui-radio/ui-input.stories.d.ts +5 -0
- package/lib/ui/ui-radio/ui-radio.d.ts +4 -0
- package/lib/ui/ui-timer/index.d.ts +2 -0
- package/lib/ui/ui-timer/types.d.ts +8 -0
- package/lib/ui/ui-timer/ui-input.stories.d.ts +5 -0
- package/lib/ui/ui-timer/ui-timer.d.ts +4 -0
- package/lib/utils/go-to-app.d.ts +1 -0
- package/lib/utils/index.d.ts +2 -0
- package/lib/utils/scroll-to.d.ts +1 -0
- package/package.json +86 -0
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const EVENTS: {
|
|
2
|
+
SELECT_COUNTRY_PHONE: string;
|
|
3
|
+
SELECT_INPUT_PROFILE_PHONE: string;
|
|
4
|
+
SELECT_ACCEPT_TERMS: string;
|
|
5
|
+
SELECT_SMS_CONFIRM: string;
|
|
6
|
+
SELECT_WA_CONFIRM: string;
|
|
7
|
+
SELECT_HELP: string;
|
|
8
|
+
SELECT_INPUT_CODE: string;
|
|
9
|
+
SELECT_RESEND_CODE: string;
|
|
10
|
+
SELECT_CONFIRM_CODE: string;
|
|
11
|
+
SELECT_INPUT_BUYER_NAME: string;
|
|
12
|
+
SELECT_BUYER_LAST_NAME: string;
|
|
13
|
+
SELECT_CONFIRM_NAME: string;
|
|
14
|
+
SELECT_LOGOUT: string;
|
|
15
|
+
SUCCESS_LOGIN_METHOD: string;
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useLocalStorage<T>(key: string, initialValue: T, inParent?: boolean): readonly [T, (value: T | ((val: T) => T)) => void];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentStory } from '@storybook/react';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: () => JSX.Element;
|
|
6
|
+
argTypes: {};
|
|
7
|
+
};
|
|
8
|
+
export default _default;
|
|
9
|
+
export declare const DownloadAppButtonDefault: ComponentStory<() => JSX.Element>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as DropDown } from "./DropDown";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type Selected = {
|
|
2
|
+
id?: string;
|
|
3
|
+
label: string;
|
|
4
|
+
image?: string;
|
|
5
|
+
};
|
|
6
|
+
export type DropDownProps = {
|
|
7
|
+
className: string;
|
|
8
|
+
fieldName: string;
|
|
9
|
+
id?: string;
|
|
10
|
+
onChange?: any;
|
|
11
|
+
options: any;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
setFieldValue: any;
|
|
14
|
+
selected?: Selected;
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ErrorMessage } from "./ErrorMessage";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { InputTypes } from "./types";
|
|
3
|
+
declare const Input: ({ className, errors, handleChange, handleBlur, onInput, isRequired, id, maxLength, name, placeholder, showError, title, touched, value, type, autocomplete }: InputTypes) => JSX.Element;
|
|
4
|
+
export default Input;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { InputGeneralType } from "./types";
|
|
3
|
+
export type InputDocumentProps = InputGeneralType & {
|
|
4
|
+
identificationTypes: string[];
|
|
5
|
+
};
|
|
6
|
+
declare const InputDocument: ({ className, errors, handleChange, handleBlur, identificationTypes, setFieldValue, title, touched, value, }: InputDocumentProps) => JSX.Element;
|
|
7
|
+
export default InputDocument;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default as Input } from "./Input";
|
|
2
|
+
export { default as InputEconomicSector } from "./InputEconomicSector";
|
|
3
|
+
export { default as InputEmail } from "./InputEmail";
|
|
4
|
+
export { default as InputPassword } from "./InputPassword";
|
|
5
|
+
export { default as InputPhone } from "./InputPhone";
|
|
6
|
+
export { default as InputCountry } from "./InputCountry";
|
|
7
|
+
export { default as InputDocument } from "./InputDocument";
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormikHandlers, FormikErrors, FormikTouched } from "formik";
|
|
3
|
+
export type CountryTypes = {
|
|
4
|
+
title: string;
|
|
5
|
+
Icon: React.ReactNode;
|
|
6
|
+
};
|
|
7
|
+
export type EmailType = {
|
|
8
|
+
title: string;
|
|
9
|
+
};
|
|
10
|
+
export type InputFormik = {
|
|
11
|
+
handleChange: FormikHandlers["handleChange"];
|
|
12
|
+
handleBlur: FormikHandlers["handleBlur"];
|
|
13
|
+
onInput?: (event: any) => any;
|
|
14
|
+
errors?: FormikErrors<any>;
|
|
15
|
+
touched?: FormikTouched<any>;
|
|
16
|
+
};
|
|
17
|
+
export type InputGeneralType = InputFormik & {
|
|
18
|
+
className?: string;
|
|
19
|
+
name?: string;
|
|
20
|
+
title?: string | undefined;
|
|
21
|
+
value?: string | number | any;
|
|
22
|
+
setFieldValue?: any;
|
|
23
|
+
placeholder?: string;
|
|
24
|
+
};
|
|
25
|
+
export type OptionProps = {
|
|
26
|
+
backgroundImage: string;
|
|
27
|
+
};
|
|
28
|
+
export type InputTypes = InputGeneralType & {
|
|
29
|
+
className?: string;
|
|
30
|
+
isRequired: boolean;
|
|
31
|
+
id: string;
|
|
32
|
+
maxLength?: number;
|
|
33
|
+
name: string;
|
|
34
|
+
showError?: boolean;
|
|
35
|
+
placeholder?: string;
|
|
36
|
+
type?: string;
|
|
37
|
+
autocomplete?: string;
|
|
38
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentStory } from '@storybook/react';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: ({ apiUrl, apiKey, country, apiKeySp, loginType, isInIframe, initialStep, success, logEvent, }: import("~/components/Login/types").LoginProps) => JSX.Element;
|
|
6
|
+
};
|
|
7
|
+
export default _default;
|
|
8
|
+
export declare const LoginMobile: ComponentStory<({ apiUrl, apiKey, country, apiKeySp, loginType, isInIframe, initialStep, success, logEvent, }: import("~/components/Login/types").LoginProps) => JSX.Element>;
|
|
9
|
+
export declare const LoginDesktop: ComponentStory<({ apiUrl, apiKey, country, apiKeySp, loginType, isInIframe, initialStep, success, logEvent, }: import("~/components/Login/types").LoginProps) => JSX.Element>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Customer } from '../../types';
|
|
3
|
+
declare const CustomerProfile: ({ customer, handleCloseSession }: {
|
|
4
|
+
customer: Customer | null;
|
|
5
|
+
handleShowProfile: () => void;
|
|
6
|
+
handleCloseSession: () => void;
|
|
7
|
+
}) => JSX.Element;
|
|
8
|
+
export default CustomerProfile;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentStory } from '@storybook/react';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: ({ customer, handleCloseSession }: {
|
|
6
|
+
customer: import("../..").Customer | null;
|
|
7
|
+
handleShowProfile: () => void;
|
|
8
|
+
handleCloseSession: () => void;
|
|
9
|
+
}) => JSX.Element;
|
|
10
|
+
argTypes: {
|
|
11
|
+
customer: {
|
|
12
|
+
firstName: string;
|
|
13
|
+
lastName: string;
|
|
14
|
+
prefixPhone: string;
|
|
15
|
+
phone: string;
|
|
16
|
+
userId: string;
|
|
17
|
+
};
|
|
18
|
+
handleShowProfile: () => void;
|
|
19
|
+
handleCloseSession: () => void;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export default _default;
|
|
23
|
+
export declare const CustomerProfileDefault: ComponentStory<({ customer, handleCloseSession }: {
|
|
24
|
+
customer: import("../..").Customer | null;
|
|
25
|
+
handleShowProfile: () => void;
|
|
26
|
+
handleCloseSession: () => void;
|
|
27
|
+
}) => JSX.Element>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const GetCode: ({ handleStepChange, countries, country, logEvent, apiKey, apiUrl, setStepTo, }: {
|
|
3
|
+
handleStepChange: (step: string, sendTo: string, prefixSendTo: string, type: string) => void;
|
|
4
|
+
countries: any;
|
|
5
|
+
country: any;
|
|
6
|
+
apiKey: string;
|
|
7
|
+
apiUrl: string;
|
|
8
|
+
logEvent: (event: string) => void;
|
|
9
|
+
setStepTo: (step: string) => void;
|
|
10
|
+
}) => JSX.Element;
|
|
11
|
+
export default GetCode;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentStory } from '@storybook/react';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: ({ handleStepChange, countries, country, logEvent, apiKey, apiUrl, setStepTo, }: {
|
|
6
|
+
handleStepChange: (step: string, sendTo: string, prefixSendTo: string, type: string) => void;
|
|
7
|
+
countries: any;
|
|
8
|
+
country: any;
|
|
9
|
+
apiKey: string;
|
|
10
|
+
apiUrl: string;
|
|
11
|
+
logEvent: (event: string) => void;
|
|
12
|
+
setStepTo: (step: string) => void;
|
|
13
|
+
}) => JSX.Element;
|
|
14
|
+
};
|
|
15
|
+
export default _default;
|
|
16
|
+
export declare const GetCodeDefault: ComponentStory<({ handleStepChange, countries, country, logEvent, apiKey, apiUrl, setStepTo, }: {
|
|
17
|
+
handleStepChange: (step: string, sendTo: string, prefixSendTo: string, type: string) => void;
|
|
18
|
+
countries: any;
|
|
19
|
+
country: any;
|
|
20
|
+
apiKey: string;
|
|
21
|
+
apiUrl: string;
|
|
22
|
+
logEvent: (event: string) => void;
|
|
23
|
+
setStepTo: (step: string) => void;
|
|
24
|
+
}) => JSX.Element>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const GetCodeByEmail: ({ handleStepChange, logEvent, apiKey, apiUrl, setStepTo }: {
|
|
3
|
+
handleStepChange: (step: string, sendTo: string, prefixSendTo: string, type: string) => void;
|
|
4
|
+
apiKey: string;
|
|
5
|
+
apiUrl: string;
|
|
6
|
+
logEvent: (event: string) => void;
|
|
7
|
+
setStepTo: (step: string) => void;
|
|
8
|
+
}) => JSX.Element;
|
|
9
|
+
export default GetCodeByEmail;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentStory } from '@storybook/react';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: ({ handleStepChange, logEvent, apiKey, apiUrl, setStepTo }: {
|
|
6
|
+
handleStepChange: (step: string, sendTo: string, prefixSendTo: string, type: string) => void;
|
|
7
|
+
apiKey: string;
|
|
8
|
+
apiUrl: string;
|
|
9
|
+
logEvent: (event: string) => void;
|
|
10
|
+
setStepTo: (step: string) => void;
|
|
11
|
+
}) => JSX.Element;
|
|
12
|
+
};
|
|
13
|
+
export default _default;
|
|
14
|
+
export declare const GetCodeByEmailDefault: ComponentStory<({ handleStepChange, logEvent, apiKey, apiUrl, setStepTo }: {
|
|
15
|
+
handleStepChange: (step: string, sendTo: string, prefixSendTo: string, type: string) => void;
|
|
16
|
+
apiKey: string;
|
|
17
|
+
apiUrl: string;
|
|
18
|
+
logEvent: (event: string) => void;
|
|
19
|
+
setStepTo: (step: string) => void;
|
|
20
|
+
}) => JSX.Element>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentStory } from '@storybook/react';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: () => JSX.Element;
|
|
6
|
+
argTypes: {
|
|
7
|
+
customer: {
|
|
8
|
+
firstName: string;
|
|
9
|
+
lastName: string;
|
|
10
|
+
prefixPhone: string;
|
|
11
|
+
phone: string;
|
|
12
|
+
userId: string;
|
|
13
|
+
};
|
|
14
|
+
handleShowProfile: () => void;
|
|
15
|
+
handleCloseSession: () => void;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export default _default;
|
|
19
|
+
export declare const RegisterInAppDefault: ComponentStory<() => JSX.Element>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type Props = {
|
|
3
|
+
handleBlur: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
4
|
+
handleChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
5
|
+
values: Record<string, string>;
|
|
6
|
+
logEvent: (event: string) => void;
|
|
7
|
+
error: boolean;
|
|
8
|
+
};
|
|
9
|
+
declare const SmsValidation: ({ handleChange, handleBlur, values, logEvent, error }: Props) => JSX.Element;
|
|
10
|
+
export default SmsValidation;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ComponentStory } from '@storybook/react';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: ({ handleChange, handleBlur, values, logEvent, error }: {
|
|
6
|
+
handleBlur: (e: React.FocusEvent<HTMLInputElement, Element>) => void;
|
|
7
|
+
handleChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
8
|
+
values: Record<string, string>;
|
|
9
|
+
logEvent: (event: string) => void;
|
|
10
|
+
error: boolean;
|
|
11
|
+
}) => JSX.Element;
|
|
12
|
+
argTypes: {};
|
|
13
|
+
};
|
|
14
|
+
export default _default;
|
|
15
|
+
export declare const SmsValidationDefault: ComponentStory<({ handleChange, handleBlur, values, logEvent, error }: {
|
|
16
|
+
handleBlur: (e: React.FocusEvent<HTMLInputElement, Element>) => void;
|
|
17
|
+
handleChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
18
|
+
values: Record<string, string>;
|
|
19
|
+
logEvent: (event: string) => void;
|
|
20
|
+
error: boolean;
|
|
21
|
+
}) => JSX.Element>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Customer } from '~/components/Login/types';
|
|
3
|
+
declare const UpdateUserData: ({ handleRegisterMessageView, apiUrl, logEvent, isInIframe }: {
|
|
4
|
+
handleRegisterMessageView: (response: Customer) => void;
|
|
5
|
+
apiUrl: string;
|
|
6
|
+
logEvent: (event: string) => void;
|
|
7
|
+
isInIframe?: boolean | undefined;
|
|
8
|
+
}) => JSX.Element;
|
|
9
|
+
export default UpdateUserData;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentStory } from '@storybook/react';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: ({ handleRegisterMessageView, apiUrl, logEvent, isInIframe }: {
|
|
6
|
+
handleRegisterMessageView: (response: import("../..").Customer) => void;
|
|
7
|
+
apiUrl: string;
|
|
8
|
+
logEvent: (event: string) => void;
|
|
9
|
+
isInIframe?: boolean | undefined;
|
|
10
|
+
}) => JSX.Element;
|
|
11
|
+
argTypes: {};
|
|
12
|
+
};
|
|
13
|
+
export default _default;
|
|
14
|
+
export declare const UpdateUserDataDefault: ComponentStory<({ handleRegisterMessageView, apiUrl, logEvent, isInIframe }: {
|
|
15
|
+
handleRegisterMessageView: (response: import("../..").Customer) => void;
|
|
16
|
+
apiUrl: string;
|
|
17
|
+
logEvent: (event: string) => void;
|
|
18
|
+
isInIframe?: boolean | undefined;
|
|
19
|
+
}) => JSX.Element>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const ValidateCode: ({ validationSuccess, sendTo, prefixSendTo, channel, logEvent, apiKey, apiUrl, setStepTo }: {
|
|
3
|
+
validationSuccess: (token: string, expiresIn: number, refreshToken: string, channel: string) => void;
|
|
4
|
+
sendTo: string;
|
|
5
|
+
prefixSendTo: string;
|
|
6
|
+
channel: string;
|
|
7
|
+
logEvent: (event: string) => void;
|
|
8
|
+
apiKey: string;
|
|
9
|
+
apiUrl: string;
|
|
10
|
+
setStepTo: (step: string) => void;
|
|
11
|
+
}) => JSX.Element;
|
|
12
|
+
export default ValidateCode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const fetcher: (url: string, enVar: string) => Promise<any>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { default as CustomerProfile } from '~/components/Login/components/CustomerProfile/CustomerProfile';
|
|
2
|
+
export { default as GetCode } from '~/components/Login/components/GetCode/GetCode';
|
|
3
|
+
export { default as LoginContainer } from '~/components/Login/components/LoginContainer/LoginContainer';
|
|
4
|
+
export { default as RegisterMessage } from '~/components/Login/components/RegisterMessage/RegisterMessage';
|
|
5
|
+
export { default as SmsValidation } from '~/components/Login/components/SmsValidation/SmsValidation';
|
|
6
|
+
export { default as UpdateUserData } from '~/components/Login/components/UpdateUserData/UpdateUserData';
|
|
7
|
+
export { default as ValidateCode } from '~/components/Login/components/ValidateCode/ValidateCode';
|
|
8
|
+
export { default as RegisterInApp } from '~/components/Login/components/RegisterInApp/RegisterInApp';
|
|
9
|
+
export { default as CheckCircle } from '~/components/Login/icons/CheckCircle';
|
|
10
|
+
export { default as SignOut } from '~/components/Login/icons/SignOut';
|
|
11
|
+
export { default as Profile } from '~/components/Login/icons/Profile';
|
|
12
|
+
export { default as Login } from '~/components/Login/Login';
|
|
13
|
+
export * from "./services";
|
|
14
|
+
export * from '~/components/Login/types';
|
|
15
|
+
export type { Customer, ValidateCodeResponse, LoginProps } from '~/components/Login/types';
|
|
16
|
+
export { LoginSteps, LoginType, SelectMethod } from '~/components/Login/types';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Customer, ValidateCodeResponse } from '~/components/Login/types';
|
|
2
|
+
import { RequestCodePayload } from '~/components/Login/components/GetCode/types';
|
|
3
|
+
export declare const GetCodeService: ({ apiKey, apiUrl, payload }: {
|
|
4
|
+
apiKey: string;
|
|
5
|
+
apiUrl: string;
|
|
6
|
+
payload: RequestCodePayload;
|
|
7
|
+
}) => Promise<any>;
|
|
8
|
+
export declare const ValidateCodeService: ({ sendTo, prefixSendTo, code, apiKey, apiUrl, channel }: {
|
|
9
|
+
sendTo: string;
|
|
10
|
+
prefixSendTo: string;
|
|
11
|
+
code: string;
|
|
12
|
+
apiKey: string;
|
|
13
|
+
apiUrl: string;
|
|
14
|
+
channel: string;
|
|
15
|
+
}) => Promise<{
|
|
16
|
+
data: ValidateCodeResponse;
|
|
17
|
+
status: number;
|
|
18
|
+
}>;
|
|
19
|
+
export declare const UpdateUserDataService: ({ token, firstName, lastName, email, identification, identificationType, postalCode, apiUrl }: {
|
|
20
|
+
token: string;
|
|
21
|
+
firstName: string;
|
|
22
|
+
lastName: string;
|
|
23
|
+
email?: string | undefined;
|
|
24
|
+
identification?: string | undefined;
|
|
25
|
+
identificationType?: string | undefined;
|
|
26
|
+
postalCode?: string | undefined;
|
|
27
|
+
apiUrl: string;
|
|
28
|
+
}) => Promise<Customer>;
|
|
29
|
+
export declare const getUserData: ({ token, apiUrl }: {
|
|
30
|
+
token: string;
|
|
31
|
+
apiUrl: string;
|
|
32
|
+
}) => Promise<Customer>;
|
|
33
|
+
export declare const facebookLogin: ({ token, apiUrl, apiKey }: {
|
|
34
|
+
token: string;
|
|
35
|
+
apiUrl: string;
|
|
36
|
+
apiKey: string;
|
|
37
|
+
}) => Promise<ValidateCodeResponse>;
|
|
38
|
+
export declare const googleLogin: ({ token, apiUrl, apiKey }: {
|
|
39
|
+
token: string;
|
|
40
|
+
apiUrl: string;
|
|
41
|
+
apiKey: string;
|
|
42
|
+
}) => Promise<ValidateCodeResponse>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export declare enum LoginSteps {
|
|
2
|
+
SELECT_LOGIN_METHOD = "select_login_method",
|
|
3
|
+
GET_CODE = "get_code",
|
|
4
|
+
EMAIL = "email",
|
|
5
|
+
VALIDATE_CODE = "pending",
|
|
6
|
+
UPDATE_USER_DATA = "update_user_data",
|
|
7
|
+
REGISTER_MESSAGE = "register_message"
|
|
8
|
+
}
|
|
9
|
+
export declare enum LoginType {
|
|
10
|
+
BUYER = "buyer",
|
|
11
|
+
SELLER = "seller"
|
|
12
|
+
}
|
|
13
|
+
export declare enum SelectMethod {
|
|
14
|
+
EMAIL_METHOD = "email"
|
|
15
|
+
}
|
|
16
|
+
export declare type LoginProps = {
|
|
17
|
+
initialStep: LoginSteps;
|
|
18
|
+
apiKey: string;
|
|
19
|
+
apiUrl: string;
|
|
20
|
+
apiKeySp: string;
|
|
21
|
+
logEvent: (event: string, payload?: {
|
|
22
|
+
[key: string]: string | null;
|
|
23
|
+
} | undefined) => void;
|
|
24
|
+
country: any;
|
|
25
|
+
success?: (loginData?: ValidateCodeResponse) => void;
|
|
26
|
+
loginType: LoginType;
|
|
27
|
+
registerInApp?: boolean;
|
|
28
|
+
isInIframe?: boolean;
|
|
29
|
+
};
|
|
30
|
+
export type ValidateCodeResponse = {
|
|
31
|
+
accessToken: string;
|
|
32
|
+
refreshToken: string;
|
|
33
|
+
expiresIn: number;
|
|
34
|
+
};
|
|
35
|
+
export type Customer = {
|
|
36
|
+
firstName: string;
|
|
37
|
+
lastName: string;
|
|
38
|
+
userId: string;
|
|
39
|
+
prefixPhone?: string;
|
|
40
|
+
phone?: string;
|
|
41
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ModalContextProps } from "./types";
|
|
3
|
+
export declare const Modal: ({ show, children, element, type, showHeader, title, closeElement, className, styles: stylesComponent, content, overlay, header, body, onClose, }: ModalContextProps) => React.ReactPortal | null;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ComponentMeta, ComponentStory } from "@storybook/react";
|
|
3
|
+
declare const _default: ComponentMeta<({ show, children, element, type, showHeader, title, closeElement, className, styles: stylesComponent, content, overlay, header, body, onClose, }: import("./types").ModalContextProps) => React.ReactPortal | null>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Desktop: ComponentStory<({ show, children, element, type, showHeader, title, closeElement, className, styles: stylesComponent, content, overlay, header, body, onClose, }: import("./types").ModalContextProps) => React.ReactPortal | null>;
|
|
6
|
+
export declare const DesktopWithCustomStyles: ComponentStory<({ show, children, element, type, showHeader, title, closeElement, className, styles: stylesComponent, content, overlay, header, body, onClose, }: import("./types").ModalContextProps) => React.ReactPortal | null>;
|
|
7
|
+
export declare const DesktopPopup: ComponentStory<({ show, children, element, type, showHeader, title, closeElement, className, styles: stylesComponent, content, overlay, header, body, onClose, }: import("./types").ModalContextProps) => React.ReactPortal | null>;
|
|
8
|
+
export declare const Mobile: ComponentStory<({ show, children, element, type, showHeader, title, closeElement, className, styles: stylesComponent, content, overlay, header, body, onClose, }: import("./types").ModalContextProps) => React.ReactPortal | null>;
|
|
9
|
+
export declare const MobilePopup: ComponentStory<({ show, children, element, type, showHeader, title, closeElement, className, styles: stylesComponent, content, overlay, header, body, onClose, }: import("./types").ModalContextProps) => React.ReactPortal | null>;
|
|
10
|
+
export declare const MobileButton: ComponentStory<({ show, children, element, type, showHeader, title, closeElement, className, styles: stylesComponent, content, overlay, header, body, onClose, }: import("./types").ModalContextProps) => React.ReactPortal | null>;
|
|
11
|
+
export declare const MobileButtonInDesktopView: ComponentStory<({ show, children, element, type, showHeader, title, closeElement, className, styles: stylesComponent, content, overlay, header, body, onClose, }: import("./types").ModalContextProps) => React.ReactPortal | null>;
|
|
12
|
+
export declare const ModalWithCustomCloseElement: ComponentStory<({ show, children, element, type, showHeader, title, closeElement, className, styles: stylesComponent, content, overlay, header, body, onClose, }: import("./types").ModalContextProps) => React.ReactPortal | null>;
|
|
13
|
+
export declare const DesktopWithTop: ComponentStory<({ show, children, element, type, showHeader, title, closeElement, className, styles: stylesComponent, content, overlay, header, body, onClose, }: import("./types").ModalContextProps) => React.ReactPortal | null>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Modal } from "./Modal";
|