@shipengine/elements 0.20.2 → 0.21.1
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/index.cjs +1066 -1054
- package/index.js +936 -924
- package/package.json +3 -3
- package/src/components/add-funds-form/add-funds-schema.d.ts +7 -7
- package/src/components/address-preference-context/address-preference-context.d.ts +42 -0
- package/src/components/address-preference-context/index.d.ts +1 -0
- package/src/components/auto-funding-form/auto-funding-schema.d.ts +10 -10
- package/src/components/field/fields.d.ts +2 -1
- package/src/components/field/money-input/hooks/use-utils.d.ts +1 -1
- package/src/components/field/money-input/money-input.d.ts +1 -1
- package/src/components/field/rate-card/cost-breakdown/cost-breakdown.d.ts +1 -1
- package/src/components/field/select-auto-complete/index.d.ts +1 -0
- package/src/components/field/select-auto-complete/select-auto-complete.d.ts +7 -0
- package/src/components/history/history-card/history-card.d.ts +5 -0
- package/src/components/history/history-card/history-card.styles.d.ts +1 -0
- package/src/components/history/history-card/index.d.ts +1 -0
- package/src/components/history/index.d.ts +1 -4
- package/src/components/index.d.ts +1 -1
- package/src/components/inline-label/inline-label.d.ts +5 -1
- package/src/components/inline-label/inline-label.styles.d.ts +1 -0
- package/src/components/items-breakdown/items-breakdown.d.ts +1 -1
- package/src/components/label/index.d.ts +1 -0
- package/src/components/label/label.d.ts +10 -0
- package/src/components/label/label.styles.d.ts +2 -0
- package/src/components/label-layout/label-layout-purchase.d.ts +1 -1
- package/src/components/label-layout/label-layout-settings.d.ts +1 -1
- package/src/components/section/index.d.ts +1 -0
- package/src/components/section/section.d.ts +10 -0
- package/src/components/section/section.styles.d.ts +1 -0
- package/src/components/templates/add-carrier-form/add-carrier-form.d.ts +1 -1
- package/src/components/templates/address-display/address-display.d.ts +1 -1
- package/src/components/templates/address-form/address-form.d.ts +1 -1
- package/src/components/templates/address-preference-display/address-preference-display.d.ts +1 -1
- package/src/components/templates/address-preference-select/address-preference-select.d.ts +24 -0
- package/src/components/templates/address-preference-select/index.d.ts +1 -0
- package/src/components/templates/carrier-recovery-form/carrier-recovery-form.d.ts +1 -1
- package/src/components/templates/carrier-terms-form/carrier-terms-form.d.ts +1 -1
- package/src/components/templates/customs-item-form/customs-item-form-schema.d.ts +20 -20
- package/src/components/templates/customs-item-form/customs-item-form.d.ts +1 -1
- package/src/components/templates/customs-items-display/customs-items-display.d.ts +1 -1
- package/src/components/templates/edit-billing-form/edit-billing-form.styles.d.ts +1 -1
- package/src/components/templates/index.d.ts +2 -3
- package/src/components/templates/label/label.d.ts +1 -1
- package/src/components/templates/list-carriers/list-carriers.d.ts +1 -1
- package/src/components/templates/list-carriers-row/list-carriers-row.d.ts +1 -1
- package/src/components/templates/manage-wallet/manage-wallet.styles.d.ts +1 -1
- package/src/components/templates/manage-warehouses/manage-warehouses.d.ts +2 -6
- package/src/components/templates/onboarding/onboarding.d.ts +14 -8
- package/src/components/templates/onboarding/onboarding.styles.d.ts +1 -1
- package/src/components/templates/rate-form/rate-form.d.ts +1 -1
- package/src/components/templates/shipment/shipment.d.ts +1 -1
- package/src/components/templates/shipment-form/shipment-form.d.ts +1 -1
- package/src/components/templates/shipment-form/shipment-schema.d.ts +26 -2
- package/src/components/templates/suspend-sales-order/suspend-sales-order.d.ts +1 -1
- package/src/components/templates/suspend-shipment/suspend-shipment.d.ts +1 -1
- package/src/components/templates/void-label/void-label.d.ts +1 -1
- package/src/components/templates/wallet-form/edit-wallet-address-form.d.ts +1 -1
- package/src/components/templates/wallet-form/wallet-form.d.ts +7 -6
- package/src/components/templates/wallet-form/wallet-form.styles.d.ts +1 -1
- package/src/components/templates/wallet-form/wallet-schema.d.ts +1 -1
- package/src/components/templates/warehouse-display/warehouse-display.d.ts +1 -1
- package/src/components/templates/warehouse-form/warehouse-form.d.ts +1 -1
- package/src/elements/components/configure-shipment/configure-shipment.d.ts +1 -1
- package/src/elements/components/configure-shipment/hooks/use-address.d.ts +1 -1
- package/src/elements/components/configure-shipment/hooks/use-customs.d.ts +1 -1
- package/src/elements/components/configure-shipment/hooks/use-presets.d.ts +1 -1
- package/src/elements/components/configure-shipment/hooks/use-rates-form.d.ts +1 -1
- package/src/elements/components/configure-shipment/hooks/use-request-rates.d.ts +1 -1
- package/src/elements/components/configure-shipment/hooks/use-shipment-form.d.ts +1 -1
- package/src/elements/components/index.d.ts +0 -1
- package/src/elements/components/list-carriers/hooks/use-list-connected-carriers.d.ts +2 -2
- package/src/elements/components/purchase-label/hooks/use-configure-shipment.d.ts +1 -1
- package/src/elements/components/purchase-label/hooks/use-import-sales-order.d.ts +2 -2
- package/src/elements/components/purchase-label/hooks/use-load-shipment.d.ts +3 -3
- package/src/elements/components/purchase-label/hooks/use-pending-shipment.d.ts +1 -1
- package/src/elements/components/shipment/shipment.d.ts +1 -1
- package/src/elements/components/void-label/void-label.d.ts +1 -1
- package/src/elements/index.d.ts +0 -1
- package/src/factories/shipengine/address.d.ts +8 -1
- package/src/factories/shipengine/carrier.d.ts +1 -1
- package/src/factories/shipengine/label.d.ts +1 -1
- package/src/factories/shipengine/money.d.ts +1 -1
- package/src/factories/shipengine/order-source.d.ts +1 -1
- package/src/factories/shipengine/package.d.ts +1 -1
- package/src/factories/shipengine/resource.d.ts +1 -1
- package/src/factories/shipengine/sales-order.d.ts +1 -1
- package/src/factories/shipengine/service.d.ts +1 -1
- package/src/factories/shipengine/shipment.d.ts +1 -1
- package/src/factories/shipengine/wallet-history.d.ts +1 -1
- package/src/factories/shipengine/warehouse.d.ts +1 -3
- package/src/factories/shipengine/weight.d.ts +1 -1
- package/src/features/wallet-history/wallet-history.styles.d.ts +1 -0
- package/src/hooks/index.d.ts +1 -1
- package/src/hooks/options/use-confirmation-options.d.ts +1 -1
- package/src/hooks/options/use-customs-contents-options.d.ts +1 -1
- package/src/hooks/options/use-customs-non-delivery-options.d.ts +1 -1
- package/src/hooks/options/use-insurance-provider-options.d.ts +1 -1
- package/src/hooks/options/use-package-options.d.ts +1 -1
- package/src/hooks/options/use-rate-options.d.ts +1 -1
- package/src/hooks/options/use-service-code-options.d.ts +1 -1
- package/src/hooks/options/use-warehouse-options.d.ts +1 -1
- package/src/hooks/use-address-validation.d.ts +12 -0
- package/src/hooks/use-carrier-metadata.d.ts +1 -1
- package/src/hooks/use-elements.d.ts +2 -2
- package/src/hooks/use-scrub-errors.d.ts +1 -1
- package/src/locales/en/index.d.ts +13 -2
- package/src/mocks/carriers/handlers.d.ts +1 -1
- package/src/mocks/warehouses/handlers.d.ts +1 -1
- package/src/schemas/shipengine/money.d.ts +1 -1
- package/src/types/carrier-metadata.d.ts +1 -1
- package/src/types/shipping-preset/shipping-preset.d.ts +1 -1
- package/src/utilities/money.d.ts +1 -1
- package/src/utilities/rates.d.ts +2 -1
- package/src/utilities/shipengine/address.d.ts +1 -1
- package/src/utilities/shipengine/dimensions.d.ts +1 -1
- package/src/utilities/shipengine/sales-order.d.ts +1 -1
- package/src/utilities/shipengine/shipment.d.ts +1 -1
- package/src/utilities/shipengine/weight.d.ts +1 -1
- package/src/components/accordion/accordion.d.ts +0 -13
- package/src/components/accordion/accordion.styles.d.ts +0 -7
- package/src/components/accordion/index.d.ts +0 -1
- package/src/components/history/history-body/history-body.d.ts +0 -5
- package/src/components/history/history-body/history-body.styles.d.ts +0 -1
- package/src/components/history/history-body/index.d.ts +0 -1
- package/src/components/history/history-list/history-list.d.ts +0 -12
- package/src/components/history/history-list/index.d.ts +0 -1
- package/src/components/history/history-row/history-row.d.ts +0 -6
- package/src/components/history/history-row/index.d.ts +0 -1
- package/src/components/history/history.d.ts +0 -10
- package/src/components/templates/wallet-history/wallet-history.d.ts +0 -6
- package/src/components/templates/warehouse-preference-select/index.d.ts +0 -1
- package/src/components/templates/warehouse-preference-select/warehouse-preference-select.d.ts +0 -24
- package/src/components/templates/warehouse-preference-wizard/index.d.ts +0 -1
- package/src/components/templates/warehouse-preference-wizard/warehouse-preference-wizard.d.ts +0 -23
- package/src/elements/wallet-history.d.ts +0 -1
- package/src/hooks/use-warehouse-validation.d.ts +0 -14
- /package/src/{components/templates/wallet-history → features}/index.d.ts +0 -0
- /package/src/{elements/components → features}/wallet-history/index.d.ts +0 -0
- /package/src/{elements/components → features}/wallet-history/wallet-history.d.ts +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shipengine/elements",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.1",
|
|
4
4
|
"typedoc": {
|
|
5
5
|
"entryPoint": "./src/index.ts",
|
|
6
6
|
"readmeFile": "../../README.md",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"@hookform/resolvers": "2.9.1",
|
|
32
32
|
"@packlink/brands": "3.24.0",
|
|
33
33
|
"@packlink/giger-theme": "1.3.1",
|
|
34
|
-
"@shipengine/api": "0.
|
|
35
|
-
"@shipengine/react": "0.
|
|
34
|
+
"@shipengine/js-api": "0.6.1",
|
|
35
|
+
"@shipengine/react-api": "0.4.7",
|
|
36
36
|
"@storybook/manager-api": "7.0.0-rc.1",
|
|
37
37
|
"@storybook/theming": "7.0.0-rc.1",
|
|
38
38
|
"axios": "0.26.1",
|
|
@@ -2,33 +2,33 @@ import { z } from "zod";
|
|
|
2
2
|
export declare const getAddFundsSchema: (minimumAmount?: number) => z.ZodEffects<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/js-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/js-api").Currency;
|
|
11
11
|
}, {
|
|
12
12
|
amount: number;
|
|
13
|
-
currency: import("
|
|
13
|
+
currency: import("@shipengine/js-api").Currency;
|
|
14
14
|
}>;
|
|
15
15
|
}, "strip", z.ZodTypeAny, {
|
|
16
16
|
funds: {
|
|
17
17
|
amount: number;
|
|
18
|
-
currency: import("
|
|
18
|
+
currency: import("@shipengine/js-api").Currency;
|
|
19
19
|
};
|
|
20
20
|
}, {
|
|
21
21
|
funds: {
|
|
22
22
|
amount: number;
|
|
23
|
-
currency: import("
|
|
23
|
+
currency: import("@shipengine/js-api").Currency;
|
|
24
24
|
};
|
|
25
25
|
}>, {
|
|
26
26
|
amount: number;
|
|
27
|
-
currency: import("
|
|
27
|
+
currency: import("@shipengine/js-api").Currency;
|
|
28
28
|
}, {
|
|
29
29
|
funds: {
|
|
30
30
|
amount: number;
|
|
31
|
-
currency: import("
|
|
31
|
+
currency: import("@shipengine/js-api").Currency;
|
|
32
32
|
};
|
|
33
33
|
}>;
|
|
34
34
|
type AddFundsFormSchema = ReturnType<typeof getAddFundsSchema>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { SE } from "@shipengine/js-api";
|
|
3
|
+
import { WalletPayload, WarehousePayload } from "../templates";
|
|
4
|
+
import { AddressValidationPreference } from "../templates/address-preference-select";
|
|
5
|
+
type WarehouseData = Pick<WarehousePayload, "name" | "isDefault">;
|
|
6
|
+
type WalletData = {
|
|
7
|
+
creditCard: WalletPayload["creditCard"];
|
|
8
|
+
};
|
|
9
|
+
type InternalValidateAddressPayload = {
|
|
10
|
+
addresses: {
|
|
11
|
+
originAddress: SE.Address;
|
|
12
|
+
returnAddress?: SE.Address | undefined;
|
|
13
|
+
};
|
|
14
|
+
data?: WarehouseData | WalletData;
|
|
15
|
+
onValid: (payload: {
|
|
16
|
+
originAddress: SE.Address;
|
|
17
|
+
returnAddress?: SE.Address;
|
|
18
|
+
}) => void;
|
|
19
|
+
};
|
|
20
|
+
export type ValidationPreference = {
|
|
21
|
+
originAddress: AddressValidationPreference;
|
|
22
|
+
returnAddress?: AddressValidationPreference;
|
|
23
|
+
};
|
|
24
|
+
export type AddressPreferenceProvideProps = {
|
|
25
|
+
children: ReactNode;
|
|
26
|
+
className?: string;
|
|
27
|
+
formHeader?: React.ReactNode;
|
|
28
|
+
onSubmit: (payload: {
|
|
29
|
+
originAddress: SE.Address;
|
|
30
|
+
passengerData: InternalValidateAddressPayload["data"];
|
|
31
|
+
returnAddress?: SE.Address | undefined;
|
|
32
|
+
}) => Promise<void> | void;
|
|
33
|
+
};
|
|
34
|
+
export type AddressPreferenceValue = {
|
|
35
|
+
data: InternalValidateAddressPayload["data"];
|
|
36
|
+
validateAddress: (payload: InternalValidateAddressPayload) => Promise<void>;
|
|
37
|
+
validationPreference?: ValidationPreference;
|
|
38
|
+
};
|
|
39
|
+
export declare const AddressPreferenceContext: import("react").Context<AddressPreferenceValue | undefined>;
|
|
40
|
+
export declare const AddressPreferenceProvider: (props: AddressPreferenceProvideProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
41
|
+
export declare const useAddressPreference: () => AddressPreferenceValue;
|
|
42
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./address-preference-context";
|
|
@@ -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/js-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/js-api").Currency;
|
|
12
12
|
}, {
|
|
13
13
|
amount: number;
|
|
14
|
-
currency: import("
|
|
14
|
+
currency: import("@shipengine/js-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/js-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/js-api").Currency;
|
|
25
25
|
}, {
|
|
26
26
|
amount: number;
|
|
27
|
-
currency: import("
|
|
27
|
+
currency: import("@shipengine/js-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/js-api").Currency;
|
|
34
34
|
};
|
|
35
35
|
maximumPurchasesPerDay: number;
|
|
36
36
|
purchaseAmount: {
|
|
37
37
|
amount: number;
|
|
38
|
-
currency: import("
|
|
38
|
+
currency: import("@shipengine/js-api").Currency;
|
|
39
39
|
};
|
|
40
40
|
}, {
|
|
41
41
|
isEnabled: boolean;
|
|
42
42
|
lowBalancePurchaseThreshold: {
|
|
43
43
|
amount: number;
|
|
44
|
-
currency: import("
|
|
44
|
+
currency: import("@shipengine/js-api").Currency;
|
|
45
45
|
};
|
|
46
46
|
maximumPurchasesPerDay: number;
|
|
47
47
|
purchaseAmount: {
|
|
48
48
|
amount: number;
|
|
49
|
-
currency: import("
|
|
49
|
+
currency: import("@shipengine/js-api").Currency;
|
|
50
50
|
};
|
|
51
51
|
}>;
|
|
52
52
|
export type AutoFundingFormFields = z.input<typeof autoFundingSchema>;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
export * from "./credit-card-input";
|
|
2
1
|
export * from "./checkbox-input";
|
|
2
|
+
export * from "./credit-card-input";
|
|
3
3
|
export * from "./date-picker";
|
|
4
4
|
export * from "./expiration-input";
|
|
5
5
|
export * from "./input-group";
|
|
6
6
|
export * from "./money-input";
|
|
7
7
|
export * from "./number-input";
|
|
8
8
|
export * from "./rate-select";
|
|
9
|
+
export * from "./select-auto-complete";
|
|
9
10
|
export * from "./select";
|
|
10
11
|
export * from "./submit-button";
|
|
11
12
|
export * from "./switch";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./select-auto-complete";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ISelectAutocomplete as NativeSelectAutoCompleteProps } from "@packlink/giger";
|
|
2
|
+
import { ControlledField } from "../create-field-controller";
|
|
3
|
+
type SelectAutoCompleteProps = {
|
|
4
|
+
onChange?: (value?: string) => void;
|
|
5
|
+
};
|
|
6
|
+
export declare const SelectAutoComplete: ControlledField<NativeSelectAutoCompleteProps, SelectAutoCompleteProps>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: (isReload?: boolean) => Record<"amountTypography" | "balanceTypography" | "cardColumn" | "cardContainer" | "carrierRow" | "carrierTypography" | "dateTypography" | "providerTypography" | "tagText", import("@emotion/serialize").Interpolation<import("@packlink/giger-theme/dist/lib/Theme").Theme>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./history-card";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export * as Templates from "./templates";
|
|
2
|
-
export * from "./accordion";
|
|
3
2
|
export * from "./add-funds-form";
|
|
4
3
|
export * from "./auto-funding-form";
|
|
5
4
|
export * from "./button-group";
|
|
@@ -18,6 +17,7 @@ export * from "./link-action";
|
|
|
18
17
|
export * from "./loader";
|
|
19
18
|
export * from "./manage-funding";
|
|
20
19
|
export * from "./portal";
|
|
20
|
+
export * from "./section";
|
|
21
21
|
export * from "./spacer";
|
|
22
22
|
export * from "./spread";
|
|
23
23
|
export * from "./story-notes";
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { WithConditionalCSSProp } from "@emotion/react/types/jsx-namespace";
|
|
3
|
+
import { ITypographyProps } from "@packlink/giger";
|
|
2
4
|
export type InlineLabelProps = {
|
|
3
5
|
children: React.ReactElement;
|
|
6
|
+
isLabelRight?: boolean;
|
|
4
7
|
label: string;
|
|
8
|
+
labelProps?: WithConditionalCSSProp<ITypographyProps<"span">>;
|
|
5
9
|
};
|
|
6
|
-
export declare const InlineLabel: ({ children, label }: InlineLabelProps) => import("@emotion/react/jsx-
|
|
10
|
+
export declare const InlineLabel: ({ children, label, isLabelRight, labelProps, }: InlineLabelProps) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: (isLabelRight?: boolean) => Record<"inlineContainer", import("@emotion/serialize").Interpolation<import("@packlink/giger-theme/dist/lib/Theme").Theme>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./label";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { WithConditionalCSSProp } from "@emotion/react/types/jsx-namespace";
|
|
2
|
+
import { ITypographyProps, WithChildrenCommonProps } from "@packlink/giger";
|
|
3
|
+
export type LabelProps = WithChildrenCommonProps<{
|
|
4
|
+
spacing?: number;
|
|
5
|
+
text: string;
|
|
6
|
+
textProps?: WithConditionalCSSProp<ITypographyProps<"span">>;
|
|
7
|
+
variant?: LabelVariant;
|
|
8
|
+
}>;
|
|
9
|
+
export type LabelVariant = "subtitle" | "inline" | "inline-right";
|
|
10
|
+
export declare const Label: ({ spacing, children, text, textProps, variant }: LabelProps) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./section";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { WithChildrenCommonProps } from "@packlink/giger";
|
|
3
|
+
export type SectionProps = WithChildrenCommonProps<{
|
|
4
|
+
bold?: boolean;
|
|
5
|
+
/** Element to render at the right part of the summary */
|
|
6
|
+
rightContent?: JSX.Element;
|
|
7
|
+
/** Title to show */
|
|
8
|
+
title?: string;
|
|
9
|
+
}>;
|
|
10
|
+
export declare const Section: ({ bold, title, children, rightContent, ...rest }: SectionProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: Record<"icon" | "rightContentWrapper" | "section" | "summary" | "summaryWrapper", import("@emotion/serialize").Interpolation<import("@packlink/giger-theme/dist/lib/Theme").Theme>>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { SE } from "@shipengine/js-api";
|
|
2
|
+
export type AddressSuggested = {
|
|
3
|
+
validation: SE.AddressValidation;
|
|
4
|
+
validationType: "SUGGESTED";
|
|
5
|
+
};
|
|
6
|
+
export type AddressError = {
|
|
7
|
+
validation: SE.AddressValidation;
|
|
8
|
+
validationType: "ERROR";
|
|
9
|
+
};
|
|
10
|
+
export type AddressExactOrSoft = {
|
|
11
|
+
address: SE.Address;
|
|
12
|
+
validationType: "EXACT" | "SOFT";
|
|
13
|
+
};
|
|
14
|
+
export type AddressValidationPreference = AddressSuggested | AddressError | AddressExactOrSoft;
|
|
15
|
+
export type AddressPreferenceSelectProps = {
|
|
16
|
+
onCancel: () => void;
|
|
17
|
+
onSubmit: (payload: {
|
|
18
|
+
originAddress: SE.Address;
|
|
19
|
+
returnAddress?: SE.Address;
|
|
20
|
+
}) => Promise<void> | void;
|
|
21
|
+
originAddress: AddressValidationPreference;
|
|
22
|
+
returnAddress?: AddressValidationPreference;
|
|
23
|
+
};
|
|
24
|
+
export declare const AddressPreferenceSelect: ({ onCancel, onSubmit, originAddress, returnAddress, }: AddressPreferenceSelectProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./address-preference-select";
|
|
@@ -8,24 +8,24 @@ export declare const getCustomsItemFormSchema: (shipToCountry?: string) => z.Zod
|
|
|
8
8
|
quantity: z.ZodNumber;
|
|
9
9
|
value: z.ZodObject<{
|
|
10
10
|
amount: z.ZodNumber;
|
|
11
|
-
currency: z.ZodNativeEnum<typeof import("
|
|
11
|
+
currency: z.ZodNativeEnum<typeof import("@shipengine/js-api").Currency>;
|
|
12
12
|
}, "strip", z.ZodTypeAny, {
|
|
13
13
|
amount: number;
|
|
14
|
-
currency: import("
|
|
14
|
+
currency: import("@shipengine/js-api").Currency;
|
|
15
15
|
}, {
|
|
16
16
|
amount: number;
|
|
17
|
-
currency: import("
|
|
17
|
+
currency: import("@shipengine/js-api").Currency;
|
|
18
18
|
}>;
|
|
19
19
|
}, "strip", z.ZodTypeAny, {
|
|
20
20
|
value: {
|
|
21
21
|
amount: number;
|
|
22
|
-
currency: import("
|
|
22
|
+
currency: import("@shipengine/js-api").Currency;
|
|
23
23
|
};
|
|
24
24
|
quantity: number;
|
|
25
25
|
}, {
|
|
26
26
|
value: {
|
|
27
27
|
amount: number;
|
|
28
|
-
currency: import("
|
|
28
|
+
currency: import("@shipengine/js-api").Currency;
|
|
29
29
|
};
|
|
30
30
|
quantity: number;
|
|
31
31
|
}>;
|
|
@@ -39,7 +39,7 @@ export declare const getCustomsItemFormSchema: (shipToCountry?: string) => z.Zod
|
|
|
39
39
|
valueQuantity: {
|
|
40
40
|
value: {
|
|
41
41
|
amount: number;
|
|
42
|
-
currency: import("
|
|
42
|
+
currency: import("@shipengine/js-api").Currency;
|
|
43
43
|
};
|
|
44
44
|
quantity: number;
|
|
45
45
|
};
|
|
@@ -51,7 +51,7 @@ export declare const getCustomsItemFormSchema: (shipToCountry?: string) => z.Zod
|
|
|
51
51
|
valueQuantity: {
|
|
52
52
|
value: {
|
|
53
53
|
amount: number;
|
|
54
|
-
currency: import("
|
|
54
|
+
currency: import("@shipengine/js-api").Currency;
|
|
55
55
|
};
|
|
56
56
|
quantity: number;
|
|
57
57
|
};
|
|
@@ -59,7 +59,7 @@ export declare const getCustomsItemFormSchema: (shipToCountry?: string) => z.Zod
|
|
|
59
59
|
quantity: number;
|
|
60
60
|
value: {
|
|
61
61
|
amount: number;
|
|
62
|
-
currency: import("
|
|
62
|
+
currency: import("@shipengine/js-api").Currency;
|
|
63
63
|
};
|
|
64
64
|
customsItemId?: string | undefined;
|
|
65
65
|
harmonizedTariffCode?: string | undefined;
|
|
@@ -69,7 +69,7 @@ export declare const getCustomsItemFormSchema: (shipToCountry?: string) => z.Zod
|
|
|
69
69
|
quantity: number;
|
|
70
70
|
value: {
|
|
71
71
|
amount: number;
|
|
72
|
-
currency: import("
|
|
72
|
+
currency: import("@shipengine/js-api").Currency;
|
|
73
73
|
};
|
|
74
74
|
customsItemId?: string | undefined;
|
|
75
75
|
countryOfOrigin: "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";
|
|
@@ -83,7 +83,7 @@ export declare const getCustomsItemFormSchema: (shipToCountry?: string) => z.Zod
|
|
|
83
83
|
valueQuantity: {
|
|
84
84
|
value: {
|
|
85
85
|
amount: number;
|
|
86
|
-
currency: import("
|
|
86
|
+
currency: import("@shipengine/js-api").Currency;
|
|
87
87
|
};
|
|
88
88
|
quantity: number;
|
|
89
89
|
};
|
|
@@ -96,24 +96,24 @@ export declare const getCustomsItemFormSchema: (shipToCountry?: string) => z.Zod
|
|
|
96
96
|
quantity: z.ZodNumber;
|
|
97
97
|
value: z.ZodObject<{
|
|
98
98
|
amount: z.ZodNumber;
|
|
99
|
-
currency: z.ZodNativeEnum<typeof import("
|
|
99
|
+
currency: z.ZodNativeEnum<typeof import("@shipengine/js-api").Currency>;
|
|
100
100
|
}, "strip", z.ZodTypeAny, {
|
|
101
101
|
amount: number;
|
|
102
|
-
currency: import("
|
|
102
|
+
currency: import("@shipengine/js-api").Currency;
|
|
103
103
|
}, {
|
|
104
104
|
amount: number;
|
|
105
|
-
currency: import("
|
|
105
|
+
currency: import("@shipengine/js-api").Currency;
|
|
106
106
|
}>;
|
|
107
107
|
}, "strip", z.ZodTypeAny, {
|
|
108
108
|
value: {
|
|
109
109
|
amount: number;
|
|
110
|
-
currency: import("
|
|
110
|
+
currency: import("@shipengine/js-api").Currency;
|
|
111
111
|
};
|
|
112
112
|
quantity: number;
|
|
113
113
|
}, {
|
|
114
114
|
value: {
|
|
115
115
|
amount: number;
|
|
116
|
-
currency: import("
|
|
116
|
+
currency: import("@shipengine/js-api").Currency;
|
|
117
117
|
};
|
|
118
118
|
quantity: number;
|
|
119
119
|
}>;
|
|
@@ -125,7 +125,7 @@ export declare const getCustomsItemFormSchema: (shipToCountry?: string) => z.Zod
|
|
|
125
125
|
valueQuantity: {
|
|
126
126
|
value: {
|
|
127
127
|
amount: number;
|
|
128
|
-
currency: import("
|
|
128
|
+
currency: import("@shipengine/js-api").Currency;
|
|
129
129
|
};
|
|
130
130
|
quantity: number;
|
|
131
131
|
};
|
|
@@ -137,7 +137,7 @@ export declare const getCustomsItemFormSchema: (shipToCountry?: string) => z.Zod
|
|
|
137
137
|
valueQuantity: {
|
|
138
138
|
value: {
|
|
139
139
|
amount: number;
|
|
140
|
-
currency: import("
|
|
140
|
+
currency: import("@shipengine/js-api").Currency;
|
|
141
141
|
};
|
|
142
142
|
quantity: number;
|
|
143
143
|
};
|
|
@@ -145,7 +145,7 @@ export declare const getCustomsItemFormSchema: (shipToCountry?: string) => z.Zod
|
|
|
145
145
|
quantity: number;
|
|
146
146
|
value: {
|
|
147
147
|
amount: number;
|
|
148
|
-
currency: import("
|
|
148
|
+
currency: import("@shipengine/js-api").Currency;
|
|
149
149
|
};
|
|
150
150
|
customsItemId?: string | undefined;
|
|
151
151
|
harmonizedTariffCode?: string | undefined;
|
|
@@ -155,7 +155,7 @@ export declare const getCustomsItemFormSchema: (shipToCountry?: string) => z.Zod
|
|
|
155
155
|
quantity: number;
|
|
156
156
|
value: {
|
|
157
157
|
amount: number;
|
|
158
|
-
currency: import("
|
|
158
|
+
currency: import("@shipengine/js-api").Currency;
|
|
159
159
|
};
|
|
160
160
|
customsItemId?: string | undefined;
|
|
161
161
|
countryOfOrigin: "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";
|
|
@@ -169,7 +169,7 @@ export declare const getCustomsItemFormSchema: (shipToCountry?: string) => z.Zod
|
|
|
169
169
|
valueQuantity: {
|
|
170
170
|
value: {
|
|
171
171
|
amount: number;
|
|
172
|
-
currency: import("
|
|
172
|
+
currency: import("@shipengine/js-api").Currency;
|
|
173
173
|
};
|
|
174
174
|
quantity: number;
|
|
175
175
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const styles: Record<"heading" | "
|
|
1
|
+
export declare const styles: Record<"heading" | "subtitle" | "boldLink" | "container", import("@emotion/serialize").Interpolation<import("@packlink/giger-theme/dist/lib/Theme").Theme>>;
|
|
@@ -16,9 +16,8 @@ export * from "./suspend-sales-order";
|
|
|
16
16
|
export * from "./shipment-form";
|
|
17
17
|
export * from "./shipment";
|
|
18
18
|
export * from "./suspend-shipment";
|
|
19
|
-
export * from "./wallet-history";
|
|
20
19
|
export * from "./warehouse-form";
|
|
21
20
|
export * from "./void-label";
|
|
22
21
|
export * from "./wallet-form";
|
|
23
|
-
export * from "
|
|
24
|
-
export * from "./
|
|
22
|
+
export * from "../address-preference-context";
|
|
23
|
+
export * from "./address-preference-select";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CarrierConnection, CodedError } from "@shipengine/api";
|
|
1
|
+
import { CarrierConnection, CodedError } from "@shipengine/js-api";
|
|
2
2
|
import { ConnectedCarrierMetadata } from "../../../elements/components/list-carriers/hooks/use-list-connected-carriers";
|
|
3
3
|
export type ListCarriersProps = {
|
|
4
4
|
carriers?: ConnectedCarrierMetadata[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CodedError } from "@shipengine/api";
|
|
1
|
+
import { CodedError } from "@shipengine/js-api";
|
|
2
2
|
import { ConnectedCarrierMetadata } from "../../../elements/components/list-carriers/hooks/use-list-connected-carriers";
|
|
3
3
|
import { AddCarrierFormPayload } from "../add-carrier-form";
|
|
4
4
|
export type ListCarriersRowProps = {
|