@shipengine/elements 1.2.1 → 1.3.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 (60) hide show
  1. package/index.cjs +1447 -638
  2. package/index.js +1447 -639
  3. package/package.json +2 -3
  4. package/src/components/add-funds-form/add-funds-form.d.ts +2 -1
  5. package/src/components/auto-funding-form/auto-funding-form.d.ts +7 -2
  6. package/src/components/carrier-balance/carrier-balance.d.ts +3 -1
  7. package/src/components/drawer/drawer.styles.d.ts +0 -1
  8. package/src/components/fund-and-purchase/fund-and-purchase.d.ts +3 -1
  9. package/src/components/grid-controller/cell-formatted-date.d.ts +5 -3
  10. package/src/components/history/history-card/history-card.d.ts +4 -3
  11. package/src/components/history/history-card-extension/history-card-extension.d.ts +3 -1
  12. package/src/components/index.d.ts +0 -1
  13. package/src/components/manage-funding/manage-funding.d.ts +6 -1
  14. package/src/components/tabs/tabs.styles.d.ts +1 -1
  15. package/src/components/templates/account-settings/account-settings.d.ts +2 -1
  16. package/src/components/templates/connect-carrier-form/connect-carrier-form.d.ts +8 -2
  17. package/src/components/templates/connect-carrier-form/connect-carrier-form.styles.d.ts +4 -0
  18. package/src/components/templates/index.d.ts +1 -1
  19. package/src/components/templates/product-form/index.d.ts +2 -0
  20. package/src/components/templates/{customs-item-form/customs-item-form-schema.d.ts → product-form/product-form-schema.d.ts} +16 -16
  21. package/src/components/templates/product-form/product-form.d.ts +15 -0
  22. package/src/components/templates/products-display/index.d.ts +1 -0
  23. package/src/components/templates/products-display/products-display.d.ts +7 -0
  24. package/src/components/templates/rate-form/rate-form.d.ts +2 -1
  25. package/src/components/templates/shipment-form/shipment-form.d.ts +3 -2
  26. package/src/components/templates/shipment-form/shipment-schema.d.ts +331 -140
  27. package/src/components/templates/theme-creator/theme-creator.d.ts +6 -1
  28. package/src/components/templates/theme-creator/theme-creator.styles.d.ts +2 -2
  29. package/src/elements/account-settings/account-settings.d.ts +51 -6
  30. package/src/elements/configure-shipment/configure-shipment.d.ts +2 -1
  31. package/src/elements/configure-shipment/hooks/use-customs.d.ts +1 -1
  32. package/src/elements/configure-shipment/hooks/use-rates-with-cache.d.ts +4 -4
  33. package/src/elements/configure-shipment/hooks/use-shipment-form.d.ts +1 -1
  34. package/src/elements/connect-carrier/connect-carrier.d.ts +17 -3
  35. package/src/elements/labels-grid/labels-grid.d.ts +12 -1
  36. package/src/elements/purchase-label/purchase-label-by-sales-order.d.ts +3 -1
  37. package/src/elements/purchase-label/purchase-label-by-shipment.d.ts +3 -1
  38. package/src/elements/purchase-label/purchase-label.d.ts +64 -28
  39. package/src/elements/shipments-grid/shipments-grid.d.ts +12 -1
  40. package/src/elements/theme-creator/theme-creator.d.ts +16 -1
  41. package/src/elements/view-shipment/view-shipment.d.ts +12 -1
  42. package/src/elements/void-label/void-label.d.ts +18 -8
  43. package/src/factories/shipengine/shipment.d.ts +2 -1
  44. package/src/features/wallet-history/wallet-history.styles.d.ts +6 -1
  45. package/src/locales/en/index.d.ts +12 -1
  46. package/src/utilities/money.d.ts +7 -0
  47. package/src/utilities/shipengine/sales-order.d.ts +4 -1
  48. package/src/workflows/onboarding/onboarding.d.ts +19 -1
  49. package/src/components/code-block/code-block.d.ts +0 -6
  50. package/src/components/code-block/index.d.ts +0 -1
  51. package/src/components/field/money-input/hooks/index.d.ts +0 -1
  52. package/src/components/field/money-input/hooks/use-utils.d.ts +0 -6
  53. package/src/components/templates/connect-carrier/connect-carrier.d.ts +0 -1
  54. package/src/components/templates/connect-carrier/connect-carrier.styles.d.ts +0 -1
  55. package/src/components/templates/connect-carrier/index.d.ts +0 -1
  56. package/src/components/templates/customs-item-form/customs-item-form.d.ts +0 -15
  57. package/src/components/templates/customs-item-form/index.d.ts +0 -2
  58. package/src/components/templates/customs-items-display/customs-items-display.d.ts +0 -7
  59. package/src/components/templates/customs-items-display/index.d.ts +0 -1
  60. /package/src/components/templates/{customs-items-display/customs-items-display.styles.d.ts → products-display/products-display.styles.d.ts} +0 -0
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { CustomThemeData } from "@shipengine/giger-theme";
2
3
  export type ThemeCreatorProps = {
3
4
  onUpdateThemeConfig: (themeConfig: CustomThemeData) => void;
@@ -5,6 +6,10 @@ export type ThemeCreatorProps = {
5
6
  presetName: string;
6
7
  themeConfig: CustomThemeData;
7
8
  }[];
9
+ showDrawer?: {
10
+ content?: React.ReactNode;
11
+ copyToClipboardText?: string;
12
+ };
8
13
  themeConfig: CustomThemeData;
9
14
  };
