@shipengine/elements 2.11.1 → 2.13.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 (109) hide show
  1. package/actions-menu.js +5 -5
  2. package/canada-ddp.js +1 -0
  3. package/carrier.js +1 -1
  4. package/components.js +1 -1
  5. package/elements.js +1 -1
  6. package/hooks.js +1 -1
  7. package/index.js +1 -1
  8. package/package.json +4 -4
  9. package/shipment.js +1 -1
  10. package/src/components/actions-menu/actions-menu.d.ts +2 -1
  11. package/src/components/add-funds-form/add-funds-form.d.ts +9 -1
  12. package/src/components/carrier-connection-card/carrier-connection-card.styles.d.ts +1 -1
  13. package/src/components/collapsible-panel/collapsible-panel.d.ts +15 -1
  14. package/src/components/field/date-picker/date-picker.d.ts +3 -1
  15. package/src/components/field/rate-select/rate-card/cost-breakdown/cost-breakdown.styles.d.ts +2 -1
  16. package/src/components/field/rate-select/rate-card/rate-card.styles.d.ts +1 -1
  17. package/src/components/field/select/select-with-categories.d.ts +1 -0
  18. package/src/components/grid-controller/grid-controller.styles.d.ts +8 -3
  19. package/src/components/grid-filters/components/label-id-filter/label-id-filter.styles.d.ts +1 -1
  20. package/src/components/grid-filters/grid-filters.d.ts +2 -1
  21. package/src/components/history/history-card/history-card.styles.d.ts +1 -1
  22. package/src/components/index.d.ts +1 -0
  23. package/src/components/save-status/save-status.d.ts +15 -1
  24. package/src/components/ship-from-address-form/index.d.ts +1 -0
  25. package/src/components/ship-from-address-form/ship-from-address-form-schema.d.ts +436 -0
  26. package/src/components/ship-from-address-form/ship-from-address-form.d.ts +20 -0
  27. package/src/components/ship-from-address-form/ship-from-address-form.styles.d.ts +20 -0
  28. package/src/components/templates/index.d.ts +1 -1
  29. package/src/components/templates/label-display/label-card.styles.d.ts +1 -1
  30. package/src/components/templates/rate-form/rate-form.d.ts +3 -2
  31. package/src/components/templates/shipment-form/sections/customs-forms/customs-forms.d.ts +2 -1
  32. package/src/components/templates/shipment-form/shipment-form.d.ts +10 -6
  33. package/src/components/templates/shipment-form/shipment-form.styles.d.ts +1 -0
  34. package/src/components/templates/shipment-form/shipment-schema.d.ts +41 -121
  35. package/src/components/templates/suspend-purchase/index.d.ts +1 -0
  36. package/src/components/templates/suspend-purchase/suspend-purchase.d.ts +8 -0
  37. package/src/components/templates/theme-creator/theme-creator.styles.d.ts +1 -1
  38. package/src/components/warehouse-form/warehouse-form-schema.d.ts +148 -34
  39. package/src/elements/labels-grid/hooks/use-labels-grid.d.ts +4 -0
  40. package/src/elements/labels-grid/labels-grid.d.ts +47 -23
  41. package/src/elements/manage-carriers/manage-carriers.d.ts +25 -1
  42. package/src/elements/manage-external-carriers/manage-external-carriers.d.ts +25 -1
  43. package/src/elements/manage-funding/manage-funding-element.d.ts +25 -1
  44. package/src/elements/manage-warehouses/manage-warehouses.d.ts +25 -1
  45. package/src/elements/payment-method-settings/payment-method-settings-element.d.ts +25 -1
  46. package/src/elements/purchase-label/configure-shipment.d.ts +3 -2
  47. package/src/elements/purchase-label/hooks/index.d.ts +0 -2
  48. package/src/elements/purchase-label/hooks/use-address.d.ts +1 -1
  49. package/src/elements/purchase-label/hooks/use-configure-shipment.d.ts +23 -12
  50. package/src/elements/purchase-label/hooks/use-customs.d.ts +1 -1
  51. package/src/elements/purchase-label/hooks/use-import-sales-order.d.ts +2 -1
  52. package/src/elements/purchase-label/hooks/use-shipment-form.d.ts +14 -5
  53. package/src/elements/purchase-label/purchase-label.d.ts +102 -49
  54. package/src/elements/select-label-layout/select-label-layout-element.d.ts +25 -1
  55. package/src/elements/shipment-summary/shipment-summary.d.ts +40 -8
  56. package/src/elements/shipments-grid/shipments-grid.d.ts +101 -21
  57. package/src/elements/theme-creator/theme-creator.d.ts +25 -1
  58. package/src/elements/transaction-history/transaction-history-element.d.ts +25 -1
  59. package/src/elements/unit-settings/unit-settings-element.d.ts +25 -1
  60. package/src/elements/vat-settings/vat-settings-element.d.ts +25 -1
  61. package/src/elements/void-label/components/actions/actions.d.ts +2 -1
  62. package/src/elements/void-label/void-label.d.ts +80 -25
  63. package/src/elements-provider/elements-context-provider.d.ts +10 -3
  64. package/src/elements-provider/elements-provider.d.ts +7 -2
  65. package/src/features/manage-carriers/index.d.ts +1 -0
  66. package/src/features/manage-carriers/manage-carriers.d.ts +12 -1
  67. package/src/features/manage-carriers/use-manage-carriers.d.ts +15 -0
  68. package/src/features/manage-funding/manage-funding.d.ts +10 -1
  69. package/src/features/vat-settings/use-vat-settings.d.ts +1 -1
  70. package/src/hooks/options/index.d.ts +1 -1
  71. package/src/hooks/options/use-insurance-provider-options.d.ts +1 -1
  72. package/src/hooks/options/use-ship-from-address-options.d.ts +19 -0
  73. package/src/hooks/options/use-shipment-metadata.d.ts +1 -0
  74. package/src/hooks/use-root-portal.d.ts +3 -2
  75. package/src/locales/en/index.d.ts +25 -1
  76. package/src/types/canada-ddp.d.ts +4 -0
  77. package/src/types/index.d.ts +2 -0
  78. package/src/types/ship-from-address.d.ts +4 -0
  79. package/src/utilities/feature-flags/types.d.ts +7 -1
  80. package/src/utilities/shipengine/address.d.ts +32 -0
  81. package/src/utilities/shipengine/sales-order.d.ts +2 -2
  82. package/src/utilities/shipengine/warehouses.d.ts +2 -1
  83. package/src/utilities/styles.d.ts +6 -2
  84. package/src/workflows/account-settings/account-settings.d.ts +25 -1
  85. package/src/workflows/account-settings/use-get-panel-props.d.ts +2 -2
  86. package/src/workflows/carrier-services/carrier-services.d.ts +75 -2
  87. package/src/workflows/connect-external-carrier/connect-external-carrier.d.ts +48 -1
  88. package/src/workflows/label-workflow/label-workflow.d.ts +10 -0
  89. package/src/workflows/onboarding/onboarding.d.ts +33 -2
  90. package/suspend-text.js +1 -1
  91. package/transaction-history-element.js +1 -1
  92. package/types.js +1 -1
  93. package/use-scrub-errors.js +1 -1
  94. package/use-toggle.js +1 -1
  95. package/use-unit-settings.js +1 -1
  96. package/usePager.js +1 -1
  97. package/utilities.js +1 -1
  98. package/validation.js +1 -1
  99. package/vat.js +1 -1
  100. package/wallet-form.js +1 -1
  101. package/workflows.js +1 -1
  102. package/src/components/templates/suspend-shipment/index.d.ts +0 -1
  103. package/src/components/templates/suspend-shipment/suspend-shipment.d.ts +0 -8
  104. package/src/elements/purchase-label/hooks/use-get-or-create-shipment.d.ts +0 -13
  105. package/src/elements/purchase-label/hooks/use-load-shipment.d.ts +0 -9
  106. package/src/elements/purchase-label/hooks/use-pending-shipment.d.ts +0 -13
  107. package/src/elements/purchase-label/purchase-label-by-sales-order.d.ts +0 -11
  108. package/src/elements/purchase-label/purchase-label-by-shipment.d.ts +0 -8
  109. package/src/hooks/options/use-warehouse-options.d.ts +0 -13
