@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.
Files changed (281) hide show
  1. package/README.md +0 -4
  2. package/address-8f8119f4.js +1 -0
  3. package/assertions-dfa95b4d.js +1 -0
  4. package/carrier-c2a5ed53.js +1 -0
  5. package/carrier-logo-330e926f.js +1 -0
  6. package/components.js +1 -0
  7. package/constants.js +1 -0
  8. package/elements.js +1 -0
  9. package/extensions.js +1 -0
  10. package/formatString-413ec7c7.js +1 -0
  11. package/hooks.js +1 -0
  12. package/index.js +1 -25578
  13. package/money-d4f3d7c3.js +1 -0
  14. package/package.json +53 -7
  15. package/phone-87dd7bd8.js +1 -0
  16. package/schemas.js +1 -0
  17. package/shipment-150160e0.js +1 -0
  18. package/src/components/add-funds-form/add-funds-form.d.ts +1 -1
  19. package/src/components/address-preference-context/address-preference-context.d.ts +5 -2
  20. package/src/components/auto-funding-form/auto-funding-form.d.ts +1 -1
  21. package/src/components/carrier-balance/carrier-balance.d.ts +1 -1
  22. package/src/components/carrier-icon/carrier-icon.d.ts +9 -9
  23. package/src/components/carrier-logo/carrier-logo.d.ts +2 -1
  24. package/src/components/collapsible-panel/collapsible-panel.d.ts +1 -1
  25. package/src/components/display-term/display-term.d.ts +1 -1
  26. package/src/components/edit-billing-form/edit-billing-form.d.ts +1 -1
  27. package/src/components/field/date-picker/date-picker.d.ts +1 -1
  28. package/src/components/field/money-input/money-input.d.ts +1 -1
  29. package/src/components/field/rate-card/cost-breakdown/cost-breakdown.d.ts +1 -1
  30. package/src/components/field/rate-card/rate-card.d.ts +3 -2
  31. package/src/components/field/rate-card/rate-card.styles.d.ts +0 -1
  32. package/src/components/field/rate-select/rate-select.d.ts +7 -2
  33. package/src/components/fund-and-purchase/fund-and-purchase.d.ts +5 -2
  34. package/src/components/here-map/here-map.d.ts +16 -0
  35. package/src/components/here-map/here-map.styles.d.ts +23 -0
  36. package/src/components/history/history-card/history-card.d.ts +1 -1
  37. package/src/components/index.d.ts +1 -0
  38. package/src/components/items-breakdown/items-breakdown.d.ts +1 -1
  39. package/src/components/modal/modal.d.ts +2 -1
  40. package/src/components/pager/pager.d.ts +1 -1
  41. package/src/components/rate-details/index.d.ts +1 -0
  42. package/src/components/rate-details/rate-details.d.ts +17 -0
  43. package/src/components/rate-details/rate-details.styles.d.ts +23 -0
  44. package/src/components/save-status/save-status.d.ts +1 -1
  45. package/src/components/search-bar/index.d.ts +1 -0
  46. package/src/components/search-bar/search-bar.d.ts +8 -0
  47. package/src/components/service-point-display/operating-hours.d.ts +6 -0
  48. package/src/components/service-point-display/operating-hours.styles.d.ts +44 -0
  49. package/src/components/service-point-display/service-point-display.d.ts +6 -6
  50. package/src/components/service-point-display/service-point-display.styles.d.ts +13 -19
  51. package/src/components/service-points/service-points.d.ts +3 -2
  52. package/src/components/tabs/tabs.d.ts +5 -1
  53. package/src/components/tabs/tabs.styles.d.ts +3 -2
  54. package/src/components/templates/address-display/address-display.d.ts +1 -1
  55. package/src/components/templates/address-preference-display/address-preference-display.d.ts +1 -1
  56. package/src/components/templates/address-preference-select/address-preference-select.d.ts +1 -1
  57. package/src/components/templates/connect-external-carrier-form/connect-external-carrier-form.d.ts +12 -0
  58. package/src/components/templates/connect-external-carrier-form/index.d.ts +1 -0
  59. package/src/components/templates/index.d.ts +2 -2
  60. package/src/components/templates/label/label.d.ts +1 -1
  61. package/src/components/templates/label/label.styles.d.ts +21 -1
  62. package/src/components/templates/product-form/product-form-schema.d.ts +12 -0
  63. package/src/components/templates/product-form/product-form.d.ts +1 -1
  64. package/src/components/templates/products-display/products-display.d.ts +1 -1
  65. package/src/components/templates/pudo-rate-tabs/index.d.ts +0 -1
  66. package/src/components/templates/pudo-rate-tabs/pudo-list-view/pudo-list-view.d.ts +5 -0
  67. package/src/components/templates/pudo-rate-tabs/pudo-map-view/pudo-map-view.d.ts +15 -0
  68. package/src/components/templates/pudo-rate-tabs/pudo-rate-tabs.d.ts +17 -15
  69. package/src/components/templates/rate-form/rate-form.d.ts +11 -4
  70. package/src/components/templates/register-funding-source-carrier-form/index.d.ts +2 -0
  71. package/src/components/templates/register-funding-source-carrier-form/register-funding-source-carrier-form.d.ts +13 -0
  72. package/src/components/templates/register-funding-source-carrier-form/register-funding-source-carrier-form.styles.d.ts +25 -0
  73. 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
  74. package/src/components/templates/shipment/shipment.d.ts +3 -10
  75. package/src/components/templates/shipment-form/shipment-form.d.ts +2 -9
  76. package/src/components/templates/shipment-form/shipment-schema.d.ts +1 -1
  77. package/src/components/templates/suspend-sales-order/suspend-sales-order.d.ts +1 -1
  78. package/src/components/templates/suspend-shipment/suspend-shipment.d.ts +1 -1
  79. package/src/components/templates/wallet-form/edit-wallet-address-form.d.ts +1 -1
  80. package/src/components/templates/wallet-form/wallet-form.d.ts +2 -4
  81. package/src/components/templates/wallet-form/wallet-schema.d.ts +1 -1
  82. package/src/components/wallet-card/wallet-card.d.ts +1 -1
  83. package/src/components/warehouse-form/warehouse-form.d.ts +1 -1
  84. package/src/create-element/create-element.d.ts +10 -0
  85. package/src/create-element/element/element.d.ts +16 -0
  86. package/src/create-element/element/hooks/index.d.ts +1 -0
  87. package/src/create-element/element/hooks/use-i18n.d.ts +12 -0
  88. package/src/create-element/element/index.d.ts +3 -0
  89. package/src/create-element/element/utils/get-emotion-cache.d.ts +2 -0
  90. package/src/create-element/element/utils/index.d.ts +1 -0
  91. package/src/create-element/error-boundary/error-boundary.d.ts +21 -0
  92. package/src/create-element/error-boundary/index.d.ts +1 -0
  93. package/src/create-element/index.d.ts +1 -0
  94. package/src/elements/index.d.ts +5 -4
  95. package/src/elements/label-layout/label-layout-element.d.ts +50 -4
  96. package/src/elements/labels-grid/labels-grid.d.ts +51 -5
  97. package/src/elements/manage-carriers/index.d.ts +1 -0
  98. package/src/elements/{shipengine-carriers/shipengine-carriers.d.ts → manage-carriers/manage-carriers.d.ts} +101 -49
  99. package/src/elements/manage-external-carriers/index.d.ts +1 -0
  100. package/src/elements/{external-carriers/external-carriers.d.ts → manage-external-carriers/manage-external-carriers.d.ts} +58 -41
  101. package/src/elements/manage-funding/manage-funding-element.d.ts +50 -4
  102. package/src/elements/manage-warehouses/manage-warehouses.d.ts +68 -5
  103. package/src/elements/payment-method-settings/payment-method-settings-element.d.ts +50 -4
  104. package/src/elements/purchase-label/configure-shipment.d.ts +4 -26
  105. package/src/elements/purchase-label/hooks/use-address.d.ts +1 -1
  106. package/src/elements/purchase-label/hooks/use-configure-shipment.d.ts +1 -1
  107. package/src/elements/purchase-label/hooks/use-customs.d.ts +1 -1
  108. package/src/elements/purchase-label/hooks/use-import-sales-order.d.ts +2 -2
  109. package/src/elements/purchase-label/hooks/use-load-shipment.d.ts +3 -3
  110. package/src/elements/purchase-label/hooks/use-pending-shipment.d.ts +1 -1
  111. package/src/elements/purchase-label/hooks/use-presets.d.ts +1 -1
  112. package/src/elements/purchase-label/hooks/use-rates-form.d.ts +6 -1
  113. package/src/elements/purchase-label/hooks/use-rates-with-cache.d.ts +1 -1
  114. package/src/elements/purchase-label/hooks/use-request-preferred-rates.d.ts +1 -1
  115. package/src/elements/purchase-label/hooks/use-request-rates.d.ts +1 -1
  116. package/src/elements/purchase-label/hooks/use-shipment-form.d.ts +1 -1
  117. package/src/elements/purchase-label/purchase-label-by-sales-order.d.ts +1 -1
  118. package/src/elements/purchase-label/purchase-label-by-shipment.d.ts +1 -1
  119. package/src/elements/purchase-label/purchase-label.d.ts +67 -44
  120. package/src/elements/shipment-summary/index.d.ts +1 -0
  121. package/src/elements/{view-shipment/view-shipment.d.ts → shipment-summary/shipment-summary.d.ts} +87 -51
  122. package/src/elements/shipments-grid/shipments-grid.d.ts +51 -5
  123. package/src/elements/theme-creator/theme-creator.d.ts +50 -4
  124. package/src/elements/theme-creator/themeData/themeData.d.ts +0 -1
  125. package/src/elements/transaction-history/index.d.ts +1 -0
  126. package/src/elements/{wallet-history/wallet-history-element.d.ts → transaction-history/transaction-history-element.d.ts} +50 -4
  127. package/src/elements/unit-settings/unit-settings-element.d.ts +50 -4
  128. package/src/elements/vat-settings/vat-settings-element.d.ts +50 -4
  129. package/src/elements/void-label/components/actions/actions.d.ts +4 -4
  130. package/src/elements/void-label/components/message/message.d.ts +1 -1
  131. package/src/elements/void-label/void-label.d.ts +80 -45
  132. package/src/elements-provider/elements-provider.d.ts +46 -0
  133. package/src/elements-provider/elements-test-provider.d.ts +3 -0
  134. package/src/elements-provider/hooks/index.d.ts +1 -0
  135. package/src/elements-provider/hooks/use-load-icons.d.ts +7 -0
  136. package/src/elements-provider/index.d.ts +1 -0
  137. package/src/factories/shipengine/address.d.ts +1 -1
  138. package/src/factories/shipengine/carrier.d.ts +1 -1
  139. package/src/factories/shipengine/index.d.ts +1 -1
  140. package/src/factories/shipengine/label.d.ts +3 -1
  141. package/src/factories/shipengine/money.d.ts +1 -1
  142. package/src/factories/shipengine/order-source.d.ts +1 -1
  143. package/src/factories/shipengine/package.d.ts +1 -1
  144. package/src/factories/shipengine/resource.d.ts +1 -1
  145. package/src/factories/shipengine/sales-order.d.ts +1 -1
  146. package/src/factories/shipengine/service-point.d.ts +1 -1
  147. package/src/factories/shipengine/service.d.ts +1 -1
  148. package/src/factories/shipengine/shipment.d.ts +1 -1
  149. package/src/factories/shipengine/{wallet-history.d.ts → transaction-history.d.ts} +1 -1
  150. package/src/factories/shipengine/warehouse.d.ts +1 -1
  151. package/src/factories/shipengine/weight.d.ts +1 -1
  152. package/src/features/index.d.ts +3 -3
  153. package/src/features/label-layout/label-layout.d.ts +1 -1
  154. package/src/features/label-layout/use-label-layout.d.ts +1 -1
  155. package/src/features/manage-carriers/hooks/index.d.ts +3 -0
  156. package/src/features/manage-carriers/hooks/use-carrier-metadata.d.ts +2 -0
  157. package/src/features/manage-carriers/hooks/use-list-funding-source-carriers.d.ts +11 -0
  158. package/src/features/manage-carriers/index.d.ts +1 -0
  159. package/src/features/manage-carriers/manage-carriers-row/index.d.ts +1 -0
  160. package/src/features/manage-carriers/manage-carriers-row/manage-carriers-row.d.ts +11 -0
  161. package/src/features/manage-carriers/manage-carriers.d.ts +4 -0
  162. package/src/features/manage-external-carriers/index.d.ts +1 -0
  163. package/src/features/manage-external-carriers/manage-external-carriers.d.ts +4 -0
  164. package/src/features/manage-warehouses/manage-warehouses.d.ts +1 -1
  165. package/src/features/manage-warehouses/use-manage-warehouses.d.ts +9 -9
  166. package/src/features/manage-warehouses/warehouse-display/warehouse-display.d.ts +1 -1
  167. package/src/features/transaction-history/index.d.ts +1 -0
  168. package/src/features/transaction-history/transaction-history.d.ts +6 -0
  169. package/src/features/unit-settings/unit-settings.d.ts +1 -1
  170. package/src/features/unit-settings/use-unit-settings.d.ts +1 -1
  171. package/src/features/vat-settings/use-vat-settings.d.ts +5 -5
  172. package/src/hooks/here-map/init.d.ts +6 -0
  173. package/src/hooks/here-map/use-here-map-ui.d.ts +10 -0
  174. package/src/hooks/here-map/use-here-map.d.ts +5 -0
  175. package/src/hooks/options/use-confirmation-options.d.ts +1 -1
  176. package/src/hooks/options/use-customs-contents-options.d.ts +1 -1
  177. package/src/hooks/options/use-customs-non-delivery-options.d.ts +1 -1
  178. package/src/hooks/options/use-insurance-provider-options.d.ts +1 -1
  179. package/src/hooks/options/use-package-options.d.ts +1 -1
  180. package/src/hooks/options/use-rate-options.d.ts +1 -1
  181. package/src/hooks/options/use-service-code-options.d.ts +1 -1
  182. package/src/hooks/options/use-service-points.d.ts +5 -3
  183. package/src/hooks/options/use-shipment-metadata.d.ts +1 -1
  184. package/src/hooks/options/use-shipping-presets-options.d.ts +1 -1
  185. package/src/hooks/options/use-warehouse-options.d.ts +1 -1
  186. package/src/hooks/use-address-validation.d.ts +1 -1
  187. package/src/hooks/use-get-or-create-shipment.d.ts +3 -3
  188. package/src/hooks/use-scrub-errors.d.ts +1 -1
  189. package/src/index.d.ts +1 -0
  190. package/src/locales/en/index.d.ts +50 -4
  191. package/src/mocks/carriers/handlers.d.ts +1 -1
  192. package/src/mocks/warehouses/handlers.d.ts +1 -1
  193. package/src/schemas/shipengine/money.d.ts +1 -1
  194. package/src/testing/test-utils.d.ts +8 -1
  195. package/src/themes/fallback.d.ts +3 -0
  196. package/src/themes/index.d.ts +4 -0
  197. package/src/types/carrier-metadata.d.ts +7 -11
  198. package/src/types/index.d.ts +0 -1
  199. package/src/types/preferred-rates.d.ts +1 -1
  200. package/src/types/shipping-preset/shipping-preset.d.ts +1 -1
  201. package/src/utilities/date.d.ts +1 -2
  202. package/src/utilities/error.d.ts +1 -1
  203. package/src/utilities/feature-flags/feature-flags.d.ts +18 -0
  204. package/src/utilities/feature-flags/index.d.ts +2 -0
  205. package/src/utilities/feature-flags/types.d.ts +141 -0
  206. package/src/utilities/money.d.ts +1 -1
  207. package/src/utilities/rates.d.ts +1 -1
  208. package/src/utilities/shipengine/address.d.ts +1 -1
  209. package/src/utilities/shipengine/carrier.d.ts +9 -1
  210. package/src/utilities/shipengine/dimensions.d.ts +1 -1
  211. package/src/utilities/shipengine/sales-order.d.ts +1 -1
  212. package/src/utilities/shipengine/shipment.d.ts +1 -1
  213. package/src/utilities/shipengine/warehouses.d.ts +1 -1
  214. package/src/utilities/shipengine/weight.d.ts +1 -1
  215. package/src/workflows/account-settings/account-settings.d.ts +56 -17
  216. package/src/workflows/{manage-wallet-workflow/manage-wallet-workflow.d.ts → carrier-services/carrier-services.d.ts} +79 -25
  217. package/src/workflows/carrier-services/index.d.ts +1 -0
  218. package/src/workflows/{connect-carrier/connect-carrier.d.ts → connect-external-carrier/connect-external-carrier.d.ts} +58 -39
  219. package/src/workflows/connect-external-carrier/index.d.ts +1 -0
  220. package/src/workflows/index.d.ts +3 -2
  221. package/src/workflows/label-workflow/index.d.ts +1 -0
  222. package/src/workflows/{purchase-label-workflow/purchase-label-workflow.d.ts → label-workflow/label-workflow.d.ts} +16 -34
  223. package/src/workflows/onboarding/components/carrier-recovery-form/carrier-recovery-form.d.ts +4 -5
  224. package/src/workflows/onboarding/components/funding-and-carrier-connection-step/funding-and-carrier-connection-step.d.ts +2 -4
  225. package/src/workflows/onboarding/components/funding-and-carrier-connection-step/use-funding-and-carrier-connection-step.d.ts +2 -3
  226. package/src/workflows/onboarding/components/onboarding-wizard/onboarding-wizard.d.ts +2 -9
  227. package/src/workflows/onboarding/components/ship-from-address-step/ship-from-address-step.d.ts +1 -1
  228. package/src/workflows/onboarding/components/ship-from-address-step/use-ship-from-address-step.d.ts +1 -1
  229. package/src/workflows/onboarding/components/terms-agreement-form/terms-agreement-form.d.ts +1 -1
  230. package/src/workflows/onboarding/components/terms-agreement-step/terms-agreement-step.d.ts +1 -1
  231. package/src/workflows/onboarding/components/terms-agreement-step/use-terms-agreement-step.d.ts +2 -7
  232. package/src/workflows/onboarding/onboarding.d.ts +71 -73
  233. package/story-notes-c714d2ed.js +1 -0
  234. package/suspend-text-cad3a977.js +1 -0
  235. package/transaction-history-element-cbfe487c.js +1 -0
  236. package/types.js +1 -0
  237. package/use-page-layout-8cb5075f.js +1 -0
  238. package/use-scrub-errors-9870a6f3.js +1 -0
  239. package/use-toggle-866d7938.js +1 -0
  240. package/use-unit-settings-a5bae16e.js +1 -0
  241. package/utilities.js +1 -0
  242. package/validation-528e7834.js +1 -0
  243. package/wallet-form-9e4bfaea.js +1 -0
  244. package/warehouse-form-da6a7ac5.js +34 -0
  245. package/warehouses-a83188ab.js +1 -0
  246. package/workflows.js +1 -0
  247. package/zod-60def96c.js +1 -0
  248. package/index.cjs +0 -25795
  249. package/src/components/templates/add-carrier-form/add-carrier-form-test.d.ts +0 -1
  250. package/src/components/templates/add-carrier-form/add-carrier-form.d.ts +0 -10
  251. package/src/components/templates/add-carrier-form/index.d.ts +0 -2
  252. package/src/components/templates/connect-carrier-form/connect-carrier-form.d.ts +0 -12
  253. package/src/components/templates/connect-carrier-form/index.d.ts +0 -1
  254. package/src/components/templates/pudo-rate-tabs/service-points-search-bar/index.d.ts +0 -1
  255. package/src/components/templates/pudo-rate-tabs/service-points-search-bar/service-points-search-bar.d.ts +0 -6
  256. package/src/elements/external-carriers/index.d.ts +0 -1
  257. package/src/elements/shipengine-carriers/index.d.ts +0 -1
  258. package/src/elements/view-shipment/index.d.ts +0 -1
  259. package/src/elements/wallet-history/index.d.ts +0 -1
  260. package/src/features/external-carriers/external-carriers.d.ts +0 -10
  261. package/src/features/external-carriers/index.d.ts +0 -1
  262. package/src/features/shipengine-carriers/hooks/index.d.ts +0 -2
  263. package/src/features/shipengine-carriers/hooks/use-carrier-metadata.d.ts +0 -13
  264. package/src/features/shipengine-carriers/hooks/use-list-connected-carriers.d.ts +0 -11
  265. package/src/features/shipengine-carriers/index.d.ts +0 -1
  266. package/src/features/shipengine-carriers/shipengine-carriers-row/index.d.ts +0 -1
  267. package/src/features/shipengine-carriers/shipengine-carriers-row/shipengine-carriers-row.d.ts +0 -9
  268. package/src/features/shipengine-carriers/shipengine-carriers.d.ts +0 -10
  269. package/src/features/wallet-history/index.d.ts +0 -1
  270. package/src/features/wallet-history/wallet-history.d.ts +0 -6
  271. package/src/hooks/use-elements.d.ts +0 -35
  272. package/src/types/patch.d.ts +0 -2
  273. package/src/utilities/feature-flags.d.ts +0 -232
  274. package/src/workflows/connect-carrier/index.d.ts +0 -1
  275. package/src/workflows/manage-wallet-workflow/index.d.ts +0 -1
  276. package/src/workflows/purchase-label-workflow/index.d.ts +0 -1
  277. /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
  278. /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
  279. /package/src/features/{shipengine-carriers/shipengine-carriers.styles.d.ts → manage-carriers/manage-carriers.styles.d.ts} +0 -0
  280. /package/src/features/{wallet-history/wallet-history.styles.d.ts → transaction-history/transaction-history.styles.d.ts} +0 -0
  281. /package/src/workflows/{manage-wallet-workflow → carrier-services}/use-get-wallet-panel-props.d.ts +0 -0
