@shipengine/elements 2.13.1 → 2.15.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 (87) hide show
  1. package/actions-menu.js +5 -5
  2. package/components.js +1 -1
  3. package/elements.js +1 -1
  4. package/hooks.js +1 -1
  5. package/index.js +1 -1
  6. package/package.json +8 -5
  7. package/src/components/address-preference-context/address-preference-context.d.ts +1 -1
  8. package/src/components/drawer/drawer.styles.d.ts +1 -0
  9. package/src/components/enable-insurance-banner/enable-insurance-banner.d.ts +4 -3
  10. package/src/components/pager/usePager.d.ts +1 -0
  11. package/src/components/tabs/tabs.styles.d.ts +1 -0
  12. package/src/components/templates/address-form/address-fields.d.ts +1 -2
  13. package/src/components/templates/address-form/address-form.d.ts +1 -2
  14. package/src/components/templates/product-form/product-form.d.ts +3 -1
  15. package/src/components/templates/products-display/products-display.d.ts +4 -4
  16. package/src/components/templates/rate-form/rate-form.styles.d.ts +3 -0
  17. package/src/components/templates/register-funding-source-insurance-form/register-funding-source-insurance-form.d.ts +3 -1
  18. package/src/components/templates/shipment-form/sections/customs-forms/customs-forms.d.ts +3 -2
  19. package/src/components/templates/shipment-form/shipment-form.d.ts +5 -2
  20. package/src/components/templates/theme-creator/theme-creator.d.ts +1 -0
  21. package/src/components/templates/theme-creator/theme-creator.styles.d.ts +40 -2
  22. package/src/components/templates/wallet-form/edit-wallet-address-form.d.ts +1 -1
  23. package/src/components/templates/wallet-form/wallet-schema.d.ts +1 -1
  24. package/src/components/vat-form/vat-form-schema.d.ts +21 -3
  25. package/src/components/vat-form/vat-form.d.ts +7 -2
  26. package/src/components/vat-form/vat-form.styles.d.ts +3 -0
  27. package/src/components/vat-form/vat-types.d.ts +6 -0
  28. package/src/components/warehouse-form/warehouse-form-schema.d.ts +6 -0
  29. package/src/components/warehouse-form/warehouse-form.d.ts +3 -1
  30. package/src/elements/labels-grid/hooks/use-labels-grid.d.ts +1 -0
  31. package/src/elements/labels-grid/labels-grid.d.ts +44 -17
  32. package/src/elements/manage-carriers/manage-carriers.d.ts +11 -3
  33. package/src/elements/manage-external-carriers/manage-external-carriers.d.ts +11 -3
  34. package/src/elements/manage-funding/manage-funding-element.d.ts +11 -3
  35. package/src/elements/manage-warehouses/manage-warehouses.d.ts +11 -3
  36. package/src/elements/payment-method-settings/payment-method-settings-element.d.ts +11 -3
  37. package/src/elements/purchase-label/configure-shipment.d.ts +3 -2
  38. package/src/elements/purchase-label/hooks/index.d.ts +0 -2
  39. package/src/elements/purchase-label/hooks/use-shipment-form.d.ts +2 -1
  40. package/src/elements/purchase-label/purchase-label.d.ts +33 -40
  41. package/src/elements/select-label-layout/select-label-layout-element.d.ts +11 -3
  42. package/src/elements/shipment-summary/shipment-summary.d.ts +14 -7
  43. package/src/elements/shipments-grid/hooks/use-shipments-grid.d.ts +1 -0
  44. package/src/elements/shipments-grid/shipments-grid.d.ts +11 -6
  45. package/src/elements/theme-creator/theme-creator.d.ts +11 -3
  46. package/src/elements/transaction-history/transaction-history-element.d.ts +11 -3
  47. package/src/elements/unit-settings/unit-settings-element.d.ts +11 -3
  48. package/src/elements/vat-settings/vat-settings-element.d.ts +11 -3
  49. package/src/elements/void-label/void-label.d.ts +41 -47
  50. package/src/elements-provider/elements-provider.d.ts +1 -2
  51. package/src/features/manage-carriers/manage-insurance-provider-row/manage-insurance-provider-row.d.ts +2 -1
  52. package/src/features/vat-settings/use-vat-settings.d.ts +1 -1
  53. package/src/features/vat-settings/vat-settings.d.ts +1 -4
  54. package/src/features/vat-settings/vat-settings.styles.d.ts +7 -0
  55. package/src/hooks/index.d.ts +2 -0
  56. package/src/hooks/insurance/use-manage-funding-source-insurance.d.ts +3 -2
  57. package/src/hooks/options/use-country-code-options.d.ts +1 -1
  58. package/src/hooks/options/use-state-code-options.d.ts +2 -2
  59. package/src/{elements/purchase-label/hooks → hooks}/use-configure-shipment.d.ts +5 -10
  60. package/src/hooks/use-helpers.stories.d.ts +3 -0
  61. package/src/hooks/use-nested-form.d.ts +6 -2
  62. package/src/locales/en/index.d.ts +11 -3
  63. package/src/themes/auctane.d.ts +3 -0
  64. package/src/themes/index.d.ts +1 -0
  65. package/src/types/harmonized-tariff-code.d.ts +10 -0
  66. package/src/types/index.d.ts +4 -3
  67. package/src/workflows/account-settings/account-settings.d.ts +11 -3
  68. package/src/workflows/carrier-services/carrier-services.d.ts +11 -26
  69. package/src/workflows/connect-external-carrier/connect-external-carrier.d.ts +11 -3
  70. package/src/workflows/label-workflow/label-workflow.d.ts +1126 -101
  71. package/src/workflows/onboarding/components/ship-from-address-step/ship-from-address-step.d.ts +1 -1
  72. package/src/workflows/onboarding/onboarding.d.ts +12 -4
  73. package/transaction-history-element.js +1 -1
  74. package/use-configure-shipment.js +1 -0
  75. package/use-toggle.js +1 -1
  76. package/use-unit-settings.js +1 -1
  77. package/usePager.js +1 -1
  78. package/utilities.js +1 -1
  79. package/vat.js +1 -1
  80. package/wallet-form.js +1 -1
  81. package/warehouses.js +1 -0
  82. package/workflows.js +1 -1
  83. package/shipment.js +0 -1
  84. package/src/elements/theme-creator/themeData/index.d.ts +0 -1
  85. package/src/elements/theme-creator/themeData/themeData.d.ts +0 -2
  86. package/use-scrub-errors.js +0 -1
  87. /package/src/{elements/purchase-label/hooks → hooks}/use-import-sales-order.d.ts +0 -0
