@shipengine/elements 2.13.1 → 2.15.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/actions-menu.js +5 -5
- package/components.js +1 -1
- package/elements.js +1 -1
- package/hooks.js +1 -1
- package/index.js +1 -1
- package/package.json +8 -5
- package/src/components/address-preference-context/address-preference-context.d.ts +1 -1
- package/src/components/drawer/drawer.styles.d.ts +1 -0
- package/src/components/enable-insurance-banner/enable-insurance-banner.d.ts +4 -3
- package/src/components/pager/usePager.d.ts +1 -0
- package/src/components/tabs/tabs.styles.d.ts +1 -0
- package/src/components/templates/address-form/address-fields.d.ts +1 -2
- package/src/components/templates/address-form/address-form.d.ts +1 -2
- package/src/components/templates/product-form/product-form.d.ts +3 -1
- package/src/components/templates/products-display/products-display.d.ts +4 -4
- package/src/components/templates/rate-form/rate-form.styles.d.ts +3 -0
- package/src/components/templates/register-funding-source-insurance-form/register-funding-source-insurance-form.d.ts +3 -1
- package/src/components/templates/shipment-form/sections/customs-forms/customs-forms.d.ts +3 -2
- package/src/components/templates/shipment-form/shipment-form.d.ts +5 -2
- package/src/components/templates/theme-creator/theme-creator.d.ts +1 -0
- package/src/components/templates/theme-creator/theme-creator.styles.d.ts +40 -2
- package/src/components/templates/wallet-form/edit-wallet-address-form.d.ts +1 -1
- package/src/components/templates/wallet-form/wallet-schema.d.ts +1 -1
- package/src/components/vat-form/vat-form-schema.d.ts +21 -3
- package/src/components/vat-form/vat-form.d.ts +7 -2
- package/src/components/vat-form/vat-form.styles.d.ts +3 -0
- package/src/components/vat-form/vat-types.d.ts +6 -0
- package/src/components/warehouse-form/warehouse-form-schema.d.ts +6 -0
- package/src/components/warehouse-form/warehouse-form.d.ts +3 -1
- package/src/elements/labels-grid/hooks/use-labels-grid.d.ts +1 -0
- package/src/elements/labels-grid/labels-grid.d.ts +44 -17
- package/src/elements/manage-carriers/manage-carriers.d.ts +11 -3
- package/src/elements/manage-external-carriers/manage-external-carriers.d.ts +11 -3
- package/src/elements/manage-funding/manage-funding-element.d.ts +11 -3
- package/src/elements/manage-warehouses/manage-warehouses.d.ts +11 -3
- package/src/elements/payment-method-settings/payment-method-settings-element.d.ts +11 -3
- package/src/elements/purchase-label/configure-shipment.d.ts +3 -2
- package/src/elements/purchase-label/hooks/index.d.ts +0 -2
- package/src/elements/purchase-label/hooks/use-shipment-form.d.ts +2 -1
- package/src/elements/purchase-label/purchase-label.d.ts +33 -40
- package/src/elements/select-label-layout/select-label-layout-element.d.ts +11 -3
- package/src/elements/shipment-summary/shipment-summary.d.ts +14 -7
- package/src/elements/shipments-grid/hooks/use-shipments-grid.d.ts +1 -0
- package/src/elements/shipments-grid/shipments-grid.d.ts +11 -6
- package/src/elements/theme-creator/theme-creator.d.ts +11 -3
- package/src/elements/transaction-history/transaction-history-element.d.ts +11 -3
- package/src/elements/unit-settings/unit-settings-element.d.ts +11 -3
- package/src/elements/vat-settings/vat-settings-element.d.ts +11 -3
- package/src/elements/void-label/void-label.d.ts +41 -47
- package/src/elements-provider/elements-provider.d.ts +1 -2
- package/src/features/manage-carriers/manage-insurance-provider-row/manage-insurance-provider-row.d.ts +2 -1
- package/src/features/vat-settings/use-vat-settings.d.ts +1 -1
- package/src/features/vat-settings/vat-settings.d.ts +1 -4
- package/src/features/vat-settings/vat-settings.styles.d.ts +7 -0
- package/src/hooks/index.d.ts +2 -0
- package/src/hooks/insurance/use-manage-funding-source-insurance.d.ts +3 -2
- package/src/hooks/options/use-country-code-options.d.ts +1 -1
- package/src/hooks/options/use-state-code-options.d.ts +2 -2
- package/src/{elements/purchase-label/hooks → hooks}/use-configure-shipment.d.ts +5 -10
- package/src/hooks/use-helpers.stories.d.ts +3 -0
- package/src/hooks/use-nested-form.d.ts +6 -2
- package/src/locales/en/index.d.ts +11 -3
- package/src/themes/auctane.d.ts +3 -0
- package/src/themes/index.d.ts +1 -0
- package/src/types/harmonized-tariff-code.d.ts +10 -0
- package/src/types/index.d.ts +4 -3
- package/src/workflows/account-settings/account-settings.d.ts +11 -3
- package/src/workflows/carrier-services/carrier-services.d.ts +11 -26
- package/src/workflows/connect-external-carrier/connect-external-carrier.d.ts +11 -3
- package/src/workflows/label-workflow/label-workflow.d.ts +1126 -101
- package/src/workflows/onboarding/components/ship-from-address-step/ship-from-address-step.d.ts +1 -1
- package/src/workflows/onboarding/onboarding.d.ts +12 -4
- package/transaction-history-element.js +1 -1
- package/use-configure-shipment.js +1 -0
- package/use-toggle.js +1 -1
- package/use-unit-settings.js +1 -1
- package/usePager.js +1 -1
- package/utilities.js +1 -1
- package/vat.js +1 -1
- package/wallet-form.js +1 -1
- package/warehouses.js +1 -0
- package/workflows.js +1 -1
- package/shipment.js +0 -1
- package/src/elements/theme-creator/themeData/index.d.ts +0 -1
- package/src/elements/theme-creator/themeData/themeData.d.ts +0 -2
- package/use-scrub-errors.js +0 -1
- /package/src/{elements/purchase-label/hooks → hooks}/use-import-sales-order.d.ts +0 -0
package/components.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{y as Actions,x as ActionsMenu,A as AddFundsForm,a as AutoFundingForm,B as ButtonGroup,C as CarrierBalance,c as CarrierConnectionCard,d as CarrierIcon,e as CarrierLogo,f as CollapsiblePanel,h as CopyButton,i as Cube,D as DateRangeCombo,j as DateRangeSelect,k as DisplayTerm,E as EditBillingForm,l as ErrorFallback,F as FieldLabel,m as FormPortal,n as FundAndPurchase,H as HistoryCard,o as HistoryCardExtension,I as InlineLabel,p as ItemsBreakdown,L as LinkAction,q as Loader,P as PoweredByShipEngine,R as RateDetails,S as Section,r as SettingsCard,z as ShipFromAddressForm,t as SkeletonCarrierRow,u as Spacer,v as Spread,T as Tabs,V as VatForm,W as WalletCard,w as WarehouseForm,b as autoFundingSchema,g as getAddFundsSchema,s as styles}from"./actions-menu.js";export{C as CellFormattedDate,D as Drawer,E as ErrorState,G as GridController,b as GridFilters,a as GridFooter,u as usePager}from"./usePager.js";export{f as Field,P as Pager,S as StoryNotes,a as SuspendText}from"./suspend-text.js";export{P as Portal}from"./use-toggle.js";import"./carrier.js";import"date-fns/format";import"date-fns/locale";import"date-fns/parse";import"lodash/get";import"humps";import"@shipengine/react-api";import"lodash/isEqual";import"lodash/isNil";import"lodash/omit";import"lodash/omitBy";import"./address.js";import"@emotion/react/jsx-runtime";import"date-fns/isToday";import"@shipengine/giger";import"react";import"react
|
|
1
|
+
export{y as Actions,x as ActionsMenu,A as AddFundsForm,a as AutoFundingForm,B as ButtonGroup,C as CarrierBalance,c as CarrierConnectionCard,d as CarrierIcon,e as CarrierLogo,f as CollapsiblePanel,h as CopyButton,i as Cube,D as DateRangeCombo,j as DateRangeSelect,k as DisplayTerm,E as EditBillingForm,l as ErrorFallback,F as FieldLabel,m as FormPortal,n as FundAndPurchase,H as HistoryCard,o as HistoryCardExtension,I as InlineLabel,p as ItemsBreakdown,L as LinkAction,q as Loader,P as PoweredByShipEngine,R as RateDetails,S as Section,r as SettingsCard,z as ShipFromAddressForm,t as SkeletonCarrierRow,u as Spacer,v as Spread,T as Tabs,V as VatForm,W as WalletCard,w as WarehouseForm,b as autoFundingSchema,g as getAddFundsSchema,s as styles}from"./actions-menu.js";export{C as CellFormattedDate,D as Drawer,E as ErrorState,G as GridController,b as GridFilters,a as GridFooter,u as usePager}from"./usePager.js";export{f as Field,P as Pager,S as StoryNotes,a as SuspendText}from"./suspend-text.js";export{P as Portal}from"./use-toggle.js";import"./carrier.js";import"date-fns/format";import"date-fns/locale";import"date-fns/parse";import"lodash/get";import"humps";import"@shipengine/react-api";import"lodash/isEqual";import"lodash/isNil";import"lodash/omit";import"lodash/omitBy";import"./address.js";import"@emotion/react/jsx-runtime";import"date-fns/isToday";import"@shipengine/giger";import"@emotion/react";import"react";import"./validation.js";import"@hookform/resolvers/zod";import"zod";import"react-i18next";import"@shipengine/giger-theme";import"react-hook-form";import"./money.js";import"copy-to-clipboard";import"js-base64";import"libphonenumber-js/min";import"card-validator";import"./zod.js";import"react-use";import"date-fns/subDays";import"react-dom";
|
package/elements.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{l as LabelsGrid,m as ManageCarriers,b as ManageExternalCarriers,
|
|
1
|
+
export{l as LabelsGrid,m as ManageCarriers,b as ManageExternalCarriers,f as ManageFunding,a as ManageWarehouses,h as PaymentMethodSettings,p as PurchaseLabel,g as SelectLabelLayout,d as ShipmentSummary,s as ShipmentsGrid,c as ThemeCreator,T as ThemeCreatorProvider,i as TransactionHistory,e as UnitSettings,u as useThemeCreator}from"./transaction-history-element.js";export{a as CarrierServices,v as VoidLabel}from"./use-unit-settings.js";import"@emotion/react/jsx-runtime";import"./actions-menu.js";import"./carrier.js";import"date-fns/format";import"date-fns/locale";import"date-fns/parse";import"lodash/get";import"humps";import"@shipengine/react-api";import"lodash/isEqual";import"lodash/isNil";import"lodash/omit";import"lodash/omitBy";import"./address.js";import"date-fns/isToday";import"@shipengine/giger";import"./use-toggle.js";import"react";import"react-dom";import"@emotion/react";import"./validation.js";import"@hookform/resolvers/zod";import"zod";import"react-i18next";import"@shipengine/giger-theme";import"react-hook-form";import"./money.js";import"copy-to-clipboard";import"js-base64";import"libphonenumber-js/min";import"card-validator";import"./zod.js";import"./use-configure-shipment.js";import"./warehouses.js";import"./canada-ddp.js";import"lodash/orderBy";import"@tanstack/react-query";import"./use-get-service-name.js";import"./usePager.js";import"react-use";import"date-fns/subDays";import"date-fns/formatISO";import"date-fns/isSameDay";import"date-fns/isWithinInterval";import"date-fns/setHours";import"date-fns/setMinutes";import"./vat.js";import"axios";import"lodash/merge";import"lodash/mergeWith";import"@shipengine/js-api";import"@rjsf/core";import"@rjsf/validator-ajv8";import"lodash/camelCase";import"use-debounce";import"classnames";import"i18next";import"i18next-browser-languagedetector";import"@emotion/cache";import"stylis";
|
package/hooks.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{R as RootPortalProvider,c as useAddressValidation,u as useCountryCodeOptions,d as useNestedForm,e as useRootPortal,b as useStateCodeOptions,f as useToggle}from"./use-toggle.js";export{P as PudoType,p as useBlackboxDetection,u as useConfirmationOptions,a as useCustomsContentsOptions,b as useCustomsNonDeliveryOptions,c as useDateRangeOptions,n as useGetFundingSourceInsuranceProvider,d as useInsuranceProviderOptions,o as useManageFundingSourceInsurance,e as useMovementIndicatorOptions,f as usePackageOptions,g as useRateOptions,q as useScrubErrors,h as useServiceCodeOptions,l as useServicePoints,k as useShipFromAddressOptions,i as useShipmentMetadata,j as useShippingPresetsOptions,m as useWindsorFramework}from"./use-
|
|
1
|
+
export{R as RootPortalProvider,c as useAddressValidation,u as useCountryCodeOptions,d as useNestedForm,e as useRootPortal,b as useStateCodeOptions,f as useToggle}from"./use-toggle.js";export{P as PudoType,p as useBlackboxDetection,r as useConfigureShipment,u as useConfirmationOptions,a as useCustomsContentsOptions,b as useCustomsNonDeliveryOptions,c as useDateRangeOptions,n as useGetFundingSourceInsuranceProvider,s as useImportSalesOrder,d as useInsuranceProviderOptions,o as useManageFundingSourceInsurance,e as useMovementIndicatorOptions,f as usePackageOptions,g as useRateOptions,q as useScrubErrors,h as useServiceCodeOptions,l as useServicePoints,k as useShipFromAddressOptions,i as useShipmentMetadata,j as useShippingPresetsOptions,m as useWindsorFramework}from"./use-configure-shipment.js";export{u as useGetServiceName}from"./use-get-service-name.js";export{P as PageLayoutProvider,u as useExpirationMonthOptions,a as useHelpers,b as usePageLayout}from"./use-page-layout.js";export{u as useRunOnceOnTrue}from"./use-run-once-on-true.js";import"@emotion/react/jsx-runtime";import"react";import"./carrier.js";import"date-fns/format";import"date-fns/locale";import"date-fns/parse";import"lodash/get";import"humps";import"@shipengine/react-api";import"lodash/isEqual";import"lodash/isNil";import"lodash/omit";import"lodash/omitBy";import"./address.js";import"react-dom";import"react-i18next";import"./warehouses.js";import"./canada-ddp.js";import"lodash/orderBy";import"@shipengine/giger";import"@emotion/react";import"js-base64";import"@tanstack/react-query";import"./checks.js";import"jwt-decode";
|
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ShipEngine as _}from"@shipengine/react-api";export*from"@shipengine/react-api";export{y as Actions,x as ActionsMenu,A as AddFundsForm,a as AutoFundingForm,B as ButtonGroup,C as CarrierBalance,c as CarrierConnectionCard,d as CarrierIcon,e as CarrierLogo,f as CollapsiblePanel,h as CopyButton,i as Cube,D as DateRangeCombo,j as DateRangeSelect,k as DisplayTerm,E as EditBillingForm,l as ErrorFallback,F as FieldLabel,m as FormPortal,n as FundAndPurchase,H as HistoryCard,o as HistoryCardExtension,I as InlineLabel,p as ItemsBreakdown,L as LinkAction,q as Loader,P as PoweredByShipEngine,R as RateDetails,S as Section,r as SettingsCard,z as ShipFromAddressForm,t as SkeletonCarrierRow,u as Spacer,v as Spread,T as Tabs,V as VatForm,W as WalletCard,w as WarehouseForm,b as autoFundingSchema,g as getAddFundsSchema,s as styles}from"./actions-menu.js";export{C as CellFormattedDate,D as Drawer,E as ErrorState,G as GridController,b as GridFilters,a as GridFooter,u as usePager}from"./usePager.js";export{f as Field,P as Pager,S as StoryNotes,a as SuspendText}from"./suspend-text.js";import{E as ee,R as ae,a as te}from"./use-toggle.js";export{a as ElementsContext,E as ElementsContextProvider,P as Portal,R as RootPortalProvider,c as useAddressValidation,u as useCountryCodeOptions,g as useElements,d as useNestedForm,e as useRootPortal,b as useStateCodeOptions,f as useToggle}from"./use-toggle.js";export{C as Country,U as UsState,d as UsaCity,c as countries,a as countryCodes,e as euCountryCodes,p as postalCodeRegex,f as usCities,b as usStateCodes,u as usStates}from"./address.js";export{a as CarrierServices,b as ConnectExternalCarrier,p as PurchaseLabel,s as ShipmentSummary,v as VoidLabel,c as createElement}from"./use-unit-settings.js";export{l as LabelsGrid,m as ManageCarriers,b as ManageExternalCarriers,d as ManageFunding,a as ManageWarehouses,p as PaymentMethodSettings,e as SelectLabelLayout,s as ShipmentsGrid,t as ThemeCreator,T as ThemeCreatorProvider,f as TransactionHistory,c as UnitSettings,u as useThemeCreator}from"./transaction-history-element.js";export{e as extendZod}from"./zod.js";export{P as PudoType,p as useBlackboxDetection,u as useConfirmationOptions,a as useCustomsContentsOptions,b as useCustomsNonDeliveryOptions,c as useDateRangeOptions,n as useGetFundingSourceInsuranceProvider,d as useInsuranceProviderOptions,o as useManageFundingSourceInsurance,e as useMovementIndicatorOptions,f as usePackageOptions,g as useRateOptions,q as useScrubErrors,h as useServiceCodeOptions,l as useServicePoints,k as useShipFromAddressOptions,i as useShipmentMetadata,j as useShippingPresetsOptions,m as useWindsorFramework}from"./use-scrub-errors.js";export{P as PageLayoutProvider,u as useExpirationMonthOptions,a as useHelpers,b as usePageLayout}from"./use-page-layout.js";export{u as useGetServiceName}from"./use-get-service-name.js";export{u as useRunOnceOnTrue}from"./use-run-once-on-true.js";export{m as moneySchema}from"./money.js";export{p as phoneSchema,a as phoneSchemaUnvalidated}from"./phone.js";export{C as CanadaDeliveredDutyOptions}from"./canada-ddp.js";export{a as assert,r as raise}from"./assertions.js";export{g as getSellerIdFromToken,i as isOnboarded}from"./checks.js";export{b as convertDimensions,c as createDictionary,f as formatDimensions,h as getCancelledShipment,d as getIsCustomsRequiredForShipment,g as getIsInternationalShipment,e as getPendingShipment,j as getShipmentByStatus,a as isCollectionService,i as isPudoEligibleRate,m as moveCustomsItemsToProducts}from"./shipment.js";import{_ as re,g as oe,d as se}from"./carrier.js";export{P as addEmailToValidation,x as addSpaceBetweenWords,A as calculateTotal,t as capitalizeFirstLetter,u as capitalizeFirstLetterOfEachWord,y as currencySymbol,i as daysAfter,d as deepMergeFeatures,q as featureFlagComponentNameLookup,a0 as filterFundingSourceCarriers,a as findDateLocale,b as formatByDateAndLocale,B as formatCreditCardNumber,f as formatDate,c as formatDateDDMMYY,e as formatDateDDMMYYYY,C as formatExpiration,z as formatMoney,X as getCarrierIdByCarrierCode,D as getCurrencyFromString,E as getCurrencySymbolFromString,g as getDefaultFeatures,Q as getDefaultShipFromAddress,j as getExpirationYears,S as getIsShipmentUsingSavedShipFromAddress,Y as getLogoOrIconByCarrierCode,F as getRateRequiresAcknowledgement,l as getRelativeDates,R as getSavedShipFromAddressId,G as getTotalRateAmount,h as getlocaleDateStringFormat,I as isDomesticAddress,O as isEmptyAddress,W as isEvriCarrier,Z as isGlobalPostEligible,J as isMilitaryAddress,k as isNowOrInTheFuture,r as isObject,M as isPoBox,N as isPoBoxAddress,$ as isSendleEligible,K as isUnitedStatesTerritory,L as isUnsupportedByUps,U as isUpsCarrier,T as isUspsCarrier,V as isYodelCarrier,m as mostRecent,n as nextDayCutoff,o as omitTime,H as overrideCarrierCodes,p as parseLocaleDate,v as pascalize,w as replaceSpacesWithDashes,s as sortByCreationDate}from"./carrier.js";export{N as NO_VAT_COUNTRIES,k as convertDecimalWeightToFractionalWeight,j as convertFractionalWeightToDecimalWeight,h as convertPoundsAndOuncesToOunces,l as convertWeight,c as createCodedErrors,m as formatFractionalWeight,u as formatTrackingNumber,g as getCustomsFromSalesOrder,o as getDefaultWarehouse,q as getInsuranceProviderWithFriendlyName,b as getIsCustomsRequiredForSalesOrder,r as getIsInsuraceProviderAccepted,v as getIsVatRequired,d as getRequestedServices,e as getSalesOrderItemsFromSalesOrderOrShipment,p as getWarehouseById,f as isDecimalWeight,n as isFlatRatePackageCode,i as isMetricWeightUnit,a as throwAny,t as throwJoinedMessages,s as trackingStatusFormatter}from"./vat.js";export{a as aggregateRateDetailItems,c as calculateRateDetailBreakdown,b as createStyles,e as errorMap,f as formLogger,i as isString,s as scopeTheme,v as validationResolver}from"./validation.js";export{a as AccountSettings,l as LabelWorkflow,o as Onboarding}from"./wallet-form.js";import{jsx as ie}from"@emotion/react/jsx-runtime";import{useCallback as ne,useMemo as de}from"react";import{THEME_ID as le,GigerProvider as pe,GigerTestProvider as ce}from"@shipengine/giger";import{Theme as me}from"@shipengine/giger-theme";import ge from"axios";import"date-fns/isToday";import"react-hook-form";import"react-i18next";import"@emotion/react";import"lodash/isEqual";import"zod";import"copy-to-clipboard";import"js-base64";import"libphonenumber-js/min";import"lodash/omit";import"card-validator";import"react-use";import"date-fns/subDays";import"react-dom";import"lodash/merge";import"@tanstack/react-query";import"lodash/mergeWith";import"humps";import"@shipengine/js-api";import"@rjsf/core";import"@rjsf/validator-ajv8";import"lodash/camelCase";import"use-debounce";import"classnames";import"i18next";import"i18next-browser-languagedetector";import"@emotion/cache";import"stylis";import"date-fns/formatISO";import"date-fns/isSameDay";import"date-fns/isWithinInterval";import"date-fns/setHours";import"date-fns/setMinutes";import"lodash/orderBy";import"jwt-decode";import"date-fns/format";import"date-fns/locale";import"date-fns/parse";import"lodash/get";import"lodash/isNil";import"lodash/omitBy";import"@hookform/resolvers/zod";var ue={fallback:{borderRadius:{L:"16px",M:"8px",S:"4px",XL:"32px",XS:"2px"},breakPoints:{desktop:1280,mobileLarge:480,tablet:768,tabletLarge:960},card:{borderRadius:{desktop:"8px",mobile:"4px",tablet:"8px"}},components:{Button:{borderRadius:"4px"},Checkbox:{borderRadius:"2px",square:!1},Chip:{backgroundColor:"#f4f4f4",border:"none",borderRadius:"16px",color:"#706f6f",fontWeight:600,isSelected:{backgroundColor:"#EDEDED",border:"none",color:"#7A7A7A"},padding:"4px 16px"},Dialog:{action:{justifyContent:"center"},content:{padding:24,textAlign:"center"},dialog:{backgroundColor:"rgba(0, 0, 0, 0.26)",borderRadius:"4px"},header:{borderBottom:"2px solid #d3d3d3",padding:24,titleColor:"#616161"}},Field:{color:"#373737",fontWeight:700,placeholder:{fontWeight:700}},FieldContainer:{borderRadius:"4px"},Link:{activeColor:"#787878",defaultColor:"#616161",hoverColor:"#303030",isDark:{activeColor:"#787878",defaultColor:"#fff",hoverColor:"#fff",visitedColor:"#fff"},visitedColor:"#303030"},Table:{border:"none",borderRadius:"4px",boxShadow:"0 0 12px rgba(0, 0, 0, 0.1)"},Typography:{body1:{fontSize:"16px",fontWeight:400,letterSpacing:0,lineHeight:"24px"},body2:{fontSize:"14px",fontWeight:400,letterSpacing:3,lineHeight:"20px"},heading1:{fontSize:"48px",fontWeight:700,letterSpacing:0,lineHeight:"72px"},heading2:{fontSize:"32px",fontWeight:700,letterSpacing:1,lineHeight:"48px"},heading3:{fontSize:"24px",fontWeight:700,letterSpacing:3,lineHeight:"48px"},heading4:{fontSize:"20px",fontWeight:700,letterSpacing:3,lineHeight:"32px"},heading5:{fontSize:"18px",fontWeight:700,letterSpacing:3,lineHeight:"28px"},heading6:{fontSize:"16px",fontWeight:700,letterSpacing:3,lineHeight:"24px"},small:{fontSize:"12px",fontWeight:400,letterSpacing:5,lineHeight:"20px"},subtitle1:{fontSize:"16px",fontWeight:600,letterSpacing:3,lineHeight:"24px"},subtitle2:{fontSize:"14px",fontWeight:600,letterSpacing:5,lineHeight:"20px"}}},defaultFontFamily:"Arial",elevations:{above:{boxShadow:"0 0 12px rgba(0, 0, 0, 0.1)",zIndex:1e3},backdrop:{boxShadow:"none",zIndex:1007},flat1:{boxShadow:"0 2px 2px rgba(0, 0, 0, 0.1)",zIndex:1},flat2:{boxShadow:"0 2px 2px rgba(0, 0, 0, 0.1)",zIndex:1e3},overlay1:{boxShadow:"0 0 24px rgba(0, 0, 0, 0.1)",zIndex:1006},overlay2:{boxShadow:"0 0 24px rgba(0, 0, 0, 0.1)",zIndex:1008},popout1:{boxShadow:"0 4px 16px rgba(0, 0, 0, 0.1)",zIndex:1004},popout2:{boxShadow:"0 4px 16px rgba(0, 0, 0, 0.1)",zIndex:1005},raised:{boxShadow:"0 8px 8px rgba(0, 0, 0, 0.1)",zIndex:1002},raisedInverted1:{boxShadow:"0 -8px 8px rgba(0, 0, 0, 0.1)",zIndex:1002},raisedInverted2:{boxShadow:"0 -8px 8px rgba(0, 0, 0, 0.1)",zIndex:1003},sticky:{boxShadow:"none",zIndex:1001}},fontFaces:[],grid:{desktop:{columns:12,gutter:24,horizontalSpace:16,verticalSpace:24},desktopLarge:{columns:12,gutter:24,horizontalSpace:16,verticalSpace:24},mobile:{columns:4,gutter:16,horizontalSpace:16,verticalSpace:16},mobileLarge:{columns:4,gutter:16,horizontalSpace:16,verticalSpace:16},tablet:{columns:12,gutter:24,horizontalSpace:16,verticalSpace:24},tabletLarge:{columns:12,gutter:24,horizontalSpace:16,verticalSpace:24}},iconSize:{extra_large:"48px",large:"32px",medium:"20px",regular:"24px",small:"16px"},palette:{alert:{light:"#ffe7ca",main:"#725200"},black:"#000",dataVisualization:{highContrast:{blue:"#3970C1",blueDark:"#002039",coral:"#F95D6A",cyan:"#45CEE0",green:"#B3D849",orange:"#FFA600",orangeDark:"#FF7C43",pink:"#D12771",purple:"#A05195",purpleDark:"#665191"},lowContrast:{blue:"#96B3DE",blueDark:"#5283AB",coral:"#FCA6AD",cyan:"#BAE6FF",green:"#DEF895",orange:"#FDDFA5",orangeDark:"#FCC2A9",pink:"#E995BA",purple:"#D4BBFF",purpleDark:"#B1A2D0"}},error:{light:"#fee5e4",main:"#a72514"},gray:{dark:"#373737",light:"#d3d3d3",main:"#706f6f",megaLight:"#f4f4f4",ultraLight:"#f4f4f4"},info:{light:"#dbedfd",main:"#195f7f"},primary:{dark:"#626262",light:"#D6D6D6",main:"#7A7A7A",ultraLight:"#EDEDED"},secondary:{dark:"#303030",light:"#787878",main:"#616161",ultraLight:"#F4F4F4"},success:{light:"#dcfddb",main:"#286327"},white:"#fff"},spacingBase:8,typography:{fontSize:{L:"18px",M:"16px",S:"14px",XL:"20px",XS:"12px",XXL:"24px",XXS:"10px",XXXL:"32px",XXXXL:"48px"},fontWeight:{bold:700,light:200,normal:400,semibold:600},letterSpacing:{L:3,M:1,S:0,XL:5,XXL:8,XXXL:12},lineHeight:{L:"28px",M:"24px",S:"20px",XL:"32px",XXL:"48px",XXXL:"72px"}}}};const he=({baseURL:e="https://elements.shipengine.com",cdnURL:a="https://cdn.packlink.com",children:t,container:r,features:o,getToken:s,headers:i,locale:n,onApiError:d,onError:l=(()=>{}),scope:p="lmnt",themeConfig:c,defaultQueryClientOptions:m,emotionCacheShadowRootContainer:g,emotionCacheShadowRootContainerWrapper:u})=>{const h=(({cdnURL:e})=>ne((a=>re(void 0,void 0,void 0,(function*(){return(yield ge.get(`/brand/fallback/icons/${a.toLowerCase()}.svg`,{baseURL:e,responseType:"text"})).data}))),[e]))({cdnURL:a}),f=de((()=>{var e;const a=new me(null!==(e=c&&le in c?c[le]:c)&&void 0!==e?e:ue.fallback);return c&&le in c?{[le]:a}:a}),[c]),x={baseURL:e,cdnURL:a,container:r,emotionCacheShadowRootContainer:g,features:o,getToken:s,locale:n,onError:l,scope:p,theme:f};return ie(ee,Object.assign({},x,{children:ie(pe,Object.assign({cdnUrl:a,emotionCacheShadowRootContainer:g,reference:u||p||void 0,resolveIcon:h,theme:f},{children:ie(_,Object.assign({baseURL:e,defaultQueryClientOptions:m,getToken:s,headers:i,onApiError:d},{children:ie(ae,Object.assign({emotionCacheShadowRootContainer:g},{children:t}))}))}))}))},fe=({baseURL:e,children:a,features:t})=>{const r=de((()=>new me),[]),o=oe(["globalFeatures"]),s=ne((()=>"none"),[]),i={baseURL:e,cdnURL:"mockCdnUrl",getFeatures:e=>{var a;return se(null!==(a=oe([e]))&&void 0!==a?a:{},null==t?void 0:t[e])},getToken:s,globalFeatures:Object.assign(Object.assign({enabledExternalCarriers:["apc","asendia","better_trucks","canpar","chronopost","couriers_please","courierpost","dpd","hermes_germany","intelliquick_delivery","lso","ontrac","seko","ups","yodel"]},o),t.globalFeatures),onError:()=>{},scope:"lmnt",theme:r};return ie(te.Provider,Object.assign({value:i},{children:ie(ce,Object.assign({theme:r},{children:ie(_,Object.assign({baseURL:e,getToken:s},{children:a}))}))}))};export{he as ElementsProvider,fe as ElementsTestProvider};
|
|
1
|
+
import{ShipEngine as _}from"@shipengine/react-api";export*from"@shipengine/react-api";export{y as Actions,x as ActionsMenu,A as AddFundsForm,a as AutoFundingForm,B as ButtonGroup,C as CarrierBalance,c as CarrierConnectionCard,d as CarrierIcon,e as CarrierLogo,f as CollapsiblePanel,h as CopyButton,i as Cube,D as DateRangeCombo,j as DateRangeSelect,k as DisplayTerm,E as EditBillingForm,l as ErrorFallback,F as FieldLabel,m as FormPortal,n as FundAndPurchase,H as HistoryCard,o as HistoryCardExtension,I as InlineLabel,p as ItemsBreakdown,L as LinkAction,q as Loader,P as PoweredByShipEngine,R as RateDetails,S as Section,r as SettingsCard,z as ShipFromAddressForm,t as SkeletonCarrierRow,u as Spacer,v as Spread,T as Tabs,V as VatForm,W as WalletCard,w as WarehouseForm,b as autoFundingSchema,g as getAddFundsSchema,s as styles}from"./actions-menu.js";export{C as CellFormattedDate,D as Drawer,E as ErrorState,G as GridController,b as GridFilters,a as GridFooter,u as usePager}from"./usePager.js";export{f as Field,P as Pager,S as StoryNotes,a as SuspendText}from"./suspend-text.js";import{E as ee,R as ae,a as se}from"./use-toggle.js";export{a as ElementsContext,E as ElementsContextProvider,P as Portal,R as RootPortalProvider,c as useAddressValidation,u as useCountryCodeOptions,g as useElements,d as useNestedForm,e as useRootPortal,b as useStateCodeOptions,f as useToggle}from"./use-toggle.js";export{C as Country,U as UsState,d as UsaCity,c as countries,a as countryCodes,e as euCountryCodes,p as postalCodeRegex,f as usCities,b as usStateCodes,u as usStates}from"./address.js";export{a as CarrierServices,b as ConnectExternalCarrier,v as VoidLabel,c as createElement}from"./use-unit-settings.js";import{t as re}from"./transaction-history-element.js";export{l as LabelsGrid,m as ManageCarriers,b as ManageExternalCarriers,f as ManageFunding,a as ManageWarehouses,h as PaymentMethodSettings,p as PurchaseLabel,g as SelectLabelLayout,d as ShipmentSummary,s as ShipmentsGrid,c as ThemeCreator,T as ThemeCreatorProvider,i as TransactionHistory,e as UnitSettings,u as useThemeCreator}from"./transaction-history-element.js";export{e as extendZod}from"./zod.js";export{P as PudoType,p as useBlackboxDetection,r as useConfigureShipment,u as useConfirmationOptions,a as useCustomsContentsOptions,b as useCustomsNonDeliveryOptions,c as useDateRangeOptions,n as useGetFundingSourceInsuranceProvider,s as useImportSalesOrder,d as useInsuranceProviderOptions,o as useManageFundingSourceInsurance,e as useMovementIndicatorOptions,f as usePackageOptions,g as useRateOptions,q as useScrubErrors,h as useServiceCodeOptions,l as useServicePoints,k as useShipFromAddressOptions,i as useShipmentMetadata,j as useShippingPresetsOptions,m as useWindsorFramework}from"./use-configure-shipment.js";export{P as PageLayoutProvider,u as useExpirationMonthOptions,a as useHelpers,b as usePageLayout}from"./use-page-layout.js";export{u as useGetServiceName}from"./use-get-service-name.js";export{u as useRunOnceOnTrue}from"./use-run-once-on-true.js";export{m as moneySchema}from"./money.js";export{p as phoneSchema,a as phoneSchemaUnvalidated}from"./phone.js";export{C as CanadaDeliveredDutyOptions}from"./canada-ddp.js";export{a as assert,r as raise}from"./assertions.js";export{g as getSellerIdFromToken,i as isOnboarded}from"./checks.js";export{b as convertDimensions,c as createDictionary,f as formatDimensions,m as getCancelledShipment,g as getCustomsFromSalesOrder,p as getDefaultWarehouse,d as getIsCustomsRequiredForSalesOrder,k as getIsCustomsRequiredForShipment,j as getIsInternationalShipment,l as getPendingShipment,e as getRequestedServices,h as getSalesOrderItemsFromSalesOrderOrShipment,n as getShipmentByStatus,q as getWarehouseById,a as isCollectionService,i as isPudoEligibleRate,o as moveCustomsItemsToProducts}from"./warehouses.js";import{_ as te,g as oe,d as ie}from"./carrier.js";export{P as addEmailToValidation,x as addSpaceBetweenWords,A as calculateTotal,t as capitalizeFirstLetter,u as capitalizeFirstLetterOfEachWord,y as currencySymbol,i as daysAfter,d as deepMergeFeatures,q as featureFlagComponentNameLookup,a0 as filterFundingSourceCarriers,a as findDateLocale,b as formatByDateAndLocale,B as formatCreditCardNumber,f as formatDate,c as formatDateDDMMYY,e as formatDateDDMMYYYY,C as formatExpiration,z as formatMoney,X as getCarrierIdByCarrierCode,D as getCurrencyFromString,E as getCurrencySymbolFromString,g as getDefaultFeatures,Q as getDefaultShipFromAddress,j as getExpirationYears,S as getIsShipmentUsingSavedShipFromAddress,Y as getLogoOrIconByCarrierCode,F as getRateRequiresAcknowledgement,l as getRelativeDates,R as getSavedShipFromAddressId,G as getTotalRateAmount,h as getlocaleDateStringFormat,I as isDomesticAddress,O as isEmptyAddress,W as isEvriCarrier,Z as isGlobalPostEligible,J as isMilitaryAddress,k as isNowOrInTheFuture,r as isObject,M as isPoBox,N as isPoBoxAddress,$ as isSendleEligible,K as isUnitedStatesTerritory,L as isUnsupportedByUps,U as isUpsCarrier,T as isUspsCarrier,V as isYodelCarrier,m as mostRecent,n as nextDayCutoff,o as omitTime,H as overrideCarrierCodes,p as parseLocaleDate,v as pascalize,w as replaceSpacesWithDashes,s as sortByCreationDate}from"./carrier.js";export{N as NO_VAT_COUNTRIES,f as convertDecimalWeightToFractionalWeight,e as convertFractionalWeightToDecimalWeight,d as convertPoundsAndOuncesToOunces,g as convertWeight,c as createCodedErrors,h as formatFractionalWeight,n as formatTrackingNumber,k as getInsuranceProviderWithFriendlyName,l as getIsInsuraceProviderAccepted,o as getIsVatRequired,b as isDecimalWeight,j as isFlatRatePackageCode,i as isMetricWeightUnit,a as throwAny,t as throwJoinedMessages,m as trackingStatusFormatter}from"./vat.js";export{a as aggregateRateDetailItems,c as calculateRateDetailBreakdown,b as createStyles,e as errorMap,f as formLogger,i as isString,s as scopeTheme,v as validationResolver}from"./validation.js";export{a as AccountSettings,l as LabelWorkflow,o as Onboarding}from"./wallet-form.js";import{jsx as ne}from"@emotion/react/jsx-runtime";import{useCallback as me,useMemo as de}from"react";import{THEME_ID as le,GigerProvider as ce,GigerTestProvider as pe}from"@shipengine/giger";import{Theme as ue}from"@shipengine/giger-theme";import ge from"axios";import"date-fns/isToday";import"@emotion/react";import"react-i18next";import"lodash/isEqual";import"react-hook-form";import"zod";import"copy-to-clipboard";import"js-base64";import"libphonenumber-js/min";import"lodash/omit";import"card-validator";import"react-use";import"date-fns/subDays";import"react-dom";import"humps";import"lodash/merge";import"@tanstack/react-query";import"lodash/mergeWith";import"@shipengine/js-api";import"@rjsf/core";import"@rjsf/validator-ajv8";import"lodash/camelCase";import"use-debounce";import"classnames";import"i18next";import"i18next-browser-languagedetector";import"@emotion/cache";import"stylis";import"date-fns/formatISO";import"date-fns/isSameDay";import"date-fns/isWithinInterval";import"date-fns/setHours";import"date-fns/setMinutes";import"lodash/orderBy";import"jwt-decode";import"date-fns/format";import"date-fns/locale";import"date-fns/parse";import"lodash/get";import"lodash/isNil";import"lodash/omitBy";import"@hookform/resolvers/zod";const he=({baseURL:e="https://elements.shipengine.com",cdnURL:a="https://cdn.packlink.com",children:s,container:r,features:t,getToken:o,headers:i,locale:n,onApiError:m,onError:d=(()=>{}),scope:l="lmnt",themeConfig:c,defaultQueryClientOptions:p,emotionCacheShadowRootContainer:u})=>{const g=(({cdnURL:e})=>me((a=>te(void 0,void 0,void 0,(function*(){return(yield ge.get(`/brand/fallback/icons/${a.toLowerCase()}.svg`,{baseURL:e,responseType:"text"})).data}))),[e]))({cdnURL:a}),h=de((()=>{var e;const a=new ue(null!==(e=c&&le in c?c[le]:c)&&void 0!==e?e:re.fallback);return c&&le in c?{[le]:a}:a}),[c]),f={baseURL:e,cdnURL:a,container:r,emotionCacheShadowRootContainer:u,features:t,getToken:o,locale:n,onError:d,scope:l,theme:h};return ne(ee,Object.assign({},f,{children:ne(ce,Object.assign({cdnUrl:a,emotionCacheShadowRootContainer:u,reference:u||l||void 0,resolveIcon:g,theme:h},{children:ne(_,Object.assign({baseURL:e,defaultQueryClientOptions:p,getToken:o,headers:i,onApiError:m},{children:ne(ae,Object.assign({emotionCacheShadowRootContainer:u},{children:s}))}))}))}))},fe=({baseURL:e,children:a,features:s})=>{const r=de((()=>new ue),[]),t=oe(["globalFeatures"]),o=me((()=>"none"),[]),i={baseURL:e,cdnURL:"mockCdnUrl",getFeatures:e=>{var a;return ie(null!==(a=oe([e]))&&void 0!==a?a:{},null==s?void 0:s[e])},getToken:o,globalFeatures:Object.assign(Object.assign({enabledExternalCarriers:["apc","asendia","better_trucks","canpar","chronopost","couriers_please","courierpost","dpd","hermes_germany","intelliquick_delivery","lso","ontrac","seko","ups","yodel"]},t),s.globalFeatures),onError:()=>{},scope:"lmnt",theme:r};return ne(se.Provider,Object.assign({value:i},{children:ne(pe,Object.assign({theme:r},{children:ne(_,Object.assign({baseURL:e,getToken:o},{children:a}))}))}))};export{he as ElementsProvider,fe as ElementsTestProvider};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shipengine/elements",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.15.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@emotion/react": "11.x",
|
|
6
6
|
"react-i18next": "11.x",
|
|
@@ -12,7 +12,10 @@
|
|
|
12
12
|
"workerDirectory": "public"
|
|
13
13
|
},
|
|
14
14
|
"exports": {
|
|
15
|
-
".":
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./src/index.d.ts",
|
|
17
|
+
"default": "./index.js"
|
|
18
|
+
},
|
|
16
19
|
"./components": "./components.js",
|
|
17
20
|
"./constants": "./constants.js",
|
|
18
21
|
"./elements": "./elements.js",
|
|
@@ -35,10 +38,10 @@
|
|
|
35
38
|
"@rjsf/core": "5.16.1",
|
|
36
39
|
"@rjsf/utils": "5.16.1",
|
|
37
40
|
"@rjsf/validator-ajv8": "5.16.1",
|
|
38
|
-
"@shipengine/giger": "1.
|
|
41
|
+
"@shipengine/giger": "1.20.2",
|
|
39
42
|
"@shipengine/giger-theme": "1.7.0",
|
|
40
|
-
"@shipengine/js-api": "
|
|
41
|
-
"@shipengine/react-api": "3.
|
|
43
|
+
"@shipengine/js-api": "3.0.0",
|
|
44
|
+
"@shipengine/react-api": "3.8.0",
|
|
42
45
|
"@storybook/addons": "6.5.16",
|
|
43
46
|
"@storybook/api": "6.5.16",
|
|
44
47
|
"@storybook/components": "7.0.0-rc.1",
|
|
@@ -3,7 +3,7 @@ import { SE } from "@shipengine/js-api";
|
|
|
3
3
|
import { WarehousePayload } from "../";
|
|
4
4
|
import { RegisterFundingSourceCarrierPayload, WalletPayload } from "../templates";
|
|
5
5
|
import { AddressValidationPreference } from "../templates/address-preference-select";
|
|
6
|
-
type WarehouseData = Pick<WarehousePayload, "name" | "isDefault">;
|
|
6
|
+
type WarehouseData = Pick<WarehousePayload, "name" | "isDefault" | "warehouseId">;
|
|
7
7
|
type WalletData = {
|
|
8
8
|
creditCard: WalletPayload["creditCard"];
|
|
9
9
|
iovationBlackbox: WalletPayload["iovationBlackbox"];
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { InsuranceProviderProfile } from "../../types";
|
|
2
2
|
type EnableInsuranceBannerProps = {
|
|
3
3
|
insuranceProviderProfile?: InsuranceProviderProfile;
|
|
4
|
-
onSubmit: () => Promise<
|
|
5
|
-
|
|
4
|
+
onSubmit: () => Promise<{
|
|
5
|
+
isSuccessful: boolean;
|
|
6
|
+
}>;
|
|
6
7
|
};
|
|
7
|
-
export declare const EnableInsuranceBanner: ({ insuranceProviderProfile, onSubmit,
|
|
8
|
+
export declare const EnableInsuranceBanner: ({ insuranceProviderProfile, onSubmit, }: EnableInsuranceBannerProps) => import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
8
9
|
export {};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { UseFormReturn } from "react-hook-form";
|
|
2
2
|
import { AddressSchemaFields } from "./address-schema";
|
|
3
3
|
export type AddressFieldsProps = {
|
|
4
|
-
domestic?: boolean;
|
|
5
4
|
form: UseFormReturn<AddressSchemaFields>;
|
|
6
5
|
formatFieldName?: (fieldName: keyof AddressSchemaFields) => keyof AddressSchemaFields;
|
|
7
6
|
formId?: string;
|
|
8
7
|
optionalFields?: (keyof AddressSchemaFields)[];
|
|
9
8
|
};
|
|
10
|
-
export declare const AddressFields: ({
|
|
9
|
+
export declare const AddressFields: ({ form, formatFieldName, formId, optionalFields, }: AddressFieldsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -3,7 +3,6 @@ import { SE } from "@shipengine/js-api";
|
|
|
3
3
|
import { AddressParserPayload } from "../address-parser";
|
|
4
4
|
export type AddressFormProps<T = undefined> = {
|
|
5
5
|
address?: SE.Address;
|
|
6
|
-
domestic?: boolean;
|
|
7
6
|
isShipToForm?: boolean;
|
|
8
7
|
onCancel?: () => void;
|
|
9
8
|
onCancelParse?: () => void;
|
|
@@ -18,4 +17,4 @@ export type AddressFormProps<T = undefined> = {
|
|
|
18
17
|
formId?: string;
|
|
19
18
|
portalRef?: never;
|
|
20
19
|
});
|
|
21
|
-
export declare const AddressForm: <T extends Element>({ address,
|
|
20
|
+
export declare const AddressForm: <T extends Element>({ address, formId, isShipToForm, onCancel, onCancelParse, onSubmit, onSubmitParse, parseAddressErrors, portalRef, resetParseAddress, }: AddressFormProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { SE } from "@shipengine/react-api";
|
|
3
|
+
import { HarmonizedTariffCode } from "../../../types";
|
|
3
4
|
export type ProductFormProps<T = undefined> = {
|
|
4
5
|
currency: SE.Currency;
|
|
5
6
|
expectedCurrency?: SE.Currency;
|
|
7
|
+
harmonizedTariffCodes?: HarmonizedTariffCode[];
|
|
6
8
|
onCancel?: () => void;
|
|
7
9
|
onSubmit: (values: SE.Product) => Promise<void>;
|
|
8
10
|
product?: SE.Product;
|
|
@@ -15,4 +17,4 @@ export type ProductFormProps<T = undefined> = {
|
|
|
15
17
|
formId?: string;
|
|
16
18
|
portalRef?: never;
|
|
17
19
|
});
|
|
18
|
-
export declare const ProductForm: <T extends Element>({ product, formId, onCancel, onSubmit, portalRef, shipFromCountry, shipToCountry, currency, expectedCurrency, }: ProductFormProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare const ProductForm: <T extends Element>({ product, formId, onCancel, onSubmit, portalRef, shipFromCountry, shipToCountry, currency, expectedCurrency, harmonizedTariffCodes, }: ProductFormProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SE } from "@shipengine/react-api";
|
|
2
|
-
|
|
2
|
+
import { ProductFormProps } from "../product-form";
|
|
3
|
+
export type ProductsDisplayProps = {
|
|
3
4
|
currency: SE.Currency;
|
|
4
5
|
onUpdate: (products: SE.Product[]) => Promise<void>;
|
|
5
6
|
shipment: SE.SalesOrderShipment;
|
|
6
|
-
}
|
|
7
|
-
export declare const ProductsDisplay: ({ onUpdate, shipment, currency }: ProductsDisplayProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
|
-
export {};
|
|
7
|
+
} & Pick<ProductFormProps, "harmonizedTariffCodes">;
|
|
8
|
+
export declare const ProductsDisplay: ({ onUpdate, shipment, currency, harmonizedTariffCodes, }: ProductsDisplayProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -3,7 +3,9 @@ import { InsuranceProviderProfile } from "../../../types";
|
|
|
3
3
|
export type RegisterFundingSourceInsuranceFormProps<T = undefined> = {
|
|
4
4
|
insuranceProviderProfile?: InsuranceProviderProfile;
|
|
5
5
|
onCancel: () => void;
|
|
6
|
-
onSubmit: () => Promise<void
|
|
6
|
+
onSubmit: () => Promise<void> | Promise<{
|
|
7
|
+
isSuccessful: boolean;
|
|
8
|
+
}>;
|
|
7
9
|
showDescription?: boolean;
|
|
8
10
|
} & ({
|
|
9
11
|
formId: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { UseFormReturn } from "react-hook-form";
|
|
2
2
|
import { SE } from "@shipengine/react-api";
|
|
3
|
+
import { ProductsDisplayProps } from "../../../products-display";
|
|
3
4
|
import { ShipmentFormProps } from "../../shipment-form";
|
|
4
5
|
import { ShipmentFormFields } from "../../shipment-schema";
|
|
5
6
|
type CustomsFormsProps = {
|
|
@@ -7,6 +8,6 @@ type CustomsFormsProps = {
|
|
|
7
8
|
isCanadaDeliveredDutyEligible: boolean;
|
|
8
9
|
requiresWindsorFramework?: boolean;
|
|
9
10
|
shipment: SE.SalesOrderShipment;
|
|
10
|
-
} & Pick<ShipmentFormProps, "currency" | "onDirty" | "onUpdateCustoms" | "onUpdateTaxableIds">;
|
|
11
|
-
export declare const CustomsForms: ({ form, currency, onUpdateCustoms, onUpdateTaxableIds, isCanadaDeliveredDutyEligible, shipment, onDirty, requiresWindsorFramework, }: CustomsFormsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
11
|
+
} & Pick<ShipmentFormProps, "currency" | "onDirty" | "onUpdateCustoms" | "onUpdateTaxableIds"> & Pick<ProductsDisplayProps, "harmonizedTariffCodes">;
|
|
12
|
+
export declare const CustomsForms: ({ form, currency, onUpdateCustoms, onUpdateTaxableIds, isCanadaDeliveredDutyEligible, shipment, onDirty, requiresWindsorFramework, harmonizedTariffCodes, }: CustomsFormsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
12
13
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { SE } from "@shipengine/react-api";
|
|
3
3
|
import { UseShippingPresetsOptionsProps } from "../../../hooks";
|
|
4
|
-
import { ShipFromAddress, ShippingPreset } from "../../../types";
|
|
4
|
+
import { HarmonizedTariffCode, ShipFromAddress, ShippingPreset } from "../../../types";
|
|
5
5
|
import { PurchaseLabelFeatures, ShipmentFormFeatures } from "../../../utilities";
|
|
6
6
|
import { AddressParserPayload } from "../address-parser";
|
|
7
7
|
import { AddressPreference, AddressPreferenceDisplayProps } from "../address-preference-display";
|
|
@@ -9,6 +9,7 @@ export type OnChangeAddressOptions = {
|
|
|
9
9
|
shouldValidate?: boolean;
|
|
10
10
|
};
|
|
11
11
|
export type ShipmentFormMode = "browse_rates" | "select_service";
|
|
12
|
+
export type ShipmentFormModeChangeSource = "form" | "user";
|
|
12
13
|
export type ShipmentFormProps = {
|
|
13
14
|
accountSettings?: SE.ShipEngineAccountSettings;
|
|
14
15
|
addressLoading: boolean;
|
|
@@ -20,6 +21,7 @@ export type ShipmentFormProps = {
|
|
|
20
21
|
defaultFeatures?: PurchaseLabelFeatures;
|
|
21
22
|
errors?: SE.CodedError[];
|
|
22
23
|
features?: ShipmentFormFeatures;
|
|
24
|
+
harmonizedTariffCodes?: HarmonizedTariffCode[];
|
|
23
25
|
hydrateRef: React.MutableRefObject<((updatedShipment: SE.SalesOrderShipment) => void) | undefined>;
|
|
24
26
|
insuranceAccount?: SE.InsuranceAccount;
|
|
25
27
|
isLoading?: boolean;
|
|
@@ -29,6 +31,7 @@ export type ShipmentFormProps = {
|
|
|
29
31
|
defaultMode: ShipmentFormMode;
|
|
30
32
|
previousMode: ShipmentFormMode;
|
|
31
33
|
selectedMode: ShipmentFormMode;
|
|
34
|
+
source: ShipmentFormModeChangeSource;
|
|
32
35
|
}) => Promise<void> | void;
|
|
33
36
|
onChangeShipFromAddress: (id?: string, shipFromAddress?: ShipFromAddress) => Promise<void>;
|
|
34
37
|
onDirty: () => void;
|
|
@@ -53,4 +56,4 @@ export type CharsetWarning = {
|
|
|
53
56
|
message: string;
|
|
54
57
|
title?: string;
|
|
55
58
|
};
|
|
56
|
-
export declare const ShipmentForm: ({ accountSettings, addressLoading, addressPreference, charsetWarning, carriers, customPackageTypes, currency, defaultFeatures, features, hydrateRef, insuranceAccount, isLoading, onApplyPreset, onChangeAddress, onChangeMode, onChangeShipFromAddress, onDirty, onSubmit, onSubmitParseAddress, onToggleAddressPreferenceDisclosure, onUpdateCustoms, onUpdateTaxableIds, parseAddressErrors, resetParseAddress, salesOrder, shipment, shipFromAddresses, shippingPresets, warehouseId, warehouses, }: ShipmentFormProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
59
|
+
export declare const ShipmentForm: ({ accountSettings, addressLoading, addressPreference, charsetWarning, carriers, customPackageTypes, currency, defaultFeatures, features, harmonizedTariffCodes, hydrateRef, insuranceAccount, isLoading, onApplyPreset, onChangeAddress, onChangeMode, onChangeShipFromAddress, onDirty, onSubmit, onSubmitParseAddress, onToggleAddressPreferenceDisclosure, onUpdateCustoms, onUpdateTaxableIds, parseAddressErrors, resetParseAddress, salesOrder, shipment, shipFromAddresses, shippingPresets, warehouseId, warehouses, }: ShipmentFormProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -31,15 +31,35 @@ export declare const styles: {
|
|
|
31
31
|
justifyContent: "space-between";
|
|
32
32
|
position: "relative";
|
|
33
33
|
};
|
|
34
|
-
|
|
34
|
+
getApplyButtonStyles: (disabled?: boolean) => (theme: Theme) => {
|
|
35
|
+
"&:hover": {
|
|
36
|
+
backgroundColor: string;
|
|
37
|
+
};
|
|
38
|
+
backgroundColor: string;
|
|
39
|
+
borderRadius: number;
|
|
40
|
+
color: "white";
|
|
41
|
+
cursor: "not-allowed" | "pointer";
|
|
42
|
+
fontSize: string;
|
|
43
|
+
justifyContent: "center";
|
|
44
|
+
padding: number;
|
|
45
|
+
textAlign: "center";
|
|
46
|
+
};
|
|
47
|
+
header: (theme: Theme) => {
|
|
35
48
|
alignItems: "center";
|
|
36
49
|
display: "flex";
|
|
50
|
+
gap: number;
|
|
37
51
|
justifyContent: "space-between";
|
|
38
52
|
};
|
|
53
|
+
inputForm: (theme: Theme) => {
|
|
54
|
+
display: "flex";
|
|
55
|
+
flexDirection: "column";
|
|
56
|
+
padding: string;
|
|
57
|
+
width: number;
|
|
58
|
+
};
|
|
39
59
|
popoverWrapper: (theme: Theme) => {
|
|
40
60
|
display: "flex";
|
|
41
61
|
flexDirection: "column";
|
|
42
|
-
|
|
62
|
+
width: number;
|
|
43
63
|
};
|
|
44
64
|
pre: (theme: Theme) => {
|
|
45
65
|
backgroundColor: "#FFFFFF66";
|
|
@@ -47,14 +67,25 @@ export declare const styles: {
|
|
|
47
67
|
fontSize: string;
|
|
48
68
|
padding: number;
|
|
49
69
|
};
|
|
70
|
+
presetListItem: (theme: Theme) => {
|
|
71
|
+
alignItems: "center";
|
|
72
|
+
display: "flex";
|
|
73
|
+
height: number;
|
|
74
|
+
justifyContent: "space-between";
|
|
75
|
+
padding: number;
|
|
76
|
+
width: string;
|
|
77
|
+
};
|
|
50
78
|
presetOption: (theme: Theme) => {
|
|
51
79
|
"&:hover": {
|
|
52
80
|
backgroundColor: "scopeTheme(theme).palette.gray.ultraLight";
|
|
53
81
|
};
|
|
54
82
|
backgroundColor: "transparent";
|
|
55
83
|
borderRadius: string;
|
|
84
|
+
color: string;
|
|
56
85
|
fontSize: string;
|
|
86
|
+
fontWeight: "normal";
|
|
57
87
|
padding: number;
|
|
88
|
+
width: string;
|
|
58
89
|
};
|
|
59
90
|
presetsButton: (theme: Theme) => {
|
|
60
91
|
"&:hover": {
|
|
@@ -66,6 +97,13 @@ export declare const styles: {
|
|
|
66
97
|
display: "flex";
|
|
67
98
|
fontSize: string;
|
|
68
99
|
gap: number;
|
|
100
|
+
justifyContent: "center";
|
|
69
101
|
padding: string;
|
|
102
|
+
width: string;
|
|
103
|
+
};
|
|
104
|
+
textArea: (theme: Theme) => {
|
|
105
|
+
fontSize: string;
|
|
106
|
+
minHeight: number;
|
|
107
|
+
width: string;
|
|
70
108
|
};
|
|
71
109
|
};
|
|
@@ -13,4 +13,4 @@ export type EditWalletAddressFormProps<T = undefined> = {
|
|
|
13
13
|
formId?: string;
|
|
14
14
|
portalRef?: never;
|
|
15
15
|
});
|
|
16
|
-
export declare const EditWalletAddressForm: <T extends Element>({ address,
|
|
16
|
+
export declare const EditWalletAddressForm: <T extends Element>({ address, formId, onCancel, onSubmit, portalRef, }: EditWalletAddressFormProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -273,7 +273,7 @@ export declare const getWalletSchema: (emailRequirement: EmailRequirementOption,
|
|
|
273
273
|
creditCard: z.ZodEffects<z.ZodObject<{
|
|
274
274
|
cvv: z.ZodEffects<z.ZodString, string, string>;
|
|
275
275
|
expiration: z.ZodEffects<z.ZodString, string, string>;
|
|
276
|
-
name: z.ZodString
|
|
276
|
+
name: z.ZodEffects<z.ZodString, string, string>;
|
|
277
277
|
number: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
278
278
|
}, "strip", z.ZodTypeAny, {
|
|
279
279
|
number: string;
|
|
@@ -1,10 +1,28 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const vatSchema: z.ZodObject<{
|
|
3
|
-
|
|
3
|
+
issuingAuthority: z.ZodEnum<["AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BR", "IO", "VG", "BN", "BG", "BF", "BI", "CA", "KH", "CM", "CV", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FM", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "CI", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KR", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "AN", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "KP", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "VI", "UM", "US", "UY", "UZ", "VU", "VE", "VN", "WF", "EH", "YE", "ZM", "ZW"]>;
|
|
4
|
+
vat: z.ZodObject<{
|
|
5
|
+
number: z.ZodString;
|
|
6
|
+
type: z.ZodString;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
number: string;
|
|
9
|
+
type: string;
|
|
10
|
+
}, {
|
|
11
|
+
number: string;
|
|
12
|
+
type: string;
|
|
13
|
+
}>;
|
|
4
14
|
}, "strip", z.ZodTypeAny, {
|
|
5
|
-
|
|
15
|
+
issuingAuthority: "AF" | "AX" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AQ" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BQ" | "BA" | "BW" | "BR" | "IO" | "VG" | "BN" | "BG" | "BF" | "BI" | "CA" | "KH" | "CM" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CX" | "CC" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "HR" | "CU" | "CW" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FK" | "FO" | "FM" | "FJ" | "FI" | "FR" | "GF" | "PF" | "TF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GG" | "GN" | "GW" | "GY" | "HT" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IM" | "IL" | "IT" | "CI" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "KR" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "AN" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "KP" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PN" | "PL" | "PT" | "PR" | "QA" | "RE" | "RO" | "RU" | "RW" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SX" | "SK" | "SI" | "SB" | "SO" | "ZA" | "GS" | "SS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "VI" | "UM" | "US" | "UY" | "UZ" | "VU" | "VE" | "VN" | "WF" | "EH" | "YE" | "ZM" | "ZW";
|
|
16
|
+
vat: {
|
|
17
|
+
number: string;
|
|
18
|
+
type: string;
|
|
19
|
+
};
|
|
6
20
|
}, {
|
|
7
|
-
|
|
21
|
+
issuingAuthority: "AF" | "AX" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AQ" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BQ" | "BA" | "BW" | "BR" | "IO" | "VG" | "BN" | "BG" | "BF" | "BI" | "CA" | "KH" | "CM" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CX" | "CC" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "HR" | "CU" | "CW" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FK" | "FO" | "FM" | "FJ" | "FI" | "FR" | "GF" | "PF" | "TF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GG" | "GN" | "GW" | "GY" | "HT" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IM" | "IL" | "IT" | "CI" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "KR" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "AN" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "KP" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PN" | "PL" | "PT" | "PR" | "QA" | "RE" | "RO" | "RU" | "RW" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SX" | "SK" | "SI" | "SB" | "SO" | "ZA" | "GS" | "SS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "VI" | "UM" | "US" | "UY" | "UZ" | "VU" | "VE" | "VN" | "WF" | "EH" | "YE" | "ZM" | "ZW";
|
|
22
|
+
vat: {
|
|
23
|
+
number: string;
|
|
24
|
+
type: string;
|
|
25
|
+
};
|
|
8
26
|
}>;
|
|
9
27
|
export type VatSchemaFields = z.input<typeof vatSchema>;
|
|
10
28
|
export type VatSchemaPayload = z.output<typeof vatSchema>;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
export type VatFormProps = {
|
|
2
2
|
onCancel?: () => void;
|
|
3
3
|
onSuccess?: () => void;
|
|
4
|
-
showRegisterLaterText?: boolean;
|
|
5
4
|
};
|
|
6
|
-
|
|
5
|
+
/**
|
|
6
|
+
* At first we are only allowing GB and VAT as Issuing Authority and Tax Type respectively.
|
|
7
|
+
* When open to all Tax types and countries remove the default values and also the
|
|
8
|
+
* `disabled` prop from "tax.type" and "issuingAuthority"
|
|
9
|
+
* There is no ticket for this at the moment
|
|
10
|
+
*/
|
|
11
|
+
export declare const VatForm: ({ onCancel, onSuccess }: VatFormProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -345,7 +345,9 @@ export declare const getWarehouseSchema: (useStrict: boolean, emailRequired?: bo
|
|
|
345
345
|
postalCode: string;
|
|
346
346
|
}>;
|
|
347
347
|
returnToAddressIsDifferent: z.ZodLiteral<true>;
|
|
348
|
+
warehouseId: z.ZodOptional<z.ZodString>;
|
|
348
349
|
}, "strip", z.ZodTypeAny, {
|
|
350
|
+
warehouseId?: string | undefined;
|
|
349
351
|
returnToAddressIsDifferent: true;
|
|
350
352
|
isDefault: boolean;
|
|
351
353
|
name: string;
|
|
@@ -376,6 +378,7 @@ export declare const getWarehouseSchema: (useStrict: boolean, emailRequired?: bo
|
|
|
376
378
|
addressResidentialIndicator: "yes" | "no";
|
|
377
379
|
};
|
|
378
380
|
}, {
|
|
381
|
+
warehouseId?: string | undefined;
|
|
379
382
|
returnToAddressIsDifferent: true;
|
|
380
383
|
isDefault: boolean;
|
|
381
384
|
name: string;
|
|
@@ -523,7 +526,9 @@ export declare const getWarehouseSchema: (useStrict: boolean, emailRequired?: bo
|
|
|
523
526
|
postalCode: string;
|
|
524
527
|
}>;
|
|
525
528
|
returnToAddressIsDifferent: z.ZodLiteral<false>;
|
|
529
|
+
warehouseId: z.ZodOptional<z.ZodString>;
|
|
526
530
|
}, "strip", z.ZodTypeAny, {
|
|
531
|
+
warehouseId?: string | undefined;
|
|
527
532
|
returnToAddressIsDifferent: false;
|
|
528
533
|
isDefault: boolean;
|
|
529
534
|
name: string;
|
|
@@ -541,6 +546,7 @@ export declare const getWarehouseSchema: (useStrict: boolean, emailRequired?: bo
|
|
|
541
546
|
addressResidentialIndicator: "yes" | "no";
|
|
542
547
|
};
|
|
543
548
|
}, {
|
|
549
|
+
warehouseId?: string | undefined;
|
|
544
550
|
returnToAddressIsDifferent: false;
|
|
545
551
|
isDefault: boolean;
|
|
546
552
|
name: string;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { SE } from "@shipengine/react-api";
|
|
3
|
-
export type WarehousePayload = Partial<SE.Warehouse> & Pick<SE.Warehouse, "name" | "originAddress" | "isDefault"
|
|
3
|
+
export type WarehousePayload = Partial<SE.Warehouse> & Pick<SE.Warehouse, "name" | "originAddress" | "isDefault"> & {
|
|
4
|
+
warehouseId?: string;
|
|
5
|
+
};
|
|
4
6
|
export type WarehouseFormProps<T = undefined> = {
|
|
5
7
|
onCancel?: () => void;
|
|
6
8
|
onDelete?: () => void;
|
|
@@ -110,6 +110,7 @@ export declare const useLabelsGrid: ({ labelStatus, showShipmentIdFilter, showLa
|
|
|
110
110
|
currentPageSize: number;
|
|
111
111
|
onPageSelect: (page: number) => void;
|
|
112
112
|
onPageSizeSelect: (pageSize: number) => void;
|
|
113
|
+
resetCurrentPage: () => void;
|
|
113
114
|
};
|
|
114
115
|
pagesAmount: number;
|
|
115
116
|
pageSize: number;
|