@@ -119,6 +119,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
119
119
  };
120
120
  errorMessages: {
121
121
  labelIdRequired: string;
122
+ request_failed_to_complete: string;
122
123
  };
123
124
  resultMessages: {
124
125
  approved: string;
@@ -351,6 +352,31 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
351
352
  "requires-additional-handling": string;
352
353
  addOns: string;
353
354
  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
+ */
354
380
  confirmation: string;
355
381
  dimensions: {
356
382
  length: string;
@@ -445,7 +471,11 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
445
471
  shipToAddressFormFields: string;
446
472
  sections: {
447
473
  customsForm: string;
448
- windsorFramework: string;
474
+ windsorFramework: string; /**
475
+ * # Void Label Element Props
476
+ *
477
+ * @see {@link VoidLabel.Element | See the full type that `typeof Element` will return}
478
+ */
449
479
  shipment: string;
450
480
  rate_one: string;
451
481
  rate_other: string;
@@ -486,10 +516,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
486
516
  };
487
517
  };
488
518
  success: {
489
- title: string; /**
490
- * `onSuccess` is a callback function that will be invoked when the request to void a given
491
- * shipping label is successful.
492
- */
519
+ title: string;
493
520
  subtitle: string;
494
521
  action: string;
495
522
  };
@@ -561,10 +588,15 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
561
588
  isEnabled: string;
562
589
  isLoading: string;
563
590
  lowBalancePurchaseThreshold: string;
564
- maximumPurchasesPerDay: string;
565
- purchaseAmount: string; /**
566
- * `labelId` is the unique identifier for the label you wish to void.
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}
567
597
  */
598
+ maximumPurchasesPerDay: string;
599
+ purchaseAmount: string;
568
600
  readSettings: string;
569
601
  };
