@shipengine/elements 1.3.2 → 1.5.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/index.cjs +12553 -8745
- package/index.js +12550 -8752
- package/package.json +5 -4
- package/src/components/carrier-connection-card/carrier-connection-card.d.ts +11 -0
- package/src/components/carrier-connection-card/carrier-connection-card.styles.d.ts +35 -0
- package/src/components/carrier-connection-card/index.d.ts +1 -0
- package/src/components/field/create-field-controller.d.ts +1 -1
- package/src/components/field/input-group/input-group.d.ts +9 -0
- package/src/components/field/input-group/input-group.styles.d.ts +24 -0
- package/src/components/field/rate-card/rate-card.d.ts +4 -1
- package/src/components/field/rate-card/rate-card.styles.d.ts +1 -0
- package/src/components/field/rate-select/rate-select.d.ts +3 -0
- package/src/components/field-label/field-label.d.ts +2 -1
- package/src/components/field-label/field-label.styles.d.ts +9 -0
- package/src/components/fund-and-purchase/fund-and-purchase.d.ts +2 -1
- package/src/components/index.d.ts +3 -0
- package/src/components/modal/index.d.ts +2 -0
- package/src/components/modal/modal-container.d.ts +15 -0
- package/src/components/modal/modal.d.ts +9 -0
- package/src/components/modal/modal.styles.d.ts +17 -0
- package/src/components/pager/pager.styles.d.ts +1 -0
- package/src/components/section/section.d.ts +2 -1
- package/src/components/section/section.styles.d.ts +13 -13
- package/src/components/service-point-display/index.d.ts +1 -0
- package/src/components/service-point-display/service-point-display.d.ts +10 -0
- package/src/components/service-point-display/service-point-display.styles.d.ts +43 -0
- package/src/components/service-points/index.d.ts +1 -0
- package/src/components/service-points/service-points.d.ts +8 -0
- package/src/components/service-points/service-points.styles.d.ts +44 -0
- package/src/components/skeleton/index.d.ts +1 -0
- package/src/components/skeleton/skeleton-carrier-row.d.ts +1 -0
- package/src/components/skeleton/skeleton-carrier-row.styles.d.ts +17 -0
- package/src/components/suspend/index.d.ts +1 -0
- package/src/components/suspend/suspend-text.d.ts +5 -0
- package/src/components/tabs/tabs.d.ts +2 -1
- package/src/components/tabs/tabs.styles.d.ts +3 -3
- package/src/components/templates/account-settings/account-settings.d.ts +5 -1
- package/src/components/templates/add-carrier-form/add-carrier-form-schema.d.ts +12 -3
- package/src/components/templates/address-form/address-form-schema.d.ts +24 -0
- package/src/components/templates/address-form/address-schema.d.ts +3 -0
- package/src/components/templates/available-carriers-list/available-carriers-list.d.ts +10 -0
- package/src/components/templates/available-carriers-list/available-carriers-list.styles.d.ts +6 -0
- package/src/components/templates/available-carriers-list/index.d.ts +1 -0
- package/src/components/templates/connect-carrier-form/connect-carrier-form.d.ts +4 -2
- package/src/components/templates/connect-carrier-form/connect-carrier-form.styles.d.ts +0 -1
- package/src/components/templates/connected-carrier-list/connected-carrier-list.d.ts +8 -0
- package/src/components/templates/connected-carrier-list/connected-carrier-list.styles.d.ts +35 -0
- package/src/components/templates/connected-carrier-list/connected-carrier-row/connected-carrier-row.d.ts +8 -0
- package/src/components/templates/connected-carrier-list/connected-carrier-row/connected-carrier-row.styles.d.ts +36 -0
- package/src/components/templates/connected-carrier-list/connected-carrier-row/index.d.ts +1 -0
- package/src/components/templates/connected-carrier-list/index.d.ts +1 -0
- package/src/components/templates/index.d.ts +1 -1
- package/src/components/templates/list-carriers/list-carriers.d.ts +1 -1
- package/src/components/templates/list-carriers/list-carriers.styles.d.ts +0 -15
- package/src/components/templates/product-form/product-form.d.ts +4 -1
- package/src/components/templates/product-form/product-form.styles.d.ts +9 -0
- package/src/components/templates/products-display/products-display.d.ts +2 -1
- package/src/components/templates/pudo-rate-tabs/index.d.ts +2 -0
- package/src/components/templates/pudo-rate-tabs/pudo-rate-tabs.d.ts +22 -0
- package/src/components/templates/pudo-rate-tabs/service-points-search-bar/index.d.ts +1 -0
- package/src/components/templates/pudo-rate-tabs/service-points-search-bar/service-points-search-bar.d.ts +6 -0
- package/src/components/templates/rate-form/rate-form.d.ts +1 -1
- package/src/components/templates/shipment-form/shipment-form.d.ts +3 -1
- package/src/components/templates/wallet-form/wallet-schema.d.ts +36 -26
- package/src/components/templates/warehouse-form/warehouse-form-schema.d.ts +75 -37
- package/src/components/templates/warehouse-form/warehouse-form.d.ts +2 -1
- package/src/elements/account-settings/account-settings.d.ts +106 -33
- package/src/elements/configure-shipment/configure-shipment.d.ts +1 -0
- package/src/elements/configure-shipment/hooks/use-rates-form.d.ts +1 -1
- package/src/elements/configure-shipment/hooks/use-shipment-form.d.ts +1 -0
- package/src/elements/connect-carrier/connect-carrier.d.ts +141 -3
- package/src/elements/external-carriers/external-carriers.d.ts +34 -0
- package/src/elements/external-carriers/index.d.ts +1 -0
- package/src/elements/index.d.ts +1 -0
- package/src/elements/labels-grid/labels-grid.d.ts +82 -1
- package/src/elements/purchase-label/purchase-label.d.ts +90 -2
- package/src/elements/shipengine-workflow/label-workflow.d.ts +4 -1
- package/src/elements/shipments-grid/shipments-grid.d.ts +82 -1
- package/src/elements/theme-creator/theme-creator.d.ts +82 -1
- package/src/elements/view-shipment/view-shipment.d.ts +82 -1
- package/src/elements/void-label/void-label.d.ts +85 -2
- package/src/factories/shipengine/service-point.d.ts +3 -0
- package/src/hooks/options/index.d.ts +1 -0
- package/src/hooks/options/use-rate-options.d.ts +12 -1
- package/src/hooks/options/use-service-points.d.ts +8 -0
- package/src/hooks/use-nested-form.d.ts +5 -1
- package/src/locales/en/index.d.ts +82 -1
- package/src/utilities/feature-flags.d.ts +16 -1
- package/src/utilities/rates.d.ts +3 -1
- package/src/utilities/shipengine/address.d.ts +9 -0
- package/src/workflows/onboarding/components/carrier-recovery-form/carrier-recovery-form-schema.d.ts +20 -0
- package/src/workflows/onboarding/components/funding-and-carrier-connection-step/use-funding-and-carrier-connection-step.d.ts +1 -0
- package/src/workflows/onboarding/onboarding.d.ts +89 -2
|
@@ -6,6 +6,7 @@ export type WarehouseFormProps = {
|
|
|
6
6
|
onSubmit: (payload: WarehousePayload) => void;
|
|
7
7
|
shouldForceDefault?: boolean;
|
|
8
8
|
submitButtonTitle: string;
|
|
9
|
+
useStrictSchema?: boolean;
|
|
9
10
|
warehouse?: SE.Warehouse | Pick<SE.Warehouse, "name" | "isDefault" | "originAddress" | "returnAddress">;
|
|
10
11
|
};
|
|
11
|
-
export declare const WarehouseForm: ({ onCancel, onDelete, onSubmit, submitButtonTitle, warehouse, shouldForceDefault, }: WarehouseFormProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const WarehouseForm: ({ onCancel, onDelete, onSubmit, submitButtonTitle, warehouse, shouldForceDefault, useStrictSchema, }: WarehouseFormProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { AccountSettingsFeatures } from "../../components/templates/account-settings";
|
|
2
3
|
/**
|
|
3
4
|
* # Account Settings Component Props
|
|
4
5
|
*
|
|
@@ -7,6 +8,10 @@
|
|
|
7
8
|
* @see {@link AccountSettings.Component | This prop types usage in the `<AccountSettings /> component`}
|
|
8
9
|
*/
|
|
9
10
|
export type ComponentProps = {
|
|
11
|
+
/**
|
|
12
|
+
* Feature flags controlling operation of various sub components.
|
|
13
|
+
*/
|
|
14
|
+
features?: AccountSettingsFeatures;
|
|
10
15
|
/**
|
|
11
16
|
* This callback function will be used to house the logic you wish to execute when the
|
|
12
17
|
* user saves new changes to their account settings.
|
|
@@ -35,7 +40,7 @@ export type ComponentProps = {
|
|
|
35
40
|
*
|
|
36
41
|
* @see {@link AccountSettings.Element | The **Element** created to render `<AccountSettings />`}
|
|
37
42
|
*/
|
|
38
|
-
export declare const Component: ({ onSaveSettings }: ComponentProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
43
|
+
export declare const Component: ({ features, onSaveSettings }: ComponentProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
39
44
|
/**
|
|
40
45
|
* # Registered Account Settings Element
|
|
41
46
|
*
|
|
@@ -182,30 +187,6 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
182
187
|
billing: {
|
|
183
188
|
title: string;
|
|
184
189
|
subtitleCard: string;
|
|
185
|
-
/**
|
|
186
|
-
* # Registered Account Settings Element
|
|
187
|
-
*
|
|
188
|
-
* - This is the registered `<AccountSettings />` element that will be used to render the
|
|
189
|
-
* `<AccountSettings.Element />` component.
|
|
190
|
-
*
|
|
191
|
-
* @param ElementProps The props, callbacks, and resources necessary to render
|
|
192
|
-
* the `<AccountSettings.Element />` component.
|
|
193
|
-
*
|
|
194
|
-
* @example
|
|
195
|
-
* The `<Component />` is the source JSX that is rendered when you make use of the `AccountSettings`
|
|
196
|
-
* Element directly. Here is a brief example of how you would use it within your application.
|
|
197
|
-
* ```tsx
|
|
198
|
-
* <AccountSettings.Element/>
|
|
199
|
-
* ```
|
|
200
|
-
*
|
|
201
|
-
* <br />
|
|
202
|
-
*
|
|
203
|
-
* @see {@link AccountSettings.ComponentProps | The **props** that can be passed into the `<AccountSettings.Element />` component}
|
|
204
|
-
* @see {@link ListCarriers.Component | The `<List-Carriers />` component used to view connected carriers}
|
|
205
|
-
* @see {@link ManageWarehouses.Component | The `<ManageWarehouses />` component used to add, update, or remove warehouses}
|
|
206
|
-
* @see {@link PaymentMethodSettings | The `<PaymentMethodSettings />` component used to manage payment methods}
|
|
207
|
-
* @see {@link ManageFunding | The `<ManageFunding />` component used to manage funding rules and add funds to a carrier account}
|
|
208
|
-
*/
|
|
209
190
|
subtitleBilling: string;
|
|
210
191
|
};
|
|
211
192
|
};
|
|
@@ -223,6 +204,8 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
223
204
|
purchaseLabel: string;
|
|
224
205
|
purchaseNow: string;
|
|
225
206
|
showItems: string;
|
|
207
|
+
showMoreRates: string;
|
|
208
|
+
showFewerRates: string;
|
|
226
209
|
/**
|
|
227
210
|
* # Account Settings Component Props
|
|
228
211
|
*
|
|
@@ -230,8 +213,6 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
230
213
|
*
|
|
231
214
|
* @see {@link AccountSettings.Component | This prop types usage in the `<AccountSettings /> component`}
|
|
232
215
|
*/
|
|
233
|
-
showMoreRates: string;
|
|
234
|
-
showFewerRates: string;
|
|
235
216
|
saveRate: string;
|
|
236
217
|
};
|
|
237
218
|
balance: {
|
|
@@ -313,6 +294,24 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
313
294
|
noCarrier: string;
|
|
314
295
|
noWarehouseOrCarrier: string;
|
|
315
296
|
};
|
|
297
|
+
servicePoints: {
|
|
298
|
+
searchLabel: string;
|
|
299
|
+
noRatesForType: string;
|
|
300
|
+
dropOff: string;
|
|
301
|
+
pickUp: string;
|
|
302
|
+
closed: string;
|
|
303
|
+
hideLocations: string;
|
|
304
|
+
moreLocations: string;
|
|
305
|
+
nearestLocation: string;
|
|
306
|
+
open: string;
|
|
307
|
+
nextOpeningDay: string;
|
|
308
|
+
until: string;
|
|
309
|
+
selected: string;
|
|
310
|
+
selectLocation: string;
|
|
311
|
+
viewMap: string;
|
|
312
|
+
otherLocations: string;
|
|
313
|
+
noServicePointsFound: string;
|
|
314
|
+
};
|
|
316
315
|
shipToAddressFormFields: string;
|
|
317
316
|
sections: {
|
|
318
317
|
customsForm: string;
|
|
@@ -363,11 +362,13 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
363
362
|
"aHR0cHM6Ly93d3cuZXZyaS5jb20vdGVybXMtYW5kLWNvbmRpdGlvbnM=": string;
|
|
364
363
|
"aHR0cHM6Ly93d3cueW9kZWxkaXJlY3QuY28udWsvY29udGVudC9hYm91dC10ZXJtcw==": string;
|
|
365
364
|
aHR0cHM6Ly93d3cuc2hpcHN0YXRpb24uY29tL3Rlcm1zLXNlcnZpY2UtdW5pdGVkLWtpbmdkb20v: string;
|
|
365
|
+
"aHR0cHM6Ly93d3cuZHBkLmNvLnVrL3N0YW5kYXJkX3Rlcm1zX2FuZF9jb25kaXRpb25zLmpzcA==": string;
|
|
366
366
|
};
|
|
367
367
|
termsAndAgreementTitles: {
|
|
368
368
|
"WW9kZWwgRGlyZWN0IC0gVGVybXMgYW5kIENvbmRpdGlvbnMgKOKAnFRlcm1z4oCdKQ==": string;
|
|
369
369
|
"RXZyaSBTZW5kIFRlcm1zICYgQ29uZGl0aW9ucw==": string;
|
|
370
370
|
"VGVybXMgb2YgU2VydmljZSBVbml0ZWQgS2luZ2RvbQ==": string;
|
|
371
|
+
RFBEIFN0YW5kYXJkIFRlcm1zIGFuZCBDb25kaXRpb25z: string;
|
|
371
372
|
};
|
|
372
373
|
};
|
|
373
374
|
"manage-defaults": {
|
|
@@ -399,6 +400,10 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
399
400
|
metric: string;
|
|
400
401
|
};
|
|
401
402
|
weight: {
|
|
403
|
+
/**
|
|
404
|
+
* This callback function will be used to house the logic you wish to execute when the
|
|
405
|
+
* user saves new changes to their account settings.
|
|
406
|
+
*/
|
|
402
407
|
title: string;
|
|
403
408
|
standard: string;
|
|
404
409
|
g: string;
|
|
@@ -467,9 +472,42 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
467
472
|
balanceUnknown: string;
|
|
468
473
|
unableToFindBalance: string;
|
|
469
474
|
};
|
|
475
|
+
byoc: {
|
|
476
|
+
invoiceNotification: string;
|
|
477
|
+
};
|
|
470
478
|
currentBalance: string;
|
|
471
479
|
maximumBalanceAmount: string;
|
|
472
480
|
};
|
|
481
|
+
"list-shipments": {
|
|
482
|
+
title: string;
|
|
483
|
+
headers: {
|
|
484
|
+
created: string;
|
|
485
|
+
download: string;
|
|
486
|
+
shipmentId: string;
|
|
487
|
+
shipDate: string;
|
|
488
|
+
shipTo: string;
|
|
489
|
+
};
|
|
490
|
+
actions: {
|
|
491
|
+
download: {
|
|
492
|
+
pdf: string;
|
|
493
|
+
};
|
|
494
|
+
};
|
|
495
|
+
};
|
|
496
|
+
"list-labels": {
|
|
497
|
+
title: string;
|
|
498
|
+
headers: {
|
|
499
|
+
created: string;
|
|
500
|
+
download: string;
|
|
501
|
+
labelId: string;
|
|
502
|
+
service: string;
|
|
503
|
+
shipTo: string;
|
|
504
|
+
};
|
|
505
|
+
actions: {
|
|
506
|
+
download: {
|
|
507
|
+
pdf: string;
|
|
508
|
+
};
|
|
509
|
+
};
|
|
510
|
+
};
|
|
473
511
|
"list-carriers": {
|
|
474
512
|
title: string;
|
|
475
513
|
headers: {
|
|
@@ -496,16 +534,17 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
496
534
|
edit: string;
|
|
497
535
|
hide: string;
|
|
498
536
|
parse: string;
|
|
499
|
-
purchase: string;
|
|
537
|
+
purchase: string;
|
|
538
|
+
remove: string;
|
|
539
|
+
save: string;
|
|
540
|
+
skipForNow: string;
|
|
541
|
+
/**
|
|
500
542
|
* # Account Settings Component Props
|
|
501
543
|
*
|
|
502
544
|
* - These are the base props that will be passed into the `<AccountSettings />` component.
|
|
503
545
|
*
|
|
504
546
|
* @see {@link AccountSettings.Component | This prop types usage in the `<AccountSettings /> component`}
|
|
505
547
|
*/
|
|
506
|
-
remove: string;
|
|
507
|
-
save: string;
|
|
508
|
-
skipForNow: string;
|
|
509
548
|
submit: string;
|
|
510
549
|
tryAgain: string;
|
|
511
550
|
};
|
|
@@ -519,7 +558,10 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
519
558
|
addressLine2: string;
|
|
520
559
|
cityLocality: string;
|
|
521
560
|
stateProvince: string;
|
|
522
|
-
postalCode: string;
|
|
561
|
+
postalCode: string; /**
|
|
562
|
+
* This callback function will be used to house the logic you wish to execute when the
|
|
563
|
+
* user saves new changes to their account settings.
|
|
564
|
+
*/
|
|
523
565
|
phone: string;
|
|
524
566
|
email: string;
|
|
525
567
|
addressResidentialIndicator: string;
|
|
@@ -598,8 +640,13 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
598
640
|
returnedGoods: string;
|
|
599
641
|
sample: string;
|
|
600
642
|
};
|
|
643
|
+
currencyChange: string;
|
|
601
644
|
declarations: string;
|
|
602
|
-
|
|
645
|
+
descriptionTooltip: {
|
|
646
|
+
message: string;
|
|
647
|
+
example1: string;
|
|
648
|
+
example2: string;
|
|
649
|
+
};
|
|
603
650
|
fields: {
|
|
604
651
|
contentsType: string;
|
|
605
652
|
countryOfOrigin: string;
|
|
@@ -631,10 +678,13 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
631
678
|
connectCarrierForm: string;
|
|
632
679
|
fundingSourceMetadata: string;
|
|
633
680
|
label: string;
|
|
681
|
+
labels: string;
|
|
634
682
|
salesOrder: string;
|
|
635
683
|
shipment: string;
|
|
684
|
+
shipments: string;
|
|
636
685
|
warehouses: string;
|
|
637
686
|
};
|
|
687
|
+
emailIsRequired: string;
|
|
638
688
|
unknown: string;
|
|
639
689
|
noRatesAvailable: string;
|
|
640
690
|
};
|
|
@@ -672,9 +722,11 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
672
722
|
data: string;
|
|
673
723
|
importingSalesOrder: string;
|
|
674
724
|
label: string;
|
|
725
|
+
labels: string;
|
|
675
726
|
onboarding: string;
|
|
676
727
|
salesOrder: string;
|
|
677
728
|
shipment: string;
|
|
729
|
+
shipments: string;
|
|
678
730
|
warehouses: string;
|
|
679
731
|
};
|
|
680
732
|
months: {
|
|
@@ -710,6 +762,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
710
762
|
};
|
|
711
763
|
invalidAddressName: string;
|
|
712
764
|
invalidAddressNameStrict: string;
|
|
765
|
+
invalidAddressOnboarding: string;
|
|
713
766
|
invalidAddressPoBox: string;
|
|
714
767
|
invalidCreditCardType: string;
|
|
715
768
|
invalidExpirationDate: string;
|
|
@@ -766,10 +819,29 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
766
819
|
"QSBzaGlwcGluZyBjYXJyaWVyIGVycm9yIG9jY3VycmVkOiBJbnZhbGlkIHNvbGQgdG8gc3RhdGUgcHJvdmluY2UgY29kZS4gVmFsaWQgbGVuZ3RoIGlzIDAgdG8gNSBhbHBoYW51bWVyaWM=": string;
|
|
767
820
|
};
|
|
768
821
|
"connect-carrier": {
|
|
822
|
+
actions: {
|
|
823
|
+
cancel: string;
|
|
824
|
+
connectCarriers: string;
|
|
825
|
+
disconnect: string;
|
|
826
|
+
disconnectCarrier: string;
|
|
827
|
+
};
|
|
828
|
+
noCarriersDescription: string;
|
|
769
829
|
registrationForm: {
|
|
830
|
+
error: string;
|
|
770
831
|
title: string;
|
|
771
832
|
betaWarning: string;
|
|
772
833
|
};
|
|
834
|
+
search: string;
|
|
835
|
+
settingsModal: {
|
|
836
|
+
/**
|
|
837
|
+
* Feature flags controlling operation of various sub components.
|
|
838
|
+
*/
|
|
839
|
+
closeDialog: string;
|
|
840
|
+
header: string;
|
|
841
|
+
};
|
|
842
|
+
status: {
|
|
843
|
+
connected: string;
|
|
844
|
+
};
|
|
773
845
|
};
|
|
774
846
|
"account-settings": {
|
|
775
847
|
messages: {
|
|
@@ -783,6 +855,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
783
855
|
adjustmentHistory: string;
|
|
784
856
|
warehouses: string;
|
|
785
857
|
carriers: string;
|
|
858
|
+
externalCarriers: string;
|
|
786
859
|
labelLayout: string;
|
|
787
860
|
unitSettings: string;
|
|
788
861
|
};
|
|
@@ -19,6 +19,7 @@ export type ShipmentFormMode = "browse_rates" | "select_service";
|
|
|
19
19
|
export type RateFormFeatures = {
|
|
20
20
|
enableFunding?: boolean;
|
|
21
21
|
enableGlobalPostFiltering?: boolean;
|
|
22
|
+
enablePudoUI?: boolean;
|
|
22
23
|
labelLayout?: boolean;
|
|
23
24
|
nicknameRate?: boolean;
|
|
24
25
|
requireDhlTermsAcknowledgement?: boolean;
|
|
@@ -30,7 +30,7 @@ export declare const useRatesForm: ({ getPreferredRates, onBeforeRateSaved, onBe
|
|
|
30
30
|
labels: SE.Label[];
|
|
31
31
|
labelsLoading: boolean;
|
|
32
32
|
onSave: ({ carrierId, serviceCode }: Pick<SE.Rate, "carrierId" | "serviceCode">) => Promise<void>;
|
|
33
|
-
onSubmit: (rateId: string) => Promise<void>;
|
|
33
|
+
onSubmit: (rateId: string, servicePoint?: SE.ServicePoint) => Promise<void>;
|
|
34
34
|
preferredRates: import("..").PreferredRatesResponse | undefined;
|
|
35
35
|
rates: SE.Rate[] | undefined;
|
|
36
36
|
requestRates: (shipment: SE.SalesOrderShipment, isInternational: boolean) => Promise<void>;
|
|
@@ -23,6 +23,7 @@ export declare const useShipmentForm: ({ compatibleCountryCodes, onAddressValida
|
|
|
23
23
|
errors: SE.CodedError[] | undefined;
|
|
24
24
|
onApplyPreset: (preset: ShippingPreset) => Promise<void>;
|
|
25
25
|
onChangeAddress: (shipTo: SE.Address, { shouldValidate }: import("../../../components/templates").OnChangeAddressOptions) => Promise<SE.SalesOrderShipment>;
|
|
26
|
+
onChangeWarehouse: (warehouseId: string) => Promise<void>;
|
|
26
27
|
onSubmit: (values: Partial<SE.SalesOrderShipment>) => Promise<SE.SalesOrderShipment>;
|
|
27
28
|
onSubmitParseShipTo: ({ fullAddress }: {
|
|
28
29
|
fullAddress: string;
|
|
@@ -1,8 +1,42 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
export type ConnectCarrierFeatures = {
|
|
3
|
+
availableCarrierConnections?: string[];
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* # Connect-Carrier Props
|
|
7
|
+
*
|
|
8
|
+
* @see {@link ConnectCarrier.Component | The `<ConnectCarrier />` component}
|
|
9
|
+
*/
|
|
2
10
|
export type ComponentProps = {
|
|
3
|
-
carrierName
|
|
11
|
+
carrierName?: string;
|
|
12
|
+
features?: ConnectCarrierFeatures;
|
|
13
|
+
onCancel?: () => void;
|
|
14
|
+
onCarrierConnected?: (carrierId: string) => void;
|
|
4
15
|
};
|
|
5
|
-
|
|
16
|
+
/**
|
|
17
|
+
* # Connect-Carriers Component
|
|
18
|
+
*
|
|
19
|
+
* @param ComponentProps The base props that will be passed into the `<ConnectCarrier />` component.
|
|
20
|
+
*
|
|
21
|
+
* @returns Element A React element that renders the `<ConnectCarrier />` component allowing users
|
|
22
|
+
* to connect their own existing carrier account. If no carrier is provided, the user may
|
|
23
|
+
* select from a list of carriers specified by `features.availableCarrierConnections`.
|
|
24
|
+
* This component is composed in the `<AccountSettings />` Element.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```tsx
|
|
28
|
+
* (() => {
|
|
29
|
+
* const features = useFeatures("CarrierConnections");
|
|
30
|
+
*
|
|
31
|
+
* return <ConnectCarrier.Component features={features} />;
|
|
32
|
+
* })();
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* <br />
|
|
36
|
+
*
|
|
37
|
+
* @see {@link ConnectCarrier.ComponentProps | The props that are passed into the `<ConnectCarrier />` component}
|
|
38
|
+
*/
|
|
39
|
+
export declare const Component: ({ carrierName, features, onCancel, onCarrierConnected, }: ComponentProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
6
40
|
export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
7
41
|
resources?: {
|
|
8
42
|
en: {
|
|
@@ -225,6 +259,24 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
225
259
|
noCarrier: string;
|
|
226
260
|
noWarehouseOrCarrier: string;
|
|
227
261
|
};
|
|
262
|
+
servicePoints: {
|
|
263
|
+
searchLabel: string;
|
|
264
|
+
noRatesForType: string;
|
|
265
|
+
dropOff: string;
|
|
266
|
+
pickUp: string;
|
|
267
|
+
closed: string;
|
|
268
|
+
hideLocations: string;
|
|
269
|
+
moreLocations: string;
|
|
270
|
+
nearestLocation: string;
|
|
271
|
+
open: string;
|
|
272
|
+
nextOpeningDay: string;
|
|
273
|
+
until: string;
|
|
274
|
+
selected: string;
|
|
275
|
+
selectLocation: string;
|
|
276
|
+
viewMap: string;
|
|
277
|
+
otherLocations: string;
|
|
278
|
+
noServicePointsFound: string;
|
|
279
|
+
};
|
|
228
280
|
shipToAddressFormFields: string;
|
|
229
281
|
sections: {
|
|
230
282
|
customsForm: string;
|
|
@@ -275,11 +327,13 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
275
327
|
"aHR0cHM6Ly93d3cuZXZyaS5jb20vdGVybXMtYW5kLWNvbmRpdGlvbnM=": string;
|
|
276
328
|
"aHR0cHM6Ly93d3cueW9kZWxkaXJlY3QuY28udWsvY29udGVudC9hYm91dC10ZXJtcw==": string;
|
|
277
329
|
aHR0cHM6Ly93d3cuc2hpcHN0YXRpb24uY29tL3Rlcm1zLXNlcnZpY2UtdW5pdGVkLWtpbmdkb20v: string;
|
|
330
|
+
"aHR0cHM6Ly93d3cuZHBkLmNvLnVrL3N0YW5kYXJkX3Rlcm1zX2FuZF9jb25kaXRpb25zLmpzcA==": string;
|
|
278
331
|
};
|
|
279
332
|
termsAndAgreementTitles: {
|
|
280
333
|
"WW9kZWwgRGlyZWN0IC0gVGVybXMgYW5kIENvbmRpdGlvbnMgKOKAnFRlcm1z4oCdKQ==": string;
|
|
281
334
|
"RXZyaSBTZW5kIFRlcm1zICYgQ29uZGl0aW9ucw==": string;
|
|
282
335
|
"VGVybXMgb2YgU2VydmljZSBVbml0ZWQgS2luZ2RvbQ==": string;
|
|
336
|
+
RFBEIFN0YW5kYXJkIFRlcm1zIGFuZCBDb25kaXRpb25z: string;
|
|
283
337
|
};
|
|
284
338
|
};
|
|
285
339
|
"manage-defaults": {
|
|
@@ -379,9 +433,42 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
379
433
|
balanceUnknown: string;
|
|
380
434
|
unableToFindBalance: string;
|
|
381
435
|
};
|
|
436
|
+
byoc: {
|
|
437
|
+
invoiceNotification: string;
|
|
438
|
+
};
|
|
382
439
|
currentBalance: string;
|
|
383
440
|
maximumBalanceAmount: string;
|
|
384
441
|
};
|
|
442
|
+
"list-shipments": {
|
|
443
|
+
title: string;
|
|
444
|
+
headers: {
|
|
445
|
+
created: string;
|
|
446
|
+
download: string;
|
|
447
|
+
shipmentId: string;
|
|
448
|
+
shipDate: string;
|
|
449
|
+
shipTo: string;
|
|
450
|
+
};
|
|
451
|
+
actions: {
|
|
452
|
+
download: {
|
|
453
|
+
pdf: string;
|
|
454
|
+
};
|
|
455
|
+
};
|
|
456
|
+
};
|
|
457
|
+
"list-labels": {
|
|
458
|
+
title: string;
|
|
459
|
+
headers: {
|
|
460
|
+
created: string;
|
|
461
|
+
download: string;
|
|
462
|
+
labelId: string;
|
|
463
|
+
service: string;
|
|
464
|
+
shipTo: string;
|
|
465
|
+
};
|
|
466
|
+
actions: {
|
|
467
|
+
download: {
|
|
468
|
+
pdf: string;
|
|
469
|
+
};
|
|
470
|
+
};
|
|
471
|
+
};
|
|
385
472
|
"list-carriers": {
|
|
386
473
|
title: string;
|
|
387
474
|
headers: {
|
|
@@ -428,6 +515,29 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
428
515
|
postalCode: string;
|
|
429
516
|
phone: string;
|
|
430
517
|
email: string;
|
|
518
|
+
/**
|
|
519
|
+
* # Connect-Carriers Component
|
|
520
|
+
*
|
|
521
|
+
* @param ComponentProps The base props that will be passed into the `<ConnectCarrier />` component.
|
|
522
|
+
*
|
|
523
|
+
* @returns Element A React element that renders the `<ConnectCarrier />` component allowing users
|
|
524
|
+
* to connect their own existing carrier account. If no carrier is provided, the user may
|
|
525
|
+
* select from a list of carriers specified by `features.availableCarrierConnections`.
|
|
526
|
+
* This component is composed in the `<AccountSettings />` Element.
|
|
527
|
+
*
|
|
528
|
+
* @example
|
|
529
|
+
* ```tsx
|
|
530
|
+
* (() => {
|
|
531
|
+
* const features = useFeatures("CarrierConnections");
|
|
532
|
+
*
|
|
533
|
+
* return <ConnectCarrier.Component features={features} />;
|
|
534
|
+
* })();
|
|
535
|
+
* ```
|
|
536
|
+
*
|
|
537
|
+
* <br />
|
|
538
|
+
*
|
|
539
|
+
* @see {@link ConnectCarrier.ComponentProps | The props that are passed into the `<ConnectCarrier />` component}
|
|
540
|
+
*/
|
|
431
541
|
addressResidentialIndicator: string;
|
|
432
542
|
};
|
|
433
543
|
noResults: string;
|
|
@@ -504,8 +614,13 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
504
614
|
returnedGoods: string;
|
|
505
615
|
sample: string;
|
|
506
616
|
};
|
|
617
|
+
currencyChange: string;
|
|
507
618
|
declarations: string;
|
|
508
|
-
|
|
619
|
+
descriptionTooltip: {
|
|
620
|
+
message: string;
|
|
621
|
+
example1: string;
|
|
622
|
+
example2: string;
|
|
623
|
+
};
|
|
509
624
|
fields: {
|
|
510
625
|
contentsType: string;
|
|
511
626
|
countryOfOrigin: string;
|
|
@@ -537,10 +652,13 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
537
652
|
connectCarrierForm: string;
|
|
538
653
|
fundingSourceMetadata: string;
|
|
539
654
|
label: string;
|
|
655
|
+
labels: string;
|
|
540
656
|
salesOrder: string;
|
|
541
657
|
shipment: string;
|
|
658
|
+
shipments: string;
|
|
542
659
|
warehouses: string;
|
|
543
660
|
};
|
|
661
|
+
emailIsRequired: string;
|
|
544
662
|
unknown: string;
|
|
545
663
|
noRatesAvailable: string;
|
|
546
664
|
};
|
|
@@ -578,9 +696,11 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
578
696
|
data: string;
|
|
579
697
|
importingSalesOrder: string;
|
|
580
698
|
label: string;
|
|
699
|
+
labels: string;
|
|
581
700
|
onboarding: string;
|
|
582
701
|
salesOrder: string;
|
|
583
702
|
shipment: string;
|
|
703
|
+
shipments: string;
|
|
584
704
|
warehouses: string;
|
|
585
705
|
};
|
|
586
706
|
months: {
|
|
@@ -616,6 +736,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
616
736
|
};
|
|
617
737
|
invalidAddressName: string;
|
|
618
738
|
invalidAddressNameStrict: string;
|
|
739
|
+
invalidAddressOnboarding: string;
|
|
619
740
|
invalidAddressPoBox: string;
|
|
620
741
|
invalidCreditCardType: string;
|
|
621
742
|
invalidExpirationDate: string;
|
|
@@ -672,10 +793,26 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
672
793
|
"QSBzaGlwcGluZyBjYXJyaWVyIGVycm9yIG9jY3VycmVkOiBJbnZhbGlkIHNvbGQgdG8gc3RhdGUgcHJvdmluY2UgY29kZS4gVmFsaWQgbGVuZ3RoIGlzIDAgdG8gNSBhbHBoYW51bWVyaWM=": string;
|
|
673
794
|
};
|
|
674
795
|
"connect-carrier": {
|
|
796
|
+
actions: {
|
|
797
|
+
cancel: string;
|
|
798
|
+
connectCarriers: string;
|
|
799
|
+
disconnect: string;
|
|
800
|
+
disconnectCarrier: string;
|
|
801
|
+
};
|
|
802
|
+
noCarriersDescription: string;
|
|
675
803
|
registrationForm: {
|
|
804
|
+
error: string;
|
|
676
805
|
title: string;
|
|
677
806
|
betaWarning: string;
|
|
678
807
|
};
|
|
808
|
+
search: string;
|
|
809
|
+
settingsModal: {
|
|
810
|
+
closeDialog: string;
|
|
811
|
+
header: string;
|
|
812
|
+
};
|
|
813
|
+
status: {
|
|
814
|
+
connected: string;
|
|
815
|
+
};
|
|
679
816
|
};
|
|
680
817
|
"account-settings": {
|
|
681
818
|
messages: {
|
|
@@ -689,6 +826,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
689
826
|
adjustmentHistory: string;
|
|
690
827
|
warehouses: string;
|
|
691
828
|
carriers: string;
|
|
829
|
+
externalCarriers: string;
|
|
692
830
|
labelLayout: string;
|
|
693
831
|
unitSettings: string;
|
|
694
832
|
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ConnectCarrierFeatures } from "../connect-carrier/connect-carrier";
|
|
2
|
+
export type ExternalCarriersFeatures = ConnectCarrierFeatures;
|
|
3
|
+
export type ComponentProps = {
|
|
4
|
+
/**
|
|
5
|
+
* `availableCarrierConnections` is a set of carrier codes for carriers that may be added. If this is omitted,
|
|
6
|
+
* new carriers may not be added by this element.
|
|
7
|
+
*/
|
|
8
|
+
features?: ExternalCarriersFeatures;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* # ExternalCarriers Component
|
|
12
|
+
*
|
|
13
|
+
* @param ComponentProps The base props that will be passed into the `<ExternalCarriers />` component.
|
|
14
|
+
*
|
|
15
|
+
* @returns Element A React element that renders the `<ExternalCarriers />` component allowing users
|
|
16
|
+
* to view a list of their own carrier accounts that have been connected to their ShipEngine account,
|
|
17
|
+
* and to add additional carriers.
|
|
18
|
+
* This component is composed in the `<AccountSettings />` Element.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```tsx
|
|
22
|
+
* (() => {
|
|
23
|
+
* const features = useFeatures("Global");
|
|
24
|
+
*
|
|
25
|
+
* return <ExternalCarriers.Component features={features} />;
|
|
26
|
+
* })();
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* <br />
|
|
30
|
+
*
|
|
31
|
+
* @see {@link ExternalCarriers.ComponentProps | The props that are passed into the `<ExternalCarriers />` component}
|
|
32
|
+
* @see {@link AccountSettings.Element | The `<AccountSettings />` component renders the `<ExternalCarriers />` component}
|
|
33
|
+
*/
|
|
34
|
+
export declare const Component: ({ features }: ComponentProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as ExternalCarriers from "./external-carriers";
|
package/src/elements/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export * from "./account-settings";
|
|
|
2
2
|
export * from "./list-carriers";
|
|
3
3
|
export * from "./manage-warehouses";
|
|
4
4
|
export * from "./purchase-label";
|
|
5
|
+
export * from "./external-carriers";
|
|
5
6
|
export * from "./shipengine-workflow";
|
|
6
7
|
export * from "./theme-creator";
|
|
7
8
|
export * from "./view-shipment";
|