@shipengine/elements 0.21.5 → 0.22.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 +190 -102
- package/index.js +190 -104
- package/package.json +2 -1
- package/src/components/copy/copy-button.d.ts +7 -0
- package/src/components/copy/index.d.ts +1 -0
- package/src/components/field/switch/switch.d.ts +1 -1
- package/src/components/index.d.ts +1 -0
- package/src/components/link-action/link-action.d.ts +2 -0
- package/src/components/templates/address-form/address-form.d.ts +1 -1
- package/src/components/templates/label/label.styles.d.ts +1 -0
- package/src/components/templates/shipment-form/shipment-form.d.ts +1 -1
- package/src/components/templates/shipment-form/shipment-schema.d.ts +56 -18
- package/src/elements/list-carriers/list-carriers.d.ts +1 -0
- package/src/elements/manage-warehouses/manage-warehouses.d.ts +1 -0
- package/src/elements/onboarding/onboarding.d.ts +1 -0
- package/src/elements/purchase-label/purchase-label.d.ts +1 -0
- package/src/elements/view-shipment/view-shipment.d.ts +1 -0
- package/src/elements/void-label/void-label.d.ts +1 -0
- package/src/locales/en/index.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shipengine/elements",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"typedoc": {
|
|
5
5
|
"entryPoint": "./src/index.ts",
|
|
6
6
|
"readmeFile": "../../README.md",
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"@storybook/theming": "7.0.0-rc.1",
|
|
36
36
|
"axios": "0.26.1",
|
|
37
37
|
"card-validator": "8.1.1",
|
|
38
|
+
"copy-to-clipboard": "3.3.3",
|
|
38
39
|
"humps": "2.0.1",
|
|
39
40
|
"js-base64": "3.7.3",
|
|
40
41
|
"libphonenumber-js": "1.10.14",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./copy-button";
|
|
@@ -3,7 +3,7 @@ import { ISwitchProps } from "@packlink/giger";
|
|
|
3
3
|
export type SwitchProps = {
|
|
4
4
|
children?: React.ReactNode;
|
|
5
5
|
defaultChecked?: boolean;
|
|
6
|
-
label?:
|
|
6
|
+
label?: React.ReactNode;
|
|
7
7
|
shouldUnmount?: boolean;
|
|
8
8
|
} & Omit<ISwitchProps, "children">;
|
|
9
9
|
export declare const Switch: ({ defaultChecked, children, shouldUnmount, label, onChange, ...props }: SwitchProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -3,6 +3,7 @@ export * from "./add-funds-form";
|
|
|
3
3
|
export * from "./auto-funding-form";
|
|
4
4
|
export * from "./button-group";
|
|
5
5
|
export * from "./carrier-balance";
|
|
6
|
+
export * from "./copy";
|
|
6
7
|
export * from "./cube";
|
|
7
8
|
export * from "./date-range-combo";
|
|
8
9
|
export * from "./date-range-select";
|
|
@@ -2,6 +2,8 @@ import { ILinkProps } from "@packlink/giger";
|
|
|
2
2
|
import { IconNames } from "@packlink/giger-theme";
|
|
3
3
|
declare const icons: {
|
|
4
4
|
readonly add: IconNames.ADD;
|
|
5
|
+
readonly checkFilled: IconNames.CHECK_FILLED;
|
|
6
|
+
readonly copy: IconNames.COPY;
|
|
5
7
|
readonly download: IconNames.DOWNLOAD;
|
|
6
8
|
};
|
|
7
9
|
export type LinkActionProps = {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: Record<"trackingNumber" | "truncatedTrackingNumber", import("@emotion/serialize").Interpolation<import("@packlink/giger-theme/dist/lib/Theme").Theme>>;
|
|
@@ -8,6 +8,13 @@ type GetShipmentSchemaOptions = {
|
|
|
8
8
|
warehouses?: SE.Warehouse[];
|
|
9
9
|
};
|
|
10
10
|
export declare const getShipmentSchema: ({ allowInternationalShipFrom, warehouses, requireMeasurements, isContentDescriptionRequired, isCustomsRequired, }?: GetShipmentSchemaOptions) => z.ZodEffects<z.ZodDiscriminatedUnion<"__mode", z.Primitive, z.ZodObject<z.extendShape<{
|
|
11
|
+
advancedOptions: z.ZodOptional<z.ZodObject<{
|
|
12
|
+
additionalHandling: z.ZodOptional<z.ZodBoolean>;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
additionalHandling?: boolean | undefined;
|
|
15
|
+
}, {
|
|
16
|
+
additionalHandling?: boolean | undefined;
|
|
17
|
+
}>>;
|
|
11
18
|
carrierId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
12
19
|
confirmation: z.ZodDefault<z.ZodNativeEnum<typeof SE.ConfirmationType>>;
|
|
13
20
|
customs: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
@@ -110,11 +117,11 @@ export declare const getShipmentSchema: ({ allowInternationalShipFrom, warehouse
|
|
|
110
117
|
carrierId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
111
118
|
code: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
112
119
|
}, "strip", z.ZodTypeAny, {
|
|
113
|
-
carrierId?: string | null | undefined;
|
|
114
120
|
code?: string | null | undefined;
|
|
115
|
-
}, {
|
|
116
121
|
carrierId?: string | null | undefined;
|
|
122
|
+
}, {
|
|
117
123
|
code?: string | null | undefined;
|
|
124
|
+
carrierId?: string | null | undefined;
|
|
118
125
|
}>;
|
|
119
126
|
weight: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
120
127
|
fractional: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodNumber>>, number, number | null | undefined>;
|
|
@@ -156,8 +163,8 @@ export declare const getShipmentSchema: ({ allowInternationalShipFrom, warehouse
|
|
|
156
163
|
} | undefined;
|
|
157
164
|
weight?: SE.WeightWithUnit | undefined;
|
|
158
165
|
type: {
|
|
159
|
-
carrierId?: string | null | undefined;
|
|
160
166
|
code?: string | null | undefined;
|
|
167
|
+
carrierId?: string | null | undefined;
|
|
161
168
|
};
|
|
162
169
|
}, {
|
|
163
170
|
contentDescription?: string | null | undefined;
|
|
@@ -182,8 +189,8 @@ export declare const getShipmentSchema: ({ allowInternationalShipFrom, warehouse
|
|
|
182
189
|
whole?: number | null | undefined;
|
|
183
190
|
} | null | undefined;
|
|
184
191
|
type: {
|
|
185
|
-
carrierId?: string | null | undefined;
|
|
186
192
|
code?: string | null | undefined;
|
|
193
|
+
carrierId?: string | null | undefined;
|
|
187
194
|
};
|
|
188
195
|
}>, "many">;
|
|
189
196
|
service: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
@@ -202,6 +209,9 @@ export declare const getShipmentSchema: ({ allowInternationalShipFrom, warehouse
|
|
|
202
209
|
}, {
|
|
203
210
|
__mode: z.ZodLiteral<"browse_rates">;
|
|
204
211
|
}>, "strip", z.ZodTypeAny, {
|
|
212
|
+
advancedOptions?: {
|
|
213
|
+
additionalHandling?: boolean | undefined;
|
|
214
|
+
} | undefined;
|
|
205
215
|
carrierId?: string | null | undefined;
|
|
206
216
|
customs?: {
|
|
207
217
|
contents: SE.CustomsContentsType;
|
|
@@ -232,13 +242,16 @@ export declare const getShipmentSchema: ({ allowInternationalShipFrom, warehouse
|
|
|
232
242
|
} | undefined;
|
|
233
243
|
weight?: SE.WeightWithUnit | undefined;
|
|
234
244
|
type: {
|
|
235
|
-
carrierId?: string | null | undefined;
|
|
236
245
|
code?: string | null | undefined;
|
|
246
|
+
carrierId?: string | null | undefined;
|
|
237
247
|
};
|
|
238
248
|
}[];
|
|
239
249
|
shipDate: string;
|
|
240
250
|
warehouseId: string;
|
|
241
251
|
}, {
|
|
252
|
+
advancedOptions?: {
|
|
253
|
+
additionalHandling?: boolean | undefined;
|
|
254
|
+
} | undefined;
|
|
242
255
|
carrierId?: string | null | undefined;
|
|
243
256
|
confirmation?: SE.ConfirmationType | undefined;
|
|
244
257
|
customs?: {
|
|
@@ -283,13 +296,20 @@ export declare const getShipmentSchema: ({ allowInternationalShipFrom, warehouse
|
|
|
283
296
|
whole?: number | null | undefined;
|
|
284
297
|
} | null | undefined;
|
|
285
298
|
type: {
|
|
286
|
-
carrierId?: string | null | undefined;
|
|
287
299
|
code?: string | null | undefined;
|
|
300
|
+
carrierId?: string | null | undefined;
|
|
288
301
|
};
|
|
289
302
|
}[];
|
|
290
303
|
shipDate: string;
|
|
291
304
|
warehouseId: string;
|
|
292
305
|
}> | z.ZodObject<z.extendShape<{
|
|
306
|
+
advancedOptions: z.ZodOptional<z.ZodObject<{
|
|
307
|
+
additionalHandling: z.ZodOptional<z.ZodBoolean>;
|
|
308
|
+
}, "strip", z.ZodTypeAny, {
|
|
309
|
+
additionalHandling?: boolean | undefined;
|
|
310
|
+
}, {
|
|
311
|
+
additionalHandling?: boolean | undefined;
|
|
312
|
+
}>>;
|
|
293
313
|
carrierId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
294
314
|
confirmation: z.ZodDefault<z.ZodNativeEnum<typeof SE.ConfirmationType>>;
|
|
295
315
|
customs: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
@@ -392,11 +412,11 @@ export declare const getShipmentSchema: ({ allowInternationalShipFrom, warehouse
|
|
|
392
412
|
carrierId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
393
413
|
code: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
394
414
|
}, "strip", z.ZodTypeAny, {
|
|
395
|
-
carrierId?: string | null | undefined;
|
|
396
415
|
code?: string | null | undefined;
|
|
397
|
-
}, {
|
|
398
416
|
carrierId?: string | null | undefined;
|
|
417
|
+
}, {
|
|
399
418
|
code?: string | null | undefined;
|
|
419
|
+
carrierId?: string | null | undefined;
|
|
400
420
|
}>;
|
|
401
421
|
weight: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
402
422
|
fractional: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodNumber>>, number, number | null | undefined>;
|
|
@@ -438,8 +458,8 @@ export declare const getShipmentSchema: ({ allowInternationalShipFrom, warehouse
|
|
|
438
458
|
} | undefined;
|
|
439
459
|
weight?: SE.WeightWithUnit | undefined;
|
|
440
460
|
type: {
|
|
441
|
-
carrierId?: string | null | undefined;
|
|
442
461
|
code?: string | null | undefined;
|
|
462
|
+
carrierId?: string | null | undefined;
|
|
443
463
|
};
|
|
444
464
|
}, {
|
|
445
465
|
contentDescription?: string | null | undefined;
|
|
@@ -464,8 +484,8 @@ export declare const getShipmentSchema: ({ allowInternationalShipFrom, warehouse
|
|
|
464
484
|
whole?: number | null | undefined;
|
|
465
485
|
} | null | undefined;
|
|
466
486
|
type: {
|
|
467
|
-
carrierId?: string | null | undefined;
|
|
468
487
|
code?: string | null | undefined;
|
|
488
|
+
carrierId?: string | null | undefined;
|
|
469
489
|
};
|
|
470
490
|
}>, "many">;
|
|
471
491
|
service: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
@@ -534,11 +554,11 @@ export declare const getShipmentSchema: ({ allowInternationalShipFrom, warehouse
|
|
|
534
554
|
carrierId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
535
555
|
code: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
536
556
|
}, "strip", z.ZodTypeAny, {
|
|
537
|
-
carrierId?: string | null | undefined;
|
|
538
557
|
code?: string | null | undefined;
|
|
539
|
-
}, {
|
|
540
558
|
carrierId?: string | null | undefined;
|
|
559
|
+
}, {
|
|
541
560
|
code?: string | null | undefined;
|
|
561
|
+
carrierId?: string | null | undefined;
|
|
542
562
|
}>;
|
|
543
563
|
weight: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
544
564
|
fractional: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodNumber>>, number, number | null | undefined>;
|
|
@@ -606,8 +626,8 @@ export declare const getShipmentSchema: ({ allowInternationalShipFrom, warehouse
|
|
|
606
626
|
} | undefined;
|
|
607
627
|
weight?: SE.WeightWithUnit | undefined;
|
|
608
628
|
type: {
|
|
609
|
-
carrierId?: string | null | undefined;
|
|
610
629
|
code?: string | null | undefined;
|
|
630
|
+
carrierId?: string | null | undefined;
|
|
611
631
|
};
|
|
612
632
|
}, {
|
|
613
633
|
contentDescription?: string | null | undefined;
|
|
@@ -628,8 +648,8 @@ export declare const getShipmentSchema: ({ allowInternationalShipFrom, warehouse
|
|
|
628
648
|
whole?: number | null | undefined;
|
|
629
649
|
} | null | undefined;
|
|
630
650
|
type: {
|
|
631
|
-
carrierId?: string | null | undefined;
|
|
632
651
|
code?: string | null | undefined;
|
|
652
|
+
carrierId?: string | null | undefined;
|
|
633
653
|
};
|
|
634
654
|
}>, "many">;
|
|
635
655
|
service: z.ZodObject<{
|
|
@@ -643,6 +663,9 @@ export declare const getShipmentSchema: ({ allowInternationalShipFrom, warehouse
|
|
|
643
663
|
serviceCode: string;
|
|
644
664
|
}>;
|
|
645
665
|
}>, "strip", z.ZodTypeAny, {
|
|
666
|
+
advancedOptions?: {
|
|
667
|
+
additionalHandling?: boolean | undefined;
|
|
668
|
+
} | undefined;
|
|
646
669
|
carrierId?: string | null | undefined;
|
|
647
670
|
customs?: {
|
|
648
671
|
contents: SE.CustomsContentsType;
|
|
@@ -669,8 +692,8 @@ export declare const getShipmentSchema: ({ allowInternationalShipFrom, warehouse
|
|
|
669
692
|
} | undefined;
|
|
670
693
|
weight?: SE.WeightWithUnit | undefined;
|
|
671
694
|
type: {
|
|
672
|
-
carrierId?: string | null | undefined;
|
|
673
695
|
code?: string | null | undefined;
|
|
696
|
+
carrierId?: string | null | undefined;
|
|
674
697
|
};
|
|
675
698
|
}[];
|
|
676
699
|
service: {
|
|
@@ -680,6 +703,9 @@ export declare const getShipmentSchema: ({ allowInternationalShipFrom, warehouse
|
|
|
680
703
|
shipDate: string;
|
|
681
704
|
warehouseId: string;
|
|
682
705
|
}, {
|
|
706
|
+
advancedOptions?: {
|
|
707
|
+
additionalHandling?: boolean | undefined;
|
|
708
|
+
} | undefined;
|
|
683
709
|
carrierId?: string | null | undefined;
|
|
684
710
|
confirmation?: SE.ConfirmationType | undefined;
|
|
685
711
|
customs?: {
|
|
@@ -716,8 +742,8 @@ export declare const getShipmentSchema: ({ allowInternationalShipFrom, warehouse
|
|
|
716
742
|
whole?: number | null | undefined;
|
|
717
743
|
} | null | undefined;
|
|
718
744
|
type: {
|
|
719
|
-
carrierId?: string | null | undefined;
|
|
720
745
|
code?: string | null | undefined;
|
|
746
|
+
carrierId?: string | null | undefined;
|
|
721
747
|
};
|
|
722
748
|
}[];
|
|
723
749
|
service: {
|
|
@@ -788,6 +814,9 @@ export declare const getShipmentSchema: ({ allowInternationalShipFrom, warehouse
|
|
|
788
814
|
} | undefined;
|
|
789
815
|
})[];
|
|
790
816
|
serviceCode: string | undefined;
|
|
817
|
+
advancedOptions?: {
|
|
818
|
+
additionalHandling?: boolean | undefined;
|
|
819
|
+
} | undefined;
|
|
791
820
|
shipmentId?: string | undefined;
|
|
792
821
|
__mode: "browse_rates";
|
|
793
822
|
confirmation: SE.ConfirmationType;
|
|
@@ -856,6 +885,9 @@ export declare const getShipmentSchema: ({ allowInternationalShipFrom, warehouse
|
|
|
856
885
|
} | undefined;
|
|
857
886
|
})[];
|
|
858
887
|
serviceCode: string | undefined;
|
|
888
|
+
advancedOptions?: {
|
|
889
|
+
additionalHandling?: boolean | undefined;
|
|
890
|
+
} | undefined;
|
|
859
891
|
shipmentId?: string | undefined;
|
|
860
892
|
__mode: "select_service";
|
|
861
893
|
confirmation: SE.ConfirmationType;
|
|
@@ -863,6 +895,9 @@ export declare const getShipmentSchema: ({ allowInternationalShipFrom, warehouse
|
|
|
863
895
|
shipDate: string;
|
|
864
896
|
warehouseId: string;
|
|
865
897
|
}, {
|
|
898
|
+
advancedOptions?: {
|
|
899
|
+
additionalHandling?: boolean | undefined;
|
|
900
|
+
} | undefined;
|
|
866
901
|
carrierId?: string | null | undefined;
|
|
867
902
|
confirmation?: SE.ConfirmationType | undefined;
|
|
868
903
|
customs?: {
|
|
@@ -907,13 +942,16 @@ export declare const getShipmentSchema: ({ allowInternationalShipFrom, warehouse
|
|
|
907
942
|
whole?: number | null | undefined;
|
|
908
943
|
} | null | undefined;
|
|
909
944
|
type: {
|
|
910
|
-
carrierId?: string | null | undefined;
|
|
911
945
|
code?: string | null | undefined;
|
|
946
|
+
carrierId?: string | null | undefined;
|
|
912
947
|
};
|
|
913
948
|
}[];
|
|
914
949
|
shipDate: string;
|
|
915
950
|
warehouseId: string;
|
|
916
951
|
} | {
|
|
952
|
+
advancedOptions?: {
|
|
953
|
+
additionalHandling?: boolean | undefined;
|
|
954
|
+
} | undefined;
|
|
917
955
|
carrierId?: string | null | undefined;
|
|
918
956
|
confirmation?: SE.ConfirmationType | undefined;
|
|
919
957
|
customs?: {
|
|
@@ -950,8 +988,8 @@ export declare const getShipmentSchema: ({ allowInternationalShipFrom, warehouse
|
|
|
950
988
|
whole?: number | null | undefined;
|
|
951
989
|
} | null | undefined;
|
|
952
990
|
type: {
|
|
953
|
-
carrierId?: string | null | undefined;
|
|
954
991
|
code?: string | null | undefined;
|
|
992
|
+
carrierId?: string | null | undefined;
|
|
955
993
|
};
|
|
956
994
|
}[];
|
|
957
995
|
service: {
|