@shipengine/elements 0.23.1 → 0.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/index.cjs +594 -293
  2. package/index.js +599 -298
  3. package/package.json +4 -3
  4. package/src/components/add-funds-form/add-funds-form.styles.d.ts +21 -5
  5. package/src/components/auto-funding-form/auto-funding-form.styles.d.ts +18 -1
  6. package/src/components/carrier-balance/carrier-balance.styles.d.ts +5 -1
  7. package/src/components/date-range-select/date-range-select.styles.d.ts +7 -1
  8. package/src/components/disclosure/disclosure.styles.d.ts +23 -1
  9. package/src/components/error-display/error-display.d.ts +1 -0
  10. package/src/components/error-display/error-display.styles.d.ts +19 -0
  11. package/src/components/error-display/index.d.ts +1 -0
  12. package/src/components/field/rate-card/rate-card.d.ts +1 -2
  13. package/src/components/field/rate-card/rate-card.styles.d.ts +0 -2
  14. package/src/components/field/switch/switch.d.ts +3 -2
  15. package/src/components/fund-and-purchase/fund-and-purchase.styles.d.ts +20 -1
  16. package/src/components/history/history-card/history-card.styles.d.ts +42 -1
  17. package/src/components/history/history-card-extension/history-card-extension.d.ts +1 -0
  18. package/src/components/history/history-card-extension/history-card-extension.styles.d.ts +26 -0
  19. package/src/components/history/history-card-extension/index.d.ts +1 -0
  20. package/src/components/history/index.d.ts +1 -0
  21. package/src/components/inline-label/inline-label.styles.d.ts +8 -1
  22. package/src/components/items-breakdown/items-breakdown.styles.d.ts +21 -1
  23. package/src/components/label/label.d.ts +1 -1
  24. package/src/components/label/label.styles.d.ts +12 -1
  25. package/src/components/label-layout/label-layout.styles.d.ts +106 -1
  26. package/src/components/link-action/link-action.d.ts +3 -1
  27. package/src/components/section/section.styles.d.ts +33 -1
  28. package/src/components/settings-card/settings-card.styles.d.ts +41 -1
  29. package/src/components/templates/address-form/address-fields.styles.d.ts +27 -1
  30. package/src/components/templates/carrier-recovery-form/carrier-recovery-form.styles.d.ts +11 -1
  31. package/src/components/templates/carrier-terms-form/carrier-terms-form.styles.d.ts +56 -1
  32. package/src/components/templates/customs-items-display/customs-items-display.styles.d.ts +60 -1
  33. package/src/components/templates/edit-billing-form/edit-billing-form.styles.d.ts +16 -1
  34. package/src/components/templates/label/label.styles.d.ts +12 -1
  35. package/src/components/templates/landing-page/landing-page.styles.d.ts +14 -1
  36. package/src/components/templates/list-carriers/list-carriers.styles.d.ts +25 -1
  37. package/src/components/templates/list-carriers-row/list-carriers-row.styles.d.ts +23 -1
  38. package/src/components/templates/manage-wallet/manage-wallet.styles.d.ts +21 -1
  39. package/src/components/templates/manage-warehouses/manage-warehouse.styles.d.ts +14 -1
  40. package/src/components/templates/onboarding/onboarding.styles.d.ts +21 -1
  41. package/src/components/templates/rate-form/rate-form.d.ts +3 -2
  42. package/src/components/templates/rate-form/rate-form.styles.d.ts +16 -1
  43. package/src/components/templates/wallet-card/wallet-card.styles.d.ts +11 -1
  44. package/src/components/templates/wallet-form/wallet-form.styles.d.ts +5 -1
  45. package/src/components/unit-settings/unit-settings.d.ts +1 -4
  46. package/src/elements/configure-shipment/hooks/use-rates-form.d.ts +2 -0
  47. package/src/elements/list-carriers/list-carriers.d.ts +10 -4
  48. package/src/elements/manage-warehouses/manage-warehouses.d.ts +10 -4
  49. package/src/elements/onboarding/onboarding.d.ts +10 -4
  50. package/src/elements/purchase-label/purchase-label.d.ts +10 -4
  51. package/src/elements/view-shipment/view-shipment.d.ts +10 -4
  52. package/src/elements/void-label/void-label.d.ts +10 -4
  53. package/src/factories/shipengine/wallet-history.d.ts +52 -0
  54. package/src/features/wallet-history/wallet-history.styles.d.ts +81 -1
  55. package/src/hooks/options/use-rate-options.d.ts +1 -14
  56. package/src/locales/en/index.d.ts +10 -4
  57. package/src/mocks/account-settings/handlers.d.ts +8 -0
  58. package/src/mocks/account-settings/index.d.ts +1 -0
  59. package/src/mocks/index.d.ts +1 -0
  60. package/src/public-sdk.d.ts +38 -0
  61. package/src/utilities/rates.d.ts +1 -1
  62. package/src/utilities/styles.d.ts +27 -6
  63. package/vite.config.d.ts +2 -0
