@shipengine/elements 0.17.2 → 0.18.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.
Files changed (36) hide show
  1. package/components/auto-funding-form/auto-funding-form.d.ts +3 -1
  2. package/components/auto-funding-form/auto-funding-form.styles.d.ts +2 -1
  3. package/components/field/expiration-input/expiration-input.d.ts +3 -0
  4. package/components/field/expiration-input/index.d.ts +1 -0
  5. package/components/field/fields.d.ts +1 -0
  6. package/components/field/switch/switch.d.ts +1 -1
  7. package/components/fund-and-purchase/fund-and-purchase.d.ts +4 -1
  8. package/components/templates/address-form/address-fields.styles.d.ts +1 -0
  9. package/components/templates/index.d.ts +2 -0
  10. package/components/templates/manage-warehouses/manage-warehouse.styles.d.ts +1 -0
  11. package/components/templates/manage-warehouses/manage-warehouses.d.ts +10 -5
  12. package/components/templates/onboarding/onboarding.d.ts +2 -3
  13. package/components/templates/onboarding/onboarding.styles.d.ts +1 -1
  14. package/components/templates/rate-form/rate-form.d.ts +1 -0
  15. package/components/templates/shipment-form/shipment-schema.d.ts +2 -2
  16. package/components/templates/wallet-form/wallet-schema.d.ts +7 -12
  17. package/components/templates/warehouse-form/warehouse-form-schema.d.ts +2 -102
  18. package/components/templates/warehouse-form/warehouse-form.d.ts +2 -1
  19. package/components/templates/warehouse-preference-select/index.d.ts +1 -0
  20. package/components/templates/warehouse-preference-select/warehouse-preference-select.d.ts +24 -0
  21. package/components/templates/warehouse-preference-wizard/index.d.ts +1 -0
  22. package/components/templates/warehouse-preference-wizard/warehouse-preference-wizard.d.ts +23 -0
  23. package/elements/components/manage-warehouses/manage-warehouses.d.ts +5 -2
  24. package/elements/manage-warehouses.d.ts +1 -1
  25. package/factories/shipengine/warehouse.d.ts +2 -0
  26. package/hooks/index.d.ts +1 -0
  27. package/hooks/use-warehouse-validation.d.ts +14 -0
  28. package/index.cjs +2253 -2576
  29. package/index.d.ts +0 -2
  30. package/index.js +2255 -2545
  31. package/locales/en/index.d.ts +11 -3
  32. package/mocks/carriers/handlers.d.ts +3 -0
  33. package/mocks/warehouses/handlers.d.ts +12 -1
  34. package/package.json +3 -3
  35. package/utilities/money.d.ts +1 -0
  36. package/components/templates/warehouse-form/warehouse-form.styles.d.ts +0 -1
@@ -169,6 +169,7 @@ declare const _default: {
169
169
  };
170
170
  schemaErrors: {
171
171
  shipFromUnitedStatesOnly: string;
172
+ shipFromAddressRequired: string;
172
173
  needToAcknowledge: string;
173
174
  };
174
175
  rates: {
@@ -210,6 +211,7 @@ declare const _default: {
210
211
  };
211
212
  "manage-warehouses": {
212
213
  addNew: string;
214
+ editWarehouse: string;
213
215
  contactName: string;
214
216
  default: string;
215
217
  isDefault: string;
@@ -228,16 +230,19 @@ declare const _default: {
228
230
  saveRule: string;
229
231
  };
230
232
  autoFunding: {
231
- addFundsAutomatically: string;
233
+ edit: string;
234
+ editSettings: string;
232
235
  error: {
233
236
  title: string;
234
237
  message: string;
235
238
  };
239
+ isEnabledCTA: string;
236
240
  isEnabled: string;
237
241
  isLoading: string;
238
242
  lowBalancePurchaseThreshold: string;
239
243
  maximumPurchasesPerDay: string;
240
244
  purchaseAmount: string;
245
+ readSettings: string;
241
246
  };
242
247
  addFunds: {
243
248
  custom: string;
@@ -250,6 +255,7 @@ declare const _default: {
250
255
  amount: string;
251
256
  };
252
257
  minimumPurchaseAmount: string;
258
+ other: string;
253
259
  };
254
260
  fundAndPurchase: {
255
261
  finalBalance: string;
@@ -319,8 +325,10 @@ declare const _default: {
319
325
  };
320
326
  paste: string;
321
327
  preference: {
328
+ confirm: string;
322
329
  addressNotValidated: string;
323
330
  modified: string;
331
+ title: string;
324
332
  originalAddress: string;
325
333
  matchedAddress: string;
326
334
  unableToValidate: string;
@@ -339,8 +347,7 @@ declare const _default: {
339
347
  differentBillingAddress: string;
340
348
  name: string;
341
349
  cardNumber: string;
342
- expirationMonth: string;
343
- expirationYear: string;
350
+ expiration: string;
344
351
  cvv: string;
345
352
  };
346
353
  };
@@ -404,6 +411,7 @@ declare const _default: {
404
411
  invalidNameOrCompany: string;
405
412
  noWarehouses: string;
406
413
  unableToLoad: {
414
+ autoFundingSettings: string;
407
415
  carrier: string;
408
416
  carriers: string;
409
417
  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
- export declare const warehouseHandlers: import("msw").RestHandler<import("msw/lib/glossary-de6278a9").M<import("msw/lib/glossary-de6278a9").h>>[];
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.17.2",
3
+ "version": "0.18.0",
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.17.2",
27
- "@shipengine/react": "0.17.2",
26
+ "@shipengine/api": "0.18.0",
27
+ "@shipengine/react": "0.18.0",
28
28
  "zod": "^3.17.3",
29
29
  "@emotion/css": "^11.10.5",
30
30
  "humps": "^2.0.1",
@@ -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;
@@ -1 +0,0 @@
1
- export declare const styles: Record<"header" | "onboardingWell" | "well", import("@emotion/serialize").Interpolation<import("@packlink/brands/dist/js/theme/Theme").Theme>>;