@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
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { CountryCode } from "../../constants";
|
|
2
|
+
export type EnabledExternalCarriers = ("apc" | "asendia" | "better_trucks" | "canpar" | "chronopost" | "couriers_please" | "courierpost" | "dpd" | "hermes_germany" | "intelliquick_delivery" | "lso" | "ontrac" | "seko" | "ups" | "yodel")[];
|
|
3
|
+
export type EnabledShipEngineCarriers = ("aramex_au_walleted" | "canada_post_walleted" | "canpar_walleted" | "couriersplease_walleted" | "sendle_walleted" | "dhl_express_walleted" | "dhl_express_worldwide" | "dpd_germany_walleted" | "dpdwallet" | "globalpost" | "hermes" | "purolator_walleted" | "stamps_com" | "ups_walleted" | "ups" | "yodel_walleted")[];
|
|
4
|
+
export type RateFormFeatures = {
|
|
5
|
+
/**
|
|
6
|
+
* Enables the `funding` section of the rate form.
|
|
7
|
+
*/
|
|
8
|
+
enableFunding?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Enables the `global post filtering` on all rates fetched in the rates form.
|
|
11
|
+
*/
|
|
12
|
+
enableGlobalPostFiltering?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Enables the Pick Up/Drop Off tabs UI in the Rate Form to separate rates with PUDO capability by type.
|
|
15
|
+
*/
|
|
16
|
+
enablePudoUI?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Enables the `label layout` section of the Purchase Label element.
|
|
19
|
+
*/
|
|
20
|
+
labelLayout?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Enables showing the `carrier nickname` when rates are fetched.
|
|
23
|
+
*/
|
|
24
|
+
nicknameRate?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Enables the `DHL terms acknowledgement` when rates are fetched.
|
|
27
|
+
*/
|
|
28
|
+
requireDhlTermsAcknowledgement?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Enables the `save rate` button in the rate form. This allows users to save a `rateId` for a shipment to be purchased later.
|
|
31
|
+
*/
|
|
32
|
+
saveRate?: boolean;
|
|
33
|
+
};
|
|
34
|
+
export type ShipmentFormFeatures = {
|
|
35
|
+
/**
|
|
36
|
+
* Enables the `Add-Ons` section of the shipment form. This allows users to add additional services to their shipment such as
|
|
37
|
+
* delivery confirmation and insurance.
|
|
38
|
+
*/
|
|
39
|
+
addOns?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Enables the `browse rates` button in the shipment form. This allows users to browse rates for a shipment with
|
|
42
|
+
* varying shipment configurations. This is useful for rate shopping.
|
|
43
|
+
*/
|
|
44
|
+
browseRates?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Enables the `shipsurance insurance` feature, allowing users to select Shipsurance when insuring their shipment.
|
|
47
|
+
*/
|
|
48
|
+
includeShipsuranceInsurance?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Enables the `third party insurance` feature, allowing users to opt for third party insurance when insuring their shipment.
|
|
51
|
+
*/
|
|
52
|
+
includeThirdPartyInsurance?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Enables the `select service` feature, allowing users to select a service when rate shopping across multiple carrier providers.
|
|
55
|
+
*/
|
|
56
|
+
selectService?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Enables the `shipping presets` feature, allowing users to pass in a set of shipping presets they wish to use within the
|
|
59
|
+
* shipment form of the PurchaseLabel element.
|
|
60
|
+
*/
|
|
61
|
+
shippingPresets?: boolean;
|
|
62
|
+
};
|
|
63
|
+
export type ShipmentSummaryFeatures = {
|
|
64
|
+
schedulePickup?: boolean;
|
|
65
|
+
};
|
|
66
|
+
export type PurchaseLabelFeatures = {
|
|
67
|
+
/**
|
|
68
|
+
* List of all supported `countries` available in ShipEngine Elements.
|
|
69
|
+
*/
|
|
70
|
+
compatibleCountryCodes?: CountryCode[];
|
|
71
|
+
/**
|
|
72
|
+
* When enabled will modify the default behavior of creating a new shipment for a salesorder to throwing an error
|
|
73
|
+
*/
|
|
74
|
+
enableErrorWhenShipmentCancelled?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* @internal
|
|
77
|
+
*
|
|
78
|
+
* `partnerMessages` enables the partner consuming elements to specify override messages in specific cases.
|
|
79
|
+
*/
|
|
80
|
+
partnerMessages?: {
|
|
81
|
+
incompleteLabelPurchaseRequirements?: string;
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* All scoped feature flags for the `rate form` section of the PurchaseLabel element.
|
|
85
|
+
*/
|
|
86
|
+
rateForm?: RateFormFeatures;
|
|
87
|
+
/**
|
|
88
|
+
* All scoped feature flags for the `shipment form` section of the PurchaseLabel element.
|
|
89
|
+
*/
|
|
90
|
+
shipmentForm?: ShipmentFormFeatures;
|
|
91
|
+
};
|
|
92
|
+
export type AccountSettingsFeatures = {
|
|
93
|
+
/**
|
|
94
|
+
* Whether or not to display the ShipEngine Carriers section on the Account Settings element.
|
|
95
|
+
*/
|
|
96
|
+
showCarrierServices?: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Whether or not to display the External Carriers section on the Account Settings element.
|
|
99
|
+
*/
|
|
100
|
+
showExternalCarriers?: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Whether or not to display the Shipping Label Layout section on the Account Settings element.
|
|
103
|
+
*/
|
|
104
|
+
showLabelLayout?: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Whether or not to display the Ship From Locations section on the Account Settings element.
|
|
107
|
+
*/
|
|
108
|
+
showManageWarehouses?: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* Whether or not to display the Units of Measure section on the Account Settings element.
|
|
111
|
+
*/
|
|
112
|
+
showUnitSettings?: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Whether or not to display the Taxes section on the Account Settings element.
|
|
115
|
+
*/
|
|
116
|
+
showVatSettings?: boolean;
|
|
117
|
+
};
|
|
118
|
+
export type GlobalFeatures = {
|
|
119
|
+
/**
|
|
120
|
+
* Availible "Bring your own carrier" carrier codes for carriers that may be added. If this is omitted, new carriers may not be added by this element.
|
|
121
|
+
*/
|
|
122
|
+
enabledExternalCarriers?: EnabledExternalCarriers;
|
|
123
|
+
/**
|
|
124
|
+
* list of all walleted carriers that are enabled for use in Elements.
|
|
125
|
+
*/
|
|
126
|
+
enabledShipEngineCarriers?: EnabledShipEngineCarriers;
|
|
127
|
+
/**
|
|
128
|
+
* Enables the `Powered by ShipEngine` logo in the footer various elements.
|
|
129
|
+
*/
|
|
130
|
+
poweredByShipEngine?: boolean;
|
|
131
|
+
/**
|
|
132
|
+
* Enable the VAT settings to be shown
|
|
133
|
+
*/
|
|
134
|
+
showVatSettings?: boolean;
|
|
135
|
+
};
|
|
136
|
+
export type ElementsFeatureFlags = {
|
|
137
|
+
accountSettingsFeatures?: AccountSettingsFeatures;
|
|
138
|
+
globalFeatures?: GlobalFeatures;
|
|
139
|
+
purchaseLabelFeatures?: PurchaseLabelFeatures;
|
|
140
|
+
shipmentSummaryFeatures?: ShipmentSummaryFeatures;
|
|
141
|
+
};
|
package/src/utilities/money.d.ts
CHANGED
package/src/utilities/rates.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SE } from "@shipengine/
|
|
1
|
+
import { SE } from "@shipengine/react-api";
|
|
2
2
|
/**
|
|
3
3
|
* @internal
|
|
4
4
|
*
|
|
@@ -23,3 +23,11 @@ export declare const isUpsCarrier: (carrierCode: string) => boolean;
|
|
|
23
23
|
* @category Utilities
|
|
24
24
|
*/
|
|
25
25
|
export declare const getCarrierIdByCarrierCode: (carriers: SE.Carrier[] | undefined, carrierCode: string) => string | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* @internal
|
|
28
|
+
*
|
|
29
|
+
* # Carrier Utilities - getLogoOrIconByCarrierCode
|
|
30
|
+
*
|
|
31
|
+
* @category Utilities
|
|
32
|
+
*/
|
|
33
|
+
export declare const getLogoOrIconByCarrierCode: (carrierCode: string, type: "logo" | "icon") => string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { SE } from "@shipengine/
|
|
1
|
+
import { SE } from "@shipengine/react-api";
|
|
2
2
|
export declare const getDefaultWarehouse: (warehouses: SE.Warehouse[]) => SE.Warehouse;
|
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
import { ConnectCarrier } from "../connect-carrier";
|
|
4
|
-
export type AccountSettingsFeatures = ShipEngineCarriersFeatures & ConnectCarrier.ConnectCarrierFeatures & VatSettingsFeatures;
|
|
5
|
-
/**
|
|
6
|
-
* # Account Settings Component Props
|
|
7
|
-
*
|
|
8
|
-
* - These are the base props that will be passed into the `<AccountSettings />` component.
|
|
9
|
-
*
|
|
10
|
-
* @see {@link AccountSettings.Component | This prop types usage in the `<AccountSettings /> component`}
|
|
11
|
-
*/
|
|
2
|
+
import { AccountSettingsFeatures } from "../../utilities";
|
|
12
3
|
export type ComponentProps = {
|
|
13
4
|
/**
|
|
14
|
-
*
|
|
5
|
+
* `features` is a set of feature flags you would like to enable or disable in this component.
|
|
15
6
|
*/
|
|
16
7
|
features?: AccountSettingsFeatures;
|
|
17
8
|
};
|
|
@@ -35,7 +26,7 @@ export declare const Component: ({ features }: ComponentProps) => import("@emoti
|
|
|
35
26
|
* <br />
|
|
36
27
|
*
|
|
37
28
|
* @see {@link AccountSettings.ComponentProps | The **props** that can be passed into the `<AccountSettings.Element />` component}
|
|
38
|
-
* @see {@link
|
|
29
|
+
* @see {@link CarrierServices.Element | The `<CarrierServices />` component used to view connected carriers and manage funding}
|
|
39
30
|
* @see {@link ManageWarehouses.Component | The `<ManageWarehouses />` component used to add, update, or remove warehouses}
|
|
40
31
|
* @see {@link PaymentMethodSettings | The `<PaymentMethodSettings />` component used to manage payment methods}
|
|
41
32
|
* @see {@link ManageFunding | The `<ManageFunding />` component used to manage funding rules and add funds to a carrier account}
|
|
@@ -96,6 +87,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
96
87
|
schedulePickup: string;
|
|
97
88
|
showItems: string;
|
|
98
89
|
void: string;
|
|
90
|
+
download: string;
|
|
99
91
|
};
|
|
100
92
|
fields: {
|
|
101
93
|
dimensions: string;
|
|
@@ -115,6 +107,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
115
107
|
multipleShippingServices: string;
|
|
116
108
|
sections: {
|
|
117
109
|
labels: string;
|
|
110
|
+
shipmentSummary: string;
|
|
118
111
|
};
|
|
119
112
|
noLabels: string;
|
|
120
113
|
};
|
|
@@ -136,7 +129,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
136
129
|
genericText: string;
|
|
137
130
|
};
|
|
138
131
|
};
|
|
139
|
-
"
|
|
132
|
+
"manage-carriers": {
|
|
140
133
|
title: string;
|
|
141
134
|
headers: {
|
|
142
135
|
accountCarriers: string;
|
|
@@ -204,8 +197,48 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
204
197
|
};
|
|
205
198
|
};
|
|
206
199
|
"register-carrier": {
|
|
207
|
-
formTitle:
|
|
208
|
-
|
|
200
|
+
formTitle: {
|
|
201
|
+
default: string;
|
|
202
|
+
new: string;
|
|
203
|
+
edit: string;
|
|
204
|
+
};
|
|
205
|
+
notifications: {
|
|
206
|
+
error: {
|
|
207
|
+
title: string;
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
"rate-details": {
|
|
212
|
+
total: string;
|
|
213
|
+
subtotal: string;
|
|
214
|
+
registerVat: string;
|
|
215
|
+
concepts: {
|
|
216
|
+
confirmation: string;
|
|
217
|
+
uncategorized: string;
|
|
218
|
+
shipping: string;
|
|
219
|
+
insurance: string;
|
|
220
|
+
confirm: string;
|
|
221
|
+
discount: string;
|
|
222
|
+
fuel_charge: string;
|
|
223
|
+
additional_fees: string;
|
|
224
|
+
tariff: string;
|
|
225
|
+
tax: string;
|
|
226
|
+
delivery: string;
|
|
227
|
+
handling: string;
|
|
228
|
+
special_goods: string;
|
|
229
|
+
pickup: string;
|
|
230
|
+
location_fee: string;
|
|
231
|
+
oversize: string;
|
|
232
|
+
returns: string;
|
|
233
|
+
notifications: string;
|
|
234
|
+
tip: string;
|
|
235
|
+
duties_and_taxes: string;
|
|
236
|
+
brokerage_fee: string;
|
|
237
|
+
admin_fee: string;
|
|
238
|
+
adjustment: string;
|
|
239
|
+
auctane_service_fee: string;
|
|
240
|
+
product_price: string;
|
|
241
|
+
};
|
|
209
242
|
};
|
|
210
243
|
"purchase-label": {
|
|
211
244
|
title: string;
|
|
@@ -228,7 +261,9 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
228
261
|
addPackageDetails: string;
|
|
229
262
|
};
|
|
230
263
|
errorMessages: {
|
|
231
|
-
customsItemsRequired: string;
|
|
264
|
+
customsItemsRequired: string; /**
|
|
265
|
+
* `features` is a set of feature flags you would like to enable or disable in this component.
|
|
266
|
+
*/
|
|
232
267
|
invalidAddress: string;
|
|
233
268
|
noRates: string;
|
|
234
269
|
salesOrderNotLoaded: string;
|
|
@@ -318,7 +353,10 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
318
353
|
today: string;
|
|
319
354
|
viewMap: string;
|
|
320
355
|
otherLocations: string;
|
|
321
|
-
|
|
356
|
+
noServicePointsForService: string;
|
|
357
|
+
error: string;
|
|
358
|
+
paperless: string;
|
|
359
|
+
localTimeDisclaimer: string;
|
|
322
360
|
};
|
|
323
361
|
shipToAddressFormFields: string;
|
|
324
362
|
sections: {
|
|
@@ -822,6 +860,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
822
860
|
gram: string;
|
|
823
861
|
kilogram: string;
|
|
824
862
|
};
|
|
863
|
+
ZnVuZGluZ19zb3VyY2VfaWQgbXVzdCBiZSBhbiBpbnRlZ2Vy: string;
|
|
825
864
|
T25seSByZXNpZGVudGlhbCBkZWxpdmVyeSBhZGRyZXNzZXMgYXJlIGFsbG93ZWQgZm9yIFVQUyBHcm91bmQgU2F2ZXIu: string;
|
|
826
865
|
"VGhlIHNlbGVjdGVkIHNlcnZpY2UgaW5jbHVkZXMgaW5zdXJhbmNlIGZvciBhbiBpbnN1cmVkIGFtb3VudCB1cCB0byAkMTAwLgo=": string;
|
|
827
866
|
"VGhlIHNlbGVjdGVkIHNlcnZpY2UgaW5jbHVkZXMgaW5zdXJhbmNlIGZvciBhbiBpbnN1cmVkIGFtb3VudCB1cCB0byAkNTAuCg==": string;
|
|
@@ -1,22 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ShipEngineCarriersFeatures } from "../../features/shipengine-carriers";
|
|
3
|
-
/**
|
|
4
|
-
* # Manage-Wallet-Workflow Props
|
|
5
|
-
*
|
|
6
|
-
* @see {@link ManageWalletWorkflow.Element | The `<Manage-Wallet-Workflow />` component}
|
|
7
|
-
*/
|
|
8
|
-
export type ComponentProps = {
|
|
9
|
-
/**
|
|
10
|
-
* `features` is a set of feature flags you would like to enable or disable in this component.
|
|
11
|
-
*/
|
|
12
|
-
features?: ShipEngineCarriersFeatures;
|
|
13
|
-
};
|
|
14
2
|
/**
|
|
15
3
|
* # Manage-Wallet-Workflow Component
|
|
16
4
|
*
|
|
17
|
-
* @param ComponentProps The base props that will be passed into the `<
|
|
5
|
+
* @param ComponentProps The base props that will be passed into the `<CarrierServices />` component.
|
|
18
6
|
*
|
|
19
|
-
* @returns Element A React element that renders the `<
|
|
7
|
+
* @returns Element A React element that renders the `<CarrierServices />` component allowing users
|
|
20
8
|
* to view a list of carriers that are connected to their ShipEngine account, add funds to their wallet, view transaction history, and manage their payment method. This component is
|
|
21
9
|
* composed in the `<AccountSettings />` Element.
|
|
22
10
|
*
|
|
@@ -25,17 +13,17 @@ export type ComponentProps = {
|
|
|
25
13
|
* (() => {
|
|
26
14
|
* const features = useFeatures("Global");
|
|
27
15
|
*
|
|
28
|
-
* return <
|
|
16
|
+
* return <CarrierServices.Element features={features} />;
|
|
29
17
|
* })();
|
|
30
18
|
* ```
|
|
31
19
|
*
|
|
32
20
|
* <br />
|
|
33
21
|
*
|
|
34
|
-
* @see {@link
|
|
22
|
+
* @see {@link CarrierServices.ComponentProps | The props that are passed into the `<Manage-Wallet-Workflow />` component}
|
|
35
23
|
* @see {@link AccountSettings.Element | The `<AccountSettings />` component renders the `<Manage-Wallet-Workflow />` component}
|
|
36
24
|
*/
|
|
37
|
-
export declare const Component: (
|
|
38
|
-
export declare const Element: ({ resources, ...props }:
|
|
25
|
+
export declare const Component: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare const Element: ({ resources, ...props }: object & {
|
|
39
27
|
resources?: {
|
|
40
28
|
en: {
|
|
41
29
|
"wallet-history": {
|
|
@@ -91,6 +79,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
91
79
|
schedulePickup: string;
|
|
92
80
|
showItems: string;
|
|
93
81
|
void: string;
|
|
82
|
+
download: string;
|
|
94
83
|
};
|
|
95
84
|
fields: {
|
|
96
85
|
dimensions: string;
|
|
@@ -110,6 +99,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
110
99
|
multipleShippingServices: string;
|
|
111
100
|
sections: {
|
|
112
101
|
labels: string;
|
|
102
|
+
shipmentSummary: string;
|
|
113
103
|
};
|
|
114
104
|
noLabels: string;
|
|
115
105
|
};
|
|
@@ -131,7 +121,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
131
121
|
genericText: string;
|
|
132
122
|
};
|
|
133
123
|
};
|
|
134
|
-
"
|
|
124
|
+
"manage-carriers": {
|
|
135
125
|
title: string;
|
|
136
126
|
headers: {
|
|
137
127
|
accountCarriers: string;
|
|
@@ -156,6 +146,29 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
156
146
|
};
|
|
157
147
|
billing: {
|
|
158
148
|
title: string;
|
|
149
|
+
/**
|
|
150
|
+
* # Manage-Wallet-Workflow Component
|
|
151
|
+
*
|
|
152
|
+
* @param ComponentProps The base props that will be passed into the `<CarrierServices />` component.
|
|
153
|
+
*
|
|
154
|
+
* @returns Element A React element that renders the `<CarrierServices />` component allowing users
|
|
155
|
+
* to view a list of carriers that are connected to their ShipEngine account, add funds to their wallet, view transaction history, and manage their payment method. This component is
|
|
156
|
+
* composed in the `<AccountSettings />` Element.
|
|
157
|
+
*
|
|
158
|
+
* @example
|
|
159
|
+
* ```tsx
|
|
160
|
+
* (() => {
|
|
161
|
+
* const features = useFeatures("Global");
|
|
162
|
+
*
|
|
163
|
+
* return <CarrierServices.Element features={features} />;
|
|
164
|
+
* })();
|
|
165
|
+
* ```
|
|
166
|
+
*
|
|
167
|
+
* <br />
|
|
168
|
+
*
|
|
169
|
+
* @see {@link CarrierServices.ComponentProps | The props that are passed into the `<Manage-Wallet-Workflow />` component}
|
|
170
|
+
* @see {@link AccountSettings.Element | The `<AccountSettings />` component renders the `<Manage-Wallet-Workflow />` component}
|
|
171
|
+
*/
|
|
159
172
|
cardSubTitle: string;
|
|
160
173
|
addressSubTitle: string;
|
|
161
174
|
info: string;
|
|
@@ -199,8 +212,48 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
199
212
|
};
|
|
200
213
|
};
|
|
201
214
|
"register-carrier": {
|
|
202
|
-
formTitle:
|
|
203
|
-
|
|
215
|
+
formTitle: {
|
|
216
|
+
default: string;
|
|
217
|
+
new: string;
|
|
218
|
+
edit: string;
|
|
219
|
+
};
|
|
220
|
+
notifications: {
|
|
221
|
+
error: {
|
|
222
|
+
title: string;
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
"rate-details": {
|
|
227
|
+
total: string;
|
|
228
|
+
subtotal: string;
|
|
229
|
+
registerVat: string;
|
|
230
|
+
concepts: {
|
|
231
|
+
confirmation: string;
|
|
232
|
+
uncategorized: string;
|
|
233
|
+
shipping: string;
|
|
234
|
+
insurance: string;
|
|
235
|
+
confirm: string;
|
|
236
|
+
discount: string;
|
|
237
|
+
fuel_charge: string;
|
|
238
|
+
additional_fees: string;
|
|
239
|
+
tariff: string;
|
|
240
|
+
tax: string;
|
|
241
|
+
delivery: string;
|
|
242
|
+
handling: string;
|
|
243
|
+
special_goods: string;
|
|
244
|
+
pickup: string;
|
|
245
|
+
location_fee: string;
|
|
246
|
+
oversize: string;
|
|
247
|
+
returns: string;
|
|
248
|
+
notifications: string;
|
|
249
|
+
tip: string;
|
|
250
|
+
duties_and_taxes: string;
|
|
251
|
+
brokerage_fee: string;
|
|
252
|
+
admin_fee: string;
|
|
253
|
+
adjustment: string;
|
|
254
|
+
auctane_service_fee: string;
|
|
255
|
+
product_price: string;
|
|
256
|
+
};
|
|
204
257
|
};
|
|
205
258
|
"purchase-label": {
|
|
206
259
|
title: string;
|
|
@@ -313,7 +366,10 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
313
366
|
today: string;
|
|
314
367
|
viewMap: string;
|
|
315
368
|
otherLocations: string;
|
|
316
|
-
|
|
369
|
+
noServicePointsForService: string;
|
|
370
|
+
error: string;
|
|
371
|
+
paperless: string;
|
|
372
|
+
localTimeDisclaimer: string;
|
|
317
373
|
};
|
|
318
374
|
shipToAddressFormFields: string;
|
|
319
375
|
sections: {
|
|
@@ -340,9 +396,6 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
340
396
|
messageLine2: string;
|
|
341
397
|
};
|
|
342
398
|
stepLabel: {
|
|
343
|
-
/**
|
|
344
|
-
* `features` is a set of feature flags you would like to enable or disable in this component.
|
|
345
|
-
*/
|
|
346
399
|
accountRegistration: string;
|
|
347
400
|
termsAgreement: string;
|
|
348
401
|
shipFromAddress: string;
|
|
@@ -820,6 +873,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
820
873
|
gram: string;
|
|
821
874
|
kilogram: string;
|
|
822
875
|
};
|
|
876
|
+
ZnVuZGluZ19zb3VyY2VfaWQgbXVzdCBiZSBhbiBpbnRlZ2Vy: string;
|
|
823
877
|
T25seSByZXNpZGVudGlhbCBkZWxpdmVyeSBhZGRyZXNzZXMgYXJlIGFsbG93ZWQgZm9yIFVQUyBHcm91bmQgU2F2ZXIu: string;
|
|
824
878
|
"VGhlIHNlbGVjdGVkIHNlcnZpY2UgaW5jbHVkZXMgaW5zdXJhbmNlIGZvciBhbiBpbnN1cmVkIGFtb3VudCB1cCB0byAkMTAwLgo=": string;
|
|
825
879
|
"VGhlIHNlbGVjdGVkIHNlcnZpY2UgaW5jbHVkZXMgaW5zdXJhbmNlIGZvciBhbiBpbnN1cmVkIGFtb3VudCB1cCB0byAkNTAuCg==": string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as CarrierServices from "./carrier-services";
|