@shipengine/elements 0.31.0 → 0.32.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +390 -370
- package/index.js +393 -373
- package/package.json +1 -1
- package/src/components/preset-descriptor/preset-descriptor.styles.d.ts +1 -0
- package/src/elements/account-settings/account-settings.d.ts +1 -0
- package/src/elements/onboarding/onboarding.d.ts +1 -0
- package/src/elements/purchase-label/purchase-label.d.ts +1 -0
- package/src/elements/view-shipment/view-shipment.d.ts +1 -0
- package/src/elements/void-label/void-label.d.ts +1 -0
- package/src/locales/en/index.d.ts +1 -0
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
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,
|
|
4
|
-
import alchemy, { SE, logger, useValidateAddresses, useListCarriers, useConnectCarrier, useListWarehouses, useUpdateWarehouse, useCreateWarehouse, useDeleteWarehouse, useGetWalletHistory, useGetAccountSettings, useUpdateAccountSettings, useAddFunds, useGetCarrierById,
|
|
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: "
|
|
3844
|
-
}, process.env.NODE_ENV === "production" ? "" : ";label:getContainerStyles;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInByZXNldC1kZXNjcmlwdG9yLnN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDNkMiLCJmaWxlIjoicHJlc2V0LWRlc2NyaXB0b3Iuc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSBcIkBlbW90aW9uL3JlYWN0XCI7XHJcbmV4cG9ydCBjb25zdCBnZXRDb250YWluZXJTdHlsZXMgPSAodGhlbWUpID0+
|
|
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+
|
|
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+
|
|
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,
|
|
3858
|
-
|
|
3859
|
-
|
|
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:
|
|
3863
|
-
children: [
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
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:
|
|
3875
|
-
}))]
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
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
|
|
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 =
|
|
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$
|
|
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$
|
|
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$
|
|
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
|
}));
|
|
@@ -8936,7 +9152,7 @@ const AddressParser = ({
|
|
|
8936
9152
|
}));
|
|
8937
9153
|
};
|
|
8938
9154
|
|
|
8939
|
-
const styles$
|
|
9155
|
+
const styles$k = createStyles({
|
|
8940
9156
|
grow: {
|
|
8941
9157
|
flexGrow: 1
|
|
8942
9158
|
},
|
|
@@ -8997,6 +9213,22 @@ const AddressFields = ({
|
|
|
8997
9213
|
labelWeight: "normal",
|
|
8998
9214
|
name: _formatFieldName("companyName"),
|
|
8999
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
|
|
9000
9232
|
}), jsx(TextInput, {
|
|
9001
9233
|
control: form.control,
|
|
9002
9234
|
form: formId,
|
|
@@ -9019,30 +9251,14 @@ const AddressFields = ({
|
|
|
9019
9251
|
labelWeight: "normal",
|
|
9020
9252
|
name: _formatFieldName("cityLocality"),
|
|
9021
9253
|
nativeLabel: true
|
|
9022
|
-
}), jsx(SelectAutoComplete, {
|
|
9023
|
-
control: form.control,
|
|
9024
|
-
form: formId,
|
|
9025
|
-
label: t("address.fields.countryCode"),
|
|
9026
|
-
labelWeight: "normal",
|
|
9027
|
-
name: _formatFieldName("countryCode"),
|
|
9028
|
-
nativeLabel: true,
|
|
9029
|
-
noResultsLabel: t("address.noResults"),
|
|
9030
|
-
onChange: value => {
|
|
9031
|
-
if (value) {
|
|
9032
|
-
form.setValue(_formatFieldName("stateProvince"), null, {
|
|
9033
|
-
shouldValidate: isSubmitted
|
|
9034
|
-
});
|
|
9035
|
-
}
|
|
9036
|
-
},
|
|
9037
|
-
options: countryCodeOptions
|
|
9038
9254
|
}), jsxs("div", Object.assign({
|
|
9039
|
-
css: styles$
|
|
9255
|
+
css: styles$k.stateZipWrapper
|
|
9040
9256
|
}, {
|
|
9041
9257
|
children: [jsx("div", Object.assign({
|
|
9042
|
-
css: styles$
|
|
9258
|
+
css: styles$k.stateWrapper
|
|
9043
9259
|
}, {
|
|
9044
9260
|
children: jsx("div", Object.assign({
|
|
9045
|
-
css: styles$
|
|
9261
|
+
css: styles$k.grow
|
|
9046
9262
|
}, {
|
|
9047
9263
|
children: watchCountryCode === "US" ?
|
|
9048
9264
|
// Domestic States
|
|
@@ -9067,10 +9283,10 @@ const AddressFields = ({
|
|
|
9067
9283
|
})
|
|
9068
9284
|
}))
|
|
9069
9285
|
})), jsx("div", Object.assign({
|
|
9070
|
-
css: styles$
|
|
9286
|
+
css: styles$k.zipWrapper
|
|
9071
9287
|
}, {
|
|
9072
9288
|
children: jsx("div", Object.assign({
|
|
9073
|
-
css: styles$
|
|
9289
|
+
css: styles$k.grow
|
|
9074
9290
|
}, {
|
|
9075
9291
|
children: jsx(TextInput, {
|
|
9076
9292
|
control: form.control,
|
|
@@ -9865,7 +10081,7 @@ const EditWalletAddressForm = ({
|
|
|
9865
10081
|
}));
|
|
9866
10082
|
};
|
|
9867
10083
|
|
|
9868
|
-
const styles$
|
|
10084
|
+
const styles$j = createStyles({
|
|
9869
10085
|
grid: theme => ({
|
|
9870
10086
|
margin: theme.spacing(4)
|
|
9871
10087
|
})
|
|
@@ -9927,7 +10143,7 @@ const WalletForm = ({
|
|
|
9927
10143
|
onSubmit: formLogger.capture(handleSubmit)
|
|
9928
10144
|
}, {
|
|
9929
10145
|
children: jsxs(Grid, Object.assign({
|
|
9930
|
-
css: styles$
|
|
10146
|
+
css: styles$j.grid,
|
|
9931
10147
|
noPadding: true
|
|
9932
10148
|
}, {
|
|
9933
10149
|
children: [jsx(GridChild, Object.assign({
|
|
@@ -10009,7 +10225,7 @@ const WalletForm = ({
|
|
|
10009
10225
|
}));
|
|
10010
10226
|
};
|
|
10011
10227
|
|
|
10012
|
-
const styles$
|
|
10228
|
+
const styles$i = createStyles({
|
|
10013
10229
|
boldLink: theme => ({
|
|
10014
10230
|
fontWeight: theme.typography.fontWeight.bold
|
|
10015
10231
|
}),
|
|
@@ -10051,11 +10267,11 @@ const EditBillingForm = ({
|
|
|
10051
10267
|
onSubmit: formLogger.capture(handleSubmit)
|
|
10052
10268
|
}, {
|
|
10053
10269
|
children: jsxs(Grid, Object.assign({
|
|
10054
|
-
css: styles$
|
|
10270
|
+
css: styles$i.container
|
|
10055
10271
|
}, {
|
|
10056
10272
|
children: [jsx(GridChild, Object.assign({
|
|
10057
10273
|
colSpan: 12,
|
|
10058
|
-
css: styles$
|
|
10274
|
+
css: styles$i.subtitle
|
|
10059
10275
|
}, {
|
|
10060
10276
|
children: jsx(Typography, Object.assign({
|
|
10061
10277
|
variant: "subtitle1"
|
|
@@ -10070,7 +10286,7 @@ const EditBillingForm = ({
|
|
|
10070
10286
|
})
|
|
10071
10287
|
})), jsx(GridChild, Object.assign({
|
|
10072
10288
|
colSpan: 12,
|
|
10073
|
-
css: styles$
|
|
10289
|
+
css: styles$i.subtitle
|
|
10074
10290
|
}, {
|
|
10075
10291
|
children: jsx(Typography, Object.assign({
|
|
10076
10292
|
variant: "subtitle1"
|
|
@@ -10106,7 +10322,7 @@ const EditBillingForm = ({
|
|
|
10106
10322
|
children: t("actions.cancel")
|
|
10107
10323
|
})), jsx(SubmitButton, Object.assign({
|
|
10108
10324
|
control: form.control,
|
|
10109
|
-
css: styles$
|
|
10325
|
+
css: styles$i.boldLink,
|
|
10110
10326
|
variant: ButtonVariant.OUTLINED
|
|
10111
10327
|
}, {
|
|
10112
10328
|
children: t("actions.save")
|
|
@@ -10125,7 +10341,7 @@ var img$1 = "data:image/svg+xml,%3csvg width='150' height='96' viewBox='0 0 150
|
|
|
10125
10341
|
|
|
10126
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";
|
|
10127
10343
|
|
|
10128
|
-
const styles$
|
|
10344
|
+
const styles$h = createStyles({
|
|
10129
10345
|
body: theme => ({
|
|
10130
10346
|
borderTop: `1px solid ${theme.palette.gray.light}`,
|
|
10131
10347
|
color: theme.palette.black,
|
|
@@ -10176,14 +10392,14 @@ const SettingsCard = ({
|
|
|
10176
10392
|
verticallyAligned
|
|
10177
10393
|
}) => {
|
|
10178
10394
|
return jsxs("div", Object.assign({
|
|
10179
|
-
css: verticallyAligned ? styles$
|
|
10395
|
+
css: verticallyAligned ? styles$h.verticalContainer : styles$h.container,
|
|
10180
10396
|
"data-testid": "settingsCard"
|
|
10181
10397
|
}, {
|
|
10182
10398
|
children: [jsxs("div", Object.assign({
|
|
10183
|
-
css: styles$
|
|
10399
|
+
css: styles$h.header
|
|
10184
10400
|
}, {
|
|
10185
10401
|
children: [jsxs("div", Object.assign({
|
|
10186
|
-
css: styles$
|
|
10402
|
+
css: styles$h.title
|
|
10187
10403
|
}, {
|
|
10188
10404
|
children: [typeof title === "string" ? jsx(Typography, Object.assign({
|
|
10189
10405
|
variant: "subtitle2"
|
|
@@ -10211,7 +10427,7 @@ const SettingsCard = ({
|
|
|
10211
10427
|
}))
|
|
10212
10428
|
}))]
|
|
10213
10429
|
})), children && jsx("div", Object.assign({
|
|
10214
|
-
css: styles$
|
|
10430
|
+
css: styles$h.body
|
|
10215
10431
|
}, {
|
|
10216
10432
|
children: jsxs("div", {
|
|
10217
10433
|
children: [children, accessoryAction && jsx(ButtonGroup, Object.assign({
|
|
@@ -10232,7 +10448,7 @@ const SettingsCard = ({
|
|
|
10232
10448
|
}));
|
|
10233
10449
|
};
|
|
10234
10450
|
|
|
10235
|
-
const styles$
|
|
10451
|
+
const styles$g = createStyles({
|
|
10236
10452
|
container: {
|
|
10237
10453
|
display: "flex",
|
|
10238
10454
|
height: "72px",
|
|
@@ -10262,7 +10478,7 @@ const WalletCard = ({
|
|
|
10262
10478
|
};
|
|
10263
10479
|
const Logo = provider ? logos[provider] : undefined;
|
|
10264
10480
|
return jsx("div", Object.assign({
|
|
10265
|
-
css: styles$
|
|
10481
|
+
css: styles$g.container
|
|
10266
10482
|
}, {
|
|
10267
10483
|
children: jsx(SettingsCard, {
|
|
10268
10484
|
cardAction: {
|
|
@@ -10276,7 +10492,7 @@ const WalletCard = ({
|
|
|
10276
10492
|
src: Logo,
|
|
10277
10493
|
width: 56
|
|
10278
10494
|
}) : jsx(Icon, {
|
|
10279
|
-
css: styles$
|
|
10495
|
+
css: styles$g.icon,
|
|
10280
10496
|
name: IconNames.CREDIT_CARD,
|
|
10281
10497
|
size: IconSize.SIZE_LARGE
|
|
10282
10498
|
}), jsx(Typography, Object.assign({
|
|
@@ -10360,7 +10576,7 @@ var SvgShipengineLogo = function SvgShipengineLogo(props) {
|
|
|
10360
10576
|
})))));
|
|
10361
10577
|
};
|
|
10362
10578
|
|
|
10363
|
-
const styles$
|
|
10579
|
+
const styles$f = createStyles({
|
|
10364
10580
|
poweredByShipEngine: {
|
|
10365
10581
|
alignItems: "center",
|
|
10366
10582
|
color: "#818F9C",
|
|
@@ -10377,7 +10593,7 @@ const PoweredByShipEngine = () => {
|
|
|
10377
10593
|
t
|
|
10378
10594
|
} = useTranslation();
|
|
10379
10595
|
return jsxs("div", Object.assign({
|
|
10380
|
-
css: styles$
|
|
10596
|
+
css: styles$f.poweredByShipEngine
|
|
10381
10597
|
}, {
|
|
10382
10598
|
children: [jsx(Typography, Object.assign({
|
|
10383
10599
|
variant: "body2"
|
|
@@ -10536,7 +10752,7 @@ const AccountSettings = _a => {
|
|
|
10536
10752
|
});
|
|
10537
10753
|
};
|
|
10538
10754
|
|
|
10539
|
-
const styles$
|
|
10755
|
+
const styles$e = createStyles({
|
|
10540
10756
|
agreement: {
|
|
10541
10757
|
alignItems: "center",
|
|
10542
10758
|
display: "flex",
|
|
@@ -10614,10 +10830,10 @@ const DisplayCarrierTerms = c => {
|
|
|
10614
10830
|
const listCarrierLinks = () => {
|
|
10615
10831
|
return c.carrierTerms.links.map((term, index) => {
|
|
10616
10832
|
return jsx("li", Object.assign({
|
|
10617
|
-
css: styles$
|
|
10833
|
+
css: styles$e.listItems
|
|
10618
10834
|
}, {
|
|
10619
10835
|
children: jsx(Link, Object.assign({
|
|
10620
|
-
css: styles$
|
|
10836
|
+
css: styles$e.link,
|
|
10621
10837
|
href: term.url,
|
|
10622
10838
|
isExternal: true,
|
|
10623
10839
|
target: "_blank"
|
|
@@ -10636,18 +10852,18 @@ const DisplayCarrierTerms = c => {
|
|
|
10636
10852
|
children: [jsx(Spacer, {
|
|
10637
10853
|
multiplier: 3
|
|
10638
10854
|
}), jsxs("div", Object.assign({
|
|
10639
|
-
css: styles$
|
|
10855
|
+
css: styles$e.terms
|
|
10640
10856
|
}, {
|
|
10641
10857
|
children: [jsx(Typography, Object.assign({
|
|
10642
10858
|
variant: "subtitle1"
|
|
10643
10859
|
}, {
|
|
10644
10860
|
children: c.carrierTerms.title
|
|
10645
10861
|
})), !!listCarrierContent().length && jsx("div", Object.assign({
|
|
10646
|
-
css: styles$
|
|
10862
|
+
css: styles$e.terms
|
|
10647
10863
|
}, {
|
|
10648
10864
|
children: listCarrierContent()
|
|
10649
10865
|
})), jsx("ul", Object.assign({
|
|
10650
|
-
css: styles$
|
|
10866
|
+
css: styles$e.links
|
|
10651
10867
|
}, {
|
|
10652
10868
|
children: listCarrierLinks()
|
|
10653
10869
|
}))]
|
|
@@ -10797,7 +11013,7 @@ const AddCarrierForm = ({
|
|
|
10797
11013
|
}));
|
|
10798
11014
|
};
|
|
10799
11015
|
|
|
10800
|
-
const styles$
|
|
11016
|
+
const styles$d = createStyles({
|
|
10801
11017
|
container: theme => ({
|
|
10802
11018
|
display: "flex",
|
|
10803
11019
|
gap: theme.spacing()
|
|
@@ -10835,13 +11051,13 @@ const Disclosure = ({
|
|
|
10835
11051
|
}, [open]);
|
|
10836
11052
|
return jsxs(Fragment, {
|
|
10837
11053
|
children: [jsxs("div", Object.assign({
|
|
10838
|
-
css: styles$
|
|
11054
|
+
css: styles$d.container
|
|
10839
11055
|
}, {
|
|
10840
11056
|
children: [jsx("div", {
|
|
10841
11057
|
children: label
|
|
10842
11058
|
}), _showToggle && jsx("button", Object.assign({
|
|
10843
11059
|
"aria-expanded": isOpen,
|
|
10844
|
-
css: styles$
|
|
11060
|
+
css: styles$d.toggle,
|
|
10845
11061
|
onClick: () => {
|
|
10846
11062
|
setIsOpen(!isOpen);
|
|
10847
11063
|
onToggle(!isOpen);
|
|
@@ -10849,12 +11065,12 @@ const Disclosure = ({
|
|
|
10849
11065
|
type: "button"
|
|
10850
11066
|
}, {
|
|
10851
11067
|
children: jsx(Icon, {
|
|
10852
|
-
css: styles$
|
|
11068
|
+
css: styles$d.icon,
|
|
10853
11069
|
name: isOpen ? IconNames.CHEVRON_TOP : IconNames.CHEVRON_BOTTOM
|
|
10854
11070
|
})
|
|
10855
11071
|
}))]
|
|
10856
11072
|
})), isOpen && jsx("div", Object.assign({
|
|
10857
|
-
css: styles$
|
|
11073
|
+
css: styles$d.content
|
|
10858
11074
|
}, {
|
|
10859
11075
|
children: typeof children === "function" ? children(() => setIsOpen(!isOpen)) : children
|
|
10860
11076
|
}))]
|
|
@@ -10982,7 +11198,7 @@ const getCarrierRecoverySchema = requiresAddress => z.object({
|
|
|
10982
11198
|
address: requiresAddress ? baseSchema : baseSchema.optional()
|
|
10983
11199
|
});
|
|
10984
11200
|
|
|
10985
|
-
const styles$
|
|
11201
|
+
const styles$c = createStyles({
|
|
10986
11202
|
grid: theme => ({
|
|
10987
11203
|
margin: theme.spacing(4)
|
|
10988
11204
|
}),
|
|
@@ -11026,7 +11242,7 @@ const CarrierRecoveryForm = ({
|
|
|
11026
11242
|
onSubmit: formLogger.capture(handleSubmit)
|
|
11027
11243
|
}, {
|
|
11028
11244
|
children: jsxs(Grid, Object.assign({
|
|
11029
|
-
css: styles$
|
|
11245
|
+
css: styles$c.grid,
|
|
11030
11246
|
noPadding: true
|
|
11031
11247
|
}, {
|
|
11032
11248
|
children: [requiresAddress && jsxs(Fragment, {
|
|
@@ -11034,14 +11250,14 @@ const CarrierRecoveryForm = ({
|
|
|
11034
11250
|
colSpan: 12
|
|
11035
11251
|
}, {
|
|
11036
11252
|
children: jsx(Typography, Object.assign({
|
|
11037
|
-
css: styles$
|
|
11253
|
+
css: styles$c.heading,
|
|
11038
11254
|
variant: "heading4"
|
|
11039
11255
|
}, {
|
|
11040
11256
|
children: t("register-wallet:sections.carriers.title")
|
|
11041
11257
|
}))
|
|
11042
11258
|
})), jsx(GridChild, Object.assign({
|
|
11043
11259
|
colSpan: 12,
|
|
11044
|
-
css: styles$
|
|
11260
|
+
css: styles$c.subtitle
|
|
11045
11261
|
}, {
|
|
11046
11262
|
children: jsx(Typography, Object.assign({
|
|
11047
11263
|
variant: "subtitle1"
|
|
@@ -11127,7 +11343,7 @@ const CarrierTermsForm = ({
|
|
|
11127
11343
|
onSubmit(payload.agreement);
|
|
11128
11344
|
}));
|
|
11129
11345
|
return jsxs("div", Object.assign({
|
|
11130
|
-
css: styles$
|
|
11346
|
+
css: styles$e.termsForm,
|
|
11131
11347
|
"data-testid": "carrier-terms-form"
|
|
11132
11348
|
}, {
|
|
11133
11349
|
children: [jsx(Typography, Object.assign({
|
|
@@ -11143,7 +11359,7 @@ const CarrierTermsForm = ({
|
|
|
11143
11359
|
})), jsx(Spacer, {
|
|
11144
11360
|
multiplier: 1
|
|
11145
11361
|
}), jsx("div", Object.assign({
|
|
11146
|
-
css: styles$
|
|
11362
|
+
css: styles$e.carrierLogos
|
|
11147
11363
|
}, {
|
|
11148
11364
|
children: metadatas.map(({
|
|
11149
11365
|
name,
|
|
@@ -11159,7 +11375,7 @@ const CarrierTermsForm = ({
|
|
|
11159
11375
|
onSubmit: formLogger.capture(handleSubmit)
|
|
11160
11376
|
}, {
|
|
11161
11377
|
children: jsxs("div", Object.assign({
|
|
11162
|
-
css: styles$
|
|
11378
|
+
css: styles$e.agreement
|
|
11163
11379
|
}, {
|
|
11164
11380
|
children: [jsx("div", {
|
|
11165
11381
|
children: jsx(CheckboxInput, {
|
|
@@ -11170,7 +11386,7 @@ const CarrierTermsForm = ({
|
|
|
11170
11386
|
size: IconSize.SIZE_SMALL
|
|
11171
11387
|
}),
|
|
11172
11388
|
terms: jsx(Link, {
|
|
11173
|
-
css: styles$
|
|
11389
|
+
css: styles$e.termsLink,
|
|
11174
11390
|
"data-testid": "terms-link",
|
|
11175
11391
|
onClick: e => {
|
|
11176
11392
|
e.preventDefault();
|
|
@@ -11188,7 +11404,7 @@ const CarrierTermsForm = ({
|
|
|
11188
11404
|
name: "agreement"
|
|
11189
11405
|
})
|
|
11190
11406
|
}), showTerms && jsxs("div", Object.assign({
|
|
11191
|
-
css: styles$
|
|
11407
|
+
css: styles$e.well
|
|
11192
11408
|
}, {
|
|
11193
11409
|
children: [jsx(Typography, Object.assign({
|
|
11194
11410
|
variant: "heading4"
|
|
@@ -11197,7 +11413,7 @@ const CarrierTermsForm = ({
|
|
|
11197
11413
|
})), terms.map(t => jsx(DisplayCarrierTerms, {
|
|
11198
11414
|
carrierTerms: t
|
|
11199
11415
|
}, t.title)), jsx("div", Object.assign({
|
|
11200
|
-
css: styles$
|
|
11416
|
+
css: styles$e.close
|
|
11201
11417
|
}, {
|
|
11202
11418
|
children: jsx(Button, Object.assign({
|
|
11203
11419
|
onClick: () => setShowTerms(false),
|
|
@@ -11452,7 +11668,7 @@ const CopyButton = ({
|
|
|
11452
11668
|
}));
|
|
11453
11669
|
};
|
|
11454
11670
|
|
|
11455
|
-
const styles$
|
|
11671
|
+
const styles$b = createStyles({
|
|
11456
11672
|
trackingNumber: theme => ({
|
|
11457
11673
|
alignItems: "center",
|
|
11458
11674
|
display: "flex"
|
|
@@ -11498,10 +11714,10 @@ const Label = ({
|
|
|
11498
11714
|
shippingAmount: label.shipmentCost
|
|
11499
11715
|
}, {
|
|
11500
11716
|
children: label.trackingNumber && jsxs("div", Object.assign({
|
|
11501
|
-
css: styles$
|
|
11717
|
+
css: styles$b.trackingNumber
|
|
11502
11718
|
}, {
|
|
11503
11719
|
children: [jsx("div", Object.assign({
|
|
11504
|
-
css: styles$
|
|
11720
|
+
css: styles$b.truncatedTrackingNumber
|
|
11505
11721
|
}, {
|
|
11506
11722
|
children: label.trackingNumber.toString()
|
|
11507
11723
|
})), jsx(CopyButton, {
|
|
@@ -11613,7 +11829,7 @@ const LandingPageForm = ({
|
|
|
11613
11829
|
}));
|
|
11614
11830
|
};
|
|
11615
11831
|
|
|
11616
|
-
const styles$
|
|
11832
|
+
const styles$a = createStyles({
|
|
11617
11833
|
container: theme => ({
|
|
11618
11834
|
padding: theme.spacing(2)
|
|
11619
11835
|
}),
|
|
@@ -11635,11 +11851,11 @@ const LandingPage = ({
|
|
|
11635
11851
|
t
|
|
11636
11852
|
} = useTranslation();
|
|
11637
11853
|
return jsxs("div", Object.assign({
|
|
11638
|
-
css: styles$
|
|
11854
|
+
css: styles$a.container,
|
|
11639
11855
|
"data-testid": "landing-page"
|
|
11640
11856
|
}, {
|
|
11641
11857
|
children: [jsxs("div", Object.assign({
|
|
11642
|
-
css: styles$
|
|
11858
|
+
css: styles$a.header
|
|
11643
11859
|
}, {
|
|
11644
11860
|
children: [jsx(Typography, Object.assign({
|
|
11645
11861
|
variant: "heading4"
|
|
@@ -11657,7 +11873,7 @@ const LandingPage = ({
|
|
|
11657
11873
|
})), jsx(LandingPageForm, {
|
|
11658
11874
|
onSubmit: onSubmit
|
|
11659
11875
|
}), jsxs("div", Object.assign({
|
|
11660
|
-
css: styles$
|
|
11876
|
+
css: styles$a.header
|
|
11661
11877
|
}, {
|
|
11662
11878
|
children: [jsx(Spacer, {
|
|
11663
11879
|
multiplier: 6
|
|
@@ -11668,14 +11884,14 @@ const LandingPage = ({
|
|
|
11668
11884
|
})), jsx(Spacer, {
|
|
11669
11885
|
multiplier: 2
|
|
11670
11886
|
}), jsx(Typography, Object.assign({
|
|
11671
|
-
css: styles$
|
|
11887
|
+
css: styles$a.description,
|
|
11672
11888
|
variant: "body1"
|
|
11673
11889
|
}, {
|
|
11674
11890
|
children: t("onboarding:landing.messageLine1")
|
|
11675
11891
|
})), jsx(Spacer, {
|
|
11676
11892
|
multiplier: 2
|
|
11677
11893
|
}), jsx(Typography, Object.assign({
|
|
11678
|
-
css: styles$
|
|
11894
|
+
css: styles$a.description,
|
|
11679
11895
|
variant: "body1"
|
|
11680
11896
|
}, {
|
|
11681
11897
|
children: t("onboarding:landing.messageLine2")
|
|
@@ -11686,7 +11902,7 @@ const LandingPage = ({
|
|
|
11686
11902
|
}));
|
|
11687
11903
|
};
|
|
11688
11904
|
|
|
11689
|
-
const styles$
|
|
11905
|
+
const styles$9 = createStyles({
|
|
11690
11906
|
container: {
|
|
11691
11907
|
display: "flex",
|
|
11692
11908
|
flexDirection: "column"
|
|
@@ -11746,14 +11962,14 @@ const ListCarriersRow = ({
|
|
|
11746
11962
|
setIsSubmitting(false);
|
|
11747
11963
|
});
|
|
11748
11964
|
return jsxs("div", Object.assign({
|
|
11749
|
-
css: styles$
|
|
11965
|
+
css: styles$9.container,
|
|
11750
11966
|
"data-testid": "carrier-row"
|
|
11751
11967
|
}, {
|
|
11752
11968
|
children: [jsxs("div", Object.assign({
|
|
11753
|
-
css: styles$
|
|
11969
|
+
css: styles$9.rowContainer
|
|
11754
11970
|
}, {
|
|
11755
11971
|
children: [jsxs("div", Object.assign({
|
|
11756
|
-
css: styles$
|
|
11972
|
+
css: styles$9.logoContainer
|
|
11757
11973
|
}, {
|
|
11758
11974
|
children: [jsx("div", {
|
|
11759
11975
|
children: jsx("img", {
|
|
@@ -11771,7 +11987,7 @@ const ListCarriersRow = ({
|
|
|
11771
11987
|
css: _ref
|
|
11772
11988
|
}, {
|
|
11773
11989
|
children: jsx(LinkAction, {
|
|
11774
|
-
css: styles$
|
|
11990
|
+
css: styles$9.getConnectButton(isConnected),
|
|
11775
11991
|
isDisabled: isConnected || showDropDown,
|
|
11776
11992
|
isLoading: isSubmitting,
|
|
11777
11993
|
onClick: () => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -11789,7 +12005,7 @@ const ListCarriersRow = ({
|
|
|
11789
12005
|
}));
|
|
11790
12006
|
};
|
|
11791
12007
|
|
|
11792
|
-
const styles$
|
|
12008
|
+
const styles$8 = createStyles({
|
|
11793
12009
|
carriersList: theme => ({
|
|
11794
12010
|
"& > li:not(:last-of-type)": {
|
|
11795
12011
|
borderBottom: `1px solid ${theme.palette.gray.light}`
|
|
@@ -11850,7 +12066,7 @@ const ListCarriers = ({
|
|
|
11850
12066
|
}))
|
|
11851
12067
|
})), jsx(Spacer, {})]
|
|
11852
12068
|
}), jsx("ul", Object.assign({
|
|
11853
|
-
css: styles$
|
|
12069
|
+
css: styles$8.carriersList,
|
|
11854
12070
|
"data-testid": "carriers-list"
|
|
11855
12071
|
}, {
|
|
11856
12072
|
children: isLoading ? jsxs(Fragment, {
|
|
@@ -11872,11 +12088,11 @@ const ListCarriers = ({
|
|
|
11872
12088
|
};
|
|
11873
12089
|
const LoadingSkeletonRow = () => {
|
|
11874
12090
|
return jsxs("div", Object.assign({
|
|
11875
|
-
css: styles$
|
|
12091
|
+
css: styles$8.skeletonRow,
|
|
11876
12092
|
"data-testid": "skeleton-carrier-row"
|
|
11877
12093
|
}, {
|
|
11878
12094
|
children: [jsxs("div", Object.assign({
|
|
11879
|
-
css: styles$
|
|
12095
|
+
css: styles$8.skeletonLogoContainer
|
|
11880
12096
|
}, {
|
|
11881
12097
|
children: [jsx(Skeleton, {
|
|
11882
12098
|
animation: SkeletonAnimation.WAVE,
|
|
@@ -12135,7 +12351,7 @@ const WarehouseForm = ({
|
|
|
12135
12351
|
}));
|
|
12136
12352
|
};
|
|
12137
12353
|
|
|
12138
|
-
const styles$
|
|
12354
|
+
const styles$7 = createStyles({
|
|
12139
12355
|
cardSpacing: theme => ({
|
|
12140
12356
|
display: "flex",
|
|
12141
12357
|
flexDirection: "column",
|
|
@@ -12165,9 +12381,9 @@ const ManageWarehouses = ({
|
|
|
12165
12381
|
const [showAddNewWarehouseForm, toggleShowAddNewWarehouseForm] = useToggle(false);
|
|
12166
12382
|
return jsxs(Fragment, {
|
|
12167
12383
|
children: [showAddNewWarehouseForm ? jsx(AddressPreferenceProvider, Object.assign({
|
|
12168
|
-
css: styles$
|
|
12384
|
+
css: styles$7.well,
|
|
12169
12385
|
formHeader: jsxs("div", Object.assign({
|
|
12170
|
-
css: styles$
|
|
12386
|
+
css: styles$7.header
|
|
12171
12387
|
}, {
|
|
12172
12388
|
children: [jsx(Typography, Object.assign({
|
|
12173
12389
|
variant: "subtitle1"
|
|
@@ -12212,14 +12428,14 @@ const ManageWarehouses = ({
|
|
|
12212
12428
|
})]
|
|
12213
12429
|
}))
|
|
12214
12430
|
})), jsx("div", Object.assign({
|
|
12215
|
-
css: styles$
|
|
12431
|
+
css: styles$7.cardSpacing
|
|
12216
12432
|
}, {
|
|
12217
12433
|
children: warehouses.map(warehouse => {
|
|
12218
12434
|
if (editWarehouseId && editWarehouseId === warehouse.warehouseId) {
|
|
12219
12435
|
return jsx(AddressPreferenceProvider, Object.assign({
|
|
12220
|
-
css: styles$
|
|
12436
|
+
css: styles$7.well,
|
|
12221
12437
|
formHeader: jsxs("div", Object.assign({
|
|
12222
|
-
css: styles$
|
|
12438
|
+
css: styles$7.header
|
|
12223
12439
|
}, {
|
|
12224
12440
|
children: [jsx(Typography, Object.assign({
|
|
12225
12441
|
variant: "subtitle1"
|
|
@@ -12338,7 +12554,7 @@ const CompletionPage = ({
|
|
|
12338
12554
|
}));
|
|
12339
12555
|
};
|
|
12340
12556
|
|
|
12341
|
-
const styles$
|
|
12557
|
+
const styles$6 = createStyles({
|
|
12342
12558
|
container: theme => ({
|
|
12343
12559
|
padding: theme.spacing(2)
|
|
12344
12560
|
}),
|
|
@@ -12568,10 +12784,10 @@ const Onboarding = ({
|
|
|
12568
12784
|
if (agreedToTerms && warehouses.length && hasValidAddress && !hasStampsWallet && !hasCompletedBilling) {
|
|
12569
12785
|
return jsx(AddressPreferenceProvider, Object.assign({
|
|
12570
12786
|
formHeader: jsxs("div", Object.assign({
|
|
12571
|
-
css: styles$
|
|
12787
|
+
css: styles$6.walletFormHeader
|
|
12572
12788
|
}, {
|
|
12573
12789
|
children: [jsxs("div", Object.assign({
|
|
12574
|
-
css: styles$
|
|
12790
|
+
css: styles$6.walletFormTitle
|
|
12575
12791
|
}, {
|
|
12576
12792
|
children: [jsx(Typography, Object.assign({
|
|
12577
12793
|
variant: "heading4"
|
|
@@ -12650,22 +12866,22 @@ const Onboarding = ({
|
|
|
12650
12866
|
});
|
|
12651
12867
|
};
|
|
12652
12868
|
return jsxs("div", Object.assign({
|
|
12653
|
-
css: styles$
|
|
12869
|
+
css: styles$6.container
|
|
12654
12870
|
}, {
|
|
12655
12871
|
children: [jsxs(Stepper, Object.assign({
|
|
12656
12872
|
currentStep: currentStep
|
|
12657
12873
|
}, {
|
|
12658
12874
|
children: [jsx(Step, {
|
|
12659
|
-
css: styles$
|
|
12875
|
+
css: styles$6.step,
|
|
12660
12876
|
label: t("onboarding:steps.login")
|
|
12661
12877
|
}), jsx(Step, {
|
|
12662
|
-
css: styles$
|
|
12878
|
+
css: styles$6.step,
|
|
12663
12879
|
label: t("onboarding:steps.carriers")
|
|
12664
12880
|
}), jsx(Step, {
|
|
12665
|
-
css: styles$
|
|
12881
|
+
css: styles$6.step,
|
|
12666
12882
|
label: t("onboarding:steps.addresses")
|
|
12667
12883
|
}), jsx(Step, {
|
|
12668
|
-
css: styles$
|
|
12884
|
+
css: styles$6.step,
|
|
12669
12885
|
label: t("onboarding:steps.payment")
|
|
12670
12886
|
})]
|
|
12671
12887
|
})), renderStep(), ((_c = features === null || features === void 0 ? void 0 : features.presentation) === null || _c === void 0 ? void 0 : _c.poweredByShipEngine) && jsxs(Fragment, {
|
|
@@ -12739,7 +12955,7 @@ const Cube = _a => {
|
|
|
12739
12955
|
}));
|
|
12740
12956
|
};
|
|
12741
12957
|
|
|
12742
|
-
const styles$
|
|
12958
|
+
const styles$5 = createStyles({
|
|
12743
12959
|
balanceText: theme => ({
|
|
12744
12960
|
color: theme.palette.secondary.dark
|
|
12745
12961
|
}),
|
|
@@ -12762,7 +12978,7 @@ const styles$6 = createStyles({
|
|
|
12762
12978
|
}
|
|
12763
12979
|
});
|
|
12764
12980
|
|
|
12765
|
-
const styles$
|
|
12981
|
+
const styles$4 = createStyles({
|
|
12766
12982
|
icon: theme => ({
|
|
12767
12983
|
color: theme.palette.primary.main,
|
|
12768
12984
|
marginRight: theme.spacing(2)
|
|
@@ -12807,10 +13023,10 @@ const Section = _a => {
|
|
|
12807
13023
|
rest = __rest(_a, ["bold", "title", "children", "rightContent"]);
|
|
12808
13024
|
return jsxs(Fragment, {
|
|
12809
13025
|
children: [title && jsx("summary", Object.assign({
|
|
12810
|
-
css: styles$
|
|
13026
|
+
css: styles$4.summary
|
|
12811
13027
|
}, {
|
|
12812
13028
|
children: jsxs("div", Object.assign({
|
|
12813
|
-
css: styles$
|
|
13029
|
+
css: styles$4.summaryWrapper
|
|
12814
13030
|
}, {
|
|
12815
13031
|
children: [jsx(Typography, Object.assign({
|
|
12816
13032
|
bold: bold,
|
|
@@ -12818,13 +13034,13 @@ const Section = _a => {
|
|
|
12818
13034
|
}, {
|
|
12819
13035
|
children: title
|
|
12820
13036
|
})), rightContent && jsx("div", Object.assign({
|
|
12821
|
-
css: styles$
|
|
13037
|
+
css: styles$4.rightContentWrapper
|
|
12822
13038
|
}, {
|
|
12823
13039
|
children: rightContent
|
|
12824
13040
|
}))]
|
|
12825
13041
|
}))
|
|
12826
13042
|
})), jsx("section", Object.assign({
|
|
12827
|
-
css: styles$
|
|
13043
|
+
css: styles$4.section
|
|
12828
13044
|
}, rest, {
|
|
12829
13045
|
children: children
|
|
12830
13046
|
}))]
|
|
@@ -12896,7 +13112,7 @@ const FundAndPurchase = ({
|
|
|
12896
13112
|
}, {
|
|
12897
13113
|
children: [jsx(Button, Object.assign({
|
|
12898
13114
|
bold: false,
|
|
12899
|
-
css: styles$
|
|
13115
|
+
css: styles$5.saveRateButton,
|
|
12900
13116
|
disabled: disabled || !carrierId || addFundsForm.isSubmitting || isRateFormSubmitting,
|
|
12901
13117
|
isLoading: isSavingRate,
|
|
12902
13118
|
onClick: handleSaveRate,
|
|
@@ -12916,7 +13132,7 @@ const FundAndPurchase = ({
|
|
|
12916
13132
|
// render when no rate has been selected yet
|
|
12917
13133
|
if (!carrierId) return jsxs("div", Object.assign({
|
|
12918
13134
|
className: className,
|
|
12919
|
-
css: styles$
|
|
13135
|
+
css: styles$5.container
|
|
12920
13136
|
}, {
|
|
12921
13137
|
children: [jsxs(Spread, {
|
|
12922
13138
|
children: [jsx(CarrierBalance, {
|
|
@@ -12940,7 +13156,7 @@ const FundAndPurchase = ({
|
|
|
12940
13156
|
// show balance, but not the funding form.
|
|
12941
13157
|
if (!isFundingEnabled) return jsxs("div", Object.assign({
|
|
12942
13158
|
className: className,
|
|
12943
|
-
css: styles$
|
|
13159
|
+
css: styles$5.container
|
|
12944
13160
|
}, {
|
|
12945
13161
|
children: [jsx(CarrierBalance, {
|
|
12946
13162
|
carrierId: carrierId
|
|
@@ -12982,13 +13198,13 @@ const FundAndPurchase = ({
|
|
|
12982
13198
|
var _a, _b;
|
|
12983
13199
|
return jsxs(Fragment, {
|
|
12984
13200
|
children: [jsxs("section", Object.assign({
|
|
12985
|
-
css: styles$
|
|
13201
|
+
css: styles$5.getFormExtension(addFundsForm.isCustomAmount)
|
|
12986
13202
|
}, {
|
|
12987
13203
|
children: [jsx(InlineLabel, Object.assign({
|
|
12988
13204
|
label: t("manage-funding:fundAndPurchase.newBalance")
|
|
12989
13205
|
}, {
|
|
12990
13206
|
children: jsx(Typography, Object.assign({
|
|
12991
|
-
css: styles$
|
|
13207
|
+
css: styles$5.balanceText
|
|
12992
13208
|
}, {
|
|
12993
13209
|
children: formatMoney({
|
|
12994
13210
|
amount: balance + ((_a = addFundsForm.selectedAmount) !== null && _a !== void 0 ? _a : 0),
|
|
@@ -12999,7 +13215,7 @@ const FundAndPurchase = ({
|
|
|
12999
13215
|
label: t("manage-funding:fundAndPurchase.finalBalance")
|
|
13000
13216
|
}, {
|
|
13001
13217
|
children: jsx(Typography, Object.assign({
|
|
13002
|
-
css: styles$
|
|
13218
|
+
css: styles$5.balanceText
|
|
13003
13219
|
}, {
|
|
13004
13220
|
children: formatMoney({
|
|
13005
13221
|
amount: balance + ((_b = addFundsForm.selectedAmount) !== null && _b !== void 0 ? _b : 0) - purchaseAmount,
|
|
@@ -13026,7 +13242,7 @@ const FundAndPurchase = ({
|
|
|
13026
13242
|
}));
|
|
13027
13243
|
};
|
|
13028
13244
|
|
|
13029
|
-
const styles$
|
|
13245
|
+
const styles$3 = createStyles({
|
|
13030
13246
|
fundAndPurchase: theme => ({
|
|
13031
13247
|
borderTop: `1px solid ${theme.palette.gray.ultraLight}`
|
|
13032
13248
|
}),
|
|
@@ -13195,7 +13411,7 @@ const RateForm = ({
|
|
|
13195
13411
|
onClick: onSelectRate,
|
|
13196
13412
|
options: showHiddenRates ? rateOptions : filteredRateOptions
|
|
13197
13413
|
}), rateOptions.some(option => option.requiresAcknowledgement) && rateOptions.length > 5 && jsx(Link, Object.assign({
|
|
13198
|
-
css: styles$
|
|
13414
|
+
css: styles$3.showMoreOrLessRatesButton,
|
|
13199
13415
|
onClick: () => {
|
|
13200
13416
|
var _a;
|
|
13201
13417
|
setShowHiddenRates(!showHiddenRates);
|
|
@@ -13216,7 +13432,7 @@ const RateForm = ({
|
|
|
13216
13432
|
}))
|
|
13217
13433
|
}))]
|
|
13218
13434
|
}) : !isLoading && !!allDisplayableErrors.length ? null : jsxs("article", Object.assign({
|
|
13219
|
-
css: styles$
|
|
13435
|
+
css: styles$3.ratesInterstitial,
|
|
13220
13436
|
role: "presentation"
|
|
13221
13437
|
}, {
|
|
13222
13438
|
children: [jsx(Cube, {
|
|
@@ -13242,7 +13458,7 @@ const RateForm = ({
|
|
|
13242
13458
|
balance: balance,
|
|
13243
13459
|
carrierId: selectedRate === null || selectedRate === void 0 ? void 0 : selectedRate.carrierId,
|
|
13244
13460
|
control: form.control,
|
|
13245
|
-
css: styles$
|
|
13461
|
+
css: styles$3.fundAndPurchase,
|
|
13246
13462
|
disabled: disabled,
|
|
13247
13463
|
isFundingEnabled: !!((_d = features === null || features === void 0 ? void 0 : features.rateForm) === null || _d === void 0 ? void 0 : _d.enableFunding),
|
|
13248
13464
|
isFundingRequired: (selectedRate === null || selectedRate === void 0 ? void 0 : selectedRate.balance) !== undefined && !!selectedRate.requiresFundedAmount,
|
|
@@ -13279,7 +13495,7 @@ const SuspendSalesOrder = ({
|
|
|
13279
13495
|
}));
|
|
13280
13496
|
};
|
|
13281
13497
|
|
|
13282
|
-
const styles$
|
|
13498
|
+
const styles$2 = createStyles({
|
|
13283
13499
|
itemDetail: theme => ({
|
|
13284
13500
|
padding: `${theme.spacing(0)}px ${theme.spacing(2)}px ${theme.spacing(2)}px ${theme.spacing(0)}px`
|
|
13285
13501
|
}),
|
|
@@ -13307,15 +13523,15 @@ const ItemsBreakdownTableHeader = ({
|
|
|
13307
13523
|
}) => jsx(TableHeader, {
|
|
13308
13524
|
children: jsxs(TableBaseRow, {
|
|
13309
13525
|
children: [jsx(TableHeaderCell, {}), jsx(TableHeaderCell, Object.assign({
|
|
13310
|
-
css: styles$
|
|
13526
|
+
css: styles$2.numericCell
|
|
13311
13527
|
}, {
|
|
13312
13528
|
children: "Qty"
|
|
13313
13529
|
})), hasValue && jsx(TableHeaderCell, Object.assign({
|
|
13314
|
-
css: styles$
|
|
13530
|
+
css: styles$2.numericCell
|
|
13315
13531
|
}, {
|
|
13316
13532
|
children: "$/ea"
|
|
13317
13533
|
})), hasTotal && jsx(TableHeaderCell, Object.assign({
|
|
13318
|
-
css: styles$
|
|
13534
|
+
css: styles$2.numericCell
|
|
13319
13535
|
}, {
|
|
13320
13536
|
children: "$ Total"
|
|
13321
13537
|
}))]
|
|
@@ -13327,7 +13543,7 @@ const ItemsBreakdown = ({
|
|
|
13327
13543
|
const hasValue = items.some(item => item.value !== undefined);
|
|
13328
13544
|
const hasTotal = items.some(item => item.totalValue !== undefined);
|
|
13329
13545
|
return jsx("div", Object.assign({
|
|
13330
|
-
css: styles$
|
|
13546
|
+
css: styles$2.tableWrapper
|
|
13331
13547
|
}, {
|
|
13332
13548
|
children: jsx(Table, Object.assign({
|
|
13333
13549
|
header: jsx(ItemsBreakdownTableHeader, {
|
|
@@ -13346,7 +13562,7 @@ const ItemsBreakdown = ({
|
|
|
13346
13562
|
children: [jsx(TableBaseRow, {
|
|
13347
13563
|
children: jsx(TableBodyCell, Object.assign({
|
|
13348
13564
|
colSpan: 4,
|
|
13349
|
-
css: styles$
|
|
13565
|
+
css: styles$2.itemName
|
|
13350
13566
|
}, {
|
|
13351
13567
|
children: jsx(Typography, {
|
|
13352
13568
|
children: name
|
|
@@ -13354,21 +13570,21 @@ const ItemsBreakdown = ({
|
|
|
13354
13570
|
}))
|
|
13355
13571
|
}), jsxs(TableBaseRow, {
|
|
13356
13572
|
children: [jsx(TableBodyCell, Object.assign({
|
|
13357
|
-
css: styles$
|
|
13573
|
+
css: styles$2.itemDetail
|
|
13358
13574
|
}, {
|
|
13359
13575
|
children: jsx(Typography, {
|
|
13360
13576
|
children: detail
|
|
13361
13577
|
})
|
|
13362
13578
|
})), jsx(TableBodyCell, Object.assign({
|
|
13363
|
-
css: [styles$
|
|
13579
|
+
css: [styles$2.numericCell, styles$2.itemDetail]
|
|
13364
13580
|
}, {
|
|
13365
13581
|
children: quantity
|
|
13366
13582
|
})), hasValue && jsx(TableBodyCell, Object.assign({
|
|
13367
|
-
css: [styles$
|
|
13583
|
+
css: [styles$2.numericCell, styles$2.itemDetail]
|
|
13368
13584
|
}, {
|
|
13369
13585
|
children: value && formatMoney(value)
|
|
13370
13586
|
})), hasTotal && jsx(TableBodyCell, Object.assign({
|
|
13371
|
-
css: [styles$
|
|
13587
|
+
css: [styles$2.numericCell, styles$2.itemDetail]
|
|
13372
13588
|
}, {
|
|
13373
13589
|
children: totalValue && formatMoney(totalValue)
|
|
13374
13590
|
}))]
|
|
@@ -13379,7 +13595,7 @@ const ItemsBreakdown = ({
|
|
|
13379
13595
|
}));
|
|
13380
13596
|
};
|
|
13381
13597
|
|
|
13382
|
-
const styles$
|
|
13598
|
+
const styles$1 = createStyles({
|
|
13383
13599
|
actions: theme => ({
|
|
13384
13600
|
background: "white",
|
|
13385
13601
|
display: "flex",
|
|
@@ -13451,7 +13667,7 @@ const CustomsItemActions = ({
|
|
|
13451
13667
|
const buttonRef = useRef(null);
|
|
13452
13668
|
return jsxs(Fragment, {
|
|
13453
13669
|
children: [jsx(Button, Object.assign({
|
|
13454
|
-
css: styles$
|
|
13670
|
+
css: styles$1.actionsButton,
|
|
13455
13671
|
onClick: toggleShowCustomsPopover,
|
|
13456
13672
|
ref: buttonRef,
|
|
13457
13673
|
variant: ButtonVariant.TEXT
|
|
@@ -13474,7 +13690,7 @@ const CustomsItemActions = ({
|
|
|
13474
13690
|
reference: buttonRef.current
|
|
13475
13691
|
}, {
|
|
13476
13692
|
children: jsxs("div", Object.assign({
|
|
13477
|
-
css: styles$
|
|
13693
|
+
css: styles$1.actions
|
|
13478
13694
|
}, {
|
|
13479
13695
|
children: [jsx(Button, Object.assign({
|
|
13480
13696
|
bold: false,
|
|
@@ -13550,7 +13766,7 @@ const CustomsItemsDisplay = ({
|
|
|
13550
13766
|
header: jsx(TableHeader, {
|
|
13551
13767
|
children: jsxs(TableBaseRow, {
|
|
13552
13768
|
children: [jsx(TableHeaderCell, Object.assign({
|
|
13553
|
-
css: styles$
|
|
13769
|
+
css: styles$1.headerDescription
|
|
13554
13770
|
}, {
|
|
13555
13771
|
children: jsx(Typography, Object.assign({
|
|
13556
13772
|
variant: "subtitle2"
|
|
@@ -13558,7 +13774,7 @@ const CustomsItemsDisplay = ({
|
|
|
13558
13774
|
children: t("customs.fields.description")
|
|
13559
13775
|
}))
|
|
13560
13776
|
})), jsx(TableHeaderCell, Object.assign({
|
|
13561
|
-
css: styles$
|
|
13777
|
+
css: styles$1.headerEach
|
|
13562
13778
|
}, {
|
|
13563
13779
|
children: jsx(Typography, Object.assign({
|
|
13564
13780
|
variant: "subtitle2"
|
|
@@ -13568,7 +13784,7 @@ const CustomsItemsDisplay = ({
|
|
|
13568
13784
|
})
|
|
13569
13785
|
}))
|
|
13570
13786
|
})), jsx(TableHeaderCell, Object.assign({
|
|
13571
|
-
css: styles$
|
|
13787
|
+
css: styles$1.headerQty
|
|
13572
13788
|
}, {
|
|
13573
13789
|
children: jsx(Typography, Object.assign({
|
|
13574
13790
|
variant: "subtitle2"
|
|
@@ -13576,7 +13792,7 @@ const CustomsItemsDisplay = ({
|
|
|
13576
13792
|
children: t("customs.fields.quantity")
|
|
13577
13793
|
}))
|
|
13578
13794
|
})), jsx(TableHeaderCell, Object.assign({
|
|
13579
|
-
css: styles$
|
|
13795
|
+
css: styles$1.headerTotal
|
|
13580
13796
|
}, {
|
|
13581
13797
|
children: jsx(Typography, Object.assign({
|
|
13582
13798
|
variant: "subtitle2"
|
|
@@ -13586,7 +13802,7 @@ const CustomsItemsDisplay = ({
|
|
|
13586
13802
|
})
|
|
13587
13803
|
}))
|
|
13588
13804
|
})), jsx(TableHeaderCell, {
|
|
13589
|
-
css: styles$
|
|
13805
|
+
css: styles$1.actionsColumn
|
|
13590
13806
|
})]
|
|
13591
13807
|
})
|
|
13592
13808
|
})
|
|
@@ -13600,29 +13816,29 @@ const CustomsItemsDisplay = ({
|
|
|
13600
13816
|
children: customsItemForm
|
|
13601
13817
|
})) : jsxs(Fragment, {
|
|
13602
13818
|
children: [jsx(TableBodyCell, Object.assign({
|
|
13603
|
-
css: styles$
|
|
13819
|
+
css: styles$1.itemInfoLeft
|
|
13604
13820
|
}, {
|
|
13605
13821
|
children: item.description
|
|
13606
13822
|
})), jsx(TableBodyCell, Object.assign({
|
|
13607
|
-
css: styles$
|
|
13823
|
+
css: styles$1.itemEach
|
|
13608
13824
|
}, {
|
|
13609
13825
|
children: formatMoney({
|
|
13610
13826
|
amount: Number(item.value),
|
|
13611
13827
|
currency: SE.Currency.USD
|
|
13612
13828
|
})
|
|
13613
13829
|
})), jsx(TableBodyCell, Object.assign({
|
|
13614
|
-
css: styles$
|
|
13830
|
+
css: styles$1.itemQty
|
|
13615
13831
|
}, {
|
|
13616
13832
|
children: item.quantity
|
|
13617
13833
|
})), jsx(TableBodyCell, Object.assign({
|
|
13618
|
-
css: styles$
|
|
13834
|
+
css: styles$1.itemTotal
|
|
13619
13835
|
}, {
|
|
13620
13836
|
children: formatMoney({
|
|
13621
13837
|
amount: Number(item.value) * item.quantity,
|
|
13622
13838
|
currency: SE.Currency.USD
|
|
13623
13839
|
})
|
|
13624
13840
|
})), jsx(TableBodyCell, Object.assign({
|
|
13625
|
-
css: styles$
|
|
13841
|
+
css: styles$1.actionsColumn
|
|
13626
13842
|
}, {
|
|
13627
13843
|
children: jsx(CustomsItemActions, {
|
|
13628
13844
|
onDeleteClick: () => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -13638,7 +13854,7 @@ const CustomsItemsDisplay = ({
|
|
|
13638
13854
|
})
|
|
13639
13855
|
}), item.customsItemId !== (customsItemBeingEdited === null || customsItemBeingEdited === void 0 ? void 0 : customsItemBeingEdited.customsItemId) && jsx(TableBaseRow, {
|
|
13640
13856
|
children: jsx(TableBodyCell, Object.assign({
|
|
13641
|
-
css: styles$
|
|
13857
|
+
css: styles$1.hsCode
|
|
13642
13858
|
}, {
|
|
13643
13859
|
children: item.harmonizedTariffCode
|
|
13644
13860
|
}))
|
|
@@ -14125,7 +14341,7 @@ const ShipmentForm = ({
|
|
|
14125
14341
|
}), [salesOrder, shipment]);
|
|
14126
14342
|
const upsCarrierId = (_c = carriers === null || carriers === void 0 ? void 0 : carriers.find(c => c.carrierCode === "ups")) === null || _c === void 0 ? void 0 : _c.carrierId;
|
|
14127
14343
|
const hasUpsOptions = useMemo(() => {
|
|
14128
|
-
return (packageOptions === null || packageOptions === void 0 ? void 0 : packageOptions.some(option => option.label === "UPS")) && (selectedPackage.code === "package" || selectedCarrierId === upsCarrierId);
|
|
14344
|
+
return (packageOptions === null || packageOptions === void 0 ? void 0 : packageOptions.some(option => option.label === "UPS")) && ((selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.code) === "package" || selectedCarrierId === upsCarrierId);
|
|
14129
14345
|
}, [packageOptions, selectedPackage, selectedCarrierId, upsCarrierId]);
|
|
14130
14346
|
if (isLoading) return jsx(Loader, {
|
|
14131
14347
|
message: t("loading.shipment")
|
|
@@ -14610,6 +14826,7 @@ const Shipment = ({
|
|
|
14610
14826
|
} = convertWeight(weight);
|
|
14611
14827
|
const requestedServices = useMemo(() => getRequestedServices(salesOrder), [salesOrder]);
|
|
14612
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]);
|
|
14613
14830
|
return jsxs(Fragment, {
|
|
14614
14831
|
children: [jsxs(Section, Object.assign({
|
|
14615
14832
|
"data-testid": "orderDetail"
|
|
@@ -14631,12 +14848,12 @@ const Shipment = ({
|
|
|
14631
14848
|
children: [jsx(AddressDisplay, {
|
|
14632
14849
|
address: shipment.shipTo
|
|
14633
14850
|
}), jsx(Spacer, {})]
|
|
14634
|
-
})), jsxs(FieldLabel, Object.assign({
|
|
14851
|
+
})), hasSalesOrder && jsxs(FieldLabel, Object.assign({
|
|
14635
14852
|
"data-testid": "orderDate",
|
|
14636
14853
|
label: t("view-shipment:fields.orderDate")
|
|
14637
14854
|
}, {
|
|
14638
14855
|
children: [salesOrder ? formatDate(salesOrder.orderDate) : t("loading.salesOrder"), jsx(Spacer, {})]
|
|
14639
|
-
})), jsxs(FieldLabel, Object.assign({
|
|
14856
|
+
})), hasSalesOrder && jsxs(FieldLabel, Object.assign({
|
|
14640
14857
|
"data-testid": "orderValue",
|
|
14641
14858
|
label: t("view-shipment:fields.orderValue")
|
|
14642
14859
|
}, {
|
|
@@ -14719,7 +14936,11 @@ const Shipment = ({
|
|
|
14719
14936
|
})) : undefined,
|
|
14720
14937
|
title: t("view-shipment:sections.labels")
|
|
14721
14938
|
}, {
|
|
14722
|
-
children: [(
|
|
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) => {
|
|
14723
14944
|
const carrier = carriers === null || carriers === void 0 ? void 0 : carriers.find(c => c.carrierCode === label.carrierCode);
|
|
14724
14945
|
const service = carrier === null || carrier === void 0 ? void 0 : carrier.services.find(s => s.serviceCode === label.serviceCode);
|
|
14725
14946
|
return jsxs(Fragment$1, {
|
|
@@ -14835,7 +15056,7 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
14835
15056
|
SuspendShipment: SuspendShipment,
|
|
14836
15057
|
WarehouseForm: WarehouseForm,
|
|
14837
15058
|
WalletForm: WalletForm,
|
|
14838
|
-
styles: styles$
|
|
15059
|
+
styles: styles$j,
|
|
14839
15060
|
billingAddressSchema: billingAddressSchema,
|
|
14840
15061
|
walletSchema: walletSchema,
|
|
14841
15062
|
BillingFields: BillingFields,
|
|
@@ -14845,208 +15066,6 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
14845
15066
|
AddressPreferenceSelect: AddressPreferenceSelect
|
|
14846
15067
|
});
|
|
14847
15068
|
|
|
14848
|
-
const styles$1 = createStyles({
|
|
14849
|
-
edit: theme => ({
|
|
14850
|
-
color: theme.palette.primary.main,
|
|
14851
|
-
padding: `0 ${theme.spacing(2)}`
|
|
14852
|
-
}),
|
|
14853
|
-
getForm: showForm => theme => ({
|
|
14854
|
-
backgroundColor: theme.palette.gray.megaLight,
|
|
14855
|
-
display: showForm ? "flex" : "none",
|
|
14856
|
-
flexDirection: "column",
|
|
14857
|
-
padding: theme.spacing(2)
|
|
14858
|
-
}),
|
|
14859
|
-
input: theme => ({
|
|
14860
|
-
width: theme.spacing(13)
|
|
14861
|
-
}),
|
|
14862
|
-
marginLeft: {
|
|
14863
|
-
marginLeft: "auto"
|
|
14864
|
-
}
|
|
14865
|
-
});
|
|
14866
|
-
|
|
14867
|
-
const autoFundingSchema = z.object({
|
|
14868
|
-
isEnabled: z.boolean(),
|
|
14869
|
-
lowBalancePurchaseThreshold: moneySchema.extend({
|
|
14870
|
-
amount: z.number().min(10)
|
|
14871
|
-
}),
|
|
14872
|
-
maximumPurchasesPerDay: z.number().min(1),
|
|
14873
|
-
purchaseAmount: moneySchema.extend({
|
|
14874
|
-
amount: z.number().min(10).max(10000)
|
|
14875
|
-
})
|
|
14876
|
-
});
|
|
14877
|
-
|
|
14878
|
-
/**
|
|
14879
|
-
* This form that allows users to enable or disable auto funding, and
|
|
14880
|
-
* configure auto funding rules in ShipEngine API.
|
|
14881
|
-
*
|
|
14882
|
-
* @param carrierId The carrierId of the carrier provider you wish to configure auto-funding rules for.
|
|
14883
|
-
*/
|
|
14884
|
-
const AutoFundingForm = ({
|
|
14885
|
-
carrierId
|
|
14886
|
-
}) => {
|
|
14887
|
-
const {
|
|
14888
|
-
t
|
|
14889
|
-
} = useTranslation();
|
|
14890
|
-
const updateAutoFunding = useUpdateAutoFunding(carrierId);
|
|
14891
|
-
const autoFundingConfiguration = useGetAutoFundingConfiguration(carrierId);
|
|
14892
|
-
const {
|
|
14893
|
-
data: autoFundingSettings
|
|
14894
|
-
} = autoFundingConfiguration;
|
|
14895
|
-
const [showForm, setShowForm] = useState(false);
|
|
14896
|
-
const [isSwitchOn, setIsSwitchOn] = useState(false);
|
|
14897
|
-
const form = useForm({
|
|
14898
|
-
resolver: validationResolver(autoFundingSchema)
|
|
14899
|
-
});
|
|
14900
|
-
const watchIsEnabled = form.watch("isEnabled");
|
|
14901
|
-
const formReset = isEnabled => form.reset(values => Object.assign(Object.assign({}, values), {
|
|
14902
|
-
isEnabled
|
|
14903
|
-
}), {
|
|
14904
|
-
keepDirty: true
|
|
14905
|
-
});
|
|
14906
|
-
const handleSubmit = formLogger.capture(form.handleSubmit(values => {
|
|
14907
|
-
setShowForm(prev => !prev);
|
|
14908
|
-
setIsSwitchOn(true);
|
|
14909
|
-
const payload = values;
|
|
14910
|
-
updateAutoFunding.mutate(payload, {
|
|
14911
|
-
onSuccess: () => autoFundingConfiguration.refetch()
|
|
14912
|
-
});
|
|
14913
|
-
}));
|
|
14914
|
-
/**
|
|
14915
|
-
* This function toggles the form visibility and conditionally disables auto-funding
|
|
14916
|
-
* when falsy. This is because when someone toggles the enable auto-funding switch
|
|
14917
|
-
* off, they do not want to have auto-funding enabled at all.
|
|
14918
|
-
*/
|
|
14919
|
-
const handleToggle = isEnabled => {
|
|
14920
|
-
setIsSwitchOn(isEnabled);
|
|
14921
|
-
setShowForm(isEnabled);
|
|
14922
|
-
formReset(isEnabled);
|
|
14923
|
-
if (!isEnabled) {
|
|
14924
|
-
setIsSwitchOn(isEnabled);
|
|
14925
|
-
updateAutoFunding.mutate(form.getValues(), {
|
|
14926
|
-
onSuccess: () => autoFundingConfiguration.refetch()
|
|
14927
|
-
});
|
|
14928
|
-
}
|
|
14929
|
-
};
|
|
14930
|
-
if (autoFundingConfiguration.isLoading || updateAutoFunding.isLoading) return jsx(Loader, {
|
|
14931
|
-
message: t("manage-funding:autoFunding.isLoading")
|
|
14932
|
-
});
|
|
14933
|
-
if (!autoFundingSettings) throw new Error(t("errorMessages:unableToLoad.autoFundingSettings"));
|
|
14934
|
-
return jsxs(Fragment, {
|
|
14935
|
-
children: [jsxs(Spread, {
|
|
14936
|
-
children: [jsx(Typography, Object.assign({
|
|
14937
|
-
bold: !!(autoFundingSettings === null || autoFundingSettings === void 0 ? void 0 : autoFundingSettings.isAutoPurchaseEnabled),
|
|
14938
|
-
variant: "body1"
|
|
14939
|
-
}, {
|
|
14940
|
-
children: t("manage-funding:autoFunding:isEnabledCTA")
|
|
14941
|
-
})), jsx(Switch, {
|
|
14942
|
-
"data-testid": "auto-funding-toggle",
|
|
14943
|
-
defaultChecked: isSwitchOn,
|
|
14944
|
-
name: "isEnabled",
|
|
14945
|
-
onChange: e => handleToggle(e.target.checked),
|
|
14946
|
-
value: isSwitchOn
|
|
14947
|
-
})]
|
|
14948
|
-
}), jsx(Spacer, {
|
|
14949
|
-
multiplier: 1
|
|
14950
|
-
}), !!(autoFundingSettings === null || autoFundingSettings === void 0 ? void 0 : autoFundingSettings.isAutoPurchaseEnabled) && !showForm && jsxs(Spread, {
|
|
14951
|
-
children: [jsx(Typography, Object.assign({
|
|
14952
|
-
variant: "body1"
|
|
14953
|
-
}, {
|
|
14954
|
-
children: t("manage-funding:autoFunding.readSettings", Object.assign({}, autoFundingSettings))
|
|
14955
|
-
})), jsx(LinkAction, {
|
|
14956
|
-
css: styles$1.edit,
|
|
14957
|
-
onClick: () => handleToggle(true),
|
|
14958
|
-
title: t("manage-funding:autoFunding:edit")
|
|
14959
|
-
})]
|
|
14960
|
-
}), jsxs("form", Object.assign({
|
|
14961
|
-
css: styles$1.getForm(showForm),
|
|
14962
|
-
"data-testid": "auto-funding-form",
|
|
14963
|
-
id: "auto-funding-form",
|
|
14964
|
-
onSubmit: handleSubmit
|
|
14965
|
-
}, {
|
|
14966
|
-
children: [jsx(Typography, Object.assign({
|
|
14967
|
-
bold: true,
|
|
14968
|
-
variant: "body1"
|
|
14969
|
-
}, {
|
|
14970
|
-
children: t("manage-funding:autoFunding:editSettings")
|
|
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-threshold-input",
|
|
14978
|
-
defaultValue: {
|
|
14979
|
-
amount: autoFundingSettings === null || autoFundingSettings === void 0 ? void 0 : autoFundingSettings.autoPurchaseThreshold,
|
|
14980
|
-
currency: Currency.USD
|
|
14981
|
-
},
|
|
14982
|
-
disabled: !watchIsEnabled,
|
|
14983
|
-
label: t("manage-funding:autoFunding.lowBalancePurchaseThreshold"),
|
|
14984
|
-
labelWeight: "normal",
|
|
14985
|
-
name: "lowBalancePurchaseThreshold",
|
|
14986
|
-
showCurrencySymbol: true
|
|
14987
|
-
})
|
|
14988
|
-
})), jsx("div", Object.assign({
|
|
14989
|
-
css: styles$1.marginLeft
|
|
14990
|
-
}, {
|
|
14991
|
-
children: jsx(MoneyInput, {
|
|
14992
|
-
control: form.control,
|
|
14993
|
-
css: styles$1.input,
|
|
14994
|
-
"data-testid": "auto-funding-purchase-amount-input",
|
|
14995
|
-
defaultValue: {
|
|
14996
|
-
amount: autoFundingSettings === null || autoFundingSettings === void 0 ? void 0 : autoFundingSettings.autoPurchaseAmount,
|
|
14997
|
-
currency: Currency.USD
|
|
14998
|
-
},
|
|
14999
|
-
disabled: !watchIsEnabled,
|
|
15000
|
-
label: t("manage-funding:autoFunding.purchaseAmount"),
|
|
15001
|
-
labelWeight: "normal",
|
|
15002
|
-
name: "purchaseAmount",
|
|
15003
|
-
showCurrencySymbol: true
|
|
15004
|
-
})
|
|
15005
|
-
})), jsx("div", Object.assign({
|
|
15006
|
-
css: styles$1.marginLeft
|
|
15007
|
-
}, {
|
|
15008
|
-
children: jsx(NumberInput, {
|
|
15009
|
-
control: form.control,
|
|
15010
|
-
css: styles$1.input,
|
|
15011
|
-
"data-testid": "auto-funding-max-per-day-input",
|
|
15012
|
-
defaultValue: autoFundingSettings === null || autoFundingSettings === void 0 ? void 0 : autoFundingSettings.autoPurchaseCutoff,
|
|
15013
|
-
disabled: !watchIsEnabled,
|
|
15014
|
-
isInteger: true,
|
|
15015
|
-
label: t("manage-funding:autoFunding.maximumPurchasesPerDay"),
|
|
15016
|
-
labelWeight: "normal",
|
|
15017
|
-
name: "maximumPurchasesPerDay"
|
|
15018
|
-
})
|
|
15019
|
-
})), jsxs(ButtonGroup, Object.assign({
|
|
15020
|
-
justify: "end"
|
|
15021
|
-
}, {
|
|
15022
|
-
children: [jsx(Button, Object.assign({
|
|
15023
|
-
onClick: isSwitchOn ? () => setShowForm(false) : () => handleToggle(false),
|
|
15024
|
-
variant: ButtonVariant.TEXT
|
|
15025
|
-
}, {
|
|
15026
|
-
children: t("actions.cancel")
|
|
15027
|
-
})), jsx(SubmitButton, Object.assign({
|
|
15028
|
-
control: form.control,
|
|
15029
|
-
"data-testid": "submit-auto-funding",
|
|
15030
|
-
disabled: !watchIsEnabled,
|
|
15031
|
-
requireDirty: true,
|
|
15032
|
-
variant: ButtonVariant.OUTLINED
|
|
15033
|
-
}, {
|
|
15034
|
-
children: t("manage-funding:actions.saveRule")
|
|
15035
|
-
}))]
|
|
15036
|
-
}))]
|
|
15037
|
-
})), autoFundingConfiguration.error && jsxs(Fragment, {
|
|
15038
|
-
children: [jsx(Spacer, {
|
|
15039
|
-
multiplier: 1
|
|
15040
|
-
}), jsx(InlineNotification, Object.assign({
|
|
15041
|
-
title: t("manage-funding:autoFunding.error.title"),
|
|
15042
|
-
type: NotificationType.ERROR
|
|
15043
|
-
}, {
|
|
15044
|
-
children: autoFundingConfiguration.error[0].message
|
|
15045
|
-
}))]
|
|
15046
|
-
})]
|
|
15047
|
-
});
|
|
15048
|
-
};
|
|
15049
|
-
|
|
15050
15069
|
const styles = createStyles({
|
|
15051
15070
|
getDateRangeSelect: fullWidth => theme => ({
|
|
15052
15071
|
minWidth: theme.spacing(30),
|
|
@@ -15818,7 +15837,8 @@ var viewShipment$1 = {
|
|
|
15818
15837
|
multipleShippingServices: "Multiple shipping services",
|
|
15819
15838
|
sections: {
|
|
15820
15839
|
labels: "Labels"
|
|
15821
|
-
}
|
|
15840
|
+
},
|
|
15841
|
+
noLabels: "No Labels"
|
|
15822
15842
|
}
|
|
15823
15843
|
};
|
|
15824
15844
|
|