@openhive-eu/payment 1.0.0-next.11 → 1.0.0-next.13

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.
Binary file
@@ -18,6 +18,5 @@ export type Translations = {
18
18
  textMessage: string;
19
19
  email: string;
20
20
  errorFallback: string;
21
- submitError: string;
22
21
  };
23
22
  export declare const getTranslations: (locale: string) => Translations;
@@ -25,7 +25,6 @@ export declare class PaymentWidget extends LitElement {
25
25
  private _country;
26
26
  private _loading;
27
27
  private _success;
28
- private _submitError;
29
28
  private _paymentMethods;
30
29
  private _methodsLoading;
31
30
  private _methodsError;
@@ -46,8 +45,6 @@ export declare class PaymentWidget extends LitElement {
46
45
  private _onPhoneInput;
47
46
  private _onCountryChange;
48
47
  private _onSubmit;
49
- reportSuccess(): void;
50
- reportError(message?: string): void;
51
48
  private _onClose;
52
49
  private _renderMethods;
53
50
  private _renderChannels;
@@ -1,40 +1,10 @@
1
- import React from "react";
1
+ import { type EventName } from "@lit/react";
2
+ import { PaymentWidget } from "./payment-widget";
2
3
  import "./register";
3
- import type { RequestToPay, Currency } from "./lib/api-client";
4
- import type { PayClientInterface } from "./lib/pay-client";
5
- export type { RequestToPay, Currency };
6
- export type { PayClientInterface };
7
- declare module "react" {
8
- namespace JSX {
9
- interface IntrinsicElements {
10
- "openhive-pay": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement> & {
11
- token?: string;
12
- currency?: string;
13
- "default-amount"?: string;
14
- "default-reference"?: string;
15
- "read-only-amount"?: string;
16
- "customer-name"?: string;
17
- "customer-email"?: string;
18
- "customer-phone"?: string;
19
- locale?: string;
20
- }, HTMLElement>;
21
- }
22
- }
23
- }
24
- export interface PaymentProps {
25
- token?: string;
26
- currency?: Currency;
27
- defaultAmount?: string;
28
- defaultReference?: string;
29
- readOnlyAmount?: boolean;
30
- customerName?: string;
31
- customerEmail?: string;
32
- customerPhone?: string;
33
- locale?: string;
34
- payClient?: PayClientInterface;
35
- onRequestToPay?: (detail: RequestToPay) => void | Promise<void>;
36
- onClose?: () => void;
37
- className?: string;
38
- style?: React.CSSProperties;
39
- }
40
- export declare function Payment({ token, currency, defaultAmount, defaultReference, readOnlyAmount, customerName, customerEmail, customerPhone, locale, payClient, onRequestToPay, onClose, className, style, }: PaymentProps): import("react/jsx-runtime").JSX.Element;
4
+ export type { RequestToPay, Currency } from "./lib/api-client";
5
+ export type { PayClientInterface } from "./lib/pay-client";
6
+ import type { RequestToPay } from "./lib/api-client";
7
+ export declare const Payment: import("@lit/react").ReactWebComponent<PaymentWidget, {
8
+ onRequestToPay: EventName<CustomEvent<RequestToPay>>;
9
+ onClose: EventName<Event>;
10
+ }>;