@shipengine/elements 2.22.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 +29 -15
- package/cjs/components/grid-filters/components/index.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/tracking-status-filter/tracking-status-filter.cjs +21 -12
- package/cjs/components/grid-filters/grid-filters.cjs +6 -1
- package/cjs/elements/labels-grid/hooks/use-labels-grid.cjs +25 -12
- package/cjs/elements/labels-grid/labels-grid.cjs +11 -2
- package/cjs/elements/purchase-label/components/customs-forms/customs-forms.cjs +10 -3
- 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 +5 -1
- package/cjs/elements/shipments-grid/shipments-grid.cjs +12 -5
- package/cjs/hooks/index.cjs +3 -0
- package/cjs/hooks/use-configure-shipment.cjs +1 -34
- package/cjs/index.cjs +5 -0
- package/cjs/locales/en/common.cjs +2 -1
- package/cjs/locales/en/purchase-label.cjs +2 -1
- package/cjs/package.cjs +1 -1
- package/cjs/workflows/label-workflow/label-workflow.cjs +0 -1
- package/esm/components/grid-controller/grid-controller.js +29 -15
- package/esm/components/grid-filters/components/index.js +1 -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/tracking-status-filter/tracking-status-filter.js +21 -12
- package/esm/components/grid-filters/grid-filters.js +6 -1
- package/esm/elements/labels-grid/hooks/use-labels-grid.js +25 -12
- package/esm/elements/labels-grid/labels-grid.js +11 -2
- package/esm/elements/purchase-label/components/customs-forms/customs-forms.js +10 -3
- 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 +5 -1
- package/esm/elements/shipments-grid/shipments-grid.js +12 -5
- package/esm/hooks/index.js +1 -0
- package/esm/hooks/use-configure-shipment.js +3 -36
- package/esm/index.js +2 -0
- package/esm/locales/en/common.js +2 -1
- package/esm/locales/en/purchase-label.js +2 -1
- package/esm/package.js +1 -1
- package/esm/workflows/label-workflow/label-workflow.js +0 -1
- package/package.json +13 -2
- package/types/src/components/grid-controller/grid-controller.d.ts +2 -0
- package/types/src/components/grid-filters/components/index.d.ts +1 -0
- 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/grid-filters.d.ts +2 -0
- package/types/src/elements/labels-grid/hooks/use-labels-grid.d.ts +2 -1
- package/types/src/elements/labels-grid/labels-grid.d.ts +3 -4
- package/types/src/elements/manage-carriers/manage-carriers.d.ts +2 -0
- package/types/src/elements/manage-external-carriers/manage-external-carriers.d.ts +2 -0
- package/types/src/elements/manage-funding/manage-funding-element.d.ts +2 -0
- package/types/src/elements/manage-warehouses/manage-warehouses.d.ts +2 -0
- package/types/src/elements/payment-method-settings/payment-method-settings-element.d.ts +2 -0
- package/types/src/elements/purchase-label/hooks/use-rates-form.d.ts +1 -0
- package/types/src/elements/purchase-label/purchase-label.d.ts +11 -9
- package/types/src/elements/select-label-layout/select-label-layout-element.d.ts +2 -0
- package/types/src/elements/shipment-summary/shipment-summary.d.ts +2 -0
- package/types/src/elements/shipments-grid/hooks/use-shipments-grid.d.ts +11 -6
- package/types/src/elements/shipments-grid/shipments-grid.d.ts +31 -5
- package/types/src/elements/theme-creator/theme-creator.d.ts +2 -0
- package/types/src/elements/transaction-history/transaction-history-element.d.ts +2 -0
- package/types/src/elements/unit-settings/unit-settings-element.d.ts +2 -0
- package/types/src/elements/vat-settings/vat-settings-element.d.ts +2 -0
- package/types/src/elements/void-label/void-label.d.ts +33 -0
- package/types/src/hooks/index.d.ts +1 -0
- package/types/src/hooks/use-configure-shipment.d.ts +1 -2
- package/types/src/index.d.ts +5 -0
- package/types/src/locales/en/index.d.ts +2 -0
- package/types/src/utilities/feature-flags/types.d.ts +5 -1
- package/types/src/workflows/account-settings/account-settings.d.ts +2 -0
- package/types/src/workflows/carrier-services/carrier-services.d.ts +2 -0
- package/types/src/workflows/connect-external-carrier/connect-external-carrier.d.ts +2 -0
- package/types/src/workflows/label-workflow/label-workflow.d.ts +10 -1
- package/types/src/workflows/onboarding/onboarding.d.ts +2 -0
|
@@ -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;
|
|
@@ -909,6 +910,7 @@ export declare const Element: ({ resources, ...props }: import("../../create-ele
|
|
|
909
910
|
shipmentId: string;
|
|
910
911
|
labelId: string;
|
|
911
912
|
labelIdFilter: string;
|
|
913
|
+
filteredStatus: string;
|
|
912
914
|
filteredTrackingStatus: string;
|
|
913
915
|
more: string;
|
|
914
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;
|
|
@@ -909,6 +910,7 @@ export declare const Element: ({ resources, ...props }: import("../../create-ele
|
|
|
909
910
|
shipmentId: string;
|
|
910
911
|
labelId: string;
|
|
911
912
|
labelIdFilter: string;
|
|
913
|
+
filteredStatus: string;
|
|
912
914
|
filteredTrackingStatus: string;
|
|
913
915
|
more: string;
|
|
914
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
|
};
|
|
@@ -1009,6 +1041,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & import(
|
|
|
1009
1041
|
shipmentId: string;
|
|
1010
1042
|
labelId: string;
|
|
1011
1043
|
labelIdFilter: string;
|
|
1044
|
+
filteredStatus: string;
|
|
1012
1045
|
filteredTrackingStatus: string;
|
|
1013
1046
|
more: string;
|
|
1014
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;
|
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;
|
|
@@ -905,6 +906,7 @@ declare const _default: {
|
|
|
905
906
|
shipmentId: string;
|
|
906
907
|
labelId: string;
|
|
907
908
|
labelIdFilter: string;
|
|
909
|
+
filteredStatus: string;
|
|
908
910
|
filteredTrackingStatus: string;
|
|
909
911
|
more: string;
|
|
910
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;
|
|
@@ -941,6 +942,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & import(
|
|
|
941
942
|
shipmentId: string;
|
|
942
943
|
labelId: string;
|
|
943
944
|
labelIdFilter: string;
|
|
945
|
+
filteredStatus: string;
|
|
944
946
|
filteredTrackingStatus: string;
|
|
945
947
|
more: string;
|
|
946
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;
|
|
@@ -936,6 +937,7 @@ export declare const Element: ({ resources, ...props }: CarrierServicesProps & i
|
|
|
936
937
|
shipmentId: string;
|
|
937
938
|
labelId: string;
|
|
938
939
|
labelIdFilter: string;
|
|
940
|
+
filteredStatus: string;
|
|
939
941
|
filteredTrackingStatus: string;
|
|
940
942
|
more: string;
|
|
941
943
|
createdDate: string;
|
|
@@ -304,6 +304,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & import(
|
|
|
304
304
|
results: string;
|
|
305
305
|
};
|
|
306
306
|
fields: {
|
|
307
|
+
"requires-additional-handling-link": string;
|
|
307
308
|
"requires-additional-handling": string;
|
|
308
309
|
addOns: string;
|
|
309
310
|
contentDescription: string;
|
|
@@ -942,6 +943,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & import(
|
|
|
942
943
|
shipmentId: string;
|
|
943
944
|
labelId: string;
|
|
944
945
|
labelIdFilter: string;
|
|
946
|
+
filteredStatus: string;
|
|
945
947
|
filteredTrackingStatus: string;
|
|
946
948
|
more: string;
|
|
947
949
|
createdDate: string;
|
|
@@ -373,6 +373,7 @@ export declare const Element: ({ resources, ...props }: Omit<PurchaseLabel.Purch
|
|
|
373
373
|
results: string;
|
|
374
374
|
};
|
|
375
375
|
fields: {
|
|
376
|
+
"requires-additional-handling-link": string;
|
|
376
377
|
"requires-additional-handling": string;
|
|
377
378
|
addOns: string;
|
|
378
379
|
contentDescription: string;
|
|
@@ -388,7 +389,9 @@ export declare const Element: ({ resources, ...props }: Omit<PurchaseLabel.Purch
|
|
|
388
389
|
insuranceProvider: string;
|
|
389
390
|
insuredValue: string;
|
|
390
391
|
items: string;
|
|
391
|
-
orderDate: string;
|
|
392
|
+
orderDate: string; /**
|
|
393
|
+
* `multiplexedId` is the unique pattern of props that help index which Element is being displayed.
|
|
394
|
+
*/
|
|
392
395
|
orderValue: string;
|
|
393
396
|
packageCode: string;
|
|
394
397
|
requestedShipping: string;
|
|
@@ -1016,9 +1019,15 @@ export declare const Element: ({ resources, ...props }: Omit<PurchaseLabel.Purch
|
|
|
1016
1019
|
shipmentId: string;
|
|
1017
1020
|
labelId: string;
|
|
1018
1021
|
labelIdFilter: string;
|
|
1022
|
+
filteredStatus: string;
|
|
1019
1023
|
filteredTrackingStatus: string;
|
|
1020
1024
|
more: string;
|
|
1021
1025
|
createdDate: string;
|
|
1026
|
+
/**
|
|
1027
|
+
* # Label Workflow Element Props
|
|
1028
|
+
*
|
|
1029
|
+
* @see {@link LabelWorkflow.Element | See the full type that `typeof Element` will return}
|
|
1030
|
+
*/
|
|
1022
1031
|
shipmentIdFilter: string;
|
|
1023
1032
|
createdDateFilter: string;
|
|
1024
1033
|
apply: string;
|
|
@@ -359,6 +359,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & import(
|
|
|
359
359
|
results: string;
|
|
360
360
|
};
|
|
361
361
|
fields: {
|
|
362
|
+
"requires-additional-handling-link": string;
|
|
362
363
|
"requires-additional-handling": string;
|
|
363
364
|
addOns: string;
|
|
364
365
|
contentDescription: string;
|
|
@@ -1004,6 +1005,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & import(
|
|
|
1004
1005
|
shipmentId: string;
|
|
1005
1006
|
labelId: string;
|
|
1006
1007
|
labelIdFilter: string;
|
|
1008
|
+
filteredStatus: string;
|
|
1007
1009
|
filteredTrackingStatus: string;
|
|
1008
1010
|
more: string;
|
|
1009
1011
|
createdDate: string;
|