@@ -0,0 +1,4 @@
1
+ export type ExternalCarriersProps = {
2
+ isModalFullScreen?: boolean;
3
+ };
4
+ export declare const ExternalCarriers: ({ isModalFullScreen }: ExternalCarriersProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/alchemy";
1
+ import { SE } from "@shipengine/react-api";
2
2
  export type UpdateWarehouseData = {
3
3
  warehouseId: string;
4
4
  } & Partial<SE.Warehouse>;
@@ -1,15 +1,15 @@
1
1
  export declare const useManageWarehouses: () => {
2
- createWarehouse: import("@tanstack/react-query").UseMutateAsyncFunction<import("@shipengine/alchemy").Warehouse, import("@shipengine/alchemy").CodedError[], Partial<import("@shipengine/alchemy").Warehouse>, unknown>;
3
- createWarehouseErrors: import("@shipengine/alchemy").CodedError[] | null;
4
- deleteWarehouse: import("@tanstack/react-query").UseMutateAsyncFunction<void, import("@shipengine/alchemy").CodedError[], import("@shipengine/alchemy").DeleteWarehouseData, unknown>;
5
- deleteWarehouseErrors: import("@shipengine/alchemy").CodedError[] | null;
2
+ createWarehouse: import("@tanstack/react-query").UseMutateAsyncFunction<import("@shipengine/react-api").Warehouse, import("@shipengine/react-api").CodedError[], Partial<import("@shipengine/react-api").Warehouse>, unknown>;
3
+ createWarehouseErrors: import("@shipengine/react-api").CodedError[] | null;
4
+ deleteWarehouse: import("@tanstack/react-query").UseMutateAsyncFunction<void, import("@shipengine/react-api").CodedError[], import("@shipengine/react-api").DeleteWarehouseData, unknown>;
5
+ deleteWarehouseErrors: import("@shipengine/react-api").CodedError[] | null;
6
6
  isCreatingWarehouse: boolean;
7
7
  isDeletingWarehouse: boolean;
8
8
  isLoadingWarehouses: boolean;
9
9
  isUpdatingWarehouse: boolean;
10
- listWarehouseErrors: import("@shipengine/alchemy").CodedError[] | null;
11
- refreshListWarehouses: <TPageData>(options?: (import("@tanstack/query-core").RefetchOptions & import("@tanstack/query-core").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@shipengine/alchemy").Warehouse[], import("@shipengine/alchemy").CodedError[]>>;
12
- updateWarehouse: import("@tanstack/react-query").UseMutateAsyncFunction<void, import("@shipengine/alchemy").CodedError[], import("@shipengine/alchemy").UpdateWarehouseData, unknown>;
13
- updateWarehouseErrors: import("@shipengine/alchemy").CodedError[] | null;
14
- warehouses: import("@shipengine/alchemy").Warehouse[] | undefined;
10
+ listWarehouseErrors: import("@shipengine/react-api").CodedError[] | null;
11
+ refreshListWarehouses: <TPageData>(options?: (import("@tanstack/query-core").RefetchOptions & import("@tanstack/query-core").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@shipengine/react-api").Warehouse[], import("@shipengine/react-api").CodedError[]>>;
12
+ updateWarehouse: import("@tanstack/react-query").UseMutateAsyncFunction<void, import("@shipengine/react-api").CodedError[], import("@shipengine/react-api").UpdateWarehouseData, unknown>;
13
+ updateWarehouseErrors: import("@shipengine/react-api").CodedError[] | null;
14
+ warehouses: import("@shipengine/react-api").Warehouse[] | undefined;
15
15
  };
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/alchemy";
1
+ import { SE } from "@shipengine/react-api";
2
2
  type WarehouseDisplayProps = {
3
3
  warehouse: SE.Warehouse;
4
4
  };
@@ -0,0 +1 @@
1
+ export * from "./transaction-history";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @namespace TransactionHistory
3
+ *
4
+ * # Wallet History
5
+ */
6
+ export declare const TransactionHistory: () => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/alchemy";
1
+ import { SE } from "@shipengine/react-api";
2
2
  export type UnitSettingsProps = {
3
3
  accountSettings?: SE.AccountSettings;
4
4
  getVatSettingsErrors?: SE.CodedError[] | null;
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/alchemy";
1
+ import { SE } from "@shipengine/react-api";
2
2
  export declare const useUnitSettings: () => {
3
3
  accountSettings: SE.AccountSettings | undefined;
4
4
  getVatSettingsErrors: SE.CodedError[] | null;
@@ -1,8 +1,8 @@
1
1
  export declare const useVatSettings: () => {
2
- getVatSettingsErrors: import("@shipengine/alchemy").CodedError[] | null;
2
+ getVatSettingsErrors: import("@shipengine/react-api").CodedError[] | null;
3
3
  isLoading: boolean;
4
- refreshVatSettings: <TPageData>(options?: (import("@tanstack/query-core").RefetchOptions & import("@tanstack/query-core").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@shipengine/alchemy").AccountSettings, import("@shipengine/alchemy").CodedError[]>>;
5
- updateVatSettings: import("@tanstack/react-query").UseMutateAsyncFunction<import("@shipengine/alchemy").AccountSettings, import("@shipengine/alchemy").CodedError[], Partial<import("@shipengine/alchemy").AccountSettings>, unknown>;
6
- updateVatSettingsErrors: import("@shipengine/alchemy").CodedError[] | null;
7
- vatSettings: import("@shipengine/alchemy").AccountSettings | undefined;
4
+ refreshVatSettings: <TPageData>(options?: (import("@tanstack/query-core").RefetchOptions & import("@tanstack/query-core").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@shipengine/react-api").AccountSettings, import("@shipengine/react-api").CodedError[]>>;
5
+ updateVatSettings: import("@tanstack/react-query").UseMutateAsyncFunction<import("@shipengine/react-api").AccountSettings, import("@shipengine/react-api").CodedError[], Partial<import("@shipengine/react-api").AccountSettings>, unknown>;
6
+ updateVatSettingsErrors: import("@shipengine/react-api").CodedError[] | null;
7
+ vatSettings: import("@shipengine/react-api").AccountSettings | undefined;
8
8
  };
@@ -0,0 +1,6 @@
1
+ /// <reference types="heremaps" />
2
+ import { HereTokenResponse } from "@shipengine/js-api";
3
+ export declare const initHerePlatform: (token: HereTokenResponse) => H.service.Platform;
4
+ export declare const initDefaultLayers: (platform: H.service.Platform) => Record<string, any>;
5
+ export declare const initInteractiveBehaviors: (map: H.Map) => H.mapevents.Behavior;
6
+ export declare const initDefaultUI: (map: H.Map, zoomControlPosition: H.ui.LayoutAlignment | undefined, defaultLayers: Record<string, any>, showZoomControl: boolean, showMapSettingsControl?: boolean, showScaleBarControl?: boolean, locale?: string) => H.ui.UI;
@@ -0,0 +1,10 @@
1
+ /// <reference types="heremaps" />
2
+ /// <reference types="react" />
3
+ export type MarkerData = {
4
+ coordinates: H.geo.IPoint;
5
+ data?: React.ReactNode;
6
+ icon: string | Element;
7
+ key?: string;
8
+ zIndex: number;
9
+ };
10
+ export declare const useHereMapUI: (defaultLayers: Record<string, any> | null, map: H.Map | null, mapOptions: H.Map.Options, markersRef: import("react").MutableRefObject<H.map.DomMarker[]>, showZoomControl: boolean, showMapSettingsControl: boolean, showScaleBarControl: boolean, zoomControlPosition?: H.ui.LayoutAlignment, markerData?: MarkerData[], onClickMarker?: ((markerData: MarkerData) => void) | undefined, onMapCenterChange?: () => void) => void;
@@ -0,0 +1,5 @@
1
+ /// <reference types="heremaps" />
2
+ export declare const useHereMap: (mapRef: React.RefObject<HTMLDivElement>, mapOptions: H.Map.Options, scriptsLoaded?: boolean) => {
3
+ defaultLayers: Record<string, any> | null;
4
+ hereMap: H.Map | null;
5
+ };
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/alchemy";
1
+ import { SE } from "@shipengine/react-api";
2
2
  /**
3
3
  * @internal
4
4
  *
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/alchemy";
1
+ import { SE } from "@shipengine/react-api";
2
2
  /**
3
3
  * @internal
4
4
  *
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/alchemy";
1
+ import { SE } from "@shipengine/react-api";
2
2
  /**
3
3
  * @internal
4
4
  *
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/alchemy";
1
+ import { SE } from "@shipengine/react-api";
2
2
  interface InsuranceFeatures {
3
3
  includeShipsuranceInsurance?: boolean;
4
4
  includeThirdPartyInsurance?: boolean;
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/alchemy";
1
+ import { SE } from "@shipengine/react-api";
2
2
  import { SelectCategory } from "../../components/field/select";
3
3
  /**
4
4
  * @internal
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/alchemy";
1
+ import { SE } from "@shipengine/react-api";
2
2
  import { PreferredRateAcknowledgementMessage, PreferredRatesResponse } from "../../types";
3
3
  /**
4
4
  * @internal
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/alchemy";
1
+ import { SE } from "@shipengine/react-api";
2
2
  import { SelectCategory } from "../../components/field/select";
3
3
  /**
4
4
  * @internal
@@ -1,8 +1,10 @@
1
- import { Rate, SE } from "@shipengine/alchemy";
1
+ import { ListServicePointsOptionAddress, ListServicePointsOptionAddressQuery, ListServicePointsOptionCoordinates, Rate, SE } from "@shipengine/react-api";
2
+ export type ServicePointSearchQuery = ListServicePointsOptionAddress["address"] | ListServicePointsOptionAddressQuery["addressQuery"] | ListServicePointsOptionCoordinates;
2
3
  export declare const useServicePoints: (rates?: Rate[], shipment?: SE.SalesOrderShipment) => {
3
- fetchServicePointsByPostalCode: (postalCode: string) => void;
4
+ fetchServicePoints: (searchQuery?: ServicePointSearchQuery) => void;
4
5
  listServicePointsErrors: SE.CodedError[] | null;
5
6
  nestedServicePointErrors: SE.CodedError[] | SE.ServicePointCustomError[] | undefined;
6
- servicePoints: SE.ServicePoint[];
7
+ servicePointSearchQuery: ServicePointSearchQuery | undefined;
7
8
  servicePointsFetching: boolean;
9
+ servicePointsResponse: SE.ServicePointsListResponse | undefined;
8
10
  };
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/alchemy";
1
+ import { SE } from "@shipengine/react-api";
2
2
  /**
3
3
  * @internal
4
4
  *
@@ -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
  /**
4
4
  * @internal
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/alchemy";
1
+ import { SE } from "@shipengine/react-api";
2
2
  /**
3
3
  * @internal
4
4
  *
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { SE } from "@shipengine/alchemy";
2
+ import { SE } from "@shipengine/react-api";
3
3
  import { ValidationPreference } from "../components/address-preference-context";
4
4
  /**
5
5
  * @internal
@@ -1,7 +1,7 @@
1
- import { SalesOrderShipment } from "@shipengine/alchemy";
1
+ import { SalesOrderShipment } from "@shipengine/react-api";
2
2
  export declare const useGetOrCreateShipment: (onShipmentUpdated: ((shipment: SalesOrderShipment) => void | Promise<void>) | undefined, shipmentId?: string) => {
3
- errors: import("@shipengine/alchemy").CodedError[] | undefined;
3
+ errors: import("@shipengine/react-api").CodedError[] | undefined;
4
4
  isLoading: boolean;
5
- refetchShipment: <TPageData>(options?: (import("@tanstack/query-core").RefetchOptions & import("@tanstack/query-core").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/query-core").QueryObserverResult<SalesOrderShipment, import("@shipengine/alchemy").CodedError[]>>;
5
+ refetchShipment: <TPageData>(options?: (import("@tanstack/query-core").RefetchOptions & import("@tanstack/query-core").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/query-core").QueryObserverResult<SalesOrderShipment, import("@shipengine/react-api").CodedError[]>>;
6
6
  shipment: SalesOrderShipment | undefined;
7
7
  };
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/alchemy";
1
+ import { SE } from "@shipengine/react-api";
2
2
  type UseScrubErrorsProps = {
3
3
  errors?: SE.CodedError[];
4
4
  predicate?: (e: SE.CodedError) => boolean;
package/src/index.d.ts CHANGED
@@ -7,3 +7,4 @@ export * from "./schemas";
7
7
  export * from "./types";
8
8
  export * from "./utilities";
9
9
  export * from "./workflows";
10
+ export * from "./elements-provider";
@@ -52,6 +52,7 @@ declare const _default: {
52
52
  schedulePickup: string;
53
53
  showItems: string;
54
54
  void: string;
55
+ download: string;
55
56
  };
56
57
  fields: {
57
58
  dimensions: string;
@@ -71,6 +72,7 @@ declare const _default: {
71
72
  multipleShippingServices: string;
72
73
  sections: {
73
74
  labels: string;
75
+ shipmentSummary: string;
74
76
  };
75
77
  noLabels: string;
76
78
  };
@@ -92,7 +94,7 @@ declare const _default: {
92
94
  genericText: string;
93
95
  };
94
96
  };
95
- "shipengine-carriers": {
97
+ "manage-carriers": {
96
98
  title: string;
97
99
  headers: {
98
100
  accountCarriers: string;
@@ -160,8 +162,48 @@ declare const _default: {
160
162
  };
161
163
  };
162
164
  "register-carrier": {
163
- formTitle: string;
164
- agreeToTerms: string;
165
+ formTitle: {
166
+ default: string;
167
+ new: string;
168
+ edit: string;
169
+ };
170
+ notifications: {
171
+ error: {
172
+ title: string;
173
+ };
174
+ };
175
+ };
176
+ "rate-details": {
177
+ total: string;
178
+ subtotal: string;
179
+ registerVat: string;
180
+ concepts: {
181
+ confirmation: string;
182
+ uncategorized: string;
183
+ shipping: string;
184
+ insurance: string;
185
+ confirm: string;
186
+ discount: string;
187
+ fuel_charge: string;
188
+ additional_fees: string;
189
+ tariff: string;
190
+ tax: string;
191
+ delivery: string;
192
+ handling: string;
193
+ special_goods: string;
194
+ pickup: string;
195
+ location_fee: string;
196
+ oversize: string;
197
+ returns: string;
198
+ notifications: string;
199
+ tip: string;
200
+ duties_and_taxes: string;
201
+ brokerage_fee: string;
202
+ admin_fee: string;
203
+ adjustment: string;
204
+ auctane_service_fee: string;
205
+ product_price: string;
206
+ };
165
207
  };
166
208
  "purchase-label": {
167
209
  title: string;
@@ -274,7 +316,10 @@ declare const _default: {
274
316
  today: string;
275
317
  viewMap: string;
276
318
  otherLocations: string;
277
- noServicePointsFound: string;
319
+ noServicePointsForService: string;
320
+ error: string;
321
+ paperless: string;
322
+ localTimeDisclaimer: string;
278
323
  };
279
324
  shipToAddressFormFields: string;
280
325
  sections: {
@@ -778,6 +823,7 @@ declare const _default: {
778
823
  gram: string;
779
824
  kilogram: string;
780
825
  };
826
+ ZnVuZGluZ19zb3VyY2VfaWQgbXVzdCBiZSBhbiBpbnRlZ2Vy: string;
781
827
  T25seSByZXNpZGVudGlhbCBkZWxpdmVyeSBhZGRyZXNzZXMgYXJlIGFsbG93ZWQgZm9yIFVQUyBHcm91bmQgU2F2ZXIu: string;
782
828
  "VGhlIHNlbGVjdGVkIHNlcnZpY2UgaW5jbHVkZXMgaW5zdXJhbmNlIGZvciBhbiBpbnN1cmVkIGFtb3VudCB1cCB0byAkMTAwLgo=": string;
783
829
  "VGhlIHNlbGVjdGVkIHNlcnZpY2UgaW5jbHVkZXMgaW5zdXJhbmNlIGZvciBhbiBpbnN1cmVkIGFtb3VudCB1cCB0byAkNTAuCg==": string;
@@ -1,5 +1,5 @@
1
1
  import { DeepPartial } from "fishery";
2
- import { SE } from "@shipengine/alchemy";
2
+ import { SE } from "@shipengine/react-api";
3
3
  export type CreateCarrierHandlersParams = {
4
4
  get?: DeepPartial<SE.Carrier>;
5
5
  list?: [count: number, listParams?: DeepPartial<SE.Carrier>];
@@ -1,5 +1,5 @@
1
1
  import { DeepPartial } from "fishery";
2
- import { SE } from "@shipengine/alchemy";
2
+ import { SE } from "@shipengine/react-api";
3
3
  export type CreateWarehouseHandlersParams = {
4
4
  get?: DeepPartial<SE.Warehouse>;
5
5
  list?: [count: number, listParams?: DeepPartial<SE.Warehouse>];
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { SE } from "@shipengine/alchemy";
2
+ import { SE } from "@shipengine/react-api";
3
3
  /**
4
4
  * @internal
5
5
  *
@@ -1,6 +1,9 @@
1
+ /// <reference types="react" />
1
2
  import { prettyFormat as __ } from "@testing-library/dom/types/pretty-dom";
3
+ import { RenderOptions } from "@testing-library/react";
2
4
  import { UserEvent } from "@testing-library/user-event/dist/types/setup/setup";
3
5
  import { IconNames, Theme } from "@shipengine/giger-theme";
6
+ import { ElementsTestProviderProps } from "../elements-provider/elements-test-provider";
4
7
  import server, { baseUrl } from "../mocks/server";
5
8
  declare const theme: Theme;
6
9
  declare const delayedFn: () => Promise<void>;
@@ -169,6 +172,9 @@ declare const customWithin: (element: HTMLElement) => {
169
172
  export * from "@testing-library/react";
170
173
  export { rest } from "msw";
171
174
  export { baseUrl, customScreen as screen, customWithin as within, delayedFn, server, theme };
175
+ export declare const ContentWrapper: ({ children }: {
176
+ children: JSX.Element;
177
+ }) => import("@emotion/react/jsx-runtime").JSX.Element;
172
178
  export declare const renderWithProviders: (component: any) => {
173
179
  readonly user: UserEvent;
174
180
  view: import("@testing-library/react").RenderResult<{
@@ -233,7 +239,7 @@ export declare const renderWithProviders: (component: any) => {
233
239
  * This allows components to simulate usage in an Element via `decorators: [withAllProviders]`
234
240
  **/
235
241
  export declare const renderWithAllProviders: (component: any) => import("@testing-library/react").RenderResult<typeof import("@testing-library/dom/types/queries"), HTMLElement, HTMLElement>;
236
- export declare const renderWithAlchemy: (component: any) => {
242
+ export declare const renderWithElements: (component: any, features?: ElementsTestProviderProps["features"]) => {
237
243
  user: UserEvent;
238
244
  container: HTMLElement;
239
245
  baseElement: HTMLElement;
@@ -290,3 +296,4 @@ export declare const renderWithAlchemy: (component: any) => {
290
296
  findByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
291
297
  findAllByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
292
298
  };
299
+ export declare const renderWithContent: (ui: React.ReactElement, options?: Omit<RenderOptions, "wrapper">) => import("@testing-library/react").RenderResult<typeof import("@testing-library/dom/types/queries"), HTMLElement, HTMLElement>;
@@ -0,0 +1,3 @@
1
+ import { CustomThemeData } from "@shipengine/giger-theme";
2
+ declare const fallbackThemeData: CustomThemeData;
3
+ export default fallbackThemeData;
@@ -0,0 +1,4 @@
1
+ declare const themeData: {
2
+ fallback: import("@shipengine/giger-theme/dist/lib/ThemeTypes").CustomThemeData;
3
+ };
4
+ export default themeData;
@@ -1,4 +1,4 @@
1
- import { CarrierConnection, SE } from "@shipengine/alchemy";
1
+ import { SE } from "@shipengine/react-api";
2
2
  /**
3
3
  * @internal
4
4
  *
@@ -21,22 +21,18 @@ export type CarrierTerms = {
21
21
  links: CarrierTerm[];
22
22
  title: string;
23
23
  };
24
- export type CarrierMetadataMapping = {
25
- [countryCode: string]: CarrierMetadata[];
26
- };
27
24
  /**
28
25
  * @internal
29
26
  *
30
27
  * # Carrier Metadata
31
28
  */
32
- export type CarrierMetadata = {
33
- carrierCode: CarrierConnection["carrierCode"];
34
- logo: string;
29
+ export type CarrierWithFriendlyName = {
35
30
  name: string;
36
- optionalFields?: string[];
37
- requiredFields?: string[];
38
- shortname: string;
39
- terms?: CarrierTerms;
31
+ };
32
+ export type CarrierMetadata = Record<string, CarrierWithFriendlyName>;
33
+ export type CarrierMetadataFromFundingSource = {
34
+ carrierProfile: SE.MetadataCarrierProfile;
35
+ friendlyName: string;
40
36
  };
41
37
  /**
42
38
  * @internal
@@ -1,4 +1,3 @@
1
1
  export * from "./carrier-metadata";
2
- export * from "./patch";
3
2
  export * from "./shipping-preset";
4
3
  export * from "./preferred-rates";
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/alchemy";
1
+ import { SE } from "@shipengine/react-api";
2
2
  export type PreferredRateAcknowledgementMessage = {
3
3
  link?: {
4
4
  text: string;
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/alchemy";
1
+ import { SE } from "@shipengine/react-api";
2
2
  export type ShippingPreset = {
3
3
  confirmation?: SE.ConfirmationType;
4
4
  dimensions?: SE.DimensionsWithUnit;
@@ -1,4 +1,3 @@
1
- import * as Locales from "date-fns/locale";
2
1
  /**
3
2
  * @internal
4
3
  *
@@ -13,7 +12,7 @@ export declare const formatDate: (date: string, locale?: string) => string;
13
12
  * @param locale string i.e. "en-US"
14
13
  * @returns locale data
15
14
  */
16
- export declare const findDateLocale: (locale?: string) => Locales.Locale;
15
+ export declare const findDateLocale: (locale?: string) => import("date-fns/locale").Locale;
17
16
  /**
18
17
  * @internal
19
18
  * Given a date and a locale, format the date to the locale's date format.
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/alchemy";
1
+ import { SE } from "@shipengine/react-api";
2
2
  /**
3
3
  * @internal
4
4
  *
@@ -0,0 +1,18 @@
1
+ import { ElementsFeatureFlags } from "./types";
2
+ declare const defaultFeatureFlags: Required<ElementsFeatureFlags>;
3
+ /**
4
+ * @internal
5
+ *
6
+ * # Feature Flags - featureFlagComponentNameLookup
7
+ */
8
+ export declare const featureFlagComponentNameLookup: (componentName: string) => string;
9
+ /**
10
+ * @internal
11
+ *
12
+ * # Feature Flags - getFeatures
13
+ */
14
+ export declare const getDefaultFeatures: (elements: Array<keyof typeof defaultFeatureFlags>) => ElementsFeatureFlags[keyof typeof defaultFeatureFlags];
15
+ export type FeatureObject = Record<string, unknown>;
16
+ export declare const isObject: (item: unknown) => item is FeatureObject;
17
+ export declare function deepMergeFeatures<T extends FeatureObject>(defaults: T, custom?: T): T;
18
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from "./feature-flags";
2
+ export * from "./types";