10
- export declare const ThemeCreator: ({ themeConfig, onUpdateThemeConfig, presets }: ThemeCreatorProps) => import("@emotion/react/jsx-runtime").JSX.Element;
15
+ export declare const ThemeCreator: ({ themeConfig, onUpdateThemeConfig, presets, showDrawer, }: ThemeCreatorProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -49,7 +49,7 @@ export declare const styles: {
49
49
  };
50
50
  presetOption: (theme: Theme) => {
51
51
  "&:hover": {
52
- backgroundColor: string;
52
+ backgroundColor: "theme.palette.gray.ultraLight";
53
53
  };
54
54
  backgroundColor: "transparent";
55
55
  borderRadius: string;
@@ -60,7 +60,7 @@ export declare const styles: {
60
60
  "&:hover": {
61
61
  backgroundColor: "#d1d4d7";
62
62
  };
63
- backgroundColor: string;
63
+ backgroundColor: "#E4E5E7";
64
64
  borderRadius: string;
65
65
  cursor: "pointer";
66
66
  display: "flex";
@@ -67,8 +67,15 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
67
67
  actions: {
68
68
  downloadCsv: string;
69
69
  chooseDate: string;
70
+ tryAgain: string;
71
+ };
72
+ errors: {
73
+ failureToFetch: string;
70
74
  };
71
75
  dateRange: string;
76
+ details: {
77
+ inaccurateWeight: string;
78
+ };
72
79
  historyOptions: {
73
80
  custom: string;
74
81
  last30days: string;
@@ -175,6 +182,30 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
175
182
  billing: {
176
183
  title: string;
177
184
  subtitleCard: string;
185
+ /**
186
+ * # Registered Account Settings Element
187
+ *
188
+ * - This is the registered `<AccountSettings />` element that will be used to render the
189
+ * `<AccountSettings.Element />` component.
190
+ *
191
+ * @param ElementProps The props, callbacks, and resources necessary to render
192
+ * the `<AccountSettings.Element />` component.
193
+ *
194
+ * @example
195
+ * The `<Component />` is the source JSX that is rendered when you make use of the `AccountSettings`
196
+ * Element directly. Here is a brief example of how you would use it within your application.
197
+ * ```tsx
198
+ * <AccountSettings.Element/>
199
+ * ```
200
+ *
201
+ * <br />
202
+ *
203
+ * @see {@link AccountSettings.ComponentProps | The **props** that can be passed into the `<AccountSettings.Element />` component}
204
+ * @see {@link ListCarriers.Component | The `<List-Carriers />` component used to view connected carriers}
205
+ * @see {@link ManageWarehouses.Component | The `<ManageWarehouses />` component used to add, update, or remove warehouses}
206
+ * @see {@link PaymentMethodSettings | The `<PaymentMethodSettings />` component used to manage payment methods}
207
+ * @see {@link ManageFunding | The `<ManageFunding />` component used to manage funding rules and add funds to a carrier account}
208
+ */
178
209
  subtitleBilling: string;
179
210
  };
180
211
  };
@@ -192,6 +223,13 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
192
223
  purchaseLabel: string;
193
224
  purchaseNow: string;
194
225
  showItems: string;
226
+ /**
227
+ * # Account Settings Component Props
228
+ *
229
+ * - These are the base props that will be passed into the `<AccountSettings />` component.
230
+ *
231
+ * @see {@link AccountSettings.Component | This prop types usage in the `<AccountSettings /> component`}
232
+ */
195
233
  showMoreRates: string;
196
234
  showFewerRates: string;
197
235
  saveRate: string;
@@ -380,10 +418,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
380
418
  returnTo: string;
381
419
  returnToAddressIsDifferent: string;
382
420
  setDefault: string;
383
- shipFrom: string; /**
384
- * This callback function will be used to house the logic you wish to execute when the
385
- * user saves new changes to their account settings.
386
- */
421
+ shipFrom: string;
387
422
  };
388
423
  "manage-funding": {
389
424
  actions: {
@@ -461,7 +496,13 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
461
496
  edit: string;
462
497
  hide: string;
463
498
  parse: string;
464
- purchase: string;
499
+ purchase: string; /**
500
+ * # Account Settings Component Props
501
+ *
502
+ * - These are the base props that will be passed into the `<AccountSettings />` component.
503
+ *
504
+ * @see {@link AccountSettings.Component | This prop types usage in the `<AccountSettings /> component`}
505
+ */
465
506
  remove: string;
466
507
  save: string;
467
508
  skipForNow: string;
@@ -587,6 +628,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
587
628
  autoFundingSettings: string;
588
629
  carrier: string;
589
630
  carriers: string;
631
+ connectCarrierForm: string;
590
632
  fundingSourceMetadata: string;
591
633
  label: string;
592
634
  salesOrder: string;
@@ -624,6 +666,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
624
666
  accountSettings: string;
625
667
  carrier: string;
626
668
  carriers: string;
669
+ connectCarrierForm: string;
627
670
  connectingCarriers: string;
628
671
  creatingFundingSource: string;
629
672
  data: string;
@@ -725,11 +768,13 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
725
768
  "connect-carrier": {
726
769
  registrationForm: {
727
770
  title: string;
728
- isLoading: string;
729
771
  betaWarning: string;
730
772
  };
731
773
  };
732
774
  "account-settings": {
775
+ messages: {
776
+ noFundingSources: string;
777
+ };
733
778
  title: string;
734
779
  sections: {
735
780
  accountBalance: string;
@@ -39,6 +39,7 @@ export type ConfigureShipmentFeatures = {
39
39
  shipmentForm?: ShipmentFormFeatures;
40
40
  };
41
41
  export type ConfigureShipmentProps = {
42
+ currency: SE.Currency;
42
43
  errors?: ShipmentFormProps["errors"];
43
44
  features?: ConfigureShipmentFeatures;
44
45
  getPreferredRates?: (shipment: SE.SalesOrderShipment, isInternational: boolean) => Promise<PreferredRatesResponse | undefined>;
@@ -63,4 +64,4 @@ export type ConfigureShipmentProps = {
63
64
  shippingPresets?: UseShippingPresetsOptionsProps;
64
65
  warehouseId?: string;
65
66
  };
66
- export declare const ConfigureShipment: ({ errors, features, getPreferredRates, onAddressValidation, onApplyPreset, onBeforeLabelCreate, onChangeAddress, onLabelCreateFailure, onLabelCreateSuccess, onRateSaved, onRatesCalculated, onShipmentUpdated, printLabelLayout, preferredServiceCodes, salesOrder, shipment, onBeforeRateSaved, ...props }: ConfigureShipmentProps) => import("@emotion/react/jsx-runtime").JSX.Element;
67
+ export declare const ConfigureShipment: ({ errors, features, currency, getPreferredRates, onAddressValidation, onApplyPreset, onBeforeLabelCreate, onChangeAddress, onLabelCreateFailure, onLabelCreateSuccess, onRateSaved, onRatesCalculated, onShipmentUpdated, printLabelLayout, preferredServiceCodes, salesOrder, shipment, onBeforeRateSaved, ...props }: ConfigureShipmentProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -5,5 +5,5 @@ export type UseCustomsProps = {
5
5
  };
6
6
  export declare const useCustoms: ({ onUpdate, shipment }: UseCustomsProps) => {
7
7
  customsErrors: SE.CodedError[] | null;
8
- handleUpdateCustoms: (customs: SE.Customs) => Promise<SE.SalesOrderShipment>;
8
+ handleUpdateCustoms: (customs: SE.Customs, products: SE.Product[]) => Promise<SE.SalesOrderShipment>;
9
9
  };
@@ -19,14 +19,14 @@ export declare const useRatesWithCache: ({ shipment, onRatesCalculated, getPrefe
19
19
  ratesCalculating: boolean;
20
20
  ratesErrors: SE.CodedError[] | null;
21
21
  ratesResponse: {
22
- created_at: string;
22
+ createdAt: string;
23
23
  errors: SE.CodedError[];
24
24
  invalidRates: SE.Rate[];
25
- rate_request_id: string;
25
+ rateRequestId: string;
26
26
  rates: SE.Rate[];
27
- shipment_id: string;
27
+ shipmentId: string;
28
28
  status: "error" | "working" | "completed" | "partial";
29
- } | SE.RateResponse | undefined;
29
+ } | undefined;
30
30
  requestRates: (shipment: SE.SalesOrderShipment, isInternational: boolean) => Promise<void>;
31
31
  resetRates: () => void;
32
32
  };
@@ -27,7 +27,7 @@ export declare const useShipmentForm: ({ compatibleCountryCodes, onAddressValida
27
27
  onSubmitParseShipTo: ({ fullAddress }: {
28
28
  fullAddress: string;
29
29
  }) => Promise<SE.AddressExtraction>;
30
- onUpdateCustoms: (customs: SE.Customs) => Promise<SE.SalesOrderShipment>;
30
+ onUpdateCustoms: (customs: SE.Customs, products: SE.Product[]) => Promise<SE.SalesOrderShipment>;
31
31
  parseAddressErrors: SE.CodedError[] | undefined;
32
32
  resetParseAddress: () => void;
33
33
  resetSalesOrderShipment: () => void;
@@ -1,14 +1,24 @@
1
1
  /// <reference types="react" />
2
- export declare const Component: () => import("@emotion/react/jsx-runtime").JSX.Element;
3
- export declare const Element: ({ resources, ...props }: object & {
2
+ export type ComponentProps = {
3
+ carrierName: string;
4
+ };
5
+ export declare const Component: ({ carrierName }: ComponentProps) => import("@emotion/react/jsx-runtime").JSX.Element;
6
+ export declare const Element: ({ resources, ...props }: ComponentProps & {
4
7
  resources?: {
5
8
  en: {
6
9
  "wallet-history": {
7
10
  actions: {
8
11
  downloadCsv: string;
9
12
  chooseDate: string;
13
+ tryAgain: string;
14
+ };
15
+ errors: {
16
+ failureToFetch: string;
10
17
  };
11
18
  dateRange: string;
19
+ details: {
20
+ inaccurateWeight: string;
21
+ };
12
22
  historyOptions: {
13
23
  custom: string;
14
24
  last30days: string;
@@ -524,6 +534,7 @@ export declare const Element: ({ resources, ...props }: object & {
524
534
  autoFundingSettings: string;
525
535
  carrier: string;
526
536
  carriers: string;
537
+ connectCarrierForm: string;
527
538
  fundingSourceMetadata: string;
528
539
  label: string;
529
540
  salesOrder: string;
@@ -561,6 +572,7 @@ export declare const Element: ({ resources, ...props }: object & {
561
572
  accountSettings: string;
562
573
  carrier: string;
563
574
  carriers: string;
575
+ connectCarrierForm: string;
564
576
  connectingCarriers: string;
565
577
  creatingFundingSource: string;
566
578
  data: string;
@@ -662,11 +674,13 @@ export declare const Element: ({ resources, ...props }: object & {
662
674
  "connect-carrier": {
663
675
  registrationForm: {
664
676
  title: string;
665
- isLoading: string;
666
677
  betaWarning: string;
667
678
  };
668
679
  };
669
680
  "account-settings": {
681
+ messages: {
682
+ noFundingSources: string;
683
+ };
670
684
  title: string;
671
685
  sections: {
672
686
  accountBalance: string;
@@ -9,8 +9,15 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
9
9
  actions: {
10
10
  downloadCsv: string;
11
11
  chooseDate: string;
12
+ tryAgain: string;
13
+ };
14
+ errors: {
15
+ failureToFetch: string;
12
16
  };
13
17
  dateRange: string;
18
+ details: {
19
+ inaccurateWeight: string;
20
+ };
14
21
  historyOptions: {
15
22
  custom: string;
16
23
  last30days: string;
@@ -526,6 +533,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
526
533
  autoFundingSettings: string;
527
534
  carrier: string;
528
535
  carriers: string;
536
+ connectCarrierForm: string;
529
537
  fundingSourceMetadata: string;
530
538
  label: string;
531
539
  salesOrder: string;
@@ -563,6 +571,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
563
571
  accountSettings: string;
564
572
  carrier: string;
565
573
  carriers: string;
574
+ connectCarrierForm: string;
566
575
  connectingCarriers: string;
567
576
  creatingFundingSource: string;
568
577
  data: string;
@@ -664,11 +673,13 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
664
673
  "connect-carrier": {
665
674
  registrationForm: {
666
675
  title: string;
667
- isLoading: string;
668
676
  betaWarning: string;
669
677
  };
670
678
  };
671
679
  "account-settings": {
680
+ messages: {
681
+ noFundingSources: string;
682
+ };
672
683
  title: string;
673
684
  sections: {
674
685
  accountBalance: string;
@@ -1,9 +1,11 @@
1
+ import { SE } from "@shipengine/alchemy";
1
2
  import { UseImportSalesOrderProps } from "./hooks";
2
3
  import { PurchaseLabelCommonProps } from "./purchase-label";
3
4
  export type PurchaseLabelSalesOrderProps = PurchaseLabelCommonProps & {
5
+ currency?: SE.Currency;
4
6
  externalOrderId?: UseImportSalesOrderProps["externalOrderId"];
5
7
  externalOrderNumber?: UseImportSalesOrderProps["externalOrderNumber"];
6
8
  orderSourceCode?: UseImportSalesOrderProps["orderSourceCode"];
7
9
  salesOrderId?: UseImportSalesOrderProps["salesOrderId"];
8
10
  };
9
- export declare const PurchaseLabelBySalesOrder: ({ features, externalOrderId, externalOrderNumber, onLoad, onShipmentUpdated, orderSourceCode, salesOrderId, warehouseId, printLabelLayout, ...props }: PurchaseLabelSalesOrderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
11
+ export declare const PurchaseLabelBySalesOrder: ({ features, externalOrderId, externalOrderNumber, onLoad, onShipmentUpdated, orderSourceCode, salesOrderId, warehouseId, printLabelLayout, currency, ...props }: PurchaseLabelSalesOrderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,5 +1,7 @@
1
+ import { SE } from "@shipengine/alchemy";
1
2
  import { PurchaseLabelCommonProps } from "./purchase-label";
2
3
  export type PurchaseLabelByShipmentProps = PurchaseLabelCommonProps & {
4
+ currency?: SE.Currency;
3
5
  shipmentId?: string;
4
6
  };
5
- export declare const PurchaseLabelByShipment: ({ onLoad, onShipmentUpdated, shipmentId, ...props }: PurchaseLabelByShipmentProps) => import("@emotion/react/jsx-runtime").JSX.Element;
7
+ export declare const PurchaseLabelByShipment: ({ onLoad, onShipmentUpdated, shipmentId, currency, ...props }: PurchaseLabelByShipmentProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -195,8 +195,15 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
195
195
  actions: {
196
196
  downloadCsv: string;
197
197
  chooseDate: string;
198
+ tryAgain: string;
199
+ };
200
+ errors: {
201
+ failureToFetch: string;
198
202
  };
199
203
  dateRange: string;
204
+ details: {
205
+ inaccurateWeight: string;
206
+ };
200
207
  historyOptions: {
201
208
  custom: string;
202
209
  last30days: string;
@@ -254,14 +261,7 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
254
261
  highVolumeForms: string;
255
262
  multipleShippingServices: string;
256
263
  sections: {
257
- labels: string; /**
258
- *`getPreferredRates is an async/sync optional callback function that will be invoked each time rates are caculated.
259
- * This is an optional callback function that returns an array of ShipEngine rates. The rates from this response will
260
- * be spliced into the normal get rates response the Elements makes internally. If a service code matches a service
261
- * code on a rate returned from getPreferredRates, the rate returned from getPreferredRates will not be shown in the
262
- * rate form. These preferred rates will be displayed with a set of UI enhancements that incude a dynamic cost savings
263
- * flag and green checkmark when the rate is selected.
264
- */
264
+ labels: string;
265
265
  };
266
266
  noLabels: string;
267
267
  };
@@ -383,10 +383,6 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
383
383
  today: string;
384
384
  };
385
385
  hints: {
386
- /**
387
- * `onBeforeRateSave` is an async/sync callback function that will be invoked before each time a user
388
- * saves a rate.
389
- */
390
386
  contentDescription: string;
391
387
  };
392
388
  loading: {
@@ -405,10 +401,7 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
405
401
  rates: {
406
402
  uspsMediaMailAcknowledgement: string;
407
403
  uspsFirstClassMailAcknowledgement_leof: string;
408
- rateSavings: string; /**
409
- * `onLabelCreateSuccess` is an async/sync callback provided by the client that is invoked if the
410
- * label is successfully created/purchased.
411
- */
404
+ rateSavings: string;
412
405
  upsGroundSaverTermsAcknowledgement: string;
413
406
  dhlExpressTermsAcknowledgement: string;
414
407
  };
@@ -472,10 +465,7 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
472
465
  "WW9kZWwgRGlyZWN0IC0gVGVybXMgYW5kIENvbmRpdGlvbnMgKOKAnFRlcm1z4oCdKQ==": string;
473
466
  "RXZyaSBTZW5kIFRlcm1zICYgQ29uZGl0aW9ucw==": string;
474
467
  "VGVybXMgb2YgU2VydmljZSBVbml0ZWQgS2luZ2RvbQ==": string;
475
- }; /**
476
- * `onBeforeRateSave` is an async/sync callback function that will be invoked before each time a user
477
- * saves a rate.
478
- */
468
+ };
479
469
  };
480
470
  "manage-defaults": {
481
471
  label: {
@@ -575,6 +565,11 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
575
565
  unableToFindBalance: string;
576
566
  };
577
567
  currentBalance: string;
568
+ /**
569
+ * `onAddressValidation` is an async/sync callback function that will be invoked on each Address
570
+ * validation request. For example, whenever you update the `Ship To Address` or
571
+ * `Ship From Address` for a given shipment.
572
+ */
578
573
  maximumBalanceAmount: string;
579
574
  };
580
575
  "list-carriers": {
@@ -627,9 +622,7 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
627
622
  };
628
623
  noResults: string;
629
624
  subFields: {
630
- optional: string; /**
631
- * `features` is a set of feature flags you would like to enable or disable in this component.
632
- */
625
+ optional: string;
633
626
  };
634
627
  parserFields: {
635
628
  fullAddress: string;
@@ -664,10 +657,7 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
664
657
  expirationPlaceholder: string;
665
658
  cardNumberPlaceholder: string;
666
659
  };
667
- }; /**
668
- * `onApplyPreset` is an async/sync callback function that will be invoked each time a `Preset`
669
- * has been applied to a shipment.
670
- */
660
+ };
671
661
  carriers: {
672
662
  fields: {
673
663
  agreement: string;
@@ -690,6 +680,10 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
690
680
  adultSignature: string;
691
681
  delivery: string;
692
682
  deliveryMailed: string;
683
+ /**
684
+ * `onChangeShipmentFormMode` is an async/sync callback function that will be invoked each time
685
+ * the user toggles the `Shipment Form Mode` between `Browse Rates` and `Selected Rate`.
686
+ */
693
687
  directSignature: string;
694
688
  none: string;
695
689
  signature: string;
@@ -734,6 +728,7 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
734
728
  autoFundingSettings: string;
735
729
  carrier: string;
736
730
  carriers: string;
731
+ connectCarrierForm: string;
737
732
  fundingSourceMetadata: string;
738
733
  label: string;
739
734
  salesOrder: string;
@@ -771,6 +766,7 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
771
766
  accountSettings: string;
772
767
  carrier: string;
773
768
  carriers: string;
769
+ connectCarrierForm: string;
774
770
  connectingCarriers: string;
775
771
  creatingFundingSource: string;
776
772
  data: string;
@@ -830,6 +826,44 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
830
826
  tooManyCharacters: string;
831
827
  };
832
828
  shippingPresets: {
829
+ /**
830
+ * # Registered Purchase Label Element
831
+ *
832
+ * @param ElementProps The props necessary to render the `<PurchaseLabel.Element />` for shipment
833
+ * based or sales order based label purchasing.
834
+ *
835
+ * @example
836
+ * The `<Component />` is the source JSX that is rendered when you make use of the `PurchaseLabel`
837
+ * Element directly.
838
+ * ```tsx
839
+ * <PurchaseLabel.Element
840
+ * key={currentSalesOrderId}
841
+ * printLabelLayout='4x6'
842
+ * shippingPresets={presets}
843
+ * onShipmentUpdated={(shipment) => console.log('Shipment Updated', shipment)}
844
+ * onRateSaved={(
845
+ * shipment: SE.SalesOrderShipment,
846
+ * rate?: SE.Rate,
847
+ * rateOptions?: SE.Rate[]
848
+ * ) => console.log('Rate Saved', shipment, rate, rateOptions)}
849
+ * onRatesCalculated={() => console.log('Rates Calculated')}
850
+ * onBeforeLabelCreate={onBeforeLabelPurchase}
851
+ * onLabelCreateSuccess={onLabelPurchaseSuccess}
852
+ * onLabelCreateFailure={(rate) => console.log('Label Purchase Failed', rate)}
853
+ * warehouseId={defaultWarehouseId}
854
+ * />
855
+ * ```
856
+ *
857
+ * <br />
858
+ *
859
+ * - Once a label has been purchased using this Element, you can take the `shipmentId` for the
860
+ * associated shipment and pass it into the `<ViewShipment.Element />` Element in order to view
861
+ * the shipment details.
862
+ *
863
+ * @see {@link PurchaseLabel.PurchaseLabelCommonProps | The **Common props** used in `<PurchaseLabel.Element />`}
864
+ *
865
+ * @see {@link ViewShipment.Element | The next step in the label purchase workflow `<ViewShipment.Element />`}
866
+ */
833
867
  apply: string;
834
868
  platform: string;
835
869
  user: string;
@@ -872,11 +906,13 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
872
906
  "connect-carrier": {
873
907
  registrationForm: {
874
908
  title: string;
875
- isLoading: string;
876
909
  betaWarning: string;
877
910
  };
878
911
  };
879
912
  "account-settings": {
913
+ messages: {
914
+ noFundingSources: string;
915
+ };
880
916
  title: string;
881
917
  sections: {
882
918
  accountBalance: string;
@@ -10,8 +10,15 @@ export declare const Element: ({ resources, ...props }: ShipmentsGridProps & {
10
10
  actions: {
11
11
  downloadCsv: string;
12
12
  chooseDate: string;
13
+ tryAgain: string;
14
+ };
15
+ errors: {
16
+ failureToFetch: string;
13
17
  };
14
18
  dateRange: string;
19
+ details: {
20
+ inaccurateWeight: string;
21
+ };
15
22
  historyOptions: {
16
23
  custom: string;
17
24
  last30days: string;
@@ -527,6 +534,7 @@ export declare const Element: ({ resources, ...props }: ShipmentsGridProps & {
527
534
  autoFundingSettings: string;
528
535
  carrier: string;
529
536
  carriers: string;
537
+ connectCarrierForm: string;
530
538
  fundingSourceMetadata: string;
531
539
  label: string;
532
540
  salesOrder: string;
@@ -564,6 +572,7 @@ export declare const Element: ({ resources, ...props }: ShipmentsGridProps & {
564
572
  accountSettings: string;
565
573
  carrier: string;
566
574
  carriers: string;
575
+ connectCarrierForm: string;
567
576
  connectingCarriers: string;
568
577
  creatingFundingSource: string;
569
578
  data: string;
@@ -665,11 +674,13 @@ export declare const Element: ({ resources, ...props }: ShipmentsGridProps & {
665
674
  "connect-carrier": {
666
675
  registrationForm: {
667
676
  title: string;
668
- isLoading: string;
669
677
  betaWarning: string;
670
678
  };
671
679
  };
672
680
  "account-settings": {
681
+ messages: {
682
+ noFundingSources: string;
683
+ };
673
684
  title: string;
674
685
  sections: {
675
686
  accountBalance: string;
@@ -6,6 +6,10 @@ export type ComponentProps = {
6
6
  presetName: string;
7
7
  themeConfig: CustomThemeData;
8
8
  }[];
9
+ showDrawer?: {
10
+ content?: React.ReactNode;
11
+ copyToClipboardText?: string;
12
+ };
9
13
  themeConfig: CustomThemeData;
10
14
  };
11
15
  export declare const Component: ({ ...props }: ComponentProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -16,8 +20,15 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
16
20
  actions: {
17
21
  downloadCsv: string;
18
22
  chooseDate: string;
23
+ tryAgain: string;
24
+ };
25
+ errors: {
26
+ failureToFetch: string;
19
27
  };
20
28
  dateRange: string;
29
+ details: {
30
+ inaccurateWeight: string;
31
+ };
21
32
  historyOptions: {
22
33
  custom: string;
23
34
  last30days: string;
@@ -533,6 +544,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
533
544
  autoFundingSettings: string;
534
545
  carrier: string;
535
546
  carriers: string;
547
+ connectCarrierForm: string;
536
548
  fundingSourceMetadata: string;
537
549
  label: string;
538
550
  salesOrder: string;
@@ -570,6 +582,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
570
582
  accountSettings: string;
571
583
  carrier: string;
572
584
  carriers: string;
585
+ connectCarrierForm: string;
573
586
  connectingCarriers: string;
574
587
  creatingFundingSource: string;
575
588
  data: string;
@@ -671,11 +684,13 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
671
684
  "connect-carrier": {
672
685
  registrationForm: {
673
686
  title: string;
674
- isLoading: string;
675
687
  betaWarning: string;
676
688
  };
677
689
  };
678
690
  "account-settings": {
691
+ messages: {
692
+ noFundingSources: string;
693
+ };
679
694
  title: string;
680
695
  sections: {
681
696
  accountBalance: string;