@shipengine/elements 0.30.0 → 0.32.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.
package/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { jsxs, jsx, Fragment } from '@emotion/react/jsx-runtime';
1
+ import { jsx, jsxs, Fragment } from '@emotion/react/jsx-runtime';
2
2
  import { useTranslation, Trans } from 'react-i18next';
3
- import { Typography, Link, ButtonSize, Spinner, Icon, IconSize, Divider, Skeleton, SkeletonAnimation, SkeletonVariant, Grid, GridChild, InlineNotification, NotificationType, Pagination, SkeletonBackgroundColor, RadioGroup, Radio, SpinnerSize, FormField, FieldMessageType, Checkbox, Input, SelectAutocomplete, Select as Select$1, OptionGroup, Option, Button, Switch as Switch$1, Textarea, ChipList, Chip, ButtonVariant, ButtonColor, Tag, TagColor, Stepper, Step, Table, TableBody, TableBaseRow, TableBodyCell, TableHeader, TableHeaderCell, Popover, DropdownOptionList, DatePicker as DatePicker$1, BottomSheet } from '@packlink/giger';
4
- import alchemy, { SE, logger, useValidateAddresses, useListCarriers, useConnectCarrier, useListWarehouses, useUpdateWarehouse, useCreateWarehouse, useDeleteWarehouse, useGetWalletHistory, useGetAccountSettings, useUpdateAccountSettings, useAddFunds, useGetCarrierById, useUpdateFundingSource, useListFundingSources, useUpdateAutoFunding, useGetAutoFundingConfiguration, Currency, useCreateFundingSource, useRegisterCarrier, useUpdateSalesOrderShipment, useParseAddress, useListCustomPackageTypes, useCalculateRates, useGetShipmentRates, useListLabels, useCreateLabel, useListSalesOrderShipments, useCreateSalesOrderShipment, useListSalesOrders, useGetSalesOrder, useListOrderSources, useRefreshOrderSource, useCreateShipment, useGetShipment, useGetSalesOrderShipment, useGetLabel, useVoidLabel } from '@shipengine/alchemy';
3
+ import { InlineNotification, NotificationType, Typography, Link, ButtonSize, Spinner, Icon, IconSize, Divider, Skeleton, SkeletonAnimation, SkeletonVariant, Grid, GridChild, Pagination, SkeletonBackgroundColor, RadioGroup, Radio, SpinnerSize, FormField, FieldMessageType, Checkbox, Input, SelectAutocomplete, Select as Select$1, OptionGroup, Option, Button, Switch as Switch$1, Textarea, ChipList, Chip, ButtonVariant, ButtonColor, Tag, TagColor, Stepper, Step, Table, TableBody, TableBaseRow, TableBodyCell, TableHeader, TableHeaderCell, Popover, DropdownOptionList, DatePicker as DatePicker$1, BottomSheet } from '@packlink/giger';
4
+ import alchemy, { SE, logger, useValidateAddresses, useListCarriers, useConnectCarrier, useListWarehouses, useUpdateWarehouse, useCreateWarehouse, useDeleteWarehouse, useGetWalletHistory, useGetAccountSettings, useUpdateAccountSettings, useAddFunds, useGetCarrierById, useUpdateAutoFunding, useGetAutoFundingConfiguration, Currency, useUpdateFundingSource, useListFundingSources, useCreateFundingSource, useRegisterCarrier, useUpdateSalesOrderShipment, useParseAddress, useListCustomPackageTypes, useCalculateRates, useGetShipmentRates, useListLabels, useCreateLabel, useListSalesOrderShipments, useCreateSalesOrderShipment, useListSalesOrders, useGetSalesOrder, useListOrderSources, useRefreshOrderSource, useCreateShipment, useGetShipment, useGetSalesOrderShipment, useGetLabel, useVoidLabel } from '@shipengine/alchemy';
5
5
  import axios from 'axios';
6
6
  import { zodResolver } from '@hookform/resolvers/zod';
7
7
  import { z } from 'zod';