570
602
  addFunds: {
@@ -622,6 +654,13 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
622
654
  };
623
655
  units: {
624
656
  title: string;
657
+ /**
658
+ * # Void Label Component Props
659
+ *
660
+ * - These are the base props that will be passed into the `<VoidLabel />` component.
661
+ *
662
+ * @see {@link VoidLabel.Component | This prop types usage in the `<VoidLabel />` component}
663
+ */
625
664
  dimensions: {
626
665
  title: string;
627
666
  standard: string;
@@ -682,6 +721,8 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
682
721
  status: string;
683
722
  trackingStatus: string;
684
723
  labelId: string;
724
+ externalOrderId: string;
725
+ externalShipmentId: string;
685
726
  };
686
727
  empty: {
687
728
  title: string;
@@ -696,7 +737,9 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
696
737
  voided: string;
697
738
  error: string;
698
739
  completed: string;
699
- processing: string;
740
+ processing: string; /**
741
+ * `labelId` is the unique identifier for the label you wish to void.
742
+ */
700
743
  };
701
744
  trackingStatus: {
702
745
  unknown: string;
@@ -731,9 +774,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
731
774
  };
732
775
  search: string;
733
776
  settingsModal: {
734
- closeDialog: string; /**
735
- * `labelId` is the unique identifier for the label you wish to void.
736
- */
777
+ closeDialog: string;
737
778
  header: string;
738
779
  };
739
780
  status: {
@@ -744,7 +785,10 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
744
785
  toastBody: string;
745
786
  };
746
787
  deleteCarrierErrorTitle: string;
747
- deleteCarrierErrorMessage: 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
+ */
748
792
  loadingDeletingCarrier: string;
749
793
  };
750
794
  common: {
@@ -768,13 +812,6 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
768
812
  tryAgain: string;
769
813
  };
770
814
  address: {
771
- /**
772
- * # Void Label Component Props
773
- *
774
- * - These are the base props that will be passed into the `<VoidLabel />` component.
775
- *
776
- * @see {@link VoidLabel.Component | This prop types usage in the `<VoidLabel />` component}
777
- */
778
815
  fields: {
779
816
  name: string;
780
817
  company: string;
@@ -885,6 +922,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
885
922
  description: string;
886
923
  harmonizedTariffCode: string;
887
924
  ifDeliveryFails: string;
925
+ dutiesTaxes: string;
888
926
  quantity: string;
889
927
  sku: string;
890
928
  value: string;
@@ -899,6 +937,17 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
899
937
  returnToSender: string;
900
938
  treatAsAbandoned: string;
901
939
  };
940
+ canadaDeliveredDuty: {
941
+ senderPrepay: string;
942
+ recipientPays: string;
943
+ tooltip: {
944
+ title: string;
945
+ restriction: string;
946
+ requirement1: string;
947
+ requirement2: string;
948
+ requirement3: string;
949
+ };
950
+ };
902
951
  removeAllDeclarations: string;
903
952
  total: string;
904
953
  };
@@ -1048,6 +1097,9 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
1048
1097
  tooManyCharacters: string;
1049
1098
  requiredShipmentId: string;
1050
1099
  requiredLabelId: string;
1100
+ heightExceeded: string;
1101
+ widthExceeded: string;
1102
+ lengthExceeded: string;
1051
1103
  };
