@shipengine/elements 0.34.0 → 0.36.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 (100) hide show
  1. package/index.cjs +2019 -577
  2. package/index.js +2012 -578
  3. package/package.json +1 -1
  4. package/src/components/add-funds-form/add-funds-form.d.ts +20 -2
  5. package/src/components/add-funds-form/add-funds-schema.d.ts +26 -0
  6. package/src/components/address-preference-context/address-preference-context.d.ts +8 -0
  7. package/src/components/auto-funding-form/auto-funding-form.d.ts +22 -0
  8. package/src/components/auto-funding-form/auto-funding-schema.d.ts +17 -0
  9. package/src/components/button-group/button-group.d.ts +29 -0
  10. package/src/components/carrier-balance/carrier-balance.d.ts +23 -0
  11. package/src/components/collapsible-panel/collapsible-panel.d.ts +32 -0
  12. package/src/components/copy/copy-button.d.ts +4 -0
  13. package/src/components/cube/cube.d.ts +16 -0
  14. package/src/components/date-range-combo/date-range-combo.d.ts +14 -0
  15. package/src/components/date-range-select/date-range-select.d.ts +6 -0
  16. package/src/components/error-fallback/error-fallback.d.ts +12 -1
  17. package/src/components/field-label/field-label.d.ts +10 -0
  18. package/src/components/form-portal/form-portal.d.ts +9 -0
  19. package/src/components/fund-and-purchase/fund-and-purchase.d.ts +13 -0
  20. package/src/components/inline-label/inline-label.d.ts +10 -0
  21. package/src/components/items-breakdown/items-breakdown.d.ts +15 -0
  22. package/src/components/label-layout/label-layout.d.ts +5 -0
  23. package/src/components/link-action/link-action.d.ts +10 -0
  24. package/src/components/loader/loader.d.ts +5 -0
  25. package/src/components/manage-funding/manage-funding.d.ts +26 -0
  26. package/src/components/payment-method-settings/payment-method-settings.d.ts +19 -0
  27. package/src/components/portal/portal.d.ts +10 -1
  28. package/src/components/powered-by-shipengine/powered-by-shipengine.d.ts +8 -0
  29. package/src/components/section/section.d.ts +10 -0
  30. package/src/components/spacer/spacer.d.ts +30 -0
  31. package/src/components/spread/spread.d.ts +10 -0
  32. package/src/components/story-notes/story-notes.d.ts +10 -1
  33. package/src/components/templates/rate-form/rate-form.d.ts +2 -2
  34. package/src/components/templates/shipment-form/shipment-form.d.ts +2 -1
  35. package/src/components/templates/shipment-form/shipment-schema.d.ts +179 -17
  36. package/src/components/unit-settings/unit-settings.d.ts +5 -0
  37. package/src/constants/shipengine/address.d.ts +75 -0
  38. package/src/elements/account-settings/account-settings.d.ts +136 -1
  39. package/src/elements/configure-shipment/configure-shipment.d.ts +1 -0
  40. package/src/elements/configure-shipment/hooks/use-rates-form.d.ts +2 -2
  41. package/src/elements/configure-shipment/hooks/use-rates-with-cache.d.ts +1 -1
  42. package/src/elements/configure-shipment/hooks/use-request-rates.d.ts +1 -1
  43. package/src/elements/configure-shipment/hooks/use-shipment-form.d.ts +1 -0
  44. package/src/elements/list-carriers/list-carriers.d.ts +31 -0
  45. package/src/elements/manage-warehouses/manage-warehouses.d.ts +34 -0
  46. package/src/elements/onboarding/onboarding.d.ts +93 -2
  47. package/src/elements/purchase-label/purchase-label.d.ts +191 -7
  48. package/src/elements/shipengine-workflow/label-workflow.d.ts +138 -2
  49. package/src/elements/view-shipment/view-shipment.d.ts +128 -2
  50. package/src/elements/void-label/void-label.d.ts +134 -3
  51. package/src/extensions/zod.d.ts +5 -0
  52. package/src/factories/shipengine/package.d.ts +11 -0
  53. package/src/features/wallet-history/wallet-history.d.ts +5 -0
  54. package/src/hooks/index.d.ts +1 -0
  55. package/src/hooks/options/use-confirmation-options.d.ts +7 -0
  56. package/src/hooks/options/use-country-code-options.d.ts +16 -3
  57. package/src/hooks/options/use-customs-contents-options.d.ts +7 -0
  58. package/src/hooks/options/use-customs-non-delivery-options.d.ts +7 -0
  59. package/src/hooks/options/use-date-range-options.d.ts +22 -1
  60. package/src/hooks/options/use-expiration-month-options.d.ts +7 -0
  61. package/src/hooks/options/use-insurance-provider-options.d.ts +7 -0
  62. package/src/hooks/options/use-package-options.d.ts +7 -0
  63. package/src/hooks/options/use-rate-options.d.ts +11 -1
  64. package/src/hooks/options/use-service-code-options.d.ts +7 -0
  65. package/src/hooks/options/use-shipment-metadata.d.ts +8 -0
  66. package/src/hooks/options/use-shipping-presets-options.d.ts +10 -0
  67. package/src/hooks/options/use-state-code-options.d.ts +7 -0
  68. package/src/hooks/options/use-warehouse-options.d.ts +7 -0
  69. package/src/hooks/use-address-validation.d.ts +7 -0
  70. package/src/hooks/use-black-box-detection.d.ts +17 -1
  71. package/src/hooks/use-carrier-metadata.d.ts +7 -0
  72. package/src/hooks/use-nested-form.d.ts +9 -0
  73. package/src/hooks/use-page-layout.d.ts +25 -1
  74. package/src/hooks/use-root-portal.d.ts +15 -2
  75. package/src/hooks/use-run-once-on-true.d.ts +5 -1
  76. package/src/hooks/use-scrub-errors.d.ts +6 -3
  77. package/src/hooks/use-toggle.d.ts +5 -1
  78. package/src/locales/en/index.d.ts +8 -1
  79. package/src/schemas/shipengine/money.d.ts +4 -0
  80. package/src/schemas/shipengine/phone.d.ts +8 -0
  81. package/src/types/carrier-metadata.d.ts +20 -0
  82. package/src/utilities/create-dictionary.d.ts +4 -0
  83. package/src/utilities/date.d.ts +51 -2
  84. package/src/utilities/error.d.ts +16 -2
  85. package/src/utilities/feature-flags.d.ts +181 -0
  86. package/src/utilities/form-logger.d.ts +4 -0
  87. package/src/utilities/index.d.ts +1 -1
  88. package/src/utilities/money.d.ts +25 -0
  89. package/src/utilities/predicates/isString.d.ts +7 -0
  90. package/src/utilities/rates.d.ts +22 -1
  91. package/src/utilities/shipengine/address.d.ts +31 -0
  92. package/src/utilities/shipengine/carrier.d.ts +21 -0
  93. package/src/utilities/shipengine/dimensions.d.ts +27 -4
  94. package/src/utilities/shipengine/package.d.ts +4 -0
  95. package/src/utilities/shipengine/sales-order.d.ts +26 -0
  96. package/src/utilities/shipengine/shipment.d.ts +12 -0
  97. package/src/utilities/shipengine/weight.d.ts +92 -2
  98. package/src/utilities/string.d.ts +7 -0
  99. package/src/utilities/styles.d.ts +4 -0
  100. package/src/utilities/validation.d.ts +8 -0
