@shipengine/elements 1.2.1 → 1.3.1

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 (62) hide show
  1. package/index.cjs +4251 -3382
  2. package/index.js +4248 -3385
  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 +334 -144
  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 +56 -31
  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/date.d.ts +46 -5
  47. package/src/utilities/money.d.ts +7 -0
  48. package/src/utilities/shipengine/sales-order.d.ts +4 -1
  49. package/src/workflows/onboarding/onboarding.d.ts +19 -1
  50. package/src/components/code-block/code-block.d.ts +0 -6
  51. package/src/components/code-block/index.d.ts +0 -1
  52. package/src/components/field/money-input/hooks/index.d.ts +0 -1
  53. package/src/components/field/money-input/hooks/use-utils.d.ts +0 -6
  54. package/src/components/templates/connect-carrier/connect-carrier.d.ts +0 -1
  55. package/src/components/templates/connect-carrier/connect-carrier.styles.d.ts +0 -1
  56. package/src/components/templates/connect-carrier/index.d.ts +0 -1
  57. package/src/components/templates/customs-item-form/customs-item-form.d.ts +0 -15
  58. package/src/components/templates/customs-item-form/index.d.ts +0 -2
  59. package/src/components/templates/customs-items-display/customs-items-display.d.ts +0 -7
  60. package/src/components/templates/customs-items-display/index.d.ts +0 -1
  61. package/src/utilities/i18nDateUtils.d.ts +0 -16
  62. /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
  };
@@ -382,11 +382,11 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
382
382
  weightGroup: string;
383
383
  today: string;
384
384
  };
385
+ /**
386
+ * `onBeforeLabelCreate` is an async/sync callback function that will be invoked before every
387
+ * label purchase.
388
+ */
385
389
  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
390
  contentDescription: string;
391
391
  };
392
392
  loading: {
@@ -405,16 +405,16 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
405
405
  rates: {
406
406
  uspsMediaMailAcknowledgement: string;
407
407
  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
- */
408
+ rateSavings: string;
412
409
  upsGroundSaverTermsAcknowledgement: string;
413
410
  dhlExpressTermsAcknowledgement: string;
414
411
  };
415
412
  requirements: {
416
413
  noWarehouse: string;
417
- noCarrier: string;
414
+ noCarrier: string; /**
415
+ * `onLoad` is an async/sync callback provided by the host application that is invoked after the
416
+ * element is loaded. (This may be useful to grab the shipmentId of a one-off label)
417
+ */
418
418
  noWarehouseOrCarrier: string;
419
419
  };
420
420
  shipToAddressFormFields: string;
@@ -448,6 +448,14 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
448
448
  fundingAndCarrierConnection: string;
449
449
  };
450
450
  warehouse: {
451
+ /**
452
+ * # Purchase Label Component Props
453
+ *
454
+ * These are the shared props that will be passed into the `<PurchaseLabel.Element />`, and work
455
+ * for either shipment-based or sales order-based label purchasing.
456
+ *
457
+ * @see {@link PurchaseLabel.Element | This prop types usage in `<PurchaseLabel.Element />`}
458
+ */
451
459
  title: string;
452
460
  subtitle: string;
453
461
  inlineMessage: string;
@@ -456,7 +464,9 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
456
464
  title: string;
457
465
  subtitle: string;
458
466
  action: string;
459
- };
467
+ }; /**
468
+ * `features` is a set of feature flags you would like to enable or disable in this component.
469
+ */
460
470
  termsAndAgreementLinkText: {
461
471
  aHR0cHM6Ly9teWRobC5leHByZXNzLmRobC91cy9lbi9sZWdhbC90ZXJtcy1hbmQtY29uZGl0aW9ucy5odG1s: string;
462
472
  "aHR0cHM6Ly93d3cuc3RhbXBzLmNvbS9wcml2YWN5LXBvbGljeQ==": string;
@@ -472,10 +482,7 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
472
482
  "WW9kZWwgRGlyZWN0IC0gVGVybXMgYW5kIENvbmRpdGlvbnMgKOKAnFRlcm1z4oCdKQ==": string;
473
483
  "RXZyaSBTZW5kIFRlcm1zICYgQ29uZGl0aW9ucw==": string;
474
484
  "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
- */
485
+ };
479
486
  };
