@shipengine/elements 2.9.1 → 2.11.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 (144) 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 +3 -3
  8. package/shipment.js +1 -1
  9. package/src/components/add-funds-form/add-funds-form.d.ts +2 -1
  10. package/src/components/enable-insurance-banner/enable-insurance-banner.d.ts +8 -0
  11. package/src/components/enable-insurance-banner/enable-insurance-banner.styles.d.ts +37 -0
  12. package/src/components/enable-insurance-banner/index.d.ts +1 -0
  13. package/src/components/field/rate-card/insurance-popover/index.d.ts +1 -0
  14. package/src/components/field/rate-card/insurance-popover/insurance-popover.d.ts +11 -0
  15. package/src/components/field/rate-card/insurance-popover/insurance-popover.styles.d.ts +14 -0
  16. package/src/components/field/{rate-card → rate-select/rate-card}/cost-breakdown/cost-breakdown.styles.d.ts +0 -1
  17. package/src/components/field/rate-select/rate-card/rate-card.d.ts +16 -0
  18. package/src/components/field/rate-select/rate-card/rate-card.styles.d.ts +30 -0
  19. package/src/components/field/rate-select/rate-select.d.ts +1 -0
  20. package/src/components/fund-and-purchase/fund-and-purchase.d.ts +2 -1
  21. package/src/components/service-card/service-card.d.ts +36 -0
  22. package/src/components/service-card/service-card.styles.d.ts +68 -0
  23. package/src/components/service-point-display/service-point-display.d.ts +1 -0
  24. package/src/components/service-points/service-points.d.ts +3 -2
  25. package/src/components/service-points/service-points.styles.d.ts +6 -0
  26. package/src/components/templates/index.d.ts +2 -1
  27. package/src/components/templates/label-display/index.d.ts +1 -0
  28. package/src/components/templates/label-display/label-card.d.ts +17 -0
  29. package/src/components/templates/{label/label.styles.d.ts → label-display/label-card.styles.d.ts} +8 -2
  30. package/src/components/templates/label-display/label-display.d.ts +15 -0
  31. package/src/components/templates/rate-form/rate-form.d.ts +3 -1
  32. package/src/components/templates/rate-form/rate-form.styles.d.ts +3 -0
  33. package/src/components/templates/rate-form/rate-view.d.ts +38 -0
  34. package/src/components/templates/register-funding-source-insurance-form/index.d.ts +2 -0
  35. package/src/components/templates/register-funding-source-insurance-form/register-funding-source-insurance-form-shema.d.ts +10 -0
  36. package/src/components/templates/register-funding-source-insurance-form/register-funding-source-insurance-form.d.ts +15 -0
  37. package/src/components/templates/register-funding-source-insurance-form/register-funding-source-insurance-from.styles.d.ts +14 -0
  38. package/src/components/templates/shipment/shipment.d.ts +1 -1
  39. package/src/components/templates/shipment-form/sections/customs-forms/components/index.d.ts +1 -0
  40. package/src/components/templates/shipment-form/sections/customs-forms/components/windsor-framework/windsor-framework.d.ts +7 -0
  41. package/src/components/templates/shipment-form/sections/customs-forms/components/windsor-framework/windsor-framework.styles.d.ts +20 -0
  42. package/src/components/templates/shipment-form/sections/customs-forms/customs-forms.d.ts +2 -1
  43. package/src/components/templates/shipment-form/shipment-form.d.ts +1 -1
  44. package/src/components/templates/shipment-form/shipment-form.styles.d.ts +20 -0
  45. package/src/components/templates/shipment-form/shipment-schema.d.ts +201 -13
  46. package/src/components/templates/wallet-form/wallet-form.d.ts +2 -1
  47. package/src/elements/index.d.ts +2 -2
  48. package/src/elements/labels-grid/hooks/use-labels-grid.d.ts +5 -1
  49. package/src/elements/labels-grid/labels-grid.d.ts +92 -36
  50. package/src/elements/manage-carriers/manage-carriers.d.ts +59 -6
  51. package/src/elements/manage-external-carriers/manage-external-carriers.d.ts +81 -27
  52. package/src/elements/manage-funding/manage-funding-element.d.ts +59 -6
  53. package/src/elements/manage-warehouses/manage-warehouses.d.ts +59 -6
  54. package/src/elements/payment-method-settings/payment-method-settings-element.d.ts +59 -6
  55. package/src/elements/purchase-label/hooks/use-rates-form.d.ts +2 -0
  56. package/src/elements/purchase-label/hooks/use-shipment-form.d.ts +1 -1
  57. package/src/elements/purchase-label/purchase-label.d.ts +83 -22
  58. package/src/elements/select-label-layout/index.d.ts +1 -0
  59. package/src/elements/{label-layout/label-layout-element.d.ts → select-label-layout/select-label-layout-element.d.ts} +59 -6
  60. package/src/elements/shipment-summary/shipment-summary.d.ts +102 -27
  61. package/src/elements/shipments-grid/hooks/use-shipments-grid.d.ts +4 -0
  62. package/src/elements/shipments-grid/shipments-grid.d.ts +61 -13
  63. package/src/elements/theme-creator/theme-creator.d.ts +59 -6
  64. package/src/elements/transaction-history/transaction-history-element.d.ts +59 -6
  65. package/src/elements/unit-settings/unit-settings-element.d.ts +59 -6
  66. package/src/elements/vat-settings/vat-settings-element.d.ts +59 -6
  67. package/src/elements/void-label/void-label.d.ts +73 -57
  68. package/src/features/index.d.ts +1 -1
  69. package/src/features/manage-carriers/hooks/use-carrier-metadata.d.ts +2 -2
  70. package/src/features/manage-carriers/hooks/use-list-funding-source-carriers.d.ts +3 -1
  71. package/src/features/manage-carriers/manage-insurance-provider-row/index.d.ts +1 -0
  72. package/src/features/manage-carriers/manage-insurance-provider-row/info-popover.d.ts +10 -0
  73. package/src/features/manage-carriers/manage-insurance-provider-row/manage-insurance-provider-row.d.ts +7 -0
  74. package/src/features/manage-carriers/manage-insurance-provider-row/manage-insurance-provider-row.styles.d.ts +37 -0
  75. package/src/features/select-label-layout/index.d.ts +2 -0
  76. package/src/features/select-label-layout/select-label-layout.d.ts +7 -0
  77. package/src/features/{label-layout → select-label-layout}/use-label-layout.d.ts +2 -2
  78. package/src/features/unit-settings/unit-settings.d.ts +2 -2
  79. package/src/features/unit-settings/use-unit-settings.d.ts +3 -3
  80. package/src/features/vat-settings/use-vat-settings.d.ts +3 -3
  81. package/src/hooks/index.d.ts +1 -0
  82. package/src/hooks/insurance/index.d.ts +2 -0
  83. package/src/hooks/insurance/use-get-funding-source-insurance-provider.d.ts +14 -0
  84. package/src/hooks/insurance/use-manage-funding-source-insurance.d.ts +10 -0
  85. package/src/hooks/options/index.d.ts +2 -0
  86. package/src/hooks/options/use-insurance-provider-options.d.ts +8 -3
  87. package/src/hooks/options/use-movement-indicator-options.d.ts +12 -0
  88. package/src/hooks/options/use-rate-options.d.ts +4 -1
  89. package/src/hooks/options/use-windsor-framework.d.ts +9 -0
  90. package/src/index.d.ts +1 -0
  91. package/src/locales/en/index.d.ts +59 -6
  92. package/src/types/carrier-metadata.d.ts +1 -1
  93. package/src/types/index.d.ts +1 -0
  94. package/src/types/insurance-metadata.d.ts +25 -0
  95. package/src/utilities/feature-flags/types.d.ts +41 -0
  96. package/src/utilities/index.d.ts +1 -1
  97. package/src/utilities/shipengine/carrier.d.ts +16 -0
  98. package/src/utilities/shipengine/index.d.ts +1 -0
  99. package/src/utilities/shipengine/insurance.d.ts +17 -0
  100. package/src/utilities/tracking-formatter.d.ts +9 -0
  101. package/src/workflows/account-settings/account-settings.d.ts +60 -12
  102. package/src/workflows/account-settings/use-get-panel-props.d.ts +3 -3
  103. package/src/workflows/carrier-services/carrier-services.d.ts +59 -6
  104. package/src/workflows/connect-external-carrier/connect-external-carrier.d.ts +59 -6
  105. package/src/workflows/onboarding/components/carrier-recovery-form/carrier-recovery-form-schema.d.ts +18 -18
  106. package/src/workflows/onboarding/components/confirmation-and-submission-step/use-confirmation-and-submission-step.d.ts +4 -2
  107. package/src/workflows/onboarding/components/funding-step/funding-step.d.ts +2 -1
  108. package/src/workflows/onboarding/components/terms-agreement-form/terms-agreement-form.d.ts +2 -1
  109. package/src/workflows/onboarding/components/terms-agreement-step/terms-agreement-step.d.ts +4 -3
  110. package/src/workflows/onboarding/components/terms-agreement-step/terms-agreement-step.styles.d.ts +4 -0
  111. package/src/workflows/onboarding/components/terms-agreement-step/use-terms-agreement-step.d.ts +3 -3
  112. package/src/workflows/onboarding/onboarding.d.ts +60 -7
  113. package/suspend-text.js +1 -1
  114. package/transaction-history-element.js +1 -1
  115. package/use-run-once-on-true.js +1 -0
  116. package/use-scrub-errors.js +1 -1
  117. package/use-toggle.js +1 -1
  118. package/use-unit-settings.js +1 -1
  119. package/usePager.js +1 -1
  120. package/utilities.js +1 -1
  121. package/validation.js +1 -0
  122. package/vat.js +1 -1
  123. package/wallet-form.js +1 -1
  124. package/workflows.js +1 -1
  125. package/carrier-logo.js +0 -1
  126. package/src/components/field/rate-card/rate-card.d.ts +0 -19
  127. package/src/components/field/rate-card/rate-card.styles.d.ts +0 -22
  128. package/src/components/templates/label/index.d.ts +0 -1
  129. package/src/components/templates/label/label.d.ts +0 -12
  130. package/src/elements/label-layout/index.d.ts +0 -1
  131. package/src/features/label-layout/index.d.ts +0 -2
  132. package/src/features/label-layout/label-layout.d.ts +0 -7
  133. package/src/utilities/tracking-status-formatter.d.ts +0 -1
  134. package/warehouses.js +0 -1
  135. /package/src/components/field/{rate-card → rate-select/rate-card}/cost-breakdown/cost-breakdown.d.ts +0 -0
  136. /package/src/components/field/{rate-card → rate-select/rate-card}/cost-breakdown/index.d.ts +0 -0
  137. /package/src/components/field/{rate-card → rate-select/rate-card}/index.d.ts +0 -0
  138. /package/src/components/field/{rate-card → rate-select/rate-card}/rate-detail-cost-breakdown/index.d.ts +0 -0
  139. /package/src/components/field/{rate-card → rate-select/rate-card}/rate-detail-cost-breakdown/rate-detail-cost-breakdown.d.ts +0 -0
  140. /package/src/components/field/{rate-card → rate-select/rate-card}/rate-detail-cost-breakdown/rate-detail-cost-breakdown.styles.d.ts +0 -0
  141. /package/src/components/{label → history/history-card/label}/index.d.ts +0 -0
  142. /package/src/components/{label → history/history-card/label}/label.d.ts +0 -0
  143. /package/src/components/{label → history/history-card/label}/label.styles.d.ts +0 -0
  144. /package/src/features/{label-layout/label-layout.styles.d.ts → select-label-layout/select-label-layout.styles.d.ts} +0 -0
