@shipengine/elements 2.14.0 → 2.15.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 (72) hide show
  1. package/actions-menu.js +5 -5
  2. package/components.js +1 -1
  3. package/elements.js +1 -1
  4. package/hooks.js +1 -1
  5. package/index.js +1 -1
  6. package/package.json +4 -4
  7. package/src/components/address-preference-context/address-preference-context.d.ts +1 -1
  8. package/src/components/pager/usePager.d.ts +1 -0
  9. package/src/components/templates/address-form/address-fields.d.ts +1 -2
  10. package/src/components/templates/address-form/address-form.d.ts +1 -2
  11. package/src/components/templates/product-form/product-form.d.ts +3 -1
  12. package/src/components/templates/products-display/products-display.d.ts +4 -4
  13. package/src/components/templates/shipment-form/sections/customs-forms/customs-forms.d.ts +3 -2
  14. package/src/components/templates/shipment-form/shipment-form.d.ts +3 -2
  15. package/src/components/templates/wallet-form/edit-wallet-address-form.d.ts +1 -1
  16. package/src/components/vat-form/vat-form-schema.d.ts +21 -3
  17. package/src/components/vat-form/vat-form.d.ts +7 -2
  18. package/src/components/vat-form/vat-form.styles.d.ts +3 -0
  19. package/src/components/vat-form/vat-types.d.ts +6 -0
  20. package/src/components/warehouse-form/warehouse-form-schema.d.ts +6 -0
  21. package/src/components/warehouse-form/warehouse-form.d.ts +3 -1
  22. package/src/elements/labels-grid/hooks/use-labels-grid.d.ts +1 -0
  23. package/src/elements/labels-grid/labels-grid.d.ts +39 -16
  24. package/src/elements/manage-carriers/manage-carriers.d.ts +6 -2
  25. package/src/elements/manage-external-carriers/manage-external-carriers.d.ts +6 -2
  26. package/src/elements/manage-funding/manage-funding-element.d.ts +6 -2
  27. package/src/elements/manage-warehouses/manage-warehouses.d.ts +6 -2
  28. package/src/elements/payment-method-settings/payment-method-settings-element.d.ts +6 -2
  29. package/src/elements/purchase-label/configure-shipment.d.ts +2 -1
  30. package/src/elements/purchase-label/hooks/index.d.ts +0 -2
  31. package/src/elements/purchase-label/hooks/use-shipment-form.d.ts +2 -1
  32. package/src/elements/purchase-label/purchase-label.d.ts +28 -39
  33. package/src/elements/select-label-layout/select-label-layout-element.d.ts +6 -2
  34. package/src/elements/shipment-summary/shipment-summary.d.ts +8 -2
  35. package/src/elements/shipments-grid/hooks/use-shipments-grid.d.ts +1 -0
  36. package/src/elements/shipments-grid/shipments-grid.d.ts +6 -5
  37. package/src/elements/theme-creator/theme-creator.d.ts +6 -2
  38. package/src/elements/transaction-history/transaction-history-element.d.ts +6 -2
  39. package/src/elements/unit-settings/unit-settings-element.d.ts +6 -2
  40. package/src/elements/vat-settings/vat-settings-element.d.ts +6 -2
  41. package/src/elements/void-label/void-label.d.ts +36 -52
  42. package/src/elements-provider/elements-provider.d.ts +1 -2
  43. package/src/features/vat-settings/use-vat-settings.d.ts +1 -1
  44. package/src/features/vat-settings/vat-settings.d.ts +1 -4
  45. package/src/features/vat-settings/vat-settings.styles.d.ts +7 -0
  46. package/src/hooks/index.d.ts +2 -0
  47. package/src/hooks/options/use-country-code-options.d.ts +1 -1
  48. package/src/hooks/options/use-state-code-options.d.ts +2 -2
  49. package/src/{elements/purchase-label/hooks → hooks}/use-configure-shipment.d.ts +5 -10
  50. package/src/hooks/use-helpers.stories.d.ts +3 -0
  51. package/src/locales/en/index.d.ts +6 -2
  52. package/src/types/harmonized-tariff-code.d.ts +10 -0
  53. package/src/types/index.d.ts +4 -3
  54. package/src/workflows/account-settings/account-settings.d.ts +6 -2
  55. package/src/workflows/carrier-services/carrier-services.d.ts +6 -25
  56. package/src/workflows/connect-external-carrier/connect-external-carrier.d.ts +6 -2
  57. package/src/workflows/label-workflow/label-workflow.d.ts +1126 -101
  58. package/src/workflows/onboarding/components/ship-from-address-step/ship-from-address-step.d.ts +1 -1
  59. package/src/workflows/onboarding/onboarding.d.ts +7 -3
  60. package/transaction-history-element.js +1 -1
  61. package/use-configure-shipment.js +1 -0
  62. package/use-toggle.js +1 -1
  63. package/use-unit-settings.js +1 -1
  64. package/usePager.js +1 -1
  65. package/utilities.js +1 -1
  66. package/vat.js +1 -1
  67. package/wallet-form.js +1 -1
  68. package/warehouses.js +1 -0
  69. package/workflows.js +1 -1
  70. package/shipment.js +0 -1
  71. package/use-scrub-errors.js +0 -1
  72. /package/src/{elements/purchase-label/hooks → hooks}/use-import-sales-order.d.ts +0 -0
