@shipengine/elements 0.37.3 → 0.37.4
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 +47 -32
- package/index.js +48 -33
- package/package.json +1 -1
- package/src/components/items-breakdown/items-breakdown.styles.d.ts +14 -1
- package/src/elements/account-settings/account-settings.d.ts +1 -2
- package/src/elements/configure-shipment/configure-shipment.d.ts +1 -0
- package/src/elements/onboarding/onboarding.d.ts +1 -2
- package/src/elements/purchase-label/purchase-label.d.ts +1 -2
- package/src/elements/view-shipment/view-shipment.d.ts +1 -2
- package/src/elements/void-label/void-label.d.ts +1 -2
- package/src/locales/en/index.d.ts +1 -2
package/index.cjs
CHANGED
|
@@ -4536,8 +4536,7 @@ const useShipmentMetadata = shipment => {
|
|
|
4536
4536
|
};
|
|
4537
4537
|
|
|
4538
4538
|
let _$2 = t => t,
|
|
4539
|
-
_t$2
|
|
4540
|
-
_t2$2;
|
|
4539
|
+
_t$2;
|
|
4541
4540
|
const findGenericPackageFromCarriers = carriers => {
|
|
4542
4541
|
const carrier = carriers.find(c => c.packages.some(p => p.packageCode === "package"));
|
|
4543
4542
|
return carrier === null || carrier === void 0 ? void 0 : carrier.packages.find(p => p.packageCode === "package");
|
|
@@ -4564,17 +4563,14 @@ const usePackageOptions = (carriers, customPackageTypes, shipment) => {
|
|
|
4564
4563
|
[c.carrierCode]: partialResults[c.carrierCode] === undefined
|
|
4565
4564
|
}));
|
|
4566
4565
|
const genericPackage = findGenericPackageFromCarriers(carriers);
|
|
4567
|
-
const
|
|
4568
|
-
label: t(_t$2 || (_t$2 = _$2`packageCategories.
|
|
4569
|
-
options: [{
|
|
4566
|
+
const customPackageOptions = [...(genericPackage || (customPackageTypes === null || customPackageTypes === void 0 ? void 0 : customPackageTypes.length) ? [{
|
|
4567
|
+
label: t(_t$2 || (_t$2 = _$2`packageCategories.customPackages`)),
|
|
4568
|
+
options: [...(genericPackage ? [{
|
|
4570
4569
|
label: t("packageCodes.package"),
|
|
4571
4570
|
value: {
|
|
4572
4571
|
code: "package"
|
|
4573
4572
|
}
|
|
4574
|
-
}]
|
|
4575
|
-
}] : []), ...((customPackageTypes === null || customPackageTypes === void 0 ? void 0 : customPackageTypes.length) ? [{
|
|
4576
|
-
label: t(_t2$2 || (_t2$2 = _$2`packageCategories.myCustomPackages`)),
|
|
4577
|
-
options: customPackageTypes.sort((a, b) => a.name.localeCompare(b.name)).map(({
|
|
4573
|
+
}] : []), ...((customPackageTypes === null || customPackageTypes === void 0 ? void 0 : customPackageTypes.length) ? customPackageTypes.sort((a, b) => a.name.localeCompare(b.name)).map(({
|
|
4578
4574
|
dimensions,
|
|
4579
4575
|
name,
|
|
4580
4576
|
packageId
|
|
@@ -4585,7 +4581,7 @@ const usePackageOptions = (carriers, customPackageTypes, shipment) => {
|
|
|
4585
4581
|
code: packageId
|
|
4586
4582
|
}
|
|
4587
4583
|
};
|
|
4588
|
-
})
|
|
4584
|
+
}) : [])]
|
|
4589
4585
|
}] : [])];
|
|
4590
4586
|
return carriers.reduce((options, carrier) => {
|
|
4591
4587
|
if (carrier.packages.length === 0) return options;
|
|
@@ -4606,7 +4602,7 @@ const usePackageOptions = (carriers, customPackageTypes, shipment) => {
|
|
|
4606
4602
|
})),
|
|
4607
4603
|
value: carrier.carrierId
|
|
4608
4604
|
}];
|
|
4609
|
-
},
|
|
4605
|
+
}, customPackageOptions);
|
|
4610
4606
|
}, [carriers, customPackageTypes, isPoBox, isUnsupportedUpsCountry, t]);
|
|
4611
4607
|
};
|
|
4612
4608
|
|
|
@@ -14911,15 +14907,29 @@ const SuspendSalesOrder = ({
|
|
|
14911
14907
|
};
|
|
14912
14908
|
|
|
14913
14909
|
const styles$2 = createStyles({
|
|
14910
|
+
itemDescription: theme => ({
|
|
14911
|
+
display: "flex",
|
|
14912
|
+
flexDirection: "column",
|
|
14913
|
+
padding: `${theme.spacing(2)}px ${theme.spacing(2)}px ${theme.spacing(0)}px ${theme.spacing(0)}px`
|
|
14914
|
+
}),
|
|
14914
14915
|
itemDetail: theme => ({
|
|
14915
|
-
padding: `${theme.spacing(
|
|
14916
|
+
padding: `${theme.spacing(2)}px ${theme.spacing(2)}px ${theme.spacing(0.5)}px ${theme.spacing(0)}px`,
|
|
14917
|
+
verticalAlign: "top"
|
|
14916
14918
|
}),
|
|
14917
14919
|
itemName: theme => ({
|
|
14918
|
-
|
|
14920
|
+
// Set item name to max 3 lines and truncate with ellipsis
|
|
14921
|
+
"-webkit-box-orient": "vertical",
|
|
14922
|
+
"-webkit-line-clamp": "3",
|
|
14923
|
+
display: "-webkit-box",
|
|
14924
|
+
lineHeight: `${theme.spacing(2.5)}px`,
|
|
14925
|
+
maxHeight: `${theme.spacing(7.5)}px`,
|
|
14926
|
+
overflow: "hidden",
|
|
14927
|
+
textOverflow: "ellipsis",
|
|
14928
|
+
whiteSpace: "normal"
|
|
14919
14929
|
}),
|
|
14920
14930
|
numericCell: () => ({
|
|
14921
14931
|
textAlign: "right",
|
|
14922
|
-
width: "
|
|
14932
|
+
width: "80px"
|
|
14923
14933
|
}),
|
|
14924
14934
|
tableWrapper: theme => ({
|
|
14925
14935
|
"&& > div": {
|
|
@@ -14978,23 +14988,18 @@ const ItemsBreakdown = ({
|
|
|
14978
14988
|
quantity,
|
|
14979
14989
|
value,
|
|
14980
14990
|
totalValue
|
|
14981
|
-
}, index) => jsxRuntime.
|
|
14982
|
-
children:
|
|
14983
|
-
children: jsxRuntime.
|
|
14984
|
-
|
|
14985
|
-
css: styles$2.itemName
|
|
14991
|
+
}, index) => jsxRuntime.jsx(React.Fragment, {
|
|
14992
|
+
children: jsxRuntime.jsxs(giger.TableBaseRow, {
|
|
14993
|
+
children: [jsxRuntime.jsxs(giger.TableBodyCell, Object.assign({
|
|
14994
|
+
css: styles$2.itemDescription
|
|
14986
14995
|
}, {
|
|
14987
|
-
children: jsxRuntime.jsx(giger.Typography, {
|
|
14996
|
+
children: [jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
14997
|
+
css: styles$2.itemName
|
|
14998
|
+
}, {
|
|
14988
14999
|
children: name
|
|
14989
|
-
})
|
|
14990
|
-
}))
|
|
14991
|
-
}), jsxRuntime.jsxs(giger.TableBaseRow, {
|
|
14992
|
-
children: [jsxRuntime.jsx(giger.TableBodyCell, Object.assign({
|
|
14993
|
-
css: styles$2.itemDetail
|
|
14994
|
-
}, {
|
|
14995
|
-
children: jsxRuntime.jsx(giger.Typography, {
|
|
15000
|
+
})), jsxRuntime.jsx(giger.Typography, {
|
|
14996
15001
|
children: detail
|
|
14997
|
-
})
|
|
15002
|
+
})]
|
|
14998
15003
|
})), jsxRuntime.jsx(giger.TableBodyCell, Object.assign({
|
|
14999
15004
|
css: [styles$2.numericCell, styles$2.itemDetail]
|
|
15000
15005
|
}, {
|
|
@@ -15008,7 +15013,7 @@ const ItemsBreakdown = ({
|
|
|
15008
15013
|
}, {
|
|
15009
15014
|
children: totalValue && formatMoney(totalValue)
|
|
15010
15015
|
}))]
|
|
15011
|
-
})
|
|
15016
|
+
})
|
|
15012
15017
|
}, index))
|
|
15013
15018
|
})
|
|
15014
15019
|
}))
|
|
@@ -16005,6 +16010,7 @@ const ShipmentForm = ({
|
|
|
16005
16010
|
}, {
|
|
16006
16011
|
children: presetCategory.options.map(preset => jsxRuntime.jsx(giger.Option, Object.assign({
|
|
16007
16012
|
onClick: () => {
|
|
16013
|
+
onDirty(); // bypass rate cache
|
|
16008
16014
|
handleApplyPreset(preset.value);
|
|
16009
16015
|
},
|
|
16010
16016
|
selected: ___default["default"].isEqual(selectedPreset, preset.value),
|
|
@@ -16949,8 +16955,7 @@ var common = {
|
|
|
16949
16955
|
december: "December"
|
|
16950
16956
|
},
|
|
16951
16957
|
packageCategories: {
|
|
16952
|
-
|
|
16953
|
-
myCustomPackages: "My Custom Packages"
|
|
16958
|
+
customPackages: "Custom Packages"
|
|
16954
16959
|
},
|
|
16955
16960
|
packageCodes: {
|
|
16956
16961
|
"package": "Custom"
|
|
@@ -18736,13 +18741,18 @@ const PurchaseLabelBySalesOrder = _a => {
|
|
|
18736
18741
|
salesOrder,
|
|
18737
18742
|
warehouseId
|
|
18738
18743
|
});
|
|
18744
|
+
const {
|
|
18745
|
+
data: insuranceAccount,
|
|
18746
|
+
isLoading: insuranceIsLoading
|
|
18747
|
+
} = alchemy.useGetInsuranceAccount("shipsurance");
|
|
18739
18748
|
return jsxRuntime.jsx(SuspendSalesOrder, Object.assign({
|
|
18740
18749
|
salesOrder: salesOrder
|
|
18741
18750
|
}, salesOrderProps, {
|
|
18742
|
-
isLoading: salesOrderLoading || configureShipmentProps.isLoading
|
|
18751
|
+
isLoading: salesOrderLoading || configureShipmentProps.isLoading || insuranceIsLoading
|
|
18743
18752
|
}, {
|
|
18744
18753
|
children: salesOrder && jsxRuntime.jsx(ConfigureShipment, Object.assign({
|
|
18745
18754
|
features: features,
|
|
18755
|
+
insuranceAccount: insuranceAccount,
|
|
18746
18756
|
salesOrder: salesOrder
|
|
18747
18757
|
}, configureShipmentProps, props))
|
|
18748
18758
|
}));
|
|
@@ -18811,11 +18821,16 @@ const PurchaseLabelByShipment = _a => {
|
|
|
18811
18821
|
void shipmentProps.refetchShipment();
|
|
18812
18822
|
onShipmentUpdated === null || onShipmentUpdated === void 0 ? void 0 : onShipmentUpdated(shipment);
|
|
18813
18823
|
};
|
|
18824
|
+
const {
|
|
18825
|
+
data: insuranceAccount,
|
|
18826
|
+
isLoading: insuranceIsLoading
|
|
18827
|
+
} = alchemy.useGetInsuranceAccount("shipsurance");
|
|
18814
18828
|
return jsxRuntime.jsx(SuspendShipment, Object.assign({
|
|
18815
18829
|
shipment: shipment
|
|
18816
18830
|
}, shipmentProps, {
|
|
18817
18831
|
children: shipment && jsxRuntime.jsx(ConfigureShipment, Object.assign({
|
|
18818
18832
|
errors: shipmentProps.errors,
|
|
18833
|
+
insuranceAccount: insuranceAccount,
|
|
18819
18834
|
isLoading: shipmentProps.isLoading,
|
|
18820
18835
|
onShipmentUpdated: handleShipmentUpdated,
|
|
18821
18836
|
shipment: shipment
|
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from '@emotion/react/jsx-runtime';
|
|
2
2
|
import { useTranslation, Trans } from 'react-i18next';
|
|
3
3
|
import { InlineNotification, NotificationType, Typography, Link, ButtonSize, Spinner, Icon, IconSize, Divider, Skeleton, SkeletonAnimation, SkeletonVariant, Grid, GridChild, Pagination, SkeletonBackgroundColor, RadioGroup, Radio, SpinnerSize, FormField, FieldMessageType, Checkbox, Input, SelectAutocomplete, Select as Select$1, OptionGroup, Option, Button, Switch as Switch$1, Textarea, ChipList, Chip, ButtonVariant, ButtonColor, Tag, TagColor, Stepper, Step, IconTooltip, Table, TableBody, TableBaseRow, TableBodyCell, TableHeader, TableHeaderCell, Popover, DropdownOptionList, DatePicker as DatePicker$1, BottomSheet } from '@packlink/giger';
|
|
4
|
-
import alchemy, { SE, logger, useValidateAddresses, useListCarriers, useConnectCarrier, useListWarehouses, useUpdateWarehouse, useCreateWarehouse, useDeleteWarehouse, useGetWalletHistory, useGetAccountSettings, useUpdateAccountSettings, AlchemyContext, useAddFunds, useGetCarrierById, useUpdateAutoFunding, useGetAutoFundingConfiguration, Currency, useUpdateFundingSource, useListFundingSources, useCreateFundingSource, useRegisterCarrier, useUpdateSalesOrderShipment, useParseAddress, useListCustomPackageTypes, useCalculateRates, useGetShipmentRates, useListLabels, useCreateLabel, useListSalesOrderShipments, useCreateSalesOrderShipment, CodedError, useListSalesOrders, useGetSalesOrder, useListOrderSources, useRefreshOrderSource, useCreateShipment, useGetShipment, useGetSalesOrderShipment, useGetLabel, useVoidLabel } from '@shipengine/alchemy';
|
|
4
|
+
import alchemy, { SE, logger, useValidateAddresses, useListCarriers, useConnectCarrier, useListWarehouses, useUpdateWarehouse, useCreateWarehouse, useDeleteWarehouse, useGetWalletHistory, useGetAccountSettings, useUpdateAccountSettings, AlchemyContext, useAddFunds, useGetCarrierById, useUpdateAutoFunding, useGetAutoFundingConfiguration, Currency, useUpdateFundingSource, useListFundingSources, useCreateFundingSource, useRegisterCarrier, useUpdateSalesOrderShipment, useParseAddress, useListCustomPackageTypes, useCalculateRates, useGetShipmentRates, useListLabels, useCreateLabel, useListSalesOrderShipments, useCreateSalesOrderShipment, CodedError, useListSalesOrders, useGetSalesOrder, useListOrderSources, useRefreshOrderSource, useGetInsuranceAccount, useCreateShipment, useGetShipment, useGetSalesOrderShipment, useGetLabel, useVoidLabel } from '@shipengine/alchemy';
|
|
5
5
|
import axios from 'axios';
|
|
6
6
|
import _$3, { get as get$1, isEqual } from 'lodash';
|
|
7
7
|
import { zodResolver } from '@hookform/resolvers/zod';
|
|
@@ -4504,8 +4504,7 @@ const useShipmentMetadata = shipment => {
|
|
|
4504
4504
|
};
|
|
4505
4505
|
|
|
4506
4506
|
let _$2 = t => t,
|
|
4507
|
-
_t$2
|
|
4508
|
-
_t2$2;
|
|
4507
|
+
_t$2;
|
|
4509
4508
|
const findGenericPackageFromCarriers = carriers => {
|
|
4510
4509
|
const carrier = carriers.find(c => c.packages.some(p => p.packageCode === "package"));
|
|
4511
4510
|
return carrier === null || carrier === void 0 ? void 0 : carrier.packages.find(p => p.packageCode === "package");
|
|
@@ -4532,17 +4531,14 @@ const usePackageOptions = (carriers, customPackageTypes, shipment) => {
|
|
|
4532
4531
|
[c.carrierCode]: partialResults[c.carrierCode] === undefined
|
|
4533
4532
|
}));
|
|
4534
4533
|
const genericPackage = findGenericPackageFromCarriers(carriers);
|
|
4535
|
-
const
|
|
4536
|
-
label: t(_t$2 || (_t$2 = _$2`packageCategories.
|
|
4537
|
-
options: [{
|
|
4534
|
+
const customPackageOptions = [...(genericPackage || (customPackageTypes === null || customPackageTypes === void 0 ? void 0 : customPackageTypes.length) ? [{
|
|
4535
|
+
label: t(_t$2 || (_t$2 = _$2`packageCategories.customPackages`)),
|
|
4536
|
+
options: [...(genericPackage ? [{
|
|
4538
4537
|
label: t("packageCodes.package"),
|
|
4539
4538
|
value: {
|
|
4540
4539
|
code: "package"
|
|
4541
4540
|
}
|
|
4542
|
-
}]
|
|
4543
|
-
}] : []), ...((customPackageTypes === null || customPackageTypes === void 0 ? void 0 : customPackageTypes.length) ? [{
|
|
4544
|
-
label: t(_t2$2 || (_t2$2 = _$2`packageCategories.myCustomPackages`)),
|
|
4545
|
-
options: customPackageTypes.sort((a, b) => a.name.localeCompare(b.name)).map(({
|
|
4541
|
+
}] : []), ...((customPackageTypes === null || customPackageTypes === void 0 ? void 0 : customPackageTypes.length) ? customPackageTypes.sort((a, b) => a.name.localeCompare(b.name)).map(({
|
|
4546
4542
|
dimensions,
|
|
4547
4543
|
name,
|
|
4548
4544
|
packageId
|
|
@@ -4553,7 +4549,7 @@ const usePackageOptions = (carriers, customPackageTypes, shipment) => {
|
|
|
4553
4549
|
code: packageId
|
|
4554
4550
|
}
|
|
4555
4551
|
};
|
|
4556
|
-
})
|
|
4552
|
+
}) : [])]
|
|
4557
4553
|
}] : [])];
|
|
4558
4554
|
return carriers.reduce((options, carrier) => {
|
|
4559
4555
|
if (carrier.packages.length === 0) return options;
|
|
@@ -4574,7 +4570,7 @@ const usePackageOptions = (carriers, customPackageTypes, shipment) => {
|
|
|
4574
4570
|
})),
|
|
4575
4571
|
value: carrier.carrierId
|
|
4576
4572
|
}];
|
|
4577
|
-
},
|
|
4573
|
+
}, customPackageOptions);
|
|
4578
4574
|
}, [carriers, customPackageTypes, isPoBox, isUnsupportedUpsCountry, t]);
|
|
4579
4575
|
};
|
|
4580
4576
|
|
|
@@ -14879,15 +14875,29 @@ const SuspendSalesOrder = ({
|
|
|
14879
14875
|
};
|
|
14880
14876
|
|
|
14881
14877
|
const styles$2 = createStyles({
|
|
14878
|
+
itemDescription: theme => ({
|
|
14879
|
+
display: "flex",
|
|
14880
|
+
flexDirection: "column",
|
|
14881
|
+
padding: `${theme.spacing(2)}px ${theme.spacing(2)}px ${theme.spacing(0)}px ${theme.spacing(0)}px`
|
|
14882
|
+
}),
|
|
14882
14883
|
itemDetail: theme => ({
|
|
14883
|
-
padding: `${theme.spacing(
|
|
14884
|
+
padding: `${theme.spacing(2)}px ${theme.spacing(2)}px ${theme.spacing(0.5)}px ${theme.spacing(0)}px`,
|
|
14885
|
+
verticalAlign: "top"
|
|
14884
14886
|
}),
|
|
14885
14887
|
itemName: theme => ({
|
|
14886
|
-
|
|
14888
|
+
// Set item name to max 3 lines and truncate with ellipsis
|
|
14889
|
+
"-webkit-box-orient": "vertical",
|
|
14890
|
+
"-webkit-line-clamp": "3",
|
|
14891
|
+
display: "-webkit-box",
|
|
14892
|
+
lineHeight: `${theme.spacing(2.5)}px`,
|
|
14893
|
+
maxHeight: `${theme.spacing(7.5)}px`,
|
|
14894
|
+
overflow: "hidden",
|
|
14895
|
+
textOverflow: "ellipsis",
|
|
14896
|
+
whiteSpace: "normal"
|
|
14887
14897
|
}),
|
|
14888
14898
|
numericCell: () => ({
|
|
14889
14899
|
textAlign: "right",
|
|
14890
|
-
width: "
|
|
14900
|
+
width: "80px"
|
|
14891
14901
|
}),
|
|
14892
14902
|
tableWrapper: theme => ({
|
|
14893
14903
|
"&& > div": {
|
|
@@ -14946,23 +14956,18 @@ const ItemsBreakdown = ({
|
|
|
14946
14956
|
quantity,
|
|
14947
14957
|
value,
|
|
14948
14958
|
totalValue
|
|
14949
|
-
}, index) =>
|
|
14950
|
-
children:
|
|
14951
|
-
children:
|
|
14952
|
-
|
|
14953
|
-
css: styles$2.itemName
|
|
14959
|
+
}, index) => jsx(Fragment$1, {
|
|
14960
|
+
children: jsxs(TableBaseRow, {
|
|
14961
|
+
children: [jsxs(TableBodyCell, Object.assign({
|
|
14962
|
+
css: styles$2.itemDescription
|
|
14954
14963
|
}, {
|
|
14955
|
-
children: jsx(Typography, {
|
|
14964
|
+
children: [jsx(Typography, Object.assign({
|
|
14965
|
+
css: styles$2.itemName
|
|
14966
|
+
}, {
|
|
14956
14967
|
children: name
|
|
14957
|
-
})
|
|
14958
|
-
}))
|
|
14959
|
-
}), jsxs(TableBaseRow, {
|
|
14960
|
-
children: [jsx(TableBodyCell, Object.assign({
|
|
14961
|
-
css: styles$2.itemDetail
|
|
14962
|
-
}, {
|
|
14963
|
-
children: jsx(Typography, {
|
|
14968
|
+
})), jsx(Typography, {
|
|
14964
14969
|
children: detail
|
|
14965
|
-
})
|
|
14970
|
+
})]
|
|
14966
14971
|
})), jsx(TableBodyCell, Object.assign({
|
|
14967
14972
|
css: [styles$2.numericCell, styles$2.itemDetail]
|
|
14968
14973
|
}, {
|
|
@@ -14976,7 +14981,7 @@ const ItemsBreakdown = ({
|
|
|
14976
14981
|
}, {
|
|
14977
14982
|
children: totalValue && formatMoney(totalValue)
|
|
14978
14983
|
}))]
|
|
14979
|
-
})
|
|
14984
|
+
})
|
|
14980
14985
|
}, index))
|
|
14981
14986
|
})
|
|
14982
14987
|
}))
|
|
@@ -15973,6 +15978,7 @@ const ShipmentForm = ({
|
|
|
15973
15978
|
}, {
|
|
15974
15979
|
children: presetCategory.options.map(preset => jsx(Option, Object.assign({
|
|
15975
15980
|
onClick: () => {
|
|
15981
|
+
onDirty(); // bypass rate cache
|
|
15976
15982
|
handleApplyPreset(preset.value);
|
|
15977
15983
|
},
|
|
15978
15984
|
selected: _$3.isEqual(selectedPreset, preset.value),
|
|
@@ -16917,8 +16923,7 @@ var common = {
|
|
|
16917
16923
|
december: "December"
|
|
16918
16924
|
},
|
|
16919
16925
|
packageCategories: {
|
|
16920
|
-
|
|
16921
|
-
myCustomPackages: "My Custom Packages"
|
|
16926
|
+
customPackages: "Custom Packages"
|
|
16922
16927
|
},
|
|
16923
16928
|
packageCodes: {
|
|
16924
16929
|
"package": "Custom"
|
|
@@ -18704,13 +18709,18 @@ const PurchaseLabelBySalesOrder = _a => {
|
|
|
18704
18709
|
salesOrder,
|
|
18705
18710
|
warehouseId
|
|
18706
18711
|
});
|
|
18712
|
+
const {
|
|
18713
|
+
data: insuranceAccount,
|
|
18714
|
+
isLoading: insuranceIsLoading
|
|
18715
|
+
} = useGetInsuranceAccount("shipsurance");
|
|
18707
18716
|
return jsx(SuspendSalesOrder, Object.assign({
|
|
18708
18717
|
salesOrder: salesOrder
|
|
18709
18718
|
}, salesOrderProps, {
|
|
18710
|
-
isLoading: salesOrderLoading || configureShipmentProps.isLoading
|
|
18719
|
+
isLoading: salesOrderLoading || configureShipmentProps.isLoading || insuranceIsLoading
|
|
18711
18720
|
}, {
|
|
18712
18721
|
children: salesOrder && jsx(ConfigureShipment, Object.assign({
|
|
18713
18722
|
features: features,
|
|
18723
|
+
insuranceAccount: insuranceAccount,
|
|
18714
18724
|
salesOrder: salesOrder
|
|
18715
18725
|
}, configureShipmentProps, props))
|
|
18716
18726
|
}));
|
|
@@ -18779,11 +18789,16 @@ const PurchaseLabelByShipment = _a => {
|
|
|
18779
18789
|
void shipmentProps.refetchShipment();
|
|
18780
18790
|
onShipmentUpdated === null || onShipmentUpdated === void 0 ? void 0 : onShipmentUpdated(shipment);
|
|
18781
18791
|
};
|
|
18792
|
+
const {
|
|
18793
|
+
data: insuranceAccount,
|
|
18794
|
+
isLoading: insuranceIsLoading
|
|
18795
|
+
} = useGetInsuranceAccount("shipsurance");
|
|
18782
18796
|
return jsx(SuspendShipment, Object.assign({
|
|
18783
18797
|
shipment: shipment
|
|
18784
18798
|
}, shipmentProps, {
|
|
18785
18799
|
children: shipment && jsx(ConfigureShipment, Object.assign({
|
|
18786
18800
|
errors: shipmentProps.errors,
|
|
18801
|
+
insuranceAccount: insuranceAccount,
|
|
18787
18802
|
isLoading: shipmentProps.isLoading,
|
|
18788
18803
|
onShipmentUpdated: handleShipmentUpdated,
|
|
18789
18804
|
shipment: shipment
|
package/package.json
CHANGED
|
@@ -1,9 +1,22 @@
|
|
|
1
1
|
export declare const styles: {
|
|
2
|
+
itemDescription: (theme: import("@packlink/giger-theme/dist/lib/Theme").Theme) => {
|
|
3
|
+
display: "flex";
|
|
4
|
+
flexDirection: "column";
|
|
5
|
+
padding: string;
|
|
6
|
+
};
|
|
2
7
|
itemDetail: (theme: import("@packlink/giger-theme/dist/lib/Theme").Theme) => {
|
|
3
8
|
padding: string;
|
|
9
|
+
verticalAlign: string;
|
|
4
10
|
};
|
|
5
11
|
itemName: (theme: import("@packlink/giger-theme/dist/lib/Theme").Theme) => {
|
|
6
|
-
|
|
12
|
+
"-webkit-box-orient": string;
|
|
13
|
+
"-webkit-line-clamp": string;
|
|
14
|
+
display: "-webkit-box";
|
|
15
|
+
lineHeight: string;
|
|
16
|
+
maxHeight: string;
|
|
17
|
+
overflow: "hidden";
|
|
18
|
+
textOverflow: "ellipsis";
|
|
19
|
+
whiteSpace: "normal";
|
|
7
20
|
};
|
|
8
21
|
numericCell: () => {
|
|
9
22
|
textAlign: "right";
|
|
@@ -684,8 +684,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
684
684
|
december: string;
|
|
685
685
|
};
|
|
686
686
|
packageCategories: {
|
|
687
|
-
|
|
688
|
-
myCustomPackages: string;
|
|
687
|
+
customPackages: string;
|
|
689
688
|
};
|
|
690
689
|
packageCodes: {
|
|
691
690
|
package: string;
|
|
@@ -41,6 +41,7 @@ export type ConfigureShipmentProps = {
|
|
|
41
41
|
errors?: Templates.ShipmentFormProps["errors"];
|
|
42
42
|
features?: ConfigureShipmentFeatures;
|
|
43
43
|
getPreferredRates?: (shipment: SE.SalesOrderShipment, isInternational: boolean) => Promise<PreferredRatesResponse | undefined>;
|
|
44
|
+
insuranceAccount?: SE.InsuranceAccount;
|
|
44
45
|
isLoading?: Templates.ShipmentFormProps["isLoading"];
|
|
45
46
|
onAddressValidation?: UseShipmentFormProps["onAddressValidation"];
|
|
46
47
|
onApplyPreset?: UseShipmentFormProps["onApplyPreset"];
|
|
@@ -668,8 +668,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
668
668
|
december: string;
|
|
669
669
|
};
|
|
670
670
|
packageCategories: {
|
|
671
|
-
|
|
672
|
-
myCustomPackages: string;
|
|
671
|
+
customPackages: string;
|
|
673
672
|
};
|
|
674
673
|
packageCodes: {
|
|
675
674
|
package: string;
|
|
@@ -789,8 +789,7 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
|
|
|
789
789
|
december: string;
|
|
790
790
|
};
|
|
791
791
|
packageCategories: {
|
|
792
|
-
|
|
793
|
-
myCustomPackages: string;
|
|
792
|
+
customPackages: string;
|
|
794
793
|
};
|
|
795
794
|
packageCodes: {
|
|
796
795
|
package: string;
|
|
@@ -688,8 +688,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
688
688
|
december: string;
|
|
689
689
|
};
|
|
690
690
|
packageCategories: {
|
|
691
|
-
|
|
692
|
-
myCustomPackages: string;
|
|
691
|
+
customPackages: string;
|
|
693
692
|
};
|
|
694
693
|
packageCodes: {
|
|
695
694
|
package: string;
|
|
@@ -684,8 +684,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
684
684
|
december: string;
|
|
685
685
|
};
|
|
686
686
|
packageCategories: {
|
|
687
|
-
|
|
688
|
-
myCustomPackages: string;
|
|
687
|
+
customPackages: string;
|
|
689
688
|
};
|
|
690
689
|
packageCodes: {
|
|
691
690
|
package: string;
|