480
487
  "manage-defaults": {
481
488
  label: {
@@ -562,6 +569,14 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
562
569
  minimumPurchaseAmount: string;
563
570
  other: string;
564
571
  };
572
+ /**
573
+ *`getPreferredRates is an async/sync optional callback function that will be invoked each time rates are caculated.
574
+ * This is an optional callback function that returns an array of ShipEngine rates. The rates from this response will
575
+ * be spliced into the normal get rates response the Elements makes internally. If a service code matches a service
576
+ * code on a rate returned from getPreferredRates, the rate returned from getPreferredRates will not be shown in the
577
+ * rate form. These preferred rates will be displayed with a set of UI enhancements that incude a dynamic cost savings
578
+ * flag and green checkmark when the rate is selected.
579
+ */
565
580
  fundAndPurchase: {
566
581
  finalBalance: string;
567
582
  insufficientFunds: string;
@@ -627,9 +642,7 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
627
642
  };
628
643
  noResults: string;
629
644
  subFields: {
630
- optional: string; /**
631
- * `features` is a set of feature flags you would like to enable or disable in this component.
632
- */
645
+ optional: string;
633
646
  };
634
647
  parserFields: {
635
648
  fullAddress: string;
@@ -639,7 +652,14 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
639
652
  confirm: string;
640
653
  addressNotValidated: string;
641
654
  modified: string;
642
- title: string;
655
+ title: string; /**
656
+ *`getPreferredRates is an async/sync optional callback function that will be invoked each time rates are caculated.
657
+ * This is an optional callback function that returns an array of ShipEngine rates. The rates from this response will
658
+ * be spliced into the normal get rates response the Elements makes internally. If a service code matches a service
659
+ * code on a rate returned from getPreferredRates, the rate returned from getPreferredRates will not be shown in the
660
+ * rate form. These preferred rates will be displayed with a set of UI enhancements that incude a dynamic cost savings
661
+ * flag and green checkmark when the rate is selected.
662
+ */
643
663
  originalAddress: string;
644
664
  matchedAddress: string;
645
665
  unableToValidate: string;
@@ -664,10 +684,7 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
664
684
  expirationPlaceholder: string;
665
685
  cardNumberPlaceholder: string;
666
686
  };
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
- */
687
+ };
671
688
  carriers: {
672
689
  fields: {
673
690
  agreement: string;
@@ -693,6 +710,10 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
693
710
  directSignature: string;
694
711
  none: string;
695
712
  signature: string;
713
+ /**
714
+ * `onChangeShipmentFormMode` is an async/sync callback function that will be invoked each time
715
+ * the user toggles the `Shipment Form Mode` between `Browse Rates` and `Selected Rate`.
716
+ */
696
717
  verbalConfirmation: string;
697
718
  };
698
719
  customs: {
@@ -734,6 +755,7 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
734
755
  autoFundingSettings: string;
735
756
  carrier: string;
736
757
  carriers: string;
758
+ connectCarrierForm: string;
737
759
  fundingSourceMetadata: string;
738
760
  label: string;
739
761
  salesOrder: string;
@@ -771,6 +793,7 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
771
793
  accountSettings: string;
772
794
  carrier: string;
773
795
  carriers: string;
796
+ connectCarrierForm: string;
774
797
  connectingCarriers: string;
775
798
  creatingFundingSource: string;
776
799
  data: string;
@@ -872,11 +895,13 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
872
895
  "connect-carrier": {
873
896
  registrationForm: {
874
897
  title: string;
875
- isLoading: string;
876
898
  betaWarning: string;
877
899
  };
878
900
  };
879
901
  "account-settings": {
902
+ messages: {
903
+ noFundingSources: string;
904
+ };
880
905
  title: string;
881
906
  sections: {
882
907
  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;