New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

@power-elements/stripe-elements

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@power-elements/stripe-elements - npm Package Compare versions

Comparing version 2.2.1 to 2.2.2

@@ -0,1 +1,8 @@

## [2.2.2](https://github.com/bennypowers/stripe-elements/compare/v2.2.1...v2.2.2) (2020-01-27)
### Bug Fixes
* fix typescript typings ([f3cb81e](https://github.com/bennypowers/stripe-elements/commit/f3cb81ed864fc5f5548c9236b82d1d075c5357fc))
# Changelog

@@ -2,0 +9,0 @@

@@ -98,3 +98,3 @@ {

"description": "The `client_secret` part of a Stripe `PaymentIntent`",
"type": "String"
"type": "string"
},

@@ -296,3 +296,3 @@ {

"description": "The `client_secret` part of a Stripe `PaymentIntent`",
"type": "String"
"type": "string"
},

@@ -372,7 +372,2 @@ {

"deprecated": true
},
{
"name": "stripeMount",
"description": "Stripe.js mount point element. Due to limitations in the Stripe.js library, this element must be connected to the document.",
"type": "Element"
}

@@ -743,3 +738,3 @@ ],

"description": "The `client_secret` part of a Stripe `PaymentIntent`",
"type": "String"
"type": "string"
},

@@ -960,3 +955,3 @@ {

"description": "The `client_secret` part of a Stripe `PaymentIntent`",
"type": "String"
"type": "string"
},

@@ -1036,7 +1031,2 @@ {

"deprecated": true
},
{
"name": "stripeMount",
"description": "Stripe.js mount point element. Due to limitations in the Stripe.js library, this element must be connected to the document.",
"type": "Element"
}

@@ -1043,0 +1033,0 @@ ],

{
"name": "@power-elements/stripe-elements",
"version": "2.2.1",
"version": "2.2.2",
"description": "Web Component wrapper for stripe elements",
"main": "stripe-elements.js",
"module": "stripe-elements.js",
"main": "index.js",
"module": "index.js",
"directories": {

@@ -13,5 +13,5 @@ "test": "test"

"prepare": "npm run build",
"build": "run-p build:**",
"build": "run-s build:**",
"build:rollup": "rollup -c",
"build:types": "tsc",
"build:types": "tsc && sh scripts/finish-declarations.sh",
"build:analyze:json": "wca analyze src/*.js --outFile custom-elements.json",

@@ -41,2 +41,3 @@ "build:analyze:markdown": "cp src/README.template.md README.md && wca analyze src/*.js --silent --markdown.headerLevel 3 >> README.md",

],
"types": "index.d.ts",
"keywords": [

@@ -47,3 +48,5 @@ "web-components",

"stripe",
"payment"
"payment",
"payment-request",
"payment request api"
],

@@ -55,3 +58,3 @@ "author": "Benny Powers <web@bennypowers.com>",

},
"homepage": "https://github.com/bennypowers/stripe-elements#readme",
"homepage": "https://bennypowers.dev/stripe-elements",
"husky": {

@@ -62,2 +65,15 @@ "hooks": {

},
"release": {
"branches": [
"master"
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/github",
"@semantic-release/npm",
"@semantic-release/release-notes-generator",
"@semantic-release/git",
"@semantic-release/changelog"
]
},
"devDependencies": {

@@ -83,3 +99,2 @@ "@apollo-elements/eslint-config": "^1.1.1",

"@types/karma": "^3.0.5",
"@types/stripe-v3": "^3.1.14",
"babel-eslint": "^10.0.3",

@@ -100,2 +115,3 @@ "bound-decorator": "^1.1.0",

"karma-osx-reporter": "^0.2.1",
"karma-tap-reporter": "0.0.6",
"karma-tape-reporter": "^1.0.3",

@@ -123,5 +139,5 @@ "luhn-js": "^1.1.2",

"@typed/curry": "^1.0.1",
"karma-tap-reporter": "0.0.6",
"@types/stripe-v3": "^3.1.14",
"lit-element": "^2.2.1"
}
}

@@ -115,3 +115,3 @@ # Stripe Elements Web Components

