@shipengine/elements 0.11.1 → 0.13.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/components/accordion/accordion.d.ts +12 -0
- package/components/accordion/accordion.styles.d.ts +7 -0
- package/components/accordion/index.d.ts +1 -0
- package/components/button-group/button-group.d.ts +7 -0
- package/components/button-group/index.d.ts +1 -0
- package/components/cube/cube.d.ts +5 -0
- package/components/cube/index.d.ts +1 -0
- package/components/disclosure/disclosure.d.ts +9 -0
- package/components/disclosure/disclosure.styles.d.ts +1 -0
- package/components/disclosure/index.d.ts +1 -0
- package/components/error-boundary/error-boundary.d.ts +31 -0
- package/components/error-boundary/index.d.ts +1 -0
- package/components/field/checkbox-input/checkbox-input.d.ts +6 -0
- package/components/field/checkbox-input/index.d.ts +1 -0
- package/components/field/create-field-controller.d.ts +23 -0
- package/components/field/date-picker/date-picker.d.ts +7 -0
- package/components/field/date-picker/date-picker.styles.d.ts +3 -0
- package/components/field/date-picker/index.d.ts +1 -0
- package/components/field/field.styles.d.ts +7 -0
- package/components/field/fields.d.ts +11 -0
- package/components/field/index.d.ts +1 -0
- package/components/field/input-group/index.d.ts +1 -0
- package/components/field/input-group/input-group.d.ts +13 -0
- package/components/field/input-group/input-group.styles.d.ts +2 -0
- package/components/field/money-input/hooks/index.d.ts +1 -0
- package/components/field/money-input/hooks/use-utils.d.ts +6 -0
- package/components/field/money-input/index.d.ts +1 -0
- package/components/field/money-input/money-input-styles.d.ts +2 -0
- package/components/field/money-input/money-input.d.ts +30 -0
- package/components/field/number-input/index.d.ts +1 -0
- package/components/field/number-input/number-input.d.ts +10 -0
- package/components/field/rate-card/cost-breakdown/cost-breakdown.d.ts +11 -0
- package/components/field/rate-card/cost-breakdown/cost-breakdown.styles.d.ts +6 -0
- package/components/field/rate-card/cost-breakdown/index.d.ts +1 -0
- package/components/field/rate-card/index.d.ts +1 -0
- package/components/field/rate-card/rate-card.d.ts +12 -0
- package/components/field/rate-card/rate-card.styles.d.ts +21 -0
- package/components/field/rate-select/index.d.ts +1 -0
- package/components/field/rate-select/rate-select.d.ts +11 -0
- package/components/field/rate-select/rate-select.styles.d.ts +3 -0
- package/components/field/select/index.d.ts +1 -0
- package/components/field/select/select.d.ts +20 -0
- package/components/field/submit-button/index.d.ts +1 -0
- package/components/field/submit-button/submit-button.d.ts +13 -0
- package/components/field/switch/index.d.ts +1 -0
- package/components/field/switch/switch.d.ts +9 -0
- package/components/field/text-area/index.d.ts +1 -0
- package/components/field/text-area/text-area.d.ts +3 -0
- package/components/field/text-input/index.d.ts +1 -0
- package/components/field/text-input/text-input.d.ts +3 -0
- package/components/field-label/field-label.d.ts +9 -0
- package/components/field-label/index.d.ts +1 -0
- package/components/index.d.ts +11 -4
- package/components/items-breakdown/index.d.ts +1 -0
- package/components/items-breakdown/items-breakdown.d.ts +14 -0
- package/components/items-breakdown/items-breakdown.styles.d.ts +3 -0
- package/components/loader/index.d.ts +1 -0
- package/components/loader/loader.d.ts +2 -0
- package/components/organisms/auto-funding-form/auto-funding-form.d.ts +15 -0
- package/components/organisms/auto-funding-form/auto-funding-schema.d.ts +53 -0
- package/components/organisms/auto-funding-form/index.d.ts +1 -0
- package/components/organisms/index.d.ts +2 -0
- package/components/organisms/manual-funding-form/index.d.ts +1 -0
- package/components/organisms/manual-funding-form/manual-funding-form.d.ts +14 -0
- package/components/organisms/manual-funding-form/manual-funding-schema.d.ts +27 -0
- package/components/portal/index.d.ts +1 -0
- package/components/portal/portal.d.ts +13 -0
- package/components/preset-descriptor/index.d.ts +1 -0
- package/components/preset-descriptor/preset-descriptor.d.ts +2 -0
- package/components/preset-descriptor/preset-descriptor.styles.d.ts +6 -0
- package/components/settings-card/index.d.ts +1 -0
- package/components/settings-card/settings-card.d.ts +11 -0
- package/components/settings-card/settings-card.styles.d.ts +6 -0
- package/components/spacer/index.d.ts +1 -0
- package/components/spacer/spacer.d.ts +6 -0
- package/components/templates/add-carriers/add-carriers.d.ts +5 -0
- package/components/templates/add-carriers/index.d.ts +1 -0
- package/components/templates/address-display/address-display.d.ts +9 -0
- package/components/templates/address-display/index.d.ts +1 -0
- package/components/templates/address-form/address-form.d.ts +18 -0
- package/components/templates/address-form/address-schema.d.ts +250 -0
- package/components/templates/address-form/index.d.ts +2 -0
- package/components/templates/address-parser/address-parser-schema.d.ts +10 -0
- package/components/templates/address-parser/address-parser.d.ts +13 -0
- package/components/templates/address-parser/index.d.ts +2 -0
- package/components/templates/address-preference-display/address-preference-display.d.ts +16 -0
- package/components/templates/address-preference-display/index.d.ts +1 -0
- package/components/templates/agreement-form/agreement-form-schema.d.ts +10 -0
- package/components/templates/agreement-form/agreement-form.d.ts +8 -0
- package/components/templates/agreement-form/agreement-form.styles.d.ts +1 -0
- package/components/templates/agreement-form/index.d.ts +1 -0
- package/components/templates/billing-form/billing-form-stories.d.ts +6 -0
- package/components/templates/billing-form/billing-form.d.ts +9 -0
- package/components/templates/billing-form/billing-schema.d.ts +76 -0
- package/components/templates/billing-form/index.d.ts +2 -0
- package/components/templates/customs-item-form/customs-item-form-schema.d.ts +80 -0
- package/components/templates/customs-item-form/customs-item-form.d.ts +14 -0
- package/components/templates/customs-item-form/index.d.ts +2 -0
- package/components/templates/customs-items-display/customs-items-display.d.ts +7 -0
- package/components/templates/customs-items-display/customs-items-display.styles.d.ts +6 -0
- package/components/templates/customs-items-display/index.d.ts +1 -0
- package/components/templates/funding-methods/funding-methods.d.ts +10 -0
- package/components/templates/funding-methods/index.d.ts +1 -0
- package/components/templates/index.d.ts +16 -0
- package/components/templates/label/index.d.ts +1 -0
- package/components/templates/label/label.d.ts +12 -0
- package/components/templates/manage-warehouses/index.d.ts +1 -0
- package/components/templates/manage-warehouses/manage-warehouses.d.ts +5 -0
- package/components/templates/rate-form/index.d.ts +1 -0
- package/components/templates/rate-form/rate-form.d.ts +21 -0
- package/components/templates/rate-form/rate-schema.d.ts +30 -0
- package/components/templates/register-wallet/index.d.ts +1 -0
- package/components/templates/register-wallet/register-wallet.d.ts +3 -0
- package/components/templates/register-wallet/register-wallet.styles.d.ts +6 -0
- package/components/templates/sales-order/sales-order.d.ts +8 -0
- package/components/templates/shipment/shipment.d.ts +17 -0
- package/components/templates/shipment-form/index.d.ts +1 -0
- package/components/templates/shipment-form/shipment-form.d.ts +51 -0
- package/components/templates/shipment-form/shipment-schema.d.ts +943 -0
- package/components/templates/void-label/void-label.d.ts +9 -0
- package/components/templates/warehouse-display/index.d.ts +1 -0
- package/components/templates/warehouse-display/warehouse-display.d.ts +6 -0
- package/constants/index.d.ts +1 -0
- package/constants/shipengine/address.d.ts +39 -0
- package/constants/shipengine/index.d.ts +1 -0
- package/elements/add-carriers.d.ts +1 -0
- package/elements/components/add-carriers/add-carriers.d.ts +8 -0
- package/elements/components/add-carriers/index.d.ts +1 -0
- package/{components → elements/components}/configure-shipment/configure-shipment.d.ts +5 -4
- package/{components → elements/components}/configure-shipment/hooks/use-address.d.ts +4 -2
- package/{components → elements/components}/configure-shipment/hooks/use-presets.d.ts +1 -1
- package/{components → elements/components}/configure-shipment/hooks/use-shipment-form.d.ts +6 -5
- package/elements/components/index.d.ts +8 -0
- package/elements/components/manage-funding/index.d.ts +1 -0
- package/elements/components/manage-funding/manage-funding.d.ts +2 -0
- package/elements/components/manage-warehouses/index.d.ts +1 -0
- package/elements/components/manage-warehouses/manage-warehouses.d.ts +2 -0
- package/elements/components/register-wallet/index.d.ts +1 -0
- package/elements/components/register-wallet/register-wallet.d.ts +9 -0
- package/elements/components/sales-order/index.d.ts +1 -0
- package/{components → elements/components}/sales-order/sales-order.d.ts +3 -2
- package/elements/components/shipment/index.d.ts +1 -0
- package/{components → elements/components}/shipment/shipment.d.ts +1 -1
- package/elements/components/void-label/index.d.ts +1 -0
- package/elements/index.d.ts +7 -0
- package/elements/manage-funding.d.ts +1 -0
- package/elements/manage-warehouses.d.ts +1 -0
- package/elements/register-wallet.d.ts +1 -0
- package/extensions/index.d.ts +1 -0
- package/extensions/zod.d.ts +18 -0
- package/factories/index.d.ts +2 -0
- package/factories/shipengine/address.d.ts +28 -0
- package/factories/shipengine/carrier.d.ts +10 -0
- package/factories/shipengine/index.d.ts +12 -0
- package/factories/shipengine/label.d.ts +10 -0
- package/factories/shipengine/money.d.ts +9 -0
- package/factories/shipengine/order-source.d.ts +11 -0
- package/factories/shipengine/package.d.ts +9 -0
- package/factories/shipengine/resource.d.ts +10 -0
- package/factories/shipengine/sales-order.d.ts +16 -0
- package/factories/shipengine/service.d.ts +9 -0
- package/factories/shipengine/shipment.d.ts +38 -0
- package/factories/shipengine/warehouse.d.ts +6 -0
- package/factories/shipengine/weight.d.ts +15 -0
- package/factories/utils.d.ts +3 -0
- package/hooks/index.d.ts +7 -0
- package/hooks/options/index.d.ts +12 -0
- package/hooks/options/use-confirmation-options.d.ts +5 -0
- package/hooks/options/use-country-code-options.d.ts +4 -0
- package/hooks/options/use-customs-contents-options.d.ts +5 -0
- package/hooks/options/use-customs-non-delivery-options.d.ts +5 -0
- package/hooks/options/use-expiration-month-options.d.ts +4 -0
- package/hooks/options/use-insurance-provider-options.d.ts +10 -0
- package/hooks/options/use-package-options.d.ts +3 -0
- package/hooks/options/use-rate-options.d.ts +21 -0
- package/hooks/options/use-service-code-options.d.ts +3 -0
- package/hooks/options/use-shipping-presets-options.d.ts +19 -0
- package/hooks/options/use-state-code-options.d.ts +4 -0
- package/hooks/options/use-warehouse-options.d.ts +5 -0
- package/hooks/use-carrier-metadata.d.ts +6 -0
- package/hooks/use-elements.d.ts +36 -0
- package/hooks/use-nested-form.d.ts +22 -0
- package/hooks/use-page-layout.d.ts +11 -0
- package/hooks/use-root-portal.d.ts +19 -0
- package/hooks/use-run-once-on-true.d.ts +7 -0
- package/index.cjs +24035 -14817
- package/index.d.ts +12 -3
- package/index.js +24343 -15279
- package/locales/en/index.d.ts +386 -0
- package/locales/index.d.ts +1 -0
- package/package.json +24 -5
- package/providers/giger-provider.d.ts +8 -0
- package/providers/index.d.ts +1 -0
- package/register.d.ts +19 -0
- package/schemas/index.d.ts +1 -0
- package/schemas/shipengine/address.d.ts +17 -0
- package/schemas/shipengine/index.d.ts +3 -0
- package/schemas/shipengine/money.d.ts +15 -0
- package/schemas/shipengine/phone.d.ts +10 -0
- package/testing/index.d.ts +2 -0
- package/testing/render.d.ts +1 -0
- package/testing/swr.d.ts +15 -0
- package/types/carrier-metadata.d.ts +7 -0
- package/types/index.d.ts +2 -0
- package/types/shipping-preset/index.d.ts +1 -0
- package/types/shipping-preset/shipping-preset.d.ts +17 -0
- package/utilities/create-dictionary.d.ts +4 -0
- package/utilities/date.d.ts +24 -0
- package/utilities/error.d.ts +4 -0
- package/utilities/form-logger.d.ts +16 -0
- package/utilities/index.d.ts +11 -0
- package/utilities/money.d.ts +4 -0
- package/utilities/predicates/index.d.ts +1 -0
- package/utilities/predicates/isString.d.ts +1 -0
- package/utilities/rates.d.ts +9 -0
- package/utilities/shipengine/address.d.ts +21 -0
- package/utilities/shipengine/carrier.d.ts +1 -0
- package/utilities/shipengine/dimensions.d.ts +10 -0
- package/utilities/shipengine/index.d.ts +7 -0
- package/utilities/shipengine/package.d.ts +4 -0
- package/utilities/shipengine/sales-order.d.ts +13 -0
- package/utilities/shipengine/shipment.d.ts +13 -0
- package/utilities/shipengine/weight.d.ts +13 -0
- package/utilities/string.d.ts +1 -0
- package/utilities/styles.d.ts +18 -0
- package/utilities/validation.d.ts +10 -0
- /package/components/{sales-order → templates/sales-order}/index.d.ts +0 -0
- /package/components/{shipment → templates/shipment}/index.d.ts +0 -0
- /package/components/{void-label → templates/void-label}/index.d.ts +0 -0
- /package/{components → elements/components}/configure-shipment/hooks/index.d.ts +0 -0
- /package/{components → elements/components}/configure-shipment/hooks/use-customs.d.ts +0 -0
- /package/{components → elements/components}/configure-shipment/hooks/use-rates-form.d.ts +0 -0
- /package/{components → elements/components}/configure-shipment/hooks/use-request-rates.d.ts +0 -0
- /package/{components → elements/components}/configure-shipment/index.d.ts +0 -0
- /package/{components → elements/components}/sales-order/hooks/index.d.ts +0 -0
- /package/{components → elements/components}/sales-order/hooks/use-configure-shipment.d.ts +0 -0
- /package/{components → elements/components}/sales-order/hooks/use-import-sales-order.d.ts +0 -0
- /package/{components → elements/components}/sales-order/hooks/use-pending-shipment.d.ts +0 -0
- /package/{components → elements/components}/void-label/void-label.d.ts +0 -0
- /package/{purchase-label.d.ts → elements/purchase-label.d.ts} +0 -0
- /package/{view-shipment.d.ts → elements/view-shipment.d.ts} +0 -0
- /package/{void-label.d.ts → elements/void-label.d.ts} +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as SE from "@shipengine/types";
|
|
2
|
+
/**
|
|
3
|
+
* @category Utilities
|
|
4
|
+
*/
|
|
5
|
+
export declare const isDomesticAddress: (address: Pick<SE.Address, "countryCode">) => boolean | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* @category Utilities
|
|
8
|
+
*/
|
|
9
|
+
export declare const isMilitaryAddress: (address: SE.Address) => boolean;
|
|
10
|
+
/**
|
|
11
|
+
* @category Utilities
|
|
12
|
+
*/
|
|
13
|
+
export declare const isUnitedStatesTerritory: (address: SE.Address) => boolean;
|
|
14
|
+
/**
|
|
15
|
+
* @category Utilities
|
|
16
|
+
*/
|
|
17
|
+
export declare const isPoBox: (addressLine: string) => boolean;
|
|
18
|
+
/**
|
|
19
|
+
* @category Utilities
|
|
20
|
+
*/
|
|
21
|
+
export declare const isPoBoxAddress: (address: SE.Address) => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isUspsCarrier: (carrierCode: string) => boolean;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as SE from "@shipengine/types";
|
|
2
|
+
type ConvertDimensionsOptions = {
|
|
3
|
+
allowAllZeroes?: boolean;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* @category Utilities
|
|
7
|
+
*/
|
|
8
|
+
export declare function convertDimensions(dimensions: SE.Dimensions): SE.DimensionsWithUnit;
|
|
9
|
+
export declare function convertDimensions(dimensions: SE.DimensionsWithUnit, options?: ConvertDimensionsOptions): SE.Dimensions;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as SE from "@shipengine/types";
|
|
2
|
+
/**
|
|
3
|
+
* @category Utilities
|
|
4
|
+
*/
|
|
5
|
+
export declare const getCustomsFromSalesOrder: (salesOrder: SE.SalesOrder, warehouse: SE.Warehouse) => SE.Customs;
|
|
6
|
+
/**
|
|
7
|
+
* @category Utilities
|
|
8
|
+
*/
|
|
9
|
+
export declare const getIsCustomsRequiredForSalesOrder: ({ shipTo }: SE.SalesOrder, { originAddress }: SE.Warehouse) => boolean;
|
|
10
|
+
/**
|
|
11
|
+
* @category Utilities
|
|
12
|
+
*/
|
|
13
|
+
export declare const getRequestedServices: (salesOrder: SE.SalesOrder | undefined) => string[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as SE from "@shipengine/types";
|
|
2
|
+
/**
|
|
3
|
+
* @category Utilities
|
|
4
|
+
*/
|
|
5
|
+
export declare const getIsInternationalShipment: ({ shipFrom, shipTo }: SE.SalesOrderShipment) => boolean;
|
|
6
|
+
/**
|
|
7
|
+
* @category Utilities
|
|
8
|
+
*/
|
|
9
|
+
export declare const getIsCustomsRequiredForShipment: ({ shipFrom, shipTo }: SE.SalesOrderShipment) => boolean;
|
|
10
|
+
/**
|
|
11
|
+
* @category Utilities
|
|
12
|
+
*/
|
|
13
|
+
export declare const getPendingShipment: (shipments?: SE.SalesOrderShipment[]) => SE.SalesOrderShipment | undefined;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as SE from "@shipengine/types";
|
|
2
|
+
/**
|
|
3
|
+
* @category Utilities
|
|
4
|
+
*/
|
|
5
|
+
export declare function convertWeight(weight: SE.WeightWithUnit): SE.FractionalWeight;
|
|
6
|
+
export declare function convertWeight(weight: SE.FractionalWeight): SE.WeightWithUnit;
|
|
7
|
+
/**
|
|
8
|
+
* @category Utilities
|
|
9
|
+
*/
|
|
10
|
+
export declare function formatFractionalWeight(weight: {
|
|
11
|
+
whole?: number | null;
|
|
12
|
+
fractional?: number | null;
|
|
13
|
+
} | undefined | null): SE.FractionalWeight;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const capitalizeFirstLetter: (str: string) => string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Interpolation } from "@emotion/serialize";
|
|
2
|
+
import { Theme } from "@packlink/brands";
|
|
3
|
+
/**
|
|
4
|
+
* Creates a Record of Emotion styles.
|
|
5
|
+
*
|
|
6
|
+
* Values may be any variant that a `css` prop can accept (a CSSObject, SerializedStyles, a FunctionInterpolation with theme, etc).
|
|
7
|
+
*
|
|
8
|
+
* Eliminates the need to explicitly type styles (while remaining fully typed w/ autocomplete).
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```
|
|
12
|
+
* const styles = createStyles({
|
|
13
|
+
* container: (theme) => ({ backgroundColor: theme.colors.primary }),
|
|
14
|
+
* icon: { color: 'red' },
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare const createStyles: <T extends string>(styles: Record<T, Interpolation<Theme>>) => Record<T, Interpolation<Theme>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { Resolver } from "@hookform/resolvers/zod";
|
|
3
|
+
/**
|
|
4
|
+
* @category Utilities
|
|
5
|
+
*/
|
|
6
|
+
export declare const errorMap: z.ZodErrorMap;
|
|
7
|
+
/**
|
|
8
|
+
* @category Utilities
|
|
9
|
+
*/
|
|
10
|
+
export declare const validationResolver: <T extends z.ZodType<any, any, any>>(schema: T) => ReturnType<Resolver>;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|