@shipengine/elements 2.11.1 → 2.12.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/canada-ddp.js +1 -0
- package/carrier.js +1 -1
- package/components.js +1 -1
- package/elements.js +1 -1
- package/hooks.js +1 -1
- package/index.js +1 -1
- package/package.json +4 -4
- package/shipment.js +1 -1
- package/src/components/actions-menu/actions-menu.d.ts +2 -1
- package/src/components/field/select/select-with-categories.d.ts +1 -0
- package/src/components/grid-filters/grid-filters.d.ts +2 -1
- package/src/components/index.d.ts +1 -0
- package/src/components/ship-from-address-form/index.d.ts +1 -0
- package/src/components/ship-from-address-form/ship-from-address-form-schema.d.ts +436 -0
- package/src/components/ship-from-address-form/ship-from-address-form.d.ts +20 -0
- package/src/components/ship-from-address-form/ship-from-address-form.styles.d.ts +20 -0
- package/src/components/templates/index.d.ts +1 -1
- package/src/components/templates/rate-form/rate-form.d.ts +3 -2
- package/src/components/templates/shipment-form/sections/customs-forms/customs-forms.d.ts +2 -1
- package/src/components/templates/shipment-form/shipment-form.d.ts +10 -6
- package/src/components/templates/shipment-form/shipment-form.styles.d.ts +1 -0
- package/src/components/templates/shipment-form/shipment-schema.d.ts +26 -12
- package/src/components/templates/suspend-purchase/index.d.ts +1 -0
- package/src/components/templates/suspend-purchase/suspend-purchase.d.ts +8 -0
- package/src/components/warehouse-form/warehouse-form-schema.d.ts +148 -34
- package/src/elements/labels-grid/hooks/use-labels-grid.d.ts +4 -0
- package/src/elements/labels-grid/labels-grid.d.ts +37 -22
- package/src/elements/manage-carriers/manage-carriers.d.ts +15 -0
- package/src/elements/manage-external-carriers/manage-external-carriers.d.ts +15 -0
- package/src/elements/manage-funding/manage-funding-element.d.ts +15 -0
- package/src/elements/manage-warehouses/manage-warehouses.d.ts +15 -0
- package/src/elements/payment-method-settings/payment-method-settings-element.d.ts +15 -0
- package/src/elements/purchase-label/configure-shipment.d.ts +3 -2
- package/src/elements/purchase-label/hooks/index.d.ts +0 -2
- package/src/elements/purchase-label/hooks/use-address.d.ts +1 -1
- package/src/elements/purchase-label/hooks/use-configure-shipment.d.ts +23 -12
- package/src/elements/purchase-label/hooks/use-customs.d.ts +1 -1
- package/src/elements/purchase-label/hooks/use-import-sales-order.d.ts +2 -1
- package/src/elements/purchase-label/hooks/use-shipment-form.d.ts +14 -5
- package/src/elements/purchase-label/purchase-label.d.ts +88 -47
- package/src/elements/select-label-layout/select-label-layout-element.d.ts +15 -0
- package/src/elements/shipment-summary/shipment-summary.d.ts +27 -6
- package/src/elements/shipments-grid/shipments-grid.d.ts +91 -20
- package/src/elements/theme-creator/theme-creator.d.ts +15 -0
- package/src/elements/transaction-history/transaction-history-element.d.ts +15 -0
- package/src/elements/unit-settings/unit-settings-element.d.ts +15 -0
- package/src/elements/vat-settings/vat-settings-element.d.ts +15 -0
- package/src/elements/void-label/void-label.d.ts +15 -0
- package/src/hooks/options/index.d.ts +1 -1
- package/src/hooks/options/use-ship-from-address-options.d.ts +19 -0
- package/src/hooks/options/use-shipment-metadata.d.ts +1 -0
- package/src/locales/en/index.d.ts +15 -0
- package/src/types/canada-ddp.d.ts +4 -0
- package/src/types/index.d.ts +2 -0
- package/src/types/ship-from-address.d.ts +4 -0
- package/src/utilities/feature-flags/types.d.ts +7 -1
- package/src/utilities/shipengine/address.d.ts +32 -0
- package/src/utilities/shipengine/sales-order.d.ts +2 -2
- package/src/utilities/shipengine/warehouses.d.ts +2 -1
- package/src/workflows/account-settings/account-settings.d.ts +15 -0
- package/src/workflows/carrier-services/carrier-services.d.ts +15 -0
- package/src/workflows/connect-external-carrier/connect-external-carrier.d.ts +15 -0
- package/src/workflows/onboarding/onboarding.d.ts +16 -1
- package/suspend-text.js +1 -1
- package/transaction-history-element.js +1 -1
- package/types.js +1 -1
- package/use-scrub-errors.js +1 -1
- package/use-toggle.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/vat.js +1 -1
- package/wallet-form.js +1 -1
- package/workflows.js +1 -1
- package/src/components/templates/suspend-shipment/index.d.ts +0 -1
- package/src/components/templates/suspend-shipment/suspend-shipment.d.ts +0 -8
- package/src/elements/purchase-label/hooks/use-get-or-create-shipment.d.ts +0 -13
- package/src/elements/purchase-label/hooks/use-load-shipment.d.ts +0 -9
- package/src/elements/purchase-label/hooks/use-pending-shipment.d.ts +0 -13
- package/src/elements/purchase-label/purchase-label-by-sales-order.d.ts +0 -11
- package/src/elements/purchase-label/purchase-label-by-shipment.d.ts +0 -8
- package/src/hooks/options/use-warehouse-options.d.ts +0 -13
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { SE } from "@shipengine/react-api";
|
|
2
3
|
import { UseShippingPresetsOptionsProps } from "../../hooks";
|
|
3
4
|
import { PurchaseLabelFeatures } from "../../utilities";
|
|
4
5
|
import { ConfigureShipmentProps } from "./configure-shipment";
|
|
5
|
-
import { UseConfigureShipmentProps } from "./hooks";
|
|
6
|
-
import { PurchaseLabelSalesOrderProps } from "./purchase-label-by-sales-order";
|
|
7
|
-
import { PurchaseLabelByShipmentProps } from "./purchase-label-by-shipment";
|
|
6
|
+
import { UseConfigureShipmentProps, UseImportSalesOrderProps } from "./hooks";
|
|
8
7
|
/**
|
|
9
8
|
* # Purchase Label Component Props
|
|
10
9
|
*
|
|
@@ -14,6 +13,25 @@ import { PurchaseLabelByShipmentProps } from "./purchase-label-by-shipment";
|
|
|
14
13
|
* @see {@link PurchaseLabel.Element | This prop types usage in `<PurchaseLabel.Element />`}
|
|
15
14
|
*/
|
|
16
15
|
export type PurchaseLabelCommonProps = {
|
|
16
|
+
/**
|
|
17
|
+
* The Currency used through out the label purchase process. Default to USD
|
|
18
|
+
*/
|
|
19
|
+
currency?: SE.Currency;
|
|
20
|
+
/**
|
|
21
|
+
* A unique ID assigned during the creation of a sales order. It can be used to locate the
|
|
22
|
+
* sales order and any subsequent shipments related to that order.
|
|
23
|
+
*/
|
|
24
|
+
externalOrderId?: UseImportSalesOrderProps["externalOrderId"];
|
|
25
|
+
/**
|
|
26
|
+
* A unique ID assigned during the creation of a sales order. It can be used to locate the
|
|
27
|
+
* sales order and any subsequent shipments related to that order.
|
|
28
|
+
*/
|
|
29
|
+
externalOrderNumber?: UseImportSalesOrderProps["externalOrderNumber"];
|
|
30
|
+
/**
|
|
31
|
+
* A unique ID assigned during the creation of a sales order. It can be used to locate the
|
|
32
|
+
* sales order and any subsequent shipments related to that order.
|
|
33
|
+
*/
|
|
34
|
+
externalShipmentId?: string;
|
|
17
35
|
/**
|
|
18
36
|
* `features` is a set of feature flags you would like to enable or disable in this component.
|
|
19
37
|
*/
|
|
@@ -95,6 +113,10 @@ export type PurchaseLabelCommonProps = {
|
|
|
95
113
|
* the formatted address that we return after validation.
|
|
96
114
|
*/
|
|
97
115
|
onToggleAddressPreferenceDisclosure?: ConfigureShipmentProps["onToggleAddressPreferenceDisclosure"];
|
|
116
|
+
/**
|
|
117
|
+
* A unique Id refering the API code used to identify the type of order source, e.g. "amazon_ca"
|
|
118
|
+
*/
|
|
119
|
+
orderSourceCode?: UseImportSalesOrderProps["orderSourceCode"];
|
|
98
120
|
/**
|
|
99
121
|
* `preferredServiceCodes` is an array of service codes you would like to be marked as preferred. The services
|
|
100
122
|
* codes corresponding rate will get the same UI enhancements as the rates received from getPreferredRates.
|
|
@@ -105,6 +127,19 @@ export type PurchaseLabelCommonProps = {
|
|
|
105
127
|
* purchasing a label. e.g. `4x6`
|
|
106
128
|
*/
|
|
107
129
|
printLabelLayout?: ConfigureShipmentProps["printLabelLayout"];
|
|
130
|
+
/**
|
|
131
|
+
* A unique Id used to indentify a ShipEngine Sales Order
|
|
132
|
+
*/
|
|
133
|
+
salesOrderId?: UseImportSalesOrderProps["salesOrderId"];
|
|
134
|
+
/**
|
|
135
|
+
* `shipFromAddresses` is an array of objects that contain the ship from and return to addresses to be used when purchasing a label.
|
|
136
|
+
* This can be used in lieu of a `warehouseId` if initializing the Purchase Label Element without a pre-existing shipment or sales order.
|
|
137
|
+
*/
|
|
138
|
+
shipFromAddresses?: ConfigureShipmentProps["shipFromAddresses"];
|
|
139
|
+
/**
|
|
140
|
+
* A unique Id used to indentify a ShipEngine Shipment
|
|
141
|
+
*/
|
|
142
|
+
shipmentId?: string;
|
|
108
143
|
/**
|
|
109
144
|
* `shippingPresets` is an object that contains configured shipment details/specs
|
|
110
145
|
* (dimensions, shipping service, etc) that can be applied to a shipment when purchasing a label.
|
|
@@ -119,13 +154,9 @@ export type PurchaseLabelCommonProps = {
|
|
|
119
154
|
/**
|
|
120
155
|
* # PurchaseLabel Element Props
|
|
121
156
|
*
|
|
122
|
-
* - The Purchase Label `ElementProps` is a `union` of the `PurchaseLabelByShipmentProps` and
|
|
123
|
-
* `PurchaseLabelSalesOrderProps` prop types. This is for ease of use when purchasing labels by
|
|
124
|
-
* `shipment` or `sales order`.
|
|
125
|
-
*
|
|
126
157
|
* @see {@link PurchaseLabel.Element | This prop types usage in `<PurchaseLabel />`}
|
|
127
158
|
*/
|
|
128
|
-
export type ElementProps =
|
|
159
|
+
export type ElementProps = PurchaseLabelCommonProps;
|
|
129
160
|
/**
|
|
130
161
|
* # Purchase Label Component
|
|
131
162
|
*
|
|
@@ -150,7 +181,7 @@ export type ElementProps = PurchaseLabelByShipmentProps | PurchaseLabelSalesOrde
|
|
|
150
181
|
*
|
|
151
182
|
* @see {@link PurchaseLabel.Element | The **Element** created to render `<PurchaseLabel />`}
|
|
152
183
|
*/
|
|
153
|
-
export declare const Component: ({ features, ...props }: ElementProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
184
|
+
export declare const Component: ({ features, externalOrderId, externalOrderNumber, externalShipmentId, onLoad, onShipmentUpdated, orderSourceCode, salesOrderId, shipFromAddresses, warehouseId, shipmentId, printLabelLayout, currency: currencyProp, ...props }: ElementProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
154
185
|
/**
|
|
155
186
|
* # Registered Purchase Label Element
|
|
156
187
|
*
|
|
@@ -189,7 +220,7 @@ export declare const Component: ({ features, ...props }: ElementProps) => import
|
|
|
189
220
|
*
|
|
190
221
|
* @see {@link ShipmentSummary.Element | The next step in the label purchase workflow `<ShipmentSummary.Element />`}
|
|
191
222
|
*/
|
|
192
|
-
export declare const Element: ({ resources, ...props }:
|
|
223
|
+
export declare const Element: ({ resources, ...props }: PurchaseLabelCommonProps & {
|
|
193
224
|
resources?: {
|
|
194
225
|
en: {
|
|
195
226
|
"wallet-history": {
|
|
@@ -406,6 +437,14 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
|
|
|
406
437
|
location_fee: string;
|
|
407
438
|
oversize: string;
|
|
408
439
|
returns: string;
|
|
440
|
+
/**
|
|
441
|
+
* # Purchase Label Component Props
|
|
442
|
+
*
|
|
443
|
+
* These are the shared props that will be passed into the `<PurchaseLabel.Element />`, and work
|
|
444
|
+
* for either shipment-based or sales order-based label purchasing.
|
|
445
|
+
*
|
|
446
|
+
* @see {@link PurchaseLabel.Element | This prop types usage in `<PurchaseLabel.Element />`}
|
|
447
|
+
*/
|
|
409
448
|
notifications: string;
|
|
410
449
|
tip: string;
|
|
411
450
|
duties_and_taxes: string;
|
|
@@ -475,10 +514,6 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
|
|
|
475
514
|
addShipToAddress: string;
|
|
476
515
|
warehouse: string;
|
|
477
516
|
weight: {
|
|
478
|
-
/**
|
|
479
|
-
* `onBeforeLabelCreate` is an async/sync callback function that will be invoked before every
|
|
480
|
-
* label purchase.
|
|
481
|
-
*/
|
|
482
517
|
whole: string;
|
|
483
518
|
fractional: string;
|
|
484
519
|
};
|
|
@@ -506,7 +541,10 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
|
|
|
506
541
|
uspsMediaMailAcknowledgement: string;
|
|
507
542
|
uspsFirstClassMailAcknowledgement_leof: string;
|
|
508
543
|
rateSavings: string;
|
|
509
|
-
upsGroundSaverTermsAcknowledgement: string;
|
|
544
|
+
upsGroundSaverTermsAcknowledgement: string; /**
|
|
545
|
+
* `onChangeShipmentFormMode` is an async/sync callback function that will be invoked each time
|
|
546
|
+
* the user toggles the `Shipment Form Mode` between `Browse Rates` and `Selected Rate`.
|
|
547
|
+
*/
|
|
510
548
|
dhlExpressTermsAcknowledgement: string;
|
|
511
549
|
noRateService: string;
|
|
512
550
|
};
|
|
@@ -516,18 +554,14 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
|
|
|
516
554
|
b2c: string;
|
|
517
555
|
c2b: string;
|
|
518
556
|
c2c: string;
|
|
519
|
-
b2b: string;
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
557
|
+
b2b: string; /**
|
|
558
|
+
* `onLabelCreateSuccess` is an async/sync callback provided by the client that is invoked if the
|
|
559
|
+
* label is successfully created/purchased.
|
|
560
|
+
*/
|
|
561
|
+
};
|
|
524
562
|
notAtRisk: string;
|
|
525
563
|
notAtRiskShipmentTootip: string;
|
|
526
564
|
};
|
|
527
|
-
/**
|
|
528
|
-
* `onShipmentUpdated` is an async/sync callback function that will be invoked each time a
|
|
529
|
-
* shipment is updated with a new `ShipTo/ShipFrom Address`, `rate`, `preset`, etc.
|
|
530
|
-
*/
|
|
531
565
|
requirements: {
|
|
532
566
|
noWarehouse: string;
|
|
533
567
|
noCarrier: string;
|
|
@@ -561,7 +595,9 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
|
|
|
561
595
|
windsorFramework: string;
|
|
562
596
|
shipment: string;
|
|
563
597
|
rate_one: string;
|
|
564
|
-
rate_other: string;
|
|
598
|
+
rate_other: string; /**
|
|
599
|
+
* A unique Id refering the API code used to identify the type of order source, e.g. "amazon_ca"
|
|
600
|
+
*/
|
|
565
601
|
payment: string;
|
|
566
602
|
};
|
|
567
603
|
};
|
|
@@ -790,6 +826,8 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
|
|
|
790
826
|
status: string;
|
|
791
827
|
trackingStatus: string;
|
|
792
828
|
labelId: string;
|
|
829
|
+
externalOrderId: string;
|
|
830
|
+
externalShipmentId: string;
|
|
793
831
|
};
|
|
794
832
|
empty: {
|
|
795
833
|
title: string;
|
|
@@ -852,14 +890,7 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
|
|
|
852
890
|
deleteCarrierErrorTitle: string;
|
|
853
891
|
deleteCarrierErrorMessage: string;
|
|
854
892
|
loadingDeletingCarrier: string;
|
|
855
|
-
};
|
|
856
|
-
*`getPreferredRates is an async/sync optional callback function that will be invoked each time rates are caculated.
|
|
857
|
-
* This is an optional callback function that returns an array of ShipEngine rates. The rates from this response will
|
|
858
|
-
* be spliced into the normal get rates response the Elements makes internally. If a service code matches a service
|
|
859
|
-
* code on a rate returned from getPreferredRates, the rate returned from getPreferredRates will not be shown in the
|
|
860
|
-
* rate form. These preferred rates will be displayed with a set of UI enhancements that incude a dynamic cost savings
|
|
861
|
-
* flag and green checkmark when the rate is selected.
|
|
862
|
-
*/
|
|
893
|
+
};
|
|
863
894
|
common: {
|
|
864
895
|
actions: {
|
|
865
896
|
add: string;
|
|
@@ -899,6 +930,9 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
|
|
|
899
930
|
subFields: {
|
|
900
931
|
optional: string;
|
|
901
932
|
};
|
|
933
|
+
/**
|
|
934
|
+
* The Currency used through out the label purchase process. Default to USD
|
|
935
|
+
*/
|
|
902
936
|
parserFields: {
|
|
903
937
|
fullAddress: string;
|
|
904
938
|
};
|
|
@@ -947,10 +981,7 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
|
|
|
947
981
|
message: string;
|
|
948
982
|
};
|
|
949
983
|
address: {
|
|
950
|
-
message: string;
|
|
951
|
-
* `onChangeAddress` is an async/sync callback function that will be invoked each time a
|
|
952
|
-
* `Ship To Address` or `Ship From Address` has been updated.
|
|
953
|
-
*/
|
|
984
|
+
message: string;
|
|
954
985
|
title: string;
|
|
955
986
|
};
|
|
956
987
|
};
|
|
@@ -967,10 +998,7 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
|
|
|
967
998
|
addDeclaration: string;
|
|
968
999
|
noResults: string;
|
|
969
1000
|
contents: {
|
|
970
|
-
documents: string;
|
|
971
|
-
* `onLabelCreateFailure` is an async/sync callback function that will be invoked each time a
|
|
972
|
-
* label purchase fails.
|
|
973
|
-
*/
|
|
1001
|
+
documents: string;
|
|
974
1002
|
gift: string;
|
|
975
1003
|
merchandise: string;
|
|
976
1004
|
returnedGoods: string;
|
|
@@ -997,13 +1025,8 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
|
|
|
997
1025
|
description: string;
|
|
998
1026
|
harmonizedTariffCode: string;
|
|
999
1027
|
ifDeliveryFails: string;
|
|
1028
|
+
dutiesTaxes: string;
|
|
1000
1029
|
quantity: string;
|
|
1001
|
-
/**
|
|
1002
|
-
* `onToggleAddressPreferenceDisclosure` is an async/sync callback function that will be invoked
|
|
1003
|
-
* each time the user toggles the `Address Preference` disclosure. This disclosure component
|
|
1004
|
-
* allows the user to select whether they would like to use the address they entered, or
|
|
1005
|
-
* the formatted address that we return after validation.
|
|
1006
|
-
*/
|
|
1007
1030
|
sku: string;
|
|
1008
1031
|
value: string;
|
|
1009
1032
|
valueQuantity: string;
|
|
@@ -1017,6 +1040,23 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
|
|
|
1017
1040
|
returnToSender: string;
|
|
1018
1041
|
treatAsAbandoned: string;
|
|
1019
1042
|
};
|
|
1043
|
+
canadaDeliveredDuty: {
|
|
1044
|
+
senderPrepay: string;
|
|
1045
|
+
recipientPays: string;
|
|
1046
|
+
tooltip: {
|
|
1047
|
+
title: string;
|
|
1048
|
+
/**
|
|
1049
|
+
* `onToggleAddressPreferenceDisclosure` is an async/sync callback function that will be invoked
|
|
1050
|
+
* each time the user toggles the `Address Preference` disclosure. This disclosure component
|
|
1051
|
+
* allows the user to select whether they would like to use the address they entered, or
|
|
1052
|
+
* the formatted address that we return after validation.
|
|
1053
|
+
*/
|
|
1054
|
+
restriction: string;
|
|
1055
|
+
requirement1: string;
|
|
1056
|
+
requirement2: string;
|
|
1057
|
+
requirement3: string;
|
|
1058
|
+
};
|
|
1059
|
+
};
|
|
1020
1060
|
removeAllDeclarations: string;
|
|
1021
1061
|
total: string;
|
|
1022
1062
|
};
|
|
@@ -1209,6 +1249,7 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
|
|
|
1209
1249
|
edit: string;
|
|
1210
1250
|
remove: string;
|
|
1211
1251
|
viewDetails: string;
|
|
1252
|
+
cancelShipment: string;
|
|
1212
1253
|
};
|
|
1213
1254
|
};
|
|
1214
1255
|
ZnVuZGluZ19zb3VyY2VfaWQgbXVzdCBiZSBhbiBpbnRlZ2Vy: string;
|
|
@@ -590,6 +590,8 @@ export declare const Element: ({ resources, ...props }: object & {
|
|
|
590
590
|
status: string;
|
|
591
591
|
trackingStatus: string;
|
|
592
592
|
labelId: string;
|
|
593
|
+
externalOrderId: string;
|
|
594
|
+
externalShipmentId: string;
|
|
593
595
|
};
|
|
594
596
|
empty: {
|
|
595
597
|
title: string;
|
|
@@ -784,6 +786,7 @@ export declare const Element: ({ resources, ...props }: object & {
|
|
|
784
786
|
description: string;
|
|
785
787
|
harmonizedTariffCode: string;
|
|
786
788
|
ifDeliveryFails: string;
|
|
789
|
+
dutiesTaxes: string;
|
|
787
790
|
quantity: string;
|
|
788
791
|
sku: string;
|
|
789
792
|
value: string;
|
|
@@ -798,6 +801,17 @@ export declare const Element: ({ resources, ...props }: object & {
|
|
|
798
801
|
returnToSender: string;
|
|
799
802
|
treatAsAbandoned: string;
|
|
800
803
|
};
|
|
804
|
+
canadaDeliveredDuty: {
|
|
805
|
+
senderPrepay: string;
|
|
806
|
+
recipientPays: string;
|
|
807
|
+
tooltip: {
|
|
808
|
+
title: string;
|
|
809
|
+
restriction: string;
|
|
810
|
+
requirement1: string;
|
|
811
|
+
requirement2: string;
|
|
812
|
+
requirement3: string;
|
|
813
|
+
};
|
|
814
|
+
};
|
|
801
815
|
removeAllDeclarations: string;
|
|
802
816
|
total: string;
|
|
803
817
|
};
|
|
@@ -990,6 +1004,7 @@ export declare const Element: ({ resources, ...props }: object & {
|
|
|
990
1004
|
edit: string;
|
|
991
1005
|
remove: string;
|
|
992
1006
|
viewDetails: string;
|
|
1007
|
+
cancelShipment: string;
|
|
993
1008
|
};
|
|
994
1009
|
};
|
|
995
1010
|
ZnVuZGluZ19zb3VyY2VfaWQgbXVzdCBiZSBhbiBpbnRlZ2Vy: string;
|
|
@@ -688,6 +688,8 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
688
688
|
status: string;
|
|
689
689
|
trackingStatus: string;
|
|
690
690
|
labelId: string;
|
|
691
|
+
externalOrderId: string;
|
|
692
|
+
externalShipmentId: string;
|
|
691
693
|
};
|
|
692
694
|
empty: {
|
|
693
695
|
title: string;
|
|
@@ -702,7 +704,10 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
702
704
|
voided: string;
|
|
703
705
|
error: string;
|
|
704
706
|
completed: string;
|
|
705
|
-
processing: string;
|
|
707
|
+
processing: string; /**
|
|
708
|
+
* `onClickPrintLabel` is a callback function that will be invoked when the user clicks the
|
|
709
|
+
* `Print Label` button.
|
|
710
|
+
*/
|
|
706
711
|
};
|
|
707
712
|
trackingStatus: {
|
|
708
713
|
unknown: string;
|
|
@@ -714,10 +719,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
714
719
|
title: string;
|
|
715
720
|
print: string;
|
|
716
721
|
void: string;
|
|
717
|
-
printForms: string;
|
|
718
|
-
* `onClickPurchaseLabel` is a callback function that will be invoked when the user clicks the
|
|
719
|
-
* `Purchase Label` button.
|
|
720
|
-
*/
|
|
722
|
+
printForms: string;
|
|
721
723
|
};
|
|
722
724
|
errorMessages: {
|
|
723
725
|
title: string;
|
|
@@ -910,7 +912,14 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
910
912
|
description: string;
|
|
911
913
|
harmonizedTariffCode: string;
|
|
912
914
|
ifDeliveryFails: string;
|
|
913
|
-
|
|
915
|
+
dutiesTaxes: string;
|
|
916
|
+
quantity: string; /**
|
|
917
|
+
* # Shipment Summary Element Props
|
|
918
|
+
*
|
|
919
|
+
* - These are the base props that will be passed into the `<ShipmentSummary />` element.
|
|
920
|
+
*
|
|
921
|
+
* @see {@link ShipmentSummary.Element | See the full type that `typeof Element` will return}
|
|
922
|
+
*/
|
|
914
923
|
sku: string;
|
|
915
924
|
value: string;
|
|
916
925
|
valueQuantity: string;
|
|
@@ -924,6 +933,17 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
924
933
|
returnToSender: string;
|
|
925
934
|
treatAsAbandoned: string;
|
|
926
935
|
};
|
|
936
|
+
canadaDeliveredDuty: {
|
|
937
|
+
senderPrepay: string;
|
|
938
|
+
recipientPays: string;
|
|
939
|
+
tooltip: {
|
|
940
|
+
title: string;
|
|
941
|
+
restriction: string;
|
|
942
|
+
requirement1: string;
|
|
943
|
+
requirement2: string;
|
|
944
|
+
requirement3: string;
|
|
945
|
+
};
|
|
946
|
+
};
|
|
927
947
|
removeAllDeclarations: string;
|
|
928
948
|
total: string;
|
|
929
949
|
};
|
|
@@ -1116,6 +1136,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
1116
1136
|
edit: string;
|
|
1117
1137
|
remove: string;
|
|
1118
1138
|
viewDetails: string;
|
|
1139
|
+
cancelShipment: string;
|
|
1119
1140
|
};
|
|
1120
1141
|
};
|
|
1121
1142
|
ZnVuZGluZ19zb3VyY2VfaWQgbXVzdCBiZSBhbiBpbnRlZ2Vy: string;
|
|
@@ -6,6 +6,11 @@ import { SE } from "@shipengine/js-api";
|
|
|
6
6
|
* @see {@link ShipmentsGrid.Element | This prop types usage in `<ShipmentsGrid />`}
|
|
7
7
|
*/
|
|
8
8
|
export type ShipmentsGridProps = {
|
|
9
|
+
/**
|
|
10
|
+
* `onClickCancelShipment` is a callback function that controls the display of `Cancel shipment` option and
|
|
11
|
+
* will be invoked when the user clicks on it.
|
|
12
|
+
*/
|
|
13
|
+
onClickCancelShipment?: (shipment: SE.Shipment) => void;
|
|
9
14
|
/**
|
|
10
15
|
* `onRowClick` callback invoked when a row is clicked.
|
|
11
16
|
*/
|
|
@@ -45,7 +50,7 @@ export type ShipmentsGridProps = {
|
|
|
45
50
|
*
|
|
46
51
|
* @see {@link ShipmentsGrid.Element | The **Element** created to render `<ShipmentsGrid />`}
|
|
47
52
|
*/
|
|
48
|
-
export declare const Component: ({ onRowClick, shipmentStatus, showShipmentIdFilter, showCreatedDateFilter, }: ShipmentsGridProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
53
|
+
export declare const Component: ({ onRowClick, onClickCancelShipment, shipmentStatus, showShipmentIdFilter, showCreatedDateFilter, }: ShipmentsGridProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
49
54
|
/**
|
|
50
55
|
* # Registered Shipments Grid Element
|
|
51
56
|
*
|
|
@@ -177,6 +182,9 @@ export declare const Element: ({ resources, ...props }: ShipmentsGridProps & {
|
|
|
177
182
|
forbidden: string;
|
|
178
183
|
connectionNotSupported: string;
|
|
179
184
|
genericTitle: string;
|
|
185
|
+
/**
|
|
186
|
+
* `onRowClick` callback invoked when a row is clicked.
|
|
187
|
+
*/
|
|
180
188
|
genericText: string;
|
|
181
189
|
};
|
|
182
190
|
};
|
|
@@ -282,11 +290,6 @@ export declare const Element: ({ resources, ...props }: ShipmentsGridProps & {
|
|
|
282
290
|
special_goods: string;
|
|
283
291
|
pickup: string;
|
|
284
292
|
location_fee: string;
|
|
285
|
-
/**
|
|
286
|
-
* # Shipments Grid Props
|
|
287
|
-
*
|
|
288
|
-
* @see {@link ShipmentsGrid.Element | This prop types usage in `<ShipmentsGrid />`}
|
|
289
|
-
*/
|
|
290
293
|
oversize: string;
|
|
291
294
|
returns: string;
|
|
292
295
|
notifications: string;
|
|
@@ -335,6 +338,27 @@ export declare const Element: ({ resources, ...props }: ShipmentsGridProps & {
|
|
|
335
338
|
fields: {
|
|
336
339
|
"requires-additional-handling": string;
|
|
337
340
|
addOns: string;
|
|
341
|
+
/**
|
|
342
|
+
* # Shipments Grid Component
|
|
343
|
+
*
|
|
344
|
+
* - The `<ShipmentsGrid />` component is used to view the user's list of shipments.
|
|
345
|
+
*
|
|
346
|
+
* @param ShipmentsGridProps The base props that will be passed into the `<ShipmentsGrid />` component.
|
|
347
|
+
*
|
|
348
|
+
* @returns Element An EmotionJSX.Element that will render the `<ShipmentsGrid />` component.
|
|
349
|
+
*
|
|
350
|
+
* @example
|
|
351
|
+
* You can see how the `<Component />` is used in the `createElement` function call below.
|
|
352
|
+
* ```tsx
|
|
353
|
+
* export const Element = createElement(Component, ErrorFallback, {
|
|
354
|
+
* resources: { en },
|
|
355
|
+
* });
|
|
356
|
+
* ```
|
|
357
|
+
*
|
|
358
|
+
* <br />
|
|
359
|
+
*
|
|
360
|
+
* @see {@link ShipmentsGrid.Element | The **Element** created to render `<ShipmentsGrid />`}
|
|
361
|
+
*/
|
|
338
362
|
contentDescription: string;
|
|
339
363
|
confirmation: string;
|
|
340
364
|
dimensions: {
|
|
@@ -461,6 +485,11 @@ export declare const Element: ({ resources, ...props }: ShipmentsGridProps & {
|
|
|
461
485
|
};
|
|
462
486
|
warehouse: {
|
|
463
487
|
title: string;
|
|
488
|
+
/**
|
|
489
|
+
* # Shipments Grid Props
|
|
490
|
+
*
|
|
491
|
+
* @see {@link ShipmentsGrid.Element | This prop types usage in `<ShipmentsGrid />`}
|
|
492
|
+
*/
|
|
464
493
|
subtitle: string;
|
|
465
494
|
inlineMessage: string;
|
|
466
495
|
};
|
|
@@ -478,7 +507,9 @@ export declare const Element: ({ resources, ...props }: ShipmentsGridProps & {
|
|
|
478
507
|
termsAndAgreementLinkText: {
|
|
479
508
|
shipEngineToS: string;
|
|
480
509
|
auctanePrivacyPolicy: string;
|
|
481
|
-
aHR0cHM6Ly9teWRobC5leHByZXNzLmRobC91cy9lbi9sZWdhbC90ZXJtcy1hbmQtY29uZGl0aW9ucy5odG1s: string;
|
|
510
|
+
aHR0cHM6Ly9teWRobC5leHByZXNzLmRobC91cy9lbi9sZWdhbC90ZXJtcy1hbmQtY29uZGl0aW9ucy5odG1s: string; /**
|
|
511
|
+
* `showShipmentIdFilter` controls the display of the shipmentId search filter
|
|
512
|
+
*/
|
|
482
513
|
"aHR0cHM6Ly93d3cuc3RhbXBzLmNvbS9wcml2YWN5LXBvbGljeQ==": string;
|
|
483
514
|
"aHR0cHM6Ly93d3cuc3RhbXBzLmNvbS9jb25kaXRpb25zLw==": string;
|
|
484
515
|
"aHR0cHM6Ly93d3cudXBzLmNvbS91cy9lbi9zdXBwb3J0L3NoaXBwaW5nLXN1cHBvcnQvc2hpcHBpbmctc3BlY2lhbC1jYXJlLXJlZ3VsYXRlZC1pdGVtcy9wcm9oaWJpdGVkLWl0ZW1zLnBhZ2U=": string;
|
|
@@ -608,9 +639,6 @@ export declare const Element: ({ resources, ...props }: ShipmentsGridProps & {
|
|
|
608
639
|
metric: string;
|
|
609
640
|
};
|
|
610
641
|
weight: {
|
|
611
|
-
/**
|
|
612
|
-
* `onRowClick` callback invoked when a row is clicked.
|
|
613
|
-
*/
|
|
614
642
|
title: string;
|
|
615
643
|
standard: string;
|
|
616
644
|
g: string;
|
|
@@ -650,9 +678,7 @@ export declare const Element: ({ resources, ...props }: ShipmentsGridProps & {
|
|
|
650
678
|
};
|
|
651
679
|
errorMessages: {
|
|
652
680
|
title: string;
|
|
653
|
-
subtitle: string;
|
|
654
|
-
* `showCreatedDateFilter` controls the display of the Created Date filter
|
|
655
|
-
*/
|
|
681
|
+
subtitle: string;
|
|
656
682
|
};
|
|
657
683
|
};
|
|
658
684
|
"list-labels": {
|
|
@@ -667,6 +693,8 @@ export declare const Element: ({ resources, ...props }: ShipmentsGridProps & {
|
|
|
667
693
|
status: string;
|
|
668
694
|
trackingStatus: string;
|
|
669
695
|
labelId: string;
|
|
696
|
+
externalOrderId: string;
|
|
697
|
+
externalShipmentId: string;
|
|
670
698
|
};
|
|
671
699
|
empty: {
|
|
672
700
|
title: string;
|
|
@@ -678,7 +706,10 @@ export declare const Element: ({ resources, ...props }: ShipmentsGridProps & {
|
|
|
678
706
|
button: string;
|
|
679
707
|
};
|
|
680
708
|
status: {
|
|
681
|
-
voided: string;
|
|
709
|
+
voided: string; /**
|
|
710
|
+
* `onClickCancelShipment` is a callback function that controls the display of `Cancel shipment` option and
|
|
711
|
+
* will be invoked when the user clicks on it.
|
|
712
|
+
*/
|
|
682
713
|
error: string;
|
|
683
714
|
completed: string;
|
|
684
715
|
processing: string;
|
|
@@ -717,11 +748,13 @@ export declare const Element: ({ resources, ...props }: ShipmentsGridProps & {
|
|
|
717
748
|
search: string;
|
|
718
749
|
settingsModal: {
|
|
719
750
|
closeDialog: string;
|
|
720
|
-
header: string;
|
|
721
|
-
* `onRowClick` callback invoked when a row is clicked.
|
|
722
|
-
*/
|
|
751
|
+
header: string;
|
|
723
752
|
};
|
|
724
753
|
status: {
|
|
754
|
+
/**
|
|
755
|
+
* `onClickCancelShipment` is a callback function that controls the display of `Cancel shipment` option and
|
|
756
|
+
* will be invoked when the user clicks on it.
|
|
757
|
+
*/
|
|
725
758
|
connected: string;
|
|
726
759
|
};
|
|
727
760
|
disconnectDropdown: {
|
|
@@ -762,7 +795,10 @@ export declare const Element: ({ resources, ...props }: ShipmentsGridProps & {
|
|
|
762
795
|
addressLine2: string;
|
|
763
796
|
cityLocality: string;
|
|
764
797
|
stateProvince: string;
|
|
765
|
-
postalCode: string;
|
|
798
|
+
postalCode: string; /**
|
|
799
|
+
* `onClickCancelShipment` is a callback function that controls the display of `Cancel shipment` option and
|
|
800
|
+
* will be invoked when the user clicks on it.
|
|
801
|
+
*/
|
|
766
802
|
phone: string;
|
|
767
803
|
email: string;
|
|
768
804
|
addressResidentialIndicator: string;
|
|
@@ -781,7 +817,9 @@ export declare const Element: ({ resources, ...props }: ShipmentsGridProps & {
|
|
|
781
817
|
modified: string;
|
|
782
818
|
title: string;
|
|
783
819
|
originalAddress: string;
|
|
784
|
-
matchedAddress: string;
|
|
820
|
+
matchedAddress: string; /**
|
|
821
|
+
* `showShipmentIdFilter` controls the display of the shipmentId search filter
|
|
822
|
+
*/
|
|
785
823
|
unableToValidate: string;
|
|
786
824
|
use: {
|
|
787
825
|
originalAddress: string;
|
|
@@ -789,7 +827,27 @@ export declare const Element: ({ resources, ...props }: ShipmentsGridProps & {
|
|
|
789
827
|
};
|
|
790
828
|
};
|
|
791
829
|
validation: {
|
|
792
|
-
notValidated: string;
|
|
830
|
+
notValidated: string; /**
|
|
831
|
+
* # Shipments Grid Component
|
|
832
|
+
*
|
|
833
|
+
* - The `<ShipmentsGrid />` component is used to view the user's list of shipments.
|
|
834
|
+
*
|
|
835
|
+
* @param ShipmentsGridProps The base props that will be passed into the `<ShipmentsGrid />` component.
|
|
836
|
+
*
|
|
837
|
+
* @returns Element An EmotionJSX.Element that will render the `<ShipmentsGrid />` component.
|
|
838
|
+
*
|
|
839
|
+
* @example
|
|
840
|
+
* You can see how the `<Component />` is used in the `createElement` function call below.
|
|
841
|
+
* ```tsx
|
|
842
|
+
* export const Element = createElement(Component, ErrorFallback, {
|
|
843
|
+
* resources: { en },
|
|
844
|
+
* });
|
|
845
|
+
* ```
|
|
846
|
+
*
|
|
847
|
+
* <br />
|
|
848
|
+
*
|
|
849
|
+
* @see {@link ShipmentsGrid.Element | The **Element** created to render `<ShipmentsGrid />`}
|
|
850
|
+
*/
|
|
793
851
|
validated: string;
|
|
794
852
|
};
|
|
795
853
|
};
|
|
@@ -863,6 +921,7 @@ export declare const Element: ({ resources, ...props }: ShipmentsGridProps & {
|
|
|
863
921
|
description: string;
|
|
864
922
|
harmonizedTariffCode: string;
|
|
865
923
|
ifDeliveryFails: string;
|
|
924
|
+
dutiesTaxes: string;
|
|
866
925
|
quantity: string;
|
|
867
926
|
sku: string;
|
|
868
927
|
value: string;
|
|
@@ -877,6 +936,17 @@ export declare const Element: ({ resources, ...props }: ShipmentsGridProps & {
|
|
|
877
936
|
returnToSender: string;
|
|
878
937
|
treatAsAbandoned: string;
|
|
879
938
|
};
|
|
939
|
+
canadaDeliveredDuty: {
|
|
940
|
+
senderPrepay: string;
|
|
941
|
+
recipientPays: string;
|
|
942
|
+
tooltip: {
|
|
943
|
+
title: string;
|
|
944
|
+
restriction: string;
|
|
945
|
+
requirement1: string;
|
|
946
|
+
requirement2: string;
|
|
947
|
+
requirement3: string;
|
|
948
|
+
};
|
|
949
|
+
};
|
|
880
950
|
removeAllDeclarations: string;
|
|
881
951
|
total: string;
|
|
882
952
|
};
|
|
@@ -1069,6 +1139,7 @@ export declare const Element: ({ resources, ...props }: ShipmentsGridProps & {
|
|
|
1069
1139
|
edit: string;
|
|
1070
1140
|
remove: string;
|
|
1071
1141
|
viewDetails: string;
|
|
1142
|
+
cancelShipment: string;
|
|
1072
1143
|
};
|
|
1073
1144
|
};
|
|
1074
1145
|
ZnVuZGluZ19zb3VyY2VfaWQgbXVzdCBiZSBhbiBpbnRlZ2Vy: string;
|
|
@@ -603,6 +603,8 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
603
603
|
status: string;
|
|
604
604
|
trackingStatus: string;
|
|
605
605
|
labelId: string;
|
|
606
|
+
externalOrderId: string;
|
|
607
|
+
externalShipmentId: string;
|
|
606
608
|
};
|
|
607
609
|
empty: {
|
|
608
610
|
title: string;
|
|
@@ -797,6 +799,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
797
799
|
description: string;
|
|
798
800
|
harmonizedTariffCode: string;
|
|
799
801
|
ifDeliveryFails: string;
|
|
802
|
+
dutiesTaxes: string;
|
|
800
803
|
quantity: string;
|
|
801
804
|
sku: string;
|
|
802
805
|
value: string;
|
|
@@ -811,6 +814,17 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
811
814
|
returnToSender: string;
|
|
812
815
|
treatAsAbandoned: string;
|
|
813
816
|
};
|
|
817
|
+
canadaDeliveredDuty: {
|
|
818
|
+
senderPrepay: string;
|
|
819
|
+
recipientPays: string;
|
|
820
|
+
tooltip: {
|
|
821
|
+
title: string;
|
|
822
|
+
restriction: string;
|
|
823
|
+
requirement1: string;
|
|
824
|
+
requirement2: string;
|
|
825
|
+
requirement3: string;
|
|
826
|
+
};
|
|
827
|
+
};
|
|
814
828
|
removeAllDeclarations: string;
|
|
815
829
|
total: string;
|
|
816
830
|
};
|
|
@@ -1003,6 +1017,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
1003
1017
|
edit: string;
|
|
1004
1018
|
remove: string;
|
|
1005
1019
|
viewDetails: string;
|
|
1020
|
+
cancelShipment: string;
|
|
1006
1021
|
};
|
|
1007
1022
|
};
|
|
1008
1023
|
ZnVuZGluZ19zb3VyY2VfaWQgbXVzdCBiZSBhbiBpbnRlZ2Vy: string;
|