@shipengine/elements 1.8.0 → 2.0.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/README.md +0 -4
- package/address-8f8119f4.js +1 -0
- package/assertions-dfa95b4d.js +1 -0
- package/carrier-c2a5ed53.js +1 -0
- package/carrier-logo-330e926f.js +1 -0
- package/components.js +1 -0
- package/constants.js +1 -0
- package/elements.js +1 -0
- package/extensions.js +1 -0
- package/formatString-413ec7c7.js +1 -0
- package/hooks.js +1 -0
- package/index.js +1 -25578
- package/money-d4f3d7c3.js +1 -0
- package/package.json +53 -7
- package/phone-87dd7bd8.js +1 -0
- package/schemas.js +1 -0
- package/shipment-150160e0.js +1 -0
- package/src/components/add-funds-form/add-funds-form.d.ts +1 -1
- package/src/components/address-preference-context/address-preference-context.d.ts +5 -2
- package/src/components/auto-funding-form/auto-funding-form.d.ts +1 -1
- package/src/components/carrier-balance/carrier-balance.d.ts +1 -1
- package/src/components/carrier-icon/carrier-icon.d.ts +9 -9
- package/src/components/carrier-logo/carrier-logo.d.ts +2 -1
- package/src/components/collapsible-panel/collapsible-panel.d.ts +1 -1
- package/src/components/display-term/display-term.d.ts +1 -1
- package/src/components/edit-billing-form/edit-billing-form.d.ts +1 -1
- package/src/components/field/date-picker/date-picker.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/rate-card/rate-card.d.ts +3 -2
- package/src/components/field/rate-card/rate-card.styles.d.ts +0 -1
- package/src/components/field/rate-select/rate-select.d.ts +7 -2
- package/src/components/fund-and-purchase/fund-and-purchase.d.ts +5 -2
- package/src/components/here-map/here-map.d.ts +16 -0
- package/src/components/here-map/here-map.styles.d.ts +23 -0
- package/src/components/history/history-card/history-card.d.ts +1 -1
- package/src/components/index.d.ts +1 -0
- package/src/components/items-breakdown/items-breakdown.d.ts +1 -1
- package/src/components/modal/modal.d.ts +2 -1
- package/src/components/pager/pager.d.ts +1 -1
- package/src/components/rate-details/index.d.ts +1 -0
- package/src/components/rate-details/rate-details.d.ts +17 -0
- package/src/components/rate-details/rate-details.styles.d.ts +23 -0
- package/src/components/save-status/save-status.d.ts +1 -1
- package/src/components/search-bar/index.d.ts +1 -0
- package/src/components/search-bar/search-bar.d.ts +8 -0
- package/src/components/service-point-display/operating-hours.d.ts +6 -0
- package/src/components/service-point-display/operating-hours.styles.d.ts +44 -0
- package/src/components/service-point-display/service-point-display.d.ts +6 -6
- package/src/components/service-point-display/service-point-display.styles.d.ts +13 -19
- package/src/components/service-points/service-points.d.ts +3 -2
- package/src/components/tabs/tabs.d.ts +5 -1
- package/src/components/tabs/tabs.styles.d.ts +3 -2
- package/src/components/templates/address-display/address-display.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 +1 -1
- package/src/components/templates/connect-external-carrier-form/connect-external-carrier-form.d.ts +12 -0
- package/src/components/templates/connect-external-carrier-form/index.d.ts +1 -0
- package/src/components/templates/index.d.ts +2 -2
- package/src/components/templates/label/label.d.ts +1 -1
- package/src/components/templates/label/label.styles.d.ts +21 -1
- package/src/components/templates/product-form/product-form-schema.d.ts +12 -0
- package/src/components/templates/product-form/product-form.d.ts +1 -1
- package/src/components/templates/products-display/products-display.d.ts +1 -1
- package/src/components/templates/pudo-rate-tabs/index.d.ts +0 -1
- package/src/components/templates/pudo-rate-tabs/pudo-list-view/pudo-list-view.d.ts +5 -0
- package/src/components/templates/pudo-rate-tabs/pudo-map-view/pudo-map-view.d.ts +15 -0
- package/src/components/templates/pudo-rate-tabs/pudo-rate-tabs.d.ts +17 -15
- package/src/components/templates/rate-form/rate-form.d.ts +11 -4
- package/src/components/templates/register-funding-source-carrier-form/index.d.ts +2 -0
- package/src/components/templates/register-funding-source-carrier-form/register-funding-source-carrier-form.d.ts +13 -0
- package/src/components/templates/register-funding-source-carrier-form/register-funding-source-carrier-form.styles.d.ts +25 -0
- package/src/components/templates/{add-carrier-form/add-carrier-form-schema.d.ts → register-funding-source-carrier-form/register-funding-source-carrier-schema.d.ts} +42 -88
- package/src/components/templates/shipment/shipment.d.ts +3 -10
- package/src/components/templates/shipment-form/shipment-form.d.ts +2 -9
- package/src/components/templates/shipment-form/shipment-schema.d.ts +1 -1
- 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/wallet-form/edit-wallet-address-form.d.ts +1 -1
- package/src/components/templates/wallet-form/wallet-form.d.ts +2 -4
- package/src/components/templates/wallet-form/wallet-schema.d.ts +1 -1
- package/src/components/wallet-card/wallet-card.d.ts +1 -1
- package/src/components/warehouse-form/warehouse-form.d.ts +1 -1
- package/src/create-element/create-element.d.ts +10 -0
- package/src/create-element/element/element.d.ts +16 -0
- package/src/create-element/element/hooks/index.d.ts +1 -0
- package/src/create-element/element/hooks/use-i18n.d.ts +12 -0
- package/src/create-element/element/index.d.ts +3 -0
- package/src/create-element/element/utils/get-emotion-cache.d.ts +2 -0
- package/src/create-element/element/utils/index.d.ts +1 -0
- package/src/create-element/error-boundary/error-boundary.d.ts +21 -0
- package/src/create-element/error-boundary/index.d.ts +1 -0
- package/src/create-element/index.d.ts +1 -0
- package/src/elements/index.d.ts +5 -4
- package/src/elements/label-layout/label-layout-element.d.ts +50 -4
- package/src/elements/labels-grid/labels-grid.d.ts +51 -5
- package/src/elements/manage-carriers/index.d.ts +1 -0
- package/src/elements/{shipengine-carriers/shipengine-carriers.d.ts → manage-carriers/manage-carriers.d.ts} +101 -49
- package/src/elements/manage-external-carriers/index.d.ts +1 -0
- package/src/elements/{external-carriers/external-carriers.d.ts → manage-external-carriers/manage-external-carriers.d.ts} +58 -41
- package/src/elements/manage-funding/manage-funding-element.d.ts +50 -4
- package/src/elements/manage-warehouses/manage-warehouses.d.ts +68 -5
- package/src/elements/payment-method-settings/payment-method-settings-element.d.ts +50 -4
- package/src/elements/purchase-label/configure-shipment.d.ts +4 -26
- package/src/elements/purchase-label/hooks/use-address.d.ts +1 -1
- package/src/elements/purchase-label/hooks/use-configure-shipment.d.ts +1 -1
- package/src/elements/purchase-label/hooks/use-customs.d.ts +1 -1
- package/src/elements/purchase-label/hooks/use-import-sales-order.d.ts +2 -2
- package/src/elements/purchase-label/hooks/use-load-shipment.d.ts +3 -3
- package/src/elements/purchase-label/hooks/use-pending-shipment.d.ts +1 -1
- package/src/elements/purchase-label/hooks/use-presets.d.ts +1 -1
- package/src/elements/purchase-label/hooks/use-rates-form.d.ts +6 -1
- package/src/elements/purchase-label/hooks/use-rates-with-cache.d.ts +1 -1
- package/src/elements/purchase-label/hooks/use-request-preferred-rates.d.ts +1 -1
- package/src/elements/purchase-label/hooks/use-request-rates.d.ts +1 -1
- package/src/elements/purchase-label/hooks/use-shipment-form.d.ts +1 -1
- package/src/elements/purchase-label/purchase-label-by-sales-order.d.ts +1 -1
- package/src/elements/purchase-label/purchase-label-by-shipment.d.ts +1 -1
- package/src/elements/purchase-label/purchase-label.d.ts +67 -44
- package/src/elements/shipment-summary/index.d.ts +1 -0
- package/src/elements/{view-shipment/view-shipment.d.ts → shipment-summary/shipment-summary.d.ts} +87 -51
- package/src/elements/shipments-grid/shipments-grid.d.ts +51 -5
- package/src/elements/theme-creator/theme-creator.d.ts +50 -4
- package/src/elements/theme-creator/themeData/themeData.d.ts +0 -1
- package/src/elements/transaction-history/index.d.ts +1 -0
- package/src/elements/{wallet-history/wallet-history-element.d.ts → transaction-history/transaction-history-element.d.ts} +50 -4
- package/src/elements/unit-settings/unit-settings-element.d.ts +50 -4
- package/src/elements/vat-settings/vat-settings-element.d.ts +50 -4
- package/src/elements/void-label/components/actions/actions.d.ts +4 -4
- package/src/elements/void-label/components/message/message.d.ts +1 -1
- package/src/elements/void-label/void-label.d.ts +80 -45
- package/src/elements-provider/elements-provider.d.ts +46 -0
- package/src/elements-provider/elements-test-provider.d.ts +3 -0
- package/src/elements-provider/hooks/index.d.ts +1 -0
- package/src/elements-provider/hooks/use-load-icons.d.ts +7 -0
- package/src/elements-provider/index.d.ts +1 -0
- package/src/factories/shipengine/address.d.ts +1 -1
- package/src/factories/shipengine/carrier.d.ts +1 -1
- package/src/factories/shipengine/index.d.ts +1 -1
- package/src/factories/shipengine/label.d.ts +3 -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-point.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 → transaction-history.d.ts} +1 -1
- package/src/factories/shipengine/warehouse.d.ts +1 -1
- package/src/factories/shipengine/weight.d.ts +1 -1
- package/src/features/index.d.ts +3 -3
- package/src/features/label-layout/label-layout.d.ts +1 -1
- package/src/features/label-layout/use-label-layout.d.ts +1 -1
- package/src/features/manage-carriers/hooks/index.d.ts +3 -0
- package/src/features/manage-carriers/hooks/use-carrier-metadata.d.ts +2 -0
- package/src/features/manage-carriers/hooks/use-list-funding-source-carriers.d.ts +11 -0
- package/src/features/manage-carriers/index.d.ts +1 -0
- package/src/features/manage-carriers/manage-carriers-row/index.d.ts +1 -0
- package/src/features/manage-carriers/manage-carriers-row/manage-carriers-row.d.ts +11 -0
- package/src/features/manage-carriers/manage-carriers.d.ts +4 -0
- package/src/features/manage-external-carriers/index.d.ts +1 -0
- package/src/features/manage-external-carriers/manage-external-carriers.d.ts +4 -0
- package/src/features/manage-warehouses/manage-warehouses.d.ts +1 -1
- package/src/features/manage-warehouses/use-manage-warehouses.d.ts +9 -9
- package/src/features/manage-warehouses/warehouse-display/warehouse-display.d.ts +1 -1
- package/src/features/transaction-history/index.d.ts +1 -0
- package/src/features/transaction-history/transaction-history.d.ts +6 -0
- package/src/features/unit-settings/unit-settings.d.ts +1 -1
- package/src/features/unit-settings/use-unit-settings.d.ts +1 -1
- package/src/features/vat-settings/use-vat-settings.d.ts +5 -5
- package/src/hooks/here-map/init.d.ts +6 -0
- package/src/hooks/here-map/use-here-map-ui.d.ts +10 -0
- package/src/hooks/here-map/use-here-map.d.ts +5 -0
- 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-service-points.d.ts +5 -3
- package/src/hooks/options/use-shipment-metadata.d.ts +1 -1
- package/src/hooks/options/use-shipping-presets-options.d.ts +1 -1
- package/src/hooks/options/use-warehouse-options.d.ts +1 -1
- package/src/hooks/use-address-validation.d.ts +1 -1
- package/src/hooks/use-get-or-create-shipment.d.ts +3 -3
- package/src/hooks/use-scrub-errors.d.ts +1 -1
- package/src/index.d.ts +1 -0
- package/src/locales/en/index.d.ts +50 -4
- 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/testing/test-utils.d.ts +8 -1
- package/src/themes/fallback.d.ts +3 -0
- package/src/themes/index.d.ts +4 -0
- package/src/types/carrier-metadata.d.ts +7 -11
- package/src/types/index.d.ts +0 -1
- package/src/types/preferred-rates.d.ts +1 -1
- package/src/types/shipping-preset/shipping-preset.d.ts +1 -1
- package/src/utilities/date.d.ts +1 -2
- package/src/utilities/error.d.ts +1 -1
- package/src/utilities/feature-flags/feature-flags.d.ts +18 -0
- package/src/utilities/feature-flags/index.d.ts +2 -0
- package/src/utilities/feature-flags/types.d.ts +141 -0
- package/src/utilities/money.d.ts +1 -1
- package/src/utilities/rates.d.ts +1 -1
- package/src/utilities/shipengine/address.d.ts +1 -1
- package/src/utilities/shipengine/carrier.d.ts +9 -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/warehouses.d.ts +1 -1
- package/src/utilities/shipengine/weight.d.ts +1 -1
- package/src/workflows/account-settings/account-settings.d.ts +56 -17
- package/src/workflows/{manage-wallet-workflow/manage-wallet-workflow.d.ts → carrier-services/carrier-services.d.ts} +79 -25
- package/src/workflows/carrier-services/index.d.ts +1 -0
- package/src/workflows/{connect-carrier/connect-carrier.d.ts → connect-external-carrier/connect-external-carrier.d.ts} +58 -39
- package/src/workflows/connect-external-carrier/index.d.ts +1 -0
- package/src/workflows/index.d.ts +3 -2
- package/src/workflows/label-workflow/index.d.ts +1 -0
- package/src/workflows/{purchase-label-workflow/purchase-label-workflow.d.ts → label-workflow/label-workflow.d.ts} +16 -34
- package/src/workflows/onboarding/components/carrier-recovery-form/carrier-recovery-form.d.ts +4 -5
- package/src/workflows/onboarding/components/funding-and-carrier-connection-step/funding-and-carrier-connection-step.d.ts +2 -4
- package/src/workflows/onboarding/components/funding-and-carrier-connection-step/use-funding-and-carrier-connection-step.d.ts +2 -3
- package/src/workflows/onboarding/components/onboarding-wizard/onboarding-wizard.d.ts +2 -9
- 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/components/terms-agreement-form/terms-agreement-form.d.ts +1 -1
- package/src/workflows/onboarding/components/terms-agreement-step/terms-agreement-step.d.ts +1 -1
- package/src/workflows/onboarding/components/terms-agreement-step/use-terms-agreement-step.d.ts +2 -7
- package/src/workflows/onboarding/onboarding.d.ts +71 -73
- package/story-notes-c714d2ed.js +1 -0
- package/suspend-text-cad3a977.js +1 -0
- package/transaction-history-element-cbfe487c.js +1 -0
- package/types.js +1 -0
- package/use-page-layout-8cb5075f.js +1 -0
- package/use-scrub-errors-9870a6f3.js +1 -0
- package/use-toggle-866d7938.js +1 -0
- package/use-unit-settings-a5bae16e.js +1 -0
- package/utilities.js +1 -0
- package/validation-528e7834.js +1 -0
- package/wallet-form-9e4bfaea.js +1 -0
- package/warehouse-form-da6a7ac5.js +34 -0
- package/warehouses-a83188ab.js +1 -0
- package/workflows.js +1 -0
- package/zod-60def96c.js +1 -0
- package/index.cjs +0 -25795
- package/src/components/templates/add-carrier-form/add-carrier-form-test.d.ts +0 -1
- package/src/components/templates/add-carrier-form/add-carrier-form.d.ts +0 -10
- package/src/components/templates/add-carrier-form/index.d.ts +0 -2
- package/src/components/templates/connect-carrier-form/connect-carrier-form.d.ts +0 -12
- package/src/components/templates/connect-carrier-form/index.d.ts +0 -1
- package/src/components/templates/pudo-rate-tabs/service-points-search-bar/index.d.ts +0 -1
- package/src/components/templates/pudo-rate-tabs/service-points-search-bar/service-points-search-bar.d.ts +0 -6
- package/src/elements/external-carriers/index.d.ts +0 -1
- package/src/elements/shipengine-carriers/index.d.ts +0 -1
- package/src/elements/view-shipment/index.d.ts +0 -1
- package/src/elements/wallet-history/index.d.ts +0 -1
- package/src/features/external-carriers/external-carriers.d.ts +0 -10
- package/src/features/external-carriers/index.d.ts +0 -1
- package/src/features/shipengine-carriers/hooks/index.d.ts +0 -2
- package/src/features/shipengine-carriers/hooks/use-carrier-metadata.d.ts +0 -13
- package/src/features/shipengine-carriers/hooks/use-list-connected-carriers.d.ts +0 -11
- package/src/features/shipengine-carriers/index.d.ts +0 -1
- package/src/features/shipengine-carriers/shipengine-carriers-row/index.d.ts +0 -1
- package/src/features/shipengine-carriers/shipengine-carriers-row/shipengine-carriers-row.d.ts +0 -9
- package/src/features/shipengine-carriers/shipengine-carriers.d.ts +0 -10
- package/src/features/wallet-history/index.d.ts +0 -1
- package/src/features/wallet-history/wallet-history.d.ts +0 -6
- package/src/hooks/use-elements.d.ts +0 -35
- package/src/types/patch.d.ts +0 -2
- package/src/utilities/feature-flags.d.ts +0 -232
- package/src/workflows/connect-carrier/index.d.ts +0 -1
- package/src/workflows/manage-wallet-workflow/index.d.ts +0 -1
- package/src/workflows/purchase-label-workflow/index.d.ts +0 -1
- /package/src/components/templates/{connect-carrier-form/connect-carrier-form.styles.d.ts → connect-external-carrier-form/connect-external-carrier-form.styles.d.ts} +0 -0
- /package/src/features/{shipengine-carriers/shipengine-carriers-row/shipengine-carriers-row.styles.d.ts → manage-carriers/manage-carriers-row/manage-carriers-row.styles.d.ts} +0 -0
- /package/src/features/{shipengine-carriers/shipengine-carriers.styles.d.ts → manage-carriers/manage-carriers.styles.d.ts} +0 -0
- /package/src/features/{wallet-history/wallet-history.styles.d.ts → transaction-history/transaction-history.styles.d.ts} +0 -0
- /package/src/workflows/{manage-wallet-workflow → carrier-services}/use-get-wallet-panel-props.d.ts +0 -0
|
@@ -1,24 +1,20 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export type ConnectCarrierFeatures = {
|
|
3
|
-
availableCarrierConnections?: string[];
|
|
4
|
-
};
|
|
5
2
|
/**
|
|
6
|
-
* #
|
|
3
|
+
* # ConnectExternalCarrier Props
|
|
7
4
|
*
|
|
8
|
-
* @see {@link
|
|
5
|
+
* @see {@link ConnectExternalCarrier.Component | The `<ConnectExternalCarrier />` component}
|
|
9
6
|
*/
|
|
10
7
|
export type ComponentProps = {
|
|
11
8
|
carrierName?: string;
|
|
12
|
-
features?: ConnectCarrierFeatures;
|
|
13
9
|
onCancel?: () => void;
|
|
14
10
|
onCarrierConnected?: (carrierId: string) => void;
|
|
15
11
|
};
|
|
16
12
|
/**
|
|
17
|
-
* #
|
|
13
|
+
* # ConnectExternalCarrier Component
|
|
18
14
|
*
|
|
19
|
-
* @param ComponentProps The base props that will be passed into the `<
|
|
15
|
+
* @param ComponentProps The base props that will be passed into the `<ConnectExternalCarrier />` component.
|
|
20
16
|
*
|
|
21
|
-
* @returns Element A React element that renders the `<
|
|
17
|
+
* @returns Element A React element that renders the `<ConnectExternalCarrier />` component allowing users
|
|
22
18
|
* to connect their own existing carrier account. If no carrier is provided, the user may
|
|
23
19
|
* select from a list of carriers specified by `features.availableCarrierConnections`.
|
|
24
20
|
* This component is composed in the `<AccountSettings />` Element.
|
|
@@ -28,15 +24,15 @@ export type ComponentProps = {
|
|
|
28
24
|
* (() => {
|
|
29
25
|
* const features = useFeatures("CarrierConnections");
|
|
30
26
|
*
|
|
31
|
-
* return <
|
|
27
|
+
* return <ConnectExternalCarrier.Component features={features} />;
|
|
32
28
|
* })();
|
|
33
29
|
* ```
|
|
34
30
|
*
|
|
35
31
|
* <br />
|
|
36
32
|
*
|
|
37
|
-
* @see {@link
|
|
33
|
+
* @see {@link ConnectExternalCarrier.ComponentProps | The props that are passed into the `<ConnectExternalCarrier />` component}
|
|
38
34
|
*/
|
|
39
|
-
export declare const Component: ({ carrierName,
|
|
35
|
+
export declare const Component: ({ carrierName, onCancel, onCarrierConnected }: ComponentProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
40
36
|
export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
41
37
|
resources?: {
|
|
42
38
|
en: {
|
|
@@ -93,6 +89,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
93
89
|
schedulePickup: string;
|
|
94
90
|
showItems: string;
|
|
95
91
|
void: string;
|
|
92
|
+
download: string;
|
|
96
93
|
};
|
|
97
94
|
fields: {
|
|
98
95
|
dimensions: string;
|
|
@@ -112,6 +109,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
112
109
|
multipleShippingServices: string;
|
|
113
110
|
sections: {
|
|
114
111
|
labels: string;
|
|
112
|
+
shipmentSummary: string;
|
|
115
113
|
};
|
|
116
114
|
noLabels: string;
|
|
117
115
|
};
|
|
@@ -133,7 +131,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
133
131
|
genericText: string;
|
|
134
132
|
};
|
|
135
133
|
};
|
|
136
|
-
"
|
|
134
|
+
"manage-carriers": {
|
|
137
135
|
title: string;
|
|
138
136
|
headers: {
|
|
139
137
|
accountCarriers: string;
|
|
@@ -201,8 +199,48 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
201
199
|
};
|
|
202
200
|
};
|
|
203
201
|
"register-carrier": {
|
|
204
|
-
formTitle:
|
|
205
|
-
|
|
202
|
+
formTitle: {
|
|
203
|
+
default: string;
|
|
204
|
+
new: string;
|
|
205
|
+
edit: string;
|
|
206
|
+
};
|
|
207
|
+
notifications: {
|
|
208
|
+
error: {
|
|
209
|
+
title: string;
|
|
210
|
+
};
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
"rate-details": {
|
|
214
|
+
total: string;
|
|
215
|
+
subtotal: string;
|
|
216
|
+
registerVat: string;
|
|
217
|
+
concepts: {
|
|
218
|
+
confirmation: string;
|
|
219
|
+
uncategorized: string;
|
|
220
|
+
shipping: string;
|
|
221
|
+
insurance: string;
|
|
222
|
+
confirm: string;
|
|
223
|
+
discount: string;
|
|
224
|
+
fuel_charge: string;
|
|
225
|
+
additional_fees: string;
|
|
226
|
+
tariff: string;
|
|
227
|
+
tax: string;
|
|
228
|
+
delivery: string;
|
|
229
|
+
handling: string;
|
|
230
|
+
special_goods: string;
|
|
231
|
+
pickup: string;
|
|
232
|
+
location_fee: string;
|
|
233
|
+
oversize: string;
|
|
234
|
+
returns: string;
|
|
235
|
+
notifications: string;
|
|
236
|
+
tip: string;
|
|
237
|
+
duties_and_taxes: string;
|
|
238
|
+
brokerage_fee: string;
|
|
239
|
+
admin_fee: string;
|
|
240
|
+
adjustment: string;
|
|
241
|
+
auctane_service_fee: string;
|
|
242
|
+
product_price: string;
|
|
243
|
+
};
|
|
206
244
|
};
|
|
207
245
|
"purchase-label": {
|
|
208
246
|
title: string;
|
|
@@ -315,7 +353,10 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
315
353
|
today: string;
|
|
316
354
|
viewMap: string;
|
|
317
355
|
otherLocations: string;
|
|
318
|
-
|
|
356
|
+
noServicePointsForService: string;
|
|
357
|
+
error: string;
|
|
358
|
+
paperless: string;
|
|
359
|
+
localTimeDisclaimer: string;
|
|
319
360
|
};
|
|
320
361
|
shipToAddressFormFields: string;
|
|
321
362
|
sections: {
|
|
@@ -576,29 +617,6 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
576
617
|
postalCode: string;
|
|
577
618
|
phone: string;
|
|
578
619
|
email: string;
|
|
579
|
-
/**
|
|
580
|
-
* # Connect-Carriers Component
|
|
581
|
-
*
|
|
582
|
-
* @param ComponentProps The base props that will be passed into the `<ConnectCarrier />` component.
|
|
583
|
-
*
|
|
584
|
-
* @returns Element A React element that renders the `<ConnectCarrier />` component allowing users
|
|
585
|
-
* to connect their own existing carrier account. If no carrier is provided, the user may
|
|
586
|
-
* select from a list of carriers specified by `features.availableCarrierConnections`.
|
|
587
|
-
* This component is composed in the `<AccountSettings />` Element.
|
|
588
|
-
*
|
|
589
|
-
* @example
|
|
590
|
-
* ```tsx
|
|
591
|
-
* (() => {
|
|
592
|
-
* const features = useFeatures("CarrierConnections");
|
|
593
|
-
*
|
|
594
|
-
* return <ConnectCarrier.Component features={features} />;
|
|
595
|
-
* })();
|
|
596
|
-
* ```
|
|
597
|
-
*
|
|
598
|
-
* <br />
|
|
599
|
-
*
|
|
600
|
-
* @see {@link ConnectCarrier.ComponentProps | The props that are passed into the `<ConnectCarrier />` component}
|
|
601
|
-
*/
|
|
602
620
|
addressResidentialIndicator: string;
|
|
603
621
|
};
|
|
604
622
|
noResults: string;
|
|
@@ -842,6 +860,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
842
860
|
gram: string;
|
|
843
861
|
kilogram: string;
|
|
844
862
|
};
|
|
863
|
+
ZnVuZGluZ19zb3VyY2VfaWQgbXVzdCBiZSBhbiBpbnRlZ2Vy: string;
|
|
845
864
|
T25seSByZXNpZGVudGlhbCBkZWxpdmVyeSBhZGRyZXNzZXMgYXJlIGFsbG93ZWQgZm9yIFVQUyBHcm91bmQgU2F2ZXIu: string;
|
|
846
865
|
"VGhlIHNlbGVjdGVkIHNlcnZpY2UgaW5jbHVkZXMgaW5zdXJhbmNlIGZvciBhbiBpbnN1cmVkIGFtb3VudCB1cCB0byAkMTAwLgo=": string;
|
|
847
866
|
"VGhlIHNlbGVjdGVkIHNlcnZpY2UgaW5jbHVkZXMgaW5zdXJhbmNlIGZvciBhbiBpbnN1cmVkIGFtb3VudCB1cCB0byAkNTAuCg==": string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as ConnectExternalCarrier from "./connect-external-carrier";
|
package/src/workflows/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from "./onboarding";
|
|
2
|
-
export * from "./
|
|
2
|
+
export * from "./label-workflow";
|
|
3
3
|
export * from "./account-settings";
|
|
4
|
-
export * from "./connect-carrier";
|
|
4
|
+
export * from "./connect-external-carrier";
|
|
5
|
+
export * from "./carrier-services";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as LabelWorkflow from "./label-workflow";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Shipment } from "@shipengine/js-api";
|
|
3
|
-
import {
|
|
3
|
+
import { PurchaseLabelFeatures, ShipmentSummaryFeatures } from "../../utilities";
|
|
4
4
|
/**
|
|
5
5
|
* @internal
|
|
6
6
|
*
|
|
7
7
|
* # Label Workflow Props
|
|
8
8
|
*
|
|
9
|
-
* - These are the base props that will be passed into the `<
|
|
9
|
+
* - These are the base props that will be passed into the `<LabelWorkflow />` component.
|
|
10
10
|
*
|
|
11
|
-
* @see {@link
|
|
11
|
+
* @see {@link LabelWorkflow.Element | The `<LabelWorkflow.Element />` component}
|
|
12
12
|
*/
|
|
13
|
-
export type
|
|
13
|
+
export type LabelWorkflowProps = {
|
|
14
14
|
/**
|
|
15
15
|
* `callbacks` is an optional set of callbacks that will be invoked at various points in the
|
|
16
16
|
* label purchasing workflow.
|
|
@@ -27,11 +27,7 @@ export type PurchaseLabelWorkflowProps = {
|
|
|
27
27
|
/**
|
|
28
28
|
* `features` is a set of feature flags you would like to enable or disable in this component.
|
|
29
29
|
*/
|
|
30
|
-
features:
|
|
31
|
-
/**
|
|
32
|
-
* `labelId` is the unique identifier for the label you wish to view.
|
|
33
|
-
*/
|
|
34
|
-
labelId?: string;
|
|
30
|
+
features: PurchaseLabelFeatures & ShipmentSummaryFeatures;
|
|
35
31
|
/**
|
|
36
32
|
* `multiplexedId` is the unique pattern of props that help index which Element is being displayed.
|
|
37
33
|
*/
|
|
@@ -64,7 +60,7 @@ export type PurchaseLabelWorkflowProps = {
|
|
|
64
60
|
* setLabelId,
|
|
65
61
|
* setShipmentId,
|
|
66
62
|
* setIsVoidingLabel,
|
|
67
|
-
* } =
|
|
63
|
+
* } = useLabelWorkflow({
|
|
68
64
|
* _labelId,
|
|
69
65
|
* _multiplexedId,
|
|
70
66
|
* });
|
|
@@ -72,9 +68,9 @@ export type PurchaseLabelWorkflowProps = {
|
|
|
72
68
|
*
|
|
73
69
|
* <br />
|
|
74
70
|
*
|
|
75
|
-
* @see {@link
|
|
71
|
+
* @see {@link LabelWorkflow.Element | The `<LabelWorkflow.Element />` component using this hook}
|
|
76
72
|
*/
|
|
77
|
-
export declare const
|
|
73
|
+
export declare const useLabelWorkflow: ({ _multiplexedId, }: {
|
|
78
74
|
_callbacks?: {
|
|
79
75
|
/**
|
|
80
76
|
* `onLabelCreateSuccess` is an optional callback function that will be invoked when a label
|
|
@@ -84,7 +80,6 @@ export declare const usePurchaseLabelWorkflow: ({ _multiplexedId, _labelId, }: {
|
|
|
84
80
|
labelId: string;
|
|
85
81
|
}, shipment: Shipment) => void) | undefined;
|
|
86
82
|
} | undefined;
|
|
87
|
-
_labelId?: string | undefined;
|
|
88
83
|
_multiplexedId: ({
|
|
89
84
|
orderSourceCode: string;
|
|
90
85
|
} & ({
|
|
@@ -115,20 +110,7 @@ export declare const usePurchaseLabelWorkflow: ({ _multiplexedId, _labelId, }: {
|
|
|
115
110
|
oneOff: true;
|
|
116
111
|
};
|
|
117
112
|
setIsVoidingLabel: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
118
|
-
setLabelId: (nextLabelId
|
|
119
|
-
setMultiplexedId: import("react").Dispatch<import("react").SetStateAction<({
|
|
120
|
-
orderSourceCode: string;
|
|
121
|
-
} & ({
|
|
122
|
-
externalOrderNumber: string;
|
|
123
|
-
} | {
|
|
124
|
-
externalOrderId: string;
|
|
125
|
-
})) | {
|
|
126
|
-
salesOrderId: string;
|
|
127
|
-
} | {
|
|
128
|
-
shipmentId: string;
|
|
129
|
-
} | {
|
|
130
|
-
oneOff: true;
|
|
131
|
-
}>>;
|
|
113
|
+
setLabelId: (nextLabelId?: string) => void;
|
|
132
114
|
setShipmentId: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
|
|
133
115
|
shipmentId: string | undefined;
|
|
134
116
|
};
|
|
@@ -137,17 +119,17 @@ export declare const usePurchaseLabelWorkflow: ({ _multiplexedId, _labelId, }: {
|
|
|
137
119
|
*
|
|
138
120
|
* # Label Workflow Element
|
|
139
121
|
*
|
|
140
|
-
* - The `<
|
|
122
|
+
* - The `<LabelWorkflow.Element />` component is a composition of the PurchaseLabel, ShipmentSummary,
|
|
141
123
|
* and VoidLabel elements that allows users to purchase a label, view the shipment details, and optionally void their shipping label.
|
|
142
124
|
*
|
|
143
|
-
* @param
|
|
125
|
+
* @param LabelWorkflowProps The props necessary to render the `<LabelWorkflow.Element />` for shipment
|
|
144
126
|
* based or sales order based label purchasing.
|
|
145
127
|
*
|
|
146
|
-
* @returns Element A React Element that will render the `<
|
|
128
|
+
* @returns Element A React Element that will render the `<LabelWorkflow />` component.
|
|
147
129
|
*
|
|
148
130
|
* @example
|
|
149
131
|
* ```tsx
|
|
150
|
-
* <
|
|
132
|
+
* <LabelWorkflow
|
|
151
133
|
* {...elementProps}
|
|
152
134
|
* callbacks={{ onLabelCreateSuccess }}
|
|
153
135
|
* multiplexedId={elementIdProps}
|
|
@@ -156,7 +138,7 @@ export declare const usePurchaseLabelWorkflow: ({ _multiplexedId, _labelId, }: {
|
|
|
156
138
|
*
|
|
157
139
|
* <br />
|
|
158
140
|
*
|
|
159
|
-
* @see {@link
|
|
160
|
-
* @see {@link
|
|
141
|
+
* @see {@link LabelWorkflowProps | The props that are passed into the `<LabelWorkflow />` component}
|
|
142
|
+
* @see {@link LabelWorkflow.useLabelWorkflow | The `hook` that is used to manage the state of the `<LabelWorkflow />` component}
|
|
161
143
|
*/
|
|
162
|
-
export declare const Element: ({ multiplexedId: _multiplexedId,
|
|
144
|
+
export declare const Element: ({ multiplexedId: _multiplexedId, features: propFeatures, callbacks }: LabelWorkflowProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
package/src/workflows/onboarding/components/carrier-recovery-form/carrier-recovery-form.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { SE } from "@shipengine/
|
|
2
|
-
import {
|
|
1
|
+
import { SE } from "@shipengine/react-api";
|
|
2
|
+
import { CarrierMetadataFromFundingSource } from "../../../../types";
|
|
3
3
|
import { CarrierRecoveryFormPayload } from "./carrier-recovery-form-schema";
|
|
4
4
|
export type CarrierRecoveryFormProps = {
|
|
5
5
|
address?: SE.Address;
|
|
6
|
-
|
|
7
|
-
carrierMetadata: CarrierMetadata;
|
|
6
|
+
carrierMetadata: CarrierMetadataFromFundingSource;
|
|
8
7
|
errors?: SE.CodedError[] | null;
|
|
9
8
|
fundingSourceId: string;
|
|
10
9
|
onSkip?: () => void;
|
|
11
10
|
onSubmit: (fundingSourceId: string, payload: CarrierRecoveryFormPayload) => Promise<void>;
|
|
12
11
|
};
|
|
13
|
-
export declare const CarrierRecoveryForm: ({ address,
|
|
12
|
+
export declare const CarrierRecoveryForm: ({ address, carrierMetadata, errors, fundingSourceId, onSkip, onSubmit, }: CarrierRecoveryFormProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { SE } from "@shipengine/
|
|
1
|
+
import { SE } from "@shipengine/react-api";
|
|
2
2
|
import { WalletPayload } from "../../../../components/templates/wallet-form";
|
|
3
|
-
import { VatSettingsFeatures } from "../../../../features";
|
|
4
3
|
export type FundingAndCarrierConnectionStepProps = {
|
|
5
4
|
address: SE.Address;
|
|
6
5
|
createFundingSourceErrors: SE.CodedError[] | null;
|
|
7
|
-
features?: VatSettingsFeatures;
|
|
8
6
|
onSubmit: (payload: WalletPayload) => Promise<void>;
|
|
9
7
|
registerCarrierErrors: SE.CodedError[] | null;
|
|
10
8
|
};
|
|
11
|
-
export declare const FundingAndCarrierConnectionStep: ({ address, createFundingSourceErrors, onSubmit, registerCarrierErrors,
|
|
9
|
+
export declare const FundingAndCarrierConnectionStep: ({ address, createFundingSourceErrors, onSubmit, registerCarrierErrors, }: FundingAndCarrierConnectionStepProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { SE } from "@shipengine/
|
|
1
|
+
import { SE } from "@shipengine/react-api";
|
|
2
2
|
import { WalletPayload } from "../../../../components/templates/wallet-form";
|
|
3
|
-
import { CarrierProfile } from "../../../../types";
|
|
4
3
|
type UseFundingAndCarrierConnectionStepProps = {
|
|
5
4
|
isUpsEnabled: boolean;
|
|
6
5
|
onStepComplete: () => void;
|
|
7
6
|
};
|
|
8
7
|
export declare const useFundingAndCarrierConnectionStep: ({ isUpsEnabled, onStepComplete, }: UseFundingAndCarrierConnectionStepProps) => {
|
|
9
8
|
createFundingAndCarrierConnectionSubmissionHandler: ({ carrierProfiles, defaultWarehouse, email, fundingSourceTerms, }: {
|
|
10
|
-
carrierProfiles:
|
|
9
|
+
carrierProfiles: SE.MetadataCarrierProfile[];
|
|
11
10
|
defaultWarehouse: SE.Warehouse;
|
|
12
11
|
email: string;
|
|
13
12
|
fundingSourceTerms: SE.MetadataRequiredTerm[];
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { SE } from "@shipengine/
|
|
2
|
-
import { ShipEngineCarriersFeatures, VatSettingsFeatures } from "../../../../features";
|
|
1
|
+
import { SE } from "@shipengine/react-api";
|
|
3
2
|
import { ShipFromAddressStepProps } from "../ship-from-address-step";
|
|
4
3
|
export type ValidateWarehouse = {
|
|
5
4
|
type: "warehouse";
|
|
@@ -13,15 +12,9 @@ export type ValidateBilling = {
|
|
|
13
12
|
type: "billing";
|
|
14
13
|
};
|
|
15
14
|
export type ValidateAddress = ValidateWarehouse | ValidateBilling;
|
|
16
|
-
export type OnboardingWizardFeatures = ShipEngineCarriersFeatures & {
|
|
17
|
-
presentation: {
|
|
18
|
-
poweredByShipEngine?: boolean;
|
|
19
|
-
};
|
|
20
|
-
} & VatSettingsFeatures;
|
|
21
15
|
export type OnboardingWizardProps = {
|
|
22
16
|
defaultShipFromAddress?: ShipFromAddressStepProps["defaultShipFromAddress"];
|
|
23
|
-
features?: Partial<OnboardingWizardFeatures>;
|
|
24
17
|
onComplete: () => void;
|
|
25
18
|
partnerName?: string;
|
|
26
19
|
};
|
|
27
|
-
export declare const OnboardingWizard: ({ defaultShipFromAddress,
|
|
20
|
+
export declare const OnboardingWizard: ({ defaultShipFromAddress, onComplete: onWizardComplete, partnerName, }: OnboardingWizardProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
package/src/workflows/onboarding/components/ship-from-address-step/ship-from-address-step.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SE } from "@shipengine/
|
|
1
|
+
import { SE } from "@shipengine/react-api";
|
|
2
2
|
import { WarehousePayload } from "../../../../components";
|
|
3
3
|
export type ShipFromAddressStepProps = {
|
|
4
4
|
defaultShipFromAddress?: Pick<SE.Warehouse, "name" | "isDefault" | "originAddress" | "returnAddress">;
|
package/src/workflows/onboarding/components/ship-from-address-step/use-ship-from-address-step.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export type UseShipFromAddressStepProps = {
|
|
|
3
3
|
onStepComplete: () => void;
|
|
4
4
|
};
|
|
5
5
|
export declare const useShipFromAddressStep: ({ onStepComplete }: UseShipFromAddressStepProps) => {
|
|
6
|
-
defaultWarehouse: import("@shipengine/
|
|
6
|
+
defaultWarehouse: import("@shipengine/react-api").Warehouse | undefined;
|
|
7
7
|
handleSubmitShipFromAddress: (payload: WarehousePayload) => Promise<void>;
|
|
8
8
|
isLoadingWarehouses: boolean;
|
|
9
9
|
};
|
package/src/workflows/onboarding/components/terms-agreement-step/use-terms-agreement-step.d.ts
CHANGED
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
import { SE } from "@shipengine/
|
|
1
|
+
import { SE } from "@shipengine/react-api";
|
|
2
2
|
export type UseTermsAgreementStepProps = {
|
|
3
3
|
enabledCarriers: string[];
|
|
4
4
|
onStepComplete: () => void;
|
|
5
5
|
};
|
|
6
6
|
export declare const useTermsAgreementStep: ({ enabledCarriers, onStepComplete, }: UseTermsAgreementStepProps) => {
|
|
7
7
|
carrierCodes: string[] | undefined;
|
|
8
|
-
carrierProfiles:
|
|
9
|
-
capabilities: SE.MetadataCapability[] | null;
|
|
10
|
-
carrierCode: string;
|
|
11
|
-
registrationRequirements: SE.MetadataRegistrationRequirement[];
|
|
12
|
-
requiredTerms: SE.MetadataRequiredTerm[];
|
|
13
|
-
}[] | undefined;
|
|
8
|
+
carrierProfiles: SE.MetadataCarrierProfile[] | undefined;
|
|
14
9
|
carrierTerms: SE.MetadataRequiredTerm[] | undefined;
|
|
15
10
|
fundingSourceMetadata: import("@tanstack/react-query").UseQueryResult<SE.MetadataResponse, SE.CodedError[]>;
|
|
16
11
|
fundingSourceTerms: SE.MetadataRequiredTerm[] | undefined;
|