@shipengine/elements 2.17.0 → 2.19.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 +4 -12
- package/src/components/add-funds-form/add-funds-form.d.ts +3 -9
- package/src/components/button-group/button-group.d.ts +4 -1
- package/src/components/date-range-combo/date-range-combo.d.ts +1 -1
- package/src/components/field/select/select-with-categories.d.ts +1 -0
- package/src/components/fund-and-purchase/fund-and-purchase.d.ts +6 -7
- package/src/components/grid-controller/grid-controller.d.ts +6 -2
- package/src/components/grid-controller/index.d.ts +1 -0
- package/src/components/grid-controller/sortable-header.d.ts +20 -0
- package/src/components/grid-filters/components/index.d.ts +1 -0
- package/src/components/grid-filters/components/tracking-status-filter/index.d.ts +1 -0
- package/src/components/grid-filters/components/tracking-status-filter/tracking-status-filter-schema.d.ts +21 -0
- package/src/components/grid-filters/components/tracking-status-filter/tracking-status-filter.d.ts +23 -0
- package/src/components/grid-filters/components/tracking-status-filter/tracking-status-filter.styles.d.ts +13 -0
- package/src/components/grid-filters/grid-filters.d.ts +4 -1
- package/src/components/history/history-card/history-card.styles.d.ts +1 -1
- package/src/components/ship-from-address-form/ship-from-address-form.d.ts +2 -1
- package/src/components/templates/connect-external-carrier-form/connect-external-carrier-form.d.ts +3 -1
- package/src/components/templates/connect-external-carrier-form/custom-forms/custom-external-carrier-form.d.ts +10 -0
- package/src/components/templates/connect-external-carrier-form/custom-forms/custom-form-fedex.d.ts +6 -0
- package/src/components/templates/connect-external-carrier-form/custom-forms/eula-clickwrap.d.ts +11 -0
- package/src/components/templates/connect-external-carrier-form/custom-forms/eula-clickwrap.styles.d.ts +20 -0
- package/src/components/templates/connect-external-carrier-form/custom-forms/index.d.ts +1 -0
- package/src/components/templates/connect-external-carrier-form/index.d.ts +1 -0
- package/src/components/templates/rate-form/rate-form.d.ts +4 -2
- package/src/components/templates/shipment-form/shipment-form.d.ts +2 -1
- package/src/components/templates/theme-creator/theme-creator.d.ts +3 -2
- package/src/create-element/element/index.d.ts +0 -1
- package/src/elements/labels-grid/hooks/use-labels-grid.d.ts +12 -51
- package/src/elements/labels-grid/labels-grid.d.ts +50 -34
- package/src/elements/manage-carriers/manage-carriers.d.ts +49 -49
- package/src/elements/manage-external-carriers/manage-external-carriers.d.ts +43 -0
- package/src/elements/manage-funding/manage-funding-element.d.ts +24 -2
- package/src/elements/manage-warehouses/manage-warehouses.d.ts +21 -0
- package/src/elements/payment-method-settings/payment-method-settings-element.d.ts +21 -0
- package/src/elements/purchase-label/hooks/use-rates-form.d.ts +1 -0
- package/src/elements/purchase-label/hooks/use-shipment-form.d.ts +4 -4
- package/src/elements/purchase-label/purchase-label.d.ts +26 -5
- package/src/elements/select-label-layout/select-label-layout-element.d.ts +21 -0
- package/src/elements/shipment-summary/shipment-summary.d.ts +31 -36
- package/src/elements/shipments-grid/shipments-grid.d.ts +25 -36
- package/src/elements/theme-creator/theme-creator.d.ts +25 -15
- package/src/elements/transaction-history/transaction-history-element.d.ts +21 -0
- package/src/elements/unit-settings/unit-settings-element.d.ts +21 -0
- package/src/elements/vat-settings/vat-settings-element.d.ts +21 -0
- package/src/elements/void-label/void-label.d.ts +50 -9
- package/src/elements-provider/elements-context-provider.d.ts +2 -2
- package/src/elements-provider/elements-provider.d.ts +1 -2
- package/src/features/manage-carriers/manage-carriers.d.ts +6 -8
- package/src/features/manage-carriers/use-manage-carriers.d.ts +4 -7
- package/src/features/manage-funding/manage-funding.d.ts +4 -9
- package/src/hooks/index.d.ts +1 -0
- package/src/hooks/insurance/use-manage-funding-source-insurance.d.ts +1 -0
- package/src/hooks/options/use-date-range-options.d.ts +4 -1
- package/src/hooks/options/use-rate-options.d.ts +2 -1
- package/src/hooks/use-balance-services.d.ts +22 -0
- package/src/hooks/use-helpers.d.ts +4 -0
- package/src/locales/en/index.d.ts +21 -0
- package/src/utilities/feature-flags/types.d.ts +5 -1
- package/src/utilities/shipengine/address.d.ts +1 -1
- package/src/utilities/storybook-local-storage-config.d.ts +12 -0
- package/src/utilities/validation.d.ts +19 -0
- package/src/workflows/account-settings/account-settings.d.ts +21 -0
- package/src/workflows/carrier-services/carrier-services.d.ts +22 -27
- package/src/workflows/connect-external-carrier/connect-external-carrier.d.ts +31 -24
- package/src/workflows/label-workflow/label-workflow.d.ts +21 -0
- package/src/workflows/onboarding/components/onboarding-wizard/onboarding-wizard.d.ts +2 -1
- package/src/workflows/onboarding/onboarding.d.ts +67 -84
- package/styles.js +1 -0
- package/suspend-text.js +1 -1
- package/transaction-history-element.js +1 -1
- package/use-balance-services.js +1 -0
- package/use-configure-shipment.js +1 -1
- package/use-page-layout.js +1 -1
- package/use-unit-settings.js +1 -1
- package/usePager.js +1 -1
- package/utilities.js +1 -1
- package/validation.js +1 -1
- package/wallet-form.js +1 -1
- package/warehouses.js +1 -1
- package/workflows.js +1 -1
- package/carrier.js +0 -1
- package/src/create-element/element/utils/get-emotion-cache.d.ts +0 -2
- package/src/create-element/element/utils/index.d.ts +0 -1
- package/use-toggle.js +0 -1
package/components.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{x as Actions,w 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,I as InlineLabel,o as ItemsBreakdown,L as LinkAction,p as Loader,P as PoweredByShipEngine,R as RateDetails,S as Section,q as SettingsCard,y as ShipFromAddressForm,r as SkeletonCarrierRow,t as Spacer,u as Spread,T as Tabs,V as VatForm,W as WalletCard,v 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,S as SortableHeader,u as usePager}from"./usePager.js";export{f as Field,H as HistoryCardExtension,P as Pager,S as StoryNotes,a as SuspendText}from"./suspend-text.js";export{P as Portal}from"./use-balance-services.js";import"./validation.js";import"date-fns/format";import"date-fns/locale";import"date-fns/parse";import"lodash/get.js";import"humps";import"@shipengine/react-api";import"lodash/isEqual.js";import"lodash/isNil.js";import"lodash/omit.js";import"lodash/omitBy.js";import"./address.js";import"@hookform/resolvers/zod";import"zod";import"libphonenumber-js/min";import"./zod.js";import"@emotion/react/jsx-runtime";import"date-fns/isToday";import"@shipengine/giger";import"@emotion/react";import"react";import"./styles.js";import"react-i18next";import"@shipengine/giger-theme";import"react-hook-form";import"./money.js";import"copy-to-clipboard";import"js-base64";import"card-validator";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,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"
|
|
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"./validation.js";import"date-fns/format";import"date-fns/locale";import"date-fns/parse";import"lodash/get.js";import"humps";import"@shipengine/react-api";import"lodash/isEqual.js";import"lodash/isNil.js";import"lodash/omit.js";import"lodash/omitBy.js";import"./address.js";import"@hookform/resolvers/zod";import"zod";import"libphonenumber-js/min";import"./zod.js";import"@emotion/react/jsx-runtime";import"react";import"./actions-menu.js";import"date-fns/isToday";import"@shipengine/giger";import"./use-balance-services.js";import"react-dom";import"@emotion/react";import"./styles.js";import"react-i18next";import"@shipengine/giger-theme";import"react-hook-form";import"./money.js";import"copy-to-clipboard";import"js-base64";import"card-validator";import"./use-configure-shipment.js";import"./warehouses.js";import"./canada-ddp.js";import"lodash/orderBy.js";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.js";import"lodash/mergeWith.js";import"@shipengine/js-api";import"@rjsf/core";import"@rjsf/validator-ajv8";import"lodash/camelCase.js";import"use-debounce";import"classnames";import"i18next";import"i18next-browser-languagedetector";
|
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-
|
|
1
|
+
export{R as RootPortalProvider,c as useAddressValidation,g as useBalanceServices,u as useCountryCodeOptions,d as useNestedForm,e as useRootPortal,b as useStateCodeOptions,f as useToggle}from"./use-balance-services.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"./validation.js";import"date-fns/format";import"date-fns/locale";import"date-fns/parse";import"lodash/get.js";import"humps";import"@shipengine/react-api";import"lodash/isEqual.js";import"lodash/isNil.js";import"lodash/omit.js";import"lodash/omitBy.js";import"./address.js";import"@hookform/resolvers/zod";import"zod";import"libphonenumber-js/min";import"./zod.js";import"react-dom";import"react-i18next";import"./warehouses.js";import"./canada-ddp.js";import"lodash/orderBy.js";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{
|
|
1
|
+
import{ShipEngine as _}from"@shipengine/react-api";export*from"@shipengine/react-api";export{x as Actions,w 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,I as InlineLabel,o as ItemsBreakdown,L as LinkAction,p as Loader,P as PoweredByShipEngine,R as RateDetails,S as Section,q as SettingsCard,y as ShipFromAddressForm,r as SkeletonCarrierRow,t as Spacer,u as Spread,T as Tabs,V as VatForm,W as WalletCard,v 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,S as SortableHeader,u as usePager}from"./usePager.js";export{f as Field,H as HistoryCardExtension,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-balance-services.js";export{a as ElementsContext,E as ElementsContextProvider,P as Portal,R as RootPortalProvider,c as useAddressValidation,g as useBalanceServices,u as useCountryCodeOptions,h as useElements,d as useNestedForm,e as useRootPortal,b as useStateCodeOptions,f as useToggle}from"./use-balance-services.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{d as convertDimensions,c as createDictionary,f as formatDimensions,n as getCancelledShipment,g as getCustomsFromSalesOrder,q as getDefaultWarehouse,e as getIsCustomsRequiredForSalesOrder,l as getIsCustomsRequiredForShipment,k as getIsInternationalShipment,m as getPendingShipment,h as getRequestedServices,j as getSalesOrderItemsFromSalesOrderOrShipment,o as getShipmentByStatus,r as getWarehouseById,b as isCollectionService,a as isPudoEligibleRate,i as isShippingServiceServiceDisabled,p as moveCustomsItemsToProducts}from"./warehouses.js";import{_ as te,g as oe,d as ie}from"./validation.js";export{Q as addEmailToValidation,y as addSpaceBetweenWords,B as calculateTotal,u as capitalizeFirstLetter,v as capitalizeFirstLetterOfEachWord,z as currencySymbol,i as daysAfter,d as deepMergeFeatures,a2 as errorMap,q as featureFlagComponentNameLookup,a1 as filterFundingSourceCarriers,a as findDateLocale,t as formLogger,b as formatByDateAndLocale,C as formatCreditCardNumber,f as formatDate,c as formatDateDDMMYY,e as formatDateDDMMYYYY,D as formatExpiration,A as formatMoney,Y as getCarrierIdByCarrierCode,E as getCurrencyFromString,F as getCurrencySymbolFromString,g as getDefaultFeatures,R as getDefaultShipFromAddress,j as getExpirationYears,T as getIsShipmentUsingSavedShipFromAddress,Z as getLogoOrIconByCarrierCode,G as getRateRequiresAcknowledgement,l as getRelativeDates,S as getSavedShipFromAddressId,H as getTotalRateAmount,h as getlocaleDateStringFormat,J as isDomesticAddress,P as isEmptyAddress,X as isEvriCarrier,$ as isGlobalPostEligible,K as isMilitaryAddress,k as isNowOrInTheFuture,r as isObject,N as isPoBox,O as isPoBoxAddress,a0 as isSendleEligible,L as isUnitedStatesTerritory,M as isUnsupportedByUps,V as isUpsCarrier,U as isUspsCarrier,W as isYodelCarrier,m as mostRecent,n as nextDayCutoff,o as omitTime,I as overrideCarrierCodes,p as parseLocaleDate,w as pascalize,x as replaceSpacesWithDashes,s as sortByCreationDate,a4 as validateShipFromAddress,a3 as validationResolver}from"./validation.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,i as isString,s as scopeTheme}from"./styles.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 de,useMemo as me,useRef as le,useState as ce,useEffect as ue}from"react";import{createPortal as pe}from"react-dom";import{THEME_ID as ge,GigerProvider as he,GigerTestProvider as fe}from"@shipengine/giger";import{Theme as Se}from"@shipengine/giger-theme";import Ce from"axios";import"date-fns/isToday";import"@emotion/react";import"react-i18next";import"lodash/isEqual.js";import"react-hook-form";import"zod";import"copy-to-clipboard";import"js-base64";import"lodash/omit.js";import"card-validator";import"libphonenumber-js/min";import"react-use";import"date-fns/subDays";import"humps";import"lodash/merge.js";import"@tanstack/react-query";import"lodash/mergeWith.js";import"@shipengine/js-api";import"@rjsf/core";import"@rjsf/validator-ajv8";import"lodash/camelCase.js";import"use-debounce";import"classnames";import"i18next";import"i18next-browser-languagedetector";import"date-fns/formatISO";import"date-fns/isSameDay";import"date-fns/isWithinInterval";import"date-fns/setHours";import"date-fns/setMinutes";import"lodash/orderBy.js";import"jwt-decode";import"date-fns/format";import"date-fns/locale";import"date-fns/parse";import"lodash/get.js";import"lodash/isNil.js";import"lodash/omitBy.js";import"@hookform/resolvers/zod";const be=({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:d,onError:m=(()=>{}),scope:l="lmnt",themeConfig:c,defaultQueryClientOptions:u,emotionCacheShadowRootContainer:p})=>{var g;const h=(({cdnURL:e})=>de((a=>te(void 0,void 0,void 0,(function*(){return(yield Ce.get(`/brand/fallback/icons/${a.toLowerCase()}.svg`,{baseURL:e,responseType:"text"})).data}))),[e]))({cdnURL:a}),f=me((()=>{var e;const a=new Se(null!==(e=c&&ge in c?c[ge]:c)&&void 0!==e?e:re.fallback);return c&&ge in c?{[ge]:a}:a}),[c]),S=le(null),[C,b]=ce(),v="attachShadow"in HTMLElement.prototype&&!(null===(g=null==t?void 0:t.globalFeatures)||void 0===g?void 0:g.disableShadowDOM);ue((()=>{var e;v&&(!r||r instanceof ShadowRoot||r.shadowRoot?p?b(p):S.current&&!(null===(e=S.current)||void 0===e?void 0:e.shadowRoot)&&b(S.current.attachShadow({mode:"open"})):b(r.attachShadow({mode:"open"})))}),[p,S,r,v]);const y={baseURL:e,cdnURL:a,container:r,emotionCacheShadowRootContainer:C,features:t,getToken:o,locale:n,onError:m,scope:l,theme:f},j=ne(ee,Object.assign({},y,{children:ne(he,Object.assign({cdnUrl:a,emotionCacheShadowRootContainer:C,reference:l||void 0,resolveIcon:h,theme:f},{children:ne(_,Object.assign({baseURL:e,defaultQueryClientOptions:u,getToken:o,headers:i,onApiError:d},{children:ne(ae,Object.assign({emotionCacheShadowRootContainer:C},{children:s}))}))}))}));return v?r?C?pe(j,C):null:ne("div",Object.assign({id:"elements-container",ref:S},{children:C&&pe(j,C)})):j},ve=({baseURL:e,children:a,features:s})=>{const r=me((()=>new Se),[]),t=oe(["globalFeatures"]),o=de((()=>"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(fe,Object.assign({theme:r},{children:ne(_,Object.assign({baseURL:e,getToken:o},{children:a}))}))}))};export{be as ElementsProvider,ve as ElementsTestProvider};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shipengine/elements",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.19.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@emotion/react": "11.x",
|
|
6
6
|
"react-i18next": "11.x",
|
|
@@ -31,26 +31,19 @@
|
|
|
31
31
|
"type": "module",
|
|
32
32
|
"types": "./src/index.d.ts",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@emotion/cache": "11.10.5",
|
|
35
34
|
"@emotion/serialize": "1.1.1",
|
|
36
35
|
"@hookform/resolvers": "2.9.11",
|
|
37
36
|
"@jest/globals": "28.1.3",
|
|
38
37
|
"@rjsf/core": "5.16.1",
|
|
39
38
|
"@rjsf/utils": "5.16.1",
|
|
40
39
|
"@rjsf/validator-ajv8": "5.16.1",
|
|
41
|
-
"@shipengine/giger": "1.20.
|
|
42
|
-
"@shipengine/giger-theme": "1.
|
|
40
|
+
"@shipengine/giger": "1.20.14",
|
|
41
|
+
"@shipengine/giger-theme": "1.8.1",
|
|
43
42
|
"@shipengine/js-api": "3.2.0",
|
|
44
43
|
"@shipengine/react-api": "3.8.3",
|
|
45
|
-
"@storybook/addons": "6.5.16",
|
|
46
|
-
"@storybook/api": "6.5.16",
|
|
47
|
-
"@storybook/components": "7.0.0-rc.1",
|
|
48
|
-
"@storybook/core-events": "7.0.0-rc.1",
|
|
49
|
-
"@storybook/manager-api": "7.0.0-rc.1",
|
|
50
|
-
"@storybook/theming": "7.0.0-rc.1",
|
|
51
44
|
"@tanstack/react-query": "4.36.1",
|
|
52
45
|
"@testing-library/dom": "8.19.0",
|
|
53
|
-
"axios": "1.7.
|
|
46
|
+
"axios": "1.7.4",
|
|
54
47
|
"card-validator": "8.1.1",
|
|
55
48
|
"classnames": "2.5.1",
|
|
56
49
|
"copy-to-clipboard": "3.3.3",
|
|
@@ -65,7 +58,6 @@
|
|
|
65
58
|
"react-hook-form": "7.40.0",
|
|
66
59
|
"react-use": "17.4.2",
|
|
67
60
|
"rollup-plugin-copy": "3.4.0",
|
|
68
|
-
"stylis": "4.1.3",
|
|
69
61
|
"use-debounce": "10.0.0",
|
|
70
62
|
"zod": "3.19.1"
|
|
71
63
|
}
|
|
@@ -22,15 +22,9 @@ export type AddFundsFormProvider = {
|
|
|
22
22
|
* @see {@link AddFundsForm | The `<AddFundsForm />` component using these props}
|
|
23
23
|
*/
|
|
24
24
|
export type AddFundsFormProps = {
|
|
25
|
-
addFunds?: (payload:
|
|
26
|
-
carrierId: string;
|
|
27
|
-
funds: {
|
|
28
|
-
amount: number;
|
|
29
|
-
currency: SE.Currency;
|
|
30
|
-
};
|
|
31
|
-
}) => Promise<void>;
|
|
25
|
+
addFunds?: (payload: SE.Money) => Promise<void>;
|
|
32
26
|
addFundsError?: SE.CodedError[] | null;
|
|
33
|
-
|
|
27
|
+
balance?: number;
|
|
34
28
|
children?: (addFundsForm: AddFundsFormProvider) => React.ReactElement;
|
|
35
29
|
currency?: SE.Currency;
|
|
36
30
|
minimumAmount?: number;
|
|
@@ -49,4 +43,4 @@ export type AddFundsFormProps = {
|
|
|
49
43
|
*
|
|
50
44
|
* @see {@link AddFundsFormProps | The props that are passed into the `<AddFundsForm />` component}
|
|
51
45
|
*/
|
|
52
|
-
export declare const AddFundsForm: ({
|
|
46
|
+
export declare const AddFundsForm: ({ children, currency, onCancel, onSuccess, minimumAmount, onFail, addFunds, addFundsError, balance, }: AddFundsFormProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { Theme } from "@shipengine/giger-theme";
|
|
2
3
|
/**
|
|
3
4
|
* @internal
|
|
4
5
|
*
|
|
@@ -9,6 +10,8 @@ import * as React from "react";
|
|
|
9
10
|
* @see {@link ButtonGroup | This prop types usage in the `<ButtonGroup />` component}
|
|
10
11
|
*/
|
|
11
12
|
export type ButtonGroupProps = {
|
|
13
|
+
/** `breakpoint` is the optional breakpoint that will be used to determine when the buttons should be arranged in a specific way. */
|
|
14
|
+
breakpoint?: keyof Theme["breakPoints"];
|
|
12
15
|
/**
|
|
13
16
|
* `children` is the list of buttons you wish to group together.
|
|
14
17
|
*/
|
|
@@ -33,4 +36,4 @@ export type ButtonGroupProps = {
|
|
|
33
36
|
*
|
|
34
37
|
* @see {@link ButtonGroupProps | The props that are passed into the `<ButtonGroup />` component}
|
|
35
38
|
*/
|
|
36
|
-
export declare const ButtonGroup: ({ children, justify, toolbar, ...props }: ButtonGroupProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
39
|
+
export declare const ButtonGroup: ({ children, justify, toolbar, breakpoint, ...props }: ButtonGroupProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -9,7 +9,7 @@ import { DateRange, DateRangeOption } from "../../hooks";
|
|
|
9
9
|
*/
|
|
10
10
|
export type DateRangeComboProps = {
|
|
11
11
|
children?: (renderedComponent: JSX.Element) => React.ReactNode;
|
|
12
|
-
onChange: (nextOption
|
|
12
|
+
onChange: (nextOption?: DateRangeOption, nextCustomRange?: DateRange) => Promise<void> | void;
|
|
13
13
|
options: DateRangeOption[];
|
|
14
14
|
values: {
|
|
15
15
|
customRange?: DateRange;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Control } from "react-hook-form";
|
|
2
2
|
import { SE } from "@shipengine/react-api";
|
|
3
|
+
import { RateOption } from "../../hooks";
|
|
3
4
|
/**
|
|
4
5
|
* @internal
|
|
5
6
|
*
|
|
@@ -8,21 +9,19 @@ import { SE } from "@shipengine/react-api";
|
|
|
8
9
|
* @see {@link FundAndPurchase | The `<FundAndPurchase />` component using these props}
|
|
9
10
|
*/
|
|
10
11
|
export type FundAndPurchaseProps = {
|
|
11
|
-
carrierId?: string;
|
|
12
12
|
className?: string;
|
|
13
13
|
control: Control<any, any>;
|
|
14
14
|
currency: SE.Currency;
|
|
15
15
|
disabled?: boolean;
|
|
16
16
|
isFundingEnabled?: boolean;
|
|
17
|
-
isFundingRequired: boolean;
|
|
18
17
|
isInvalidatedByError?: boolean;
|
|
19
|
-
isPreferredRate?: boolean;
|
|
20
|
-
nickname?: string;
|
|
21
18
|
onPurchase: () => void;
|
|
22
19
|
onSave: () => Promise<void>;
|
|
23
20
|
onVatRegistrationComplete?: () => void;
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
rateData?: {
|
|
22
|
+
isPreferredRate?: boolean;
|
|
23
|
+
rate?: RateOption;
|
|
24
|
+
};
|
|
26
25
|
showVatSettings?: boolean;
|
|
27
26
|
};
|
|
28
27
|
/**
|
|
@@ -36,4 +35,4 @@ export type FundAndPurchaseProps = {
|
|
|
36
35
|
*
|
|
37
36
|
* @see {@link FundAndPurchaseProps | The props that are passed into the `<FundAndPurchase />` component}
|
|
38
37
|
*/
|
|
39
|
-
export declare const FundAndPurchase: ({
|
|
38
|
+
export declare const FundAndPurchase: ({ control, currency, disabled, isFundingEnabled, showVatSettings, onSave, onPurchase, onVatRegistrationComplete, isInvalidatedByError, rateData, }: FundAndPurchaseProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import { Interpolation, Theme } from "@emotion/react";
|
|
1
2
|
import { ReactNode } from "react";
|
|
2
3
|
export type ColumnProps<T> = {
|
|
3
4
|
headerContent: ReactNode;
|
|
4
5
|
renderCellContent: (data: T) => ReactNode;
|
|
5
6
|
};
|
|
7
|
+
type GridDataType = object & {
|
|
8
|
+
bodyCellStyles?: Interpolation<Theme>;
|
|
9
|
+
};
|
|
6
10
|
/**
|
|
7
11
|
* @internal
|
|
8
12
|
*
|
|
@@ -10,7 +14,7 @@ export type ColumnProps<T> = {
|
|
|
10
14
|
*
|
|
11
15
|
* @see {@link GridController | The `<GridController />` component}
|
|
12
16
|
*/
|
|
13
|
-
type GridProps<T extends
|
|
17
|
+
type GridProps<T extends GridDataType> = {
|
|
14
18
|
columns: ColumnProps<T>[];
|
|
15
19
|
data: T[];
|
|
16
20
|
emptyContent?: ReactNode;
|
|
@@ -28,5 +32,5 @@ type GridProps<T extends object> = {
|
|
|
28
32
|
*
|
|
29
33
|
* @see {@link GridProps | The props for the `<GridController />` component}
|
|
30
34
|
*/
|
|
31
|
-
export declare const GridController: <T extends
|
|
35
|
+
export declare const GridController: <T extends GridDataType>({ columns, data, footerContent, onRowClick, useCheckboxes, filters, emptyContent, }: GridProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
32
36
|
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type SortDirection = "asc" | "desc";
|
|
2
|
+
export interface SortableHeaderProps {
|
|
3
|
+
/**
|
|
4
|
+
* The text to display in the header
|
|
5
|
+
*/
|
|
6
|
+
headerText: string;
|
|
7
|
+
/**
|
|
8
|
+
* Callback function to toggle the sort direction
|
|
9
|
+
*/
|
|
10
|
+
onToggleSort: () => void;
|
|
11
|
+
/**
|
|
12
|
+
* The current sort direction
|
|
13
|
+
*/
|
|
14
|
+
sortDirection: SortDirection;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* A reusable component for creating sortable table headers
|
|
18
|
+
* that support both mouse and keyboard interaction
|
|
19
|
+
*/
|
|
20
|
+
export declare const SortableHeader: ({ headerText, sortDirection, onToggleSort, }: SortableHeaderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TrackingStatusFilter } from "./tracking-status-filter";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const trackingStatusFormSchema: z.ZodObject<{
|
|
3
|
+
delivered: z.ZodOptional<z.ZodBoolean>;
|
|
4
|
+
error: z.ZodOptional<z.ZodBoolean>;
|
|
5
|
+
in_transit: z.ZodOptional<z.ZodBoolean>;
|
|
6
|
+
unknown: z.ZodOptional<z.ZodBoolean>;
|
|
7
|
+
voided: z.ZodOptional<z.ZodBoolean>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
delivered?: boolean | undefined;
|
|
10
|
+
error?: boolean | undefined;
|
|
11
|
+
in_transit?: boolean | undefined;
|
|
12
|
+
unknown?: boolean | undefined;
|
|
13
|
+
voided?: boolean | undefined;
|
|
14
|
+
}, {
|
|
15
|
+
delivered?: boolean | undefined;
|
|
16
|
+
error?: boolean | undefined;
|
|
17
|
+
in_transit?: boolean | undefined;
|
|
18
|
+
unknown?: boolean | undefined;
|
|
19
|
+
voided?: boolean | undefined;
|
|
20
|
+
}>;
|
|
21
|
+
export type TrackingStatusFormFields = z.input<typeof trackingStatusFormSchema>;
|
package/src/components/grid-filters/components/tracking-status-filter/tracking-status-filter.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { IGridFilters } from "../../grid-filters";
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*
|
|
5
|
+
* # Tracking Status Filter Props
|
|
6
|
+
*
|
|
7
|
+
* @see {@link TrackingStatusFilter | The `<TrackingStatusFilter />` component}
|
|
8
|
+
*/
|
|
9
|
+
type TrackingStatusFilterProps = {
|
|
10
|
+
filters: IGridFilters;
|
|
11
|
+
onFiltersUpdated: (params: IGridFilters) => void;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* @internal
|
|
15
|
+
*
|
|
16
|
+
* # TrackingStatusFilter
|
|
17
|
+
*
|
|
18
|
+
* - The `<TrackingStatusFilter />` component handles the tracking status filter used in Labels Grid.
|
|
19
|
+
*
|
|
20
|
+
* @see {@link TrackingStatusFilterProps | The props for the `<TrackingStatusFilter />` component}
|
|
21
|
+
*/
|
|
22
|
+
export declare const TrackingStatusFilter: ({ filters, onFiltersUpdated }: TrackingStatusFilterProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const styles: {
|
|
2
|
+
checkboxInputParent: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
3
|
+
"div > div > div:has(input[type='checkbox'])": {
|
|
4
|
+
paddingBottom: number;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
getButtons: (theme: any) => {
|
|
8
|
+
display: "flex";
|
|
9
|
+
gap: number;
|
|
10
|
+
justifyContent: "end";
|
|
11
|
+
paddingTop: any;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { LabelTrackingStatus } from "@shipengine/js-api";
|
|
1
2
|
/**
|
|
2
3
|
* @internal
|
|
3
4
|
*
|
|
@@ -15,6 +16,7 @@ export type IGridFilter<T> = {
|
|
|
15
16
|
nickname?: string;
|
|
16
17
|
value: T | null;
|
|
17
18
|
};
|
|
19
|
+
export type LabelTrackingStatusWithVoided = LabelTrackingStatus | "voided";
|
|
18
20
|
export interface IGridFilters {
|
|
19
21
|
createdDate?: IGridFilter<{
|
|
20
22
|
end: Date;
|
|
@@ -22,6 +24,7 @@ export interface IGridFilters {
|
|
|
22
24
|
}>;
|
|
23
25
|
labelId?: IGridFilter<string>;
|
|
24
26
|
shipmentId: IGridFilter<string>;
|
|
27
|
+
trackingStatus?: IGridFilter<LabelTrackingStatusWithVoided[]>;
|
|
25
28
|
}
|
|
26
29
|
/**
|
|
27
30
|
* @internal
|
|
@@ -32,5 +35,5 @@ export interface IGridFilters {
|
|
|
32
35
|
*
|
|
33
36
|
* @see {@link GridFiltersProps | The props for the `<GridFilters />` component}
|
|
34
37
|
*/
|
|
35
|
-
export declare const GridFilters: ({ filters, onFiltersUpdated, onClearAllFilters
|
|
38
|
+
export declare const GridFilters: ({ filters, onFiltersUpdated, onClearAllFilters }: GridFilterProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
36
39
|
export {};
|
|
@@ -32,7 +32,7 @@ export declare const styles: {
|
|
|
32
32
|
textTransform: "capitalize";
|
|
33
33
|
};
|
|
34
34
|
transactionDetails: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
35
|
-
alignItems: "
|
|
35
|
+
alignItems: "baseline";
|
|
36
36
|
columnGap: number;
|
|
37
37
|
display: "flex";
|
|
38
38
|
};
|
|
@@ -8,6 +8,7 @@ export type ShipFromAddressFormProps<T = undefined> = {
|
|
|
8
8
|
onSubmit: (payload: Partial<ShipFromAddress> & Pick<ShipFromAddress, "originAddress">) => void;
|
|
9
9
|
onSubmitParse?: (payload: AddressParserPayload) => Promise<SE.AddressExtraction | undefined>;
|
|
10
10
|
parseAddressErrors?: SE.CodedError[];
|
|
11
|
+
preValidationErrors?: boolean;
|
|
11
12
|
resetParseAddress?: () => void;
|
|
12
13
|
shipFromAddress?: ShipFromAddress;
|
|
13
14
|
} & ({
|
|
@@ -17,4 +18,4 @@ export type ShipFromAddressFormProps<T = undefined> = {
|
|
|
17
18
|
formId?: string;
|
|
18
19
|
portalRef?: never;
|
|
19
20
|
});
|
|
20
|
-
export declare const ShipFromAddressForm: <T extends Element>({ shipFromAddress, onSubmit, onSubmitParse, resetParseAddress, onCancelParse, parseAddressErrors, onCancel, formId, portalRef, }: ShipFromAddressFormProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare const ShipFromAddressForm: <T extends Element>({ shipFromAddress, onSubmit, onSubmitParse, resetParseAddress, onCancelParse, parseAddressErrors, preValidationErrors, onCancel, formId, portalRef, }: ShipFromAddressFormProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
package/src/components/templates/connect-external-carrier-form/connect-external-carrier-form.d.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { RJSFSchema, UiSchema } from "@rjsf/utils";
|
|
2
|
+
import { SE } from "@shipengine/react-api";
|
|
2
3
|
export type ConnectExternalCarrierFormProps = {
|
|
3
4
|
carrierName: string;
|
|
4
5
|
displayName: string;
|
|
5
6
|
iconUrl: string;
|
|
7
|
+
initialFormData?: SE.ConnectCarrierAccount;
|
|
6
8
|
isBeta?: boolean;
|
|
7
9
|
jsonSchema: RJSFSchema;
|
|
8
10
|
onCancel?: () => void;
|
|
9
11
|
onCarrierConnected?: (carrierId: string) => void;
|
|
10
12
|
uiSchema: UiSchema;
|
|
11
13
|
};
|
|
12
|
-
export declare const ConnectExternalCarrierForm: ({ carrierName, displayName, iconUrl, isBeta, jsonSchema, uiSchema, onCancel, onCarrierConnected, }: ConnectExternalCarrierFormProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const ConnectExternalCarrierForm: ({ carrierName, displayName, iconUrl, isBeta, initialFormData, jsonSchema, uiSchema, onCancel, onCarrierConnected, }: ConnectExternalCarrierFormProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type CustomExternalCarrierFormProps = {
|
|
2
|
+
carrierName: string;
|
|
3
|
+
displayName: string;
|
|
4
|
+
iconUrl: string;
|
|
5
|
+
isBeta?: boolean;
|
|
6
|
+
onCancel?: () => void;
|
|
7
|
+
onCarrierConnected?: (carrierId: string) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare const hasCustomExternalCarrierConnectionForm: (carrierCode: string) => boolean;
|
|
10
|
+
export declare const CustomExternalCarrierForm: ({ carrierName, ...props }: CustomExternalCarrierFormProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
package/src/components/templates/connect-external-carrier-form/custom-forms/custom-form-fedex.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CustomExternalCarrierFormProps } from ".";
|
|
2
|
+
type CustomExternalCarrierFormFedexProps = CustomExternalCarrierFormProps & {
|
|
3
|
+
isUK?: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare const CustomExternalCarrierFormFedex: ({ carrierName, displayName, iconUrl, isBeta, onCancel, onCarrierConnected, isUK, }: CustomExternalCarrierFormFedexProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
package/src/components/templates/connect-external-carrier-form/custom-forms/eula-clickwrap.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type EulaClickwrapProps = {
|
|
2
|
+
disclaimerFooter?: string;
|
|
3
|
+
displayName?: string;
|
|
4
|
+
documentHref: string;
|
|
5
|
+
downloadHref?: string;
|
|
6
|
+
eulaName?: string;
|
|
7
|
+
iconUrl?: string;
|
|
8
|
+
onAccept: () => void;
|
|
9
|
+
onCancel?: () => void;
|
|
10
|
+
};
|
|
11
|
+
export declare const EulaClickwrap: ({ disclaimerFooter, documentHref, downloadHref, displayName, eulaName, iconUrl, onAccept, onCancel, }: EulaClickwrapProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const styles: {
|
|
2
|
+
icon: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
3
|
+
height: string;
|
|
4
|
+
marginRight: number;
|
|
5
|
+
};
|
|
6
|
+
scrollContainer: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
7
|
+
marginBottom: number;
|
|
8
|
+
marginLeft: string;
|
|
9
|
+
marginRight: string;
|
|
10
|
+
maxHeight: string;
|
|
11
|
+
maxWidth: string;
|
|
12
|
+
overflowY: "scroll";
|
|
13
|
+
paddingRight: number;
|
|
14
|
+
};
|
|
15
|
+
spinner: {
|
|
16
|
+
marginLeft: string;
|
|
17
|
+
marginRight: string;
|
|
18
|
+
position: "relative";
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./custom-external-carrier-form";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SE } from "@shipengine/react-api";
|
|
2
|
-
import { ServicePointSearchQuery } from "../../../hooks";
|
|
2
|
+
import { FundingOrigin, ServicePointSearchQuery } from "../../../hooks";
|
|
3
3
|
import { PreferredRatesResponse } from "../../../types";
|
|
4
4
|
import { PurchaseLabelFeatures, RateFormFeatures } from "../../../utilities";
|
|
5
5
|
export type RateFormProps = {
|
|
@@ -13,6 +13,8 @@ export type RateFormProps = {
|
|
|
13
13
|
errors?: SE.CodedError[];
|
|
14
14
|
features?: RateFormFeatures;
|
|
15
15
|
fetchServicePoints: (searchQuery: string) => void;
|
|
16
|
+
fundingOrigin?: FundingOrigin;
|
|
17
|
+
hasShipFromAddressErrors?: boolean;
|
|
16
18
|
isLoading?: boolean;
|
|
17
19
|
labelErrors?: string[];
|
|
18
20
|
labels?: SE.Label[];
|
|
@@ -32,4 +34,4 @@ export type RateFormProps = {
|
|
|
32
34
|
shipment?: SE.SalesOrderShipment;
|
|
33
35
|
showVatFeatures?: boolean;
|
|
34
36
|
};
|
|
35
|
-
export declare const RateForm: ({ carriers, currency, defaultFeatures, disabled, displayableRateErrors, displayableSaveRateErrors, displayableShipmentErrors, errors, features, fetchServicePoints, isLoading, labelErrors, labels, labelsLoading, listServicePointsErrors, onSave, onSelectRate, onSubmit, onVatRegistrationComplete, preferredRates, preferredServiceCodes, rates, salesOrder, servicePointSearchQuery, servicePointsFetching, servicePointsResponse, shipment, showVatFeatures, }: RateFormProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
37
|
+
export declare const RateForm: ({ carriers, currency, defaultFeatures, disabled, displayableRateErrors, displayableSaveRateErrors, displayableShipmentErrors, errors, features, fetchServicePoints, fundingOrigin, isLoading, labelErrors, labels, labelsLoading, listServicePointsErrors, onSave, onSelectRate, onSubmit, onVatRegistrationComplete, preferredRates, preferredServiceCodes, rates, salesOrder, servicePointSearchQuery, servicePointsFetching, servicePointsResponse, shipment, hasShipFromAddressErrors, showVatFeatures, }: RateFormProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -22,6 +22,7 @@ export type ShipmentFormProps = {
|
|
|
22
22
|
errors?: SE.CodedError[];
|
|
23
23
|
features?: ShipmentFormFeatures;
|
|
24
24
|
harmonizedTariffCodes?: HarmonizedTariffCode[];
|
|
25
|
+
hasShipFromAddressErrors?: boolean;
|
|
25
26
|
hydrateRef: React.MutableRefObject<((updatedShipment: SE.SalesOrderShipment) => void) | undefined>;
|
|
26
27
|
insuranceAccount?: SE.InsuranceAccount;
|
|
27
28
|
isLoading?: boolean;
|
|
@@ -57,4 +58,4 @@ export type CharsetWarning = {
|
|
|
57
58
|
message: string;
|
|
58
59
|
title?: string;
|
|
59
60
|
};
|
|
60
|
-
export declare const ShipmentForm: ({ accountSettings, addressLoading, shipToAddressPreference, charsetWarning, carriers, customPackageTypes, currency, defaultFeatures, disabledShippingServices, 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;
|
|
61
|
+
export declare const ShipmentForm: ({ accountSettings, addressLoading, shipToAddressPreference, charsetWarning, carriers, customPackageTypes, currency, defaultFeatures, disabledShippingServices, features, harmonizedTariffCodes, hasShipFromAddressErrors, 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;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { EmotionJSX } from "@emotion/react/types/jsx-namespace";
|
|
2
3
|
import { CustomThemeData } from "@shipengine/giger-theme";
|
|
3
4
|
export type ThemeCreatorProps = {
|
|
4
5
|
allowPaste?: boolean;
|
|
@@ -8,9 +9,9 @@ export type ThemeCreatorProps = {
|
|
|
8
9
|
themeConfig: CustomThemeData;
|
|
9
10
|
}[];
|
|
10
11
|
showDrawer?: {
|
|
11
|
-
content
|
|
12
|
+
content: () => EmotionJSX.Element | React.ReactNode;
|
|
12
13
|
copyToClipboardText?: string;
|
|
13
14
|
};
|
|
14
15
|
themeConfig: CustomThemeData;
|
|
15
16
|
};
|
|
16
|
-
export declare const ThemeCreator: ({ themeConfig, onUpdateThemeConfig, presets, showDrawer, }: ThemeCreatorProps) =>
|
|
17
|
+
export declare const ThemeCreator: ({ themeConfig, onUpdateThemeConfig, presets, showDrawer, }: ThemeCreatorProps) => EmotionJSX.Element;
|