1052
1104
  shippingPresets: {
1053
1105
  apply: string;
@@ -1091,6 +1143,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
1091
1143
  edit: string;
1092
1144
  remove: string;
1093
1145
  viewDetails: string;
1146
+ cancelShipment: string;
1094
1147
  };
1095
1148
  };
1096
1149
  ZnVuZGluZ19zb3VyY2VfaWQgbXVzdCBiZSBhbiBpbnRlZ2Vy: string;
@@ -1121,15 +1174,17 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
1121
1174
  transactionHistory: string;
1122
1175
  adjustmentHistory: string;
1123
1176
  warehouses: string;
1124
- carriers: string;
1177
+ carriers: {
1178
+ title: string;
1179
+ customStatusMessages: {
1180
+ success: string;
1181
+ };
1182
+ };
1125
1183
  externalCarriers: string;
1126
1184
  labelLayout: string;
1127
1185
  unitSettings: string;
1128
1186
  vatSettings: string;
1129
- }; /**
1130
- * `onComplete` is a callback function that will be invoked when the request to void a given
1131
- * shipping label is completed.
1132
- */
1187
+ };
1133
1188
  };
1134
1189
  };
1135
1190
  } | undefined;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import { THEME_ID } from "@shipengine/giger";
2
3
  import { Theme } from "@shipengine/giger-theme";
3
4
  import { ShipEngineAPIConfig, ShipEngineProps } from "@shipengine/react-api";
4
5
  import { ElementsFeatureFlags, GlobalFeatures } from "../utilities";
@@ -7,13 +8,16 @@ export interface ElementsContextValue {
7
8
  baseURL: string;
8
9
  cdnURL: string;
9
10
  container?: HTMLElement;
11
+ emotionCacheShadowRootContainer?: ShadowRoot & HTMLElement;
10
12
  getFeatures: (key: keyof ElementsFeatureFlags) => ElementsFeatureFlags[keyof ElementsFeatureFlags];
11
13
  getToken: ShipEngineProps["getToken"];
12
14
  globalFeatures: GlobalFeatures;
13
15
  locale?: string;
14
16
  onError: ElementsErrorHandler;
15
17
  scope: string | null;
16
- theme: Theme;
18
+ theme: Theme | {
19
+ [THEME_ID]: Theme;
20
+ };
17
21
  }
18
22
  /**
19
23
  * @category Contexts
@@ -23,17 +27,20 @@ export type ElementsContextProviderProps = {
23
27
  cdnURL?: string;
24
28
  children: React.ReactNode;
25
29
  container?: HTMLElement;
30
+ emotionCacheShadowRootContainer?: ShadowRoot & HTMLElement;
26
31
  features?: ElementsFeatureFlags;
27
32
  locale?: string;
28
33
  onError?: ElementsErrorHandler;
29
34
  /** Scope of the Elements Provider. Can be null to not specify a specific element */
30
35
  scope?: string | null;
31
- theme: Theme;
36
+ theme: Theme | {
37
+ [THEME_ID]: Theme;
38
+ };
32
39
  } & Pick<ShipEngineAPIConfig, "getToken" | "baseURL">;
33
40
  /**
34
41
  * @category Providers
35
42
  */
