@shipengine/elements 0.17.2 → 0.17.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/components/auto-funding-form/auto-funding-form.d.ts +3 -1
- package/components/auto-funding-form/auto-funding-form.styles.d.ts +2 -1
- package/components/field/expiration-input/expiration-input.d.ts +3 -0
- package/components/field/expiration-input/index.d.ts +1 -0
- package/components/field/fields.d.ts +1 -0
- package/components/field/switch/switch.d.ts +1 -1
- package/components/fund-and-purchase/fund-and-purchase.d.ts +2 -1
- package/components/templates/address-form/address-fields.styles.d.ts +1 -0
- package/components/templates/onboarding/onboarding.d.ts +1 -3
- package/components/templates/onboarding/onboarding.styles.d.ts +1 -1
- package/components/templates/rate-form/rate-form.d.ts +1 -0
- package/components/templates/wallet-form/wallet-schema.d.ts +7 -12
- package/index.cjs +1442 -1389
- package/index.js +1443 -1391
- package/locales/en/index.d.ts +7 -3
- package/mocks/carriers/handlers.d.ts +3 -0
- package/mocks/warehouses/handlers.d.ts +12 -1
- package/package.json +3 -3
- package/utilities/money.d.ts +1 -0
|
@@ -3,6 +3,8 @@ export type AutoFundingFormProps = {
|
|
|
3
3
|
};
|
|
4
4
|
/**
|
|
5
5
|
* This form that allows users to enable or disable auto funding, and
|
|
6
|
-
* configure auto funding
|
|
6
|
+
* configure auto funding rules in ShipEngine API.
|
|
7
|
+
*
|
|
8
|
+
* @param carrierId The carrierId of the carrier provider you wish to configure auto-funding rules for.
|
|
7
9
|
*/
|
|
8
10
|
export declare const AutoFundingForm: ({ carrierId }: AutoFundingFormProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { Theme } from "@packlink/brands";
|
|
2
|
+
export declare const getStyles: (showForm: boolean) => Record<"edit" | "form" | "input" | "marginLeft", import("@emotion/serialize").Interpolation<Theme>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./expiration-input";
|
|
@@ -3,7 +3,7 @@ import { ISwitchProps } from "@packlink/giger";
|
|
|
3
3
|
export type SwitchProps = {
|
|
4
4
|
children?: React.ReactNode;
|
|
5
5
|
defaultChecked?: boolean;
|
|
6
|
-
label
|
|
6
|
+
label?: string;
|
|
7
7
|
shouldUnmount?: boolean;
|
|
8
8
|
} & Omit<ISwitchProps, "children">;
|
|
9
9
|
export declare const Switch: ({ defaultChecked, children, shouldUnmount, label, onChange, ...props }: SwitchProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -2,6 +2,7 @@ export type FundAndPurchaseProps = {
|
|
|
2
2
|
carrierId?: string;
|
|
3
3
|
className?: string;
|
|
4
4
|
disabled?: boolean;
|
|
5
|
+
isFundingEnabled?: boolean;
|
|
5
6
|
isFundingRequired: boolean;
|
|
6
7
|
onPurchase: () => void;
|
|
7
8
|
onSave: () => Promise<void>;
|
|
@@ -12,4 +13,4 @@ export type FundAndPurchaseProps = {
|
|
|
12
13
|
* has the necessary funds available and can add them if not. It allows a single button
|
|
13
14
|
* to submit the funding form followed by the purchase form.
|
|
14
15
|
*/
|
|
15
|
-
export declare const FundAndPurchase: ({ carrierId, className, disabled, isFundingRequired, onSave, purchaseAmount, onPurchase, }: FundAndPurchaseProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const FundAndPurchase: ({ carrierId, className, disabled, isFundingEnabled, isFundingRequired, onSave, purchaseAmount, onPurchase, }: FundAndPurchaseProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: Record<"grow" | "stateWrapper" | "stateZipWrapper" | "zipWrapper", import("@emotion/serialize").Interpolation<import("@packlink/brands/dist/js/theme/Theme").Theme>>;
|
|
@@ -2,8 +2,6 @@ import { SE } from "@shipengine/api";
|
|
|
2
2
|
export type OnboardingProps = {
|
|
3
3
|
carriers: SE.Carrier[];
|
|
4
4
|
createWarehouse: (payload: Partial<SE.Warehouse>) => Promise<SE.Warehouse>;
|
|
5
|
-
isLoadingDhl: boolean;
|
|
6
|
-
isLoadingUps: boolean;
|
|
7
5
|
onCarrierCreated: () => Promise<void>;
|
|
8
6
|
onCompleteOnboarding: () => void;
|
|
9
7
|
onWarehouseCreated: () => Promise<void>;
|
|
@@ -15,4 +13,4 @@ export type OnboardingProps = {
|
|
|
15
13
|
registerUpsCarrierErrors: SE.CodedError[] | null;
|
|
16
14
|
warehouses: SE.Warehouse[];
|
|
17
15
|
};
|
|
18
|
-
export declare const Onboarding: ({ carriers, createWarehouse, onCarrierCreated, onWarehouseCreated,
|
|
16
|
+
export declare const Onboarding: ({ carriers, createWarehouse, onCarrierCreated, onWarehouseCreated, onCompleteOnboarding, registerDhlCarrier, registerDhlCarrierErrors, registerStampsCarrier, registerStampsCarrierErrors, registerUpsCarrier, registerUpsCarrierErrors, warehouses, }: OnboardingProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const styles: Record<"
|
|
1
|
+
export declare const styles: Record<"step" | "wrapper", import("@emotion/serialize").Interpolation<import("@packlink/brands/dist/js/theme/Theme").Theme>>;
|
|
@@ -197,24 +197,21 @@ export declare const walletSchema: z.ZodObject<{
|
|
|
197
197
|
}>;
|
|
198
198
|
creditCard: z.ZodEffects<z.ZodObject<{
|
|
199
199
|
cvv: z.ZodEffects<z.ZodString, string, string>;
|
|
200
|
-
|
|
201
|
-
expirationYear: z.ZodEffects<z.ZodString, string, string>;
|
|
200
|
+
expiration: z.ZodEffects<z.ZodString, string, string>;
|
|
202
201
|
name: z.ZodString;
|
|
203
202
|
number: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
204
203
|
}, "strip", z.ZodTypeAny, {
|
|
205
204
|
number: string;
|
|
206
205
|
name: string;
|
|
207
206
|
cvv: string;
|
|
208
|
-
|
|
209
|
-
expirationYear: string;
|
|
207
|
+
expiration: string;
|
|
210
208
|
}, {
|
|
211
209
|
number: string;
|
|
212
210
|
name: string;
|
|
213
211
|
cvv: string;
|
|
214
|
-
|
|
215
|
-
expirationYear: string;
|
|
212
|
+
expiration: string;
|
|
216
213
|
}>, {
|
|
217
|
-
expirationMonth:
|
|
214
|
+
expirationMonth: string;
|
|
218
215
|
expirationYear: string;
|
|
219
216
|
name: string;
|
|
220
217
|
number: string;
|
|
@@ -223,8 +220,7 @@ export declare const walletSchema: z.ZodObject<{
|
|
|
223
220
|
number: string;
|
|
224
221
|
name: string;
|
|
225
222
|
cvv: string;
|
|
226
|
-
|
|
227
|
-
expirationYear: string;
|
|
223
|
+
expiration: string;
|
|
228
224
|
}>;
|
|
229
225
|
}, "strip", z.ZodTypeAny, {
|
|
230
226
|
address: {
|
|
@@ -239,7 +235,7 @@ export declare const walletSchema: z.ZodObject<{
|
|
|
239
235
|
stateProvince: string;
|
|
240
236
|
};
|
|
241
237
|
creditCard: {
|
|
242
|
-
expirationMonth:
|
|
238
|
+
expirationMonth: string;
|
|
243
239
|
expirationYear: string;
|
|
244
240
|
name: string;
|
|
245
241
|
number: string;
|
|
@@ -261,8 +257,7 @@ export declare const walletSchema: z.ZodObject<{
|
|
|
261
257
|
number: string;
|
|
262
258
|
name: string;
|
|
263
259
|
cvv: string;
|
|
264
|
-
|
|
265
|
-
expirationYear: string;
|
|
260
|
+
expiration: string;
|
|
266
261
|
};
|
|
267
262
|
}>;
|
|
268
263
|
export type WalletFormFields = z.input<typeof walletSchema>;
|