@sisense/sdk-ui 2.5.0 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai.cjs +1 -1
- package/dist/ai.js +4 -4
- package/dist/analytics-composer.cjs +82 -82
- package/dist/analytics-composer.js +1911 -1911
- package/dist/{derive-chart-family-ci86jmVk.js → derive-chart-family-BPYK8evJ.js} +11063 -11000
- package/dist/{derive-chart-family-Cjjn5U5S.cjs → derive-chart-family-yUBZXP4x.cjs} +146 -146
- package/dist/dimensions-BgPl9ZS9.cjs +1 -0
- package/dist/dimensions-DuHaCozA.js +203 -0
- package/dist/index.cjs +14 -14
- package/dist/index.js +5390 -5298
- package/dist/index.umd.js +248 -248
- package/dist/packages/sdk-ui/src/app/client-application.d.ts +2 -2
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/highcharts-based-chart-renderer/highcharts-based-chart-renderer.d.ts +4 -0
- package/dist/packages/sdk-ui/src/dashboard/components/jtd-dashboard.d.ts +2 -1
- package/dist/packages/sdk-ui/src/dashboard/hooks/jtd/jtd-filters.d.ts +38 -4
- package/dist/packages/sdk-ui/src/dashboard/types.d.ts +26 -19
- package/dist/packages/sdk-ui/src/dynamic-size-container/dynamic-size-container.d.ts +2 -1
- package/dist/packages/sdk-ui/src/models/dashboard/translate-dashboard-utils.d.ts +1 -0
- package/dist/packages/sdk-ui/src/props.d.ts +10 -0
- package/dist/packages/sdk-ui/src/sisense-chart/sisense-chart.d.ts +1 -1
- package/dist/packages/sdk-ui/src/sisense-chart/types.d.ts +4 -0
- package/dist/packages/sdk-ui/src/widget-by-id/utils.d.ts +26 -0
- package/dist/{use-common-filters-BTk7vuUo.js → use-common-filters-B1RKY2KD.js} +745 -717
- package/dist/{use-common-filters-Bf8KKBN2.cjs → use-common-filters-CRgYdKcV.cjs} +33 -33
- package/dist/{widget-composer-CJDaEkCY.cjs → widget-composer-B2r2a9Oh.cjs} +7 -7
- package/dist/{widget-composer-BtqAxkpr.js → widget-composer-I9gUFBZt.js} +67 -66
- package/package.json +7 -7
- package/dist/dimensions-COtPNdpu.cjs +0 -1
- package/dist/dimensions-wzj4u0MX.js +0 -200
package/dist/ai.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var Qt=Object.defineProperty,Vt=Object.defineProperties;var Ut=Object.getOwnPropertyDescriptors;var pe=Object.getOwnPropertySymbols;var We=Object.prototype.hasOwnProperty,Ze=Object.prototype.propertyIsEnumerable;var qe=(e,t,r)=>t in e?Qt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,S=(e,t)=>{for(var r in t||(t={}))We.call(t,r)&&qe(e,r,t[r]);if(pe)for(var r of pe(t))Ze.call(t,r)&&qe(e,r,t[r]);return e},L=(e,t)=>Vt(e,Ut(t));var ye=(e,t)=>{var r={};for(var o in e)We.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&pe)for(var o of pe(e))t.indexOf(o)<0&&Ze.call(e,o)&&(r[o]=e[o]);return r};var U=(e,t,r)=>new Promise((o,i)=>{var d=u=>{try{h(r.next(u))}catch(C){i(C)}},l=u=>{try{h(r.throw(u))}catch(C){i(C)}},h=u=>u.done?o(u.value):Promise.resolve(u.value).then(d,l);h((r=r.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./use-common-filters-Bf8KKBN2.cjs"),n=require("./derive-chart-family-Cjjn5U5S.cjs"),g=require("react"),ae=require("./widget-composer-CJDaEkCY.cjs"),re=require("react/jsx-runtime");function _t(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const q=_t(g);class Kt extends a.Subscribable{constructor(t,r){super(),this.client=t,this.setOptions(r),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const o=this.options;this.options=this.client.defaultMutationOptions(t),a.shallowEqualObjects(o,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),(r=this.currentMutation)==null||r.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.currentMutation)==null||t.removeObserver(this)}}onMutationUpdate(t){this.updateResult();const r={listeners:!0};t.type==="success"?r.onSuccess=!0:t.type==="error"&&(r.onError=!0),this.notify(r)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(t,r){return this.mutateOptions=r,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,L(S({},this.options),{variables:typeof t!="undefined"?t:this.options.variables})),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const t=this.currentMutation?this.currentMutation.state:a.getDefaultState(),r=L(S({},t),{isLoading:t.status==="loading",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset});this.currentResult=r}notify(t){a.notifyManager.batch(()=>{if(this.mutateOptions&&this.hasListeners()){if(t.onSuccess){var r,o,i,d;(r=(o=this.mutateOptions).onSuccess)==null||r.call(o,this.currentResult.data,this.currentResult.variables,this.currentResult.context),(i=(d=this.mutateOptions).onSettled)==null||i.call(d,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)}else if(t.onError){var l,h,u,C;(l=(h=this.mutateOptions).onError)==null||l.call(h,this.currentResult.error,this.currentResult.variables,this.currentResult.context),(u=(C=this.mutateOptions).onSettled)==null||u.call(C,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}}t.listeners&&this.listeners.forEach(({listener:y})=>{y(this.currentResult)})})}}function Le(e,t,r){const o=a.parseMutationArgs(e,t),i=a.useQueryClient({context:o.context}),[d]=q.useState(()=>new Kt(i,o));q.useEffect(()=>{d.setOptions(o)},[d,o]);const l=a.useSyncExternalStore(q.useCallback(u=>d.subscribe(a.notifyManager.batchCalls(u)),[d]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),h=q.useCallback((u,C)=>{d.mutate(u,C).catch(Xt)},[d]);if(l.error&&a.shouldThrowError(d.options.useErrorBoundary,[l.error]))throw l.error;return L(S({},l),{mutate:h,mutateAsync:l.mutate})}function Xt(){}class nt{constructor(t,r=!1){this.volatile=r,this.getChatContexts=()=>U(this,null,function*(){return(yield this.httpClient.get("api/datasources//"))||[]}),this.getNlgInsights=o=>this.httpClient.post("api/v2/ai/nlg/queryResult",o),this.getQueryRecommendations=(o,i)=>this.httpClient.get(`api/v2/ai/recommendations/query/${o}/${i.numOfRecommendations}`),this.getNlqResult=(o,i)=>this.httpClient.post(`api/v2/ai/nlq/query/${o}`,i),this.setLlmConfig=o=>this.httpClient.post("api/v2/settings/ai/llmProvider",o).catch(i=>{console.error("Unable to set llm config",i)}),this.getAllChats=()=>U(this,null,function*(){return this.volatile?[]:this.httpClient.get("api/v2/ai/chats")}),this.getChatById=o=>this.httpClient.get(`api/v2/ai/chats/${o}`),this.createChat=(o,i)=>this.httpClient.post("api/v2/ai/chats",{sourceId:o,volatile:this.volatile,contextDetails:i}),this.postChat=(o,i)=>this.httpClient.post(`api/v2/ai/chats/${o}`,i),this.deleteChatHistory=o=>this.httpClient.delete(`api/v2/ai/chats/${o}/history`),this.sendFeedback=o=>this.httpClient.post("api/v2/ai/feedback",o),this.ai={getNlgInsights:this.getNlgInsights,getNlqResult:this.getNlqResult,getQueryRecommendations:this.getQueryRecommendations,setLlmConfig:this.setLlmConfig,sendFeedback:this.sendFeedback,chat:{getAll:this.getAllChats,getById:this.getChatById,create:this.createChat,post:this.postChat,clearHistory:this.deleteChatHistory}},this.httpClient=t}}const Jt=new a.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1,refetchOnMount:!1}}}),Pe=g.createContext(void 0),W=()=>g.useContext(Pe),Yt=({children:e,volatile:t})=>{const{app:r}=n.useSisenseContext(),o=g.useMemo(()=>r?new nt(r.httpClient,t):void 0,[r,t]);return n.jsx(Pe.Provider,{value:o,children:n.jsx(a.QueryClientProvider,{client:Jt,children:e})})},rt=g.createContext({}),en=()=>g.useContext(rt),ot=({children:e})=>{const[t,r]=g.useState({}),o=g.useCallback((l,h)=>{var u;return`${l}_${(u=h==null?void 0:h.dashboardId)!=null?u:""}`},[]),i=g.useCallback((l,h,u)=>{r(C=>L(S({},C),{[o(h,u)]:l}))},[o]),d=g.useCallback((l,h)=>t[o(l,h)],[t,o]);return n.jsx(rt.Provider,{value:{saveChatId:i,getChatId:d},children:e})};function tn({children:e,volatile:t}){return n.jsx(ot,{children:n.jsx(Yt,{volatile:t,children:e})})}function st(e){var t,r;if("jaql"in e)return e;{const o=n.convertJaqlDataSource(e.dataSource),{filters:i=[],relations:d}=n.getFilterListAndRelationsJaql(e.filters),{metadata:l,filterRelations:h}=n.getJaqlQueryPayload({dataSource:e.dataSource,attributes:(t=e.dimensions)!=null?t:[],measures:(r=e.measures)!=null?r:[],filters:i,filterRelations:d,highlights:[]},!0),u={jaql:{datasource:o,metadata:l,filterRelations:h}};return e.verbosity&&(u.verbosity=e.verbosity),u}}const fe=(e,t=!0)=>{const r=g.useMemo(()=>st(e),[e]),o=W(),{data:i,error:d,isError:l,isLoading:h,isSuccess:u,refetch:C}=a.useQuery({queryKey:["getNlgInsights",r,o],queryFn:()=>o==null?void 0:o.ai.getNlgInsights(r),select:y=>{var m;return(m=y==null?void 0:y.data)==null?void 0:m.answer},enabled:!!o&&t});return{isLoading:h,isError:l,isSuccess:u,data:i,error:d,refetch:g.useCallback(()=>{C()},[C])}},nn=e=>{const o=e,{enabled:t}=o,r=ye(o,["enabled"]);return fe(r,t)},rn=a.withTracking("useGetNlgInsights")(nn),it=["indicator","column","line","table","pie","bar"];function at(e){const{dataSource:t,query:r,chartTypes:o}=e;return{contextTitle:typeof t=="string"?t:t.title,request:{text:r,timezone:"UTC",chartTypes:o!=null?o:[...it]}}}const on=e=>{const{contextTitle:t,request:r}=at(e),o=W(),{isLoading:i,isError:d,isSuccess:l,data:h,error:u,refetch:C}=a.useQuery({queryKey:["getNlqResult",t,r,o],queryFn:()=>o==null?void 0:o.ai.getNlqResult(t,r),enabled:!!o&&e.enabled}),y=h?ae.toWidgetProps(h,{useCustomizedStyleOptions:e.enableAxisTitlesInWidgetProps||!1}):void 0;return{isLoading:i,isError:d,isSuccess:l,data:y,error:u,refetch:g.useCallback(()=>{C()},[C])}},sn=a.withTracking("useGetNlqResult")(on),lt=4,ct=e=>{const{contextTitle:t,count:r,enableAxisTitlesInWidgetProps:o,enabled:i}=e,d=W(),l=r!=null?r:lt,h=(i===void 0||i===!0)&&l>0,{isLoading:u,isError:C,isSuccess:y,data:m,error:s,refetch:p}=a.useQuery({queryKey:["getQueryRecommendations",t,l,d],queryFn:()=>d==null?void 0:d.ai.getQueryRecommendations(t,{numOfRecommendations:l}),enabled:!!d&&h}),c=g.useMemo(()=>m==null?void 0:m.map(x=>L(S({},x),{widgetProps:x.jaql?ae.toWidgetProps(x,{useCustomizedStyleOptions:o}):void 0})),[m,o]);return{isLoading:h?u:!1,isError:C,isSuccess:y,data:c!=null?c:void 0,error:s,refetch:g.useCallback(()=>{p()},[p])}},an=a.withTracking("useGetQueryRecommendations")(ct),dt=Object.freeze({enableFollowupQuestions:!1,enableHeader:!0,enableInsights:!0,numOfRecommendations:4,numOfRecentPrompts:5}),ut=g.createContext(S({},dt)),Q=()=>g.useContext(ut),ln=({children:e,value:t})=>{const{t:r}=n.useTranslation(),o=Object.entries(t).reduce((i,[d,l])=>(l!==void 0&&(i[d]=l),i),L(S({},dt),{inputPromptText:r("ai.config.inputPromptText"),welcomeText:r("ai.config.welcomeText"),suggestionsWelcomeText:r("ai.config.suggestionsWelcomeText")}));return n.jsx(ut.Provider,{value:o,children:e})},Ee="chatHistory",cn=e=>{const t=W(),{hideHistory:r}=Q();return a.useQuery({queryKey:[Ee,e,t],queryFn:()=>U(exports,null,function*(){if(!t||!e)return;if(r)return[];const o=yield t.ai.chat.getById(e);return o==null?void 0:o.chatHistory}),enabled:!!t&&!!e})},pt=e=>{const t=W(),r=a.useQueryClient();return Le({mutationFn:()=>U(exports,null,function*(){if(!(!t||!e))return t.ai.chat.clearHistory(e)}),onError:o=>{console.error("Error when clearing history:",o)},onSettled:()=>{e&&r.setQueriesData([Ee,e],[])}})},Ie=e=>{const{data:t,isLoading:r,isError:o}=cn(e),{mutate:i}=pt(e);return g.useEffect(()=>{o&&i()},[o,i]),{history:t,isLoading:r,isError:o}},dn=()=>{const e=W(),{data:t,isLoading:r,fetchStatus:o}=a.useQuery({queryKey:["getDataTopics",e],queryFn:()=>U(exports,null,function*(){if(e)return e.getChatContexts()}),enabled:!!e});return{data:t,isLoading:r,fetchStatus:o}},un=()=>{const e=W(),{data:t,isLoading:r}=a.useQuery({queryKey:["getAllChats",e],queryFn:()=>e==null?void 0:e.ai.chat.getAll(),enabled:!!e});return{data:t!=null?t:[],isLoading:r}},pn=(e,t,r)=>{const o=a.useQueryClient(),i=W(),d=Le({mutationFn:()=>U(exports,null,function*(){if(!(!i||!e))return i.ai.chat.create(e,r)}),onSuccess:()=>o.invalidateQueries(["getAllChats"])});return g.useEffect(()=>{t&&d.isIdle&&d.mutate()},[t,d]),d},hn=(e,t)=>{switch(e.responseType=e.responseType.toLowerCase(),e.responseType){case"nlq":return{content:JSON.stringify(e.data),role:"assistant",type:"nlq"};case"text":case"error":return{content:e.data.answer,role:"assistant"};default:throw Error(`${t}${JSON.stringify(e)}`)}},gn=(e,t)=>{const r=a.useQueryClient(),o=g.useCallback(u=>{e&&r.setQueriesData([Ee,e],C=>C&&[...C,u])},[r,e]),{t:i}=n.useTranslation(),d=W(),{mutate:l,isLoading:h}=Le({mutationFn:u=>U(exports,null,function*(){if(!(!d||!e))return d.ai.chat.post(e,{text:u,options:{enableFollowup:t}})}),onMutate:u=>{o({content:u,role:"user"})},onError:u=>{u instanceof Error&&(console.error("Error when sending message:",u.message),o({content:i(`ai.errors.${u.interpolationOptions.errorCode}`,{defaultValue:i("ai.errors.unexpectedChatResponse")}),role:"assistant"}))},onSuccess:u=>{if(!u)return;const C=i("ai.errors.unknownResponse");o(hn(u,C))}});return{mutate:l,isLoading:h}},Fe=(e,t,r=!1)=>{var y;const{data:o,isLoading:i}=un(),d=en(),l=d.getChatId(e,t)||((y=o.find(m=>{var s;return m.contextTitle===e&&((s=m.contextDetails)==null?void 0:s.dashboardId)===(t==null?void 0:t.dashboardId)}))==null?void 0:y.chatId),{isError:h,data:u,isSuccess:C}=pn(e,r&&!i&&!l,t);return g.useEffect(()=>{C&&u&&!l&&d.saveChatId(u.chatId,e,t)},[u,C,e,t,l,d]),{chatId:l,isLoading:i,isError:h}},ht=e=>g.useMemo(()=>{if(e!=null&&e.length){const t=e[e.length-1];if(Ne(t))return JSON.parse(t.content)}return null},[e]),Ne=e=>!!e&&"type"in e&&e.type==="nlq",Cn=e=>!!e&&"type"in e&&e.type==="text",gt=(e,t)=>{const{t:r}=n.useTranslation(),{enableFollowupQuestions:o}=Q(),{chatId:i,isError:d}=Fe(e,t,!0),[l,h]=g.useState(null),{history:u,isLoading:C,isError:y}=Ie(i);g.useEffect(()=>{d?h(new n.TranslatableError("ai.errors.chatUnavailable")):y&&h(new n.TranslatableError("ai.errors.fetchHistory"))},[d,y,r]);const{mutate:m,isLoading:s}=gn(i,o),p=ht(u);return{chatId:i,history:u!=null?u:[],lastNlqResponse:p,sendMessage:m,isAwaitingResponse:s,isLoading:C,lastError:l}},fn=({contextTitle:e,contextDetails:t})=>{const{chatId:r}=Fe(e,t),{history:o}=Ie(r);return ht(o)},xn=({contextTitle:e,contextDetails:t})=>{const{chatId:r}=Fe(e,t),{history:o}=Ie(r);return g.useMemo(()=>{if(o!=null&&o.length){const i=o.slice().reverse().find(Ne);if(i)return JSON.parse(i.content)}return null},[o])},mn=500,yn=500,bn=500,kn=900,vn=n.newStyled("div",{target:"e1ldv6710",label:"ChatFrame"})("box-sizing:border-box;position:relative;display:flex;flex-direction:column;border:1px solid #c6c9ce;border-radius:",({theme:e})=>e.aiChat.borderRadius,";background-color:",({theme:e})=>e.aiChat.backgroundColor,";overflow:hidden;min-width:",mn,"px;min-height:",yn,"px;width:",({width:e})=>e?Ge(e):`${bn}px`,";height:",({height:e})=>e?Ge(e):`${kn}px`,";",({theme:e})=>n.css`
|
|
1
|
+
"use strict";var Qt=Object.defineProperty,Vt=Object.defineProperties;var Ut=Object.getOwnPropertyDescriptors;var pe=Object.getOwnPropertySymbols;var We=Object.prototype.hasOwnProperty,Ze=Object.prototype.propertyIsEnumerable;var qe=(e,t,r)=>t in e?Qt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,S=(e,t)=>{for(var r in t||(t={}))We.call(t,r)&&qe(e,r,t[r]);if(pe)for(var r of pe(t))Ze.call(t,r)&&qe(e,r,t[r]);return e},L=(e,t)=>Vt(e,Ut(t));var ye=(e,t)=>{var r={};for(var o in e)We.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&pe)for(var o of pe(e))t.indexOf(o)<0&&Ze.call(e,o)&&(r[o]=e[o]);return r};var U=(e,t,r)=>new Promise((o,i)=>{var d=u=>{try{h(r.next(u))}catch(C){i(C)}},l=u=>{try{h(r.throw(u))}catch(C){i(C)}},h=u=>u.done?o(u.value):Promise.resolve(u.value).then(d,l);h((r=r.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./use-common-filters-CRgYdKcV.cjs"),n=require("./derive-chart-family-yUBZXP4x.cjs"),g=require("react"),ae=require("./widget-composer-B2r2a9Oh.cjs"),re=require("react/jsx-runtime");function _t(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const q=_t(g);class Kt extends a.Subscribable{constructor(t,r){super(),this.client=t,this.setOptions(r),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const o=this.options;this.options=this.client.defaultMutationOptions(t),a.shallowEqualObjects(o,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),(r=this.currentMutation)==null||r.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.currentMutation)==null||t.removeObserver(this)}}onMutationUpdate(t){this.updateResult();const r={listeners:!0};t.type==="success"?r.onSuccess=!0:t.type==="error"&&(r.onError=!0),this.notify(r)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(t,r){return this.mutateOptions=r,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,L(S({},this.options),{variables:typeof t!="undefined"?t:this.options.variables})),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const t=this.currentMutation?this.currentMutation.state:a.getDefaultState(),r=L(S({},t),{isLoading:t.status==="loading",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset});this.currentResult=r}notify(t){a.notifyManager.batch(()=>{if(this.mutateOptions&&this.hasListeners()){if(t.onSuccess){var r,o,i,d;(r=(o=this.mutateOptions).onSuccess)==null||r.call(o,this.currentResult.data,this.currentResult.variables,this.currentResult.context),(i=(d=this.mutateOptions).onSettled)==null||i.call(d,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)}else if(t.onError){var l,h,u,C;(l=(h=this.mutateOptions).onError)==null||l.call(h,this.currentResult.error,this.currentResult.variables,this.currentResult.context),(u=(C=this.mutateOptions).onSettled)==null||u.call(C,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}}t.listeners&&this.listeners.forEach(({listener:y})=>{y(this.currentResult)})})}}function Le(e,t,r){const o=a.parseMutationArgs(e,t),i=a.useQueryClient({context:o.context}),[d]=q.useState(()=>new Kt(i,o));q.useEffect(()=>{d.setOptions(o)},[d,o]);const l=a.useSyncExternalStore(q.useCallback(u=>d.subscribe(a.notifyManager.batchCalls(u)),[d]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),h=q.useCallback((u,C)=>{d.mutate(u,C).catch(Xt)},[d]);if(l.error&&a.shouldThrowError(d.options.useErrorBoundary,[l.error]))throw l.error;return L(S({},l),{mutate:h,mutateAsync:l.mutate})}function Xt(){}class nt{constructor(t,r=!1){this.volatile=r,this.getChatContexts=()=>U(this,null,function*(){return(yield this.httpClient.get("api/datasources//"))||[]}),this.getNlgInsights=o=>this.httpClient.post("api/v2/ai/nlg/queryResult",o),this.getQueryRecommendations=(o,i)=>this.httpClient.get(`api/v2/ai/recommendations/query/${o}/${i.numOfRecommendations}`),this.getNlqResult=(o,i)=>this.httpClient.post(`api/v2/ai/nlq/query/${o}`,i),this.setLlmConfig=o=>this.httpClient.post("api/v2/settings/ai/llmProvider",o).catch(i=>{console.error("Unable to set llm config",i)}),this.getAllChats=()=>U(this,null,function*(){return this.volatile?[]:this.httpClient.get("api/v2/ai/chats")}),this.getChatById=o=>this.httpClient.get(`api/v2/ai/chats/${o}`),this.createChat=(o,i)=>this.httpClient.post("api/v2/ai/chats",{sourceId:o,volatile:this.volatile,contextDetails:i}),this.postChat=(o,i)=>this.httpClient.post(`api/v2/ai/chats/${o}`,i),this.deleteChatHistory=o=>this.httpClient.delete(`api/v2/ai/chats/${o}/history`),this.sendFeedback=o=>this.httpClient.post("api/v2/ai/feedback",o),this.ai={getNlgInsights:this.getNlgInsights,getNlqResult:this.getNlqResult,getQueryRecommendations:this.getQueryRecommendations,setLlmConfig:this.setLlmConfig,sendFeedback:this.sendFeedback,chat:{getAll:this.getAllChats,getById:this.getChatById,create:this.createChat,post:this.postChat,clearHistory:this.deleteChatHistory}},this.httpClient=t}}const Jt=new a.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1,refetchOnMount:!1}}}),Pe=g.createContext(void 0),W=()=>g.useContext(Pe),Yt=({children:e,volatile:t})=>{const{app:r}=n.useSisenseContext(),o=g.useMemo(()=>r?new nt(r.httpClient,t):void 0,[r,t]);return n.jsx(Pe.Provider,{value:o,children:n.jsx(a.QueryClientProvider,{client:Jt,children:e})})},rt=g.createContext({}),en=()=>g.useContext(rt),ot=({children:e})=>{const[t,r]=g.useState({}),o=g.useCallback((l,h)=>{var u;return`${l}_${(u=h==null?void 0:h.dashboardId)!=null?u:""}`},[]),i=g.useCallback((l,h,u)=>{r(C=>L(S({},C),{[o(h,u)]:l}))},[o]),d=g.useCallback((l,h)=>t[o(l,h)],[t,o]);return n.jsx(rt.Provider,{value:{saveChatId:i,getChatId:d},children:e})};function tn({children:e,volatile:t}){return n.jsx(ot,{children:n.jsx(Yt,{volatile:t,children:e})})}function st(e){var t,r;if("jaql"in e)return e;{const o=n.convertJaqlDataSource(e.dataSource),{filters:i=[],relations:d}=n.getFilterListAndRelationsJaql(e.filters),{metadata:l,filterRelations:h}=n.getJaqlQueryPayload({dataSource:e.dataSource,attributes:(t=e.dimensions)!=null?t:[],measures:(r=e.measures)!=null?r:[],filters:i,filterRelations:d,highlights:[]},!0),u={jaql:{datasource:o,metadata:l,filterRelations:h}};return e.verbosity&&(u.verbosity=e.verbosity),u}}const fe=(e,t=!0)=>{const r=g.useMemo(()=>st(e),[e]),o=W(),{data:i,error:d,isError:l,isLoading:h,isSuccess:u,refetch:C}=a.useQuery({queryKey:["getNlgInsights",r,o],queryFn:()=>o==null?void 0:o.ai.getNlgInsights(r),select:y=>{var m;return(m=y==null?void 0:y.data)==null?void 0:m.answer},enabled:!!o&&t});return{isLoading:h,isError:l,isSuccess:u,data:i,error:d,refetch:g.useCallback(()=>{C()},[C])}},nn=e=>{const o=e,{enabled:t}=o,r=ye(o,["enabled"]);return fe(r,t)},rn=a.withTracking("useGetNlgInsights")(nn),it=["indicator","column","line","table","pie","bar"];function at(e){const{dataSource:t,query:r,chartTypes:o}=e;return{contextTitle:typeof t=="string"?t:t.title,request:{text:r,timezone:"UTC",chartTypes:o!=null?o:[...it]}}}const on=e=>{const{contextTitle:t,request:r}=at(e),o=W(),{isLoading:i,isError:d,isSuccess:l,data:h,error:u,refetch:C}=a.useQuery({queryKey:["getNlqResult",t,r,o],queryFn:()=>o==null?void 0:o.ai.getNlqResult(t,r),enabled:!!o&&e.enabled}),y=h?ae.toWidgetProps(h,{useCustomizedStyleOptions:e.enableAxisTitlesInWidgetProps||!1}):void 0;return{isLoading:i,isError:d,isSuccess:l,data:y,error:u,refetch:g.useCallback(()=>{C()},[C])}},sn=a.withTracking("useGetNlqResult")(on),lt=4,ct=e=>{const{contextTitle:t,count:r,enableAxisTitlesInWidgetProps:o,enabled:i}=e,d=W(),l=r!=null?r:lt,h=(i===void 0||i===!0)&&l>0,{isLoading:u,isError:C,isSuccess:y,data:m,error:s,refetch:p}=a.useQuery({queryKey:["getQueryRecommendations",t,l,d],queryFn:()=>d==null?void 0:d.ai.getQueryRecommendations(t,{numOfRecommendations:l}),enabled:!!d&&h}),c=g.useMemo(()=>m==null?void 0:m.map(x=>L(S({},x),{widgetProps:x.jaql?ae.toWidgetProps(x,{useCustomizedStyleOptions:o}):void 0})),[m,o]);return{isLoading:h?u:!1,isError:C,isSuccess:y,data:c!=null?c:void 0,error:s,refetch:g.useCallback(()=>{p()},[p])}},an=a.withTracking("useGetQueryRecommendations")(ct),dt=Object.freeze({enableFollowupQuestions:!1,enableHeader:!0,enableInsights:!0,numOfRecommendations:4,numOfRecentPrompts:5}),ut=g.createContext(S({},dt)),Q=()=>g.useContext(ut),ln=({children:e,value:t})=>{const{t:r}=n.useTranslation(),o=Object.entries(t).reduce((i,[d,l])=>(l!==void 0&&(i[d]=l),i),L(S({},dt),{inputPromptText:r("ai.config.inputPromptText"),welcomeText:r("ai.config.welcomeText"),suggestionsWelcomeText:r("ai.config.suggestionsWelcomeText")}));return n.jsx(ut.Provider,{value:o,children:e})},Ee="chatHistory",cn=e=>{const t=W(),{hideHistory:r}=Q();return a.useQuery({queryKey:[Ee,e,t],queryFn:()=>U(exports,null,function*(){if(!t||!e)return;if(r)return[];const o=yield t.ai.chat.getById(e);return o==null?void 0:o.chatHistory}),enabled:!!t&&!!e})},pt=e=>{const t=W(),r=a.useQueryClient();return Le({mutationFn:()=>U(exports,null,function*(){if(!(!t||!e))return t.ai.chat.clearHistory(e)}),onError:o=>{console.error("Error when clearing history:",o)},onSettled:()=>{e&&r.setQueriesData([Ee,e],[])}})},Ie=e=>{const{data:t,isLoading:r,isError:o}=cn(e),{mutate:i}=pt(e);return g.useEffect(()=>{o&&i()},[o,i]),{history:t,isLoading:r,isError:o}},dn=()=>{const e=W(),{data:t,isLoading:r,fetchStatus:o}=a.useQuery({queryKey:["getDataTopics",e],queryFn:()=>U(exports,null,function*(){if(e)return e.getChatContexts()}),enabled:!!e});return{data:t,isLoading:r,fetchStatus:o}},un=()=>{const e=W(),{data:t,isLoading:r}=a.useQuery({queryKey:["getAllChats",e],queryFn:()=>e==null?void 0:e.ai.chat.getAll(),enabled:!!e});return{data:t!=null?t:[],isLoading:r}},pn=(e,t,r)=>{const o=a.useQueryClient(),i=W(),d=Le({mutationFn:()=>U(exports,null,function*(){if(!(!i||!e))return i.ai.chat.create(e,r)}),onSuccess:()=>o.invalidateQueries(["getAllChats"])});return g.useEffect(()=>{t&&d.isIdle&&d.mutate()},[t,d]),d},hn=(e,t)=>{switch(e.responseType=e.responseType.toLowerCase(),e.responseType){case"nlq":return{content:JSON.stringify(e.data),role:"assistant",type:"nlq"};case"text":case"error":return{content:e.data.answer,role:"assistant"};default:throw Error(`${t}${JSON.stringify(e)}`)}},gn=(e,t)=>{const r=a.useQueryClient(),o=g.useCallback(u=>{e&&r.setQueriesData([Ee,e],C=>C&&[...C,u])},[r,e]),{t:i}=n.useTranslation(),d=W(),{mutate:l,isLoading:h}=Le({mutationFn:u=>U(exports,null,function*(){if(!(!d||!e))return d.ai.chat.post(e,{text:u,options:{enableFollowup:t}})}),onMutate:u=>{o({content:u,role:"user"})},onError:u=>{u instanceof Error&&(console.error("Error when sending message:",u.message),o({content:i(`ai.errors.${u.interpolationOptions.errorCode}`,{defaultValue:i("ai.errors.unexpectedChatResponse")}),role:"assistant"}))},onSuccess:u=>{if(!u)return;const C=i("ai.errors.unknownResponse");o(hn(u,C))}});return{mutate:l,isLoading:h}},Fe=(e,t,r=!1)=>{var y;const{data:o,isLoading:i}=un(),d=en(),l=d.getChatId(e,t)||((y=o.find(m=>{var s;return m.contextTitle===e&&((s=m.contextDetails)==null?void 0:s.dashboardId)===(t==null?void 0:t.dashboardId)}))==null?void 0:y.chatId),{isError:h,data:u,isSuccess:C}=pn(e,r&&!i&&!l,t);return g.useEffect(()=>{C&&u&&!l&&d.saveChatId(u.chatId,e,t)},[u,C,e,t,l,d]),{chatId:l,isLoading:i,isError:h}},ht=e=>g.useMemo(()=>{if(e!=null&&e.length){const t=e[e.length-1];if(Ne(t))return JSON.parse(t.content)}return null},[e]),Ne=e=>!!e&&"type"in e&&e.type==="nlq",Cn=e=>!!e&&"type"in e&&e.type==="text",gt=(e,t)=>{const{t:r}=n.useTranslation(),{enableFollowupQuestions:o}=Q(),{chatId:i,isError:d}=Fe(e,t,!0),[l,h]=g.useState(null),{history:u,isLoading:C,isError:y}=Ie(i);g.useEffect(()=>{d?h(new n.TranslatableError("ai.errors.chatUnavailable")):y&&h(new n.TranslatableError("ai.errors.fetchHistory"))},[d,y,r]);const{mutate:m,isLoading:s}=gn(i,o),p=ht(u);return{chatId:i,history:u!=null?u:[],lastNlqResponse:p,sendMessage:m,isAwaitingResponse:s,isLoading:C,lastError:l}},fn=({contextTitle:e,contextDetails:t})=>{const{chatId:r}=Fe(e,t),{history:o}=Ie(r);return ht(o)},xn=({contextTitle:e,contextDetails:t})=>{const{chatId:r}=Fe(e,t),{history:o}=Ie(r);return g.useMemo(()=>{if(o!=null&&o.length){const i=o.slice().reverse().find(Ne);if(i)return JSON.parse(i.content)}return null},[o])},mn=500,yn=500,bn=500,kn=900,vn=n.newStyled("div",{target:"e1ldv6710",label:"ChatFrame"})("box-sizing:border-box;position:relative;display:flex;flex-direction:column;border:1px solid #c6c9ce;border-radius:",({theme:e})=>e.aiChat.borderRadius,";background-color:",({theme:e})=>e.aiChat.backgroundColor,";overflow:hidden;min-width:",mn,"px;min-height:",yn,"px;width:",({width:e})=>e?Ge(e):`${bn}px`,";height:",({height:e})=>e?Ge(e):`${kn}px`,";",({theme:e})=>n.css`
|
|
2
2
|
font-size: ${e.aiChat.primaryFontSize[0]};
|
|
3
3
|
line-height: ${e.aiChat.primaryFontSize[1]};
|
|
4
4
|
`," border:",({theme:e})=>e.aiChat.border===!1?"none":e.aiChat.border,";");function Ge(e){return typeof e=="number"?`${e}px`:e}function wn({spin:e}){return n.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",className:`${e?"csdk-animate-spin":""}`,children:[n.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z",fill:"#262E3D",fillOpacity:"0.3"}),n.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20 12C20 16.4183 16.4183 20 12 20C11.2844 20 10.5908 19.906 9.93078 19.7298C9.96227 19.5889 9.97888 19.4423 9.97888 19.2918C9.97888 18.1873 9.08345 17.2918 7.97888 17.2918C6.87431 17.2918 5.97888 18.1873 5.97888 19.2918C5.97888 20.3964 6.87431 21.2918 7.97888 21.2918C8.56576 21.2918 9.0936 21.0391 9.45946 20.6364C10.2652 20.8731 11.1178 21 12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3V4C16.4183 4 20 7.58172 20 12Z",fill:"#22C3C3"})]})}function xe(){return n.jsx("div",{className:"csdk-m-auto","aria-label":"loading spinner",children:n.jsx(wn,{spin:!0})})}function jn({theme:e}){return n.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:n.jsx("path",{d:"M4 14L0 10L24 0L14 24L10 20L8.47667 16.9533L19 6.4L20 4.00001L17.6099 5L7.04354 15.5218L4 14Z",fill:e.aiChat.icons.color})})}function Sn({theme:e}){const t=e.aiChat.icons.color;return n.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"25",height:"25",viewBox:"0 0 25 25",fill:"none",children:[n.jsx("path",{d:"M21.4095 11.1195L12.5644 6.0459C12.3247 5.90841 12.0189 5.99143 11.8816 6.23128L10.764 8.18434C10.6275 8.42284 10.709 8.72678 10.9466 8.86491L19.7108 13.9614C19.9464 14.0984 20.2483 14.0215 20.3897 13.7884L21.5883 11.8125C21.734 11.5723 21.6532 11.2592 21.4095 11.1195Z",fill:t}),n.jsx("path",{d:"M18.7329 8.60735L16.1048 7.07819L19.6668 0.928042C19.8041 0.6909 20.1068 0.608502 20.3454 0.743288L22.156 1.7661C22.3992 1.90347 22.4827 2.21344 22.3414 2.45438L18.7329 8.60735Z",fill:t}),n.jsx("path",{d:"M19.8544 14.9048L10.3563 9.43067C10.2184 9.35116 10.0413 9.39515 9.95275 9.52746C7.03423 13.8862 4.07448 15.2337 3.18167 16.0938C3.09276 16.1794 3.08414 16.3141 3.1538 16.416C3.74961 17.2879 5.10497 18.4425 6.05628 19.2048C6.17328 19.2985 6.34145 19.2903 6.44961 19.1865L9.97994 15.7973L7.69329 20.1066C7.61954 20.2456 7.66674 20.4186 7.80041 20.5017C11.6152 22.8708 14.2978 24.0437 16.9604 24.4472C17.1542 24.4766 17.3191 24.3106 17.3033 24.1152C17.007 20.469 19.0807 16.6112 19.8544 14.9048Z",fill:t})]})}const Tn=n.newStyled("div",{target:"e1q6h1ze0",label:"Section"})("display:flex;flex-direction:column;row-gap:4px;"),Mn=n.newStyled("div",{target:"e1q6h1ze1",label:"SectionHeader"})("font-size:11px;line-height:18px;font-weight:300;color:",({theme:e})=>e.aiChat.dropup.headers.textColor,";cursor:pointer;padding:4px 12px;&:hover{background-color:",({theme:e})=>e.aiChat.dropup.headers.hover.backgroundColor,";}"),Rn=n.newStyled("div",{target:"e1q6h1ze2",label:"DropupItem"})("font-size:",({theme:e})=>e.aiChat.primaryFontSize[0],";line-height:",({theme:e})=>e.aiChat.primaryFontSize[1],";color:",({theme:e})=>e.aiChat.dropup.items.textColor,";cursor:pointer;padding:4px 12px;&:hover{background-color:",({theme:e})=>e.aiChat.dropup.items.hover.backgroundColor,";}");function Ln({title:e,items:t,onSelect:r,alwaysExpanded:o=!1}){const[i,d]=g.useState(!1),{themeSettings:l}=n.useThemeContext();return n.jsxs(Tn,{children:[n.jsx(Mn,{onClick:()=>d(h=>!h),theme:l,children:e.toUpperCase()}),(i||o)&&t.map((h,u)=>n.jsx(Rn,{onClick:()=>r(h),theme:l,children:h},u))]})}const Pn=n.newStyled("div",{target:"e10x5x4a0",label:"PopupContent"})("font-family:",({theme:e})=>e.typography.fontFamily,";font-size:",({theme:e})=>e.aiChat.primaryFontSize[0],";line-height:",({theme:e})=>e.aiChat.primaryFontSize[1],";background-color:",({theme:e})=>e.aiChat.dropup.backgroundColor,";border-radius:",({theme:e})=>e.aiChat.dropup.borderRadius,";box-shadow:",({theme:e})=>e.aiChat.dropup.boxShadow,";padding-top:8px;padding-bottom:8px;display:flex;flex-direction:column;row-gap:4px;"),En=n.newStyled("div",{target:"e10x5x4a1",label:"ErrorMessage"})("font-size:",({theme:e})=>e.aiChat.primaryFontSize[0],";line-height:",({theme:e})=>e.aiChat.primaryFontSize[1],";color:",({theme:e})=>e.aiChat.dropup.items.textColor,";padding:4px 12px;"),Se=e=>e.startsWith("/");function In({recentPrompts:e,suggestions:t,isLoading:r,onSelection:o,anchorEl:i,text:d,recommendationsError:l}){const u=[{title:"/recent searches",items:e,onSelect:o},{title:"/ai recommendations",items:t,onSelect:o}].filter(s=>s.title.slice(0,d.length)===d),{themeSettings:C}=n.useThemeContext(),{t:y}=n.useTranslation(),m=u.length===1;return n.jsx(a.Popper,{open:Se(d)&&u.length>0,anchorEl:i,placement:"top-start",modifiers:[{name:"offset",options:{offset:[0,4]}}],sx:{zIndex:3},children:n.jsxs(Pn,{style:{width:i==null?void 0:i.offsetWidth},theme:C,children:[r&&n.jsx(xe,{}),!r&&!l&&u.map(s=>n.jsx(Ln,L(S({},s),{alwaysExpanded:m}),s.title)),l&&n.jsx(En,{theme:C,children:y("ai.errors.recommendationsNotAvailable")})]})})}function le({title:e,placement:t="top",children:r}){const{themeSettings:o}=n.useThemeContext();return n.jsx(a.Tooltip,{title:e,placement:t,disableInteractive:!0,componentsProps:{tooltip:{sx:{bgcolor:o.aiChat.tooltips.backgroundColor,color:o.aiChat.tooltips.textColor,paddingX:"16px",paddingY:"12px",fontSize:"13px",fontFamily:o.typography.fontFamily,fontWeight:400,borderRadius:"4px",boxShadow:o.aiChat.tooltips.boxShadow}},arrow:{sx:{color:o.aiChat.tooltips.backgroundColor}}},arrow:!0,children:r})}const Fn=500,Nn=n.newStyled("div",{target:"e6iwkw10",label:"ChatInputContainer"})("display:flex;flex-direction:row;align-items:flex-end;justify-content:space-between;background-color:",({theme:e})=>e.aiChat.backgroundColor,";"),Bn=n.newStyled("button",{target:"e6iwkw11",label:"ClearHistoryButton"})("height:34px;background-color:inherit;cursor:pointer;border:none;"),On=n.newStyled("textarea",{target:"e6iwkw12",label:"TextInput"})("font-size:inherit;line-height:inherit;resize:none;overflow-y:auto;box-sizing:border-box;max-height:88px;width:100%;padding-top:7px;padding-bottom:7px;padding-left:16px;padding-right:16px;margin-left:10px;margin-right:10px;border-width:1px;border-color:rgb(38 46 61 / 0.15);border-radius:0.5rem;&:focus{outline:1px solid ",({theme:e})=>e.aiChat.input.focus.outlineColor,";}font-family:inherit;color:",({theme:e})=>e.aiChat.primaryTextColor,";background-color:",({theme:e})=>e.aiChat.input.backgroundColor,";"),Hn=n.newStyled("button",{target:"e6iwkw13",label:"SendMessageButton"})("height:34px;background-color:inherit;border-style:none;color:",({theme:e})=>e.aiChat.primaryTextColor,";",({disabled:e})=>e?n.css`
|
package/dist/ai.js
CHANGED
|
@@ -35,12 +35,12 @@ var ne = (e, t, n) => new Promise((r, a) => {
|
|
|
35
35
|
}, p = (d) => d.done ? r(d.value) : Promise.resolve(d.value).then(c, s);
|
|
36
36
|
p((n = n.apply(e, t)).next());
|
|
37
37
|
});
|
|
38
|
-
import { by as kn, bz as wn, bA as Tt, bB as Sn, bC as xe, bD as Mn, bE as Tn, bF as Ln, bc as Lt, bd as Rt, aQ as he, G as _e, aF as Et, aj as Rn, bG as En, al as In, v as Bn, x as Be, bH as Fn, bI as Nn, aq as de, bJ as It, ar as Hn, A as On, aT as Pn, bK as Dn, B as ge, q as De, bL as gt, P as f, t as $n, aG as Bt, b3 as An, aC as zn, bM as qn, ah as be, J as Wn, bN as Zn, bO as jn, M as Ft, bP as Gn, b6 as Vn, ba as Un } from "./use-common-filters-
|
|
39
|
-
import { P as Qn, t as o, _ as _n, k as Kn,
|
|
38
|
+
import { by as kn, bz as wn, bA as Tt, bB as Sn, bC as xe, bD as Mn, bE as Tn, bF as Ln, bc as Lt, bd as Rt, aQ as he, G as _e, aF as Et, aj as Rn, bG as En, al as In, v as Bn, x as Be, bH as Fn, bI as Nn, aq as de, bJ as It, ar as Hn, A as On, aT as Pn, bK as Dn, B as ge, q as De, bL as gt, P as f, t as $n, aG as Bt, b3 as An, aC as zn, bM as qn, ah as be, J as Wn, bN as Zn, bO as jn, M as Ft, bP as Gn, b6 as Vn, ba as Un } from "./use-common-filters-B1RKY2KD.js";
|
|
39
|
+
import { P as Qn, t as o, _ as _n, k as Kn, c7 as Jn, R as O, T as Ze, aZ as v, bb as $, a7 as w, U as L, F as G, a4 as Nt, aD as je, aI as Xn, c8 as Yn, c9 as er, a2 as tr, a3 as nr, n as rr } from "./derive-chart-family-BPYK8evJ.js";
|
|
40
40
|
import * as K from "react";
|
|
41
41
|
import { createContext as Ke, useContext as Je, useMemo as Z, useState as D, useCallback as H, useEffect as ve, useRef as ue, useLayoutEffect as Ee, memo as or, forwardRef as ir } from "react";
|
|
42
|
-
import { t as Fe } from "./widget-composer-
|
|
43
|
-
import { w as X1 } from "./widget-composer-
|
|
42
|
+
import { t as Fe } from "./widget-composer-I9gUFBZt.js";
|
|
43
|
+
import { w as X1 } from "./widget-composer-I9gUFBZt.js";
|
|
44
44
|
import { jsx as Ce } from "react/jsx-runtime";
|
|
45
45
|
class ar extends kn {
|
|
46
46
|
constructor(t, n) {
|