@shipengine/elements 0.31.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 +389 -369
- package/index.js +392 -372
- package/package.json +1 -1
- package/src/components/preset-descriptor/preset-descriptor.styles.d.ts +1 -0
- package/src/elements/account-settings/account-settings.d.ts +1 -0
- package/src/elements/onboarding/onboarding.d.ts +1 -0
- package/src/elements/purchase-label/purchase-label.d.ts +1 -0
- package/src/elements/view-shipment/view-shipment.d.ts +1 -0
- package/src/elements/void-label/void-label.d.ts +1 -0
- package/src/locales/en/index.d.ts +1 -0
package/index.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
|
}));
|
|
@@ -8968,7 +9184,7 @@ const AddressParser = ({
|
|
|
8968
9184
|
}));
|
|
8969
9185
|
};
|
|
8970
9186
|
|
|
8971
|
-
const styles$
|
|
9187
|
+
const styles$k = createStyles({
|
|
8972
9188
|
grow: {
|
|
8973
9189
|
flexGrow: 1
|
|
8974
9190
|
},
|
|
@@ -9029,6 +9245,22 @@ const AddressFields = ({
|
|
|
9029
9245
|
labelWeight: "normal",
|
|
9030
9246
|
name: _formatFieldName("companyName"),
|
|
9031
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
|
|
9032
9264
|
}), jsxRuntime.jsx(TextInput, {
|
|
9033
9265
|
control: form.control,
|
|
9034
9266
|
form: formId,
|
|
@@ -9051,30 +9283,14 @@ const AddressFields = ({
|
|
|
9051
9283
|
labelWeight: "normal",
|
|
9052
9284
|
name: _formatFieldName("cityLocality"),
|
|
9053
9285
|
nativeLabel: true
|
|
9054
|
-
}), jsxRuntime.jsx(SelectAutoComplete, {
|
|
9055
|
-
control: form.control,
|
|
9056
|
-
form: formId,
|
|
9057
|
-
label: t("address.fields.countryCode"),
|
|
9058
|
-
labelWeight: "normal",
|
|
9059
|
-
name: _formatFieldName("countryCode"),
|
|
9060
|
-
nativeLabel: true,
|
|
9061
|
-
noResultsLabel: t("address.noResults"),
|
|
9062
|
-
onChange: value => {
|
|
9063
|
-
if (value) {
|
|
9064
|
-
form.setValue(_formatFieldName("stateProvince"), null, {
|
|
9065
|
-
shouldValidate: isSubmitted
|
|
9066
|
-
});
|
|
9067
|
-
}
|
|
9068
|
-
},
|
|
9069
|
-
options: countryCodeOptions
|
|
9070
9286
|
}), jsxRuntime.jsxs("div", Object.assign({
|
|
9071
|
-
css: styles$
|
|
9287
|
+
css: styles$k.stateZipWrapper
|
|
9072
9288
|
}, {
|
|
9073
9289
|
children: [jsxRuntime.jsx("div", Object.assign({
|
|
9074
|
-
css: styles$
|
|
9290
|
+
css: styles$k.stateWrapper
|
|
9075
9291
|
}, {
|
|
9076
9292
|
children: jsxRuntime.jsx("div", Object.assign({
|
|
9077
|
-
css: styles$
|
|
9293
|
+
css: styles$k.grow
|
|
9078
9294
|
}, {
|
|
9079
9295
|
children: watchCountryCode === "US" ?
|
|
9080
9296
|
// Domestic States
|
|
@@ -9099,10 +9315,10 @@ const AddressFields = ({
|
|
|
9099
9315
|
})
|
|
9100
9316
|
}))
|
|
9101
9317
|
})), jsxRuntime.jsx("div", Object.assign({
|
|
9102
|
-
css: styles$
|
|
9318
|
+
css: styles$k.zipWrapper
|
|
9103
9319
|
}, {
|
|
9104
9320
|
children: jsxRuntime.jsx("div", Object.assign({
|
|
9105
|
-
css: styles$
|
|
9321
|
+
css: styles$k.grow
|
|
9106
9322
|
}, {
|
|
9107
9323
|
children: jsxRuntime.jsx(TextInput, {
|
|
9108
9324
|
control: form.control,
|
|
@@ -9897,7 +10113,7 @@ const EditWalletAddressForm = ({
|
|
|
9897
10113
|
}));
|
|
9898
10114
|
};
|
|
9899
10115
|
|
|
9900
|
-
const styles$
|
|
10116
|
+
const styles$j = createStyles({
|
|
9901
10117
|
grid: theme => ({
|
|
9902
10118
|
margin: theme.spacing(4)
|
|
9903
10119
|
})
|
|
@@ -9959,7 +10175,7 @@ const WalletForm = ({
|
|
|
9959
10175
|
onSubmit: formLogger.capture(handleSubmit)
|
|
9960
10176
|
}, {
|
|
9961
10177
|
children: jsxRuntime.jsxs(giger.Grid, Object.assign({
|
|
9962
|
-
css: styles$
|
|
10178
|
+
css: styles$j.grid,
|
|
9963
10179
|
noPadding: true
|
|
9964
10180
|
}, {
|
|
9965
10181
|
children: [jsxRuntime.jsx(giger.GridChild, Object.assign({
|
|
@@ -10041,7 +10257,7 @@ const WalletForm = ({
|
|
|
10041
10257
|
}));
|
|
10042
10258
|
};
|
|
10043
10259
|
|
|
10044
|
-
const styles$
|
|
10260
|
+
const styles$i = createStyles({
|
|
10045
10261
|
boldLink: theme => ({
|
|
10046
10262
|
fontWeight: theme.typography.fontWeight.bold
|
|
10047
10263
|
}),
|
|
@@ -10083,11 +10299,11 @@ const EditBillingForm = ({
|
|
|
10083
10299
|
onSubmit: formLogger.capture(handleSubmit)
|
|
10084
10300
|
}, {
|
|
10085
10301
|
children: jsxRuntime.jsxs(giger.Grid, Object.assign({
|
|
10086
|
-
css: styles$
|
|
10302
|
+
css: styles$i.container
|
|
10087
10303
|
}, {
|
|
10088
10304
|
children: [jsxRuntime.jsx(giger.GridChild, Object.assign({
|
|
10089
10305
|
colSpan: 12,
|
|
10090
|
-
css: styles$
|
|
10306
|
+
css: styles$i.subtitle
|
|
10091
10307
|
}, {
|
|
10092
10308
|
children: jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
10093
10309
|
variant: "subtitle1"
|
|
@@ -10102,7 +10318,7 @@ const EditBillingForm = ({
|
|
|
10102
10318
|
})
|
|
10103
10319
|
})), jsxRuntime.jsx(giger.GridChild, Object.assign({
|
|
10104
10320
|
colSpan: 12,
|
|
10105
|
-
css: styles$
|
|
10321
|
+
css: styles$i.subtitle
|
|
10106
10322
|
}, {
|
|
10107
10323
|
children: jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
10108
10324
|
variant: "subtitle1"
|
|
@@ -10138,7 +10354,7 @@ const EditBillingForm = ({
|
|
|
10138
10354
|
children: t("actions.cancel")
|
|
10139
10355
|
})), jsxRuntime.jsx(SubmitButton, Object.assign({
|
|
10140
10356
|
control: form.control,
|
|
10141
|
-
css: styles$
|
|
10357
|
+
css: styles$i.boldLink,
|
|
10142
10358
|
variant: giger.ButtonVariant.OUTLINED
|
|
10143
10359
|
}, {
|
|
10144
10360
|
children: t("actions.save")
|
|
@@ -10157,7 +10373,7 @@ var img$1 = "data:image/svg+xml,%3csvg width='150' height='96' viewBox='0 0 150
|
|
|
10157
10373
|
|
|
10158
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";
|
|
10159
10375
|
|
|
10160
|
-
const styles$
|
|
10376
|
+
const styles$h = createStyles({
|
|
10161
10377
|
body: theme => ({
|
|
10162
10378
|
borderTop: `1px solid ${theme.palette.gray.light}`,
|
|
10163
10379
|
color: theme.palette.black,
|
|
@@ -10208,14 +10424,14 @@ const SettingsCard = ({
|
|
|
10208
10424
|
verticallyAligned
|
|
10209
10425
|
}) => {
|
|
10210
10426
|
return jsxRuntime.jsxs("div", Object.assign({
|
|
10211
|
-
css: verticallyAligned ? styles$
|
|
10427
|
+
css: verticallyAligned ? styles$h.verticalContainer : styles$h.container,
|
|
10212
10428
|
"data-testid": "settingsCard"
|
|
10213
10429
|
}, {
|
|
10214
10430
|
children: [jsxRuntime.jsxs("div", Object.assign({
|
|
10215
|
-
css: styles$
|
|
10431
|
+
css: styles$h.header
|
|
10216
10432
|
}, {
|
|
10217
10433
|
children: [jsxRuntime.jsxs("div", Object.assign({
|
|
10218
|
-
css: styles$
|
|
10434
|
+
css: styles$h.title
|
|
10219
10435
|
}, {
|
|
10220
10436
|
children: [typeof title === "string" ? jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
10221
10437
|
variant: "subtitle2"
|
|
@@ -10243,7 +10459,7 @@ const SettingsCard = ({
|
|
|
10243
10459
|
}))
|
|
10244
10460
|
}))]
|
|
10245
10461
|
})), children && jsxRuntime.jsx("div", Object.assign({
|
|
10246
|
-
css: styles$
|
|
10462
|
+
css: styles$h.body
|
|
10247
10463
|
}, {
|
|
10248
10464
|
children: jsxRuntime.jsxs("div", {
|
|
10249
10465
|
children: [children, accessoryAction && jsxRuntime.jsx(ButtonGroup, Object.assign({
|
|
@@ -10264,7 +10480,7 @@ const SettingsCard = ({
|
|
|
10264
10480
|
}));
|
|
10265
10481
|
};
|
|
10266
10482
|
|
|
10267
|
-
const styles$
|
|
10483
|
+
const styles$g = createStyles({
|
|
10268
10484
|
container: {
|
|
10269
10485
|
display: "flex",
|
|
10270
10486
|
height: "72px",
|
|
@@ -10294,7 +10510,7 @@ const WalletCard = ({
|
|
|
10294
10510
|
};
|
|
10295
10511
|
const Logo = provider ? logos[provider] : undefined;
|
|
10296
10512
|
return jsxRuntime.jsx("div", Object.assign({
|
|
10297
|
-
css: styles$
|
|
10513
|
+
css: styles$g.container
|
|
10298
10514
|
}, {
|
|
10299
10515
|
children: jsxRuntime.jsx(SettingsCard, {
|
|
10300
10516
|
cardAction: {
|
|
@@ -10308,7 +10524,7 @@ const WalletCard = ({
|
|
|
10308
10524
|
src: Logo,
|
|
10309
10525
|
width: 56
|
|
10310
10526
|
}) : jsxRuntime.jsx(giger.Icon, {
|
|
10311
|
-
css: styles$
|
|
10527
|
+
css: styles$g.icon,
|
|
10312
10528
|
name: gigerTheme.IconNames.CREDIT_CARD,
|
|
10313
10529
|
size: giger.IconSize.SIZE_LARGE
|
|
10314
10530
|
}), jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
@@ -10392,7 +10608,7 @@ var SvgShipengineLogo = function SvgShipengineLogo(props) {
|
|
|
10392
10608
|
})))));
|
|
10393
10609
|
};
|
|
10394
10610
|
|
|
10395
|
-
const styles$
|
|
10611
|
+
const styles$f = createStyles({
|
|
10396
10612
|
poweredByShipEngine: {
|
|
10397
10613
|
alignItems: "center",
|
|
10398
10614
|
color: "#818F9C",
|
|
@@ -10409,7 +10625,7 @@ const PoweredByShipEngine = () => {
|
|
|
10409
10625
|
t
|
|
10410
10626
|
} = reactI18next.useTranslation();
|
|
10411
10627
|
return jsxRuntime.jsxs("div", Object.assign({
|
|
10412
|
-
css: styles$
|
|
10628
|
+
css: styles$f.poweredByShipEngine
|
|
10413
10629
|
}, {
|
|
10414
10630
|
children: [jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
10415
10631
|
variant: "body2"
|
|
@@ -10568,7 +10784,7 @@ const AccountSettings = _a => {
|
|
|
10568
10784
|
});
|
|
10569
10785
|
};
|
|
10570
10786
|
|
|
10571
|
-
const styles$
|
|
10787
|
+
const styles$e = createStyles({
|
|
10572
10788
|
agreement: {
|
|
10573
10789
|
alignItems: "center",
|
|
10574
10790
|
display: "flex",
|
|
@@ -10646,10 +10862,10 @@ const DisplayCarrierTerms = c => {
|
|
|
10646
10862
|
const listCarrierLinks = () => {
|
|
10647
10863
|
return c.carrierTerms.links.map((term, index) => {
|
|
10648
10864
|
return jsxRuntime.jsx("li", Object.assign({
|
|
10649
|
-
css: styles$
|
|
10865
|
+
css: styles$e.listItems
|
|
10650
10866
|
}, {
|
|
10651
10867
|
children: jsxRuntime.jsx(giger.Link, Object.assign({
|
|
10652
|
-
css: styles$
|
|
10868
|
+
css: styles$e.link,
|
|
10653
10869
|
href: term.url,
|
|
10654
10870
|
isExternal: true,
|
|
10655
10871
|
target: "_blank"
|
|
@@ -10668,18 +10884,18 @@ const DisplayCarrierTerms = c => {
|
|
|
10668
10884
|
children: [jsxRuntime.jsx(Spacer, {
|
|
10669
10885
|
multiplier: 3
|
|
10670
10886
|
}), jsxRuntime.jsxs("div", Object.assign({
|
|
10671
|
-
css: styles$
|
|
10887
|
+
css: styles$e.terms
|
|
10672
10888
|
}, {
|
|
10673
10889
|
children: [jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
10674
10890
|
variant: "subtitle1"
|
|
10675
10891
|
}, {
|
|
10676
10892
|
children: c.carrierTerms.title
|
|
10677
10893
|
})), !!listCarrierContent().length && jsxRuntime.jsx("div", Object.assign({
|
|
10678
|
-
css: styles$
|
|
10894
|
+
css: styles$e.terms
|
|
10679
10895
|
}, {
|
|
10680
10896
|
children: listCarrierContent()
|
|
10681
10897
|
})), jsxRuntime.jsx("ul", Object.assign({
|
|
10682
|
-
css: styles$
|
|
10898
|
+
css: styles$e.links
|
|
10683
10899
|
}, {
|
|
10684
10900
|
children: listCarrierLinks()
|
|
10685
10901
|
}))]
|
|
@@ -10829,7 +11045,7 @@ const AddCarrierForm = ({
|
|
|
10829
11045
|
}));
|
|
10830
11046
|
};
|
|
10831
11047
|
|
|
10832
|
-
const styles$
|
|
11048
|
+
const styles$d = createStyles({
|
|
10833
11049
|
container: theme => ({
|
|
10834
11050
|
display: "flex",
|
|
10835
11051
|
gap: theme.spacing()
|
|
@@ -10867,13 +11083,13 @@ const Disclosure = ({
|
|
|
10867
11083
|
}, [open]);
|
|
10868
11084
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
10869
11085
|
children: [jsxRuntime.jsxs("div", Object.assign({
|
|
10870
|
-
css: styles$
|
|
11086
|
+
css: styles$d.container
|
|
10871
11087
|
}, {
|
|
10872
11088
|
children: [jsxRuntime.jsx("div", {
|
|
10873
11089
|
children: label
|
|
10874
11090
|
}), _showToggle && jsxRuntime.jsx("button", Object.assign({
|
|
10875
11091
|
"aria-expanded": isOpen,
|
|
10876
|
-
css: styles$
|
|
11092
|
+
css: styles$d.toggle,
|
|
10877
11093
|
onClick: () => {
|
|
10878
11094
|
setIsOpen(!isOpen);
|
|
10879
11095
|
onToggle(!isOpen);
|
|
@@ -10881,12 +11097,12 @@ const Disclosure = ({
|
|
|
10881
11097
|
type: "button"
|
|
10882
11098
|
}, {
|
|
10883
11099
|
children: jsxRuntime.jsx(giger.Icon, {
|
|
10884
|
-
css: styles$
|
|
11100
|
+
css: styles$d.icon,
|
|
10885
11101
|
name: isOpen ? gigerTheme.IconNames.CHEVRON_TOP : gigerTheme.IconNames.CHEVRON_BOTTOM
|
|
10886
11102
|
})
|
|
10887
11103
|
}))]
|
|
10888
11104
|
})), isOpen && jsxRuntime.jsx("div", Object.assign({
|
|
10889
|
-
css: styles$
|
|
11105
|
+
css: styles$d.content
|
|
10890
11106
|
}, {
|
|
10891
11107
|
children: typeof children === "function" ? children(() => setIsOpen(!isOpen)) : children
|
|
10892
11108
|
}))]
|
|
@@ -11014,7 +11230,7 @@ const getCarrierRecoverySchema = requiresAddress => zod.z.object({
|
|
|
11014
11230
|
address: requiresAddress ? baseSchema : baseSchema.optional()
|
|
11015
11231
|
});
|
|
11016
11232
|
|
|
11017
|
-
const styles$
|
|
11233
|
+
const styles$c = createStyles({
|
|
11018
11234
|
grid: theme => ({
|
|
11019
11235
|
margin: theme.spacing(4)
|
|
11020
11236
|
}),
|
|
@@ -11058,7 +11274,7 @@ const CarrierRecoveryForm = ({
|
|
|
11058
11274
|
onSubmit: formLogger.capture(handleSubmit)
|
|
11059
11275
|
}, {
|
|
11060
11276
|
children: jsxRuntime.jsxs(giger.Grid, Object.assign({
|
|
11061
|
-
css: styles$
|
|
11277
|
+
css: styles$c.grid,
|
|
11062
11278
|
noPadding: true
|
|
11063
11279
|
}, {
|
|
11064
11280
|
children: [requiresAddress && jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
@@ -11066,14 +11282,14 @@ const CarrierRecoveryForm = ({
|
|
|
11066
11282
|
colSpan: 12
|
|
11067
11283
|
}, {
|
|
11068
11284
|
children: jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
11069
|
-
css: styles$
|
|
11285
|
+
css: styles$c.heading,
|
|
11070
11286
|
variant: "heading4"
|
|
11071
11287
|
}, {
|
|
11072
11288
|
children: t("register-wallet:sections.carriers.title")
|
|
11073
11289
|
}))
|
|
11074
11290
|
})), jsxRuntime.jsx(giger.GridChild, Object.assign({
|
|
11075
11291
|
colSpan: 12,
|
|
11076
|
-
css: styles$
|
|
11292
|
+
css: styles$c.subtitle
|
|
11077
11293
|
}, {
|
|
11078
11294
|
children: jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
11079
11295
|
variant: "subtitle1"
|
|
@@ -11159,7 +11375,7 @@ const CarrierTermsForm = ({
|
|
|
11159
11375
|
onSubmit(payload.agreement);
|
|
11160
11376
|
}));
|
|
11161
11377
|
return jsxRuntime.jsxs("div", Object.assign({
|
|
11162
|
-
css: styles$
|
|
11378
|
+
css: styles$e.termsForm,
|
|
11163
11379
|
"data-testid": "carrier-terms-form"
|
|
11164
11380
|
}, {
|
|
11165
11381
|
children: [jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
@@ -11175,7 +11391,7 @@ const CarrierTermsForm = ({
|
|
|
11175
11391
|
})), jsxRuntime.jsx(Spacer, {
|
|
11176
11392
|
multiplier: 1
|
|
11177
11393
|
}), jsxRuntime.jsx("div", Object.assign({
|
|
11178
|
-
css: styles$
|
|
11394
|
+
css: styles$e.carrierLogos
|
|
11179
11395
|
}, {
|
|
11180
11396
|
children: metadatas.map(({
|
|
11181
11397
|
name,
|
|
@@ -11191,7 +11407,7 @@ const CarrierTermsForm = ({
|
|
|
11191
11407
|
onSubmit: formLogger.capture(handleSubmit)
|
|
11192
11408
|
}, {
|
|
11193
11409
|
children: jsxRuntime.jsxs("div", Object.assign({
|
|
11194
|
-
css: styles$
|
|
11410
|
+
css: styles$e.agreement
|
|
11195
11411
|
}, {
|
|
11196
11412
|
children: [jsxRuntime.jsx("div", {
|
|
11197
11413
|
children: jsxRuntime.jsx(CheckboxInput, {
|
|
@@ -11202,7 +11418,7 @@ const CarrierTermsForm = ({
|
|
|
11202
11418
|
size: giger.IconSize.SIZE_SMALL
|
|
11203
11419
|
}),
|
|
11204
11420
|
terms: jsxRuntime.jsx(giger.Link, {
|
|
11205
|
-
css: styles$
|
|
11421
|
+
css: styles$e.termsLink,
|
|
11206
11422
|
"data-testid": "terms-link",
|
|
11207
11423
|
onClick: e => {
|
|
11208
11424
|
e.preventDefault();
|
|
@@ -11220,7 +11436,7 @@ const CarrierTermsForm = ({
|
|
|
11220
11436
|
name: "agreement"
|
|
11221
11437
|
})
|
|
11222
11438
|
}), showTerms && jsxRuntime.jsxs("div", Object.assign({
|
|
11223
|
-
css: styles$
|
|
11439
|
+
css: styles$e.well
|
|
11224
11440
|
}, {
|
|
11225
11441
|
children: [jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
11226
11442
|
variant: "heading4"
|
|
@@ -11229,7 +11445,7 @@ const CarrierTermsForm = ({
|
|
|
11229
11445
|
})), terms.map(t => jsxRuntime.jsx(DisplayCarrierTerms, {
|
|
11230
11446
|
carrierTerms: t
|
|
11231
11447
|
}, t.title)), jsxRuntime.jsx("div", Object.assign({
|
|
11232
|
-
css: styles$
|
|
11448
|
+
css: styles$e.close
|
|
11233
11449
|
}, {
|
|
11234
11450
|
children: jsxRuntime.jsx(giger.Button, Object.assign({
|
|
11235
11451
|
onClick: () => setShowTerms(false),
|
|
@@ -11484,7 +11700,7 @@ const CopyButton = ({
|
|
|
11484
11700
|
}));
|
|
11485
11701
|
};
|
|
11486
11702
|
|
|
11487
|
-
const styles$
|
|
11703
|
+
const styles$b = createStyles({
|
|
11488
11704
|
trackingNumber: theme => ({
|
|
11489
11705
|
alignItems: "center",
|
|
11490
11706
|
display: "flex"
|
|
@@ -11530,10 +11746,10 @@ const Label = ({
|
|
|
11530
11746
|
shippingAmount: label.shipmentCost
|
|
11531
11747
|
}, {
|
|
11532
11748
|
children: label.trackingNumber && jsxRuntime.jsxs("div", Object.assign({
|
|
11533
|
-
css: styles$
|
|
11749
|
+
css: styles$b.trackingNumber
|
|
11534
11750
|
}, {
|
|
11535
11751
|
children: [jsxRuntime.jsx("div", Object.assign({
|
|
11536
|
-
css: styles$
|
|
11752
|
+
css: styles$b.truncatedTrackingNumber
|
|
11537
11753
|
}, {
|
|
11538
11754
|
children: label.trackingNumber.toString()
|
|
11539
11755
|
})), jsxRuntime.jsx(CopyButton, {
|
|
@@ -11645,7 +11861,7 @@ const LandingPageForm = ({
|
|
|
11645
11861
|
}));
|
|
11646
11862
|
};
|
|
11647
11863
|
|
|
11648
|
-
const styles$
|
|
11864
|
+
const styles$a = createStyles({
|
|
11649
11865
|
container: theme => ({
|
|
11650
11866
|
padding: theme.spacing(2)
|
|
11651
11867
|
}),
|
|
@@ -11667,11 +11883,11 @@ const LandingPage = ({
|
|
|
11667
11883
|
t
|
|
11668
11884
|
} = reactI18next.useTranslation();
|
|
11669
11885
|
return jsxRuntime.jsxs("div", Object.assign({
|
|
11670
|
-
css: styles$
|
|
11886
|
+
css: styles$a.container,
|
|
11671
11887
|
"data-testid": "landing-page"
|
|
11672
11888
|
}, {
|
|
11673
11889
|
children: [jsxRuntime.jsxs("div", Object.assign({
|
|
11674
|
-
css: styles$
|
|
11890
|
+
css: styles$a.header
|
|
11675
11891
|
}, {
|
|
11676
11892
|
children: [jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
11677
11893
|
variant: "heading4"
|
|
@@ -11689,7 +11905,7 @@ const LandingPage = ({
|
|
|
11689
11905
|
})), jsxRuntime.jsx(LandingPageForm, {
|
|
11690
11906
|
onSubmit: onSubmit
|
|
11691
11907
|
}), jsxRuntime.jsxs("div", Object.assign({
|
|
11692
|
-
css: styles$
|
|
11908
|
+
css: styles$a.header
|
|
11693
11909
|
}, {
|
|
11694
11910
|
children: [jsxRuntime.jsx(Spacer, {
|
|
11695
11911
|
multiplier: 6
|
|
@@ -11700,14 +11916,14 @@ const LandingPage = ({
|
|
|
11700
11916
|
})), jsxRuntime.jsx(Spacer, {
|
|
11701
11917
|
multiplier: 2
|
|
11702
11918
|
}), jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
11703
|
-
css: styles$
|
|
11919
|
+
css: styles$a.description,
|
|
11704
11920
|
variant: "body1"
|
|
11705
11921
|
}, {
|
|
11706
11922
|
children: t("onboarding:landing.messageLine1")
|
|
11707
11923
|
})), jsxRuntime.jsx(Spacer, {
|
|
11708
11924
|
multiplier: 2
|
|
11709
11925
|
}), jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
11710
|
-
css: styles$
|
|
11926
|
+
css: styles$a.description,
|
|
11711
11927
|
variant: "body1"
|
|
11712
11928
|
}, {
|
|
11713
11929
|
children: t("onboarding:landing.messageLine2")
|
|
@@ -11718,7 +11934,7 @@ const LandingPage = ({
|
|
|
11718
11934
|
}));
|
|
11719
11935
|
};
|
|
11720
11936
|
|
|
11721
|
-
const styles$
|
|
11937
|
+
const styles$9 = createStyles({
|
|
11722
11938
|
container: {
|
|
11723
11939
|
display: "flex",
|
|
11724
11940
|
flexDirection: "column"
|
|
@@ -11778,14 +11994,14 @@ const ListCarriersRow = ({
|
|
|
11778
11994
|
setIsSubmitting(false);
|
|
11779
11995
|
});
|
|
11780
11996
|
return jsxRuntime.jsxs("div", Object.assign({
|
|
11781
|
-
css: styles$
|
|
11997
|
+
css: styles$9.container,
|
|
11782
11998
|
"data-testid": "carrier-row"
|
|
11783
11999
|
}, {
|
|
11784
12000
|
children: [jsxRuntime.jsxs("div", Object.assign({
|
|
11785
|
-
css: styles$
|
|
12001
|
+
css: styles$9.rowContainer
|
|
11786
12002
|
}, {
|
|
11787
12003
|
children: [jsxRuntime.jsxs("div", Object.assign({
|
|
11788
|
-
css: styles$
|
|
12004
|
+
css: styles$9.logoContainer
|
|
11789
12005
|
}, {
|
|
11790
12006
|
children: [jsxRuntime.jsx("div", {
|
|
11791
12007
|
children: jsxRuntime.jsx("img", {
|
|
@@ -11803,7 +12019,7 @@ const ListCarriersRow = ({
|
|
|
11803
12019
|
css: _ref
|
|
11804
12020
|
}, {
|
|
11805
12021
|
children: jsxRuntime.jsx(LinkAction, {
|
|
11806
|
-
css: styles$
|
|
12022
|
+
css: styles$9.getConnectButton(isConnected),
|
|
11807
12023
|
isDisabled: isConnected || showDropDown,
|
|
11808
12024
|
isLoading: isSubmitting,
|
|
11809
12025
|
onClick: () => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -11821,7 +12037,7 @@ const ListCarriersRow = ({
|
|
|
11821
12037
|
}));
|
|
11822
12038
|
};
|
|
11823
12039
|
|
|
11824
|
-
const styles$
|
|
12040
|
+
const styles$8 = createStyles({
|
|
11825
12041
|
carriersList: theme => ({
|
|
11826
12042
|
"& > li:not(:last-of-type)": {
|
|
11827
12043
|
borderBottom: `1px solid ${theme.palette.gray.light}`
|
|
@@ -11882,7 +12098,7 @@ const ListCarriers = ({
|
|
|
11882
12098
|
}))
|
|
11883
12099
|
})), jsxRuntime.jsx(Spacer, {})]
|
|
11884
12100
|
}), jsxRuntime.jsx("ul", Object.assign({
|
|
11885
|
-
css: styles$
|
|
12101
|
+
css: styles$8.carriersList,
|
|
11886
12102
|
"data-testid": "carriers-list"
|
|
11887
12103
|
}, {
|
|
11888
12104
|
children: isLoading ? jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
@@ -11904,11 +12120,11 @@ const ListCarriers = ({
|
|
|
11904
12120
|
};
|
|
11905
12121
|
const LoadingSkeletonRow = () => {
|
|
11906
12122
|
return jsxRuntime.jsxs("div", Object.assign({
|
|
11907
|
-
css: styles$
|
|
12123
|
+
css: styles$8.skeletonRow,
|
|
11908
12124
|
"data-testid": "skeleton-carrier-row"
|
|
11909
12125
|
}, {
|
|
11910
12126
|
children: [jsxRuntime.jsxs("div", Object.assign({
|
|
11911
|
-
css: styles$
|
|
12127
|
+
css: styles$8.skeletonLogoContainer
|
|
11912
12128
|
}, {
|
|
11913
12129
|
children: [jsxRuntime.jsx(giger.Skeleton, {
|
|
11914
12130
|
animation: giger.SkeletonAnimation.WAVE,
|
|
@@ -12167,7 +12383,7 @@ const WarehouseForm = ({
|
|
|
12167
12383
|
}));
|
|
12168
12384
|
};
|
|
12169
12385
|
|
|
12170
|
-
const styles$
|
|
12386
|
+
const styles$7 = createStyles({
|
|
12171
12387
|
cardSpacing: theme => ({
|
|
12172
12388
|
display: "flex",
|
|
12173
12389
|
flexDirection: "column",
|
|
@@ -12197,9 +12413,9 @@ const ManageWarehouses = ({
|
|
|
12197
12413
|
const [showAddNewWarehouseForm, toggleShowAddNewWarehouseForm] = useToggle(false);
|
|
12198
12414
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
12199
12415
|
children: [showAddNewWarehouseForm ? jsxRuntime.jsx(AddressPreferenceProvider, Object.assign({
|
|
12200
|
-
css: styles$
|
|
12416
|
+
css: styles$7.well,
|
|
12201
12417
|
formHeader: jsxRuntime.jsxs("div", Object.assign({
|
|
12202
|
-
css: styles$
|
|
12418
|
+
css: styles$7.header
|
|
12203
12419
|
}, {
|
|
12204
12420
|
children: [jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
12205
12421
|
variant: "subtitle1"
|
|
@@ -12244,14 +12460,14 @@ const ManageWarehouses = ({
|
|
|
12244
12460
|
})]
|
|
12245
12461
|
}))
|
|
12246
12462
|
})), jsxRuntime.jsx("div", Object.assign({
|
|
12247
|
-
css: styles$
|
|
12463
|
+
css: styles$7.cardSpacing
|
|
12248
12464
|
}, {
|
|
12249
12465
|
children: warehouses.map(warehouse => {
|
|
12250
12466
|
if (editWarehouseId && editWarehouseId === warehouse.warehouseId) {
|
|
12251
12467
|
return jsxRuntime.jsx(AddressPreferenceProvider, Object.assign({
|
|
12252
|
-
css: styles$
|
|
12468
|
+
css: styles$7.well,
|
|
12253
12469
|
formHeader: jsxRuntime.jsxs("div", Object.assign({
|
|
12254
|
-
css: styles$
|
|
12470
|
+
css: styles$7.header
|
|
12255
12471
|
}, {
|
|
12256
12472
|
children: [jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
12257
12473
|
variant: "subtitle1"
|
|
@@ -12370,7 +12586,7 @@ const CompletionPage = ({
|
|
|
12370
12586
|
}));
|
|
12371
12587
|
};
|
|
12372
12588
|
|
|
12373
|
-
const styles$
|
|
12589
|
+
const styles$6 = createStyles({
|
|
12374
12590
|
container: theme => ({
|
|
12375
12591
|
padding: theme.spacing(2)
|
|
12376
12592
|
}),
|
|
@@ -12600,10 +12816,10 @@ const Onboarding = ({
|
|
|
12600
12816
|
if (agreedToTerms && warehouses.length && hasValidAddress && !hasStampsWallet && !hasCompletedBilling) {
|
|
12601
12817
|
return jsxRuntime.jsx(AddressPreferenceProvider, Object.assign({
|
|
12602
12818
|
formHeader: jsxRuntime.jsxs("div", Object.assign({
|
|
12603
|
-
css: styles$
|
|
12819
|
+
css: styles$6.walletFormHeader
|
|
12604
12820
|
}, {
|
|
12605
12821
|
children: [jsxRuntime.jsxs("div", Object.assign({
|
|
12606
|
-
css: styles$
|
|
12822
|
+
css: styles$6.walletFormTitle
|
|
12607
12823
|
}, {
|
|
12608
12824
|
children: [jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
12609
12825
|
variant: "heading4"
|
|
@@ -12682,22 +12898,22 @@ const Onboarding = ({
|
|
|
12682
12898
|
});
|
|
12683
12899
|
};
|
|
12684
12900
|
return jsxRuntime.jsxs("div", Object.assign({
|
|
12685
|
-
css: styles$
|
|
12901
|
+
css: styles$6.container
|
|
12686
12902
|
}, {
|
|
12687
12903
|
children: [jsxRuntime.jsxs(giger.Stepper, Object.assign({
|
|
12688
12904
|
currentStep: currentStep
|
|
12689
12905
|
}, {
|
|
12690
12906
|
children: [jsxRuntime.jsx(giger.Step, {
|
|
12691
|
-
css: styles$
|
|
12907
|
+
css: styles$6.step,
|
|
12692
12908
|
label: t("onboarding:steps.login")
|
|
12693
12909
|
}), jsxRuntime.jsx(giger.Step, {
|
|
12694
|
-
css: styles$
|
|
12910
|
+
css: styles$6.step,
|
|
12695
12911
|
label: t("onboarding:steps.carriers")
|
|
12696
12912
|
}), jsxRuntime.jsx(giger.Step, {
|
|
12697
|
-
css: styles$
|
|
12913
|
+
css: styles$6.step,
|
|
12698
12914
|
label: t("onboarding:steps.addresses")
|
|
12699
12915
|
}), jsxRuntime.jsx(giger.Step, {
|
|
12700
|
-
css: styles$
|
|
12916
|
+
css: styles$6.step,
|
|
12701
12917
|
label: t("onboarding:steps.payment")
|
|
12702
12918
|
})]
|
|
12703
12919
|
})), renderStep(), ((_c = features === null || features === void 0 ? void 0 : features.presentation) === null || _c === void 0 ? void 0 : _c.poweredByShipEngine) && jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
@@ -12771,7 +12987,7 @@ const Cube = _a => {
|
|
|
12771
12987
|
}));
|
|
12772
12988
|
};
|
|
12773
12989
|
|
|
12774
|
-
const styles$
|
|
12990
|
+
const styles$5 = createStyles({
|
|
12775
12991
|
balanceText: theme => ({
|
|
12776
12992
|
color: theme.palette.secondary.dark
|
|
12777
12993
|
}),
|
|
@@ -12794,7 +13010,7 @@ const styles$6 = createStyles({
|
|
|
12794
13010
|
}
|
|
12795
13011
|
});
|
|
12796
13012
|
|
|
12797
|
-
const styles$
|
|
13013
|
+
const styles$4 = createStyles({
|
|
12798
13014
|
icon: theme => ({
|
|
12799
13015
|
color: theme.palette.primary.main,
|
|
12800
13016
|
marginRight: theme.spacing(2)
|
|
@@ -12839,10 +13055,10 @@ const Section = _a => {
|
|
|
12839
13055
|
rest = __rest(_a, ["bold", "title", "children", "rightContent"]);
|
|
12840
13056
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
12841
13057
|
children: [title && jsxRuntime.jsx("summary", Object.assign({
|
|
12842
|
-
css: styles$
|
|
13058
|
+
css: styles$4.summary
|
|
12843
13059
|
}, {
|
|
12844
13060
|
children: jsxRuntime.jsxs("div", Object.assign({
|
|
12845
|
-
css: styles$
|
|
13061
|
+
css: styles$4.summaryWrapper
|
|
12846
13062
|
}, {
|
|
12847
13063
|
children: [jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
12848
13064
|
bold: bold,
|
|
@@ -12850,13 +13066,13 @@ const Section = _a => {
|
|
|
12850
13066
|
}, {
|
|
12851
13067
|
children: title
|
|
12852
13068
|
})), rightContent && jsxRuntime.jsx("div", Object.assign({
|
|
12853
|
-
css: styles$
|
|
13069
|
+
css: styles$4.rightContentWrapper
|
|
12854
13070
|
}, {
|
|
12855
13071
|
children: rightContent
|
|
12856
13072
|
}))]
|
|
12857
13073
|
}))
|
|
12858
13074
|
})), jsxRuntime.jsx("section", Object.assign({
|
|
12859
|
-
css: styles$
|
|
13075
|
+
css: styles$4.section
|
|
12860
13076
|
}, rest, {
|
|
12861
13077
|
children: children
|
|
12862
13078
|
}))]
|
|
@@ -12928,7 +13144,7 @@ const FundAndPurchase = ({
|
|
|
12928
13144
|
}, {
|
|
12929
13145
|
children: [jsxRuntime.jsx(giger.Button, Object.assign({
|
|
12930
13146
|
bold: false,
|
|
12931
|
-
css: styles$
|
|
13147
|
+
css: styles$5.saveRateButton,
|
|
12932
13148
|
disabled: disabled || !carrierId || addFundsForm.isSubmitting || isRateFormSubmitting,
|
|
12933
13149
|
isLoading: isSavingRate,
|
|
12934
13150
|
onClick: handleSaveRate,
|
|
@@ -12948,7 +13164,7 @@ const FundAndPurchase = ({
|
|
|
12948
13164
|
// render when no rate has been selected yet
|
|
12949
13165
|
if (!carrierId) return jsxRuntime.jsxs("div", Object.assign({
|
|
12950
13166
|
className: className,
|
|
12951
|
-
css: styles$
|
|
13167
|
+
css: styles$5.container
|
|
12952
13168
|
}, {
|
|
12953
13169
|
children: [jsxRuntime.jsxs(Spread, {
|
|
12954
13170
|
children: [jsxRuntime.jsx(CarrierBalance, {
|
|
@@ -12972,7 +13188,7 @@ const FundAndPurchase = ({
|
|
|
12972
13188
|
// show balance, but not the funding form.
|
|
12973
13189
|
if (!isFundingEnabled) return jsxRuntime.jsxs("div", Object.assign({
|
|
12974
13190
|
className: className,
|
|
12975
|
-
css: styles$
|
|
13191
|
+
css: styles$5.container
|
|
12976
13192
|
}, {
|
|
12977
13193
|
children: [jsxRuntime.jsx(CarrierBalance, {
|
|
12978
13194
|
carrierId: carrierId
|
|
@@ -13014,13 +13230,13 @@ const FundAndPurchase = ({
|
|
|
13014
13230
|
var _a, _b;
|
|
13015
13231
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
13016
13232
|
children: [jsxRuntime.jsxs("section", Object.assign({
|
|
13017
|
-
css: styles$
|
|
13233
|
+
css: styles$5.getFormExtension(addFundsForm.isCustomAmount)
|
|
13018
13234
|
}, {
|
|
13019
13235
|
children: [jsxRuntime.jsx(InlineLabel, Object.assign({
|
|
13020
13236
|
label: t("manage-funding:fundAndPurchase.newBalance")
|
|
13021
13237
|
}, {
|
|
13022
13238
|
children: jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
13023
|
-
css: styles$
|
|
13239
|
+
css: styles$5.balanceText
|
|
13024
13240
|
}, {
|
|
13025
13241
|
children: formatMoney({
|
|
13026
13242
|
amount: balance + ((_a = addFundsForm.selectedAmount) !== null && _a !== void 0 ? _a : 0),
|
|
@@ -13031,7 +13247,7 @@ const FundAndPurchase = ({
|
|
|
13031
13247
|
label: t("manage-funding:fundAndPurchase.finalBalance")
|
|
13032
13248
|
}, {
|
|
13033
13249
|
children: jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
13034
|
-
css: styles$
|
|
13250
|
+
css: styles$5.balanceText
|
|
13035
13251
|
}, {
|
|
13036
13252
|
children: formatMoney({
|
|
13037
13253
|
amount: balance + ((_b = addFundsForm.selectedAmount) !== null && _b !== void 0 ? _b : 0) - purchaseAmount,
|
|
@@ -13058,7 +13274,7 @@ const FundAndPurchase = ({
|
|
|
13058
13274
|
}));
|
|
13059
13275
|
};
|
|
13060
13276
|
|
|
13061
|
-
const styles$
|
|
13277
|
+
const styles$3 = createStyles({
|
|
13062
13278
|
fundAndPurchase: theme => ({
|
|
13063
13279
|
borderTop: `1px solid ${theme.palette.gray.ultraLight}`
|
|
13064
13280
|
}),
|
|
@@ -13227,7 +13443,7 @@ const RateForm = ({
|
|
|
13227
13443
|
onClick: onSelectRate,
|
|
13228
13444
|
options: showHiddenRates ? rateOptions : filteredRateOptions
|
|
13229
13445
|
}), rateOptions.some(option => option.requiresAcknowledgement) && rateOptions.length > 5 && jsxRuntime.jsx(giger.Link, Object.assign({
|
|
13230
|
-
css: styles$
|
|
13446
|
+
css: styles$3.showMoreOrLessRatesButton,
|
|
13231
13447
|
onClick: () => {
|
|
13232
13448
|
var _a;
|
|
13233
13449
|
setShowHiddenRates(!showHiddenRates);
|
|
@@ -13248,7 +13464,7 @@ const RateForm = ({
|
|
|
13248
13464
|
}))
|
|
13249
13465
|
}))]
|
|
13250
13466
|
}) : !isLoading && !!allDisplayableErrors.length ? null : jsxRuntime.jsxs("article", Object.assign({
|
|
13251
|
-
css: styles$
|
|
13467
|
+
css: styles$3.ratesInterstitial,
|
|
13252
13468
|
role: "presentation"
|
|
13253
13469
|
}, {
|
|
13254
13470
|
children: [jsxRuntime.jsx(Cube, {
|
|
@@ -13274,7 +13490,7 @@ const RateForm = ({
|
|
|
13274
13490
|
balance: balance,
|
|
13275
13491
|
carrierId: selectedRate === null || selectedRate === void 0 ? void 0 : selectedRate.carrierId,
|
|
13276
13492
|
control: form.control,
|
|
13277
|
-
css: styles$
|
|
13493
|
+
css: styles$3.fundAndPurchase,
|
|
13278
13494
|
disabled: disabled,
|
|
13279
13495
|
isFundingEnabled: !!((_d = features === null || features === void 0 ? void 0 : features.rateForm) === null || _d === void 0 ? void 0 : _d.enableFunding),
|
|
13280
13496
|
isFundingRequired: (selectedRate === null || selectedRate === void 0 ? void 0 : selectedRate.balance) !== undefined && !!selectedRate.requiresFundedAmount,
|
|
@@ -13311,7 +13527,7 @@ const SuspendSalesOrder = ({
|
|
|
13311
13527
|
}));
|
|
13312
13528
|
};
|
|
13313
13529
|
|
|
13314
|
-
const styles$
|
|
13530
|
+
const styles$2 = createStyles({
|
|
13315
13531
|
itemDetail: theme => ({
|
|
13316
13532
|
padding: `${theme.spacing(0)}px ${theme.spacing(2)}px ${theme.spacing(2)}px ${theme.spacing(0)}px`
|
|
13317
13533
|
}),
|
|
@@ -13339,15 +13555,15 @@ const ItemsBreakdownTableHeader = ({
|
|
|
13339
13555
|
}) => jsxRuntime.jsx(giger.TableHeader, {
|
|
13340
13556
|
children: jsxRuntime.jsxs(giger.TableBaseRow, {
|
|
13341
13557
|
children: [jsxRuntime.jsx(giger.TableHeaderCell, {}), jsxRuntime.jsx(giger.TableHeaderCell, Object.assign({
|
|
13342
|
-
css: styles$
|
|
13558
|
+
css: styles$2.numericCell
|
|
13343
13559
|
}, {
|
|
13344
13560
|
children: "Qty"
|
|
13345
13561
|
})), hasValue && jsxRuntime.jsx(giger.TableHeaderCell, Object.assign({
|
|
13346
|
-
css: styles$
|
|
13562
|
+
css: styles$2.numericCell
|
|
13347
13563
|
}, {
|
|
13348
13564
|
children: "$/ea"
|
|
13349
13565
|
})), hasTotal && jsxRuntime.jsx(giger.TableHeaderCell, Object.assign({
|
|
13350
|
-
css: styles$
|
|
13566
|
+
css: styles$2.numericCell
|
|
13351
13567
|
}, {
|
|
13352
13568
|
children: "$ Total"
|
|
13353
13569
|
}))]
|
|
@@ -13359,7 +13575,7 @@ const ItemsBreakdown = ({
|
|
|
13359
13575
|
const hasValue = items.some(item => item.value !== undefined);
|
|
13360
13576
|
const hasTotal = items.some(item => item.totalValue !== undefined);
|
|
13361
13577
|
return jsxRuntime.jsx("div", Object.assign({
|
|
13362
|
-
css: styles$
|
|
13578
|
+
css: styles$2.tableWrapper
|
|
13363
13579
|
}, {
|
|
13364
13580
|
children: jsxRuntime.jsx(giger.Table, Object.assign({
|
|
13365
13581
|
header: jsxRuntime.jsx(ItemsBreakdownTableHeader, {
|
|
@@ -13378,7 +13594,7 @@ const ItemsBreakdown = ({
|
|
|
13378
13594
|
children: [jsxRuntime.jsx(giger.TableBaseRow, {
|
|
13379
13595
|
children: jsxRuntime.jsx(giger.TableBodyCell, Object.assign({
|
|
13380
13596
|
colSpan: 4,
|
|
13381
|
-
css: styles$
|
|
13597
|
+
css: styles$2.itemName
|
|
13382
13598
|
}, {
|
|
13383
13599
|
children: jsxRuntime.jsx(giger.Typography, {
|
|
13384
13600
|
children: name
|
|
@@ -13386,21 +13602,21 @@ const ItemsBreakdown = ({
|
|
|
13386
13602
|
}))
|
|
13387
13603
|
}), jsxRuntime.jsxs(giger.TableBaseRow, {
|
|
13388
13604
|
children: [jsxRuntime.jsx(giger.TableBodyCell, Object.assign({
|
|
13389
|
-
css: styles$
|
|
13605
|
+
css: styles$2.itemDetail
|
|
13390
13606
|
}, {
|
|
13391
13607
|
children: jsxRuntime.jsx(giger.Typography, {
|
|
13392
13608
|
children: detail
|
|
13393
13609
|
})
|
|
13394
13610
|
})), jsxRuntime.jsx(giger.TableBodyCell, Object.assign({
|
|
13395
|
-
css: [styles$
|
|
13611
|
+
css: [styles$2.numericCell, styles$2.itemDetail]
|
|
13396
13612
|
}, {
|
|
13397
13613
|
children: quantity
|
|
13398
13614
|
})), hasValue && jsxRuntime.jsx(giger.TableBodyCell, Object.assign({
|
|
13399
|
-
css: [styles$
|
|
13615
|
+
css: [styles$2.numericCell, styles$2.itemDetail]
|
|
13400
13616
|
}, {
|
|
13401
13617
|
children: value && formatMoney(value)
|
|
13402
13618
|
})), hasTotal && jsxRuntime.jsx(giger.TableBodyCell, Object.assign({
|
|
13403
|
-
css: [styles$
|
|
13619
|
+
css: [styles$2.numericCell, styles$2.itemDetail]
|
|
13404
13620
|
}, {
|
|
13405
13621
|
children: totalValue && formatMoney(totalValue)
|
|
13406
13622
|
}))]
|
|
@@ -13411,7 +13627,7 @@ const ItemsBreakdown = ({
|
|
|
13411
13627
|
}));
|
|
13412
13628
|
};
|
|
13413
13629
|
|
|
13414
|
-
const styles$
|
|
13630
|
+
const styles$1 = createStyles({
|
|
13415
13631
|
actions: theme => ({
|
|
13416
13632
|
background: "white",
|
|
13417
13633
|
display: "flex",
|
|
@@ -13483,7 +13699,7 @@ const CustomsItemActions = ({
|
|
|
13483
13699
|
const buttonRef = React.useRef(null);
|
|
13484
13700
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
13485
13701
|
children: [jsxRuntime.jsx(giger.Button, Object.assign({
|
|
13486
|
-
css: styles$
|
|
13702
|
+
css: styles$1.actionsButton,
|
|
13487
13703
|
onClick: toggleShowCustomsPopover,
|
|
13488
13704
|
ref: buttonRef,
|
|
13489
13705
|
variant: giger.ButtonVariant.TEXT
|
|
@@ -13506,7 +13722,7 @@ const CustomsItemActions = ({
|
|
|
13506
13722
|
reference: buttonRef.current
|
|
13507
13723
|
}, {
|
|
13508
13724
|
children: jsxRuntime.jsxs("div", Object.assign({
|
|
13509
|
-
css: styles$
|
|
13725
|
+
css: styles$1.actions
|
|
13510
13726
|
}, {
|
|
13511
13727
|
children: [jsxRuntime.jsx(giger.Button, Object.assign({
|
|
13512
13728
|
bold: false,
|
|
@@ -13582,7 +13798,7 @@ const CustomsItemsDisplay = ({
|
|
|
13582
13798
|
header: jsxRuntime.jsx(giger.TableHeader, {
|
|
13583
13799
|
children: jsxRuntime.jsxs(giger.TableBaseRow, {
|
|
13584
13800
|
children: [jsxRuntime.jsx(giger.TableHeaderCell, Object.assign({
|
|
13585
|
-
css: styles$
|
|
13801
|
+
css: styles$1.headerDescription
|
|
13586
13802
|
}, {
|
|
13587
13803
|
children: jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
13588
13804
|
variant: "subtitle2"
|
|
@@ -13590,7 +13806,7 @@ const CustomsItemsDisplay = ({
|
|
|
13590
13806
|
children: t("customs.fields.description")
|
|
13591
13807
|
}))
|
|
13592
13808
|
})), jsxRuntime.jsx(giger.TableHeaderCell, Object.assign({
|
|
13593
|
-
css: styles$
|
|
13809
|
+
css: styles$1.headerEach
|
|
13594
13810
|
}, {
|
|
13595
13811
|
children: jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
13596
13812
|
variant: "subtitle2"
|
|
@@ -13600,7 +13816,7 @@ const CustomsItemsDisplay = ({
|
|
|
13600
13816
|
})
|
|
13601
13817
|
}))
|
|
13602
13818
|
})), jsxRuntime.jsx(giger.TableHeaderCell, Object.assign({
|
|
13603
|
-
css: styles$
|
|
13819
|
+
css: styles$1.headerQty
|
|
13604
13820
|
}, {
|
|
13605
13821
|
children: jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
13606
13822
|
variant: "subtitle2"
|
|
@@ -13608,7 +13824,7 @@ const CustomsItemsDisplay = ({
|
|
|
13608
13824
|
children: t("customs.fields.quantity")
|
|
13609
13825
|
}))
|
|
13610
13826
|
})), jsxRuntime.jsx(giger.TableHeaderCell, Object.assign({
|
|
13611
|
-
css: styles$
|
|
13827
|
+
css: styles$1.headerTotal
|
|
13612
13828
|
}, {
|
|
13613
13829
|
children: jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
13614
13830
|
variant: "subtitle2"
|
|
@@ -13618,7 +13834,7 @@ const CustomsItemsDisplay = ({
|
|
|
13618
13834
|
})
|
|
13619
13835
|
}))
|
|
13620
13836
|
})), jsxRuntime.jsx(giger.TableHeaderCell, {
|
|
13621
|
-
css: styles$
|
|
13837
|
+
css: styles$1.actionsColumn
|
|
13622
13838
|
})]
|
|
13623
13839
|
})
|
|
13624
13840
|
})
|
|
@@ -13632,29 +13848,29 @@ const CustomsItemsDisplay = ({
|
|
|
13632
13848
|
children: customsItemForm
|
|
13633
13849
|
})) : jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
13634
13850
|
children: [jsxRuntime.jsx(giger.TableBodyCell, Object.assign({
|
|
13635
|
-
css: styles$
|
|
13851
|
+
css: styles$1.itemInfoLeft
|
|
13636
13852
|
}, {
|
|
13637
13853
|
children: item.description
|
|
13638
13854
|
})), jsxRuntime.jsx(giger.TableBodyCell, Object.assign({
|
|
13639
|
-
css: styles$
|
|
13855
|
+
css: styles$1.itemEach
|
|
13640
13856
|
}, {
|
|
13641
13857
|
children: formatMoney({
|
|
13642
13858
|
amount: Number(item.value),
|
|
13643
13859
|
currency: alchemy.SE.Currency.USD
|
|
13644
13860
|
})
|
|
13645
13861
|
})), jsxRuntime.jsx(giger.TableBodyCell, Object.assign({
|
|
13646
|
-
css: styles$
|
|
13862
|
+
css: styles$1.itemQty
|
|
13647
13863
|
}, {
|
|
13648
13864
|
children: item.quantity
|
|
13649
13865
|
})), jsxRuntime.jsx(giger.TableBodyCell, Object.assign({
|
|
13650
|
-
css: styles$
|
|
13866
|
+
css: styles$1.itemTotal
|
|
13651
13867
|
}, {
|
|
13652
13868
|
children: formatMoney({
|
|
13653
13869
|
amount: Number(item.value) * item.quantity,
|
|
13654
13870
|
currency: alchemy.SE.Currency.USD
|
|
13655
13871
|
})
|
|
13656
13872
|
})), jsxRuntime.jsx(giger.TableBodyCell, Object.assign({
|
|
13657
|
-
css: styles$
|
|
13873
|
+
css: styles$1.actionsColumn
|
|
13658
13874
|
}, {
|
|
13659
13875
|
children: jsxRuntime.jsx(CustomsItemActions, {
|
|
13660
13876
|
onDeleteClick: () => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -13670,7 +13886,7 @@ const CustomsItemsDisplay = ({
|
|
|
13670
13886
|
})
|
|
13671
13887
|
}), item.customsItemId !== (customsItemBeingEdited === null || customsItemBeingEdited === void 0 ? void 0 : customsItemBeingEdited.customsItemId) && jsxRuntime.jsx(giger.TableBaseRow, {
|
|
13672
13888
|
children: jsxRuntime.jsx(giger.TableBodyCell, Object.assign({
|
|
13673
|
-
css: styles$
|
|
13889
|
+
css: styles$1.hsCode
|
|
13674
13890
|
}, {
|
|
13675
13891
|
children: item.harmonizedTariffCode
|
|
13676
13892
|
}))
|
|
@@ -14642,6 +14858,7 @@ const Shipment = ({
|
|
|
14642
14858
|
} = convertWeight(weight);
|
|
14643
14859
|
const requestedServices = React.useMemo(() => getRequestedServices(salesOrder), [salesOrder]);
|
|
14644
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]);
|
|
14645
14862
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
14646
14863
|
children: [jsxRuntime.jsxs(Section, Object.assign({
|
|
14647
14864
|
"data-testid": "orderDetail"
|
|
@@ -14663,12 +14880,12 @@ const Shipment = ({
|
|
|
14663
14880
|
children: [jsxRuntime.jsx(AddressDisplay, {
|
|
14664
14881
|
address: shipment.shipTo
|
|
14665
14882
|
}), jsxRuntime.jsx(Spacer, {})]
|
|
14666
|
-
})), jsxRuntime.jsxs(FieldLabel, Object.assign({
|
|
14883
|
+
})), hasSalesOrder && jsxRuntime.jsxs(FieldLabel, Object.assign({
|
|
14667
14884
|
"data-testid": "orderDate",
|
|
14668
14885
|
label: t("view-shipment:fields.orderDate")
|
|
14669
14886
|
}, {
|
|
14670
14887
|
children: [salesOrder ? formatDate(salesOrder.orderDate) : t("loading.salesOrder"), jsxRuntime.jsx(Spacer, {})]
|
|
14671
|
-
})), jsxRuntime.jsxs(FieldLabel, Object.assign({
|
|
14888
|
+
})), hasSalesOrder && jsxRuntime.jsxs(FieldLabel, Object.assign({
|
|
14672
14889
|
"data-testid": "orderValue",
|
|
14673
14890
|
label: t("view-shipment:fields.orderValue")
|
|
14674
14891
|
}, {
|
|
@@ -14751,7 +14968,11 @@ const Shipment = ({
|
|
|
14751
14968
|
})) : undefined,
|
|
14752
14969
|
title: t("view-shipment:sections.labels")
|
|
14753
14970
|
}, {
|
|
14754
|
-
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) => {
|
|
14755
14976
|
const carrier = carriers === null || carriers === void 0 ? void 0 : carriers.find(c => c.carrierCode === label.carrierCode);
|
|
14756
14977
|
const service = carrier === null || carrier === void 0 ? void 0 : carrier.services.find(s => s.serviceCode === label.serviceCode);
|
|
14757
14978
|
return jsxRuntime.jsxs(React.Fragment, {
|
|
@@ -14867,7 +15088,7 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
14867
15088
|
SuspendShipment: SuspendShipment,
|
|
14868
15089
|
WarehouseForm: WarehouseForm,
|
|
14869
15090
|
WalletForm: WalletForm,
|
|
14870
|
-
styles: styles$
|
|
15091
|
+
styles: styles$j,
|
|
14871
15092
|
billingAddressSchema: billingAddressSchema,
|
|
14872
15093
|
walletSchema: walletSchema,
|
|
14873
15094
|
BillingFields: BillingFields,
|
|
@@ -14877,208 +15098,6 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
14877
15098
|
AddressPreferenceSelect: AddressPreferenceSelect
|
|
14878
15099
|
});
|
|
14879
15100
|
|
|
14880
|
-
const styles$1 = createStyles({
|
|
14881
|
-
edit: theme => ({
|
|
14882
|
-
color: theme.palette.primary.main,
|
|
14883
|
-
padding: `0 ${theme.spacing(2)}`
|
|
14884
|
-
}),
|
|
14885
|
-
getForm: showForm => theme => ({
|
|
14886
|
-
backgroundColor: theme.palette.gray.megaLight,
|
|
14887
|
-
display: showForm ? "flex" : "none",
|
|
14888
|
-
flexDirection: "column",
|
|
14889
|
-
padding: theme.spacing(2)
|
|
14890
|
-
}),
|
|
14891
|
-
input: theme => ({
|
|
14892
|
-
width: theme.spacing(13)
|
|
14893
|
-
}),
|
|
14894
|
-
marginLeft: {
|
|
14895
|
-
marginLeft: "auto"
|
|
14896
|
-
}
|
|
14897
|
-
});
|
|
14898
|
-
|
|
14899
|
-
const autoFundingSchema = zod.z.object({
|
|
14900
|
-
isEnabled: zod.z.boolean(),
|
|
14901
|
-
lowBalancePurchaseThreshold: moneySchema.extend({
|
|
14902
|
-
amount: zod.z.number().min(10)
|
|
14903
|
-
}),
|
|
14904
|
-
maximumPurchasesPerDay: zod.z.number().min(1),
|
|
14905
|
-
purchaseAmount: moneySchema.extend({
|
|
14906
|
-
amount: zod.z.number().min(10).max(10000)
|
|
14907
|
-
})
|
|
14908
|
-
});
|
|
14909
|
-
|
|
14910
|
-
/**
|
|
14911
|
-
* This form that allows users to enable or disable auto funding, and
|
|
14912
|
-
* configure auto funding rules in ShipEngine API.
|
|
14913
|
-
*
|
|
14914
|
-
* @param carrierId The carrierId of the carrier provider you wish to configure auto-funding rules for.
|
|
14915
|
-
*/
|
|
14916
|
-
const AutoFundingForm = ({
|
|
14917
|
-
carrierId
|
|
14918
|
-
}) => {
|
|
14919
|
-
const {
|
|
14920
|
-
t
|
|
14921
|
-
} = reactI18next.useTranslation();
|
|
14922
|
-
const updateAutoFunding = alchemy.useUpdateAutoFunding(carrierId);
|
|
14923
|
-
const autoFundingConfiguration = alchemy.useGetAutoFundingConfiguration(carrierId);
|
|
14924
|
-
const {
|
|
14925
|
-
data: autoFundingSettings
|
|
14926
|
-
} = autoFundingConfiguration;
|
|
14927
|
-
const [showForm, setShowForm] = React.useState(false);
|
|
14928
|
-
const [isSwitchOn, setIsSwitchOn] = React.useState(false);
|
|
14929
|
-
const form = reactHookForm.useForm({
|
|
14930
|
-
resolver: validationResolver(autoFundingSchema)
|
|
14931
|
-
});
|
|
14932
|
-
const watchIsEnabled = form.watch("isEnabled");
|
|
14933
|
-
const formReset = isEnabled => form.reset(values => Object.assign(Object.assign({}, values), {
|
|
14934
|
-
isEnabled
|
|
14935
|
-
}), {
|
|
14936
|
-
keepDirty: true
|
|
14937
|
-
});
|
|
14938
|
-
const handleSubmit = formLogger.capture(form.handleSubmit(values => {
|
|
14939
|
-
setShowForm(prev => !prev);
|
|
14940
|
-
setIsSwitchOn(true);
|
|
14941
|
-
const payload = values;
|
|
14942
|
-
updateAutoFunding.mutate(payload, {
|
|
14943
|
-
onSuccess: () => autoFundingConfiguration.refetch()
|
|
14944
|
-
});
|
|
14945
|
-
}));
|
|
14946
|
-
/**
|
|
14947
|
-
* This function toggles the form visibility and conditionally disables auto-funding
|
|
14948
|
-
* when falsy. This is because when someone toggles the enable auto-funding switch
|
|
14949
|
-
* off, they do not want to have auto-funding enabled at all.
|
|
14950
|
-
*/
|
|
14951
|
-
const handleToggle = isEnabled => {
|
|
14952
|
-
setIsSwitchOn(isEnabled);
|
|
14953
|
-
setShowForm(isEnabled);
|
|
14954
|
-
formReset(isEnabled);
|
|
14955
|
-
if (!isEnabled) {
|
|
14956
|
-
setIsSwitchOn(isEnabled);
|
|
14957
|
-
updateAutoFunding.mutate(form.getValues(), {
|
|
14958
|
-
onSuccess: () => autoFundingConfiguration.refetch()
|
|
14959
|
-
});
|
|
14960
|
-
}
|
|
14961
|
-
};
|
|
14962
|
-
if (autoFundingConfiguration.isLoading || updateAutoFunding.isLoading) return jsxRuntime.jsx(Loader, {
|
|
14963
|
-
message: t("manage-funding:autoFunding.isLoading")
|
|
14964
|
-
});
|
|
14965
|
-
if (!autoFundingSettings) throw new Error(t("errorMessages:unableToLoad.autoFundingSettings"));
|
|
14966
|
-
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
14967
|
-
children: [jsxRuntime.jsxs(Spread, {
|
|
14968
|
-
children: [jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
14969
|
-
bold: !!(autoFundingSettings === null || autoFundingSettings === void 0 ? void 0 : autoFundingSettings.isAutoPurchaseEnabled),
|
|
14970
|
-
variant: "body1"
|
|
14971
|
-
}, {
|
|
14972
|
-
children: t("manage-funding:autoFunding:isEnabledCTA")
|
|
14973
|
-
})), jsxRuntime.jsx(Switch, {
|
|
14974
|
-
"data-testid": "auto-funding-toggle",
|
|
14975
|
-
defaultChecked: isSwitchOn,
|
|
14976
|
-
name: "isEnabled",
|
|
14977
|
-
onChange: e => handleToggle(e.target.checked),
|
|
14978
|
-
value: isSwitchOn
|
|
14979
|
-
})]
|
|
14980
|
-
}), jsxRuntime.jsx(Spacer, {
|
|
14981
|
-
multiplier: 1
|
|
14982
|
-
}), !!(autoFundingSettings === null || autoFundingSettings === void 0 ? void 0 : autoFundingSettings.isAutoPurchaseEnabled) && !showForm && jsxRuntime.jsxs(Spread, {
|
|
14983
|
-
children: [jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
14984
|
-
variant: "body1"
|
|
14985
|
-
}, {
|
|
14986
|
-
children: t("manage-funding:autoFunding.readSettings", Object.assign({}, autoFundingSettings))
|
|
14987
|
-
})), jsxRuntime.jsx(LinkAction, {
|
|
14988
|
-
css: styles$1.edit,
|
|
14989
|
-
onClick: () => handleToggle(true),
|
|
14990
|
-
title: t("manage-funding:autoFunding:edit")
|
|
14991
|
-
})]
|
|
14992
|
-
}), jsxRuntime.jsxs("form", Object.assign({
|
|
14993
|
-
css: styles$1.getForm(showForm),
|
|
14994
|
-
"data-testid": "auto-funding-form",
|
|
14995
|
-
id: "auto-funding-form",
|
|
14996
|
-
onSubmit: handleSubmit
|
|
14997
|
-
}, {
|
|
14998
|
-
children: [jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
14999
|
-
bold: true,
|
|
15000
|
-
variant: "body1"
|
|
15001
|
-
}, {
|
|
15002
|
-
children: t("manage-funding:autoFunding:editSettings")
|
|
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-threshold-input",
|
|
15010
|
-
defaultValue: {
|
|
15011
|
-
amount: autoFundingSettings === null || autoFundingSettings === void 0 ? void 0 : autoFundingSettings.autoPurchaseThreshold,
|
|
15012
|
-
currency: alchemy.Currency.USD
|
|
15013
|
-
},
|
|
15014
|
-
disabled: !watchIsEnabled,
|
|
15015
|
-
label: t("manage-funding:autoFunding.lowBalancePurchaseThreshold"),
|
|
15016
|
-
labelWeight: "normal",
|
|
15017
|
-
name: "lowBalancePurchaseThreshold",
|
|
15018
|
-
showCurrencySymbol: true
|
|
15019
|
-
})
|
|
15020
|
-
})), jsxRuntime.jsx("div", Object.assign({
|
|
15021
|
-
css: styles$1.marginLeft
|
|
15022
|
-
}, {
|
|
15023
|
-
children: jsxRuntime.jsx(MoneyInput, {
|
|
15024
|
-
control: form.control,
|
|
15025
|
-
css: styles$1.input,
|
|
15026
|
-
"data-testid": "auto-funding-purchase-amount-input",
|
|
15027
|
-
defaultValue: {
|
|
15028
|
-
amount: autoFundingSettings === null || autoFundingSettings === void 0 ? void 0 : autoFundingSettings.autoPurchaseAmount,
|
|
15029
|
-
currency: alchemy.Currency.USD
|
|
15030
|
-
},
|
|
15031
|
-
disabled: !watchIsEnabled,
|
|
15032
|
-
label: t("manage-funding:autoFunding.purchaseAmount"),
|
|
15033
|
-
labelWeight: "normal",
|
|
15034
|
-
name: "purchaseAmount",
|
|
15035
|
-
showCurrencySymbol: true
|
|
15036
|
-
})
|
|
15037
|
-
})), jsxRuntime.jsx("div", Object.assign({
|
|
15038
|
-
css: styles$1.marginLeft
|
|
15039
|
-
}, {
|
|
15040
|
-
children: jsxRuntime.jsx(NumberInput, {
|
|
15041
|
-
control: form.control,
|
|
15042
|
-
css: styles$1.input,
|
|
15043
|
-
"data-testid": "auto-funding-max-per-day-input",
|
|
15044
|
-
defaultValue: autoFundingSettings === null || autoFundingSettings === void 0 ? void 0 : autoFundingSettings.autoPurchaseCutoff,
|
|
15045
|
-
disabled: !watchIsEnabled,
|
|
15046
|
-
isInteger: true,
|
|
15047
|
-
label: t("manage-funding:autoFunding.maximumPurchasesPerDay"),
|
|
15048
|
-
labelWeight: "normal",
|
|
15049
|
-
name: "maximumPurchasesPerDay"
|
|
15050
|
-
})
|
|
15051
|
-
})), jsxRuntime.jsxs(ButtonGroup, Object.assign({
|
|
15052
|
-
justify: "end"
|
|
15053
|
-
}, {
|
|
15054
|
-
children: [jsxRuntime.jsx(giger.Button, Object.assign({
|
|
15055
|
-
onClick: isSwitchOn ? () => setShowForm(false) : () => handleToggle(false),
|
|
15056
|
-
variant: giger.ButtonVariant.TEXT
|
|
15057
|
-
}, {
|
|
15058
|
-
children: t("actions.cancel")
|
|
15059
|
-
})), jsxRuntime.jsx(SubmitButton, Object.assign({
|
|
15060
|
-
control: form.control,
|
|
15061
|
-
"data-testid": "submit-auto-funding",
|
|
15062
|
-
disabled: !watchIsEnabled,
|
|
15063
|
-
requireDirty: true,
|
|
15064
|
-
variant: giger.ButtonVariant.OUTLINED
|
|
15065
|
-
}, {
|
|
15066
|
-
children: t("manage-funding:actions.saveRule")
|
|
15067
|
-
}))]
|
|
15068
|
-
}))]
|
|
15069
|
-
})), autoFundingConfiguration.error && jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
15070
|
-
children: [jsxRuntime.jsx(Spacer, {
|
|
15071
|
-
multiplier: 1
|
|
15072
|
-
}), jsxRuntime.jsx(giger.InlineNotification, Object.assign({
|
|
15073
|
-
title: t("manage-funding:autoFunding.error.title"),
|
|
15074
|
-
type: giger.NotificationType.ERROR
|
|
15075
|
-
}, {
|
|
15076
|
-
children: autoFundingConfiguration.error[0].message
|
|
15077
|
-
}))]
|
|
15078
|
-
})]
|
|
15079
|
-
});
|
|
15080
|
-
};
|
|
15081
|
-
|
|
15082
15101
|
const styles = createStyles({
|
|
15083
15102
|
getDateRangeSelect: fullWidth => theme => ({
|
|
15084
15103
|
minWidth: theme.spacing(30),
|
|
@@ -15850,7 +15869,8 @@ var viewShipment$1 = {
|
|
|
15850
15869
|
multipleShippingServices: "Multiple shipping services",
|
|
15851
15870
|
sections: {
|
|
15852
15871
|
labels: "Labels"
|
|
15853
|
-
}
|
|
15872
|
+
},
|
|
15873
|
+
noLabels: "No Labels"
|
|
15854
15874
|
}
|
|
15855
15875
|
};
|
|
15856
15876
|
|