@shipengine/elements 2.14.0 → 2.16.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 (82) hide show
  1. package/actions-menu.js +5 -5
  2. package/carrier.js +1 -1
  3. package/components.js +1 -1
  4. package/elements.js +1 -1
  5. package/hooks.js +1 -1
  6. package/index.js +1 -1
  7. package/package.json +4 -4
  8. package/src/components/add-funds-form/add-funds-form.d.ts +2 -2
  9. package/src/components/address-preference-context/address-preference-context.d.ts +1 -1
  10. package/src/components/pager/usePager.d.ts +1 -0
  11. package/src/components/templates/address-form/address-fields.d.ts +1 -2
  12. package/src/components/templates/address-form/address-form.d.ts +1 -2
  13. package/src/components/templates/product-form/product-form.d.ts +3 -1
  14. package/src/components/templates/products-display/products-display.d.ts +4 -4
  15. package/src/components/templates/products-display/products-display.styles.d.ts +2 -1
  16. package/src/components/templates/shipment-form/sections/customs-forms/customs-forms.d.ts +3 -2
  17. package/src/components/templates/shipment-form/shipment-form.d.ts +4 -3
  18. package/src/components/templates/wallet-form/edit-wallet-address-form.d.ts +1 -1
  19. package/src/components/vat-form/vat-form-schema.d.ts +21 -3
  20. package/src/components/vat-form/vat-form.d.ts +7 -2
  21. package/src/components/vat-form/vat-form.styles.d.ts +3 -0
  22. package/src/components/vat-form/vat-types.d.ts +6 -0
  23. package/src/components/warehouse-form/warehouse-form-schema.d.ts +6 -0
  24. package/src/components/warehouse-form/warehouse-form.d.ts +3 -1
  25. package/src/elements/labels-grid/hooks/use-labels-grid.d.ts +1 -0
  26. package/src/elements/labels-grid/labels-grid.d.ts +39 -16
  27. package/src/elements/manage-carriers/manage-carriers.d.ts +6 -2
  28. package/src/elements/manage-external-carriers/manage-external-carriers.d.ts +6 -2
  29. package/src/elements/manage-funding/manage-funding-element.d.ts +6 -2
  30. package/src/elements/manage-warehouses/manage-warehouses.d.ts +6 -2
  31. package/src/elements/payment-method-settings/payment-method-settings-element.d.ts +6 -2
  32. package/src/elements/purchase-label/configure-shipment.d.ts +2 -1
  33. package/src/elements/purchase-label/hooks/index.d.ts +0 -2
  34. package/src/elements/purchase-label/hooks/use-presets.d.ts +2 -1
  35. package/src/elements/purchase-label/hooks/use-shipment-form.d.ts +4 -3
  36. package/src/elements/purchase-label/purchase-label.d.ts +28 -39
  37. package/src/elements/select-label-layout/select-label-layout-element.d.ts +6 -2
  38. package/src/elements/shipment-summary/shipment-summary.d.ts +8 -2
  39. package/src/elements/shipments-grid/hooks/use-shipments-grid.d.ts +1 -0
  40. package/src/elements/shipments-grid/shipments-grid.d.ts +6 -5
  41. package/src/elements/theme-creator/theme-creator.d.ts +6 -2
  42. package/src/elements/transaction-history/transaction-history-element.d.ts +6 -2
  43. package/src/elements/unit-settings/unit-settings-element.d.ts +6 -2
  44. package/src/elements/vat-settings/vat-settings-element.d.ts +6 -2
  45. package/src/elements/void-label/void-label.d.ts +36 -52
  46. package/src/elements-provider/elements-provider.d.ts +1 -2
  47. package/src/features/manage-carriers/manage-carriers.d.ts +2 -2
  48. package/src/features/manage-funding/manage-funding.d.ts +2 -2
  49. package/src/features/vat-settings/use-vat-settings.d.ts +1 -1
  50. package/src/features/vat-settings/vat-settings.d.ts +1 -4
  51. package/src/features/vat-settings/vat-settings.styles.d.ts +7 -0
  52. package/src/hooks/index.d.ts +2 -0
  53. package/src/hooks/options/use-country-code-options.d.ts +1 -1
  54. package/src/hooks/options/use-state-code-options.d.ts +2 -2
  55. package/src/{elements/purchase-label/hooks → hooks}/use-configure-shipment.d.ts +5 -10
  56. package/src/hooks/use-helpers.stories.d.ts +3 -0
  57. package/src/locales/en/index.d.ts +6 -2
  58. package/src/types/harmonized-tariff-code.d.ts +10 -0
  59. package/src/types/index.d.ts +4 -3
  60. package/src/utilities/form-logger.d.ts +1 -1
  61. package/src/utilities/validation.d.ts +1 -1
  62. package/src/workflows/account-settings/account-settings.d.ts +6 -2
  63. package/src/workflows/carrier-services/carrier-services.d.ts +31 -50
  64. package/src/workflows/connect-external-carrier/connect-external-carrier.d.ts +6 -2
  65. package/src/workflows/label-workflow/label-workflow.d.ts +1126 -101
  66. package/src/workflows/onboarding/components/onboarding-wizard/onboarding-wizard.d.ts +2 -1
  67. package/src/workflows/onboarding/components/ship-from-address-step/ship-from-address-step.d.ts +1 -1
  68. package/src/workflows/onboarding/onboarding.d.ts +84 -8
  69. package/transaction-history-element.js +1 -1
  70. package/use-configure-shipment.js +1 -0
  71. package/use-toggle.js +1 -1
  72. package/use-unit-settings.js +1 -1
  73. package/usePager.js +1 -1
  74. package/utilities.js +1 -1
  75. package/validation.js +1 -1
  76. package/vat.js +1 -1
  77. package/wallet-form.js +1 -1
  78. package/warehouses.js +1 -0
  79. package/workflows.js +1 -1
  80. package/shipment.js +0 -1
  81. package/use-scrub-errors.js +0 -1
  82. /package/src/{elements/purchase-label/hooks → hooks}/use-import-sales-order.d.ts +0 -0
