@shipengine/elements 0.20.2 → 0.21.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 (139) hide show
  1. package/index.cjs +1066 -1054
  2. package/index.js +936 -924
  3. package/package.json +3 -3
  4. package/src/components/add-funds-form/add-funds-schema.d.ts +7 -7
  5. package/src/components/address-preference-context/address-preference-context.d.ts +42 -0
  6. package/src/components/address-preference-context/index.d.ts +1 -0
  7. package/src/components/auto-funding-form/auto-funding-schema.d.ts +10 -10
  8. package/src/components/field/fields.d.ts +2 -1
  9. package/src/components/field/money-input/hooks/use-utils.d.ts +1 -1
  10. package/src/components/field/money-input/money-input.d.ts +1 -1
  11. package/src/components/field/rate-card/cost-breakdown/cost-breakdown.d.ts +1 -1
  12. package/src/components/field/select-auto-complete/index.d.ts +1 -0
  13. package/src/components/field/select-auto-complete/select-auto-complete.d.ts +7 -0
  14. package/src/components/history/history-card/history-card.d.ts +5 -0
  15. package/src/components/history/history-card/history-card.styles.d.ts +1 -0
  16. package/src/components/history/history-card/index.d.ts +1 -0
  17. package/src/components/history/index.d.ts +1 -4
  18. package/src/components/index.d.ts +1 -1
  19. package/src/components/inline-label/inline-label.d.ts +5 -1
  20. package/src/components/inline-label/inline-label.styles.d.ts +1 -0
  21. package/src/components/items-breakdown/items-breakdown.d.ts +1 -1
  22. package/src/components/label/index.d.ts +1 -0
  23. package/src/components/label/label.d.ts +10 -0
  24. package/src/components/label/label.styles.d.ts +2 -0
  25. package/src/components/label-layout/label-layout-purchase.d.ts +1 -1
  26. package/src/components/label-layout/label-layout-settings.d.ts +1 -1
  27. package/src/components/section/index.d.ts +1 -0
  28. package/src/components/section/section.d.ts +10 -0
  29. package/src/components/section/section.styles.d.ts +1 -0
  30. package/src/components/templates/add-carrier-form/add-carrier-form.d.ts +1 -1
  31. package/src/components/templates/address-display/address-display.d.ts +1 -1
  32. package/src/components/templates/address-form/address-form.d.ts +1 -1
  33. package/src/components/templates/address-preference-display/address-preference-display.d.ts +1 -1
  34. package/src/components/templates/address-preference-select/address-preference-select.d.ts +24 -0
  35. package/src/components/templates/address-preference-select/index.d.ts +1 -0
  36. package/src/components/templates/carrier-recovery-form/carrier-recovery-form.d.ts +1 -1
  37. package/src/components/templates/carrier-terms-form/carrier-terms-form.d.ts +1 -1
  38. package/src/components/templates/customs-item-form/customs-item-form-schema.d.ts +20 -20
  39. package/src/components/templates/customs-item-form/customs-item-form.d.ts +1 -1
  40. package/src/components/templates/customs-items-display/customs-items-display.d.ts +1 -1
  41. package/src/components/templates/edit-billing-form/edit-billing-form.styles.d.ts +1 -1
  42. package/src/components/templates/index.d.ts +2 -3
  43. package/src/components/templates/label/label.d.ts +1 -1
  44. package/src/components/templates/list-carriers/list-carriers.d.ts +1 -1
  45. package/src/components/templates/list-carriers-row/list-carriers-row.d.ts +1 -1
  46. package/src/components/templates/manage-wallet/manage-wallet.styles.d.ts +1 -1
  47. package/src/components/templates/manage-warehouses/manage-warehouses.d.ts +2 -6
  48. package/src/components/templates/onboarding/onboarding.d.ts +14 -8
  49. package/src/components/templates/onboarding/onboarding.styles.d.ts +1 -1
  50. package/src/components/templates/rate-form/rate-form.d.ts +1 -1
  51. package/src/components/templates/shipment/shipment.d.ts +1 -1
  52. package/src/components/templates/shipment-form/shipment-form.d.ts +1 -1
  53. package/src/components/templates/shipment-form/shipment-schema.d.ts +26 -2
  54. package/src/components/templates/suspend-sales-order/suspend-sales-order.d.ts +1 -1
  55. package/src/components/templates/suspend-shipment/suspend-shipment.d.ts +1 -1
  56. package/src/components/templates/void-label/void-label.d.ts +1 -1
  57. package/src/components/templates/wallet-form/edit-wallet-address-form.d.ts +1 -1
  58. package/src/components/templates/wallet-form/wallet-form.d.ts +7 -6
  59. package/src/components/templates/wallet-form/wallet-form.styles.d.ts +1 -1
  60. package/src/components/templates/wallet-form/wallet-schema.d.ts +1 -1
  61. package/src/components/templates/warehouse-display/warehouse-display.d.ts +1 -1
  62. package/src/components/templates/warehouse-form/warehouse-form.d.ts +1 -1
  63. package/src/elements/components/configure-shipment/configure-shipment.d.ts +1 -1
  64. package/src/elements/components/configure-shipment/hooks/use-address.d.ts +1 -1
  65. package/src/elements/components/configure-shipment/hooks/use-customs.d.ts +1 -1
  66. package/src/elements/components/configure-shipment/hooks/use-presets.d.ts +1 -1
  67. package/src/elements/components/configure-shipment/hooks/use-rates-form.d.ts +1 -1
  68. package/src/elements/components/configure-shipment/hooks/use-request-rates.d.ts +1 -1
  69. package/src/elements/components/configure-shipment/hooks/use-shipment-form.d.ts +1 -1
  70. package/src/elements/components/index.d.ts +0 -1
  71. package/src/elements/components/list-carriers/hooks/use-list-connected-carriers.d.ts +2 -2
  72. package/src/elements/components/purchase-label/hooks/use-configure-shipment.d.ts +1 -1
  73. package/src/elements/components/purchase-label/hooks/use-import-sales-order.d.ts +2 -2
  74. package/src/elements/components/purchase-label/hooks/use-load-shipment.d.ts +3 -3
  75. package/src/elements/components/purchase-label/hooks/use-pending-shipment.d.ts +1 -1
  76. package/src/elements/components/shipment/shipment.d.ts +1 -1
  77. package/src/elements/components/void-label/void-label.d.ts +1 -1
  78. package/src/elements/index.d.ts +0 -1
  79. package/src/factories/shipengine/address.d.ts +8 -1
  80. package/src/factories/shipengine/carrier.d.ts +1 -1
  81. package/src/factories/shipengine/label.d.ts +1 -1
  82. package/src/factories/shipengine/money.d.ts +1 -1
  83. package/src/factories/shipengine/order-source.d.ts +1 -1
  84. package/src/factories/shipengine/package.d.ts +1 -1
  85. package/src/factories/shipengine/resource.d.ts +1 -1
  86. package/src/factories/shipengine/sales-order.d.ts +1 -1
  87. package/src/factories/shipengine/service.d.ts +1 -1
  88. package/src/factories/shipengine/shipment.d.ts +1 -1
  89. package/src/factories/shipengine/wallet-history.d.ts +1 -1
  90. package/src/factories/shipengine/warehouse.d.ts +1 -3
  91. package/src/factories/shipengine/weight.d.ts +1 -1
  92. package/src/features/wallet-history/wallet-history.styles.d.ts +1 -0
  93. package/src/hooks/index.d.ts +1 -1
  94. package/src/hooks/options/use-confirmation-options.d.ts +1 -1
  95. package/src/hooks/options/use-customs-contents-options.d.ts +1 -1
  96. package/src/hooks/options/use-customs-non-delivery-options.d.ts +1 -1
  97. package/src/hooks/options/use-insurance-provider-options.d.ts +1 -1
  98. package/src/hooks/options/use-package-options.d.ts +1 -1
  99. package/src/hooks/options/use-rate-options.d.ts +1 -1
  100. package/src/hooks/options/use-service-code-options.d.ts +1 -1
  101. package/src/hooks/options/use-warehouse-options.d.ts +1 -1
  102. package/src/hooks/use-address-validation.d.ts +12 -0
  103. package/src/hooks/use-carrier-metadata.d.ts +1 -1
  104. package/src/hooks/use-elements.d.ts +2 -2
  105. package/src/hooks/use-scrub-errors.d.ts +1 -1
  106. package/src/locales/en/index.d.ts +13 -2
  107. package/src/mocks/carriers/handlers.d.ts +1 -1
  108. package/src/mocks/warehouses/handlers.d.ts +1 -1
  109. package/src/schemas/shipengine/money.d.ts +1 -1
  110. package/src/types/carrier-metadata.d.ts +1 -1
  111. package/src/types/shipping-preset/shipping-preset.d.ts +1 -1
  112. package/src/utilities/money.d.ts +1 -1
  113. package/src/utilities/rates.d.ts +2 -1
  114. package/src/utilities/shipengine/address.d.ts +1 -1
  115. package/src/utilities/shipengine/dimensions.d.ts +1 -1
  116. package/src/utilities/shipengine/sales-order.d.ts +1 -1
  117. package/src/utilities/shipengine/shipment.d.ts +1 -1
  118. package/src/utilities/shipengine/weight.d.ts +1 -1
  119. package/src/components/accordion/accordion.d.ts +0 -13
  120. package/src/components/accordion/accordion.styles.d.ts +0 -7
  121. package/src/components/accordion/index.d.ts +0 -1
  122. package/src/components/history/history-body/history-body.d.ts +0 -5
  123. package/src/components/history/history-body/history-body.styles.d.ts +0 -1
  124. package/src/components/history/history-body/index.d.ts +0 -1
  125. package/src/components/history/history-list/history-list.d.ts +0 -12
  126. package/src/components/history/history-list/index.d.ts +0 -1
  127. package/src/components/history/history-row/history-row.d.ts +0 -6
  128. package/src/components/history/history-row/index.d.ts +0 -1
  129. package/src/components/history/history.d.ts +0 -10
  130. package/src/components/templates/wallet-history/wallet-history.d.ts +0 -6
  131. package/src/components/templates/warehouse-preference-select/index.d.ts +0 -1
  132. package/src/components/templates/warehouse-preference-select/warehouse-preference-select.d.ts +0 -24
  133. package/src/components/templates/warehouse-preference-wizard/index.d.ts +0 -1
  134. package/src/components/templates/warehouse-preference-wizard/warehouse-preference-wizard.d.ts +0 -23
  135. package/src/elements/wallet-history.d.ts +0 -1
  136. package/src/hooks/use-warehouse-validation.d.ts +0 -14
  137. /package/src/{components/templates/wallet-history → features}/index.d.ts +0 -0
  138. /package/src/{elements/components → features}/wallet-history/index.d.ts +0 -0
  139. /package/src/{elements/components → features}/wallet-history/wallet-history.d.ts +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipengine/elements",