package/components.js CHANGED
@@ -1 +1 @@
1
- export{y as Actions,x as ActionsMenu,A as AddFundsForm,a as AutoFundingForm,B as ButtonGroup,C as CarrierBalance,c as CarrierConnectionCard,d as CarrierIcon,e as CarrierLogo,f as CollapsiblePanel,h as CopyButton,i as Cube,D as DateRangeCombo,j as DateRangeSelect,k as DisplayTerm,E as EditBillingForm,l as ErrorFallback,F as FieldLabel,m as FormPortal,n as FundAndPurchase,H as HistoryCard,o as HistoryCardExtension,I as InlineLabel,p as ItemsBreakdown,L as LinkAction,q as Loader,P as PoweredByShipEngine,R as RateDetails,S as Section,r as SettingsCard,z as ShipFromAddressForm,t as SkeletonCarrierRow,u as Spacer,v as Spread,T as Tabs,V as VatForm,W as WalletCard,w as WarehouseForm,b as autoFundingSchema,g as getAddFundsSchema,s as styles}from"./actions-menu.js";export{C as CellFormattedDate,D as Drawer,E as ErrorState,G as GridController,b as GridFilters,a as GridFooter,u as usePager}from"./usePager.js";export{f as Field,P as Pager,S as StoryNotes,a as SuspendText}from"./suspend-text.js";export{P as Portal}from"./use-toggle.js";import"./carrier.js";import"date-fns/format";import"date-fns/locale";import"date-fns/parse";import"lodash/get";import"humps";import"@shipengine/react-api";import"lodash/isEqual";import"lodash/isNil";import"lodash/omit";import"lodash/omitBy";import"./address.js";import"@emotion/react/jsx-runtime";import"date-fns/isToday";import"@shipengine/giger";import"react";import"react-hook-form";import"react-i18next";import"./validation.js";import"@hookform/resolvers/zod";import"zod";import"@emotion/react";import"@shipengine/giger-theme";import"./money.js";import"copy-to-clipboard";import"js-base64";import"libphonenumber-js/min";import"card-validator";import"./zod.js";import"react-use";import"date-fns/subDays";import"react-dom";
1
+ export{y as Actions,x as ActionsMenu,A as AddFundsForm,a as AutoFundingForm,B as ButtonGroup,C as CarrierBalance,c as CarrierConnectionCard,d as CarrierIcon,e as CarrierLogo,f as CollapsiblePanel,h as CopyButton,i as Cube,D as DateRangeCombo,j as DateRangeSelect,k as DisplayTerm,E as EditBillingForm,l as ErrorFallback,F as FieldLabel,m as FormPortal,n as FundAndPurchase,H as HistoryCard,o as HistoryCardExtension,I as InlineLabel,p as ItemsBreakdown,L as LinkAction,q as Loader,P as PoweredByShipEngine,R as RateDetails,S as Section,r as SettingsCard,z as ShipFromAddressForm,t as SkeletonCarrierRow,u as Spacer,v as Spread,T as Tabs,V as VatForm,W as WalletCard,w as WarehouseForm,b as autoFundingSchema,g as getAddFundsSchema,s as styles}from"./actions-menu.js";export{C as CellFormattedDate,D as Drawer,E as ErrorState,G as GridController,b as GridFilters,a as GridFooter,u as usePager}from"./usePager.js";export{f as Field,P as Pager,S as StoryNotes,a as SuspendText}from"./suspend-text.js";export{P as Portal}from"./use-toggle.js";import"./carrier.js";import"date-fns/format";import"date-fns/locale";import"date-fns/parse";import"lodash/get";import"humps";import"@shipengine/react-api";import"lodash/isEqual";import"lodash/isNil";import"lodash/omit";import"lodash/omitBy";import"./address.js";import"@emotion/react/jsx-runtime";import"date-fns/isToday";import"@shipengine/giger";import"@emotion/react";import"react";import"./validation.js";import"@hookform/resolvers/zod";import"zod";import"react-i18next";import"@shipengine/giger-theme";import"react-hook-form";import"./money.js";import"copy-to-clipboard";import"js-base64";import"libphonenumber-js/min";import"card-validator";import"./zod.js";import"react-use";import"date-fns/subDays";import"react-dom";
package/elements.js CHANGED
@@ -1 +1 @@
1
- export{l as LabelsGrid,m as ManageCarriers,b as ManageExternalCarriers,e as ManageFunding,a as ManageWarehouses,p as PaymentMethodSettings,f as SelectLabelLayout,s as ShipmentsGrid,c as ThemeCreator,T as ThemeCreatorProvider,g as TransactionHistory,d as UnitSettings,u as useThemeCreator}from"./transaction-history-element.js";export{a as CarrierServices,p as PurchaseLabel,s as ShipmentSummary,v as VoidLabel}from"./use-unit-settings.js";import"@emotion/react/jsx-runtime";import"./actions-menu.js";import"./carrier.js";import"date-fns/format";import"date-fns/locale";import"date-fns/parse";import"lodash/get";import"humps";import"@shipengine/react-api";import"lodash/isEqual";import"lodash/isNil";import"lodash/omit";import"lodash/omitBy";import"./address.js";import"date-fns/isToday";import"@shipengine/giger";import"./use-toggle.js";import"react";import"react-dom";import"react-hook-form";import"react-i18next";import"./validation.js";import"@hookform/resolvers/zod";import"zod";import"@emotion/react";import"@shipengine/giger-theme";import"./money.js";import"copy-to-clipboard";import"js-base64";import"libphonenumber-js/min";import"card-validator";import"./zod.js";import"./use-get-service-name.js";import"./usePager.js";import"react-use";import"date-fns/subDays";import"date-fns/formatISO";import"date-fns/isSameDay";import"date-fns/isWithinInterval";import"date-fns/setHours";import"date-fns/setMinutes";import"lodash/merge";import"@tanstack/react-query";import"./use-scrub-errors.js";import"./shipment.js";import"./canada-ddp.js";import"lodash/orderBy";import"./vat.js";import"axios";import"lodash/mergeWith";import"@shipengine/js-api";import"@rjsf/core";import"@rjsf/validator-ajv8";import"lodash/camelCase";import"use-debounce";import"classnames";import"i18next";import"i18next-browser-languagedetector";import"@emotion/cache";import"stylis";
1
+ export{l as LabelsGrid,m as ManageCarriers,b as ManageExternalCarriers,f as ManageFunding,a as ManageWarehouses,h as PaymentMethodSettings,p as PurchaseLabel,g as SelectLabelLayout,d as ShipmentSummary,s as ShipmentsGrid,c as ThemeCreator,T as ThemeCreatorProvider,i as TransactionHistory,e as UnitSettings,u as useThemeCreator}from"./transaction-history-element.js";export{a as CarrierServices,v as VoidLabel}from"./use-unit-settings.js";import"@emotion/react/jsx-runtime";import"./actions-menu.js";import"./carrier.js";import"date-fns/format";import"date-fns/locale";import"date-fns/parse";import"lodash/get";import"humps";import"@shipengine/react-api";import"lodash/isEqual";import"lodash/isNil";import"lodash/omit";import"lodash/omitBy";import"./address.js";import"date-fns/isToday";import"@shipengine/giger";import"./use-toggle.js";import"react";import"react-dom";import"@emotion/react";import"./validation.js";import"@hookform/resolvers/zod";import"zod";import"react-i18next";import"@shipengine/giger-theme";import"react-hook-form";import"./money.js";import"copy-to-clipboard";import"js-base64";import"libphonenumber-js/min";import"card-validator";import"./zod.js";import"./use-configure-shipment.js";import"./warehouses.js";import"./canada-ddp.js";import"lodash/orderBy";import"@tanstack/react-query";import"./use-get-service-name.js";import"./usePager.js";import"react-use";import"date-fns/subDays";import"date-fns/formatISO";import"date-fns/isSameDay";import"date-fns/isWithinInterval";import"date-fns/setHours";import"date-fns/setMinutes";import"./vat.js";import"axios";import"lodash/merge";import"lodash/mergeWith";import"@shipengine/js-api";import"@rjsf/core";import"@rjsf/validator-ajv8";import"lodash/camelCase";import"use-debounce";import"classnames";import"i18next";import"i18next-browser-languagedetector";import"@emotion/cache";import"stylis";
package/hooks.js CHANGED
@@ -1 +1 @@
1
- export{R as RootPortalProvider,c as useAddressValidation,u as useCountryCodeOptions,d as useNestedForm,e as useRootPortal,b as useStateCodeOptions,f as useToggle}from"./use-toggle.js";export{P as PudoType,p as useBlackboxDetection,u as useConfirmationOptions,a as useCustomsContentsOptions,b as useCustomsNonDeliveryOptions,c as useDateRangeOptions,n as useGetFundingSourceInsuranceProvider,d as useInsuranceProviderOptions,o as useManageFundingSourceInsurance,e as useMovementIndicatorOptions,f as usePackageOptions,g as useRateOptions,q as useScrubErrors,h as useServiceCodeOptions,l as useServicePoints,k as useShipFromAddressOptions,i as useShipmentMetadata,j as useShippingPresetsOptions,m as useWindsorFramework}from"./use-scrub-errors.js";export{u as useGetServiceName}from"./use-get-service-name.js";export{P as PageLayoutProvider,u as useExpirationMonthOptions,a as useHelpers,b as usePageLayout}from"./use-page-layout.js";export{u as useRunOnceOnTrue}from"./use-run-once-on-true.js";import"@emotion/react/jsx-runtime";import"react";import"./carrier.js";import"date-fns/format";import"date-fns/locale";import"date-fns/parse";import"lodash/get";import"humps";import"@shipengine/react-api";import"lodash/isEqual";import"lodash/isNil";import"lodash/omit";import"lodash/omitBy";import"./address.js";import"react-dom";import"react-i18next";import"./shipment.js";import"./canada-ddp.js";import"lodash/orderBy";import"@shipengine/giger";import"@emotion/react";import"js-base64";import"./checks.js";import"jwt-decode";
1
+ export{R as RootPortalProvider,c as useAddressValidation,u as useCountryCodeOptions,d as useNestedForm,e as useRootPortal,b as useStateCodeOptions,f as useToggle}from"./use-toggle.js";export{P as PudoType,p as useBlackboxDetection,r as useConfigureShipment,u as useConfirmationOptions,a as useCustomsContentsOptions,b as useCustomsNonDeliveryOptions,c as useDateRangeOptions,n as useGetFundingSourceInsuranceProvider,s as useImportSalesOrder,d as useInsuranceProviderOptions,o as useManageFundingSourceInsurance,e as useMovementIndicatorOptions,f as usePackageOptions,g as useRateOptions,q as useScrubErrors,h as useServiceCodeOptions,l as useServicePoints,k as useShipFromAddressOptions,i as useShipmentMetadata,j as useShippingPresetsOptions,m as useWindsorFramework}from"./use-configure-shipment.js";export{u as useGetServiceName}from"./use-get-service-name.js";export{P as PageLayoutProvider,u as useExpirationMonthOptions,a as useHelpers,b as usePageLayout}from"./use-page-layout.js";export{u as useRunOnceOnTrue}from"./use-run-once-on-true.js";import"@emotion/react/jsx-runtime";import"react";import"./carrier.js";import"date-fns/format";import"date-fns/locale";import"date-fns/parse";import"lodash/get";import"humps";import"@shipengine/react-api";import"lodash/isEqual";import"lodash/isNil";import"lodash/omit";import"lodash/omitBy";import"./address.js";import"react-dom";import"react-i18next";import"./warehouses.js";import"./canada-ddp.js";import"lodash/orderBy";import"@shipengine/giger";import"@emotion/react";import"js-base64";import"@tanstack/react-query";import"./checks.js";import"jwt-decode";
package/index.js CHANGED
@@ -1 +1 @@
1
- import{ShipEngine as _}from"@shipengine/react-api";export*from"@shipengine/react-api";export{y as Actions,x as ActionsMenu,A as AddFundsForm,a as AutoFundingForm,B as ButtonGroup,C as CarrierBalance,c as CarrierConnectionCard,d as CarrierIcon,e as CarrierLogo,f as CollapsiblePanel,h as CopyButton,i as Cube,D as DateRangeCombo,j as DateRangeSelect,k as DisplayTerm,E as EditBillingForm,l as ErrorFallback,F as FieldLabel,m as FormPortal,n as FundAndPurchase,H as HistoryCard,o as HistoryCardExtension,I as InlineLabel,p as ItemsBreakdown,L as LinkAction,q as Loader,P as PoweredByShipEngine,R as RateDetails,S as Section,r as SettingsCard,z as ShipFromAddressForm,t as SkeletonCarrierRow,u as Spacer,v as Spread,T as Tabs,V as VatForm,W as WalletCard,w as WarehouseForm,b as autoFundingSchema,g as getAddFundsSchema,s as styles}from"./actions-menu.js";export{C as CellFormattedDate,D as Drawer,E as ErrorState,G as GridController,b as GridFilters,a as GridFooter,u as usePager}from"./usePager.js";export{f as Field,P as Pager,S as StoryNotes,a as SuspendText}from"./suspend-text.js";import{E as ee,R as ae,a as se}from"./use-toggle.js";export{a as ElementsContext,E as ElementsContextProvider,P as Portal,R as RootPortalProvider,c as useAddressValidation,u as useCountryCodeOptions,g as useElements,d as useNestedForm,e as useRootPortal,b as useStateCodeOptions,f as useToggle}from"./use-toggle.js";export{C as Country,U as UsState,d as UsaCity,c as countries,a as countryCodes,e as euCountryCodes,p as postalCodeRegex,f as usCities,b as usStateCodes,u as usStates}from"./address.js";export{a as CarrierServices,b as ConnectExternalCarrier,p as PurchaseLabel,s as ShipmentSummary,v as VoidLabel,c as createElement}from"./use-unit-settings.js";import{t as re}from"./transaction-history-element.js";export{l as LabelsGrid,m as ManageCarriers,b as ManageExternalCarriers,e as ManageFunding,a as ManageWarehouses,p as PaymentMethodSettings,f as SelectLabelLayout,s as ShipmentsGrid,c as ThemeCreator,T as ThemeCreatorProvider,g as TransactionHistory,d as UnitSettings,u as useThemeCreator}from"./transaction-history-element.js";export{e as extendZod}from"./zod.js";export{P as PudoType,p as useBlackboxDetection,u as useConfirmationOptions,a as useCustomsContentsOptions,b as useCustomsNonDeliveryOptions,c as useDateRangeOptions,n as useGetFundingSourceInsuranceProvider,d as useInsuranceProviderOptions,o as useManageFundingSourceInsurance,e as useMovementIndicatorOptions,f as usePackageOptions,g as useRateOptions,q as useScrubErrors,h as useServiceCodeOptions,l as useServicePoints,k as useShipFromAddressOptions,i as useShipmentMetadata,j as useShippingPresetsOptions,m as useWindsorFramework}from"./use-scrub-errors.js";export{P as PageLayoutProvider,u as useExpirationMonthOptions,a as useHelpers,b as usePageLayout}from"./use-page-layout.js";export{u as useGetServiceName}from"./use-get-service-name.js";export{u as useRunOnceOnTrue}from"./use-run-once-on-true.js";export{m as moneySchema}from"./money.js";export{p as phoneSchema,a as phoneSchemaUnvalidated}from"./phone.js";export{C as CanadaDeliveredDutyOptions}from"./canada-ddp.js";export{a as assert,r as raise}from"./assertions.js";export{g as getSellerIdFromToken,i as isOnboarded}from"./checks.js";export{b as convertDimensions,c as createDictionary,f as formatDimensions,h as getCancelledShipment,d as getIsCustomsRequiredForShipment,g as getIsInternationalShipment,e as getPendingShipment,j as getShipmentByStatus,a as isCollectionService,i as isPudoEligibleRate,m as moveCustomsItemsToProducts}from"./shipment.js";import{_ as te,g as oe,d as ie}from"./carrier.js";export{P as addEmailToValidation,x as addSpaceBetweenWords,A as calculateTotal,t as capitalizeFirstLetter,u as capitalizeFirstLetterOfEachWord,y as currencySymbol,i as daysAfter,d as deepMergeFeatures,q as featureFlagComponentNameLookup,a0 as filterFundingSourceCarriers,a as findDateLocale,b as formatByDateAndLocale,B as formatCreditCardNumber,f as formatDate,c as formatDateDDMMYY,e as formatDateDDMMYYYY,C as formatExpiration,z as formatMoney,X as getCarrierIdByCarrierCode,D as getCurrencyFromString,E as getCurrencySymbolFromString,g as getDefaultFeatures,Q as getDefaultShipFromAddress,j as getExpirationYears,S as getIsShipmentUsingSavedShipFromAddress,Y as getLogoOrIconByCarrierCode,F as getRateRequiresAcknowledgement,l as getRelativeDates,R as getSavedShipFromAddressId,G as getTotalRateAmount,h as getlocaleDateStringFormat,I as isDomesticAddress,O as isEmptyAddress,W as isEvriCarrier,Z as isGlobalPostEligible,J as isMilitaryAddress,k as isNowOrInTheFuture,r as isObject,M as isPoBox,N as isPoBoxAddress,$ as isSendleEligible,K as isUnitedStatesTerritory,L as isUnsupportedByUps,U as isUpsCarrier,T as isUspsCarrier,V as isYodelCarrier,m as mostRecent,n as nextDayCutoff,o as omitTime,H as overrideCarrierCodes,p as parseLocaleDate,v as pascalize,w as replaceSpacesWithDashes,s as sortByCreationDate}from"./carrier.js";export{N as NO_VAT_COUNTRIES,k as convertDecimalWeightToFractionalWeight,j as convertFractionalWeightToDecimalWeight,h as convertPoundsAndOuncesToOunces,l as convertWeight,c as createCodedErrors,m as formatFractionalWeight,u as formatTrackingNumber,g as getCustomsFromSalesOrder,o as getDefaultWarehouse,q as getInsuranceProviderWithFriendlyName,b as getIsCustomsRequiredForSalesOrder,r as getIsInsuraceProviderAccepted,v as getIsVatRequired,d as getRequestedServices,e as getSalesOrderItemsFromSalesOrderOrShipment,p as getWarehouseById,f as isDecimalWeight,n as isFlatRatePackageCode,i as isMetricWeightUnit,a as throwAny,t as throwJoinedMessages,s as trackingStatusFormatter}from"./vat.js";export{a as aggregateRateDetailItems,c as calculateRateDetailBreakdown,b as createStyles,e as errorMap,f as formLogger,i as isString,s as scopeTheme,v as validationResolver}from"./validation.js";export{a as AccountSettings,l as LabelWorkflow,o as Onboarding}from"./wallet-form.js";import{jsx as ne}from"@emotion/react/jsx-runtime";import{useCallback as me,useMemo as de}from"react";import{THEME_ID as ce,GigerProvider as le,GigerTestProvider as pe}from"@shipengine/giger";import{Theme as ue}from"@shipengine/giger-theme";import ge from"axios";import"date-fns/isToday";import"react-hook-form";import"react-i18next";import"@emotion/react";import"lodash/isEqual";import"zod";import"copy-to-clipboard";import"js-base64";import"libphonenumber-js/min";import"lodash/omit";import"card-validator";import"react-use";import"date-fns/subDays";import"react-dom";import"lodash/merge";import"@tanstack/react-query";import"lodash/mergeWith";import"humps";import"@shipengine/js-api";import"@rjsf/core";import"@rjsf/validator-ajv8";import"lodash/camelCase";import"use-debounce";import"classnames";import"i18next";import"i18next-browser-languagedetector";import"@emotion/cache";import"stylis";import"date-fns/formatISO";import"date-fns/isSameDay";import"date-fns/isWithinInterval";import"date-fns/setHours";import"date-fns/setMinutes";import"lodash/orderBy";import"jwt-decode";import"date-fns/format";import"date-fns/locale";import"date-fns/parse";import"lodash/get";import"lodash/isNil";import"lodash/omitBy";import"@hookform/resolvers/zod";const he=({baseURL:e="https://elements.shipengine.com",cdnURL:a="https://cdn.packlink.com",children:s,container:r,features:t,getToken:o,headers:i,locale:n,onApiError:m,onError:d=(()=>{}),scope:c="lmnt",themeConfig:l,defaultQueryClientOptions:p,emotionCacheShadowRootContainer:u,emotionCacheShadowRootContainerWrapper:g})=>{const h=(({cdnURL:e})=>me((a=>te(void 0,void 0,void 0,(function*(){return(yield ge.get(`/brand/fallback/icons/${a.toLowerCase()}.svg`,{baseURL:e,responseType:"text"})).data}))),[e]))({cdnURL:a}),C=de((()=>{var e;const a=new ue(null!==(e=l&&ce in l?l[ce]:l)&&void 0!==e?e:re.fallback);return l&&ce in l?{[ce]:a}:a}),[l]),f={baseURL:e,cdnURL:a,container:r,emotionCacheShadowRootContainer:u,features:t,getToken:o,locale:n,onError:d,scope:c,theme:C};return ne(ee,Object.assign({},f,{children:ne(le,Object.assign({cdnUrl:a,emotionCacheShadowRootContainer:u,reference:g||c||void 0,resolveIcon:h,theme:C},{children:ne(_,Object.assign({baseURL:e,defaultQueryClientOptions:p,getToken:o,headers:i,onApiError:m},{children:ne(ae,Object.assign({emotionCacheShadowRootContainer:u},{children:s}))}))}))}))},Ce=({baseURL:e,children:a,features:s})=>{const r=de((()=>new ue),[]),t=oe(["globalFeatures"]),o=me((()=>"none"),[]),i={baseURL:e,cdnURL:"mockCdnUrl",getFeatures:e=>{var a;return ie(null!==(a=oe([e]))&&void 0!==a?a:{},null==s?void 0:s[e])},getToken:o,globalFeatures:Object.assign(Object.assign({enabledExternalCarriers:["apc","asendia","better_trucks","canpar","chronopost","couriers_please","courierpost","dpd","hermes_germany","intelliquick_delivery","lso","ontrac","seko","ups","yodel"]},t),s.globalFeatures),onError:()=>{},scope:"lmnt",theme:r};return ne(se.Provider,Object.assign({value:i},{children:ne(pe,Object.assign({theme:r},{children:ne(_,Object.assign({baseURL:e,getToken:o},{children:a}))}))}))};export{he as ElementsProvider,Ce as ElementsTestProvider};
1
+ import{ShipEngine as _}from"@shipengine/react-api";export*from"@shipengine/react-api";export{y as Actions,x as ActionsMenu,A as AddFundsForm,a as AutoFundingForm,B as ButtonGroup,C as CarrierBalance,c as CarrierConnectionCard,d as CarrierIcon,e as CarrierLogo,f as CollapsiblePanel,h as CopyButton,i as Cube,D as DateRangeCombo,j as DateRangeSelect,k as DisplayTerm,E as EditBillingForm,l as ErrorFallback,F as FieldLabel,m as FormPortal,n as FundAndPurchase,H as HistoryCard,o as HistoryCardExtension,I as InlineLabel,p as ItemsBreakdown,L as LinkAction,q as Loader,P as PoweredByShipEngine,R as RateDetails,S as Section,r as SettingsCard,z as ShipFromAddressForm,t as SkeletonCarrierRow,u as Spacer,v as Spread,T as Tabs,V as VatForm,W as WalletCard,w as WarehouseForm,b as autoFundingSchema,g as getAddFundsSchema,s as styles}from"./actions-menu.js";export{C as CellFormattedDate,D as Drawer,E as ErrorState,G as GridController,b as GridFilters,a as GridFooter,u as usePager}from"./usePager.js";export{f as Field,P as Pager,S as StoryNotes,a as SuspendText}from"./suspend-text.js";import{E as ee,R as ae,a as se}from"./use-toggle.js";export{a as ElementsContext,E as ElementsContextProvider,P as Portal,R as RootPortalProvider,c as useAddressValidation,u as useCountryCodeOptions,g as useElements,d as useNestedForm,e as useRootPortal,b as useStateCodeOptions,f as useToggle}from"./use-toggle.js";export{C as Country,U as UsState,d as UsaCity,c as countries,a as countryCodes,e as euCountryCodes,p as postalCodeRegex,f as usCities,b as usStateCodes,u as usStates}from"./address.js";export{a as CarrierServices,b as ConnectExternalCarrier,v as VoidLabel,c as createElement}from"./use-unit-settings.js";import{t as re}from"./transaction-history-element.js";export{l as LabelsGrid,m as ManageCarriers,b as ManageExternalCarriers,f as ManageFunding,a as ManageWarehouses,h as PaymentMethodSettings,p as PurchaseLabel,g as SelectLabelLayout,d as ShipmentSummary,s as ShipmentsGrid,c as ThemeCreator,T as ThemeCreatorProvider,i as TransactionHistory,e as UnitSettings,u as useThemeCreator}from"./transaction-history-element.js";export{e as extendZod}from"./zod.js";export{P as PudoType,p as useBlackboxDetection,r as useConfigureShipment,u as useConfirmationOptions,a as useCustomsContentsOptions,b as useCustomsNonDeliveryOptions,c as useDateRangeOptions,n as useGetFundingSourceInsuranceProvider,s as useImportSalesOrder,d as useInsuranceProviderOptions,o as useManageFundingSourceInsurance,e as useMovementIndicatorOptions,f as usePackageOptions,g as useRateOptions,q as useScrubErrors,h as useServiceCodeOptions,l as useServicePoints,k as useShipFromAddressOptions,i as useShipmentMetadata,j as useShippingPresetsOptions,m as useWindsorFramework}from"./use-configure-shipment.js";export{P as PageLayoutProvider,u as useExpirationMonthOptions,a as useHelpers,b as usePageLayout}from"./use-page-layout.js";export{u as useGetServiceName}from"./use-get-service-name.js";export{u as useRunOnceOnTrue}from"./use-run-once-on-true.js";export{m as moneySchema}from"./money.js";export{p as phoneSchema,a as phoneSchemaUnvalidated}from"./phone.js";export{C as CanadaDeliveredDutyOptions}from"./canada-ddp.js";export{a as assert,r as raise}from"./assertions.js";export{g as getSellerIdFromToken,i as isOnboarded}from"./checks.js";export{b as convertDimensions,c as createDictionary,f as formatDimensions,m as getCancelledShipment,g as getCustomsFromSalesOrder,p as getDefaultWarehouse,d as getIsCustomsRequiredForSalesOrder,k as getIsCustomsRequiredForShipment,j as getIsInternationalShipment,l as getPendingShipment,e as getRequestedServices,h as getSalesOrderItemsFromSalesOrderOrShipment,n as getShipmentByStatus,q as getWarehouseById,a as isCollectionService,i as isPudoEligibleRate,o as moveCustomsItemsToProducts}from"./warehouses.js";import{_ as te,g as oe,d as ie}from"./carrier.js";export{P as addEmailToValidation,x as addSpaceBetweenWords,A as calculateTotal,t as capitalizeFirstLetter,u as capitalizeFirstLetterOfEachWord,y as currencySymbol,i as daysAfter,d as deepMergeFeatures,q as featureFlagComponentNameLookup,a0 as filterFundingSourceCarriers,a as findDateLocale,b as formatByDateAndLocale,B as formatCreditCardNumber,f as formatDate,c as formatDateDDMMYY,e as formatDateDDMMYYYY,C as formatExpiration,z as formatMoney,X as getCarrierIdByCarrierCode,D as getCurrencyFromString,E as getCurrencySymbolFromString,g as getDefaultFeatures,Q as getDefaultShipFromAddress,j as getExpirationYears,S as getIsShipmentUsingSavedShipFromAddress,Y as getLogoOrIconByCarrierCode,F as getRateRequiresAcknowledgement,l as getRelativeDates,R as getSavedShipFromAddressId,G as getTotalRateAmount,h as getlocaleDateStringFormat,I as isDomesticAddress,O as isEmptyAddress,W as isEvriCarrier,Z as isGlobalPostEligible,J as isMilitaryAddress,k as isNowOrInTheFuture,r as isObject,M as isPoBox,N as isPoBoxAddress,$ as isSendleEligible,K as isUnitedStatesTerritory,L as isUnsupportedByUps,U as isUpsCarrier,T as isUspsCarrier,V as isYodelCarrier,m as mostRecent,n as nextDayCutoff,o as omitTime,H as overrideCarrierCodes,p as parseLocaleDate,v as pascalize,w as replaceSpacesWithDashes,s as sortByCreationDate}from"./carrier.js";export{N as NO_VAT_COUNTRIES,f as convertDecimalWeightToFractionalWeight,e as convertFractionalWeightToDecimalWeight,d as convertPoundsAndOuncesToOunces,g as convertWeight,c as createCodedErrors,h as formatFractionalWeight,n as formatTrackingNumber,k as getInsuranceProviderWithFriendlyName,l as getIsInsuraceProviderAccepted,o as getIsVatRequired,b as isDecimalWeight,j as isFlatRatePackageCode,i as isMetricWeightUnit,a as throwAny,t as throwJoinedMessages,m as trackingStatusFormatter}from"./vat.js";export{a as aggregateRateDetailItems,c as calculateRateDetailBreakdown,b as createStyles,e as errorMap,f as formLogger,i as isString,s as scopeTheme,v as validationResolver}from"./validation.js";export{a as AccountSettings,l as LabelWorkflow,o as Onboarding}from"./wallet-form.js";import{jsx as ne}from"@emotion/react/jsx-runtime";import{useCallback as me,useMemo as de}from"react";import{THEME_ID as le,GigerProvider as ce,GigerTestProvider as pe}from"@shipengine/giger";import{Theme as ue}from"@shipengine/giger-theme";import ge from"axios";import"date-fns/isToday";import"@emotion/react";import"react-i18next";import"lodash/isEqual";import"react-hook-form";import"zod";import"copy-to-clipboard";import"js-base64";import"libphonenumber-js/min";import"lodash/omit";import"card-validator";import"react-use";import"date-fns/subDays";import"react-dom";import"humps";import"lodash/merge";import"@tanstack/react-query";import"lodash/mergeWith";import"@shipengine/js-api";import"@rjsf/core";import"@rjsf/validator-ajv8";import"lodash/camelCase";import"use-debounce";import"classnames";import"i18next";import"i18next-browser-languagedetector";import"@emotion/cache";import"stylis";import"date-fns/formatISO";import"date-fns/isSameDay";import"date-fns/isWithinInterval";import"date-fns/setHours";import"date-fns/setMinutes";import"lodash/orderBy";import"jwt-decode";import"date-fns/format";import"date-fns/locale";import"date-fns/parse";import"lodash/get";import"lodash/isNil";import"lodash/omitBy";import"@hookform/resolvers/zod";const he=({baseURL:e="https://elements.shipengine.com",cdnURL:a="https://cdn.packlink.com",children:s,container:r,features:t,getToken:o,headers:i,locale:n,onApiError:m,onError:d=(()=>{}),scope:l="lmnt",themeConfig:c,defaultQueryClientOptions:p,emotionCacheShadowRootContainer:u})=>{const g=(({cdnURL:e})=>me((a=>te(void 0,void 0,void 0,(function*(){return(yield ge.get(`/brand/fallback/icons/${a.toLowerCase()}.svg`,{baseURL:e,responseType:"text"})).data}))),[e]))({cdnURL:a}),h=de((()=>{var e;const a=new ue(null!==(e=c&&le in c?c[le]:c)&&void 0!==e?e:re.fallback);return c&&le in c?{[le]:a}:a}),[c]),f={baseURL:e,cdnURL:a,container:r,emotionCacheShadowRootContainer:u,features:t,getToken:o,locale:n,onError:d,scope:l,theme:h};return ne(ee,Object.assign({},f,{children:ne(ce,Object.assign({cdnUrl:a,emotionCacheShadowRootContainer:u,reference:u||l||void 0,resolveIcon:g,theme:h},{children:ne(_,Object.assign({baseURL:e,defaultQueryClientOptions:p,getToken:o,headers:i,onApiError:m},{children:ne(ae,Object.assign({emotionCacheShadowRootContainer:u},{children:s}))}))}))}))},fe=({baseURL:e,children:a,features:s})=>{const r=de((()=>new ue),[]),t=oe(["globalFeatures"]),o=me((()=>"none"),[]),i={baseURL:e,cdnURL:"mockCdnUrl",getFeatures:e=>{var a;return ie(null!==(a=oe([e]))&&void 0!==a?a:{},null==s?void 0:s[e])},getToken:o,globalFeatures:Object.assign(Object.assign({enabledExternalCarriers:["apc","asendia","better_trucks","canpar","chronopost","couriers_please","courierpost","dpd","hermes_germany","intelliquick_delivery","lso","ontrac","seko","ups","yodel"]},t),s.globalFeatures),onError:()=>{},scope:"lmnt",theme:r};return ne(se.Provider,Object.assign({value:i},{children:ne(pe,Object.assign({theme:r},{children:ne(_,Object.assign({baseURL:e,getToken:o},{children:a}))}))}))};export{he as ElementsProvider,fe as ElementsTestProvider};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipengine/elements",
3
- "version": "2.14.0",
3
+ "version": "2.15.0",
4
4
  "peerDependencies": {
5
5
  "@emotion/react": "11.x",
6
6
  "react-i18next": "11.x",
@@ -38,10 +38,10 @@
38
38
  "@rjsf/core": "5.16.1",
39
39
  "@rjsf/utils": "5.16.1",
40
40
  "@rjsf/validator-ajv8": "5.16.1",
41
- "@shipengine/giger": "1.19.1",
41
+ "@shipengine/giger": "1.20.2",
42
42
  "@shipengine/giger-theme": "1.7.0",
43
- "@shipengine/js-api": "2.6.0",
44
- "@shipengine/react-api": "3.6.2",
43
+ "@shipengine/js-api": "3.0.0",
44
+ "@shipengine/react-api": "3.8.0",
45
45
  "@storybook/addons": "6.5.16",
46
46
  "@storybook/api": "6.5.16",
47
47
  "@storybook/components": "7.0.0-rc.1",
@@ -3,7 +3,7 @@ import { SE } from "@shipengine/js-api";
3
3
  import { WarehousePayload } from "../";
4
4
  import { RegisterFundingSourceCarrierPayload, WalletPayload } from "../templates";
5
5
  import { AddressValidationPreference } from "../templates/address-preference-select";
6
- type WarehouseData = Pick<WarehousePayload, "name" | "isDefault">;
6
+ type WarehouseData = Pick<WarehousePayload, "name" | "isDefault" | "warehouseId">;
7
7
  type WalletData = {
8
8
  creditCard: WalletPayload["creditCard"];
9
9
  iovationBlackbox: WalletPayload["iovationBlackbox"];
@@ -5,6 +5,7 @@ export declare const usePager: (initialPageSize?: number) => {
5
5
  currentPageSize: number;
6
6
  onPageSelect: (page: number) => void;
7
7
  onPageSizeSelect: (pageSize: number) => void;
8
+ resetCurrentPage: () => void;
8
9
  };
9
10
  pageSize: number;
10
11
  };
@@ -1,10 +1,9 @@
1
1
  import { UseFormReturn } from "react-hook-form";
2
2
  import { AddressSchemaFields } from "./address-schema";
3
3
  export type AddressFieldsProps = {
4
- domestic?: boolean;
5
4
  form: UseFormReturn<AddressSchemaFields>;
6
5
  formatFieldName?: (fieldName: keyof AddressSchemaFields) => keyof AddressSchemaFields;
7
6
  formId?: string;
8
7
  optionalFields?: (keyof AddressSchemaFields)[];
9
8
  };
10
- export declare const AddressFields: ({ domestic, form, formatFieldName, formId, optionalFields, }: AddressFieldsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
9
+ export declare const AddressFields: ({ form, formatFieldName, formId, optionalFields, }: AddressFieldsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -3,7 +3,6 @@ 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;
6
- domestic?: boolean;
7
6
  isShipToForm?: boolean;
8
7
  onCancel?: () => void;
9
8
  onCancelParse?: () => void;
@@ -18,4 +17,4 @@ export type AddressFormProps<T = undefined> = {
18
17
  formId?: string;
19
18
  portalRef?: never;
20
19
  });
21
- export declare const AddressForm: <T extends Element>({ address, domestic, formId, isShipToForm, onCancel, onCancelParse, onSubmit, onSubmitParse, parseAddressErrors, portalRef, resetParseAddress, }: AddressFormProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
20
+ export declare const AddressForm: <T extends Element>({ address, formId, isShipToForm, onCancel, onCancelParse, onSubmit, onSubmitParse, parseAddressErrors, portalRef, resetParseAddress, }: AddressFormProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,8 +1,10 @@
1
1
  /// <reference types="react" />
2
2
  import { SE } from "@shipengine/react-api";
3
+ import { HarmonizedTariffCode } from "../../../types";
3
4
  export type ProductFormProps<T = undefined> = {
4
5
  currency: SE.Currency;
5
6
  expectedCurrency?: SE.Currency;
7
+ harmonizedTariffCodes?: HarmonizedTariffCode[];
6
8
  onCancel?: () => void;
7
9
  onSubmit: (values: SE.Product) => Promise<void>;
8
10
  product?: SE.Product;
@@ -15,4 +17,4 @@ export type ProductFormProps<T = undefined> = {
15
17
  formId?: string;
16
18
  portalRef?: never;
17
19
  });
18
- export declare const ProductForm: <T extends Element>({ product, formId, onCancel, onSubmit, portalRef, shipFromCountry, shipToCountry, currency, expectedCurrency, }: ProductFormProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
20
+ export declare const ProductForm: <T extends Element>({ product, formId, onCancel, onSubmit, portalRef, shipFromCountry, shipToCountry, currency, expectedCurrency, harmonizedTariffCodes, }: ProductFormProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,8 +1,8 @@
1
1
  import { SE } from "@shipengine/react-api";
2
- type ProductsDisplayProps = {
2
+ import { ProductFormProps } from "../product-form";
3
+ export type ProductsDisplayProps = {
3
4
  currency: SE.Currency;
4
5
  onUpdate: (products: SE.Product[]) => Promise<void>;
5
6
  shipment: SE.SalesOrderShipment;
6
- };
7
- export declare const ProductsDisplay: ({ onUpdate, shipment, currency }: ProductsDisplayProps) => import("@emotion/react/jsx-runtime").JSX.Element;
8
- export {};
7
+ } & Pick<ProductFormProps, "harmonizedTariffCodes">;
8
+ export declare const ProductsDisplay: ({ onUpdate, shipment, currency, harmonizedTariffCodes, }: ProductsDisplayProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,5 +1,6 @@
1
1
  import { UseFormReturn } from "react-hook-form";
2
2
  import { SE } from "@shipengine/react-api";
3
+ import { ProductsDisplayProps } from "../../../products-display";
3
4
  import { ShipmentFormProps } from "../../shipment-form";
4
5
  import { ShipmentFormFields } from "../../shipment-schema";
5
6
  type CustomsFormsProps = {
@@ -7,6 +8,6 @@ type CustomsFormsProps = {
7
8
  isCanadaDeliveredDutyEligible: boolean;
8
9
  requiresWindsorFramework?: boolean;
9
10
  shipment: SE.SalesOrderShipment;
10
- } & Pick<ShipmentFormProps, "currency" | "onDirty" | "onUpdateCustoms" | "onUpdateTaxableIds">;
11
- export declare const CustomsForms: ({ form, currency, onUpdateCustoms, onUpdateTaxableIds, isCanadaDeliveredDutyEligible, shipment, onDirty, requiresWindsorFramework, }: CustomsFormsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
11
+ } & Pick<ShipmentFormProps, "currency" | "onDirty" | "onUpdateCustoms" | "onUpdateTaxableIds"> & Pick<ProductsDisplayProps, "harmonizedTariffCodes">;
12
+ export declare const CustomsForms: ({ form, currency, onUpdateCustoms, onUpdateTaxableIds, isCanadaDeliveredDutyEligible, shipment, onDirty, requiresWindsorFramework, harmonizedTariffCodes, }: CustomsFormsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
12
13
  export {};
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { SE } from "@shipengine/react-api";
3
3
  import { UseShippingPresetsOptionsProps } from "../../../hooks";
4
- import { ShipFromAddress, ShippingPreset } from "../../../types";
4
+ import { HarmonizedTariffCode, ShipFromAddress, ShippingPreset } from "../../../types";
5
5
  import { PurchaseLabelFeatures, ShipmentFormFeatures } from "../../../utilities";
6
6
  import { AddressParserPayload } from "../address-parser";
7
7
  import { AddressPreference, AddressPreferenceDisplayProps } from "../address-preference-display";
@@ -21,6 +21,7 @@ export type ShipmentFormProps = {
21
21
  defaultFeatures?: PurchaseLabelFeatures;
22
22
  errors?: SE.CodedError[];
23
23
  features?: ShipmentFormFeatures;
24
+ harmonizedTariffCodes?: HarmonizedTariffCode[];
24
25
  hydrateRef: React.MutableRefObject<((updatedShipment: SE.SalesOrderShipment) => void) | undefined>;
25
26
  insuranceAccount?: SE.InsuranceAccount;
26
27
  isLoading?: boolean;
@@ -55,4 +56,4 @@ export type CharsetWarning = {
55
56
  message: string;
56
57
  title?: string;
57
58
  };
58
- export declare const ShipmentForm: ({ accountSettings, addressLoading, addressPreference, charsetWarning, carriers, customPackageTypes, currency, defaultFeatures, features, hydrateRef, insuranceAccount, isLoading, onApplyPreset, onChangeAddress, onChangeMode, onChangeShipFromAddress, onDirty, onSubmit, onSubmitParseAddress, onToggleAddressPreferenceDisclosure, onUpdateCustoms, onUpdateTaxableIds, parseAddressErrors, resetParseAddress, salesOrder, shipment, shipFromAddresses, shippingPresets, warehouseId, warehouses, }: ShipmentFormProps) => import("@emotion/react/jsx-runtime").JSX.Element;
59
+ export declare const ShipmentForm: ({ accountSettings, addressLoading, addressPreference, charsetWarning, carriers, customPackageTypes, currency, defaultFeatures, features, harmonizedTariffCodes, hydrateRef, insuranceAccount, isLoading, onApplyPreset, onChangeAddress, onChangeMode, onChangeShipFromAddress, onDirty, onSubmit, onSubmitParseAddress, onToggleAddressPreferenceDisclosure, onUpdateCustoms, onUpdateTaxableIds, parseAddressErrors, resetParseAddress, salesOrder, shipment, shipFromAddresses, shippingPresets, warehouseId, warehouses, }: ShipmentFormProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -13,4 +13,4 @@ export type EditWalletAddressFormProps<T = undefined> = {
13
13
  formId?: string;
14
14
  portalRef?: never;
15
15
  });
16
- export declare const EditWalletAddressForm: <T extends Element>({ address, domestic, formId, onCancel, onSubmit, portalRef, }: EditWalletAddressFormProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
16
+ export declare const EditWalletAddressForm: <T extends Element>({ address, formId, onCancel, onSubmit, portalRef, }: EditWalletAddressFormProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,10 +1,28 @@
1
1
  import { z } from "zod";
2
2
  export declare const vatSchema: z.ZodObject<{
3
- vatNumber: z.ZodString;
3
+ issuingAuthority: z.ZodEnum<["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"]>;
4
+ vat: z.ZodObject<{
5
+ number: z.ZodString;
6
+ type: z.ZodString;
7
+ }, "strip", z.ZodTypeAny, {
8
+ number: string;
9
+ type: string;
10
+ }, {
11
+ number: string;
12
+ type: string;
13
+ }>;
4
14
  }, "strip", z.ZodTypeAny, {
5
- vatNumber: string;
15
+ issuingAuthority: "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";
16
+ vat: {
17
+ number: string;
18
+ type: string;
19
+ };
6
20
  }, {
7
- vatNumber: string;
21
+ issuingAuthority: "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";
22
+ vat: {
23
+ number: string;
24
+ type: string;
25
+ };
8
26
  }>;
9
27
  export type VatSchemaFields = z.input<typeof vatSchema>;
10
28
  export type VatSchemaPayload = z.output<typeof vatSchema>;
@@ -1,6 +1,11 @@
1
1
  export type VatFormProps = {
2
2
  onCancel?: () => void;
3
3
  onSuccess?: () => void;
4
- showRegisterLaterText?: boolean;
5
4
  };
6
- export declare const VatForm: ({ onCancel, onSuccess, showRegisterLaterText }: VatFormProps) => import("@emotion/react/jsx-runtime").JSX.Element;
5
+ /**
6
+ * At first we are only allowing GB and VAT as Issuing Authority and Tax Type respectively.
7
+ * When open to all Tax types and countries remove the default values and also the
8
+ * `disabled` prop from "tax.type" and "issuingAuthority"
9
+ * There is no ticket for this at the moment
10
+ */
11
+ export declare const VatForm: ({ onCancel, onSuccess }: VatFormProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -6,4 +6,7 @@ export declare const styles: {
6
6
  inlineError: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
7
7
  marginBottom: number;
8
8
  };
9
+ vatFormText: () => {
10
+ marginTop: number;
11
+ };
9
12
  };
@@ -0,0 +1,6 @@
1
+ import { SE } from "@shipengine/js-api";
2
+ export type VatType = {
3
+ label: string;
4
+ value: SE.TaxableIdentifierType;
5
+ };
6
+ export declare const vatTypesSelectOptions: VatType[];
@@ -345,7 +345,9 @@ export declare const getWarehouseSchema: (useStrict: boolean, emailRequired?: bo
345
345
  postalCode: string;
346
346
  }>;
347
347
  returnToAddressIsDifferent: z.ZodLiteral<true>;
348
+ warehouseId: z.ZodOptional<z.ZodString>;
348
349
  }, "strip", z.ZodTypeAny, {
350
+ warehouseId?: string | undefined;
349
351
  returnToAddressIsDifferent: true;
350
352
  isDefault: boolean;
351
353
  name: string;
@@ -376,6 +378,7 @@ export declare const getWarehouseSchema: (useStrict: boolean, emailRequired?: bo
376
378
  addressResidentialIndicator: "yes" | "no";
377
379
  };
378
380
  }, {
381
+ warehouseId?: string | undefined;
379
382
  returnToAddressIsDifferent: true;
380
383
  isDefault: boolean;
381
384
  name: string;
@@ -523,7 +526,9 @@ export declare const getWarehouseSchema: (useStrict: boolean, emailRequired?: bo
523
526
  postalCode: string;
524
527
  }>;
525
528
  returnToAddressIsDifferent: z.ZodLiteral<false>;
529
+ warehouseId: z.ZodOptional<z.ZodString>;
526
530
  }, "strip", z.ZodTypeAny, {
531
+ warehouseId?: string | undefined;
527
532
  returnToAddressIsDifferent: false;
528
533
  isDefault: boolean;
529
534
  name: string;
@@ -541,6 +546,7 @@ export declare const getWarehouseSchema: (useStrict: boolean, emailRequired?: bo
541
546
  addressResidentialIndicator: "yes" | "no";
542
547
  };
543
548
  }, {
549
+ warehouseId?: string | undefined;
544
550
  returnToAddressIsDifferent: false;
545
551
  isDefault: boolean;
546
552
  name: string;
@@ -1,6 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import { SE } from "@shipengine/react-api";
3
- export type WarehousePayload = Partial<SE.Warehouse> & Pick<SE.Warehouse, "name" | "originAddress" | "isDefault">;
3
+ export type WarehousePayload = Partial<SE.Warehouse> & Pick<SE.Warehouse, "name" | "originAddress" | "isDefault"> & {
4
+ warehouseId?: string;
5
+ };
4
6
  export type WarehouseFormProps<T = undefined> = {
5
7
  onCancel?: () => void;
6
8
  onDelete?: () => void;
@@ -110,6 +110,7 @@ export declare const useLabelsGrid: ({ labelStatus, showShipmentIdFilter, showLa
110
110
  currentPageSize: number;
111
111
  onPageSelect: (page: number) => void;
112
112
  onPageSizeSelect: (pageSize: number) => void;
113
+ resetCurrentPage: () => void;
113
114
  };
114
115
  pagesAmount: number;
115
116
  pageSize: number;
@@ -87,17 +87,17 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & {
87
87
  rejected: string;
88
88
  dpdwallet: string;
89
89
  };
90
- refund_process: string;
90
+ refund_process: string; /**
91
+ * `features` provides optional feature configuration for the Element
92
+ * If no value is defined, default configuration will be used.
93
+ */
91
94
  refund_rules: string;
92
95
  resultTitles: {
93
96
  approved: string;
94
97
  rejected: string;
95
98
  };
96
99
  voidedOn: string;
97
- }; /**
98
- * `onClickExternalOrderId` is an optional callback function that will be invoked when the user clicks the id number within the
99
- * `External Order ID` column, if present.
100
- */
100
+ };
101
101
  "view-shipment": {
102
102
  title: string;
103
103
  actions: {
@@ -152,16 +152,18 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & {
152
152
  vatNumber: string;
153
153
  vatRegistrationTooltip: string;
154
154
  vatFormText: string;
155
- vatFormRegisterLater: string;
156
155
  vatNumberInputHint: string;
157
156
  vatNumberInputPlaceholder: string;
158
157
  verifiedVat: string;
158
+ vatNumberFieldLabel: string;
159
+ vatTypePlaceholder: string;
160
+ issuingAuthorityPlaceholder: string;
161
+ issuingAuthorityFieldLabel: string;
159
162
  vatFormErrors: {
160
163
  invalidFieldValue: string;
161
164
  verificationFailure: string;
162
165
  forbidden: string;
163
166
  connectionNotSupported: string;
164
- genericTitle: string;
165
167
  genericText: string;
166
168
  };
167
169
  };
@@ -212,6 +214,10 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & {
212
214
  error: {
213
215
  title: string;
214
216
  };
217
+ /**
218
+ * `onClickExternalOrderId` is an optional callback function that will be invoked when the user clicks the id number within the
219
+ * `External Order ID` column, if present.
220
+ */
215
221
  info: {
216
222
  description: string;
217
223
  };
@@ -222,6 +228,10 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & {
222
228
  carrier: {
223
229
  title: string;
224
230
  confirmAddress: string;
231
+ /**
232
+ * `onClickPrintForm` is an optional callback function that will be invoked when the user clicks the
233
+ * `Print Forms` button.
234
+ */
225
235
  description: string;
226
236
  };
227
237
  blackBox: {
@@ -318,12 +328,18 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & {
318
328
  };
319
329
  fields: {
320
330
  "requires-additional-handling": string;
321
- addOns: string;
331
+ addOns: string; /**
332
+ * `onClickPrintForm` is an optional callback function that will be invoked when the user clicks the
333
+ * `Print Forms` button.
334
+ */
322
335
  contentDescription: string;
323
336
  confirmation: string;
324
337
  dimensions: {
325
338
  length: string;
326
- width: string;
339
+ width: string; /**
340
+ * `onClickPrintLabel` is an optional callback function that will be invoked when the user clicks the
341
+ * `Print Label` button.
342
+ */
327
343
  height: string;
328
344
  };
329
345
  dimensionsGroup: string;
@@ -597,7 +613,10 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & {
597
613
  g: string;
598
614
  kg: string;
599
615
  };
600
- };
616
+ }; /**
617
+ * `features` provides optional feature configuration for the Element
618
+ * If no value is defined, default configuration will be used.
619
+ */
601
620
  };
602
621
  "list-shipments": {
603
622
  title: string;
@@ -633,7 +652,10 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & {
633
652
  title: string;
634
653
  subtitle: string;
635
654
  };
636
- };
655
+ }; /**
656
+ * `labelStatus` is the status of the labels you wish to view.
657
+ * If no value is defined, all labels will be rendered.
658
+ */
637
659
  "list-labels": {
638
660
  title: string;
639
661
  headers: {
@@ -671,10 +693,6 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & {
671
693
  error: string;
672
694
  };
673
695
  actions: {
674
- /**
675
- * `labelStatus` is the status of the labels you wish to view.
676
- * If no value is defined, all labels will be rendered.
677
- */
678
696
  title: string;
679
697
  print: string;
680
698
  void: string;
@@ -778,7 +796,10 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & {
778
796
  };
779
797
  billing: {
780
798
  fields: {
781
- differentBillingAddress: string;
799
+ differentBillingAddress: string; /**
800
+ * `onClickPrintLabel` is an optional callback function that will be invoked when the user clicks the
801
+ * `Print Label` button.
802
+ */
782
803
  name: string;
783
804
  cardNumber: string;
784
805
  expiration: string;
@@ -857,6 +878,7 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & {
857
878
  taxIssuingAuthority: string;
858
879
  entityType: string;
859
880
  };
881
+ hsCode: string;
860
882
  nonDelivery: {
861
883
  returnToSender: string;
862
884
  treatAsAbandoned: string;
@@ -894,6 +916,7 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & {
894
916
  shipments: string;
895
917
  warehouses: string;
896
918
  };
919
+ labelHasBeenPurchased: string;
897
920
  emailIsRequired: string;
898
921
  unknown: string;
899
922
  noRatesAvailable: string;
@@ -125,16 +125,18 @@ export declare const Element: ({ resources, ...props }: ShipEngineCarriersProps
125
125
  vatNumber: string;
126
126
  vatRegistrationTooltip: string;
127
127
  vatFormText: string;
128
- vatFormRegisterLater: string;
129
128
  vatNumberInputHint: string;
130
129
  vatNumberInputPlaceholder: string;
131
130
  verifiedVat: string;
131
+ vatNumberFieldLabel: string;
132
+ vatTypePlaceholder: string;
133
+ issuingAuthorityPlaceholder: string;
134
+ issuingAuthorityFieldLabel: string;
132
135
  vatFormErrors: {
133
136
  invalidFieldValue: string;
134
137
  verificationFailure: string;
135
138
  forbidden: string;
136
139
  connectionNotSupported: string;
137
- genericTitle: string;
138
140
  genericText: string;
139
141
  };
140
142
  };
@@ -870,6 +872,7 @@ export declare const Element: ({ resources, ...props }: ShipEngineCarriersProps
870
872
  taxIssuingAuthority: string;
871
873
  entityType: string;
872
874
  };
875
+ hsCode: string;
873
876
  nonDelivery: {
874
877
  returnToSender: string;
875
878
  treatAsAbandoned: string;
@@ -907,6 +910,7 @@ export declare const Element: ({ resources, ...props }: ShipEngineCarriersProps
907
910
  shipments: string;
908
911
  warehouses: string;
909
912
  };
913
+ labelHasBeenPurchased: string;
910
914
  emailIsRequired: string;
911
915
  unknown: string;
912
916
  noRatesAvailable: string;
@@ -147,16 +147,18 @@ export declare const Element: ({ resources, ...props }: ExternalCarriersProps &
147
147
  vatNumber: string;
148
148
  vatRegistrationTooltip: string;
149
149
  vatFormText: string;
150
- vatFormRegisterLater: string;
151
150
  vatNumberInputHint: string;
152
151
  vatNumberInputPlaceholder: string;
153
152
  verifiedVat: string;
153
+ vatNumberFieldLabel: string;
154
+ vatTypePlaceholder: string;
155
+ issuingAuthorityPlaceholder: string;
156
+ issuingAuthorityFieldLabel: string;
154
157
  vatFormErrors: {
155
158
  invalidFieldValue: string;
156
159
  verificationFailure: string;
157
160
  forbidden: string;
158
161
  connectionNotSupported: string;
159
- genericTitle: string;
160
162
  genericText: string;
161
163
  };
162
164
  };
@@ -870,6 +872,7 @@ export declare const Element: ({ resources, ...props }: ExternalCarriersProps &
870
872
  taxIssuingAuthority: string;
871
873
  entityType: string;
872
874
  };
875
+ hsCode: string;
873
876
  nonDelivery: {
874
877
  returnToSender: string;
875
878
  treatAsAbandoned: string;
@@ -907,6 +910,7 @@ export declare const Element: ({ resources, ...props }: ExternalCarriersProps &
907
910
  shipments: string;
908
911
  warehouses: string;
909
912
  };
913
+ labelHasBeenPurchased: string;
910
914
  emailIsRequired: string;
911
915
  unknown: string;
912
916
  noRatesAvailable: string;