@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.
@@ -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 settings in ShipEngine API.
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
- export declare const styles: Record<"form", import("@emotion/serialize").Interpolation<import("@packlink/brands/dist/js/theme/Theme").Theme>>;
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,3 @@
1
+ import { InputProps as NativeInputProps } from "@packlink/giger";
2
+ import { ControlledField } from "../create-field-controller";
3
+ export declare const ExpirationInput: ControlledField<NativeInputProps>;
@@ -0,0 +1 @@
1
+ export * from "./expiration-input";
@@ -1,6 +1,7 @@
1
1
  export * from "./credit-card-input";
2
2
  export * from "./checkbox-input";
3
3
  export * from "./date-picker";
4
+ export * from "./expiration-input";
4
5
  export * from "./input-group";
5
6
  export * from "./money-input";
6
7
  export * from "./number-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: string;
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, isLoadingDhl, isLoadingUps, onCompleteOnboarding, registerDhlCarrier, registerDhlCarrierErrors, registerStampsCarrier, registerStampsCarrierErrors, registerUpsCarrier, registerUpsCarrierErrors, warehouses, }: OnboardingProps) => import("@emotion/react/jsx-runtime").JSX.Element;
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<"lastStep" | "step", import("@emotion/serialize").Interpolation<import("@packlink/brands/dist/js/theme/Theme").Theme>>;
1
+ export declare const styles: Record<"step" | "wrapper", import("@emotion/serialize").Interpolation<import("@packlink/brands/dist/js/theme/Theme").Theme>>;
@@ -1,5 +1,6 @@
1
1
  import { SE } from "@shipengine/api";
2
2
  export type RateFormFeatures = {
3
+ enableFunding?: boolean;
3
4
  enableGlobalPostFiltering?: boolean;
4
5
  includeRecommendedRates?: boolean;
5
6
  nicknameRate?: boolean;
@@ -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
- expirationMonth: z.ZodEnum<["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"]>;
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
- expirationMonth: "01" | "02" | "03" | "04" | "05" | "06" | "07" | "08" | "09" | "10" | "11" | "12";
209
- expirationYear: string;
207
+ expiration: string;
210
208
  }, {
211
209
  number: string;
212
210
  name: string;
213
211
  cvv: string;
214
- expirationMonth: "01" | "02" | "03" | "04" | "05" | "06" | "07" | "08" | "09" | "10" | "11" | "12";
215
- expirationYear: string;
212
+ expiration: string;
216
213
  }>, {
217
- expirationMonth: "01" | "02" | "03" | "04" | "05" | "06" | "07" | "08" | "09" | "10" | "11" | "12";
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
- expirationMonth: "01" | "02" | "03" | "04" | "05" | "06" | "07" | "08" | "09" | "10" | "11" | "12";
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: "01" | "02" | "03" | "04" | "05" | "06" | "07" | "08" | "09" | "10" | "11" | "12";
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
- expirationMonth: "01" | "02" | "03" | "04" | "05" | "06" | "07" | "08" | "09" | "10" | "11" | "12";
265
- expirationYear: string;
260
+ expiration: string;
266
261
  };
267
262
  }>;
268
263
  export type WalletFormFields = z.input<typeof walletSchema>;