@@ -144,6 +144,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
144
144
  showItems: string;
145
145
  void: string;
146
146
  download: string;
147
+ fileClaim: string;
147
148
  };
148
149
  fields: {
149
150
  dimensions: string;
@@ -159,11 +160,21 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
159
160
  insuredValue: string;
160
161
  deliveryConfirmation: string;
161
162
  };
163
+ insurance: {
164
+ parcelguard: {
165
+ title: string;
166
+ description: string;
167
+ cta: {
168
+ title: string;
169
+ description: string;
170
+ };
171
+ registerSuccess: {
172
+ title: string;
173
+ description: string;
174
+ };
175
+ };
176
+ };
162
177
  highVolumeForms: string;
163
- /**
164
- * `onSuccess` is a callback function that will be invoked when the request to void a given
165
- * shipping label is successful.
166
- */
167
178
  multipleShippingServices: string;
168
179
  sections: {
169
180
  labels: string;
@@ -205,12 +216,6 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
205
216
  };
206
217
  "register-wallet": {
207
218
  sections: {
208
- setup: {
209
- title: string;
210
- subtitle: string;
211
- descriptionTitle: string;
212
- description: string;
213
- };
214
219
  billing: {
215
220
  title: string;
216
221
  cardSubTitle: string;
@@ -223,6 +228,17 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
223
228
  title: string;
224
229
  subtitle: string;
225
230
  };
231
+ insuranceProviders: {
232
+ parcelguard: {
233
+ description: string;
234
+ terms: string;
235
+ termsLink: string;
236
+ popover: {
237
+ title: string;
238
+ description: string;
239
+ };
240
+ };
241
+ };
226
242
  notifications: {
227
243
  error: {
228
244
  title: string;
@@ -233,10 +249,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
233
249
  poBox: {
234
250
  title: string;
235
251
  description: string;
236
- }; /**
237
- * `onSuccess` is a callback function that will be invoked when the request to void a given
238
- * shipping label is successful.
239
- */
252
+ };
240
253
  carrier: {
241
254
  title: string;
242
255
  confirmAddress: string;
@@ -320,6 +333,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
320
333
  };
321
334
  cta: {
322
335
  addPackageDetails: string;
336
+ parcelguard: string;
323
337
  };
324
338
  errorMessages: {
325
339
  customsItemsRequired: string;
@@ -390,41 +404,22 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
390
404
  dhlExpressTermsAcknowledgement: string;
391
405
  noRateService: string;
392
406
  };
407
+ windsorFramework: {
408
+ movementIndicator: string;
409
+ movementIndicators: {
410
+ b2c: string;
411
+ c2b: string;
412
+ c2c: string;
413
+ b2b: string;
414
+ };
415
+ notAtRisk: string;
416
+ notAtRiskShipmentTootip: string;
417
+ };
393
418
  requirements: {
394
419
  noWarehouse: string;
395
420
  noCarrier: string;
396
421
  noWarehouseOrCarrier: string;
397
- }; /**
398
- * # Registered Void Label Element
399
- *
400
- * - This is the registered `<VoidLabel />` element that will be used to render the
401
- * `<VoidLabel.Element />` component.
402
- *
403
- * @param ElementProps The props, callbacks, and resources necessary to render
404
- * the `<VoidLabel.Element />` component.
405
- *
406
- * @example
407
- * The `<Component />` is the source JSX that is rendered when you make use of the `VoidLabel`
408
- * Element directly. Here is a brief example of how you would use it within your application.
409
- * ```tsx
410
- * <VoidLabel.Element
411
- * labelId="se-1234567"
412
- * onComplete={() => console.log('onComplete')}
413
- * onSuccess={(_, { salesOrderIds: [salesOrderId] }) =>
414
- * console.log('sales order ID', salesOrderId)
415
- * }
416
- * onViewShipment={({ shipmentId }) => {
417
- * console.log('onViewShipment', shipmentId);
418
- * }}
419
- * />
420
- * ```
421
- *
422
- * <br />
423
- *
424
- * @see {@link VoidLabel.ComponentProps | The **props** that can be passed into the `<VoidLabel.Element />` component}
425
- *
426
- * @see {@link PurchaseLabel.Element | Go back to the frst step in the label purchase workflow `<PurchaseLabel.Element />`}
427
- */
422
+ };
428
423
  servicePoints: {
429
424
  searchLabel: string;
430
425
  noRatesForType: string;
@@ -450,6 +445,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
450
445
  shipToAddressFormFields: string;
451
446
  sections: {
452
447
  customsForm: string;
448
+ windsorFramework: string;
453
449
  shipment: string;
454
450
  rate_one: string;
455
451
  rate_other: string;
@@ -474,15 +470,12 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
474
470
  shipFromAddress: string;
475
471
  fundingAndCarrierConnection: string;
476
472
  };
473
+ termsAgreement: {
474
+ title: string;
475
+ subtitle: string;
476
+ };
477
477
  warehouse: {
478
478
  title: string;
479
- /**
480
- * # Void Label Component Props
481
- *
482
- * - These are the base props that will be passed into the `<VoidLabel />` component.
483
- *
484
- * @see {@link VoidLabel.Component | This prop types usage in the `<VoidLabel />` component}
485
- */
486
479
  subtitle: string;
487
480
  inlineMessage: string;
488
481
  };
@@ -493,7 +486,10 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
493
486
  };
494
487
  };
495
488
  success: {
496
- title: string;
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
+ */
497
493
  subtitle: string;
498
494
  action: string;
499
495
  };
@@ -761,6 +757,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
761
757
  continue: string;
762
758
  delete: string;
763
759
  edit: string;
760
+ enable: string;
764
761
  hide: string;
765
762
  parse: string;
766
763
  purchase: string;
@@ -771,6 +768,13 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
771
768
  tryAgain: string;
772
769
  };