3
- "version": "0.20.2",
3
+ "version": "0.21.1",
4
4
  "typedoc": {
5
5
  "entryPoint": "./src/index.ts",
6
6
  "readmeFile": "../../README.md",
@@ -31,8 +31,8 @@
31
31
  "@hookform/resolvers": "2.9.1",
32
32
  "@packlink/brands": "3.24.0",
33
33
  "@packlink/giger-theme": "1.3.1",
34
- "@shipengine/api": "0.19.2",
35
- "@shipengine/react": "0.19.2",
34
+ "@shipengine/js-api": "0.6.1",
35
+ "@shipengine/react-api": "0.4.7",
36
36
  "@storybook/manager-api": "7.0.0-rc.1",
37
37
  "@storybook/theming": "7.0.0-rc.1",
38
38
  "axios": "0.26.1",
@@ -2,33 +2,33 @@ import { z } from "zod";
2
2
  export declare const getAddFundsSchema: (minimumAmount?: number) => z.ZodEffects<z.ZodObject<{
3
3
  funds: z.ZodObject<z.extendShape<{
4
4
  amount: z.ZodNumber;
5
- currency: z.ZodNativeEnum<typeof import("dist/shipengine-api/src").Currency>;
5
+ currency: z.ZodNativeEnum<typeof import("@shipengine/js-api").Currency>;
6
6
  }, {
7
7
  amount: z.ZodNumber;
8
8
  }>, "strip", z.ZodTypeAny, {
9
9
  amount: number;
10
- currency: import("dist/shipengine-api/src").Currency;
10
+ currency: import("@shipengine/js-api").Currency;
11
11
  }, {
12
12
  amount: number;
13
- currency: import("dist/shipengine-api/src").Currency;
13
+ currency: import("@shipengine/js-api").Currency;
14
14
  }>;
15
15
  }, "strip", z.ZodTypeAny, {
16
16
  funds: {
17
17
  amount: number;
18
- currency: import("dist/shipengine-api/src").Currency;
18
+ currency: import("@shipengine/js-api").Currency;
19
19
  };
20
20
  }, {
21
21
  funds: {
22
22
  amount: number;
23
- currency: import("dist/shipengine-api/src").Currency;
23
+ currency: import("@shipengine/js-api").Currency;
24
24
  };
25
25
  }>, {
26
26
  amount: number;
27
- currency: import("dist/shipengine-api/src").Currency;
27
+ currency: import("@shipengine/js-api").Currency;
28
28
  }, {
29
29
  funds: {
30
30
  amount: number;
31
- currency: import("dist/shipengine-api/src").Currency;
31
+ currency: import("@shipengine/js-api").Currency;
32
32
  };
33
33
  }>;
34
34
  type AddFundsFormSchema = ReturnType<typeof getAddFundsSchema>;
@@ -0,0 +1,42 @@
1
+ import { ReactNode } from "react";
2
+ import { SE } from "@shipengine/js-api";
3
+ import { WalletPayload, WarehousePayload } from "../templates";
4
+ import { AddressValidationPreference } from "../templates/address-preference-select";
5
+ type WarehouseData = Pick<WarehousePayload, "name" | "isDefault">;
6
+ type WalletData = {
7
+ creditCard: WalletPayload["creditCard"];
8
+ };
9
+ type InternalValidateAddressPayload = {
10
+ addresses: {
11
+ originAddress: SE.Address;
12
+ returnAddress?: SE.Address | undefined;
13
+ };
14
+ data?: WarehouseData | WalletData;
15
+ onValid: (payload: {
16
+ originAddress: SE.Address;
17
+ returnAddress?: SE.Address;
18
+ }) => void;
19
+ };
20
+ export type ValidationPreference = {
21
+ originAddress: AddressValidationPreference;
22
+ returnAddress?: AddressValidationPreference;
23
+ };
24
+ export type AddressPreferenceProvideProps = {
25
+ children: ReactNode;
26
+ className?: string;
27
+ formHeader?: React.ReactNode;
28
+ onSubmit: (payload: {
29
+ originAddress: SE.Address;
30
+ passengerData: InternalValidateAddressPayload["data"];
31
+ returnAddress?: SE.Address | undefined;
32
+ }) => Promise<void> | void;
33
+ };
34
+ export type AddressPreferenceValue = {
35
+ data: InternalValidateAddressPayload["data"];
36
+ validateAddress: (payload: InternalValidateAddressPayload) => Promise<void>;
37
+ validationPreference?: ValidationPreference;
38
+ };
39
+ export declare const AddressPreferenceContext: import("react").Context<AddressPreferenceValue | undefined>;
40
+ export declare const AddressPreferenceProvider: (props: AddressPreferenceProvideProps) => import("@emotion/react/jsx-runtime").JSX.Element;
41
+ export declare const useAddressPreference: () => AddressPreferenceValue;
42
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./address-preference-context";
@@ -3,50 +3,50 @@ export declare const autoFundingSchema: z.ZodObject<{
3
3
  isEnabled: z.ZodBoolean;
4
4
  lowBalancePurchaseThreshold: z.ZodObject<z.extendShape<{
5
5
  amount: z.ZodNumber;
6
- currency: z.ZodNativeEnum<typeof import("dist/shipengine-api/src").Currency>;
6
+ currency: z.ZodNativeEnum<typeof import("@shipengine/js-api").Currency>;
7
7
  }, {
8
8
  amount: z.ZodNumber;
9
9
  }>, "strip", z.ZodTypeAny, {
10
10
  amount: number;
11
- currency: import("dist/shipengine-api/src").Currency;
11
+ currency: import("@shipengine/js-api").Currency;
12
12
  }, {
13
13
  amount: number;
14
- currency: import("dist/shipengine-api/src").Currency;
14
+ currency: import("@shipengine/js-api").Currency;
15
15
  }>;
16
16
  maximumPurchasesPerDay: z.ZodNumber;
17
17
  purchaseAmount: z.ZodObject<z.extendShape<{
18
18
  amount: z.ZodNumber;
19
- currency: z.ZodNativeEnum<typeof import("dist/shipengine-api/src").Currency>;
19
+ currency: z.ZodNativeEnum<typeof import("@shipengine/js-api").Currency>;
20
20
  }, {
21
21
  amount: z.ZodNumber;
22
22
  }>, "strip", z.ZodTypeAny, {
23
23
  amount: number;
24
- currency: import("dist/shipengine-api/src").Currency;
24
+ currency: import("@shipengine/js-api").Currency;
25
25
  }, {
26
26
  amount: number;
27
- currency: import("dist/shipengine-api/src").Currency;
27
+ currency: import("@shipengine/js-api").Currency;
28
28
  }>;
29
29
  }, "strip", z.ZodTypeAny, {
30
30
  isEnabled: boolean;
31
31
  lowBalancePurchaseThreshold: {
32
32
  amount: number;
33
- currency: import("dist/shipengine-api/src").Currency;
33
+ currency: import("@shipengine/js-api").Currency;
34
34
  };
35
35
  maximumPurchasesPerDay: number;
36
36
  purchaseAmount: {
37
37
  amount: number;
38
- currency: import("dist/shipengine-api/src").Currency;
38
+ currency: import("@shipengine/js-api").Currency;
39
39
  };
40
40
  }, {
41
41
  isEnabled: boolean;
42
42
  lowBalancePurchaseThreshold: {
43
43
  amount: number;
44
- currency: import("dist/shipengine-api/src").Currency;
44
+ currency: import("@shipengine/js-api").Currency;
45
45
  };
46
46
  maximumPurchasesPerDay: number;
47
47
  purchaseAmount: {
48
48
  amount: number;
49
- currency: import("dist/shipengine-api/src").Currency;
49
+ currency: import("@shipengine/js-api").Currency;
50
50
  };
51
51
  }>;
52
52
  export type AutoFundingFormFields = z.input<typeof autoFundingSchema>;
@@ -1,11 +1,12 @@
1
- export * from "./credit-card-input";
2
1
  export * from "./checkbox-input";
2
+ export * from "./credit-card-input";
3
3
  export * from "./date-picker";
4
4
  export * from "./expiration-input";
5
5
  export * from "./input-group";
6
6
  export * from "./money-input";
7
7
  export * from "./number-input";
8
8
  export * from "./rate-select";
9
+ export * from "./select-auto-complete";
9
10
  export * from "./select";
10
11
  export * from "./submit-button";
11
12
  export * from "./switch";
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/api";
1
+ import { SE } from "@shipengine/js-api";
2
2
  type UseUtils = {
3
3
  getCurrencySymbol: (currency: SE.Currency) => string | undefined;
4
4
  };
@@ -1,5 +1,5 @@
1
1
  import { InputProps } from "@packlink/giger";
2
- import { SE } from "@shipengine/api";
2
+ import { SE } from "@shipengine/js-api";
3
3
  import { ControlledField } from "../create-field-controller";
4
4
  export declare const transform: {
5
5
  in: ({ amount, currency }?: Partial<{
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { SE } from "@shipengine/api";
2
+ import { SE } from "@shipengine/js-api";
3
3
  export interface CostBreakdownProps {
4
4
  confirmationAmount?: SE.Money;
5
5
  insuranceAmount?: SE.Money;
@@ -0,0 +1 @@
1
+ export * from "./select-auto-complete";
@@ -0,0 +1,7 @@
1
+ import { ISelectAutocomplete as NativeSelectAutoCompleteProps } from "@packlink/giger";
2
+ import { ControlledField } from "../create-field-controller";
3
+ type SelectAutoCompleteProps = {
4
+ onChange?: (value?: string) => void;
5
+ };
6
+ export declare const SelectAutoComplete: ControlledField<NativeSelectAutoCompleteProps, SelectAutoCompleteProps>;
7
+ export {};
@@ -0,0 +1,5 @@
1
+ import { WalletTransaction } from "@shipengine/js-api";
2
+ export type HistoryCardProps = {
3
+ transaction: WalletTransaction;
4
+ };
5
+ export declare const HistoryCard: ({ transaction }: HistoryCardProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const styles: (isReload?: boolean) => Record<"amountTypography" | "balanceTypography" | "cardColumn" | "cardContainer" | "carrierRow" | "carrierTypography" | "dateTypography" | "providerTypography" | "tagText", import("@emotion/serialize").Interpolation<import("@packlink/giger-theme/dist/lib/Theme").Theme>>;
@@ -0,0 +1 @@
1
+ export * from "./history-card";
@@ -1,4 +1 @@
1
- export * from "./history";
2
- export * from "./history-body";
3
- export * from "./history-list";
4
- export * from "./history-row";
1
+ export * from "./history-card";
@@ -1,5 +1,4 @@
1
1
  export * as Templates from "./templates";
2
- export * from "./accordion";
3
2
  export * from "./add-funds-form";
4
3
  export * from "./auto-funding-form";
5
4
  export * from "./button-group";
@@ -18,6 +17,7 @@ export * from "./link-action";
18
17
  export * from "./loader";
19
18
  export * from "./manage-funding";
20
19
  export * from "./portal";
20
+ export * from "./section";
21
21
  export * from "./spacer";
22
22
  export * from "./spread";
23
23
  export * from "./story-notes";
@@ -1,6 +1,10 @@
1
1
  /// <reference types="react" />
2
+ import { WithConditionalCSSProp } from "@emotion/react/types/jsx-namespace";
3
+ import { ITypographyProps } from "@packlink/giger";
2
4
  export type InlineLabelProps = {
3
5
  children: React.ReactElement;
6
+ isLabelRight?: boolean;
4
7
  label: string;
8
+ labelProps?: WithConditionalCSSProp<ITypographyProps<"span">>;
5
9
  };
6
- export declare const InlineLabel: ({ children, label }: InlineLabelProps) => import("@emotion/react/jsx-runtime").JSX.Element;
10
+ export declare const InlineLabel: ({ children, label, isLabelRight, labelProps, }: InlineLabelProps) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
@@ -0,0 +1 @@
1
+ export declare const styles: (isLabelRight?: boolean) => Record<"inlineContainer", import("@emotion/serialize").Interpolation<import("@packlink/giger-theme/dist/lib/Theme").Theme>>;
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/api";
1
+ import { SE } from "@shipengine/js-api";
2
2
  export type Item = {
3
3
  detail: string;
4
4
  name: string;
@@ -0,0 +1 @@
1
+ export * from "./label";
@@ -0,0 +1,10 @@
1
+ import { WithConditionalCSSProp } from "@emotion/react/types/jsx-namespace";
2
+ import { ITypographyProps, WithChildrenCommonProps } from "@packlink/giger";
3
+ export type LabelProps = WithChildrenCommonProps<{
4
+ spacing?: number;
5
+ text: string;
6
+ textProps?: WithConditionalCSSProp<ITypographyProps<"span">>;
7
+ variant?: LabelVariant;
8
+ }>;
9
+ export type LabelVariant = "subtitle" | "inline" | "inline-right";
10
+ export declare const Label: ({ spacing, children, text, textProps, variant }: LabelProps) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
@@ -0,0 +1,2 @@
1
+ import { LabelProps } from "./label";
2
+ export declare const styles: (variant?: LabelProps["variant"], spacing?: number) => Record<"labelContainer", import("@emotion/serialize").Interpolation<import("@packlink/giger-theme/dist/lib/Theme").Theme>>;
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/api";
1
+ import { SE } from "@shipengine/js-api";
2
2
  export type LabelLayoutPurchaseProps = {
3
3
  onChange: (layout: SE.LabelLayout) => void;
4
4
  };
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/api";
1
+ import { SE } from "@shipengine/js-api";
2
2
  export type LabelLayoutSettingsProps = {
3
3
  onChange: (layout: SE.LabelLayout) => void;
4
4
  };
@@ -0,0 +1 @@
1
+ export * from "./section";
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { WithChildrenCommonProps } from "@packlink/giger";
3
+ export type SectionProps = WithChildrenCommonProps<{
4
+ bold?: boolean;
5
+ /** Element to render at the right part of the summary */
6
+ rightContent?: JSX.Element;
7
+ /** Title to show */
8
+ title?: string;
9
+ }>;
10
+ export declare const Section: ({ bold, title, children, rightContent, ...rest }: SectionProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const styles: Record<"icon" | "rightContentWrapper" | "section" | "summary" | "summaryWrapper", import("@emotion/serialize").Interpolation<import("@packlink/giger-theme/dist/lib/Theme").Theme>>;
@@ -1,4 +1,4 @@
1
- import { CodedError } from "@shipengine/api";
1
+ import { CodedError } from "@shipengine/js-api";
2
2
  import { CarrierTerms } from "../../../types";
3
3
  import { AddCarrierFormPayload } from "./add-carrier-form-schema";
4
4
  export type AddCarrierFormProps = {
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/api";
1
+ import { SE } from "@shipengine/js-api";
2
2
  type AddressDisplayProps = {
3
3
  address: SE.Address;
4
4
  decoratorText?: string;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { SE } from "@shipengine/api";
2
+ import { SE } from "@shipengine/js-api";
3
3
  import { AddressParserPayload } from "../address-parser";
4
4
  export type AddressFormProps<T = undefined> = {
5
5
  address?: SE.Address;
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/api";
1
+ import { SE } from "@shipengine/js-api";
2
2
  export type AddressPreference = SE.AddressValidation & {
3
3
  alternative?: SE.Address;
4
4
  alternativeSource: "originalAddress" | "matchedAddress";
@@ -0,0 +1,24 @@
1
+ import { SE } from "@shipengine/js-api";
2
+ export type AddressSuggested = {
3
+ validation: SE.AddressValidation;
4
+ validationType: "SUGGESTED";
5
+ };
6
+ export type AddressError = {
7
+ validation: SE.AddressValidation;
8
+ validationType: "ERROR";
9
+ };
10
+ export type AddressExactOrSoft = {
11
+ address: SE.Address;
12
+ validationType: "EXACT" | "SOFT";
13
+ };
14
+ export type AddressValidationPreference = AddressSuggested | AddressError | AddressExactOrSoft;
15
+ export type AddressPreferenceSelectProps = {
16
+ onCancel: () => void;
17
+ onSubmit: (payload: {
18
+ originAddress: SE.Address;
19
+ returnAddress?: SE.Address;
20
+ }) => Promise<void> | void;
21
+ originAddress: AddressValidationPreference;
22
+ returnAddress?: AddressValidationPreference;
23
+ };
24
+ export declare const AddressPreferenceSelect: ({ onCancel, onSubmit, originAddress, returnAddress, }: AddressPreferenceSelectProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./address-preference-select";
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/api";
1
+ import { SE } from "@shipengine/js-api";
2
2
  import { CarrierRecoveryFormPayload } from "./carrier-recovery-form-schema";
3
3
  export type CarrierRecoveryFormProps = {
4
4
  address?: SE.Address;
@@ -1,4 +1,4 @@
1
- import { CarrierConnection } from "@shipengine/api";
1
+ import { CarrierConnection } from "@shipengine/js-api";
2
2
  export type CarrierTermsProps = {
3
3
  carrierCodes: CarrierConnection["carrierCode"][];
4
4
  onSubmit: (agreement: boolean) => void;
@@ -8,24 +8,24 @@ export declare const getCustomsItemFormSchema: (shipToCountry?: string) => z.Zod
8
8
  quantity: z.ZodNumber;
9
9
  value: z.ZodObject<{
10
10
  amount: z.ZodNumber;
11
- currency: z.ZodNativeEnum<typeof import("dist/shipengine-api/src").Currency>;
11
+ currency: z.ZodNativeEnum<typeof import("@shipengine/js-api").Currency>;
12
12
  }, "strip", z.ZodTypeAny, {
13
13
  amount: number;
14
- currency: import("dist/shipengine-api/src").Currency;
14
+ currency: import("@shipengine/js-api").Currency;
15
15
  }, {
16
16
  amount: number;
17
- currency: import("dist/shipengine-api/src").Currency;
17
+ currency: import("@shipengine/js-api").Currency;
18
18
  }>;
19
19
  }, "strip", z.ZodTypeAny, {
20
20
  value: {
21
21
  amount: number;
22
- currency: import("dist/shipengine-api/src").Currency;
22
+ currency: import("@shipengine/js-api").Currency;
23
23
  };
24
24
  quantity: number;
25
25
  }, {
26
26
  value: {
27
27
  amount: number;
28
- currency: import("dist/shipengine-api/src").Currency;
28
+ currency: import("@shipengine/js-api").Currency;
29
29
  };
30
30
  quantity: number;
31
31
  }>;
@@ -39,7 +39,7 @@ export declare const getCustomsItemFormSchema: (shipToCountry?: string) => z.Zod
39
39
  valueQuantity: {
40
40
  value: {
41
41
  amount: number;
42
- currency: import("dist/shipengine-api/src").Currency;
42
+ currency: import("@shipengine/js-api").Currency;
43
43
  };
44
44
  quantity: number;
45
45
  };
@@ -51,7 +51,7 @@ export declare const getCustomsItemFormSchema: (shipToCountry?: string) => z.Zod
51
51
  valueQuantity: {
52
52
  value: {
53
53
  amount: number;
54
- currency: import("dist/shipengine-api/src").Currency;
54
+ currency: import("@shipengine/js-api").Currency;
55
55
  };
56
56
  quantity: number;
57
57
  };
@@ -59,7 +59,7 @@ export declare const getCustomsItemFormSchema: (shipToCountry?: string) => z.Zod
59
59
  quantity: number;
60
60
  value: {
61
61
  amount: number;
62
- currency: import("dist/shipengine-api/src").Currency;
62
+ currency: import("@shipengine/js-api").Currency;
63
63
  };
64
64
  customsItemId?: string | undefined;
65
65
  harmonizedTariffCode?: string | undefined;
@@ -69,7 +69,7 @@ export declare const getCustomsItemFormSchema: (shipToCountry?: string) => z.Zod
69
69
  quantity: number;
70
70
  value: {
71
71
  amount: number;
72
- currency: import("dist/shipengine-api/src").Currency;
72
+ currency: import("@shipengine/js-api").Currency;
73
73
  };
74
74
  customsItemId?: string | undefined;
75
75
  countryOfOrigin: "AF" | "AX" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AQ" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BQ" | "BA" | "BW" | "BR" | "IO" | "VG" | "BN" | "BG" | "BF" | "BI" | "CA" | "KH" | "CM" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CX" | "CC" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "HR" | "CU" | "CW" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FK" | "FO" | "FM" | "FJ" | "FI" | "FR" | "GF" | "PF" | "TF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GG" | "GN" | "GW" | "GY" | "HT" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IM" | "IL" | "IT" | "CI" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "KR" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "AN" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "KP" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PN" | "PL" | "PT" | "PR" | "QA" | "RE" | "RO" | "RU" | "RW" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SX" | "SK" | "SI" | "SB" | "SO" | "ZA" | "GS" | "SS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "VI" | "UM" | "US" | "UY" | "UZ" | "VU" | "VE" | "VN" | "WF" | "EH" | "YE" | "ZM" | "ZW";
@@ -83,7 +83,7 @@ export declare const getCustomsItemFormSchema: (shipToCountry?: string) => z.Zod
83
83
  valueQuantity: {
84
84
  value: {
85
85
  amount: number;
86
- currency: import("dist/shipengine-api/src").Currency;
86
+ currency: import("@shipengine/js-api").Currency;
87
87
  };
88
88
  quantity: number;
89
89
  };
@@ -96,24 +96,24 @@ export declare const getCustomsItemFormSchema: (shipToCountry?: string) => z.Zod
96
96
  quantity: z.ZodNumber;
97
97
  value: z.ZodObject<{
98
98
  amount: z.ZodNumber;
99
- currency: z.ZodNativeEnum<typeof import("dist/shipengine-api/src").Currency>;
99
+ currency: z.ZodNativeEnum<typeof import("@shipengine/js-api").Currency>;
100
100
  }, "strip", z.ZodTypeAny, {
101
101
  amount: number;
102
- currency: import("dist/shipengine-api/src").Currency;
102
+ currency: import("@shipengine/js-api").Currency;
103
103
  }, {
104
104
  amount: number;
105
- currency: import("dist/shipengine-api/src").Currency;
105
+ currency: import("@shipengine/js-api").Currency;
106
106
  }>;
107
107
  }, "strip", z.ZodTypeAny, {
108
108
  value: {
109
109
  amount: number;
110
- currency: import("dist/shipengine-api/src").Currency;
110
+ currency: import("@shipengine/js-api").Currency;
111
111
  };
112
112
  quantity: number;
113
113
  }, {
114
114
  value: {
115
115
  amount: number;
116
- currency: import("dist/shipengine-api/src").Currency;
116
+ currency: import("@shipengine/js-api").Currency;
117
117
  };
118
118
  quantity: number;
119
119
  }>;
@@ -125,7 +125,7 @@ export declare const getCustomsItemFormSchema: (shipToCountry?: string) => z.Zod
125
125
  valueQuantity: {
126
126
  value: {
127
127
  amount: number;
128
- currency: import("dist/shipengine-api/src").Currency;
128
+ currency: import("@shipengine/js-api").Currency;
129
129
  };
130
130
  quantity: number;
131
131
  };
@@ -137,7 +137,7 @@ export declare const getCustomsItemFormSchema: (shipToCountry?: string) => z.Zod
137
137
  valueQuantity: {
138
138
  value: {
139
139
  amount: number;
140
- currency: import("dist/shipengine-api/src").Currency;
140
+ currency: import("@shipengine/js-api").Currency;
141
141
  };
142
142
  quantity: number;
143
143
  };
@@ -145,7 +145,7 @@ export declare const getCustomsItemFormSchema: (shipToCountry?: string) => z.Zod
145
145
  quantity: number;
146
146
  value: {
147
147
  amount: number;
148
- currency: import("dist/shipengine-api/src").Currency;
148
+ currency: import("@shipengine/js-api").Currency;
149
149
  };
150
150
  customsItemId?: string | undefined;
151
151
  harmonizedTariffCode?: string | undefined;
@@ -155,7 +155,7 @@ export declare const getCustomsItemFormSchema: (shipToCountry?: string) => z.Zod
155
155
  quantity: number;
156
156
  value: {
157
157
  amount: number;
158
- currency: import("dist/shipengine-api/src").Currency;
158
+ currency: import("@shipengine/js-api").Currency;
159
159
  };
160
160
  customsItemId?: string | undefined;
161
161
  countryOfOrigin: "AF" | "AX" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AQ" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BQ" | "BA" | "BW" | "BR" | "IO" | "VG" | "BN" | "BG" | "BF" | "BI" | "CA" | "KH" | "CM" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CX" | "CC" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "HR" | "CU" | "CW" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FK" | "FO" | "FM" | "FJ" | "FI" | "FR" | "GF" | "PF" | "TF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GG" | "GN" | "GW" | "GY" | "HT" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IM" | "IL" | "IT" | "CI" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "KR" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "AN" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "KP" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PN" | "PL" | "PT" | "PR" | "QA" | "RE" | "RO" | "RU" | "RW" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SX" | "SK" | "SI" | "SB" | "SO" | "ZA" | "GS" | "SS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "VI" | "UM" | "US" | "UY" | "UZ" | "VU" | "VE" | "VN" | "WF" | "EH" | "YE" | "ZM" | "ZW";
@@ -169,7 +169,7 @@ export declare const getCustomsItemFormSchema: (shipToCountry?: string) => z.Zod
169
169
  valueQuantity: {
170
170
  value: {
171
171
  amount: number;
172
- currency: import("dist/shipengine-api/src").Currency;
172
+ currency: import("@shipengine/js-api").Currency;
173
173
  };
174
174
  quantity: number;
175
175
  };
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { SE } from "@shipengine/api";
2
+ import { SE } from "@shipengine/js-api";
3
3
  export type CustomsItemFormProps<T = undefined> = {
4
4
  customsItem?: SE.CustomsItem;
5
5
  onCancel?: () => void;
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/api";
1
+ import { SE } from "@shipengine/js-api";
2
2
  type CustomsItemsDisplayProps = {
3
3
  onUpdate: (customsItems: SE.CustomsItem[]) => Promise<void>;
4
4
  shipment: SE.SalesOrderShipment;
@@ -1 +1 @@
1
- export declare const styles: Record<"heading" | "boldLink" | "container" | "subtitle", import("@emotion/serialize").Interpolation<import("@packlink/giger-theme/dist/lib/Theme").Theme>>;
1
+ export declare const styles: Record<"heading" | "subtitle" | "boldLink" | "container", import("@emotion/serialize").Interpolation<import("@packlink/giger-theme/dist/lib/Theme").Theme>>;
@@ -16,9 +16,8 @@ export * from "./suspend-sales-order";
16
16
  export * from "./shipment-form";
17
17
  export * from "./shipment";
18
18
  export * from "./suspend-shipment";
19
- export * from "./wallet-history";
20
19
  export * from "./warehouse-form";
21
20
  export * from "./void-label";
22
21
  export * from "./wallet-form";
23
- export * from "./warehouse-preference-wizard";
24
- export * from "./warehouse-preference-select";
22
+ export * from "../address-preference-context";
23
+ export * from "./address-preference-select";
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/api";
1
+ import { SE } from "@shipengine/js-api";
2
2
  export type LabelProps = {
3
3
  label: SE.Label & {
4
4
  carrier?: SE.Carrier;
@@ -1,4 +1,4 @@
1
- import { CarrierConnection, CodedError } from "@shipengine/api";
1
+ import { CarrierConnection, CodedError } from "@shipengine/js-api";
2
2
  import { ConnectedCarrierMetadata } from "../../../elements/components/list-carriers/hooks/use-list-connected-carriers";
3
3
  export type ListCarriersProps = {
4
4
  carriers?: ConnectedCarrierMetadata[];
@@ -1,4 +1,4 @@
1
- import { CodedError } from "@shipengine/api";
1
+ import { CodedError } from "@shipengine/js-api";
2
2
  import { ConnectedCarrierMetadata } from "../../../elements/components/list-carriers/hooks/use-list-connected-carriers";
3
3
  import { AddCarrierFormPayload } from "../add-carrier-form";
4
4
  export type ListCarriersRowProps = {