@shipengine/elements 0.33.0 → 0.35.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 (105) hide show
  1. package/index.cjs +1975 -493
  2. package/index.js +1970 -496
  3. package/package.json +1 -1
  4. package/src/components/add-funds-form/add-funds-form.d.ts +22 -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/carrier-terms-form/carrier-terms-form.styles.d.ts +1 -0
  34. package/src/components/templates/landing-page/landing-page.d.ts +2 -1
  35. package/src/components/templates/onboarding/onboarding.d.ts +3 -1
  36. package/src/components/templates/onboarding/onboarding.styles.d.ts +10 -0
  37. package/src/components/templates/rate-form/rate-form.d.ts +2 -2
  38. package/src/components/templates/shipment-form/shipment-form.d.ts +2 -1
  39. package/src/components/templates/shipment-form/shipment-schema.d.ts +179 -17
  40. package/src/components/templates/warehouse-form/warehouse-form.d.ts +1 -1
  41. package/src/components/unit-settings/unit-settings.d.ts +5 -0
  42. package/src/constants/shipengine/address.d.ts +75 -0
  43. package/src/elements/account-settings/account-settings.d.ts +139 -3
  44. package/src/elements/configure-shipment/configure-shipment.d.ts +1 -0
  45. package/src/elements/configure-shipment/hooks/use-rates-form.d.ts +2 -2
  46. package/src/elements/configure-shipment/hooks/use-rates-with-cache.d.ts +1 -1
  47. package/src/elements/configure-shipment/hooks/use-request-rates.d.ts +1 -1
  48. package/src/elements/configure-shipment/hooks/use-shipment-form.d.ts +1 -0
  49. package/src/elements/list-carriers/list-carriers.d.ts +31 -0
  50. package/src/elements/manage-warehouses/manage-warehouses.d.ts +34 -0
  51. package/src/elements/onboarding/onboarding.d.ts +99 -5
  52. package/src/elements/purchase-label/purchase-label.d.ts +194 -9
  53. package/src/elements/shipengine-workflow/label-workflow.d.ts +138 -2
  54. package/src/elements/view-shipment/view-shipment.d.ts +131 -4
  55. package/src/elements/void-label/void-label.d.ts +137 -5
  56. package/src/extensions/zod.d.ts +5 -0
  57. package/src/factories/shipengine/package.d.ts +11 -0
  58. package/src/features/wallet-history/wallet-history.d.ts +5 -0
  59. package/src/hooks/index.d.ts +1 -0
  60. package/src/hooks/options/use-confirmation-options.d.ts +7 -0
  61. package/src/hooks/options/use-country-code-options.d.ts +16 -3
  62. package/src/hooks/options/use-customs-contents-options.d.ts +7 -0
  63. package/src/hooks/options/use-customs-non-delivery-options.d.ts +7 -0
  64. package/src/hooks/options/use-date-range-options.d.ts +22 -1
  65. package/src/hooks/options/use-expiration-month-options.d.ts +7 -0
  66. package/src/hooks/options/use-insurance-provider-options.d.ts +7 -0
  67. package/src/hooks/options/use-package-options.d.ts +7 -0
  68. package/src/hooks/options/use-rate-options.d.ts +11 -1
  69. package/src/hooks/options/use-service-code-options.d.ts +7 -0
  70. package/src/hooks/options/use-shipment-metadata.d.ts +8 -0
  71. package/src/hooks/options/use-shipping-presets-options.d.ts +10 -0
  72. package/src/hooks/options/use-state-code-options.d.ts +7 -0
  73. package/src/hooks/options/use-warehouse-options.d.ts +7 -0
  74. package/src/hooks/use-address-validation.d.ts +7 -0
  75. package/src/hooks/use-black-box-detection.d.ts +17 -1
  76. package/src/hooks/use-carrier-metadata.d.ts +7 -0
  77. package/src/hooks/use-nested-form.d.ts +9 -0
  78. package/src/hooks/use-page-layout.d.ts +25 -1
  79. package/src/hooks/use-root-portal.d.ts +15 -2
  80. package/src/hooks/use-run-once-on-true.d.ts +5 -1
  81. package/src/hooks/use-scrub-errors.d.ts +6 -3
  82. package/src/hooks/use-toggle.d.ts +5 -1
  83. package/src/locales/en/index.d.ts +11 -3
  84. package/src/schemas/shipengine/money.d.ts +4 -0
  85. package/src/schemas/shipengine/phone.d.ts +8 -0
  86. package/src/types/carrier-metadata.d.ts +20 -0
  87. package/src/utilities/create-dictionary.d.ts +4 -0
  88. package/src/utilities/date.d.ts +51 -2
  89. package/src/utilities/error.d.ts +16 -2
  90. package/src/utilities/feature-flags.d.ts +181 -0
  91. package/src/utilities/form-logger.d.ts +4 -0
  92. package/src/utilities/index.d.ts +1 -1
  93. package/src/utilities/money.d.ts +25 -0
  94. package/src/utilities/predicates/isString.d.ts +7 -0
  95. package/src/utilities/rates.d.ts +22 -1
  96. package/src/utilities/shipengine/address.d.ts +31 -0
  97. package/src/utilities/shipengine/carrier.d.ts +21 -0
  98. package/src/utilities/shipengine/dimensions.d.ts +27 -4
  99. package/src/utilities/shipengine/package.d.ts +4 -0
  100. package/src/utilities/shipengine/sales-order.d.ts +26 -0
  101. package/src/utilities/shipengine/shipment.d.ts +12 -0
  102. package/src/utilities/shipengine/weight.d.ts +92 -2
  103. package/src/utilities/string.d.ts +7 -0
  104. package/src/utilities/styles.d.ts +4 -0
  105. 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: {
@@ -231,13 +346,14 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
231
346
  subtitle: string;
232
347
  welcome: string;
233
348
  messageLine1: string;
349
+ partnerMessageLine1: string;
234
350
  messageLine2: string;
235
351
  };