@@ -15,4 +15,4 @@ export declare const errorMap: z.ZodErrorMap;
15
15
  *
16
16
  * @category Utilities
17
17
  */
18
- export declare const validationResolver: <T extends z.ZodType<any, any, any>>(schema: T) => ReturnType<Resolver>;
18
+ export declare const validationResolver: <T extends z.ZodType<any, any, any>>(schema: T, sensitiveValues?: string[]) => ReturnType<Resolver>;
@@ -133,16 +133,18 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
133
133
  vatNumber: string;
134
134
  vatRegistrationTooltip: string;
135
135
  vatFormText: string;
136
- vatFormRegisterLater: string;
137
136
  vatNumberInputHint: string;
138
137
  vatNumberInputPlaceholder: string;
139
138
  verifiedVat: string;
139
+ vatNumberFieldLabel: string;
140
+ vatTypePlaceholder: string;
141
+ issuingAuthorityPlaceholder: string;
142
+ issuingAuthorityFieldLabel: string;
140
143
  vatFormErrors: {
141
144
  invalidFieldValue: string;
142
145
  verificationFailure: string;
143
146
  forbidden: string;
144
147
  connectionNotSupported: string;
145
- genericTitle: string;
146
148
  genericText: string;
147
149
  };
148
150
  };
@@ -834,6 +836,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
834
836
  taxIssuingAuthority: string;
835
837
  entityType: string;
836
838
  };
839
+ hsCode: string;
837
840
  nonDelivery: {
838
841
  returnToSender: string;
839
842
  treatAsAbandoned: string;
@@ -871,6 +874,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
871
874
  shipments: string;
872
875
  warehouses: string;
873
876
  };
