@primer-io/primer-js 0.1.5 → 0.1.7
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/dist/custom-elements.json +3060 -1606
- package/dist/jsx/index.d.ts +3 -1
- package/dist/primer-loader.d.ts +14 -0
- package/dist/primer-loader.js +79 -67
- package/dist/primer-react-wrappers.js +2373 -0
- package/dist/vscode.html-custom-data.json +4 -1
- package/dist/web-types.json +14 -6
- package/package.json +23 -1
package/dist/jsx/index.d.ts
CHANGED
|
@@ -101,7 +101,7 @@ export type ButtonComponentProps = {
|
|
|
101
101
|
When true, the button will display a spinner and be disabled */
|
|
102
102
|
loading?: boolean;
|
|
103
103
|
/** */
|
|
104
|
-
|
|
104
|
+
type?: "button" | "submit" | "reset";
|
|
105
105
|
/** Selection state of the button
|
|
106
106
|
- default: Not checked
|
|
107
107
|
- checked: Button is checked */
|
|
@@ -274,6 +274,8 @@ export type AchPaymentComponentProps = {
|
|
|
274
274
|
};
|
|
275
275
|
|
|
276
276
|
export type CardFormComponentProps = {
|
|
277
|
+
/** */
|
|
278
|
+
"hide-labels"?: boolean;
|
|
277
279
|
/** Payment managers injected from context */
|
|
278
280
|
paymentManagers?: InitializedManagersMap;
|
|
279
281
|
};
|
package/dist/primer-loader.d.ts
CHANGED
|
@@ -2319,6 +2319,13 @@ export declare class InitializedPayments {
|
|
|
2319
2319
|
toArray(): InitializedPaymentMethod[];
|
|
2320
2320
|
size(): number;
|
|
2321
2321
|
}
|
|
2322
|
+
export interface OnCheckoutCompletePayload {
|
|
2323
|
+
payment: Payment | null;
|
|
2324
|
+
}
|
|
2325
|
+
export interface OnCheckoutFailurePayload {
|
|
2326
|
+
error: PrimerClientError;
|
|
2327
|
+
payment?: Payment;
|
|
2328
|
+
}
|
|
2322
2329
|
export interface CardSubmitSuccessPayload {
|
|
2323
2330
|
result: unknown;
|
|
2324
2331
|
}
|
|
@@ -2330,6 +2337,8 @@ export interface PrimeAchErrorPayload {
|
|
|
2330
2337
|
}
|
|
2331
2338
|
export interface PrimerEvents {
|
|
2332
2339
|
"primer-state-changed": CustomEvent<SdkStateContext>;
|
|
2340
|
+
"primer-oncheckout-complete": CustomEvent<OnCheckoutCompletePayload>;
|
|
2341
|
+
"primer-oncheckout-failure": CustomEvent<OnCheckoutFailurePayload>;
|
|
2333
2342
|
"primer-payment-methods-updated": CustomEvent<InitializedPayments>;
|
|
2334
2343
|
"primer-checkout-initialized": CustomEvent<PrimerHeadlessCheckout>;
|
|
2335
2344
|
"primer-card-network-change": CustomEvent<CardNetworksContext>;
|
|
@@ -2356,6 +2365,8 @@ declare class PrimerEventsController implements ReactiveController {
|
|
|
2356
2365
|
dispatchPaymentMethods(paymentMethods: InitializedPayments): void;
|
|
2357
2366
|
dispatchCheckoutInitialized(checkoutInstance: PrimerHeadlessCheckout): void;
|
|
2358
2367
|
dispatchCardNetworkChange(network: CardNetworksContext): void;
|
|
2368
|
+
dispatchOnCheckoutComplete(payment: Payment | null): void;
|
|
2369
|
+
dispatchOnCheckoutFailure(error: PrimerClientError, payment?: Payment): void;
|
|
2359
2370
|
dispatchFormSubmitSuccess(result: unknown): void;
|
|
2360
2371
|
dispatchFormSubmitErrors(errors: unknown): void;
|
|
2361
2372
|
}
|
|
@@ -3444,6 +3455,8 @@ declare global {
|
|
|
3444
3455
|
*/
|
|
3445
3456
|
declare class CardFormComponent extends LitElement {
|
|
3446
3457
|
static styles: CSSResult[];
|
|
3458
|
+
hideLabels: boolean;
|
|
3459
|
+
updated(changedProperties: Map<string, unknown>): void;
|
|
3447
3460
|
/**
|
|
3448
3461
|
* Tracks whether custom content has been provided via slot
|
|
3449
3462
|
*/
|
|
@@ -3506,6 +3519,7 @@ export interface CardFormContext {
|
|
|
3506
3519
|
validate: () => Promise<Validation>;
|
|
3507
3520
|
submit: (values?: CardPaymentMethodSubmitValues) => Promise<void>;
|
|
3508
3521
|
errors?: Validation["validationErrors"];
|
|
3522
|
+
hideLabels?: boolean;
|
|
3509
3523
|
}
|
|
3510
3524
|
/**
|
|
3511
3525
|
* A shared type that ensures the host of a HostedInputController contains
|