@shipengine/elements 0.27.0 → 0.29.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 (27) hide show
  1. package/index.cjs +13821 -12807
  2. package/index.js +14081 -13070
  3. package/package.json +1 -1
  4. package/src/components/collapsible-panel/collapsible-panel.d.ts +9 -0
  5. package/src/components/collapsible-panel/collapsible-panel.styles.d.ts +27 -0
  6. package/src/components/collapsible-panel/index.d.ts +1 -0
  7. package/src/components/index.d.ts +1 -0
  8. package/src/components/label/label.styles.d.ts +1 -1
  9. package/src/components/save-status/save-status.d.ts +3 -3
  10. package/src/components/templates/account-settings/account-settings.d.ts +6 -0
  11. package/src/components/templates/account-settings/index.d.ts +1 -0
  12. package/src/components/templates/index.d.ts +1 -0
  13. package/src/components/templates/shipment-form/shipment-form.d.ts +2 -1
  14. package/src/elements/account-settings/account-settings.d.ts +621 -0
  15. package/src/elements/account-settings/index.d.ts +1 -0
  16. package/src/elements/configure-shipment/hooks/use-address.d.ts +1 -0
  17. package/src/elements/configure-shipment/hooks/use-shipment-form.d.ts +1 -0
  18. package/src/elements/index.d.ts +1 -0
  19. package/src/elements/list-carriers/list-carriers.d.ts +0 -602
  20. package/src/elements/manage-warehouses/manage-warehouses.d.ts +0 -602
  21. package/src/elements/onboarding/onboarding.d.ts +15 -0
  22. package/src/elements/purchase-label/purchase-label.d.ts +15 -0
  23. package/src/elements/view-shipment/view-shipment.d.ts +15 -0
  24. package/src/elements/void-label/void-label.d.ts +15 -0
  25. package/src/hooks/use-get-or-create-shipment.d.ts +4 -3
  26. package/src/locales/en/index.d.ts +15 -0
  27. package/src/utilities/shipengine/carrier.d.ts +2 -0