| `card` | `card` | readonly | `stripe.elements.Element` | null | The Stripe card object.<br />**DEPRECATED**. Will be removed in a future version. use `element` instead |
| `clientSecret` | `client-secret` | | `String` | | The `client_secret` part of a Stripe `PaymentIntent` |
| `clientSecret` | `client-secret` | | `string` | | The `client_secret` part of a Stripe `PaymentIntent` |
| `complete` | `complete` | readonly | `boolean` | false | Whether the form is complete. |

@@ -139,3 +139,2 @@ | `element` | `element` | readonly | `stripe.elements.Element` | null | Stripe element instance |

| `stripe` | `stripe` | readonly | `stripe.Stripe` | null | Stripe instance |
| `stripeMount` | | readonly | `Element` | | Stripe.js mount point element. Due to limitations in the Stripe.js library, this element must be connected to the document. |
| `stripeReady` | `stripe-ready` | | `boolean` | false | Whether the stripe element is ready to receive focus.<br />**DEPRECATED**. Will be removed in a future version. use `ready` instead. |

@@ -150,7 +149,7 @@ | `token` | `token` | readonly | `stripe.Token` | null | Stripe Token |

|-----------------------|--------------------------------------------------|--------------------------------------------------|
| `blur` | `(): void` | Blur the element. |
| `blur` | `(): void` | Blurs the element. |
| `createPaymentMethod` | `(paymentMethodData?: PaymentMethodData \| undefined): Promise<PaymentMethodResponse>` | Submit payment information to generate a paymentMethod |
| `createSource` | `(sourceData?: { owner: OwnerInfo; } \| undefined): Promise<SourceResponse>` | Submit payment information to generate a source |
| `createToken` | `(tokenData?: TokenData): Promise<TokenResponse>` | Submit payment information to generate a token |
| `focus` | `(): void` | Focus the element. |
| `focus` | `(): void` | Focuses the element. |
| `isPotentiallyValid` | `(): boolean` | Checks for potential validity. A potentially valid form is one that is not empty, not complete and has no error. A validated form also counts as potentially valid. |

@@ -294,3 +293,3 @@ | `reset` | `(): void` | Resets the Stripe card. |

| `canMakePayment` | `can-make-payment` | readonly | `object` | null | Whether or not the device can make the payment request. |
| `clientSecret` | `client-secret` | | `String` | | The `client_secret` part of a Stripe `PaymentIntent` |
| `clientSecret` | `client-secret` | | `string` | | The `client_secret` part of a Stripe `PaymentIntent` |
| `country` | `country` | | `string` | | The two-letter country code of your Stripe account (e.g., `US`) |

@@ -322,3 +321,2 @@ | `currency` | `currency` | | `string` | | Three character currency code (e.g., `usd`) |

| `stripe` | `stripe` | readonly | `stripe.Stripe` | null | Stripe instance |
| `stripeMount` | | readonly | `Element` | | Stripe.js mount point element. Due to limitations in the Stripe.js library, this element must be connected to the document. |
| `stripeReady` | `stripe-ready` | | `boolean` | false | Whether the stripe element is ready to receive focus.<br />**DEPRECATED**. Will be removed in a future version. use `ready` instead. |

@@ -330,7 +328,7 @@ | `token` | `token` | readonly | `stripe.Token` | null | Stripe Token |

| Method | Type | Description |
|---------|------------|--------------------------|
| `blur` | `(): void` | Blur the element. |
| `focus` | `(): void` | Focus the element. |
| `reset` | `(): void` | Reset the stripe element |
| Method | Type | Description |
|---------|------------|---------------------------------------|
| `blur` | `(): void` | Blurs the element. |
| `focus` | `(): void` | Focuses the element. |
| `reset` | `(): void` | Resets and clears the stripe element. |

@@ -337,0 +335,0 @@ #### Events

@@ -16,2 +16,3 @@ import commonjs from '@rollup/plugin-commonjs';

