@shipengine/elements 1.9.0 → 2.0.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/README.md +0 -4
- package/assertions-dfa95b4d.js +1 -0
- package/carrier-c2a5ed53.js +1 -0
- package/{carrier-logo-1b6c767e.js → carrier-logo-330e926f.js} +1 -1
- package/components.js +1 -1
- package/elements.js +1 -1
- package/hooks.js +1 -1
- package/index.js +1 -1
- package/money-d4f3d7c3.js +1 -0
- package/package.json +7 -3
- package/schemas.js +1 -1
- package/{shipment-90d35708.js → shipment-150160e0.js} +1 -1
- package/src/components/add-funds-form/add-funds-form.d.ts +1 -1
- package/src/components/auto-funding-form/auto-funding-form.d.ts +1 -1
- package/src/components/carrier-balance/carrier-balance.d.ts +1 -1
- package/src/components/collapsible-panel/collapsible-panel.d.ts +1 -1
- package/src/components/display-term/display-term.d.ts +1 -1
- package/src/components/edit-billing-form/edit-billing-form.d.ts +1 -1
- package/src/components/field/money-input/money-input.d.ts +1 -1
- package/src/components/field/rate-card/cost-breakdown/cost-breakdown.d.ts +1 -1
- package/src/components/field/rate-card/rate-card.d.ts +1 -1
- package/src/components/field/rate-select/rate-select.d.ts +1 -1
- package/src/components/fund-and-purchase/fund-and-purchase.d.ts +1 -1
- package/src/components/history/history-card/history-card.d.ts +1 -1
- package/src/components/items-breakdown/items-breakdown.d.ts +1 -1
- package/src/components/pager/pager.d.ts +1 -1
- package/src/components/rate-details/rate-details.d.ts +1 -1
- package/src/components/save-status/save-status.d.ts +1 -1
- package/src/components/service-points/service-points.d.ts +1 -1
- package/src/components/templates/address-display/address-display.d.ts +1 -1
- package/src/components/templates/address-preference-display/address-preference-display.d.ts +1 -1
- package/src/components/templates/address-preference-select/address-preference-select.d.ts +1 -1
- package/src/components/templates/connect-external-carrier-form/connect-external-carrier-form.d.ts +12 -0
- package/src/components/templates/connect-external-carrier-form/index.d.ts +1 -0
- package/src/components/templates/index.d.ts +1 -1
- package/src/components/templates/label/label.d.ts +1 -1
- package/src/components/templates/product-form/product-form.d.ts +1 -1
- package/src/components/templates/products-display/products-display.d.ts +1 -1
- package/src/components/templates/rate-form/rate-form.d.ts +3 -4
- package/src/components/templates/shipment/shipment.d.ts +3 -11
- package/src/components/templates/shipment-form/shipment-form.d.ts +2 -9
- package/src/components/templates/shipment-form/shipment-schema.d.ts +1 -1
- package/src/components/templates/suspend-sales-order/suspend-sales-order.d.ts +1 -1
- package/src/components/templates/suspend-shipment/suspend-shipment.d.ts +1 -1
- package/src/components/templates/wallet-form/edit-wallet-address-form.d.ts +1 -1
- package/src/components/templates/wallet-form/wallet-form.d.ts +2 -4
- package/src/components/templates/wallet-form/wallet-schema.d.ts +1 -1
- package/src/components/wallet-card/wallet-card.d.ts +1 -1
- package/src/components/warehouse-form/warehouse-form.d.ts +1 -1
- package/src/create-element/create-element.d.ts +10 -0
- package/src/create-element/element/element.d.ts +16 -0
- package/src/create-element/element/hooks/index.d.ts +1 -0
- package/src/create-element/element/hooks/use-i18n.d.ts +12 -0
- package/src/create-element/element/index.d.ts +3 -0
- package/src/create-element/element/utils/get-emotion-cache.d.ts +2 -0
- package/src/create-element/element/utils/index.d.ts +1 -0
- package/src/create-element/error-boundary/error-boundary.d.ts +21 -0
- package/src/create-element/error-boundary/index.d.ts +1 -0
- package/src/create-element/index.d.ts +1 -0
- package/src/elements/index.d.ts +5 -4
- package/src/elements/label-layout/label-layout-element.d.ts +1 -1
- package/src/elements/labels-grid/labels-grid.d.ts +2 -2
- package/src/elements/manage-carriers/index.d.ts +1 -0
- package/src/elements/{shipengine-carriers/shipengine-carriers.d.ts → manage-carriers/manage-carriers.d.ts} +52 -46
- package/src/elements/manage-external-carriers/index.d.ts +1 -0
- package/src/elements/manage-external-carriers/manage-external-carriers.d.ts +888 -0
- package/src/elements/manage-funding/manage-funding-element.d.ts +1 -1
- package/src/elements/manage-warehouses/manage-warehouses.d.ts +19 -2
- package/src/elements/payment-method-settings/payment-method-settings-element.d.ts +1 -1
- package/src/elements/purchase-label/configure-shipment.d.ts +4 -27
- package/src/elements/purchase-label/hooks/use-address.d.ts +1 -1
- package/src/elements/purchase-label/hooks/use-configure-shipment.d.ts +1 -1
- package/src/elements/purchase-label/hooks/use-customs.d.ts +1 -1
- package/src/elements/purchase-label/hooks/use-import-sales-order.d.ts +2 -2
- package/src/elements/purchase-label/hooks/use-load-shipment.d.ts +3 -3
- package/src/elements/purchase-label/hooks/use-pending-shipment.d.ts +1 -1
- package/src/elements/purchase-label/hooks/use-presets.d.ts +1 -1
- package/src/elements/purchase-label/hooks/use-rates-form.d.ts +1 -1
- package/src/elements/purchase-label/hooks/use-rates-with-cache.d.ts +1 -1
- package/src/elements/purchase-label/hooks/use-request-preferred-rates.d.ts +1 -1
- package/src/elements/purchase-label/hooks/use-request-rates.d.ts +1 -1
- package/src/elements/purchase-label/hooks/use-shipment-form.d.ts +1 -1
- package/src/elements/purchase-label/purchase-label-by-sales-order.d.ts +1 -1
- package/src/elements/purchase-label/purchase-label-by-shipment.d.ts +1 -1
- package/src/elements/purchase-label/purchase-label.d.ts +18 -41
- package/src/elements/shipment-summary/index.d.ts +1 -0
- package/src/elements/{view-shipment/view-shipment.d.ts → shipment-summary/shipment-summary.d.ts} +42 -59
- package/src/elements/shipments-grid/shipments-grid.d.ts +2 -2
- package/src/elements/theme-creator/theme-creator.d.ts +1 -1
- package/src/elements/transaction-history/index.d.ts +1 -0
- package/src/elements/{wallet-history/wallet-history-element.d.ts → transaction-history/transaction-history-element.d.ts} +1 -1
- package/src/elements/unit-settings/unit-settings-element.d.ts +1 -1
- package/src/elements/vat-settings/vat-settings-element.d.ts +1 -1
- package/src/elements/void-label/components/actions/actions.d.ts +1 -1
- package/src/elements/void-label/components/message/message.d.ts +1 -1
- package/src/elements/void-label/void-label.d.ts +33 -49
- package/src/elements-provider/elements-provider.d.ts +46 -0
- package/src/elements-provider/elements-test-provider.d.ts +3 -0
- package/src/elements-provider/hooks/index.d.ts +1 -0
- package/src/elements-provider/hooks/use-load-icons.d.ts +7 -0
- package/src/elements-provider/index.d.ts +1 -0
- package/src/factories/shipengine/address.d.ts +1 -1
- package/src/factories/shipengine/carrier.d.ts +1 -1
- package/src/factories/shipengine/index.d.ts +1 -1
- package/src/factories/shipengine/label.d.ts +1 -1
- package/src/factories/shipengine/money.d.ts +1 -1
- package/src/factories/shipengine/order-source.d.ts +1 -1
- package/src/factories/shipengine/package.d.ts +1 -1
- package/src/factories/shipengine/resource.d.ts +1 -1
- package/src/factories/shipengine/sales-order.d.ts +1 -1
- package/src/factories/shipengine/service-point.d.ts +1 -1
- package/src/factories/shipengine/service.d.ts +1 -1
- package/src/factories/shipengine/shipment.d.ts +1 -1
- package/src/factories/shipengine/{wallet-history.d.ts → transaction-history.d.ts} +1 -1
- package/src/factories/shipengine/warehouse.d.ts +1 -1
- package/src/factories/shipengine/weight.d.ts +1 -1
- package/src/features/index.d.ts +3 -3
- package/src/features/label-layout/label-layout.d.ts +1 -1
- package/src/features/label-layout/use-label-layout.d.ts +1 -1
- package/src/features/{shipengine-carriers → manage-carriers}/hooks/use-list-funding-source-carriers.d.ts +2 -2
- package/src/features/manage-carriers/index.d.ts +1 -0
- package/src/features/manage-carriers/manage-carriers-row/index.d.ts +1 -0
- package/src/features/{shipengine-carriers/shipengine-carriers-row/shipengine-carriers-row.d.ts → manage-carriers/manage-carriers-row/manage-carriers-row.d.ts} +3 -3
- package/src/features/manage-carriers/manage-carriers.d.ts +4 -0
- package/src/features/manage-external-carriers/index.d.ts +1 -0
- package/src/features/manage-external-carriers/manage-external-carriers.d.ts +4 -0
- package/src/features/manage-warehouses/manage-warehouses.d.ts +1 -1
- package/src/features/manage-warehouses/use-manage-warehouses.d.ts +9 -9
- package/src/features/manage-warehouses/warehouse-display/warehouse-display.d.ts +1 -1
- package/src/features/transaction-history/index.d.ts +1 -0
- package/src/features/transaction-history/transaction-history.d.ts +6 -0
- package/src/features/unit-settings/unit-settings.d.ts +1 -1
- package/src/features/unit-settings/use-unit-settings.d.ts +1 -1
- package/src/features/vat-settings/use-vat-settings.d.ts +5 -5
- package/src/hooks/here-map/init.d.ts +1 -1
- package/src/hooks/options/use-confirmation-options.d.ts +1 -1
- package/src/hooks/options/use-customs-contents-options.d.ts +1 -1
- package/src/hooks/options/use-customs-non-delivery-options.d.ts +1 -1
- package/src/hooks/options/use-insurance-provider-options.d.ts +1 -1
- package/src/hooks/options/use-package-options.d.ts +1 -1
- package/src/hooks/options/use-rate-options.d.ts +1 -1
- package/src/hooks/options/use-service-code-options.d.ts +1 -1
- package/src/hooks/options/use-service-points.d.ts +1 -1
- package/src/hooks/options/use-shipment-metadata.d.ts +1 -1
- package/src/hooks/options/use-shipping-presets-options.d.ts +1 -1
- package/src/hooks/options/use-warehouse-options.d.ts +1 -1
- package/src/hooks/use-address-validation.d.ts +1 -1
- package/src/hooks/use-get-or-create-shipment.d.ts +3 -3
- package/src/hooks/use-scrub-errors.d.ts +1 -1
- package/src/index.d.ts +1 -0
- package/src/locales/en/index.d.ts +1 -1
- package/src/mocks/carriers/handlers.d.ts +1 -1
- package/src/mocks/warehouses/handlers.d.ts +1 -1
- package/src/schemas/shipengine/money.d.ts +1 -1
- package/src/testing/test-utils.d.ts +7 -1
- package/src/themes/fallback.d.ts +3 -0
- package/src/themes/index.d.ts +4 -0
- package/src/types/carrier-metadata.d.ts +1 -1
- package/src/types/preferred-rates.d.ts +1 -1
- package/src/types/shipping-preset/shipping-preset.d.ts +1 -1
- package/src/utilities/error.d.ts +1 -1
- package/src/utilities/feature-flags/feature-flags.d.ts +18 -0
- package/src/utilities/feature-flags/index.d.ts +2 -0
- package/src/utilities/feature-flags/types.d.ts +141 -0
- package/src/utilities/money.d.ts +1 -1
- package/src/utilities/rates.d.ts +1 -1
- package/src/utilities/shipengine/address.d.ts +1 -1
- package/src/utilities/shipengine/carrier.d.ts +1 -1
- package/src/utilities/shipengine/dimensions.d.ts +1 -1
- package/src/utilities/shipengine/sales-order.d.ts +1 -1
- package/src/utilities/shipengine/shipment.d.ts +1 -1
- package/src/utilities/shipengine/warehouses.d.ts +1 -1
- package/src/utilities/shipengine/weight.d.ts +1 -1
- package/src/workflows/account-settings/account-settings.d.ts +7 -14
- package/src/workflows/{connect-carrier/connect-carrier.d.ts → carrier-services/carrier-services.d.ts} +35 -49
- package/src/workflows/carrier-services/index.d.ts +1 -0
- package/src/workflows/{manage-wallet-workflow/manage-wallet-workflow.d.ts → connect-external-carrier/connect-external-carrier.d.ts} +16 -21
- package/src/workflows/connect-external-carrier/index.d.ts +1 -0
- package/src/workflows/index.d.ts +3 -2
- package/src/workflows/label-workflow/index.d.ts +1 -0
- package/src/workflows/{purchase-label-workflow/purchase-label-workflow.d.ts → label-workflow/label-workflow.d.ts} +16 -34
- package/src/workflows/onboarding/components/carrier-recovery-form/carrier-recovery-form.d.ts +1 -1
- package/src/workflows/onboarding/components/funding-and-carrier-connection-step/funding-and-carrier-connection-step.d.ts +2 -4
- package/src/workflows/onboarding/components/funding-and-carrier-connection-step/use-funding-and-carrier-connection-step.d.ts +1 -1
- package/src/workflows/onboarding/components/onboarding-wizard/onboarding-wizard.d.ts +2 -9
- package/src/workflows/onboarding/components/ship-from-address-step/ship-from-address-step.d.ts +1 -1
- package/src/workflows/onboarding/components/ship-from-address-step/use-ship-from-address-step.d.ts +1 -1
- package/src/workflows/onboarding/components/terms-agreement-form/terms-agreement-form.d.ts +1 -1
- package/src/workflows/onboarding/components/terms-agreement-step/terms-agreement-step.d.ts +1 -1
- package/src/workflows/onboarding/components/terms-agreement-step/use-terms-agreement-step.d.ts +1 -1
- package/src/workflows/onboarding/onboarding.d.ts +22 -70
- package/story-notes-c714d2ed.js +1 -0
- package/{suspend-text-c8c7b6b6.js → suspend-text-cad3a977.js} +1 -1
- package/transaction-history-element-cbfe487c.js +1 -0
- package/{use-page-layout-93ffae78.js → use-page-layout-8cb5075f.js} +1 -1
- package/use-scrub-errors-9870a6f3.js +1 -0
- package/use-toggle-866d7938.js +1 -0
- package/use-unit-settings-a5bae16e.js +1 -0
- package/utilities.js +1 -1
- package/validation-528e7834.js +1 -0
- package/wallet-form-9e4bfaea.js +1 -0
- package/warehouse-form-da6a7ac5.js +34 -0
- package/{warehouses-dfcdce23.js → warehouses-a83188ab.js} +1 -1
- package/workflows.js +1 -1
- package/carrier-2abb4760.js +0 -1
- package/feature-flags-3e03717c.js +0 -1
- package/money-fbc4d0b3.js +0 -1
- package/payment-method-settings-element-595cc38d.js +0 -1
- package/src/components/templates/connect-carrier-form/connect-carrier-form.d.ts +0 -12
- package/src/components/templates/connect-carrier-form/index.d.ts +0 -1
- package/src/elements/external-carriers/external-carriers.d.ts +0 -941
- package/src/elements/external-carriers/index.d.ts +0 -1
- package/src/elements/shipengine-carriers/index.d.ts +0 -1
- package/src/elements/view-shipment/index.d.ts +0 -1
- package/src/elements/wallet-history/index.d.ts +0 -1
- package/src/features/external-carriers/external-carriers.d.ts +0 -11
- package/src/features/external-carriers/index.d.ts +0 -1
- package/src/features/shipengine-carriers/index.d.ts +0 -1
- package/src/features/shipengine-carriers/shipengine-carriers-row/index.d.ts +0 -1
- package/src/features/shipengine-carriers/shipengine-carriers.d.ts +0 -10
- package/src/features/wallet-history/index.d.ts +0 -1
- package/src/features/wallet-history/wallet-history.d.ts +0 -6
- package/src/hooks/use-elements.d.ts +0 -35
- package/src/utilities/feature-flags.d.ts +0 -232
- package/src/workflows/connect-carrier/index.d.ts +0 -1
- package/src/workflows/manage-wallet-workflow/index.d.ts +0 -1
- package/src/workflows/purchase-label-workflow/index.d.ts +0 -1
- package/story-notes-ce2d8cca.js +0 -1
- package/use-scrub-errors-2c4db406.js +0 -1
- package/use-toggle-838d2ebd.js +0 -1
- package/validation-b941a548.js +0 -1
- package/wallet-form-3981400b.js +0 -1
- package/wallet-history-5b34c856.js +0 -1
- package/warehouse-form-c0b3ea78.js +0 -34
- /package/src/components/templates/{connect-carrier-form/connect-carrier-form.styles.d.ts → connect-external-carrier-form/connect-external-carrier-form.styles.d.ts} +0 -0
- /package/src/features/{shipengine-carriers → manage-carriers}/hooks/index.d.ts +0 -0
- /package/src/features/{shipengine-carriers → manage-carriers}/hooks/use-carrier-metadata.d.ts +0 -0
- /package/src/features/{shipengine-carriers/shipengine-carriers-row/shipengine-carriers-row.styles.d.ts → manage-carriers/manage-carriers-row/manage-carriers-row.styles.d.ts} +0 -0
- /package/src/features/{shipengine-carriers/shipengine-carriers.styles.d.ts → manage-carriers/manage-carriers.styles.d.ts} +0 -0
- /package/src/features/{wallet-history/wallet-history.styles.d.ts → transaction-history/transaction-history.styles.d.ts} +0 -0
- /package/src/workflows/{manage-wallet-workflow → carrier-services}/use-get-wallet-panel-props.d.ts +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { SE } from "@shipengine/
|
|
2
|
+
import { SE } from "@shipengine/react-api";
|
|
3
3
|
/**
|
|
4
4
|
* # Void Label Component Props
|
|
5
5
|
*
|
|
@@ -8,14 +8,6 @@ import { SE } from "@shipengine/alchemy";
|
|
|
8
8
|
* @see {@link VoidLabel.Component | This prop types usage in the `<VoidLabel />` component}
|
|
9
9
|
*/
|
|
10
10
|
export type ComponentProps = {
|
|
11
|
-
/**
|
|
12
|
-
* `features` is a set of feature flags you would like to enable or disable in this component.
|
|
13
|
-
*/
|
|
14
|
-
features?: {
|
|
15
|
-
presentation?: {
|
|
16
|
-
poweredByShipEngine?: boolean;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
11
|
/**
|
|
20
12
|
* `labelId` is the unique identifier for the label you wish to void.
|
|
21
13
|
*/
|
|
@@ -33,7 +25,7 @@ export type ComponentProps = {
|
|
|
33
25
|
/**
|
|
34
26
|
* `onViewShipment` is a callback function that will be invoked when the user clicks the
|
|
35
27
|
* `View Shipment` button. This will take you back to the
|
|
36
|
-
* {@link
|
|
28
|
+
* {@link ShipmentSummary.Element | `Shipment Summary Element`} for the given shipment, where you
|
|
37
29
|
* will be able to see the voided label listed.
|
|
38
30
|
*/
|
|
39
31
|
onViewShipment: (shipment: SE.SalesOrderShipment) => void;
|
|
@@ -42,7 +34,7 @@ export type ComponentProps = {
|
|
|
42
34
|
* # Void Label Component
|
|
43
35
|
*
|
|
44
36
|
* - The `<VoidLabel />` component is used to void a given shipping label. When a label is voided,
|
|
45
|
-
* you then get the option to view the associated shipment via the `
|
|
37
|
+
* you then get the option to view the associated shipment via the `Shipment Summary` Element, or
|
|
46
38
|
* you can purchase another label for the shipment via the `Purchase Label` Element.
|
|
47
39
|
*
|
|
48
40
|
* @param ComponentProps The base props that will be passed into the `<VoidLabel />` component.
|
|
@@ -53,7 +45,7 @@ export type ComponentProps = {
|
|
|
53
45
|
* @example
|
|
54
46
|
* You can see how the `<Component />` is used in the `createElement` function call below.
|
|
55
47
|
* ```tsx
|
|
56
|
-
* export const Element =
|
|
48
|
+
* export const Element = createElement(Component, ErrorFallback, {
|
|
57
49
|
* css: { height: "100%", maxWidth: "800px", minWidth: "440px", width: "100%" },
|
|
58
50
|
* resources: { en },
|
|
59
51
|
* });
|
|
@@ -63,7 +55,7 @@ export type ComponentProps = {
|
|
|
63
55
|
*
|
|
64
56
|
* @see {@link VoidLabel.Element | The **Element** created to render `<VoidLabel />`}
|
|
65
57
|
*/
|
|
66
|
-
export declare const Component: ({
|
|
58
|
+
export declare const Component: ({ labelId, onComplete, onSuccess, onViewShipment }: ComponentProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
67
59
|
/**
|
|
68
60
|
* # Registered Void Label Element
|
|
69
61
|
*
|
|
@@ -134,10 +126,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
134
126
|
dpdwallet: string;
|
|
135
127
|
};
|
|
136
128
|
refund_process: string;
|
|
137
|
-
refund_rules: string;
|
|
138
|
-
* `onComplete` is a callback function that will be invoked when the request to void a given
|
|
139
|
-
* shipping label is completed.
|
|
140
|
-
*/
|
|
129
|
+
refund_rules: string;
|
|
141
130
|
resultTitles: {
|
|
142
131
|
approved: string;
|
|
143
132
|
rejected: string;
|
|
@@ -169,10 +158,12 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
169
158
|
weight: string;
|
|
170
159
|
insuredValue: string;
|
|
171
160
|
deliveryConfirmation: string;
|
|
172
|
-
};
|
|
173
|
-
* `labelId` is the unique identifier for the label you wish to void.
|
|
174
|
-
*/
|
|
161
|
+
};
|
|
175
162
|
highVolumeForms: string;
|
|
163
|
+
/**
|
|
164
|
+
* `onSuccess` is a callback function that will be invoked when the request to void a given
|
|
165
|
+
* shipping label is successful.
|
|
166
|
+
*/
|
|
176
167
|
multipleShippingServices: string;
|
|
177
168
|
sections: {
|
|
178
169
|
labels: string;
|
|
@@ -184,13 +175,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
184
175
|
addNew: string;
|
|
185
176
|
vatNumber: string;
|
|
186
177
|
vatRegistrationTooltip: string;
|
|
187
|
-
vatFormText: string;
|
|
188
|
-
* # Void Label Component Props
|
|
189
|
-
*
|
|
190
|
-
* - These are the base props that will be passed into the `<VoidLabel />` component.
|
|
191
|
-
*
|
|
192
|
-
* @see {@link VoidLabel.Component | This prop types usage in the `<VoidLabel />` component}
|
|
193
|
-
*/
|
|
178
|
+
vatFormText: string;
|
|
194
179
|
vatFormRegisterLater: string;
|
|
195
180
|
vatNumberInputHint: string;
|
|
196
181
|
vatNumberInputPlaceholder: string;
|
|
@@ -204,7 +189,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
204
189
|
genericText: string;
|
|
205
190
|
};
|
|
206
191
|
};
|
|
207
|
-
"
|
|
192
|
+
"manage-carriers": {
|
|
208
193
|
title: string;
|
|
209
194
|
headers: {
|
|
210
195
|
accountCarriers: string;
|
|
@@ -226,13 +211,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
226
211
|
hiddenTermsSubtitle: string;
|
|
227
212
|
descriptionTitle: string;
|
|
228
213
|
description: string;
|
|
229
|
-
};
|
|
230
|
-
* # Void Label Component Props
|
|
231
|
-
*
|
|
232
|
-
* - These are the base props that will be passed into the `<VoidLabel />` component.
|
|
233
|
-
*
|
|
234
|
-
* @see {@link VoidLabel.Component | This prop types usage in the `<VoidLabel />` component}
|
|
235
|
-
*/
|
|
214
|
+
};
|
|
236
215
|
billing: {
|
|
237
216
|
title: string;
|
|
238
217
|
cardSubTitle: string;
|
|
@@ -246,15 +225,9 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
246
225
|
title: string;
|
|
247
226
|
subtitle: string;
|
|
248
227
|
};
|
|
249
|
-
/**
|
|
250
|
-
* `labelId` is the unique identifier for the label you wish to void.
|
|
251
|
-
*/
|
|
252
228
|
notifications: {
|
|
253
229
|
error: {
|
|
254
|
-
title: string;
|
|
255
|
-
* `onComplete` is a callback function that will be invoked when the request to void a given
|
|
256
|
-
* shipping label is completed.
|
|
257
|
-
*/
|
|
230
|
+
title: string;
|
|
258
231
|
};
|
|
259
232
|
info: {
|
|
260
233
|
title: string;
|
|
@@ -323,10 +296,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
323
296
|
brokerage_fee: string;
|
|
324
297
|
admin_fee: string;
|
|
325
298
|
adjustment: string;
|
|
326
|
-
auctane_service_fee: string;
|
|
327
|
-
* `onComplete` is a callback function that will be invoked when the request to void a given
|
|
328
|
-
* shipping label is completed.
|
|
329
|
-
*/
|
|
299
|
+
auctane_service_fee: string;
|
|
330
300
|
product_price: string;
|
|
331
301
|
};
|
|
332
302
|
};
|
|
@@ -546,7 +516,9 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
546
516
|
isLoading: string;
|
|
547
517
|
lowBalancePurchaseThreshold: string;
|
|
548
518
|
maximumPurchasesPerDay: string;
|
|
549
|
-
purchaseAmount: string;
|
|
519
|
+
purchaseAmount: string; /**
|
|
520
|
+
* `labelId` is the unique identifier for the label you wish to void.
|
|
521
|
+
*/
|
|
550
522
|
readSettings: string;
|
|
551
523
|
};
|
|
552
524
|
addFunds: {
|
|
@@ -662,7 +634,9 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
662
634
|
};
|
|
663
635
|
search: string;
|
|
664
636
|
settingsModal: {
|
|
665
|
-
closeDialog: string;
|
|
637
|
+
closeDialog: string; /**
|
|
638
|
+
* `labelId` is the unique identifier for the label you wish to void.
|
|
639
|
+
*/
|
|
666
640
|
header: string;
|
|
667
641
|
};
|
|
668
642
|
status: {
|
|
@@ -713,7 +687,10 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
713
687
|
};
|
|
714
688
|
parserFields: {
|
|
715
689
|
fullAddress: string;
|
|
716
|
-
};
|
|
690
|
+
}; /**
|
|
691
|
+
* `onSuccess` is a callback function that will be invoked when the request to void a given
|
|
692
|
+
* shipping label is successful.
|
|
693
|
+
*/
|
|
717
694
|
paste: string;
|
|
718
695
|
preference: {
|
|
719
696
|
confirm: string;
|
|
@@ -973,6 +950,13 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
973
950
|
adjustmentHistory: string;
|
|
974
951
|
warehouses: string;
|
|
975
952
|
carriers: string;
|
|
953
|
+
/**
|
|
954
|
+
* # Void Label Component Props
|
|
955
|
+
*
|
|
956
|
+
* - These are the base props that will be passed into the `<VoidLabel />` component.
|
|
957
|
+
*
|
|
958
|
+
* @see {@link VoidLabel.Component | This prop types usage in the `<VoidLabel />` component}
|
|
959
|
+
*/
|
|
976
960
|
externalCarriers: string;
|
|
977
961
|
labelLayout: string;
|
|
978
962
|
unitSettings: string;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DefaultOptions } from "@tanstack/react-query";
|
|
3
|
+
import { CustomThemeData, Theme } from "@shipengine/giger-theme";
|
|
4
|
+
import { ShipEngineAPIConfig, ShipEngineProps } from "@shipengine/react-api";
|
|
5
|
+
import { ElementsFeatureFlags, GlobalFeatures } from "../utilities";
|
|
6
|
+
export type ElementsErrorHandler = (err: Error) => void;
|
|
7
|
+
export interface ElementsContextValue {
|
|
8
|
+
baseURL: string;
|
|
9
|
+
cdnURL: string;
|
|
10
|
+
container?: HTMLElement;
|
|
11
|
+
getFeatures: (key: keyof ElementsFeatureFlags) => ElementsFeatureFlags[keyof ElementsFeatureFlags];
|
|
12
|
+
getToken: ShipEngineProps["getToken"];
|
|
13
|
+
globalFeatures: GlobalFeatures;
|
|
14
|
+
locale?: string;
|
|
15
|
+
onError: ElementsErrorHandler;
|
|
16
|
+
scope: string | null;
|
|
17
|
+
theme: Theme;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* @category Contexts
|
|
21
|
+
*/
|
|
22
|
+
export declare const ElementsContext: import("react").Context<ElementsContextValue | undefined>;
|
|
23
|
+
export type ElementsProviderProps = {
|
|
24
|
+
cdnURL?: string;
|
|
25
|
+
children: React.ReactNode;
|
|
26
|
+
container?: HTMLElement;
|
|
27
|
+
defaultQueryClientOptions?: DefaultOptions;
|
|
28
|
+
features?: ElementsFeatureFlags;
|
|
29
|
+
locale?: string;
|
|
30
|
+
onError?: ElementsErrorHandler;
|
|
31
|
+
/** Scope of the Elements Provider. Can be null to not specify a specific element */
|
|
32
|
+
scope?: string | null;
|
|
33
|
+
themeConfig?: CustomThemeData;
|
|
34
|
+
} & ShipEngineAPIConfig;
|
|
35
|
+
/**
|
|
36
|
+
* @category Providers
|
|
37
|
+
*/
|
|
38
|
+
export declare const ElementsProvider: ({ baseURL, cdnURL, children, container, features, getToken, headers, locale: localeProp, onApiError, onError, scope, themeConfig, defaultQueryClientOptions, }: ElementsProviderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
39
|
+
/**
|
|
40
|
+
* Must be used within {@link ElementsProvider}
|
|
41
|
+
*
|
|
42
|
+
* @category Elements Hooks
|
|
43
|
+
*
|
|
44
|
+
* @see {@link registerElement}
|
|
45
|
+
*/
|
|
46
|
+
export declare const useElements: () => ElementsContextValue;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ElementsProviderProps } from "./elements-provider";
|
|
2
|
+
export type ElementsTestProviderProps = Pick<Required<ElementsProviderProps>, "baseURL" | "children" | "features">;
|
|
3
|
+
export declare const ElementsTestProvider: ({ baseURL, children, features, }: ElementsTestProviderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./use-load-icons";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./elements-provider";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Factory } from "fishery";
|
|
2
|
-
import { SE } from "@shipengine/
|
|
2
|
+
import { SE } from "@shipengine/react-api";
|
|
3
3
|
import { AddressValidationPreference } from "../../components/templates/address-preference-select";
|
|
4
4
|
export type AddressTransientParams = {
|
|
5
5
|
isInternational?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Factory } from "fishery";
|
|
2
|
-
import { SE } from "@shipengine/
|
|
2
|
+
import { SE } from "@shipengine/react-api";
|
|
3
3
|
import { MoneyTransientParams } from "./money";
|
|
4
4
|
export declare const randomPaymentStatus: () => SE.PaymentStatus;
|
|
5
5
|
export declare const randomFulfillmentStatus: () => SE.FulfillmentStatus;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Factory } from "fishery";
|
|
2
|
-
import { SE } from "@shipengine/
|
|
2
|
+
import { SE } from "@shipengine/react-api";
|
|
3
3
|
import { MoneyTransientParams } from "./money";
|
|
4
4
|
export declare const randomDeliveryConfirmation: () => SE.ConfirmationType;
|
|
5
5
|
export declare const randomInsuranceProvider: (allowNone?: boolean) => SE.InsuranceProviderType;
|
package/src/features/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export * from "./external-carriers";
|
|
2
1
|
export * from "./label-layout";
|
|
2
|
+
export * from "./manage-carriers";
|
|
3
|
+
export * from "./manage-external-carriers";
|
|
3
4
|
export * from "./manage-funding";
|
|
4
5
|
export * from "./manage-warehouses";
|
|
5
6
|
export * from "./payment-method-settings";
|
|
6
|
-
export * from "./
|
|
7
|
+
export * from "./transaction-history";
|
|
7
8
|
export * from "./unit-settings";
|
|
8
9
|
export * from "./vat-settings";
|
|
9
|
-
export * from "./wallet-history";
|
|
@@ -5,7 +5,7 @@ export type ConnectedCarrierMetadata = {
|
|
|
5
5
|
};
|
|
6
6
|
export declare const useListFundingSourceCarriers: () => {
|
|
7
7
|
data: ConnectedCarrierMetadata[];
|
|
8
|
-
error: import("@shipengine/
|
|
8
|
+
error: import("@shipengine/react-api").CodedError[] | null;
|
|
9
9
|
isLoading: boolean;
|
|
10
|
-
refetch: <TPageData>(options?: (import("@tanstack/query-core").RefetchOptions & import("@tanstack/query-core").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@shipengine/
|
|
10
|
+
refetch: <TPageData>(options?: (import("@tanstack/query-core").RefetchOptions & import("@tanstack/query-core").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@shipengine/react-api").Carrier[], import("@shipengine/react-api").CodedError[]>>;
|
|
11
11
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./manage-carriers";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./manage-carriers-row";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { SE } from "@shipengine/
|
|
1
|
+
import { SE } from "@shipengine/react-api";
|
|
2
2
|
import { RegisterFundingSourceCarrierPayload } from "../../../components/templates";
|
|
3
3
|
import { ConnectedCarrierMetadata } from "../hooks/use-list-funding-source-carriers";
|
|
4
|
-
export type
|
|
4
|
+
export type ManageCarriersRowProps = {
|
|
5
5
|
address?: SE.Address;
|
|
6
6
|
carrierToConnect?: string;
|
|
7
7
|
fundingSourceCarrier: ConnectedCarrierMetadata;
|
|
8
8
|
registerCarrier: (payload?: RegisterFundingSourceCarrierPayload) => Promise<void>;
|
|
9
9
|
setCarrierToConnect: (carrierCode: string) => void;
|
|
10
10
|
};
|
|
11
|
-
export declare const
|
|
11
|
+
export declare const ManageCarriersRow: ({ fundingSourceCarrier: { carrier, isConnected }, registerCarrier, address, carrierToConnect, setCarrierToConnect, }: ManageCarriersRowProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./manage-external-carriers";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
export declare const useManageWarehouses: () => {
|
|
2
|
-
createWarehouse: import("@tanstack/react-query").UseMutateAsyncFunction<import("@shipengine/
|
|
3
|
-
createWarehouseErrors: import("@shipengine/
|
|
4
|
-
deleteWarehouse: import("@tanstack/react-query").UseMutateAsyncFunction<void, import("@shipengine/
|
|
5
|
-
deleteWarehouseErrors: import("@shipengine/
|
|
2
|
+
createWarehouse: import("@tanstack/react-query").UseMutateAsyncFunction<import("@shipengine/react-api").Warehouse, import("@shipengine/react-api").CodedError[], Partial<import("@shipengine/react-api").Warehouse>, unknown>;
|
|
3
|
+
createWarehouseErrors: import("@shipengine/react-api").CodedError[] | null;
|
|
4
|
+
deleteWarehouse: import("@tanstack/react-query").UseMutateAsyncFunction<void, import("@shipengine/react-api").CodedError[], import("@shipengine/react-api").DeleteWarehouseData, unknown>;
|
|
5
|
+
deleteWarehouseErrors: import("@shipengine/react-api").CodedError[] | null;
|
|
6
6
|
isCreatingWarehouse: boolean;
|
|
7
7
|
isDeletingWarehouse: boolean;
|
|
8
8
|
isLoadingWarehouses: boolean;
|
|
9
9
|
isUpdatingWarehouse: boolean;
|
|
10
|
-
listWarehouseErrors: import("@shipengine/
|
|
11
|
-
refreshListWarehouses: <TPageData>(options?: (import("@tanstack/query-core").RefetchOptions & import("@tanstack/query-core").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@shipengine/
|
|
12
|
-
updateWarehouse: import("@tanstack/react-query").UseMutateAsyncFunction<void, import("@shipengine/
|
|
13
|
-
updateWarehouseErrors: import("@shipengine/
|
|
14
|
-
warehouses: import("@shipengine/
|
|
10
|
+
listWarehouseErrors: import("@shipengine/react-api").CodedError[] | null;
|
|
11
|
+
refreshListWarehouses: <TPageData>(options?: (import("@tanstack/query-core").RefetchOptions & import("@tanstack/query-core").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@shipengine/react-api").Warehouse[], import("@shipengine/react-api").CodedError[]>>;
|
|
12
|
+
updateWarehouse: import("@tanstack/react-query").UseMutateAsyncFunction<void, import("@shipengine/react-api").CodedError[], import("@shipengine/react-api").UpdateWarehouseData, unknown>;
|
|
13
|
+
updateWarehouseErrors: import("@shipengine/react-api").CodedError[] | null;
|
|
14
|
+
warehouses: import("@shipengine/react-api").Warehouse[] | undefined;
|
|
15
15
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./transaction-history";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare const useVatSettings: () => {
|
|
2
|
-
getVatSettingsErrors: import("@shipengine/
|
|
2
|
+
getVatSettingsErrors: import("@shipengine/react-api").CodedError[] | null;
|
|
3
3
|
isLoading: boolean;
|
|
4
|
-
refreshVatSettings: <TPageData>(options?: (import("@tanstack/query-core").RefetchOptions & import("@tanstack/query-core").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@shipengine/
|
|
5
|
-
updateVatSettings: import("@tanstack/react-query").UseMutateAsyncFunction<import("@shipengine/
|
|
6
|
-
updateVatSettingsErrors: import("@shipengine/
|
|
7
|
-
vatSettings: import("@shipengine/
|
|
4
|
+
refreshVatSettings: <TPageData>(options?: (import("@tanstack/query-core").RefetchOptions & import("@tanstack/query-core").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@shipengine/react-api").AccountSettings, import("@shipengine/react-api").CodedError[]>>;
|
|
5
|
+
updateVatSettings: import("@tanstack/react-query").UseMutateAsyncFunction<import("@shipengine/react-api").AccountSettings, import("@shipengine/react-api").CodedError[], Partial<import("@shipengine/react-api").AccountSettings>, unknown>;
|
|
6
|
+
updateVatSettingsErrors: import("@shipengine/react-api").CodedError[] | null;
|
|
7
|
+
vatSettings: import("@shipengine/react-api").AccountSettings | undefined;
|
|
8
8
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="heremaps" />
|
|
2
|
-
import { HereTokenResponse } from "@shipengine/
|
|
2
|
+
import { HereTokenResponse } from "@shipengine/js-api";
|
|
3
3
|
export declare const initHerePlatform: (token: HereTokenResponse) => H.service.Platform;
|
|
4
4
|
export declare const initDefaultLayers: (platform: H.service.Platform) => Record<string, any>;
|
|
5
5
|
export declare const initInteractiveBehaviors: (map: H.Map) => H.mapevents.Behavior;
|