@shipengine/elements 2.17.0 → 2.19.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/actions-menu.js +5 -5
- package/components.js +1 -1
- package/elements.js +1 -1
- package/hooks.js +1 -1
- package/index.js +1 -1
- package/package.json +4 -12
- package/src/components/add-funds-form/add-funds-form.d.ts +3 -9
- package/src/components/button-group/button-group.d.ts +4 -1
- package/src/components/date-range-combo/date-range-combo.d.ts +1 -1
- package/src/components/field/select/select-with-categories.d.ts +1 -0
- package/src/components/fund-and-purchase/fund-and-purchase.d.ts +6 -7
- package/src/components/grid-controller/grid-controller.d.ts +6 -2
- package/src/components/grid-controller/index.d.ts +1 -0
- package/src/components/grid-controller/sortable-header.d.ts +20 -0
- package/src/components/grid-filters/components/index.d.ts +1 -0
- package/src/components/grid-filters/components/tracking-status-filter/index.d.ts +1 -0
- package/src/components/grid-filters/components/tracking-status-filter/tracking-status-filter-schema.d.ts +21 -0
- package/src/components/grid-filters/components/tracking-status-filter/tracking-status-filter.d.ts +23 -0
- package/src/components/grid-filters/components/tracking-status-filter/tracking-status-filter.styles.d.ts +13 -0
- package/src/components/grid-filters/grid-filters.d.ts +4 -1
- package/src/components/history/history-card/history-card.styles.d.ts +1 -1
- package/src/components/ship-from-address-form/ship-from-address-form.d.ts +2 -1
- package/src/components/templates/connect-external-carrier-form/connect-external-carrier-form.d.ts +3 -1
- package/src/components/templates/connect-external-carrier-form/custom-forms/custom-external-carrier-form.d.ts +10 -0
- package/src/components/templates/connect-external-carrier-form/custom-forms/custom-form-fedex.d.ts +6 -0
- package/src/components/templates/connect-external-carrier-form/custom-forms/eula-clickwrap.d.ts +11 -0
- package/src/components/templates/connect-external-carrier-form/custom-forms/eula-clickwrap.styles.d.ts +20 -0
- package/src/components/templates/connect-external-carrier-form/custom-forms/index.d.ts +1 -0
- package/src/components/templates/connect-external-carrier-form/index.d.ts +1 -0
- package/src/components/templates/rate-form/rate-form.d.ts +4 -2
- package/src/components/templates/shipment-form/shipment-form.d.ts +2 -1
- package/src/components/templates/theme-creator/theme-creator.d.ts +3 -2
- package/src/create-element/element/index.d.ts +0 -1
- package/src/elements/labels-grid/hooks/use-labels-grid.d.ts +12 -51
- package/src/elements/labels-grid/labels-grid.d.ts +50 -34
- package/src/elements/manage-carriers/manage-carriers.d.ts +49 -49
- package/src/elements/manage-external-carriers/manage-external-carriers.d.ts +43 -0
- package/src/elements/manage-funding/manage-funding-element.d.ts +24 -2
- package/src/elements/manage-warehouses/manage-warehouses.d.ts +21 -0
- package/src/elements/payment-method-settings/payment-method-settings-element.d.ts +21 -0
- package/src/elements/purchase-label/hooks/use-rates-form.d.ts +1 -0
- package/src/elements/purchase-label/hooks/use-shipment-form.d.ts +4 -4
- package/src/elements/purchase-label/purchase-label.d.ts +26 -5
- package/src/elements/select-label-layout/select-label-layout-element.d.ts +21 -0
- package/src/elements/shipment-summary/shipment-summary.d.ts +31 -36
- package/src/elements/shipments-grid/shipments-grid.d.ts +25 -36
- package/src/elements/theme-creator/theme-creator.d.ts +25 -15
- package/src/elements/transaction-history/transaction-history-element.d.ts +21 -0
- package/src/elements/unit-settings/unit-settings-element.d.ts +21 -0
- package/src/elements/vat-settings/vat-settings-element.d.ts +21 -0
- package/src/elements/void-label/void-label.d.ts +50 -9
- package/src/elements-provider/elements-context-provider.d.ts +2 -2
- package/src/elements-provider/elements-provider.d.ts +1 -2
- package/src/features/manage-carriers/manage-carriers.d.ts +6 -8
- package/src/features/manage-carriers/use-manage-carriers.d.ts +4 -7
- package/src/features/manage-funding/manage-funding.d.ts +4 -9
- package/src/hooks/index.d.ts +1 -0
- package/src/hooks/insurance/use-manage-funding-source-insurance.d.ts +1 -0
- package/src/hooks/options/use-date-range-options.d.ts +4 -1
- package/src/hooks/options/use-rate-options.d.ts +2 -1
- package/src/hooks/use-balance-services.d.ts +22 -0
- package/src/hooks/use-helpers.d.ts +4 -0
- package/src/locales/en/index.d.ts +21 -0
- package/src/utilities/feature-flags/types.d.ts +5 -1
- package/src/utilities/shipengine/address.d.ts +1 -1
- package/src/utilities/storybook-local-storage-config.d.ts +12 -0
- package/src/utilities/validation.d.ts +19 -0
- package/src/workflows/account-settings/account-settings.d.ts +21 -0
- package/src/workflows/carrier-services/carrier-services.d.ts +22 -27
- package/src/workflows/connect-external-carrier/connect-external-carrier.d.ts +31 -24
- package/src/workflows/label-workflow/label-workflow.d.ts +21 -0
- package/src/workflows/onboarding/components/onboarding-wizard/onboarding-wizard.d.ts +2 -1
- package/src/workflows/onboarding/onboarding.d.ts +67 -84
- package/styles.js +1 -0
- package/suspend-text.js +1 -1
- package/transaction-history-element.js +1 -1
- package/use-balance-services.js +1 -0
- package/use-configure-shipment.js +1 -1
- package/use-page-layout.js +1 -1
- package/use-unit-settings.js +1 -1
- package/usePager.js +1 -1
- package/utilities.js +1 -1
- package/validation.js +1 -1
- package/wallet-form.js +1 -1
- package/warehouses.js +1 -1
- package/workflows.js +1 -1
- package/carrier.js +0 -1
- package/src/create-element/element/utils/get-emotion-cache.d.ts +0 -2
- package/src/create-element/element/utils/index.d.ts +0 -1
- package/use-toggle.js +0 -1
|
@@ -1,19 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
export type ComponentProps =
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
presetName: string;
|
|
7
|
-
themeConfig: CustomThemeData;
|
|
8
|
-
}[];
|
|
9
|
-
showDrawer?: {
|
|
10
|
-
content?: React.ReactNode;
|
|
11
|
-
copyToClipboardText?: string;
|
|
12
|
-
};
|
|
13
|
-
themeConfig: CustomThemeData;
|
|
14
|
-
};
|
|
15
|
-
export declare const Component: ({ ...props }: ComponentProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
16
|
-
export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
2
|
+
import { ThemeCreatorProps } from "../../components/templates/theme-creator";
|
|
3
|
+
export type ComponentProps = ThemeCreatorProps;
|
|
4
|
+
export declare const Component: ({ ...props }: ThemeCreatorProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const Element: ({ resources, ...props }: ThemeCreatorProps & {
|
|
17
6
|
resources?: {
|
|
18
7
|
en: {
|
|
19
8
|
"wallet-history": {
|
|
@@ -35,6 +24,9 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
35
24
|
thisMonth: string;
|
|
36
25
|
lastMonth: string;
|
|
37
26
|
};
|
|
27
|
+
category: {
|
|
28
|
+
fundsAdded: string;
|
|
29
|
+
};
|
|
38
30
|
};
|
|
39
31
|
"void-label": {
|
|
40
32
|
title: string;
|
|
@@ -631,8 +623,10 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
631
623
|
trackingStatus: {
|
|
632
624
|
unknown: string;
|
|
633
625
|
inTransit: string;
|
|
626
|
+
in_transit: string;
|
|
634
627
|
delivered: string;
|
|
635
628
|
error: string;
|
|
629
|
+
voided: string;
|
|
636
630
|
};
|
|
637
631
|
actions: {
|
|
638
632
|
title: string;
|
|
@@ -652,6 +646,17 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
652
646
|
connectCarriers: string;
|
|
653
647
|
disconnect: string;
|
|
654
648
|
disconnectCarrier: string;
|
|
649
|
+
downloadEula: string;
|
|
650
|
+
};
|
|
651
|
+
customForms: {
|
|
652
|
+
fedex: {
|
|
653
|
+
eulaName: string;
|
|
654
|
+
disclaimerFooter: string;
|
|
655
|
+
};
|
|
656
|
+
};
|
|
657
|
+
eula: {
|
|
658
|
+
toContinue: string;
|
|
659
|
+
iAgree: string;
|
|
655
660
|
};
|
|
656
661
|
noCarriersDescription: string;
|
|
657
662
|
registrationForm: {
|
|
@@ -698,6 +703,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
698
703
|
address: {
|
|
699
704
|
fields: {
|
|
700
705
|
name: string;
|
|
706
|
+
fullName: string;
|
|
701
707
|
company: string;
|
|
702
708
|
county: string;
|
|
703
709
|
countryCode: string;
|
|
@@ -860,6 +866,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
860
866
|
unknown: string;
|
|
861
867
|
noRatesAvailable: string;
|
|
862
868
|
refreshAndTryAgain: string;
|
|
869
|
+
updateShipFromAddress: string;
|
|
863
870
|
windsorFramework: {
|
|
864
871
|
doNotConform: string;
|
|
865
872
|
pleaseAddTheFollowingTaxIds: string;
|
|
@@ -878,6 +885,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
878
885
|
saveRate: string;
|
|
879
886
|
security: string;
|
|
880
887
|
shipmentStatus: string;
|
|
888
|
+
shipFromAddress: string;
|
|
881
889
|
system: string;
|
|
882
890
|
unknown: string;
|
|
883
891
|
validation: string;
|
|
@@ -891,6 +899,8 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
891
899
|
shipmentId: string;
|
|
892
900
|
labelId: string;
|
|
893
901
|
labelIdFilter: string;
|
|
902
|
+
filteredTrackingStatus: string;
|
|
903
|
+
more: string;
|
|
894
904
|
createdDate: string;
|
|
895
905
|
shipmentIdFilter: string;
|
|
896
906
|
createdDateFilter: string;
|
|
@@ -22,6 +22,9 @@ export declare const Element: ({ resources, ...props }: object & {
|
|
|
22
22
|
thisMonth: string;
|
|
23
23
|
lastMonth: string;
|
|
24
24
|
};
|
|
25
|
+
category: {
|
|
26
|
+
fundsAdded: string;
|
|
27
|
+
};
|
|
25
28
|
};
|
|
26
29
|
"void-label": {
|
|
27
30
|
title: string;
|
|
@@ -618,8 +621,10 @@ export declare const Element: ({ resources, ...props }: object & {
|
|
|
618
621
|
trackingStatus: {
|
|
619
622
|
unknown: string;
|
|
620
623
|
inTransit: string;
|
|
624
|
+
in_transit: string;
|
|
621
625
|
delivered: string;
|
|
622
626
|
error: string;
|
|
627
|
+
voided: string;
|
|
623
628
|
};
|
|
624
629
|
actions: {
|
|
625
630
|
title: string;
|
|
@@ -639,6 +644,17 @@ export declare const Element: ({ resources, ...props }: object & {
|
|
|
639
644
|
connectCarriers: string;
|
|
640
645
|
disconnect: string;
|
|
641
646
|
disconnectCarrier: string;
|
|
647
|
+
downloadEula: string;
|
|
648
|
+
};
|
|
649
|
+
customForms: {
|
|
650
|
+
fedex: {
|
|
651
|
+
eulaName: string;
|
|
652
|
+
disclaimerFooter: string;
|
|
653
|
+
};
|
|
654
|
+
};
|
|
655
|
+
eula: {
|
|
656
|
+
toContinue: string;
|
|
657
|
+
iAgree: string;
|
|
642
658
|
};
|
|
643
659
|
noCarriersDescription: string;
|
|
644
660
|
registrationForm: {
|
|
@@ -685,6 +701,7 @@ export declare const Element: ({ resources, ...props }: object & {
|
|
|
685
701
|
address: {
|
|
686
702
|
fields: {
|
|
687
703
|
name: string;
|
|
704
|
+
fullName: string;
|
|
688
705
|
company: string;
|
|
689
706
|
county: string;
|
|
690
707
|
countryCode: string;
|
|
@@ -847,6 +864,7 @@ export declare const Element: ({ resources, ...props }: object & {
|
|
|
847
864
|
unknown: string;
|
|
848
865
|
noRatesAvailable: string;
|
|
849
866
|
refreshAndTryAgain: string;
|
|
867
|
+
updateShipFromAddress: string;
|
|
850
868
|
windsorFramework: {
|
|
851
869
|
doNotConform: string;
|
|
852
870
|
pleaseAddTheFollowingTaxIds: string;
|
|
@@ -865,6 +883,7 @@ export declare const Element: ({ resources, ...props }: object & {
|
|
|
865
883
|
saveRate: string;
|
|
866
884
|
security: string;
|
|
867
885
|
shipmentStatus: string;
|
|
886
|
+
shipFromAddress: string;
|
|
868
887
|
system: string;
|
|
869
888
|
unknown: string;
|
|
870
889
|
validation: string;
|
|
@@ -878,6 +897,8 @@ export declare const Element: ({ resources, ...props }: object & {
|
|
|
878
897
|
shipmentId: string;
|
|
879
898
|
labelId: string;
|
|
880
899
|
labelIdFilter: string;
|
|
900
|
+
filteredTrackingStatus: string;
|
|
901
|
+
more: string;
|
|
881
902
|
createdDate: string;
|
|
882
903
|
shipmentIdFilter: string;
|
|
883
904
|
createdDateFilter: string;
|
|
@@ -22,6 +22,9 @@ export declare const Element: ({ resources, ...props }: object & {
|
|
|
22
22
|
thisMonth: string;
|
|
23
23
|
lastMonth: string;
|
|
24
24
|
};
|
|
25
|
+
category: {
|
|
26
|
+
fundsAdded: string;
|
|
27
|
+
};
|
|
25
28
|
};
|
|
26
29
|
"void-label": {
|
|
27
30
|
title: string;
|
|
@@ -618,8 +621,10 @@ export declare const Element: ({ resources, ...props }: object & {
|
|
|
618
621
|
trackingStatus: {
|
|
619
622
|
unknown: string;
|
|
620
623
|
inTransit: string;
|
|
624
|
+
in_transit: string;
|
|
621
625
|
delivered: string;
|
|
622
626
|
error: string;
|
|
627
|
+
voided: string;
|
|
623
628
|
};
|
|
624
629
|
actions: {
|
|
625
630
|
title: string;
|
|
@@ -639,6 +644,17 @@ export declare const Element: ({ resources, ...props }: object & {
|
|
|
639
644
|
connectCarriers: string;
|
|
640
645
|
disconnect: string;
|
|
641
646
|
disconnectCarrier: string;
|
|
647
|
+
downloadEula: string;
|
|
648
|
+
};
|
|
649
|
+
customForms: {
|
|
650
|
+
fedex: {
|
|
651
|
+
eulaName: string;
|
|
652
|
+
disclaimerFooter: string;
|
|
653
|
+
};
|
|
654
|
+
};
|
|
655
|
+
eula: {
|
|
656
|
+
toContinue: string;
|
|
657
|
+
iAgree: string;
|
|
642
658
|
};
|
|
643
659
|
noCarriersDescription: string;
|
|
644
660
|
registrationForm: {
|
|
@@ -685,6 +701,7 @@ export declare const Element: ({ resources, ...props }: object & {
|
|
|
685
701
|
address: {
|
|
686
702
|
fields: {
|
|
687
703
|
name: string;
|
|
704
|
+
fullName: string;
|
|
688
705
|
company: string;
|
|
689
706
|
county: string;
|
|
690
707
|
countryCode: string;
|
|
@@ -847,6 +864,7 @@ export declare const Element: ({ resources, ...props }: object & {
|
|
|
847
864
|
unknown: string;
|
|
848
865
|
noRatesAvailable: string;
|
|
849
866
|
refreshAndTryAgain: string;
|
|
867
|
+
updateShipFromAddress: string;
|
|
850
868
|
windsorFramework: {
|
|
851
869
|
doNotConform: string;
|
|
852
870
|
pleaseAddTheFollowingTaxIds: string;
|
|
@@ -865,6 +883,7 @@ export declare const Element: ({ resources, ...props }: object & {
|
|
|
865
883
|
saveRate: string;
|
|
866
884
|
security: string;
|
|
867
885
|
shipmentStatus: string;
|
|
886
|
+
shipFromAddress: string;
|
|
868
887
|
system: string;
|
|
869
888
|
unknown: string;
|
|
870
889
|
validation: string;
|
|
@@ -878,6 +897,8 @@ export declare const Element: ({ resources, ...props }: object & {
|
|
|
878
897
|
shipmentId: string;
|
|
879
898
|
labelId: string;
|
|
880
899
|
labelIdFilter: string;
|
|
900
|
+
filteredTrackingStatus: string;
|
|
901
|
+
more: string;
|
|
881
902
|
createdDate: string;
|
|
882
903
|
shipmentIdFilter: string;
|
|
883
904
|
createdDateFilter: string;
|
|
@@ -22,6 +22,9 @@ export declare const Element: ({ resources, ...props }: object & {
|
|
|
22
22
|
thisMonth: string;
|
|
23
23
|
lastMonth: string;
|
|
24
24
|
};
|
|
25
|
+
category: {
|
|
26
|
+
fundsAdded: string;
|
|
27
|
+
};
|
|
25
28
|
};
|
|
26
29
|
"void-label": {
|
|
27
30
|
title: string;
|
|
@@ -618,8 +621,10 @@ export declare const Element: ({ resources, ...props }: object & {
|
|
|
618
621
|
trackingStatus: {
|
|
619
622
|
unknown: string;
|
|
620
623
|
inTransit: string;
|
|
624
|
+
in_transit: string;
|
|
621
625
|
delivered: string;
|
|
622
626
|
error: string;
|
|
627
|
+
voided: string;
|
|
623
628
|
};
|
|
624
629
|
actions: {
|
|
625
630
|
title: string;
|
|
@@ -639,6 +644,17 @@ export declare const Element: ({ resources, ...props }: object & {
|
|
|
639
644
|
connectCarriers: string;
|
|
640
645
|
disconnect: string;
|
|
641
646
|
disconnectCarrier: string;
|
|
647
|
+
downloadEula: string;
|
|
648
|
+
};
|
|
649
|
+
customForms: {
|
|
650
|
+
fedex: {
|
|
651
|
+
eulaName: string;
|
|
652
|
+
disclaimerFooter: string;
|
|
653
|
+
};
|
|
654
|
+
};
|
|
655
|
+
eula: {
|
|
656
|
+
toContinue: string;
|
|
657
|
+
iAgree: string;
|
|
642
658
|
};
|
|
643
659
|
noCarriersDescription: string;
|
|
644
660
|
registrationForm: {
|
|
@@ -685,6 +701,7 @@ export declare const Element: ({ resources, ...props }: object & {
|
|
|
685
701
|
address: {
|
|
686
702
|
fields: {
|
|
687
703
|
name: string;
|
|
704
|
+
fullName: string;
|
|
688
705
|
company: string;
|
|
689
706
|
county: string;
|
|
690
707
|
countryCode: string;
|
|
@@ -847,6 +864,7 @@ export declare const Element: ({ resources, ...props }: object & {
|
|
|
847
864
|
unknown: string;
|
|
848
865
|
noRatesAvailable: string;
|
|
849
866
|
refreshAndTryAgain: string;
|
|
867
|
+
updateShipFromAddress: string;
|
|
850
868
|
windsorFramework: {
|
|
851
869
|
doNotConform: string;
|
|
852
870
|
pleaseAddTheFollowingTaxIds: string;
|
|
@@ -865,6 +883,7 @@ export declare const Element: ({ resources, ...props }: object & {
|
|
|
865
883
|
saveRate: string;
|
|
866
884
|
security: string;
|
|
867
885
|
shipmentStatus: string;
|
|
886
|
+
shipFromAddress: string;
|
|
868
887
|
system: string;
|
|
869
888
|
unknown: string;
|
|
870
889
|
validation: string;
|
|
@@ -878,6 +897,8 @@ export declare const Element: ({ resources, ...props }: object & {
|
|
|
878
897
|
shipmentId: string;
|
|
879
898
|
labelId: string;
|
|
880
899
|
labelIdFilter: string;
|
|
900
|
+
filteredTrackingStatus: string;
|
|
901
|
+
more: string;
|
|
881
902
|
createdDate: string;
|
|
882
903
|
shipmentIdFilter: string;
|
|
883
904
|
createdDateFilter: string;
|
|
@@ -109,6 +109,9 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
109
109
|
thisMonth: string;
|
|
110
110
|
lastMonth: string;
|
|
111
111
|
};
|
|
112
|
+
category: {
|
|
113
|
+
fundsAdded: string;
|
|
114
|
+
};
|
|
112
115
|
};
|
|
113
116
|
"void-label": {
|
|
114
117
|
title: string;
|
|
@@ -718,7 +721,13 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
718
721
|
};
|
|
719
722
|
empty: {
|
|
720
723
|
title: string;
|
|
721
|
-
subtitle: string;
|
|
724
|
+
subtitle: string; /**
|
|
725
|
+
* # Void Label Component Props
|
|
726
|
+
*
|
|
727
|
+
* - These are the base props that will be passed into the `<VoidLabel />` component.
|
|
728
|
+
*
|
|
729
|
+
* @see {@link VoidLabel.Component | This prop types usage in the `<VoidLabel />` component}
|
|
730
|
+
*/
|
|
722
731
|
};
|
|
723
732
|
emptyWithFilters: {
|
|
724
733
|
title: string;
|
|
@@ -733,25 +742,29 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
733
742
|
};
|
|
734
743
|
trackingStatus: {
|
|
735
744
|
unknown: string;
|
|
745
|
+
/**
|
|
746
|
+
* `onComplete` is a callback function that will be invoked when the request to void a given
|
|
747
|
+
* shipping label is completed.
|
|
748
|
+
*/
|
|
736
749
|
inTransit: string;
|
|
750
|
+
in_transit: string;
|
|
737
751
|
delivered: string;
|
|
738
752
|
error: string;
|
|
753
|
+
voided: string;
|
|
739
754
|
};
|
|
740
755
|
actions: {
|
|
741
756
|
title: string;
|
|
742
|
-
print: string;
|
|
757
|
+
print: string; /**
|
|
758
|
+
* `onSuccess` is a callback function that will be invoked when the request to void a given
|
|
759
|
+
* shipping label is successful.
|
|
760
|
+
*/
|
|
743
761
|
void: string;
|
|
744
762
|
printForms: string;
|
|
745
763
|
};
|
|
746
764
|
errorMessages: {
|
|
747
765
|
title: string;
|
|
748
766
|
subtitle: string;
|
|
749
|
-
};
|
|
750
|
-
* `onViewShipment` is a callback function that will be invoked when the user clicks the
|
|
751
|
-
* `View Shipment` button. This will take you back to the
|
|
752
|
-
* {@link ShipmentSummary.Element | `Shipment Summary Element`} for the given shipment, where you
|
|
753
|
-
* will be able to see the voided label listed.
|
|
754
|
-
*/
|
|
767
|
+
};
|
|
755
768
|
};
|
|
756
769
|
"connect-carrier": {
|
|
757
770
|
actions: {
|
|
@@ -760,6 +773,17 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
760
773
|
connectCarriers: string;
|
|
761
774
|
disconnect: string;
|
|
762
775
|
disconnectCarrier: string;
|
|
776
|
+
downloadEula: string;
|
|
777
|
+
};
|
|
778
|
+
customForms: {
|
|
779
|
+
fedex: {
|
|
780
|
+
eulaName: string;
|
|
781
|
+
disclaimerFooter: string;
|
|
782
|
+
};
|
|
783
|
+
};
|
|
784
|
+
eula: {
|
|
785
|
+
toContinue: string;
|
|
786
|
+
iAgree: string;
|
|
763
787
|
};
|
|
764
788
|
noCarriersDescription: string;
|
|
765
789
|
registrationForm: {
|
|
@@ -806,6 +830,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
806
830
|
address: {
|
|
807
831
|
fields: {
|
|
808
832
|
name: string;
|
|
833
|
+
fullName: string;
|
|
809
834
|
company: string;
|
|
810
835
|
county: string;
|
|
811
836
|
countryCode: string;
|
|
@@ -818,6 +843,10 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
818
843
|
email: string;
|
|
819
844
|
addressResidentialIndicator: string;
|
|
820
845
|
};
|
|
846
|
+
/**
|
|
847
|
+
* `onComplete` is a callback function that will be invoked when the request to void a given
|
|
848
|
+
* shipping label is completed.
|
|
849
|
+
*/
|
|
821
850
|
noResults: string;
|
|
822
851
|
subFields: {
|
|
823
852
|
optional: string;
|
|
@@ -827,6 +856,10 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
827
856
|
};
|
|
828
857
|
paste: string;
|
|
829
858
|
preference: {
|
|
859
|
+
/**
|
|
860
|
+
* `onSuccess` is a callback function that will be invoked when the request to void a given
|
|
861
|
+
* shipping label is successful.
|
|
862
|
+
*/
|
|
830
863
|
confirm: string;
|
|
831
864
|
addressNotValidated: string;
|
|
832
865
|
modified: string;
|
|
@@ -937,7 +970,11 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
937
970
|
title: string;
|
|
938
971
|
restriction: string;
|
|
939
972
|
requirement1: string;
|
|
940
|
-
requirement2: string;
|
|
973
|
+
requirement2: string; /**
|
|
974
|
+
* # Void Label Element Props
|
|
975
|
+
*
|
|
976
|
+
* @see {@link VoidLabel.Element | See the full type that `typeof Element` will return}
|
|
977
|
+
*/
|
|
941
978
|
requirement3: string;
|
|
942
979
|
};
|
|
943
980
|
};
|
|
@@ -968,6 +1005,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
968
1005
|
unknown: string;
|
|
969
1006
|
noRatesAvailable: string;
|
|
970
1007
|
refreshAndTryAgain: string;
|
|
1008
|
+
updateShipFromAddress: string;
|
|
971
1009
|
windsorFramework: {
|
|
972
1010
|
doNotConform: string;
|
|
973
1011
|
pleaseAddTheFollowingTaxIds: string;
|
|
@@ -986,6 +1024,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
986
1024
|
saveRate: string;
|
|
987
1025
|
security: string;
|
|
988
1026
|
shipmentStatus: string;
|
|
1027
|
+
shipFromAddress: string;
|
|
989
1028
|
system: string;
|
|
990
1029
|
unknown: string;
|
|
991
1030
|
validation: string;
|
|
@@ -999,6 +1038,8 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
999
1038
|
shipmentId: string;
|
|
1000
1039
|
labelId: string;
|
|
1001
1040
|
labelIdFilter: string;
|
|
1041
|
+
filteredTrackingStatus: string;
|
|
1042
|
+
more: string;
|
|
1002
1043
|
createdDate: string;
|
|
1003
1044
|
shipmentIdFilter: string;
|
|
1004
1045
|
createdDateFilter: string;
|
|
@@ -8,7 +8,7 @@ export interface ElementsContextValue {
|
|
|
8
8
|
baseURL: string;
|
|
9
9
|
cdnURL: string;
|
|
10
10
|
container?: HTMLElement;
|
|
11
|
-
emotionCacheShadowRootContainer?: ShadowRoot
|
|
11
|
+
emotionCacheShadowRootContainer?: ShadowRoot | null;
|
|
12
12
|
getFeatures: (key: keyof ElementsFeatureFlags) => ElementsFeatureFlags[keyof ElementsFeatureFlags];
|
|
13
13
|
getToken: ShipEngineProps["getToken"];
|
|
14
14
|
globalFeatures: GlobalFeatures;
|
|
@@ -27,7 +27,7 @@ export type ElementsContextProviderProps = {
|
|
|
27
27
|
cdnURL?: string;
|
|
28
28
|
children: React.ReactNode;
|
|
29
29
|
container?: HTMLElement;
|
|
30
|
-
emotionCacheShadowRootContainer?: ShadowRoot
|
|
30
|
+
emotionCacheShadowRootContainer?: ShadowRoot | null;
|
|
31
31
|
features?: ElementsFeatureFlags;
|
|
32
32
|
locale?: string;
|
|
33
33
|
onError?: ElementsErrorHandler;
|
|
@@ -5,7 +5,6 @@ import { ShipEngineAPIConfig } from "@shipengine/react-api";
|
|
|
5
5
|
import { ElementsContextProviderProps } from "./elements-context-provider";
|
|
6
6
|
export type ElementsProviderProps = Omit<ElementsContextProviderProps, "theme"> & ShipEngineAPIConfig & {
|
|
7
7
|
defaultQueryClientOptions?: DefaultOptions;
|
|
8
|
-
emotionCacheShadowRootContainer?: ShadowRoot & HTMLElement;
|
|
9
8
|
themeConfig?: CustomThemeData | {
|
|
10
9
|
[THEME_ID]: CustomThemeData;
|
|
11
10
|
};
|
|
@@ -13,4 +12,4 @@ export type ElementsProviderProps = Omit<ElementsContextProviderProps, "theme">
|
|
|
13
12
|
/**
|
|
14
13
|
* @category Providers
|
|
15
14
|
*/
|
|
16
|
-
export declare const ElementsProvider: ({ baseURL, cdnURL, children, container, features, getToken, headers, locale, onApiError, onError, scope, themeConfig, defaultQueryClientOptions, emotionCacheShadowRootContainer, }: ElementsProviderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const ElementsProvider: ({ baseURL, cdnURL, children, container, features, getToken, headers, locale, onApiError, onError, scope, themeConfig, defaultQueryClientOptions, emotionCacheShadowRootContainer, }: ElementsProviderProps) => import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { CodedError,
|
|
1
|
+
import { CodedError, SE } from "@shipengine/react-api";
|
|
2
|
+
export type AddFundsPayload = {
|
|
3
|
+
fundingSourceId: string;
|
|
4
|
+
funds: SE.Money;
|
|
5
|
+
};
|
|
2
6
|
export type ShipEngineCarriersProps = {
|
|
3
|
-
addFunds
|
|
4
|
-
carrierId: string;
|
|
5
|
-
funds: {
|
|
6
|
-
amount: number;
|
|
7
|
-
currency: Currency;
|
|
8
|
-
};
|
|
9
|
-
}) => Promise<void>;
|
|
7
|
+
addFunds: (payload: AddFundsPayload) => Promise<void>;
|
|
10
8
|
addFundsError?: CodedError[] | null;
|
|
11
9
|
isUpdateFundsError?: boolean;
|
|
12
10
|
isUpdatingFunds?: boolean;
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SE } from "@shipengine/react-api";
|
|
2
2
|
export declare const useManageCarriers: () => {
|
|
3
3
|
addFunds: (payload: {
|
|
4
|
-
|
|
5
|
-
funds:
|
|
6
|
-
amount: number;
|
|
7
|
-
currency: Currency;
|
|
8
|
-
};
|
|
4
|
+
fundingSourceId: string;
|
|
5
|
+
funds: SE.Money;
|
|
9
6
|
}) => Promise<void>;
|
|
10
|
-
addFundsError:
|
|
7
|
+
addFundsError: SE.CodedError[] | null;
|
|
11
8
|
isAddFundsSuccess: boolean;
|
|
12
9
|
isAddingFunds: boolean;
|
|
13
10
|
isAddingFundsError: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CodedError,
|
|
1
|
+
import { CodedError, SE } from "@shipengine/react-api";
|
|
2
2
|
/**
|
|
3
3
|
* @namespace ManageFunding
|
|
4
4
|
*
|
|
@@ -15,14 +15,9 @@ import { CodedError, Currency } from "@shipengine/react-api";
|
|
|
15
15
|
* @see {@link ManageFundingProps | The props that are passed into the `<ManageFunding />` component}
|
|
16
16
|
*/
|
|
17
17
|
export type ManageFundingProps = {
|
|
18
|
-
addFunds?: (payload:
|
|
19
|
-
carrierId: string;
|
|
20
|
-
funds: {
|
|
21
|
-
amount: number;
|
|
22
|
-
currency: Currency;
|
|
23
|
-
};
|
|
24
|
-
}) => Promise<void>;
|
|
18
|
+
addFunds?: (payload: SE.Money) => Promise<void>;
|
|
25
19
|
addFundsError?: CodedError[] | null;
|
|
20
|
+
fundingSource?: SE.FundingSource;
|
|
26
21
|
onRedirectToOnboarding?: () => void;
|
|
27
22
|
};
|
|
28
|
-
export declare const ManageFunding: ({ onRedirectToOnboarding, addFunds, addFundsError, }: ManageFundingProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare const ManageFunding: ({ onRedirectToOnboarding, addFunds, addFundsError, fundingSource, }: ManageFundingProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
package/src/hooks/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SE } from "@shipengine/react-api";
|
|
2
2
|
import { InsuranceProviderProfile } from "../../types";
|
|
3
3
|
export declare const useManageFundingSourceInsurance: () => {
|
|
4
|
+
fundingSourceCountryCode: string | undefined;
|
|
4
5
|
hasInsuranceToRegister: boolean | undefined;
|
|
5
6
|
insuranceAcceptedTerms: SE.Term[] | undefined;
|
|
6
7
|
insuranceProviderProfiles: InsuranceProviderProfile[] | undefined;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SE } from "@shipengine/react-api";
|
|
2
2
|
import { PreferredRateAcknowledgementMessage, PreferredRatesResponse } from "../../types";
|
|
3
|
+
import { FundingOrigin } from "../use-balance-services";
|
|
3
4
|
/**
|
|
4
5
|
* @internal
|
|
5
6
|
*
|
|
@@ -32,4 +33,4 @@ export type RateOption = Omit<SE.Rate, "warningMessages"> & {
|
|
|
32
33
|
*
|
|
33
34
|
* # Rate Options Hook
|
|
34
35
|
*/
|
|
35
|
-
export declare const useRateOptions: (rates?: SE.Rate[], preferredRates?: PreferredRatesResponse, carriers?: SE.Carrier[], shipment?: SE.SalesOrderShipment, servicePoints?: SE.ServicePoint[], requireDhlTermsAcknowledgement?: boolean, windsorFrameworkEnabled?: boolean) => RateOption[];
|
|
36
|
+
export declare const useRateOptions: (rates?: SE.Rate[], fundingOrigin?: FundingOrigin, preferredRates?: PreferredRatesResponse, carriers?: SE.Carrier[], shipment?: SE.SalesOrderShipment, servicePoints?: SE.ServicePoint[], requireDhlTermsAcknowledgement?: boolean, windsorFrameworkEnabled?: boolean) => RateOption[];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CodedError, SE } from "@shipengine/react-api";
|
|
2
|
+
export type FundingOrigin = {
|
|
3
|
+
balance: number;
|
|
4
|
+
currency: SE.Currency;
|
|
5
|
+
id: string;
|
|
6
|
+
};
|
|
7
|
+
export type UseBalanceServicesReturnType = ReturnType<typeof useBalanceServices>;
|
|
8
|
+
/**
|
|
9
|
+
* The `useBalanceServices` hook retrieves and manages balance information for a carrier or funding source. If a funding source cannot be found, the hook will default to using the carrier balance associated with the provided `carrierId` as the primary source of truth.
|
|
10
|
+
*
|
|
11
|
+
* @returns `UseBalanceServicesReturnType`
|
|
12
|
+
*/
|
|
13
|
+
export declare const useBalanceServices: () => {
|
|
14
|
+
addFundsMutation: (funds: SE.Money) => Promise<void>;
|
|
15
|
+
errors: {
|
|
16
|
+
addFundsErrors: CodedError[] | undefined;
|
|
17
|
+
fetchBalanceErrors: CodedError[] | undefined;
|
|
18
|
+
};
|
|
19
|
+
fundingOrigin: FundingOrigin | undefined;
|
|
20
|
+
isLoadingBalance: boolean;
|
|
21
|
+
resetAddFundsMutationState: () => void;
|
|
22
|
+
};
|