236
352
  steps: {
237
- login: string;
353
+ register: string;
238
354
  carriers: string;
239
355
  addresses: string;
240
- payment: string;
356
+ billing: string;
241
357
  };
242
358
  warehouse: {
243
359
  title: string;
@@ -459,6 +575,13 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
459
575
  directSignature: string;
460
576
  none: string;
461
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
+ */
462
585
  verbalConfirmation: string;
463
586
  };
464
587
  customs: {
@@ -594,11 +717,16 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
594
717
  ounces: string;
595
718
  pounds_one: string;
596
719
  pounds_other: string;
720
+ kilogram: string;
721
+ gram: string;
597
722
  };
598
723
  units: {
599
- in: string;
724
+ inch: string;
600
725
  lbs: string;
601
726
  oz: string;
727
+ centimeter: string;
728
+ gram: string;
729
+ kilogram: string;
602
730
  };
603
731
  "VGhlIHNlbGVjdGVkIHNlcnZpY2UgaW5jbHVkZXMgaW5zdXJhbmNlIGZvciBhbiBpbnN1cmVkIGFtb3VudCB1cCB0byAkMTAwLgo=": string;
604
732
  "VGhlIHNlbGVjdGVkIHNlcnZpY2UgaW5jbHVkZXMgaW5zdXJhbmNlIGZvciBhbiBpbnN1cmVkIGFtb3VudCB1cCB0byAkNTAuCg==": string;
@@ -607,6 +735,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
607
735
  QSBzaGlwcGluZyBjYXJyaWVyIGVycm9yIG9jY3VycmVkOiBVUFMgd2VpZ2h0IGxpbWl0IHBlciBwYWNrYWdlIGlzIDE1MCBsYnMu: string;
608
736
  UGxlYXNlIGFkZCBhIFN0YW1wcy5jb20gYWNjb3VudCB0byBTaGlwRW5naW5lIGluIG9yZGVyIHRvIGNyZWF0ZSBzaGlwcGluZyBsYWJlbHMu: string;
609
737
  QSBzaGlwcGluZyBlcnJvciBvY2N1cnJlZDogTWlzc2luZyBvciBpbnZhbGlkIHNoaXBwZXIgbnVtYmVy: string;
738
+ QSBzaGlwcGluZyBjYXJyaWVyIGVycm9yIG9jY3VycmVkOiBNaXNzaW5nIG9yIGludmFsaWQgc2hpcHBlciBuYW1l: string;
610
739
  "QSBzaGlwcGluZyBjYXJyaWVyIGVycm9yIG9jY3VycmVkOiBNaXNzaW5nIG9yIGludmFsaWQgc2hpcCB0byBTdGF0ZVByb3ZpbmNlQ29kZQ==": string;
611
740
  "QSBzaGlwcGluZyBjYXJyaWVyIGVycm9yIG9jY3VycmVkOiBJbnZhbGlkIHNvbGQgdG8gc3RhdGUgcHJvdmluY2UgY29kZS4gVmFsaWQgbGVuZ3RoIGlzIDAgdG8gNSBhbHBoYW51bWVyaWM=": string;
612
741
  };
