@feathery/react 2.31.0 → 2.32.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/grid/Element/index.d.ts.map +1 -1
- package/cjs/Form/index.d.ts.map +1 -1
- package/cjs/assistant/index.d.ts +4 -8
- package/cjs/assistant/index.d.ts.map +1 -1
- package/cjs/assistant/utils.d.ts +23 -0
- package/cjs/assistant/utils.d.ts.map +1 -0
- package/cjs/elements/basic/TableElement/Actions.d.ts +1 -3
- package/cjs/elements/basic/TableElement/Actions.d.ts.map +1 -1
- package/cjs/elements/basic/TableElement/Search.d.ts.map +1 -1
- package/cjs/elements/basic/TableElement/index.d.ts +1 -1
- package/cjs/elements/basic/TableElement/index.d.ts.map +1 -1
- package/cjs/elements/basic/TableElement/styles.d.ts +4 -221
- package/cjs/elements/basic/TableElement/styles.d.ts.map +1 -1
- package/cjs/elements/basic/TableElement/useTableData.d.ts +1 -6
- package/cjs/elements/basic/TableElement/useTableData.d.ts.map +1 -1
- package/cjs/elements/components/icons/index.d.ts +1 -2
- package/cjs/elements/components/icons/index.d.ts.map +1 -1
- package/cjs/{fthry_FormControl.WIYoX7l6.js → fthry_FormControl.DurQlaqU.js} +1 -1
- package/cjs/{fthry_InlineTooltip.C6Kf0Ff-.js → fthry_InlineTooltip.BXWfZzL2.js} +2 -2
- package/cjs/{fthry_Overlay.JRkHffzB.js → fthry_Overlay.CioCMhlq.js} +1 -1
- package/cjs/{fthry_PaymentMethodField.DvPj_Lup.js → fthry_PaymentMethodField.DhSkUuU-.js} +4 -4
- package/cjs/{fthry_Placeholder.luXrF_m_.js → fthry_Placeholder.CX7qc-Cl.js} +1 -1
- package/cjs/{fthry_ShowEyeIcon.cWxfPj5A.js → fthry_ShowEyeIcon.80VHzelN.js} +1 -1
- package/cjs/{fthry_index.B_WCqLEf.js → fthry_index.9yf8TiBa.js} +2 -2
- package/cjs/{fthry_index.Bxz6SYIg.js → fthry_index.B8tZZXUF.js} +6 -6
- package/cjs/{fthry_index.BT0N_ojJ.js → fthry_index.BnYce3sm.js} +5 -5
- package/cjs/{fthry_index.DtcJ5ShY.js → fthry_index.Br877QRA.js} +3 -3
- package/cjs/{fthry_index.Be2Fs97T.js → fthry_index.BrWW45H5.js} +5 -5
- package/cjs/{fthry_index.Ax4XuQ-W.js → fthry_index.C05KVXV6.js} +1 -1
- package/cjs/{fthry_index.CmAB9Ar7.js → fthry_index.C5QUdS7L.js} +1 -1
- package/cjs/{fthry_index.BS2jEY70.js → fthry_index.CANZBm-k.js} +5 -5
- package/cjs/{fthry_index.DWS39de6.js → fthry_index.CLPl9dPm.js} +1 -1
- package/cjs/{fthry_index.CcK_Svsf.js → fthry_index.CY58pJ5G.js} +6 -6
- package/cjs/{fthry_index.DdSDwu2Z.js → fthry_index.Cgn2gw_g.js} +1 -1
- package/cjs/{fthry_index.7lPT7adc.js → fthry_index.Cm-Al4PR.js} +4 -4
- package/cjs/{fthry_index.DtiRdy95.js → fthry_index.CwZL5tZB.js} +3 -3
- package/cjs/{fthry_index.W-9IfXEV.js → fthry_index.D3P96Nnw.js} +4 -4
- package/cjs/{fthry_index.D_RuNzwI.js → fthry_index.DALbyltA.js} +8 -8
- package/cjs/{fthry_index.C51tqyoq.js → fthry_index.DPXTa2dj.js} +1 -1
- package/cjs/{fthry_index.IHqwZyC3.js → fthry_index.DQL_RNQ5.js} +361 -54
- package/cjs/{fthry_index.CfElaaWV.js → fthry_index.DXol9L5L.js} +6 -6
- package/cjs/{fthry_index.B1gH_Pb_.js → fthry_index.Dofn1W06.js} +4 -4
- package/cjs/{fthry_index.C4a2Ic12.js → fthry_index.DpeEqUaO.js} +1 -1
- package/cjs/{fthry_index.Io4u55nU.js → fthry_index.NnMUv723.js} +47 -527
- package/cjs/{fthry_index.TgxeIOKY.js → fthry_index.Oufk9PK1.js} +2 -2
- package/cjs/{fthry_index.Caau3hdX.js → fthry_index.RkgEXvkN.js} +5 -5
- package/cjs/{fthry_index.BAf-75T4.js → fthry_index.cjyiNFQz.js} +1 -1
- package/cjs/{fthry_input.QMSUSm2J.js → fthry_input.Ek-TePLo.js} +1 -1
- package/cjs/{fthry_script.Bnnc8FZ3.js → fthry_script.D4I5wEAM.js} +1 -1
- package/cjs/{fthry_styles.MX1EKxvQ.js → fthry_styles.BAOkmtNa.js} +1 -1
- package/cjs/{fthry_useElementSize.Dup4Oq53.js → fthry_useElementSize.DxiZSHps.js} +1 -1
- package/cjs/{fthry_useSalesforceSync.D0kLb1UT.js → fthry_useSalesforceSync.0Po-_R2K.js} +1 -1
- package/cjs/{fthry_webfontloader.C-AsnAPa.js → fthry_webfontloader.Dpbr76nZ.js} +1 -1
- package/cjs/index.d.ts +0 -1
- package/cjs/index.d.ts.map +1 -1
- package/cjs/index.js +1 -1
- package/dist/Form/grid/Element/index.d.ts.map +1 -1
- package/dist/Form/index.d.ts.map +1 -1
- package/dist/assistant/index.d.ts +4 -8
- package/dist/assistant/index.d.ts.map +1 -1
- package/dist/assistant/utils.d.ts +23 -0
- package/dist/assistant/utils.d.ts.map +1 -0
- package/dist/elements/basic/TableElement/Actions.d.ts +1 -3
- package/dist/elements/basic/TableElement/Actions.d.ts.map +1 -1
- package/dist/elements/basic/TableElement/Search.d.ts.map +1 -1
- package/dist/elements/basic/TableElement/index.d.ts +1 -1
- package/dist/elements/basic/TableElement/index.d.ts.map +1 -1
- package/dist/elements/basic/TableElement/styles.d.ts +4 -221
- package/dist/elements/basic/TableElement/styles.d.ts.map +1 -1
- package/dist/elements/basic/TableElement/useTableData.d.ts +1 -6
- package/dist/elements/basic/TableElement/useTableData.d.ts.map +1 -1
- package/dist/elements/components/icons/index.d.ts +1 -2
- package/dist/elements/components/icons/index.d.ts.map +1 -1
- package/dist/{fthry_FormControl.DEleJ-Vj.js → fthry_FormControl.CxJVENhU.js} +1 -1
- package/dist/{fthry_InlineTooltip.DeG1g5MU.js → fthry_InlineTooltip.CqD5dxb4.js} +2 -2
- package/dist/{fthry_Overlay.CtQBdlg7.js → fthry_Overlay.C-S2P_RR.js} +1 -1
- package/dist/{fthry_PaymentMethodField.CryiQIpT.js → fthry_PaymentMethodField.QXLEi8jw.js} +4 -4
- package/dist/{fthry_Placeholder.Bel7e4T4.js → fthry_Placeholder.DdvJyqsu.js} +1 -1
- package/dist/{fthry_ShowEyeIcon.BeXoEyvh.js → fthry_ShowEyeIcon.CZus1erN.js} +1 -1
- package/dist/{fthry_index.BNi8VaMz.js → fthry_index.4JG7sxtp.js} +2 -2
- package/dist/{fthry_index.CUF2y3Aa.js → fthry_index.9VAfgoMl.js} +1 -1
- package/dist/{fthry_index.Dkg3j5xH.js → fthry_index.B3B8bEEX.js} +2 -2
- package/dist/{fthry_index.y9utv2Db.js → fthry_index.BJVuZZ2J.js} +1 -1
- package/dist/{fthry_index.DR8HsKVo.js → fthry_index.BL5rEBAF.js} +4 -4
- package/dist/{fthry_index.D7lNVIgD.js → fthry_index.BT7cSNXV.js} +1 -1
- package/dist/{fthry_index.DtrV_j07.js → fthry_index.BV8FC0Yc.js} +1 -1
- package/dist/{fthry_index.Bi8oY0jk.js → fthry_index.B_7ywejL.js} +5 -5
- package/dist/{fthry_index.CMh4cU_z.js → fthry_index.Bk7-v1ou.js} +362 -55
- package/dist/{fthry_index.DSS7GFbG.js → fthry_index.BmrKBP2b.js} +4 -4
- package/dist/{fthry_index.By9Va7yz.js → fthry_index.Bn5hHeFA.js} +6 -6
- package/dist/{fthry_index.DclrMlf2.js → fthry_index.BpZ7gZfF.js} +5 -5
- package/dist/{fthry_index.ClSefCHf.js → fthry_index.BsCv8dPB.js} +1 -1
- package/dist/{fthry_index.F3kjcuAK.js → fthry_index.C5ZHl-kt.js} +48 -528
- package/dist/{fthry_index.D9GA9x4P.js → fthry_index.C6CFRFmj.js} +3 -3
- package/dist/{fthry_index.0A10yDWO.js → fthry_index.CNIO-M5G.js} +1 -1
- package/dist/{fthry_index.CVQd320z.js → fthry_index.Cr2SZgDK.js} +8 -8
- package/dist/{fthry_index.Bk-p0axS.js → fthry_index.CsSJubdr.js} +6 -6
- package/dist/{fthry_index.Bb9yC_Hb.js → fthry_index.Cv8JZvnf.js} +3 -3
- package/dist/{fthry_index.D_JQEcg-.js → fthry_index.DUhZfNzg.js} +4 -4
- package/dist/{fthry_index.sWxp-JjY.js → fthry_index.DVRFkK73.js} +5 -5
- package/dist/{fthry_index.DKiSNQ6p.js → fthry_index.DmqZnhoE.js} +1 -1
- package/dist/{fthry_index.C9r-2T-9.js → fthry_index.p64tvQaa.js} +6 -6
- package/dist/{fthry_index.Dxpjw81y.js → fthry_index.wqVaa2JI.js} +5 -5
- package/dist/{fthry_input.DlZicl10.js → fthry_input.aOsdUSPt.js} +1 -1
- package/dist/{fthry_script.BjtIkib6.js → fthry_script.HcN-guNp.js} +1 -1
- package/dist/{fthry_styles.Dxs0EByz.js → fthry_styles.BLq5f5E_.js} +1 -1
- package/dist/{fthry_useElementSize.BeQYF72J.js → fthry_useElementSize.ZyD83Wr1.js} +1 -1
- package/dist/{fthry_useSalesforceSync.DcCcNLS2.js → fthry_useSalesforceSync.Ddbp4SYp.js} +1 -1
- package/dist/{fthry_webfontloader.B7FGEMJA.js → fthry_webfontloader.C3IotuWt.js} +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/umd/{277.87e6ca5c1cf2a7477992.js → 277.d9907ecd5dc2117c9171.js} +1 -1
- package/umd/{509.bca2ff43c66b1dba064f.js → 509.a863f8749c28540476bb.js} +2 -2
- package/umd/{AddressField.2d777eda22a67a0ed3a3.js → AddressField.ec97334fe233830bc05b.js} +1 -1
- package/umd/{DateSelectorField.54afc978d2fd9d10b106.js → DateSelectorField.00f321e0b1972feb9d69.js} +1 -1
- package/umd/{FileUploadField.7a5028fb6035d09b3e81.js → FileUploadField.ea0067dd62b0454b7c2e.js} +1 -1
- package/umd/{PasswordField.7585ef588333cb4181f7.js → PasswordField.1358356d6fbc6880f12a.js} +1 -1
- package/umd/{PaymentMethodField.d08bcfa1efb56084572d.js → PaymentMethodField.9a8e934f7450eb141217.js} +1 -1
- package/umd/{PhoneField.19c987f04cfcb60ab07c.js → PhoneField.c526085aaa5ccd25e982.js} +1 -1
- package/umd/{SignatureField.0e7d60fa2fafcb6be554.js → SignatureField.d710930ca89642eb651c.js} +1 -1
- package/umd/TableElement.ee77e0f53a9ccac846ab.js +1 -0
- package/umd/{TextArea.7cca0d69e618846660c5.js → TextArea.f566845d458d4c00e0e7.js} +1 -1
- package/umd/{TextField.f5cc4a03e69d5872027b.js → TextField.5a5296fe3ea60c4459f2.js} +1 -1
- package/umd/index.js +1 -1
- package/cjs/elements/basic/TableElement/DeleteConfirm.d.ts +0 -11
- package/cjs/elements/basic/TableElement/DeleteConfirm.d.ts.map +0 -1
- package/cjs/elements/basic/TableElement/EditableCell.d.ts +0 -10
- package/cjs/elements/basic/TableElement/EditableCell.d.ts.map +0 -1
- package/cjs/elements/basic/TableElement/useColumnWidths.d.ts +0 -7
- package/cjs/elements/basic/TableElement/useColumnWidths.d.ts.map +0 -1
- package/cjs/elements/basic/TableElement/useTableMutations.d.ts +0 -23
- package/cjs/elements/basic/TableElement/useTableMutations.d.ts.map +0 -1
- package/cjs/elements/components/icons/TrashIcon.d.ts +0 -3
- package/cjs/elements/components/icons/TrashIcon.d.ts.map +0 -1
- package/dist/elements/basic/TableElement/DeleteConfirm.d.ts +0 -11
- package/dist/elements/basic/TableElement/DeleteConfirm.d.ts.map +0 -1
- package/dist/elements/basic/TableElement/EditableCell.d.ts +0 -10
- package/dist/elements/basic/TableElement/EditableCell.d.ts.map +0 -1
- package/dist/elements/basic/TableElement/useColumnWidths.d.ts +0 -7
- package/dist/elements/basic/TableElement/useColumnWidths.d.ts.map +0 -1
- package/dist/elements/basic/TableElement/useTableMutations.d.ts +0 -23
- package/dist/elements/basic/TableElement/useTableMutations.d.ts.map +0 -1
- package/dist/elements/components/icons/TrashIcon.d.ts +0 -3
- package/dist/elements/components/icons/TrashIcon.d.ts.map +0 -1
- package/umd/TableElement.b9bb3cedf1a75fd2ea01.js +0 -1
- /package/umd/{509.bca2ff43c66b1dba064f.js.LICENSE.txt → 509.a863f8749c28540476bb.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[707],{1587:(e,t,r)=>{r.d(t,{Z:()=>f});var n=r(5944),o=r(7294),i=r(8776),a=r(5096),l=r(2988),u=r(4665),c=r(7449),s=r(9479),d=function(){return d=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},d.apply(this,arguments)};function f(e){var t=e.id,r=e.text,f=e.responsiveStyles,p=e.absolute,v=void 0===p||p,h=e.containerRef,m=e.repeat,g=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),y=g[0],b=g[1],w=(0,o.useRef)(null);if(!(r=(0,u.xf)(r,m)))return null;var x=(0,s.tq)();return(0,n.BX)(n.HY,{children:[(0,n.tZ)("div",d({ref:w,onMouseEnter:x?void 0:function(){return b(!0)},onMouseLeave:x?void 0:function(){return b(!1)},onFocus:function(){return b(!0)},onBlur:function(){return b(!1)},onClick:function(){return b((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:f.getTarget("tooltipIcon")})})),(0,n.tZ)(c.Z,d({show:y,targetRef:w,containerRef:h,placement:"left",onHide:function(){return b(!1)},offset:8},{children:(0,n.tZ)(i.u,d({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,d=e.onHide,f=e.placement,p=void 0===f?"bottom-start":f,v=e.offset,h=void 0===v?0:v,m=e.zIndex,g=void 0===m?1e3:m,y=e.containerRef,b=(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],k=w[1],S=(0,o.useCallback)((function(){return(null==y?void 0:y.current)||(0,a.me)().body}),[y]),O=(0,o.useCallback)((function(){var e;if(t&&r.current&&b.current){var n=(0,a.Kv)(),o=S();if(o){var i=r.current.getBoundingClientRect(),l=b.current.getBoundingClientRect(),u=o.getBoundingClientRect(),d=s(p,i,l,h),f=d.top,v=d.left,m=f+l.height,g=v+l.width,y=f>=0&&m<=n.innerHeight,w=v>=0&&g<=n.innerWidth;if(!y||!w){var x=c(p,!y,!w);x!==p&&(f=(e=s(x,i,l,h)).top,v=e.left)}var O=o===(0,a.me)().body,E=O?f+n.scrollY:f-u.top,R=O?v+n.scrollX:v-u.left;k((function(e){return e&&e.top===E&&e.left===R?e:{top:E,left:R}}))}}}),[t,p,h,S,r]),E=(0,o.useCallback)((function(){var e=!1;return function(){e||(e=!0,requestAnimationFrame((function(){O(),e=!1})))}}),[O])();if((0,o.useLayoutEffect)((function(){t&&O()}),[t,O]),(0,o.useEffect)((function(){if(t){var e=(0,a.Kv)(),n=S();if(n){e.addEventListener("resize",E),e.addEventListener("scroll",E,!0),n!==(0,a.me)().body&&n.addEventListener("scroll",E);var o=new ResizeObserver((function(){return E()}));return r.current&&o.observe(r.current),n!==(0,a.me)().body&&o.observe(n),function(){e.removeEventListener("resize",E),e.removeEventListener("scroll",E,!0),n!==(0,a.me)().body&&n.removeEventListener("scroll",E),o.disconnect()}}}}),[t,E,S,r]),(0,o.useEffect)((function(){if(t){var e=function(e){"Escape"===e.key&&(k(null),null==d||d())},n=function(e){var t=e.target;b.current&&!b.current.contains(t)&&r.current&&!r.current.contains(t)&&(k(null),null==d||d())},o=(0,a.me)();return o.addEventListener("mousedown",n),o.addEventListener("keydown",e),function(){o.removeEventListener("mousedown",n),o.removeEventListener("keydown",e)}}}),[t,d,r]),!t)return null;var R=S();return R?(0,i.createPortal)((0,n.tZ)("div",l({ref:b,style:l(l({position:"absolute"},x||{top:-9999,left:-9999}),{zIndex:g})},{children:u})),R):(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,d=e.inputFocused,f=void 0!==d&&d,p=e.repeatIndex,v=void 0===p?null:p,h=l.properties,m=null!==(i=(null!==(r=h.repeat_placeholder)&&void 0!==r?r:[])[null!=v?v:0])&&void 0!==i?i:h.placeholder||"",g=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"):{}),f?g:{}),(t={},t["".concat(s,":focus ~ &")]=g,t))},{children:m}))}},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}))}))}},8500:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Z});var n=r(5944),o=r(7294),i=r(9069),a=r(1587),l=r(1211),u=r(9234),c=r(6867),s=r(1275),d=r(7449),f=r(5398),p=function(){return p=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},p.apply(this,arguments)};const v=(0,o.memo)((function(e){var t=e.allOptions,r=void 0===t?[]:t,i=e.showOptions,a=e.onSelect,l=void 0===a?function(){}:a,u=e.onHide,c=void 0===u?function(){}:u,v=e.onInputFocus,h=void 0===v?function(){}:v,m=e.value,g=void 0===m?"":m,y=e.containerRef,b=e.responsiveStyles,w=e.listItemRef,x=e.children,k=r.filter((function(e){return e.toLowerCase().includes(g.toLowerCase())})),S=(0,o.useRef)(null),O=(0,f.Z)(S).width;return 0===r.length?x:(0,n.BX)("div",p({ref:S,css:{height:"100%",width:"100%"}},{children:[x,k.length>0&&i&&(0,n.tZ)(d.Z,p({targetRef:S,containerRef:y,show:!0,placement:"bottom-start",onHide:c},{children:(0,n.tZ)("ul",p({css:p({zIndex:s.m,listStyleType:"none",padding:0,margin:0,maxHeight:"210px",overflowY:"scroll",overflowX:"auto",width:void 0!==O?"".concat(O,"px"):"100%",backgroundColor:"white",cursor:"pointer",boxShadow:"0 0 4px rgb(0 0 0 / 15%)"},b.getTarget("dropdown"))},{children:k.map((function(e,t){return(0,n.tZ)("li",p({css:{padding:"8px 14px",transition:"0.1s ease all","&:hover":{backgroundColor:"#e6e6e633"},"&:focus-visible":{outline:"none",backgroundColor:"#e6e6e644"}},tabIndex:0,ref:function(e){w.current[t]=e},onClick:function(){return l(e)},onKeyDown:function(r){var n,o,i=function(){r.preventDefault(),r.stopPropagation()};"Enter"===r.key?(i(),l(e)):["ArrowDown","ArrowRight"].includes(r.key)?(i(),null===(n=w.current[t].nextSibling)||void 0===n||n.focus()):["ArrowUp","ArrowLeft"].includes(r.key)&&(i(),0===t?h():null===(o=w.current[t].previousSibling)||void 0===o||o.focus())},onBlur:function(e){e.relatedTarget&&w.current.some((function(t){return t===e.relatedTarget}))||c()}},{children:e}),"".concat(e,"-").concat(t))}))}))}))]}))}));var h=r(7193),m=r(426),g=r(2988),y=r(9479),b=r(5096),w=r(3466),x=function(){return x=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},x.apply(this,arguments)},k=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},S={text_area:16384,url:256,gmap_zip:10},O=function(e){var t;return null!==(t=S[e])&&void 0!==t?t:1024};function E(e){return(null!=e?e:"").replaceAll("0","\\0").replaceAll("a","\\a").replaceAll("b","\\b").replaceAll("*","\\*")}function R(e){var t=e.metadata,r=E(t.prefix),n=E(t.suffix),o="";if(t.mask)o=t.mask;else{var i=t.allowed_characters;"gmap_zip"!==e.type||i||(i="alphaspace");var a=function(e){switch(e){case"letters":return"a";case"alphanumeric":return"b";case"alphaspace":return"c";case"digits":return"0";default:return"*"}}(i),l=O(e.type)-r.length-n.length;e.max_length&&(l=Math.min(e.max_length,l)),o="[".concat(a.repeat(l),"]")}return"".concat(r).concat(o).concat(n)}function C(e,t,r){var n,o,i,a,l=null!==(n=e.max_length)&&void 0!==n?n:O(e.type);switch(e.type){case"integer_field":a={mask:"num",blocks:{num:{mask:Number,radix:".",thousandsSeparator:",",scale:2,max:null!==(o=e.max_length)&&void 0!==o?o:Number.MAX_SAFE_INTEGER,min:Math.max(0,null!==(i=e.min_length)&&void 0!==i?i:0)}},value:t.toString()},"currency"===e.format&&(a.mask="$num");break;case"ssn":a={mask:e.metadata.last_four_digits?"∗∗∗ - ∗∗ - 0000":"000 - 00 - 0000",displayChar:r?void 0:"∗",placeholderChar:e.metadata.last_four_digits?" ":void 0,lazy:!e.metadata.last_four_digits};break;case"email":case"text_area":case"url":a={mask:new RegExp("^.{0,".concat(l,"}$")),maxLength:l};break;default:e.metadata.mask&&(l=void 0),a={mask:R(e),definitions:{b:/[a-zA-Z0-9]/,c:/[a-zA-Z0-9 ]/},maxLength:l}}return x({lazy:!1,unmask:!e.metadata.save_mask},a)}function L(e,t,r){var n,o={minLength:e.min_length},i=null!==(n=e.max_length)&&void 0!==n?n:O(e.type);t.length>0&&(o.autoComplete="off");var a=e.metadata;switch(e.type){case"integer_field":return{inputMode:"decimal"};case"email":return r&&!o.autoComplete&&(o.autoComplete="email"),x({type:"email",pattern:u.Z1,maxLength:i},o);case"gmap_zip":return r&&!o.autoComplete&&(o.autoComplete="postal-code"),x(x({},o),{maxLength:i,inputMode:"digits"===a.allowed_characters?"numeric":"text"});case"url":return r&&!o.autoComplete&&(o.autoComplete="url",o.maxLength=i),o;case"ssn":return x({inputMode:"numeric"},o);default:return o.maxLength=i,a.custom_autocomplete&&!o.autoComplete&&(o.autoComplete=a.custom_autocomplete),a.number_keypad||"digits"===a.allowed_characters?x({inputMode:"numeric"},o):o}}const Z=(0,o.memo)((function(e){var t,r,u=e.element,s=e.responsiveStyles,d=e.fieldLabel,f=e.elementProps,p=void 0===f?{}:f,S=e.required,O=void 0!==S&&S,E=e.disabled,R=void 0!==E&&E,Z=e.autoComplete,_=e.editMode,I=e.onAccept,T=void 0===I?function(){}:I,z=e.onEnter,A=void 0===z?function(){}:z,j=e.setRef,M=void 0===j?function(){}:j,B=e.inlineError,F=e.repeatIndex,P=void 0===F?null:F,H=e.children,X=k((0,o.useState)(!1),2),D=X[0],K=X[1],N=k((0,o.useState)(!1),2),q=N[0],W=N[1],Y=(0,c.Z)({element:u,error:B,breakpoint:s.getMobileBreakpoint()}),U=Y.borderStyles,$=Y.customBorder,G=Y.borderId,J=(0,o.useRef)(null),Q=(0,o.useRef)([]),V=(0,o.useRef)(null),ee=(0,h.OL)(u).value,te=(0,m.e7)(ee),re=u.servar,ne=(null!==(r=re.metadata.options)&&void 0!==r?r:[]).filter((function(e){return e})),oe=u.properties.tooltipText?30:8;return(0,n.BX)("div",x({ref:J,css:x({maxWidth:"100%",width:"100%",height:"100%",position:"relative",pointerEvents:_?"none":"auto"},s.getTarget("fc"))},p,{children:[H,d,(0,n.BX)("div",x({css:x(x(x({position:"relative",width:"100%",whiteSpace:"nowrap",overflowX:"clip"},s.getTarget("sub-fc")),R?s.getTarget("disabled"):{}),{"&:focus-within":x(x({},s.getTarget("active")),U.active),"&:hover":(0,y.wL)(R?{}:x(x({},s.getTarget("hover")),U.hover))})},{children:[(0,n.tZ)(v,x({allOptions:ne,value:te,showOptions:D,onSelect:function(e){var t,r,n;T(e,{}),K(!1),null===(n=null===(r=null===(t=V.current)||void 0===t?void 0:t.element)||void 0===r?void 0:r.focus)||void 0===n||n.call(r)},responsiveStyles:s,containerRef:J,listItemRef:Q,onHide:function(){return K(!1)},onInputFocus:function(){var e,t,r;return null===(r=null===(t=null===(e=V.current)||void 0===e?void 0:e.element)||void 0===t?void 0:t.focus)||void 0===r?void 0:r.call(t)}},{children:(0,n.tZ)(w.oc,x({id:re.key,name:re.key,ref:V,css:x(x(x({position:"relative",zIndex:g.rM,height:"100%",width:"100%",border:"none",margin:0,backgroundColor:"transparent"},l.ET),s.getTarget("field")),(t={"&:focus":s.getTarget("field")["&:focus"]},t["&:focus ~ #".concat(G)]=Object.values(U.active)[0],t["&:not(:focus)"]=te||!u.properties.placeholder?{}:{color:"transparent !important"},t)),required:O,disabled:R,placeholder:"",value:te,"aria-label":u.properties.aria_label,onKeyDown:function(e){if("Enter"===e.key)A(e);else if(ne.length){if(!te&&["Backspace","Delete"].includes(e.key))return;if(["ArrowUp","ArrowLeft","ArrowRight"].includes(e.key))return;K("Escape"!==e.key),"ArrowDown"===e.key&&setTimeout((function(){var e;return null===(e=Q.current[0])||void 0===e?void 0:e.focus({preventScroll:!0})}),0)}},onBlur:function(e){e.relatedTarget&&Q.current.some((function(t){return t===e.relatedTarget}))||ne.length>0&&setTimeout((function(){return K(!1)}),200)},onFocus:y.ms,inputRef:M},L(re,ne,"on"===Z),C(re,te,q),{onAccept:T}))})),"ssn"===re.type&&te&&(0,n.tZ)("div",x({css:{position:"absolute",cursor:"pointer",insetInlineEnd:"".concat(oe,"px"),top:"calc(50% - 12px)",zIndex:g.rM},onClick:function(){return W((function(e){return!e}))},"aria-label":"Toggle SSN visibility"},{children:q?(0,n.tZ)(b.uL,{}):(0,n.tZ)(b.FX,{})})),$,(0,n.tZ)(i.Z,{value:te,element:u,responsiveStyles:s,repeatIndex:P}),(0,n.tZ)(a.Z,{containerRef:J,id:u.id,text:u.properties.tooltipText,responsiveStyles:s,repeat:u.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([[707],{1587:(e,t,r)=>{r.d(t,{Z:()=>f});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),d=function(){return d=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},d.apply(this,arguments)};function f(e){var t=e.id,r=e.text,f=e.responsiveStyles,p=e.absolute,v=void 0===p||p,h=e.containerRef,m=e.repeat,g=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),y=g[0],b=g[1],w=(0,o.useRef)(null);if(!(r=(0,u.xf)(r,m)))return null;var x=(0,s.tq)();return(0,n.BX)(n.HY,{children:[(0,n.tZ)("div",d({ref:w,onMouseEnter:x?void 0:function(){return b(!0)},onMouseLeave:x?void 0:function(){return b(!1)},onFocus:function(){return b(!0)},onBlur:function(){return b(!1)},onClick:function(){return b((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:f.getTarget("tooltipIcon")})})),(0,n.tZ)(c.Z,d({show:y,targetRef:w,containerRef:h,placement:"left",onHide:function(){return b(!1)},offset:8},{children:(0,n.tZ)(i.u,d({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,d=e.onHide,f=e.placement,p=void 0===f?"bottom-start":f,v=e.offset,h=void 0===v?0:v,m=e.zIndex,g=void 0===m?1e3:m,y=e.containerRef,b=(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],k=w[1],S=(0,o.useCallback)((function(){return(null==y?void 0:y.current)||(0,a.me)().body}),[y]),O=(0,o.useCallback)((function(){var e;if(t&&r.current&&b.current){var n=(0,a.Kv)(),o=S();if(o){var i=r.current.getBoundingClientRect(),l=b.current.getBoundingClientRect(),u=o.getBoundingClientRect(),d=s(p,i,l,h),f=d.top,v=d.left,m=f+l.height,g=v+l.width,y=f>=0&&m<=n.innerHeight,w=v>=0&&g<=n.innerWidth;if(!y||!w){var x=c(p,!y,!w);x!==p&&(f=(e=s(x,i,l,h)).top,v=e.left)}var O=o===(0,a.me)().body,E=O?f+n.scrollY:f-u.top,R=O?v+n.scrollX:v-u.left;k((function(e){return e&&e.top===E&&e.left===R?e:{top:E,left:R}}))}}}),[t,p,h,S,r]),E=(0,o.useCallback)((function(){var e=!1;return function(){e||(e=!0,requestAnimationFrame((function(){O(),e=!1})))}}),[O])();if((0,o.useLayoutEffect)((function(){t&&O()}),[t,O]),(0,o.useEffect)((function(){if(t){var e=(0,a.Kv)(),n=S();if(n){e.addEventListener("resize",E),e.addEventListener("scroll",E,!0),n!==(0,a.me)().body&&n.addEventListener("scroll",E);var o=new ResizeObserver((function(){return E()}));return r.current&&o.observe(r.current),n!==(0,a.me)().body&&o.observe(n),function(){e.removeEventListener("resize",E),e.removeEventListener("scroll",E,!0),n!==(0,a.me)().body&&n.removeEventListener("scroll",E),o.disconnect()}}}}),[t,E,S,r]),(0,o.useEffect)((function(){if(t){var e=function(e){"Escape"===e.key&&(k(null),null==d||d())},n=function(e){var t=e.target;b.current&&!b.current.contains(t)&&r.current&&!r.current.contains(t)&&(k(null),null==d||d())},o=(0,a.me)();return o.addEventListener("mousedown",n),o.addEventListener("keydown",e),function(){o.removeEventListener("mousedown",n),o.removeEventListener("keydown",e)}}}),[t,d,r]),!t)return null;var R=S();return R?(0,i.createPortal)((0,n.tZ)("div",l({ref:b,style:l(l({position:"absolute"},x||{top:-9999,left:-9999}),{zIndex:g})},{children:u})),R):(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,d=e.inputFocused,f=void 0!==d&&d,p=e.repeatIndex,v=void 0===p?null:p,h=l.properties,m=null!==(i=(null!==(r=h.repeat_placeholder)&&void 0!==r?r:[])[null!=v?v:0])&&void 0!==i?i:h.placeholder||"",g=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"):{}),f?g:{}),(t={},t["".concat(s,":focus ~ &")]=g,t))},{children:m}))}},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}))}))}},8500:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Z});var n=r(5944),o=r(7294),i=r(9069),a=r(1587),l=r(1211),u=r(9234),c=r(6867),s=r(1275),d=r(7449),f=r(5398),p=function(){return p=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},p.apply(this,arguments)};const v=(0,o.memo)((function(e){var t=e.allOptions,r=void 0===t?[]:t,i=e.showOptions,a=e.onSelect,l=void 0===a?function(){}:a,u=e.onHide,c=void 0===u?function(){}:u,v=e.onInputFocus,h=void 0===v?function(){}:v,m=e.value,g=void 0===m?"":m,y=e.containerRef,b=e.responsiveStyles,w=e.listItemRef,x=e.children,k=r.filter((function(e){return e.toLowerCase().includes(g.toLowerCase())})),S=(0,o.useRef)(null),O=(0,f.Z)(S).width;return 0===r.length?x:(0,n.BX)("div",p({ref:S,css:{height:"100%",width:"100%"}},{children:[x,k.length>0&&i&&(0,n.tZ)(d.Z,p({targetRef:S,containerRef:y,show:!0,placement:"bottom-start",onHide:c},{children:(0,n.tZ)("ul",p({css:p({zIndex:s.m,listStyleType:"none",padding:0,margin:0,maxHeight:"210px",overflowY:"scroll",overflowX:"auto",width:void 0!==O?"".concat(O,"px"):"100%",backgroundColor:"white",cursor:"pointer",boxShadow:"0 0 4px rgb(0 0 0 / 15%)"},b.getTarget("dropdown"))},{children:k.map((function(e,t){return(0,n.tZ)("li",p({css:{padding:"8px 14px",transition:"0.1s ease all","&:hover":{backgroundColor:"#e6e6e633"},"&:focus-visible":{outline:"none",backgroundColor:"#e6e6e644"}},tabIndex:0,ref:function(e){w.current[t]=e},onClick:function(){return l(e)},onKeyDown:function(r){var n,o,i=function(){r.preventDefault(),r.stopPropagation()};"Enter"===r.key?(i(),l(e)):["ArrowDown","ArrowRight"].includes(r.key)?(i(),null===(n=w.current[t].nextSibling)||void 0===n||n.focus()):["ArrowUp","ArrowLeft"].includes(r.key)&&(i(),0===t?h():null===(o=w.current[t].previousSibling)||void 0===o||o.focus())},onBlur:function(e){e.relatedTarget&&w.current.some((function(t){return t===e.relatedTarget}))||c()}},{children:e}),"".concat(e,"-").concat(t))}))}))}))]}))}));var h=r(7193),m=r(426),g=r(2988),y=r(9479),b=r(5467),w=r(3466),x=function(){return x=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},x.apply(this,arguments)},k=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},S={text_area:16384,url:256,gmap_zip:10},O=function(e){var t;return null!==(t=S[e])&&void 0!==t?t:1024};function E(e){return(null!=e?e:"").replaceAll("0","\\0").replaceAll("a","\\a").replaceAll("b","\\b").replaceAll("*","\\*")}function R(e){var t=e.metadata,r=E(t.prefix),n=E(t.suffix),o="";if(t.mask)o=t.mask;else{var i=t.allowed_characters;"gmap_zip"!==e.type||i||(i="alphaspace");var a=function(e){switch(e){case"letters":return"a";case"alphanumeric":return"b";case"alphaspace":return"c";case"digits":return"0";default:return"*"}}(i),l=O(e.type)-r.length-n.length;e.max_length&&(l=Math.min(e.max_length,l)),o="[".concat(a.repeat(l),"]")}return"".concat(r).concat(o).concat(n)}function C(e,t,r){var n,o,i,a,l=null!==(n=e.max_length)&&void 0!==n?n:O(e.type);switch(e.type){case"integer_field":a={mask:"num",blocks:{num:{mask:Number,radix:".",thousandsSeparator:",",scale:2,max:null!==(o=e.max_length)&&void 0!==o?o:Number.MAX_SAFE_INTEGER,min:Math.max(0,null!==(i=e.min_length)&&void 0!==i?i:0)}},value:t.toString()},"currency"===e.format&&(a.mask="$num");break;case"ssn":a={mask:e.metadata.last_four_digits?"∗∗∗ - ∗∗ - 0000":"000 - 00 - 0000",displayChar:r?void 0:"∗",placeholderChar:e.metadata.last_four_digits?" ":void 0,lazy:!e.metadata.last_four_digits};break;case"email":case"text_area":case"url":a={mask:new RegExp("^.{0,".concat(l,"}$")),maxLength:l};break;default:e.metadata.mask&&(l=void 0),a={mask:R(e),definitions:{b:/[a-zA-Z0-9]/,c:/[a-zA-Z0-9 ]/},maxLength:l}}return x({lazy:!1,unmask:!e.metadata.save_mask},a)}function L(e,t,r){var n,o={minLength:e.min_length},i=null!==(n=e.max_length)&&void 0!==n?n:O(e.type);t.length>0&&(o.autoComplete="off");var a=e.metadata;switch(e.type){case"integer_field":return{inputMode:"decimal"};case"email":return r&&!o.autoComplete&&(o.autoComplete="email"),x({type:"email",pattern:u.Z1,maxLength:i},o);case"gmap_zip":return r&&!o.autoComplete&&(o.autoComplete="postal-code"),x(x({},o),{maxLength:i,inputMode:"digits"===a.allowed_characters?"numeric":"text"});case"url":return r&&!o.autoComplete&&(o.autoComplete="url",o.maxLength=i),o;case"ssn":return x({inputMode:"numeric"},o);default:return o.maxLength=i,a.custom_autocomplete&&!o.autoComplete&&(o.autoComplete=a.custom_autocomplete),a.number_keypad||"digits"===a.allowed_characters?x({inputMode:"numeric"},o):o}}const Z=(0,o.memo)((function(e){var t,r,u=e.element,s=e.responsiveStyles,d=e.fieldLabel,f=e.elementProps,p=void 0===f?{}:f,S=e.required,O=void 0!==S&&S,E=e.disabled,R=void 0!==E&&E,Z=e.autoComplete,_=e.editMode,I=e.onAccept,T=void 0===I?function(){}:I,z=e.onEnter,A=void 0===z?function(){}:z,j=e.setRef,M=void 0===j?function(){}:j,B=e.inlineError,F=e.repeatIndex,P=void 0===F?null:F,H=e.children,X=k((0,o.useState)(!1),2),D=X[0],K=X[1],N=k((0,o.useState)(!1),2),q=N[0],W=N[1],Y=(0,c.Z)({element:u,error:B,breakpoint:s.getMobileBreakpoint()}),U=Y.borderStyles,$=Y.customBorder,G=Y.borderId,J=(0,o.useRef)(null),Q=(0,o.useRef)([]),V=(0,o.useRef)(null),ee=(0,h.OL)(u).value,te=(0,m.e7)(ee),re=u.servar,ne=(null!==(r=re.metadata.options)&&void 0!==r?r:[]).filter((function(e){return e})),oe=u.properties.tooltipText?30:8;return(0,n.BX)("div",x({ref:J,css:x({maxWidth:"100%",width:"100%",height:"100%",position:"relative",pointerEvents:_?"none":"auto"},s.getTarget("fc"))},p,{children:[H,d,(0,n.BX)("div",x({css:x(x(x({position:"relative",width:"100%",whiteSpace:"nowrap",overflowX:"clip"},s.getTarget("sub-fc")),R?s.getTarget("disabled"):{}),{"&:focus-within":x(x({},s.getTarget("active")),U.active),"&:hover":(0,y.wL)(R?{}:x(x({},s.getTarget("hover")),U.hover))})},{children:[(0,n.tZ)(v,x({allOptions:ne,value:te,showOptions:D,onSelect:function(e){var t,r,n;T(e,{}),K(!1),null===(n=null===(r=null===(t=V.current)||void 0===t?void 0:t.element)||void 0===r?void 0:r.focus)||void 0===n||n.call(r)},responsiveStyles:s,containerRef:J,listItemRef:Q,onHide:function(){return K(!1)},onInputFocus:function(){var e,t,r;return null===(r=null===(t=null===(e=V.current)||void 0===e?void 0:e.element)||void 0===t?void 0:t.focus)||void 0===r?void 0:r.call(t)}},{children:(0,n.tZ)(w.oc,x({id:re.key,name:re.key,ref:V,css:x(x(x({position:"relative",zIndex:g.rM,height:"100%",width:"100%",border:"none",margin:0,backgroundColor:"transparent"},l.ET),s.getTarget("field")),(t={"&:focus":s.getTarget("field")["&:focus"]},t["&:focus ~ #".concat(G)]=Object.values(U.active)[0],t["&:not(:focus)"]=te||!u.properties.placeholder?{}:{color:"transparent !important"},t)),required:O,disabled:R,placeholder:"",value:te,"aria-label":u.properties.aria_label,onKeyDown:function(e){if("Enter"===e.key)A(e);else if(ne.length){if(!te&&["Backspace","Delete"].includes(e.key))return;if(["ArrowUp","ArrowLeft","ArrowRight"].includes(e.key))return;K("Escape"!==e.key),"ArrowDown"===e.key&&setTimeout((function(){var e;return null===(e=Q.current[0])||void 0===e?void 0:e.focus({preventScroll:!0})}),0)}},onBlur:function(e){e.relatedTarget&&Q.current.some((function(t){return t===e.relatedTarget}))||ne.length>0&&setTimeout((function(){return K(!1)}),200)},onFocus:y.ms,inputRef:M},L(re,ne,"on"===Z),C(re,te,q),{onAccept:T}))})),"ssn"===re.type&&te&&(0,n.tZ)("div",x({css:{position:"absolute",cursor:"pointer",insetInlineEnd:"".concat(oe,"px"),top:"calc(50% - 12px)",zIndex:g.rM},onClick:function(){return W((function(e){return!e}))},"aria-label":"Toggle SSN visibility"},{children:q?(0,n.tZ)(b.uL,{}):(0,n.tZ)(b.FX,{})})),$,(0,n.tZ)(i.Z,{value:te,element:u,responsiveStyles:s,repeatIndex:P}),(0,n.tZ)(a.Z,{containerRef:J,id:u.id,text:u.properties.tooltipText,responsiveStyles:s,repeat:u.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}}}]);
|