@shipengine/elements 2.21.0 → 2.23.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/cjs/components/grid-controller/grid-controller.cjs +49 -17
- package/cjs/components/grid-controller/grid-controller.styles.cjs +7 -2
- package/cjs/components/grid-controller/grid-footer.cjs +30 -15
- package/cjs/components/grid-controller/grid-footer.styles.cjs +24 -0
- package/cjs/components/grid-controller/index.cjs +1 -1
- package/cjs/components/grid-controller/sortable-header/index.cjs +9 -0
- package/cjs/components/grid-controller/{sortable-header.cjs → sortable-header/sortable-header.cjs} +3 -5
- package/cjs/components/grid-controller/sortable-header/sortable-header.styles.cjs +18 -0
- package/cjs/components/grid-filters/components/created-date-filter/created-date-filter.cjs +3 -0
- package/cjs/components/grid-filters/components/index.cjs +2 -0
- package/cjs/components/grid-filters/components/label-id-filter/label-id-filter.cjs +2 -0
- package/cjs/components/grid-filters/components/label-status-filter/index.cjs +9 -0
- package/cjs/components/grid-filters/components/label-status-filter/label-status-filter-schema.cjs +12 -0
- package/cjs/components/grid-filters/components/label-status-filter/label-status-filter.cjs +174 -0
- package/cjs/components/grid-filters/components/label-status-filter/label-status-filter.styles.cjs +21 -0
- package/cjs/components/grid-filters/components/shipment-id-filter/shipment-id-filter.cjs +2 -0
- package/cjs/components/grid-filters/components/tracking-status-filter/tracking-status-filter.cjs +23 -12
- package/cjs/components/grid-filters/grid-filters.cjs +12 -1
- package/cjs/elements/labels-grid/hooks/use-labels-grid.cjs +78 -31
- package/cjs/elements/labels-grid/hooks/use-tracking-status-filter.cjs +109 -0
- package/cjs/elements/labels-grid/labels-grid.cjs +56 -30
- package/cjs/elements/purchase-label/components/customs-forms/customs-forms.cjs +10 -3
- package/cjs/elements/purchase-label/components/fund-and-purchase/fund-and-purchase.cjs +22 -14
- package/cjs/elements/purchase-label/components/rate-form/rate-form.cjs +1 -1
- package/cjs/elements/purchase-label/components/rate-form/rate-view.cjs +4 -9
- package/cjs/elements/purchase-label/components/shipment-form/shipment-form.cjs +11 -5
- package/cjs/elements/purchase-label/configure-shipment.cjs +3 -1
- package/cjs/elements/purchase-label/hooks/use-rates-form.cjs +38 -16
- package/cjs/elements/purchase-label/purchase-label.cjs +0 -1
- package/cjs/elements/shipments-grid/hooks/use-shipments-grid.cjs +11 -6
- package/cjs/elements/shipments-grid/shipments-grid.cjs +67 -28
- package/cjs/hooks/index.cjs +3 -0
- package/cjs/hooks/use-configure-shipment.cjs +1 -34
- package/cjs/hooks/use-sortable-query.cjs +36 -0
- package/cjs/index.cjs +5 -0
- package/cjs/locales/en/common.cjs +3 -1
- package/cjs/locales/en/purchase-label.cjs +2 -1
- package/cjs/package.cjs +1 -1
- package/cjs/utilities/feature-flags/feature-flags.cjs +1 -1
- package/cjs/workflows/label-workflow/label-workflow.cjs +0 -1
- package/esm/components/grid-controller/grid-controller.js +51 -19
- package/esm/components/grid-controller/grid-controller.styles.js +7 -2
- package/esm/components/grid-controller/grid-footer.js +32 -17
- package/esm/components/grid-controller/grid-footer.styles.js +20 -0
- package/esm/components/grid-controller/index.js +1 -1
- package/esm/components/grid-controller/sortable-header/index.js +1 -0
- package/esm/components/grid-controller/{sortable-header.js → sortable-header/sortable-header.js} +3 -5
- package/esm/components/grid-controller/sortable-header/sortable-header.styles.js +14 -0
- package/esm/components/grid-filters/components/created-date-filter/created-date-filter.js +3 -0
- package/esm/components/grid-filters/components/index.js +1 -0
- package/esm/components/grid-filters/components/label-id-filter/label-id-filter.js +2 -0
- package/esm/components/grid-filters/components/label-status-filter/index.js +1 -0
- package/esm/components/grid-filters/components/label-status-filter/label-status-filter-schema.js +8 -0
- package/esm/components/grid-filters/components/label-status-filter/label-status-filter.js +170 -0
- package/esm/components/grid-filters/components/label-status-filter/label-status-filter.styles.js +17 -0
- package/esm/components/grid-filters/components/shipment-id-filter/shipment-id-filter.js +2 -0
- package/esm/components/grid-filters/components/tracking-status-filter/tracking-status-filter.js +23 -12
- package/esm/components/grid-filters/grid-filters.js +12 -1
- package/esm/elements/labels-grid/hooks/use-labels-grid.js +79 -32
- package/esm/elements/labels-grid/hooks/use-tracking-status-filter.js +105 -0
- package/esm/elements/labels-grid/labels-grid.js +57 -31
- package/esm/elements/purchase-label/components/customs-forms/customs-forms.js +10 -3
- package/esm/elements/purchase-label/components/fund-and-purchase/fund-and-purchase.js +22 -14
- package/esm/elements/purchase-label/components/rate-form/rate-form.js +1 -1
- package/esm/elements/purchase-label/components/rate-form/rate-view.js +4 -9
- package/esm/elements/purchase-label/components/shipment-form/shipment-form.js +11 -5
- package/esm/elements/purchase-label/configure-shipment.js +3 -1
- package/esm/elements/purchase-label/hooks/use-rates-form.js +38 -16
- package/esm/elements/purchase-label/purchase-label.js +0 -1
- package/esm/elements/shipments-grid/hooks/use-shipments-grid.js +11 -6
- package/esm/elements/shipments-grid/shipments-grid.js +68 -29
- package/esm/hooks/index.js +1 -0
- package/esm/hooks/use-configure-shipment.js +3 -36
- package/esm/hooks/use-sortable-query.js +32 -0
- package/esm/index.js +2 -0
- package/esm/locales/en/common.js +3 -1
- package/esm/locales/en/purchase-label.js +2 -1
- package/esm/package.js +1 -1
- package/esm/utilities/feature-flags/feature-flags.js +1 -1
- package/esm/workflows/label-workflow/label-workflow.js +0 -1
- package/package.json +15 -4
- package/types/src/components/grid-controller/grid-controller.d.ts +4 -1
- package/types/src/components/grid-controller/grid-controller.styles.d.ts +6 -1
- package/types/src/components/grid-controller/grid-footer.d.ts +9 -1
- package/types/src/components/grid-controller/grid-footer.styles.d.ts +16 -0
- package/types/src/components/grid-controller/sortable-header/index.d.ts +1 -0
- package/types/src/components/grid-controller/{sortable-header.d.ts → sortable-header/sortable-header.d.ts} +2 -2
- package/types/src/components/grid-controller/sortable-header/sortable-header.styles.d.ts +10 -0
- package/types/src/components/grid-filters/components/created-date-filter/created-date-filter.d.ts +2 -1
- package/types/src/components/grid-filters/components/index.d.ts +1 -0
- package/types/src/components/grid-filters/components/label-id-filter/label-id-filter.d.ts +2 -1
- package/types/src/components/grid-filters/components/label-status-filter/index.d.ts +1 -0
- package/types/src/components/grid-filters/components/label-status-filter/label-status-filter-schema.d.ts +12 -0
- package/types/src/components/grid-filters/components/label-status-filter/label-status-filter.d.ts +24 -0
- package/types/src/components/grid-filters/components/label-status-filter/label-status-filter.styles.d.ts +13 -0
- package/types/src/components/grid-filters/components/shipment-id-filter/shipment-id-filter.d.ts +2 -1
- package/types/src/components/grid-filters/components/tracking-status-filter/tracking-status-filter.d.ts +2 -1
- package/types/src/components/grid-filters/grid-filters.d.ts +4 -1
- package/types/src/elements/labels-grid/hooks/use-labels-grid.d.ts +5 -3
- package/types/src/elements/labels-grid/hooks/use-tracking-status-filter.d.ts +25 -0
- package/types/src/elements/labels-grid/labels-grid.d.ts +34 -20
- package/types/src/elements/manage-carriers/manage-carriers.d.ts +3 -0
- package/types/src/elements/manage-external-carriers/manage-external-carriers.d.ts +3 -0
- package/types/src/elements/manage-funding/manage-funding-element.d.ts +3 -0
- package/types/src/elements/manage-warehouses/manage-warehouses.d.ts +3 -0
- package/types/src/elements/payment-method-settings/payment-method-settings-element.d.ts +3 -0
- package/types/src/elements/purchase-label/components/fund-and-purchase/fund-and-purchase.d.ts +2 -2
- package/types/src/elements/purchase-label/hooks/use-rates-form.d.ts +1 -0
- package/types/src/elements/purchase-label/purchase-label.d.ts +12 -9
- package/types/src/elements/select-label-layout/select-label-layout-element.d.ts +3 -0
- package/types/src/elements/shipment-summary/shipment-summary.d.ts +3 -0
- package/types/src/elements/shipments-grid/hooks/use-shipments-grid.d.ts +13 -2
- package/types/src/elements/shipments-grid/shipments-grid.d.ts +41 -6
- package/types/src/elements/theme-creator/theme-creator.d.ts +3 -0
- package/types/src/elements/transaction-history/transaction-history-element.d.ts +3 -0
- package/types/src/elements/unit-settings/unit-settings-element.d.ts +3 -0
- package/types/src/elements/vat-settings/vat-settings-element.d.ts +3 -0
- package/types/src/elements/void-label/void-label.d.ts +34 -0
- package/types/src/hooks/index.d.ts +1 -0
- package/types/src/hooks/use-configure-shipment.d.ts +1 -2
- package/types/src/hooks/use-sortable-query.d.ts +13 -0
- package/types/src/index.d.ts +5 -0
- package/types/src/locales/en/index.d.ts +3 -0
- package/types/src/utilities/feature-flags/types.d.ts +5 -1
- package/types/src/workflows/account-settings/account-settings.d.ts +3 -0
- package/types/src/workflows/carrier-services/carrier-services.d.ts +3 -0
- package/types/src/workflows/connect-external-carrier/connect-external-carrier.d.ts +3 -0
- package/types/src/workflows/label-workflow/label-workflow.d.ts +11 -1
- package/types/src/workflows/onboarding/onboarding.d.ts +3 -0
|
@@ -273,6 +273,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & import(
|
|
|
273
273
|
results: string;
|
|
274
274
|
};
|
|
275
275
|
fields: {
|
|
276
|
+
"requires-additional-handling-link": string;
|
|
276
277
|
"requires-additional-handling": string;
|
|
277
278
|
addOns: string;
|
|
278
279
|
contentDescription: string;
|
|
@@ -905,11 +906,13 @@ export declare const Element: ({ resources, ...props }: ComponentProps & import(
|
|
|
905
906
|
grid: {
|
|
906
907
|
"row-count_one": string;
|
|
907
908
|
"row-count_other": string;
|
|
909
|
+
"row-count-plus_other": string;
|
|
908
910
|
rows: string;
|
|
909
911
|
clearAll: string;
|
|
910
912
|
shipmentId: string;
|
|
911
913
|
labelId: string;
|
|
912
914
|
labelIdFilter: string;
|
|
915
|
+
filteredStatus: string;
|
|
913
916
|
filteredTrackingStatus: string;
|
|
914
917
|
more: string;
|
|
915
918
|
createdDate: string;
|
|
@@ -289,6 +289,7 @@ export declare const Element: ({ resources, ...props }: import("../../create-ele
|
|
|
289
289
|
results: string;
|
|
290
290
|
};
|
|
291
291
|
fields: {
|
|
292
|
+
"requires-additional-handling-link": string;
|
|
292
293
|
"requires-additional-handling": string;
|
|
293
294
|
addOns: string;
|
|
294
295
|
contentDescription: string;
|
|
@@ -939,11 +940,13 @@ export declare const Element: ({ resources, ...props }: import("../../create-ele
|
|
|
939
940
|
grid: {
|
|
940
941
|
"row-count_one": string;
|
|
941
942
|
"row-count_other": string;
|
|
943
|
+
"row-count-plus_other": string;
|
|
942
944
|
rows: string;
|
|
943
945
|
clearAll: string;
|
|
944
946
|
shipmentId: string;
|
|
945
947
|
labelId: string;
|
|
946
948
|
labelIdFilter: string;
|
|
949
|
+
filteredStatus: string;
|
|
947
950
|
filteredTrackingStatus: string;
|
|
948
951
|
more: string;
|
|
949
952
|
createdDate: string;
|
|
@@ -272,6 +272,7 @@ export declare const Element: ({ resources, ...props }: PaymentMethodSettingsPro
|
|
|
272
272
|
results: string;
|
|
273
273
|
};
|
|
274
274
|
fields: {
|
|
275
|
+
"requires-additional-handling-link": string;
|
|
275
276
|
"requires-additional-handling": string;
|
|
276
277
|
addOns: string;
|
|
277
278
|
contentDescription: string;
|
|
@@ -904,11 +905,13 @@ export declare const Element: ({ resources, ...props }: PaymentMethodSettingsPro
|
|
|
904
905
|
grid: {
|
|
905
906
|
"row-count_one": string;
|
|
906
907
|
"row-count_other": string;
|
|
908
|
+
"row-count-plus_other": string;
|
|
907
909
|
rows: string;
|
|
908
910
|
clearAll: string;
|
|
909
911
|
shipmentId: string;
|
|
910
912
|
labelId: string;
|
|
911
913
|
labelIdFilter: string;
|
|
914
|
+
filteredStatus: string;
|
|
912
915
|
filteredTrackingStatus: string;
|
|
913
916
|
more: string;
|
|
914
917
|
createdDate: string;
|
package/types/src/elements/purchase-label/components/fund-and-purchase/fund-and-purchase.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export type FundAndPurchaseProps = {
|
|
|
16
16
|
isFundingEnabled?: boolean;
|
|
17
17
|
isInvalidatedByError?: boolean;
|
|
18
18
|
onPurchase: () => void;
|
|
19
|
-
onSave
|
|
19
|
+
onSave?: () => Promise<void>;
|
|
20
20
|
onVatRegistrationComplete?: () => void;
|
|
21
21
|
rateData?: {
|
|
22
22
|
isPreferredRate?: boolean;
|
|
@@ -35,4 +35,4 @@ export type FundAndPurchaseProps = {
|
|
|
35
35
|
*
|
|
36
36
|
* @see {@link FundAndPurchaseProps | The props that are passed into the `<FundAndPurchase />` component}
|
|
37
37
|
*/
|
|
38
|
-
export declare const FundAndPurchase: ({ control, currency, disabled, isFundingEnabled,
|
|
38
|
+
export declare const FundAndPurchase: ({ control, currency, disabled, isFundingEnabled, isInvalidatedByError, onPurchase, onSave, onVatRegistrationComplete, rateData, showVatSettings, }: FundAndPurchaseProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -8,6 +8,7 @@ export type UseRatesFormProps = {
|
|
|
8
8
|
onBeforeLabelCreate?: (rate: SE.Rate, shipment: SE.SalesOrderShipment) => Promise<void> | Promise<{
|
|
9
9
|
error?: SE.CodedError;
|
|
10
10
|
rate?: SE.Rate;
|
|
11
|
+
labelMessages?: SE.SalesOrderShipment["packages"][0]["labelMessages"];
|
|
11
12
|
} | undefined> | void;
|
|
12
13
|
onBeforeRateSaved?: (carrierId: string, serviceCode: string) => Promise<void> | Promise<{
|
|
13
14
|
data?: {
|
|
@@ -517,6 +517,7 @@ export declare const Element: ({ resources, ...props }: PurchaseLabelCommonProps
|
|
|
517
517
|
results: string;
|
|
518
518
|
};
|
|
519
519
|
fields: {
|
|
520
|
+
"requires-additional-handling-link": string;
|
|
520
521
|
"requires-additional-handling": string;
|
|
521
522
|
addOns: string;
|
|
522
523
|
contentDescription: string;
|
|
@@ -570,6 +571,10 @@ export declare const Element: ({ resources, ...props }: PurchaseLabelCommonProps
|
|
|
570
571
|
uspsMediaMailAcknowledgement: string;
|
|
571
572
|
uspsFirstClassMailAcknowledgement_leof: string;
|
|
572
573
|
rateSavings: string;
|
|
574
|
+
/**
|
|
575
|
+
* `onBeforeRateSave` is an async/sync callback function that will be invoked before each time a user
|
|
576
|
+
* saves a rate.
|
|
577
|
+
*/
|
|
573
578
|
upsGroundSaverTermsAcknowledgement: string;
|
|
574
579
|
dhlExpressTermsAcknowledgement: string;
|
|
575
580
|
noRateService: string;
|
|
@@ -600,23 +605,19 @@ export declare const Element: ({ resources, ...props }: PurchaseLabelCommonProps
|
|
|
600
605
|
moreLocations: string;
|
|
601
606
|
nearestLocation: string;
|
|
602
607
|
open: string;
|
|
603
|
-
nextOpeningDay: string;
|
|
604
|
-
* `onRateSaved` is an async/sync callback function that will be invoked each time a rate is
|
|
605
|
-
* saved by the user when rate shopping in the host application.
|
|
606
|
-
*/
|
|
608
|
+
nextOpeningDay: string;
|
|
607
609
|
until: string;
|
|
608
610
|
selected: string;
|
|
609
611
|
select: string;
|
|
610
612
|
today: string;
|
|
611
|
-
viewMap: string;
|
|
613
|
+
viewMap: string; /**
|
|
614
|
+
* `onRatesCalculated` is an async/sync callback function that will be invoked each time rates
|
|
615
|
+
* are calculated for a given shipment.
|
|
616
|
+
*/
|
|
612
617
|
otherLocations: string;
|
|
613
618
|
noServicePointsForService: string;
|
|
614
619
|
error: string;
|
|
615
620
|
paperless: string;
|
|
616
|
-
/**
|
|
617
|
-
* `onShipmentUpdated` is an async/sync callback function that will be invoked each time a
|
|
618
|
-
* shipment is updated with a new `ShipTo/ShipFrom Address`, `rate`, `preset`, etc.
|
|
619
|
-
*/
|
|
620
621
|
localTimeDisclaimer: string;
|
|
621
622
|
};
|
|
622
623
|
shipToAddressFormFields: string;
|
|
@@ -1163,11 +1164,13 @@ export declare const Element: ({ resources, ...props }: PurchaseLabelCommonProps
|
|
|
1163
1164
|
grid: {
|
|
1164
1165
|
"row-count_one": string;
|
|
1165
1166
|
"row-count_other": string;
|
|
1167
|
+
"row-count-plus_other": string;
|
|
1166
1168
|
rows: string;
|
|
1167
1169
|
clearAll: string;
|
|
1168
1170
|
shipmentId: string;
|
|
1169
1171
|
labelId: string;
|
|
1170
1172
|
labelIdFilter: string;
|
|
1173
|
+
filteredStatus: string;
|
|
1171
1174
|
filteredTrackingStatus: string;
|
|
1172
1175
|
more: string;
|
|
1173
1176
|
createdDate: string;
|
|
@@ -271,6 +271,7 @@ export declare const Element: ({ resources, ...props }: import("../../create-ele
|
|
|
271
271
|
results: string;
|
|
272
272
|
};
|
|
273
273
|
fields: {
|
|
274
|
+
"requires-additional-handling-link": string;
|
|
274
275
|
"requires-additional-handling": string;
|
|
275
276
|
addOns: string;
|
|
276
277
|
contentDescription: string;
|
|
@@ -903,11 +904,13 @@ export declare const Element: ({ resources, ...props }: import("../../create-ele
|
|
|
903
904
|
grid: {
|
|
904
905
|
"row-count_one": string;
|
|
905
906
|
"row-count_other": string;
|
|
907
|
+
"row-count-plus_other": string;
|
|
906
908
|
rows: string;
|
|
907
909
|
clearAll: string;
|
|
908
910
|
shipmentId: string;
|
|
909
911
|
labelId: string;
|
|
910
912
|
labelIdFilter: string;
|
|
913
|
+
filteredStatus: string;
|
|
911
914
|
filteredTrackingStatus: string;
|
|
912
915
|
more: string;
|
|
913
916
|
createdDate: string;
|
|
@@ -364,6 +364,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & import(
|
|
|
364
364
|
results: string;
|
|
365
365
|
};
|
|
366
366
|
fields: {
|
|
367
|
+
"requires-additional-handling-link": string;
|
|
367
368
|
"requires-additional-handling": string;
|
|
368
369
|
addOns: string;
|
|
369
370
|
contentDescription: string;
|
|
@@ -1032,11 +1033,13 @@ export declare const Element: ({ resources, ...props }: ComponentProps & import(
|
|
|
1032
1033
|
grid: {
|
|
1033
1034
|
"row-count_one": string;
|
|
1034
1035
|
"row-count_other": string;
|
|
1036
|
+
"row-count-plus_other": string;
|
|
1035
1037
|
rows: string;
|
|
1036
1038
|
clearAll: string;
|
|
1037
1039
|
shipmentId: string;
|
|
1038
1040
|
labelId: string;
|
|
1039
1041
|
labelIdFilter: string;
|
|
1042
|
+
filteredStatus: string;
|
|
1040
1043
|
filteredTrackingStatus: string;
|
|
1041
1044
|
more: string;
|
|
1042
1045
|
createdDate: string;
|
|
@@ -1,11 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { IGridFilters } from "../../../components/grid-filters";
|
|
2
3
|
import { SE } from "@shipengine/js-api";
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
type ShipmentsGridHookProps = {
|
|
5
|
+
shipmentStatus?: SE.ShipmentStatus;
|
|
6
|
+
showCreatedDateFilter?: boolean;
|
|
7
|
+
showShipmentIdFilter?: boolean;
|
|
8
|
+
sortBy?: SE.SortableQuery["sortBy"];
|
|
9
|
+
sortDir?: SE.SortableQuery["sortDir"];
|
|
10
|
+
};
|
|
11
|
+
export declare const useShipmentsGrid: ({ shipmentStatus, showShipmentIdFilter, showCreatedDateFilter, sortBy, sortDir, }: ShipmentsGridHookProps) => {
|
|
5
12
|
clearAllFilters: () => void;
|
|
6
13
|
filters: IGridFilters;
|
|
7
14
|
getGridData: () => {
|
|
8
15
|
disableOnRowClick: boolean;
|
|
16
|
+
isLoading: boolean;
|
|
9
17
|
serviceName: string | null | undefined;
|
|
10
18
|
addressValidation?: SE.AddressValidation | undefined;
|
|
11
19
|
advancedOptions?: {
|
|
@@ -103,9 +111,11 @@ export declare const useShipmentsGrid: ({ shipmentStatus, showShipmentIdFilter,
|
|
|
103
111
|
showPagination: boolean;
|
|
104
112
|
totalElements: number;
|
|
105
113
|
};
|
|
114
|
+
setActiveShipmentId: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
|
|
106
115
|
setFilters: (newFilters: IGridFilters) => void;
|
|
107
116
|
shipments: {
|
|
108
117
|
disableOnRowClick: boolean;
|
|
118
|
+
isLoading: boolean;
|
|
109
119
|
serviceName: string | null | undefined;
|
|
110
120
|
addressValidation?: SE.AddressValidation | undefined;
|
|
111
121
|
advancedOptions?: {
|
|
@@ -188,3 +198,4 @@ export declare const useShipmentsGrid: ({ shipmentStatus, showShipmentIdFilter,
|
|
|
188
198
|
}[] | undefined;
|
|
189
199
|
shouldShowFilters: boolean;
|
|
190
200
|
};
|
|
201
|
+
export {};
|
|
@@ -12,9 +12,11 @@ export type ShipmentsGridProps = {
|
|
|
12
12
|
*/
|
|
13
13
|
onClickCancelShipment?: (shipment: SE.Shipment) => void;
|
|
14
14
|
/**
|
|
15
|
-
* `onRowClick` callback invoked when a row is clicked.
|
|
15
|
+
* `onRowClick` callback invoked when a row is clicked. You can pass a Promise, when you do the selected Shipment
|
|
16
|
+
* will be marked as "active", and we’ll wait for the Promise to resolve before removing that "active" state.
|
|
17
|
+
* An "active" Shipment is displayed in a "loading" state within the table.
|
|
16
18
|
*/
|
|
17
|
-
onRowClick?: (data: SE.Shipment) => void
|
|
19
|
+
onRowClick?: (data: SE.Shipment) => void | Promise<void>;
|
|
18
20
|
/**
|
|
19
21
|
* `shipmentStatus` is the status of the shipments you wish to view.
|
|
20
22
|
* If no value is defined, all shipments will be rendered.
|
|
@@ -50,7 +52,7 @@ export type ShipmentsGridProps = {
|
|
|
50
52
|
*
|
|
51
53
|
* @see {@link ShipmentsGrid.Element | The **Element** created to render `<ShipmentsGrid />`}
|
|
52
54
|
*/
|
|
53
|
-
export declare const Component: ({ onRowClick, onClickCancelShipment, shipmentStatus, showShipmentIdFilter, showCreatedDateFilter, }: ShipmentsGridProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
55
|
+
export declare const Component: ({ onRowClick: onRowClickProp, onClickCancelShipment, shipmentStatus, showShipmentIdFilter, showCreatedDateFilter, }: ShipmentsGridProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
54
56
|
/**
|
|
55
57
|
* # Registered Shipments Grid Element
|
|
56
58
|
*
|
|
@@ -187,6 +189,11 @@ export declare const Element: ({ resources, ...props }: ShipmentsGridProps & imp
|
|
|
187
189
|
invalidFieldValue: string;
|
|
188
190
|
verificationFailure: string;
|
|
189
191
|
forbidden: string;
|
|
192
|
+
/**
|
|
193
|
+
* # Shipments Grid Props
|
|
194
|
+
*
|
|
195
|
+
* @see {@link ShipmentsGrid.Element | This prop types usage in `<ShipmentsGrid />`}
|
|
196
|
+
*/
|
|
190
197
|
connectionNotSupported: string;
|
|
191
198
|
genericText: string;
|
|
192
199
|
};
|
|
@@ -343,6 +350,7 @@ export declare const Element: ({ resources, ...props }: ShipmentsGridProps & imp
|
|
|
343
350
|
results: string;
|
|
344
351
|
};
|
|
345
352
|
fields: {
|
|
353
|
+
"requires-additional-handling-link": string;
|
|
346
354
|
"requires-additional-handling": string;
|
|
347
355
|
addOns: string;
|
|
348
356
|
contentDescription: string;
|
|
@@ -499,7 +507,9 @@ export declare const Element: ({ resources, ...props }: ShipmentsGridProps & imp
|
|
|
499
507
|
shipEngineToS: string;
|
|
500
508
|
auctanePrivacyPolicy: string;
|
|
501
509
|
aHR0cHM6Ly9teWRobC5leHByZXNzLmRobC91cy9lbi9sZWdhbC90ZXJtcy1hbmQtY29uZGl0aW9ucy5odG1s: string;
|
|
502
|
-
"aHR0cHM6Ly93d3cuc3RhbXBzLmNvbS9wcml2YWN5LXBvbGljeQ==": string;
|
|
510
|
+
"aHR0cHM6Ly93d3cuc3RhbXBzLmNvbS9wcml2YWN5LXBvbGljeQ==": string; /**
|
|
511
|
+
* `showCreatedDateFilter` controls the display of the Created Date filter
|
|
512
|
+
*/
|
|
503
513
|
"aHR0cHM6Ly93d3cuc3RhbXBzLmNvbS9jb25kaXRpb25zLw==": string;
|
|
504
514
|
"aHR0cHM6Ly93d3cudXBzLmNvbS91cy9lbi9zdXBwb3J0L3NoaXBwaW5nLXN1cHBvcnQvc2hpcHBpbmctc3BlY2lhbC1jYXJlLXJlZ3VsYXRlZC1pdGVtcy9wcm9oaWJpdGVkLWl0ZW1zLnBhZ2U=": string;
|
|
505
515
|
aHR0cHM6Ly93d3cudXBzLmNvbS9hc3NldHMvcmVzb3VyY2VzL21lZGlhL2VuX1VTL1VQU19EQVBfVEMucGRm: string;
|
|
@@ -804,7 +814,10 @@ export declare const Element: ({ resources, ...props }: ShipmentsGridProps & imp
|
|
|
804
814
|
parserFields: {
|
|
805
815
|
fullAddress: string;
|
|
806
816
|
};
|
|
807
|
-
paste: string;
|
|
817
|
+
paste: string; /**
|
|
818
|
+
* `onClickCancelShipment` is a callback function that controls the display of `Cancel shipment` option and
|
|
819
|
+
* will be invoked when the user clicks on it.
|
|
820
|
+
*/
|
|
808
821
|
preference: {
|
|
809
822
|
confirm: string;
|
|
810
823
|
addressNotValidated: string;
|
|
@@ -975,11 +988,13 @@ export declare const Element: ({ resources, ...props }: ShipmentsGridProps & imp
|
|
|
975
988
|
grid: {
|
|
976
989
|
"row-count_one": string;
|
|
977
990
|
"row-count_other": string;
|
|
991
|
+
"row-count-plus_other": string;
|
|
978
992
|
rows: string;
|
|
979
993
|
clearAll: string;
|
|
980
994
|
shipmentId: string;
|
|
981
995
|
labelId: string;
|
|
982
996
|
labelIdFilter: string;
|
|
997
|
+
filteredStatus: string;
|
|
983
998
|
filteredTrackingStatus: string;
|
|
984
999
|
more: string;
|
|
985
1000
|
createdDate: string;
|
|
@@ -1001,7 +1016,27 @@ export declare const Element: ({ resources, ...props }: ShipmentsGridProps & imp
|
|
|
1001
1016
|
none: string;
|
|
1002
1017
|
parcelguard: string;
|
|
1003
1018
|
shipsurance: string;
|
|
1004
|
-
thirdParty: string;
|
|
1019
|
+
thirdParty: string; /**
|
|
1020
|
+
* # Registered Shipments Grid Element
|
|
1021
|
+
*
|
|
1022
|
+
* @param ShipmentsGridProps The props necessary to render the `<ShipmentsGrid.Element />`.
|
|
1023
|
+
*
|
|
1024
|
+
* @example
|
|
1025
|
+
* The `<Component />` is the source JSX that is rendered when you make use of the `ShipmentsGrid`
|
|
1026
|
+
* Element directly.
|
|
1027
|
+
*
|
|
1028
|
+
* ```tsx
|
|
1029
|
+
* <ShipmentsGrid.Element
|
|
1030
|
+
* shipmentStatus="pending"
|
|
1031
|
+
* onRowClick={(shipment) => console.log('Row clicked', shipment)}
|
|
1032
|
+
* />
|
|
1033
|
+
* ```
|
|
1034
|
+
*
|
|
1035
|
+
* <br />
|
|
1036
|
+
*
|
|
1037
|
+
* @see {@link ShipmentsGrid.ShipmentsGridProps | The **Base props** used in `<ShipmentsGrid.Element />`}
|
|
1038
|
+
*
|
|
1039
|
+
*/
|
|
1005
1040
|
x_cover: string;
|
|
1006
1041
|
};
|
|
1007
1042
|
loading: {
|
|
@@ -273,6 +273,7 @@ export declare const Element: ({ resources, ...props }: ConfigureThemeProps & im
|
|
|
273
273
|
results: string;
|
|
274
274
|
};
|
|
275
275
|
fields: {
|
|
276
|
+
"requires-additional-handling-link": string;
|
|
276
277
|
"requires-additional-handling": string;
|
|
277
278
|
addOns: string;
|
|
278
279
|
contentDescription: string;
|
|
@@ -905,11 +906,13 @@ export declare const Element: ({ resources, ...props }: ConfigureThemeProps & im
|
|
|
905
906
|
grid: {
|
|
906
907
|
"row-count_one": string;
|
|
907
908
|
"row-count_other": string;
|
|
909
|
+
"row-count-plus_other": string;
|
|
908
910
|
rows: string;
|
|
909
911
|
clearAll: string;
|
|
910
912
|
shipmentId: string;
|
|
911
913
|
labelId: string;
|
|
912
914
|
labelIdFilter: string;
|
|
915
|
+
filteredStatus: string;
|
|
913
916
|
filteredTrackingStatus: string;
|
|
914
917
|
more: string;
|
|
915
918
|
createdDate: string;
|
|
@@ -271,6 +271,7 @@ export declare const Element: ({ resources, ...props }: import("../../create-ele
|
|
|
271
271
|
results: string;
|
|
272
272
|
};
|
|
273
273
|
fields: {
|
|
274
|
+
"requires-additional-handling-link": string;
|
|
274
275
|
"requires-additional-handling": string;
|
|
275
276
|
addOns: string;
|
|
276
277
|
contentDescription: string;
|
|
@@ -903,11 +904,13 @@ export declare const Element: ({ resources, ...props }: import("../../create-ele
|
|
|
903
904
|
grid: {
|
|
904
905
|
"row-count_one": string;
|
|
905
906
|
"row-count_other": string;
|
|
907
|
+
"row-count-plus_other": string;
|
|
906
908
|
rows: string;
|
|
907
909
|
clearAll: string;
|
|
908
910
|
shipmentId: string;
|
|
909
911
|
labelId: string;
|
|
910
912
|
labelIdFilter: string;
|
|
913
|
+
filteredStatus: string;
|
|
911
914
|
filteredTrackingStatus: string;
|
|
912
915
|
more: string;
|
|
913
916
|
createdDate: string;
|
|
@@ -271,6 +271,7 @@ export declare const Element: ({ resources, ...props }: import("../../create-ele
|
|
|
271
271
|
results: string;
|
|
272
272
|
};
|
|
273
273
|
fields: {
|
|
274
|
+
"requires-additional-handling-link": string;
|
|
274
275
|
"requires-additional-handling": string;
|
|
275
276
|
addOns: string;
|
|
276
277
|
contentDescription: string;
|
|
@@ -903,11 +904,13 @@ export declare const Element: ({ resources, ...props }: import("../../create-ele
|
|
|
903
904
|
grid: {
|
|
904
905
|
"row-count_one": string;
|
|
905
906
|
"row-count_other": string;
|
|
907
|
+
"row-count-plus_other": string;
|
|
906
908
|
rows: string;
|
|
907
909
|
clearAll: string;
|
|
908
910
|
shipmentId: string;
|
|
909
911
|
labelId: string;
|
|
910
912
|
labelIdFilter: string;
|
|
913
|
+
filteredStatus: string;
|
|
911
914
|
filteredTrackingStatus: string;
|
|
912
915
|
more: string;
|
|
913
916
|
createdDate: string;
|
|
@@ -271,6 +271,7 @@ export declare const Element: ({ resources, ...props }: import("../../create-ele
|
|
|
271
271
|
results: string;
|
|
272
272
|
};
|
|
273
273
|
fields: {
|
|
274
|
+
"requires-additional-handling-link": string;
|
|
274
275
|
"requires-additional-handling": string;
|
|
275
276
|
addOns: string;
|
|
276
277
|
contentDescription: string;
|
|
@@ -903,11 +904,13 @@ export declare const Element: ({ resources, ...props }: import("../../create-ele
|
|
|
903
904
|
grid: {
|
|
904
905
|
"row-count_one": string;
|
|
905
906
|
"row-count_other": string;
|
|
907
|
+
"row-count-plus_other": string;
|
|
906
908
|
rows: string;
|
|
907
909
|
clearAll: string;
|
|
908
910
|
shipmentId: string;
|
|
909
911
|
labelId: string;
|
|
910
912
|
labelIdFilter: string;
|
|
913
|
+
filteredStatus: string;
|
|
911
914
|
filteredTrackingStatus: string;
|
|
912
915
|
more: string;
|
|
913
916
|
createdDate: string;
|
|
@@ -371,6 +371,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & import(
|
|
|
371
371
|
results: string;
|
|
372
372
|
};
|
|
373
373
|
fields: {
|
|
374
|
+
"requires-additional-handling-link": string;
|
|
374
375
|
"requires-additional-handling": string;
|
|
375
376
|
addOns: string;
|
|
376
377
|
contentDescription: string;
|
|
@@ -441,6 +442,37 @@ export declare const Element: ({ resources, ...props }: ComponentProps & import(
|
|
|
441
442
|
};
|
|
442
443
|
requirements: {
|
|
443
444
|
noWarehouse: string;
|
|
445
|
+
/**
|
|
446
|
+
* # Registered Void Label Element
|
|
447
|
+
*
|
|
448
|
+
* - This is the registered `<VoidLabel />` element that will be used to render the
|
|
449
|
+
* `<VoidLabel.Element />` component.
|
|
450
|
+
*
|
|
451
|
+
* @param ElementProps The props, callbacks, and resources necessary to render
|
|
452
|
+
* the `<VoidLabel.Element />` component.
|
|
453
|
+
*
|
|
454
|
+
* @example
|
|
455
|
+
* The `<Component />` is the source JSX that is rendered when you make use of the `VoidLabel`
|
|
456
|
+
* Element directly. Here is a brief example of how you would use it within your application.
|
|
457
|
+
* ```tsx
|
|
458
|
+
* <VoidLabel.Element
|
|
459
|
+
* labelId="se-1234567"
|
|
460
|
+
* onComplete={() => console.log('onComplete')}
|
|
461
|
+
* onSuccess={(_, { salesOrderIds: [salesOrderId] }) =>
|
|
462
|
+
* console.log('sales order ID', salesOrderId)
|
|
463
|
+
* }
|
|
464
|
+
* onViewShipment={({ shipmentId }) => {
|
|
465
|
+
* console.log('onViewShipment', shipmentId);
|
|
466
|
+
* }}
|
|
467
|
+
* />
|
|
468
|
+
* ```
|
|
469
|
+
*
|
|
470
|
+
* <br />
|
|
471
|
+
*
|
|
472
|
+
* @see {@link VoidLabel.ComponentProps | The **props** that can be passed into the `<VoidLabel.Element />` component}
|
|
473
|
+
*
|
|
474
|
+
* @see {@link PurchaseLabel.Element | Go back to the frst step in the label purchase workflow `<PurchaseLabel.Element />`}
|
|
475
|
+
*/
|
|
444
476
|
noCarrier: string;
|
|
445
477
|
noWarehouseOrCarrier: string;
|
|
446
478
|
};
|
|
@@ -1003,11 +1035,13 @@ export declare const Element: ({ resources, ...props }: ComponentProps & import(
|
|
|
1003
1035
|
grid: {
|
|
1004
1036
|
"row-count_one": string;
|
|
1005
1037
|
"row-count_other": string;
|
|
1038
|
+
"row-count-plus_other": string;
|
|
1006
1039
|
rows: string;
|
|
1007
1040
|
clearAll: string;
|
|
1008
1041
|
shipmentId: string;
|
|
1009
1042
|
labelId: string;
|
|
1010
1043
|
labelIdFilter: string;
|
|
1044
|
+
filteredStatus: string;
|
|
1011
1045
|
filteredTrackingStatus: string;
|
|
1012
1046
|
more: string;
|
|
1013
1047
|
createdDate: string;
|
|
@@ -6,7 +6,6 @@ export type UseConfigureShipmentProps = {
|
|
|
6
6
|
externalOrderNumber?: string;
|
|
7
7
|
externalShipmentId?: string;
|
|
8
8
|
onLoad?: (shipments: SE.SalesOrderShipment[], salesOrder?: SE.SalesOrder, pendingShipment?: SE.SalesOrderShipment) => Promise<void> | void;
|
|
9
|
-
onShipmentUpdated?: (shipment: SE.SalesOrderShipment) => Promise<void> | void;
|
|
10
9
|
orderSourceCode?: string;
|
|
11
10
|
salesOrderId?: string;
|
|
12
11
|
shipFromAddresses?: ShipFromAddress[];
|
|
@@ -14,7 +13,7 @@ export type UseConfigureShipmentProps = {
|
|
|
14
13
|
useWarehouses?: boolean;
|
|
15
14
|
warehouseId?: string;
|
|
16
15
|
};
|
|
17
|
-
export declare const useConfigureShipment: ({
|
|
16
|
+
export declare const useConfigureShipment: ({ onLoad, errorWhenShipmentCancelled, externalOrderId, externalOrderNumber, externalShipmentId, orderSourceCode, salesOrderId, shipFromAddresses, shipmentId, warehouseId, useWarehouses, }: UseConfigureShipmentProps) => {
|
|
18
17
|
carriers: SE.Carrier[] | undefined;
|
|
19
18
|
errors: CodedError[] | undefined;
|
|
20
19
|
isLoading: boolean;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SE } from "@shipengine/js-api";
|
|
2
|
+
export declare const useSortableQuery: ({ defaultSortBy, defaultSortDir }: {
|
|
3
|
+
defaultSortBy?: string | undefined;
|
|
4
|
+
defaultSortDir?: string | undefined;
|
|
5
|
+
}) => {
|
|
6
|
+
sortState: {
|
|
7
|
+
by: "modified_at" | "created_at" | undefined;
|
|
8
|
+
createdAtDir: "desc" | "asc" | undefined;
|
|
9
|
+
dir: "desc" | "asc" | undefined;
|
|
10
|
+
modifiedAtDir: "desc" | "asc" | undefined;
|
|
11
|
+
};
|
|
12
|
+
toggleSort: (sortQuery: SE.SortableQuery["sortBy"]) => void;
|
|
13
|
+
};
|
package/types/src/index.d.ts
CHANGED
|
@@ -6,3 +6,8 @@ export * from "./workflows";
|
|
|
6
6
|
export * from "./elements-provider";
|
|
7
7
|
export { scopeTheme, createStyles, getDefaultFeatures, getSellerIdFromToken, isOnboarded, validateShipFromAddress, type ElementsFeatureFlags, } from "./utilities";
|
|
8
8
|
export * from "@shipengine/react-api";
|
|
9
|
+
/**
|
|
10
|
+
* ToDo: This export can be removed once RateCardManager stop using Elements
|
|
11
|
+
* https://auctane.atlassian.net/browse/ENGINE-9001
|
|
12
|
+
*/
|
|
13
|
+
export * from "./create-element";
|
|
@@ -267,6 +267,7 @@ declare const _default: {
|
|
|
267
267
|
results: string;
|
|
268
268
|
};
|
|
269
269
|
fields: {
|
|
270
|
+
"requires-additional-handling-link": string;
|
|
270
271
|
"requires-additional-handling": string;
|
|
271
272
|
addOns: string;
|
|
272
273
|
contentDescription: string;
|
|
@@ -899,11 +900,13 @@ declare const _default: {
|
|
|
899
900
|
grid: {
|
|
900
901
|
"row-count_one": string;
|
|
901
902
|
"row-count_other": string;
|
|
903
|
+
"row-count-plus_other": string;
|
|
902
904
|
rows: string;
|
|
903
905
|
clearAll: string;
|
|
904
906
|
shipmentId: string;
|
|
905
907
|
labelId: string;
|
|
906
908
|
labelIdFilter: string;
|
|
909
|
+
filteredStatus: string;
|
|
907
910
|
filteredTrackingStatus: string;
|
|
908
911
|
more: string;
|
|
909
912
|
createdDate: string;
|
|
@@ -28,6 +28,10 @@ export type RateFormFeatures = {
|
|
|
28
28
|
saveRate?: boolean;
|
|
29
29
|
};
|
|
30
30
|
export type ShipmentFormFeatures = {
|
|
31
|
+
/**
|
|
32
|
+
* Href to the `additional handling` link. This link will be used in the `additional handling` toggle of the shipment form.
|
|
33
|
+
*/
|
|
34
|
+
additionalHandlingHref?: string;
|
|
31
35
|
/**
|
|
32
36
|
* Enables the `Add-Ons` section of the shipment form. This allows users to add additional services to their shipment such as
|
|
33
37
|
* delivery confirmation and insurance.
|
|
@@ -148,7 +152,7 @@ export type FilterableLabelColumnConfig = {
|
|
|
148
152
|
/**
|
|
149
153
|
* The name identifying the column
|
|
150
154
|
*/
|
|
151
|
-
name: Extract<LabelColumnName, "shipmentId" | "labelId" | "trackingStatus">;
|
|
155
|
+
name: Extract<LabelColumnName, "shipmentId" | "labelId" | "trackingStatus" | "status">;
|
|
152
156
|
nickname?: string;
|
|
153
157
|
};
|
|
154
158
|
export type LabelColumnConfig = BaseLabelColumnConfig | FilterableLabelColumnConfig;
|
|
@@ -303,6 +303,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & import(
|
|
|
303
303
|
results: string;
|
|
304
304
|
};
|
|
305
305
|
fields: {
|
|
306
|
+
"requires-additional-handling-link": string;
|
|
306
307
|
"requires-additional-handling": string;
|
|
307
308
|
addOns: string;
|
|
308
309
|
contentDescription: string;
|
|
@@ -935,11 +936,13 @@ export declare const Element: ({ resources, ...props }: ComponentProps & import(
|
|
|
935
936
|
grid: {
|
|
936
937
|
"row-count_one": string;
|
|
937
938
|
"row-count_other": string;
|
|
939
|
+
"row-count-plus_other": string;
|
|
938
940
|
rows: string;
|
|
939
941
|
clearAll: string;
|
|
940
942
|
shipmentId: string;
|
|
941
943
|
labelId: string;
|
|
942
944
|
labelIdFilter: string;
|
|
945
|
+
filteredStatus: string;
|
|
943
946
|
filteredTrackingStatus: string;
|
|
944
947
|
more: string;
|
|
945
948
|
createdDate: string;
|
|
@@ -298,6 +298,7 @@ export declare const Element: ({ resources, ...props }: CarrierServicesProps & i
|
|
|
298
298
|
results: string;
|
|
299
299
|
};
|
|
300
300
|
fields: {
|
|
301
|
+
"requires-additional-handling-link": string;
|
|
301
302
|
"requires-additional-handling": string;
|
|
302
303
|
addOns: string;
|
|
303
304
|
contentDescription: string;
|
|
@@ -930,11 +931,13 @@ export declare const Element: ({ resources, ...props }: CarrierServicesProps & i
|
|
|
930
931
|
grid: {
|
|
931
932
|
"row-count_one": string;
|
|
932
933
|
"row-count_other": string;
|
|
934
|
+
"row-count-plus_other": string;
|
|
933
935
|
rows: string;
|
|
934
936
|
clearAll: string;
|
|
935
937
|
shipmentId: string;
|
|
936
938
|
labelId: string;
|
|
937
939
|
labelIdFilter: string;
|
|
940
|
+
filteredStatus: string;
|
|
938
941
|
filteredTrackingStatus: string;
|
|
939
942
|
more: string;
|
|
940
943
|
createdDate: string;
|