@@ -626,4 +755,11 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
626
755
  };
627
756
  } | undefined;
628
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
+ */
629
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,10 +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
+ */
19
+ onboardingAddress?: OnboardingProps["onboardingAddress"];
20
+ /**
21
+ * `onCompleteOnboarding` is a callback function that will be invoked once the onboarding process
22
+ * is completed.
23
+ */
5
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
+ */
29
+ partnerName?: OnboardingProps["partnerName"];
6
30
  };
7
- export declare const Component: ({ features, onCompleteOnboarding }: ComponentProps) => import("@emotion/react/jsx-runtime").JSX.Element;
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
+ */
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
+ */
8
87
  export declare const Element: ({ resources, ...props }: ComponentProps & {
9
88
  resources?: {
10
89
  en: {
@@ -211,6 +290,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
211
290
  rates: {
212
291
  uspsMediaMailAcknowledgement: string;
213
292
  uspsFirstClassMailAcknowledgement_leof: string;
293
+ dhlExpressTermsAcknowledgement: string;
214
294
  };
215
295
  shipToAddressFormFields: string;
216
296
  sections: {
@@ -233,13 +313,16 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
233
313
  subtitle: string;
234
314
  welcome: string;
235
315
  messageLine1: string;
316
+ partnerMessageLine1: string;
236
317
  messageLine2: string;
237
318
  };
238
319
  steps: {
239
- login: string;
240
- carriers: string;
320
+ register: string;
321
+ carriers: string; /**
322
+ * `features` is a set of feature flags you would like to enable or disable in this component.
323
+ */
241
324
  addresses: string;
242
- payment: string;
325
+ billing: string;
243
326
  };
244
327
  warehouse: {
245
328
  title: string;
@@ -596,11 +679,16 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
596
679
  ounces: string;
597
680
  pounds_one: string;
598
681
  pounds_other: string;
682
+ kilogram: string;
683
+ gram: string;
599
684
  };
600
685
  units: {
601
- in: string;
686
+ inch: string;
602
687
  lbs: string;
603
688
  oz: string;
689
+ centimeter: string;
690
+ gram: string;
691
+ kilogram: string;
604
692
  };
605
693
  "VGhlIHNlbGVjdGVkIHNlcnZpY2UgaW5jbHVkZXMgaW5zdXJhbmNlIGZvciBhbiBpbnN1cmVkIGFtb3VudCB1cCB0byAkMTAwLgo=": string;
606
694
  "VGhlIHNlbGVjdGVkIHNlcnZpY2UgaW5jbHVkZXMgaW5zdXJhbmNlIGZvciBhbiBpbnN1cmVkIGFtb3VudCB1cCB0byAkNTAuCg==": string;
@@ -609,6 +697,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
609
697
  QSBzaGlwcGluZyBjYXJyaWVyIGVycm9yIG9jY3VycmVkOiBVUFMgd2VpZ2h0IGxpbWl0IHBlciBwYWNrYWdlIGlzIDE1MCBsYnMu: string;
610
698
  UGxlYXNlIGFkZCBhIFN0YW1wcy5jb20gYWNjb3VudCB0byBTaGlwRW5naW5lIGluIG9yZGVyIHRvIGNyZWF0ZSBzaGlwcGluZyBsYWJlbHMu: string;
611
699
  QSBzaGlwcGluZyBlcnJvciBvY2N1cnJlZDogTWlzc2luZyBvciBpbnZhbGlkIHNoaXBwZXIgbnVtYmVy: string;
700
+ QSBzaGlwcGluZyBjYXJyaWVyIGVycm9yIG9jY3VycmVkOiBNaXNzaW5nIG9yIGludmFsaWQgc2hpcHBlciBuYW1l: string;
612
701
  "QSBzaGlwcGluZyBjYXJyaWVyIGVycm9yIG9jY3VycmVkOiBNaXNzaW5nIG9yIGludmFsaWQgc2hpcCB0byBTdGF0ZVByb3ZpbmNlQ29kZQ==": string;
613
702
  "QSBzaGlwcGluZyBjYXJyaWVyIGVycm9yIG9jY3VycmVkOiBJbnZhbGlkIHNvbGQgdG8gc3RhdGUgcHJvdmluY2UgY29kZS4gVmFsaWQgbGVuZ3RoIGlzIDAgdG8gNSBhbHBoYW51bWVyaWM=": string;
614
703
  };
@@ -628,4 +717,9 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
628
717
  };
629
718
  } | undefined;
630
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
+ */
631
725
  export type ElementProps = React.ComponentProps<typeof Element>;