@@ -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
  };
@@ -230,12 +235,20 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
230
235
  subtitle: string;
231
236
  };
232
237
  insuranceProviders: {
238
+ connectionError: {
239
+ title: string;
240
+ description: string;
241
+ };
233
242
  parcelguard: {
234
243
  description: string;
235
244
  terms: string;
236
245
  termsLink: string;
237
246
  popover: {
238
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
+ */
239
252
  description: string;
240
253
  };
241
254
  };
@@ -310,6 +323,9 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
310
323
  duties_and_taxes: string;
311
324
  brokerage_fee: string;
312
325
  admin_fee: string;
326
+ /**
327
+ * `labelId` is the unique identifier for the label you wish to void.
328
+ */
313
329
  adjustment: string;
314
330
  auctane_service_fee: string;
315
331
  product_price: string;
@@ -352,31 +368,6 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
352
368
  "requires-additional-handling": string;
353
369
  addOns: string;
354
370
  contentDescription: string;
355
- /**
356
- * # Void Label Component
357
- *
358
- * - The `<VoidLabel />` component is used to void a given shipping label. When a label is voided,
359
- * you then get the option to view the associated shipment via the `Shipment Summary` Element, or
360
- * you can purchase another label for the shipment via the `Purchase Label` Element.
361
- *
362
- * @param ComponentProps The base props that will be passed into the `<VoidLabel />` component.
363
- *
364
- * @returns Element An EmotionJSX.Element that will render the `<VoidLabel />` component
365
- * with all the appropriate wrappers.
366
- *
367
- * @example
368
- * You can see how the `<Component />` is used in the `createElement` function call below.
369
- * ```tsx
370
- * export const Element = createElement(Component, ErrorFallback, {
371
- *
372
- * resources: { en },
373
- * });
374
- * ```
375
- *
376
- * <br />
377
- *
378
- * @see {@link VoidLabel.Element | The **Element** created to render `<VoidLabel />`}
379
- */
380
371
  confirmation: string;
381
372
  dimensions: {
382
373
  length: string;
@@ -471,11 +462,12 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
471
462
  shipToAddressFormFields: string;
472
463
  sections: {
473
464
  customsForm: string;
474
- windsorFramework: string; /**
465
+ /**
475
466
  * # Void Label Element Props
476
467
  *
477
468
  * @see {@link VoidLabel.Element | See the full type that `typeof Element` will return}
478
469
  */
470
+ windsorFramework: string;
479
471
  shipment: string;
480
472
  rate_one: string;
481
473
  rate_other: string;
@@ -588,24 +580,24 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
588
580
  isEnabled: string;
589
581
  isLoading: string;
590
582
  lowBalancePurchaseThreshold: string;
591
- /**
592
- * # Void Label Component Props
593
- *
594
- * - These are the base props that will be passed into the `<VoidLabel />` component.
595
- *
596
- * @see {@link VoidLabel.Component | This prop types usage in the `<VoidLabel />` component}
597
- */
598
583
  maximumPurchasesPerDay: string;
599
584
  purchaseAmount: string;
600
585
  readSettings: string;
601
586
  };
602
587
  addFunds: {
603
- 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
+ */
604
592
  error: {
605
593
  title: string;
606
594
  message: string;
607
595
  };
608
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
+ */
609
601
  labels: {
610
602
  amount: string;
611
603
  };
@@ -653,7 +645,6 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
653
645
  savingFailed: string;
654
646
  };
655
647
  units: {
656
- title: string;
657
648
  /**
658
649
  * # Void Label Component Props
659
650
  *
@@ -661,6 +652,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
661
652
  *
662
653
  * @see {@link VoidLabel.Component | This prop types usage in the `<VoidLabel />` component}
663
654
  */
655
+ title: string;
664
656
  dimensions: {
665
657
  title: string;
666
658
  standard: string;
@@ -737,9 +729,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
737
729
  voided: string;
738
730
  error: string;
739
731
  completed: string;
740
- processing: string; /**
741
- * `labelId` is the unique identifier for the label you wish to void.
742
- */
732
+ processing: string;
743
733
  };
744
734
  trackingStatus: {
745
735
  unknown: string;
@@ -756,7 +746,12 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
756
746
  errorMessages: {
757
747
  title: string;
758
748
  subtitle: string;
759
- };
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
+ */
760
755
  };
761
756
  "connect-carrier": {
762
757
  actions: {
@@ -785,10 +780,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
785
780
  toastBody: string;
786
781
  };
787
782
  deleteCarrierErrorTitle: string;
788
- deleteCarrierErrorMessage: string; /**
789
- * `onSuccess` is a callback function that will be invoked when the request to void a given
790
- * shipping label is successful.
791
- */
783
+ deleteCarrierErrorMessage: string;
792
784
  loadingDeletingCarrier: string;
793
785
  };
794
786
  common: {
@@ -933,6 +925,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
933
925
  taxIssuingAuthority: string;
934
926
  entityType: string;
935
927
  };
928
+ hsCode: string;
936
929
  nonDelivery: {
937
930
  returnToSender: string;
938
931
  treatAsAbandoned: string;
@@ -970,6 +963,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
970
963
  shipments: string;
971
964
  warehouses: string;
972
965
  };
966
+ labelHasBeenPurchased: string;
973
967
  emailIsRequired: string;
974
968
  unknown: string;
975
969
  noRatesAvailable: string;
@@ -1080,7 +1074,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
1080
1074
  };
1081
1075
  invalidAddressName: string;
1082
1076
  invalidAddressNameStrict: string;
1083
- invalidAddressOnboarding: string;
1077
+ invalidAddressNameOnboarding: string;
1084
1078
  invalidAddressPoBox: string;
1085
1079
  invalidCreditCardType: string;
1086
1080
  invalidExpirationDate: 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,7 +1,8 @@
1
+ import { SE } from "@shipengine/js-api";
1
2
  import { InsuranceProviderProfile } from "../../../types";
2
3
  export * from "./manage-insurance-provider-row";
3
4
  export type ManageInsuranceProviderRowProps = {
4
5
  insuranceProviderProfile: InsuranceProviderProfile;
5
- registerProvider: (p: InsuranceProviderProfile) => Promise<void>;
6
+ registerProvider: (p: InsuranceProviderProfile) => Promise<SE.CarrierRegistrationResponse | undefined>;
6
7
  };
7
8
  export declare const ManageInsuranceProviderRow: ({ registerProvider, insuranceProviderProfile, }: ManageInsuranceProviderRowProps) => 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,6 +5,7 @@ export declare const useManageFundingSourceInsurance: () => {
5
5
  insuranceAcceptedTerms: SE.Term[] | undefined;
6
6
  insuranceProviderProfiles: InsuranceProviderProfile[] | undefined;
7
7
  loading: boolean;
8
- registerInsuranceProvider: () => Promise<void>;
9
- registerInsuranceProviderSuccess: boolean;
8
+ registerInsuranceProvider: () => Promise<{
9
+ isSuccessful: boolean;
10
+ }>;
10
11
  };
@@ -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>;
@@ -7,7 +7,9 @@ import React from "react";
7
7
  export type NestedFormProps<T, U> = {
8
8
  formId: string;
9
9
  onCancel?: () => void;
10
- onSubmit: (payload: U) => Promise<void> | void;
10
+ onSubmit: (payload: U) => Promise<void> | Promise<{
11
+ isSuccessful: boolean;
12
+ }> | void;
11
13
  } & T;
12
14
  type HookProps = {
13
15
  initialOpenState?: boolean;
@@ -28,7 +30,9 @@ type HookProps = {
28
30
  export declare const useNestedForm: <T, U>(form: React.FC<NestedFormProps<T, U>>, props: {
29
31
  formId: string;
30
32
  onCancel?: (() => void) | undefined;
31
- onSubmit: (payload: U) => Promise<void> | void;
33
+ onSubmit: (payload: U) => Promise<void> | Promise<{
34
+ isSuccessful: boolean;
35
+ }> | void;
32
36
  } & T & {
33
37
  portalRef?: undefined;
34
38
  }, hookProps?: HookProps) => readonly [import("@emotion/react/jsx-runtime").JSX.Element, boolean, React.DispatchWithoutAction];
@@ -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
  };
@@ -139,6 +141,10 @@ declare const _default: {
139
141
  subtitle: string;
140
142
  };
141
143
  insuranceProviders: {
144
+ connectionError: {
145
+ title: string;
146
+ description: string;
147
+ };
142
148
  parcelguard: {
143
149
  description: string;
144
150
  terms: string;
@@ -794,6 +800,7 @@ declare const _default: {
794
800
  taxIssuingAuthority: string;
795
801
  entityType: string;
796
802
  };
803
+ hsCode: string;
797
804
  nonDelivery: {
798
805
  returnToSender: string;
799
806
  treatAsAbandoned: string;
@@ -831,6 +838,7 @@ declare const _default: {
831
838
  shipments: string;
832
839
  warehouses: string;
833
840
  };
841
+ labelHasBeenPurchased: string;
834
842
  emailIsRequired: string;
835
843
  unknown: string;
836
844
  noRatesAvailable: string;
@@ -941,7 +949,7 @@ declare const _default: {
941
949
  };
942
950
  invalidAddressName: string;
943
951
  invalidAddressNameStrict: string;
944
- invalidAddressOnboarding: string;
952
+ invalidAddressNameOnboarding: string;
945
953
  invalidAddressPoBox: string;
946
954
  invalidCreditCardType: string;
947
955
  invalidExpirationDate: string;
@@ -0,0 +1,3 @@
1
+ import { CustomThemeData } from "@shipengine/giger-theme";
2
+ declare const auctaneThemeData: CustomThemeData;
3
+ export default auctaneThemeData;
@@ -1,4 +1,5 @@
1
1
  declare const themeData: {
2
+ auctane: import("@shipengine/giger-theme/dist/lib/ThemeTypes").CustomThemeData;
2
3
  fallback: import("@shipengine/giger-theme/dist/lib/ThemeTypes").CustomThemeData;
3
4
  };
4
5
  export default themeData;
@@ -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";
@@ -133,16 +133,18 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
133
133
  vatNumber: string;
134
134
  vatRegistrationTooltip: string;
135
135
  vatFormText: string;
136
- vatFormRegisterLater: string;
137
136
  vatNumberInputHint: string;
138
137
  vatNumberInputPlaceholder: string;
139
138
  verifiedVat: string;
139
+ vatNumberFieldLabel: string;
140
+ vatTypePlaceholder: string;
141
+ issuingAuthorityPlaceholder: string;
142
+ issuingAuthorityFieldLabel: string;
140
143
  vatFormErrors: {
141
144
  invalidFieldValue: string;
142
145
  verificationFailure: string;
143
146
  forbidden: string;
144
147
  connectionNotSupported: string;
145
- genericTitle: string;
146
148
  genericText: string;
147
149
  };
148
150
  };
@@ -175,6 +177,10 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
175
177
  subtitle: string;
176
178
  };
177
179
  insuranceProviders: {
180
+ connectionError: {
181
+ title: string;
182
+ description: string;
183
+ };
178
184
  parcelguard: {
179
185
  description: string;
180
186
  terms: string;
@@ -830,6 +836,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
830
836
  taxIssuingAuthority: string;
831
837
  entityType: string;
832
838
  };
839
+ hsCode: string;
833
840
  nonDelivery: {
834
841
  returnToSender: string;
835
842
  treatAsAbandoned: string;
@@ -867,6 +874,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
867
874
  shipments: string;
868
875
  warehouses: string;
869
876
  };
877
+ labelHasBeenPurchased: string;
870
878
  emailIsRequired: string;
871
879
  unknown: string;
872
880
  noRatesAvailable: string;
@@ -977,7 +985,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
977
985
  };
978
986
  invalidAddressName: string;
979
987
  invalidAddressNameStrict: string;
980
- invalidAddressOnboarding: string;
988
+ invalidAddressNameOnboarding: string;
981
989
  invalidAddressPoBox: string;
982
990
  invalidCreditCardType: string;
983
991
  invalidExpirationDate: string;
@@ -130,39 +130,18 @@ export declare const Element: ({ resources, ...props }: CarrierServicesProps & {
130
130
  vatNumber: string;
131
131
  vatRegistrationTooltip: string;
132
132
  vatFormText: string;
133
- vatFormRegisterLater: string;
134
133
  vatNumberInputHint: string;
135
- /**
136
- * # Carrier-Services Component
137
- *
138
- * @param ComponentProps The base props that will be passed into the `<CarrierServices />` component.
139
- *
140
- * @returns Element A React element that renders the `<CarrierServices />` component allowing users
141
- * to view a list of carriers that are connected to their ShipEngine account, add funds to their wallet, view transaction history, and manage their payment method. This component is
142
- * composed in the `<AccountSettings />` Element.
143
- *
144
- * @example
145
- * ```tsx
146
- * (() => {
147
- * const features = useFeatures("Global");
148
- *
149
- * return <CarrierServices.Element features={features} />;
150
- * })();
151
- * ```
152
- *
153
- * <br />
154
- *
155
- * @see {@link CarrierServices.ComponentProps | The props that are passed into the `<CarrierServices />` component}
156
- * @see {@link AccountSettings.Element | The `<AccountSettings />` component renders the `<CarrierServices />` component}
157
- */
158
134
  vatNumberInputPlaceholder: string;
159
135
  verifiedVat: string;
136
+ vatNumberFieldLabel: string;
137
+ vatTypePlaceholder: string;
138
+ issuingAuthorityPlaceholder: string;
139
+ issuingAuthorityFieldLabel: string;
160
140
  vatFormErrors: {
161
141
  invalidFieldValue: string;
162
142
  verificationFailure: string;
163
143
  forbidden: string;
164
144
  connectionNotSupported: string;
165
- genericTitle: string;
166
145
  genericText: string;
167
146
  };
168
147
  };
@@ -195,6 +174,10 @@ export declare const Element: ({ resources, ...props }: CarrierServicesProps & {
195
174
  subtitle: string;
196
175
  };
197
176
  insuranceProviders: {
177
+ connectionError: {
178
+ title: string;
179
+ description: string;
180
+ };
198
181
  parcelguard: {
199
182
  description: string;
200
183
  terms: string;
@@ -873,6 +856,7 @@ export declare const Element: ({ resources, ...props }: CarrierServicesProps & {
873
856
  taxIssuingAuthority: string;
874
857
  entityType: string;
875
858
  };
859
+ hsCode: string;
876
860
  nonDelivery: {
877
861
  returnToSender: string;
878
862
  treatAsAbandoned: string;
@@ -910,6 +894,7 @@ export declare const Element: ({ resources, ...props }: CarrierServicesProps & {
910
894
  shipments: string;
911
895
  warehouses: string;
912
896
  };
897
+ labelHasBeenPurchased: string;
913
898
  emailIsRequired: string;
914
899
  unknown: string;
915
900
  noRatesAvailable: string;
@@ -1020,7 +1005,7 @@ export declare const Element: ({ resources, ...props }: CarrierServicesProps & {
1020
1005
  };
1021
1006
  invalidAddressName: string;
1022
1007
  invalidAddressNameStrict: string;
1023
- invalidAddressOnboarding: string;
1008
+ invalidAddressNameOnboarding: string;
1024
1009
  invalidAddressPoBox: string;
1025
1010
  invalidCreditCardType: string;
1026
1011
  invalidExpirationDate: string;