@shipengine/elements 0.16.1 → 0.17.3
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/components/auto-funding-form/auto-funding-form.d.ts +3 -1
- package/components/auto-funding-form/auto-funding-form.styles.d.ts +2 -1
- package/components/field/expiration-input/expiration-input.d.ts +3 -0
- package/components/field/expiration-input/index.d.ts +1 -0
- package/components/field/fields.d.ts +1 -0
- package/components/field/switch/switch.d.ts +1 -1
- package/components/fund-and-purchase/fund-and-purchase.d.ts +2 -1
- package/components/items-breakdown/items-breakdown.d.ts +1 -1
- package/components/templates/address-form/address-fields.styles.d.ts +1 -0
- package/components/templates/completion-page/completion-page.d.ts +4 -0
- package/components/templates/completion-page/index.d.ts +1 -0
- package/components/templates/index.d.ts +2 -1
- package/components/templates/list-carriers-row/list-carriers-row.styles.d.ts +1 -1
- package/components/templates/onboarding/onboarding.d.ts +1 -3
- package/components/templates/onboarding/onboarding.styles.d.ts +1 -1
- package/components/templates/rate-form/rate-form.d.ts +1 -0
- package/components/templates/shipment-form/shipment-form.d.ts +1 -1
- package/components/templates/suspend-sales-order/index.d.ts +1 -0
- package/components/templates/suspend-sales-order/suspend-sales-order.d.ts +8 -0
- package/components/templates/suspend-shipment/index.d.ts +1 -0
- package/components/templates/suspend-shipment/suspend-shipment.d.ts +8 -0
- package/components/templates/wallet-form/wallet-schema.d.ts +7 -12
- package/elements/components/configure-shipment/configure-shipment.d.ts +1 -1
- package/elements/components/configure-shipment/hooks/use-address.d.ts +1 -1
- package/elements/components/configure-shipment/hooks/use-shipment-form.d.ts +2 -2
- package/elements/components/index.d.ts +1 -1
- package/elements/components/{sales-order → purchase-label}/hooks/use-configure-shipment.d.ts +1 -1
- package/elements/components/purchase-label/hooks/use-load-shipment.d.ts +9 -0
- package/elements/components/purchase-label/index.d.ts +3 -0
- package/elements/components/{sales-order/sales-order.d.ts → purchase-label/purchase-label-by-sales-order.d.ts} +1 -1
- package/elements/components/purchase-label/purchase-label-by-shipment.d.ts +9 -0
- package/elements/components/purchase-label/purchase-label.d.ts +6 -0
- package/elements/purchase-label.d.ts +3 -1
- package/hooks/use-elements.d.ts +2 -1
- package/index.cjs +1733 -1548
- package/index.js +1734 -1551
- package/locales/en/index.d.ts +7 -3
- package/mocks/carriers/handlers.d.ts +3 -0
- package/mocks/warehouses/handlers.d.ts +12 -1
- package/package.json +3 -3
- package/utilities/money.d.ts +1 -0
- package/utilities/shipengine/sales-order.d.ts +10 -0
- package/components/templates/sales-order/index.d.ts +0 -1
- package/components/templates/sales-order/sales-order.d.ts +0 -8
- package/elements/components/sales-order/index.d.ts +0 -1
- /package/elements/components/{sales-order → purchase-label}/hooks/index.d.ts +0 -0
- /package/elements/components/{sales-order → purchase-label}/hooks/use-import-sales-order.d.ts +0 -0
- /package/elements/components/{sales-order → purchase-label}/hooks/use-pending-shipment.d.ts +0 -0
package/locales/en/index.d.ts
CHANGED
|
@@ -228,16 +228,19 @@ declare const _default: {
|
|
|
228
228
|
saveRule: string;
|
|
229
229
|
};
|
|
230
230
|
autoFunding: {
|
|
231
|
-
|
|
231
|
+
edit: string;
|
|
232
|
+
editSettings: string;
|
|
232
233
|
error: {
|
|
233
234
|
title: string;
|
|
234
235
|
message: string;
|
|
235
236
|
};
|
|
237
|
+
isEnabledCTA: string;
|
|
236
238
|
isEnabled: string;
|
|
237
239
|
isLoading: string;
|
|
238
240
|
lowBalancePurchaseThreshold: string;
|
|
239
241
|
maximumPurchasesPerDay: string;
|
|
240
242
|
purchaseAmount: string;
|
|
243
|
+
readSettings: string;
|
|
241
244
|
};
|
|
242
245
|
addFunds: {
|
|
243
246
|
custom: string;
|
|
@@ -250,6 +253,7 @@ declare const _default: {
|
|
|
250
253
|
amount: string;
|
|
251
254
|
};
|
|
252
255
|
minimumPurchaseAmount: string;
|
|
256
|
+
other: string;
|
|
253
257
|
};
|
|
254
258
|
fundAndPurchase: {
|
|
255
259
|
finalBalance: string;
|
|
@@ -339,8 +343,7 @@ declare const _default: {
|
|
|
339
343
|
differentBillingAddress: string;
|
|
340
344
|
name: string;
|
|
341
345
|
cardNumber: string;
|
|
342
|
-
|
|
343
|
-
expirationYear: string;
|
|
346
|
+
expiration: string;
|
|
344
347
|
cvv: string;
|
|
345
348
|
};
|
|
346
349
|
};
|
|
@@ -404,6 +407,7 @@ declare const _default: {
|
|
|
404
407
|
invalidNameOrCompany: string;
|
|
405
408
|
noWarehouses: string;
|
|
406
409
|
unableToLoad: {
|
|
410
|
+
autoFundingSettings: string;
|
|
407
411
|
carrier: string;
|
|
408
412
|
carriers: string;
|
|
409
413
|
salesOrder: string;
|
|
@@ -3,10 +3,13 @@ import { SE } from "@shipengine/api";
|
|
|
3
3
|
export type CreateCarrierHandlersParams = {
|
|
4
4
|
get?: DeepPartial<SE.Carrier>;
|
|
5
5
|
list?: [count: number, listParams?: DeepPartial<SE.Carrier>];
|
|
6
|
+
registrationFailures?: string[];
|
|
6
7
|
};
|
|
7
8
|
export declare const createCarrierHandlers: (params?: CreateCarrierHandlersParams) => {
|
|
8
9
|
database: {
|
|
10
|
+
autoFundingConfig: Map<string, number | boolean>;
|
|
9
11
|
balanceAmount: number;
|
|
12
|
+
carriers: SE.Carrier[];
|
|
10
13
|
};
|
|
11
14
|
handlers: import("msw").RestHandler<import("msw/lib/glossary-de6278a9").M<import("msw/lib/glossary-de6278a9").h>>[];
|
|
12
15
|
};
|
|
@@ -1 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import { DeepPartial } from "fishery";
|
|
2
|
+
import { SE } from "@shipengine/api";
|
|
3
|
+
export type CreateWarehouseHandlersParams = {
|
|
4
|
+
get?: DeepPartial<SE.Warehouse>;
|
|
5
|
+
list?: [count: number, listParams?: DeepPartial<SE.Warehouse>];
|
|
6
|
+
};
|
|
7
|
+
export declare const createWarehouseHandlers: (params?: CreateWarehouseHandlersParams) => {
|
|
8
|
+
database: {
|
|
9
|
+
warehouses: SE.Warehouse[];
|
|
10
|
+
};
|
|
11
|
+
handlers: import("msw").RestHandler<import("msw/lib/glossary-de6278a9").M<import("msw/lib/glossary-de6278a9").h>>[];
|
|
12
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shipengine/elements",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.3",
|
|
4
4
|
"typedoc": {
|
|
5
5
|
"entryPoint": "./src/index.ts",
|
|
6
6
|
"readmeFile": "../../README.md",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"@emotion/react": "^11.10.0",
|
|
24
24
|
"@packlink/brands": "^3.18.0",
|
|
25
25
|
"react-hook-form": "^7.31.2",
|
|
26
|
-
"@shipengine/api": "0.
|
|
27
|
-
"@shipengine/react": "0.
|
|
26
|
+
"@shipengine/api": "0.17.3",
|
|
27
|
+
"@shipengine/react": "0.17.3",
|
|
28
28
|
"zod": "^3.17.3",
|
|
29
29
|
"@emotion/css": "^11.10.5",
|
|
30
30
|
"humps": "^2.0.1",
|
package/utilities/money.d.ts
CHANGED
|
@@ -3,3 +3,4 @@ export declare const currencySymbol: Record<SE.Currency, string>;
|
|
|
3
3
|
export declare const formatMoney: (value: SE.Money, locale?: string) => string;
|
|
4
4
|
export declare const calculateTotal: (...values: SE.Money[]) => number;
|
|
5
5
|
export declare const formatCreditCardNumber: (cc: string) => string;
|
|
6
|
+
export declare const formatExpiration: (exp: string) => string;
|
|
@@ -11,3 +11,13 @@ export declare const getIsCustomsRequiredForSalesOrder: ({ shipTo }: SE.SalesOrd
|
|
|
11
11
|
* @category Utilities
|
|
12
12
|
*/
|
|
13
13
|
export declare const getRequestedServices: (salesOrder: SE.SalesOrder | undefined) => string[];
|
|
14
|
+
type SalesOrderOrShipment = {
|
|
15
|
+
salesOrder?: SE.SalesOrder;
|
|
16
|
+
shipment?: SE.SalesOrderShipment;
|
|
17
|
+
};
|
|
18
|
+
export declare const getSalesOrderItemsFromSalesOrderOrShipment: ({ salesOrder, shipment, }: SalesOrderOrShipment) => {
|
|
19
|
+
detail: string;
|
|
20
|
+
name: string;
|
|
21
|
+
quantity: number;
|
|
22
|
+
}[];
|
|
23
|
+
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./sales-order";
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { WithChildrenCommonProps } from "@packlink/giger";
|
|
2
|
-
import { SE } from "@shipengine/api";
|
|
3
|
-
export type SalesOrderProps = WithChildrenCommonProps<{
|
|
4
|
-
errors?: SE.CodedError[];
|
|
5
|
-
isLoading?: boolean;
|
|
6
|
-
salesOrder?: SE.SalesOrder;
|
|
7
|
-
}>;
|
|
8
|
-
export declare const SalesOrder: ({ children, errors, isLoading, salesOrder }: SalesOrderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./sales-order";
|
|
File without changes
|
/package/elements/components/{sales-order → purchase-label}/hooks/use-import-sales-order.d.ts
RENAMED
|
File without changes
|
|
File without changes
|