@@ -1,8 +1,70 @@
1
1
  /// <reference types="react" />
2
+ /**
3
+ * # Account Settings Component Props
4
+ *
5
+ * - These are the base props that will be passed into the `<AccountSettings />` component.
6
+ *
7
+ * @see {@link AccountSettings.Component | This prop types usage in the `<AccountSettings /> component`}
8
+ */
2
9
  export type ComponentProps = {
10
+ /**
11
+ * This callback function will be used to house the logic you wish to execute when the
12
+ * user saves new changes to their account settings.
13
+ */
3
14
  onSaveSettings: () => void;
4
15
  };
16
+ /**
17
+ * # Account Settings Component
18
+ *
19
+ * - The `<AccountSettings />` component is used to display the user's account settings, as well as
20
+ * allowing them to make changes to various aspects of their account.
21
+ *
22
+ * @param onSaveSettings Any `void` function you wish to execute when the user saves any changes
23
+ * to their account settings.
24
+ *
25
+ * @returns Element An EmotionJSX.Element that will render the `<AccountSettings />` component
26
+ * with all the appropriate wrappers.
27
+ *
28
+ * @example
29
+ * You can see how the `<Component />` is used in the `createElement` function call below.
30
+ * ```tsx
31
+ * export const Element = alchemy.createElement(Component, ErrorFallback, {
32
+ * css: { height: "100%", maxWidth: "800px", minWidth: "440px", width: "100%" },
33
+ * resources: { en },
34
+ * });
35
+ * ```
36
+ *
37
+ * <br />
38
+ *
39
+ * @see {@link AccountSettings.Element | The **Element** created to render `<AccountSettings />`}
40
+ */
5
41
  export declare const Component: ({ onSaveSettings }: ComponentProps) => import("@emotion/react/jsx-runtime").JSX.Element;
