@feathery/react 2.15.1 → 2.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/cjs/Form/index.d.ts.map +1 -1
  2. package/cjs/elements/basic/TableElement/Actions.d.ts +3 -1
  3. package/cjs/elements/basic/TableElement/Actions.d.ts.map +1 -1
  4. package/cjs/elements/basic/TableElement/Search.d.ts.map +1 -1
  5. package/cjs/elements/basic/TableElement/Sort.d.ts +5 -0
  6. package/cjs/elements/basic/TableElement/Sort.d.ts.map +1 -1
  7. package/cjs/elements/basic/TableElement/index.d.ts.map +1 -1
  8. package/cjs/elements/basic/TableElement/styles.d.ts +1 -1
  9. package/cjs/elements/basic/TableElement/styles.d.ts.map +1 -1
  10. package/cjs/elements/basic/TableElement/useTableData.d.ts +7 -0
  11. package/cjs/elements/basic/TableElement/useTableData.d.ts.map +1 -1
  12. package/cjs/{fthry_FormControl.DhxdiYw6.js → fthry_FormControl.BKhBgGR8.js} +1 -1
  13. package/cjs/{fthry_InlineTooltip.BgAXRUIt.js → fthry_InlineTooltip.DzUT7zk0.js} +2 -2
  14. package/cjs/{fthry_Overlay.D7IM1ywp.js → fthry_Overlay.BpmW4YfX.js} +1 -1
  15. package/cjs/{fthry_PaymentMethodField.NEoloWMI.js → fthry_PaymentMethodField.CRiUSe8P.js} +4 -4
  16. package/cjs/{fthry_Placeholder.D5C0aH2S.js → fthry_Placeholder.BQbbxB6F.js} +1 -1
  17. package/cjs/{fthry_ShowEyeIcon.CmLMyaN5.js → fthry_ShowEyeIcon.hB_ow6JC.js} +1 -1
  18. package/cjs/{fthry_index.Ci8dMyBp.js → fthry_index.4N1YhCUq.js} +1 -1
  19. package/cjs/{fthry_index.JRP5lBfp.js → fthry_index.9iTTBFyN.js} +5 -5
  20. package/cjs/{fthry_index.GeYRayLh.js → fthry_index.B-CV6GlF.js} +1 -1
  21. package/cjs/{fthry_index.Bq3nU0FH.js → fthry_index.B9kpJ8RF.js} +6 -6
  22. package/cjs/{fthry_index.WDI9ExUl.js → fthry_index.BClazNwU.js} +1 -1
  23. package/cjs/{fthry_index.DzpGyyn4.js → fthry_index.BNmTPE57.js} +5 -5
  24. package/cjs/{fthry_index.BgeTdwT5.js → fthry_index.BT-MMWKW.js} +2 -2
  25. package/cjs/{fthry_index.By8RWuUY.js → fthry_index.BcS0pFWC.js} +6 -6
  26. package/cjs/{fthry_index.Bb1R5GZK.js → fthry_index.Biu3gbsh.js} +2 -2
  27. package/cjs/{fthry_index.CzzIM_Es.js → fthry_index.CBH-w87m.js} +602 -463
  28. package/cjs/{fthry_index.DDjTLR_C.js → fthry_index.CBq25pIU.js} +6 -6
  29. package/cjs/{fthry_index.BFpcCw2o.js → fthry_index.CbkwCml1.js} +1 -1
  30. package/cjs/{fthry_index.DLnigFf3.js → fthry_index.Cepb73QX.js} +4 -4
  31. package/cjs/{fthry_index.DXm31Dvn.js → fthry_index.CnCLJycW.js} +3 -3
  32. package/cjs/{fthry_index.D4rjZ-iU.js → fthry_index.CslonO6n.js} +4 -4
  33. package/cjs/{fthry_index.CrFjXWLg.js → fthry_index.CusiJzmn.js} +3 -3
  34. package/cjs/{fthry_index.CgMWWz7f.js → fthry_index.D--uB97c.js} +1 -1
  35. package/cjs/{fthry_index.CkmA933O.js → fthry_index.DLwBzlAm.js} +331 -59
  36. package/cjs/{fthry_index.BJYH_2P6.js → fthry_index.DOiXixKa.js} +1 -1
  37. package/cjs/{fthry_index.BK_jaGHn.js → fthry_index.DmsSGjy7.js} +5 -5
  38. package/cjs/{fthry_index.CbfDILWu.js → fthry_index.YRUJ420g.js} +4 -4
  39. package/cjs/{fthry_index.Bd1HfYvE.js → fthry_index.cplrWgvC.js} +5 -5
  40. package/cjs/{fthry_index.BqS0kCfh.js → fthry_index.lqNJzzej.js} +1 -1
  41. package/cjs/{fthry_index.E_vLB-7s.js → fthry_index.wYrRKH_Q.js} +8 -8
  42. package/cjs/{fthry_input.kxr0lkUP.js → fthry_input.Dt2FevPi.js} +1 -1
  43. package/cjs/{fthry_script.CpqGoZRW.js → fthry_script.Tl6aGziG.js} +1 -1
  44. package/cjs/{fthry_styles.UURZE2St.js → fthry_styles.Pvk5-k7a.js} +1 -1
  45. package/cjs/{fthry_useElementSize.B7mqB2ri.js → fthry_useElementSize.BFoAW8dM.js} +1 -1
  46. package/cjs/{fthry_useSalesforceSync.DFHAEpBn.js → fthry_useSalesforceSync.CGHmB1Kd.js} +1 -1
  47. package/cjs/{fthry_webfontloader.COsYlNwD.js → fthry_webfontloader.CeAHWOr6.js} +1 -1
  48. package/cjs/index.d.ts +3 -2
  49. package/cjs/index.d.ts.map +1 -1
  50. package/cjs/index.js +1 -1
  51. package/cjs/utils/error.d.ts +0 -5
  52. package/cjs/utils/error.d.ts.map +1 -1
  53. package/cjs/utils/featheryClient/index.d.ts +13 -20
  54. package/cjs/utils/featheryClient/index.d.ts.map +1 -1
  55. package/cjs/utils/featheryClient/integrationClient.d.ts +2 -8
  56. package/cjs/utils/featheryClient/integrationClient.d.ts.map +1 -1
  57. package/cjs/utils/featheryClient/utils.d.ts.map +1 -1
  58. package/cjs/utils/formContext.d.ts +3 -1
  59. package/cjs/utils/formContext.d.ts.map +1 -1
  60. package/cjs/utils/formHelperFunctions.d.ts.map +1 -1
  61. package/cjs/utils/internalState.d.ts +2 -12
  62. package/cjs/utils/internalState.d.ts.map +1 -1
  63. package/dist/Form/index.d.ts.map +1 -1
  64. package/dist/elements/basic/TableElement/Actions.d.ts +3 -1
  65. package/dist/elements/basic/TableElement/Actions.d.ts.map +1 -1
  66. package/dist/elements/basic/TableElement/Search.d.ts.map +1 -1
  67. package/dist/elements/basic/TableElement/Sort.d.ts +5 -0
  68. package/dist/elements/basic/TableElement/Sort.d.ts.map +1 -1
  69. package/dist/elements/basic/TableElement/index.d.ts.map +1 -1
  70. package/dist/elements/basic/TableElement/styles.d.ts +1 -1
  71. package/dist/elements/basic/TableElement/styles.d.ts.map +1 -1
  72. package/dist/elements/basic/TableElement/useTableData.d.ts +7 -0
  73. package/dist/elements/basic/TableElement/useTableData.d.ts.map +1 -1
  74. package/dist/{fthry_FormControl.CikgGb3C.js → fthry_FormControl.XVhBC21r.js} +1 -1
  75. package/dist/{fthry_InlineTooltip.BpfxcSEn.js → fthry_InlineTooltip.B5HOzwap.js} +2 -2
  76. package/dist/{fthry_Overlay.CJVfag7c.js → fthry_Overlay.Bimyn9cP.js} +1 -1
  77. package/dist/{fthry_PaymentMethodField.BpA_xhqt.js → fthry_PaymentMethodField.DC42S83Q.js} +4 -4
  78. package/dist/{fthry_Placeholder.DwCFN6a9.js → fthry_Placeholder.BSJmJpdc.js} +1 -1
  79. package/dist/{fthry_ShowEyeIcon.D6nQhesH.js → fthry_ShowEyeIcon.B9PAnnc8.js} +1 -1
  80. package/dist/{fthry_index.D9VjMJ_U.js → fthry_index.1C0U53je.js} +1 -1
  81. package/dist/{fthry_index.B84L3MVC.js → fthry_index.B0tXZhK_.js} +1 -1
  82. package/dist/{fthry_index.DhU16s57.js → fthry_index.BQH7UQHm.js} +5 -5
  83. package/dist/{fthry_index.BzrcCLzO.js → fthry_index.C2MFMacA.js} +4 -4
  84. package/dist/{fthry_index.BEZmvsoo.js → fthry_index.C8otB4PR.js} +5 -5
  85. package/dist/{fthry_index.B7VWXvgC.js → fthry_index.C9rpuLX0.js} +4 -4
  86. package/dist/{fthry_index.BSEfDQAc.js → fthry_index.CHndK5Ku.js} +2 -2
  87. package/dist/{fthry_index.DH2fsNWG.js → fthry_index.CJ2JTPaM.js} +3 -3
  88. package/dist/{fthry_index.NOuMR_hq.js → fthry_index.CRNNh-Vr.js} +6 -6
  89. package/dist/{fthry_index.OHN-Iv2R.js → fthry_index.CZMlc0Uq.js} +1 -1
  90. package/dist/{fthry_index.DoP7RwIP.js → fthry_index.Cqaf2wwS.js} +1 -1
  91. package/dist/{fthry_index.CJKGRCG-.js → fthry_index.D-Z9XSa-.js} +3 -3
  92. package/dist/{fthry_index.D9AKkBzu.js → fthry_index.D580ix-P.js} +1 -1
  93. package/dist/{fthry_index.BsNCOSBE.js → fthry_index.DOn8TnD9.js} +5 -5
  94. package/dist/{fthry_index.t4v0qqgv.js → fthry_index.DX3eUw60.js} +6 -6
  95. package/dist/{fthry_index.Fs86Fy9Y.js → fthry_index.DX823K0A.js} +5 -5
  96. package/dist/{fthry_index.BAhh3Pz6.js → fthry_index.DclC8fSK.js} +331 -59
  97. package/dist/{fthry_index.m7CZv4YY.js → fthry_index.DeVEe6wK.js} +4 -4
  98. package/dist/{fthry_index.Bz07r-AM.js → fthry_index.DuaCIs62.js} +1 -1
  99. package/dist/{fthry_index.Dgmpm9wy.js → fthry_index.DuaZsChW.js} +6 -6
  100. package/dist/{fthry_index.Dy4nSWZa.js → fthry_index.DucoThu1.js} +1 -1
  101. package/dist/{fthry_index.BsEfTy-x.js → fthry_index.Duj4YwU5.js} +8 -8
  102. package/dist/{fthry_index.B-oHlMGi.js → fthry_index.dbHyG7ZF.js} +2 -2
  103. package/dist/{fthry_index.y4j9reIZ.js → fthry_index.uXGVOaal.js} +602 -463
  104. package/dist/{fthry_input.Cb2u4VEf.js → fthry_input.ByujwKdQ.js} +1 -1
  105. package/dist/{fthry_script.C5O1ZNQQ.js → fthry_script.c1JhCd_N.js} +1 -1
  106. package/dist/{fthry_styles.DGB23xLr.js → fthry_styles.ChVA_k1Q.js} +1 -1
  107. package/dist/{fthry_useElementSize.CBdpS9aW.js → fthry_useElementSize.rXTn4Y2Q.js} +1 -1
  108. package/dist/{fthry_useSalesforceSync.Cae_lMG1.js → fthry_useSalesforceSync.CksS0l4W.js} +1 -1
  109. package/dist/{fthry_webfontloader.DAANkO2-.js → fthry_webfontloader.E26hycV1.js} +1 -1
  110. package/dist/index.d.ts +3 -2
  111. package/dist/index.d.ts.map +1 -1
  112. package/dist/index.js +1 -1
  113. package/dist/utils/error.d.ts +0 -5
  114. package/dist/utils/error.d.ts.map +1 -1
  115. package/dist/utils/featheryClient/index.d.ts +13 -20
  116. package/dist/utils/featheryClient/index.d.ts.map +1 -1
  117. package/dist/utils/featheryClient/integrationClient.d.ts +2 -8
  118. package/dist/utils/featheryClient/integrationClient.d.ts.map +1 -1
  119. package/dist/utils/featheryClient/utils.d.ts.map +1 -1
  120. package/dist/utils/formContext.d.ts +3 -1
  121. package/dist/utils/formContext.d.ts.map +1 -1
  122. package/dist/utils/formHelperFunctions.d.ts.map +1 -1
  123. package/dist/utils/internalState.d.ts +2 -12
  124. package/dist/utils/internalState.d.ts.map +1 -1
  125. package/package.json +2 -1
  126. package/umd/{509.341a4196aad912adb28d.js → 509.a863f8749c28540476bb.js} +2 -2
  127. package/umd/TableElement.8941c979f39547669b6a.js +1 -0
  128. package/umd/index.js +1 -1
  129. package/umd/TableElement.ef63774f461682dd3ac9.js +0 -1
  130. /package/umd/{509.341a4196aad912adb28d.js.LICENSE.txt → 509.a863f8749c28540476bb.js.LICENSE.txt} +0 -0
