@shipengine/elements 0.11.1 → 0.13.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/components/accordion/accordion.d.ts +12 -0
- package/components/accordion/accordion.styles.d.ts +7 -0
- package/components/accordion/index.d.ts +1 -0
- package/components/button-group/button-group.d.ts +7 -0
- package/components/button-group/index.d.ts +1 -0
- package/components/cube/cube.d.ts +5 -0
- package/components/cube/index.d.ts +1 -0
- package/components/disclosure/disclosure.d.ts +9 -0
- package/components/disclosure/disclosure.styles.d.ts +1 -0
- package/components/disclosure/index.d.ts +1 -0
- package/components/error-boundary/error-boundary.d.ts +31 -0
- package/components/error-boundary/index.d.ts +1 -0
- package/components/field/checkbox-input/checkbox-input.d.ts +6 -0
- package/components/field/checkbox-input/index.d.ts +1 -0
- package/components/field/create-field-controller.d.ts +23 -0
- package/components/field/date-picker/date-picker.d.ts +7 -0
- package/components/field/date-picker/date-picker.styles.d.ts +3 -0
- package/components/field/date-picker/index.d.ts +1 -0
- package/components/field/field.styles.d.ts +7 -0
- package/components/field/fields.d.ts +11 -0
- package/components/field/index.d.ts +1 -0
- package/components/field/input-group/index.d.ts +1 -0
- package/components/field/input-group/input-group.d.ts +13 -0
- package/components/field/input-group/input-group.styles.d.ts +2 -0
- package/components/field/money-input/hooks/index.d.ts +1 -0
- package/components/field/money-input/hooks/use-utils.d.ts +6 -0
- package/components/field/money-input/index.d.ts +1 -0
- package/components/field/money-input/money-input-styles.d.ts +2 -0
- package/components/field/money-input/money-input.d.ts +30 -0
- package/components/field/number-input/index.d.ts +1 -0
- package/components/field/number-input/number-input.d.ts +10 -0
- package/components/field/rate-card/cost-breakdown/cost-breakdown.d.ts +11 -0
- package/components/field/rate-card/cost-breakdown/cost-breakdown.styles.d.ts +6 -0
- package/components/field/rate-card/cost-breakdown/index.d.ts +1 -0
- package/components/field/rate-card/index.d.ts +1 -0
- package/components/field/rate-card/rate-card.d.ts +12 -0
- package/components/field/rate-card/rate-card.styles.d.ts +21 -0
- package/components/field/rate-select/index.d.ts +1 -0
- package/components/field/rate-select/rate-select.d.ts +11 -0
- package/components/field/rate-select/rate-select.styles.d.ts +3 -0
- package/components/field/select/index.d.ts +1 -0
- package/components/field/select/select.d.ts +20 -0
- package/components/field/submit-button/index.d.ts +1 -0
- package/components/field/submit-button/submit-button.d.ts +13 -0
- package/components/field/switch/index.d.ts +1 -0
- package/components/field/switch/switch.d.ts +9 -0
- package/components/field/text-area/index.d.ts +1 -0
- package/components/field/text-area/text-area.d.ts +3 -0
- package/components/field/text-input/index.d.ts +1 -0
- package/components/field/text-input/text-input.d.ts +3 -0
- package/components/field-label/field-label.d.ts +9 -0
- package/components/field-label/index.d.ts +1 -0
- package/components/index.d.ts +11 -4
- package/components/items-breakdown/index.d.ts +1 -0
- package/components/items-breakdown/items-breakdown.d.ts +14 -0
- package/components/items-breakdown/items-breakdown.styles.d.ts +3 -0
- package/components/loader/index.d.ts +1 -0
- package/components/loader/loader.d.ts +2 -0
- package/components/organisms/auto-funding-form/auto-funding-form.d.ts +15 -0
- package/components/organisms/auto-funding-form/auto-funding-schema.d.ts +53 -0
- package/components/organisms/auto-funding-form/index.d.ts +1 -0
- package/components/organisms/index.d.ts +2 -0
- package/components/organisms/manual-funding-form/index.d.ts +1 -0
- package/components/organisms/manual-funding-form/manual-funding-form.d.ts +14 -0
- package/components/organisms/manual-funding-form/manual-funding-schema.d.ts +27 -0
- package/components/portal/index.d.ts +1 -0
- package/components/portal/portal.d.ts +13 -0
- package/components/preset-descriptor/index.d.ts +1 -0
- package/components/preset-descriptor/preset-descriptor.d.ts +2 -0
- package/components/preset-descriptor/preset-descriptor.styles.d.ts +6 -0
- package/components/settings-card/index.d.ts +1 -0
- package/components/settings-card/settings-card.d.ts +11 -0
- package/components/settings-card/settings-card.styles.d.ts +6 -0
- package/components/spacer/index.d.ts +1 -0
- package/components/spacer/spacer.d.ts +6 -0
- package/components/templates/add-carriers/add-carriers.d.ts +5 -0
- package/components/templates/add-carriers/index.d.ts +1 -0
- package/components/templates/address-display/address-display.d.ts +9 -0
- package/components/templates/address-display/index.d.ts +1 -0
- package/components/templates/address-form/address-form.d.ts +18 -0
- package/components/templates/address-form/address-schema.d.ts +250 -0
- package/components/templates/address-form/index.d.ts +2 -0
- package/components/templates/address-parser/address-parser-schema.d.ts +10 -0
- package/components/templates/address-parser/address-parser.d.ts +13 -0
- package/components/templates/address-parser/index.d.ts +2 -0
- package/components/templates/address-preference-display/address-preference-display.d.ts +16 -0
- package/components/templates/address-preference-display/index.d.ts +1 -0
- package/components/templates/agreement-form/agreement-form-schema.d.ts +10 -0
- package/components/templates/agreement-form/agreement-form.d.ts +8 -0
- package/components/templates/agreement-form/agreement-form.styles.d.ts +1 -0
- package/components/templates/agreement-form/index.d.ts +1 -0
- package/components/templates/billing-form/billing-form-stories.d.ts +6 -0
- package/components/templates/billing-form/billing-form.d.ts +9 -0
- package/components/templates/billing-form/billing-schema.d.ts +76 -0
- package/components/templates/billing-form/index.d.ts +2 -0
- package/components/templates/customs-item-form/customs-item-form-schema.d.ts +80 -0
- package/components/templates/customs-item-form/customs-item-form.d.ts +14 -0
- package/components/templates/customs-item-form/index.d.ts +2 -0
- package/components/templates/customs-items-display/customs-items-display.d.ts +7 -0
- package/components/templates/customs-items-display/customs-items-display.styles.d.ts +6 -0
- package/components/templates/customs-items-display/index.d.ts +1 -0
- package/components/templates/funding-methods/funding-methods.d.ts +10 -0
- package/components/templates/funding-methods/index.d.ts +1 -0
- package/components/templates/index.d.ts +16 -0
- package/components/templates/label/index.d.ts +1 -0
- package/components/templates/label/label.d.ts +12 -0
- package/components/templates/manage-warehouses/index.d.ts +1 -0
- package/components/templates/manage-warehouses/manage-warehouses.d.ts +5 -0
- package/components/templates/rate-form/index.d.ts +1 -0
- package/components/templates/rate-form/rate-form.d.ts +21 -0
- package/components/templates/rate-form/rate-schema.d.ts +30 -0
- package/components/templates/register-wallet/index.d.ts +1 -0
- package/components/templates/register-wallet/register-wallet.d.ts +3 -0
- package/components/templates/register-wallet/register-wallet.styles.d.ts +6 -0
- package/components/templates/sales-order/sales-order.d.ts +8 -0
- package/components/templates/shipment/shipment.d.ts +17 -0
- package/components/templates/shipment-form/index.d.ts +1 -0
- package/components/templates/shipment-form/shipment-form.d.ts +51 -0
- package/components/templates/shipment-form/shipment-schema.d.ts +943 -0
- package/components/templates/void-label/void-label.d.ts +9 -0
- package/components/templates/warehouse-display/index.d.ts +1 -0
- package/components/templates/warehouse-display/warehouse-display.d.ts +6 -0
- package/constants/index.d.ts +1 -0
- package/constants/shipengine/address.d.ts +39 -0
- package/constants/shipengine/index.d.ts +1 -0
- package/elements/add-carriers.d.ts +1 -0
- package/elements/components/add-carriers/add-carriers.d.ts +8 -0
- package/elements/components/add-carriers/index.d.ts +1 -0
- package/{components → elements/components}/configure-shipment/configure-shipment.d.ts +5 -4
- package/{components → elements/components}/configure-shipment/hooks/use-address.d.ts +4 -2
- package/{components → elements/components}/configure-shipment/hooks/use-presets.d.ts +1 -1
- package/{components → elements/components}/configure-shipment/hooks/use-shipment-form.d.ts +6 -5
- package/elements/components/index.d.ts +8 -0
- package/elements/components/manage-funding/index.d.ts +1 -0
- package/elements/components/manage-funding/manage-funding.d.ts +2 -0
- package/elements/components/manage-warehouses/index.d.ts +1 -0
- package/elements/components/manage-warehouses/manage-warehouses.d.ts +2 -0
- package/elements/components/register-wallet/index.d.ts +1 -0
- package/elements/components/register-wallet/register-wallet.d.ts +9 -0
- package/elements/components/sales-order/index.d.ts +1 -0
- package/{components → elements/components}/sales-order/sales-order.d.ts +3 -2
- package/elements/components/shipment/index.d.ts +1 -0
- package/{components → elements/components}/shipment/shipment.d.ts +1 -1
- package/elements/components/void-label/index.d.ts +1 -0
- package/elements/index.d.ts +7 -0
- package/elements/manage-funding.d.ts +1 -0
- package/elements/manage-warehouses.d.ts +1 -0
- package/elements/register-wallet.d.ts +1 -0
- package/extensions/index.d.ts +1 -0
- package/extensions/zod.d.ts +18 -0
- package/factories/index.d.ts +2 -0
- package/factories/shipengine/address.d.ts +28 -0
- package/factories/shipengine/carrier.d.ts +10 -0
- package/factories/shipengine/index.d.ts +12 -0
- package/factories/shipengine/label.d.ts +10 -0
- package/factories/shipengine/money.d.ts +9 -0
- package/factories/shipengine/order-source.d.ts +11 -0
- package/factories/shipengine/package.d.ts +9 -0
- package/factories/shipengine/resource.d.ts +10 -0
- package/factories/shipengine/sales-order.d.ts +16 -0
- package/factories/shipengine/service.d.ts +9 -0
- package/factories/shipengine/shipment.d.ts +38 -0
- package/factories/shipengine/warehouse.d.ts +6 -0
- package/factories/shipengine/weight.d.ts +15 -0
- package/factories/utils.d.ts +3 -0
- package/hooks/index.d.ts +7 -0
- package/hooks/options/index.d.ts +12 -0
- package/hooks/options/use-confirmation-options.d.ts +5 -0
- package/hooks/options/use-country-code-options.d.ts +4 -0
- package/hooks/options/use-customs-contents-options.d.ts +5 -0
- package/hooks/options/use-customs-non-delivery-options.d.ts +5 -0
- package/hooks/options/use-expiration-month-options.d.ts +4 -0
- package/hooks/options/use-insurance-provider-options.d.ts +10 -0
- package/hooks/options/use-package-options.d.ts +3 -0
- package/hooks/options/use-rate-options.d.ts +21 -0
- package/hooks/options/use-service-code-options.d.ts +3 -0
- package/hooks/options/use-shipping-presets-options.d.ts +19 -0
- package/hooks/options/use-state-code-options.d.ts +4 -0
- package/hooks/options/use-warehouse-options.d.ts +5 -0
- package/hooks/use-carrier-metadata.d.ts +6 -0
- package/hooks/use-elements.d.ts +36 -0
- package/hooks/use-nested-form.d.ts +22 -0
- package/hooks/use-page-layout.d.ts +11 -0
- package/hooks/use-root-portal.d.ts +19 -0
- package/hooks/use-run-once-on-true.d.ts +7 -0
- package/index.cjs +24035 -14817
- package/index.d.ts +12 -3
- package/index.js +24343 -15279
- package/locales/en/index.d.ts +386 -0
- package/locales/index.d.ts +1 -0
- package/package.json +24 -5
- package/providers/giger-provider.d.ts +8 -0
- package/providers/index.d.ts +1 -0
- package/register.d.ts +19 -0
- package/schemas/index.d.ts +1 -0
- package/schemas/shipengine/address.d.ts +17 -0
- package/schemas/shipengine/index.d.ts +3 -0
- package/schemas/shipengine/money.d.ts +15 -0
- package/schemas/shipengine/phone.d.ts +10 -0
- package/testing/index.d.ts +2 -0
- package/testing/render.d.ts +1 -0
- package/testing/swr.d.ts +15 -0
- package/types/carrier-metadata.d.ts +7 -0
- package/types/index.d.ts +2 -0
- package/types/shipping-preset/index.d.ts +1 -0
- package/types/shipping-preset/shipping-preset.d.ts +17 -0
- package/utilities/create-dictionary.d.ts +4 -0
- package/utilities/date.d.ts +24 -0
- package/utilities/error.d.ts +4 -0
- package/utilities/form-logger.d.ts +16 -0
- package/utilities/index.d.ts +11 -0
- package/utilities/money.d.ts +4 -0
- package/utilities/predicates/index.d.ts +1 -0
- package/utilities/predicates/isString.d.ts +1 -0
- package/utilities/rates.d.ts +9 -0
- package/utilities/shipengine/address.d.ts +21 -0
- package/utilities/shipengine/carrier.d.ts +1 -0
- package/utilities/shipengine/dimensions.d.ts +10 -0
- package/utilities/shipengine/index.d.ts +7 -0
- package/utilities/shipengine/package.d.ts +4 -0
- package/utilities/shipengine/sales-order.d.ts +13 -0
- package/utilities/shipengine/shipment.d.ts +13 -0
- package/utilities/shipengine/weight.d.ts +13 -0
- package/utilities/string.d.ts +1 -0
- package/utilities/styles.d.ts +18 -0
- package/utilities/validation.d.ts +10 -0
- /package/components/{sales-order → templates/sales-order}/index.d.ts +0 -0
- /package/components/{shipment → templates/shipment}/index.d.ts +0 -0
- /package/components/{void-label → templates/void-label}/index.d.ts +0 -0
- /package/{components → elements/components}/configure-shipment/hooks/index.d.ts +0 -0
- /package/{components → elements/components}/configure-shipment/hooks/use-customs.d.ts +0 -0
- /package/{components → elements/components}/configure-shipment/hooks/use-rates-form.d.ts +0 -0
- /package/{components → elements/components}/configure-shipment/hooks/use-request-rates.d.ts +0 -0
- /package/{components → elements/components}/configure-shipment/index.d.ts +0 -0
- /package/{components → elements/components}/sales-order/hooks/index.d.ts +0 -0
- /package/{components → elements/components}/sales-order/hooks/use-configure-shipment.d.ts +0 -0
- /package/{components → elements/components}/sales-order/hooks/use-import-sales-order.d.ts +0 -0
- /package/{components → elements/components}/sales-order/hooks/use-pending-shipment.d.ts +0 -0
- /package/{components → elements/components}/void-label/void-label.d.ts +0 -0
- /package/{purchase-label.d.ts → elements/purchase-label.d.ts} +0 -0
- /package/{view-shipment.d.ts → elements/view-shipment.d.ts} +0 -0
- /package/{void-label.d.ts → elements/void-label.d.ts} +0 -0
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
"void-label": {
|
|
3
|
+
actions: {
|
|
4
|
+
complete: string;
|
|
5
|
+
confirmVoid: string;
|
|
6
|
+
viewShipment: string;
|
|
7
|
+
};
|
|
8
|
+
resultMessages: {
|
|
9
|
+
approved: string;
|
|
10
|
+
rejected: string;
|
|
11
|
+
};
|
|
12
|
+
refund_process: string;
|
|
13
|
+
refund_rules: string;
|
|
14
|
+
resultTitles: {
|
|
15
|
+
approved: string;
|
|
16
|
+
rejected: string;
|
|
17
|
+
};
|
|
18
|
+
sections: {
|
|
19
|
+
salesOrder: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
"view-shipment": {
|
|
23
|
+
actions: {
|
|
24
|
+
buyAnotherLabel: string;
|
|
25
|
+
hideItems: string;
|
|
26
|
+
printForms: string;
|
|
27
|
+
printLabel: string;
|
|
28
|
+
schedulePickup: string;
|
|
29
|
+
showItems: string;
|
|
30
|
+
void: string;
|
|
31
|
+
};
|
|
32
|
+
fields: {
|
|
33
|
+
dimensions: string;
|
|
34
|
+
estimatedShipping: string;
|
|
35
|
+
items: string;
|
|
36
|
+
orderDate: string;
|
|
37
|
+
orderValue: string;
|
|
38
|
+
requestedShipping: string;
|
|
39
|
+
shipDate: string;
|
|
40
|
+
shipTo: string;
|
|
41
|
+
warehouse: string;
|
|
42
|
+
weight: string;
|
|
43
|
+
insuredValue: string;
|
|
44
|
+
deliveryConfirmation: string;
|
|
45
|
+
};
|
|
46
|
+
highVolumeForms: string;
|
|
47
|
+
multipleShippingServices: string;
|
|
48
|
+
sections: {
|
|
49
|
+
labels: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
"register-wallet": {
|
|
53
|
+
agreeToTerms: string;
|
|
54
|
+
sections: {
|
|
55
|
+
setup: {
|
|
56
|
+
title: string;
|
|
57
|
+
subTitle: string;
|
|
58
|
+
descriptionTitle: string;
|
|
59
|
+
description: string;
|
|
60
|
+
};
|
|
61
|
+
billing: {
|
|
62
|
+
title: string;
|
|
63
|
+
cardSubTitle: string;
|
|
64
|
+
addressSubTitle: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
"purchase-label": {
|
|
69
|
+
actions: {
|
|
70
|
+
calculateRates_one: string;
|
|
71
|
+
calculateRates_other: string;
|
|
72
|
+
hideItems: string;
|
|
73
|
+
purchaseLabel: string;
|
|
74
|
+
purchaseNow: string;
|
|
75
|
+
showItems: string;
|
|
76
|
+
showMoreRates: string;
|
|
77
|
+
showFewerRates: string;
|
|
78
|
+
saveRate: string;
|
|
79
|
+
};
|
|
80
|
+
balance: {
|
|
81
|
+
currentBalance: string;
|
|
82
|
+
insufficientBalanceCTA: string;
|
|
83
|
+
};
|
|
84
|
+
cta: {
|
|
85
|
+
addPackageDetails: string;
|
|
86
|
+
};
|
|
87
|
+
errorMessages: {
|
|
88
|
+
customsItemsRequired: string;
|
|
89
|
+
invalidAddress: string;
|
|
90
|
+
noRates: string;
|
|
91
|
+
salesOrderNotLoaded: string;
|
|
92
|
+
unsupportedAddress: string;
|
|
93
|
+
};
|
|
94
|
+
errorTypes: {
|
|
95
|
+
results: string;
|
|
96
|
+
};
|
|
97
|
+
fields: {
|
|
98
|
+
addOns: string;
|
|
99
|
+
confirmation: string;
|
|
100
|
+
dimensions: {
|
|
101
|
+
length: string;
|
|
102
|
+
width: string;
|
|
103
|
+
height: string;
|
|
104
|
+
};
|
|
105
|
+
dimensionsGroup: string;
|
|
106
|
+
estimatedShipping: string;
|
|
107
|
+
insurance: string;
|
|
108
|
+
insuranceProvider: string;
|
|
109
|
+
insuredValue: string;
|
|
110
|
+
items: string;
|
|
111
|
+
orderDate: string;
|
|
112
|
+
orderValue: string;
|
|
113
|
+
packageCode: string;
|
|
114
|
+
requestedShipping: string;
|
|
115
|
+
shipDate: string;
|
|
116
|
+
service: string;
|
|
117
|
+
shipTo: string;
|
|
118
|
+
warehouse: string;
|
|
119
|
+
weight: {
|
|
120
|
+
whole: string;
|
|
121
|
+
fractional: string;
|
|
122
|
+
};
|
|
123
|
+
weightGroup: string;
|
|
124
|
+
};
|
|
125
|
+
loading: {
|
|
126
|
+
calculatingRates: string;
|
|
127
|
+
};
|
|
128
|
+
modes: {
|
|
129
|
+
browseRates: string;
|
|
130
|
+
selectService: string;
|
|
131
|
+
};
|
|
132
|
+
multipleShippingServices: string;
|
|
133
|
+
recommendedRates: {
|
|
134
|
+
recommended: string;
|
|
135
|
+
stayInformed: string;
|
|
136
|
+
};
|
|
137
|
+
schemaErrors: {
|
|
138
|
+
shipFromUnitedStatesOnly: string;
|
|
139
|
+
needToAcknowledge: string;
|
|
140
|
+
};
|
|
141
|
+
rates: {
|
|
142
|
+
uspsMediaMailAcknowledgement: string;
|
|
143
|
+
};
|
|
144
|
+
shipToAddressFormFields: string;
|
|
145
|
+
sections: {
|
|
146
|
+
customsForm: string;
|
|
147
|
+
shipment: string;
|
|
148
|
+
rate_one: string;
|
|
149
|
+
rate_other: string;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
"manage-warehouses": {
|
|
153
|
+
returnTo: string;
|
|
154
|
+
shipFrom: string;
|
|
155
|
+
};
|
|
156
|
+
"manage-funding": {
|
|
157
|
+
addFunds: string;
|
|
158
|
+
autoFunding: {
|
|
159
|
+
error: {
|
|
160
|
+
title: string;
|
|
161
|
+
message: string;
|
|
162
|
+
};
|
|
163
|
+
isEnabled: string;
|
|
164
|
+
isLoading: string;
|
|
165
|
+
lowBalancePurchaseThreshold: string;
|
|
166
|
+
maximumPurchasesPerDay: string;
|
|
167
|
+
purchaseAmount: string;
|
|
168
|
+
};
|
|
169
|
+
otp: {
|
|
170
|
+
labels: {
|
|
171
|
+
amount: string;
|
|
172
|
+
currentBalance: string;
|
|
173
|
+
resultingBalance: string;
|
|
174
|
+
};
|
|
175
|
+
minimumPurchaseAmount: string;
|
|
176
|
+
};
|
|
177
|
+
maximumBalanceAmount: string;
|
|
178
|
+
};
|
|
179
|
+
common: {
|
|
180
|
+
actions: {
|
|
181
|
+
add: string;
|
|
182
|
+
cancel: string;
|
|
183
|
+
continue: string;
|
|
184
|
+
delete: string;
|
|
185
|
+
edit: string;
|
|
186
|
+
hide: string;
|
|
187
|
+
parse: string;
|
|
188
|
+
purchase: string;
|
|
189
|
+
remove: string;
|
|
190
|
+
save: string;
|
|
191
|
+
skipForNow: string;
|
|
192
|
+
submit: string;
|
|
193
|
+
};
|
|
194
|
+
address: {
|
|
195
|
+
fields: {
|
|
196
|
+
name: string;
|
|
197
|
+
company: string;
|
|
198
|
+
countryCode: string;
|
|
199
|
+
addressLine1: string;
|
|
200
|
+
addressLine2: string;
|
|
201
|
+
cityLocality: string;
|
|
202
|
+
stateProvince: string;
|
|
203
|
+
postalCode: string;
|
|
204
|
+
phone: string;
|
|
205
|
+
email: string;
|
|
206
|
+
};
|
|
207
|
+
subFields: {
|
|
208
|
+
optional: string;
|
|
209
|
+
};
|
|
210
|
+
parserFields: {
|
|
211
|
+
fullAddress: string;
|
|
212
|
+
};
|
|
213
|
+
paste: string;
|
|
214
|
+
preference: {
|
|
215
|
+
addressNotValidated: string;
|
|
216
|
+
modified: string;
|
|
217
|
+
originalAddress: string;
|
|
218
|
+
matchedAddress: string;
|
|
219
|
+
unableToValidate: string;
|
|
220
|
+
use: {
|
|
221
|
+
originalAddress: string;
|
|
222
|
+
matchedAddress: string;
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
validation: {
|
|
226
|
+
notValidated: string;
|
|
227
|
+
validated: string;
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
billing: {
|
|
231
|
+
fields: {
|
|
232
|
+
name: string;
|
|
233
|
+
cardNumber: string;
|
|
234
|
+
expirationMonth: string;
|
|
235
|
+
expirationYear: string;
|
|
236
|
+
cvv: string;
|
|
237
|
+
};
|
|
238
|
+
};
|
|
239
|
+
carriers: {
|
|
240
|
+
fields: {
|
|
241
|
+
agreement: string;
|
|
242
|
+
};
|
|
243
|
+
};
|
|
244
|
+
charsetWarnings: {
|
|
245
|
+
name: {
|
|
246
|
+
message: string;
|
|
247
|
+
};
|
|
248
|
+
address: {
|
|
249
|
+
message: string;
|
|
250
|
+
title: string;
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
confirmationTypes: {
|
|
254
|
+
adultSignature: string;
|
|
255
|
+
delivery: string;
|
|
256
|
+
deliveryMailed: string;
|
|
257
|
+
directSignature: string;
|
|
258
|
+
none: string;
|
|
259
|
+
signature: string;
|
|
260
|
+
verbalConfirmation: string;
|
|
261
|
+
};
|
|
262
|
+
customs: {
|
|
263
|
+
addDeclaration: string;
|
|
264
|
+
contents: {
|
|
265
|
+
documents: string;
|
|
266
|
+
gift: string;
|
|
267
|
+
merchandise: string;
|
|
268
|
+
returnedGoods: string;
|
|
269
|
+
sample: string;
|
|
270
|
+
};
|
|
271
|
+
declarations: string;
|
|
272
|
+
each: string;
|
|
273
|
+
fields: {
|
|
274
|
+
contentsType: string;
|
|
275
|
+
countryOfOrigin: string;
|
|
276
|
+
description: string;
|
|
277
|
+
harmonizedTariffCode: string;
|
|
278
|
+
ifDeliveryFails: string;
|
|
279
|
+
quantity: string;
|
|
280
|
+
sku: string;
|
|
281
|
+
value: string;
|
|
282
|
+
valueQuantity: string;
|
|
283
|
+
};
|
|
284
|
+
nonDelivery: {
|
|
285
|
+
returnToSender: string;
|
|
286
|
+
treatAsAbandoned: string;
|
|
287
|
+
};
|
|
288
|
+
removeAllDeclarations: string;
|
|
289
|
+
total: string;
|
|
290
|
+
};
|
|
291
|
+
errorMessages: {
|
|
292
|
+
invalidNameOrCompany: string;
|
|
293
|
+
noWarehouses: string;
|
|
294
|
+
unableToLoad: {
|
|
295
|
+
carriers: string;
|
|
296
|
+
salesOrder: string;
|
|
297
|
+
shipment: string;
|
|
298
|
+
warehouses: string;
|
|
299
|
+
};
|
|
300
|
+
unknown: string;
|
|
301
|
+
};
|
|
302
|
+
errorTypes: {
|
|
303
|
+
accountStatus: string;
|
|
304
|
+
businessRules: string;
|
|
305
|
+
integrations: string;
|
|
306
|
+
purchase: string;
|
|
307
|
+
rateInvalid: string;
|
|
308
|
+
security: string;
|
|
309
|
+
system: string;
|
|
310
|
+
unknown: string;
|
|
311
|
+
validation: string;
|
|
312
|
+
};
|
|
313
|
+
insuranceProviders: {
|
|
314
|
+
carrier: string;
|
|
315
|
+
none: string;
|
|
316
|
+
shipsurance: string;
|
|
317
|
+
thirdParty: string;
|
|
318
|
+
};
|
|
319
|
+
loading: {
|
|
320
|
+
carriers: string;
|
|
321
|
+
data: string;
|
|
322
|
+
importingSalesOrder: string;
|
|
323
|
+
salesOrder: string;
|
|
324
|
+
shipment: string;
|
|
325
|
+
warehouses: string;
|
|
326
|
+
};
|
|
327
|
+
months: {
|
|
328
|
+
january: string;
|
|
329
|
+
february: string;
|
|
330
|
+
march: string;
|
|
331
|
+
april: string;
|
|
332
|
+
may: string;
|
|
333
|
+
june: string;
|
|
334
|
+
july: string;
|
|
335
|
+
august: string;
|
|
336
|
+
september: string;
|
|
337
|
+
october: string;
|
|
338
|
+
november: string;
|
|
339
|
+
december: string;
|
|
340
|
+
};
|
|
341
|
+
packageCategories: {
|
|
342
|
+
browseRates: string;
|
|
343
|
+
myCustomPackages: string;
|
|
344
|
+
};
|
|
345
|
+
packageCodes: {
|
|
346
|
+
package: string;
|
|
347
|
+
};
|
|
348
|
+
schemaErrors: {
|
|
349
|
+
notAValidPhoneNumber: string;
|
|
350
|
+
group: {
|
|
351
|
+
allMeasurementsOrNone: string;
|
|
352
|
+
};
|
|
353
|
+
invalidAddressName: string;
|
|
354
|
+
invalidAddressPoBox: string;
|
|
355
|
+
invalidString: string;
|
|
356
|
+
nonnegative: string;
|
|
357
|
+
nonnegativeList: string;
|
|
358
|
+
positive: string;
|
|
359
|
+
positiveList: string;
|
|
360
|
+
required: string;
|
|
361
|
+
requiredList: string;
|
|
362
|
+
tooFewCharacters: string;
|
|
363
|
+
tooManyCharacters: string;
|
|
364
|
+
};
|
|
365
|
+
shippingPresets: {
|
|
366
|
+
apply: string;
|
|
367
|
+
platform: string;
|
|
368
|
+
user: string;
|
|
369
|
+
};
|
|
370
|
+
weight: {
|
|
371
|
+
ounces: string;
|
|
372
|
+
pounds_one: string;
|
|
373
|
+
pounds_other: string;
|
|
374
|
+
};
|
|
375
|
+
units: {
|
|
376
|
+
in: string;
|
|
377
|
+
lbs: string;
|
|
378
|
+
oz: string;
|
|
379
|
+
};
|
|
380
|
+
"VGhlIHNlbGVjdGVkIHNlcnZpY2UgaW5jbHVkZXMgaW5zdXJhbmNlIGZvciBhbiBpbnN1cmVkIGFtb3VudCB1cCB0byAkMTAwLgo=": string;
|
|
381
|
+
"VGhlIHNlbGVjdGVkIHNlcnZpY2UgaW5jbHVkZXMgaW5zdXJhbmNlIGZvciBhbiBpbnN1cmVkIGFtb3VudCB1cCB0byAkNTAuCg==": string;
|
|
382
|
+
QSBzaGlwcGluZyBjYXJyaWVyIGVycm9yIG9jY3VycmVkOiBJbnN1ZmZpY2llbnQgYWNjb3VudCBiYWxhbmNlLiBBY2NvdW50IGV4Y2VwdGlvbiBFeGNlcHRpb24gd2l0aCBjb2RlIDB4MDA1NjAxMDE7IG1vZHVsZSA4NiwgY2F0ZWdvcnkgMSwgaXRlbSAx: string;
|
|
383
|
+
"QWRkcmVzcyBub3QgZm91bmQ=": string;
|
|
384
|
+
};
|
|
385
|
+
};
|
|
386
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as en } from "./en";
|
package/package.json
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shipengine/elements",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
|
+
"typedoc": {
|
|
5
|
+
"entryPoint": "./src/index.ts",
|
|
6
|
+
"readmeFile": "../../README.md",
|
|
7
|
+
"displayName": "ShipEngine Elements"
|
|
8
|
+
},
|
|
4
9
|
"peerDependencies": {
|
|
5
10
|
"@packlink/giger": "*",
|
|
6
11
|
"react-i18next": "*",
|
|
@@ -12,10 +17,24 @@
|
|
|
12
17
|
"types": "./index.d.ts",
|
|
13
18
|
"dependencies": {
|
|
14
19
|
"react": "^18.2.0",
|
|
15
|
-
"@shipengine/elements-core": "0.11.1",
|
|
16
|
-
"@shipengine/elements-ui": "0.11.1",
|
|
17
|
-
"@shipengine/types": "0.11.1",
|
|
18
20
|
"@emotion/react": "^11.10.0",
|
|
19
|
-
"@packlink/brands": "^3.18.0"
|
|
21
|
+
"@packlink/brands": "^3.18.0",
|
|
22
|
+
"@shipengine/react": "0.13.0",
|
|
23
|
+
"react-hook-form": "^7.31.2",
|
|
24
|
+
"@emotion/css": "^11.10.5",
|
|
25
|
+
"humps": "^2.0.1",
|
|
26
|
+
"react-datepicker": "^4.8.0",
|
|
27
|
+
"@shipengine/types": "0.13.0",
|
|
28
|
+
"zod": "^3.17.3",
|
|
29
|
+
"react-dom": "^18.2.0",
|
|
30
|
+
"libphonenumber-js": "^1.10.14",
|
|
31
|
+
"card-validator": "^8.1.1",
|
|
32
|
+
"js-base64": "^3.7.2",
|
|
33
|
+
"@faker-js/faker": "^7.3.0",
|
|
34
|
+
"swr": "^2.0.0-beta.5",
|
|
35
|
+
"stylis": "^4.1.2",
|
|
36
|
+
"i18next-browser-languagedetector": "^6.1.4",
|
|
37
|
+
"axios": "^0.26.1",
|
|
38
|
+
"@hookform/resolvers": "2.9.1"
|
|
20
39
|
}
|
|
21
40
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { WithChildrenCommonProps } from "@packlink/giger";
|
|
2
|
+
/**
|
|
3
|
+
* @category Providers
|
|
4
|
+
*/
|
|
5
|
+
export declare const GigerProvider: ({ children, brandName, rootId, }: WithChildrenCommonProps<{
|
|
6
|
+
brandName?: string | undefined;
|
|
7
|
+
rootId: string;
|
|
8
|
+
}>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./giger-provider";
|
package/register.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface ErrorFallbackProps {
|
|
3
|
+
error: Error | string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Fallback component for the Elements ErrorBoundary
|
|
7
|
+
*
|
|
8
|
+
* @see {@link registerElement}
|
|
9
|
+
*/
|
|
10
|
+
export declare const ErrorFallback: ({ error }: ErrorFallbackProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
11
|
+
type KeyWithStringValue<T> = string & keyof {
|
|
12
|
+
[K in keyof Required<T> as Required<T>[K] extends string ? K : never]: T[K] extends string ? T[K] : never;
|
|
13
|
+
};
|
|
14
|
+
type ExtendedElementProps<ElementProps> = ElementProps & Record<string, unknown>;
|
|
15
|
+
/**
|
|
16
|
+
* Registers element with all necessary providers and wrappers
|
|
17
|
+
*/
|
|
18
|
+
export declare const registerElement: <ElementProps>(name: string, Element: import("react").ComponentType<ElementProps>, invalidationKey?: KeyWithStringValue<ElementProps> | KeyWithStringValue<ElementProps>[] | undefined) => (props: ExtendedElementProps<ElementProps>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./shipengine";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* @category Form Validation
|
|
4
|
+
*/
|
|
5
|
+
export declare const addressLine1Schema: z.ZodString;
|
|
6
|
+
/**
|
|
7
|
+
* @category Form Validation
|
|
8
|
+
*/
|
|
9
|
+
export declare const addressLine1SchemaNoPoBox: z.ZodEffects<z.ZodString, string, string>;
|
|
10
|
+
/**
|
|
11
|
+
* @category Form Validation
|
|
12
|
+
*/
|
|
13
|
+
export declare const addressLine2Schema: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string | undefined, string | null | undefined>;
|
|
14
|
+
/**
|
|
15
|
+
* @category Form Validation
|
|
16
|
+
*/
|
|
17
|
+
export declare const addressLine2SchemaNoPoBox: z.ZodEffects<z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string | undefined, string | null | undefined>, string | undefined, string | null | undefined>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import * as SE from "@shipengine/types";
|
|
3
|
+
/**
|
|
4
|
+
* @category Form Validation
|
|
5
|
+
*/
|
|
6
|
+
export declare const moneySchema: z.ZodObject<{
|
|
7
|
+
amount: z.ZodNumber;
|
|
8
|
+
currency: z.ZodNativeEnum<typeof SE.Currency>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
amount: number;
|
|
11
|
+
currency: SE.Currency;
|
|
12
|
+
}, {
|
|
13
|
+
amount: number;
|
|
14
|
+
currency: SE.Currency;
|
|
15
|
+
}>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { CountryCode } from "libphonenumber-js/min";
|
|
3
|
+
/**
|
|
4
|
+
* @category Form Validation
|
|
5
|
+
*/
|
|
6
|
+
export declare const phoneSchema: (defaultCountryCode?: CountryCode) => z.ZodEffects<z.ZodString, string, string>;
|
|
7
|
+
/**
|
|
8
|
+
* @category Form Validation
|
|
9
|
+
*/
|
|
10
|
+
export declare const phoneSchemaUnvalidated: z.ZodString;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const renderWithProviders: (component: any) => import("@testing-library/react").RenderResult<typeof import("@testing-library/dom/types/queries"), HTMLElement, HTMLElement>;
|
package/testing/swr.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="jest" />
|
|
2
|
+
export declare const buildSwrGetMock: (response: any) => {
|
|
3
|
+
errors: undefined;
|
|
4
|
+
mutate: () => Promise<any>;
|
|
5
|
+
isValidating: boolean;
|
|
6
|
+
isLoading: boolean;
|
|
7
|
+
data: any;
|
|
8
|
+
};
|
|
9
|
+
export declare const buildSwrPostMock: (response: any) => {
|
|
10
|
+
errors: undefined;
|
|
11
|
+
trigger: () => Promise<any>;
|
|
12
|
+
isMutating: boolean;
|
|
13
|
+
data: any;
|
|
14
|
+
reset: jest.Mock<any, any>;
|
|
15
|
+
};
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./shipping-preset";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as SE from "@shipengine/types";
|
|
2
|
+
export type ShippingPreset = {
|
|
3
|
+
confirmation?: SE.ConfirmationType;
|
|
4
|
+
dimensions?: SE.DimensionsWithUnit;
|
|
5
|
+
insuranceProvider?: SE.InsuranceProvider;
|
|
6
|
+
insuredValue?: SE.InsuranceAccount;
|
|
7
|
+
name: string;
|
|
8
|
+
packageCode?: string;
|
|
9
|
+
serviceName?: string;
|
|
10
|
+
weight?: SE.WeightWithUnit;
|
|
11
|
+
} & ({
|
|
12
|
+
carrierId: string;
|
|
13
|
+
serviceCode: string;
|
|
14
|
+
} | {
|
|
15
|
+
carrierId?: never;
|
|
16
|
+
serviceCode?: never;
|
|
17
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @category Utilities
|
|
3
|
+
*/
|
|
4
|
+
export declare const formatDate: (date: string, locale?: string) => string;
|
|
5
|
+
/**
|
|
6
|
+
* @category Utilities
|
|
7
|
+
*/
|
|
8
|
+
export declare const daysAfter: (days: number, date?: Date) => Date;
|
|
9
|
+
/**
|
|
10
|
+
* @category Utilities
|
|
11
|
+
*/
|
|
12
|
+
export declare const nextDayCutoff: (cutoff: number, date?: Date) => Date;
|
|
13
|
+
/**
|
|
14
|
+
* @category Utilities
|
|
15
|
+
*/
|
|
16
|
+
export declare const mostRecent: (...dates: Date[]) => Date;
|
|
17
|
+
/**
|
|
18
|
+
* @category Utilities
|
|
19
|
+
*/
|
|
20
|
+
export declare const omitTime: (shipDate: string) => Date;
|
|
21
|
+
/**
|
|
22
|
+
* @category Utilities
|
|
23
|
+
*/
|
|
24
|
+
export declare const getExpirationYears: (yearsValid: number) => string[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FieldValues, ResolverResult, UseFormHandleSubmit } from "react-hook-form";
|
|
2
|
+
/**
|
|
3
|
+
* @description
|
|
4
|
+
* This will log the values that are submitted to the validation resolver
|
|
5
|
+
* (only REGISTERED form fields) and the results of that validation.
|
|
6
|
+
*
|
|
7
|
+
* @usage Wrap the submission:
|
|
8
|
+
* `<form onSubmit={formLogger.capture(handleSubmit)}>`
|
|
9
|
+
*
|
|
10
|
+
* @category Utilities
|
|
11
|
+
*/
|
|
12
|
+
export declare const formLogger: {
|
|
13
|
+
isSubmitting: boolean;
|
|
14
|
+
capture(handleSubmit: ReturnType<UseFormHandleSubmit<any>>): (e?: React.BaseSyntheticEvent) => void;
|
|
15
|
+
log: <T, U extends FieldValues>(values: T, getValidationResult: () => Promise<ResolverResult<U>>) => Promise<ResolverResult<U>>;
|
|
16
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from "./create-dictionary";
|
|
2
|
+
export * from "./date";
|
|
3
|
+
export * from "./error";
|
|
4
|
+
export * from "./form-logger";
|
|
5
|
+
export * from "./money";
|
|
6
|
+
export * from "./predicates";
|
|
7
|
+
export * from "./rates";
|
|
8
|
+
export * from "./shipengine";
|
|
9
|
+
export * from "./string";
|
|
10
|
+
export * from "./styles";
|
|
11
|
+
export * from "./validation";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./isString";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isString: (x: unknown) => x is string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as SE from "@shipengine/types";
|
|
2
|
+
export declare const getRateRequiresAcknowledgement: (serviceCode: string) => boolean;
|
|
3
|
+
export declare const getTotalRateAmount: (rateCosts: {
|
|
4
|
+
shippingAmount?: SE.Money;
|
|
5
|
+
taxAmount?: SE.Money;
|
|
6
|
+
insuranceAmount?: SE.Money;
|
|
7
|
+
confirmationAmount?: SE.Money;
|
|
8
|
+
otherAmount?: SE.Money;
|
|
9
|
+
}) => number;
|