@sisense/sdk-ui 1.16.0 → 1.17.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 (65) hide show
  1. package/dist/ai.cjs +1 -1
  2. package/dist/ai.js +28 -28
  3. package/dist/analytics-composer.cjs +1 -1
  4. package/dist/analytics-composer.js +1 -1
  5. package/dist/app/client-application.d.ts +22 -2
  6. package/dist/chart-data/types.d.ts +1 -1
  7. package/dist/chart-data-options/types.d.ts +4 -2
  8. package/dist/chart-data-processor/table-processor.d.ts +1 -1
  9. package/dist/chart-options-processor/common-highcharts-option-service.d.ts +2 -1
  10. package/dist/charts/map-charts/scattermap/utils/map.d.ts +6 -2
  11. package/dist/charts/map-charts/scattermap/utils/markers.d.ts +1 -1
  12. package/dist/charts/table/data-table-wrapper.d.ts +1 -1
  13. package/dist/charts/table/helpers/calc-column-widths.d.ts +1 -1
  14. package/dist/charts/table/types.d.ts +0 -1
  15. package/dist/common/components/loading-indicator.d.ts +13 -0
  16. package/dist/common/hooks/use-has-changed.d.ts +1 -1
  17. package/dist/common/hooks/use-tracking.d.ts +7 -0
  18. package/dist/common-filters/selection-utils.d.ts +1 -1
  19. package/dist/common-filters/types.d.ts +9 -3
  20. package/dist/common-filters/utils.d.ts +0 -4
  21. package/dist/dashboard/dashboard-by-id.d.ts +6 -3
  22. package/dist/dashboard/dashboard.d.ts +6 -4
  23. package/dist/dashboard/index.d.ts +1 -1
  24. package/dist/dashboard/types.d.ts +11 -6
  25. package/dist/dashboard-widget/translate-widget-drilldown-options.d.ts +2 -2
  26. package/dist/dashboard-widget/types.d.ts +3 -0
  27. package/dist/decorators/component-decorators/with-tracking/error-tracker.d.ts +3 -0
  28. package/dist/filters/components/filters-panel/filters-panel.d.ts +2 -1
  29. package/dist/get-widget-options-D4UHj7o5.cjs +198 -0
  30. package/dist/get-widget-options-D88MkBTJ.js +37924 -0
  31. package/dist/index.cjs +181 -207
  32. package/dist/index.d.ts +3 -3
  33. package/dist/index.js +20411 -24315
  34. package/dist/models/dashboard/get-dashboard-model.d.ts +1 -1
  35. package/dist/models/dashboard/types.d.ts +17 -3
  36. package/dist/models/widget/get-widget-model.d.ts +1 -1
  37. package/dist/models/widget/translate-widget.d.ts +1 -0
  38. package/dist/pivot-table/helpers/prepare-pivot-styling-props.d.ts +16 -15
  39. package/dist/pivot-table/{use-apply-pivot-table-formatting.d.ts → hooks/use-apply-pivot-table-formatting.d.ts} +1 -1
  40. package/dist/pivot-table/{use-get-pivot-table-query.d.ts → hooks/use-get-pivot-table-query.d.ts} +2 -2
  41. package/dist/pivot-table/hooks/use-pivot-data-loading.d.ts +15 -0
  42. package/dist/pivot-table/hooks/use-pivot-data-service.d.ts +10 -0
  43. package/dist/pivot-table/{use-pivot-table-data-options-internal.d.ts → hooks/use-pivot-table-data-options-internal.d.ts} +2 -2
  44. package/dist/pivot-table/hooks/use-render-pivot.d.ts +24 -0
  45. package/dist/pivot-table/pivot-table.d.ts +2 -2
  46. package/dist/props.d.ts +32 -5
  47. package/dist/sisense-context/sisense-context.d.ts +2 -0
  48. package/dist/theme-provider/default-theme-settings.d.ts +2 -0
  49. package/dist/types.d.ts +38 -0
  50. package/dist/{useQuery-DeK1uDeJ.js → useQuery-C6PPvTP0.js} +11776 -11315
  51. package/dist/useQuery-ChZNmTT3.cjs +433 -0
  52. package/dist/utils/color/color-interpolation.d.ts +9 -0
  53. package/dist/utils/combine-handlers.d.ts +3 -0
  54. package/dist/utils/filters.d.ts +13 -1
  55. package/dist/widgets/common/drilldown-connector.d.ts +19 -0
  56. package/dist/widgets/common/{custom-drilldown.d.ts → use-drilldown.d.ts} +7 -3
  57. package/dist/widgets/use-highlight-selection.d.ts +10 -0
  58. package/package.json +7 -8
  59. package/dist/filters/utils.d.ts +0 -8
  60. package/dist/get-widget-options-D008Wku-.cjs +0 -172
  61. package/dist/get-widget-options-Xskksk4X.js +0 -34154
  62. package/dist/useQuery-aWnvBOTu.cjs +0 -433
  63. package/dist/widgets/chart-widget-deprecated.d.ts +0 -30
  64. package/dist/widgets/common/drilldown.d.ts +0 -25
  65. package/dist/widgets/common/use-widget-drilldown.d.ts +0 -2
