@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.cjs +438 -387
- package/index.js +441 -390
- package/package.json +1 -1
- package/src/components/preset-descriptor/preset-descriptor.styles.d.ts +1 -0
- package/src/components/templates/address-form/address-form.d.ts +3 -1
- package/src/components/templates/address-parser/address-parser.d.ts +4 -1
- package/src/components/templates/carrier-terms-form/carrier-terms-form.styles.d.ts +8 -4
- package/src/components/templates/shipment-form/shipment-form.d.ts +3 -1
- package/src/elements/account-settings/account-settings.d.ts +2 -0
- package/src/elements/configure-shipment/hooks/use-address.d.ts +3 -1
- package/src/elements/configure-shipment/hooks/use-shipment-form.d.ts +2 -0
- package/src/elements/onboarding/onboarding.d.ts +2 -0
- package/src/elements/purchase-label/purchase-label.d.ts +2 -0
- package/src/elements/view-shipment/view-shipment.d.ts +2 -0
- package/src/elements/void-label/void-label.d.ts +2 -0
- package/src/locales/en/index.d.ts +2 -0
package/index.cjs
CHANGED
|
@@ -3872,44 +3872,56 @@ const getContainerStyles = theme => /*#__PURE__*/react.css({
|
|
|
3872
3872
|
flexDirection: "column",
|
|
3873
3873
|
height: "100%",
|
|
3874
3874
|
paddingTop: theme.spacing(0.5),
|
|
3875
|
-
width: "
|
|
3876
|
-
}, process.env.NODE_ENV === "production" ? "" : ";label:getContainerStyles;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInByZXNldC1kZXNjcmlwdG9yLnN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDNkMiLCJmaWxlIjoicHJlc2V0LWRlc2NyaXB0b3Iuc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSBcIkBlbW90aW9uL3JlYWN0XCI7XHJcbmV4cG9ydCBjb25zdCBnZXRDb250YWluZXJTdHlsZXMgPSAodGhlbWUpID0+
|
|
3875
|
+
width: "max-content"
|
|
3876
|
+
}, process.env.NODE_ENV === "production" ? "" : ";label:getContainerStyles;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInByZXNldC1kZXNjcmlwdG9yLnN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDNkMiLCJmaWxlIjoicHJlc2V0LWRlc2NyaXB0b3Iuc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSBcIkBlbW90aW9uL3JlYWN0XCI7XHJcbmV4cG9ydCBjb25zdCBnZXRDb250YWluZXJTdHlsZXMgPSAodGhlbWUpID0+IGNzcyh7XHJcbiAgICBkaXNwbGF5OiBcImZsZXhcIixcclxuICAgIGZsZXhEaXJlY3Rpb246IFwiY29sdW1uXCIsXHJcbiAgICBoZWlnaHQ6IFwiMTAwJVwiLFxyXG4gICAgcGFkZGluZ1RvcDogdGhlbWUuc3BhY2luZygwLjUpLFxyXG4gICAgd2lkdGg6IFwibWF4LWNvbnRlbnRcIixcclxufSk7XHJcbmV4cG9ydCBjb25zdCBnZXREaW1lbnNpb25TdHlsZXMgPSAodGhlbWUpID0+IGNzcyh7XHJcbiAgICBjb2xvcjogdGhlbWUucGFsZXR0ZS5ncmF5Lm1haW4sXHJcbiAgICBmb250U2l6ZTogdGhlbWUudHlwb2dyYXBoeS5mb250U2l6ZS5YUyxcclxufSk7XHJcbmV4cG9ydCBjb25zdCBnZXRTZXJ2aWNlTmFtZVN0eWxlcyA9ICh0aGVtZSkgPT4gY3NzKHtcclxuICAgIGZvbnRTaXplOiB0aGVtZS50eXBvZ3JhcGh5LmZvbnRTaXplLlhYUyxcclxuICAgIGxpbmVIZWlnaHQ6IDAsXHJcbiAgICBwYWRkaW5nVG9wOiB0aGVtZS5zcGFjaW5nKCksXHJcbn0pO1xyXG5leHBvcnQgY29uc3QgZ2V0UHJlc2V0TmFtZVN0eWxlcyA9ICh0aGVtZSkgPT4gY3NzKHtcclxuICAgIGZvbnRTaXplOiB0aGVtZS50eXBvZ3JhcGh5LmZvbnRTaXplLlhTLFxyXG4gICAgZm9udFdlaWdodDogdGhlbWUudHlwb2dyYXBoeS5mb250V2VpZ2h0LmJvbGQsXHJcbn0pO1xyXG5leHBvcnQgY29uc3QgZ2V0V2FybmluZ1N0eWxlcyA9ICh0aGVtZSkgPT4gY3NzKHtcclxuICAgIGJhY2tncm91bmQ6IFwibm9uZVwiLFxyXG4gICAgbWFyZ2luTGVmdDogXCJhdXRvXCIsXHJcbiAgICBtYXJnaW5SaWdodDogdGhlbWUuc3BhY2luZygtMyksXHJcbiAgICBtYXJnaW5Ub3A6IHRoZW1lLnNwYWNpbmcoLTUpLFxyXG4gICAgd2lkdGg6IHRoZW1lLnNwYWNpbmcoKSxcclxufSk7XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXByZXNldC1kZXNjcmlwdG9yLnN0eWxlcy5qcy5tYXAiXX0= */");
|
|
3877
3877
|
const getDimensionStyles = theme => /*#__PURE__*/react.css({
|
|
3878
3878
|
color: theme.palette.gray.main,
|
|
3879
3879
|
fontSize: theme.typography.fontSize.XS
|
|
3880
|
-
}, process.env.NODE_ENV === "production" ? "" : ";label:getDimensionStyles;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInByZXNldC1kZXNjcmlwdG9yLnN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFRNkMiLCJmaWxlIjoicHJlc2V0LWRlc2NyaXB0b3Iuc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSBcIkBlbW90aW9uL3JlYWN0XCI7XHJcbmV4cG9ydCBjb25zdCBnZXRDb250YWluZXJTdHlsZXMgPSAodGhlbWUpID0+
|
|
3880
|
+
}, process.env.NODE_ENV === "production" ? "" : ";label:getDimensionStyles;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInByZXNldC1kZXNjcmlwdG9yLnN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFRNkMiLCJmaWxlIjoicHJlc2V0LWRlc2NyaXB0b3Iuc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSBcIkBlbW90aW9uL3JlYWN0XCI7XHJcbmV4cG9ydCBjb25zdCBnZXRDb250YWluZXJTdHlsZXMgPSAodGhlbWUpID0+IGNzcyh7XHJcbiAgICBkaXNwbGF5OiBcImZsZXhcIixcclxuICAgIGZsZXhEaXJlY3Rpb246IFwiY29sdW1uXCIsXHJcbiAgICBoZWlnaHQ6IFwiMTAwJVwiLFxyXG4gICAgcGFkZGluZ1RvcDogdGhlbWUuc3BhY2luZygwLjUpLFxyXG4gICAgd2lkdGg6IFwibWF4LWNvbnRlbnRcIixcclxufSk7XHJcbmV4cG9ydCBjb25zdCBnZXREaW1lbnNpb25TdHlsZXMgPSAodGhlbWUpID0+IGNzcyh7XHJcbiAgICBjb2xvcjogdGhlbWUucGFsZXR0ZS5ncmF5Lm1haW4sXHJcbiAgICBmb250U2l6ZTogdGhlbWUudHlwb2dyYXBoeS5mb250U2l6ZS5YUyxcclxufSk7XHJcbmV4cG9ydCBjb25zdCBnZXRTZXJ2aWNlTmFtZVN0eWxlcyA9ICh0aGVtZSkgPT4gY3NzKHtcclxuICAgIGZvbnRTaXplOiB0aGVtZS50eXBvZ3JhcGh5LmZvbnRTaXplLlhYUyxcclxuICAgIGxpbmVIZWlnaHQ6IDAsXHJcbiAgICBwYWRkaW5nVG9wOiB0aGVtZS5zcGFjaW5nKCksXHJcbn0pO1xyXG5leHBvcnQgY29uc3QgZ2V0UHJlc2V0TmFtZVN0eWxlcyA9ICh0aGVtZSkgPT4gY3NzKHtcclxuICAgIGZvbnRTaXplOiB0aGVtZS50eXBvZ3JhcGh5LmZvbnRTaXplLlhTLFxyXG4gICAgZm9udFdlaWdodDogdGhlbWUudHlwb2dyYXBoeS5mb250V2VpZ2h0LmJvbGQsXHJcbn0pO1xyXG5leHBvcnQgY29uc3QgZ2V0V2FybmluZ1N0eWxlcyA9ICh0aGVtZSkgPT4gY3NzKHtcclxuICAgIGJhY2tncm91bmQ6IFwibm9uZVwiLFxyXG4gICAgbWFyZ2luTGVmdDogXCJhdXRvXCIsXHJcbiAgICBtYXJnaW5SaWdodDogdGhlbWUuc3BhY2luZygtMyksXHJcbiAgICBtYXJnaW5Ub3A6IHRoZW1lLnNwYWNpbmcoLTUpLFxyXG4gICAgd2lkdGg6IHRoZW1lLnNwYWNpbmcoKSxcclxufSk7XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXByZXNldC1kZXNjcmlwdG9yLnN0eWxlcy5qcy5tYXAiXX0= */");
|
|
3881
3881
|
const getServiceNameStyles = theme => /*#__PURE__*/react.css({
|
|
3882
3882
|
fontSize: theme.typography.fontSize.XXS,
|
|
3883
3883
|
lineHeight: 0,
|
|
3884
3884
|
paddingTop: theme.spacing()
|
|
3885
|
-
}, process.env.NODE_ENV === "production" ? "" : ";label:getServiceNameStyles;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInByZXNldC1kZXNjcmlwdG9yLnN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFZK0MiLCJmaWxlIjoicHJlc2V0LWRlc2NyaXB0b3Iuc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSBcIkBlbW90aW9uL3JlYWN0XCI7XHJcbmV4cG9ydCBjb25zdCBnZXRDb250YWluZXJTdHlsZXMgPSAodGhlbWUpID0+
|
|
3885
|
+
}, process.env.NODE_ENV === "production" ? "" : ";label:getServiceNameStyles;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInByZXNldC1kZXNjcmlwdG9yLnN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFZK0MiLCJmaWxlIjoicHJlc2V0LWRlc2NyaXB0b3Iuc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSBcIkBlbW90aW9uL3JlYWN0XCI7XHJcbmV4cG9ydCBjb25zdCBnZXRDb250YWluZXJTdHlsZXMgPSAodGhlbWUpID0+IGNzcyh7XHJcbiAgICBkaXNwbGF5OiBcImZsZXhcIixcclxuICAgIGZsZXhEaXJlY3Rpb246IFwiY29sdW1uXCIsXHJcbiAgICBoZWlnaHQ6IFwiMTAwJVwiLFxyXG4gICAgcGFkZGluZ1RvcDogdGhlbWUuc3BhY2luZygwLjUpLFxyXG4gICAgd2lkdGg6IFwibWF4LWNvbnRlbnRcIixcclxufSk7XHJcbmV4cG9ydCBjb25zdCBnZXREaW1lbnNpb25TdHlsZXMgPSAodGhlbWUpID0+IGNzcyh7XHJcbiAgICBjb2xvcjogdGhlbWUucGFsZXR0ZS5ncmF5Lm1haW4sXHJcbiAgICBmb250U2l6ZTogdGhlbWUudHlwb2dyYXBoeS5mb250U2l6ZS5YUyxcclxufSk7XHJcbmV4cG9ydCBjb25zdCBnZXRTZXJ2aWNlTmFtZVN0eWxlcyA9ICh0aGVtZSkgPT4gY3NzKHtcclxuICAgIGZvbnRTaXplOiB0aGVtZS50eXBvZ3JhcGh5LmZvbnRTaXplLlhYUyxcclxuICAgIGxpbmVIZWlnaHQ6IDAsXHJcbiAgICBwYWRkaW5nVG9wOiB0aGVtZS5zcGFjaW5nKCksXHJcbn0pO1xyXG5leHBvcnQgY29uc3QgZ2V0UHJlc2V0TmFtZVN0eWxlcyA9ICh0aGVtZSkgPT4gY3NzKHtcclxuICAgIGZvbnRTaXplOiB0aGVtZS50eXBvZ3JhcGh5LmZvbnRTaXplLlhTLFxyXG4gICAgZm9udFdlaWdodDogdGhlbWUudHlwb2dyYXBoeS5mb250V2VpZ2h0LmJvbGQsXHJcbn0pO1xyXG5leHBvcnQgY29uc3QgZ2V0V2FybmluZ1N0eWxlcyA9ICh0aGVtZSkgPT4gY3NzKHtcclxuICAgIGJhY2tncm91bmQ6IFwibm9uZVwiLFxyXG4gICAgbWFyZ2luTGVmdDogXCJhdXRvXCIsXHJcbiAgICBtYXJnaW5SaWdodDogdGhlbWUuc3BhY2luZygtMyksXHJcbiAgICBtYXJnaW5Ub3A6IHRoZW1lLnNwYWNpbmcoLTUpLFxyXG4gICAgd2lkdGg6IHRoZW1lLnNwYWNpbmcoKSxcclxufSk7XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXByZXNldC1kZXNjcmlwdG9yLnN0eWxlcy5qcy5tYXAiXX0= */");
|
|
3886
3886
|
const getPresetNameStyles = theme => /*#__PURE__*/react.css({
|
|
3887
3887
|
fontSize: theme.typography.fontSize.XS,
|
|
3888
3888
|
fontWeight: theme.typography.fontWeight.bold
|
|
3889
|
-
}, process.env.NODE_ENV === "production" ? "" : ";label:getPresetNameStyles;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
3890
|
-
|
|
3891
|
-
|
|
3889
|
+
}, process.env.NODE_ENV === "production" ? "" : ";label:getPresetNameStyles;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInByZXNldC1kZXNjcmlwdG9yLnN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpQjhDIiwiZmlsZSI6InByZXNldC1kZXNjcmlwdG9yLnN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gXCJAZW1vdGlvbi9yZWFjdFwiO1xyXG5leHBvcnQgY29uc3QgZ2V0Q29udGFpbmVyU3R5bGVzID0gKHRoZW1lKSA9PiBjc3Moe1xyXG4gICAgZGlzcGxheTogXCJmbGV4XCIsXHJcbiAgICBmbGV4RGlyZWN0aW9uOiBcImNvbHVtblwiLFxyXG4gICAgaGVpZ2h0OiBcIjEwMCVcIixcclxuICAgIHBhZGRpbmdUb3A6IHRoZW1lLnNwYWNpbmcoMC41KSxcclxuICAgIHdpZHRoOiBcIm1heC1jb250ZW50XCIsXHJcbn0pO1xyXG5leHBvcnQgY29uc3QgZ2V0RGltZW5zaW9uU3R5bGVzID0gKHRoZW1lKSA9PiBjc3Moe1xyXG4gICAgY29sb3I6IHRoZW1lLnBhbGV0dGUuZ3JheS5tYWluLFxyXG4gICAgZm9udFNpemU6IHRoZW1lLnR5cG9ncmFwaHkuZm9udFNpemUuWFMsXHJcbn0pO1xyXG5leHBvcnQgY29uc3QgZ2V0U2VydmljZU5hbWVTdHlsZXMgPSAodGhlbWUpID0+IGNzcyh7XHJcbiAgICBmb250U2l6ZTogdGhlbWUudHlwb2dyYXBoeS5mb250U2l6ZS5YWFMsXHJcbiAgICBsaW5lSGVpZ2h0OiAwLFxyXG4gICAgcGFkZGluZ1RvcDogdGhlbWUuc3BhY2luZygpLFxyXG59KTtcclxuZXhwb3J0IGNvbnN0IGdldFByZXNldE5hbWVTdHlsZXMgPSAodGhlbWUpID0+IGNzcyh7XHJcbiAgICBmb250U2l6ZTogdGhlbWUudHlwb2dyYXBoeS5mb250U2l6ZS5YUyxcclxuICAgIGZvbnRXZWlnaHQ6IHRoZW1lLnR5cG9ncmFwaHkuZm9udFdlaWdodC5ib2xkLFxyXG59KTtcclxuZXhwb3J0IGNvbnN0IGdldFdhcm5pbmdTdHlsZXMgPSAodGhlbWUpID0+IGNzcyh7XHJcbiAgICBiYWNrZ3JvdW5kOiBcIm5vbmVcIixcclxuICAgIG1hcmdpbkxlZnQ6IFwiYXV0b1wiLFxyXG4gICAgbWFyZ2luUmlnaHQ6IHRoZW1lLnNwYWNpbmcoLTMpLFxyXG4gICAgbWFyZ2luVG9wOiB0aGVtZS5zcGFjaW5nKC01KSxcclxuICAgIHdpZHRoOiB0aGVtZS5zcGFjaW5nKCksXHJcbn0pO1xyXG4vLyMgc291cmNlTWFwcGluZ1VSTD1wcmVzZXQtZGVzY3JpcHRvci5zdHlsZXMuanMubWFwIl19 */");
|
|
3890
|
+
const getWarningStyles = theme => /*#__PURE__*/react.css({
|
|
3891
|
+
background: "none",
|
|
3892
|
+
marginLeft: "auto",
|
|
3893
|
+
marginRight: theme.spacing(-3),
|
|
3894
|
+
marginTop: theme.spacing(-5),
|
|
3895
|
+
width: theme.spacing()
|
|
3896
|
+
}, process.env.NODE_ENV === "production" ? "" : ";label:getWarningStyles;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInByZXNldC1kZXNjcmlwdG9yLnN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFxQjJDIiwiZmlsZSI6InByZXNldC1kZXNjcmlwdG9yLnN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gXCJAZW1vdGlvbi9yZWFjdFwiO1xyXG5leHBvcnQgY29uc3QgZ2V0Q29udGFpbmVyU3R5bGVzID0gKHRoZW1lKSA9PiBjc3Moe1xyXG4gICAgZGlzcGxheTogXCJmbGV4XCIsXHJcbiAgICBmbGV4RGlyZWN0aW9uOiBcImNvbHVtblwiLFxyXG4gICAgaGVpZ2h0OiBcIjEwMCVcIixcclxuICAgIHBhZGRpbmdUb3A6IHRoZW1lLnNwYWNpbmcoMC41KSxcclxuICAgIHdpZHRoOiBcIm1heC1jb250ZW50XCIsXHJcbn0pO1xyXG5leHBvcnQgY29uc3QgZ2V0RGltZW5zaW9uU3R5bGVzID0gKHRoZW1lKSA9PiBjc3Moe1xyXG4gICAgY29sb3I6IHRoZW1lLnBhbGV0dGUuZ3JheS5tYWluLFxyXG4gICAgZm9udFNpemU6IHRoZW1lLnR5cG9ncmFwaHkuZm9udFNpemUuWFMsXHJcbn0pO1xyXG5leHBvcnQgY29uc3QgZ2V0U2VydmljZU5hbWVTdHlsZXMgPSAodGhlbWUpID0+IGNzcyh7XHJcbiAgICBmb250U2l6ZTogdGhlbWUudHlwb2dyYXBoeS5mb250U2l6ZS5YWFMsXHJcbiAgICBsaW5lSGVpZ2h0OiAwLFxyXG4gICAgcGFkZGluZ1RvcDogdGhlbWUuc3BhY2luZygpLFxyXG59KTtcclxuZXhwb3J0IGNvbnN0IGdldFByZXNldE5hbWVTdHlsZXMgPSAodGhlbWUpID0+IGNzcyh7XHJcbiAgICBmb250U2l6ZTogdGhlbWUudHlwb2dyYXBoeS5mb250U2l6ZS5YUyxcclxuICAgIGZvbnRXZWlnaHQ6IHRoZW1lLnR5cG9ncmFwaHkuZm9udFdlaWdodC5ib2xkLFxyXG59KTtcclxuZXhwb3J0IGNvbnN0IGdldFdhcm5pbmdTdHlsZXMgPSAodGhlbWUpID0+IGNzcyh7XHJcbiAgICBiYWNrZ3JvdW5kOiBcIm5vbmVcIixcclxuICAgIG1hcmdpbkxlZnQ6IFwiYXV0b1wiLFxyXG4gICAgbWFyZ2luUmlnaHQ6IHRoZW1lLnNwYWNpbmcoLTMpLFxyXG4gICAgbWFyZ2luVG9wOiB0aGVtZS5zcGFjaW5nKC01KSxcclxuICAgIHdpZHRoOiB0aGVtZS5zcGFjaW5nKCksXHJcbn0pO1xyXG4vLyMgc291cmNlTWFwcGluZ1VSTD1wcmVzZXQtZGVzY3JpcHRvci5zdHlsZXMuanMubWFwIl19 */");
|
|
3897
|
+
|
|
3898
|
+
const PresetDescriptor = preset => jsxRuntime.jsx("div", Object.assign({
|
|
3892
3899
|
css: getContainerStyles
|
|
3893
3900
|
}, {
|
|
3894
|
-
children:
|
|
3895
|
-
children: [jsxRuntime.
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3901
|
+
children: jsxRuntime.jsxs("div", {
|
|
3902
|
+
children: [jsxRuntime.jsxs("div", {
|
|
3903
|
+
children: [jsxRuntime.jsx("span", Object.assign({
|
|
3904
|
+
css: getPresetNameStyles
|
|
3905
|
+
}, {
|
|
3906
|
+
children: preset.name
|
|
3907
|
+
})), jsxRuntime.jsx("span", Object.assign({
|
|
3908
|
+
css: getDimensionStyles
|
|
3909
|
+
}, {
|
|
3910
|
+
children: (preset.dimensions || preset.weight) && " - "
|
|
3911
|
+
})), preset.dimensions && jsxRuntime.jsxs("span", Object.assign({
|
|
3912
|
+
css: getDimensionStyles
|
|
3913
|
+
}, {
|
|
3914
|
+
children: [preset.dimensions.length, "x", preset.dimensions.height, "x", preset.dimensions.width]
|
|
3915
|
+
}))]
|
|
3916
|
+
}), jsxRuntime.jsx("div", Object.assign({
|
|
3917
|
+
css: getServiceNameStyles
|
|
3905
3918
|
}, {
|
|
3906
|
-
children:
|
|
3907
|
-
}))]
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
}))]
|
|
3919
|
+
children: preset.serviceName && preset.serviceName
|
|
3920
|
+
})), preset.serviceName && ["USPS Parcel Select Ground", "USPS First Class Mail"].includes(preset.serviceName) && jsxRuntime.jsx(giger.InlineNotification, {
|
|
3921
|
+
css: getWarningStyles,
|
|
3922
|
+
type: giger.NotificationType.ALERT
|
|
3923
|
+
})]
|
|
3924
|
+
})
|
|
3913
3925
|
}));
|
|
3914
3926
|
|
|
3915
3927
|
const createCategoryFromShippingPresets = (categoryName, presets) => presets ? [{
|
|
@@ -3960,7 +3972,7 @@ var _carrierMetadata = [
|
|
|
3960
3972
|
],
|
|
3961
3973
|
shortname: "DHL",
|
|
3962
3974
|
terms: {
|
|
3963
|
-
title: "DHL
|
|
3975
|
+
title: "DHL Express Agreement",
|
|
3964
3976
|
content: [
|
|
3965
3977
|
],
|
|
3966
3978
|
links: [
|
|
@@ -8795,7 +8807,209 @@ const AddFundsForm = ({
|
|
|
8795
8807
|
});
|
|
8796
8808
|
};
|
|
8797
8809
|
|
|
8798
|
-
const styles$n =
|
|
8810
|
+
const styles$n = createStyles({
|
|
8811
|
+
edit: theme => ({
|
|
8812
|
+
color: theme.palette.primary.main,
|
|
8813
|
+
padding: `0 ${theme.spacing(2)}`
|
|
8814
|
+
}),
|
|
8815
|
+
getForm: showForm => theme => ({
|
|
8816
|
+
backgroundColor: theme.palette.gray.megaLight,
|
|
8817
|
+
display: showForm ? "flex" : "none",
|
|
8818
|
+
flexDirection: "column",
|
|
8819
|
+
padding: theme.spacing(2)
|
|
8820
|
+
}),
|
|
8821
|
+
input: theme => ({
|
|
8822
|
+
width: theme.spacing(13)
|
|
8823
|
+
}),
|
|
8824
|
+
marginLeft: {
|
|
8825
|
+
marginLeft: "auto"
|
|
8826
|
+
}
|
|
8827
|
+
});
|
|
8828
|
+
|
|
8829
|
+
const autoFundingSchema = zod.z.object({
|
|
8830
|
+
isEnabled: zod.z.boolean(),
|
|
8831
|
+
lowBalancePurchaseThreshold: moneySchema.extend({
|
|
8832
|
+
amount: zod.z.number().min(10)
|
|
8833
|
+
}),
|
|
8834
|
+
maximumPurchasesPerDay: zod.z.number().min(1),
|
|
8835
|
+
purchaseAmount: moneySchema.extend({
|
|
8836
|
+
amount: zod.z.number().min(10).max(10000)
|
|
8837
|
+
})
|
|
8838
|
+
});
|
|
8839
|
+
|
|
8840
|
+
/**
|
|
8841
|
+
* This form that allows users to enable or disable auto funding, and
|
|
8842
|
+
* configure auto funding rules in ShipEngine API.
|
|
8843
|
+
*
|
|
8844
|
+
* @param carrierId The carrierId of the carrier provider you wish to configure auto-funding rules for.
|
|
8845
|
+
*/
|
|
8846
|
+
const AutoFundingForm = ({
|
|
8847
|
+
carrierId
|
|
8848
|
+
}) => {
|
|
8849
|
+
const {
|
|
8850
|
+
t
|
|
8851
|
+
} = reactI18next.useTranslation();
|
|
8852
|
+
const updateAutoFunding = alchemy.useUpdateAutoFunding(carrierId);
|
|
8853
|
+
const autoFundingConfiguration = alchemy.useGetAutoFundingConfiguration(carrierId);
|
|
8854
|
+
const {
|
|
8855
|
+
data: autoFundingSettings
|
|
8856
|
+
} = autoFundingConfiguration;
|
|
8857
|
+
const [showForm, setShowForm] = React.useState(false);
|
|
8858
|
+
const [isSwitchOn, setIsSwitchOn] = React.useState(false);
|
|
8859
|
+
const form = reactHookForm.useForm({
|
|
8860
|
+
resolver: validationResolver(autoFundingSchema)
|
|
8861
|
+
});
|
|
8862
|
+
const watchIsEnabled = form.watch("isEnabled");
|
|
8863
|
+
const formReset = isEnabled => form.reset(values => Object.assign(Object.assign({}, values), {
|
|
8864
|
+
isEnabled
|
|
8865
|
+
}), {
|
|
8866
|
+
keepDirty: true
|
|
8867
|
+
});
|
|
8868
|
+
const handleSubmit = formLogger.capture(form.handleSubmit(values => {
|
|
8869
|
+
setShowForm(prev => !prev);
|
|
8870
|
+
setIsSwitchOn(true);
|
|
8871
|
+
const payload = values;
|
|
8872
|
+
updateAutoFunding.mutate(payload, {
|
|
8873
|
+
onSuccess: () => autoFundingConfiguration.refetch()
|
|
8874
|
+
});
|
|
8875
|
+
}));
|
|
8876
|
+
/**
|
|
8877
|
+
* This function toggles the form visibility and conditionally disables auto-funding
|
|
8878
|
+
* when falsy. This is because when someone toggles the enable auto-funding switch
|
|
8879
|
+
* off, they do not want to have auto-funding enabled at all.
|
|
8880
|
+
*/
|
|
8881
|
+
const handleToggle = isEnabled => {
|
|
8882
|
+
setIsSwitchOn(isEnabled);
|
|
8883
|
+
setShowForm(isEnabled);
|
|
8884
|
+
formReset(isEnabled);
|
|
8885
|
+
if (!isEnabled) {
|
|
8886
|
+
setIsSwitchOn(isEnabled);
|
|
8887
|
+
updateAutoFunding.mutate(form.getValues(), {
|
|
8888
|
+
onSuccess: () => autoFundingConfiguration.refetch()
|
|
8889
|
+
});
|
|
8890
|
+
}
|
|
8891
|
+
};
|
|
8892
|
+
if (autoFundingConfiguration.isLoading || updateAutoFunding.isLoading) return jsxRuntime.jsx(Loader, {
|
|
8893
|
+
message: t("manage-funding:autoFunding.isLoading")
|
|
8894
|
+
});
|
|
8895
|
+
if (!autoFundingSettings) throw new Error(t("errorMessages:unableToLoad.autoFundingSettings"));
|
|
8896
|
+
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
8897
|
+
children: [jsxRuntime.jsxs(Spread, {
|
|
8898
|
+
children: [jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
8899
|
+
bold: !!(autoFundingSettings === null || autoFundingSettings === void 0 ? void 0 : autoFundingSettings.isAutoPurchaseEnabled),
|
|
8900
|
+
variant: "body1"
|
|
8901
|
+
}, {
|
|
8902
|
+
children: t("manage-funding:autoFunding:isEnabledCTA")
|
|
8903
|
+
})), jsxRuntime.jsx(Switch, {
|
|
8904
|
+
"data-testid": "auto-funding-toggle",
|
|
8905
|
+
defaultChecked: isSwitchOn,
|
|
8906
|
+
name: "isEnabled",
|
|
8907
|
+
onChange: e => handleToggle(e.target.checked),
|
|
8908
|
+
value: isSwitchOn
|
|
8909
|
+
})]
|
|
8910
|
+
}), jsxRuntime.jsx(Spacer, {
|
|
8911
|
+
multiplier: 1
|
|
8912
|
+
}), !!(autoFundingSettings === null || autoFundingSettings === void 0 ? void 0 : autoFundingSettings.isAutoPurchaseEnabled) && !showForm && jsxRuntime.jsxs(Spread, {
|
|
8913
|
+
children: [jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
8914
|
+
variant: "body1"
|
|
8915
|
+
}, {
|
|
8916
|
+
children: t("manage-funding:autoFunding.readSettings", Object.assign({}, autoFundingSettings))
|
|
8917
|
+
})), jsxRuntime.jsx(LinkAction, {
|
|
8918
|
+
css: styles$n.edit,
|
|
8919
|
+
onClick: () => handleToggle(true),
|
|
8920
|
+
title: t("manage-funding:autoFunding:edit")
|
|
8921
|
+
})]
|
|
8922
|
+
}), jsxRuntime.jsxs("form", Object.assign({
|
|
8923
|
+
css: styles$n.getForm(showForm),
|
|
8924
|
+
"data-testid": "auto-funding-form",
|
|
8925
|
+
id: "auto-funding-form",
|
|
8926
|
+
onSubmit: handleSubmit
|
|
8927
|
+
}, {
|
|
8928
|
+
children: [jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
8929
|
+
bold: true,
|
|
8930
|
+
variant: "body1"
|
|
8931
|
+
}, {
|
|
8932
|
+
children: t("manage-funding:autoFunding:editSettings")
|
|
8933
|
+
})), jsxRuntime.jsx("div", Object.assign({
|
|
8934
|
+
css: styles$n.marginLeft
|
|
8935
|
+
}, {
|
|
8936
|
+
children: jsxRuntime.jsx(MoneyInput, {
|
|
8937
|
+
control: form.control,
|
|
8938
|
+
css: styles$n.input,
|
|
8939
|
+
"data-testid": "auto-funding-threshold-input",
|
|
8940
|
+
defaultValue: {
|
|
8941
|
+
amount: autoFundingSettings === null || autoFundingSettings === void 0 ? void 0 : autoFundingSettings.autoPurchaseThreshold,
|
|
8942
|
+
currency: alchemy.Currency.USD
|
|
8943
|
+
},
|
|
8944
|
+
disabled: !watchIsEnabled,
|
|
8945
|
+
label: t("manage-funding:autoFunding.lowBalancePurchaseThreshold"),
|
|
8946
|
+
labelWeight: "normal",
|
|
8947
|
+
name: "lowBalancePurchaseThreshold",
|
|
8948
|
+
showCurrencySymbol: true
|
|
8949
|
+
})
|
|
8950
|
+
})), jsxRuntime.jsx("div", Object.assign({
|
|
8951
|
+
css: styles$n.marginLeft
|
|
8952
|
+
}, {
|
|
8953
|
+
children: jsxRuntime.jsx(MoneyInput, {
|
|
8954
|
+
control: form.control,
|
|
8955
|
+
css: styles$n.input,
|
|
8956
|
+
"data-testid": "auto-funding-purchase-amount-input",
|
|
8957
|
+
defaultValue: {
|
|
8958
|
+
amount: autoFundingSettings === null || autoFundingSettings === void 0 ? void 0 : autoFundingSettings.autoPurchaseAmount,
|
|
8959
|
+
currency: alchemy.Currency.USD
|
|
8960
|
+
},
|
|
8961
|
+
disabled: !watchIsEnabled,
|
|
8962
|
+
label: t("manage-funding:autoFunding.purchaseAmount"),
|
|
8963
|
+
labelWeight: "normal",
|
|
8964
|
+
name: "purchaseAmount",
|
|
8965
|
+
showCurrencySymbol: true
|
|
8966
|
+
})
|
|
8967
|
+
})), jsxRuntime.jsx("div", Object.assign({
|
|
8968
|
+
css: styles$n.marginLeft
|
|
8969
|
+
}, {
|
|
8970
|
+
children: jsxRuntime.jsx(NumberInput, {
|
|
8971
|
+
control: form.control,
|
|
8972
|
+
css: styles$n.input,
|
|
8973
|
+
"data-testid": "auto-funding-max-per-day-input",
|
|
8974
|
+
defaultValue: autoFundingSettings === null || autoFundingSettings === void 0 ? void 0 : autoFundingSettings.autoPurchaseCutoff,
|
|
8975
|
+
disabled: !watchIsEnabled,
|
|
8976
|
+
isInteger: true,
|
|
8977
|
+
label: t("manage-funding:autoFunding.maximumPurchasesPerDay"),
|
|
8978
|
+
labelWeight: "normal",
|
|
8979
|
+
name: "maximumPurchasesPerDay"
|
|
8980
|
+
})
|
|
8981
|
+
})), jsxRuntime.jsxs(ButtonGroup, Object.assign({
|
|
8982
|
+
justify: "end"
|
|
8983
|
+
}, {
|
|
8984
|
+
children: [jsxRuntime.jsx(giger.Button, Object.assign({
|
|
8985
|
+
onClick: isSwitchOn ? () => setShowForm(false) : () => handleToggle(false),
|
|
8986
|
+
variant: giger.ButtonVariant.TEXT
|
|
8987
|
+
}, {
|
|
8988
|
+
children: t("actions.cancel")
|
|
8989
|
+
})), jsxRuntime.jsx(SubmitButton, Object.assign({
|
|
8990
|
+
control: form.control,
|
|
8991
|
+
"data-testid": "submit-auto-funding",
|
|
8992
|
+
disabled: !watchIsEnabled,
|
|
8993
|
+
requireDirty: true,
|
|
8994
|
+
variant: giger.ButtonVariant.OUTLINED
|
|
8995
|
+
}, {
|
|
8996
|
+
children: t("manage-funding:actions.saveRule")
|
|
8997
|
+
}))]
|
|
8998
|
+
}))]
|
|
8999
|
+
})), autoFundingConfiguration.error && jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
9000
|
+
children: [jsxRuntime.jsx(Spacer, {
|
|
9001
|
+
multiplier: 1
|
|
9002
|
+
}), jsxRuntime.jsx(giger.InlineNotification, Object.assign({
|
|
9003
|
+
title: t("manage-funding:autoFunding.error.title"),
|
|
9004
|
+
type: giger.NotificationType.ERROR
|
|
9005
|
+
}, {
|
|
9006
|
+
children: autoFundingConfiguration.error[0].message
|
|
9007
|
+
}))]
|
|
9008
|
+
})]
|
|
9009
|
+
});
|
|
9010
|
+
};
|
|
9011
|
+
|
|
9012
|
+
const styles$m = isLabelRight => createStyles({
|
|
8799
9013
|
inlineContainer: theme => ({
|
|
8800
9014
|
alignItems: "center",
|
|
8801
9015
|
display: "flex",
|
|
@@ -8810,14 +9024,14 @@ const InlineLabel = ({
|
|
|
8810
9024
|
isLabelRight,
|
|
8811
9025
|
labelProps: _labelProps = {}
|
|
8812
9026
|
}) => jsxRuntime.jsxs("div", Object.assign({
|
|
8813
|
-
css: styles$
|
|
9027
|
+
css: styles$m(isLabelRight).inlineContainer
|
|
8814
9028
|
}, {
|
|
8815
9029
|
children: [jsxRuntime.jsx(giger.Typography, Object.assign({}, _labelProps, {
|
|
8816
9030
|
children: label
|
|
8817
9031
|
})), children]
|
|
8818
9032
|
}));
|
|
8819
9033
|
|
|
8820
|
-
const styles$
|
|
9034
|
+
const styles$l = createStyles({
|
|
8821
9035
|
getBalanceText: balance => theme => ({
|
|
8822
9036
|
color: balance === undefined ? theme.palette.alert.main : balance >= 0 ? theme.palette.secondary.dark : theme.palette.error.main
|
|
8823
9037
|
})
|
|
@@ -8842,7 +9056,7 @@ const CarrierBalance = ({
|
|
|
8842
9056
|
}, {
|
|
8843
9057
|
children: isLoadingCarrier || isRefetchingCarrier ? jsxRuntime.jsx(giger.Spinner, {}) : jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
8844
9058
|
bold: true,
|
|
8845
|
-
css: styles$
|
|
9059
|
+
css: styles$l.getBalanceText(carrierBalance)
|
|
8846
9060
|
}, {
|
|
8847
9061
|
children: carrierBalance === undefined ? t("manage-funding:errors.balanceUnknown") : formatMoney({
|
|
8848
9062
|
amount: carrierBalance,
|
|
@@ -8895,6 +9109,8 @@ const ManageFunding = ({
|
|
|
8895
9109
|
})]
|
|
8896
9110
|
}), jsxRuntime.jsx(Spacer, {
|
|
8897
9111
|
multiplier: 2
|
|
9112
|
+
}), jsxRuntime.jsx(AutoFundingForm, {
|
|
9113
|
+
carrierId: carrierId
|
|
8898
9114
|
})]
|
|
8899
9115
|
})
|
|
8900
9116
|
}));
|
|
@@ -8905,10 +9121,12 @@ const addressParserSchema = zod.z.object({
|
|
|
8905
9121
|
});
|
|
8906
9122
|
|
|
8907
9123
|
const AddressParser = ({
|
|
9124
|
+
errors: parseErrors,
|
|
8908
9125
|
formId,
|
|
8909
9126
|
onCancel,
|
|
8910
9127
|
onSubmit,
|
|
8911
|
-
portalRef
|
|
9128
|
+
portalRef,
|
|
9129
|
+
reset
|
|
8912
9130
|
}) => {
|
|
8913
9131
|
const {
|
|
8914
9132
|
t
|
|
@@ -8920,20 +9138,26 @@ const AddressParser = ({
|
|
|
8920
9138
|
const payload = values;
|
|
8921
9139
|
onSubmit(payload);
|
|
8922
9140
|
}));
|
|
9141
|
+
const errors = (parseErrors === null || parseErrors === void 0 ? void 0 : parseErrors.length) ? [t("errorMessages.parsingFailure")] : undefined;
|
|
8923
9142
|
const formInterface = jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
8924
9143
|
children: [jsxRuntime.jsx(TextArea, {
|
|
8925
9144
|
control: form.control,
|
|
9145
|
+
errors: errors,
|
|
8926
9146
|
form: formId,
|
|
8927
9147
|
label: t("address.parserFields.fullAddress"),
|
|
8928
9148
|
labelWeight: "normal",
|
|
8929
9149
|
name: "fullAddress",
|
|
9150
|
+
nativeLabel: true,
|
|
8930
9151
|
rows: 4
|
|
8931
9152
|
}), jsxRuntime.jsxs(ButtonGroup, Object.assign({
|
|
8932
9153
|
justify: "end"
|
|
8933
9154
|
}, {
|
|
8934
9155
|
children: [onCancel && jsxRuntime.jsx(giger.Button, Object.assign({
|
|
8935
9156
|
bold: false,
|
|
8936
|
-
onClick:
|
|
9157
|
+
onClick: () => {
|
|
9158
|
+
onCancel();
|
|
9159
|
+
reset && reset();
|
|
9160
|
+
},
|
|
8937
9161
|
type: "button",
|
|
8938
9162
|
variant: giger.ButtonVariant.TEXT
|
|
8939
9163
|
}, {
|
|
@@ -8960,7 +9184,7 @@ const AddressParser = ({
|
|
|
8960
9184
|
}));
|
|
8961
9185
|
};
|
|
8962
9186
|
|
|
8963
|
-
const styles$
|
|
9187
|
+
const styles$k = createStyles({
|
|
8964
9188
|
grow: {
|
|
8965
9189
|
flexGrow: 1
|
|
8966
9190
|
},
|
|
@@ -9021,6 +9245,22 @@ const AddressFields = ({
|
|
|
9021
9245
|
labelWeight: "normal",
|
|
9022
9246
|
name: _formatFieldName("companyName"),
|
|
9023
9247
|
nativeLabel: true
|
|
9248
|
+
}), jsxRuntime.jsx(SelectAutoComplete, {
|
|
9249
|
+
control: form.control,
|
|
9250
|
+
form: formId,
|
|
9251
|
+
label: t("address.fields.countryCode"),
|
|
9252
|
+
labelWeight: "normal",
|
|
9253
|
+
name: _formatFieldName("countryCode"),
|
|
9254
|
+
nativeLabel: true,
|
|
9255
|
+
noResultsLabel: t("address.noResults"),
|
|
9256
|
+
onChange: value => {
|
|
9257
|
+
if (value) {
|
|
9258
|
+
form.setValue(_formatFieldName("stateProvince"), null, {
|
|
9259
|
+
shouldValidate: isSubmitted
|
|
9260
|
+
});
|
|
9261
|
+
}
|
|
9262
|
+
},
|
|
9263
|
+
options: countryCodeOptions
|
|
9024
9264
|
}), jsxRuntime.jsx(TextInput, {
|
|
9025
9265
|
control: form.control,
|
|
9026
9266
|
form: formId,
|
|
@@ -9043,30 +9283,14 @@ const AddressFields = ({
|
|
|
9043
9283
|
labelWeight: "normal",
|
|
9044
9284
|
name: _formatFieldName("cityLocality"),
|
|
9045
9285
|
nativeLabel: true
|
|
9046
|
-
}), jsxRuntime.jsx(SelectAutoComplete, {
|
|
9047
|
-
control: form.control,
|
|
9048
|
-
form: formId,
|
|
9049
|
-
label: t("address.fields.countryCode"),
|
|
9050
|
-
labelWeight: "normal",
|
|
9051
|
-
name: _formatFieldName("countryCode"),
|
|
9052
|
-
nativeLabel: true,
|
|
9053
|
-
noResultsLabel: t("address.noResults"),
|
|
9054
|
-
onChange: value => {
|
|
9055
|
-
if (value) {
|
|
9056
|
-
form.setValue(_formatFieldName("stateProvince"), null, {
|
|
9057
|
-
shouldValidate: isSubmitted
|
|
9058
|
-
});
|
|
9059
|
-
}
|
|
9060
|
-
},
|
|
9061
|
-
options: countryCodeOptions
|
|
9062
9286
|
}), jsxRuntime.jsxs("div", Object.assign({
|
|
9063
|
-
css: styles$
|
|
9287
|
+
css: styles$k.stateZipWrapper
|
|
9064
9288
|
}, {
|
|
9065
9289
|
children: [jsxRuntime.jsx("div", Object.assign({
|
|
9066
|
-
css: styles$
|
|
9290
|
+
css: styles$k.stateWrapper
|
|
9067
9291
|
}, {
|
|
9068
9292
|
children: jsxRuntime.jsx("div", Object.assign({
|
|
9069
|
-
css: styles$
|
|
9293
|
+
css: styles$k.grow
|
|
9070
9294
|
}, {
|
|
9071
9295
|
children: watchCountryCode === "US" ?
|
|
9072
9296
|
// Domestic States
|
|
@@ -9091,10 +9315,10 @@ const AddressFields = ({
|
|
|
9091
9315
|
})
|
|
9092
9316
|
}))
|
|
9093
9317
|
})), jsxRuntime.jsx("div", Object.assign({
|
|
9094
|
-
css: styles$
|
|
9318
|
+
css: styles$k.zipWrapper
|
|
9095
9319
|
}, {
|
|
9096
9320
|
children: jsxRuntime.jsx("div", Object.assign({
|
|
9097
|
-
css: styles$
|
|
9321
|
+
css: styles$k.grow
|
|
9098
9322
|
}, {
|
|
9099
9323
|
children: jsxRuntime.jsx(TextInput, {
|
|
9100
9324
|
control: form.control,
|
|
@@ -9227,7 +9451,9 @@ const AddressForm = ({
|
|
|
9227
9451
|
onCancelParse,
|
|
9228
9452
|
onSubmit,
|
|
9229
9453
|
onSubmitParse,
|
|
9230
|
-
|
|
9454
|
+
parseAddressErrors,
|
|
9455
|
+
portalRef,
|
|
9456
|
+
resetParseAddress
|
|
9231
9457
|
}) => {
|
|
9232
9458
|
const {
|
|
9233
9459
|
t
|
|
@@ -9250,9 +9476,11 @@ const AddressForm = ({
|
|
|
9250
9476
|
});
|
|
9251
9477
|
}), [form, onSubmitParse]);
|
|
9252
9478
|
const [addressParser, isAddressParserOpen, toggleIsAddressParserOpen] = useNestedForm(AddressParser, {
|
|
9479
|
+
errors: parseAddressErrors,
|
|
9253
9480
|
formId: `${formId !== null && formId !== void 0 ? formId : ""}-address-parser`,
|
|
9254
9481
|
onCancel: onCancelParse,
|
|
9255
|
-
onSubmit: handleSubmitParse
|
|
9482
|
+
onSubmit: handleSubmitParse,
|
|
9483
|
+
reset: resetParseAddress
|
|
9256
9484
|
});
|
|
9257
9485
|
const formInterface = jsxRuntime.jsxs("div", Object.assign({
|
|
9258
9486
|
css: theme => ({
|
|
@@ -9885,7 +10113,7 @@ const EditWalletAddressForm = ({
|
|
|
9885
10113
|
}));
|
|
9886
10114
|
};
|
|
9887
10115
|
|
|
9888
|
-
const styles$
|
|
10116
|
+
const styles$j = createStyles({
|
|
9889
10117
|
grid: theme => ({
|
|
9890
10118
|
margin: theme.spacing(4)
|
|
9891
10119
|
})
|
|
@@ -9947,7 +10175,7 @@ const WalletForm = ({
|
|
|
9947
10175
|
onSubmit: formLogger.capture(handleSubmit)
|
|
9948
10176
|
}, {
|
|
9949
10177
|
children: jsxRuntime.jsxs(giger.Grid, Object.assign({
|
|
9950
|
-
css: styles$
|
|
10178
|
+
css: styles$j.grid,
|
|
9951
10179
|
noPadding: true
|
|
9952
10180
|
}, {
|
|
9953
10181
|
children: [jsxRuntime.jsx(giger.GridChild, Object.assign({
|
|
@@ -10029,7 +10257,7 @@ const WalletForm = ({
|
|
|
10029
10257
|
}));
|
|
10030
10258
|
};
|
|
10031
10259
|
|
|
10032
|
-
const styles$
|
|
10260
|
+
const styles$i = createStyles({
|
|
10033
10261
|
boldLink: theme => ({
|
|
10034
10262
|
fontWeight: theme.typography.fontWeight.bold
|
|
10035
10263
|
}),
|
|
@@ -10071,11 +10299,11 @@ const EditBillingForm = ({
|
|
|
10071
10299
|
onSubmit: formLogger.capture(handleSubmit)
|
|
10072
10300
|
}, {
|
|
10073
10301
|
children: jsxRuntime.jsxs(giger.Grid, Object.assign({
|
|
10074
|
-
css: styles$
|
|
10302
|
+
css: styles$i.container
|
|
10075
10303
|
}, {
|
|
10076
10304
|
children: [jsxRuntime.jsx(giger.GridChild, Object.assign({
|
|
10077
10305
|
colSpan: 12,
|
|
10078
|
-
css: styles$
|
|
10306
|
+
css: styles$i.subtitle
|
|
10079
10307
|
}, {
|
|
10080
10308
|
children: jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
10081
10309
|
variant: "subtitle1"
|
|
@@ -10090,7 +10318,7 @@ const EditBillingForm = ({
|
|
|
10090
10318
|
})
|
|
10091
10319
|
})), jsxRuntime.jsx(giger.GridChild, Object.assign({
|
|
10092
10320
|
colSpan: 12,
|
|
10093
|
-
css: styles$
|
|
10321
|
+
css: styles$i.subtitle
|
|
10094
10322
|
}, {
|
|
10095
10323
|
children: jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
10096
10324
|
variant: "subtitle1"
|
|
@@ -10126,7 +10354,7 @@ const EditBillingForm = ({
|
|
|
10126
10354
|
children: t("actions.cancel")
|
|
10127
10355
|
})), jsxRuntime.jsx(SubmitButton, Object.assign({
|
|
10128
10356
|
control: form.control,
|
|
10129
|
-
css: styles$
|
|
10357
|
+
css: styles$i.boldLink,
|
|
10130
10358
|
variant: giger.ButtonVariant.OUTLINED
|
|
10131
10359
|
}, {
|
|
10132
10360
|
children: t("actions.save")
|
|
@@ -10145,7 +10373,7 @@ var img$1 = "data:image/svg+xml,%3csvg width='150' height='96' viewBox='0 0 150
|
|
|
10145
10373
|
|
|
10146
10374
|
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";
|
|
10147
10375
|
|
|
10148
|
-
const styles$
|
|
10376
|
+
const styles$h = createStyles({
|
|
10149
10377
|
body: theme => ({
|
|
10150
10378
|
borderTop: `1px solid ${theme.palette.gray.light}`,
|
|
10151
10379
|
color: theme.palette.black,
|
|
@@ -10196,14 +10424,14 @@ const SettingsCard = ({
|
|
|
10196
10424
|
verticallyAligned
|
|
10197
10425
|
}) => {
|
|
10198
10426
|
return jsxRuntime.jsxs("div", Object.assign({
|
|
10199
|
-
css: verticallyAligned ? styles$
|
|
10427
|
+
css: verticallyAligned ? styles$h.verticalContainer : styles$h.container,
|
|
10200
10428
|
"data-testid": "settingsCard"
|
|
10201
10429
|
}, {
|
|
10202
10430
|
children: [jsxRuntime.jsxs("div", Object.assign({
|
|
10203
|
-
css: styles$
|
|
10431
|
+
css: styles$h.header
|
|
10204
10432
|
}, {
|
|
10205
10433
|
children: [jsxRuntime.jsxs("div", Object.assign({
|
|
10206
|
-
css: styles$
|
|
10434
|
+
css: styles$h.title
|
|
10207
10435
|
}, {
|
|
10208
10436
|
children: [typeof title === "string" ? jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
10209
10437
|
variant: "subtitle2"
|
|
@@ -10231,7 +10459,7 @@ const SettingsCard = ({
|
|
|
10231
10459
|
}))
|
|
10232
10460
|
}))]
|
|
10233
10461
|
})), children && jsxRuntime.jsx("div", Object.assign({
|
|
10234
|
-
css: styles$
|
|
10462
|
+
css: styles$h.body
|
|
10235
10463
|
}, {
|
|
10236
10464
|
children: jsxRuntime.jsxs("div", {
|
|
10237
10465
|
children: [children, accessoryAction && jsxRuntime.jsx(ButtonGroup, Object.assign({
|
|
@@ -10252,7 +10480,7 @@ const SettingsCard = ({
|
|
|
10252
10480
|
}));
|
|
10253
10481
|
};
|
|
10254
10482
|
|
|
10255
|
-
const styles$
|
|
10483
|
+
const styles$g = createStyles({
|
|
10256
10484
|
container: {
|
|
10257
10485
|
display: "flex",
|
|
10258
10486
|
height: "72px",
|
|
@@ -10282,7 +10510,7 @@ const WalletCard = ({
|
|
|
10282
10510
|
};
|
|
10283
10511
|
const Logo = provider ? logos[provider] : undefined;
|
|
10284
10512
|
return jsxRuntime.jsx("div", Object.assign({
|
|
10285
|
-
css: styles$
|
|
10513
|
+
css: styles$g.container
|
|
10286
10514
|
}, {
|
|
10287
10515
|
children: jsxRuntime.jsx(SettingsCard, {
|
|
10288
10516
|
cardAction: {
|
|
@@ -10296,7 +10524,7 @@ const WalletCard = ({
|
|
|
10296
10524
|
src: Logo,
|
|
10297
10525
|
width: 56
|
|
10298
10526
|
}) : jsxRuntime.jsx(giger.Icon, {
|
|
10299
|
-
css: styles$
|
|
10527
|
+
css: styles$g.icon,
|
|
10300
10528
|
name: gigerTheme.IconNames.CREDIT_CARD,
|
|
10301
10529
|
size: giger.IconSize.SIZE_LARGE
|
|
10302
10530
|
}), jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
@@ -10380,7 +10608,7 @@ var SvgShipengineLogo = function SvgShipengineLogo(props) {
|
|
|
10380
10608
|
})))));
|
|
10381
10609
|
};
|
|
10382
10610
|
|
|
10383
|
-
const styles$
|
|
10611
|
+
const styles$f = createStyles({
|
|
10384
10612
|
poweredByShipEngine: {
|
|
10385
10613
|
alignItems: "center",
|
|
10386
10614
|
color: "#818F9C",
|
|
@@ -10397,7 +10625,7 @@ const PoweredByShipEngine = () => {
|
|
|
10397
10625
|
t
|
|
10398
10626
|
} = reactI18next.useTranslation();
|
|
10399
10627
|
return jsxRuntime.jsxs("div", Object.assign({
|
|
10400
|
-
css: styles$
|
|
10628
|
+
css: styles$f.poweredByShipEngine
|
|
10401
10629
|
}, {
|
|
10402
10630
|
children: [jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
10403
10631
|
variant: "body2"
|
|
@@ -10556,7 +10784,7 @@ const AccountSettings = _a => {
|
|
|
10556
10784
|
});
|
|
10557
10785
|
};
|
|
10558
10786
|
|
|
10559
|
-
const styles$
|
|
10787
|
+
const styles$e = createStyles({
|
|
10560
10788
|
agreement: {
|
|
10561
10789
|
alignItems: "center",
|
|
10562
10790
|
display: "flex",
|
|
@@ -10576,11 +10804,10 @@ const styles$f = createStyles({
|
|
|
10576
10804
|
display: "flex",
|
|
10577
10805
|
flexDirection: "column"
|
|
10578
10806
|
},
|
|
10579
|
-
icon: theme => ({
|
|
10580
|
-
padding: `${theme.spacing(0.4)}px 0 0 ${theme.spacing(0.5)}px`,
|
|
10581
|
-
position: "absolute"
|
|
10582
|
-
}),
|
|
10583
10807
|
link: {
|
|
10808
|
+
"&:visited": {
|
|
10809
|
+
color: "#006fbb"
|
|
10810
|
+
},
|
|
10584
10811
|
border: "none"
|
|
10585
10812
|
},
|
|
10586
10813
|
links: theme => ({
|
|
@@ -10607,6 +10834,11 @@ const styles$f = createStyles({
|
|
|
10607
10834
|
paddingBottom: theme.spacing(8),
|
|
10608
10835
|
paddingTop: theme.spacing(2)
|
|
10609
10836
|
}),
|
|
10837
|
+
termsLink: theme => ({
|
|
10838
|
+
alignItems: "center",
|
|
10839
|
+
display: "inline-flex",
|
|
10840
|
+
fontWeight: theme.typography.fontWeight.normal
|
|
10841
|
+
}),
|
|
10610
10842
|
termsList: {
|
|
10611
10843
|
listStyle: "none"
|
|
10612
10844
|
},
|
|
@@ -10630,10 +10862,10 @@ const DisplayCarrierTerms = c => {
|
|
|
10630
10862
|
const listCarrierLinks = () => {
|
|
10631
10863
|
return c.carrierTerms.links.map((term, index) => {
|
|
10632
10864
|
return jsxRuntime.jsx("li", Object.assign({
|
|
10633
|
-
css: styles$
|
|
10865
|
+
css: styles$e.listItems
|
|
10634
10866
|
}, {
|
|
10635
10867
|
children: jsxRuntime.jsx(giger.Link, Object.assign({
|
|
10636
|
-
css: styles$
|
|
10868
|
+
css: styles$e.link,
|
|
10637
10869
|
href: term.url,
|
|
10638
10870
|
isExternal: true,
|
|
10639
10871
|
target: "_blank"
|
|
@@ -10652,18 +10884,18 @@ const DisplayCarrierTerms = c => {
|
|
|
10652
10884
|
children: [jsxRuntime.jsx(Spacer, {
|
|
10653
10885
|
multiplier: 3
|
|
10654
10886
|
}), jsxRuntime.jsxs("div", Object.assign({
|
|
10655
|
-
css: styles$
|
|
10887
|
+
css: styles$e.terms
|
|
10656
10888
|
}, {
|
|
10657
10889
|
children: [jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
10658
10890
|
variant: "subtitle1"
|
|
10659
10891
|
}, {
|
|
10660
10892
|
children: c.carrierTerms.title
|
|
10661
10893
|
})), !!listCarrierContent().length && jsxRuntime.jsx("div", Object.assign({
|
|
10662
|
-
css: styles$
|
|
10894
|
+
css: styles$e.terms
|
|
10663
10895
|
}, {
|
|
10664
10896
|
children: listCarrierContent()
|
|
10665
10897
|
})), jsxRuntime.jsx("ul", Object.assign({
|
|
10666
|
-
css: styles$
|
|
10898
|
+
css: styles$e.links
|
|
10667
10899
|
}, {
|
|
10668
10900
|
children: listCarrierLinks()
|
|
10669
10901
|
}))]
|
|
@@ -10813,7 +11045,7 @@ const AddCarrierForm = ({
|
|
|
10813
11045
|
}));
|
|
10814
11046
|
};
|
|
10815
11047
|
|
|
10816
|
-
const styles$
|
|
11048
|
+
const styles$d = createStyles({
|
|
10817
11049
|
container: theme => ({
|
|
10818
11050
|
display: "flex",
|
|
10819
11051
|
gap: theme.spacing()
|
|
@@ -10851,13 +11083,13 @@ const Disclosure = ({
|
|
|
10851
11083
|
}, [open]);
|
|
10852
11084
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
10853
11085
|
children: [jsxRuntime.jsxs("div", Object.assign({
|
|
10854
|
-
css: styles$
|
|
11086
|
+
css: styles$d.container
|
|
10855
11087
|
}, {
|
|
10856
11088
|
children: [jsxRuntime.jsx("div", {
|
|
10857
11089
|
children: label
|
|
10858
11090
|
}), _showToggle && jsxRuntime.jsx("button", Object.assign({
|
|
10859
11091
|
"aria-expanded": isOpen,
|
|
10860
|
-
css: styles$
|
|
11092
|
+
css: styles$d.toggle,
|
|
10861
11093
|
onClick: () => {
|
|
10862
11094
|
setIsOpen(!isOpen);
|
|
10863
11095
|
onToggle(!isOpen);
|
|
@@ -10865,12 +11097,12 @@ const Disclosure = ({
|
|
|
10865
11097
|
type: "button"
|
|
10866
11098
|
}, {
|
|
10867
11099
|
children: jsxRuntime.jsx(giger.Icon, {
|
|
10868
|
-
css: styles$
|
|
11100
|
+
css: styles$d.icon,
|
|
10869
11101
|
name: isOpen ? gigerTheme.IconNames.CHEVRON_TOP : gigerTheme.IconNames.CHEVRON_BOTTOM
|
|
10870
11102
|
})
|
|
10871
11103
|
}))]
|
|
10872
11104
|
})), isOpen && jsxRuntime.jsx("div", Object.assign({
|
|
10873
|
-
css: styles$
|
|
11105
|
+
css: styles$d.content
|
|
10874
11106
|
}, {
|
|
10875
11107
|
children: typeof children === "function" ? children(() => setIsOpen(!isOpen)) : children
|
|
10876
11108
|
}))]
|
|
@@ -10998,7 +11230,7 @@ const getCarrierRecoverySchema = requiresAddress => zod.z.object({
|
|
|
10998
11230
|
address: requiresAddress ? baseSchema : baseSchema.optional()
|
|
10999
11231
|
});
|
|
11000
11232
|
|
|
11001
|
-
const styles$
|
|
11233
|
+
const styles$c = createStyles({
|
|
11002
11234
|
grid: theme => ({
|
|
11003
11235
|
margin: theme.spacing(4)
|
|
11004
11236
|
}),
|
|
@@ -11042,7 +11274,7 @@ const CarrierRecoveryForm = ({
|
|
|
11042
11274
|
onSubmit: formLogger.capture(handleSubmit)
|
|
11043
11275
|
}, {
|
|
11044
11276
|
children: jsxRuntime.jsxs(giger.Grid, Object.assign({
|
|
11045
|
-
css: styles$
|
|
11277
|
+
css: styles$c.grid,
|
|
11046
11278
|
noPadding: true
|
|
11047
11279
|
}, {
|
|
11048
11280
|
children: [requiresAddress && jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
@@ -11050,14 +11282,14 @@ const CarrierRecoveryForm = ({
|
|
|
11050
11282
|
colSpan: 12
|
|
11051
11283
|
}, {
|
|
11052
11284
|
children: jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
11053
|
-
css: styles$
|
|
11285
|
+
css: styles$c.heading,
|
|
11054
11286
|
variant: "heading4"
|
|
11055
11287
|
}, {
|
|
11056
11288
|
children: t("register-wallet:sections.carriers.title")
|
|
11057
11289
|
}))
|
|
11058
11290
|
})), jsxRuntime.jsx(giger.GridChild, Object.assign({
|
|
11059
11291
|
colSpan: 12,
|
|
11060
|
-
css: styles$
|
|
11292
|
+
css: styles$c.subtitle
|
|
11061
11293
|
}, {
|
|
11062
11294
|
children: jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
11063
11295
|
variant: "subtitle1"
|
|
@@ -11143,7 +11375,7 @@ const CarrierTermsForm = ({
|
|
|
11143
11375
|
onSubmit(payload.agreement);
|
|
11144
11376
|
}));
|
|
11145
11377
|
return jsxRuntime.jsxs("div", Object.assign({
|
|
11146
|
-
css: styles$
|
|
11378
|
+
css: styles$e.termsForm,
|
|
11147
11379
|
"data-testid": "carrier-terms-form"
|
|
11148
11380
|
}, {
|
|
11149
11381
|
children: [jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
@@ -11159,7 +11391,7 @@ const CarrierTermsForm = ({
|
|
|
11159
11391
|
})), jsxRuntime.jsx(Spacer, {
|
|
11160
11392
|
multiplier: 1
|
|
11161
11393
|
}), jsxRuntime.jsx("div", Object.assign({
|
|
11162
|
-
css: styles$
|
|
11394
|
+
css: styles$e.carrierLogos
|
|
11163
11395
|
}, {
|
|
11164
11396
|
children: metadatas.map(({
|
|
11165
11397
|
name,
|
|
@@ -11175,21 +11407,18 @@ const CarrierTermsForm = ({
|
|
|
11175
11407
|
onSubmit: formLogger.capture(handleSubmit)
|
|
11176
11408
|
}, {
|
|
11177
11409
|
children: jsxRuntime.jsxs("div", Object.assign({
|
|
11178
|
-
css: styles$
|
|
11410
|
+
css: styles$e.agreement
|
|
11179
11411
|
}, {
|
|
11180
11412
|
children: [jsxRuntime.jsx("div", {
|
|
11181
11413
|
children: jsxRuntime.jsx(CheckboxInput, {
|
|
11182
11414
|
checkboxLabel: jsxRuntime.jsx(reactI18next.Trans, {
|
|
11183
11415
|
components: {
|
|
11184
11416
|
icon: jsxRuntime.jsx(giger.Icon, {
|
|
11185
|
-
css: styles$f.icon,
|
|
11186
11417
|
name: showTerms ? gigerTheme.IconNames.CHEVRON_TOP : gigerTheme.IconNames.CHEVRON_BOTTOM,
|
|
11187
11418
|
size: giger.IconSize.SIZE_SMALL
|
|
11188
11419
|
}),
|
|
11189
11420
|
terms: jsxRuntime.jsx(giger.Link, {
|
|
11190
|
-
css:
|
|
11191
|
-
fontWeight: theme.typography.fontWeight.normal
|
|
11192
|
-
}),
|
|
11421
|
+
css: styles$e.termsLink,
|
|
11193
11422
|
"data-testid": "terms-link",
|
|
11194
11423
|
onClick: e => {
|
|
11195
11424
|
e.preventDefault();
|
|
@@ -11207,7 +11436,7 @@ const CarrierTermsForm = ({
|
|
|
11207
11436
|
name: "agreement"
|
|
11208
11437
|
})
|
|
11209
11438
|
}), showTerms && jsxRuntime.jsxs("div", Object.assign({
|
|
11210
|
-
css: styles$
|
|
11439
|
+
css: styles$e.well
|
|
11211
11440
|
}, {
|
|
11212
11441
|
children: [jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
11213
11442
|
variant: "heading4"
|
|
@@ -11216,7 +11445,7 @@ const CarrierTermsForm = ({
|
|
|
11216
11445
|
})), terms.map(t => jsxRuntime.jsx(DisplayCarrierTerms, {
|
|
11217
11446
|
carrierTerms: t
|
|
11218
11447
|
}, t.title)), jsxRuntime.jsx("div", Object.assign({
|
|
11219
|
-
css: styles$
|
|
11448
|
+
css: styles$e.close
|
|
11220
11449
|
}, {
|
|
11221
11450
|
children: jsxRuntime.jsx(giger.Button, Object.assign({
|
|
11222
11451
|
onClick: () => setShowTerms(false),
|
|
@@ -11471,7 +11700,7 @@ const CopyButton = ({
|
|
|
11471
11700
|
}));
|
|
11472
11701
|
};
|
|
11473
11702
|
|
|
11474
|
-
const styles$
|
|
11703
|
+
const styles$b = createStyles({
|
|
11475
11704
|
trackingNumber: theme => ({
|
|
11476
11705
|
alignItems: "center",
|
|
11477
11706
|
display: "flex"
|
|
@@ -11517,10 +11746,10 @@ const Label = ({
|
|
|
11517
11746
|
shippingAmount: label.shipmentCost
|
|
11518
11747
|
}, {
|
|
11519
11748
|
children: label.trackingNumber && jsxRuntime.jsxs("div", Object.assign({
|
|
11520
|
-
css: styles$
|
|
11749
|
+
css: styles$b.trackingNumber
|
|
11521
11750
|
}, {
|
|
11522
11751
|
children: [jsxRuntime.jsx("div", Object.assign({
|
|
11523
|
-
css: styles$
|
|
11752
|
+
css: styles$b.truncatedTrackingNumber
|
|
11524
11753
|
}, {
|
|
11525
11754
|
children: label.trackingNumber.toString()
|
|
11526
11755
|
})), jsxRuntime.jsx(CopyButton, {
|
|
@@ -11632,7 +11861,7 @@ const LandingPageForm = ({
|
|
|
11632
11861
|
}));
|
|
11633
11862
|
};
|
|
11634
11863
|
|
|
11635
|
-
const styles$
|
|
11864
|
+
const styles$a = createStyles({
|
|
11636
11865
|
container: theme => ({
|
|
11637
11866
|
padding: theme.spacing(2)
|
|
11638
11867
|
}),
|
|
@@ -11654,11 +11883,11 @@ const LandingPage = ({
|
|
|
11654
11883
|
t
|
|
11655
11884
|
} = reactI18next.useTranslation();
|
|
11656
11885
|
return jsxRuntime.jsxs("div", Object.assign({
|
|
11657
|
-
css: styles$
|
|
11886
|
+
css: styles$a.container,
|
|
11658
11887
|
"data-testid": "landing-page"
|
|
11659
11888
|
}, {
|
|
11660
11889
|
children: [jsxRuntime.jsxs("div", Object.assign({
|
|
11661
|
-
css: styles$
|
|
11890
|
+
css: styles$a.header
|
|
11662
11891
|
}, {
|
|
11663
11892
|
children: [jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
11664
11893
|
variant: "heading4"
|
|
@@ -11676,7 +11905,7 @@ const LandingPage = ({
|
|
|
11676
11905
|
})), jsxRuntime.jsx(LandingPageForm, {
|
|
11677
11906
|
onSubmit: onSubmit
|
|
11678
11907
|
}), jsxRuntime.jsxs("div", Object.assign({
|
|
11679
|
-
css: styles$
|
|
11908
|
+
css: styles$a.header
|
|
11680
11909
|
}, {
|
|
11681
11910
|
children: [jsxRuntime.jsx(Spacer, {
|
|
11682
11911
|
multiplier: 6
|
|
@@ -11687,14 +11916,14 @@ const LandingPage = ({
|
|
|
11687
11916
|
})), jsxRuntime.jsx(Spacer, {
|
|
11688
11917
|
multiplier: 2
|
|
11689
11918
|
}), jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
11690
|
-
css: styles$
|
|
11919
|
+
css: styles$a.description,
|
|
11691
11920
|
variant: "body1"
|
|
11692
11921
|
}, {
|
|
11693
11922
|
children: t("onboarding:landing.messageLine1")
|
|
11694
11923
|
})), jsxRuntime.jsx(Spacer, {
|
|
11695
11924
|
multiplier: 2
|
|
11696
11925
|
}), jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
11697
|
-
css: styles$
|
|
11926
|
+
css: styles$a.description,
|
|
11698
11927
|
variant: "body1"
|
|
11699
11928
|
}, {
|
|
11700
11929
|
children: t("onboarding:landing.messageLine2")
|
|
@@ -11705,7 +11934,7 @@ const LandingPage = ({
|
|
|
11705
11934
|
}));
|
|
11706
11935
|
};
|
|
11707
11936
|
|
|
11708
|
-
const styles$
|
|
11937
|
+
const styles$9 = createStyles({
|
|
11709
11938
|
container: {
|
|
11710
11939
|
display: "flex",
|
|
11711
11940
|
flexDirection: "column"
|
|
@@ -11765,14 +11994,14 @@ const ListCarriersRow = ({
|
|
|
11765
11994
|
setIsSubmitting(false);
|
|
11766
11995
|
});
|
|
11767
11996
|
return jsxRuntime.jsxs("div", Object.assign({
|
|
11768
|
-
css: styles$
|
|
11997
|
+
css: styles$9.container,
|
|
11769
11998
|
"data-testid": "carrier-row"
|
|
11770
11999
|
}, {
|
|
11771
12000
|
children: [jsxRuntime.jsxs("div", Object.assign({
|
|
11772
|
-
css: styles$
|
|
12001
|
+
css: styles$9.rowContainer
|
|
11773
12002
|
}, {
|
|
11774
12003
|
children: [jsxRuntime.jsxs("div", Object.assign({
|
|
11775
|
-
css: styles$
|
|
12004
|
+
css: styles$9.logoContainer
|
|
11776
12005
|
}, {
|
|
11777
12006
|
children: [jsxRuntime.jsx("div", {
|
|
11778
12007
|
children: jsxRuntime.jsx("img", {
|
|
@@ -11790,7 +12019,7 @@ const ListCarriersRow = ({
|
|
|
11790
12019
|
css: _ref
|
|
11791
12020
|
}, {
|
|
11792
12021
|
children: jsxRuntime.jsx(LinkAction, {
|
|
11793
|
-
css: styles$
|
|
12022
|
+
css: styles$9.getConnectButton(isConnected),
|
|
11794
12023
|
isDisabled: isConnected || showDropDown,
|
|
11795
12024
|
isLoading: isSubmitting,
|
|
11796
12025
|
onClick: () => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -11808,7 +12037,7 @@ const ListCarriersRow = ({
|
|
|
11808
12037
|
}));
|
|
11809
12038
|
};
|
|
11810
12039
|
|
|
11811
|
-
const styles$
|
|
12040
|
+
const styles$8 = createStyles({
|
|
11812
12041
|
carriersList: theme => ({
|
|
11813
12042
|
"& > li:not(:last-of-type)": {
|
|
11814
12043
|
borderBottom: `1px solid ${theme.palette.gray.light}`
|
|
@@ -11869,7 +12098,7 @@ const ListCarriers = ({
|
|
|
11869
12098
|
}))
|
|
11870
12099
|
})), jsxRuntime.jsx(Spacer, {})]
|
|
11871
12100
|
}), jsxRuntime.jsx("ul", Object.assign({
|
|
11872
|
-
css: styles$
|
|
12101
|
+
css: styles$8.carriersList,
|
|
11873
12102
|
"data-testid": "carriers-list"
|
|
11874
12103
|
}, {
|
|
11875
12104
|
children: isLoading ? jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
@@ -11891,11 +12120,11 @@ const ListCarriers = ({
|
|
|
11891
12120
|
};
|
|
11892
12121
|
const LoadingSkeletonRow = () => {
|
|
11893
12122
|
return jsxRuntime.jsxs("div", Object.assign({
|
|
11894
|
-
css: styles$
|
|
12123
|
+
css: styles$8.skeletonRow,
|
|
11895
12124
|
"data-testid": "skeleton-carrier-row"
|
|
11896
12125
|
}, {
|
|
11897
12126
|
children: [jsxRuntime.jsxs("div", Object.assign({
|
|
11898
|
-
css: styles$
|
|
12127
|
+
css: styles$8.skeletonLogoContainer
|
|
11899
12128
|
}, {
|
|
11900
12129
|
children: [jsxRuntime.jsx(giger.Skeleton, {
|
|
11901
12130
|
animation: giger.SkeletonAnimation.WAVE,
|
|
@@ -12154,7 +12383,7 @@ const WarehouseForm = ({
|
|
|
12154
12383
|
}));
|
|
12155
12384
|
};
|
|
12156
12385
|
|
|
12157
|
-
const styles$
|
|
12386
|
+
const styles$7 = createStyles({
|
|
12158
12387
|
cardSpacing: theme => ({
|
|
12159
12388
|
display: "flex",
|
|
12160
12389
|
flexDirection: "column",
|
|
@@ -12184,9 +12413,9 @@ const ManageWarehouses = ({
|
|
|
12184
12413
|
const [showAddNewWarehouseForm, toggleShowAddNewWarehouseForm] = useToggle(false);
|
|
12185
12414
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
12186
12415
|
children: [showAddNewWarehouseForm ? jsxRuntime.jsx(AddressPreferenceProvider, Object.assign({
|
|
12187
|
-
css: styles$
|
|
12416
|
+
css: styles$7.well,
|
|
12188
12417
|
formHeader: jsxRuntime.jsxs("div", Object.assign({
|
|
12189
|
-
css: styles$
|
|
12418
|
+
css: styles$7.header
|
|
12190
12419
|
}, {
|
|
12191
12420
|
children: [jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
12192
12421
|
variant: "subtitle1"
|
|
@@ -12231,14 +12460,14 @@ const ManageWarehouses = ({
|
|
|
12231
12460
|
})]
|
|
12232
12461
|
}))
|
|
12233
12462
|
})), jsxRuntime.jsx("div", Object.assign({
|
|
12234
|
-
css: styles$
|
|
12463
|
+
css: styles$7.cardSpacing
|
|
12235
12464
|
}, {
|
|
12236
12465
|
children: warehouses.map(warehouse => {
|
|
12237
12466
|
if (editWarehouseId && editWarehouseId === warehouse.warehouseId) {
|
|
12238
12467
|
return jsxRuntime.jsx(AddressPreferenceProvider, Object.assign({
|
|
12239
|
-
css: styles$
|
|
12468
|
+
css: styles$7.well,
|
|
12240
12469
|
formHeader: jsxRuntime.jsxs("div", Object.assign({
|
|
12241
|
-
css: styles$
|
|
12470
|
+
css: styles$7.header
|
|
12242
12471
|
}, {
|
|
12243
12472
|
children: [jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
12244
12473
|
variant: "subtitle1"
|
|
@@ -12357,7 +12586,7 @@ const CompletionPage = ({
|
|
|
12357
12586
|
}));
|
|
12358
12587
|
};
|
|
12359
12588
|
|
|
12360
|
-
const styles$
|
|
12589
|
+
const styles$6 = createStyles({
|
|
12361
12590
|
container: theme => ({
|
|
12362
12591
|
padding: theme.spacing(2)
|
|
12363
12592
|
}),
|
|
@@ -12587,10 +12816,10 @@ const Onboarding = ({
|
|
|
12587
12816
|
if (agreedToTerms && warehouses.length && hasValidAddress && !hasStampsWallet && !hasCompletedBilling) {
|
|
12588
12817
|
return jsxRuntime.jsx(AddressPreferenceProvider, Object.assign({
|
|
12589
12818
|
formHeader: jsxRuntime.jsxs("div", Object.assign({
|
|
12590
|
-
css: styles$
|
|
12819
|
+
css: styles$6.walletFormHeader
|
|
12591
12820
|
}, {
|
|
12592
12821
|
children: [jsxRuntime.jsxs("div", Object.assign({
|
|
12593
|
-
css: styles$
|
|
12822
|
+
css: styles$6.walletFormTitle
|
|
12594
12823
|
}, {
|
|
12595
12824
|
children: [jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
12596
12825
|
variant: "heading4"
|
|
@@ -12669,22 +12898,22 @@ const Onboarding = ({
|
|
|
12669
12898
|
});
|
|
12670
12899
|
};
|
|
12671
12900
|
return jsxRuntime.jsxs("div", Object.assign({
|
|
12672
|
-
css: styles$
|
|
12901
|
+
css: styles$6.container
|
|
12673
12902
|
}, {
|
|
12674
12903
|
children: [jsxRuntime.jsxs(giger.Stepper, Object.assign({
|
|
12675
12904
|
currentStep: currentStep
|
|
12676
12905
|
}, {
|
|
12677
12906
|
children: [jsxRuntime.jsx(giger.Step, {
|
|
12678
|
-
css: styles$
|
|
12907
|
+
css: styles$6.step,
|
|
12679
12908
|
label: t("onboarding:steps.login")
|
|
12680
12909
|
}), jsxRuntime.jsx(giger.Step, {
|
|
12681
|
-
css: styles$
|
|
12910
|
+
css: styles$6.step,
|
|
12682
12911
|
label: t("onboarding:steps.carriers")
|
|
12683
12912
|
}), jsxRuntime.jsx(giger.Step, {
|
|
12684
|
-
css: styles$
|
|
12913
|
+
css: styles$6.step,
|
|
12685
12914
|
label: t("onboarding:steps.addresses")
|
|
12686
12915
|
}), jsxRuntime.jsx(giger.Step, {
|
|
12687
|
-
css: styles$
|
|
12916
|
+
css: styles$6.step,
|
|
12688
12917
|
label: t("onboarding:steps.payment")
|
|
12689
12918
|
})]
|
|
12690
12919
|
})), renderStep(), ((_c = features === null || features === void 0 ? void 0 : features.presentation) === null || _c === void 0 ? void 0 : _c.poweredByShipEngine) && jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
@@ -12758,7 +12987,7 @@ const Cube = _a => {
|
|
|
12758
12987
|
}));
|
|
12759
12988
|
};
|
|
12760
12989
|
|
|
12761
|
-
const styles$
|
|
12990
|
+
const styles$5 = createStyles({
|
|
12762
12991
|
balanceText: theme => ({
|
|
12763
12992
|
color: theme.palette.secondary.dark
|
|
12764
12993
|
}),
|
|
@@ -12781,7 +13010,7 @@ const styles$6 = createStyles({
|
|
|
12781
13010
|
}
|
|
12782
13011
|
});
|
|
12783
13012
|
|
|
12784
|
-
const styles$
|
|
13013
|
+
const styles$4 = createStyles({
|
|
12785
13014
|
icon: theme => ({
|
|
12786
13015
|
color: theme.palette.primary.main,
|
|
12787
13016
|
marginRight: theme.spacing(2)
|
|
@@ -12826,10 +13055,10 @@ const Section = _a => {
|
|
|
12826
13055
|
rest = __rest(_a, ["bold", "title", "children", "rightContent"]);
|
|
12827
13056
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
12828
13057
|
children: [title && jsxRuntime.jsx("summary", Object.assign({
|
|
12829
|
-
css: styles$
|
|
13058
|
+
css: styles$4.summary
|
|
12830
13059
|
}, {
|
|
12831
13060
|
children: jsxRuntime.jsxs("div", Object.assign({
|
|
12832
|
-
css: styles$
|
|
13061
|
+
css: styles$4.summaryWrapper
|
|
12833
13062
|
}, {
|
|
12834
13063
|
children: [jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
12835
13064
|
bold: bold,
|
|
@@ -12837,13 +13066,13 @@ const Section = _a => {
|
|
|
12837
13066
|
}, {
|
|
12838
13067
|
children: title
|
|
12839
13068
|
})), rightContent && jsxRuntime.jsx("div", Object.assign({
|
|
12840
|
-
css: styles$
|
|
13069
|
+
css: styles$4.rightContentWrapper
|
|
12841
13070
|
}, {
|
|
12842
13071
|
children: rightContent
|
|
12843
13072
|
}))]
|
|
12844
13073
|
}))
|
|
12845
13074
|
})), jsxRuntime.jsx("section", Object.assign({
|
|
12846
|
-
css: styles$
|
|
13075
|
+
css: styles$4.section
|
|
12847
13076
|
}, rest, {
|
|
12848
13077
|
children: children
|
|
12849
13078
|
}))]
|
|
@@ -12915,7 +13144,7 @@ const FundAndPurchase = ({
|
|
|
12915
13144
|
}, {
|
|
12916
13145
|
children: [jsxRuntime.jsx(giger.Button, Object.assign({
|
|
12917
13146
|
bold: false,
|
|
12918
|
-
css: styles$
|
|
13147
|
+
css: styles$5.saveRateButton,
|
|
12919
13148
|
disabled: disabled || !carrierId || addFundsForm.isSubmitting || isRateFormSubmitting,
|
|
12920
13149
|
isLoading: isSavingRate,
|
|
12921
13150
|
onClick: handleSaveRate,
|
|
@@ -12935,7 +13164,7 @@ const FundAndPurchase = ({
|
|
|
12935
13164
|
// render when no rate has been selected yet
|
|
12936
13165
|
if (!carrierId) return jsxRuntime.jsxs("div", Object.assign({
|
|
12937
13166
|
className: className,
|
|
12938
|
-
css: styles$
|
|
13167
|
+
css: styles$5.container
|
|
12939
13168
|
}, {
|
|
12940
13169
|
children: [jsxRuntime.jsxs(Spread, {
|
|
12941
13170
|
children: [jsxRuntime.jsx(CarrierBalance, {
|
|
@@ -12959,7 +13188,7 @@ const FundAndPurchase = ({
|
|
|
12959
13188
|
// show balance, but not the funding form.
|
|
12960
13189
|
if (!isFundingEnabled) return jsxRuntime.jsxs("div", Object.assign({
|
|
12961
13190
|
className: className,
|
|
12962
|
-
css: styles$
|
|
13191
|
+
css: styles$5.container
|
|
12963
13192
|
}, {
|
|
12964
13193
|
children: [jsxRuntime.jsx(CarrierBalance, {
|
|
12965
13194
|
carrierId: carrierId
|
|
@@ -13001,13 +13230,13 @@ const FundAndPurchase = ({
|
|
|
13001
13230
|
var _a, _b;
|
|
13002
13231
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
13003
13232
|
children: [jsxRuntime.jsxs("section", Object.assign({
|
|
13004
|
-
css: styles$
|
|
13233
|
+
css: styles$5.getFormExtension(addFundsForm.isCustomAmount)
|
|
13005
13234
|
}, {
|
|
13006
13235
|
children: [jsxRuntime.jsx(InlineLabel, Object.assign({
|
|
13007
13236
|
label: t("manage-funding:fundAndPurchase.newBalance")
|
|
13008
13237
|
}, {
|
|
13009
13238
|
children: jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
13010
|
-
css: styles$
|
|
13239
|
+
css: styles$5.balanceText
|
|
13011
13240
|
}, {
|
|
13012
13241
|
children: formatMoney({
|
|
13013
13242
|
amount: balance + ((_a = addFundsForm.selectedAmount) !== null && _a !== void 0 ? _a : 0),
|
|
@@ -13018,7 +13247,7 @@ const FundAndPurchase = ({
|
|
|
13018
13247
|
label: t("manage-funding:fundAndPurchase.finalBalance")
|
|
13019
13248
|
}, {
|
|
13020
13249
|
children: jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
13021
|
-
css: styles$
|
|
13250
|
+
css: styles$5.balanceText
|
|
13022
13251
|
}, {
|
|
13023
13252
|
children: formatMoney({
|
|
13024
13253
|
amount: balance + ((_b = addFundsForm.selectedAmount) !== null && _b !== void 0 ? _b : 0) - purchaseAmount,
|
|
@@ -13045,7 +13274,7 @@ const FundAndPurchase = ({
|
|
|
13045
13274
|
}));
|
|
13046
13275
|
};
|
|
13047
13276
|
|
|
13048
|
-
const styles$
|
|
13277
|
+
const styles$3 = createStyles({
|
|
13049
13278
|
fundAndPurchase: theme => ({
|
|
13050
13279
|
borderTop: `1px solid ${theme.palette.gray.ultraLight}`
|
|
13051
13280
|
}),
|
|
@@ -13214,7 +13443,7 @@ const RateForm = ({
|
|
|
13214
13443
|
onClick: onSelectRate,
|
|
13215
13444
|
options: showHiddenRates ? rateOptions : filteredRateOptions
|
|
13216
13445
|
}), rateOptions.some(option => option.requiresAcknowledgement) && rateOptions.length > 5 && jsxRuntime.jsx(giger.Link, Object.assign({
|
|
13217
|
-
css: styles$
|
|
13446
|
+
css: styles$3.showMoreOrLessRatesButton,
|
|
13218
13447
|
onClick: () => {
|
|
13219
13448
|
var _a;
|
|
13220
13449
|
setShowHiddenRates(!showHiddenRates);
|
|
@@ -13235,7 +13464,7 @@ const RateForm = ({
|
|
|
13235
13464
|
}))
|
|
13236
13465
|
}))]
|
|
13237
13466
|
}) : !isLoading && !!allDisplayableErrors.length ? null : jsxRuntime.jsxs("article", Object.assign({
|
|
13238
|
-
css: styles$
|
|
13467
|
+
css: styles$3.ratesInterstitial,
|
|
13239
13468
|
role: "presentation"
|
|
13240
13469
|
}, {
|
|
13241
13470
|
children: [jsxRuntime.jsx(Cube, {
|
|
@@ -13261,7 +13490,7 @@ const RateForm = ({
|
|
|
13261
13490
|
balance: balance,
|
|
13262
13491
|
carrierId: selectedRate === null || selectedRate === void 0 ? void 0 : selectedRate.carrierId,
|
|
13263
13492
|
control: form.control,
|
|
13264
|
-
css: styles$
|
|
13493
|
+
css: styles$3.fundAndPurchase,
|
|
13265
13494
|
disabled: disabled,
|
|
13266
13495
|
isFundingEnabled: !!((_d = features === null || features === void 0 ? void 0 : features.rateForm) === null || _d === void 0 ? void 0 : _d.enableFunding),
|
|
13267
13496
|
isFundingRequired: (selectedRate === null || selectedRate === void 0 ? void 0 : selectedRate.balance) !== undefined && !!selectedRate.requiresFundedAmount,
|
|
@@ -13298,7 +13527,7 @@ const SuspendSalesOrder = ({
|
|
|
13298
13527
|
}));
|
|
13299
13528
|
};
|
|
13300
13529
|
|
|
13301
|
-
const styles$
|
|
13530
|
+
const styles$2 = createStyles({
|
|
13302
13531
|
itemDetail: theme => ({
|
|
13303
13532
|
padding: `${theme.spacing(0)}px ${theme.spacing(2)}px ${theme.spacing(2)}px ${theme.spacing(0)}px`
|
|
13304
13533
|
}),
|
|
@@ -13326,15 +13555,15 @@ const ItemsBreakdownTableHeader = ({
|
|
|
13326
13555
|
}) => jsxRuntime.jsx(giger.TableHeader, {
|
|
13327
13556
|
children: jsxRuntime.jsxs(giger.TableBaseRow, {
|
|
13328
13557
|
children: [jsxRuntime.jsx(giger.TableHeaderCell, {}), jsxRuntime.jsx(giger.TableHeaderCell, Object.assign({
|
|
13329
|
-
css: styles$
|
|
13558
|
+
css: styles$2.numericCell
|
|
13330
13559
|
}, {
|
|
13331
13560
|
children: "Qty"
|
|
13332
13561
|
})), hasValue && jsxRuntime.jsx(giger.TableHeaderCell, Object.assign({
|
|
13333
|
-
css: styles$
|
|
13562
|
+
css: styles$2.numericCell
|
|
13334
13563
|
}, {
|
|
13335
13564
|
children: "$/ea"
|
|
13336
13565
|
})), hasTotal && jsxRuntime.jsx(giger.TableHeaderCell, Object.assign({
|
|
13337
|
-
css: styles$
|
|
13566
|
+
css: styles$2.numericCell
|
|
13338
13567
|
}, {
|
|
13339
13568
|
children: "$ Total"
|
|
13340
13569
|
}))]
|
|
@@ -13346,7 +13575,7 @@ const ItemsBreakdown = ({
|
|
|
13346
13575
|
const hasValue = items.some(item => item.value !== undefined);
|
|
13347
13576
|
const hasTotal = items.some(item => item.totalValue !== undefined);
|
|
13348
13577
|
return jsxRuntime.jsx("div", Object.assign({
|
|
13349
|
-
css: styles$
|
|
13578
|
+
css: styles$2.tableWrapper
|
|
13350
13579
|
}, {
|
|
13351
13580
|
children: jsxRuntime.jsx(giger.Table, Object.assign({
|
|
13352
13581
|
header: jsxRuntime.jsx(ItemsBreakdownTableHeader, {
|
|
@@ -13365,7 +13594,7 @@ const ItemsBreakdown = ({
|
|
|
13365
13594
|
children: [jsxRuntime.jsx(giger.TableBaseRow, {
|
|
13366
13595
|
children: jsxRuntime.jsx(giger.TableBodyCell, Object.assign({
|
|
13367
13596
|
colSpan: 4,
|
|
13368
|
-
css: styles$
|
|
13597
|
+
css: styles$2.itemName
|
|
13369
13598
|
}, {
|
|
13370
13599
|
children: jsxRuntime.jsx(giger.Typography, {
|
|
13371
13600
|
children: name
|
|
@@ -13373,21 +13602,21 @@ const ItemsBreakdown = ({
|
|
|
13373
13602
|
}))
|
|
13374
13603
|
}), jsxRuntime.jsxs(giger.TableBaseRow, {
|
|
13375
13604
|
children: [jsxRuntime.jsx(giger.TableBodyCell, Object.assign({
|
|
13376
|
-
css: styles$
|
|
13605
|
+
css: styles$2.itemDetail
|
|
13377
13606
|
}, {
|
|
13378
13607
|
children: jsxRuntime.jsx(giger.Typography, {
|
|
13379
13608
|
children: detail
|
|
13380
13609
|
})
|
|
13381
13610
|
})), jsxRuntime.jsx(giger.TableBodyCell, Object.assign({
|
|
13382
|
-
css: [styles$
|
|
13611
|
+
css: [styles$2.numericCell, styles$2.itemDetail]
|
|
13383
13612
|
}, {
|
|
13384
13613
|
children: quantity
|
|
13385
13614
|
})), hasValue && jsxRuntime.jsx(giger.TableBodyCell, Object.assign({
|
|
13386
|
-
css: [styles$
|
|
13615
|
+
css: [styles$2.numericCell, styles$2.itemDetail]
|
|
13387
13616
|
}, {
|
|
13388
13617
|
children: value && formatMoney(value)
|
|
13389
13618
|
})), hasTotal && jsxRuntime.jsx(giger.TableBodyCell, Object.assign({
|
|
13390
|
-
css: [styles$
|
|
13619
|
+
css: [styles$2.numericCell, styles$2.itemDetail]
|
|
13391
13620
|
}, {
|
|
13392
13621
|
children: totalValue && formatMoney(totalValue)
|
|
13393
13622
|
}))]
|
|
@@ -13398,7 +13627,7 @@ const ItemsBreakdown = ({
|
|
|
13398
13627
|
}));
|
|
13399
13628
|
};
|
|
13400
13629
|
|
|
13401
|
-
const styles$
|
|
13630
|
+
const styles$1 = createStyles({
|
|
13402
13631
|
actions: theme => ({
|
|
13403
13632
|
background: "white",
|
|
13404
13633
|
display: "flex",
|
|
@@ -13470,7 +13699,7 @@ const CustomsItemActions = ({
|
|
|
13470
13699
|
const buttonRef = React.useRef(null);
|
|
13471
13700
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
13472
13701
|
children: [jsxRuntime.jsx(giger.Button, Object.assign({
|
|
13473
|
-
css: styles$
|
|
13702
|
+
css: styles$1.actionsButton,
|
|
13474
13703
|
onClick: toggleShowCustomsPopover,
|
|
13475
13704
|
ref: buttonRef,
|
|
13476
13705
|
variant: giger.ButtonVariant.TEXT
|
|
@@ -13493,7 +13722,7 @@ const CustomsItemActions = ({
|
|
|
13493
13722
|
reference: buttonRef.current
|
|
13494
13723
|
}, {
|
|
13495
13724
|
children: jsxRuntime.jsxs("div", Object.assign({
|
|
13496
|
-
css: styles$
|
|
13725
|
+
css: styles$1.actions
|
|
13497
13726
|
}, {
|
|
13498
13727
|
children: [jsxRuntime.jsx(giger.Button, Object.assign({
|
|
13499
13728
|
bold: false,
|
|
@@ -13569,7 +13798,7 @@ const CustomsItemsDisplay = ({
|
|
|
13569
13798
|
header: jsxRuntime.jsx(giger.TableHeader, {
|
|
13570
13799
|
children: jsxRuntime.jsxs(giger.TableBaseRow, {
|
|
13571
13800
|
children: [jsxRuntime.jsx(giger.TableHeaderCell, Object.assign({
|
|
13572
|
-
css: styles$
|
|
13801
|
+
css: styles$1.headerDescription
|
|
13573
13802
|
}, {
|
|
13574
13803
|
children: jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
13575
13804
|
variant: "subtitle2"
|
|
@@ -13577,7 +13806,7 @@ const CustomsItemsDisplay = ({
|
|
|
13577
13806
|
children: t("customs.fields.description")
|
|
13578
13807
|
}))
|
|
13579
13808
|
})), jsxRuntime.jsx(giger.TableHeaderCell, Object.assign({
|
|
13580
|
-
css: styles$
|
|
13809
|
+
css: styles$1.headerEach
|
|
13581
13810
|
}, {
|
|
13582
13811
|
children: jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
13583
13812
|
variant: "subtitle2"
|
|
@@ -13587,7 +13816,7 @@ const CustomsItemsDisplay = ({
|
|
|
13587
13816
|
})
|
|
13588
13817
|
}))
|
|
13589
13818
|
})), jsxRuntime.jsx(giger.TableHeaderCell, Object.assign({
|
|
13590
|
-
css: styles$
|
|
13819
|
+
css: styles$1.headerQty
|
|
13591
13820
|
}, {
|
|
13592
13821
|
children: jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
13593
13822
|
variant: "subtitle2"
|
|
@@ -13595,7 +13824,7 @@ const CustomsItemsDisplay = ({
|
|
|
13595
13824
|
children: t("customs.fields.quantity")
|
|
13596
13825
|
}))
|
|
13597
13826
|
})), jsxRuntime.jsx(giger.TableHeaderCell, Object.assign({
|
|
13598
|
-
css: styles$
|
|
13827
|
+
css: styles$1.headerTotal
|
|
13599
13828
|
}, {
|
|
13600
13829
|
children: jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
13601
13830
|
variant: "subtitle2"
|
|
@@ -13605,7 +13834,7 @@ const CustomsItemsDisplay = ({
|
|
|
13605
13834
|
})
|
|
13606
13835
|
}))
|
|
13607
13836
|
})), jsxRuntime.jsx(giger.TableHeaderCell, {
|
|
13608
|
-
css: styles$
|
|
13837
|
+
css: styles$1.actionsColumn
|
|
13609
13838
|
})]
|
|
13610
13839
|
})
|
|
13611
13840
|
})
|
|
@@ -13619,29 +13848,29 @@ const CustomsItemsDisplay = ({
|
|
|
13619
13848
|
children: customsItemForm
|
|
13620
13849
|
})) : jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
13621
13850
|
children: [jsxRuntime.jsx(giger.TableBodyCell, Object.assign({
|
|
13622
|
-
css: styles$
|
|
13851
|
+
css: styles$1.itemInfoLeft
|
|
13623
13852
|
}, {
|
|
13624
13853
|
children: item.description
|
|
13625
13854
|
})), jsxRuntime.jsx(giger.TableBodyCell, Object.assign({
|
|
13626
|
-
css: styles$
|
|
13855
|
+
css: styles$1.itemEach
|
|
13627
13856
|
}, {
|
|
13628
13857
|
children: formatMoney({
|
|
13629
13858
|
amount: Number(item.value),
|
|
13630
13859
|
currency: alchemy.SE.Currency.USD
|
|
13631
13860
|
})
|
|
13632
13861
|
})), jsxRuntime.jsx(giger.TableBodyCell, Object.assign({
|
|
13633
|
-
css: styles$
|
|
13862
|
+
css: styles$1.itemQty
|
|
13634
13863
|
}, {
|
|
13635
13864
|
children: item.quantity
|
|
13636
13865
|
})), jsxRuntime.jsx(giger.TableBodyCell, Object.assign({
|
|
13637
|
-
css: styles$
|
|
13866
|
+
css: styles$1.itemTotal
|
|
13638
13867
|
}, {
|
|
13639
13868
|
children: formatMoney({
|
|
13640
13869
|
amount: Number(item.value) * item.quantity,
|
|
13641
13870
|
currency: alchemy.SE.Currency.USD
|
|
13642
13871
|
})
|
|
13643
13872
|
})), jsxRuntime.jsx(giger.TableBodyCell, Object.assign({
|
|
13644
|
-
css: styles$
|
|
13873
|
+
css: styles$1.actionsColumn
|
|
13645
13874
|
}, {
|
|
13646
13875
|
children: jsxRuntime.jsx(CustomsItemActions, {
|
|
13647
13876
|
onDeleteClick: () => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -13657,7 +13886,7 @@ const CustomsItemsDisplay = ({
|
|
|
13657
13886
|
})
|
|
13658
13887
|
}), item.customsItemId !== (customsItemBeingEdited === null || customsItemBeingEdited === void 0 ? void 0 : customsItemBeingEdited.customsItemId) && jsxRuntime.jsx(giger.TableBaseRow, {
|
|
13659
13888
|
children: jsxRuntime.jsx(giger.TableBodyCell, Object.assign({
|
|
13660
|
-
css: styles$
|
|
13889
|
+
css: styles$1.hsCode
|
|
13661
13890
|
}, {
|
|
13662
13891
|
children: item.harmonizedTariffCode
|
|
13663
13892
|
}))
|
|
@@ -13818,6 +14047,8 @@ const ShipmentForm = ({
|
|
|
13818
14047
|
onSubmitParseShipTo,
|
|
13819
14048
|
onToggleAddressPreferenceDisclosure,
|
|
13820
14049
|
onUpdateCustoms,
|
|
14050
|
+
parseAddressErrors,
|
|
14051
|
+
resetParseAddress,
|
|
13821
14052
|
salesOrder,
|
|
13822
14053
|
shipment,
|
|
13823
14054
|
shippingPresets,
|
|
@@ -14097,7 +14328,9 @@ const ShipmentForm = ({
|
|
|
14097
14328
|
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,
|
|
14098
14329
|
formId: "edit-ship-to-form",
|
|
14099
14330
|
onSubmit: handleSubmitEditShipTo,
|
|
14100
|
-
onSubmitParse: onSubmitParseShipTo
|
|
14331
|
+
onSubmitParse: onSubmitParseShipTo,
|
|
14332
|
+
parseAddressErrors,
|
|
14333
|
+
resetParseAddress
|
|
14101
14334
|
});
|
|
14102
14335
|
const handleUpdateCustomsItems = React.useCallback(customsItems => __awaiter(void 0, void 0, void 0, function* () {
|
|
14103
14336
|
const result = yield onUpdateCustoms === null || onUpdateCustoms === void 0 ? void 0 : onUpdateCustoms({
|
|
@@ -14625,6 +14858,7 @@ const Shipment = ({
|
|
|
14625
14858
|
} = convertWeight(weight);
|
|
14626
14859
|
const requestedServices = React.useMemo(() => getRequestedServices(salesOrder), [salesOrder]);
|
|
14627
14860
|
const activeLabel = React.useMemo(() => labels === null || labels === void 0 ? void 0 : labels.find(l => l.status === "completed"), [labels]);
|
|
14861
|
+
const hasSalesOrder = React.useMemo(() => shipment.salesOrderIds.length > 0, [shipment.salesOrderIds.length]);
|
|
14628
14862
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
14629
14863
|
children: [jsxRuntime.jsxs(Section, Object.assign({
|
|
14630
14864
|
"data-testid": "orderDetail"
|
|
@@ -14646,12 +14880,12 @@ const Shipment = ({
|
|
|
14646
14880
|
children: [jsxRuntime.jsx(AddressDisplay, {
|
|
14647
14881
|
address: shipment.shipTo
|
|
14648
14882
|
}), jsxRuntime.jsx(Spacer, {})]
|
|
14649
|
-
})), jsxRuntime.jsxs(FieldLabel, Object.assign({
|
|
14883
|
+
})), hasSalesOrder && jsxRuntime.jsxs(FieldLabel, Object.assign({
|
|
14650
14884
|
"data-testid": "orderDate",
|
|
14651
14885
|
label: t("view-shipment:fields.orderDate")
|
|
14652
14886
|
}, {
|
|
14653
14887
|
children: [salesOrder ? formatDate(salesOrder.orderDate) : t("loading.salesOrder"), jsxRuntime.jsx(Spacer, {})]
|
|
14654
|
-
})), jsxRuntime.jsxs(FieldLabel, Object.assign({
|
|
14888
|
+
})), hasSalesOrder && jsxRuntime.jsxs(FieldLabel, Object.assign({
|
|
14655
14889
|
"data-testid": "orderValue",
|
|
14656
14890
|
label: t("view-shipment:fields.orderValue")
|
|
14657
14891
|
}, {
|
|
@@ -14734,7 +14968,11 @@ const Shipment = ({
|
|
|
14734
14968
|
})) : undefined,
|
|
14735
14969
|
title: t("view-shipment:sections.labels")
|
|
14736
14970
|
}, {
|
|
14737
|
-
children: [(
|
|
14971
|
+
children: [!(labels === null || labels === void 0 ? void 0 : labels.length) && jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
14972
|
+
variant: "body2"
|
|
14973
|
+
}, {
|
|
14974
|
+
children: t("view-shipment:noLabels")
|
|
14975
|
+
})), (_b = sortLabels(labels)) === null || _b === void 0 ? void 0 : _b.map((label, i, data) => {
|
|
14738
14976
|
const carrier = carriers === null || carriers === void 0 ? void 0 : carriers.find(c => c.carrierCode === label.carrierCode);
|
|
14739
14977
|
const service = carrier === null || carrier === void 0 ? void 0 : carrier.services.find(s => s.serviceCode === label.serviceCode);
|
|
14740
14978
|
return jsxRuntime.jsxs(React.Fragment, {
|
|
@@ -14850,7 +15088,7 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
14850
15088
|
SuspendShipment: SuspendShipment,
|
|
14851
15089
|
WarehouseForm: WarehouseForm,
|
|
14852
15090
|
WalletForm: WalletForm,
|
|
14853
|
-
styles: styles$
|
|
15091
|
+
styles: styles$j,
|
|
14854
15092
|
billingAddressSchema: billingAddressSchema,
|
|
14855
15093
|
walletSchema: walletSchema,
|
|
14856
15094
|
BillingFields: BillingFields,
|
|
@@ -14860,208 +15098,6 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
14860
15098
|
AddressPreferenceSelect: AddressPreferenceSelect
|
|
14861
15099
|
});
|
|
14862
15100
|
|
|
14863
|
-
const styles$1 = createStyles({
|
|
14864
|
-
edit: theme => ({
|
|
14865
|
-
color: theme.palette.primary.main,
|
|
14866
|
-
padding: `0 ${theme.spacing(2)}`
|
|
14867
|
-
}),
|
|
14868
|
-
getForm: showForm => theme => ({
|
|
14869
|
-
backgroundColor: theme.palette.gray.megaLight,
|
|
14870
|
-
display: showForm ? "flex" : "none",
|
|
14871
|
-
flexDirection: "column",
|
|
14872
|
-
padding: theme.spacing(2)
|
|
14873
|
-
}),
|
|
14874
|
-
input: theme => ({
|
|
14875
|
-
width: theme.spacing(13)
|
|
14876
|
-
}),
|
|
14877
|
-
marginLeft: {
|
|
14878
|
-
marginLeft: "auto"
|
|
14879
|
-
}
|
|
14880
|
-
});
|
|
14881
|
-
|
|
14882
|
-
const autoFundingSchema = zod.z.object({
|
|
14883
|
-
isEnabled: zod.z.boolean(),
|
|
14884
|
-
lowBalancePurchaseThreshold: moneySchema.extend({
|
|
14885
|
-
amount: zod.z.number().min(10)
|
|
14886
|
-
}),
|
|
14887
|
-
maximumPurchasesPerDay: zod.z.number().min(1),
|
|
14888
|
-
purchaseAmount: moneySchema.extend({
|
|
14889
|
-
amount: zod.z.number().min(10).max(10000)
|
|
14890
|
-
})
|
|
14891
|
-
});
|
|
14892
|
-
|
|
14893
|
-
/**
|
|
14894
|
-
* This form that allows users to enable or disable auto funding, and
|
|
14895
|
-
* configure auto funding rules in ShipEngine API.
|
|
14896
|
-
*
|
|
14897
|
-
* @param carrierId The carrierId of the carrier provider you wish to configure auto-funding rules for.
|
|
14898
|
-
*/
|
|
14899
|
-
const AutoFundingForm = ({
|
|
14900
|
-
carrierId
|
|
14901
|
-
}) => {
|
|
14902
|
-
const {
|
|
14903
|
-
t
|
|
14904
|
-
} = reactI18next.useTranslation();
|
|
14905
|
-
const updateAutoFunding = alchemy.useUpdateAutoFunding(carrierId);
|
|
14906
|
-
const autoFundingConfiguration = alchemy.useGetAutoFundingConfiguration(carrierId);
|
|
14907
|
-
const {
|
|
14908
|
-
data: autoFundingSettings
|
|
14909
|
-
} = autoFundingConfiguration;
|
|
14910
|
-
const [showForm, setShowForm] = React.useState(false);
|
|
14911
|
-
const [isSwitchOn, setIsSwitchOn] = React.useState(false);
|
|
14912
|
-
const form = reactHookForm.useForm({
|
|
14913
|
-
resolver: validationResolver(autoFundingSchema)
|
|
14914
|
-
});
|
|
14915
|
-
const watchIsEnabled = form.watch("isEnabled");
|
|
14916
|
-
const formReset = isEnabled => form.reset(values => Object.assign(Object.assign({}, values), {
|
|
14917
|
-
isEnabled
|
|
14918
|
-
}), {
|
|
14919
|
-
keepDirty: true
|
|
14920
|
-
});
|
|
14921
|
-
const handleSubmit = formLogger.capture(form.handleSubmit(values => {
|
|
14922
|
-
setShowForm(prev => !prev);
|
|
14923
|
-
setIsSwitchOn(true);
|
|
14924
|
-
const payload = values;
|
|
14925
|
-
updateAutoFunding.mutate(payload, {
|
|
14926
|
-
onSuccess: () => autoFundingConfiguration.refetch()
|
|
14927
|
-
});
|
|
14928
|
-
}));
|
|
14929
|
-
/**
|
|
14930
|
-
* This function toggles the form visibility and conditionally disables auto-funding
|
|
14931
|
-
* when falsy. This is because when someone toggles the enable auto-funding switch
|
|
14932
|
-
* off, they do not want to have auto-funding enabled at all.
|
|
14933
|
-
*/
|
|
14934
|
-
const handleToggle = isEnabled => {
|
|
14935
|
-
setIsSwitchOn(isEnabled);
|
|
14936
|
-
setShowForm(isEnabled);
|
|
14937
|
-
formReset(isEnabled);
|
|
14938
|
-
if (!isEnabled) {
|
|
14939
|
-
setIsSwitchOn(isEnabled);
|
|
14940
|
-
updateAutoFunding.mutate(form.getValues(), {
|
|
14941
|
-
onSuccess: () => autoFundingConfiguration.refetch()
|
|
14942
|
-
});
|
|
14943
|
-
}
|
|
14944
|
-
};
|
|
14945
|
-
if (autoFundingConfiguration.isLoading || updateAutoFunding.isLoading) return jsxRuntime.jsx(Loader, {
|
|
14946
|
-
message: t("manage-funding:autoFunding.isLoading")
|
|
14947
|
-
});
|
|
14948
|
-
if (!autoFundingSettings) throw new Error(t("errorMessages:unableToLoad.autoFundingSettings"));
|
|
14949
|
-
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
14950
|
-
children: [jsxRuntime.jsxs(Spread, {
|
|
14951
|
-
children: [jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
14952
|
-
bold: !!(autoFundingSettings === null || autoFundingSettings === void 0 ? void 0 : autoFundingSettings.isAutoPurchaseEnabled),
|
|
14953
|
-
variant: "body1"
|
|
14954
|
-
}, {
|
|
14955
|
-
children: t("manage-funding:autoFunding:isEnabledCTA")
|
|
14956
|
-
})), jsxRuntime.jsx(Switch, {
|
|
14957
|
-
"data-testid": "auto-funding-toggle",
|
|
14958
|
-
defaultChecked: isSwitchOn,
|
|
14959
|
-
name: "isEnabled",
|
|
14960
|
-
onChange: e => handleToggle(e.target.checked),
|
|
14961
|
-
value: isSwitchOn
|
|
14962
|
-
})]
|
|
14963
|
-
}), jsxRuntime.jsx(Spacer, {
|
|
14964
|
-
multiplier: 1
|
|
14965
|
-
}), !!(autoFundingSettings === null || autoFundingSettings === void 0 ? void 0 : autoFundingSettings.isAutoPurchaseEnabled) && !showForm && jsxRuntime.jsxs(Spread, {
|
|
14966
|
-
children: [jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
14967
|
-
variant: "body1"
|
|
14968
|
-
}, {
|
|
14969
|
-
children: t("manage-funding:autoFunding.readSettings", Object.assign({}, autoFundingSettings))
|
|
14970
|
-
})), jsxRuntime.jsx(LinkAction, {
|
|
14971
|
-
css: styles$1.edit,
|
|
14972
|
-
onClick: () => handleToggle(true),
|
|
14973
|
-
title: t("manage-funding:autoFunding:edit")
|
|
14974
|
-
})]
|
|
14975
|
-
}), jsxRuntime.jsxs("form", Object.assign({
|
|
14976
|
-
css: styles$1.getForm(showForm),
|
|
14977
|
-
"data-testid": "auto-funding-form",
|
|
14978
|
-
id: "auto-funding-form",
|
|
14979
|
-
onSubmit: handleSubmit
|
|
14980
|
-
}, {
|
|
14981
|
-
children: [jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
14982
|
-
bold: true,
|
|
14983
|
-
variant: "body1"
|
|
14984
|
-
}, {
|
|
14985
|
-
children: t("manage-funding:autoFunding:editSettings")
|
|
14986
|
-
})), jsxRuntime.jsx("div", Object.assign({
|
|
14987
|
-
css: styles$1.marginLeft
|
|
14988
|
-
}, {
|
|
14989
|
-
children: jsxRuntime.jsx(MoneyInput, {
|
|
14990
|
-
control: form.control,
|
|
14991
|
-
css: styles$1.input,
|
|
14992
|
-
"data-testid": "auto-funding-threshold-input",
|
|
14993
|
-
defaultValue: {
|
|
14994
|
-
amount: autoFundingSettings === null || autoFundingSettings === void 0 ? void 0 : autoFundingSettings.autoPurchaseThreshold,
|
|
14995
|
-
currency: alchemy.Currency.USD
|
|
14996
|
-
},
|
|
14997
|
-
disabled: !watchIsEnabled,
|
|
14998
|
-
label: t("manage-funding:autoFunding.lowBalancePurchaseThreshold"),
|
|
14999
|
-
labelWeight: "normal",
|
|
15000
|
-
name: "lowBalancePurchaseThreshold",
|
|
15001
|
-
showCurrencySymbol: true
|
|
15002
|
-
})
|
|
15003
|
-
})), jsxRuntime.jsx("div", Object.assign({
|
|
15004
|
-
css: styles$1.marginLeft
|
|
15005
|
-
}, {
|
|
15006
|
-
children: jsxRuntime.jsx(MoneyInput, {
|
|
15007
|
-
control: form.control,
|
|
15008
|
-
css: styles$1.input,
|
|
15009
|
-
"data-testid": "auto-funding-purchase-amount-input",
|
|
15010
|
-
defaultValue: {
|
|
15011
|
-
amount: autoFundingSettings === null || autoFundingSettings === void 0 ? void 0 : autoFundingSettings.autoPurchaseAmount,
|
|
15012
|
-
currency: alchemy.Currency.USD
|
|
15013
|
-
},
|
|
15014
|
-
disabled: !watchIsEnabled,
|
|
15015
|
-
label: t("manage-funding:autoFunding.purchaseAmount"),
|
|
15016
|
-
labelWeight: "normal",
|
|
15017
|
-
name: "purchaseAmount",
|
|
15018
|
-
showCurrencySymbol: true
|
|
15019
|
-
})
|
|
15020
|
-
})), jsxRuntime.jsx("div", Object.assign({
|
|
15021
|
-
css: styles$1.marginLeft
|
|
15022
|
-
}, {
|
|
15023
|
-
children: jsxRuntime.jsx(NumberInput, {
|
|
15024
|
-
control: form.control,
|
|
15025
|
-
css: styles$1.input,
|
|
15026
|
-
"data-testid": "auto-funding-max-per-day-input",
|
|
15027
|
-
defaultValue: autoFundingSettings === null || autoFundingSettings === void 0 ? void 0 : autoFundingSettings.autoPurchaseCutoff,
|
|
15028
|
-
disabled: !watchIsEnabled,
|
|
15029
|
-
isInteger: true,
|
|
15030
|
-
label: t("manage-funding:autoFunding.maximumPurchasesPerDay"),
|
|
15031
|
-
labelWeight: "normal",
|
|
15032
|
-
name: "maximumPurchasesPerDay"
|
|
15033
|
-
})
|
|
15034
|
-
})), jsxRuntime.jsxs(ButtonGroup, Object.assign({
|
|
15035
|
-
justify: "end"
|
|
15036
|
-
}, {
|
|
15037
|
-
children: [jsxRuntime.jsx(giger.Button, Object.assign({
|
|
15038
|
-
onClick: isSwitchOn ? () => setShowForm(false) : () => handleToggle(false),
|
|
15039
|
-
variant: giger.ButtonVariant.TEXT
|
|
15040
|
-
}, {
|
|
15041
|
-
children: t("actions.cancel")
|
|
15042
|
-
})), jsxRuntime.jsx(SubmitButton, Object.assign({
|
|
15043
|
-
control: form.control,
|
|
15044
|
-
"data-testid": "submit-auto-funding",
|
|
15045
|
-
disabled: !watchIsEnabled,
|
|
15046
|
-
requireDirty: true,
|
|
15047
|
-
variant: giger.ButtonVariant.OUTLINED
|
|
15048
|
-
}, {
|
|
15049
|
-
children: t("manage-funding:actions.saveRule")
|
|
15050
|
-
}))]
|
|
15051
|
-
}))]
|
|
15052
|
-
})), autoFundingConfiguration.error && jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
15053
|
-
children: [jsxRuntime.jsx(Spacer, {
|
|
15054
|
-
multiplier: 1
|
|
15055
|
-
}), jsxRuntime.jsx(giger.InlineNotification, Object.assign({
|
|
15056
|
-
title: t("manage-funding:autoFunding.error.title"),
|
|
15057
|
-
type: giger.NotificationType.ERROR
|
|
15058
|
-
}, {
|
|
15059
|
-
children: autoFundingConfiguration.error[0].message
|
|
15060
|
-
}))]
|
|
15061
|
-
})]
|
|
15062
|
-
});
|
|
15063
|
-
};
|
|
15064
|
-
|
|
15065
15101
|
const styles = createStyles({
|
|
15066
15102
|
getDateRangeSelect: fullWidth => theme => ({
|
|
15067
15103
|
minWidth: theme.spacing(30),
|
|
@@ -15367,6 +15403,7 @@ var common = {
|
|
|
15367
15403
|
},
|
|
15368
15404
|
errorMessages: {
|
|
15369
15405
|
invalidNameOrCompany: "Recipient name and company name (if provided) must have two characters in first and last name.",
|
|
15406
|
+
parsingFailure: "Parsing failed. Please check address and try again.",
|
|
15370
15407
|
noWarehouses: "You must have an active Ship From Location to use this feature.",
|
|
15371
15408
|
unableToLoad: {
|
|
15372
15409
|
accountSettings: "Unable to load account settings",
|
|
@@ -15832,7 +15869,8 @@ var viewShipment$1 = {
|
|
|
15832
15869
|
multipleShippingServices: "Multiple shipping services",
|
|
15833
15870
|
sections: {
|
|
15834
15871
|
labels: "Labels"
|
|
15835
|
-
}
|
|
15872
|
+
},
|
|
15873
|
+
noLabels: "No Labels"
|
|
15836
15874
|
}
|
|
15837
15875
|
};
|
|
15838
15876
|
|
|
@@ -16007,13 +16045,16 @@ const useAddress = ({
|
|
|
16007
16045
|
} = alchemy.useUpdateSalesOrderShipment();
|
|
16008
16046
|
const {
|
|
16009
16047
|
error: parseAddressErrors,
|
|
16010
|
-
mutateAsync: parseAddress
|
|
16048
|
+
mutateAsync: parseAddress,
|
|
16049
|
+
reset: resetParseAddress
|
|
16011
16050
|
} = alchemy.useParseAddress();
|
|
16012
16051
|
const [addressPreference, _setAddressPreference] = React.useState();
|
|
16013
16052
|
const [loading, setLoading] = React.useState(true);
|
|
16014
16053
|
const setAddressPreference = React.useCallback((...args) => {
|
|
16015
|
-
setLoading(false);
|
|
16016
16054
|
_setAddressPreference(...args);
|
|
16055
|
+
if (args.length > 0 && args[0]) {
|
|
16056
|
+
setLoading(false);
|
|
16057
|
+
}
|
|
16017
16058
|
}, [_setAddressPreference]);
|
|
16018
16059
|
const toggle = React.useCallback(() => {
|
|
16019
16060
|
let updatedSelection = undefined;
|
|
@@ -16140,14 +16181,16 @@ const useAddress = ({
|
|
|
16140
16181
|
title: t("charsetWarnings.address.title")
|
|
16141
16182
|
};
|
|
16142
16183
|
}, undefined), [addressPreference === null || addressPreference === void 0 ? void 0 : addressPreference.selection, t]);
|
|
16143
|
-
const errors = [...(validateAddressErrors !== null && validateAddressErrors !== void 0 ? validateAddressErrors : []), ...(updateShipmentErrors !== null && updateShipmentErrors !== void 0 ? updateShipmentErrors : [])
|
|
16184
|
+
const errors = [...(validateAddressErrors !== null && validateAddressErrors !== void 0 ? validateAddressErrors : []), ...(updateShipmentErrors !== null && updateShipmentErrors !== void 0 ? updateShipmentErrors : [])];
|
|
16144
16185
|
return {
|
|
16145
|
-
addressLoading: loading,
|
|
16146
16186
|
addressErrors: errors.length > 0 ? errors : undefined,
|
|
16187
|
+
addressLoading: loading,
|
|
16147
16188
|
addressPreference,
|
|
16148
16189
|
charsetWarning,
|
|
16149
16190
|
handleChangeAddress,
|
|
16150
|
-
handleParseShipTo
|
|
16191
|
+
handleParseShipTo,
|
|
16192
|
+
parseAddressErrors: parseAddressErrors !== null && parseAddressErrors !== void 0 ? parseAddressErrors : undefined,
|
|
16193
|
+
resetParseAddress
|
|
16151
16194
|
};
|
|
16152
16195
|
};
|
|
16153
16196
|
|
|
@@ -16243,6 +16286,9 @@ const useScrubErrors = ({
|
|
|
16243
16286
|
var usps_first_class_mail = [
|
|
16244
16287
|
"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."
|
|
16245
16288
|
];
|
|
16289
|
+
var usps_ground_advantage = [
|
|
16290
|
+
"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."
|
|
16291
|
+
];
|
|
16246
16292
|
var usps_media_mail = [
|
|
16247
16293
|
"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."
|
|
16248
16294
|
];
|
|
@@ -16284,6 +16330,7 @@ var rateMessages = {
|
|
|
16284
16330
|
"Tracking and refunds are not available for First Class Mail Large Envelopes or Flats labels."
|
|
16285
16331
|
],
|
|
16286
16332
|
usps_first_class_mail: usps_first_class_mail,
|
|
16333
|
+
usps_ground_advantage: usps_ground_advantage,
|
|
16287
16334
|
usps_media_mail: usps_media_mail,
|
|
16288
16335
|
usps_parcel_select: usps_parcel_select,
|
|
16289
16336
|
usps_priority_mail: usps_priority_mail,
|
|
@@ -16564,7 +16611,9 @@ const useShipmentForm = ({
|
|
|
16564
16611
|
addressPreference,
|
|
16565
16612
|
charsetWarning,
|
|
16566
16613
|
handleChangeAddress,
|
|
16567
|
-
handleParseShipTo
|
|
16614
|
+
handleParseShipTo,
|
|
16615
|
+
parseAddressErrors,
|
|
16616
|
+
resetParseAddress
|
|
16568
16617
|
} = useAddress({
|
|
16569
16618
|
compatibleCountryCodes,
|
|
16570
16619
|
onChange: React.useCallback((oldShipment, updatedShipment) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -16622,6 +16671,8 @@ const useShipmentForm = ({
|
|
|
16622
16671
|
onSubmit: handleSubmit,
|
|
16623
16672
|
onSubmitParseShipTo: handleParseShipTo,
|
|
16624
16673
|
onUpdateCustoms: handleUpdateCustoms,
|
|
16674
|
+
parseAddressErrors,
|
|
16675
|
+
resetParseAddress,
|
|
16625
16676
|
resetSalesOrderShipment,
|
|
16626
16677
|
salesOrder,
|
|
16627
16678
|
shipment,
|