877
+ labelHasBeenPurchased: string;
874
878
  emailIsRequired: string;
875
879
  unknown: string;
876
880
  noRatesAvailable: string;
@@ -24,11 +24,11 @@ import { CodedError } from "@shipengine/react-api";
24
24
  * @see {@link AccountSettings.Element | The `<AccountSettings />` component renders the `<CarrierServices />` component}
25
25
  */
26
26
  export type CarrierServicesProps = {
27
- addedFundsError?: CodedError[] | null;
28
27
  addFunds?: () => Promise<any>;
28
+ addFundsError?: CodedError[] | null;
29
29
  onRedirectToOnboarding?: () => void;
30
30
  };
31
- export declare const Component: ({ onRedirectToOnboarding, addFunds, addedFundsError }: CarrierServicesProps) => import("@emotion/react/jsx-runtime").JSX.Element;
31
+ export declare const Component: ({ onRedirectToOnboarding, addFunds, addFundsError, }: CarrierServicesProps) => import("@emotion/react/jsx-runtime").JSX.Element;
32
32
  export declare const Element: ({ resources, ...props }: CarrierServicesProps & {
33
33
  resources?: {
34
34
  en: {
@@ -130,39 +130,18 @@ export declare const Element: ({ resources, ...props }: CarrierServicesProps & {
130
130
  vatNumber: string;
131
131
  vatRegistrationTooltip: string;
132
132
  vatFormText: string;
133
- vatFormRegisterLater: string;
134
133
  vatNumberInputHint: string;
135
- /**
136
- * # Carrier-Services Component
137
- *
138
- * @param ComponentProps The base props that will be passed into the `<CarrierServices />` component.
139
- *
140
- * @returns Element A React element that renders the `<CarrierServices />` component allowing users
141
- * to view a list of carriers that are connected to their ShipEngine account, add funds to their wallet, view transaction history, and manage their payment method. This component is
142
- * composed in the `<AccountSettings />` Element.
143
- *
144
- * @example
145
- * ```tsx
146
- * (() => {
147
- * const features = useFeatures("Global");
148
- *
149
- * return <CarrierServices.Element features={features} />;
150
- * })();
151
- * ```
152
- *
153
- * <br />
154
- *
155
- * @see {@link CarrierServices.ComponentProps | The props that are passed into the `<CarrierServices />` component}
156
- * @see {@link AccountSettings.Element | The `<AccountSettings />` component renders the `<CarrierServices />` component}
157
- */
158
134
  vatNumberInputPlaceholder: string;
159
135
  verifiedVat: string;
136
+ vatNumberFieldLabel: string;
137
+ vatTypePlaceholder: string;
138
+ issuingAuthorityPlaceholder: string;
139
+ issuingAuthorityFieldLabel: string;
160
140
  vatFormErrors: {
161
141
  invalidFieldValue: string;
162
142
  verificationFailure: string;
163
143
  forbidden: string;
164
144
  connectionNotSupported: string;
165
- genericTitle: string;
166
145
  genericText: string;
167
146
  };
168
147
  };
@@ -623,29 +602,6 @@ export declare const Element: ({ resources, ...props }: CarrierServicesProps & {
623
602
  pdf: string;
624
603
  };
625
604
  };
626
- /**
627
- * # Carrier-Services Component
628
- *
629
- * @param ComponentProps The base props that will be passed into the `<CarrierServices />` component.
630
- *
631
- * @returns Element A React element that renders the `<CarrierServices />` component allowing users
632
- * to view a list of carriers that are connected to their ShipEngine account, add funds to their wallet, view transaction history, and manage their payment method. This component is
633
- * composed in the `<AccountSettings />` Element.
634
- *
635
- * @example
636
- * ```tsx
637
- * (() => {
638
- * const features = useFeatures("Global");
639
- *
640
- * return <CarrierServices.Element features={features} />;
641
- * })();
642
- * ```
643
- *
644
- * <br />
645
- *
646
- * @see {@link CarrierServices.ComponentProps | The props that are passed into the `<CarrierServices />` component}
647
- * @see {@link AccountSettings.Element | The `<AccountSettings />` component renders the `<CarrierServices />` component}
648
- */
649
605
  emptyState: {
650
606
  title: string;
651
607
  subtitle: string;
@@ -877,6 +833,7 @@ export declare const Element: ({ resources, ...props }: CarrierServicesProps & {
877
833
  taxIssuingAuthority: string;
878
834
  entityType: string;
879
835
  };
836
+ hsCode: string;
880
837
  nonDelivery: {
881
838
  returnToSender: string;
882
839
  treatAsAbandoned: string;
@@ -914,6 +871,7 @@ export declare const Element: ({ resources, ...props }: CarrierServicesProps & {
914
871
  shipments: string;
915
872
  warehouses: string;
916
873
  };
874
+ labelHasBeenPurchased: string;
917
875
  emailIsRequired: string;
918
876
  unknown: string;
919
877
  noRatesAvailable: string;
@@ -1116,6 +1074,29 @@ export declare const Element: ({ resources, ...props }: CarrierServicesProps & {
1116
1074
  accountBalance: string;
1117
1075
  paymentMethod: string;
1118
1076
  transactionHistory: string;
1077
+ /**
1078
+ * # Carrier-Services Component
1079
+ *
1080
+ * @param ComponentProps The base props that will be passed into the `<CarrierServices />` component.
1081
+ *
1082
+ * @returns Element A React element that renders the `<CarrierServices />` component allowing users
1083
+ * to view a list of carriers that are connected to their ShipEngine account, add funds to their wallet, view transaction history, and manage their payment method. This component is
1084
+ * composed in the `<AccountSettings />` Element.
1085
+ *
1086
+ * @example
1087
+ * ```tsx
1088
+ * (() => {
1089
+ * const features = useFeatures("Global");
1090
+ *
1091
+ * return <CarrierServices.Element features={features} />;
1092
+ * })();
1093
+ * ```
1094
+ *
1095
+ * <br />
1096
+ *
1097
+ * @see {@link CarrierServices.ComponentProps | The props that are passed into the `<CarrierServices />` component}
1098
+ * @see {@link AccountSettings.Element | The `<AccountSettings />` component renders the `<CarrierServices />` component}
1099
+ */
1119
1100
  adjustmentHistory: string;
1120
1101
  warehouses: string;
1121
1102
  carriers: {
@@ -157,16 +157,18 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
157
157
  vatNumber: string;
158
158
  vatRegistrationTooltip: string;
159
159
  vatFormText: string;
160
- vatFormRegisterLater: string;
161
160
  vatNumberInputHint: string;
162
161
  vatNumberInputPlaceholder: string;
163
162
  verifiedVat: string;
163
+ vatNumberFieldLabel: string;
164
+ vatTypePlaceholder: string;
165
+ issuingAuthorityPlaceholder: string;
166
+ issuingAuthorityFieldLabel: string;
164
167
  vatFormErrors: {
165
168
  invalidFieldValue: string;
166
169
  verificationFailure: string;
167
170
  forbidden: string;
168
171
  connectionNotSupported: string;
169
- genericTitle: string;
170
172
  genericText: string;
171
173
  };
172
174
  };
@@ -858,6 +860,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
858
860
  taxIssuingAuthority: string;
859
861
  entityType: string;
860
862
  };
863
+ hsCode: string;
861
864
  nonDelivery: {
862
865
  returnToSender: string;
863
866
  treatAsAbandoned: string;
@@ -895,6 +898,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
895
898
  shipments: string;
896
899
  warehouses: string;
897
900
  };
901
+ labelHasBeenPurchased: string;
898
902
  emailIsRequired: string;
899
903
  unknown: string;
900
904
  noRatesAvailable: string;