@shipengine/elements 1.5.1 → 1.6.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 +14231 -13991
- package/index.js +14251 -14020
- package/package.json +5 -7
- package/src/components/address-preference-context/address-preference-context.d.ts +2 -1
- package/src/components/auto-funding-form/auto-funding-form.styles.d.ts +4 -8
- package/src/components/date-range-select/date-range-select.d.ts +1 -2
- package/src/components/field/create-field-controller.d.ts +2 -1
- package/src/components/field/date-picker/date-picker.d.ts +2 -6
- package/src/components/field/rate-card/rate-card.d.ts +3 -1
- package/src/components/field/rate-card/rate-card.styles.d.ts +1 -0
- package/src/components/field-label/field-label.d.ts +2 -1
- package/src/components/history/history-card/history-card.d.ts +5 -2
- package/src/components/index.d.ts +5 -2
- package/src/components/service-point-display/service-point-display.d.ts +1 -1
- package/src/components/service-point-display/service-point-display.styles.d.ts +8 -0
- package/src/components/templates/address-display/address-display.d.ts +2 -1
- package/src/components/templates/connected-carrier-list/connected-carrier-row/connected-carrier-row.styles.d.ts +17 -0
- package/src/components/templates/index.d.ts +1 -4
- package/src/components/templates/label/label.styles.d.ts +0 -6
- package/src/components/templates/product-form/product-form-schema.d.ts +0 -12
- package/src/components/templates/pudo-rate-tabs/pudo-rate-tabs.d.ts +6 -1
- package/src/components/templates/rate-form/rate-form.d.ts +2 -1
- package/src/components/templates/rate-form/rate-form.styles.d.ts +2 -4
- package/src/components/templates/shipment-form/shipment-schema.d.ts +0 -50
- package/src/components/{templates/warehouse-form → warehouse-form}/warehouse-form.d.ts +1 -1
- package/src/elements/external-carriers/external-carriers.d.ts +817 -9
- package/src/elements/index.d.ts +5 -2
- package/src/elements/label-layout/index.d.ts +1 -0
- package/src/elements/label-layout/label-layout-element.d.ts +785 -0
- package/src/elements/labels-grid/labels-grid.d.ts +9 -1
- package/src/elements/list-carriers/list-carriers.d.ts +810 -1
- package/src/elements/manage-funding/index.d.ts +1 -0
- package/src/elements/manage-funding/manage-funding-element.d.ts +785 -0
- package/src/elements/manage-warehouses/manage-warehouses.d.ts +805 -1
- package/src/elements/payment-method-settings/index.d.ts +1 -0
- package/src/elements/payment-method-settings/payment-method-settings-element.d.ts +785 -0
- package/src/elements/{configure-shipment → purchase-label}/configure-shipment.d.ts +1 -12
- package/src/elements/purchase-label/hooks/index.d.ts +8 -0
- package/src/elements/purchase-label/hooks/use-configure-shipment.d.ts +1 -1
- package/src/elements/{configure-shipment → purchase-label}/hooks/use-rates-form.d.ts +1 -1
- package/src/elements/{configure-shipment → purchase-label}/hooks/use-rates-with-cache.d.ts +1 -1
- package/src/elements/{configure-shipment → purchase-label}/hooks/use-request-preferred-rates.d.ts +1 -1
- package/src/elements/{configure-shipment → purchase-label}/hooks/use-request-rates.d.ts +2 -1
- package/src/elements/purchase-label/purchase-label.d.ts +29 -49
- package/src/elements/shipments-grid/shipments-grid.d.ts +9 -1
- package/src/elements/theme-creator/theme-creator.d.ts +9 -1
- package/src/elements/unit-settings/index.d.ts +1 -0
- package/src/elements/unit-settings/unit-settings-element.d.ts +785 -0
- package/src/elements/view-shipment/view-shipment.d.ts +12 -2
- package/src/elements/void-label/void-label.d.ts +9 -1
- package/src/elements/wallet-history/index.d.ts +1 -0
- package/src/elements/wallet-history/wallet-history-element.d.ts +785 -0
- package/src/features/external-carriers/external-carriers.d.ts +10 -0
- package/src/features/external-carriers/index.d.ts +1 -0
- package/src/features/index.d.ts +7 -0
- package/src/features/label-layout/index.d.ts +2 -0
- package/src/features/label-layout/label-layout.d.ts +2 -0
- package/src/features/label-layout/use-label-layout.d.ts +7 -0
- package/src/features/list-carriers/hooks/index.d.ts +2 -0
- package/src/{hooks → features/list-carriers/hooks}/use-carrier-metadata.d.ts +1 -1
- package/src/{components/templates → features/list-carriers}/list-carriers-row/list-carriers-row.d.ts +2 -2
- package/src/features/list-carriers/list-carriers.d.ts +9 -0
- package/src/features/manage-funding/manage-funding.d.ts +16 -0
- package/src/features/manage-warehouses/manage-warehouses.d.ts +1 -0
- package/src/{components → features}/unit-settings/unit-settings.d.ts +0 -5
- package/src/features/wallet-history/wallet-history.styles.d.ts +10 -10
- package/src/hooks/index.d.ts +0 -1
- package/src/hooks/options/use-rate-options.d.ts +1 -1
- package/src/locales/en/index.d.ts +9 -1
- package/src/types/index.d.ts +1 -0
- package/src/types/preferred-rates.d.ts +13 -0
- package/src/utilities/date.d.ts +2 -1
- package/src/utilities/feature-flags.d.ts +1 -1
- package/src/utilities/index.d.ts +1 -0
- package/src/utilities/tracking-status-formatter.d.ts +1 -0
- package/src/{elements → workflows}/account-settings/account-settings.d.ts +14 -50
- package/src/workflows/account-settings/use-get-panel-props.d.ts +4 -0
- package/src/{elements → workflows}/connect-carrier/connect-carrier.d.ts +9 -1
- package/src/workflows/index.d.ts +3 -0
- package/src/workflows/onboarding/components/onboarding-wizard/onboarding-wizard.d.ts +1 -1
- package/src/workflows/onboarding/components/ship-from-address-step/ship-from-address-step.d.ts +1 -1
- package/src/workflows/onboarding/components/ship-from-address-step/use-ship-from-address-step.d.ts +1 -1
- package/src/workflows/onboarding/onboarding.d.ts +10 -2
- package/src/workflows/purchase-label-workflow/index.d.ts +1 -0
- package/src/{elements/shipengine-workflow/label-workflow.d.ts → workflows/purchase-label-workflow/purchase-label-workflow.d.ts} +19 -21
- package/src/components/date-range-select/date-range-select.styles.d.ts +0 -7
- package/src/components/field/date-picker/date-picker.styles.d.ts +0 -3
- package/src/components/label-layout/index.d.ts +0 -3
- package/src/components/label-layout/label-layout-purchase.d.ts +0 -5
- package/src/components/label-layout/label-layout-settings.d.ts +0 -7
- package/src/components/label-layout/label-layout.d.ts +0 -9
- package/src/components/manage-funding/manage-funding.d.ts +0 -35
- package/src/components/templates/account-settings/account-settings.d.ts +0 -10
- package/src/components/templates/account-settings/index.d.ts +0 -1
- package/src/components/templates/list-carriers/list-carriers.d.ts +0 -16
- package/src/components/templates/manage-warehouses/manage-warehouses.d.ts +0 -11
- package/src/elements/configure-shipment/hooks/index.d.ts +0 -8
- package/src/elements/configure-shipment/index.d.ts +0 -1
- package/src/elements/shipengine-workflow/index.d.ts +0 -1
- /package/src/components/{templates/edit-billing-form → edit-billing-form}/edit-billing-form.d.ts +0 -0
- /package/src/components/{templates/edit-billing-form → edit-billing-form}/edit-billing-form.styles.d.ts +0 -0
- /package/src/components/{templates/edit-billing-form → edit-billing-form}/index.d.ts +0 -0
- /package/src/components/{templates/wallet-card → wallet-card}/index.d.ts +0 -0
- /package/src/components/{templates/wallet-card → wallet-card}/wallet-card.d.ts +0 -0
- /package/src/components/{templates/wallet-card → wallet-card}/wallet-card.styles.d.ts +0 -0
- /package/src/components/{templates/warehouse-form → warehouse-form}/index.d.ts +0 -0
- /package/src/components/{templates/warehouse-form → warehouse-form}/warehouse-form-schema.d.ts +0 -0
- /package/src/elements/{configure-shipment → purchase-label}/hooks/use-address.d.ts +0 -0
- /package/src/elements/{configure-shipment → purchase-label}/hooks/use-customs.d.ts +0 -0
- /package/src/elements/{configure-shipment → purchase-label}/hooks/use-presets.d.ts +0 -0
- /package/src/elements/{configure-shipment → purchase-label}/hooks/use-shipment-form.d.ts +0 -0
- /package/src/{components → features}/label-layout/label-layout.styles.d.ts +0 -0
- /package/src/{elements → features}/list-carriers/hooks/use-list-connected-carriers.d.ts +0 -0
- /package/src/{components/templates → features}/list-carriers/index.d.ts +0 -0
- /package/src/{components/templates → features/list-carriers}/list-carriers-row/index.d.ts +0 -0
- /package/src/{components/templates → features/list-carriers}/list-carriers-row/list-carriers-row.styles.d.ts +0 -0
- /package/src/{components/templates → features}/list-carriers/list-carriers.styles.d.ts +0 -0
- /package/src/{components → features}/manage-funding/index.d.ts +0 -0
- /package/src/{components/templates → features}/manage-warehouses/index.d.ts +0 -0
- /package/src/{components/templates → features}/manage-warehouses/manage-warehouse.styles.d.ts +0 -0
- /package/src/{components/templates → features/manage-warehouses}/warehouse-display/index.d.ts +0 -0
- /package/src/{components/templates → features/manage-warehouses}/warehouse-display/warehouse-display.d.ts +0 -0
- /package/src/{components → features}/payment-method-settings/index.d.ts +0 -0
- /package/src/{components → features}/payment-method-settings/payment-method-settings.d.ts +0 -0
- /package/src/{components → features}/unit-settings/index.d.ts +0 -0
- /package/src/{elements → workflows}/account-settings/index.d.ts +0 -0
- /package/src/{elements → workflows}/connect-carrier/index.d.ts +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ConnectCarrier } from "../../workflows";
|
|
2
|
+
export type ExternalCarriersFeatures = ConnectCarrier.ConnectCarrierFeatures;
|
|
3
|
+
export type ExternalCarriersProps = {
|
|
4
|
+
/**
|
|
5
|
+
* `availableCarrierConnections` is a set of carrier codes for carriers that may be added. If this is omitted,
|
|
6
|
+
* new carriers may not be added by this element.
|
|
7
|
+
*/
|
|
8
|
+
features?: ExternalCarriersFeatures;
|
|
9
|
+
};
|
|
10
|
+
export declare const ExternalCarriers: ({ features }: ExternalCarriersProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./external-carriers";
|
package/src/features/index.d.ts
CHANGED
|
@@ -1 +1,8 @@
|
|
|
1
1
|
export * from "./wallet-history";
|
|
2
|
+
export * from "./label-layout";
|
|
3
|
+
export * from "./manage-funding";
|
|
4
|
+
export * from "./unit-settings";
|
|
5
|
+
export * from "./payment-method-settings";
|
|
6
|
+
export * from "./manage-warehouses";
|
|
7
|
+
export * from "./list-carriers";
|
|
8
|
+
export * from "./external-carriers";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SE } from "@shipengine/alchemy";
|
|
2
|
+
export declare const useLabelLayout: () => {
|
|
3
|
+
accountSettings: SE.AccountSettings | undefined;
|
|
4
|
+
errors: SE.CodedError[] | null;
|
|
5
|
+
loading: boolean;
|
|
6
|
+
updateAccountSettings: (newLabelLayout: SE.LabelLayout) => Promise<void>;
|
|
7
|
+
};
|
package/src/{components/templates → features/list-carriers}/list-carriers-row/list-carriers-row.d.ts
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CodedError } from "@shipengine/alchemy";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { AddCarrierFormPayload } from "../../../components/templates/add-carrier-form";
|
|
3
|
+
import { ConnectedCarrierMetadata } from "../hooks/use-list-connected-carriers";
|
|
4
4
|
export type ListCarriersRowProps = {
|
|
5
5
|
connectedCarrier: ConnectedCarrierMetadata;
|
|
6
6
|
registerCarrier: (payload?: AddCarrierFormPayload) => Promise<void>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type ListCarriersFeatures = {
|
|
2
|
+
carriers: {
|
|
3
|
+
enabledCarriers: ("stamps_com" | "ups_walleted" | "ups" | "dhl_express_walleted" | "dhl_express_worldwide" | "hermes" | "yodel_walleted" | "dpdwallet" | "globalpost")[];
|
|
4
|
+
};
|
|
5
|
+
};
|
|
6
|
+
export type ListCarriersProps = {
|
|
7
|
+
features?: ListCarriersFeatures;
|
|
8
|
+
};
|
|
9
|
+
export declare const ListCarriers: ({ features, }: ListCarriersProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @namespace ManageFunding
|
|
3
|
+
*
|
|
4
|
+
* # Manage Funding Component
|
|
5
|
+
*
|
|
6
|
+
* - The `<ManageFunding />` component is used to manage funding rules and add funds to a carrier
|
|
7
|
+
* account, and is composed in the `<AccountSettings />` component.
|
|
8
|
+
*
|
|
9
|
+
* @param ManageFundingProps The base props that will be passed into the `<ManageFunding />` component.
|
|
10
|
+
*
|
|
11
|
+
* @returns Element A React element that renders the `<ManageFunding />` component allowing users
|
|
12
|
+
* manage funding rules and add funds to their carrier accounts.
|
|
13
|
+
*
|
|
14
|
+
* @see {@link ManageFundingProps | The props that are passed into the `<ManageFunding />` component}
|
|
15
|
+
*/
|
|
16
|
+
export declare const ManageFunding: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ManageWarehouses: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -21,10 +21,11 @@ export declare const styles: {
|
|
|
21
21
|
padding: number;
|
|
22
22
|
textAlign: "center";
|
|
23
23
|
};
|
|
24
|
-
gridContainer:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
gridContainer: {
|
|
25
|
+
"@media (max-width: 550px)": {
|
|
26
|
+
display: "flex";
|
|
27
|
+
flexDirection: "column-reverse";
|
|
28
|
+
};
|
|
28
29
|
};
|
|
29
30
|
linkAction: {
|
|
30
31
|
margin: string;
|
|
@@ -40,7 +41,6 @@ export declare const styles: {
|
|
|
40
41
|
textAlign: "center";
|
|
41
42
|
};
|
|
42
43
|
skeletonCard: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
43
|
-
backgroundColor: string;
|
|
44
44
|
display: "flex";
|
|
45
45
|
justifyContent: "space-between";
|
|
46
46
|
padding: number;
|
|
@@ -58,9 +58,13 @@ export declare const styles: {
|
|
|
58
58
|
rowGap: number;
|
|
59
59
|
};
|
|
60
60
|
skeletonCardList: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
61
|
+
"& > li:not(:last-child)": {
|
|
62
|
+
borderBottom: string;
|
|
63
|
+
};
|
|
64
|
+
border: string;
|
|
61
65
|
display: "flex";
|
|
62
66
|
flexDirection: "column";
|
|
63
|
-
|
|
67
|
+
listStyle: "none";
|
|
64
68
|
};
|
|
65
69
|
skeletonCardLogo: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
66
70
|
alignItems: "center";
|
|
@@ -79,8 +83,4 @@ export declare const styles: {
|
|
|
79
83
|
marginRight: string;
|
|
80
84
|
maxWidth: string;
|
|
81
85
|
};
|
|
82
|
-
transactionTypeSelect: {
|
|
83
|
-
height: string;
|
|
84
|
-
width: string;
|
|
85
|
-
};
|
|
86
86
|
};
|
package/src/hooks/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SE } from "@shipengine/alchemy";
|
|
2
|
-
import { PreferredRateAcknowledgementMessage, PreferredRatesResponse } from "../../
|
|
2
|
+
import { PreferredRateAcknowledgementMessage, PreferredRatesResponse } from "../../types";
|
|
3
3
|
/**
|
|
4
4
|
* @internal
|
|
5
5
|
*
|
|
@@ -231,7 +231,8 @@ declare const _default: {
|
|
|
231
231
|
nextOpeningDay: string;
|
|
232
232
|
until: string;
|
|
233
233
|
selected: string;
|
|
234
|
-
|
|
234
|
+
select: string;
|
|
235
|
+
today: string;
|
|
235
236
|
viewMap: string;
|
|
236
237
|
otherLocations: string;
|
|
237
238
|
noServicePointsFound: string;
|
|
@@ -287,12 +288,14 @@ declare const _default: {
|
|
|
287
288
|
"aHR0cHM6Ly93d3cueW9kZWxkaXJlY3QuY28udWsvY29udGVudC9hYm91dC10ZXJtcw==": string;
|
|
288
289
|
aHR0cHM6Ly93d3cuc2hpcHN0YXRpb24uY29tL3Rlcm1zLXNlcnZpY2UtdW5pdGVkLWtpbmdkb20v: string;
|
|
289
290
|
"aHR0cHM6Ly93d3cuZHBkLmNvLnVrL3N0YW5kYXJkX3Rlcm1zX2FuZF9jb25kaXRpb25zLmpzcA==": string;
|
|
291
|
+
aHR0cHM6Ly93d3cuZ29nbG9iYWxwb3N0LmNvbS9jb25kaXRpb25z: string;
|
|
290
292
|
};
|
|
291
293
|
termsAndAgreementTitles: {
|
|
292
294
|
"WW9kZWwgRGlyZWN0IC0gVGVybXMgYW5kIENvbmRpdGlvbnMgKOKAnFRlcm1z4oCdKQ==": string;
|
|
293
295
|
"RXZyaSBTZW5kIFRlcm1zICYgQ29uZGl0aW9ucw==": string;
|
|
294
296
|
"VGVybXMgb2YgU2VydmljZSBVbml0ZWQgS2luZ2RvbQ==": string;
|
|
295
297
|
RFBEIFN0YW5kYXJkIFRlcm1zIGFuZCBDb25kaXRpb25z: string;
|
|
298
|
+
"R2xvYmFsUG9zdCBUZXJtcyBhbmQgQ29uZGl0aW9ucw==": string;
|
|
296
299
|
};
|
|
297
300
|
};
|
|
298
301
|
"manage-defaults": {
|
|
@@ -731,6 +734,7 @@ declare const _default: {
|
|
|
731
734
|
"connect-carrier": {
|
|
732
735
|
actions: {
|
|
733
736
|
cancel: string;
|
|
737
|
+
carrierSettings: string;
|
|
734
738
|
connectCarriers: string;
|
|
735
739
|
disconnect: string;
|
|
736
740
|
disconnectCarrier: string;
|
|
@@ -749,6 +753,10 @@ declare const _default: {
|
|
|
749
753
|
status: {
|
|
750
754
|
connected: string;
|
|
751
755
|
};
|
|
756
|
+
disconnectDropdown: {
|
|
757
|
+
toastTitle: string;
|
|
758
|
+
toastBody: string;
|
|
759
|
+
};
|
|
752
760
|
};
|
|
753
761
|
"account-settings": {
|
|
754
762
|
messages: {
|
package/src/types/index.d.ts
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SE } from "@shipengine/alchemy";
|
|
2
|
+
export type PreferredRateAcknowledgementMessage = {
|
|
3
|
+
link?: {
|
|
4
|
+
text: string;
|
|
5
|
+
url: string;
|
|
6
|
+
};
|
|
7
|
+
primaryMessage: string;
|
|
8
|
+
secondaryMessage?: string;
|
|
9
|
+
};
|
|
10
|
+
export type PreferredRatesResponse = Array<{
|
|
11
|
+
rate: SE.Rate;
|
|
12
|
+
rateAcknowledgementMessage?: PreferredRateAcknowledgementMessage;
|
|
13
|
+
}>;
|
package/src/utilities/date.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as Locales from "date-fns/locale";
|
|
1
2
|
/**
|
|
2
3
|
* @internal
|
|
3
4
|
*
|
|
@@ -12,7 +13,7 @@ export declare const formatDate: (date: string, locale?: string) => string;
|
|
|
12
13
|
* @param locale string i.e. "en-US"
|
|
13
14
|
* @returns locale data
|
|
14
15
|
*/
|
|
15
|
-
export declare const findDateLocale: (locale?: string) => Locale;
|
|
16
|
+
export declare const findDateLocale: (locale?: string) => Locales.Locale;
|
|
16
17
|
/**
|
|
17
18
|
* @internal
|
|
18
19
|
* Given a date and a locale, format the date to the locale's date format.
|
|
@@ -161,7 +161,7 @@ export declare const featureFlags: {
|
|
|
161
161
|
* `enabledCarriers` is a list of all `carriers` that are enabled for use in ShipEngine
|
|
162
162
|
* Elements.
|
|
163
163
|
*/
|
|
164
|
-
readonly enabledCarriers: readonly ["stamps_com", "ups_walleted", "dhl_express_walleted", "ups", "hermes", "yodel_walleted", "dpdwallet"];
|
|
164
|
+
readonly enabledCarriers: readonly ["stamps_com", "ups_walleted", "dhl_express_walleted", "ups", "hermes", "yodel_walleted", "dpdwallet", "globalpost"];
|
|
165
165
|
};
|
|
166
166
|
/**
|
|
167
167
|
* All global `presentation` related feature flags.
|
package/src/utilities/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const trackingStatusFormatter: (status: string) => string | undefined;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { ListCarriersFeatures } from "../../features";
|
|
3
|
+
import { ConnectCarrier } from "../connect-carrier";
|
|
4
|
+
export type AccountSettingsFeatures = ListCarriersFeatures & ConnectCarrier.ConnectCarrierFeatures;
|
|
3
5
|
/**
|
|
4
6
|
* # Account Settings Component Props
|
|
5
7
|
*
|
|
@@ -18,29 +20,7 @@ export type ComponentProps = {
|
|
|
18
20
|
*/
|
|
19
21
|
onSaveSettings: () => void;
|
|
20
22
|
};
|
|
21
|
-
|
|
22
|
-
* # Account Settings Component
|
|
23
|
-
*
|
|
24
|
-
* - The `<AccountSettings />` component is used to display the user's account settings, as well as
|
|
25
|
-
* allowing them to make changes to various aspects of their account.
|
|
26
|
-
*
|
|
27
|
-
* @returns Element An EmotionJSX.Element that will render the `<AccountSettings />` component
|
|
28
|
-
* with all the appropriate wrappers.
|
|
29
|
-
*
|
|
30
|
-
* @example
|
|
31
|
-
* You can see how the `<Component />` is used in the `createElement` function call below.
|
|
32
|
-
* ```tsx
|
|
33
|
-
* export const Element = alchemy.createElement(Component, ErrorFallback, {
|
|
34
|
-
* css: { height: "100%", maxWidth: "800px", minWidth: "440px", width: "100%" },
|
|
35
|
-
* resources: { en },
|
|
36
|
-
* });
|
|
37
|
-
* ```
|
|
38
|
-
*
|
|
39
|
-
* <br />
|
|
40
|
-
*
|
|
41
|
-
* @see {@link AccountSettings.Element | The **Element** created to render `<AccountSettings />`}
|
|
42
|
-
*/
|
|
43
|
-
export declare const Component: ({ features, onSaveSettings }: ComponentProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare const Component: ({ onSaveSettings, features }: ComponentProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
44
24
|
/**
|
|
45
25
|
* # Registered Account Settings Element
|
|
46
26
|
*
|
|
@@ -206,13 +186,6 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
206
186
|
showItems: string;
|
|
207
187
|
showMoreRates: string;
|
|
208
188
|
showFewerRates: string;
|
|
209
|
-
/**
|
|
210
|
-
* # Account Settings Component Props
|
|
211
|
-
*
|
|
212
|
-
* - These are the base props that will be passed into the `<AccountSettings />` component.
|
|
213
|
-
*
|
|
214
|
-
* @see {@link AccountSettings.Component | This prop types usage in the `<AccountSettings /> component`}
|
|
215
|
-
*/
|
|
216
189
|
saveRate: string;
|
|
217
190
|
};
|
|
218
191
|
balance: {
|
|
@@ -307,7 +280,8 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
307
280
|
nextOpeningDay: string;
|
|
308
281
|
until: string;
|
|
309
282
|
selected: string;
|
|
310
|
-
|
|
283
|
+
select: string;
|
|
284
|
+
today: string;
|
|
311
285
|
viewMap: string;
|
|
312
286
|
otherLocations: string;
|
|
313
287
|
noServicePointsFound: string;
|
|
@@ -363,12 +337,14 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
363
337
|
"aHR0cHM6Ly93d3cueW9kZWxkaXJlY3QuY28udWsvY29udGVudC9hYm91dC10ZXJtcw==": string;
|
|
364
338
|
aHR0cHM6Ly93d3cuc2hpcHN0YXRpb24uY29tL3Rlcm1zLXNlcnZpY2UtdW5pdGVkLWtpbmdkb20v: string;
|
|
365
339
|
"aHR0cHM6Ly93d3cuZHBkLmNvLnVrL3N0YW5kYXJkX3Rlcm1zX2FuZF9jb25kaXRpb25zLmpzcA==": string;
|
|
340
|
+
aHR0cHM6Ly93d3cuZ29nbG9iYWxwb3N0LmNvbS9jb25kaXRpb25z: string;
|
|
366
341
|
};
|
|
367
342
|
termsAndAgreementTitles: {
|
|
368
343
|
"WW9kZWwgRGlyZWN0IC0gVGVybXMgYW5kIENvbmRpdGlvbnMgKOKAnFRlcm1z4oCdKQ==": string;
|
|
369
344
|
"RXZyaSBTZW5kIFRlcm1zICYgQ29uZGl0aW9ucw==": string;
|
|
370
345
|
"VGVybXMgb2YgU2VydmljZSBVbml0ZWQgS2luZ2RvbQ==": string;
|
|
371
346
|
RFBEIFN0YW5kYXJkIFRlcm1zIGFuZCBDb25kaXRpb25z: string;
|
|
347
|
+
"R2xvYmFsUG9zdCBUZXJtcyBhbmQgQ29uZGl0aW9ucw==": string;
|
|
372
348
|
};
|
|
373
349
|
};
|
|
374
350
|
"manage-defaults": {
|
|
@@ -400,10 +376,6 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
400
376
|
metric: string;
|
|
401
377
|
};
|
|
402
378
|
weight: {
|
|
403
|
-
/**
|
|
404
|
-
* This callback function will be used to house the logic you wish to execute when the
|
|
405
|
-
* user saves new changes to their account settings.
|
|
406
|
-
*/
|
|
407
379
|
title: string;
|
|
408
380
|
standard: string;
|
|
409
381
|
g: string;
|
|
@@ -538,13 +510,6 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
538
510
|
remove: string;
|
|
539
511
|
save: string;
|
|
540
512
|
skipForNow: string;
|
|
541
|
-
/**
|
|
542
|
-
* # Account Settings Component Props
|
|
543
|
-
*
|
|
544
|
-
* - These are the base props that will be passed into the `<AccountSettings />` component.
|
|
545
|
-
*
|
|
546
|
-
* @see {@link AccountSettings.Component | This prop types usage in the `<AccountSettings /> component`}
|
|
547
|
-
*/
|
|
548
513
|
submit: string;
|
|
549
514
|
tryAgain: string;
|
|
550
515
|
};
|
|
@@ -558,10 +523,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
558
523
|
addressLine2: string;
|
|
559
524
|
cityLocality: string;
|
|
560
525
|
stateProvince: string;
|
|
561
|
-
postalCode: string;
|
|
562
|
-
* This callback function will be used to house the logic you wish to execute when the
|
|
563
|
-
* user saves new changes to their account settings.
|
|
564
|
-
*/
|
|
526
|
+
postalCode: string;
|
|
565
527
|
phone: string;
|
|
566
528
|
email: string;
|
|
567
529
|
addressResidentialIndicator: string;
|
|
@@ -821,6 +783,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
821
783
|
"connect-carrier": {
|
|
822
784
|
actions: {
|
|
823
785
|
cancel: string;
|
|
786
|
+
carrierSettings: string;
|
|
824
787
|
connectCarriers: string;
|
|
825
788
|
disconnect: string;
|
|
826
789
|
disconnectCarrier: string;
|
|
@@ -833,15 +796,16 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
833
796
|
};
|
|
834
797
|
search: string;
|
|
835
798
|
settingsModal: {
|
|
836
|
-
/**
|
|
837
|
-
* Feature flags controlling operation of various sub components.
|
|
838
|
-
*/
|
|
839
799
|
closeDialog: string;
|
|
840
800
|
header: string;
|
|
841
801
|
};
|
|
842
802
|
status: {
|
|
843
803
|
connected: string;
|
|
844
804
|
};
|
|
805
|
+
disconnectDropdown: {
|
|
806
|
+
toastTitle: string;
|
|
807
|
+
toastBody: string;
|
|
808
|
+
};
|
|
845
809
|
};
|
|
846
810
|
"account-settings": {
|
|
847
811
|
messages: {
|
|
@@ -272,7 +272,8 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
272
272
|
nextOpeningDay: string;
|
|
273
273
|
until: string;
|
|
274
274
|
selected: string;
|
|
275
|
-
|
|
275
|
+
select: string;
|
|
276
|
+
today: string;
|
|
276
277
|
viewMap: string;
|
|
277
278
|
otherLocations: string;
|
|
278
279
|
noServicePointsFound: string;
|
|
@@ -328,12 +329,14 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
328
329
|
"aHR0cHM6Ly93d3cueW9kZWxkaXJlY3QuY28udWsvY29udGVudC9hYm91dC10ZXJtcw==": string;
|
|
329
330
|
aHR0cHM6Ly93d3cuc2hpcHN0YXRpb24uY29tL3Rlcm1zLXNlcnZpY2UtdW5pdGVkLWtpbmdkb20v: string;
|
|
330
331
|
"aHR0cHM6Ly93d3cuZHBkLmNvLnVrL3N0YW5kYXJkX3Rlcm1zX2FuZF9jb25kaXRpb25zLmpzcA==": string;
|
|
332
|
+
aHR0cHM6Ly93d3cuZ29nbG9iYWxwb3N0LmNvbS9jb25kaXRpb25z: string;
|
|
331
333
|
};
|
|
332
334
|
termsAndAgreementTitles: {
|
|
333
335
|
"WW9kZWwgRGlyZWN0IC0gVGVybXMgYW5kIENvbmRpdGlvbnMgKOKAnFRlcm1z4oCdKQ==": string;
|
|
334
336
|
"RXZyaSBTZW5kIFRlcm1zICYgQ29uZGl0aW9ucw==": string;
|
|
335
337
|
"VGVybXMgb2YgU2VydmljZSBVbml0ZWQgS2luZ2RvbQ==": string;
|
|
336
338
|
RFBEIFN0YW5kYXJkIFRlcm1zIGFuZCBDb25kaXRpb25z: string;
|
|
339
|
+
"R2xvYmFsUG9zdCBUZXJtcyBhbmQgQ29uZGl0aW9ucw==": string;
|
|
337
340
|
};
|
|
338
341
|
};
|
|
339
342
|
"manage-defaults": {
|
|
@@ -795,6 +798,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
795
798
|
"connect-carrier": {
|
|
796
799
|
actions: {
|
|
797
800
|
cancel: string;
|
|
801
|
+
carrierSettings: string;
|
|
798
802
|
connectCarriers: string;
|
|
799
803
|
disconnect: string;
|
|
800
804
|
disconnectCarrier: string;
|
|
@@ -813,6 +817,10 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
813
817
|
status: {
|
|
814
818
|
connected: string;
|
|
815
819
|
};
|
|
820
|
+
disconnectDropdown: {
|
|
821
|
+
toastTitle: string;
|
|
822
|
+
toastBody: string;
|
|
823
|
+
};
|
|
816
824
|
};
|
|
817
825
|
"account-settings": {
|
|
818
826
|
messages: {
|
package/src/workflows/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SE } from "@shipengine/alchemy";
|
|
2
|
-
import { ListCarriersFeatures } from "../../../../
|
|
2
|
+
import { ListCarriersFeatures } from "../../../../features";
|
|
3
3
|
import { ShipFromAddressStepProps } from "../ship-from-address-step";
|
|
4
4
|
export type ValidateWarehouse = {
|
|
5
5
|
type: "warehouse";
|
package/src/workflows/onboarding/components/ship-from-address-step/ship-from-address-step.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SE } from "@shipengine/alchemy";
|
|
2
|
-
import { WarehousePayload } from "../../../../components
|
|
2
|
+
import { WarehousePayload } from "../../../../components";
|
|
3
3
|
export type ShipFromAddressStepProps = {
|
|
4
4
|
defaultShipFromAddress?: Pick<SE.Warehouse, "name" | "isDefault" | "originAddress" | "returnAddress">;
|
|
5
5
|
onSubmit: (payload: WarehousePayload) => Promise<void>;
|
|
@@ -309,7 +309,8 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
309
309
|
nextOpeningDay: string;
|
|
310
310
|
until: string;
|
|
311
311
|
selected: string;
|
|
312
|
-
|
|
312
|
+
select: string;
|
|
313
|
+
today: string;
|
|
313
314
|
viewMap: string;
|
|
314
315
|
otherLocations: string;
|
|
315
316
|
noServicePointsFound: string;
|
|
@@ -365,12 +366,14 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
365
366
|
"aHR0cHM6Ly93d3cueW9kZWxkaXJlY3QuY28udWsvY29udGVudC9hYm91dC10ZXJtcw==": string;
|
|
366
367
|
aHR0cHM6Ly93d3cuc2hpcHN0YXRpb24uY29tL3Rlcm1zLXNlcnZpY2UtdW5pdGVkLWtpbmdkb20v: string;
|
|
367
368
|
"aHR0cHM6Ly93d3cuZHBkLmNvLnVrL3N0YW5kYXJkX3Rlcm1zX2FuZF9jb25kaXRpb25zLmpzcA==": string;
|
|
369
|
+
aHR0cHM6Ly93d3cuZ29nbG9iYWxwb3N0LmNvbS9jb25kaXRpb25z: string;
|
|
368
370
|
};
|
|
369
371
|
termsAndAgreementTitles: {
|
|
370
372
|
"WW9kZWwgRGlyZWN0IC0gVGVybXMgYW5kIENvbmRpdGlvbnMgKOKAnFRlcm1z4oCdKQ==": string;
|
|
371
373
|
"RXZyaSBTZW5kIFRlcm1zICYgQ29uZGl0aW9ucw==": string;
|
|
372
374
|
"VGVybXMgb2YgU2VydmljZSBVbml0ZWQgS2luZ2RvbQ==": string;
|
|
373
375
|
RFBEIFN0YW5kYXJkIFRlcm1zIGFuZCBDb25kaXRpb25z: string;
|
|
376
|
+
"R2xvYmFsUG9zdCBUZXJtcyBhbmQgQ29uZGl0aW9ucw==": string;
|
|
374
377
|
};
|
|
375
378
|
};
|
|
376
379
|
"manage-defaults": {
|
|
@@ -855,6 +858,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
855
858
|
"connect-carrier": {
|
|
856
859
|
actions: {
|
|
857
860
|
cancel: string;
|
|
861
|
+
carrierSettings: string;
|
|
858
862
|
connectCarriers: string;
|
|
859
863
|
disconnect: string;
|
|
860
864
|
disconnectCarrier: string;
|
|
@@ -862,7 +866,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
862
866
|
noCarriersDescription: string;
|
|
863
867
|
registrationForm: {
|
|
864
868
|
error: string;
|
|
865
|
-
title: string;
|
|
869
|
+
title: string;
|
|
866
870
|
betaWarning: string;
|
|
867
871
|
};
|
|
868
872
|
search: string;
|
|
@@ -873,6 +877,10 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
873
877
|
status: {
|
|
874
878
|
connected: string;
|
|
875
879
|
};
|
|
880
|
+
disconnectDropdown: {
|
|
881
|
+
toastTitle: string;
|
|
882
|
+
toastBody: string;
|
|
883
|
+
};
|
|
876
884
|
};
|
|
877
885
|
"account-settings": {
|
|
878
886
|
messages: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as PurchaseLabelWorkflow from "./purchase-label-workflow";
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { Shipment } from "@shipengine/js-api";
|
|
3
|
-
import { PurchaseLabel } from "
|
|
4
|
-
import { ViewShipment } from "../view-shipment";
|
|
5
|
-
import { VoidLabel } from "../void-label";
|
|
3
|
+
import { PurchaseLabel, ViewShipment, VoidLabel } from "../../elements";
|
|
6
4
|
/**
|
|
7
5
|
* @internal
|
|
8
6
|
*
|
|
9
7
|
* # Label Workflow Props
|
|
10
8
|
*
|
|
11
|
-
* - These are the base props that will be passed into the `<
|
|
9
|
+
* - These are the base props that will be passed into the `<PurchaseLabelWorkflow />` component.
|
|
12
10
|
*
|
|
13
|
-
* @see {@link
|
|
11
|
+
* @see {@link PurchaseLabelWorkflow.Element | The `<PurchaseLabelWorkflow.Element />` component}
|
|
14
12
|
*/
|
|
15
|
-
export type
|
|
13
|
+
export type PurchaseLabelWorkflowProps = {
|
|
16
14
|
/**
|
|
17
15
|
* `callbacks` is an optional set of callbacks that will be invoked at various points in the
|
|
18
16
|
* label purchasing workflow.
|
|
@@ -66,7 +64,7 @@ export type LabelWorkflowProps = {
|
|
|
66
64
|
* setLabelId,
|
|
67
65
|
* setShipmentId,
|
|
68
66
|
* setIsVoidingLabel,
|
|
69
|
-
* } =
|
|
67
|
+
* } = usePurchaseLabelWorkflow({
|
|
70
68
|
* _labelId,
|
|
71
69
|
* _multiplexedId,
|
|
72
70
|
* });
|
|
@@ -74,9 +72,9 @@ export type LabelWorkflowProps = {
|
|
|
74
72
|
*
|
|
75
73
|
* <br />
|
|
76
74
|
*
|
|
77
|
-
* @see {@link
|
|
75
|
+
* @see {@link PurchaseLabelWorkflow.Element | The `<PurchaseLabelWorkflow.Element />` component using this hook}
|
|
78
76
|
*/
|
|
79
|
-
export declare const
|
|
77
|
+
export declare const usePurchaseLabelWorkflow: ({ _multiplexedId, _labelId, }: {
|
|
80
78
|
_callbacks?: {
|
|
81
79
|
/**
|
|
82
80
|
* `onLabelCreateSuccess` is an optional callback function that will be invoked when a label
|
|
@@ -116,9 +114,9 @@ export declare const useLabelWorkflow: ({ _multiplexedId, _labelId, }: {
|
|
|
116
114
|
} | {
|
|
117
115
|
oneOff: true;
|
|
118
116
|
};
|
|
119
|
-
setIsVoidingLabel:
|
|
120
|
-
setLabelId: (nextLabelId:
|
|
121
|
-
setMultiplexedId:
|
|
117
|
+
setIsVoidingLabel: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
118
|
+
setLabelId: (nextLabelId: PurchaseLabelWorkflowProps["labelId"]) => void;
|
|
119
|
+
setMultiplexedId: import("react").Dispatch<import("react").SetStateAction<({
|
|
122
120
|
orderSourceCode: string;
|
|
123
121
|
} & ({
|
|
124
122
|
externalOrderNumber: string;
|
|
@@ -131,7 +129,7 @@ export declare const useLabelWorkflow: ({ _multiplexedId, _labelId, }: {
|
|
|
131
129
|
} | {
|
|
132
130
|
oneOff: true;
|
|
133
131
|
}>>;
|
|
134
|
-
setShipmentId:
|
|
132
|
+
setShipmentId: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
|
|
135
133
|
shipmentId: string | undefined;
|
|
136
134
|
};
|
|
137
135
|
/**
|
|
@@ -139,17 +137,17 @@ export declare const useLabelWorkflow: ({ _multiplexedId, _labelId, }: {
|
|
|
139
137
|
*
|
|
140
138
|
* # Label Workflow Element
|
|
141
139
|
*
|
|
142
|
-
* - The `<
|
|
140
|
+
* - The `<PurchaseLabelWorkflow.Element />` component is a composition of the PurchaseLabel, ViewShipment,
|
|
143
141
|
* and VoidLabel elements that allows users to purchase a label, view the shipment details, and optionally void their shipping label.
|
|
144
142
|
*
|
|
145
|
-
* @param
|
|
143
|
+
* @param PurchaseLabelWorkflowProps The props necessary to render the `<PurchaseLabelWorkflow.Element />` for shipment
|
|
146
144
|
* based or sales order based label purchasing.
|
|
147
145
|
*
|
|
148
|
-
* @returns Element A React Element that will render the `<
|
|
146
|
+
* @returns Element A React Element that will render the `<PurchaseLabelWorkflow />` component.
|
|
149
147
|
*
|
|
150
148
|
* @example
|
|
151
149
|
* ```tsx
|
|
152
|
-
* <
|
|
150
|
+
* <PurchaseLabelWorkflow
|
|
153
151
|
* {...elementProps}
|
|
154
152
|
* callbacks={{ onLabelCreateSuccess }}
|
|
155
153
|
* multiplexedId={elementIdProps}
|
|
@@ -158,7 +156,7 @@ export declare const useLabelWorkflow: ({ _multiplexedId, _labelId, }: {
|
|
|
158
156
|
*
|
|
159
157
|
* <br />
|
|
160
158
|
*
|
|
161
|
-
* @see {@link
|
|
162
|
-
* @see {@link
|
|
159
|
+
* @see {@link PurchaseLabelWorkflowProps | The props that are passed into the `<PurchaseLabelWorkflow />` component}
|
|
160
|
+
* @see {@link PurchaseLabelWorkflow.usePurchaseLabelWorkflow | The `hook` that is used to manage the state of the `<PurchaseLabelWorkflow />` component}
|
|
163
161
|
*/
|
|
164
|
-
export declare const Element: ({ multiplexedId: _multiplexedId, labelId: _labelId, features: propFeatures, callbacks, }:
|
|
162
|
+
export declare const Element: ({ multiplexedId: _multiplexedId, labelId: _labelId, features: propFeatures, callbacks, }: PurchaseLabelWorkflowProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|