@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.js
CHANGED
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import { useEffect, useContext, useRef, createElement as createElement$2, forwardRef, useCallback, useReducer, useMemo, useState, memo, createContext, useLayoutEffect, Fragment as Fragment$1 } from 'react';
|
|
4
4
|
import { useController, get as get$2, set as set$2, useWatch, useFormState, useForm } from 'react-hook-form';
|
|
5
5
|
import { useTranslation, Trans } from 'react-i18next';
|
|
6
|
-
import alchemy, { logger,
|
|
6
|
+
import alchemy, { logger, SE, AlchemyContext, useValidateAddresses, useAddFunds, useGetCarrierById, useUpdateAutoFunding, useGetAutoFundingConfiguration, useUpdateFundingSource, useListFundingSources, useListCarriers, useConnectCarrier, useListWarehouses, useUpdateWarehouse, useCreateWarehouse, useDeleteWarehouse, useGetFundingSourceTransactions, useListSalesOrderShipments, useGetAccountSettings, useUpdateAccountSettings, useUpdateSalesOrderShipment, useParseAddress, useListCustomPackageTypes, useCalculateRates, useGetShipmentRates, useListLabels, useCreateLabel, useCreateSalesOrderShipment, CodedError, useListSalesOrders, useGetSalesOrder, useListOrderSources, useRefreshOrderSource, useGetInsuranceAccount, useCreateShipment, useGetShipment, useGetSalesOrderShipment, useGetLabel, useVoidLabel, useCreateFundingSource, useRegisterCarrier, useGetFundingSourceMetadata } from '@shipengine/alchemy';
|
|
7
7
|
import { Typography, FormField, FieldMessageType, Checkbox, Input, Icon, IconSize, Divider, Link, SelectAutocomplete, Select as Select$1, OptionGroup, Option, Button, Switch as Switch$1, Textarea, InlineNotification, NotificationType, Spinner, SpinnerSize, ChipList, Chip, ButtonVariant, ButtonSize, DatePicker as DatePicker$1, Table, TableFooter, TableHeader, TableHeaderRow, TableHeaderCell, TableBody, TableRow, TableBodyCell, TableBaseRow, DropdownOptionList, Pagination, Grid, GridChild, RadioGroup, Radio, ButtonColor, Tag, TagColor, Skeleton, SkeletonAnimation, SkeletonVariant, SkeletonBackgroundColor, Popover, BottomSheet, IconTooltip, Stepper, Step } from '@shipengine/giger';
|
|
8
8
|
import axios from 'axios';
|
|
9
9
|
import _$3, { get as get$1, isEqual, merge as merge$1 } from 'lodash';
|
|
@@ -20,7 +20,6 @@ import { css } from '@emotion/css';
|
|
|
20
20
|
import { createPortal } from 'react-dom';
|
|
21
21
|
import { encode } from 'js-base64';
|
|
22
22
|
import { isValidPhoneNumber } from 'libphonenumber-js/min';
|
|
23
|
-
import { Highlight, themes } from 'prism-react-renderer';
|
|
24
23
|
import copy from 'copy-to-clipboard';
|
|
25
24
|
import { useQueryClient, useMutation } from '@tanstack/react-query';
|
|
26
25
|
import cardValidator from 'card-validator';
|
|
@@ -2893,6 +2892,47 @@ const formatExpiration = exp => {
|
|
|
2893
2892
|
if (digits.length > 2) return [digits.substring(0, 2), digits.substring(2, 6)].join("/").trim();
|
|
2894
2893
|
return digits;
|
|
2895
2894
|
};
|
|
2895
|
+
/**
|
|
2896
|
+
* @internal
|
|
2897
|
+
*
|
|
2898
|
+
* # Money Utils - getCurrencyFromString
|
|
2899
|
+
*/
|
|
2900
|
+
const getCurrencyFromString = currency => {
|
|
2901
|
+
switch (currency === null || currency === void 0 ? void 0 : currency.toLowerCase()) {
|
|
2902
|
+
case "usd":
|
|
2903
|
+
return SE.Currency.USD;
|
|
2904
|
+
case "cad":
|
|
2905
|
+
return SE.Currency.CAD;
|
|
2906
|
+
case "aud":
|
|
2907
|
+
return SE.Currency.AUD;
|
|
2908
|
+
case "gbp":
|
|
2909
|
+
return SE.Currency.GBP;
|
|
2910
|
+
case "eur":
|
|
2911
|
+
return SE.Currency.EUR;
|
|
2912
|
+
case "nzd":
|
|
2913
|
+
return SE.Currency.NZD;
|
|
2914
|
+
default:
|
|
2915
|
+
return SE.Currency.USD;
|
|
2916
|
+
}
|
|
2917
|
+
};
|
|
2918
|
+
const getCurrencySymbolFromString = currency => {
|
|
2919
|
+
let currencySymbol = undefined;
|
|
2920
|
+
switch (currency) {
|
|
2921
|
+
case SE.Currency.USD:
|
|
2922
|
+
case SE.Currency.CAD:
|
|
2923
|
+
case SE.Currency.AUD:
|
|
2924
|
+
case SE.Currency.NZD:
|
|
2925
|
+
currencySymbol = "$";
|
|
2926
|
+
break;
|
|
2927
|
+
case SE.Currency.GBP:
|
|
2928
|
+
currencySymbol = "£";
|
|
2929
|
+
break;
|
|
2930
|
+
case SE.Currency.EUR:
|
|
2931
|
+
currencySymbol = "€";
|
|
2932
|
+
break;
|
|
2933
|
+
}
|
|
2934
|
+
return currencySymbol;
|
|
2935
|
+
};
|
|
2896
2936
|
|
|
2897
2937
|
/**
|
|
2898
2938
|
* @internal
|
|
@@ -3353,17 +3393,19 @@ function convertDimensions(dimensions, {
|
|
|
3353
3393
|
* @category Utilities
|
|
3354
3394
|
*/
|
|
3355
3395
|
const getCustomsFromSalesOrder = (salesOrder, warehouse) => ({
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3396
|
+
customs: {
|
|
3397
|
+
contents: "merchandise",
|
|
3398
|
+
nonDelivery: "return_to_sender"
|
|
3399
|
+
},
|
|
3400
|
+
products: salesOrder.salesOrderItems.filter(item => item.salesOrderItemId.length > 0).map(item => ({
|
|
3361
3401
|
countryOfOrigin: warehouse.originAddress.countryCode,
|
|
3362
3402
|
description: item.lineItemDetails.name,
|
|
3363
3403
|
quantity: item.quantity || 1,
|
|
3364
|
-
value:
|
|
3365
|
-
|
|
3366
|
-
|
|
3404
|
+
value: {
|
|
3405
|
+
amount: item.priceSummary.unitPrice.amount,
|
|
3406
|
+
currency: item.priceSummary.unitPrice.currency
|
|
3407
|
+
}
|
|
3408
|
+
}))
|
|
3367
3409
|
});
|
|
3368
3410
|
/**
|
|
3369
3411
|
* @internal
|
|
@@ -5011,30 +5053,6 @@ $$9({ global: true, forced: parseFloat != $parseFloat }, {
|
|
|
5011
5053
|
parseFloat: $parseFloat
|
|
5012
5054
|
});
|
|
5013
5055
|
|
|
5014
|
-
const useUtils = () => {
|
|
5015
|
-
const getCurrencySymbol = useCallback(currency => {
|
|
5016
|
-
let currencySymbol = undefined;
|
|
5017
|
-
switch (currency) {
|
|
5018
|
-
case SE.Currency.USD:
|
|
5019
|
-
case SE.Currency.CAD:
|
|
5020
|
-
case SE.Currency.AUD:
|
|
5021
|
-
case SE.Currency.NZD:
|
|
5022
|
-
currencySymbol = "$";
|
|
5023
|
-
break;
|
|
5024
|
-
case SE.Currency.GBP:
|
|
5025
|
-
currencySymbol = "£";
|
|
5026
|
-
break;
|
|
5027
|
-
case SE.Currency.EUR:
|
|
5028
|
-
currencySymbol = "€";
|
|
5029
|
-
break;
|
|
5030
|
-
}
|
|
5031
|
-
return currencySymbol;
|
|
5032
|
-
}, []);
|
|
5033
|
-
return {
|
|
5034
|
-
getCurrencySymbol
|
|
5035
|
-
};
|
|
5036
|
-
};
|
|
5037
|
-
|
|
5038
5056
|
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)."; }
|
|
5039
5057
|
var _ref$3 = process.env.NODE_ENV === "production" ? {
|
|
5040
5058
|
name: "1xe63ku",
|
|
@@ -5063,7 +5081,7 @@ const transform$3 = {
|
|
|
5063
5081
|
currency
|
|
5064
5082
|
}) => ({
|
|
5065
5083
|
amount: Number.isNaN(amount) ? null : amount,
|
|
5066
|
-
currency
|
|
5084
|
+
currency: currency !== null && currency !== void 0 ? currency : SE.Currency.USD
|
|
5067
5085
|
})
|
|
5068
5086
|
};
|
|
5069
5087
|
const MoneyInputController = createFieldController();
|
|
@@ -5073,9 +5091,6 @@ const MoneyInput = _a => {
|
|
|
5073
5091
|
showCurrencySymbol = false
|
|
5074
5092
|
} = _a,
|
|
5075
5093
|
rest = __rest(_a, ["signed", "showCurrencySymbol"]);
|
|
5076
|
-
const {
|
|
5077
|
-
getCurrencySymbol
|
|
5078
|
-
} = useUtils();
|
|
5079
5094
|
const moneyInputRef = useRef(null);
|
|
5080
5095
|
// The state in this reducer is inconsequential; it is only used to force a re-render on blur events
|
|
5081
5096
|
const [, forceRender] = useReducer(x => x + 1, 0);
|
|
@@ -5087,7 +5102,7 @@ const MoneyInput = _a => {
|
|
|
5087
5102
|
value
|
|
5088
5103
|
} = _a,
|
|
5089
5104
|
moneyInputProps = __rest(_a, ["onChange", "value"]);
|
|
5090
|
-
const currencySymbol =
|
|
5105
|
+
const currencySymbol = getCurrencySymbolFromString(value.currency);
|
|
5091
5106
|
// Check if focus is on money input OR money input child
|
|
5092
5107
|
const hasFocus = document.activeElement === moneyInputRef.current || ((_b = moneyInputRef.current) === null || _b === void 0 ? void 0 : _b.contains(document.activeElement));
|
|
5093
5108
|
return jsx("div", Object.assign({
|
|
@@ -5108,7 +5123,7 @@ const MoneyInput = _a => {
|
|
|
5108
5123
|
} else {
|
|
5109
5124
|
onChange(transform$3.out({
|
|
5110
5125
|
amount: parseFloat(event.target.value),
|
|
5111
|
-
currency:
|
|
5126
|
+
currency: value.currency
|
|
5112
5127
|
}));
|
|
5113
5128
|
}
|
|
5114
5129
|
},
|
|
@@ -7248,7 +7263,7 @@ const FormPortal = ({
|
|
|
7248
7263
|
});
|
|
7249
7264
|
};
|
|
7250
7265
|
|
|
7251
|
-
const styles$
|
|
7266
|
+
const styles$G = createStyles({
|
|
7252
7267
|
container: {
|
|
7253
7268
|
alignItems: "center",
|
|
7254
7269
|
display: "flex",
|
|
@@ -7267,7 +7282,7 @@ const styles$C = createStyles({
|
|
|
7267
7282
|
*/
|
|
7268
7283
|
const Loader = props => {
|
|
7269
7284
|
return jsx("div", Object.assign({
|
|
7270
|
-
css: styles$
|
|
7285
|
+
css: styles$G.container
|
|
7271
7286
|
}, {
|
|
7272
7287
|
children: jsx(Spinner, Object.assign({}, props, {
|
|
7273
7288
|
size: props.size || SpinnerSize.SIZE_LARGE
|
|
@@ -7321,7 +7336,7 @@ const Spacer = props => jsx("div", {
|
|
|
7321
7336
|
css: getSpacerStyles(props)
|
|
7322
7337
|
});
|
|
7323
7338
|
|
|
7324
|
-
const styles$
|
|
7339
|
+
const styles$F = createStyles({
|
|
7325
7340
|
chipList: theme => ({
|
|
7326
7341
|
gap: theme.spacing(1)
|
|
7327
7342
|
}),
|
|
@@ -7406,6 +7421,7 @@ const getAddFundsSchema = (minimumAmount = 10) => z.object({
|
|
|
7406
7421
|
const AddFundsForm = ({
|
|
7407
7422
|
carrierId,
|
|
7408
7423
|
children,
|
|
7424
|
+
currency,
|
|
7409
7425
|
onCancel,
|
|
7410
7426
|
onSuccess,
|
|
7411
7427
|
minimumAmount: _minimumAmount = 0
|
|
@@ -7415,14 +7431,15 @@ const AddFundsForm = ({
|
|
|
7415
7431
|
} = useTranslation();
|
|
7416
7432
|
const addFunds = useAddFunds();
|
|
7417
7433
|
const carrier = useGetCarrierById(carrierId);
|
|
7434
|
+
const currencySymbol = getCurrencySymbolFromString(currency);
|
|
7418
7435
|
const chips = [{
|
|
7419
|
-
label:
|
|
7436
|
+
label: `${currencySymbol}20`,
|
|
7420
7437
|
value: 20
|
|
7421
7438
|
}, {
|
|
7422
|
-
label:
|
|
7439
|
+
label: `${currencySymbol}50`,
|
|
7423
7440
|
value: 50
|
|
7424
7441
|
}, {
|
|
7425
|
-
label:
|
|
7442
|
+
label: `${currencySymbol}100`,
|
|
7426
7443
|
value: 100
|
|
7427
7444
|
}, {
|
|
7428
7445
|
label: t("manage-funding:addFunds.custom"),
|
|
@@ -7434,7 +7451,7 @@ const AddFundsForm = ({
|
|
|
7434
7451
|
defaultValues: {
|
|
7435
7452
|
funds: {
|
|
7436
7453
|
amount: selectedChip.value === "custom" ? _minimumAmount : selectedChip.value,
|
|
7437
|
-
currency
|
|
7454
|
+
currency
|
|
7438
7455
|
}
|
|
7439
7456
|
},
|
|
7440
7457
|
resolver: validationResolver(getAddFundsSchema(_minimumAmount))
|
|
@@ -7481,7 +7498,7 @@ const AddFundsForm = ({
|
|
|
7481
7498
|
})), jsx(Spacer, {
|
|
7482
7499
|
multiplier: 2
|
|
7483
7500
|
}), jsx(ChipList, Object.assign({
|
|
7484
|
-
css: styles$
|
|
7501
|
+
css: styles$F.chipList,
|
|
7485
7502
|
onChange: idx => {
|
|
7486
7503
|
const chip = chips[idx];
|
|
7487
7504
|
setSelectedChip(chip);
|
|
@@ -7489,14 +7506,14 @@ const AddFundsForm = ({
|
|
|
7489
7506
|
form.reset({
|
|
7490
7507
|
funds: {
|
|
7491
7508
|
amount: chip.value,
|
|
7492
|
-
currency
|
|
7509
|
+
currency
|
|
7493
7510
|
}
|
|
7494
7511
|
});
|
|
7495
7512
|
}
|
|
7496
7513
|
}
|
|
7497
7514
|
}, {
|
|
7498
7515
|
children: chips.map(chip => jsx(Chip, Object.assign({
|
|
7499
|
-
css: styles$
|
|
7516
|
+
css: styles$F.getChip({
|
|
7500
7517
|
isDisabled: chip.value < _minimumAmount,
|
|
7501
7518
|
isSelected: chip.value === selectedChip.value
|
|
7502
7519
|
}),
|
|
@@ -7513,13 +7530,15 @@ const AddFundsForm = ({
|
|
|
7513
7530
|
multiplier: 1
|
|
7514
7531
|
}), jsx(MoneyInput, {
|
|
7515
7532
|
control: form.control,
|
|
7516
|
-
css: styles$
|
|
7533
|
+
css: styles$F.fundsInput,
|
|
7517
7534
|
defaultValue: {
|
|
7518
7535
|
amount: undefined,
|
|
7519
|
-
currency
|
|
7536
|
+
currency
|
|
7520
7537
|
},
|
|
7521
7538
|
form: formId,
|
|
7522
|
-
hint: t("manage-funding:addFunds.minimumPurchaseAmount"
|
|
7539
|
+
hint: t("manage-funding:addFunds.minimumPurchaseAmount", {
|
|
7540
|
+
currencySymbol
|
|
7541
|
+
}),
|
|
7523
7542
|
label: t("manage-funding:addFunds.labels.amount"),
|
|
7524
7543
|
name: "funds",
|
|
7525
7544
|
nativeLabel: true,
|
|
@@ -7638,7 +7657,7 @@ const Spread = ({
|
|
|
7638
7657
|
children: children
|
|
7639
7658
|
}));
|
|
7640
7659
|
|
|
7641
|
-
const styles$
|
|
7660
|
+
const styles$E = createStyles({
|
|
7642
7661
|
edit: theme => ({
|
|
7643
7662
|
color: theme.palette.primary.main,
|
|
7644
7663
|
padding: `0 ${theme.spacing(2)}`
|
|
@@ -7691,7 +7710,8 @@ const autoFundingSchema = z.object({
|
|
|
7691
7710
|
* @see {@link AutoFundingFormProps | The props that are passed into the `<AutoFundingForm />` component}
|
|
7692
7711
|
*/
|
|
7693
7712
|
const AutoFundingForm = ({
|
|
7694
|
-
carrierId
|
|
7713
|
+
carrierId,
|
|
7714
|
+
currency
|
|
7695
7715
|
}) => {
|
|
7696
7716
|
const {
|
|
7697
7717
|
t
|
|
@@ -7699,7 +7719,7 @@ const AutoFundingForm = ({
|
|
|
7699
7719
|
const {
|
|
7700
7720
|
mutate: updateAutoFunding,
|
|
7701
7721
|
isLoading: updateAutoFundingIsLoading
|
|
7702
|
-
} = useUpdateAutoFunding(
|
|
7722
|
+
} = useUpdateAutoFunding();
|
|
7703
7723
|
const {
|
|
7704
7724
|
data: autoFundingConfig,
|
|
7705
7725
|
refetch: autoFundingConfigRefetch,
|
|
@@ -7721,7 +7741,9 @@ const AutoFundingForm = ({
|
|
|
7721
7741
|
setShowForm(prev => !prev);
|
|
7722
7742
|
setIsSwitchOn(true);
|
|
7723
7743
|
const payload = values;
|
|
7724
|
-
updateAutoFunding(
|
|
7744
|
+
updateAutoFunding(Object.assign({
|
|
7745
|
+
carrierId
|
|
7746
|
+
}, payload), {
|
|
7725
7747
|
onSuccess: () => autoFundingConfigRefetch()
|
|
7726
7748
|
});
|
|
7727
7749
|
}));
|
|
@@ -7736,15 +7758,21 @@ const AutoFundingForm = ({
|
|
|
7736
7758
|
formReset(isEnabled);
|
|
7737
7759
|
if (!isEnabled) {
|
|
7738
7760
|
setIsSwitchOn(isEnabled);
|
|
7739
|
-
updateAutoFunding(
|
|
7761
|
+
updateAutoFunding(Object.assign({
|
|
7762
|
+
carrierId
|
|
7763
|
+
}, form.getValues()), {
|
|
7740
7764
|
onSuccess: () => autoFundingConfigRefetch()
|
|
7741
7765
|
});
|
|
7742
7766
|
}
|
|
7743
7767
|
};
|
|
7744
|
-
if (isLoadingAutoFundingConfig || updateAutoFundingIsLoading)
|
|
7745
|
-
|
|
7746
|
-
|
|
7747
|
-
|
|
7768
|
+
if (isLoadingAutoFundingConfig || updateAutoFundingIsLoading) {
|
|
7769
|
+
return jsx(Loader, {
|
|
7770
|
+
message: t("manage-funding:autoFunding.isLoading")
|
|
7771
|
+
});
|
|
7772
|
+
}
|
|
7773
|
+
if (!autoFundingConfig) {
|
|
7774
|
+
throw new Error(t("errorMessages:unableToLoad.autoFundingSettings"));
|
|
7775
|
+
}
|
|
7748
7776
|
return jsxs(Fragment, {
|
|
7749
7777
|
children: [jsxs(Spread, {
|
|
7750
7778
|
children: [jsx(Typography, Object.assign({
|
|
@@ -7767,12 +7795,12 @@ const AutoFundingForm = ({
|
|
|
7767
7795
|
}, {
|
|
7768
7796
|
children: t("manage-funding:autoFunding.readSettings", Object.assign({}, autoFundingConfig))
|
|
7769
7797
|
})), jsx(LinkAction, {
|
|
7770
|
-
css: styles$
|
|
7798
|
+
css: styles$E.edit,
|
|
7771
7799
|
onClick: () => handleToggle(true),
|
|
7772
7800
|
title: t("manage-funding:autoFunding:edit")
|
|
7773
7801
|
})]
|
|
7774
7802
|
}), jsxs("form", Object.assign({
|
|
7775
|
-
css: styles$
|
|
7803
|
+
css: styles$E.getForm(showForm),
|
|
7776
7804
|
"data-testid": "auto-funding-form",
|
|
7777
7805
|
id: "auto-funding-form",
|
|
7778
7806
|
onSubmit: handleSubmit
|
|
@@ -7783,15 +7811,15 @@ const AutoFundingForm = ({
|
|
|
7783
7811
|
}, {
|
|
7784
7812
|
children: t("manage-funding:autoFunding:editSettings")
|
|
7785
7813
|
})), jsx("div", Object.assign({
|
|
7786
|
-
css: styles$
|
|
7814
|
+
css: styles$E.marginLeft
|
|
7787
7815
|
}, {
|
|
7788
7816
|
children: jsx(MoneyInput, {
|
|
7789
7817
|
control: form.control,
|
|
7790
|
-
css: styles$
|
|
7818
|
+
css: styles$E.input,
|
|
7791
7819
|
"data-testid": "auto-funding-threshold-input",
|
|
7792
7820
|
defaultValue: {
|
|
7793
7821
|
amount: autoFundingConfig === null || autoFundingConfig === void 0 ? void 0 : autoFundingConfig.autoPurchaseThreshold,
|
|
7794
|
-
currency
|
|
7822
|
+
currency
|
|
7795
7823
|
},
|
|
7796
7824
|
disabled: !watchIsEnabled,
|
|
7797
7825
|
label: t("manage-funding:autoFunding.lowBalancePurchaseThreshold"),
|
|
@@ -7800,15 +7828,15 @@ const AutoFundingForm = ({
|
|
|
7800
7828
|
showCurrencySymbol: true
|
|
7801
7829
|
})
|
|
7802
7830
|
})), jsx("div", Object.assign({
|
|
7803
|
-
css: styles$
|
|
7831
|
+
css: styles$E.marginLeft
|
|
7804
7832
|
}, {
|
|
7805
7833
|
children: jsx(MoneyInput, {
|
|
7806
7834
|
control: form.control,
|
|
7807
|
-
css: styles$
|
|
7835
|
+
css: styles$E.input,
|
|
7808
7836
|
"data-testid": "auto-funding-purchase-amount-input",
|
|
7809
7837
|
defaultValue: {
|
|
7810
7838
|
amount: autoFundingConfig === null || autoFundingConfig === void 0 ? void 0 : autoFundingConfig.autoPurchaseAmount,
|
|
7811
|
-
currency
|
|
7839
|
+
currency
|
|
7812
7840
|
},
|
|
7813
7841
|
disabled: !watchIsEnabled,
|
|
7814
7842
|
label: t("manage-funding:autoFunding.purchaseAmount"),
|
|
@@ -7817,11 +7845,11 @@ const AutoFundingForm = ({
|
|
|
7817
7845
|
showCurrencySymbol: true
|
|
7818
7846
|
})
|
|
7819
7847
|
})), jsx("div", Object.assign({
|
|
7820
|
-
css: styles$
|
|
7848
|
+
css: styles$E.marginLeft
|
|
7821
7849
|
}, {
|
|
7822
7850
|
children: jsx(NumberInput, {
|
|
7823
7851
|
control: form.control,
|
|
7824
|
-
css: styles$
|
|
7852
|
+
css: styles$E.input,
|
|
7825
7853
|
"data-testid": "auto-funding-max-per-day-input",
|
|
7826
7854
|
defaultValue: autoFundingConfig === null || autoFundingConfig === void 0 ? void 0 : autoFundingConfig.autoPurchaseCutoff,
|
|
7827
7855
|
disabled: !watchIsEnabled,
|
|
@@ -7861,7 +7889,7 @@ const AutoFundingForm = ({
|
|
|
7861
7889
|
});
|
|
7862
7890
|
};
|
|
7863
7891
|
|
|
7864
|
-
const styles$
|
|
7892
|
+
const styles$D = isLabelRight => createStyles({
|
|
7865
7893
|
inlineContainer: theme => ({
|
|
7866
7894
|
alignItems: "center",
|
|
7867
7895
|
display: "flex",
|
|
@@ -7881,14 +7909,14 @@ const InlineLabel = ({
|
|
|
7881
7909
|
isLabelRight,
|
|
7882
7910
|
labelProps: _labelProps = {}
|
|
7883
7911
|
}) => jsxs("div", Object.assign({
|
|
7884
|
-
css: styles$
|
|
7912
|
+
css: styles$D(isLabelRight).inlineContainer
|
|
7885
7913
|
}, {
|
|
7886
7914
|
children: [jsx(Typography, Object.assign({}, _labelProps, {
|
|
7887
7915
|
children: label
|
|
7888
7916
|
})), children]
|
|
7889
7917
|
}));
|
|
7890
7918
|
|
|
7891
|
-
const styles$
|
|
7919
|
+
const styles$C = createStyles({
|
|
7892
7920
|
getBalanceText: balance => theme => ({
|
|
7893
7921
|
color: balance === undefined ? theme.palette.gray.main : balance >= 0 ? theme.palette.secondary.dark : theme.palette.error.main
|
|
7894
7922
|
})
|
|
@@ -7906,7 +7934,8 @@ const styles$y = createStyles({
|
|
|
7906
7934
|
*/
|
|
7907
7935
|
const CarrierBalance = ({
|
|
7908
7936
|
balance,
|
|
7909
|
-
carrierId
|
|
7937
|
+
carrierId,
|
|
7938
|
+
currency
|
|
7910
7939
|
}) => {
|
|
7911
7940
|
var _a;
|
|
7912
7941
|
const {
|
|
@@ -7922,11 +7951,11 @@ const CarrierBalance = ({
|
|
|
7922
7951
|
}, {
|
|
7923
7952
|
children: isFetchingCarrier ? jsx(Spinner, {}) : jsx(Typography, Object.assign({
|
|
7924
7953
|
bold: true,
|
|
7925
|
-
css: styles$
|
|
7954
|
+
css: styles$C.getBalanceText(carrierBalance)
|
|
7926
7955
|
}, {
|
|
7927
7956
|
children: carrierBalance === undefined ? "----" : formatMoney({
|
|
7928
7957
|
amount: carrierBalance,
|
|
7929
|
-
currency
|
|
7958
|
+
currency
|
|
7930
7959
|
})
|
|
7931
7960
|
}))
|
|
7932
7961
|
}));
|
|
@@ -8033,47 +8062,6 @@ const CarrierLogo = ({
|
|
|
8033
8062
|
}, name);
|
|
8034
8063
|
};
|
|
8035
8064
|
|
|
8036
|
-
const CodeBlock = ({
|
|
8037
|
-
code,
|
|
8038
|
-
convertTojs: _convertTojs = true
|
|
8039
|
-
}) => jsx(Highlight, Object.assign({
|
|
8040
|
-
code: code,
|
|
8041
|
-
language: "tsx",
|
|
8042
|
-
theme: themes.nightOwl
|
|
8043
|
-
}, {
|
|
8044
|
-
children: ({
|
|
8045
|
-
style,
|
|
8046
|
-
tokens,
|
|
8047
|
-
getLineProps,
|
|
8048
|
-
getTokenProps
|
|
8049
|
-
}) => jsx("pre", Object.assign({
|
|
8050
|
-
style: Object.assign(Object.assign({}, style), {
|
|
8051
|
-
background: "transparent",
|
|
8052
|
-
fontSize: "14px"
|
|
8053
|
-
})
|
|
8054
|
-
}, {
|
|
8055
|
-
children: tokens.map((line, i) => jsx("div", Object.assign({}, getLineProps({
|
|
8056
|
-
line
|
|
8057
|
-
}), {
|
|
8058
|
-
children: line.map((token, key) => {
|
|
8059
|
-
if (_convertTojs && token.types.includes("property")) {
|
|
8060
|
-
const tokenProps = getTokenProps({
|
|
8061
|
-
token
|
|
8062
|
-
});
|
|
8063
|
-
const unquotedPropertyToken = tokenProps.children.substring(1, tokenProps.children.length - 1);
|
|
8064
|
-
return jsx("span", Object.assign({}, tokenProps, {
|
|
8065
|
-
children: unquotedPropertyToken
|
|
8066
|
-
}), key);
|
|
8067
|
-
} else {
|
|
8068
|
-
return jsx("span", Object.assign({}, getTokenProps({
|
|
8069
|
-
token
|
|
8070
|
-
})), key);
|
|
8071
|
-
}
|
|
8072
|
-
})
|
|
8073
|
-
}), i))
|
|
8074
|
-
}))
|
|
8075
|
-
}));
|
|
8076
|
-
|
|
8077
8065
|
let _$1 = t => t,
|
|
8078
8066
|
_t$1,
|
|
8079
8067
|
_t2$1,
|
|
@@ -8098,7 +8086,7 @@ const fill = keyframes(_t3 || (_t3 = _$1`
|
|
|
8098
8086
|
100% {
|
|
8099
8087
|
box-shadow: inset 0px 0px 0px 30px #3F8200;
|
|
8100
8088
|
`));
|
|
8101
|
-
const styles$
|
|
8089
|
+
const styles$B = createStyles({
|
|
8102
8090
|
checkmark: theme => ({
|
|
8103
8091
|
animation: `${fill} forwards`,
|
|
8104
8092
|
borderRadius: "50%",
|
|
@@ -8153,7 +8141,7 @@ const SaveStatus = ({
|
|
|
8153
8141
|
}
|
|
8154
8142
|
if (isSaving) {
|
|
8155
8143
|
return jsxs("div", Object.assign({
|
|
8156
|
-
css: styles$
|
|
8144
|
+
css: styles$B.savingContainer
|
|
8157
8145
|
}, {
|
|
8158
8146
|
children: [jsx(Loader, {
|
|
8159
8147
|
css: theme => ({
|
|
@@ -8161,32 +8149,32 @@ const SaveStatus = ({
|
|
|
8161
8149
|
}),
|
|
8162
8150
|
size: SpinnerSize.SIZE_SMALL
|
|
8163
8151
|
}), jsx(Typography, Object.assign({
|
|
8164
|
-
css: styles$
|
|
8152
|
+
css: styles$B.saving
|
|
8165
8153
|
}, {
|
|
8166
8154
|
children: t("manage-defaults:status.saving")
|
|
8167
8155
|
}))]
|
|
8168
8156
|
}));
|
|
8169
8157
|
}
|
|
8170
8158
|
return !isSaving && !(errors === null || errors === void 0 ? void 0 : errors.length) ? jsxs("div", Object.assign({
|
|
8171
|
-
css: styles$
|
|
8159
|
+
css: styles$B.container
|
|
8172
8160
|
}, {
|
|
8173
8161
|
children: [jsx("svg", Object.assign({
|
|
8174
|
-
css: styles$
|
|
8162
|
+
css: styles$B.checkmark,
|
|
8175
8163
|
viewBox: "0 0 52 52"
|
|
8176
8164
|
}, {
|
|
8177
8165
|
children: jsx("path", {
|
|
8178
|
-
css: styles$
|
|
8166
|
+
css: styles$B.checkmarkCheck,
|
|
8179
8167
|
d: "M14.1 27.2l7.1 7.2 16.7-16.8",
|
|
8180
8168
|
fill: "none",
|
|
8181
8169
|
strokeWidth: "5px"
|
|
8182
8170
|
})
|
|
8183
8171
|
})), jsx(Typography, Object.assign({
|
|
8184
|
-
css: styles$
|
|
8172
|
+
css: styles$B.saved
|
|
8185
8173
|
}, {
|
|
8186
8174
|
children: t("manage-defaults:status.saved")
|
|
8187
8175
|
}))]
|
|
8188
8176
|
})) : jsxs("div", Object.assign({
|
|
8189
|
-
css: [styles$
|
|
8177
|
+
css: [styles$B.container, {
|
|
8190
8178
|
padding: "0"
|
|
8191
8179
|
}]
|
|
8192
8180
|
}, {
|
|
@@ -8196,14 +8184,14 @@ const SaveStatus = ({
|
|
|
8196
8184
|
}),
|
|
8197
8185
|
name: IconNames.CANCEL_FILLED
|
|
8198
8186
|
}), jsx(Typography, Object.assign({
|
|
8199
|
-
css: styles$
|
|
8187
|
+
css: styles$B.savingFailed
|
|
8200
8188
|
}, {
|
|
8201
8189
|
children: t("manage-defaults:status.savingFailed")
|
|
8202
8190
|
}))]
|
|
8203
8191
|
}));
|
|
8204
8192
|
};
|
|
8205
8193
|
|
|
8206
|
-
const styles$
|
|
8194
|
+
const styles$A = createStyles({
|
|
8207
8195
|
content: theme => ({
|
|
8208
8196
|
padding: `${theme.spacing(3)}px ${theme.spacing(4)}px`
|
|
8209
8197
|
}),
|
|
@@ -8251,10 +8239,10 @@ const CollapsiblePanel = ({
|
|
|
8251
8239
|
const [isExpanded, toggleIsExpanded] = useToggle(initialExpanded);
|
|
8252
8240
|
return jsxs(Fragment, {
|
|
8253
8241
|
children: [jsx("div", Object.assign({
|
|
8254
|
-
css: styles$
|
|
8242
|
+
css: styles$A.header
|
|
8255
8243
|
}, {
|
|
8256
8244
|
children: jsxs(Link, Object.assign({
|
|
8257
|
-
css: styles$
|
|
8245
|
+
css: styles$A.link,
|
|
8258
8246
|
onClick: event => {
|
|
8259
8247
|
event.preventDefault();
|
|
8260
8248
|
toggleIsExpanded();
|
|
@@ -8274,7 +8262,7 @@ const CollapsiblePanel = ({
|
|
|
8274
8262
|
errors: errors,
|
|
8275
8263
|
isSaving: isSaving
|
|
8276
8264
|
}), jsx(Icon, {
|
|
8277
|
-
css: styles$
|
|
8265
|
+
css: styles$A.icon,
|
|
8278
8266
|
"data-testid": "collapsible-panel-dropdown",
|
|
8279
8267
|
name: isExpanded ? IconNames.CHEVRON_TOP : IconNames.CHEVRON_BOTTOM,
|
|
8280
8268
|
size: IconSize.SIZE_LARGE
|
|
@@ -8282,7 +8270,7 @@ const CollapsiblePanel = ({
|
|
|
8282
8270
|
}))]
|
|
8283
8271
|
}))
|
|
8284
8272
|
})), isExpanded ? jsx("section", Object.assign({
|
|
8285
|
-
css: styles$
|
|
8273
|
+
css: styles$A.content
|
|
8286
8274
|
}, {
|
|
8287
8275
|
children: children
|
|
8288
8276
|
})) : jsx(Spacer, {
|
|
@@ -8392,7 +8380,7 @@ const Cube = _a => {
|
|
|
8392
8380
|
}));
|
|
8393
8381
|
};
|
|
8394
8382
|
|
|
8395
|
-
const styles$
|
|
8383
|
+
const styles$z = createStyles({
|
|
8396
8384
|
getDateRangeSelect: fullWidth => theme => ({
|
|
8397
8385
|
minWidth: theme.spacing(30),
|
|
8398
8386
|
position: "relative",
|
|
@@ -8417,7 +8405,7 @@ const DateRangeSelect = ({
|
|
|
8417
8405
|
void onChange(nextOption);
|
|
8418
8406
|
};
|
|
8419
8407
|
return jsx(Select$1, Object.assign({
|
|
8420
|
-
css: styles$
|
|
8408
|
+
css: styles$z.getDateRangeSelect(fullWidth),
|
|
8421
8409
|
"data-testid": "date-range-select",
|
|
8422
8410
|
label: t("wallet-history:dateRange"),
|
|
8423
8411
|
leftContent: jsx(Icon, {
|
|
@@ -8486,7 +8474,7 @@ const DateRangeCombo = ({
|
|
|
8486
8474
|
});
|
|
8487
8475
|
};
|
|
8488
8476
|
|
|
8489
|
-
const styles$
|
|
8477
|
+
const styles$y = createStyles({
|
|
8490
8478
|
container: theme => ({
|
|
8491
8479
|
display: "flex",
|
|
8492
8480
|
flexDirection: "column",
|
|
@@ -8517,13 +8505,13 @@ const DisplayTerm = ({
|
|
|
8517
8505
|
t
|
|
8518
8506
|
} = useTranslation();
|
|
8519
8507
|
return jsx("ul", Object.assign({
|
|
8520
|
-
css: styles$
|
|
8508
|
+
css: styles$y.container
|
|
8521
8509
|
}, {
|
|
8522
8510
|
children: term.links.map(({
|
|
8523
8511
|
link,
|
|
8524
8512
|
title
|
|
8525
8513
|
}) => jsxs("li", Object.assign({
|
|
8526
|
-
css: styles$
|
|
8514
|
+
css: styles$y.termLink
|
|
8527
8515
|
}, {
|
|
8528
8516
|
children: [jsx(Typography, Object.assign({
|
|
8529
8517
|
variant: "subtitle1"
|
|
@@ -8532,7 +8520,7 @@ const DisplayTerm = ({
|
|
|
8532
8520
|
defaultValue: title
|
|
8533
8521
|
})
|
|
8534
8522
|
})), jsx(Link, Object.assign({
|
|
8535
|
-
css: styles$
|
|
8523
|
+
css: styles$y.link,
|
|
8536
8524
|
href: link,
|
|
8537
8525
|
isExternal: true,
|
|
8538
8526
|
target: "_blank"
|
|
@@ -8549,14 +8537,13 @@ const DisplayTerm = ({
|
|
|
8549
8537
|
}));
|
|
8550
8538
|
};
|
|
8551
8539
|
|
|
8552
|
-
const styles$
|
|
8540
|
+
const styles$x = createStyles({
|
|
8553
8541
|
container: {
|
|
8554
8542
|
backgroundColor: "#11003A"
|
|
8555
8543
|
},
|
|
8556
8544
|
getChildrenStyles: isOpen => theme => ({
|
|
8557
|
-
height: isOpen ? "
|
|
8558
|
-
overflow: "scroll"
|
|
8559
|
-
paddingLeft: theme.spacing(4)
|
|
8545
|
+
height: isOpen ? "90%" : "0",
|
|
8546
|
+
overflow: "scroll"
|
|
8560
8547
|
}),
|
|
8561
8548
|
getDrawerStyles: isOpen => theme => ({
|
|
8562
8549
|
backgroundColor: "#11003A",
|
|
@@ -8599,12 +8586,12 @@ const Drawer = ({
|
|
|
8599
8586
|
}, []);
|
|
8600
8587
|
return jsxs("div", Object.assign({
|
|
8601
8588
|
"aria-label": "Drawer",
|
|
8602
|
-
css: styles$
|
|
8589
|
+
css: styles$x.getDrawerStyles(isOpen),
|
|
8603
8590
|
ref: drawerRef
|
|
8604
8591
|
}, {
|
|
8605
8592
|
children: [jsxs("header", Object.assign({
|
|
8606
8593
|
"aria-expanded": isOpen,
|
|
8607
|
-
css: styles$
|
|
8594
|
+
css: styles$x.header
|
|
8608
8595
|
}, {
|
|
8609
8596
|
children: [jsx("div", Object.assign({
|
|
8610
8597
|
onClick: toggleDrawer,
|
|
@@ -8619,7 +8606,7 @@ const Drawer = ({
|
|
|
8619
8606
|
})), headerContent]
|
|
8620
8607
|
})), jsx("div", Object.assign({
|
|
8621
8608
|
"aria-labelledby": "drawer",
|
|
8622
|
-
css: styles$
|
|
8609
|
+
css: styles$x.getChildrenStyles(isOpen),
|
|
8623
8610
|
role: "region"
|
|
8624
8611
|
}, {
|
|
8625
8612
|
children: children
|
|
@@ -8668,7 +8655,7 @@ const ErrorFallback = ({
|
|
|
8668
8655
|
}));
|
|
8669
8656
|
};
|
|
8670
8657
|
|
|
8671
|
-
const styles$
|
|
8658
|
+
const styles$w = createStyles({
|
|
8672
8659
|
icon: theme => ({
|
|
8673
8660
|
color: theme.palette.primary.main,
|
|
8674
8661
|
marginRight: theme.spacing(2)
|
|
@@ -8718,10 +8705,10 @@ const Section = _a => {
|
|
|
8718
8705
|
rest = __rest(_a, ["bold", "title", "children", "rightContent"]);
|
|
8719
8706
|
return jsxs(Fragment, {
|
|
8720
8707
|
children: [title && jsx("summary", Object.assign({
|
|
8721
|
-
css: styles$
|
|
8708
|
+
css: styles$w.summary
|
|
8722
8709
|
}, {
|
|
8723
8710
|
children: jsxs("div", Object.assign({
|
|
8724
|
-
css: styles$
|
|
8711
|
+
css: styles$w.summaryWrapper
|
|
8725
8712
|
}, {
|
|
8726
8713
|
children: [title && typeof title === "string" ? jsx(Typography, Object.assign({
|
|
8727
8714
|
bold: bold,
|
|
@@ -8729,20 +8716,20 @@ const Section = _a => {
|
|
|
8729
8716
|
}, {
|
|
8730
8717
|
children: title
|
|
8731
8718
|
})) : title, rightContent && jsx("div", Object.assign({
|
|
8732
|
-
css: styles$
|
|
8719
|
+
css: styles$w.rightContentWrapper
|
|
8733
8720
|
}, {
|
|
8734
8721
|
children: rightContent
|
|
8735
8722
|
}))]
|
|
8736
8723
|
}))
|
|
8737
8724
|
})), jsx("section", Object.assign({
|
|
8738
|
-
css: styles$
|
|
8725
|
+
css: styles$w.section
|
|
8739
8726
|
}, rest, {
|
|
8740
8727
|
children: children
|
|
8741
8728
|
}))]
|
|
8742
8729
|
});
|
|
8743
8730
|
};
|
|
8744
8731
|
|
|
8745
|
-
const styles$
|
|
8732
|
+
const styles$v = createStyles({
|
|
8746
8733
|
balanceText: theme => ({
|
|
8747
8734
|
color: theme.palette.secondary.dark
|
|
8748
8735
|
}),
|
|
@@ -8781,12 +8768,13 @@ const FundAndPurchase = ({
|
|
|
8781
8768
|
carrierId,
|
|
8782
8769
|
className,
|
|
8783
8770
|
control,
|
|
8771
|
+
currency,
|
|
8784
8772
|
disabled,
|
|
8785
8773
|
isFundingEnabled,
|
|
8786
8774
|
isFundingRequired,
|
|
8787
8775
|
isPreferredRate,
|
|
8788
|
-
onSave,
|
|
8789
8776
|
purchaseAmount,
|
|
8777
|
+
onSave,
|
|
8790
8778
|
onPurchase
|
|
8791
8779
|
}) => {
|
|
8792
8780
|
const {
|
|
@@ -8837,7 +8825,7 @@ const FundAndPurchase = ({
|
|
|
8837
8825
|
}, {
|
|
8838
8826
|
children: [jsx(Button, Object.assign({
|
|
8839
8827
|
bold: false,
|
|
8840
|
-
css: styles$
|
|
8828
|
+
css: styles$v.saveRateButton,
|
|
8841
8829
|
disabled: disabled || !carrierId || isPreferredRate && !isRateFormValid || addFundsForm.isSubmitting || isRateFormSubmitting,
|
|
8842
8830
|
isLoading: isSavingRate,
|
|
8843
8831
|
onClick: handleSaveRate,
|
|
@@ -8855,23 +8843,26 @@ const FundAndPurchase = ({
|
|
|
8855
8843
|
}))]
|
|
8856
8844
|
});
|
|
8857
8845
|
// render when no rate has been selected yet
|
|
8858
|
-
if (!carrierId)
|
|
8859
|
-
|
|
8860
|
-
|
|
8861
|
-
|
|
8862
|
-
|
|
8863
|
-
children: [
|
|
8864
|
-
|
|
8865
|
-
|
|
8866
|
-
|
|
8867
|
-
|
|
8868
|
-
|
|
8869
|
-
|
|
8870
|
-
|
|
8871
|
-
|
|
8872
|
-
|
|
8873
|
-
|
|
8874
|
-
|
|
8846
|
+
if (!carrierId) {
|
|
8847
|
+
return jsxs("div", Object.assign({
|
|
8848
|
+
className: className,
|
|
8849
|
+
css: styles$v.container
|
|
8850
|
+
}, {
|
|
8851
|
+
children: [jsxs(Spread, {
|
|
8852
|
+
children: [jsx(CarrierBalance, {
|
|
8853
|
+
balance: uspsBalance,
|
|
8854
|
+
currency: currency
|
|
8855
|
+
}), isFundingEnabled ? jsx(LinkAction, {
|
|
8856
|
+
icon: "add",
|
|
8857
|
+
isDisabled: !isFundingRequired || isAddFundsFormOpen || isRateFormSubmitting,
|
|
8858
|
+
onClick: () => setIsAddFundsFormOpen(true),
|
|
8859
|
+
title: t("manage-funding:actions.addFunds")
|
|
8860
|
+
}) : null]
|
|
8861
|
+
}), jsx(Spacer, {
|
|
8862
|
+
multiplier: 2
|
|
8863
|
+
}), renderActionButtons()]
|
|
8864
|
+
}));
|
|
8865
|
+
}
|
|
8875
8866
|
/**
|
|
8876
8867
|
* If the selected rate is a preferred rate, we won't be able to show the carrier balance.
|
|
8877
8868
|
* Instead, we'll show the USPS balance, until the user either purchases or saves the rate.
|
|
@@ -8881,121 +8872,130 @@ const FundAndPurchase = ({
|
|
|
8881
8872
|
if (isPreferredRate) {
|
|
8882
8873
|
return jsxs("div", Object.assign({
|
|
8883
8874
|
className: className,
|
|
8884
|
-
css: styles$
|
|
8875
|
+
css: styles$v.container
|
|
8885
8876
|
}, {
|
|
8886
8877
|
children: [jsx(CarrierBalance, {
|
|
8887
|
-
balance: uspsBalance
|
|
8878
|
+
balance: uspsBalance,
|
|
8879
|
+
currency: currency
|
|
8888
8880
|
}), jsx(Spacer, {
|
|
8889
8881
|
multiplier: 2
|
|
8890
8882
|
}), renderActionButtons()]
|
|
8891
8883
|
}));
|
|
8892
|
-
}
|
|
8893
|
-
|
|
8884
|
+
}
|
|
8885
|
+
if (isLoadingCarrier) {
|
|
8886
|
+
return jsx(Loader, {
|
|
8894
8887
|
message: t("loading.carrier")
|
|
8895
8888
|
});
|
|
8896
|
-
|
|
8897
|
-
|
|
8898
|
-
|
|
8899
|
-
|
|
8900
|
-
|
|
8889
|
+
}
|
|
8890
|
+
if (!carrier || !carrierId) {
|
|
8891
|
+
throw new Error("errorMessages.unableToLoad.carrier");
|
|
8892
|
+
}
|
|
8893
|
+
const balance = carrier.balance;
|
|
8894
|
+
// Render: walleted carrier, but funding feature is not enabled;
|
|
8895
|
+
// show balance, but not the funding form.
|
|
8896
|
+
if (!isFundingEnabled) {
|
|
8897
|
+
return jsxs("div", Object.assign({
|
|
8901
8898
|
className: className,
|
|
8902
|
-
css: styles$
|
|
8899
|
+
css: styles$v.container
|
|
8903
8900
|
}, {
|
|
8904
8901
|
children: [jsx(CarrierBalance, {
|
|
8905
|
-
carrierId: carrierId
|
|
8902
|
+
carrierId: carrierId,
|
|
8903
|
+
currency: currency
|
|
8906
8904
|
}), jsx(Spacer, {
|
|
8907
8905
|
multiplier: 2
|
|
8908
8906
|
}), renderActionButtons()]
|
|
8909
8907
|
}));
|
|
8910
|
-
|
|
8911
|
-
|
|
8912
|
-
|
|
8913
|
-
|
|
8914
|
-
|
|
8915
|
-
|
|
8916
|
-
|
|
8917
|
-
|
|
8918
|
-
}), jsx(LinkAction, {
|
|
8919
|
-
icon: "add",
|
|
8920
|
-
isDisabled: isAddFundsFormOpen || isRateFormSubmitting,
|
|
8921
|
-
onClick: () => setIsAddFundsFormOpen(true),
|
|
8922
|
-
title: t("manage-funding:actions.addFunds")
|
|
8923
|
-
})]
|
|
8924
|
-
}), jsx(Spacer, {
|
|
8925
|
-
multiplier: 2
|
|
8926
|
-
}), balance < 0 && jsxs(Fragment, {
|
|
8927
|
-
children: [jsx(InlineNotification, Object.assign({
|
|
8928
|
-
title: t(`manage-funding:fundAndPurchase.negativeBalanceTitle`),
|
|
8929
|
-
type: NotificationType.ALERT
|
|
8930
|
-
}, {
|
|
8931
|
-
children: t(`manage-funding:fundAndPurchase.negativeBalance`)
|
|
8932
|
-
})), jsx(Spacer, {
|
|
8933
|
-
multiplier: 2
|
|
8934
|
-
})]
|
|
8935
|
-
}), isAddFundsFormOpen ? jsx(AddFundsForm, Object.assign({
|
|
8908
|
+
}
|
|
8909
|
+
// Render: walleted carrier and funding feature is enabled;
|
|
8910
|
+
// show balance and funding form
|
|
8911
|
+
return jsxs(Section, Object.assign({
|
|
8912
|
+
title: t("purchase-label:sections.payment")
|
|
8913
|
+
}, {
|
|
8914
|
+
children: [jsxs(Spread, {
|
|
8915
|
+
children: [jsx(CarrierBalance, {
|
|
8936
8916
|
carrierId: carrierId,
|
|
8937
|
-
|
|
8938
|
-
|
|
8917
|
+
currency: currency
|
|
8918
|
+
}), jsx(LinkAction, {
|
|
8919
|
+
icon: "add",
|
|
8920
|
+
isDisabled: isAddFundsFormOpen || isRateFormSubmitting,
|
|
8921
|
+
onClick: () => setIsAddFundsFormOpen(true),
|
|
8922
|
+
title: t("manage-funding:actions.addFunds")
|
|
8923
|
+
})]
|
|
8924
|
+
}), jsx(Spacer, {
|
|
8925
|
+
multiplier: 2
|
|
8926
|
+
}), balance < 0 && jsxs(Fragment, {
|
|
8927
|
+
children: [jsx(InlineNotification, Object.assign({
|
|
8928
|
+
title: t("manage-funding:fundAndPurchase.negativeBalanceTitle"),
|
|
8929
|
+
type: NotificationType.ALERT
|
|
8939
8930
|
}, {
|
|
8940
|
-
children:
|
|
8941
|
-
|
|
8942
|
-
|
|
8943
|
-
|
|
8944
|
-
|
|
8931
|
+
children: t("manage-funding:fundAndPurchase.negativeBalance")
|
|
8932
|
+
})), jsx(Spacer, {
|
|
8933
|
+
multiplier: 2
|
|
8934
|
+
})]
|
|
8935
|
+
}), isAddFundsFormOpen ? jsx(AddFundsForm, Object.assign({
|
|
8936
|
+
carrierId: carrierId,
|
|
8937
|
+
currency: currency,
|
|
8938
|
+
minimumAmount: purchaseAmount - balance,
|
|
8939
|
+
onSuccess: onPurchase
|
|
8940
|
+
}, {
|
|
8941
|
+
children: addFundsForm => {
|
|
8942
|
+
var _a, _b;
|
|
8943
|
+
return jsxs(Fragment, {
|
|
8944
|
+
children: [jsxs("section", Object.assign({
|
|
8945
|
+
css: styles$v.getFormExtension(addFundsForm.isCustomAmount)
|
|
8946
|
+
}, {
|
|
8947
|
+
children: [jsx(InlineLabel, Object.assign({
|
|
8948
|
+
label: t("manage-funding:fundAndPurchase.newBalance")
|
|
8945
8949
|
}, {
|
|
8946
|
-
children:
|
|
8947
|
-
|
|
8950
|
+
children: jsx(Typography, Object.assign({
|
|
8951
|
+
css: styles$v.balanceText
|
|
8948
8952
|
}, {
|
|
8949
|
-
children:
|
|
8950
|
-
|
|
8951
|
-
|
|
8952
|
-
|
|
8953
|
-
|
|
8954
|
-
|
|
8955
|
-
|
|
8956
|
-
|
|
8957
|
-
|
|
8958
|
-
|
|
8953
|
+
children: formatMoney({
|
|
8954
|
+
amount: balance + ((_a = addFundsForm.selectedAmount) !== null && _a !== void 0 ? _a : 0),
|
|
8955
|
+
currency
|
|
8956
|
+
})
|
|
8957
|
+
}))
|
|
8958
|
+
})), jsx(InlineLabel, Object.assign({
|
|
8959
|
+
label: t("manage-funding:fundAndPurchase.finalBalance")
|
|
8960
|
+
}, {
|
|
8961
|
+
children: jsx(Typography, Object.assign({
|
|
8962
|
+
css: styles$v.balanceText
|
|
8959
8963
|
}, {
|
|
8960
|
-
children:
|
|
8961
|
-
|
|
8962
|
-
|
|
8963
|
-
|
|
8964
|
-
|
|
8965
|
-
|
|
8966
|
-
|
|
8967
|
-
|
|
8968
|
-
|
|
8969
|
-
|
|
8964
|
+
children: formatMoney({
|
|
8965
|
+
amount: balance + ((_b = addFundsForm.selectedAmount) !== null && _b !== void 0 ? _b : 0) - purchaseAmount,
|
|
8966
|
+
currency
|
|
8967
|
+
})
|
|
8968
|
+
}))
|
|
8969
|
+
})), balance >= purchaseAmount && jsx(ButtonGroup, Object.assign({
|
|
8970
|
+
justify: "end"
|
|
8971
|
+
}, {
|
|
8972
|
+
children: jsx(Button, Object.assign({
|
|
8973
|
+
disabled: addFundsForm.isSubmitting || isRateFormSubmitting,
|
|
8974
|
+
onClick: () => setIsAddFundsFormOpen(false),
|
|
8975
|
+
variant: ButtonVariant.TEXT
|
|
8970
8976
|
}, {
|
|
8971
|
-
children:
|
|
8972
|
-
|
|
8973
|
-
|
|
8974
|
-
|
|
8975
|
-
|
|
8976
|
-
|
|
8977
|
-
|
|
8978
|
-
|
|
8977
|
+
children: t("actions.cancel")
|
|
8978
|
+
}))
|
|
8979
|
+
}))]
|
|
8980
|
+
})), jsx(Spacer, {
|
|
8981
|
+
multiplier: 2
|
|
8982
|
+
}), addFundsForm.error && jsxs(Fragment, {
|
|
8983
|
+
children: [jsx(InlineNotification, Object.assign({
|
|
8984
|
+
title: t("manage-funding:addFunds.error.title"),
|
|
8985
|
+
type: NotificationType.ERROR
|
|
8986
|
+
}, {
|
|
8987
|
+
children: addFundsForm.error[0].message
|
|
8979
8988
|
})), jsx(Spacer, {
|
|
8980
8989
|
multiplier: 2
|
|
8981
|
-
})
|
|
8982
|
-
|
|
8983
|
-
|
|
8984
|
-
|
|
8985
|
-
|
|
8986
|
-
|
|
8987
|
-
})), jsx(Spacer, {
|
|
8988
|
-
multiplier: 2
|
|
8989
|
-
})]
|
|
8990
|
-
}), renderActionButtons(addFundsForm)]
|
|
8991
|
-
});
|
|
8992
|
-
}
|
|
8993
|
-
}), purchaseAmount) : renderActionButtons()]
|
|
8994
|
-
}));
|
|
8995
|
-
}
|
|
8990
|
+
})]
|
|
8991
|
+
}), renderActionButtons(addFundsForm)]
|
|
8992
|
+
});
|
|
8993
|
+
}
|
|
8994
|
+
}), purchaseAmount) : renderActionButtons()]
|
|
8995
|
+
}));
|
|
8996
8996
|
};
|
|
8997
8997
|
|
|
8998
|
-
const styles$
|
|
8998
|
+
const styles$u = createStyles({
|
|
8999
8999
|
checkboxHeader: theme => ({
|
|
9000
9000
|
width: theme.spacing(6)
|
|
9001
9001
|
}),
|
|
@@ -9036,7 +9036,7 @@ const GridController = ({
|
|
|
9036
9036
|
});
|
|
9037
9037
|
}, []);
|
|
9038
9038
|
return jsx(Table, Object.assign({
|
|
9039
|
-
css: styles$
|
|
9039
|
+
css: styles$u.table,
|
|
9040
9040
|
"data-testid": "grid",
|
|
9041
9041
|
footer: footerContent && jsx(TableFooter, {
|
|
9042
9042
|
children: footerContent
|
|
@@ -9044,7 +9044,7 @@ const GridController = ({
|
|
|
9044
9044
|
header: jsx(TableHeader, {
|
|
9045
9045
|
children: jsxs(TableHeaderRow, {
|
|
9046
9046
|
children: [_useCheckboxes ? jsx(TableHeaderCell, Object.assign({
|
|
9047
|
-
css: styles$
|
|
9047
|
+
css: styles$u.checkboxHeader
|
|
9048
9048
|
}, {
|
|
9049
9049
|
children: jsx(Checkbox, {
|
|
9050
9050
|
checked: (_b = isAllChecked || isIndeterminate) !== null && _b !== void 0 ? _b : false,
|
|
@@ -9087,15 +9087,14 @@ const CellFormattedDate = ({
|
|
|
9087
9087
|
date,
|
|
9088
9088
|
short
|
|
9089
9089
|
}) => {
|
|
9090
|
-
const [formatWithShort, setFormatWithShort] = useState(!!short);
|
|
9091
9090
|
return jsx("div", {
|
|
9092
9091
|
children: jsx("div", {
|
|
9093
|
-
children:
|
|
9092
|
+
children: short ? formatDateDDMMYY(date) : formatDate(date)
|
|
9094
9093
|
})
|
|
9095
9094
|
});
|
|
9096
9095
|
};
|
|
9097
9096
|
|
|
9098
|
-
const styles$
|
|
9097
|
+
const styles$t = createStyles({
|
|
9099
9098
|
itemDescription: theme => ({
|
|
9100
9099
|
display: "flex",
|
|
9101
9100
|
flexDirection: "column",
|
|
@@ -9137,15 +9136,15 @@ const ItemsBreakdownTableHeader = ({
|
|
|
9137
9136
|
}) => jsx(TableHeader, {
|
|
9138
9137
|
children: jsxs(TableBaseRow, {
|
|
9139
9138
|
children: [jsx(TableHeaderCell, {}), jsx(TableHeaderCell, Object.assign({
|
|
9140
|
-
css: styles$
|
|
9139
|
+
css: styles$t.numericCell
|
|
9141
9140
|
}, {
|
|
9142
9141
|
children: "Qty"
|
|
9143
9142
|
})), hasValue && jsx(TableHeaderCell, Object.assign({
|
|
9144
|
-
css: styles$
|
|
9143
|
+
css: styles$t.numericCell
|
|
9145
9144
|
}, {
|
|
9146
9145
|
children: "$/ea"
|
|
9147
9146
|
})), hasTotal && jsx(TableHeaderCell, Object.assign({
|
|
9148
|
-
css: styles$
|
|
9147
|
+
css: styles$t.numericCell
|
|
9149
9148
|
}, {
|
|
9150
9149
|
children: "$ Total"
|
|
9151
9150
|
}))]
|
|
@@ -9162,7 +9161,7 @@ const ItemsBreakdown = ({
|
|
|
9162
9161
|
const hasValue = items.some(item => item.value !== undefined);
|
|
9163
9162
|
const hasTotal = items.some(item => item.totalValue !== undefined);
|
|
9164
9163
|
return jsx("div", Object.assign({
|
|
9165
|
-
css: styles$
|
|
9164
|
+
css: styles$t.tableWrapper
|
|
9166
9165
|
}, {
|
|
9167
9166
|
children: jsx(Table, Object.assign({
|
|
9168
9167
|
header: jsx(ItemsBreakdownTableHeader, {
|
|
@@ -9180,25 +9179,25 @@ const ItemsBreakdown = ({
|
|
|
9180
9179
|
}, index) => jsx(Fragment$1, {
|
|
9181
9180
|
children: jsxs(TableBaseRow, {
|
|
9182
9181
|
children: [jsxs(TableBodyCell, Object.assign({
|
|
9183
|
-
css: styles$
|
|
9182
|
+
css: styles$t.itemDescription
|
|
9184
9183
|
}, {
|
|
9185
9184
|
children: [jsx(Typography, Object.assign({
|
|
9186
|
-
css: styles$
|
|
9185
|
+
css: styles$t.itemName
|
|
9187
9186
|
}, {
|
|
9188
9187
|
children: name
|
|
9189
9188
|
})), jsx(Typography, {
|
|
9190
9189
|
children: detail
|
|
9191
9190
|
})]
|
|
9192
9191
|
})), jsx(TableBodyCell, Object.assign({
|
|
9193
|
-
css: [styles$
|
|
9192
|
+
css: [styles$t.numericCell, styles$t.itemDetail]
|
|
9194
9193
|
}, {
|
|
9195
9194
|
children: quantity
|
|
9196
9195
|
})), hasValue && jsx(TableBodyCell, Object.assign({
|
|
9197
|
-
css: [styles$
|
|
9196
|
+
css: [styles$t.numericCell, styles$t.itemDetail]
|
|
9198
9197
|
}, {
|
|
9199
9198
|
children: value && formatMoney(value)
|
|
9200
9199
|
})), hasTotal && jsx(TableBodyCell, Object.assign({
|
|
9201
|
-
css: [styles$
|
|
9200
|
+
css: [styles$t.numericCell, styles$t.itemDetail]
|
|
9202
9201
|
}, {
|
|
9203
9202
|
children: totalValue && formatMoney(totalValue)
|
|
9204
9203
|
}))]
|
|
@@ -9226,7 +9225,8 @@ const ItemsBreakdown = ({
|
|
|
9226
9225
|
* @see {@link AccountSettings.Element | The `<AccountSettings />` component renders the `<ManageFunding />` component}
|
|
9227
9226
|
*/
|
|
9228
9227
|
const ManageFunding = ({
|
|
9229
|
-
carrierId
|
|
9228
|
+
carrierId,
|
|
9229
|
+
currency
|
|
9230
9230
|
}) => {
|
|
9231
9231
|
const {
|
|
9232
9232
|
t
|
|
@@ -9244,7 +9244,8 @@ const ManageFunding = ({
|
|
|
9244
9244
|
}) : jsxs("section", {
|
|
9245
9245
|
children: [jsxs(Spread, {
|
|
9246
9246
|
children: [jsx(CarrierBalance, {
|
|
9247
|
-
carrierId: carrierId
|
|
9247
|
+
carrierId: carrierId,
|
|
9248
|
+
currency: currency
|
|
9248
9249
|
}), jsx(LinkAction, {
|
|
9249
9250
|
icon: "add",
|
|
9250
9251
|
isDisabled: isAddFundsFormOpen,
|
|
@@ -9256,6 +9257,7 @@ const ManageFunding = ({
|
|
|
9256
9257
|
multiplier: 2
|
|
9257
9258
|
}), jsx(AddFundsForm, {
|
|
9258
9259
|
carrierId: carrierId,
|
|
9260
|
+
currency: currency,
|
|
9259
9261
|
onCancel: () => setIsAddFundsFormOpen(false),
|
|
9260
9262
|
onSuccess: () => {
|
|
9261
9263
|
void queryClient.invalidateQueries(["useGetCarrierById", carrierId], {
|
|
@@ -9269,13 +9271,14 @@ const ManageFunding = ({
|
|
|
9269
9271
|
}), jsx(Spacer, {
|
|
9270
9272
|
multiplier: 2
|
|
9271
9273
|
}), jsx(AutoFundingForm, {
|
|
9272
|
-
carrierId: carrierId
|
|
9274
|
+
carrierId: carrierId,
|
|
9275
|
+
currency: currency
|
|
9273
9276
|
})]
|
|
9274
9277
|
})
|
|
9275
9278
|
}));
|
|
9276
9279
|
};
|
|
9277
9280
|
|
|
9278
|
-
const styles$
|
|
9281
|
+
const styles$s = createStyles({
|
|
9279
9282
|
footer: {
|
|
9280
9283
|
"> *": {
|
|
9281
9284
|
borderTop: "0 !important"
|
|
@@ -9342,13 +9345,13 @@ const Pager = ({
|
|
|
9342
9345
|
toggleRowCountDropdown();
|
|
9343
9346
|
};
|
|
9344
9347
|
return jsxs("div", Object.assign({
|
|
9345
|
-
css: styles$
|
|
9348
|
+
css: styles$s.footer
|
|
9346
9349
|
}, {
|
|
9347
9350
|
children: [jsxs("div", Object.assign({
|
|
9348
|
-
css: styles$
|
|
9351
|
+
css: styles$s.leftFooter
|
|
9349
9352
|
}, {
|
|
9350
9353
|
children: [jsx("div", Object.assign({
|
|
9351
|
-
css: styles$
|
|
9354
|
+
css: styles$s.rowCount
|
|
9352
9355
|
}, {
|
|
9353
9356
|
children: jsx(Trans, {
|
|
9354
9357
|
components: [jsx("b", {
|
|
@@ -9364,7 +9367,7 @@ const Pager = ({
|
|
|
9364
9367
|
}
|
|
9365
9368
|
})
|
|
9366
9369
|
})), jsxs("div", Object.assign({
|
|
9367
|
-
css: styles$
|
|
9370
|
+
css: styles$s.rowsActions
|
|
9368
9371
|
}, {
|
|
9369
9372
|
children: [t("common:grid.rows"), jsx(Button, Object.assign({
|
|
9370
9373
|
id: "selected-row",
|
|
@@ -9382,7 +9385,7 @@ const Pager = ({
|
|
|
9382
9385
|
onClick: () => toggleRowCountDropdown(),
|
|
9383
9386
|
size: IconSize.SIZE_MEDIUM
|
|
9384
9387
|
}), jsx(DropdownOptionList, Object.assign({
|
|
9385
|
-
css: styles$
|
|
9388
|
+
css: styles$s.rowCountDropDown,
|
|
9386
9389
|
dropdownWidth: "max-content",
|
|
9387
9390
|
isOpen: isRowCountDropDownOpen,
|
|
9388
9391
|
onChange: () => toggleRowCountDropdown(),
|
|
@@ -9504,7 +9507,7 @@ const AddressParser = ({
|
|
|
9504
9507
|
}));
|
|
9505
9508
|
};
|
|
9506
9509
|
|
|
9507
|
-
const styles$
|
|
9510
|
+
const styles$r = createStyles({
|
|
9508
9511
|
grow: {
|
|
9509
9512
|
flexGrow: 1
|
|
9510
9513
|
},
|
|
@@ -9608,13 +9611,13 @@ const AddressFields = ({
|
|
|
9608
9611
|
name: _formatFieldName("cityLocality"),
|
|
9609
9612
|
nativeLabel: true
|
|
9610
9613
|
}), jsxs("div", Object.assign({
|
|
9611
|
-
css: styles$
|
|
9614
|
+
css: styles$r.stateZipWrapper
|
|
9612
9615
|
}, {
|
|
9613
9616
|
children: [jsx("div", Object.assign({
|
|
9614
|
-
css: styles$
|
|
9617
|
+
css: styles$r.stateWrapper
|
|
9615
9618
|
}, {
|
|
9616
9619
|
children: jsx("div", Object.assign({
|
|
9617
|
-
css: styles$
|
|
9620
|
+
css: styles$r.grow
|
|
9618
9621
|
}, {
|
|
9619
9622
|
children: watchCountryCode === undefined || watchCountryCode === "US" ?
|
|
9620
9623
|
// Domestic States
|
|
@@ -9640,10 +9643,10 @@ const AddressFields = ({
|
|
|
9640
9643
|
})
|
|
9641
9644
|
}))
|
|
9642
9645
|
})), jsx("div", Object.assign({
|
|
9643
|
-
css: styles$
|
|
9646
|
+
css: styles$r.zipWrapper
|
|
9644
9647
|
}, {
|
|
9645
9648
|
children: jsx("div", Object.assign({
|
|
9646
|
-
css: styles$
|
|
9649
|
+
css: styles$r.grow
|
|
9647
9650
|
}, {
|
|
9648
9651
|
children: jsx(TextInput, {
|
|
9649
9652
|
control: form.control,
|
|
@@ -10453,7 +10456,7 @@ const EditWalletAddressForm = ({
|
|
|
10453
10456
|
}));
|
|
10454
10457
|
};
|
|
10455
10458
|
|
|
10456
|
-
const styles$
|
|
10459
|
+
const styles$q = createStyles({
|
|
10457
10460
|
grid: theme => ({
|
|
10458
10461
|
margin: theme.spacing(4)
|
|
10459
10462
|
})
|
|
@@ -10532,7 +10535,7 @@ const WalletForm = ({
|
|
|
10532
10535
|
onSubmit: formLogger.capture(handleSubmit)
|
|
10533
10536
|
}, {
|
|
10534
10537
|
children: jsxs(Grid, Object.assign({
|
|
10535
|
-
css: styles$
|
|
10538
|
+
css: styles$q.grid,
|
|
10536
10539
|
noPadding: true
|
|
10537
10540
|
}, {
|
|
10538
10541
|
children: [jsx(GridChild, Object.assign({
|
|
@@ -10614,7 +10617,7 @@ const WalletForm = ({
|
|
|
10614
10617
|
}));
|
|
10615
10618
|
};
|
|
10616
10619
|
|
|
10617
|
-
const styles$
|
|
10620
|
+
const styles$p = createStyles({
|
|
10618
10621
|
boldLink: theme => ({
|
|
10619
10622
|
fontWeight: theme.typography.fontWeight.bold
|
|
10620
10623
|
}),
|
|
@@ -10656,11 +10659,11 @@ const EditBillingForm = ({
|
|
|
10656
10659
|
onSubmit: formLogger.capture(handleSubmit)
|
|
10657
10660
|
}, {
|
|
10658
10661
|
children: jsxs(Grid, Object.assign({
|
|
10659
|
-
css: styles$
|
|
10662
|
+
css: styles$p.container
|
|
10660
10663
|
}, {
|
|
10661
10664
|
children: [jsx(GridChild, Object.assign({
|
|
10662
10665
|
colSpan: 12,
|
|
10663
|
-
css: styles$
|
|
10666
|
+
css: styles$p.subtitle
|
|
10664
10667
|
}, {
|
|
10665
10668
|
children: jsx(Typography, Object.assign({
|
|
10666
10669
|
variant: "subtitle1"
|
|
@@ -10675,7 +10678,7 @@ const EditBillingForm = ({
|
|
|
10675
10678
|
})
|
|
10676
10679
|
})), jsx(GridChild, Object.assign({
|
|
10677
10680
|
colSpan: 12,
|
|
10678
|
-
css: styles$
|
|
10681
|
+
css: styles$p.subtitle
|
|
10679
10682
|
}, {
|
|
10680
10683
|
children: jsx(Typography, Object.assign({
|
|
10681
10684
|
variant: "subtitle1"
|
|
@@ -10711,7 +10714,7 @@ const EditBillingForm = ({
|
|
|
10711
10714
|
children: t("actions.cancel")
|
|
10712
10715
|
})), jsx(SubmitButton, Object.assign({
|
|
10713
10716
|
control: form.control,
|
|
10714
|
-
css: styles$
|
|
10717
|
+
css: styles$p.boldLink,
|
|
10715
10718
|
variant: ButtonVariant.OUTLINED
|
|
10716
10719
|
}, {
|
|
10717
10720
|
children: t("actions.save")
|
|
@@ -10722,15 +10725,15 @@ const EditBillingForm = ({
|
|
|
10722
10725
|
}));
|
|
10723
10726
|
};
|
|
10724
10727
|
|
|
10725
|
-
var img$
|
|
10728
|
+
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";
|
|
10726
10729
|
|
|
10727
|
-
var img$
|
|
10730
|
+
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";
|
|
10728
10731
|
|
|
10729
|
-
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";
|
|
10732
|
+
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";
|
|
10730
10733
|
|
|
10731
|
-
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";
|
|
10734
|
+
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";
|
|
10732
10735
|
|
|
10733
|
-
const styles$
|
|
10736
|
+
const styles$o = createStyles({
|
|
10734
10737
|
body: theme => ({
|
|
10735
10738
|
borderTop: `1px solid ${theme.palette.gray.light}`,
|
|
10736
10739
|
color: theme.palette.black,
|
|
@@ -10781,14 +10784,14 @@ const SettingsCard = ({
|
|
|
10781
10784
|
verticallyAligned
|
|
10782
10785
|
}) => {
|
|
10783
10786
|
return jsxs("div", Object.assign({
|
|
10784
|
-
css: verticallyAligned ? styles$
|
|
10787
|
+
css: verticallyAligned ? styles$o.verticalContainer : styles$o.container,
|
|
10785
10788
|
"data-testid": "settingsCard"
|
|
10786
10789
|
}, {
|
|
10787
10790
|
children: [jsxs("div", Object.assign({
|
|
10788
|
-
css: styles$
|
|
10791
|
+
css: styles$o.header
|
|
10789
10792
|
}, {
|
|
10790
10793
|
children: [jsxs("div", Object.assign({
|
|
10791
|
-
css: styles$
|
|
10794
|
+
css: styles$o.title
|
|
10792
10795
|
}, {
|
|
10793
10796
|
children: [typeof title === "string" ? jsx(Typography, Object.assign({
|
|
10794
10797
|
variant: "subtitle2"
|
|
@@ -10816,7 +10819,7 @@ const SettingsCard = ({
|
|
|
10816
10819
|
}))
|
|
10817
10820
|
}))]
|
|
10818
10821
|
})), children && jsx("div", Object.assign({
|
|
10819
|
-
css: styles$
|
|
10822
|
+
css: styles$o.body
|
|
10820
10823
|
}, {
|
|
10821
10824
|
children: jsxs("div", {
|
|
10822
10825
|
children: [children, accessoryAction && jsx(ButtonGroup, Object.assign({
|
|
@@ -10837,7 +10840,7 @@ const SettingsCard = ({
|
|
|
10837
10840
|
}));
|
|
10838
10841
|
};
|
|
10839
10842
|
|
|
10840
|
-
const styles$
|
|
10843
|
+
const styles$n = createStyles({
|
|
10841
10844
|
container: {
|
|
10842
10845
|
display: "flex",
|
|
10843
10846
|
height: "72px",
|
|
@@ -10860,14 +10863,14 @@ const WalletCard = ({
|
|
|
10860
10863
|
const provider = (_a = fundingSource === null || fundingSource === void 0 ? void 0 : fundingSource.paymentMethod.creditCardInfo) === null || _a === void 0 ? void 0 : _a.provider;
|
|
10861
10864
|
const last4 = (_b = fundingSource === null || fundingSource === void 0 ? void 0 : fundingSource.paymentMethod.creditCardInfo) === null || _b === void 0 ? void 0 : _b.cardNumberLastFour;
|
|
10862
10865
|
const logos = {
|
|
10863
|
-
americanExpress: img$
|
|
10864
|
-
discover: img$
|
|
10865
|
-
mastercard: img$
|
|
10866
|
-
visa: img
|
|
10866
|
+
americanExpress: img$4,
|
|
10867
|
+
discover: img$3,
|
|
10868
|
+
mastercard: img$2,
|
|
10869
|
+
visa: img$1
|
|
10867
10870
|
};
|
|
10868
10871
|
const Logo = provider ? logos[provider] : undefined;
|
|
10869
10872
|
return jsx("div", Object.assign({
|
|
10870
|
-
css: styles$
|
|
10873
|
+
css: styles$n.container
|
|
10871
10874
|
}, {
|
|
10872
10875
|
children: jsx(SettingsCard, {
|
|
10873
10876
|
cardAction: {
|
|
@@ -10881,7 +10884,7 @@ const WalletCard = ({
|
|
|
10881
10884
|
src: Logo,
|
|
10882
10885
|
width: 56
|
|
10883
10886
|
}) : jsx(Icon, {
|
|
10884
|
-
css: styles$
|
|
10887
|
+
css: styles$n.icon,
|
|
10885
10888
|
name: IconNames.CREDIT_CARD,
|
|
10886
10889
|
size: IconSize.SIZE_LARGE
|
|
10887
10890
|
}), jsx(Typography, Object.assign({
|
|
@@ -10984,7 +10987,7 @@ var SvgShipengineLogo = function SvgShipengineLogo(props) {
|
|
|
10984
10987
|
})))));
|
|
10985
10988
|
};
|
|
10986
10989
|
|
|
10987
|
-
const styles$
|
|
10990
|
+
const styles$m = createStyles({
|
|
10988
10991
|
poweredByShipEngine: theme => ({
|
|
10989
10992
|
alignItems: "center",
|
|
10990
10993
|
color: theme.palette.gray.light,
|
|
@@ -11009,7 +11012,7 @@ const PoweredByShipEngine = () => {
|
|
|
11009
11012
|
t
|
|
11010
11013
|
} = useTranslation();
|
|
11011
11014
|
return jsxs("div", Object.assign({
|
|
11012
|
-
css: styles$
|
|
11015
|
+
css: styles$m.poweredByShipEngine
|
|
11013
11016
|
}, {
|
|
11014
11017
|
children: [jsx(Typography, Object.assign({
|
|
11015
11018
|
variant: "body2"
|
|
@@ -11064,9 +11067,9 @@ const StoryNotes = ({
|
|
|
11064
11067
|
}), children]
|
|
11065
11068
|
});
|
|
11066
11069
|
|
|
11067
|
-
const styles$
|
|
11070
|
+
const styles$l = createStyles({
|
|
11068
11071
|
container: theme => ({
|
|
11069
|
-
border:
|
|
11072
|
+
border: "1px solid #E4E5E7",
|
|
11070
11073
|
borderRadius: "4px",
|
|
11071
11074
|
display: "flex",
|
|
11072
11075
|
gap: theme.spacing(1),
|
|
@@ -11074,7 +11077,7 @@ const styles$h = createStyles({
|
|
|
11074
11077
|
width: "max-content"
|
|
11075
11078
|
}),
|
|
11076
11079
|
getTabStyles: selected => theme => ({
|
|
11077
|
-
backgroundColor: selected ?
|
|
11080
|
+
backgroundColor: selected ? "#E4E5E7" : "transparent",
|
|
11078
11081
|
border: "none",
|
|
11079
11082
|
borderRadius: "4px",
|
|
11080
11083
|
color: selected ? theme.palette.black : theme.palette.gray.main,
|
|
@@ -11091,12 +11094,12 @@ const Tabs = ({
|
|
|
11091
11094
|
selectedTab
|
|
11092
11095
|
}) => {
|
|
11093
11096
|
return jsx("div", Object.assign({
|
|
11094
|
-
css: styles$
|
|
11097
|
+
css: styles$l.container,
|
|
11095
11098
|
role: "tablist"
|
|
11096
11099
|
}, {
|
|
11097
11100
|
children: tabs.map(tab => jsx("button", Object.assign({
|
|
11098
11101
|
"aria-selected": selectedTab === tab ? "true" : "false",
|
|
11099
|
-
css: styles$
|
|
11102
|
+
css: styles$l.getTabStyles(selectedTab === tab),
|
|
11100
11103
|
onClick: e => {
|
|
11101
11104
|
e.preventDefault();
|
|
11102
11105
|
onSelectTab(tab);
|
|
@@ -11109,7 +11112,7 @@ const Tabs = ({
|
|
|
11109
11112
|
}));
|
|
11110
11113
|
};
|
|
11111
11114
|
|
|
11112
|
-
const styles$
|
|
11115
|
+
const styles$k = createStyles({
|
|
11113
11116
|
link: theme => ({
|
|
11114
11117
|
"&:visited": {
|
|
11115
11118
|
color: theme.palette.secondary.main
|
|
@@ -11148,10 +11151,10 @@ const DisplayCarrierTerms = props => {
|
|
|
11148
11151
|
const listCarrierLinks = () => {
|
|
11149
11152
|
return props.carrierTerms.links.map((term, index) => {
|
|
11150
11153
|
return jsx("li", Object.assign({
|
|
11151
|
-
css: styles$
|
|
11154
|
+
css: styles$k.listItems
|
|
11152
11155
|
}, {
|
|
11153
11156
|
children: jsx(Link, Object.assign({
|
|
11154
|
-
css: styles$
|
|
11157
|
+
css: styles$k.link,
|
|
11155
11158
|
href: term.url,
|
|
11156
11159
|
isExternal: true,
|
|
11157
11160
|
target: "_blank"
|
|
@@ -11170,18 +11173,18 @@ const DisplayCarrierTerms = props => {
|
|
|
11170
11173
|
children: [jsx(Spacer, {
|
|
11171
11174
|
multiplier: 3
|
|
11172
11175
|
}), jsxs("div", Object.assign({
|
|
11173
|
-
css: styles$
|
|
11176
|
+
css: styles$k.terms
|
|
11174
11177
|
}, {
|
|
11175
11178
|
children: [jsx(Typography, Object.assign({
|
|
11176
11179
|
variant: "subtitle1"
|
|
11177
11180
|
}, {
|
|
11178
11181
|
children: props.carrierTerms.title
|
|
11179
11182
|
})), !!listCarrierContent().length && jsx("div", Object.assign({
|
|
11180
|
-
css: styles$
|
|
11183
|
+
css: styles$k.terms
|
|
11181
11184
|
}, {
|
|
11182
11185
|
children: listCarrierContent()
|
|
11183
11186
|
})), jsx("ul", Object.assign({
|
|
11184
|
-
css: styles$
|
|
11187
|
+
css: styles$k.links
|
|
11185
11188
|
}, {
|
|
11186
11189
|
children: listCarrierLinks()
|
|
11187
11190
|
}))]
|
|
@@ -11331,7 +11334,7 @@ const AddCarrierForm = ({
|
|
|
11331
11334
|
}));
|
|
11332
11335
|
};
|
|
11333
11336
|
|
|
11334
|
-
const styles$
|
|
11337
|
+
const styles$j = createStyles({
|
|
11335
11338
|
container: {
|
|
11336
11339
|
display: "flex",
|
|
11337
11340
|
flexDirection: "column"
|
|
@@ -11391,14 +11394,14 @@ const ListCarriersRow = ({
|
|
|
11391
11394
|
setIsSubmitting(false);
|
|
11392
11395
|
});
|
|
11393
11396
|
return jsxs("div", Object.assign({
|
|
11394
|
-
css: styles$
|
|
11397
|
+
css: styles$j.container,
|
|
11395
11398
|
"data-testid": "carrier-row"
|
|
11396
11399
|
}, {
|
|
11397
11400
|
children: [jsxs("div", Object.assign({
|
|
11398
|
-
css: styles$
|
|
11401
|
+
css: styles$j.rowContainer
|
|
11399
11402
|
}, {
|
|
11400
11403
|
children: [jsxs("div", Object.assign({
|
|
11401
|
-
css: styles$
|
|
11404
|
+
css: styles$j.logoContainer
|
|
11402
11405
|
}, {
|
|
11403
11406
|
children: [jsx("div", {
|
|
11404
11407
|
children: jsx("img", {
|
|
@@ -11416,7 +11419,7 @@ const ListCarriersRow = ({
|
|
|
11416
11419
|
css: _ref
|
|
11417
11420
|
}, {
|
|
11418
11421
|
children: jsx(LinkAction, {
|
|
11419
|
-
css: styles$
|
|
11422
|
+
css: styles$j.getConnectButton(isConnected),
|
|
11420
11423
|
isDisabled: isConnected || showDropDown,
|
|
11421
11424
|
isLoading: isSubmitting,
|
|
11422
11425
|
onClick: () => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -11434,7 +11437,7 @@ const ListCarriersRow = ({
|
|
|
11434
11437
|
}));
|
|
11435
11438
|
};
|
|
11436
11439
|
|
|
11437
|
-
const styles$
|
|
11440
|
+
const styles$i = createStyles({
|
|
11438
11441
|
carriersList: theme => ({
|
|
11439
11442
|
"& > li:not(:last-of-type)": {
|
|
11440
11443
|
borderBottom: `1px solid ${theme.palette.gray.light}`
|
|
@@ -11494,7 +11497,7 @@ const ListCarriers = ({
|
|
|
11494
11497
|
}))
|
|
11495
11498
|
})), jsx(Spacer, {})]
|
|
11496
11499
|
}), jsx("ul", Object.assign({
|
|
11497
|
-
css: styles$
|
|
11500
|
+
css: styles$i.carriersList,
|
|
11498
11501
|
"data-testid": "carriers-list"
|
|
11499
11502
|
}, {
|
|
11500
11503
|
children: isLoading ? jsxs(Fragment, {
|
|
@@ -11516,11 +11519,11 @@ const ListCarriers = ({
|
|
|
11516
11519
|
};
|
|
11517
11520
|
const LoadingSkeletonRow = () => {
|
|
11518
11521
|
return jsxs("div", Object.assign({
|
|
11519
|
-
css: styles$
|
|
11522
|
+
css: styles$i.skeletonRow,
|
|
11520
11523
|
"data-testid": "skeleton-carrier-row"
|
|
11521
11524
|
}, {
|
|
11522
11525
|
children: [jsxs("div", Object.assign({
|
|
11523
|
-
css: styles$
|
|
11526
|
+
css: styles$i.skeletonLogoContainer
|
|
11524
11527
|
}, {
|
|
11525
11528
|
children: [jsx(Skeleton, {
|
|
11526
11529
|
animation: SkeletonAnimation.WAVE,
|
|
@@ -11865,7 +11868,7 @@ const WarehouseForm = ({
|
|
|
11865
11868
|
}));
|
|
11866
11869
|
};
|
|
11867
11870
|
|
|
11868
|
-
const styles$
|
|
11871
|
+
const styles$h = createStyles({
|
|
11869
11872
|
cardSpacing: theme => ({
|
|
11870
11873
|
display: "flex",
|
|
11871
11874
|
flexDirection: "column",
|
|
@@ -11895,9 +11898,9 @@ const ManageWarehouses = ({
|
|
|
11895
11898
|
const [showAddNewWarehouseForm, toggleShowAddNewWarehouseForm] = useToggle(false);
|
|
11896
11899
|
return jsxs(Fragment, {
|
|
11897
11900
|
children: [showAddNewWarehouseForm ? jsx(AddressPreferenceProvider, Object.assign({
|
|
11898
|
-
css: styles$
|
|
11901
|
+
css: styles$h.well,
|
|
11899
11902
|
formHeader: jsxs("div", Object.assign({
|
|
11900
|
-
css: styles$
|
|
11903
|
+
css: styles$h.header
|
|
11901
11904
|
}, {
|
|
11902
11905
|
children: [jsx(Typography, Object.assign({
|
|
11903
11906
|
variant: "subtitle1"
|
|
@@ -11942,14 +11945,14 @@ const ManageWarehouses = ({
|
|
|
11942
11945
|
})]
|
|
11943
11946
|
}))
|
|
11944
11947
|
})), jsx("div", Object.assign({
|
|
11945
|
-
css: styles$
|
|
11948
|
+
css: styles$h.cardSpacing
|
|
11946
11949
|
}, {
|
|
11947
11950
|
children: warehouses.map(warehouse => {
|
|
11948
11951
|
if (editWarehouseId && editWarehouseId === warehouse.warehouseId) {
|
|
11949
11952
|
return jsx(AddressPreferenceProvider, Object.assign({
|
|
11950
|
-
css: styles$
|
|
11953
|
+
css: styles$h.well,
|
|
11951
11954
|
formHeader: jsxs("div", Object.assign({
|
|
11952
|
-
css: styles$
|
|
11955
|
+
css: styles$h.header
|
|
11953
11956
|
}, {
|
|
11954
11957
|
children: [jsx(Typography, Object.assign({
|
|
11955
11958
|
variant: "subtitle1"
|
|
@@ -12114,64 +12117,876 @@ var manageWarehouses$1 = /*#__PURE__*/Object.freeze({
|
|
|
12114
12117
|
Component: Component$6
|
|
12115
12118
|
});
|
|
12116
12119
|
|
|
12117
|
-
|
|
12118
|
-
|
|
12119
|
-
|
|
12120
|
-
|
|
12121
|
-
|
|
12122
|
-
|
|
12123
|
-
|
|
12124
|
-
|
|
12125
|
-
|
|
12126
|
-
|
|
12127
|
-
type: NotificationType.INFO
|
|
12128
|
-
}, {
|
|
12129
|
-
children: t("manage-defaults:label.purchase.description")
|
|
12130
|
-
})), jsx(Spacer, {
|
|
12131
|
-
multiplier: 1.5
|
|
12132
|
-
}), jsxs(RadioGroup, Object.assign({
|
|
12133
|
-
name: "labelLayout",
|
|
12134
|
-
onChange: e => {
|
|
12135
|
-
setLayout(e.target.value);
|
|
12136
|
-
onChange(e.target.value);
|
|
12137
|
-
},
|
|
12138
|
-
value: layout
|
|
12139
|
-
}, {
|
|
12140
|
-
children: [jsx(Radio, Object.assign({
|
|
12141
|
-
value: "Letter"
|
|
12142
|
-
}, {
|
|
12143
|
-
children: jsx(Typography, Object.assign({
|
|
12144
|
-
bold: true
|
|
12145
|
-
}, {
|
|
12146
|
-
children: t("manage-defaults:label.letter.title")
|
|
12147
|
-
}))
|
|
12148
|
-
})), jsx(Spacer, {
|
|
12149
|
-
multiplier: 3
|
|
12150
|
-
}), jsx(Radio, Object.assign({
|
|
12151
|
-
value: "4x6"
|
|
12152
|
-
}, {
|
|
12153
|
-
children: jsx(Typography, Object.assign({
|
|
12154
|
-
bold: true
|
|
12155
|
-
}, {
|
|
12156
|
-
children: t("manage-defaults:label.thermal.title")
|
|
12157
|
-
}))
|
|
12158
|
-
}))]
|
|
12159
|
-
}))]
|
|
12160
|
-
});
|
|
12161
|
-
};
|
|
12120
|
+
var $$6 = _export;
|
|
12121
|
+
var DESCRIPTORS$1 = descriptors;
|
|
12122
|
+
var global$8 = global$p;
|
|
12123
|
+
var uncurryThis$1 = functionUncurryThis;
|
|
12124
|
+
var hasOwn$1 = hasOwnProperty_1;
|
|
12125
|
+
var isCallable$4 = isCallable$o;
|
|
12126
|
+
var isPrototypeOf$1 = objectIsPrototypeOf;
|
|
12127
|
+
var toString = toString$c;
|
|
12128
|
+
var defineProperty = objectDefineProperty.f;
|
|
12129
|
+
var copyConstructorProperties = copyConstructorProperties$2;
|
|
12162
12130
|
|
|
12163
|
-
|
|
12164
|
-
|
|
12165
|
-
|
|
12166
|
-
|
|
12167
|
-
|
|
12168
|
-
|
|
12169
|
-
|
|
12170
|
-
|
|
12171
|
-
|
|
12172
|
-
|
|
12173
|
-
|
|
12174
|
-
|
|
12131
|
+
var NativeSymbol = global$8.Symbol;
|
|
12132
|
+
var SymbolPrototype = NativeSymbol && NativeSymbol.prototype;
|
|
12133
|
+
|
|
12134
|
+
if (DESCRIPTORS$1 && isCallable$4(NativeSymbol) && (!('description' in SymbolPrototype) ||
|
|
12135
|
+
// Safari 12 bug
|
|
12136
|
+
NativeSymbol().description !== undefined
|
|
12137
|
+
)) {
|
|
12138
|
+
var EmptyStringDescriptionStore = {};
|
|
12139
|
+
// wrap Symbol constructor for correct work with undefined description
|
|
12140
|
+
var SymbolWrapper = function Symbol() {
|
|
12141
|
+
var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString(arguments[0]);
|
|
12142
|
+
var result = isPrototypeOf$1(SymbolPrototype, this)
|
|
12143
|
+
? new NativeSymbol(description)
|
|
12144
|
+
// in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
|
|
12145
|
+
: description === undefined ? NativeSymbol() : NativeSymbol(description);
|
|
12146
|
+
if (description === '') EmptyStringDescriptionStore[result] = true;
|
|
12147
|
+
return result;
|
|
12148
|
+
};
|
|
12149
|
+
|
|
12150
|
+
copyConstructorProperties(SymbolWrapper, NativeSymbol);
|
|
12151
|
+
SymbolWrapper.prototype = SymbolPrototype;
|
|
12152
|
+
SymbolPrototype.constructor = SymbolWrapper;
|
|
12153
|
+
|
|
12154
|
+
var NATIVE_SYMBOL = String(NativeSymbol('test')) == 'Symbol(test)';
|
|
12155
|
+
var thisSymbolValue = uncurryThis$1(SymbolPrototype.valueOf);
|
|
12156
|
+
var symbolDescriptiveString = uncurryThis$1(SymbolPrototype.toString);
|
|
12157
|
+
var regexp = /^Symbol\((.*)\)[^)]+$/;
|
|
12158
|
+
var replace = uncurryThis$1(''.replace);
|
|
12159
|
+
var stringSlice = uncurryThis$1(''.slice);
|
|
12160
|
+
|
|
12161
|
+
defineProperty(SymbolPrototype, 'description', {
|
|
12162
|
+
configurable: true,
|
|
12163
|
+
get: function description() {
|
|
12164
|
+
var symbol = thisSymbolValue(this);
|
|
12165
|
+
if (hasOwn$1(EmptyStringDescriptionStore, symbol)) return '';
|
|
12166
|
+
var string = symbolDescriptiveString(symbol);
|
|
12167
|
+
var desc = NATIVE_SYMBOL ? stringSlice(string, 7, -1) : replace(string, regexp, '$1');
|
|
12168
|
+
return desc === '' ? undefined : desc;
|
|
12169
|
+
}
|
|
12170
|
+
});
|
|
12171
|
+
|
|
12172
|
+
$$6({ global: true, constructor: true, forced: true }, {
|
|
12173
|
+
Symbol: SymbolWrapper
|
|
12174
|
+
});
|
|
12175
|
+
}
|
|
12176
|
+
|
|
12177
|
+
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";
|
|
12178
|
+
|
|
12179
|
+
const styles$g = ({
|
|
12180
|
+
variant,
|
|
12181
|
+
spacing
|
|
12182
|
+
}) => createStyles({
|
|
12183
|
+
labelContainer: theme => ({
|
|
12184
|
+
alignItems: "center",
|
|
12185
|
+
display: "flex",
|
|
12186
|
+
flexDirection: variant === "subtitle" ? "column" : variant === "inline" ? "row" : "row-reverse",
|
|
12187
|
+
gap: typeof spacing === "number" ? theme.spacing(spacing) : theme.spacing(1),
|
|
12188
|
+
justifyContent: typeof spacing === "string" && spacing === "spread" ? "space-between;" : "flex-start"
|
|
12189
|
+
})
|
|
12190
|
+
});
|
|
12191
|
+
|
|
12192
|
+
const Label$1 = ({
|
|
12193
|
+
spacing,
|
|
12194
|
+
children,
|
|
12195
|
+
text,
|
|
12196
|
+
textProps,
|
|
12197
|
+
variant
|
|
12198
|
+
}) => {
|
|
12199
|
+
return jsxs("div", Object.assign({
|
|
12200
|
+
css: styles$g({
|
|
12201
|
+
spacing,
|
|
12202
|
+
variant
|
|
12203
|
+
}).labelContainer
|
|
12204
|
+
}, {
|
|
12205
|
+
children: [jsx(Typography, Object.assign({}, textProps, {
|
|
12206
|
+
children: text
|
|
12207
|
+
})), children]
|
|
12208
|
+
}));
|
|
12209
|
+
};
|
|
12210
|
+
|
|
12211
|
+
const styles$f = createStyles({
|
|
12212
|
+
chevronTypography: theme => ({
|
|
12213
|
+
color: theme.palette.secondary.main
|
|
12214
|
+
}),
|
|
12215
|
+
detailsBottomContainer: theme => ({
|
|
12216
|
+
backgroundColor: theme.palette.white,
|
|
12217
|
+
padding: "8px"
|
|
12218
|
+
}),
|
|
12219
|
+
detailsRow: {
|
|
12220
|
+
display: "flex",
|
|
12221
|
+
justifyContent: "space-between"
|
|
12222
|
+
},
|
|
12223
|
+
detailsTypography: theme => ({
|
|
12224
|
+
color: theme.palette.black
|
|
12225
|
+
}),
|
|
12226
|
+
headingContainer: {
|
|
12227
|
+
alignItems: "center",
|
|
12228
|
+
display: "flex",
|
|
12229
|
+
justifyContent: "space-between"
|
|
12230
|
+
},
|
|
12231
|
+
loadingStateContainer: theme => ({
|
|
12232
|
+
display: "flex",
|
|
12233
|
+
flexDirection: "column",
|
|
12234
|
+
rowGap: theme.spacing(2)
|
|
12235
|
+
})
|
|
12236
|
+
});
|
|
12237
|
+
|
|
12238
|
+
// TODO: Uncomment the following code once we have a way to get the original shipment info for adjustments
|
|
12239
|
+
// const LoadingState = () => (
|
|
12240
|
+
// <div css={styles.loadingStateContainer}>
|
|
12241
|
+
// {[200, 160, 200].map((leftSkeletonWidth, index) => (
|
|
12242
|
+
// <Spread key={`spread-${index}`}>
|
|
12243
|
+
// <Skeleton
|
|
12244
|
+
// animation={SkeletonAnimation.WAVE}
|
|
12245
|
+
// height={24}
|
|
12246
|
+
// variant={SkeletonVariant.RECT}
|
|
12247
|
+
// width={leftSkeletonWidth}
|
|
12248
|
+
// />
|
|
12249
|
+
//
|
|
12250
|
+
// <Skeleton
|
|
12251
|
+
// animation={SkeletonAnimation.WAVE}
|
|
12252
|
+
// height={24}
|
|
12253
|
+
// variant={SkeletonVariant.RECT}
|
|
12254
|
+
// width={80}
|
|
12255
|
+
// />
|
|
12256
|
+
// </Spread>
|
|
12257
|
+
// ))}
|
|
12258
|
+
// </div>
|
|
12259
|
+
// );
|
|
12260
|
+
//
|
|
12261
|
+
// const ErrorState = () => <ErrorDisplay />;
|
|
12262
|
+
//
|
|
12263
|
+
// // replace type call with its alchemy version - lmnt-936
|
|
12264
|
+
// const SuccessState = ({ adjustment }: { adjustment: WalletAdjustment }) => {
|
|
12265
|
+
// const commonStylingProps: {
|
|
12266
|
+
// spacing: LabelProps["spacing"];
|
|
12267
|
+
// textProps: LabelProps["textProps"];
|
|
12268
|
+
// variant: LabelProps["variant"];
|
|
12269
|
+
// } = {
|
|
12270
|
+
// spacing: "spread",
|
|
12271
|
+
// textProps: { css: styles.detailsTypography, variant: "body2" },
|
|
12272
|
+
// variant: "inline",
|
|
12273
|
+
// };
|
|
12274
|
+
//
|
|
12275
|
+
// const { adjustmentId, originalShipment, actualShipment, trackingNumber } = adjustment;
|
|
12276
|
+
//
|
|
12277
|
+
// return (
|
|
12278
|
+
// <div>
|
|
12279
|
+
// <div>
|
|
12280
|
+
// <Label text="Original Weight" {...commonStylingProps}>
|
|
12281
|
+
// <Typography css={styles.detailsTypography} variant="body2">
|
|
12282
|
+
// {`${originalShipment.weight.value} ${originalShipment.weight.unit}.`}
|
|
12283
|
+
// </Typography>
|
|
12284
|
+
// </Label>
|
|
12285
|
+
//
|
|
12286
|
+
// <Label text="Actual Weight" {...commonStylingProps}>
|
|
12287
|
+
// <Typography css={styles.detailsTypography} variant="body2">
|
|
12288
|
+
// {`${actualShipment.weight.value} ${actualShipment.weight.unit}.`}
|
|
12289
|
+
// </Typography>
|
|
12290
|
+
// </Label>
|
|
12291
|
+
//
|
|
12292
|
+
// <Spacer multiplier={2} />
|
|
12293
|
+
//
|
|
12294
|
+
// <Label text="Adjustment ID" {...commonStylingProps}>
|
|
12295
|
+
// <Typography css={styles.detailsTypography} variant="body2">
|
|
12296
|
+
// {adjustmentId}
|
|
12297
|
+
// </Typography>
|
|
12298
|
+
// </Label>
|
|
12299
|
+
//
|
|
12300
|
+
// <Label text="Tracking Number" {...commonStylingProps}>
|
|
12301
|
+
// <Typography css={styles.detailsTypography} variant="body2">
|
|
12302
|
+
// {trackingNumber}
|
|
12303
|
+
// </Typography>
|
|
12304
|
+
// </Label>
|
|
12305
|
+
// </div>
|
|
12306
|
+
//
|
|
12307
|
+
// <Spacer multiplier={2} />
|
|
12308
|
+
//
|
|
12309
|
+
// <div css={styles.detailsBottomContainer}>
|
|
12310
|
+
// <Label text="Quoted Amount" {...commonStylingProps}>
|
|
12311
|
+
// <Typography css={styles.detailsTypography} variant="body2">
|
|
12312
|
+
// $10.00
|
|
12313
|
+
// </Typography>
|
|
12314
|
+
// </Label>
|
|
12315
|
+
//
|
|
12316
|
+
// <Label text="Amount Paid" {...commonStylingProps}>
|
|
12317
|
+
// <Typography css={styles.detailsTypography} variant="body2">
|
|
12318
|
+
// $9.00
|
|
12319
|
+
// </Typography>
|
|
12320
|
+
// </Label>
|
|
12321
|
+
//
|
|
12322
|
+
// <Label text="Adjustment" {...commonStylingProps}>
|
|
12323
|
+
// <Typography css={styles.detailsTypography} variant="body2">
|
|
12324
|
+
// +$1.00
|
|
12325
|
+
// </Typography>
|
|
12326
|
+
// </Label>
|
|
12327
|
+
// </div>
|
|
12328
|
+
// </div>
|
|
12329
|
+
// );
|
|
12330
|
+
// };
|
|
12331
|
+
const HistoryCardExtension = ({
|
|
12332
|
+
transactionDetails
|
|
12333
|
+
}) => {
|
|
12334
|
+
const {
|
|
12335
|
+
t
|
|
12336
|
+
} = useTranslation();
|
|
12337
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
12338
|
+
return jsxs("div", {
|
|
12339
|
+
children: [jsx(Spacer, {
|
|
12340
|
+
multiplier: 2
|
|
12341
|
+
}), jsx(Divider, {}), jsx(Spacer, {
|
|
12342
|
+
multiplier: 1
|
|
12343
|
+
}), jsxs("div", {
|
|
12344
|
+
children: [jsxs("div", Object.assign({
|
|
12345
|
+
css: styles$f.headingContainer
|
|
12346
|
+
}, {
|
|
12347
|
+
children: [jsx(Typography, Object.assign({
|
|
12348
|
+
css: styles$f.detailsTypography,
|
|
12349
|
+
variant: "body2"
|
|
12350
|
+
}, {
|
|
12351
|
+
children: t("wallet-history:details.inaccurateWeight")
|
|
12352
|
+
})), jsx("div", Object.assign({
|
|
12353
|
+
onClick: () => setIsOpen(!isOpen)
|
|
12354
|
+
}, {
|
|
12355
|
+
children: isOpen ? jsx(Icon, {
|
|
12356
|
+
css: styles$f.chevronTypography,
|
|
12357
|
+
name: IconNames.CHEVRON_TOP
|
|
12358
|
+
}) : jsx(Icon, {
|
|
12359
|
+
css: styles$f.chevronTypography,
|
|
12360
|
+
name: IconNames.CHEVRON_BOTTOM
|
|
12361
|
+
})
|
|
12362
|
+
}))]
|
|
12363
|
+
})), isOpen && jsx(Spacer, {
|
|
12364
|
+
multiplier: 1
|
|
12365
|
+
}), isOpen && jsx(Typography, Object.assign({
|
|
12366
|
+
css: styles$f.detailsTypography,
|
|
12367
|
+
variant: "body2"
|
|
12368
|
+
}, {
|
|
12369
|
+
children: transactionDetails
|
|
12370
|
+
}))]
|
|
12371
|
+
})]
|
|
12372
|
+
});
|
|
12373
|
+
};
|
|
12374
|
+
|
|
12375
|
+
const styles$e = createStyles({
|
|
12376
|
+
balanceTypography: theme => ({
|
|
12377
|
+
color: theme.palette.gray.main,
|
|
12378
|
+
marginLeft: "auto"
|
|
12379
|
+
}),
|
|
12380
|
+
cardColumn: theme => ({
|
|
12381
|
+
"&:last-child": {
|
|
12382
|
+
alignItems: "flex-end"
|
|
12383
|
+
},
|
|
12384
|
+
alignItems: "flex-start",
|
|
12385
|
+
display: "flex",
|
|
12386
|
+
flexDirection: "column",
|
|
12387
|
+
justifyContent: "space-between",
|
|
12388
|
+
rowGap: `${theme.spacing(1)}px`
|
|
12389
|
+
}),
|
|
12390
|
+
cardContainer: theme => ({
|
|
12391
|
+
display: "flex",
|
|
12392
|
+
justifyContent: "space-between"
|
|
12393
|
+
// padding: `${theme.spacing(2)}px ${theme.spacing(2)}px`,
|
|
12394
|
+
}),
|
|
12395
|
+
|
|
12396
|
+
carrierTypography: theme => ({
|
|
12397
|
+
color: theme.palette.black,
|
|
12398
|
+
fontSize: theme.typography.fontSize.M,
|
|
12399
|
+
fontWeight: 500
|
|
12400
|
+
}),
|
|
12401
|
+
dateTypography: theme => ({
|
|
12402
|
+
color: theme.palette.black
|
|
12403
|
+
}),
|
|
12404
|
+
getAmountTypography: isReload => theme => ({
|
|
12405
|
+
color: isReload ? theme.palette.success.main : theme.palette.black,
|
|
12406
|
+
fontSize: "16px",
|
|
12407
|
+
marginLeft: "auto"
|
|
12408
|
+
}),
|
|
12409
|
+
getTransactionTypeTypography: transactionType => theme => ({
|
|
12410
|
+
color: transactionType === "reload" ? theme.palette.success.main : transactionType === "adjustment" ? theme.palette.alert.main : theme.palette.black,
|
|
12411
|
+
textTransform: "capitalize"
|
|
12412
|
+
}),
|
|
12413
|
+
transactionDetails: theme => ({
|
|
12414
|
+
alignItems: "center",
|
|
12415
|
+
columnGap: theme.spacing(1),
|
|
12416
|
+
display: "flex"
|
|
12417
|
+
})
|
|
12418
|
+
});
|
|
12419
|
+
|
|
12420
|
+
const HistoryCard = ({
|
|
12421
|
+
carrier,
|
|
12422
|
+
transaction
|
|
12423
|
+
}) => {
|
|
12424
|
+
const {
|
|
12425
|
+
transactionCategory,
|
|
12426
|
+
transactionDate,
|
|
12427
|
+
transactionAmount,
|
|
12428
|
+
endingBalance,
|
|
12429
|
+
description: transactionDescription
|
|
12430
|
+
} = transaction;
|
|
12431
|
+
const deriveCurrencySymbol = currency => {
|
|
12432
|
+
if (["USD", "usd"].includes(currency)) return "$";
|
|
12433
|
+
if (["EUR", "eur"].includes(currency)) return "€";
|
|
12434
|
+
if (["GBP", "gbp"].includes(currency)) return "£";
|
|
12435
|
+
return "¤";
|
|
12436
|
+
};
|
|
12437
|
+
/**
|
|
12438
|
+
* This function derives the transaction with currency symbol as a string. All this logic below
|
|
12439
|
+
* is needed because the transaction history endpoint returns a minus symbol along with the
|
|
12440
|
+
* value that was deducted from the users balance. However, this is not the case for a value that
|
|
12441
|
+
* was added to the balance (e.g. the shipper paid too much for their shipment), where we would
|
|
12442
|
+
* expect that a plus sign was sent along with the value adjusted on the account.
|
|
12443
|
+
*
|
|
12444
|
+
* The following logic ensures that the correct mathematical symbol is displayed for each transaction
|
|
12445
|
+
* per the figma designs for this view. _If only we could get a plus symbol from the API when
|
|
12446
|
+
* an additive operation is performed on the users balance_.
|
|
12447
|
+
*
|
|
12448
|
+
* Example usage:
|
|
12449
|
+
*
|
|
12450
|
+
* ```typescript
|
|
12451
|
+
* const moneyAsString = deriveTransactionSymbolWithAmount("adjustment", { amount: 15, currency: "USD" });
|
|
12452
|
+
*
|
|
12453
|
+
* => "+$15.00"
|
|
12454
|
+
*
|
|
12455
|
+
* OR
|
|
12456
|
+
*
|
|
12457
|
+
* const moneyAsString = deriveTransactionSymbolWithAmount("funds_added", { amount: -55, currency: "GBP" });
|
|
12458
|
+
*
|
|
12459
|
+
* => "-£55.00"
|
|
12460
|
+
*
|
|
12461
|
+
* ```
|
|
12462
|
+
*/
|
|
12463
|
+
const deriveTransactionSymbolWithAmount = (category, transactionAmount) => {
|
|
12464
|
+
const transactionFirstChar = transactionAmount.amount.toFixed(2).charAt(0);
|
|
12465
|
+
const transactionSymbol = transactionFirstChar === "-" || transactionFirstChar === "+" ? transactionFirstChar : "";
|
|
12466
|
+
const amountTrimmedOfSymbol = transactionAmount.amount.toFixed(2).replace("-", "");
|
|
12467
|
+
const localizedCurrency = deriveCurrencySymbol(transactionAmount.currency);
|
|
12468
|
+
const withDynamicMathematicalSymbol = `${transactionSymbol}${localizedCurrency}${amountTrimmedOfSymbol}`;
|
|
12469
|
+
const withStaticMathematicalSymbol = `${localizedCurrency}${amountTrimmedOfSymbol}`;
|
|
12470
|
+
if (["adjustment", "unknown"].includes(category)) {
|
|
12471
|
+
return !["-", "+"].includes(transactionSymbol) ? `+${withDynamicMathematicalSymbol}` : withDynamicMathematicalSymbol;
|
|
12472
|
+
}
|
|
12473
|
+
if (["credit", "funds_added", "refund"].includes(category)) return `+${withStaticMathematicalSymbol}`;
|
|
12474
|
+
if (["debit", "insurance", "label", "service_charge"].includes(category)) return `-${withStaticMathematicalSymbol}`;
|
|
12475
|
+
return null;
|
|
12476
|
+
};
|
|
12477
|
+
return (
|
|
12478
|
+
// Note: div wrapper with padding to be removed with the implementation of Card UI Component
|
|
12479
|
+
jsxs("div", Object.assign({
|
|
12480
|
+
css: {
|
|
12481
|
+
padding: "16px"
|
|
12482
|
+
}
|
|
12483
|
+
}, {
|
|
12484
|
+
children: [jsxs("div", Object.assign({
|
|
12485
|
+
css: styles$e.cardContainer
|
|
12486
|
+
}, {
|
|
12487
|
+
children: [jsxs("div", Object.assign({
|
|
12488
|
+
css: styles$e.cardColumn
|
|
12489
|
+
}, {
|
|
12490
|
+
children: [jsx(Label$1, Object.assign({
|
|
12491
|
+
text: transactionCategory === "funds_added" ? "Balance Funded" : carrier,
|
|
12492
|
+
textProps: {
|
|
12493
|
+
css: styles$e.carrierTypography
|
|
12494
|
+
},
|
|
12495
|
+
variant: "inline-right"
|
|
12496
|
+
}, {
|
|
12497
|
+
children: transactionCategory === "funds_added" ? jsx("img", {
|
|
12498
|
+
alt: "refund logo",
|
|
12499
|
+
height: 24,
|
|
12500
|
+
src: img,
|
|
12501
|
+
width: 24
|
|
12502
|
+
}) : jsx("img", {
|
|
12503
|
+
alt: "carrier logo",
|
|
12504
|
+
height: 24,
|
|
12505
|
+
src: `https://logos.shipstation.com/ipaas/carriers/${overrideCarrierCodes$1(carrier, {
|
|
12506
|
+
DHL: "dhl_express",
|
|
12507
|
+
FedEx: "fedex",
|
|
12508
|
+
UPS: "ups",
|
|
12509
|
+
USPS: "stamps_com_wl"
|
|
12510
|
+
})}/icon.svg`,
|
|
12511
|
+
width: 24
|
|
12512
|
+
})
|
|
12513
|
+
})), jsxs("div", Object.assign({
|
|
12514
|
+
css: styles$e.transactionDetails
|
|
12515
|
+
}, {
|
|
12516
|
+
children: [jsx(Typography, Object.assign({
|
|
12517
|
+
css: styles$e.dateTypography,
|
|
12518
|
+
variant: "body2"
|
|
12519
|
+
}, {
|
|
12520
|
+
children: new Date(transactionDate).toLocaleDateString("en-US", {
|
|
12521
|
+
day: "numeric",
|
|
12522
|
+
month: "2-digit",
|
|
12523
|
+
year: "2-digit"
|
|
12524
|
+
})
|
|
12525
|
+
})), jsx(Typography, Object.assign({
|
|
12526
|
+
css: styles$e.getTransactionTypeTypography(transactionCategory),
|
|
12527
|
+
variant: "small"
|
|
12528
|
+
}, {
|
|
12529
|
+
children: transactionCategory
|
|
12530
|
+
}))]
|
|
12531
|
+
}))]
|
|
12532
|
+
})), jsx("div", Object.assign({
|
|
12533
|
+
css: styles$e.cardColumn
|
|
12534
|
+
}, {
|
|
12535
|
+
children: jsx(Label$1, Object.assign({
|
|
12536
|
+
spacing: "spread",
|
|
12537
|
+
text: deriveTransactionSymbolWithAmount(transactionCategory, transactionAmount),
|
|
12538
|
+
textProps: {
|
|
12539
|
+
css: styles$e.getAmountTypography(transactionCategory === "funds_added")
|
|
12540
|
+
},
|
|
12541
|
+
variant: "subtitle"
|
|
12542
|
+
}, {
|
|
12543
|
+
children: jsx(Typography, Object.assign({
|
|
12544
|
+
css: styles$e.balanceTypography,
|
|
12545
|
+
variant: "small"
|
|
12546
|
+
}, {
|
|
12547
|
+
children: `$${endingBalance.amount.toFixed(2)}`
|
|
12548
|
+
}))
|
|
12549
|
+
}))
|
|
12550
|
+
}))]
|
|
12551
|
+
})), transactionCategory === "adjustment" && jsx(HistoryCardExtension, {
|
|
12552
|
+
transactionDetails: transactionDescription
|
|
12553
|
+
})]
|
|
12554
|
+
}))
|
|
12555
|
+
);
|
|
12556
|
+
};
|
|
12557
|
+
|
|
12558
|
+
const styles$d = createStyles({
|
|
12559
|
+
action: theme => ({
|
|
12560
|
+
minWidth: theme.spacing(30),
|
|
12561
|
+
placeContent: "center",
|
|
12562
|
+
width: theme.spacing(30)
|
|
12563
|
+
}),
|
|
12564
|
+
displayStateContainer: theme => ({
|
|
12565
|
+
"& > *:not(:last-child)::after": {
|
|
12566
|
+
borderBottom: `1px solid ${theme.palette.gray.light}`,
|
|
12567
|
+
content: '""',
|
|
12568
|
+
display: "block",
|
|
12569
|
+
width: "100%"
|
|
12570
|
+
},
|
|
12571
|
+
border: `1px solid ${theme.palette.gray.light}`,
|
|
12572
|
+
display: "flex",
|
|
12573
|
+
flexDirection: "column",
|
|
12574
|
+
listStyle: "none"
|
|
12575
|
+
}),
|
|
12576
|
+
emptyStateContainer: theme => ({
|
|
12577
|
+
backgroundColor: theme.palette.gray.ultraLight,
|
|
12578
|
+
padding: theme.spacing(2),
|
|
12579
|
+
textAlign: "center"
|
|
12580
|
+
}),
|
|
12581
|
+
gridContainer: theme => ({
|
|
12582
|
+
display: "flex",
|
|
12583
|
+
justifyContent: "space-between",
|
|
12584
|
+
placeItems: "center"
|
|
12585
|
+
}),
|
|
12586
|
+
linkAction: {
|
|
12587
|
+
margin: "0.5rem auto",
|
|
12588
|
+
textAlign: "end"
|
|
12589
|
+
},
|
|
12590
|
+
pagination: theme => ({
|
|
12591
|
+
"&& button": {
|
|
12592
|
+
background: "none"
|
|
12593
|
+
},
|
|
12594
|
+
"&& button[aria-current='step']": {
|
|
12595
|
+
background: theme.palette.white
|
|
12596
|
+
},
|
|
12597
|
+
textAlign: "center"
|
|
12598
|
+
}),
|
|
12599
|
+
skeletonCard: theme => ({
|
|
12600
|
+
backgroundColor: theme.palette.gray.dark,
|
|
12601
|
+
display: "flex",
|
|
12602
|
+
justifyContent: "space-between",
|
|
12603
|
+
padding: theme.spacing(2)
|
|
12604
|
+
}),
|
|
12605
|
+
skeletonCardColumnLeft: {
|
|
12606
|
+
display: "flex",
|
|
12607
|
+
flexDirection: "column",
|
|
12608
|
+
justifyContent: "space-between"
|
|
12609
|
+
},
|
|
12610
|
+
skeletonCardColumnRight: theme => ({
|
|
12611
|
+
alignItems: "flex-end",
|
|
12612
|
+
display: "flex",
|
|
12613
|
+
flexDirection: "column",
|
|
12614
|
+
justifyContent: "space-between",
|
|
12615
|
+
rowGap: theme.spacing(2)
|
|
12616
|
+
}),
|
|
12617
|
+
skeletonCardList: theme => ({
|
|
12618
|
+
display: "flex",
|
|
12619
|
+
flexDirection: "column",
|
|
12620
|
+
rowGap: theme.spacing(2.25)
|
|
12621
|
+
}),
|
|
12622
|
+
skeletonCardLogo: theme => ({
|
|
12623
|
+
alignItems: "center",
|
|
12624
|
+
columnGap: theme.spacing(2),
|
|
12625
|
+
display: "flex"
|
|
12626
|
+
}),
|
|
12627
|
+
skeletonCardTransactionRow: theme => ({
|
|
12628
|
+
columnGap: "8px",
|
|
12629
|
+
display: "flex"
|
|
12630
|
+
}),
|
|
12631
|
+
skeletonPagination: theme => ({
|
|
12632
|
+
alignItems: "center",
|
|
12633
|
+
display: "flex",
|
|
12634
|
+
justifyContent: "space-between",
|
|
12635
|
+
marginLeft: "auto",
|
|
12636
|
+
marginRight: "auto",
|
|
12637
|
+
maxWidth: "16rem"
|
|
12638
|
+
}),
|
|
12639
|
+
transactionTypeSelect: {
|
|
12640
|
+
height: "3.25rem",
|
|
12641
|
+
width: "15rem"
|
|
12642
|
+
}
|
|
12643
|
+
});
|
|
12644
|
+
|
|
12645
|
+
/**
|
|
12646
|
+
* @namespace WalletHistory
|
|
12647
|
+
*
|
|
12648
|
+
* # Wallet History
|
|
12649
|
+
*/
|
|
12650
|
+
const WalletHistory = () => {
|
|
12651
|
+
var _a;
|
|
12652
|
+
const {
|
|
12653
|
+
t
|
|
12654
|
+
} = useTranslation();
|
|
12655
|
+
const [currentPage, setCurrentPage] = useState(1);
|
|
12656
|
+
const [dateRangeOptions, {
|
|
12657
|
+
last30days
|
|
12658
|
+
}] = useDateRangeOptions();
|
|
12659
|
+
const [selectedOption, setSelectedOption] = useState(last30days);
|
|
12660
|
+
const [customRange, setCustomRange] = useState();
|
|
12661
|
+
const [selectedTransactionType, setSelectedTransactionType] = useState();
|
|
12662
|
+
// TODO: Once we are able to get transactions from the API for US transactions we will need to re-work the way
|
|
12663
|
+
// we attempt to allow users to select a custom date range to fetch transactions for. The endpoint does
|
|
12664
|
+
// not work with date ranges and instead takes in a date to sort transactions by.
|
|
12665
|
+
// const queryRange = useMemo(
|
|
12666
|
+
// () =>
|
|
12667
|
+
// selectedOption && selectedOption.value === "custom" && customRange
|
|
12668
|
+
// ? customRange
|
|
12669
|
+
// : selectedOption?.range,
|
|
12670
|
+
// [customRange, selectedOption]
|
|
12671
|
+
// );
|
|
12672
|
+
const {
|
|
12673
|
+
data: fundingSourcesResult,
|
|
12674
|
+
isInitialLoading: fundingSourcesLoading,
|
|
12675
|
+
error: fundingSourcesError
|
|
12676
|
+
} = useListFundingSources();
|
|
12677
|
+
const fundingSources = useMemo(() => {
|
|
12678
|
+
if (fundingSourcesError) return [];
|
|
12679
|
+
if (fundingSourcesResult && !fundingSourcesLoading) {
|
|
12680
|
+
return fundingSourcesResult;
|
|
12681
|
+
}
|
|
12682
|
+
return [];
|
|
12683
|
+
}, [fundingSourcesError, fundingSourcesLoading, fundingSourcesResult]);
|
|
12684
|
+
const {
|
|
12685
|
+
data: walletHistoryData,
|
|
12686
|
+
isInitialLoading: isWalletHistoryDataLoading,
|
|
12687
|
+
isFetching: isWalletHistoryFetching,
|
|
12688
|
+
error: errors
|
|
12689
|
+
} = useGetFundingSourceTransactions(fundingSources.length ? fundingSources[0].fundingSourceId : "", Object.assign(Object.assign({}, selectedTransactionType ? {
|
|
12690
|
+
category: selectedTransactionType === null || selectedTransactionType === void 0 ? void 0 : selectedTransactionType.value
|
|
12691
|
+
} : {}), {
|
|
12692
|
+
// ...(queryRange ? { sortBy: queryRange[0] } : {}), TODO: Need to get sortBy date working at request of Design
|
|
12693
|
+
page: currentPage,
|
|
12694
|
+
pageSize: 25
|
|
12695
|
+
}));
|
|
12696
|
+
const walletLoading = isWalletHistoryDataLoading || isWalletHistoryFetching;
|
|
12697
|
+
if (fundingSources.length === 0) return jsx(CollapsiblePanel, Object.assign({
|
|
12698
|
+
title: t("account-settings:sections.transactionHistory")
|
|
12699
|
+
}, {
|
|
12700
|
+
children: jsx("div", Object.assign({
|
|
12701
|
+
css: styles$d.emptyStateContainer
|
|
12702
|
+
}, {
|
|
12703
|
+
children: jsx(Typography, Object.assign({
|
|
12704
|
+
variant: "body2"
|
|
12705
|
+
}, {
|
|
12706
|
+
children: t("account-settings:messages.noFundingSources")
|
|
12707
|
+
}))
|
|
12708
|
+
}))
|
|
12709
|
+
}));
|
|
12710
|
+
return jsxs(CollapsiblePanel, Object.assign({
|
|
12711
|
+
title: t("account-settings:sections.transactionHistory")
|
|
12712
|
+
}, {
|
|
12713
|
+
children: [jsx(DateRangeCombo, Object.assign({
|
|
12714
|
+
onChange: (nextOption, nextCustomRange) => {
|
|
12715
|
+
setCurrentPage(currentPage);
|
|
12716
|
+
setSelectedOption(nextOption);
|
|
12717
|
+
setCustomRange(nextCustomRange);
|
|
12718
|
+
},
|
|
12719
|
+
options: dateRangeOptions,
|
|
12720
|
+
values: {
|
|
12721
|
+
customRange,
|
|
12722
|
+
selectedOption
|
|
12723
|
+
}
|
|
12724
|
+
}, {
|
|
12725
|
+
children: renderedSelect => jsxs(Grid, Object.assign({
|
|
12726
|
+
css: styles$d.gridContainer,
|
|
12727
|
+
noPadding: true
|
|
12728
|
+
}, {
|
|
12729
|
+
children: [jsx(GridChild, {
|
|
12730
|
+
children: renderedSelect
|
|
12731
|
+
}), jsx(GridChild, {
|
|
12732
|
+
children: jsx(Select$1, Object.assign({
|
|
12733
|
+
css: styles$d.transactionTypeSelect,
|
|
12734
|
+
label: "Transaction Type",
|
|
12735
|
+
name: "transaction type select",
|
|
12736
|
+
onChange: (_name, value) => setSelectedTransactionType(value),
|
|
12737
|
+
onClear: () => setSelectedTransactionType(null),
|
|
12738
|
+
value: selectedTransactionType
|
|
12739
|
+
}, {
|
|
12740
|
+
children: [{
|
|
12741
|
+
label: "Adjustment",
|
|
12742
|
+
value: "adjustment"
|
|
12743
|
+
}, {
|
|
12744
|
+
label: "Label",
|
|
12745
|
+
value: "label"
|
|
12746
|
+
}, {
|
|
12747
|
+
label: "Refund",
|
|
12748
|
+
value: "refund"
|
|
12749
|
+
}].map(item => jsx(Option, Object.assign({
|
|
12750
|
+
value: item.value,
|
|
12751
|
+
selected: (selectedTransactionType === null || selectedTransactionType === void 0 ? void 0 : selectedTransactionType.value) === item.value
|
|
12752
|
+
}, {
|
|
12753
|
+
children: item.label
|
|
12754
|
+
}), item.value))
|
|
12755
|
+
}))
|
|
12756
|
+
})]
|
|
12757
|
+
}))
|
|
12758
|
+
})), jsx(Spacer, {
|
|
12759
|
+
multiplier: 2
|
|
12760
|
+
}), walletLoading ? jsx(LoadingState, {}) : (errors === null || errors === void 0 ? void 0 : errors.length) ? jsx(ErrorState, {
|
|
12761
|
+
errors: errors
|
|
12762
|
+
}) : jsx(SuccessState, {
|
|
12763
|
+
currentPage: currentPage,
|
|
12764
|
+
setCurrentPage: setCurrentPage,
|
|
12765
|
+
transactions: (_a = walletHistoryData === null || walletHistoryData === void 0 ? void 0 : walletHistoryData.transactions) !== null && _a !== void 0 ? _a : []
|
|
12766
|
+
})]
|
|
12767
|
+
}));
|
|
12768
|
+
};
|
|
12769
|
+
const LoadingState = () => jsxs(Fragment, {
|
|
12770
|
+
children: [jsx(SkeletonCardList, {}), jsx(Spacer, {}), jsx(SkeletonPagination, {})]
|
|
12771
|
+
});
|
|
12772
|
+
const ErrorState = ({
|
|
12773
|
+
errors
|
|
12774
|
+
}) => {
|
|
12775
|
+
const {
|
|
12776
|
+
t
|
|
12777
|
+
} = useTranslation();
|
|
12778
|
+
return jsx(InlineNotification, Object.assign({
|
|
12779
|
+
title: t("wallet-history:errors.failureToFetch"),
|
|
12780
|
+
type: NotificationType.ERROR
|
|
12781
|
+
}, {
|
|
12782
|
+
children: errors.map(e => t(encode(e.message), {
|
|
12783
|
+
defaultValue: e.message
|
|
12784
|
+
})).join(" ")
|
|
12785
|
+
}));
|
|
12786
|
+
};
|
|
12787
|
+
const SuccessState = ({
|
|
12788
|
+
transactions,
|
|
12789
|
+
currentPage,
|
|
12790
|
+
setCurrentPage
|
|
12791
|
+
}) => {
|
|
12792
|
+
const shipmentIds = transactions.flatMap(trx => trx.shipmentIds);
|
|
12793
|
+
const {
|
|
12794
|
+
data: shipmentInfo
|
|
12795
|
+
} = useListSalesOrderShipments({
|
|
12796
|
+
shipmentIds: shipmentIds
|
|
12797
|
+
});
|
|
12798
|
+
const shipmentsById = shipmentInfo !== undefined && !!shipmentInfo.length ? Object.fromEntries(shipmentInfo === null || shipmentInfo === void 0 ? void 0 : shipmentInfo.map(s => [s.shipmentId, s])) : {};
|
|
12799
|
+
return jsxs(Fragment, {
|
|
12800
|
+
children: [transactions.length ? jsx("ul", Object.assign({
|
|
12801
|
+
css: styles$d.displayStateContainer
|
|
12802
|
+
}, {
|
|
12803
|
+
children: transactions.sort((a, b) => new Date(b.transactionDate).valueOf() - new Date(a.transactionDate).valueOf()).map(transaction => {
|
|
12804
|
+
var _a;
|
|
12805
|
+
return jsx("li", {
|
|
12806
|
+
children: jsx(HistoryCard, {
|
|
12807
|
+
carrier: (_a = shipmentsById[transaction.shipmentIds[0]]) === null || _a === void 0 ? void 0 : _a.carrierId,
|
|
12808
|
+
transaction: transaction
|
|
12809
|
+
})
|
|
12810
|
+
}, transaction.fundingSourceTransactionId);
|
|
12811
|
+
})
|
|
12812
|
+
})) : jsx(EmptyState, {}), jsx(Spacer, {}), jsx("div", Object.assign({
|
|
12813
|
+
css: styles$d.pagination
|
|
12814
|
+
}, {
|
|
12815
|
+
children: jsx(Pagination, {
|
|
12816
|
+
boundaryPagesToShow: 7,
|
|
12817
|
+
currentPage: currentPage,
|
|
12818
|
+
onPageChange: selectedPage => setCurrentPage(selectedPage),
|
|
12819
|
+
siblingCount: 2,
|
|
12820
|
+
totalPages: 20
|
|
12821
|
+
})
|
|
12822
|
+
}))]
|
|
12823
|
+
});
|
|
12824
|
+
};
|
|
12825
|
+
const EmptyState = () => {
|
|
12826
|
+
return jsx("div", Object.assign({
|
|
12827
|
+
css: styles$d.emptyStateContainer
|
|
12828
|
+
}, {
|
|
12829
|
+
children: jsx(Typography, Object.assign({
|
|
12830
|
+
variant: "body2"
|
|
12831
|
+
}, {
|
|
12832
|
+
children: "No data to display"
|
|
12833
|
+
}))
|
|
12834
|
+
}));
|
|
12835
|
+
};
|
|
12836
|
+
const SkeletonCardList = () => {
|
|
12837
|
+
return jsx("div", Object.assign({
|
|
12838
|
+
css: styles$d.skeletonCardList
|
|
12839
|
+
}, {
|
|
12840
|
+
children: Array.from({
|
|
12841
|
+
length: 10
|
|
12842
|
+
}).map((_, index) => jsx(SkeletonCard, {}, index))
|
|
12843
|
+
}));
|
|
12844
|
+
};
|
|
12845
|
+
const SkeletonCard = () => {
|
|
12846
|
+
return jsxs("div", Object.assign({
|
|
12847
|
+
css: styles$d.skeletonCard
|
|
12848
|
+
}, {
|
|
12849
|
+
children: [jsxs("div", Object.assign({
|
|
12850
|
+
css: styles$d.skeletonCardColumnLeft
|
|
12851
|
+
}, {
|
|
12852
|
+
children: [jsxs("div", Object.assign({
|
|
12853
|
+
css: styles$d.skeletonCardLogo
|
|
12854
|
+
}, {
|
|
12855
|
+
children: [jsx(Skeleton, {
|
|
12856
|
+
animation: SkeletonAnimation.WAVE,
|
|
12857
|
+
backgroundColor: SkeletonBackgroundColor.DARK,
|
|
12858
|
+
height: 24,
|
|
12859
|
+
variant: SkeletonVariant.RECT,
|
|
12860
|
+
width: 24
|
|
12861
|
+
}), jsx(Skeleton, {
|
|
12862
|
+
animation: SkeletonAnimation.WAVE,
|
|
12863
|
+
backgroundColor: SkeletonBackgroundColor.DARK,
|
|
12864
|
+
height: 16,
|
|
12865
|
+
variant: SkeletonVariant.TEXT,
|
|
12866
|
+
width: 48
|
|
12867
|
+
})]
|
|
12868
|
+
})), jsxs("div", Object.assign({
|
|
12869
|
+
css: styles$d.skeletonCardTransactionRow
|
|
12870
|
+
}, {
|
|
12871
|
+
children: [jsx(Skeleton, {
|
|
12872
|
+
animation: SkeletonAnimation.WAVE,
|
|
12873
|
+
backgroundColor: SkeletonBackgroundColor.DARK,
|
|
12874
|
+
height: 16,
|
|
12875
|
+
variant: SkeletonVariant.TEXT,
|
|
12876
|
+
width: 40
|
|
12877
|
+
}), jsx(Skeleton, {
|
|
12878
|
+
animation: SkeletonAnimation.WAVE,
|
|
12879
|
+
backgroundColor: SkeletonBackgroundColor.DARK,
|
|
12880
|
+
height: 16,
|
|
12881
|
+
variant: SkeletonVariant.TEXT,
|
|
12882
|
+
width: 64
|
|
12883
|
+
})]
|
|
12884
|
+
}))]
|
|
12885
|
+
})), jsxs("div", Object.assign({
|
|
12886
|
+
css: styles$d.skeletonCardColumnRight
|
|
12887
|
+
}, {
|
|
12888
|
+
children: [jsx(Skeleton, {
|
|
12889
|
+
animation: SkeletonAnimation.WAVE,
|
|
12890
|
+
backgroundColor: SkeletonBackgroundColor.DARK,
|
|
12891
|
+
height: 16,
|
|
12892
|
+
variant: SkeletonVariant.TEXT,
|
|
12893
|
+
width: 56
|
|
12894
|
+
}), jsx(Skeleton, {
|
|
12895
|
+
animation: SkeletonAnimation.WAVE,
|
|
12896
|
+
backgroundColor: SkeletonBackgroundColor.DARK,
|
|
12897
|
+
height: 16,
|
|
12898
|
+
variant: SkeletonVariant.TEXT,
|
|
12899
|
+
width: 56
|
|
12900
|
+
})]
|
|
12901
|
+
}))]
|
|
12902
|
+
}));
|
|
12903
|
+
};
|
|
12904
|
+
const SkeletonPagination = () => {
|
|
12905
|
+
return jsxs("div", Object.assign({
|
|
12906
|
+
css: styles$d.skeletonPagination
|
|
12907
|
+
}, {
|
|
12908
|
+
children: [jsx(Skeleton, {
|
|
12909
|
+
animation: SkeletonAnimation.WAVE,
|
|
12910
|
+
backgroundColor: SkeletonBackgroundColor.DARK,
|
|
12911
|
+
height: 24,
|
|
12912
|
+
variant: SkeletonVariant.RECT,
|
|
12913
|
+
width: 24
|
|
12914
|
+
}), Array.from({
|
|
12915
|
+
length: 6
|
|
12916
|
+
}).map((_, index) => jsx(Skeleton, {
|
|
12917
|
+
animation: SkeletonAnimation.WAVE,
|
|
12918
|
+
backgroundColor: SkeletonBackgroundColor.LIGHT,
|
|
12919
|
+
height: 16,
|
|
12920
|
+
variant: SkeletonVariant.CIRCLE,
|
|
12921
|
+
width: 16
|
|
12922
|
+
}, index)), jsx(Skeleton, {
|
|
12923
|
+
animation: SkeletonAnimation.WAVE,
|
|
12924
|
+
backgroundColor: SkeletonBackgroundColor.DARK,
|
|
12925
|
+
height: 24,
|
|
12926
|
+
variant: SkeletonVariant.RECT,
|
|
12927
|
+
width: 24
|
|
12928
|
+
})]
|
|
12929
|
+
}));
|
|
12930
|
+
};
|
|
12931
|
+
|
|
12932
|
+
const LabelLayoutPurchase = ({
|
|
12933
|
+
onChange
|
|
12934
|
+
}) => {
|
|
12935
|
+
const {
|
|
12936
|
+
t
|
|
12937
|
+
} = useTranslation(["common", "manage-defaults"]);
|
|
12938
|
+
const [layout, setLayout] = useState("4x6");
|
|
12939
|
+
return jsxs(Fragment, {
|
|
12940
|
+
children: [jsx(InlineNotification, Object.assign({
|
|
12941
|
+
title: t("manage-defaults:label.purchase.title"),
|
|
12942
|
+
type: NotificationType.INFO
|
|
12943
|
+
}, {
|
|
12944
|
+
children: t("manage-defaults:label.purchase.description")
|
|
12945
|
+
})), jsx(Spacer, {
|
|
12946
|
+
multiplier: 1.5
|
|
12947
|
+
}), jsxs(RadioGroup, Object.assign({
|
|
12948
|
+
name: "labelLayout",
|
|
12949
|
+
onChange: e => {
|
|
12950
|
+
setLayout(e.target.value);
|
|
12951
|
+
onChange(e.target.value);
|
|
12952
|
+
},
|
|
12953
|
+
value: layout
|
|
12954
|
+
}, {
|
|
12955
|
+
children: [jsx(Radio, Object.assign({
|
|
12956
|
+
value: "Letter"
|
|
12957
|
+
}, {
|
|
12958
|
+
children: jsx(Typography, Object.assign({
|
|
12959
|
+
bold: true
|
|
12960
|
+
}, {
|
|
12961
|
+
children: t("manage-defaults:label.letter.title")
|
|
12962
|
+
}))
|
|
12963
|
+
})), jsx(Spacer, {
|
|
12964
|
+
multiplier: 3
|
|
12965
|
+
}), jsx(Radio, Object.assign({
|
|
12966
|
+
value: "4x6"
|
|
12967
|
+
}, {
|
|
12968
|
+
children: jsx(Typography, Object.assign({
|
|
12969
|
+
bold: true
|
|
12970
|
+
}, {
|
|
12971
|
+
children: t("manage-defaults:label.thermal.title")
|
|
12972
|
+
}))
|
|
12973
|
+
}))]
|
|
12974
|
+
}))]
|
|
12975
|
+
});
|
|
12976
|
+
};
|
|
12977
|
+
|
|
12978
|
+
const styles$c = createStyles({
|
|
12979
|
+
button: theme => ({
|
|
12980
|
+
backgroundColor: "transparent",
|
|
12981
|
+
padding: 0
|
|
12982
|
+
}),
|
|
12983
|
+
buttonContainer: theme => ({
|
|
12984
|
+
alignItems: "center",
|
|
12985
|
+
display: "flex",
|
|
12986
|
+
justifyContent: "left"
|
|
12987
|
+
}),
|
|
12988
|
+
icon: theme => ({
|
|
12989
|
+
color: theme.palette.secondary.main,
|
|
12175
12990
|
position: "absolute",
|
|
12176
12991
|
right: theme.spacing(1),
|
|
12177
12992
|
top: theme.spacing(1)
|
|
@@ -12514,9 +13329,10 @@ const UnitSettings = () => {
|
|
|
12514
13329
|
|
|
12515
13330
|
const AccountSettings = _a => {
|
|
12516
13331
|
var {
|
|
12517
|
-
carriers
|
|
13332
|
+
carriers,
|
|
13333
|
+
currency
|
|
12518
13334
|
} = _a,
|
|
12519
|
-
rest = __rest(_a, ["carriers"]);
|
|
13335
|
+
rest = __rest(_a, ["carriers", "currency"]);
|
|
12520
13336
|
const {
|
|
12521
13337
|
t
|
|
12522
13338
|
} = useTranslation();
|
|
@@ -12534,8 +13350,9 @@ const AccountSettings = _a => {
|
|
|
12534
13350
|
})), jsx(Spacer, {
|
|
12535
13351
|
multiplier: 1
|
|
12536
13352
|
}), jsx(ManageFunding, {
|
|
12537
|
-
carrierId: carriers ? carriers[0].carrierId : ""
|
|
12538
|
-
|
|
13353
|
+
carrierId: carriers ? carriers[0].carrierId : "",
|
|
13354
|
+
currency: currency
|
|
13355
|
+
}), jsx(PaymentMethodSettings, {}), jsx(WalletHistory, {}), jsx(Component$6, {}), jsx(Component$7, {}), jsx(LabelLayout, {
|
|
12539
13356
|
display: "settings"
|
|
12540
13357
|
}), jsx(UnitSettings, {}), jsx("div", Object.assign({
|
|
12541
13358
|
css: theme => ({
|
|
@@ -12549,6 +13366,9 @@ const AccountSettings = _a => {
|
|
|
12549
13366
|
|
|
12550
13367
|
var accoutSettings = {
|
|
12551
13368
|
"account-settings": {
|
|
13369
|
+
messages: {
|
|
13370
|
+
noFundingSources: "No transaction history available. Once you have a wallet balance and transactions, they will appear here."
|
|
13371
|
+
},
|
|
12552
13372
|
title: "Account Settings",
|
|
12553
13373
|
sections: {
|
|
12554
13374
|
accountBalance: "Account Balance",
|
|
@@ -12701,6 +13521,7 @@ var common = {
|
|
|
12701
13521
|
autoFundingSettings: "Unable to load auto funding settings",
|
|
12702
13522
|
carrier: "Unable to load carrier",
|
|
12703
13523
|
carriers: "Unable to load carriers",
|
|
13524
|
+
connectCarrierForm: "Unable to load carrier registration form.",
|
|
12704
13525
|
fundingSourceMetadata: "Unable to load funding source metadata",
|
|
12705
13526
|
label: "Unable to load label",
|
|
12706
13527
|
salesOrder: "Unable to load order",
|
|
@@ -12738,6 +13559,7 @@ var common = {
|
|
|
12738
13559
|
accountSettings: "Loading account settings...",
|
|
12739
13560
|
carrier: "Loading carrier...",
|
|
12740
13561
|
carriers: "Loading carriers...",
|
|
13562
|
+
connectCarrierForm: "Loading carrier registration form...",
|
|
12741
13563
|
connectingCarriers: "Connecting carriers...",
|
|
12742
13564
|
creatingFundingSource: "Creating wallet...",
|
|
12743
13565
|
data: "Loading...",
|
|
@@ -12844,7 +13666,6 @@ var connectCarriers = {
|
|
|
12844
13666
|
"connect-carrier": {
|
|
12845
13667
|
registrationForm: {
|
|
12846
13668
|
title: "Register Carrier",
|
|
12847
|
-
isLoading: "Loading carrier registration form...",
|
|
12848
13669
|
betaWarning: "{{carrier}} is currently in a beta test phase and you may experience unexpected behavior."
|
|
12849
13670
|
}
|
|
12850
13671
|
}
|
|
@@ -12939,7 +13760,7 @@ var manageFunding = {
|
|
|
12939
13760
|
labels: {
|
|
12940
13761
|
amount: "Amount"
|
|
12941
13762
|
},
|
|
12942
|
-
minimumPurchaseAmount: "Minimum Purchase
|
|
13763
|
+
minimumPurchaseAmount: "Minimum Purchase {{currencySymbol}}10.00",
|
|
12943
13764
|
other: "Other..."
|
|
12944
13765
|
},
|
|
12945
13766
|
fundAndPurchase: {
|
|
@@ -13258,9 +14079,16 @@ var walletHistory = {
|
|
|
13258
14079
|
"wallet-history": {
|
|
13259
14080
|
actions: {
|
|
13260
14081
|
downloadCsv: "Download a CSV",
|
|
13261
|
-
chooseDate: "Choose a date"
|
|
14082
|
+
chooseDate: "Choose a date",
|
|
14083
|
+
tryAgain: "Refresh the page and try again."
|
|
14084
|
+
},
|
|
14085
|
+
errors: {
|
|
14086
|
+
failureToFetch: "Unable to load history"
|
|
13262
14087
|
},
|
|
13263
14088
|
dateRange: "Date range",
|
|
14089
|
+
details: {
|
|
14090
|
+
inaccurateWeight: "Inaccurate Weight"
|
|
14091
|
+
},
|
|
13264
14092
|
historyOptions: {
|
|
13265
14093
|
custom: "Custom",
|
|
13266
14094
|
last30days: "Last 30 days",
|
|
@@ -13297,11 +14125,17 @@ var en = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(O
|
|
|
13297
14125
|
const Component$5 = ({
|
|
13298
14126
|
onSaveSettings
|
|
13299
14127
|
}) => {
|
|
14128
|
+
var _a;
|
|
13300
14129
|
const {
|
|
13301
14130
|
data: carriers
|
|
13302
14131
|
} = useListCarriers();
|
|
14132
|
+
const {
|
|
14133
|
+
data: fundingSource
|
|
14134
|
+
} = useListFundingSources();
|
|
14135
|
+
const currency = getCurrencyFromString((_a = fundingSource === null || fundingSource === void 0 ? void 0 : fundingSource[0]) === null || _a === void 0 ? void 0 : _a.currencyCode);
|
|
13303
14136
|
return jsx(AccountSettings, {
|
|
13304
|
-
carriers: carriers
|
|
14137
|
+
carriers: carriers,
|
|
14138
|
+
currency: currency
|
|
13305
14139
|
});
|
|
13306
14140
|
};
|
|
13307
14141
|
/**
|
|
@@ -13405,14 +14239,15 @@ const RateForm = ({
|
|
|
13405
14239
|
labelErrors,
|
|
13406
14240
|
labels,
|
|
13407
14241
|
labelsLoading,
|
|
13408
|
-
|
|
13409
|
-
onSelectRate,
|
|
13410
|
-
onSubmit,
|
|
14242
|
+
currency,
|
|
13411
14243
|
displayableShipmentErrors,
|
|
13412
14244
|
preferredRates,
|
|
13413
14245
|
preferredServiceCodes,
|
|
13414
14246
|
rates,
|
|
13415
|
-
shipment
|
|
14247
|
+
shipment,
|
|
14248
|
+
onSave,
|
|
14249
|
+
onSelectRate,
|
|
14250
|
+
onSubmit
|
|
13416
14251
|
}) => {
|
|
13417
14252
|
var _a, _b, _c, _d, _e, _f;
|
|
13418
14253
|
features = Object.assign({
|
|
@@ -13615,6 +14450,7 @@ const RateForm = ({
|
|
|
13615
14450
|
carrierId: selectedRate === null || selectedRate === void 0 ? void 0 : selectedRate.carrierId,
|
|
13616
14451
|
control: form.control,
|
|
13617
14452
|
css: styles$b.fundAndPurchase,
|
|
14453
|
+
currency: currency,
|
|
13618
14454
|
disabled: disabled,
|
|
13619
14455
|
isFundingEnabled: !!((_e = features === null || features === void 0 ? void 0 : features.rateForm) === null || _e === void 0 ? void 0 : _e.enableFunding),
|
|
13620
14456
|
isFundingRequired: (selectedRate === null || selectedRate === void 0 ? void 0 : selectedRate.balance) !== undefined && !!selectedRate.requiresFundedAmount,
|
|
@@ -13628,63 +14464,6 @@ const RateForm = ({
|
|
|
13628
14464
|
}));
|
|
13629
14465
|
};
|
|
13630
14466
|
|
|
13631
|
-
var $$6 = _export;
|
|
13632
|
-
var DESCRIPTORS$1 = descriptors;
|
|
13633
|
-
var global$8 = global$p;
|
|
13634
|
-
var uncurryThis$1 = functionUncurryThis;
|
|
13635
|
-
var hasOwn$1 = hasOwnProperty_1;
|
|
13636
|
-
var isCallable$4 = isCallable$o;
|
|
13637
|
-
var isPrototypeOf$1 = objectIsPrototypeOf;
|
|
13638
|
-
var toString = toString$c;
|
|
13639
|
-
var defineProperty = objectDefineProperty.f;
|
|
13640
|
-
var copyConstructorProperties = copyConstructorProperties$2;
|
|
13641
|
-
|
|
13642
|
-
var NativeSymbol = global$8.Symbol;
|
|
13643
|
-
var SymbolPrototype = NativeSymbol && NativeSymbol.prototype;
|
|
13644
|
-
|
|
13645
|
-
if (DESCRIPTORS$1 && isCallable$4(NativeSymbol) && (!('description' in SymbolPrototype) ||
|
|
13646
|
-
// Safari 12 bug
|
|
13647
|
-
NativeSymbol().description !== undefined
|
|
13648
|
-
)) {
|
|
13649
|
-
var EmptyStringDescriptionStore = {};
|
|
13650
|
-
// wrap Symbol constructor for correct work with undefined description
|
|
13651
|
-
var SymbolWrapper = function Symbol() {
|
|
13652
|
-
var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString(arguments[0]);
|
|
13653
|
-
var result = isPrototypeOf$1(SymbolPrototype, this)
|
|
13654
|
-
? new NativeSymbol(description)
|
|
13655
|
-
// in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
|
|
13656
|
-
: description === undefined ? NativeSymbol() : NativeSymbol(description);
|
|
13657
|
-
if (description === '') EmptyStringDescriptionStore[result] = true;
|
|
13658
|
-
return result;
|
|
13659
|
-
};
|
|
13660
|
-
|
|
13661
|
-
copyConstructorProperties(SymbolWrapper, NativeSymbol);
|
|
13662
|
-
SymbolWrapper.prototype = SymbolPrototype;
|
|
13663
|
-
SymbolPrototype.constructor = SymbolWrapper;
|
|
13664
|
-
|
|
13665
|
-
var NATIVE_SYMBOL = String(NativeSymbol('test')) == 'Symbol(test)';
|
|
13666
|
-
var thisSymbolValue = uncurryThis$1(SymbolPrototype.valueOf);
|
|
13667
|
-
var symbolDescriptiveString = uncurryThis$1(SymbolPrototype.toString);
|
|
13668
|
-
var regexp = /^Symbol\((.*)\)[^)]+$/;
|
|
13669
|
-
var replace = uncurryThis$1(''.replace);
|
|
13670
|
-
var stringSlice = uncurryThis$1(''.slice);
|
|
13671
|
-
|
|
13672
|
-
defineProperty(SymbolPrototype, 'description', {
|
|
13673
|
-
configurable: true,
|
|
13674
|
-
get: function description() {
|
|
13675
|
-
var symbol = thisSymbolValue(this);
|
|
13676
|
-
if (hasOwn$1(EmptyStringDescriptionStore, symbol)) return '';
|
|
13677
|
-
var string = symbolDescriptiveString(symbol);
|
|
13678
|
-
var desc = NATIVE_SYMBOL ? stringSlice(string, 7, -1) : replace(string, regexp, '$1');
|
|
13679
|
-
return desc === '' ? undefined : desc;
|
|
13680
|
-
}
|
|
13681
|
-
});
|
|
13682
|
-
|
|
13683
|
-
$$6({ global: true, constructor: true, forced: true }, {
|
|
13684
|
-
Symbol: SymbolWrapper
|
|
13685
|
-
});
|
|
13686
|
-
}
|
|
13687
|
-
|
|
13688
14467
|
const styles$a = createStyles({
|
|
13689
14468
|
container: theme => ({
|
|
13690
14469
|
display: "flex",
|
|
@@ -13843,12 +14622,12 @@ const AddressPreferenceDisplay = ({
|
|
|
13843
14622
|
};
|
|
13844
14623
|
|
|
13845
14624
|
extendZod();
|
|
13846
|
-
const
|
|
14625
|
+
const getProductFormSchema = shipToCountry => {
|
|
13847
14626
|
const baseSchema = z.object({
|
|
13848
14627
|
countryOfOrigin: z.enum(countryCodes),
|
|
13849
|
-
customsItemId: z.string().nullishDefault(undefined),
|
|
13850
14628
|
description: z.string().min(1).max(100),
|
|
13851
14629
|
harmonizedTariffCode: z.string().max(13).nullishDefault(undefined),
|
|
14630
|
+
productId: z.string().nullishDefault(undefined),
|
|
13852
14631
|
valueQuantity: z.object({
|
|
13853
14632
|
quantity: z.number().int(),
|
|
13854
14633
|
value: moneySchema
|
|
@@ -13874,8 +14653,8 @@ const getCustomsItemFormSchema = shipToCountry => {
|
|
|
13874
14653
|
});
|
|
13875
14654
|
};
|
|
13876
14655
|
|
|
13877
|
-
const
|
|
13878
|
-
|
|
14656
|
+
const ProductForm = ({
|
|
14657
|
+
product,
|
|
13879
14658
|
formId,
|
|
13880
14659
|
onCancel,
|
|
13881
14660
|
onSubmit,
|
|
@@ -13889,24 +14668,19 @@ const CustomsItemForm = ({
|
|
|
13889
14668
|
countryCodeOptions
|
|
13890
14669
|
} = useCountryCodeOptions();
|
|
13891
14670
|
const form = useForm({
|
|
13892
|
-
defaultValues:
|
|
13893
|
-
countryOfOrigin:
|
|
13894
|
-
|
|
13895
|
-
|
|
13896
|
-
|
|
14671
|
+
defaultValues: product ? {
|
|
14672
|
+
countryOfOrigin: product.countryOfOrigin,
|
|
14673
|
+
description: product.description,
|
|
14674
|
+
harmonizedTariffCode: product.harmonizedTariffCode,
|
|
14675
|
+
productId: product.productId,
|
|
13897
14676
|
valueQuantity: {
|
|
13898
|
-
quantity:
|
|
13899
|
-
|
|
13900
|
-
// Per Anne, this was to handle backwards compatibility when API used to only accept Number
|
|
13901
|
-
value: {
|
|
13902
|
-
amount: customsItem.value,
|
|
13903
|
-
currency: SE.Currency.USD
|
|
13904
|
-
}
|
|
14677
|
+
quantity: product.quantity,
|
|
14678
|
+
value: product.value
|
|
13905
14679
|
}
|
|
13906
14680
|
} : {
|
|
13907
14681
|
countryOfOrigin: "US"
|
|
13908
14682
|
},
|
|
13909
|
-
resolver: validationResolver(
|
|
14683
|
+
resolver: validationResolver(getProductFormSchema(shipToCountry !== null && shipToCountry !== void 0 ? shipToCountry : "US"))
|
|
13910
14684
|
});
|
|
13911
14685
|
const handleSubmit = form.handleSubmit(values => __awaiter(void 0, void 0, void 0, function* () {
|
|
13912
14686
|
const payload = values;
|
|
@@ -13971,12 +14745,12 @@ const CustomsItemForm = ({
|
|
|
13971
14745
|
children: t("actions.cancel")
|
|
13972
14746
|
})), jsx(SubmitButton, Object.assign({
|
|
13973
14747
|
control: form.control,
|
|
13974
|
-
"data-testid": (
|
|
14748
|
+
"data-testid": (product === null || product === void 0 ? void 0 : product.productId) ? "actions.save" : "actions.add",
|
|
13975
14749
|
form: formId,
|
|
13976
14750
|
requireDirty: true,
|
|
13977
14751
|
variant: ButtonVariant.OUTLINED
|
|
13978
14752
|
}, {
|
|
13979
|
-
children: t((
|
|
14753
|
+
children: t((product === null || product === void 0 ? void 0 : product.productId) ? "actions.save" : "actions.add")
|
|
13980
14754
|
}))]
|
|
13981
14755
|
}))]
|
|
13982
14756
|
}));
|
|
@@ -14086,7 +14860,7 @@ const styles$9 = createStyles({
|
|
|
14086
14860
|
})
|
|
14087
14861
|
});
|
|
14088
14862
|
|
|
14089
|
-
const
|
|
14863
|
+
const ProductActions = ({
|
|
14090
14864
|
onEditClick,
|
|
14091
14865
|
onDeleteClick
|
|
14092
14866
|
}) => {
|
|
@@ -14139,7 +14913,7 @@ const CustomsItemActions = ({
|
|
|
14139
14913
|
}))]
|
|
14140
14914
|
});
|
|
14141
14915
|
};
|
|
14142
|
-
const
|
|
14916
|
+
const ProductsDisplay = ({
|
|
14143
14917
|
onUpdate,
|
|
14144
14918
|
shipment
|
|
14145
14919
|
}) => {
|
|
@@ -14147,19 +14921,19 @@ const CustomsItemsDisplay = ({
|
|
|
14147
14921
|
const {
|
|
14148
14922
|
t
|
|
14149
14923
|
} = useTranslation(["purchase-label"]);
|
|
14150
|
-
const [
|
|
14151
|
-
const
|
|
14152
|
-
const [
|
|
14153
|
-
|
|
14154
|
-
|
|
14155
|
-
onCancel: () => setCustomsItemBeingEdited(undefined),
|
|
14924
|
+
const [productBeingEdited, setProductBeingEdited] = useState();
|
|
14925
|
+
const products = (_b = (_a = shipment.packages[0]) === null || _a === void 0 ? void 0 : _a.products) !== null && _b !== void 0 ? _b : [];
|
|
14926
|
+
const [productForm, isCustomsItemFormOpen, toggleIsCustomsItemFormOpen] = useNestedForm(ProductForm, {
|
|
14927
|
+
formId: "product-form",
|
|
14928
|
+
onCancel: () => setProductBeingEdited(undefined),
|
|
14156
14929
|
onSubmit: payload => __awaiter(void 0, void 0, void 0, function* () {
|
|
14157
|
-
yield onUpdate(
|
|
14158
|
-
:
|
|
14930
|
+
yield onUpdate(productBeingEdited ? products.map(item => item.productId === payload.productId ? payload : item) // product was edited
|
|
14931
|
+
: products.concat(payload) // product was created
|
|
14159
14932
|
);
|
|
14160
14933
|
|
|
14161
|
-
|
|
14934
|
+
setProductBeingEdited(undefined);
|
|
14162
14935
|
}),
|
|
14936
|
+
product: productBeingEdited,
|
|
14163
14937
|
shipToCountry: (_c = shipment.shipTo) === null || _c === void 0 ? void 0 : _c.countryCode
|
|
14164
14938
|
});
|
|
14165
14939
|
return jsxs(Fragment, {
|
|
@@ -14191,7 +14965,7 @@ const CustomsItemsDisplay = ({
|
|
|
14191
14965
|
children: ["+ ", t("customs.addDeclaration")]
|
|
14192
14966
|
}))
|
|
14193
14967
|
}))]
|
|
14194
|
-
})),
|
|
14968
|
+
})), products.length > 0 && jsxs(Fragment, {
|
|
14195
14969
|
children: [jsx(Spacer, {}), jsx(Table, Object.assign({
|
|
14196
14970
|
header: jsx(TableHeader, Object.assign({
|
|
14197
14971
|
css: styles$9.header
|
|
@@ -14245,12 +15019,12 @@ const CustomsItemsDisplay = ({
|
|
|
14245
15019
|
outerWrapperStyles: styles$9.table
|
|
14246
15020
|
}, {
|
|
14247
15021
|
children: jsx(TableBody, {
|
|
14248
|
-
children:
|
|
15022
|
+
children: products.map(item => jsxs(Fragment$1, {
|
|
14249
15023
|
children: [jsx(TableBaseRow, {
|
|
14250
|
-
children: item.
|
|
15024
|
+
children: item.productId === (productBeingEdited === null || productBeingEdited === void 0 ? void 0 : productBeingEdited.productId) ? jsx(TableBodyCell, Object.assign({
|
|
14251
15025
|
colSpan: 5
|
|
14252
15026
|
}, {
|
|
14253
|
-
children:
|
|
15027
|
+
children: productForm
|
|
14254
15028
|
})) : jsxs(Fragment, {
|
|
14255
15029
|
children: [jsx(TableBodyCell, Object.assign({
|
|
14256
15030
|
css: styles$9.itemInfoLeft
|
|
@@ -14264,7 +15038,7 @@ const CustomsItemsDisplay = ({
|
|
|
14264
15038
|
}), jsx(Link, Object.assign({
|
|
14265
15039
|
css: styles$9.alertText,
|
|
14266
15040
|
onClick: () => {
|
|
14267
|
-
|
|
15041
|
+
setProductBeingEdited(item);
|
|
14268
15042
|
!isCustomsItemFormOpen && toggleIsCustomsItemFormOpen();
|
|
14269
15043
|
}
|
|
14270
15044
|
}, {
|
|
@@ -14274,10 +15048,7 @@ const CustomsItemsDisplay = ({
|
|
|
14274
15048
|
})), jsx(TableBodyCell, Object.assign({
|
|
14275
15049
|
css: styles$9.itemEach
|
|
14276
15050
|
}, {
|
|
14277
|
-
children: formatMoney(
|
|
14278
|
-
amount: Number(item.value),
|
|
14279
|
-
currency: SE.Currency.USD
|
|
14280
|
-
})
|
|
15051
|
+
children: formatMoney(item.value)
|
|
14281
15052
|
})), jsx(TableBodyCell, Object.assign({
|
|
14282
15053
|
css: styles$9.itemQty
|
|
14283
15054
|
}, {
|
|
@@ -14286,36 +15057,36 @@ const CustomsItemsDisplay = ({
|
|
|
14286
15057
|
css: styles$9.itemTotal
|
|
14287
15058
|
}, {
|
|
14288
15059
|
children: formatMoney({
|
|
14289
|
-
amount: Number(item.value) * item.quantity,
|
|
14290
|
-
currency:
|
|
15060
|
+
amount: Number(item.value.amount) * item.quantity,
|
|
15061
|
+
currency: item.value.currency
|
|
14291
15062
|
})
|
|
14292
15063
|
})), jsx(TableBodyCell, Object.assign({
|
|
14293
15064
|
css: styles$9.actionsColumn
|
|
14294
15065
|
}, {
|
|
14295
|
-
children: jsx(
|
|
15066
|
+
children: jsx(ProductActions, {
|
|
14296
15067
|
onDeleteClick: () => __awaiter(void 0, void 0, void 0, function* () {
|
|
14297
15068
|
var _d;
|
|
14298
|
-
return yield onUpdate((_d =
|
|
15069
|
+
return yield onUpdate((_d = products.filter(ci => ci.productId !== item.productId)) !== null && _d !== void 0 ? _d : []);
|
|
14299
15070
|
}),
|
|
14300
15071
|
onEditClick: () => {
|
|
14301
|
-
|
|
15072
|
+
setProductBeingEdited(item);
|
|
14302
15073
|
!isCustomsItemFormOpen && toggleIsCustomsItemFormOpen();
|
|
14303
15074
|
}
|
|
14304
15075
|
})
|
|
14305
15076
|
}))]
|
|
14306
15077
|
})
|
|
14307
|
-
}), item.
|
|
15078
|
+
}), item.productId !== (productBeingEdited === null || productBeingEdited === void 0 ? void 0 : productBeingEdited.productId) && jsx(TableBaseRow, {
|
|
14308
15079
|
children: jsx(TableBodyCell, Object.assign({
|
|
14309
15080
|
css: styles$9.hsCode
|
|
14310
15081
|
}, {
|
|
14311
15082
|
children: item.harmonizedTariffCode
|
|
14312
15083
|
}))
|
|
14313
15084
|
})]
|
|
14314
|
-
}, item.
|
|
15085
|
+
}, item.productId))
|
|
14315
15086
|
})
|
|
14316
|
-
})), !isCustomsItemFormOpen &&
|
|
14317
|
-
}), !
|
|
14318
|
-
children: [jsx(Spacer, {}),
|
|
15087
|
+
})), !isCustomsItemFormOpen && products.length > 1 && jsx(Spacer, {})]
|
|
15088
|
+
}), !productBeingEdited && jsxs(Fragment, {
|
|
15089
|
+
children: [jsx(Spacer, {}), productForm]
|
|
14319
15090
|
})]
|
|
14320
15091
|
});
|
|
14321
15092
|
};
|
|
@@ -14338,14 +15109,6 @@ const getShipmentSchema = ({
|
|
|
14338
15109
|
confirmation: z.nativeEnum(SE.ConfirmationType).default(SE.ConfirmationType.NONE),
|
|
14339
15110
|
customs: z.object({
|
|
14340
15111
|
contents: z.nativeEnum(SE.CustomsContentsType),
|
|
14341
|
-
customsItems: z.object({
|
|
14342
|
-
countryOfOrigin: z.string().nullishDefault(undefined),
|
|
14343
|
-
customsItemId: z.string().nullishDefault(undefined),
|
|
14344
|
-
description: z.string().nullishDefault(undefined),
|
|
14345
|
-
harmonizedTariffCode: z.string().nullishDefault(undefined),
|
|
14346
|
-
quantity: z.number().int(),
|
|
14347
|
-
value: z.number()
|
|
14348
|
-
}).array().min(1),
|
|
14349
15112
|
nonDelivery: z.nativeEnum(SE.CustomsNonDeliveryType)
|
|
14350
15113
|
}).nullish(),
|
|
14351
15114
|
insuranceProvider: z.nativeEnum(SE.InsuranceProviderType).default(SE.InsuranceProviderType.NONE),
|
|
@@ -14365,6 +15128,14 @@ const getShipmentSchema = ({
|
|
|
14365
15128
|
insuredValue: moneySchema.extend({
|
|
14366
15129
|
amount: z.number().positive()
|
|
14367
15130
|
}).optional(),
|
|
15131
|
+
products: z.object({
|
|
15132
|
+
countryOfOrigin: z.string().nullishDefault(undefined),
|
|
15133
|
+
description: z.string().nullishDefault(undefined),
|
|
15134
|
+
harmonizedTariffCode: z.string().nullishDefault(undefined),
|
|
15135
|
+
productId: z.string().nullishDefault(undefined),
|
|
15136
|
+
quantity: z.number().int(),
|
|
15137
|
+
value: moneySchema
|
|
15138
|
+
}).array().min(1),
|
|
14368
15139
|
type: z.object({
|
|
14369
15140
|
carrierId: z.string().nullish(),
|
|
14370
15141
|
code: z.string().nullish()
|
|
@@ -14461,7 +15232,7 @@ const ShipmentForm = ({
|
|
|
14461
15232
|
charsetWarning,
|
|
14462
15233
|
carriers,
|
|
14463
15234
|
customPackageTypes,
|
|
14464
|
-
|
|
15235
|
+
currency,
|
|
14465
15236
|
features,
|
|
14466
15237
|
hydrateRef,
|
|
14467
15238
|
insuranceAccount,
|
|
@@ -14482,7 +15253,7 @@ const ShipmentForm = ({
|
|
|
14482
15253
|
warehouseId,
|
|
14483
15254
|
warehouses
|
|
14484
15255
|
}) => {
|
|
14485
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
15256
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
14486
15257
|
features = Object.assign({
|
|
14487
15258
|
browseRates: true,
|
|
14488
15259
|
includeShipsuranceInsurance: true,
|
|
@@ -14525,7 +15296,7 @@ const ShipmentForm = ({
|
|
|
14525
15296
|
form.register("shipmentId");
|
|
14526
15297
|
const {
|
|
14527
15298
|
errors: {
|
|
14528
|
-
|
|
15299
|
+
packages: packageErrors
|
|
14529
15300
|
},
|
|
14530
15301
|
isDirty
|
|
14531
15302
|
} = form.formState;
|
|
@@ -14634,6 +15405,7 @@ const ShipmentForm = ({
|
|
|
14634
15405
|
currency: pkg.insuredValue.currency
|
|
14635
15406
|
}
|
|
14636
15407
|
}), {
|
|
15408
|
+
products: pkg.products,
|
|
14637
15409
|
type: Object.assign(Object.assign({}, !customPackage && pkg.packageCode !== "package" && {
|
|
14638
15410
|
carrierId: updatedShipment.carrierId
|
|
14639
15411
|
}), {
|
|
@@ -14654,12 +15426,13 @@ const ShipmentForm = ({
|
|
|
14654
15426
|
}, [findCustomPackage, form, isCustomsRequired, isContentDescriptionRequired]);
|
|
14655
15427
|
// Allow us to imperatively trigger hydrateShipment from parent component
|
|
14656
15428
|
hydrateRef.current = hydrateShipment;
|
|
14657
|
-
// Hydrate only the
|
|
14658
|
-
const
|
|
14659
|
-
|
|
14660
|
-
|
|
14661
|
-
|
|
14662
|
-
|
|
15429
|
+
// Hydrate only the products portion of the shipment form
|
|
15430
|
+
const hydrateProducts = useCallback(updatedShipment => {
|
|
15431
|
+
var _a;
|
|
15432
|
+
const formPkg = form.getValues("packages.0");
|
|
15433
|
+
if (((_a = updatedShipment === null || updatedShipment === void 0 ? void 0 : updatedShipment.packages[0]) === null || _a === void 0 ? void 0 : _a.products) && !_$3.isEqual(formPkg === null || formPkg === void 0 ? void 0 : formPkg.products, updatedShipment.packages[0].products)) {
|
|
15434
|
+
form.setValue("packages.0.products", updatedShipment.packages[0].products.map(ci => Object.assign(Object.assign({}, ci), {
|
|
15435
|
+
value: ci.value
|
|
14663
15436
|
})), {
|
|
14664
15437
|
shouldValidate: true
|
|
14665
15438
|
});
|
|
@@ -14667,16 +15440,16 @@ const ShipmentForm = ({
|
|
|
14667
15440
|
}, [form]);
|
|
14668
15441
|
const handleSubmit = form.handleSubmit(values => __awaiter(void 0, void 0, void 0, function* () {
|
|
14669
15442
|
try {
|
|
14670
|
-
const
|
|
15443
|
+
const _m = values,
|
|
14671
15444
|
{
|
|
14672
15445
|
__mode: discard
|
|
14673
|
-
} =
|
|
14674
|
-
payload = __rest(
|
|
14675
|
-
const updatedShipment = yield onSubmit(
|
|
15446
|
+
} = _m,
|
|
15447
|
+
payload = __rest(_m, ["__mode"]);
|
|
15448
|
+
const updatedShipment = yield onSubmit(_$3.merge(shipment || {}, payload));
|
|
14676
15449
|
// Defer shipment hydration to the task queue so that the submission promise resolves first, otherwise the
|
|
14677
15450
|
// submission count will increment after hydration resets the form, keeping it in revalidate mode
|
|
14678
15451
|
if (updatedShipment) setTimeout(() => hydrateShipment(updatedShipment), 0);
|
|
14679
|
-
} catch (
|
|
15452
|
+
} catch (_o) {
|
|
14680
15453
|
// Reset the form to its current state, but as a side effect this sets isDirty to false
|
|
14681
15454
|
// That way, form lifecycle contract is upheld
|
|
14682
15455
|
form.reset(form.getValues());
|
|
@@ -14748,9 +15521,9 @@ const ShipmentForm = ({
|
|
|
14748
15521
|
// Hydrate customs object with default values
|
|
14749
15522
|
form.setValue("customs", {
|
|
14750
15523
|
contents: SE.CustomsContentsType.MERCHANDISE,
|
|
14751
|
-
customsItems: [],
|
|
14752
15524
|
nonDelivery: SE.CustomsNonDeliveryType.RETURN_TO_SENDER
|
|
14753
15525
|
});
|
|
15526
|
+
form.setValue("packages.0.products", []);
|
|
14754
15527
|
} else if (wasCustomsRequired && !customsRequired) {
|
|
14755
15528
|
// If customs is no longer required, clear customs object from schema
|
|
14756
15529
|
form.setValue("customs", undefined);
|
|
@@ -14766,20 +15539,19 @@ const ShipmentForm = ({
|
|
|
14766
15539
|
parseAddressErrors,
|
|
14767
15540
|
resetParseAddress
|
|
14768
15541
|
});
|
|
14769
|
-
const
|
|
15542
|
+
const handleUpdateProducts = useCallback(products => __awaiter(void 0, void 0, void 0, function* () {
|
|
14770
15543
|
const result = yield onUpdateCustoms === null || onUpdateCustoms === void 0 ? void 0 : onUpdateCustoms({
|
|
14771
15544
|
// use defaults if the shipment doesn't already have a customs object
|
|
14772
15545
|
contents: selectedContentsType !== null && selectedContentsType !== void 0 ? selectedContentsType : "merchandise",
|
|
14773
|
-
customsItems,
|
|
14774
15546
|
nonDelivery: selectedNonDelivery !== null && selectedNonDelivery !== void 0 ? selectedNonDelivery : "return_to_sender"
|
|
14775
|
-
});
|
|
14776
|
-
if (result)
|
|
15547
|
+
}, products);
|
|
15548
|
+
if (result) hydrateProducts(result);
|
|
14777
15549
|
onDirty();
|
|
14778
|
-
}), [
|
|
15550
|
+
}), [hydrateProducts, onDirty, onUpdateCustoms, selectedContentsType, selectedNonDelivery]);
|
|
14779
15551
|
const customsItemErrorScrollToRef = useRef(null);
|
|
14780
15552
|
useEffect(() => {
|
|
14781
|
-
var _a;
|
|
14782
|
-
if (((_a =
|
|
15553
|
+
var _a, _b;
|
|
15554
|
+
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") {
|
|
14783
15555
|
setTimeout(() => {
|
|
14784
15556
|
var _a;
|
|
14785
15557
|
(_a = customsItemErrorScrollToRef.current) === null || _a === void 0 ? void 0 : _a.scrollIntoView({
|
|
@@ -14788,7 +15560,7 @@ const ShipmentForm = ({
|
|
|
14788
15560
|
});
|
|
14789
15561
|
}, 0);
|
|
14790
15562
|
}
|
|
14791
|
-
}, [
|
|
15563
|
+
}, [packageErrors]);
|
|
14792
15564
|
useEffect(() => {
|
|
14793
15565
|
const {
|
|
14794
15566
|
__mode
|
|
@@ -14814,6 +15586,7 @@ const ShipmentForm = ({
|
|
|
14814
15586
|
});
|
|
14815
15587
|
if (!shipment) throw new Error("errorMessages.unableToLoad.shipment");
|
|
14816
15588
|
const addressPreferenceIsEmpty = !addressLoading && isEmptyAddress(addressPreference === null || addressPreference === void 0 ? void 0 : addressPreference.selection); // undefined means it's still loading
|
|
15589
|
+
console.log(addressLoading || isEditShipFormToOpen || addressPreferenceIsEmpty);
|
|
14817
15590
|
return jsxs("form", Object.assign({
|
|
14818
15591
|
id: "shipment-form",
|
|
14819
15592
|
onSubmit: formLogger.capture(handleSubmit)
|
|
@@ -14956,10 +15729,10 @@ const ShipmentForm = ({
|
|
|
14956
15729
|
name: "customs.nonDelivery",
|
|
14957
15730
|
options: customsNonDeliveryOptions,
|
|
14958
15731
|
shouldUnregister: true
|
|
14959
|
-
}), jsx(
|
|
14960
|
-
onUpdate:
|
|
15732
|
+
}), jsx(ProductsDisplay, {
|
|
15733
|
+
onUpdate: handleUpdateProducts,
|
|
14961
15734
|
shipment: shipment
|
|
14962
|
-
}), ((_e =
|
|
15735
|
+
}), ((_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" && jsxs(Fragment, {
|
|
14963
15736
|
children: [jsx(Spacer, {}), jsx(InlineNotification, {
|
|
14964
15737
|
title: t("purchase-label:errorMessages.customsItemsRequired"),
|
|
14965
15738
|
type: NotificationType.ERROR
|
|
@@ -15151,14 +15924,14 @@ const ShipmentForm = ({
|
|
|
15151
15924
|
label: "purchase-label:fields.addOns"
|
|
15152
15925
|
}, {
|
|
15153
15926
|
children: [jsx(Switch, Object.assign({
|
|
15154
|
-
defaultChecked: ((
|
|
15927
|
+
defaultChecked: ((_g = shipment === null || shipment === void 0 ? void 0 : shipment.confirmation) !== null && _g !== void 0 ? _g : "none") !== "none",
|
|
15155
15928
|
label: t("purchase-label:fields.confirmation"),
|
|
15156
15929
|
name: "confirmationEnabled",
|
|
15157
15930
|
onChange: e => form.setValue("confirmation", e.target.checked ? SE.ConfirmationType.DELIVERY : undefined, {
|
|
15158
15931
|
shouldDirty: true
|
|
15159
15932
|
}),
|
|
15160
15933
|
shouldUnmount: true,
|
|
15161
|
-
value: ((
|
|
15934
|
+
value: ((_h = shipment === null || shipment === void 0 ? void 0 : shipment.confirmation) !== null && _h !== void 0 ? _h : "none") !== "none"
|
|
15162
15935
|
}, {
|
|
15163
15936
|
children: jsx(Select, {
|
|
15164
15937
|
control: form.control,
|
|
@@ -15170,7 +15943,7 @@ const ShipmentForm = ({
|
|
|
15170
15943
|
shouldUnregister: true
|
|
15171
15944
|
})
|
|
15172
15945
|
})), jsxs(Switch, Object.assign({
|
|
15173
|
-
defaultChecked: ((
|
|
15946
|
+
defaultChecked: ((_j = shipment === null || shipment === void 0 ? void 0 : shipment.insuranceProvider) !== null && _j !== void 0 ? _j : "none") !== "none",
|
|
15174
15947
|
label: t("purchase-label:fields.insurance"),
|
|
15175
15948
|
name: "insuranceEnabled",
|
|
15176
15949
|
onChange: e => {
|
|
@@ -15180,7 +15953,7 @@ const ShipmentForm = ({
|
|
|
15180
15953
|
});
|
|
15181
15954
|
},
|
|
15182
15955
|
shouldUnmount: true,
|
|
15183
|
-
value: ((
|
|
15956
|
+
value: ((_k = shipment === null || shipment === void 0 ? void 0 : shipment.insuranceProvider) !== null && _k !== void 0 ? _k : "none") !== "none"
|
|
15184
15957
|
}, {
|
|
15185
15958
|
children: [insuranceProviderOptions.length === 1 && insuranceProviderOptions[0].value === "carrier" ? null : jsx(Select, {
|
|
15186
15959
|
control: form.control,
|
|
@@ -15194,7 +15967,7 @@ const ShipmentForm = ({
|
|
|
15194
15967
|
control: form.control,
|
|
15195
15968
|
defaultValue: {
|
|
15196
15969
|
amount: undefined,
|
|
15197
|
-
currency
|
|
15970
|
+
currency
|
|
15198
15971
|
},
|
|
15199
15972
|
displayLabel: false,
|
|
15200
15973
|
label: t("purchase-label:fields.insuredValue"),
|
|
@@ -15204,7 +15977,7 @@ const ShipmentForm = ({
|
|
|
15204
15977
|
showCurrencySymbol: true
|
|
15205
15978
|
})]
|
|
15206
15979
|
})), hasUpsOptions && jsx(Switch, {
|
|
15207
|
-
defaultChecked: ((
|
|
15980
|
+
defaultChecked: ((_l = shipment === null || shipment === void 0 ? void 0 : shipment.advancedOptions) === null || _l === void 0 ? void 0 : _l.additionalHandling) || false,
|
|
15208
15981
|
label: jsx(Trans, {
|
|
15209
15982
|
components: {
|
|
15210
15983
|
Link: jsx(Link, {
|
|
@@ -15423,10 +16196,13 @@ const useCustoms = ({
|
|
|
15423
16196
|
error: updateShipmentErrors,
|
|
15424
16197
|
mutateAsync: updateShipment
|
|
15425
16198
|
} = useUpdateSalesOrderShipment();
|
|
15426
|
-
const handleUpdateCustoms = useCallback(customs => __awaiter(void 0, void 0, void 0, function* () {
|
|
16199
|
+
const handleUpdateCustoms = useCallback((customs, products) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15427
16200
|
if (!shipment) throw new Error("shipment not found");
|
|
15428
16201
|
const updatedShipment = yield updateShipment(Object.assign(Object.assign({}, shipment), {
|
|
15429
16202
|
customs,
|
|
16203
|
+
packages: [Object.assign(Object.assign({}, shipment.packages[0]), {
|
|
16204
|
+
products
|
|
16205
|
+
})],
|
|
15430
16206
|
shipDate: isNowOrInTheFuture(shipment.shipDate) ? shipment.shipDate : undefined
|
|
15431
16207
|
}));
|
|
15432
16208
|
if (updatedShipment) {
|
|
@@ -15450,10 +16226,10 @@ const usePresets = ({
|
|
|
15450
16226
|
} = useUpdateSalesOrderShipment();
|
|
15451
16227
|
const handleApplyPreset = preset => __awaiter(void 0, void 0, void 0, function* () {
|
|
15452
16228
|
if (!shipment) throw new Error("shipment not found");
|
|
15453
|
-
const updatedShipment = yield updateShipment(
|
|
16229
|
+
const updatedShipment = yield updateShipment(_$3.merge(shipment, preset.serviceCode && preset.carrierId && {
|
|
15454
16230
|
carrierId: preset.carrierId,
|
|
15455
16231
|
serviceCode: preset.serviceCode
|
|
15456
|
-
}
|
|
16232
|
+
}, {
|
|
15457
16233
|
confirmation: preset.confirmation,
|
|
15458
16234
|
insuranceProvider: preset.insuranceProvider,
|
|
15459
16235
|
packages: preset.weight && preset.packageCode ? [{
|
|
@@ -16085,6 +16861,7 @@ const ConfigureShipment = _a => {
|
|
|
16085
16861
|
var {
|
|
16086
16862
|
errors,
|
|
16087
16863
|
features,
|
|
16864
|
+
currency,
|
|
16088
16865
|
getPreferredRates,
|
|
16089
16866
|
onAddressValidation,
|
|
16090
16867
|
onApplyPreset,
|
|
@@ -16101,7 +16878,7 @@ const ConfigureShipment = _a => {
|
|
|
16101
16878
|
shipment,
|
|
16102
16879
|
onBeforeRateSaved
|
|
16103
16880
|
} = _a,
|
|
16104
|
-
props = __rest(_a, ["errors", "features", "getPreferredRates", "onAddressValidation", "onApplyPreset", "onBeforeLabelCreate", "onChangeAddress", "onLabelCreateFailure", "onLabelCreateSuccess", "onRateSaved", "onRatesCalculated", "onShipmentUpdated", "printLabelLayout", "preferredServiceCodes", "salesOrder", "shipment", "onBeforeRateSaved"]);
|
|
16881
|
+
props = __rest(_a, ["errors", "features", "currency", "getPreferredRates", "onAddressValidation", "onApplyPreset", "onBeforeLabelCreate", "onChangeAddress", "onLabelCreateFailure", "onLabelCreateSuccess", "onRateSaved", "onRatesCalculated", "onShipmentUpdated", "printLabelLayout", "preferredServiceCodes", "salesOrder", "shipment", "onBeforeRateSaved"]);
|
|
16105
16882
|
const hydrateRef = useRef();
|
|
16106
16883
|
const {
|
|
16107
16884
|
isInternational
|
|
@@ -16178,10 +16955,12 @@ const ConfigureShipment = _a => {
|
|
|
16178
16955
|
return jsxs(Fragment, {
|
|
16179
16956
|
children: [jsx(ShipmentForm, Object.assign({}, shipmentFormProps, props, {
|
|
16180
16957
|
charsetWarning: charsetWarning,
|
|
16958
|
+
currency: currency,
|
|
16181
16959
|
features: features === null || features === void 0 ? void 0 : features.shipmentForm,
|
|
16182
16960
|
hydrateRef: hydrateRef,
|
|
16183
16961
|
onDirty: handleOnDirty
|
|
16184
16962
|
})), jsx(RateForm, Object.assign({}, rateFormProps, {
|
|
16963
|
+
currency: currency,
|
|
16185
16964
|
disabled: charsetWarning === null || charsetWarning === void 0 ? void 0 : charsetWarning.error,
|
|
16186
16965
|
displayableShipmentErrors: shipmentFormProps.displayableErrors,
|
|
16187
16966
|
features: features,
|
|
@@ -16222,16 +17001,18 @@ const usePendingShipment = ({
|
|
|
16222
17001
|
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];
|
|
16223
17002
|
const handleShipmentCreation = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
16224
17003
|
if (!salesOrder || !defaultWarehouse || isCreatingShipment) return;
|
|
17004
|
+
const customsFromSalesOrder = getCustomsFromSalesOrder(salesOrder, defaultWarehouse);
|
|
16225
17005
|
try {
|
|
16226
17006
|
setIsCreatingShipment(true);
|
|
16227
17007
|
const shipment = yield createShipment(Object.assign(Object.assign({
|
|
16228
17008
|
salesOrderId: salesOrder.salesOrderId,
|
|
16229
17009
|
warehouseId: defaultWarehouse.warehouseId
|
|
16230
17010
|
}, getIsCustomsRequiredForSalesOrder(salesOrder, defaultWarehouse) && {
|
|
16231
|
-
customs:
|
|
17011
|
+
customs: customsFromSalesOrder.customs
|
|
16232
17012
|
}), {
|
|
16233
17013
|
packages: [{
|
|
16234
17014
|
packageCode: "package",
|
|
17015
|
+
products: customsFromSalesOrder.products,
|
|
16235
17016
|
weight: {
|
|
16236
17017
|
unit: "pound",
|
|
16237
17018
|
value: 0
|
|
@@ -17245,7 +18026,7 @@ const useImportSalesOrder = ({
|
|
|
17245
18026
|
};
|
|
17246
18027
|
|
|
17247
18028
|
const PurchaseLabelBySalesOrder = _a => {
|
|
17248
|
-
var _b;
|
|
18029
|
+
var _b, _c;
|
|
17249
18030
|
var {
|
|
17250
18031
|
features,
|
|
17251
18032
|
externalOrderId,
|
|
@@ -17255,10 +18036,11 @@ const PurchaseLabelBySalesOrder = _a => {
|
|
|
17255
18036
|
orderSourceCode,
|
|
17256
18037
|
salesOrderId,
|
|
17257
18038
|
warehouseId,
|
|
17258
|
-
printLabelLayout
|
|
18039
|
+
printLabelLayout,
|
|
18040
|
+
currency = SE.Currency.USD
|
|
17259
18041
|
} = _a,
|
|
17260
|
-
props = __rest(_a, ["features", "externalOrderId", "externalOrderNumber", "onLoad", "onShipmentUpdated", "orderSourceCode", "salesOrderId", "warehouseId", "printLabelLayout"]);
|
|
17261
|
-
const
|
|
18042
|
+
props = __rest(_a, ["features", "externalOrderId", "externalOrderNumber", "onLoad", "onShipmentUpdated", "orderSourceCode", "salesOrderId", "warehouseId", "printLabelLayout", "currency"]);
|
|
18043
|
+
const _d = useImportSalesOrder({
|
|
17262
18044
|
externalOrderId,
|
|
17263
18045
|
externalOrderNumber,
|
|
17264
18046
|
orderSourceCode,
|
|
@@ -17267,8 +18049,8 @@ const PurchaseLabelBySalesOrder = _a => {
|
|
|
17267
18049
|
{
|
|
17268
18050
|
salesOrder,
|
|
17269
18051
|
isLoading: salesOrderLoading
|
|
17270
|
-
} =
|
|
17271
|
-
salesOrderProps = __rest(
|
|
18052
|
+
} = _d,
|
|
18053
|
+
salesOrderProps = __rest(_d, ["salesOrder", "isLoading"]);
|
|
17272
18054
|
const configureShipmentProps = useConfigureShipment({
|
|
17273
18055
|
errorWhenShipmentCancelled: (_b = features === null || features === void 0 ? void 0 : features.configureShipment) === null || _b === void 0 ? void 0 : _b.enableErrorWhenShipmentCancelled,
|
|
17274
18056
|
onLoad,
|
|
@@ -17279,14 +18061,15 @@ const PurchaseLabelBySalesOrder = _a => {
|
|
|
17279
18061
|
});
|
|
17280
18062
|
const {
|
|
17281
18063
|
data: insuranceAccount,
|
|
17282
|
-
|
|
17283
|
-
} = useGetInsuranceAccount(
|
|
18064
|
+
isInitialLoading: insuranceIsLoading
|
|
18065
|
+
} = useGetInsuranceAccount(((_c = configureShipmentProps === null || configureShipmentProps === void 0 ? void 0 : configureShipmentProps.shipment) === null || _c === void 0 ? void 0 : _c.insuranceProvider) === SE.InsuranceProviderType.SHIPSURANCE ? SE.InsuranceProviderType.SHIPSURANCE : undefined);
|
|
17284
18066
|
return jsx(SuspendSalesOrder, Object.assign({
|
|
17285
18067
|
salesOrder: salesOrder
|
|
17286
18068
|
}, salesOrderProps, {
|
|
17287
18069
|
isLoading: salesOrderLoading || configureShipmentProps.isLoading || insuranceIsLoading
|
|
17288
18070
|
}, {
|
|
17289
18071
|
children: salesOrder && jsx(ConfigureShipment, Object.assign({
|
|
18072
|
+
currency: currency,
|
|
17290
18073
|
features: features,
|
|
17291
18074
|
insuranceAccount: insuranceAccount,
|
|
17292
18075
|
salesOrder: salesOrder
|
|
@@ -17369,9 +18152,10 @@ const PurchaseLabelByShipment = _a => {
|
|
|
17369
18152
|
var {
|
|
17370
18153
|
onLoad,
|
|
17371
18154
|
onShipmentUpdated,
|
|
17372
|
-
shipmentId
|
|
18155
|
+
shipmentId,
|
|
18156
|
+
currency = SE.Currency.USD
|
|
17373
18157
|
} = _a,
|
|
17374
|
-
props = __rest(_a, ["onLoad", "onShipmentUpdated", "shipmentId"]);
|
|
18158
|
+
props = __rest(_a, ["onLoad", "onShipmentUpdated", "shipmentId", "currency"]);
|
|
17375
18159
|
const _b = useGetOrCreateShipment(onShipmentUpdated, shipmentId),
|
|
17376
18160
|
{
|
|
17377
18161
|
shipment
|
|
@@ -17384,11 +18168,12 @@ const PurchaseLabelByShipment = _a => {
|
|
|
17384
18168
|
const {
|
|
17385
18169
|
data: insuranceAccount,
|
|
17386
18170
|
isInitialLoading: insuranceIsLoading
|
|
17387
|
-
} = useGetInsuranceAccount(
|
|
18171
|
+
} = useGetInsuranceAccount((shipment === null || shipment === void 0 ? void 0 : shipment.insuranceProvider) === SE.InsuranceProviderType.SHIPSURANCE ? SE.InsuranceProviderType.SHIPSURANCE : undefined);
|
|
17388
18172
|
return jsx(SuspendShipment, Object.assign({
|
|
17389
18173
|
shipment: shipment
|
|
17390
18174
|
}, shipmentProps, {
|
|
17391
18175
|
children: shipment && jsx(ConfigureShipment, Object.assign({
|
|
18176
|
+
currency: currency,
|
|
17392
18177
|
errors: shipmentProps.errors,
|
|
17393
18178
|
insuranceAccount: insuranceAccount,
|
|
17394
18179
|
isLoading: shipmentProps.isLoading || insuranceIsLoading,
|
|
@@ -17423,7 +18208,7 @@ const PurchaseLabelByShipment = _a => {
|
|
|
17423
18208
|
* @see {@link PurchaseLabel.Element | The **Element** created to render `<PurchaseLabel />`}
|
|
17424
18209
|
*/
|
|
17425
18210
|
const Component$4 = _a => {
|
|
17426
|
-
var _b;
|
|
18211
|
+
var _b, _c;
|
|
17427
18212
|
var {
|
|
17428
18213
|
features
|
|
17429
18214
|
} = _a,
|
|
@@ -17431,15 +18216,22 @@ const Component$4 = _a => {
|
|
|
17431
18216
|
const {
|
|
17432
18217
|
t
|
|
17433
18218
|
} = useTranslation();
|
|
17434
|
-
const
|
|
17435
|
-
|
|
18219
|
+
const {
|
|
18220
|
+
data: warehouses
|
|
18221
|
+
} = useListWarehouses();
|
|
18222
|
+
const {
|
|
18223
|
+
data: carriers
|
|
18224
|
+
} = useListCarriers();
|
|
18225
|
+
const {
|
|
18226
|
+
data: fundingSource
|
|
18227
|
+
} = useListFundingSources();
|
|
18228
|
+
const currency = getCurrencyFromString((_b = fundingSource === null || fundingSource === void 0 ? void 0 : fundingSource[0]) === null || _b === void 0 ? void 0 : _b.currencyCode);
|
|
17436
18229
|
const incompleteRequirementsKeys = useMemo(() => {
|
|
17437
|
-
|
|
17438
|
-
const
|
|
17439
|
-
const isMissingCarrier = ((_b = carriers.data) === null || _b === void 0 ? void 0 : _b.length) === 0;
|
|
18230
|
+
const isMissingWarehouse = (warehouses === null || warehouses === void 0 ? void 0 : warehouses.length) === 0;
|
|
18231
|
+
const isMissingCarrier = (carriers === null || carriers === void 0 ? void 0 : carriers.length) === 0;
|
|
17440
18232
|
return isMissingWarehouse && isMissingCarrier ? ["noWarehouseOrCarrier"] : [isMissingWarehouse && "noWarehouse", isMissingCarrier && "noCarrier"].filter(Boolean);
|
|
17441
18233
|
}, [carriers, warehouses]);
|
|
17442
|
-
const partnerMessages = (
|
|
18234
|
+
const partnerMessages = (_c = features === null || features === void 0 ? void 0 : features.partnerMessages) === null || _c === void 0 ? void 0 : _c.incompleteLabelPurchaseRequirements;
|
|
17443
18235
|
const incompleteRequirementsError = partnerMessages ? partnerMessages : t("errorMessages.incompleteLabelPurchaseRequirements", {
|
|
17444
18236
|
requirements: incompleteRequirementsKeys.map(key => t(`purchase-label:requirements.${key}`))
|
|
17445
18237
|
});
|
|
@@ -17447,9 +18239,13 @@ const Component$4 = _a => {
|
|
|
17447
18239
|
if ("salesOrderId" in props || "orderSourceCode" in props) {
|
|
17448
18240
|
return jsx(PurchaseLabelBySalesOrder, Object.assign({
|
|
17449
18241
|
features: features
|
|
17450
|
-
}, props
|
|
18242
|
+
}, props, {
|
|
18243
|
+
currency: currency
|
|
18244
|
+
}));
|
|
17451
18245
|
} else {
|
|
17452
|
-
return jsx(PurchaseLabelByShipment, Object.assign({}, props
|
|
18246
|
+
return jsx(PurchaseLabelByShipment, Object.assign({}, props, {
|
|
18247
|
+
currency: currency
|
|
18248
|
+
}));
|
|
17453
18249
|
}
|
|
17454
18250
|
};
|
|
17455
18251
|
/**
|
|
@@ -18685,7 +19481,7 @@ const styles$5 = createStyles({
|
|
|
18685
19481
|
}),
|
|
18686
19482
|
presetOption: theme => ({
|
|
18687
19483
|
"&:hover": {
|
|
18688
|
-
backgroundColor: theme.palette.gray.ultraLight
|
|
19484
|
+
backgroundColor: "theme.palette.gray.ultraLight"
|
|
18689
19485
|
},
|
|
18690
19486
|
backgroundColor: "transparent",
|
|
18691
19487
|
borderRadius: "4px",
|
|
@@ -18696,7 +19492,7 @@ const styles$5 = createStyles({
|
|
|
18696
19492
|
"&:hover": {
|
|
18697
19493
|
backgroundColor: "#d1d4d7"
|
|
18698
19494
|
},
|
|
18699
|
-
backgroundColor:
|
|
19495
|
+
backgroundColor: "#E4E5E7",
|
|
18700
19496
|
borderRadius: "4px",
|
|
18701
19497
|
cursor: "pointer",
|
|
18702
19498
|
display: "flex",
|
|
@@ -18709,7 +19505,8 @@ const styles$5 = createStyles({
|
|
|
18709
19505
|
const ThemeCreator = ({
|
|
18710
19506
|
themeConfig,
|
|
18711
19507
|
onUpdateThemeConfig,
|
|
18712
|
-
presets
|
|
19508
|
+
presets,
|
|
19509
|
+
showDrawer
|
|
18713
19510
|
}) => {
|
|
18714
19511
|
const defaultThemeConfigRef = useRef(themeConfig);
|
|
18715
19512
|
const [isDrawerOpen, setIsDrawerOpen] = useState(false);
|
|
@@ -18763,7 +19560,7 @@ const ThemeCreator = ({
|
|
|
18763
19560
|
return null;
|
|
18764
19561
|
}
|
|
18765
19562
|
};
|
|
18766
|
-
const formattedThemeObj = `const theme = ${JSON.stringify(themeConfig, null, 2)}`;
|
|
19563
|
+
// const formattedThemeObj = `const theme = ${JSON.stringify(themeConfig, null, 2)}`;
|
|
18767
19564
|
const presetsRef = useRef(null);
|
|
18768
19565
|
const [showPresets, toggleShowPresets] = useToggle(false);
|
|
18769
19566
|
const applyPreset = theme => {
|
|
@@ -18785,54 +19582,67 @@ const ThemeCreator = ({
|
|
|
18785
19582
|
onSelectTab: handleSelectedTab,
|
|
18786
19583
|
selectedTab: selectedTab,
|
|
18787
19584
|
tabs: formattedThemeTabs
|
|
18788
|
-
}), jsxs("
|
|
18789
|
-
|
|
18790
|
-
|
|
19585
|
+
}), presets ? jsxs("div", {
|
|
19586
|
+
children: [jsxs("button", Object.assign({
|
|
19587
|
+
"aria-controls": "presets-popover",
|
|
19588
|
+
"aria-expanded": showPresets,
|
|
19589
|
+
css: styles$5.presetsButton,
|
|
19590
|
+
onClick: e => {
|
|
19591
|
+
e.preventDefault();
|
|
19592
|
+
toggleShowPresets();
|
|
19593
|
+
},
|
|
19594
|
+
ref: presetsRef
|
|
19595
|
+
}, {
|
|
19596
|
+
children: ["Presets", jsx(Icon, {
|
|
19597
|
+
name: IconNames.CARET_BOTTOM,
|
|
19598
|
+
size: IconSize.SIZE_SMALL
|
|
19599
|
+
})]
|
|
19600
|
+
})), jsx(Popover, Object.assign({
|
|
19601
|
+
container: document.querySelector("#theme-creator"),
|
|
19602
|
+
isOpen: showPresets,
|
|
19603
|
+
onClickAway: () => toggleShowPresets(),
|
|
19604
|
+
placement: "bottom-end",
|
|
19605
|
+
reference: presetsRef.current
|
|
19606
|
+
}, {
|
|
19607
|
+
children: jsxs("div", Object.assign({
|
|
19608
|
+
css: styles$5.popoverWrapper
|
|
19609
|
+
}, {
|
|
19610
|
+
children: [jsx("button", Object.assign({
|
|
19611
|
+
"aria-label": "Set Default Theme",
|
|
19612
|
+
css: styles$5.presetOption,
|
|
19613
|
+
onClick: e => {
|
|
19614
|
+
e.preventDefault();
|
|
19615
|
+
toggleShowPresets();
|
|
19616
|
+
applyPreset(defaultThemeConfigRef.current);
|
|
19617
|
+
},
|
|
19618
|
+
role: "menuitem"
|
|
19619
|
+
}, {
|
|
19620
|
+
children: "Default"
|
|
19621
|
+
})), presets.map(preset => jsx("button", Object.assign({
|
|
19622
|
+
"aria-label": `Set ${preset.presetName} Theme`,
|
|
19623
|
+
css: styles$5.presetOption,
|
|
19624
|
+
onClick: e => {
|
|
19625
|
+
e.preventDefault();
|
|
19626
|
+
toggleShowPresets();
|
|
19627
|
+
applyPreset(preset.themeConfig);
|
|
19628
|
+
},
|
|
19629
|
+
role: "menuitem"
|
|
19630
|
+
}, {
|
|
19631
|
+
children: preset.presetName
|
|
19632
|
+
}), preset.presetName))]
|
|
19633
|
+
}))
|
|
19634
|
+
}))]
|
|
19635
|
+
}) :
|
|
19636
|
+
//reset to default button
|
|
19637
|
+
jsx("button", Object.assign({
|
|
19638
|
+
"aria-label": "Set Default Theme",
|
|
18791
19639
|
css: styles$5.presetsButton,
|
|
18792
|
-
onClick:
|
|
18793
|
-
|
|
18794
|
-
toggleShowPresets();
|
|
19640
|
+
onClick: () => {
|
|
19641
|
+
applyPreset(defaultThemeConfigRef.current);
|
|
18795
19642
|
},
|
|
18796
|
-
|
|
18797
|
-
}, {
|
|
18798
|
-
children: ["Presets", jsx(Icon, {
|
|
18799
|
-
name: IconNames.CARET_BOTTOM,
|
|
18800
|
-
size: IconSize.SIZE_SMALL
|
|
18801
|
-
})]
|
|
18802
|
-
})), jsx(Popover, Object.assign({
|
|
18803
|
-
container: document.querySelector("#theme-creator"),
|
|
18804
|
-
isOpen: showPresets,
|
|
18805
|
-
onClickAway: () => toggleShowPresets(),
|
|
18806
|
-
placement: "bottom-end",
|
|
18807
|
-
reference: presetsRef.current
|
|
19643
|
+
role: "menuitem"
|
|
18808
19644
|
}, {
|
|
18809
|
-
children:
|
|
18810
|
-
css: styles$5.popoverWrapper
|
|
18811
|
-
}, {
|
|
18812
|
-
children: [jsx("button", Object.assign({
|
|
18813
|
-
"aria-label": "Set Default Theme",
|
|
18814
|
-
css: styles$5.presetOption,
|
|
18815
|
-
onClick: e => {
|
|
18816
|
-
e.preventDefault();
|
|
18817
|
-
toggleShowPresets();
|
|
18818
|
-
applyPreset(defaultThemeConfigRef.current);
|
|
18819
|
-
},
|
|
18820
|
-
role: "menuitem"
|
|
18821
|
-
}, {
|
|
18822
|
-
children: "Default"
|
|
18823
|
-
})), presets && presets.map(preset => jsx("button", Object.assign({
|
|
18824
|
-
"aria-label": `Set ${preset.presetName} Theme`,
|
|
18825
|
-
css: styles$5.presetOption,
|
|
18826
|
-
onClick: e => {
|
|
18827
|
-
e.preventDefault();
|
|
18828
|
-
toggleShowPresets();
|
|
18829
|
-
applyPreset(preset.themeConfig);
|
|
18830
|
-
},
|
|
18831
|
-
role: "menuitem"
|
|
18832
|
-
}, {
|
|
18833
|
-
children: preset.presetName
|
|
18834
|
-
}), preset.presetName))]
|
|
18835
|
-
}))
|
|
19645
|
+
children: "Reset to Default"
|
|
18836
19646
|
}))]
|
|
18837
19647
|
})), jsx(Typography, Object.assign({
|
|
18838
19648
|
role: "heading",
|
|
@@ -18840,29 +19650,27 @@ const ThemeCreator = ({
|
|
|
18840
19650
|
}, {
|
|
18841
19651
|
children: `${selectedTab} Editor`
|
|
18842
19652
|
})), renderContentBySelectedTab(themeConfig, selectedTab)]
|
|
18843
|
-
})), jsx(Drawer, Object.assign({
|
|
18844
|
-
"aria-label": "Show
|
|
19653
|
+
})), showDrawer && jsx(Drawer, Object.assign({
|
|
19654
|
+
"aria-label": "Show themeConfig.js Code Drawer",
|
|
18845
19655
|
headerContent: jsxs("div", Object.assign({
|
|
18846
19656
|
css: styles$5.drawerHeader
|
|
18847
19657
|
}, {
|
|
18848
19658
|
children: [jsx("pre", Object.assign({
|
|
18849
19659
|
css: styles$5.pre
|
|
18850
19660
|
}, {
|
|
18851
|
-
children: "
|
|
18852
|
-
})), jsx("div", Object.assign({
|
|
19661
|
+
children: "themeConfig.js"
|
|
19662
|
+
})), showDrawer.copyToClipboardText && jsx("div", Object.assign({
|
|
18853
19663
|
css: styles$5.copy
|
|
18854
19664
|
}, {
|
|
18855
19665
|
children: jsx(CopyButton, {
|
|
18856
|
-
content:
|
|
19666
|
+
content: showDrawer.copyToClipboardText
|
|
18857
19667
|
})
|
|
18858
19668
|
}))]
|
|
18859
19669
|
})),
|
|
18860
19670
|
isOpen: isDrawerOpen,
|
|
18861
19671
|
toggleDrawer: () => setIsDrawerOpen(!isDrawerOpen)
|
|
18862
19672
|
}, {
|
|
18863
|
-
children:
|
|
18864
|
-
code: formattedThemeObj
|
|
18865
|
-
})
|
|
19673
|
+
children: showDrawer.content
|
|
18866
19674
|
}))]
|
|
18867
19675
|
}));
|
|
18868
19676
|
};
|
|
@@ -19853,4 +20661,4 @@ var onboarding = /*#__PURE__*/Object.freeze({
|
|
|
19853
20661
|
Element: Element
|
|
19854
20662
|
});
|
|
19855
20663
|
|
|
19856
|
-
export { accountSettings as AccountSettings, AddFundsForm, AutoFundingForm, ButtonGroup, CarrierBalance, CarrierIcon, CarrierLogo, CellFormattedDate,
|
|
20664
|
+
export { accountSettings as AccountSettings, AddFundsForm, AutoFundingForm, ButtonGroup, CarrierBalance, CarrierIcon, CarrierLogo, CellFormattedDate, CollapsiblePanel, CopyButton, Country, Cube, DateRangeCombo, DateRangeSelect, DisplayTerm, Drawer, ErrorFallback, fields as Field, FieldLabel, FormPortal, FundAndPurchase, GridController, InlineLabel, ItemsBreakdown, labelWorkflow as LabelWorkflow, LinkAction, listCarriers$1 as ListCarriers, Loader, ManageFunding, manageWarehouses$1 as ManageWarehouses, onboarding as Onboarding, PageLayoutProvider, Pager, PaymentMethodSettings, Portal, PoweredByShipEngine, purchaseLabel as PurchaseLabel, RootPortalProvider, Section, Spacer, Spread, StoryNotes, Tabs, themeCreator as ThemeCreator, ThemeCreatorProvider, UsState, UsaCity, viewShipment as ViewShipment, voidLabel as VoidLabel, addSpaceBetweenWords, assert, autoFundingSchema, calculateTotal, capitalizeFirstLetter, convertDecimalWeightToFractionalWeight, convertDimensions, convertFractionalWeightToDecimalWeight, convertPoundsAndOuncesToOunces, convertWeight, countries, countryCodes, createCodedErrors, createDictionary, createStyles, currencySymbol, daysAfter, errorMap, euCountryCodes, extendZod, featureFlagComponentNameLookup, featureFlags, formLogger, formatCreditCardNumber, formatDate, formatDateDDMMYY, formatDimensions, formatExpiration, formatFractionalWeight, formatMoney, getAddFundsSchema, getCancelledShipment, getCarrierIdByCarrierCode, getCurrencyFromString, getCurrencySymbolFromString, getCustomsFromSalesOrder, getExpirationYears, getFeatures, getIsCustomsRequiredForSalesOrder, getIsCustomsRequiredForShipment, getIsInternationalShipment, getPendingShipment, getRateRequiresAcknowledgement, getRelativeDates, getRequestedServices, getSalesOrderItemsFromSalesOrderOrShipment, getShipmentByStatus, getTotalRateAmount, isDecimalWeight, isDomesticAddress, isEmptyAddress, isFlatRatePackageCode, isMetricWeightUnit, isMilitaryAddress, isNowOrInTheFuture, isPoBox, isPoBoxAddress, isString, isUnitedStatesTerritory, isUnsupportedByUps, isUpsCarrier, isUspsCarrier, moneySchema, mostRecent, nextDayCutoff, omitTime, overrideCarrierCodes$1 as overrideCarrierCodes, pascalize, phoneSchema, phoneSchemaUnvalidated, postalCodeRegex$3 as postalCodeRegex, raise, sortByCreationDate, throwAny, throwJoinedMessages, usCities, usStateCodes, usStates, useAddressValidation, useBlackboxDetection, useCarrierMetadata, useConfirmationOptions, useCountryCodeOptions, useCustomsContentsOptions, useCustomsNonDeliveryOptions, useDateRangeOptions, useExpirationMonthOptions, useFeatures, useInsuranceProviderOptions, useNestedForm, usePackageOptions, usePageLayout, usePager, useRateOptions, useRootPortal, useRunOnceOnTrue, useScrubErrors, useServiceCodeOptions, useShipmentMetadata, useShippingPresetsOptions, useStateCodeOptions, useThemeCreator, useToggle, useWarehouseOptions, validationResolver };
|