42
+ /**
43
+ * # Registered Account Settings Element
44
+ *
45
+ * - This is the registered `<AccountSettings />` element that will be used to render the
46
+ * `<AccountSettings.Element />` component.
47
+ *
48
+ * @param ElementProps The props, callbacks, and resources necessary to render
49
+ * the `<AccountSettings.Element />` component.
50
+ *
51
+ * @example
52
+ * The `<Component />` is the source JSX that is rendered when you make use of the `AccountSettings`
53
+ * Element directly. Here is a brief example of how you would use it within your application.
54
+ * ```tsx
55
+ * <AccountSettings.Element
56
+ * onSaveSettings={() => console.log('Settings Saved!')}
57
+ * />
58
+ * ```
59
+ *
60
+ * <br />
61
+ *
62
+ * @see {@link AccountSettings.ComponentProps | The **props** that can be passed into the `<AccountSettings.Element />` component}
63
+ * @see {@link ListCarriers.Component | The `<List-Carriers />` component used to view connected carriers}
64
+ * @see {@link ManageWarehouses.Component | The `<ManageWarehouses />` component used to add, update, or remove warehouses}
65
+ * @see {@link PaymentMethodSettings | The `<PaymentMethodSettings />` component used to manage payment methods}
66
+ * @see {@link ManageFunding | The `<ManageFunding />` component used to manage funding rules and add funds to a carrier account}
67
+ */
6
68
  export declare const Element: ({ resources, ...props }: ComponentProps & {
7
69
  resources?: {
8
70
  en: {
@@ -114,6 +176,32 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
114
176
  };
115
177
  };
116
178
  settings: {
179
+ /**
180
+ * # Registered Account Settings Element
181
+ *
182
+ * - This is the registered `<AccountSettings />` element that will be used to render the
183
+ * `<AccountSettings.Element />` component.
184
+ *
185
+ * @param ElementProps The props, callbacks, and resources necessary to render
186
+ * the `<AccountSettings.Element />` component.
187
+ *
188
+ * @example
189
+ * The `<Component />` is the source JSX that is rendered when you make use of the `AccountSettings`
190
+ * Element directly. Here is a brief example of how you would use it within your application.
191
+ * ```tsx
192
+ * <AccountSettings.Element
193
+ * onSaveSettings={() => console.log('Settings Saved!')}
194
+ * />
195
+ * ```
196
+ *
197
+ * <br />
198
+ *
199
+ * @see {@link AccountSettings.ComponentProps | The **props** that can be passed into the `<AccountSettings.Element />` component}
200
+ * @see {@link ListCarriers.Component | The `<List-Carriers />` component used to view connected carriers}
201
+ * @see {@link ManageWarehouses.Component | The `<ManageWarehouses />` component used to add, update, or remove warehouses}
202
+ * @see {@link PaymentMethodSettings | The `<PaymentMethodSettings />` component used to manage payment methods}
203
+ * @see {@link ManageFunding | The `<ManageFunding />` component used to manage funding rules and add funds to a carrier account}
204
+ */
117
205
  title: string;
118
206
  billing: {
119
207
  title: string;
@@ -162,6 +250,32 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
162
250
  "requires-additional-handling": string;
163
251
  addOns: string;
164
252
  contentDescription: string;
253
+ /**
254
+ * # Registered Account Settings Element
255
+ *
256
+ * - This is the registered `<AccountSettings />` element that will be used to render the
257
+ * `<AccountSettings.Element />` component.
258
+ *
259
+ * @param ElementProps The props, callbacks, and resources necessary to render
260
+ * the `<AccountSettings.Element />` component.
261
+ *
262
+ * @example
263
+ * The `<Component />` is the source JSX that is rendered when you make use of the `AccountSettings`
264
+ * Element directly. Here is a brief example of how you would use it within your application.
265
+ * ```tsx
266
+ * <AccountSettings.Element
267
+ * onSaveSettings={() => console.log('Settings Saved!')}
268
+ * />
269
+ * ```
270
+ *
271
+ * <br />
272
+ *
273
+ * @see {@link AccountSettings.ComponentProps | The **props** that can be passed into the `<AccountSettings.Element />` component}
274
+ * @see {@link ListCarriers.Component | The `<List-Carriers />` component used to view connected carriers}
275
+ * @see {@link ManageWarehouses.Component | The `<ManageWarehouses />` component used to add, update, or remove warehouses}
276
+ * @see {@link PaymentMethodSettings | The `<PaymentMethodSettings />` component used to manage payment methods}
277
+ * @see {@link ManageFunding | The `<ManageFunding />` component used to manage funding rules and add funds to a carrier account}
278
+ */
165
279
  confirmation: string;
166
280
  dimensions: {
167
281
  length: string;
@@ -209,6 +323,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
209
323
  rates: {
210
324
  uspsMediaMailAcknowledgement: string;
211
325
  uspsFirstClassMailAcknowledgement_leof: string;
326
+ dhlExpressTermsAcknowledgement: string;
212
327
  };
213
328
  shipToAddressFormFields: string;
214
329
  sections: {
@@ -460,6 +575,13 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
460
575
  directSignature: string;
461
576
  none: string;
462
577
  signature: string;
578
+ /**
579
+ * # Account Settings Element Props
580
+ *
581
+ * - These are the base props that will be passed into the `<AccountSettings />` element.
582
+ *
583
+ * @see {@link AccountSettings.Element | See the full type that `typeof Element` will return}
584
+ */
463
585
  verbalConfirmation: string;
464
586
  };
465
587
  customs: {
@@ -595,11 +717,16 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
595
717
  ounces: string;
596
718
  pounds_one: string;
597
719
  pounds_other: string;
720
+ kilogram: string;
721
+ gram: string;
598
722
  };
599
723
  units: {
600
- in: string;
724
+ inch: string;
601
725
  lbs: string;
602
726
  oz: string;
727
+ centimeter: string;
728
+ gram: string;
729
+ kilogram: string;
603
730
  };
604
731
  "VGhlIHNlbGVjdGVkIHNlcnZpY2UgaW5jbHVkZXMgaW5zdXJhbmNlIGZvciBhbiBpbnN1cmVkIGFtb3VudCB1cCB0byAkMTAwLgo=": string;
605
732
  "VGhlIHNlbGVjdGVkIHNlcnZpY2UgaW5jbHVkZXMgaW5zdXJhbmNlIGZvciBhbiBpbnN1cmVkIGFtb3VudCB1cCB0byAkNTAuCg==": string;
@@ -608,6 +735,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
608
735
  QSBzaGlwcGluZyBjYXJyaWVyIGVycm9yIG9jY3VycmVkOiBVUFMgd2VpZ2h0IGxpbWl0IHBlciBwYWNrYWdlIGlzIDE1MCBsYnMu: string;
609
736
  UGxlYXNlIGFkZCBhIFN0YW1wcy5jb20gYWNjb3VudCB0byBTaGlwRW5naW5lIGluIG9yZGVyIHRvIGNyZWF0ZSBzaGlwcGluZyBsYWJlbHMu: string;
610
737
  QSBzaGlwcGluZyBlcnJvciBvY2N1cnJlZDogTWlzc2luZyBvciBpbnZhbGlkIHNoaXBwZXIgbnVtYmVy: string;
738
+ QSBzaGlwcGluZyBjYXJyaWVyIGVycm9yIG9jY3VycmVkOiBNaXNzaW5nIG9yIGludmFsaWQgc2hpcHBlciBuYW1l: string;
611
739
  "QSBzaGlwcGluZyBjYXJyaWVyIGVycm9yIG9jY3VycmVkOiBNaXNzaW5nIG9yIGludmFsaWQgc2hpcCB0byBTdGF0ZVByb3ZpbmNlQ29kZQ==": string;
612
740
  "QSBzaGlwcGluZyBjYXJyaWVyIGVycm9yIG9jY3VycmVkOiBJbnZhbGlkIHNvbGQgdG8gc3RhdGUgcHJvdmluY2UgY29kZS4gVmFsaWQgbGVuZ3RoIGlzIDAgdG8gNSBhbHBoYW51bWVyaWM=": string;
613
741
  };
@@ -627,4 +755,11 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
627
755
  };
628
756
  } | undefined;
629
757
  }) => import("@emotion/react/jsx-runtime").JSX.Element;