@@ -29,6 +29,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
29
29
  };
30
30
  };
31
31
  "void-label": {
32
+ title: string;
32
33
  actions: {
33
34
  complete: string;
34
35
  confirmVoid: string;
@@ -47,6 +48,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
47
48
  voidedOn: string;
48
49
  };
49
50
  "view-shipment": {
51
+ title: string;
50
52
  actions: {
51
53
  buyAnotherLabel: string;
52
54
  hideItems: string;
@@ -126,6 +128,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
126
128
  agreeToTerms: string;
127
129
  };
128
130
  "purchase-label": {
131
+ title: string;
129
132
  actions: {
130
133
  calculateRates_one: string;
131
134
  calculateRates_other: string;
@@ -183,6 +186,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
183
186
  fractional: string;
184
187
  };
185
188
  weightGroup: string;
189
+ today: string;
186
190
  };
187
191
  hints: {
188
192
  contentDescription: string;
@@ -195,10 +199,6 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
195
199
  selectService: string;
196
200
  };
197
201
  multipleShippingServices: string;
198
- recommendedRates: {
199
- recommended: string;
200
- stayInformed: string;
201
- };
202
202
  schemaErrors: {
203
203
  shipFromUnitedStatesOnly: string;
204
204
  shipFromAddressRequired: string;
@@ -206,6 +206,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
206
206
  };
207
207
  rates: {
208
208
  uspsMediaMailAcknowledgement: string;
209
+ uspsFirstClassMailAcknowledgement_leof: string;
209
210
  };
210
211
  shipToAddressFormFields: string;
211
212
  sections: {
@@ -216,6 +217,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
216
217
  };
217
218
  };
218
219
  onboarding: {
220
+ title: string;
219
221
  inlineTitle: string;
220
222
  landing: {
221
223
  action: string;
@@ -274,6 +276,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
274
276
  };
275
277
  };
276
278
  "manage-warehouses": {
279
+ title: string;
277
280
  addNew: string;
278
281
  editWarehouse: string;
279
282
  contactName: string;
@@ -337,6 +340,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
337
340
  maximumBalanceAmount: string;
338
341
  };
339
342
  "list-carriers": {
343
+ title: string;
340
344
  headers: {
341
345
  accountCarriers: string;
342
346
  carriers: string;
@@ -479,6 +483,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
479
483
  invalidNameOrCompany: string;
480
484
  noWarehouses: string;
481
485
  unableToLoad: {
486
+ accountSettings: string;
482
487
  autoFundingSettings: string;
483
488
  carrier: string;
484
489
  carriers: string;
@@ -507,6 +512,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
507
512
  thirdParty: string;
508
513
  };
509
514
  loading: {
515
+ accountSettings: string;
510
516
  carrier: string;
511
517
  carriers: string;
512
518
  data: string;
@@ -24,6 +24,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
24
24
  };
25
25
  };
26
26
  "void-label": {
27
+ title: string;
27
28
  actions: {
28
29
  complete: string;
29
30
  confirmVoid: string;
@@ -42,6 +43,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
42
43
  voidedOn: string;
43
44
  };
44
45
  "view-shipment": {
46
+ title: string;
45
47
  actions: {
46
48
  buyAnotherLabel: string;
47
49
  hideItems: string;
@@ -121,6 +123,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
121
123
  agreeToTerms: string;
122
124
  };
123
125
  "purchase-label": {
126
+ title: string;
124
127
  actions: {
125
128
  calculateRates_one: string;
126
129
  calculateRates_other: string;
@@ -178,6 +181,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
178
181
  fractional: string;
179
182
  };
180
183
  weightGroup: string;
184
+ today: string;
181
185
  };
182
186
  hints: {
183
187
  contentDescription: string;
@@ -190,10 +194,6 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
190
194
  selectService: string;
191
195
  };
192
196
  multipleShippingServices: string;
193
- recommendedRates: {
194
- recommended: string;
195
- stayInformed: string;
196
- };
197
197
  schemaErrors: {
198
198
  shipFromUnitedStatesOnly: string;
199
199
  shipFromAddressRequired: string;
@@ -201,6 +201,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
201
201
  };
202
202
  rates: {
203
203
  uspsMediaMailAcknowledgement: string;
204
+ uspsFirstClassMailAcknowledgement_leof: string;
204
205
  };
205
206
  shipToAddressFormFields: string;
206
207
  sections: {
@@ -211,6 +212,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
211
212
  };
212
213
  };
213
214
  onboarding: {
215
+ title: string;
214
216
  inlineTitle: string;
215
217
  landing: {
216
218
  action: string;
@@ -269,6 +271,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
269
271
  };
270
272
  };
271
273
  "manage-warehouses": {
274
+ title: string;
272
275
  addNew: string;
273
276
  editWarehouse: string;
274
277
  contactName: string;
@@ -332,6 +335,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
332
335
  maximumBalanceAmount: string;
333
336
  };
334
337
  "list-carriers": {
338
+ title: string;
335
339
  headers: {
336
340
  accountCarriers: string;
337
341
  carriers: string;
@@ -474,6 +478,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
474
478
  invalidNameOrCompany: string;
475
479
  noWarehouses: string;
476
480
  unableToLoad: {
481
+ accountSettings: string;
477
482
  autoFundingSettings: string;
478
483
  carrier: string;
479
484
  carriers: string;
@@ -502,6 +507,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
502
507
  thirdParty: string;
503
508
  };
504
509
  loading: {
510
+ accountSettings: string;
505
511
  carrier: string;
506
512
  carriers: string;
507
513
  data: string;
@@ -12,3 +12,55 @@ export declare const walletTransactionFactory: Factory<SE.WalletTransaction, any
12
12
  * @category Factories
13
13
  */
14
14
  export declare const walletHistoryFactory: (currentPage?: number, count?: number) => Factory<SE.WalletTransactionHistory, any, SE.WalletTransactionHistory>;
15
+ export type WalletAdjustment = {
16
+ actualShipment: TransactionShipment;
17
+ adjustment: TransactionCost;
18
+ adjustmentId: string;
19
+ originalShipment: TransactionShipment;
20
+ trackingNumber: string;
21
+ transactionId: string;
22
+ };
23
+ type TransactionShipment = {
24
+ dimensions: {
25
+ height: number;
26
+ length: number;
27
+ unit: string;
28
+ width: number;
29
+ };
30
+ insuranceCost: TransactionCost;
31
+ packageCode: string;
32
+ rateDetails: TransactionRateDetail[];
33
+ serviceCode: string;
34
+ shipFrom: TransactionShipDestination;
35
+ shipmentCost: TransactionCost;
36
+ shipTo: TransactionShipDestination;
37
+ weight: {
38
+ unit: string;
39
+ value: number;
40
+ };
41
+ };
42
+ type TransactionShipDestination = {
43
+ addressLine1: string;
44
+ addressLine2: string;
45
+ addressResidentialIndicator: "yes" | "no";
46
+ cityLocality: string;
47
+ companyName: string;
48
+ countryCode: string;
49
+ name: string;
50
+ phone: string;
51
+ postalCode: string;
52
+ stateProvince: string;
53
+ };
54
+ type TransactionRateDetail = {
55
+ amount: TransactionCost;
56
+ carrierBillingCode: string;
57
+ carrierDescription: string;
58
+ carrierMemo: string | null;
59
+ rateDetailType: string;
60
+ };
61
+ type TransactionCost = {
62
+ amount: number;
63
+ currency: string;
64
+ };
65
+ export declare const walletAdjustmentFactory: Factory<WalletAdjustment, any, WalletAdjustment>;
66
+ export {};
@@ -1 +1,81 @@
1
- export declare const styles: Record<"action" | "displayStateContainer" | "emptyStateContainer" | "gridContainer" | "linkAction" | "pagination" | "skeletonCard" | "skeletonCardColumnLeft" | "skeletonCardColumnRight" | "skeletonCardList" | "skeletonCardLogo" | "skeletonPagination", import("@emotion/serialize").Interpolation<import("@packlink/giger-theme/dist/lib/Theme").Theme>>;
1
+ export declare const styles: {
2
+ action: (theme: import("@packlink/giger-theme/dist/lib/Theme").Theme) => {
3
+ minWidth: number;
4
+ placeContent: "center";
5
+ width: number;
6
+ };
7
+ displayStateContainer: (theme: import("@packlink/giger-theme/dist/lib/Theme").Theme) => {
8
+ "& > *:not(:last-child)::after": {
9
+ borderBottom: string;
10
+ content: "\"\"";
11
+ display: "block";
12
+ width: string;
13
+ };
14
+ border: string;
15
+ display: "flex";
16
+ flexDirection: "column";
17
+ listStyle: "none";
18
+ };
19
+ emptyStateContainer: (theme: import("@packlink/giger-theme/dist/lib/Theme").Theme) => {
20
+ backgroundColor: string;
21
+ padding: number;
22
+ textAlign: "center";
23
+ };
24
+ gridContainer: (theme: import("@packlink/giger-theme/dist/lib/Theme").Theme) => {
25
+ display: "flex";
26
+ justifyContent: "space-between";
27
+ placeItems: "center";
28
+ };
29
+ linkAction: (theme: import("@packlink/giger-theme/dist/lib/Theme").Theme) => {
30
+ textAlign: "end";
31
+ };
32
+ pagination: {
33
+ "&& button": {
34
+ background: string;
35
+ };
36
+ "&& button[aria-current='step']": {
37
+ background: string;
38
+ };
39
+ textAlign: "center";
40
+ };
41
+ skeletonCard: (theme: import("@packlink/giger-theme/dist/lib/Theme").Theme) => {
42
+ backgroundColor: "#e3dfdf1f";
43
+ display: "flex";
44
+ justifyContent: "space-between";
45
+ padding: number;
46
+ };
47
+ skeletonCardColumnLeft: {
48
+ display: "flex";
49
+ flexDirection: "column";
50
+ justifyContent: "space-between";
51
+ };
52
+ skeletonCardColumnRight: (theme: import("@packlink/giger-theme/dist/lib/Theme").Theme) => {
53
+ alignItems: "flex-end";
54
+ display: "flex";
55
+ flexDirection: "column";
56
+ justifyContent: "space-between";
57
+ rowGap: number;
58
+ };
59
+ skeletonCardList: (theme: import("@packlink/giger-theme/dist/lib/Theme").Theme) => {
60
+ display: "flex";
61
+ flexDirection: "column";
62
+ rowGap: number;
63
+ };
64
+ skeletonCardLogo: (theme: import("@packlink/giger-theme/dist/lib/Theme").Theme) => {
65
+ alignItems: "center";
66
+ columnGap: number;
67
+ display: "flex";
68
+ };
69
+ skeletonCardTransactionRow: (theme: import("@packlink/giger-theme/dist/lib/Theme").Theme) => {
70
+ columnGap: string;
71
+ display: "flex";
72
+ };
73
+ skeletonPagination: (theme: import("@packlink/giger-theme/dist/lib/Theme").Theme) => {
74
+ alignItems: "center";
75
+ display: "flex";
76
+ justifyContent: "space-between";
77
+ marginLeft: string;
78
+ marginRight: string;
79
+ maxWidth: string;
80
+ };
81
+ };
@@ -2,20 +2,7 @@ import { SE } from "@shipengine/alchemy";
2
2
  export type RateOption = Omit<SE.Rate, "warningMessages"> & {
3
3
  balance?: number;
4
4
  messages: string[];
5
- recommended?: boolean;
6
5
  requiresAcknowledgement?: boolean;
7
6
  requiresFundedAmount?: boolean;
8
7
  };
9
- type RateRecommendation = {
10
- carrierCode: string;
11
- ignoreIfPresent?: string;
12
- serviceCode: string;
13
- tagline?: string;
14
- walleted: boolean;
15
- };
16
- type RateRecommendations = {
17
- domestic: RateRecommendation;
18
- international: RateRecommendation;
19
- };
20
- export declare const useRateOptions: (rates?: SE.Rate[], carriers?: SE.Carrier[], shipment?: SE.SalesOrderShipment, enableGlobalPostFiltering?: boolean, rateRecommendations?: RateRecommendations) => RateOption[];
21
- export {};
8
+ export declare const useRateOptions: (rates?: SE.Rate[], carriers?: SE.Carrier[], shipment?: SE.SalesOrderShipment, enableGlobalPostFiltering?: boolean) => RateOption[];
@@ -13,6 +13,7 @@ declare const _default: {
13
13
  };
14
14
  };
15
15
  "void-label": {
16
+ title: string;
16
17
  actions: {
17
18
  complete: string;
18
19
  confirmVoid: string;
@@ -31,6 +32,7 @@ declare const _default: {
31
32
  voidedOn: string;
32
33
  };
33
34
  "view-shipment": {
35
+ title: string;
34
36
  actions: {
35
37
  buyAnotherLabel: string;
36
38
  hideItems: string;
@@ -110,6 +112,7 @@ declare const _default: {
110
112
  agreeToTerms: string;
111
113
  };
112
114
  "purchase-label": {
115
+ title: string;
113
116
  actions: {
114
117
  calculateRates_one: string;
115
118
  calculateRates_other: string;
@@ -167,6 +170,7 @@ declare const _default: {
167
170
  fractional: string;
168
171
  };
169
172
  weightGroup: string;
173
+ today: string;
170
174
  };
171
175
  hints: {
172
176
  contentDescription: string;
@@ -179,10 +183,6 @@ declare const _default: {
179
183
  selectService: string;
180
184
  };
181
185
  multipleShippingServices: string;
182
- recommendedRates: {
183
- recommended: string;
184
- stayInformed: string;
185
- };
186
186
  schemaErrors: {
187
187
  shipFromUnitedStatesOnly: string;
188
188
  shipFromAddressRequired: string;
@@ -190,6 +190,7 @@ declare const _default: {
190
190
  };
191
191
  rates: {
192
192
  uspsMediaMailAcknowledgement: string;
193
+ uspsFirstClassMailAcknowledgement_leof: string;
193
194
  };
194
195
  shipToAddressFormFields: string;
195
196
  sections: {
@@ -200,6 +201,7 @@ declare const _default: {
200
201
  };
201
202
  };
202
203
  onboarding: {
204
+ title: string;
203
205
  inlineTitle: string;
204
206
  landing: {
205
207
  action: string;
@@ -258,6 +260,7 @@ declare const _default: {
258
260
  };
259
261
  };
260
262
  "manage-warehouses": {
263
+ title: string;
261
264
  addNew: string;
262
265
  editWarehouse: string;
263
266
  contactName: string;
@@ -321,6 +324,7 @@ declare const _default: {
321
324
  maximumBalanceAmount: string;
322
325
  };
323
326
  "list-carriers": {
327
+ title: string;
324
328
  headers: {
325
329
  accountCarriers: string;
326
330
  carriers: string;
@@ -463,6 +467,7 @@ declare const _default: {
463
467
  invalidNameOrCompany: string;
464
468
  noWarehouses: string;
465
469
  unableToLoad: {
470
+ accountSettings: string;
466
471
  autoFundingSettings: string;
467
472
  carrier: string;
468
473
  carriers: string;
@@ -491,6 +496,7 @@ declare const _default: {
491
496
  thirdParty: string;
492
497
  };
493
498
  loading: {
499
+ accountSettings: string;
494
500
  carrier: string;
495
501
  carriers: string;
496
502
  data: string;
@@ -0,0 +1,8 @@
1
+ export declare const createAccountSettingsHandlers: () => {
2
+ database: {
3
+ default_label_layout: string;
4
+ dimensions_unit: string;
5
+ weight_unit: string;
6
+ };
7
+ handlers: import("msw").RestHandler<import("msw/lib/glossary-de6278a9").M<import("msw/lib/glossary-de6278a9").h>>[];
8
+ };
@@ -0,0 +1 @@
1
+ export * from "./handlers";
@@ -1,2 +1,3 @@
1
1
  export * from "./carriers";
2
2
  export * from "./warehouses";
3
+ export * from "./account-settings";
@@ -0,0 +1,38 @@
1
+ import { DialogProps, ISidePanelDefaultHeaderProps, SidePanelProps } from "@packlink/giger";
2
+ import { AlchemyProps } from "@shipengine/alchemy";
3
+ import * as JsApi from "@shipengine/js-api";
4
+ import { ManageWarehouses, Onboarding, PurchaseLabel, ViewShipment, VoidLabel } from "./elements";
5
+ type DialogSDKProps = Omit<DialogProps, "isOpen">;
6
+ type SidePanelSDKProps = Omit<SidePanelProps, "isOpen">;
7
+ type ElementsSDKOptions = Omit<AlchemyProps, "getToken" | "children">;
8
+ export declare class ElementsSDK {
9
+ #private;
10
+ getClient(token: string, config: JsApi.ShipEngineAPIConfig): {
11
+ readonly token: never;
12
+ readonly accountSettings: Omit<JsApi.AccountSettingsAPI, "client">;
13
+ readonly addresses: Omit<JsApi.AddressesAPI, "client">;
14
+ readonly carriers: Omit<JsApi.CarriersAPI, "client">;
15
+ readonly customPackages: Omit<JsApi.CustomPackagesAPI, "client">;
16
+ readonly insurance: Omit<JsApi.InsuranceAPI, "client">;
17
+ readonly labels: Omit<JsApi.LabelsAPI, "client">;
18
+ readonly orderSources: Omit<JsApi.OrderSourcesAPI, "client">;
19
+ readonly rates: Omit<JsApi.RatesAPI, "client">;
20
+ readonly salesOrderShipments: Omit<JsApi.SalesOrderShipmentsAPI, "client">;
21
+ readonly salesOrders: Omit<JsApi.SalesOrdersAPI, "client">;
22
+ readonly shipments: Omit<JsApi.ShipmentsAPI, "client">;
23
+ readonly warehouses: Omit<JsApi.WarehousesAPI, "client">;
24
+ };
25
+ constructor(getToken: AlchemyProps["getToken"], options?: ElementsSDKOptions);
26
+ unmount(): void;
27
+ closeDialog(): void;
28
+ closeSidePanel(): void;
29
+ onboardUser(props: Onboarding.ComponentProps, dialogProps: DialogSDKProps): void;
30
+ purchaseLabel(props: PurchaseLabel.ComponentProps, sidePanelProps: SidePanelSDKProps, sidePanelHeaderProps: ISidePanelDefaultHeaderProps): void;
31
+ listCarriers(dialogProps: DialogSDKProps): void;
32
+ manageWarehouses(props: ManageWarehouses.ComponentProps, dialogProps: DialogSDKProps): void;
33
+ viewShipment(props: ViewShipment.ComponentProps, dialogProps: DialogSDKProps): void;
34
+ voidLabel(props: VoidLabel.ComponentProps & {
35
+ labelId: string;
36
+ }, dialogProps: DialogSDKProps): void;
37
+ }
38
+ export {};
@@ -1,5 +1,5 @@
1
1
  import { SE } from "@shipengine/alchemy";
2
- export declare const getRateRequiresAcknowledgement: (serviceCode: string) => boolean;
2
+ export declare const getRateRequiresAcknowledgement: (serviceCode: string, packageType: string) => boolean;
3
3
  export declare const getTotalRateAmount: (rateCosts?: {
4
4
  confirmationAmount?: SE.Money;
5
5
  insuranceAmount?: SE.Money;
@@ -1,18 +1,39 @@
1
1
  import { Interpolation } from "@emotion/serialize";
2
2
  import { Theme } from "@packlink/giger-theme";
3
3
  /**
4
- * Creates a Record of Emotion styles.
4
+ * The verbose typing is necessary to get around TypeScript's limitations on contextual inference
5
+ * with generics. https://stackoverflow.com/questions/75999792/ide-autocompletion-broken-with-typescript-mapped-type-conditionals
6
+ */
7
+ type GetterKey = `get${Capitalize<string>}`;
8
+ type GetterFunction = (...args: any[]) => Interpolation<Theme>;
9
+ type LowerLetters = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z";
10
+ type Letters = LowerLetters | Uppercase<LowerLetters>;
11
+ type NotG = Exclude<Letters, "g">;
12
+ type NotGE = `g${Exclude<Letters, "e">}`;
13
+ type NotGET = `ge${Exclude<Letters, "t">}`;
14
+ type NotGETUP = `get${Uncapitalize<string>}`;
15
+ type NotGetterKey = NotG | NotGE | NotGET | NotGETUP;
16
+ type StylesConstraint = Record<GetterKey, GetterFunction> & Record<`${NotGetterKey}${string}`, Interpolation<Theme>>;
17
+ /**
18
+ * Creates a Record of Emotion styles; eliminating the need to explicitly type styles
19
+ * while remaining fully typesafe w/ autocomplete.
5
20
  *
6
- * Values may be any variant that a `css` prop can accept (a CSSObject, SerializedStyles, a FunctionInterpolation with theme, etc).
21
+ * Keys prefixed with `get` are assumed to be getters and support arbitrary props.
7
22
  *
8
- * Eliminates the need to explicitly type styles (while remaining fully typed w/ autocomplete).
23
+ * Values may be any variant of `Interpolation` that the `css` prop can accept:
24
+ * a `CSSObject`, `SerializedStyles`, a `FunctionInterpolation` with theme, etc.
9
25
  *
10
26
  * @example
11
27
  * ```
12
28
  * const styles = createStyles({
13
- * container: (theme) => ({ backgroundColor: theme.colors.primary }),
14
- * icon: { color: 'red' },
29
+ * basicObject: { color: "red" },
30
+ * withTheme: (theme) => ({ backgroundColor: theme.palette.primary.main }),
31
+ *
32
+ * getWithArbitraryPropsAndTheme: (disabled?: boolean) => (theme) => ({
33
+ * color: theme.palette[disabled ? 'primary' : 'gray'].main,
34
+ * }),
15
35
  * });
16
36
  * ```
17
37
  */
18
- export declare const createStyles: <T extends string>(styles: Record<T, Interpolation<Theme>>) => Record<T, Interpolation<Theme>>;
38
+ export declare const createStyles: <T extends StylesConstraint>(styles: T) => T;
39
+ export {};
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vite").UserConfigExport;
2
+ export default _default;