@feathery/react 2.15.0 → 2.15.1
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/cjs/Form/logic.d.ts.map +1 -1
- package/cjs/elements/fields/AddressLine1Field/index.d.ts.map +1 -1
- package/cjs/{fthry_FormControl.C8oeoDk3.js → fthry_FormControl.DhxdiYw6.js} +1 -1
- package/cjs/{fthry_InlineTooltip.CRRFOiO4.js → fthry_InlineTooltip.BgAXRUIt.js} +2 -2
- package/cjs/{fthry_Overlay.CMYptYVH.js → fthry_Overlay.D7IM1ywp.js} +1 -1
- package/cjs/{fthry_PaymentMethodField.C_yV3aay.js → fthry_PaymentMethodField.NEoloWMI.js} +4 -4
- package/cjs/{fthry_Placeholder.xDn0I29f.js → fthry_Placeholder.D5C0aH2S.js} +1 -1
- package/cjs/{fthry_ShowEyeIcon.COZczYEG.js → fthry_ShowEyeIcon.CmLMyaN5.js} +1 -1
- package/cjs/{fthry_index.CQ3OgNZu.js → fthry_index.BFpcCw2o.js} +1 -1
- package/cjs/{fthry_index.Dm94Mor0.js → fthry_index.BJYH_2P6.js} +1 -1
- package/cjs/{fthry_index.Dzq-7u_A.js → fthry_index.BK_jaGHn.js} +5 -5
- package/cjs/{fthry_index.Db8Zj-xl.js → fthry_index.Bb1R5GZK.js} +2 -2
- package/cjs/{fthry_index.BV9FIqI3.js → fthry_index.Bd1HfYvE.js} +5 -5
- package/cjs/{fthry_index.CgatqFlS.js → fthry_index.BgeTdwT5.js} +2 -2
- package/cjs/{fthry_index.CFl7Tra-.js → fthry_index.Bq3nU0FH.js} +6 -6
- package/cjs/{fthry_index.Ct-olYcX.js → fthry_index.BqS0kCfh.js} +1 -1
- package/cjs/{fthry_index.ByYAaIPz.js → fthry_index.By8RWuUY.js} +6 -6
- package/cjs/{fthry_index.C97Bm277.js → fthry_index.CbfDILWu.js} +4 -4
- package/cjs/{fthry_index.CfGx505W.js → fthry_index.CgMWWz7f.js} +1 -1
- package/cjs/{fthry_index.BvXec6y1.js → fthry_index.Ci8dMyBp.js} +1 -1
- package/cjs/{fthry_index.B9CITASf.js → fthry_index.CkmA933O.js} +1 -1
- package/cjs/{fthry_index.BAis6iAm.js → fthry_index.CrFjXWLg.js} +3 -3
- package/cjs/{fthry_index.B5Nc9EIn.js → fthry_index.CzzIM_Es.js} +1831 -41
- package/cjs/{fthry_index.CPkoG8dL.js → fthry_index.D4rjZ-iU.js} +4 -4
- package/cjs/{fthry_index.BdfASO2V.js → fthry_index.DDjTLR_C.js} +6 -6
- package/cjs/{fthry_index.B5aSeoEj.js → fthry_index.DLnigFf3.js} +4 -4
- package/cjs/{fthry_index.Be_wKtBW.js → fthry_index.DXm31Dvn.js} +3 -3
- package/cjs/{fthry_index.BokP8_1j.js → fthry_index.DzpGyyn4.js} +5 -5
- package/cjs/{fthry_index.CoR2X1u6.js → fthry_index.E_vLB-7s.js} +8 -8
- package/cjs/{fthry_index.D35rnGh5.js → fthry_index.GeYRayLh.js} +1 -1
- package/cjs/{fthry_index.BZzFi9o3.js → fthry_index.JRP5lBfp.js} +7 -6
- package/cjs/{fthry_index.Iw93ZIvk.js → fthry_index.WDI9ExUl.js} +1 -1
- package/cjs/{fthry_input.DjhEftHE.js → fthry_input.kxr0lkUP.js} +1 -1
- package/cjs/{fthry_script.CEXFQk2h.js → fthry_script.CpqGoZRW.js} +1 -1
- package/cjs/{fthry_styles.twMOjtIt.js → fthry_styles.UURZE2St.js} +1 -1
- package/cjs/{fthry_useElementSize.CMss2qLc.js → fthry_useElementSize.B7mqB2ri.js} +1 -1
- package/cjs/{fthry_useSalesforceSync.GHaAu-dd.js → fthry_useSalesforceSync.DFHAEpBn.js} +1 -1
- package/cjs/{fthry_webfontloader.CZxQtgFm.js → fthry_webfontloader.COsYlNwD.js} +1 -1
- package/cjs/index.js +1 -1
- package/cjs/utils/eventQueue.d.ts +26 -0
- package/cjs/utils/eventQueue.d.ts.map +1 -0
- package/cjs/utils/featheryClient/index.d.ts +6 -0
- package/cjs/utils/featheryClient/index.d.ts.map +1 -1
- package/dist/Form/logic.d.ts.map +1 -1
- package/dist/elements/fields/AddressLine1Field/index.d.ts.map +1 -1
- package/dist/{fthry_FormControl.BdmdMzA3.js → fthry_FormControl.CikgGb3C.js} +1 -1
- package/dist/{fthry_InlineTooltip.DRPooJGa.js → fthry_InlineTooltip.BpfxcSEn.js} +2 -2
- package/dist/{fthry_Overlay.DSfIRMWh.js → fthry_Overlay.CJVfag7c.js} +1 -1
- package/dist/{fthry_PaymentMethodField.C2kDTnuL.js → fthry_PaymentMethodField.BpA_xhqt.js} +4 -4
- package/dist/{fthry_Placeholder.BYxBlfxe.js → fthry_Placeholder.DwCFN6a9.js} +1 -1
- package/dist/{fthry_ShowEyeIcon.DcuxGpJk.js → fthry_ShowEyeIcon.D6nQhesH.js} +1 -1
- package/dist/{fthry_index.BF_Plcr0.js → fthry_index.B-oHlMGi.js} +2 -2
- package/dist/{fthry_index.DwzU97uW.js → fthry_index.B7VWXvgC.js} +4 -4
- package/dist/{fthry_index.BuGMpxqA.js → fthry_index.B84L3MVC.js} +1 -1
- package/dist/{fthry_index.IjpiaOO-.js → fthry_index.BAhh3Pz6.js} +1 -1
- package/dist/{fthry_index.BIkZtQJH.js → fthry_index.BEZmvsoo.js} +7 -6
- package/dist/{fthry_index.BXiUUqma.js → fthry_index.BSEfDQAc.js} +2 -2
- package/dist/{fthry_index.COrbe5-R.js → fthry_index.BsEfTy-x.js} +8 -8
- package/dist/{fthry_index.CCtbaItI.js → fthry_index.BsNCOSBE.js} +5 -5
- package/dist/{fthry_index.B-bHDKSO.js → fthry_index.Bz07r-AM.js} +1 -1
- package/dist/{fthry_index.CxYSZnO_.js → fthry_index.BzrcCLzO.js} +4 -4
- package/dist/{fthry_index.D9VkJYNy.js → fthry_index.CJKGRCG-.js} +3 -3
- package/dist/{fthry_index.Cocw39qz.js → fthry_index.D9AKkBzu.js} +1 -1
- package/dist/{fthry_index.DkSTwhvF.js → fthry_index.D9VjMJ_U.js} +1 -1
- package/dist/{fthry_index.DCKiab_1.js → fthry_index.DH2fsNWG.js} +3 -3
- package/dist/{fthry_index.DvV-_9rQ.js → fthry_index.Dgmpm9wy.js} +6 -6
- package/dist/{fthry_index.BD6daAle.js → fthry_index.DhU16s57.js} +5 -5
- package/dist/{fthry_index.C0TSdYY1.js → fthry_index.DoP7RwIP.js} +1 -1
- package/dist/{fthry_index.uw0MJJ4F.js → fthry_index.Dy4nSWZa.js} +1 -1
- package/dist/{fthry_index.D6uzSPi5.js → fthry_index.Fs86Fy9Y.js} +5 -5
- package/dist/{fthry_index.CkEibXDT.js → fthry_index.NOuMR_hq.js} +6 -6
- package/dist/{fthry_index.Ox88biXC.js → fthry_index.OHN-Iv2R.js} +1 -1
- package/dist/{fthry_index.4fMPrW44.js → fthry_index.m7CZv4YY.js} +4 -4
- package/dist/{fthry_index.Cz1sN7j0.js → fthry_index.t4v0qqgv.js} +6 -6
- package/dist/{fthry_index.DSkVpyvV.js → fthry_index.y4j9reIZ.js} +1831 -41
- package/dist/{fthry_input.BJLJlGVj.js → fthry_input.Cb2u4VEf.js} +1 -1
- package/dist/{fthry_script.BL_LvOsU.js → fthry_script.C5O1ZNQQ.js} +1 -1
- package/dist/{fthry_styles.Bgjx59v5.js → fthry_styles.DGB23xLr.js} +1 -1
- package/dist/{fthry_useElementSize.COmxJss_.js → fthry_useElementSize.CBdpS9aW.js} +1 -1
- package/dist/{fthry_useSalesforceSync.BZM69NNS.js → fthry_useSalesforceSync.Cae_lMG1.js} +1 -1
- package/dist/{fthry_webfontloader.BonjOYue.js → fthry_webfontloader.DAANkO2-.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/utils/eventQueue.d.ts +26 -0
- package/dist/utils/eventQueue.d.ts.map +1 -0
- package/dist/utils/featheryClient/index.d.ts +6 -0
- package/dist/utils/featheryClient/index.d.ts.map +1 -1
- package/package.json +4 -3
- package/umd/{277.94ae8bf6190836d1dceb.js → 277.d9907ecd5dc2117c9171.js} +1 -1
- package/umd/{509.4236d4d76d2fa2ccd971.js → 509.341a4196aad912adb28d.js} +2 -2
- package/umd/{AddressField.3523efd23175117d47a5.js → AddressField.ec97334fe233830bc05b.js} +1 -1
- package/umd/index.js +1 -1
- /package/umd/{509.4236d4d76d2fa2ccd971.js.LICENSE.txt → 509.341a4196aad912adb28d.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[102],{1587:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(5944),o=r(7294),i=r(8776),a=r(5467),l=r(2988),u=r(4665),c=r(7449),s=r(9479),f=function(){return f=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},f.apply(this,arguments)};function d(e){var t=e.id,r=e.text,d=e.responsiveStyles,p=e.absolute,h=void 0===p||p,v=e.containerRef,g=e.repeat,y=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}((0,o.useState)(!1),2),b=y[0],m=y[1],w=(0,o.useRef)(null);if(!(r=(0,u.xf)(r,g)))return null;var x=(0,s.tq)();return(0,n.BX)(n.HY,{children:[(0,n.tZ)("div",f({ref:w,onMouseEnter:x?void 0:function(){return m(!0)},onMouseLeave:x?void 0:function(){return m(!1)},onFocus:function(){return m(!0)},onBlur:function(){return m(!1)},onClick:function(){return m((function(e){return!e}))},css:h?{position:"absolute",insetInlineEnd:"10px",top:0,bottom:0,zIndex:l.rM,margin:"auto",cursor:"pointer",height:"100%",display:"flex"}:{position:"relative",marginInlineStart:"8px",display:"flex",alignItems:"center"}},{children:(0,n.tZ)(a.by,{cssStyles:d.getTarget("tooltipIcon")})})),(0,n.tZ)(c.Z,f({show:b,targetRef:w,containerRef:v,placement:"left",onHide:function(){return m(!1)},offset:8},{children:(0,n.tZ)(i.u,f({id:"tooltip-".concat(t),css:{zIndex:l.rM+1,padding:".4rem 0",transition:"opacity .10s linear",".tooltip-inner":{maxWidth:"200px",padding:".25rem .5rem",color:"#fff",textAlign:"center",backgroundColor:"#000",borderRadius:".25rem",fontSize:"smaller"}}},{children:r}))}))]})}},7449:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(5944),o=r(7294),i=r(3935),a=r(9479),l=function(){return l=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)};const u=function(e){var t=e.show,r=e.targetRef,u=e.children,f=e.onHide,d=e.placement,p=void 0===d?"bottom-start":d,h=e.offset,v=void 0===h?0:h,g=e.zIndex,y=void 0===g?1e3:g,b=e.containerRef,m=(0,o.useRef)(null),w=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}((0,o.useState)(null),2),x=w[0],S=w[1],E=(0,o.useCallback)((function(){return(null==b?void 0:b.current)||(0,a.me)().body}),[b]),k=(0,o.useCallback)((function(){var e;if(t&&r.current&&m.current){var n=(0,a.Kv)(),o=E();if(o){var i=r.current.getBoundingClientRect(),l=m.current.getBoundingClientRect(),u=o.getBoundingClientRect(),f=s(p,i,l,v),d=f.top,h=f.left,g=d+l.height,y=h+l.width,b=d>=0&&g<=n.innerHeight,w=h>=0&&y<=n.innerWidth;if(!b||!w){var x=c(p,!b,!w);x!==p&&(d=(e=s(x,i,l,v)).top,h=e.left)}var k=o===(0,a.me)().body,O=k?d+n.scrollY:d-u.top,Z=k?h+n.scrollX:h-u.left;S((function(e){return e&&e.top===O&&e.left===Z?e:{top:O,left:Z}}))}}}),[t,p,v,E,r]),O=(0,o.useCallback)((function(){var e=!1;return function(){e||(e=!0,requestAnimationFrame((function(){k(),e=!1})))}}),[k])();if((0,o.useLayoutEffect)((function(){t&&k()}),[t,k]),(0,o.useEffect)((function(){if(t){var e=(0,a.Kv)(),n=E();if(n){e.addEventListener("resize",O),e.addEventListener("scroll",O,!0),n!==(0,a.me)().body&&n.addEventListener("scroll",O);var o=new ResizeObserver((function(){return O()}));return r.current&&o.observe(r.current),n!==(0,a.me)().body&&o.observe(n),function(){e.removeEventListener("resize",O),e.removeEventListener("scroll",O,!0),n!==(0,a.me)().body&&n.removeEventListener("scroll",O),o.disconnect()}}}}),[t,O,E,r]),(0,o.useEffect)((function(){if(t){var e=function(e){"Escape"===e.key&&(S(null),null==f||f())},n=function(e){var t=e.target;m.current&&!m.current.contains(t)&&r.current&&!r.current.contains(t)&&(S(null),null==f||f())},o=(0,a.me)();return o.addEventListener("mousedown",n),o.addEventListener("keydown",e),function(){o.removeEventListener("mousedown",n),o.removeEventListener("keydown",e)}}}),[t,f,r]),!t)return null;var Z=E();return Z?(0,i.createPortal)((0,n.tZ)("div",l({ref:m,style:l(l({position:"absolute"},x||{top:-9999,left:-9999}),{zIndex:y})},{children:u})),Z):(0,n.tZ)(n.HY,{children:u})};var c=function(e,t,r){if(t){if(e.includes("top"))return e.replace("top","bottom");if(e.includes("bottom"))return e.replace("bottom","top")}if(r){if(e.includes("left"))return e.replace("left","right");if(e.includes("right"))return e.replace("right","left")}return e},s=function(e,t,r,n){switch(void 0===n&&(n=0),e){case"top":return{top:t.top-r.height-n,left:t.left+(t.width-r.width)/2};case"top-start":return{top:t.top-r.height-n,left:t.left};case"top-end":return{top:t.top-r.height-n,left:t.right-r.width};case"left":return{top:t.top+(t.height-r.height)/2,left:t.left-r.width-n};case"left-start":return{top:t.top,left:t.left-r.width-n};case"left-end":return{top:t.bottom-r.height,left:t.left-r.width-n};case"bottom":default:return{top:t.bottom+n,left:t.left+(t.width-r.width)/2};case"bottom-start":return{top:t.bottom+n,left:t.left};case"bottom-end":return{top:t.bottom+n,left:t.right-r.width};case"right":return{top:t.top+(t.height-r.height)/2,left:t.right+n};case"right-start":return{top:t.top,left:t.right+n};case"right-end":return{top:t.bottom-r.height,left:t.right+n}}}},9069:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(5944),o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)};function i(e){var t,r,i,a=e.value,l=e.element,u=e.responsiveStyles,c=e.type,s=void 0===c?"input":c,f=e.inputFocused,d=void 0!==f&&f,p=e.repeatIndex,h=void 0===p?null:p,v=l.properties,g=null!==(i=(null!==(r=v.repeat_placeholder)&&void 0!==r?r:[])[null!=h?h:0])&&void 0!==i?i:v.placeholder||"",y=o(o({},u.getTarget("placeholderFocus")),u.getTarget("placeholderActive"));return(0,n.tZ)("span",o({css:o(o(o(o({position:"absolute",pointerEvents:"none",insetInlineStart:"0.75rem",transition:"0.2s ease all",top:"input"===s?"50%":"0.6rem"},u.getTarget("placeholder")),a?u.getTarget("placeholderFocus"):{}),d?y:{}),(t={},t["".concat(s,":focus ~ &")]=y,t))},{children:g}))}},8776:(e,t,r)=>{r.d(t,{u:()=>a});var n=r(5944),o=r(2988),i=function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=function(e){var t=e.children,r=e.css,a=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(e,["children","css"]);return(0,n.tZ)("div",i({css:i({zIndex:o.rM+1,padding:".4rem 0",transition:"opacity .10s linear",".tooltip-inner":{maxWidth:"200px",padding:".25rem .5rem",color:"#fff",textAlign:"center",backgroundColor:"#000",borderRadius:".25rem",fontSize:"smaller"}},r)},a,{children:(0,n.tZ)("div",i({className:"tooltip-inner"},{children:t}))}))}},5024:(e,t,r)=>{r.r(t),r.d(t,{default:()=>b});var n=r(5944),o=r(7294),i=r(9069),a=r(1587),l=r(1211),u=r(3703),c=r(1296),s=r.n(c),f=r(6867),d=r(7449),p=r(1275),h=r(9479),v=r(5398),g=function(){return g=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},g.apply(this,arguments)},y=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};const b=(0,o.memo)((function(e){var t=this,r=e.element,c=e.responsiveStyles,b=e.fieldLabel,m=e.elementProps,w=void 0===m?{}:m,x=e.disabled,S=void 0!==x&&x,E=e.autoComplete,k=e.editMode,O=e.repeatIndex,Z=void 0===O?null:O,R=e.onSelect,L=void 0===R?function(){}:R,C=e.onChange,T=void 0===C?function(){}:C,z=e.required,I=e.onBlur,j=void 0===I?function(){}:I,B=e.onEnter,P=void 0===B?function(){}:B,F=e.setRef,_=void 0===F?function(){}:F,M=e.value,H=void 0===M?"":M,X=e.inlineError,q=e.children,A=r.servar,K=function(e,t){var r,n=t.metadata,i=n.address_autocomplete,a=null!==(r=n.autocomplete_country)&&void 0!==r?r:"",l=function(){var e=(0,o.useRef)(!0);return(0,o.useEffect)((function(){return e.current=!0,function(){e.current=!1}}),[]),e}(),c=y((0,o.useState)(e),2),f=c[0],d=c[1],p=y((0,o.useState)([]),2),h=p[0],v=p[1],g=(0,o.useCallback)(s()((function(e){(new u.ZP).addressSearchResults(e,a,"gmap_city"===t.type).then((function(t){l.current&&(v(t),d(e))}))}),500),[v,d]);return(0,o.useEffect)((function(){var t=e.trim();i&&t!==f&&(t.length>3?g(t):(h.length&&v([]),d(t)))}),[e]),h}(H,A),W=y((0,o.useState)(!1),2),Y=W[0],D=W[1],G=y((0,o.useState)(!1),2),N=G[0],J=G[1],Q=(0,o.useRef)(null),U=(0,o.useRef)(null),V=(0,o.useRef)(null),$=(0,v.Z)(V).width,ee=(0,f.Z)({element:r,error:X,breakpoint:c.getMobileBreakpoint()}),te=ee.borderStyles,re=ee.customBorder;return(0,n.BX)("div",g({ref:U,css:g({maxWidth:"100%",width:"100%",height:"100%",position:"relative",pointerEvents:k?"none":"auto"},c.getTarget("fc"))},w,{children:[q,b,(0,n.BX)("div",g({ref:V,css:g(g(g({position:"relative",width:"100%",overflowX:"clip"},c.getTarget("sub-fc")),S?c.getTarget("disabled"):{}),{"&:hover":(0,h.wL)(S?{}:g(g({},c.getTarget("hover")),te.hover)),"&&":N?g(g({},c.getTarget("active")),te.active):{}})},{children:[re,(0,n.tZ)("input",{id:A.key,name:A.key,css:g(g(g({position:"relative",height:"100%",width:"100%",border:"none",margin:0,backgroundColor:"transparent"},l.ET),c.getTarget("field")),N||H||!r.properties.placeholder?{}:{color:"transparent !important"}),maxLength:A.max_length,minLength:A.min_length,placeholder:"",disabled:S,"aria-label":r.properties.aria_label,autoComplete:"on"===E?"street-address":"new-password",value:H,ref:function(e){Q.current=e,_(e)},onKeyDown:function(e){var t;t=e,Boolean(t.isTrusted&&t.code)&&("Enter"===e.key?P(e):D("Escape"!==e.key))},onFocus:function(e){J(!0),(0,h.ms)(e)},onBlur:function(e){setTimeout((function(){return D(!1)}),200),j(e),J(!1)},onChange:T,required:z}),(0,n.tZ)(d.Z,g({show:Y&&K.length>0,targetRef:Q,containerRef:U,placement:"bottom-start",offset:4,onHide:function(){return D(!1)}},{children:(0,n.tZ)("ul",g({css:g({zIndex:p.m,listStyleType:"none",padding:0,margin:0,backgroundColor:"white",cursor:"pointer",boxShadow:"0 0 4px rgb(0 0 0 / 15%)",width:void 0!==$?"".concat($,"px"):"100%"},c.getTarget("dropdown"))},{children:K.map((function(e){var r=e.display,o=e.address_id;return(0,n.tZ)("li",g({css:{padding:"8px 14px",transition:"0.1s ease all","&:hover":(0,h.wL)({backgroundColor:"#e6e6e633"})},onClick:function(){return e=t,r=void 0,i=function(){var e,t;return function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}}(this,(function(r){switch(r.label){case 0:return[4,(new u.ZP).addressDetail(o)];case 1:return e=r.sent(),L(e,o),D(!1),null===(t=Q.current)||void 0===t||t.focus(),[2]}}))},new((n=void 0)||(n=Promise))((function(t,o){function a(e){try{u(i.next(e))}catch(e){o(e)}}function l(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){var r;e.done?t(e.value):(r=e.value,r instanceof n?r:new n((function(e){e(r)}))).then(a,l)}u((i=i.apply(e,r||[])).next())}));var e,r,n,i}},{children:r}),r)}))}))})),(0,n.tZ)(i.Z,{value:H,element:r,responsiveStyles:c,repeatIndex:Z}),(0,n.tZ)(a.Z,{containerRef:U,id:r.id,text:r.properties.tooltipText,responsiveStyles:c,repeat:r.repeat})]}))]}))}))},5398:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(7294),o=r(9479);function i(e){var t=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}((0,n.useState)({width:void 0,height:void 0}),2),r=t[0],i=t[1];return(0,n.useLayoutEffect)((function(){var t=function(){var t=e.current;if(t){var r=t.getBoundingClientRect(),n=r.width,o=r.height;i({width:n>0?n:void 0,height:o>0?o:void 0})}},r=e.current;if(r){if("undefined"==typeof ResizeObserver){var n=(0,o.Kv)();return n&&"function"==typeof n.addEventListener&&"function"==typeof n.removeEventListener?(n.addEventListener("resize",t),t(),function(){return n.removeEventListener("resize",t)}):void t()}var a=new ResizeObserver((function(){return t()}));try{a.observe(r,{box:"border-box"})}catch(e){a.observe(r)}return t(),function(){return a.disconnect()}}}),[e]),r}}}]);
|
|
1
|
+
"use strict";(this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[102],{1587:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(5944),o=r(7294),i=r(8776),a=r(5467),l=r(2988),u=r(4665),c=r(7449),s=r(9479),f=function(){return f=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},f.apply(this,arguments)};function d(e){var t=e.id,r=e.text,d=e.responsiveStyles,p=e.absolute,v=void 0===p||p,h=e.containerRef,g=e.repeat,y=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}((0,o.useState)(!1),2),b=y[0],m=y[1],w=(0,o.useRef)(null);if(!(r=(0,u.xf)(r,g)))return null;var x=(0,s.tq)();return(0,n.BX)(n.HY,{children:[(0,n.tZ)("div",f({ref:w,onMouseEnter:x?void 0:function(){return m(!0)},onMouseLeave:x?void 0:function(){return m(!1)},onFocus:function(){return m(!0)},onBlur:function(){return m(!1)},onClick:function(){return m((function(e){return!e}))},css:v?{position:"absolute",insetInlineEnd:"10px",top:0,bottom:0,zIndex:l.rM,margin:"auto",cursor:"pointer",height:"100%",display:"flex"}:{position:"relative",marginInlineStart:"8px",display:"flex",alignItems:"center"}},{children:(0,n.tZ)(a.by,{cssStyles:d.getTarget("tooltipIcon")})})),(0,n.tZ)(c.Z,f({show:b,targetRef:w,containerRef:h,placement:"left",onHide:function(){return m(!1)},offset:8},{children:(0,n.tZ)(i.u,f({id:"tooltip-".concat(t),css:{zIndex:l.rM+1,padding:".4rem 0",transition:"opacity .10s linear",".tooltip-inner":{maxWidth:"200px",padding:".25rem .5rem",color:"#fff",textAlign:"center",backgroundColor:"#000",borderRadius:".25rem",fontSize:"smaller"}}},{children:r}))}))]})}},7449:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(5944),o=r(7294),i=r(3935),a=r(9479),l=function(){return l=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)};const u=function(e){var t=e.show,r=e.targetRef,u=e.children,f=e.onHide,d=e.placement,p=void 0===d?"bottom-start":d,v=e.offset,h=void 0===v?0:v,g=e.zIndex,y=void 0===g?1e3:g,b=e.containerRef,m=(0,o.useRef)(null),w=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}((0,o.useState)(null),2),x=w[0],S=w[1],E=(0,o.useCallback)((function(){return(null==b?void 0:b.current)||(0,a.me)().body}),[b]),k=(0,o.useCallback)((function(){var e;if(t&&r.current&&m.current){var n=(0,a.Kv)(),o=E();if(o){var i=r.current.getBoundingClientRect(),l=m.current.getBoundingClientRect(),u=o.getBoundingClientRect(),f=s(p,i,l,h),d=f.top,v=f.left,g=d+l.height,y=v+l.width,b=d>=0&&g<=n.innerHeight,w=v>=0&&y<=n.innerWidth;if(!b||!w){var x=c(p,!b,!w);x!==p&&(d=(e=s(x,i,l,h)).top,v=e.left)}var k=o===(0,a.me)().body,O=k?d+n.scrollY:d-u.top,Z=k?v+n.scrollX:v-u.left;S((function(e){return e&&e.top===O&&e.left===Z?e:{top:O,left:Z}}))}}}),[t,p,h,E,r]),O=(0,o.useCallback)((function(){var e=!1;return function(){e||(e=!0,requestAnimationFrame((function(){k(),e=!1})))}}),[k])();if((0,o.useLayoutEffect)((function(){t&&k()}),[t,k]),(0,o.useEffect)((function(){if(t){var e=(0,a.Kv)(),n=E();if(n){e.addEventListener("resize",O),e.addEventListener("scroll",O,!0),n!==(0,a.me)().body&&n.addEventListener("scroll",O);var o=new ResizeObserver((function(){return O()}));return r.current&&o.observe(r.current),n!==(0,a.me)().body&&o.observe(n),function(){e.removeEventListener("resize",O),e.removeEventListener("scroll",O,!0),n!==(0,a.me)().body&&n.removeEventListener("scroll",O),o.disconnect()}}}}),[t,O,E,r]),(0,o.useEffect)((function(){if(t){var e=function(e){"Escape"===e.key&&(S(null),null==f||f())},n=function(e){var t=e.target;m.current&&!m.current.contains(t)&&r.current&&!r.current.contains(t)&&(S(null),null==f||f())},o=(0,a.me)();return o.addEventListener("mousedown",n),o.addEventListener("keydown",e),function(){o.removeEventListener("mousedown",n),o.removeEventListener("keydown",e)}}}),[t,f,r]),!t)return null;var Z=E();return Z?(0,i.createPortal)((0,n.tZ)("div",l({ref:m,style:l(l({position:"absolute"},x||{top:-9999,left:-9999}),{zIndex:y})},{children:u})),Z):(0,n.tZ)(n.HY,{children:u})};var c=function(e,t,r){if(t){if(e.includes("top"))return e.replace("top","bottom");if(e.includes("bottom"))return e.replace("bottom","top")}if(r){if(e.includes("left"))return e.replace("left","right");if(e.includes("right"))return e.replace("right","left")}return e},s=function(e,t,r,n){switch(void 0===n&&(n=0),e){case"top":return{top:t.top-r.height-n,left:t.left+(t.width-r.width)/2};case"top-start":return{top:t.top-r.height-n,left:t.left};case"top-end":return{top:t.top-r.height-n,left:t.right-r.width};case"left":return{top:t.top+(t.height-r.height)/2,left:t.left-r.width-n};case"left-start":return{top:t.top,left:t.left-r.width-n};case"left-end":return{top:t.bottom-r.height,left:t.left-r.width-n};case"bottom":default:return{top:t.bottom+n,left:t.left+(t.width-r.width)/2};case"bottom-start":return{top:t.bottom+n,left:t.left};case"bottom-end":return{top:t.bottom+n,left:t.right-r.width};case"right":return{top:t.top+(t.height-r.height)/2,left:t.right+n};case"right-start":return{top:t.top,left:t.right+n};case"right-end":return{top:t.bottom-r.height,left:t.right+n}}}},9069:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(5944),o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)};function i(e){var t,r,i,a=e.value,l=e.element,u=e.responsiveStyles,c=e.type,s=void 0===c?"input":c,f=e.inputFocused,d=void 0!==f&&f,p=e.repeatIndex,v=void 0===p?null:p,h=l.properties,g=null!==(i=(null!==(r=h.repeat_placeholder)&&void 0!==r?r:[])[null!=v?v:0])&&void 0!==i?i:h.placeholder||"",y=o(o({},u.getTarget("placeholderFocus")),u.getTarget("placeholderActive"));return(0,n.tZ)("span",o({css:o(o(o(o({position:"absolute",pointerEvents:"none",insetInlineStart:"0.75rem",transition:"0.2s ease all",top:"input"===s?"50%":"0.6rem"},u.getTarget("placeholder")),a?u.getTarget("placeholderFocus"):{}),d?y:{}),(t={},t["".concat(s,":focus ~ &")]=y,t))},{children:g}))}},8776:(e,t,r)=>{r.d(t,{u:()=>a});var n=r(5944),o=r(2988),i=function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=function(e){var t=e.children,r=e.css,a=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(e,["children","css"]);return(0,n.tZ)("div",i({css:i({zIndex:o.rM+1,padding:".4rem 0",transition:"opacity .10s linear",".tooltip-inner":{maxWidth:"200px",padding:".25rem .5rem",color:"#fff",textAlign:"center",backgroundColor:"#000",borderRadius:".25rem",fontSize:"smaller"}},r)},a,{children:(0,n.tZ)("div",i({className:"tooltip-inner"},{children:t}))}))}},5024:(e,t,r)=>{r.r(t),r.d(t,{default:()=>b});var n=r(5944),o=r(7294),i=r(9069),a=r(1587),l=r(1211),u=r(9292),c=r(1296),s=r.n(c),f=r(6867),d=r(7449),p=r(1275),v=r(9479),h=r(5398),g=function(){return g=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},g.apply(this,arguments)},y=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};const b=(0,o.memo)((function(e){var t=this,r=e.element,c=e.responsiveStyles,b=e.fieldLabel,m=e.elementProps,w=void 0===m?{}:m,x=e.disabled,S=void 0!==x&&x,E=e.autoComplete,k=e.editMode,O=e.repeatIndex,Z=void 0===O?null:O,R=e.onSelect,L=void 0===R?function(){}:R,C=e.onChange,T=void 0===C?function(){}:C,z=e.required,I=e.onBlur,j=void 0===I?function(){}:I,B=e.onEnter,P=void 0===B?function(){}:B,_=e.setRef,F=void 0===_?function(){}:_,M=e.value,H=void 0===M?"":M,X=e.inlineError,q=e.children,A=r.servar,K=function(e,t){var r,n=t.metadata,i=n.address_autocomplete,a=null!==(r=n.autocomplete_country)&&void 0!==r?r:"",l=function(){var e=(0,o.useRef)(!0);return(0,o.useEffect)((function(){return e.current=!0,function(){e.current=!1}}),[]),e}(),c=y((0,o.useState)(e),2),f=c[0],d=c[1],p=y((0,o.useState)([]),2),v=p[0],h=p[1],g=(0,o.useCallback)(s()((function(e){(new u.ZP).addressSearchResults(e,a,"gmap_city"===t.type).then((function(t){l.current&&(h(t),d(e))}))}),500),[h,d]);return(0,o.useEffect)((function(){var t=e.trim();i&&t!==f&&(t.length>3?g(t):(v.length&&h([]),d(t)))}),[e]),v}(H,A),W=y((0,o.useState)(!1),2),Y=W[0],D=W[1],G=y((0,o.useState)(!1),2),N=G[0],J=G[1],Q=(0,o.useRef)(null),U=(0,o.useRef)(null),V=(0,o.useRef)(null),$=(0,h.Z)(V).width,ee=(0,f.Z)({element:r,error:X,breakpoint:c.getMobileBreakpoint()}),te=ee.borderStyles,re=ee.customBorder,ne="gmap_city"===A.type?"address-level2":"street-address";return(0,n.BX)("div",g({ref:U,css:g({maxWidth:"100%",width:"100%",height:"100%",position:"relative",pointerEvents:k?"none":"auto"},c.getTarget("fc"))},w,{children:[q,b,(0,n.BX)("div",g({ref:V,css:g(g(g({position:"relative",width:"100%",overflowX:"clip"},c.getTarget("sub-fc")),S?c.getTarget("disabled"):{}),{"&:hover":(0,v.wL)(S?{}:g(g({},c.getTarget("hover")),te.hover)),"&&":N?g(g({},c.getTarget("active")),te.active):{}})},{children:[re,(0,n.tZ)("input",{id:A.key,name:A.key,css:g(g(g({position:"relative",height:"100%",width:"100%",border:"none",margin:0,backgroundColor:"transparent"},l.ET),c.getTarget("field")),N||H||!r.properties.placeholder?{}:{color:"transparent !important"}),maxLength:A.max_length,minLength:A.min_length,placeholder:"",disabled:S,"aria-label":r.properties.aria_label,autoComplete:"on"===E?ne:"new-password",value:H,ref:function(e){Q.current=e,F(e)},onKeyDown:function(e){var t;t=e,Boolean(t.isTrusted&&t.code)&&("Enter"===e.key?P(e):D("Escape"!==e.key))},onFocus:function(e){J(!0),(0,v.ms)(e)},onBlur:function(e){setTimeout((function(){return D(!1)}),200),j(e),J(!1)},onChange:T,required:z}),(0,n.tZ)(d.Z,g({show:Y&&K.length>0,targetRef:Q,containerRef:U,placement:"bottom-start",offset:4,onHide:function(){return D(!1)}},{children:(0,n.tZ)("ul",g({css:g({zIndex:p.m,listStyleType:"none",padding:0,margin:0,backgroundColor:"white",cursor:"pointer",boxShadow:"0 0 4px rgb(0 0 0 / 15%)",width:void 0!==$?"".concat($,"px"):"100%"},c.getTarget("dropdown"))},{children:K.map((function(e){var r=e.display,o=e.address_id;return(0,n.tZ)("li",g({css:{padding:"8px 14px",transition:"0.1s ease all","&:hover":(0,v.wL)({backgroundColor:"#e6e6e633"})},onClick:function(){return e=t,r=void 0,i=function(){var e,t;return function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}}(this,(function(r){switch(r.label){case 0:return[4,(new u.ZP).addressDetail(o)];case 1:return e=r.sent(),L(e,o),D(!1),null===(t=Q.current)||void 0===t||t.focus(),[2]}}))},new((n=void 0)||(n=Promise))((function(t,o){function a(e){try{u(i.next(e))}catch(e){o(e)}}function l(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){var r;e.done?t(e.value):(r=e.value,r instanceof n?r:new n((function(e){e(r)}))).then(a,l)}u((i=i.apply(e,r||[])).next())}));var e,r,n,i}},{children:r}),r)}))}))})),(0,n.tZ)(i.Z,{value:H,element:r,responsiveStyles:c,repeatIndex:Z}),(0,n.tZ)(a.Z,{containerRef:U,id:r.id,text:r.properties.tooltipText,responsiveStyles:c,repeat:r.repeat})]}))]}))}))},5398:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(7294),o=r(9479);function i(e){var t=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}((0,n.useState)({width:void 0,height:void 0}),2),r=t[0],i=t[1];return(0,n.useLayoutEffect)((function(){var t=function(){var t=e.current;if(t){var r=t.getBoundingClientRect(),n=r.width,o=r.height;i({width:n>0?n:void 0,height:o>0?o:void 0})}},r=e.current;if(r){if("undefined"==typeof ResizeObserver){var n=(0,o.Kv)();return n&&"function"==typeof n.addEventListener&&"function"==typeof n.removeEventListener?(n.addEventListener("resize",t),t(),function(){return n.removeEventListener("resize",t)}):void t()}var a=new ResizeObserver((function(){return t()}));try{a.observe(r,{box:"border-box"})}catch(e){a.observe(r)}return t(),function(){return a.disconnect()}}}),[e]),r}}}]);
|