@shipengine/elements 2.21.0 → 2.22.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 +25 -7
- 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/label-id-filter/label-id-filter.cjs +2 -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 +2 -0
- package/cjs/components/grid-filters/grid-filters.cjs +6 -0
- package/cjs/elements/labels-grid/hooks/use-labels-grid.cjs +63 -29
- package/cjs/elements/labels-grid/hooks/use-tracking-status-filter.cjs +109 -0
- package/cjs/elements/labels-grid/labels-grid.cjs +47 -30
- 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/shipments-grid/hooks/use-shipments-grid.cjs +6 -5
- package/cjs/elements/shipments-grid/shipments-grid.cjs +56 -24
- package/cjs/hooks/use-sortable-query.cjs +36 -0
- package/cjs/locales/en/common.cjs +1 -0
- package/cjs/package.cjs +1 -1
- package/cjs/utilities/feature-flags/feature-flags.cjs +1 -1
- package/esm/components/grid-controller/grid-controller.js +27 -9
- 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/label-id-filter/label-id-filter.js +2 -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 +2 -0
- package/esm/components/grid-filters/grid-filters.js +6 -0
- package/esm/elements/labels-grid/hooks/use-labels-grid.js +64 -30
- package/esm/elements/labels-grid/hooks/use-tracking-status-filter.js +105 -0
- package/esm/elements/labels-grid/labels-grid.js +48 -31
- 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/shipments-grid/hooks/use-shipments-grid.js +6 -5
- package/esm/elements/shipments-grid/shipments-grid.js +57 -25
- package/esm/hooks/use-sortable-query.js +32 -0
- package/esm/locales/en/common.js +1 -0
- package/esm/package.js +1 -1
- package/esm/utilities/feature-flags/feature-flags.js +1 -1
- package/package.json +3 -3
- package/types/src/components/grid-controller/grid-controller.d.ts +2 -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/label-id-filter/label-id-filter.d.ts +2 -1
- 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 +2 -1
- package/types/src/elements/labels-grid/hooks/use-labels-grid.d.ts +4 -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 +36 -21
- package/types/src/elements/manage-carriers/manage-carriers.d.ts +1 -0
- package/types/src/elements/manage-external-carriers/manage-external-carriers.d.ts +1 -0
- package/types/src/elements/manage-funding/manage-funding-element.d.ts +1 -0
- package/types/src/elements/manage-warehouses/manage-warehouses.d.ts +1 -0
- package/types/src/elements/payment-method-settings/payment-method-settings-element.d.ts +1 -0
- package/types/src/elements/purchase-label/components/fund-and-purchase/fund-and-purchase.d.ts +2 -2
- package/types/src/elements/purchase-label/purchase-label.d.ts +1 -0
- package/types/src/elements/select-label-layout/select-label-layout-element.d.ts +1 -0
- package/types/src/elements/shipment-summary/shipment-summary.d.ts +1 -0
- package/types/src/elements/shipments-grid/hooks/use-shipments-grid.d.ts +7 -1
- package/types/src/elements/shipments-grid/shipments-grid.d.ts +10 -1
- package/types/src/elements/theme-creator/theme-creator.d.ts +1 -0
- package/types/src/elements/transaction-history/transaction-history-element.d.ts +1 -0
- package/types/src/elements/unit-settings/unit-settings-element.d.ts +1 -0
- package/types/src/elements/vat-settings/vat-settings-element.d.ts +1 -0
- package/types/src/elements/void-label/void-label.d.ts +1 -0
- package/types/src/hooks/use-sortable-query.d.ts +13 -0
- package/types/src/locales/en/index.d.ts +1 -0
- package/types/src/workflows/account-settings/account-settings.d.ts +1 -0
- package/types/src/workflows/carrier-services/carrier-services.d.ts +1 -0
- package/types/src/workflows/connect-external-carrier/connect-external-carrier.d.ts +1 -0
- package/types/src/workflows/label-workflow/label-workflow.d.ts +1 -0
- package/types/src/workflows/onboarding/onboarding.d.ts +1 -0
|
@@ -7,6 +7,7 @@ import { IGridFilters } from "../../grid-filters";
|
|
|
7
7
|
* @see {@link LabelIdFilter | The `<LabelIdFilter />` component}
|
|
8
8
|
*/
|
|
9
9
|
type LabelIdFilterProps = {
|
|
10
|
+
disabled?: boolean;
|
|
10
11
|
filters: IGridFilters;
|
|
11
12
|
onFiltersUpdated: (params: IGridFilters) => void;
|
|
12
13
|
};
|
|
@@ -19,5 +20,5 @@ type LabelIdFilterProps = {
|
|
|
19
20
|
*
|
|
20
21
|
* @see {@link LabelIdFilterProps | The props for the `<LabelIdFilter />` component}
|
|
21
22
|
*/
|
|
22
|
-
export declare const LabelIdFilter: ({ filters, onFiltersUpdated }: LabelIdFilterProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare const LabelIdFilter: ({ disabled, filters, onFiltersUpdated, }: LabelIdFilterProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
23
24
|
export {};
|
package/types/src/components/grid-filters/components/shipment-id-filter/shipment-id-filter.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { IGridFilters } from "../../grid-filters";
|
|
|
7
7
|
* @see {@link ShipmentIdFilter | The `<ShipmentIdFilter />` component}
|
|
8
8
|
*/
|
|
9
9
|
type ShipmentIdFilterProps = {
|
|
10
|
+
disabled?: boolean;
|
|
10
11
|
filters: IGridFilters;
|
|
11
12
|
onFiltersUpdated: (params: IGridFilters) => void;
|
|
12
13
|
};
|
|
@@ -19,5 +20,5 @@ type ShipmentIdFilterProps = {
|
|
|
19
20
|
*
|
|
20
21
|
* @see {@link ShipmentIdFilterProps | The props for the `<ShipmentIdFilter />` component}
|
|
21
22
|
*/
|
|
22
|
-
export declare const ShipmentIdFilter: ({ filters, onFiltersUpdated }: ShipmentIdFilterProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare const ShipmentIdFilter: ({ disabled, filters, onFiltersUpdated, }: ShipmentIdFilterProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
23
24
|
export {};
|
|
@@ -7,6 +7,7 @@ import { IGridFilters } from "../../grid-filters";
|
|
|
7
7
|
* @see {@link TrackingStatusFilter | The `<TrackingStatusFilter />` component}
|
|
8
8
|
*/
|
|
9
9
|
type TrackingStatusFilterProps = {
|
|
10
|
+
disabled?: boolean;
|
|
10
11
|
filters: IGridFilters;
|
|
11
12
|
onFiltersUpdated: (params: IGridFilters) => void;
|
|
12
13
|
};
|
|
@@ -19,5 +20,5 @@ type TrackingStatusFilterProps = {
|
|
|
19
20
|
*
|
|
20
21
|
* @see {@link TrackingStatusFilterProps | The props for the `<TrackingStatusFilter />` component}
|
|
21
22
|
*/
|
|
22
|
-
export declare const TrackingStatusFilter: ({ filters, onFiltersUpdated }: TrackingStatusFilterProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare const TrackingStatusFilter: ({ disabled, filters, onFiltersUpdated, }: TrackingStatusFilterProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
23
24
|
export {};
|
|
@@ -8,6 +8,7 @@ import { LabelTrackingStatus } from "@shipengine/js-api";
|
|
|
8
8
|
*/
|
|
9
9
|
type GridFilterProps = {
|
|
10
10
|
filters: IGridFilters;
|
|
11
|
+
filtersDisabled?: boolean;
|
|
11
12
|
onClearAllFilters: () => void;
|
|
12
13
|
onFiltersUpdated: (params: IGridFilters) => void;
|
|
13
14
|
};
|
|
@@ -35,5 +36,5 @@ export interface IGridFilters {
|
|
|
35
36
|
*
|
|
36
37
|
* @see {@link GridFiltersProps | The props for the `<GridFilters />` component}
|
|
37
38
|
*/
|
|
38
|
-
export declare const GridFilters: ({ filters, onFiltersUpdated, onClearAllFilters }: GridFilterProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
39
|
+
export declare const GridFilters: ({ filters, onFiltersUpdated, filtersDisabled, onClearAllFilters, }: GridFilterProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
39
40
|
export {};
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { SortDirection } from "../../../components/grid-controller";
|
|
2
1
|
import { IGridFilters } from "../../../components/grid-filters";
|
|
3
2
|
import { LabelTrackingStatus, SE } from "@shipengine/react-api";
|
|
4
3
|
import { LabelsGridProps } from "../";
|
|
5
4
|
import { Label } from "../labels-grid";
|
|
6
|
-
export declare const useLabelsGrid: ({
|
|
7
|
-
createdDateSortBy?: SortDirection | undefined;
|
|
5
|
+
export declare const useLabelsGrid: ({ labelStatus, showShipmentIdFilter, showLabelIdFilter, showTrackingStatusFilter, fetchShipments, sortDir, }: {
|
|
8
6
|
fetchShipments?: boolean | undefined;
|
|
9
7
|
labelStatus: LabelsGridProps["labelStatus"];
|
|
10
8
|
showLabelIdFilter?: boolean | undefined;
|
|
11
9
|
showShipmentIdFilter?: boolean | undefined;
|
|
12
10
|
showTrackingStatusFilter?: boolean | undefined;
|
|
11
|
+
sortDir?: SE.SortableQuery["sortDir"];
|
|
13
12
|
}) => {
|
|
14
13
|
clearAllFilters: () => void;
|
|
15
14
|
filters: IGridFilters;
|
|
@@ -62,8 +61,10 @@ export declare const useLabelsGrid: ({ createdDateSortBy, labelStatus, showShipm
|
|
|
62
61
|
voided: boolean;
|
|
63
62
|
voidedAt: string | null;
|
|
64
63
|
}[];
|
|
64
|
+
hasMoreUnfetchedResults: boolean | undefined;
|
|
65
65
|
isAnyFilterActive: boolean;
|
|
66
66
|
isError: boolean | undefined;
|
|
67
|
+
isFetchingNextPage: boolean;
|
|
67
68
|
isLoading: boolean | undefined;
|
|
68
69
|
labels: Label[];
|
|
69
70
|
pageConfig: {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { LabelTrackingStatus, SE } from "@shipengine/js-api";
|
|
2
|
+
export declare const useTrackingStatusFilter: ({ isActive, labelStatus, shipmentId, trackingStatusFilters, sortDir, currentPage, pageSize, }: {
|
|
3
|
+
currentPage: number;
|
|
4
|
+
isActive: boolean;
|
|
5
|
+
labelStatus?: SE.LabelStatus | undefined;
|
|
6
|
+
pageSize: number;
|
|
7
|
+
shipmentId?: string | undefined;
|
|
8
|
+
sortDir: SE.SortableQuery["sortDir"];
|
|
9
|
+
trackingStatusFilters: LabelTrackingStatus[];
|
|
10
|
+
}) => {
|
|
11
|
+
allLabelsCount: number;
|
|
12
|
+
fetchNextPage: (options?: import("@tanstack/query-core").FetchNextPageOptions | undefined) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<SE.ListLabelsResult, SE.CodedError[]>>;
|
|
13
|
+
filteredLabelsCount: number;
|
|
14
|
+
hasMorePages: boolean | undefined;
|
|
15
|
+
hasMoreUnfetchedResults: boolean | undefined;
|
|
16
|
+
isFetchingNextPage: boolean;
|
|
17
|
+
isLoading: boolean;
|
|
18
|
+
labels: SE.Label[];
|
|
19
|
+
paginationInfo: {
|
|
20
|
+
currentPage: number;
|
|
21
|
+
pageSize: number;
|
|
22
|
+
totalCount: number;
|
|
23
|
+
totalPages: number;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -143,18 +143,14 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & import
|
|
|
143
143
|
};
|
|
144
144
|
registerSuccess: {
|
|
145
145
|
title: string;
|
|
146
|
-
description: string;
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
146
|
+
description: string; /**
|
|
147
|
+
* `onClickExternalOrderId` is an optional callback function that will be invoked when the user clicks the id number within the
|
|
148
|
+
* `External Order ID` column, if present.
|
|
149
|
+
*/
|
|
150
|
+
};
|
|
151
151
|
};
|
|
152
152
|
};
|
|
153
153
|
highVolumeForms: string;
|
|
154
|
-
/**
|
|
155
|
-
* `onClickExternalShipmentId` is an optional callback function that will be invoked when the user clicks the id number within
|
|
156
|
-
* `External Shipment Id` column, if present.
|
|
157
|
-
*/
|
|
158
154
|
multipleShippingServices: string;
|
|
159
155
|
sections: {
|
|
160
156
|
labels: string;
|
|
@@ -234,10 +230,7 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & import
|
|
|
234
230
|
};
|
|
235
231
|
poBox: {
|
|
236
232
|
title: string;
|
|
237
|
-
description: string;
|
|
238
|
-
* `onClickExternalOrderId` is an optional callback function that will be invoked when the user clicks the id number within the
|
|
239
|
-
* `External Order ID` column, if present.
|
|
240
|
-
*/
|
|
233
|
+
description: string;
|
|
241
234
|
};
|
|
242
235
|
carrier: {
|
|
243
236
|
title: string;
|
|
@@ -255,10 +248,7 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & import
|
|
|
255
248
|
title: string;
|
|
256
249
|
subtitleCard: string;
|
|
257
250
|
subtitleBilling: string;
|
|
258
|
-
};
|
|
259
|
-
* `onClickPrintLabel` is an optional callback function that will be invoked when the user clicks the
|
|
260
|
-
* `Print Label` button.
|
|
261
|
-
*/
|
|
251
|
+
};
|
|
262
252
|
};
|
|
263
253
|
};
|
|
264
254
|
"register-carrier": {
|
|
@@ -336,6 +326,10 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & import
|
|
|
336
326
|
saveRateFailedMessage: string;
|
|
337
327
|
saveRateFailedTitle: string;
|
|
338
328
|
};
|
|
329
|
+
/**
|
|
330
|
+
* `onClickExternalOrderId` is an optional callback function that will be invoked when the user clicks the id number within the
|
|
331
|
+
* `External Order ID` column, if present.
|
|
332
|
+
*/
|
|
339
333
|
errorTypes: {
|
|
340
334
|
results: string;
|
|
341
335
|
};
|
|
@@ -369,7 +363,10 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & import
|
|
|
369
363
|
fractional: string;
|
|
370
364
|
};
|
|
371
365
|
weightGroup: string;
|
|
372
|
-
today: string;
|
|
366
|
+
today: string; /**
|
|
367
|
+
* `onViewDetails` is a callback function that controls the "View Details" action button and
|
|
368
|
+
* will be invoked when the user clicks on it.
|
|
369
|
+
*/
|
|
373
370
|
};
|
|
374
371
|
hints: {
|
|
375
372
|
contentDescription: string;
|
|
@@ -713,7 +710,10 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & import
|
|
|
713
710
|
printForms: string;
|
|
714
711
|
};
|
|
715
712
|
errorMessages: {
|
|
716
|
-
title: string;
|
|
713
|
+
title: string; /**
|
|
714
|
+
* `labelStatus` is the status of the labels you wish to view.
|
|
715
|
+
* If no value is defined, all labels will be rendered.
|
|
716
|
+
*/
|
|
717
717
|
subtitle: string;
|
|
718
718
|
};
|
|
719
719
|
};
|
|
@@ -746,7 +746,10 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & import
|
|
|
746
746
|
settingsModal: {
|
|
747
747
|
closeDialog: string;
|
|
748
748
|
header: string;
|
|
749
|
-
};
|
|
749
|
+
}; /**
|
|
750
|
+
* `features` provides optional feature configuration for the Element
|
|
751
|
+
* If no value is defined, default configuration will be used.
|
|
752
|
+
*/
|
|
750
753
|
status: {
|
|
751
754
|
connected: string;
|
|
752
755
|
};
|
|
@@ -804,9 +807,17 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & import
|
|
|
804
807
|
paste: string;
|
|
805
808
|
preference: {
|
|
806
809
|
confirm: string;
|
|
810
|
+
/**
|
|
811
|
+
* `features` provides optional feature configuration for the Element
|
|
812
|
+
* If no value is defined, default configuration will be used.
|
|
813
|
+
*/
|
|
807
814
|
addressNotValidated: string;
|
|
808
815
|
modified: string;
|
|
809
816
|
title: string;
|
|
817
|
+
/**
|
|
818
|
+
* `labelStatus` is the status of the labels you wish to view.
|
|
819
|
+
* If no value is defined, all labels will be rendered.
|
|
820
|
+
*/
|
|
810
821
|
originalAddress: string;
|
|
811
822
|
matchedAddress: string;
|
|
812
823
|
unableToValidate: string;
|
|
@@ -830,7 +841,10 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & import
|
|
|
830
841
|
cvvPlaceholder: string;
|
|
831
842
|
expirationPlaceholder: string;
|
|
832
843
|
cardNumberPlaceholder: string;
|
|
833
|
-
};
|
|
844
|
+
}; /**
|
|
845
|
+
* `onClickPrintLabel` is an optional callback function that will be invoked when the user clicks the
|
|
846
|
+
* `Print Label` button.
|
|
847
|
+
*/
|
|
834
848
|
};
|
|
835
849
|
carriers: {
|
|
836
850
|
fields: {
|
|
@@ -972,6 +986,7 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & import
|
|
|
972
986
|
grid: {
|
|
973
987
|
"row-count_one": string;
|
|
974
988
|
"row-count_other": string;
|
|
989
|
+
"row-count-plus_other": string;
|
|
975
990
|
rows: string;
|
|
976
991
|
clearAll: string;
|
|
977
992
|
shipmentId: 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;
|
|
@@ -1163,6 +1163,7 @@ export declare const Element: ({ resources, ...props }: PurchaseLabelCommonProps
|
|
|
1163
1163
|
grid: {
|
|
1164
1164
|
"row-count_one": string;
|
|
1165
1165
|
"row-count_other": string;
|
|
1166
|
+
"row-count-plus_other": string;
|
|
1166
1167
|
rows: string;
|
|
1167
1168
|
clearAll: string;
|
|
1168
1169
|
shipmentId: string;
|
|
@@ -1032,6 +1032,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & import(
|
|
|
1032
1032
|
grid: {
|
|
1033
1033
|
"row-count_one": string;
|
|
1034
1034
|
"row-count_other": string;
|
|
1035
|
+
"row-count-plus_other": string;
|
|
1035
1036
|
rows: string;
|
|
1036
1037
|
clearAll: string;
|
|
1037
1038
|
shipmentId: string;
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { IGridFilters } from "../../../components/grid-filters";
|
|
2
2
|
import { SE } from "@shipengine/js-api";
|
|
3
3
|
import { ShipmentsGridProps } from "../shipments-grid";
|
|
4
|
-
export declare const useShipmentsGrid: ({ shipmentStatus, showShipmentIdFilter, showCreatedDateFilter, }:
|
|
4
|
+
export declare const useShipmentsGrid: ({ shipmentStatus, showShipmentIdFilter, showCreatedDateFilter, sortBy, sortDir, }: {
|
|
5
|
+
shipmentStatus: ShipmentsGridProps["shipmentStatus"];
|
|
6
|
+
showCreatedDateFilter: ShipmentsGridProps["showCreatedDateFilter"];
|
|
7
|
+
showShipmentIdFilter: ShipmentsGridProps["showShipmentIdFilter"];
|
|
8
|
+
sortBy?: SE.SortableQuery["sortBy"];
|
|
9
|
+
sortDir?: SE.SortableQuery["sortDir"];
|
|
10
|
+
}) => {
|
|
5
11
|
clearAllFilters: () => void;
|
|
6
12
|
filters: IGridFilters;
|
|
7
13
|
getGridData: () => {
|
|
@@ -187,6 +187,11 @@ export declare const Element: ({ resources, ...props }: ShipmentsGridProps & imp
|
|
|
187
187
|
invalidFieldValue: string;
|
|
188
188
|
verificationFailure: string;
|
|
189
189
|
forbidden: string;
|
|
190
|
+
/**
|
|
191
|
+
* # Shipments Grid Props
|
|
192
|
+
*
|
|
193
|
+
* @see {@link ShipmentsGrid.Element | This prop types usage in `<ShipmentsGrid />`}
|
|
194
|
+
*/
|
|
190
195
|
connectionNotSupported: string;
|
|
191
196
|
genericText: string;
|
|
192
197
|
};
|
|
@@ -804,7 +809,10 @@ export declare const Element: ({ resources, ...props }: ShipmentsGridProps & imp
|
|
|
804
809
|
parserFields: {
|
|
805
810
|
fullAddress: string;
|
|
806
811
|
};
|
|
807
|
-
paste: string;
|
|
812
|
+
paste: string; /**
|
|
813
|
+
* `onClickCancelShipment` is a callback function that controls the display of `Cancel shipment` option and
|
|
814
|
+
* will be invoked when the user clicks on it.
|
|
815
|
+
*/
|
|
808
816
|
preference: {
|
|
809
817
|
confirm: string;
|
|
810
818
|
addressNotValidated: string;
|
|
@@ -975,6 +983,7 @@ export declare const Element: ({ resources, ...props }: ShipmentsGridProps & imp
|
|
|
975
983
|
grid: {
|
|
976
984
|
"row-count_one": string;
|
|
977
985
|
"row-count_other": string;
|
|
986
|
+
"row-count-plus_other": string;
|
|
978
987
|
rows: string;
|
|
979
988
|
clearAll: string;
|
|
980
989
|
shipmentId: string;
|
|
@@ -1003,6 +1003,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & import(
|
|
|
1003
1003
|
grid: {
|
|
1004
1004
|
"row-count_one": string;
|
|
1005
1005
|
"row-count_other": string;
|
|
1006
|
+
"row-count-plus_other": string;
|
|
1006
1007
|
rows: string;
|
|
1007
1008
|
clearAll: string;
|
|
1008
1009
|
shipmentId: string;
|
|
@@ -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
|
+
};
|
|
@@ -1010,6 +1010,7 @@ export declare const Element: ({ resources, ...props }: Omit<PurchaseLabel.Purch
|
|
|
1010
1010
|
grid: {
|
|
1011
1011
|
"row-count_one": string;
|
|
1012
1012
|
"row-count_other": string;
|
|
1013
|
+
"row-count-plus_other": string;
|
|
1013
1014
|
rows: string;
|
|
1014
1015
|
clearAll: string;
|
|
1015
1016
|
shipmentId: string;
|
|
@@ -998,6 +998,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & import(
|
|
|
998
998
|
grid: {
|
|
999
999
|
"row-count_one": string;
|
|
1000
1000
|
"row-count_other": string;
|
|
1001
|
+
"row-count-plus_other": string;
|
|
1001
1002
|
rows: string;
|
|
1002
1003
|
clearAll: string;
|
|
1003
1004
|
shipmentId: string;
|