773
770
  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
+ */
774
778
  fields: {
775
779
  name: string;
776
780
  company: string;
@@ -791,10 +795,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
791
795
  };
792
796
  parserFields: {
793
797
  fullAddress: string;
794
- }; /**
795
- * `onSuccess` is a callback function that will be invoked when the request to void a given
796
- * shipping label is successful.
797
- */
798
+ };
798
799
  paste: string;
799
800
  preference: {
800
801
  confirm: string;
@@ -924,6 +925,14 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
924
925
  unknown: string;
925
926
  noRatesAvailable: string;
926
927
  refreshAndTryAgain: string;
928
+ windsorFramework: {
929
+ doNotConform: string;
930
+ pleaseAddTheFollowingTaxIds: string;
931
+ windsorFrameworkDefaultMessage: string;
932
+ shipperEori: string;
933
+ recipientEori: string;
934
+ ukims: string;
935
+ };
927
936
  };
928
937
  errorTypes: {
929
938
  accountStatus: string;
@@ -937,6 +946,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
937
946
  system: string;
938
947
  unknown: string;
939
948
  validation: string;
949
+ windsorFramework: string;
940
950
  };
941
951
  grid: {
942
952
  "row-count_one": string;
@@ -963,8 +973,10 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
963
973
  insuranceProviders: {
964
974
  carrier: string;
965
975
  none: string;
976
+ parcelguard: string;
966
977
  shipsurance: string;
967
978
  thirdParty: string;
979
+ x_cover: string;
968
980
  };
969
981
  loading: {
970
982
  accountSettings: string;
@@ -1042,6 +1054,9 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
1042
1054
  platform: string;
1043
1055
  user: string;
1044
1056
  };
1057
+ tags: {
1058
+ new: string;
1059
+ };
1045
1060
  terms: {
1046
1061
  fields: {
1047
1062
  agreement: string;
@@ -1049,6 +1064,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
1049
1064
  agreeToTerms: string;
1050
1065
  carriersTitle: string;
1051
1066
  fundingSourceTitle: string;
1067
+ insuranceProvidersTitle: string;
1052
1068
  shipEngineTitle: string;
1053
1069
  };
1054
1070
  weight: {
@@ -1,4 +1,4 @@
1
- export * from "./label-layout";
1
+ export * from "./select-label-layout";
2
2
  export * from "./manage-carriers";
3
3
  export * from "./manage-external-carriers";
4
4
  export * from "./manage-funding";
@@ -1,2 +1,2 @@
1
- import { CarrierMetadata } from "../../../types";
2
- export declare const useCarrierMetadata: () => CarrierMetadata;
1
+ import { ElementsCarrierMetadata } from "../../../types";
2
+ export declare const useCarrierMetadata: () => ElementsCarrierMetadata;
@@ -1,4 +1,4 @@
1
- import { CarrierMetadataFromFundingSource } from "../../../types";
1
+ import { CarrierMetadataFromFundingSource, InsuranceProviderProfile } from "../../../types";
2
2
  export type ConnectedCarrierMetadata = {
3
3
  carrier: CarrierMetadataFromFundingSource;
4
4
  isConnected: boolean;
@@ -6,6 +6,8 @@ export type ConnectedCarrierMetadata = {
6
6
  export declare const useListFundingSourceCarriers: () => {
7
7
  data: ConnectedCarrierMetadata[] | undefined;
8
8
  error: import("@shipengine/react-api").CodedError[] | null;
9
+ insuranceProviderProfiles: InsuranceProviderProfile[];
9
10
  isLoading: boolean;
10
11
  refetch: <TPageData>(options?: (import("@tanstack/query-core").RefetchOptions & import("@tanstack/query-core").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@shipengine/react-api").Carrier[], import("@shipengine/react-api").CodedError[]>>;
12
+ refetchInsuranceProviderAcceptedTerms: <TPageData_1>(options?: (import("@tanstack/query-core").RefetchOptions & import("@tanstack/query-core").RefetchQueryFilters<TPageData_1>) | undefined) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@shipengine/react-api").InsuranceFundingSourceAcceptedTermsResponse, import("@shipengine/react-api").CodedError[]>>;
11
13
  };
@@ -0,0 +1 @@
1
+ export * from "./manage-insurance-provider-row";
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { SE } from "@shipengine/js-api";
3
+ type InfoPopoverProps = {
4
+ iconRef: React.RefObject<HTMLElement>;
5
+ insuranceProvider: SE.FundingSourceInsuranceProvider;
6
+ isOpen: boolean;
7
+ toggleIsOpen: () => void;
8
+ };
9
+ export declare const InfoPopover: ({ insuranceProvider, iconRef, toggleIsOpen, isOpen, }: InfoPopoverProps) => import("@emotion/react/jsx-runtime").JSX.Element | null;
10
+ export {};
@@ -0,0 +1,7 @@
1
+ import { InsuranceProviderProfile } from "../../../types";
2
+ export * from "./manage-insurance-provider-row";
3
+ export type ManageInsuranceProviderRowProps = {
4
+ insuranceProviderProfile: InsuranceProviderProfile;
5
+ registerProvider: (p: InsuranceProviderProfile) => Promise<void>;
6
+ };
7
+ export declare const ManageInsuranceProviderRow: ({ registerProvider, insuranceProviderProfile, }: ManageInsuranceProviderRowProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1,37 @@
1
+ export declare const styles: {
2
+ container: {
3
+ display: "flex";
4
+ flexDirection: "column";
5
+ };
6
+ formContainer: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
7
+ backgroundColor: string;
8
+ padding: number;
9
+ };
10
+ getConnectButton: (isConnected?: boolean) => (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
11
+ backgroundColor?: string | undefined;
12
+ borderRadius?: string | undefined;
13
+ color?: string | undefined;
14
+ padding: string;
15
+ };
16
+ link: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
17
+ "&:visited": {
18
+ color: string;
19
+ };
20
+ cursor: "pointer";
21
+ fontWeight: number;
22
+ };
23
+ logoContainer: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
24
+ alignItems: "center";
25
+ columnGap: string;
26
+ display: "flex";
27
+ };
28
+ popover: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
29
+ fontSize: string;
30
+ };
31
+ rowContainer: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
32
+ alignItems: "center";
33
+ display: "flex";
34
+ justifyContent: "space-between";
35
+ padding: string;
36
+ };
37
+ };
@@ -0,0 +1,2 @@
1
+ export * as SelectLabelLayout from "./select-label-layout";
2
+ export * from "./use-label-layout";
@@ -0,0 +1,7 @@
1
+ import { SE } from "@shipengine/react-api";
2
+ export type SelectLabelLayoutSettingsProps = {
3
+ accountSettings?: SE.ShipEngineAccountSettings;
4
+ updateAccountSettings: (newAccountSetting: Partial<SE.ShipEngineAccountSettings>) => Promise<void>;
5
+ };
6
+ export declare const Settings: ({ accountSettings, updateAccountSettings, }: SelectLabelLayoutSettingsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
7
+ export declare const Purchase: () => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { SE } from "@shipengine/react-api";
2
2
  export declare const useLabelLayout: () => {
3
- accountSettings: SE.AccountSettings | undefined;
3
+ accountSettings: SE.ShipEngineAccountSettings | undefined;
4
4
  isUpdatingLabelLayout: boolean;
5
- updateAccountSettings: (newAccountSetting: Partial<SE.AccountSettings>) => Promise<void>;
5
+ updateAccountSettings: (newAccountSetting: Partial<SE.ShipEngineAccountSettings>) => Promise<void>;
6
6
  updateLabelLayoutErrors: SE.CodedError[] | null;
7
7
  };
@@ -1,9 +1,9 @@
1
1
  import { SE } from "@shipengine/react-api";
2
2
  export type UnitSettingsProps = {
3
- accountSettings?: SE.AccountSettings;
3
+ accountSettings?: SE.ShipEngineAccountSettings;
4
4
  getVatSettingsErrors?: SE.CodedError[] | null;
5
5
  isLoading: boolean;
6
6
  refreshAccountSettings: () => void;
7
- updateAccountSettings: (payload: Partial<SE.AccountSettings>) => void;
7
+ updateAccountSettings: (payload: Partial<SE.ShipEngineAccountSettings>) => void;
8
8
  };
9
9
  export declare const UnitSettings: ({ accountSettings, getVatSettingsErrors: errors, isLoading, refreshAccountSettings, updateAccountSettings, }: UnitSettingsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,10 +1,10 @@
1
1
  import { SE } from "@shipengine/react-api";
2
2
  export declare const useUnitSettings: () => {
3
- accountSettings: SE.AccountSettings | undefined;
3
+ accountSettings: SE.ShipEngineAccountSettings | undefined;
4
4
  getVatSettingsErrors: SE.CodedError[] | null;
5
5
  isLoading: boolean;
6
6
  isUpdatingUnitSettings: boolean;
7
- refreshAccountSettings: <TPageData>(options?: (import("@tanstack/query-core").RefetchOptions & import("@tanstack/query-core").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/query-core").QueryObserverResult<SE.AccountSettings, SE.CodedError[]>>;
8
- updateAccountSettings: (newAccountSetting: Partial<SE.AccountSettings>) => Promise<void>;
7
+ refreshAccountSettings: <TPageData>(options?: (import("@tanstack/query-core").RefetchOptions & import("@tanstack/query-core").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/query-core").QueryObserverResult<SE.ShipEngineAccountSettings, SE.CodedError[]>>;
8
+ updateAccountSettings: (newAccountSetting: Partial<SE.ShipEngineAccountSettings>) => Promise<void>;
9
9
  updateUnitSettingsErrors: SE.CodedError[] | null;
10
10
  };
@@ -1,8 +1,8 @@
1
1
  export declare const useVatSettings: () => {
2
2
  getVatSettingsErrors: import("@shipengine/react-api").CodedError[] | null;
3
3
  isLoading: boolean;
4
- refreshVatSettings: <TPageData>(options?: (import("@tanstack/query-core").RefetchOptions & import("@tanstack/query-core").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@shipengine/react-api").AccountSettings, import("@shipengine/react-api").CodedError[]>>;
5
- updateVatSettings: import("@tanstack/react-query").UseMutateAsyncFunction<import("@shipengine/react-api").AccountSettings, import("@shipengine/react-api").CodedError[], Partial<import("@shipengine/react-api").AccountSettings>, unknown>;
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>;
6
6
  updateVatSettingsErrors: import("@shipengine/react-api").CodedError[] | null;
7
- vatSettings: import("@shipengine/react-api").AccountSettings | undefined;
7
+ vatSettings: import("@shipengine/react-api").ShipEngineAccountSettings | undefined;
8
8
  };
@@ -1,4 +1,5 @@
1
1
  export * from "./options";
2
+ export * from "./insurance";
2
3
  export * from "./use-address-validation";
3
4
  export * from "./use-black-box-detection";
4
5
  export * from "./use-get-service-name";
@@ -0,0 +1,2 @@
1
+ export * from "./use-get-funding-source-insurance-provider";
2
+ export * from "./use-manage-funding-source-insurance";
@@ -0,0 +1,14 @@
1
+ import { SE } from "@shipengine/react-api";
2
+ /**
3
+ * @internal
4
+ *
5
+ * # Get Funding Source Insurance Providers
6
+ *
7
+ * - description: This hook is used to get the enabled funding source insurance provider
8
+ *
9
+ * @example
10
+ */
11
+ export declare const useGetFundingSourceInsuranceProvider: () => {
12
+ fundingSourceInsuranceProvider: SE.FundingSourceInsuranceProvider | undefined;
13
+ 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[]>>;
14
+ };
@@ -0,0 +1,10 @@
1
+ import { SE } from "@shipengine/react-api";
2
+ import { InsuranceProviderProfile } from "../../types";
3
+ export declare const useManageFundingSourceInsurance: () => {
4
+ hasInsuranceToRegister: boolean | undefined;
5
+ insuranceAcceptedTerms: SE.Term[] | undefined;
6
+ insuranceProviderProfiles: InsuranceProviderProfile[] | undefined;
7
+ loading: boolean;
8
+ registerInsuranceProvider: () => Promise<void>;
9
+ registerInsuranceProviderSuccess: boolean;
10
+ };
@@ -5,6 +5,7 @@ export * from "./use-customs-non-delivery-options";
5
5
  export * from "./use-date-range-options";
6
6
  export * from "./use-expiration-month-options";
7
7
  export * from "./use-insurance-provider-options";
8
+ export * from "./use-movement-indicator-options";
8
9
  export * from "./use-package-options";
9
10
  export * from "./use-rate-options";
10
11
  export * from "./use-service-code-options";
@@ -13,3 +14,4 @@ export * from "./use-shipping-presets-options";
13
14
  export * from "./use-state-code-options";
14
15
  export * from "./use-warehouse-options";
15
16
  export * from "./use-service-points";
17
+ export * from "./use-windsor-framework";
@@ -1,5 +1,6 @@
1
1
  import { SE } from "@shipengine/react-api";
2
2
  interface InsuranceFeatures {
3
+ includeCarrierInsurance?: boolean;
3
4
  includeShipsuranceInsurance?: boolean;
4
5
  includeThirdPartyInsurance?: boolean;
5
6
  }
@@ -11,7 +12,11 @@ interface InsuranceFeatures {
11
12
  * @category Hooks
12
13
  */
13
14
  export declare const useInsuranceProviderOptions: (insuranceAccount?: SE.InsuranceAccount, features?: InsuranceFeatures) => {
14
- label: string;
15
- value: SE.InsuranceProviderType;
16
- }[];
15
+ fundingSourceInsuranceProvider: SE.FundingSourceInsuranceProvider | undefined;
16
+ insuranceProviderOptions: {
17
+ label: string;
18
+ value: SE.InsuranceProviderType;
19
+ }[];
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
+ };
17
22
  export {};
@@ -0,0 +1,12 @@
1
+ import { SE } from "@shipengine/react-api";
2
+ /**
3
+ * @internal
4
+ *
5
+ * # Customs Non-Delivery Options Hooks
6
+ *
7
+ * @category Hooks
8
+ */
9
+ export declare const useMovementIndicatorOptions: () => {
10
+ label: string;
11
+ value: SE.MovementIndicator;
12
+ }[];
@@ -16,6 +16,9 @@ export declare enum PudoType {
16
16
  */
17
17
  export type RateOption = Omit<SE.Rate, "warningMessages"> & {
18
18
  balance?: number;
19
+ insuranceClaim?: SE.LinkedResource;
20
+ insuranceProvider?: SE.InsuranceProviderType;
21
+ insuredValue?: SE.Money;
19
22
  messages: string[];
20
23
  pudoType?: PudoType;
21
24
  rateAcknowledgementMessage?: PreferredRateAcknowledgementMessage;
@@ -29,4 +32,4 @@ export type RateOption = Omit<SE.Rate, "warningMessages"> & {
29
32
  *
30
33
  * # Rate Options Hook
31
34
  */
32
- export declare const useRateOptions: (rates?: SE.Rate[], preferredRates?: PreferredRatesResponse, carriers?: SE.Carrier[], shipment?: SE.SalesOrderShipment, servicePoints?: SE.ServicePoint[], enableGlobalPostFiltering?: boolean, requireDhlTermsAcknowledgement?: boolean) => RateOption[];
35
+ export declare const useRateOptions: (rates?: SE.Rate[], preferredRates?: PreferredRatesResponse, carriers?: SE.Carrier[], shipment?: SE.SalesOrderShipment, servicePoints?: SE.ServicePoint[], enableGlobalPostFiltering?: boolean, requireDhlTermsAcknowledgement?: boolean, windsorFrameworkEnabled?: boolean) => RateOption[];
@@ -0,0 +1,9 @@
1
+ import { SE } from "@shipengine/react-api";
2
+ export declare const useWindsorFramework: (shipment?: SE.SalesOrderShipment, enabled?: boolean) => {
3
+ isWindsorFrameworkInvalid: {
4
+ isInvalid: boolean;
5
+ messages?: string[] | undefined;
6
+ };
7
+ movementIndicator: SE.MovementIndicator | undefined;
8
+ requiresWindsorFramework: boolean | undefined;
9
+ };
package/src/index.d.ts CHANGED
@@ -9,3 +9,4 @@ export * from "./types";
9
9
  export * from "./utilities";
10
10
  export * from "./workflows";
11
11
  export * from "./elements-provider";
12
+ export * from "@shipengine/react-api";