input: [
'src/index.js',
'src/stripe-elements.js',

@@ -18,0 +19,0 @@ 'src/stripe-payment-request.js',

@@ -54,2 +54,15 @@ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';

/** @typedef {import('lit-element').PropertyDeclaration & { readOnly: Boolean }} AugmentedPropertyDeclaration */
/**
* @template TBase
* @typedef {new (...args: any[]) => import('lit-element').LitElement & TBase} Constructor
*/
// eslint-disable-next-line valid-jsdoc
/**
* Enables the nofity option for properties to fire change notification events
*
* @template TBase
* @param {Constructor<TBase>} baseElement
*/
const ReadOnlyPropertiesMixin = baseElement => {

@@ -117,4 +130,3 @@ var _temp;

* @param {Object<string, unknown>} props
* @return {Promise<this>}
* @protected
* @private
*/

@@ -125,3 +137,2 @@

await Promise.all(Object.entries(props).map(this._setPropEntry));
return this;
}

@@ -594,3 +605,3 @@ /**

* The `client_secret` part of a Stripe `PaymentIntent`
* @type {String}
* @type {string}
*/

@@ -676,2 +687,3 @@

* @type {Element}
* @protected
*/

@@ -741,3 +753,3 @@ function stripeMount() {

/**
* Reset the stripe element
* Resets and clears the stripe element.
*/

@@ -757,3 +769,3 @@

}
/** Blur the element. */
/** Blurs the element. */

@@ -768,3 +780,3 @@ }, {

}
/** Focus the element. */
/** Focuses the element. */

@@ -794,3 +806,6 @@ }, {

}
/** @private */
/**
* Clears the Payment Representation and fires an error event
* @private
*/

@@ -801,6 +816,7 @@ }, {

value: async function errorChanged() {
// DEPRECATED
const hasError = !!this.error;
await this.set({
hasError
}); // DEPRECATED
}); // END DEPRECATED

@@ -902,3 +918,6 @@ this.resetRepresentations();

}
/** @private */
/**
* Removes all mount points from the DOM
* @private
*/

@@ -912,3 +931,6 @@ }, {

}
/** @private */
/**
* Adds `ready`, `focus`, and `blur` listeners to the Stripe Element
* @private
*/

@@ -923,3 +945,6 @@ }, {

}
/** @private */
/**
* Creates mount points for the Stripe Element
* @private
*/

@@ -1071,5 +1096,6 @@ }, {

/**
* POSTs the payment info represenation to the endpoint at `/action`
* @private
*/
* POSTs the payment info represenation to the endpoint at `/action`
* @resolves {void}
* @private
*/

@@ -1080,2 +1106,12 @@ }, {

value: async function postRepresentation() {
const onError = error => this.set({
error
});
const onSuccess = success => {
this.fire('success', success); // DEPRECATED
this.fire('stripe-payment-success', success);
};
const token = this.token || undefined;

@@ -1097,9 +1133,3 @@ const source = this.source || undefined;

method
}).then(throwBadResponse).then(success => {
this.fire('success', success); // DEPRECATED
this.fire('stripe-payment-success', success);
}).catch(error => this.set({
error
}));
}).then(throwBadResponse).then(onSuccess).catch(onError);
}

@@ -1126,3 +1156,6 @@ /**

}
/** @private */
/**
* Resets the Payment Representations
* @private
*/