36
- export declare const ElementsContextProvider: ({ baseURL, cdnURL, children, container, features, getToken, locale: localeProp, onError, scope, theme, }: ElementsContextProviderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
43
+ export declare const ElementsContextProvider: ({ baseURL, cdnURL, children, container, features, getToken, locale: localeProp, onError, scope, theme, emotionCacheShadowRootContainer, }: ElementsContextProviderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
37
44
  /**
38
45
  * Must be used within {@link ElementsProvider}
39
46
  *
@@ -1,12 +1,17 @@
1
1
  import { DefaultOptions } from "@tanstack/react-query";
2
+ import { THEME_ID } from "@shipengine/giger";
2
3
  import { CustomThemeData } from "@shipengine/giger-theme";
3
4
  import { ShipEngineAPIConfig } from "@shipengine/react-api";
4
5
  import { ElementsContextProviderProps } from "./elements-context-provider";
5
6
  export type ElementsProviderProps = Omit<ElementsContextProviderProps, "theme"> & ShipEngineAPIConfig & {
6
7
  defaultQueryClientOptions?: DefaultOptions;
7
- themeConfig?: CustomThemeData;
8
+ emotionCacheShadowRootContainer?: ShadowRoot & HTMLElement;
9
+ emotionCacheShadowRootContainerWrapper?: HTMLDivElement;
10
+ themeConfig?: CustomThemeData | {
11
+ [THEME_ID]: CustomThemeData;
12
+ };
8
13
  };
9
14
  /**
10
15
  * @category Providers
11
16
  */
12
- export declare const ElementsProvider: ({ baseURL, cdnURL, children, container, features, getToken, headers, locale, onApiError, onError, scope, themeConfig, defaultQueryClientOptions, }: ElementsProviderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
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;
@@ -1 +1,2 @@
1
1
  export * from "./manage-carriers";
2
+ export * from "./use-manage-carriers";
@@ -1,5 +1,16 @@
1
+ import { CodedError, Currency } from "@shipengine/react-api";
1
2
  export type ShipEngineCarriersProps = {
3
+ addedFundsError?: CodedError[] | null;
4
+ addFunds?: (payload: {
5
+ carrierId: string;
6
+ funds: {
7
+ amount: number;
8
+ currency: Currency;
9
+ };
10
+ }) => Promise<void>;
11
+ isUpdateFundsError?: boolean;
12
+ isUpdatingFunds?: boolean;
2
13
  onRedirectToOnboarding?: () => void;
3
14
  showFunds?: boolean;
4
15
  };
5
- export declare const ShipEngineCarriers: ({ showFunds, onRedirectToOnboarding, }: ShipEngineCarriersProps) => import("@emotion/react/jsx-runtime").JSX.Element;
16
+ export declare const ShipEngineCarriers: ({ showFunds, onRedirectToOnboarding, addFunds, addedFundsError, }: ShipEngineCarriersProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { Currency } from "@shipengine/react-api";
2
+ export declare const useManageCarriers: () => {
3
+ addFunds: (payload: {
4
+ carrierId: string;
5
+ funds: {
6
+ amount: number;
7
+ currency: Currency;
8
+ };
9
+ }) => Promise<void>;
10
+ addFundsError: import("@shipengine/react-api").CodedError[] | null;
11
+ isAddFundsSuccess: boolean;
12
+ isAddingFunds: boolean;
13
+ isAddingFundsError: boolean;
14
+ isAddingFundsIdle: boolean;
15
+ };
@@ -1,3 +1,4 @@
1
+ import { CodedError, Currency } from "@shipengine/react-api";
1
2
  /**
2
3
  * @namespace ManageFunding
3
4
  *
@@ -14,6 +15,14 @@
14
15
  * @see {@link ManageFundingProps | The props that are passed into the `<ManageFunding />` component}
15
16
  */
16
17
  export type ManageFundingProps = {
18
+ addedFundsError?: CodedError[] | null;
19
+ addFunds?: (payload: {
20
+ carrierId: string;
21
+ funds: {
22
+ amount: number;
23
+ currency: Currency;
24
+ };
25
+ }) => Promise<void>;
17
26
  onRedirectToOnboarding?: () => void;
18
27
  };
19
- export declare const ManageFunding: ({ onRedirectToOnboarding }: ManageFundingProps) => import("@emotion/react/jsx-runtime").JSX.Element;
28
+ export declare const ManageFunding: ({ onRedirectToOnboarding, addFunds, addedFundsError }: ManageFundingProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -2,7 +2,7 @@ export declare const useVatSettings: () => {
2
2
  getVatSettingsErrors: import("@shipengine/react-api").CodedError[] | null;
3
3
  isLoading: boolean;
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
- updateVatSettings: import("@tanstack/react-query").UseMutateAsyncFunction<import("@shipengine/react-api").ShipEngineAccountSettings, import("@shipengine/react-api").CodedError[], SE.AccountSettings, unknown>;
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
7
  vatSettings: import("@shipengine/react-api").ShipEngineAccountSettings | undefined;
8
8
  };
@@ -12,6 +12,6 @@ export * from "./use-service-code-options";
12
12
  export * from "./use-shipment-metadata";
13
13
  export * from "./use-shipping-presets-options";
14
14
  export * from "./use-state-code-options";
15
- export * from "./use-warehouse-options";
15
+ export * from "./use-ship-from-address-options";
16
16
  export * from "./use-service-points";
17
17
  export * from "./use-windsor-framework";
@@ -15,7 +15,7 @@ export declare const useInsuranceProviderOptions: (insuranceAccount?: SE.Insuran
15
15
  fundingSourceInsuranceProvider: SE.FundingSourceInsuranceProvider | undefined;
16
16
  insuranceProviderOptions: {
17
17
  label: string;
18
- value: SE.InsuranceProviderType;
18
+ value: string;
19
19
  }[];
20
20
  refetchInsuranceAcceptedTerms: <TPageData>(options?: (import("@tanstack/query-core").RefetchOptions & import("@tanstack/query-core").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/query-core").QueryObserverResult<SE.InsuranceFundingSourceAcceptedTermsResponse, SE.CodedError[]>>;
21
21
  };
@@ -0,0 +1,19 @@
1
+ import { SE } from "@shipengine/react-api";
2
+ import { ShipFromAddress } from "../../types";
3
+ /**
4
+ * @internal
5
+ *
6
+ * # Warehouse Options Hook
7
+ *
8
+ * @category Hooks
9
+ */
10
+ export declare const useShipFromAddressOptions: (warehouses?: SE.Warehouse[], shipFromAddresses?: (ShipFromAddress & {
11
+ addressId: string;
12
+ })[], shipment?: SE.SalesOrderShipment) => {
13
+ label: string;
14
+ options: {
15
+ label: string;
16
+ subLabel: string;
17
+ value: string;
18
+ }[];
19
+ }[] | undefined;
@@ -8,6 +8,7 @@ import { SE } from "@shipengine/react-api";
8
8
  */
9
9
  export declare const useShipmentMetadata: (shipment?: SE.SalesOrderShipment) => {
10
10
  hasAllZeroMeasurements: boolean;
11
+ isCanadaDeliveredDutyEligible: boolean;
11
12
  isContentDescriptionRequired: boolean;
12
13
  isCustomsRequired: boolean;
13
14
  isInternational: boolean;
@@ -1,6 +1,7 @@
1
1
  import React from "react";
2
2
  type RootPortalProviderProps = {
3
3
  children: React.ReactNode;
4
+ emotionCacheShadowRootContainer?: ShadowRoot & HTMLElement;
4
5
  };
5
6
  /**
6
7
  * @internal
@@ -13,7 +14,7 @@ type RootPortalProviderProps = {
13
14
  *
14
15
  * @see {@link useRootPortal | The associated `hook` for this provider}
15
16
  */
16
- export declare const RootPortalProvider: ({ children }: RootPortalProviderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
17
+ export declare const RootPortalProvider: ({ children, emotionCacheShadowRootContainer, }: RootPortalProviderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
17
18
  /**
18
19
  * @internal
19
20
  *
@@ -28,5 +29,5 @@ export declare const RootPortalProvider: ({ children }: RootPortalProviderProps)
28
29
  *
29
30
  * @see {@link RootPortalProvider | The associated `provider` for this hook}
30
31
  */
31
- export declare const useRootPortal: () => HTMLDivElement;
32
+ export declare const useRootPortal: () => HTMLElement;
32
33
  export {};
@@ -28,6 +28,7 @@ declare const _default: {
28
28
  };
29
29
  errorMessages: {
30
30
  labelIdRequired: string;
31
+ request_failed_to_complete: string;
31
32
  };
32
33
  resultMessages: {
33
34
  approved: string;
@@ -586,6 +587,8 @@ declare const _default: {
586
587
  status: string;
587
588
  trackingStatus: string;
588
589
  labelId: string;
590
+ externalOrderId: string;
591
+ externalShipmentId: string;
589
592
  };
590
593
  empty: {
591
594
  title: string;
@@ -780,6 +783,7 @@ declare const _default: {
780
783
  description: string;
781
784
  harmonizedTariffCode: string;
782
785
  ifDeliveryFails: string;
786
+ dutiesTaxes: string;
783
787
  quantity: string;
784
788
  sku: string;
785
789
  value: string;
@@ -794,6 +798,17 @@ declare const _default: {
794
798
  returnToSender: string;
795
799
  treatAsAbandoned: string;
796
800
  };
801
+ canadaDeliveredDuty: {
802
+ senderPrepay: string;
803
+ recipientPays: string;
804
+ tooltip: {
805
+ title: string;
806
+ restriction: string;
807
+ requirement1: string;
808
+ requirement2: string;
809
+ requirement3: string;
810
+ };
811
+ };
797
812
  removeAllDeclarations: string;
798
813
  total: string;
799
814
  };
@@ -943,6 +958,9 @@ declare const _default: {
943
958
  tooManyCharacters: string;
944
959
  requiredShipmentId: string;
945
960
  requiredLabelId: string;
961
+ heightExceeded: string;
962
+ widthExceeded: string;
963
+ lengthExceeded: string;
946
964
  };
947
965
  shippingPresets: {
948
966
  apply: string;
@@ -986,6 +1004,7 @@ declare const _default: {
986
1004
  edit: string;
987
1005
  remove: string;
988
1006
  viewDetails: string;
1007
+ cancelShipment: string;
989
1008
  };
990
1009
  };
991
1010
  ZnVuZGluZ19zb3VyY2VfaWQgbXVzdCBiZSBhbiBpbnRlZ2Vy: string;
@@ -1016,7 +1035,12 @@ declare const _default: {
1016
1035
  transactionHistory: string;
1017
1036
  adjustmentHistory: string;
1018
1037
  warehouses: string;
1019
- carriers: string;
1038
+ carriers: {
1039
+ title: string;
1040
+ customStatusMessages: {
1041
+ success: string;
1042
+ };
1043
+ };
1020
1044
  externalCarriers: string;
1021
1045
  labelLayout: string;
1022
1046
  unitSettings: string;
@@ -0,0 +1,4 @@
1
+ export declare enum CanadaDeliveredDutyOptions {
2
+ RECIPIENT_PAYS = "recipient_pays",
3
+ SENDER_PREPAY = "sender_prepay"
4
+ }
@@ -2,3 +2,5 @@ export * from "./carrier-metadata";
2
2
  export * from "./shipping-preset";
3
3
  export * from "./preferred-rates";
4
4
  export * from "./insurance-metadata";
5
+ export * from "./ship-from-address";
6
+ export * from "./canada-ddp";
@@ -0,0 +1,4 @@
1
+ import { Warehouse } from "@shipengine/js-api";
2
+ export type ShipFromAddress = Pick<Warehouse, "originAddress" | "returnAddress" | "isDefault"> & {
3
+ name?: string;
4
+ };
@@ -63,6 +63,10 @@ export type ShipmentFormFeatures = {
63
63
  * shipment form of the PurchaseLabel element.
64
64
  */
65
65
  shippingPresets?: boolean;
66
+ /**
67
+ * When disabled the Purchase Label element will not use the Seller's saved warehouses during Shipment creation or expose the warehouses in the ship from drop down.
68
+ */
69
+ useWarehouses?: boolean;
66
70
  };
67
71
  export type ShipmentSummaryFeatures = {
68
72
  schedulePickup?: boolean;
@@ -123,12 +127,13 @@ export type AccountSettingsFeatures = {
123
127
  */
124
128
  showVatSettings?: boolean;
125
129
  };
126
- export type LabelColumnName = "shipmentId" | "labelId" | "packages" | "recipient" | "shippingService" | "createdDate" | "shipDate" | "status" | "trackingStatus";
130
+ export type LabelColumnName = "shipmentId" | "labelId" | "externalOrderId" | "externalShipmentId" | "packages" | "recipient" | "shippingService" | "createdDate" | "shipDate" | "status" | "trackingStatus";
127
131
  export type BaseLabelColumnConfig = {
128
132
  /**
129
133
  * The name identifying the column
130
134
  */
131
135
  name: Exclude<LabelColumnName, "shipmentId" | "labelId">;
136
+ nickname?: string;
132
137
  };
133
138
  export type FilterableLabelColumnConfig = {
134
139
  /**
@@ -139,6 +144,7 @@ export type FilterableLabelColumnConfig = {
139
144
  * The name identifying the column
140
145
  */
141
146
  name: Extract<LabelColumnName, "shipmentId" | "labelId">;
147
+ nickname?: string;
142
148
  };
143
149
  export type LabelColumnConfig = BaseLabelColumnConfig | FilterableLabelColumnConfig;
144
150
  export type LabelsGridFeatures = {
@@ -1,4 +1,5 @@
1
1
  import { SE } from "@shipengine/react-api";
2
+ import { ShipFromAddress } from "../../types";
2
3
  /**
3
4
  * @internal
4
5
  *
@@ -64,3 +65,34 @@ export declare const isEmptyAddress: (address?: SE.Address) => boolean;
64
65
  * @category Utilities
65
66
  */
66
67
  export declare const addEmailToValidation: (addressValidation: SE.AddressValidation, email?: string) => SE.AddressValidation;
68
+ /**
69
+ * @internal
70
+ *
71
+ * # Address Utilities - getDefaultShipFromAddress
72
+ * Gets the default ship from address from an array of ship from addresses
73
+ *
74
+ * @category Utilities
75
+ */
76
+ export declare const getDefaultShipFromAddress: (addresses?: ShipFromAddress[]) => ShipFromAddress | undefined;
77
+ /**
78
+ * @internal
79
+ *
80
+ * # Address Utilities - getSavedShipFromAddressId
81
+ * Gets the address ID of from the shipment if it is a saved address and not a warehouse
82
+ *
83
+ * @category Utilities
84
+ */
85
+ export declare const getSavedShipFromAddressId: (shipment?: SE.SalesOrderShipment, shipFromAddresses?: (ShipFromAddress & {
86
+ addressId: string;
87
+ })[]) => string | undefined;
88
+ /**
89
+ * @internal
90
+ *
91
+ * # Address Utilities - getIsShipmentUsingSavedShipFromAddress
92
+ * Returns true if the shipment is using a saved ship from address
93
+ *
94
+ * @category Utilities
95
+ */
96
+ export declare const getIsShipmentUsingSavedShipFromAddress: (shipment?: SE.SalesOrderShipment, shipFromAddresses?: (ShipFromAddress & {
97
+ addressId: string;
98
+ })[]) => boolean | undefined;
@@ -6,7 +6,7 @@ import { SE } from "@shipengine/react-api";
6
6
  *
7
7
  * @category Utilities
8
8
  */
9
- export declare const getCustomsFromSalesOrder: (salesOrder: SE.SalesOrder, warehouse: SE.Warehouse) => {
9
+ export declare const getCustomsFromSalesOrder: (salesOrder: SE.SalesOrder, originAddress: SE.Address) => {
10
10
  customs: SE.Customs;
11
11
  products: SE.Product[];
12
12
  };
@@ -17,7 +17,7 @@ export declare const getCustomsFromSalesOrder: (salesOrder: SE.SalesOrder, wareh
17
17
  *
18
18
  * @category Utilities
19
19
  */
20
- export declare const getIsCustomsRequiredForSalesOrder: ({ shipTo }: SE.SalesOrder, { originAddress }: SE.Warehouse) => boolean;
20
+ export declare const getIsCustomsRequiredForSalesOrder: ({ shipTo }: SE.SalesOrder, originAddress?: SE.Address) => boolean;
21
21
  /**
22
22
  * @internal
23
23
  *
@@ -1,2 +1,3 @@
1
1
  import { SE } from "@shipengine/react-api";
2
- export declare const getDefaultWarehouse: (warehouses: SE.Warehouse[]) => SE.Warehouse;
2
+ export declare const getDefaultWarehouse: (warehouses?: SE.Warehouse[]) => SE.Warehouse | undefined;
3
+ export declare const getWarehouseById: (warehouseId?: string, warehouses?: SE.Warehouse[]) => SE.Warehouse | undefined;
@@ -1,4 +1,5 @@
1
1
  import { Interpolation } from "@emotion/serialize";
2
+ import { THEME_ID } from "@shipengine/giger";
2
3
  import { Theme } from "@shipengine/giger-theme";
3
4
  /**
4
5
  * The verbose typing is necessary to get around TypeScript's limitations on contextual inference
@@ -29,10 +30,10 @@ type StylesConstraint = Record<GetterKey, GetterFunction> & Record<`${NotGetterK
29
30
  * ```
30
31
  * const styles = createStyles({
31
32
  * basicObject: { color: "red" },
32
- * withTheme: (theme) => ({ backgroundColor: theme.palette.primary.main }),
33
+ * withTheme: (theme) => ({ backgroundColor: scopeTheme(theme).palette.primary.main }),
33
34
  *
34
35
  * getWithArbitraryPropsAndTheme: (disabled?: boolean) => (theme) => ({
35
- * color: theme.palette[disabled ? 'primary' : 'gray'].main,
36
+ * color: scopeTheme(theme).palette[disabled ? 'primary' : 'gray'].main,
36
37
  * }),
37
38
  * });
38
39
  * ```
@@ -40,4 +41,7 @@ type StylesConstraint = Record<GetterKey, GetterFunction> & Record<`${NotGetterK
40
41
  * @category Utilities
41
42
  */
42
43
  export declare const createStyles: <T extends StylesConstraint>(styles: T) => T;
44
+ export declare const scopeTheme: (theme: Theme | {
45
+ [THEME_ID]: Theme;
46
+ }) => Theme;
43
47
  export {};