758
+ /**
759
+ * # Account Settings Element Props
760
+ *
761
+ * - These are the base props that will be passed into the `<AccountSettings />` element.
762
+ *
763
+ * @see {@link AccountSettings.Element | See the full type that `typeof Element` will return}
764
+ */
630
765
  export type ElementProps = React.ComponentProps<typeof Element>;
@@ -8,6 +8,7 @@ export type RateFormFeatures = {
8
8
  enableGlobalPostFiltering?: boolean;
9
9
  labelLayout?: boolean;
10
10
  nicknameRate?: boolean;
11
+ requireDhlTermsAcknowledgement?: boolean;
11
12
  saveRate?: boolean;
12
13
  };
13
14
  export type ConfigureShipmentFeatures = {
@@ -12,8 +12,8 @@ export type UseRatesFormProps = {
12
12
  };
13
13
  export declare const useRatesForm: ({ onBeforeLabelCreate, onLabelCreateFailure, onLabelCreateSuccess, onRateSaved, onRatesCalculated, onShipmentUpdated, printLabelLayout, shipment, }: UseRatesFormProps) => {
14
14
  carriers: SE.Carrier[] | undefined;
15
- displayableErrors: string[] | undefined;
16
15
  displayableLabelErrors: string[] | undefined;
16
+ displayableRateErrors: string[] | undefined;
17
17
  errors: SE.CodedError[] | undefined;
18
18
  isLoading: boolean;
19
19
  labelErrors: SE.CodedError[] | undefined;
@@ -22,7 +22,7 @@ export declare const useRatesForm: ({ onBeforeLabelCreate, onLabelCreateFailure,
22
22
  onSave: ({ carrierId, serviceCode }: Pick<SE.Rate, "carrierId" | "serviceCode">) => Promise<void>;
23
23
  onSubmit: (rateId: string) => Promise<void>;
24
24
  rates: SE.Rate[] | undefined;
25
- requestRates: (shipment: SE.SalesOrderShipment) => Promise<void>;
25
+ requestRates: (shipment: SE.SalesOrderShipment, isInternational: boolean) => Promise<void>;
26
26
  resetLabel: () => void;
27
27
  resetRates: () => void;
28
28
  shipment: SE.SalesOrderShipment | undefined;
@@ -25,6 +25,6 @@ export declare const useRatesWithCache: ({ shipment, onRatesCalculated }: UseRat
25
25
  shipment_id: string;
26
26
  status: "error" | "working" | "completed" | "partial";
27
27
  } | undefined;
28
- requestRates: (shipment: SE.SalesOrderShipment) => Promise<void>;
28
+ requestRates: (shipment: SE.SalesOrderShipment, isInternational: boolean) => Promise<void>;
29
29
  resetRates: () => void;
30
30
  };
@@ -6,6 +6,6 @@ export declare const useRequestRates: ({ onRatesCalculated }: UseRequestRatesPro
6
6
  ratesCalculating: boolean;
7
7
  ratesErrors: SE.CodedError[] | null;
8
8
  ratesResponse: SE.RateResponse | undefined;
9
- requestRates: (shipment: SE.SalesOrderShipment) => Promise<void>;
9
+ requestRates: (shipment: SE.SalesOrderShipment, isInternational: boolean) => Promise<void>;
10
10
  resetRates: () => void;
11
11
  };
@@ -13,6 +13,7 @@ export type UseShipmentFormProps = {
13
13
  shipment?: SE.SalesOrderShipment;
14
14
  };
15
15
  export declare const useShipmentForm: ({ compatibleCountryCodes, onAddressValidation, onApplyPreset, onChangeAddress, onShipmentUpdated, onSubmit, salesOrder, shipment, }: UseShipmentFormProps) => {
16
+ accountSettings: SE.AccountSettings | undefined;
16
17
  addressLoading: boolean;
17
18
  addressPreference: import("../../../components/templates").AddressPreference | undefined;
18
19
  carriers: SE.Carrier[] | undefined;
@@ -1,5 +1,36 @@
1
1
  import { OnboardingProps } from "../../components/templates";
2
+ /**
3
+ * # List-Carriers Props
4
+ *
5
+ * @see {@link ListCarriers.Component | The `<List-Carriers />` component}
6
+ */
2
7
  export type ComponentProps = {
8
+ /**
9
+ * `features` is a set of feature flags you would like to enable or disable in this component.
10
+ */
3
11
  features?: OnboardingProps["features"];
4
12
  };
13
+ /**
14
+ * # List-Carriers Component
15
+ *
16
+ * @param ComponentProps The base props that will be passed into the `<List-Carriers />` component.
17
+ *
18
+ * @returns Element A React element that renders the `<List-Carriers />` component allowing users
19
+ * to view a list of carriers that are connected to their ShipEngine account. This component is
20
+ * composed in the `<AccountSettings />` Element.
21
+ *
22
+ * @example
23
+ * ```tsx
24
+ * (() => {
25
+ * const features = useFeatures("Global");
26
+ *
27
+ * return <ListCarriers.Component features={features} />;
28
+ * })();
29
+ * ```
30
+ *
31
+ * <br />
32
+ *
33
+ * @see {@link ListCarriers.ComponentProps | The props that are passed into the `<List-Carriers />` component}
34
+ * @see {@link AccountSettings.Element | The `<AccountSettings />` component renders the `<List-Carriers />` component}
35
+ */
5
36
  export declare const Component: ({ features }: ComponentProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,5 +1,39 @@
1
1
  import { Templates } from "../../components";
2
+ /**
3
+ * # Manage Warehouses Props
4
+ *
5
+ * - These are the base props that will be passed into the `<ManageWarehouses />` component.
6
+ *
7
+ * @see {@link ManageWarehouses.Component | The `<ManageWarehouses />` component}
8
+ */
2
9
  export type ComponentProps = {
10
+ /**
11
+ * `onWarehouseAddressValidation` is an optional callback function that will be invoked when a
12
+ * warehouse address is validated.
13
+ */
3
14
  onWarehouseAddressValidation?: (originAddressPreference: Templates.AddressPreference, returnAddressPreference?: Templates.AddressPreference) => Promise<void> | void;
4
15
  };
16
+ /**
17
+ * # Manage Warehouses Component
18
+ *
19
+ * - The `<ManageWarehouses />` component is used to manage warehouses on a user's ShipEngine account. Users can add, update, or make warehouses inactive.
20
+ * `<AccountSettings />` Element.
21
+ *
22
+ * @param ComponentProps The base props that will be passed into the `<ManageWarehouses />` component.
23
+ *
24
+ * @returns Element A React element that renders the `<ManageWarehouses />` component allowing users
25
+ * to manage warehouses on their ShipEngine account.
26
+ *
27
+ * @example
28
+ * ```tsx
29
+ * export const ManageWarehousesExample = () => {
30
+ * return <ManageWarehouses.Component />;
31
+ * };
32
+ * ```
33
+ *
34
+ * <br />
35
+ *
36
+ * @see {@link ManageWarehouses.ComponentProps | The props that are passed into the `<ManageWarehouses />` component}
37
+ * @see {@link AccountSettings.Element | The `<AccountSettings />` component renders the `<ManageWarehouses />` component}
38
+ */
5
39
  export declare const Component: ({ onWarehouseAddressValidation }: ComponentProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,12 +1,89 @@
1
1
  /// <reference types="react" />
2
2
  import { OnboardingProps } from "../../components/templates";
3
+ /**
4
+ * # Onboarding Component Props
5
+ *
6
+ * - These are the base props that will be passed into the `<Onboarding />` component.
7
+ *
8
+ * @see {@link Onboarding.Component | This prop types usage in the `<Onboarding />` component}
9
+ */
3
10
  export type ComponentProps = {
11
+ /**
12
+ * `features` is a set of feature flags you would like to enable or disable in this component.
13
+ */
4
14
  features?: OnboardingProps["features"];
15
+ /**
16
+ * `onboardingAddress` is the address that will be used to create the warehouse for the user
17
+ * during the onboarding process.
18
+ */
5
19
  onboardingAddress?: OnboardingProps["onboardingAddress"];
20
+ /**
21
+ * `onCompleteOnboarding` is a callback function that will be invoked once the onboarding process
22
+ * is completed.
23
+ */
6
24
  onCompleteOnboarding: () => void;
25
+ /**
26
+ * `partnerName` is the name of the partner that is using the Onboarding component. This is typically
27
+ * the name of the entity that owns the host application.
28
+ */
7
29
  partnerName?: OnboardingProps["partnerName"];
8
30
  };
31
+ /**
32
+ * # Onboarding Component
33
+ *
34
+ * - The `<Onboarding />` component is used to onboard a new user to the ShipEngine platform. This
35
+ * component will allow the user to create a warehouse, register a carrier, and create a funding
36
+ * source for their account. This is everything a user needs to begin fulfilling their shipments
37
+ * using the ShipEngine Platform.
38
+ *
39
+ * @param ComponentProps The base props that will be passed into the `<Onboarding />` component.
40
+ *
41
+ * @returns Element An EmotionJSX.Element that will render the `<Onboarding />` component
42
+ * with all the appropriate wrappers.
43
+ *
44
+ * @example
45
+ * You can see how the `<Component />` is used in the `createElement` function call below.
46
+ * ```tsx
47
+ * export const Element = alchemy.createElement(Component, ErrorFallback, {
48
+ * css: {
49
+ * height: "100%",
50
+ * maxWidth: "800px",
51
+ * minWidth: "440px",
52
+ * overflow: "auto",
53
+ * scrollbarGutter: "stable both-edges",
54
+ * width: "100%",
55
+ * },
56
+ * resources: { en },
57
+ * });
58
+ * ```
59
+ *
60
+ * <br />
61
+ *
62
+ * @see {@link Onboarding.Element | The **Element** created to render `<Onboarding />`}
63
+ */
9
64
  export declare const Component: ({ features, onboardingAddress, onCompleteOnboarding, partnerName, }: ComponentProps) => import("@emotion/react/jsx-runtime").JSX.Element;
65
+ /**
66
+ * # Registered Onboarding Element
67
+ *
68
+ * - This is the registered `<Onboarding />` element that will be used to render the
69
+ * `<Onboarding.Element />` component.
70
+ *
71
+ * @param ElementProps The props, callbacks, and resources necessary to render
72
+ * the `<Onboarding.Element />` component.
73
+ *
74
+ * @example
75
+ * The `<Component />` is the source JSX that is rendered when you make use of the `Onboarding`
76
+ * Element directly. Here is a brief example of how you would use it within your application.
77
+ * ```tsx
78
+ * <Onboarding.Element
79
+ * onCompleteOnboarding={() => console.log('Onboarding Complete!')}
80
+ * />
81
+ * ```
82
+ *
83
+ * <br />
84
+ *
85
+ * @see {@link Onboarding.ComponentProps | The **props** that can be passed into the `<Onboarding.Element />` component}
86
+ */
10
87
  export declare const Element: ({ resources, ...props }: ComponentProps & {
11
88
  resources?: {
12
89
  en: {
@@ -213,6 +290,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
213
290
  rates: {
214
291
  uspsMediaMailAcknowledgement: string;
215
292
  uspsFirstClassMailAcknowledgement_leof: string;
293
+ dhlExpressTermsAcknowledgement: string;
216
294
  };
217
295
  shipToAddressFormFields: string;
218
296
  sections: {
@@ -240,7 +318,9 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
240
318
  };
241
319
  steps: {
242
320
  register: string;
243
- carriers: string;
321
+ carriers: string; /**
322
+ * `features` is a set of feature flags you would like to enable or disable in this component.
323
+ */
244
324
  addresses: string;
245
325
  billing: string;
246
326
  };
@@ -599,11 +679,16 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
599
679
  ounces: string;
600
680
  pounds_one: string;
601
681
  pounds_other: string;
682
+ kilogram: string;
683
+ gram: string;
602
684
  };
603
685
  units: {
604
- in: string;
686
+ inch: string;
605
687
  lbs: string;
606
688
  oz: string;
689
+ centimeter: string;
690
+ gram: string;
691
+ kilogram: string;
607
692
  };
608
693
  "VGhlIHNlbGVjdGVkIHNlcnZpY2UgaW5jbHVkZXMgaW5zdXJhbmNlIGZvciBhbiBpbnN1cmVkIGFtb3VudCB1cCB0byAkMTAwLgo=": string;
609
694
  "VGhlIHNlbGVjdGVkIHNlcnZpY2UgaW5jbHVkZXMgaW5zdXJhbmNlIGZvciBhbiBpbnN1cmVkIGFtb3VudCB1cCB0byAkNTAuCg==": string;
@@ -612,6 +697,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
612
697
  QSBzaGlwcGluZyBjYXJyaWVyIGVycm9yIG9jY3VycmVkOiBVUFMgd2VpZ2h0IGxpbWl0IHBlciBwYWNrYWdlIGlzIDE1MCBsYnMu: string;
613
698
  UGxlYXNlIGFkZCBhIFN0YW1wcy5jb20gYWNjb3VudCB0byBTaGlwRW5naW5lIGluIG9yZGVyIHRvIGNyZWF0ZSBzaGlwcGluZyBsYWJlbHMu: string;
614
699
  QSBzaGlwcGluZyBlcnJvciBvY2N1cnJlZDogTWlzc2luZyBvciBpbnZhbGlkIHNoaXBwZXIgbnVtYmVy: string;
700
+ QSBzaGlwcGluZyBjYXJyaWVyIGVycm9yIG9jY3VycmVkOiBNaXNzaW5nIG9yIGludmFsaWQgc2hpcHBlciBuYW1l: string;
615
701
  "QSBzaGlwcGluZyBjYXJyaWVyIGVycm9yIG9jY3VycmVkOiBNaXNzaW5nIG9yIGludmFsaWQgc2hpcCB0byBTdGF0ZVByb3ZpbmNlQ29kZQ==": string;
616
702
  "QSBzaGlwcGluZyBjYXJyaWVyIGVycm9yIG9jY3VycmVkOiBJbnZhbGlkIHNvbGQgdG8gc3RhdGUgcHJvdmluY2UgY29kZS4gVmFsaWQgbGVuZ3RoIGlzIDAgdG8gNSBhbHBoYW51bWVyaWM=": string;
617
703
  };
@@ -631,4 +717,9 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
631
717
  };
632
718
  } | undefined;
633
719
  }) => import("@emotion/react/jsx-runtime").JSX.Element;
720
+ /**
721
+ * # Onboarding Element Props
722
+ *
723
+ * @see {@link Onboarding.Element | See the full type that `typeof Element` will return}
724
+ */
634
725
  export type ElementProps = React.ComponentProps<typeof Element>;