@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.
Files changed (288) hide show
  1. package/README.md +0 -4
  2. package/actions-menu.js +34 -0
  3. package/assertions.js +1 -0
  4. package/carrier-logo.js +1 -0
  5. package/components.js +1 -1
  6. package/constants.js +1 -1
  7. package/elements.js +1 -1
  8. package/extensions.js +1 -1
  9. package/formatString.js +1 -0
  10. package/hooks.js +1 -1
  11. package/index.js +1 -1
  12. package/money.js +1 -0
  13. package/package.json +20 -46
  14. package/pudo.js +1 -0
  15. package/schemas.js +1 -1
  16. package/src/components/actions-menu/actions-menu.d.ts +19 -0
  17. package/src/components/actions-menu/index.d.ts +1 -0
  18. package/src/components/add-funds-form/add-funds-form.d.ts +1 -1
  19. package/src/components/auto-funding-form/auto-funding-form.d.ts +1 -1
  20. package/src/components/carrier-balance/carrier-balance.d.ts +1 -1
  21. package/src/components/collapsible-panel/collapsible-panel.d.ts +1 -1
  22. package/src/components/collapsible-panel/collapsible-panel.styles.d.ts +10 -13
  23. package/src/components/display-term/display-term.d.ts +1 -1
  24. package/src/components/edit-billing-form/edit-billing-form.d.ts +1 -1
  25. package/src/components/field/checkbox-input/checkbox-input.d.ts +1 -0
  26. package/src/components/field/money-input/money-input.d.ts +1 -1
  27. package/src/components/field/rate-card/cost-breakdown/cost-breakdown.d.ts +1 -1
  28. package/src/components/field/rate-card/rate-card.d.ts +1 -1
  29. package/src/components/field/rate-card/rate-card.styles.d.ts +0 -1
  30. package/src/components/field/rate-select/rate-select.d.ts +1 -1
  31. package/src/components/field/select/index.d.ts +1 -0
  32. package/src/components/field/select/select-with-categories.d.ts +20 -0
  33. package/src/components/field/select/select.d.ts +5 -10
  34. package/src/components/fund-and-purchase/fund-and-purchase.d.ts +1 -1
  35. package/src/components/history/history-card/history-card.d.ts +1 -1
  36. package/src/components/index.d.ts +1 -0
  37. package/src/components/items-breakdown/items-breakdown.d.ts +1 -1
  38. package/src/components/pager/pager.d.ts +1 -1
  39. package/src/components/rate-details/rate-details.d.ts +1 -1
  40. package/src/components/save-status/save-status.d.ts +1 -1
  41. package/src/components/service-points/service-points.d.ts +1 -1
  42. package/src/components/templates/address-display/address-display.d.ts +1 -1
  43. package/src/components/templates/address-preference-display/address-preference-display.d.ts +1 -1
  44. package/src/components/templates/address-preference-select/address-preference-select.d.ts +1 -1
  45. package/src/components/templates/connect-external-carrier-form/connect-external-carrier-form.d.ts +12 -0
  46. package/src/components/templates/connect-external-carrier-form/index.d.ts +1 -0
  47. package/src/components/templates/connected-carrier-list/connected-carrier-list.d.ts +4 -1
  48. package/src/components/templates/connected-carrier-list/connected-carrier-list.styles.d.ts +0 -10
  49. package/src/components/templates/connected-carrier-list/connected-carrier-row/connected-carrier-row.d.ts +4 -1
  50. package/src/components/templates/connected-carrier-list/connected-carrier-row/connected-carrier-row.styles.d.ts +19 -12
  51. package/src/components/templates/index.d.ts +1 -1
  52. package/src/components/templates/label/label.d.ts +1 -1
  53. package/src/components/templates/product-form/product-form.d.ts +1 -1
  54. package/src/components/templates/products-display/products-display.d.ts +1 -1
  55. package/src/components/templates/products-display/products-display.styles.d.ts +12 -4
  56. package/src/components/templates/rate-form/rate-form.d.ts +3 -4
  57. package/src/components/templates/shipment/shipment.d.ts +3 -11
  58. package/src/components/templates/shipment-form/sections/customs-forms/components/index.d.ts +2 -0
  59. package/src/components/templates/shipment-form/sections/customs-forms/components/tax-ids/form/index.d.ts +3 -0
  60. package/src/components/templates/shipment-form/sections/customs-forms/components/tax-ids/form/schema.d.ts +38 -0
  61. package/src/components/templates/shipment-form/sections/customs-forms/components/tax-ids/form/values.d.ts +12 -0
  62. package/src/components/templates/shipment-form/sections/customs-forms/components/tax-ids/index.d.ts +2 -0
  63. package/src/components/templates/shipment-form/sections/customs-forms/components/tax-ids/tax-id-form.d.ts +17 -0
  64. package/src/components/templates/shipment-form/sections/customs-forms/components/tax-ids/tax-id-list.d.ts +12 -0
  65. package/src/components/templates/shipment-form/sections/customs-forms/components/tax-ids/tax-ids.d.ts +8 -0
  66. package/src/components/templates/shipment-form/sections/customs-forms/components/tax-ids/tax-ids.styles.d.ts +70 -0
  67. package/src/components/templates/shipment-form/sections/customs-forms/customs-forms.d.ts +10 -0
  68. package/src/components/templates/shipment-form/sections/customs-forms/index.d.ts +1 -0
  69. package/src/components/templates/shipment-form/sections/index.d.ts +1 -0
  70. package/src/components/templates/shipment-form/shipment-form.d.ts +4 -10
  71. package/src/components/templates/shipment-form/shipment-form.styles.d.ts +9 -0
  72. package/src/components/templates/shipment-form/shipment-schema.d.ts +1 -1
  73. package/src/components/templates/suspend-sales-order/suspend-sales-order.d.ts +1 -1
  74. package/src/components/templates/suspend-shipment/suspend-shipment.d.ts +1 -1
  75. package/src/components/templates/wallet-form/edit-wallet-address-form.d.ts +1 -1
  76. package/src/components/templates/wallet-form/wallet-form.d.ts +2 -4
  77. package/src/components/templates/wallet-form/wallet-schema.d.ts +1 -1
  78. package/src/components/wallet-card/wallet-card.d.ts +1 -1
  79. package/src/components/warehouse-form/warehouse-form.d.ts +11 -4
  80. package/src/components/zero-state/zero-state.d.ts +6 -0
  81. package/src/components/zero-state/zero-state.styles.d.ts +14 -0
  82. package/src/create-element/create-element.d.ts +10 -0
  83. package/src/create-element/element/element.d.ts +16 -0
  84. package/src/create-element/element/hooks/index.d.ts +1 -0
  85. package/src/create-element/element/hooks/use-i18n.d.ts +12 -0
  86. package/src/create-element/element/index.d.ts +3 -0
  87. package/src/create-element/element/utils/get-emotion-cache.d.ts +2 -0
  88. package/src/create-element/element/utils/index.d.ts +1 -0
  89. package/src/create-element/error-boundary/error-boundary.d.ts +21 -0
  90. package/src/create-element/error-boundary/index.d.ts +1 -0
  91. package/src/create-element/index.d.ts +1 -0
  92. package/src/elements/index.d.ts +5 -4
  93. package/src/elements/label-layout/label-layout-element.d.ts +44 -2
  94. package/src/elements/labels-grid/labels-grid.d.ts +45 -3
  95. package/src/elements/manage-carriers/index.d.ts +1 -0
  96. package/src/elements/{shipengine-carriers/shipengine-carriers.d.ts → manage-carriers/manage-carriers.d.ts} +99 -52
  97. package/src/elements/manage-external-carriers/index.d.ts +1 -0
  98. package/src/elements/{external-carriers/external-carriers.d.ts → manage-external-carriers/manage-external-carriers.d.ts} +74 -63
  99. package/src/elements/manage-funding/manage-funding-element.d.ts +47 -4
  100. package/src/elements/manage-warehouses/manage-warehouses.d.ts +62 -3
  101. package/src/elements/payment-method-settings/payment-method-settings-element.d.ts +47 -4
  102. package/src/elements/purchase-label/configure-shipment.d.ts +4 -27
  103. package/src/elements/purchase-label/hooks/use-address.d.ts +1 -1
  104. package/src/elements/purchase-label/hooks/use-configure-shipment.d.ts +1 -1
  105. package/src/elements/purchase-label/hooks/use-customs.d.ts +2 -1
  106. package/src/elements/purchase-label/hooks/use-import-sales-order.d.ts +2 -2
  107. package/src/elements/purchase-label/hooks/use-load-shipment.d.ts +3 -3
  108. package/src/elements/purchase-label/hooks/use-pending-shipment.d.ts +1 -1
  109. package/src/elements/purchase-label/hooks/use-presets.d.ts +1 -1
  110. package/src/elements/purchase-label/hooks/use-rates-form.d.ts +1 -1
  111. package/src/elements/purchase-label/hooks/use-rates-with-cache.d.ts +1 -1
  112. package/src/elements/purchase-label/hooks/use-request-preferred-rates.d.ts +1 -1
  113. package/src/elements/purchase-label/hooks/use-request-rates.d.ts +1 -1
  114. package/src/elements/purchase-label/hooks/use-shipment-form.d.ts +2 -1
  115. package/src/elements/purchase-label/purchase-label-by-sales-order.d.ts +1 -1
  116. package/src/elements/purchase-label/purchase-label-by-shipment.d.ts +1 -1
  117. package/src/elements/purchase-label/purchase-label.d.ts +85 -44
  118. package/src/elements/shipment-summary/index.d.ts +1 -0
  119. package/src/elements/{view-shipment/view-shipment.d.ts → shipment-summary/shipment-summary.d.ts} +89 -60
  120. package/src/elements/shipments-grid/shipments-grid.d.ts +45 -3
  121. package/src/elements/theme-creator/theme-creator.d.ts +44 -2
  122. package/src/elements/transaction-history/index.d.ts +1 -0
  123. package/src/elements/{wallet-history/wallet-history-element.d.ts → transaction-history/transaction-history-element.d.ts} +44 -2
  124. package/src/elements/unit-settings/unit-settings-element.d.ts +44 -2
  125. package/src/elements/vat-settings/vat-settings-element.d.ts +44 -2
  126. package/src/elements/void-label/components/actions/actions.d.ts +1 -1
  127. package/src/elements/void-label/components/message/message.d.ts +1 -1
  128. package/src/elements/void-label/void-label.d.ts +83 -52
  129. package/src/elements-provider/elements-context-provider.d.ts +44 -0
  130. package/src/elements-provider/elements-provider.d.ts +12 -0
  131. package/src/elements-provider/elements-test-provider.d.ts +3 -0
  132. package/src/elements-provider/hooks/index.d.ts +1 -0
  133. package/src/elements-provider/hooks/use-load-icons.d.ts +7 -0
  134. package/src/elements-provider/index.d.ts +3 -0
  135. package/src/factories/shipengine/address.d.ts +1 -1
  136. package/src/factories/shipengine/carrier.d.ts +1 -1
  137. package/src/factories/shipengine/index.d.ts +1 -1
  138. package/src/factories/shipengine/label.d.ts +1 -1
  139. package/src/factories/shipengine/money.d.ts +1 -1
  140. package/src/factories/shipengine/order-source.d.ts +1 -1
  141. package/src/factories/shipengine/package.d.ts +1 -1
  142. package/src/factories/shipengine/resource.d.ts +1 -1
  143. package/src/factories/shipengine/sales-order.d.ts +1 -1
  144. package/src/factories/shipengine/service-point.d.ts +1 -1
  145. package/src/factories/shipengine/service.d.ts +1 -1
  146. package/src/factories/shipengine/shipment.d.ts +1 -1
  147. package/src/factories/shipengine/{wallet-history.d.ts → transaction-history.d.ts} +1 -1
  148. package/src/factories/shipengine/warehouse.d.ts +1 -1
  149. package/src/factories/shipengine/weight.d.ts +1 -1
  150. package/src/features/index.d.ts +3 -3
  151. package/src/features/label-layout/label-layout.d.ts +1 -1
  152. package/src/features/label-layout/use-label-layout.d.ts +1 -1
  153. package/src/features/{shipengine-carriers → manage-carriers}/hooks/use-list-funding-source-carriers.d.ts +3 -3
  154. package/src/features/manage-carriers/index.d.ts +1 -0
  155. package/src/features/manage-carriers/manage-carriers-row/index.d.ts +1 -0
  156. 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
  157. package/src/features/manage-carriers/manage-carriers.d.ts +5 -0
  158. package/src/features/manage-external-carriers/index.d.ts +2 -0
  159. package/src/features/manage-external-carriers/manage-external-carriers.d.ts +14 -0
  160. package/src/features/manage-external-carriers/use-manage-external-carriers.d.ts +12 -0
  161. package/src/features/manage-funding/manage-funding.d.ts +4 -1
  162. package/src/features/manage-warehouses/manage-warehouses.d.ts +1 -1
  163. package/src/features/manage-warehouses/use-manage-warehouses.d.ts +9 -9
  164. package/src/features/manage-warehouses/warehouse-display/warehouse-display.d.ts +1 -1
  165. package/src/features/payment-method-settings/payment-method-settings.d.ts +4 -1
  166. package/src/features/transaction-history/index.d.ts +1 -0
  167. package/src/features/transaction-history/transaction-history.d.ts +6 -0
  168. package/src/features/unit-settings/unit-settings.d.ts +1 -1
  169. package/src/features/unit-settings/use-unit-settings.d.ts +1 -1
  170. package/src/features/vat-settings/use-vat-settings.d.ts +5 -5
  171. package/src/hooks/here-map/init.d.ts +1 -1
  172. package/src/hooks/options/use-confirmation-options.d.ts +1 -1
  173. package/src/hooks/options/use-customs-contents-options.d.ts +1 -1
  174. package/src/hooks/options/use-customs-non-delivery-options.d.ts +1 -1
  175. package/src/hooks/options/use-insurance-provider-options.d.ts +1 -1
  176. package/src/hooks/options/use-package-options.d.ts +2 -2
  177. package/src/hooks/options/use-rate-options.d.ts +1 -1
  178. package/src/hooks/options/use-service-code-options.d.ts +1 -1
  179. package/src/hooks/options/use-service-points.d.ts +1 -1
  180. package/src/hooks/options/use-shipment-metadata.d.ts +1 -1
  181. package/src/hooks/options/use-shipping-presets-options.d.ts +1 -1
  182. package/src/hooks/options/use-warehouse-options.d.ts +4 -2
  183. package/src/hooks/use-address-validation.d.ts +1 -1
  184. package/src/hooks/use-get-or-create-shipment.d.ts +3 -3
  185. package/src/hooks/use-scrub-errors.d.ts +1 -1
  186. package/src/index.d.ts +2 -0
  187. package/src/locales/en/index.d.ts +44 -2
  188. package/src/mocks/carriers/handlers.d.ts +1 -1
  189. package/src/mocks/warehouses/handlers.d.ts +1 -1
  190. package/src/schemas/shipengine/money.d.ts +1 -1
  191. package/src/testing/test-utils.d.ts +7 -2
  192. package/src/themes/fallback.d.ts +3 -0
  193. package/src/themes/index.d.ts +4 -0
  194. package/src/types/carrier-metadata.d.ts +1 -1
  195. package/src/types/preferred-rates.d.ts +1 -1
  196. package/src/types/shipping-preset/shipping-preset.d.ts +1 -1
  197. package/src/utilities/error.d.ts +1 -1
  198. package/src/utilities/feature-flags/feature-flags.d.ts +18 -0
  199. package/src/utilities/feature-flags/index.d.ts +2 -0
  200. package/src/utilities/feature-flags/types.d.ts +141 -0
  201. package/src/utilities/formatString.d.ts +2 -0
  202. package/src/utilities/index.d.ts +1 -0
  203. package/src/utilities/money.d.ts +1 -1
  204. package/src/utilities/pudo.d.ts +3 -0
  205. package/src/utilities/rates.d.ts +1 -3
  206. package/src/utilities/shipengine/address.d.ts +1 -1
  207. package/src/utilities/shipengine/carrier.d.ts +4 -1
  208. package/src/utilities/shipengine/dimensions.d.ts +1 -1
  209. package/src/utilities/shipengine/sales-order.d.ts +1 -1
  210. package/src/utilities/shipengine/shipment.d.ts +1 -1
  211. package/src/utilities/shipengine/warehouses.d.ts +1 -1
  212. package/src/utilities/shipengine/weight.d.ts +1 -1
  213. package/src/workflows/account-settings/account-settings.d.ts +52 -16
  214. package/src/workflows/account-settings/use-get-panel-props.d.ts +3 -3
  215. package/src/workflows/{manage-wallet-workflow/manage-wallet-workflow.d.ts → carrier-services/carrier-services.d.ts} +55 -25
  216. package/src/workflows/carrier-services/index.d.ts +1 -0
  217. package/src/workflows/{connect-carrier/connect-carrier.d.ts → connect-external-carrier/connect-external-carrier.d.ts} +52 -37
  218. package/src/workflows/connect-external-carrier/index.d.ts +1 -0
  219. package/src/workflows/index.d.ts +3 -2
  220. package/src/workflows/label-workflow/index.d.ts +1 -0
  221. package/src/workflows/{purchase-label-workflow/purchase-label-workflow.d.ts → label-workflow/label-workflow.d.ts} +16 -34
  222. package/src/workflows/onboarding/components/carrier-recovery-form/carrier-recovery-form.d.ts +1 -1
  223. package/src/workflows/onboarding/components/funding-and-carrier-connection-step/funding-and-carrier-connection-step.d.ts +2 -4
  224. package/src/workflows/onboarding/components/funding-and-carrier-connection-step/use-funding-and-carrier-connection-step.d.ts +1 -1
  225. package/src/workflows/onboarding/components/onboarding-wizard/onboarding-wizard.d.ts +2 -9
  226. package/src/workflows/onboarding/components/ship-from-address-step/ship-from-address-step.d.ts +1 -1
  227. package/src/workflows/onboarding/components/ship-from-address-step/use-ship-from-address-step.d.ts +1 -1
  228. package/src/workflows/onboarding/components/terms-agreement-form/terms-agreement-form.d.ts +3 -2
  229. package/src/workflows/onboarding/components/terms-agreement-step/terms-agreement-step.d.ts +1 -1
  230. package/src/workflows/onboarding/components/terms-agreement-step/use-terms-agreement-step.d.ts +1 -1
  231. package/src/workflows/onboarding/onboarding.d.ts +65 -71
  232. package/story-notes.js +1 -0
  233. package/suspend-text.js +1 -0
  234. package/transaction-history-element.js +1 -0
  235. package/use-page-layout.js +1 -0
  236. package/use-scrub-errors.js +1 -0
  237. package/use-toggle.js +1 -0
  238. package/use-unit-settings.js +1 -0
  239. package/utilities.js +1 -1
  240. package/validation.js +1 -0
  241. package/wallet-form.js +1 -0
  242. package/warehouses.js +1 -0
  243. package/workflows.js +1 -1
  244. package/carrier-2abb4760.js +0 -1
  245. package/carrier-logo-1b6c767e.js +0 -1
  246. package/feature-flags-3e03717c.js +0 -1
  247. package/formatString-413ec7c7.js +0 -1
  248. package/money-fbc4d0b3.js +0 -1
  249. package/payment-method-settings-element-595cc38d.js +0 -1
  250. package/shipment-90d35708.js +0 -1
  251. package/src/components/templates/connect-carrier-form/connect-carrier-form.d.ts +0 -12
  252. package/src/components/templates/connect-carrier-form/index.d.ts +0 -1
  253. package/src/elements/external-carriers/index.d.ts +0 -1
  254. package/src/elements/shipengine-carriers/index.d.ts +0 -1
  255. package/src/elements/view-shipment/index.d.ts +0 -1
  256. package/src/elements/wallet-history/index.d.ts +0 -1
  257. package/src/features/external-carriers/external-carriers.d.ts +0 -11
  258. package/src/features/external-carriers/index.d.ts +0 -1
  259. package/src/features/shipengine-carriers/index.d.ts +0 -1
  260. package/src/features/shipengine-carriers/shipengine-carriers-row/index.d.ts +0 -1
  261. package/src/features/shipengine-carriers/shipengine-carriers.d.ts +0 -10
  262. package/src/features/wallet-history/index.d.ts +0 -1
  263. package/src/features/wallet-history/wallet-history.d.ts +0 -6
  264. package/src/hooks/use-elements.d.ts +0 -35
  265. package/src/utilities/feature-flags.d.ts +0 -232
  266. package/src/workflows/connect-carrier/index.d.ts +0 -1
  267. package/src/workflows/manage-wallet-workflow/index.d.ts +0 -1
  268. package/src/workflows/purchase-label-workflow/index.d.ts +0 -1
  269. package/story-notes-ce2d8cca.js +0 -1
  270. package/suspend-text-c8c7b6b6.js +0 -1
  271. package/use-page-layout-93ffae78.js +0 -1
  272. package/use-scrub-errors-2c4db406.js +0 -1
  273. package/use-toggle-838d2ebd.js +0 -1
  274. package/validation-b941a548.js +0 -1
  275. package/wallet-form-3981400b.js +0 -1
  276. package/wallet-history-5b34c856.js +0 -1
  277. package/warehouse-form-c0b3ea78.js +0 -34
  278. package/warehouses-dfcdce23.js +0 -1
  279. /package/{address-8f8119f4.js → address.js} +0 -0
  280. /package/{phone-87dd7bd8.js → phone.js} +0 -0
  281. /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
  282. /package/src/features/{shipengine-carriers → manage-carriers}/hooks/index.d.ts +0 -0
  283. /package/src/features/{shipengine-carriers → manage-carriers}/hooks/use-carrier-metadata.d.ts +0 -0
  284. /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
  285. /package/src/features/{shipengine-carriers/shipengine-carriers.styles.d.ts → manage-carriers/manage-carriers.styles.d.ts} +0 -0
  286. /package/src/features/{wallet-history/wallet-history.styles.d.ts → transaction-history/transaction-history.styles.d.ts} +0 -0
  287. /package/src/workflows/{manage-wallet-workflow → carrier-services}/use-get-wallet-panel-props.d.ts +0 -0
  288. /package/{zod-60def96c.js → zod.js} +0 -0
