@shipengine/elements 2.9.1 → 2.10.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/carrier.js +1 -1
- package/components.js +1 -1
- package/elements.js +1 -1
- package/hooks.js +1 -1
- package/index.js +1 -1
- package/{warehouses.js → insurance.js} +1 -1
- package/package.json +3 -3
- package/shipment.js +1 -1
- package/src/components/add-funds-form/add-funds-form.d.ts +2 -1
- package/src/components/enable-insurance-banner/enable-insurance-banner.d.ts +8 -0
- package/src/components/enable-insurance-banner/enable-insurance-banner.styles.d.ts +37 -0
- package/src/components/enable-insurance-banner/index.d.ts +1 -0
- package/src/components/field/rate-card/insurance-popover/index.d.ts +1 -0
- package/src/components/field/rate-card/insurance-popover/insurance-popover.d.ts +11 -0
- package/src/components/field/rate-card/insurance-popover/insurance-popover.styles.d.ts +14 -0
- package/src/components/field/rate-card/rate-card.d.ts +1 -1
- package/src/components/field/rate-card/rate-card.styles.d.ts +1 -0
- package/src/components/fund-and-purchase/fund-and-purchase.d.ts +2 -1
- package/src/components/templates/index.d.ts +1 -0
- package/src/components/templates/label/label.d.ts +1 -0
- package/src/components/templates/rate-form/rate-form.styles.d.ts +3 -0
- package/src/components/templates/rate-form/rate-view.d.ts +36 -0
- package/src/components/templates/register-funding-source-insurance-form/index.d.ts +2 -0
- package/src/components/templates/register-funding-source-insurance-form/register-funding-source-insurance-form-shema.d.ts +10 -0
- package/src/components/templates/register-funding-source-insurance-form/register-funding-source-insurance-form.d.ts +15 -0
- package/src/components/templates/register-funding-source-insurance-form/register-funding-source-insurance-from.styles.d.ts +14 -0
- package/src/components/templates/shipment/shipment.d.ts +1 -1
- package/src/components/templates/shipment-form/sections/customs-forms/components/index.d.ts +1 -0
- package/src/components/templates/shipment-form/sections/customs-forms/components/windsor-framework/windsor-framework.d.ts +7 -0
- package/src/components/templates/shipment-form/sections/customs-forms/components/windsor-framework/windsor-framework.styles.d.ts +20 -0
- package/src/components/templates/shipment-form/sections/customs-forms/customs-forms.d.ts +2 -1
- package/src/components/templates/shipment-form/shipment-form.styles.d.ts +20 -0
- package/src/components/templates/shipment-form/shipment-schema.d.ts +201 -13
- package/src/elements/label-layout/label-layout-element.d.ts +59 -6
- package/src/elements/labels-grid/labels-grid.d.ts +67 -15
- package/src/elements/manage-carriers/manage-carriers.d.ts +59 -6
- package/src/elements/manage-external-carriers/manage-external-carriers.d.ts +81 -27
- package/src/elements/manage-funding/manage-funding-element.d.ts +59 -6
- package/src/elements/manage-warehouses/manage-warehouses.d.ts +59 -6
- package/src/elements/payment-method-settings/payment-method-settings-element.d.ts +59 -6
- package/src/elements/purchase-label/purchase-label.d.ts +83 -22
- package/src/elements/shipment-summary/shipment-summary.d.ts +102 -27
- package/src/elements/shipments-grid/hooks/use-shipments-grid.d.ts +4 -0
- package/src/elements/shipments-grid/shipments-grid.d.ts +61 -13
- package/src/elements/theme-creator/theme-creator.d.ts +59 -6
- package/src/elements/transaction-history/transaction-history-element.d.ts +59 -6
- package/src/elements/unit-settings/unit-settings-element.d.ts +59 -6
- package/src/elements/vat-settings/vat-settings-element.d.ts +59 -6
- package/src/elements/void-label/void-label.d.ts +73 -57
- package/src/features/manage-carriers/hooks/use-list-funding-source-carriers.d.ts +3 -1
- package/src/features/manage-carriers/manage-insurance-provider-row/index.d.ts +1 -0
- package/src/features/manage-carriers/manage-insurance-provider-row/info-popover.d.ts +10 -0
- package/src/features/manage-carriers/manage-insurance-provider-row/manage-insurance-provider-row.d.ts +7 -0
- package/src/features/manage-carriers/manage-insurance-provider-row/manage-insurance-provider-row.styles.d.ts +37 -0
- package/src/hooks/index.d.ts +1 -0
- package/src/hooks/insurance/index.d.ts +2 -0
- package/src/hooks/insurance/use-get-funding-source-insurance-provider.d.ts +14 -0
- package/src/hooks/insurance/use-manage-funding-source-insurance.d.ts +10 -0
- package/src/hooks/options/index.d.ts +2 -0
- package/src/hooks/options/use-insurance-provider-options.d.ts +8 -3
- package/src/hooks/options/use-movement-indicator-options.d.ts +12 -0
- package/src/hooks/options/use-rate-options.d.ts +4 -1
- package/src/hooks/options/use-windsor-framework.d.ts +9 -0
- package/src/locales/en/index.d.ts +59 -6
- package/src/types/index.d.ts +1 -0
- package/src/types/insurance-metadata.d.ts +25 -0
- package/src/utilities/feature-flags/types.d.ts +8 -0
- package/src/utilities/shipengine/carrier.d.ts +16 -0
- package/src/utilities/shipengine/index.d.ts +1 -0
- package/src/utilities/shipengine/insurance.d.ts +17 -0
- package/src/workflows/account-settings/account-settings.d.ts +86 -7
- package/src/workflows/carrier-services/carrier-services.d.ts +59 -6
- package/src/workflows/connect-external-carrier/connect-external-carrier.d.ts +59 -6
- package/src/workflows/onboarding/components/carrier-recovery-form/carrier-recovery-form-schema.d.ts +18 -18
- package/src/workflows/onboarding/components/confirmation-and-submission-step/use-confirmation-and-submission-step.d.ts +4 -2
- package/src/workflows/onboarding/components/terms-agreement-form/terms-agreement-form.d.ts +2 -1
- package/src/workflows/onboarding/components/terms-agreement-step/terms-agreement-step.d.ts +4 -3
- package/src/workflows/onboarding/components/terms-agreement-step/terms-agreement-step.styles.d.ts +4 -0
- package/src/workflows/onboarding/components/terms-agreement-step/use-terms-agreement-step.d.ts +3 -3
- package/src/workflows/onboarding/onboarding.d.ts +60 -7
- package/suspend-text.js +1 -1
- package/transaction-history-element.js +1 -1
- package/use-run-once-on-true.js +1 -0
- package/use-scrub-errors.js +1 -1
- package/use-toggle.js +1 -1
- package/use-unit-settings.js +1 -1
- package/usePager.js +1 -1
- package/utilities.js +1 -1
- package/vat.js +1 -1
- package/wallet-form.js +1 -1
- package/workflows.js +1 -1
- package/carrier-logo.js +0 -1
package/carrier.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{format as e}from"date-fns/format";import{ca as t,de as r,enAU as a,enGB as n,enUS as s,es as o,fr as i,it as c,pt as u}from"date-fns/locale";import{parse as l}from"date-fns/parse";import d from"humps";import{SE as g}from"@shipengine/react-api";import{c as p,u as m,f as y}from"./address.js";function f(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]])}return r}function D(e,t,r,a){return new(r||(r=Promise))((function(n,s){function o(e){try{c(a.next(e))}catch(e){s(e)}}function i(e){try{c(a.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,i)}c((a=a.apply(e,t||[])).next())}))}const w=(e,t="en-US")=>new Date(e).toLocaleDateString(t,{day:"numeric",month:"long",year:"numeric"}),v=(e="en-US")=>{const l=e.replaceAll("-",""),d=e.split("-")[0],g={ca:t,de:r,enAU:a,enGB:n,enUS:s,es:o,fr:i,it:c,pt:u};return g[l in g?l:d]},h=(t,r="en-US",a)=>{const n=v(r),s=S(r);return e(t,null!=a?a:s,{locale:n})},b=(e,t="en-US",r="P")=>{const a=v(t);return l(e,r,new Date,{locale:a})},C=(e,t="en-US")=>new Date(e).toLocaleDateString(t,{day:"2-digit",month:"2-digit",year:"2-digit"}),U=(e,t="en-US")=>new Date(e).toLocaleDateString(t,{day:"2-digit",month:"2-digit",year:"numeric"}),S=(e="en-US")=>{var t;return null===(t=(v(e)||v("en-US")).formatLong)||void 0===t?void 0:t.date({width:"short"})},O=(e,t=new Date)=>((t=new Date(t)).setDate(t.getDate()+e),t),A=(e,t=new Date)=>t.getHours()>=e?O(1,new Date(t)):new Date(t),j=(...e)=>new Date(Math.max(...e.map(Number))),_=e=>{const t=e?new Date(e):new Date;return new Date(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate())},L=e=>{const t=(new Date).getFullYear(),r=[];for(let a=0;a<e;a++)r.push(`${t+a}`);return r},M=(e,t,r="desc")=>{const[a,n]="asc"===r?[e,t]:[t,e];return new Date(a.createdAt).getTime()-new Date(n.createdAt).getTime()},$=e=>!!e&&("string"==typeof e?new Date(e):e)>=new Date,P=e=>{const t=null!=e?e:new Date;return{firstDayOfMonth:new Date(t.getFullYear(),t.getMonth(),1),lastDayOfTheMonth:new Date(t.getFullYear(),t.getMonth()+1,0),origin:t,previousMonthFirstDay:new Date(t.getFullYear(),t.getMonth()-1,1),previousMonthLastDay:new Date(t.getFullYear(),t.getMonth()-1+1,0),thirtyDaysAgo:new Date((new Date).setDate(t.getDate()-30))}},T=e=>e.slice(0,1).toUpperCase()+e.slice(1),x=e=>e.split(" ").map((e=>T(e.toLowerCase()))).join(" "),F=e=>d.pascalize(e),z=e=>null==e?void 0:e.replace(/\s+/g,"-").toLowerCase(),B=e=>e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/(?<=[a-zA-Z])(\d)/g," $1").trim(),Y={aud:"$",cad:"$",eur:"€",gbp:"£",nzd:"$",usd:"$"},G=(e,t="en-US")=>Intl.NumberFormat(t,{currency:e.currency,style:"currency"}).format(e.amount),N=(...e)=>e.reduce(((e,t)=>{var r;return t?e+(null!==(r=t.amount)&&void 0!==r?r:0):e}),0),k=e=>[e.substring(0,4),e.substring(4,8),e.substring(8,12),e.substring(12)].join(" ").trim(),E=e=>{const t=e.replace(/\//g,"");return t.length>2?[t.substring(0,2),t.substring(2,6)].join("/").trim():t},I=e=>{switch(null==e?void 0:e.toLowerCase()){case"usd":default:return g.Currency.USD;case"cad":return g.Currency.CAD;case"aud":return g.Currency.AUD;case"gbp":return g.Currency.GBP;case"eur":return g.Currency.EUR;case"nzd":return g.Currency.NZD}},Z=e=>{let t;switch(e){case g.Currency.USD:case g.Currency.CAD:case g.Currency.AUD:case g.Currency.NZD:t="$";break;case g.Currency.GBP:t="£";break;case g.Currency.EUR:t="€"}return t},R=(e,t,r)=>{switch(e){case"usps_media_mail":return!0;case"usps_first_class_mail":return"large_envelope_or_flat"===t;case"dhl_express_worldwide":return r;default:return!1}},H=(e={})=>N(...Object.values(e)),q=(e,t)=>t[e]||e,J=e=>{var t;return"US"===e.countryCode||(null===(t=p.find((t=>t.code===e.countryCode)))||void 0===t?void 0:t.isUnitedStatesTerritory)},K=e=>{var t,r;return!(!(null===(t=m.find((t=>t.code===e.stateProvince)))||void 0===t?void 0:t.isMilitary)&&!(null===(r=y.find((t=>t.code===e.cityLocality)))||void 0===r?void 0:r.isMilitary))},Q=e=>{var t,r;return!(!(null===(t=p.find((t=>t.code===e.countryCode)))||void 0===t?void 0:t.isUnitedStatesTerritory)&&!(null===(r=m.find((t=>t.code===e.stateProvince)))||void 0===r?void 0:r.isUnitedStatesTerritory))},V=e=>{var t;return!!(null===(t=p.find((t=>t.code===e.countryCode)))||void 0===t?void 0:t.isUnsupportedByUps)},W=/^(((p[\s\.\'\,]?[o\s][\.\'\,]?)\s?)|(post\s?office\s?))((box|bin|bo|b\.?)?\s?(num|number|#)?\s?\d+)/i,X=e=>W.test(e),ee=e=>!!(X(e.addressLine1)||e.addressLine2&&X(e.addressLine2)),te=e=>!e||Object.entries(e).every((([e,t])=>"countryCode"===e||[null,"","unknown"].includes(t))),re=(e,t)=>Object.assign(Object.assign(Object.assign({},e),e.matchedAddress&&{matchedAddress:Object.assign(Object.assign({},e.matchedAddress),{email:t})}),{originalAddress:Object.assign(Object.assign({},e.originalAddress),{email:t})}),ae=["usps","stamps_com"],ne=e=>ae.includes(e),se=e=>"ups"===e,oe=(e=[],t)=>{const r=e.find((e=>e.carrierCode===t));return null==r?void 0:r.carrierId},ie=(e,t)=>{var r;return`https://logos.shipstation.com/ipaas/carriers/${null!==(r={stamps_com:"stamps_com_wl"}[e])&&void 0!==r?r:e}/${t}.svg`},ce=e=>!!e&&["GB","CA"].includes(e),ue=e=>"AU"===e,le=(e,t)=>null==e?void 0:e.filter((e=>"globalpost"===e.carrierCode?ce(t):"sendle_walleted"!==e.carrierCode||ue(t)));export{Z as A,R as B,H as C,q as D,J as E,K as F,Q as G,V as H,X as I,ee as J,te as K,re as L,ne as M,se as N,oe as O,ie as P,ce as Q,ue as R,le as S,f as T,D as _,v as a,h as b,C as c,U as d,O as e,w as f,S as g,L as h,$ as i,P as j,T as k,x as l,j as m,A as n,_ as o,b as p,F as q,z as r,M as s,B as t,Y as u,G as v,N as w,k as x,E as y,I as z};
|
|
1
|
+
import{format as e}from"date-fns/format";import{ca as t,de as a,enAU as r,enGB as n,enUS as s,es as l,fr as c,it as i,pt as o}from"date-fns/locale";import{parse as d}from"date-fns/parse";import u from"humps";import{SE as p}from"@shipengine/react-api";import{c as v,u as m,f as g}from"./address.js";function h(e,t){var a={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(a[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(a[r[n]]=e[r[n]])}return a}function f(e,t,a,r){return new(a||(a=Promise))((function(n,s){function l(e){try{i(r.next(e))}catch(e){s(e)}}function c(e){try{i(r.throw(e))}catch(e){s(e)}}function i(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(l,c)}i((r=r.apply(e,t||[])).next())}))}const y=(e,t="en-US")=>new Date(e).toLocaleDateString(t,{day:"numeric",month:"long",year:"numeric"}),w=(e="en-US")=>{const d=e.replaceAll("-",""),u=e.split("-")[0],p={ca:t,de:a,enAU:r,enGB:n,enUS:s,es:l,fr:c,it:i,pt:o};return p[d in p?d:u]},D=(t,a="en-US",r)=>{const n=w(a),s=L(a);return e(t,null!=r?r:s,{locale:n})},M=(e,t="en-US",a="P")=>{const r=w(t);return d(e,a,new Date,{locale:r})},C=(e,t="en-US")=>new Date(e).toLocaleDateString(t,{day:"2-digit",month:"2-digit",year:"2-digit"}),b=(e,t="en-US")=>new Date(e).toLocaleDateString(t,{day:"2-digit",month:"2-digit",year:"numeric"}),L=(e="en-US")=>{var t;return null===(t=(w(e)||w("en-US")).formatLong)||void 0===t?void 0:t.date({width:"short"})},U=(e,t=new Date)=>((t=new Date(t)).setDate(t.getDate()+e),t),z=(e,t=new Date)=>t.getHours()>=e?U(1,new Date(t)):new Date(t),A=(...e)=>new Date(Math.max(...e.map(Number))),S=e=>{const t=e?new Date(e):new Date;return new Date(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate())},O=e=>{const t=(new Date).getFullYear(),a=[];for(let r=0;r<e;r++)a.push(`${t+r}`);return a},j=(e,t,a="desc")=>{const[r,n]="asc"===a?[e,t]:[t,e];return new Date(r.createdAt).getTime()-new Date(n.createdAt).getTime()},F=e=>!!e&&("string"==typeof e?new Date(e):e)>=new Date,_=e=>{const t=null!=e?e:new Date;return{firstDayOfMonth:new Date(t.getFullYear(),t.getMonth(),1),lastDayOfTheMonth:new Date(t.getFullYear(),t.getMonth()+1,0),origin:t,previousMonthFirstDay:new Date(t.getFullYear(),t.getMonth()-1,1),previousMonthLastDay:new Date(t.getFullYear(),t.getMonth()-1+1,0),thirtyDaysAgo:new Date((new Date).setDate(t.getDate()-30))}},x=e=>e.slice(0,1).toUpperCase()+e.slice(1),B=e=>e.split(" ").map((e=>x(e.toLowerCase()))).join(" "),V=e=>u.pascalize(e),$=e=>null==e?void 0:e.replace(/\s+/g,"-").toLowerCase(),P=e=>e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/(?<=[a-zA-Z])(\d)/g," $1").trim(),T={aud:"$",cad:"$",eur:"€",gbp:"£",nzd:"$",usd:"$"},k=(e,t="en-US")=>Intl.NumberFormat(t,{currency:e.currency,style:"currency"}).format(e.amount),Z=(...e)=>e.reduce(((e,t)=>{var a;return t?e+(null!==(a=t.amount)&&void 0!==a?a:0):e}),0),E=e=>[e.substring(0,4),e.substring(4,8),e.substring(8,12),e.substring(12)].join(" ").trim(),H=e=>{const t=e.replace(/\//g,"");return t.length>2?[t.substring(0,2),t.substring(2,6)].join("/").trim():t},Y=e=>{switch(null==e?void 0:e.toLowerCase()){case"usd":default:return p.Currency.USD;case"cad":return p.Currency.CAD;case"aud":return p.Currency.AUD;case"gbp":return p.Currency.GBP;case"eur":return p.Currency.EUR;case"nzd":return p.Currency.NZD}},G=e=>{let t;switch(e){case p.Currency.USD:case p.Currency.CAD:case p.Currency.AUD:case p.Currency.NZD:t="$";break;case p.Currency.GBP:t="£";break;case p.Currency.EUR:t="€"}return t},N=(e,t,a)=>{switch(e){case"usps_media_mail":return!0;case"usps_first_class_mail":return"large_envelope_or_flat"===t;case"dhl_express_worldwide":return a;default:return!1}},q=(e={})=>Z(...Object.values(e)),I=(e,t)=>t[e]||e,R=e=>{var t;return"US"===e.countryCode||(null===(t=v.find((t=>t.code===e.countryCode)))||void 0===t?void 0:t.isUnitedStatesTerritory)},J=e=>{var t,a;return!(!(null===(t=m.find((t=>t.code===e.stateProvince)))||void 0===t?void 0:t.isMilitary)&&!(null===(a=g.find((t=>t.code===e.cityLocality)))||void 0===a?void 0:a.isMilitary))},K=e=>{var t,a;return!(!(null===(t=v.find((t=>t.code===e.countryCode)))||void 0===t?void 0:t.isUnitedStatesTerritory)&&!(null===(a=m.find((t=>t.code===e.stateProvince)))||void 0===a?void 0:a.isUnitedStatesTerritory))},Q=e=>{var t;return!!(null===(t=v.find((t=>t.code===e.countryCode)))||void 0===t?void 0:t.isUnsupportedByUps)},W=/^(((p[\s\.\'\,]?[o\s][\.\'\,]?)\s?)|(post\s?office\s?))((box|bin|bo|b\.?)?\s?(num|number|#)?\s?\d+)/i,X=e=>W.test(e),ee=e=>!!(X(e.addressLine1)||e.addressLine2&&X(e.addressLine2)),te=e=>!e||Object.entries(e).every((([e,t])=>"countryCode"===e||[null,"","unknown"].includes(t))),ae=(e,t)=>Object.assign(Object.assign(Object.assign({},e),e.matchedAddress&&{matchedAddress:Object.assign(Object.assign({},e.matchedAddress),{email:t})}),{originalAddress:Object.assign(Object.assign({},e.originalAddress),{email:t})});const re=["usps","stamps_com"],ne=e=>re.includes(e),se=e=>"ups"===e,le=e=>e.includes("yodel"),ce=e=>"hermes"===e,ie=(e=[],t)=>{const a=e.find((e=>e.carrierCode===t));return null==a?void 0:a.carrierId},oe=(e,t)=>{var a;if("parcelguard"===e)return"logo"===t?"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='55' height='55' fill='none'%3e%3cmask id='a' width='55' height='55' x='0' y='0' maskUnits='userSpaceOnUse' style='mask-type:alpha'%3e%3cpath fill='%23FFFFFE' fill-rule='evenodd' d='M55 0H0v55h55zM32.238 10.76H24.39V7.997h7.847zM2.39 40.477l48.324-6.693V12.967L2.39 19.618z' clip-rule='evenodd'/%3e%3c/mask%3e%3cg fill-rule='evenodd' clip-rule='evenodd' mask='url(%23a)'%3e%3cpath fill='%23BBAE92' d='M10.136 9.38v31.096l17.726 10.908 18.03-10.908V9.456z'/%3e%3cpath fill='%23343534' d='M8.087 6.742c.49-.271 1.111-.413 1.751-.413H46.19c.64 0 1.26.142 1.75.413.462.255.99.742.99 1.477v32.75c0 .602-.342 1.13-.691 1.496-.354.37-.823.693-1.342.902L30.024 53.77a1 1 0 0 1-.144.07c-.556.21-1.232.3-1.867.3-.634 0-1.31-.09-1.867-.3a1 1 0 0 1-.143-.07L9.13 43.367a3.9 3.9 0 0 1-1.34-.902c-.35-.366-.692-.894-.692-1.496V8.219c0-.735.528-1.222.99-1.477m.663 1.577.006-.009zm.023-.026a.7.7 0 0 1 .125-.085c.198-.11.529-.204.94-.204H46.19c.41 0 .742.094.94.204a.7.7 0 0 1 .125.085v32.676q0-.006-.002.002c-.008.025-.046.148-.227.338a2.2 2.2 0 0 1-.8.522 1 1 0 0 0-.144.07L29.22 52.298c-.308.103-.74.167-1.206.167s-.897-.064-1.205-.167L9.945 41.902a1 1 0 0 0-.143-.07 2.2 2.2 0 0 1-.8-.523c-.182-.19-.22-.313-.227-.337q-.003-.009-.002-.003zm38.505.026-.006-.009q.007.01.006.01'/%3e%3cpath fill='%23343534' d='M32.81 1.106a.84.84 0 0 1 1.1-.44l13.887 5.946a.838.838 0 1 1-.66 1.54L33.252 2.206a.84.84 0 0 1-.44-1.1M26.343 3.567a.84.84 0 0 1-.643.994L9.327 8.075a.838.838 0 0 1-.351-1.638l16.373-3.514a.84.84 0 0 1 .994.644M22.73 7.25c0-.463.375-.838.838-.838h9.51c.462 0 .837.375.837.838v4.26a.84.84 0 0 1-.837.838h-9.51a.84.84 0 0 1-.838-.838zm1.675.838v2.584h7.835V8.088z'/%3e%3c/g%3e%3cpath fill='%23343534' fill-rule='evenodd' d='M9.36 22.741c-.144-.233-.375-.323-.777-.268l-1.944.267.02 1.841 1.915-.263c.461-.064.69-.247.808-.486.068-.15.087-.306.084-.538-.003-.253-.035-.451-.107-.553m2.001 2.187c-.455.6-1.214.957-2.196 1.113-.3.05-2.455.326-2.455.326l.028 2.5-2.456.337-.089-7.992 4.901-.673c.962-.133 1.646-.014 2.092.38.466.342.724.996.735 1.987.01.89-.174 1.543-.56 2.022M15.859 22.324l-.168-.645-.153.71-.68 1.977 1.673-.23zm-2.186 5.59-2.526.346 3.018-8.418 3.117-.428 2.995 7.592-2.566.352-.6-1.62-2.836.39zM25.765 20.467c-.123-.237-.364-.284-.715-.236l-2.055.282.018 1.629 2.105-.29c.3-.041.56-.147.648-.352.059-.15.087-.367.085-.528-.002-.182-.024-.392-.086-.506m2.135 1.53c-.246.46-.604.761-.974.893l1.9 2.941-2.736.376-1.433-2.508-1.644.226.03 2.7-2.405.331-.09-7.991 5.042-.693c1.062-.146 1.757.062 2.164.543.315.362.471.878.48 1.627.007.647-.128 1.171-.334 1.555M36.824 23.03c-.538 1.26-1.643 2.04-3.778 2.333-1.473.202-2.55.026-3.248-.567-.67-.577-1.001-1.554-1.017-2.971-.014-1.274.275-2.297.87-3.057.692-.866 1.78-1.41 3.354-1.627 2.425-.333 3.497.432 3.86 1.506.156.445.213.995.216 1.308l-2.475.34a1.6 1.6 0 0 0-.22-.8c-.235-.373-.608-.525-1.39-.417-.662.09-1.08.33-1.346.752-.247.379-.331.948-.323 1.676.01.84.135 1.339.4 1.637.305.353.787.418 1.339.342.72-.098 1.11-.375 1.317-.697.187-.28.244-.56.26-.897l2.476-.34c-.016.326-.05.959-.295 1.479M37.965 24.575l-.089-7.991 6.765-.93.021 1.882-4.37.6.014 1.163 4.209-.578.02 1.901-4.208.579.013 1.183 4.42-.607.02 1.862zM45.913 23.483l-.09-7.991 2.476-.34.067 6.018 3.818-.525.023 1.973zM12.535 37.45l-.108-.654c-.505.597-1.264.964-2.356 1.114-1.443.199-2.542-.167-3.154-1.025-.377-.506-.628-1.444-.64-2.557-.012-1.001.149-1.935.612-2.708.561-.948 1.636-1.765 3.5-2.02 2.055-.283 3.175.272 3.648 1.261.164.332.26.846.264 1.19l-2.365.325c-.002-.203-.116-.45-.288-.62-.233-.23-.636-.338-1.147-.267-.621.085-1.051.276-1.328.668-.267.361-.4.937-.39 1.888.01.88.166 1.365.36 1.652.244.311.688.524 1.5.412.822-.113 1.438-.613 1.512-1.2l-.005-.426-1.984.273-.019-1.719 4.22-.58s.022 2.094.028 2.54c.01.98.033 2.142.034 2.193zM19.07 36.664c-2.185.3-3.858-.301-3.881-2.385l-.058-5.19 2.456-.337.057 5.088c.007.698.543 1.04 1.455.915.862-.119 1.418-.64 1.41-1.299 0-.151-.056-5.098-.056-5.098l2.445-.336.06 5.351c.02 1.862-1.613 2.978-3.888 3.29M27.9 30.05l-.169-.645-.152.71-.681 1.978 1.674-.23zm-2.187 5.59-2.526.346 3.018-8.418 3.117-.428 2.996 7.592-2.566.352-.6-1.62-2.836.39zM38.006 28.165c-.123-.236-.365-.284-.716-.236l-2.054.282.018 1.63 2.105-.29c.3-.041.56-.148.648-.353.059-.15.087-.366.085-.528-.002-.182-.025-.392-.086-.505m2.135 1.53c-.246.46-.604.762-.974.894l1.9 2.94-2.736.377-1.433-2.509-1.644.226.03 2.701-2.405.33-.09-7.99 5.042-.694c1.062-.145 1.757.063 2.164.544.315.362.471.877.48 1.626.007.648-.128 1.172-.334 1.555M47.074 28.55c-.007-.576-.075-1.306-.279-1.501-.314-.302-.605-.353-1.207-.27l-1.533.21.047 4.239 1.534-.21c.621-.086.95-.263 1.217-.624.208-.282.228-1.196.22-1.844m-.886 4.276-4.49.617-.09-7.992 4.37-.6c1.444-.198 2.34.033 2.838.653.499.61.596 1.266.613 2.722.018 1.7-.084 2.342-.518 3.07-.473.805-1.29 1.333-2.723 1.53' clip-rule='evenodd'/%3e%3cpath fill='%231A1919' fill-rule='evenodd' d='m50.974 40.244.198.625.195-.625h.45v1.086h-.288v-.786l-.236.786h-.245l-.236-.784v.784h-.288v-1.086zm-1.506.261v-.26h.959v.26h-.323v.825h-.317v-.825z' clip-rule='evenodd'/%3e%3c/svg%3e":"data:image/svg+xml,%3csvg width='21' height='20' viewBox='0 0 21 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M2.16675 3.33342V15.6721L9.969 19.7591C10.2574 19.9102 10.6014 19.9114 10.8909 19.7623L18.8334 15.6721V3.33343L2.16675 3.33342Z' fill='%23343534'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.58857 0.731017C8.7832 1.14808 8.60288 1.64395 8.18582 1.83857L2.93582 4.92191L2.16675 3.33342L7.48101 0.328269C7.89807 0.133641 8.39394 0.313958 8.58857 0.731017Z' fill='%23343534'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M11.4734 0.371172C11.7287 -0.0117689 12.2461 -0.115247 12.629 0.140047L18.8334 3.33343L17.9545 4.86013L11.7045 1.5268C11.3216 1.2715 11.2181 0.754112 11.4734 0.371172Z' fill='%23343534'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M3.83325 5V14.8709L10.4431 18.3333L17.1666 14.8709V5.02448L3.83325 5Z' fill='%23F9FAFB'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M3.8335 4.8335V14.8277L10.4432 18.3334L17.1665 14.8277V4.85828L3.8335 4.8335Z' fill='%23BBAE92'/%3e%3c/svg%3e";return`https://logos.shipstation.com/ipaas/carriers/${null!==(a={stamps_com:"stamps_com_wl"}[e])&&void 0!==a?a:e}/${t}.svg`},de=e=>!!e&&["GB","CA"].includes(e),ue=e=>"AU"===e,pe=(e,t)=>null==e?void 0:e.filter((e=>"globalpost"===e.carrierCode?de(t):"sendle_walleted"!==e.carrierCode||ue(t)));export{G as A,N as B,q as C,I as D,R as E,J as F,K as G,Q as H,X as I,ee as J,te as K,ae as L,ne as M,se as N,le as O,ce as P,ie as Q,oe as R,de as S,ue as T,pe as U,h as V,f as _,w as a,D as b,C as c,b as d,U as e,y as f,L as g,O as h,F as i,_ as j,x as k,B as l,A as m,z as n,S as o,M as p,V as q,$ as r,j as s,P as t,T as u,k as v,Z as w,E as x,H as y,Y as z};
|
package/components.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{G as Actions,z as ActionsMenu,A as AddFundsForm,b as AutoFundingForm,B as ButtonGroup,C as CarrierBalance,d as CarrierConnectionCard,e as CarrierIcon,f as CarrierLogo,h as CollapsiblePanel,i as CopyButton,j as Cube,D as DateRangeCombo,k as DateRangeSelect,l as DisplayTerm,m as EditBillingForm,n as ErrorFallback,F as FieldLabel,o as FormPortal,p as FundAndPurchase,H as HistoryCard,q as HistoryCardExtension,I as InlineLabel,r as ItemsBreakdown,L as LinkAction,t as Loader,P as PoweredByShipEngine,R as RateDetails,S as Section,u as SettingsCard,v as SkeletonCarrierRow,w as Spacer,x as Spread,T as Tabs,V as VatForm,W as WalletCard,y as WarehouseForm,c as autoFundingSchema,g as getAddFundsSchema,s as styles}from"./actions-menu.js";export{C as CellFormattedDate,D as Drawer,E as ErrorState,G as GridController,b as GridFilters,a as GridFooter,u as usePager}from"./usePager.js";export{f as Field,P as Pager,S as StoryNotes,a as SuspendText}from"./suspend-text.js";export{P as Portal}from"./use-toggle.js";import"./carrier.js";import"date-fns/format";import"date-fns/locale";import"date-fns/parse";import"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"date-fns/subDays";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"./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"@tanstack/react-query";import"./use-scrub-errors.js";import"./shipment.js";import"lodash/orderBy";import"lodash/merge";import"lodash/mergeWith";import"./
|
|
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"date-fns/subDays";import"date-fns/formatISO";import"date-fns/isSameDay";import"date-fns/isWithinInterval";import"date-fns/setHours";import"date-fns/setMinutes";import"@tanstack/react-query";import"./use-scrub-errors.js";import"./shipment.js";import"lodash/orderBy";import"lodash/merge";import"lodash/mergeWith";import"./insurance.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,
|
|
1
|
+
export{R as RootPortalProvider,c as useAddressValidation,u as useCountryCodeOptions,b as useGetFundingSourceInsuranceProvider,d as useRootPortal,a as useStateCodeOptions,e as useToggle}from"./use-toggle.js";export{P as PudoType,o as useBlackboxDetection,u as useConfirmationOptions,a as useCustomsContentsOptions,b as useCustomsNonDeliveryOptions,c as useDateRangeOptions,d as useInsuranceProviderOptions,n as useManageFundingSourceInsurance,e as useMovementIndicatorOptions,p as useNestedForm,f as usePackageOptions,g as useRateOptions,q as useScrubErrors,h as useServiceCodeOptions,l as useServicePoints,i as useShipmentMetadata,j as useShippingPresetsOptions,k as useWarehouseOptions,m as useWindsorFramework}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";export{u as useRunOnceOnTrue}from"./use-run-once-on-true.js";import"react";import"./address.js";import"@shipengine/react-api";import"./carrier.js";import"date-fns/format";import"date-fns/locale";import"date-fns/parse";import"humps";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";import"jwt-decode";
|
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,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{g as getSellerIdFromToken,i as isOnboarded}from"./checks.js";export{b as convertDimensions,c as createDictionary,f as formatDimensions,h as getCancelledShipment,d as getIsCustomsRequiredForShipment,g as getIsInternationalShipment,e as getPendingShipment,j as getShipmentByStatus,a as isCollectionService,i as isPudoEligibleRate,m as moveCustomsItemsToProducts}from"./shipment.js";import{_ as 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"date-fns/subDays";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"date-fns/formatISO";import"date-fns/isSameDay";import"date-fns/isWithinInterval";import"date-fns/setHours";import"date-fns/setMinutes";import"lodash/orderBy";import"jwt-decode";import"date-fns/format";import"date-fns/locale";import"date-fns/parse";import"lodash/get";import"@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:m})=>{const g=(({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:g,theme:u},{children:ae(oe,Object.assign({baseURL:e,defaultQueryClientOptions:m,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};
|
|
1
|
+
import{E as X,a as Y}from"./actions-menu.js";export{G as Actions,z as ActionsMenu,A as AddFundsForm,b as AutoFundingForm,B as ButtonGroup,C as CarrierBalance,d as CarrierConnectionCard,e as CarrierIcon,f as CarrierLogo,h as CollapsiblePanel,i as CopyButton,j as Cube,D as DateRangeCombo,k as DateRangeSelect,l as DisplayTerm,m as EditBillingForm,a as ElementsContext,E as ElementsContextProvider,n as ErrorFallback,F as FieldLabel,o as FormPortal,p as FundAndPurchase,H as HistoryCard,q as HistoryCardExtension,I as InlineLabel,r as ItemsBreakdown,L as LinkAction,t as Loader,P as PoweredByShipEngine,R as RateDetails,S as Section,u as SettingsCard,v as SkeletonCarrierRow,w as Spacer,x as Spread,T as Tabs,V as VatForm,W as WalletCard,y as WarehouseForm,c as autoFundingSchema,g as getAddFundsSchema,s as styles,J as useElements}from"./actions-menu.js";export{C as CellFormattedDate,D as Drawer,E as ErrorState,G as GridController,b as GridFilters,a as GridFooter,u as usePager}from"./usePager.js";export{f as Field,P as Pager,S as StoryNotes,a as SuspendText}from"./suspend-text.js";import{R as _}from"./use-toggle.js";export{P as Portal,R as RootPortalProvider,c as useAddressValidation,u as useCountryCodeOptions,b as useGetFundingSourceInsuranceProvider,d as useRootPortal,a as useStateCodeOptions,e 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,o as useBlackboxDetection,u as useConfirmationOptions,a as useCustomsContentsOptions,b as useCustomsNonDeliveryOptions,c as useDateRangeOptions,d as useInsuranceProviderOptions,n as useManageFundingSourceInsurance,e as useMovementIndicatorOptions,p as useNestedForm,f as usePackageOptions,g as useRateOptions,q as useScrubErrors,h as useServiceCodeOptions,l as useServicePoints,i as useShipmentMetadata,j as useShippingPresetsOptions,k as useWarehouseOptions,m as useWindsorFramework}from"./use-scrub-errors.js";export{P as PageLayoutProvider,u as useExpirationMonthOptions,a as useHelpers,b as usePageLayout}from"./use-page-layout.js";export{u as useGetServiceName}from"./use-get-service-name.js";export{u as useRunOnceOnTrue}from"./use-run-once-on-true.js";export{m as moneySchema}from"./money.js";export{p as phoneSchema,a as phoneSchemaUnvalidated}from"./phone.js";export{a as assert,r as raise}from"./assertions.js";export{g as getSellerIdFromToken,i as isOnboarded}from"./checks.js";export{b as convertDimensions,c as createDictionary,f as formatDimensions,h as getCancelledShipment,d as getIsCustomsRequiredForShipment,g as getIsInternationalShipment,e as getPendingShipment,j as getShipmentByStatus,a as isCollectionService,i as isPudoEligibleRate,m as moveCustomsItemsToProducts}from"./shipment.js";import{_ as 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,U 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,Q as getCarrierIdByCarrierCode,z as getCurrencyFromString,A as getCurrencySymbolFromString,h as getExpirationYears,R as getLogoOrIconByCarrierCode,B as getRateRequiresAcknowledgement,j as getRelativeDates,C as getTotalRateAmount,g as getlocaleDateStringFormat,E as isDomesticAddress,K as isEmptyAddress,P as isEvriCarrier,S as isGlobalPostEligible,F as isMilitaryAddress,i as isNowOrInTheFuture,I as isPoBox,J as isPoBoxAddress,T as isSendleEligible,G as isUnitedStatesTerritory,H as isUnsupportedByUps,N as isUpsCarrier,M as isUspsCarrier,O as isYodelCarrier,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,p as getInsuranceProviderWithFriendlyName,b as getIsCustomsRequiredForSalesOrder,q as getIsInsuraceProviderAccepted,d as getRequestedServices,e as getSalesOrderItemsFromSalesOrderOrShipment,f as isDecimalWeight,n as isFlatRatePackageCode,i as isMetricWeightUnit,a as throwAny,t as throwJoinedMessages}from"./insurance.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"date-fns/subDays";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"date-fns/formatISO";import"date-fns/isSameDay";import"date-fns/isWithinInterval";import"date-fns/setHours";import"date-fns/setMinutes";import"lodash/orderBy";import"jwt-decode";import"date-fns/format";import"date-fns/locale";import"date-fns/parse";import"lodash/get";import"@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:m})=>{const g=(({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:g,theme:u},{children:ae(oe,Object.assign({baseURL:e,defaultQueryClientOptions:m,getToken:o,headers:i,onApiError:l},{children:ae(_,{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(Y.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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"axios";import{F as r,G as i}from"./carrier.js";const n=r=>{var i;return e.isAxiosError(r)?null===(i=r.response)||void 0===i?void 0:i.data:[{errorCode:"unknown",errorSource:"elements",errorType:"unknown",message:r.message}]};function a(e){throw new Error(e.map((e=>e.message)).join(", "))}function t(e){e&&a(e)}const o=(e,r)=>({customs:{contents:"merchandise",nonDelivery:"return_to_sender"},products:e.salesOrderItems.filter((e=>e.salesOrderItemId.length>0)).map((e=>({countryOfOrigin:r.originAddress.countryCode,description:e.lineItemDetails.name||"---",quantity:e.quantity||1,sku:e.lineItemDetails.sku,value:{amount:e.priceSummary.unitPrice.amount,currency:e.priceSummary.unitPrice.currency}})))}),l=({shipTo:e},{originAddress:n})=>n&&r(n)||e&&(r(e)||i(e))||(null==n?void 0:n.countryCode)!==(null==e?void 0:e.countryCode),s=e=>{var r;return Array.from(new Set(null===(r=null==e?void 0:e.salesOrderItems)||void 0===r?void 0:r.filter((e=>!!e.requestedShippingOptions.shippingService)).map((e=>e.requestedShippingOptions.shippingService))))},u=({salesOrder:e,shipment:r})=>{var i,n;return null!==(n=null!==(i=null==e?void 0:e.salesOrderItems.map((e=>({detail:`SKU ${e.lineItemDetails.sku}`,name:e.lineItemDetails.name,quantity:e.quantity,subDetail:e.requestedShippingOptions.shippingService,subDetailValue:e.priceSummary.estimatedShipping,totalValue:e.priceSummary.total,value:e.priceSummary.unitPrice}))))&&void 0!==i?i:null==r?void 0:r.items.map(((e,r)=>({detail:`SKU ${e.sku}`,name:(null==e?void 0:e.name)||`ITEM ${r}`,quantity:e.quantity}))))&&void 0!==n?n:[]},d=e=>!!e&&["gram","kilogram"].includes(e),m=e=>"value"in e,c=e=>{var r,i;return 16*(null!==(r=e.whole)&&void 0!==r?r:0)+(null!==(i=e.fractional)&&void 0!==i?i:0)},p=(e,r)=>d(r)?{unit:r,value:e.whole}:{unit:"ounce",value:c(e)},v=e=>d(e.unit)?{fractional:0,whole:e.value}:{fractional:e.value%16,whole:Math.floor(e.value/16)};function
|
|
1
|
+
import e from"axios";import{F as r,G as i}from"./carrier.js";const n=r=>{var i;return e.isAxiosError(r)?null===(i=r.response)||void 0===i?void 0:i.data:[{errorCode:"unknown",errorSource:"elements",errorType:"unknown",message:r.message}]};function a(e){throw new Error(e.map((e=>e.message)).join(", "))}function t(e){e&&a(e)}const o=(e,r)=>({customs:{contents:"merchandise",nonDelivery:"return_to_sender"},products:e.salesOrderItems.filter((e=>e.salesOrderItemId.length>0)).map((e=>({countryOfOrigin:r.originAddress.countryCode,description:e.lineItemDetails.name||"---",quantity:e.quantity||1,sku:e.lineItemDetails.sku,value:{amount:e.priceSummary.unitPrice.amount,currency:e.priceSummary.unitPrice.currency}})))}),l=({shipTo:e},{originAddress:n})=>n&&r(n)||e&&(r(e)||i(e))||(null==n?void 0:n.countryCode)!==(null==e?void 0:e.countryCode),s=e=>{var r;return Array.from(new Set(null===(r=null==e?void 0:e.salesOrderItems)||void 0===r?void 0:r.filter((e=>!!e.requestedShippingOptions.shippingService)).map((e=>e.requestedShippingOptions.shippingService))))},u=({salesOrder:e,shipment:r})=>{var i,n;return null!==(n=null!==(i=null==e?void 0:e.salesOrderItems.map((e=>({detail:`SKU ${e.lineItemDetails.sku}`,name:e.lineItemDetails.name,quantity:e.quantity,subDetail:e.requestedShippingOptions.shippingService,subDetailValue:e.priceSummary.estimatedShipping,totalValue:e.priceSummary.total,value:e.priceSummary.unitPrice}))))&&void 0!==i?i:null==r?void 0:r.items.map(((e,r)=>({detail:`SKU ${e.sku}`,name:(null==e?void 0:e.name)||`ITEM ${r}`,quantity:e.quantity}))))&&void 0!==n?n:[]},d=e=>!!e&&["gram","kilogram"].includes(e),m=e=>"value"in e,c=e=>{var r,i;return 16*(null!==(r=e.whole)&&void 0!==r?r:0)+(null!==(i=e.fractional)&&void 0!==i?i:0)},p=(e,r)=>d(r)?{unit:r,value:e.whole}:{unit:"ounce",value:c(e)},v=e=>d(e.unit)?{fractional:0,whole:e.value}:{fractional:e.value%16,whole:Math.floor(e.value/16)};function f(e,r){return m(e)?v(e):p(e,r)}function h(e,r){if(!e)return{fractional:0,whole:0};if(d(r)&&e.whole)return{fractional:0,whole:Number(e.whole.toFixed(5))||0};const i=c(e)/16;return{fractional:Math.round(16*(i-Math.floor(i))*100)/100,whole:Math.floor(i)}}const y=e=>!!e&&e.includes("flat_rate"),g=e=>{var r;return null!==(r=null==e?void 0:e.find((e=>e.isDefault)))&&void 0!==r?r:null==e?void 0:e[0]};var S={parcelguard_terms:{friendlyName:"ParcelGuard",provider:"parcelguard"},x_cover_terms:{friendlyName:"XCover",provider:"x_cover"}};const w=e=>S[e],q=(e,r)=>!!(null==r?void 0:r.map((e=>e.termType)).includes(e));export{t as a,l as b,n as c,s as d,u as e,m as f,o as g,c as h,d as i,p as j,v as k,f as l,h as m,y as n,g as o,w as p,q,a as t};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shipengine/elements",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@emotion/react": "11.x",
|
|
6
6
|
"react-i18next": "11.x",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"@rjsf/validator-ajv8": "5.16.1",
|
|
38
38
|
"@shipengine/giger": "1.18.0",
|
|
39
39
|
"@shipengine/giger-theme": "1.7.0",
|
|
40
|
-
"@shipengine/js-api": "2.
|
|
41
|
-
"@shipengine/react-api": "3.2
|
|
40
|
+
"@shipengine/js-api": "2.4.0",
|
|
41
|
+
"@shipengine/react-api": "3.3.2",
|
|
42
42
|
"@storybook/addons": "6.5.16",
|
|
43
43
|
"@storybook/api": "6.5.16",
|
|
44
44
|
"@storybook/components": "7.0.0-rc.1",
|
package/shipment.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{F as e,G as s,s as t,
|
|
1
|
+
import{F as e,G as s,s as t,V as o}from"./carrier.js";const i=(e,s)=>{var t;return null!==(t=null==e?void 0:e.reduce(((e,t)=>Object.assign(Object.assign({},e),s(t,e))),{}))&&void 0!==t?t:{}},r=[{carrier:"yodel_walleted"},{carrier:"hermes",serviceCodes:[{serviceCode:"domestic_courier_collections",type:"pick_up"},{serviceCode:"postable_courier_collections",type:"pick_up"}]},{carrier:"dpdwallet"}],c=e=>r.some((s=>e.carrierCode===s.carrier)),n=(e,s)=>r.some((t=>{var o;return t.carrier===e&&(e=>e.toLowerCase().includes("collection"))(s)||(null===(o=t.serviceCodes)||void 0===o?void 0:o.some((e=>e.serviceCode===s&&"pick_up"===e.type)))})),a=e=>`${e.length} x ${e.width} x ${e.height} `;function l(e,{allowAllZeroes:s}={}){const{length:t,width:o,height:i,unit:r}=e;if(![t,o,i].every((e=>0===e))||s)return Object.assign(Object.assign({},e),{unit:null!=r?r:"inch"})}const u=({shipFrom:e,shipTo:s})=>(null==e?void 0:e.countryCode)!==(null==s?void 0:s.countryCode),d=({shipFrom:t,shipTo:o})=>t&&e(t)||o&&(e(o)||s(o))||(null==t?void 0:t.countryCode)!==(null==o?void 0:o.countryCode),v=e=>null==e?void 0:e.filter((e=>"pending"===e.shipmentStatus)).sort(t)[0],m=e=>null==e?void 0:e.filter((e=>"cancelled"===e.shipmentStatus)).sort(t)[0],p=(e,s)=>null==s?void 0:s.filter((({shipmentStatus:s})=>s===e)).sort(t)[0],g=e=>{var s,t;if(!(null===(t=null===(s=e.customs)||void 0===s?void 0:s.customsItems)||void 0===t?void 0:t.length))return e;const i=e.customs.customsItems.map((e=>Object.assign(Object.assign({},e),{value:e.value instanceof Object?e.value:{amount:e.value,currency:e.valueCurrency||"USD"}}))),r=e.customs,c=o(r,["customsItems"]);return Object.assign(Object.assign({},e),{customs:c,packages:e.packages.map(((e,s)=>0===s?Object.assign(Object.assign({},e),{products:i}):e))})};export{n as a,l as b,i as c,d,v as e,a as f,u as g,m as h,c as i,p as j,g as m};
|
|
@@ -27,6 +27,7 @@ export type AddFundsFormProps = {
|
|
|
27
27
|
currency?: SE.Currency;
|
|
28
28
|
minimumAmount?: number;
|
|
29
29
|
onCancel?: () => void;
|
|
30
|
+
onFail?: () => void;
|
|
30
31
|
onSuccess?: () => void;
|
|
31
32
|
};
|
|
32
33
|
/**
|
|
@@ -40,4 +41,4 @@ export type AddFundsFormProps = {
|
|
|
40
41
|
*
|
|
41
42
|
* @see {@link AddFundsFormProps | The props that are passed into the `<AddFundsForm />` component}
|
|
42
43
|
*/
|
|
43
|
-
export declare const AddFundsForm: ({ carrierId, children, currency, onCancel, onSuccess, minimumAmount, }: AddFundsFormProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
44
|
+
export declare const AddFundsForm: ({ carrierId, children, currency, onCancel, onSuccess, minimumAmount, onFail, }: AddFundsFormProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { InsuranceProviderProfile } from "../../types";
|
|
2
|
+
type EnableInsuranceBannerProps = {
|
|
3
|
+
insuranceProviderProfile?: InsuranceProviderProfile;
|
|
4
|
+
onSubmit: () => Promise<void>;
|
|
5
|
+
registrationSuccess: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare const EnableInsuranceBanner: ({ insuranceProviderProfile, onSubmit, registrationSuccess, }: EnableInsuranceBannerProps) => import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare const styles: {
|
|
2
|
+
container: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
3
|
+
border: string;
|
|
4
|
+
borderRadius: number;
|
|
5
|
+
display: "flex";
|
|
6
|
+
flexDirection: "column";
|
|
7
|
+
gap: number;
|
|
8
|
+
lineHeight: string;
|
|
9
|
+
padding: number;
|
|
10
|
+
};
|
|
11
|
+
description: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
12
|
+
fontSize: string;
|
|
13
|
+
};
|
|
14
|
+
link: {
|
|
15
|
+
cursor: "pointer";
|
|
16
|
+
fontWeight: "normal";
|
|
17
|
+
textDecoration: string;
|
|
18
|
+
};
|
|
19
|
+
successContainer: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
20
|
+
border: string;
|
|
21
|
+
borderRadius: number;
|
|
22
|
+
display: "flex";
|
|
23
|
+
gap: number;
|
|
24
|
+
lineHeight: string;
|
|
25
|
+
padding: number;
|
|
26
|
+
};
|
|
27
|
+
successMessage: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
28
|
+
display: "flex";
|
|
29
|
+
flex: number;
|
|
30
|
+
flexDirection: "column";
|
|
31
|
+
gap: number;
|
|
32
|
+
};
|
|
33
|
+
title: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
34
|
+
display: "flex";
|
|
35
|
+
gap: number;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./enable-insurance-banner";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./insurance-popover";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SE } from "@shipengine/js-api";
|
|
3
|
+
export type InsurancePopoverProps = {
|
|
4
|
+
fundingSourceInsuranceProvider: string;
|
|
5
|
+
iconRef: React.RefObject<HTMLDivElement>;
|
|
6
|
+
insuranceClaim?: SE.LinkedResource;
|
|
7
|
+
insuredValue: SE.Money;
|
|
8
|
+
showPopover: boolean;
|
|
9
|
+
toggleShowPopover: () => void;
|
|
10
|
+
};
|
|
11
|
+
export declare const InsurancePopover: ({ fundingSourceInsuranceProvider, iconRef, insuredValue, insuranceClaim, showPopover, toggleShowPopover, }: InsurancePopoverProps) => import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const styles: {
|
|
2
|
+
icon: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
3
|
+
marginLeft: number;
|
|
4
|
+
};
|
|
5
|
+
link: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
6
|
+
"&:visited": {
|
|
7
|
+
color: string;
|
|
8
|
+
};
|
|
9
|
+
fontWeight: number;
|
|
10
|
+
};
|
|
11
|
+
popover: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
12
|
+
fontSize: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -16,4 +16,4 @@ export type RateCardProps = Partial<RateOption> & WithCommonProps<{
|
|
|
16
16
|
voided?: boolean;
|
|
17
17
|
voidedAt?: string;
|
|
18
18
|
}>;
|
|
19
|
-
export declare const RateCard: ({ carrierCode, carrierFriendlyName, carrierNickname, children, className, confirmationAmount, deliveryDays, insuranceAmount, isAcknowledged, messages, onClick, onClickAcknowledgement, onSelectServicePoint, otherAmount, rateId, requiresAcknowledgement, rateAcknowledgementMessage, selected, serviceCode, packageType, serviceType, shippingAmount, taxAmount, trackable, trackingStatus, voided, voidedAt, isLoading: servicePointsLoading, isPreferredRate, selectedRateCost, servicePoints, mapViewEnabled, rateDetails, }: RateCardProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare const RateCard: ({ carrierCode, carrierFriendlyName, carrierNickname, children, className, confirmationAmount, deliveryDays, insuranceAmount, insuranceClaim, insuranceProvider, insuredValue, isAcknowledged, messages, onClick, onClickAcknowledgement, onSelectServicePoint, otherAmount, rateId, requiresAcknowledgement, rateAcknowledgementMessage, selected, serviceCode, packageType, serviceType, shippingAmount, taxAmount, trackable, trackingStatus, voided, voidedAt, isLoading: servicePointsLoading, isPreferredRate, selectedRateCost, servicePoints, mapViewEnabled, rateDetails, }: RateCardProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -20,3 +20,4 @@ export declare const getFooterListItemStyles: (theme: Theme) => SerializedStyles
|
|
|
20
20
|
export declare const getAcknowledgmentStyles: (theme: Theme) => SerializedStyles;
|
|
21
21
|
export declare const getTypographyVoidedStyles: () => SerializedStyles;
|
|
22
22
|
export declare const getServicePointSkeletonStyles: (theme: Theme) => SerializedStyles;
|
|
23
|
+
export declare const getInfoIconStyles: (theme: Theme) => SerializedStyles;
|
|
@@ -16,6 +16,7 @@ export type FundAndPurchaseProps = {
|
|
|
16
16
|
disabled?: boolean;
|
|
17
17
|
isFundingEnabled?: boolean;
|
|
18
18
|
isFundingRequired: boolean;
|
|
19
|
+
isInvalidatedByError?: boolean;
|
|
19
20
|
isPreferredRate?: boolean;
|
|
20
21
|
nickname?: string;
|
|
21
22
|
onPurchase: () => void;
|
|
@@ -36,4 +37,4 @@ export type FundAndPurchaseProps = {
|
|
|
36
37
|
*
|
|
37
38
|
* @see {@link FundAndPurchaseProps | The props that are passed into the `<FundAndPurchase />` component}
|
|
38
39
|
*/
|
|
39
|
-
export declare const FundAndPurchase: ({ balance: uspsBalance, carrierId, control, currency, disabled, isFundingEnabled, isFundingRequired, isPreferredRate, nickname, purchaseAmount, rateDetails, onSave, onPurchase, onVatRegistrationComplete, }: FundAndPurchaseProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
40
|
+
export declare const FundAndPurchase: ({ balance: uspsBalance, carrierId, control, currency, disabled, isFundingEnabled, isFundingRequired, isPreferredRate, nickname, purchaseAmount, rateDetails, onSave, onPurchase, onVatRegistrationComplete, isInvalidatedByError, }: FundAndPurchaseProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { MutableRefObject } from "react";
|
|
2
|
+
import { UseFormReturn } from "react-hook-form";
|
|
3
|
+
import { SE } from "@shipengine/react-api";
|
|
4
|
+
import { RateOption, ServicePointSearchQuery } from "../../../hooks";
|
|
5
|
+
import { RateFormFeatures } from "../../../utilities";
|
|
6
|
+
import { RateFormFields } from "./rate-schema";
|
|
7
|
+
export type PudoServicePointsDetails = {
|
|
8
|
+
fetchServicePoints: (searchQuery: string) => void;
|
|
9
|
+
isFetching?: boolean;
|
|
10
|
+
onSelectServicePoint: (servicePoint?: SE.ServicePoint) => void;
|
|
11
|
+
servicePointSearchQuery?: ServicePointSearchQuery;
|
|
12
|
+
servicePointsErrors?: SE.CodedError[] | null;
|
|
13
|
+
servicePointsResponse?: SE.ServicePointsListResponse;
|
|
14
|
+
};
|
|
15
|
+
export type RateViewProps = {
|
|
16
|
+
carriers?: SE.Carrier[];
|
|
17
|
+
errors?: {
|
|
18
|
+
messages: string[];
|
|
19
|
+
title: string;
|
|
20
|
+
};
|
|
21
|
+
features?: RateFormFeatures & {
|
|
22
|
+
windsorFrameworkEnabled: boolean;
|
|
23
|
+
};
|
|
24
|
+
form: UseFormReturn<RateFormFields>;
|
|
25
|
+
isLoading?: boolean;
|
|
26
|
+
onSelectRate?: (rateId: string) => void;
|
|
27
|
+
preferredServiceCodes?: string[];
|
|
28
|
+
pudoServicePointDetails?: PudoServicePointsDetails;
|
|
29
|
+
rateFormScrollToRef?: MutableRefObject<HTMLFormElement | null>;
|
|
30
|
+
rateOptions: RateOption[];
|
|
31
|
+
rates?: SE.Rate[];
|
|
32
|
+
salesOrder?: SE.SalesOrder;
|
|
33
|
+
selectedRate?: RateOption;
|
|
34
|
+
shipment?: SE.SalesOrderShipment;
|
|
35
|
+
};
|
|
36
|
+
export declare const RateView: ({ form, carriers, features, isLoading, rateOptions, rates, preferredServiceCodes, selectedRate, salesOrder, shipment, onSelectRate, rateFormScrollToRef, errors, pudoServicePointDetails, }: RateViewProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const registerFundingSourceInsuranceSchema: z.ZodObject<{
|
|
3
|
+
agreeToTerms: z.ZodLiteral<boolean>;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
agreeToTerms: boolean;
|
|
6
|
+
}, {
|
|
7
|
+
agreeToTerms: boolean;
|
|
8
|
+
}>;
|
|
9
|
+
export type RegisterFundingSourceInsuranceFormFields = z.input<typeof registerFundingSourceInsuranceSchema>;
|
|
10
|
+
export type RegisterFundingSourceInsuranceFormPayload = z.output<typeof registerFundingSourceInsuranceSchema>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { InsuranceProviderProfile } from "../../../types";
|
|
3
|
+
export type RegisterFundingSourceInsuranceFormProps<T = undefined> = {
|
|
4
|
+
insuranceProviderProfile?: InsuranceProviderProfile;
|
|
5
|
+
onCancel: () => void;
|
|
6
|
+
onSubmit: () => Promise<void>;
|
|
7
|
+
showDescription?: boolean;
|
|
8
|
+
} & ({
|
|
9
|
+
formId: string;
|
|
10
|
+
portalRef: React.RefObject<T>;
|
|
11
|
+
} | {
|
|
12
|
+
formId?: string;
|
|
13
|
+
portalRef?: never;
|
|
14
|
+
});
|
|
15
|
+
export declare const RegisterFundingSourceInsuranceForm: <T extends Element>({ formId, portalRef, insuranceProviderProfile, onSubmit, onCancel, showDescription, }: RegisterFundingSourceInsuranceFormProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const styles: {
|
|
2
|
+
formDescription: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
3
|
+
display: "inline";
|
|
4
|
+
fontSize: string;
|
|
5
|
+
letterSpacing: string;
|
|
6
|
+
lineHeight: string;
|
|
7
|
+
};
|
|
8
|
+
termsLink: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
9
|
+
"&:visited": {
|
|
10
|
+
color: string;
|
|
11
|
+
};
|
|
12
|
+
fontWeight: number;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -6,7 +6,7 @@ export type ShipmentProps = {
|
|
|
6
6
|
features?: ShipmentSummaryFeatures;
|
|
7
7
|
labels?: SE.Label[];
|
|
8
8
|
onClickPrintLabel?: () => void;
|
|
9
|
-
onClickPurchaseLabel?: (
|
|
9
|
+
onClickPurchaseLabel?: (shipment: SE.SalesOrderShipment, salesOrder?: SE.SalesOrder) => void;
|
|
10
10
|
onClickVoidLabel?: (label: SE.Label) => void;
|
|
11
11
|
salesOrder?: SE.SalesOrder;
|
|
12
12
|
shipment: SE.SalesOrderShipment;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { UseFormReturn } from "react-hook-form";
|
|
2
|
+
import { ShipmentFormFields } from "../../../../shipment-schema";
|
|
3
|
+
type WindsorFrameworkProps = {
|
|
4
|
+
form: UseFormReturn<ShipmentFormFields>;
|
|
5
|
+
};
|
|
6
|
+
export declare const WindsorFramework: ({ form }: WindsorFrameworkProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const styles: {
|
|
2
|
+
notAtRiskContainer: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
3
|
+
display: "flex";
|
|
4
|
+
marginLeft: number;
|
|
5
|
+
textAlign: "center";
|
|
6
|
+
width: number;
|
|
7
|
+
};
|
|
8
|
+
notAtRiskToolTip: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
9
|
+
color: string;
|
|
10
|
+
marginLeft: number;
|
|
11
|
+
};
|
|
12
|
+
tooltipContainer: () => {
|
|
13
|
+
textAlign: "left";
|
|
14
|
+
width: number;
|
|
15
|
+
};
|
|
16
|
+
windsorFrameworkContainer: {
|
|
17
|
+
display: "flex";
|
|
18
|
+
flexDirection: "column";
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -4,7 +4,8 @@ import { ShipmentFormProps } from "../../shipment-form";
|
|
|
4
4
|
import { ShipmentFormFields } from "../../shipment-schema";
|
|
5
5
|
type CustomsFormsProps = {
|
|
6
6
|
form: UseFormReturn<ShipmentFormFields>;
|
|
7
|
+
requiresWindsorFramework?: boolean;
|
|
7
8
|
shipment: SE.SalesOrderShipment;
|
|
8
9
|
} & Pick<ShipmentFormProps, "currency" | "onDirty" | "onUpdateCustoms" | "onUpdateTaxableIds">;
|
|
9
|
-
export declare const CustomsForms: ({ form, currency, onUpdateCustoms, onUpdateTaxableIds, shipment, onDirty, }: CustomsFormsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const CustomsForms: ({ form, currency, onUpdateCustoms, onUpdateTaxableIds, shipment, onDirty, requiresWindsorFramework, }: CustomsFormsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
10
11
|
export {};
|
|
@@ -1,7 +1,27 @@
|
|
|
1
1
|
export declare const styles: {
|
|
2
|
+
enableInsuranceNotification: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
3
|
+
alignItems: "top";
|
|
4
|
+
display: "flex";
|
|
5
|
+
justifyContent: "left";
|
|
6
|
+
marginLeft: string;
|
|
7
|
+
};
|
|
8
|
+
featuredIcon: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
9
|
+
color: string;
|
|
10
|
+
marginRight: number;
|
|
11
|
+
};
|
|
2
12
|
header: {
|
|
3
13
|
textAlign: "left";
|
|
4
14
|
};
|
|
15
|
+
link: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
16
|
+
"&:visited": {
|
|
17
|
+
color: string;
|
|
18
|
+
};
|
|
19
|
+
fontWeight: number;
|
|
20
|
+
};
|
|
21
|
+
registerInsuranceFormContainer: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
22
|
+
backgroundColor: string;
|
|
23
|
+
padding: number;
|
|
24
|
+
};
|
|
5
25
|
shipFromEditButton: (theme: import("@shipengine/giger-theme/dist/lib/Theme").Theme) => {
|
|
6
26
|
border: number;
|
|
7
27
|
fontWeight: number;
|