@@ -1 +0,0 @@
1
- "use strict";(this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[844],{6056:(t,r,e)=>{e.r(r),e.d(r,{default:()=>wt});var n=e(5944),o=e(7294),a=e(426),i=function(){return i=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t},i.apply(this,arguments)},l="#ffffff",c="#f9fafb",s="#f3f4f6",u="#e5e7eb",d="#9ca3af",p="#4b5563",f="#111827",h="#1d4ed8",g={width:"16px",height:"16px",color:"#6b7280"},v={display:"flex",flexDirection:"column",gap:"2px","& svg":{marginInlineStart:"4px",width:"20px",height:"20px"}},b={width:"12px",height:"12px",color:d,opacity:.3,'&[data-active="true"]':{color:h,opacity:1}},y={display:"flex",alignItems:"center",gap:"8px"},x={position:"relative",overflowX:"auto",overflowY:"auto",backgroundColor:l,boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",borderRadius:"8px",border:"1px solid ".concat(u),minWidth:"100%",maxWidth:"100%",height:"100%",boxSizing:"border-box"},m={display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"64px 24px",textAlign:"center"},w={color:p,fontSize:"16px",fontWeight:"500",margin:0},S={padding:"16px",borderBottom:"1px solid ".concat(u)},k={position:"relative"},C={position:"absolute",top:0,bottom:0,left:0,display:"flex",alignItems:"center",paddingLeft:"12px",pointerEvents:"none"},Z={display:"block",width:"100%",maxWidth:"384px",paddingLeft:"36px",paddingRight:"12px",paddingTop:"10px",paddingBottom:"10px",backgroundColor:c,border:"1px solid ".concat(u),color:f,fontSize:"14px",borderRadius:"8px",boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"},P={width:"100%",maxWidth:"100%",fontSize:"14px",textAlign:"left",color:p,textIndent:0,borderColor:"inherit",borderCollapse:"collapse",tableLayout:"fixed"},R={fontSize:"14px",color:p,backgroundColor:c,borderBottom:"1px solid ".concat(u)},B={padding:"12px 24px",fontWeight:"500",userSelect:"none"},j={backgroundColor:l,borderBottom:"1px solid ".concat(u),transition:"background-color 0.2s"},O={padding:"16px 24px",wordBreak:"break-word",overflowWrap:"anywhere"},A={display:"flex",alignItems:"center",flexWrap:"wrap",justifyContent:"space-between",padding:"16px",gap:"8px"},I={fontSize:"14px",fontWeight:"normal",color:p},L={fontWeight:"600",color:f},T={display:"flex",marginLeft:"-1px",fontSize:"14px",listStyle:"none",padding:0,margin:0},D={display:"flex",alignItems:"center",justifyContent:"center",color:p,backgroundColor:c,boxSizing:"border-box",border:"1px solid ".concat(u),fontWeight:"500",fontSize:"14px",textDecoration:"none",cursor:"pointer",height:"36px",wordBreak:"keep-all",overflowWrap:"normal","&:hover":{backgroundColor:s,color:f}},M=i(i({},D),{borderRadius:"4px",paddingInline:"8px",width:"auto",height:"28px"}),W={width:"16px",height:"16px",color:p},X={position:"fixed",backgroundColor:l,border:"1px solid ".concat("#d1d5db"),borderRadius:"4px",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1)",zIndex:9999,minWidth:"120px"},N={display:"block",width:"100%",textAlign:"left",paddingLeft:"12px",paddingRight:"12px",paddingTop:"8px",paddingBottom:"8px",fontSize:"14px",color:"#374151",backgroundColor:"transparent",border:"none",cursor:"pointer",whiteSpace:"nowrap","&:hover":{backgroundColor:s},"&:first-of-type":{borderTopLeftRadius:"4px",borderTopRightRadius:"4px"},"&:last-of-type":{borderBottomLeftRadius:"4px",borderBottomRightRadius:"4px"}},z=i(i({},M),{aspectRatio:1,paddingLeft:0,paddingRight:0}),_={display:"flex",gap:"8px",justifyContent:"flex-end"},E=i(i({},D),{width:"36px",borderRightWidth:0}),Q=i(i({},E),{borderTopLeftRadius:"8px",borderBottomLeftRadius:"8px",paddingLeft:"12px",paddingRight:"12px",width:"auto"}),F=i(i({},E),{borderTopRightRadius:"8px",borderBottomRightRadius:"8px",paddingLeft:"12px",paddingRight:"12px",width:"auto",borderRightWidth:1}),Y=i(i({},E),{color:h,backgroundColor:"#eff6ff",border:"1px solid ".concat(u)}),H=i(i({},E),{cursor:"default","&:focus":{outline:"none"}}),$={opacity:.8,cursor:"default",color:d,"&:hover":{backgroundColor:c,color:d}},V=function(){return V=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t},V.apply(this,arguments)};function q(){return(0,n.tZ)("svg",V({css:g,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2},{children:(0,n.tZ)("path",{strokeLinecap:"round",d:"M21 21l-3.5-3.5M17 10a7 7 0 1 1-14 0 7 7 0 0 1 14 0Z"})}))}function G(t){var r=t.searchQuery,e=t.onSearchChange;return(0,n.tZ)("div",V({css:S},{children:(0,n.BX)("div",V({css:k},{children:[(0,n.tZ)("div",V({css:C},{children:(0,n.tZ)(q,{})})),(0,n.tZ)("input",{type:"text",css:Z,placeholder:"Search",value:r,onChange:function(t){return e(t.target.value)}})]}))}))}var J=function(){return J=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t},J.apply(this,arguments)};function K(t){var r=t.isSorted,e=t.sortDirection;return(0,n.BX)("svg",J({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},{children:[(0,n.tZ)("path",{css:b,stroke:"currentColor","data-active":r&&"asc"===e||void 0,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m8 9 4-4 4 4"}),(0,n.tZ)("path",{css:b,stroke:"currentColor","data-active":r&&"desc"===e||void 0,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m8 15 4 4 4-4"})]}))}function U(t){var r=t.columns,e=t.enableSort,o=t.sortColumn,a=t.sortDirection,i=t.onSort,l=t.styles;return(0,n.tZ)(n.HY,{children:r.map((function(t,r){var c=e,s=o===t.name;return(0,n.tZ)("th",J({scope:"col",onClick:function(){return c&&i(t.name)},css:J(J(J({},B),l.getTarget("th")),c?{cursor:"pointer"}:{})},{children:(0,n.BX)("div",J({css:y},{children:[(0,n.tZ)("span",{children:t.name}),c&&(0,n.tZ)("span",J({css:v},{children:(0,n.tZ)(K,{isSorted:s,sortDirection:a})}))]}))}),r)}))})}var tt=function(){return tt=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t},tt.apply(this,arguments)};function rt(t){var r=t.currentPage,e=t.totalItems,o=t.rowsPerPage;return(0,n.BX)("span",tt({css:I},{children:["Showing"," ",(0,n.BX)("span",tt({css:L},{children:[r*o+1,"-",Math.min((r+1)*o,e)]}))," ","of ",(0,n.tZ)("span",tt({css:L},{children:e}))]}))}function et(t){var r=t.disabled,e=t.onClick;return(0,n.tZ)("button",tt({type:"button",onClick:e,disabled:r,css:tt(tt({},Q),r?$:{})},{children:"Previous"}))}function nt(t){var r=t.disabled,e=t.onClick;return(0,n.tZ)("button",tt({type:"button",onClick:e,disabled:r,css:tt(tt({},F),r?$:{})},{children:"Next"}))}function ot(t){var r=t.currentPage,e=t.totalPages,o=t.onPageChange;return(0,n.tZ)(n.HY,{children:Array.from({length:e},(function(t,a){var i=0===a||a===e-1||Math.abs(a-r)<=1;if(1===a&&r>2||a===e-2&&r<e-3)return(0,n.tZ)("li",{children:(0,n.tZ)("button",tt({type:"button",disabled:!0,css:H},{children:"..."}))},a);if(!i)return null;var l=a===r;return(0,n.tZ)("li",{children:(0,n.tZ)("button",tt({type:"button",onClick:function(){return o(a)},"aria-current":l?"page":void 0,css:l?Y:E},{children:a+1}))},a)}))})}function at(t){var r=t.currentPage,e=t.totalPages,o=t.totalItems,a=t.rowsPerPage,i=t.onPageChange;return e<=1?null:(0,n.BX)("nav",tt({css:A,"aria-label":"Table navigation"},{children:[(0,n.tZ)(rt,{currentPage:r,totalItems:o,rowsPerPage:a}),(0,n.BX)("ul",tt({css:T},{children:[(0,n.tZ)("li",{children:(0,n.tZ)(et,{disabled:0===r,onClick:function(){return i(Math.max(0,r-1))}})}),(0,n.tZ)(ot,{currentPage:r,totalPages:e,onPageChange:i}),(0,n.tZ)("li",{children:(0,n.tZ)(nt,{disabled:r>=e-1,onClick:function(){i(Math.min(e-1,r+1))}})})]}))]}))}var it=e(3935),lt=e(1142),ct=e(9479),st=function(){return st=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t},st.apply(this,arguments)},ut=function(t,r){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var n,o,a=e.call(t),i=[];try{for(;(void 0===r||r-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(e=a.return)&&e.call(a)}finally{if(o)throw o.error}}return i};function dt(){return(0,n.BX)("svg",st({css:W,fill:"currentColor",viewBox:"0 0 24 24"},{children:[(0,n.tZ)("circle",{cx:"12",cy:"5",r:"2"}),(0,n.tZ)("circle",{cx:"12",cy:"12",r:"2"}),(0,n.tZ)("circle",{cx:"12",cy:"19",r:"2"})]}))}function pt(t){var r=t.actions,e=t.rowIndex,a=t.columnData,i=t.onClick;if(0===r.length)return null;var l=ut((0,o.useState)(!1),2),c=l[0],s=l[1],u=ut((0,o.useState)({top:0,left:0}),2),d=u[0],p=u[1],f=(0,o.useRef)(null),h=(0,o.useRef)(null),g=(0,o.useRef)(null),v=r.length>1;(0,o.useEffect)((function(){var t=function(t){h.current&&!h.current.contains(t.target)&&g.current&&!g.current.contains(t.target)&&s(!1)};return c&&(0,ct.me)().addEventListener("mousedown",t),function(){(0,ct.me)().removeEventListener("mousedown",t)}}),[c]);var b=function(t){s(!1);var r={};a.forEach((function(t){var n=lt.u4[t.field_key],o=Array.isArray(n)?n[e]:n;r[t.name]=o})),i({action:t.label,rowIndex:e,rowData:r})};return(0,n.tZ)("div",st({ref:f,css:_},{children:v?(0,n.BX)(n.HY,{children:[(0,n.tZ)("button",st({ref:g,type:"button",onClick:function(t){t.stopPropagation(),function(){if(!c&&g.current){var t=g.current.getBoundingClientRect();p({top:t.bottom+4,left:t.right})}s(!c)}()},css:z},{children:(0,n.tZ)(dt,{})})),c&&(0,it.createPortal)((0,n.tZ)("div",st({ref:h,css:st(st({},X),{top:"".concat(d.top,"px"),left:"".concat(d.left,"px"),transform:"translateX(-100%)"})},{children:r.map((function(t,r){return(0,n.tZ)("button",st({type:"button",onClick:function(){return b(t)},css:N},{children:t.label}),r)}))})),(0,ct.me)().body)]}):r.map((function(t,r){return(0,n.tZ)("button",st({type:"button",onClick:function(r){r.stopPropagation(),b(t)},css:M},{children:t.label}),r)}))}))}var ft=function(){return ft=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t},ft.apply(this,arguments)};function ht(t){var r=t.hasSearchQuery;return(0,n.BX)("div",ft({css:m},{children:[r&&(0,n.tZ)("svg",ft({css:{width:"48px",height:"48px",color:"#9ca3af",marginBottom:"16px"},fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5},{children:(0,n.tZ)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"})})),(0,n.tZ)("p",ft({css:w},{children:r?"No results found":"No data available"})),r&&(0,n.tZ)("p",ft({css:ft(ft({},w),{fontSize:"14px",marginTop:"8px"})},{children:"Try adjusting your search query"}))]}))}var gt=function(t,r){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var n,o,a=e.call(t),i=[];try{for(;(void 0===r||r-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(e=a.return)&&e.call(a)}finally{if(o)throw o.error}}return i};function vt(t){var r,e=function(t){if(null==t||""===t)return null;var r=String(t).trim().replace(/[$€£¥]/g,"").replace(/[,%]/g,"").replace(/\s/g,""),e=parseFloat(r);return isNaN(e)?null:e}(t),n=function(t){var r,e,n,o;if(null==t||""===t)return null;var a=String(t).trim(),i=new Date(a);if(!isNaN(i.getTime()))return i;try{for(var l=function(t){var r="function"==typeof Symbol&&Symbol.iterator,e=r&&t[r],n=0;if(e)return e.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}([/^(\d{1,2})[/-](\d{1,2})[/-](\d{2,4})$/,/^(\d{4})[/-](\d{1,2})[/-](\d{1,2})$/]),c=l.next();!c.done;c=l.next()){var s=c.value,u=a.match(s);if(u){var d=void 0,p=void 0,f=void 0;4===u[1].length?(d=(n=gt(u,4))[1],p=n[2],f=n[3]):(p=(o=gt(u,4))[1],f=o[2],d=o[3]),2===d.length&&(d=parseInt(d)<50?"20".concat(d):"19".concat(d));var h=new Date(parseInt(d),parseInt(p)-1,parseInt(f));if(!isNaN(h.getTime()))return h}}}catch(t){r={error:t}}finally{try{c&&!c.done&&(e=l.return)&&e.call(l)}finally{if(r)throw r.error}}return null}(t);return{original:t,asNumber:e,asDate:n,asString:null!==(r=(0,a.e7)(t))&&void 0!==r?r:""}}var bt=function(){return bt=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t},bt.apply(this,arguments)},yt=function(t,r){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var n,o,a=e.call(t),i=[];try{for(;(void 0===r||r-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(e=a.return)&&e.call(a)}finally{if(o)throw o.error}}return i};function xt(t){var r,e,n,i,l,c,s,u,d=t.element,p=t.editMode,f=void 0!==p&&p,h=(null===(r=d.properties)||void 0===r?void 0:r.columns)||[],g=((null===(e=d.properties)||void 0===e?void 0:e.actions)||[]).filter((function(t){return t.label&&""!==t.label.trim()})),v=null!==(i=null===(n=d.properties)||void 0===n?void 0:n.search)&&void 0!==i&&i,b=null!==(c=null===(l=d.properties)||void 0===l?void 0:l.sort)&&void 0!==c&&c,y=null!==(u=null===(s=d.properties)||void 0===s?void 0:s.pagination)&&void 0!==u?u:0,x="number"==typeof y&&y>0?Math.floor(y):0,m=x>0,w=(0,o.useMemo)((function(){var t=h;return f&&(t=t.map((function(t,r){return bt(bt({},t),{field_key:"example_column_".concat(r)})}))),t}),[f,h]),S=(0,o.useMemo)((function(){return f?function(t,r){void 0===r&&(r=2);var e={};return t.forEach((function(t){e[t.field_key]=Array(r).fill("Sample")})),e}(w):lt.u4}),[f,w,h.length]),k=yt((0,o.useState)(""),2),C=k[0],Z=k[1],P=yt((0,o.useState)(null),2),R=P[0],B=P[1],j=yt((0,o.useState)("asc"),2),O=j[0],A=j[1],I=yt((0,o.useState)(0),2),L=I[0],T=I[1],D=(0,o.useMemo)((function(){return w.reduce((function(t,r){var e=S[r.field_key];return Array.isArray(e)?Math.max(t,e.length):t}),0)}),[w,S]),M=(0,o.useMemo)((function(){return Array.from({length:D},(function(t,r){return r}))}),[D]),W=(0,o.useMemo)((function(){return v&&C.trim()?M.filter((function(t){return w.some((function(r){var e,n=S[r.field_key],o=Array.isArray(n)?n[t]:n;return(null!==(e=(0,a.e7)(o))&&void 0!==e?e:"").toLowerCase().includes(C.toLowerCase().trim())}))})):M}),[M,w,C,v,S]),X=(0,o.useMemo)((function(){if(!b||!R)return W;var t=w.find((function(t){return t.name===R}));return t?function(t,r,e){if(e||2===arguments.length)for(var n,o=0,a=r.length;o<a;o++)!n&&o in r||(n||(n=Array.prototype.slice.call(r,0,o)),n[o]=r[o]);return t.concat(n||Array.prototype.slice.call(r))}([],yt(W),!1).sort((function(r,e){var n,o,a=S[t.field_key],i=Array.isArray(a)?a[r]:a,l=Array.isArray(a)?a[e]:a,c=vt(i),s=(o=vt(l),null!==(n=c).asNumber&&null!==o.asNumber?n.asNumber-o.asNumber:null!==n.asDate&&null!==o.asDate?n.asDate.getTime()-o.asDate.getTime():n.asString.localeCompare(o.asString));return"asc"===O?s:-s})):W}),[W,R,O,w,b,S]),N=(0,o.useMemo)((function(){if(!m)return X;var t=L*x,r=t+x;return X.slice(t,r)}),[X,L,x,m]);(0,o.useEffect)((function(){T(0)}),[C,R,O]);var z=m?Math.ceil(X.length/x):1,_=D>0,E=W.length>0;return{enableSearch:v,searchQuery:C,hasSearchResults:E,setSearchQuery:Z,enableSort:b,sortColumn:R,sortDirection:O,handleSort:function(t){b&&(R===t?"asc"===O?A("desc"):(B(null),A("asc")):(B(t),A("asc")))},enablePagination:m,currentPage:L,paginatedRowIndices:N,rowsPerPage:x,setCurrentPage:T,columns:w,actions:g,totalRows:X.length,totalPages:z,hasData:_,activeFieldValues:S}}var mt=function(){return mt=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t},mt.apply(this,arguments)};const wt=function(t){var r=t.element,e=t.responsiveStyles,i=t.onClick,l=void 0===i?function(){}:i,c=t.editMode,s=void 0!==c&&c,u=(0,o.useMemo)((function(){return function(t){return t.addTargets("table","thead","tbody","th","td","tr"),t}(e)}),[e]),d=xt({element:r,editMode:s}),p=d.enableSearch,f=d.searchQuery,h=d.setSearchQuery,g=d.enableSort,v=d.sortColumn,b=d.sortDirection,y=d.handleSort,m=d.enablePagination,w=d.currentPage,S=d.setCurrentPage,k=d.paginatedRowIndices,C=d.rowsPerPage,Z=d.columns,A=d.actions,I=d.totalRows,L=d.totalPages,T=d.hasData,D=d.hasSearchResults,M=d.activeFieldValues,W=!T||T&&!D;return(0,n.tZ)("div",mt({css:mt(mt({},x),u.getTarget("container"))},{children:(0,n.BX)("div",mt({css:{minWidth:"fit-content"}},{children:[p&&(0,n.tZ)(G,{searchQuery:f,onSearchChange:h}),W?(0,n.tZ)(ht,{hasSearchQuery:f.trim().length>0}):(0,n.BX)("table",mt({css:mt(mt({},P),u.getTarget("table"))},{children:[(0,n.tZ)("thead",mt({css:R},{children:(0,n.BX)("tr",{children:[(0,n.tZ)(U,{columns:Z,enableSort:g,sortColumn:v,sortDirection:b,onSort:y,styles:u}),A.length>0&&(0,n.tZ)("th",{scope:"col",css:mt(mt({},B),u.getTarget("th"))})]})})),(0,n.tZ)("tbody",mt({css:u.getTarget("tbody")},{children:k.map((function(t){var r={};return Z.forEach((function(e){var n=M[e.field_key],o=Array.isArray(n)?n[t]:n;r[e.name]=o})),(0,n.BX)("tr",mt({css:mt(mt({},j),u.getTarget("tr")),onClick:function(){l({rowIndex:t,rowData:r})}},{children:[Z.map((function(r,e){var o,i=M[r.field_key],l=Array.isArray(i)?i[t]:i;return(0,n.tZ)("td",mt({css:mt(mt({},O),u.getTarget("td"))},{children:null!==(o=(0,a.e7)(l))&&void 0!==o?o:""}),e)})),A.length>0&&(0,n.tZ)("td",mt({css:mt(mt({},O),u.getTarget("td"))},{children:(0,n.tZ)(pt,{actions:A,rowIndex:t,columnData:Z,onClick:l})}))]}),t)}))}))]})),!W&&m&&(0,n.tZ)(at,{currentPage:w,totalPages:L,totalItems:I,rowsPerPage:C,onPageChange:S})]}))}))}}}]);