@shipengine/elements 2.3.1 → 2.5.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.
Files changed (88) hide show
  1. package/actions-menu.js +3 -12
  2. package/components.js +1 -1
  3. package/elements.js +1 -1
  4. package/hooks.js +1 -1
  5. package/index.js +1 -1
  6. package/package.json +5 -3
  7. package/src/components/actions-menu/actions-menu.d.ts +2 -1
  8. package/src/components/error-state/error-state.d.ts +6 -0
  9. package/src/{workflows/onboarding/components/account-registration-step/account-registration-step.styles.d.ts → components/error-state/error-state.styles.d.ts} +9 -5
  10. package/src/components/error-state/index.d.ts +1 -0
  11. package/src/components/field/create-field-controller.d.ts +2 -1
  12. package/src/components/field-label/field-label.d.ts +2 -1
  13. package/src/components/field-label/field-label.styles.d.ts +16 -0
  14. package/src/components/grid-controller/grid-controller.d.ts +20 -2
  15. package/src/components/grid-controller/grid-controller.styles.d.ts +18 -6
  16. package/src/components/grid-controller/grid-footer.d.ts +27 -0
  17. package/src/components/grid-controller/index.d.ts +2 -0
  18. package/src/components/grid-filters/grid-filters.d.ts +30 -0
  19. package/src/components/grid-filters/grid-filters.styles.d.ts +11 -0
  20. package/src/components/grid-filters/index.d.ts +2 -0
  21. package/src/components/grid-filters/shipment-id-filter-shema.d.ts +9 -0
  22. package/src/components/grid-filters/shipment-id-filter.d.ts +23 -0
  23. package/src/components/index.d.ts +2 -0
  24. package/src/components/templates/address-display/address-display.d.ts +2 -1
  25. package/src/components/templates/wallet-form/wallet-form.d.ts +1 -1
  26. package/src/components/warehouse-form/warehouse-form-schema.d.ts +4 -1
  27. package/src/components/warehouse-form/warehouse-form.d.ts +2 -1
  28. package/src/elements/label-layout/label-layout-element.d.ts +77 -22
  29. package/src/elements/labels-grid/hooks/use-labels-grid.d.ts +68 -0
  30. package/src/elements/labels-grid/index.d.ts +1 -0
  31. package/src/elements/labels-grid/labels-grid.d.ts +132 -28
  32. package/src/elements/labels-grid/labels-grid.styles.d.ts +11 -0
  33. package/src/elements/manage-carriers/manage-carriers.d.ts +77 -22
  34. package/src/elements/manage-external-carriers/manage-external-carriers.d.ts +99 -23
  35. package/src/elements/manage-funding/manage-funding-element.d.ts +77 -22
  36. package/src/elements/manage-warehouses/manage-warehouses.d.ts +77 -22
  37. package/src/elements/payment-method-settings/payment-method-settings-element.d.ts +77 -22
  38. package/src/elements/purchase-label/purchase-label.d.ts +88 -73
  39. package/src/elements/shipment-summary/shipment-summary.d.ts +84 -26
  40. package/src/elements/shipments-grid/hooks/use-shipments-grid.d.ts +161 -0
  41. package/src/elements/shipments-grid/shipments-grid.d.ts +161 -30
  42. package/src/elements/shipments-grid/shipments-grid.styles.d.ts +11 -0
  43. package/src/elements/theme-creator/theme-creator.d.ts +77 -22
  44. package/src/elements/transaction-history/transaction-history-element.d.ts +77 -22
  45. package/src/elements/unit-settings/unit-settings-element.d.ts +77 -22
  46. package/src/elements/vat-settings/vat-settings-element.d.ts +77 -22
  47. package/src/elements/void-label/void-label.d.ts +89 -33
  48. package/src/hooks/index.d.ts +1 -0
  49. package/src/hooks/use-get-service-name.d.ts +4 -0
  50. package/src/locales/en/index.d.ts +77 -22
  51. package/src/workflows/account-settings/account-settings.d.ts +77 -22
  52. package/src/workflows/carrier-services/carrier-services.d.ts +77 -22
  53. package/src/workflows/connect-external-carrier/connect-external-carrier.d.ts +77 -22
  54. package/src/workflows/label-workflow/label-workflow.d.ts +10 -29
  55. package/src/workflows/onboarding/components/carrier-recovery-form/carrier-recovery-form-schema.d.ts +18 -18
  56. package/src/workflows/onboarding/components/confirmation-and-submission-step/confirmation-and-submission-step.d.ts +12 -0
  57. package/src/workflows/onboarding/components/confirmation-and-submission-step/index.d.ts +2 -0
  58. package/src/workflows/onboarding/components/confirmation-and-submission-step/use-confirmation-and-submission-step.d.ts +19 -0
  59. package/src/workflows/onboarding/components/funding-step/funding-step.d.ts +7 -0
  60. package/src/workflows/onboarding/components/funding-step/index.d.ts +1 -0
  61. package/src/workflows/onboarding/components/onboarding-wizard/onboarding-wizard.d.ts +1 -2
  62. package/src/workflows/onboarding/components/onboarding-wizard/onboarding-wizard.styles.d.ts +3 -0
  63. package/src/workflows/onboarding/components/ship-from-address-step/index.d.ts +0 -1
  64. package/src/workflows/onboarding/components/ship-from-address-step/ship-from-address-step.d.ts +3 -2
  65. package/src/workflows/onboarding/components/step-header/step-header.d.ts +3 -2
  66. package/src/workflows/onboarding/components/{funding-and-carrier-connection-step/funding-and-carrier-connection-step.styles.d.ts → step-header/step-header.styles.d.ts} +5 -8
  67. package/src/workflows/onboarding/components/welcome-page/index.d.ts +1 -0
  68. package/src/workflows/onboarding/components/welcome-page/welcome-page.d.ts +4 -0
  69. package/src/workflows/onboarding/onboarding.d.ts +79 -26
  70. package/suspend-text.js +1 -1
  71. package/transaction-history-element.js +1 -1
  72. package/use-get-service-name.js +1 -0
  73. package/use-unit-settings.js +1 -1
  74. package/usePager.js +1 -0
  75. package/vat.js +1 -1
  76. package/wallet-form.js +1 -1
  77. package/workflows.js +1 -1
  78. package/src/workflows/onboarding/components/account-registration-form/account-registration-form-schema.d.ts +0 -13
  79. package/src/workflows/onboarding/components/account-registration-form/account-registration-form.d.ts +0 -4
  80. package/src/workflows/onboarding/components/account-registration-form/index.d.ts +0 -1
  81. package/src/workflows/onboarding/components/account-registration-step/account-registration-step.d.ts +0 -5
  82. package/src/workflows/onboarding/components/account-registration-step/index.d.ts +0 -2
  83. package/src/workflows/onboarding/components/account-registration-step/use-account-registration-step.d.ts +0 -7
  84. package/src/workflows/onboarding/components/funding-and-carrier-connection-step/funding-and-carrier-connection-step.d.ts +0 -9
  85. package/src/workflows/onboarding/components/funding-and-carrier-connection-step/index.d.ts +0 -2
  86. package/src/workflows/onboarding/components/funding-and-carrier-connection-step/use-funding-and-carrier-connection-step.d.ts +0 -25
  87. package/src/workflows/onboarding/components/ship-from-address-step/use-ship-from-address-step.d.ts +0 -9
  88. package/story-notes.js +0 -1
