@shipengine/elements 1.5.1 → 1.7.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 +14782 -14386
- package/index.js +14797 -14413
- package/package.json +5 -7
- package/src/components/address-preference-context/address-preference-context.d.ts +2 -1
- package/src/components/auto-funding-form/auto-funding-form.styles.d.ts +4 -8
- package/src/components/collapsible-panel/collapsible-panel.d.ts +6 -1
- package/src/components/collapsible-panel/collapsible-panel.styles.d.ts +1 -1
- package/src/components/date-range-select/date-range-select.d.ts +1 -2
- package/src/components/field/create-field-controller.d.ts +2 -1
- package/src/components/field/date-picker/date-picker.d.ts +2 -6
- package/src/components/field/rate-card/cost-breakdown/cost-breakdown.d.ts +1 -1
- package/src/components/field/rate-card/rate-card.d.ts +3 -1
- package/src/components/field/rate-card/rate-card.styles.d.ts +1 -0
- package/src/components/field-label/field-label.d.ts +2 -1
- package/src/components/history/history-card/history-card.d.ts +5 -2
- package/src/components/index.d.ts +5 -2
- package/src/components/service-point-display/service-point-display.d.ts +1 -1
- package/src/components/service-point-display/service-point-display.styles.d.ts +8 -0
- package/src/components/templates/address-display/address-display.d.ts +2 -1
- package/src/components/templates/address-form/address-schema.d.ts +2 -0
- package/src/components/templates/connected-carrier-list/connected-carrier-row/connected-carrier-row.styles.d.ts +17 -0
- package/src/components/templates/index.d.ts +1 -4
- package/src/components/templates/label/label.styles.d.ts +0 -6
- package/src/components/templates/product-form/product-form-schema.d.ts +0 -12
- package/src/components/templates/pudo-rate-tabs/pudo-rate-tabs.d.ts +6 -1
- package/src/components/templates/rate-form/rate-form.d.ts +4 -2
- package/src/components/templates/rate-form/rate-form.styles.d.ts +2 -4
- package/src/components/templates/shipment-form/shipment-schema.d.ts +0 -50
- package/src/components/templates/wallet-form/wallet-schema.d.ts +46 -2
- package/src/components/{templates/warehouse-form → warehouse-form}/warehouse-form.d.ts +1 -1
- package/src/elements/external-carriers/external-carriers.d.ts +819 -9
- package/src/elements/index.d.ts +7 -3
- package/src/elements/label-layout/index.d.ts +1 -0
- package/src/elements/label-layout/label-layout-element.d.ts +791 -0
- package/src/elements/labels-grid/labels-grid.d.ts +16 -2
- package/src/elements/manage-funding/index.d.ts +1 -0
- package/src/elements/manage-funding/manage-funding-element.d.ts +791 -0
- package/src/elements/manage-warehouses/manage-warehouses.d.ts +791 -21
- package/src/elements/payment-method-settings/index.d.ts +1 -0
- package/src/elements/payment-method-settings/payment-method-settings-element.d.ts +791 -0
- package/src/elements/{configure-shipment → purchase-label}/configure-shipment.d.ts +1 -12
- package/src/elements/purchase-label/hooks/index.d.ts +8 -0
- package/src/elements/purchase-label/hooks/use-configure-shipment.d.ts +1 -1
- package/src/elements/{configure-shipment → purchase-label}/hooks/use-rates-form.d.ts +1 -1
- package/src/elements/{configure-shipment → purchase-label}/hooks/use-rates-with-cache.d.ts +1 -1
- package/src/elements/{configure-shipment → purchase-label}/hooks/use-request-preferred-rates.d.ts +1 -1
- package/src/elements/{configure-shipment → purchase-label}/hooks/use-request-rates.d.ts +2 -1
- package/src/elements/purchase-label/purchase-label.d.ts +36 -50
- package/src/elements/shipengine-carriers/index.d.ts +1 -0
- package/src/elements/shipengine-carriers/shipengine-carriers.d.ts +854 -0
- package/src/elements/shipments-grid/shipments-grid.d.ts +16 -2
- package/src/elements/theme-creator/theme-creator.d.ts +16 -2
- package/src/elements/unit-settings/index.d.ts +1 -0
- package/src/elements/unit-settings/unit-settings-element.d.ts +791 -0
- package/src/elements/view-shipment/view-shipment.d.ts +29 -15
- package/src/elements/void-label/void-label.d.ts +25 -12
- package/src/elements/wallet-history/index.d.ts +1 -0
- package/src/elements/wallet-history/wallet-history-element.d.ts +791 -0
- package/src/features/external-carriers/external-carriers.d.ts +10 -0
- package/src/features/external-carriers/index.d.ts +1 -0
- package/src/features/index.d.ts +7 -0
- package/src/features/label-layout/index.d.ts +2 -0
- package/src/features/label-layout/label-layout.d.ts +7 -0
- package/src/features/label-layout/use-label-layout.d.ts +7 -0
- package/src/features/manage-funding/manage-funding.d.ts +16 -0
- package/src/features/manage-warehouses/index.d.ts +2 -0
- package/src/features/manage-warehouses/manage-warehouses.d.ts +16 -0
- package/src/features/manage-warehouses/use-manage-warehouses.d.ts +15 -0
- package/src/features/shipengine-carriers/hooks/index.d.ts +2 -0
- package/src/features/shipengine-carriers/hooks/use-carrier-metadata.d.ts +13 -0
- package/src/features/shipengine-carriers/index.d.ts +1 -0
- package/src/features/shipengine-carriers/shipengine-carriers-row/index.d.ts +1 -0
- package/src/features/shipengine-carriers/shipengine-carriers-row/shipengine-carriers-row.d.ts +9 -0
- package/src/features/shipengine-carriers/shipengine-carriers.d.ts +10 -0
- package/src/features/unit-settings/index.d.ts +2 -0
- package/src/features/unit-settings/unit-settings.d.ts +9 -0
- package/src/features/unit-settings/use-unit-settings.d.ts +10 -0
- package/src/features/wallet-history/wallet-history.styles.d.ts +10 -10
- package/src/hooks/index.d.ts +0 -1
- package/src/hooks/options/use-rate-options.d.ts +1 -1
- package/src/locales/en/index.d.ts +16 -2
- package/src/types/carrier-metadata.d.ts +3 -0
- package/src/types/index.d.ts +1 -0
- package/src/types/preferred-rates.d.ts +13 -0
- package/src/utilities/date.d.ts +2 -1
- package/src/utilities/feature-flags.d.ts +5 -2
- package/src/utilities/index.d.ts +1 -0
- package/src/utilities/tracking-status-formatter.d.ts +1 -0
- package/src/{elements → workflows}/account-settings/account-settings.d.ts +25 -58
- package/src/workflows/account-settings/use-get-panel-props.d.ts +10 -0
- package/src/{elements → workflows}/connect-carrier/connect-carrier.d.ts +16 -2
- package/src/workflows/index.d.ts +3 -0
- package/src/workflows/manage-wallet-workflow/index.d.ts +1 -0
- package/src/workflows/manage-wallet-workflow/manage-wallet-workflow.d.ts +828 -0
- package/src/workflows/manage-wallet-workflow/use-get-wallet-panel-props.d.ts +4 -0
- package/src/workflows/onboarding/components/onboarding-wizard/onboarding-wizard.d.ts +2 -2
- 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 +2 -1
- package/src/workflows/onboarding/onboarding.d.ts +21 -8
- package/src/workflows/purchase-label-workflow/index.d.ts +1 -0
- package/src/{elements/shipengine-workflow/label-workflow.d.ts → workflows/purchase-label-workflow/purchase-label-workflow.d.ts} +19 -21
- package/src/components/date-range-select/date-range-select.styles.d.ts +0 -7
- package/src/components/field/date-picker/date-picker.styles.d.ts +0 -3
- package/src/components/label-layout/index.d.ts +0 -3
- package/src/components/label-layout/label-layout-purchase.d.ts +0 -5
- package/src/components/label-layout/label-layout-settings.d.ts +0 -7
- package/src/components/label-layout/label-layout.d.ts +0 -9
- package/src/components/manage-funding/manage-funding.d.ts +0 -35
- package/src/components/templates/account-settings/account-settings.d.ts +0 -10
- package/src/components/templates/account-settings/index.d.ts +0 -1
- package/src/components/templates/list-carriers/index.d.ts +0 -1
- package/src/components/templates/list-carriers/list-carriers.d.ts +0 -16
- package/src/components/templates/list-carriers-row/index.d.ts +0 -1
- package/src/components/templates/list-carriers-row/list-carriers-row.d.ts +0 -9
- package/src/components/templates/manage-warehouses/index.d.ts +0 -1
- package/src/components/templates/manage-warehouses/manage-warehouses.d.ts +0 -11
- package/src/components/unit-settings/index.d.ts +0 -1
- package/src/components/unit-settings/unit-settings.d.ts +0 -6
- package/src/elements/configure-shipment/hooks/index.d.ts +0 -8
- package/src/elements/configure-shipment/index.d.ts +0 -1
- package/src/elements/list-carriers/index.d.ts +0 -1
- package/src/elements/list-carriers/list-carriers.d.ts +0 -36
- package/src/elements/shipengine-workflow/index.d.ts +0 -1
- package/src/hooks/use-carrier-metadata.d.ts +0 -10
- /package/src/components/{templates/edit-billing-form → edit-billing-form}/edit-billing-form.d.ts +0 -0
- /package/src/components/{templates/edit-billing-form → edit-billing-form}/edit-billing-form.styles.d.ts +0 -0
- /package/src/components/{templates/edit-billing-form → edit-billing-form}/index.d.ts +0 -0
- /package/src/components/{templates/wallet-card → wallet-card}/index.d.ts +0 -0
- /package/src/components/{templates/wallet-card → wallet-card}/wallet-card.d.ts +0 -0
- /package/src/components/{templates/wallet-card → wallet-card}/wallet-card.styles.d.ts +0 -0
- /package/src/components/{templates/warehouse-form → warehouse-form}/index.d.ts +0 -0
- /package/src/components/{templates/warehouse-form → warehouse-form}/warehouse-form-schema.d.ts +0 -0
- /package/src/elements/{configure-shipment → purchase-label}/hooks/use-address.d.ts +0 -0
- /package/src/elements/{configure-shipment → purchase-label}/hooks/use-customs.d.ts +0 -0
- /package/src/elements/{configure-shipment → purchase-label}/hooks/use-presets.d.ts +0 -0
- /package/src/elements/{configure-shipment → purchase-label}/hooks/use-shipment-form.d.ts +0 -0
- /package/src/{components → features}/label-layout/label-layout.styles.d.ts +0 -0
- /package/src/{components → features}/manage-funding/index.d.ts +0 -0
- /package/src/{components/templates → features}/manage-warehouses/manage-warehouse.styles.d.ts +0 -0
- /package/src/{components/templates → features/manage-warehouses}/warehouse-display/index.d.ts +0 -0
- /package/src/{components/templates → features/manage-warehouses}/warehouse-display/warehouse-display.d.ts +0 -0
- /package/src/{components → features}/payment-method-settings/index.d.ts +0 -0
- /package/src/{components → features}/payment-method-settings/payment-method-settings.d.ts +0 -0
- /package/src/{elements/list-carriers → features/shipengine-carriers}/hooks/use-list-connected-carriers.d.ts +0 -0
- /package/src/{components/templates/list-carriers-row/list-carriers-row.styles.d.ts → features/shipengine-carriers/shipengine-carriers-row/shipengine-carriers-row.styles.d.ts} +0 -0
- /package/src/{components/templates/list-carriers/list-carriers.styles.d.ts → features/shipengine-carriers/shipengine-carriers.styles.d.ts} +0 -0
- /package/src/{elements → workflows}/account-settings/index.d.ts +0 -0
- /package/src/{elements → workflows}/connect-carrier/index.d.ts +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ConnectCarrier } from "../../workflows";
|
|
2
|
+
export type ExternalCarriersFeatures = ConnectCarrier.ConnectCarrierFeatures;
|
|
3
|
+
export type ExternalCarriersProps = {
|
|
4
|
+
/**
|
|
5
|
+
* `availableCarrierConnections` is a set of carrier codes for carriers that may be added. If this is omitted,
|
|
6
|
+
* new carriers may not be added by this element.
|
|
7
|
+
*/
|
|
8
|
+
features?: ExternalCarriersFeatures;
|
|
9
|
+
};
|
|
10
|
+
export declare const ExternalCarriers: ({ features }: ExternalCarriersProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./external-carriers";
|
package/src/features/index.d.ts
CHANGED
|
@@ -1 +1,8 @@
|
|
|
1
1
|
export * from "./wallet-history";
|
|
2
|
+
export * from "./label-layout";
|
|
3
|
+
export * from "./manage-funding";
|
|
4
|
+
export * from "./unit-settings";
|
|
5
|
+
export * from "./payment-method-settings";
|
|
6
|
+
export * from "./manage-warehouses";
|
|
7
|
+
export * from "./shipengine-carriers";
|
|
8
|
+
export * from "./external-carriers";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SE } from "@shipengine/alchemy";
|
|
2
|
+
export type LabelLayoutSettingsProps = {
|
|
3
|
+
accountSettings?: SE.AccountSettings;
|
|
4
|
+
updateAccountSettings: (newAccountSetting: Partial<SE.AccountSettings>) => Promise<void>;
|
|
5
|
+
};
|
|
6
|
+
export declare const Settings: ({ accountSettings, updateAccountSettings }: LabelLayoutSettingsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const Purchase: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SE } from "@shipengine/alchemy";
|
|
2
|
+
export declare const useLabelLayout: () => {
|
|
3
|
+
accountSettings: SE.AccountSettings | undefined;
|
|
4
|
+
isUpdatingLabelLayout: boolean;
|
|
5
|
+
updateAccountSettings: (newAccountSetting: Partial<SE.AccountSettings>) => Promise<void>;
|
|
6
|
+
updateLabelLayoutErrors: SE.CodedError[] | null;
|
|
7
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @namespace ManageFunding
|
|
3
|
+
*
|
|
4
|
+
* # Manage Funding Component
|
|
5
|
+
*
|
|
6
|
+
* - The `<ManageFunding />` component is used to manage funding rules and add funds to a carrier
|
|
7
|
+
* account, and is composed in the `<AccountSettings />` component.
|
|
8
|
+
*
|
|
9
|
+
* @param ManageFundingProps The base props that will be passed into the `<ManageFunding />` component.
|
|
10
|
+
*
|
|
11
|
+
* @returns Element A React element that renders the `<ManageFunding />` component allowing users
|
|
12
|
+
* manage funding rules and add funds to their carrier accounts.
|
|
13
|
+
*
|
|
14
|
+
* @see {@link ManageFundingProps | The props that are passed into the `<ManageFunding />` component}
|
|
15
|
+
*/
|
|
16
|
+
export declare const ManageFunding: () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SE } from "@shipengine/alchemy";
|
|
2
|
+
export type UpdateWarehouseData = {
|
|
3
|
+
warehouseId: string;
|
|
4
|
+
} & Partial<SE.Warehouse>;
|
|
5
|
+
export type ManageWarehousesProps = {
|
|
6
|
+
createWarehouse: (params: Partial<SE.Warehouse>) => Promise<any>;
|
|
7
|
+
deleteWarehouse: (params: {
|
|
8
|
+
warehouseId: string;
|
|
9
|
+
}) => Promise<void>;
|
|
10
|
+
isLoadingWarehouses: boolean;
|
|
11
|
+
listWarehouseErrors: SE.CodedError[] | null;
|
|
12
|
+
refreshListWarehouses: () => void;
|
|
13
|
+
updateWarehouse: (params: UpdateWarehouseData) => Promise<void>;
|
|
14
|
+
warehouses?: SE.Warehouse[];
|
|
15
|
+
};
|
|
16
|
+
export declare const ManageWarehouses: ({ createWarehouse, deleteWarehouse, isLoadingWarehouses, listWarehouseErrors, refreshListWarehouses, updateWarehouse, warehouses, }: ManageWarehousesProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const useManageWarehouses: () => {
|
|
2
|
+
createWarehouse: import("@tanstack/react-query").UseMutateAsyncFunction<import("@shipengine/alchemy").Warehouse, import("@shipengine/alchemy").CodedError[], Partial<import("@shipengine/alchemy").Warehouse>, unknown>;
|
|
3
|
+
createWarehouseErrors: import("@shipengine/alchemy").CodedError[] | null;
|
|
4
|
+
deleteWarehouse: import("@tanstack/react-query").UseMutateAsyncFunction<void, import("@shipengine/alchemy").CodedError[], import("@shipengine/alchemy").DeleteWarehouseData, unknown>;
|
|
5
|
+
deleteWarehouseErrors: import("@shipengine/alchemy").CodedError[] | null;
|
|
6
|
+
isCreatingWarehouse: boolean;
|
|
7
|
+
isDeletingWarehouse: boolean;
|
|
8
|
+
isLoadingWarehouses: boolean;
|
|
9
|
+
isUpdatingWarehouse: boolean;
|
|
10
|
+
listWarehouseErrors: import("@shipengine/alchemy").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/alchemy").Warehouse[], import("@shipengine/alchemy").CodedError[]>>;
|
|
12
|
+
updateWarehouse: import("@tanstack/react-query").UseMutateAsyncFunction<void, import("@shipengine/alchemy").CodedError[], import("@shipengine/alchemy").UpdateWarehouseData, unknown>;
|
|
13
|
+
updateWarehouseErrors: import("@shipengine/alchemy").CodedError[] | null;
|
|
14
|
+
warehouses: import("@shipengine/alchemy").Warehouse[] | undefined;
|
|
15
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CarrierConnection } from "@shipengine/alchemy";
|
|
2
|
+
export type CarrierMetadataHook = {
|
|
3
|
+
carrierCodes?: CarrierConnection["carrierCode"][];
|
|
4
|
+
countryCode?: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* @internal
|
|
8
|
+
*
|
|
9
|
+
* # Carrier Metadata Hook
|
|
10
|
+
*
|
|
11
|
+
* @category Hooks
|
|
12
|
+
*/
|
|
13
|
+
export declare const useCarrierMetadata: ({ carrierCodes, countryCode }: CarrierMetadataHook) => import("../../../types").CarrierMetadata[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./shipengine-carriers";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./shipengine-carriers-row";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CodedError } from "@shipengine/alchemy";
|
|
2
|
+
import { AddCarrierFormPayload } from "../../../components/templates/add-carrier-form";
|
|
3
|
+
import { ConnectedCarrierMetadata } from "../hooks/use-list-connected-carriers";
|
|
4
|
+
export type ShipEngineCarriersRowProps = {
|
|
5
|
+
connectedCarrier: ConnectedCarrierMetadata;
|
|
6
|
+
registerCarrier: (payload?: AddCarrierFormPayload) => Promise<void>;
|
|
7
|
+
registerCarrierErrors?: CodedError[] | null;
|
|
8
|
+
};
|
|
9
|
+
export declare const ShipEngineCarriersRow: ({ connectedCarrier: { carrier, isConnected }, registerCarrier, registerCarrierErrors, }: ShipEngineCarriersRowProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type ShipEngineCarriersFeatures = {
|
|
2
|
+
carriers: {
|
|
3
|
+
enabledCarriers: ("aramex_au_walleted" | "canada_post_walleted" | "canpar_walleted" | "couriersplease_walleted" | "sendle_walleted" | "dhl_express_walleted" | "dhl_express_worldwide" | "dpd_germany_walleted" | "dpdwallet" | "globalpost" | "hermes" | "purolator_walleted" | "stamps_com" | "ups_walleted" | "ups" | "yodel_walleted")[];
|
|
4
|
+
};
|
|
5
|
+
};
|
|
6
|
+
export type ShipEngineCarriersProps = {
|
|
7
|
+
features?: ShipEngineCarriersFeatures;
|
|
8
|
+
showFunds?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare const ShipEngineCarriers: ({ features, showFunds, }: ShipEngineCarriersProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SE } from "@shipengine/alchemy";
|
|
2
|
+
export type UnitSettingsProps = {
|
|
3
|
+
accountSettings?: SE.AccountSettings;
|
|
4
|
+
getAccountSettingsErrors?: SE.CodedError[] | null;
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
refreshAccountSettings: () => void;
|
|
7
|
+
updateAccountSettings: (payload: Partial<SE.AccountSettings>) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare const UnitSettings: ({ accountSettings, getAccountSettingsErrors: errors, isLoading, refreshAccountSettings, updateAccountSettings, }: UnitSettingsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SE } from "@shipengine/alchemy";
|
|
2
|
+
export declare const useUnitSettings: () => {
|
|
3
|
+
accountSettings: SE.AccountSettings | undefined;
|
|
4
|
+
getAccountSettingsErrors: SE.CodedError[] | null;
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
isUpdatingUnitSettings: boolean;
|
|
7
|
+
refreshAccountSettings: <TPageData>(options?: (import("@tanstack/query-core").RefetchOptions & import("@tanstack/query-core").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/query-core").QueryObserverResult<SE.AccountSettings, SE.CodedError[]>>;
|
|
8
|
+
updateAccountSettings: (newAccountSetting: Partial<SE.AccountSettings>) => Promise<void>;
|
|
9
|
+
updateUnitSettingsErrors: SE.CodedError[] | null;
|
|
10
|
+
};
|
|
@@ -21,10 +21,11 @@ export declare const styles: {
|
|
|
21
21
|
padding: number;
|
|
22
22
|
textAlign: "center";
|
|
23
23
|
};
|
|
24
|
-
gridContainer:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
gridContainer: {
|
|
25
|
+
"@media (max-width: 550px)": {
|
|
26
|
+
display: "flex";
|
|
27
|
+
flexDirection: "column-reverse";
|
|
28
|
+
};
|
|
28
29
|
};
|
|
29
30
|
linkAction: {
|
|
30
31
|
margin: string;
|
|
@@ -40,7 +41,6 @@ export declare const styles: {
|
|
|
40
41
|
textAlign: "center";
|
|
41
42
|
};
|
|
42
43
|
skeletonCard: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
43
|
-
backgroundColor: string;
|
|
44
44
|
display: "flex";
|
|
45
45
|
justifyContent: "space-between";
|
|
46
46
|
padding: number;
|
|
@@ -58,9 +58,13 @@ export declare const styles: {
|
|
|
58
58
|
rowGap: number;
|
|
59
59
|
};
|
|
60
60
|
skeletonCardList: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
61
|
+
"& > li:not(:last-child)": {
|
|
62
|
+
borderBottom: string;
|
|
63
|
+
};
|
|
64
|
+
border: string;
|
|
61
65
|
display: "flex";
|
|
62
66
|
flexDirection: "column";
|
|
63
|
-
|
|
67
|
+
listStyle: "none";
|
|
64
68
|
};
|
|
65
69
|
skeletonCardLogo: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
66
70
|
alignItems: "center";
|
|
@@ -79,8 +83,4 @@ export declare const styles: {
|
|
|
79
83
|
marginRight: string;
|
|
80
84
|
maxWidth: string;
|
|
81
85
|
};
|
|
82
|
-
transactionTypeSelect: {
|
|
83
|
-
height: string;
|
|
84
|
-
width: string;
|
|
85
|
-
};
|
|
86
86
|
};
|
package/src/hooks/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SE } from "@shipengine/alchemy";
|
|
2
|
-
import { PreferredRateAcknowledgementMessage, PreferredRatesResponse } from "../../
|
|
2
|
+
import { PreferredRateAcknowledgementMessage, PreferredRatesResponse } from "../../types";
|
|
3
3
|
/**
|
|
4
4
|
* @internal
|
|
5
5
|
*
|
|
@@ -78,6 +78,7 @@ declare const _default: {
|
|
|
78
78
|
setup: {
|
|
79
79
|
title: string;
|
|
80
80
|
subtitle: string;
|
|
81
|
+
hiddenTermsSubtitle: string;
|
|
81
82
|
descriptionTitle: string;
|
|
82
83
|
description: string;
|
|
83
84
|
};
|
|
@@ -207,6 +208,7 @@ declare const _default: {
|
|
|
207
208
|
needToAcknowledge: string;
|
|
208
209
|
};
|
|
209
210
|
rates: {
|
|
211
|
+
requestedShippingNotification: string;
|
|
210
212
|
uspsMediaMailAcknowledgement: string;
|
|
211
213
|
uspsFirstClassMailAcknowledgement_leof: string;
|
|
212
214
|
rateSavings: string;
|
|
@@ -231,7 +233,8 @@ declare const _default: {
|
|
|
231
233
|
nextOpeningDay: string;
|
|
232
234
|
until: string;
|
|
233
235
|
selected: string;
|
|
234
|
-
|
|
236
|
+
select: string;
|
|
237
|
+
today: string;
|
|
235
238
|
viewMap: string;
|
|
236
239
|
otherLocations: string;
|
|
237
240
|
noServicePointsFound: string;
|
|
@@ -287,12 +290,18 @@ declare const _default: {
|
|
|
287
290
|
"aHR0cHM6Ly93d3cueW9kZWxkaXJlY3QuY28udWsvY29udGVudC9hYm91dC10ZXJtcw==": string;
|
|
288
291
|
aHR0cHM6Ly93d3cuc2hpcHN0YXRpb24uY29tL3Rlcm1zLXNlcnZpY2UtdW5pdGVkLWtpbmdkb20v: string;
|
|
289
292
|
"aHR0cHM6Ly93d3cuZHBkLmNvLnVrL3N0YW5kYXJkX3Rlcm1zX2FuZF9jb25kaXRpb25zLmpzcA==": string;
|
|
293
|
+
aHR0cHM6Ly93d3cuZ29nbG9iYWxwb3N0LmNvbS9jb25kaXRpb25z: string;
|
|
294
|
+
aHR0cHM6Ly93d3cucHVyb2xhdG9yLmNvbS9mci9tb2RhbGl0ZXMtZXQtY29uZGl0aW9ucy1kZS1zZXJ2aWNl: string;
|
|
295
|
+
aHR0cHM6Ly93d3cucHVyb2xhdG9yLmNvbS9lbi90ZXJtcy1hbmQtY29uZGl0aW9ucy1zZXJ2aWNl: string;
|
|
290
296
|
};
|
|
291
297
|
termsAndAgreementTitles: {
|
|
292
298
|
"WW9kZWwgRGlyZWN0IC0gVGVybXMgYW5kIENvbmRpdGlvbnMgKOKAnFRlcm1z4oCdKQ==": string;
|
|
293
299
|
"RXZyaSBTZW5kIFRlcm1zICYgQ29uZGl0aW9ucw==": string;
|
|
294
300
|
"VGVybXMgb2YgU2VydmljZSBVbml0ZWQgS2luZ2RvbQ==": string;
|
|
295
301
|
RFBEIFN0YW5kYXJkIFRlcm1zIGFuZCBDb25kaXRpb25z: string;
|
|
302
|
+
"R2xvYmFsUG9zdCBUZXJtcyBhbmQgQ29uZGl0aW9ucw==": string;
|
|
303
|
+
"UHVyb2xhdG9yIFRlcm1zIGFuZCBDb25kaXRpb25zIG9mIFNlcnZpY2U=": string;
|
|
304
|
+
UHVyb2xhdG9yIE1vZGFsaXTDqXMgZXQgY29uZGl0aW9ucyBkZSBzZXJ2aWNl: string;
|
|
296
305
|
};
|
|
297
306
|
};
|
|
298
307
|
"manage-defaults": {
|
|
@@ -428,7 +437,7 @@ declare const _default: {
|
|
|
428
437
|
};
|
|
429
438
|
};
|
|
430
439
|
};
|
|
431
|
-
"
|
|
440
|
+
"shipengine-carriers": {
|
|
432
441
|
title: string;
|
|
433
442
|
headers: {
|
|
434
443
|
accountCarriers: string;
|
|
@@ -731,6 +740,7 @@ declare const _default: {
|
|
|
731
740
|
"connect-carrier": {
|
|
732
741
|
actions: {
|
|
733
742
|
cancel: string;
|
|
743
|
+
carrierSettings: string;
|
|
734
744
|
connectCarriers: string;
|
|
735
745
|
disconnect: string;
|
|
736
746
|
disconnectCarrier: string;
|
|
@@ -749,6 +759,10 @@ declare const _default: {
|
|
|
749
759
|
status: {
|
|
750
760
|
connected: string;
|
|
751
761
|
};
|
|
762
|
+
disconnectDropdown: {
|
|
763
|
+
toastTitle: string;
|
|
764
|
+
toastBody: string;
|
|
765
|
+
};
|
|
752
766
|
};
|
|
753
767
|
"account-settings": {
|
|
754
768
|
messages: {
|
package/src/types/index.d.ts
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SE } from "@shipengine/alchemy";
|
|
2
|
+
export type PreferredRateAcknowledgementMessage = {
|
|
3
|
+
link?: {
|
|
4
|
+
text: string;
|
|
5
|
+
url: string;
|
|
6
|
+
};
|
|
7
|
+
primaryMessage: string;
|
|
8
|
+
secondaryMessage?: string;
|
|
9
|
+
};
|
|
10
|
+
export type PreferredRatesResponse = Array<{
|
|
11
|
+
rate: SE.Rate;
|
|
12
|
+
rateAcknowledgementMessage?: PreferredRateAcknowledgementMessage;
|
|
13
|
+
}>;
|
package/src/utilities/date.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as Locales from "date-fns/locale";
|
|
1
2
|
/**
|
|
2
3
|
* @internal
|
|
3
4
|
*
|
|
@@ -12,7 +13,7 @@ export declare const formatDate: (date: string, locale?: string) => string;
|
|
|
12
13
|
* @param locale string i.e. "en-US"
|
|
13
14
|
* @returns locale data
|
|
14
15
|
*/
|
|
15
|
-
export declare const findDateLocale: (locale?: string) => Locale;
|
|
16
|
+
export declare const findDateLocale: (locale?: string) => Locales.Locale;
|
|
16
17
|
/**
|
|
17
18
|
* @internal
|
|
18
19
|
* Given a date and a locale, format the date to the locale's date format.
|
|
@@ -82,7 +82,7 @@ export declare const featureFlags: {
|
|
|
82
82
|
/**
|
|
83
83
|
* `enableFunding` enables the `funding` section of the rate form.
|
|
84
84
|
*/
|
|
85
|
-
readonly enableFunding:
|
|
85
|
+
readonly enableFunding: true;
|
|
86
86
|
/**
|
|
87
87
|
* `enableGlobalPostFiltering` enables the `global post filtering` on all rates fetched
|
|
88
88
|
* in the rates form.
|
|
@@ -161,7 +161,7 @@ export declare const featureFlags: {
|
|
|
161
161
|
* `enabledCarriers` is a list of all `carriers` that are enabled for use in ShipEngine
|
|
162
162
|
* Elements.
|
|
163
163
|
*/
|
|
164
|
-
readonly enabledCarriers: readonly ["
|
|
164
|
+
readonly enabledCarriers: readonly ["aramex_au_walleted", "canada_post_walleted", "canpar_walleted", "couriersplease_walleted", "dhl_express_walleted", "dpd_germany_walleted", "dpdwallet", "globalpost", "hermes", "purolator_walleted", "sendle_walleted", "stamps_com", "ups_walleted", "ups", "yodel_walleted"];
|
|
165
165
|
};
|
|
166
166
|
/**
|
|
167
167
|
* All global `presentation` related feature flags.
|
|
@@ -217,3 +217,6 @@ export declare const getFeatures: (...element: string[]) => any;
|
|
|
217
217
|
* @see {@link featureFlags | All available `Feature Flags`}
|
|
218
218
|
*/
|
|
219
219
|
export declare const useFeatures: (...element: string[]) => any;
|
|
220
|
+
export type FeatureObject = Record<string, unknown>;
|
|
221
|
+
export declare const isObject: (item: unknown) => item is FeatureObject;
|
|
222
|
+
export declare function deepMergeFeatures<T extends FeatureObject>(defaults: T, custom?: T): T;
|
package/src/utilities/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const trackingStatusFormatter: (status: string) => string | undefined;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { ShipEngineCarriersFeatures } from "../../features";
|
|
3
|
+
import { ConnectCarrier } from "../connect-carrier";
|
|
4
|
+
export type AccountSettingsFeatures = ShipEngineCarriersFeatures & ConnectCarrier.ConnectCarrierFeatures;
|
|
3
5
|
/**
|
|
4
6
|
* # Account Settings Component Props
|
|
5
7
|
*
|
|
@@ -12,35 +14,8 @@ export type ComponentProps = {
|
|
|
12
14
|
* Feature flags controlling operation of various sub components.
|
|
13
15
|
*/
|
|
14
16
|
features?: AccountSettingsFeatures;
|
|
15
|
-
/**
|
|
16
|
-
* This callback function will be used to house the logic you wish to execute when the
|
|
17
|
-
* user saves new changes to their account settings.
|
|
18
|
-
*/
|
|
19
|
-
onSaveSettings: () => void;
|
|
20
17
|
};
|
|
21
|
-
|
|
22
|
-
* # Account Settings Component
|
|
23
|
-
*
|
|
24
|
-
* - The `<AccountSettings />` component is used to display the user's account settings, as well as
|
|
25
|
-
* allowing them to make changes to various aspects of their account.
|
|
26
|
-
*
|
|
27
|
-
* @returns Element An EmotionJSX.Element that will render the `<AccountSettings />` component
|
|
28
|
-
* with all the appropriate wrappers.
|
|
29
|
-
*
|
|
30
|
-
* @example
|
|
31
|
-
* You can see how the `<Component />` is used in the `createElement` function call below.
|
|
32
|
-
* ```tsx
|
|
33
|
-
* export const Element = alchemy.createElement(Component, ErrorFallback, {
|
|
34
|
-
* css: { height: "100%", maxWidth: "800px", minWidth: "440px", width: "100%" },
|
|
35
|
-
* resources: { en },
|
|
36
|
-
* });
|
|
37
|
-
* ```
|
|
38
|
-
*
|
|
39
|
-
* <br />
|
|
40
|
-
*
|
|
41
|
-
* @see {@link AccountSettings.Element | The **Element** created to render `<AccountSettings />`}
|
|
42
|
-
*/
|
|
43
|
-
export declare const Component: ({ features, onSaveSettings }: ComponentProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare const Component: ({ features }: ComponentProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
44
19
|
/**
|
|
45
20
|
* # Registered Account Settings Element
|
|
46
21
|
*
|
|
@@ -60,7 +35,7 @@ export declare const Component: ({ features, onSaveSettings }: ComponentProps) =
|
|
|
60
35
|
* <br />
|
|
61
36
|
*
|
|
62
37
|
* @see {@link AccountSettings.ComponentProps | The **props** that can be passed into the `<AccountSettings.Element />` component}
|
|
63
|
-
* @see {@link
|
|
38
|
+
* @see {@link ManageWalletWorkflow.Element | The `<Manage-Wallet-Workflow />` component used to view connected carriers and manage funding}
|
|
64
39
|
* @see {@link ManageWarehouses.Component | The `<ManageWarehouses />` component used to add, update, or remove warehouses}
|
|
65
40
|
* @see {@link PaymentMethodSettings | The `<PaymentMethodSettings />` component used to manage payment methods}
|
|
66
41
|
* @see {@link ManageFunding | The `<ManageFunding />` component used to manage funding rules and add funds to a carrier account}
|
|
@@ -147,6 +122,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
147
122
|
setup: {
|
|
148
123
|
title: string;
|
|
149
124
|
subtitle: string;
|
|
125
|
+
hiddenTermsSubtitle: string;
|
|
150
126
|
descriptionTitle: string;
|
|
151
127
|
description: string;
|
|
152
128
|
};
|
|
@@ -206,13 +182,6 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
206
182
|
showItems: string;
|
|
207
183
|
showMoreRates: string;
|
|
208
184
|
showFewerRates: string;
|
|
209
|
-
/**
|
|
210
|
-
* # Account Settings Component Props
|
|
211
|
-
*
|
|
212
|
-
* - These are the base props that will be passed into the `<AccountSettings />` component.
|
|
213
|
-
*
|
|
214
|
-
* @see {@link AccountSettings.Component | This prop types usage in the `<AccountSettings /> component`}
|
|
215
|
-
*/
|
|
216
185
|
saveRate: string;
|
|
217
186
|
};
|
|
218
187
|
balance: {
|
|
@@ -226,7 +195,9 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
226
195
|
customsItemsRequired: string;
|
|
227
196
|
invalidAddress: string;
|
|
228
197
|
noRates: string;
|
|
229
|
-
salesOrderNotLoaded: string;
|
|
198
|
+
salesOrderNotLoaded: string; /**
|
|
199
|
+
* Feature flags controlling operation of various sub components.
|
|
200
|
+
*/
|
|
230
201
|
unsupportedAddress: string;
|
|
231
202
|
saveRateFailedMessage: string;
|
|
232
203
|
saveRateFailedTitle: string;
|
|
@@ -283,6 +254,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
283
254
|
needToAcknowledge: string;
|
|
284
255
|
};
|
|
285
256
|
rates: {
|
|
257
|
+
requestedShippingNotification: string;
|
|
286
258
|
uspsMediaMailAcknowledgement: string;
|
|
287
259
|
uspsFirstClassMailAcknowledgement_leof: string;
|
|
288
260
|
rateSavings: string;
|
|
@@ -307,7 +279,8 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
307
279
|
nextOpeningDay: string;
|
|
308
280
|
until: string;
|
|
309
281
|
selected: string;
|
|
310
|
-
|
|
282
|
+
select: string;
|
|
283
|
+
today: string;
|
|
311
284
|
viewMap: string;
|
|
312
285
|
otherLocations: string;
|
|
313
286
|
noServicePointsFound: string;
|
|
@@ -363,12 +336,18 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
363
336
|
"aHR0cHM6Ly93d3cueW9kZWxkaXJlY3QuY28udWsvY29udGVudC9hYm91dC10ZXJtcw==": string;
|
|
364
337
|
aHR0cHM6Ly93d3cuc2hpcHN0YXRpb24uY29tL3Rlcm1zLXNlcnZpY2UtdW5pdGVkLWtpbmdkb20v: string;
|
|
365
338
|
"aHR0cHM6Ly93d3cuZHBkLmNvLnVrL3N0YW5kYXJkX3Rlcm1zX2FuZF9jb25kaXRpb25zLmpzcA==": string;
|
|
339
|
+
aHR0cHM6Ly93d3cuZ29nbG9iYWxwb3N0LmNvbS9jb25kaXRpb25z: string;
|
|
340
|
+
aHR0cHM6Ly93d3cucHVyb2xhdG9yLmNvbS9mci9tb2RhbGl0ZXMtZXQtY29uZGl0aW9ucy1kZS1zZXJ2aWNl: string;
|
|
341
|
+
aHR0cHM6Ly93d3cucHVyb2xhdG9yLmNvbS9lbi90ZXJtcy1hbmQtY29uZGl0aW9ucy1zZXJ2aWNl: string;
|
|
366
342
|
};
|
|
367
343
|
termsAndAgreementTitles: {
|
|
368
344
|
"WW9kZWwgRGlyZWN0IC0gVGVybXMgYW5kIENvbmRpdGlvbnMgKOKAnFRlcm1z4oCdKQ==": string;
|
|
369
345
|
"RXZyaSBTZW5kIFRlcm1zICYgQ29uZGl0aW9ucw==": string;
|
|
370
346
|
"VGVybXMgb2YgU2VydmljZSBVbml0ZWQgS2luZ2RvbQ==": string;
|
|
371
347
|
RFBEIFN0YW5kYXJkIFRlcm1zIGFuZCBDb25kaXRpb25z: string;
|
|
348
|
+
"R2xvYmFsUG9zdCBUZXJtcyBhbmQgQ29uZGl0aW9ucw==": string;
|
|
349
|
+
"UHVyb2xhdG9yIFRlcm1zIGFuZCBDb25kaXRpb25zIG9mIFNlcnZpY2U=": string;
|
|
350
|
+
UHVyb2xhdG9yIE1vZGFsaXTDqXMgZXQgY29uZGl0aW9ucyBkZSBzZXJ2aWNl: string;
|
|
372
351
|
};
|
|
373
352
|
};
|
|
374
353
|
"manage-defaults": {
|
|
@@ -400,10 +379,6 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
400
379
|
metric: string;
|
|
401
380
|
};
|
|
402
381
|
weight: {
|
|
403
|
-
/**
|
|
404
|
-
* This callback function will be used to house the logic you wish to execute when the
|
|
405
|
-
* user saves new changes to their account settings.
|
|
406
|
-
*/
|
|
407
382
|
title: string;
|
|
408
383
|
standard: string;
|
|
409
384
|
g: string;
|
|
@@ -508,7 +483,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
508
483
|
};
|
|
509
484
|
};
|
|
510
485
|
};
|
|
511
|
-
"
|
|
486
|
+
"shipengine-carriers": {
|
|
512
487
|
title: string;
|
|
513
488
|
headers: {
|
|
514
489
|
accountCarriers: string;
|
|
@@ -538,13 +513,6 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
538
513
|
remove: string;
|
|
539
514
|
save: string;
|
|
540
515
|
skipForNow: string;
|
|
541
|
-
/**
|
|
542
|
-
* # Account Settings Component Props
|
|
543
|
-
*
|
|
544
|
-
* - These are the base props that will be passed into the `<AccountSettings />` component.
|
|
545
|
-
*
|
|
546
|
-
* @see {@link AccountSettings.Component | This prop types usage in the `<AccountSettings /> component`}
|
|
547
|
-
*/
|
|
548
516
|
submit: string;
|
|
549
517
|
tryAgain: string;
|
|
550
518
|
};
|
|
@@ -558,10 +526,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
558
526
|
addressLine2: string;
|
|
559
527
|
cityLocality: string;
|
|
560
528
|
stateProvince: string;
|
|
561
|
-
postalCode: string;
|
|
562
|
-
* This callback function will be used to house the logic you wish to execute when the
|
|
563
|
-
* user saves new changes to their account settings.
|
|
564
|
-
*/
|
|
529
|
+
postalCode: string;
|
|
565
530
|
phone: string;
|
|
566
531
|
email: string;
|
|
567
532
|
addressResidentialIndicator: string;
|
|
@@ -821,6 +786,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
821
786
|
"connect-carrier": {
|
|
822
787
|
actions: {
|
|
823
788
|
cancel: string;
|
|
789
|
+
carrierSettings: string;
|
|
824
790
|
connectCarriers: string;
|
|
825
791
|
disconnect: string;
|
|
826
792
|
disconnectCarrier: string;
|
|
@@ -833,15 +799,16 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
|
|
|
833
799
|
};
|
|
834
800
|
search: string;
|
|
835
801
|
settingsModal: {
|
|
836
|
-
/**
|
|
837
|
-
* Feature flags controlling operation of various sub components.
|
|
838
|
-
*/
|
|
839
802
|
closeDialog: string;
|
|
840
803
|
header: string;
|
|
841
804
|
};
|
|
842
805
|
status: {
|
|
843
806
|
connected: string;
|
|
844
807
|
};
|
|
808
|
+
disconnectDropdown: {
|
|
809
|
+
toastTitle: string;
|
|
810
|
+
toastBody: string;
|
|
811
|
+
};
|
|
845
812
|
};
|
|
846
813
|
"account-settings": {
|
|
847
814
|
messages: {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CollapsiblePanelProps } from "../../components";
|
|
2
|
+
import { UnitSettingsProps } from "../../features";
|
|
3
|
+
import { LabelLayoutSettingsProps } from "../../features/label-layout/label-layout";
|
|
4
|
+
import { ManageWarehousesProps } from "../../features/manage-warehouses/";
|
|
5
|
+
type SettingProps = LabelLayoutSettingsProps | UnitSettingsProps | ManageWarehousesProps;
|
|
6
|
+
export type SettingPropsIntersection = LabelLayoutSettingsProps & UnitSettingsProps & ManageWarehousesProps;
|
|
7
|
+
export declare const useGetPanelProps: () => {
|
|
8
|
+
getSettingPanelProps: (setting: string) => [panelProps?: CollapsiblePanelProps, settingProps?: SettingProps];
|
|
9
|
+
};
|
|
10
|
+
export {};
|