@shipengine/elements 0.26.18 → 0.28.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 +10541 -9095
- package/index.js +10679 -9241
- package/package.json +3 -3
- package/src/components/address-preference-context/address-preference-context.d.ts +2 -2
- package/src/components/collapsible-panel/collapsible-panel.d.ts +9 -0
- package/src/components/collapsible-panel/collapsible-panel.styles.d.ts +27 -0
- package/src/components/collapsible-panel/index.d.ts +1 -0
- package/src/components/index.d.ts +2 -0
- package/src/components/payment-method-settings/index.d.ts +1 -0
- package/src/components/payment-method-settings/payment-method-settings.d.ts +1 -0
- package/src/components/save-status/save-status.d.ts +3 -3
- package/src/components/templates/account-settings/account-settings.d.ts +6 -0
- package/src/components/templates/account-settings/index.d.ts +1 -0
- package/src/components/templates/carrier-recovery-form/carrier-recovery-form.d.ts +3 -2
- package/src/components/templates/edit-billing-form/edit-billing-form.d.ts +4 -3
- package/src/components/templates/index.d.ts +1 -0
- package/src/components/templates/onboarding/onboarding.d.ts +8 -8
- package/src/components/templates/wallet-form/wallet-form.d.ts +1 -1
- package/src/components/templates/wallet-form/wallet-schema.d.ts +10 -8
- package/src/elements/account-settings/account-settings.d.ts +621 -0
- package/src/elements/account-settings/index.d.ts +1 -0
- package/src/elements/index.d.ts +2 -0
- package/src/elements/list-carriers/list-carriers.d.ts +0 -597
- package/src/elements/manage-warehouses/manage-warehouses.d.ts +0 -597
- package/src/elements/onboarding/onboarding.d.ts +21 -1
- package/src/elements/purchase-label/purchase-label.d.ts +21 -1
- package/src/elements/shipengine-workflow/index.d.ts +1 -0
- package/src/elements/shipengine-workflow/label-workflow.d.ts +25 -0
- package/src/elements/view-shipment/view-shipment.d.ts +21 -1
- package/src/elements/void-label/void-label.d.ts +21 -1
- package/src/locales/en/index.d.ts +21 -1
- package/src/types/carrier-metadata.d.ts +2 -0
- package/src/utilities/feature-flags.d.ts +3 -0
- package/src/utilities/index.d.ts +1 -0
- package/src/utilities/shipengine/carrier.d.ts +2 -0
- package/src/components/templates/manage-wallet/index.d.ts +0 -1
- package/src/components/templates/manage-wallet/manage-wallet.d.ts +0 -1
- package/src/components/templates/manage-wallet/manage-wallet.styles.d.ts +0 -21
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shipengine/elements",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"typedoc": {
|
|
5
5
|
"entryPoint": "./src/index.ts",
|
|
6
6
|
"readmeFile": "../../README.md",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"@jest/globals": "28.1.3",
|
|
31
31
|
"@packlink/brands": "3.24.0",
|
|
32
32
|
"@packlink/giger-theme": "1.3.1",
|
|
33
|
-
"@shipengine/alchemy": "0.
|
|
34
|
-
"@shipengine/js-api": "0.
|
|
33
|
+
"@shipengine/alchemy": "0.5.1",
|
|
34
|
+
"@shipengine/js-api": "0.14.1",
|
|
35
35
|
"@storybook/addons": "6.5.16",
|
|
36
36
|
"@storybook/components": "7.0.0-rc.1",
|
|
37
37
|
"@storybook/core-events": "7.0.0-rc.1",
|
|
@@ -21,7 +21,7 @@ export type ValidationPreference = {
|
|
|
21
21
|
originAddress: AddressValidationPreference;
|
|
22
22
|
returnAddress?: AddressValidationPreference;
|
|
23
23
|
};
|
|
24
|
-
export type
|
|
24
|
+
export type AddressPreferenceProviderProps = {
|
|
25
25
|
children: ReactNode;
|
|
26
26
|
className?: string;
|
|
27
27
|
formHeader?: React.ReactNode;
|
|
@@ -37,6 +37,6 @@ export type AddressPreferenceValue = {
|
|
|
37
37
|
validationPreference?: ValidationPreference;
|
|
38
38
|
};
|
|
39
39
|
export declare const AddressPreferenceContext: import("react").Context<AddressPreferenceValue | undefined>;
|
|
40
|
-
export declare const AddressPreferenceProvider: (props:
|
|
40
|
+
export declare const AddressPreferenceProvider: (props: AddressPreferenceProviderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
41
41
|
export declare const useAddressPreference: () => AddressPreferenceValue;
|
|
42
42
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { WithChildrenCommonProps } from "@packlink/giger";
|
|
2
|
+
import { SE } from "@shipengine/alchemy";
|
|
3
|
+
export type CollapsiblePanelProps = WithChildrenCommonProps<{
|
|
4
|
+
errors?: SE.CodedError[] | null;
|
|
5
|
+
initialExpanded?: boolean;
|
|
6
|
+
isSaving?: boolean;
|
|
7
|
+
title?: string;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const CollapsiblePanel: ({ errors, initialExpanded, isSaving, children, title, }: CollapsiblePanelProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export declare const styles: {
|
|
2
|
+
content: (theme: import("@packlink/giger-theme/dist/lib/Theme").Theme) => {
|
|
3
|
+
padding: string;
|
|
4
|
+
};
|
|
5
|
+
header: (theme: import("@packlink/giger-theme/dist/lib/Theme").Theme) => {
|
|
6
|
+
backgroundColor: string;
|
|
7
|
+
display: "flex";
|
|
8
|
+
height: number;
|
|
9
|
+
padding: string;
|
|
10
|
+
};
|
|
11
|
+
icon: (theme: import("@packlink/giger-theme/dist/lib/Theme").Theme) => {
|
|
12
|
+
color: "#006fbb";
|
|
13
|
+
};
|
|
14
|
+
link: (theme: import("@packlink/giger-theme/dist/lib/Theme").Theme) => {
|
|
15
|
+
":hover": {
|
|
16
|
+
color: string;
|
|
17
|
+
textDecoration: string;
|
|
18
|
+
};
|
|
19
|
+
alignItems: "center";
|
|
20
|
+
color: string;
|
|
21
|
+
display: "flex";
|
|
22
|
+
fontWeight: number;
|
|
23
|
+
justifyContent: "space-between";
|
|
24
|
+
textDecoration: string;
|
|
25
|
+
width: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./collapsible-panel";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * as Templates from "./templates";
|
|
2
|
+
export * from "./collapsible-panel";
|
|
2
3
|
export * from "./add-funds-form";
|
|
3
4
|
export * from "./auto-funding-form";
|
|
4
5
|
export * from "./button-group";
|
|
@@ -17,6 +18,7 @@ export * from "./items-breakdown";
|
|
|
17
18
|
export * from "./link-action";
|
|
18
19
|
export * from "./loader";
|
|
19
20
|
export * from "./manage-funding";
|
|
21
|
+
export * from "./payment-method-settings";
|
|
20
22
|
export * from "./portal";
|
|
21
23
|
export * from "./powered-by-shipengine";
|
|
22
24
|
export * from "./section";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./payment-method-settings";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PaymentMethodSettings: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SE } from "@shipengine/alchemy";
|
|
2
2
|
export type SaveStatusProps = {
|
|
3
|
-
errors
|
|
4
|
-
isSaving
|
|
3
|
+
errors?: SE.CodedError[] | null;
|
|
4
|
+
isSaving?: boolean;
|
|
5
5
|
};
|
|
6
|
-
export declare const SaveStatus: ({ errors, isSaving }: SaveStatusProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const SaveStatus: ({ errors, isSaving }: SaveStatusProps) => import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SE } from "@shipengine/alchemy";
|
|
2
|
+
export type AccountSettingsProps = {
|
|
3
|
+
carriers?: SE.Carrier[];
|
|
4
|
+
onSaveSettings: () => void;
|
|
5
|
+
};
|
|
6
|
+
export declare const AccountSettings: ({ carriers, ...rest }: AccountSettingsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./account-settings";
|
|
@@ -4,7 +4,8 @@ export type CarrierRecoveryFormProps = {
|
|
|
4
4
|
address?: SE.Address;
|
|
5
5
|
carrierCode: string;
|
|
6
6
|
errors?: SE.CodedError[] | null;
|
|
7
|
+
fundingSourceId: string;
|
|
7
8
|
onSkip?: () => void;
|
|
8
|
-
onSubmit: (payload: CarrierRecoveryFormPayload) => Promise<void>;
|
|
9
|
+
onSubmit: (fundingSourceId: string, payload: CarrierRecoveryFormPayload) => Promise<void>;
|
|
9
10
|
};
|
|
10
|
-
export declare const CarrierRecoveryForm: ({ address, carrierCode, errors, onSkip, onSubmit, }: CarrierRecoveryFormProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const CarrierRecoveryForm: ({ address, carrierCode, errors, fundingSourceId, onSkip, onSubmit, }: CarrierRecoveryFormProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SE } from "@shipengine/alchemy";
|
|
2
2
|
export type EditBillingFormProps = {
|
|
3
|
+
fundingSources?: SE.FundingSource[];
|
|
3
4
|
onCancel: () => void;
|
|
4
|
-
onSubmit: (
|
|
5
|
+
onSubmit: (billingInfo: SE.FundingSourceAddress, creditCardInfo: SE.CreditCardInfo) => void;
|
|
5
6
|
};
|
|
6
|
-
export declare const EditBillingForm: ({ onCancel, onSubmit }: EditBillingFormProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const EditBillingForm: ({ fundingSources, onCancel, onSubmit }: EditBillingFormProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -21,18 +21,18 @@ export type OnboardingFeatures = {
|
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
export type OnboardingProps = {
|
|
24
|
-
|
|
24
|
+
connectedCarriers: SE.Carrier[];
|
|
25
|
+
createFundingSource: (payload: SE.CreateFundingSource) => Promise<SE.CreateFundingSourceResponse>;
|
|
26
|
+
createFundingSourceErrors: SE.CodedError[] | null;
|
|
25
27
|
createWarehouse: (payload: Partial<SE.Warehouse>) => Promise<SE.Warehouse>;
|
|
26
28
|
features?: OnboardingFeatures;
|
|
29
|
+
fundingSources?: SE.FundingSource[];
|
|
27
30
|
onCarrierCreated: () => Promise<void>;
|
|
28
31
|
onCompleteOnboarding: () => void;
|
|
32
|
+
onFundingSourceCreated: () => Promise<void>;
|
|
29
33
|
onWarehouseCreated: () => Promise<void>;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
registerStampsCarrier: (payload: SE.CarrierConnection) => Promise<void>;
|
|
33
|
-
registerStampsCarrierErrors: SE.CodedError[] | null;
|
|
34
|
-
registerUpsCarrier: (payload: SE.CarrierConnection) => Promise<void>;
|
|
35
|
-
registerUpsCarrierErrors: SE.CodedError[] | null;
|
|
34
|
+
registerCarrier: (payload: SE.CarrierRegistration) => Promise<SE.CarrierRegistrationResponse>;
|
|
35
|
+
registerCarrierErrors: SE.CodedError[] | null;
|
|
36
36
|
warehouses: SE.Warehouse[];
|
|
37
37
|
};
|
|
38
|
-
export declare const Onboarding: ({
|
|
38
|
+
export declare const Onboarding: ({ connectedCarriers, createWarehouse, features, fundingSources, onCarrierCreated, onCompleteOnboarding, onFundingSourceCreated, onWarehouseCreated, registerCarrier, registerCarrierErrors, createFundingSource, createFundingSourceErrors, warehouses, }: OnboardingProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -211,11 +211,12 @@ export declare const walletSchema: z.ZodObject<{
|
|
|
211
211
|
cvv: string;
|
|
212
212
|
expiration: string;
|
|
213
213
|
}>, {
|
|
214
|
-
|
|
215
|
-
|
|
214
|
+
cardNumber: string;
|
|
215
|
+
cvv: string;
|
|
216
|
+
expirationMonth: number;
|
|
217
|
+
expirationYear: number;
|
|
216
218
|
name: string;
|
|
217
|
-
|
|
218
|
-
type: CreditCardVendor;
|
|
219
|
+
provider: CreditCardVendor;
|
|
219
220
|
}, {
|
|
220
221
|
number: string;
|
|
221
222
|
name: string;
|
|
@@ -235,11 +236,12 @@ export declare const walletSchema: z.ZodObject<{
|
|
|
235
236
|
stateProvince: string;
|
|
236
237
|
};
|
|
237
238
|
creditCard: {
|
|
238
|
-
|
|
239
|
-
|
|
239
|
+
cardNumber: string;
|
|
240
|
+
cvv: string;
|
|
241
|
+
expirationMonth: number;
|
|
242
|
+
expirationYear: number;
|
|
240
243
|
name: string;
|
|
241
|
-
|
|
242
|
-
type: CreditCardVendor;
|
|
244
|
+
provider: CreditCardVendor;
|
|
243
245
|
};
|
|
244
246
|
}, {
|
|
245
247
|
address: {
|