package/components.js CHANGED
@@ -1 +1 @@
1
- export{z as Actions,y as ActionsMenu,A as AddFundsForm,b as AutoFundingForm,B as ButtonGroup,C as CarrierBalance,d as CarrierConnectionCard,e as CarrierIcon,f as CollapsiblePanel,h as CopyButton,i as Cube,D as DateRangeCombo,j as DateRangeSelect,k as DisplayTerm,l as EditBillingForm,m as ErrorFallback,F as FieldLabel,n as FormPortal,o as FundAndPurchase,H as HistoryCard,p as HistoryCardExtension,I as InlineLabel,q as ItemsBreakdown,L as LinkAction,r as Loader,P as PoweredByShipEngine,R as RateDetails,S as Section,t as SettingsCard,u as SkeletonCarrierRow,v as Spacer,w as Spread,T as Tabs,V as VatForm,W as WalletCard,x as WarehouseForm,c as autoFundingSchema,g as getAddFundsSchema,s as styles}from"./actions-menu.js";export{C as CarrierLogo}from"./carrier-logo.js";export{C as CellFormattedDate,D as Drawer,G as GridController,P as Pager,S as SuspendText,u as usePager}from"./suspend-text.js";export{f as Field,S as StoryNotes}from"./story-notes.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"humps";import"@shipengine/react-api";import"./address.js";import"@emotion/react/jsx-runtime";import"date-fns/isToday";import"@shipengine/giger";import"react";import"react-hook-form";import"react-i18next";import"./vat.js";import"lodash/get";import"@hookform/resolvers/zod";import"zod";import"@emotion/react";import"@shipengine/giger-theme";import"lodash/isEqual";import"./money.js";import"copy-to-clipboard";import"js-base64";import"libphonenumber-js/min";import"lodash/omit";import"card-validator";import"./zod.js";import"react-dom";
1
+ export{z as Actions,y as ActionsMenu,A as AddFundsForm,b as AutoFundingForm,B as ButtonGroup,C as CarrierBalance,d as CarrierConnectionCard,e as CarrierIcon,f as CollapsiblePanel,h as CopyButton,i as Cube,D as DateRangeCombo,j as DateRangeSelect,k as DisplayTerm,l as EditBillingForm,m as ErrorFallback,F as FieldLabel,n as FormPortal,o as FundAndPurchase,H as HistoryCard,p as HistoryCardExtension,I as InlineLabel,q as ItemsBreakdown,L as LinkAction,r as Loader,P as PoweredByShipEngine,R as RateDetails,S as Section,t as SettingsCard,u as SkeletonCarrierRow,v as Spacer,w as Spread,T as Tabs,V as VatForm,W as WalletCard,x as WarehouseForm,c as autoFundingSchema,g as getAddFundsSchema,s as styles}from"./actions-menu.js";export{C as CarrierLogo}from"./carrier-logo.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"humps";import"@shipengine/react-api";import"./address.js";import"@emotion/react/jsx-runtime";import"date-fns/isToday";import"@shipengine/giger";import"react";import"react-hook-form";import"react-i18next";import"./vat.js";import"lodash/get";import"@hookform/resolvers/zod";import"zod";import"@emotion/react";import"@shipengine/giger-theme";import"lodash/isEqual";import"./money.js";import"copy-to-clipboard";import"js-base64";import"libphonenumber-js/min";import"lodash/omit";import"card-validator";import"./zod.js";import"react-use";import"react-dom";
package/elements.js CHANGED
@@ -1 +1 @@
1
- export{e as LabelLayout,l as LabelsGrid,m as ManageCarriers,b as ManageExternalCarriers,d as ManageFunding,a as ManageWarehouses,p as PaymentMethodSettings,s as ShipmentsGrid,t as ThemeCreator,T as ThemeCreatorProvider,f as TransactionHistory,c as UnitSettings,u as useThemeCreator}from"./transaction-history-element.js";export{a as CarrierServices,p as PurchaseLabel,s as ShipmentSummary,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"humps";import"@shipengine/react-api";import"./address.js";import"date-fns/isToday";import"@shipengine/giger";import"react";import"react-hook-form";import"react-i18next";import"./vat.js";import"lodash/get";import"@hookform/resolvers/zod";import"zod";import"@emotion/react";import"@shipengine/giger-theme";import"./use-toggle.js";import"lodash/isEqual";import"lodash/omit";import"react-dom";import"./money.js";import"copy-to-clipboard";import"js-base64";import"libphonenumber-js/min";import"card-validator";import"./zod.js";import"./suspend-text.js";import"@tanstack/react-query";import"./use-scrub-errors.js";import"./shipment.js";import"lodash/orderBy";import"lodash/merge";import"lodash/mergeWith";import"./warehouses.js";import"axios";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";
1
+ export{e as LabelLayout,l as LabelsGrid,m as ManageCarriers,b as ManageExternalCarriers,d as ManageFunding,a as ManageWarehouses,p as PaymentMethodSettings,s as ShipmentsGrid,t as ThemeCreator,T as ThemeCreatorProvider,f as TransactionHistory,c as UnitSettings,u as useThemeCreator}from"./transaction-history-element.js";export{a as CarrierServices,p as PurchaseLabel,s as ShipmentSummary,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"humps";import"@shipengine/react-api";import"./address.js";import"date-fns/isToday";import"@shipengine/giger";import"react";import"react-hook-form";import"react-i18next";import"./vat.js";import"lodash/get";import"@hookform/resolvers/zod";import"zod";import"@emotion/react";import"@shipengine/giger-theme";import"./use-toggle.js";import"lodash/isEqual";import"lodash/omit";import"react-dom";import"./money.js";import"copy-to-clipboard";import"js-base64";import"libphonenumber-js/min";import"card-validator";import"./zod.js";import"./use-get-service-name.js";import"./usePager.js";import"react-use";import"@tanstack/react-query";import"./use-scrub-errors.js";import"./shipment.js";import"lodash/orderBy";import"lodash/merge";import"lodash/mergeWith";import"./warehouses.js";import"axios";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,b as useAddressValidation,u as useCountryCodeOptions,c as useRootPortal,a as useStateCodeOptions,d as useToggle}from"./use-toggle.js";export{P as PudoType,l as useBlackboxDetection,u as useConfirmationOptions,a as useCustomsContentsOptions,b as useCustomsNonDeliveryOptions,c as useDateRangeOptions,d as useInsuranceProviderOptions,m as useNestedForm,e as usePackageOptions,f as useRateOptions,n as useRunOnceOnTrue,o as useScrubErrors,g as useServiceCodeOptions,k as useServicePoints,h as useShipmentMetadata,i as useShippingPresetsOptions,j as useWarehouseOptions}from"./use-scrub-errors.js";export{P as PageLayoutProvider,u as useExpirationMonthOptions,a as useHelpers,b as usePageLayout}from"./use-page-layout.js";import"react";import"./address.js";import"./carrier.js";import"date-fns/format";import"date-fns/locale";import"date-fns/parse";import"humps";import"@shipengine/react-api";import"lodash/isEqual";import"lodash/omit";import"react-dom";import"@emotion/react/jsx-runtime";import"react-i18next";import"./shipment.js";import"lodash/orderBy";import"@shipengine/giger";import"@emotion/react";import"js-base64";import"./checks.js";
1
+ export{R as RootPortalProvider,b as useAddressValidation,u as useCountryCodeOptions,c as useRootPortal,a as useStateCodeOptions,d as useToggle}from"./use-toggle.js";export{P as PudoType,l as useBlackboxDetection,u as useConfirmationOptions,a as useCustomsContentsOptions,b as useCustomsNonDeliveryOptions,c as useDateRangeOptions,d as useInsuranceProviderOptions,m as useNestedForm,e as usePackageOptions,f as useRateOptions,n as useRunOnceOnTrue,o as useScrubErrors,g as useServiceCodeOptions,k as useServicePoints,h as useShipmentMetadata,i as useShippingPresetsOptions,j as useWarehouseOptions}from"./use-scrub-errors.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";import"react";import"./address.js";import"./carrier.js";import"date-fns/format";import"date-fns/locale";import"date-fns/parse";import"humps";import"@shipengine/react-api";import"lodash/isEqual";import"lodash/omit";import"react-dom";import"@emotion/react/jsx-runtime";import"react-i18next";import"./shipment.js";import"lodash/orderBy";import"@shipengine/giger";import"@emotion/react";import"js-base64";import"./checks.js";
package/index.js CHANGED
@@ -1 +1 @@
1
- import{E as X,a as _}from"./actions-menu.js";export{z as Actions,y as ActionsMenu,A as AddFundsForm,b as AutoFundingForm,B as ButtonGroup,C as CarrierBalance,d as CarrierConnectionCard,e as CarrierIcon,f as CollapsiblePanel,h as CopyButton,i as Cube,D as DateRangeCombo,j as DateRangeSelect,k as DisplayTerm,l as EditBillingForm,a as ElementsContext,E as ElementsContextProvider,m as ErrorFallback,F as FieldLabel,n as FormPortal,o as FundAndPurchase,H as HistoryCard,p as HistoryCardExtension,I as InlineLabel,q as ItemsBreakdown,L as LinkAction,r as Loader,P as PoweredByShipEngine,R as RateDetails,S as Section,t as SettingsCard,u as SkeletonCarrierRow,v as Spacer,w as Spread,T as Tabs,V as VatForm,W as WalletCard,x as WarehouseForm,c as autoFundingSchema,g as getAddFundsSchema,s as styles,G as useElements}from"./actions-menu.js";export{C as CarrierLogo}from"./carrier-logo.js";export{C as CellFormattedDate,D as Drawer,G as GridController,P as Pager,S as SuspendText,u as usePager}from"./suspend-text.js";export{f as Field,S as StoryNotes}from"./story-notes.js";import{R as Y}from"./use-toggle.js";export{P as Portal,R as RootPortalProvider,b as useAddressValidation,u as useCountryCodeOptions,c as useRootPortal,a as useStateCodeOptions,d 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{e as LabelLayout,l as LabelsGrid,m as ManageCarriers,b as ManageExternalCarriers,d as ManageFunding,a as ManageWarehouses,p as PaymentMethodSettings,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,l as useBlackboxDetection,u as useConfirmationOptions,a as useCustomsContentsOptions,b as useCustomsNonDeliveryOptions,c as useDateRangeOptions,d as useInsuranceProviderOptions,m as useNestedForm,e as usePackageOptions,f as useRateOptions,n as useRunOnceOnTrue,o as useScrubErrors,g as useServiceCodeOptions,k as useServicePoints,h as useShipmentMetadata,i as useShippingPresetsOptions,j as useWarehouseOptions}from"./use-scrub-errors.js";export{P as PageLayoutProvider,u as useExpirationMonthOptions,a as useHelpers,b as usePageLayout}from"./use-page-layout.js";export{m as moneySchema}from"./money.js";export{p as phoneSchema,a as phoneSchemaUnvalidated}from"./phone.js";export{a as assert,r as raise}from"./assertions.js";export{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 Z}from"./carrier.js";export{L as addEmailToValidation,t as addSpaceBetweenWords,w as calculateTotal,k as capitalizeFirstLetter,l as capitalizeFirstLetterOfEachWord,u as currencySymbol,e as daysAfter,S as filterFundingSourceCarriers,a as findDateLocale,b as formatByDateAndLocale,x as formatCreditCardNumber,f as formatDate,c as formatDateDDMMYY,d as formatDateDDMMYYYY,y as formatExpiration,v as formatMoney,O as getCarrierIdByCarrierCode,z as getCurrencyFromString,A as getCurrencySymbolFromString,h as getExpirationYears,P as getLogoOrIconByCarrierCode,B as getRateRequiresAcknowledgement,j as getRelativeDates,C as getTotalRateAmount,g as getlocaleDateStringFormat,E as isDomesticAddress,K as isEmptyAddress,Q as isGlobalPostEligible,F as isMilitaryAddress,i as isNowOrInTheFuture,I as isPoBox,J as isPoBoxAddress,R as isSendleEligible,G as isUnitedStatesTerritory,H as isUnsupportedByUps,N as isUpsCarrier,M as isUspsCarrier,m as mostRecent,n as nextDayCutoff,o as omitTime,D as overrideCarrierCodes,p as parseLocaleDate,q as pascalize,r as replaceSpacesWithDashes,s as sortByCreationDate}from"./carrier.js";export{k as convertDecimalWeightToFractionalWeight,j as convertFractionalWeightToDecimalWeight,h as convertPoundsAndOuncesToOunces,l as convertWeight,c as createCodedErrors,m as formatFractionalWeight,g as getCustomsFromSalesOrder,o as getDefaultWarehouse,b as getIsCustomsRequiredForSalesOrder,d as getRequestedServices,e as getSalesOrderItemsFromSalesOrderOrShipment,f as isDecimalWeight,n as isFlatRatePackageCode,i as isMetricWeightUnit,a as throwAny,t as throwJoinedMessages}from"./warehouses.js";import{g as $,d as ee}from"./vat.js";export{N as NO_VAT_COUNTRIES,c as aggregateRateDetailItems,e as calculateRateDetailBreakdown,h as createStyles,d as deepMergeFeatures,j as errorMap,f as featureFlagComponentNameLookup,a as formLogger,g as getDefaultFeatures,k as getIsVatRequired,i as isObject,b as isString,t as trackingStatusFormatter,v as validationResolver}from"./vat.js";export{a as AccountSettings,l as LabelWorkflow,o as Onboarding}from"./wallet-form.js";import{jsx as ae}from"@emotion/react/jsx-runtime";import{GigerProvider as te,GigerTestProvider as re}from"@shipengine/giger";import{Theme as oe}from"@shipengine/giger-theme";import{ShipEngine as se}from"@shipengine/react-api";import ie from"axios";import{useCallback as ne,useMemo as le}from"react";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-dom";import"@tanstack/react-query";import"lodash/merge";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"lodash/orderBy";import"date-fns/format";import"date-fns/locale";import"date-fns/parse";import"lodash/get";import"@hookform/resolvers/zod";var pe={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 de=({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:l,onError:p=(()=>{}),scope:d="lmnt",themeConfig:c,defaultQueryClientOptions:g})=>{const m=(({cdnURL:e})=>ne((a=>Z(void 0,void 0,void 0,(function*(){return(yield ie.get(`/brand/fallback/icons/${a.toLowerCase()}.svg`,{baseURL:e,responseType:"json"})).data}))),[e]))({cdnURL:a}),u=new oe(null!=c?c:pe.fallback),h={baseURL:e,cdnURL:a,container:r,features:o,getToken:s,locale:n,onError:p,scope:d,theme:u};return ae(X,Object.assign({},h,{children:ae(te,Object.assign({cdnUrl:a,reference:d||void 0,resolveIcon:m,theme:u},{children:ae(se,Object.assign({baseURL:e,defaultQueryClientOptions:g,getToken:s,headers:i,onApiError:l},{children:ae(Y,{children:t})}))}))}))},ce=({baseURL:e,children:a,features:t})=>{const r=le((()=>new oe),[]),o=$(["globalFeatures"]),s=ne((()=>"none"),[]),i={baseURL:e,cdnURL:"mockCdnUrl",getFeatures:e=>{var a;return ee(null!==(a=$([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 ae(_.Provider,Object.assign({value:i},{children:ae(re,Object.assign({theme:r},{children:ae(se,Object.assign({baseURL:e,getToken:s},{children:a}))}))}))};export{de as ElementsProvider,ce as ElementsTestProvider};
1
+ import{E as X,a as _}from"./actions-menu.js";export{z as Actions,y as ActionsMenu,A as AddFundsForm,b as AutoFundingForm,B as ButtonGroup,C as CarrierBalance,d as CarrierConnectionCard,e as CarrierIcon,f as CollapsiblePanel,h as CopyButton,i as Cube,D as DateRangeCombo,j as DateRangeSelect,k as DisplayTerm,l as EditBillingForm,a as ElementsContext,E as ElementsContextProvider,m as ErrorFallback,F as FieldLabel,n as FormPortal,o as FundAndPurchase,H as HistoryCard,p as HistoryCardExtension,I as InlineLabel,q as ItemsBreakdown,L as LinkAction,r as Loader,P as PoweredByShipEngine,R as RateDetails,S as Section,t as SettingsCard,u as SkeletonCarrierRow,v as Spacer,w as Spread,T as Tabs,V as VatForm,W as WalletCard,x as WarehouseForm,c as autoFundingSchema,g as getAddFundsSchema,s as styles,G as useElements}from"./actions-menu.js";export{C as CarrierLogo}from"./carrier-logo.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{R as Y}from"./use-toggle.js";export{P as Portal,R as RootPortalProvider,b as useAddressValidation,u as useCountryCodeOptions,c as useRootPortal,a as useStateCodeOptions,d 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{e as LabelLayout,l as LabelsGrid,m as ManageCarriers,b as ManageExternalCarriers,d as ManageFunding,a as ManageWarehouses,p as PaymentMethodSettings,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,l as useBlackboxDetection,u as useConfirmationOptions,a as useCustomsContentsOptions,b as useCustomsNonDeliveryOptions,c as useDateRangeOptions,d as useInsuranceProviderOptions,m as useNestedForm,e as usePackageOptions,f as useRateOptions,n as useRunOnceOnTrue,o as useScrubErrors,g as useServiceCodeOptions,k as useServicePoints,h as useShipmentMetadata,i as useShippingPresetsOptions,j as useWarehouseOptions}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{m as moneySchema}from"./money.js";export{p as phoneSchema,a as phoneSchemaUnvalidated}from"./phone.js";export{a as assert,r as raise}from"./assertions.js";export{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 Z}from"./carrier.js";export{L as addEmailToValidation,t as addSpaceBetweenWords,w as calculateTotal,k as capitalizeFirstLetter,l as capitalizeFirstLetterOfEachWord,u as currencySymbol,e as daysAfter,S as filterFundingSourceCarriers,a as findDateLocale,b as formatByDateAndLocale,x as formatCreditCardNumber,f as formatDate,c as formatDateDDMMYY,d as formatDateDDMMYYYY,y as formatExpiration,v as formatMoney,O as getCarrierIdByCarrierCode,z as getCurrencyFromString,A as getCurrencySymbolFromString,h as getExpirationYears,P as getLogoOrIconByCarrierCode,B as getRateRequiresAcknowledgement,j as getRelativeDates,C as getTotalRateAmount,g as getlocaleDateStringFormat,E as isDomesticAddress,K as isEmptyAddress,Q as isGlobalPostEligible,F as isMilitaryAddress,i as isNowOrInTheFuture,I as isPoBox,J as isPoBoxAddress,R as isSendleEligible,G as isUnitedStatesTerritory,H as isUnsupportedByUps,N as isUpsCarrier,M as isUspsCarrier,m as mostRecent,n as nextDayCutoff,o as omitTime,D as overrideCarrierCodes,p as parseLocaleDate,q as pascalize,r as replaceSpacesWithDashes,s as sortByCreationDate}from"./carrier.js";export{k as convertDecimalWeightToFractionalWeight,j as convertFractionalWeightToDecimalWeight,h as convertPoundsAndOuncesToOunces,l as convertWeight,c as createCodedErrors,m as formatFractionalWeight,g as getCustomsFromSalesOrder,o as getDefaultWarehouse,b as getIsCustomsRequiredForSalesOrder,d as getRequestedServices,e as getSalesOrderItemsFromSalesOrderOrShipment,f as isDecimalWeight,n as isFlatRatePackageCode,i as isMetricWeightUnit,a as throwAny,t as throwJoinedMessages}from"./warehouses.js";import{g as $,d as ee}from"./vat.js";export{N as NO_VAT_COUNTRIES,c as aggregateRateDetailItems,e as calculateRateDetailBreakdown,h as createStyles,d as deepMergeFeatures,j as errorMap,f as featureFlagComponentNameLookup,a as formLogger,g as getDefaultFeatures,k as getIsVatRequired,i as isObject,b as isString,t as trackingStatusFormatter,v as validationResolver}from"./vat.js";export{a as AccountSettings,l as LabelWorkflow,o as Onboarding}from"./wallet-form.js";import{jsx as ae}from"@emotion/react/jsx-runtime";import{GigerProvider as te,GigerTestProvider as re}from"@shipengine/giger";import{Theme as se}from"@shipengine/giger-theme";import{ShipEngine as oe}from"@shipengine/react-api";import ie from"axios";import{useCallback as ne,useMemo as le}from"react";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"react-dom";import"@tanstack/react-query";import"lodash/merge";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"lodash/orderBy";import"date-fns/format";import"date-fns/locale";import"date-fns/parse";import"lodash/get";import"@hookform/resolvers/zod";var pe={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 de=({baseURL:e="https://elements.shipengine.com",cdnURL:a="https://cdn.packlink.com",children:t,container:r,features:s,getToken:o,headers:i,locale:n,onApiError:l,onError:p=(()=>{}),scope:d="lmnt",themeConfig:c,defaultQueryClientOptions:g})=>{const m=(({cdnURL:e})=>ne((a=>Z(void 0,void 0,void 0,(function*(){return(yield ie.get(`/brand/fallback/icons/${a.toLowerCase()}.svg`,{baseURL:e,responseType:"json"})).data}))),[e]))({cdnURL:a}),u=new se(null!=c?c:pe.fallback),h={baseURL:e,cdnURL:a,container:r,features:s,getToken:o,locale:n,onError:p,scope:d,theme:u};return ae(X,Object.assign({},h,{children:ae(te,Object.assign({cdnUrl:a,reference:d||void 0,resolveIcon:m,theme:u},{children:ae(oe,Object.assign({baseURL:e,defaultQueryClientOptions:g,getToken:o,headers:i,onApiError:l},{children:ae(Y,{children:t})}))}))}))},ce=({baseURL:e,children:a,features:t})=>{const r=le((()=>new se),[]),s=$(["globalFeatures"]),o=ne((()=>"none"),[]),i={baseURL:e,cdnURL:"mockCdnUrl",getFeatures:e=>{var a;return ee(null!==(a=$([e]))&&void 0!==a?a:{},null==t?void 0:t[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"]},s),t.globalFeatures),onError:()=>{},scope:"lmnt",theme:r};return ae(_.Provider,Object.assign({value:i},{children:ae(re,Object.assign({theme:r},{children:ae(oe,Object.assign({baseURL:e,getToken:o},{children:a}))}))}))};export{de as ElementsProvider,ce as ElementsTestProvider};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipengine/elements",
3
- "version": "2.3.1",
3
+ "version": "2.5.0",
4
4
  "peerDependencies": {
5
5
  "@emotion/react": "11.x",
6
6
  "react-i18next": "11.x",
@@ -37,9 +37,10 @@
37
37
  "@rjsf/validator-ajv8": "5.16.1",
38
38
  "@shipengine/giger": "1.15.0",
39
39
  "@shipengine/giger-theme": "1.6.0",
40
- "@shipengine/js-api": "1.30.2",
41
- "@shipengine/react-api": "2.15.3",
40
+ "@shipengine/js-api": "2.0.1",
41
+ "@shipengine/react-api": "3.1.2",
42
42
  "@storybook/addons": "6.5.16",
43
+ "@storybook/api": "6.5.16",
43
44
  "@storybook/components": "7.0.0-rc.1",
44
45
  "@storybook/core-events": "7.0.0-rc.1",
45
46
  "@storybook/manager-api": "7.0.0-rc.1",
@@ -58,6 +59,7 @@
58
59
  "libphonenumber-js": "1.10.14",
59
60
  "lodash": "4.17.21",
60
61
  "react-hook-form": "7.40.0",
62
+ "react-use": "17.4.2",
61
63
  "rollup-plugin-copy": "3.4.0",
62
64
  "stylis": "4.1.3",
63
65
  "use-debounce": "10.0.0",
@@ -3,7 +3,8 @@ export declare enum Actions {
3
3
  VOID_LABEL = 1,
4
4
  PRINT_FORMS = 2,
5
5
  EDIT = 3,
6
- REMOVE = 4
6
+ REMOVE = 4,
7
+ VIEW_DETAILS = 5
7
8
  }
8
9
  type ActionsMenuProps = {
9
10
  /** An array of allowed Actions to be rendered */
@@ -0,0 +1,6 @@
1
+ import { WithCommonProps } from "@shipengine/giger";
2
+ export type ErrorStateProps = {
3
+ subtitle?: string | string[];
4
+ title: string;
5
+ };
6
+ export declare const ErrorState: ({ title, subtitle, ...rest }: WithCommonProps<ErrorStateProps>) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,14 +1,18 @@
1
1
  export declare const styles: {
2
2
  container: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
3
+ alignItems: "center";
4
+ display: "flex";
5
+ flexDirection: "column";
6
+ margin: string;
3
7
  padding: number;
4
- };
5
- description: {
8
+ rowGap: number;
6
9
  textAlign: "center";
7
10
  };
8
- header: {
9
- alignItems: "center";
11
+ icon: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
12
+ color: string;
13
+ };
14
+ subtitleContainer: {
10
15
  display: "flex";
11
16
  flexDirection: "column";
12
- textAlign: "center";
13
17
  };
14
18
  };
@@ -0,0 +1 @@
1
+ export * from "./error-state";
@@ -14,6 +14,7 @@ export type FieldControllerProps<NP, TFieldValues extends FieldValues = FieldVal
14
14
  inputOnly?: boolean;
15
15
  isOptional?: boolean;
16
16
  label: string;
17
+ labelPosition?: FieldLabelProps["position"];
17
18
  labelWeight?: FieldLabelProps["weight"];
18
19
  labelWidth?: FieldLabelProps["width"];
19
20
  nativeLabel?: boolean;
@@ -21,7 +22,7 @@ export type FieldControllerProps<NP, TFieldValues extends FieldValues = FieldVal
21
22
  type FieldControllerOptions = {
22
23
  inputOnly?: boolean;
23
24
  };
24
- export declare const createFieldController: <P>(options?: FieldControllerOptions) => <TFieldValues extends FieldValues = FieldValues, TName extends import("react-hook-form").Path<TFieldValues> = import("react-hook-form").Path<TFieldValues>>({ children, control, defaultValue, displayErrors, displayLabel, errors: errorsProp, hint, inputOnly, isOptional, label, labelInfo, labelWeight, labelWidth, name, nativeLabel, rules, shouldUnregister, subLabel, ...formInputProps }: FieldControllerProps<P, TFieldValues, TName>) => JSX.Element;
25
+ export declare const createFieldController: <P>(options?: FieldControllerOptions) => <TFieldValues extends FieldValues = FieldValues, TName extends import("react-hook-form").Path<TFieldValues> = import("react-hook-form").Path<TFieldValues>>({ children, control, defaultValue, displayErrors, displayLabel, errors: errorsProp, hint, inputOnly, isOptional, label, labelInfo, labelWeight, labelWidth, labelPosition, name, nativeLabel, rules, shouldUnregister, subLabel, ...formInputProps }: FieldControllerProps<P, TFieldValues, TName>) => JSX.Element;
25
26
  export type ControlledFieldProps = Parameters<ControlledField>[0];
26
27
  export type ControlledField<NP = object, CP = object, OK extends string = ""> = <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>(fieldProps: Omit<FieldControllerProps<NP, TFieldValues, TName>, "children" | OK> & CP) => JSX.Element;
27
28
  export {};
@@ -8,6 +8,7 @@ export type FieldLabelProps = {
8
8
  children: React.ReactNode;
9
9
  label?: string;
10
10
  labelInfo?: React.ReactNode;
11
+ position?: "horizontal" | "vertical";
11
12
  subLabel?: string;
12
13
  weight?: "bold" | "normal";
13
14
  width?: string | number;
@@ -18,4 +19,4 @@ export type FieldLabelProps = {
18
19
  *
19
20
  * # Field Label Component
20
21
  */
21
- export declare const FieldLabel: ({ children, label, labelInfo, subLabel, weight, withInput, width, }: FieldLabelProps) => import("@emotion/react/jsx-runtime").JSX.Element;
22
+ export declare const FieldLabel: ({ children, label, labelInfo, subLabel, weight, withInput, position, width, }: FieldLabelProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,4 +1,20 @@
1
1
  export declare const styles: {
2
+ getLabel: ({ withInput, subLabel, width, isVertical, }: {
3
+ isVertical?: boolean | undefined;
4
+ subLabel?: string | undefined;
5
+ width?: string | number | undefined;
6
+ withInput?: boolean | undefined;
7
+ }) => (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
8
+ flexShrink: number;
9
+ paddingTop: number | undefined;
10
+ width: string | number;
11
+ };
12
+ getWrapper: (isVertical: boolean) => (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
13
+ flexDirection?: "column" | undefined;
14
+ gap: number;
15
+ display: "flex";
16
+ width: string;
17
+ };
2
18
  iconTooltip: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
3
19
  color: string;
4
20
  marginLeft: number;
@@ -1,14 +1,32 @@
1
1
  import { ReactNode } from "react";
2
- type ColumnProps<T> = {
2
+ export type ColumnProps<T> = {
3
3
  headerContent: ReactNode;
4
4
  renderCellContent: (data: T) => ReactNode;
5
5
  };
6
+ /**
7
+ * @internal
8
+ *
9
+ * # Grid Props
10
+ *
11
+ * @see {@link GridController | The `<GridController />` component}
12
+ */
6
13
  type GridProps<T extends object> = {
7
14
  columns: ColumnProps<T>[];
8
15
  data: T[];
16
+ emptyContent?: ReactNode;
17
+ filters?: ReactNode;
9
18
  footerContent?: ReactNode;
10
19
  onRowClick?: (data: T) => void;
11
20
  useCheckboxes?: boolean;
12
21
  };
13
- export declare const GridController: <T extends object>({ columns, data, footerContent, onRowClick, useCheckboxes, }: GridProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
22
+ /**
23
+ * @internal
24
+ *
25
+ * # Grid Controller
26
+ *
27
+ * - The `<GridController />` component is used to facilitate the display of data in a grid format.
28
+ *
29
+ * @see {@link GridProps | The props for the `<GridController />` component}
30
+ */
31
+ export declare const GridController: <T extends object>({ columns, data, footerContent, onRowClick, useCheckboxes, filters, emptyContent, }: GridProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
14
32
  export {};
@@ -1,11 +1,23 @@
1
1
  export declare const styles: {
2
- checkboxHeader: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
3
- width: number;
2
+ getCheckboxHeader: (theme: any) => {
3
+ width: any;
4
4
  };
5
+ getFilters: (theme: any) => {
6
+ borderBottom: string;
7
+ padding: string;
8
+ };
9
+ getTableHeader: (theme: any) => {
10
+ background: any;
11
+ };
12
+ getWrapper: (theme: any) => any;
5
13
  table: {
6
- "*": {
7
- overflow: "hidden";
8
- textOverflow: "clip !important";
9
- };
14
+ tableLayout: "initial";
15
+ };
16
+ tableFooter: {
17
+ borderTop: string;
18
+ justifyContent: "space-between";
19
+ };
20
+ tableWrapper: {
21
+ border: string;
10
22
  };
11
23
  };
@@ -0,0 +1,27 @@
1
+ /// <reference types="react" />
2
+ /**
3
+ * @internal
4
+ *
5
+ * # Grid Footer Props
6
+ *
7
+ * @see {@link GridFooter | The `<GridFooter />` component}
8
+ */
9
+ interface GridFooterProps {
10
+ onPageChange: (nextPage: number) => void;
11
+ page: number;
12
+ pages: number;
13
+ pageSize: number;
14
+ showPagination: boolean;
15
+ total: number;
16
+ }
17
+ /**
18
+ * @internal
19
+ *
20
+ * # GridFooter
21
+ *
22
+ * - The `<GridFooter />` component that handle grid footer with pagination.
23
+ *
24
+ * @see {@link GridFooterProps | The props for the `<GridFooter />` component}
25
+ */
26
+ export declare const GridFooter: ({ page, pages, pageSize, total, showPagination, onPageChange, }: GridFooterProps) => JSX.Element;
27
+ export {};
@@ -1,2 +1,4 @@
1
1
  export * from "./grid-controller";
2
2
  export * from "./cell-formatted-date";
3
+ export * from "./grid-footer";
4
+ export type { ColumnProps } from "./grid-controller";
@@ -0,0 +1,30 @@
1
+ /**
2
+ * @internal
3
+ *
4
+ * # Grid Filters Props
5
+ *
6
+ * @see {@link GridFilters | The `<GridFilters />` component}
7
+ */
8
+ type GridFilterProps = {
9
+ filters: IGridFilters;
10
+ onClearAllFilters: () => void;
11
+ onFiltersUpdated: (params: IGridFilters) => void;
12
+ };
13
+ export type IGridFilter<T> = {
14
+ enabled: boolean;
15
+ value: T | null;
16
+ };
17
+ export interface IGridFilters {
18
+ shipmentId: IGridFilter<string>;
19
+ }
20
+ /**
21
+ * @internal
22
+ *
23
+ * # GridFilters
24
+ *
25
+ * - The `<GridFilters />` component includes Filters used in ShipmentsGrid and LabelsGrid component.
26
+ *
27
+ * @see {@link GridFiltersProps | The props for the `<GridFilters />` component}
28
+ */
29
+ export declare const GridFilters: ({ filters, onFiltersUpdated, onClearAllFilters }: GridFilterProps) => import("@emotion/react/jsx-runtime").JSX.Element;
30
+ export {};
@@ -0,0 +1,11 @@
1
+ export declare const styles: {
2
+ getButtons: (theme: any) => {
3
+ display: "flex";
4
+ gap: any;
5
+ justifyContent: "flex-end";
6
+ };
7
+ getLabel: (theme: any) => {
8
+ display: "inline-block";
9
+ marginBottom: any;
10
+ };
11
+ };
@@ -0,0 +1,2 @@
1
+ export { GridFilters } from './grid-filters';
2
+ export type { IGridFilters } from './grid-filters';
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+ export declare const shipmentIdFormSchema: z.ZodObject<{
3
+ shipmentId: z.ZodString;
4
+ }, "strip", z.ZodTypeAny, {
5
+ shipmentId: string;
6
+ }, {
7
+ shipmentId: string;
8
+ }>;
9
+ export type ShipmentIdFormFields = z.input<typeof shipmentIdFormSchema>;
@@ -0,0 +1,23 @@
1
+ import { IGridFilters } from "./grid-filters";
2
+ /**
3
+ * @internal
4
+ *
5
+ * # Shipment Id Filter Props
6
+ *
7
+ * @see {@link ShipmentIdFilter | The `<ShipmentIdFilter />` component}
8
+ */
9
+ type ShipmentIdFilterProps = {
10
+ filters: IGridFilters;
11
+ onFiltersUpdated: (params: IGridFilters) => void;
12
+ };
13
+ /**
14
+ * @internal
15
+ *
16
+ * # ShipmentIdFilter
17
+ *
18
+ * - The `<ShipmentIdFilter />` component handle shipment id filter used in Shipments Grid.
19
+ *
20
+ * @see {@link ShipmentIdFilterProps | The props for the `<ShipmentIdFilter />` component}
21
+ */
22
+ export declare const ShipmentIdFilter: ({ filters, onFiltersUpdated }: ShipmentIdFilterProps) => import("@emotion/react/jsx-runtime").JSX.Element;
23
+ export {};
@@ -14,11 +14,13 @@ export * from "./display-term";
14
14
  export * from "./drawer";
15
15
  export * from "./edit-billing-form";
16
16
  export * from "./error-fallback";
17
+ export * from "./error-state";
17
18
  export * from "./field-label";
18
19
  export * from "./field";
19
20
  export * from "./form-portal";
20
21
  export * from "./fund-and-purchase";
21
22
  export * from "./grid-controller";
23
+ export * from "./grid-filters";
22
24
  export * from "./history";
23
25
  export * from "./inline-label";
24
26
  export * from "./items-breakdown";
@@ -4,7 +4,8 @@ type AddressDisplayProps = {
4
4
  decoratorText?: string;
5
5
  nickname?: string;
6
6
  onEdit?: () => Promise<void> | void;
7
+ showEmail?: boolean;
7
8
  typographyVariant?: "body1" | "body2";
8
9
  };
9
- export declare const AddressDisplay: ({ address, decoratorText, nickname, onEdit, typographyVariant, }: AddressDisplayProps) => import("@emotion/react/jsx-runtime").JSX.Element;
10
+ export declare const AddressDisplay: ({ address, decoratorText, nickname, onEdit, showEmail, typographyVariant, }: AddressDisplayProps) => import("@emotion/react/jsx-runtime").JSX.Element;
10
11
  export {};
@@ -8,6 +8,6 @@ export type WalletPayload = {
8
8
  export type WalletFormProps = {
9
9
  address: SE.Address;
10
10
  errors?: SE.CodedError[] | null;
11
- onSubmit: (payload: WalletPayload) => Promise<void>;
11
+ onSubmit: (payload: WalletPayload) => void;
12
12
  };
13
13
  export declare const WalletForm: ({ address, errors, onSubmit }: WalletFormProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- export declare const getWarehouseSchema: (useStrict: boolean) => z.ZodDiscriminatedUnion<"returnToAddressIsDifferent", z.Primitive, z.ZodObject<{
2
+ export declare const getWarehouseSchema: (useStrict: boolean, emailRequired?: boolean) => z.ZodDiscriminatedUnion<"returnToAddressIsDifferent", z.Primitive, z.ZodObject<{
3
3
  isDefault: z.ZodBoolean;
4
4
  name: z.ZodString;
5
5
  originAddress: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<z.extendShape<{
@@ -16,6 +16,7 @@ export declare const getWarehouseSchema: (useStrict: boolean) => z.ZodDiscrimina
16
16
  }, {
17
17
  addressResidentialIndicator: z.ZodEffects<z.ZodEffects<z.ZodDefault<z.ZodBoolean>, "yes" | "no", boolean | undefined>, "yes" | "no", unknown>;
18
18
  companyName: z.ZodString;
19
+ email: z.ZodString | z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string | undefined, string | null | undefined>;
19
20
  name: z.ZodString;
20
21
  phone: z.ZodString;
21
22
  }>, "strip", z.ZodTypeAny, {
@@ -129,6 +130,7 @@ export declare const getWarehouseSchema: (useStrict: boolean) => z.ZodDiscrimina
129
130
  }, {
130
131
  addressResidentialIndicator: z.ZodEffects<z.ZodEffects<z.ZodDefault<z.ZodBoolean>, "yes" | "no", boolean | undefined>, "yes" | "no", unknown>;
131
132
  companyName: z.ZodString;
133
+ email: z.ZodString | z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string | undefined, string | null | undefined>;
132
134
  name: z.ZodString;
133
135
  phone: z.ZodString;
134
136
  }>, "strip", z.ZodTypeAny, {
@@ -306,6 +308,7 @@ export declare const getWarehouseSchema: (useStrict: boolean) => z.ZodDiscrimina
306
308
  }, {
307
309
  addressResidentialIndicator: z.ZodEffects<z.ZodEffects<z.ZodDefault<z.ZodBoolean>, "yes" | "no", boolean | undefined>, "yes" | "no", unknown>;
308
310
  companyName: z.ZodString;
311
+ email: z.ZodString | z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string | undefined, string | null | undefined>;
309
312
  name: z.ZodString;
310
313
  phone: z.ZodString;
311
314
  }>, "strip", z.ZodTypeAny, {
@@ -5,6 +5,7 @@ export type WarehouseFormProps<T = undefined> = {
5
5
  onCancel?: () => void;
6
6
  onDelete?: () => void;
7
7
  onSubmit: (payload: WarehousePayload) => void;
8
+ requireEmail?: boolean;
8
9
  shouldForceDefault?: boolean;
9
10
  submitButtonTitle: string;
10
11
  useStrictSchema?: boolean;
@@ -16,4 +17,4 @@ export type WarehouseFormProps<T = undefined> = {
16
17
  formId?: string;
17
18
  portalRef?: never;
18
19
  });
19
- export declare const WarehouseForm: <T extends Element>({ onCancel, formId, onDelete, onSubmit, portalRef, submitButtonTitle, warehouse, shouldForceDefault, useStrictSchema, }: WarehouseFormProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
20
+ export declare const WarehouseForm: <T extends Element>({ onCancel, formId, onDelete, onSubmit, portalRef, requireEmail, submitButtonTitle, warehouse, shouldForceDefault, useStrictSchema, }: WarehouseFormProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;