@sisense/sdk-ui 1.17.1 → 1.18.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 +55 -55
- package/dist/analytics-composer.cjs +1 -1
- package/dist/analytics-composer.js +1 -1
- package/dist/api/types/dashboard-dto.d.ts +3 -0
- package/dist/app/client-application.d.ts +2 -2
- package/dist/chart-data-options/types.d.ts +2 -2
- package/dist/chart-options-processor/advanced-analytics/tooltips/forecast-tooltip.d.ts +14 -0
- package/dist/chart-options-processor/advanced-analytics/tooltips/tooltip-footer.d.ts +6 -0
- package/dist/chart-options-processor/advanced-analytics/tooltips/tooltip-row.d.ts +6 -0
- package/dist/chart-options-processor/advanced-analytics/tooltips/tooltip-title.d.ts +6 -0
- package/dist/chart-options-processor/advanced-analytics/tooltips/trend-tooltip.d.ts +24 -0
- package/dist/chart-options-processor/advanced-chart-options.d.ts +3 -4
- package/dist/chart-options-processor/boxplot-chart-options.d.ts +2 -2
- package/dist/chart-options-processor/translations/axis-section.d.ts +2 -2
- package/dist/chart-options-processor/translations/boxplot/boxplot-series.d.ts +2 -2
- package/dist/chart-options-processor/translations/design-options.d.ts +7 -1
- package/dist/chart-options-processor/translations/navigator.d.ts +2 -1
- package/dist/chart-options-processor/translations/sunburst/sunburst-series.d.ts +6 -0
- package/dist/chart-options-processor/translations/tooltip-utils.d.ts +6 -0
- package/dist/chart-options-processor/translations/translations-to-highcharts.d.ts +6 -0
- package/dist/common/components/loading-indicator.d.ts +6 -0
- package/dist/dashboard/dashboard-by-id.d.ts +18 -0
- package/dist/dashboard/dashboard.d.ts +34 -0
- package/dist/dashboard-widget/translate-dashboard-filters.d.ts +19 -1
- package/dist/dashboard-widget/translate-widget-data-options.d.ts +14 -0
- package/dist/dashboard-widget/translate-widget-filters.d.ts +1 -1
- package/dist/dashboard-widget/translate-widget-style-options.d.ts +7 -3
- package/dist/dashboard-widget/types.d.ts +51 -0
- package/dist/dashboard-widget/utils.d.ts +2 -1
- package/dist/get-widget-options-CDWzHX-s.cjs +271 -0
- package/dist/get-widget-options-DJexR5_Z.js +43751 -0
- package/dist/index.cjs +167 -172
- package/dist/index.d.ts +4 -0
- package/dist/index.js +17247 -19557
- package/dist/props.d.ts +8 -1
- package/dist/translation/resources/en.d.ts +10 -0
- package/dist/translation/resources/index.d.ts +20 -0
- package/dist/types.d.ts +20 -1
- package/dist/{useQuery-DLPVGDKo.js → useQuery-Bkuiz8XK.js} +10245 -9427
- package/dist/useQuery-CZAKQmD7.cjs +433 -0
- package/package.json +8 -8
- package/dist/get-widget-options-D4UHj7o5.cjs +0 -198
- package/dist/get-widget-options-D88MkBTJ.js +0 -37924
- package/dist/useQuery-CFlf48eQ.cjs +0 -433
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-CFlf48eQ.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`
|
|
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-CZAKQmD7.cjs"),n=require("react/jsx-runtime"),c=require("react"),k=require("./get-widget-options-CDWzHX-s.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
|
@@ -20,7 +20,7 @@ var Ee = (e, t) => {
|
|
|
20
20
|
return n;
|
|
21
21
|
};
|
|
22
22
|
var $ = (e, t, n) => (pe(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
23
|
-
var
|
|
23
|
+
var Q = (e, t, n) => new Promise((r, i) => {
|
|
24
24
|
var s = (l) => {
|
|
25
25
|
try {
|
|
26
26
|
c(n.next(l));
|
|
@@ -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 {
|
|
39
|
+
import { aV as ht, aW as pt, aX as Ie, aY as gt, aZ as K, a_ as Ct, a$ as ft, b0 as mt, aC as bt, l as xt, aD as yt, g as vt, aK as _, w as Oe, n as u, c as L, m as b, am as We, Y as wt, b1 as kt, $ as St, _ as Rt, a0 as ae, b2 as Lt, b3 as Mt, a9 as j, a2 as Z, b4 as Pe, ab as $t, b5 as Et, a4 as Tt, b6 as Ht, a6 as ge, a7 as g, aa as Bt, b7 as Dt, b8 as Ae, b9 as Ft, ak as Nt, Q as Te, S as He, ap as It, I as qe } from "./useQuery-Bkuiz8XK.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 {
|
|
44
|
-
import {
|
|
43
|
+
import { p as qt, b5 as zt, X as Ve, b6 as Vt, b7 as Qt, b8 as Zt, b9 as Gt, ba as jt, V as Ut, W as _t } from "./get-widget-options-DJexR5_Z.js";
|
|
44
|
+
import { bc as Mr, bb as $r } from "./get-widget-options-DJexR5_Z.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();
|
|
@@ -136,7 +136,7 @@ function Yt() {
|
|
|
136
136
|
class Xt {
|
|
137
137
|
constructor(t) {
|
|
138
138
|
$(this, "httpClient");
|
|
139
|
-
$(this, "getChatContexts", () =>
|
|
139
|
+
$(this, "getChatContexts", () => Q(this, null, function* () {
|
|
140
140
|
return (yield this.httpClient.get("api/datasources?sharedWith=r,w")) || [];
|
|
141
141
|
}));
|
|
142
142
|
// ==== /v2/ai endpoints ====
|
|
@@ -186,9 +186,9 @@ const Jt = new bt({
|
|
|
186
186
|
refetchOnMount: !1
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
|
-
}),
|
|
189
|
+
}), Qe = xe(void 0), W = () => ze(Qe), en = ({ children: e }) => {
|
|
190
190
|
const { app: t } = xt(), n = F(() => t ? new Xt(t.httpClient) : void 0, [t]);
|
|
191
|
-
return /* @__PURE__ */ o(
|
|
191
|
+
return /* @__PURE__ */ o(Qe.Provider, { value: n, children: /* @__PURE__ */ o(yt, { client: Jt, children: e }) });
|
|
192
192
|
};
|
|
193
193
|
function br({ children: e }) {
|
|
194
194
|
return /* @__PURE__ */ o(en, { children: e });
|
|
@@ -244,7 +244,7 @@ const ve = (e, t = !0) => {
|
|
|
244
244
|
return ve(n, t);
|
|
245
245
|
}, xr = Oe("useGetNlgQueryResult")(
|
|
246
246
|
tn
|
|
247
|
-
),
|
|
247
|
+
), Ze = Object.freeze({
|
|
248
248
|
enableFollowupQuestions: !1,
|
|
249
249
|
enableHeader: !0,
|
|
250
250
|
enableInsights: !0,
|
|
@@ -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
|
-
}),
|
|
256
|
+
}), Ge = xe(R({}, Ze)), P = () => ze(Ge), 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
|
-
R({},
|
|
259
|
+
R({}, Ze)
|
|
260
260
|
);
|
|
261
|
-
return /* @__PURE__ */ o(
|
|
262
|
-
},
|
|
261
|
+
return /* @__PURE__ */ o(Ge.Provider, { value: n, children: e });
|
|
262
|
+
}, je = (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,12 +278,12 @@ const ve = (e, t = !0) => {
|
|
|
278
278
|
}, [h])
|
|
279
279
|
};
|
|
280
280
|
}, yr = Oe("useGetQueryRecommendations")(
|
|
281
|
-
|
|
281
|
+
je
|
|
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 _({
|
|
285
285
|
queryKey: [ke, e, t],
|
|
286
|
-
queryFn: () =>
|
|
286
|
+
queryFn: () => Q(void 0, null, function* () {
|
|
287
287
|
if (!t || !e)
|
|
288
288
|
return;
|
|
289
289
|
if (n)
|
|
@@ -296,7 +296,7 @@ const ve = (e, t = !0) => {
|
|
|
296
296
|
}, _e = (e) => {
|
|
297
297
|
const t = W(), n = K();
|
|
298
298
|
return ye({
|
|
299
|
-
mutationFn: () =>
|
|
299
|
+
mutationFn: () => Q(void 0, null, function* () {
|
|
300
300
|
if (!(!t || !e))
|
|
301
301
|
return t.ai.chat.clearHistory(e);
|
|
302
302
|
}),
|
|
@@ -319,7 +319,7 @@ const ve = (e, t = !0) => {
|
|
|
319
319
|
}, Ye = () => {
|
|
320
320
|
const e = W(), { data: t, isLoading: n, fetchStatus: r } = _({
|
|
321
321
|
queryKey: ["getDataTopics", e],
|
|
322
|
-
queryFn: () =>
|
|
322
|
+
queryFn: () => Q(void 0, null, function* () {
|
|
323
323
|
if (e)
|
|
324
324
|
return e.getChatContexts();
|
|
325
325
|
}),
|
|
@@ -338,7 +338,7 @@ const ve = (e, t = !0) => {
|
|
|
338
338
|
};
|
|
339
339
|
}, an = (e, t) => {
|
|
340
340
|
const n = K(), r = W(), i = ye({
|
|
341
|
-
mutationFn: () =>
|
|
341
|
+
mutationFn: () => Q(void 0, null, function* () {
|
|
342
342
|
if (!(!r || !e))
|
|
343
343
|
return r.ai.chat.create(e);
|
|
344
344
|
}),
|
|
@@ -371,7 +371,7 @@ const ve = (e, t = !0) => {
|
|
|
371
371
|
},
|
|
372
372
|
[t, e]
|
|
373
373
|
), { enableFollowupQuestions: r } = P(), i = W(), { mutate: s, isLoading: a } = ye({
|
|
374
|
-
mutationFn: (c) =>
|
|
374
|
+
mutationFn: (c) => Q(void 0, null, function* () {
|
|
375
375
|
if (!(!i || !e))
|
|
376
376
|
return i.ai.chat.post(e, {
|
|
377
377
|
text: c,
|
|
@@ -1103,19 +1103,19 @@ function Vn() {
|
|
|
1103
1103
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
1104
1104
|
return e.length !== t.length || e.some((n, r) => !Object.is(n, t[r]));
|
|
1105
1105
|
}
|
|
1106
|
-
function
|
|
1106
|
+
function Qn(e) {
|
|
1107
1107
|
return Rt("MuiDialog", 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
|
|
1111
|
+
const Zn = ["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, {
|
|
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
|
-
}),
|
|
1118
|
+
}), jn = (e) => {
|
|
1119
1119
|
const {
|
|
1120
1120
|
classes: t,
|
|
1121
1121
|
scroll: n,
|
|
@@ -1124,10 +1124,10 @@ const Qn = ["aria-describedby", "aria-labelledby", "BackdropComponent", "Backdro
|
|
|
1124
1124
|
fullScreen: s
|
|
1125
1125
|
} = e, a = {
|
|
1126
1126
|
root: ["root"],
|
|
1127
|
-
container: ["container", `scroll${
|
|
1128
|
-
paper: ["paper", `paperScroll${
|
|
1127
|
+
container: ["container", `scroll${j(n)}`],
|
|
1128
|
+
paper: ["paper", `paperScroll${j(n)}`, `paperWidth${j(String(r))}`, i && "paperFullWidth", s && "paperFullScreen"]
|
|
1129
1129
|
};
|
|
1130
|
-
return Bt(a,
|
|
1130
|
+
return Bt(a, Qn, t);
|
|
1131
1131
|
}, Un = ae(Mt, {
|
|
1132
1132
|
name: "MuiDialog",
|
|
1133
1133
|
slot: "Root",
|
|
@@ -1144,11 +1144,11 @@ const Qn = ["aria-describedby", "aria-labelledby", "BackdropComponent", "Backdro
|
|
|
1144
1144
|
const {
|
|
1145
1145
|
ownerState: n
|
|
1146
1146
|
} = e;
|
|
1147
|
-
return [t.container, t[`scroll${
|
|
1147
|
+
return [t.container, t[`scroll${j(n.scroll)}`]];
|
|
1148
1148
|
}
|
|
1149
1149
|
})(({
|
|
1150
1150
|
ownerState: e
|
|
1151
|
-
}) =>
|
|
1151
|
+
}) => Z({
|
|
1152
1152
|
height: "100%",
|
|
1153
1153
|
"@media print": {
|
|
1154
1154
|
height: "auto"
|
|
@@ -1177,12 +1177,12 @@ const Qn = ["aria-describedby", "aria-labelledby", "BackdropComponent", "Backdro
|
|
|
1177
1177
|
const {
|
|
1178
1178
|
ownerState: n
|
|
1179
1179
|
} = e;
|
|
1180
|
-
return [t.paper, t[`scrollPaper${
|
|
1180
|
+
return [t.paper, t[`scrollPaper${j(n.scroll)}`], t[`paperWidth${j(String(n.maxWidth))}`], n.fullWidth && t.paperFullWidth, n.fullScreen && t.paperFullScreen];
|
|
1181
1181
|
}
|
|
1182
1182
|
})(({
|
|
1183
1183
|
theme: e,
|
|
1184
1184
|
ownerState: t
|
|
1185
|
-
}) =>
|
|
1185
|
+
}) => Z({
|
|
1186
1186
|
margin: 32,
|
|
1187
1187
|
position: "relative",
|
|
1188
1188
|
overflowY: "auto",
|
|
@@ -1257,27 +1257,27 @@ const Qn = ["aria-describedby", "aria-labelledby", "BackdropComponent", "Backdro
|
|
|
1257
1257
|
TransitionComponent: ee = Dt,
|
|
1258
1258
|
transitionDuration: te = s,
|
|
1259
1259
|
TransitionProps: de
|
|
1260
|
-
} = r, ue = Tt(r,
|
|
1260
|
+
} = r, ue = Tt(r, Zn), V = Z({}, r, {
|
|
1261
1261
|
disableEscapeKeyDown: f,
|
|
1262
1262
|
fullScreen: S,
|
|
1263
1263
|
fullWidth: w,
|
|
1264
1264
|
maxWidth: m,
|
|
1265
1265
|
scroll: B
|
|
1266
|
-
}),
|
|
1266
|
+
}), G = jn(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"));
|
|
1270
1270
|
}, v = Ht(c), O = q.useMemo(() => ({
|
|
1271
1271
|
titleId: v
|
|
1272
1272
|
}), [v]);
|
|
1273
|
-
return /* @__PURE__ */ o(Un,
|
|
1274
|
-
className: ge(
|
|
1273
|
+
return /* @__PURE__ */ o(Un, Z({
|
|
1274
|
+
className: ge(G.root, h),
|
|
1275
1275
|
closeAfterTransition: !0,
|
|
1276
1276
|
components: {
|
|
1277
|
-
Backdrop:
|
|
1277
|
+
Backdrop: Gn
|
|
1278
1278
|
},
|
|
1279
1279
|
componentsProps: {
|
|
1280
|
-
backdrop:
|
|
1280
|
+
backdrop: Z({
|
|
1281
1281
|
transitionDuration: te,
|
|
1282
1282
|
as: l
|
|
1283
1283
|
}, d)
|
|
@@ -1289,24 +1289,24 @@ const Qn = ["aria-describedby", "aria-labelledby", "BackdropComponent", "Backdro
|
|
|
1289
1289
|
onClick: he,
|
|
1290
1290
|
ownerState: V
|
|
1291
1291
|
}, ue, {
|
|
1292
|
-
children: /* @__PURE__ */ o(ee,
|
|
1292
|
+
children: /* @__PURE__ */ o(ee, Z({
|
|
1293
1293
|
appear: !0,
|
|
1294
1294
|
in: N,
|
|
1295
1295
|
timeout: te,
|
|
1296
1296
|
role: "presentation"
|
|
1297
1297
|
}, de, {
|
|
1298
1298
|
children: /* @__PURE__ */ o(_n, {
|
|
1299
|
-
className: ge(
|
|
1299
|
+
className: ge(G.container),
|
|
1300
1300
|
onMouseDown: ne,
|
|
1301
1301
|
ownerState: V,
|
|
1302
|
-
children: /* @__PURE__ */ o(Kn,
|
|
1302
|
+
children: /* @__PURE__ */ o(Kn, Z({
|
|
1303
1303
|
as: M,
|
|
1304
1304
|
elevation: 24,
|
|
1305
1305
|
role: "dialog",
|
|
1306
1306
|
"aria-describedby": a,
|
|
1307
1307
|
"aria-labelledby": v
|
|
1308
1308
|
}, J, {
|
|
1309
|
-
className: ge(
|
|
1309
|
+
className: ge(G.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 =
|
|
1693
|
+
const { detailedDescription: a, jaql: c } = e, l = Gt(e), d = l.chartType.toLowerCase(), C = {
|
|
1694
1694
|
cornerRadius: "Small",
|
|
1695
1695
|
header: {
|
|
1696
1696
|
renderToolbar: (m) => /* @__PURE__ */ o(
|
|
@@ -1705,14 +1705,14 @@ function lo({ content: e, dataSource: t }) {
|
|
|
1705
1705
|
}, h = c.metadata.filter((m) => m.panel === "scope").map(Vt), f = c.metadata.filter((m) => m.panel !== "scope");
|
|
1706
1706
|
let S, w;
|
|
1707
1707
|
if (d === "table") {
|
|
1708
|
-
const { dataOptions: m } =
|
|
1708
|
+
const { dataOptions: m } = Qt(f), x = {
|
|
1709
1709
|
dataOptions: m,
|
|
1710
1710
|
dataSource: t,
|
|
1711
1711
|
filters: h
|
|
1712
1712
|
};
|
|
1713
1713
|
S = /* @__PURE__ */ o("div", { className: "csdk-h-[245px]", children: /* @__PURE__ */ o(Te, D(R({}, x), { styleOptions: C })) }), w = /* @__PURE__ */ o(Te, D(R({}, x), { styleOptions: { header: { hidden: !0 } } }));
|
|
1714
1714
|
} else {
|
|
1715
|
-
const { dataOptions: m, chartStyleOptions: x, expandedChartStyleOptions: y } =
|
|
1715
|
+
const { dataOptions: m, chartStyleOptions: x, expandedChartStyleOptions: y } = Zt(
|
|
1716
1716
|
f,
|
|
1717
1717
|
l
|
|
1718
1718
|
), T = R(R({}, x), C), N = {
|
|
@@ -2158,7 +2158,7 @@ function Ao() {
|
|
|
2158
2158
|
) });
|
|
2159
2159
|
}
|
|
2160
2160
|
const qo = (e, t) => {
|
|
2161
|
-
const n = new
|
|
2161
|
+
const n = new jt(e);
|
|
2162
2162
|
return n.alpha = t, n;
|
|
2163
2163
|
}, zo = u.div`
|
|
2164
2164
|
font-size: inherit;
|
|
@@ -2180,7 +2180,7 @@ const qo = (e, t) => {
|
|
|
2180
2180
|
`, Vo = ({ onClick: e }) => {
|
|
2181
2181
|
const { themeSettings: t } = b();
|
|
2182
2182
|
return /* @__PURE__ */ o(zo, { theme: t, onClick: e, children: /* @__PURE__ */ o(Ao, {}) });
|
|
2183
|
-
},
|
|
2183
|
+
}, Qo = ({ isVisible: e, onClick: t, anchorElement: n }) => /* @__PURE__ */ o(We, { anchorEl: n, open: e, placement: "top", sx: { zIndex: 2 }, children: /* @__PURE__ */ o(Vo, { onClick: t }) }), Zo = u.div`
|
|
2184
2184
|
display: flex;
|
|
2185
2185
|
flex-direction: column;
|
|
2186
2186
|
row-gap: ${({ theme: e }) => e.aiChat.body.gapBetweenMessages};
|
|
@@ -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
|
-
`,
|
|
2194
|
+
`, Go = 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
|
-
`,
|
|
2202
|
+
`, jo = 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
|
-
} =
|
|
2212
|
+
} = je({
|
|
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:
|
|
2239
|
+
const de = U(null), { enableFollowupQuestions: ue, enableHeader: V, numOfRecentPrompts: G } = P(), { themeSettings: I } = b(), ne = V ? /* @__PURE__ */ o(
|
|
2240
2240
|
at,
|
|
2241
2241
|
{
|
|
2242
2242
|
ref: de,
|
|
@@ -2250,17 +2250,17 @@ 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,
|
|
2254
|
-
[a,
|
|
2253
|
+
].slice(0, G),
|
|
2254
|
+
[a, G, s]
|
|
2255
2255
|
);
|
|
2256
2256
|
return (f == null ? void 0 : f.message) === Ue ? /* @__PURE__ */ p(H, { children: [
|
|
2257
2257
|
V && ne,
|
|
2258
2258
|
/* @__PURE__ */ o(et, { text: f.message })
|
|
2259
2259
|
] }) : /* @__PURE__ */ p(H, { children: [
|
|
2260
2260
|
ne,
|
|
2261
|
-
/* @__PURE__ */ p(
|
|
2261
|
+
/* @__PURE__ */ p(Zo, { ref: B, theme: I, onScroll: te, children: [
|
|
2262
2262
|
/* @__PURE__ */ o(
|
|
2263
|
-
|
|
2263
|
+
Qo,
|
|
2264
2264
|
{
|
|
2265
2265
|
isVisible: y,
|
|
2266
2266
|
anchorElement: ee.current,
|
|
@@ -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(
|
|
2287
|
+
ue && c && /* @__PURE__ */ o(jo, { 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(
|
|
2307
|
+
/* @__PURE__ */ p(Go, { ref: ee, theme: I, children: [
|
|
2308
2308
|
/* @__PURE__ */ o(
|
|
2309
2309
|
Bn,
|
|
2310
2310
|
{
|
|
@@ -2499,8 +2499,8 @@ export {
|
|
|
2499
2499
|
Sr as GetNlgQueryResult,
|
|
2500
2500
|
Mr as JaqlElement,
|
|
2501
2501
|
$r as deriveChartFamily,
|
|
2502
|
-
|
|
2503
|
-
|
|
2502
|
+
Zt as getChartOptions,
|
|
2503
|
+
Qt as getTableOptions,
|
|
2504
2504
|
dn as useChatSession,
|
|
2505
2505
|
wr as useGetDataSourceFields,
|
|
2506
2506
|
xr as useGetNlgQueryResult,
|
|
@@ -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-
|
|
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-CDWzHX-s.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 {
|
|
63
|
+
import { bc as rn, cJ as is, y as rs, o as on, h as an, aS as Je, b8 as ln, bb as cn, cK as fn } from "./get-widget-options-DJexR5_Z.js";
|
|
64
64
|
const qi = {
|
|
65
65
|
jaql: { datasource: { title: "" }, metadata: [] },
|
|
66
66
|
queryTitle: "",
|
|
@@ -38,6 +38,9 @@ export type DashboardStyleDto = {
|
|
|
38
38
|
paletteId?: string;
|
|
39
39
|
};
|
|
40
40
|
export declare const isCascadingFilterDto: (filter: FilterDto | CascadingFilterDto) => filter is CascadingFilterDto;
|
|
41
|
+
/**
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
41
44
|
export type DashboardDto = {
|
|
42
45
|
oid: string;
|
|
43
46
|
title: string;
|
|
@@ -138,7 +138,7 @@ export declare class ClientApplication {
|
|
|
138
138
|
*/
|
|
139
139
|
constructor(url: string, auth: Authenticator, defaultDataSource?: DataSource);
|
|
140
140
|
}
|
|
141
|
-
type ClientApplicationParams = Pick<SisenseContextProviderProps, 'appConfig' | 'defaultDataSource' | 'url' | 'token' | 'wat' | 'ssoEnabled' | 'enableSilentPreAuth'>;
|
|
141
|
+
type ClientApplicationParams = Pick<SisenseContextProviderProps, 'appConfig' | 'defaultDataSource' | 'url' | 'token' | 'wat' | 'ssoEnabled' | 'enableSilentPreAuth' | 'useFusionAuth'>;
|
|
142
142
|
/** @internal */
|
|
143
|
-
export declare const createClientApplication: ({ defaultDataSource, url, token, wat, ssoEnabled, appConfig, enableSilentPreAuth, }: ClientApplicationParams) => Promise<ClientApplication>;
|
|
143
|
+
export declare const createClientApplication: ({ defaultDataSource, url, token, wat, ssoEnabled, appConfig, enableSilentPreAuth, useFusionAuth, }: ClientApplicationParams) => Promise<ClientApplication>;
|
|
144
144
|
export {};
|
|
@@ -358,7 +358,7 @@ export interface AreamapChartDataOptions {
|
|
|
358
358
|
/** Column or attribute representing the countries (or states) on the map. */
|
|
359
359
|
geo: [Column | StyledColumn];
|
|
360
360
|
/** Measure column (or measure) encoded by the color of the countries (or states) on the map. */
|
|
361
|
-
color
|
|
361
|
+
color?: [MeasureColumn | CalculatedMeasureColumn | StyledMeasureColumn];
|
|
362
362
|
}
|
|
363
363
|
/**
|
|
364
364
|
* Checks if the given argument is a measure column.
|
|
@@ -663,5 +663,5 @@ export interface BoxplotChartDataOptionsInternal {
|
|
|
663
663
|
/** @internal */
|
|
664
664
|
export type AreamapChartDataOptionsInternal = {
|
|
665
665
|
geo: Category;
|
|
666
|
-
color
|
|
666
|
+
color?: Value;
|
|
667
667
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TFunction } from '@sisense/sdk-common';
|
|
2
|
+
type ForecastToolipProps = {
|
|
3
|
+
x1Value?: string;
|
|
4
|
+
x2Value?: string;
|
|
5
|
+
title: string;
|
|
6
|
+
forecastValue: string;
|
|
7
|
+
upperValue: string;
|
|
8
|
+
lowerValue: string;
|
|
9
|
+
confidenceValue: string;
|
|
10
|
+
translate?: TFunction;
|
|
11
|
+
};
|
|
12
|
+
export default function ForecastToolipComponent(props: ForecastToolipProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const renderForecastTooltipString: (props: ForecastToolipProps) => string;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { TFunction } from '@sisense/sdk-common';
|
|
2
|
+
declare const TrendTypesFromExpression: {
|
|
3
|
+
smooth: string;
|
|
4
|
+
linear: string;
|
|
5
|
+
local: string;
|
|
6
|
+
logarithmic: string;
|
|
7
|
+
};
|
|
8
|
+
type TrendToolipProps = {
|
|
9
|
+
x1Value?: string;
|
|
10
|
+
x2Value?: string;
|
|
11
|
+
modelType: keyof typeof TrendTypesFromExpression | string;
|
|
12
|
+
title: string;
|
|
13
|
+
trendData: {
|
|
14
|
+
min: string;
|
|
15
|
+
max: string;
|
|
16
|
+
median: string;
|
|
17
|
+
average: string;
|
|
18
|
+
};
|
|
19
|
+
localValue: string;
|
|
20
|
+
translate?: TFunction;
|
|
21
|
+
};
|
|
22
|
+
export default function TrendToolip(props: TrendToolipProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare const renderTrendTooltipString: (props: TrendToolipProps) => string;
|
|
24
|
+
export {};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { TFunction } from '@sisense/sdk-common';
|
|
2
1
|
import { SeriesType } from './chart-options-service';
|
|
3
2
|
import { AxisSettings } from './translations/axis-section';
|
|
4
3
|
export declare const FORECAST_PREFIX = "$forecast";
|
|
@@ -18,7 +17,7 @@ export declare const formatForecastAdjustRangeStart: (s: SeriesType, seriesHash:
|
|
|
18
17
|
[x: string]: SeriesType;
|
|
19
18
|
}) => void;
|
|
20
19
|
export declare const formatForecastPlotBands: (xAxis: AxisSettings[], forecastStartIndex: number, lastTickIndex: number) => void;
|
|
21
|
-
export declare const formatTrendSeries: (
|
|
20
|
+
export declare const formatTrendSeries: (series: SeriesType, seriesHash: {
|
|
22
21
|
[x: string]: SeriesType;
|
|
23
|
-
}
|
|
24
|
-
export declare const formatAdvancedAnalyticsSeries: (series: SeriesType[]
|
|
22
|
+
}) => void;
|
|
23
|
+
export declare const formatAdvancedAnalyticsSeries: (series: SeriesType[]) => void;
|
|
@@ -2,10 +2,10 @@ import { TFunction } from '@sisense/sdk-common';
|
|
|
2
2
|
import { BoxplotChartData } from '../chart-data/types';
|
|
3
3
|
import { BoxplotChartDataOptionsInternal } from '../chart-data-options/types';
|
|
4
4
|
import { HighchartsOptionsInternal } from './chart-options-service';
|
|
5
|
-
import { OptionsWithAlerts } from '../types';
|
|
5
|
+
import { CompleteThemeSettings, OptionsWithAlerts } from '../types';
|
|
6
6
|
import { ChartDesignOptions } from './translations/types';
|
|
7
7
|
/**
|
|
8
8
|
* Convert intermediate chart data, data options, and design options
|
|
9
9
|
* into pure highcharts config data.
|
|
10
10
|
*/
|
|
11
|
-
export declare const getBoxplotChartOptions: (chartData: BoxplotChartData, chartDesignOptions: ChartDesignOptions, dataOptions: BoxplotChartDataOptionsInternal, translate: TFunction) => OptionsWithAlerts<HighchartsOptionsInternal>;
|
|
11
|
+
export declare const getBoxplotChartOptions: (chartData: BoxplotChartData, chartDesignOptions: ChartDesignOptions, dataOptions: BoxplotChartDataOptionsInternal, translate: TFunction, themeSettings?: CompleteThemeSettings) => OptionsWithAlerts<HighchartsOptionsInternal>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Style } from '../chart-options-service';
|
|
1
|
+
import { Stacking, Style } from '../chart-options-service';
|
|
2
2
|
import { ChartDataOptionsInternal, Category } from '../../chart-data-options/types';
|
|
3
3
|
import { ChartType } from '../../types';
|
|
4
4
|
import { CategoricalXValues } from '../../chart-data/types';
|
|
@@ -105,4 +105,4 @@ export declare const getDefaultDateFormat: (granularity?: string) => "HH:mm:ss"
|
|
|
105
105
|
export declare const getDateFormatter: (category: Category, dateFormatter?: ((date: Date, format: string) => string) | undefined) => (time: number) => string;
|
|
106
106
|
export declare const getXAxisDatetimeSettings: (axis: Axis, category: Category, values: number[], dateFormatter?: ((date: Date, format: string) => string) | undefined) => AxisSettings[];
|
|
107
107
|
export declare const getXAxisSettings: (axis: Axis, axis2: Axis | undefined, categories: string[], plotBands: PlotBand[], xAxisOrientation: AxisOrientation, chartDataOptions: ChartDataOptionsInternal, chartType: ChartType) => AxisSettings[];
|
|
108
|
-
export declare const getYAxisSettings: (axis: Axis, axis2: Axis | undefined, axisMinMax: AxisMinMax, axis2MinMax: AxisMinMax | undefined, showTotal: boolean, chartDataOptions: ChartDataOptionsInternal) => [AxisSettings[], AxisClipped[]];
|
|
108
|
+
export declare const getYAxisSettings: (axis: Axis, axis2: Axis | undefined, axisMinMax: AxisMinMax, axis2MinMax: AxisMinMax | undefined, showTotal: boolean, chartDataOptions: ChartDataOptionsInternal, stacking: Stacking | undefined) => [AxisSettings[], AxisClipped[]];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SeriesType } from '../../chart-options-service.js';
|
|
2
2
|
import { BoxplotChartData } from '../../../chart-data/types.js';
|
|
3
|
-
import { SeriesWithAlerts } from '../../../types.js';
|
|
3
|
+
import { Color, SeriesWithAlerts } from '../../../types.js';
|
|
4
4
|
import { BoxplotChartDesignOptions } from '../design-options.js';
|
|
5
|
-
export declare const buildBoxplotSeries: (data: BoxplotChartData, chartDesignOptions: BoxplotChartDesignOptions) => SeriesWithAlerts<SeriesType[]>;
|
|
5
|
+
export declare const buildBoxplotSeries: (data: BoxplotChartData, chartDesignOptions: BoxplotChartDesignOptions, paletteColors?: Color[]) => SeriesWithAlerts<SeriesType[]>;
|