@shipengine/elements 1.2.0 → 1.3.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 +1447 -638
- package/index.js +1447 -639
- package/package.json +2 -2
- package/src/components/add-funds-form/add-funds-form.d.ts +2 -1
- package/src/components/auto-funding-form/auto-funding-form.d.ts +7 -2
- package/src/components/carrier-balance/carrier-balance.d.ts +3 -1
- package/src/components/drawer/drawer.styles.d.ts +0 -1
- package/src/components/fund-and-purchase/fund-and-purchase.d.ts +3 -1
- package/src/components/grid-controller/cell-formatted-date.d.ts +5 -3
- package/src/components/history/history-card/history-card.d.ts +4 -3
- package/src/components/history/history-card-extension/history-card-extension.d.ts +3 -1
- package/src/components/index.d.ts +0 -1
- package/src/components/manage-funding/manage-funding.d.ts +6 -1
- package/src/components/tabs/tabs.styles.d.ts +1 -1
- package/src/components/templates/account-settings/account-settings.d.ts +2 -1
- package/src/components/templates/connect-carrier-form/connect-carrier-form.d.ts +8 -2
- package/src/components/templates/connect-carrier-form/connect-carrier-form.styles.d.ts +4 -0
- package/src/components/templates/index.d.ts +1 -1
- package/src/components/templates/product-form/index.d.ts +2 -0
- package/src/components/templates/{customs-item-form/customs-item-form-schema.d.ts → product-form/product-form-schema.d.ts} +16 -16
- package/src/components/templates/product-form/product-form.d.ts +15 -0
- package/src/components/templates/products-display/index.d.ts +1 -0
- package/src/components/templates/products-display/products-display.d.ts +7 -0
- package/src/components/templates/rate-form/rate-form.d.ts +2 -1
- package/src/components/templates/shipment-form/shipment-form.d.ts +3 -2
- package/src/components/templates/shipment-form/shipment-schema.d.ts +331 -140
- package/src/components/templates/theme-creator/theme-creator.d.ts +6 -1
- package/src/components/templates/theme-creator/theme-creator.styles.d.ts +2 -2
- package/src/elements/account-settings/account-settings.d.ts +51 -6
- package/src/elements/configure-shipment/configure-shipment.d.ts +2 -1
- package/src/elements/configure-shipment/hooks/use-customs.d.ts +1 -1
- package/src/elements/configure-shipment/hooks/use-rates-with-cache.d.ts +4 -4
- package/src/elements/configure-shipment/hooks/use-shipment-form.d.ts +1 -1
- package/src/elements/connect-carrier/connect-carrier.d.ts +17 -3
- package/src/elements/labels-grid/labels-grid.d.ts +12 -1
- package/src/elements/purchase-label/purchase-label-by-sales-order.d.ts +3 -1
- package/src/elements/purchase-label/purchase-label-by-shipment.d.ts +3 -1
- package/src/elements/purchase-label/purchase-label.d.ts +64 -28
- package/src/elements/shipments-grid/shipments-grid.d.ts +12 -1
- package/src/elements/theme-creator/theme-creator.d.ts +16 -1
- package/src/elements/view-shipment/view-shipment.d.ts +12 -1
- package/src/elements/void-label/void-label.d.ts +18 -8
- package/src/factories/shipengine/shipment.d.ts +2 -1
- package/src/features/wallet-history/wallet-history.styles.d.ts +6 -1
- package/src/locales/en/index.d.ts +12 -1
- package/src/utilities/money.d.ts +7 -0
- package/src/utilities/shipengine/sales-order.d.ts +4 -1
- package/src/workflows/onboarding/onboarding.d.ts +19 -1
- package/src/components/code-block/code-block.d.ts +0 -6
- package/src/components/code-block/index.d.ts +0 -1
- package/src/components/field/money-input/hooks/index.d.ts +0 -1
- package/src/components/field/money-input/hooks/use-utils.d.ts +0 -6
- package/src/components/templates/connect-carrier/connect-carrier.d.ts +0 -1
- package/src/components/templates/connect-carrier/connect-carrier.styles.d.ts +0 -1
- package/src/components/templates/connect-carrier/index.d.ts +0 -1
- package/src/components/templates/customs-item-form/customs-item-form.d.ts +0 -15
- package/src/components/templates/customs-item-form/index.d.ts +0 -2
- package/src/components/templates/customs-items-display/customs-items-display.d.ts +0 -7
- package/src/components/templates/customs-items-display/index.d.ts +0 -1
- /package/src/components/templates/{customs-items-display/customs-items-display.styles.d.ts → products-display/products-display.styles.d.ts} +0 -0
package/index.cjs
CHANGED
|
@@ -22,7 +22,6 @@ var css = require('@emotion/css');
|
|
|
22
22
|
var reactDom = require('react-dom');
|
|
23
23
|
var jsBase64 = require('js-base64');
|
|
24
24
|
var min$3 = require('libphonenumber-js/min');
|
|
25
|
-
var prismReactRenderer = require('prism-react-renderer');
|
|
26
25
|
var copy = require('copy-to-clipboard');
|
|
27
26
|
var reactQuery = require('@tanstack/react-query');
|
|
28
27
|
var cardValidator = require('card-validator');
|
|
@@ -2925,6 +2924,47 @@ const formatExpiration = exp => {
|
|
|
2925
2924
|
if (digits.length > 2) return [digits.substring(0, 2), digits.substring(2, 6)].join("/").trim();
|
|
2926
2925
|
return digits;
|
|
2927
2926
|
};
|
|
2927
|
+
/**
|
|
2928
|
+
* @internal
|
|
2929
|
+
*
|
|
2930
|
+
* # Money Utils - getCurrencyFromString
|
|
2931
|
+
*/
|
|
2932
|
+
const getCurrencyFromString = currency => {
|
|
2933
|
+
switch (currency === null || currency === void 0 ? void 0 : currency.toLowerCase()) {
|
|
2934
|
+
case "usd":
|
|
2935
|
+
return alchemy.SE.Currency.USD;
|
|
2936
|
+
case "cad":
|
|
2937
|
+
return alchemy.SE.Currency.CAD;
|
|
2938
|
+
case "aud":
|
|
2939
|
+
return alchemy.SE.Currency.AUD;
|
|
2940
|
+
case "gbp":
|
|
2941
|
+
return alchemy.SE.Currency.GBP;
|
|
2942
|
+
case "eur":
|
|
2943
|
+
return alchemy.SE.Currency.EUR;
|
|
2944
|
+
case "nzd":
|
|
2945
|
+
return alchemy.SE.Currency.NZD;
|
|
2946
|
+
default:
|
|
2947
|
+
return alchemy.SE.Currency.USD;
|
|
2948
|
+
}
|
|
2949
|
+
};
|
|
2950
|
+
const getCurrencySymbolFromString = currency => {
|
|
2951
|
+
let currencySymbol = undefined;
|
|
2952
|
+
switch (currency) {
|
|
2953
|
+
case alchemy.SE.Currency.USD:
|
|
2954
|
+
case alchemy.SE.Currency.CAD:
|
|
2955
|
+
case alchemy.SE.Currency.AUD:
|
|
2956
|
+
case alchemy.SE.Currency.NZD:
|
|
2957
|
+
currencySymbol = "$";
|
|
2958
|
+
break;
|
|
2959
|
+
case alchemy.SE.Currency.GBP:
|
|
2960
|
+
currencySymbol = "£";
|
|
2961
|
+
break;
|
|
2962
|
+
case alchemy.SE.Currency.EUR:
|
|
2963
|
+
currencySymbol = "€";
|
|
2964
|
+
break;
|
|
2965
|
+
}
|
|
2966
|
+
return currencySymbol;
|
|
2967
|
+
};
|
|
2928
2968
|
|
|
2929
2969
|
/**
|
|
2930
2970
|
* @internal
|
|
@@ -3385,17 +3425,19 @@ function convertDimensions(dimensions, {
|
|
|
3385
3425
|
* @category Utilities
|
|
3386
3426
|
*/
|
|
3387
3427
|
const getCustomsFromSalesOrder = (salesOrder, warehouse) => ({
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3428
|
+
customs: {
|
|
3429
|
+
contents: "merchandise",
|
|
3430
|
+
nonDelivery: "return_to_sender"
|
|
3431
|
+
},
|
|
3432
|
+
products: salesOrder.salesOrderItems.filter(item => item.salesOrderItemId.length > 0).map(item => ({
|
|
3393
3433
|
countryOfOrigin: warehouse.originAddress.countryCode,
|
|
3394
3434
|
description: item.lineItemDetails.name,
|
|
3395
3435
|
quantity: item.quantity || 1,
|
|
3396
|
-
value:
|
|
3397
|
-
|
|
3398
|
-
|
|
3436
|
+
value: {
|
|
3437
|
+
amount: item.priceSummary.unitPrice.amount,
|
|
3438
|
+
currency: item.priceSummary.unitPrice.currency
|
|
3439
|
+
}
|
|
3440
|
+
}))
|
|
3399
3441
|
});
|
|
3400
3442
|
/**
|
|
3401
3443
|
* @internal
|
|
@@ -5043,30 +5085,6 @@ $$9({ global: true, forced: parseFloat != $parseFloat }, {
|
|
|
5043
5085
|
parseFloat: $parseFloat
|
|
5044
5086
|
});
|
|
5045
5087
|
|
|
5046
|
-
const useUtils = () => {
|
|
5047
|
-
const getCurrencySymbol = React.useCallback(currency => {
|
|
5048
|
-
let currencySymbol = undefined;
|
|
5049
|
-
switch (currency) {
|
|
5050
|
-
case alchemy.SE.Currency.USD:
|
|
5051
|
-
case alchemy.SE.Currency.CAD:
|
|
5052
|
-
case alchemy.SE.Currency.AUD:
|
|
5053
|
-
case alchemy.SE.Currency.NZD:
|
|
5054
|
-
currencySymbol = "$";
|
|
5055
|
-
break;
|
|
5056
|
-
case alchemy.SE.Currency.GBP:
|
|
5057
|
-
currencySymbol = "£";
|
|
5058
|
-
break;
|
|
5059
|
-
case alchemy.SE.Currency.EUR:
|
|
5060
|
-
currencySymbol = "€";
|
|
5061
|
-
break;
|
|
5062
|
-
}
|
|
5063
|
-
return currencySymbol;
|
|
5064
|
-
}, []);
|
|
5065
|
-
return {
|
|
5066
|
-
getCurrencySymbol
|
|
5067
|
-
};
|
|
5068
|
-
};
|
|
5069
|
-
|
|
5070
5088
|
function _EMOTION_STRINGIFIED_CSS_ERROR__$3() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
5071
5089
|
var _ref$3 = process.env.NODE_ENV === "production" ? {
|
|
5072
5090
|
name: "1xe63ku",
|
|
@@ -5095,7 +5113,7 @@ const transform$3 = {
|
|
|
5095
5113
|
currency
|
|
5096
5114
|
}) => ({
|
|
5097
5115
|
amount: Number.isNaN(amount) ? null : amount,
|
|
5098
|
-
currency
|
|
5116
|
+
currency: currency !== null && currency !== void 0 ? currency : alchemy.SE.Currency.USD
|
|
5099
5117
|
})
|
|
5100
5118
|
};
|
|
5101
5119
|
const MoneyInputController = createFieldController();
|
|
@@ -5105,9 +5123,6 @@ const MoneyInput = _a => {
|
|
|
5105
5123
|
showCurrencySymbol = false
|
|
5106
5124
|
} = _a,
|
|
5107
5125
|
rest = __rest(_a, ["signed", "showCurrencySymbol"]);
|
|
5108
|
-
const {
|
|
5109
|
-
getCurrencySymbol
|
|
5110
|
-
} = useUtils();
|
|
5111
5126
|
const moneyInputRef = React.useRef(null);
|
|
5112
5127
|
// The state in this reducer is inconsequential; it is only used to force a re-render on blur events
|
|
5113
5128
|
const [, forceRender] = React.useReducer(x => x + 1, 0);
|
|
@@ -5119,7 +5134,7 @@ const MoneyInput = _a => {
|
|
|
5119
5134
|
value
|
|
5120
5135
|
} = _a,
|
|
5121
5136
|
moneyInputProps = __rest(_a, ["onChange", "value"]);
|
|
5122
|
-
const currencySymbol =
|
|
5137
|
+
const currencySymbol = getCurrencySymbolFromString(value.currency);
|
|
5123
5138
|
// Check if focus is on money input OR money input child
|
|
5124
5139
|
const hasFocus = document.activeElement === moneyInputRef.current || ((_b = moneyInputRef.current) === null || _b === void 0 ? void 0 : _b.contains(document.activeElement));
|
|
5125
5140
|
return jsxRuntime.jsx("div", Object.assign({
|
|
@@ -5140,7 +5155,7 @@ const MoneyInput = _a => {
|
|
|
5140
5155
|
} else {
|
|
5141
5156
|
onChange(transform$3.out({
|
|
5142
5157
|
amount: parseFloat(event.target.value),
|
|
5143
|
-
currency:
|
|
5158
|
+
currency: value.currency
|
|
5144
5159
|
}));
|
|
5145
5160
|
}
|
|
5146
5161
|
},
|
|
@@ -7280,7 +7295,7 @@ const FormPortal = ({
|
|
|
7280
7295
|
});
|
|
7281
7296
|
};
|
|
7282
7297
|
|
|
7283
|
-
const styles$
|
|
7298
|
+
const styles$G = createStyles({
|
|
7284
7299
|
container: {
|
|
7285
7300
|
alignItems: "center",
|
|
7286
7301
|
display: "flex",
|
|
@@ -7299,7 +7314,7 @@ const styles$C = createStyles({
|
|
|
7299
7314
|
*/
|
|
7300
7315
|
const Loader = props => {
|
|
7301
7316
|
return jsxRuntime.jsx("div", Object.assign({
|
|
7302
|
-
css: styles$
|
|
7317
|
+
css: styles$G.container
|
|
7303
7318
|
}, {
|
|
7304
7319
|
children: jsxRuntime.jsx(giger.Spinner, Object.assign({}, props, {
|
|
7305
7320
|
size: props.size || giger.SpinnerSize.SIZE_LARGE
|
|
@@ -7353,7 +7368,7 @@ const Spacer = props => jsxRuntime.jsx("div", {
|
|
|
7353
7368
|
css: getSpacerStyles(props)
|
|
7354
7369
|
});
|
|
7355
7370
|
|
|
7356
|
-
const styles$
|
|
7371
|
+
const styles$F = createStyles({
|
|
7357
7372
|
chipList: theme => ({
|
|
7358
7373
|
gap: theme.spacing(1)
|
|
7359
7374
|
}),
|
|
@@ -7438,6 +7453,7 @@ const getAddFundsSchema = (minimumAmount = 10) => zod.z.object({
|
|
|
7438
7453
|
const AddFundsForm = ({
|
|
7439
7454
|
carrierId,
|
|
7440
7455
|
children,
|
|
7456
|
+
currency,
|
|
7441
7457
|
onCancel,
|
|
7442
7458
|
onSuccess,
|
|
7443
7459
|
minimumAmount: _minimumAmount = 0
|
|
@@ -7447,14 +7463,15 @@ const AddFundsForm = ({
|
|
|
7447
7463
|
} = reactI18next.useTranslation();
|
|
7448
7464
|
const addFunds = alchemy.useAddFunds();
|
|
7449
7465
|
const carrier = alchemy.useGetCarrierById(carrierId);
|
|
7466
|
+
const currencySymbol = getCurrencySymbolFromString(currency);
|
|
7450
7467
|
const chips = [{
|
|
7451
|
-
label:
|
|
7468
|
+
label: `${currencySymbol}20`,
|
|
7452
7469
|
value: 20
|
|
7453
7470
|
}, {
|
|
7454
|
-
label:
|
|
7471
|
+
label: `${currencySymbol}50`,
|
|
7455
7472
|
value: 50
|
|
7456
7473
|
}, {
|
|
7457
|
-
label:
|
|
7474
|
+
label: `${currencySymbol}100`,
|
|
7458
7475
|
value: 100
|
|
7459
7476
|
}, {
|
|
7460
7477
|
label: t("manage-funding:addFunds.custom"),
|
|
@@ -7466,7 +7483,7 @@ const AddFundsForm = ({
|
|
|
7466
7483
|
defaultValues: {
|
|
7467
7484
|
funds: {
|
|
7468
7485
|
amount: selectedChip.value === "custom" ? _minimumAmount : selectedChip.value,
|
|
7469
|
-
currency
|
|
7486
|
+
currency
|
|
7470
7487
|
}
|
|
7471
7488
|
},
|
|
7472
7489
|
resolver: validationResolver(getAddFundsSchema(_minimumAmount))
|
|
@@ -7513,7 +7530,7 @@ const AddFundsForm = ({
|
|
|
7513
7530
|
})), jsxRuntime.jsx(Spacer, {
|
|
7514
7531
|
multiplier: 2
|
|
7515
7532
|
}), jsxRuntime.jsx(giger.ChipList, Object.assign({
|
|
7516
|
-
css: styles$
|
|
7533
|
+
css: styles$F.chipList,
|
|
7517
7534
|
onChange: idx => {
|
|
7518
7535
|
const chip = chips[idx];
|
|
7519
7536
|
setSelectedChip(chip);
|
|
@@ -7521,14 +7538,14 @@ const AddFundsForm = ({
|
|
|
7521
7538
|
form.reset({
|
|
7522
7539
|
funds: {
|
|
7523
7540
|
amount: chip.value,
|
|
7524
|
-
currency
|
|
7541
|
+
currency
|
|
7525
7542
|
}
|
|
7526
7543
|
});
|
|
7527
7544
|
}
|
|
7528
7545
|
}
|
|
7529
7546
|
}, {
|
|
7530
7547
|
children: chips.map(chip => jsxRuntime.jsx(giger.Chip, Object.assign({
|
|
7531
|
-
css: styles$
|
|
7548
|
+
css: styles$F.getChip({
|
|
7532
7549
|
isDisabled: chip.value < _minimumAmount,
|
|
7533
7550
|
isSelected: chip.value === selectedChip.value
|
|
7534
7551
|
}),
|
|
@@ -7545,13 +7562,15 @@ const AddFundsForm = ({
|
|
|
7545
7562
|
multiplier: 1
|
|
7546
7563
|
}), jsxRuntime.jsx(MoneyInput, {
|
|
7547
7564
|
control: form.control,
|
|
7548
|
-
css: styles$
|
|
7565
|
+
css: styles$F.fundsInput,
|
|
7549
7566
|
defaultValue: {
|
|
7550
7567
|
amount: undefined,
|
|
7551
|
-
currency
|
|
7568
|
+
currency
|
|
7552
7569
|
},
|
|
7553
7570
|
form: formId,
|
|
7554
|
-
hint: t("manage-funding:addFunds.minimumPurchaseAmount"
|
|
7571
|
+
hint: t("manage-funding:addFunds.minimumPurchaseAmount", {
|
|
7572
|
+
currencySymbol
|
|
7573
|
+
}),
|
|
7555
7574
|
label: t("manage-funding:addFunds.labels.amount"),
|
|
7556
7575
|
name: "funds",
|
|
7557
7576
|
nativeLabel: true,
|
|
@@ -7670,7 +7689,7 @@ const Spread = ({
|
|
|
7670
7689
|
children: children
|
|
7671
7690
|
}));
|
|
7672
7691
|
|
|
7673
|
-
const styles$
|
|
7692
|
+
const styles$E = createStyles({
|
|
7674
7693
|
edit: theme => ({
|
|
7675
7694
|
color: theme.palette.primary.main,
|
|
7676
7695
|
padding: `0 ${theme.spacing(2)}`
|
|
@@ -7723,7 +7742,8 @@ const autoFundingSchema = zod.z.object({
|
|
|
7723
7742
|
* @see {@link AutoFundingFormProps | The props that are passed into the `<AutoFundingForm />` component}
|
|
7724
7743
|
*/
|
|
7725
7744
|
const AutoFundingForm = ({
|
|
7726
|
-
carrierId
|
|
7745
|
+
carrierId,
|
|
7746
|
+
currency
|
|
7727
7747
|
}) => {
|
|
7728
7748
|
const {
|
|
7729
7749
|
t
|
|
@@ -7731,7 +7751,7 @@ const AutoFundingForm = ({
|
|
|
7731
7751
|
const {
|
|
7732
7752
|
mutate: updateAutoFunding,
|
|
7733
7753
|
isLoading: updateAutoFundingIsLoading
|
|
7734
|
-
} = alchemy.useUpdateAutoFunding(
|
|
7754
|
+
} = alchemy.useUpdateAutoFunding();
|
|
7735
7755
|
const {
|
|
7736
7756
|
data: autoFundingConfig,
|
|
7737
7757
|
refetch: autoFundingConfigRefetch,
|
|
@@ -7753,7 +7773,9 @@ const AutoFundingForm = ({
|
|
|
7753
7773
|
setShowForm(prev => !prev);
|
|
7754
7774
|
setIsSwitchOn(true);
|
|
7755
7775
|
const payload = values;
|
|
7756
|
-
updateAutoFunding(
|
|
7776
|
+
updateAutoFunding(Object.assign({
|
|
7777
|
+
carrierId
|
|
7778
|
+
}, payload), {
|
|
7757
7779
|
onSuccess: () => autoFundingConfigRefetch()
|
|
7758
7780
|
});
|
|
7759
7781
|
}));
|
|
@@ -7768,15 +7790,21 @@ const AutoFundingForm = ({
|
|
|
7768
7790
|
formReset(isEnabled);
|
|
7769
7791
|
if (!isEnabled) {
|
|
7770
7792
|
setIsSwitchOn(isEnabled);
|
|
7771
|
-
updateAutoFunding(
|
|
7793
|
+
updateAutoFunding(Object.assign({
|
|
7794
|
+
carrierId
|
|
7795
|
+
}, form.getValues()), {
|
|
7772
7796
|
onSuccess: () => autoFundingConfigRefetch()
|
|
7773
7797
|
});
|
|
7774
7798
|
}
|
|
7775
7799
|
};
|
|
7776
|
-
if (isLoadingAutoFundingConfig || updateAutoFundingIsLoading)
|
|
7777
|
-
|
|
7778
|
-
|
|
7779
|
-
|
|
7800
|
+
if (isLoadingAutoFundingConfig || updateAutoFundingIsLoading) {
|
|
7801
|
+
return jsxRuntime.jsx(Loader, {
|
|
7802
|
+
message: t("manage-funding:autoFunding.isLoading")
|
|
7803
|
+
});
|
|
7804
|
+
}
|
|
7805
|
+
if (!autoFundingConfig) {
|
|
7806
|
+
throw new Error(t("errorMessages:unableToLoad.autoFundingSettings"));
|
|
7807
|
+
}
|
|
7780
7808
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
7781
7809
|
children: [jsxRuntime.jsxs(Spread, {
|
|
7782
7810
|
children: [jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
@@ -7799,12 +7827,12 @@ const AutoFundingForm = ({
|
|
|
7799
7827
|
}, {
|
|
7800
7828
|
children: t("manage-funding:autoFunding.readSettings", Object.assign({}, autoFundingConfig))
|
|
7801
7829
|
})), jsxRuntime.jsx(LinkAction, {
|
|
7802
|
-
css: styles$
|
|
7830
|
+
css: styles$E.edit,
|
|
7803
7831
|
onClick: () => handleToggle(true),
|
|
7804
7832
|
title: t("manage-funding:autoFunding:edit")
|
|
7805
7833
|
})]
|
|
7806
7834
|
}), jsxRuntime.jsxs("form", Object.assign({
|
|
7807
|
-
css: styles$
|
|
7835
|
+
css: styles$E.getForm(showForm),
|
|
7808
7836
|
"data-testid": "auto-funding-form",
|
|
7809
7837
|
id: "auto-funding-form",
|
|
7810
7838
|
onSubmit: handleSubmit
|
|
@@ -7815,15 +7843,15 @@ const AutoFundingForm = ({
|
|
|
7815
7843
|
}, {
|
|
7816
7844
|
children: t("manage-funding:autoFunding:editSettings")
|
|
7817
7845
|
})), jsxRuntime.jsx("div", Object.assign({
|
|
7818
|
-
css: styles$
|
|
7846
|
+
css: styles$E.marginLeft
|
|
7819
7847
|
}, {
|
|
7820
7848
|
children: jsxRuntime.jsx(MoneyInput, {
|
|
7821
7849
|
control: form.control,
|
|
7822
|
-
css: styles$
|
|
7850
|
+
css: styles$E.input,
|
|
7823
7851
|
"data-testid": "auto-funding-threshold-input",
|
|
7824
7852
|
defaultValue: {
|
|
7825
7853
|
amount: autoFundingConfig === null || autoFundingConfig === void 0 ? void 0 : autoFundingConfig.autoPurchaseThreshold,
|
|
7826
|
-
currency
|
|
7854
|
+
currency
|
|
7827
7855
|
},
|
|
7828
7856
|
disabled: !watchIsEnabled,
|
|
7829
7857
|
label: t("manage-funding:autoFunding.lowBalancePurchaseThreshold"),
|
|
@@ -7832,15 +7860,15 @@ const AutoFundingForm = ({
|
|
|
7832
7860
|
showCurrencySymbol: true
|
|
7833
7861
|
})
|
|
7834
7862
|
})), jsxRuntime.jsx("div", Object.assign({
|
|
7835
|
-
css: styles$
|
|
7863
|
+
css: styles$E.marginLeft
|
|
7836
7864
|
}, {
|
|
7837
7865
|
children: jsxRuntime.jsx(MoneyInput, {
|
|
7838
7866
|
control: form.control,
|
|
7839
|
-
css: styles$
|
|
7867
|
+
css: styles$E.input,
|
|
7840
7868
|
"data-testid": "auto-funding-purchase-amount-input",
|
|
7841
7869
|
defaultValue: {
|
|
7842
7870
|
amount: autoFundingConfig === null || autoFundingConfig === void 0 ? void 0 : autoFundingConfig.autoPurchaseAmount,
|
|
7843
|
-
currency
|
|
7871
|
+
currency
|
|
7844
7872
|
},
|
|
7845
7873
|
disabled: !watchIsEnabled,
|
|
7846
7874
|
label: t("manage-funding:autoFunding.purchaseAmount"),
|
|
@@ -7849,11 +7877,11 @@ const AutoFundingForm = ({
|
|
|
7849
7877
|
showCurrencySymbol: true
|
|
7850
7878
|
})
|
|
7851
7879
|
})), jsxRuntime.jsx("div", Object.assign({
|
|
7852
|
-
css: styles$
|
|
7880
|
+
css: styles$E.marginLeft
|
|
7853
7881
|
}, {
|
|
7854
7882
|
children: jsxRuntime.jsx(NumberInput, {
|
|
7855
7883
|
control: form.control,
|
|
7856
|
-
css: styles$
|
|
7884
|
+
css: styles$E.input,
|
|
7857
7885
|
"data-testid": "auto-funding-max-per-day-input",
|
|
7858
7886
|
defaultValue: autoFundingConfig === null || autoFundingConfig === void 0 ? void 0 : autoFundingConfig.autoPurchaseCutoff,
|
|
7859
7887
|
disabled: !watchIsEnabled,
|
|
@@ -7893,7 +7921,7 @@ const AutoFundingForm = ({
|
|
|
7893
7921
|
});
|
|
7894
7922
|
};
|
|
7895
7923
|
|
|
7896
|
-
const styles$
|
|
7924
|
+
const styles$D = isLabelRight => createStyles({
|
|
7897
7925
|
inlineContainer: theme => ({
|
|
7898
7926
|
alignItems: "center",
|
|
7899
7927
|
display: "flex",
|
|
@@ -7913,14 +7941,14 @@ const InlineLabel = ({
|
|
|
7913
7941
|
isLabelRight,
|
|
7914
7942
|
labelProps: _labelProps = {}
|
|
7915
7943
|
}) => jsxRuntime.jsxs("div", Object.assign({
|
|
7916
|
-
css: styles$
|
|
7944
|
+
css: styles$D(isLabelRight).inlineContainer
|
|
7917
7945
|
}, {
|
|
7918
7946
|
children: [jsxRuntime.jsx(giger.Typography, Object.assign({}, _labelProps, {
|
|
7919
7947
|
children: label
|
|
7920
7948
|
})), children]
|
|
7921
7949
|
}));
|
|
7922
7950
|
|
|
7923
|
-
const styles$
|
|
7951
|
+
const styles$C = createStyles({
|
|
7924
7952
|
getBalanceText: balance => theme => ({
|
|
7925
7953
|
color: balance === undefined ? theme.palette.gray.main : balance >= 0 ? theme.palette.secondary.dark : theme.palette.error.main
|
|
7926
7954
|
})
|
|
@@ -7938,7 +7966,8 @@ const styles$y = createStyles({
|
|
|
7938
7966
|
*/
|
|
7939
7967
|
const CarrierBalance = ({
|
|
7940
7968
|
balance,
|
|
7941
|
-
carrierId
|
|
7969
|
+
carrierId,
|
|
7970
|
+
currency
|
|
7942
7971
|
}) => {
|
|
7943
7972
|
var _a;
|
|
7944
7973
|
const {
|
|
@@ -7954,11 +7983,11 @@ const CarrierBalance = ({
|
|
|
7954
7983
|
}, {
|
|
7955
7984
|
children: isFetchingCarrier ? jsxRuntime.jsx(giger.Spinner, {}) : jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
7956
7985
|
bold: true,
|
|
7957
|
-
css: styles$
|
|
7986
|
+
css: styles$C.getBalanceText(carrierBalance)
|
|
7958
7987
|
}, {
|
|
7959
7988
|
children: carrierBalance === undefined ? "----" : formatMoney({
|
|
7960
7989
|
amount: carrierBalance,
|
|
7961
|
-
currency
|
|
7990
|
+
currency
|
|
7962
7991
|
})
|
|
7963
7992
|
}))
|
|
7964
7993
|
}));
|
|
@@ -8065,47 +8094,6 @@ const CarrierLogo = ({
|
|
|
8065
8094
|
}, name);
|
|
8066
8095
|
};
|
|
8067
8096
|
|
|
8068
|
-
const CodeBlock = ({
|
|
8069
|
-
code,
|
|
8070
|
-
convertTojs: _convertTojs = true
|
|
8071
|
-
}) => jsxRuntime.jsx(prismReactRenderer.Highlight, Object.assign({
|
|
8072
|
-
code: code,
|
|
8073
|
-
language: "tsx",
|
|
8074
|
-
theme: prismReactRenderer.themes.nightOwl
|
|
8075
|
-
}, {
|
|
8076
|
-
children: ({
|
|
8077
|
-
style,
|
|
8078
|
-
tokens,
|
|
8079
|
-
getLineProps,
|
|
8080
|
-
getTokenProps
|
|
8081
|
-
}) => jsxRuntime.jsx("pre", Object.assign({
|
|
8082
|
-
style: Object.assign(Object.assign({}, style), {
|
|
8083
|
-
background: "transparent",
|
|
8084
|
-
fontSize: "14px"
|
|
8085
|
-
})
|
|
8086
|
-
}, {
|
|
8087
|
-
children: tokens.map((line, i) => jsxRuntime.jsx("div", Object.assign({}, getLineProps({
|
|
8088
|
-
line
|
|
8089
|
-
}), {
|
|
8090
|
-
children: line.map((token, key) => {
|
|
8091
|
-
if (_convertTojs && token.types.includes("property")) {
|
|
8092
|
-
const tokenProps = getTokenProps({
|
|
8093
|
-
token
|
|
8094
|
-
});
|
|
8095
|
-
const unquotedPropertyToken = tokenProps.children.substring(1, tokenProps.children.length - 1);
|
|
8096
|
-
return jsxRuntime.jsx("span", Object.assign({}, tokenProps, {
|
|
8097
|
-
children: unquotedPropertyToken
|
|
8098
|
-
}), key);
|
|
8099
|
-
} else {
|
|
8100
|
-
return jsxRuntime.jsx("span", Object.assign({}, getTokenProps({
|
|
8101
|
-
token
|
|
8102
|
-
})), key);
|
|
8103
|
-
}
|
|
8104
|
-
})
|
|
8105
|
-
}), i))
|
|
8106
|
-
}))
|
|
8107
|
-
}));
|
|
8108
|
-
|
|
8109
8097
|
let _$1 = t => t,
|
|
8110
8098
|
_t$1,
|
|
8111
8099
|
_t2$1,
|
|
@@ -8130,7 +8118,7 @@ const fill = react.keyframes(_t3 || (_t3 = _$1`
|
|
|
8130
8118
|
100% {
|
|
8131
8119
|
box-shadow: inset 0px 0px 0px 30px #3F8200;
|
|
8132
8120
|
`));
|
|
8133
|
-
const styles$
|
|
8121
|
+
const styles$B = createStyles({
|
|
8134
8122
|
checkmark: theme => ({
|
|
8135
8123
|
animation: `${fill} forwards`,
|
|
8136
8124
|
borderRadius: "50%",
|
|
@@ -8185,7 +8173,7 @@ const SaveStatus = ({
|
|
|
8185
8173
|
}
|
|
8186
8174
|
if (isSaving) {
|
|
8187
8175
|
return jsxRuntime.jsxs("div", Object.assign({
|
|
8188
|
-
css: styles$
|
|
8176
|
+
css: styles$B.savingContainer
|
|
8189
8177
|
}, {
|
|
8190
8178
|
children: [jsxRuntime.jsx(Loader, {
|
|
8191
8179
|
css: theme => ({
|
|
@@ -8193,32 +8181,32 @@ const SaveStatus = ({
|
|
|
8193
8181
|
}),
|
|
8194
8182
|
size: giger.SpinnerSize.SIZE_SMALL
|
|
8195
8183
|
}), jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
8196
|
-
css: styles$
|
|
8184
|
+
css: styles$B.saving
|
|
8197
8185
|
}, {
|
|
8198
8186
|
children: t("manage-defaults:status.saving")
|
|
8199
8187
|
}))]
|
|
8200
8188
|
}));
|
|
8201
8189
|
}
|
|
8202
8190
|
return !isSaving && !(errors === null || errors === void 0 ? void 0 : errors.length) ? jsxRuntime.jsxs("div", Object.assign({
|
|
8203
|
-
css: styles$
|
|
8191
|
+
css: styles$B.container
|
|
8204
8192
|
}, {
|
|
8205
8193
|
children: [jsxRuntime.jsx("svg", Object.assign({
|
|
8206
|
-
css: styles$
|
|
8194
|
+
css: styles$B.checkmark,
|
|
8207
8195
|
viewBox: "0 0 52 52"
|
|
8208
8196
|
}, {
|
|
8209
8197
|
children: jsxRuntime.jsx("path", {
|
|
8210
|
-
css: styles$
|
|
8198
|
+
css: styles$B.checkmarkCheck,
|
|
8211
8199
|
d: "M14.1 27.2l7.1 7.2 16.7-16.8",
|
|
8212
8200
|
fill: "none",
|
|
8213
8201
|
strokeWidth: "5px"
|
|
8214
8202
|
})
|
|
8215
8203
|
})), jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
8216
|
-
css: styles$
|
|
8204
|
+
css: styles$B.saved
|
|
8217
8205
|
}, {
|
|
8218
8206
|
children: t("manage-defaults:status.saved")
|
|
8219
8207
|
}))]
|
|
8220
8208
|
})) : jsxRuntime.jsxs("div", Object.assign({
|
|
8221
|
-
css: [styles$
|
|
8209
|
+
css: [styles$B.container, {
|
|
8222
8210
|
padding: "0"
|
|
8223
8211
|
}]
|
|
8224
8212
|
}, {
|
|
@@ -8228,14 +8216,14 @@ const SaveStatus = ({
|
|
|
8228
8216
|
}),
|
|
8229
8217
|
name: gigerTheme.IconNames.CANCEL_FILLED
|
|
8230
8218
|
}), jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
8231
|
-
css: styles$
|
|
8219
|
+
css: styles$B.savingFailed
|
|
8232
8220
|
}, {
|
|
8233
8221
|
children: t("manage-defaults:status.savingFailed")
|
|
8234
8222
|
}))]
|
|
8235
8223
|
}));
|
|
8236
8224
|
};
|
|
8237
8225
|
|
|
8238
|
-
const styles$
|
|
8226
|
+
const styles$A = createStyles({
|
|
8239
8227
|
content: theme => ({
|
|
8240
8228
|
padding: `${theme.spacing(3)}px ${theme.spacing(4)}px`
|
|
8241
8229
|
}),
|
|
@@ -8283,10 +8271,10 @@ const CollapsiblePanel = ({
|
|
|
8283
8271
|
const [isExpanded, toggleIsExpanded] = useToggle(initialExpanded);
|
|
8284
8272
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
8285
8273
|
children: [jsxRuntime.jsx("div", Object.assign({
|
|
8286
|
-
css: styles$
|
|
8274
|
+
css: styles$A.header
|
|
8287
8275
|
}, {
|
|
8288
8276
|
children: jsxRuntime.jsxs(giger.Link, Object.assign({
|
|
8289
|
-
css: styles$
|
|
8277
|
+
css: styles$A.link,
|
|
8290
8278
|
onClick: event => {
|
|
8291
8279
|
event.preventDefault();
|
|
8292
8280
|
toggleIsExpanded();
|
|
@@ -8306,7 +8294,7 @@ const CollapsiblePanel = ({
|
|
|
8306
8294
|
errors: errors,
|
|
8307
8295
|
isSaving: isSaving
|
|
8308
8296
|
}), jsxRuntime.jsx(giger.Icon, {
|
|
8309
|
-
css: styles$
|
|
8297
|
+
css: styles$A.icon,
|
|
8310
8298
|
"data-testid": "collapsible-panel-dropdown",
|
|
8311
8299
|
name: isExpanded ? gigerTheme.IconNames.CHEVRON_TOP : gigerTheme.IconNames.CHEVRON_BOTTOM,
|
|
8312
8300
|
size: giger.IconSize.SIZE_LARGE
|
|
@@ -8314,7 +8302,7 @@ const CollapsiblePanel = ({
|
|
|
8314
8302
|
}))]
|
|
8315
8303
|
}))
|
|
8316
8304
|
})), isExpanded ? jsxRuntime.jsx("section", Object.assign({
|
|
8317
|
-
css: styles$
|
|
8305
|
+
css: styles$A.content
|
|
8318
8306
|
}, {
|
|
8319
8307
|
children: children
|
|
8320
8308
|
})) : jsxRuntime.jsx(Spacer, {
|
|
@@ -8424,7 +8412,7 @@ const Cube = _a => {
|
|
|
8424
8412
|
}));
|
|
8425
8413
|
};
|
|
8426
8414
|
|
|
8427
|
-
const styles$
|
|
8415
|
+
const styles$z = createStyles({
|
|
8428
8416
|
getDateRangeSelect: fullWidth => theme => ({
|
|
8429
8417
|
minWidth: theme.spacing(30),
|
|
8430
8418
|
position: "relative",
|
|
@@ -8449,7 +8437,7 @@ const DateRangeSelect = ({
|
|
|
8449
8437
|
void onChange(nextOption);
|
|
8450
8438
|
};
|
|
8451
8439
|
return jsxRuntime.jsx(giger.Select, Object.assign({
|
|
8452
|
-
css: styles$
|
|
8440
|
+
css: styles$z.getDateRangeSelect(fullWidth),
|
|
8453
8441
|
"data-testid": "date-range-select",
|
|
8454
8442
|
label: t("wallet-history:dateRange"),
|
|
8455
8443
|
leftContent: jsxRuntime.jsx(giger.Icon, {
|
|
@@ -8518,7 +8506,7 @@ const DateRangeCombo = ({
|
|
|
8518
8506
|
});
|
|
8519
8507
|
};
|
|
8520
8508
|
|
|
8521
|
-
const styles$
|
|
8509
|
+
const styles$y = createStyles({
|
|
8522
8510
|
container: theme => ({
|
|
8523
8511
|
display: "flex",
|
|
8524
8512
|
flexDirection: "column",
|
|
@@ -8549,13 +8537,13 @@ const DisplayTerm = ({
|
|
|
8549
8537
|
t
|
|
8550
8538
|
} = reactI18next.useTranslation();
|
|
8551
8539
|
return jsxRuntime.jsx("ul", Object.assign({
|
|
8552
|
-
css: styles$
|
|
8540
|
+
css: styles$y.container
|
|
8553
8541
|
}, {
|
|
8554
8542
|
children: term.links.map(({
|
|
8555
8543
|
link,
|
|
8556
8544
|
title
|
|
8557
8545
|
}) => jsxRuntime.jsxs("li", Object.assign({
|
|
8558
|
-
css: styles$
|
|
8546
|
+
css: styles$y.termLink
|
|
8559
8547
|
}, {
|
|
8560
8548
|
children: [jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
8561
8549
|
variant: "subtitle1"
|
|
@@ -8564,7 +8552,7 @@ const DisplayTerm = ({
|
|
|
8564
8552
|
defaultValue: title
|
|
8565
8553
|
})
|
|
8566
8554
|
})), jsxRuntime.jsx(giger.Link, Object.assign({
|
|
8567
|
-
css: styles$
|
|
8555
|
+
css: styles$y.link,
|
|
8568
8556
|
href: link,
|
|
8569
8557
|
isExternal: true,
|
|
8570
8558
|
target: "_blank"
|
|
@@ -8581,14 +8569,13 @@ const DisplayTerm = ({
|
|
|
8581
8569
|
}));
|
|
8582
8570
|
};
|
|
8583
8571
|
|
|
8584
|
-
const styles$
|
|
8572
|
+
const styles$x = createStyles({
|
|
8585
8573
|
container: {
|
|
8586
8574
|
backgroundColor: "#11003A"
|
|
8587
8575
|
},
|
|
8588
8576
|
getChildrenStyles: isOpen => theme => ({
|
|
8589
|
-
height: isOpen ? "
|
|
8590
|
-
overflow: "scroll"
|
|
8591
|
-
paddingLeft: theme.spacing(4)
|
|
8577
|
+
height: isOpen ? "90%" : "0",
|
|
8578
|
+
overflow: "scroll"
|
|
8592
8579
|
}),
|
|
8593
8580
|
getDrawerStyles: isOpen => theme => ({
|
|
8594
8581
|
backgroundColor: "#11003A",
|
|
@@ -8631,12 +8618,12 @@ const Drawer = ({
|
|
|
8631
8618
|
}, []);
|
|
8632
8619
|
return jsxRuntime.jsxs("div", Object.assign({
|
|
8633
8620
|
"aria-label": "Drawer",
|
|
8634
|
-
css: styles$
|
|
8621
|
+
css: styles$x.getDrawerStyles(isOpen),
|
|
8635
8622
|
ref: drawerRef
|
|
8636
8623
|
}, {
|
|
8637
8624
|
children: [jsxRuntime.jsxs("header", Object.assign({
|
|
8638
8625
|
"aria-expanded": isOpen,
|
|
8639
|
-
css: styles$
|
|
8626
|
+
css: styles$x.header
|
|
8640
8627
|
}, {
|
|
8641
8628
|
children: [jsxRuntime.jsx("div", Object.assign({
|
|
8642
8629
|
onClick: toggleDrawer,
|
|
@@ -8651,7 +8638,7 @@ const Drawer = ({
|
|
|
8651
8638
|
})), headerContent]
|
|
8652
8639
|
})), jsxRuntime.jsx("div", Object.assign({
|
|
8653
8640
|
"aria-labelledby": "drawer",
|
|
8654
|
-
css: styles$
|
|
8641
|
+
css: styles$x.getChildrenStyles(isOpen),
|
|
8655
8642
|
role: "region"
|
|
8656
8643
|
}, {
|
|
8657
8644
|
children: children
|
|
@@ -8700,7 +8687,7 @@ const ErrorFallback = ({
|
|
|
8700
8687
|
}));
|
|
8701
8688
|
};
|
|
8702
8689
|
|
|
8703
|
-
const styles$
|
|
8690
|
+
const styles$w = createStyles({
|
|
8704
8691
|
icon: theme => ({
|
|
8705
8692
|
color: theme.palette.primary.main,
|
|
8706
8693
|
marginRight: theme.spacing(2)
|
|
@@ -8750,10 +8737,10 @@ const Section = _a => {
|
|
|
8750
8737
|
rest = __rest(_a, ["bold", "title", "children", "rightContent"]);
|
|
8751
8738
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
8752
8739
|
children: [title && jsxRuntime.jsx("summary", Object.assign({
|
|
8753
|
-
css: styles$
|
|
8740
|
+
css: styles$w.summary
|
|
8754
8741
|
}, {
|
|
8755
8742
|
children: jsxRuntime.jsxs("div", Object.assign({
|
|
8756
|
-
css: styles$
|
|
8743
|
+
css: styles$w.summaryWrapper
|
|
8757
8744
|
}, {
|
|
8758
8745
|
children: [title && typeof title === "string" ? jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
8759
8746
|
bold: bold,
|
|
@@ -8761,20 +8748,20 @@ const Section = _a => {
|
|
|
8761
8748
|
}, {
|
|
8762
8749
|
children: title
|
|
8763
8750
|
})) : title, rightContent && jsxRuntime.jsx("div", Object.assign({
|
|
8764
|
-
css: styles$
|
|
8751
|
+
css: styles$w.rightContentWrapper
|
|
8765
8752
|
}, {
|
|
8766
8753
|
children: rightContent
|
|
8767
8754
|
}))]
|
|
8768
8755
|
}))
|
|
8769
8756
|
})), jsxRuntime.jsx("section", Object.assign({
|
|
8770
|
-
css: styles$
|
|
8757
|
+
css: styles$w.section
|
|
8771
8758
|
}, rest, {
|
|
8772
8759
|
children: children
|
|
8773
8760
|
}))]
|
|
8774
8761
|
});
|
|
8775
8762
|
};
|
|
8776
8763
|
|
|
8777
|
-
const styles$
|
|
8764
|
+
const styles$v = createStyles({
|
|
8778
8765
|
balanceText: theme => ({
|
|
8779
8766
|
color: theme.palette.secondary.dark
|
|
8780
8767
|
}),
|
|
@@ -8813,12 +8800,13 @@ const FundAndPurchase = ({
|
|
|
8813
8800
|
carrierId,
|
|
8814
8801
|
className,
|
|
8815
8802
|
control,
|
|
8803
|
+
currency,
|
|
8816
8804
|
disabled,
|
|
8817
8805
|
isFundingEnabled,
|
|
8818
8806
|
isFundingRequired,
|
|
8819
8807
|
isPreferredRate,
|
|
8820
|
-
onSave,
|
|
8821
8808
|
purchaseAmount,
|
|
8809
|
+
onSave,
|
|
8822
8810
|
onPurchase
|
|
8823
8811
|
}) => {
|
|
8824
8812
|
const {
|
|
@@ -8869,7 +8857,7 @@ const FundAndPurchase = ({
|
|
|
8869
8857
|
}, {
|
|
8870
8858
|
children: [jsxRuntime.jsx(giger.Button, Object.assign({
|
|
8871
8859
|
bold: false,
|
|
8872
|
-
css: styles$
|
|
8860
|
+
css: styles$v.saveRateButton,
|
|
8873
8861
|
disabled: disabled || !carrierId || isPreferredRate && !isRateFormValid || addFundsForm.isSubmitting || isRateFormSubmitting,
|
|
8874
8862
|
isLoading: isSavingRate,
|
|
8875
8863
|
onClick: handleSaveRate,
|
|
@@ -8887,23 +8875,26 @@ const FundAndPurchase = ({
|
|
|
8887
8875
|
}))]
|
|
8888
8876
|
});
|
|
8889
8877
|
// render when no rate has been selected yet
|
|
8890
|
-
if (!carrierId)
|
|
8891
|
-
|
|
8892
|
-
|
|
8893
|
-
|
|
8894
|
-
|
|
8895
|
-
children: [jsxRuntime.
|
|
8896
|
-
|
|
8897
|
-
|
|
8898
|
-
|
|
8899
|
-
|
|
8900
|
-
|
|
8901
|
-
|
|
8902
|
-
|
|
8903
|
-
|
|
8904
|
-
|
|
8905
|
-
|
|
8906
|
-
|
|
8878
|
+
if (!carrierId) {
|
|
8879
|
+
return jsxRuntime.jsxs("div", Object.assign({
|
|
8880
|
+
className: className,
|
|
8881
|
+
css: styles$v.container
|
|
8882
|
+
}, {
|
|
8883
|
+
children: [jsxRuntime.jsxs(Spread, {
|
|
8884
|
+
children: [jsxRuntime.jsx(CarrierBalance, {
|
|
8885
|
+
balance: uspsBalance,
|
|
8886
|
+
currency: currency
|
|
8887
|
+
}), isFundingEnabled ? jsxRuntime.jsx(LinkAction, {
|
|
8888
|
+
icon: "add",
|
|
8889
|
+
isDisabled: !isFundingRequired || isAddFundsFormOpen || isRateFormSubmitting,
|
|
8890
|
+
onClick: () => setIsAddFundsFormOpen(true),
|
|
8891
|
+
title: t("manage-funding:actions.addFunds")
|
|
8892
|
+
}) : null]
|
|
8893
|
+
}), jsxRuntime.jsx(Spacer, {
|
|
8894
|
+
multiplier: 2
|
|
8895
|
+
}), renderActionButtons()]
|
|
8896
|
+
}));
|
|
8897
|
+
}
|
|
8907
8898
|
/**
|
|
8908
8899
|
* If the selected rate is a preferred rate, we won't be able to show the carrier balance.
|
|
8909
8900
|
* Instead, we'll show the USPS balance, until the user either purchases or saves the rate.
|
|
@@ -8913,121 +8904,130 @@ const FundAndPurchase = ({
|
|
|
8913
8904
|
if (isPreferredRate) {
|
|
8914
8905
|
return jsxRuntime.jsxs("div", Object.assign({
|
|
8915
8906
|
className: className,
|
|
8916
|
-
css: styles$
|
|
8907
|
+
css: styles$v.container
|
|
8917
8908
|
}, {
|
|
8918
8909
|
children: [jsxRuntime.jsx(CarrierBalance, {
|
|
8919
|
-
balance: uspsBalance
|
|
8910
|
+
balance: uspsBalance,
|
|
8911
|
+
currency: currency
|
|
8920
8912
|
}), jsxRuntime.jsx(Spacer, {
|
|
8921
8913
|
multiplier: 2
|
|
8922
8914
|
}), renderActionButtons()]
|
|
8923
8915
|
}));
|
|
8924
|
-
}
|
|
8925
|
-
|
|
8916
|
+
}
|
|
8917
|
+
if (isLoadingCarrier) {
|
|
8918
|
+
return jsxRuntime.jsx(Loader, {
|
|
8926
8919
|
message: t("loading.carrier")
|
|
8927
8920
|
});
|
|
8928
|
-
|
|
8929
|
-
|
|
8930
|
-
|
|
8931
|
-
|
|
8932
|
-
|
|
8921
|
+
}
|
|
8922
|
+
if (!carrier || !carrierId) {
|
|
8923
|
+
throw new Error("errorMessages.unableToLoad.carrier");
|
|
8924
|
+
}
|
|
8925
|
+
const balance = carrier.balance;
|
|
8926
|
+
// Render: walleted carrier, but funding feature is not enabled;
|
|
8927
|
+
// show balance, but not the funding form.
|
|
8928
|
+
if (!isFundingEnabled) {
|
|
8929
|
+
return jsxRuntime.jsxs("div", Object.assign({
|
|
8933
8930
|
className: className,
|
|
8934
|
-
css: styles$
|
|
8931
|
+
css: styles$v.container
|
|
8935
8932
|
}, {
|
|
8936
8933
|
children: [jsxRuntime.jsx(CarrierBalance, {
|
|
8937
|
-
carrierId: carrierId
|
|
8934
|
+
carrierId: carrierId,
|
|
8935
|
+
currency: currency
|
|
8938
8936
|
}), jsxRuntime.jsx(Spacer, {
|
|
8939
8937
|
multiplier: 2
|
|
8940
8938
|
}), renderActionButtons()]
|
|
8941
8939
|
}));
|
|
8942
|
-
|
|
8943
|
-
|
|
8944
|
-
|
|
8945
|
-
|
|
8946
|
-
|
|
8947
|
-
|
|
8948
|
-
|
|
8949
|
-
|
|
8950
|
-
}), jsxRuntime.jsx(LinkAction, {
|
|
8951
|
-
icon: "add",
|
|
8952
|
-
isDisabled: isAddFundsFormOpen || isRateFormSubmitting,
|
|
8953
|
-
onClick: () => setIsAddFundsFormOpen(true),
|
|
8954
|
-
title: t("manage-funding:actions.addFunds")
|
|
8955
|
-
})]
|
|
8956
|
-
}), jsxRuntime.jsx(Spacer, {
|
|
8957
|
-
multiplier: 2
|
|
8958
|
-
}), balance < 0 && jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
8959
|
-
children: [jsxRuntime.jsx(giger.InlineNotification, Object.assign({
|
|
8960
|
-
title: t(`manage-funding:fundAndPurchase.negativeBalanceTitle`),
|
|
8961
|
-
type: giger.NotificationType.ALERT
|
|
8962
|
-
}, {
|
|
8963
|
-
children: t(`manage-funding:fundAndPurchase.negativeBalance`)
|
|
8964
|
-
})), jsxRuntime.jsx(Spacer, {
|
|
8965
|
-
multiplier: 2
|
|
8966
|
-
})]
|
|
8967
|
-
}), isAddFundsFormOpen ? jsxRuntime.jsx(AddFundsForm, Object.assign({
|
|
8940
|
+
}
|
|
8941
|
+
// Render: walleted carrier and funding feature is enabled;
|
|
8942
|
+
// show balance and funding form
|
|
8943
|
+
return jsxRuntime.jsxs(Section, Object.assign({
|
|
8944
|
+
title: t("purchase-label:sections.payment")
|
|
8945
|
+
}, {
|
|
8946
|
+
children: [jsxRuntime.jsxs(Spread, {
|
|
8947
|
+
children: [jsxRuntime.jsx(CarrierBalance, {
|
|
8968
8948
|
carrierId: carrierId,
|
|
8969
|
-
|
|
8970
|
-
|
|
8949
|
+
currency: currency
|
|
8950
|
+
}), jsxRuntime.jsx(LinkAction, {
|
|
8951
|
+
icon: "add",
|
|
8952
|
+
isDisabled: isAddFundsFormOpen || isRateFormSubmitting,
|
|
8953
|
+
onClick: () => setIsAddFundsFormOpen(true),
|
|
8954
|
+
title: t("manage-funding:actions.addFunds")
|
|
8955
|
+
})]
|
|
8956
|
+
}), jsxRuntime.jsx(Spacer, {
|
|
8957
|
+
multiplier: 2
|
|
8958
|
+
}), balance < 0 && jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
8959
|
+
children: [jsxRuntime.jsx(giger.InlineNotification, Object.assign({
|
|
8960
|
+
title: t("manage-funding:fundAndPurchase.negativeBalanceTitle"),
|
|
8961
|
+
type: giger.NotificationType.ALERT
|
|
8971
8962
|
}, {
|
|
8972
|
-
children:
|
|
8973
|
-
|
|
8974
|
-
|
|
8975
|
-
|
|
8976
|
-
|
|
8963
|
+
children: t("manage-funding:fundAndPurchase.negativeBalance")
|
|
8964
|
+
})), jsxRuntime.jsx(Spacer, {
|
|
8965
|
+
multiplier: 2
|
|
8966
|
+
})]
|
|
8967
|
+
}), isAddFundsFormOpen ? jsxRuntime.jsx(AddFundsForm, Object.assign({
|
|
8968
|
+
carrierId: carrierId,
|
|
8969
|
+
currency: currency,
|
|
8970
|
+
minimumAmount: purchaseAmount - balance,
|
|
8971
|
+
onSuccess: onPurchase
|
|
8972
|
+
}, {
|
|
8973
|
+
children: addFundsForm => {
|
|
8974
|
+
var _a, _b;
|
|
8975
|
+
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
8976
|
+
children: [jsxRuntime.jsxs("section", Object.assign({
|
|
8977
|
+
css: styles$v.getFormExtension(addFundsForm.isCustomAmount)
|
|
8978
|
+
}, {
|
|
8979
|
+
children: [jsxRuntime.jsx(InlineLabel, Object.assign({
|
|
8980
|
+
label: t("manage-funding:fundAndPurchase.newBalance")
|
|
8977
8981
|
}, {
|
|
8978
|
-
children:
|
|
8979
|
-
|
|
8982
|
+
children: jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
8983
|
+
css: styles$v.balanceText
|
|
8980
8984
|
}, {
|
|
8981
|
-
children:
|
|
8982
|
-
|
|
8983
|
-
|
|
8984
|
-
|
|
8985
|
-
|
|
8986
|
-
|
|
8987
|
-
|
|
8988
|
-
|
|
8989
|
-
|
|
8990
|
-
|
|
8985
|
+
children: formatMoney({
|
|
8986
|
+
amount: balance + ((_a = addFundsForm.selectedAmount) !== null && _a !== void 0 ? _a : 0),
|
|
8987
|
+
currency
|
|
8988
|
+
})
|
|
8989
|
+
}))
|
|
8990
|
+
})), jsxRuntime.jsx(InlineLabel, Object.assign({
|
|
8991
|
+
label: t("manage-funding:fundAndPurchase.finalBalance")
|
|
8992
|
+
}, {
|
|
8993
|
+
children: jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
8994
|
+
css: styles$v.balanceText
|
|
8991
8995
|
}, {
|
|
8992
|
-
children:
|
|
8993
|
-
|
|
8994
|
-
|
|
8995
|
-
|
|
8996
|
-
|
|
8997
|
-
|
|
8998
|
-
|
|
8999
|
-
|
|
9000
|
-
|
|
9001
|
-
|
|
8996
|
+
children: formatMoney({
|
|
8997
|
+
amount: balance + ((_b = addFundsForm.selectedAmount) !== null && _b !== void 0 ? _b : 0) - purchaseAmount,
|
|
8998
|
+
currency
|
|
8999
|
+
})
|
|
9000
|
+
}))
|
|
9001
|
+
})), balance >= purchaseAmount && jsxRuntime.jsx(ButtonGroup, Object.assign({
|
|
9002
|
+
justify: "end"
|
|
9003
|
+
}, {
|
|
9004
|
+
children: jsxRuntime.jsx(giger.Button, Object.assign({
|
|
9005
|
+
disabled: addFundsForm.isSubmitting || isRateFormSubmitting,
|
|
9006
|
+
onClick: () => setIsAddFundsFormOpen(false),
|
|
9007
|
+
variant: giger.ButtonVariant.TEXT
|
|
9002
9008
|
}, {
|
|
9003
|
-
children:
|
|
9004
|
-
|
|
9005
|
-
|
|
9006
|
-
|
|
9007
|
-
|
|
9008
|
-
|
|
9009
|
-
|
|
9010
|
-
|
|
9009
|
+
children: t("actions.cancel")
|
|
9010
|
+
}))
|
|
9011
|
+
}))]
|
|
9012
|
+
})), jsxRuntime.jsx(Spacer, {
|
|
9013
|
+
multiplier: 2
|
|
9014
|
+
}), addFundsForm.error && jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
9015
|
+
children: [jsxRuntime.jsx(giger.InlineNotification, Object.assign({
|
|
9016
|
+
title: t("manage-funding:addFunds.error.title"),
|
|
9017
|
+
type: giger.NotificationType.ERROR
|
|
9018
|
+
}, {
|
|
9019
|
+
children: addFundsForm.error[0].message
|
|
9011
9020
|
})), jsxRuntime.jsx(Spacer, {
|
|
9012
9021
|
multiplier: 2
|
|
9013
|
-
})
|
|
9014
|
-
|
|
9015
|
-
|
|
9016
|
-
|
|
9017
|
-
|
|
9018
|
-
|
|
9019
|
-
})), jsxRuntime.jsx(Spacer, {
|
|
9020
|
-
multiplier: 2
|
|
9021
|
-
})]
|
|
9022
|
-
}), renderActionButtons(addFundsForm)]
|
|
9023
|
-
});
|
|
9024
|
-
}
|
|
9025
|
-
}), purchaseAmount) : renderActionButtons()]
|
|
9026
|
-
}));
|
|
9027
|
-
}
|
|
9022
|
+
})]
|
|
9023
|
+
}), renderActionButtons(addFundsForm)]
|
|
9024
|
+
});
|
|
9025
|
+
}
|
|
9026
|
+
}), purchaseAmount) : renderActionButtons()]
|
|
9027
|
+
}));
|
|
9028
9028
|
};
|
|
9029
9029
|
|
|
9030
|
-
const styles$
|
|
9030
|
+
const styles$u = createStyles({
|
|
9031
9031
|
checkboxHeader: theme => ({
|
|
9032
9032
|
width: theme.spacing(6)
|
|
9033
9033
|
}),
|
|
@@ -9068,7 +9068,7 @@ const GridController = ({
|
|
|
9068
9068
|
});
|
|
9069
9069
|
}, []);
|
|
9070
9070
|
return jsxRuntime.jsx(giger.Table, Object.assign({
|
|
9071
|
-
css: styles$
|
|
9071
|
+
css: styles$u.table,
|
|
9072
9072
|
"data-testid": "grid",
|
|
9073
9073
|
footer: footerContent && jsxRuntime.jsx(giger.TableFooter, {
|
|
9074
9074
|
children: footerContent
|
|
@@ -9076,7 +9076,7 @@ const GridController = ({
|
|
|
9076
9076
|
header: jsxRuntime.jsx(giger.TableHeader, {
|
|
9077
9077
|
children: jsxRuntime.jsxs(giger.TableHeaderRow, {
|
|
9078
9078
|
children: [_useCheckboxes ? jsxRuntime.jsx(giger.TableHeaderCell, Object.assign({
|
|
9079
|
-
css: styles$
|
|
9079
|
+
css: styles$u.checkboxHeader
|
|
9080
9080
|
}, {
|
|
9081
9081
|
children: jsxRuntime.jsx(giger.Checkbox, {
|
|
9082
9082
|
checked: (_b = isAllChecked || isIndeterminate) !== null && _b !== void 0 ? _b : false,
|
|
@@ -9119,15 +9119,14 @@ const CellFormattedDate = ({
|
|
|
9119
9119
|
date,
|
|
9120
9120
|
short
|
|
9121
9121
|
}) => {
|
|
9122
|
-
const [formatWithShort, setFormatWithShort] = React.useState(!!short);
|
|
9123
9122
|
return jsxRuntime.jsx("div", {
|
|
9124
9123
|
children: jsxRuntime.jsx("div", {
|
|
9125
|
-
children:
|
|
9124
|
+
children: short ? formatDateDDMMYY(date) : formatDate(date)
|
|
9126
9125
|
})
|
|
9127
9126
|
});
|
|
9128
9127
|
};
|
|
9129
9128
|
|
|
9130
|
-
const styles$
|
|
9129
|
+
const styles$t = createStyles({
|
|
9131
9130
|
itemDescription: theme => ({
|
|
9132
9131
|
display: "flex",
|
|
9133
9132
|
flexDirection: "column",
|
|
@@ -9169,15 +9168,15 @@ const ItemsBreakdownTableHeader = ({
|
|
|
9169
9168
|
}) => jsxRuntime.jsx(giger.TableHeader, {
|
|
9170
9169
|
children: jsxRuntime.jsxs(giger.TableBaseRow, {
|
|
9171
9170
|
children: [jsxRuntime.jsx(giger.TableHeaderCell, {}), jsxRuntime.jsx(giger.TableHeaderCell, Object.assign({
|
|
9172
|
-
css: styles$
|
|
9171
|
+
css: styles$t.numericCell
|
|
9173
9172
|
}, {
|
|
9174
9173
|
children: "Qty"
|
|
9175
9174
|
})), hasValue && jsxRuntime.jsx(giger.TableHeaderCell, Object.assign({
|
|
9176
|
-
css: styles$
|
|
9175
|
+
css: styles$t.numericCell
|
|
9177
9176
|
}, {
|
|
9178
9177
|
children: "$/ea"
|
|
9179
9178
|
})), hasTotal && jsxRuntime.jsx(giger.TableHeaderCell, Object.assign({
|
|
9180
|
-
css: styles$
|
|
9179
|
+
css: styles$t.numericCell
|
|
9181
9180
|
}, {
|
|
9182
9181
|
children: "$ Total"
|
|
9183
9182
|
}))]
|
|
@@ -9194,7 +9193,7 @@ const ItemsBreakdown = ({
|
|
|
9194
9193
|
const hasValue = items.some(item => item.value !== undefined);
|
|
9195
9194
|
const hasTotal = items.some(item => item.totalValue !== undefined);
|
|
9196
9195
|
return jsxRuntime.jsx("div", Object.assign({
|
|
9197
|
-
css: styles$
|
|
9196
|
+
css: styles$t.tableWrapper
|
|
9198
9197
|
}, {
|
|
9199
9198
|
children: jsxRuntime.jsx(giger.Table, Object.assign({
|
|
9200
9199
|
header: jsxRuntime.jsx(ItemsBreakdownTableHeader, {
|
|
@@ -9212,25 +9211,25 @@ const ItemsBreakdown = ({
|
|
|
9212
9211
|
}, index) => jsxRuntime.jsx(React.Fragment, {
|
|
9213
9212
|
children: jsxRuntime.jsxs(giger.TableBaseRow, {
|
|
9214
9213
|
children: [jsxRuntime.jsxs(giger.TableBodyCell, Object.assign({
|
|
9215
|
-
css: styles$
|
|
9214
|
+
css: styles$t.itemDescription
|
|
9216
9215
|
}, {
|
|
9217
9216
|
children: [jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
9218
|
-
css: styles$
|
|
9217
|
+
css: styles$t.itemName
|
|
9219
9218
|
}, {
|
|
9220
9219
|
children: name
|
|
9221
9220
|
})), jsxRuntime.jsx(giger.Typography, {
|
|
9222
9221
|
children: detail
|
|
9223
9222
|
})]
|
|
9224
9223
|
})), jsxRuntime.jsx(giger.TableBodyCell, Object.assign({
|
|
9225
|
-
css: [styles$
|
|
9224
|
+
css: [styles$t.numericCell, styles$t.itemDetail]
|
|
9226
9225
|
}, {
|
|
9227
9226
|
children: quantity
|
|
9228
9227
|
})), hasValue && jsxRuntime.jsx(giger.TableBodyCell, Object.assign({
|
|
9229
|
-
css: [styles$
|
|
9228
|
+
css: [styles$t.numericCell, styles$t.itemDetail]
|
|
9230
9229
|
}, {
|
|
9231
9230
|
children: value && formatMoney(value)
|
|
9232
9231
|
})), hasTotal && jsxRuntime.jsx(giger.TableBodyCell, Object.assign({
|
|
9233
|
-
css: [styles$
|
|
9232
|
+
css: [styles$t.numericCell, styles$t.itemDetail]
|
|
9234
9233
|
}, {
|
|
9235
9234
|
children: totalValue && formatMoney(totalValue)
|
|
9236
9235
|
}))]
|
|
@@ -9258,7 +9257,8 @@ const ItemsBreakdown = ({
|
|
|
9258
9257
|
* @see {@link AccountSettings.Element | The `<AccountSettings />` component renders the `<ManageFunding />` component}
|
|
9259
9258
|
*/
|
|
9260
9259
|
const ManageFunding = ({
|
|
9261
|
-
carrierId
|
|
9260
|
+
carrierId,
|
|
9261
|
+
currency
|
|
9262
9262
|
}) => {
|
|
9263
9263
|
const {
|
|
9264
9264
|
t
|
|
@@ -9276,7 +9276,8 @@ const ManageFunding = ({
|
|
|
9276
9276
|
}) : jsxRuntime.jsxs("section", {
|
|
9277
9277
|
children: [jsxRuntime.jsxs(Spread, {
|
|
9278
9278
|
children: [jsxRuntime.jsx(CarrierBalance, {
|
|
9279
|
-
carrierId: carrierId
|
|
9279
|
+
carrierId: carrierId,
|
|
9280
|
+
currency: currency
|
|
9280
9281
|
}), jsxRuntime.jsx(LinkAction, {
|
|
9281
9282
|
icon: "add",
|
|
9282
9283
|
isDisabled: isAddFundsFormOpen,
|
|
@@ -9288,6 +9289,7 @@ const ManageFunding = ({
|
|
|
9288
9289
|
multiplier: 2
|
|
9289
9290
|
}), jsxRuntime.jsx(AddFundsForm, {
|
|
9290
9291
|
carrierId: carrierId,
|
|
9292
|
+
currency: currency,
|
|
9291
9293
|
onCancel: () => setIsAddFundsFormOpen(false),
|
|
9292
9294
|
onSuccess: () => {
|
|
9293
9295
|
void queryClient.invalidateQueries(["useGetCarrierById", carrierId], {
|
|
@@ -9301,13 +9303,14 @@ const ManageFunding = ({
|
|
|
9301
9303
|
}), jsxRuntime.jsx(Spacer, {
|
|
9302
9304
|
multiplier: 2
|
|
9303
9305
|
}), jsxRuntime.jsx(AutoFundingForm, {
|
|
9304
|
-
carrierId: carrierId
|
|
9306
|
+
carrierId: carrierId,
|
|
9307
|
+
currency: currency
|
|
9305
9308
|
})]
|
|
9306
9309
|
})
|
|
9307
9310
|
}));
|
|
9308
9311
|
};
|
|
9309
9312
|
|
|
9310
|
-
const styles$
|
|
9313
|
+
const styles$s = createStyles({
|
|
9311
9314
|
footer: {
|
|
9312
9315
|
"> *": {
|
|
9313
9316
|
borderTop: "0 !important"
|
|
@@ -9374,13 +9377,13 @@ const Pager = ({
|
|
|
9374
9377
|
toggleRowCountDropdown();
|
|
9375
9378
|
};
|
|
9376
9379
|
return jsxRuntime.jsxs("div", Object.assign({
|
|
9377
|
-
css: styles$
|
|
9380
|
+
css: styles$s.footer
|
|
9378
9381
|
}, {
|
|
9379
9382
|
children: [jsxRuntime.jsxs("div", Object.assign({
|
|
9380
|
-
css: styles$
|
|
9383
|
+
css: styles$s.leftFooter
|
|
9381
9384
|
}, {
|
|
9382
9385
|
children: [jsxRuntime.jsx("div", Object.assign({
|
|
9383
|
-
css: styles$
|
|
9386
|
+
css: styles$s.rowCount
|
|
9384
9387
|
}, {
|
|
9385
9388
|
children: jsxRuntime.jsx(reactI18next.Trans, {
|
|
9386
9389
|
components: [jsxRuntime.jsx("b", {
|
|
@@ -9396,7 +9399,7 @@ const Pager = ({
|
|
|
9396
9399
|
}
|
|
9397
9400
|
})
|
|
9398
9401
|
})), jsxRuntime.jsxs("div", Object.assign({
|
|
9399
|
-
css: styles$
|
|
9402
|
+
css: styles$s.rowsActions
|
|
9400
9403
|
}, {
|
|
9401
9404
|
children: [t("common:grid.rows"), jsxRuntime.jsx(giger.Button, Object.assign({
|
|
9402
9405
|
id: "selected-row",
|
|
@@ -9414,7 +9417,7 @@ const Pager = ({
|
|
|
9414
9417
|
onClick: () => toggleRowCountDropdown(),
|
|
9415
9418
|
size: giger.IconSize.SIZE_MEDIUM
|
|
9416
9419
|
}), jsxRuntime.jsx(giger.DropdownOptionList, Object.assign({
|
|
9417
|
-
css: styles$
|
|
9420
|
+
css: styles$s.rowCountDropDown,
|
|
9418
9421
|
dropdownWidth: "max-content",
|
|
9419
9422
|
isOpen: isRowCountDropDownOpen,
|
|
9420
9423
|
onChange: () => toggleRowCountDropdown(),
|
|
@@ -9536,7 +9539,7 @@ const AddressParser = ({
|
|
|
9536
9539
|
}));
|
|
9537
9540
|
};
|
|
9538
9541
|
|
|
9539
|
-
const styles$
|
|
9542
|
+
const styles$r = createStyles({
|
|
9540
9543
|
grow: {
|
|
9541
9544
|
flexGrow: 1
|
|
9542
9545
|
},
|
|
@@ -9640,13 +9643,13 @@ const AddressFields = ({
|
|
|
9640
9643
|
name: _formatFieldName("cityLocality"),
|
|
9641
9644
|
nativeLabel: true
|
|
9642
9645
|
}), jsxRuntime.jsxs("div", Object.assign({
|
|
9643
|
-
css: styles$
|
|
9646
|
+
css: styles$r.stateZipWrapper
|
|
9644
9647
|
}, {
|
|
9645
9648
|
children: [jsxRuntime.jsx("div", Object.assign({
|
|
9646
|
-
css: styles$
|
|
9649
|
+
css: styles$r.stateWrapper
|
|
9647
9650
|
}, {
|
|
9648
9651
|
children: jsxRuntime.jsx("div", Object.assign({
|
|
9649
|
-
css: styles$
|
|
9652
|
+
css: styles$r.grow
|
|
9650
9653
|
}, {
|
|
9651
9654
|
children: watchCountryCode === undefined || watchCountryCode === "US" ?
|
|
9652
9655
|
// Domestic States
|
|
@@ -9672,10 +9675,10 @@ const AddressFields = ({
|
|
|
9672
9675
|
})
|
|
9673
9676
|
}))
|
|
9674
9677
|
})), jsxRuntime.jsx("div", Object.assign({
|
|
9675
|
-
css: styles$
|
|
9678
|
+
css: styles$r.zipWrapper
|
|
9676
9679
|
}, {
|
|
9677
9680
|
children: jsxRuntime.jsx("div", Object.assign({
|
|
9678
|
-
css: styles$
|
|
9681
|
+
css: styles$r.grow
|
|
9679
9682
|
}, {
|
|
9680
9683
|
children: jsxRuntime.jsx(TextInput, {
|
|
9681
9684
|
control: form.control,
|
|
@@ -10485,7 +10488,7 @@ const EditWalletAddressForm = ({
|
|
|
10485
10488
|
}));
|
|
10486
10489
|
};
|
|
10487
10490
|
|
|
10488
|
-
const styles$
|
|
10491
|
+
const styles$q = createStyles({
|
|
10489
10492
|
grid: theme => ({
|
|
10490
10493
|
margin: theme.spacing(4)
|
|
10491
10494
|
})
|
|
@@ -10564,7 +10567,7 @@ const WalletForm = ({
|
|
|
10564
10567
|
onSubmit: formLogger.capture(handleSubmit)
|
|
10565
10568
|
}, {
|
|
10566
10569
|
children: jsxRuntime.jsxs(giger.Grid, Object.assign({
|
|
10567
|
-
css: styles$
|
|
10570
|
+
css: styles$q.grid,
|
|
10568
10571
|
noPadding: true
|
|
10569
10572
|
}, {
|
|
10570
10573
|
children: [jsxRuntime.jsx(giger.GridChild, Object.assign({
|
|
@@ -10646,7 +10649,7 @@ const WalletForm = ({
|
|
|
10646
10649
|
}));
|
|
10647
10650
|
};
|
|
10648
10651
|
|
|
10649
|
-
const styles$
|
|
10652
|
+
const styles$p = createStyles({
|
|
10650
10653
|
boldLink: theme => ({
|
|
10651
10654
|
fontWeight: theme.typography.fontWeight.bold
|
|
10652
10655
|
}),
|
|
@@ -10688,11 +10691,11 @@ const EditBillingForm = ({
|
|
|
10688
10691
|
onSubmit: formLogger.capture(handleSubmit)
|
|
10689
10692
|
}, {
|
|
10690
10693
|
children: jsxRuntime.jsxs(giger.Grid, Object.assign({
|
|
10691
|
-
css: styles$
|
|
10694
|
+
css: styles$p.container
|
|
10692
10695
|
}, {
|
|
10693
10696
|
children: [jsxRuntime.jsx(giger.GridChild, Object.assign({
|
|
10694
10697
|
colSpan: 12,
|
|
10695
|
-
css: styles$
|
|
10698
|
+
css: styles$p.subtitle
|
|
10696
10699
|
}, {
|
|
10697
10700
|
children: jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
10698
10701
|
variant: "subtitle1"
|
|
@@ -10707,7 +10710,7 @@ const EditBillingForm = ({
|
|
|
10707
10710
|
})
|
|
10708
10711
|
})), jsxRuntime.jsx(giger.GridChild, Object.assign({
|
|
10709
10712
|
colSpan: 12,
|
|
10710
|
-
css: styles$
|
|
10713
|
+
css: styles$p.subtitle
|
|
10711
10714
|
}, {
|
|
10712
10715
|
children: jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
10713
10716
|
variant: "subtitle1"
|
|
@@ -10743,7 +10746,7 @@ const EditBillingForm = ({
|
|
|
10743
10746
|
children: t("actions.cancel")
|
|
10744
10747
|
})), jsxRuntime.jsx(SubmitButton, Object.assign({
|
|
10745
10748
|
control: form.control,
|
|
10746
|
-
css: styles$
|
|
10749
|
+
css: styles$p.boldLink,
|
|
10747
10750
|
variant: giger.ButtonVariant.OUTLINED
|
|
10748
10751
|
}, {
|
|
10749
10752
|
children: t("actions.save")
|
|
@@ -10754,15 +10757,15 @@ const EditBillingForm = ({
|
|
|
10754
10757
|
}));
|
|
10755
10758
|
};
|
|
10756
10759
|
|
|
10757
|
-
var img$
|
|
10760
|
+
var img$4 = "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_115317)'%3e%3cpath d='M7.69231 0.000244141H142.308C146.556 0.000244141 150 3.42963 150 7.65982V88.0854C150 92.3157 146.556 95.7449 142.308 95.7449H7.69231C3.44404 95.7449 0 92.3157 0 88.0854V7.65982C0 3.42963 3.44404 0.000244141 7.69231 0.000244141Z' fill='%232557D6'/%3e%3cpath d='M0.048569 45.132H7.24876L8.87222 41.3961H12.5068L14.1261 45.132H28.293V42.276L29.5576 45.1445H36.912L38.1766 42.2334V45.1322H73.3843L73.368 38.9996H74.0491C74.5259 39.0155 74.6653 39.0574 74.6653 39.8088V45.1322H92.8747V43.7047C94.3438 44.4553 96.6282 45.1322 99.634 45.1322H107.295L108.934 41.3963H112.569L114.172 45.1322H128.935V41.5835L131.17 45.1322H143V21.6729H131.292V24.4433L129.654 21.6729H117.64V24.4433L116.135 21.6729H99.9076C97.1917 21.6729 94.804 22.0346 92.8751 23.0426V21.6729H81.6772V23.0426C80.4497 22.0036 78.7774 21.6729 76.9176 21.6729H36.0061L33.2611 27.7318L30.442 21.6729H17.5565V24.4433L16.1407 21.6729H5.15126L0.0476074 32.8263V45.1316H0.0481843L0.048569 45.132ZM45.4986 41.7484H41.1786L41.1626 28.5751L35.052 41.7482H31.352L25.2255 28.5634V41.7482H16.6543L15.0351 37.9966H6.26068L4.62511 41.7482H0.047992L7.59434 24.9284H13.8557L21.0228 40.8534V24.9284H27.9009L33.4159 36.3386L38.482 24.9284H45.4984L45.4986 41.7484ZM13.5947 34.5057L10.7105 27.8003L7.84222 34.5057H13.5947ZM62.6909 41.748H48.6134V24.9282H62.6909V28.4307H52.8276V31.4626H62.4545V34.9103H52.8274V38.2694H62.6907L62.6909 41.748ZM82.5293 29.4582C82.5293 32.1399 80.6534 33.5255 79.5603 33.9414C80.4822 34.2761 81.2701 34.8678 81.6449 35.3578C82.2399 36.1944 82.3426 36.9416 82.3426 38.4439V41.748H78.0918L78.0759 39.6269C78.0759 38.6149 78.1774 37.1594 77.4109 36.3501C76.7951 35.7584 75.8565 35.6301 74.3391 35.6301H69.8155V41.7482H65.6013V24.9282H75.2938C77.4474 24.9282 79.0343 24.9824 80.3966 25.7338C81.7299 26.4852 82.5293 27.582 82.5293 29.4582ZM77.2026 31.9556C76.6232 32.2911 75.9386 32.3022 75.1178 32.3022H69.9986V28.5663H75.1874C75.9217 28.5663 76.6882 28.5977 77.1861 28.8696C77.7326 29.1147 78.0709 29.6361 78.0709 30.3565C78.0709 31.0918 77.749 31.6833 77.2026 31.9556ZM89.288 41.748H84.9884V24.9282H89.288V41.748ZM139.203 41.748H133.232L125.244 29.1237V41.748H116.662L115.022 37.9964H106.268L104.677 41.748H99.7451C97.6972 41.748 95.1032 41.3158 93.6349 39.8877C92.154 38.4596 91.3834 36.5252 91.3834 33.4665C91.3834 30.972 91.844 28.6915 93.6549 26.8894C95.0174 25.5471 97.1511 24.9282 100.055 24.9282H104.135V28.5322H100.14C98.6024 28.5322 97.7338 28.7505 96.8976 29.5285C96.1793 30.2368 95.6865 31.5755 95.6865 33.3386C95.6865 35.1405 96.0616 36.4399 96.8447 37.2886C97.4934 37.9542 98.6728 38.1561 99.7816 38.1561H101.674L107.614 24.9287H113.928L121.063 40.8379V24.9289H127.48L134.887 36.6431V24.9289H139.203V41.748ZM113.588 34.5059L110.672 27.8005L107.771 34.5059H113.588ZM149.942 68.6063C148.918 70.0343 146.924 70.7583 144.223 70.7583H136.085V67.1506H144.19C144.994 67.1506 145.557 67.0497 145.896 66.7341C146.216 66.4519 146.397 66.0536 146.394 65.6371C146.394 65.1467 146.189 64.7576 145.879 64.5243C145.573 64.2674 145.128 64.1509 144.394 64.1509C140.438 64.0226 135.501 64.2674 135.501 58.9436C135.501 56.5036 137.125 53.935 141.547 53.935H149.941V50.5879H142.142C139.788 50.5879 138.078 51.126 136.868 51.9617V50.5877H125.332C123.487 50.5877 121.322 51.0241 120.298 51.9617V50.5877H99.6976V51.9617C98.0584 50.8334 95.2922 50.5877 94.0151 50.5877H80.4274V51.9617C79.1303 50.7633 76.2463 50.5877 74.4878 50.5877H59.2807L55.8011 54.1809L52.5417 50.5877H29.8243V74.0624H52.1128L55.6986 70.4123L59.0765 74.0624L72.8153 74.0741V68.5519H74.1655C75.9884 68.5787 78.1386 68.5083 80.0353 67.7262V74.0617H91.3676V67.9432H91.9142C92.6118 67.9432 92.6805 67.9708 92.6805 68.6354V74.0609H127.105C129.291 74.0609 131.575 73.5274 132.841 72.5587V74.0609H143.76C146.032 74.0609 148.251 73.757 149.94 72.9792L149.94 68.6056L149.942 68.6063ZM81.6841 59.5766C81.6841 64.2501 78.0293 65.215 74.3459 65.215H69.0876V70.858H60.897L55.7078 65.2884L50.3151 70.858H33.6224V54.034H50.5715L55.7563 59.5487L61.1168 54.034H74.5824C77.9265 54.034 81.6841 54.9173 81.6841 59.5766ZM48.1803 67.3193H37.8191V63.9721H47.0711V60.5394H37.8191V57.4806H48.3843L52.9938 62.3835L48.1803 67.3193ZM64.8745 69.2457L58.4045 62.3925L64.8745 55.7574V69.2457ZM74.4432 61.765H68.9974V57.4806H74.492C76.0136 57.4806 77.0697 58.0723 77.0697 59.5433C77.0697 60.9984 76.0624 61.765 74.4432 61.765ZM102.974 54.034H117.039V57.5133H107.171V60.572H116.798V64.0046H107.171V67.3519L117.039 67.3672V70.858H102.974L102.974 54.034ZM97.5665 63.0395C98.5045 63.3699 99.2713 63.9617 99.6307 64.4518C100.226 65.2734 100.312 66.04 100.329 67.5227V70.858H96.0978V68.7532C96.0978 67.741 96.1999 66.2424 95.4166 65.46C94.8011 64.8573 93.8622 64.7133 92.3251 64.7133H87.8213V70.8582H83.5867V54.0342H93.3163C95.4495 54.0342 97.0034 54.1242 98.3866 54.8281C99.7165 55.5948 100.553 56.6447 100.553 58.5642C100.553 61.2493 98.6755 62.6196 97.5665 63.0395ZM95.1847 60.9127C94.6209 61.2319 93.924 61.2595 93.1043 61.2595H87.9847V57.481H93.1736C93.924 57.481 94.6749 57.4963 95.1847 57.7849C95.7309 58.0574 96.0574 58.5788 96.0574 59.2982C96.0574 60.0178 95.7307 60.5977 95.1847 60.9127ZM133.227 61.9844C134.048 62.7942 134.487 63.8172 134.487 65.5486C134.487 69.1678 132.118 70.8573 127.867 70.8573H119.66V67.2496H127.835C128.634 67.2496 129.201 67.1491 129.556 66.8331C129.846 66.5731 130.054 66.1949 130.054 65.7361C130.054 65.2457 129.829 64.8568 129.539 64.6233C129.217 64.3667 128.773 64.2501 128.039 64.2501C124.098 64.1218 119.162 64.3667 119.162 59.0432C119.162 56.6028 120.769 54.0342 125.187 54.0342H133.636V57.615H125.905C125.139 57.615 124.641 57.6428 124.217 57.9189C123.756 58.1912 123.584 58.5956 123.584 59.1289C123.584 59.7635 123.976 60.1955 124.506 60.3824C124.951 60.5299 125.429 60.573 126.146 60.573L128.415 60.6316C130.702 60.6844 132.273 61.062 133.227 61.9844ZM149.949 57.4806H142.269C141.502 57.4806 140.992 57.5082 140.564 57.7845C140.119 58.057 139.948 58.4612 139.948 58.9951C139.948 59.6297 140.323 60.0613 140.869 60.2482C141.314 60.3958 141.791 60.4389 142.493 60.4389L144.777 60.4971C147.082 60.5515 148.62 60.9295 149.558 61.8513C149.729 61.9796 149.831 62.1236 149.949 62.2678V57.4806H149.949Z' fill='white'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='clip0_5173_115317'%3e%3crect width='150' height='95.7447' fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";
|
|
10758
10761
|
|
|
10759
|
-
var img$
|
|
10762
|
+
var img$3 = "data:image/svg+xml,%3csvg width='150' height='97' viewBox='0 0 150 97' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cg clip-path='url(%23clip0_5173_115348)'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M10.5754 0C4.73596 0 0 4.73654 0 10.5777V85.7685C0 91.6108 4.73442 96.3462 10.5754 96.3462H139.425C145.264 96.3462 150 91.6096 150 85.7685V10.5777C150 4.73539 145.266 0 139.425 0L10.5754 0Z' fill='%234D4D4D'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M62.9137 31.1333C64.6132 31.1333 66.0383 31.4764 67.773 32.3045V36.6796C66.1299 35.1675 64.7047 34.5346 62.8199 34.5346C59.1153 34.5346 56.2018 37.4221 56.2018 41.0827C56.2018 44.9433 59.0251 47.6589 63.0037 47.6589C64.7945 47.6589 66.1933 47.0589 67.773 45.571V49.9485C65.9766 50.7446 64.5208 51.0593 62.8199 51.0593C56.8049 51.0593 52.131 46.7139 52.131 41.1098C52.131 35.5664 56.9293 31.1333 62.9137 31.1333ZM44.2382 31.2539C46.4585 31.2539 48.4901 31.9693 50.1887 33.3681L48.1218 35.9158C47.093 34.83 46.1199 34.372 44.9364 34.372C43.2339 34.372 41.9941 35.2845 41.9941 36.4852C41.9941 37.5148 42.6901 38.0598 45.0603 38.8856C49.5535 40.4325 50.8853 41.8041 50.8853 44.8329C50.8853 48.5239 48.0053 51.0931 43.9006 51.0931C40.8949 51.0931 38.7095 49.9787 36.8895 47.4639L39.441 45.1504C40.3506 46.8062 41.8683 47.6931 43.7526 47.6931C45.5147 47.6931 46.8193 46.5485 46.8193 45.0039C46.8193 44.2031 46.4241 43.5166 45.6351 43.0312C45.2378 42.8014 44.4508 42.4587 42.9043 41.9452C39.1945 40.6879 37.9216 39.3439 37.9216 36.7173C37.9216 33.5971 40.6551 31.2539 44.2382 31.2539ZM89.3772 31.5862H93.692L99.0928 44.3923L104.563 31.5862H108.845L100.096 51.1412H97.9708L89.3772 31.5862ZM12.9641 31.6154H18.7622C25.1683 31.6154 29.6341 35.535 29.6341 41.1618C29.6341 43.9675 28.268 46.6802 25.9576 48.4804C24.0137 49.9998 21.7987 50.6814 18.7318 50.6814H12.9641V31.6154ZM31.4516 31.6154H35.4016V50.6814H31.4516V31.6154ZM110.631 31.6154H121.834V34.8462H114.579V39.0779H121.566V42.307H114.579V47.4535H121.834V50.6814H110.631L110.631 31.6154ZM124.45 31.6154H130.307C134.863 31.6154 137.473 33.675 137.473 37.2446C137.473 40.1639 135.836 42.0793 132.86 42.6495L139.235 50.6814H134.377L128.91 43.0221H128.395V50.6814H124.45V31.6154ZM128.395 34.6185V40.3925H129.55C132.072 40.3925 133.409 39.3614 133.409 37.4448C133.409 35.5895 132.072 34.6185 129.612 34.6185H128.395ZM16.9114 34.846V47.4535H17.9714C20.5239 47.4535 22.136 46.9931 23.3772 45.9381C24.7431 44.7929 25.5649 42.9641 25.5649 41.1343C25.5649 39.3075 24.7431 37.5333 23.3772 36.3879C22.0724 35.2764 20.5239 34.846 17.9714 34.846H16.9114Z' fill='white'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M79.8327 31.0019C85.7828 31.0019 90.6061 35.5365 90.6061 41.1382V41.1446C90.6061 46.7465 85.7828 51.2873 79.8328 51.2873C73.8828 51.2873 69.0594 46.7463 69.0594 41.1446V41.1382C69.0594 35.5363 73.8828 31.0017 79.8328 31.0017L79.8327 31.0019ZM149.996 55.4538C144.986 58.9788 107.481 84.1731 42.5442 96.3423H139.421C145.261 96.3423 149.997 91.6058 149.997 85.7646V55.4531L149.996 55.4538Z' fill='%23F47216'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='clip0_5173_115348'%3e%3crect width='150' height='96.1538' fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";
|
|
10760
10763
|
|
|
10761
|
-
var img$1 = "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_115320)'%3e%3cpath d='M0 0H150V95.7447H0V0Z' fill='%2316366F'/%3e%3cpath d='M86.348 47.8723C86.348 66.8572 70.8922 82.2447 51.8268 82.2447C32.7615 82.2447 17.3076 66.8564 17.3076 47.8723C17.3076 28.8894 32.7618 13.5 51.8268 13.5C70.8917 13.5 86.348 28.89 86.348 47.8723Z' fill='%23D9222A'/%3e%3cpath d='M98.1711 13.4993C89.2519 13.4993 81.1244 16.8687 74.9981 22.397C73.75 23.5247 72.585 24.7403 71.5125 26.0345H78.4867C79.4417 27.1906 80.3206 28.4067 81.1185 29.6753H68.8809C68.145 30.8474 67.4809 32.063 66.8923 33.3152H83.1061C83.6625 34.4995 84.1506 35.7145 84.5677 36.9542H65.4308C65.0286 38.1482 64.6938 39.3634 64.4275 40.5942H85.5698C86.0869 42.9859 86.3475 45.4257 86.3469 47.8724C86.3469 51.6895 85.7211 55.3621 84.5673 58.7911H65.4304C65.8465 60.0318 66.3342 61.2469 66.891 62.4313H83.1058C82.5165 63.6837 81.8519 64.8994 81.116 66.0721H68.8804C69.6792 67.3415 70.5592 68.5574 71.5121 69.7096H78.4848C77.4136 71.0064 76.2483 72.2231 74.9983 73.3502C81.1252 78.8779 89.2517 82.2457 98.1713 82.2457C117.236 82.2455 132.692 66.8572 132.692 47.8733C132.692 28.891 117.237 13.501 98.1713 13.501' fill='%23EE9F2D'/%3e%3cpath d='M128.092 67.0327C128.092 66.4197 128.591 65.9218 129.207 65.9218C129.823 65.9218 130.321 66.4197 130.321 67.0327C130.321 67.6452 129.823 68.1431 129.207 68.1431C128.591 68.1429 128.092 67.6456 128.092 67.0327ZM129.207 67.8767C129.675 67.8766 130.054 67.4986 130.055 67.0327C130.055 66.5668 129.675 66.1893 129.208 66.1893H129.207C128.74 66.1886 128.361 66.5652 128.36 67.0304V67.0329C128.359 67.4986 128.738 67.8766 129.206 67.8769C129.206 67.8767 129.206 67.8767 129.207 67.8767ZM129.056 67.5206H128.828V66.5451H129.241C129.328 66.5451 129.416 66.5451 129.492 66.5938C129.571 66.647 129.616 66.7412 129.616 66.8385C129.616 66.9476 129.551 67.0499 129.446 67.0897L129.627 67.5206H129.374L129.224 67.1345H129.056L129.056 67.5206ZM129.056 66.9672H129.183C129.23 66.9672 129.28 66.971 129.322 66.948C129.36 66.9241 129.379 66.8793 129.379 66.8362C129.379 66.7989 129.356 66.7558 129.324 66.7374C129.284 66.7123 129.221 66.718 129.178 66.718H129.056V66.9672ZM43.7678 51.636C43.3746 51.5906 43.2015 51.5783 42.9313 51.5783C40.8072 51.5783 39.7319 52.3039 39.7319 53.736C39.7319 54.619 40.2569 55.181 41.0755 55.181C42.6021 55.181 43.7022 53.7333 43.7678 51.636ZM46.493 57.9543H43.388L43.4594 56.4845C42.5122 57.6462 41.2486 58.1983 39.5315 58.1983C37.5003 58.1983 36.1076 56.6185 36.1076 54.3247C36.1076 50.8733 38.5299 48.8596 42.6878 48.8596C43.1124 48.8596 43.6572 48.8979 44.2149 48.9685C44.3313 48.5011 44.3617 48.301 44.3617 48.0494C44.3617 47.1095 43.7086 46.7591 41.9578 46.7591C40.1246 46.7384 38.6124 47.194 37.9915 47.3975C38.0307 47.162 38.5107 44.2077 38.5107 44.2077C40.3784 43.6627 41.6101 43.4576 42.9963 43.4576C46.2142 43.4576 47.9186 44.8961 47.9155 47.6153C47.9217 48.3439 47.8007 49.2429 47.6117 50.4246C47.2863 52.4795 46.5886 56.8812 46.493 57.9543ZM34.5396 57.9543H30.7919L32.9386 44.5507L28.1453 57.9543H25.5915L25.2761 44.6273L23.0196 57.9543H19.5115L22.4419 40.5185H27.8303L28.1572 50.2779L31.4442 40.5185H37.4378L34.5396 57.9543ZM102.805 51.636C102.413 51.5906 102.239 51.5783 101.97 51.5783C99.8467 51.5783 98.7711 52.3039 98.7711 53.736C98.7711 54.619 99.2953 55.181 100.114 55.181C101.641 55.181 102.742 53.7333 102.805 51.636ZM105.532 57.9543H102.428L102.498 56.4845C101.551 57.6462 100.286 58.1983 98.5709 58.1983C96.539 58.1983 95.1478 56.6185 95.1478 54.3247C95.1478 50.8733 97.5684 48.8596 101.727 48.8596C102.152 48.8596 102.696 48.8979 103.253 48.9685C103.369 48.5011 103.4 48.301 103.4 48.0494C103.4 47.1095 102.747 46.7591 100.996 46.7591C99.1632 46.7384 97.6526 47.194 97.0292 47.3975C97.0686 47.162 97.5501 44.2077 97.5501 44.2077C99.418 43.6627 100.649 43.4576 102.033 43.4576C105.253 43.4576 106.957 44.8961 106.954 47.6153C106.96 48.3439 106.839 49.2429 106.65 50.4246C106.327 52.4795 105.627 56.8812 105.532 57.9543ZM63.1497 57.7389C62.124 58.0606 61.3244 58.1983 60.4574 58.1983C58.5415 58.1983 57.4959 57.102 57.4959 55.0833C57.4686 54.4572 57.7715 52.8086 58.0094 51.3039C58.2257 49.9794 59.6344 41.628 59.6344 41.628H63.3596L62.9246 43.7744H65.1746L64.6663 47.1821H62.4082C61.9755 49.8789 61.3594 53.238 61.3522 53.6832C61.3522 54.4141 61.744 54.7331 62.6349 54.7331C63.0621 54.7331 63.3928 54.6898 63.6455 54.5991L63.1497 57.7389ZM74.5711 57.624C73.2915 58.0133 72.0567 58.2017 70.7482 58.1985C66.5784 58.1945 64.4046 56.0259 64.4046 51.8732C64.4046 47.026 67.1699 43.4578 70.9238 43.4578C73.9949 43.4578 75.9565 45.4556 75.9565 48.589C75.9565 49.6286 75.8219 50.6435 75.4974 52.0764H68.0792C67.8284 54.1334 69.1503 54.9903 71.3171 54.9903C72.6507 54.9903 73.8532 54.7164 75.1905 54.0974L74.5711 57.624ZM72.4774 49.2176C72.498 48.9222 72.8724 46.6867 70.7442 46.6867C69.5574 46.6867 68.709 47.5875 68.3634 49.2176H72.4774ZM48.7428 48.2569C48.7428 50.0506 49.6161 51.2873 51.5969 52.2162C53.1146 52.9264 53.3494 53.137 53.3494 53.7806C53.3494 54.6647 52.6801 55.0636 51.1971 55.0636C50.0794 55.0636 49.0394 54.8899 47.8397 54.5045C47.8397 54.5045 47.3469 57.6296 47.3244 57.7791C48.1763 57.9641 48.9359 58.1355 51.2244 58.1985C55.1786 58.1985 57.0047 56.6993 57.0047 53.4591C57.0047 51.5107 56.2403 50.3673 54.363 49.5081C52.7917 48.79 52.6113 48.6296 52.6113 47.9674C52.6113 47.2007 53.234 46.8097 54.4455 46.8097C55.1811 46.8097 56.1859 46.8878 57.1378 47.0228L57.6715 43.734C56.7011 43.5808 55.2299 43.4578 54.3734 43.4578C50.1811 43.4578 48.7299 45.6383 48.7428 48.2569ZM92.7986 43.8305C93.8396 43.8305 94.8099 44.1024 96.1472 44.7726L96.7601 40.9884C96.2113 40.7739 94.2786 39.5139 92.6417 39.5139C90.1336 39.5139 88.0136 40.7529 86.5224 42.798C84.3474 42.0806 83.4534 43.5304 82.3572 44.9746L81.3838 45.2004C81.4574 44.7249 81.5242 44.2525 81.5017 43.7746H78.0601C77.5899 48.1629 76.7565 52.608 76.1042 57.0017L75.9342 57.9545H79.6834C80.3092 53.9059 80.6522 51.3135 80.8605 49.5593L82.2724 48.7772C82.4832 47.9959 83.1434 47.7321 84.4678 47.7639C84.2897 48.7228 84.2007 49.696 84.2019 50.6714C84.2019 55.3103 86.7155 58.1985 90.7499 58.1985C91.7892 58.1985 92.6811 58.0622 94.0617 57.6897L94.7215 53.7144C93.4792 54.3233 92.4597 54.6098 91.5367 54.6098C89.3582 54.6098 88.0399 53.0086 88.0399 50.3618C88.0397 46.5224 90.0005 43.8305 92.7986 43.8305Z' fill='black'/%3e%3cpath d='M35.6172 56.9182H31.8689L34.017 43.5162L29.2237 56.9182H26.6695L26.3537 43.5928L24.0974 56.9182H20.5891L23.5195 39.4846H28.908L29.0595 50.2773L32.6949 39.4846H38.5155L35.6172 56.9182Z' fill='white'/%3e%3cpath d='M124.523 40.519L123.692 45.5567C122.667 44.214 121.567 43.2422 120.113 43.2422C118.222 43.2422 116.501 44.6696 115.374 46.7704C113.805 46.4464 112.183 45.8966 112.183 45.8966L112.182 45.9095C112.308 44.7351 112.359 44.0185 112.348 43.7751H108.905C108.437 48.1635 107.603 52.6085 106.952 57.0023L106.78 57.9551H110.529C111.035 54.6812 111.423 51.9628 111.708 49.807C112.989 48.6549 113.63 47.6495 114.924 47.7166C114.351 49.0964 114.015 50.6854 114.015 52.3156C114.015 55.8606 115.816 58.1991 118.541 58.1991C119.914 58.1991 120.968 57.7276 121.996 56.6346L121.82 57.9528H125.365L128.22 40.519H124.523ZM119.836 54.6781C118.561 54.6781 117.917 53.7381 117.917 51.883C117.917 49.0962 119.123 47.1197 120.823 47.1197C122.11 47.1197 122.807 48.097 122.807 49.8978C122.808 52.7091 121.583 54.6781 119.836 54.6781Z' fill='black'/%3e%3cpath d='M44.8442 50.6029C44.4515 50.5577 44.2777 50.5455 44.0084 50.5455C41.8842 50.5455 40.8096 51.2708 40.8096 52.703C40.8096 53.5846 41.3346 54.1481 42.1519 54.1481C43.6798 54.148 44.78 52.7007 44.8442 50.6029ZM47.5709 56.919H44.4659L44.5365 55.4516C43.5902 56.6109 42.325 57.1654 40.6094 57.1654C38.5773 57.1654 37.1855 55.5857 37.1855 53.2918C37.1855 49.8389 39.6069 47.8263 43.7655 47.8263C44.1904 47.8263 44.7352 47.8646 45.2921 47.9357C45.4082 47.468 45.4386 47.2679 45.4386 47.015C45.4386 46.0751 44.7865 45.7263 43.0355 45.7263C41.2015 45.7056 39.6904 46.1613 39.0684 46.3624C39.1077 46.1276 39.5877 43.1764 39.5877 43.1764C41.4548 42.6291 42.6879 42.4238 44.0725 42.4238C47.2913 42.4238 48.9963 43.8634 48.9932 46.5801C48.9988 47.3116 48.8769 48.2101 48.6886 49.3902C48.3642 51.4439 47.6655 55.8482 47.5709 56.919ZM97.8363 39.9546L97.2225 43.7397C95.8859 43.0703 94.9148 42.7974 93.875 42.7974C91.0767 42.7974 89.1153 45.4894 89.1153 49.3286C89.1153 51.9751 90.434 53.576 92.6121 53.576C93.5352 53.576 94.5536 53.2903 95.7955 52.6804L95.1378 56.6538C93.7563 57.0289 92.8655 57.1654 91.8252 57.1654C87.7913 57.1654 85.2771 54.277 85.2771 49.6382C85.2771 43.4052 88.75 39.0488 93.7171 39.0488C95.353 39.049 97.2867 39.7399 97.8363 39.9546ZM103.883 50.6029C103.49 50.5577 103.317 50.5455 103.047 50.5455C100.924 50.5455 99.8482 51.2708 99.8482 52.703C99.8482 53.5846 100.373 54.1481 101.191 54.1481C102.718 54.148 103.819 52.7007 103.883 50.6029ZM106.61 56.919H103.504L103.575 55.4516C102.628 56.6109 101.363 57.1654 99.648 57.1654C97.6167 57.1654 96.2242 55.5857 96.2242 53.2918C96.2242 49.8389 98.6463 47.8263 102.803 47.8263C103.229 47.8263 103.773 47.8646 104.331 47.9357C104.446 47.468 104.477 47.2679 104.477 47.015C104.477 46.0751 103.825 45.7263 102.074 45.7263C100.241 45.7056 98.7288 46.1613 98.1071 46.3624C98.1463 46.1276 98.6271 43.1764 98.6271 43.1764C100.494 42.6291 101.726 42.4238 103.111 42.4238C106.331 42.4238 108.035 43.8634 108.031 46.5801C108.037 47.3116 107.916 48.2101 107.727 49.3902C107.404 51.4439 106.703 55.8482 106.61 56.919ZM64.2269 56.7042C63.2004 57.0259 62.4007 57.1654 61.5346 57.1654C59.6186 57.1654 58.573 56.069 58.573 54.0507C58.5465 53.4224 58.8494 51.7756 59.0875 50.2711C59.3029 48.9448 60.7117 40.5945 60.7117 40.5945H64.4361L64.0017 42.7415H65.9136L65.4048 46.1477H63.4865C63.0538 48.846 62.4359 52.2024 62.4296 52.6486C62.4296 53.382 62.8223 53.6985 63.7125 53.6985C64.1394 53.6985 64.4698 53.657 64.7229 53.566L64.2269 56.7042ZM75.6484 56.591C74.3696 56.9803 73.133 57.1679 71.8254 57.1654C67.6554 57.1614 65.4817 54.9928 65.4817 50.84C65.4817 45.9913 68.2471 42.424 72.0009 42.424C75.0721 42.424 77.0336 44.4211 77.0336 47.5559C77.0336 48.5963 76.899 49.6112 76.5755 51.0433H69.1573C68.9061 53.1001 70.2282 53.958 72.3952 53.958C73.7278 53.958 74.9313 53.6834 76.2677 53.0626L75.6484 56.591ZM73.5538 48.1823C73.5763 47.8878 73.9498 45.6514 71.8205 45.6514C70.6348 45.6514 69.7861 46.5546 69.4407 48.1823H73.5538ZM49.8192 47.2241C49.8192 49.0174 50.6927 50.2527 52.6734 51.1831C54.1909 51.8932 54.4257 52.1046 54.4257 52.7476C54.4257 53.6317 53.7559 54.0306 52.2744 54.0306C51.1557 54.0306 50.1157 53.8567 48.9154 53.4714C48.9154 53.4714 48.4242 56.5965 48.4019 56.7459C49.2519 56.9311 50.0123 57.1001 52.3007 57.1654C56.2559 57.1654 58.0813 55.6663 58.0813 52.4269C58.0813 50.4775 57.3177 49.3343 55.4394 48.4751C53.8688 47.7555 53.6871 47.5975 53.6871 46.9344C53.6871 46.1684 54.3111 45.7743 55.5219 45.7743C56.2567 45.7743 57.2615 45.8547 58.215 45.9897L58.7479 42.7C57.7784 42.5468 56.3073 42.424 55.4505 42.424C51.2575 42.424 49.8073 44.603 49.8192 47.2241ZM126.444 56.919H122.899L123.075 55.5991C122.047 56.6938 120.993 57.1654 119.62 57.1654C116.895 57.1654 115.095 54.8268 115.095 51.2819C115.095 46.5656 117.887 42.5897 121.193 42.5897C122.646 42.5897 123.747 43.181 124.77 44.5229L125.602 39.4852H129.298L126.444 56.919ZM120.916 53.6428C122.662 53.6428 123.887 51.6737 123.887 48.8646C123.887 47.0636 123.189 46.0863 121.902 46.0863C120.202 46.0863 118.995 48.0619 118.995 50.8496C118.995 52.7043 119.641 53.6428 120.916 53.6428ZM109.985 42.7415C109.516 47.1299 108.682 51.5749 108.031 55.9663L107.859 56.919H111.608C112.948 48.2493 113.273 46.5562 115.375 46.7683C115.71 44.994 116.333 43.4397 116.797 42.6553C115.228 42.3298 114.351 43.2131 113.204 44.891C113.294 44.1658 113.46 43.4613 113.427 42.7415H109.985ZM79.135 42.7415C78.6646 47.1299 77.8311 51.5749 77.1798 55.9663L77.0092 56.919H80.7592C82.098 48.2493 82.4219 46.5562 84.5225 46.7683C84.859 44.994 85.4825 43.4397 85.9455 42.6553C84.3775 42.3298 83.5002 43.2131 82.3536 44.891C82.444 44.1658 82.6084 43.4613 82.5771 42.7415H79.135ZM128.091 55.8091C128.091 55.1937 128.59 54.6985 129.205 54.6985C129.82 54.6979 130.319 55.1939 130.32 55.8063V55.8091C130.32 56.4219 129.821 56.9186 129.205 56.919C128.59 56.9186 128.091 56.4219 128.091 55.8091ZM129.205 56.6524C129.673 56.6526 130.052 56.2752 130.052 55.8097V55.8093C130.053 55.3434 129.674 54.9656 129.206 54.9652H129.205C128.737 54.9654 128.358 55.3432 128.357 55.8093C128.358 56.275 128.737 56.6524 129.205 56.6524ZM129.055 56.2944H128.826V55.3208H129.24C129.326 55.3208 129.415 55.3224 129.49 55.3695C129.57 55.4237 129.615 55.5163 129.615 55.6134C129.615 55.7235 129.55 55.8266 129.445 55.8656L129.626 56.2938H129.372L129.222 55.9093H129.055V56.2938V56.2944ZM129.055 55.7429H129.18C129.227 55.7429 129.279 55.7463 129.321 55.7237C129.358 55.6998 129.377 55.6546 129.377 55.6113C129.376 55.5711 129.355 55.534 129.322 55.511C129.283 55.4886 129.218 55.4947 129.175 55.4947H129.054L129.055 55.7429Z' fill='white'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='clip0_5173_115320'%3e%3crect width='150' height='95.7447' fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";
|
|
10764
|
+
var img$2 = "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_115320)'%3e%3cpath d='M0 0H150V95.7447H0V0Z' fill='%2316366F'/%3e%3cpath d='M86.348 47.8723C86.348 66.8572 70.8922 82.2447 51.8268 82.2447C32.7615 82.2447 17.3076 66.8564 17.3076 47.8723C17.3076 28.8894 32.7618 13.5 51.8268 13.5C70.8917 13.5 86.348 28.89 86.348 47.8723Z' fill='%23D9222A'/%3e%3cpath d='M98.1711 13.4993C89.2519 13.4993 81.1244 16.8687 74.9981 22.397C73.75 23.5247 72.585 24.7403 71.5125 26.0345H78.4867C79.4417 27.1906 80.3206 28.4067 81.1185 29.6753H68.8809C68.145 30.8474 67.4809 32.063 66.8923 33.3152H83.1061C83.6625 34.4995 84.1506 35.7145 84.5677 36.9542H65.4308C65.0286 38.1482 64.6938 39.3634 64.4275 40.5942H85.5698C86.0869 42.9859 86.3475 45.4257 86.3469 47.8724C86.3469 51.6895 85.7211 55.3621 84.5673 58.7911H65.4304C65.8465 60.0318 66.3342 61.2469 66.891 62.4313H83.1058C82.5165 63.6837 81.8519 64.8994 81.116 66.0721H68.8804C69.6792 67.3415 70.5592 68.5574 71.5121 69.7096H78.4848C77.4136 71.0064 76.2483 72.2231 74.9983 73.3502C81.1252 78.8779 89.2517 82.2457 98.1713 82.2457C117.236 82.2455 132.692 66.8572 132.692 47.8733C132.692 28.891 117.237 13.501 98.1713 13.501' fill='%23EE9F2D'/%3e%3cpath d='M128.092 67.0327C128.092 66.4197 128.591 65.9218 129.207 65.9218C129.823 65.9218 130.321 66.4197 130.321 67.0327C130.321 67.6452 129.823 68.1431 129.207 68.1431C128.591 68.1429 128.092 67.6456 128.092 67.0327ZM129.207 67.8767C129.675 67.8766 130.054 67.4986 130.055 67.0327C130.055 66.5668 129.675 66.1893 129.208 66.1893H129.207C128.74 66.1886 128.361 66.5652 128.36 67.0304V67.0329C128.359 67.4986 128.738 67.8766 129.206 67.8769C129.206 67.8767 129.206 67.8767 129.207 67.8767ZM129.056 67.5206H128.828V66.5451H129.241C129.328 66.5451 129.416 66.5451 129.492 66.5938C129.571 66.647 129.616 66.7412 129.616 66.8385C129.616 66.9476 129.551 67.0499 129.446 67.0897L129.627 67.5206H129.374L129.224 67.1345H129.056L129.056 67.5206ZM129.056 66.9672H129.183C129.23 66.9672 129.28 66.971 129.322 66.948C129.36 66.9241 129.379 66.8793 129.379 66.8362C129.379 66.7989 129.356 66.7558 129.324 66.7374C129.284 66.7123 129.221 66.718 129.178 66.718H129.056V66.9672ZM43.7678 51.636C43.3746 51.5906 43.2015 51.5783 42.9313 51.5783C40.8072 51.5783 39.7319 52.3039 39.7319 53.736C39.7319 54.619 40.2569 55.181 41.0755 55.181C42.6021 55.181 43.7022 53.7333 43.7678 51.636ZM46.493 57.9543H43.388L43.4594 56.4845C42.5122 57.6462 41.2486 58.1983 39.5315 58.1983C37.5003 58.1983 36.1076 56.6185 36.1076 54.3247C36.1076 50.8733 38.5299 48.8596 42.6878 48.8596C43.1124 48.8596 43.6572 48.8979 44.2149 48.9685C44.3313 48.5011 44.3617 48.301 44.3617 48.0494C44.3617 47.1095 43.7086 46.7591 41.9578 46.7591C40.1246 46.7384 38.6124 47.194 37.9915 47.3975C38.0307 47.162 38.5107 44.2077 38.5107 44.2077C40.3784 43.6627 41.6101 43.4576 42.9963 43.4576C46.2142 43.4576 47.9186 44.8961 47.9155 47.6153C47.9217 48.3439 47.8007 49.2429 47.6117 50.4246C47.2863 52.4795 46.5886 56.8812 46.493 57.9543ZM34.5396 57.9543H30.7919L32.9386 44.5507L28.1453 57.9543H25.5915L25.2761 44.6273L23.0196 57.9543H19.5115L22.4419 40.5185H27.8303L28.1572 50.2779L31.4442 40.5185H37.4378L34.5396 57.9543ZM102.805 51.636C102.413 51.5906 102.239 51.5783 101.97 51.5783C99.8467 51.5783 98.7711 52.3039 98.7711 53.736C98.7711 54.619 99.2953 55.181 100.114 55.181C101.641 55.181 102.742 53.7333 102.805 51.636ZM105.532 57.9543H102.428L102.498 56.4845C101.551 57.6462 100.286 58.1983 98.5709 58.1983C96.539 58.1983 95.1478 56.6185 95.1478 54.3247C95.1478 50.8733 97.5684 48.8596 101.727 48.8596C102.152 48.8596 102.696 48.8979 103.253 48.9685C103.369 48.5011 103.4 48.301 103.4 48.0494C103.4 47.1095 102.747 46.7591 100.996 46.7591C99.1632 46.7384 97.6526 47.194 97.0292 47.3975C97.0686 47.162 97.5501 44.2077 97.5501 44.2077C99.418 43.6627 100.649 43.4576 102.033 43.4576C105.253 43.4576 106.957 44.8961 106.954 47.6153C106.96 48.3439 106.839 49.2429 106.65 50.4246C106.327 52.4795 105.627 56.8812 105.532 57.9543ZM63.1497 57.7389C62.124 58.0606 61.3244 58.1983 60.4574 58.1983C58.5415 58.1983 57.4959 57.102 57.4959 55.0833C57.4686 54.4572 57.7715 52.8086 58.0094 51.3039C58.2257 49.9794 59.6344 41.628 59.6344 41.628H63.3596L62.9246 43.7744H65.1746L64.6663 47.1821H62.4082C61.9755 49.8789 61.3594 53.238 61.3522 53.6832C61.3522 54.4141 61.744 54.7331 62.6349 54.7331C63.0621 54.7331 63.3928 54.6898 63.6455 54.5991L63.1497 57.7389ZM74.5711 57.624C73.2915 58.0133 72.0567 58.2017 70.7482 58.1985C66.5784 58.1945 64.4046 56.0259 64.4046 51.8732C64.4046 47.026 67.1699 43.4578 70.9238 43.4578C73.9949 43.4578 75.9565 45.4556 75.9565 48.589C75.9565 49.6286 75.8219 50.6435 75.4974 52.0764H68.0792C67.8284 54.1334 69.1503 54.9903 71.3171 54.9903C72.6507 54.9903 73.8532 54.7164 75.1905 54.0974L74.5711 57.624ZM72.4774 49.2176C72.498 48.9222 72.8724 46.6867 70.7442 46.6867C69.5574 46.6867 68.709 47.5875 68.3634 49.2176H72.4774ZM48.7428 48.2569C48.7428 50.0506 49.6161 51.2873 51.5969 52.2162C53.1146 52.9264 53.3494 53.137 53.3494 53.7806C53.3494 54.6647 52.6801 55.0636 51.1971 55.0636C50.0794 55.0636 49.0394 54.8899 47.8397 54.5045C47.8397 54.5045 47.3469 57.6296 47.3244 57.7791C48.1763 57.9641 48.9359 58.1355 51.2244 58.1985C55.1786 58.1985 57.0047 56.6993 57.0047 53.4591C57.0047 51.5107 56.2403 50.3673 54.363 49.5081C52.7917 48.79 52.6113 48.6296 52.6113 47.9674C52.6113 47.2007 53.234 46.8097 54.4455 46.8097C55.1811 46.8097 56.1859 46.8878 57.1378 47.0228L57.6715 43.734C56.7011 43.5808 55.2299 43.4578 54.3734 43.4578C50.1811 43.4578 48.7299 45.6383 48.7428 48.2569ZM92.7986 43.8305C93.8396 43.8305 94.8099 44.1024 96.1472 44.7726L96.7601 40.9884C96.2113 40.7739 94.2786 39.5139 92.6417 39.5139C90.1336 39.5139 88.0136 40.7529 86.5224 42.798C84.3474 42.0806 83.4534 43.5304 82.3572 44.9746L81.3838 45.2004C81.4574 44.7249 81.5242 44.2525 81.5017 43.7746H78.0601C77.5899 48.1629 76.7565 52.608 76.1042 57.0017L75.9342 57.9545H79.6834C80.3092 53.9059 80.6522 51.3135 80.8605 49.5593L82.2724 48.7772C82.4832 47.9959 83.1434 47.7321 84.4678 47.7639C84.2897 48.7228 84.2007 49.696 84.2019 50.6714C84.2019 55.3103 86.7155 58.1985 90.7499 58.1985C91.7892 58.1985 92.6811 58.0622 94.0617 57.6897L94.7215 53.7144C93.4792 54.3233 92.4597 54.6098 91.5367 54.6098C89.3582 54.6098 88.0399 53.0086 88.0399 50.3618C88.0397 46.5224 90.0005 43.8305 92.7986 43.8305Z' fill='black'/%3e%3cpath d='M35.6172 56.9182H31.8689L34.017 43.5162L29.2237 56.9182H26.6695L26.3537 43.5928L24.0974 56.9182H20.5891L23.5195 39.4846H28.908L29.0595 50.2773L32.6949 39.4846H38.5155L35.6172 56.9182Z' fill='white'/%3e%3cpath d='M124.523 40.519L123.692 45.5567C122.667 44.214 121.567 43.2422 120.113 43.2422C118.222 43.2422 116.501 44.6696 115.374 46.7704C113.805 46.4464 112.183 45.8966 112.183 45.8966L112.182 45.9095C112.308 44.7351 112.359 44.0185 112.348 43.7751H108.905C108.437 48.1635 107.603 52.6085 106.952 57.0023L106.78 57.9551H110.529C111.035 54.6812 111.423 51.9628 111.708 49.807C112.989 48.6549 113.63 47.6495 114.924 47.7166C114.351 49.0964 114.015 50.6854 114.015 52.3156C114.015 55.8606 115.816 58.1991 118.541 58.1991C119.914 58.1991 120.968 57.7276 121.996 56.6346L121.82 57.9528H125.365L128.22 40.519H124.523ZM119.836 54.6781C118.561 54.6781 117.917 53.7381 117.917 51.883C117.917 49.0962 119.123 47.1197 120.823 47.1197C122.11 47.1197 122.807 48.097 122.807 49.8978C122.808 52.7091 121.583 54.6781 119.836 54.6781Z' fill='black'/%3e%3cpath d='M44.8442 50.6029C44.4515 50.5577 44.2777 50.5455 44.0084 50.5455C41.8842 50.5455 40.8096 51.2708 40.8096 52.703C40.8096 53.5846 41.3346 54.1481 42.1519 54.1481C43.6798 54.148 44.78 52.7007 44.8442 50.6029ZM47.5709 56.919H44.4659L44.5365 55.4516C43.5902 56.6109 42.325 57.1654 40.6094 57.1654C38.5773 57.1654 37.1855 55.5857 37.1855 53.2918C37.1855 49.8389 39.6069 47.8263 43.7655 47.8263C44.1904 47.8263 44.7352 47.8646 45.2921 47.9357C45.4082 47.468 45.4386 47.2679 45.4386 47.015C45.4386 46.0751 44.7865 45.7263 43.0355 45.7263C41.2015 45.7056 39.6904 46.1613 39.0684 46.3624C39.1077 46.1276 39.5877 43.1764 39.5877 43.1764C41.4548 42.6291 42.6879 42.4238 44.0725 42.4238C47.2913 42.4238 48.9963 43.8634 48.9932 46.5801C48.9988 47.3116 48.8769 48.2101 48.6886 49.3902C48.3642 51.4439 47.6655 55.8482 47.5709 56.919ZM97.8363 39.9546L97.2225 43.7397C95.8859 43.0703 94.9148 42.7974 93.875 42.7974C91.0767 42.7974 89.1153 45.4894 89.1153 49.3286C89.1153 51.9751 90.434 53.576 92.6121 53.576C93.5352 53.576 94.5536 53.2903 95.7955 52.6804L95.1378 56.6538C93.7563 57.0289 92.8655 57.1654 91.8252 57.1654C87.7913 57.1654 85.2771 54.277 85.2771 49.6382C85.2771 43.4052 88.75 39.0488 93.7171 39.0488C95.353 39.049 97.2867 39.7399 97.8363 39.9546ZM103.883 50.6029C103.49 50.5577 103.317 50.5455 103.047 50.5455C100.924 50.5455 99.8482 51.2708 99.8482 52.703C99.8482 53.5846 100.373 54.1481 101.191 54.1481C102.718 54.148 103.819 52.7007 103.883 50.6029ZM106.61 56.919H103.504L103.575 55.4516C102.628 56.6109 101.363 57.1654 99.648 57.1654C97.6167 57.1654 96.2242 55.5857 96.2242 53.2918C96.2242 49.8389 98.6463 47.8263 102.803 47.8263C103.229 47.8263 103.773 47.8646 104.331 47.9357C104.446 47.468 104.477 47.2679 104.477 47.015C104.477 46.0751 103.825 45.7263 102.074 45.7263C100.241 45.7056 98.7288 46.1613 98.1071 46.3624C98.1463 46.1276 98.6271 43.1764 98.6271 43.1764C100.494 42.6291 101.726 42.4238 103.111 42.4238C106.331 42.4238 108.035 43.8634 108.031 46.5801C108.037 47.3116 107.916 48.2101 107.727 49.3902C107.404 51.4439 106.703 55.8482 106.61 56.919ZM64.2269 56.7042C63.2004 57.0259 62.4007 57.1654 61.5346 57.1654C59.6186 57.1654 58.573 56.069 58.573 54.0507C58.5465 53.4224 58.8494 51.7756 59.0875 50.2711C59.3029 48.9448 60.7117 40.5945 60.7117 40.5945H64.4361L64.0017 42.7415H65.9136L65.4048 46.1477H63.4865C63.0538 48.846 62.4359 52.2024 62.4296 52.6486C62.4296 53.382 62.8223 53.6985 63.7125 53.6985C64.1394 53.6985 64.4698 53.657 64.7229 53.566L64.2269 56.7042ZM75.6484 56.591C74.3696 56.9803 73.133 57.1679 71.8254 57.1654C67.6554 57.1614 65.4817 54.9928 65.4817 50.84C65.4817 45.9913 68.2471 42.424 72.0009 42.424C75.0721 42.424 77.0336 44.4211 77.0336 47.5559C77.0336 48.5963 76.899 49.6112 76.5755 51.0433H69.1573C68.9061 53.1001 70.2282 53.958 72.3952 53.958C73.7278 53.958 74.9313 53.6834 76.2677 53.0626L75.6484 56.591ZM73.5538 48.1823C73.5763 47.8878 73.9498 45.6514 71.8205 45.6514C70.6348 45.6514 69.7861 46.5546 69.4407 48.1823H73.5538ZM49.8192 47.2241C49.8192 49.0174 50.6927 50.2527 52.6734 51.1831C54.1909 51.8932 54.4257 52.1046 54.4257 52.7476C54.4257 53.6317 53.7559 54.0306 52.2744 54.0306C51.1557 54.0306 50.1157 53.8567 48.9154 53.4714C48.9154 53.4714 48.4242 56.5965 48.4019 56.7459C49.2519 56.9311 50.0123 57.1001 52.3007 57.1654C56.2559 57.1654 58.0813 55.6663 58.0813 52.4269C58.0813 50.4775 57.3177 49.3343 55.4394 48.4751C53.8688 47.7555 53.6871 47.5975 53.6871 46.9344C53.6871 46.1684 54.3111 45.7743 55.5219 45.7743C56.2567 45.7743 57.2615 45.8547 58.215 45.9897L58.7479 42.7C57.7784 42.5468 56.3073 42.424 55.4505 42.424C51.2575 42.424 49.8073 44.603 49.8192 47.2241ZM126.444 56.919H122.899L123.075 55.5991C122.047 56.6938 120.993 57.1654 119.62 57.1654C116.895 57.1654 115.095 54.8268 115.095 51.2819C115.095 46.5656 117.887 42.5897 121.193 42.5897C122.646 42.5897 123.747 43.181 124.77 44.5229L125.602 39.4852H129.298L126.444 56.919ZM120.916 53.6428C122.662 53.6428 123.887 51.6737 123.887 48.8646C123.887 47.0636 123.189 46.0863 121.902 46.0863C120.202 46.0863 118.995 48.0619 118.995 50.8496C118.995 52.7043 119.641 53.6428 120.916 53.6428ZM109.985 42.7415C109.516 47.1299 108.682 51.5749 108.031 55.9663L107.859 56.919H111.608C112.948 48.2493 113.273 46.5562 115.375 46.7683C115.71 44.994 116.333 43.4397 116.797 42.6553C115.228 42.3298 114.351 43.2131 113.204 44.891C113.294 44.1658 113.46 43.4613 113.427 42.7415H109.985ZM79.135 42.7415C78.6646 47.1299 77.8311 51.5749 77.1798 55.9663L77.0092 56.919H80.7592C82.098 48.2493 82.4219 46.5562 84.5225 46.7683C84.859 44.994 85.4825 43.4397 85.9455 42.6553C84.3775 42.3298 83.5002 43.2131 82.3536 44.891C82.444 44.1658 82.6084 43.4613 82.5771 42.7415H79.135ZM128.091 55.8091C128.091 55.1937 128.59 54.6985 129.205 54.6985C129.82 54.6979 130.319 55.1939 130.32 55.8063V55.8091C130.32 56.4219 129.821 56.9186 129.205 56.919C128.59 56.9186 128.091 56.4219 128.091 55.8091ZM129.205 56.6524C129.673 56.6526 130.052 56.2752 130.052 55.8097V55.8093C130.053 55.3434 129.674 54.9656 129.206 54.9652H129.205C128.737 54.9654 128.358 55.3432 128.357 55.8093C128.358 56.275 128.737 56.6524 129.205 56.6524ZM129.055 56.2944H128.826V55.3208H129.24C129.326 55.3208 129.415 55.3224 129.49 55.3695C129.57 55.4237 129.615 55.5163 129.615 55.6134C129.615 55.7235 129.55 55.8266 129.445 55.8656L129.626 56.2938H129.372L129.222 55.9093H129.055V56.2938V56.2944ZM129.055 55.7429H129.18C129.227 55.7429 129.279 55.7463 129.321 55.7237C129.358 55.6998 129.377 55.6546 129.377 55.6113C129.376 55.5711 129.355 55.534 129.322 55.511C129.283 55.4886 129.218 55.4947 129.175 55.4947H129.054L129.055 55.7429Z' fill='white'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='clip0_5173_115320'%3e%3crect width='150' height='95.7447' fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";
|
|
10762
10765
|
|
|
10763
|
-
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";
|
|
10766
|
+
var img$1 = "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";
|
|
10764
10767
|
|
|
10765
|
-
const styles$
|
|
10768
|
+
const styles$o = createStyles({
|
|
10766
10769
|
body: theme => ({
|
|
10767
10770
|
borderTop: `1px solid ${theme.palette.gray.light}`,
|
|
10768
10771
|
color: theme.palette.black,
|
|
@@ -10813,14 +10816,14 @@ const SettingsCard = ({
|
|
|
10813
10816
|
verticallyAligned
|
|
10814
10817
|
}) => {
|
|
10815
10818
|
return jsxRuntime.jsxs("div", Object.assign({
|
|
10816
|
-
css: verticallyAligned ? styles$
|
|
10819
|
+
css: verticallyAligned ? styles$o.verticalContainer : styles$o.container,
|
|
10817
10820
|
"data-testid": "settingsCard"
|
|
10818
10821
|
}, {
|
|
10819
10822
|
children: [jsxRuntime.jsxs("div", Object.assign({
|
|
10820
|
-
css: styles$
|
|
10823
|
+
css: styles$o.header
|
|
10821
10824
|
}, {
|
|
10822
10825
|
children: [jsxRuntime.jsxs("div", Object.assign({
|
|
10823
|
-
css: styles$
|
|
10826
|
+
css: styles$o.title
|
|
10824
10827
|
}, {
|
|
10825
10828
|
children: [typeof title === "string" ? jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
10826
10829
|
variant: "subtitle2"
|
|
@@ -10848,7 +10851,7 @@ const SettingsCard = ({
|
|
|
10848
10851
|
}))
|
|
10849
10852
|
}))]
|
|
10850
10853
|
})), children && jsxRuntime.jsx("div", Object.assign({
|
|
10851
|
-
css: styles$
|
|
10854
|
+
css: styles$o.body
|
|
10852
10855
|
}, {
|
|
10853
10856
|
children: jsxRuntime.jsxs("div", {
|
|
10854
10857
|
children: [children, accessoryAction && jsxRuntime.jsx(ButtonGroup, Object.assign({
|
|
@@ -10869,7 +10872,7 @@ const SettingsCard = ({
|
|
|
10869
10872
|
}));
|
|
10870
10873
|
};
|
|
10871
10874
|
|
|
10872
|
-
const styles$
|
|
10875
|
+
const styles$n = createStyles({
|
|
10873
10876
|
container: {
|
|
10874
10877
|
display: "flex",
|
|
10875
10878
|
height: "72px",
|
|
@@ -10892,14 +10895,14 @@ const WalletCard = ({
|
|
|
10892
10895
|
const provider = (_a = fundingSource === null || fundingSource === void 0 ? void 0 : fundingSource.paymentMethod.creditCardInfo) === null || _a === void 0 ? void 0 : _a.provider;
|
|
10893
10896
|
const last4 = (_b = fundingSource === null || fundingSource === void 0 ? void 0 : fundingSource.paymentMethod.creditCardInfo) === null || _b === void 0 ? void 0 : _b.cardNumberLastFour;
|
|
10894
10897
|
const logos = {
|
|
10895
|
-
americanExpress: img$
|
|
10896
|
-
discover: img$
|
|
10897
|
-
mastercard: img$
|
|
10898
|
-
visa: img
|
|
10898
|
+
americanExpress: img$4,
|
|
10899
|
+
discover: img$3,
|
|
10900
|
+
mastercard: img$2,
|
|
10901
|
+
visa: img$1
|
|
10899
10902
|
};
|
|
10900
10903
|
const Logo = provider ? logos[provider] : undefined;
|
|
10901
10904
|
return jsxRuntime.jsx("div", Object.assign({
|
|
10902
|
-
css: styles$
|
|
10905
|
+
css: styles$n.container
|
|
10903
10906
|
}, {
|
|
10904
10907
|
children: jsxRuntime.jsx(SettingsCard, {
|
|
10905
10908
|
cardAction: {
|
|
@@ -10913,7 +10916,7 @@ const WalletCard = ({
|
|
|
10913
10916
|
src: Logo,
|
|
10914
10917
|
width: 56
|
|
10915
10918
|
}) : jsxRuntime.jsx(giger.Icon, {
|
|
10916
|
-
css: styles$
|
|
10919
|
+
css: styles$n.icon,
|
|
10917
10920
|
name: gigerTheme.IconNames.CREDIT_CARD,
|
|
10918
10921
|
size: giger.IconSize.SIZE_LARGE
|
|
10919
10922
|
}), jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
@@ -11016,7 +11019,7 @@ var SvgShipengineLogo = function SvgShipengineLogo(props) {
|
|
|
11016
11019
|
})))));
|
|
11017
11020
|
};
|
|
11018
11021
|
|
|
11019
|
-
const styles$
|
|
11022
|
+
const styles$m = createStyles({
|
|
11020
11023
|
poweredByShipEngine: theme => ({
|
|
11021
11024
|
alignItems: "center",
|
|
11022
11025
|
color: theme.palette.gray.light,
|
|
@@ -11041,7 +11044,7 @@ const PoweredByShipEngine = () => {
|
|
|
11041
11044
|
t
|
|
11042
11045
|
} = reactI18next.useTranslation();
|
|
11043
11046
|
return jsxRuntime.jsxs("div", Object.assign({
|
|
11044
|
-
css: styles$
|
|
11047
|
+
css: styles$m.poweredByShipEngine
|
|
11045
11048
|
}, {
|
|
11046
11049
|
children: [jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
11047
11050
|
variant: "body2"
|
|
@@ -11096,9 +11099,9 @@ const StoryNotes = ({
|
|
|
11096
11099
|
}), children]
|
|
11097
11100
|
});
|
|
11098
11101
|
|
|
11099
|
-
const styles$
|
|
11102
|
+
const styles$l = createStyles({
|
|
11100
11103
|
container: theme => ({
|
|
11101
|
-
border:
|
|
11104
|
+
border: "1px solid #E4E5E7",
|
|
11102
11105
|
borderRadius: "4px",
|
|
11103
11106
|
display: "flex",
|
|
11104
11107
|
gap: theme.spacing(1),
|
|
@@ -11106,7 +11109,7 @@ const styles$h = createStyles({
|
|
|
11106
11109
|
width: "max-content"
|
|
11107
11110
|
}),
|
|
11108
11111
|
getTabStyles: selected => theme => ({
|
|
11109
|
-
backgroundColor: selected ?
|
|
11112
|
+
backgroundColor: selected ? "#E4E5E7" : "transparent",
|
|
11110
11113
|
border: "none",
|
|
11111
11114
|
borderRadius: "4px",
|
|
11112
11115
|
color: selected ? theme.palette.black : theme.palette.gray.main,
|
|
@@ -11123,12 +11126,12 @@ const Tabs = ({
|
|
|
11123
11126
|
selectedTab
|
|
11124
11127
|
}) => {
|
|
11125
11128
|
return jsxRuntime.jsx("div", Object.assign({
|
|
11126
|
-
css: styles$
|
|
11129
|
+
css: styles$l.container,
|
|
11127
11130
|
role: "tablist"
|
|
11128
11131
|
}, {
|
|
11129
11132
|
children: tabs.map(tab => jsxRuntime.jsx("button", Object.assign({
|
|
11130
11133
|
"aria-selected": selectedTab === tab ? "true" : "false",
|
|
11131
|
-
css: styles$
|
|
11134
|
+
css: styles$l.getTabStyles(selectedTab === tab),
|
|
11132
11135
|
onClick: e => {
|
|
11133
11136
|
e.preventDefault();
|
|
11134
11137
|
onSelectTab(tab);
|
|
@@ -11141,7 +11144,7 @@ const Tabs = ({
|
|
|
11141
11144
|
}));
|
|
11142
11145
|
};
|
|
11143
11146
|
|
|
11144
|
-
const styles$
|
|
11147
|
+
const styles$k = createStyles({
|
|
11145
11148
|
link: theme => ({
|
|
11146
11149
|
"&:visited": {
|
|
11147
11150
|
color: theme.palette.secondary.main
|
|
@@ -11180,10 +11183,10 @@ const DisplayCarrierTerms = props => {
|
|
|
11180
11183
|
const listCarrierLinks = () => {
|
|
11181
11184
|
return props.carrierTerms.links.map((term, index) => {
|
|
11182
11185
|
return jsxRuntime.jsx("li", Object.assign({
|
|
11183
|
-
css: styles$
|
|
11186
|
+
css: styles$k.listItems
|
|
11184
11187
|
}, {
|
|
11185
11188
|
children: jsxRuntime.jsx(giger.Link, Object.assign({
|
|
11186
|
-
css: styles$
|
|
11189
|
+
css: styles$k.link,
|
|
11187
11190
|
href: term.url,
|
|
11188
11191
|
isExternal: true,
|
|
11189
11192
|
target: "_blank"
|
|
@@ -11202,18 +11205,18 @@ const DisplayCarrierTerms = props => {
|
|
|
11202
11205
|
children: [jsxRuntime.jsx(Spacer, {
|
|
11203
11206
|
multiplier: 3
|
|
11204
11207
|
}), jsxRuntime.jsxs("div", Object.assign({
|
|
11205
|
-
css: styles$
|
|
11208
|
+
css: styles$k.terms
|
|
11206
11209
|
}, {
|
|
11207
11210
|
children: [jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
11208
11211
|
variant: "subtitle1"
|
|
11209
11212
|
}, {
|
|
11210
11213
|
children: props.carrierTerms.title
|
|
11211
11214
|
})), !!listCarrierContent().length && jsxRuntime.jsx("div", Object.assign({
|
|
11212
|
-
css: styles$
|
|
11215
|
+
css: styles$k.terms
|
|
11213
11216
|
}, {
|
|
11214
11217
|
children: listCarrierContent()
|
|
11215
11218
|
})), jsxRuntime.jsx("ul", Object.assign({
|
|
11216
|
-
css: styles$
|
|
11219
|
+
css: styles$k.links
|
|
11217
11220
|
}, {
|
|
11218
11221
|
children: listCarrierLinks()
|
|
11219
11222
|
}))]
|
|
@@ -11363,7 +11366,7 @@ const AddCarrierForm = ({
|
|
|
11363
11366
|
}));
|
|
11364
11367
|
};
|
|
11365
11368
|
|
|
11366
|
-
const styles$
|
|
11369
|
+
const styles$j = createStyles({
|
|
11367
11370
|
container: {
|
|
11368
11371
|
display: "flex",
|
|
11369
11372
|
flexDirection: "column"
|
|
@@ -11423,14 +11426,14 @@ const ListCarriersRow = ({
|
|
|
11423
11426
|
setIsSubmitting(false);
|
|
11424
11427
|
});
|
|
11425
11428
|
return jsxRuntime.jsxs("div", Object.assign({
|
|
11426
|
-
css: styles$
|
|
11429
|
+
css: styles$j.container,
|
|
11427
11430
|
"data-testid": "carrier-row"
|
|
11428
11431
|
}, {
|
|
11429
11432
|
children: [jsxRuntime.jsxs("div", Object.assign({
|
|
11430
|
-
css: styles$
|
|
11433
|
+
css: styles$j.rowContainer
|
|
11431
11434
|
}, {
|
|
11432
11435
|
children: [jsxRuntime.jsxs("div", Object.assign({
|
|
11433
|
-
css: styles$
|
|
11436
|
+
css: styles$j.logoContainer
|
|
11434
11437
|
}, {
|
|
11435
11438
|
children: [jsxRuntime.jsx("div", {
|
|
11436
11439
|
children: jsxRuntime.jsx("img", {
|
|
@@ -11448,7 +11451,7 @@ const ListCarriersRow = ({
|
|
|
11448
11451
|
css: _ref
|
|
11449
11452
|
}, {
|
|
11450
11453
|
children: jsxRuntime.jsx(LinkAction, {
|
|
11451
|
-
css: styles$
|
|
11454
|
+
css: styles$j.getConnectButton(isConnected),
|
|
11452
11455
|
isDisabled: isConnected || showDropDown,
|
|
11453
11456
|
isLoading: isSubmitting,
|
|
11454
11457
|
onClick: () => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -11466,7 +11469,7 @@ const ListCarriersRow = ({
|
|
|
11466
11469
|
}));
|
|
11467
11470
|
};
|
|
11468
11471
|
|
|
11469
|
-
const styles$
|
|
11472
|
+
const styles$i = createStyles({
|
|
11470
11473
|
carriersList: theme => ({
|
|
11471
11474
|
"& > li:not(:last-of-type)": {
|
|
11472
11475
|
borderBottom: `1px solid ${theme.palette.gray.light}`
|
|
@@ -11526,7 +11529,7 @@ const ListCarriers = ({
|
|
|
11526
11529
|
}))
|
|
11527
11530
|
})), jsxRuntime.jsx(Spacer, {})]
|
|
11528
11531
|
}), jsxRuntime.jsx("ul", Object.assign({
|
|
11529
|
-
css: styles$
|
|
11532
|
+
css: styles$i.carriersList,
|
|
11530
11533
|
"data-testid": "carriers-list"
|
|
11531
11534
|
}, {
|
|
11532
11535
|
children: isLoading ? jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
@@ -11548,11 +11551,11 @@ const ListCarriers = ({
|
|
|
11548
11551
|
};
|
|
11549
11552
|
const LoadingSkeletonRow = () => {
|
|
11550
11553
|
return jsxRuntime.jsxs("div", Object.assign({
|
|
11551
|
-
css: styles$
|
|
11554
|
+
css: styles$i.skeletonRow,
|
|
11552
11555
|
"data-testid": "skeleton-carrier-row"
|
|
11553
11556
|
}, {
|
|
11554
11557
|
children: [jsxRuntime.jsxs("div", Object.assign({
|
|
11555
|
-
css: styles$
|
|
11558
|
+
css: styles$i.skeletonLogoContainer
|
|
11556
11559
|
}, {
|
|
11557
11560
|
children: [jsxRuntime.jsx(giger.Skeleton, {
|
|
11558
11561
|
animation: giger.SkeletonAnimation.WAVE,
|
|
@@ -11897,7 +11900,7 @@ const WarehouseForm = ({
|
|
|
11897
11900
|
}));
|
|
11898
11901
|
};
|
|
11899
11902
|
|
|
11900
|
-
const styles$
|
|
11903
|
+
const styles$h = createStyles({
|
|
11901
11904
|
cardSpacing: theme => ({
|
|
11902
11905
|
display: "flex",
|
|
11903
11906
|
flexDirection: "column",
|
|
@@ -11927,9 +11930,9 @@ const ManageWarehouses = ({
|
|
|
11927
11930
|
const [showAddNewWarehouseForm, toggleShowAddNewWarehouseForm] = useToggle(false);
|
|
11928
11931
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
11929
11932
|
children: [showAddNewWarehouseForm ? jsxRuntime.jsx(AddressPreferenceProvider, Object.assign({
|
|
11930
|
-
css: styles$
|
|
11933
|
+
css: styles$h.well,
|
|
11931
11934
|
formHeader: jsxRuntime.jsxs("div", Object.assign({
|
|
11932
|
-
css: styles$
|
|
11935
|
+
css: styles$h.header
|
|
11933
11936
|
}, {
|
|
11934
11937
|
children: [jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
11935
11938
|
variant: "subtitle1"
|
|
@@ -11974,14 +11977,14 @@ const ManageWarehouses = ({
|
|
|
11974
11977
|
})]
|
|
11975
11978
|
}))
|
|
11976
11979
|
})), jsxRuntime.jsx("div", Object.assign({
|
|
11977
|
-
css: styles$
|
|
11980
|
+
css: styles$h.cardSpacing
|
|
11978
11981
|
}, {
|
|
11979
11982
|
children: warehouses.map(warehouse => {
|
|
11980
11983
|
if (editWarehouseId && editWarehouseId === warehouse.warehouseId) {
|
|
11981
11984
|
return jsxRuntime.jsx(AddressPreferenceProvider, Object.assign({
|
|
11982
|
-
css: styles$
|
|
11985
|
+
css: styles$h.well,
|
|
11983
11986
|
formHeader: jsxRuntime.jsxs("div", Object.assign({
|
|
11984
|
-
css: styles$
|
|
11987
|
+
css: styles$h.header
|
|
11985
11988
|
}, {
|
|
11986
11989
|
children: [jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
11987
11990
|
variant: "subtitle1"
|
|
@@ -12146,64 +12149,876 @@ var manageWarehouses$1 = /*#__PURE__*/Object.freeze({
|
|
|
12146
12149
|
Component: Component$6
|
|
12147
12150
|
});
|
|
12148
12151
|
|
|
12149
|
-
|
|
12150
|
-
|
|
12151
|
-
|
|
12152
|
-
|
|
12153
|
-
|
|
12154
|
-
|
|
12155
|
-
|
|
12156
|
-
|
|
12157
|
-
|
|
12158
|
-
|
|
12159
|
-
type: giger.NotificationType.INFO
|
|
12160
|
-
}, {
|
|
12161
|
-
children: t("manage-defaults:label.purchase.description")
|
|
12162
|
-
})), jsxRuntime.jsx(Spacer, {
|
|
12163
|
-
multiplier: 1.5
|
|
12164
|
-
}), jsxRuntime.jsxs(giger.RadioGroup, Object.assign({
|
|
12165
|
-
name: "labelLayout",
|
|
12166
|
-
onChange: e => {
|
|
12167
|
-
setLayout(e.target.value);
|
|
12168
|
-
onChange(e.target.value);
|
|
12169
|
-
},
|
|
12170
|
-
value: layout
|
|
12171
|
-
}, {
|
|
12172
|
-
children: [jsxRuntime.jsx(giger.Radio, Object.assign({
|
|
12173
|
-
value: "Letter"
|
|
12174
|
-
}, {
|
|
12175
|
-
children: jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
12176
|
-
bold: true
|
|
12177
|
-
}, {
|
|
12178
|
-
children: t("manage-defaults:label.letter.title")
|
|
12179
|
-
}))
|
|
12180
|
-
})), jsxRuntime.jsx(Spacer, {
|
|
12181
|
-
multiplier: 3
|
|
12182
|
-
}), jsxRuntime.jsx(giger.Radio, Object.assign({
|
|
12183
|
-
value: "4x6"
|
|
12184
|
-
}, {
|
|
12185
|
-
children: jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
12186
|
-
bold: true
|
|
12187
|
-
}, {
|
|
12188
|
-
children: t("manage-defaults:label.thermal.title")
|
|
12189
|
-
}))
|
|
12190
|
-
}))]
|
|
12191
|
-
}))]
|
|
12192
|
-
});
|
|
12193
|
-
};
|
|
12152
|
+
var $$6 = _export;
|
|
12153
|
+
var DESCRIPTORS$1 = descriptors;
|
|
12154
|
+
var global$8 = global$p;
|
|
12155
|
+
var uncurryThis$1 = functionUncurryThis;
|
|
12156
|
+
var hasOwn$1 = hasOwnProperty_1;
|
|
12157
|
+
var isCallable$4 = isCallable$o;
|
|
12158
|
+
var isPrototypeOf$1 = objectIsPrototypeOf;
|
|
12159
|
+
var toString = toString$c;
|
|
12160
|
+
var defineProperty = objectDefineProperty.f;
|
|
12161
|
+
var copyConstructorProperties = copyConstructorProperties$2;
|
|
12194
12162
|
|
|
12195
|
-
|
|
12196
|
-
|
|
12197
|
-
|
|
12198
|
-
|
|
12199
|
-
|
|
12200
|
-
|
|
12201
|
-
|
|
12202
|
-
|
|
12203
|
-
|
|
12204
|
-
|
|
12205
|
-
|
|
12206
|
-
|
|
12163
|
+
var NativeSymbol = global$8.Symbol;
|
|
12164
|
+
var SymbolPrototype = NativeSymbol && NativeSymbol.prototype;
|
|
12165
|
+
|
|
12166
|
+
if (DESCRIPTORS$1 && isCallable$4(NativeSymbol) && (!('description' in SymbolPrototype) ||
|
|
12167
|
+
// Safari 12 bug
|
|
12168
|
+
NativeSymbol().description !== undefined
|
|
12169
|
+
)) {
|
|
12170
|
+
var EmptyStringDescriptionStore = {};
|
|
12171
|
+
// wrap Symbol constructor for correct work with undefined description
|
|
12172
|
+
var SymbolWrapper = function Symbol() {
|
|
12173
|
+
var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString(arguments[0]);
|
|
12174
|
+
var result = isPrototypeOf$1(SymbolPrototype, this)
|
|
12175
|
+
? new NativeSymbol(description)
|
|
12176
|
+
// in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
|
|
12177
|
+
: description === undefined ? NativeSymbol() : NativeSymbol(description);
|
|
12178
|
+
if (description === '') EmptyStringDescriptionStore[result] = true;
|
|
12179
|
+
return result;
|
|
12180
|
+
};
|
|
12181
|
+
|
|
12182
|
+
copyConstructorProperties(SymbolWrapper, NativeSymbol);
|
|
12183
|
+
SymbolWrapper.prototype = SymbolPrototype;
|
|
12184
|
+
SymbolPrototype.constructor = SymbolWrapper;
|
|
12185
|
+
|
|
12186
|
+
var NATIVE_SYMBOL = String(NativeSymbol('test')) == 'Symbol(test)';
|
|
12187
|
+
var thisSymbolValue = uncurryThis$1(SymbolPrototype.valueOf);
|
|
12188
|
+
var symbolDescriptiveString = uncurryThis$1(SymbolPrototype.toString);
|
|
12189
|
+
var regexp = /^Symbol\((.*)\)[^)]+$/;
|
|
12190
|
+
var replace = uncurryThis$1(''.replace);
|
|
12191
|
+
var stringSlice = uncurryThis$1(''.slice);
|
|
12192
|
+
|
|
12193
|
+
defineProperty(SymbolPrototype, 'description', {
|
|
12194
|
+
configurable: true,
|
|
12195
|
+
get: function description() {
|
|
12196
|
+
var symbol = thisSymbolValue(this);
|
|
12197
|
+
if (hasOwn$1(EmptyStringDescriptionStore, symbol)) return '';
|
|
12198
|
+
var string = symbolDescriptiveString(symbol);
|
|
12199
|
+
var desc = NATIVE_SYMBOL ? stringSlice(string, 7, -1) : replace(string, regexp, '$1');
|
|
12200
|
+
return desc === '' ? undefined : desc;
|
|
12201
|
+
}
|
|
12202
|
+
});
|
|
12203
|
+
|
|
12204
|
+
$$6({ global: true, constructor: true, forced: true }, {
|
|
12205
|
+
Symbol: SymbolWrapper
|
|
12206
|
+
});
|
|
12207
|
+
}
|
|
12208
|
+
|
|
12209
|
+
var img = "data:image/svg+xml,%3csvg fill='none' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M22.9425 6.62223L18.63 5.81973C18.4275 5.78223 18.2325 5.91723 18.195 6.11973L17.3925 10.4322C17.355 10.6347 17.49 10.8297 17.6925 10.8672C17.715 10.8672 17.7375 10.8672 17.76 10.8672C17.94 10.8672 18.0975 10.7397 18.1275 10.5597L18.765 7.13973C21.15 10.3872 20.8125 14.9472 17.9475 17.8047C15.3225 20.4297 11.25 20.9697 8.04001 19.1247C7.86001 19.0197 7.63501 19.0797 7.53001 19.2597C7.42501 19.4397 7.49251 19.6647 7.66501 19.7697C9.05251 20.5722 10.5975 20.9622 12.1275 20.9622C14.4525 20.9622 16.755 20.0622 18.48 18.3372C21.5925 15.2247 21.9675 10.2597 19.3875 6.71973L22.8 7.34973C22.995 7.38723 23.1975 7.25223 23.235 7.04973C23.2725 6.84723 23.1375 6.65223 22.935 6.61473L22.9425 6.62223Z' fill='black' /%3e %3cpath d='M6.30022 12.7798C6.09772 12.7423 5.90272 12.8773 5.86522 13.0798L5.24272 16.4548C3.15022 13.2223 3.60022 8.91728 6.33022 6.18728C8.85022 3.66728 12.6752 3.05228 15.8477 4.65728C16.0277 4.74728 16.2602 4.67978 16.3502 4.49228C16.4402 4.30478 16.3727 4.07978 16.1852 3.98978C12.7202 2.23478 8.54272 2.90978 5.79772 5.65478C2.79022 8.66228 2.31772 13.3948 4.65022 16.9273L1.19272 16.2898C0.990221 16.2523 0.795221 16.3873 0.757721 16.5898C0.720221 16.7923 0.855221 16.9873 1.05772 17.0248L5.37022 17.8273C5.37022 17.8273 5.41522 17.8273 5.43772 17.8273C5.61772 17.8273 5.77522 17.6998 5.80522 17.5198L6.60772 13.2073C6.64522 13.0048 6.51022 12.8098 6.30772 12.7723L6.30022 12.7798Z' fill='black' /%3e %3cpath d='M15.0824 13.2223C14.9249 12.9373 14.7224 12.6973 14.4674 12.4948C14.2124 12.2998 13.9349 12.1348 13.6274 11.9998C13.3199 11.8648 13.0124 11.7598 12.7124 11.6773L12.3149 11.5648V7.87482C12.8324 7.91232 13.2749 8.06232 13.6349 8.33232C14.0549 8.64732 14.2874 9.07482 14.3399 9.60732H15.1874C15.1724 9.11982 15.0224 8.68482 14.7524 8.30232C14.4824 7.91982 14.1149 7.61982 13.6574 7.40232C13.2599 7.21482 12.8099 7.12482 12.3149 7.09482V6.31482C12.3149 6.14232 12.1799 6.00732 12.0074 6.00732C11.8349 6.00732 11.6999 6.14232 11.6999 6.31482V7.10982C11.2649 7.14732 10.8449 7.22982 10.4774 7.40232C10.0049 7.61982 9.62988 7.92732 9.35238 8.31732C9.07488 8.70732 8.93988 9.16482 8.93988 9.67482C8.93988 10.2898 9.14988 10.7998 9.56238 11.1898C9.97488 11.5798 10.5599 11.8948 11.3174 12.1198L11.6999 12.2323V16.1323C11.3849 16.1098 11.0849 16.0573 10.8224 15.9523C10.4699 15.8173 10.1849 15.6148 9.96738 15.3523C9.74988 15.0898 9.62238 14.7673 9.59238 14.3923V14.3323C9.59238 14.0848 9.38988 13.8823 9.14238 13.8823C8.89488 13.8823 8.69238 14.0848 8.69238 14.3323V14.3923C8.72988 14.8948 8.87988 15.3448 9.15738 15.7273C9.43488 16.1098 9.80988 16.4098 10.2899 16.6273C10.6949 16.8073 11.1749 16.8973 11.6999 16.9273V17.6848C11.6999 17.8573 11.8349 17.9923 12.0074 17.9923C12.1799 17.9923 12.3149 17.8573 12.3149 17.6848V16.9348C12.8699 16.9048 13.3574 16.7923 13.7774 16.5898C14.2724 16.3498 14.6549 16.0273 14.9174 15.6148C15.1799 15.2023 15.3149 14.7448 15.3149 14.2348C15.3149 13.8373 15.2399 13.4923 15.0824 13.2073V13.2223ZM11.0099 11.1448C10.7849 11.0473 10.5749 10.9348 10.3949 10.7923C10.2074 10.6573 10.0574 10.4923 9.95238 10.3048C9.84738 10.1173 9.78738 9.89232 9.78738 9.63732C9.78738 9.29232 9.88488 8.98482 10.0724 8.71482C10.2674 8.44482 10.5299 8.23482 10.8674 8.07732C11.1149 7.96482 11.3924 7.91232 11.6924 7.88232V11.3848C11.4599 11.3173 11.2349 11.2348 11.0024 11.1373L11.0099 11.1448ZM14.1449 15.2473C13.9274 15.5398 13.6349 15.7648 13.2674 15.9223C12.9824 16.0423 12.6599 16.1023 12.3149 16.1323V12.4198L12.4649 12.4648C12.8624 12.5773 13.2074 12.7123 13.5149 12.8623C13.8149 13.0123 14.0549 13.1998 14.2199 13.4173C14.3849 13.6348 14.4749 13.9123 14.4749 14.2348C14.4749 14.6173 14.3699 14.9548 14.1524 15.2473H14.1449Z' fill='black' /%3e %3cpath d='M14.7525 10.0796C14.985 10.0796 15.1725 9.89211 15.1725 9.65961V9.59961H14.3325V9.65961C14.3325 9.89211 14.52 10.0796 14.7525 10.0796Z' fill='black' /%3e%3c/svg%3e";
|
|
12210
|
+
|
|
12211
|
+
const styles$g = ({
|
|
12212
|
+
variant,
|
|
12213
|
+
spacing
|
|
12214
|
+
}) => createStyles({
|
|
12215
|
+
labelContainer: theme => ({
|
|
12216
|
+
alignItems: "center",
|
|
12217
|
+
display: "flex",
|
|
12218
|
+
flexDirection: variant === "subtitle" ? "column" : variant === "inline" ? "row" : "row-reverse",
|
|
12219
|
+
gap: typeof spacing === "number" ? theme.spacing(spacing) : theme.spacing(1),
|
|
12220
|
+
justifyContent: typeof spacing === "string" && spacing === "spread" ? "space-between;" : "flex-start"
|
|
12221
|
+
})
|
|
12222
|
+
});
|
|
12223
|
+
|
|
12224
|
+
const Label$1 = ({
|
|
12225
|
+
spacing,
|
|
12226
|
+
children,
|
|
12227
|
+
text,
|
|
12228
|
+
textProps,
|
|
12229
|
+
variant
|
|
12230
|
+
}) => {
|
|
12231
|
+
return jsxRuntime.jsxs("div", Object.assign({
|
|
12232
|
+
css: styles$g({
|
|
12233
|
+
spacing,
|
|
12234
|
+
variant
|
|
12235
|
+
}).labelContainer
|
|
12236
|
+
}, {
|
|
12237
|
+
children: [jsxRuntime.jsx(giger.Typography, Object.assign({}, textProps, {
|
|
12238
|
+
children: text
|
|
12239
|
+
})), children]
|
|
12240
|
+
}));
|
|
12241
|
+
};
|
|
12242
|
+
|
|
12243
|
+
const styles$f = createStyles({
|
|
12244
|
+
chevronTypography: theme => ({
|
|
12245
|
+
color: theme.palette.secondary.main
|
|
12246
|
+
}),
|
|
12247
|
+
detailsBottomContainer: theme => ({
|
|
12248
|
+
backgroundColor: theme.palette.white,
|
|
12249
|
+
padding: "8px"
|
|
12250
|
+
}),
|
|
12251
|
+
detailsRow: {
|
|
12252
|
+
display: "flex",
|
|
12253
|
+
justifyContent: "space-between"
|
|
12254
|
+
},
|
|
12255
|
+
detailsTypography: theme => ({
|
|
12256
|
+
color: theme.palette.black
|
|
12257
|
+
}),
|
|
12258
|
+
headingContainer: {
|
|
12259
|
+
alignItems: "center",
|
|
12260
|
+
display: "flex",
|
|
12261
|
+
justifyContent: "space-between"
|
|
12262
|
+
},
|
|
12263
|
+
loadingStateContainer: theme => ({
|
|
12264
|
+
display: "flex",
|
|
12265
|
+
flexDirection: "column",
|
|
12266
|
+
rowGap: theme.spacing(2)
|
|
12267
|
+
})
|
|
12268
|
+
});
|
|
12269
|
+
|
|
12270
|
+
// TODO: Uncomment the following code once we have a way to get the original shipment info for adjustments
|
|
12271
|
+
// const LoadingState = () => (
|
|
12272
|
+
// <div css={styles.loadingStateContainer}>
|
|
12273
|
+
// {[200, 160, 200].map((leftSkeletonWidth, index) => (
|
|
12274
|
+
// <Spread key={`spread-${index}`}>
|
|
12275
|
+
// <Skeleton
|
|
12276
|
+
// animation={SkeletonAnimation.WAVE}
|
|
12277
|
+
// height={24}
|
|
12278
|
+
// variant={SkeletonVariant.RECT}
|
|
12279
|
+
// width={leftSkeletonWidth}
|
|
12280
|
+
// />
|
|
12281
|
+
//
|
|
12282
|
+
// <Skeleton
|
|
12283
|
+
// animation={SkeletonAnimation.WAVE}
|
|
12284
|
+
// height={24}
|
|
12285
|
+
// variant={SkeletonVariant.RECT}
|
|
12286
|
+
// width={80}
|
|
12287
|
+
// />
|
|
12288
|
+
// </Spread>
|
|
12289
|
+
// ))}
|
|
12290
|
+
// </div>
|
|
12291
|
+
// );
|
|
12292
|
+
//
|
|
12293
|
+
// const ErrorState = () => <ErrorDisplay />;
|
|
12294
|
+
//
|
|
12295
|
+
// // replace type call with its alchemy version - lmnt-936
|
|
12296
|
+
// const SuccessState = ({ adjustment }: { adjustment: WalletAdjustment }) => {
|
|
12297
|
+
// const commonStylingProps: {
|
|
12298
|
+
// spacing: LabelProps["spacing"];
|
|
12299
|
+
// textProps: LabelProps["textProps"];
|
|
12300
|
+
// variant: LabelProps["variant"];
|
|
12301
|
+
// } = {
|
|
12302
|
+
// spacing: "spread",
|
|
12303
|
+
// textProps: { css: styles.detailsTypography, variant: "body2" },
|
|
12304
|
+
// variant: "inline",
|
|
12305
|
+
// };
|
|
12306
|
+
//
|
|
12307
|
+
// const { adjustmentId, originalShipment, actualShipment, trackingNumber } = adjustment;
|
|
12308
|
+
//
|
|
12309
|
+
// return (
|
|
12310
|
+
// <div>
|
|
12311
|
+
// <div>
|
|
12312
|
+
// <Label text="Original Weight" {...commonStylingProps}>
|
|
12313
|
+
// <Typography css={styles.detailsTypography} variant="body2">
|
|
12314
|
+
// {`${originalShipment.weight.value} ${originalShipment.weight.unit}.`}
|
|
12315
|
+
// </Typography>
|
|
12316
|
+
// </Label>
|
|
12317
|
+
//
|
|
12318
|
+
// <Label text="Actual Weight" {...commonStylingProps}>
|
|
12319
|
+
// <Typography css={styles.detailsTypography} variant="body2">
|
|
12320
|
+
// {`${actualShipment.weight.value} ${actualShipment.weight.unit}.`}
|
|
12321
|
+
// </Typography>
|
|
12322
|
+
// </Label>
|
|
12323
|
+
//
|
|
12324
|
+
// <Spacer multiplier={2} />
|
|
12325
|
+
//
|
|
12326
|
+
// <Label text="Adjustment ID" {...commonStylingProps}>
|
|
12327
|
+
// <Typography css={styles.detailsTypography} variant="body2">
|
|
12328
|
+
// {adjustmentId}
|
|
12329
|
+
// </Typography>
|
|
12330
|
+
// </Label>
|
|
12331
|
+
//
|
|
12332
|
+
// <Label text="Tracking Number" {...commonStylingProps}>
|
|
12333
|
+
// <Typography css={styles.detailsTypography} variant="body2">
|
|
12334
|
+
// {trackingNumber}
|
|
12335
|
+
// </Typography>
|
|
12336
|
+
// </Label>
|
|
12337
|
+
// </div>
|
|
12338
|
+
//
|
|
12339
|
+
// <Spacer multiplier={2} />
|
|
12340
|
+
//
|
|
12341
|
+
// <div css={styles.detailsBottomContainer}>
|
|
12342
|
+
// <Label text="Quoted Amount" {...commonStylingProps}>
|
|
12343
|
+
// <Typography css={styles.detailsTypography} variant="body2">
|
|
12344
|
+
// $10.00
|
|
12345
|
+
// </Typography>
|
|
12346
|
+
// </Label>
|
|
12347
|
+
//
|
|
12348
|
+
// <Label text="Amount Paid" {...commonStylingProps}>
|
|
12349
|
+
// <Typography css={styles.detailsTypography} variant="body2">
|
|
12350
|
+
// $9.00
|
|
12351
|
+
// </Typography>
|
|
12352
|
+
// </Label>
|
|
12353
|
+
//
|
|
12354
|
+
// <Label text="Adjustment" {...commonStylingProps}>
|
|
12355
|
+
// <Typography css={styles.detailsTypography} variant="body2">
|
|
12356
|
+
// +$1.00
|
|
12357
|
+
// </Typography>
|
|
12358
|
+
// </Label>
|
|
12359
|
+
// </div>
|
|
12360
|
+
// </div>
|
|
12361
|
+
// );
|
|
12362
|
+
// };
|
|
12363
|
+
const HistoryCardExtension = ({
|
|
12364
|
+
transactionDetails
|
|
12365
|
+
}) => {
|
|
12366
|
+
const {
|
|
12367
|
+
t
|
|
12368
|
+
} = reactI18next.useTranslation();
|
|
12369
|
+
const [isOpen, setIsOpen] = React.useState(false);
|
|
12370
|
+
return jsxRuntime.jsxs("div", {
|
|
12371
|
+
children: [jsxRuntime.jsx(Spacer, {
|
|
12372
|
+
multiplier: 2
|
|
12373
|
+
}), jsxRuntime.jsx(giger.Divider, {}), jsxRuntime.jsx(Spacer, {
|
|
12374
|
+
multiplier: 1
|
|
12375
|
+
}), jsxRuntime.jsxs("div", {
|
|
12376
|
+
children: [jsxRuntime.jsxs("div", Object.assign({
|
|
12377
|
+
css: styles$f.headingContainer
|
|
12378
|
+
}, {
|
|
12379
|
+
children: [jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
12380
|
+
css: styles$f.detailsTypography,
|
|
12381
|
+
variant: "body2"
|
|
12382
|
+
}, {
|
|
12383
|
+
children: t("wallet-history:details.inaccurateWeight")
|
|
12384
|
+
})), jsxRuntime.jsx("div", Object.assign({
|
|
12385
|
+
onClick: () => setIsOpen(!isOpen)
|
|
12386
|
+
}, {
|
|
12387
|
+
children: isOpen ? jsxRuntime.jsx(giger.Icon, {
|
|
12388
|
+
css: styles$f.chevronTypography,
|
|
12389
|
+
name: gigerTheme.IconNames.CHEVRON_TOP
|
|
12390
|
+
}) : jsxRuntime.jsx(giger.Icon, {
|
|
12391
|
+
css: styles$f.chevronTypography,
|
|
12392
|
+
name: gigerTheme.IconNames.CHEVRON_BOTTOM
|
|
12393
|
+
})
|
|
12394
|
+
}))]
|
|
12395
|
+
})), isOpen && jsxRuntime.jsx(Spacer, {
|
|
12396
|
+
multiplier: 1
|
|
12397
|
+
}), isOpen && jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
12398
|
+
css: styles$f.detailsTypography,
|
|
12399
|
+
variant: "body2"
|
|
12400
|
+
}, {
|
|
12401
|
+
children: transactionDetails
|
|
12402
|
+
}))]
|
|
12403
|
+
})]
|
|
12404
|
+
});
|
|
12405
|
+
};
|
|
12406
|
+
|
|
12407
|
+
const styles$e = createStyles({
|
|
12408
|
+
balanceTypography: theme => ({
|
|
12409
|
+
color: theme.palette.gray.main,
|
|
12410
|
+
marginLeft: "auto"
|
|
12411
|
+
}),
|
|
12412
|
+
cardColumn: theme => ({
|
|
12413
|
+
"&:last-child": {
|
|
12414
|
+
alignItems: "flex-end"
|
|
12415
|
+
},
|
|
12416
|
+
alignItems: "flex-start",
|
|
12417
|
+
display: "flex",
|
|
12418
|
+
flexDirection: "column",
|
|
12419
|
+
justifyContent: "space-between",
|
|
12420
|
+
rowGap: `${theme.spacing(1)}px`
|
|
12421
|
+
}),
|
|
12422
|
+
cardContainer: theme => ({
|
|
12423
|
+
display: "flex",
|
|
12424
|
+
justifyContent: "space-between"
|
|
12425
|
+
// padding: `${theme.spacing(2)}px ${theme.spacing(2)}px`,
|
|
12426
|
+
}),
|
|
12427
|
+
|
|
12428
|
+
carrierTypography: theme => ({
|
|
12429
|
+
color: theme.palette.black,
|
|
12430
|
+
fontSize: theme.typography.fontSize.M,
|
|
12431
|
+
fontWeight: 500
|
|
12432
|
+
}),
|
|
12433
|
+
dateTypography: theme => ({
|
|
12434
|
+
color: theme.palette.black
|
|
12435
|
+
}),
|
|
12436
|
+
getAmountTypography: isReload => theme => ({
|
|
12437
|
+
color: isReload ? theme.palette.success.main : theme.palette.black,
|
|
12438
|
+
fontSize: "16px",
|
|
12439
|
+
marginLeft: "auto"
|
|
12440
|
+
}),
|
|
12441
|
+
getTransactionTypeTypography: transactionType => theme => ({
|
|
12442
|
+
color: transactionType === "reload" ? theme.palette.success.main : transactionType === "adjustment" ? theme.palette.alert.main : theme.palette.black,
|
|
12443
|
+
textTransform: "capitalize"
|
|
12444
|
+
}),
|
|
12445
|
+
transactionDetails: theme => ({
|
|
12446
|
+
alignItems: "center",
|
|
12447
|
+
columnGap: theme.spacing(1),
|
|
12448
|
+
display: "flex"
|
|
12449
|
+
})
|
|
12450
|
+
});
|
|
12451
|
+
|
|
12452
|
+
const HistoryCard = ({
|
|
12453
|
+
carrier,
|
|
12454
|
+
transaction
|
|
12455
|
+
}) => {
|
|
12456
|
+
const {
|
|
12457
|
+
transactionCategory,
|
|
12458
|
+
transactionDate,
|
|
12459
|
+
transactionAmount,
|
|
12460
|
+
endingBalance,
|
|
12461
|
+
description: transactionDescription
|
|
12462
|
+
} = transaction;
|
|
12463
|
+
const deriveCurrencySymbol = currency => {
|
|
12464
|
+
if (["USD", "usd"].includes(currency)) return "$";
|
|
12465
|
+
if (["EUR", "eur"].includes(currency)) return "€";
|
|
12466
|
+
if (["GBP", "gbp"].includes(currency)) return "£";
|
|
12467
|
+
return "¤";
|
|
12468
|
+
};
|
|
12469
|
+
/**
|
|
12470
|
+
* This function derives the transaction with currency symbol as a string. All this logic below
|
|
12471
|
+
* is needed because the transaction history endpoint returns a minus symbol along with the
|
|
12472
|
+
* value that was deducted from the users balance. However, this is not the case for a value that
|
|
12473
|
+
* was added to the balance (e.g. the shipper paid too much for their shipment), where we would
|
|
12474
|
+
* expect that a plus sign was sent along with the value adjusted on the account.
|
|
12475
|
+
*
|
|
12476
|
+
* The following logic ensures that the correct mathematical symbol is displayed for each transaction
|
|
12477
|
+
* per the figma designs for this view. _If only we could get a plus symbol from the API when
|
|
12478
|
+
* an additive operation is performed on the users balance_.
|
|
12479
|
+
*
|
|
12480
|
+
* Example usage:
|
|
12481
|
+
*
|
|
12482
|
+
* ```typescript
|
|
12483
|
+
* const moneyAsString = deriveTransactionSymbolWithAmount("adjustment", { amount: 15, currency: "USD" });
|
|
12484
|
+
*
|
|
12485
|
+
* => "+$15.00"
|
|
12486
|
+
*
|
|
12487
|
+
* OR
|
|
12488
|
+
*
|
|
12489
|
+
* const moneyAsString = deriveTransactionSymbolWithAmount("funds_added", { amount: -55, currency: "GBP" });
|
|
12490
|
+
*
|
|
12491
|
+
* => "-£55.00"
|
|
12492
|
+
*
|
|
12493
|
+
* ```
|
|
12494
|
+
*/
|
|
12495
|
+
const deriveTransactionSymbolWithAmount = (category, transactionAmount) => {
|
|
12496
|
+
const transactionFirstChar = transactionAmount.amount.toFixed(2).charAt(0);
|
|
12497
|
+
const transactionSymbol = transactionFirstChar === "-" || transactionFirstChar === "+" ? transactionFirstChar : "";
|
|
12498
|
+
const amountTrimmedOfSymbol = transactionAmount.amount.toFixed(2).replace("-", "");
|
|
12499
|
+
const localizedCurrency = deriveCurrencySymbol(transactionAmount.currency);
|
|
12500
|
+
const withDynamicMathematicalSymbol = `${transactionSymbol}${localizedCurrency}${amountTrimmedOfSymbol}`;
|
|
12501
|
+
const withStaticMathematicalSymbol = `${localizedCurrency}${amountTrimmedOfSymbol}`;
|
|
12502
|
+
if (["adjustment", "unknown"].includes(category)) {
|
|
12503
|
+
return !["-", "+"].includes(transactionSymbol) ? `+${withDynamicMathematicalSymbol}` : withDynamicMathematicalSymbol;
|
|
12504
|
+
}
|
|
12505
|
+
if (["credit", "funds_added", "refund"].includes(category)) return `+${withStaticMathematicalSymbol}`;
|
|
12506
|
+
if (["debit", "insurance", "label", "service_charge"].includes(category)) return `-${withStaticMathematicalSymbol}`;
|
|
12507
|
+
return null;
|
|
12508
|
+
};
|
|
12509
|
+
return (
|
|
12510
|
+
// Note: div wrapper with padding to be removed with the implementation of Card UI Component
|
|
12511
|
+
jsxRuntime.jsxs("div", Object.assign({
|
|
12512
|
+
css: {
|
|
12513
|
+
padding: "16px"
|
|
12514
|
+
}
|
|
12515
|
+
}, {
|
|
12516
|
+
children: [jsxRuntime.jsxs("div", Object.assign({
|
|
12517
|
+
css: styles$e.cardContainer
|
|
12518
|
+
}, {
|
|
12519
|
+
children: [jsxRuntime.jsxs("div", Object.assign({
|
|
12520
|
+
css: styles$e.cardColumn
|
|
12521
|
+
}, {
|
|
12522
|
+
children: [jsxRuntime.jsx(Label$1, Object.assign({
|
|
12523
|
+
text: transactionCategory === "funds_added" ? "Balance Funded" : carrier,
|
|
12524
|
+
textProps: {
|
|
12525
|
+
css: styles$e.carrierTypography
|
|
12526
|
+
},
|
|
12527
|
+
variant: "inline-right"
|
|
12528
|
+
}, {
|
|
12529
|
+
children: transactionCategory === "funds_added" ? jsxRuntime.jsx("img", {
|
|
12530
|
+
alt: "refund logo",
|
|
12531
|
+
height: 24,
|
|
12532
|
+
src: img,
|
|
12533
|
+
width: 24
|
|
12534
|
+
}) : jsxRuntime.jsx("img", {
|
|
12535
|
+
alt: "carrier logo",
|
|
12536
|
+
height: 24,
|
|
12537
|
+
src: `https://logos.shipstation.com/ipaas/carriers/${overrideCarrierCodes$1(carrier, {
|
|
12538
|
+
DHL: "dhl_express",
|
|
12539
|
+
FedEx: "fedex",
|
|
12540
|
+
UPS: "ups",
|
|
12541
|
+
USPS: "stamps_com_wl"
|
|
12542
|
+
})}/icon.svg`,
|
|
12543
|
+
width: 24
|
|
12544
|
+
})
|
|
12545
|
+
})), jsxRuntime.jsxs("div", Object.assign({
|
|
12546
|
+
css: styles$e.transactionDetails
|
|
12547
|
+
}, {
|
|
12548
|
+
children: [jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
12549
|
+
css: styles$e.dateTypography,
|
|
12550
|
+
variant: "body2"
|
|
12551
|
+
}, {
|
|
12552
|
+
children: new Date(transactionDate).toLocaleDateString("en-US", {
|
|
12553
|
+
day: "numeric",
|
|
12554
|
+
month: "2-digit",
|
|
12555
|
+
year: "2-digit"
|
|
12556
|
+
})
|
|
12557
|
+
})), jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
12558
|
+
css: styles$e.getTransactionTypeTypography(transactionCategory),
|
|
12559
|
+
variant: "small"
|
|
12560
|
+
}, {
|
|
12561
|
+
children: transactionCategory
|
|
12562
|
+
}))]
|
|
12563
|
+
}))]
|
|
12564
|
+
})), jsxRuntime.jsx("div", Object.assign({
|
|
12565
|
+
css: styles$e.cardColumn
|
|
12566
|
+
}, {
|
|
12567
|
+
children: jsxRuntime.jsx(Label$1, Object.assign({
|
|
12568
|
+
spacing: "spread",
|
|
12569
|
+
text: deriveTransactionSymbolWithAmount(transactionCategory, transactionAmount),
|
|
12570
|
+
textProps: {
|
|
12571
|
+
css: styles$e.getAmountTypography(transactionCategory === "funds_added")
|
|
12572
|
+
},
|
|
12573
|
+
variant: "subtitle"
|
|
12574
|
+
}, {
|
|
12575
|
+
children: jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
12576
|
+
css: styles$e.balanceTypography,
|
|
12577
|
+
variant: "small"
|
|
12578
|
+
}, {
|
|
12579
|
+
children: `$${endingBalance.amount.toFixed(2)}`
|
|
12580
|
+
}))
|
|
12581
|
+
}))
|
|
12582
|
+
}))]
|
|
12583
|
+
})), transactionCategory === "adjustment" && jsxRuntime.jsx(HistoryCardExtension, {
|
|
12584
|
+
transactionDetails: transactionDescription
|
|
12585
|
+
})]
|
|
12586
|
+
}))
|
|
12587
|
+
);
|
|
12588
|
+
};
|
|
12589
|
+
|
|
12590
|
+
const styles$d = createStyles({
|
|
12591
|
+
action: theme => ({
|
|
12592
|
+
minWidth: theme.spacing(30),
|
|
12593
|
+
placeContent: "center",
|
|
12594
|
+
width: theme.spacing(30)
|
|
12595
|
+
}),
|
|
12596
|
+
displayStateContainer: theme => ({
|
|
12597
|
+
"& > *:not(:last-child)::after": {
|
|
12598
|
+
borderBottom: `1px solid ${theme.palette.gray.light}`,
|
|
12599
|
+
content: '""',
|
|
12600
|
+
display: "block",
|
|
12601
|
+
width: "100%"
|
|
12602
|
+
},
|
|
12603
|
+
border: `1px solid ${theme.palette.gray.light}`,
|
|
12604
|
+
display: "flex",
|
|
12605
|
+
flexDirection: "column",
|
|
12606
|
+
listStyle: "none"
|
|
12607
|
+
}),
|
|
12608
|
+
emptyStateContainer: theme => ({
|
|
12609
|
+
backgroundColor: theme.palette.gray.ultraLight,
|
|
12610
|
+
padding: theme.spacing(2),
|
|
12611
|
+
textAlign: "center"
|
|
12612
|
+
}),
|
|
12613
|
+
gridContainer: theme => ({
|
|
12614
|
+
display: "flex",
|
|
12615
|
+
justifyContent: "space-between",
|
|
12616
|
+
placeItems: "center"
|
|
12617
|
+
}),
|
|
12618
|
+
linkAction: {
|
|
12619
|
+
margin: "0.5rem auto",
|
|
12620
|
+
textAlign: "end"
|
|
12621
|
+
},
|
|
12622
|
+
pagination: theme => ({
|
|
12623
|
+
"&& button": {
|
|
12624
|
+
background: "none"
|
|
12625
|
+
},
|
|
12626
|
+
"&& button[aria-current='step']": {
|
|
12627
|
+
background: theme.palette.white
|
|
12628
|
+
},
|
|
12629
|
+
textAlign: "center"
|
|
12630
|
+
}),
|
|
12631
|
+
skeletonCard: theme => ({
|
|
12632
|
+
backgroundColor: theme.palette.gray.dark,
|
|
12633
|
+
display: "flex",
|
|
12634
|
+
justifyContent: "space-between",
|
|
12635
|
+
padding: theme.spacing(2)
|
|
12636
|
+
}),
|
|
12637
|
+
skeletonCardColumnLeft: {
|
|
12638
|
+
display: "flex",
|
|
12639
|
+
flexDirection: "column",
|
|
12640
|
+
justifyContent: "space-between"
|
|
12641
|
+
},
|
|
12642
|
+
skeletonCardColumnRight: theme => ({
|
|
12643
|
+
alignItems: "flex-end",
|
|
12644
|
+
display: "flex",
|
|
12645
|
+
flexDirection: "column",
|
|
12646
|
+
justifyContent: "space-between",
|
|
12647
|
+
rowGap: theme.spacing(2)
|
|
12648
|
+
}),
|
|
12649
|
+
skeletonCardList: theme => ({
|
|
12650
|
+
display: "flex",
|
|
12651
|
+
flexDirection: "column",
|
|
12652
|
+
rowGap: theme.spacing(2.25)
|
|
12653
|
+
}),
|
|
12654
|
+
skeletonCardLogo: theme => ({
|
|
12655
|
+
alignItems: "center",
|
|
12656
|
+
columnGap: theme.spacing(2),
|
|
12657
|
+
display: "flex"
|
|
12658
|
+
}),
|
|
12659
|
+
skeletonCardTransactionRow: theme => ({
|
|
12660
|
+
columnGap: "8px",
|
|
12661
|
+
display: "flex"
|
|
12662
|
+
}),
|
|
12663
|
+
skeletonPagination: theme => ({
|
|
12664
|
+
alignItems: "center",
|
|
12665
|
+
display: "flex",
|
|
12666
|
+
justifyContent: "space-between",
|
|
12667
|
+
marginLeft: "auto",
|
|
12668
|
+
marginRight: "auto",
|
|
12669
|
+
maxWidth: "16rem"
|
|
12670
|
+
}),
|
|
12671
|
+
transactionTypeSelect: {
|
|
12672
|
+
height: "3.25rem",
|
|
12673
|
+
width: "15rem"
|
|
12674
|
+
}
|
|
12675
|
+
});
|
|
12676
|
+
|
|
12677
|
+
/**
|
|
12678
|
+
* @namespace WalletHistory
|
|
12679
|
+
*
|
|
12680
|
+
* # Wallet History
|
|
12681
|
+
*/
|
|
12682
|
+
const WalletHistory = () => {
|
|
12683
|
+
var _a;
|
|
12684
|
+
const {
|
|
12685
|
+
t
|
|
12686
|
+
} = reactI18next.useTranslation();
|
|
12687
|
+
const [currentPage, setCurrentPage] = React.useState(1);
|
|
12688
|
+
const [dateRangeOptions, {
|
|
12689
|
+
last30days
|
|
12690
|
+
}] = useDateRangeOptions();
|
|
12691
|
+
const [selectedOption, setSelectedOption] = React.useState(last30days);
|
|
12692
|
+
const [customRange, setCustomRange] = React.useState();
|
|
12693
|
+
const [selectedTransactionType, setSelectedTransactionType] = React.useState();
|
|
12694
|
+
// TODO: Once we are able to get transactions from the API for US transactions we will need to re-work the way
|
|
12695
|
+
// we attempt to allow users to select a custom date range to fetch transactions for. The endpoint does
|
|
12696
|
+
// not work with date ranges and instead takes in a date to sort transactions by.
|
|
12697
|
+
// const queryRange = useMemo(
|
|
12698
|
+
// () =>
|
|
12699
|
+
// selectedOption && selectedOption.value === "custom" && customRange
|
|
12700
|
+
// ? customRange
|
|
12701
|
+
// : selectedOption?.range,
|
|
12702
|
+
// [customRange, selectedOption]
|
|
12703
|
+
// );
|
|
12704
|
+
const {
|
|
12705
|
+
data: fundingSourcesResult,
|
|
12706
|
+
isInitialLoading: fundingSourcesLoading,
|
|
12707
|
+
error: fundingSourcesError
|
|
12708
|
+
} = alchemy.useListFundingSources();
|
|
12709
|
+
const fundingSources = React.useMemo(() => {
|
|
12710
|
+
if (fundingSourcesError) return [];
|
|
12711
|
+
if (fundingSourcesResult && !fundingSourcesLoading) {
|
|
12712
|
+
return fundingSourcesResult;
|
|
12713
|
+
}
|
|
12714
|
+
return [];
|
|
12715
|
+
}, [fundingSourcesError, fundingSourcesLoading, fundingSourcesResult]);
|
|
12716
|
+
const {
|
|
12717
|
+
data: walletHistoryData,
|
|
12718
|
+
isInitialLoading: isWalletHistoryDataLoading,
|
|
12719
|
+
isFetching: isWalletHistoryFetching,
|
|
12720
|
+
error: errors
|
|
12721
|
+
} = alchemy.useGetFundingSourceTransactions(fundingSources.length ? fundingSources[0].fundingSourceId : "", Object.assign(Object.assign({}, selectedTransactionType ? {
|
|
12722
|
+
category: selectedTransactionType === null || selectedTransactionType === void 0 ? void 0 : selectedTransactionType.value
|
|
12723
|
+
} : {}), {
|
|
12724
|
+
// ...(queryRange ? { sortBy: queryRange[0] } : {}), TODO: Need to get sortBy date working at request of Design
|
|
12725
|
+
page: currentPage,
|
|
12726
|
+
pageSize: 25
|
|
12727
|
+
}));
|
|
12728
|
+
const walletLoading = isWalletHistoryDataLoading || isWalletHistoryFetching;
|
|
12729
|
+
if (fundingSources.length === 0) return jsxRuntime.jsx(CollapsiblePanel, Object.assign({
|
|
12730
|
+
title: t("account-settings:sections.transactionHistory")
|
|
12731
|
+
}, {
|
|
12732
|
+
children: jsxRuntime.jsx("div", Object.assign({
|
|
12733
|
+
css: styles$d.emptyStateContainer
|
|
12734
|
+
}, {
|
|
12735
|
+
children: jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
12736
|
+
variant: "body2"
|
|
12737
|
+
}, {
|
|
12738
|
+
children: t("account-settings:messages.noFundingSources")
|
|
12739
|
+
}))
|
|
12740
|
+
}))
|
|
12741
|
+
}));
|
|
12742
|
+
return jsxRuntime.jsxs(CollapsiblePanel, Object.assign({
|
|
12743
|
+
title: t("account-settings:sections.transactionHistory")
|
|
12744
|
+
}, {
|
|
12745
|
+
children: [jsxRuntime.jsx(DateRangeCombo, Object.assign({
|
|
12746
|
+
onChange: (nextOption, nextCustomRange) => {
|
|
12747
|
+
setCurrentPage(currentPage);
|
|
12748
|
+
setSelectedOption(nextOption);
|
|
12749
|
+
setCustomRange(nextCustomRange);
|
|
12750
|
+
},
|
|
12751
|
+
options: dateRangeOptions,
|
|
12752
|
+
values: {
|
|
12753
|
+
customRange,
|
|
12754
|
+
selectedOption
|
|
12755
|
+
}
|
|
12756
|
+
}, {
|
|
12757
|
+
children: renderedSelect => jsxRuntime.jsxs(giger.Grid, Object.assign({
|
|
12758
|
+
css: styles$d.gridContainer,
|
|
12759
|
+
noPadding: true
|
|
12760
|
+
}, {
|
|
12761
|
+
children: [jsxRuntime.jsx(giger.GridChild, {
|
|
12762
|
+
children: renderedSelect
|
|
12763
|
+
}), jsxRuntime.jsx(giger.GridChild, {
|
|
12764
|
+
children: jsxRuntime.jsx(giger.Select, Object.assign({
|
|
12765
|
+
css: styles$d.transactionTypeSelect,
|
|
12766
|
+
label: "Transaction Type",
|
|
12767
|
+
name: "transaction type select",
|
|
12768
|
+
onChange: (_name, value) => setSelectedTransactionType(value),
|
|
12769
|
+
onClear: () => setSelectedTransactionType(null),
|
|
12770
|
+
value: selectedTransactionType
|
|
12771
|
+
}, {
|
|
12772
|
+
children: [{
|
|
12773
|
+
label: "Adjustment",
|
|
12774
|
+
value: "adjustment"
|
|
12775
|
+
}, {
|
|
12776
|
+
label: "Label",
|
|
12777
|
+
value: "label"
|
|
12778
|
+
}, {
|
|
12779
|
+
label: "Refund",
|
|
12780
|
+
value: "refund"
|
|
12781
|
+
}].map(item => jsxRuntime.jsx(giger.Option, Object.assign({
|
|
12782
|
+
value: item.value,
|
|
12783
|
+
selected: (selectedTransactionType === null || selectedTransactionType === void 0 ? void 0 : selectedTransactionType.value) === item.value
|
|
12784
|
+
}, {
|
|
12785
|
+
children: item.label
|
|
12786
|
+
}), item.value))
|
|
12787
|
+
}))
|
|
12788
|
+
})]
|
|
12789
|
+
}))
|
|
12790
|
+
})), jsxRuntime.jsx(Spacer, {
|
|
12791
|
+
multiplier: 2
|
|
12792
|
+
}), walletLoading ? jsxRuntime.jsx(LoadingState, {}) : (errors === null || errors === void 0 ? void 0 : errors.length) ? jsxRuntime.jsx(ErrorState, {
|
|
12793
|
+
errors: errors
|
|
12794
|
+
}) : jsxRuntime.jsx(SuccessState, {
|
|
12795
|
+
currentPage: currentPage,
|
|
12796
|
+
setCurrentPage: setCurrentPage,
|
|
12797
|
+
transactions: (_a = walletHistoryData === null || walletHistoryData === void 0 ? void 0 : walletHistoryData.transactions) !== null && _a !== void 0 ? _a : []
|
|
12798
|
+
})]
|
|
12799
|
+
}));
|
|
12800
|
+
};
|
|
12801
|
+
const LoadingState = () => jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
12802
|
+
children: [jsxRuntime.jsx(SkeletonCardList, {}), jsxRuntime.jsx(Spacer, {}), jsxRuntime.jsx(SkeletonPagination, {})]
|
|
12803
|
+
});
|
|
12804
|
+
const ErrorState = ({
|
|
12805
|
+
errors
|
|
12806
|
+
}) => {
|
|
12807
|
+
const {
|
|
12808
|
+
t
|
|
12809
|
+
} = reactI18next.useTranslation();
|
|
12810
|
+
return jsxRuntime.jsx(giger.InlineNotification, Object.assign({
|
|
12811
|
+
title: t("wallet-history:errors.failureToFetch"),
|
|
12812
|
+
type: giger.NotificationType.ERROR
|
|
12813
|
+
}, {
|
|
12814
|
+
children: errors.map(e => t(jsBase64.encode(e.message), {
|
|
12815
|
+
defaultValue: e.message
|
|
12816
|
+
})).join(" ")
|
|
12817
|
+
}));
|
|
12818
|
+
};
|
|
12819
|
+
const SuccessState = ({
|
|
12820
|
+
transactions,
|
|
12821
|
+
currentPage,
|
|
12822
|
+
setCurrentPage
|
|
12823
|
+
}) => {
|
|
12824
|
+
const shipmentIds = transactions.flatMap(trx => trx.shipmentIds);
|
|
12825
|
+
const {
|
|
12826
|
+
data: shipmentInfo
|
|
12827
|
+
} = alchemy.useListSalesOrderShipments({
|
|
12828
|
+
shipmentIds: shipmentIds
|
|
12829
|
+
});
|
|
12830
|
+
const shipmentsById = shipmentInfo !== undefined && !!shipmentInfo.length ? Object.fromEntries(shipmentInfo === null || shipmentInfo === void 0 ? void 0 : shipmentInfo.map(s => [s.shipmentId, s])) : {};
|
|
12831
|
+
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
12832
|
+
children: [transactions.length ? jsxRuntime.jsx("ul", Object.assign({
|
|
12833
|
+
css: styles$d.displayStateContainer
|
|
12834
|
+
}, {
|
|
12835
|
+
children: transactions.sort((a, b) => new Date(b.transactionDate).valueOf() - new Date(a.transactionDate).valueOf()).map(transaction => {
|
|
12836
|
+
var _a;
|
|
12837
|
+
return jsxRuntime.jsx("li", {
|
|
12838
|
+
children: jsxRuntime.jsx(HistoryCard, {
|
|
12839
|
+
carrier: (_a = shipmentsById[transaction.shipmentIds[0]]) === null || _a === void 0 ? void 0 : _a.carrierId,
|
|
12840
|
+
transaction: transaction
|
|
12841
|
+
})
|
|
12842
|
+
}, transaction.fundingSourceTransactionId);
|
|
12843
|
+
})
|
|
12844
|
+
})) : jsxRuntime.jsx(EmptyState, {}), jsxRuntime.jsx(Spacer, {}), jsxRuntime.jsx("div", Object.assign({
|
|
12845
|
+
css: styles$d.pagination
|
|
12846
|
+
}, {
|
|
12847
|
+
children: jsxRuntime.jsx(giger.Pagination, {
|
|
12848
|
+
boundaryPagesToShow: 7,
|
|
12849
|
+
currentPage: currentPage,
|
|
12850
|
+
onPageChange: selectedPage => setCurrentPage(selectedPage),
|
|
12851
|
+
siblingCount: 2,
|
|
12852
|
+
totalPages: 20
|
|
12853
|
+
})
|
|
12854
|
+
}))]
|
|
12855
|
+
});
|
|
12856
|
+
};
|
|
12857
|
+
const EmptyState = () => {
|
|
12858
|
+
return jsxRuntime.jsx("div", Object.assign({
|
|
12859
|
+
css: styles$d.emptyStateContainer
|
|
12860
|
+
}, {
|
|
12861
|
+
children: jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
12862
|
+
variant: "body2"
|
|
12863
|
+
}, {
|
|
12864
|
+
children: "No data to display"
|
|
12865
|
+
}))
|
|
12866
|
+
}));
|
|
12867
|
+
};
|
|
12868
|
+
const SkeletonCardList = () => {
|
|
12869
|
+
return jsxRuntime.jsx("div", Object.assign({
|
|
12870
|
+
css: styles$d.skeletonCardList
|
|
12871
|
+
}, {
|
|
12872
|
+
children: Array.from({
|
|
12873
|
+
length: 10
|
|
12874
|
+
}).map((_, index) => jsxRuntime.jsx(SkeletonCard, {}, index))
|
|
12875
|
+
}));
|
|
12876
|
+
};
|
|
12877
|
+
const SkeletonCard = () => {
|
|
12878
|
+
return jsxRuntime.jsxs("div", Object.assign({
|
|
12879
|
+
css: styles$d.skeletonCard
|
|
12880
|
+
}, {
|
|
12881
|
+
children: [jsxRuntime.jsxs("div", Object.assign({
|
|
12882
|
+
css: styles$d.skeletonCardColumnLeft
|
|
12883
|
+
}, {
|
|
12884
|
+
children: [jsxRuntime.jsxs("div", Object.assign({
|
|
12885
|
+
css: styles$d.skeletonCardLogo
|
|
12886
|
+
}, {
|
|
12887
|
+
children: [jsxRuntime.jsx(giger.Skeleton, {
|
|
12888
|
+
animation: giger.SkeletonAnimation.WAVE,
|
|
12889
|
+
backgroundColor: giger.SkeletonBackgroundColor.DARK,
|
|
12890
|
+
height: 24,
|
|
12891
|
+
variant: giger.SkeletonVariant.RECT,
|
|
12892
|
+
width: 24
|
|
12893
|
+
}), jsxRuntime.jsx(giger.Skeleton, {
|
|
12894
|
+
animation: giger.SkeletonAnimation.WAVE,
|
|
12895
|
+
backgroundColor: giger.SkeletonBackgroundColor.DARK,
|
|
12896
|
+
height: 16,
|
|
12897
|
+
variant: giger.SkeletonVariant.TEXT,
|
|
12898
|
+
width: 48
|
|
12899
|
+
})]
|
|
12900
|
+
})), jsxRuntime.jsxs("div", Object.assign({
|
|
12901
|
+
css: styles$d.skeletonCardTransactionRow
|
|
12902
|
+
}, {
|
|
12903
|
+
children: [jsxRuntime.jsx(giger.Skeleton, {
|
|
12904
|
+
animation: giger.SkeletonAnimation.WAVE,
|
|
12905
|
+
backgroundColor: giger.SkeletonBackgroundColor.DARK,
|
|
12906
|
+
height: 16,
|
|
12907
|
+
variant: giger.SkeletonVariant.TEXT,
|
|
12908
|
+
width: 40
|
|
12909
|
+
}), jsxRuntime.jsx(giger.Skeleton, {
|
|
12910
|
+
animation: giger.SkeletonAnimation.WAVE,
|
|
12911
|
+
backgroundColor: giger.SkeletonBackgroundColor.DARK,
|
|
12912
|
+
height: 16,
|
|
12913
|
+
variant: giger.SkeletonVariant.TEXT,
|
|
12914
|
+
width: 64
|
|
12915
|
+
})]
|
|
12916
|
+
}))]
|
|
12917
|
+
})), jsxRuntime.jsxs("div", Object.assign({
|
|
12918
|
+
css: styles$d.skeletonCardColumnRight
|
|
12919
|
+
}, {
|
|
12920
|
+
children: [jsxRuntime.jsx(giger.Skeleton, {
|
|
12921
|
+
animation: giger.SkeletonAnimation.WAVE,
|
|
12922
|
+
backgroundColor: giger.SkeletonBackgroundColor.DARK,
|
|
12923
|
+
height: 16,
|
|
12924
|
+
variant: giger.SkeletonVariant.TEXT,
|
|
12925
|
+
width: 56
|
|
12926
|
+
}), jsxRuntime.jsx(giger.Skeleton, {
|
|
12927
|
+
animation: giger.SkeletonAnimation.WAVE,
|
|
12928
|
+
backgroundColor: giger.SkeletonBackgroundColor.DARK,
|
|
12929
|
+
height: 16,
|
|
12930
|
+
variant: giger.SkeletonVariant.TEXT,
|
|
12931
|
+
width: 56
|
|
12932
|
+
})]
|
|
12933
|
+
}))]
|
|
12934
|
+
}));
|
|
12935
|
+
};
|
|
12936
|
+
const SkeletonPagination = () => {
|
|
12937
|
+
return jsxRuntime.jsxs("div", Object.assign({
|
|
12938
|
+
css: styles$d.skeletonPagination
|
|
12939
|
+
}, {
|
|
12940
|
+
children: [jsxRuntime.jsx(giger.Skeleton, {
|
|
12941
|
+
animation: giger.SkeletonAnimation.WAVE,
|
|
12942
|
+
backgroundColor: giger.SkeletonBackgroundColor.DARK,
|
|
12943
|
+
height: 24,
|
|
12944
|
+
variant: giger.SkeletonVariant.RECT,
|
|
12945
|
+
width: 24
|
|
12946
|
+
}), Array.from({
|
|
12947
|
+
length: 6
|
|
12948
|
+
}).map((_, index) => jsxRuntime.jsx(giger.Skeleton, {
|
|
12949
|
+
animation: giger.SkeletonAnimation.WAVE,
|
|
12950
|
+
backgroundColor: giger.SkeletonBackgroundColor.LIGHT,
|
|
12951
|
+
height: 16,
|
|
12952
|
+
variant: giger.SkeletonVariant.CIRCLE,
|
|
12953
|
+
width: 16
|
|
12954
|
+
}, index)), jsxRuntime.jsx(giger.Skeleton, {
|
|
12955
|
+
animation: giger.SkeletonAnimation.WAVE,
|
|
12956
|
+
backgroundColor: giger.SkeletonBackgroundColor.DARK,
|
|
12957
|
+
height: 24,
|
|
12958
|
+
variant: giger.SkeletonVariant.RECT,
|
|
12959
|
+
width: 24
|
|
12960
|
+
})]
|
|
12961
|
+
}));
|
|
12962
|
+
};
|
|
12963
|
+
|
|
12964
|
+
const LabelLayoutPurchase = ({
|
|
12965
|
+
onChange
|
|
12966
|
+
}) => {
|
|
12967
|
+
const {
|
|
12968
|
+
t
|
|
12969
|
+
} = reactI18next.useTranslation(["common", "manage-defaults"]);
|
|
12970
|
+
const [layout, setLayout] = React.useState("4x6");
|
|
12971
|
+
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
12972
|
+
children: [jsxRuntime.jsx(giger.InlineNotification, Object.assign({
|
|
12973
|
+
title: t("manage-defaults:label.purchase.title"),
|
|
12974
|
+
type: giger.NotificationType.INFO
|
|
12975
|
+
}, {
|
|
12976
|
+
children: t("manage-defaults:label.purchase.description")
|
|
12977
|
+
})), jsxRuntime.jsx(Spacer, {
|
|
12978
|
+
multiplier: 1.5
|
|
12979
|
+
}), jsxRuntime.jsxs(giger.RadioGroup, Object.assign({
|
|
12980
|
+
name: "labelLayout",
|
|
12981
|
+
onChange: e => {
|
|
12982
|
+
setLayout(e.target.value);
|
|
12983
|
+
onChange(e.target.value);
|
|
12984
|
+
},
|
|
12985
|
+
value: layout
|
|
12986
|
+
}, {
|
|
12987
|
+
children: [jsxRuntime.jsx(giger.Radio, Object.assign({
|
|
12988
|
+
value: "Letter"
|
|
12989
|
+
}, {
|
|
12990
|
+
children: jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
12991
|
+
bold: true
|
|
12992
|
+
}, {
|
|
12993
|
+
children: t("manage-defaults:label.letter.title")
|
|
12994
|
+
}))
|
|
12995
|
+
})), jsxRuntime.jsx(Spacer, {
|
|
12996
|
+
multiplier: 3
|
|
12997
|
+
}), jsxRuntime.jsx(giger.Radio, Object.assign({
|
|
12998
|
+
value: "4x6"
|
|
12999
|
+
}, {
|
|
13000
|
+
children: jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
13001
|
+
bold: true
|
|
13002
|
+
}, {
|
|
13003
|
+
children: t("manage-defaults:label.thermal.title")
|
|
13004
|
+
}))
|
|
13005
|
+
}))]
|
|
13006
|
+
}))]
|
|
13007
|
+
});
|
|
13008
|
+
};
|
|
13009
|
+
|
|
13010
|
+
const styles$c = createStyles({
|
|
13011
|
+
button: theme => ({
|
|
13012
|
+
backgroundColor: "transparent",
|
|
13013
|
+
padding: 0
|
|
13014
|
+
}),
|
|
13015
|
+
buttonContainer: theme => ({
|
|
13016
|
+
alignItems: "center",
|
|
13017
|
+
display: "flex",
|
|
13018
|
+
justifyContent: "left"
|
|
13019
|
+
}),
|
|
13020
|
+
icon: theme => ({
|
|
13021
|
+
color: theme.palette.secondary.main,
|
|
12207
13022
|
position: "absolute",
|
|
12208
13023
|
right: theme.spacing(1),
|
|
12209
13024
|
top: theme.spacing(1)
|
|
@@ -12546,9 +13361,10 @@ const UnitSettings = () => {
|
|
|
12546
13361
|
|
|
12547
13362
|
const AccountSettings = _a => {
|
|
12548
13363
|
var {
|
|
12549
|
-
carriers
|
|
13364
|
+
carriers,
|
|
13365
|
+
currency
|
|
12550
13366
|
} = _a,
|
|
12551
|
-
rest = __rest(_a, ["carriers"]);
|
|
13367
|
+
rest = __rest(_a, ["carriers", "currency"]);
|
|
12552
13368
|
const {
|
|
12553
13369
|
t
|
|
12554
13370
|
} = reactI18next.useTranslation();
|
|
@@ -12566,8 +13382,9 @@ const AccountSettings = _a => {
|
|
|
12566
13382
|
})), jsxRuntime.jsx(Spacer, {
|
|
12567
13383
|
multiplier: 1
|
|
12568
13384
|
}), jsxRuntime.jsx(ManageFunding, {
|
|
12569
|
-
carrierId: carriers ? carriers[0].carrierId : ""
|
|
12570
|
-
|
|
13385
|
+
carrierId: carriers ? carriers[0].carrierId : "",
|
|
13386
|
+
currency: currency
|
|
13387
|
+
}), jsxRuntime.jsx(PaymentMethodSettings, {}), jsxRuntime.jsx(WalletHistory, {}), jsxRuntime.jsx(Component$6, {}), jsxRuntime.jsx(Component$7, {}), jsxRuntime.jsx(LabelLayout, {
|
|
12571
13388
|
display: "settings"
|
|
12572
13389
|
}), jsxRuntime.jsx(UnitSettings, {}), jsxRuntime.jsx("div", Object.assign({
|
|
12573
13390
|
css: theme => ({
|
|
@@ -12581,6 +13398,9 @@ const AccountSettings = _a => {
|
|
|
12581
13398
|
|
|
12582
13399
|
var accoutSettings = {
|
|
12583
13400
|
"account-settings": {
|
|
13401
|
+
messages: {
|
|
13402
|
+
noFundingSources: "No transaction history available. Once you have a wallet balance and transactions, they will appear here."
|
|
13403
|
+
},
|
|
12584
13404
|
title: "Account Settings",
|
|
12585
13405
|
sections: {
|
|
12586
13406
|
accountBalance: "Account Balance",
|
|
@@ -12733,6 +13553,7 @@ var common = {
|
|
|
12733
13553
|
autoFundingSettings: "Unable to load auto funding settings",
|
|
12734
13554
|
carrier: "Unable to load carrier",
|
|
12735
13555
|
carriers: "Unable to load carriers",
|
|
13556
|
+
connectCarrierForm: "Unable to load carrier registration form.",
|
|
12736
13557
|
fundingSourceMetadata: "Unable to load funding source metadata",
|
|
12737
13558
|
label: "Unable to load label",
|
|
12738
13559
|
salesOrder: "Unable to load order",
|
|
@@ -12770,6 +13591,7 @@ var common = {
|
|
|
12770
13591
|
accountSettings: "Loading account settings...",
|
|
12771
13592
|
carrier: "Loading carrier...",
|
|
12772
13593
|
carriers: "Loading carriers...",
|
|
13594
|
+
connectCarrierForm: "Loading carrier registration form...",
|
|
12773
13595
|
connectingCarriers: "Connecting carriers...",
|
|
12774
13596
|
creatingFundingSource: "Creating wallet...",
|
|
12775
13597
|
data: "Loading...",
|
|
@@ -12876,7 +13698,6 @@ var connectCarriers = {
|
|
|
12876
13698
|
"connect-carrier": {
|
|
12877
13699
|
registrationForm: {
|
|
12878
13700
|
title: "Register Carrier",
|
|
12879
|
-
isLoading: "Loading carrier registration form...",
|
|
12880
13701
|
betaWarning: "{{carrier}} is currently in a beta test phase and you may experience unexpected behavior."
|
|
12881
13702
|
}
|
|
12882
13703
|
}
|
|
@@ -12971,7 +13792,7 @@ var manageFunding = {
|
|
|
12971
13792
|
labels: {
|
|
12972
13793
|
amount: "Amount"
|
|
12973
13794
|
},
|
|
12974
|
-
minimumPurchaseAmount: "Minimum Purchase
|
|
13795
|
+
minimumPurchaseAmount: "Minimum Purchase {{currencySymbol}}10.00",
|
|
12975
13796
|
other: "Other..."
|
|
12976
13797
|
},
|
|
12977
13798
|
fundAndPurchase: {
|
|
@@ -13290,9 +14111,16 @@ var walletHistory = {
|
|
|
13290
14111
|
"wallet-history": {
|
|
13291
14112
|
actions: {
|
|
13292
14113
|
downloadCsv: "Download a CSV",
|
|
13293
|
-
chooseDate: "Choose a date"
|
|
14114
|
+
chooseDate: "Choose a date",
|
|
14115
|
+
tryAgain: "Refresh the page and try again."
|
|
14116
|
+
},
|
|
14117
|
+
errors: {
|
|
14118
|
+
failureToFetch: "Unable to load history"
|
|
13294
14119
|
},
|
|
13295
14120
|
dateRange: "Date range",
|
|
14121
|
+
details: {
|
|
14122
|
+
inaccurateWeight: "Inaccurate Weight"
|
|
14123
|
+
},
|
|
13296
14124
|
historyOptions: {
|
|
13297
14125
|
custom: "Custom",
|
|
13298
14126
|
last30days: "Last 30 days",
|
|
@@ -13329,11 +14157,17 @@ var en = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(O
|
|
|
13329
14157
|
const Component$5 = ({
|
|
13330
14158
|
onSaveSettings
|
|
13331
14159
|
}) => {
|
|
14160
|
+
var _a;
|
|
13332
14161
|
const {
|
|
13333
14162
|
data: carriers
|
|
13334
14163
|
} = alchemy.useListCarriers();
|
|
14164
|
+
const {
|
|
14165
|
+
data: fundingSource
|
|
14166
|
+
} = alchemy.useListFundingSources();
|
|
14167
|
+
const currency = getCurrencyFromString((_a = fundingSource === null || fundingSource === void 0 ? void 0 : fundingSource[0]) === null || _a === void 0 ? void 0 : _a.currencyCode);
|
|
13335
14168
|
return jsxRuntime.jsx(AccountSettings, {
|
|
13336
|
-
carriers: carriers
|
|
14169
|
+
carriers: carriers,
|
|
14170
|
+
currency: currency
|
|
13337
14171
|
});
|
|
13338
14172
|
};
|
|
13339
14173
|
/**
|
|
@@ -13437,14 +14271,15 @@ const RateForm = ({
|
|
|
13437
14271
|
labelErrors,
|
|
13438
14272
|
labels,
|
|
13439
14273
|
labelsLoading,
|
|
13440
|
-
|
|
13441
|
-
onSelectRate,
|
|
13442
|
-
onSubmit,
|
|
14274
|
+
currency,
|
|
13443
14275
|
displayableShipmentErrors,
|
|
13444
14276
|
preferredRates,
|
|
13445
14277
|
preferredServiceCodes,
|
|
13446
14278
|
rates,
|
|
13447
|
-
shipment
|
|
14279
|
+
shipment,
|
|
14280
|
+
onSave,
|
|
14281
|
+
onSelectRate,
|
|
14282
|
+
onSubmit
|
|
13448
14283
|
}) => {
|
|
13449
14284
|
var _a, _b, _c, _d, _e, _f;
|
|
13450
14285
|
features = Object.assign({
|
|
@@ -13647,6 +14482,7 @@ const RateForm = ({
|
|
|
13647
14482
|
carrierId: selectedRate === null || selectedRate === void 0 ? void 0 : selectedRate.carrierId,
|
|
13648
14483
|
control: form.control,
|
|
13649
14484
|
css: styles$b.fundAndPurchase,
|
|
14485
|
+
currency: currency,
|
|
13650
14486
|
disabled: disabled,
|
|
13651
14487
|
isFundingEnabled: !!((_e = features === null || features === void 0 ? void 0 : features.rateForm) === null || _e === void 0 ? void 0 : _e.enableFunding),
|
|
13652
14488
|
isFundingRequired: (selectedRate === null || selectedRate === void 0 ? void 0 : selectedRate.balance) !== undefined && !!selectedRate.requiresFundedAmount,
|
|
@@ -13660,63 +14496,6 @@ const RateForm = ({
|
|
|
13660
14496
|
}));
|
|
13661
14497
|
};
|
|
13662
14498
|
|
|
13663
|
-
var $$6 = _export;
|
|
13664
|
-
var DESCRIPTORS$1 = descriptors;
|
|
13665
|
-
var global$8 = global$p;
|
|
13666
|
-
var uncurryThis$1 = functionUncurryThis;
|
|
13667
|
-
var hasOwn$1 = hasOwnProperty_1;
|
|
13668
|
-
var isCallable$4 = isCallable$o;
|
|
13669
|
-
var isPrototypeOf$1 = objectIsPrototypeOf;
|
|
13670
|
-
var toString = toString$c;
|
|
13671
|
-
var defineProperty = objectDefineProperty.f;
|
|
13672
|
-
var copyConstructorProperties = copyConstructorProperties$2;
|
|
13673
|
-
|
|
13674
|
-
var NativeSymbol = global$8.Symbol;
|
|
13675
|
-
var SymbolPrototype = NativeSymbol && NativeSymbol.prototype;
|
|
13676
|
-
|
|
13677
|
-
if (DESCRIPTORS$1 && isCallable$4(NativeSymbol) && (!('description' in SymbolPrototype) ||
|
|
13678
|
-
// Safari 12 bug
|
|
13679
|
-
NativeSymbol().description !== undefined
|
|
13680
|
-
)) {
|
|
13681
|
-
var EmptyStringDescriptionStore = {};
|
|
13682
|
-
// wrap Symbol constructor for correct work with undefined description
|
|
13683
|
-
var SymbolWrapper = function Symbol() {
|
|
13684
|
-
var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString(arguments[0]);
|
|
13685
|
-
var result = isPrototypeOf$1(SymbolPrototype, this)
|
|
13686
|
-
? new NativeSymbol(description)
|
|
13687
|
-
// in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
|
|
13688
|
-
: description === undefined ? NativeSymbol() : NativeSymbol(description);
|
|
13689
|
-
if (description === '') EmptyStringDescriptionStore[result] = true;
|
|
13690
|
-
return result;
|
|
13691
|
-
};
|
|
13692
|
-
|
|
13693
|
-
copyConstructorProperties(SymbolWrapper, NativeSymbol);
|
|
13694
|
-
SymbolWrapper.prototype = SymbolPrototype;
|
|
13695
|
-
SymbolPrototype.constructor = SymbolWrapper;
|
|
13696
|
-
|
|
13697
|
-
var NATIVE_SYMBOL = String(NativeSymbol('test')) == 'Symbol(test)';
|
|
13698
|
-
var thisSymbolValue = uncurryThis$1(SymbolPrototype.valueOf);
|
|
13699
|
-
var symbolDescriptiveString = uncurryThis$1(SymbolPrototype.toString);
|
|
13700
|
-
var regexp = /^Symbol\((.*)\)[^)]+$/;
|
|
13701
|
-
var replace = uncurryThis$1(''.replace);
|
|
13702
|
-
var stringSlice = uncurryThis$1(''.slice);
|
|
13703
|
-
|
|
13704
|
-
defineProperty(SymbolPrototype, 'description', {
|
|
13705
|
-
configurable: true,
|
|
13706
|
-
get: function description() {
|
|
13707
|
-
var symbol = thisSymbolValue(this);
|
|
13708
|
-
if (hasOwn$1(EmptyStringDescriptionStore, symbol)) return '';
|
|
13709
|
-
var string = symbolDescriptiveString(symbol);
|
|
13710
|
-
var desc = NATIVE_SYMBOL ? stringSlice(string, 7, -1) : replace(string, regexp, '$1');
|
|
13711
|
-
return desc === '' ? undefined : desc;
|
|
13712
|
-
}
|
|
13713
|
-
});
|
|
13714
|
-
|
|
13715
|
-
$$6({ global: true, constructor: true, forced: true }, {
|
|
13716
|
-
Symbol: SymbolWrapper
|
|
13717
|
-
});
|
|
13718
|
-
}
|
|
13719
|
-
|
|
13720
14499
|
const styles$a = createStyles({
|
|
13721
14500
|
container: theme => ({
|
|
13722
14501
|
display: "flex",
|
|
@@ -13875,12 +14654,12 @@ const AddressPreferenceDisplay = ({
|
|
|
13875
14654
|
};
|
|
13876
14655
|
|
|
13877
14656
|
extendZod();
|
|
13878
|
-
const
|
|
14657
|
+
const getProductFormSchema = shipToCountry => {
|
|
13879
14658
|
const baseSchema = zod.z.object({
|
|
13880
14659
|
countryOfOrigin: zod.z.enum(countryCodes),
|
|
13881
|
-
customsItemId: zod.z.string().nullishDefault(undefined),
|
|
13882
14660
|
description: zod.z.string().min(1).max(100),
|
|
13883
14661
|
harmonizedTariffCode: zod.z.string().max(13).nullishDefault(undefined),
|
|
14662
|
+
productId: zod.z.string().nullishDefault(undefined),
|
|
13884
14663
|
valueQuantity: zod.z.object({
|
|
13885
14664
|
quantity: zod.z.number().int(),
|
|
13886
14665
|
value: moneySchema
|
|
@@ -13906,8 +14685,8 @@ const getCustomsItemFormSchema = shipToCountry => {
|
|
|
13906
14685
|
});
|
|
13907
14686
|
};
|
|
13908
14687
|
|
|
13909
|
-
const
|
|
13910
|
-
|
|
14688
|
+
const ProductForm = ({
|
|
14689
|
+
product,
|
|
13911
14690
|
formId,
|
|
13912
14691
|
onCancel,
|
|
13913
14692
|
onSubmit,
|
|
@@ -13921,24 +14700,19 @@ const CustomsItemForm = ({
|
|
|
13921
14700
|
countryCodeOptions
|
|
13922
14701
|
} = useCountryCodeOptions();
|
|
13923
14702
|
const form = reactHookForm.useForm({
|
|
13924
|
-
defaultValues:
|
|
13925
|
-
countryOfOrigin:
|
|
13926
|
-
|
|
13927
|
-
|
|
13928
|
-
|
|
14703
|
+
defaultValues: product ? {
|
|
14704
|
+
countryOfOrigin: product.countryOfOrigin,
|
|
14705
|
+
description: product.description,
|
|
14706
|
+
harmonizedTariffCode: product.harmonizedTariffCode,
|
|
14707
|
+
productId: product.productId,
|
|
13929
14708
|
valueQuantity: {
|
|
13930
|
-
quantity:
|
|
13931
|
-
|
|
13932
|
-
// Per Anne, this was to handle backwards compatibility when API used to only accept Number
|
|
13933
|
-
value: {
|
|
13934
|
-
amount: customsItem.value,
|
|
13935
|
-
currency: alchemy.SE.Currency.USD
|
|
13936
|
-
}
|
|
14709
|
+
quantity: product.quantity,
|
|
14710
|
+
value: product.value
|
|
13937
14711
|
}
|
|
13938
14712
|
} : {
|
|
13939
14713
|
countryOfOrigin: "US"
|
|
13940
14714
|
},
|
|
13941
|
-
resolver: validationResolver(
|
|
14715
|
+
resolver: validationResolver(getProductFormSchema(shipToCountry !== null && shipToCountry !== void 0 ? shipToCountry : "US"))
|
|
13942
14716
|
});
|
|
13943
14717
|
const handleSubmit = form.handleSubmit(values => __awaiter(void 0, void 0, void 0, function* () {
|
|
13944
14718
|
const payload = values;
|
|
@@ -14003,12 +14777,12 @@ const CustomsItemForm = ({
|
|
|
14003
14777
|
children: t("actions.cancel")
|
|
14004
14778
|
})), jsxRuntime.jsx(SubmitButton, Object.assign({
|
|
14005
14779
|
control: form.control,
|
|
14006
|
-
"data-testid": (
|
|
14780
|
+
"data-testid": (product === null || product === void 0 ? void 0 : product.productId) ? "actions.save" : "actions.add",
|
|
14007
14781
|
form: formId,
|
|
14008
14782
|
requireDirty: true,
|
|
14009
14783
|
variant: giger.ButtonVariant.OUTLINED
|
|
14010
14784
|
}, {
|
|
14011
|
-
children: t((
|
|
14785
|
+
children: t((product === null || product === void 0 ? void 0 : product.productId) ? "actions.save" : "actions.add")
|
|
14012
14786
|
}))]
|
|
14013
14787
|
}))]
|
|
14014
14788
|
}));
|
|
@@ -14118,7 +14892,7 @@ const styles$9 = createStyles({
|
|
|
14118
14892
|
})
|
|
14119
14893
|
});
|
|
14120
14894
|
|
|
14121
|
-
const
|
|
14895
|
+
const ProductActions = ({
|
|
14122
14896
|
onEditClick,
|
|
14123
14897
|
onDeleteClick
|
|
14124
14898
|
}) => {
|
|
@@ -14171,7 +14945,7 @@ const CustomsItemActions = ({
|
|
|
14171
14945
|
}))]
|
|
14172
14946
|
});
|
|
14173
14947
|
};
|
|
14174
|
-
const
|
|
14948
|
+
const ProductsDisplay = ({
|
|
14175
14949
|
onUpdate,
|
|
14176
14950
|
shipment
|
|
14177
14951
|
}) => {
|
|
@@ -14179,19 +14953,19 @@ const CustomsItemsDisplay = ({
|
|
|
14179
14953
|
const {
|
|
14180
14954
|
t
|
|
14181
14955
|
} = reactI18next.useTranslation(["purchase-label"]);
|
|
14182
|
-
const [
|
|
14183
|
-
const
|
|
14184
|
-
const [
|
|
14185
|
-
|
|
14186
|
-
|
|
14187
|
-
onCancel: () => setCustomsItemBeingEdited(undefined),
|
|
14956
|
+
const [productBeingEdited, setProductBeingEdited] = React.useState();
|
|
14957
|
+
const products = (_b = (_a = shipment.packages[0]) === null || _a === void 0 ? void 0 : _a.products) !== null && _b !== void 0 ? _b : [];
|
|
14958
|
+
const [productForm, isCustomsItemFormOpen, toggleIsCustomsItemFormOpen] = useNestedForm(ProductForm, {
|
|
14959
|
+
formId: "product-form",
|
|
14960
|
+
onCancel: () => setProductBeingEdited(undefined),
|
|
14188
14961
|
onSubmit: payload => __awaiter(void 0, void 0, void 0, function* () {
|
|
14189
|
-
yield onUpdate(
|
|
14190
|
-
:
|
|
14962
|
+
yield onUpdate(productBeingEdited ? products.map(item => item.productId === payload.productId ? payload : item) // product was edited
|
|
14963
|
+
: products.concat(payload) // product was created
|
|
14191
14964
|
);
|
|
14192
14965
|
|
|
14193
|
-
|
|
14966
|
+
setProductBeingEdited(undefined);
|
|
14194
14967
|
}),
|
|
14968
|
+
product: productBeingEdited,
|
|
14195
14969
|
shipToCountry: (_c = shipment.shipTo) === null || _c === void 0 ? void 0 : _c.countryCode
|
|
14196
14970
|
});
|
|
14197
14971
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
@@ -14223,7 +14997,7 @@ const CustomsItemsDisplay = ({
|
|
|
14223
14997
|
children: ["+ ", t("customs.addDeclaration")]
|
|
14224
14998
|
}))
|
|
14225
14999
|
}))]
|
|
14226
|
-
})),
|
|
15000
|
+
})), products.length > 0 && jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
14227
15001
|
children: [jsxRuntime.jsx(Spacer, {}), jsxRuntime.jsx(giger.Table, Object.assign({
|
|
14228
15002
|
header: jsxRuntime.jsx(giger.TableHeader, Object.assign({
|
|
14229
15003
|
css: styles$9.header
|
|
@@ -14277,12 +15051,12 @@ const CustomsItemsDisplay = ({
|
|
|
14277
15051
|
outerWrapperStyles: styles$9.table
|
|
14278
15052
|
}, {
|
|
14279
15053
|
children: jsxRuntime.jsx(giger.TableBody, {
|
|
14280
|
-
children:
|
|
15054
|
+
children: products.map(item => jsxRuntime.jsxs(React.Fragment, {
|
|
14281
15055
|
children: [jsxRuntime.jsx(giger.TableBaseRow, {
|
|
14282
|
-
children: item.
|
|
15056
|
+
children: item.productId === (productBeingEdited === null || productBeingEdited === void 0 ? void 0 : productBeingEdited.productId) ? jsxRuntime.jsx(giger.TableBodyCell, Object.assign({
|
|
14283
15057
|
colSpan: 5
|
|
14284
15058
|
}, {
|
|
14285
|
-
children:
|
|
15059
|
+
children: productForm
|
|
14286
15060
|
})) : jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
14287
15061
|
children: [jsxRuntime.jsx(giger.TableBodyCell, Object.assign({
|
|
14288
15062
|
css: styles$9.itemInfoLeft
|
|
@@ -14296,7 +15070,7 @@ const CustomsItemsDisplay = ({
|
|
|
14296
15070
|
}), jsxRuntime.jsx(giger.Link, Object.assign({
|
|
14297
15071
|
css: styles$9.alertText,
|
|
14298
15072
|
onClick: () => {
|
|
14299
|
-
|
|
15073
|
+
setProductBeingEdited(item);
|
|
14300
15074
|
!isCustomsItemFormOpen && toggleIsCustomsItemFormOpen();
|
|
14301
15075
|
}
|
|
14302
15076
|
}, {
|
|
@@ -14306,10 +15080,7 @@ const CustomsItemsDisplay = ({
|
|
|
14306
15080
|
})), jsxRuntime.jsx(giger.TableBodyCell, Object.assign({
|
|
14307
15081
|
css: styles$9.itemEach
|
|
14308
15082
|
}, {
|
|
14309
|
-
children: formatMoney(
|
|
14310
|
-
amount: Number(item.value),
|
|
14311
|
-
currency: alchemy.SE.Currency.USD
|
|
14312
|
-
})
|
|
15083
|
+
children: formatMoney(item.value)
|
|
14313
15084
|
})), jsxRuntime.jsx(giger.TableBodyCell, Object.assign({
|
|
14314
15085
|
css: styles$9.itemQty
|
|
14315
15086
|
}, {
|
|
@@ -14318,36 +15089,36 @@ const CustomsItemsDisplay = ({
|
|
|
14318
15089
|
css: styles$9.itemTotal
|
|
14319
15090
|
}, {
|
|
14320
15091
|
children: formatMoney({
|
|
14321
|
-
amount: Number(item.value) * item.quantity,
|
|
14322
|
-
currency:
|
|
15092
|
+
amount: Number(item.value.amount) * item.quantity,
|
|
15093
|
+
currency: item.value.currency
|
|
14323
15094
|
})
|
|
14324
15095
|
})), jsxRuntime.jsx(giger.TableBodyCell, Object.assign({
|
|
14325
15096
|
css: styles$9.actionsColumn
|
|
14326
15097
|
}, {
|
|
14327
|
-
children: jsxRuntime.jsx(
|
|
15098
|
+
children: jsxRuntime.jsx(ProductActions, {
|
|
14328
15099
|
onDeleteClick: () => __awaiter(void 0, void 0, void 0, function* () {
|
|
14329
15100
|
var _d;
|
|
14330
|
-
return yield onUpdate((_d =
|
|
15101
|
+
return yield onUpdate((_d = products.filter(ci => ci.productId !== item.productId)) !== null && _d !== void 0 ? _d : []);
|
|
14331
15102
|
}),
|
|
14332
15103
|
onEditClick: () => {
|
|
14333
|
-
|
|
15104
|
+
setProductBeingEdited(item);
|
|
14334
15105
|
!isCustomsItemFormOpen && toggleIsCustomsItemFormOpen();
|
|
14335
15106
|
}
|
|
14336
15107
|
})
|
|
14337
15108
|
}))]
|
|
14338
15109
|
})
|
|
14339
|
-
}), item.
|
|
15110
|
+
}), item.productId !== (productBeingEdited === null || productBeingEdited === void 0 ? void 0 : productBeingEdited.productId) && jsxRuntime.jsx(giger.TableBaseRow, {
|
|
14340
15111
|
children: jsxRuntime.jsx(giger.TableBodyCell, Object.assign({
|
|
14341
15112
|
css: styles$9.hsCode
|
|
14342
15113
|
}, {
|
|
14343
15114
|
children: item.harmonizedTariffCode
|
|
14344
15115
|
}))
|
|
14345
15116
|
})]
|
|
14346
|
-
}, item.
|
|
15117
|
+
}, item.productId))
|
|
14347
15118
|
})
|
|
14348
|
-
})), !isCustomsItemFormOpen &&
|
|
14349
|
-
}), !
|
|
14350
|
-
children: [jsxRuntime.jsx(Spacer, {}),
|
|
15119
|
+
})), !isCustomsItemFormOpen && products.length > 1 && jsxRuntime.jsx(Spacer, {})]
|
|
15120
|
+
}), !productBeingEdited && jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
15121
|
+
children: [jsxRuntime.jsx(Spacer, {}), productForm]
|
|
14351
15122
|
})]
|
|
14352
15123
|
});
|
|
14353
15124
|
};
|
|
@@ -14370,14 +15141,6 @@ const getShipmentSchema = ({
|
|
|
14370
15141
|
confirmation: zod.z.nativeEnum(alchemy.SE.ConfirmationType).default(alchemy.SE.ConfirmationType.NONE),
|
|
14371
15142
|
customs: zod.z.object({
|
|
14372
15143
|
contents: zod.z.nativeEnum(alchemy.SE.CustomsContentsType),
|
|
14373
|
-
customsItems: zod.z.object({
|
|
14374
|
-
countryOfOrigin: zod.z.string().nullishDefault(undefined),
|
|
14375
|
-
customsItemId: zod.z.string().nullishDefault(undefined),
|
|
14376
|
-
description: zod.z.string().nullishDefault(undefined),
|
|
14377
|
-
harmonizedTariffCode: zod.z.string().nullishDefault(undefined),
|
|
14378
|
-
quantity: zod.z.number().int(),
|
|
14379
|
-
value: zod.z.number()
|
|
14380
|
-
}).array().min(1),
|
|
14381
15144
|
nonDelivery: zod.z.nativeEnum(alchemy.SE.CustomsNonDeliveryType)
|
|
14382
15145
|
}).nullish(),
|
|
14383
15146
|
insuranceProvider: zod.z.nativeEnum(alchemy.SE.InsuranceProviderType).default(alchemy.SE.InsuranceProviderType.NONE),
|
|
@@ -14397,6 +15160,14 @@ const getShipmentSchema = ({
|
|
|
14397
15160
|
insuredValue: moneySchema.extend({
|
|
14398
15161
|
amount: zod.z.number().positive()
|
|
14399
15162
|
}).optional(),
|
|
15163
|
+
products: zod.z.object({
|
|
15164
|
+
countryOfOrigin: zod.z.string().nullishDefault(undefined),
|
|
15165
|
+
description: zod.z.string().nullishDefault(undefined),
|
|
15166
|
+
harmonizedTariffCode: zod.z.string().nullishDefault(undefined),
|
|
15167
|
+
productId: zod.z.string().nullishDefault(undefined),
|
|
15168
|
+
quantity: zod.z.number().int(),
|
|
15169
|
+
value: moneySchema
|
|
15170
|
+
}).array().min(1),
|
|
14400
15171
|
type: zod.z.object({
|
|
14401
15172
|
carrierId: zod.z.string().nullish(),
|
|
14402
15173
|
code: zod.z.string().nullish()
|
|
@@ -14493,7 +15264,7 @@ const ShipmentForm = ({
|
|
|
14493
15264
|
charsetWarning,
|
|
14494
15265
|
carriers,
|
|
14495
15266
|
customPackageTypes,
|
|
14496
|
-
|
|
15267
|
+
currency,
|
|
14497
15268
|
features,
|
|
14498
15269
|
hydrateRef,
|
|
14499
15270
|
insuranceAccount,
|
|
@@ -14514,7 +15285,7 @@ const ShipmentForm = ({
|
|
|
14514
15285
|
warehouseId,
|
|
14515
15286
|
warehouses
|
|
14516
15287
|
}) => {
|
|
14517
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
15288
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
14518
15289
|
features = Object.assign({
|
|
14519
15290
|
browseRates: true,
|
|
14520
15291
|
includeShipsuranceInsurance: true,
|
|
@@ -14557,7 +15328,7 @@ const ShipmentForm = ({
|
|
|
14557
15328
|
form.register("shipmentId");
|
|
14558
15329
|
const {
|
|
14559
15330
|
errors: {
|
|
14560
|
-
|
|
15331
|
+
packages: packageErrors
|
|
14561
15332
|
},
|
|
14562
15333
|
isDirty
|
|
14563
15334
|
} = form.formState;
|
|
@@ -14666,6 +15437,7 @@ const ShipmentForm = ({
|
|
|
14666
15437
|
currency: pkg.insuredValue.currency
|
|
14667
15438
|
}
|
|
14668
15439
|
}), {
|
|
15440
|
+
products: pkg.products,
|
|
14669
15441
|
type: Object.assign(Object.assign({}, !customPackage && pkg.packageCode !== "package" && {
|
|
14670
15442
|
carrierId: updatedShipment.carrierId
|
|
14671
15443
|
}), {
|
|
@@ -14686,12 +15458,13 @@ const ShipmentForm = ({
|
|
|
14686
15458
|
}, [findCustomPackage, form, isCustomsRequired, isContentDescriptionRequired]);
|
|
14687
15459
|
// Allow us to imperatively trigger hydrateShipment from parent component
|
|
14688
15460
|
hydrateRef.current = hydrateShipment;
|
|
14689
|
-
// Hydrate only the
|
|
14690
|
-
const
|
|
14691
|
-
|
|
14692
|
-
|
|
14693
|
-
|
|
14694
|
-
|
|
15461
|
+
// Hydrate only the products portion of the shipment form
|
|
15462
|
+
const hydrateProducts = React.useCallback(updatedShipment => {
|
|
15463
|
+
var _a;
|
|
15464
|
+
const formPkg = form.getValues("packages.0");
|
|
15465
|
+
if (((_a = updatedShipment === null || updatedShipment === void 0 ? void 0 : updatedShipment.packages[0]) === null || _a === void 0 ? void 0 : _a.products) && !___default["default"].isEqual(formPkg === null || formPkg === void 0 ? void 0 : formPkg.products, updatedShipment.packages[0].products)) {
|
|
15466
|
+
form.setValue("packages.0.products", updatedShipment.packages[0].products.map(ci => Object.assign(Object.assign({}, ci), {
|
|
15467
|
+
value: ci.value
|
|
14695
15468
|
})), {
|
|
14696
15469
|
shouldValidate: true
|
|
14697
15470
|
});
|
|
@@ -14699,16 +15472,16 @@ const ShipmentForm = ({
|
|
|
14699
15472
|
}, [form]);
|
|
14700
15473
|
const handleSubmit = form.handleSubmit(values => __awaiter(void 0, void 0, void 0, function* () {
|
|
14701
15474
|
try {
|
|
14702
|
-
const
|
|
15475
|
+
const _m = values,
|
|
14703
15476
|
{
|
|
14704
15477
|
__mode: discard
|
|
14705
|
-
} =
|
|
14706
|
-
payload = __rest(
|
|
14707
|
-
const updatedShipment = yield onSubmit(
|
|
15478
|
+
} = _m,
|
|
15479
|
+
payload = __rest(_m, ["__mode"]);
|
|
15480
|
+
const updatedShipment = yield onSubmit(___default["default"].merge(shipment || {}, payload));
|
|
14708
15481
|
// Defer shipment hydration to the task queue so that the submission promise resolves first, otherwise the
|
|
14709
15482
|
// submission count will increment after hydration resets the form, keeping it in revalidate mode
|
|
14710
15483
|
if (updatedShipment) setTimeout(() => hydrateShipment(updatedShipment), 0);
|
|
14711
|
-
} catch (
|
|
15484
|
+
} catch (_o) {
|
|
14712
15485
|
// Reset the form to its current state, but as a side effect this sets isDirty to false
|
|
14713
15486
|
// That way, form lifecycle contract is upheld
|
|
14714
15487
|
form.reset(form.getValues());
|
|
@@ -14780,9 +15553,9 @@ const ShipmentForm = ({
|
|
|
14780
15553
|
// Hydrate customs object with default values
|
|
14781
15554
|
form.setValue("customs", {
|
|
14782
15555
|
contents: alchemy.SE.CustomsContentsType.MERCHANDISE,
|
|
14783
|
-
customsItems: [],
|
|
14784
15556
|
nonDelivery: alchemy.SE.CustomsNonDeliveryType.RETURN_TO_SENDER
|
|
14785
15557
|
});
|
|
15558
|
+
form.setValue("packages.0.products", []);
|
|
14786
15559
|
} else if (wasCustomsRequired && !customsRequired) {
|
|
14787
15560
|
// If customs is no longer required, clear customs object from schema
|
|
14788
15561
|
form.setValue("customs", undefined);
|
|
@@ -14798,20 +15571,19 @@ const ShipmentForm = ({
|
|
|
14798
15571
|
parseAddressErrors,
|
|
14799
15572
|
resetParseAddress
|
|
14800
15573
|
});
|
|
14801
|
-
const
|
|
15574
|
+
const handleUpdateProducts = React.useCallback(products => __awaiter(void 0, void 0, void 0, function* () {
|
|
14802
15575
|
const result = yield onUpdateCustoms === null || onUpdateCustoms === void 0 ? void 0 : onUpdateCustoms({
|
|
14803
15576
|
// use defaults if the shipment doesn't already have a customs object
|
|
14804
15577
|
contents: selectedContentsType !== null && selectedContentsType !== void 0 ? selectedContentsType : "merchandise",
|
|
14805
|
-
customsItems,
|
|
14806
15578
|
nonDelivery: selectedNonDelivery !== null && selectedNonDelivery !== void 0 ? selectedNonDelivery : "return_to_sender"
|
|
14807
|
-
});
|
|
14808
|
-
if (result)
|
|
15579
|
+
}, products);
|
|
15580
|
+
if (result) hydrateProducts(result);
|
|
14809
15581
|
onDirty();
|
|
14810
|
-
}), [
|
|
15582
|
+
}), [hydrateProducts, onDirty, onUpdateCustoms, selectedContentsType, selectedNonDelivery]);
|
|
14811
15583
|
const customsItemErrorScrollToRef = React.useRef(null);
|
|
14812
15584
|
React.useEffect(() => {
|
|
14813
|
-
var _a;
|
|
14814
|
-
if (((_a =
|
|
15585
|
+
var _a, _b;
|
|
15586
|
+
if (((_b = (_a = (packageErrors !== null && packageErrors !== void 0 ? packageErrors : [])[0]) === null || _a === void 0 ? void 0 : _a.products) === null || _b === void 0 ? void 0 : _b.type) === "too_small") {
|
|
14815
15587
|
setTimeout(() => {
|
|
14816
15588
|
var _a;
|
|
14817
15589
|
(_a = customsItemErrorScrollToRef.current) === null || _a === void 0 ? void 0 : _a.scrollIntoView({
|
|
@@ -14820,7 +15592,7 @@ const ShipmentForm = ({
|
|
|
14820
15592
|
});
|
|
14821
15593
|
}, 0);
|
|
14822
15594
|
}
|
|
14823
|
-
}, [
|
|
15595
|
+
}, [packageErrors]);
|
|
14824
15596
|
React.useEffect(() => {
|
|
14825
15597
|
const {
|
|
14826
15598
|
__mode
|
|
@@ -14846,6 +15618,7 @@ const ShipmentForm = ({
|
|
|
14846
15618
|
});
|
|
14847
15619
|
if (!shipment) throw new Error("errorMessages.unableToLoad.shipment");
|
|
14848
15620
|
const addressPreferenceIsEmpty = !addressLoading && isEmptyAddress(addressPreference === null || addressPreference === void 0 ? void 0 : addressPreference.selection); // undefined means it's still loading
|
|
15621
|
+
console.log(addressLoading || isEditShipFormToOpen || addressPreferenceIsEmpty);
|
|
14849
15622
|
return jsxRuntime.jsxs("form", Object.assign({
|
|
14850
15623
|
id: "shipment-form",
|
|
14851
15624
|
onSubmit: formLogger.capture(handleSubmit)
|
|
@@ -14988,10 +15761,10 @@ const ShipmentForm = ({
|
|
|
14988
15761
|
name: "customs.nonDelivery",
|
|
14989
15762
|
options: customsNonDeliveryOptions,
|
|
14990
15763
|
shouldUnregister: true
|
|
14991
|
-
}), jsxRuntime.jsx(
|
|
14992
|
-
onUpdate:
|
|
15764
|
+
}), jsxRuntime.jsx(ProductsDisplay, {
|
|
15765
|
+
onUpdate: handleUpdateProducts,
|
|
14993
15766
|
shipment: shipment
|
|
14994
|
-
}), ((_e =
|
|
15767
|
+
}), ((_f = (_e = (packageErrors !== null && packageErrors !== void 0 ? packageErrors : [])[0]) === null || _e === void 0 ? void 0 : _e.products) === null || _f === void 0 ? void 0 : _f.type) === "too_small" && jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
14995
15768
|
children: [jsxRuntime.jsx(Spacer, {}), jsxRuntime.jsx(giger.InlineNotification, {
|
|
14996
15769
|
title: t("purchase-label:errorMessages.customsItemsRequired"),
|
|
14997
15770
|
type: giger.NotificationType.ERROR
|
|
@@ -15183,14 +15956,14 @@ const ShipmentForm = ({
|
|
|
15183
15956
|
label: "purchase-label:fields.addOns"
|
|
15184
15957
|
}, {
|
|
15185
15958
|
children: [jsxRuntime.jsx(Switch, Object.assign({
|
|
15186
|
-
defaultChecked: ((
|
|
15959
|
+
defaultChecked: ((_g = shipment === null || shipment === void 0 ? void 0 : shipment.confirmation) !== null && _g !== void 0 ? _g : "none") !== "none",
|
|
15187
15960
|
label: t("purchase-label:fields.confirmation"),
|
|
15188
15961
|
name: "confirmationEnabled",
|
|
15189
15962
|
onChange: e => form.setValue("confirmation", e.target.checked ? alchemy.SE.ConfirmationType.DELIVERY : undefined, {
|
|
15190
15963
|
shouldDirty: true
|
|
15191
15964
|
}),
|
|
15192
15965
|
shouldUnmount: true,
|
|
15193
|
-
value: ((
|
|
15966
|
+
value: ((_h = shipment === null || shipment === void 0 ? void 0 : shipment.confirmation) !== null && _h !== void 0 ? _h : "none") !== "none"
|
|
15194
15967
|
}, {
|
|
15195
15968
|
children: jsxRuntime.jsx(Select, {
|
|
15196
15969
|
control: form.control,
|
|
@@ -15202,7 +15975,7 @@ const ShipmentForm = ({
|
|
|
15202
15975
|
shouldUnregister: true
|
|
15203
15976
|
})
|
|
15204
15977
|
})), jsxRuntime.jsxs(Switch, Object.assign({
|
|
15205
|
-
defaultChecked: ((
|
|
15978
|
+
defaultChecked: ((_j = shipment === null || shipment === void 0 ? void 0 : shipment.insuranceProvider) !== null && _j !== void 0 ? _j : "none") !== "none",
|
|
15206
15979
|
label: t("purchase-label:fields.insurance"),
|
|
15207
15980
|
name: "insuranceEnabled",
|
|
15208
15981
|
onChange: e => {
|
|
@@ -15212,7 +15985,7 @@ const ShipmentForm = ({
|
|
|
15212
15985
|
});
|
|
15213
15986
|
},
|
|
15214
15987
|
shouldUnmount: true,
|
|
15215
|
-
value: ((
|
|
15988
|
+
value: ((_k = shipment === null || shipment === void 0 ? void 0 : shipment.insuranceProvider) !== null && _k !== void 0 ? _k : "none") !== "none"
|
|
15216
15989
|
}, {
|
|
15217
15990
|
children: [insuranceProviderOptions.length === 1 && insuranceProviderOptions[0].value === "carrier" ? null : jsxRuntime.jsx(Select, {
|
|
15218
15991
|
control: form.control,
|
|
@@ -15226,7 +15999,7 @@ const ShipmentForm = ({
|
|
|
15226
15999
|
control: form.control,
|
|
15227
16000
|
defaultValue: {
|
|
15228
16001
|
amount: undefined,
|
|
15229
|
-
currency
|
|
16002
|
+
currency
|
|
15230
16003
|
},
|
|
15231
16004
|
displayLabel: false,
|
|
15232
16005
|
label: t("purchase-label:fields.insuredValue"),
|
|
@@ -15236,7 +16009,7 @@ const ShipmentForm = ({
|
|
|
15236
16009
|
showCurrencySymbol: true
|
|
15237
16010
|
})]
|
|
15238
16011
|
})), hasUpsOptions && jsxRuntime.jsx(Switch, {
|
|
15239
|
-
defaultChecked: ((
|
|
16012
|
+
defaultChecked: ((_l = shipment === null || shipment === void 0 ? void 0 : shipment.advancedOptions) === null || _l === void 0 ? void 0 : _l.additionalHandling) || false,
|
|
15240
16013
|
label: jsxRuntime.jsx(reactI18next.Trans, {
|
|
15241
16014
|
components: {
|
|
15242
16015
|
Link: jsxRuntime.jsx(giger.Link, {
|
|
@@ -15455,10 +16228,13 @@ const useCustoms = ({
|
|
|
15455
16228
|
error: updateShipmentErrors,
|
|
15456
16229
|
mutateAsync: updateShipment
|
|
15457
16230
|
} = alchemy.useUpdateSalesOrderShipment();
|
|
15458
|
-
const handleUpdateCustoms = React.useCallback(customs => __awaiter(void 0, void 0, void 0, function* () {
|
|
16231
|
+
const handleUpdateCustoms = React.useCallback((customs, products) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15459
16232
|
if (!shipment) throw new Error("shipment not found");
|
|
15460
16233
|
const updatedShipment = yield updateShipment(Object.assign(Object.assign({}, shipment), {
|
|
15461
16234
|
customs,
|
|
16235
|
+
packages: [Object.assign(Object.assign({}, shipment.packages[0]), {
|
|
16236
|
+
products
|
|
16237
|
+
})],
|
|
15462
16238
|
shipDate: isNowOrInTheFuture(shipment.shipDate) ? shipment.shipDate : undefined
|
|
15463
16239
|
}));
|
|
15464
16240
|
if (updatedShipment) {
|
|
@@ -15482,10 +16258,10 @@ const usePresets = ({
|
|
|
15482
16258
|
} = alchemy.useUpdateSalesOrderShipment();
|
|
15483
16259
|
const handleApplyPreset = preset => __awaiter(void 0, void 0, void 0, function* () {
|
|
15484
16260
|
if (!shipment) throw new Error("shipment not found");
|
|
15485
|
-
const updatedShipment = yield updateShipment(
|
|
16261
|
+
const updatedShipment = yield updateShipment(___default["default"].merge(shipment, preset.serviceCode && preset.carrierId && {
|
|
15486
16262
|
carrierId: preset.carrierId,
|
|
15487
16263
|
serviceCode: preset.serviceCode
|
|
15488
|
-
}
|
|
16264
|
+
}, {
|
|
15489
16265
|
confirmation: preset.confirmation,
|
|
15490
16266
|
insuranceProvider: preset.insuranceProvider,
|
|
15491
16267
|
packages: preset.weight && preset.packageCode ? [{
|
|
@@ -16117,6 +16893,7 @@ const ConfigureShipment = _a => {
|
|
|
16117
16893
|
var {
|
|
16118
16894
|
errors,
|
|
16119
16895
|
features,
|
|
16896
|
+
currency,
|
|
16120
16897
|
getPreferredRates,
|
|
16121
16898
|
onAddressValidation,
|
|
16122
16899
|
onApplyPreset,
|
|
@@ -16133,7 +16910,7 @@ const ConfigureShipment = _a => {
|
|
|
16133
16910
|
shipment,
|
|
16134
16911
|
onBeforeRateSaved
|
|
16135
16912
|
} = _a,
|
|
16136
|
-
props = __rest(_a, ["errors", "features", "getPreferredRates", "onAddressValidation", "onApplyPreset", "onBeforeLabelCreate", "onChangeAddress", "onLabelCreateFailure", "onLabelCreateSuccess", "onRateSaved", "onRatesCalculated", "onShipmentUpdated", "printLabelLayout", "preferredServiceCodes", "salesOrder", "shipment", "onBeforeRateSaved"]);
|
|
16913
|
+
props = __rest(_a, ["errors", "features", "currency", "getPreferredRates", "onAddressValidation", "onApplyPreset", "onBeforeLabelCreate", "onChangeAddress", "onLabelCreateFailure", "onLabelCreateSuccess", "onRateSaved", "onRatesCalculated", "onShipmentUpdated", "printLabelLayout", "preferredServiceCodes", "salesOrder", "shipment", "onBeforeRateSaved"]);
|
|
16137
16914
|
const hydrateRef = React.useRef();
|
|
16138
16915
|
const {
|
|
16139
16916
|
isInternational
|
|
@@ -16210,10 +16987,12 @@ const ConfigureShipment = _a => {
|
|
|
16210
16987
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
16211
16988
|
children: [jsxRuntime.jsx(ShipmentForm, Object.assign({}, shipmentFormProps, props, {
|
|
16212
16989
|
charsetWarning: charsetWarning,
|
|
16990
|
+
currency: currency,
|
|
16213
16991
|
features: features === null || features === void 0 ? void 0 : features.shipmentForm,
|
|
16214
16992
|
hydrateRef: hydrateRef,
|
|
16215
16993
|
onDirty: handleOnDirty
|
|
16216
16994
|
})), jsxRuntime.jsx(RateForm, Object.assign({}, rateFormProps, {
|
|
16995
|
+
currency: currency,
|
|
16217
16996
|
disabled: charsetWarning === null || charsetWarning === void 0 ? void 0 : charsetWarning.error,
|
|
16218
16997
|
displayableShipmentErrors: shipmentFormProps.displayableErrors,
|
|
16219
16998
|
features: features,
|
|
@@ -16254,16 +17033,18 @@ const usePendingShipment = ({
|
|
|
16254
17033
|
const defaultWarehouse = (_a = warehouses === null || warehouses === void 0 ? void 0 : warehouses.find(w => w.warehouseId === warehouseId)) !== null && _a !== void 0 ? _a : warehouses === null || warehouses === void 0 ? void 0 : warehouses[0];
|
|
16255
17034
|
const handleShipmentCreation = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
16256
17035
|
if (!salesOrder || !defaultWarehouse || isCreatingShipment) return;
|
|
17036
|
+
const customsFromSalesOrder = getCustomsFromSalesOrder(salesOrder, defaultWarehouse);
|
|
16257
17037
|
try {
|
|
16258
17038
|
setIsCreatingShipment(true);
|
|
16259
17039
|
const shipment = yield createShipment(Object.assign(Object.assign({
|
|
16260
17040
|
salesOrderId: salesOrder.salesOrderId,
|
|
16261
17041
|
warehouseId: defaultWarehouse.warehouseId
|
|
16262
17042
|
}, getIsCustomsRequiredForSalesOrder(salesOrder, defaultWarehouse) && {
|
|
16263
|
-
customs:
|
|
17043
|
+
customs: customsFromSalesOrder.customs
|
|
16264
17044
|
}), {
|
|
16265
17045
|
packages: [{
|
|
16266
17046
|
packageCode: "package",
|
|
17047
|
+
products: customsFromSalesOrder.products,
|
|
16267
17048
|
weight: {
|
|
16268
17049
|
unit: "pound",
|
|
16269
17050
|
value: 0
|
|
@@ -17277,7 +18058,7 @@ const useImportSalesOrder = ({
|
|
|
17277
18058
|
};
|
|
17278
18059
|
|
|
17279
18060
|
const PurchaseLabelBySalesOrder = _a => {
|
|
17280
|
-
var _b;
|
|
18061
|
+
var _b, _c;
|
|
17281
18062
|
var {
|
|
17282
18063
|
features,
|
|
17283
18064
|
externalOrderId,
|
|
@@ -17287,10 +18068,11 @@ const PurchaseLabelBySalesOrder = _a => {
|
|
|
17287
18068
|
orderSourceCode,
|
|
17288
18069
|
salesOrderId,
|
|
17289
18070
|
warehouseId,
|
|
17290
|
-
printLabelLayout
|
|
18071
|
+
printLabelLayout,
|
|
18072
|
+
currency = alchemy.SE.Currency.USD
|
|
17291
18073
|
} = _a,
|
|
17292
|
-
props = __rest(_a, ["features", "externalOrderId", "externalOrderNumber", "onLoad", "onShipmentUpdated", "orderSourceCode", "salesOrderId", "warehouseId", "printLabelLayout"]);
|
|
17293
|
-
const
|
|
18074
|
+
props = __rest(_a, ["features", "externalOrderId", "externalOrderNumber", "onLoad", "onShipmentUpdated", "orderSourceCode", "salesOrderId", "warehouseId", "printLabelLayout", "currency"]);
|
|
18075
|
+
const _d = useImportSalesOrder({
|
|
17294
18076
|
externalOrderId,
|
|
17295
18077
|
externalOrderNumber,
|
|
17296
18078
|
orderSourceCode,
|
|
@@ -17299,8 +18081,8 @@ const PurchaseLabelBySalesOrder = _a => {
|
|
|
17299
18081
|
{
|
|
17300
18082
|
salesOrder,
|
|
17301
18083
|
isLoading: salesOrderLoading
|
|
17302
|
-
} =
|
|
17303
|
-
salesOrderProps = __rest(
|
|
18084
|
+
} = _d,
|
|
18085
|
+
salesOrderProps = __rest(_d, ["salesOrder", "isLoading"]);
|
|
17304
18086
|
const configureShipmentProps = useConfigureShipment({
|
|
17305
18087
|
errorWhenShipmentCancelled: (_b = features === null || features === void 0 ? void 0 : features.configureShipment) === null || _b === void 0 ? void 0 : _b.enableErrorWhenShipmentCancelled,
|
|
17306
18088
|
onLoad,
|
|
@@ -17311,14 +18093,15 @@ const PurchaseLabelBySalesOrder = _a => {
|
|
|
17311
18093
|
});
|
|
17312
18094
|
const {
|
|
17313
18095
|
data: insuranceAccount,
|
|
17314
|
-
|
|
17315
|
-
} = alchemy.useGetInsuranceAccount(
|
|
18096
|
+
isInitialLoading: insuranceIsLoading
|
|
18097
|
+
} = alchemy.useGetInsuranceAccount(((_c = configureShipmentProps === null || configureShipmentProps === void 0 ? void 0 : configureShipmentProps.shipment) === null || _c === void 0 ? void 0 : _c.insuranceProvider) === alchemy.SE.InsuranceProviderType.SHIPSURANCE ? alchemy.SE.InsuranceProviderType.SHIPSURANCE : undefined);
|
|
17316
18098
|
return jsxRuntime.jsx(SuspendSalesOrder, Object.assign({
|
|
17317
18099
|
salesOrder: salesOrder
|
|
17318
18100
|
}, salesOrderProps, {
|
|
17319
18101
|
isLoading: salesOrderLoading || configureShipmentProps.isLoading || insuranceIsLoading
|
|
17320
18102
|
}, {
|
|
17321
18103
|
children: salesOrder && jsxRuntime.jsx(ConfigureShipment, Object.assign({
|
|
18104
|
+
currency: currency,
|
|
17322
18105
|
features: features,
|
|
17323
18106
|
insuranceAccount: insuranceAccount,
|
|
17324
18107
|
salesOrder: salesOrder
|
|
@@ -17401,9 +18184,10 @@ const PurchaseLabelByShipment = _a => {
|
|
|
17401
18184
|
var {
|
|
17402
18185
|
onLoad,
|
|
17403
18186
|
onShipmentUpdated,
|
|
17404
|
-
shipmentId
|
|
18187
|
+
shipmentId,
|
|
18188
|
+
currency = alchemy.SE.Currency.USD
|
|
17405
18189
|
} = _a,
|
|
17406
|
-
props = __rest(_a, ["onLoad", "onShipmentUpdated", "shipmentId"]);
|
|
18190
|
+
props = __rest(_a, ["onLoad", "onShipmentUpdated", "shipmentId", "currency"]);
|
|
17407
18191
|
const _b = useGetOrCreateShipment(onShipmentUpdated, shipmentId),
|
|
17408
18192
|
{
|
|
17409
18193
|
shipment
|
|
@@ -17416,11 +18200,12 @@ const PurchaseLabelByShipment = _a => {
|
|
|
17416
18200
|
const {
|
|
17417
18201
|
data: insuranceAccount,
|
|
17418
18202
|
isInitialLoading: insuranceIsLoading
|
|
17419
|
-
} = alchemy.useGetInsuranceAccount(
|
|
18203
|
+
} = alchemy.useGetInsuranceAccount((shipment === null || shipment === void 0 ? void 0 : shipment.insuranceProvider) === alchemy.SE.InsuranceProviderType.SHIPSURANCE ? alchemy.SE.InsuranceProviderType.SHIPSURANCE : undefined);
|
|
17420
18204
|
return jsxRuntime.jsx(SuspendShipment, Object.assign({
|
|
17421
18205
|
shipment: shipment
|
|
17422
18206
|
}, shipmentProps, {
|
|
17423
18207
|
children: shipment && jsxRuntime.jsx(ConfigureShipment, Object.assign({
|
|
18208
|
+
currency: currency,
|
|
17424
18209
|
errors: shipmentProps.errors,
|
|
17425
18210
|
insuranceAccount: insuranceAccount,
|
|
17426
18211
|
isLoading: shipmentProps.isLoading || insuranceIsLoading,
|
|
@@ -17455,7 +18240,7 @@ const PurchaseLabelByShipment = _a => {
|
|
|
17455
18240
|
* @see {@link PurchaseLabel.Element | The **Element** created to render `<PurchaseLabel />`}
|
|
17456
18241
|
*/
|
|
17457
18242
|
const Component$4 = _a => {
|
|
17458
|
-
var _b;
|
|
18243
|
+
var _b, _c;
|
|
17459
18244
|
var {
|
|
17460
18245
|
features
|
|
17461
18246
|
} = _a,
|
|
@@ -17463,15 +18248,22 @@ const Component$4 = _a => {
|
|
|
17463
18248
|
const {
|
|
17464
18249
|
t
|
|
17465
18250
|
} = reactI18next.useTranslation();
|
|
17466
|
-
const
|
|
17467
|
-
|
|
18251
|
+
const {
|
|
18252
|
+
data: warehouses
|
|
18253
|
+
} = alchemy.useListWarehouses();
|
|
18254
|
+
const {
|
|
18255
|
+
data: carriers
|
|
18256
|
+
} = alchemy.useListCarriers();
|
|
18257
|
+
const {
|
|
18258
|
+
data: fundingSource
|
|
18259
|
+
} = alchemy.useListFundingSources();
|
|
18260
|
+
const currency = getCurrencyFromString((_b = fundingSource === null || fundingSource === void 0 ? void 0 : fundingSource[0]) === null || _b === void 0 ? void 0 : _b.currencyCode);
|
|
17468
18261
|
const incompleteRequirementsKeys = React.useMemo(() => {
|
|
17469
|
-
|
|
17470
|
-
const
|
|
17471
|
-
const isMissingCarrier = ((_b = carriers.data) === null || _b === void 0 ? void 0 : _b.length) === 0;
|
|
18262
|
+
const isMissingWarehouse = (warehouses === null || warehouses === void 0 ? void 0 : warehouses.length) === 0;
|
|
18263
|
+
const isMissingCarrier = (carriers === null || carriers === void 0 ? void 0 : carriers.length) === 0;
|
|
17472
18264
|
return isMissingWarehouse && isMissingCarrier ? ["noWarehouseOrCarrier"] : [isMissingWarehouse && "noWarehouse", isMissingCarrier && "noCarrier"].filter(Boolean);
|
|
17473
18265
|
}, [carriers, warehouses]);
|
|
17474
|
-
const partnerMessages = (
|
|
18266
|
+
const partnerMessages = (_c = features === null || features === void 0 ? void 0 : features.partnerMessages) === null || _c === void 0 ? void 0 : _c.incompleteLabelPurchaseRequirements;
|
|
17475
18267
|
const incompleteRequirementsError = partnerMessages ? partnerMessages : t("errorMessages.incompleteLabelPurchaseRequirements", {
|
|
17476
18268
|
requirements: incompleteRequirementsKeys.map(key => t(`purchase-label:requirements.${key}`))
|
|
17477
18269
|
});
|
|
@@ -17479,9 +18271,13 @@ const Component$4 = _a => {
|
|
|
17479
18271
|
if ("salesOrderId" in props || "orderSourceCode" in props) {
|
|
17480
18272
|
return jsxRuntime.jsx(PurchaseLabelBySalesOrder, Object.assign({
|
|
17481
18273
|
features: features
|
|
17482
|
-
}, props
|
|
18274
|
+
}, props, {
|
|
18275
|
+
currency: currency
|
|
18276
|
+
}));
|
|
17483
18277
|
} else {
|
|
17484
|
-
return jsxRuntime.jsx(PurchaseLabelByShipment, Object.assign({}, props
|
|
18278
|
+
return jsxRuntime.jsx(PurchaseLabelByShipment, Object.assign({}, props, {
|
|
18279
|
+
currency: currency
|
|
18280
|
+
}));
|
|
17485
18281
|
}
|
|
17486
18282
|
};
|
|
17487
18283
|
/**
|
|
@@ -18717,7 +19513,7 @@ const styles$5 = createStyles({
|
|
|
18717
19513
|
}),
|
|
18718
19514
|
presetOption: theme => ({
|
|
18719
19515
|
"&:hover": {
|
|
18720
|
-
backgroundColor: theme.palette.gray.ultraLight
|
|
19516
|
+
backgroundColor: "theme.palette.gray.ultraLight"
|
|
18721
19517
|
},
|
|
18722
19518
|
backgroundColor: "transparent",
|
|
18723
19519
|
borderRadius: "4px",
|
|
@@ -18728,7 +19524,7 @@ const styles$5 = createStyles({
|
|
|
18728
19524
|
"&:hover": {
|
|
18729
19525
|
backgroundColor: "#d1d4d7"
|
|
18730
19526
|
},
|
|
18731
|
-
backgroundColor:
|
|
19527
|
+
backgroundColor: "#E4E5E7",
|
|
18732
19528
|
borderRadius: "4px",
|
|
18733
19529
|
cursor: "pointer",
|
|
18734
19530
|
display: "flex",
|
|
@@ -18741,7 +19537,8 @@ const styles$5 = createStyles({
|
|
|
18741
19537
|
const ThemeCreator = ({
|
|
18742
19538
|
themeConfig,
|
|
18743
19539
|
onUpdateThemeConfig,
|
|
18744
|
-
presets
|
|
19540
|
+
presets,
|
|
19541
|
+
showDrawer
|
|
18745
19542
|
}) => {
|
|
18746
19543
|
const defaultThemeConfigRef = React.useRef(themeConfig);
|
|
18747
19544
|
const [isDrawerOpen, setIsDrawerOpen] = React.useState(false);
|
|
@@ -18795,7 +19592,7 @@ const ThemeCreator = ({
|
|
|
18795
19592
|
return null;
|
|
18796
19593
|
}
|
|
18797
19594
|
};
|
|
18798
|
-
const formattedThemeObj = `const theme = ${JSON.stringify(themeConfig, null, 2)}`;
|
|
19595
|
+
// const formattedThemeObj = `const theme = ${JSON.stringify(themeConfig, null, 2)}`;
|
|
18799
19596
|
const presetsRef = React.useRef(null);
|
|
18800
19597
|
const [showPresets, toggleShowPresets] = useToggle(false);
|
|
18801
19598
|
const applyPreset = theme => {
|
|
@@ -18817,54 +19614,67 @@ const ThemeCreator = ({
|
|
|
18817
19614
|
onSelectTab: handleSelectedTab,
|
|
18818
19615
|
selectedTab: selectedTab,
|
|
18819
19616
|
tabs: formattedThemeTabs
|
|
18820
|
-
}), jsxRuntime.jsxs("
|
|
18821
|
-
|
|
18822
|
-
|
|
19617
|
+
}), presets ? jsxRuntime.jsxs("div", {
|
|
19618
|
+
children: [jsxRuntime.jsxs("button", Object.assign({
|
|
19619
|
+
"aria-controls": "presets-popover",
|
|
19620
|
+
"aria-expanded": showPresets,
|
|
19621
|
+
css: styles$5.presetsButton,
|
|
19622
|
+
onClick: e => {
|
|
19623
|
+
e.preventDefault();
|
|
19624
|
+
toggleShowPresets();
|
|
19625
|
+
},
|
|
19626
|
+
ref: presetsRef
|
|
19627
|
+
}, {
|
|
19628
|
+
children: ["Presets", jsxRuntime.jsx(giger.Icon, {
|
|
19629
|
+
name: gigerTheme.IconNames.CARET_BOTTOM,
|
|
19630
|
+
size: giger.IconSize.SIZE_SMALL
|
|
19631
|
+
})]
|
|
19632
|
+
})), jsxRuntime.jsx(giger.Popover, Object.assign({
|
|
19633
|
+
container: document.querySelector("#theme-creator"),
|
|
19634
|
+
isOpen: showPresets,
|
|
19635
|
+
onClickAway: () => toggleShowPresets(),
|
|
19636
|
+
placement: "bottom-end",
|
|
19637
|
+
reference: presetsRef.current
|
|
19638
|
+
}, {
|
|
19639
|
+
children: jsxRuntime.jsxs("div", Object.assign({
|
|
19640
|
+
css: styles$5.popoverWrapper
|
|
19641
|
+
}, {
|
|
19642
|
+
children: [jsxRuntime.jsx("button", Object.assign({
|
|
19643
|
+
"aria-label": "Set Default Theme",
|
|
19644
|
+
css: styles$5.presetOption,
|
|
19645
|
+
onClick: e => {
|
|
19646
|
+
e.preventDefault();
|
|
19647
|
+
toggleShowPresets();
|
|
19648
|
+
applyPreset(defaultThemeConfigRef.current);
|
|
19649
|
+
},
|
|
19650
|
+
role: "menuitem"
|
|
19651
|
+
}, {
|
|
19652
|
+
children: "Default"
|
|
19653
|
+
})), presets.map(preset => jsxRuntime.jsx("button", Object.assign({
|
|
19654
|
+
"aria-label": `Set ${preset.presetName} Theme`,
|
|
19655
|
+
css: styles$5.presetOption,
|
|
19656
|
+
onClick: e => {
|
|
19657
|
+
e.preventDefault();
|
|
19658
|
+
toggleShowPresets();
|
|
19659
|
+
applyPreset(preset.themeConfig);
|
|
19660
|
+
},
|
|
19661
|
+
role: "menuitem"
|
|
19662
|
+
}, {
|
|
19663
|
+
children: preset.presetName
|
|
19664
|
+
}), preset.presetName))]
|
|
19665
|
+
}))
|
|
19666
|
+
}))]
|
|
19667
|
+
}) :
|
|
19668
|
+
//reset to default button
|
|
19669
|
+
jsxRuntime.jsx("button", Object.assign({
|
|
19670
|
+
"aria-label": "Set Default Theme",
|
|
18823
19671
|
css: styles$5.presetsButton,
|
|
18824
|
-
onClick:
|
|
18825
|
-
|
|
18826
|
-
toggleShowPresets();
|
|
19672
|
+
onClick: () => {
|
|
19673
|
+
applyPreset(defaultThemeConfigRef.current);
|
|
18827
19674
|
},
|
|
18828
|
-
|
|
18829
|
-
}, {
|
|
18830
|
-
children: ["Presets", jsxRuntime.jsx(giger.Icon, {
|
|
18831
|
-
name: gigerTheme.IconNames.CARET_BOTTOM,
|
|
18832
|
-
size: giger.IconSize.SIZE_SMALL
|
|
18833
|
-
})]
|
|
18834
|
-
})), jsxRuntime.jsx(giger.Popover, Object.assign({
|
|
18835
|
-
container: document.querySelector("#theme-creator"),
|
|
18836
|
-
isOpen: showPresets,
|
|
18837
|
-
onClickAway: () => toggleShowPresets(),
|
|
18838
|
-
placement: "bottom-end",
|
|
18839
|
-
reference: presetsRef.current
|
|
19675
|
+
role: "menuitem"
|
|
18840
19676
|
}, {
|
|
18841
|
-
children:
|
|
18842
|
-
css: styles$5.popoverWrapper
|
|
18843
|
-
}, {
|
|
18844
|
-
children: [jsxRuntime.jsx("button", Object.assign({
|
|
18845
|
-
"aria-label": "Set Default Theme",
|
|
18846
|
-
css: styles$5.presetOption,
|
|
18847
|
-
onClick: e => {
|
|
18848
|
-
e.preventDefault();
|
|
18849
|
-
toggleShowPresets();
|
|
18850
|
-
applyPreset(defaultThemeConfigRef.current);
|
|
18851
|
-
},
|
|
18852
|
-
role: "menuitem"
|
|
18853
|
-
}, {
|
|
18854
|
-
children: "Default"
|
|
18855
|
-
})), presets && presets.map(preset => jsxRuntime.jsx("button", Object.assign({
|
|
18856
|
-
"aria-label": `Set ${preset.presetName} Theme`,
|
|
18857
|
-
css: styles$5.presetOption,
|
|
18858
|
-
onClick: e => {
|
|
18859
|
-
e.preventDefault();
|
|
18860
|
-
toggleShowPresets();
|
|
18861
|
-
applyPreset(preset.themeConfig);
|
|
18862
|
-
},
|
|
18863
|
-
role: "menuitem"
|
|
18864
|
-
}, {
|
|
18865
|
-
children: preset.presetName
|
|
18866
|
-
}), preset.presetName))]
|
|
18867
|
-
}))
|
|
19677
|
+
children: "Reset to Default"
|
|
18868
19678
|
}))]
|
|
18869
19679
|
})), jsxRuntime.jsx(giger.Typography, Object.assign({
|
|
18870
19680
|
role: "heading",
|
|
@@ -18872,29 +19682,27 @@ const ThemeCreator = ({
|
|
|
18872
19682
|
}, {
|
|
18873
19683
|
children: `${selectedTab} Editor`
|
|
18874
19684
|
})), renderContentBySelectedTab(themeConfig, selectedTab)]
|
|
18875
|
-
})), jsxRuntime.jsx(Drawer, Object.assign({
|
|
18876
|
-
"aria-label": "Show
|
|
19685
|
+
})), showDrawer && jsxRuntime.jsx(Drawer, Object.assign({
|
|
19686
|
+
"aria-label": "Show themeConfig.js Code Drawer",
|
|
18877
19687
|
headerContent: jsxRuntime.jsxs("div", Object.assign({
|
|
18878
19688
|
css: styles$5.drawerHeader
|
|
18879
19689
|
}, {
|
|
18880
19690
|
children: [jsxRuntime.jsx("pre", Object.assign({
|
|
18881
19691
|
css: styles$5.pre
|
|
18882
19692
|
}, {
|
|
18883
|
-
children: "
|
|
18884
|
-
})), jsxRuntime.jsx("div", Object.assign({
|
|
19693
|
+
children: "themeConfig.js"
|
|
19694
|
+
})), showDrawer.copyToClipboardText && jsxRuntime.jsx("div", Object.assign({
|
|
18885
19695
|
css: styles$5.copy
|
|
18886
19696
|
}, {
|
|
18887
19697
|
children: jsxRuntime.jsx(CopyButton, {
|
|
18888
|
-
content:
|
|
19698
|
+
content: showDrawer.copyToClipboardText
|
|
18889
19699
|
})
|
|
18890
19700
|
}))]
|
|
18891
19701
|
})),
|
|
18892
19702
|
isOpen: isDrawerOpen,
|
|
18893
19703
|
toggleDrawer: () => setIsDrawerOpen(!isDrawerOpen)
|
|
18894
19704
|
}, {
|
|
18895
|
-
children:
|
|
18896
|
-
code: formattedThemeObj
|
|
18897
|
-
})
|
|
19705
|
+
children: showDrawer.content
|
|
18898
19706
|
}))]
|
|
18899
19707
|
}));
|
|
18900
19708
|
};
|
|
@@ -19893,7 +20701,6 @@ exports.CarrierBalance = CarrierBalance;
|
|
|
19893
20701
|
exports.CarrierIcon = CarrierIcon;
|
|
19894
20702
|
exports.CarrierLogo = CarrierLogo;
|
|
19895
20703
|
exports.CellFormattedDate = CellFormattedDate;
|
|
19896
|
-
exports.CodeBlock = CodeBlock;
|
|
19897
20704
|
exports.CollapsiblePanel = CollapsiblePanel;
|
|
19898
20705
|
exports.CopyButton = CopyButton;
|
|
19899
20706
|
exports.Country = Country;
|
|
@@ -19968,6 +20775,8 @@ exports.formatMoney = formatMoney;
|
|
|
19968
20775
|
exports.getAddFundsSchema = getAddFundsSchema;
|
|
19969
20776
|
exports.getCancelledShipment = getCancelledShipment;
|
|
19970
20777
|
exports.getCarrierIdByCarrierCode = getCarrierIdByCarrierCode;
|
|
20778
|
+
exports.getCurrencyFromString = getCurrencyFromString;
|
|
20779
|
+
exports.getCurrencySymbolFromString = getCurrencySymbolFromString;
|
|
19971
20780
|
exports.getCustomsFromSalesOrder = getCustomsFromSalesOrder;
|
|
19972
20781
|
exports.getExpirationYears = getExpirationYears;
|
|
19973
20782
|
exports.getFeatures = getFeatures;
|