package/dist/ai.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var Ne=Object.defineProperty,Ie=Object.defineProperties;var Oe=Object.getOwnPropertyDescriptors;var Z=Object.getOwnPropertySymbols;var de=Object.prototype.hasOwnProperty,ue=Object.prototype.propertyIsEnumerable;var X=(e,t,o)=>t in e?Ne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,w=(e,t)=>{for(var o in t||(t={}))de.call(t,o)&&X(e,o,t[o]);if(Z)for(var o of Z(t))ue.call(t,o)&&X(e,o,t[o]);return e},M=(e,t)=>Ie(e,Oe(t));var he=(e,t)=>{var o={};for(var s in e)de.call(e,s)&&t.indexOf(s)<0&&(o[s]=e[s]);if(e!=null&&Z)for(var s of Z(e))t.indexOf(s)<0&&ue.call(e,s)&&(o[s]=e[s]);return o};var S=(e,t,o)=>(X(e,typeof t!="symbol"?t+"":t,o),o);var I=(e,t,o)=>new Promise((s,i)=>{var a=d=>{try{u(o.next(d))}catch(h){i(h)}},l=d=>{try{u(o.throw(d))}catch(h){i(h)}},u=d=>d.done?s(d.value):Promise.resolve(d.value).then(a,l);u((o=o.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./useQuery-aWnvBOTu.cjs"),n=require("react/jsx-runtime"),c=require("react"),k=require("./get-widget-options-D008Wku-.cjs");function We(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const s=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,s.get?s:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const B=We(c);class Ae extends r.Subscribable{constructor(t,o){super(),this.client=t,this.setOptions(o),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var o;const s=this.options;this.options=this.client.defaultMutationOptions(t),r.shallowEqualObjects(s,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),(o=this.currentMutation)==null||o.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.currentMutation)==null||t.removeObserver(this)}}onMutationUpdate(t){this.updateResult();const o={listeners:!0};t.type==="success"?o.onSuccess=!0:t.type==="error"&&(o.onError=!0),this.notify(o)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(t,o){return this.mutateOptions=o,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,M(w({},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:r.getDefaultState(),o=M(w({},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=o}notify(t){r.notifyManager.batch(()=>{if(this.mutateOptions&&this.hasListeners()){if(t.onSuccess){var o,s,i,a;(o=(s=this.mutateOptions).onSuccess)==null||o.call(s,this.currentResult.data,this.currentResult.variables,this.currentResult.context),(i=(a=this.mutateOptions).onSettled)==null||i.call(a,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)}else if(t.onError){var l,u,d,h;(l=(u=this.mutateOptions).onError)==null||l.call(u,this.currentResult.error,this.currentResult.variables,this.currentResult.context),(d=(h=this.mutateOptions).onSettled)==null||d.call(h,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}}t.listeners&&this.listeners.forEach(({listener:g})=>{g(this.currentResult)})})}}function oe(e,t,o){const s=r.parseMutationArgs(e,t),i=r.useQueryClient({context:s.context}),[a]=B.useState(()=>new Ae(i,s));B.useEffect(()=>{a.setOptions(s)},[a,s]);const l=r.useSyncExternalStore(B.useCallback(d=>a.subscribe(r.notifyManager.batchCalls(d)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),u=B.useCallback((d,h)=>{a.mutate(d,h).catch(qe)},[a]);if(l.error&&r.shouldThrowError(a.options.useErrorBoundary,[l.error]))throw l.error;return M(w({},l),{mutate:u,mutateAsync:l.mutate})}function qe(){}class ze{constructor(t){S(this,"httpClient");S(this,"getChatContexts",()=>I(this,null,function*(){return(yield this.httpClient.get("api/datasources?sharedWith=r,w"))||[]}));S(this,"getNlgQueryResult",t=>this.httpClient.post("api/v2/ai/nlg/queryResult",t));S(this,"getQueryRecommendations",(t,o)=>this.httpClient.get(`api/v2/ai/recommendations/query/${t}/${o.numOfRecommendations}`));S(this,"setLlmConfig",t=>this.httpClient.post("api/v2/settings/ai/llmProvider",t).catch(o=>{console.error("Unable to set llm config",o)}));S(this,"getAllChats",()=>this.httpClient.get("api/v2/ai/chats"));S(this,"getChatById",t=>this.httpClient.get(`api/v2/ai/chats/${t}`));S(this,"createChat",t=>this.httpClient.post("api/v2/ai/chats",{sourceId:t}));S(this,"postChat",(t,o)=>this.httpClient.post(`api/v2/ai/chats/${t}`,o));S(this,"deleteChatHistory",t=>this.httpClient.delete(`api/v2/ai/chats/${t}/history`));S(this,"sendFeedback",t=>this.httpClient.post("api/v2/ai/feedback",t));S(this,"getDataSourceFields",t=>this.httpClient.post(`api/datasources/${encodeURIComponent(t)}/fields/search`,{offset:0,count:9999}));S(this,"ai",{getNlgQueryResult:this.getNlgQueryResult,getQueryRecommendations:this.getQueryRecommendations,setLlmConfig:this.setLlmConfig,sendFeedback:this.sendFeedback,getDataSourceFields:this.getDataSourceFields,chat:{getAll:this.getAllChats,getById:this.getChatById,create:this.createChat,post:this.postChat,clearHistory:this.deleteChatHistory}});this.httpClient=t}}const Qe=new r.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1,refetchOnMount:!1}}}),fe=c.createContext(void 0),H=()=>c.useContext(fe),Ve=({children:e})=>{const{app:t}=r.useSisenseContext(),o=c.useMemo(()=>t?new ze(t.httpClient):void 0,[t]);return n.jsx(fe.Provider,{value:o,children:n.jsx(r.QueryClientProvider,{client:Qe,children:e})})};function Ze({children:e}){return n.jsx(Ve,{children:e})}const re=(e,t=!0)=>{const o=c.useMemo(()=>{var g,p;if("jaql"in e)return e;{let C;k.isDataSourceInfo(e.dataSource)?C={title:e.dataSource.title,live:e.dataSource.type==="live"}:C=e.dataSource;const{filters:v=[],relations:y}=k.getFilterListAndRelations(e.filters),{metadata:x,filterRelations:f}=r.getJaqlQueryPayload({dataSource:e.dataSource,attributes:(g=e.dimensions)!=null?g:[],measures:(p=e.measures)!=null?p:[],filters:v,filterRelations:y,highlights:[]},!0);return{jaql:{datasource:C,metadata:x,filterRelations:f}}}},[e]),s=H(),{data:i,error:a,isError:l,isLoading:u,isSuccess:d,refetch:h}=r.useQuery({queryKey:["getNlgQueryResult",o,s],queryFn:()=>s==null?void 0:s.ai.getNlgQueryResult(o),select:g=>{var p;return(p=g==null?void 0:g.data)==null?void 0:p.answer},enabled:!!s&&t});return{isLoading:u,isError:l,isSuccess:d,data:i,error:a,refetch:c.useCallback(()=>{h()},[h])}},Ge=e=>{const s=e,{enabled:t}=s,o=he(s,["enabled"]);return re(o,t)},_e=r.withTracking("useGetNlgQueryResult")(Ge),me=Object.freeze({enableFollowupQuestions:!1,enableHeader:!0,enableInsights:!0,numOfRecommendations:4,numOfRecentPrompts:5,inputPromptText:'Ask a question or type "/" for ideas',welcomeText:"Welcome to the Analytics Assistant! I can help you explore and gain insights from your data.",suggestionsWelcomeText:"Some questions you may have:"}),be=c.createContext(w({},me)),P=()=>c.useContext(be),Ue=({children:e,value:t})=>{const o=Object.entries(t).reduce((s,[i,a])=>(a!==void 0&&(s[i]=a),s),w({},me));return n.jsx(be.Provider,{value:o,children:e})},ye=e=>{const{contextTitle:t,count:o}=e,s=H(),{numOfRecommendations:i}=P(),a=o!=null?o:i,{isLoading:l,isError:u,isSuccess:d,data:h,error:g,refetch:p}=r.useQuery({queryKey:["getQueryRecommendations",t,a,s],queryFn:()=>s==null?void 0:s.ai.getQueryRecommendations(t,{numOfRecommendations:a}),enabled:!!s});return{isLoading:l,isError:u,isSuccess:d,data:h!=null?h:[],error:g,refetch:c.useCallback(()=>{p()},[p])}},Ke=r.withTracking("useGetQueryRecommendations")(ye),se="Oh snap, something went wrong. Please try again later.",Ye="Oh snap, something went wrong. Please try again later or try asking a different question.",Je="Something went wrong and we were unable to retrieve the chat thread. Let's start over!",ve="Chat unavailable. Please try again later.",ie="chatHistory",Xe=e=>{const t=H(),{hideHistory:o}=P();return r.useQuery({queryKey:[ie,e,t],queryFn:()=>I(exports,null,function*(){if(!t||!e)return;if(o)return[];const s=yield t.ai.chat.getById(e);return s==null?void 0:s.chatHistory}),enabled:!!t&&!!e})},we=e=>{const t=H(),o=r.useQueryClient();return oe({mutationFn:()=>I(exports,null,function*(){if(!(!t||!e))return t.ai.chat.clearHistory(e)}),onError:s=>{console.error("Error when clearing history:",s)},onSettled:()=>{e&&o.setQueriesData([ie,e],[])}})},ke=e=>{const{data:t,isLoading:o,isError:s}=Xe(e),{mutate:i}=we(e);return c.useEffect(()=>{s&&i()},[s,i]),{history:t,isLoading:o,isError:s}},je=()=>{const e=H(),{data:t,isLoading:o,fetchStatus:s}=r.useQuery({queryKey:["getDataTopics",e],queryFn:()=>I(exports,null,function*(){if(e)return e.getChatContexts()}),enabled:!!e});return{data:t,isLoading:o,fetchStatus:s}},Se=()=>{const e=H(),{data:t,isLoading:o}=r.useQuery({queryKey:["getAllChats",e],queryFn:()=>e==null?void 0:e.ai.chat.getAll(),enabled:!!e});return{data:t!=null?t:[],isLoading:o}},et=(e,t)=>{const o=r.useQueryClient(),s=H(),i=oe({mutationFn:()=>I(exports,null,function*(){if(!(!s||!e))return s.ai.chat.create(e)}),onSuccess:()=>o.invalidateQueries(["getAllChats"])});return c.useEffect(()=>{t&&i.isIdle&&i.mutate()},[t,i]),i},tt=e=>{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(`Received unknown responseType, raw response=${JSON.stringify(e)}`)}},nt=e=>{const t=r.useQueryClient(),o=c.useCallback(u=>{e&&t.setQueriesData([ie,e],d=>d&&[...d,u])},[t,e]),{enableFollowupQuestions:s}=P(),i=H(),{mutate:a,isLoading:l}=oe({mutationFn:u=>I(exports,null,function*(){if(!(!i||!e))return i.ai.chat.post(e,{text:u,options:{enableFollowup:s}})}),onMutate:u=>{o({content:u,role:"user"})},onError:u=>{u instanceof Error&&(console.error("Error when sending message:",u.message),o({content:Ye,role:"assistant"}))},onSuccess:u=>{u&&o(tt(u))}});return{mutate:a,isLoading:l}},ae=e=>!!e&&"type"in e&&e.type==="nlq",Te=e=>{var T,L;const{data:t,isLoading:o}=je(),{data:s,isLoading:i}=Se(),a=(T=t==null?void 0:t.find(j=>j.title===e))==null?void 0:T.title,l=(L=s.find(j=>j.contextTitle===a))==null?void 0:L.chatId,u=o||!!a,d=i||!!l,[h,g]=c.useState(null),{isError:p}=et(a,u&&!d),{history:C,isLoading:v,isError:y}=ke(l);c.useEffect(()=>{p?g(new Error(ve)):y&&g(new Error(Je))},[p,y]);const{mutate:x,isLoading:f}=nt(l),m=c.useMemo(()=>{if(C!=null&&C.length){const j=C[C.length-1];if(ae(j))return JSON.parse(j.content)}return null},[C]);return{chatId:l,history:C!=null?C:[],lastNlqResponse:m,sendMessage:x,isAwaitingResponse:f,isLoading:v,lastError:h}},ot=({contextTitle:e})=>{var i;const{data:t}=Se(),o=(i=t.find(a=>a.contextTitle===e))==null?void 0:i.chatId,{history:s}=ke(o);return c.useMemo(()=>{if(s!=null&&s.length){const a=s[s.length-1];if(ae(a))return JSON.parse(a.content)}return null},[s])},rt=e=>{const t=H(),{data:o,isLoading:s}=r.useQuery({queryKey:["getDataSourceFields",e,t],queryFn:()=>e?t==null?void 0:t.ai.getDataSourceFields(e):void 0,select:i=>i,enabled:!!t&&!!e});return{data:o,isLoading:s}},st=500,it=500,at=500,lt=900,ct=r.newStyled.div`
1
+ "use strict";var Ne=Object.defineProperty,Ie=Object.defineProperties;var Oe=Object.getOwnPropertyDescriptors;var Z=Object.getOwnPropertySymbols;var de=Object.prototype.hasOwnProperty,ue=Object.prototype.propertyIsEnumerable;var X=(e,t,o)=>t in e?Ne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,w=(e,t)=>{for(var o in t||(t={}))de.call(t,o)&&X(e,o,t[o]);if(Z)for(var o of Z(t))ue.call(t,o)&&X(e,o,t[o]);return e},M=(e,t)=>Ie(e,Oe(t));var he=(e,t)=>{var o={};for(var s in e)de.call(e,s)&&t.indexOf(s)<0&&(o[s]=e[s]);if(e!=null&&Z)for(var s of Z(e))t.indexOf(s)<0&&ue.call(e,s)&&(o[s]=e[s]);return o};var S=(e,t,o)=>(X(e,typeof t!="symbol"?t+"":t,o),o);var I=(e,t,o)=>new Promise((s,i)=>{var a=d=>{try{u(o.next(d))}catch(h){i(h)}},l=d=>{try{u(o.throw(d))}catch(h){i(h)}},u=d=>d.done?s(d.value):Promise.resolve(d.value).then(a,l);u((o=o.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./useQuery-ChZNmTT3.cjs"),n=require("react/jsx-runtime"),c=require("react"),k=require("./get-widget-options-D4UHj7o5.cjs");function We(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const s=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,s.get?s:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const B=We(c);class Ae extends r.Subscribable{constructor(t,o){super(),this.client=t,this.setOptions(o),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var o;const s=this.options;this.options=this.client.defaultMutationOptions(t),r.shallowEqualObjects(s,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),(o=this.currentMutation)==null||o.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.currentMutation)==null||t.removeObserver(this)}}onMutationUpdate(t){this.updateResult();const o={listeners:!0};t.type==="success"?o.onSuccess=!0:t.type==="error"&&(o.onError=!0),this.notify(o)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(t,o){return this.mutateOptions=o,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,M(w({},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:r.getDefaultState(),o=M(w({},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=o}notify(t){r.notifyManager.batch(()=>{if(this.mutateOptions&&this.hasListeners()){if(t.onSuccess){var o,s,i,a;(o=(s=this.mutateOptions).onSuccess)==null||o.call(s,this.currentResult.data,this.currentResult.variables,this.currentResult.context),(i=(a=this.mutateOptions).onSettled)==null||i.call(a,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)}else if(t.onError){var l,u,d,h;(l=(u=this.mutateOptions).onError)==null||l.call(u,this.currentResult.error,this.currentResult.variables,this.currentResult.context),(d=(h=this.mutateOptions).onSettled)==null||d.call(h,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}}t.listeners&&this.listeners.forEach(({listener:g})=>{g(this.currentResult)})})}}function oe(e,t,o){const s=r.parseMutationArgs(e,t),i=r.useQueryClient({context:s.context}),[a]=B.useState(()=>new Ae(i,s));B.useEffect(()=>{a.setOptions(s)},[a,s]);const l=r.useSyncExternalStore(B.useCallback(d=>a.subscribe(r.notifyManager.batchCalls(d)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),u=B.useCallback((d,h)=>{a.mutate(d,h).catch(qe)},[a]);if(l.error&&r.shouldThrowError(a.options.useErrorBoundary,[l.error]))throw l.error;return M(w({},l),{mutate:u,mutateAsync:l.mutate})}function qe(){}class ze{constructor(t){S(this,"httpClient");S(this,"getChatContexts",()=>I(this,null,function*(){return(yield this.httpClient.get("api/datasources?sharedWith=r,w"))||[]}));S(this,"getNlgQueryResult",t=>this.httpClient.post("api/v2/ai/nlg/queryResult",t));S(this,"getQueryRecommendations",(t,o)=>this.httpClient.get(`api/v2/ai/recommendations/query/${t}/${o.numOfRecommendations}`));S(this,"setLlmConfig",t=>this.httpClient.post("api/v2/settings/ai/llmProvider",t).catch(o=>{console.error("Unable to set llm config",o)}));S(this,"getAllChats",()=>this.httpClient.get("api/v2/ai/chats"));S(this,"getChatById",t=>this.httpClient.get(`api/v2/ai/chats/${t}`));S(this,"createChat",t=>this.httpClient.post("api/v2/ai/chats",{sourceId:t}));S(this,"postChat",(t,o)=>this.httpClient.post(`api/v2/ai/chats/${t}`,o));S(this,"deleteChatHistory",t=>this.httpClient.delete(`api/v2/ai/chats/${t}/history`));S(this,"sendFeedback",t=>this.httpClient.post("api/v2/ai/feedback",t));S(this,"getDataSourceFields",t=>this.httpClient.post(`api/datasources/${encodeURIComponent(t)}/fields/search`,{offset:0,count:9999}));S(this,"ai",{getNlgQueryResult:this.getNlgQueryResult,getQueryRecommendations:this.getQueryRecommendations,setLlmConfig:this.setLlmConfig,sendFeedback:this.sendFeedback,getDataSourceFields:this.getDataSourceFields,chat:{getAll:this.getAllChats,getById:this.getChatById,create:this.createChat,post:this.postChat,clearHistory:this.deleteChatHistory}});this.httpClient=t}}const Qe=new r.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1,refetchOnMount:!1}}}),fe=c.createContext(void 0),H=()=>c.useContext(fe),Ve=({children:e})=>{const{app:t}=r.useSisenseContext(),o=c.useMemo(()=>t?new ze(t.httpClient):void 0,[t]);return n.jsx(fe.Provider,{value:o,children:n.jsx(r.QueryClientProvider,{client:Qe,children:e})})};function Ze({children:e}){return n.jsx(Ve,{children:e})}const re=(e,t=!0)=>{const o=c.useMemo(()=>{var g,p;if("jaql"in e)return e;{let C;k.isDataSourceInfo(e.dataSource)?C={title:e.dataSource.title,live:e.dataSource.type==="live"}:C=e.dataSource;const{filters:v=[],relations:y}=k.getFilterListAndRelations(e.filters),{metadata:x,filterRelations:f}=r.getJaqlQueryPayload({dataSource:e.dataSource,attributes:(g=e.dimensions)!=null?g:[],measures:(p=e.measures)!=null?p:[],filters:v,filterRelations:y,highlights:[]},!0);return{jaql:{datasource:C,metadata:x,filterRelations:f}}}},[e]),s=H(),{data:i,error:a,isError:l,isLoading:u,isSuccess:d,refetch:h}=r.useQuery({queryKey:["getNlgQueryResult",o,s],queryFn:()=>s==null?void 0:s.ai.getNlgQueryResult(o),select:g=>{var p;return(p=g==null?void 0:g.data)==null?void 0:p.answer},enabled:!!s&&t});return{isLoading:u,isError:l,isSuccess:d,data:i,error:a,refetch:c.useCallback(()=>{h()},[h])}},Ge=e=>{const s=e,{enabled:t}=s,o=he(s,["enabled"]);return re(o,t)},_e=r.withTracking("useGetNlgQueryResult")(Ge),me=Object.freeze({enableFollowupQuestions:!1,enableHeader:!0,enableInsights:!0,numOfRecommendations:4,numOfRecentPrompts:5,inputPromptText:'Ask a question or type "/" for ideas',welcomeText:"Welcome to the Analytics Assistant! I can help you explore and gain insights from your data.",suggestionsWelcomeText:"Some questions you may have:"}),be=c.createContext(w({},me)),P=()=>c.useContext(be),Ue=({children:e,value:t})=>{const o=Object.entries(t).reduce((s,[i,a])=>(a!==void 0&&(s[i]=a),s),w({},me));return n.jsx(be.Provider,{value:o,children:e})},ye=e=>{const{contextTitle:t,count:o}=e,s=H(),{numOfRecommendations:i}=P(),a=o!=null?o:i,{isLoading:l,isError:u,isSuccess:d,data:h,error:g,refetch:p}=r.useQuery({queryKey:["getQueryRecommendations",t,a,s],queryFn:()=>s==null?void 0:s.ai.getQueryRecommendations(t,{numOfRecommendations:a}),enabled:!!s});return{isLoading:l,isError:u,isSuccess:d,data:h!=null?h:[],error:g,refetch:c.useCallback(()=>{p()},[p])}},Ke=r.withTracking("useGetQueryRecommendations")(ye),se="Oh snap, something went wrong. Please try again later.",Ye="Oh snap, something went wrong. Please try again later or try asking a different question.",Je="Something went wrong and we were unable to retrieve the chat thread. Let's start over!",ve="Chat unavailable. Please try again later.",ie="chatHistory",Xe=e=>{const t=H(),{hideHistory:o}=P();return r.useQuery({queryKey:[ie,e,t],queryFn:()=>I(exports,null,function*(){if(!t||!e)return;if(o)return[];const s=yield t.ai.chat.getById(e);return s==null?void 0:s.chatHistory}),enabled:!!t&&!!e})},we=e=>{const t=H(),o=r.useQueryClient();return oe({mutationFn:()=>I(exports,null,function*(){if(!(!t||!e))return t.ai.chat.clearHistory(e)}),onError:s=>{console.error("Error when clearing history:",s)},onSettled:()=>{e&&o.setQueriesData([ie,e],[])}})},ke=e=>{const{data:t,isLoading:o,isError:s}=Xe(e),{mutate:i}=we(e);return c.useEffect(()=>{s&&i()},[s,i]),{history:t,isLoading:o,isError:s}},je=()=>{const e=H(),{data:t,isLoading:o,fetchStatus:s}=r.useQuery({queryKey:["getDataTopics",e],queryFn:()=>I(exports,null,function*(){if(e)return e.getChatContexts()}),enabled:!!e});return{data:t,isLoading:o,fetchStatus:s}},Se=()=>{const e=H(),{data:t,isLoading:o}=r.useQuery({queryKey:["getAllChats",e],queryFn:()=>e==null?void 0:e.ai.chat.getAll(),enabled:!!e});return{data:t!=null?t:[],isLoading:o}},et=(e,t)=>{const o=r.useQueryClient(),s=H(),i=oe({mutationFn:()=>I(exports,null,function*(){if(!(!s||!e))return s.ai.chat.create(e)}),onSuccess:()=>o.invalidateQueries(["getAllChats"])});return c.useEffect(()=>{t&&i.isIdle&&i.mutate()},[t,i]),i},tt=e=>{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(`Received unknown responseType, raw response=${JSON.stringify(e)}`)}},nt=e=>{const t=r.useQueryClient(),o=c.useCallback(u=>{e&&t.setQueriesData([ie,e],d=>d&&[...d,u])},[t,e]),{enableFollowupQuestions:s}=P(),i=H(),{mutate:a,isLoading:l}=oe({mutationFn:u=>I(exports,null,function*(){if(!(!i||!e))return i.ai.chat.post(e,{text:u,options:{enableFollowup:s}})}),onMutate:u=>{o({content:u,role:"user"})},onError:u=>{u instanceof Error&&(console.error("Error when sending message:",u.message),o({content:Ye,role:"assistant"}))},onSuccess:u=>{u&&o(tt(u))}});return{mutate:a,isLoading:l}},ae=e=>!!e&&"type"in e&&e.type==="nlq",Te=e=>{var T,L;const{data:t,isLoading:o}=je(),{data:s,isLoading:i}=Se(),a=(T=t==null?void 0:t.find(j=>j.title===e))==null?void 0:T.title,l=(L=s.find(j=>j.contextTitle===a))==null?void 0:L.chatId,u=o||!!a,d=i||!!l,[h,g]=c.useState(null),{isError:p}=et(a,u&&!d),{history:C,isLoading:v,isError:y}=ke(l);c.useEffect(()=>{p?g(new Error(ve)):y&&g(new Error(Je))},[p,y]);const{mutate:x,isLoading:f}=nt(l),m=c.useMemo(()=>{if(C!=null&&C.length){const j=C[C.length-1];if(ae(j))return JSON.parse(j.content)}return null},[C]);return{chatId:l,history:C!=null?C:[],lastNlqResponse:m,sendMessage:x,isAwaitingResponse:f,isLoading:v,lastError:h}},ot=({contextTitle:e})=>{var i;const{data:t}=Se(),o=(i=t.find(a=>a.contextTitle===e))==null?void 0:i.chatId,{history:s}=ke(o);return c.useMemo(()=>{if(s!=null&&s.length){const a=s[s.length-1];if(ae(a))return JSON.parse(a.content)}return null},[s])},rt=e=>{const t=H(),{data:o,isLoading:s}=r.useQuery({queryKey:["getDataSourceFields",e,t],queryFn:()=>e?t==null?void 0:t.ai.getDataSourceFields(e):void 0,select:i=>i,enabled:!!t&&!!e});return{data:o,isLoading:s}},st=500,it=500,at=500,lt=900,ct=r.newStyled.div`
2
2
  box-sizing: border-box;
3
3
  position: relative;
4
4
  display: flex;
package/dist/ai.js CHANGED
@@ -36,12 +36,12 @@ var Z = (e, t, n) => new Promise((r, i) => {
36
36
  }, c = (l) => l.done ? r(l.value) : Promise.resolve(l.value).then(s, a);
37
37
  c((n = n.apply(e, t)).next());
38
38
  });
39
- import { aP as ht, aQ as pt, aR as Ie, aS as gt, aT as K, aU as Ct, aV as ft, aW as mt, aw as bt, m as xt, ax as yt, g as vt, aI as _, w as Oe, n as u, c as L, o as b, ak as We, U as wt, aX as kt, Y as St, X as Rt, Z as ae, aY as Lt, aZ as Mt, a7 as j, a0 as Q, a_ as Pe, a9 as $t, a$ as Et, a2 as Tt, b0 as Ht, a4 as ge, a5 as g, a8 as Bt, b1 as Dt, b2 as Ae, b3 as Ft, ai as Nt, K as Te, M as He, am as It, E as qe } from "./useQuery-DeK1uDeJ.js";
39
+ import { aW as ht, aX as pt, aY as Ie, aZ as gt, a_ as K, a$ as Ct, b0 as ft, b1 as mt, aD as bt, l as xt, aE as yt, g as vt, aL as _, w as Oe, n as u, c as L, m as b, al as We, V as wt, b2 as kt, Z as St, Y as Rt, $ as ae, b3 as Lt, b4 as Mt, a8 as G, a1 as Q, b5 as Pe, aa as $t, b6 as Et, a3 as Tt, b7 as Ht, a5 as ge, a6 as g, a9 as Bt, b8 as Dt, b9 as Ae, ba as Ft, aj as Nt, M as Te, O as He, ao as It, F as qe } from "./useQuery-C6PPvTP0.js";
40
40
  import { jsx as o, jsxs as p, Fragment as H } from "react/jsx-runtime";
41
41
  import * as q from "react";
42
42
  import { createContext as xe, useMemo as F, useContext as ze, useCallback as E, useEffect as le, useState as k, useRef as U, useLayoutEffect as ie, Component as Ot, createElement as me, isValidElement as Wt, memo as Pt, forwardRef as At } from "react";
43
- import { k as qt, bb as zt, Z as Ve, bc as Vt, bd as Zt, be as Qt, bf as Gt, bg as jt, X as Ut, Y as _t } from "./get-widget-options-Xskksk4X.js";
44
- import { bi as Mr, bh as $r } from "./get-widget-options-Xskksk4X.js";
43
+ import { o as qt, b4 as zt, X as Ve, b5 as Vt, b6 as Zt, b7 as Qt, b8 as jt, b9 as Gt, V as Ut, W as _t } from "./get-widget-options-D88MkBTJ.js";
44
+ import { bb as Mr, ba as $r } from "./get-widget-options-D88MkBTJ.js";
45
45
  class Kt extends ht {
46
46
  constructor(t, n) {
47
47
  super(), this.client = t, this.setOptions(n), this.bindMethods(), this.updateResult();
@@ -253,13 +253,13 @@ const ve = (e, t = !0) => {
253
253
  inputPromptText: 'Ask a question or type "/" for ideas',
254
254
  welcomeText: "Welcome to the Analytics Assistant! I can help you explore and gain insights from your data.",
255
255
  suggestionsWelcomeText: "Some questions you may have:"
256
- }), Ge = xe(R({}, Qe)), P = () => ze(Ge), nn = ({ children: e, value: t }) => {
256
+ }), je = xe(R({}, Qe)), P = () => ze(je), nn = ({ children: e, value: t }) => {
257
257
  const n = Object.entries(t).reduce(
258
258
  (r, [i, s]) => (s !== void 0 && (r[i] = s), r),
259
259
  R({}, Qe)
260
260
  );
261
- return /* @__PURE__ */ o(Ge.Provider, { value: n, children: e });
262
- }, je = (e) => {
261
+ return /* @__PURE__ */ o(je.Provider, { value: n, children: e });
262
+ }, Ge = (e) => {
263
263
  const { contextTitle: t, count: n } = e, r = W(), { numOfRecommendations: i } = P(), s = n != null ? n : i, { isLoading: a, isError: c, isSuccess: l, data: d, error: C, refetch: h } = _({
264
264
  queryKey: ["getQueryRecommendations", t, s, r],
265
265
  queryFn: () => r == null ? void 0 : r.ai.getQueryRecommendations(t, {
@@ -278,7 +278,7 @@ const ve = (e, t = !0) => {
278
278
  }, [h])
279
279
  };
280
280
  }, yr = Oe("useGetQueryRecommendations")(
281
- je
281
+ Ge
282
282
  ), we = "Oh snap, something went wrong. Please try again later.", on = "Oh snap, something went wrong. Please try again later or try asking a different question.", rn = "Something went wrong and we were unable to retrieve the chat thread. Let's start over!", Ue = "Chat unavailable. Please try again later.", ke = "chatHistory", sn = (e) => {
283
283
  const t = W(), { hideHistory: n } = P();
284
284
  return _({
@@ -1108,14 +1108,14 @@ function Zn(e) {
1108
1108
  }
1109
1109
  const fe = St("MuiDialog", ["root", "scrollPaper", "scrollBody", "container", "paper", "paperScrollPaper", "paperScrollBody", "paperWidthFalse", "paperWidthXs", "paperWidthSm", "paperWidthMd", "paperWidthLg", "paperWidthXl", "paperFullWidth", "paperFullScreen"]), nt = /* @__PURE__ */ q.createContext({});
1110
1110
  process.env.NODE_ENV !== "production" && (nt.displayName = "DialogContext");
1111
- const Qn = ["aria-describedby", "aria-labelledby", "BackdropComponent", "BackdropProps", "children", "className", "disableEscapeKeyDown", "fullScreen", "fullWidth", "maxWidth", "onBackdropClick", "onClick", "onClose", "open", "PaperComponent", "PaperProps", "scroll", "TransitionComponent", "transitionDuration", "TransitionProps"], Gn = ae(Lt, {
1111
+ const Qn = ["aria-describedby", "aria-labelledby", "BackdropComponent", "BackdropProps", "children", "className", "disableEscapeKeyDown", "fullScreen", "fullWidth", "maxWidth", "onBackdropClick", "onClick", "onClose", "open", "PaperComponent", "PaperProps", "scroll", "TransitionComponent", "transitionDuration", "TransitionProps"], jn = ae(Lt, {
1112
1112
  name: "MuiDialog",
1113
1113
  slot: "Backdrop",
1114
1114
  overrides: (e, t) => t.backdrop
1115
1115
  })({
1116
1116
  // Improve scrollable dialog support.
1117
1117
  zIndex: -1
1118
- }), jn = (e) => {
1118
+ }), Gn = (e) => {
1119
1119
  const {
1120
1120
  classes: t,
1121
1121
  scroll: n,
@@ -1124,8 +1124,8 @@ const Qn = ["aria-describedby", "aria-labelledby", "BackdropComponent", "Backdro
1124
1124
  fullScreen: s
1125
1125
  } = e, a = {
1126
1126
  root: ["root"],
1127
- container: ["container", `scroll${j(n)}`],
1128
- paper: ["paper", `paperScroll${j(n)}`, `paperWidth${j(String(r))}`, i && "paperFullWidth", s && "paperFullScreen"]
1127
+ container: ["container", `scroll${G(n)}`],
1128
+ paper: ["paper", `paperScroll${G(n)}`, `paperWidth${G(String(r))}`, i && "paperFullWidth", s && "paperFullScreen"]
1129
1129
  };
1130
1130
  return Bt(a, Zn, t);
1131
1131
  }, Un = ae(Mt, {
@@ -1144,7 +1144,7 @@ const Qn = ["aria-describedby", "aria-labelledby", "BackdropComponent", "Backdro
1144
1144
  const {
1145
1145
  ownerState: n
1146
1146
  } = e;
1147
- return [t.container, t[`scroll${j(n.scroll)}`]];
1147
+ return [t.container, t[`scroll${G(n.scroll)}`]];
1148
1148
  }
1149
1149
  })(({
1150
1150
  ownerState: e
@@ -1177,7 +1177,7 @@ const Qn = ["aria-describedby", "aria-labelledby", "BackdropComponent", "Backdro
1177
1177
  const {
1178
1178
  ownerState: n
1179
1179
  } = e;
1180
- return [t.paper, t[`scrollPaper${j(n.scroll)}`], t[`paperWidth${j(String(n.maxWidth))}`], n.fullWidth && t.paperFullWidth, n.fullScreen && t.paperFullScreen];
1180
+ return [t.paper, t[`scrollPaper${G(n.scroll)}`], t[`paperWidth${G(String(n.maxWidth))}`], n.fullWidth && t.paperFullWidth, n.fullScreen && t.paperFullScreen];
1181
1181
  }
1182
1182
  })(({
1183
1183
  theme: e,
@@ -1263,7 +1263,7 @@ const Qn = ["aria-describedby", "aria-labelledby", "BackdropComponent", "Backdro
1263
1263
  fullWidth: w,
1264
1264
  maxWidth: m,
1265
1265
  scroll: B
1266
- }), G = jn(V), I = q.useRef(), ne = (A) => {
1266
+ }), j = Gn(V), I = q.useRef(), ne = (A) => {
1267
1267
  I.current = A.target === A.currentTarget;
1268
1268
  }, he = (A) => {
1269
1269
  y && y(A), I.current && (I.current = null, x && x(A), T && T(A, "backdropClick"));
@@ -1271,10 +1271,10 @@ const Qn = ["aria-describedby", "aria-labelledby", "BackdropComponent", "Backdro
1271
1271
  titleId: v
1272
1272
  }), [v]);
1273
1273
  return /* @__PURE__ */ o(Un, Q({
1274
- className: ge(G.root, h),
1274
+ className: ge(j.root, h),
1275
1275
  closeAfterTransition: !0,
1276
1276
  components: {
1277
- Backdrop: Gn
1277
+ Backdrop: jn
1278
1278
  },
1279
1279
  componentsProps: {
1280
1280
  backdrop: Q({
@@ -1296,7 +1296,7 @@ const Qn = ["aria-describedby", "aria-labelledby", "BackdropComponent", "Backdro
1296
1296
  role: "presentation"
1297
1297
  }, de, {
1298
1298
  children: /* @__PURE__ */ o(_n, {
1299
- className: ge(G.container),
1299
+ className: ge(j.container),
1300
1300
  onMouseDown: ne,
1301
1301
  ownerState: V,
1302
1302
  children: /* @__PURE__ */ o(Kn, Q({
@@ -1306,7 +1306,7 @@ const Qn = ["aria-describedby", "aria-labelledby", "BackdropComponent", "Backdro
1306
1306
  "aria-describedby": a,
1307
1307
  "aria-labelledby": v
1308
1308
  }, J, {
1309
- className: ge(G.paper, J.className),
1309
+ className: ge(j.paper, J.className),
1310
1310
  ownerState: V,
1311
1311
  children: /* @__PURE__ */ o(nt.Provider, {
1312
1312
  value: O,
@@ -1690,7 +1690,7 @@ function ao({
1690
1690
  }
1691
1691
  function lo({ content: e, dataSource: t }) {
1692
1692
  const [n, r] = k(!1), { chartElement: i, expandedElement: s } = F(() => {
1693
- const { detailedDescription: a, jaql: c } = e, l = Gt(e), d = l.chartType.toLowerCase(), C = {
1693
+ const { detailedDescription: a, jaql: c } = e, l = jt(e), d = l.chartType.toLowerCase(), C = {
1694
1694
  cornerRadius: "Small",
1695
1695
  header: {
1696
1696
  renderToolbar: (m) => /* @__PURE__ */ o(
@@ -2158,7 +2158,7 @@ function Ao() {
2158
2158
  ) });
2159
2159
  }
2160
2160
  const qo = (e, t) => {
2161
- const n = new jt(e);
2161
+ const n = new Gt(e);
2162
2162
  return n.alpha = t, n;
2163
2163
  }, zo = u.div`
2164
2164
  font-size: inherit;
@@ -2191,7 +2191,7 @@ const qo = (e, t) => {
2191
2191
  padding-bottom: ${({ theme: e }) => e.aiChat.body.paddingBottom};
2192
2192
  flex: initial;
2193
2193
  height: 100%;
2194
- `, Go = u.div`
2194
+ `, jo = u.div`
2195
2195
  padding-left: ${({ theme: e }) => e.aiChat.footer.paddingLeft};
2196
2196
  padding-right: ${({ theme: e }) => e.aiChat.footer.paddingRight};
2197
2197
  padding-top: ${({ theme: e }) => e.aiChat.footer.paddingTop};
@@ -2199,7 +2199,7 @@ const qo = (e, t) => {
2199
2199
  display: flex;
2200
2200
  flex-direction: column;
2201
2201
  row-gap: 6px;
2202
- `, jo = u.div`
2202
+ `, Go = u.div`
2203
2203
  display: flex;
2204
2204
  flex-direction: column;
2205
2205
  row-gap: ${({ theme: e }) => e.aiChat.suggestions.gap};
@@ -2209,7 +2209,7 @@ function Uo({ contextTitle: e, onGoBack: t }) {
2209
2209
  data: n,
2210
2210
  isLoading: r,
2211
2211
  isError: i
2212
- } = je({
2212
+ } = Ge({
2213
2213
  contextTitle: e
2214
2214
  }), s = F(
2215
2215
  () => n.map((v) => v.nlqPrompt),
@@ -2236,7 +2236,7 @@ function Uo({ contextTitle: e, onGoBack: t }) {
2236
2236
  ie(() => {
2237
2237
  B.current && (B.current.scrollTop = B.current.scrollHeight);
2238
2238
  }, [a, m, l]);
2239
- const de = U(null), { enableFollowupQuestions: ue, enableHeader: V, numOfRecentPrompts: G } = P(), { themeSettings: I } = b(), ne = V ? /* @__PURE__ */ o(
2239
+ const de = U(null), { enableFollowupQuestions: ue, enableHeader: V, numOfRecentPrompts: j } = P(), { themeSettings: I } = b(), ne = V ? /* @__PURE__ */ o(
2240
2240
  at,
2241
2241
  {
2242
2242
  ref: de,
@@ -2250,8 +2250,8 @@ function Uo({ contextTitle: e, onGoBack: t }) {
2250
2250
  ...new Set(
2251
2251
  a.filter((v) => v.role === "user").filter((v) => !s.includes(v.content)).map((v) => v.content).reverse()
2252
2252
  )
2253
- ].slice(0, G),
2254
- [a, G, s]
2253
+ ].slice(0, j),
2254
+ [a, j, s]
2255
2255
  );
2256
2256
  return (f == null ? void 0 : f.message) === Ue ? /* @__PURE__ */ p(H, { children: [
2257
2257
  V && ne,
@@ -2284,7 +2284,7 @@ function Uo({ contextTitle: e, onGoBack: t }) {
2284
2284
  ),
2285
2285
  f && /* @__PURE__ */ o(z, { align: "left", children: f.message }),
2286
2286
  C ? /* @__PURE__ */ o(ce, {}) : /* @__PURE__ */ o(Lo, { messages: a }),
2287
- ue && c && /* @__PURE__ */ o(jo, { theme: I, children: c.followupQuestions.slice(0, 2).map((v, O) => /* @__PURE__ */ o(
2287
+ ue && c && /* @__PURE__ */ o(Go, { theme: I, children: c.followupQuestions.slice(0, 2).map((v, O) => /* @__PURE__ */ o(
2288
2288
  se,
2289
2289
  {
2290
2290
  align: "left",
@@ -2304,7 +2304,7 @@ function Uo({ contextTitle: e, onGoBack: t }) {
2304
2304
  }
2305
2305
  )
2306
2306
  ] }),
2307
- /* @__PURE__ */ p(Go, { ref: ee, theme: I, children: [
2307
+ /* @__PURE__ */ p(jo, { ref: ee, theme: I, children: [
2308
2308
  /* @__PURE__ */ o(
2309
2309
  Bn,
2310
2310
  {
@@ -1,4 +1,4 @@
1
- "use strict";var xs=Object.defineProperty,Zs=Object.defineProperties;var en=Object.getOwnPropertyDescriptors;var qe=Object.getOwnPropertySymbols;var Ut=Object.prototype.hasOwnProperty,Vt=Object.prototype.propertyIsEnumerable;var ct=(s,e)=>(e=Symbol[s])?e:Symbol.for("Symbol."+s);var ft=(s,e,t)=>e in s?xs(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,K=(s,e)=>{for(var t in e||(e={}))Ut.call(e,t)&&ft(s,t,e[t]);if(qe)for(var t of qe(e))Vt.call(e,t)&&ft(s,t,e[t]);return s},H=(s,e)=>Zs(s,en(e));var Jt=(s,e)=>{var t={};for(var n in s)Ut.call(s,n)&&e.indexOf(n)<0&&(t[n]=s[n]);if(s!=null&&qe)for(var n of qe(s))e.indexOf(n)<0&&Vt.call(s,n)&&(t[n]=s[n]);return t};var F=(s,e,t)=>(ft(s,typeof e!="symbol"?e+"":e,t),t);var ut=(s,e,t)=>new Promise((n,i)=>{var r=l=>{try{a(t.next(l))}catch(c){i(c)}},o=l=>{try{a(t.throw(l))}catch(c){i(c)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(s,e)).next())}),tn=function(s,e){this[0]=s,this[1]=e};var d=s=>{var e=s[ct("asyncIterator")],t=!1,n,i={};return e==null?(e=s[ct("iterator")](),n=r=>i[r]=o=>e[r](o)):(e=e.call(s),n=r=>i[r]=o=>{if(t){if(t=!1,r==="throw")throw o;return o}return t=!0,{done:!1,value:new tn(new Promise(a=>{var l=e[r](o);if(!(l instanceof Object))throw TypeError("Object expected");a(l)}),1)}}),i[ct("iterator")]=()=>i,n("next"),"throw"in e?n("throw"):i.throw=r=>{throw r},"return"in e&&n("return"),i};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("./get-widget-options-D008Wku-.cjs"),sn={jaql:{datasource:{title:""},metadata:[]},queryTitle:"",chartRecommendations:{}},wt={model:"",metadata:[],chart:{},queryTitle:""};function nn(s){return s.replace(/\s+/g,"-").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function rn(s){return s.charAt(0).toUpperCase()+s.slice(1)}function on(s){const e=/\[(.+?)\s\(Calendar\)\]/;return s.replace(e,"[$1]").trim()}function an(s){if(s)if(s.metadata){if(!s.model)throw Error("Missing model title")}else throw Error("Missing metadata");else throw Error("Empty model");return s}function ln(s){return!s||!s.jaql.datasource.title||!s.jaql.metadata.length}function Ie(s){return s&&s.replace(new RegExp("(?<!\\\\)'","g"),"\\'")}const cn={react:{baseChartTmpl:`import { {{componentString}} } from '@sisense/sdk-ui';
1
+ "use strict";var xs=Object.defineProperty,Zs=Object.defineProperties;var en=Object.getOwnPropertyDescriptors;var qe=Object.getOwnPropertySymbols;var Ut=Object.prototype.hasOwnProperty,Vt=Object.prototype.propertyIsEnumerable;var ct=(s,e)=>(e=Symbol[s])?e:Symbol.for("Symbol."+s);var ft=(s,e,t)=>e in s?xs(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,K=(s,e)=>{for(var t in e||(e={}))Ut.call(e,t)&&ft(s,t,e[t]);if(qe)for(var t of qe(e))Vt.call(e,t)&&ft(s,t,e[t]);return s},H=(s,e)=>Zs(s,en(e));var Jt=(s,e)=>{var t={};for(var n in s)Ut.call(s,n)&&e.indexOf(n)<0&&(t[n]=s[n]);if(s!=null&&qe)for(var n of qe(s))e.indexOf(n)<0&&Vt.call(s,n)&&(t[n]=s[n]);return t};var F=(s,e,t)=>(ft(s,typeof e!="symbol"?e+"":e,t),t);var ut=(s,e,t)=>new Promise((n,i)=>{var r=l=>{try{a(t.next(l))}catch(c){i(c)}},o=l=>{try{a(t.throw(l))}catch(c){i(c)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(s,e)).next())}),tn=function(s,e){this[0]=s,this[1]=e};var d=s=>{var e=s[ct("asyncIterator")],t=!1,n,i={};return e==null?(e=s[ct("iterator")](),n=r=>i[r]=o=>e[r](o)):(e=e.call(s),n=r=>i[r]=o=>{if(t){if(t=!1,r==="throw")throw o;return o}return t=!0,{done:!1,value:new tn(new Promise(a=>{var l=e[r](o);if(!(l instanceof Object))throw TypeError("Object expected");a(l)}),1)}}),i[ct("iterator")]=()=>i,n("next"),"throw"in e?n("throw"):i.throw=r=>{throw r},"return"in e&&n("return"),i};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("./get-widget-options-D4UHj7o5.cjs"),sn={jaql:{datasource:{title:""},metadata:[]},queryTitle:"",chartRecommendations:{}},wt={model:"",metadata:[],chart:{},queryTitle:""};function nn(s){return s.replace(/\s+/g,"-").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function rn(s){return s.charAt(0).toUpperCase()+s.slice(1)}function on(s){const e=/\[(.+?)\s\(Calendar\)\]/;return s.replace(e,"[$1]").trim()}function an(s){if(s)if(s.metadata){if(!s.model)throw Error("Missing model title")}else throw Error("Missing metadata");else throw Error("Empty model");return s}function ln(s){return!s||!s.jaql.datasource.title||!s.jaql.metadata.length}function Ie(s){return s&&s.replace(new RegExp("(?<!\\\\)'","g"),"\\'")}const cn={react:{baseChartTmpl:`import { {{componentString}} } from '@sisense/sdk-ui';
2
2
  {{extraImportsString}}
3
3
  import * as DM from './{{dataSourceString}}'; // generated with @sisense/sdk-cli
4
4
 
@@ -60,7 +60,7 @@ var d = (s) => {
60
60
  throw r;
61
61
  }, "return" in e && n("return"), i;
62
62
  };
63
- import { bi as rn, cJ as is, x as rs, o as on, h as an, a1 as Je, be as ln, bh as cn, cK as fn } from "./get-widget-options-Xskksk4X.js";
63
+ import { bb as rn, cP as is, x as rs, n as on, h as an, aS as Je, b7 as ln, ba as cn, cQ as fn } from "./get-widget-options-D88MkBTJ.js";
64
64
  const qi = {
65
65
  jaql: { datasource: { title: "" }, metadata: [] },
66
66
  queryTitle: "",
@@ -1,11 +1,12 @@
1
1
  import { HttpClient, Authenticator } from '@sisense/sdk-rest-client';
2
2
  import { QueryClient } from '@sisense/sdk-query-client';
3
3
  import { DataSource } from '@sisense/sdk-data';
4
- import { SisenseContextProviderProps } from '../props';
5
4
  import { DateConfig } from '../query/date-formats';
6
5
  import { AppSettings } from './settings/settings';
7
6
  import { PivotClient } from '@sisense/sdk-pivot-client';
8
7
  import { LoadingIndicatorConfig } from '../types';
8
+ import { TrackingEventDetails } from '@sisense/sdk-tracking';
9
+ import { SisenseContextProviderProps } from '../props';
9
10
  /**
10
11
  * Application configuration
11
12
  */
@@ -75,6 +76,23 @@ export type AppConfig = {
75
76
  */
76
77
  alwaysShowErrorText?: boolean;
77
78
  };
79
+ /**
80
+ * Tracking configuration
81
+ */
82
+ trackingConfig?: {
83
+ /**
84
+ * Whether to enable tracking
85
+ *
86
+ * If not specified, the default value is `true`
87
+ *
88
+ * @internal
89
+ */
90
+ enabled?: boolean;
91
+ /**
92
+ * Callback to be invoked when tracking event occurs
93
+ */
94
+ onTrackingEvent?: (payload: TrackingEventDetails) => void;
95
+ };
78
96
  };
79
97
  /**
80
98
  * Stands for a Sisense Client Application which connects to a Sisense Environment
@@ -120,5 +138,7 @@ export declare class ClientApplication {
120
138
  */
121
139
  constructor(url: string, auth: Authenticator, defaultDataSource?: DataSource);
122
140
  }
141
+ type ClientApplicationParams = Pick<SisenseContextProviderProps, 'appConfig' | 'defaultDataSource' | 'url' | 'token' | 'wat' | 'ssoEnabled' | 'enableSilentPreAuth'>;
123
142
  /** @internal */
124
- export declare const createClientApplication: ({ defaultDataSource, url, token, wat, ssoEnabled, appConfig, enableSilentPreAuth, }: SisenseContextProviderProps) => Promise<ClientApplication>;
143
+ export declare const createClientApplication: ({ defaultDataSource, url, token, wat, ssoEnabled, appConfig, enableSilentPreAuth, }: ClientApplicationParams) => Promise<ClientApplication>;
144
+ export {};
@@ -92,7 +92,7 @@ export type ScattermapChartLocation = {
92
92
  value: number;
93
93
  colorValue?: number;
94
94
  details?: number | string[];
95
- blur: boolean;
95
+ blur?: boolean;
96
96
  coordinates?: Coordinates;
97
97
  };
98
98
  export type ScattermapChartData = {
@@ -56,6 +56,8 @@ export interface CategoryStyle {
56
56
  * @internal
57
57
  */
58
58
  width?: number;
59
+ /** {@inheritDoc DataColorOptions} */
60
+ color?: DataColorOptions;
59
61
  }
60
62
  /**
61
63
  * Wrapped {@link @sisense/sdk-data!Column | Column} with styles controlling how the column is visualized in a chart.
@@ -170,11 +172,11 @@ export type SeriesStyle = {
170
172
  */
171
173
  export type SeriesStyleOptions = {
172
174
  /**
173
- * @inheritdoc LineStyleOptions.lineWidth
175
+ * @inheritdoc
174
176
  */
175
177
  lineWidth?: LineWidth;
176
178
  /**
177
- * @inheritdoc LineStyleOptions.markers
179
+ * @inheritdoc
178
180
  */
179
181
  markers?: Markers;
180
182
  };
@@ -68,7 +68,7 @@ export declare const filterBy: (table: DataTable, filterColumns: Column[], filte
68
68
  rows: Row[];
69
69
  };
70
70
  export declare const getValue: (row: Row, column: Column) => Value | undefined;
71
- export declare const isBlurred: (row: Row, column: Column) => boolean;
71
+ export declare const isBlurred: (row: Row, column: Column) => boolean | undefined;
72
72
  export declare const getValues: (row: Row, columns: readonly Column[]) => ComparableData[];
73
73
  export declare const getValuesAsString: (row: Row, columns: readonly Column[]) => string;
74
74
  export declare const getIndexedRows: (rows: readonly Row[], indexColumns: Column[]) => IndexedRows;
@@ -1,4 +1,5 @@
1
+ import { CompleteThemeSettings } from '..';
1
2
  import { HighchartsOptionsInternal } from './chart-options-service';
2
3
  export declare const DEFAULT_ANIMATION_DURATION_MS_INIT = 600;
3
4
  export declare const DEFAULT_ANIMATION_DURATION_MS_UPDATE = 300;
4
- export declare const applyCommonHighchartsOptions: (chartOptions: HighchartsOptionsInternal, accessibilityEnabled: boolean) => HighchartsOptionsInternal;
5
+ export declare const applyCommonHighchartsOptions: (chartOptions: HighchartsOptionsInternal, themeSettings: CompleteThemeSettings, accessibilityEnabled: boolean) => HighchartsOptionsInternal;
@@ -1,2 +1,6 @@
1
- import leaflet from 'leaflet';
2
- export declare function fitMapToBounds(map: leaflet.Map, markers: leaflet.CircleMarker[]): void;
1
+ import { CompleteThemeSettings } from '../../../../index';
2
+ import leaflet, { type FitBoundsOptions } from 'leaflet';
3
+ type FitBoundsAnimationOptions = Pick<FitBoundsOptions, 'animate' | 'duration'>;
4
+ export declare function prepareFitBoundsAnimationOptions(themeSettings: CompleteThemeSettings): FitBoundsAnimationOptions;
5
+ export declare function fitMapToBounds(map: leaflet.Map, markers: leaflet.CircleMarker[], options?: FitBoundsOptions): void;
6
+ export {};
@@ -4,7 +4,7 @@ type MarkerStyle = {
4
4
  color: string;
5
5
  size: number;
6
6
  fill: Required<ScattermapMarkers>['fill'];
7
- blur: boolean;
7
+ blur?: boolean;
8
8
  };
9
9
  export type MarkerConfig = {
10
10
  coordinates: {
@@ -1,2 +1,2 @@
1
1
  import { DataTableWrapperProps } from './types';
2
- export declare const DataTableWrapper: ({ dataTable, dataOptions, isLoading, height, width, customStyles, themeSettings, onSortUpdate, }: DataTableWrapperProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const DataTableWrapper: ({ dataTable, dataOptions, height, width, customStyles, themeSettings, onSortUpdate, }: DataTableWrapperProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { DataTable } from '../../../chart-data-processor/table-processor';
2
- export declare const calcColumnWidths: (dataTable: DataTable, isLoading: boolean, isShowFieldTypeIcon: boolean, columnsOptions: {
2
+ export declare const calcColumnWidths: (dataTable: DataTable, isShowFieldTypeIcon: boolean, columnsOptions: {
3
3
  isHtml: boolean;
4
4
  width?: number;
5
5
  }[], fontFamily?: string) => number[];
@@ -44,7 +44,6 @@ export type TableProps = {
44
44
  export type DataTableWrapperProps = {
45
45
  dataTable: DataTable;
46
46
  dataOptions: TableDataOptionsInternal;
47
- isLoading: boolean;
48
47
  height: number;
49
48
  width: number;
50
49
  customStyles?: TableCustomStyles;
@@ -14,6 +14,14 @@ export declare const LoadingIndicator: ({ themeSettings, onCancel, }: {
14
14
  secondaryTextColor: string;
15
15
  backgroundColor: string;
16
16
  panelBackgroundColor: string;
17
+ animation: {
18
+ init: {
19
+ duration: number | "auto";
20
+ };
21
+ redraw: {
22
+ duration: number | "auto";
23
+ };
24
+ };
17
25
  };
18
26
  palette: {
19
27
  variantColors: import("../../types").Color[];
@@ -43,6 +51,11 @@ export declare const LoadingIndicator: ({ themeSettings, onCancel, }: {
43
51
  backgroundColor: string;
44
52
  };
45
53
  };
54
+ dashboard: {
55
+ backgroundColor: string;
56
+ dividerLineWidth: number;
57
+ dividerLineColor: string;
58
+ };
46
59
  aiChat: {
47
60
  backgroundColor: string;
48
61
  primaryTextColor: string;
@@ -6,4 +6,4 @@
6
6
  * @param [compare] - Optional comparison function
7
7
  * @returns Has the value changed or not.
8
8
  */
9
- export declare function useHasChanged<T>(value: T, propNames: Array<keyof T>, compare?: (value: T, prev: T) => boolean): boolean;
9
+ export declare function useHasChanged<T>(value: T, propNames?: Array<keyof T>, compare?: (value: T, prev: T) => boolean): boolean;
@@ -0,0 +1,7 @@
1
+ import { HttpClient } from '@sisense/sdk-rest-client';
2
+ import { ErrorEventOptions, TrackingEventType, TrackingEventDetails } from '@sisense/sdk-tracking';
3
+ export declare const executeTracking: (eventType: TrackingEventType, eventPayload: TrackingEventDetails, httpClient: HttpClient, onTrackingEvent?: ((payload: TrackingEventDetails) => void) | undefined, isDebugMode?: boolean) => Promise<void>;
4
+ export declare const useTracking: () => {
5
+ trackEvent: (eventType: TrackingEventType, eventPayload?: TrackingEventDetails, isDebugMode?: boolean) => Promise<void>;
6
+ trackError: (options: ErrorEventOptions, isDebugMode?: boolean) => Promise<void>;
7
+ };
@@ -7,5 +7,5 @@ type WidgetSelection = {
7
7
  };
8
8
  export declare function getWidgetSelections(widgetType: WidgetTypeInternal, dataOptions: ChartDataOptions | PivotTableDataOptions, points: Array<DataPoint | ScatterDataPoint | ScattermapDataPoint | AreamapDataPoint>, nativeEvent: MouseEvent | PointerEvent): WidgetSelection[];
9
9
  export declare function getSelectableWidgetAttributes(widgetType: WidgetTypeInternal, dataOptions: ChartDataOptions | PivotTableDataOptions): Attribute[];
10
- export declare function createCommonFiltersOverSelections(selections: WidgetSelection[], filters: Filter[]): Filter[];
10
+ export declare function createCommonFiltersOverSelections(selections: WidgetSelection[], existingCommonFilters: Filter[]): Filter[];
11
11
  export {};
@@ -1,18 +1,24 @@
1
1
  import { CascadingFilter, Filter } from '@sisense/sdk-data';
2
2
  import { DeepRequired } from 'ts-essentials';
3
- /** @internal */
3
+ /**
4
+ * Common filters apply mode.
5
+ */
4
6
  export declare enum CommonFiltersApplyMode {
5
7
  HIGHLIGHT = "highlight",
6
8
  FILTER = "filter"
7
9
  }
8
- /** @internal */
10
+ /**
11
+ * Options for common filters defined at the dashboard level to be applied to certain widgets.
12
+ */
9
13
  export type CommonFiltersOptions = {
10
14
  applyMode?: `${CommonFiltersApplyMode}`;
11
15
  shouldAffectFilters?: boolean;
12
16
  ignoreFilters?: FiltersIgnoringRules;
13
17
  forceApplyBackgroundFilters?: boolean;
14
18
  };
15
- /** @internal */
19
+ /**
20
+ * Filters ignoring rules.
21
+ */
16
22
  export type FiltersIgnoringRules = {
17
23
  all?: boolean;
18
24
  ids?: string[];
@@ -1,10 +1,6 @@
1
1
  import { Filter, Attribute } from '@sisense/sdk-data';
2
2
  import { FiltersIgnoringRules, PureFilter } from './types.js';
3
3
  export declare function getAllowedFilters(filters: PureFilter[], ignoreFiltersOptions: FiltersIgnoringRules): Filter[];
4
- export declare function isSameAttribute(attributeA: Attribute, attributeB: Attribute): boolean;
5
4
  export declare function getFilterByAttribute(filters: Filter[], attribute: Attribute): Filter | undefined;
6
5
  export declare function createCommonFilter(attribute: Attribute, members: (string | number)[], existingCommonFilters: Filter[]): Filter;
7
- export declare function haveSameAttribute(filterA: Filter, filterB: Filter): boolean;
8
6
  export declare function isEqualMembersFilters(filterA: Filter, filterB: Filter): boolean;
9
- export declare function isIncludeAllFilter(filter: Filter): boolean;
10
- export declare function clearCommonFilter(filter: Filter): Filter;
@@ -1,9 +1,12 @@
1
+ /// <reference types="react" />
1
2
  import { DashboardByIdProps } from './types';
2
3
  /**
3
- * React component that renders a dashboard created in Sisense Fusion Embed
4
+ * React component that renders a dashboard created in Sisense Fusion by its ID.
4
5
  *
5
6
  * **Note:** Dashboard extensions based on JS scripts and add-ons in Fusion are not supported.
6
7
  *
7
- * @internal
8
+ * @group Fusion Embed
9
+ * @fusionEmbed
10
+ * @alpha
8
11
  */
9
- export declare const DashboardById: ({ dashboardOid }: DashboardByIdProps) => import("react/jsx-runtime").JSX.Element;
12
+ export declare const DashboardById: import("react").FunctionComponent<DashboardByIdProps>;
@@ -1,10 +1,12 @@
1
+ /// <reference types="react" />
1
2
  import { DashboardProps } from '../dashboard/types';
2
3
  /**
3
- * React component that renders a dashboard
4
- * Include inside logic of applying common filters to widgets
4
+ * React component that renders a dashboard whose elements are customizable. It includes internal logic of applying common filters to widgets.
5
5
  *
6
6
  * **Note:** Dashboard extensions based on JS scripts and add-ons in Fusion are not supported.
7
7
  *
8
- * @internal
8
+ * @group Fusion Embed
9
+ * @fusionEmbed
10
+ * @alpha
9
11
  */
10
- export declare const Dashboard: ({ title, layout, widgets, filters, defaultDataSource, widgetFilterOptions, styleOptions, }: DashboardProps) => import("react/jsx-runtime").JSX.Element;
12
+ export declare const Dashboard: import("react").FunctionComponent<DashboardProps>;
@@ -1,3 +1,3 @@
1
1
  export { DashboardById } from './dashboard-by-id';
2
2
  export { Dashboard } from './dashboard';
3
- export { type DashboardByIdProps, type DashboardProps } from './types';
3
+ export type { DashboardByIdProps, DashboardProps, DashboardStyleOptions } from './types';
@@ -1,17 +1,17 @@
1
1
  import { DashboardStyleOptions, Layout, WidgetFilterOptions, WidgetModel } from '../models';
2
2
  import { DataSource, Filter } from '@sisense/sdk-data';
3
+ export type { DashboardStyleOptions, Layout } from '../models';
3
4
  /**
4
5
  * Props for the DashboardById component
5
- *
6
- * @internal
7
6
  */
8
7
  export interface DashboardByIdProps {
8
+ /**
9
+ * The OID of the dashboard to render.
10
+ */
9
11
  dashboardOid: string;
10
12
  }
11
13
  /**
12
14
  * Props for the DashboardLayout component
13
- *
14
- * @internal
15
15
  */
16
16
  export interface DashboardLayoutProps {
17
17
  title: string;
@@ -23,16 +23,21 @@ export interface DashboardLayoutProps {
23
23
  }
24
24
  /**
25
25
  * Props for the Dashboard component
26
- *
27
- * @internal
28
26
  */
29
27
  export interface DashboardProps {
28
+ /** The title of the dashboard */
30
29
  title: string;
30
+ /** The layout of the dashboard */
31
31
  layout: Layout;
32
+ /** The widgets to render in the dashboard */
32
33
  widgets: WidgetModel[];
34
+ /** The dashboard filters to be applied to each of the widgets based on the widget filter options */
33
35
  filters: Filter[];
36
+ /** The default data source to use for the dashboard */
34
37
  defaultDataSource?: DataSource;
38
+ /** The filter options for each of the widgets */
35
39
  widgetFilterOptions?: WidgetFilterOptions;
40
+ /** The style options for the dashboard */
36
41
  styleOptions: DashboardStyleOptions;
37
42
  }
38
43
  /**
@@ -1,3 +1,3 @@
1
- import { Panel, WidgetType } from './types';
1
+ import { Panel, PanelItem, WidgetType } from './types';
2
2
  import { DrilldownOptions } from '../types';
3
- export declare const extractDrilldownOptions: (widgetType: WidgetType, panels: Panel[]) => DrilldownOptions;
3
+ export declare const extractDrilldownOptions: (widgetType: WidgetType, panels: Panel[], drillHistory?: PanelItem[], enableDrillToAnywhere?: boolean) => DrilldownOptions;