@@ -1129,0 +1162,0 @@ }, {

/** @typedef {import('lit-element').PropertyDeclaration & { readOnly: Boolean }} AugmentedPropertyDeclaration */
/**
* @template TBase
* @typedef {new (...args: any[]) => import('lit-element').LitElement & TBase} Constructor
*/
// eslint-disable-next-line valid-jsdoc
/**
* Enables the nofity option for properties to fire change notification events
*
* @template TBase
* @param {Constructor<TBase>} baseElement
*/
export const ReadOnlyPropertiesMixin = baseElement => {

@@ -58,8 +70,6 @@ /**

* @param {Object<string, unknown>} props
* @return {Promise<this>}
* @protected
* @private
*/
async set(props) {
await Promise.all(Object.entries(props).map(this._setPropEntry));
return this;
}

@@ -66,0 +76,0 @@

@@ -128,3 +128,3 @@ import { LitElement, property, html } from 'lit-element';

* The `client_secret` part of a Stripe `PaymentIntent`
* @type {String}
* @type {string}
*/

@@ -243,2 +243,3 @@ @property({ type: String, attribute: 'client-secret' }) clientSecret;

* @type {Element}
* @protected
*/

@@ -286,3 +287,3 @@ get stripeMount() { return document.getElementById(this.stripeMountId); }

/**
* Reset the stripe element
* Resets and clears the stripe element.
*/

@@ -295,3 +296,3 @@ reset() {

/** Blur the element. */
/** Blurs the element. */
blur() {

@@ -301,3 +302,3 @@ this.element?.blur();

/** Focus the element. */
/** Focuses the element. */
focus() {

@@ -319,6 +320,11 @@ this.element?.focus();

/** @private */
/**
* Clears the Payment Representation and fires an error event
* @private
*/
async errorChanged() {
// DEPRECATED
const hasError = !!this.error;
await this.set({ hasError }); // DEPRECATED
await this.set({ hasError });
// END DEPRECATED
this.resetRepresentations();

@@ -389,3 +395,6 @@ this.fireError(this.error);

/** @private */
/**
* Removes all mount points from the DOM
* @private
*/
destroyMountPoints() {

@@ -396,3 +405,6 @@ this.shadowHosts.forEach(removeAllMounts);

/** @private */
/**
* Adds `ready`, `focus`, and `blur` listeners to the Stripe Element
* @private
*/
initElementListeners() {

@@ -404,3 +416,6 @@ this.element.addEventListener('ready', this.onReady);

/** @private */
/**
* Creates mount points for the Stripe Element
* @private
*/
initMountPoints() {

@@ -475,50 +490,53 @@ this.stripeMountId = generateRandomMountElementId();

/**
* @param {StripeFocusEvent} event
* @private
*/
@bound async onBlur(event) {
/**
* @param {StripeFocusEvent} event
* @private
*/
@bound async onBlur(event) {
await this.set({ focused: false });
}
/**
* @param {StripeFocusEvent} event
* @private
*/
@bound async onFocus(event) {
await this.set({ focused: true });
}
/**
* @param {StripeFocusEvent} event
* @private
*/
@bound async onFocus(event) {
await this.set({ focused: true });
}
/**
* Sets the `ready` property when the stripe element is ready to receive focus.
* @param {Event} event
* @private
*/
@bound async onReady(event) {
await this.set({ ready: true, stripeReady: true });
this.fire('ready', event);
// DEPRECATED
this.fire('stripe-ready', event);
}
/**
* Sets the `ready` property when the stripe element is ready to receive focus.
* @param {Event} event
* @private
*/
@bound async onReady(event) {
await this.set({ ready: true, stripeReady: true });
this.fire('ready', event);
// DEPRECATED
this.fire('stripe-ready', event);
}
/**
/**
* POSTs the payment info represenation to the endpoint at `/action`
* @resolves {void}
* @private
*/
async postRepresentation() {
const token = this.token || undefined;
const source = this.source || undefined;
const paymentMethod = this.paymentMethod || undefined;
const body = JSON.stringify({ token, source, paymentMethod });
const headers = { 'Content-Type': 'application/json' };
const method = 'POST';
return fetch(this.action, { body, headers, method })
.then(throwBadResponse)
.then(success => {
this.fire('success', success);
// DEPRECATED
this.fire('stripe-payment-success', success);
})
.catch(error => this.set({ error }));
}
async postRepresentation() {
const onError = error => this.set({ error });
const onSuccess = success => {
this.fire('success', success);
// DEPRECATED
this.fire('stripe-payment-success', success);
};
const token = this.token || undefined;
const source = this.source || undefined;
const paymentMethod = this.paymentMethod || undefined;
const body = JSON.stringify({ token, source, paymentMethod });
const headers = { 'Content-Type': 'application/json' };
const method = 'POST';
return fetch(this.action, { body, headers, method })
.then(throwBadResponse)
.then(onSuccess)
.catch(onError);
}

@@ -530,13 +548,16 @@ /**

@bound representationChanged(name) {
if (!isRepresentation(name)) return;
const value = this[name];
/* istanbul ignore if */
if (!value) return;
// DEPRECATED
this.fire(`stripe-${dash(name)}`, value);
this.fire(`${dash(name)}`, value);
if (this.action) this.postRepresentation();
}
if (!isRepresentation(name)) return;
const value = this[name];
/* istanbul ignore if */
if (!value) return;
// DEPRECATED
this.fire(`stripe-${dash(name)}`, value);
this.fire(`${dash(name)}`, value);
if (this.action) this.postRepresentation();
}
/** @private */
/**
* Resets the Payment Representations
* @private
*/
resetRepresentations() {

@@ -553,3 +574,2 @@ this.set({

/** @typedef {{ owner: stripe.OwnerData }} SourceData */
/** @typedef {{ elementType: stripe.elements.elementsType }} StripeFocusEvent */

@@ -114,3 +114,4 @@ import { property } from 'lit-element';

@property({ type: Array }) get displayItems() {
return this.__displayItems || this.parseDatasets('stripe-display-item');
const value = this.__displayItems;
return Array.isArray(value) ? value : this.parseDatasets('stripe-display-item');
}

@@ -120,2 +121,3 @@

const oldValue = this.displayItems;
/** @private */
this.__displayItems = value;

@@ -187,3 +189,4 @@ this.requestUpdate('displayItems', oldValue);

@property({ type: Array }) get shippingOptions() {
return this.__shippingOptions || this.parseDatasets('stripe-shipping-option');
const value = this.__shippingOptions;
return Array.isArray(value) ? value : this.parseDatasets('stripe-shipping-option');
}

@@ -193,2 +196,3 @@

const oldValue = this.shippingOptions;
/** @private */
this.__shippingOptions = value;

@@ -256,2 +260,3 @@ this.requestUpdate('shippingOptions', oldValue);

/**
* Initializes the PaymentRequest Object.
* @private

@@ -392,7 +397,7 @@ */

/**
* Parses an element's dataset number props from string to number
* @param {String} selector
* @return {Object}
* @private
*/
* Parses an element's dataset number props from string to number
* @param {String} selector
* @return {Object}
* @private
*/
parseDatasets(selector) {

@@ -399,0 +404,0 @@ const elements = [...this.querySelectorAll(selector)];

export { StripeElements };
import { StripeElements } from "./StripeElements";
declare global { interface HTMLElementTagNameMap { 'stripe-elements': StripeElements; } }
export { StripePaymentRequest };
import { StripePaymentRequest } from "./StripePaymentRequest";
declare global { interface HTMLElementTagNameMap { 'stripe-payment-request': StripePaymentRequest; } }

@@ -207,3 +207,4 @@ import '@babel/runtime/helpers/esm/defineProperty';

function displayItems() {
return this.__displayItems || this.parseDatasets('stripe-display-item');
const value = this.__displayItems;
return Array.isArray(value) ? value : this.parseDatasets('stripe-display-item');
}

@@ -215,2 +216,4 @@ }, {

const oldValue = this.displayItems;
/** @private */
this.__displayItems = value;

@@ -354,3 +357,4 @@ this.requestUpdate('displayItems', oldValue);

function shippingOptions() {
return this.__shippingOptions || this.parseDatasets('stripe-shipping-option');
const value = this.__shippingOptions;
return Array.isArray(value) ? value : this.parseDatasets('stripe-shipping-option');
}

@@ -362,2 +366,4 @@ }, {

const oldValue = this.shippingOptions;
/** @private */
this.__shippingOptions = value;

@@ -461,2 +467,3 @@ this.requestUpdate('shippingOptions', oldValue);

/**
* Initializes the PaymentRequest Object.
* @private

@@ -683,7 +690,7 @@ */

/**
* Parses an element's dataset number props from string to number
* @param {String} selector
* @return {Object}
* @private
*/
* Parses an element's dataset number props from string to number
* @param {String} selector
* @return {Object}
* @private
*/

@@ -690,0 +697,0 @@ }, {

declare const StripeBase_base: {
new (): {
[x: string]: any;
_readOnlyPropertyInitializedMap: Map<string, boolean>;

@@ -8,5 +7,4 @@ _setPropEntry([name, newVal]: [string, unknown]): Promise<unknown>;

[x: string]: unknown;
}): Promise<any>;
}): Promise<void>;
};
[x: string]: any;
createProperty(name: string, options: import("lit-element").PropertyDeclaration<any, any> & {

@@ -93,5 +91,5 @@ readOnly: boolean;

* The `client_secret` part of a Stripe `PaymentIntent`
* @type {String}
* @type {string}
*/
clientSecret: String;
clientSecret: string;
/**

@@ -166,6 +164,7 @@ * Type of payment representation to generate.

*/
shadowHosts: Node[];
private shadowHosts: Node[];
/**
* Stripe.js mount point element. Due to limitations in the Stripe.js library, this element must be connected to the document.
* @type {Element}
* @protected
*/

@@ -186,8 +185,8 @@ get stripeMount(): Element;

/**
* Reset the stripe element
* Resets and clears the stripe element.
*/
reset(): void;
/** Blur the element. */
/** Blurs the element. */
blur(): void;
/** Focus the element. */
/** Focuses the element. */
focus(): void;

@@ -200,6 +199,9 @@ /**

*/
createError(message: string): StripeElementsError;
/** @private */
errorChanged(): Promise<void>;
private createError(message: string): StripeElementsError;
/**
* Clears the Payment Representation and fires an error event
* @private
*/
private errorChanged(): Promise<void>;
/**
* Fires an event.

@@ -211,3 +213,3 @@ * @param {string} type event type

*/
fire(type: string, detail: any, opts?: EventInit): void;
private fire(type: string, detail: any, opts?: EventInit): void;
/**

@@ -218,3 +220,3 @@ * Fires an Error Event

*/
fireError(error: Error): void;
private fireError(error: Error): void;
/**

@@ -227,3 +229,3 @@ * Gets a CSS Custom Property value, respecting ShadyCSS.

*/
getCSSCustomPropertyValue(propertyName: string, precomputedStyle?: CSSStyleDeclaration): any;
private getCSSCustomPropertyValue(propertyName: string, precomputedStyle?: CSSStyleDeclaration): any;
/**

@@ -235,3 +237,3 @@ * Sets the token or error from the response.

*/
handleResponse(response: stripe.TokenResponse | stripe.SourceResponse | stripe.PaymentMethodResponse | stripe.PaymentIntentResponse | stripe.SetupIntentResponse): stripe.TokenResponse | stripe.SourceResponse | stripe.PaymentMethodResponse | stripe.PaymentIntentResponse | stripe.SetupIntentResponse;
private handleResponse(response: stripe.TokenResponse | stripe.SourceResponse | stripe.PaymentMethodResponse | stripe.PaymentIntentResponse | stripe.SetupIntentResponse): stripe.TokenResponse | stripe.SourceResponse | stripe.PaymentMethodResponse | stripe.PaymentIntentResponse | stripe.SetupIntentResponse;
/**

@@ -241,14 +243,23 @@ * Reinitializes Stripe and mounts the element.

*/
init(): Promise<void>;
/** @private */
destroyMountPoints(): void;
/** @private */
initElementListeners(): void;
/** @private */
initMountPoints(): void;
private init(): Promise<void>;
/**
* Removes all mount points from the DOM
* @private
*/
private destroyMountPoints(): void;
/**
* Adds `ready`, `focus`, and `blur` listeners to the Stripe Element
* @private
*/
private initElementListeners(): void;
/**
* Creates mount points for the Stripe Element
* @private
*/
private initMountPoints(): void;
/**
* Prepares to mount Stripe Elements in light DOM.
* @private
*/
initShadowMountPoints(): void;
private initShadowMountPoints(): void;
/**

@@ -258,3 +269,3 @@ * Initializes Stripe and elements.

*/
initStripe(): Promise<void>;
private initStripe(): Promise<void>;
/**

@@ -264,3 +275,3 @@ * Mounts the Stripe Element

*/
mount(): void;
private mount(): void;
/**

@@ -270,3 +281,3 @@ * Unmounts and nullifies the card.

*/
unmount(): Promise<void>;
private unmount(): Promise<void>;
/**

@@ -276,3 +287,3 @@ * @param {StripeFocusEvent} event

*/
onBlur(event: {
private onBlur(event: {
elementType: stripe.elements.elementsType;

@@ -284,3 +295,3 @@ }): Promise<void>;

*/
onFocus(event: {
private onFocus(event: {
elementType: stripe.elements.elementsType;

@@ -293,8 +304,9 @@ }): Promise<void>;

*/
onReady(event: Event): Promise<void>;
private onReady(event: Event): Promise<void>;
/**
* POSTs the payment info represenation to the endpoint at `/action`
* @private
*/
postRepresentation(): Promise<void | StripeBase>;
* POSTs the payment info represenation to the endpoint at `/action`
* @resolves {void}
* @private
*/
private postRepresentation(): Promise<void>;
/**

@@ -304,8 +316,8 @@ * @param {string} name

*/
representationChanged(name: string): void;
/** @private */
resetRepresentations(): void;
set(props: {
[x: string]: unknown;
}): Promise<StripeBase>;
private representationChanged(name: string): void;
/**
* Resets the Payment Representations
* @private
*/
private resetRepresentations(): void;
}

@@ -312,0 +324,0 @@ export type PaymentResponse = stripe.TokenResponse | stripe.SourceResponse | stripe.PaymentMethodResponse | stripe.PaymentIntentResponse | stripe.SetupIntentResponse;

@@ -234,3 +234,3 @@ /**

*/
getPaymentMethodData(): stripe.PaymentMethodData;
private getPaymentMethodData(): stripe.PaymentMethodData;
/**

@@ -241,3 +241,3 @@ * Returns a Stripe-friendly style object computed from CSS custom properties

*/
getStripeElementsStyles(): {
private getStripeElementsStyles(): {
base?: stripe.elements.Style;

@@ -251,3 +251,3 @@ complete?: stripe.elements.Style;

*/
initElement(): Promise<void>;
private initElement(): Promise<void>;
/**

@@ -263,7 +263,3 @@ * Updates the element's state.

*/
onChange(event: stripe.elements.ElementChangeResponse): Promise<void>;
postRepresentation(): Promise<void | StripeElements>;
set(props: {
[x: string]: unknown;
}): Promise<StripeElements>;
private onChange(event: stripe.elements.ElementChangeResponse): Promise<void>;
}

@@ -270,0 +266,0 @@ export type StripeStyleInit = {

@@ -86,3 +86,4 @@ /**

get displayItems(): stripe.paymentRequest.DisplayItem[];
__displayItems: stripe.paymentRequest.DisplayItem[];
/** @private */
private __displayItems: stripe.paymentRequest.DisplayItem[];
/**

@@ -138,3 +139,4 @@ * A name that the browser shows the customer in the payment interface.

get shippingOptions(): stripe.paymentRequest.ShippingOption[];
__shippingOptions: stripe.paymentRequest.ShippingOption[];
/** @private */
private __shippingOptions: stripe.paymentRequest.ShippingOption[];
/**

@@ -153,7 +155,8 @@ * @type {'default'|'book'|'buy'|'donate'}

*/
getStripePaymentRequestOptions(): stripe.paymentRequest.StripePaymentRequestOptions;
private getStripePaymentRequestOptions(): stripe.paymentRequest.StripePaymentRequestOptions;
/**
* Initializes the PaymentRequest Object.
* @private
*/
initElement(): Promise<void>;
private initElement(): Promise<void>;
/**

@@ -163,3 +166,3 @@ * Initialized the `PaymentRequest` object.

*/
initPaymentRequest(): Promise<void>;
private initPaymentRequest(): Promise<void>;
/**

@@ -169,3 +172,3 @@ * Creates Stripe Payment Request Element.

*/
initPaymentRequestButton(): Promise<void>;
private initPaymentRequestButton(): Promise<void>;
/**

@@ -175,3 +178,3 @@ * Attaches listeners to the `PaymentRequest` object.

*/
initPaymentRequestListeners(): Promise<void>;
private initPaymentRequestListeners(): Promise<void>;
/**

@@ -182,3 +185,3 @@ * Handle a `cancel` event

*/
onCancel(originalEvent: any): void;
private onCancel(originalEvent: any): void;
/**

@@ -193,3 +196,3 @@ * Completes the PaymentRequest. If a confirmation error is passed in the second argument,

*/
complete(paymentResponse: stripe.paymentRequest.StripeTokenPaymentResponse | stripe.paymentRequest.StripeSourcePaymentResponse | stripe.paymentRequest.StripePaymentMethodPaymentResponse, confirmationError?: stripe.Error): Promise<stripe.paymentRequest.StripeTokenPaymentResponse | stripe.paymentRequest.StripeSourcePaymentResponse | stripe.paymentRequest.StripePaymentMethodPaymentResponse | {
private complete(paymentResponse: stripe.paymentRequest.StripeTokenPaymentResponse | stripe.paymentRequest.StripeSourcePaymentResponse | stripe.paymentRequest.StripePaymentMethodPaymentResponse, confirmationError?: stripe.Error): Promise<stripe.paymentRequest.StripeTokenPaymentResponse | stripe.paymentRequest.StripeSourcePaymentResponse | stripe.paymentRequest.StripePaymentMethodPaymentResponse | {
error: stripe.Error;

@@ -204,3 +207,3 @@ }>;

*/
onPaymentResponse(paymentResponse: stripe.paymentRequest.StripeTokenPaymentResponse | stripe.paymentRequest.StripeSourcePaymentResponse | stripe.paymentRequest.StripePaymentMethodPaymentResponse): Promise<void | stripe.paymentRequest.StripeTokenPaymentResponse | stripe.paymentRequest.StripeSourcePaymentResponse | stripe.paymentRequest.StripePaymentMethodPaymentResponse | {
private onPaymentResponse(paymentResponse: stripe.paymentRequest.StripeTokenPaymentResponse | stripe.paymentRequest.StripeSourcePaymentResponse | stripe.paymentRequest.StripePaymentMethodPaymentResponse): Promise<void | stripe.paymentRequest.StripeTokenPaymentResponse | stripe.paymentRequest.StripeSourcePaymentResponse | stripe.paymentRequest.StripePaymentMethodPaymentResponse | {
error: stripe.Error;

@@ -213,3 +216,3 @@ }>;

*/
confirmPaymentIntent(paymentResponse: stripe.paymentRequest.StripeTokenPaymentResponse | stripe.paymentRequest.StripeSourcePaymentResponse | stripe.paymentRequest.StripePaymentMethodPaymentResponse): Promise<void>;
private confirmPaymentIntent(paymentResponse: stripe.paymentRequest.StripeTokenPaymentResponse | stripe.paymentRequest.StripeSourcePaymentResponse | stripe.paymentRequest.StripePaymentMethodPaymentResponse): Promise<void>;
/**

@@ -221,3 +224,3 @@ * Stripe confirmCardPayment method

*/
confirmCardPayment(data: stripe.ConfirmCardPaymentData, options: stripe.ConfirmCardPaymentOptions): Promise<stripe.PaymentIntentResponse>;
private confirmCardPayment(data: stripe.ConfirmCardPaymentData, options: stripe.ConfirmCardPaymentOptions): Promise<stripe.PaymentIntentResponse>;
/**

@@ -227,3 +230,3 @@ * @param {ShippingAddressChangeEvent} originalEvent

*/
onShippingaddresschange(originalEvent: any): void;
private onShippingaddresschange(originalEvent: any): void;
/**

@@ -233,14 +236,10 @@ * @param {ShippingOptionChangeEvent} originalEvent

*/
onShippingoptionchange(originalEvent: any): void;
private onShippingoptionchange(originalEvent: any): void;
/**
* Parses an element's dataset number props from string to number
* @param {String} selector
* @return {Object}
* @private
*/
parseDatasets(selector: string): any;
postRepresentation(): Promise<void | StripePaymentRequest>;
set(props: {
[x: string]: unknown;
}): Promise<StripePaymentRequest>;
* Parses an element's dataset number props from string to number
* @param {String} selector
* @return {Object}
* @private
*/
private parseDatasets(selector: string): any;
}

@@ -247,0 +246,0 @@ export type ShippingAddressChangeEvent = any;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet