@shipengine/elements 0.25.0 → 0.26.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 +1101 -640
- package/index.js +1108 -654
- package/package.json +12 -4
- package/src/components/field/field.styles.d.ts +2 -12
- package/src/components/index.d.ts +1 -0
- package/src/components/label-layout/label-layout-settings.d.ts +3 -1
- package/src/components/powered-by-shipengine/index.d.ts +1 -0
- package/src/components/powered-by-shipengine/powered-by-shipengine.d.ts +1 -0
- package/src/components/powered-by-shipengine/powered-by-shipengine.styles.d.ts +11 -0
- package/src/components/save-status/index.d.ts +2 -0
- package/src/components/save-status/save-status-styles.d.ts +43 -0
- package/src/components/save-status/save-status.d.ts +6 -0
- package/src/components/templates/index.d.ts +0 -1
- package/src/components/templates/rate-form/rate-form.d.ts +1 -0
- package/src/constants/shipengine/address.d.ts +2 -0
- package/src/elements/list-carriers/list-carriers.d.ts +26 -14
- package/src/elements/manage-warehouses/manage-warehouses.d.ts +26 -14
- package/src/elements/onboarding/onboarding.d.ts +26 -14
- package/src/elements/purchase-label/hooks/use-load-or-create-shipment.d.ts +6 -0
- package/src/elements/purchase-label/purchase-label-by-shipment.d.ts +5 -2
- package/src/elements/purchase-label/purchase-label.d.ts +38 -20
- package/src/elements/view-shipment/view-shipment.d.ts +26 -14
- package/src/{components/templates/void-label/void-label.d.ts → elements/void-label/components/actions/actions.d.ts} +3 -3
- package/src/elements/void-label/components/actions/index.d.ts +1 -0
- package/src/elements/void-label/components/index.d.ts +2 -0
- package/src/elements/void-label/components/message/index.d.ts +1 -0
- package/src/elements/void-label/components/message/message.d.ts +6 -0
- package/src/elements/void-label/void-label.d.ts +26 -14
- package/src/hooks/options/index.d.ts +1 -0
- package/src/hooks/options/use-package-options.d.ts +1 -1
- package/src/hooks/options/use-service-code-options.d.ts +1 -1
- package/src/hooks/options/use-shipment-metadata.d.ts +8 -0
- package/src/hooks/options/use-shipping-presets-options.d.ts +2 -1
- package/src/hooks/use-get-or-create-shipment.d.ts +2 -0
- package/src/locales/en/index.d.ts +26 -14
- package/src/mocks/server.d.ts +1 -0
- package/src/testing/extensions/index.d.ts +2 -0
- package/src/testing/extensions/matchers/extend-matchers.d.ts +8 -0
- package/src/testing/extensions/matchers/index.d.ts +1 -0
- package/src/testing/extensions/matchers/matchers.d.ts +1 -0
- package/src/testing/extensions/matchers/to-have-loading-spinner.d.ts +2 -0
- package/src/testing/extensions/queries/by-icon-name.d.ts +4 -0
- package/src/testing/extensions/queries/index.d.ts +57 -0
- package/src/testing/extensions/queries/queries.d.ts +1 -0
- package/src/testing/index.d.ts +1 -1
- package/src/testing/test-utils.d.ts +292 -0
- package/src/utilities/error.d.ts +13 -0
- package/src/utilities/i18nDateUtils.d.ts +16 -0
- package/src/utilities/shipengine/address.d.ts +4 -0
- package/src/utilities/shipengine/carrier.d.ts +1 -0
- package/src/components/templates/void-label/index.d.ts +0 -1
- package/src/public-sdk.d.ts +0 -38
- package/src/testing/render.d.ts +0 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shipengine/elements",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"typedoc": {
|
|
5
5
|
"entryPoint": "./src/index.ts",
|
|
6
6
|
"readmeFile": "../../README.md",
|
|
@@ -27,22 +27,30 @@
|
|
|
27
27
|
"@emotion/serialize": "1.1.1",
|
|
28
28
|
"@faker-js/faker": "7.6.0",
|
|
29
29
|
"@hookform/resolvers": "2.9.1",
|
|
30
|
+
"@jest/globals": "28.1.3",
|
|
30
31
|
"@packlink/brands": "3.24.0",
|
|
31
32
|
"@packlink/giger-theme": "1.3.1",
|
|
32
|
-
"@shipengine/alchemy": "0.4.
|
|
33
|
-
"@shipengine/js-api": "0.
|
|
33
|
+
"@shipengine/alchemy": "0.4.18",
|
|
34
|
+
"@shipengine/js-api": "0.10.0",
|
|
35
|
+
"@shipengine/react-api": "0.5.6",
|
|
36
|
+
"@storybook/addons": "6.5.16",
|
|
37
|
+
"@storybook/components": "7.0.0-rc.1",
|
|
38
|
+
"@storybook/core-events": "7.0.0-rc.1",
|
|
34
39
|
"@storybook/manager-api": "7.0.0-rc.1",
|
|
35
40
|
"@storybook/theming": "7.0.0-rc.1",
|
|
41
|
+
"@testing-library/dom": "8.19.0",
|
|
36
42
|
"@vitejs/plugin-react": "1.3.2",
|
|
37
43
|
"axios": "0.26.1",
|
|
38
44
|
"card-validator": "8.1.1",
|
|
39
45
|
"copy-to-clipboard": "3.3.3",
|
|
46
|
+
"date-fns": "2.29.3",
|
|
47
|
+
"expect": "28.1.3",
|
|
40
48
|
"humps": "2.0.1",
|
|
41
49
|
"js-base64": "3.7.3",
|
|
42
50
|
"libphonenumber-js": "1.10.14",
|
|
43
51
|
"lodash": "4.17.21",
|
|
44
52
|
"react": "18.2.0",
|
|
45
|
-
"react-datepicker": "4.
|
|
53
|
+
"react-datepicker": "4.11.0",
|
|
46
54
|
"react-dom": "18.2.0",
|
|
47
55
|
"react-hook-form": "7.40.0",
|
|
48
56
|
"react-query": "3.39.3",
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
+
import { Interpolation } from "@emotion/serialize";
|
|
1
2
|
import { Theme } from "@packlink/giger-theme";
|
|
2
|
-
export declare const getOverrideStyles: (theme: Theme) =>
|
|
3
|
-
"&& input, && span[role='button']": {
|
|
4
|
-
cursor: string;
|
|
5
|
-
fontWeight: number;
|
|
6
|
-
};
|
|
7
|
-
"&& input:hover": {
|
|
8
|
-
cursor: string;
|
|
9
|
-
};
|
|
10
|
-
"&&.disabled input:hover": {
|
|
11
|
-
cursor: string;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
3
|
+
export declare const getOverrideStyles: (theme: Theme) => Interpolation<Theme>;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { SE } from "@shipengine/alchemy";
|
|
2
2
|
export type LabelLayoutSettingsProps = {
|
|
3
|
+
errors: SE.CodedError[] | null;
|
|
4
|
+
isSaving: boolean;
|
|
3
5
|
onChange: (layout: SE.LabelLayout) => void;
|
|
4
6
|
};
|
|
5
|
-
export declare const LabelLayoutSettings: ({ onChange }: LabelLayoutSettingsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const LabelLayoutSettings: ({ errors, isSaving, onChange }: LabelLayoutSettingsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './powered-by-shipengine';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PoweredByShipEngine: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export declare const colors: {
|
|
2
|
+
green: string;
|
|
3
|
+
grey: string;
|
|
4
|
+
red: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const styles: {
|
|
7
|
+
checkmark: () => {
|
|
8
|
+
animation: `${string} forwards`;
|
|
9
|
+
borderRadius: string;
|
|
10
|
+
height: string;
|
|
11
|
+
stroke: "#fff";
|
|
12
|
+
width: string;
|
|
13
|
+
};
|
|
14
|
+
checkmarkCheck: () => {
|
|
15
|
+
animation: `${string} 1s forwards`;
|
|
16
|
+
strokeDasharray: string;
|
|
17
|
+
strokeDashoffset: string;
|
|
18
|
+
};
|
|
19
|
+
container: (theme: import("@packlink/giger-theme/dist/lib/Theme").Theme) => {
|
|
20
|
+
alignItems: "center";
|
|
21
|
+
animation: `${string} 2.5s ease-in-out forwards`;
|
|
22
|
+
display: "flex";
|
|
23
|
+
justifyContent: "flex-start";
|
|
24
|
+
padding: string;
|
|
25
|
+
};
|
|
26
|
+
saved: (theme: import("@packlink/giger-theme/dist/lib/Theme").Theme) => {
|
|
27
|
+
color: string;
|
|
28
|
+
marginLeft: string;
|
|
29
|
+
};
|
|
30
|
+
saving: (theme: import("@packlink/giger-theme/dist/lib/Theme").Theme) => {
|
|
31
|
+
marginLeft: string;
|
|
32
|
+
};
|
|
33
|
+
savingContainer: () => {
|
|
34
|
+
alignItems: "center";
|
|
35
|
+
color: string;
|
|
36
|
+
display: "flex";
|
|
37
|
+
justifyContent: "flex-start";
|
|
38
|
+
};
|
|
39
|
+
savingFailed: (theme: import("@packlink/giger-theme/dist/lib/Theme").Theme) => {
|
|
40
|
+
color: "#EE3B3F";
|
|
41
|
+
marginLeft: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -17,7 +17,6 @@ export * from "./shipment-form";
|
|
|
17
17
|
export * from "./shipment";
|
|
18
18
|
export * from "./suspend-shipment";
|
|
19
19
|
export * from "./warehouse-form";
|
|
20
|
-
export * from "./void-label";
|
|
21
20
|
export * from "./wallet-form";
|
|
22
21
|
export * from "../address-preference-context";
|
|
23
22
|
export * from "./address-preference-select";
|
|
@@ -2,6 +2,7 @@ export type CountryRules = {
|
|
|
2
2
|
hasEuCustomsRules?: boolean;
|
|
3
3
|
hasProvinces?: boolean;
|
|
4
4
|
isUnitedStatesTerritory?: boolean;
|
|
5
|
+
isUnsupportedByUps?: boolean;
|
|
5
6
|
supportsByoa?: boolean;
|
|
6
7
|
};
|
|
7
8
|
export declare class Country<T extends string, U extends string> {
|
|
@@ -11,6 +12,7 @@ export declare class Country<T extends string, U extends string> {
|
|
|
11
12
|
hasProvinces: boolean;
|
|
12
13
|
isUnitedStatesTerritory: boolean;
|
|
13
14
|
supportsByoa: boolean;
|
|
15
|
+
isUnsupportedByUps: boolean;
|
|
14
16
|
constructor(name: T, code: U, rules?: CountryRules);
|
|
15
17
|
}
|
|
16
18
|
export declare const countries: readonly [Country<"Afghanistan", "AF">, Country<"Aland Islands", "AX">, Country<"Albania", "AL">, Country<"Algeria", "DZ">, Country<"American Samoa", "AS">, Country<"Andorra", "AD">, Country<"Angola", "AO">, Country<"Anguilla", "AI">, Country<"Antarctica", "AQ">, Country<"Antigua Barbuda", "AG">, Country<"Argentina", "AR">, Country<"Armenia", "AM">, Country<"Aruba", "AW">, Country<"Australia", "AU">, Country<"Austria", "AT">, Country<"Azerbaijan", "AZ">, Country<"Bahamas", "BS">, Country<"Bahrain", "BH">, Country<"Bangladesh", "BD">, Country<"Barbados", "BB">, Country<"Belarus", "BY">, Country<"Belgium", "BE">, Country<"Belize", "BZ">, Country<"Benin", "BJ">, Country<"Bermuda", "BM">, Country<"Bhutan", "BT">, Country<"Bolivia", "BO">, Country<"Bonaire, Sint Eustatius And Saba", "BQ">, Country<"Bosnia and Herzegovina", "BA">, Country<"Botswana", "BW">, Country<"Brazil", "BR">, Country<"British Indian Ocean Territory", "IO">, Country<"British Virgin Islands", "VG">, Country<"Brunei Darussalam", "BN">, Country<"Bulgaria", "BG">, Country<"Burkina Faso", "BF">, Country<"Burundi", "BI">, Country<"Canada", "CA">, Country<"Cambodia", "KH">, Country<"Cameroon", "CM">, Country<"Cape Verde Islands", "CV">, Country<"Cayman Islands", "KY">, Country<"Central African Republic", "CF">, Country<"Chad", "TD">, Country<"Chile", "CL">, Country<"China", "CN">, Country<"Christmas Island", "CX">, Country<"Cocos(Keeling) Islands", "CC">, Country<"Colombia", "CO">, Country<"Comoros", "KM">, Country<"Congo", "CG">, Country<"Congo, The Democratic Republic of", "CD">, Country<"Cook Islands", "CK">, Country<"Costa Rica", "CR">, Country<"Croatia", "HR">, Country<"Cuba", "CU">, Country<"Curacao", "CW">, Country<"Cyprus", "CY">, Country<"Czech Republic", "CZ">, Country<"Denmark", "DK">, Country<"Djibouti", "DJ">, Country<"Dominica", "DM">, Country<"Dominican Republic", "DO">, Country<"Ecuador", "EC">, Country<"Egypt", "EG">, Country<"El Salvador", "SV">, Country<"Equatorial Guinea", "GQ">, Country<"Eritrea", "ER">, Country<"Estonia", "EE">, Country<"Ethiopia", "ET">, Country<"Falkland Islands", "FK">, Country<"Faroe Islands", "FO">, Country<"Federated States of Micronesia", "FM">, Country<"Fiji", "FJ">, Country<"Finland", "FI">, Country<"France", "FR">, Country<"French Guiana", "GF">, Country<"French Polynesia", "PF">, Country<"French Southern Territories", "TF">, Country<"Gabon", "GA">, Country<"Gambia", "GM">, Country<"Georgia", "GE">, Country<"Germany", "DE">, Country<"Ghana", "GH">, Country<"Gibraltar", "GI">, Country<"Greece", "GR">, Country<"Greenland", "GL">, Country<"Grenada", "GD">, Country<"Guadeloupe", "GP">, Country<"Guam", "GU">, Country<"Guatemala", "GT">, Country<"Guernsey", "GG">, Country<"Guinea", "GN">, Country<"Guinea - Bissau", "GW">, Country<"Guyana", "GY">, Country<"Haiti", "HT">, Country<"Holy See", "VA">, Country<"Honduras", "HN">, Country<"Hong Kong", "HK">, Country<"Hungary", "HU">, Country<"Iceland", "IS">, Country<"India", "IN">, Country<"Indonesia", "ID">, Country<"Iran", "IR">, Country<"Iraq", "IQ">, Country<"Ireland", "IE">, Country<"Isle of Man", "IM">, Country<"Israel", "IL">, Country<"Italy", "IT">, Country<"Ivory Coast", "CI">, Country<"Jamaica", "JM">, Country<"Japan", "JP">, Country<"Jersey", "JE">, Country<"Jordan", "JO">, Country<"Kazakhstan", "KZ">, Country<"Kenya", "KE">, Country<"Kiribati", "KI">, Country<"Korea, Republic of", "KR">, Country<"Kuwait", "KW">, Country<"Kyrgyzstan", "KG">, Country<"Laos", "LA">, Country<"Latvia", "LV">, Country<"Lebanon", "LB">, Country<"Lesotho", "LS">, Country<"Liberia", "LR">, Country<"Libya", "LY">, Country<"Liechtenstein", "LI">, Country<"Lithuania", "LT">, Country<"Luxembourg", "LU">, Country<"Macao", "MO">, Country<"Macedonia", "MK">, Country<"Madagascar", "MG">, Country<"Malawi", "MW">, Country<"Malaysia", "MY">, Country<"Maldives", "MV">, Country<"Mali", "ML">, Country<"Malta", "MT">, Country<"Marshall Islands", "MH">, Country<"Martinique", "MQ">, Country<"Mauritania", "MR">, Country<"Mauritius0", "MU">, Country<"Mayotte", "YT">, Country<"Mexico", "MX">, Country<"Moldova", "MD">, Country<"Monaco", "MC">, Country<"Mongolia", "MN">, Country<"Montenegro", "ME">, Country<"Montserrat", "MS">, Country<"Morocco", "MA">, Country<"Mozambique", "MZ">, Country<"Myanmar", "MM">, Country<"Namibia", "NA">, Country<"Nauru", "NR">, Country<"Nepal", "NP">, Country<"Netherlands", "NL">, Country<"Netherlands Antilles", "AN">, Country<"New Caledonia", "NC">, Country<"New Zealand", "NZ">, Country<"Nicaragua", "NI">, Country<"Niger", "NE">, Country<"Nigeria", "NG">, Country<"Niue", "NU">, Country<"Norfolk Island", "NF">, Country<"North Korea", "KP">, Country<"Northern Mariana Islands", "MP">, Country<"Norway", "NO">, Country<"Oman", "OM">, Country<"Pakistan", "PK">, Country<"Palau", "PW">, Country<"Palestinian Territory", "PS">, Country<"Panama", "PA">, Country<"Papua New Guinea", "PG">, Country<"Paraguay", "PY">, Country<"Peru", "PE">, Country<"Philippines", "PH">, Country<"Pitcairn Island", "PN">, Country<"Poland", "PL">, Country<"Portugal", "PT">, Country<"Puerto Rico", "PR">, Country<"Qatar", "QA">, Country<"Reunion", "RE">, Country<"Romania", "RO">, Country<"Russia", "RU">, Country<"Rwanda", "RW">, Country<"Saint Barthelemy", "BL">, Country<"Saint Helena", "SH">, Country<"Saint Kitts and Nevis", "KN">, Country<"Saint Lucia", "LC">, Country<"Saint Martin", "MF">, Country<"Saint Pierre and Miquelon", "PM">, Country<"Saint Vincent & the Grenadines", "VC">, Country<"Samoa", "WS">, Country<"San Marino", "SM">, Country<"Sao Tome and Principe", "ST">, Country<"Saudi Arabia", "SA">, Country<"Senegal", "SN">, Country<"Serbia", "RS">, Country<"Seychelles", "SC">, Country<"Sierra Leone", "SL">, Country<"Singapore", "SG">, Country<"Sint Maarten(Dutch)", "SX">, Country<"Slovakia", "SK">, Country<"Slovenia", "SI">, Country<"Solomon Islands", "SB">, Country<"Somalia", "SO">, Country<"South Africa", "ZA">, Country<"South Georgia & the South Sandwich Islands", "GS">, Country<"South Sudan", "SS">, Country<"Spain", "ES">, Country<"Sri Lanka", "LK">, Country<"Sudan", "SD">, Country<"Suriname", "SR">, Country<"Svalbard & Jan Mayen Islands", "SJ">, Country<"Swaziland", "SZ">, Country<"Sweden", "SE">, Country<"Switzerland", "CH">, Country<"Syria", "SY">, Country<"Taiwan", "TW">, Country<"Tajikistan", "TJ">, Country<"Tanzania", "TZ">, Country<"Thailand", "TH">, Country<"Timor - Leste(formerly East Timor)", "TL">, Country<"Togo", "TG">, Country<"Tokelau", "TK">, Country<"Tonga", "TO">, Country<"Trinidad and Tobago", "TT">, Country<"Tunisia", "TN">, Country<"Turkey", "TR">, Country<"Turkmenistan", "TM">, Country<"Turks and Caicos Islands", "TC">, Country<"Tuvalu", "TV">, Country<"Uganda", "UG">, Country<"Ukraine", "UA">, Country<"United Arab Emirates", "AE">, Country<"United Kingdom", "GB">, Country<"United States Virgin Islands", "VI">, Country<"U.S. Minor Outlying Islands", "UM">, Country<"United States of America", "US">, Country<"Uruguay", "UY">, Country<"Uzbekistan", "UZ">, Country<"Vanuatu", "VU">, Country<"Venezuela", "VE">, Country<"Vietnam", "VN">, Country<"Wallis and Futuna Islands", "WF">, Country<"Western Sahara", "EH">, Country<"Yemen", "YE">, Country<"Zambia", "ZM">, Country<"Zimbabwe", "ZW">];
|
|
@@ -23,6 +23,9 @@ export declare const Element: ({ resources, ...props }: object & {
|
|
|
23
23
|
confirmVoid: string;
|
|
24
24
|
viewShipment: string;
|
|
25
25
|
};
|
|
26
|
+
errorMessages: {
|
|
27
|
+
labelIdRequired: string;
|
|
28
|
+
};
|
|
26
29
|
resultMessages: {
|
|
27
30
|
approved: string;
|
|
28
31
|
rejected: string;
|
|
@@ -168,6 +171,7 @@ export declare const Element: ({ resources, ...props }: object & {
|
|
|
168
171
|
shipDate: string;
|
|
169
172
|
service: string;
|
|
170
173
|
shipTo: string;
|
|
174
|
+
addShipToAddress: string;
|
|
171
175
|
warehouse: string;
|
|
172
176
|
weight: {
|
|
173
177
|
whole: string;
|
|
@@ -233,21 +237,8 @@ export declare const Element: ({ resources, ...props }: object & {
|
|
|
233
237
|
};
|
|
234
238
|
};
|
|
235
239
|
"manage-defaults": {
|
|
236
|
-
units: {
|
|
237
|
-
title: string;
|
|
238
|
-
dimensions: {
|
|
239
|
-
title: string;
|
|
240
|
-
standard: string;
|
|
241
|
-
metric: string;
|
|
242
|
-
};
|
|
243
|
-
weight: {
|
|
244
|
-
title: string;
|
|
245
|
-
standard: string;
|
|
246
|
-
g: string;
|
|
247
|
-
kg: string;
|
|
248
|
-
};
|
|
249
|
-
};
|
|
250
240
|
label: {
|
|
241
|
+
title: string;
|
|
251
242
|
letter: {
|
|
252
243
|
title: string;
|
|
253
244
|
description: string;
|
|
@@ -260,7 +251,25 @@ export declare const Element: ({ resources, ...props }: object & {
|
|
|
260
251
|
title: string;
|
|
261
252
|
description: string;
|
|
262
253
|
};
|
|
254
|
+
};
|
|
255
|
+
status: {
|
|
256
|
+
saving: string;
|
|
257
|
+
saved: string;
|
|
258
|
+
savingFailed: string;
|
|
259
|
+
};
|
|
260
|
+
units: {
|
|
263
261
|
title: string;
|
|
262
|
+
dimensions: {
|
|
263
|
+
title: string;
|
|
264
|
+
standard: string;
|
|
265
|
+
metric: string;
|
|
266
|
+
};
|
|
267
|
+
weight: {
|
|
268
|
+
title: string;
|
|
269
|
+
standard: string;
|
|
270
|
+
g: string;
|
|
271
|
+
kg: string;
|
|
272
|
+
};
|
|
264
273
|
};
|
|
265
274
|
};
|
|
266
275
|
"manage-warehouses": {
|
|
@@ -475,6 +484,7 @@ export declare const Element: ({ resources, ...props }: object & {
|
|
|
475
484
|
autoFundingSettings: string;
|
|
476
485
|
carrier: string;
|
|
477
486
|
carriers: string;
|
|
487
|
+
label: string;
|
|
478
488
|
salesOrder: string;
|
|
479
489
|
shipment: string;
|
|
480
490
|
warehouses: string;
|
|
@@ -505,6 +515,7 @@ export declare const Element: ({ resources, ...props }: object & {
|
|
|
505
515
|
carriers: string;
|
|
506
516
|
data: string;
|
|
507
517
|
importingSalesOrder: string;
|
|
518
|
+
label: string;
|
|
508
519
|
onboarding: string;
|
|
509
520
|
salesOrder: string;
|
|
510
521
|
shipment: string;
|
|
@@ -531,6 +542,7 @@ export declare const Element: ({ resources, ...props }: object & {
|
|
|
531
542
|
packageCodes: {
|
|
532
543
|
package: string;
|
|
533
544
|
};
|
|
545
|
+
"powered-by": string;
|
|
534
546
|
schema: {
|
|
535
547
|
optionalLabel: string;
|
|
536
548
|
};
|
|
@@ -27,6 +27,9 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
27
27
|
confirmVoid: string;
|
|
28
28
|
viewShipment: string;
|
|
29
29
|
};
|
|
30
|
+
errorMessages: {
|
|
31
|
+
labelIdRequired: string;
|
|
32
|
+
};
|
|
30
33
|
resultMessages: {
|
|
31
34
|
approved: string;
|
|
32
35
|
rejected: string;
|
|
@@ -172,6 +175,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
172
175
|
shipDate: string;
|
|
173
176
|
service: string;
|
|
174
177
|
shipTo: string;
|
|
178
|
+
addShipToAddress: string;
|
|
175
179
|
warehouse: string;
|
|
176
180
|
weight: {
|
|
177
181
|
whole: string;
|
|
@@ -237,21 +241,8 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
237
241
|
};
|
|
238
242
|
};
|
|
239
243
|
"manage-defaults": {
|
|
240
|
-
units: {
|
|
241
|
-
title: string;
|
|
242
|
-
dimensions: {
|
|
243
|
-
title: string;
|
|
244
|
-
standard: string;
|
|
245
|
-
metric: string;
|
|
246
|
-
};
|
|
247
|
-
weight: {
|
|
248
|
-
title: string;
|
|
249
|
-
standard: string;
|
|
250
|
-
g: string;
|
|
251
|
-
kg: string;
|
|
252
|
-
};
|
|
253
|
-
};
|
|
254
244
|
label: {
|
|
245
|
+
title: string;
|
|
255
246
|
letter: {
|
|
256
247
|
title: string;
|
|
257
248
|
description: string;
|
|
@@ -264,7 +255,25 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
264
255
|
title: string;
|
|
265
256
|
description: string;
|
|
266
257
|
};
|
|
258
|
+
};
|
|
259
|
+
status: {
|
|
260
|
+
saving: string;
|
|
261
|
+
saved: string;
|
|
262
|
+
savingFailed: string;
|
|
263
|
+
};
|
|
264
|
+
units: {
|
|
267
265
|
title: string;
|
|
266
|
+
dimensions: {
|
|
267
|
+
title: string;
|
|
268
|
+
standard: string;
|
|
269
|
+
metric: string;
|
|
270
|
+
};
|
|
271
|
+
weight: {
|
|
272
|
+
title: string;
|
|
273
|
+
standard: string;
|
|
274
|
+
g: string;
|
|
275
|
+
kg: string;
|
|
276
|
+
};
|
|
268
277
|
};
|
|
269
278
|
};
|
|
270
279
|
"manage-warehouses": {
|
|
@@ -479,6 +488,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
479
488
|
autoFundingSettings: string;
|
|
480
489
|
carrier: string;
|
|
481
490
|
carriers: string;
|
|
491
|
+
label: string;
|
|
482
492
|
salesOrder: string;
|
|
483
493
|
shipment: string;
|
|
484
494
|
warehouses: string;
|
|
@@ -509,6 +519,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
509
519
|
carriers: string;
|
|
510
520
|
data: string;
|
|
511
521
|
importingSalesOrder: string;
|
|
522
|
+
label: string;
|
|
512
523
|
onboarding: string;
|
|
513
524
|
salesOrder: string;
|
|
514
525
|
shipment: string;
|
|
@@ -535,6 +546,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
535
546
|
packageCodes: {
|
|
536
547
|
package: string;
|
|
537
548
|
};
|
|
549
|
+
"powered-by": string;
|
|
538
550
|
schema: {
|
|
539
551
|
optionalLabel: string;
|
|
540
552
|
};
|
|
@@ -26,6 +26,9 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
26
26
|
confirmVoid: string;
|
|
27
27
|
viewShipment: string;
|
|
28
28
|
};
|
|
29
|
+
errorMessages: {
|
|
30
|
+
labelIdRequired: string;
|
|
31
|
+
};
|
|
29
32
|
resultMessages: {
|
|
30
33
|
approved: string;
|
|
31
34
|
rejected: string;
|
|
@@ -171,6 +174,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
171
174
|
shipDate: string;
|
|
172
175
|
service: string;
|
|
173
176
|
shipTo: string;
|
|
177
|
+
addShipToAddress: string;
|
|
174
178
|
warehouse: string;
|
|
175
179
|
weight: {
|
|
176
180
|
whole: string;
|
|
@@ -236,21 +240,8 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
236
240
|
};
|
|
237
241
|
};
|
|
238
242
|
"manage-defaults": {
|
|
239
|
-
units: {
|
|
240
|
-
title: string;
|
|
241
|
-
dimensions: {
|
|
242
|
-
title: string;
|
|
243
|
-
standard: string;
|
|
244
|
-
metric: string;
|
|
245
|
-
};
|
|
246
|
-
weight: {
|
|
247
|
-
title: string;
|
|
248
|
-
standard: string;
|
|
249
|
-
g: string;
|
|
250
|
-
kg: string;
|
|
251
|
-
};
|
|
252
|
-
};
|
|
253
243
|
label: {
|
|
244
|
+
title: string;
|
|
254
245
|
letter: {
|
|
255
246
|
title: string;
|
|
256
247
|
description: string;
|
|
@@ -263,7 +254,25 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
263
254
|
title: string;
|
|
264
255
|
description: string;
|
|
265
256
|
};
|
|
257
|
+
};
|
|
258
|
+
status: {
|
|
259
|
+
saving: string;
|
|
260
|
+
saved: string;
|
|
261
|
+
savingFailed: string;
|
|
262
|
+
};
|
|
263
|
+
units: {
|
|
266
264
|
title: string;
|
|
265
|
+
dimensions: {
|
|
266
|
+
title: string;
|
|
267
|
+
standard: string;
|
|
268
|
+
metric: string;
|
|
269
|
+
};
|
|
270
|
+
weight: {
|
|
271
|
+
title: string;
|
|
272
|
+
standard: string;
|
|
273
|
+
g: string;
|
|
274
|
+
kg: string;
|
|
275
|
+
};
|
|
267
276
|
};
|
|
268
277
|
};
|
|
269
278
|
"manage-warehouses": {
|
|
@@ -478,6 +487,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
478
487
|
autoFundingSettings: string;
|
|
479
488
|
carrier: string;
|
|
480
489
|
carriers: string;
|
|
490
|
+
label: string;
|
|
481
491
|
salesOrder: string;
|
|
482
492
|
shipment: string;
|
|
483
493
|
warehouses: string;
|
|
@@ -508,6 +518,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
508
518
|
carriers: string;
|
|
509
519
|
data: string;
|
|
510
520
|
importingSalesOrder: string;
|
|
521
|
+
label: string;
|
|
511
522
|
onboarding: string;
|
|
512
523
|
salesOrder: string;
|
|
513
524
|
shipment: string;
|
|
@@ -534,6 +545,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
534
545
|
packageCodes: {
|
|
535
546
|
package: string;
|
|
536
547
|
};
|
|
548
|
+
"powered-by": string;
|
|
537
549
|
schema: {
|
|
538
550
|
optionalLabel: string;
|
|
539
551
|
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const useLoadOrCreateShipment: (shipmentId?: string) => {
|
|
2
|
+
errors: import("@shipengine/js-api").CodedError[] | undefined;
|
|
3
|
+
isLoading: boolean;
|
|
4
|
+
refetchShipment: <TPageData>(options?: (import("react-query").RefetchOptions & import("react-query").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("react-query").QueryObserverResult<import("@shipengine/js-api").SalesOrderShipment, import("@shipengine/js-api").CodedError[]>>;
|
|
5
|
+
shipment: import("@shipengine/js-api").SalesOrderShipment | undefined;
|
|
6
|
+
};
|
|
@@ -2,8 +2,11 @@ import { ReactNode } from "react";
|
|
|
2
2
|
import { SalesOrderProps } from "./purchase-label-by-sales-order";
|
|
3
3
|
type ShipmentOrderProps = {
|
|
4
4
|
children?: ReactNode;
|
|
5
|
+
} & ({
|
|
5
6
|
shipmentId: string;
|
|
6
|
-
}
|
|
7
|
+
} | {
|
|
8
|
+
oneOff: true;
|
|
9
|
+
});
|
|
7
10
|
type PurchaseLabelByShipmentProps = Partial<SalesOrderProps> & ShipmentOrderProps;
|
|
8
|
-
export declare const PurchaseLabelByShipment: ({
|
|
11
|
+
export declare const PurchaseLabelByShipment: ({ onLoad, onShipmentUpdated, features, ...props }: PurchaseLabelByShipmentProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
9
12
|
export {};
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { SalesOrderProps } from "./purchase-label-by-sales-order";
|
|
3
|
-
|
|
4
|
-
shipmentId
|
|
3
|
+
type ComponentShipmentProps = SalesOrderProps & {
|
|
4
|
+
shipmentId: string;
|
|
5
5
|
};
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
type ComponentOneOffProps = SalesOrderProps & {
|
|
7
|
+
oneOff: true;
|
|
8
|
+
};
|
|
9
|
+
type ComponentSalesOrderProps = SalesOrderProps & {
|
|
10
|
+
salesOrderId: string;
|
|
11
|
+
};
|
|
12
|
+
export type ComponentProps = ComponentShipmentProps | ComponentOneOffProps | ComponentSalesOrderProps;
|
|
13
|
+
export declare const Component: ({ ...props }: ComponentProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
10
15
|
resources?: {
|
|
11
16
|
en: {
|
|
12
17
|
"wallet-history": {
|
|
@@ -29,6 +34,9 @@ export declare const Element: ({ resources, ...props }: SalesOrderProps & {
|
|
|
29
34
|
confirmVoid: string;
|
|
30
35
|
viewShipment: string;
|
|
31
36
|
};
|
|
37
|
+
errorMessages: {
|
|
38
|
+
labelIdRequired: string;
|
|
39
|
+
};
|
|
32
40
|
resultMessages: {
|
|
33
41
|
approved: string;
|
|
34
42
|
rejected: string;
|
|
@@ -174,6 +182,7 @@ export declare const Element: ({ resources, ...props }: SalesOrderProps & {
|
|
|
174
182
|
shipDate: string;
|
|
175
183
|
service: string;
|
|
176
184
|
shipTo: string;
|
|
185
|
+
addShipToAddress: string;
|
|
177
186
|
warehouse: string;
|
|
178
187
|
weight: {
|
|
179
188
|
whole: string;
|
|
@@ -239,21 +248,8 @@ export declare const Element: ({ resources, ...props }: SalesOrderProps & {
|
|
|
239
248
|
};
|
|
240
249
|
};
|
|
241
250
|
"manage-defaults": {
|
|
242
|
-
units: {
|
|
243
|
-
title: string;
|
|
244
|
-
dimensions: {
|
|
245
|
-
title: string;
|
|
246
|
-
standard: string;
|
|
247
|
-
metric: string;
|
|
248
|
-
};
|
|
249
|
-
weight: {
|
|
250
|
-
title: string;
|
|
251
|
-
standard: string;
|
|
252
|
-
g: string;
|
|
253
|
-
kg: string;
|
|
254
|
-
};
|
|
255
|
-
};
|
|
256
251
|
label: {
|
|
252
|
+
title: string;
|
|
257
253
|
letter: {
|
|
258
254
|
title: string;
|
|
259
255
|
description: string;
|
|
@@ -266,7 +262,25 @@ export declare const Element: ({ resources, ...props }: SalesOrderProps & {
|
|
|
266
262
|
title: string;
|
|
267
263
|
description: string;
|
|
268
264
|
};
|
|
265
|
+
};
|
|
266
|
+
status: {
|
|
267
|
+
saving: string;
|
|
268
|
+
saved: string;
|
|
269
|
+
savingFailed: string;
|
|
270
|
+
};
|
|
271
|
+
units: {
|
|
269
272
|
title: string;
|
|
273
|
+
dimensions: {
|
|
274
|
+
title: string;
|
|
275
|
+
standard: string;
|
|
276
|
+
metric: string;
|
|
277
|
+
};
|
|
278
|
+
weight: {
|
|
279
|
+
title: string;
|
|
280
|
+
standard: string;
|
|
281
|
+
g: string;
|
|
282
|
+
kg: string;
|
|
283
|
+
};
|
|
270
284
|
};
|
|
271
285
|
};
|
|
272
286
|
"manage-warehouses": {
|
|
@@ -481,6 +495,7 @@ export declare const Element: ({ resources, ...props }: SalesOrderProps & {
|
|
|
481
495
|
autoFundingSettings: string;
|
|
482
496
|
carrier: string;
|
|
483
497
|
carriers: string;
|
|
498
|
+
label: string;
|
|
484
499
|
salesOrder: string;
|
|
485
500
|
shipment: string;
|
|
486
501
|
warehouses: string;
|
|
@@ -511,6 +526,7 @@ export declare const Element: ({ resources, ...props }: SalesOrderProps & {
|
|
|
511
526
|
carriers: string;
|
|
512
527
|
data: string;
|
|
513
528
|
importingSalesOrder: string;
|
|
529
|
+
label: string;
|
|
514
530
|
onboarding: string;
|
|
515
531
|
salesOrder: string;
|
|
516
532
|
shipment: string;
|
|
@@ -537,6 +553,7 @@ export declare const Element: ({ resources, ...props }: SalesOrderProps & {
|
|
|
537
553
|
packageCodes: {
|
|
538
554
|
package: string;
|
|
539
555
|
};
|
|
556
|
+
"powered-by": string;
|
|
540
557
|
schema: {
|
|
541
558
|
optionalLabel: string;
|
|
542
559
|
};
|
|
@@ -588,3 +605,4 @@ export declare const Element: ({ resources, ...props }: SalesOrderProps & {
|
|
|
588
605
|
} | undefined;
|
|
589
606
|
}) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
590
607
|
export type ElementProps = React.ComponentProps<typeof Element>;
|
|
608
|
+
export {};
|