@shipengine/elements 2.14.0 → 2.16.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 (82) hide show
  1. package/actions-menu.js +5 -5
  2. package/carrier.js +1 -1
  3. package/components.js +1 -1
  4. package/elements.js +1 -1
  5. package/hooks.js +1 -1
  6. package/index.js +1 -1
  7. package/package.json +4 -4
  8. package/src/components/add-funds-form/add-funds-form.d.ts +2 -2
  9. package/src/components/address-preference-context/address-preference-context.d.ts +1 -1
  10. package/src/components/pager/usePager.d.ts +1 -0
  11. package/src/components/templates/address-form/address-fields.d.ts +1 -2
  12. package/src/components/templates/address-form/address-form.d.ts +1 -2
  13. package/src/components/templates/product-form/product-form.d.ts +3 -1
  14. package/src/components/templates/products-display/products-display.d.ts +4 -4
  15. package/src/components/templates/products-display/products-display.styles.d.ts +2 -1
  16. package/src/components/templates/shipment-form/sections/customs-forms/customs-forms.d.ts +3 -2
  17. package/src/components/templates/shipment-form/shipment-form.d.ts +4 -3
  18. package/src/components/templates/wallet-form/edit-wallet-address-form.d.ts +1 -1
  19. package/src/components/vat-form/vat-form-schema.d.ts +21 -3
  20. package/src/components/vat-form/vat-form.d.ts +7 -2
  21. package/src/components/vat-form/vat-form.styles.d.ts +3 -0
  22. package/src/components/vat-form/vat-types.d.ts +6 -0
  23. package/src/components/warehouse-form/warehouse-form-schema.d.ts +6 -0
  24. package/src/components/warehouse-form/warehouse-form.d.ts +3 -1
  25. package/src/elements/labels-grid/hooks/use-labels-grid.d.ts +1 -0
  26. package/src/elements/labels-grid/labels-grid.d.ts +39 -16
  27. package/src/elements/manage-carriers/manage-carriers.d.ts +6 -2
  28. package/src/elements/manage-external-carriers/manage-external-carriers.d.ts +6 -2
  29. package/src/elements/manage-funding/manage-funding-element.d.ts +6 -2
  30. package/src/elements/manage-warehouses/manage-warehouses.d.ts +6 -2
  31. package/src/elements/payment-method-settings/payment-method-settings-element.d.ts +6 -2
  32. package/src/elements/purchase-label/configure-shipment.d.ts +2 -1
  33. package/src/elements/purchase-label/hooks/index.d.ts +0 -2
  34. package/src/elements/purchase-label/hooks/use-presets.d.ts +2 -1
  35. package/src/elements/purchase-label/hooks/use-shipment-form.d.ts +4 -3
  36. package/src/elements/purchase-label/purchase-label.d.ts +28 -39
  37. package/src/elements/select-label-layout/select-label-layout-element.d.ts +6 -2
  38. package/src/elements/shipment-summary/shipment-summary.d.ts +8 -2
  39. package/src/elements/shipments-grid/hooks/use-shipments-grid.d.ts +1 -0
  40. package/src/elements/shipments-grid/shipments-grid.d.ts +6 -5
  41. package/src/elements/theme-creator/theme-creator.d.ts +6 -2
  42. package/src/elements/transaction-history/transaction-history-element.d.ts +6 -2
  43. package/src/elements/unit-settings/unit-settings-element.d.ts +6 -2
  44. package/src/elements/vat-settings/vat-settings-element.d.ts +6 -2
  45. package/src/elements/void-label/void-label.d.ts +36 -52
  46. package/src/elements-provider/elements-provider.d.ts +1 -2
  47. package/src/features/manage-carriers/manage-carriers.d.ts +2 -2
  48. package/src/features/manage-funding/manage-funding.d.ts +2 -2
  49. package/src/features/vat-settings/use-vat-settings.d.ts +1 -1
  50. package/src/features/vat-settings/vat-settings.d.ts +1 -4
  51. package/src/features/vat-settings/vat-settings.styles.d.ts +7 -0
  52. package/src/hooks/index.d.ts +2 -0
  53. package/src/hooks/options/use-country-code-options.d.ts +1 -1
  54. package/src/hooks/options/use-state-code-options.d.ts +2 -2
  55. package/src/{elements/purchase-label/hooks → hooks}/use-configure-shipment.d.ts +5 -10
  56. package/src/hooks/use-helpers.stories.d.ts +3 -0
  57. package/src/locales/en/index.d.ts +6 -2
  58. package/src/types/harmonized-tariff-code.d.ts +10 -0
  59. package/src/types/index.d.ts +4 -3
  60. package/src/utilities/form-logger.d.ts +1 -1
  61. package/src/utilities/validation.d.ts +1 -1
  62. package/src/workflows/account-settings/account-settings.d.ts +6 -2
  63. package/src/workflows/carrier-services/carrier-services.d.ts +31 -50
  64. package/src/workflows/connect-external-carrier/connect-external-carrier.d.ts +6 -2
  65. package/src/workflows/label-workflow/label-workflow.d.ts +1126 -101
  66. package/src/workflows/onboarding/components/onboarding-wizard/onboarding-wizard.d.ts +2 -1
  67. package/src/workflows/onboarding/components/ship-from-address-step/ship-from-address-step.d.ts +1 -1
  68. package/src/workflows/onboarding/onboarding.d.ts +84 -8
  69. package/transaction-history-element.js +1 -1
  70. package/use-configure-shipment.js +1 -0
  71. package/use-toggle.js +1 -1
  72. package/use-unit-settings.js +1 -1
  73. package/usePager.js +1 -1
  74. package/utilities.js +1 -1
  75. package/validation.js +1 -1
  76. package/vat.js +1 -1
  77. package/wallet-form.js +1 -1
  78. package/warehouses.js +1 -0
  79. package/workflows.js +1 -1
  80. package/shipment.js +0 -1
  81. package/use-scrub-errors.js +0 -1
  82. /package/src/{elements/purchase-label/hooks → hooks}/use-import-sales-order.d.ts +0 -0
