@alma/widgets 3.3.12 → 4.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/README.md +1 -1
- package/dist/types/{Widgets → src/Widgets}/EligibilityModal/DesktopModal/index.d.ts +9 -9
- package/dist/types/{Widgets → src/Widgets}/EligibilityModal/MobileModal/index.d.ts +9 -9
- package/dist/types/{Widgets → src/Widgets}/EligibilityModal/ModalContainer.d.ts +16 -16
- package/dist/types/{Widgets → src/Widgets}/EligibilityModal/ModalContainer.test.d.ts +1 -1
- package/dist/types/{Widgets/PaymentPlans → src/Widgets/EligibilityModal}/__tests__/Basics.test.d.ts +1 -1
- package/dist/types/{Widgets → src/Widgets}/EligibilityModal/__tests__/Cards.test.d.ts +1 -1
- package/dist/types/{Widgets → src/Widgets}/EligibilityModal/__tests__/ModalContainer.test.d.ts +1 -1
- package/dist/types/{Widgets → src/Widgets}/EligibilityModal/__tests__/Plans.test.d.ts +1 -1
- package/dist/types/{Widgets → src/Widgets}/EligibilityModal/__tests__/Schedule.test.d.ts +1 -1
- package/dist/types/{Widgets → src/Widgets}/EligibilityModal/classNames.const.d.ts +23 -23
- package/dist/types/src/Widgets/EligibilityModal/components/Cards/index.d.ts +7 -0
- package/dist/types/{Widgets → src/Widgets}/EligibilityModal/components/EligibilityPlansButtons/index.d.ts +8 -8
- package/dist/types/{Widgets → src/Widgets}/EligibilityModal/components/Info/index.d.ts +5 -5
- package/dist/types/src/Widgets/EligibilityModal/components/Schedule/index.d.ts +6 -0
- package/dist/types/{Widgets → src/Widgets}/EligibilityModal/components/Title/index.d.ts +6 -6
- package/dist/types/{Widgets → src/Widgets}/EligibilityModal/index.d.ts +11 -11
- package/dist/types/{Widgets/EligibilityModal → src/Widgets/PaymentPlans}/__tests__/Basics.test.d.ts +1 -1
- package/dist/types/{Widgets → src/Widgets}/PaymentPlans/__tests__/Credit.test.d.ts +1 -1
- package/dist/types/{Widgets → src/Widgets}/PaymentPlans/__tests__/CustomTransitionDelay.test.d.ts +1 -1
- package/dist/types/{Widgets → src/Widgets}/PaymentPlans/__tests__/HideBorder.test.d.ts +1 -1
- package/dist/types/{Widgets → src/Widgets}/PaymentPlans/__tests__/HideWidget.test.d.ts +1 -1
- package/dist/types/{Widgets → src/Widgets}/PaymentPlans/__tests__/IneligibleOptions.test.d.ts +1 -1
- package/dist/types/{Widgets → src/Widgets}/PaymentPlans/__tests__/LanguageCheck.test.d.ts +1 -1
- package/dist/types/{Widgets → src/Widgets}/PaymentPlans/__tests__/LaunchModal.test.d.ts +1 -1
- package/dist/types/{Widgets → src/Widgets}/PaymentPlans/__tests__/Monochrome.test.d.ts +1 -1
- package/dist/types/{Widgets → src/Widgets}/PaymentPlans/__tests__/PaymentPlanContainer.test.d.ts +1 -1
- package/dist/types/{Widgets → src/Widgets}/PaymentPlans/__tests__/SuggestedPaymentPlan.test.d.ts +1 -1
- package/dist/types/{Widgets → src/Widgets}/PaymentPlans/__tests__/WithoutPlans.test.d.ts +1 -1
- package/dist/types/{Widgets → src/Widgets}/PaymentPlans/classNames.const.d.ts +13 -13
- package/dist/types/{Widgets → src/Widgets}/PaymentPlans/index.d.ts +18 -18
- package/dist/types/{assets → src/assets}/Cross.d.ts +5 -6
- package/dist/types/{assets → src/assets}/almaLogo.d.ts +6 -6
- package/dist/types/{assets → src/assets}/cards/amex.d.ts +3 -3
- package/dist/types/{assets → src/assets}/cards/cb.d.ts +3 -3
- package/dist/types/{assets → src/assets}/cards/mastercard.d.ts +3 -3
- package/dist/types/{assets → src/assets}/cards/visa.d.ts +3 -3
- package/dist/types/{components → src/components}/Installments/Installment/index.d.ts +8 -8
- package/dist/types/src/components/Installments/TotalBlock/index.d.ts +6 -0
- package/dist/types/src/components/Loader/index.d.ts +5 -0
- package/dist/types/src/components/LoadingIndicator/LoadingIndicator.d.ts +4 -0
- package/dist/types/{components → src/components}/Modal/index.d.ts +12 -12
- package/dist/types/{consts.d.ts → src/consts.d.ts} +6 -6
- package/dist/types/{hooks → src/hooks}/useButtonAnimation.d.ts +7 -7
- package/dist/types/src/hooks/useFetchEligibility.d.ts +3 -0
- package/dist/types/{hooks → src/hooks}/useSessionStorage.d.ts +20 -20
- package/dist/types/{hooks → src/hooks}/useSessionStorage.test.d.ts +1 -1
- package/dist/types/{index.d.ts → src/index.d.ts} +16 -18
- package/dist/types/{intl → src/intl}/IntlProvider.d.ts +8 -8
- package/dist/types/src/intl/messages/messages.de.json.d.ts +35 -0
- package/dist/types/src/intl/messages/messages.en.json.d.ts +35 -0
- package/dist/types/src/intl/messages/messages.es.json.d.ts +35 -0
- package/dist/types/src/intl/messages/messages.fr.json.d.ts +35 -0
- package/dist/types/src/intl/messages/messages.it.json.d.ts +35 -0
- package/dist/types/src/intl/messages/messages.nl.json.d.ts +35 -0
- package/dist/types/src/intl/messages/messages.pt.json.d.ts +35 -0
- package/dist/types/{intl → src/intl}/utils.d.ts +2 -2
- package/dist/types/src/setupTests.d.ts +0 -0
- package/dist/types/{types.d.ts → src/types.d.ts} +97 -97
- package/dist/types/src/utils/fetch.d.ts +6 -0
- package/dist/types/{utils → src/utils}/filterEligibility.d.ts +3 -3
- package/dist/types/{utils → src/utils}/index.d.ts +7 -7
- package/dist/types/{utils → src/utils}/index.test.d.ts +1 -1
- package/dist/types/{utils → src/utils}/merchantOrderPreferences.d.ts +14 -14
- package/dist/types/{utils → src/utils}/paymentPlanStrings.d.ts +4 -4
- package/dist/types/{utils → src/utils}/utilsForStorage.d.ts +2 -2
- package/dist/types/{utils → src/utils}/utilsForStorage.test.d.ts +1 -1
- package/dist/types/src/widgets_controller.d.ts +15 -0
- package/dist/types/vite.config.d.ts +2 -0
- package/dist/widgets-wc.umd.js +55 -1
- package/dist/widgets-wc.umd.js.map +1 -1
- package/dist/widgets.css +1 -15
- package/dist/widgets.js +7332 -1
- package/dist/widgets.js.map +1 -1
- package/dist/widgets.min.css +1 -0
- package/dist/widgets.umd.js +55 -1
- package/dist/widgets.umd.js.map +1 -1
- package/package.json +14 -8
- package/dist/raw/widgets-wc.umd.js +0 -17907
- package/dist/raw/widgets.css +0 -557
- package/dist/raw/widgets.js +0 -3358
- package/dist/raw/widgets.js.map +0 -1
- package/dist/raw/widgets.m.js +0 -3362
- package/dist/raw/widgets.m.js.map +0 -1
- package/dist/raw/widgets.modern.js +0 -3296
- package/dist/raw/widgets.modern.js.map +0 -1
- package/dist/raw/widgets.umd.js +0 -17907
- package/dist/raw/widgets.umd.js.map +0 -1
- package/dist/types/Widgets/EligibilityModal/components/Cards/index.d.ts +0 -7
- package/dist/types/Widgets/EligibilityModal/components/Schedule/index.d.ts +0 -6
- package/dist/types/components/Installments/TotalBlock/index.d.ts +0 -6
- package/dist/types/components/Loader/index.d.ts +0 -5
- package/dist/types/components/LoadingIndicator/LoadingIndicator.d.ts +0 -4
- package/dist/types/hooks/useFetchEligibility.d.ts +0 -3
- package/dist/types/setupTests.d.ts +0 -1
- package/dist/types/utils/fetch.d.ts +0 -6
- package/dist/types/widgets_controller.d.ts +0 -15
- package/dist/widgets.m.js +0 -2
- package/dist/widgets.m.js.map +0 -1
- package/dist/widgets.modern.js +0 -2
- package/dist/widgets.modern.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { FC } from '
|
|
2
|
-
import { Card } from 'types';
|
|
3
|
-
|
|
4
|
-
isCurrentPlanP1X: boolean;
|
|
5
|
-
isSomePlanDeferred: boolean;
|
|
6
|
-
cards?: Card[];
|
|
7
|
-
};
|
|
8
|
-
declare const DesktopModal: FC<Props>;
|
|
9
|
-
export default DesktopModal;
|
|
1
|
+
import { FC, PropsWithChildren } from '../../../../preact/compat';
|
|
2
|
+
import { Card } from '../../../types';
|
|
3
|
+
type Props = {
|
|
4
|
+
isCurrentPlanP1X: boolean;
|
|
5
|
+
isSomePlanDeferred: boolean;
|
|
6
|
+
cards?: Card[];
|
|
7
|
+
} & PropsWithChildren;
|
|
8
|
+
declare const DesktopModal: FC<Props>;
|
|
9
|
+
export default DesktopModal;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { FC } from '
|
|
2
|
-
import { Card } from 'types';
|
|
3
|
-
|
|
4
|
-
isCurrentPlanP1X: boolean;
|
|
5
|
-
isSomePlanDeferred: boolean;
|
|
6
|
-
cards?: Card[];
|
|
7
|
-
};
|
|
8
|
-
declare const MobileModal: FC<Props>;
|
|
9
|
-
export default MobileModal;
|
|
1
|
+
import { FC, PropsWithChildren } from '../../../../preact/compat';
|
|
2
|
+
import { Card } from '../../../types';
|
|
3
|
+
type Props = {
|
|
4
|
+
isCurrentPlanP1X: boolean;
|
|
5
|
+
isSomePlanDeferred: boolean;
|
|
6
|
+
cards?: Card[];
|
|
7
|
+
} & PropsWithChildren;
|
|
8
|
+
declare const MobileModal: FC<Props>;
|
|
9
|
+
export default MobileModal;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import React from '
|
|
2
|
-
import { ApiConfig, Card, ConfigPlan } from 'types';
|
|
3
|
-
|
|
4
|
-
purchaseAmount: number;
|
|
5
|
-
apiData: ApiConfig;
|
|
6
|
-
configPlans?: ConfigPlan[];
|
|
7
|
-
customerBillingCountry?: string;
|
|
8
|
-
customerShippingCountry?: string;
|
|
9
|
-
onClose: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
10
|
-
cards?: Card[];
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* This component allows to display only the modal, without PaymentPlans.
|
|
14
|
-
*/
|
|
15
|
-
declare const ModalContainer: React.FC<Props>;
|
|
16
|
-
export
|
|
1
|
+
import { default as React } from '../../../preact/compat';
|
|
2
|
+
import { ApiConfig, Card, ConfigPlan } from '../../types';
|
|
3
|
+
type Props = {
|
|
4
|
+
purchaseAmount: number;
|
|
5
|
+
apiData: ApiConfig;
|
|
6
|
+
configPlans?: ConfigPlan[];
|
|
7
|
+
customerBillingCountry?: string;
|
|
8
|
+
customerShippingCountry?: string;
|
|
9
|
+
onClose: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
10
|
+
cards?: Card[];
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* This component allows to display only the modal, without PaymentPlans.
|
|
14
|
+
*/
|
|
15
|
+
declare const ModalContainer: React.FC<Props>;
|
|
16
|
+
export { ModalContainer };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
package/dist/types/{Widgets/PaymentPlans → src/Widgets/EligibilityModal}/__tests__/Basics.test.d.ts
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
package/dist/types/{Widgets → src/Widgets}/EligibilityModal/__tests__/ModalContainer.test.d.ts
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Class names for the **eligibility modale** widget.
|
|
3
|
-
* Those classes are intended to be used by the **merchant developer**.
|
|
4
|
-
*/
|
|
5
|
-
declare const STATIC_CUSTOMISATION_CLASSES: {
|
|
6
|
-
desktopModal: string;
|
|
7
|
-
mobileModal: string;
|
|
8
|
-
leftSide: string;
|
|
9
|
-
bullet: string;
|
|
10
|
-
rightSide: string;
|
|
11
|
-
title: string;
|
|
12
|
-
info: string;
|
|
13
|
-
infoMessage: string;
|
|
14
|
-
eligibilityOptions: string;
|
|
15
|
-
activeOption: string;
|
|
16
|
-
closeButton: string;
|
|
17
|
-
scheduleDetails: string;
|
|
18
|
-
scheduleTotal: string;
|
|
19
|
-
scheduleCredit: string;
|
|
20
|
-
cardContainer: string;
|
|
21
|
-
summary: string;
|
|
22
|
-
};
|
|
23
|
-
export default STATIC_CUSTOMISATION_CLASSES;
|
|
1
|
+
/**
|
|
2
|
+
* Class names for the **eligibility modale** widget.
|
|
3
|
+
* Those classes are intended to be used by the **merchant developer**.
|
|
4
|
+
*/
|
|
5
|
+
declare const STATIC_CUSTOMISATION_CLASSES: {
|
|
6
|
+
desktopModal: string;
|
|
7
|
+
mobileModal: string;
|
|
8
|
+
leftSide: string;
|
|
9
|
+
bullet: string;
|
|
10
|
+
rightSide: string;
|
|
11
|
+
title: string;
|
|
12
|
+
info: string;
|
|
13
|
+
infoMessage: string;
|
|
14
|
+
eligibilityOptions: string;
|
|
15
|
+
activeOption: string;
|
|
16
|
+
closeButton: string;
|
|
17
|
+
scheduleDetails: string;
|
|
18
|
+
scheduleTotal: string;
|
|
19
|
+
scheduleCredit: string;
|
|
20
|
+
cardContainer: string;
|
|
21
|
+
summary: string;
|
|
22
|
+
};
|
|
23
|
+
export default STATIC_CUSTOMISATION_CLASSES;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { FC } from '
|
|
2
|
-
import { EligibilityPlan } from 'types';
|
|
3
|
-
declare const EligibilityPlansButtons: FC<{
|
|
4
|
-
eligibilityPlans: EligibilityPlan[];
|
|
5
|
-
currentPlanIndex: number;
|
|
6
|
-
setCurrentPlanIndex: (index: number) => void;
|
|
7
|
-
}>;
|
|
8
|
-
export default EligibilityPlansButtons;
|
|
1
|
+
import { FC } from '../../../../../preact/compat';
|
|
2
|
+
import { EligibilityPlan } from '../../../../types';
|
|
3
|
+
declare const EligibilityPlansButtons: FC<{
|
|
4
|
+
eligibilityPlans: EligibilityPlan[];
|
|
5
|
+
currentPlanIndex: number;
|
|
6
|
+
setCurrentPlanIndex: (index: number) => void;
|
|
7
|
+
}>;
|
|
8
|
+
export default EligibilityPlansButtons;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FC } from '
|
|
2
|
-
declare const Info: FC<{
|
|
3
|
-
isCurrentPlanP1X: boolean;
|
|
4
|
-
}>;
|
|
5
|
-
export default Info;
|
|
1
|
+
import { FC } from '../../../../../preact/compat';
|
|
2
|
+
declare const Info: FC<{
|
|
3
|
+
isCurrentPlanP1X: boolean;
|
|
4
|
+
}>;
|
|
5
|
+
export default Info;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FC } from '
|
|
2
|
-
declare const Title: FC<{
|
|
3
|
-
isSomePlanDeferred: boolean;
|
|
4
|
-
isCurrentPlanP1X: boolean;
|
|
5
|
-
}>;
|
|
6
|
-
export default Title;
|
|
1
|
+
import { FC } from '../../../../../preact/compat';
|
|
2
|
+
declare const Title: FC<{
|
|
3
|
+
isSomePlanDeferred: boolean;
|
|
4
|
+
isCurrentPlanP1X: boolean;
|
|
5
|
+
}>;
|
|
6
|
+
export default Title;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import React,
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
initialPlanIndex?: number;
|
|
5
|
-
onClose: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
6
|
-
eligibilityPlans: EligibilityPlan[];
|
|
7
|
-
status: statusResponse;
|
|
8
|
-
cards?: Card[];
|
|
9
|
-
};
|
|
10
|
-
declare const EligibilityModal: FunctionComponent<Props>;
|
|
11
|
-
export default EligibilityModal;
|
|
1
|
+
import { default as React, FunctionComponent } from '../../../preact/compat';
|
|
2
|
+
import { Card, EligibilityPlan, statusResponse } from '../../types';
|
|
3
|
+
type Props = {
|
|
4
|
+
initialPlanIndex?: number;
|
|
5
|
+
onClose: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
6
|
+
eligibilityPlans: EligibilityPlan[];
|
|
7
|
+
status: statusResponse;
|
|
8
|
+
cards?: Card[];
|
|
9
|
+
};
|
|
10
|
+
declare const EligibilityModal: FunctionComponent<Props>;
|
|
11
|
+
export default EligibilityModal;
|
package/dist/types/{Widgets/EligibilityModal → src/Widgets/PaymentPlans}/__tests__/Basics.test.d.ts
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
package/dist/types/{Widgets → src/Widgets}/PaymentPlans/__tests__/CustomTransitionDelay.test.d.ts
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
package/dist/types/{Widgets → src/Widgets}/PaymentPlans/__tests__/IneligibleOptions.test.d.ts
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
package/dist/types/{Widgets → src/Widgets}/PaymentPlans/__tests__/PaymentPlanContainer.test.d.ts
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
package/dist/types/{Widgets → src/Widgets}/PaymentPlans/__tests__/SuggestedPaymentPlan.test.d.ts
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Class names for the **payment plans** widget.
|
|
3
|
-
* Those classes are intended to be used by the **merchant developer**.
|
|
4
|
-
*/
|
|
5
|
-
declare const STATIC_CUSTOMISATION_CLASSES: {
|
|
6
|
-
container: string;
|
|
7
|
-
eligibilityLine: string;
|
|
8
|
-
eligibilityOptions: string;
|
|
9
|
-
notEligibleOption: string;
|
|
10
|
-
paymentInfo: string;
|
|
11
|
-
activeOption: string;
|
|
12
|
-
};
|
|
13
|
-
export default STATIC_CUSTOMISATION_CLASSES;
|
|
1
|
+
/**
|
|
2
|
+
* Class names for the **payment plans** widget.
|
|
3
|
+
* Those classes are intended to be used by the **merchant developer**.
|
|
4
|
+
*/
|
|
5
|
+
declare const STATIC_CUSTOMISATION_CLASSES: {
|
|
6
|
+
container: string;
|
|
7
|
+
eligibilityLine: string;
|
|
8
|
+
eligibilityOptions: string;
|
|
9
|
+
notEligibleOption: string;
|
|
10
|
+
paymentInfo: string;
|
|
11
|
+
activeOption: string;
|
|
12
|
+
};
|
|
13
|
+
export default STATIC_CUSTOMISATION_CLASSES;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import React,
|
|
2
|
-
import { ApiConfig, Card, ConfigPlan } from 'types';
|
|
3
|
-
|
|
4
|
-
purchaseAmount: number;
|
|
5
|
-
apiData: ApiConfig;
|
|
6
|
-
configPlans?: ConfigPlan[];
|
|
7
|
-
transitionDelay?: number;
|
|
8
|
-
customerBillingCountry?: string;
|
|
9
|
-
customerShippingCountry?: string;
|
|
10
|
-
hideIfNotEligible?: boolean;
|
|
11
|
-
monochrome?: boolean;
|
|
12
|
-
suggestedPaymentPlan?: number | number[];
|
|
13
|
-
cards?: Card[];
|
|
14
|
-
hideBorder?: boolean;
|
|
15
|
-
onModalClose?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
16
|
-
};
|
|
17
|
-
declare const PaymentPlanWidget:
|
|
18
|
-
export default PaymentPlanWidget;
|
|
1
|
+
import { default as React, FunctionComponent } from '../../../preact/compat';
|
|
2
|
+
import { ApiConfig, Card, ConfigPlan } from '../../types';
|
|
3
|
+
type Props = {
|
|
4
|
+
purchaseAmount: number;
|
|
5
|
+
apiData: ApiConfig;
|
|
6
|
+
configPlans?: ConfigPlan[];
|
|
7
|
+
transitionDelay?: number;
|
|
8
|
+
customerBillingCountry?: string;
|
|
9
|
+
customerShippingCountry?: string;
|
|
10
|
+
hideIfNotEligible?: boolean;
|
|
11
|
+
monochrome?: boolean;
|
|
12
|
+
suggestedPaymentPlan?: number | number[];
|
|
13
|
+
cards?: Card[];
|
|
14
|
+
hideBorder?: boolean;
|
|
15
|
+
onModalClose?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
16
|
+
};
|
|
17
|
+
declare const PaymentPlanWidget: FunctionComponent<Props>;
|
|
18
|
+
export default PaymentPlanWidget;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export default CrossIcon;
|
|
1
|
+
declare function CrossIcon({ color, className, }: {
|
|
2
|
+
color?: string;
|
|
3
|
+
className?: string;
|
|
4
|
+
}): JSX.Element;
|
|
5
|
+
export default CrossIcon;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SVGAttributes, VoidFunctionComponent } from '
|
|
2
|
-
|
|
3
|
-
color?: string;
|
|
4
|
-
} & SVGAttributes<SVGElement>;
|
|
5
|
-
export declare const AlmaLogo: VoidFunctionComponent<Props>;
|
|
6
|
-
export {};
|
|
1
|
+
import { SVGAttributes, VoidFunctionComponent } from '../../preact/compat';
|
|
2
|
+
type Props = {
|
|
3
|
+
color?: string;
|
|
4
|
+
} & SVGAttributes<SVGElement>;
|
|
5
|
+
export declare const AlmaLogo: VoidFunctionComponent<Props>;
|
|
6
|
+
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { FC } from '
|
|
2
|
-
declare const AmexCard: FC;
|
|
3
|
-
export default AmexCard;
|
|
1
|
+
import { FC } from '../../../preact/compat';
|
|
2
|
+
declare const AmexCard: FC;
|
|
3
|
+
export default AmexCard;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { FC } from '
|
|
2
|
-
declare const CbCard: FC;
|
|
3
|
-
export default CbCard;
|
|
1
|
+
import { FC } from '../../../preact/compat';
|
|
2
|
+
declare const CbCard: FC;
|
|
3
|
+
export default CbCard;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { FC } from '
|
|
2
|
-
declare const MasterCard: FC;
|
|
3
|
-
export default MasterCard;
|
|
1
|
+
import { FC } from '../../../preact/compat';
|
|
2
|
+
declare const MasterCard: FC;
|
|
3
|
+
export default MasterCard;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { FC } from '
|
|
2
|
-
declare const VisaCard: FC;
|
|
3
|
-
export default VisaCard;
|
|
1
|
+
import { FC } from '../../../preact/compat';
|
|
2
|
+
declare const VisaCard: FC;
|
|
3
|
+
export default VisaCard;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { FC } from '
|
|
2
|
-
import { PaymentPlan } from 'types';
|
|
3
|
-
|
|
4
|
-
installment: PaymentPlan;
|
|
5
|
-
index: number;
|
|
6
|
-
};
|
|
7
|
-
declare const Installment: FC<Props>;
|
|
8
|
-
export default Installment;
|
|
1
|
+
import { FC } from '../../../../preact/compat';
|
|
2
|
+
import { PaymentPlan } from '../../../types';
|
|
3
|
+
type Props = {
|
|
4
|
+
installment: PaymentPlan;
|
|
5
|
+
index: number;
|
|
6
|
+
};
|
|
7
|
+
declare const Installment: FC<Props>;
|
|
8
|
+
export default Installment;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import React,
|
|
2
|
-
import Modal from 'react-modal';
|
|
3
|
-
export
|
|
4
|
-
children: ReactNode;
|
|
5
|
-
isOpen: boolean;
|
|
6
|
-
onClose: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
7
|
-
className?: string;
|
|
8
|
-
contentClassName?: string;
|
|
9
|
-
scrollable?: boolean;
|
|
10
|
-
};
|
|
11
|
-
declare const ControlledModal: FunctionComponent<Props>;
|
|
12
|
-
export default ControlledModal;
|
|
1
|
+
import { default as React, FunctionComponent, ReactNode } from '../../../preact/compat';
|
|
2
|
+
import { default as Modal } from 'react-modal';
|
|
3
|
+
export type Props = Modal.Props & {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
onClose: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
7
|
+
className?: string;
|
|
8
|
+
contentClassName?: string;
|
|
9
|
+
scrollable?: boolean;
|
|
10
|
+
};
|
|
11
|
+
declare const ControlledModal: FunctionComponent<Props>;
|
|
12
|
+
export default ControlledModal;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare const SANDBOX_API_URL = "https://api.sandbox.getalma.eu";
|
|
2
|
-
export declare const LIVE_API_URL = "https://api.getalma.eu";
|
|
3
|
-
export declare enum ApiMode {
|
|
4
|
-
LIVE = "https://api.getalma.eu",
|
|
5
|
-
TEST = "https://api.sandbox.getalma.eu"
|
|
6
|
-
}
|
|
1
|
+
export declare const SANDBOX_API_URL = "https://api.sandbox.getalma.eu";
|
|
2
|
+
export declare const LIVE_API_URL = "https://api.getalma.eu";
|
|
3
|
+
export declare enum ApiMode {
|
|
4
|
+
LIVE = "https://api.getalma.eu",
|
|
5
|
+
TEST = "https://api.sandbox.getalma.eu"
|
|
6
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
current: number;
|
|
3
|
-
onHover: (current: number) => void;
|
|
4
|
-
onLeave: () => void;
|
|
5
|
-
};
|
|
6
|
-
declare const useButtonAnimation: (iterateValues: number[], transitionDelay: number) => Props;
|
|
7
|
-
export default useButtonAnimation;
|
|
1
|
+
type Props = {
|
|
2
|
+
current: number;
|
|
3
|
+
onHover: (current: number) => void;
|
|
4
|
+
onLeave: () => void;
|
|
5
|
+
};
|
|
6
|
+
declare const useButtonAnimation: (iterateValues: number[], transitionDelay: number) => Props;
|
|
7
|
+
export default useButtonAnimation;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ApiConfig, ConfigPlan, EligibilityPlan, statusResponse } from '../types';
|
|
2
|
+
declare const useFetchEligibility: (purchaseAmount: number, { domain, merchantId }: ApiConfig, plans?: ConfigPlan[], customerBillingCountry?: string, customerShippingCountry?: string) => [EligibilityPlan[], statusResponse];
|
|
3
|
+
export default useFetchEligibility;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { ConfigPlan, EligibilityPlan } from 'types';
|
|
2
|
-
|
|
3
|
-
purchaseAmount: number;
|
|
4
|
-
plans?: ConfigPlan[];
|
|
5
|
-
customerBillingCountry?: string;
|
|
6
|
-
customerShippingCountry?: string;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
value: EligibilityPlan[];
|
|
10
|
-
timestamp: number;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
getCache: (key: string) => StorageType | null;
|
|
14
|
-
setCache: (key: string, value: EligibilityPlan[]) => void;
|
|
15
|
-
clearCache: () => void;
|
|
16
|
-
deleteCache: (key: string) => void;
|
|
17
|
-
createKey: (params: CreateKeyType) => string;
|
|
18
|
-
};
|
|
19
|
-
export declare const useSessionStorage: () => UseSessionStorageType;
|
|
20
|
-
export {};
|
|
1
|
+
import { ConfigPlan, EligibilityPlan } from '../types';
|
|
2
|
+
type CreateKeyType = {
|
|
3
|
+
purchaseAmount: number;
|
|
4
|
+
plans?: ConfigPlan[];
|
|
5
|
+
customerBillingCountry?: string;
|
|
6
|
+
customerShippingCountry?: string;
|
|
7
|
+
};
|
|
8
|
+
type StorageType = {
|
|
9
|
+
value: EligibilityPlan[];
|
|
10
|
+
timestamp: number;
|
|
11
|
+
};
|
|
12
|
+
type UseSessionStorageType = {
|
|
13
|
+
getCache: (key: string) => StorageType | null;
|
|
14
|
+
setCache: (key: string, value: EligibilityPlan[]) => void;
|
|
15
|
+
clearCache: () => void;
|
|
16
|
+
deleteCache: (key: string) => void;
|
|
17
|
+
createKey: (params: CreateKeyType) => string;
|
|
18
|
+
};
|
|
19
|
+
export declare const useSessionStorage: () => UseSessionStorageType;
|
|
20
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { widgetTypes } from 'types';
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
export { ApiMode } from './consts';
|
|
1
|
+
import { ApiMode } from './consts';
|
|
2
|
+
import { widgetTypes } from './types';
|
|
3
|
+
import * as utils from '@/utils';
|
|
4
|
+
export declare namespace Widgets {
|
|
5
|
+
function initialize(merchantId: string, mode: ApiMode): {
|
|
6
|
+
add: (widget: import("@/types").WidgetNames, options: import("@/types").WidgetOptions) => import("@/widgets_controller").AddReturnType;
|
|
7
|
+
};
|
|
8
|
+
const PaymentPlans = widgetTypes.PaymentPlans;
|
|
9
|
+
const Modal = widgetTypes.Modal;
|
|
10
|
+
}
|
|
11
|
+
export declare namespace Utils {
|
|
12
|
+
const priceToCents: typeof utils.priceToCents;
|
|
13
|
+
const priceFromCents: typeof utils.priceFromCents;
|
|
14
|
+
const formatCents: typeof utils.formatCents;
|
|
15
|
+
}
|
|
16
|
+
export { ApiMode } from './consts';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { FC, ReactNode } from '
|
|
2
|
-
import { Locale } from 'types';
|
|
3
|
-
|
|
4
|
-
children: ReactNode;
|
|
5
|
-
locale: Locale;
|
|
6
|
-
};
|
|
7
|
-
declare const Provider: FC<Props>;
|
|
8
|
-
export default Provider;
|
|
1
|
+
import { FC, ReactNode } from '../../preact/compat';
|
|
2
|
+
import { Locale } from '../types';
|
|
3
|
+
type Props = {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
locale: Locale;
|
|
6
|
+
};
|
|
7
|
+
declare const Provider: FC<Props>;
|
|
8
|
+
export default Provider;
|