@@ -3840,44 +3840,56 @@ const getContainerStyles = theme => /*#__PURE__*/css({
3840
3840
  flexDirection: "column",
3841
3841
  height: "100%",
3842
3842
  paddingTop: theme.spacing(0.5),
3843
- width: "100%"
3844
- }, process.env.NODE_ENV === "production" ? "" : ";label:getContainerStyles;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInByZXNldC1kZXNjcmlwdG9yLnN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDNkMiLCJmaWxlIjoicHJlc2V0LWRlc2NyaXB0b3Iuc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSBcIkBlbW90aW9uL3JlYWN0XCI7XHJcbmV4cG9ydCBjb25zdCBnZXRDb250YWluZXJTdHlsZXMgPSAodGhlbWUpID0+IGNzcyh7XHJcbiAgICBkaXNwbGF5OiBcImZsZXhcIixcclxuICAgIGZsZXhEaXJlY3Rpb246IFwiY29sdW1uXCIsXHJcbiAgICBoZWlnaHQ6IFwiMTAwJVwiLFxyXG4gICAgcGFkZGluZ1RvcDogdGhlbWUuc3BhY2luZygwLjUpLFxyXG4gICAgd2lkdGg6IFwiMTAwJVwiLFxyXG59KTtcclxuZXhwb3J0IGNvbnN0IGdldERpbWVuc2lvblN0eWxlcyA9ICh0aGVtZSkgPT4gY3NzKHtcclxuICAgIGNvbG9yOiB0aGVtZS5wYWxldHRlLmdyYXkubWFpbixcclxuICAgIGZvbnRTaXplOiB0aGVtZS50eXBvZ3JhcGh5LmZvbnRTaXplLlhTLFxyXG59KTtcclxuZXhwb3J0IGNvbnN0IGdldFNlcnZpY2VOYW1lU3R5bGVzID0gKHRoZW1lKSA9PiBjc3Moe1xyXG4gICAgZm9udFNpemU6IHRoZW1lLnR5cG9ncmFwaHkuZm9udFNpemUuWFhTLFxyXG4gICAgbGluZUhlaWdodDogMCxcclxuICAgIHBhZGRpbmdUb3A6IHRoZW1lLnNwYWNpbmcoKSxcclxufSk7XHJcbmV4cG9ydCBjb25zdCBnZXRQcmVzZXROYW1lU3R5bGVzID0gKHRoZW1lKSA9PiBjc3Moe1xyXG4gICAgZm9udFNpemU6IHRoZW1lLnR5cG9ncmFwaHkuZm9udFNpemUuWFMsXHJcbiAgICBmb250V2VpZ2h0OiB0aGVtZS50eXBvZ3JhcGh5LmZvbnRXZWlnaHQuYm9sZCxcclxufSk7XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXByZXNldC1kZXNjcmlwdG9yLnN0eWxlcy5qcy5tYXAiXX0= */");
3843
+ width: "max-content"
3844
+ }, process.env.NODE_ENV === "production" ? "" : ";label:getContainerStyles;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInByZXNldC1kZXNjcmlwdG9yLnN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDNkMiLCJmaWxlIjoicHJlc2V0LWRlc2NyaXB0b3Iuc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSBcIkBlbW90aW9uL3JlYWN0XCI7XHJcbmV4cG9ydCBjb25zdCBnZXRDb250YWluZXJTdHlsZXMgPSAodGhlbWUpID0+IGNzcyh7XHJcbiAgICBkaXNwbGF5OiBcImZsZXhcIixcclxuICAgIGZsZXhEaXJlY3Rpb246IFwiY29sdW1uXCIsXHJcbiAgICBoZWlnaHQ6IFwiMTAwJVwiLFxyXG4gICAgcGFkZGluZ1RvcDogdGhlbWUuc3BhY2luZygwLjUpLFxyXG4gICAgd2lkdGg6IFwibWF4LWNvbnRlbnRcIixcclxufSk7XHJcbmV4cG9ydCBjb25zdCBnZXREaW1lbnNpb25TdHlsZXMgPSAodGhlbWUpID0+IGNzcyh7XHJcbiAgICBjb2xvcjogdGhlbWUucGFsZXR0ZS5ncmF5Lm1haW4sXHJcbiAgICBmb250U2l6ZTogdGhlbWUudHlwb2dyYXBoeS5mb250U2l6ZS5YUyxcclxufSk7XHJcbmV4cG9ydCBjb25zdCBnZXRTZXJ2aWNlTmFtZVN0eWxlcyA9ICh0aGVtZSkgPT4gY3NzKHtcclxuICAgIGZvbnRTaXplOiB0aGVtZS50eXBvZ3JhcGh5LmZvbnRTaXplLlhYUyxcclxuICAgIGxpbmVIZWlnaHQ6IDAsXHJcbiAgICBwYWRkaW5nVG9wOiB0aGVtZS5zcGFjaW5nKCksXHJcbn0pO1xyXG5leHBvcnQgY29uc3QgZ2V0UHJlc2V0TmFtZVN0eWxlcyA9ICh0aGVtZSkgPT4gY3NzKHtcclxuICAgIGZvbnRTaXplOiB0aGVtZS50eXBvZ3JhcGh5LmZvbnRTaXplLlhTLFxyXG4gICAgZm9udFdlaWdodDogdGhlbWUudHlwb2dyYXBoeS5mb250V2VpZ2h0LmJvbGQsXHJcbn0pO1xyXG5leHBvcnQgY29uc3QgZ2V0V2FybmluZ1N0eWxlcyA9ICh0aGVtZSkgPT4gY3NzKHtcclxuICAgIGJhY2tncm91bmQ6IFwibm9uZVwiLFxyXG4gICAgbWFyZ2luTGVmdDogXCJhdXRvXCIsXHJcbiAgICBtYXJnaW5SaWdodDogdGhlbWUuc3BhY2luZygtMyksXHJcbiAgICBtYXJnaW5Ub3A6IHRoZW1lLnNwYWNpbmcoLTUpLFxyXG4gICAgd2lkdGg6IHRoZW1lLnNwYWNpbmcoKSxcclxufSk7XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXByZXNldC1kZXNjcmlwdG9yLnN0eWxlcy5qcy5tYXAiXX0= */");
3845
3845
  const getDimensionStyles = theme => /*#__PURE__*/css({
3846
3846
  color: theme.palette.gray.main,
3847
3847
  fontSize: theme.typography.fontSize.XS
3848
- }, process.env.NODE_ENV === "production" ? "" : ";label:getDimensionStyles;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInByZXNldC1kZXNjcmlwdG9yLnN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFRNkMiLCJmaWxlIjoicHJlc2V0LWRlc2NyaXB0b3Iuc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSBcIkBlbW90aW9uL3JlYWN0XCI7XHJcbmV4cG9ydCBjb25zdCBnZXRDb250YWluZXJTdHlsZXMgPSAodGhlbWUpID0+IGNzcyh7XHJcbiAgICBkaXNwbGF5OiBcImZsZXhcIixcclxuICAgIGZsZXhEaXJlY3Rpb246IFwiY29sdW1uXCIsXHJcbiAgICBoZWlnaHQ6IFwiMTAwJVwiLFxyXG4gICAgcGFkZGluZ1RvcDogdGhlbWUuc3BhY2luZygwLjUpLFxyXG4gICAgd2lkdGg6IFwiMTAwJVwiLFxyXG59KTtcclxuZXhwb3J0IGNvbnN0IGdldERpbWVuc2lvblN0eWxlcyA9ICh0aGVtZSkgPT4gY3NzKHtcclxuICAgIGNvbG9yOiB0aGVtZS5wYWxldHRlLmdyYXkubWFpbixcclxuICAgIGZvbnRTaXplOiB0aGVtZS50eXBvZ3JhcGh5LmZvbnRTaXplLlhTLFxyXG59KTtcclxuZXhwb3J0IGNvbnN0IGdldFNlcnZpY2VOYW1lU3R5bGVzID0gKHRoZW1lKSA9PiBjc3Moe1xyXG4gICAgZm9udFNpemU6IHRoZW1lLnR5cG9ncmFwaHkuZm9udFNpemUuWFhTLFxyXG4gICAgbGluZUhlaWdodDogMCxcclxuICAgIHBhZGRpbmdUb3A6IHRoZW1lLnNwYWNpbmcoKSxcclxufSk7XHJcbmV4cG9ydCBjb25zdCBnZXRQcmVzZXROYW1lU3R5bGVzID0gKHRoZW1lKSA9PiBjc3Moe1xyXG4gICAgZm9udFNpemU6IHRoZW1lLnR5cG9ncmFwaHkuZm9udFNpemUuWFMsXHJcbiAgICBmb250V2VpZ2h0OiB0aGVtZS50eXBvZ3JhcGh5LmZvbnRXZWlnaHQuYm9sZCxcclxufSk7XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXByZXNldC1kZXNjcmlwdG9yLnN0eWxlcy5qcy5tYXAiXX0= */");
3848
+ }, process.env.NODE_ENV === "production" ? "" : ";label:getDimensionStyles;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInByZXNldC1kZXNjcmlwdG9yLnN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFRNkMiLCJmaWxlIjoicHJlc2V0LWRlc2NyaXB0b3Iuc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSBcIkBlbW90aW9uL3JlYWN0XCI7XHJcbmV4cG9ydCBjb25zdCBnZXRDb250YWluZXJTdHlsZXMgPSAodGhlbWUpID0+IGNzcyh7XHJcbiAgICBkaXNwbGF5OiBcImZsZXhcIixcclxuICAgIGZsZXhEaXJlY3Rpb246IFwiY29sdW1uXCIsXHJcbiAgICBoZWlnaHQ6IFwiMTAwJVwiLFxyXG4gICAgcGFkZGluZ1RvcDogdGhlbWUuc3BhY2luZygwLjUpLFxyXG4gICAgd2lkdGg6IFwibWF4LWNvbnRlbnRcIixcclxufSk7XHJcbmV4cG9ydCBjb25zdCBnZXREaW1lbnNpb25TdHlsZXMgPSAodGhlbWUpID0+IGNzcyh7XHJcbiAgICBjb2xvcjogdGhlbWUucGFsZXR0ZS5ncmF5Lm1haW4sXHJcbiAgICBmb250U2l6ZTogdGhlbWUudHlwb2dyYXBoeS5mb250U2l6ZS5YUyxcclxufSk7XHJcbmV4cG9ydCBjb25zdCBnZXRTZXJ2aWNlTmFtZVN0eWxlcyA9ICh0aGVtZSkgPT4gY3NzKHtcclxuICAgIGZvbnRTaXplOiB0aGVtZS50eXBvZ3JhcGh5LmZvbnRTaXplLlhYUyxcclxuICAgIGxpbmVIZWlnaHQ6IDAsXHJcbiAgICBwYWRkaW5nVG9wOiB0aGVtZS5zcGFjaW5nKCksXHJcbn0pO1xyXG5leHBvcnQgY29uc3QgZ2V0UHJlc2V0TmFtZVN0eWxlcyA9ICh0aGVtZSkgPT4gY3NzKHtcclxuICAgIGZvbnRTaXplOiB0aGVtZS50eXBvZ3JhcGh5LmZvbnRTaXplLlhTLFxyXG4gICAgZm9udFdlaWdodDogdGhlbWUudHlwb2dyYXBoeS5mb250V2VpZ2h0LmJvbGQsXHJcbn0pO1xyXG5leHBvcnQgY29uc3QgZ2V0V2FybmluZ1N0eWxlcyA9ICh0aGVtZSkgPT4gY3NzKHtcclxuICAgIGJhY2tncm91bmQ6IFwibm9uZVwiLFxyXG4gICAgbWFyZ2luTGVmdDogXCJhdXRvXCIsXHJcbiAgICBtYXJnaW5SaWdodDogdGhlbWUuc3BhY2luZygtMyksXHJcbiAgICBtYXJnaW5Ub3A6IHRoZW1lLnNwYWNpbmcoLTUpLFxyXG4gICAgd2lkdGg6IHRoZW1lLnNwYWNpbmcoKSxcclxufSk7XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXByZXNldC1kZXNjcmlwdG9yLnN0eWxlcy5qcy5tYXAiXX0= */");
3849
3849
  const getServiceNameStyles = theme => /*#__PURE__*/css({
3850
3850
  fontSize: theme.typography.fontSize.XXS,
3851
3851
  lineHeight: 0,
3852
3852
  paddingTop: theme.spacing()
3853
- }, process.env.NODE_ENV === "production" ? "" : ";label:getServiceNameStyles;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInByZXNldC1kZXNjcmlwdG9yLnN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFZK0MiLCJmaWxlIjoicHJlc2V0LWRlc2NyaXB0b3Iuc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSBcIkBlbW90aW9uL3JlYWN0XCI7XHJcbmV4cG9ydCBjb25zdCBnZXRDb250YWluZXJTdHlsZXMgPSAodGhlbWUpID0+IGNzcyh7XHJcbiAgICBkaXNwbGF5OiBcImZsZXhcIixcclxuICAgIGZsZXhEaXJlY3Rpb246IFwiY29sdW1uXCIsXHJcbiAgICBoZWlnaHQ6IFwiMTAwJVwiLFxyXG4gICAgcGFkZGluZ1RvcDogdGhlbWUuc3BhY2luZygwLjUpLFxyXG4gICAgd2lkdGg6IFwiMTAwJVwiLFxyXG59KTtcclxuZXhwb3J0IGNvbnN0IGdldERpbWVuc2lvblN0eWxlcyA9ICh0aGVtZSkgPT4gY3NzKHtcclxuICAgIGNvbG9yOiB0aGVtZS5wYWxldHRlLmdyYXkubWFpbixcclxuICAgIGZvbnRTaXplOiB0aGVtZS50eXBvZ3JhcGh5LmZvbnRTaXplLlhTLFxyXG59KTtcclxuZXhwb3J0IGNvbnN0IGdldFNlcnZpY2VOYW1lU3R5bGVzID0gKHRoZW1lKSA9PiBjc3Moe1xyXG4gICAgZm9udFNpemU6IHRoZW1lLnR5cG9ncmFwaHkuZm9udFNpemUuWFhTLFxyXG4gICAgbGluZUhlaWdodDogMCxcclxuICAgIHBhZGRpbmdUb3A6IHRoZW1lLnNwYWNpbmcoKSxcclxufSk7XHJcbmV4cG9ydCBjb25zdCBnZXRQcmVzZXROYW1lU3R5bGVzID0gKHRoZW1lKSA9PiBjc3Moe1xyXG4gICAgZm9udFNpemU6IHRoZW1lLnR5cG9ncmFwaHkuZm9udFNpemUuWFMsXHJcbiAgICBmb250V2VpZ2h0OiB0aGVtZS50eXBvZ3JhcGh5LmZvbnRXZWlnaHQuYm9sZCxcclxufSk7XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXByZXNldC1kZXNjcmlwdG9yLnN0eWxlcy5qcy5tYXAiXX0= */");
3853
+ }, process.env.NODE_ENV === "production" ? "" : ";label:getServiceNameStyles;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInByZXNldC1kZXNjcmlwdG9yLnN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFZK0MiLCJmaWxlIjoicHJlc2V0LWRlc2NyaXB0b3Iuc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSBcIkBlbW90aW9uL3JlYWN0XCI7XHJcbmV4cG9ydCBjb25zdCBnZXRDb250YWluZXJTdHlsZXMgPSAodGhlbWUpID0+IGNzcyh7XHJcbiAgICBkaXNwbGF5OiBcImZsZXhcIixcclxuICAgIGZsZXhEaXJlY3Rpb246IFwiY29sdW1uXCIsXHJcbiAgICBoZWlnaHQ6IFwiMTAwJVwiLFxyXG4gICAgcGFkZGluZ1RvcDogdGhlbWUuc3BhY2luZygwLjUpLFxyXG4gICAgd2lkdGg6IFwibWF4LWNvbnRlbnRcIixcclxufSk7XHJcbmV4cG9ydCBjb25zdCBnZXREaW1lbnNpb25TdHlsZXMgPSAodGhlbWUpID0+IGNzcyh7XHJcbiAgICBjb2xvcjogdGhlbWUucGFsZXR0ZS5ncmF5Lm1haW4sXHJcbiAgICBmb250U2l6ZTogdGhlbWUudHlwb2dyYXBoeS5mb250U2l6ZS5YUyxcclxufSk7XHJcbmV4cG9ydCBjb25zdCBnZXRTZXJ2aWNlTmFtZVN0eWxlcyA9ICh0aGVtZSkgPT4gY3NzKHtcclxuICAgIGZvbnRTaXplOiB0aGVtZS50eXBvZ3JhcGh5LmZvbnRTaXplLlhYUyxcclxuICAgIGxpbmVIZWlnaHQ6IDAsXHJcbiAgICBwYWRkaW5nVG9wOiB0aGVtZS5zcGFjaW5nKCksXHJcbn0pO1xyXG5leHBvcnQgY29uc3QgZ2V0UHJlc2V0TmFtZVN0eWxlcyA9ICh0aGVtZSkgPT4gY3NzKHtcclxuICAgIGZvbnRTaXplOiB0aGVtZS50eXBvZ3JhcGh5LmZvbnRTaXplLlhTLFxyXG4gICAgZm9udFdlaWdodDogdGhlbWUudHlwb2dyYXBoeS5mb250V2VpZ2h0LmJvbGQsXHJcbn0pO1xyXG5leHBvcnQgY29uc3QgZ2V0V2FybmluZ1N0eWxlcyA9ICh0aGVtZSkgPT4gY3NzKHtcclxuICAgIGJhY2tncm91bmQ6IFwibm9uZVwiLFxyXG4gICAgbWFyZ2luTGVmdDogXCJhdXRvXCIsXHJcbiAgICBtYXJnaW5SaWdodDogdGhlbWUuc3BhY2luZygtMyksXHJcbiAgICBtYXJnaW5Ub3A6IHRoZW1lLnNwYWNpbmcoLTUpLFxyXG4gICAgd2lkdGg6IHRoZW1lLnNwYWNpbmcoKSxcclxufSk7XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXByZXNldC1kZXNjcmlwdG9yLnN0eWxlcy5qcy5tYXAiXX0= */");
3854
3854
  const getPresetNameStyles = theme => /*#__PURE__*/css({
3855
3855
  fontSize: theme.typography.fontSize.XS,
3856
3856
  fontWeight: theme.typography.fontWeight.bold
3857
- }, process.env.NODE_ENV === "production" ? "" : ";label:getPresetNameStyles;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInByZXNldC1kZXNjcmlwdG9yLnN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpQjhDIiwiZmlsZSI6InByZXNldC1kZXNjcmlwdG9yLnN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gXCJAZW1vdGlvbi9yZWFjdFwiO1xyXG5leHBvcnQgY29uc3QgZ2V0Q29udGFpbmVyU3R5bGVzID0gKHRoZW1lKSA9PiBjc3Moe1xyXG4gICAgZGlzcGxheTogXCJmbGV4XCIsXHJcbiAgICBmbGV4RGlyZWN0aW9uOiBcImNvbHVtblwiLFxyXG4gICAgaGVpZ2h0OiBcIjEwMCVcIixcclxuICAgIHBhZGRpbmdUb3A6IHRoZW1lLnNwYWNpbmcoMC41KSxcclxuICAgIHdpZHRoOiBcIjEwMCVcIixcclxufSk7XHJcbmV4cG9ydCBjb25zdCBnZXREaW1lbnNpb25TdHlsZXMgPSAodGhlbWUpID0+IGNzcyh7XHJcbiAgICBjb2xvcjogdGhlbWUucGFsZXR0ZS5ncmF5Lm1haW4sXHJcbiAgICBmb250U2l6ZTogdGhlbWUudHlwb2dyYXBoeS5mb250U2l6ZS5YUyxcclxufSk7XHJcbmV4cG9ydCBjb25zdCBnZXRTZXJ2aWNlTmFtZVN0eWxlcyA9ICh0aGVtZSkgPT4gY3NzKHtcclxuICAgIGZvbnRTaXplOiB0aGVtZS50eXBvZ3JhcGh5LmZvbnRTaXplLlhYUyxcclxuICAgIGxpbmVIZWlnaHQ6IDAsXHJcbiAgICBwYWRkaW5nVG9wOiB0aGVtZS5zcGFjaW5nKCksXHJcbn0pO1xyXG5leHBvcnQgY29uc3QgZ2V0UHJlc2V0TmFtZVN0eWxlcyA9ICh0aGVtZSkgPT4gY3NzKHtcclxuICAgIGZvbnRTaXplOiB0aGVtZS50eXBvZ3JhcGh5LmZvbnRTaXplLlhTLFxyXG4gICAgZm9udFdlaWdodDogdGhlbWUudHlwb2dyYXBoeS5mb250V2VpZ2h0LmJvbGQsXHJcbn0pO1xyXG4vLyMgc291cmNlTWFwcGluZ1VSTD1wcmVzZXQtZGVzY3JpcHRvci5zdHlsZXMuanMubWFwIl19 */");
3858
-
3859
- const PresetDescriptor = preset => jsxs("div", Object.assign({
3857
+ }, process.env.NODE_ENV === "production" ? "" : ";label:getPresetNameStyles;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInByZXNldC1kZXNjcmlwdG9yLnN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpQjhDIiwiZmlsZSI6InByZXNldC1kZXNjcmlwdG9yLnN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gXCJAZW1vdGlvbi9yZWFjdFwiO1xyXG5leHBvcnQgY29uc3QgZ2V0Q29udGFpbmVyU3R5bGVzID0gKHRoZW1lKSA9PiBjc3Moe1xyXG4gICAgZGlzcGxheTogXCJmbGV4XCIsXHJcbiAgICBmbGV4RGlyZWN0aW9uOiBcImNvbHVtblwiLFxyXG4gICAgaGVpZ2h0OiBcIjEwMCVcIixcclxuICAgIHBhZGRpbmdUb3A6IHRoZW1lLnNwYWNpbmcoMC41KSxcclxuICAgIHdpZHRoOiBcIm1heC1jb250ZW50XCIsXHJcbn0pO1xyXG5leHBvcnQgY29uc3QgZ2V0RGltZW5zaW9uU3R5bGVzID0gKHRoZW1lKSA9PiBjc3Moe1xyXG4gICAgY29sb3I6IHRoZW1lLnBhbGV0dGUuZ3JheS5tYWluLFxyXG4gICAgZm9udFNpemU6IHRoZW1lLnR5cG9ncmFwaHkuZm9udFNpemUuWFMsXHJcbn0pO1xyXG5leHBvcnQgY29uc3QgZ2V0U2VydmljZU5hbWVTdHlsZXMgPSAodGhlbWUpID0+IGNzcyh7XHJcbiAgICBmb250U2l6ZTogdGhlbWUudHlwb2dyYXBoeS5mb250U2l6ZS5YWFMsXHJcbiAgICBsaW5lSGVpZ2h0OiAwLFxyXG4gICAgcGFkZGluZ1RvcDogdGhlbWUuc3BhY2luZygpLFxyXG59KTtcclxuZXhwb3J0IGNvbnN0IGdldFByZXNldE5hbWVTdHlsZXMgPSAodGhlbWUpID0+IGNzcyh7XHJcbiAgICBmb250U2l6ZTogdGhlbWUudHlwb2dyYXBoeS5mb250U2l6ZS5YUyxcclxuICAgIGZvbnRXZWlnaHQ6IHRoZW1lLnR5cG9ncmFwaHkuZm9udFdlaWdodC5ib2xkLFxyXG59KTtcclxuZXhwb3J0IGNvbnN0IGdldFdhcm5pbmdTdHlsZXMgPSAodGhlbWUpID0+IGNzcyh7XHJcbiAgICBiYWNrZ3JvdW5kOiBcIm5vbmVcIixcclxuICAgIG1hcmdpbkxlZnQ6IFwiYXV0b1wiLFxyXG4gICAgbWFyZ2luUmlnaHQ6IHRoZW1lLnNwYWNpbmcoLTMpLFxyXG4gICAgbWFyZ2luVG9wOiB0aGVtZS5zcGFjaW5nKC01KSxcclxuICAgIHdpZHRoOiB0aGVtZS5zcGFjaW5nKCksXHJcbn0pO1xyXG4vLyMgc291cmNlTWFwcGluZ1VSTD1wcmVzZXQtZGVzY3JpcHRvci5zdHlsZXMuanMubWFwIl19 */");
3858
+ const getWarningStyles = theme => /*#__PURE__*/css({
3859
+ background: "none",
3860
+ marginLeft: "auto",
3861
+ marginRight: theme.spacing(-3),
3862
+ marginTop: theme.spacing(-5),
3863
+ width: theme.spacing()
3864
+ }, process.env.NODE_ENV === "production" ? "" : ";label:getWarningStyles;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInByZXNldC1kZXNjcmlwdG9yLnN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFxQjJDIiwiZmlsZSI6InByZXNldC1kZXNjcmlwdG9yLnN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gXCJAZW1vdGlvbi9yZWFjdFwiO1xyXG5leHBvcnQgY29uc3QgZ2V0Q29udGFpbmVyU3R5bGVzID0gKHRoZW1lKSA9PiBjc3Moe1xyXG4gICAgZGlzcGxheTogXCJmbGV4XCIsXHJcbiAgICBmbGV4RGlyZWN0aW9uOiBcImNvbHVtblwiLFxyXG4gICAgaGVpZ2h0OiBcIjEwMCVcIixcclxuICAgIHBhZGRpbmdUb3A6IHRoZW1lLnNwYWNpbmcoMC41KSxcclxuICAgIHdpZHRoOiBcIm1heC1jb250ZW50XCIsXHJcbn0pO1xyXG5leHBvcnQgY29uc3QgZ2V0RGltZW5zaW9uU3R5bGVzID0gKHRoZW1lKSA9PiBjc3Moe1xyXG4gICAgY29sb3I6IHRoZW1lLnBhbGV0dGUuZ3JheS5tYWluLFxyXG4gICAgZm9udFNpemU6IHRoZW1lLnR5cG9ncmFwaHkuZm9udFNpemUuWFMsXHJcbn0pO1xyXG5leHBvcnQgY29uc3QgZ2V0U2VydmljZU5hbWVTdHlsZXMgPSAodGhlbWUpID0+IGNzcyh7XHJcbiAgICBmb250U2l6ZTogdGhlbWUudHlwb2dyYXBoeS5mb250U2l6ZS5YWFMsXHJcbiAgICBsaW5lSGVpZ2h0OiAwLFxyXG4gICAgcGFkZGluZ1RvcDogdGhlbWUuc3BhY2luZygpLFxyXG59KTtcclxuZXhwb3J0IGNvbnN0IGdldFByZXNldE5hbWVTdHlsZXMgPSAodGhlbWUpID0+IGNzcyh7XHJcbiAgICBmb250U2l6ZTogdGhlbWUudHlwb2dyYXBoeS5mb250U2l6ZS5YUyxcclxuICAgIGZvbnRXZWlnaHQ6IHRoZW1lLnR5cG9ncmFwaHkuZm9udFdlaWdodC5ib2xkLFxyXG59KTtcclxuZXhwb3J0IGNvbnN0IGdldFdhcm5pbmdTdHlsZXMgPSAodGhlbWUpID0+IGNzcyh7XHJcbiAgICBiYWNrZ3JvdW5kOiBcIm5vbmVcIixcclxuICAgIG1hcmdpbkxlZnQ6IFwiYXV0b1wiLFxyXG4gICAgbWFyZ2luUmlnaHQ6IHRoZW1lLnNwYWNpbmcoLTMpLFxyXG4gICAgbWFyZ2luVG9wOiB0aGVtZS5zcGFjaW5nKC01KSxcclxuICAgIHdpZHRoOiB0aGVtZS5zcGFjaW5nKCksXHJcbn0pO1xyXG4vLyMgc291cmNlTWFwcGluZ1VSTD1wcmVzZXQtZGVzY3JpcHRvci5zdHlsZXMuanMubWFwIl19 */");
3865
+
3866
+ const PresetDescriptor = preset => jsx("div", Object.assign({
3860
3867
  css: getContainerStyles
3861
3868
  }, {
3862
- children: [jsxs("div", {
3863
- children: [jsx("span", Object.assign({
3864
- css: getPresetNameStyles
3865
- }, {
3866
- children: preset.name
3867
- })), jsx("span", Object.assign({
3868
- css: getDimensionStyles
3869
- }, {
3870
- children: (preset.dimensions || preset.weight) && " - "
3871
- })), preset.dimensions && jsxs("span", Object.assign({
3872
- css: getDimensionStyles
3869
+ children: jsxs("div", {
3870
+ children: [jsxs("div", {
3871
+ children: [jsx("span", Object.assign({
3872
+ css: getPresetNameStyles
3873
+ }, {
3874
+ children: preset.name
3875
+ })), jsx("span", Object.assign({
3876
+ css: getDimensionStyles
3877
+ }, {
3878
+ children: (preset.dimensions || preset.weight) && " - "
3879
+ })), preset.dimensions && jsxs("span", Object.assign({
3880
+ css: getDimensionStyles
3881
+ }, {
3882
+ children: [preset.dimensions.length, "x", preset.dimensions.height, "x", preset.dimensions.width]
3883
+ }))]
3884
+ }), jsx("div", Object.assign({
3885
+ css: getServiceNameStyles
3873
3886
  }, {
3874
- children: [preset.dimensions.length, "x", preset.dimensions.height, "x", preset.dimensions.width]
3875
- }))]
3876
- }), jsx("div", Object.assign({
3877
- css: getServiceNameStyles
3878
- }, {
3879
- children: preset.serviceName && preset.serviceName
3880
- }))]
3887
+ children: preset.serviceName && preset.serviceName
3888
+ })), preset.serviceName && ["USPS Parcel Select Ground", "USPS First Class Mail"].includes(preset.serviceName) && jsx(InlineNotification, {
3889
+ css: getWarningStyles,
3890
+ type: NotificationType.ALERT
3891
+ })]
3892
+ })
3881
3893
  }));
3882
3894
 
3883
3895
  const createCategoryFromShippingPresets = (categoryName, presets) => presets ? [{
@@ -3928,7 +3940,7 @@ var _carrierMetadata = [
3928
3940
  ],
3929
3941
  shortname: "DHL",
3930
3942
  terms: {
3931
- title: "DHL Agreements",
3943
+ title: "DHL Express Agreement",
3932
3944
  content: [
3933
3945
  ],
3934
3946
  links: [
@@ -8763,7 +8775,209 @@ const AddFundsForm = ({
8763
8775
  });
8764
8776
  };
8765
8777
 
8766
- const styles$n = isLabelRight => createStyles({
8778
+ const styles$n = createStyles({
8779
+ edit: theme => ({
8780
+ color: theme.palette.primary.main,
8781
+ padding: `0 ${theme.spacing(2)}`
8782
+ }),
8783
+ getForm: showForm => theme => ({
8784
+ backgroundColor: theme.palette.gray.megaLight,
8785
+ display: showForm ? "flex" : "none",
8786
+ flexDirection: "column",
8787
+ padding: theme.spacing(2)
8788
+ }),
8789
+ input: theme => ({
8790
+ width: theme.spacing(13)
8791
+ }),
8792
+ marginLeft: {
8793
+ marginLeft: "auto"
8794
+ }
8795
+ });
8796
+
8797
+ const autoFundingSchema = z.object({
8798
+ isEnabled: z.boolean(),
8799
+ lowBalancePurchaseThreshold: moneySchema.extend({
8800
+ amount: z.number().min(10)
8801
+ }),
8802
+ maximumPurchasesPerDay: z.number().min(1),
8803
+ purchaseAmount: moneySchema.extend({
8804
+ amount: z.number().min(10).max(10000)
8805
+ })
8806
+ });
8807
+
8808
+ /**
8809
+ * This form that allows users to enable or disable auto funding, and
8810
+ * configure auto funding rules in ShipEngine API.
8811
+ *
8812
+ * @param carrierId The carrierId of the carrier provider you wish to configure auto-funding rules for.
8813
+ */
8814
+ const AutoFundingForm = ({
8815
+ carrierId
8816
+ }) => {
8817
+ const {
8818
+ t
8819
+ } = useTranslation();
8820
+ const updateAutoFunding = useUpdateAutoFunding(carrierId);
8821
+ const autoFundingConfiguration = useGetAutoFundingConfiguration(carrierId);
8822
+ const {
8823
+ data: autoFundingSettings
8824
+ } = autoFundingConfiguration;
8825
+ const [showForm, setShowForm] = useState(false);
8826
+ const [isSwitchOn, setIsSwitchOn] = useState(false);
8827
+ const form = useForm({
8828
+ resolver: validationResolver(autoFundingSchema)
8829
+ });
8830
+ const watchIsEnabled = form.watch("isEnabled");
8831
+ const formReset = isEnabled => form.reset(values => Object.assign(Object.assign({}, values), {
8832
+ isEnabled
8833
+ }), {
8834
+ keepDirty: true
8835
+ });
8836
+ const handleSubmit = formLogger.capture(form.handleSubmit(values => {
8837
+ setShowForm(prev => !prev);
8838
+ setIsSwitchOn(true);
8839
+ const payload = values;
8840
+ updateAutoFunding.mutate(payload, {
8841
+ onSuccess: () => autoFundingConfiguration.refetch()
8842
+ });
8843
+ }));
8844
+ /**
8845
+ * This function toggles the form visibility and conditionally disables auto-funding
8846
+ * when falsy. This is because when someone toggles the enable auto-funding switch
8847
+ * off, they do not want to have auto-funding enabled at all.
8848
+ */
8849
+ const handleToggle = isEnabled => {
8850
+ setIsSwitchOn(isEnabled);
8851
+ setShowForm(isEnabled);
8852
+ formReset(isEnabled);
8853
+ if (!isEnabled) {
8854
+ setIsSwitchOn(isEnabled);
8855
+ updateAutoFunding.mutate(form.getValues(), {
8856
+ onSuccess: () => autoFundingConfiguration.refetch()
8857
+ });
8858
+ }
8859
+ };
8860
+ if (autoFundingConfiguration.isLoading || updateAutoFunding.isLoading) return jsx(Loader, {
8861
+ message: t("manage-funding:autoFunding.isLoading")
8862
+ });
8863
+ if (!autoFundingSettings) throw new Error(t("errorMessages:unableToLoad.autoFundingSettings"));
8864
+ return jsxs(Fragment, {
8865
+ children: [jsxs(Spread, {
8866
+ children: [jsx(Typography, Object.assign({
8867
+ bold: !!(autoFundingSettings === null || autoFundingSettings === void 0 ? void 0 : autoFundingSettings.isAutoPurchaseEnabled),
8868
+ variant: "body1"
8869
+ }, {
8870
+ children: t("manage-funding:autoFunding:isEnabledCTA")
8871
+ })), jsx(Switch, {
8872
+ "data-testid": "auto-funding-toggle",
8873
+ defaultChecked: isSwitchOn,
8874
+ name: "isEnabled",
8875
+ onChange: e => handleToggle(e.target.checked),
8876
+ value: isSwitchOn
8877
+ })]
8878
+ }), jsx(Spacer, {
8879
+ multiplier: 1
8880
+ }), !!(autoFundingSettings === null || autoFundingSettings === void 0 ? void 0 : autoFundingSettings.isAutoPurchaseEnabled) && !showForm && jsxs(Spread, {
8881
+ children: [jsx(Typography, Object.assign({
8882
+ variant: "body1"
8883
+ }, {
8884
+ children: t("manage-funding:autoFunding.readSettings", Object.assign({}, autoFundingSettings))
8885
+ })), jsx(LinkAction, {
8886
+ css: styles$n.edit,
8887
+ onClick: () => handleToggle(true),
8888
+ title: t("manage-funding:autoFunding:edit")
8889
+ })]
8890
+ }), jsxs("form", Object.assign({
8891
+ css: styles$n.getForm(showForm),
8892
+ "data-testid": "auto-funding-form",
8893
+ id: "auto-funding-form",
8894
+ onSubmit: handleSubmit
8895
+ }, {
8896
+ children: [jsx(Typography, Object.assign({
8897
+ bold: true,
8898
+ variant: "body1"
8899
+ }, {
8900
+ children: t("manage-funding:autoFunding:editSettings")
8901
+ })), jsx("div", Object.assign({
8902
+ css: styles$n.marginLeft
8903
+ }, {
8904
+ children: jsx(MoneyInput, {
8905
+ control: form.control,
8906
+ css: styles$n.input,
8907
+ "data-testid": "auto-funding-threshold-input",
8908
+ defaultValue: {
8909
+ amount: autoFundingSettings === null || autoFundingSettings === void 0 ? void 0 : autoFundingSettings.autoPurchaseThreshold,
8910
+ currency: Currency.USD
8911
+ },
8912
+ disabled: !watchIsEnabled,
8913
+ label: t("manage-funding:autoFunding.lowBalancePurchaseThreshold"),
8914
+ labelWeight: "normal",
8915
+ name: "lowBalancePurchaseThreshold",
8916
+ showCurrencySymbol: true
8917
+ })
8918
+ })), jsx("div", Object.assign({
8919
+ css: styles$n.marginLeft
8920
+ }, {
8921
+ children: jsx(MoneyInput, {
8922
+ control: form.control,
8923
+ css: styles$n.input,
8924
+ "data-testid": "auto-funding-purchase-amount-input",
8925
+ defaultValue: {
8926
+ amount: autoFundingSettings === null || autoFundingSettings === void 0 ? void 0 : autoFundingSettings.autoPurchaseAmount,
8927
+ currency: Currency.USD
8928
+ },
8929
+ disabled: !watchIsEnabled,
8930
+ label: t("manage-funding:autoFunding.purchaseAmount"),
8931
+ labelWeight: "normal",
8932
+ name: "purchaseAmount",
8933
+ showCurrencySymbol: true
8934
+ })
8935
+ })), jsx("div", Object.assign({
8936
+ css: styles$n.marginLeft
8937
+ }, {
8938
+ children: jsx(NumberInput, {
8939
+ control: form.control,
8940
+ css: styles$n.input,
8941
+ "data-testid": "auto-funding-max-per-day-input",
8942
+ defaultValue: autoFundingSettings === null || autoFundingSettings === void 0 ? void 0 : autoFundingSettings.autoPurchaseCutoff,
8943
+ disabled: !watchIsEnabled,
8944
+ isInteger: true,
8945
+ label: t("manage-funding:autoFunding.maximumPurchasesPerDay"),
8946
+ labelWeight: "normal",
8947
+ name: "maximumPurchasesPerDay"
8948
+ })
8949
+ })), jsxs(ButtonGroup, Object.assign({
8950
+ justify: "end"
8951
+ }, {
8952
+ children: [jsx(Button, Object.assign({
8953
+ onClick: isSwitchOn ? () => setShowForm(false) : () => handleToggle(false),
8954
+ variant: ButtonVariant.TEXT
8955
+ }, {
8956
+ children: t("actions.cancel")
8957
+ })), jsx(SubmitButton, Object.assign({
8958
+ control: form.control,
8959
+ "data-testid": "submit-auto-funding",
8960
+ disabled: !watchIsEnabled,
8961
+ requireDirty: true,
8962
+ variant: ButtonVariant.OUTLINED
8963
+ }, {
8964
+ children: t("manage-funding:actions.saveRule")
8965
+ }))]
8966
+ }))]
8967
+ })), autoFundingConfiguration.error && jsxs(Fragment, {
8968
+ children: [jsx(Spacer, {
8969
+ multiplier: 1
8970
+ }), jsx(InlineNotification, Object.assign({
8971
+ title: t("manage-funding:autoFunding.error.title"),
8972
+ type: NotificationType.ERROR
8973
+ }, {
8974
+ children: autoFundingConfiguration.error[0].message
8975
+ }))]
8976
+ })]
8977
+ });
8978
+ };
8979
+
8980
+ const styles$m = isLabelRight => createStyles({
8767
8981
  inlineContainer: theme => ({
8768
8982
  alignItems: "center",
8769
8983
  display: "flex",
@@ -8778,14 +8992,14 @@ const InlineLabel = ({
8778
8992
  isLabelRight,
8779
8993
  labelProps: _labelProps = {}
8780
8994
  }) => jsxs("div", Object.assign({
8781
- css: styles$n(isLabelRight).inlineContainer
8995
+ css: styles$m(isLabelRight).inlineContainer
8782
8996
  }, {
8783
8997
  children: [jsx(Typography, Object.assign({}, _labelProps, {
8784
8998
  children: label
8785
8999
  })), children]
8786
9000
  }));
8787
9001
 
8788
- const styles$m = createStyles({
9002
+ const styles$l = createStyles({
8789
9003
  getBalanceText: balance => theme => ({
8790
9004
  color: balance === undefined ? theme.palette.alert.main : balance >= 0 ? theme.palette.secondary.dark : theme.palette.error.main
8791
9005
  })
@@ -8810,7 +9024,7 @@ const CarrierBalance = ({
8810
9024
  }, {
8811
9025
  children: isLoadingCarrier || isRefetchingCarrier ? jsx(Spinner, {}) : jsx(Typography, Object.assign({
8812
9026
  bold: true,
8813
- css: styles$m.getBalanceText(carrierBalance)
9027
+ css: styles$l.getBalanceText(carrierBalance)
8814
9028
  }, {
8815
9029
  children: carrierBalance === undefined ? t("manage-funding:errors.balanceUnknown") : formatMoney({
8816
9030
  amount: carrierBalance,
@@ -8863,6 +9077,8 @@ const ManageFunding = ({
8863
9077
  })]
8864
9078
  }), jsx(Spacer, {
8865
9079
  multiplier: 2
9080
+ }), jsx(AutoFundingForm, {
9081
+ carrierId: carrierId
8866
9082
  })]
8867
9083
  })
8868
9084
  }));
@@ -8873,10 +9089,12 @@ const addressParserSchema = z.object({
8873
9089
  });
8874
9090
 
8875
9091
  const AddressParser = ({
9092
+ errors: parseErrors,
8876
9093
  formId,
8877
9094
  onCancel,
8878
9095
  onSubmit,
8879
- portalRef
9096
+ portalRef,
9097
+ reset
8880
9098
  }) => {
8881
9099
  const {
8882
9100
  t
@@ -8888,20 +9106,26 @@ const AddressParser = ({
8888
9106
  const payload = values;
8889
9107
  onSubmit(payload);
8890
9108
  }));
9109
+ const errors = (parseErrors === null || parseErrors === void 0 ? void 0 : parseErrors.length) ? [t("errorMessages.parsingFailure")] : undefined;
8891
9110
  const formInterface = jsxs(Fragment, {
8892
9111
  children: [jsx(TextArea, {
8893
9112
  control: form.control,
9113
+ errors: errors,
8894
9114
  form: formId,
8895
9115
  label: t("address.parserFields.fullAddress"),
8896
9116
  labelWeight: "normal",
8897
9117
  name: "fullAddress",
9118
+ nativeLabel: true,
8898
9119
  rows: 4
8899
9120
  }), jsxs(ButtonGroup, Object.assign({
8900
9121
  justify: "end"
8901
9122
  }, {
8902
9123
  children: [onCancel && jsx(Button, Object.assign({
8903
9124
  bold: false,
8904
- onClick: onCancel,
9125
+ onClick: () => {
9126
+ onCancel();
9127
+ reset && reset();
9128
+ },
8905
9129
  type: "button",
8906
9130
  variant: ButtonVariant.TEXT
8907
9131
  }, {
@@ -8928,7 +9152,7 @@ const AddressParser = ({
8928
9152
  }));
8929
9153
  };
8930
9154
 
8931
- const styles$l = createStyles({
9155
+ const styles$k = createStyles({
8932
9156
  grow: {
8933
9157
  flexGrow: 1
8934
9158
  },
@@ -8989,6 +9213,22 @@ const AddressFields = ({
8989
9213
  labelWeight: "normal",
8990
9214
  name: _formatFieldName("companyName"),
8991
9215
  nativeLabel: true
9216
+ }), jsx(SelectAutoComplete, {
9217
+ control: form.control,
9218
+ form: formId,
9219
+ label: t("address.fields.countryCode"),
9220
+ labelWeight: "normal",
9221
+ name: _formatFieldName("countryCode"),
9222
+ nativeLabel: true,
9223
+ noResultsLabel: t("address.noResults"),
9224
+ onChange: value => {
9225
+ if (value) {
9226
+ form.setValue(_formatFieldName("stateProvince"), null, {
9227
+ shouldValidate: isSubmitted
9228
+ });
9229
+ }
9230
+ },
9231
+ options: countryCodeOptions
8992
9232
  }), jsx(TextInput, {
8993
9233
  control: form.control,
8994
9234
  form: formId,
@@ -9011,30 +9251,14 @@ const AddressFields = ({
9011
9251
  labelWeight: "normal",
9012
9252
  name: _formatFieldName("cityLocality"),
9013
9253
  nativeLabel: true
9014
- }), jsx(SelectAutoComplete, {
9015
- control: form.control,
9016
- form: formId,
9017
- label: t("address.fields.countryCode"),
9018
- labelWeight: "normal",
9019
- name: _formatFieldName("countryCode"),
9020
- nativeLabel: true,
9021
- noResultsLabel: t("address.noResults"),
9022
- onChange: value => {
9023
- if (value) {
9024
- form.setValue(_formatFieldName("stateProvince"), null, {
9025
- shouldValidate: isSubmitted
9026
- });
9027
- }
9028
- },
9029
- options: countryCodeOptions
9030
9254
  }), jsxs("div", Object.assign({
9031
- css: styles$l.stateZipWrapper
9255
+ css: styles$k.stateZipWrapper
9032
9256
  }, {
9033
9257
  children: [jsx("div", Object.assign({
9034
- css: styles$l.stateWrapper
9258
+ css: styles$k.stateWrapper
9035
9259
  }, {
9036
9260
  children: jsx("div", Object.assign({
9037
- css: styles$l.grow
9261
+ css: styles$k.grow
9038
9262
  }, {
9039
9263
  children: watchCountryCode === "US" ?
9040
9264
  // Domestic States
@@ -9059,10 +9283,10 @@ const AddressFields = ({
9059
9283
  })
9060
9284
  }))
9061
9285
  })), jsx("div", Object.assign({
9062
- css: styles$l.zipWrapper
9286
+ css: styles$k.zipWrapper
9063
9287
  }, {
9064
9288
  children: jsx("div", Object.assign({
9065
- css: styles$l.grow
9289
+ css: styles$k.grow
9066
9290
  }, {
9067
9291
  children: jsx(TextInput, {
9068
9292
  control: form.control,
@@ -9195,7 +9419,9 @@ const AddressForm = ({
9195
9419
  onCancelParse,
9196
9420
  onSubmit,
9197
9421
  onSubmitParse,
9198
- portalRef
9422
+ parseAddressErrors,
9423
+ portalRef,
9424
+ resetParseAddress
9199
9425
  }) => {
9200
9426
  const {
9201
9427
  t
@@ -9218,9 +9444,11 @@ const AddressForm = ({
9218
9444
  });
9219
9445
  }), [form, onSubmitParse]);
9220
9446
  const [addressParser, isAddressParserOpen, toggleIsAddressParserOpen] = useNestedForm(AddressParser, {
9447
+ errors: parseAddressErrors,
9221
9448
  formId: `${formId !== null && formId !== void 0 ? formId : ""}-address-parser`,
9222
9449
  onCancel: onCancelParse,
9223
- onSubmit: handleSubmitParse
9450
+ onSubmit: handleSubmitParse,
9451
+ reset: resetParseAddress
9224
9452
  });
9225
9453
  const formInterface = jsxs("div", Object.assign({
9226
9454
  css: theme => ({
@@ -9853,7 +10081,7 @@ const EditWalletAddressForm = ({
9853
10081
  }));
9854
10082
  };
9855
10083
 
9856
- const styles$k = createStyles({
10084
+ const styles$j = createStyles({
9857
10085
  grid: theme => ({
9858
10086
  margin: theme.spacing(4)
9859
10087
  })
@@ -9915,7 +10143,7 @@ const WalletForm = ({
9915
10143
  onSubmit: formLogger.capture(handleSubmit)
9916
10144
  }, {
9917
10145
  children: jsxs(Grid, Object.assign({
9918
- css: styles$k.grid,
10146
+ css: styles$j.grid,
9919
10147
  noPadding: true
9920
10148
  }, {
9921
10149
  children: [jsx(GridChild, Object.assign({
@@ -9997,7 +10225,7 @@ const WalletForm = ({
9997
10225
  }));
9998
10226
  };
9999
10227
 
10000
- const styles$j = createStyles({
10228
+ const styles$i = createStyles({
10001
10229
  boldLink: theme => ({
10002
10230
  fontWeight: theme.typography.fontWeight.bold
10003
10231
  }),
@@ -10039,11 +10267,11 @@ const EditBillingForm = ({
10039
10267
  onSubmit: formLogger.capture(handleSubmit)
10040
10268
  }, {
10041
10269
  children: jsxs(Grid, Object.assign({
10042
- css: styles$j.container
10270
+ css: styles$i.container
10043
10271
  }, {
10044
10272
  children: [jsx(GridChild, Object.assign({
10045
10273
  colSpan: 12,
10046
- css: styles$j.subtitle
10274
+ css: styles$i.subtitle
10047
10275
  }, {
10048
10276
  children: jsx(Typography, Object.assign({
10049
10277
  variant: "subtitle1"
@@ -10058,7 +10286,7 @@ const EditBillingForm = ({
10058
10286
  })
10059
10287
  })), jsx(GridChild, Object.assign({
10060
10288
  colSpan: 12,
10061
- css: styles$j.subtitle
10289
+ css: styles$i.subtitle
10062
10290
  }, {
10063
10291
  children: jsx(Typography, Object.assign({
10064
10292
  variant: "subtitle1"
@@ -10094,7 +10322,7 @@ const EditBillingForm = ({
10094
10322
  children: t("actions.cancel")
10095
10323
  })), jsx(SubmitButton, Object.assign({
10096
10324
  control: form.control,
10097
- css: styles$j.boldLink,
10325
+ css: styles$i.boldLink,
10098
10326
  variant: ButtonVariant.OUTLINED
10099
10327
  }, {
10100
10328
  children: t("actions.save")
@@ -10113,7 +10341,7 @@ var img$1 = "data:image/svg+xml,%3csvg width='150' height='96' viewBox='0 0 150
10113
10341
 
10114
10342
  var img = "data:image/svg+xml,%3csvg width='150' height='96' viewBox='0 0 150 96' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cg clip-path='url(%23clip0_5173_115335)'%3e%3cpath d='M7.69231 0H142.308C146.556 0 150 3.42938 150 7.65957V88.0851C150 92.3155 146.556 95.7447 142.308 95.7447H7.69231C3.44404 95.7447 0 92.3155 0 88.0851V7.65957C0 3.42938 3.44404 0 7.69231 0Z' fill='%230E4595'/%3e%3cpath d='M56.3845 66.7782L62.8001 29.2922H73.0616L66.6414 66.7782H56.3845ZM103.713 30.1003C101.681 29.3409 98.4947 28.5259 94.5168 28.5259C84.3774 28.5259 77.2351 33.6099 77.1745 40.8967C77.117 46.2833 82.2733 49.2881 86.1653 51.0812C90.1597 52.9186 91.5022 54.0903 91.4833 55.7312C91.4582 58.2437 88.2937 59.3917 85.3445 59.3917C81.2374 59.3917 79.0555 58.8235 75.6855 57.4239L74.3632 56.8284L72.923 65.22C75.3197 66.2663 79.7518 67.1728 84.3533 67.2198C95.1399 67.2198 102.142 62.1939 102.222 54.4126C102.26 50.1483 99.5264 46.9031 93.6062 44.2276C90.0197 42.4937 87.8232 41.3363 87.8464 39.5806C87.8464 38.0224 89.7057 36.3561 93.7228 36.3561C97.0783 36.3044 99.5093 37.033 101.403 37.7922L102.323 38.225L103.713 30.1003ZM130.119 29.2916H122.19C119.734 29.2916 117.895 29.9594 116.817 32.4003L101.577 66.7535H112.353C112.353 66.7535 114.114 62.1342 114.513 61.1202C115.69 61.1202 126.158 61.1363 127.654 61.1363C127.961 62.4486 128.903 66.7535 128.903 66.7535H138.424L130.119 29.2905V29.2916ZM117.539 53.4978C118.387 51.338 121.627 43.0189 121.627 43.0189C121.566 43.1189 122.469 40.8486 122.988 39.4412L123.681 42.6733C123.681 42.6733 125.646 51.6214 126.057 53.4978H117.539ZM47.6733 29.2916L37.6272 54.8555L36.5566 49.6604C34.6864 43.6719 28.8595 37.1839 22.3455 33.9356L31.5312 66.7186L42.3882 66.7064L58.5428 29.2913H47.6733' fill='white'/%3e%3cpath d='M28.254 29.2903H11.7076L11.5767 30.0703C24.4494 33.1731 32.967 40.6717 36.5036 49.6807L32.9055 32.4543C32.2844 30.0808 30.483 29.3725 28.2544 29.2896' fill='%23F2AE14'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='clip0_5173_115335'%3e%3crect width='150' height='95.7447' fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";
10115
10343
 
10116
- const styles$i = createStyles({
10344
+ const styles$h = createStyles({
10117
10345
  body: theme => ({
10118
10346
  borderTop: `1px solid ${theme.palette.gray.light}`,
10119
10347
  color: theme.palette.black,
@@ -10164,14 +10392,14 @@ const SettingsCard = ({
10164
10392
  verticallyAligned
10165
10393
  }) => {
10166
10394
  return jsxs("div", Object.assign({
10167
- css: verticallyAligned ? styles$i.verticalContainer : styles$i.container,
10395
+ css: verticallyAligned ? styles$h.verticalContainer : styles$h.container,
10168
10396
  "data-testid": "settingsCard"
10169
10397
  }, {
10170
10398
  children: [jsxs("div", Object.assign({
10171
- css: styles$i.header
10399
+ css: styles$h.header
10172
10400
  }, {
10173
10401
  children: [jsxs("div", Object.assign({
10174
- css: styles$i.title
10402
+ css: styles$h.title
10175
10403
  }, {
10176
10404
  children: [typeof title === "string" ? jsx(Typography, Object.assign({
10177
10405
  variant: "subtitle2"
@@ -10199,7 +10427,7 @@ const SettingsCard = ({
10199
10427
  }))
10200
10428
  }))]
10201
10429
  })), children && jsx("div", Object.assign({
10202
- css: styles$i.body
10430
+ css: styles$h.body
10203
10431
  }, {
10204
10432
  children: jsxs("div", {
10205
10433
  children: [children, accessoryAction && jsx(ButtonGroup, Object.assign({
@@ -10220,7 +10448,7 @@ const SettingsCard = ({
10220
10448
  }));
10221
10449
  };
10222
10450
 
10223
- const styles$h = createStyles({
10451
+ const styles$g = createStyles({
10224
10452
  container: {
10225
10453
  display: "flex",
10226
10454
  height: "72px",
@@ -10250,7 +10478,7 @@ const WalletCard = ({
10250
10478
  };
10251
10479
  const Logo = provider ? logos[provider] : undefined;
10252
10480
  return jsx("div", Object.assign({
10253
- css: styles$h.container
10481
+ css: styles$g.container
10254
10482
  }, {
10255
10483
  children: jsx(SettingsCard, {
10256
10484
  cardAction: {
@@ -10264,7 +10492,7 @@ const WalletCard = ({
10264
10492
  src: Logo,
10265
10493
  width: 56
10266
10494
  }) : jsx(Icon, {
10267
- css: styles$h.icon,
10495
+ css: styles$g.icon,
10268
10496
  name: IconNames.CREDIT_CARD,
10269
10497
  size: IconSize.SIZE_LARGE
10270
10498
  }), jsx(Typography, Object.assign({
@@ -10348,7 +10576,7 @@ var SvgShipengineLogo = function SvgShipengineLogo(props) {
10348
10576
  })))));
10349
10577
  };
10350
10578
 
10351
- const styles$g = createStyles({
10579
+ const styles$f = createStyles({
10352
10580
  poweredByShipEngine: {
10353
10581
  alignItems: "center",
10354
10582
  color: "#818F9C",
@@ -10365,7 +10593,7 @@ const PoweredByShipEngine = () => {
10365
10593
  t
10366
10594
  } = useTranslation();
10367
10595
  return jsxs("div", Object.assign({
10368
- css: styles$g.poweredByShipEngine
10596
+ css: styles$f.poweredByShipEngine
10369
10597
  }, {
10370
10598
  children: [jsx(Typography, Object.assign({
10371
10599
  variant: "body2"
@@ -10524,7 +10752,7 @@ const AccountSettings = _a => {
10524
10752
  });
10525
10753
  };
10526
10754
 
10527
- const styles$f = createStyles({
10755
+ const styles$e = createStyles({
10528
10756
  agreement: {
10529
10757
  alignItems: "center",
10530
10758
  display: "flex",
@@ -10544,11 +10772,10 @@ const styles$f = createStyles({
10544
10772
  display: "flex",
10545
10773
  flexDirection: "column"
10546
10774
  },
10547
- icon: theme => ({
10548
- padding: `${theme.spacing(0.4)}px 0 0 ${theme.spacing(0.5)}px`,
10549
- position: "absolute"
10550
- }),
10551
10775
  link: {
10776
+ "&:visited": {
10777
+ color: "#006fbb"
10778
+ },
10552
10779
  border: "none"
10553
10780
  },
10554
10781
  links: theme => ({
@@ -10575,6 +10802,11 @@ const styles$f = createStyles({
10575
10802
  paddingBottom: theme.spacing(8),
10576
10803
  paddingTop: theme.spacing(2)
10577
10804
  }),
10805
+ termsLink: theme => ({
10806
+ alignItems: "center",
10807
+ display: "inline-flex",
10808
+ fontWeight: theme.typography.fontWeight.normal
10809
+ }),
10578
10810
  termsList: {
10579
10811
  listStyle: "none"
10580
10812
  },
@@ -10598,10 +10830,10 @@ const DisplayCarrierTerms = c => {
10598
10830
  const listCarrierLinks = () => {
10599
10831
  return c.carrierTerms.links.map((term, index) => {
10600
10832
  return jsx("li", Object.assign({
10601
- css: styles$f.listItems
10833
+ css: styles$e.listItems
10602
10834
  }, {
10603
10835
  children: jsx(Link, Object.assign({
10604
- css: styles$f.link,
10836
+ css: styles$e.link,
10605
10837
  href: term.url,
10606
10838
  isExternal: true,
10607
10839
  target: "_blank"
@@ -10620,18 +10852,18 @@ const DisplayCarrierTerms = c => {
10620
10852
  children: [jsx(Spacer, {
10621
10853
  multiplier: 3
10622
10854
  }), jsxs("div", Object.assign({
10623
- css: styles$f.terms
10855
+ css: styles$e.terms
10624
10856
  }, {
10625
10857
  children: [jsx(Typography, Object.assign({
10626
10858
  variant: "subtitle1"
10627
10859
  }, {
10628
10860
  children: c.carrierTerms.title
10629
10861
  })), !!listCarrierContent().length && jsx("div", Object.assign({
10630
- css: styles$f.terms
10862
+ css: styles$e.terms
10631
10863
  }, {
10632
10864
  children: listCarrierContent()
10633
10865
  })), jsx("ul", Object.assign({
10634
- css: styles$f.links
10866
+ css: styles$e.links
10635
10867
  }, {
10636
10868
  children: listCarrierLinks()
10637
10869
  }))]
@@ -10781,7 +11013,7 @@ const AddCarrierForm = ({
10781
11013
  }));
10782
11014
  };
10783
11015
 
10784
- const styles$e = createStyles({
11016
+ const styles$d = createStyles({
10785
11017
  container: theme => ({
10786
11018
  display: "flex",
10787
11019
  gap: theme.spacing()
@@ -10819,13 +11051,13 @@ const Disclosure = ({
10819
11051
  }, [open]);
10820
11052
  return jsxs(Fragment, {
10821
11053
  children: [jsxs("div", Object.assign({
10822
- css: styles$e.container
11054
+ css: styles$d.container
10823
11055
  }, {
10824
11056
  children: [jsx("div", {
10825
11057
  children: label
10826
11058
  }), _showToggle && jsx("button", Object.assign({
10827
11059
  "aria-expanded": isOpen,
10828
- css: styles$e.toggle,
11060
+ css: styles$d.toggle,
10829
11061
  onClick: () => {
10830
11062
  setIsOpen(!isOpen);
10831
11063
  onToggle(!isOpen);
@@ -10833,12 +11065,12 @@ const Disclosure = ({
10833
11065
  type: "button"
10834
11066
  }, {
10835
11067
  children: jsx(Icon, {
10836
- css: styles$e.icon,
11068
+ css: styles$d.icon,
10837
11069
  name: isOpen ? IconNames.CHEVRON_TOP : IconNames.CHEVRON_BOTTOM
10838
11070
  })
10839
11071
  }))]
10840
11072
  })), isOpen && jsx("div", Object.assign({
10841
- css: styles$e.content
11073
+ css: styles$d.content
10842
11074
  }, {
10843
11075
  children: typeof children === "function" ? children(() => setIsOpen(!isOpen)) : children
10844
11076
  }))]
@@ -10966,7 +11198,7 @@ const getCarrierRecoverySchema = requiresAddress => z.object({
10966
11198
  address: requiresAddress ? baseSchema : baseSchema.optional()
10967
11199
  });
10968
11200
 
10969
- const styles$d = createStyles({
11201
+ const styles$c = createStyles({
10970
11202
  grid: theme => ({
10971
11203
  margin: theme.spacing(4)
10972
11204
  }),
@@ -11010,7 +11242,7 @@ const CarrierRecoveryForm = ({
11010
11242
  onSubmit: formLogger.capture(handleSubmit)
11011
11243
  }, {
11012
11244
  children: jsxs(Grid, Object.assign({
11013
- css: styles$d.grid,
11245
+ css: styles$c.grid,
11014
11246
  noPadding: true
11015
11247
  }, {
11016
11248
  children: [requiresAddress && jsxs(Fragment, {
@@ -11018,14 +11250,14 @@ const CarrierRecoveryForm = ({
11018
11250
  colSpan: 12
11019
11251
  }, {
11020
11252
  children: jsx(Typography, Object.assign({
11021
- css: styles$d.heading,
11253
+ css: styles$c.heading,
11022
11254
  variant: "heading4"
11023
11255
  }, {
11024
11256
  children: t("register-wallet:sections.carriers.title")
11025
11257
  }))
11026
11258
  })), jsx(GridChild, Object.assign({
11027
11259
  colSpan: 12,
11028
- css: styles$d.subtitle
11260
+ css: styles$c.subtitle
11029
11261
  }, {
11030
11262
  children: jsx(Typography, Object.assign({
11031
11263
  variant: "subtitle1"
@@ -11111,7 +11343,7 @@ const CarrierTermsForm = ({
11111
11343
  onSubmit(payload.agreement);
11112
11344
  }));
11113
11345
  return jsxs("div", Object.assign({
11114
- css: styles$f.termsForm,
11346
+ css: styles$e.termsForm,
11115
11347
  "data-testid": "carrier-terms-form"
11116
11348
  }, {
11117
11349
  children: [jsx(Typography, Object.assign({
@@ -11127,7 +11359,7 @@ const CarrierTermsForm = ({
11127
11359
  })), jsx(Spacer, {
11128
11360
  multiplier: 1
11129
11361
  }), jsx("div", Object.assign({
11130
- css: styles$f.carrierLogos
11362
+ css: styles$e.carrierLogos
11131
11363
  }, {
11132
11364
  children: metadatas.map(({
11133
11365
  name,
@@ -11143,21 +11375,18 @@ const CarrierTermsForm = ({
11143
11375
  onSubmit: formLogger.capture(handleSubmit)
11144
11376
  }, {
11145
11377
  children: jsxs("div", Object.assign({
11146
- css: styles$f.agreement
11378
+ css: styles$e.agreement
11147
11379
  }, {
11148
11380
  children: [jsx("div", {
11149
11381
  children: jsx(CheckboxInput, {
11150
11382
  checkboxLabel: jsx(Trans, {
11151
11383
  components: {
11152
11384
  icon: jsx(Icon, {
11153
- css: styles$f.icon,
11154
11385
  name: showTerms ? IconNames.CHEVRON_TOP : IconNames.CHEVRON_BOTTOM,
11155
11386
  size: IconSize.SIZE_SMALL
11156
11387
  }),
11157
11388
  terms: jsx(Link, {
11158
- css: theme => ({
11159
- fontWeight: theme.typography.fontWeight.normal
11160
- }),
11389
+ css: styles$e.termsLink,
11161
11390
  "data-testid": "terms-link",
11162
11391
  onClick: e => {
11163
11392
  e.preventDefault();
@@ -11175,7 +11404,7 @@ const CarrierTermsForm = ({
11175
11404
  name: "agreement"
11176
11405
  })
11177
11406
  }), showTerms && jsxs("div", Object.assign({
11178
- css: styles$f.well
11407
+ css: styles$e.well
11179
11408
  }, {
11180
11409
  children: [jsx(Typography, Object.assign({
11181
11410
  variant: "heading4"
@@ -11184,7 +11413,7 @@ const CarrierTermsForm = ({
11184
11413
  })), terms.map(t => jsx(DisplayCarrierTerms, {
11185
11414
  carrierTerms: t
11186
11415
  }, t.title)), jsx("div", Object.assign({
11187
- css: styles$f.close
11416
+ css: styles$e.close
11188
11417
  }, {
11189
11418
  children: jsx(Button, Object.assign({
11190
11419
  onClick: () => setShowTerms(false),
@@ -11439,7 +11668,7 @@ const CopyButton = ({
11439
11668
  }));
11440
11669
  };
11441
11670
 
11442
- const styles$c = createStyles({
11671
+ const styles$b = createStyles({
11443
11672
  trackingNumber: theme => ({
11444
11673
  alignItems: "center",
11445
11674
  display: "flex"
@@ -11485,10 +11714,10 @@ const Label = ({
11485
11714
  shippingAmount: label.shipmentCost
11486
11715
  }, {
11487
11716
  children: label.trackingNumber && jsxs("div", Object.assign({
11488
- css: styles$c.trackingNumber
11717
+ css: styles$b.trackingNumber
11489
11718
  }, {
11490
11719
  children: [jsx("div", Object.assign({
11491
- css: styles$c.truncatedTrackingNumber
11720
+ css: styles$b.truncatedTrackingNumber
11492
11721
  }, {
11493
11722
  children: label.trackingNumber.toString()
11494
11723
  })), jsx(CopyButton, {
@@ -11600,7 +11829,7 @@ const LandingPageForm = ({
11600
11829
  }));
11601
11830
  };
11602
11831
 
11603
- const styles$b = createStyles({
11832
+ const styles$a = createStyles({
11604
11833
  container: theme => ({
11605
11834
  padding: theme.spacing(2)
11606
11835
  }),
@@ -11622,11 +11851,11 @@ const LandingPage = ({
11622
11851
  t
11623
11852
  } = useTranslation();
11624
11853
  return jsxs("div", Object.assign({
11625
- css: styles$b.container,
11854
+ css: styles$a.container,
11626
11855
  "data-testid": "landing-page"
11627
11856
  }, {
11628
11857
  children: [jsxs("div", Object.assign({
11629
- css: styles$b.header
11858
+ css: styles$a.header
11630
11859
  }, {
11631
11860
  children: [jsx(Typography, Object.assign({
11632
11861
  variant: "heading4"
@@ -11644,7 +11873,7 @@ const LandingPage = ({
11644
11873
  })), jsx(LandingPageForm, {
11645
11874
  onSubmit: onSubmit
11646
11875
  }), jsxs("div", Object.assign({
11647
- css: styles$b.header
11876
+ css: styles$a.header
11648
11877
  }, {
11649
11878
  children: [jsx(Spacer, {
11650
11879
  multiplier: 6
@@ -11655,14 +11884,14 @@ const LandingPage = ({
11655
11884
  })), jsx(Spacer, {
11656
11885
  multiplier: 2
11657
11886
  }), jsx(Typography, Object.assign({
11658
- css: styles$b.description,
11887
+ css: styles$a.description,
11659
11888
  variant: "body1"
11660
11889
  }, {
11661
11890
  children: t("onboarding:landing.messageLine1")
11662
11891
  })), jsx(Spacer, {
11663
11892
  multiplier: 2
11664
11893
  }), jsx(Typography, Object.assign({
11665
- css: styles$b.description,
11894
+ css: styles$a.description,
11666
11895
  variant: "body1"
11667
11896
  }, {
11668
11897
  children: t("onboarding:landing.messageLine2")
@@ -11673,7 +11902,7 @@ const LandingPage = ({
11673
11902
  }));
11674
11903
  };
11675
11904
 
11676
- const styles$a = createStyles({
11905
+ const styles$9 = createStyles({
11677
11906
  container: {
11678
11907
  display: "flex",
11679
11908
  flexDirection: "column"
@@ -11733,14 +11962,14 @@ const ListCarriersRow = ({
11733
11962
  setIsSubmitting(false);
11734
11963
  });
11735
11964
  return jsxs("div", Object.assign({
11736
- css: styles$a.container,
11965
+ css: styles$9.container,
11737
11966
  "data-testid": "carrier-row"
11738
11967
  }, {
11739
11968
  children: [jsxs("div", Object.assign({
11740
- css: styles$a.rowContainer
11969
+ css: styles$9.rowContainer
11741
11970
  }, {
11742
11971
  children: [jsxs("div", Object.assign({
11743
- css: styles$a.logoContainer
11972
+ css: styles$9.logoContainer
11744
11973
  }, {
11745
11974
  children: [jsx("div", {
11746
11975
  children: jsx("img", {
@@ -11758,7 +11987,7 @@ const ListCarriersRow = ({
11758
11987
  css: _ref
11759
11988
  }, {
11760
11989
  children: jsx(LinkAction, {
11761
- css: styles$a.getConnectButton(isConnected),
11990
+ css: styles$9.getConnectButton(isConnected),
11762
11991
  isDisabled: isConnected || showDropDown,
11763
11992
  isLoading: isSubmitting,
11764
11993
  onClick: () => __awaiter(void 0, void 0, void 0, function* () {
@@ -11776,7 +12005,7 @@ const ListCarriersRow = ({
11776
12005
  }));
11777
12006
  };
11778
12007
 
11779
- const styles$9 = createStyles({
12008
+ const styles$8 = createStyles({
11780
12009
  carriersList: theme => ({
11781
12010
  "& > li:not(:last-of-type)": {
11782
12011
  borderBottom: `1px solid ${theme.palette.gray.light}`
@@ -11837,7 +12066,7 @@ const ListCarriers = ({
11837
12066
  }))
11838
12067
  })), jsx(Spacer, {})]
11839
12068
  }), jsx("ul", Object.assign({
11840
- css: styles$9.carriersList,
12069
+ css: styles$8.carriersList,
11841
12070
  "data-testid": "carriers-list"
11842
12071
  }, {
11843
12072
  children: isLoading ? jsxs(Fragment, {
@@ -11859,11 +12088,11 @@ const ListCarriers = ({
11859
12088
  };
11860
12089
  const LoadingSkeletonRow = () => {
11861
12090
  return jsxs("div", Object.assign({
11862
- css: styles$9.skeletonRow,
12091
+ css: styles$8.skeletonRow,
11863
12092
  "data-testid": "skeleton-carrier-row"
11864
12093
  }, {
11865
12094
  children: [jsxs("div", Object.assign({
11866
- css: styles$9.skeletonLogoContainer
12095
+ css: styles$8.skeletonLogoContainer
11867
12096
  }, {
11868
12097
  children: [jsx(Skeleton, {
11869
12098
  animation: SkeletonAnimation.WAVE,
@@ -12122,7 +12351,7 @@ const WarehouseForm = ({
12122
12351
  }));
12123
12352
  };
12124
12353
 
12125
- const styles$8 = createStyles({
12354
+ const styles$7 = createStyles({
12126
12355
  cardSpacing: theme => ({
12127
12356
  display: "flex",
12128
12357
  flexDirection: "column",
@@ -12152,9 +12381,9 @@ const ManageWarehouses = ({
12152
12381
  const [showAddNewWarehouseForm, toggleShowAddNewWarehouseForm] = useToggle(false);
12153
12382
  return jsxs(Fragment, {
12154
12383
  children: [showAddNewWarehouseForm ? jsx(AddressPreferenceProvider, Object.assign({
12155
- css: styles$8.well,
12384
+ css: styles$7.well,
12156
12385
  formHeader: jsxs("div", Object.assign({
12157
- css: styles$8.header
12386
+ css: styles$7.header
12158
12387
  }, {
12159
12388
  children: [jsx(Typography, Object.assign({
12160
12389
  variant: "subtitle1"
@@ -12199,14 +12428,14 @@ const ManageWarehouses = ({
12199
12428
  })]
12200
12429
  }))
12201
12430
  })), jsx("div", Object.assign({
12202
- css: styles$8.cardSpacing
12431
+ css: styles$7.cardSpacing
12203
12432
  }, {
12204
12433
  children: warehouses.map(warehouse => {
12205
12434
  if (editWarehouseId && editWarehouseId === warehouse.warehouseId) {
12206
12435
  return jsx(AddressPreferenceProvider, Object.assign({
12207
- css: styles$8.well,
12436
+ css: styles$7.well,
12208
12437
  formHeader: jsxs("div", Object.assign({
12209
- css: styles$8.header
12438
+ css: styles$7.header
12210
12439
  }, {
12211
12440
  children: [jsx(Typography, Object.assign({
12212
12441
  variant: "subtitle1"
@@ -12325,7 +12554,7 @@ const CompletionPage = ({
12325
12554
  }));
12326
12555
  };
12327
12556
 
12328
- const styles$7 = createStyles({
12557
+ const styles$6 = createStyles({
12329
12558
  container: theme => ({
12330
12559
  padding: theme.spacing(2)
12331
12560
  }),
@@ -12555,10 +12784,10 @@ const Onboarding = ({
12555
12784
  if (agreedToTerms && warehouses.length && hasValidAddress && !hasStampsWallet && !hasCompletedBilling) {
12556
12785
  return jsx(AddressPreferenceProvider, Object.assign({
12557
12786
  formHeader: jsxs("div", Object.assign({
12558
- css: styles$7.walletFormHeader
12787
+ css: styles$6.walletFormHeader
12559
12788
  }, {
12560
12789
  children: [jsxs("div", Object.assign({
12561
- css: styles$7.walletFormTitle
12790
+ css: styles$6.walletFormTitle
12562
12791
  }, {
12563
12792
  children: [jsx(Typography, Object.assign({
12564
12793
  variant: "heading4"
@@ -12637,22 +12866,22 @@ const Onboarding = ({
12637
12866
  });
12638
12867
  };
12639
12868
  return jsxs("div", Object.assign({
12640
- css: styles$7.container
12869
+ css: styles$6.container
12641
12870
  }, {
12642
12871
  children: [jsxs(Stepper, Object.assign({
12643
12872
  currentStep: currentStep
12644
12873
  }, {
12645
12874
  children: [jsx(Step, {
12646
- css: styles$7.step,
12875
+ css: styles$6.step,
12647
12876
  label: t("onboarding:steps.login")
12648
12877
  }), jsx(Step, {
12649
- css: styles$7.step,
12878
+ css: styles$6.step,
12650
12879
  label: t("onboarding:steps.carriers")
12651
12880
  }), jsx(Step, {
12652
- css: styles$7.step,
12881
+ css: styles$6.step,
12653
12882
  label: t("onboarding:steps.addresses")
12654
12883
  }), jsx(Step, {
12655
- css: styles$7.step,
12884
+ css: styles$6.step,
12656
12885
  label: t("onboarding:steps.payment")
12657
12886
  })]
12658
12887
  })), renderStep(), ((_c = features === null || features === void 0 ? void 0 : features.presentation) === null || _c === void 0 ? void 0 : _c.poweredByShipEngine) && jsxs(Fragment, {
@@ -12726,7 +12955,7 @@ const Cube = _a => {
12726
12955
  }));
12727
12956
  };
12728
12957
 
12729
- const styles$6 = createStyles({
12958
+ const styles$5 = createStyles({
12730
12959
  balanceText: theme => ({
12731
12960
  color: theme.palette.secondary.dark
12732
12961
  }),
@@ -12749,7 +12978,7 @@ const styles$6 = createStyles({
12749
12978
  }
12750
12979
  });
12751
12980
 
12752
- const styles$5 = createStyles({
12981
+ const styles$4 = createStyles({
12753
12982
  icon: theme => ({
12754
12983
  color: theme.palette.primary.main,
12755
12984
  marginRight: theme.spacing(2)
@@ -12794,10 +13023,10 @@ const Section = _a => {
12794
13023
  rest = __rest(_a, ["bold", "title", "children", "rightContent"]);
12795
13024
  return jsxs(Fragment, {
12796
13025
  children: [title && jsx("summary", Object.assign({
12797
- css: styles$5.summary
13026
+ css: styles$4.summary
12798
13027
  }, {
12799
13028
  children: jsxs("div", Object.assign({
12800
- css: styles$5.summaryWrapper
13029
+ css: styles$4.summaryWrapper
12801
13030
  }, {
12802
13031
  children: [jsx(Typography, Object.assign({
12803
13032
  bold: bold,
@@ -12805,13 +13034,13 @@ const Section = _a => {
12805
13034
  }, {
12806
13035
  children: title
12807
13036
  })), rightContent && jsx("div", Object.assign({
12808
- css: styles$5.rightContentWrapper
13037
+ css: styles$4.rightContentWrapper
12809
13038
  }, {
12810
13039
  children: rightContent
12811
13040
  }))]
12812
13041
  }))
12813
13042
  })), jsx("section", Object.assign({
12814
- css: styles$5.section
13043
+ css: styles$4.section
12815
13044
  }, rest, {
12816
13045
  children: children
12817
13046
  }))]
@@ -12883,7 +13112,7 @@ const FundAndPurchase = ({
12883
13112
  }, {
12884
13113
  children: [jsx(Button, Object.assign({
12885
13114
  bold: false,
12886
- css: styles$6.saveRateButton,
13115
+ css: styles$5.saveRateButton,
12887
13116
  disabled: disabled || !carrierId || addFundsForm.isSubmitting || isRateFormSubmitting,
12888
13117
  isLoading: isSavingRate,
12889
13118
  onClick: handleSaveRate,
@@ -12903,7 +13132,7 @@ const FundAndPurchase = ({
12903
13132
  // render when no rate has been selected yet
12904
13133
  if (!carrierId) return jsxs("div", Object.assign({
12905
13134
  className: className,
12906
- css: styles$6.container
13135
+ css: styles$5.container
12907
13136
  }, {
12908
13137
  children: [jsxs(Spread, {
12909
13138
  children: [jsx(CarrierBalance, {
@@ -12927,7 +13156,7 @@ const FundAndPurchase = ({
12927
13156
  // show balance, but not the funding form.
12928
13157
  if (!isFundingEnabled) return jsxs("div", Object.assign({
12929
13158
  className: className,
12930
- css: styles$6.container
13159
+ css: styles$5.container
12931
13160
  }, {
12932
13161
  children: [jsx(CarrierBalance, {
12933
13162
  carrierId: carrierId
@@ -12969,13 +13198,13 @@ const FundAndPurchase = ({
12969
13198
  var _a, _b;
12970
13199
  return jsxs(Fragment, {
12971
13200
  children: [jsxs("section", Object.assign({
12972
- css: styles$6.getFormExtension(addFundsForm.isCustomAmount)
13201
+ css: styles$5.getFormExtension(addFundsForm.isCustomAmount)
12973
13202
  }, {
12974
13203
  children: [jsx(InlineLabel, Object.assign({
12975
13204
  label: t("manage-funding:fundAndPurchase.newBalance")
12976
13205
  }, {
12977
13206
  children: jsx(Typography, Object.assign({
12978
- css: styles$6.balanceText
13207
+ css: styles$5.balanceText
12979
13208
  }, {
12980
13209
  children: formatMoney({
12981
13210
  amount: balance + ((_a = addFundsForm.selectedAmount) !== null && _a !== void 0 ? _a : 0),
@@ -12986,7 +13215,7 @@ const FundAndPurchase = ({
12986
13215
  label: t("manage-funding:fundAndPurchase.finalBalance")
12987
13216
  }, {
12988
13217
  children: jsx(Typography, Object.assign({
12989
- css: styles$6.balanceText
13218
+ css: styles$5.balanceText
12990
13219
  }, {
12991
13220
  children: formatMoney({
12992
13221
  amount: balance + ((_b = addFundsForm.selectedAmount) !== null && _b !== void 0 ? _b : 0) - purchaseAmount,
@@ -13013,7 +13242,7 @@ const FundAndPurchase = ({
13013
13242
  }));
13014
13243
  };
13015
13244
 
13016
- const styles$4 = createStyles({
13245
+ const styles$3 = createStyles({
13017
13246
  fundAndPurchase: theme => ({
13018
13247
  borderTop: `1px solid ${theme.palette.gray.ultraLight}`
13019
13248
  }),
@@ -13182,7 +13411,7 @@ const RateForm = ({
13182
13411
  onClick: onSelectRate,
13183
13412
  options: showHiddenRates ? rateOptions : filteredRateOptions
13184
13413
  }), rateOptions.some(option => option.requiresAcknowledgement) && rateOptions.length > 5 && jsx(Link, Object.assign({
13185
- css: styles$4.showMoreOrLessRatesButton,
13414
+ css: styles$3.showMoreOrLessRatesButton,
13186
13415
  onClick: () => {
13187
13416
  var _a;
13188
13417
  setShowHiddenRates(!showHiddenRates);
@@ -13203,7 +13432,7 @@ const RateForm = ({
13203
13432
  }))
13204
13433
  }))]
13205
13434
  }) : !isLoading && !!allDisplayableErrors.length ? null : jsxs("article", Object.assign({
13206
- css: styles$4.ratesInterstitial,
13435
+ css: styles$3.ratesInterstitial,
13207
13436
  role: "presentation"
13208
13437
  }, {
13209
13438
  children: [jsx(Cube, {
@@ -13229,7 +13458,7 @@ const RateForm = ({
13229
13458
  balance: balance,
13230
13459
  carrierId: selectedRate === null || selectedRate === void 0 ? void 0 : selectedRate.carrierId,
13231
13460
  control: form.control,
13232
- css: styles$4.fundAndPurchase,
13461
+ css: styles$3.fundAndPurchase,
13233
13462
  disabled: disabled,
13234
13463
  isFundingEnabled: !!((_d = features === null || features === void 0 ? void 0 : features.rateForm) === null || _d === void 0 ? void 0 : _d.enableFunding),
13235
13464
  isFundingRequired: (selectedRate === null || selectedRate === void 0 ? void 0 : selectedRate.balance) !== undefined && !!selectedRate.requiresFundedAmount,
@@ -13266,7 +13495,7 @@ const SuspendSalesOrder = ({
13266
13495
  }));
13267
13496
  };
13268
13497
 
13269
- const styles$3 = createStyles({
13498
+ const styles$2 = createStyles({
13270
13499
  itemDetail: theme => ({
13271
13500
  padding: `${theme.spacing(0)}px ${theme.spacing(2)}px ${theme.spacing(2)}px ${theme.spacing(0)}px`
13272
13501
  }),
@@ -13294,15 +13523,15 @@ const ItemsBreakdownTableHeader = ({
13294
13523
  }) => jsx(TableHeader, {
13295
13524
  children: jsxs(TableBaseRow, {
13296
13525
  children: [jsx(TableHeaderCell, {}), jsx(TableHeaderCell, Object.assign({
13297
- css: styles$3.numericCell
13526
+ css: styles$2.numericCell
13298
13527
  }, {
13299
13528
  children: "Qty"
13300
13529
  })), hasValue && jsx(TableHeaderCell, Object.assign({
13301
- css: styles$3.numericCell
13530
+ css: styles$2.numericCell
13302
13531
  }, {
13303
13532
  children: "$/ea"
13304
13533
  })), hasTotal && jsx(TableHeaderCell, Object.assign({
13305
- css: styles$3.numericCell
13534
+ css: styles$2.numericCell
13306
13535
  }, {
13307
13536
  children: "$ Total"
13308
13537
  }))]
@@ -13314,7 +13543,7 @@ const ItemsBreakdown = ({
13314
13543
  const hasValue = items.some(item => item.value !== undefined);
13315
13544
  const hasTotal = items.some(item => item.totalValue !== undefined);
13316
13545
  return jsx("div", Object.assign({
13317
- css: styles$3.tableWrapper
13546
+ css: styles$2.tableWrapper
13318
13547
  }, {
13319
13548
  children: jsx(Table, Object.assign({
13320
13549
  header: jsx(ItemsBreakdownTableHeader, {
@@ -13333,7 +13562,7 @@ const ItemsBreakdown = ({
13333
13562
  children: [jsx(TableBaseRow, {
13334
13563
  children: jsx(TableBodyCell, Object.assign({
13335
13564
  colSpan: 4,
13336
- css: styles$3.itemName
13565
+ css: styles$2.itemName
13337
13566
  }, {
13338
13567
  children: jsx(Typography, {
13339
13568
  children: name
@@ -13341,21 +13570,21 @@ const ItemsBreakdown = ({
13341
13570
  }))
13342
13571
  }), jsxs(TableBaseRow, {
13343
13572
  children: [jsx(TableBodyCell, Object.assign({
13344
- css: styles$3.itemDetail
13573
+ css: styles$2.itemDetail
13345
13574
  }, {
13346
13575
  children: jsx(Typography, {
13347
13576
  children: detail
13348
13577
  })
13349
13578
  })), jsx(TableBodyCell, Object.assign({
13350
- css: [styles$3.numericCell, styles$3.itemDetail]
13579
+ css: [styles$2.numericCell, styles$2.itemDetail]
13351
13580
  }, {
13352
13581
  children: quantity
13353
13582
  })), hasValue && jsx(TableBodyCell, Object.assign({
13354
- css: [styles$3.numericCell, styles$3.itemDetail]
13583
+ css: [styles$2.numericCell, styles$2.itemDetail]
13355
13584
  }, {
13356
13585
  children: value && formatMoney(value)
13357
13586
  })), hasTotal && jsx(TableBodyCell, Object.assign({
13358
- css: [styles$3.numericCell, styles$3.itemDetail]
13587
+ css: [styles$2.numericCell, styles$2.itemDetail]
13359
13588
  }, {
13360
13589
  children: totalValue && formatMoney(totalValue)
13361
13590
  }))]
@@ -13366,7 +13595,7 @@ const ItemsBreakdown = ({
13366
13595
  }));
13367
13596
  };
13368
13597
 
13369
- const styles$2 = createStyles({
13598
+ const styles$1 = createStyles({
13370
13599
  actions: theme => ({
13371
13600
  background: "white",
13372
13601
  display: "flex",
@@ -13438,7 +13667,7 @@ const CustomsItemActions = ({
13438
13667
  const buttonRef = useRef(null);
13439
13668
  return jsxs(Fragment, {
13440
13669
  children: [jsx(Button, Object.assign({
13441
- css: styles$2.actionsButton,
13670
+ css: styles$1.actionsButton,
13442
13671
  onClick: toggleShowCustomsPopover,
13443
13672
  ref: buttonRef,
13444
13673
  variant: ButtonVariant.TEXT
@@ -13461,7 +13690,7 @@ const CustomsItemActions = ({
13461
13690
  reference: buttonRef.current
13462
13691
  }, {
13463
13692
  children: jsxs("div", Object.assign({
13464
- css: styles$2.actions
13693
+ css: styles$1.actions
13465
13694
  }, {
13466
13695
  children: [jsx(Button, Object.assign({
13467
13696
  bold: false,
@@ -13537,7 +13766,7 @@ const CustomsItemsDisplay = ({
13537
13766
  header: jsx(TableHeader, {
13538
13767
  children: jsxs(TableBaseRow, {
13539
13768
  children: [jsx(TableHeaderCell, Object.assign({
13540
- css: styles$2.headerDescription
13769
+ css: styles$1.headerDescription
13541
13770
  }, {
13542
13771
  children: jsx(Typography, Object.assign({
13543
13772
  variant: "subtitle2"
@@ -13545,7 +13774,7 @@ const CustomsItemsDisplay = ({
13545
13774
  children: t("customs.fields.description")
13546
13775
  }))
13547
13776
  })), jsx(TableHeaderCell, Object.assign({
13548
- css: styles$2.headerEach
13777
+ css: styles$1.headerEach
13549
13778
  }, {
13550
13779
  children: jsx(Typography, Object.assign({
13551
13780
  variant: "subtitle2"
@@ -13555,7 +13784,7 @@ const CustomsItemsDisplay = ({
13555
13784
  })
13556
13785
  }))
13557
13786
  })), jsx(TableHeaderCell, Object.assign({
13558
- css: styles$2.headerQty
13787
+ css: styles$1.headerQty
13559
13788
  }, {
13560
13789
  children: jsx(Typography, Object.assign({
13561
13790
  variant: "subtitle2"
@@ -13563,7 +13792,7 @@ const CustomsItemsDisplay = ({
13563
13792
  children: t("customs.fields.quantity")
13564
13793
  }))
13565
13794
  })), jsx(TableHeaderCell, Object.assign({
13566
- css: styles$2.headerTotal
13795
+ css: styles$1.headerTotal
13567
13796
  }, {
13568
13797
  children: jsx(Typography, Object.assign({
13569
13798
  variant: "subtitle2"
@@ -13573,7 +13802,7 @@ const CustomsItemsDisplay = ({
13573
13802
  })
13574
13803
  }))
13575
13804
  })), jsx(TableHeaderCell, {
13576
- css: styles$2.actionsColumn
13805
+ css: styles$1.actionsColumn
13577
13806
  })]
13578
13807
  })
13579
13808
  })
@@ -13587,29 +13816,29 @@ const CustomsItemsDisplay = ({
13587
13816
  children: customsItemForm
13588
13817
  })) : jsxs(Fragment, {
13589
13818
  children: [jsx(TableBodyCell, Object.assign({
13590
- css: styles$2.itemInfoLeft
13819
+ css: styles$1.itemInfoLeft
13591
13820
  }, {
13592
13821
  children: item.description
13593
13822
  })), jsx(TableBodyCell, Object.assign({
13594
- css: styles$2.itemEach
13823
+ css: styles$1.itemEach
13595
13824
  }, {
13596
13825
  children: formatMoney({
13597
13826
  amount: Number(item.value),
13598
13827
  currency: SE.Currency.USD
13599
13828
  })
13600
13829
  })), jsx(TableBodyCell, Object.assign({
13601
- css: styles$2.itemQty
13830
+ css: styles$1.itemQty
13602
13831
  }, {
13603
13832
  children: item.quantity
13604
13833
  })), jsx(TableBodyCell, Object.assign({
13605
- css: styles$2.itemTotal
13834
+ css: styles$1.itemTotal
13606
13835
  }, {
13607
13836
  children: formatMoney({
13608
13837
  amount: Number(item.value) * item.quantity,
13609
13838
  currency: SE.Currency.USD
13610
13839
  })
13611
13840
  })), jsx(TableBodyCell, Object.assign({
13612
- css: styles$2.actionsColumn
13841
+ css: styles$1.actionsColumn
13613
13842
  }, {
13614
13843
  children: jsx(CustomsItemActions, {
13615
13844
  onDeleteClick: () => __awaiter(void 0, void 0, void 0, function* () {
@@ -13625,7 +13854,7 @@ const CustomsItemsDisplay = ({
13625
13854
  })
13626
13855
  }), item.customsItemId !== (customsItemBeingEdited === null || customsItemBeingEdited === void 0 ? void 0 : customsItemBeingEdited.customsItemId) && jsx(TableBaseRow, {
13627
13856
  children: jsx(TableBodyCell, Object.assign({
13628
- css: styles$2.hsCode
13857
+ css: styles$1.hsCode
13629
13858
  }, {
13630
13859
  children: item.harmonizedTariffCode
13631
13860
  }))
@@ -13786,6 +14015,8 @@ const ShipmentForm = ({
13786
14015
  onSubmitParseShipTo,
13787
14016
  onToggleAddressPreferenceDisclosure,
13788
14017
  onUpdateCustoms,
14018
+ parseAddressErrors,
14019
+ resetParseAddress,
13789
14020
  salesOrder,
13790
14021
  shipment,
13791
14022
  shippingPresets,
@@ -14065,7 +14296,9 @@ const ShipmentForm = ({
14065
14296
  address: (_b = (_a = addressPreference === null || addressPreference === void 0 ? void 0 : addressPreference.selection) !== null && _a !== void 0 ? _a : shipment === null || shipment === void 0 ? void 0 : shipment.shipTo) !== null && _b !== void 0 ? _b : salesOrder === null || salesOrder === void 0 ? void 0 : salesOrder.shipTo,
14066
14297
  formId: "edit-ship-to-form",
14067
14298
  onSubmit: handleSubmitEditShipTo,
14068
- onSubmitParse: onSubmitParseShipTo
14299
+ onSubmitParse: onSubmitParseShipTo,
14300
+ parseAddressErrors,
14301
+ resetParseAddress
14069
14302
  });
14070
14303
  const handleUpdateCustomsItems = useCallback(customsItems => __awaiter(void 0, void 0, void 0, function* () {
14071
14304
  const result = yield onUpdateCustoms === null || onUpdateCustoms === void 0 ? void 0 : onUpdateCustoms({
@@ -14593,6 +14826,7 @@ const Shipment = ({
14593
14826
  } = convertWeight(weight);
14594
14827
  const requestedServices = useMemo(() => getRequestedServices(salesOrder), [salesOrder]);
14595
14828
  const activeLabel = useMemo(() => labels === null || labels === void 0 ? void 0 : labels.find(l => l.status === "completed"), [labels]);
14829
+ const hasSalesOrder = useMemo(() => shipment.salesOrderIds.length > 0, [shipment.salesOrderIds.length]);
14596
14830
  return jsxs(Fragment, {
14597
14831
  children: [jsxs(Section, Object.assign({
14598
14832
  "data-testid": "orderDetail"
@@ -14614,12 +14848,12 @@ const Shipment = ({
14614
14848
  children: [jsx(AddressDisplay, {
14615
14849
  address: shipment.shipTo
14616
14850
  }), jsx(Spacer, {})]
14617
- })), jsxs(FieldLabel, Object.assign({
14851
+ })), hasSalesOrder && jsxs(FieldLabel, Object.assign({
14618
14852
  "data-testid": "orderDate",
14619
14853
  label: t("view-shipment:fields.orderDate")
14620
14854
  }, {
14621
14855
  children: [salesOrder ? formatDate(salesOrder.orderDate) : t("loading.salesOrder"), jsx(Spacer, {})]
14622
- })), jsxs(FieldLabel, Object.assign({
14856
+ })), hasSalesOrder && jsxs(FieldLabel, Object.assign({
14623
14857
  "data-testid": "orderValue",
14624
14858
  label: t("view-shipment:fields.orderValue")
14625
14859
  }, {
@@ -14702,7 +14936,11 @@ const Shipment = ({
14702
14936
  })) : undefined,
14703
14937
  title: t("view-shipment:sections.labels")
14704
14938
  }, {
14705
- children: [(_b = sortLabels(labels)) === null || _b === void 0 ? void 0 : _b.map((label, i, data) => {
14939
+ children: [!(labels === null || labels === void 0 ? void 0 : labels.length) && jsx(Typography, Object.assign({
14940
+ variant: "body2"
14941
+ }, {
14942
+ children: t("view-shipment:noLabels")
14943
+ })), (_b = sortLabels(labels)) === null || _b === void 0 ? void 0 : _b.map((label, i, data) => {
14706
14944
  const carrier = carriers === null || carriers === void 0 ? void 0 : carriers.find(c => c.carrierCode === label.carrierCode);
14707
14945
  const service = carrier === null || carrier === void 0 ? void 0 : carrier.services.find(s => s.serviceCode === label.serviceCode);
14708
14946
  return jsxs(Fragment$1, {
@@ -14818,7 +15056,7 @@ var index = /*#__PURE__*/Object.freeze({
14818
15056
  SuspendShipment: SuspendShipment,
14819
15057
  WarehouseForm: WarehouseForm,
14820
15058
  WalletForm: WalletForm,
14821
- styles: styles$k,
15059
+ styles: styles$j,
14822
15060
  billingAddressSchema: billingAddressSchema,
14823
15061
  walletSchema: walletSchema,
14824
15062
  BillingFields: BillingFields,
@@ -14828,208 +15066,6 @@ var index = /*#__PURE__*/Object.freeze({
14828
15066
  AddressPreferenceSelect: AddressPreferenceSelect
14829
15067
  });
14830
15068
 
14831
- const styles$1 = createStyles({
14832
- edit: theme => ({
14833
- color: theme.palette.primary.main,
14834
- padding: `0 ${theme.spacing(2)}`
14835
- }),
14836
- getForm: showForm => theme => ({
14837
- backgroundColor: theme.palette.gray.megaLight,
14838
- display: showForm ? "flex" : "none",
14839
- flexDirection: "column",
14840
- padding: theme.spacing(2)
14841
- }),
14842
- input: theme => ({
14843
- width: theme.spacing(13)
14844
- }),
14845
- marginLeft: {
14846
- marginLeft: "auto"
14847
- }
14848
- });
14849
-
14850
- const autoFundingSchema = z.object({
14851
- isEnabled: z.boolean(),
14852
- lowBalancePurchaseThreshold: moneySchema.extend({
14853
- amount: z.number().min(10)
14854
- }),
14855
- maximumPurchasesPerDay: z.number().min(1),
14856
- purchaseAmount: moneySchema.extend({
14857
- amount: z.number().min(10).max(10000)
14858
- })
14859
- });
14860
-
14861
- /**
14862
- * This form that allows users to enable or disable auto funding, and
14863
- * configure auto funding rules in ShipEngine API.
14864
- *
14865
- * @param carrierId The carrierId of the carrier provider you wish to configure auto-funding rules for.
14866
- */
14867
- const AutoFundingForm = ({
14868
- carrierId
14869
- }) => {
14870
- const {
14871
- t
14872
- } = useTranslation();
14873
- const updateAutoFunding = useUpdateAutoFunding(carrierId);
14874
- const autoFundingConfiguration = useGetAutoFundingConfiguration(carrierId);
14875
- const {
14876
- data: autoFundingSettings
14877
- } = autoFundingConfiguration;
14878
- const [showForm, setShowForm] = useState(false);
14879
- const [isSwitchOn, setIsSwitchOn] = useState(false);
14880
- const form = useForm({
14881
- resolver: validationResolver(autoFundingSchema)
14882
- });
14883
- const watchIsEnabled = form.watch("isEnabled");
14884
- const formReset = isEnabled => form.reset(values => Object.assign(Object.assign({}, values), {
14885
- isEnabled
14886
- }), {
14887
- keepDirty: true
14888
- });
14889
- const handleSubmit = formLogger.capture(form.handleSubmit(values => {
14890
- setShowForm(prev => !prev);
14891
- setIsSwitchOn(true);
14892
- const payload = values;
14893
- updateAutoFunding.mutate(payload, {
14894
- onSuccess: () => autoFundingConfiguration.refetch()
14895
- });
14896
- }));
14897
- /**
14898
- * This function toggles the form visibility and conditionally disables auto-funding
14899
- * when falsy. This is because when someone toggles the enable auto-funding switch
14900
- * off, they do not want to have auto-funding enabled at all.
14901
- */
14902
- const handleToggle = isEnabled => {
14903
- setIsSwitchOn(isEnabled);
14904
- setShowForm(isEnabled);
14905
- formReset(isEnabled);
14906
- if (!isEnabled) {
14907
- setIsSwitchOn(isEnabled);
14908
- updateAutoFunding.mutate(form.getValues(), {
14909
- onSuccess: () => autoFundingConfiguration.refetch()
14910
- });
14911
- }
14912
- };
14913
- if (autoFundingConfiguration.isLoading || updateAutoFunding.isLoading) return jsx(Loader, {
14914
- message: t("manage-funding:autoFunding.isLoading")
14915
- });
14916
- if (!autoFundingSettings) throw new Error(t("errorMessages:unableToLoad.autoFundingSettings"));
14917
- return jsxs(Fragment, {
14918
- children: [jsxs(Spread, {
14919
- children: [jsx(Typography, Object.assign({
14920
- bold: !!(autoFundingSettings === null || autoFundingSettings === void 0 ? void 0 : autoFundingSettings.isAutoPurchaseEnabled),
14921
- variant: "body1"
14922
- }, {
14923
- children: t("manage-funding:autoFunding:isEnabledCTA")
14924
- })), jsx(Switch, {
14925
- "data-testid": "auto-funding-toggle",
14926
- defaultChecked: isSwitchOn,
14927
- name: "isEnabled",
14928
- onChange: e => handleToggle(e.target.checked),
14929
- value: isSwitchOn
14930
- })]
14931
- }), jsx(Spacer, {
14932
- multiplier: 1
14933
- }), !!(autoFundingSettings === null || autoFundingSettings === void 0 ? void 0 : autoFundingSettings.isAutoPurchaseEnabled) && !showForm && jsxs(Spread, {
14934
- children: [jsx(Typography, Object.assign({
14935
- variant: "body1"
14936
- }, {
14937
- children: t("manage-funding:autoFunding.readSettings", Object.assign({}, autoFundingSettings))
14938
- })), jsx(LinkAction, {
14939
- css: styles$1.edit,
14940
- onClick: () => handleToggle(true),
14941
- title: t("manage-funding:autoFunding:edit")
14942
- })]
14943
- }), jsxs("form", Object.assign({
14944
- css: styles$1.getForm(showForm),
14945
- "data-testid": "auto-funding-form",
14946
- id: "auto-funding-form",
14947
- onSubmit: handleSubmit
14948
- }, {
14949
- children: [jsx(Typography, Object.assign({
14950
- bold: true,
14951
- variant: "body1"
14952
- }, {
14953
- children: t("manage-funding:autoFunding:editSettings")
14954
- })), jsx("div", Object.assign({
14955
- css: styles$1.marginLeft
14956
- }, {
14957
- children: jsx(MoneyInput, {
14958
- control: form.control,
14959
- css: styles$1.input,
14960
- "data-testid": "auto-funding-threshold-input",
14961
- defaultValue: {
14962
- amount: autoFundingSettings === null || autoFundingSettings === void 0 ? void 0 : autoFundingSettings.autoPurchaseThreshold,
14963
- currency: Currency.USD
14964
- },
14965
- disabled: !watchIsEnabled,
14966
- label: t("manage-funding:autoFunding.lowBalancePurchaseThreshold"),
14967
- labelWeight: "normal",
14968
- name: "lowBalancePurchaseThreshold",
14969
- showCurrencySymbol: true
14970
- })
14971
- })), jsx("div", Object.assign({
14972
- css: styles$1.marginLeft
14973
- }, {
14974
- children: jsx(MoneyInput, {
14975
- control: form.control,
14976
- css: styles$1.input,
14977
- "data-testid": "auto-funding-purchase-amount-input",
14978
- defaultValue: {
14979
- amount: autoFundingSettings === null || autoFundingSettings === void 0 ? void 0 : autoFundingSettings.autoPurchaseAmount,
14980
- currency: Currency.USD
14981
- },
14982
- disabled: !watchIsEnabled,
14983
- label: t("manage-funding:autoFunding.purchaseAmount"),
14984
- labelWeight: "normal",
14985
- name: "purchaseAmount",
14986
- showCurrencySymbol: true
14987
- })
14988
- })), jsx("div", Object.assign({
14989
- css: styles$1.marginLeft
14990
- }, {
14991
- children: jsx(NumberInput, {
14992
- control: form.control,
14993
- css: styles$1.input,
14994
- "data-testid": "auto-funding-max-per-day-input",
14995
- defaultValue: autoFundingSettings === null || autoFundingSettings === void 0 ? void 0 : autoFundingSettings.autoPurchaseCutoff,
14996
- disabled: !watchIsEnabled,
14997
- isInteger: true,
14998
- label: t("manage-funding:autoFunding.maximumPurchasesPerDay"),
14999
- labelWeight: "normal",
15000
- name: "maximumPurchasesPerDay"
15001
- })
15002
- })), jsxs(ButtonGroup, Object.assign({
15003
- justify: "end"
15004
- }, {
15005
- children: [jsx(Button, Object.assign({
15006
- onClick: isSwitchOn ? () => setShowForm(false) : () => handleToggle(false),
15007
- variant: ButtonVariant.TEXT
15008
- }, {
15009
- children: t("actions.cancel")
15010
- })), jsx(SubmitButton, Object.assign({
15011
- control: form.control,
15012
- "data-testid": "submit-auto-funding",
15013
- disabled: !watchIsEnabled,
15014
- requireDirty: true,
15015
- variant: ButtonVariant.OUTLINED
15016
- }, {
15017
- children: t("manage-funding:actions.saveRule")
15018
- }))]
15019
- }))]
15020
- })), autoFundingConfiguration.error && jsxs(Fragment, {
15021
- children: [jsx(Spacer, {
15022
- multiplier: 1
15023
- }), jsx(InlineNotification, Object.assign({
15024
- title: t("manage-funding:autoFunding.error.title"),
15025
- type: NotificationType.ERROR
15026
- }, {
15027
- children: autoFundingConfiguration.error[0].message
15028
- }))]
15029
- })]
15030
- });
15031
- };
15032
-
15033
15069
  const styles = createStyles({
15034
15070
  getDateRangeSelect: fullWidth => theme => ({
15035
15071
  minWidth: theme.spacing(30),
@@ -15335,6 +15371,7 @@ var common = {
15335
15371
  },
15336
15372
  errorMessages: {
15337
15373
  invalidNameOrCompany: "Recipient name and company name (if provided) must have two characters in first and last name.",
15374
+ parsingFailure: "Parsing failed. Please check address and try again.",
15338
15375
  noWarehouses: "You must have an active Ship From Location to use this feature.",
15339
15376
  unableToLoad: {
15340
15377
  accountSettings: "Unable to load account settings",
@@ -15800,7 +15837,8 @@ var viewShipment$1 = {
15800
15837
  multipleShippingServices: "Multiple shipping services",
15801
15838
  sections: {
15802
15839
  labels: "Labels"
15803
- }
15840
+ },
15841
+ noLabels: "No Labels"
15804
15842
  }
15805
15843
  };
15806
15844
 
@@ -15975,13 +16013,16 @@ const useAddress = ({
15975
16013
  } = useUpdateSalesOrderShipment();
15976
16014
  const {
15977
16015
  error: parseAddressErrors,
15978
- mutateAsync: parseAddress
16016
+ mutateAsync: parseAddress,
16017
+ reset: resetParseAddress
15979
16018
  } = useParseAddress();
15980
16019
  const [addressPreference, _setAddressPreference] = useState();
15981
16020
  const [loading, setLoading] = useState(true);
15982
16021
  const setAddressPreference = useCallback((...args) => {
15983
- setLoading(false);
15984
16022
  _setAddressPreference(...args);
16023
+ if (args.length > 0 && args[0]) {
16024
+ setLoading(false);
16025
+ }
15985
16026
  }, [_setAddressPreference]);
15986
16027
  const toggle = useCallback(() => {
15987
16028
  let updatedSelection = undefined;
@@ -16108,14 +16149,16 @@ const useAddress = ({
16108
16149
  title: t("charsetWarnings.address.title")
16109
16150
  };
16110
16151
  }, undefined), [addressPreference === null || addressPreference === void 0 ? void 0 : addressPreference.selection, t]);
16111
- const errors = [...(validateAddressErrors !== null && validateAddressErrors !== void 0 ? validateAddressErrors : []), ...(updateShipmentErrors !== null && updateShipmentErrors !== void 0 ? updateShipmentErrors : []), ...(parseAddressErrors !== null && parseAddressErrors !== void 0 ? parseAddressErrors : [])];
16152
+ const errors = [...(validateAddressErrors !== null && validateAddressErrors !== void 0 ? validateAddressErrors : []), ...(updateShipmentErrors !== null && updateShipmentErrors !== void 0 ? updateShipmentErrors : [])];
16112
16153
  return {
16113
- addressLoading: loading,
16114
16154
  addressErrors: errors.length > 0 ? errors : undefined,
16155
+ addressLoading: loading,
16115
16156
  addressPreference,
16116
16157
  charsetWarning,
16117
16158
  handleChangeAddress,
16118
- handleParseShipTo
16159
+ handleParseShipTo,
16160
+ parseAddressErrors: parseAddressErrors !== null && parseAddressErrors !== void 0 ? parseAddressErrors : undefined,
16161
+ resetParseAddress
16119
16162
  };
16120
16163
  };
16121
16164
 
@@ -16211,6 +16254,9 @@ const useScrubErrors = ({
16211
16254
  var usps_first_class_mail = [
16212
16255
  "First Class Mail shipments must weigh less than {{weight}} oz. Shipments exceeding the weight entered when buying the label will be charged an adjustment fee by USPS."
16213
16256
  ];
16257
+ var usps_ground_advantage = [
16258
+ "USPS Ground Advantage™ service is an affordable and reliable way to send packages inside the U.S. expected in 2–5 business days for items up to 70 lbs."
16259
+ ];
16214
16260
  var usps_media_mail = [
16215
16261
  "Media Mail® can only be used for shipping books, sound recordings, manuscripts, printed music, and other media in packages weighing 70 lbs. or less. Packages containing unsupported items may be subject to post-billing adjustment fees or returned to the sender."
16216
16262
  ];
@@ -16252,6 +16298,7 @@ var rateMessages = {
16252
16298
  "Tracking and refunds are not available for First Class Mail Large Envelopes or Flats labels."
16253
16299
  ],
16254
16300
  usps_first_class_mail: usps_first_class_mail,
16301
+ usps_ground_advantage: usps_ground_advantage,
16255
16302
  usps_media_mail: usps_media_mail,
16256
16303
  usps_parcel_select: usps_parcel_select,
16257
16304
  usps_priority_mail: usps_priority_mail,
@@ -16532,7 +16579,9 @@ const useShipmentForm = ({
16532
16579
  addressPreference,
16533
16580
  charsetWarning,
16534
16581
  handleChangeAddress,
16535
- handleParseShipTo
16582
+ handleParseShipTo,
16583
+ parseAddressErrors,
16584
+ resetParseAddress
16536
16585
  } = useAddress({
16537
16586
  compatibleCountryCodes,
16538
16587
  onChange: useCallback((oldShipment, updatedShipment) => __awaiter(void 0, void 0, void 0, function* () {
@@ -16590,6 +16639,8 @@ const useShipmentForm = ({
16590
16639
  onSubmit: handleSubmit,
16591
16640
  onSubmitParseShipTo: handleParseShipTo,
16592
16641
  onUpdateCustoms: handleUpdateCustoms,
16642
+ parseAddressErrors,
16643
+ resetParseAddress,
16593
16644
  resetSalesOrderShipment,
16594
16645
  salesOrder,
16595
16646
  shipment,