@primer-io/primer-js 0.3.1 → 0.3.3
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/CHANGELOG.md +111 -0
- package/dist/custom-elements.json +363 -160
- package/dist/jsx/index.d.ts +20 -0
- package/dist/primer-loader.d.ts +21 -4
- package/dist/primer-loader.js +7 -7
- package/dist/primer-react-wrappers.js +6 -6
- package/dist/vscode.html-custom-data.json +18 -0
- package/dist/web-types.json +36 -1
- package/package.json +2 -2
- package/src/controllers/reactive-state/README.md +210 -0
package/dist/jsx/index.d.ts
CHANGED
|
@@ -331,6 +331,19 @@ export type PaymentMethodComponentProps = {
|
|
|
331
331
|
paymentMethods?: PaymentMethodsContextType;
|
|
332
332
|
};
|
|
333
333
|
|
|
334
|
+
export type PaymentMethodContainerComponentProps = {
|
|
335
|
+
/** */
|
|
336
|
+
include?: string | undefined;
|
|
337
|
+
/** */
|
|
338
|
+
exclude?: string | undefined;
|
|
339
|
+
/** */
|
|
340
|
+
disabled?: boolean;
|
|
341
|
+
/** */
|
|
342
|
+
paymentMethods?: PaymentMethodsContextType;
|
|
343
|
+
/** */
|
|
344
|
+
clientOptions?: ClientOptionsContextType;
|
|
345
|
+
};
|
|
346
|
+
|
|
334
347
|
export type PrimerCheckoutCompleteComponentProps = {};
|
|
335
348
|
|
|
336
349
|
export type PrimerCheckoutErrorComponentProps = {
|
|
@@ -829,6 +842,13 @@ export type CustomElements = {
|
|
|
829
842
|
*/
|
|
830
843
|
"primer-payment-method": Partial<PaymentMethodComponentProps & BaseProps & BaseEvents>;
|
|
831
844
|
|
|
845
|
+
/**
|
|
846
|
+
*
|
|
847
|
+
* ---
|
|
848
|
+
*
|
|
849
|
+
*/
|
|
850
|
+
"primer-payment-method-container": Partial<PaymentMethodContainerComponentProps & BaseProps & BaseEvents>;
|
|
851
|
+
|
|
832
852
|
/**
|
|
833
853
|
*
|
|
834
854
|
* ---
|
package/dist/primer-loader.d.ts
CHANGED
|
@@ -1221,13 +1221,14 @@ declare class VaultManagerController extends CompositeStateController<PrimerChec
|
|
|
1221
1221
|
private itemController;
|
|
1222
1222
|
private _vaultManager;
|
|
1223
1223
|
private _options;
|
|
1224
|
+
private createVaultManagerFn;
|
|
1224
1225
|
constructor(host: PrimerCheckoutType);
|
|
1225
1226
|
/**
|
|
1226
|
-
* Initialize the vault manager with
|
|
1227
|
-
* @param
|
|
1228
|
-
* @param options -
|
|
1227
|
+
* Initialize the vault manager with a factory function and options
|
|
1228
|
+
* @param createVaultManagerFn - Bound function to create vault manager when needed
|
|
1229
|
+
* @param options - Vault configuration options
|
|
1229
1230
|
*/
|
|
1230
|
-
initializeVaultManager(
|
|
1231
|
+
initializeVaultManager(createVaultManagerFn: PrimerHeadlessCheckout["createVaultManager"] | null, options?: VaultManagerInitOptions): void;
|
|
1231
1232
|
get vaultManager(): HeadlessVaultManager | null;
|
|
1232
1233
|
set vaultManager(vaultManager: HeadlessVaultManager | null);
|
|
1233
1234
|
get options(): VaultManagerInitOptions | null;
|
|
@@ -2103,6 +2104,21 @@ declare global {
|
|
|
2103
2104
|
}
|
|
2104
2105
|
}
|
|
2105
2106
|
export type ClientOptionsContextType = PrimerCheckoutOptions | null;
|
|
2107
|
+
declare class PaymentMethodContainerComponent extends LitElement {
|
|
2108
|
+
static styles: import("lit").CSSResult[];
|
|
2109
|
+
include?: string;
|
|
2110
|
+
exclude?: string;
|
|
2111
|
+
disabled: boolean;
|
|
2112
|
+
paymentMethods: PaymentMethodsContextType;
|
|
2113
|
+
clientOptions: ClientOptionsContextType;
|
|
2114
|
+
private getFilteredMethods;
|
|
2115
|
+
render(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
2116
|
+
}
|
|
2117
|
+
declare global {
|
|
2118
|
+
interface HTMLElementTagNameMap {
|
|
2119
|
+
"primer-payment-method-container": PaymentMethodContainerComponent;
|
|
2120
|
+
}
|
|
2121
|
+
}
|
|
2106
2122
|
export type AchField = "firstName" | "lastName" | "emailAddress";
|
|
2107
2123
|
export interface AchFormState {
|
|
2108
2124
|
value: string;
|
|
@@ -3230,6 +3246,7 @@ export {
|
|
|
3230
3246
|
InputWrapperComponent as InputWrapper,
|
|
3231
3247
|
NativePaymentComponent as NativePayment,
|
|
3232
3248
|
PaymentMethodComponent as PaymentMethod,
|
|
3249
|
+
PaymentMethodContainerComponent as PaymentMethodContainer,
|
|
3233
3250
|
PortalComponent as Portal,
|
|
3234
3251
|
PrimerCheckoutCompleteComponent as PrimerCheckoutComplete,
|
|
3235
3252
|
PrimerCheckoutErrorComponent as PrimerCheckoutFailure,
|