@shipengine/elements 0.14.0 → 0.16.0
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/field/create-field-controller.d.ts +3 -1
- package/components/field/credit-card-input/credit-card-input.d.ts +3 -0
- package/components/field/credit-card-input/index.d.ts +1 -0
- package/components/field/fields.d.ts +1 -0
- package/components/field/money-input/hooks/use-utils.d.ts +1 -1
- package/components/field/money-input/money-input.d.ts +1 -1
- package/components/field/rate-card/cost-breakdown/cost-breakdown.d.ts +1 -1
- package/components/form-portal/form-portal.d.ts +18 -0
- package/components/form-portal/index.d.ts +1 -0
- package/components/index.d.ts +1 -0
- package/components/items-breakdown/items-breakdown.d.ts +1 -1
- package/components/organisms/auto-funding-form/auto-funding-form.d.ts +4 -3
- package/components/organisms/auto-funding-form/auto-funding-form.styles.d.ts +1 -0
- package/components/organisms/auto-funding-form/auto-funding-schema.d.ts +10 -10
- package/components/organisms/manual-funding-form/manual-funding-form.d.ts +3 -2
- package/components/organisms/manual-funding-form/manual-funding-schema.d.ts +5 -5
- package/components/portal/portal.d.ts +1 -1
- package/components/settings-card/settings-card.d.ts +6 -1
- package/components/settings-card/settings-card.styles.d.ts +1 -6
- package/components/templates/add-carrier-form/add-carrier-form-schema.d.ts +140 -0
- package/components/templates/add-carrier-form/add-carrier-form-test.d.ts +1 -0
- package/components/templates/add-carrier-form/add-carrier-form.d.ts +10 -0
- package/components/templates/add-carrier-form/index.d.ts +2 -0
- package/components/templates/address-display/address-display.d.ts +1 -1
- package/components/templates/address-form/address-fields.d.ts +10 -0
- package/components/templates/{billing-form/billing-schema.d.ts → address-form/address-form-schema.d.ts} +54 -36
- package/components/templates/address-form/address-form.d.ts +2 -2
- package/components/templates/address-form/address-schema.d.ts +7 -221
- package/components/templates/address-form/index.d.ts +2 -0
- package/components/templates/address-preference-display/address-preference-display.d.ts +1 -1
- package/components/templates/carrier-recovery-form/carrier-recovery-form-schema.d.ts +238 -0
- package/components/templates/carrier-recovery-form/carrier-recovery-form.d.ts +10 -0
- package/components/templates/carrier-recovery-form/carrier-recovery-form.styles.d.ts +1 -0
- package/components/templates/carrier-recovery-form/index.d.ts +2 -0
- package/components/templates/carrier-terms-form/carrier-terms-form-schema.d.ts +10 -0
- package/components/templates/carrier-terms-form/carrier-terms-form.d.ts +6 -0
- package/components/templates/carrier-terms-form/carrier-terms-form.styles.d.ts +1 -0
- package/components/templates/carrier-terms-form/index.d.ts +1 -0
- package/components/templates/customs-item-form/customs-item-form-schema.d.ts +112 -12
- package/components/templates/customs-item-form/customs-item-form.d.ts +3 -2
- package/components/templates/customs-items-display/customs-items-display.d.ts +1 -1
- package/components/templates/display-carrier-terms/display-carrier-terms.d.ts +6 -0
- package/components/templates/display-carrier-terms/index.d.ts +1 -0
- package/components/templates/edit-billing-form/edit-billing-form.d.ts +6 -0
- package/components/templates/edit-billing-form/edit-billing-form.styles.d.ts +1 -0
- package/components/templates/edit-billing-form/index.d.ts +1 -0
- package/components/templates/funding-methods/funding-methods.d.ts +6 -5
- package/components/templates/funding-methods/funding-methods.styles.d.ts +1 -0
- package/components/templates/index.d.ts +8 -3
- package/components/templates/label/label.d.ts +2 -2
- package/components/templates/landing-page/index.d.ts +1 -0
- package/components/templates/landing-page/landing-page-form-schema.d.ts +10 -0
- package/components/templates/landing-page/landing-page-form.d.ts +4 -0
- package/components/templates/landing-page/landing-page.d.ts +4 -0
- package/components/templates/landing-page/landing-page.styles.d.ts +1 -0
- package/components/templates/list-carriers/index.d.ts +1 -0
- package/components/templates/list-carriers/list-carriers.d.ts +9 -0
- package/components/templates/list-carriers/list-carriers.styles.d.ts +1 -0
- package/components/templates/list-carriers-row/index.d.ts +1 -0
- package/components/templates/list-carriers-row/list-carriers-row.d.ts +9 -0
- package/components/templates/list-carriers-row/list-carriers-row.styles.d.ts +1 -0
- package/components/templates/manage-wallet/index.d.ts +1 -0
- package/components/templates/manage-wallet/manage-wallet.d.ts +1 -0
- package/components/templates/manage-wallet/manage-wallet.styles.d.ts +1 -0
- package/components/templates/manage-warehouses/manage-warehouses.d.ts +7 -2
- package/components/templates/onboarding/index.d.ts +1 -0
- package/components/templates/onboarding/onboarding.d.ts +18 -0
- package/components/templates/onboarding/onboarding.styles.d.ts +1 -0
- package/components/templates/rate-form/rate-form.d.ts +2 -2
- package/components/templates/sales-order/sales-order.d.ts +1 -1
- package/components/templates/shipment/shipment.d.ts +1 -1
- package/components/templates/shipment-form/shipment-form.d.ts +3 -3
- package/components/templates/shipment-form/shipment-schema.d.ts +11 -11
- package/components/templates/void-label/void-label.d.ts +1 -1
- package/components/templates/wallet-card/index.d.ts +1 -0
- package/components/templates/wallet-card/wallet-card.d.ts +4 -0
- package/components/templates/wallet-card/wallet-card.styles.d.ts +1 -0
- package/components/templates/wallet-form/billing-fields.d.ts +6 -0
- package/components/templates/wallet-form/edit-wallet-address-form.d.ts +16 -0
- package/components/templates/wallet-form/index.d.ts +4 -0
- package/components/templates/wallet-form/wallet-form.d.ts +11 -0
- package/components/templates/wallet-form/wallet-form.styles.d.ts +1 -0
- package/components/templates/wallet-form/wallet-schema.d.ts +269 -0
- package/components/templates/warehouse-display/warehouse-display.d.ts +1 -1
- package/components/templates/warehouse-form/index.d.ts +1 -0
- package/components/templates/warehouse-form/warehouse-form-schema.d.ts +503 -0
- package/components/templates/warehouse-form/warehouse-form.d.ts +10 -0
- package/components/templates/warehouse-form/warehouse-form.styles.d.ts +1 -0
- package/constants/shipengine/address.d.ts +5 -0
- package/elements/components/configure-shipment/configure-shipment.d.ts +1 -1
- package/elements/components/configure-shipment/hooks/use-address.d.ts +3 -3
- package/elements/components/configure-shipment/hooks/use-customs.d.ts +3 -3
- package/elements/components/configure-shipment/hooks/use-presets.d.ts +2 -2
- package/elements/components/configure-shipment/hooks/use-rates-form.d.ts +2 -2
- package/elements/components/configure-shipment/hooks/use-request-rates.d.ts +2 -2
- package/elements/components/configure-shipment/hooks/use-shipment-form.d.ts +6 -6
- package/elements/components/index.d.ts +2 -2
- package/elements/components/list-carriers/hooks/use-list-connected-carriers.d.ts +11 -0
- package/elements/components/list-carriers/index.d.ts +1 -0
- package/elements/components/list-carriers/list-carriers.d.ts +1 -0
- package/elements/components/manage-funding/manage-funding.d.ts +6 -2
- package/elements/components/onboarding/index.d.ts +1 -0
- package/elements/components/onboarding/onboarding.d.ts +4 -0
- package/elements/components/sales-order/hooks/use-configure-shipment.d.ts +3 -1
- package/elements/components/sales-order/hooks/use-import-sales-order.d.ts +2 -2
- package/elements/components/sales-order/hooks/use-pending-shipment.d.ts +1 -1
- package/elements/components/sales-order/sales-order.d.ts +1 -1
- package/elements/components/shipment/shipment.d.ts +1 -1
- package/elements/components/void-label/void-label.d.ts +1 -1
- package/elements/index.d.ts +2 -2
- package/elements/list-carriers.d.ts +1 -0
- package/elements/manage-funding.d.ts +1 -1
- package/elements/onboarding.d.ts +1 -0
- package/factories/shipengine/address.d.ts +1 -1
- package/factories/shipengine/carrier.d.ts +1 -1
- package/factories/shipengine/label.d.ts +1 -1
- package/factories/shipengine/money.d.ts +1 -1
- package/factories/shipengine/order-source.d.ts +10 -2
- package/factories/shipengine/package.d.ts +2 -2
- package/factories/shipengine/resource.d.ts +1 -1
- package/factories/shipengine/sales-order.d.ts +1 -1
- package/factories/shipengine/service.d.ts +2 -2
- package/factories/shipengine/shipment.d.ts +4 -4
- package/factories/shipengine/warehouse.d.ts +1 -1
- package/factories/shipengine/weight.d.ts +1 -1
- package/hooks/index.d.ts +1 -0
- package/hooks/options/use-confirmation-options.d.ts +1 -1
- package/hooks/options/use-customs-contents-options.d.ts +1 -1
- package/hooks/options/use-customs-non-delivery-options.d.ts +1 -1
- package/hooks/options/use-insurance-provider-options.d.ts +2 -2
- package/hooks/options/use-package-options.d.ts +2 -2
- package/hooks/options/use-rate-options.d.ts +1 -1
- package/hooks/options/use-service-code-options.d.ts +1 -1
- package/hooks/options/use-warehouse-options.d.ts +1 -1
- package/hooks/use-carrier-metadata.d.ts +2 -5
- package/hooks/use-elements.d.ts +2 -2
- package/hooks/use-toggle.d.ts +12 -0
- package/index.cjs +19433 -17322
- package/index.js +20014 -17903
- package/locales/en/index.d.ts +107 -2
- package/mocks/browser.d.ts +1 -0
- package/mocks/carriers/handlers.d.ts +1 -0
- package/mocks/handlers.d.ts +12 -0
- package/package.json +8 -6
- package/register.d.ts +1 -4
- package/schemas/shipengine/index.d.ts +0 -1
- package/schemas/shipengine/money.d.ts +1 -1
- package/testing/index.d.ts +0 -1
- package/types/carrier-metadata.d.ts +10 -5
- package/types/shipping-preset/shipping-preset.d.ts +2 -2
- package/utilities/date.d.ts +13 -1
- package/utilities/money.d.ts +2 -1
- package/utilities/rates.d.ts +1 -1
- package/utilities/shipengine/address.d.ts +1 -1
- package/utilities/shipengine/dimensions.d.ts +1 -1
- package/utilities/shipengine/sales-order.d.ts +1 -1
- package/utilities/shipengine/shipment.d.ts +1 -1
- package/utilities/shipengine/weight.d.ts +1 -1
- package/components/templates/add-carriers/add-carriers.d.ts +0 -5
- package/components/templates/add-carriers/index.d.ts +0 -1
- package/components/templates/agreement-form/agreement-form-schema.d.ts +0 -10
- package/components/templates/agreement-form/agreement-form.d.ts +0 -8
- package/components/templates/agreement-form/agreement-form.styles.d.ts +0 -1
- package/components/templates/agreement-form/index.d.ts +0 -1
- package/components/templates/billing-form/billing-form-stories.d.ts +0 -6
- package/components/templates/billing-form/billing-form.d.ts +0 -9
- package/components/templates/billing-form/index.d.ts +0 -2
- package/components/templates/register-wallet/index.d.ts +0 -1
- package/components/templates/register-wallet/register-wallet.d.ts +0 -3
- package/components/templates/register-wallet/register-wallet.styles.d.ts +0 -6
- package/elements/add-carriers.d.ts +0 -1
- package/elements/components/add-carriers/add-carriers.d.ts +0 -8
- package/elements/components/add-carriers/index.d.ts +0 -1
- package/elements/components/register-wallet/index.d.ts +0 -1
- package/elements/components/register-wallet/register-wallet.d.ts +0 -9
- package/elements/register-wallet.d.ts +0 -1
- package/schemas/shipengine/address.d.ts +0 -17
- package/testing/swr.d.ts +0 -15
|
@@ -11,13 +11,15 @@ export type FieldControllerProps<NP, TFieldValues extends FieldValues = FieldVal
|
|
|
11
11
|
displayLabel?: boolean;
|
|
12
12
|
errors?: string[];
|
|
13
13
|
inputOnly?: boolean;
|
|
14
|
+
isOptional?: boolean;
|
|
14
15
|
label: string;
|
|
15
16
|
labelWeight?: FieldLabelProps["weight"];
|
|
17
|
+
nativeLabel?: boolean;
|
|
16
18
|
} & Omit<FieldLabelProps, "children" | "weight"> & Omit<UseControllerProps<TFieldValues, TName>, "defaultValue"> & ControlledFormInputProps<NP>;
|
|
17
19
|
type FieldControllerOptions = {
|
|
18
20
|
inputOnly?: boolean;
|
|
19
21
|
};
|
|
20
|
-
export declare const createFieldController: <P>(options?: FieldControllerOptions) => <TFieldValues extends FieldValues = FieldValues, TName extends import("react-hook-form").Path<TFieldValues> = import("react-hook-form").Path<TFieldValues>>({ children, control, defaultValue, displayErrors, displayLabel, errors: errorsProp, inputOnly, label, labelWeight, name, rules, shouldUnregister, subLabel, ...formInputProps }: FieldControllerProps<P, TFieldValues, TName>) => JSX.Element;
|
|
22
|
+
export declare const createFieldController: <P>(options?: FieldControllerOptions) => <TFieldValues extends FieldValues = FieldValues, TName extends import("react-hook-form").Path<TFieldValues> = import("react-hook-form").Path<TFieldValues>>({ children, control, defaultValue, displayErrors, displayLabel, errors: errorsProp, inputOnly, isOptional, label, labelWeight, name, nativeLabel, rules, shouldUnregister, subLabel, ...formInputProps }: FieldControllerProps<P, TFieldValues, TName>) => JSX.Element;
|
|
21
23
|
export type ControlledFieldProps = Parameters<ControlledField>[0];
|
|
22
24
|
export type ControlledField<NP = object, CP = object, OK extends string = ""> = <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>(fieldProps: Omit<FieldControllerProps<NP, TFieldValues, TName>, "children" | OK> & CP) => JSX.Element;
|
|
23
25
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./credit-card-input";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Interpolation, Theme } from "@emotion/react";
|
|
3
|
+
declare const variants: readonly ["well"];
|
|
4
|
+
type FormPortalProps = {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
css?: Interpolation<Theme>;
|
|
7
|
+
id: `${string}-form`;
|
|
8
|
+
onSubmit: (e: React.SyntheticEvent) => Promise<void> | void;
|
|
9
|
+
variant?: typeof variants[number];
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* A drop-in replacement for the `<form>` tag that allows nested forms.
|
|
13
|
+
*
|
|
14
|
+
* Via portals, the <form> tag is mounted as a sibling of the app root. The form's
|
|
15
|
+
* interface is then mounted back at the point of use.
|
|
16
|
+
*/
|
|
17
|
+
export declare const FormPortal: ({ css, children, id, onSubmit, variant }: FormPortalProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./form-portal";
|
package/components/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SE } from "@shipengine/api";
|
|
2
2
|
import { AutoFundingFormPayload } from "./auto-funding-schema";
|
|
3
3
|
export type AutoFundingFormProps = {
|
|
4
|
-
defaultValues
|
|
4
|
+
defaultValues?: SE.CarrierAutoFundingSettings;
|
|
5
5
|
errorMessage?: string;
|
|
6
6
|
hasError: boolean;
|
|
7
|
+
isInteger?: boolean;
|
|
7
8
|
isLoading: boolean;
|
|
8
9
|
onSubmit: (payload: AutoFundingFormPayload) => Promise<void> | void;
|
|
9
10
|
onToggle: (enabled: boolean) => Promise<void> | void;
|
|
@@ -12,4 +13,4 @@ export type AutoFundingFormProps = {
|
|
|
12
13
|
* This form that allows users to enable or disable auto funding, and
|
|
13
14
|
* configure auto funding settings in ShipEngine API.
|
|
14
15
|
*/
|
|
15
|
-
export declare const AutoFundingForm: ({ defaultValues, errorMessage, hasError, isLoading, onSubmit, onToggle, }: AutoFundingFormProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const AutoFundingForm: ({ defaultValues, errorMessage, hasError, isInteger, isLoading, onSubmit, onToggle, }: AutoFundingFormProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: Record<"form", import("@emotion/serialize").Interpolation<import("@packlink/brands/dist/js/theme/Theme").Theme>>;
|
|
@@ -3,50 +3,50 @@ export declare const autoFundingSchema: z.ZodObject<{
|
|
|
3
3
|
isEnabled: z.ZodBoolean;
|
|
4
4
|
lowBalancePurchaseThreshold: z.ZodObject<z.extendShape<{
|
|
5
5
|
amount: z.ZodNumber;
|
|
6
|
-
currency: z.ZodNativeEnum<typeof import("
|
|
6
|
+
currency: z.ZodNativeEnum<typeof import("@shipengine/api").Currency>;
|
|
7
7
|
}, {
|
|
8
8
|
amount: z.ZodNumber;
|
|
9
9
|
}>, "strip", z.ZodTypeAny, {
|
|
10
10
|
amount: number;
|
|
11
|
-
currency: import("
|
|
11
|
+
currency: import("@shipengine/api").Currency;
|
|
12
12
|
}, {
|
|
13
13
|
amount: number;
|
|
14
|
-
currency: import("
|
|
14
|
+
currency: import("@shipengine/api").Currency;
|
|
15
15
|
}>;
|
|
16
16
|
maximumPurchasesPerDay: z.ZodNumber;
|
|
17
17
|
purchaseAmount: z.ZodObject<z.extendShape<{
|
|
18
18
|
amount: z.ZodNumber;
|
|
19
|
-
currency: z.ZodNativeEnum<typeof import("
|
|
19
|
+
currency: z.ZodNativeEnum<typeof import("@shipengine/api").Currency>;
|
|
20
20
|
}, {
|
|
21
21
|
amount: z.ZodNumber;
|
|
22
22
|
}>, "strip", z.ZodTypeAny, {
|
|
23
23
|
amount: number;
|
|
24
|
-
currency: import("
|
|
24
|
+
currency: import("@shipengine/api").Currency;
|
|
25
25
|
}, {
|
|
26
26
|
amount: number;
|
|
27
|
-
currency: import("
|
|
27
|
+
currency: import("@shipengine/api").Currency;
|
|
28
28
|
}>;
|
|
29
29
|
}, "strip", z.ZodTypeAny, {
|
|
30
30
|
isEnabled: boolean;
|
|
31
31
|
lowBalancePurchaseThreshold: {
|
|
32
32
|
amount: number;
|
|
33
|
-
currency: import("
|
|
33
|
+
currency: import("@shipengine/api").Currency;
|
|
34
34
|
};
|
|
35
35
|
maximumPurchasesPerDay: number;
|
|
36
36
|
purchaseAmount: {
|
|
37
37
|
amount: number;
|
|
38
|
-
currency: import("
|
|
38
|
+
currency: import("@shipengine/api").Currency;
|
|
39
39
|
};
|
|
40
40
|
}, {
|
|
41
41
|
isEnabled: boolean;
|
|
42
42
|
lowBalancePurchaseThreshold: {
|
|
43
43
|
amount: number;
|
|
44
|
-
currency: import("
|
|
44
|
+
currency: import("@shipengine/api").Currency;
|
|
45
45
|
};
|
|
46
46
|
maximumPurchasesPerDay: number;
|
|
47
47
|
purchaseAmount: {
|
|
48
48
|
amount: number;
|
|
49
|
-
currency: import("
|
|
49
|
+
currency: import("@shipengine/api").Currency;
|
|
50
50
|
};
|
|
51
51
|
}>;
|
|
52
52
|
export type AutoFundingFormFields = z.input<typeof autoFundingSchema>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { ManualFundingFormPayload } from "./manual-funding-schema";
|
|
3
3
|
export type ManualFundingFormProps<T = undefined> = {
|
|
4
4
|
currentBalance: number;
|
|
5
5
|
errorMessage?: string;
|
|
6
6
|
hasError: boolean;
|
|
7
7
|
isLoading: boolean;
|
|
8
|
+
onCancel: () => Promise<void> | void;
|
|
8
9
|
onSubmit: (payload: ManualFundingFormPayload) => Promise<void> | void;
|
|
9
10
|
requiredAmount?: number;
|
|
10
11
|
} & ({
|
|
@@ -14,4 +15,4 @@ export type ManualFundingFormProps<T = undefined> = {
|
|
|
14
15
|
formId?: string;
|
|
15
16
|
portalRef?: never;
|
|
16
17
|
});
|
|
17
|
-
export declare const ManualFundingForm: <T extends Element>({ currentBalance, errorMessage, formId, hasError, isLoading, onSubmit, portalRef, requiredAmount, }: ManualFundingFormProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare const ManualFundingForm: <T extends Element>({ currentBalance, errorMessage, formId, hasError, isLoading, onCancel, onSubmit, portalRef, requiredAmount, }: ManualFundingFormProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -2,25 +2,25 @@ import { z } from "zod";
|
|
|
2
2
|
export declare const manualFundingSchema: z.ZodObject<{
|
|
3
3
|
funds: z.ZodObject<z.extendShape<{
|
|
4
4
|
amount: z.ZodNumber;
|
|
5
|
-
currency: z.ZodNativeEnum<typeof import("
|
|
5
|
+
currency: z.ZodNativeEnum<typeof import("@shipengine/api").Currency>;
|
|
6
6
|
}, {
|
|
7
7
|
amount: z.ZodNumber;
|
|
8
8
|
}>, "strip", z.ZodTypeAny, {
|
|
9
9
|
amount: number;
|
|
10
|
-
currency: import("
|
|
10
|
+
currency: import("@shipengine/api").Currency;
|
|
11
11
|
}, {
|
|
12
12
|
amount: number;
|
|
13
|
-
currency: import("
|
|
13
|
+
currency: import("@shipengine/api").Currency;
|
|
14
14
|
}>;
|
|
15
15
|
}, "strip", z.ZodTypeAny, {
|
|
16
16
|
funds: {
|
|
17
17
|
amount: number;
|
|
18
|
-
currency: import("
|
|
18
|
+
currency: import("@shipengine/api").Currency;
|
|
19
19
|
};
|
|
20
20
|
}, {
|
|
21
21
|
funds: {
|
|
22
22
|
amount: number;
|
|
23
|
-
currency: import("
|
|
23
|
+
currency: import("@shipengine/api").Currency;
|
|
24
24
|
};
|
|
25
25
|
}>;
|
|
26
26
|
export type ManualFundingFormFields = z.input<typeof manualFundingSchema>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export type PortalProps<T> = {
|
|
3
3
|
children: React.ReactNode;
|
|
4
|
-
target?: React.RefObject<T> | HTMLElement;
|
|
4
|
+
target?: React.RefObject<T> | HTMLElement | null;
|
|
5
5
|
};
|
|
6
6
|
/**
|
|
7
7
|
* A no-frills wrapper around React.createPortal for more elegant DOM composition
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export type SettingsCardProps = {
|
|
3
|
+
accessoryAction?: {
|
|
4
|
+
action: () => void;
|
|
5
|
+
name: string;
|
|
6
|
+
};
|
|
3
7
|
cardAction: {
|
|
4
8
|
action: () => void;
|
|
5
9
|
name: string;
|
|
@@ -7,5 +11,6 @@ export type SettingsCardProps = {
|
|
|
7
11
|
children?: React.ReactNode;
|
|
8
12
|
subtitle?: string;
|
|
9
13
|
title: string | JSX.Element;
|
|
14
|
+
verticallyAligned?: boolean;
|
|
10
15
|
};
|
|
11
|
-
export declare const SettingsCard: ({ cardAction, children, subtitle, title }: SettingsCardProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const SettingsCard: ({ accessoryAction, cardAction, children, subtitle, title, verticallyAligned, }: SettingsCardProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { Theme } from "@packlink/brands";
|
|
3
|
-
export declare const getSettingsCardContainerStyles: (theme: Theme) => SerializedStyles;
|
|
4
|
-
export declare const getSettingsCardHeaderStyles: (theme: Theme) => SerializedStyles;
|
|
5
|
-
export declare const getSettingsCardTitleStyles: (theme: Theme) => SerializedStyles;
|
|
6
|
-
export declare const getSettingsCardBodyStyles: (theme: Theme) => SerializedStyles;
|
|
1
|
+
export declare const styles: Record<"body" | "container" | "header" | "title" | "verticalContainer", import("@emotion/serialize").Interpolation<import("@packlink/brands/dist/js/theme/Theme").Theme>>;
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const addCarrierSchema: z.ZodObject<{
|
|
3
|
+
address: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<z.extendShape<{
|
|
4
|
+
addressLine1: z.ZodString;
|
|
5
|
+
addressLine2: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string | undefined, string | null | undefined>;
|
|
6
|
+
cityLocality: z.ZodString;
|
|
7
|
+
companyName: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string | undefined, string | null | undefined>;
|
|
8
|
+
countryCode: z.ZodEnum<["AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BR", "IO", "VG", "BN", "BG", "BF", "BI", "CA", "KH", "CM", "CV", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FM", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "CI", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KR", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "AN", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "KP", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "VI", "UM", "US", "UY", "UZ", "VU", "VE", "VN", "WF", "EH", "YE", "ZM", "ZW"]>;
|
|
9
|
+
name: z.ZodEffects<z.ZodString, string, string>;
|
|
10
|
+
phone: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string, string | null | undefined>;
|
|
11
|
+
postalCode: z.ZodString;
|
|
12
|
+
stateProvince: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string, string | null | undefined>;
|
|
13
|
+
}, {
|
|
14
|
+
addressResidentialIndicator: z.ZodEffects<z.ZodEffects<z.ZodDefault<z.ZodBoolean>, "yes" | "no", boolean | undefined>, "yes" | "no", unknown>;
|
|
15
|
+
companyName: z.ZodString;
|
|
16
|
+
phone: z.ZodString;
|
|
17
|
+
}>, "strip", z.ZodTypeAny, {
|
|
18
|
+
addressLine2?: string | undefined;
|
|
19
|
+
addressLine1: string;
|
|
20
|
+
cityLocality: string;
|
|
21
|
+
companyName: string;
|
|
22
|
+
countryCode: "AF" | "AX" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AQ" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BQ" | "BA" | "BW" | "BR" | "IO" | "VG" | "BN" | "BG" | "BF" | "BI" | "CA" | "KH" | "CM" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CX" | "CC" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "HR" | "CU" | "CW" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FK" | "FO" | "FM" | "FJ" | "FI" | "FR" | "GF" | "PF" | "TF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GG" | "GN" | "GW" | "GY" | "HT" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IM" | "IL" | "IT" | "CI" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "KR" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "AN" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "KP" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PN" | "PL" | "PT" | "PR" | "QA" | "RE" | "RO" | "RU" | "RW" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SX" | "SK" | "SI" | "SB" | "SO" | "ZA" | "GS" | "SS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "VI" | "UM" | "US" | "UY" | "UZ" | "VU" | "VE" | "VN" | "WF" | "EH" | "YE" | "ZM" | "ZW";
|
|
23
|
+
name: string;
|
|
24
|
+
phone: string;
|
|
25
|
+
postalCode: string;
|
|
26
|
+
stateProvince: string;
|
|
27
|
+
addressResidentialIndicator: "yes" | "no";
|
|
28
|
+
}, {
|
|
29
|
+
addressLine2?: string | null | undefined;
|
|
30
|
+
stateProvince?: string | null | undefined;
|
|
31
|
+
addressResidentialIndicator?: unknown;
|
|
32
|
+
addressLine1: string;
|
|
33
|
+
cityLocality: string;
|
|
34
|
+
companyName: string;
|
|
35
|
+
countryCode: "AF" | "AX" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AQ" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BQ" | "BA" | "BW" | "BR" | "IO" | "VG" | "BN" | "BG" | "BF" | "BI" | "CA" | "KH" | "CM" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CX" | "CC" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "HR" | "CU" | "CW" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FK" | "FO" | "FM" | "FJ" | "FI" | "FR" | "GF" | "PF" | "TF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GG" | "GN" | "GW" | "GY" | "HT" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IM" | "IL" | "IT" | "CI" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "KR" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "AN" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "KP" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PN" | "PL" | "PT" | "PR" | "QA" | "RE" | "RO" | "RU" | "RW" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SX" | "SK" | "SI" | "SB" | "SO" | "ZA" | "GS" | "SS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "VI" | "UM" | "US" | "UY" | "UZ" | "VU" | "VE" | "VN" | "WF" | "EH" | "YE" | "ZM" | "ZW";
|
|
36
|
+
name: string;
|
|
37
|
+
phone: string;
|
|
38
|
+
postalCode: string;
|
|
39
|
+
}>, {
|
|
40
|
+
addressLine2?: string | undefined;
|
|
41
|
+
addressLine1: string;
|
|
42
|
+
cityLocality: string;
|
|
43
|
+
companyName: string;
|
|
44
|
+
countryCode: "AF" | "AX" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AQ" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BQ" | "BA" | "BW" | "BR" | "IO" | "VG" | "BN" | "BG" | "BF" | "BI" | "CA" | "KH" | "CM" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CX" | "CC" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "HR" | "CU" | "CW" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FK" | "FO" | "FM" | "FJ" | "FI" | "FR" | "GF" | "PF" | "TF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GG" | "GN" | "GW" | "GY" | "HT" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IM" | "IL" | "IT" | "CI" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "KR" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "AN" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "KP" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PN" | "PL" | "PT" | "PR" | "QA" | "RE" | "RO" | "RU" | "RW" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SX" | "SK" | "SI" | "SB" | "SO" | "ZA" | "GS" | "SS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "VI" | "UM" | "US" | "UY" | "UZ" | "VU" | "VE" | "VN" | "WF" | "EH" | "YE" | "ZM" | "ZW";
|
|
45
|
+
name: string;
|
|
46
|
+
phone: string;
|
|
47
|
+
postalCode: string;
|
|
48
|
+
stateProvince: string;
|
|
49
|
+
addressResidentialIndicator: "yes" | "no";
|
|
50
|
+
}, {
|
|
51
|
+
addressLine2?: string | null | undefined;
|
|
52
|
+
stateProvince?: string | null | undefined;
|
|
53
|
+
addressResidentialIndicator?: unknown;
|
|
54
|
+
addressLine1: string;
|
|
55
|
+
cityLocality: string;
|
|
56
|
+
companyName: string;
|
|
57
|
+
countryCode: "AF" | "AX" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AQ" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BQ" | "BA" | "BW" | "BR" | "IO" | "VG" | "BN" | "BG" | "BF" | "BI" | "CA" | "KH" | "CM" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CX" | "CC" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "HR" | "CU" | "CW" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FK" | "FO" | "FM" | "FJ" | "FI" | "FR" | "GF" | "PF" | "TF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GG" | "GN" | "GW" | "GY" | "HT" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IM" | "IL" | "IT" | "CI" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "KR" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "AN" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "KP" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PN" | "PL" | "PT" | "PR" | "QA" | "RE" | "RO" | "RU" | "RW" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SX" | "SK" | "SI" | "SB" | "SO" | "ZA" | "GS" | "SS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "VI" | "UM" | "US" | "UY" | "UZ" | "VU" | "VE" | "VN" | "WF" | "EH" | "YE" | "ZM" | "ZW";
|
|
58
|
+
name: string;
|
|
59
|
+
phone: string;
|
|
60
|
+
postalCode: string;
|
|
61
|
+
}>, {
|
|
62
|
+
addressLine2?: string | undefined;
|
|
63
|
+
addressLine1: string;
|
|
64
|
+
cityLocality: string;
|
|
65
|
+
companyName: string;
|
|
66
|
+
countryCode: "AF" | "AX" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AQ" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BQ" | "BA" | "BW" | "BR" | "IO" | "VG" | "BN" | "BG" | "BF" | "BI" | "CA" | "KH" | "CM" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CX" | "CC" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "HR" | "CU" | "CW" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FK" | "FO" | "FM" | "FJ" | "FI" | "FR" | "GF" | "PF" | "TF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GG" | "GN" | "GW" | "GY" | "HT" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IM" | "IL" | "IT" | "CI" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "KR" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "AN" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "KP" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PN" | "PL" | "PT" | "PR" | "QA" | "RE" | "RO" | "RU" | "RW" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SX" | "SK" | "SI" | "SB" | "SO" | "ZA" | "GS" | "SS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "VI" | "UM" | "US" | "UY" | "UZ" | "VU" | "VE" | "VN" | "WF" | "EH" | "YE" | "ZM" | "ZW";
|
|
67
|
+
name: string;
|
|
68
|
+
phone: string;
|
|
69
|
+
postalCode: string;
|
|
70
|
+
stateProvince: string;
|
|
71
|
+
addressResidentialIndicator: "yes" | "no";
|
|
72
|
+
}, {
|
|
73
|
+
addressLine2?: string | null | undefined;
|
|
74
|
+
stateProvince?: string | null | undefined;
|
|
75
|
+
addressResidentialIndicator?: unknown;
|
|
76
|
+
addressLine1: string;
|
|
77
|
+
cityLocality: string;
|
|
78
|
+
companyName: string;
|
|
79
|
+
countryCode: "AF" | "AX" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AQ" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BQ" | "BA" | "BW" | "BR" | "IO" | "VG" | "BN" | "BG" | "BF" | "BI" | "CA" | "KH" | "CM" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CX" | "CC" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "HR" | "CU" | "CW" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FK" | "FO" | "FM" | "FJ" | "FI" | "FR" | "GF" | "PF" | "TF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GG" | "GN" | "GW" | "GY" | "HT" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IM" | "IL" | "IT" | "CI" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "KR" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "AN" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "KP" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PN" | "PL" | "PT" | "PR" | "QA" | "RE" | "RO" | "RU" | "RW" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SX" | "SK" | "SI" | "SB" | "SO" | "ZA" | "GS" | "SS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "VI" | "UM" | "US" | "UY" | "UZ" | "VU" | "VE" | "VN" | "WF" | "EH" | "YE" | "ZM" | "ZW";
|
|
80
|
+
name: string;
|
|
81
|
+
phone: string;
|
|
82
|
+
postalCode: string;
|
|
83
|
+
}>, {
|
|
84
|
+
addressLine2?: string | undefined;
|
|
85
|
+
addressLine1: string;
|
|
86
|
+
cityLocality: string;
|
|
87
|
+
companyName: string;
|
|
88
|
+
countryCode: "AF" | "AX" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AQ" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BQ" | "BA" | "BW" | "BR" | "IO" | "VG" | "BN" | "BG" | "BF" | "BI" | "CA" | "KH" | "CM" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CX" | "CC" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "HR" | "CU" | "CW" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FK" | "FO" | "FM" | "FJ" | "FI" | "FR" | "GF" | "PF" | "TF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GG" | "GN" | "GW" | "GY" | "HT" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IM" | "IL" | "IT" | "CI" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "KR" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "AN" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "KP" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PN" | "PL" | "PT" | "PR" | "QA" | "RE" | "RO" | "RU" | "RW" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SX" | "SK" | "SI" | "SB" | "SO" | "ZA" | "GS" | "SS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "VI" | "UM" | "US" | "UY" | "UZ" | "VU" | "VE" | "VN" | "WF" | "EH" | "YE" | "ZM" | "ZW";
|
|
89
|
+
name: string;
|
|
90
|
+
phone: string;
|
|
91
|
+
postalCode: string;
|
|
92
|
+
stateProvince: string;
|
|
93
|
+
addressResidentialIndicator: "yes" | "no";
|
|
94
|
+
}, {
|
|
95
|
+
addressLine2?: string | null | undefined;
|
|
96
|
+
stateProvince?: string | null | undefined;
|
|
97
|
+
addressResidentialIndicator?: unknown;
|
|
98
|
+
addressLine1: string;
|
|
99
|
+
cityLocality: string;
|
|
100
|
+
companyName: string;
|
|
101
|
+
countryCode: "AF" | "AX" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AQ" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BQ" | "BA" | "BW" | "BR" | "IO" | "VG" | "BN" | "BG" | "BF" | "BI" | "CA" | "KH" | "CM" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CX" | "CC" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "HR" | "CU" | "CW" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FK" | "FO" | "FM" | "FJ" | "FI" | "FR" | "GF" | "PF" | "TF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GG" | "GN" | "GW" | "GY" | "HT" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IM" | "IL" | "IT" | "CI" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "KR" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "AN" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "KP" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PN" | "PL" | "PT" | "PR" | "QA" | "RE" | "RO" | "RU" | "RW" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SX" | "SK" | "SI" | "SB" | "SO" | "ZA" | "GS" | "SS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "VI" | "UM" | "US" | "UY" | "UZ" | "VU" | "VE" | "VN" | "WF" | "EH" | "YE" | "ZM" | "ZW";
|
|
102
|
+
name: string;
|
|
103
|
+
phone: string;
|
|
104
|
+
postalCode: string;
|
|
105
|
+
}>;
|
|
106
|
+
agreeToCarrierTerms: z.ZodEffects<z.ZodBoolean, boolean, boolean>;
|
|
107
|
+
email: z.ZodString;
|
|
108
|
+
}, "strip", z.ZodTypeAny, {
|
|
109
|
+
address: {
|
|
110
|
+
addressLine2?: string | undefined;
|
|
111
|
+
addressLine1: string;
|
|
112
|
+
cityLocality: string;
|
|
113
|
+
companyName: string;
|
|
114
|
+
countryCode: "AF" | "AX" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AQ" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BQ" | "BA" | "BW" | "BR" | "IO" | "VG" | "BN" | "BG" | "BF" | "BI" | "CA" | "KH" | "CM" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CX" | "CC" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "HR" | "CU" | "CW" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FK" | "FO" | "FM" | "FJ" | "FI" | "FR" | "GF" | "PF" | "TF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GG" | "GN" | "GW" | "GY" | "HT" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IM" | "IL" | "IT" | "CI" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "KR" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "AN" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "KP" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PN" | "PL" | "PT" | "PR" | "QA" | "RE" | "RO" | "RU" | "RW" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SX" | "SK" | "SI" | "SB" | "SO" | "ZA" | "GS" | "SS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "VI" | "UM" | "US" | "UY" | "UZ" | "VU" | "VE" | "VN" | "WF" | "EH" | "YE" | "ZM" | "ZW";
|
|
115
|
+
name: string;
|
|
116
|
+
phone: string;
|
|
117
|
+
postalCode: string;
|
|
118
|
+
stateProvince: string;
|
|
119
|
+
addressResidentialIndicator: "yes" | "no";
|
|
120
|
+
};
|
|
121
|
+
agreeToCarrierTerms: boolean;
|
|
122
|
+
email: string;
|
|
123
|
+
}, {
|
|
124
|
+
address: {
|
|
125
|
+
addressLine2?: string | null | undefined;
|
|
126
|
+
stateProvince?: string | null | undefined;
|
|
127
|
+
addressResidentialIndicator?: unknown;
|
|
128
|
+
addressLine1: string;
|
|
129
|
+
cityLocality: string;
|
|
130
|
+
companyName: string;
|
|
131
|
+
countryCode: "AF" | "AX" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AQ" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BQ" | "BA" | "BW" | "BR" | "IO" | "VG" | "BN" | "BG" | "BF" | "BI" | "CA" | "KH" | "CM" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CX" | "CC" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "HR" | "CU" | "CW" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FK" | "FO" | "FM" | "FJ" | "FI" | "FR" | "GF" | "PF" | "TF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GG" | "GN" | "GW" | "GY" | "HT" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IM" | "IL" | "IT" | "CI" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "KR" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "AN" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "KP" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PN" | "PL" | "PT" | "PR" | "QA" | "RE" | "RO" | "RU" | "RW" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SX" | "SK" | "SI" | "SB" | "SO" | "ZA" | "GS" | "SS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "VI" | "UM" | "US" | "UY" | "UZ" | "VU" | "VE" | "VN" | "WF" | "EH" | "YE" | "ZM" | "ZW";
|
|
132
|
+
name: string;
|
|
133
|
+
phone: string;
|
|
134
|
+
postalCode: string;
|
|
135
|
+
};
|
|
136
|
+
agreeToCarrierTerms: boolean;
|
|
137
|
+
email: string;
|
|
138
|
+
}>;
|
|
139
|
+
export type AddCarrierFormFields = z.input<typeof addCarrierSchema>;
|
|
140
|
+
export type AddCarrierFormPayload = z.output<typeof addCarrierSchema>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CodedError } from "@shipengine/api";
|
|
2
|
+
import { CarrierTerms } from "../../../types";
|
|
3
|
+
import { AddCarrierFormPayload } from "./add-carrier-form-schema";
|
|
4
|
+
export type AddCarrierFormProps = {
|
|
5
|
+
carrierTerms?: CarrierTerms;
|
|
6
|
+
onCancel?: () => void;
|
|
7
|
+
onSubmit: (payload: AddCarrierFormPayload) => Promise<void>;
|
|
8
|
+
registerCarrierErrors?: CodedError[] | null;
|
|
9
|
+
};
|
|
10
|
+
export declare const AddCarrierForm: ({ carrierTerms, onCancel, onSubmit, registerCarrierErrors, }: AddCarrierFormProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UseFormReturn } from "react-hook-form";
|
|
2
|
+
import { AddressSchemaFields } from "./address-schema";
|
|
3
|
+
export type AddressFieldsProps = {
|
|
4
|
+
domestic?: boolean;
|
|
5
|
+
form: UseFormReturn<AddressSchemaFields>;
|
|
6
|
+
formatFieldName?: (fieldName: keyof AddressSchemaFields) => keyof AddressSchemaFields;
|
|
7
|
+
formId?: string;
|
|
8
|
+
optionalFields?: (keyof AddressSchemaFields)[];
|
|
9
|
+
};
|
|
10
|
+
export declare const AddressFields: ({ domestic, form, formatFieldName, formId, optionalFields, }: AddressFieldsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|