@hiver/connector-agent 4.0.1-feedbackForm-beta.3 → 4.0.1-feedbackForm-beta.4

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/index.es.js CHANGED
@@ -17680,12 +17680,13 @@ const eo = async () => (sa || (sa = await F9(B9, j9, {
17680
17680
  return console.error("Error fetching last submitted feedback:", n), null;
17681
17681
  }
17682
17682
  }, Kh = async (e) => {
17683
- if (!e) return !1;
17683
+ if (!e) return;
17684
17684
  const t = await eo();
17685
17685
  try {
17686
- return await t.get(zi, e) ?? !1;
17686
+ return await t.get(zi, e);
17687
17687
  } catch (n) {
17688
- return console.error("Error fetching capture on demand status:", n), !1;
17688
+ console.error("Error fetching capture on demand status:", n);
17689
+ return;
17689
17690
  }
17690
17691
  }, H9 = async (e, t) => {
17691
17692
  if (!e || !t || !t.length) return;
package/index.umd.js CHANGED
@@ -1167,7 +1167,7 @@ Do you want to continue?`,O5="Select an object to create",L5="Select an object t
1167
1167
  `,Nw="data:image/svg+xml,%3csvg%20width='124'%20height='107'%20viewBox='0%200%20124%20107'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M28.6168%2054.7446C28.6931%2052.5589%2031.0146%2051.1102%2033.0842%2051.8174C35.9985%2052.8133%2040.0375%2053.9024%2044.0621%2054.043C48.0034%2054.1806%2051.968%2053.4097%2054.8762%2052.6339C57.0264%2052.0602%2059.2927%2053.6932%2059.215%2055.9172C59.1742%2057.0856%2058.4742%2058.1269%2057.3723%2058.5178C54.8051%2059.4284%2049.7633%2060.8927%2044.3075%2060.7022C38.7694%2060.5088%2033.1999%2058.6241%2030.4004%2057.5311C29.2637%2057.0873%2028.5742%2055.9641%2028.6168%2054.7446Z'%20fill='url(%23paint0_linear_8481_102191)'/%3e%3cpath%20d='M47.223%2043.6373C44.4928%2030.7926%2052.6922%2018.1666%2065.5368%2015.4364C78.3815%2012.7062%2091.0075%2020.9055%2093.7377%2033.7502L105.079%2087.1053L84.1844%2091.5466C70.0346%2094.5542%2056.1258%2085.5217%2053.1182%2071.3719L47.223%2043.6373Z'%20fill='url(%23paint1_linear_8481_102191)'/%3e%3cmask%20id='mask0_8481_102191'%20style='mask-type:luminance'%20maskUnits='userSpaceOnUse'%20x='46'%20y='14'%20width='60'%20height='79'%3e%3cpath%20d='M47.223%2043.6373C44.4928%2030.7926%2052.6922%2018.1666%2065.5368%2015.4364C78.3815%2012.7062%2091.0075%2020.9055%2093.7377%2033.7502L105.079%2087.1053L84.1844%2091.5466C70.0346%2094.5542%2056.1258%2085.5217%2053.1182%2071.3719L47.223%2043.6373Z'%20fill='white'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_8481_102191)'%3e%3cellipse%20cx='63.7775'%20cy='46.8684'%20rx='1.48152'%20ry='1.39438'%20transform='rotate(-12%2063.7775%2046.8684)'%20fill='%23435C71'/%3e%3crect%20x='47.4368'%20y='59.3203'%20width='53.657'%20height='13.2235'%20transform='rotate(-12%2047.4368%2059.3203)'%20fill='url(%23paint2_linear_8481_102191)'/%3e%3crect%20x='51.1907'%20y='76.9824'%20width='53.657'%20height='10.4263'%20transform='rotate(-12%2051.1907%2076.9824)'%20fill='url(%23paint3_linear_8481_102191)'/%3e%3c/g%3e%3cpath%20opacity='0.883952'%20d='M113.939%2051.0679C114.775%2055%20112.265%2058.865%20108.333%2059.7008L107.842%2059.8052C103.639%2060.6986%2099.5073%2058.0155%2098.6139%2053.8123L97.205%2047.1837L105.307%2045.4616C109.239%2044.6259%20113.104%2047.1359%20113.939%2051.0679Z'%20fill='url(%23paint4_linear_8481_102191)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M68.7215%2066.4138C67.1801%2064.8725%2067.6745%2062.2062%2069.587%2061.1603C72.4457%2059.5969%2076.2861%2057.1773%2079.3785%2054.0849C82.4099%2051.0535%2084.752%2047.3461%2086.2775%2044.5465C87.3388%2042.5989%2090.0598%2042.0819%2091.6282%2043.6503C92.4782%2044.5003%2092.758%2045.7623%2092.2604%2046.8566C91.0829%2049.4466%2088.5191%2054.344%2084.4346%2058.4285C80.2853%2062.5778%2074.8639%2065.591%2072.0553%2066.9952C70.9363%2067.5548%2069.6062%2067.2985%2068.7215%2066.4138Z'%20fill='url(%23paint5_linear_8481_102191)'/%3e%3crect%20x='48.7264'%20y='33.7744'%20width='11.2108'%20height='11.2108'%20rx='5.59457'%20transform='rotate(-12%2048.7264%2033.7744)'%20fill='url(%23paint6_linear_8481_102191)'/%3e%3crect%20x='50.0175'%20y='35.8193'%20width='4.0158'%20height='3.84848'%20rx='1.92424'%20transform='rotate(-12%2050.0175%2035.8193)'%20fill='%23435C71'/%3e%3crect%20x='59.2875'%20y='31.5723'%20width='11.2108'%20height='11.2108'%20rx='5.59457'%20transform='rotate(-12%2059.2875%2031.5723)'%20fill='%23FFFEFE'/%3e%3cpath%20opacity='0.883952'%20d='M111.25%2038.5376C110.415%2034.6055%20106.55%2032.0955%20102.618%2032.9313L102.127%2033.0356C97.9234%2033.9291%2095.2403%2038.0607%2096.1337%2042.2639L97.5426%2048.8925L105.644%2047.1705C109.576%2046.3347%20112.086%2042.4696%20111.25%2038.5376Z'%20fill='url(%23paint7_linear_8481_102191)'/%3e%3crect%20x='60.0181'%20y='33.8037'%20width='3.84848'%20height='3.84848'%20rx='1.90724'%20transform='rotate(-12%2060.0181%2033.8037)'%20fill='%23435C71'/%3e%3cpath%20d='M36.9246%2059.1604C36.4487%2060.717%2034.7371%2061.6271%2033.1805%2061.1512C32.3613%2060.9007%2031.7241%2060.3475%2031.3259%2059.5987L25.2059%2046.7983C24.9784%2046.3703%2025.1286%2045.8788%2025.5566%2045.6513L28.338%2044.1724C28.7659%2043.9449%2029.2574%2044.0951%2029.4849%2044.5231L36.6496%2056.8367C37.0728%2057.5036%2037.15%2058.423%2036.9246%2059.1604Z'%20fill='%23FFDF9F'/%3e%3crect%20x='27.9973'%20y='44.333'%20width='2.39869'%20height='3.59807'%20transform='rotate(152%2027.9973%2044.333)'%20fill='%23FF9090'/%3e%3cpath%20d='M26.6628%2044.3769L26.9472%2044.9118L28.0169%2044.343L26.3106%2041.1338L24.171%2042.2714L25.0243%2043.876C25.6661%2043.5347%2026.3215%2043.7351%2026.6628%2044.3769Z'%20fill='%23FFB19F'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M7.26386%2027.248C9.3428%2020.4481%2016.5101%2016.6372%2023.31%2018.7161C30.11%2020.7951%2033.9209%2027.9624%2031.8419%2034.7623C29.763%2041.5622%2022.5956%2045.3731%2015.7958%2043.2942C8.99587%2041.2152%205.18493%2034.0479%207.26386%2027.248ZM9.72157%2027.9983C8.06843%2033.4055%2011.1399%2039.1821%2016.5471%2040.8352C21.9543%2042.4884%2027.7309%2039.4168%2029.384%2034.0096C31.0372%2028.6024%2027.9657%2022.8258%2022.5585%2021.1727C17.1513%2019.5196%2011.3747%2022.5911%209.72157%2027.9983Z'%20fill='%23FFE69F'/%3e%3ccircle%20opacity='0.414016'%20cx='19.5529'%20cy='31.0039'%20r='10.2804'%20transform='rotate(17%2019.5529%2031.0039)'%20fill='%23BBDEFC'/%3e%3cpath%20d='M14.3685%2030.6746C15.7299%2027.6867%2018.9391%2025.9803%2022.1776%2026.5225L22.2595%2026.5475C23.7024%2026.8095%2024.3854%2024.8682%2023.1497%2024.2218C22.3806%2023.8074%2021.5613%2023.557%2020.717%2023.3884C17.3715%2022.9031%2014.0553%2024.6664%2012.6939%2027.6543C12.2796%2028.4235%2012.0859%2029.3497%2012.0244%2030.1372C11.8444%2031.6051%2013.8607%2032.0424%2014.4503%2030.6997C14.3434%2030.7566%2014.3685%2030.6746%2014.3685%2030.6746Z'%20fill='%23F6FBFF'/%3e%3cpath%20d='M10.2904%2029.0679C11.9436%2023.6607%2017.7202%2020.5893%2023.1274%2022.2424C25.6671%2023.0189%2027.5785%2024.6783%2028.9301%2026.704C27.7539%2024.1048%2025.508%2022.0744%2022.5586%2021.1727C17.1514%2019.5196%2011.3748%2022.591%209.72165%2027.9982C8.81993%2030.9476%209.32924%2033.97%2010.7444%2036.3735C9.82081%2034.1203%209.51395%2031.6077%2010.2904%2029.0679Z'%20fill='%23ADCBE7'/%3e%3cpath%20opacity='0.406087'%20d='M36.4864%2056.8021L36.1373%2056.2691C36.3845%2056.8563%2036.428%2057.5516%2036.2372%2058.1754C35.9273%2059.189%2034.5593%2059.1971%2034.0713%2058.2806L28.3787%2047.5877C28.0534%2046.9767%2027.3508%2046.7619%2026.7395%2047.0866L25.7206%2047.6277L31.4395%2059.3516C31.7648%2059.9627%2032.27%2060.5434%2032.8706%2060.8123C33.7054%2061.1528%2034.6593%2061.1034%2035.3726%2060.7247C36.0858%2060.3459%2036.6602%2059.5837%2036.8444%2058.7021C37.0351%2058.0783%2036.8117%2057.4132%2036.4864%2056.8021Z'%20fill='white'/%3e%3cpath%20d='M29.8826%2048.4977C29.8006%2048.4726%2029.6368%2048.4225%2029.5799%2048.3155L28.1579%2045.6411C28.0442%2045.4272%2028.1193%2045.1814%2028.3332%2045.0677C28.5472%2044.9539%2028.7929%2045.0291%2028.9067%2045.243L30.3287%2047.9174C30.4424%2048.1313%2030.3673%2048.3771%2030.1534%2048.4908C30.1284%2048.5728%2029.9645%2048.5227%2029.8826%2048.4977Z'%20fill='%23FFF5EB'/%3e%3cellipse%20cx='29.2637'%20cy='54.631'%20rx='1.50593'%20ry='3.17918'%20transform='rotate(-23%2029.2637%2054.631)'%20fill='%23FFC478'/%3e%3cellipse%20cx='34.0592'%20cy='52.4078'%20rx='0.920288'%20ry='1.67325'%20transform='rotate(106%2034.0592%2052.4078)'%20fill='%23FFC478'/%3e%3cpath%20d='M89.1282%2019.2055L68.2257%2026.8725L45.9197%2028.3898L44.4929%2016.4082C44.3371%2013.798%2047.5283%2011.4502%2050.9859%2011.6309L65.1429%2012.369L67.3969%2012.4869C68.5309%2012.5463%2069.7066%2012.3289%2070.7522%2011.8627L78.6899%208.34726C81.725%206.99992%2085.3012%207.87475%2086.2125%2010.1876L89.1282%2019.2055Z'%20fill='url(%23paint8_linear_8481_102191)'/%3e%3cpath%20opacity='0.479771'%20d='M88.6262%2019.0953L68.3101%2026.5288L65.3314%2012.5149L67.5211%2012.6263C68.6228%2012.6824%2069.7652%2012.471%2070.7816%2012.0192L78.4972%208.61266C81.4474%207.30707%2084.9208%208.14856%2085.8036%2010.3829L88.6262%2019.0953Z'%20fill='%23ADCBE7'/%3e%3cpath%20d='M91.6332%2026.6212L46.9517%2036.1186L46.0387%2028.4438L89.2535%2019.2582L91.6332%2026.6212Z'%20fill='%23717DAD'/%3e%3cpath%20d='M102.961%2024.2033C103.125%2024.9722%20102.371%2025.7829%20101.278%2026.015L37.9675%2039.4722C36.8754%2039.7043%2035.8568%2039.2704%2035.6933%2038.5015C35.5301%2037.7336%2036.284%2036.922%2037.3761%2036.6898L100.687%2023.2327C101.779%2023.0005%20102.798%2023.4354%20102.961%2024.2033Z'%20fill='%239ED1FF'/%3e%3cpath%20d='M102.703%2024.1718C102.838%2024.805%20102.067%2025.5045%20100.983%2025.7349L69.5583%2032.4144L69.0712%2030.123L100.496%2023.4436C101.58%2023.2131%20102.569%2023.5394%20102.703%2024.1718Z'%20fill='%2378AFE1'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_8481_102191'%20x1='32.2665'%20y1='59.6553'%20x2='59.0518'%20y2='60.5906'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FFFDE0'/%3e%3cstop%20offset='1'%20stop-color='%23FFB362'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_8481_102191'%20x1='67.3434'%20y1='85.966'%20x2='103.216'%20y2='78.3411'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FFFABC'/%3e%3cstop%20offset='1'%20stop-color='%23FFA650'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint2_linear_8481_102191'%20x1='51.4347'%20y1='74.8197'%20x2='91.1539'%20y2='74.8197'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A3C1FF'/%3e%3cstop%20offset='1'%20stop-color='%234243FF'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint3_linear_8481_102191'%20x1='55.1887'%20y1='89.2031'%20x2='94.9078'%20y2='89.2031'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A3C1FF'/%3e%3cstop%20offset='1'%20stop-color='%234243FF'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint4_linear_8481_102191'%20x1='94.5023'%20y1='53.1799'%20x2='106.762'%20y2='58.7056'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF9498'/%3e%3cstop%20offset='1'%20stop-color='%23FFD671'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint5_linear_8481_102191'%20x1='74.9906'%20y1='66.9871'%20x2='94.9778'%20y2='46.9999'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FFFDE0'/%3e%3cstop%20offset='1'%20stop-color='%23FFB362'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint6_linear_8481_102191'%20x1='50.5805'%20y1='44.0581'%20x2='59.9372'%20y2='44.0581'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='white'/%3e%3cstop%20offset='1'%20stop-color='%23E3EEF3'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint7_linear_8481_102191'%20x1='88.4187'%20y1='43.3906'%20x2='99.3981'%20y2='25.1833'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF9498'/%3e%3cstop%20offset='1'%20stop-color='%23FFD671'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint8_linear_8481_102191'%20x1='56.4985'%20y1='29.5482'%20x2='100.532'%20y2='20.1885'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23ECF7FF'/%3e%3cstop%20offset='1'%20stop-color='%23C2E0FF'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",Pw=()=>C.jsxs(v.Box,{justifyItems:"center",marginTop:"40px",children:[C.jsx("img",{src:Nw,width:124,height:107}),C.jsx(v.Typography,{variant:"body2",color:v.theme.palette.gray.gray3,children:T4})]}),Mw=({searchResults:e,selectedObject:t,onReset:n,fetchCards:r})=>{const o=Bt(),{sendTrackingEvent:s,currentSmIds:i}=S.useContext(He),[a,l]=S.useState(null),c=cr(w4,{count:e.length.toString(),countSuffix:e.length>1?"s":"",searchObject:t.objectName,connectorName:t.connectorName}),u=(x,m)=>{s(R1,{search_keyword:t.label,search_result_label:m,sm_ids:i,connector_name:t.connectorName}),l({externalResourceId:x,formId:t.value.toString(),searchKeyword:t.label,searchResultLabel:m})},p=()=>{l(null),o(i5())},g=()=>{n(),r(),p()};return e.length?a?C.jsx(kw,{meta:a,onBack:p,onLink:g}):C.jsxs(v.Stack,{gap:"14px",marginTop:"12px",children:[C.jsx(v.Typography,{variant:"body2",children:c}),C.jsx(v.Stack,{gap:"17px",children:e==null?void 0:e.map(({externalResourceId:x,name:m,description:d})=>C.jsxs(ap,{onClick:()=>u(x,m),direction:"row",children:[C.jsxs(v.Stack,{flexGrow:1,children:[C.jsx(v.Typography,{variant:"body2",color:v.theme.palette.gray.gray1,children:m}),C.jsx(v.Typography,{variant:"caption",color:v.theme.palette.gray.gray3,children:d})]}),C.jsx(v.Box,{alignSelf:"center",className:"search-item__chevron",width:"20px",height:"20px",children:C.jsx("img",{src:Ow})})]},x))})]}):C.jsx(Pw,{})},tc=v.styled(v.Skeleton)`
1168
1168
  display: block;
1169
1169
  margin: ${e=>e.margin?e.margin:0};
1170
- `,Bw=()=>C.jsxs(v.Stack,{marginTop:"12px",children:[C.jsx(tc,{variant:"rounded",width:"50%",height:"16px",animation:"wave",margin:"0 0 18px 0"}),C.jsx(v.Stack,{gap:"17px",children:C.jsxs(ap,{gap:"8px",disableHover:!0,children:[C.jsx(tc,{variant:"rounded",width:"30%",height:"16px",animation:"wave"}),C.jsx(tc,{variant:"rounded",width:"70%",height:"16px",animation:"wave"})]})})]}),jw=async({id:e,searchString:t,args:n})=>{try{if(e===void 0||t===void 0)return[];const r=await ot({url:Ew.replace(":formId",e.toString()),method:dt.POST,data:{search_string:t,args:n}});let o=null;return r!=null&&r.data&&"data"in r.data&&(o=r.data.data),o}catch(r){Be({message:us,type:pt}),console.error(r)}},Vw=(e,t)=>op({mutationFn:jw,onMutate:({searchString:n,connectorName:r})=>{e(n,r)},onSuccess:(n,{searchString:r,connectorName:o})=>{t(r,n,o)}}),nc={OPEN_FORM_VIEW:"connector-agent-open-form-view"},rc=(e,t)=>t.some(n=>e instanceof n);let cp,lp;function Gw(){return cp||(cp=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Hw(){return lp||(lp=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const oc=new WeakMap,sc=new WeakMap,qs=new WeakMap;function Ww(e){const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("success",s),e.removeEventListener("error",i)},s=()=>{n(Xn(e.result)),o()},i=()=>{r(e.error),o()};e.addEventListener("success",s),e.addEventListener("error",i)});return qs.set(t,e),t}function Zw(e){if(oc.has(e))return;const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("complete",s),e.removeEventListener("error",i),e.removeEventListener("abort",i)},s=()=>{n(),o()},i=()=>{r(e.error||new DOMException("AbortError","AbortError")),o()};e.addEventListener("complete",s),e.addEventListener("error",i),e.addEventListener("abort",i)});oc.set(e,t)}let ic={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return oc.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Xn(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function up(e){ic=e(ic)}function Xw(e){return Hw().includes(e)?function(...t){return e.apply(ac(this),t),Xn(this.request)}:function(...t){return Xn(e.apply(ac(this),t))}}function zw(e){return typeof e=="function"?Xw(e):(e instanceof IDBTransaction&&Zw(e),rc(e,Gw())?new Proxy(e,ic):e)}function Xn(e){if(e instanceof IDBRequest)return Ww(e);if(sc.has(e))return sc.get(e);const t=zw(e);return t!==e&&(sc.set(e,t),qs.set(t,e)),t}const ac=e=>qs.get(e);function Yw(e,t,{blocked:n,upgrade:r,blocking:o,terminated:s}={}){const i=indexedDB.open(e,t),a=Xn(i);return r&&i.addEventListener("upgradeneeded",l=>{r(Xn(i.result),l.oldVersion,l.newVersion,Xn(i.transaction),l)}),n&&i.addEventListener("blocked",l=>n(l.oldVersion,l.newVersion,l)),a.then(l=>{s&&l.addEventListener("close",()=>s()),o&&l.addEventListener("versionchange",c=>o(c.oldVersion,c.newVersion,c))}).catch(()=>{}),a}const Jw=["get","getKey","getAll","getAllKeys","count"],Qw=["put","add","delete","clear"],cc=new Map;function dp(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(cc.get(t))return cc.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=Qw.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(o||Jw.includes(n)))return;const s=async function(i,...a){const l=this.transaction(i,o?"readwrite":"readonly");let c=l.store;return r&&(c=c.index(a.shift())),(await Promise.all([c[n](...a),o&&l.done]))[0]};return cc.set(t,s),s}up(e=>({...e,get:(t,n,r)=>dp(t,n)||e.get(t,n,r),has:(t,n)=>!!dp(t,n)||e.has(t,n)}));const $w=["continue","continuePrimaryKey","advance"],fp={},lc=new WeakMap,pp=new WeakMap,Uw={get(e,t){if(!$w.includes(t))return e[t];let n=fp[t];return n||(n=fp[t]=function(...r){lc.set(this,pp.get(this)[t](...r))}),n}};async function*qw(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const n=new Proxy(t,Uw);for(pp.set(n,t),qs.set(n,ac(t));t;)yield n,t=await(lc.get(n)||t.continue()),lc.delete(n)}function hp(e,t){return t===Symbol.asyncIterator&&rc(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&rc(e,[IDBIndex,IDBObjectStore])}up(e=>({...e,get(t,n,r){return hp(t,n)?qw:e.get(t,n,r)},has(t,n){return hp(t,n)||e.has(t,n)}}));const Kw="connector-db",e9=1,yo="feedback_data",Ks="last_submitted_feedback",ei="capture_feedback_on_demand",t9=.083*60*60*1e3,uc=(e,t=new Date)=>e?Math.abs(t.getTime()-e.getTime())>=t9:!0,gp=e=>e.captureFeedback&&uc(e.firstViewed)&&(!e.lastSubmittedFeedback||uc(e.lastSubmittedFeedback));let dc=null;const wr=async()=>(dc||(dc=await Yw(Kw,e9,{upgrade(e){e.objectStoreNames.contains(yo)||e.createObjectStore(yo),e.objectStoreNames.contains(Ks)||e.createObjectStore(Ks),e.objectStoreNames.contains(ei)||e.createObjectStore(ei)}})),dc),fc=async e=>{if(!e)return[];const t=await wr();try{return await t.get(yo,e)||[]}catch(n){return console.error("Error fetching user feedback data:",n),[]}},n9=async e=>{if(!e)return null;const t=await wr();try{return await t.get(Ks,e)||null}catch(n){return console.error("Error fetching last submitted feedback:",n),null}},mp=async e=>{if(!e)return!1;const t=await wr();try{return await t.get(ei,e)??!1}catch(n){return console.error("Error fetching capture on demand status:",n),!1}},r9=async(e,t)=>{if(!e||!t||!t.length)return;const n=await wr();try{const r=await fc(e),o=new Set(r.map(i=>i.connectorId)),s=t.filter(i=>!o.has(i.connector_id)).map(i=>({connectorId:i.connector_id,captureFeedback:!0,firstViewed:new Date}));if(s.length>0){const i=[...r,...s];await n.put(yo,i,e)}}catch(r){console.error("Error updating connectors feedback data:",r)}},o9=async e=>{if(!e)return;const t=await wr();try{const n=await fc(e),r=new Date,o=n.map(s=>{const i=gp(s);return{...s,lastSubmittedFeedback:i?r:s.lastSubmittedFeedback,captureFeedback:s.captureFeedback!==i}});await t.put(yo,o,e),await t.put(Ks,r,e)}catch(n){console.error("Error updating feedback submission date:",n)}},bp=async(e,t)=>{if(!e)return;const n=await wr();try{await n.put(ei,t,e)}catch(r){console.error("Error updating capture on demand:",r)}},s9=async e=>(await fc(e)).filter(r=>gp(r)),yp=async e=>{const t=await n9(e);return t&&!uc(t)?!1:await mp(e)?!0:!!(await s9(e)).length},i9=async(e,t)=>{await r9(e,t)},vp=async e=>{await o9(e)},a9=async(e,t)=>{const n=await mp(e);t?n!==!1&&await bp(e,t):await bp(e,void 0)},c9=e=>k.createElement("svg",{width:17,height:17,viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("g",{clipPath:"url(#clip0_1180_840)"},k.createElement("path",{d:"M5.16667 10.12H9.83333V11.4533H5.16667V10.12ZM5.16667 7.45329H11.8333V8.78662H5.16667V7.45329ZM5.16667 4.78662H11.8333V6.11995H5.16667V4.78662ZM13.1667 2.11995H10.38C10.1 1.34662 9.36667 0.786621 8.5 0.786621C7.63333 0.786621 6.9 1.34662 6.62 2.11995H3.83333C3.74 2.11995 3.65333 2.12662 3.56667 2.14662C3.30667 2.19995 3.07333 2.33329 2.89333 2.51329C2.77333 2.63329 2.67333 2.77995 2.60667 2.93995C2.54 3.09329 2.5 3.26662 2.5 3.45329V12.7866C2.5 12.9666 2.54 13.1466 2.60667 13.3066C2.67333 13.4666 2.77333 13.6066 2.89333 13.7333C3.07333 13.9133 3.30667 14.0466 3.56667 14.1C3.65333 14.1133 3.74 14.12 3.83333 14.12H13.1667C13.9 14.12 14.5 13.52 14.5 12.7866V3.45329C14.5 2.71995 13.9 2.11995 13.1667 2.11995ZM8.5 1.95329C8.77333 1.95329 9 2.17995 9 2.45329C9 2.72662 8.77333 2.95329 8.5 2.95329C8.22667 2.95329 8 2.72662 8 2.45329C8 2.17995 8.22667 1.95329 8.5 1.95329ZM13.1667 12.7866H3.83333V3.45329H13.1667V12.7866Z",fill:"#343C45"})),k.createElement("defs",null,k.createElement("clipPath",{id:"clip0_1180_840"},k.createElement("rect",{width:16,height:16,fill:"white",transform:"translate(0.5 0.120117)"})))),l9=e=>k.createElement("svg",{width:24,height:22,viewBox:"0 0 24 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("rect",{x:3.63636,y:2.27393,width:15.2727,height:17.2308,rx:2.90909,fill:"#F6C035"}),k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22.4621 12.0506C22.1745 11.7669 21.7845 11.6074 21.3779 11.6074C20.9712 11.6074 20.5812 11.7669 20.2937 12.0506L19.9323 12.4079L22.4626 14.9057L22.8235 14.549C22.9659 14.4084 23.0789 14.2415 23.156 14.0578C23.2331 13.8741 23.2727 13.6773 23.2727 13.4784C23.2727 13.2796 23.2331 13.0827 23.156 12.8991C23.0789 12.7154 22.9659 12.5485 22.8235 12.4079L22.4621 12.0506ZM21.7393 15.6192L19.209 13.1214L14.5624 17.7088C14.4607 17.8092 14.3897 17.9358 14.3574 18.0742L13.8314 20.3222C13.8118 20.4056 13.814 20.4927 13.8379 20.575C13.8618 20.6574 13.9065 20.7324 13.9679 20.793C14.0293 20.8535 14.1052 20.8977 14.1887 20.9213C14.2721 20.9448 14.3603 20.9471 14.4448 20.9277L16.7226 20.409C16.8626 20.377 16.9906 20.3069 17.0922 20.2066L21.7393 15.6192Z",fill:"#FFE298"}),k.createElement("rect",{x:6.54546,y:6.58154,width:10.1818,height:1.4359,rx:.717949,fill:"#FFDC83"}),k.createElement("rect",{x:6.54546,y:10.1714,width:10.1818,height:1.4359,rx:.717949,fill:"#FFDC83"}),k.createElement("rect",{x:6.54546,y:13.7612,width:6.54545,height:1.4359,rx:.717949,fill:"#FFDC83"})),u9=e=>k.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("g",{clipPath:"url(#clip0_825_73646)"},k.createElement("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z",fill:"#6F7C90"})),k.createElement("defs",null,k.createElement("clipPath",{id:"clip0_825_73646"},k.createElement("rect",{width:24,height:24,fill:"white"})))),d9=v.styled(v.Stack)`
1170
+ `,Bw=()=>C.jsxs(v.Stack,{marginTop:"12px",children:[C.jsx(tc,{variant:"rounded",width:"50%",height:"16px",animation:"wave",margin:"0 0 18px 0"}),C.jsx(v.Stack,{gap:"17px",children:C.jsxs(ap,{gap:"8px",disableHover:!0,children:[C.jsx(tc,{variant:"rounded",width:"30%",height:"16px",animation:"wave"}),C.jsx(tc,{variant:"rounded",width:"70%",height:"16px",animation:"wave"})]})})]}),jw=async({id:e,searchString:t,args:n})=>{try{if(e===void 0||t===void 0)return[];const r=await ot({url:Ew.replace(":formId",e.toString()),method:dt.POST,data:{search_string:t,args:n}});let o=null;return r!=null&&r.data&&"data"in r.data&&(o=r.data.data),o}catch(r){Be({message:us,type:pt}),console.error(r)}},Vw=(e,t)=>op({mutationFn:jw,onMutate:({searchString:n,connectorName:r})=>{e(n,r)},onSuccess:(n,{searchString:r,connectorName:o})=>{t(r,n,o)}}),nc={OPEN_FORM_VIEW:"connector-agent-open-form-view"},rc=(e,t)=>t.some(n=>e instanceof n);let cp,lp;function Gw(){return cp||(cp=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Hw(){return lp||(lp=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const oc=new WeakMap,sc=new WeakMap,qs=new WeakMap;function Ww(e){const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("success",s),e.removeEventListener("error",i)},s=()=>{n(Xn(e.result)),o()},i=()=>{r(e.error),o()};e.addEventListener("success",s),e.addEventListener("error",i)});return qs.set(t,e),t}function Zw(e){if(oc.has(e))return;const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("complete",s),e.removeEventListener("error",i),e.removeEventListener("abort",i)},s=()=>{n(),o()},i=()=>{r(e.error||new DOMException("AbortError","AbortError")),o()};e.addEventListener("complete",s),e.addEventListener("error",i),e.addEventListener("abort",i)});oc.set(e,t)}let ic={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return oc.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Xn(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function up(e){ic=e(ic)}function Xw(e){return Hw().includes(e)?function(...t){return e.apply(ac(this),t),Xn(this.request)}:function(...t){return Xn(e.apply(ac(this),t))}}function zw(e){return typeof e=="function"?Xw(e):(e instanceof IDBTransaction&&Zw(e),rc(e,Gw())?new Proxy(e,ic):e)}function Xn(e){if(e instanceof IDBRequest)return Ww(e);if(sc.has(e))return sc.get(e);const t=zw(e);return t!==e&&(sc.set(e,t),qs.set(t,e)),t}const ac=e=>qs.get(e);function Yw(e,t,{blocked:n,upgrade:r,blocking:o,terminated:s}={}){const i=indexedDB.open(e,t),a=Xn(i);return r&&i.addEventListener("upgradeneeded",l=>{r(Xn(i.result),l.oldVersion,l.newVersion,Xn(i.transaction),l)}),n&&i.addEventListener("blocked",l=>n(l.oldVersion,l.newVersion,l)),a.then(l=>{s&&l.addEventListener("close",()=>s()),o&&l.addEventListener("versionchange",c=>o(c.oldVersion,c.newVersion,c))}).catch(()=>{}),a}const Jw=["get","getKey","getAll","getAllKeys","count"],Qw=["put","add","delete","clear"],cc=new Map;function dp(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(cc.get(t))return cc.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=Qw.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(o||Jw.includes(n)))return;const s=async function(i,...a){const l=this.transaction(i,o?"readwrite":"readonly");let c=l.store;return r&&(c=c.index(a.shift())),(await Promise.all([c[n](...a),o&&l.done]))[0]};return cc.set(t,s),s}up(e=>({...e,get:(t,n,r)=>dp(t,n)||e.get(t,n,r),has:(t,n)=>!!dp(t,n)||e.has(t,n)}));const $w=["continue","continuePrimaryKey","advance"],fp={},lc=new WeakMap,pp=new WeakMap,Uw={get(e,t){if(!$w.includes(t))return e[t];let n=fp[t];return n||(n=fp[t]=function(...r){lc.set(this,pp.get(this)[t](...r))}),n}};async function*qw(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const n=new Proxy(t,Uw);for(pp.set(n,t),qs.set(n,ac(t));t;)yield n,t=await(lc.get(n)||t.continue()),lc.delete(n)}function hp(e,t){return t===Symbol.asyncIterator&&rc(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&rc(e,[IDBIndex,IDBObjectStore])}up(e=>({...e,get(t,n,r){return hp(t,n)?qw:e.get(t,n,r)},has(t,n){return hp(t,n)||e.has(t,n)}}));const Kw="connector-db",e9=1,yo="feedback_data",Ks="last_submitted_feedback",ei="capture_feedback_on_demand",t9=.083*60*60*1e3,uc=(e,t=new Date)=>e?Math.abs(t.getTime()-e.getTime())>=t9:!0,gp=e=>e.captureFeedback&&uc(e.firstViewed)&&(!e.lastSubmittedFeedback||uc(e.lastSubmittedFeedback));let dc=null;const wr=async()=>(dc||(dc=await Yw(Kw,e9,{upgrade(e){e.objectStoreNames.contains(yo)||e.createObjectStore(yo),e.objectStoreNames.contains(Ks)||e.createObjectStore(Ks),e.objectStoreNames.contains(ei)||e.createObjectStore(ei)}})),dc),fc=async e=>{if(!e)return[];const t=await wr();try{return await t.get(yo,e)||[]}catch(n){return console.error("Error fetching user feedback data:",n),[]}},n9=async e=>{if(!e)return null;const t=await wr();try{return await t.get(Ks,e)||null}catch(n){return console.error("Error fetching last submitted feedback:",n),null}},mp=async e=>{if(!e)return;const t=await wr();try{return await t.get(ei,e)}catch(n){console.error("Error fetching capture on demand status:",n);return}},r9=async(e,t)=>{if(!e||!t||!t.length)return;const n=await wr();try{const r=await fc(e),o=new Set(r.map(i=>i.connectorId)),s=t.filter(i=>!o.has(i.connector_id)).map(i=>({connectorId:i.connector_id,captureFeedback:!0,firstViewed:new Date}));if(s.length>0){const i=[...r,...s];await n.put(yo,i,e)}}catch(r){console.error("Error updating connectors feedback data:",r)}},o9=async e=>{if(!e)return;const t=await wr();try{const n=await fc(e),r=new Date,o=n.map(s=>{const i=gp(s);return{...s,lastSubmittedFeedback:i?r:s.lastSubmittedFeedback,captureFeedback:s.captureFeedback!==i}});await t.put(yo,o,e),await t.put(Ks,r,e)}catch(n){console.error("Error updating feedback submission date:",n)}},bp=async(e,t)=>{if(!e)return;const n=await wr();try{await n.put(ei,t,e)}catch(r){console.error("Error updating capture on demand:",r)}},s9=async e=>(await fc(e)).filter(r=>gp(r)),yp=async e=>{const t=await n9(e);return t&&!uc(t)?!1:await mp(e)?!0:!!(await s9(e)).length},i9=async(e,t)=>{await r9(e,t)},vp=async e=>{await o9(e)},a9=async(e,t)=>{const n=await mp(e);t?n!==!1&&await bp(e,t):await bp(e,void 0)},c9=e=>k.createElement("svg",{width:17,height:17,viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("g",{clipPath:"url(#clip0_1180_840)"},k.createElement("path",{d:"M5.16667 10.12H9.83333V11.4533H5.16667V10.12ZM5.16667 7.45329H11.8333V8.78662H5.16667V7.45329ZM5.16667 4.78662H11.8333V6.11995H5.16667V4.78662ZM13.1667 2.11995H10.38C10.1 1.34662 9.36667 0.786621 8.5 0.786621C7.63333 0.786621 6.9 1.34662 6.62 2.11995H3.83333C3.74 2.11995 3.65333 2.12662 3.56667 2.14662C3.30667 2.19995 3.07333 2.33329 2.89333 2.51329C2.77333 2.63329 2.67333 2.77995 2.60667 2.93995C2.54 3.09329 2.5 3.26662 2.5 3.45329V12.7866C2.5 12.9666 2.54 13.1466 2.60667 13.3066C2.67333 13.4666 2.77333 13.6066 2.89333 13.7333C3.07333 13.9133 3.30667 14.0466 3.56667 14.1C3.65333 14.1133 3.74 14.12 3.83333 14.12H13.1667C13.9 14.12 14.5 13.52 14.5 12.7866V3.45329C14.5 2.71995 13.9 2.11995 13.1667 2.11995ZM8.5 1.95329C8.77333 1.95329 9 2.17995 9 2.45329C9 2.72662 8.77333 2.95329 8.5 2.95329C8.22667 2.95329 8 2.72662 8 2.45329C8 2.17995 8.22667 1.95329 8.5 1.95329ZM13.1667 12.7866H3.83333V3.45329H13.1667V12.7866Z",fill:"#343C45"})),k.createElement("defs",null,k.createElement("clipPath",{id:"clip0_1180_840"},k.createElement("rect",{width:16,height:16,fill:"white",transform:"translate(0.5 0.120117)"})))),l9=e=>k.createElement("svg",{width:24,height:22,viewBox:"0 0 24 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("rect",{x:3.63636,y:2.27393,width:15.2727,height:17.2308,rx:2.90909,fill:"#F6C035"}),k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22.4621 12.0506C22.1745 11.7669 21.7845 11.6074 21.3779 11.6074C20.9712 11.6074 20.5812 11.7669 20.2937 12.0506L19.9323 12.4079L22.4626 14.9057L22.8235 14.549C22.9659 14.4084 23.0789 14.2415 23.156 14.0578C23.2331 13.8741 23.2727 13.6773 23.2727 13.4784C23.2727 13.2796 23.2331 13.0827 23.156 12.8991C23.0789 12.7154 22.9659 12.5485 22.8235 12.4079L22.4621 12.0506ZM21.7393 15.6192L19.209 13.1214L14.5624 17.7088C14.4607 17.8092 14.3897 17.9358 14.3574 18.0742L13.8314 20.3222C13.8118 20.4056 13.814 20.4927 13.8379 20.575C13.8618 20.6574 13.9065 20.7324 13.9679 20.793C14.0293 20.8535 14.1052 20.8977 14.1887 20.9213C14.2721 20.9448 14.3603 20.9471 14.4448 20.9277L16.7226 20.409C16.8626 20.377 16.9906 20.3069 17.0922 20.2066L21.7393 15.6192Z",fill:"#FFE298"}),k.createElement("rect",{x:6.54546,y:6.58154,width:10.1818,height:1.4359,rx:.717949,fill:"#FFDC83"}),k.createElement("rect",{x:6.54546,y:10.1714,width:10.1818,height:1.4359,rx:.717949,fill:"#FFDC83"}),k.createElement("rect",{x:6.54546,y:13.7612,width:6.54545,height:1.4359,rx:.717949,fill:"#FFDC83"})),u9=e=>k.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("g",{clipPath:"url(#clip0_825_73646)"},k.createElement("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z",fill:"#6F7C90"})),k.createElement("defs",null,k.createElement("clipPath",{id:"clip0_825_73646"},k.createElement("rect",{width:24,height:24,fill:"white"})))),d9=v.styled(v.Stack)`
1171
1171
  width: 100%;
1172
1172
  margin-top: 20px;
1173
1173
  flex-direction: row;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hiver/connector-agent",
3
- "version": "4.0.1-feedbackForm-beta.3",
3
+ "version": "4.0.1-feedbackForm-beta.4",
4
4
  "main": "index.es.js",
5
5
  "module": "index.es.js",
6
6
  "types": "index.d.ts",