@shipengine/elements 1.3.1 → 1.4.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/index.cjs +9769 -5948
- package/index.js +9765 -5954
- package/package.json +5 -4
- package/src/components/carrier-connection-card/carrier-connection-card.d.ts +11 -0
- package/src/components/carrier-connection-card/carrier-connection-card.styles.d.ts +35 -0
- package/src/components/carrier-connection-card/index.d.ts +1 -0
- package/src/components/field/create-field-controller.d.ts +1 -1
- package/src/components/field/input-group/input-group.d.ts +9 -0
- package/src/components/field/input-group/input-group.styles.d.ts +24 -0
- package/src/components/field/rate-card/rate-card.d.ts +4 -1
- package/src/components/field/rate-card/rate-card.styles.d.ts +1 -0
- package/src/components/field/rate-select/rate-select.d.ts +3 -0
- package/src/components/field-label/field-label.d.ts +2 -1
- package/src/components/field-label/field-label.styles.d.ts +9 -0
- package/src/components/fund-and-purchase/fund-and-purchase.d.ts +2 -1
- package/src/components/index.d.ts +3 -0
- package/src/components/modal/index.d.ts +2 -0
- package/src/components/modal/modal-container.d.ts +15 -0
- package/src/components/modal/modal.d.ts +9 -0
- package/src/components/modal/modal.styles.d.ts +17 -0
- package/src/components/pager/pager.styles.d.ts +1 -0
- package/src/components/section/section.d.ts +2 -1
- package/src/components/section/section.styles.d.ts +13 -13
- package/src/components/service-point-display/index.d.ts +1 -0
- package/src/components/service-point-display/service-point-display.d.ts +10 -0
- package/src/components/service-point-display/service-point-display.styles.d.ts +43 -0
- package/src/components/service-points/index.d.ts +1 -0
- package/src/components/service-points/service-points.d.ts +8 -0
- package/src/components/service-points/service-points.styles.d.ts +44 -0
- package/src/components/skeleton/index.d.ts +1 -0
- package/src/components/skeleton/skeleton-carrier-row.d.ts +1 -0
- package/src/components/skeleton/skeleton-carrier-row.styles.d.ts +17 -0
- package/src/components/suspend/index.d.ts +1 -0
- package/src/components/suspend/suspend-text.d.ts +5 -0
- package/src/components/tabs/tabs.d.ts +2 -1
- package/src/components/tabs/tabs.styles.d.ts +3 -3
- package/src/components/templates/account-settings/account-settings.d.ts +5 -1
- package/src/components/templates/add-carrier-form/add-carrier-form-schema.d.ts +12 -3
- package/src/components/templates/address-form/address-form-schema.d.ts +24 -0
- package/src/components/templates/address-form/address-schema.d.ts +3 -0
- package/src/components/templates/available-carriers-list/available-carriers-list.d.ts +10 -0
- package/src/components/templates/available-carriers-list/available-carriers-list.styles.d.ts +6 -0
- package/src/components/templates/available-carriers-list/index.d.ts +1 -0
- package/src/components/templates/connect-carrier-form/connect-carrier-form.d.ts +4 -2
- package/src/components/templates/connect-carrier-form/connect-carrier-form.styles.d.ts +0 -1
- package/src/components/templates/connected-carrier-list/connected-carrier-list.d.ts +8 -0
- package/src/components/templates/connected-carrier-list/connected-carrier-list.styles.d.ts +35 -0
- package/src/components/templates/connected-carrier-list/connected-carrier-row/connected-carrier-row.d.ts +8 -0
- package/src/components/templates/connected-carrier-list/connected-carrier-row/connected-carrier-row.styles.d.ts +36 -0
- package/src/components/templates/connected-carrier-list/connected-carrier-row/index.d.ts +1 -0
- package/src/components/templates/connected-carrier-list/index.d.ts +1 -0
- package/src/components/templates/index.d.ts +1 -1
- package/src/components/templates/list-carriers/list-carriers.d.ts +1 -1
- package/src/components/templates/list-carriers/list-carriers.styles.d.ts +0 -15
- package/src/components/templates/product-form/product-form.d.ts +4 -1
- package/src/components/templates/product-form/product-form.styles.d.ts +9 -0
- package/src/components/templates/products-display/products-display.d.ts +2 -1
- package/src/components/templates/pudo-rate-tabs/index.d.ts +2 -0
- package/src/components/templates/pudo-rate-tabs/pudo-rate-tabs.d.ts +22 -0
- package/src/components/templates/pudo-rate-tabs/service-points-search-bar/index.d.ts +1 -0
- package/src/components/templates/pudo-rate-tabs/service-points-search-bar/service-points-search-bar.d.ts +6 -0
- package/src/components/templates/rate-form/rate-form.d.ts +1 -1
- package/src/components/templates/shipment-form/shipment-form.d.ts +2 -1
- package/src/components/templates/shipment-form/shipment-schema.d.ts +377 -149
- package/src/components/templates/wallet-form/wallet-schema.d.ts +36 -26
- package/src/components/templates/warehouse-form/warehouse-form-schema.d.ts +75 -37
- package/src/components/templates/warehouse-form/warehouse-form.d.ts +2 -1
- package/src/elements/account-settings/account-settings.d.ts +106 -33
- package/src/elements/configure-shipment/configure-shipment.d.ts +1 -0
- package/src/elements/configure-shipment/hooks/use-rates-form.d.ts +1 -1
- package/src/elements/configure-shipment/hooks/use-shipment-form.d.ts +1 -0
- package/src/elements/connect-carrier/connect-carrier.d.ts +141 -3
- package/src/elements/external-carriers/external-carriers.d.ts +34 -0
- package/src/elements/external-carriers/index.d.ts +1 -0
- package/src/elements/index.d.ts +1 -0
- package/src/elements/labels-grid/labels-grid.d.ts +82 -1
- package/src/elements/purchase-label/purchase-label.d.ts +90 -2
- package/src/elements/shipments-grid/shipments-grid.d.ts +82 -1
- package/src/elements/theme-creator/theme-creator.d.ts +82 -1
- package/src/elements/view-shipment/view-shipment.d.ts +82 -1
- package/src/elements/void-label/void-label.d.ts +85 -2
- package/src/factories/shipengine/service-point.d.ts +3 -0
- package/src/hooks/options/index.d.ts +1 -0
- package/src/hooks/options/use-rate-options.d.ts +12 -1
- package/src/hooks/options/use-service-points.d.ts +8 -0
- package/src/hooks/use-nested-form.d.ts +5 -1
- package/src/locales/en/index.d.ts +82 -1
- package/src/utilities/feature-flags.d.ts +11 -1
- package/src/utilities/rates.d.ts +3 -1
- package/src/utilities/shipengine/address.d.ts +9 -0
- package/src/workflows/onboarding/components/carrier-recovery-form/carrier-recovery-form-schema.d.ts +20 -0
- package/src/workflows/onboarding/components/funding-and-carrier-connection-step/use-funding-and-carrier-connection-step.d.ts +1 -0
- package/src/workflows/onboarding/onboarding.d.ts +89 -2
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export declare const styles: {
|
|
2
|
+
carriersList: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
3
|
+
"& > li:not(:last-of-type)": {
|
|
4
|
+
borderBottom: string;
|
|
5
|
+
};
|
|
6
|
+
border: string;
|
|
7
|
+
borderRadius: string;
|
|
8
|
+
listStyle: "none";
|
|
9
|
+
marginTop: number;
|
|
10
|
+
width: string;
|
|
11
|
+
};
|
|
12
|
+
carriersListContainer: () => {
|
|
13
|
+
alignItems: "flex-end";
|
|
14
|
+
display: "flex";
|
|
15
|
+
flexDirection: "column";
|
|
16
|
+
};
|
|
17
|
+
connectButton: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
18
|
+
paddingBottom: number;
|
|
19
|
+
};
|
|
20
|
+
noCarriersContainer: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
21
|
+
alignItems: "center";
|
|
22
|
+
borderColor: string;
|
|
23
|
+
borderRadius: number;
|
|
24
|
+
borderStyle: "dashed";
|
|
25
|
+
borderWidth: string;
|
|
26
|
+
display: "flex";
|
|
27
|
+
flexDirection: "column";
|
|
28
|
+
padding: string;
|
|
29
|
+
};
|
|
30
|
+
noCarriersDescription: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
31
|
+
color: string;
|
|
32
|
+
marginBottom: number;
|
|
33
|
+
textAlign: "center";
|
|
34
|
+
};
|
|
35
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type ConnectedCarrier = {
|
|
2
|
+
carrierCode: string;
|
|
3
|
+
carrierId: string;
|
|
4
|
+
friendlyName: string;
|
|
5
|
+
iconUrl: string;
|
|
6
|
+
nickname: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const ConnectedCarrierRow: ({ carrierCode, carrierId, friendlyName, iconUrl, nickname, }: ConnectedCarrier) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export declare const styles: {
|
|
2
|
+
carrierLogo: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
3
|
+
flex: string;
|
|
4
|
+
marginRight: number;
|
|
5
|
+
maxHeight: string;
|
|
6
|
+
width: string;
|
|
7
|
+
};
|
|
8
|
+
container: {
|
|
9
|
+
display: "flex";
|
|
10
|
+
flexDirection: "column";
|
|
11
|
+
};
|
|
12
|
+
logoContainer: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
13
|
+
alignItems: "center";
|
|
14
|
+
columnGap: string;
|
|
15
|
+
display: "flex";
|
|
16
|
+
};
|
|
17
|
+
nameContainer: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
18
|
+
alignItems: "left";
|
|
19
|
+
columnGap: string;
|
|
20
|
+
display: "flex";
|
|
21
|
+
flexDirection: "column";
|
|
22
|
+
};
|
|
23
|
+
rowContainer: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
24
|
+
alignItems: "center";
|
|
25
|
+
display: "flex";
|
|
26
|
+
justifyContent: "space-between";
|
|
27
|
+
padding: string;
|
|
28
|
+
};
|
|
29
|
+
statusTag: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
30
|
+
backgroundColor: string;
|
|
31
|
+
borderRadius: string;
|
|
32
|
+
color: string;
|
|
33
|
+
fontWeight: number;
|
|
34
|
+
padding: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./connected-carrier-row";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./connected-carrier-list";
|
|
@@ -6,10 +6,10 @@ export * from "./address-form";
|
|
|
6
6
|
export * from "./address-parser";
|
|
7
7
|
export * from "./address-preference-display";
|
|
8
8
|
export * from "./address-preference-select";
|
|
9
|
-
export * from "./product-form";
|
|
10
9
|
export * from "./label";
|
|
11
10
|
export * from "./list-carriers";
|
|
12
11
|
export * from "./manage-warehouses";
|
|
12
|
+
export * from "./product-form";
|
|
13
13
|
export * from "./rate-form";
|
|
14
14
|
export * from "./shipment-form";
|
|
15
15
|
export * from "./shipment";
|
|
@@ -2,7 +2,7 @@ import { CarrierConnection, CodedError } from "@shipengine/alchemy";
|
|
|
2
2
|
import { ConnectedCarrierMetadata } from "../../../elements/list-carriers/hooks/use-list-connected-carriers";
|
|
3
3
|
export type ListCarriersFeatures = {
|
|
4
4
|
carriers: {
|
|
5
|
-
enabledCarriers: ("stamps_com" | "ups_walleted" | "ups" | "dhl_express_walleted" | "dhl_express_worldwide" | "hermes" | "yodel_walleted")[];
|
|
5
|
+
enabledCarriers: ("stamps_com" | "ups_walleted" | "ups" | "dhl_express_walleted" | "dhl_express_worldwide" | "hermes" | "yodel_walleted" | "dpdwallet")[];
|
|
6
6
|
};
|
|
7
7
|
};
|
|
8
8
|
export type ListCarriersProps = {
|
|
@@ -7,19 +7,4 @@ export declare const styles: {
|
|
|
7
7
|
borderRadius: string;
|
|
8
8
|
listStyle: "none";
|
|
9
9
|
};
|
|
10
|
-
skeletonLogoContainer: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
11
|
-
alignItems: "center";
|
|
12
|
-
columnGap: string;
|
|
13
|
-
display: "flex";
|
|
14
|
-
};
|
|
15
|
-
skeletonRow: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
16
|
-
"&:not(:last-of-type)": {
|
|
17
|
-
borderBottom: string;
|
|
18
|
-
};
|
|
19
|
-
alignItems: "center";
|
|
20
|
-
display: "flex";
|
|
21
|
-
flexDirection: "row";
|
|
22
|
-
justifyContent: "space-between";
|
|
23
|
-
padding: string;
|
|
24
|
-
};
|
|
25
10
|
};
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { SE } from "@shipengine/alchemy";
|
|
3
3
|
export type ProductFormProps<T = undefined> = {
|
|
4
|
+
currency: SE.Currency;
|
|
5
|
+
expectedCurrency?: SE.Currency;
|
|
4
6
|
onCancel?: () => void;
|
|
5
7
|
onSubmit: (values: SE.Product) => Promise<void>;
|
|
6
8
|
product?: SE.Product;
|
|
9
|
+
shipFromCountry?: string;
|
|
7
10
|
shipToCountry?: string;
|
|
8
11
|
} & ({
|
|
9
12
|
formId: string;
|
|
@@ -12,4 +15,4 @@ export type ProductFormProps<T = undefined> = {
|
|
|
12
15
|
formId?: string;
|
|
13
16
|
portalRef?: never;
|
|
14
17
|
});
|
|
15
|
-
export declare const ProductForm: <T extends Element>({ product, formId, onCancel, onSubmit, portalRef, shipToCountry, }: ProductFormProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare const ProductForm: <T extends Element>({ product, formId, onCancel, onSubmit, portalRef, shipFromCountry, shipToCountry, currency, expectedCurrency, }: ProductFormProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { SE } from "@shipengine/alchemy";
|
|
2
2
|
type ProductsDisplayProps = {
|
|
3
|
+
currency: SE.Currency;
|
|
3
4
|
onUpdate: (products: SE.Product[]) => Promise<void>;
|
|
4
5
|
shipment: SE.SalesOrderShipment;
|
|
5
6
|
};
|
|
6
|
-
export declare const ProductsDisplay: ({ onUpdate, shipment }: ProductsDisplayProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const ProductsDisplay: ({ onUpdate, shipment, currency }: ProductsDisplayProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
8
|
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { UseFormReturn } from "react-hook-form";
|
|
2
|
+
import { SE } from "@shipengine/alchemy";
|
|
3
|
+
import { RateOption } from "../../../hooks";
|
|
4
|
+
import { RateFormProps } from "../rate-form";
|
|
5
|
+
export type PudoRateTabsProps = {
|
|
6
|
+
form: UseFormReturn<{
|
|
7
|
+
rate: {
|
|
8
|
+
isAcknowledged: boolean;
|
|
9
|
+
rateId: string;
|
|
10
|
+
};
|
|
11
|
+
}, any>;
|
|
12
|
+
nicknameFeature?: boolean;
|
|
13
|
+
onSearch: (postalCode: string) => void;
|
|
14
|
+
onSelectRate?: RateFormProps["onSelectRate"];
|
|
15
|
+
onSelectServicePoint: (servicePoint?: SE.ServicePoint) => void;
|
|
16
|
+
preferredServiceCodes?: RateFormProps["preferredServiceCodes"];
|
|
17
|
+
pudoRateOptions: RateOption[];
|
|
18
|
+
rates?: RateFormProps["rates"];
|
|
19
|
+
servicePointsLoading?: boolean;
|
|
20
|
+
shipment?: RateFormProps["shipment"];
|
|
21
|
+
};
|
|
22
|
+
export declare const PudoRateTabs: ({ shipment, pudoRateOptions, form, onSelectRate, servicePointsLoading, onSelectServicePoint, nicknameFeature, preferredServiceCodes, onSearch, }: PudoRateTabsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./service-points-search-bar";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type ServicePointsSearchBarProps = {
|
|
2
|
+
onSearch: (postalCode: string) => void | Promise<void>;
|
|
3
|
+
postalCode?: string;
|
|
4
|
+
};
|
|
5
|
+
export declare const ServicePointsSearchBar: ({ postalCode, onSearch }: ServicePointsSearchBarProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -15,7 +15,7 @@ export type RateFormProps = {
|
|
|
15
15
|
labelsLoading?: boolean;
|
|
16
16
|
onSave?: (rate: Pick<SE.Rate, "carrierId" | "serviceCode">) => Promise<void> | void;
|
|
17
17
|
onSelectRate?: (rateId: string) => void;
|
|
18
|
-
onSubmit?: (rateId: string) => Promise<void> | void;
|
|
18
|
+
onSubmit?: (rateId: string, servicePoint?: SE.ServicePoint) => Promise<void> | void;
|
|
19
19
|
preferredRates?: PreferredRatesResponse;
|
|
20
20
|
preferredServiceCodes?: string[];
|
|
21
21
|
rates?: SE.Rate[];
|
|
@@ -35,6 +35,7 @@ export type ShipmentFormProps = {
|
|
|
35
35
|
previousMode: ShipmentFormMode;
|
|
36
36
|
selectedMode: ShipmentFormMode;
|
|
37
37
|
}) => Promise<void> | void;
|
|
38
|
+
onChangeWarehouse: (warehouseId: string) => Promise<void>;
|
|
38
39
|
onDirty: () => void;
|
|
39
40
|
onSubmit: (values: Partial<SE.SalesOrderShipment>) => Promise<SE.SalesOrderShipment | undefined>;
|
|
40
41
|
onSubmitParseShipTo: (payload: AddressParserPayload) => Promise<SE.AddressExtraction | undefined>;
|
|
@@ -53,4 +54,4 @@ export type CharsetWarning = {
|
|
|
53
54
|
message: string;
|
|
54
55
|
title?: string;
|
|
55
56
|
};
|
|
56
|
-
export declare const ShipmentForm: ({ accountSettings, addressLoading, addressPreference, charsetWarning, carriers, customPackageTypes, currency, features, hydrateRef, insuranceAccount, isLoading, onApplyPreset, onChangeAddress, onChangeMode, onDirty, onSubmit, onSubmitParseShipTo, onToggleAddressPreferenceDisclosure, onUpdateCustoms, parseAddressErrors, resetParseAddress, salesOrder, shipment, shippingPresets, warehouseId, warehouses, }: ShipmentFormProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
57
|
+
export declare const ShipmentForm: ({ accountSettings, addressLoading, addressPreference, charsetWarning, carriers, customPackageTypes, currency, features, hydrateRef, insuranceAccount, isLoading, onApplyPreset, onChangeAddress, onChangeMode, onChangeWarehouse, onDirty, onSubmit, onSubmitParseShipTo, onToggleAddressPreferenceDisclosure, onUpdateCustoms, parseAddressErrors, resetParseAddress, salesOrder, shipment, shippingPresets, warehouseId, warehouses, }: ShipmentFormProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|