@@ -173,19 +173,18 @@ export declare const Element: ({ resources, ...props }: ShipmentsGridProps & {
173
173
  vatNumber: string;
174
174
  vatRegistrationTooltip: string;
175
175
  vatFormText: string;
176
- vatFormRegisterLater: string;
177
176
  vatNumberInputHint: string;
178
177
  vatNumberInputPlaceholder: string;
179
178
  verifiedVat: string;
179
+ vatNumberFieldLabel: string;
180
+ vatTypePlaceholder: string;
181
+ issuingAuthorityPlaceholder: string;
182
+ issuingAuthorityFieldLabel: string;
180
183
  vatFormErrors: {
181
184
  invalidFieldValue: string;
182
185
  verificationFailure: string;
183
186
  forbidden: string;
184
187
  connectionNotSupported: string;
185
- genericTitle: string;
186
- /**
187
- * `onRowClick` callback invoked when a row is clicked.
188
- */
189
188
  genericText: string;
190
189
  };
191
190
  };
@@ -937,6 +936,7 @@ export declare const Element: ({ resources, ...props }: ShipmentsGridProps & {
937
936
  taxIssuingAuthority: string;
938
937
  entityType: string;
939
938
  };
939
+ hsCode: string;
940
940
  nonDelivery: {
941
941
  returnToSender: string;
942
942
  treatAsAbandoned: string;
@@ -974,6 +974,7 @@ export declare const Element: ({ resources, ...props }: ShipmentsGridProps & {
974
974
  shipments: string;
975
975
  warehouses: string;
976
976
  };
977
+ labelHasBeenPurchased: string;
977
978
  emailIsRequired: string;
978
979
  unknown: string;
979
980
  noRatesAvailable: string;
@@ -114,16 +114,18 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
114
114
  vatNumber: string;
115
115
  vatRegistrationTooltip: string;
116
116
  vatFormText: string;
117
- vatFormRegisterLater: string;
118
117
  vatNumberInputHint: string;
119
118
  vatNumberInputPlaceholder: string;
120
119
  verifiedVat: string;
120
+ vatNumberFieldLabel: string;
121
+ vatTypePlaceholder: string;
122
+ issuingAuthorityPlaceholder: string;
123
+ issuingAuthorityFieldLabel: string;
121
124
  vatFormErrors: {
122
125
  invalidFieldValue: string;
123
126
  verificationFailure: string;
124
127
  forbidden: string;
125
128
  connectionNotSupported: string;
126
- genericTitle: string;
127
129
  genericText: string;
128
130
  };
129
131
  };
@@ -815,6 +817,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
815
817
  taxIssuingAuthority: string;
816
818
  entityType: string;
817
819
  };
820
+ hsCode: string;
818
821
  nonDelivery: {
819
822
  returnToSender: string;
820
823
  treatAsAbandoned: string;
@@ -852,6 +855,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
852
855
  shipments: string;
853
856
  warehouses: string;
854
857
  };
858
+ labelHasBeenPurchased: string;
855
859
  emailIsRequired: string;
856
860
  unknown: string;
857
861
  noRatesAvailable: string;
@@ -101,16 +101,18 @@ export declare const Element: ({ resources, ...props }: object & {
101
101
  vatNumber: string;
102
102
  vatRegistrationTooltip: string;
103
103
  vatFormText: string;
104
- vatFormRegisterLater: string;
105
104
  vatNumberInputHint: string;
106
105
  vatNumberInputPlaceholder: string;
107
106
  verifiedVat: string;
107
+ vatNumberFieldLabel: string;
108
+ vatTypePlaceholder: string;
109
+ issuingAuthorityPlaceholder: string;
110
+ issuingAuthorityFieldLabel: string;
108
111
  vatFormErrors: {
109
112
  invalidFieldValue: string;
110
113
  verificationFailure: string;
111
114
  forbidden: string;
112
115
  connectionNotSupported: string;
113
- genericTitle: string;
114
116
  genericText: string;
115
117
  };
116
118
  };
@@ -802,6 +804,7 @@ export declare const Element: ({ resources, ...props }: object & {
802
804
  taxIssuingAuthority: string;
803
805
  entityType: string;
804
806
  };
807
+ hsCode: string;
805
808
  nonDelivery: {
806
809
  returnToSender: string;
807
810
  treatAsAbandoned: string;
@@ -839,6 +842,7 @@ export declare const Element: ({ resources, ...props }: object & {
839
842
  shipments: string;
840
843
  warehouses: string;
841
844
  };
845
+ labelHasBeenPurchased: string;
842
846
  emailIsRequired: string;
843
847
  unknown: string;
844
848
  noRatesAvailable: string;
@@ -101,16 +101,18 @@ export declare const Element: ({ resources, ...props }: object & {
101
101
  vatNumber: string;
102
102
  vatRegistrationTooltip: string;
103
103
  vatFormText: string;
104
- vatFormRegisterLater: string;
105
104
  vatNumberInputHint: string;
106
105
  vatNumberInputPlaceholder: string;
107
106
  verifiedVat: string;
107
+ vatNumberFieldLabel: string;
108
+ vatTypePlaceholder: string;
109
+ issuingAuthorityPlaceholder: string;
110
+ issuingAuthorityFieldLabel: string;
108
111
  vatFormErrors: {
109
112
  invalidFieldValue: string;
110
113
  verificationFailure: string;
111
114
  forbidden: string;
112
115
  connectionNotSupported: string;
113
- genericTitle: string;
114
116
  genericText: string;
115
117
  };
116
118
  };
@@ -802,6 +804,7 @@ export declare const Element: ({ resources, ...props }: object & {
802
804
  taxIssuingAuthority: string;
803
805
  entityType: string;
804
806
  };
807
+ hsCode: string;
805
808
  nonDelivery: {
806
809
  returnToSender: string;
807
810
  treatAsAbandoned: string;
@@ -839,6 +842,7 @@ export declare const Element: ({ resources, ...props }: object & {
839
842
  shipments: string;
840
843
  warehouses: string;
841
844
  };
845
+ labelHasBeenPurchased: string;
842
846
  emailIsRequired: string;
843
847
  unknown: string;
844
848
  noRatesAvailable: string;
@@ -101,16 +101,18 @@ export declare const Element: ({ resources, ...props }: object & {
101
101
  vatNumber: string;
102
102
  vatRegistrationTooltip: string;
103
103
  vatFormText: string;
104
- vatFormRegisterLater: string;
105
104
  vatNumberInputHint: string;
106
105
  vatNumberInputPlaceholder: string;
107
106
  verifiedVat: string;
107
+ vatNumberFieldLabel: string;
108
+ vatTypePlaceholder: string;
109
+ issuingAuthorityPlaceholder: string;
110
+ issuingAuthorityFieldLabel: string;
108
111
  vatFormErrors: {
109
112
  invalidFieldValue: string;
110
113
  verificationFailure: string;
111
114
  forbidden: string;
112
115
  connectionNotSupported: string;
113
- genericTitle: string;
114
116
  genericText: string;
115
117
  };
116
118
  };
@@ -802,6 +804,7 @@ export declare const Element: ({ resources, ...props }: object & {
802
804
  taxIssuingAuthority: string;
803
805
  entityType: string;
804
806
  };
807
+ hsCode: string;
805
808
  nonDelivery: {
806
809
  returnToSender: string;
807
810
  treatAsAbandoned: string;
@@ -839,6 +842,7 @@ export declare const Element: ({ resources, ...props }: object & {
839
842
  shipments: string;
840
843
  warehouses: string;
841
844
  };
845
+ labelHasBeenPurchased: string;
842
846
  emailIsRequired: string;
843
847
  unknown: string;
844
848
  noRatesAvailable: string;
@@ -166,7 +166,10 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
166
166
  title: string;
167
167
  description: string;
168
168
  cta: {
169
- title: string;
169
+ title: string; /**
170
+ * `onSuccess` is a callback function that will be invoked when the request to void a given
171
+ * shipping label is successful.
172
+ */
170
173
  description: string;
171
174
  };
172
175
  registerSuccess: {
@@ -188,16 +191,18 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
188
191
  vatNumber: string;
189
192
  vatRegistrationTooltip: string;
190
193
  vatFormText: string;
191
- vatFormRegisterLater: string;
192
194
  vatNumberInputHint: string;
193
195
  vatNumberInputPlaceholder: string;
194
196
  verifiedVat: string;
197
+ vatNumberFieldLabel: string;
198
+ vatTypePlaceholder: string;
199
+ issuingAuthorityPlaceholder: string;
200
+ issuingAuthorityFieldLabel: string;
195
201
  vatFormErrors: {
196
202
  invalidFieldValue: string;
197
203
  verificationFailure: string;
198
204
  forbidden: string;
199
205
  connectionNotSupported: string;
200
- genericTitle: string;
201
206
  genericText: string;
202
207
  };
203
208
  };
@@ -240,6 +245,10 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
240
245
  termsLink: string;
241
246
  popover: {
242
247
  title: string;
248
+ /**
249
+ * `onComplete` is a callback function that will be invoked when the request to void a given
250
+ * shipping label is completed.
251
+ */
243
252
  description: string;
244
253
  };
245
254
  };
@@ -251,12 +260,6 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
251
260
  info: {
252
261
  description: string;
253
262
  };
254
- /**
255
- * `onViewShipment` is a callback function that will be invoked when the user clicks the
256
- * `View Shipment` button. This will take you back to the
257
- * {@link ShipmentSummary.Element | `Shipment Summary Element`} for the given shipment, where you
258
- * will be able to see the voided label listed.
259
- */
260
263
  poBox: {
261
264
  title: string;
262
265
  description: string;
@@ -320,6 +323,9 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
320
323
  duties_and_taxes: string;
321
324
  brokerage_fee: string;
322
325
  admin_fee: string;
326
+ /**
327
+ * `labelId` is the unique identifier for the label you wish to void.
328
+ */
323
329
  adjustment: string;
324
330
  auctane_service_fee: string;
325
331
  product_price: string;
@@ -362,31 +368,6 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
362
368
  "requires-additional-handling": string;
363
369
  addOns: string;
364
370
  contentDescription: string;
365
- /**
366
- * # Void Label Component
367
- *
368
- * - The `<VoidLabel />` component is used to void a given shipping label. When a label is voided,
369
- * you then get the option to view the associated shipment via the `Shipment Summary` Element, or
370
- * you can purchase another label for the shipment via the `Purchase Label` Element.
371
- *
372
- * @param ComponentProps The base props that will be passed into the `<VoidLabel />` component.
373
- *
374
- * @returns Element An EmotionJSX.Element that will render the `<VoidLabel />` component
375
- * with all the appropriate wrappers.
376
- *
377
- * @example
378
- * You can see how the `<Component />` is used in the `createElement` function call below.
379
- * ```tsx
380
- * export const Element = createElement(Component, ErrorFallback, {
381
- *
382
- * resources: { en },
383
- * });
384
- * ```
385
- *
386
- * <br />
387
- *
388
- * @see {@link VoidLabel.Element | The **Element** created to render `<VoidLabel />`}
389
- */
390
371
  confirmation: string;
391
372
  dimensions: {
392
373
  length: string;
@@ -481,11 +462,12 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
481
462
  shipToAddressFormFields: string;
482
463
  sections: {
483
464
  customsForm: string;
484
- windsorFramework: string; /**
465
+ /**
485
466
  * # Void Label Element Props
486
467
  *
487
468
  * @see {@link VoidLabel.Element | See the full type that `typeof Element` will return}
488
469
  */
470
+ windsorFramework: string;
489
471
  shipment: string;
490
472
  rate_one: string;
491
473
  rate_other: string;
@@ -598,24 +580,24 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
598
580
  isEnabled: string;
599
581
  isLoading: string;
600
582
  lowBalancePurchaseThreshold: string;
601
- /**
602
- * # Void Label Component Props
603
- *
604
- * - These are the base props that will be passed into the `<VoidLabel />` component.
605
- *
606
- * @see {@link VoidLabel.Component | This prop types usage in the `<VoidLabel />` component}
607
- */
608
583
  maximumPurchasesPerDay: string;
609
584
  purchaseAmount: string;
610
585
  readSettings: string;
611
586
  };
612
587
  addFunds: {
613
- custom: string;
588
+ custom: string; /**
589
+ * `onComplete` is a callback function that will be invoked when the request to void a given
590
+ * shipping label is completed.
591
+ */
614
592
  error: {
615
593
  title: string;
616
594
  message: string;
617
595
  };
618
596
  isLoading: string;
597
+ /**
598
+ * `onSuccess` is a callback function that will be invoked when the request to void a given
599
+ * shipping label is successful.
600
+ */
619
601
  labels: {
620
602
  amount: string;
621
603
  };
@@ -663,7 +645,6 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
663
645
  savingFailed: string;
664
646
  };
665
647
  units: {
666
- title: string;
667
648
  /**
668
649
  * # Void Label Component Props
669
650
  *
@@ -671,6 +652,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
671
652
  *
672
653
  * @see {@link VoidLabel.Component | This prop types usage in the `<VoidLabel />` component}
673
654
  */
655
+ title: string;
674
656
  dimensions: {
675
657
  title: string;
676
658
  standard: string;
@@ -747,9 +729,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
747
729
  voided: string;
748
730
  error: string;
749
731
  completed: string;
750
- processing: string; /**
751
- * `labelId` is the unique identifier for the label you wish to void.
752
- */
732
+ processing: string;
753
733
  };
754
734
  trackingStatus: {
755
735
  unknown: string;
@@ -766,7 +746,12 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
766
746
  errorMessages: {
767
747
  title: string;
768
748
  subtitle: string;
769
- };
749
+ }; /**
750
+ * `onViewShipment` is a callback function that will be invoked when the user clicks the
751
+ * `View Shipment` button. This will take you back to the
752
+ * {@link ShipmentSummary.Element | `Shipment Summary Element`} for the given shipment, where you
753
+ * will be able to see the voided label listed.
754
+ */
770
755
  };
771
756
  "connect-carrier": {
772
757
  actions: {
@@ -795,10 +780,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
795
780
  toastBody: string;
796
781
  };
797
782
  deleteCarrierErrorTitle: string;
798
- deleteCarrierErrorMessage: string; /**
799
- * `onSuccess` is a callback function that will be invoked when the request to void a given
800
- * shipping label is successful.
801
- */
783
+ deleteCarrierErrorMessage: string;
802
784
  loadingDeletingCarrier: string;
803
785
  };
804
786
  common: {
@@ -943,6 +925,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
943
925
  taxIssuingAuthority: string;
944
926
  entityType: string;
945
927
  };
928
+ hsCode: string;
946
929
  nonDelivery: {
947
930
  returnToSender: string;
948
931
  treatAsAbandoned: string;
@@ -980,6 +963,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
980
963
  shipments: string;
981
964
  warehouses: string;
982
965
  };
966
+ labelHasBeenPurchased: string;
983
967
  emailIsRequired: string;
984
968
  unknown: string;
985
969
  noRatesAvailable: string;
@@ -6,7 +6,6 @@ import { ElementsContextProviderProps } from "./elements-context-provider";
6
6
  export type ElementsProviderProps = Omit<ElementsContextProviderProps, "theme"> & ShipEngineAPIConfig & {
7
7
  defaultQueryClientOptions?: DefaultOptions;
8
8
  emotionCacheShadowRootContainer?: ShadowRoot & HTMLElement;
9
- emotionCacheShadowRootContainerWrapper?: HTMLDivElement;
10
9
  themeConfig?: CustomThemeData | {
11
10
  [THEME_ID]: CustomThemeData;
12
11
  };
@@ -14,4 +13,4 @@ export type ElementsProviderProps = Omit<ElementsContextProviderProps, "theme">
14
13
  /**
15
14
  * @category Providers
16
15
  */
17
- export declare const ElementsProvider: ({ baseURL, cdnURL, children, container, features, getToken, headers, locale, onApiError, onError, scope, themeConfig, defaultQueryClientOptions, emotionCacheShadowRootContainer, emotionCacheShadowRootContainerWrapper, }: ElementsProviderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
16
+ export declare const ElementsProvider: ({ baseURL, cdnURL, children, container, features, getToken, headers, locale, onApiError, onError, scope, themeConfig, defaultQueryClientOptions, emotionCacheShadowRootContainer, }: ElementsProviderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,6 +1,5 @@
1
1
  import { CodedError, Currency } from "@shipengine/react-api";
2
2
  export type ShipEngineCarriersProps = {
3
- addedFundsError?: CodedError[] | null;
4
3
  addFunds?: (payload: {
5
4
  carrierId: string;
6
5
  funds: {
@@ -8,9 +7,10 @@ export type ShipEngineCarriersProps = {
8
7
  currency: Currency;
9
8
  };
10
9
  }) => Promise<void>;
10
+ addFundsError?: CodedError[] | null;
11
11
  isUpdateFundsError?: boolean;
12
12
  isUpdatingFunds?: boolean;
13
13
  onRedirectToOnboarding?: () => void;
14
14
  showFunds?: boolean;
15
15
  };
16
- export declare const ShipEngineCarriers: ({ showFunds, onRedirectToOnboarding, addFunds, addedFundsError, }: ShipEngineCarriersProps) => import("@emotion/react/jsx-runtime").JSX.Element;
16
+ export declare const ShipEngineCarriers: ({ showFunds, onRedirectToOnboarding, addFunds, addFundsError, }: ShipEngineCarriersProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -15,7 +15,6 @@ import { CodedError, Currency } from "@shipengine/react-api";
15
15
  * @see {@link ManageFundingProps | The props that are passed into the `<ManageFunding />` component}
16
16
  */
17
17
  export type ManageFundingProps = {
18
- addedFundsError?: CodedError[] | null;
19
18
  addFunds?: (payload: {
20
19
  carrierId: string;
21
20
  funds: {
@@ -23,6 +22,7 @@ export type ManageFundingProps = {
23
22
  currency: Currency;
24
23
  };
25
24
  }) => Promise<void>;
25
+ addFundsError?: CodedError[] | null;
26
26
  onRedirectToOnboarding?: () => void;
27
27
  };
28
- export declare const ManageFunding: ({ onRedirectToOnboarding, addFunds, addedFundsError }: ManageFundingProps) => import("@emotion/react/jsx-runtime").JSX.Element;
28
+ export declare const ManageFunding: ({ onRedirectToOnboarding, addFunds, addFundsError, }: ManageFundingProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -4,5 +4,5 @@ export declare const useVatSettings: () => {
4
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").ShipEngineAccountSettings, import("@shipengine/react-api").CodedError[]>>;
5
5
  updateVatSettings: import("@tanstack/react-query").UseMutateAsyncFunction<import("@shipengine/react-api").ShipEngineAccountSettings, import("@shipengine/react-api").CodedError[], Partial<import("@shipengine/react-api").ShipEngineAccountSettings>, unknown>;
6
6
  updateVatSettingsErrors: import("@shipengine/react-api").CodedError[] | null;
7
- vatSettings: import("@shipengine/react-api").ShipEngineAccountSettings | undefined;
7
+ vatSettings: import("@shipengine/react-api").AccountSettingsTaxIdentifier | undefined;
8
8
  };
@@ -1,4 +1 @@
1
- export type VatSettingsProps = {
2
- showRegisterLaterText?: boolean;
3
- };
4
- export declare const VatSettings: ({ showRegisterLaterText }: VatSettingsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
1
+ export declare const VatSettings: () => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -18,6 +18,13 @@ export declare const styles: {
18
18
  tooltipContainer: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
19
19
  maxWidth: string;
20
20
  };
21
+ vatIssuingAuthority: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
22
+ color: string;
23
+ margin: number;
24
+ };
25
+ vatParagraph: () => {
26
+ margin: number;
27
+ };
21
28
  vatText: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
22
29
  alignItems: "center";
23
30
  display: "flex";
@@ -10,3 +10,5 @@ export * from "./use-root-portal";
10
10
  export * from "./use-run-once-on-true";
11
11
  export * from "./use-scrub-errors";
12
12
  export * from "./use-toggle";
13
+ export * from "./use-configure-shipment";
14
+ export * from "./use-import-sales-order";
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * @category Hooks
7
7
  */
8
- export declare const useCountryCodeOptions: (domestic?: boolean) => {
8
+ export declare const useCountryCodeOptions: () => {
9
9
  countryCodeOptions: {
10
10
  label: "Afghanistan" | "Aland Islands" | "Albania" | "Algeria" | "American Samoa" | "Andorra" | "Angola" | "Anguilla" | "Antarctica" | "Antigua Barbuda" | "Argentina" | "Armenia" | "Aruba" | "Australia" | "Austria" | "Azerbaijan" | "Bahamas" | "Bahrain" | "Bangladesh" | "Barbados" | "Belarus" | "Belgium" | "Belize" | "Benin" | "Bermuda" | "Bhutan" | "Bolivia" | "Bonaire, Sint Eustatius And Saba" | "Bosnia and Herzegovina" | "Botswana" | "Brazil" | "British Indian Ocean Territory" | "British Virgin Islands" | "Brunei Darussalam" | "Bulgaria" | "Burkina Faso" | "Burundi" | "Canada" | "Cambodia" | "Cameroon" | "Cape Verde Islands" | "Cayman Islands" | "Central African Republic" | "Chad" | "Chile" | "China" | "Christmas Island" | "Cocos(Keeling) Islands" | "Colombia" | "Comoros" | "Congo" | "Congo, The Democratic Republic of" | "Cook Islands" | "Costa Rica" | "Croatia" | "Cuba" | "Curacao" | "Cyprus" | "Czech Republic" | "Denmark" | "Djibouti" | "Dominica" | "Dominican Republic" | "Ecuador" | "Egypt" | "El Salvador" | "Equatorial Guinea" | "Eritrea" | "Estonia" | "Ethiopia" | "Falkland Islands" | "Faroe Islands" | "Federated States of Micronesia" | "Fiji" | "Finland" | "France" | "French Guiana" | "French Polynesia" | "French Southern Territories" | "Gabon" | "Gambia" | "Georgia" | "Germany" | "Ghana" | "Gibraltar" | "Greece" | "Greenland" | "Grenada" | "Guadeloupe" | "Guam" | "Guatemala" | "Guernsey" | "Guinea" | "Guinea - Bissau" | "Guyana" | "Haiti" | "Holy See" | "Honduras" | "Hong Kong" | "Hungary" | "Iceland" | "India" | "Indonesia" | "Iran" | "Iraq" | "Ireland" | "Isle of Man" | "Israel" | "Italy" | "Ivory Coast" | "Jamaica" | "Japan" | "Jersey" | "Jordan" | "Kazakhstan" | "Kenya" | "Kiribati" | "Korea, Republic of" | "Kuwait" | "Kyrgyzstan" | "Laos" | "Latvia" | "Lebanon" | "Lesotho" | "Liberia" | "Libya" | "Liechtenstein" | "Lithuania" | "Luxembourg" | "Macao" | "Macedonia" | "Madagascar" | "Malawi" | "Malaysia" | "Maldives" | "Mali" | "Malta" | "Marshall Islands" | "Martinique" | "Mauritania" | "Mauritius0" | "Mayotte" | "Mexico" | "Moldova" | "Monaco" | "Mongolia" | "Montenegro" | "Montserrat" | "Morocco" | "Mozambique" | "Myanmar" | "Namibia" | "Nauru" | "Nepal" | "Netherlands" | "Netherlands Antilles" | "New Caledonia" | "New Zealand" | "Nicaragua" | "Niger" | "Nigeria" | "Niue" | "Norfolk Island" | "North Korea" | "Northern Mariana Islands" | "Norway" | "Oman" | "Pakistan" | "Palau" | "Palestinian Territory" | "Panama" | "Papua New Guinea" | "Paraguay" | "Peru" | "Philippines" | "Pitcairn Island" | "Poland" | "Portugal" | "Puerto Rico" | "Qatar" | "Reunion" | "Romania" | "Russia" | "Rwanda" | "Saint Barthelemy" | "Saint Helena" | "Saint Kitts and Nevis" | "Saint Lucia" | "Saint Martin" | "Saint Pierre and Miquelon" | "Saint Vincent & the Grenadines" | "Samoa" | "San Marino" | "Sao Tome and Principe" | "Saudi Arabia" | "Senegal" | "Serbia" | "Seychelles" | "Sierra Leone" | "Singapore" | "Sint Maarten(Dutch)" | "Slovakia" | "Slovenia" | "Solomon Islands" | "Somalia" | "South Africa" | "South Georgia & the South Sandwich Islands" | "South Sudan" | "Spain" | "Sri Lanka" | "Sudan" | "Suriname" | "Svalbard & Jan Mayen Islands" | "Swaziland" | "Sweden" | "Switzerland" | "Syria" | "Taiwan" | "Tajikistan" | "Tanzania" | "Thailand" | "Timor - Leste(formerly East Timor)" | "Togo" | "Tokelau" | "Tonga" | "Trinidad and Tobago" | "Tunisia" | "Turkey" | "Turkmenistan" | "Turks and Caicos Islands" | "Tuvalu" | "Uganda" | "Ukraine" | "United Arab Emirates" | "United Kingdom" | "United States Virgin Islands" | "U.S. Minor Outlying Islands" | "United States of America" | "Uruguay" | "Uzbekistan" | "Vanuatu" | "Venezuela" | "Vietnam" | "Wallis and Futuna Islands" | "Western Sahara" | "Yemen" | "Zambia" | "Zimbabwe";
11
11
  value: "AF" | "AX" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AQ" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BQ" | "BA" | "BW" | "BR" | "IO" | "VG" | "BN" | "BG" | "BF" | "BI" | "CA" | "KH" | "CM" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CX" | "CC" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "HR" | "CU" | "CW" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FK" | "FO" | "FM" | "FJ" | "FI" | "FR" | "GF" | "PF" | "TF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GG" | "GN" | "GW" | "GY" | "HT" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IM" | "IL" | "IT" | "CI" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "KR" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "AN" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "KP" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PN" | "PL" | "PT" | "PR" | "QA" | "RE" | "RO" | "RU" | "RW" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SX" | "SK" | "SI" | "SB" | "SO" | "ZA" | "GS" | "SS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "VI" | "UM" | "US" | "UY" | "UZ" | "VU" | "VE" | "VN" | "WF" | "EH" | "YE" | "ZM" | "ZW";
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * @category Hooks
7
7
  */
8
- export declare const useStateCodeOptions: (domestic?: boolean) => {
9
- label: "Alabama" | "Alaska" | "American Samoa" | "Arizona" | "Arkansas" | "Armed Forces Americas" | "Armed Forces Europe" | "Armed Forces Pacific" | "California" | "Colorado" | "Connecticut" | "Delaware" | "District of Columbia" | "Florida" | "Georgia" | "Guam" | "Hawaii" | "Idaho" | "Illinois" | "Indiana" | "Iowa" | "Kansas" | "Kentucky" | "Louisiana" | "Maine" | "Marshall Islands" | "Maryland" | "Massachusetts" | "Michigan" | "Micronesia" | "Minnesota" | "Mississippi" | "Missouri" | "Montana" | "Nebraska" | "Nevada" | "New Hampshire" | "New Jersey" | "New Mexico" | "New York" | "North Carolina" | "North Dakota" | "Northern Mariana Islands" | "Ohio" | "Oklahoma" | "Oregon" | "Palau" | "Pennsylvania" | "Puerto Rico" | "Rhode Island" | "South Carolina" | "South Dakota" | "Tennessee" | "Texas" | "Utah" | "Vermont" | "Virgin Islands" | "Virginia" | "Washington" | "West Virginia" | "Wisconsin" | "Wyoming" | "U.S. Minor Outlying Islands";
8
+ export declare const useStateCodeOptions: () => {
9
+ label: string;
10
10
  value: "AL" | "AK" | "AS" | "AZ" | "AR" | "AA" | "AE" | "AP" | "CA" | "CO" | "CT" | "DE" | "DC" | "FL" | "GA" | "GU" | "HI" | "ID" | "IL" | "IN" | "IA" | "KS" | "KY" | "LA" | "ME" | "MH" | "MD" | "MA" | "MI" | "FM" | "MN" | "MS" | "MO" | "MT" | "NE" | "NV" | "NH" | "NJ" | "NM" | "NY" | "NC" | "ND" | "MP" | "OH" | "OK" | "OR" | "PW" | "PA" | "PR" | "RI" | "SC" | "SD" | "TN" | "TX" | "UT" | "VT" | "VI" | "VA" | "WA" | "WV" | "WI" | "WY" | "UM";
11
11
  }[];
@@ -1,30 +1,25 @@
1
1
  import { CodedError, SE } from "@shipengine/react-api";
2
- import { ConfigureShipmentProps } from "../configure-shipment";
2
+ import { ShipFromAddress } from "../types";
3
3
  export type UseConfigureShipmentProps = {
4
4
  errorWhenShipmentCancelled?: boolean;
5
5
  externalOrderId?: string;
6
6
  externalOrderNumber?: string;
7
7
  externalShipmentId?: string;
8
8
  onLoad?: (shipments: SE.SalesOrderShipment[], salesOrder?: SE.SalesOrder, pendingShipment?: SE.SalesOrderShipment) => Promise<void> | void;
9
- onShipmentUpdated: ConfigureShipmentProps["onShipmentUpdated"];
9
+ onShipmentUpdated?: (shipment: SE.SalesOrderShipment) => Promise<void> | void;
10
10
  orderSourceCode?: string;
11
11
  salesOrderId?: string;
12
- shipFromAddresses?: ConfigureShipmentProps["shipFromAddresses"];
12
+ shipFromAddresses?: ShipFromAddress[];
13
13
  shipmentId?: string;
14
14
  useWarehouses?: boolean;
15
15
  warehouseId?: string;
16
16
  };
17
- /**
18
- * The high-level goal of this hook is to get or create the required data to run the Configure shipment component.
19
- * To run the Configure Shipment Component you need shipments. To get a shipment you either need a Shipment ID or
20
- * a Sales Order Id (or other relevant Sales Order entity id, external order id, order source code, external order number).
21
- * My initial thought is to combine the hooks used in useGetOrCreateShipment and useImportSalesOrder to pull in all
22
- * the relevant information. I will leverage the built-in functionality of the React Query Hooks to optimize this custom hook.
23
- */
24
17
  export declare const useConfigureShipment: ({ onShipmentUpdated, onLoad, errorWhenShipmentCancelled, externalOrderId, externalOrderNumber, externalShipmentId, orderSourceCode, salesOrderId, shipFromAddresses, shipmentId, warehouseId, useWarehouses, }: UseConfigureShipmentProps) => {
18
+ carriers: SE.Carrier[] | undefined;
25
19
  errors: CodedError[] | undefined;
26
20
  isLoading: boolean;
27
21
  refetchPendingSalesOrderShipments: () => Promise<SE.SalesOrderShipment | undefined>;
28
22
  salesOrder: SE.SalesOrder | undefined;
29
23
  shipment: SE.SalesOrderShipment | undefined;
24
+ warehouses: SE.Warehouse[] | undefined;
30
25
  };
@@ -0,0 +1,3 @@
1
+ declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
2
+ export default _default;
3
+ export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
@@ -97,16 +97,18 @@ declare const _default: {
97
97
  vatNumber: string;
98
98
  vatRegistrationTooltip: string;
99
99
  vatFormText: string;
100
- vatFormRegisterLater: string;
101
100
  vatNumberInputHint: string;
102
101
  vatNumberInputPlaceholder: string;
103
102
  verifiedVat: string;
103
+ vatNumberFieldLabel: string;
104
+ vatTypePlaceholder: string;
105
+ issuingAuthorityPlaceholder: string;
106
+ issuingAuthorityFieldLabel: string;
104
107
  vatFormErrors: {
105
108
  invalidFieldValue: string;
106
109
  verificationFailure: string;
107
110
  forbidden: string;
108
111
  connectionNotSupported: string;
109
- genericTitle: string;
110
112
  genericText: string;
111
113
  };
112
114
  };
@@ -798,6 +800,7 @@ declare const _default: {
798
800
  taxIssuingAuthority: string;
799
801
  entityType: string;
800
802
  };
803
+ hsCode: string;
801
804
  nonDelivery: {
802
805
  returnToSender: string;
803
806
  treatAsAbandoned: string;
@@ -835,6 +838,7 @@ declare const _default: {
835
838
  shipments: string;
836
839
  warehouses: string;
837
840
  };
841
+ labelHasBeenPurchased: string;
838
842
  emailIsRequired: string;
839
843
  unknown: string;
840
844
  noRatesAvailable: string;
@@ -0,0 +1,10 @@
1
+ export type HarmonizedTariffCode = {
2
+ /**
3
+ * The HS Code value
4
+ */
5
+ code: string;
6
+ /**
7
+ * The description of the HS Code
8
+ */
9
+ description: string;
10
+ };
@@ -1,6 +1,7 @@
1
+ export * from "./canada-ddp";
1
2
  export * from "./carrier-metadata";
2
- export * from "./shipping-preset";
3
- export * from "./preferred-rates";
3
+ export * from "./harmonized-tariff-code";
4
4
  export * from "./insurance-metadata";
5
+ export * from "./preferred-rates";
5
6
  export * from "./ship-from-address";
6
- export * from "./canada-ddp";
7
+ export * from "./shipping-preset";
@@ -16,5 +16,5 @@ import { FieldValues, ResolverResult, UseFormHandleSubmit } from "react-hook-for
16
16
  export declare const formLogger: {
17
17
  capture(handleSubmit: ReturnType<UseFormHandleSubmit<any>>): (e?: React.BaseSyntheticEvent) => void;
18
18
  isSubmitting: boolean;
19
- log: <T, U extends FieldValues>(values: T, getValidationResult: () => Promise<ResolverResult<U>>) => Promise<ResolverResult<U>>;
19
+ log: <U extends FieldValues>(getValidationResult: () => Promise<ResolverResult<U>>, sensitiveValues?: string[]) => Promise<ResolverResult<U>>;
20
20
  };