@shipengine/elements 0.38.0 → 0.39.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 +65 -61
- package/index.js +65 -61
- package/package.json +6 -6
- package/src/components/add-funds-form/add-funds-form.styles.d.ts +3 -3
- package/src/components/auto-funding-form/auto-funding-form.styles.d.ts +1 -1
- package/src/components/carrier-balance/carrier-balance.styles.d.ts +1 -1
- package/src/components/collapsible-panel/collapsible-panel.d.ts +1 -1
- package/src/components/collapsible-panel/collapsible-panel.styles.d.ts +4 -4
- package/src/components/date-range-select/date-range-select.styles.d.ts +1 -1
- package/src/components/disclosure/disclosure.styles.d.ts +3 -3
- package/src/components/error-display/error-display.styles.d.ts +3 -3
- package/src/components/field/checkbox-input/checkbox-input.d.ts +1 -1
- package/src/components/field/credit-card-input/credit-card-input.d.ts +1 -1
- package/src/components/field/date-picker/date-picker.styles.d.ts +1 -1
- package/src/components/field/expiration-input/expiration-input.d.ts +1 -1
- package/src/components/field/field.styles.d.ts +1 -1
- package/src/components/field/money-input/money-input.d.ts +1 -1
- package/src/components/field/number-input/number-input.d.ts +1 -1
- package/src/components/field/rate-card/cost-breakdown/cost-breakdown.styles.d.ts +1 -1
- package/src/components/field/rate-card/rate-card.d.ts +1 -1
- package/src/components/field/rate-card/rate-card.styles.d.ts +1 -1
- package/src/components/field/rate-select/rate-select.styles.d.ts +1 -1
- package/src/components/field/select-auto-complete/select-auto-complete.d.ts +1 -1
- package/src/components/field/submit-button/submit-button.d.ts +1 -1
- package/src/components/field/switch/switch.d.ts +1 -1
- package/src/components/field/text-area/text-area.d.ts +1 -1
- package/src/components/field/text-input/text-input.d.ts +1 -1
- package/src/components/fund-and-purchase/fund-and-purchase.styles.d.ts +3 -3
- package/src/components/history/history-card/history-card.styles.d.ts +8 -8
- package/src/components/history/history-card-extension/history-card-extension.styles.d.ts +3 -3
- package/src/components/inline-label/inline-label.d.ts +1 -1
- package/src/components/inline-label/inline-label.styles.d.ts +1 -1
- package/src/components/items-breakdown/items-breakdown.styles.d.ts +6 -6
- package/src/components/label/label.d.ts +1 -1
- package/src/components/label/label.styles.d.ts +1 -1
- package/src/components/label-layout/label-layout.styles.d.ts +12 -12
- package/src/components/link-action/link-action.d.ts +2 -2
- package/src/components/loader/loader.d.ts +1 -1
- package/src/components/preset-descriptor/preset-descriptor.styles.d.ts +1 -1
- package/src/components/save-status/save-status-styles.d.ts +4 -4
- package/src/components/section/section.d.ts +1 -1
- package/src/components/section/section.styles.d.ts +4 -4
- package/src/components/settings-card/settings-card.styles.d.ts +5 -5
- package/src/components/spacer/spacer.d.ts +1 -1
- package/src/components/templates/account-settings/account-settings.d.ts +0 -1
- package/src/components/templates/address-form/address-fields.styles.d.ts +1 -1
- package/src/components/templates/carrier-recovery-form/carrier-recovery-form.styles.d.ts +1 -1
- package/src/components/templates/carrier-terms-form/carrier-terms-form.styles.d.ts +6 -6
- package/src/components/templates/customs-items-display/customs-items-display.styles.d.ts +16 -16
- package/src/components/templates/edit-billing-form/edit-billing-form.styles.d.ts +3 -3
- package/src/components/templates/label/label.styles.d.ts +2 -2
- package/src/components/templates/landing-page/landing-page.styles.d.ts +1 -1
- package/src/components/templates/list-carriers/list-carriers.styles.d.ts +3 -3
- package/src/components/templates/list-carriers-row/list-carriers-row.styles.d.ts +3 -3
- package/src/components/templates/manage-warehouses/manage-warehouse.styles.d.ts +2 -2
- package/src/components/templates/onboarding/onboarding.styles.d.ts +4 -4
- package/src/components/templates/rate-form/rate-form.styles.d.ts +1 -1
- package/src/components/templates/suspend-sales-order/suspend-sales-order.d.ts +1 -1
- package/src/components/templates/suspend-shipment/suspend-shipment.d.ts +1 -1
- package/src/components/templates/wallet-card/wallet-card.styles.d.ts +1 -1
- package/src/components/templates/wallet-form/wallet-form.styles.d.ts +1 -1
- package/src/elements/account-settings/account-settings.d.ts +1 -9
- package/src/elements/configure-shipment/hooks/use-request-preferred-rates.d.ts +1 -1
- package/src/elements/configure-shipment/hooks/use-request-rates.d.ts +1 -1
- package/src/elements/list-carriers/hooks/use-list-connected-carriers.d.ts +1 -1
- package/src/elements/purchase-label/hooks/use-load-shipment.d.ts +1 -1
- package/src/elements/view-shipment/view-shipment.d.ts +7 -1
- package/src/features/wallet-history/wallet-history.styles.d.ts +11 -11
- package/src/hooks/use-get-or-create-shipment.d.ts +1 -1
- package/src/testing/extensions/queries/by-icon-name.d.ts +1 -1
- package/src/testing/extensions/queries/index.d.ts +6 -6
- package/src/testing/test-utils.d.ts +1 -2
- package/src/utilities/styles.d.ts +1 -1
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from '@emotion/react/jsx-runtime';
|
|
2
|
-
import { InlineNotification, NotificationType, Spinner, SpinnerSize, Typography, Icon, Link, IconSize, FormField, FieldMessageType, Checkbox, Input, Divider, SelectAutocomplete, Select as Select$1, OptionGroup, Option, Button, Switch as Switch$1, Textarea, ChipList, Chip, ButtonVariant, ButtonSize, DatePicker as DatePicker$1, Table, TableBody, TableBaseRow, TableBodyCell, TableHeader, TableHeaderCell, Grid, GridChild, RadioGroup, Radio, ButtonColor, Tag, TagColor, Skeleton, SkeletonAnimation, SkeletonVariant, SkeletonBackgroundColor, Pagination, Stepper, Step, IconTooltip, Popover, DropdownOptionList, BottomSheet } from '@
|
|
3
|
-
import { IconNames } from '@
|
|
2
|
+
import { InlineNotification, NotificationType, Spinner, SpinnerSize, Typography, Icon, Link, IconSize, FormField, FieldMessageType, Checkbox, Input, Divider, SelectAutocomplete, Select as Select$1, OptionGroup, Option, Button, Switch as Switch$1, Textarea, ChipList, Chip, ButtonVariant, ButtonSize, DatePicker as DatePicker$1, Table, TableBody, TableBaseRow, TableBodyCell, TableHeader, TableHeaderCell, Grid, GridChild, RadioGroup, Radio, ButtonColor, Tag, TagColor, Skeleton, SkeletonAnimation, SkeletonVariant, SkeletonBackgroundColor, Pagination, Stepper, Step, IconTooltip, Popover, DropdownOptionList, BottomSheet } from '@shipengine/giger';
|
|
3
|
+
import { IconNames } from '@shipengine/giger-theme';
|
|
4
4
|
import { camelize } from 'humps';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { useMemo, createContext, useState, useContext, useReducer, useCallback, createElement as createElement$2, useRef, useEffect, forwardRef, memo, Fragment as Fragment$1 } from 'react';
|
|
@@ -20,7 +20,7 @@ import * as Locales from 'date-fns/locale';
|
|
|
20
20
|
import { css as css$1 } from '@emotion/css';
|
|
21
21
|
import { isValidPhoneNumber } from 'libphonenumber-js/min';
|
|
22
22
|
import copy from 'copy-to-clipboard';
|
|
23
|
-
import { useQueryClient, useMutation } from 'react-query';
|
|
23
|
+
import { useQueryClient, useMutation } from '@tanstack/react-query';
|
|
24
24
|
import cardValidator from 'card-validator';
|
|
25
25
|
|
|
26
26
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
@@ -7617,7 +7617,7 @@ const AddFundsForm = ({
|
|
|
7617
7617
|
const {
|
|
7618
7618
|
t
|
|
7619
7619
|
} = useTranslation();
|
|
7620
|
-
const addFunds = useAddFunds(
|
|
7620
|
+
const addFunds = useAddFunds();
|
|
7621
7621
|
const carrier = useGetCarrierById(carrierId);
|
|
7622
7622
|
const chips = [{
|
|
7623
7623
|
label: "$20",
|
|
@@ -7653,13 +7653,16 @@ const AddFundsForm = ({
|
|
|
7653
7653
|
const handleSubmit = formLogger.capture(form.handleSubmit(values => __awaiter(void 0, void 0, void 0, function* () {
|
|
7654
7654
|
const payload = values;
|
|
7655
7655
|
try {
|
|
7656
|
-
yield addFunds.mutateAsync(
|
|
7656
|
+
yield addFunds.mutateAsync({
|
|
7657
|
+
carrierId,
|
|
7658
|
+
funds: payload
|
|
7659
|
+
});
|
|
7657
7660
|
onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
|
|
7658
7661
|
} catch (_a) {
|
|
7659
7662
|
// Noop; errors available on RQ object
|
|
7660
7663
|
}
|
|
7661
7664
|
})));
|
|
7662
|
-
if (carrier.
|
|
7665
|
+
if (carrier.isInitialLoading) return jsx(Loader, {
|
|
7663
7666
|
message: t("loading.carrier")
|
|
7664
7667
|
});
|
|
7665
7668
|
if (!carrier.data) throw new Error("errorMessages.unableToLoad.carrier");
|
|
@@ -7897,11 +7900,16 @@ const AutoFundingForm = ({
|
|
|
7897
7900
|
const {
|
|
7898
7901
|
t
|
|
7899
7902
|
} = useTranslation();
|
|
7900
|
-
const updateAutoFunding = useUpdateAutoFunding(carrierId);
|
|
7901
|
-
const autoFundingConfiguration = useGetAutoFundingConfiguration(carrierId);
|
|
7902
7903
|
const {
|
|
7903
|
-
|
|
7904
|
-
|
|
7904
|
+
mutate: updateAutoFunding,
|
|
7905
|
+
isLoading: updateAutoFundingIsLoading
|
|
7906
|
+
} = useUpdateAutoFunding(carrierId);
|
|
7907
|
+
const {
|
|
7908
|
+
data: autoFundingConfig,
|
|
7909
|
+
refetch: autoFundingConfigRefetch,
|
|
7910
|
+
isInitialLoading: isLoadingAutoFundingConfig,
|
|
7911
|
+
error: autoFundingConfigErrors
|
|
7912
|
+
} = useGetAutoFundingConfiguration(carrierId);
|
|
7905
7913
|
const [showForm, setShowForm] = useState(false);
|
|
7906
7914
|
const [isSwitchOn, setIsSwitchOn] = useState(false);
|
|
7907
7915
|
const form = useForm({
|
|
@@ -7917,8 +7925,8 @@ const AutoFundingForm = ({
|
|
|
7917
7925
|
setShowForm(prev => !prev);
|
|
7918
7926
|
setIsSwitchOn(true);
|
|
7919
7927
|
const payload = values;
|
|
7920
|
-
updateAutoFunding
|
|
7921
|
-
onSuccess: () =>
|
|
7928
|
+
updateAutoFunding(payload, {
|
|
7929
|
+
onSuccess: () => autoFundingConfigRefetch()
|
|
7922
7930
|
});
|
|
7923
7931
|
}));
|
|
7924
7932
|
/**
|
|
@@ -7932,19 +7940,19 @@ const AutoFundingForm = ({
|
|
|
7932
7940
|
formReset(isEnabled);
|
|
7933
7941
|
if (!isEnabled) {
|
|
7934
7942
|
setIsSwitchOn(isEnabled);
|
|
7935
|
-
updateAutoFunding
|
|
7936
|
-
onSuccess: () =>
|
|
7943
|
+
updateAutoFunding(form.getValues(), {
|
|
7944
|
+
onSuccess: () => autoFundingConfigRefetch()
|
|
7937
7945
|
});
|
|
7938
7946
|
}
|
|
7939
7947
|
};
|
|
7940
|
-
if (
|
|
7948
|
+
if (isLoadingAutoFundingConfig || updateAutoFundingIsLoading) return jsx(Loader, {
|
|
7941
7949
|
message: t("manage-funding:autoFunding.isLoading")
|
|
7942
7950
|
});
|
|
7943
|
-
if (!
|
|
7951
|
+
if (!autoFundingConfig) throw new Error(t("errorMessages:unableToLoad.autoFundingSettings"));
|
|
7944
7952
|
return jsxs(Fragment, {
|
|
7945
7953
|
children: [jsxs(Spread, {
|
|
7946
7954
|
children: [jsx(Typography, Object.assign({
|
|
7947
|
-
bold: !!(
|
|
7955
|
+
bold: !!(autoFundingConfig === null || autoFundingConfig === void 0 ? void 0 : autoFundingConfig.isAutoPurchaseEnabled),
|
|
7948
7956
|
variant: "body1"
|
|
7949
7957
|
}, {
|
|
7950
7958
|
children: t("manage-funding:autoFunding:isEnabledCTA")
|
|
@@ -7957,11 +7965,11 @@ const AutoFundingForm = ({
|
|
|
7957
7965
|
})]
|
|
7958
7966
|
}), jsx(Spacer, {
|
|
7959
7967
|
multiplier: 1
|
|
7960
|
-
}), !!(
|
|
7968
|
+
}), !!(autoFundingConfig === null || autoFundingConfig === void 0 ? void 0 : autoFundingConfig.isAutoPurchaseEnabled) && !showForm && jsxs(Spread, {
|
|
7961
7969
|
children: [jsx(Typography, Object.assign({
|
|
7962
7970
|
variant: "body1"
|
|
7963
7971
|
}, {
|
|
7964
|
-
children: t("manage-funding:autoFunding.readSettings", Object.assign({},
|
|
7972
|
+
children: t("manage-funding:autoFunding.readSettings", Object.assign({}, autoFundingConfig))
|
|
7965
7973
|
})), jsx(LinkAction, {
|
|
7966
7974
|
css: styles$t.edit,
|
|
7967
7975
|
onClick: () => handleToggle(true),
|
|
@@ -7986,7 +7994,7 @@ const AutoFundingForm = ({
|
|
|
7986
7994
|
css: styles$t.input,
|
|
7987
7995
|
"data-testid": "auto-funding-threshold-input",
|
|
7988
7996
|
defaultValue: {
|
|
7989
|
-
amount:
|
|
7997
|
+
amount: autoFundingConfig === null || autoFundingConfig === void 0 ? void 0 : autoFundingConfig.autoPurchaseThreshold,
|
|
7990
7998
|
currency: Currency.USD
|
|
7991
7999
|
},
|
|
7992
8000
|
disabled: !watchIsEnabled,
|
|
@@ -8003,7 +8011,7 @@ const AutoFundingForm = ({
|
|
|
8003
8011
|
css: styles$t.input,
|
|
8004
8012
|
"data-testid": "auto-funding-purchase-amount-input",
|
|
8005
8013
|
defaultValue: {
|
|
8006
|
-
amount:
|
|
8014
|
+
amount: autoFundingConfig === null || autoFundingConfig === void 0 ? void 0 : autoFundingConfig.autoPurchaseAmount,
|
|
8007
8015
|
currency: Currency.USD
|
|
8008
8016
|
},
|
|
8009
8017
|
disabled: !watchIsEnabled,
|
|
@@ -8019,7 +8027,7 @@ const AutoFundingForm = ({
|
|
|
8019
8027
|
control: form.control,
|
|
8020
8028
|
css: styles$t.input,
|
|
8021
8029
|
"data-testid": "auto-funding-max-per-day-input",
|
|
8022
|
-
defaultValue:
|
|
8030
|
+
defaultValue: autoFundingConfig === null || autoFundingConfig === void 0 ? void 0 : autoFundingConfig.autoPurchaseCutoff,
|
|
8023
8031
|
disabled: !watchIsEnabled,
|
|
8024
8032
|
isInteger: true,
|
|
8025
8033
|
label: t("manage-funding:autoFunding.maximumPurchasesPerDay"),
|
|
@@ -8044,14 +8052,14 @@ const AutoFundingForm = ({
|
|
|
8044
8052
|
children: t("manage-funding:actions.saveRule")
|
|
8045
8053
|
}))]
|
|
8046
8054
|
}))]
|
|
8047
|
-
})),
|
|
8055
|
+
})), autoFundingConfigErrors && jsxs(Fragment, {
|
|
8048
8056
|
children: [jsx(Spacer, {
|
|
8049
8057
|
multiplier: 1
|
|
8050
8058
|
}), jsx(InlineNotification, Object.assign({
|
|
8051
8059
|
title: t("manage-funding:autoFunding.error.title"),
|
|
8052
8060
|
type: NotificationType.ERROR
|
|
8053
8061
|
}, {
|
|
8054
|
-
children:
|
|
8062
|
+
children: autoFundingConfigErrors[0].message
|
|
8055
8063
|
}))]
|
|
8056
8064
|
})]
|
|
8057
8065
|
});
|
|
@@ -8110,14 +8118,13 @@ const CarrierBalance = ({
|
|
|
8110
8118
|
} = useTranslation();
|
|
8111
8119
|
const {
|
|
8112
8120
|
data: carrier,
|
|
8113
|
-
|
|
8114
|
-
isRefetching: isRefetchingCarrier
|
|
8121
|
+
isFetching: isFetchingCarrier
|
|
8115
8122
|
} = useGetCarrierById(carrierId);
|
|
8116
8123
|
const carrierBalance = (_a = carrier === null || carrier === void 0 ? void 0 : carrier.balance) !== null && _a !== void 0 ? _a : balance;
|
|
8117
8124
|
return jsx(InlineLabel, Object.assign({
|
|
8118
8125
|
label: t("manage-funding:currentBalance")
|
|
8119
8126
|
}, {
|
|
8120
|
-
children:
|
|
8127
|
+
children: isFetchingCarrier ? jsx(Spinner, {}) : jsx(Typography, Object.assign({
|
|
8121
8128
|
bold: true,
|
|
8122
8129
|
css: styles$r.getBalanceText(carrierBalance)
|
|
8123
8130
|
}, {
|
|
@@ -8492,7 +8499,7 @@ const FundAndPurchase = ({
|
|
|
8492
8499
|
const [isAddFundsFormOpen, setIsAddFundsFormOpen] = useState(false);
|
|
8493
8500
|
const {
|
|
8494
8501
|
data: carrier,
|
|
8495
|
-
|
|
8502
|
+
isInitialLoading: isLoadingCarrier
|
|
8496
8503
|
} = useGetCarrierById(isPreferredRate ? undefined : carrierId);
|
|
8497
8504
|
const {
|
|
8498
8505
|
isSubmitting: isRateFormSubmitting,
|
|
@@ -8703,14 +8710,14 @@ const styles$n = createStyles({
|
|
|
8703
8710
|
verticalAlign: "top"
|
|
8704
8711
|
}),
|
|
8705
8712
|
itemName: theme => ({
|
|
8706
|
-
// Set item name to max 3 lines and truncate with ellipsis
|
|
8707
|
-
"-webkit-box-orient": "vertical",
|
|
8708
|
-
"-webkit-line-clamp": "3",
|
|
8709
8713
|
display: "-webkit-box",
|
|
8710
8714
|
lineHeight: `${theme.spacing(2.5)}px`,
|
|
8711
8715
|
maxHeight: `${theme.spacing(7.5)}px`,
|
|
8712
8716
|
overflow: "hidden",
|
|
8713
8717
|
textOverflow: "ellipsis",
|
|
8718
|
+
// Set item name to max 3 lines and truncate with ellipsis
|
|
8719
|
+
WebkitBoxOrient: "vertical",
|
|
8720
|
+
WebkitLineClamp: "3",
|
|
8714
8721
|
whiteSpace: "normal"
|
|
8715
8722
|
}),
|
|
8716
8723
|
numericCell: () => ({
|
|
@@ -8830,7 +8837,7 @@ const ManageFunding = ({
|
|
|
8830
8837
|
} = useTranslation();
|
|
8831
8838
|
const queryClient = useQueryClient();
|
|
8832
8839
|
const {
|
|
8833
|
-
|
|
8840
|
+
isInitialLoading: isLoadingCarrier
|
|
8834
8841
|
} = useGetCarrierById(carrierId);
|
|
8835
8842
|
const [isAddFundsFormOpen, setIsAddFundsFormOpen] = useState(false);
|
|
8836
8843
|
return jsx(CollapsiblePanel, Object.assign({
|
|
@@ -9552,7 +9559,7 @@ const AddressPreferenceSelect = ({
|
|
|
9552
9559
|
};
|
|
9553
9560
|
return jsxs(Fragment, {
|
|
9554
9561
|
children: [jsxs(Grid, Object.assign({
|
|
9555
|
-
"data-testid": "
|
|
9562
|
+
"data-testid": "addressPreferenceSelect",
|
|
9556
9563
|
noPadding: true
|
|
9557
9564
|
}, {
|
|
9558
9565
|
children: [jsx(GridChild, Object.assign({
|
|
@@ -10799,7 +10806,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
10799
10806
|
} : {
|
|
10800
10807
|
name: "111ty02-css",
|
|
10801
10808
|
styles: "align-items:center;display:flex;label:css;",
|
|
10802
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
10809
|
+
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxpc3QtY2FycmllcnMtcm93LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFvQmtkIiwiZmlsZSI6Imxpc3QtY2FycmllcnMtcm93LnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IF9fYXdhaXRlciB9IGZyb20gXCJ0c2xpYlwiO1xyXG5pbXBvcnQgeyBqc3ggYXMgX2pzeCwganN4cyBhcyBfanN4cyB9IGZyb20gXCJAZW1vdGlvbi9yZWFjdC9qc3gtcnVudGltZVwiO1xyXG5pbXBvcnQgeyBjc3MgfSBmcm9tIFwiQGVtb3Rpb24vcmVhY3RcIjtcclxuaW1wb3J0IHsgdXNlU3RhdGUgfSBmcm9tIFwicmVhY3RcIjtcclxuaW1wb3J0IHsgdXNlVHJhbnNsYXRpb24gfSBmcm9tIFwicmVhY3QtaTE4bmV4dFwiO1xyXG5pbXBvcnQgeyBUeXBvZ3JhcGh5IH0gZnJvbSBcIkBzaGlwZW5naW5lL2dpZ2VyXCI7XHJcbmltcG9ydCB7IExpbmtBY3Rpb24gfSBmcm9tIFwiLi4vLi4vLi4vY29tcG9uZW50cy9saW5rLWFjdGlvblwiO1xyXG5pbXBvcnQgeyBBZGRDYXJyaWVyRm9ybSB9IGZyb20gXCIuLi8uLi8uLi9jb21wb25lbnRzL3RlbXBsYXRlcy9hZGQtY2Fycmllci1mb3JtXCI7XHJcbmltcG9ydCB7IHN0eWxlcyB9IGZyb20gXCIuL2xpc3QtY2FycmllcnMtcm93LnN0eWxlc1wiO1xyXG5leHBvcnQgY29uc3QgTGlzdENhcnJpZXJzUm93ID0gKHsgY29ubmVjdGVkQ2FycmllcjogeyBjYXJyaWVyLCBpc0Nvbm5lY3RlZCB9LCByZWdpc3RlckNhcnJpZXIsIHJlZ2lzdGVyQ2FycmllckVycm9ycywgfSkgPT4ge1xyXG4gICAgY29uc3QgeyBzaG9ydG5hbWU6IG5hbWUsIGxvZ28sIHJlcXVpcmVkRmllbGRzIH0gPSBjYXJyaWVyO1xyXG4gICAgY29uc3QgeyB0IH0gPSB1c2VUcmFuc2xhdGlvbihbXCJsaXN0LWNhcnJpZXJzXCJdKTtcclxuICAgIGNvbnN0IFtzaG93RHJvcERvd24sIHNldFNob3dEcm9wRG93bl0gPSB1c2VTdGF0ZShmYWxzZSk7XHJcbiAgICBjb25zdCBbaXNTdWJtaXR0aW5nLCBzZXRJc1N1Ym1pdHRpbmddID0gdXNlU3RhdGUoZmFsc2UpO1xyXG4gICAgY29uc3QgaGFuZGxlUmVnaXN0ZXIgPSAodmFsdWVzKSA9PiBfX2F3YWl0ZXIodm9pZCAwLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24qICgpIHtcclxuICAgICAgICBzZXRJc1N1Ym1pdHRpbmcodHJ1ZSk7XHJcbiAgICAgICAgeWllbGQgcmVnaXN0ZXJDYXJyaWVyKHZhbHVlcyk7XHJcbiAgICAgICAgc2hvd0Ryb3BEb3duICYmIHNldFNob3dEcm9wRG93bihmYWxzZSk7XHJcbiAgICAgICAgc2V0SXNTdWJtaXR0aW5nKGZhbHNlKTtcclxuICAgIH0pO1xyXG4gICAgcmV0dXJuIChfanN4cyhcImRpdlwiLCBPYmplY3QuYXNzaWduKHsgY3NzOiBzdHlsZXMuY29udGFpbmVyLCBcImRhdGEtdGVzdGlkXCI6IFwiY2Fycmllci1yb3dcIiB9LCB7IGNoaWxkcmVuOiBbX2pzeHMoXCJkaXZcIiwgT2JqZWN0LmFzc2lnbih7IGNzczogc3R5bGVzLnJvd0NvbnRhaW5lciB9LCB7IGNoaWxkcmVuOiBbX2pzeHMoXCJkaXZcIiwgT2JqZWN0LmFzc2lnbih7IGNzczogc3R5bGVzLmxvZ29Db250YWluZXIgfSwgeyBjaGlsZHJlbjogW19qc3goXCJkaXZcIiwgeyBjaGlsZHJlbjogX2pzeChcImltZ1wiLCB7IGFsdDogYCR7bmFtZX0tbG9nb2AsIGhlaWdodDogNDAsIHNyYzogbG9nbywgd2lkdGg6IDQwIH0pIH0pLCBfanN4KFR5cG9ncmFwaHksIE9iamVjdC5hc3NpZ24oeyB2YXJpYW50OiBcInN1YnRpdGxlMVwiIH0sIHsgY2hpbGRyZW46IG5hbWUgfSkpXSB9KSksIF9qc3goXCJkaXZcIiwgT2JqZWN0LmFzc2lnbih7IGNzczogY3NzKHsgYWxpZ25JdGVtczogXCJjZW50ZXJcIiwgZGlzcGxheTogXCJmbGV4XCIgfSkgfSwgeyBjaGlsZHJlbjogX2pzeChMaW5rQWN0aW9uLCB7IGNzczogc3R5bGVzLmdldENvbm5lY3RCdXR0b24oaXNDb25uZWN0ZWQpLCBpc0Rpc2FibGVkOiBpc0Nvbm5lY3RlZCB8fCBzaG93RHJvcERvd24sIGlzTG9hZGluZzogaXNTdWJtaXR0aW5nLCBvbkNsaWNrOiAoKSA9PiBfX2F3YWl0ZXIodm9pZCAwLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24qICgpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocmVxdWlyZWRGaWVsZHMgPT09IG51bGwgfHwgcmVxdWlyZWRGaWVsZHMgPT09IHZvaWQgMCA/IHZvaWQgMCA6IHJlcXVpcmVkRmllbGRzLmluY2x1ZGVzKFwiYWRkcmVzc1wiKSlcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0U2hvd0Ryb3BEb3duKHRydWUpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2VcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeWllbGQgaGFuZGxlUmVnaXN0ZXIoKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pLCB0aXRsZTogaXNDb25uZWN0ZWRcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IHQoXCJsaXN0LWNhcnJpZXJzOmFjdGlvbnMuc3RhdHVzLmNvbm5lY3RlZFwiKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogdChcImxpc3QtY2FycmllcnM6YWN0aW9ucy5zdGF0dXMubm90Q29ubmVjdGVkXCIpIH0pIH0pKV0gfSkpLCBzaG93RHJvcERvd24gJiYgKF9qc3goQWRkQ2FycmllckZvcm0sIHsgY2FycmllclRlcm1zOiBjYXJyaWVyLnRlcm1zICYmIGNhcnJpZXIudGVybXMsIG9uQ2FuY2VsOiAoKSA9PiBzZXRTaG93RHJvcERvd24oZmFsc2UpLCBvblN1Ym1pdDogKHZhbHVlcykgPT4gaGFuZGxlUmVnaXN0ZXIodmFsdWVzKSwgcmVnaXN0ZXJDYXJyaWVyRXJyb3JzOiByZWdpc3RlckNhcnJpZXJFcnJvcnMgfSkpXSB9KSkpO1xyXG59O1xyXG4vLyMgc291cmNlTWFwcGluZ1VSTD1saXN0LWNhcnJpZXJzLXJvdy5qcy5tYXAiXX0= */",
|
|
10803
10810
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
10804
10811
|
};
|
|
10805
10812
|
const ListCarriersRow = ({
|
|
@@ -10985,7 +10992,7 @@ const useListConnectedCarriers = () => {
|
|
|
10985
10992
|
const {
|
|
10986
10993
|
data: carriers,
|
|
10987
10994
|
error,
|
|
10988
|
-
|
|
10995
|
+
isInitialLoading,
|
|
10989
10996
|
refetch
|
|
10990
10997
|
} = useListCarriers();
|
|
10991
10998
|
const carrierMetadatas = useCarrierMetadata();
|
|
@@ -10996,7 +11003,7 @@ const useListConnectedCarriers = () => {
|
|
|
10996
11003
|
isConnected: normalizedCarrierCodes.has(m.carrierCode)
|
|
10997
11004
|
})),
|
|
10998
11005
|
error: error,
|
|
10999
|
-
isLoading,
|
|
11006
|
+
isLoading: isInitialLoading,
|
|
11000
11007
|
refetch
|
|
11001
11008
|
};
|
|
11002
11009
|
};
|
|
@@ -11474,7 +11481,7 @@ const Component$5 = ({
|
|
|
11474
11481
|
const {
|
|
11475
11482
|
data: warehouses,
|
|
11476
11483
|
error: listWarehouseErrors,
|
|
11477
|
-
|
|
11484
|
+
isInitialLoading: isLoadingWarehouses,
|
|
11478
11485
|
refetch: refreshListWarehouses
|
|
11479
11486
|
} = useListWarehouses();
|
|
11480
11487
|
const {
|
|
@@ -12936,7 +12943,7 @@ const WalletHistory = () => {
|
|
|
12936
12943
|
const queryRange = useMemo(() => selectedOption && selectedOption.value === "custom" && customRange ? customRange : selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.range, [customRange, selectedOption]);
|
|
12937
12944
|
const {
|
|
12938
12945
|
data: walletHistoryData,
|
|
12939
|
-
|
|
12946
|
+
isInitialLoading: isWalletHistoryDataLoading,
|
|
12940
12947
|
isFetching: isWalletHistoryFetching,
|
|
12941
12948
|
error: errors
|
|
12942
12949
|
} = useGetWalletHistory({
|
|
@@ -13429,7 +13436,7 @@ const UnitSettings = () => {
|
|
|
13429
13436
|
const {
|
|
13430
13437
|
data: accountSettings,
|
|
13431
13438
|
error: getAccountSettingsErrors,
|
|
13432
|
-
|
|
13439
|
+
isInitialLoading: isLoadingAccountSettings,
|
|
13433
13440
|
refetch: refreshAccountSettings
|
|
13434
13441
|
} = useGetAccountSettings();
|
|
13435
13442
|
const {
|
|
@@ -14259,9 +14266,6 @@ var en = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(O
|
|
|
14259
14266
|
* - The `<AccountSettings />` component is used to display the user's account settings, as well as
|
|
14260
14267
|
* allowing them to make changes to various aspects of their account.
|
|
14261
14268
|
*
|
|
14262
|
-
* @param onSaveSettings Any `void` function you wish to execute when the user saves any changes
|
|
14263
|
-
* to their account settings.
|
|
14264
|
-
*
|
|
14265
14269
|
* @returns Element An EmotionJSX.Element that will render the `<AccountSettings />` component
|
|
14266
14270
|
* with all the appropriate wrappers.
|
|
14267
14271
|
*
|
|
@@ -14285,8 +14289,7 @@ const Component$4 = ({
|
|
|
14285
14289
|
data: carriers
|
|
14286
14290
|
} = useListCarriers();
|
|
14287
14291
|
return jsx(AccountSettings, {
|
|
14288
|
-
carriers: carriers
|
|
14289
|
-
onSaveSettings: onSaveSettings
|
|
14292
|
+
carriers: carriers
|
|
14290
14293
|
});
|
|
14291
14294
|
};
|
|
14292
14295
|
/**
|
|
@@ -14302,9 +14305,7 @@ const Component$4 = ({
|
|
|
14302
14305
|
* The `<Component />` is the source JSX that is rendered when you make use of the `AccountSettings`
|
|
14303
14306
|
* Element directly. Here is a brief example of how you would use it within your application.
|
|
14304
14307
|
* ```tsx
|
|
14305
|
-
* <AccountSettings.Element
|
|
14306
|
-
* onSaveSettings={() => console.log('Settings Saved!')}
|
|
14307
|
-
* />
|
|
14308
|
+
* <AccountSettings.Element/>
|
|
14308
14309
|
* ```
|
|
14309
14310
|
*
|
|
14310
14311
|
* <br />
|
|
@@ -17767,7 +17768,7 @@ const useRatesForm = ({
|
|
|
17767
17768
|
} = useListCarriers();
|
|
17768
17769
|
const {
|
|
17769
17770
|
data: labels,
|
|
17770
|
-
|
|
17771
|
+
isInitialLoading: labelsLoading
|
|
17771
17772
|
} = useListLabels();
|
|
17772
17773
|
const {
|
|
17773
17774
|
mutateAsync: updateShipment
|
|
@@ -18210,7 +18211,7 @@ const usePendingShipment = ({
|
|
|
18210
18211
|
const {
|
|
18211
18212
|
data: shipments,
|
|
18212
18213
|
error: listShipmentsErrors,
|
|
18213
|
-
|
|
18214
|
+
isInitialLoading: isListShipmentsLoading,
|
|
18214
18215
|
isFetching: isListShipmentsValidating,
|
|
18215
18216
|
refetch: reloadShipments
|
|
18216
18217
|
} = useListSalesOrderShipments({
|
|
@@ -18276,7 +18277,6 @@ const useConfigureShipment = ({
|
|
|
18276
18277
|
warehouseId,
|
|
18277
18278
|
printLabelLayout
|
|
18278
18279
|
}) => {
|
|
18279
|
-
var _a, _b;
|
|
18280
18280
|
const {
|
|
18281
18281
|
isPendingShipmentLoading,
|
|
18282
18282
|
pendingShipment,
|
|
@@ -18292,12 +18292,16 @@ const useConfigureShipment = ({
|
|
|
18292
18292
|
yield reloadPendingShipment();
|
|
18293
18293
|
yield onShipmentUpdated === null || onShipmentUpdated === void 0 ? void 0 : onShipmentUpdated(shipment);
|
|
18294
18294
|
}), [onShipmentUpdated, reloadPendingShipment]);
|
|
18295
|
-
const
|
|
18295
|
+
const {
|
|
18296
|
+
data: {
|
|
18297
|
+
defaultLabelLayout = "4x6"
|
|
18298
|
+
} = {}
|
|
18299
|
+
} = useGetAccountSettings();
|
|
18296
18300
|
return {
|
|
18297
18301
|
errors: pendingShipmentErrors,
|
|
18298
18302
|
isLoading: isPendingShipmentLoading,
|
|
18299
18303
|
onShipmentUpdated: handleShipmentUpdated,
|
|
18300
|
-
printLabelLayout: printLabelLayout ? printLabelLayout :
|
|
18304
|
+
printLabelLayout: printLabelLayout ? printLabelLayout : defaultLabelLayout,
|
|
18301
18305
|
shipment: pendingShipment,
|
|
18302
18306
|
warehouseId
|
|
18303
18307
|
};
|
|
@@ -18314,7 +18318,7 @@ const useImportSalesOrder = ({
|
|
|
18314
18318
|
data: salesOrders,
|
|
18315
18319
|
error: listSalesOrdersErrors,
|
|
18316
18320
|
isFetching: isFetchingSalesOrders,
|
|
18317
|
-
|
|
18321
|
+
isInitialLoading: isInitialLoadingSalesOrders,
|
|
18318
18322
|
refetch: refetchSalesOrders
|
|
18319
18323
|
} = useListSalesOrders({
|
|
18320
18324
|
externalOrderId,
|
|
@@ -18324,7 +18328,7 @@ const useImportSalesOrder = ({
|
|
|
18324
18328
|
data: salesOrder,
|
|
18325
18329
|
error: getSalesOrderErrors,
|
|
18326
18330
|
isFetching: isFetchingSalesOrder,
|
|
18327
|
-
|
|
18331
|
+
isInitialLoading: isInitialLoadingSalesOrder,
|
|
18328
18332
|
refetch: refetchSalesOrder
|
|
18329
18333
|
} = useGetSalesOrder(salesOrderId !== null && salesOrderId !== void 0 ? salesOrderId : salesOrders && salesOrders[0] ? salesOrders[0].salesOrderId : undefined);
|
|
18330
18334
|
const {
|
|
@@ -18354,7 +18358,7 @@ const useImportSalesOrder = ({
|
|
|
18354
18358
|
const errors = [...(listOrderSourcesErrors !== null && listOrderSourcesErrors !== void 0 ? listOrderSourcesErrors : []), ...(listSalesOrdersErrors !== null && listSalesOrdersErrors !== void 0 ? listSalesOrdersErrors : []), ...(getSalesOrderErrors !== null && getSalesOrderErrors !== void 0 ? getSalesOrderErrors : []), ...(refreshOrderSourceErrors !== null && refreshOrderSourceErrors !== void 0 ? refreshOrderSourceErrors : [])];
|
|
18355
18359
|
return {
|
|
18356
18360
|
errors: errors.length > 0 ? errors : undefined,
|
|
18357
|
-
isLoading:
|
|
18361
|
+
isLoading: isInitialLoadingSalesOrder || isInitialLoadingSalesOrders || isRefreshingOrderSource || !hasRefreshedOrderSource && !salesOrder && (salesOrders === null || salesOrders === void 0 ? void 0 : salesOrders.length) === 0 && errors.length === 0,
|
|
18358
18362
|
salesOrder
|
|
18359
18363
|
};
|
|
18360
18364
|
};
|
|
@@ -18468,13 +18472,13 @@ const useGetOrCreateShipment = (onShipmentUpdated, shipmentId) => {
|
|
|
18468
18472
|
void (onShipmentUpdated === null || onShipmentUpdated === void 0 ? void 0 : onShipmentUpdated(getShipment.data));
|
|
18469
18473
|
setShouldTriggerUpdate(false);
|
|
18470
18474
|
}
|
|
18471
|
-
}, [shouldTriggerUpdate, getShipment]);
|
|
18475
|
+
}, [shouldTriggerUpdate, getShipment, onShipmentUpdated]);
|
|
18472
18476
|
const errors = [...((_a = getShipment.error) !== null && _a !== void 0 ? _a : []), ...((_b = createShipment.error) !== null && _b !== void 0 ? _b : [])];
|
|
18473
18477
|
return {
|
|
18474
18478
|
errors: errors.length > 0 ? errors : undefined,
|
|
18475
18479
|
isLoading:
|
|
18476
18480
|
//bootstrap isLoading to true if one off and create shipment mutation hasn't been triggered yet
|
|
18477
|
-
!createShipment.isError && createShipment.isIdle && shipmentId === undefined || getShipment.
|
|
18481
|
+
!createShipment.isError && createShipment.isIdle && shipmentId === undefined || getShipment.isInitialLoading || createShipment.isLoading,
|
|
18478
18482
|
refetchShipment: getShipment.refetch,
|
|
18479
18483
|
shipment: getShipment.data
|
|
18480
18484
|
};
|
|
@@ -18498,7 +18502,7 @@ const PurchaseLabelByShipment = _a => {
|
|
|
18498
18502
|
};
|
|
18499
18503
|
const {
|
|
18500
18504
|
data: insuranceAccount,
|
|
18501
|
-
|
|
18505
|
+
isInitialLoading: insuranceIsLoading
|
|
18502
18506
|
} = useGetInsuranceAccount("shipsurance");
|
|
18503
18507
|
return jsx(SuspendShipment, Object.assign({
|
|
18504
18508
|
shipment: shipment
|
|
@@ -19019,7 +19023,7 @@ const Component$1 = ({
|
|
|
19019
19023
|
const salesOrder = useGetSalesOrder((_b = (_a = shipment.data) === null || _a === void 0 ? void 0 : _a.salesOrderIds) === null || _b === void 0 ? void 0 : _b[0]);
|
|
19020
19024
|
const warehouses = useListWarehouses();
|
|
19021
19025
|
const carriers = useListCarriers();
|
|
19022
|
-
if (
|
|
19026
|
+
if (shipment.isInitialLoading) return jsx(Loader, {
|
|
19023
19027
|
message: t("loading.shipment")
|
|
19024
19028
|
});
|
|
19025
19029
|
if (shipment.error) throw new Error(shipment.error.map(e => e.message).join(", "));
|
|
@@ -19239,10 +19243,10 @@ const Component = ({
|
|
|
19239
19243
|
const label = useGetLabel(labelId);
|
|
19240
19244
|
const shipment = useGetSalesOrderShipment((_a = label.data) === null || _a === void 0 ? void 0 : _a.shipmentId);
|
|
19241
19245
|
const voidLabel = useVoidLabel();
|
|
19242
|
-
if (label.
|
|
19246
|
+
if (label.isInitialLoading) return jsx(Loader, {
|
|
19243
19247
|
message: t("loading.label")
|
|
19244
19248
|
});
|
|
19245
|
-
if (shipment.
|
|
19249
|
+
if (shipment.isInitialLoading) return jsx(Loader, {
|
|
19246
19250
|
message: t("loading.shipment")
|
|
19247
19251
|
});
|
|
19248
19252
|
throwAny(label.error);
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shipengine/elements",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.39.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@
|
|
5
|
+
"@shipengine/giger": "0.x.x",
|
|
6
6
|
"react-i18next": "*",
|
|
7
7
|
"i18next": "*"
|
|
8
8
|
},
|
|
@@ -23,14 +23,15 @@
|
|
|
23
23
|
"@faker-js/faker": "7.6.0",
|
|
24
24
|
"@hookform/resolvers": "2.9.1",
|
|
25
25
|
"@jest/globals": "28.1.3",
|
|
26
|
-
"@
|
|
27
|
-
"@shipengine/
|
|
28
|
-
"@shipengine/js-api": "0.
|
|
26
|
+
"@shipengine/alchemy": "4.2.2",
|
|
27
|
+
"@shipengine/giger-theme": "0.4.0",
|
|
28
|
+
"@shipengine/js-api": "0.39.0",
|
|
29
29
|
"@storybook/addons": "6.5.16",
|
|
30
30
|
"@storybook/components": "7.0.0-rc.1",
|
|
31
31
|
"@storybook/core-events": "7.0.0-rc.1",
|
|
32
32
|
"@storybook/manager-api": "7.0.0-rc.1",
|
|
33
33
|
"@storybook/theming": "7.0.0-rc.1",
|
|
34
|
+
"@tanstack/react-query": "4.36.1",
|
|
34
35
|
"@testing-library/dom": "8.19.0",
|
|
35
36
|
"@vitejs/plugin-react": "1.3.2",
|
|
36
37
|
"axios": "0.26.1",
|
|
@@ -46,7 +47,6 @@
|
|
|
46
47
|
"react-datepicker": "4.11.0",
|
|
47
48
|
"react-dom": "18.2.0",
|
|
48
49
|
"react-hook-form": "7.40.0",
|
|
49
|
-
"react-query": "3.39.3",
|
|
50
50
|
"zod": "3.19.1"
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export declare const styles: {
|
|
2
|
-
chipList: (theme: import("@
|
|
2
|
+
chipList: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
3
3
|
gap: number;
|
|
4
4
|
};
|
|
5
|
-
fundsInput: (theme: import("@
|
|
5
|
+
fundsInput: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
6
6
|
maxWidth: number;
|
|
7
7
|
};
|
|
8
8
|
getChip: ({ isDisabled, isSelected }: {
|
|
9
9
|
isDisabled?: boolean | undefined;
|
|
10
10
|
isSelected?: boolean | undefined;
|
|
11
|
-
}) => (theme: import("@
|
|
11
|
+
}) => (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => (false | {
|
|
12
12
|
backgroundColor: string;
|
|
13
13
|
color: string;
|
|
14
14
|
cursor?: undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const styles: {
|
|
2
|
-
getBalanceText: (balance?: number) => (theme: import("@
|
|
2
|
+
getBalanceText: (balance?: number) => (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
3
3
|
color: string;
|
|
4
4
|
};
|
|
5
5
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
export declare const styles: {
|
|
2
|
-
content: (theme: import("@
|
|
2
|
+
content: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
3
3
|
padding: string;
|
|
4
4
|
};
|
|
5
|
-
header: (theme: import("@
|
|
5
|
+
header: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
6
6
|
backgroundColor: string;
|
|
7
7
|
display: "flex";
|
|
8
8
|
height: number;
|
|
9
9
|
padding: string;
|
|
10
10
|
};
|
|
11
|
-
icon: (theme: import("@
|
|
11
|
+
icon: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
12
12
|
color: "#006fbb";
|
|
13
13
|
};
|
|
14
|
-
link: (theme: import("@
|
|
14
|
+
link: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
15
15
|
":hover": {
|
|
16
16
|
color: string;
|
|
17
17
|
textDecoration: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const styles: {
|
|
2
|
-
getDateRangeSelect: (fullWidth?: boolean) => (theme: import("@
|
|
2
|
+
getDateRangeSelect: (fullWidth?: boolean) => (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
3
3
|
minWidth: number;
|
|
4
4
|
position: "relative";
|
|
5
5
|
width: string | number;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export declare const styles: {
|
|
2
|
-
container: (theme: import("@
|
|
2
|
+
container: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
3
3
|
display: "flex";
|
|
4
4
|
gap: number;
|
|
5
5
|
};
|
|
6
|
-
content: (theme: import("@
|
|
6
|
+
content: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
7
7
|
[x: string]: string | number | {
|
|
8
8
|
maxWidth: string;
|
|
9
9
|
};
|
|
@@ -11,7 +11,7 @@ export declare const styles: {
|
|
|
11
11
|
maxWidth: string;
|
|
12
12
|
padding: number;
|
|
13
13
|
};
|
|
14
|
-
icon: (theme: import("@
|
|
14
|
+
icon: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
15
15
|
color: string;
|
|
16
16
|
};
|
|
17
17
|
toggle: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const styles: {
|
|
2
|
-
errorContainer: (theme: import("@
|
|
2
|
+
errorContainer: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
3
3
|
alignItems: "center";
|
|
4
4
|
backgroundColor: string;
|
|
5
5
|
display: "flex";
|
|
@@ -8,12 +8,12 @@ export declare const styles: {
|
|
|
8
8
|
paddingTop: number;
|
|
9
9
|
rowGap: number;
|
|
10
10
|
};
|
|
11
|
-
errorCTA: (theme: import("@
|
|
11
|
+
errorCTA: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
12
12
|
color: string;
|
|
13
13
|
fontSize: string;
|
|
14
14
|
lineHeight: string;
|
|
15
15
|
};
|
|
16
|
-
errorHeading: (theme: import("@
|
|
16
|
+
errorHeading: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
17
17
|
fontSize: string;
|
|
18
18
|
};
|
|
19
19
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
import { ICheckboxProps as NativeCheckboxProps } from "@
|
|
2
|
+
import { ICheckboxProps as NativeCheckboxProps } from "@shipengine/giger";
|
|
3
3
|
import { ControlledField } from "../create-field-controller";
|
|
4
4
|
export declare const CheckboxInput: ControlledField<NativeCheckboxProps & {
|
|
5
5
|
checkboxLabel: ReactNode;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { InputProps as NativeInputProps } from "@
|
|
1
|
+
import { InputProps as NativeInputProps } from "@shipengine/giger";
|
|
2
2
|
import { ControlledField } from "../create-field-controller";
|
|
3
3
|
export declare const CreditCardInput: ControlledField<NativeInputProps>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { InputProps as NativeInputProps } from "@
|
|
1
|
+
import { InputProps as NativeInputProps } from "@shipengine/giger";
|
|
2
2
|
import { ControlledField } from "../create-field-controller";
|
|
3
3
|
export declare const ExpirationInput: ControlledField<NativeInputProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { InputProps } from "@packlink/giger";
|
|
2
1
|
import { SE } from "@shipengine/alchemy";
|
|
2
|
+
import { InputProps } from "@shipengine/giger";
|
|
3
3
|
import { ControlledField } from "../create-field-controller";
|
|
4
4
|
export declare const transform: {
|
|
5
5
|
in: ({ amount, currency }?: Partial<{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { InputProps as NativeInputProps } from "@
|
|
2
|
+
import { InputProps as NativeInputProps } from "@shipengine/giger";
|
|
3
3
|
import { ControlledField } from "../create-field-controller";
|
|
4
4
|
type NumberInputOptions = {
|
|
5
5
|
isInteger?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SerializedStyles } from "@emotion/react";
|
|
2
|
-
import { Theme } from "@
|
|
2
|
+
import { Theme } from "@shipengine/giger-theme";
|
|
3
3
|
export declare const getAsideStyles: (theme: Theme) => SerializedStyles;
|
|
4
4
|
export declare const getPriceStyles: (theme: Theme) => SerializedStyles;
|
|
5
5
|
export declare const getTableStyles: (theme: Theme) => SerializedStyles;
|