@@ -1,38 +1,15 @@
1
- import { SE } from "@shipengine/alchemy";
1
+ import { SE } from "@shipengine/react-api";
2
2
  import { RateFormProps } from "../../components/templates/rate-form";
3
- import { ShipmentFormFeatures, ShipmentFormProps } from "../../components/templates/shipment-form";
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?: ConfigureShipmentFeatures & VatSettingsFeatures;
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/alchemy";
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/alchemy";
1
+ import { SE } from "@shipengine/react-api";
2
2
  import { ConfigureShipmentProps } from "../configure-shipment";
3
3
  import { UsePendingShipmentProps } from "./use-pending-shipment";
4
4
  export type UseConfigureShipmentProps = {
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/alchemy";
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/alchemy").CodedError[] | undefined;
8
+ errors: import("@shipengine/react-api").CodedError[] | undefined;
9
9
  isLoading: boolean;
10
- salesOrder: import("@shipengine/alchemy").SalesOrder | undefined;
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/alchemy").CodedError[] | undefined;
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/alchemy").SalesOrderShipment, import("@shipengine/alchemy").CodedError[]>>;
8
- shipment: import("@shipengine/alchemy").SalesOrderShipment | undefined;
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/alchemy";
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/alchemy";
1
+ import { SE } from "@shipengine/react-api";
2
2
  import { ShippingPreset } from "../../../types";
3
3
  export type UsePresetsProps = {
4
4
  onApply?: (preset: ShippingPreset, shipment: SE.SalesOrderShipment) => Promise<void> | void;
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/alchemy";
1
+ import { SE } from "@shipengine/react-api";
2
2
  import { UseRatesWithCacheProps } from "./use-rates-with-cache";
3
3
  export type UseRatesFormProps = {
4
4
  getPreferredRates?: UseRatesWithCacheProps["getPreferredRates"];
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/alchemy";
1
+ import { SE } from "@shipengine/react-api";
2
2
  import { UseRequestRatesProps } from "./use-request-rates";
3
3
  export type UseRatesWithCacheProps = {
4
4
  getPreferredRates?: UseRequestRatesProps["getPreferredRates"];
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/alchemy";
1
+ import { SE } from "@shipengine/react-api";
2
2
  import { UseRequestRatesProps } from "./use-request-rates";
3
3
  export type RequestPreferredRatesProps = {
4
4
  getPreferredRates?: UseRequestRatesProps["getPreferredRates"];
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/alchemy";
1
+ import { SE } from "@shipengine/react-api";
2
2
  import { PreferredRatesResponse } from "../../../types";
3
3
  import { ConfigureShipmentProps } from "../configure-shipment";
4
4
  export type UseRequestRatesProps = {
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/alchemy";
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/alchemy";
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,4 +1,4 @@
1
- import { SE } from "@shipengine/alchemy";
1
+ import { SE } from "@shipengine/react-api";
2
2
  import { PurchaseLabelCommonProps } from "./purchase-label";
3
3
  export type PurchaseLabelByShipmentProps = PurchaseLabelCommonProps & {
4
4
  currency?: SE.Currency;
@@ -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?: ConfigureShipmentProps["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 = alchemy.createElement(Component, ErrorFallback, {
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 `<ViewShipment.Element />` Element in order to view
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 ViewShipment.Element | The next step in the label purchase workflow `<ViewShipment.Element />`}
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
- "shipengine-carriers": {
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
- noFundingSources: string;
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";