@shipengine/elements 1.9.0 → 2.1.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/actions-menu.js +34 -0
- package/assertions.js +1 -0
- package/carrier-logo.js +1 -0
- package/components.js +1 -1
- package/constants.js +1 -1
- package/elements.js +1 -1
- package/extensions.js +1 -1
- package/formatString.js +1 -0
- package/hooks.js +1 -1
- package/index.js +1 -1
- package/money.js +1 -0
- package/package.json +20 -46
- package/pudo.js +1 -0
- package/schemas.js +1 -1
- package/src/components/actions-menu/actions-menu.d.ts +19 -0
- package/src/components/actions-menu/index.d.ts +1 -0
- package/src/components/add-funds-form/add-funds-form.d.ts +1 -1
- 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/collapsible-panel/collapsible-panel.d.ts +1 -1
- package/src/components/collapsible-panel/collapsible-panel.styles.d.ts +10 -13
- 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/checkbox-input/checkbox-input.d.ts +1 -0
- 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 +1 -1
- package/src/components/field/rate-card/rate-card.styles.d.ts +0 -1
- package/src/components/field/rate-select/rate-select.d.ts +1 -1
- package/src/components/field/select/index.d.ts +1 -0
- package/src/components/field/select/select-with-categories.d.ts +20 -0
- package/src/components/field/select/select.d.ts +5 -10
- package/src/components/fund-and-purchase/fund-and-purchase.d.ts +1 -1
- 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/pager/pager.d.ts +1 -1
- package/src/components/rate-details/rate-details.d.ts +1 -1
- package/src/components/save-status/save-status.d.ts +1 -1
- package/src/components/service-points/service-points.d.ts +1 -1
- 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/connected-carrier-list/connected-carrier-list.d.ts +4 -1
- package/src/components/templates/connected-carrier-list/connected-carrier-list.styles.d.ts +0 -10
- package/src/components/templates/connected-carrier-list/connected-carrier-row/connected-carrier-row.d.ts +4 -1
- package/src/components/templates/connected-carrier-list/connected-carrier-row/connected-carrier-row.styles.d.ts +19 -12
- package/src/components/templates/index.d.ts +1 -1
- package/src/components/templates/label/label.d.ts +1 -1
- 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/products-display/products-display.styles.d.ts +12 -4
- package/src/components/templates/rate-form/rate-form.d.ts +3 -4
- package/src/components/templates/shipment/shipment.d.ts +3 -11
- package/src/components/templates/shipment-form/sections/customs-forms/components/index.d.ts +2 -0
- package/src/components/templates/shipment-form/sections/customs-forms/components/tax-ids/form/index.d.ts +3 -0
- package/src/components/templates/shipment-form/sections/customs-forms/components/tax-ids/form/schema.d.ts +38 -0
- package/src/components/templates/shipment-form/sections/customs-forms/components/tax-ids/form/values.d.ts +12 -0
- package/src/components/templates/shipment-form/sections/customs-forms/components/tax-ids/index.d.ts +2 -0
- package/src/components/templates/shipment-form/sections/customs-forms/components/tax-ids/tax-id-form.d.ts +17 -0
- package/src/components/templates/shipment-form/sections/customs-forms/components/tax-ids/tax-id-list.d.ts +12 -0
- package/src/components/templates/shipment-form/sections/customs-forms/components/tax-ids/tax-ids.d.ts +8 -0
- package/src/components/templates/shipment-form/sections/customs-forms/components/tax-ids/tax-ids.styles.d.ts +70 -0
- package/src/components/templates/shipment-form/sections/customs-forms/customs-forms.d.ts +10 -0
- package/src/components/templates/shipment-form/sections/customs-forms/index.d.ts +1 -0
- package/src/components/templates/shipment-form/sections/index.d.ts +1 -0
- package/src/components/templates/shipment-form/shipment-form.d.ts +4 -10
- package/src/components/templates/shipment-form/shipment-form.styles.d.ts +9 -0
- 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 +11 -4
- package/src/components/zero-state/zero-state.d.ts +6 -0
- package/src/components/zero-state/zero-state.styles.d.ts +14 -0
- 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 +44 -2
- package/src/elements/labels-grid/labels-grid.d.ts +45 -3
- 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} +99 -52
- 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} +74 -63
- package/src/elements/manage-funding/manage-funding-element.d.ts +47 -4
- package/src/elements/manage-warehouses/manage-warehouses.d.ts +62 -3
- package/src/elements/payment-method-settings/payment-method-settings-element.d.ts +47 -4
- package/src/elements/purchase-label/configure-shipment.d.ts +4 -27
- 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 +2 -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 +1 -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 +2 -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 +85 -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} +89 -60
- package/src/elements/shipments-grid/shipments-grid.d.ts +45 -3
- package/src/elements/theme-creator/theme-creator.d.ts +44 -2
- 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} +44 -2
- package/src/elements/unit-settings/unit-settings-element.d.ts +44 -2
- package/src/elements/vat-settings/vat-settings-element.d.ts +44 -2
- package/src/elements/void-label/components/actions/actions.d.ts +1 -1
- package/src/elements/void-label/components/message/message.d.ts +1 -1
- package/src/elements/void-label/void-label.d.ts +83 -52
- package/src/elements-provider/elements-context-provider.d.ts +44 -0
- package/src/elements-provider/elements-provider.d.ts +12 -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 +3 -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 +1 -1
- package/src/factories/shipengine/money.d.ts +1 -1
- package/src/factories/shipengine/order-source.d.ts +1 -1
- package/src/factories/shipengine/package.d.ts +1 -1
- package/src/factories/shipengine/resource.d.ts +1 -1
- package/src/factories/shipengine/sales-order.d.ts +1 -1
- package/src/factories/shipengine/service-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/{shipengine-carriers → manage-carriers}/hooks/use-list-funding-source-carriers.d.ts +3 -3
- 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/{shipengine-carriers/shipengine-carriers-row/shipengine-carriers-row.d.ts → manage-carriers/manage-carriers-row/manage-carriers-row.d.ts} +3 -3
- package/src/features/manage-carriers/manage-carriers.d.ts +5 -0
- package/src/features/manage-external-carriers/index.d.ts +2 -0
- package/src/features/manage-external-carriers/manage-external-carriers.d.ts +14 -0
- package/src/features/manage-external-carriers/use-manage-external-carriers.d.ts +12 -0
- package/src/features/manage-funding/manage-funding.d.ts +4 -1
- 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/payment-method-settings/payment-method-settings.d.ts +4 -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 +1 -1
- package/src/hooks/options/use-confirmation-options.d.ts +1 -1
- package/src/hooks/options/use-customs-contents-options.d.ts +1 -1
- package/src/hooks/options/use-customs-non-delivery-options.d.ts +1 -1
- package/src/hooks/options/use-insurance-provider-options.d.ts +1 -1
- package/src/hooks/options/use-package-options.d.ts +2 -2
- 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 +1 -1
- 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 +4 -2
- 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 +2 -0
- package/src/locales/en/index.d.ts +44 -2
- package/src/mocks/carriers/handlers.d.ts +1 -1
- package/src/mocks/warehouses/handlers.d.ts +1 -1
- package/src/schemas/shipengine/money.d.ts +1 -1
- package/src/testing/test-utils.d.ts +7 -2
- package/src/themes/fallback.d.ts +3 -0
- package/src/themes/index.d.ts +4 -0
- package/src/types/carrier-metadata.d.ts +1 -1
- package/src/types/preferred-rates.d.ts +1 -1
- package/src/types/shipping-preset/shipping-preset.d.ts +1 -1
- 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/formatString.d.ts +2 -0
- package/src/utilities/index.d.ts +1 -0
- package/src/utilities/money.d.ts +1 -1
- package/src/utilities/pudo.d.ts +3 -0
- package/src/utilities/rates.d.ts +1 -3
- package/src/utilities/shipengine/address.d.ts +1 -1
- package/src/utilities/shipengine/carrier.d.ts +4 -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 +52 -16
- package/src/workflows/account-settings/use-get-panel-props.d.ts +3 -3
- package/src/workflows/{manage-wallet-workflow/manage-wallet-workflow.d.ts → carrier-services/carrier-services.d.ts} +55 -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} +52 -37
- 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 +1 -1
- 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 +1 -1
- 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 +3 -2
- 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 +1 -1
- package/src/workflows/onboarding/onboarding.d.ts +65 -71
- package/story-notes.js +1 -0
- package/suspend-text.js +1 -0
- package/transaction-history-element.js +1 -0
- package/use-page-layout.js +1 -0
- package/use-scrub-errors.js +1 -0
- package/use-toggle.js +1 -0
- package/use-unit-settings.js +1 -0
- package/utilities.js +1 -1
- package/validation.js +1 -0
- package/wallet-form.js +1 -0
- package/warehouses.js +1 -0
- package/workflows.js +1 -1
- package/carrier-2abb4760.js +0 -1
- package/carrier-logo-1b6c767e.js +0 -1
- package/feature-flags-3e03717c.js +0 -1
- package/formatString-413ec7c7.js +0 -1
- package/money-fbc4d0b3.js +0 -1
- package/payment-method-settings-element-595cc38d.js +0 -1
- package/shipment-90d35708.js +0 -1
- 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/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 -11
- package/src/features/external-carriers/index.d.ts +0 -1
- 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.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/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/story-notes-ce2d8cca.js +0 -1
- package/suspend-text-c8c7b6b6.js +0 -1
- package/use-page-layout-93ffae78.js +0 -1
- package/use-scrub-errors-2c4db406.js +0 -1
- package/use-toggle-838d2ebd.js +0 -1
- package/validation-b941a548.js +0 -1
- package/wallet-form-3981400b.js +0 -1
- package/wallet-history-5b34c856.js +0 -1
- package/warehouse-form-c0b3ea78.js +0 -34
- package/warehouses-dfcdce23.js +0 -1
- /package/{address-8f8119f4.js → address.js} +0 -0
- /package/{phone-87dd7bd8.js → phone.js} +0 -0
- /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 → manage-carriers}/hooks/index.d.ts +0 -0
- /package/src/features/{shipengine-carriers → manage-carriers}/hooks/use-carrier-metadata.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
- /package/{zod-60def96c.js → zod.js} +0 -0
|
@@ -1,38 +1,15 @@
|
|
|
1
|
-
import { SE } from "@shipengine/
|
|
1
|
+
import { SE } from "@shipengine/react-api";
|
|
2
2
|
import { RateFormProps } from "../../components/templates/rate-form";
|
|
3
|
-
import {
|
|
4
|
-
import { VatSettingsFeatures } from "../../features";
|
|
3
|
+
import { ShipmentFormProps } from "../../components/templates/shipment-form";
|
|
5
4
|
import { UseShippingPresetsOptionsProps } from "../../hooks";
|
|
6
5
|
import { PreferredRatesResponse } from "../../types";
|
|
6
|
+
import { PurchaseLabelFeatures } from "../../utilities";
|
|
7
7
|
import { UseRatesFormProps, UseShipmentFormProps } from "./hooks";
|
|
8
8
|
export type ShipmentFormMode = "browse_rates" | "select_service";
|
|
9
|
-
export type RateFormFeatures = {
|
|
10
|
-
enableFunding?: boolean;
|
|
11
|
-
enableGlobalPostFiltering?: boolean;
|
|
12
|
-
enablePudoUI?: boolean;
|
|
13
|
-
labelLayout?: boolean;
|
|
14
|
-
nicknameRate?: boolean;
|
|
15
|
-
requireDhlTermsAcknowledgement?: boolean;
|
|
16
|
-
saveRate?: boolean;
|
|
17
|
-
};
|
|
18
|
-
export type ConfigureShipmentFeatures = {
|
|
19
|
-
compatibleCountryCodes?: UseShipmentFormProps["compatibleCountryCodes"];
|
|
20
|
-
configureShipment?: {
|
|
21
|
-
enableErrorWhenShipmentCancelled: boolean;
|
|
22
|
-
};
|
|
23
|
-
partnerMessages?: {
|
|
24
|
-
incompleteLabelPurchaseRequirements?: string;
|
|
25
|
-
};
|
|
26
|
-
presentation?: {
|
|
27
|
-
poweredByShipEngine?: boolean;
|
|
28
|
-
};
|
|
29
|
-
rateForm?: RateFormFeatures;
|
|
30
|
-
shipmentForm?: ShipmentFormFeatures;
|
|
31
|
-
};
|
|
32
9
|
export type ConfigureShipmentProps = {
|
|
33
10
|
currency: SE.Currency;
|
|
34
11
|
errors?: ShipmentFormProps["errors"];
|
|
35
|
-
features?:
|
|
12
|
+
features?: PurchaseLabelFeatures;
|
|
36
13
|
getPreferredRates?: (shipment: SE.SalesOrderShipment, isInternational: boolean) => Promise<PreferredRatesResponse | undefined>;
|
|
37
14
|
insuranceAccount?: SE.InsuranceAccount;
|
|
38
15
|
isLoading?: ShipmentFormProps["isLoading"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SE } from "@shipengine/
|
|
1
|
+
import { SE } from "@shipengine/react-api";
|
|
2
2
|
import { AddressParserPayload } from "../../../components/templates/address-parser";
|
|
3
3
|
import { AddressPreference } from "../../../components/templates/address-preference-display";
|
|
4
4
|
import { CharsetWarning, OnChangeAddressOptions } from "../../../components/templates/shipment-form";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SE } from "@shipengine/
|
|
1
|
+
import { SE } from "@shipengine/react-api";
|
|
2
2
|
export type UseCustomsProps = {
|
|
3
3
|
onUpdate?: (shipment: SE.SalesOrderShipment) => Promise<void> | void;
|
|
4
4
|
shipment?: SE.SalesOrderShipment;
|
|
@@ -6,4 +6,5 @@ export type UseCustomsProps = {
|
|
|
6
6
|
export declare const useCustoms: ({ onUpdate, shipment }: UseCustomsProps) => {
|
|
7
7
|
customsErrors: SE.CodedError[] | null;
|
|
8
8
|
handleUpdateCustoms: (customs: SE.Customs, products: SE.Product[]) => Promise<SE.SalesOrderShipment>;
|
|
9
|
+
handleUpdateTaxableIds: (taxIds: SE.TaxIdentifier[], onError: (errors: SE.CodedError[]) => void) => Promise<SE.SalesOrderShipment>;
|
|
9
10
|
};
|
|
@@ -5,7 +5,7 @@ export type UseImportSalesOrderProps = {
|
|
|
5
5
|
salesOrderId?: string;
|
|
6
6
|
};
|
|
7
7
|
export declare const useImportSalesOrder: ({ externalOrderId, externalOrderNumber, orderSourceCode, salesOrderId, }: UseImportSalesOrderProps) => {
|
|
8
|
-
errors: import("@shipengine/
|
|
8
|
+
errors: import("@shipengine/react-api").CodedError[] | undefined;
|
|
9
9
|
isLoading: boolean;
|
|
10
|
-
salesOrder: import("@shipengine/
|
|
10
|
+
salesOrder: import("@shipengine/react-api").SalesOrder | undefined;
|
|
11
11
|
};
|
|
@@ -2,8 +2,8 @@ export type UseLoadShipmentProps = {
|
|
|
2
2
|
shipmentId: string;
|
|
3
3
|
};
|
|
4
4
|
export declare const useLoadShipment: ({ shipmentId }: UseLoadShipmentProps) => {
|
|
5
|
-
errors: import("@shipengine/
|
|
5
|
+
errors: import("@shipengine/react-api").CodedError[] | undefined;
|
|
6
6
|
isLoading: boolean;
|
|
7
|
-
refetchShipment: <TPageData>(options?: (import("@tanstack/query-core").RefetchOptions & import("@tanstack/query-core").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@shipengine/
|
|
8
|
-
shipment: import("@shipengine/
|
|
7
|
+
refetchShipment: <TPageData>(options?: (import("@tanstack/query-core").RefetchOptions & import("@tanstack/query-core").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@shipengine/react-api").SalesOrderShipment, import("@shipengine/react-api").CodedError[]>>;
|
|
8
|
+
shipment: import("@shipengine/react-api").SalesOrderShipment | undefined;
|
|
9
9
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CodedError, SE } from "@shipengine/
|
|
1
|
+
import { CodedError, SE } from "@shipengine/react-api";
|
|
2
2
|
export type UsePendingShipmentProps = {
|
|
3
3
|
breakOnCancelledShipment?: boolean;
|
|
4
4
|
onLoad?: (salesOrder: SE.SalesOrder, shipments: SE.SalesOrderShipment[], pendingShipment?: SE.SalesOrderShipment) => Promise<void> | void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SE } from "@shipengine/
|
|
1
|
+
import { SE } from "@shipengine/react-api";
|
|
2
2
|
import { ShippingPreset } from "../../../types";
|
|
3
3
|
import { UseAddressProps } from "./use-address";
|
|
4
4
|
import { UsePresetsProps } from "./use-presets";
|
|
@@ -29,6 +29,7 @@ export declare const useShipmentForm: ({ compatibleCountryCodes, onAddressValida
|
|
|
29
29
|
fullAddress: string;
|
|
30
30
|
}) => Promise<SE.AddressExtraction>;
|
|
31
31
|
onUpdateCustoms: (customs: SE.Customs, products: SE.Product[]) => Promise<SE.SalesOrderShipment>;
|
|
32
|
+
onUpdateTaxableIds: (taxIds: SE.TaxIdentifier[], onError: (errors: SE.CodedError[]) => void) => Promise<SE.SalesOrderShipment>;
|
|
32
33
|
parseAddressErrors: SE.CodedError[] | undefined;
|
|
33
34
|
resetParseAddress: () => void;
|
|
34
35
|
resetSalesOrderShipment: () => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SE } from "@shipengine/
|
|
1
|
+
import { SE } from "@shipengine/react-api";
|
|
2
2
|
import { UseImportSalesOrderProps } from "./hooks";
|
|
3
3
|
import { PurchaseLabelCommonProps } from "./purchase-label";
|
|
4
4
|
export type PurchaseLabelSalesOrderProps = PurchaseLabelCommonProps & {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { UseShippingPresetsOptionsProps } from "../../hooks";
|
|
3
|
+
import { PurchaseLabelFeatures } from "../../utilities";
|
|
3
4
|
import { ConfigureShipmentProps } from "./configure-shipment";
|
|
4
5
|
import { UseConfigureShipmentProps } from "./hooks";
|
|
5
6
|
import { PurchaseLabelSalesOrderProps } from "./purchase-label-by-sales-order";
|
|
@@ -16,7 +17,7 @@ export type PurchaseLabelCommonProps = {
|
|
|
16
17
|
/**
|
|
17
18
|
* `features` is a set of feature flags you would like to enable or disable in this component.
|
|
18
19
|
*/
|
|
19
|
-
features?:
|
|
20
|
+
features?: PurchaseLabelFeatures;
|
|
20
21
|
/**
|
|
21
22
|
*`getPreferredRates is an async/sync optional callback function that will be invoked each time rates are caculated.
|
|
22
23
|
* This is an optional callback function that returns an array of ShipEngine rates. The rates from this response will
|
|
@@ -139,7 +140,7 @@ export type ElementProps = PurchaseLabelByShipmentProps | PurchaseLabelSalesOrde
|
|
|
139
140
|
* @example
|
|
140
141
|
* You can see how the `<Component />` is used in the `createElement` function call below.
|
|
141
142
|
* ```tsx
|
|
142
|
-
* export const Element =
|
|
143
|
+
* export const Element = createElement(Component, ErrorFallback, {
|
|
143
144
|
* css: { height: "100%", maxWidth: "800px", minWidth: "440px", width: "100%" },
|
|
144
145
|
* resources: { en },
|
|
145
146
|
* });
|
|
@@ -181,12 +182,12 @@ export declare const Component: ({ features, ...props }: ElementProps) => import
|
|
|
181
182
|
* <br />
|
|
182
183
|
*
|
|
183
184
|
* - Once a label has been purchased using this Element, you can take the `shipmentId` for the
|
|
184
|
-
* associated shipment and pass it into the `<
|
|
185
|
+
* associated shipment and pass it into the `<ShipmentSummary.Element />` Element in order to view
|
|
185
186
|
* the shipment details.
|
|
186
187
|
*
|
|
187
188
|
* @see {@link PurchaseLabel.PurchaseLabelCommonProps | The **Common props** used in `<PurchaseLabel.Element />`}
|
|
188
189
|
*
|
|
189
|
-
* @see {@link
|
|
190
|
+
* @see {@link ShipmentSummary.Element | The next step in the label purchase workflow `<ShipmentSummary.Element />`}
|
|
190
191
|
*/
|
|
191
192
|
export declare const Element: ({ resources, ...props }: ElementProps & {
|
|
192
193
|
resources?: {
|
|
@@ -286,7 +287,7 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
|
|
|
286
287
|
genericText: string;
|
|
287
288
|
};
|
|
288
289
|
};
|
|
289
|
-
"
|
|
290
|
+
"manage-carriers": {
|
|
290
291
|
title: string;
|
|
291
292
|
headers: {
|
|
292
293
|
accountCarriers: string;
|
|
@@ -318,14 +319,6 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
|
|
|
318
319
|
vatSettings: {
|
|
319
320
|
title: string;
|
|
320
321
|
};
|
|
321
|
-
/**
|
|
322
|
-
* # Purchase Label Component Props
|
|
323
|
-
*
|
|
324
|
-
* These are the shared props that will be passed into the `<PurchaseLabel.Element />`, and work
|
|
325
|
-
* for either shipment-based or sales order-based label purchasing.
|
|
326
|
-
*
|
|
327
|
-
* @see {@link PurchaseLabel.Element | This prop types usage in `<PurchaseLabel.Element />`}
|
|
328
|
-
*/
|
|
329
322
|
carriers: {
|
|
330
323
|
title: string;
|
|
331
324
|
subtitle: string;
|
|
@@ -357,6 +350,11 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
|
|
|
357
350
|
billing: {
|
|
358
351
|
title: string;
|
|
359
352
|
subtitleCard: string;
|
|
353
|
+
/**
|
|
354
|
+
* `onAddressValidation` is an async/sync callback function that will be invoked on each Address
|
|
355
|
+
* validation request. For example, whenever you update the `Ship To Address` or
|
|
356
|
+
* `Ship From Address` for a given shipment.
|
|
357
|
+
*/
|
|
360
358
|
subtitleBilling: string;
|
|
361
359
|
};
|
|
362
360
|
};
|
|
@@ -372,6 +370,7 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
|
|
|
372
370
|
title: string;
|
|
373
371
|
};
|
|
374
372
|
};
|
|
373
|
+
noFundingSource: string;
|
|
375
374
|
};
|
|
376
375
|
"rate-details": {
|
|
377
376
|
total: string;
|
|
@@ -426,14 +425,7 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
|
|
|
426
425
|
addPackageDetails: string;
|
|
427
426
|
};
|
|
428
427
|
errorMessages: {
|
|
429
|
-
customsItemsRequired: string;
|
|
430
|
-
* # Purchase Label Component Props
|
|
431
|
-
*
|
|
432
|
-
* These are the shared props that will be passed into the `<PurchaseLabel.Element />`, and work
|
|
433
|
-
* for either shipment-based or sales order-based label purchasing.
|
|
434
|
-
*
|
|
435
|
-
* @see {@link PurchaseLabel.Element | This prop types usage in `<PurchaseLabel.Element />`}
|
|
436
|
-
*/
|
|
428
|
+
customsItemsRequired: string;
|
|
437
429
|
invalidAddress: string;
|
|
438
430
|
noRates: string;
|
|
439
431
|
salesOrderNotLoaded: string;
|
|
@@ -466,6 +458,10 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
|
|
|
466
458
|
requestedShipping: string;
|
|
467
459
|
shipDate: string;
|
|
468
460
|
service: string;
|
|
461
|
+
/**
|
|
462
|
+
* `onApplyPreset` is an async/sync callback function that will be invoked each time a `Preset`
|
|
463
|
+
* has been applied to a shipment.
|
|
464
|
+
*/
|
|
469
465
|
shipTo: string;
|
|
470
466
|
addShipToAddress: string;
|
|
471
467
|
warehouse: string;
|
|
@@ -480,10 +476,6 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
|
|
|
480
476
|
contentDescription: string;
|
|
481
477
|
};
|
|
482
478
|
loading: {
|
|
483
|
-
/**
|
|
484
|
-
* `onBeforeRateSave` is an async/sync callback function that will be invoked before each time a user
|
|
485
|
-
* saves a rate.
|
|
486
|
-
*/
|
|
487
479
|
calculatingRates: string;
|
|
488
480
|
};
|
|
489
481
|
modes: {
|
|
@@ -567,8 +559,21 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
|
|
|
567
559
|
subtitle: string;
|
|
568
560
|
inlineMessage: string;
|
|
569
561
|
};
|
|
562
|
+
errors: {
|
|
563
|
+
noCarriers: {
|
|
564
|
+
title: string;
|
|
565
|
+
subtitle: string;
|
|
566
|
+
};
|
|
567
|
+
};
|
|
570
568
|
success: {
|
|
571
|
-
title: string;
|
|
569
|
+
title: string; /**
|
|
570
|
+
*`getPreferredRates is an async/sync optional callback function that will be invoked each time rates are caculated.
|
|
571
|
+
* This is an optional callback function that returns an array of ShipEngine rates. The rates from this response will
|
|
572
|
+
* be spliced into the normal get rates response the Elements makes internally. If a service code matches a service
|
|
573
|
+
* code on a rate returned from getPreferredRates, the rate returned from getPreferredRates will not be shown in the
|
|
574
|
+
* rate form. These preferred rates will be displayed with a set of UI enhancements that incude a dynamic cost savings
|
|
575
|
+
* flag and green checkmark when the rate is selected.
|
|
576
|
+
*/
|
|
572
577
|
subtitle: string;
|
|
573
578
|
action: string;
|
|
574
579
|
};
|
|
@@ -591,10 +596,7 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
|
|
|
591
596
|
};
|
|
592
597
|
termsAndAgreementTitles: {
|
|
593
598
|
"WW9kZWwgRGlyZWN0IC0gVGVybXMgYW5kIENvbmRpdGlvbnMgKOKAnFRlcm1z4oCdKQ==": string;
|
|
594
|
-
"RXZyaSBTZW5kIFRlcm1zICYgQ29uZGl0aW9ucw==": string;
|
|
595
|
-
* `onChangeShipmentFormMode` is an async/sync callback function that will be invoked each time
|
|
596
|
-
* the user toggles the `Shipment Form Mode` between `Browse Rates` and `Selected Rate`.
|
|
597
|
-
*/
|
|
599
|
+
"RXZyaSBTZW5kIFRlcm1zICYgQ29uZGl0aW9ucw==": string;
|
|
598
600
|
"VGVybXMgb2YgU2VydmljZSBVbml0ZWQgS2luZ2RvbQ==": string;
|
|
599
601
|
RFBEIFN0YW5kYXJkIFRlcm1zIGFuZCBDb25kaXRpb25z: string;
|
|
600
602
|
"R2xvYmFsUG9zdCBUZXJtcyBhbmQgQ29uZGl0aW9ucw==": string;
|
|
@@ -615,6 +617,7 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
|
|
|
615
617
|
returnToAddressIsDifferent: string;
|
|
616
618
|
setDefault: string;
|
|
617
619
|
shipFrom: string;
|
|
620
|
+
noWarehouses: string;
|
|
618
621
|
};
|
|
619
622
|
"manage-funding": {
|
|
620
623
|
actions: {
|
|
@@ -662,6 +665,7 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
|
|
|
662
665
|
errors: {
|
|
663
666
|
balanceUnknown: string;
|
|
664
667
|
unableToFindBalance: string;
|
|
668
|
+
noFundingSource: string;
|
|
665
669
|
};
|
|
666
670
|
byoc: {
|
|
667
671
|
invoiceNotification: string;
|
|
@@ -761,7 +765,17 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
|
|
|
761
765
|
toastTitle: string;
|
|
762
766
|
toastBody: string;
|
|
763
767
|
};
|
|
764
|
-
|
|
768
|
+
deleteCarrierErrorTitle: string;
|
|
769
|
+
deleteCarrierErrorMessage: string;
|
|
770
|
+
loadingDeletingCarrier: string;
|
|
771
|
+
}; /**
|
|
772
|
+
*`getPreferredRates is an async/sync optional callback function that will be invoked each time rates are caculated.
|
|
773
|
+
* This is an optional callback function that returns an array of ShipEngine rates. The rates from this response will
|
|
774
|
+
* be spliced into the normal get rates response the Elements makes internally. If a service code matches a service
|
|
775
|
+
* code on a rate returned from getPreferredRates, the rate returned from getPreferredRates will not be shown in the
|
|
776
|
+
* rate form. These preferred rates will be displayed with a set of UI enhancements that incude a dynamic cost savings
|
|
777
|
+
* flag and green checkmark when the rate is selected.
|
|
778
|
+
*/
|
|
765
779
|
common: {
|
|
766
780
|
actions: {
|
|
767
781
|
add: string;
|
|
@@ -856,10 +870,6 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
|
|
|
856
870
|
adultSignature: string;
|
|
857
871
|
delivery: string;
|
|
858
872
|
deliveryMailed: string;
|
|
859
|
-
/**
|
|
860
|
-
* `onChangeShipmentFormMode` is an async/sync callback function that will be invoked each time
|
|
861
|
-
* the user toggles the `Shipment Form Mode` between `Browse Rates` and `Selected Rate`.
|
|
862
|
-
*/
|
|
863
873
|
directSignature: string;
|
|
864
874
|
none: string;
|
|
865
875
|
signature: string;
|
|
@@ -867,13 +877,29 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
|
|
|
867
877
|
};
|
|
868
878
|
customs: {
|
|
869
879
|
addDeclaration: string;
|
|
880
|
+
noResults: string;
|
|
870
881
|
contents: {
|
|
871
882
|
documents: string;
|
|
872
883
|
gift: string;
|
|
884
|
+
/**
|
|
885
|
+
* `onLabelCreateFailure` is an async/sync callback function that will be invoked each time a
|
|
886
|
+
* label purchase fails.
|
|
887
|
+
*/
|
|
873
888
|
merchandise: string;
|
|
874
889
|
returnedGoods: string;
|
|
875
890
|
sample: string;
|
|
876
891
|
};
|
|
892
|
+
taxIds: {
|
|
893
|
+
sectionTitle: string;
|
|
894
|
+
addTaxId: string;
|
|
895
|
+
sectionTitleTooltip: string;
|
|
896
|
+
entityTypeTooltipText: string; /**
|
|
897
|
+
* `onLoad` is an async/sync callback provided by the host application that is invoked after the
|
|
898
|
+
* element is loaded. (This may be useful to grab the shipmentId of a one-off label)
|
|
899
|
+
*/
|
|
900
|
+
entityTypeTooltipPointOne: string;
|
|
901
|
+
entityTypeTooltipPointTwo: string;
|
|
902
|
+
};
|
|
877
903
|
currencyChange: string;
|
|
878
904
|
declarations: string;
|
|
879
905
|
descriptionTooltip: {
|
|
@@ -883,10 +909,7 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
|
|
|
883
909
|
};
|
|
884
910
|
fields: {
|
|
885
911
|
contentsType: string;
|
|
886
|
-
countryOfOrigin: string;
|
|
887
|
-
* `onRateSaved` is an async/sync callback function that will be invoked each time a rate is
|
|
888
|
-
* saved by the user when rate shopping in the host application.
|
|
889
|
-
*/
|
|
912
|
+
countryOfOrigin: string;
|
|
890
913
|
description: string;
|
|
891
914
|
harmonizedTariffCode: string;
|
|
892
915
|
ifDeliveryFails: string;
|
|
@@ -894,6 +917,11 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
|
|
|
894
917
|
sku: string;
|
|
895
918
|
value: string;
|
|
896
919
|
valueQuantity: string;
|
|
920
|
+
taxId: string;
|
|
921
|
+
taxIdType: string;
|
|
922
|
+
taxIdTypeValue: string;
|
|
923
|
+
taxIssuingAuthority: string;
|
|
924
|
+
entityType: string;
|
|
897
925
|
};
|
|
898
926
|
nonDelivery: {
|
|
899
927
|
returnToSender: string;
|
|
@@ -916,10 +944,7 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
|
|
|
916
944
|
fundingSourceMetadata: string;
|
|
917
945
|
label: string;
|
|
918
946
|
labels: string;
|
|
919
|
-
salesOrder: string;
|
|
920
|
-
* `printLabelLayout` is a string that represents the label layout you would like to use when
|
|
921
|
-
* purchasing a label. e.g. `4x6`
|
|
922
|
-
*/
|
|
947
|
+
salesOrder: string;
|
|
923
948
|
shipment: string;
|
|
924
949
|
shipments: string;
|
|
925
950
|
warehouses: string;
|
|
@@ -969,6 +994,8 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
|
|
|
969
994
|
shipment: string;
|
|
970
995
|
shipments: string;
|
|
971
996
|
warehouses: string;
|
|
997
|
+
funding: string;
|
|
998
|
+
paymentMethod: string;
|
|
972
999
|
};
|
|
973
1000
|
months: {
|
|
974
1001
|
january: string;
|
|
@@ -1047,6 +1074,16 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
|
|
|
1047
1074
|
gram: string;
|
|
1048
1075
|
kilogram: string;
|
|
1049
1076
|
};
|
|
1077
|
+
actionsMenu: {
|
|
1078
|
+
menuTitle: string;
|
|
1079
|
+
actions: {
|
|
1080
|
+
printLabel: string;
|
|
1081
|
+
voidLabel: string;
|
|
1082
|
+
printForms: string;
|
|
1083
|
+
edit: string;
|
|
1084
|
+
remove: string;
|
|
1085
|
+
};
|
|
1086
|
+
};
|
|
1050
1087
|
ZnVuZGluZ19zb3VyY2VfaWQgbXVzdCBiZSBhbiBpbnRlZ2Vy: string;
|
|
1051
1088
|
T25seSByZXNpZGVudGlhbCBkZWxpdmVyeSBhZGRyZXNzZXMgYXJlIGFsbG93ZWQgZm9yIFVQUyBHcm91bmQgU2F2ZXIu: string;
|
|
1052
1089
|
"VGhlIHNlbGVjdGVkIHNlcnZpY2UgaW5jbHVkZXMgaW5zdXJhbmNlIGZvciBhbiBpbnN1cmVkIGFtb3VudCB1cCB0byAkMTAwLgo=": string;
|
|
@@ -1062,7 +1099,11 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
|
|
|
1062
1099
|
};
|
|
1063
1100
|
"account-settings": {
|
|
1064
1101
|
messages: {
|
|
1065
|
-
|
|
1102
|
+
transactionHistory: {
|
|
1103
|
+
noTransactions: string;
|
|
1104
|
+
};
|
|
1105
|
+
noFundingSourceDescription: string;
|
|
1106
|
+
noFundingSourceAction: string;
|
|
1066
1107
|
};
|
|
1067
1108
|
title: string;
|
|
1068
1109
|
sections: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as ShipmentSummary from "./shipment-summary";
|