@@ -0,0 +1,621 @@
1
+ /// <reference types="react" />
2
+ export type ComponentProps = {
3
+ onSaveSettings: () => void;
4
+ };
5
+ export declare const Component: ({ onSaveSettings }: ComponentProps) => import("@emotion/react/jsx-runtime").JSX.Element;
6
+ export declare const Element: ({ resources, ...props }: ComponentProps & {
7
+ resources?: {
8
+ en: {
9
+ "wallet-history": {
10
+ actions: {
11
+ downloadCsv: string;
12
+ chooseDate: string;
13
+ };
14
+ dateRange: string;
15
+ historyOptions: {
16
+ custom: string;
17
+ last30days: string;
18
+ thisMonth: string;
19
+ lastMonth: string;
20
+ };
21
+ };
22
+ "void-label": {
23
+ title: string;
24
+ actions: {
25
+ complete: string;
26
+ confirmVoid: string;
27
+ viewShipment: string;
28
+ };
29
+ errorMessages: {
30
+ labelIdRequired: string;
31
+ };
32
+ resultMessages: {
33
+ approved: string;
34
+ rejected: string;
35
+ };
36
+ refund_process: string;
37
+ refund_rules: string;
38
+ resultTitles: {
39
+ approved: string;
40
+ rejected: string;
41
+ };
42
+ voidedOn: string;
43
+ };
44
+ "view-shipment": {
45
+ title: string;
46
+ actions: {
47
+ buyAnotherLabel: string;
48
+ hideItems: string;
49
+ printForms: string;
50
+ printLabel: string;
51
+ schedulePickup: string;
52
+ showItems: string;
53
+ void: string;
54
+ };
55
+ fields: {
56
+ dimensions: string;
57
+ estimatedShipping: string;
58
+ items: string;
59
+ orderDate: string;
60
+ orderValue: string;
61
+ requestedShipping: string;
62
+ shipDate: string;
63
+ shipTo: string;
64
+ warehouse: string;
65
+ weight: string;
66
+ insuredValue: string;
67
+ deliveryConfirmation: string;
68
+ };
69
+ highVolumeForms: string;
70
+ multipleShippingServices: string;
71
+ sections: {
72
+ labels: string;
73
+ };
74
+ };
75
+ "register-wallet": {
76
+ sections: {
77
+ setup: {
78
+ title: string;
79
+ subtitle: string;
80
+ descriptionTitle: string;
81
+ description: string;
82
+ };
83
+ billing: {
84
+ title: string;
85
+ cardSubTitle: string;
86
+ addressSubTitle: string;
87
+ info: string;
88
+ };
89
+ carriers: {
90
+ title: string;
91
+ subtitle: string;
92
+ };
93
+ notifications: {
94
+ error: {
95
+ title: string;
96
+ };
97
+ info: {
98
+ title: string;
99
+ description: string;
100
+ };
101
+ poBox: {
102
+ title: string;
103
+ description: string;
104
+ };
105
+ carrier: {
106
+ title: string;
107
+ confirmAddress: string;
108
+ description: string;
109
+ };
110
+ };
111
+ };
112
+ settings: {
113
+ title: string;
114
+ billing: {
115
+ title: string;
116
+ subtitleCard: string;
117
+ subtitleBilling: string;
118
+ };
119
+ };
120
+ };
121
+ "register-carrier": {
122
+ formTitle: string;
123
+ agreeToTerms: string;
124
+ };
125
+ "purchase-label": {
126
+ title: string;
127
+ actions: {
128
+ calculateRates_one: string;
129
+ calculateRates_other: string;
130
+ hideItems: string;
131
+ purchaseLabel: string;
132
+ purchaseNow: string;
133
+ showItems: string;
134
+ showMoreRates: string;
135
+ showFewerRates: string;
136
+ saveRate: string;
137
+ };
138
+ balance: {
139
+ currentBalance: string;
140
+ insufficientBalanceCTA: string;
141
+ };
142
+ cta: {
143
+ addPackageDetails: string;
144
+ };
145
+ errorMessages: {
146
+ customsItemsRequired: string;
147
+ invalidAddress: string;
148
+ noRates: string;
149
+ salesOrderNotLoaded: string;
150
+ unsupportedAddress: string;
151
+ saveRateFailedMessage: string;
152
+ saveRateFailedTitle: string;
153
+ };
154
+ errorTypes: {
155
+ results: string;
156
+ };
157
+ fields: {
158
+ "requires-additional-handling": string;
159
+ addOns: string;
160
+ contentDescription: string;
161
+ confirmation: string;
162
+ dimensions: {
163
+ length: string;
164
+ width: string;
165
+ height: string;
166
+ };
167
+ dimensionsGroup: string;
168
+ estimatedShipping: string;
169
+ insurance: string;
170
+ insuranceProvider: string;
171
+ insuredValue: string;
172
+ items: string;
173
+ orderDate: string;
174
+ orderValue: string;
175
+ packageCode: string;
176
+ requestedShipping: string;
177
+ shipDate: string;
178
+ service: string;
179
+ shipTo: string;
180
+ addShipToAddress: string;
181
+ warehouse: string;
182
+ weight: {
183
+ whole: string;
184
+ fractional: string;
185
+ };
186
+ weightGroup: string;
187
+ today: string;
188
+ };
189
+ hints: {
190
+ contentDescription: string;
191
+ };
192
+ loading: {
193
+ calculatingRates: string;
194
+ };
195
+ modes: {
196
+ browseRates: string;
197
+ selectService: string;
198
+ };
199
+ multipleShippingServices: string;
200
+ schemaErrors: {
201
+ shipFromUnitedStatesOnly: string;
202
+ shipFromAddressRequired: string;
203
+ needToAcknowledge: string;
204
+ };
205
+ rates: {
206
+ uspsMediaMailAcknowledgement: string;
207
+ uspsFirstClassMailAcknowledgement_leof: string;
208
+ };
209
+ shipToAddressFormFields: string;
210
+ sections: {
211
+ customsForm: string;
212
+ shipment: string;
213
+ rate_one: string;
214
+ rate_other: string;
215
+ };
216
+ };
217
+ "payment-method": {
218
+ title: string;
219
+ };
220
+ onboarding: {
221
+ title: string;
222
+ inlineTitle: string;
223
+ landing: {
224
+ action: string;
225
+ title: string;
226
+ subtitle: string;
227
+ welcome: string;
228
+ messageLine1: string;
229
+ messageLine2: string;
230
+ };
231
+ steps: {
232
+ login: string;
233
+ carriers: string;
234
+ addresses: string;
235
+ payment: string;
236
+ };
237
+ warehouse: {
238
+ title: string;
239
+ subtitle: string;
240
+ inlineMessage: string;
241
+ };
242
+ success: {
243
+ title: string;
244
+ subtitle: string;
245
+ action: string;
246
+ };
247
+ };
248
+ "manage-defaults": {
249
+ label: {
250
+ title: string;
251
+ letter: {
252
+ title: string;
253
+ description: string;
254
+ };
255
+ purchase: {
256
+ title: string;
257
+ description: string;
258
+ };
259
+ thermal: {
260
+ title: string;
261
+ description: string;
262
+ };
263
+ };
264
+ status: {
265
+ saving: string;
266
+ saved: string;
267
+ savingFailed: string;
268
+ };
269
+ units: {
270
+ title: string;
271
+ dimensions: {
272
+ title: string;
273
+ standard: string;
274
+ metric: string;
275
+ };
276
+ weight: {
277
+ title: string;
278
+ standard: string;
279
+ g: string;
280
+ kg: string;
281
+ };
282
+ };
283
+ };
284
+ "manage-warehouses": {
285
+ title: string;
286
+ addNew: string;
287
+ editWarehouse: string;
288
+ contactName: string;
289
+ default: string;
290
+ isDefault: string;
291
+ locationName: string;
292
+ residentialAddress: string;
293
+ returnTo: string;
294
+ returnToAddressIsDifferent: string;
295
+ setDefault: string;
296
+ shipFrom: string;
297
+ };
298
+ "manage-funding": {
299
+ actions: {
300
+ addFunds: string;
301
+ addFundsAndPurchase: string;
302
+ addNow: string;
303
+ saveRule: string;
304
+ };
305
+ autoFunding: {
306
+ edit: string;
307
+ editSettings: string;
308
+ error: {
309
+ title: string;
310
+ message: string;
311
+ };
312
+ isEnabledCTA: string;
313
+ isEnabled: string;
314
+ isLoading: string;
315
+ lowBalancePurchaseThreshold: string;
316
+ maximumPurchasesPerDay: string;
317
+ purchaseAmount: string;
318
+ readSettings: string;
319
+ };
320
+ addFunds: {
321
+ custom: string;
322
+ error: {
323
+ title: string;
324
+ message: string;
325
+ };
326
+ isLoading: string;
327
+ labels: {
328
+ amount: string;
329
+ };
330
+ minimumPurchaseAmount: string;
331
+ other: string;
332
+ };
333
+ fundAndPurchase: {
334
+ finalBalance: string;
335
+ insufficientFunds: string;
336
+ insufficientFundsTitle: string;
337
+ negativeBalance: string;
338
+ negativeBalanceTitle: string;
339
+ newBalance: string;
340
+ };
341
+ errors: {
342
+ balanceUnknown: string;
343
+ unableToFindBalance: string;
344
+ };
345
+ currentBalance: string;
346
+ maximumBalanceAmount: string;
347
+ };
348
+ "list-carriers": {
349
+ title: string;
350
+ headers: {
351
+ accountCarriers: string;
352
+ carriers: string;
353
+ settings: string;
354
+ };
355
+ actions: {
356
+ status: {
357
+ connected: string;
358
+ notConnected: string;
359
+ };
360
+ };
361
+ };
362
+ common: {
363
+ actions: {
364
+ add: string;
365
+ cancel: string;
366
+ close: string;
367
+ confirm: string;
368
+ continue: string;
369
+ delete: string;
370
+ edit: string;
371
+ hide: string;
372
+ parse: string;
373
+ purchase: string;
374
+ remove: string;
375
+ save: string;
376
+ skipForNow: string;
377
+ submit: string;
378
+ tryAgain: string;
379
+ };
380
+ address: {
381
+ fields: {
382
+ name: string;
383
+ company: string;
384
+ countryCode: string;
385
+ addressLine1: string;
386
+ addressLine2: string;
387
+ cityLocality: string;
388
+ stateProvince: string;
389
+ postalCode: string;
390
+ phone: string;
391
+ email: string;
392
+ addressResidentialIndicator: string;
393
+ };
394
+ noResults: string;
395
+ subFields: {
396
+ optional: string;
397
+ };
398
+ parserFields: {
399
+ fullAddress: string;
400
+ };
401
+ paste: string;
402
+ preference: {
403
+ confirm: string;
404
+ addressNotValidated: string;
405
+ modified: string;
406
+ title: string;
407
+ originalAddress: string;
408
+ matchedAddress: string;
409
+ unableToValidate: string;
410
+ use: {
411
+ originalAddress: string;
412
+ matchedAddress: string;
413
+ };
414
+ };
415
+ validation: {
416
+ notValidated: string;
417
+ validated: string;
418
+ };
419
+ };
420
+ billing: {
421
+ fields: {
422
+ differentBillingAddress: string;
423
+ name: string;
424
+ cardNumber: string;
425
+ expiration: string;
426
+ cvv: string;
427
+ cvvPlaceholder: string;
428
+ expirationPlaceholder: string;
429
+ cardNumberPlaceholder: string;
430
+ };
431
+ };
432
+ carriers: {
433
+ fields: {
434
+ agreement: string;
435
+ };
436
+ terms: {
437
+ agreeToTerms: string;
438
+ title: string;
439
+ };
440
+ };
441
+ charsetWarnings: {
442
+ name: {
443
+ message: string;
444
+ };
445
+ address: {
446
+ message: string;
447
+ title: string;
448
+ };
449
+ };
450
+ confirmationTypes: {
451
+ adultSignature: string;
452
+ delivery: string;
453
+ deliveryMailed: string;
454
+ directSignature: string;
455
+ none: string;
456
+ signature: string;
457
+ verbalConfirmation: string;
458
+ };
459
+ customs: {
460
+ addDeclaration: string;
461
+ contents: {
462
+ documents: string;
463
+ gift: string;
464
+ merchandise: string;
465
+ returnedGoods: string;
466
+ sample: string;
467
+ };
468
+ declarations: string;
469
+ each: string;
470
+ fields: {
471
+ contentsType: string;
472
+ countryOfOrigin: string;
473
+ description: string;
474
+ harmonizedTariffCode: string;
475
+ ifDeliveryFails: string;
476
+ quantity: string;
477
+ sku: string;
478
+ value: string;
479
+ valueQuantity: string;
480
+ };
481
+ nonDelivery: {
482
+ returnToSender: string;
483
+ treatAsAbandoned: string;
484
+ };
485
+ removeAllDeclarations: string;
486
+ total: string;
487
+ };
488
+ errorMessages: {
489
+ invalidNameOrCompany: string;
490
+ noWarehouses: string;
491
+ unableToLoad: {
492
+ accountSettings: string;
493
+ autoFundingSettings: string;
494
+ carrier: string;
495
+ carriers: string;
496
+ label: string;
497
+ salesOrder: string;
498
+ shipment: string;
499
+ warehouses: string;
500
+ };
501
+ unknown: string;
502
+ noRatesAvailable: string;
503
+ };
504
+ errorTypes: {
505
+ accountStatus: string;
506
+ businessRules: string;
507
+ integrations: string;
508
+ purchase: string;
509
+ rateInvalid: string;
510
+ security: string;
511
+ system: string;
512
+ unknown: string;
513
+ validation: string;
514
+ };
515
+ insuranceProviders: {
516
+ carrier: string;
517
+ none: string;
518
+ shipsurance: string;
519
+ thirdParty: string;
520
+ };
521
+ loading: {
522
+ accountSettings: string;
523
+ carrier: string;
524
+ carriers: string;
525
+ data: string;
526
+ importingSalesOrder: string;
527
+ label: string;
528
+ onboarding: string;
529
+ salesOrder: string;
530
+ shipment: string;
531
+ warehouses: string;
532
+ };
533
+ months: {
534
+ january: string;
535
+ february: string;
536
+ march: string;
537
+ april: string;
538
+ may: string;
539
+ june: string;
540
+ july: string;
541
+ august: string;
542
+ september: string;
543
+ october: string;
544
+ november: string;
545
+ december: string;
546
+ };
547
+ packageCategories: {
548
+ browseRates: string;
549
+ myCustomPackages: string;
550
+ };
551
+ packageCodes: {
552
+ package: string;
553
+ };
554
+ "powered-by": string;
555
+ schema: {
556
+ optionalLabel: string;
557
+ };
558
+ schemaErrors: {
559
+ notAValidPhoneNumber: string;
560
+ mustAgreeToTerms: string;
561
+ group: {
562
+ allMeasurementsOrNone: string;
563
+ };
564
+ invalidAddressName: string;
565
+ invalidAddressPoBox: string;
566
+ invalidCreditCardType: string;
567
+ invalidExpiration: string;
568
+ invalidPostalCode: string;
569
+ invalidStateProvince: string;
570
+ invalidString: string;
571
+ nonnegative: string;
572
+ nonnegativeList: string;
573
+ positive: string;
574
+ positiveList: string;
575
+ required: string;
576
+ requiredList: string;
577
+ tooFewCharacters: string;
578
+ tooManyCharacters: string;
579
+ };
580
+ shippingPresets: {
581
+ apply: string;
582
+ platform: string;
583
+ user: string;
584
+ };
585
+ weight: {
586
+ ounces: string;
587
+ pounds_one: string;
588
+ pounds_other: string;
589
+ };
590
+ units: {
591
+ in: string;
592
+ lbs: string;
593
+ oz: string;
594
+ };
595
+ "VGhlIHNlbGVjdGVkIHNlcnZpY2UgaW5jbHVkZXMgaW5zdXJhbmNlIGZvciBhbiBpbnN1cmVkIGFtb3VudCB1cCB0byAkMTAwLgo=": string;
596
+ "VGhlIHNlbGVjdGVkIHNlcnZpY2UgaW5jbHVkZXMgaW5zdXJhbmNlIGZvciBhbiBpbnN1cmVkIGFtb3VudCB1cCB0byAkNTAuCg==": string;
597
+ QSBzaGlwcGluZyBjYXJyaWVyIGVycm9yIG9jY3VycmVkOiBJbnN1ZmZpY2llbnQgYWNjb3VudCBiYWxhbmNlLiBBY2NvdW50IGV4Y2VwdGlvbiBFeGNlcHRpb24gd2l0aCBjb2RlIDB4MDA1NjAxMDE7IG1vZHVsZSA4NiwgY2F0ZWdvcnkgMSwgaXRlbSAx: string;
598
+ "QWRkcmVzcyBub3QgZm91bmQ=": string;
599
+ QSBzaGlwcGluZyBjYXJyaWVyIGVycm9yIG9jY3VycmVkOiBVUFMgd2VpZ2h0IGxpbWl0IHBlciBwYWNrYWdlIGlzIDE1MCBsYnMu: string;
600
+ UGxlYXNlIGFkZCBhIFN0YW1wcy5jb20gYWNjb3VudCB0byBTaGlwRW5naW5lIGluIG9yZGVyIHRvIGNyZWF0ZSBzaGlwcGluZyBsYWJlbHMu: string;
601
+ QSBzaGlwcGluZyBlcnJvciBvY2N1cnJlZDogTWlzc2luZyBvciBpbnZhbGlkIHNoaXBwZXIgbnVtYmVy: string;
602
+ "QSBzaGlwcGluZyBjYXJyaWVyIGVycm9yIG9jY3VycmVkOiBNaXNzaW5nIG9yIGludmFsaWQgc2hpcCB0byBTdGF0ZVByb3ZpbmNlQ29kZQ==": string;
603
+ "QSBzaGlwcGluZyBjYXJyaWVyIGVycm9yIG9jY3VycmVkOiBJbnZhbGlkIHNvbGQgdG8gc3RhdGUgcHJvdmluY2UgY29kZS4gVmFsaWQgbGVuZ3RoIGlzIDAgdG8gNSBhbHBoYW51bWVyaWM=": string;
604
+ };
605
+ "account-settings": {
606
+ title: string;
607
+ sections: {
608
+ accountBalance: string;
609
+ paymentMethod: string;
610
+ transactionHistory: string;
611
+ adjustmentHistory: string;
612
+ warehouses: string;
613
+ carriers: string;
614
+ labelLayout: string;
615
+ unitSettings: string;
616
+ };
617
+ };
618
+ };
619
+ } | undefined;
620
+ }) => import("@emotion/react/jsx-runtime").JSX.Element;
621
+ export type ElementProps = React.ComponentProps<typeof Element>;
@@ -0,0 +1 @@
1
+ export * as AccountSettings from "./account-settings";
@@ -9,6 +9,7 @@ export type UseAddressProps = {
9
9
  shipment?: SE.SalesOrderShipment;
10
10
  };
11
11
  export declare const useAddress: ({ compatibleCountryCodes, onChange, onValidation, salesOrder, shipment, }: UseAddressProps) => {
12
+ addressLoading: boolean;
12
13
  addressErrors: SE.CodedError[] | undefined;
13
14
  addressPreference: Templates.AddressPreference | undefined;
14
15
  charsetWarning: Templates.CharsetWarning | undefined;
@@ -13,6 +13,7 @@ export type UseShipmentFormProps = {
13
13
  shipment?: SE.SalesOrderShipment;
14
14
  };
15
15
  export declare const useShipmentForm: ({ compatibleCountryCodes, onAddressValidation, onApplyPreset, onChangeAddress, onShipmentUpdated, onSubmit, salesOrder, shipment, }: UseShipmentFormProps) => {
16
+ addressLoading: boolean;
16
17
  addressPreference: import("../../../components/templates").AddressPreference | undefined;
17
18
  carriers: SE.Carrier[] | undefined;
18
19
  charsetWarning: import("../../../components/templates").CharsetWarning | undefined;
@@ -1,3 +1,4 @@
1
+ export * from "./account-settings";
1
2
  export * from "./list-carriers";
2
3
  export * from "./manage-warehouses";
3
4
  export * from "./onboarding";